diff --git a/CommonAPI/Common.sln b/CommonAPI/Common.sln new file mode 100644 index 0000000..27e5eb8 --- /dev/null +++ b/CommonAPI/Common.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "Common\Common.vcxproj", "{9B3A3214-400B-4245-85FD-EA12D5F791D4}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.Build.0 = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.ActiveCfg = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/CommonAPI/Common.suo b/CommonAPI/Common.suo new file mode 100644 index 0000000..3641d98 Binary files /dev/null and b/CommonAPI/Common.suo differ diff --git a/CommonAPI/Common/Common.vcxproj b/CommonAPI/Common/Common.vcxproj new file mode 100644 index 0000000..e7773ef --- /dev/null +++ b/CommonAPI/Common/Common.vcxproj @@ -0,0 +1,124 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {9B3A3214-400B-4245-85FD-EA12D5F791D4} + Win32Proj + Common + + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + + true + include;$(IncludePath) + Common + $(SolutionDir) + + + false + include;$(IncludePath) + $(SolutionDir) + + + + + + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;COMMON_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;COMMON_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/CommonAPI/Common/Common.vcxproj.filters b/CommonAPI/Common/Common.vcxproj.filters new file mode 100644 index 0000000..22dc68d --- /dev/null +++ b/CommonAPI/Common/Common.vcxproj.filters @@ -0,0 +1,129 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj.user b/CommonAPI/Common/Common.vcxproj.user similarity index 100% rename from Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj.user rename to CommonAPI/Common/Common.vcxproj.user diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/DXAPI.h b/CommonAPI/Common/include/DXAPI/DXAPI.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/DXAPI.h rename to CommonAPI/Common/include/DXAPI/DXAPI.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/FlyingVehicle.h b/CommonAPI/Common/include/DXAPI/FlyingVehicle.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/FlyingVehicle.h rename to CommonAPI/Common/include/DXAPI/FlyingVehicle.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/GameBase.h b/CommonAPI/Common/include/DXAPI/GameBase.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/GameBase.h rename to CommonAPI/Common/include/DXAPI/GameBase.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/GameConnection.h b/CommonAPI/Common/include/DXAPI/GameConnection.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/GameConnection.h rename to CommonAPI/Common/include/DXAPI/GameConnection.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/GrenadeProjectile.h b/CommonAPI/Common/include/DXAPI/GrenadeProjectile.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/GrenadeProjectile.h rename to CommonAPI/Common/include/DXAPI/GrenadeProjectile.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/NetConnection.h b/CommonAPI/Common/include/DXAPI/NetConnection.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/NetConnection.h rename to CommonAPI/Common/include/DXAPI/NetConnection.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/NetObject.h b/CommonAPI/Common/include/DXAPI/NetObject.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/NetObject.h rename to CommonAPI/Common/include/DXAPI/NetObject.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/Player.h b/CommonAPI/Common/include/DXAPI/Player.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/Player.h rename to CommonAPI/Common/include/DXAPI/Player.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/Point3F.h b/CommonAPI/Common/include/DXAPI/Point3F.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/Point3F.h rename to CommonAPI/Common/include/DXAPI/Point3F.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/Projectile.h b/CommonAPI/Common/include/DXAPI/Projectile.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/Projectile.h rename to CommonAPI/Common/include/DXAPI/Projectile.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/SceneObject.h b/CommonAPI/Common/include/DXAPI/SceneObject.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/SceneObject.h rename to CommonAPI/Common/include/DXAPI/SceneObject.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/ScriptObject.h b/CommonAPI/Common/include/DXAPI/ScriptObject.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/ScriptObject.h rename to CommonAPI/Common/include/DXAPI/ScriptObject.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/ShapeBase.h b/CommonAPI/Common/include/DXAPI/ShapeBase.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/ShapeBase.h rename to CommonAPI/Common/include/DXAPI/ShapeBase.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/SimObject.h b/CommonAPI/Common/include/DXAPI/SimObject.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/SimObject.h rename to CommonAPI/Common/include/DXAPI/SimObject.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/StaticShape.h b/CommonAPI/Common/include/DXAPI/StaticShape.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/StaticShape.h rename to CommonAPI/Common/include/DXAPI/StaticShape.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/TCPObject.h b/CommonAPI/Common/include/DXAPI/TCPObject.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/TCPObject.h rename to CommonAPI/Common/include/DXAPI/TCPObject.h diff --git a/Mod Sources/TSExtension/TSExtension/include/DXAPI/Vehicle.h b/CommonAPI/Common/include/DXAPI/Vehicle.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/DXAPI/Vehicle.h rename to CommonAPI/Common/include/DXAPI/Vehicle.h diff --git a/Mod Sources/TSExtension/TSExtension/include/LinkerAPI.h b/CommonAPI/Common/include/LinkerAPI.h similarity index 100% rename from Mod Sources/TSExtension/TSExtension/include/LinkerAPI.h rename to CommonAPI/Common/include/LinkerAPI.h diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/DXAPI.cpp b/CommonAPI/Common/source/DXAPI/DXAPI.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/DXAPI.cpp rename to CommonAPI/Common/source/DXAPI/DXAPI.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/FlyingVehicle.cpp b/CommonAPI/Common/source/DXAPI/FlyingVehicle.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/FlyingVehicle.cpp rename to CommonAPI/Common/source/DXAPI/FlyingVehicle.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/GameBase.cpp b/CommonAPI/Common/source/DXAPI/GameBase.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/GameBase.cpp rename to CommonAPI/Common/source/DXAPI/GameBase.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/GameConnection.cpp b/CommonAPI/Common/source/DXAPI/GameConnection.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/GameConnection.cpp rename to CommonAPI/Common/source/DXAPI/GameConnection.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/GrenadeProjectile.cpp b/CommonAPI/Common/source/DXAPI/GrenadeProjectile.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/GrenadeProjectile.cpp rename to CommonAPI/Common/source/DXAPI/GrenadeProjectile.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/NetConnection.cpp b/CommonAPI/Common/source/DXAPI/NetConnection.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/NetConnection.cpp rename to CommonAPI/Common/source/DXAPI/NetConnection.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/NetObject.cpp b/CommonAPI/Common/source/DXAPI/NetObject.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/NetObject.cpp rename to CommonAPI/Common/source/DXAPI/NetObject.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/Player.cpp b/CommonAPI/Common/source/DXAPI/Player.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/Player.cpp rename to CommonAPI/Common/source/DXAPI/Player.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/Point3F.cpp b/CommonAPI/Common/source/DXAPI/Point3F.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/Point3F.cpp rename to CommonAPI/Common/source/DXAPI/Point3F.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/Projectile.cpp b/CommonAPI/Common/source/DXAPI/Projectile.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/Projectile.cpp rename to CommonAPI/Common/source/DXAPI/Projectile.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/SceneObject.cpp b/CommonAPI/Common/source/DXAPI/SceneObject.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/SceneObject.cpp rename to CommonAPI/Common/source/DXAPI/SceneObject.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/ScriptObject.cpp b/CommonAPI/Common/source/DXAPI/ScriptObject.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/ScriptObject.cpp rename to CommonAPI/Common/source/DXAPI/ScriptObject.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/ShapeBase.cpp b/CommonAPI/Common/source/DXAPI/ShapeBase.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/ShapeBase.cpp rename to CommonAPI/Common/source/DXAPI/ShapeBase.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/SimObject.cpp b/CommonAPI/Common/source/DXAPI/SimObject.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/SimObject.cpp rename to CommonAPI/Common/source/DXAPI/SimObject.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/StaticShape.cpp b/CommonAPI/Common/source/DXAPI/StaticShape.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/StaticShape.cpp rename to CommonAPI/Common/source/DXAPI/StaticShape.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/TCPObject.cpp b/CommonAPI/Common/source/DXAPI/TCPObject.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/TCPObject.cpp rename to CommonAPI/Common/source/DXAPI/TCPObject.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/DXAPI/Vehicle.cpp b/CommonAPI/Common/source/DXAPI/Vehicle.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/DXAPI/Vehicle.cpp rename to CommonAPI/Common/source/DXAPI/Vehicle.cpp diff --git a/Mod Sources/TSExtension/TSExtension/source/LinkerAPI.cpp b/CommonAPI/Common/source/LinkerAPI.cpp similarity index 100% rename from Mod Sources/TSExtension/TSExtension/source/LinkerAPI.cpp rename to CommonAPI/Common/source/LinkerAPI.cpp diff --git a/Everything.sln b/Everything.sln new file mode 100644 index 0000000..c09b743 --- /dev/null +++ b/Everything.sln @@ -0,0 +1,56 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "CommonAPI\Common\Common.vcxproj", "{9B3A3214-400B-4245-85FD-EA12D5F791D4}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modloader", "ModLoader\Modloader\Modloader.vcxproj", "{10159605-BFF5-496F-8C23-0A1FB9850E55}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RandomMod", "Mod Sources\RandomMod\RandomMod\RandomMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TSExtension", "Mod Sources\TSExtension\TSExtension\TSExtension.vcxproj", "{08220905-AEC1-49C9-84E6-78672F9EF5F1}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WatchDog", "Mod Sources\Watchdog\Watchdog\Watchdog.vcxproj", "{1C8B5AA4-B172-45DD-9D27-55F41B6F1755}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.Build.0 = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.ActiveCfg = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.Build.0 = Release|Win32 + {10159605-BFF5-496F-8C23-0A1FB9850E55}.Debug|Win32.ActiveCfg = Debug|Win32 + {10159605-BFF5-496F-8C23-0A1FB9850E55}.Debug|Win32.Build.0 = Debug|Win32 + {10159605-BFF5-496F-8C23-0A1FB9850E55}.Release|Win32.ActiveCfg = Release|Win32 + {10159605-BFF5-496F-8C23-0A1FB9850E55}.Release|Win32.Build.0 = Release|Win32 + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.ActiveCfg = Debug|Win32 + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.Build.0 = Debug|Win32 + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.ActiveCfg = Release|Win32 + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.Build.0 = Release|Win32 + {08220905-AEC1-49C9-84E6-78672F9EF5F1}.Debug|Win32.ActiveCfg = Debug|Win32 + {08220905-AEC1-49C9-84E6-78672F9EF5F1}.Debug|Win32.Build.0 = Debug|Win32 + {08220905-AEC1-49C9-84E6-78672F9EF5F1}.Release|Win32.ActiveCfg = Release|Win32 + {08220905-AEC1-49C9-84E6-78672F9EF5F1}.Release|Win32.Build.0 = Release|Win32 + {1C8B5AA4-B172-45DD-9D27-55F41B6F1755}.Debug|Win32.ActiveCfg = Debug|Win32 + {1C8B5AA4-B172-45DD-9D27-55F41B6F1755}.Debug|Win32.Build.0 = Debug|Win32 + {1C8B5AA4-B172-45DD-9D27-55F41B6F1755}.Release|Win32.ActiveCfg = Release|Win32 + {1C8B5AA4-B172-45DD-9D27-55F41B6F1755}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Everything.suo b/Everything.suo new file mode 100644 index 0000000..3f59780 Binary files /dev/null and b/Everything.suo differ diff --git a/Mod Sources/RandomMod/RandomMod.sln b/Mod Sources/RandomMod/RandomMod.sln index 79a5b6d..753216f 100644 --- a/Mod Sources/RandomMod/RandomMod.sln +++ b/Mod Sources/RandomMod/RandomMod.sln @@ -2,6 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RandomMod", "RandomMod\RandomMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\..\CommonAPI\Common\Common.vcxproj", "{9B3A3214-400B-4245-85FD-EA12D5F791D4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,6 +18,10 @@ Global {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.Build.0 = Debug|Win32 {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.ActiveCfg = Release|Win32 {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.Build.0 = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.Build.0 = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.ActiveCfg = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Mod Sources/RandomMod/RandomMod.suo b/Mod Sources/RandomMod/RandomMod.suo index 97f1af0..11ae575 100644 Binary files a/Mod Sources/RandomMod/RandomMod.suo and b/Mod Sources/RandomMod/RandomMod.suo differ diff --git a/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj b/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj index d2a5ba6..408d3cf 100644 --- a/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj +++ b/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj @@ -15,13 +15,11 @@ - - {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB} @@ -53,11 +51,13 @@ false - include;$(IncludePath) + include;..\..\..\CommonAPI\Common\include;$(IncludePath) + $(SolutionDir)\Mods\ false - include;$(IncludePath) + include;..\..\..\CommonAPI\Common\include;$(IncludePath) + $(SolutionDir)\Mods\ @@ -69,6 +69,7 @@ Windows true + $(SolutionDir)\Common.lib;%(AdditionalDependencies) @@ -85,6 +86,7 @@ true true true + $(SolutionDir)\Common.lib;%(AdditionalDependencies) diff --git a/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj.filters b/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj.filters index 1dee843..7735c67 100644 --- a/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj.filters +++ b/Mod Sources/RandomMod/RandomMod/RandomMod.vcxproj.filters @@ -18,9 +18,6 @@ Source Files - - Source Files - Source Files @@ -32,9 +29,6 @@ - - Header Files - Header Files diff --git a/Mod Sources/RandomMod/RandomMod/include/randomCmds.h b/Mod Sources/RandomMod/RandomMod/include/randomCmds.h index c4f0d95..021f731 100644 --- a/Mod Sources/RandomMod/RandomMod/include/randomCmds.h +++ b/Mod Sources/RandomMod/RandomMod/include/randomCmds.h @@ -1,14 +1,14 @@ -#include +#include -const char* conGuiTsCtrlProject(SimObject *obj,S32 argc, const char* argv[]); -bool conNetObjectSetGhostable(SimObject *obj,S32 argc, const char* argv[]); -const char* conGetVariable(SimObject *obj,S32 argc, const char* argv[]); +const char* conGuiTsCtrlProject(Linker::SimObject *obj,S32 argc, const char* argv[]); +bool conNetObjectSetGhostable(Linker::SimObject *obj,S32 argc, const char* argv[]); +const char* conGetVariable(Linker::SimObject *obj,S32 argc, const char* argv[]); // Merscenne Random -const char *conMRandom(SimObject *obj, S32 argc, const char *argv[]); -const char *conMSeed(SimObject *obj, S32 argc, const char *argv[]); -const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[]); +const char *conMRandom(Linker::SimObject *obj, S32 argc, const char *argv[]); +const char *conMSeed(Linker::SimObject *obj, S32 argc, const char *argv[]); +const char *conMRandomFloat(Linker::SimObject *obj, S32 argc, const char *argv[]); // Clock -const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[]); -const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[]); \ No newline at end of file +const char*conQPCBegin(Linker::SimObject *obj, S32 argc, const char *argv[]); +const char*conQPCEnd(Linker::SimObject *obj, S32 argc, const char *argv[]); \ No newline at end of file diff --git a/Mod Sources/RandomMod/RandomMod/include/t2api.h b/Mod Sources/RandomMod/RandomMod/include/t2api.h deleted file mode 100644 index 930dd4e..0000000 --- a/Mod Sources/RandomMod/RandomMod/include/t2api.h +++ /dev/null @@ -1,111 +0,0 @@ -#pragma once - -#include - -void initT2Api(); - - -//api stuff - -typedef unsigned int U32; -typedef int S32; -typedef float F32; - -typedef unsigned int dsize_t; - -//for addvariable -#define TypeS32 1 -#define TypeBool 3 -#define TypeF32 5 - - -//dshit -inline dsize_t dStrlen(const char *str) -{ - return (dsize_t)strlen(str); -} - -class Namespace { - const char* mName; -}; - - - -class SimObject{ - SimObject* group; - const char* objectName; //04h: objectName - SimObject* nextNameObject; //8 - SimObject* nextManagerNameObject; //c - SimObject* nextIdObject; //10h: nextIdObject - U32 stuff; //14 - U32 mFlags; //18h - U32 mNotifyList; //actually a pointer - U32 mId; //20h: mId - //more stuff -}; - -class SimIdDictionary -{ - enum - { - DefaultTableSize = 4096, - TableBitMask = 4095 - }; - SimObject *table[DefaultTableSize]; -}; -extern SimIdDictionary* gIdDictionary; - -class Point3F -{ - public: - F32 x; - F32 y; - F32 z; -}; - - -//GuiTSCtrl -class GuiTSCtrl {}; -class HoverVehicle {}; -void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest); //fake - - -namespace Sim { - extern SimObject* (*findObject)(U32 id); -} - - -//console - -typedef const char * (*StringCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef S32 (*IntCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef F32 (*FloatCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef void (*VoidCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef bool (*BoolCallback)(SimObject *obj, S32 argc, const char *argv[]); - - -extern void (*someTest)(void); -//functions -namespace Con{ - -extern char * (*getReturnBuffer)(U32 bufferSize); - -extern void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs); -extern void (*addMethodS)(const char *nsName, const char *name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs); - -extern bool (*addVariable)(const char *name, S32 t, void *dp); - -extern void (*printf)(const char* fmt,...); -extern void (*errorf)(U32 type, const char* fmt,...); - -extern const char * (*getVariable)(const char *name); -extern const char * (*execute)(S32 argc, const char *argv[]); -extern const char * (*executef)(S32 argc, ...); -extern const char * (*executem)(SimObject *object, S32 argc, const char *argv[]); -extern const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf); -} - -//d-util -extern int (*dSscanf)(const char *buffer, const char *format, ...); -extern int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...); -extern bool (*dAtob)(const char *str); \ No newline at end of file diff --git a/Mod Sources/RandomMod/RandomMod/source/BaseMod.cpp b/Mod Sources/RandomMod/RandomMod/source/BaseMod.cpp index 9eb1904..df3d729 100644 --- a/Mod Sources/RandomMod/RandomMod/source/BaseMod.cpp +++ b/Mod Sources/RandomMod/RandomMod/source/BaseMod.cpp @@ -3,7 +3,7 @@ #include "BaseMod.h" -#include "t2api.h" +#include "LinkerAPI.h" #include "randomCmds.h" extern "C" diff --git a/Mod Sources/RandomMod/RandomMod/source/randomCmds.cpp b/Mod Sources/RandomMod/RandomMod/source/randomCmds.cpp index b4eae65..d87d498 100644 --- a/Mod Sources/RandomMod/RandomMod/source/randomCmds.cpp +++ b/Mod Sources/RandomMod/RandomMod/source/randomCmds.cpp @@ -8,11 +8,11 @@ #include "mt.h" -#include "t2api.h" +#include "LinkerAPI.h" // Merscenne Twister MersenneTwister *mt = NULL; -const char *conMRandom(SimObject *obj, S32 argc, const char *argv[]) +const char *conMRandom(Linker::SimObject *obj, S32 argc, const char *argv[]) { if (!mt) { @@ -56,7 +56,7 @@ const char *conMRandom(SimObject *obj, S32 argc, const char *argv[]) return mem; } -const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[]) +const char *conMRandomFloat(Linker::SimObject *obj, S32 argc, const char *argv[]) { if (!mt) { @@ -95,7 +95,7 @@ const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[]) return mem; } -const char *conMSeed(SimObject *obj, S32 argc, const char *argv[]) +const char *conMSeed(Linker::SimObject *obj, S32 argc, const char *argv[]) { if (!mt) { @@ -125,7 +125,7 @@ static unsigned int CURRENT_STOPWATCH_COUNT = 0; static __int64 QPC_STOPWATCHES[QPC_MAX_STOPWATCHES]; __int64 STARTING_QPC_TIME; -const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[]) +const char*conQPCBegin(Linker::SimObject *obj, S32 argc, const char *argv[]) { if (!QueryPerformanceCounter((LARGE_INTEGER*)&QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT])) { @@ -147,7 +147,7 @@ const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[]) return result; } -const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[]) +const char*conQPCEnd(Linker::SimObject *obj, S32 argc, const char *argv[]) { __int64 ENDING_QPC_TIME; if (!QueryPerformanceCounter((LARGE_INTEGER*)&ENDING_QPC_TIME)) diff --git a/Mod Sources/RandomMod/RandomMod/source/t2api.cpp b/Mod Sources/RandomMod/RandomMod/source/t2api.cpp deleted file mode 100644 index e3688cc..0000000 --- a/Mod Sources/RandomMod/RandomMod/source/t2api.cpp +++ /dev/null @@ -1,85 +0,0 @@ -#include "t2api.h" - -SimIdDictionary* gIdDictionary = reinterpret_cast(0x009E9194); - -//439550 -namespace Sim { - SimObject* (*findObject)(U32 id) = - (SimObject* (_cdecl *)(U32 id) ) - 0x439550; -} - -//hackey way to do member functions, .... -void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest) { - typedef void (__cdecl *projFunc)(const Point3F &pt, Point3F *dest); - static projFunc p = (projFunc)0x4d0b40; - - __asm { - push dest; - push pt; - mov ecx,obj; - lea eax, p; - mov eax, [eax]; - call eax; - } -} - -namespace Con { - -char* (*getReturnBuffer)(U32 bufferSize) = - (char *(__cdecl *)(U32)) - 0x42caa0; - -void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs) = - (void (__cdecl *)(const char *, const char *,BoolCallback,const char *,S32,S32)) - 0x426510; - -void (*addMethodS)(const char *, const char *,StringCallback, const char *, S32, S32) = - (void (__cdecl *)(const char *,const char *,StringCallback,const char *,S32,S32)) - 0x426410; - -bool (*addVariable)(const char *name, S32 t, void *dp) = - (bool (__cdecl *)(const char *name, S32 t, void *dp)) - 0x4263B0; - -const char * (*execute)(S32 argc, const char *argv[]) = - (const char * (__cdecl *)(S32 argc, const char *argv[])) - 0x4267A0; - -const char * (*executef)(S32 argc, ...) = - (const char * (__cdecl *)(S32 argc, ...)) - 0x4269E0; - -const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf) = - (const char * (__cdecl *)(const char* string, bool echo, const char *fileName, bool cf)) - 0x426690; - -const char * (*executem)(SimObject *object, S32 argc, const char *argv[]) = - (const char * (__cdecl *)(SimObject *object, S32 argc, const char *argv[])) - 0x426800; - -const char * (*getVariable)(const char *name) = - (const char * (__cdecl *)(const char *name)) - 0x4261F0; - -void (*printf)(const char* fmt,...) = - (void (__cdecl *)(const char* fmt,...)) - 0x425F30; - -void (*errorf)(U32 type, const char* fmt,...)= - (void (__cdecl *)(U32, const char*,...)) - 0x425FB0; - -} - -int (*dSscanf)(const char *buffer, const char *format, ...) = - (int (__cdecl *)(const char *,const char *,...)) - 0x55b640; - -int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...) = - (int (__cdecl *)(char *,dsize_t,const char *,...)) - 0x55b5e0; - -bool (*dAtob)(const char *str) = - (bool (__cdecl *)(const char *str)) - 0x55B490; diff --git a/Mod Sources/TSExtension/TSExtension.opensdf b/Mod Sources/TSExtension/TSExtension.opensdf deleted file mode 100644 index 4c4fcb5..0000000 Binary files a/Mod Sources/TSExtension/TSExtension.opensdf and /dev/null differ diff --git a/Mod Sources/TSExtension/TSExtension.sln b/Mod Sources/TSExtension/TSExtension.sln index a04ee26..90c359a 100644 --- a/Mod Sources/TSExtension/TSExtension.sln +++ b/Mod Sources/TSExtension/TSExtension.sln @@ -2,6 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TSExtension", "TSExtension\TSExtension.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\..\CommonAPI\Common\Common.vcxproj", "{9B3A3214-400B-4245-85FD-EA12D5F791D4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,6 +18,10 @@ Global {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.Build.0 = Debug|Win32 {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.ActiveCfg = Release|Win32 {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.Build.0 = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.Build.0 = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.ActiveCfg = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Mod Sources/TSExtension/TSExtension.suo b/Mod Sources/TSExtension/TSExtension.suo index 5b52ddb..d47eacc 100644 Binary files a/Mod Sources/TSExtension/TSExtension.suo and b/Mod Sources/TSExtension/TSExtension.suo differ diff --git a/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj b/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj index 15dfc68..cdd2c05 100644 --- a/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj +++ b/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj @@ -12,51 +12,15 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB} + {08220905-AEC1-49C9-84E6-78672F9EF5F1} Win32Proj BaseMod TSExtension @@ -85,11 +49,13 @@ false - include;$(IncludePath) + include;..\..\..\CommonAPI\Common\include;$(IncludePath) + $(SolutionDir)\Mods false - include;$(IncludePath) + include;..\..\..\CommonAPI\Common\include;$(IncludePath) + $(SolutionDir)\Mods @@ -101,7 +67,7 @@ Windows true - ws2_32.lib;Dnsapi.lib;%(AdditionalDependencies) + ws2_32.lib;Dnsapi.lib;$(SolutionDir)\Common.lib;%(AdditionalDependencies) @@ -118,7 +84,7 @@ true true true - ws2_32.lib;Dnsapi.lib;%(AdditionalDependencies) + ws2_32.lib;Dnsapi.lib;$(SolutionDir)\Common.lib;%(AdditionalDependencies) diff --git a/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj.filters b/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj.filters index 1a4e732..0be7ba1 100644 --- a/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj.filters +++ b/Mod Sources/TSExtension/TSExtension/TSExtension.vcxproj.filters @@ -13,138 +13,24 @@ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - {6d8e53d2-8590-4c42-b4e2-ff67cedefcce} - - - {5269716c-2798-40ef-aa8a-2c8e784cf99b} - Source Files - - Source Files - Source Files - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - - - Source Files\DXAPI - Source Files Source Files - - Source Files\DXAPI - - - Header Files - Header Files - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - - - Header Files\DXAPI - \ No newline at end of file diff --git a/Mod Sources/TSExtension/TSExtension/source/DXConCmds.cpp b/Mod Sources/TSExtension/TSExtension/source/DXConCmds.cpp index 5b3365c..074350e 100644 --- a/Mod Sources/TSExtension/TSExtension/source/DXConCmds.cpp +++ b/Mod Sources/TSExtension/TSExtension/source/DXConCmds.cpp @@ -23,7 +23,9 @@ bool conShapeBaseSetCloakValue(Linker::SimObject *obj, S32 argc, const char* arg } operand.setMaskBits(0x40); + return true; } + bool conPlayerGetJumpingState(Linker::SimObject *obj, S32 argc, const char* argv[]) { DX::Player operand = DX::Player((unsigned int)obj); @@ -155,6 +157,7 @@ bool conclientCmdSetGhostTicks(Linker::SimObject *obj, S32 argc, const char* arg } return 1; } + bool conclientCmdSetProcessTicks(Linker::SimObject *obj, S32 argc, const char* argv[]) { unsigned int result_ptr = 0; unsigned int my_ptr = 0; @@ -186,6 +189,7 @@ bool conclientCmdSetProcessTicks(Linker::SimObject *obj, S32 argc, const char* a } return 1; } + bool conSetProcessTicks(Linker::SimObject *obj, S32 argc, const char* argv[]) { unsigned int result_ptr = 0; diff --git a/Mod Sources/Watchdog/Release/WatchDog.exp b/Mod Sources/Watchdog/Release/WatchDog.exp deleted file mode 100644 index 0d4a942..0000000 Binary files a/Mod Sources/Watchdog/Release/WatchDog.exp and /dev/null differ diff --git a/Mod Sources/Watchdog/TSExtension/Release/WatchDog.lastbuildstate b/Mod Sources/Watchdog/TSExtension/Release/WatchDog.lastbuildstate deleted file mode 100644 index f03e48f..0000000 --- a/Mod Sources/Watchdog/TSExtension/Release/WatchDog.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#v4.0:v100 -Release|Win32|C:\Users\Robert MacGregor\Documents\T2-CPP\Mod Sources\Watchdog\| diff --git a/Mod Sources/Watchdog/Watchdog.sln b/Mod Sources/Watchdog/Watchdog.sln index a04ee26..5f5e963 100644 --- a/Mod Sources/Watchdog/Watchdog.sln +++ b/Mod Sources/Watchdog/Watchdog.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TSExtension", "TSExtension\TSExtension.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WatchDog", "Watchdog\Watchdog.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/Mod Sources/Watchdog/Watchdog.suo b/Mod Sources/Watchdog/Watchdog.suo index 311d021..2f45120 100644 Binary files a/Mod Sources/Watchdog/Watchdog.suo and b/Mod Sources/Watchdog/Watchdog.suo differ diff --git a/Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj.filters b/Mod Sources/Watchdog/Watchdog/TSExtension.vcxproj.filters similarity index 100% rename from Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj.filters rename to Mod Sources/Watchdog/Watchdog/TSExtension.vcxproj.filters diff --git a/Mod Sources/Watchdog/Watchdog/TSExtension.vcxproj.user b/Mod Sources/Watchdog/Watchdog/TSExtension.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/Mod Sources/Watchdog/Watchdog/TSExtension.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj b/Mod Sources/Watchdog/Watchdog/Watchdog.vcxproj similarity index 96% rename from Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj rename to Mod Sources/Watchdog/Watchdog/Watchdog.vcxproj index fe300ad..232e908 100644 --- a/Mod Sources/Watchdog/TSExtension/TSExtension.vcxproj +++ b/Mod Sources/Watchdog/Watchdog/Watchdog.vcxproj @@ -14,7 +14,7 @@ - {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB} + {1C8B5AA4-B172-45DD-9D27-55F41B6F1755} Win32Proj BaseMod WatchDog @@ -44,10 +44,12 @@ false include;$(IncludePath) + $(SolutionDir)\Mods false include;$(IncludePath) + $(SolutionDir)\Mods diff --git a/Mod Sources/Watchdog/Watchdog/Watchdog.vcxproj.user b/Mod Sources/Watchdog/Watchdog/Watchdog.vcxproj.user new file mode 100644 index 0000000..ace9a86 --- /dev/null +++ b/Mod Sources/Watchdog/Watchdog/Watchdog.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Mod Sources/Watchdog/TSExtension/script/tsExtension.cs b/Mod Sources/Watchdog/Watchdog/script/tsExtension.cs similarity index 100% rename from Mod Sources/Watchdog/TSExtension/script/tsExtension.cs rename to Mod Sources/Watchdog/Watchdog/script/tsExtension.cs diff --git a/Mod Sources/Watchdog/TSExtension/source/dllmain.cpp b/Mod Sources/Watchdog/Watchdog/source/dllmain.cpp similarity index 94% rename from Mod Sources/Watchdog/TSExtension/source/dllmain.cpp rename to Mod Sources/Watchdog/Watchdog/source/dllmain.cpp index 00cb668..ba1c494 100644 --- a/Mod Sources/Watchdog/TSExtension/source/dllmain.cpp +++ b/Mod Sources/Watchdog/Watchdog/source/dllmain.cpp @@ -30,7 +30,7 @@ DWORD WINAPI WatchDogThread(LPVOID lpParam) time_t now = clock(); time_t seconds = (now - lastPet) / CLOCKS_PER_SEC; - if (!sDogPetted && seconds > 2) // Wait 2 seconds to be safe + if (!sDogPetted && seconds > 8) // Wait 8 seconds to be safe { CloseHandle(sMainThread); exit(0); diff --git a/ModLoader/Modloader.sln b/ModLoader/Modloader.sln index 47b1275..b93e2d6 100644 --- a/ModLoader/Modloader.sln +++ b/ModLoader/Modloader.sln @@ -2,6 +2,11 @@ Microsoft Visual Studio Solution File, Format Version 11.00 # Visual C++ Express 2010 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Modloader", "Modloader\Modloader.vcxproj", "{10159605-BFF5-496F-8C23-0A1FB9850E55}" + ProjectSection(ProjectDependencies) = postProject + {9B3A3214-400B-4245-85FD-EA12D5F791D4} = {9B3A3214-400B-4245-85FD-EA12D5F791D4} + EndProjectSection +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Common", "..\CommonAPI\Common\Common.vcxproj", "{9B3A3214-400B-4245-85FD-EA12D5F791D4}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -13,6 +18,10 @@ Global {10159605-BFF5-496F-8C23-0A1FB9850E55}.Debug|Win32.Build.0 = Debug|Win32 {10159605-BFF5-496F-8C23-0A1FB9850E55}.Release|Win32.ActiveCfg = Release|Win32 {10159605-BFF5-496F-8C23-0A1FB9850E55}.Release|Win32.Build.0 = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.ActiveCfg = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Debug|Win32.Build.0 = Debug|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.ActiveCfg = Release|Win32 + {9B3A3214-400B-4245-85FD-EA12D5F791D4}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ModLoader/Modloader.suo b/ModLoader/Modloader.suo index afaf197..baa90d6 100644 Binary files a/ModLoader/Modloader.suo and b/ModLoader/Modloader.suo differ diff --git a/ModLoader/Modloader/Debug/Modloader.lastbuildstate b/ModLoader/Modloader/Debug/Modloader.lastbuildstate deleted file mode 100644 index 2f7f7e3..0000000 --- a/ModLoader/Modloader/Debug/Modloader.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#v4.0:v100 -Debug|Win32|C:\Users\Robert MacGregor\Documents\T2-CPP\ModLoader\| diff --git a/ModLoader/Modloader/Debug/vc100.idb b/ModLoader/Modloader/Debug/vc100.idb deleted file mode 100644 index 943b061..0000000 Binary files a/ModLoader/Modloader/Debug/vc100.idb and /dev/null differ diff --git a/ModLoader/Modloader/Modloader.vcxproj b/ModLoader/Modloader/Modloader.vcxproj index e776834..331b560 100644 --- a/ModLoader/Modloader/Modloader.vcxproj +++ b/ModLoader/Modloader/Modloader.vcxproj @@ -39,10 +39,13 @@ false - include;$(IncludePath) + include;..\..\CommonAPI\Common\include;$(IncludePath) + IFC22 false + include;..\..\CommonAPI\Common\include;$(IncludePath) + IFC22 @@ -55,6 +58,7 @@ Windows true + $(SolutionDir)\Common.lib;%(AdditionalDependencies) @@ -72,17 +76,16 @@ true true true + $(SolutionDir)\Common.lib;%(AdditionalDependencies) - - diff --git a/ModLoader/Modloader/Modloader.vcxproj.filters b/ModLoader/Modloader/Modloader.vcxproj.filters index 495211e..0cebee3 100644 --- a/ModLoader/Modloader/Modloader.vcxproj.filters +++ b/ModLoader/Modloader/Modloader.vcxproj.filters @@ -18,9 +18,6 @@ Source Files - - Source Files - Source Files @@ -29,9 +26,6 @@ Header Files - - Header Files - Header Files diff --git a/ModLoader/Modloader/include/modLoader.h b/ModLoader/Modloader/include/modLoader.h index ee8c045..f2d795e 100644 --- a/ModLoader/Modloader/include/modLoader.h +++ b/ModLoader/Modloader/include/modLoader.h @@ -2,7 +2,7 @@ * modLoader.h */ -#include +#include // Mod Loader Implementation -bool conLoadMod(SimObject *obj,S32 argc, const char* argv[]); \ No newline at end of file +bool conLoadMod(Linker::SimObject *obj,S32 argc, const char* argv[]); \ No newline at end of file diff --git a/ModLoader/Modloader/include/t2api.h b/ModLoader/Modloader/include/t2api.h deleted file mode 100644 index 930dd4e..0000000 --- a/ModLoader/Modloader/include/t2api.h +++ /dev/null @@ -1,111 +0,0 @@ -#pragma once - -#include - -void initT2Api(); - - -//api stuff - -typedef unsigned int U32; -typedef int S32; -typedef float F32; - -typedef unsigned int dsize_t; - -//for addvariable -#define TypeS32 1 -#define TypeBool 3 -#define TypeF32 5 - - -//dshit -inline dsize_t dStrlen(const char *str) -{ - return (dsize_t)strlen(str); -} - -class Namespace { - const char* mName; -}; - - - -class SimObject{ - SimObject* group; - const char* objectName; //04h: objectName - SimObject* nextNameObject; //8 - SimObject* nextManagerNameObject; //c - SimObject* nextIdObject; //10h: nextIdObject - U32 stuff; //14 - U32 mFlags; //18h - U32 mNotifyList; //actually a pointer - U32 mId; //20h: mId - //more stuff -}; - -class SimIdDictionary -{ - enum - { - DefaultTableSize = 4096, - TableBitMask = 4095 - }; - SimObject *table[DefaultTableSize]; -}; -extern SimIdDictionary* gIdDictionary; - -class Point3F -{ - public: - F32 x; - F32 y; - F32 z; -}; - - -//GuiTSCtrl -class GuiTSCtrl {}; -class HoverVehicle {}; -void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest); //fake - - -namespace Sim { - extern SimObject* (*findObject)(U32 id); -} - - -//console - -typedef const char * (*StringCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef S32 (*IntCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef F32 (*FloatCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef void (*VoidCallback)(SimObject *obj, S32 argc, const char *argv[]); -typedef bool (*BoolCallback)(SimObject *obj, S32 argc, const char *argv[]); - - -extern void (*someTest)(void); -//functions -namespace Con{ - -extern char * (*getReturnBuffer)(U32 bufferSize); - -extern void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs); -extern void (*addMethodS)(const char *nsName, const char *name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs); - -extern bool (*addVariable)(const char *name, S32 t, void *dp); - -extern void (*printf)(const char* fmt,...); -extern void (*errorf)(U32 type, const char* fmt,...); - -extern const char * (*getVariable)(const char *name); -extern const char * (*execute)(S32 argc, const char *argv[]); -extern const char * (*executef)(S32 argc, ...); -extern const char * (*executem)(SimObject *object, S32 argc, const char *argv[]); -extern const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf); -} - -//d-util -extern int (*dSscanf)(const char *buffer, const char *format, ...); -extern int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...); -extern bool (*dAtob)(const char *str); \ No newline at end of file diff --git a/ModLoader/Modloader/source/modLoader.cpp b/ModLoader/Modloader/source/modLoader.cpp index 16bf3bb..9a936b1 100644 --- a/ModLoader/Modloader/source/modLoader.cpp +++ b/ModLoader/Modloader/source/modLoader.cpp @@ -3,7 +3,7 @@ */ #include "stdafx.h" -#include +#include static std::tr1::unordered_set sServerProcessResponders; @@ -27,7 +27,7 @@ void serverProcessReplacement(unsigned int timeDelta) } // Mod Loader Implementation -bool conLoadMod(SimObject *obj,S32 argc, const char* argv[]) +bool conLoadMod(Linker::SimObject *obj,S32 argc, const char* argv[]) { typedef void (*LPMODINIT)(void); HINSTANCE hDLL = NULL; @@ -42,7 +42,7 @@ bool conLoadMod(SimObject *obj,S32 argc, const char* argv[]) hDLL = LoadLibrary(modification.c_str()); if (hDLL == NULL) { - Con::errorf(0, "loadMod(): Failed to load DLL '%s'. Does it exist in GameData\mods? (%u)", raw.c_str(), GetLastError()); + Con::errorf(0, "loadMod(): Failed to load DLL '%s'. Does it exist in GameData\\mods? (%u)", raw.c_str(), GetLastError()); return false; // The DLL doesn't exist } diff --git a/ModLoader/Modloader/source/t2api.cpp b/ModLoader/Modloader/source/t2api.cpp deleted file mode 100644 index d62569a..0000000 --- a/ModLoader/Modloader/source/t2api.cpp +++ /dev/null @@ -1,89 +0,0 @@ -#include - -SimIdDictionary* gIdDictionary = reinterpret_cast(0x009E9194); - -//439550 -namespace Sim { - SimObject* (*findObject)(U32 id) = - (SimObject* (_cdecl *)(U32 id) ) - 0x439550; -} - -//hackey way to do member functions, .... -void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest) { - typedef void (__cdecl *projFunc)(const Point3F &pt, Point3F *dest); - static projFunc p = (projFunc)0x4d0b40; - - __asm { - push dest; - push pt; - mov ecx,obj; - lea eax, p; - mov eax, [eax]; - call eax; - } -} - -void (*someTest)(void) = - (void (__cdecl *)(void)) - 0x4FD9B3; - -namespace Con { - -char* (*getReturnBuffer)(U32 bufferSize) = - (char *(__cdecl *)(U32)) - 0x42caa0; - -void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs) = - (void (__cdecl *)(const char *, const char *,BoolCallback,const char *,S32,S32)) - 0x426510; - -void (*addMethodS)(const char *, const char *,StringCallback, const char *, S32, S32) = - (void (__cdecl *)(const char *,const char *,StringCallback,const char *,S32,S32)) - 0x426410; - -bool (*addVariable)(const char *name, S32 t, void *dp) = - (bool (__cdecl *)(const char *name, S32 t, void *dp)) - 0x4263B0; - -const char * (*execute)(S32 argc, const char *argv[]) = - (const char * (__cdecl *)(S32 argc, const char *argv[])) - 0x4267A0; - -const char * (*executef)(S32 argc, ...) = - (const char * (__cdecl *)(S32 argc, ...)) - 0x4269E0; - -const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf) = - (const char * (__cdecl *)(const char* string, bool echo, const char *fileName, bool cf)) - 0x426690; - -const char * (*executem)(SimObject *object, S32 argc, const char *argv[]) = - (const char * (__cdecl *)(SimObject *object, S32 argc, const char *argv[])) - 0x426800; - -const char * (*getVariable)(const char *name) = - (const char * (__cdecl *)(const char *name)) - 0x4261F0; - -void (*printf)(const char* fmt,...) = - (void (__cdecl *)(const char* fmt,...)) - 0x425F30; - -void (*errorf)(U32 type, const char* fmt,...)= - (void (__cdecl *)(U32, const char*,...)) - 0x425FB0; - -} - -int (*dSscanf)(const char *buffer, const char *format, ...) = - (int (__cdecl *)(const char *,const char *,...)) - 0x55b640; - -int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...) = - (int (__cdecl *)(char *,dsize_t,const char *,...)) - 0x55b5e0; - -bool (*dAtob)(const char *str) = - (bool (__cdecl *)(const char *str)) - 0x55B490; diff --git a/ModLoader/Modloader/source/t2dll.cpp b/ModLoader/Modloader/source/t2dll.cpp index abe7fcc..73b2176 100644 --- a/ModLoader/Modloader/source/t2dll.cpp +++ b/ModLoader/Modloader/source/t2dll.cpp @@ -6,7 +6,7 @@ #include -#include +#include #include #include @@ -21,7 +21,7 @@ BOOL APIENTRY DllMain( HMODULE hModule, return true; } -const char* congetServPAddr(SimObject *obj, S32 argc, const char *argv[]) +const char* congetServPAddr(Linker::SimObject *obj, S32 argc, const char *argv[]) { char test[256] = ""; char test2[256]=""; @@ -38,33 +38,63 @@ const char* congetServPAddr(SimObject *obj, S32 argc, const char *argv[]) test2[8]=0;*/ return test2; } - -__declspec(dllexport) void initT2Dll(void) -{ - Con::addVariable("$cpuspeed",TypeS32,reinterpret_cast(0x8477F8)); //1 - S32, this is so i can set my cpu speed to 31337 or osmething =P - Con::addVariable("$GameBase::showBoundingBox",TypeBool,reinterpret_cast(0x9ECF24)); - - // Mod Loader Function - Con::addMethodB(NULL, "loadMod", &conLoadMod, "Loads a C++ modification.",2,2); - Con::addMethodS(NULL, "getServPAddr",&congetServPAddr,"Gets the memPatch data for ServerProcess",1,1); - - // Load the original TribesNext DLL if available - typedef void (*LPINITT2DLL)(void); - HINSTANCE hDLL = NULL; - LPINITT2DLL lpinitT2DLL = NULL; - hDLL = LoadLibrary(L"tribesnext.dll"); // AfxLoadLibrary is probably better. - - if (hDLL == NULL) - return; // The DLL doesn't exist - else - lpinitT2DLL = (LPINITT2DLL)GetProcAddress(hDLL, "_Z9initT2Dllv"); // Attempt to load our entry point - - if (lpinitT2DLL == NULL) - return; // Unable to load entry point - else - lpinitT2DLL(); // The function was loaded, call TribesNext and move on to postTN Startup -} + +class CImmCompoundEffect +{ + public: + _declspec(dllexport) int Start(unsigned long x, unsigned long y) { return 8; } + _declspec(dllexport) int Stop() { return 1; } +}; + +class CImmDevice +{ + public: + _declspec(dllexport) static CImmDevice * CreateDevice(HINSTANCE__ *, HWND__ *) + { + Con::addVariable("$cpuspeed",TypeS32,reinterpret_cast(0x8477F8)); //1 - S32, this is so i can set my cpu speed to 31337 or osmething =P + Con::addVariable("$GameBase::showBoundingBox",TypeBool,reinterpret_cast(0x9ECF24)); + + // Mod Loader Function + Con::addMethodB(NULL, "loadMod", &conLoadMod, "Loads a C++ modification.",2,2); + Con::addMethodS(NULL, "getServPAddr",&congetServPAddr,"Gets the memPatch data for ServerProcess",1,1); + + // Load the original TribesNext DLL if available + typedef void (*LPINITT2DLL)(void); + HINSTANCE hDLL = NULL; + LPINITT2DLL lpinitT2DLL = NULL; + hDLL = LoadLibrary(L"tribesnext.dll"); // AfxLoadLibrary is probably better. + + if (hDLL == NULL) + return 0; // The DLL doesn't exist + else + lpinitT2DLL = (LPINITT2DLL)GetProcAddress(hDLL, "_Z9initT2Dllv"); // Attempt to load our entry point + + if (lpinitT2DLL == NULL) + return 0; // Unable to load entry point + else + lpinitT2DLL(); // The function was loaded, call TribesNext and move on to postTN Startup + + return 0; + } + + _declspec(dllexport) int UsesWin32MouseServices(int) { return 4; } +}; + +class CImmProject +{ + public: + _declspec(dllexport) CImmProject() {} + _declspec(dllexport) ~CImmProject() {} + + _declspec(dllexport) CImmCompoundEffect *GetCreatedEffect(int) { return 0; } + _declspec(dllexport) CImmCompoundEffect *GetCreatedEffect(const char *) { return 0; } + _declspec(dllexport) CImmCompoundEffect *CreateEffect(char const *, CImmDevice *, unsigned long) { return 0; } + _declspec(dllexport) int Start(char const *, unsigned long, unsigned long, class CImmDevice *) { return 1; } + _declspec(dllexport) int Stop(const char *) { return 1; } + _declspec(dllexport) int LoadProjectFromMemory(void *, CImmDevice *) { return 1; } +}; + #ifdef _MANAGED #pragma managed(pop) #endif