Use C++ libc headers.

Fixed Xapi interception regression.
This commit is contained in:
Daniel Stien 2008-08-24 04:54:44 +00:00
parent cb1dbe458c
commit 97e52aa668
22 changed files with 29 additions and 29 deletions

View File

@ -34,7 +34,7 @@
#include "Common/Error.h" #include "Common/Error.h"
#include <string.h> #include <cstring>
// clear the current error (returns false if error was fatal) // clear the current error (returns false if error was fatal)
bool Error::ClearError() bool Error::ClearError()

View File

@ -33,7 +33,7 @@
// ****************************************************************** // ******************************************************************
#include "Exe.h" #include "Exe.h"
#include <stdio.h> #include <cstdio>
#include <memory.h> #include <memory.h>
// construct via Exe file // construct via Exe file

View File

@ -40,7 +40,7 @@
#undef FIELD_OFFSET // prevent macro redefinition warnings #undef FIELD_OFFSET // prevent macro redefinition warnings
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <cstdio>
// ****************************************************************** // ******************************************************************
// * exported globals // * exported globals

View File

@ -38,8 +38,8 @@
#include "Common/Error.h" #include "Common/Error.h"
#include "Mutex.h" #include "Mutex.h"
#include <stdio.h> #include <cstdio>
#include <string.h> #include <cstring>
#include <windows.h> #include <windows.h>
#include "CxbxKrnl/EmuXTL.h" #include "CxbxKrnl/EmuXTL.h"

View File

@ -33,7 +33,7 @@
// ****************************************************************** // ******************************************************************
#include "XBVideo.h" #include "XBVideo.h"
#include <stdio.h> #include <cstdio>
// ****************************************************************** // ******************************************************************
// * func: XBVideo::XBVideo // * func: XBVideo::XBVideo

View File

@ -36,10 +36,10 @@
#include "CxbxUtil.h" #include "CxbxUtil.h"
#include <memory.h> #include <memory.h>
#include <locale.h> #include <clocale>
#include <stdlib.h> #include <cstdlib>
#include <string.h> #include <cstring>
#include <time.h> #include <ctime>
// construct via Xbe file // construct via Xbe file
Xbe::Xbe(const char *x_szFilename) Xbe::Xbe(const char *x_szFilename)

View File

@ -36,7 +36,7 @@
#include "Common/Error.h" #include "Common/Error.h"
#include <stdio.h> #include <cstdio>
// Xbe (Xbox Executable) file object // Xbe (Xbox Executable) file object
class Xbe : public Error class Xbe : public Error

View File

@ -35,7 +35,7 @@
#include "../Common/Exe.h" #include "../Common/Exe.h"
#include "../Common/Xbe.h" #include "../Common/Xbe.h"
#include <string.h> #include <cstring>
// static global(s) // static global(s)
static void ShowUsage(); static void ShowUsage();

View File

@ -38,7 +38,7 @@
#include "ResCxbx.h" #include "ResCxbx.h"
#include <dinput.h> #include <dinput.h>
#include <stdio.h> #include <cstdio>
/*! windows dialog procedure */ /*! windows dialog procedure */
static INT_PTR CALLBACK DlgControllerConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam); static INT_PTR CALLBACK DlgControllerConfigProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);

View File

@ -37,7 +37,7 @@
#include "CxbxUtil.h" #include "CxbxUtil.h"
#include "CxbxKrnl/CxbxKrnl.h" #include "CxbxKrnl/CxbxKrnl.h"
#include <stdio.h> #include <cstdio>
// ****************************************************************** // ******************************************************************
// * constructor // * constructor

View File

@ -35,7 +35,7 @@
#include "ResCxbx.h" #include "ResCxbx.h"
#include "jpegdec/jpegdec.h" #include "jpegdec/jpegdec.h"
#include <stdio.h> #include <cstdio>
WndAbout::WndAbout(HINSTANCE x_hInstance, HWND x_parent) : Wnd(x_hInstance) WndAbout::WndAbout(HINSTANCE x_hInstance, HWND x_parent) : Wnd(x_hInstance)
{ {

View File

@ -33,7 +33,7 @@
// ****************************************************************** // ******************************************************************
#include "jpegdec.h" #include "jpegdec.h"
#include <stdio.h> #include <cstdio>
#include <malloc.h> #include <malloc.h>
extern "C" extern "C"

View File

@ -48,7 +48,7 @@ namespace xboxkrnl
#include "HLEIntercept.h" #include "HLEIntercept.h"
#include <shlobj.h> #include <shlobj.h>
#include <locale.h> #include <clocale>
/* prevent name collisions */ /* prevent name collisions */
namespace NtDll namespace NtDll

View File

@ -52,7 +52,7 @@ namespace xboxkrnl
#include "ResCxbxDll.h" #include "ResCxbxDll.h"
#include <process.h> #include <process.h>
#include <locale.h> #include <clocale>
// Global(s) // Global(s)
HWND g_hEmuWindow = NULL; // rendering window HWND g_hEmuWindow = NULL; // rendering window

View File

@ -40,7 +40,7 @@
#include "CxbxKrnl/EmuXTL.h" #include "CxbxKrnl/EmuXTL.h"
#include "CxbxKrnl/ResourceTracker.h" #include "CxbxKrnl/ResourceTracker.h"
#include <time.h> #include <ctime>
#define VERTEX_BUFFER_CACHE_SIZE 64 #define VERTEX_BUFFER_CACHE_SIZE 64
#define MAX_STREAM_NOT_USED_TIME (2 * CLOCKS_PER_SEC) // TODO: Trim the not used time #define MAX_STREAM_NOT_USED_TIME (2 * CLOCKS_PER_SEC) // TODO: Trim the not used time

View File

@ -35,7 +35,7 @@
#define VERTEXBUFFER_H #define VERTEXBUFFER_H
#include "Cxbx.h" #include "Cxbx.h"
//#include <time.h> // Conflict with io.h //#include <ctime> // Conflict with io.h
#define MAX_NBR_STREAMS 16 #define MAX_NBR_STREAMS 16

View File

@ -50,7 +50,7 @@ namespace xboxkrnl
#include <mmreg.h> #include <mmreg.h>
#include <msacm.h> #include <msacm.h>
#include <process.h> #include <process.h>
#include <locale.h> #include <clocale>
XTL::X_CMcpxStream::_vtbl XTL::X_CMcpxStream::vtbl = XTL::X_CMcpxStream::_vtbl XTL::X_CMcpxStream::vtbl =
{ {

View File

@ -46,7 +46,7 @@ namespace xboxkrnl
#undef FIELD_OFFSET // prevent macro redefinition warnings #undef FIELD_OFFSET // prevent macro redefinition warnings
#include <windows.h> #include <windows.h>
#include <stdio.h> #include <cstdio>
// automatically insert after this many EmuFS() swaps // automatically insert after this many EmuFS() swaps
uint32 EmuAutoSleepRate = -1; uint32 EmuAutoSleepRate = -1;

View File

@ -42,7 +42,7 @@ namespace xboxkrnl
#include <xboxkrnl/xboxkrnl.h> #include <xboxkrnl/xboxkrnl.h>
}; };
#include <stdio.h> #include <cstdio>
// ****************************************************************** // ******************************************************************
// * prevent name collisions // * prevent name collisions

View File

@ -40,9 +40,9 @@ namespace xboxkrnl
#include <xboxkrnl/xboxkrnl.h> #include <xboxkrnl/xboxkrnl.h>
}; };
#include <stdio.h> #include <cstdio>
#include <ctype.h> #include <cctype>
#include <locale.h> #include <clocale>
#include <process.h> #include <process.h>
// prevent name collisions // prevent name collisions

View File

@ -1170,7 +1170,7 @@ OOVPATable D3D8_1_0_5849[] =
"EmuIDirect3DTexture8_GetSurfaceLevel2" "EmuIDirect3DTexture8_GetSurfaceLevel2"
#endif #endif
}, },
// IDirect3DDevice8::SetLight//(OOVPA*)&IDirect3DDevice8_SetLight_1_0_5558, // IDirect3DDevice8::SetLight
{ {
(OOVPA*)&IDirect3DDevice8_SetLight_1_0_5558, (OOVPA*)&IDirect3DDevice8_SetLight_1_0_5558,

View File

@ -198,7 +198,7 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
if(BuildVersion == 5659) { BuildVersion = 5558; } if(BuildVersion == 5659) { BuildVersion = 5558; }
if(BuildVersion == 5788) { BuildVersion = 5558; } if(BuildVersion == 5788) { BuildVersion = 5558; }
if(BuildVersion == 5028) { BuildVersion = 4627; } if(BuildVersion == 5028) { BuildVersion = 4627; }
if(BuildVersion == 5933) { BuildVersion = 5849; } // These XDK versions are pretty mutch the same if(BuildVersion == 5933) { BuildVersion = 5849; } // These XDK versions are pretty much the same
/* /*
if(BuildVersion == 3944) { BuildVersion = 3925; } if(BuildVersion == 3944) { BuildVersion = 3925; }
if(BuildVersion == 4039) { BuildVersion = 4034; } if(BuildVersion == 4039) { BuildVersion = 4034; }
@ -273,7 +273,7 @@ void EmuHLEIntercept(Xbe::LibraryVersion *pLibraryVersion, Xbe::Header *pXbeHead
ProcessHeapOffs = 0x51; ProcessHeapOffs = 0x51;
RtlCreateHeapOffs = 0x4A; RtlCreateHeapOffs = 0x4A;
} }
if(BuildVersion >= 5233) else if(BuildVersion >= 5233)
{ {
pFunc = EmuLocateFunction((OOVPA*)&XapiInitProcess_1_0_5233, lower, upper); pFunc = EmuLocateFunction((OOVPA*)&XapiInitProcess_1_0_5233, lower, upper);
ProcessHeapOffs = 0x51; ProcessHeapOffs = 0x51;