mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-02-25 17:43:34 +00:00
Restructured project structure to use a singular SLN; made the T2API common to all projects; adjusted watchdog timer to 8 seconds
This commit is contained in:
parent
e1c5d1dead
commit
527474ff24
79 changed files with 469 additions and 626 deletions
29
CommonAPI/Common/source/DXAPI/Projectile.cpp
Normal file
29
CommonAPI/Common/source/DXAPI/Projectile.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#include <DXAPI/Projectile.h>
|
||||
|
||||
namespace DX
|
||||
{
|
||||
Projectile::Projectile(unsigned int obj) : velocity(*(float*)(obj + 892), *(float*)(obj + 896), *(float*)(obj + 900)),
|
||||
hidden(*(bool*)(obj + 796)),
|
||||
GameBase(obj)
|
||||
{
|
||||
}
|
||||
|
||||
void Projectile::explode(const Linker::Point3F &position, const Linker::Point3F &normal, const unsigned int collideType)
|
||||
{
|
||||
void *pointer = (void*)this->base_pointer_value;
|
||||
|
||||
typedef void (__cdecl *explodeFunc)(const Linker::Point3F &position, const Linker::Point3F &normal, const unsigned int collideType);
|
||||
static explodeFunc function_call = (explodeFunc)0x62DC30;
|
||||
|
||||
__asm
|
||||
{
|
||||
push collideType;
|
||||
push normal;
|
||||
push position;
|
||||
mov ecx,pointer;
|
||||
lea eax, function_call;
|
||||
mov eax, [eax];
|
||||
call eax;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue