diff --git a/Mod Sources/BaseMod/BaseMod.sln b/Mod Sources/BaseMod/BaseMod.sln new file mode 100644 index 0000000..156a4b0 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseMod", "BaseMod\BaseMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Mod Sources/BaseMod/BaseMod.suo b/Mod Sources/BaseMod/BaseMod.suo new file mode 100644 index 0000000..fbb1d4a Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod.suo differ diff --git a/Mod Sources/BaseMod/BaseMod/BaseMod.cpp b/Mod Sources/BaseMod/BaseMod/BaseMod.cpp new file mode 100644 index 0000000..758f453 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/BaseMod.cpp @@ -0,0 +1,13 @@ +// BaseMod.cpp : Defines the exported functions for the DLL application. +// + +#include "stdafx.h" +#include "BaseMod.h" + +extern "C" +{ + BASEMOD_API void ModInitialize(void) + { + return; + } +} \ No newline at end of file diff --git a/Mod Sources/BaseMod/BaseMod/BaseMod.h b/Mod Sources/BaseMod/BaseMod/BaseMod.h new file mode 100644 index 0000000..98515c8 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/BaseMod.h @@ -0,0 +1,8 @@ +// The following ifdef block is the standard way of creating macros which make exporting +// from a DLL simpler. All files within this DLL are compiled with the BASEMOD_EXPORTS +// symbol defined on the command line. This symbol should not be defined on any project +// that uses this DLL. This way any other project whose source files include this file see +// BASEMOD_API functions as being imported from a DLL, whereas this DLL sees symbols +// defined with this macro as being exported. + +#define BASEMOD_API __declspec( dllexport ) diff --git a/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj b/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj new file mode 100644 index 0000000..18bf690 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj @@ -0,0 +1,100 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB} + Win32Proj + BaseMod + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + + + false + + + false + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj.filters b/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj.filters new file mode 100644 index 0000000..8c8706a --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj.filters @@ -0,0 +1,42 @@ + + + + + {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 + + + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj.user b/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/BaseMod.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Mod Sources/BaseMod/BaseMod/ReadMe.txt b/Mod Sources/BaseMod/BaseMod/ReadMe.txt new file mode 100644 index 0000000..59d4e6e --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + DYNAMIC LINK LIBRARY : BaseMod Project Overview +======================================================================== + +AppWizard has created this BaseMod DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your BaseMod application. + + +BaseMod.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +BaseMod.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +BaseMod.cpp + This is the main DLL source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named BaseMod.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Mod Sources/BaseMod/BaseMod/Release/BaseMod.lastbuildstate b/Mod Sources/BaseMod/BaseMod/Release/BaseMod.lastbuildstate new file mode 100644 index 0000000..dd42b4e --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/Release/BaseMod.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|Win32|C:\Users\Robert MacGregor\Desktop\BaseMod\| diff --git a/Mod Sources/BaseMod/BaseMod/Release/BaseMod.log b/Mod Sources/BaseMod/BaseMod/Release/BaseMod.log new file mode 100644 index 0000000..3acfa03 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/Release/BaseMod.log @@ -0,0 +1,27 @@ +Build started 7/29/2014 11:01:02 PM. + 1>Project "C:\Users\Robert MacGregor\Desktop\BaseMod\BaseMod\BaseMod.vcxproj" on node 2 (build target(s)). + 1>InitializeBuildStatus: + Creating "Release\BaseMod.unsuccessfulbuild" because "AlwaysCreate" was specified. + ClCompile: + All outputs are up-to-date. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D BASEMOD_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"Release\BaseMod.pch" /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt BaseMod.cpp + BaseMod.cpp + All outputs are up-to-date. + Link: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\BaseMod.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib" /MACHINE:X86 /DLL Release\BaseMod.obj + Release\dllmain.obj + Release\stdafx.obj + Creating library C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib and object C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp + Generating code + Finished generating code + BaseMod.vcxproj -> C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.dll + Manifest: + C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.dll;#2" /manifest Release\BaseMod.dll.intermediate.manifest + FinalizeBuildStatus: + Deleting file "Release\BaseMod.unsuccessfulbuild". + Touching "Release\BaseMod.lastbuildstate". + 1>Done Building Project "C:\Users\Robert MacGregor\Desktop\BaseMod\BaseMod\BaseMod.vcxproj" (build target(s)). + +Build succeeded. + +Time Elapsed 00:00:00.45 diff --git a/Mod Sources/BaseMod/BaseMod/Release/BaseMod.write.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/BaseMod.write.1.tlog new file mode 100644 index 0000000..eed6673 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/Release/BaseMod.write.1.tlog @@ -0,0 +1,15 @@ +^C:\Users\Robert MacGregor\Desktop\BaseMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +^C:\Users\Robert MacGregor\Desktop\BaseMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +^C:\Users\Robert MacGregor\Desktop\BaseMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp diff --git a/Mod Sources/BaseMod/BaseMod/Release/CL.read.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/CL.read.1.tlog new file mode 100644 index 0000000..2d01435 Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/CL.read.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/CL.write.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/CL.write.1.tlog new file mode 100644 index 0000000..68c5b0e Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/CL.write.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/cl.command.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/cl.command.1.tlog new file mode 100644 index 0000000..8dea86a Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/cl.command.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/link.command.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/link.command.1.tlog new file mode 100644 index 0000000..2c4680c Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/link.command.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/link.read.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/link.read.1.tlog new file mode 100644 index 0000000..be4ed92 Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/link.read.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/link.write.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/link.write.1.tlog new file mode 100644 index 0000000..080172a Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/link.write.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/mt.command.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/mt.command.1.tlog new file mode 100644 index 0000000..1646196 Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/mt.command.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/mt.read.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/mt.read.1.tlog new file mode 100644 index 0000000..c55d98f Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/mt.read.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/Release/mt.write.1.tlog b/Mod Sources/BaseMod/BaseMod/Release/mt.write.1.tlog new file mode 100644 index 0000000..6a730f7 Binary files /dev/null and b/Mod Sources/BaseMod/BaseMod/Release/mt.write.1.tlog differ diff --git a/Mod Sources/BaseMod/BaseMod/dllmain.cpp b/Mod Sources/BaseMod/BaseMod/dllmain.cpp new file mode 100644 index 0000000..8a4edd3 --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/Mod Sources/BaseMod/BaseMod/stdafx.cpp b/Mod Sources/BaseMod/BaseMod/stdafx.cpp new file mode 100644 index 0000000..866f2bd --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// BaseMod.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Mod Sources/BaseMod/BaseMod/stdafx.h b/Mod Sources/BaseMod/BaseMod/stdafx.h new file mode 100644 index 0000000..677e68a --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/stdafx.h @@ -0,0 +1,16 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Mod Sources/BaseMod/BaseMod/targetver.h b/Mod Sources/BaseMod/BaseMod/targetver.h new file mode 100644 index 0000000..90e767b --- /dev/null +++ b/Mod Sources/BaseMod/BaseMod/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Mod Sources/RandomMod/BaseMod.v12.suo b/Mod Sources/RandomMod/BaseMod.v12.suo new file mode 100644 index 0000000..24d8dc7 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod.v12.suo differ diff --git a/Mod Sources/RandomMod/BaseMod/BaseMod.cpp b/Mod Sources/RandomMod/BaseMod/BaseMod.cpp new file mode 100644 index 0000000..5089dc9 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/BaseMod.cpp @@ -0,0 +1,22 @@ +// BaseMod.cpp : Defines the exported functions for the DLL application. +// + +#include "stdafx.h" +#include "BaseMod.h" + +#include "t2api.h" +#include "randomCmds.h" + +extern "C" +{ + BASEMOD_API void ModInitialize(void) + { + Con::addMethodS(NULL,"getRandom",&conMRandom,"Random number generation based upon the Mersenne Twister algorithm.",1,3); + Con::addMethodS(NULL,"seedRand",&conMSeed,"Reseeds the Mersenne Twister random number generator.",2,2); + Con::addMethodS(NULL,"getRandomFloat",&conMRandomFloat,"Random number generation based upon the Mersenne Twister algorithm.",1,3); + Con::addMethodS(NULL,"QPCBegin",&conQPCBegin,"Begins the performance counter.",1,1); + Con::addMethodS(NULL,"QPCEnd",&conQPCEnd,"Ends the performance counter and returns the time in seconds.",2,2); + + return; + } +} \ No newline at end of file diff --git a/Mod Sources/RandomMod/BaseMod/BaseMod.h b/Mod Sources/RandomMod/BaseMod/BaseMod.h new file mode 100644 index 0000000..98515c8 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/BaseMod.h @@ -0,0 +1,8 @@ +// The following ifdef block is the standard way of creating macros which make exporting +// from a DLL simpler. All files within this DLL are compiled with the BASEMOD_EXPORTS +// symbol defined on the command line. This symbol should not be defined on any project +// that uses this DLL. This way any other project whose source files include this file see +// BASEMOD_API functions as being imported from a DLL, whereas this DLL sees symbols +// defined with this macro as being exported. + +#define BASEMOD_API __declspec( dllexport ) diff --git a/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj b/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj new file mode 100644 index 0000000..ce2e819 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj @@ -0,0 +1,107 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB} + Win32Proj + BaseMod + RandomMod + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + true + + + false + + + + Use + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + Use + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + false + + + false + + + + + + + Create + Create + + + + + + + \ No newline at end of file diff --git a/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj.filters b/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj.filters new file mode 100644 index 0000000..3db6a2c --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {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 + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj.user b/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/BaseMod.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Mod Sources/RandomMod/BaseMod/ReadMe.txt b/Mod Sources/RandomMod/BaseMod/ReadMe.txt new file mode 100644 index 0000000..59d4e6e --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + DYNAMIC LINK LIBRARY : BaseMod Project Overview +======================================================================== + +AppWizard has created this BaseMod DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your BaseMod application. + + +BaseMod.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +BaseMod.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +BaseMod.cpp + This is the main DLL source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named BaseMod.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Mod Sources/RandomMod/BaseMod/Release/BaseMod.lastbuildstate b/Mod Sources/RandomMod/BaseMod/Release/BaseMod.lastbuildstate new file mode 100644 index 0000000..dd42b4e --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/Release/BaseMod.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|Win32|C:\Users\Robert MacGregor\Desktop\BaseMod\| diff --git a/Mod Sources/RandomMod/BaseMod/Release/BaseMod.log b/Mod Sources/RandomMod/BaseMod/Release/BaseMod.log new file mode 100644 index 0000000..2e89e89 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/Release/BaseMod.log @@ -0,0 +1,30 @@ +Build started 7/31/2014 6:32:18 PM. + 1>Project "C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj" on node 2 (build target(s)). + 1>InitializeBuildStatus: + Creating "Release\RandomMod.unsuccessfulbuild" because "AlwaysCreate" was specified. + ClCompile: + All outputs are up-to-date. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D BASEMOD_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Yu"StdAfx.h" /Fp"Release\RandomMod.pch" /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt BaseMod.cpp + BaseMod.cpp + All outputs are up-to-date. + Link: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\RandomMod.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib" /MACHINE:X86 /DLL Release\BaseMod.obj + Release\dllmain.obj + Release\mt.obj + Release\randomCmds.obj + Release\stdafx.obj + Release\t2api.obj + Creating library C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib and object C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp + Generating code + Finished generating code + BaseMod.vcxproj -> C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.dll + Manifest: + C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.dll;#2" /manifest Release\RandomMod.dll.intermediate.manifest + FinalizeBuildStatus: + Deleting file "Release\RandomMod.unsuccessfulbuild". + Touching "Release\RandomMod.lastbuildstate". + 1>Done Building Project "C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj" (build target(s)). + +Build succeeded. + +Time Elapsed 00:00:00.71 diff --git a/Mod Sources/RandomMod/BaseMod/Release/BaseMod.vcxprojResolveAssemblyReference.cache b/Mod Sources/RandomMod/BaseMod/Release/BaseMod.vcxprojResolveAssemblyReference.cache new file mode 100644 index 0000000..1a52c1a Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/BaseMod.vcxprojResolveAssemblyReference.cache differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/CL.read.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/CL.read.1.tlog new file mode 100644 index 0000000..6517b59 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/CL.read.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/CL.write.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/CL.write.1.tlog new file mode 100644 index 0000000..f137622 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/CL.write.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/RandomMod.Build.CppClean.log b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.Build.CppClean.log new file mode 100644 index 0000000..dcf230f --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.Build.CppClean.log @@ -0,0 +1,37 @@ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\BASEMOD.DLL.INTERMEDIATE.MANIFEST +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\BASEMOD.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\BASEMOD.PCH +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\DLLMAIN.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\STDAFX.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\VC100.PDB +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\RELEASE\BASEMOD.DLL +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\RELEASE\BASEMOD.PDB +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\BaseMod.dll.intermediate.manifest +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\BASEMOD.OBJ +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\BaseMod.pch +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\BaseMod.vcxprojResolveAssemblyReference.cache +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\BaseMod.write.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\cl.command.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\CL.read.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\CL.write.1.tlog +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\DLLMAIN.OBJ +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\link.command.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\link.read.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\link.write.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\mt.command.1.tlog +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\MT.OBJ +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\mt.read.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\mt.write.1.tlog +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\randomCmds.obj +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\RANDOMMOD.DLL.INTERMEDIATE.MANIFEST +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\RANDOMMOD.PCH +C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\Release\RandomMod.write.1.tlog +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\STDAFX.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\T2API.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\BASEMOD\RELEASE\VC100.PDB +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\RELEASE\RANDOMMOD.DLL +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\USERS\ROBERT MACGREGOR\DESKTOP\RANDOMMOD\RELEASE\RANDOMMOD.PDB diff --git a/Mod Sources/RandomMod/BaseMod/Release/RandomMod.dll.intermediate.manifest b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.dll.intermediate.manifest new file mode 100644 index 0000000..1c06b61 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.dll.intermediate.manifest @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mod Sources/RandomMod/BaseMod/Release/RandomMod.lastbuildstate b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.lastbuildstate new file mode 100644 index 0000000..e9491cc --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|Win32|C:\Users\Robert MacGregor\Desktop\RandomMod\| diff --git a/Mod Sources/RandomMod/BaseMod/Release/RandomMod.pch b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.pch new file mode 100644 index 0000000..acd6a9d Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.pch differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/RandomMod.write.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.write.1.tlog new file mode 100644 index 0000000..e42bd3d --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/Release/RandomMod.write.1.tlog @@ -0,0 +1,45 @@ +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +^C:\Users\Robert MacGregor\Desktop\RandomMod\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.lib +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp +C:\Users\Robert MacGregor\Desktop\RandomMod\Release\RandomMod.exp diff --git a/Mod Sources/RandomMod/BaseMod/Release/cl.command.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/cl.command.1.tlog new file mode 100644 index 0000000..19d9fd6 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/cl.command.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/link.command.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/link.command.1.tlog new file mode 100644 index 0000000..fb5dd2b Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/link.command.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/link.read.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/link.read.1.tlog new file mode 100644 index 0000000..e622e9e Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/link.read.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/link.write.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/link.write.1.tlog new file mode 100644 index 0000000..afc0672 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/link.write.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/mt.command.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/mt.command.1.tlog new file mode 100644 index 0000000..adca637 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/mt.command.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/mt.read.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/mt.read.1.tlog new file mode 100644 index 0000000..3b6afe3 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/mt.read.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/mt.write.1.tlog b/Mod Sources/RandomMod/BaseMod/Release/mt.write.1.tlog new file mode 100644 index 0000000..624848a Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/mt.write.1.tlog differ diff --git a/Mod Sources/RandomMod/BaseMod/Release/vc100.pdb b/Mod Sources/RandomMod/BaseMod/Release/vc100.pdb new file mode 100644 index 0000000..6ac28d7 Binary files /dev/null and b/Mod Sources/RandomMod/BaseMod/Release/vc100.pdb differ diff --git a/Mod Sources/RandomMod/BaseMod/dllmain.cpp b/Mod Sources/RandomMod/BaseMod/dllmain.cpp new file mode 100644 index 0000000..8a4edd3 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/Mod Sources/RandomMod/BaseMod/mt.cc b/Mod Sources/RandomMod/BaseMod/mt.cc new file mode 100644 index 0000000..c44808f --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/mt.cc @@ -0,0 +1,264 @@ +/** + * C++ Mersenne Twister wrapper class written by + * Jason R. Blevins on July 24, 2006. + * Based on the original MT19937 C code by + * Takuji Nishimura and Makoto Matsumoto. + */ + +/* + A C-program for MT19937, with initialization improved 2002/1/26. + Coded by Takuji Nishimura and Makoto Matsumoto. + + Before using, initialize the state by using init_genrand(seed) + or init_by_array(init_key, key_length). + + Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The names of its contributors may not be used to endorse or promote + products derived from this software without specific prior written + permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + Any feedback is very welcome. + http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html + email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space) +*/ + +#include "stdafx.h" +#include +#include + +#include "mt.h" + +/** + * Constructor + */ +MersenneTwister::MersenneTwister(void): + mt_(new unsigned long[N]), mti_(N+1), + init_key_(NULL), key_length_(0), s_(0), + seeded_by_array_(false), seeded_by_int_(false) +{ + unsigned long init[4] = { 0x123, 0x234, 0x345, 0x456 }; + unsigned long length = 4; + init_by_array(init, length); +} + +/** + * Destructor + */ +MersenneTwister::~MersenneTwister(void) +{ + assert(mt_ != NULL); + delete[] mt_; + mt_ = NULL; + + assert(init_key_ != NULL); + delete[] init_key_; + init_key_ = NULL; +} + +/** + * Initializes the Mersenne Twister with a seed. + * + * \param s seed + */ +void MersenneTwister::init_genrand(unsigned long s) +{ + mt_[0]= s & 0xffffffffUL; + for (mti_=1; mti_> 30)) + mti_); + /* See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. */ + /* In the previous versions, MSBs of the seed affect */ + /* only MSBs of the array mt_[]. */ + /* 2002/01/09 modified by Makoto Matsumoto */ + mt_[mti_] &= 0xffffffffUL; + /* for >32 bit machines */ + } + // Store the seed + s_ = s; + seeded_by_array_ = false; + seeded_by_int_ = true; +} + +/** + * Seed the Mersenne Twister using an array. + * + * \param init_key an array for initializing keys + * \param key_length the length of \a init_key + */ +void MersenneTwister::init_by_array(unsigned long* init_key, int key_length) +{ + // Store the key array + int i, j, k; + init_genrand(19650218UL); + i=1; j=0; + k = (N>key_length ? N : key_length); + for (; k; k--) { + mt_[i] = (mt_[i] ^ ((mt_[i-1] ^ (mt_[i-1] >> 30)) * 1664525UL)) + + init_key[j] + j; /* non linear */ + mt_[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; j++; + if (i>=N) { mt_[0] = mt_[N-1]; i=1; } + if (j>=key_length) j=0; + } + for (k=N-1; k; k--) { + mt_[i] = (mt_[i] ^ ((mt_[i-1] ^ (mt_[i-1] >> 30)) * 1566083941UL)) + - i; /* non linear */ + mt_[i] &= 0xffffffffUL; /* for WORDSIZE > 32 machines */ + i++; + if (i>=N) { mt_[0] = mt_[N-1]; i=1; } + } + + mt_[0] = 0x80000000UL; /* MSB is 1; assuring non-zero initial array */ + + // Store the seed + if (init_key_ != NULL) { + delete[] init_key_; + } + init_key_ = new unsigned long[key_length]; + for (int k = 0; k < key_length; k++) { + init_key_[k] = init_key[k]; + } + key_length_ = key_length; + seeded_by_int_ = false; + seeded_by_array_ = true; +} + +/** + * Generates a random number on [0,0xffffffff]-interval + * + * \return random number on [0, 0xffffffff] + */ +unsigned long MersenneTwister::genrand_int32(void) +{ + unsigned long y; + static unsigned long mag01[2]={0x0UL, MATRIX_A}; + /* mag01[x] = x * MATRIX_A for x=0,1 */ + + if (mti_ >= N) { /* generate N words at one time */ + int kk; + + if (mti_ == N+1) /* if init_genrand() has not been called, */ + init_genrand(5489UL); /* a default initial seed is used */ + + for (kk=0;kk> 1) ^ mag01[y & 0x1UL]; + } + for (;kk> 1) ^ mag01[y & 0x1UL]; + } + y = (mt_[N-1]&UPPER_MASK)|(mt_[0]&LOWER_MASK); + mt_[N-1] = mt_[M-1] ^ (y >> 1) ^ mag01[y & 0x1UL]; + + mti_ = 0; + } + + y = mt_[mti_++]; + + /* Tempering */ + y ^= (y >> 11); + y ^= (y << 7) & 0x9d2c5680UL; + y ^= (y << 15) & 0xefc60000UL; + y ^= (y >> 18); + + return y; +} + +/** + * Generates a random integer on [0,0x7fffffff]. + * + * \return a random integer on [0,0x7fffffff] + */ +long MersenneTwister::genrand_int31(void) +{ + return (long)(genrand_int32()>>1); +} + +/** + * Generates a random real number on [0,1]. + * + * \return a random real number on [0,1] + */ +double MersenneTwister::genrand_real1(void) +{ + return genrand_int32()*(1.0/4294967295.0); + /* divided by 2^32-1 */ +} + +/** + * Generates a random real number on [0,1). + * + * \return a random real number on [0,1) + */ +double MersenneTwister::genrand_real2(void) +{ + return genrand_int32()*(1.0/4294967296.0); + /* divided by 2^32 */ +} + +/** + * Generates a random real number on (0,1). + * + * \return a random real number on (0,1) + */ +double MersenneTwister::genrand_real3(void) +{ + return (((double)genrand_int32()) + 0.5)*(1.0/4294967296.0); + /* divided by 2^32 */ +} + +/** + * Generates a random real number on [0,1) with 53-bit precision. + * + * \return a random 53-bit real number on [0,1) + */ +double MersenneTwister::genrand_res53(void) +{ + unsigned long a=genrand_int32()>>5, b=genrand_int32()>>6; + return(a*67108864.0+b)*(1.0/9007199254740992.0); +} +/* These real versions are due to Isaku Wada, 2002/01/09 added */ + +/** + * Print interesting information about the Mersenne Twister. + * + */ +void MersenneTwister::print(void) +{ + std::cout << "MersenneTwister (M. Matsumoto and T. Nishimura), seed = "; + if (seeded_by_int_) { + std::cout << s_ << std::endl; + } else { + std::cout << "[ "; + for (int k = 0; k < key_length_; k++) { + std::cout << init_key_[k] << " "; + } + std::cout << "]" << std::endl; + } +} diff --git a/Mod Sources/RandomMod/BaseMod/mt.h b/Mod Sources/RandomMod/BaseMod/mt.h new file mode 100644 index 0000000..d24fbb4 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/mt.h @@ -0,0 +1,60 @@ +/** + * mt.h: Mersenne Twister header file + * + * Jason R. Blevins + * Durham, March 7, 2007 + */ + +#ifndef METRICS_MT_H +#define METRICS_MT_H + +/** + * Mersenne Twister. + * + * M. Matsumoto and T. Nishimura, "Mersenne Twister: A + * 623-dimensionally equidistributed uniform pseudorandom number + * generator", ACM Trans. on Modeling and Computer Simulation Vol. 8, + * No. 1, January pp.3-30 (1998). + * + * http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/emt.html. + */ +class MersenneTwister +{ +public: + MersenneTwister(void); + ~MersenneTwister(void); + + double random(void) { return genrand_real1(); } + void print(void); + + void init_genrand(unsigned long s); + void init_by_array(unsigned long* init_key, int key_length); + + unsigned long genrand_int32(void); + long genrand_int31(void); + double genrand_real1(void); + double genrand_real2(void); + double genrand_real3(void); + double genrand_res53(void); + +private: + static const int N = 624; + static const int M = 397; + // constant vector a + static const unsigned long MATRIX_A = 0x9908b0dfUL; + // most significant w-r bits + static const unsigned long UPPER_MASK = 0x80000000UL; + // least significant r bits + static const unsigned long LOWER_MASK = 0x7fffffffUL; + + unsigned long* mt_; // the state vector + int mti_; // mti == N+1 means mt not initialized + + unsigned long* init_key_; // Storage for the seed vector + int key_length_; // Seed vector length + unsigned long s_; // Seed integer + bool seeded_by_array_; // Seeded by an array + bool seeded_by_int_; // Seeded by an integer +}; + +#endif // METRICS_MT_H diff --git a/Mod Sources/RandomMod/BaseMod/randomCmds.cpp b/Mod Sources/RandomMod/BaseMod/randomCmds.cpp new file mode 100644 index 0000000..9e0fca2 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/randomCmds.cpp @@ -0,0 +1,169 @@ +#include "stdafx.h" +#include +#include +#include +#include "mt.h" + +#include "t2api.h" + +// Merscenne Twister +MersenneTwister *mt = NULL; +const char *conMRandom(SimObject *obj, S32 argc, const char *argv[]) +{ + if (!mt) + { + mt = new MersenneTwister; + mt->init_genrand(time(NULL)); + } + + char mem[256]; + memset(mem, 0x00, 255); + if (argc == 1) + { + sprintf_s(mem, 256, "%f", mt->random()); + return mem; + } + + char *a_c = (char*)argv[1]; + char *b_c; + if (argc == 3) + b_c = (char*)argv[2]; + else if (argc == 2) + { + b_c = a_c; + a_c = "0"; + } + + int a = atoi(a_c); + int b = atoi(b_c); + + // Check to see if we have any negative arguments + if (a < 0) + { + int max = b + abs(a); + int rand = mt->genrand_int32() % (max); + if (rand > b) + rand = -(rand-b); + sprintf_s(mem, 256, "%d", rand); + return mem; + } + + sprintf_s(mem, 256, "%f", floor(mt->random() * b + a)); + return mem; +} + +const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[]) +{ + if (!mt) + { + mt = new MersenneTwister; + mt->init_genrand(time(NULL)); + } + + char mem[256]; + memset(mem, 0x00, 255); + if (argc == 1) + { + sprintf_s(mem, 256, "%f", mt->random()); + return mem; + } + + char *a_c = (char*)argv[1]; + char *b_c; + if (argc == 3) + b_c = (char*)argv[2]; + else if (argc == 2) + { + b_c = a_c; + a_c = "0"; + } + + float a = atof(a_c); + float b = atof(b_c); + if (a > b) + { + int d = b; + b = a; + a = d; + } + + sprintf_s(mem, 256, "%f", mt->random() * b + a); + return mem; +} + +const char *conMSeed(SimObject *obj, S32 argc, const char *argv[]) +{ + if (!mt) + { + mt = new MersenneTwister; + mt->init_genrand(time(NULL)); + } + const char *a_c = argv[1]; + + unsigned long a = 0; + unsigned int len = strlen(a_c); + for (unsigned int i = 0; i < len; i++) + if ( a_c[i] > 57 || a_c[i] < 48) + { + mt->init_by_array((unsigned long*)a_c, len+1); + return "1"; + } + + a = atof(a_c); + mt->init_genrand(a); + return "1"; +} + + +#define QPC_MAX_STOPWATCHES 20 + +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[]) +{ + if (!QueryPerformanceCounter((LARGE_INTEGER*)&QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT])) + { + Con::errorf(0, "QPCBegin(): Failed to start timer! (%u)", GetLastError()); + return "-1"; + } + else if (CURRENT_STOPWATCH_COUNT >= QPC_MAX_STOPWATCHES) + { + Con::errorf(0, "QPCBegin(): Too many stopwatches active! (Maximum: %u)", QPC_MAX_STOPWATCHES); + return "-1"; + } + + unsigned int return_value = CURRENT_STOPWATCH_COUNT; + char result[256]; + sprintf_s<256>(result, "%u", return_value); + + CURRENT_STOPWATCH_COUNT++; + + return result; +} + +const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[]) +{ + __int64 ENDING_QPC_TIME; + if (!QueryPerformanceCounter((LARGE_INTEGER*)&ENDING_QPC_TIME)) + { + Con::errorf(0, "QPCEnd(): Failed to stop timer! (%u)", GetLastError()); + return "-1"; + } + else if (CURRENT_STOPWATCH_COUNT == 0) + { + Con::errorf(0, "QPCEnd(): No stopwatches to stop!"); + return "-1"; + } + + __int64 qpc_frequency; + QueryPerformanceFrequency((LARGE_INTEGER*)&qpc_frequency); + + char result[256]; + sprintf_s<256>(result, "%f", ((QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT - 1]) - ENDING_QPC_TIME) * 1.0 / qpc_frequency); + + CURRENT_STOPWATCH_COUNT--; + + return result; +} \ No newline at end of file diff --git a/Mod Sources/RandomMod/BaseMod/randomCmds.h b/Mod Sources/RandomMod/BaseMod/randomCmds.h new file mode 100644 index 0000000..a44e08a --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/randomCmds.h @@ -0,0 +1,14 @@ +#include "stdafx.h" + +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[]); + +// 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[]); + +// 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 diff --git a/Mod Sources/RandomMod/BaseMod/stdafx.cpp b/Mod Sources/RandomMod/BaseMod/stdafx.cpp new file mode 100644 index 0000000..866f2bd --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// BaseMod.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Mod Sources/RandomMod/BaseMod/stdafx.h b/Mod Sources/RandomMod/BaseMod/stdafx.h new file mode 100644 index 0000000..7b67610 --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/stdafx.h @@ -0,0 +1,17 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include +#include + + + +// TODO: reference additional headers your program requires here diff --git a/Mod Sources/RandomMod/BaseMod/t2api.cpp b/Mod Sources/RandomMod/BaseMod/t2api.cpp new file mode 100644 index 0000000..5efaa5d --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/t2api.cpp @@ -0,0 +1,86 @@ +#include "stdafx.h" +#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/RandomMod/BaseMod/t2api.h b/Mod Sources/RandomMod/BaseMod/t2api.h new file mode 100644 index 0000000..f18faec --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/t2api.h @@ -0,0 +1,109 @@ +#pragma once + +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/BaseMod/targetver.h b/Mod Sources/RandomMod/BaseMod/targetver.h new file mode 100644 index 0000000..90e767b --- /dev/null +++ b/Mod Sources/RandomMod/BaseMod/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Mod Sources/RandomMod/RandomMod.sln b/Mod Sources/RandomMod/RandomMod.sln new file mode 100644 index 0000000..156a4b0 --- /dev/null +++ b/Mod Sources/RandomMod/RandomMod.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseMod", "BaseMod\BaseMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Mod Sources/RandomMod/RandomMod.suo b/Mod Sources/RandomMod/RandomMod.suo new file mode 100644 index 0000000..50eb8be Binary files /dev/null and b/Mod Sources/RandomMod/RandomMod.suo differ diff --git a/Mod Sources/TSExtension/BaseMod.sln b/Mod Sources/TSExtension/BaseMod.sln new file mode 100644 index 0000000..156a4b0 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual C++ Express 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseMod", "BaseMod\BaseMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {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 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Mod Sources/TSExtension/BaseMod.suo b/Mod Sources/TSExtension/BaseMod.suo new file mode 100644 index 0000000..4a57b45 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod.suo differ diff --git a/Mod Sources/TSExtension/BaseMod/BaseMod.cpp b/Mod Sources/TSExtension/BaseMod/BaseMod.cpp new file mode 100644 index 0000000..68da28b --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/BaseMod.cpp @@ -0,0 +1,22 @@ +// BaseMod.cpp : Defines the exported functions for the DLL application. +// + +#include "stdafx.h" +#include "BaseMod.h" + +#include "DXAPI.h" +#include "LinkerAPI.h" + +#include "DXConCmds.h" + +extern "C" +{ + BASEMOD_API void ModInitialize(void) + { + Con::addMethodB("Player", "isjumping", &conPlayerGetJumpingState,"Returns whether or not the player is jumping", 2, 2); + Con::addMethodB("Player", "isjetting", &conPlayerGetJettingState,"Returns whether or not the player is jetting", 2, 2); + + Con::addMethodB("GrenadeProjectile", "explode", &conProjectileExplode,"Explodes the given projectile", 5, 5); + Con::addMethodB("Projectile", "explode", &conProjectileExplode,"Explodes the given projectile", 5, 5); + } +} \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/BaseMod.h b/Mod Sources/TSExtension/BaseMod/BaseMod.h new file mode 100644 index 0000000..98515c8 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/BaseMod.h @@ -0,0 +1,8 @@ +// The following ifdef block is the standard way of creating macros which make exporting +// from a DLL simpler. All files within this DLL are compiled with the BASEMOD_EXPORTS +// symbol defined on the command line. This symbol should not be defined on any project +// that uses this DLL. This way any other project whose source files include this file see +// BASEMOD_API functions as being imported from a DLL, whereas this DLL sees symbols +// defined with this macro as being exported. + +#define BASEMOD_API __declspec( dllexport ) diff --git a/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj b/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj new file mode 100644 index 0000000..e05beeb --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj @@ -0,0 +1,106 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + + {2A498B2D-84B2-4BBF-9532-EA17E5BA51BB} + Win32Proj + BaseMod + + + + DynamicLibrary + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + true + + + false + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + + + + + Level3 + NotUsing + MaxSpeed + true + true + WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions) + + + Windows + true + true + true + + + + + + + + + + + + + + + + + false + + + false + + + + + + + + Create + Create + + + + + + \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj.filters b/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj.filters new file mode 100644 index 0000000..e6bdb2a --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj.filters @@ -0,0 +1,60 @@ + + + + + {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 + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj.user b/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj.user new file mode 100644 index 0000000..695b5c7 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/BaseMod.vcxproj.user @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/DXAPI.cpp b/Mod Sources/TSExtension/BaseMod/DXAPI.cpp new file mode 100644 index 0000000..098bd21 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/DXAPI.cpp @@ -0,0 +1,90 @@ +/** + * @file DXAPI.cpp + * @brief The DXAPI is an API that allows you to manipulate various game objects + * in Tribes 2 from raw C++ code. It dynamically resolves the addresses of member + * variables as you can't really trust the compiler to produce binary compatible classes, + * especially with all the inheritance involved in the original Tribes 2 codebase. + * + * This code wouldn't be possible without Linker's original gift on the-construct.net forums, + * whose files are appropriately labelled in this codebase. These files have been edited where + * appropriate in order to make that code play better with the DXAPI. + * + * @copyright (c) 2014 Robert MacGregor + */ + +#include "DXAPI.h" +#include "LinkerAPI.h" + +namespace DX +{ + Player GetPlayerPointer(UnresolvedObject obj) + { + // Probably some way to do all this via assembly but screw me if I know + unsigned int base_tribes_pointer = (unsigned int)obj; + + Player result = + { + 0x00, // Object Name + *(unsigned int*)(base_tribes_pointer + 32), // Object ID + *(float*)(base_tribes_pointer + 168), // Position X + *(float*)(base_tribes_pointer + 184), // Position Y + *(float*)(base_tribes_pointer + 200), // Position Z + *(bool*)(base_tribes_pointer + 735), // Jetting State + *(bool*)(base_tribes_pointer + 734) // Jumping State + }; + return result; + } + + StaticShape GetStaticShapePointer(UnresolvedObject obj) + { + unsigned int base_tribes_pointer = (unsigned int)obj; + + StaticShape result = + { + 0x00, // Object Name + *(float*)(base_tribes_pointer + 200), // Position X + *(float*)(base_tribes_pointer + 200), // Position Y + *(float*)(base_tribes_pointer + 200) // Position Z + }; + return result; + } + + SimGroup GetSimGroupPointer(UnresolvedObject obj) + { + unsigned int base_tribes_pointer = (unsigned int)obj; + + SimGroup result = + { + + }; + return result; + } + + FlyingVehicle GetFlyingVehiclePointer(UnresolvedObject obj) + { + unsigned int base_tribes_pointer = (unsigned int)obj; + + FlyingVehicle result = + { + *(float*)(base_tribes_pointer + 2200), // Strafing Status + }; + return result; + } + + void Projectile_explode(Projectile *obj, const Point3F &position, const Point3F &normal, const unsigned int collideType) + { + typedef void (__cdecl *explodeFunc)(const Point3F &position, const Point3F &normal, const unsigned int collideType); + static explodeFunc function_call = (explodeFunc)0x62DC30; + + __asm { + push collideType; + push normal; + push position; + mov ecx,obj; + lea eax, function_call; + mov eax, [eax]; + call eax; + } +} + +} \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/DXAPI.h b/Mod Sources/TSExtension/BaseMod/DXAPI.h new file mode 100644 index 0000000..6be0b17 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/DXAPI.h @@ -0,0 +1,107 @@ +/** + * @file DXAPI.h + * @brief The DXAPI is an API that allows you to manipulate various game objects + * in Tribes 2 from raw C++ code. It dynamically resolves the addresses of member + * variables as you can't really trust the compiler to produce binary compatible classes, + * especially with all the inheritance involved in the original Tribes 2 codebase. + * + * This code wouldn't be possible without Linker's original gift on the-construct.net forums, + * whose files are appropriately labelled in this codebase. These files have been edited where + * appropriate in order to make that code play better with the DXAPI. + * + * @copyright (c) 2014 Robert MacGregor + */ + +#pragma once + +#include "LinkerAPI.h" + +namespace DX +{ + //! A typedef referring to some type of unresolved object in the game. + typedef void* UnresolvedObject; + + class Projectile {}; + + //! Structure representing a player object in the game. + typedef struct + { + //! Object Name + const char *name; + //! Object ID + const unsigned int &id; + + //! X Coordinate of the position. + float &position_x; + //! Y Coordinate of the position. + float &position_y; + //! Z Coordinate of the position. + float &position_z; + + //! Player Object Jetting State (readonly, writing it doesn't do anything) + const bool &is_jetting; + //! Player Object Jumping State (readonly, writing it doesn't do anything) + const bool &is_jumping; + } Player; + + /** + * @brief Returns a usable Player structure from a void + * pointer. + * @param obj A void pointer to attempt to resolve from. + * @return A usable Player structure to manipulate. + */ + Player GetPlayerPointer(UnresolvedObject obj); + + //! Structure representing a static shape in the game. + typedef struct + { + //! Object Name + const char *name; + //! X Coordinate of the position. + float &position_x; + //! Y Coordinate of the position. + float &position_y; + //! Z Coordinate of the position. + float &position_z; + } StaticShape; + + /** + * @brief Returns a usable StaticShape structure from a void + * pointer. + * @param obj A void pointer to attempt to resolve from. + * @return A usable StaticShape structure to manipulate. + */ + StaticShape GetStaticShapePointer(UnresolvedObject obj); + + //! Structure representing a SimGroup in the game. + typedef struct + { + + } SimGroup; + + /** + * @brief Returns a usable SimGroup structure from a void + * pointer. + * @param obj A void pointer to attempt to resolve from. + * @return A usable SimGroup structure to manipulate. + */ + SimGroup GetSimGroupPointer(UnresolvedObject obj); + + + //! Structure representing a FlyingVehicle in the game. + typedef struct + { + //! Strafing State. 0=Not Strafing. -1=Strafing Left. 1=Strafing Right (readonly, writing it doesn't do anything) + const float &strafing_state; + } FlyingVehicle; + + /** + * @brief Returns a usable FlyingVehicle structure from a void + * pointer. + * @param obj A void pointer to attempt to resolve from. + * @return A usable FlyingVehicle structure to manipulate. + */ + FlyingVehicle GetFlyingVehiclePointer(UnresolvedObject obj); + + void Projectile_explode(Projectile *obj, const Point3F &position, const Point3F &normal, const unsigned int collideType); +} \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/DXConCmds.cpp b/Mod Sources/TSExtension/BaseMod/DXConCmds.cpp new file mode 100644 index 0000000..1c0ad1f --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/DXConCmds.cpp @@ -0,0 +1,58 @@ +/** + * + */ + +#include "LinkerAPI.h" +#include "DXAPI.h" + +const char *conGetAddress(SimObject *obj, S32 argc, const char *argv[]) +{ + // Hmm... + char result[256]; + sprintf(result, "%x", obj); + return result; +} + +const char *conPlayerSetZ(SimObject *obj, S32 argc, const char *argv[]) +{ + DX::Player test = DX::GetPlayerPointer(obj); + test.position_y = 100; + test.position_z = 300; + test.position_x = 500; + + char result[256]; + sprintf(result, "LOL"); + return result; +} + +bool conPlayerGetJumpingState(SimObject *obj, S32 argc, const char* argv[]) +{ + DX::Player operand = DX::GetPlayerPointer(obj); + + return operand.is_jumping; +} + +bool conPlayerGetJettingState(SimObject *obj, S32 argc, const char* argv[]) +{ + DX::Player operand = DX::GetPlayerPointer(obj); + + return operand.is_jetting; +} + +bool conProjectileExplode(SimObject *obj, S32 argc, const char* argv[]) +{ + Point3F position; + position.x = 0; + position.y = 0; + position.z = 0; + + Point3F normal; + normal.x = 0; + normal.y = 0; + normal.z = 0; + + unsigned int collideType = atoi(argv[4]); + DX::Projectile_explode((DX::Projectile*)obj, position, normal, collideType); + + return true; +} \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/DXConCmds.h b/Mod Sources/TSExtension/BaseMod/DXConCmds.h new file mode 100644 index 0000000..ea7b392 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/DXConCmds.h @@ -0,0 +1,29 @@ +/** + * @brief The DXAPI is an API that allows you to manipulate various game objects + * in Tribes 2 from raw C++ code. It dynamically resolves the addresses of member + * variables as you can't really trust the compiler to produce binary compatible classes, + * especially with all the inheritance involved in the original Tribes 2 codebase. + * + * This code wouldn't be possible without Linker's original gift on the-construct.net forums, + * whose files are appropriately labeled in this codebase. + * + * @copyright (c) 2014 Robert MacGregor + */ + +#pragma once + +#include "stdafx.h" +#include "LinkerAPI.h" + +// Returns the address of an object in memory +const char* conGetAddress(SimObject *obj, S32 argc, const char *argv[]); + +// Player Commands ----------------------------------- +bool conPlayerGetJumpingState(SimObject *obj, S32 argc, const char* argv[]); +bool conPlayerGetJettingState(SimObject *obj, S32 argc, const char* argv[]); + +// Projectile explode +bool conProjectileExplode(SimObject *obj, S32 argc, const char* argv[]); + +// Tests Position Z +const char *conPlayerSetZ(SimObject *obj, S32 argc, const char *argv[]); \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/LinkerAPI.cpp b/Mod Sources/TSExtension/BaseMod/LinkerAPI.cpp new file mode 100644 index 0000000..98f0743 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/LinkerAPI.cpp @@ -0,0 +1,86 @@ +#include "LinkerAPI.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; \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/LinkerAPI.h b/Mod Sources/TSExtension/BaseMod/LinkerAPI.h new file mode 100644 index 0000000..9b0158a --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/LinkerAPI.h @@ -0,0 +1,119 @@ +// Linker's Tribes 2 API + +#pragma once + +//api stuff + +typedef unsigned int U32; +typedef int S32; +typedef float F32; + +typedef unsigned int dsize_t; +#include + +//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; +}; + +struct 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: + Point3F(F32 *x, F32 *y, F32 *z) + { + this->x = x; + this->y = y; + this->z = z; + } + + Point3F(void) + { + this->x = 0; + this->y = 0; + this->z = 0; + } + + F32 *x; + F32 *y; + F32 *z; +}; + + +//GuiTSCtrl +class GuiTSCtrl {}; +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[]); + + +//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/TSExtension/BaseMod/ReadMe.txt b/Mod Sources/TSExtension/BaseMod/ReadMe.txt new file mode 100644 index 0000000..59d4e6e --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/ReadMe.txt @@ -0,0 +1,40 @@ +======================================================================== + DYNAMIC LINK LIBRARY : BaseMod Project Overview +======================================================================== + +AppWizard has created this BaseMod DLL for you. + +This file contains a summary of what you will find in each of the files that +make up your BaseMod application. + + +BaseMod.vcxproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +BaseMod.vcxproj.filters + This is the filters file for VC++ projects generated using an Application Wizard. + It contains information about the association between the files in your project + and the filters. This association is used in the IDE to show grouping of files with + similar extensions under a specific node (for e.g. ".cpp" files are associated with the + "Source Files" filter). + +BaseMod.cpp + This is the main DLL source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named BaseMod.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Mod Sources/TSExtension/BaseMod/Release/BaseMod.Build.CppClean.log b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.Build.CppClean.log new file mode 100644 index 0000000..cfcfd0e --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.Build.CppClean.log @@ -0,0 +1,31 @@ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\BASEMOD.DLL.INTERMEDIATE.MANIFEST +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\BASEMOD.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\BASEMOD.PCH +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\DLLMAIN.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\STDAFX.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\BASEMOD\RELEASE\VC100.PDB +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\RELEASE\BASEMOD.DLL +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\BaseMod\Release\BaseMod.lib +C:\USERS\ROBERT MACGREGOR\DESKTOP\BASEMOD\RELEASE\BASEMOD.PDB +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\BASEMOD\RELEASE\BASEMOD.DLL.INTERMEDIATE.MANIFEST +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\BASEMOD\RELEASE\BASEMOD.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\BASEMOD\RELEASE\BASEMOD.PCH +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\BaseMod.vcxprojResolveAssemblyReference.cache +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\BaseMod.write.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\cl.command.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\CL.read.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\CL.write.1.tlog +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\BASEMOD\RELEASE\DLLMAIN.OBJ +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\link.command.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\link.read.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\link.write.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\mt.command.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\mt.read.1.tlog +C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\Release\mt.write.1.tlog +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\BASEMOD\RELEASE\STDAFX.OBJ +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\BASEMOD\RELEASE\VC100.PDB +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\RELEASE\BASEMOD.DLL +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\USERS\ROBERT MACGREGOR\DESKTOP\TSEXTENSION\RELEASE\BASEMOD.PDB diff --git a/Mod Sources/TSExtension/BaseMod/Release/BaseMod.dll.intermediate.manifest b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.dll.intermediate.manifest new file mode 100644 index 0000000..1c06b61 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.dll.intermediate.manifest @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/Mod Sources/TSExtension/BaseMod/Release/BaseMod.lastbuildstate b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.lastbuildstate new file mode 100644 index 0000000..09f1a56 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.lastbuildstate @@ -0,0 +1,2 @@ +#v4.0:v100 +Release|Win32|C:\Users\Robert MacGregor\Desktop\TSExtension\| diff --git a/Mod Sources/TSExtension/BaseMod/Release/BaseMod.log b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.log new file mode 100644 index 0000000..6a5109e --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.log @@ -0,0 +1,38 @@ +Build started 8/4/2014 9:12:36 PM. + 1>Project "C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj" on node 2 (build target(s)). + 1>InitializeBuildStatus: + Touching "Release\BaseMod.unsuccessfulbuild". + ClCompile: + All outputs are up-to-date. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\CL.exe /c /Zi /nologo /W3 /WX- /O2 /Oi /Oy- /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL /D BASEMOD_EXPORTS /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MD /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Fo"Release\\" /Fd"Release\vc100.pdb" /Gd /TP /analyze- /errorReport:prompt BaseMod.cpp DXAPI.cpp DXConCmds.cpp + BaseMod.cpp + DXAPI.cpp + DXConCmds.cpp + 1>DXConCmds.cpp(12): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf' + 1>DXConCmds.cpp(13): warning C4172: returning address of local variable or temporary + 1>DXConCmds.cpp(24): warning C4996: 'sprintf': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\stdio.h(371) : see declaration of 'sprintf' + 1>DXConCmds.cpp(25): warning C4172: returning address of local variable or temporary + All outputs are up-to-date. + Link: + C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe /ERRORREPORT:PROMPT /OUT:"C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.dll" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /ManifestFile:"Release\BaseMod.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG /PDB:"C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /LTCG /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib" /MACHINE:X86 /DLL Release\BaseMod.obj + Release\dllmain.obj + Release\DXAPI.obj + Release\DXConCmds.obj + Release\LinkerAPI.obj + Release\stdafx.obj + Creating library C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib and object C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp + Generating code + Finished generating code + BaseMod.vcxproj -> C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.dll + Manifest: + C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\bin\mt.exe /nologo /verbose /outputresource:"C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.dll;#2" /manifest Release\BaseMod.dll.intermediate.manifest + FinalizeBuildStatus: + Deleting file "Release\BaseMod.unsuccessfulbuild". + Touching "Release\BaseMod.lastbuildstate". + 1>Done Building Project "C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj" (build target(s)). + +Build succeeded. + +Time Elapsed 00:00:02.12 diff --git a/Mod Sources/TSExtension/BaseMod/Release/BaseMod.pch b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.pch new file mode 100644 index 0000000..cfc7243 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.pch differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/BaseMod.write.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.write.1.tlog new file mode 100644 index 0000000..e7c5982 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/Release/BaseMod.write.1.tlog @@ -0,0 +1,25 @@ +^C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +^C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +^C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +^C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +^C:\Users\Robert MacGregor\Desktop\TSExtension\BaseMod\BaseMod.vcxproj +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.lib +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp +C:\Users\Robert MacGregor\Desktop\TSExtension\Release\BaseMod.exp diff --git a/Mod Sources/TSExtension/BaseMod/Release/CL.read.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/CL.read.1.tlog new file mode 100644 index 0000000..bd802bd Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/CL.read.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/CL.write.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/CL.write.1.tlog new file mode 100644 index 0000000..9e1fc97 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/CL.write.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/cl.command.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/cl.command.1.tlog new file mode 100644 index 0000000..5f56e41 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/cl.command.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/link.command.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/link.command.1.tlog new file mode 100644 index 0000000..7ad355b Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/link.command.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/link.read.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/link.read.1.tlog new file mode 100644 index 0000000..ba3c23a Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/link.read.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/link.write.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/link.write.1.tlog new file mode 100644 index 0000000..f04c776 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/link.write.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/mt.command.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/mt.command.1.tlog new file mode 100644 index 0000000..dbab3a9 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/mt.command.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/mt.read.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/mt.read.1.tlog new file mode 100644 index 0000000..e245ed4 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/mt.read.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/mt.write.1.tlog b/Mod Sources/TSExtension/BaseMod/Release/mt.write.1.tlog new file mode 100644 index 0000000..ad4fa68 Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/mt.write.1.tlog differ diff --git a/Mod Sources/TSExtension/BaseMod/Release/vc100.pdb b/Mod Sources/TSExtension/BaseMod/Release/vc100.pdb new file mode 100644 index 0000000..5eac75b Binary files /dev/null and b/Mod Sources/TSExtension/BaseMod/Release/vc100.pdb differ diff --git a/Mod Sources/TSExtension/BaseMod/dllmain.cpp b/Mod Sources/TSExtension/BaseMod/dllmain.cpp new file mode 100644 index 0000000..8a4edd3 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/dllmain.cpp @@ -0,0 +1,19 @@ +// dllmain.cpp : Defines the entry point for the DLL application. +#include "stdafx.h" + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) +{ + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; +} + diff --git a/Mod Sources/TSExtension/BaseMod/stdafx.cpp b/Mod Sources/TSExtension/BaseMod/stdafx.cpp new file mode 100644 index 0000000..866f2bd --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/stdafx.cpp @@ -0,0 +1,8 @@ +// stdafx.cpp : source file that includes just the standard includes +// BaseMod.pch will be the pre-compiled header +// stdafx.obj will contain the pre-compiled type information + +#include "stdafx.h" + +// TODO: reference any additional headers you need in STDAFX.H +// and not in this file diff --git a/Mod Sources/TSExtension/BaseMod/stdafx.h b/Mod Sources/TSExtension/BaseMod/stdafx.h new file mode 100644 index 0000000..c02bb95 --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/stdafx.h @@ -0,0 +1,12 @@ +// stdafx.h : include file for standard system include files, +// or project specific include files that are used frequently, but +// are changed infrequently +// + +#pragma once + +#include "targetver.h" + +#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers +// Windows Header Files: +#include \ No newline at end of file diff --git a/Mod Sources/TSExtension/BaseMod/targetver.h b/Mod Sources/TSExtension/BaseMod/targetver.h new file mode 100644 index 0000000..90e767b --- /dev/null +++ b/Mod Sources/TSExtension/BaseMod/targetver.h @@ -0,0 +1,8 @@ +#pragma once + +// Including SDKDDKVer.h defines the highest available Windows platform. + +// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and +// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. + +#include diff --git a/Mod Sources/TSExtension/Release/BaseMod.exp b/Mod Sources/TSExtension/Release/BaseMod.exp new file mode 100644 index 0000000..2b20dfb Binary files /dev/null and b/Mod Sources/TSExtension/Release/BaseMod.exp differ diff --git a/Mod Sources/TSExtension/Release/BaseMod.pdb b/Mod Sources/TSExtension/Release/BaseMod.pdb new file mode 100644 index 0000000..9ae28a5 Binary files /dev/null and b/Mod Sources/TSExtension/Release/BaseMod.pdb differ diff --git a/Mod Sources/TSExtension/ipch/basemod-a53d8d4a/basemod-c8c26461.ipch b/Mod Sources/TSExtension/ipch/basemod-a53d8d4a/basemod-c8c26461.ipch new file mode 100644 index 0000000..b41c6e2 Binary files /dev/null and b/Mod Sources/TSExtension/ipch/basemod-a53d8d4a/basemod-c8c26461.ipch differ diff --git a/ModLoader b/ModLoader new file mode 160000 index 0000000..3e7e0a1 --- /dev/null +++ b/ModLoader @@ -0,0 +1 @@ +Subproject commit 3e7e0a16cc1826031505b2d7a71e1dafa6624ca9