diff options
Diffstat (limited to '')
-rwxr-xr-x | include/game.h | 248 |
1 files changed, 239 insertions, 9 deletions
diff --git a/include/game.h b/include/game.h index 6cdc4f6..42304a5 100755 --- a/include/game.h +++ b/include/game.h @@ -39,6 +39,13 @@ float sin(float x); float ceil(float x);
float floor(float x);
}
+enum Direction {
+ RIGHT = 0,
+ LEFT = 1,
+ UP = 2,
+ DOWN = 3,
+};
+
bool DVD_Start();
bool DVD_End();
@@ -500,6 +507,9 @@ public: u32 _otherDatum[38];
static WLClass *instance;
+
+ void demoControlAllPlayers();
+ void disableDemoControl(bool uselessVar);
};
@@ -1583,6 +1593,12 @@ public: void executeState_##NAME(); \
void endState_##NAME();
+#define DECLARE_STATE_VIRTUAL(NAME) \
+ static State StateID_##NAME; \
+ virtual void beginState_##NAME(); \
+ virtual void executeState_##NAME(); \
+ virtual void endState_##NAME();
+
#define CREATE_STATE(CLASS, NAME) \
CLASS::State CLASS::StateID_##NAME \
(#CLASS "::StateID_" #NAME, \
@@ -2184,7 +2200,7 @@ public: u8 eatenState; // 0=normal,2=eaten,4=spit out
u8 _36D;
Vec scaleBeforeBeingEaten;
- u32 _37C, _380, _384, _388;
+ u32 _37C, lookAtMode, _384, _388;
u8 stageActorType;
u8 which_player; // _38D
u8 disableFlagMask, currentLayerID;
@@ -2204,7 +2220,7 @@ public: const char *GetExplanationString();
- virtual bool _vf60(); // does stuff with BG_GM
+ virtual bool isOutOfView(); // does stuff with BG_GM
virtual void kill(); // nullsub here, defined in StageActor. probably no params
virtual int _vf68(); // params unknown. return (1) might be bool
virtual u8 *_vf6C(); // returns byte 0x38D
@@ -2362,24 +2378,38 @@ class dPlayerInput_c { class daPlBase_c : public dStageActor_c {
public:
// Can't be assed to build full headers right now
- u8 data[0xEA4 - 0x394];
+ u8 data[0x45C - 0x394];
+ float demoMoveSpeed;
+ u8 data3[0xEA4 - 0x460];
dPlayerInput_c input;
// We're at 0x1008 now
- u8 data2[0x1464 - 0x1008];
+ u8 data2[0x1418 - 0x1008];
+ dStateWrapper_c<daPlBase_c> demoStates;
+ u32 demoStateParam;
+ u32 _1458, _145C;
+ u8 _1460;
dStateWrapper_c<daPlBase_c> states2;
+ void justFaceSpecificDirection(int direction);
+ void moveInDirection(float *targetX, float *speed);
+ bool isReadyForDemoControlAction();
+
void setAnimePlayWithAnimID(int id);
void setAnimePlayStandardType(int id);
void setFlag(int flag);
void clearFlag(int flag);
bool testFlag(int flag);
+
+ static daPlBase_c *findByID(int id);
};
class dAcPy_c : public daPlBase_c {
public:
// Can't be assed to build full headers right now
void *getYoshi(); // 80139A90
+
+ static dAcPy_c *findByID(int id);
};
daPlBase_c *GetPlayerOrYoshi(int id);
@@ -2408,16 +2438,17 @@ public: };
-/* TODO
class dActorState_c : public dStageActor_c {
public:
+ dActorState_c();
~dActorState_c();
- virtual void _vfD4();
- virtual void _vfD8();
- virtual void _vfDC();
+ dStateWrapper_c<dActorState_c> acState;
+
+ virtual void beginState_Gegneric();
+ virtual void executeState_Gegneric();
+ virtual void endState_Gegneric();
};
-*/
class dActorMultiState_c : public dStageActor_c {
@@ -2787,6 +2818,40 @@ class dWaterManager_c { class BgGmBase : public dBase_c {
public:
+ struct something_s {
+ u16 x, y;
+ int layer, countdown, tile;
+ };
+ struct limitLineEntry_s {
+ float leftX, rightX;
+ float _8, _C, _10, y, _18, _1C, _20, _24, _28, _2C;
+ float zoneY, zoneHeight, zoneX, zoneWidth;
+ u16 flags; // documented in idb struct, kind of
+ };
+ struct manualZoomEntry_s {
+ float x1, x2, y1, y2;
+ u8 unkValue6, zoomLevel, firstFlag;
+ };
+ struct beets_s {
+ float _0, _4;
+ u8 _8;
+ };
+
+ u32 behaviours; //type?
+
+ int somethingCount;
+ something_s somethings[256];
+
+ // Limit lines grouped by:
+ // 64 zones; 8 groups IDed by mysterious setting; 16 lines per group
+ limitLineEntry_s limitLines[64][8][16];
+
+ manualZoomEntry_s manualZooms[64];
+
+ u32 _8F478, _8F47C;
+
+ beets_s beets1[100];
+ beets_s beets2[100];
// TODO, a lot
u16 *getPointerToTile(int x, int y, int layer, int *pBlockNum = 0, bool unused = false);
@@ -2975,6 +3040,7 @@ public: void plotPixel(u16 x, u16 y, GXColor pixel); // 802C1570
+ void *getBuffer() const { return buffer; }
u16 width;
u16 height;
@@ -3577,6 +3643,11 @@ inline int GetAreaNum() { return st[0x120E];
}
+inline u8 *GetStaffCreditScore() {
+ char *thing = ((char*)StagePtr) + 0x11FC;
+ return *((u8**)thing);
+}
+
class ClassWithCameraInfo {
@@ -3855,8 +3926,12 @@ class dYesNoWindow_c : public dBase_c { };
+class daBossDemo_c;
class StageE4 {
public:
+ u8 ___[0x14];
+ daBossDemo_c *currentBossDemo;
+ // NOT COMPLETE
static StageE4 *instance;
void killAllEnemiesAtLevelEnd(int type);
@@ -3891,5 +3966,160 @@ struct PlayerAnimState { };
extern PlayerAnimState PlayerAnimStates[177];
+
+class daEnBossKoopaDemoPeach_c : public dEn_c {
+ public:
+ mHeapAllocator_c allocator;
+ int stage;
+ nw4r::g3d::ResFile resFile;
+ m3d::mdl_c model;
+ m3d::anmChr_c chrAnm;
+ m3d::anmTexPat_c patAnm;
+ u8 _mysteryData[0x38];
+ int counter;
+ u16 _628;
+ float _62C;
+ u32 cageID;
+ bool dontCallYet;
+ mEf::es2 effects[1];
+
+
+ int onCreate();
+ int onDelete();
+ int onExecute();
+ int onDraw();
+
+ daEnBossKoopaDemoPeach_c();
+ ~daEnBossKoopaDemoPeach_c();
+
+ Vec2 _vf70();
+
+ virtual void beginState_Wait();
+ virtual void executeState_Wait();
+ virtual void endState_Wait();
+ virtual void beginState_Call();
+ virtual void executeState_Call();
+ virtual void endState_Call();
+ virtual void beginState_Turn();
+ virtual void executeState_Turn();
+ virtual void endState_Turn();
+ virtual void beginState_Open();
+ virtual void executeState_Open();
+ virtual void endState_Open();
+ virtual void beginState_Rescue();
+ virtual void executeState_Rescue();
+ virtual void endState_Rescue();
+ virtual void beginState_Thank();
+ virtual void executeState_Thank();
+ virtual void endState_Thank();
+
+ REF_NINTENDO_STATE(Wait);
+ REF_NINTENDO_STATE(Call);
+ REF_NINTENDO_STATE(Turn);
+ REF_NINTENDO_STATE(Open);
+ REF_NINTENDO_STATE(Rescue);
+ REF_NINTENDO_STATE(Thank);
+};
+
+class dStageActorMgr_c {
+ public:
+ int depthCounter1, depthCounter2, depthCounter3, depthCounter4;
+
+ u16 storedShorts[1000];
+ u8 storedBytes[1000];
+
+ u16 _BC8;
+ bool _BCA, dontRunThings;
+ u32 lastScreenLeft, lastScreenTop, _BD4, _BD8;
+
+ static dStageActorMgr_c *instance;
+};
+
+class daBossDemo_c : public dActorState_c {
+ public:
+ int onCreate();
+ int onDelete();
+ int onExecute();
+ int onDraw();
+ void willBeDeleted();
+
+ int counter;
+ u32 _3D4, idOfOtherActor;
+
+ virtual void beginState_Ready();
+ virtual void executeState_Ready();
+ virtual void endState_Ready();
+ virtual void beginState_BattleStDemo();
+ virtual void executeState_BattleStDemo();
+ virtual void endState_BattleStDemo();
+ virtual void beginState_BattleIn();
+ virtual void executeState_BattleIn();
+ virtual void endState_BattleIn();
+ virtual void beginState_BattleEdDemo();
+ virtual void executeState_BattleEdDemo();
+ virtual void endState_BattleEdDemo();
+
+ virtual bool beatLevel();
+ virtual void exitLevel();
+
+ virtual void beginSomething() { }
+ virtual void endSomething() { }
+
+ virtual u32 getIdOfOtherActor() { return idOfOtherActor; }
+ virtual void setIdOfOtherActor(int id) { idOfOtherActor = id; }
+
+ virtual bool vf128() { return false; }
+ virtual u32 justReturnField3D4_decidesIfEndBattle() { return _3D4; }
+ virtual bool vf130() { return true; }
+
+ virtual dStageActor_c *getActorPointerForSomething() { return 0; }
+
+ virtual void init();
+
+ USING_STATES(daBossDemo_c);
+ REF_NINTENDO_STATE(Ready);
+ REF_NINTENDO_STATE(BattleStDemo);
+ REF_NINTENDO_STATE(BattleIn);
+ REF_NINTENDO_STATE(BattleEdDemo);
+};
+
+class BalloonRelatedClass {
+ public:
+ static BalloonRelatedClass *instance;
+
+ u32 ___[0x20];
+ u32 _20;
+};
+
+class Stage80 {
+ public:
+ static Stage80 *instance;
+
+ float acparamb1, acparambptr, acparamb2, acparamb3, acparamb4;
+ float acparam1, acparamptr, acparam2, acparam3, acparam4;
+ float screenXOffset, screenYOffset;
+ u32 someFlag; // &1 = dEn_c::add2ToYSpeed(), &2 = pow, &4 = mpgp
+ u32 _34;
+ u8 _38, _39;
+ int lengthOfPow, lengthOfMPGP;
+};
+
+class dTheEnd_c : public dBase_c {
+ public:
+ m2d::EmbedLayout_c layout;
+ dStateWrapper_c<dTheEnd_c> state;
+
+ nw4r::lyt::Pane *rootPane;
+
+ bool layoutLoaded, willShow, willHide, animationPlaying;
+};
+inline dTheEnd_c *GetTheEnd() {
+ char *thing = ((char*)StagePtr) + 0x1200;
+ return *((dTheEnd_c**)thing);
+}
+
+extern void *_8042A788;
+extern "C" void sub_8019C390(void *, int);
+
#endif
|