diff options
Diffstat (limited to '')
-rw-r--r-- | src/bossPlayerClown.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/bossPlayerClown.cpp b/src/bossPlayerClown.cpp index 2db1d90..eb67db3 100644 --- a/src/bossPlayerClown.cpp +++ b/src/bossPlayerClown.cpp @@ -4,11 +4,16 @@ #include <sfx.h> #include "boss.h" +// #define cField(TYPE, OFFSET) (*(TYPE*)(((u32)clown) + (OFFSET))) +// #define cPlayerOccupying cField(dStageActor_c*, 0x738) +// #define cModel cField(m3d::mdl_c*, 0xFEC) +// #define cTimer cField(u32, 0xFEC+sizeof(m3d::mdl_c)) +// #define cAllocator cField(mHeapAllocator_c*, 0xFD0) -// #define cPlayerOccupying (*(dStageActor_c**)(((u32)(clown)) + 0x738 )) +#define cPlayerOccupying (*(dStageActor_c**)(((u32)(clown)) + 0x738 )) #define cAllocator ((mHeapAllocator_c*)(((u32)(clown)) + 0xFD0 )) #define cModel ((m3d::mdl_c*)( ((u32)(clown)) + 0xFEC )) -#define cTimer (**(u32**)((u32)(clown) + sizeof(m3d::mdl_c) + 0xFEC )) +#define cTimer (*(u32*)((u32)(clown) + sizeof(m3d::mdl_c) + 0xFEC )) extern "C" int PClownCarExecute(dEn_c *clown); extern "C" void PClownCarAfterCreate(dEn_c *clown, u32); @@ -70,7 +75,7 @@ void CCafterCreate(dEn_c *clown, u32 param) { void CConExecuteMove(dEn_c *clown) { - // u8 player = cPlayerOccupying->which_player; + u8 player = cPlayerOccupying->which_player; // OSReport("Angle = %x, %x, %x", (GetSpecificPlayerActor(player))->rot.y, (GetSpecificPlayerActor(player))->rot.x, (GetSpecificPlayerActor(player))->rot.z); // OSReport("Clown = %x, %x, %x", (clown)->rot.y, (clown)->rot.x, (clown)->rot.z); @@ -79,7 +84,7 @@ void CConExecuteMove(dEn_c *clown) { u32 buttonPushed = Remocon_GetPressed(GetRemoconMng()->controllers[0]); if (buttonPushed & 0x0100) { - // if (cTimer > 90) { + if (cTimer > 90) { if (clown->direction == 0) { // Going right tempPos = (Vec){clown->pos.x + 32.0, clown->pos.y + 32.0, 3564.0}; dStageActor_c *spawned = CreateActor(657, 0, tempPos, 0, 0); @@ -94,11 +99,11 @@ void CConExecuteMove(dEn_c *clown) { SpawnEffect("Wm_en_killervanish", 0, &tempPos, &(S16Vec){0,0,0}, &(Vec){0.1, 0.1, 0.1}); PlaySoundAsync(clown, SE_OBJ_HOUDAI_S_SHOT); - // cTimer = 0; - // } + cTimer = 0; + } } - // cTimer++; + cTimer++; // run normal move PClownCarMove(clown); |