From 2bf9348ff2fc7987fbf99fa6b50423edece5a16b Mon Sep 17 00:00:00 2001 From: Aaron Robinson Date: Wed, 2 Apr 2003 02:23:30 +0000 Subject: [PATCH] Massive Code Re-organization --- Cxbe.dsp | 6 +- Cxbe.vcproj | 9 ++- Cxbx.dsp | 8 +-- Cxbx.sln | 32 +++++----- Cxbx.vcproj | 37 ++++++++++-- CxbxKrnl.dsp | 24 ++++++-- CxbxKrnl.vcproj | 29 +++++++-- Doc/Changelog.txt | 2 + Include/Core/Error.h | 2 + Include/Core/Exe.h | 2 + Include/Core/Xbe.h | 6 +- Include/Cxbx.h | 16 ++--- Include/Win32/Cxbx/EmuExe.h | 2 +- Include/Win32/Cxbx/Prolog.h | 2 + Include/Win32/Cxbx/Wnd.h | 2 + Include/Win32/Cxbx/WndMain.h | 3 +- Include/Win32/CxbxKrnl/D3D8.1.0.3925.h | 2 + Include/Win32/CxbxKrnl/D3D8.1.0.4361.h | 2 + Include/Win32/CxbxKrnl/D3D8.1.0.4627.h | 2 + Include/Win32/CxbxKrnl/Emu.h | 28 +++------ Include/Win32/CxbxKrnl/EmuD3D8.h | 53 +++++++++++++++++ Include/Win32/CxbxKrnl/EmuDInput.h | 13 +++- Include/Win32/CxbxKrnl/EmuLDT.h | 2 + Include/Win32/CxbxKrnl/EmuShared.h | 10 +--- Include/Win32/CxbxKrnl/EmuXapi.h | 59 +++++++++++++++++-- Include/Win32/CxbxKrnl/OOVPA.h | 2 + Include/Win32/CxbxKrnl/Xapi.1.0.3911.h | 2 + Include/Win32/CxbxKrnl/Xapi.1.0.4361.h | 2 + Include/Win32/CxbxKrnl/Xapi.1.0.4627.h | 2 + Include/Win32/CxbxKrnl/{EmuD3D.h => xd3d8.h} | 45 +++++++------- Include/Win32/CxbxKrnl/xntdll.h | 4 ++ Include/Win32/Mutex.h | 2 - Source/Core/Error.cpp | 2 +- Source/Core/Exe.cpp | 2 +- Source/Core/OpenXDK.cpp | 2 +- Source/Core/Xbe.cpp | 5 +- Source/Standard/Cxbe/Main.cpp | 4 +- Source/Win32/Cxbx/DlgControllerConfig.cpp | 3 +- Source/Win32/Cxbx/EmuExe.cpp | 4 +- Source/Win32/Cxbx/Prolog.cpp | 2 +- Source/Win32/Cxbx/WinMain.cpp | 6 +- Source/Win32/Cxbx/Wnd.cpp | 2 - Source/Win32/Cxbx/WndAbout.cpp | 2 - Source/Win32/Cxbx/WndMain.cpp | 5 +- Source/Win32/CxbxKrnl/D3D8.1.0.3925.inl | 4 +- Source/Win32/CxbxKrnl/D3D8.1.0.4361.inl | 8 +-- Source/Win32/CxbxKrnl/D3D8.1.0.4627.inl | 8 +-- Source/Win32/CxbxKrnl/Emu.cpp | 21 ++++--- .../CxbxKrnl/{EmuD3D.cpp => EmuD3D8.cpp} | 49 +++++++++------ Source/Win32/CxbxKrnl/EmuDInput.cpp | 23 ++++++-- Source/Win32/CxbxKrnl/EmuFS.cpp | 17 +++++- Source/Win32/CxbxKrnl/EmuKrnl.cpp | 22 ++++--- Source/Win32/CxbxKrnl/EmuLDT.cpp | 9 ++- Source/Win32/CxbxKrnl/EmuShared.cpp | 7 +-- Source/Win32/CxbxKrnl/EmuXapi.cpp | 40 ++++++++----- Source/Win32/CxbxKrnl/HLEDataBase.cpp | 24 +++++++- Source/Win32/CxbxKrnl/KernelThunk.cpp | 15 +++-- Source/Win32/CxbxKrnl/Xapi.1.0.3911.inl | 10 ++-- Source/Win32/CxbxKrnl/Xapi.1.0.4361.inl | 22 +++---- Source/Win32/CxbxKrnl/Xapi.1.0.4627.inl | 22 +++---- Source/Win32/InputConfig.cpp | 1 - Source/Win32/Mutex.cpp | 2 + 62 files changed, 506 insertions(+), 249 deletions(-) create mode 100644 Include/Win32/CxbxKrnl/EmuD3D8.h rename Include/Win32/CxbxKrnl/{EmuD3D.h => xd3d8.h} (65%) rename Source/Win32/CxbxKrnl/{EmuD3D.cpp => EmuD3D8.cpp} (93%) diff --git a/Cxbe.dsp b/Cxbe.dsp index 767310e33..d75ae1504 100644 --- a/Cxbe.dsp +++ b/Cxbe.dsp @@ -50,7 +50,8 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libc" +# SUBTRACT LINK32 /pdb:none !ELSEIF "$(CFG)" == "Cxbe - Win32 Debug" @@ -74,7 +75,8 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"libc" /pdbtype:sept +# SUBTRACT LINK32 /pdb:none !ENDIF diff --git a/Cxbe.vcproj b/Cxbe.vcproj index 12a3d16bd..4f1cfe806 100644 --- a/Cxbe.vcproj +++ b/Cxbe.vcproj @@ -21,7 +21,7 @@ @@ -140,6 +142,9 @@ + + diff --git a/Cxbx.dsp b/Cxbx.dsp index 0cacd075f..b52289afc 100644 --- a/Cxbx.dsp +++ b/Cxbx.dsp @@ -153,6 +153,10 @@ SOURCE=.\Include\Win32\Cxbx\DlgControllerConfig.h # End Source File # Begin Source File +SOURCE=.\Include\Win32\CxbxKrnl\Emu.h +# End Source File +# Begin Source File + SOURCE=.\Include\Win32\Cxbx\EmuExe.h # End Source File # Begin Source File @@ -181,10 +185,6 @@ SOURCE=.\Include\Win32\Cxbx\Prolog.h # End Source File # Begin Source File -SOURCE=.\Resource\ResCxbx.h -# End Source File -# Begin Source File - SOURCE=.\Include\Win32\Cxbx\Wnd.h # End Source File # Begin Source File diff --git a/Cxbx.sln b/Cxbx.sln index 873ef60fb..05aeeca6b 100644 --- a/Cxbx.sln +++ b/Cxbx.sln @@ -1,9 +1,9 @@ Microsoft Visual Studio Solution File, Format Version 7.00 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbe", "Cxbe.vcproj", "{A797FF7B-F106-4442-856C-E5498D03C5C5}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbe", "Cxbe.vcproj", "{56B1499F-551E-4A54-8B6E-457E4C08F8F8}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbx", "Cxbx.vcproj", "{F6581400-7F26-442F-BEEB-D8589452828F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Cxbx", "Cxbx.vcproj", "{85A8FD96-EF3D-4110-8AD1-05E89A8E4312}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxbxKrnl", "CxbxKrnl.vcproj", "{09B2AF0D-F5C9-4AB4-887A-A9DDC38BF14F}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CxbxKrnl", "CxbxKrnl.vcproj", "{73E6903F-83A9-442D-AC49-6BAA79DE7B10}" EndProject Global GlobalSection(SolutionConfiguration) = preSolution @@ -11,21 +11,21 @@ Global ConfigName.1 = Release EndGlobalSection GlobalSection(ProjectDependencies) = postSolution - {F6581400-7F26-442F-BEEB-D8589452828F}.0 = {09B2AF0D-F5C9-4AB4-887A-A9DDC38BF14F} + {85A8FD96-EF3D-4110-8AD1-05E89A8E4312}.0 = {73E6903F-83A9-442D-AC49-6BAA79DE7B10} EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {A797FF7B-F106-4442-856C-E5498D03C5C5}.Debug.ActiveCfg = Debug|Win32 - {A797FF7B-F106-4442-856C-E5498D03C5C5}.Debug.Build.0 = Debug|Win32 - {A797FF7B-F106-4442-856C-E5498D03C5C5}.Release.ActiveCfg = Release|Win32 - {A797FF7B-F106-4442-856C-E5498D03C5C5}.Release.Build.0 = Release|Win32 - {F6581400-7F26-442F-BEEB-D8589452828F}.Debug.ActiveCfg = Debug|Win32 - {F6581400-7F26-442F-BEEB-D8589452828F}.Debug.Build.0 = Debug|Win32 - {F6581400-7F26-442F-BEEB-D8589452828F}.Release.ActiveCfg = Release|Win32 - {F6581400-7F26-442F-BEEB-D8589452828F}.Release.Build.0 = Release|Win32 - {09B2AF0D-F5C9-4AB4-887A-A9DDC38BF14F}.Debug.ActiveCfg = Debug|Win32 - {09B2AF0D-F5C9-4AB4-887A-A9DDC38BF14F}.Debug.Build.0 = Debug|Win32 - {09B2AF0D-F5C9-4AB4-887A-A9DDC38BF14F}.Release.ActiveCfg = Release|Win32 - {09B2AF0D-F5C9-4AB4-887A-A9DDC38BF14F}.Release.Build.0 = Release|Win32 + {56B1499F-551E-4A54-8B6E-457E4C08F8F8}.Debug.ActiveCfg = Debug|Win32 + {56B1499F-551E-4A54-8B6E-457E4C08F8F8}.Debug.Build.0 = Debug|Win32 + {56B1499F-551E-4A54-8B6E-457E4C08F8F8}.Release.ActiveCfg = Release|Win32 + {56B1499F-551E-4A54-8B6E-457E4C08F8F8}.Release.Build.0 = Release|Win32 + {85A8FD96-EF3D-4110-8AD1-05E89A8E4312}.Debug.ActiveCfg = Debug|Win32 + {85A8FD96-EF3D-4110-8AD1-05E89A8E4312}.Debug.Build.0 = Debug|Win32 + {85A8FD96-EF3D-4110-8AD1-05E89A8E4312}.Release.ActiveCfg = Release|Win32 + {85A8FD96-EF3D-4110-8AD1-05E89A8E4312}.Release.Build.0 = Release|Win32 + {73E6903F-83A9-442D-AC49-6BAA79DE7B10}.Debug.ActiveCfg = Debug|Win32 + {73E6903F-83A9-442D-AC49-6BAA79DE7B10}.Debug.Build.0 = Debug|Win32 + {73E6903F-83A9-442D-AC49-6BAA79DE7B10}.Release.ActiveCfg = Release|Win32 + {73E6903F-83A9-442D-AC49-6BAA79DE7B10}.Release.Build.0 = Release|Win32 EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution EndGlobalSection diff --git a/Cxbx.vcproj b/Cxbx.vcproj index 3c9756982..dd15d4e30 100644 --- a/Cxbx.vcproj +++ b/Cxbx.vcproj @@ -21,7 +21,7 @@ @@ -154,6 +155,9 @@ upxCxbx.bat + + @@ -176,9 +180,18 @@ upxCxbx.bat + + + + + + @@ -186,10 +199,13 @@ upxCxbx.bat RelativePath=".\Include\Core\Exe.h"> + RelativePath=".\Include\Win32\InputConfig.h"> + RelativePath=".\Include\Win32\Mutex.h"> + + @@ -238,6 +254,9 @@ upxCxbx.bat + + @@ -247,6 +266,12 @@ upxCxbx.bat + + + + diff --git a/CxbxKrnl.dsp b/CxbxKrnl.dsp index e7745f66d..f401cdbcc 100644 --- a/CxbxKrnl.dsp +++ b/CxbxKrnl.dsp @@ -79,7 +79,7 @@ BSC32=bscmake.exe # ADD BSC32 /nologo LINK32=link.exe # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept -# ADD LINK32 d3d8.lib dinput8.lib dxguid.lib ntdll.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /pdb:"Bin\Debug/Cxbx.pdb" /debug /machine:I386 /nodefaultlib:"libc" /implib:"Bin\Debug/Cxbx.lib" /pdbtype:sept /libpath:"Lib" +# ADD LINK32 d3d8.lib dinput8.lib dxguid.lib ntdll.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /nodefaultlib:"libc" /out:"Bin\Debug/Cxbx.dll" /pdbtype:sept /libpath:"Lib" # SUBTRACT LINK32 /pdb:none !ENDIF @@ -133,6 +133,18 @@ SOURCE=.\Doc\Todo.txt # PROP Default_Filter "" # Begin Source File +SOURCE=.\Include\Win32\AlignPosfix1.h +# End Source File +# Begin Source File + +SOURCE=.\Include\Win32\AlignPrefix1.h +# End Source File +# Begin Source File + +SOURCE=.\Include\Cxbx.h +# End Source File +# Begin Source File + SOURCE=.\Include\Win32\CxbxKrnl\D3D8.1.0.3925.h # End Source File # Begin Source File @@ -149,7 +161,7 @@ SOURCE=.\Include\Win32\CxbxKrnl\Emu.h # End Source File # Begin Source File -SOURCE=.\Include\Win32\CxbxKrnl\EmuD3D.h +SOURCE=.\Include\Win32\CxbxKrnl\EmuD3D8.h # End Source File # Begin Source File @@ -189,7 +201,7 @@ SOURCE=.\Include\Win32\CxbxKrnl\OOVPA.h # End Source File # Begin Source File -SOURCE=.\Resource\ResCxbxKrnl.h +SOURCE=.\Include\Win32\CxbxKrnl\ResCxbxDll.h # End Source File # Begin Source File @@ -205,6 +217,10 @@ SOURCE=.\Include\Win32\CxbxKrnl\Xapi.1.0.4627.h # End Source File # Begin Source File +SOURCE=.\Include\Win32\CxbxKrnl\xd3d8.h +# End Source File +# Begin Source File + SOURCE=.\Include\Win32\CxbxKrnl\xntdll.h # End Source File # End Group @@ -241,7 +257,7 @@ SOURCE=.\Source\Win32\CxbxKrnl\Emu.cpp # End Source File # Begin Source File -SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D.cpp +SOURCE=.\Source\Win32\CxbxKrnl\EmuD3D8.cpp # End Source File # Begin Source File diff --git a/CxbxKrnl.vcproj b/CxbxKrnl.vcproj index 5fd45d24c..064c45005 100644 --- a/CxbxKrnl.vcproj +++ b/CxbxKrnl.vcproj @@ -21,7 +21,7 @@ @@ -82,7 +83,7 @@ + + @@ -165,6 +169,15 @@ + + + + + + @@ -178,7 +191,7 @@ RelativePath=".\Include\Win32\CxbxKrnl\Emu.h"> + RelativePath=".\Include\Win32\CxbxKrnl\EmuD3D8.h"> @@ -201,11 +214,14 @@ + + + RelativePath=".\Include\Win32\CxbxKrnl\ResCxbxDll.h"> @@ -216,6 +232,9 @@ + + @@ -258,7 +277,7 @@ RelativePath=".\Source\Win32\CxbxKrnl\Emu.cpp"> + RelativePath=".\Source\Win32\CxbxKrnl\EmuD3D8.cpp"> diff --git a/Doc/Changelog.txt b/Doc/Changelog.txt index 0fa2debe0..32fe9bb55 100644 --- a/Doc/Changelog.txt +++ b/Doc/Changelog.txt @@ -15,6 +15,8 @@ version: 0.7.0 (??/??/??) - __declspec(thread) style TLS is working!! +- Massive code re-organization. + - Lots of random optimizations version: 0.6.0-pre12 (02/23/03) diff --git a/Include/Core/Error.h b/Include/Core/Error.h index 3ca7dec07..ead566b4b 100644 --- a/Include/Core/Error.h +++ b/Include/Core/Error.h @@ -34,6 +34,8 @@ #ifndef ERROR_H #define ERROR_H +#include "Cxbx.h" + // ****************************************************************** // * Inherited from this class for easy Error detection // ****************************************************************** diff --git a/Include/Core/Exe.h b/Include/Core/Exe.h index 90eeb5f08..6b935aa98 100644 --- a/Include/Core/Exe.h +++ b/Include/Core/Exe.h @@ -34,6 +34,8 @@ #ifndef EXE_H #define EXE_H +#include "Error.h" + // ****************************************************************** // * Exe (PE) file object // ****************************************************************** diff --git a/Include/Core/Xbe.h b/Include/Core/Xbe.h index a3ddae28a..c1f574d14 100644 --- a/Include/Core/Xbe.h +++ b/Include/Core/Xbe.h @@ -34,7 +34,9 @@ #ifndef XBE_H #define XBE_H -#include +#include "Error.h" + +#include // ****************************************************************** // * Xbe (Xbox Executable) file object @@ -250,7 +252,7 @@ class Xbe : public Error // ****************************************************************** // * GetTLSData // ****************************************************************** - uint08 *GetTLSData() { return GetAddr(m_TLS->dwDataStartAddr); } + uint08 *GetTLSData() { if(m_TLS == 0) return 0; else return GetAddr(m_TLS->dwDataStartAddr); } private: // ****************************************************************** diff --git a/Include/Cxbx.h b/Include/Cxbx.h index 584da2e1a..c651cc067 100644 --- a/Include/Cxbx.h +++ b/Include/Cxbx.h @@ -34,6 +34,15 @@ #ifndef CXBX_H #define CXBX_H +// ****************************************************************** +// * cxbxkrnl exports, others import +// ****************************************************************** +#ifndef _CXBXKRNL_INTERNAL +#define CXBXKRNL_API __declspec(dllimport) +#else +#define CXBXKRNL_API __declspec(dllexport) +#endif + // ****************************************************************** // * Caustik's favorite typedefs // ****************************************************************** @@ -81,11 +90,4 @@ enum DebugMode DM_FILE }; -// ****************************************************************** -// * Core Components -// ****************************************************************** -#include "Error.h" -#include "Exe.h" -#include "Xbe.h" - #endif diff --git a/Include/Win32/Cxbx/EmuExe.h b/Include/Win32/Cxbx/EmuExe.h index ad414c110..c4f913fe7 100644 --- a/Include/Win32/Cxbx/EmuExe.h +++ b/Include/Win32/Cxbx/EmuExe.h @@ -34,7 +34,7 @@ #ifndef EMUEXE_H #define EMUEXE_H -#include "Cxbx.h" +#include "Exe.h" // ****************************************************************** // * class : EmuExe diff --git a/Include/Win32/Cxbx/Prolog.h b/Include/Win32/Cxbx/Prolog.h index 6d05c2252..d371073b0 100644 --- a/Include/Win32/Cxbx/Prolog.h +++ b/Include/Win32/Cxbx/Prolog.h @@ -34,6 +34,8 @@ #ifndef PROLOG_H #define PROLOG_H +#include "Cxbx.h" + // ****************************************************************** // * func : Prolog // ****************************************************************** diff --git a/Include/Win32/Cxbx/Wnd.h b/Include/Win32/Cxbx/Wnd.h index f8bbe96e4..d25fe9819 100644 --- a/Include/Win32/Cxbx/Wnd.h +++ b/Include/Win32/Cxbx/Wnd.h @@ -34,6 +34,8 @@ #ifndef WND_H #define WND_H +#include "Error.h" + #undef FIELD_OFFSET // prevent macro redefinition warnings #include diff --git a/Include/Win32/Cxbx/WndMain.h b/Include/Win32/Cxbx/WndMain.h index 55e4e3ce0..93d69435e 100644 --- a/Include/Win32/Cxbx/WndMain.h +++ b/Include/Win32/Cxbx/WndMain.h @@ -35,7 +35,8 @@ #define WNDMAIN_H #include "Wnd.h" -#include "DlgControllerConfig.h" +#include "Exe.h" +#include "Xbe.h" // ****************************************************************** // * constants diff --git a/Include/Win32/CxbxKrnl/D3D8.1.0.3925.h b/Include/Win32/CxbxKrnl/D3D8.1.0.3925.h index be785698e..9d07f09e8 100644 --- a/Include/Win32/CxbxKrnl/D3D8.1.0.3925.h +++ b/Include/Win32/CxbxKrnl/D3D8.1.0.3925.h @@ -34,6 +34,8 @@ #ifndef D3D8_1_0_3925_H #define D3D8_1_0_3925_H +#include "OOVPA.h" + extern OOVPATable D3D8_1_0_3925[]; extern uint32 D3D8_1_0_3925_SIZE; diff --git a/Include/Win32/CxbxKrnl/D3D8.1.0.4361.h b/Include/Win32/CxbxKrnl/D3D8.1.0.4361.h index f87366996..eabb4c925 100644 --- a/Include/Win32/CxbxKrnl/D3D8.1.0.4361.h +++ b/Include/Win32/CxbxKrnl/D3D8.1.0.4361.h @@ -34,6 +34,8 @@ #ifndef D3D8_1_0_4361_H #define D3D8_1_0_4361_H +#include "OOVPA.h" + extern OOVPATable D3D8_1_0_4361[]; extern uint32 D3D8_1_0_4361_SIZE; diff --git a/Include/Win32/CxbxKrnl/D3D8.1.0.4627.h b/Include/Win32/CxbxKrnl/D3D8.1.0.4627.h index b20406f56..90e56b599 100644 --- a/Include/Win32/CxbxKrnl/D3D8.1.0.4627.h +++ b/Include/Win32/CxbxKrnl/D3D8.1.0.4627.h @@ -34,6 +34,8 @@ #ifndef D3D8_1_0_4627_H #define D3D8_1_0_4627_H +#include "OOVPA.h" + extern OOVPATable D3D8_1_0_4627[]; extern uint32 D3D8_1_0_4627_SIZE; diff --git a/Include/Win32/CxbxKrnl/Emu.h b/Include/Win32/CxbxKrnl/Emu.h index 0c7f70fa8..0f636b0e3 100644 --- a/Include/Win32/CxbxKrnl/Emu.h +++ b/Include/Win32/CxbxKrnl/Emu.h @@ -34,15 +34,9 @@ #ifndef EMU_H #define EMU_H -// ****************************************************************** -// * cxbxkrnl exports, others import -// ****************************************************************** -#ifndef _CXBXKRNL_INTERNAL -#define CXBXKRNL_API DECLSPEC_IMPORT -#else -#define CXBXKRNL_API DECLSPEC_EXPORT -#endif +#include "Xbe.h" +/* // ****************************************************************** // * prevent name collisions // ****************************************************************** @@ -88,34 +82,28 @@ extern xboxkrnl::XINPUT_STATE g_EmuController1; #include "EmuKrnl.h" #include "EmuLDT.h" #include "EmuFS.h" +*/ -#if defined(__cplusplus) -extern "C" -{ -#endif +#include // ****************************************************************** // * func: EmuNoFunc // ****************************************************************** -CXBXKRNL_API void NTAPI EmuNoFunc(); +extern "C" CXBXKRNL_API void NTAPI EmuNoFunc(); // ****************************************************************** // * func: EmuInit // ****************************************************************** -CXBXKRNL_API void NTAPI EmuInit(Xbe::LibraryVersion *LibraryVersion, DebugMode DebugConsole, char *DebugFilename, Xbe::Header *XbeHeader, uint32 XbeHeaderSize, void (*Entry)()); +extern "C" CXBXKRNL_API void NTAPI EmuInit(Xbe::LibraryVersion *LibraryVersion, DebugMode DebugConsole, char *DebugFilename, Xbe::Header *XbeHeader, uint32 XbeHeaderSize, void (*Entry)()); // ****************************************************************** // * func: EmuPanic // ****************************************************************** -CXBXKRNL_API void NTAPI EmuPanic(); +extern "C" CXBXKRNL_API void NTAPI EmuPanic(); // ****************************************************************** // * data: KernelThunkTable // ****************************************************************** -extern CXBXKRNL_API uint32 KernelThunkTable[367]; - -#if defined(__cplusplus) -} -#endif +extern "C" CXBXKRNL_API uint32 KernelThunkTable[367]; #endif diff --git a/Include/Win32/CxbxKrnl/EmuD3D8.h b/Include/Win32/CxbxKrnl/EmuD3D8.h new file mode 100644 index 000000000..18585b6d1 --- /dev/null +++ b/Include/Win32/CxbxKrnl/EmuD3D8.h @@ -0,0 +1,53 @@ +// ****************************************************************** +// * +// * .,-::::: .,:: .::::::::. .,:: .: +// * ,;;;'````' `;;;, .,;; ;;;'';;' `;;;, .,;; +// * [[[ '[[,,[[' [[[__[[\. '[[,,[[' +// * $$$ Y$$$P $$""""Y$$ Y$$$P +// * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, +// * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, +// * +// * Cxbx->Win32->CxbxKrnl->EmuD3D8.h +// * +// * This file is part of the Cxbx project. +// * +// * Cxbx and Cxbe are free software; you can redistribute them +// * and/or modify them under the terms of the GNU General Public +// * License as published by the Free Software Foundation; either +// * version 2 of the license, or (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have recieved a copy of the GNU General Public License +// * along with this program; see the file COPYING. +// * If not, write to the Free Software Foundation, Inc., +// * 59 Temple Place - Suite 330, Bostom, MA 02111-1307, USA. +// * +// * (c) 2002-2003 Aaron Robinson +// * +// * All rights reserved +// * +// ****************************************************************** +#ifndef EMUD3D8_H +#define EMUD3D8_H + +#include "Xbe.h" + +#include +#define DIRECT3D_VERSION 0x0800 +#include + +// ****************************************************************** +// * global exports +// ****************************************************************** +extern HWND g_EmuWindow; // Rendering Window + +// ****************************************************************** +// * func: EmuInitD3D +// ****************************************************************** +void EmuInitD3D(Xbe::Header *XbeHeader, uint32 XbeHeaderSize); + +#endif diff --git a/Include/Win32/CxbxKrnl/EmuDInput.h b/Include/Win32/CxbxKrnl/EmuDInput.h index 8c73eebcc..1a758b834 100644 --- a/Include/Win32/CxbxKrnl/EmuDInput.h +++ b/Include/Win32/CxbxKrnl/EmuDInput.h @@ -34,7 +34,18 @@ #ifndef EMUDINPUT_H #define EMUDINPUT_H -#include "Emu.h" +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xapi +{ + #include +}; + +// ****************************************************************** +// * exported globals +// ****************************************************************** +extern xapi::XINPUT_STATE g_EmuController1; // Input Controller // ****************************************************************** // * func: EmuPollInput diff --git a/Include/Win32/CxbxKrnl/EmuLDT.h b/Include/Win32/CxbxKrnl/EmuLDT.h index c6e0daeae..4b7dc7d80 100644 --- a/Include/Win32/CxbxKrnl/EmuLDT.h +++ b/Include/Win32/CxbxKrnl/EmuLDT.h @@ -34,6 +34,8 @@ #ifndef EMULDT_H #define EMULDT_H +#include "Cxbx.h" + // ****************************************************************** // * func: EmuInitLDT // ****************************************************************** diff --git a/Include/Win32/CxbxKrnl/EmuShared.h b/Include/Win32/CxbxKrnl/EmuShared.h index b28b00b3b..d60c61d45 100644 --- a/Include/Win32/CxbxKrnl/EmuShared.h +++ b/Include/Win32/CxbxKrnl/EmuShared.h @@ -34,17 +34,11 @@ #ifndef EMUSHARED_H #define EMUSHARED_H +#include "Cxbx.h" #include "Mutex.h" #include "InputConfig.h" -// ****************************************************************** -// * cxbxkrnl exports, others import -// ****************************************************************** -#ifndef _CXBXKRNL_INTERNAL -#define CXBXKRNL_API DECLSPEC_IMPORT -#else -#define CXBXKRNL_API DECLSPEC_EXPORT -#endif +#include // ****************************************************************** // * func: EmuSharedInit diff --git a/Include/Win32/CxbxKrnl/EmuXapi.h b/Include/Win32/CxbxKrnl/EmuXapi.h index 166f96309..b43ba935b 100644 --- a/Include/Win32/CxbxKrnl/EmuXapi.h +++ b/Include/Win32/CxbxKrnl/EmuXapi.h @@ -34,22 +34,73 @@ #ifndef EMUXAPI_H #define EMUXAPI_H -#include "Emu.h" - // ****************************************************************** // * calling conventions // ****************************************************************** #define WINAPI __stdcall // ****************************************************************** -// * basic types +// * Basic types // ****************************************************************** +typedef char CHAR, CCHAR; +typedef short SHORT, CSHORT; +typedef long LONG; +typedef unsigned char UCHAR; +typedef unsigned char BYTE; +typedef unsigned char BOOLEAN; +typedef unsigned short USHORT; +typedef unsigned short WORD; +typedef unsigned long ULONG; +typedef unsigned long DWORD; +typedef unsigned long SIZE_T, *PSIZE_T; +typedef unsigned long ACCESS_MASK, *PACCESS_MASK; +typedef unsigned long PHYSICAL_ADDRESS; +typedef long INT_PTR; +typedef unsigned __int64 ULONGLONG; + +// xapi typedef int BOOL; typedef int INT; typedef unsigned int UINT; typedef unsigned int *PUINT; typedef LONG HRESULT; +// ****************************************************************** +// * Pointer types +// ****************************************************************** +typedef CHAR *PCHAR; +typedef CHAR *PCSZ; +typedef BYTE *PBYTE; +typedef BOOLEAN *PBOOLEAN; +typedef UCHAR *PUCHAR; +typedef USHORT *PUSHORT; +typedef ULONG *PULONG; +typedef DWORD *LPDWORD; +typedef ACCESS_MASK *PACCESS_MASK; +typedef LONG *LONG_PTR; +typedef ULONG *ULONG_PTR; +typedef INT_PTR *PINT_PTR; +#ifndef VOID +#define VOID void +#endif +typedef VOID *PVOID, *LPVOID; +typedef void *HANDLE; +typedef HANDLE *PHANDLE; + +// ****************************************************************** +// * documentation purposes only +// ****************************************************************** +#define EXPORTNUM(a) +#define UNALIGNED +#define OPTIONAL +#define IN +#define OUT + +// ****************************************************************** +// * LPSECURITY_ATTRIBUTES +// ****************************************************************** +typedef void* LPSECURITY_ATTRIBUTES; + // ****************************************************************** // * PTHREAD_START_ROUTINE / LPTHREAD_START_ROUTINE // ****************************************************************** @@ -228,7 +279,7 @@ VOID WINAPI EmuXapiInitProcess(); // ****************************************************************** // * func: EmuXapiBootDash // ****************************************************************** -VOID WINAPI EmuXapiBootDash(uint32 UnknownA, uint32 UnknownB, uint32 UnknownC); +VOID WINAPI EmuXapiBootDash(DWORD UnknownA, DWORD UnknownB, DWORD UnknownC); // ****************************************************************** // * func: Emu__rtinit diff --git a/Include/Win32/CxbxKrnl/OOVPA.h b/Include/Win32/CxbxKrnl/OOVPA.h index 66978cd34..9200777a6 100644 --- a/Include/Win32/CxbxKrnl/OOVPA.h +++ b/Include/Win32/CxbxKrnl/OOVPA.h @@ -34,6 +34,8 @@ #ifndef OOVPA_H #define OOVPA_H +#include "Cxbx.h" + #pragma pack(1) // ****************************************************************** diff --git a/Include/Win32/CxbxKrnl/Xapi.1.0.3911.h b/Include/Win32/CxbxKrnl/Xapi.1.0.3911.h index a6e652eee..c52a0904d 100644 --- a/Include/Win32/CxbxKrnl/Xapi.1.0.3911.h +++ b/Include/Win32/CxbxKrnl/Xapi.1.0.3911.h @@ -34,6 +34,8 @@ #ifndef XAPI_1_0_3911_H #define XAPI_1_0_3911_H +#include "OOVPA.h" + extern OOVPATable XAPI_1_0_3911[]; extern uint32 XAPI_1_0_3911_SIZE; diff --git a/Include/Win32/CxbxKrnl/Xapi.1.0.4361.h b/Include/Win32/CxbxKrnl/Xapi.1.0.4361.h index be29d4f31..7f930376b 100644 --- a/Include/Win32/CxbxKrnl/Xapi.1.0.4361.h +++ b/Include/Win32/CxbxKrnl/Xapi.1.0.4361.h @@ -34,6 +34,8 @@ #ifndef XAPI_1_0_4361_H #define XAPI_1_0_4361_H +#include "OOVPA.h" + extern OOVPATable XAPI_1_0_4361[]; extern uint32 XAPI_1_0_4361_SIZE; diff --git a/Include/Win32/CxbxKrnl/Xapi.1.0.4627.h b/Include/Win32/CxbxKrnl/Xapi.1.0.4627.h index 62945d2fa..a1131cf9c 100644 --- a/Include/Win32/CxbxKrnl/Xapi.1.0.4627.h +++ b/Include/Win32/CxbxKrnl/Xapi.1.0.4627.h @@ -34,6 +34,8 @@ #ifndef XAPI_1_0_4627_H #define XAPI_1_0_4627_H +#include "OOVPA.h" + extern OOVPATable XAPI_1_0_4627[]; extern uint32 XAPI_1_0_4627_SIZE; diff --git a/Include/Win32/CxbxKrnl/EmuD3D.h b/Include/Win32/CxbxKrnl/xd3d8.h similarity index 65% rename from Include/Win32/CxbxKrnl/EmuD3D.h rename to Include/Win32/CxbxKrnl/xd3d8.h index 0d01e5427..2b4dbdc4b 100644 --- a/Include/Win32/CxbxKrnl/EmuD3D.h +++ b/Include/Win32/CxbxKrnl/xd3d8.h @@ -7,7 +7,7 @@ // * `88bo,__,o, oP"``"Yo, _88o,,od8P oP"``"Yo, // * "YUMMMMMP",m" "Mm,""YUMMMP" ,m" "Mm, // * -// * Cxbx->Win32->CxbxKrnl->EmuD3D.h +// * Cxbx->Win32->CxbxKrnl->xd3d8.h // * // * This file is part of the Cxbx project. // * @@ -31,48 +31,43 @@ // * All rights reserved // * // ****************************************************************** -#ifndef EMUD3D_H -#define EMUD3D_H +#ifndef XD3D8_H +#define XD3D8_H -#include "Emu.h" - -// ****************************************************************** -// * func: EmuInitD3D -// ****************************************************************** -VOID EmuInitD3D(Xbe::Header *XbeHeader, uint32 XbeHeaderSize); +#include "d3d8.h" // ****************************************************************** // * func: EmuIDirect3D8_CreateDevice // ****************************************************************** -win32::HRESULT WINAPI EmuIDirect3D8_CreateDevice +HRESULT WINAPI EmuIDirect3D8_CreateDevice ( - win32::UINT Adapter, - win32::D3DDEVTYPE DeviceType, - win32::HWND hFocusWindow, - win32::DWORD BehaviorFlags, - win32::D3DPRESENT_PARAMETERS *pPresentationParameters, - win32::IDirect3DDevice8 **ppReturnedDeviceInterface + UINT Adapter, + D3DDEVTYPE DeviceType, + HWND hFocusWindow, + DWORD BehaviorFlags, + D3DPRESENT_PARAMETERS *pPresentationParameters, + IDirect3DDevice8 **ppReturnedDeviceInterface ); // ****************************************************************** // * func: EmuIDirect3DDevice8_Clear // ****************************************************************** -win32::HRESULT WINAPI EmuIDirect3DDevice8_Clear +HRESULT WINAPI EmuIDirect3DDevice8_Clear ( - win32::DWORD Count, - CONST win32::D3DRECT *pRects, - win32::DWORD Flags, - win32::D3DCOLOR Color, - float Z, - win32::DWORD Stencil + DWORD Count, + CONST D3DRECT *pRects, + DWORD Flags, + D3DCOLOR Color, + float Z, + DWORD Stencil ); // ****************************************************************** // * func: EmuIDirect3DDevice8_Swap // ****************************************************************** -win32::HRESULT WINAPI EmuIDirect3DDevice8_Swap +HRESULT WINAPI EmuIDirect3DDevice8_Swap ( - win32::DWORD Flags + DWORD Flags ); #endif diff --git a/Include/Win32/CxbxKrnl/xntdll.h b/Include/Win32/CxbxKrnl/xntdll.h index acd0bca14..c0e875e12 100644 --- a/Include/Win32/CxbxKrnl/xntdll.h +++ b/Include/Win32/CxbxKrnl/xntdll.h @@ -39,6 +39,8 @@ extern "C" { #endif +#include // winnt ntndis + // ****************************************************************** // * fixes some compiler errors and warnings // ****************************************************************** @@ -117,7 +119,9 @@ typedef unsigned __int64 ULONGLONG; // * calling conventions // ****************************************************************** #define NTAPI __stdcall +#ifndef CDECL #define CDECL __cdecl +#endif #define INLINE __inline #define DECLSPEC_NORETURN __declspec(noreturn) diff --git a/Include/Win32/Mutex.h b/Include/Win32/Mutex.h index f02ba14a2..2082dc251 100644 --- a/Include/Win32/Mutex.h +++ b/Include/Win32/Mutex.h @@ -34,8 +34,6 @@ #ifndef MUTEX_H #define MUTEX_H -#include - // ****************************************************************** // * Mutex object (intended to be inherited from) // ****************************************************************** diff --git a/Source/Core/Error.cpp b/Source/Core/Error.cpp index 2eb622fa7..e9abb1152 100644 --- a/Source/Core/Error.cpp +++ b/Source/Core/Error.cpp @@ -31,7 +31,7 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" +#include "Error.h" #include diff --git a/Source/Core/Exe.cpp b/Source/Core/Exe.cpp index ba8e5fff9..17f73cc1e 100644 --- a/Source/Core/Exe.cpp +++ b/Source/Core/Exe.cpp @@ -31,7 +31,7 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" +#include "Exe.h" #include #include diff --git a/Source/Core/OpenXDK.cpp b/Source/Core/OpenXDK.cpp index 63926ae13..78ad2040b 100644 --- a/Source/Core/OpenXDK.cpp +++ b/Source/Core/OpenXDK.cpp @@ -31,7 +31,7 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" +#include "Xbe.h" // ****************************************************************** // * OpenXDK logo bitmap diff --git a/Source/Core/Xbe.cpp b/Source/Core/Xbe.cpp index 3a8c68f72..609e792a1 100644 --- a/Source/Core/Xbe.cpp +++ b/Source/Core/Xbe.cpp @@ -31,11 +31,12 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" +#include "Xbe.h" +#include "Exe.h" #include #include -#include +#include #include // ****************************************************************** diff --git a/Source/Standard/Cxbe/Main.cpp b/Source/Standard/Cxbe/Main.cpp index f0796a710..ff953173c 100644 --- a/Source/Standard/Cxbe/Main.cpp +++ b/Source/Standard/Cxbe/Main.cpp @@ -31,10 +31,10 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" +#include "Exe.h" +#include "Xbe.h" #include -#include // ****************************************************************** // * statics diff --git a/Source/Win32/Cxbx/DlgControllerConfig.cpp b/Source/Win32/Cxbx/DlgControllerConfig.cpp index fbe16eaa8..d6a91f8c4 100644 --- a/Source/Win32/Cxbx/DlgControllerConfig.cpp +++ b/Source/Win32/Cxbx/DlgControllerConfig.cpp @@ -31,9 +31,8 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "ResCxbx.h" #include "DlgControllerConfig.h" +#include "ResCxbx.h" #include "EmuShared.h" #define DIRECTINPUT_VERSION 0x0800 diff --git a/Source/Win32/Cxbx/EmuExe.cpp b/Source/Win32/Cxbx/EmuExe.cpp index a4fa9e719..e2b865760 100644 --- a/Source/Win32/Cxbx/EmuExe.cpp +++ b/Source/Win32/Cxbx/EmuExe.cpp @@ -31,13 +31,11 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" #include "EmuExe.h" #include "Prolog.h" - #include "Emu.h" -using namespace win32; +#include // ****************************************************************** // * constructor diff --git a/Source/Win32/Cxbx/Prolog.cpp b/Source/Win32/Cxbx/Prolog.cpp index f43fd80c8..24b6f351c 100644 --- a/Source/Win32/Cxbx/Prolog.cpp +++ b/Source/Win32/Cxbx/Prolog.cpp @@ -31,7 +31,7 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" +#include "Prolog.h" // ****************************************************************** // * .cxbxplg diff --git a/Source/Win32/Cxbx/WinMain.cpp b/Source/Win32/Cxbx/WinMain.cpp index 2b0e2b027..0fdc1f722 100644 --- a/Source/Win32/Cxbx/WinMain.cpp +++ b/Source/Win32/Cxbx/WinMain.cpp @@ -31,13 +31,9 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "EmuExe.h" #include "WndMain.h" #include "EmuShared.h" - -#undef FIELD_OFFSET // prevent macro redefinition warnings -#include +#include "EmuExe.h" // ****************************************************************** // * func : WinMain diff --git a/Source/Win32/Cxbx/Wnd.cpp b/Source/Win32/Cxbx/Wnd.cpp index fba4e0b40..193944e54 100644 --- a/Source/Win32/Cxbx/Wnd.cpp +++ b/Source/Win32/Cxbx/Wnd.cpp @@ -31,9 +31,7 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" #include "Wnd.h" - #include "ResCxbx.h" // ****************************************************************** diff --git a/Source/Win32/Cxbx/WndAbout.cpp b/Source/Win32/Cxbx/WndAbout.cpp index 8c621620d..43b041b1a 100644 --- a/Source/Win32/Cxbx/WndAbout.cpp +++ b/Source/Win32/Cxbx/WndAbout.cpp @@ -31,9 +31,7 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" #include "WndAbout.h" - #include "ResCxbx.h" // ****************************************************************** diff --git a/Source/Win32/Cxbx/WndMain.cpp b/Source/Win32/Cxbx/WndMain.cpp index de1f4e2ac..b53836244 100644 --- a/Source/Win32/Cxbx/WndMain.cpp +++ b/Source/Win32/Cxbx/WndMain.cpp @@ -31,13 +31,12 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "EmuExe.h" #include "WndMain.h" #include "WndAbout.h" +#include "DlgControllerConfig.h" #include "ResCxbx.h" +#include "EmuExe.h" -#include #include // ****************************************************************** diff --git a/Source/Win32/CxbxKrnl/D3D8.1.0.3925.inl b/Source/Win32/CxbxKrnl/D3D8.1.0.3925.inl index 6e40e8b6a..08952db37 100644 --- a/Source/Win32/CxbxKrnl/D3D8.1.0.3925.inl +++ b/Source/Win32/CxbxKrnl/D3D8.1.0.3925.inl @@ -31,8 +31,6 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "Emu.h" // ****************************************************************** // * IDirect3D8_CreateDevice @@ -70,7 +68,7 @@ OOVPATable D3D8_1_0_3925[] = { (OOVPA*)&IDirect3D8_CreateDevice_1_0_3925, - xboxkrnl::EmuIDirect3D8_CreateDevice, + xd3d8::EmuIDirect3D8_CreateDevice, #ifdef _DEBUG_TRACE "EmuIDirect3D8_CreateDevice" diff --git a/Source/Win32/CxbxKrnl/D3D8.1.0.4361.inl b/Source/Win32/CxbxKrnl/D3D8.1.0.4361.inl index 7c60d0efa..b4393dbed 100644 --- a/Source/Win32/CxbxKrnl/D3D8.1.0.4361.inl +++ b/Source/Win32/CxbxKrnl/D3D8.1.0.4361.inl @@ -31,8 +31,6 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "Emu.h" // ****************************************************************** // * IDirect3D8_CreateDevice @@ -126,7 +124,7 @@ OOVPATable D3D8_1_0_4361[] = { (OOVPA*)&IDirect3D8_CreateDevice_1_0_4361, - xboxkrnl::EmuIDirect3D8_CreateDevice, + xd3d8::EmuIDirect3D8_CreateDevice, #ifdef _DEBUG_TRACE "EmuIDirect3D8_CreateDevice" @@ -136,7 +134,7 @@ OOVPATable D3D8_1_0_4361[] = { (OOVPA*)&IDirect3DDevice8_Clear_1_0_4361, - xboxkrnl::EmuIDirect3DDevice8_Clear, + xd3d8::EmuIDirect3DDevice8_Clear, #ifdef _DEBUG_TRACE "EmuIDirect3DDevice8_Clear" @@ -146,7 +144,7 @@ OOVPATable D3D8_1_0_4361[] = { (OOVPA*)&IDirect3DDevice8_Swap_1_0_4361, - xboxkrnl::EmuIDirect3DDevice8_Swap, + xd3d8::EmuIDirect3DDevice8_Swap, #ifdef _DEBUG_TRACE "EmuIDirect3DDevice8_Swap" diff --git a/Source/Win32/CxbxKrnl/D3D8.1.0.4627.inl b/Source/Win32/CxbxKrnl/D3D8.1.0.4627.inl index 598cd1aad..9f3a8b238 100644 --- a/Source/Win32/CxbxKrnl/D3D8.1.0.4627.inl +++ b/Source/Win32/CxbxKrnl/D3D8.1.0.4627.inl @@ -31,8 +31,6 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "Emu.h" // ****************************************************************** // * IDirect3D8_CreateDevice @@ -126,7 +124,7 @@ OOVPATable D3D8_1_0_4627[] = { (OOVPA*)&IDirect3D8_CreateDevice_1_0_4627, - xboxkrnl::EmuIDirect3D8_CreateDevice, + xd3d8::EmuIDirect3D8_CreateDevice, #ifdef _DEBUG_TRACE "EmuIDirect3D8_CreateDevice" @@ -136,7 +134,7 @@ OOVPATable D3D8_1_0_4627[] = { (OOVPA*)&IDirect3DDevice8_Clear_1_0_4627, - xboxkrnl::EmuIDirect3DDevice8_Clear, + xd3d8::EmuIDirect3DDevice8_Clear, #ifdef _DEBUG_TRACE "EmuIDirect3DDevice8_Clear" @@ -146,7 +144,7 @@ OOVPATable D3D8_1_0_4627[] = { (OOVPA*)&IDirect3DDevice8_Swap_1_0_4627, - xboxkrnl::EmuIDirect3DDevice8_Swap, + xd3d8::EmuIDirect3DDevice8_Swap, #ifdef _DEBUG_TRACE "EmuIDirect3DDevice8_Swap" diff --git a/Source/Win32/CxbxKrnl/Emu.cpp b/Source/Win32/CxbxKrnl/Emu.cpp index 76d8130d9..cc0e1f5ef 100644 --- a/Source/Win32/CxbxKrnl/Emu.cpp +++ b/Source/Win32/CxbxKrnl/Emu.cpp @@ -34,20 +34,19 @@ #define _CXBXKRNL_INTERNAL #define _XBOXKRNL_LOCAL_ -#include "Cxbx.h" -#include "Emu.h" - // ****************************************************************** // * prevent name collisions // ****************************************************************** -namespace xntdll +namespace xboxkrnl { - #include "xntdll.h" + #include }; -using namespace win32; - +#include "Emu.h" +#include "EmuFS.h" +#include "EmuD3D8.h" #include "EmuShared.h" +#include "HLEDataBase.h" // ****************************************************************** // * global / static @@ -71,7 +70,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) // ****************************************************************** // * func: EmuNoFunc // ****************************************************************** -CXBXKRNL_API void NTAPI EmuNoFunc() +extern "C" CXBXKRNL_API void NTAPI EmuNoFunc() { EmuSwapFS(); // Win2k/XP FS @@ -83,7 +82,7 @@ CXBXKRNL_API void NTAPI EmuNoFunc() // ****************************************************************** // * func: EmuInit // ****************************************************************** -CXBXKRNL_API void NTAPI EmuInit(Xbe::LibraryVersion *LibraryVersion, DebugMode DebugConsole, char *DebugFilename, Xbe::Header *XbeHeader, uint32 XbeHeaderSize, void (*Entry)()) +extern "C" CXBXKRNL_API void NTAPI EmuInit(Xbe::LibraryVersion *LibraryVersion, DebugMode DebugConsole, char *DebugFilename, Xbe::Header *XbeHeader, uint32 XbeHeaderSize, void (*Entry)()) { // ****************************************************************** // * debug console allocation (if configured) @@ -207,7 +206,7 @@ CXBXKRNL_API void NTAPI EmuInit(Xbe::LibraryVersion *LibraryVersion, DebugMode D EmuGenerateFS(); - xboxkrnl::EmuInitD3D(XbeHeader, XbeHeaderSize); + EmuInitD3D(XbeHeader, XbeHeaderSize); } printf("Emu (0x%.08X): Initial thread starting.\n", GetCurrentThreadId()); @@ -233,7 +232,7 @@ CXBXKRNL_API void NTAPI EmuInit(Xbe::LibraryVersion *LibraryVersion, DebugMode D // ****************************************************************** // * func: EmuPanic // ****************************************************************** -CXBXKRNL_API void NTAPI EmuPanic() +extern "C" CXBXKRNL_API void NTAPI EmuPanic() { EmuSwapFS(); // Win2k/XP FS diff --git a/Source/Win32/CxbxKrnl/EmuD3D.cpp b/Source/Win32/CxbxKrnl/EmuD3D8.cpp similarity index 93% rename from Source/Win32/CxbxKrnl/EmuD3D.cpp rename to Source/Win32/CxbxKrnl/EmuD3D8.cpp index 84ecd5ab2..d5b1dcc37 100644 --- a/Source/Win32/CxbxKrnl/EmuD3D.cpp +++ b/Source/Win32/CxbxKrnl/EmuD3D8.cpp @@ -32,31 +32,43 @@ // * // ****************************************************************** #define _CXBXKRNL_INTERNAL -#include "Cxbx.h" -#include "Emu.h" +#define _XBOXKRNL_LOCAL_ // ****************************************************************** // * prevent name collisions // ****************************************************************** -namespace win32 +namespace xboxkrnl { - #include - #include -} + #include +}; +#include "Emu.h" +#include "EmuFS.h" +#include "EmuDInput.h" + +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xd3d8 +{ + #include "xd3d8.h" +}; + +#include "EmuD3D8.h" #include "ResCxbxDll.h" -using namespace win32; +#include +#include // ****************************************************************** // * globals // ****************************************************************** -LPDIRECT3D8 g_pD3D8 = NULL; // Direct3D8 -LPDIRECT3DDEVICE8 g_pD3D8Device = NULL; // Direct3D8 Device -Xbe::Header *g_XbeHeader = NULL; // XbeHeader -uint32 g_XbeHeaderSize = 0; // XbeHeaderSize -HWND g_EmuWindow = NULL; // Rendering Window -D3DCAPS8 g_D3DCaps; // Direct3D8 Caps +xd3d8::LPDIRECT3D8 g_pD3D8 = NULL; // Direct3D8 +xd3d8::LPDIRECT3DDEVICE8 g_pD3D8Device = NULL; // Direct3D8 Device +Xbe::Header *g_XbeHeader = NULL; // XbeHeader +uint32 g_XbeHeaderSize = 0; // XbeHeaderSize +HWND g_EmuWindow = NULL; // Rendering Window +xd3d8::D3DCAPS8 g_D3DCaps; // Direct3D8 Caps // ****************************************************************** // * statics @@ -67,7 +79,7 @@ static void EmuRenderWindow(PVOID); // ****************************************************************** // * func: EmuInitD3D // ****************************************************************** -VOID xboxkrnl::EmuInitD3D(Xbe::Header *XbeHeader, uint32 XbeHeaderSize) +VOID EmuInitD3D(Xbe::Header *XbeHeader, uint32 XbeHeaderSize) { // ****************************************************************** // * store XbeHeader and XbeHeaderSize for further use @@ -91,6 +103,7 @@ VOID xboxkrnl::EmuInitD3D(Xbe::Header *XbeHeader, uint32 XbeHeaderSize) // * create Direct3D8 and retrieve caps // ****************************************************************** { + using namespace xd3d8; // xbox Direct3DCreate8 returns "1" always, so we need our own ptr g_pD3D8 = Direct3DCreate8(D3D_SDK_VERSION); @@ -168,7 +181,7 @@ void EmuRenderWindow(PVOID) // ****************************************************************** // * initialize direct input // ****************************************************************** - xboxkrnl::EmuInitDInput(); + EmuInitDInput(); // ****************************************************************** // * message processing loop @@ -253,7 +266,7 @@ LRESULT WINAPI EmuMsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) // ****************************************************************** // * func: EmuIDirect3D8_CreateDevice // ****************************************************************** -HRESULT WINAPI xboxkrnl::EmuIDirect3D8_CreateDevice +HRESULT WINAPI xd3d8::EmuIDirect3D8_CreateDevice ( UINT Adapter, D3DDEVTYPE DeviceType, @@ -352,7 +365,7 @@ HRESULT WINAPI xboxkrnl::EmuIDirect3D8_CreateDevice // ****************************************************************** // * func: EmuIDirect3DDevice8_Clear // ****************************************************************** -HRESULT WINAPI xboxkrnl::EmuIDirect3DDevice8_Clear +HRESULT WINAPI xd3d8::EmuIDirect3DDevice8_Clear ( DWORD Count, CONST D3DRECT *pRects, @@ -414,7 +427,7 @@ HRESULT WINAPI xboxkrnl::EmuIDirect3DDevice8_Clear // ****************************************************************** // * func: EmuIDirect3DDevice8_Swap // ****************************************************************** -HRESULT WINAPI xboxkrnl::EmuIDirect3DDevice8_Swap +HRESULT WINAPI xd3d8::EmuIDirect3DDevice8_Swap ( DWORD Flags ) diff --git a/Source/Win32/CxbxKrnl/EmuDInput.cpp b/Source/Win32/CxbxKrnl/EmuDInput.cpp index d140890f8..c6980bbf6 100644 --- a/Source/Win32/CxbxKrnl/EmuDInput.cpp +++ b/Source/Win32/CxbxKrnl/EmuDInput.cpp @@ -32,11 +32,22 @@ // * // ****************************************************************** #define _CXBXKRNL_INTERNAL -#include "Cxbx.h" -#include "Emu.h" +#define _XBOXKRNL_LOCAL_ + +#include "EmuD3D8.h" +#include "EmuDInput.h" #include "InputConfig.h" -using namespace win32; +#define DIRECTINPUT_VERSION 0x0800 +#include + +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xapi +{ + #include +}; // ****************************************************************** // * globals @@ -44,7 +55,7 @@ using namespace win32; LPDIRECTINPUT8 g_pDirectInput8 = NULL; LPDIRECTINPUTDEVICE8 g_pInputDev[MAX_INPUT_DEVICES] = {0}; int g_pInputCur = 0; -xboxkrnl::XINPUT_STATE g_EmuController1; +xapi::XINPUT_STATE g_EmuController1; // ****************************************************************** @@ -56,7 +67,7 @@ static BOOL CALLBACK EnumObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOI // ****************************************************************** // * func: EmuInitDInput // ****************************************************************** -void xboxkrnl::EmuInitDInput() +void EmuInitDInput() { // ****************************************************************** // * Create DirectInput object @@ -165,7 +176,7 @@ static BOOL CALLBACK EnumObjectsCallback(LPCDIDEVICEOBJECTINSTANCE lpddoi, LPVOI // ****************************************************************** // * func: EmuPollController // ****************************************************************** -void xboxkrnl::EmuPollController() +void EmuPollController() { /* DIJOYSTATE ControllerState; diff --git a/Source/Win32/CxbxKrnl/EmuFS.cpp b/Source/Win32/CxbxKrnl/EmuFS.cpp index 4e5de8902..62c198081 100644 --- a/Source/Win32/CxbxKrnl/EmuFS.cpp +++ b/Source/Win32/CxbxKrnl/EmuFS.cpp @@ -31,10 +31,21 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "Emu.h" +#define _CXBXKRNL_INTERNAL +#define _XBOXKRNL_LOCAL_ -using namespace win32; +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xboxkrnl +{ + #include +}; + +#include "EmuFS.h" +#include "EmuLDT.h" + +#include // ****************************************************************** // * func: EmuInitFS diff --git a/Source/Win32/CxbxKrnl/EmuKrnl.cpp b/Source/Win32/CxbxKrnl/EmuKrnl.cpp index 63a6ad034..87f2b0087 100644 --- a/Source/Win32/CxbxKrnl/EmuKrnl.cpp +++ b/Source/Win32/CxbxKrnl/EmuKrnl.cpp @@ -34,8 +34,15 @@ #define _CXBXKRNL_INTERNAL #define _XBOXKRNL_LOCAL_ -#include "Cxbx.h" -#include "Emu.h" +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xboxkrnl +{ + #include +}; + +#include // ****************************************************************** // * prevent name collisions @@ -45,7 +52,8 @@ namespace xntdll #include "xntdll.h" }; -using namespace win32; +#include "Emu.h" +#include "EmuFS.h" // ****************************************************************** // * Loaded at run-time to avoid linker conflicts @@ -601,9 +609,9 @@ XBSYSAPI EXPORTNUM(277) VOID NTAPI xboxkrnl::RtlEnterCriticalSection // We have to initialize this because the Xbox software doesn't seem // to always do it. Redundant initializations seem to be ok :/ - InitializeCriticalSection((win32::PRTL_CRITICAL_SECTION)CriticalSection); + InitializeCriticalSection((::PRTL_CRITICAL_SECTION)CriticalSection); - EnterCriticalSection((win32::PRTL_CRITICAL_SECTION)CriticalSection); + EnterCriticalSection((::PRTL_CRITICAL_SECTION)CriticalSection); EmuSwapFS(); // Xbox FS } @@ -663,7 +671,7 @@ XBSYSAPI EXPORTNUM(291) VOID NTAPI xboxkrnl::RtlInitializeCriticalSection } #endif - InitializeCriticalSection((win32::PRTL_CRITICAL_SECTION)CriticalSection); + InitializeCriticalSection((::PRTL_CRITICAL_SECTION)CriticalSection); EmuSwapFS(); // Xbox FS @@ -693,7 +701,7 @@ XBSYSAPI EXPORTNUM(294) VOID NTAPI xboxkrnl::RtlLeaveCriticalSection } #endif - LeaveCriticalSection((win32::PRTL_CRITICAL_SECTION)CriticalSection); + LeaveCriticalSection((::PRTL_CRITICAL_SECTION)CriticalSection); EmuSwapFS(); // Xbox FS } diff --git a/Source/Win32/CxbxKrnl/EmuLDT.cpp b/Source/Win32/CxbxKrnl/EmuLDT.cpp index 1c76335ef..aa7278271 100644 --- a/Source/Win32/CxbxKrnl/EmuLDT.cpp +++ b/Source/Win32/CxbxKrnl/EmuLDT.cpp @@ -31,8 +31,13 @@ // * All rights reserved // * // ****************************************************************** +#define _CXBXKRNL_INTERNAL +#define _XBOXKRNL_LOCAL_ + #include "Cxbx.h" -#include "Emu.h" +#include "EmuFS.h" + +#include // ****************************************************************** // * prevent name collisions @@ -42,8 +47,6 @@ namespace xntdll #include "xntdll.h" }; -using namespace win32; - // ****************************************************************** // * Maximum number of threads this LDT system will handle // ****************************************************************** diff --git a/Source/Win32/CxbxKrnl/EmuShared.cpp b/Source/Win32/CxbxKrnl/EmuShared.cpp index a259e89e5..f95207272 100644 --- a/Source/Win32/CxbxKrnl/EmuShared.cpp +++ b/Source/Win32/CxbxKrnl/EmuShared.cpp @@ -34,13 +34,10 @@ #define _CXBXKRNL_INTERNAL #define _XBOXKRNL_LOCAL_ -#include "Cxbx.h" -#include "Emu.h" - -using namespace win32; - #include "EmuShared.h" +#include + // ****************************************************************** // * shared memory // ****************************************************************** diff --git a/Source/Win32/CxbxKrnl/EmuXapi.cpp b/Source/Win32/CxbxKrnl/EmuXapi.cpp index 92de4b771..8809eba92 100644 --- a/Source/Win32/CxbxKrnl/EmuXapi.cpp +++ b/Source/Win32/CxbxKrnl/EmuXapi.cpp @@ -31,10 +31,22 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "Emu.h" +#define _CXBXKRNL_INTERNAL +#define _XBOXKRNL_LOCAL_ -using namespace win32; +#include + +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xapi +{ + #include "EmuXapi.h" +}; + +#include "EmuFS.h" +#include "EmuD3D8.h" +#include "EmuDInput.h" // ****************************************************************** // * EmuCreateThreadProxyParam @@ -89,7 +101,7 @@ static DWORD WINAPI EmuCreateThreadProxy // ****************************************************************** // * func: EmuXInitDevices // ****************************************************************** -VOID WINAPI xboxkrnl::EmuXInitDevices +VOID WINAPI xapi::EmuXInitDevices ( DWORD Unknown1, PVOID Unknown2 @@ -122,7 +134,7 @@ VOID WINAPI xboxkrnl::EmuXInitDevices // ****************************************************************** // * func: EmuXGetDevices // ****************************************************************** -DWORD WINAPI xboxkrnl::EmuXGetDevices +DWORD WINAPI xapi::EmuXGetDevices ( PXPP_DEVICE_TYPE DeviceType ) @@ -151,7 +163,7 @@ DWORD WINAPI xboxkrnl::EmuXGetDevices // ****************************************************************** // * func: EmuXInputOpen // ****************************************************************** -HANDLE WINAPI xboxkrnl::EmuXInputOpen +HANDLE WINAPI xapi::EmuXInputOpen ( IN PXPP_DEVICE_TYPE DeviceType, IN DWORD dwPort, @@ -191,7 +203,7 @@ HANDLE WINAPI xboxkrnl::EmuXInputOpen // ****************************************************************** // * func: EmuXInputGetCapabilities // ****************************************************************** -DWORD WINAPI xboxkrnl::EmuXInputGetCapabilities +DWORD WINAPI xapi::EmuXInputGetCapabilities ( IN HANDLE hDevice, OUT PXINPUT_CAPABILITIES pCapabilities @@ -234,7 +246,7 @@ DWORD WINAPI xboxkrnl::EmuXInputGetCapabilities // ****************************************************************** // * func: EmuInputGetState // ****************************************************************** -DWORD WINAPI xboxkrnl::EmuXInputGetState +DWORD WINAPI xapi::EmuXInputGetState ( IN HANDLE hDevice, OUT PXINPUT_STATE pState @@ -278,7 +290,7 @@ DWORD WINAPI xboxkrnl::EmuXInputGetState // ****************************************************************** // * func: EmuCreateThread // ****************************************************************** -HANDLE WINAPI xboxkrnl::EmuCreateThread +HANDLE WINAPI xapi::EmuCreateThread ( LPSECURITY_ATTRIBUTES lpThreadAttributes, DWORD dwStackSize, @@ -332,7 +344,7 @@ HANDLE WINAPI xboxkrnl::EmuCreateThread // ****************************************************************** // * func: EmuCloseHandle // ****************************************************************** -BOOL WINAPI xboxkrnl::EmuCloseHandle +BOOL WINAPI xapi::EmuCloseHandle ( HANDLE hObject ) @@ -362,7 +374,7 @@ BOOL WINAPI xboxkrnl::EmuCloseHandle // ****************************************************************** // * func: EmuXapiInitProcess // ****************************************************************** -VOID WINAPI xboxkrnl::EmuXapiInitProcess() +VOID WINAPI xapi::EmuXapiInitProcess() { EmuSwapFS(); // Win2k/XP FS @@ -386,7 +398,7 @@ VOID WINAPI xboxkrnl::EmuXapiInitProcess() // ****************************************************************** // * func: EmuXapiBootDash // ****************************************************************** -VOID WINAPI xboxkrnl::EmuXapiBootDash(uint32 UnknownA, uint32 UnknownB, uint32 UnknownC) +VOID WINAPI xapi::EmuXapiBootDash(DWORD UnknownA, DWORD UnknownB, DWORD UnknownC) { EmuSwapFS(); // Win2k/XP FS @@ -416,7 +428,7 @@ VOID WINAPI xboxkrnl::EmuXapiBootDash(uint32 UnknownA, uint32 UnknownB, uint32 U // ****************************************************************** // * func: Emu__rtinit // ****************************************************************** -VOID xboxkrnl::Emu__rtinit() +VOID xapi::Emu__rtinit() { EmuSwapFS(); // Win2k/XP FS @@ -435,7 +447,7 @@ VOID xboxkrnl::Emu__rtinit() // ****************************************************************** // * func: Emu__cinit // ****************************************************************** -VOID xboxkrnl::Emu__cinit() +VOID xapi::Emu__cinit() { EmuSwapFS(); // Win2k/XP FS diff --git a/Source/Win32/CxbxKrnl/HLEDataBase.cpp b/Source/Win32/CxbxKrnl/HLEDataBase.cpp index c5e5a2300..044196829 100644 --- a/Source/Win32/CxbxKrnl/HLEDataBase.cpp +++ b/Source/Win32/CxbxKrnl/HLEDataBase.cpp @@ -31,8 +31,28 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" -#include "Emu.h" +#define _CXBXKRNL_INTERNAL +#define _XBOXKRNL_LOCAL_ + +#include + +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xapi +{ + #include "EmuXapi.h" +}; + +#include "HLEDataBase.h" + +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xd3d8 +{ + #include "xd3d8.h" +}; #include "Xapi.1.0.3911.inl" #include "Xapi.1.0.4361.inl" diff --git a/Source/Win32/CxbxKrnl/KernelThunk.cpp b/Source/Win32/CxbxKrnl/KernelThunk.cpp index 035e19e55..8ef8426de 100644 --- a/Source/Win32/CxbxKrnl/KernelThunk.cpp +++ b/Source/Win32/CxbxKrnl/KernelThunk.cpp @@ -31,11 +31,18 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" - #define _CXBXKRNL_INTERNAL #define _XBOXKRNL_LOCAL_ -#include "Emu.h" + +// ****************************************************************** +// * prevent name collisions +// ****************************************************************** +namespace xboxkrnl +{ + #include +}; + +#include "Cxbx.h" // ****************************************************************** // * NOTE: @@ -55,7 +62,7 @@ // ****************************************************************** // * KernelThunkTable // ****************************************************************** -CXBXKRNL_API uint32 KernelThunkTable[367] = +extern "C" CXBXKRNL_API uint32 KernelThunkTable[367] = { (uint32)PANIC(0x0000), // 0x0000 (0) (uint32)PANIC(0x0001), // 0x0001 (1) diff --git a/Source/Win32/CxbxKrnl/Xapi.1.0.3911.inl b/Source/Win32/CxbxKrnl/Xapi.1.0.3911.inl index 19fd55c92..3a1d0b2f1 100644 --- a/Source/Win32/CxbxKrnl/Xapi.1.0.3911.inl +++ b/Source/Win32/CxbxKrnl/Xapi.1.0.3911.inl @@ -181,7 +181,7 @@ OOVPATable XAPI_1_0_3911[] = { (OOVPA*)&CreateThread_1_0_3911, - xboxkrnl::EmuCreateThread, + xapi::EmuCreateThread, #ifdef _DEBUG_TRACE "EmuCreateThread" @@ -191,7 +191,7 @@ OOVPATable XAPI_1_0_3911[] = { (OOVPA*)&XapiInitProcess_1_0_3911, - xboxkrnl::EmuXapiInitProcess, + xapi::EmuXapiInitProcess, #ifdef _DEBUG_TRACE "EmuXapiInitProcess" @@ -201,7 +201,7 @@ OOVPATable XAPI_1_0_3911[] = { (OOVPA*)&XapiBootDash_1_0_3911, - xboxkrnl::EmuXapiBootDash, + xapi::EmuXapiBootDash, #ifdef _DEBUG_TRACE "EmuXapiBootDash" @@ -211,7 +211,7 @@ OOVPATable XAPI_1_0_3911[] = { (OOVPA*)&__rtinit_1_0_3911, - xboxkrnl::Emu__rtinit, + xapi::Emu__rtinit, #ifdef _DEBUG_TRACE "Emu__rtinit", @@ -221,7 +221,7 @@ OOVPATable XAPI_1_0_3911[] = { (OOVPA*)&__cinit_1_0_3911, - xboxkrnl::Emu__cinit, + xapi::Emu__cinit, #ifdef _DEBUG_TRACE "Emu__cinit", diff --git a/Source/Win32/CxbxKrnl/Xapi.1.0.4361.inl b/Source/Win32/CxbxKrnl/Xapi.1.0.4361.inl index c0981e34e..af205dfc1 100644 --- a/Source/Win32/CxbxKrnl/Xapi.1.0.4361.inl +++ b/Source/Win32/CxbxKrnl/Xapi.1.0.4361.inl @@ -291,7 +291,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XInitDevices_1_0_4361, - xboxkrnl::EmuXInitDevices, + xapi::EmuXInitDevices, #ifdef _DEBUG_TRACE "EmuXInitDevices" @@ -301,7 +301,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XGetDevices_1_0_4361, - xboxkrnl::EmuXGetDevices, + xapi::EmuXGetDevices, #ifdef _DEBUG_TRACE "EmuXGetDevices" @@ -311,7 +311,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XInputOpen_1_0_4361, - xboxkrnl::EmuXInputOpen, + xapi::EmuXInputOpen, #ifdef _DEBUG_TRACE "EmuXInputOpen" @@ -321,7 +321,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XInputGetCapabilities_1_0_4361, - xboxkrnl::EmuXInputGetCapabilities, + xapi::EmuXInputGetCapabilities, #ifdef _DEBUG_TRACE "EmuXInputGetCapabilities" @@ -331,7 +331,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XInputGetState_1_0_4361, - xboxkrnl::EmuXInputGetState, + xapi::EmuXInputGetState, #ifdef _DEBUG_TRACE "EmuXInputGetState" @@ -341,7 +341,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&CreateThread_1_0_4361, - xboxkrnl::EmuCreateThread, + xapi::EmuCreateThread, #ifdef _DEBUG_TRACE "EmuCreateThread" @@ -351,7 +351,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&CloseHandle_1_0_4361, - xboxkrnl::EmuCloseHandle, + xapi::EmuCloseHandle, #ifdef _DEBUG_TRACE "EmuCloseHandle" @@ -361,7 +361,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XapiInitProcess_1_0_4361, - xboxkrnl::EmuXapiInitProcess, + xapi::EmuXapiInitProcess, #ifdef _DEBUG_TRACE "EmuXapiInitProcess" @@ -371,7 +371,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&XapiBootDash_1_0_3911, - xboxkrnl::EmuXapiBootDash, + xapi::EmuXapiBootDash, #ifdef _DEBUG_TRACE "EmuXapiBootDash" @@ -381,7 +381,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&__rtinit_1_0_3911, - xboxkrnl::Emu__rtinit, + xapi::Emu__rtinit, #ifdef _DEBUG_TRACE "Emu__rtinit", @@ -391,7 +391,7 @@ OOVPATable XAPI_1_0_4361[] = { (OOVPA*)&__cinit_1_0_3911, - xboxkrnl::Emu__cinit, + xapi::Emu__cinit, #ifdef _DEBUG_TRACE "Emu__cinit", diff --git a/Source/Win32/CxbxKrnl/Xapi.1.0.4627.inl b/Source/Win32/CxbxKrnl/Xapi.1.0.4627.inl index 01a4449af..294900fc4 100644 --- a/Source/Win32/CxbxKrnl/Xapi.1.0.4627.inl +++ b/Source/Win32/CxbxKrnl/Xapi.1.0.4627.inl @@ -41,7 +41,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XInitDevices_1_0_4361, - xboxkrnl::EmuXInitDevices, + xapi::EmuXInitDevices, #ifdef _DEBUG_TRACE "EmuXInitDevices" @@ -51,7 +51,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XGetDevices_1_0_4361, - xboxkrnl::EmuXGetDevices, + xapi::EmuXGetDevices, #ifdef _DEBUG_TRACE "EmuXGetDevices" @@ -61,7 +61,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XInputOpen_1_0_4361, - xboxkrnl::EmuXInputOpen, + xapi::EmuXInputOpen, #ifdef _DEBUG_TRACE "EmuXInputOpen" @@ -71,7 +71,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XInputGetCapabilities_1_0_4361, - xboxkrnl::EmuXInputGetCapabilities, + xapi::EmuXInputGetCapabilities, #ifdef _DEBUG_TRACE "EmuXInputGetCapabilities" @@ -81,7 +81,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XInputGetState_1_0_4361, - xboxkrnl::EmuXInputGetState, + xapi::EmuXInputGetState, #ifdef _DEBUG_TRACE "EmuXInputGetState" @@ -91,7 +91,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&CreateThread_1_0_4361, - xboxkrnl::EmuCreateThread, + xapi::EmuCreateThread, #ifdef _DEBUG_TRACE "EmuCreateThread" @@ -101,7 +101,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&CloseHandle_1_0_4361, - xboxkrnl::EmuCloseHandle, + xapi::EmuCloseHandle, #ifdef _DEBUG_TRACE "EmuCloseHandle" @@ -111,7 +111,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XapiInitProcess_1_0_4361, - xboxkrnl::EmuXapiInitProcess, + xapi::EmuXapiInitProcess, #ifdef _DEBUG_TRACE "EmuXapiInitProcess" @@ -121,7 +121,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&XapiBootDash_1_0_3911, - xboxkrnl::EmuXapiBootDash, + xapi::EmuXapiBootDash, #ifdef _DEBUG_TRACE "EmuXapiBootDash" @@ -131,7 +131,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&__rtinit_1_0_3911, - xboxkrnl::Emu__rtinit, + xapi::Emu__rtinit, #ifdef _DEBUG_TRACE "Emu__rtinit", @@ -141,7 +141,7 @@ OOVPATable XAPI_1_0_4627[] = { (OOVPA*)&__cinit_1_0_3911, - xboxkrnl::Emu__cinit, + xapi::Emu__cinit, #ifdef _DEBUG_TRACE "Emu__cinit", diff --git a/Source/Win32/InputConfig.cpp b/Source/Win32/InputConfig.cpp index e1be25a4e..d200a77f5 100644 --- a/Source/Win32/InputConfig.cpp +++ b/Source/Win32/InputConfig.cpp @@ -31,7 +31,6 @@ // * All rights reserved // * // ****************************************************************** -#include "Cxbx.h" #include "InputConfig.h" #include diff --git a/Source/Win32/Mutex.cpp b/Source/Win32/Mutex.cpp index cdf5e9c2f..302b0b501 100644 --- a/Source/Win32/Mutex.cpp +++ b/Source/Win32/Mutex.cpp @@ -33,6 +33,8 @@ // ****************************************************************** #include "Mutex.h" +#include + // ****************************************************************** // * Constructor // ******************************************************************