mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-07-16 01:34:32 +00:00
Cleaned up the repo and removed useless files
This commit is contained in:
parent
9e5c764dce
commit
83b8016a30
52 changed files with 1288 additions and 1606 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -6,4 +6,5 @@
|
||||||
*.log
|
*.log
|
||||||
*.pch
|
*.pch
|
||||||
*.pdb
|
*.pdb
|
||||||
*.tlog
|
*.tlog
|
||||||
|
*.sdf
|
||||||
Binary file not shown.
|
|
@ -1,8 +0,0 @@
|
||||||
// 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 )
|
|
||||||
|
|
@ -39,13 +39,15 @@
|
||||||
<PropertyGroup Label="UserMacros" />
|
<PropertyGroup Label="UserMacros" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<LinkIncremental>true</LinkIncremental>
|
||||||
|
<IncludePath>include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
|
<IncludePath>include;$(IncludePath)</IncludePath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<Optimization>Disabled</Optimization>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
|
|
@ -58,7 +60,7 @@
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<ClCompile>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
|
|
@ -72,27 +74,8 @@
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ReadMe.txt" />
|
<ClCompile Include="source\BaseMod.cpp" />
|
||||||
</ItemGroup>
|
<ClCompile Include="source\dllmain.cpp" />
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="BaseMod.h" />
|
|
||||||
<ClInclude Include="stdafx.h" />
|
|
||||||
<ClInclude Include="targetver.h" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="BaseMod.cpp" />
|
|
||||||
<ClCompile Include="dllmain.cpp">
|
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
|
||||||
</PrecompiledHeader>
|
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="stdafx.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|
|
||||||
|
|
@ -15,27 +15,10 @@
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ReadMe.txt" />
|
<ClCompile Include="source\dllmain.cpp">
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClInclude Include="stdafx.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="targetver.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="BaseMod.h">
|
|
||||||
<Filter>Header Files</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<ClCompile Include="stdafx.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="BaseMod.cpp">
|
<ClCompile Include="source\BaseMod.cpp">
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="dllmain.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
========================================================================
|
|
||||||
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.
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
@ -1,13 +1,10 @@
|
||||||
// BaseMod.cpp : Defines the exported functions for the DLL application.
|
// BaseMod.cpp : Defines the exported functions for the DLL application.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
extern "C"
|
||||||
#include "BaseMod.h"
|
{
|
||||||
|
__declspec(dllexport) void ModInitialize(void)
|
||||||
extern "C"
|
{
|
||||||
{
|
return;
|
||||||
BASEMOD_API void ModInitialize(void)
|
}
|
||||||
{
|
}
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
#include "stdafx.h"
|
|
||||||
|
#include <SDKDDKVer.h>
|
||||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
#include <Windows.h>
|
||||||
DWORD ul_reason_for_call,
|
|
||||||
LPVOID lpReserved
|
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||||
)
|
DWORD ul_reason_for_call,
|
||||||
{
|
LPVOID lpReserved
|
||||||
switch (ul_reason_for_call)
|
)
|
||||||
{
|
{
|
||||||
case DLL_PROCESS_ATTACH:
|
switch (ul_reason_for_call)
|
||||||
case DLL_THREAD_ATTACH:
|
{
|
||||||
case DLL_THREAD_DETACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_THREAD_ATTACH:
|
||||||
break;
|
case DLL_THREAD_DETACH:
|
||||||
}
|
case DLL_PROCESS_DETACH:
|
||||||
return TRUE;
|
break;
|
||||||
}
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
// 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
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
// 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 <windows.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: reference additional headers your program requires here
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#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 <SDKDDKVer.h>
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
========================================================================
|
|
||||||
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.
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
// 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
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
// 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 <time.h>
|
|
||||||
#include <windows.h>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// TODO: reference additional headers your program requires here
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#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 <SDKDDKVer.h>
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual C++ Express 2010
|
# Visual C++ Express 2010
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseMod", "BaseMod\BaseMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RandomMod", "RandomMod\RandomMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,106 +1,93 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<ItemGroup>
|
||||||
<ProjectGuid>{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}</ProjectGuid>
|
<ClCompile Include="source\BaseMod.cpp" />
|
||||||
<Keyword>Win32Proj</Keyword>
|
<ClCompile Include="source\dllmain.cpp" />
|
||||||
<RootNamespace>BaseMod</RootNamespace>
|
<ClCompile Include="source\mt.cc" />
|
||||||
</PropertyGroup>
|
<ClCompile Include="source\randomCmds.cpp" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
<ClCompile Include="source\t2api.cpp" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
</ItemGroup>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ItemGroup>
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<ClInclude Include="include\BaseMod.h" />
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<ClInclude Include="include\mt.h" />
|
||||||
</PropertyGroup>
|
<ClInclude Include="include\randomCmds.h" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<ClInclude Include="include\t2api.h" />
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
</ItemGroup>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<PropertyGroup Label="Globals">
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<ProjectGuid>{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}</ProjectGuid>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<Keyword>Win32Proj</Keyword>
|
||||||
</PropertyGroup>
|
<RootNamespace>BaseMod</RootNamespace>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<ProjectName>RandomMod</ProjectName>
|
||||||
<ImportGroup Label="ExtensionSettings">
|
</PropertyGroup>
|
||||||
</ImportGroup>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</ImportGroup>
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
</PropertyGroup>
|
||||||
</ImportGroup>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<PropertyGroup Label="UserMacros" />
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
</PropertyGroup>
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
</PropertyGroup>
|
||||||
<LinkIncremental>false</LinkIncremental>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
</PropertyGroup>
|
<ImportGroup Label="ExtensionSettings">
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
</ImportGroup>
|
||||||
<ClCompile>
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<WarningLevel>Level3</WarningLevel>
|
</ImportGroup>
|
||||||
<Optimization>Disabled</Optimization>
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
</ClCompile>
|
</ImportGroup>
|
||||||
<Link>
|
<PropertyGroup Label="UserMacros" />
|
||||||
<SubSystem>Windows</SubSystem>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
</Link>
|
<IncludePath>include;$(IncludePath)</IncludePath>
|
||||||
</ItemDefinitionGroup>
|
</PropertyGroup>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<ClCompile>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<IncludePath>include;$(IncludePath)</IncludePath>
|
||||||
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
</PropertyGroup>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<ClCompile>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
</ClCompile>
|
<Optimization>Disabled</Optimization>
|
||||||
<Link>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<SubSystem>Windows</SubSystem>
|
</ClCompile>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<Link>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
<SubSystem>Windows</SubSystem>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</Link>
|
</Link>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<ItemGroup>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<None Include="ReadMe.txt" />
|
<ClCompile>
|
||||||
</ItemGroup>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<ItemGroup>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<ClInclude Include="BaseMod.h" />
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<ClInclude Include="DXAPI.h" />
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<ClInclude Include="DXConCmds.h" />
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<ClInclude Include="LinkerAPI.h" />
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ClInclude Include="stdafx.h" />
|
</ClCompile>
|
||||||
<ClInclude Include="targetver.h" />
|
<Link>
|
||||||
</ItemGroup>
|
<SubSystem>Windows</SubSystem>
|
||||||
<ItemGroup>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<ClCompile Include="BaseMod.cpp" />
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<ClCompile Include="dllmain.cpp">
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
</Link>
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
</ItemDefinitionGroup>
|
||||||
</PrecompiledHeader>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
<ImportGroup Label="ExtensionTargets">
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
</ImportGroup>
|
||||||
</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="DXAPI.cpp" />
|
|
||||||
<ClCompile Include="DXConCmds.cpp" />
|
|
||||||
<ClCompile Include="LinkerAPI.cpp" />
|
|
||||||
<ClCompile Include="stdafx.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,60 +1,48 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
<Filter Include="Resource Files">
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ReadMe.txt" />
|
<ClCompile Include="source\BaseMod.cpp">
|
||||||
</ItemGroup>
|
<Filter>Source Files</Filter>
|
||||||
<ItemGroup>
|
</ClCompile>
|
||||||
<ClInclude Include="stdafx.h">
|
<ClCompile Include="source\t2api.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="targetver.h">
|
<ClCompile Include="source\dllmain.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="BaseMod.h">
|
<ClCompile Include="source\mt.cc">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="mt.h">
|
<ClCompile Include="source\randomCmds.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="t2api.h">
|
</ItemGroup>
|
||||||
<Filter>Header Files</Filter>
|
<ItemGroup>
|
||||||
</ClInclude>
|
<ClInclude Include="include\t2api.h">
|
||||||
<ClInclude Include="randomCmds.h">
|
<Filter>Header Files</Filter>
|
||||||
<Filter>Header Files</Filter>
|
</ClInclude>
|
||||||
</ClInclude>
|
<ClInclude Include="include\BaseMod.h">
|
||||||
</ItemGroup>
|
<Filter>Header Files</Filter>
|
||||||
<ItemGroup>
|
</ClInclude>
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClInclude Include="include\mt.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClCompile>
|
</ClInclude>
|
||||||
<ClCompile Include="BaseMod.cpp">
|
<ClInclude Include="include\randomCmds.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClCompile>
|
</ClInclude>
|
||||||
<ClCompile Include="dllmain.cpp">
|
</ItemGroup>
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="mt.cc">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="t2api.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="randomCmds.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
// The following ifdef block is the standard way of creating macros which make exporting
|
// 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
|
// 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
|
// 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
|
// 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
|
// BASEMOD_API functions as being imported from a DLL, whereas this DLL sees symbols
|
||||||
// defined with this macro as being exported.
|
// defined with this macro as being exported.
|
||||||
|
|
||||||
#define BASEMOD_API __declspec( dllexport )
|
#define BASEMOD_API __declspec( dllexport )
|
||||||
|
|
@ -1,14 +1,14 @@
|
||||||
#include "stdafx.h"
|
#include <t2api.h>
|
||||||
|
|
||||||
const char* conGuiTsCtrlProject(SimObject *obj,S32 argc, const char* argv[]);
|
const char* conGuiTsCtrlProject(SimObject *obj,S32 argc, const char* argv[]);
|
||||||
bool conNetObjectSetGhostable(SimObject *obj,S32 argc, const char* argv[]);
|
bool conNetObjectSetGhostable(SimObject *obj,S32 argc, const char* argv[]);
|
||||||
const char* conGetVariable(SimObject *obj,S32 argc, const char* argv[]);
|
const char* conGetVariable(SimObject *obj,S32 argc, const char* argv[]);
|
||||||
|
|
||||||
// Merscenne Random
|
// Merscenne Random
|
||||||
const char *conMRandom(SimObject *obj, S32 argc, const char *argv[]);
|
const char *conMRandom(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
const char *conMSeed(SimObject *obj, S32 argc, const char *argv[]);
|
const char *conMSeed(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[]);
|
const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
|
|
||||||
// Clock
|
// Clock
|
||||||
const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[]);
|
const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[]);
|
const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
|
|
@ -1,109 +1,111 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
void initT2Api();
|
#include <string.h>
|
||||||
|
|
||||||
|
void initT2Api();
|
||||||
//api stuff
|
|
||||||
|
|
||||||
typedef unsigned int U32;
|
//api stuff
|
||||||
typedef int S32;
|
|
||||||
typedef float F32;
|
typedef unsigned int U32;
|
||||||
|
typedef int S32;
|
||||||
typedef unsigned int dsize_t;
|
typedef float F32;
|
||||||
|
|
||||||
//for addvariable
|
typedef unsigned int dsize_t;
|
||||||
#define TypeS32 1
|
|
||||||
#define TypeBool 3
|
//for addvariable
|
||||||
#define TypeF32 5
|
#define TypeS32 1
|
||||||
|
#define TypeBool 3
|
||||||
|
#define TypeF32 5
|
||||||
//dshit
|
|
||||||
inline dsize_t dStrlen(const char *str)
|
|
||||||
{
|
//dshit
|
||||||
return (dsize_t)strlen(str);
|
inline dsize_t dStrlen(const char *str)
|
||||||
}
|
{
|
||||||
|
return (dsize_t)strlen(str);
|
||||||
class Namespace {
|
}
|
||||||
const char* mName;
|
|
||||||
};
|
class Namespace {
|
||||||
|
const char* mName;
|
||||||
|
};
|
||||||
|
|
||||||
class SimObject{
|
|
||||||
SimObject* group;
|
|
||||||
const char* objectName; //04h: objectName
|
class SimObject{
|
||||||
SimObject* nextNameObject; //8
|
SimObject* group;
|
||||||
SimObject* nextManagerNameObject; //c
|
const char* objectName; //04h: objectName
|
||||||
SimObject* nextIdObject; //10h: nextIdObject
|
SimObject* nextNameObject; //8
|
||||||
U32 stuff; //14
|
SimObject* nextManagerNameObject; //c
|
||||||
U32 mFlags; //18h
|
SimObject* nextIdObject; //10h: nextIdObject
|
||||||
U32 mNotifyList; //actually a pointer
|
U32 stuff; //14
|
||||||
U32 mId; //20h: mId
|
U32 mFlags; //18h
|
||||||
//more stuff
|
U32 mNotifyList; //actually a pointer
|
||||||
};
|
U32 mId; //20h: mId
|
||||||
|
//more stuff
|
||||||
class SimIdDictionary
|
};
|
||||||
{
|
|
||||||
enum
|
class SimIdDictionary
|
||||||
{
|
{
|
||||||
DefaultTableSize = 4096,
|
enum
|
||||||
TableBitMask = 4095
|
{
|
||||||
};
|
DefaultTableSize = 4096,
|
||||||
SimObject *table[DefaultTableSize];
|
TableBitMask = 4095
|
||||||
};
|
};
|
||||||
extern SimIdDictionary* gIdDictionary;
|
SimObject *table[DefaultTableSize];
|
||||||
|
};
|
||||||
class Point3F
|
extern SimIdDictionary* gIdDictionary;
|
||||||
{
|
|
||||||
public:
|
class Point3F
|
||||||
F32 x;
|
{
|
||||||
F32 y;
|
public:
|
||||||
F32 z;
|
F32 x;
|
||||||
};
|
F32 y;
|
||||||
|
F32 z;
|
||||||
|
};
|
||||||
//GuiTSCtrl
|
|
||||||
class GuiTSCtrl {};
|
|
||||||
class HoverVehicle {};
|
//GuiTSCtrl
|
||||||
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest); //fake
|
class GuiTSCtrl {};
|
||||||
|
class HoverVehicle {};
|
||||||
|
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest); //fake
|
||||||
namespace Sim {
|
|
||||||
extern SimObject* (*findObject)(U32 id);
|
|
||||||
}
|
namespace Sim {
|
||||||
|
extern SimObject* (*findObject)(U32 id);
|
||||||
|
}
|
||||||
//console
|
|
||||||
|
|
||||||
typedef const char * (*StringCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
//console
|
||||||
typedef S32 (*IntCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
|
||||||
typedef F32 (*FloatCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
typedef const char * (*StringCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
typedef void (*VoidCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
typedef S32 (*IntCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
typedef bool (*BoolCallback)(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 void (*someTest)(void);
|
||||||
|
//functions
|
||||||
extern char * (*getReturnBuffer)(U32 bufferSize);
|
namespace Con{
|
||||||
|
|
||||||
extern void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs);
|
extern char * (*getReturnBuffer)(U32 bufferSize);
|
||||||
extern void (*addMethodS)(const char *nsName, const char *name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs);
|
|
||||||
|
extern void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs);
|
||||||
extern bool (*addVariable)(const char *name, S32 t, void *dp);
|
extern void (*addMethodS)(const char *nsName, const char *name, StringCallback cb, const char *usage, S32 minArgs, S32 maxArgs);
|
||||||
|
|
||||||
extern void (*printf)(const char* fmt,...);
|
extern bool (*addVariable)(const char *name, S32 t, void *dp);
|
||||||
extern void (*errorf)(U32 type, const char* fmt,...);
|
|
||||||
|
extern void (*printf)(const char* fmt,...);
|
||||||
extern const char * (*getVariable)(const char *name);
|
extern void (*errorf)(U32 type, const char* fmt,...);
|
||||||
extern const char * (*execute)(S32 argc, const char *argv[]);
|
|
||||||
extern const char * (*executef)(S32 argc, ...);
|
extern const char * (*getVariable)(const char *name);
|
||||||
extern const char * (*executem)(SimObject *object, S32 argc, const char *argv[]);
|
extern const char * (*execute)(S32 argc, const char *argv[]);
|
||||||
extern const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf);
|
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, ...);
|
//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);
|
extern bool (*dAtob)(const char *str);
|
||||||
|
|
@ -1,22 +1,21 @@
|
||||||
// BaseMod.cpp : Defines the exported functions for the DLL application.
|
// BaseMod.cpp : Defines the exported functions for the DLL application.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include "BaseMod.h"
|
||||||
#include "BaseMod.h"
|
|
||||||
|
#include "t2api.h"
|
||||||
#include "t2api.h"
|
#include "randomCmds.h"
|
||||||
#include "randomCmds.h"
|
|
||||||
|
extern "C"
|
||||||
extern "C"
|
{
|
||||||
{
|
BASEMOD_API void ModInitialize(void)
|
||||||
BASEMOD_API void ModInitialize(void)
|
{
|
||||||
{
|
Con::addMethodS(NULL,"getRandom",&conMRandom,"Random number generation based upon the Mersenne Twister algorithm.",1,3);
|
||||||
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,"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,"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,"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);
|
||||||
Con::addMethodS(NULL,"QPCEnd",&conQPCEnd,"Ends the performance counter and returns the time in seconds.",2,2);
|
|
||||||
|
return;
|
||||||
return;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
#include "stdafx.h"
|
#include <SDKDDKVer.h>
|
||||||
|
#include <Windows.h>
|
||||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
|
||||||
DWORD ul_reason_for_call,
|
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||||
LPVOID lpReserved
|
DWORD ul_reason_for_call,
|
||||||
)
|
LPVOID lpReserved
|
||||||
{
|
)
|
||||||
switch (ul_reason_for_call)
|
{
|
||||||
{
|
switch (ul_reason_for_call)
|
||||||
case DLL_PROCESS_ATTACH:
|
{
|
||||||
case DLL_THREAD_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
case DLL_THREAD_DETACH:
|
case DLL_THREAD_ATTACH:
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_THREAD_DETACH:
|
||||||
break;
|
case DLL_PROCESS_DETACH:
|
||||||
}
|
break;
|
||||||
return TRUE;
|
}
|
||||||
}
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -47,11 +47,10 @@
|
||||||
email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
|
email: m-mat @ math.sci.hiroshima-u.ac.jp (remove space)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stdafx.h"
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "mt.h"
|
#include <mt.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
|
|
@ -1,169 +1,173 @@
|
||||||
#include "stdafx.h"
|
#include <SDKDDKVer.h>
|
||||||
#include <math.h>
|
#include <Windows.h>
|
||||||
#include <cstdlib>
|
|
||||||
#include <stdio.h>
|
#include <math.h>
|
||||||
#include "mt.h"
|
#include <cstdlib>
|
||||||
|
#include <stdio.h>
|
||||||
#include "t2api.h"
|
#include <time.h>
|
||||||
|
|
||||||
// Merscenne Twister
|
#include "mt.h"
|
||||||
MersenneTwister *mt = NULL;
|
|
||||||
const char *conMRandom(SimObject *obj, S32 argc, const char *argv[])
|
#include "t2api.h"
|
||||||
{
|
|
||||||
if (!mt)
|
// Merscenne Twister
|
||||||
{
|
MersenneTwister *mt = NULL;
|
||||||
mt = new MersenneTwister;
|
const char *conMRandom(SimObject *obj, S32 argc, const char *argv[])
|
||||||
mt->init_genrand(time(NULL));
|
{
|
||||||
}
|
if (!mt)
|
||||||
|
{
|
||||||
char mem[256];
|
mt = new MersenneTwister;
|
||||||
memset(mem, 0x00, 255);
|
mt->init_genrand(time(NULL));
|
||||||
if (argc == 1)
|
}
|
||||||
{
|
|
||||||
sprintf_s(mem, 256, "%f", mt->random());
|
char mem[256];
|
||||||
return mem;
|
memset(mem, 0x00, 255);
|
||||||
}
|
if (argc == 1)
|
||||||
|
{
|
||||||
char *a_c = (char*)argv[1];
|
sprintf_s(mem, 256, "%f", mt->random());
|
||||||
char *b_c;
|
return mem;
|
||||||
if (argc == 3)
|
}
|
||||||
b_c = (char*)argv[2];
|
|
||||||
else if (argc == 2)
|
char *a_c = (char*)argv[1];
|
||||||
{
|
char *b_c;
|
||||||
b_c = a_c;
|
if (argc == 3)
|
||||||
a_c = "0";
|
b_c = (char*)argv[2];
|
||||||
}
|
else if (argc == 2)
|
||||||
|
{
|
||||||
int a = atoi(a_c);
|
b_c = a_c;
|
||||||
int b = atoi(b_c);
|
a_c = "0";
|
||||||
|
}
|
||||||
// Check to see if we have any negative arguments
|
|
||||||
if (a < 0)
|
int a = atoi(a_c);
|
||||||
{
|
int b = atoi(b_c);
|
||||||
int max = b + abs(a);
|
|
||||||
int rand = mt->genrand_int32() % (max);
|
// Check to see if we have any negative arguments
|
||||||
if (rand > b)
|
if (a < 0)
|
||||||
rand = -(rand-b);
|
{
|
||||||
sprintf_s(mem, 256, "%d", rand);
|
int max = b + abs(a);
|
||||||
return mem;
|
int rand = mt->genrand_int32() % (max);
|
||||||
}
|
if (rand > b)
|
||||||
|
rand = -(rand-b);
|
||||||
sprintf_s(mem, 256, "%f", floor(mt->random() * b + a));
|
sprintf_s(mem, 256, "%d", rand);
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[])
|
sprintf_s(mem, 256, "%f", floor(mt->random() * b + a));
|
||||||
{
|
return mem;
|
||||||
if (!mt)
|
}
|
||||||
{
|
|
||||||
mt = new MersenneTwister;
|
const char *conMRandomFloat(SimObject *obj, S32 argc, const char *argv[])
|
||||||
mt->init_genrand(time(NULL));
|
{
|
||||||
}
|
if (!mt)
|
||||||
|
{
|
||||||
char mem[256];
|
mt = new MersenneTwister;
|
||||||
memset(mem, 0x00, 255);
|
mt->init_genrand(time(NULL));
|
||||||
if (argc == 1)
|
}
|
||||||
{
|
|
||||||
sprintf_s(mem, 256, "%f", mt->random());
|
char mem[256];
|
||||||
return mem;
|
memset(mem, 0x00, 255);
|
||||||
}
|
if (argc == 1)
|
||||||
|
{
|
||||||
char *a_c = (char*)argv[1];
|
sprintf_s(mem, 256, "%f", mt->random());
|
||||||
char *b_c;
|
return mem;
|
||||||
if (argc == 3)
|
}
|
||||||
b_c = (char*)argv[2];
|
|
||||||
else if (argc == 2)
|
char *a_c = (char*)argv[1];
|
||||||
{
|
char *b_c;
|
||||||
b_c = a_c;
|
if (argc == 3)
|
||||||
a_c = "0";
|
b_c = (char*)argv[2];
|
||||||
}
|
else if (argc == 2)
|
||||||
|
{
|
||||||
float a = atof(a_c);
|
b_c = a_c;
|
||||||
float b = atof(b_c);
|
a_c = "0";
|
||||||
if (a > b)
|
}
|
||||||
{
|
|
||||||
int d = b;
|
float a = atof(a_c);
|
||||||
b = a;
|
float b = atof(b_c);
|
||||||
a = d;
|
if (a > b)
|
||||||
}
|
{
|
||||||
|
int d = b;
|
||||||
sprintf_s(mem, 256, "%f", mt->random() * b + a);
|
b = a;
|
||||||
return mem;
|
a = d;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *conMSeed(SimObject *obj, S32 argc, const char *argv[])
|
sprintf_s(mem, 256, "%f", mt->random() * b + a);
|
||||||
{
|
return mem;
|
||||||
if (!mt)
|
}
|
||||||
{
|
|
||||||
mt = new MersenneTwister;
|
const char *conMSeed(SimObject *obj, S32 argc, const char *argv[])
|
||||||
mt->init_genrand(time(NULL));
|
{
|
||||||
}
|
if (!mt)
|
||||||
const char *a_c = argv[1];
|
{
|
||||||
|
mt = new MersenneTwister;
|
||||||
unsigned long a = 0;
|
mt->init_genrand(time(NULL));
|
||||||
unsigned int len = strlen(a_c);
|
}
|
||||||
for (unsigned int i = 0; i < len; i++)
|
const char *a_c = argv[1];
|
||||||
if ( a_c[i] > 57 || a_c[i] < 48)
|
|
||||||
{
|
unsigned long a = 0;
|
||||||
mt->init_by_array((unsigned long*)a_c, len+1);
|
unsigned int len = strlen(a_c);
|
||||||
return "1";
|
for (unsigned int i = 0; i < len; i++)
|
||||||
}
|
if ( a_c[i] > 57 || a_c[i] < 48)
|
||||||
|
{
|
||||||
a = atof(a_c);
|
mt->init_by_array((unsigned long*)a_c, len+1);
|
||||||
mt->init_genrand(a);
|
return "1";
|
||||||
return "1";
|
}
|
||||||
}
|
|
||||||
|
a = atof(a_c);
|
||||||
|
mt->init_genrand(a);
|
||||||
#define QPC_MAX_STOPWATCHES 20
|
return "1";
|
||||||
|
}
|
||||||
static unsigned int CURRENT_STOPWATCH_COUNT = 0;
|
|
||||||
static __int64 QPC_STOPWATCHES[QPC_MAX_STOPWATCHES];
|
|
||||||
|
#define QPC_MAX_STOPWATCHES 20
|
||||||
__int64 STARTING_QPC_TIME;
|
|
||||||
const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[])
|
static unsigned int CURRENT_STOPWATCH_COUNT = 0;
|
||||||
{
|
static __int64 QPC_STOPWATCHES[QPC_MAX_STOPWATCHES];
|
||||||
if (!QueryPerformanceCounter((LARGE_INTEGER*)&QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT]))
|
|
||||||
{
|
__int64 STARTING_QPC_TIME;
|
||||||
Con::errorf(0, "QPCBegin(): Failed to start timer! (%u)", GetLastError());
|
const char*conQPCBegin(SimObject *obj, S32 argc, const char *argv[])
|
||||||
return "-1";
|
{
|
||||||
}
|
if (!QueryPerformanceCounter((LARGE_INTEGER*)&QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT]))
|
||||||
else if (CURRENT_STOPWATCH_COUNT >= QPC_MAX_STOPWATCHES)
|
{
|
||||||
{
|
Con::errorf(0, "QPCBegin(): Failed to start timer! (%u)", GetLastError());
|
||||||
Con::errorf(0, "QPCBegin(): Too many stopwatches active! (Maximum: %u)", QPC_MAX_STOPWATCHES);
|
return "-1";
|
||||||
return "-1";
|
}
|
||||||
}
|
else if (CURRENT_STOPWATCH_COUNT >= QPC_MAX_STOPWATCHES)
|
||||||
|
{
|
||||||
unsigned int return_value = CURRENT_STOPWATCH_COUNT;
|
Con::errorf(0, "QPCBegin(): Too many stopwatches active! (Maximum: %u)", QPC_MAX_STOPWATCHES);
|
||||||
char result[256];
|
return "-1";
|
||||||
sprintf_s<256>(result, "%u", return_value);
|
}
|
||||||
|
|
||||||
CURRENT_STOPWATCH_COUNT++;
|
unsigned int return_value = CURRENT_STOPWATCH_COUNT;
|
||||||
|
char result[256];
|
||||||
return result;
|
sprintf_s<256>(result, "%u", return_value);
|
||||||
}
|
|
||||||
|
CURRENT_STOPWATCH_COUNT++;
|
||||||
const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[])
|
|
||||||
{
|
return result;
|
||||||
__int64 ENDING_QPC_TIME;
|
}
|
||||||
if (!QueryPerformanceCounter((LARGE_INTEGER*)&ENDING_QPC_TIME))
|
|
||||||
{
|
const char*conQPCEnd(SimObject *obj, S32 argc, const char *argv[])
|
||||||
Con::errorf(0, "QPCEnd(): Failed to stop timer! (%u)", GetLastError());
|
{
|
||||||
return "-1";
|
__int64 ENDING_QPC_TIME;
|
||||||
}
|
if (!QueryPerformanceCounter((LARGE_INTEGER*)&ENDING_QPC_TIME))
|
||||||
else if (CURRENT_STOPWATCH_COUNT == 0)
|
{
|
||||||
{
|
Con::errorf(0, "QPCEnd(): Failed to stop timer! (%u)", GetLastError());
|
||||||
Con::errorf(0, "QPCEnd(): No stopwatches to stop!");
|
return "-1";
|
||||||
return "-1";
|
}
|
||||||
}
|
else if (CURRENT_STOPWATCH_COUNT == 0)
|
||||||
|
{
|
||||||
__int64 qpc_frequency;
|
Con::errorf(0, "QPCEnd(): No stopwatches to stop!");
|
||||||
QueryPerformanceFrequency((LARGE_INTEGER*)&qpc_frequency);
|
return "-1";
|
||||||
|
}
|
||||||
char result[256];
|
|
||||||
sprintf_s<256>(result, "%f", ((QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT - 1]) - ENDING_QPC_TIME) * 1.0 / qpc_frequency);
|
__int64 qpc_frequency;
|
||||||
|
QueryPerformanceFrequency((LARGE_INTEGER*)&qpc_frequency);
|
||||||
CURRENT_STOPWATCH_COUNT--;
|
|
||||||
|
char result[256];
|
||||||
return result;
|
sprintf_s<256>(result, "%f", ((QPC_STOPWATCHES[CURRENT_STOPWATCH_COUNT - 1]) - ENDING_QPC_TIME) * 1.0 / qpc_frequency);
|
||||||
|
|
||||||
|
CURRENT_STOPWATCH_COUNT--;
|
||||||
|
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
@ -1,86 +1,85 @@
|
||||||
#include "stdafx.h"
|
#include "t2api.h"
|
||||||
#include "t2api.h"
|
|
||||||
|
SimIdDictionary* gIdDictionary = reinterpret_cast<SimIdDictionary*>(0x009E9194);
|
||||||
SimIdDictionary* gIdDictionary = reinterpret_cast<SimIdDictionary*>(0x009E9194);
|
|
||||||
|
//439550
|
||||||
//439550
|
namespace Sim {
|
||||||
namespace Sim {
|
SimObject* (*findObject)(U32 id) =
|
||||||
SimObject* (*findObject)(U32 id) =
|
(SimObject* (_cdecl *)(U32 id) )
|
||||||
(SimObject* (_cdecl *)(U32 id) )
|
0x439550;
|
||||||
0x439550;
|
}
|
||||||
}
|
|
||||||
|
//hackey way to do member functions, ....
|
||||||
//hackey way to do member functions, ....
|
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest) {
|
||||||
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest) {
|
typedef void (__cdecl *projFunc)(const Point3F &pt, Point3F *dest);
|
||||||
typedef void (__cdecl *projFunc)(const Point3F &pt, Point3F *dest);
|
static projFunc p = (projFunc)0x4d0b40;
|
||||||
static projFunc p = (projFunc)0x4d0b40;
|
|
||||||
|
__asm {
|
||||||
__asm {
|
push dest;
|
||||||
push dest;
|
push pt;
|
||||||
push pt;
|
mov ecx,obj;
|
||||||
mov ecx,obj;
|
lea eax, p;
|
||||||
lea eax, p;
|
mov eax, [eax];
|
||||||
mov eax, [eax];
|
call eax;
|
||||||
call eax;
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
namespace Con {
|
||||||
namespace Con {
|
|
||||||
|
char* (*getReturnBuffer)(U32 bufferSize) =
|
||||||
char* (*getReturnBuffer)(U32 bufferSize) =
|
(char *(__cdecl *)(U32))
|
||||||
(char *(__cdecl *)(U32))
|
0x42caa0;
|
||||||
0x42caa0;
|
|
||||||
|
void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs) =
|
||||||
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))
|
||||||
(void (__cdecl *)(const char *, const char *,BoolCallback,const char *,S32,S32))
|
0x426510;
|
||||||
0x426510;
|
|
||||||
|
void (*addMethodS)(const char *, const char *,StringCallback, const char *, S32, S32) =
|
||||||
void (*addMethodS)(const char *, const char *,StringCallback, const char *, S32, S32) =
|
(void (__cdecl *)(const char *,const char *,StringCallback,const char *,S32,S32))
|
||||||
(void (__cdecl *)(const char *,const char *,StringCallback,const char *,S32,S32))
|
0x426410;
|
||||||
0x426410;
|
|
||||||
|
bool (*addVariable)(const char *name, S32 t, void *dp) =
|
||||||
bool (*addVariable)(const char *name, S32 t, void *dp) =
|
(bool (__cdecl *)(const char *name, S32 t, void *dp))
|
||||||
(bool (__cdecl *)(const char *name, S32 t, void *dp))
|
0x4263B0;
|
||||||
0x4263B0;
|
|
||||||
|
const char * (*execute)(S32 argc, const char *argv[]) =
|
||||||
const char * (*execute)(S32 argc, const char *argv[]) =
|
(const char * (__cdecl *)(S32 argc, const char *argv[]))
|
||||||
(const char * (__cdecl *)(S32 argc, const char *argv[]))
|
0x4267A0;
|
||||||
0x4267A0;
|
|
||||||
|
const char * (*executef)(S32 argc, ...) =
|
||||||
const char * (*executef)(S32 argc, ...) =
|
(const char * (__cdecl *)(S32 argc, ...))
|
||||||
(const char * (__cdecl *)(S32 argc, ...))
|
0x4269E0;
|
||||||
0x4269E0;
|
|
||||||
|
const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf) =
|
||||||
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))
|
||||||
(const char * (__cdecl *)(const char* string, bool echo, const char *fileName, bool cf))
|
0x426690;
|
||||||
0x426690;
|
|
||||||
|
const char * (*executem)(SimObject *object, S32 argc, const char *argv[]) =
|
||||||
const char * (*executem)(SimObject *object, S32 argc, const char *argv[]) =
|
(const char * (__cdecl *)(SimObject *object, S32 argc, const char *argv[]))
|
||||||
(const char * (__cdecl *)(SimObject *object, S32 argc, const char *argv[]))
|
0x426800;
|
||||||
0x426800;
|
|
||||||
|
const char * (*getVariable)(const char *name) =
|
||||||
const char * (*getVariable)(const char *name) =
|
(const char * (__cdecl *)(const char *name))
|
||||||
(const char * (__cdecl *)(const char *name))
|
0x4261F0;
|
||||||
0x4261F0;
|
|
||||||
|
void (*printf)(const char* fmt,...) =
|
||||||
void (*printf)(const char* fmt,...) =
|
(void (__cdecl *)(const char* fmt,...))
|
||||||
(void (__cdecl *)(const char* fmt,...))
|
0x425F30;
|
||||||
0x425F30;
|
|
||||||
|
void (*errorf)(U32 type, const char* fmt,...)=
|
||||||
void (*errorf)(U32 type, const char* fmt,...)=
|
(void (__cdecl *)(U32, const char*,...))
|
||||||
(void (__cdecl *)(U32, const char*,...))
|
0x425FB0;
|
||||||
0x425FB0;
|
|
||||||
|
}
|
||||||
}
|
|
||||||
|
int (*dSscanf)(const char *buffer, const char *format, ...) =
|
||||||
int (*dSscanf)(const char *buffer, const char *format, ...) =
|
(int (__cdecl *)(const char *,const char *,...))
|
||||||
(int (__cdecl *)(const char *,const char *,...))
|
0x55b640;
|
||||||
0x55b640;
|
|
||||||
|
int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...) =
|
||||||
int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...) =
|
(int (__cdecl *)(char *,dsize_t,const char *,...))
|
||||||
(int (__cdecl *)(char *,dsize_t,const char *,...))
|
0x55b5e0;
|
||||||
0x55b5e0;
|
|
||||||
|
bool (*dAtob)(const char *str) =
|
||||||
bool (*dAtob)(const char *str) =
|
(bool (__cdecl *)(const char *str))
|
||||||
(bool (__cdecl *)(const char *str))
|
0x55B490;
|
||||||
0x55B490;
|
|
||||||
Binary file not shown.
|
|
@ -1,8 +0,0 @@
|
||||||
// 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 )
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
========================================================================
|
|
||||||
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.
|
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
// 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
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
// 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 <windows.h>
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
#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 <SDKDDKVer.h>
|
|
||||||
Binary file not shown.
Binary file not shown.
|
|
@ -1,20 +1,20 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 11.00
|
Microsoft Visual Studio Solution File, Format Version 11.00
|
||||||
# Visual C++ Express 2010
|
# Visual C++ Express 2010
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BaseMod", "BaseMod\BaseMod.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TSExtension", "TSExtension\TSExtension.vcxproj", "{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Win32 = Debug|Win32
|
Debug|Win32 = Debug|Win32
|
||||||
Release|Win32 = Release|Win32
|
Release|Win32 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.ActiveCfg = Debug|Win32
|
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||||
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.Build.0 = Debug|Win32
|
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Debug|Win32.Build.0 = Debug|Win32
|
||||||
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.ActiveCfg = Release|Win32
|
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.ActiveCfg = Release|Win32
|
||||||
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.Build.0 = Release|Win32
|
{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}.Release|Win32.Build.0 = Release|Win32
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
BIN
Mod Sources/TSExtension/TSExtension.suo
Normal file
BIN
Mod Sources/TSExtension/TSExtension.suo
Normal file
Binary file not shown.
|
|
@ -1,107 +1,92 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup Label="ProjectConfigurations">
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
<ProjectConfiguration Include="Debug|Win32">
|
<ProjectConfiguration Include="Debug|Win32">
|
||||||
<Configuration>Debug</Configuration>
|
<Configuration>Debug</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
<ProjectConfiguration Include="Release|Win32">
|
<ProjectConfiguration Include="Release|Win32">
|
||||||
<Configuration>Release</Configuration>
|
<Configuration>Release</Configuration>
|
||||||
<Platform>Win32</Platform>
|
<Platform>Win32</Platform>
|
||||||
</ProjectConfiguration>
|
</ProjectConfiguration>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Label="Globals">
|
<ItemGroup>
|
||||||
<ProjectGuid>{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}</ProjectGuid>
|
<ClCompile Include="source\BaseMod.cpp" />
|
||||||
<Keyword>Win32Proj</Keyword>
|
<ClCompile Include="source\dllmain.cpp" />
|
||||||
<RootNamespace>BaseMod</RootNamespace>
|
<ClCompile Include="source\DXAPI.cpp" />
|
||||||
<ProjectName>RandomMod</ProjectName>
|
<ClCompile Include="source\DXConCmds.cpp" />
|
||||||
</PropertyGroup>
|
<ClCompile Include="source\LinkerAPI.cpp" />
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
</ItemGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
<ItemGroup>
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ClInclude Include="include\DXAPI.h" />
|
||||||
<UseDebugLibraries>true</UseDebugLibraries>
|
<ClInclude Include="include\DXConCmds.h" />
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<ClInclude Include="include\LinkerAPI.h" />
|
||||||
</PropertyGroup>
|
</ItemGroup>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
<PropertyGroup Label="Globals">
|
||||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
<ProjectGuid>{2A498B2D-84B2-4BBF-9532-EA17E5BA51BB}</ProjectGuid>
|
||||||
<UseDebugLibraries>false</UseDebugLibraries>
|
<Keyword>Win32Proj</Keyword>
|
||||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
<RootNamespace>BaseMod</RootNamespace>
|
||||||
<CharacterSet>Unicode</CharacterSet>
|
<ProjectName>TSExtension</ProjectName>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||||
<ImportGroup Label="ExtensionSettings">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||||
</ImportGroup>
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<UseDebugLibraries>true</UseDebugLibraries>
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
</ImportGroup>
|
</PropertyGroup>
|
||||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||||
</ImportGroup>
|
<UseDebugLibraries>false</UseDebugLibraries>
|
||||||
<PropertyGroup Label="UserMacros" />
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<CharacterSet>Unicode</CharacterSet>
|
||||||
<LinkIncremental>true</LinkIncremental>
|
</PropertyGroup>
|
||||||
</PropertyGroup>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<ImportGroup Label="ExtensionSettings">
|
||||||
<LinkIncremental>false</LinkIncremental>
|
</ImportGroup>
|
||||||
</PropertyGroup>
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<ClCompile>
|
</ImportGroup>
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||||
<Optimization>Disabled</Optimization>
|
</ImportGroup>
|
||||||
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PropertyGroup Label="UserMacros" />
|
||||||
</ClCompile>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<Link>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<SubSystem>Windows</SubSystem>
|
<IncludePath>include;$(IncludePath)</IncludePath>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
</PropertyGroup>
|
||||||
</Link>
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
</ItemDefinitionGroup>
|
<LinkIncremental>false</LinkIncremental>
|
||||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
<IncludePath>include;$(IncludePath)</IncludePath>
|
||||||
<ClCompile>
|
</PropertyGroup>
|
||||||
<WarningLevel>Level3</WarningLevel>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||||
<PrecompiledHeader>Use</PrecompiledHeader>
|
<ClCompile>
|
||||||
<Optimization>MaxSpeed</Optimization>
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
<Optimization>Disabled</Optimization>
|
||||||
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<SubSystem>Windows</SubSystem>
|
<SubSystem>Windows</SubSystem>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
</Link>
|
||||||
<OptimizeReferences>true</OptimizeReferences>
|
</ItemDefinitionGroup>
|
||||||
</Link>
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||||
</ItemDefinitionGroup>
|
<ClCompile>
|
||||||
<ItemGroup>
|
<WarningLevel>Level3</WarningLevel>
|
||||||
<None Include="ReadMe.txt" />
|
<PrecompiledHeader>NotUsing</PrecompiledHeader>
|
||||||
</ItemGroup>
|
<Optimization>MaxSpeed</Optimization>
|
||||||
<ItemGroup>
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||||
<ClInclude Include="BaseMod.h" />
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||||
<ClInclude Include="mt.h" />
|
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;BASEMOD_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<ClInclude Include="randomCmds.h" />
|
</ClCompile>
|
||||||
<ClInclude Include="stdafx.h" />
|
<Link>
|
||||||
<ClInclude Include="t2api.h" />
|
<SubSystem>Windows</SubSystem>
|
||||||
<ClInclude Include="targetver.h" />
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
</ItemGroup>
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||||
<ItemGroup>
|
<OptimizeReferences>true</OptimizeReferences>
|
||||||
<ClCompile Include="BaseMod.cpp" />
|
</Link>
|
||||||
<ClCompile Include="dllmain.cpp">
|
</ItemDefinitionGroup>
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">false</CompileAsManaged>
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
</PrecompiledHeader>
|
</ImportGroup>
|
||||||
<CompileAsManaged Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</CompileAsManaged>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
|
||||||
</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="mt.cc" />
|
|
||||||
<ClCompile Include="randomCmds.cpp" />
|
|
||||||
<ClCompile Include="stdafx.cpp">
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
|
|
||||||
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="t2api.cpp" />
|
|
||||||
</ItemGroup>
|
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
||||||
<ImportGroup Label="ExtensionTargets">
|
|
||||||
</ImportGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,60 +1,45 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Source Files">
|
<Filter Include="Source Files">
|
||||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Header Files">
|
<Filter Include="Header Files">
|
||||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
<Filter Include="Resource Files">
|
<Filter Include="Resource Files">
|
||||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||||
</Filter>
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="ReadMe.txt" />
|
<ClCompile Include="source\DXConCmds.cpp">
|
||||||
</ItemGroup>
|
<Filter>Source Files</Filter>
|
||||||
<ItemGroup>
|
</ClCompile>
|
||||||
<ClInclude Include="stdafx.h">
|
<ClCompile Include="source\LinkerAPI.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="targetver.h">
|
<ClCompile Include="source\BaseMod.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="BaseMod.h">
|
<ClCompile Include="source\dllmain.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="DXConCmds.h">
|
<ClCompile Include="source\DXAPI.cpp">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Source Files</Filter>
|
||||||
</ClInclude>
|
</ClCompile>
|
||||||
<ClInclude Include="LinkerAPI.h">
|
</ItemGroup>
|
||||||
<Filter>Header Files</Filter>
|
<ItemGroup>
|
||||||
</ClInclude>
|
<ClInclude Include="include\LinkerAPI.h">
|
||||||
<ClInclude Include="DXAPI.h">
|
<Filter>Header Files</Filter>
|
||||||
<Filter>Header Files</Filter>
|
</ClInclude>
|
||||||
</ClInclude>
|
<ClInclude Include="include\DXAPI.h">
|
||||||
</ItemGroup>
|
<Filter>Header Files</Filter>
|
||||||
<ItemGroup>
|
</ClInclude>
|
||||||
<ClCompile Include="stdafx.cpp">
|
<ClInclude Include="include\DXConCmds.h">
|
||||||
<Filter>Source Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClCompile>
|
</ClInclude>
|
||||||
<ClCompile Include="BaseMod.cpp">
|
</ItemGroup>
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="dllmain.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="DXAPI.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="DXConCmds.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="LinkerAPI.cpp">
|
|
||||||
<Filter>Source Files</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -1,107 +1,107 @@
|
||||||
/**
|
/**
|
||||||
* @file DXAPI.h
|
* @file DXAPI.h
|
||||||
* @brief The DXAPI is an API that allows you to manipulate various game objects
|
* @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
|
* 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,
|
* 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.
|
* 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,
|
* 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
|
* 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.
|
* appropriate in order to make that code play better with the DXAPI.
|
||||||
*
|
*
|
||||||
* @copyright (c) 2014 Robert MacGregor
|
* @copyright (c) 2014 Robert MacGregor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "LinkerAPI.h"
|
#include "LinkerAPI.h"
|
||||||
|
|
||||||
namespace DX
|
namespace DX
|
||||||
{
|
{
|
||||||
//! A typedef referring to some type of unresolved object in the game.
|
//! A typedef referring to some type of unresolved object in the game.
|
||||||
typedef void* UnresolvedObject;
|
typedef void* UnresolvedObject;
|
||||||
|
|
||||||
class Projectile {};
|
class Projectile {};
|
||||||
|
|
||||||
//! Structure representing a player object in the game.
|
//! Structure representing a player object in the game.
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
//! Object Name
|
//! Object Name
|
||||||
const char *name;
|
const char *name;
|
||||||
//! Object ID
|
//! Object ID
|
||||||
const unsigned int &id;
|
const unsigned int &id;
|
||||||
|
|
||||||
//! X Coordinate of the position.
|
//! X Coordinate of the position.
|
||||||
float &position_x;
|
float &position_x;
|
||||||
//! Y Coordinate of the position.
|
//! Y Coordinate of the position.
|
||||||
float &position_y;
|
float &position_y;
|
||||||
//! Z Coordinate of the position.
|
//! Z Coordinate of the position.
|
||||||
float &position_z;
|
float &position_z;
|
||||||
|
|
||||||
//! Player Object Jetting State (readonly, writing it doesn't do anything)
|
//! Player Object Jetting State (readonly, writing it doesn't do anything)
|
||||||
const bool &is_jetting;
|
const bool &is_jetting;
|
||||||
//! Player Object Jumping State (readonly, writing it doesn't do anything)
|
//! Player Object Jumping State (readonly, writing it doesn't do anything)
|
||||||
const bool &is_jumping;
|
const bool &is_jumping;
|
||||||
} Player;
|
} Player;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a usable Player structure from a void
|
* @brief Returns a usable Player structure from a void
|
||||||
* pointer.
|
* pointer.
|
||||||
* @param obj A void pointer to attempt to resolve from.
|
* @param obj A void pointer to attempt to resolve from.
|
||||||
* @return A usable Player structure to manipulate.
|
* @return A usable Player structure to manipulate.
|
||||||
*/
|
*/
|
||||||
Player GetPlayerPointer(UnresolvedObject obj);
|
Player GetPlayerPointer(UnresolvedObject obj);
|
||||||
|
|
||||||
//! Structure representing a static shape in the game.
|
//! Structure representing a static shape in the game.
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
//! Object Name
|
//! Object Name
|
||||||
const char *name;
|
const char *name;
|
||||||
//! X Coordinate of the position.
|
//! X Coordinate of the position.
|
||||||
float &position_x;
|
float &position_x;
|
||||||
//! Y Coordinate of the position.
|
//! Y Coordinate of the position.
|
||||||
float &position_y;
|
float &position_y;
|
||||||
//! Z Coordinate of the position.
|
//! Z Coordinate of the position.
|
||||||
float &position_z;
|
float &position_z;
|
||||||
} StaticShape;
|
} StaticShape;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a usable StaticShape structure from a void
|
* @brief Returns a usable StaticShape structure from a void
|
||||||
* pointer.
|
* pointer.
|
||||||
* @param obj A void pointer to attempt to resolve from.
|
* @param obj A void pointer to attempt to resolve from.
|
||||||
* @return A usable StaticShape structure to manipulate.
|
* @return A usable StaticShape structure to manipulate.
|
||||||
*/
|
*/
|
||||||
StaticShape GetStaticShapePointer(UnresolvedObject obj);
|
StaticShape GetStaticShapePointer(UnresolvedObject obj);
|
||||||
|
|
||||||
//! Structure representing a SimGroup in the game.
|
//! Structure representing a SimGroup in the game.
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|
||||||
} SimGroup;
|
} SimGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a usable SimGroup structure from a void
|
* @brief Returns a usable SimGroup structure from a void
|
||||||
* pointer.
|
* pointer.
|
||||||
* @param obj A void pointer to attempt to resolve from.
|
* @param obj A void pointer to attempt to resolve from.
|
||||||
* @return A usable SimGroup structure to manipulate.
|
* @return A usable SimGroup structure to manipulate.
|
||||||
*/
|
*/
|
||||||
SimGroup GetSimGroupPointer(UnresolvedObject obj);
|
SimGroup GetSimGroupPointer(UnresolvedObject obj);
|
||||||
|
|
||||||
|
|
||||||
//! Structure representing a FlyingVehicle in the game.
|
//! Structure representing a FlyingVehicle in the game.
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
//! Strafing State. 0=Not Strafing. -1=Strafing Left. 1=Strafing Right (readonly, writing it doesn't do anything)
|
//! Strafing State. 0=Not Strafing. -1=Strafing Left. 1=Strafing Right (readonly, writing it doesn't do anything)
|
||||||
const float &strafing_state;
|
const float &strafing_state;
|
||||||
} FlyingVehicle;
|
} FlyingVehicle;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Returns a usable FlyingVehicle structure from a void
|
* @brief Returns a usable FlyingVehicle structure from a void
|
||||||
* pointer.
|
* pointer.
|
||||||
* @param obj A void pointer to attempt to resolve from.
|
* @param obj A void pointer to attempt to resolve from.
|
||||||
* @return A usable FlyingVehicle structure to manipulate.
|
* @return A usable FlyingVehicle structure to manipulate.
|
||||||
*/
|
*/
|
||||||
FlyingVehicle GetFlyingVehiclePointer(UnresolvedObject obj);
|
FlyingVehicle GetFlyingVehiclePointer(UnresolvedObject obj);
|
||||||
|
|
||||||
void Projectile_explode(Projectile *obj, const Point3F &position, const Point3F &normal, const unsigned int collideType);
|
void Projectile_explode(Projectile *obj, const Point3F &position, const Point3F &normal, const unsigned int collideType);
|
||||||
}
|
}
|
||||||
|
|
@ -1,29 +1,28 @@
|
||||||
/**
|
/**
|
||||||
* @brief The DXAPI is an API that allows you to manipulate various game objects
|
* @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
|
* 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,
|
* 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.
|
* 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,
|
* This code wouldn't be possible without Linker's original gift on the-construct.net forums,
|
||||||
* whose files are appropriately labeled in this codebase.
|
* whose files are appropriately labeled in this codebase.
|
||||||
*
|
*
|
||||||
* @copyright (c) 2014 Robert MacGregor
|
* @copyright (c) 2014 Robert MacGregor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include <LinkerAPI.h>
|
||||||
#include "LinkerAPI.h"
|
|
||||||
|
// Returns the address of an object in memory
|
||||||
// Returns the address of an object in memory
|
const char* conGetAddress(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
const char* conGetAddress(SimObject *obj, S32 argc, const char *argv[]);
|
|
||||||
|
// Player Commands -----------------------------------
|
||||||
// Player Commands -----------------------------------
|
bool conPlayerGetJumpingState(SimObject *obj, S32 argc, const char* argv[]);
|
||||||
bool conPlayerGetJumpingState(SimObject *obj, S32 argc, const char* argv[]);
|
bool conPlayerGetJettingState(SimObject *obj, S32 argc, const char* argv[]);
|
||||||
bool conPlayerGetJettingState(SimObject *obj, S32 argc, const char* argv[]);
|
|
||||||
|
// Projectile explode
|
||||||
// Projectile explode
|
bool conProjectileExplode(SimObject *obj, S32 argc, const char* argv[]);
|
||||||
bool conProjectileExplode(SimObject *obj, S32 argc, const char* argv[]);
|
|
||||||
|
// Tests Position Z
|
||||||
// Tests Position Z
|
|
||||||
const char *conPlayerSetZ(SimObject *obj, S32 argc, const char *argv[]);
|
const char *conPlayerSetZ(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
|
|
@ -1,119 +1,119 @@
|
||||||
// Linker's Tribes 2 API
|
// Linker's Tribes 2 API
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
//api stuff
|
//api stuff
|
||||||
|
|
||||||
typedef unsigned int U32;
|
typedef unsigned int U32;
|
||||||
typedef int S32;
|
typedef int S32;
|
||||||
typedef float F32;
|
typedef float F32;
|
||||||
|
|
||||||
typedef unsigned int dsize_t;
|
typedef unsigned int dsize_t;
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
//for addvariable
|
//for addvariable
|
||||||
#define TypeS32 1
|
#define TypeS32 1
|
||||||
#define TypeBool 3
|
#define TypeBool 3
|
||||||
#define TypeF32 5
|
#define TypeF32 5
|
||||||
|
|
||||||
//dshit
|
//dshit
|
||||||
inline dsize_t dStrlen(const char *str)
|
inline dsize_t dStrlen(const char *str)
|
||||||
{
|
{
|
||||||
return (dsize_t)strlen(str);
|
return (dsize_t)strlen(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
class Namespace
|
class Namespace
|
||||||
{
|
{
|
||||||
const char* mName;
|
const char* mName;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SimObject
|
struct SimObject
|
||||||
{
|
{
|
||||||
SimObject* group;
|
SimObject* group;
|
||||||
const char* objectName; //04h: objectName
|
const char* objectName; //04h: objectName
|
||||||
SimObject* nextNameObject; //8
|
SimObject* nextNameObject; //8
|
||||||
SimObject* nextManagerNameObject; //c
|
SimObject* nextManagerNameObject; //c
|
||||||
SimObject* nextIdObject; //10h: nextIdObject
|
SimObject* nextIdObject; //10h: nextIdObject
|
||||||
U32 stuff; //14
|
U32 stuff; //14
|
||||||
U32 mFlags; //18h
|
U32 mFlags; //18h
|
||||||
U32 mNotifyList; //actually a pointer
|
U32 mNotifyList; //actually a pointer
|
||||||
U32 mId; //20h: mId
|
U32 mId; //20h: mId
|
||||||
//more stuff
|
//more stuff
|
||||||
};
|
};
|
||||||
|
|
||||||
class SimIdDictionary
|
class SimIdDictionary
|
||||||
{
|
{
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
DefaultTableSize = 4096,
|
DefaultTableSize = 4096,
|
||||||
TableBitMask = 4095
|
TableBitMask = 4095
|
||||||
};
|
};
|
||||||
SimObject *table[DefaultTableSize];
|
SimObject *table[DefaultTableSize];
|
||||||
};
|
};
|
||||||
extern SimIdDictionary* gIdDictionary;
|
extern SimIdDictionary* gIdDictionary;
|
||||||
|
|
||||||
class Point3F
|
class Point3F
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Point3F(F32 *x, F32 *y, F32 *z)
|
Point3F(F32 *x, F32 *y, F32 *z)
|
||||||
{
|
{
|
||||||
this->x = x;
|
this->x = x;
|
||||||
this->y = y;
|
this->y = y;
|
||||||
this->z = z;
|
this->z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
Point3F(void)
|
Point3F(void)
|
||||||
{
|
{
|
||||||
this->x = 0;
|
this->x = 0;
|
||||||
this->y = 0;
|
this->y = 0;
|
||||||
this->z = 0;
|
this->z = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
F32 *x;
|
F32 *x;
|
||||||
F32 *y;
|
F32 *y;
|
||||||
F32 *z;
|
F32 *z;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//GuiTSCtrl
|
//GuiTSCtrl
|
||||||
class GuiTSCtrl {};
|
class GuiTSCtrl {};
|
||||||
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest); //fake
|
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest); //fake
|
||||||
|
|
||||||
namespace Sim {
|
namespace Sim {
|
||||||
extern SimObject* (*findObject)(U32 id);
|
extern SimObject* (*findObject)(U32 id);
|
||||||
}
|
}
|
||||||
|
|
||||||
//console
|
//console
|
||||||
|
|
||||||
typedef const char * (*StringCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
typedef const char * (*StringCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
typedef S32 (*IntCallback)(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 F32 (*FloatCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
typedef void (*VoidCallback)(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[]);
|
typedef bool (*BoolCallback)(SimObject *obj, S32 argc, const char *argv[]);
|
||||||
|
|
||||||
|
|
||||||
//functions
|
//functions
|
||||||
namespace Con
|
namespace Con
|
||||||
{
|
{
|
||||||
|
|
||||||
extern char * (*getReturnBuffer)(U32 bufferSize);
|
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 (*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 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 bool (*addVariable)(const char *name, S32 t, void *dp);
|
||||||
|
|
||||||
extern void (*printf)(const char* fmt,...);
|
extern void (*printf)(const char* fmt,...);
|
||||||
extern void (*errorf)(U32 type, const char* fmt,...);
|
extern void (*errorf)(U32 type, const char* fmt,...);
|
||||||
|
|
||||||
extern const char * (*getVariable)(const char *name);
|
extern const char * (*getVariable)(const char *name);
|
||||||
extern const char * (*execute)(S32 argc, const char *argv[]);
|
extern const char * (*execute)(S32 argc, const char *argv[]);
|
||||||
extern const char * (*executef)(S32 argc, ...);
|
extern const char * (*executef)(S32 argc, ...);
|
||||||
extern const char * (*executem)(SimObject *object, S32 argc, const char *argv[]);
|
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);
|
extern const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf);
|
||||||
}
|
}
|
||||||
|
|
||||||
//d-util
|
//d-util
|
||||||
extern int (*dSscanf)(const char *buffer, const char *format, ...);
|
extern int (*dSscanf)(const char *buffer, const char *format, ...);
|
||||||
extern int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...);
|
extern int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...);
|
||||||
extern bool (*dAtob)(const char *str);
|
extern bool (*dAtob)(const char *str);
|
||||||
|
|
@ -1,22 +1,19 @@
|
||||||
// BaseMod.cpp : Defines the exported functions for the DLL application.
|
// BaseMod.cpp : Defines the exported functions for the DLL application.
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "stdafx.h"
|
#include <DXAPI.h>
|
||||||
#include "BaseMod.h"
|
#include <LinkerAPI.h>
|
||||||
|
|
||||||
#include "DXAPI.h"
|
#include <DXConCmds.h>
|
||||||
#include "LinkerAPI.h"
|
|
||||||
|
extern "C"
|
||||||
#include "DXConCmds.h"
|
{
|
||||||
|
__declspec(dllexport) void ModInitialize(void)
|
||||||
extern "C"
|
{
|
||||||
{
|
Con::addMethodB("Player", "isjumping", &conPlayerGetJumpingState,"Returns whether or not the player is jumping", 2, 2);
|
||||||
BASEMOD_API void ModInitialize(void)
|
Con::addMethodB("Player", "isjetting", &conPlayerGetJettingState,"Returns whether or not the player is jetting", 2, 2);
|
||||||
{
|
|
||||||
Con::addMethodB("Player", "isjumping", &conPlayerGetJumpingState,"Returns whether or not the player is jumping", 2, 2);
|
Con::addMethodB("GrenadeProjectile", "explode", &conProjectileExplode,"Explodes the given projectile", 5, 5);
|
||||||
Con::addMethodB("Player", "isjetting", &conPlayerGetJettingState,"Returns whether or not the player is jetting", 2, 2);
|
Con::addMethodB("Projectile", "explode", &conProjectileExplode,"Explodes the given projectile", 5, 5);
|
||||||
|
}
|
||||||
Con::addMethodB("GrenadeProjectile", "explode", &conProjectileExplode,"Explodes the given projectile", 5, 5);
|
|
||||||
Con::addMethodB("Projectile", "explode", &conProjectileExplode,"Explodes the given projectile", 5, 5);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,90 +1,90 @@
|
||||||
/**
|
/**
|
||||||
* @file DXAPI.cpp
|
* @file DXAPI.cpp
|
||||||
* @brief The DXAPI is an API that allows you to manipulate various game objects
|
* @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
|
* 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,
|
* 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.
|
* 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,
|
* 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
|
* 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.
|
* appropriate in order to make that code play better with the DXAPI.
|
||||||
*
|
*
|
||||||
* @copyright (c) 2014 Robert MacGregor
|
* @copyright (c) 2014 Robert MacGregor
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "DXAPI.h"
|
#include "DXAPI.h"
|
||||||
#include "LinkerAPI.h"
|
#include "LinkerAPI.h"
|
||||||
|
|
||||||
namespace DX
|
namespace DX
|
||||||
{
|
{
|
||||||
Player GetPlayerPointer(UnresolvedObject obj)
|
Player GetPlayerPointer(UnresolvedObject obj)
|
||||||
{
|
{
|
||||||
// Probably some way to do all this via assembly but screw me if I know
|
// Probably some way to do all this via assembly but screw me if I know
|
||||||
unsigned int base_tribes_pointer = (unsigned int)obj;
|
unsigned int base_tribes_pointer = (unsigned int)obj;
|
||||||
|
|
||||||
Player result =
|
Player result =
|
||||||
{
|
{
|
||||||
0x00, // Object Name
|
0x00, // Object Name
|
||||||
*(unsigned int*)(base_tribes_pointer + 32), // Object ID
|
*(unsigned int*)(base_tribes_pointer + 32), // Object ID
|
||||||
*(float*)(base_tribes_pointer + 168), // Position X
|
*(float*)(base_tribes_pointer + 168), // Position X
|
||||||
*(float*)(base_tribes_pointer + 184), // Position Y
|
*(float*)(base_tribes_pointer + 184), // Position Y
|
||||||
*(float*)(base_tribes_pointer + 200), // Position Z
|
*(float*)(base_tribes_pointer + 200), // Position Z
|
||||||
*(bool*)(base_tribes_pointer + 735), // Jetting State
|
*(bool*)(base_tribes_pointer + 735), // Jetting State
|
||||||
*(bool*)(base_tribes_pointer + 734) // Jumping State
|
*(bool*)(base_tribes_pointer + 734) // Jumping State
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
StaticShape GetStaticShapePointer(UnresolvedObject obj)
|
StaticShape GetStaticShapePointer(UnresolvedObject obj)
|
||||||
{
|
{
|
||||||
unsigned int base_tribes_pointer = (unsigned int)obj;
|
unsigned int base_tribes_pointer = (unsigned int)obj;
|
||||||
|
|
||||||
StaticShape result =
|
StaticShape result =
|
||||||
{
|
{
|
||||||
0x00, // Object Name
|
0x00, // Object Name
|
||||||
*(float*)(base_tribes_pointer + 200), // Position X
|
*(float*)(base_tribes_pointer + 200), // Position X
|
||||||
*(float*)(base_tribes_pointer + 200), // Position Y
|
*(float*)(base_tribes_pointer + 200), // Position Y
|
||||||
*(float*)(base_tribes_pointer + 200) // Position Z
|
*(float*)(base_tribes_pointer + 200) // Position Z
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimGroup GetSimGroupPointer(UnresolvedObject obj)
|
SimGroup GetSimGroupPointer(UnresolvedObject obj)
|
||||||
{
|
{
|
||||||
unsigned int base_tribes_pointer = (unsigned int)obj;
|
unsigned int base_tribes_pointer = (unsigned int)obj;
|
||||||
|
|
||||||
SimGroup result =
|
SimGroup result =
|
||||||
{
|
{
|
||||||
|
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
FlyingVehicle GetFlyingVehiclePointer(UnresolvedObject obj)
|
FlyingVehicle GetFlyingVehiclePointer(UnresolvedObject obj)
|
||||||
{
|
{
|
||||||
unsigned int base_tribes_pointer = (unsigned int)obj;
|
unsigned int base_tribes_pointer = (unsigned int)obj;
|
||||||
|
|
||||||
FlyingVehicle result =
|
FlyingVehicle result =
|
||||||
{
|
{
|
||||||
*(float*)(base_tribes_pointer + 2200), // Strafing Status
|
*(float*)(base_tribes_pointer + 2200), // Strafing Status
|
||||||
};
|
};
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Projectile_explode(Projectile *obj, const Point3F &position, const Point3F &normal, const unsigned int collideType)
|
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);
|
typedef void (__cdecl *explodeFunc)(const Point3F &position, const Point3F &normal, const unsigned int collideType);
|
||||||
static explodeFunc function_call = (explodeFunc)0x62DC30;
|
static explodeFunc function_call = (explodeFunc)0x62DC30;
|
||||||
|
|
||||||
__asm {
|
__asm {
|
||||||
push collideType;
|
push collideType;
|
||||||
push normal;
|
push normal;
|
||||||
push position;
|
push position;
|
||||||
mov ecx,obj;
|
mov ecx,obj;
|
||||||
lea eax, function_call;
|
lea eax, function_call;
|
||||||
mov eax, [eax];
|
mov eax, [eax];
|
||||||
call eax;
|
call eax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1,58 +1,58 @@
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "LinkerAPI.h"
|
#include <LinkerAPI.h>
|
||||||
#include "DXAPI.h"
|
#include <DXAPI.h>
|
||||||
|
|
||||||
const char *conGetAddress(SimObject *obj, S32 argc, const char *argv[])
|
const char *conGetAddress(SimObject *obj, S32 argc, const char *argv[])
|
||||||
{
|
{
|
||||||
// Hmm...
|
// Hmm...
|
||||||
char result[256];
|
char result[256];
|
||||||
sprintf(result, "%x", obj);
|
sprintf(result, "%x", obj);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *conPlayerSetZ(SimObject *obj, S32 argc, const char *argv[])
|
const char *conPlayerSetZ(SimObject *obj, S32 argc, const char *argv[])
|
||||||
{
|
{
|
||||||
DX::Player test = DX::GetPlayerPointer(obj);
|
DX::Player test = DX::GetPlayerPointer(obj);
|
||||||
test.position_y = 100;
|
test.position_y = 100;
|
||||||
test.position_z = 300;
|
test.position_z = 300;
|
||||||
test.position_x = 500;
|
test.position_x = 500;
|
||||||
|
|
||||||
char result[256];
|
char result[256];
|
||||||
sprintf(result, "LOL");
|
sprintf(result, "LOL");
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool conPlayerGetJumpingState(SimObject *obj, S32 argc, const char* argv[])
|
bool conPlayerGetJumpingState(SimObject *obj, S32 argc, const char* argv[])
|
||||||
{
|
{
|
||||||
DX::Player operand = DX::GetPlayerPointer(obj);
|
DX::Player operand = DX::GetPlayerPointer(obj);
|
||||||
|
|
||||||
return operand.is_jumping;
|
return operand.is_jumping;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool conPlayerGetJettingState(SimObject *obj, S32 argc, const char* argv[])
|
bool conPlayerGetJettingState(SimObject *obj, S32 argc, const char* argv[])
|
||||||
{
|
{
|
||||||
DX::Player operand = DX::GetPlayerPointer(obj);
|
DX::Player operand = DX::GetPlayerPointer(obj);
|
||||||
|
|
||||||
return operand.is_jetting;
|
return operand.is_jetting;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool conProjectileExplode(SimObject *obj, S32 argc, const char* argv[])
|
bool conProjectileExplode(SimObject *obj, S32 argc, const char* argv[])
|
||||||
{
|
{
|
||||||
Point3F position;
|
Point3F position;
|
||||||
position.x = 0;
|
position.x = 0;
|
||||||
position.y = 0;
|
position.y = 0;
|
||||||
position.z = 0;
|
position.z = 0;
|
||||||
|
|
||||||
Point3F normal;
|
Point3F normal;
|
||||||
normal.x = 0;
|
normal.x = 0;
|
||||||
normal.y = 0;
|
normal.y = 0;
|
||||||
normal.z = 0;
|
normal.z = 0;
|
||||||
|
|
||||||
unsigned int collideType = atoi(argv[4]);
|
unsigned int collideType = atoi(argv[4]);
|
||||||
DX::Projectile_explode((DX::Projectile*)obj, position, normal, collideType);
|
DX::Projectile_explode((DX::Projectile*)obj, position, normal, collideType);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1,86 +1,86 @@
|
||||||
#include "LinkerAPI.h"
|
#include <LinkerAPI.h>
|
||||||
|
|
||||||
SimIdDictionary* gIdDictionary = reinterpret_cast<SimIdDictionary*>(0x009E9194);
|
SimIdDictionary* gIdDictionary = reinterpret_cast<SimIdDictionary*>(0x009E9194);
|
||||||
|
|
||||||
//439550
|
//439550
|
||||||
namespace Sim {
|
namespace Sim {
|
||||||
SimObject* (*findObject)(U32 id) =
|
SimObject* (*findObject)(U32 id) =
|
||||||
(SimObject* (_cdecl *)(U32 id) )
|
(SimObject* (_cdecl *)(U32 id) )
|
||||||
0x439550;
|
0x439550;
|
||||||
}
|
}
|
||||||
|
|
||||||
//hackey way to do member functions, ....
|
//hackey way to do member functions, ....
|
||||||
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest) {
|
void GuiTSCtrl_project(GuiTSCtrl *obj, const Point3F &pt, Point3F *dest) {
|
||||||
typedef void (__cdecl *projFunc)(const Point3F &pt, Point3F *dest);
|
typedef void (__cdecl *projFunc)(const Point3F &pt, Point3F *dest);
|
||||||
static projFunc p = (projFunc)0x4d0b40;
|
static projFunc p = (projFunc)0x4d0b40;
|
||||||
|
|
||||||
__asm {
|
__asm {
|
||||||
push dest;
|
push dest;
|
||||||
push pt;
|
push pt;
|
||||||
mov ecx,obj;
|
mov ecx,obj;
|
||||||
lea eax, p;
|
lea eax, p;
|
||||||
mov eax, [eax];
|
mov eax, [eax];
|
||||||
call eax;
|
call eax;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace Con
|
namespace Con
|
||||||
{
|
{
|
||||||
|
|
||||||
char* (*getReturnBuffer)(U32 bufferSize) =
|
char* (*getReturnBuffer)(U32 bufferSize) =
|
||||||
(char *(__cdecl *)(U32))
|
(char *(__cdecl *)(U32))
|
||||||
0x42caa0;
|
0x42caa0;
|
||||||
|
|
||||||
void (*addMethodB)(const char *nsName, const char *name, BoolCallback cb, const char *usage, S32 minArgs, S32 maxArgs) =
|
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))
|
(void (__cdecl *)(const char *, const char *,BoolCallback,const char *,S32,S32))
|
||||||
0x426510;
|
0x426510;
|
||||||
|
|
||||||
void (*addMethodS)(const char *, const char *,StringCallback, const char *, S32, S32) =
|
void (*addMethodS)(const char *, const char *,StringCallback, const char *, S32, S32) =
|
||||||
(void (__cdecl *)(const char *,const char *,StringCallback,const char *,S32,S32))
|
(void (__cdecl *)(const char *,const char *,StringCallback,const char *,S32,S32))
|
||||||
0x426410;
|
0x426410;
|
||||||
|
|
||||||
bool (*addVariable)(const char *name, S32 t, void *dp) =
|
bool (*addVariable)(const char *name, S32 t, void *dp) =
|
||||||
(bool (__cdecl *)(const char *name, S32 t, void *dp))
|
(bool (__cdecl *)(const char *name, S32 t, void *dp))
|
||||||
0x4263B0;
|
0x4263B0;
|
||||||
|
|
||||||
const char * (*execute)(S32 argc, const char *argv[]) =
|
const char * (*execute)(S32 argc, const char *argv[]) =
|
||||||
(const char * (__cdecl *)(S32 argc, const char *argv[]))
|
(const char * (__cdecl *)(S32 argc, const char *argv[]))
|
||||||
0x4267A0;
|
0x4267A0;
|
||||||
|
|
||||||
const char * (*executef)(S32 argc, ...) =
|
const char * (*executef)(S32 argc, ...) =
|
||||||
(const char * (__cdecl *)(S32 argc, ...))
|
(const char * (__cdecl *)(S32 argc, ...))
|
||||||
0x4269E0;
|
0x4269E0;
|
||||||
|
|
||||||
const char * (*evaluate)(const char* string, bool echo, const char *fileName, bool cf) =
|
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))
|
(const char * (__cdecl *)(const char* string, bool echo, const char *fileName, bool cf))
|
||||||
0x426690;
|
0x426690;
|
||||||
|
|
||||||
const char * (*executem)(SimObject *object, S32 argc, const char *argv[]) =
|
const char * (*executem)(SimObject *object, S32 argc, const char *argv[]) =
|
||||||
(const char * (__cdecl *)(SimObject *object, S32 argc, const char *argv[]))
|
(const char * (__cdecl *)(SimObject *object, S32 argc, const char *argv[]))
|
||||||
0x426800;
|
0x426800;
|
||||||
|
|
||||||
const char * (*getVariable)(const char *name) =
|
const char * (*getVariable)(const char *name) =
|
||||||
(const char * (__cdecl *)(const char *name))
|
(const char * (__cdecl *)(const char *name))
|
||||||
0x4261F0;
|
0x4261F0;
|
||||||
|
|
||||||
void (*printf)(const char* fmt,...) =
|
void (*printf)(const char* fmt,...) =
|
||||||
(void (__cdecl *)(const char* fmt,...))
|
(void (__cdecl *)(const char* fmt,...))
|
||||||
0x425F30;
|
0x425F30;
|
||||||
|
|
||||||
void (*errorf)(U32 type, const char* fmt,...)=
|
void (*errorf)(U32 type, const char* fmt,...)=
|
||||||
(void (__cdecl *)(U32, const char*,...))
|
(void (__cdecl *)(U32, const char*,...))
|
||||||
0x425FB0;
|
0x425FB0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int (*dSscanf)(const char *buffer, const char *format, ...) =
|
int (*dSscanf)(const char *buffer, const char *format, ...) =
|
||||||
(int (__cdecl *)(const char *,const char *,...))
|
(int (__cdecl *)(const char *,const char *,...))
|
||||||
0x55b640;
|
0x55b640;
|
||||||
|
|
||||||
int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...) =
|
int (*dSprintf)(char *buffer, dsize_t bufferSize, const char *format, ...) =
|
||||||
(int (__cdecl *)(char *,dsize_t,const char *,...))
|
(int (__cdecl *)(char *,dsize_t,const char *,...))
|
||||||
0x55b5e0;
|
0x55b5e0;
|
||||||
|
|
||||||
bool (*dAtob)(const char *str) =
|
bool (*dAtob)(const char *str) =
|
||||||
(bool (__cdecl *)(const char *str))
|
(bool (__cdecl *)(const char *str))
|
||||||
0x55B490;
|
0x55B490;
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
// dllmain.cpp : Defines the entry point for the DLL application.
|
// dllmain.cpp : Defines the entry point for the DLL application.
|
||||||
#include "stdafx.h"
|
#include <SDKDDKVer.h>
|
||||||
|
#include <Windows.h>
|
||||||
BOOL APIENTRY DllMain( HMODULE hModule,
|
|
||||||
DWORD ul_reason_for_call,
|
BOOL APIENTRY DllMain( HMODULE hModule,
|
||||||
LPVOID lpReserved
|
DWORD ul_reason_for_call,
|
||||||
)
|
LPVOID lpReserved
|
||||||
{
|
)
|
||||||
switch (ul_reason_for_call)
|
{
|
||||||
{
|
switch (ul_reason_for_call)
|
||||||
case DLL_PROCESS_ATTACH:
|
{
|
||||||
case DLL_THREAD_ATTACH:
|
case DLL_PROCESS_ATTACH:
|
||||||
case DLL_THREAD_DETACH:
|
case DLL_THREAD_ATTACH:
|
||||||
case DLL_PROCESS_DETACH:
|
case DLL_THREAD_DETACH:
|
||||||
break;
|
case DLL_PROCESS_DETACH:
|
||||||
}
|
break;
|
||||||
return TRUE;
|
}
|
||||||
}
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
Binary file not shown.
BIN
ModLoader/CoreModSystem.v12.suo
Normal file
BIN
ModLoader/CoreModSystem.v12.suo
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue