From e0ff484a06fd3f068e29eff4a125f61fbfd174c4 Mon Sep 17 00:00:00 2001 From: Treeki Date: Sat, 17 Sep 2011 03:38:41 +0200 Subject: merged level-select updates to game.h and State stuff --- include/game.h | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) (limited to 'include/game.h') diff --git a/include/game.h b/include/game.h index 554e17a..7382c34 100755 --- a/include/game.h +++ b/include/game.h @@ -1020,6 +1020,25 @@ public: u8 layer; u8 someFlagByte; u8 isLinkedIntoList; + + void clear(); + void addToList(); + void removeFromList(); + + void initWithStruct(dActor_c *owner, Info *info); + void initWithStruct(dActor_c *owner, Info *info, u8 clMode); + + u16 checkResult1(u16 param); + u16 checkResult3(u16 param); + + float top(); + float bottom(); + float yCenter(); + float right(); + float left(); + float xCenter(); + + // Plus more stuff that isn't needed in the public API, I'm pretty sure. }; @@ -1085,6 +1104,23 @@ public: }; +#define DECLARE_STATE(NAME) \ + static State StateID_##NAME; \ + void beginState_##NAME(); \ + void executeState_##NAME(); \ + void endState_##NAME(); + +#define CREATE_STATE(CLASS, NAME) \ + CLASS::State CLASS::StateID_##NAME \ + (#CLASS "::StateID_" #NAME, \ + &CLASS::beginState_##NAME, \ + &CLASS::executeState_##NAME, \ + &CLASS::endState_##NAME); + +#define USING_STATES(CLASS) \ + typedef State State; + + struct LinkListEntry { LinkListEntry *prev; LinkListEntry *next; @@ -1347,6 +1383,29 @@ public: }; +class dAc_Py_c : public dStageActor_c { +public: + u8 data[0x1164 - 0x394]; + ActivePhysics bPhysics; + ActivePhysics cPhysics; + ActivePhysics dPhysics; + ActivePhysics ePhysics; + + dAc_Py_c(); + + int beforeCreate(); + int afterCreate(int); + int beforeDelete(); + int afterDelete(int); + int beforeExecute(); + int afterExecute(int); + int beforeDraw(); + int afterDraw(int); + + ~dAc_Py_c(); +}; + + /* TODO class dActorState_c : public dStageActor_c { public: @@ -1534,6 +1593,9 @@ public: virtual void _vf27C(); // nullsub, params unknown ~dEn_c(); + + + static void collisionCallback(ActivePhysics::Info *one, ActivePhysics::Info *two); }; @@ -2070,5 +2132,15 @@ struct BGRender { u16 tileNumberWithinBlock, areaID; }; +// A HACK +extern void *DVDClass; +extern "C" u8 *GetRes(void *Something, const char *arcname, const char *filename); + +// Use THESE instead, until I write something up for dRes or dRes_c or whatever the fuck it's called + +inline u8 *getResource(const char *arcName, const char *fileName) { + return GetRes((void*)(((u8*)DVDClass)+4), arcName, fileName); +} + #endif -- cgit v1.2.3