mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-03-07 14:30:26 +00:00
Begin transition to the new ModLoader paradigm. Begin cleaning up code.
This commit is contained in:
parent
015a9f4dc8
commit
cb9895a38e
39 changed files with 1429 additions and 967 deletions
13
CommonAPI/Common/source/DXAPI/AIConnection.cpp
Normal file
13
CommonAPI/Common/source/DXAPI/AIConnection.cpp
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#include <DXAPI/AIConnection.h>
|
||||
|
||||
namespace DX
|
||||
{
|
||||
AIConnection::AIConnection(unsigned int obj) : mUseCustomMoves(false), GameConnection(obj)
|
||||
{
|
||||
}
|
||||
|
||||
void AIConnection::generateMove(void)
|
||||
{
|
||||
|
||||
}
|
||||
} // End NameSpace DX
|
||||
|
|
@ -33,6 +33,7 @@ namespace DX
|
|||
}
|
||||
return retval;
|
||||
}
|
||||
|
||||
bool memPatch(unsigned int addr, unsigned char * data, unsigned int size){
|
||||
DWORD oldprotect=0;
|
||||
DWORD oldnewprotect=0;
|
||||
|
|
@ -41,6 +42,7 @@ namespace DX
|
|||
VirtualProtect((void *)addr,size,oldprotect,&oldnewprotect);
|
||||
return true;
|
||||
}
|
||||
|
||||
float memToFloat(unsigned int addr){
|
||||
DWORD oldprotect=0;
|
||||
DWORD oldnewprotect=0;
|
||||
|
|
@ -51,6 +53,7 @@ namespace DX
|
|||
VirtualProtect((void *)addr,4,oldprotect,&oldnewprotect);
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned int memToUInt(unsigned int addr){
|
||||
DWORD oldprotect=0;
|
||||
DWORD oldnewprotect=0;
|
||||
|
|
@ -61,6 +64,7 @@ namespace DX
|
|||
VirtualProtect((void *)addr,4,oldprotect,&oldnewprotect);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool memToHex(unsigned int addr, char * dst, int size, bool spaces=false){
|
||||
DWORD oldprotect=0;
|
||||
DWORD oldnewprotect=0;
|
||||
|
|
@ -80,6 +84,7 @@ namespace DX
|
|||
strncpy(dst,outstr,255);
|
||||
return true;
|
||||
}
|
||||
|
||||
const char *GetModPaths(void)
|
||||
{
|
||||
int pointer = *(int*)0x9E8690;
|
||||
|
|
@ -183,4 +188,9 @@ namespace DX
|
|||
|
||||
return was_dirty;
|
||||
}
|
||||
|
||||
void initializeHooks(void)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -13,19 +13,19 @@ namespace DX
|
|||
__asm
|
||||
{
|
||||
mov ecx, my_ptr;
|
||||
add ecx, 3404928;
|
||||
add ecx, 0x33f480;
|
||||
|
||||
test ecx, ecx;
|
||||
mov edx, ecx;
|
||||
jz loc_5FDA60_sim;
|
||||
add edx, 4294967136;
|
||||
|
||||
loc_5FDA60_sim:
|
||||
mov eax, [edx + 33372];
|
||||
loc_5FDA60_sim:
|
||||
mov eax, [edx + 0x825c];
|
||||
test eax, eax;
|
||||
jnz got_valid_ptr;
|
||||
|
||||
got_valid_ptr:
|
||||
got_valid_ptr:
|
||||
mov result_ptr, eax;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
namespace DX
|
||||
{
|
||||
SimObject::SimObject(unsigned int obj) : identifier(*(unsigned int*)(obj + 32)), fieldDictionary(*(unsigned int*)(obj + 0x2C)), dataBlock(*(unsigned int*)(obj + 0x248)),
|
||||
base_pointer_value(obj)
|
||||
base_pointer_value(obj), mName(*(char*)(obj + 4))
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -45,6 +45,7 @@ namespace DX
|
|||
|
||||
return result;
|
||||
}
|
||||
|
||||
const char *SimObject::getFieldValue(const char *slotname)
|
||||
{
|
||||
void * getfieldvalueptr=(void *)0x435210;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue