From ab9cb395b290ccacd6092b0e473f35520188232c Mon Sep 17 00:00:00 2001 From: Treeki Date: Wed, 1 Feb 2012 00:29:02 +0100 Subject: header updates --- include/game.h | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- kamek_pal.x | 11 ++++++++ 2 files changed, 84 insertions(+), 6 deletions(-) diff --git a/include/game.h b/include/game.h index 590fd1c..d055097 100755 --- a/include/game.h +++ b/include/game.h @@ -1585,6 +1585,10 @@ public: class dStageActor_c : public dActor_c { public: + enum StageActorType { + NormalType, PlayerType, YoshiType, EntityType + }; + u8 _125; u32 _128, _12C, _130, _134, _138, _13C; float _140; @@ -1592,7 +1596,7 @@ public: ActivePhysics aPhysics; collisionMgr_c collMgr; u8 classAt2DC[0x34]; - u32 _310, _314; + float _310, _314; float spriteSomeRectX, spriteSomeRectY; float _320, _324, _328, _32C, _330, _334, _338, _33C, _340, _344; u8 direction; @@ -1600,8 +1604,8 @@ public: u8 _34A, _34B; u8 *spriteByteStorage; u16 *spriteShortStorage; - u16 spriteEventNum; - u64 spriteEventMask; + u16 spriteFlagNum; + u64 spriteFlagMask; u32 _360; u16 spriteSomeFlag; u8 _366, _367; @@ -1610,7 +1614,7 @@ public: u8 _36D; Vec somethingRelatedToScale; u32 _37C, _380, _384, _388; - u8 _38C; + u8 stageActorType; u8 which_player; // _38D u8 enableFlag, currentLayerID; u8 _390, _391, _392, _padding; @@ -1660,7 +1664,7 @@ public: // I'll add methods as I need them int outOfZone(Vec3 pos, float* rect, u8 zone); - int checkZoneBoundaries(u32 flags); // I think this method is for that, anyway + bool checkZoneBoundaries(u32 flags); // I think this method is for that, anyway void Delete(u8 param1); // fBase_c::Delete(void); ~dStageActor_c(); @@ -1668,6 +1672,12 @@ public: static void create(Actors type, u32 settings, Vec *pos, S16Vec *rot, u8 layer); static void createChild(Actors type, u32 settings, Vec *pos, S16Vec *rot, u8 layer); + + // these are valid while in onCreate + static u8 *creatingByteStorage; // 0x80429FF4 + static u16 creatingFlagID; // 0x80429FF8 + static u64 creatingFlagMask; // 0x8042A000 + static u8 creatingLayerID; // 0x8042A000 }; @@ -1979,7 +1989,18 @@ public: }; -class dBgGm_c { +class BgGmBase : public dBase_c { +public: + // TODO, a lot + + u16 *getPointerToTile(int x, int y, int layer, int *pBlockNum = 0, bool unused = false); + + // Note: these tile numbers are kinda weird and involve GetTileFromTileTable + void placeTile(u16 x, u16 y, int layer, int tile); +}; + + +class dBgGm_c : public BgGmBase { public: // TODO TODO TODO TODO TODO static dBgGm_c *instance; @@ -2452,6 +2473,52 @@ inline void scaleDown(Vec* scale, float amt) { scale->x -= amt; scale->y -= amt; inline void scaleUp(Vec* scale, float amt) { scale->x -= amt; scale->y -= amt; scale->z -= amt; } +void ConvertStagePositionToScreenPosition(Vec2 *screen, Vec *stage); + + +class SoundPlayingClass /* : public something */ { +public: + // Size: 0x17C + + void PlaySoundAtPosition(int id, Vec2 *pos, u32 flags); // 80198D70 + + static SoundPlayingClass *instance1; // 8042A03C + static SoundPlayingClass *instance2; // 8042A03C + static SoundPlayingClass *instance3; // 8042A03C +}; + + +class dEffectBreakBase_c { + // TODO (not really needed, though) +}; + +class dEffectBreakMgr_c { + public: + static dEffectBreakMgr_c *instance; + + dEffectBreakMgr_c(); + ~dEffectBreakMgr_c(); + + void execute(); + void draw(); + + bool spawnTile(Vec *position, u32 settings, char param); + // Settings: + // (BlockType << 8) | (HalfSpeedFlag << 4) | (VelocityChange & 3) + // + // Types: + // 0=Brick, 1=Stone, 2=Wood, 3=Question, 4=Used + // 5=Red, 6=Used, 7=Unused, 8=Final Battle + + bool spawnIcePiece(Vec *position, u32 settings, char param); + + // Three more still need to be REed + + private: + bool prepare(dEffectBreakBase_c *ef, Vec *pos, u32 settings, u8 param); + void cleanup(); + void cleanupAll(); +}; struct SSM { short width, height; float xScale, yScale; }; diff --git a/kamek_pal.x b/kamek_pal.x index 9b293c1..57a87b7 100644 --- a/kamek_pal.x +++ b/kamek_pal.x @@ -36,6 +36,9 @@ SECTIONS { doSpriteMovement = 0x800955F0; + instance__17dEffectBreakMgr_c = 0x8042A1C8; + spawnTile__17dEffectBreakMgr_cFP7Point3dUic = 0x800925F0; + CollidedWithTile = 0x80070CB0; SomeStrangeModification = 0x80096E60; @@ -49,6 +52,11 @@ SECTIONS { SoundRelatedClass = 0x8042A768; + ConvertStagePositionToScreenPosition__FP7Point2dP7Point3d = 0x8006A4B0; + + PlaySoundAtPosition__17SoundPlayingClassFiP7Point2dUi = 0x80198D70; + instance2__17SoundPlayingClass = 0x8042A768; + ExitStage__Fiiii = 0x80102370; @@ -492,6 +500,9 @@ SECTIONS { getTileRendererList__7dBgGm_cFi = 0x80078520; + getPointerToTile__8BgGmBaseFiiiPib = 0x80077520; + placeTile__8BgGmBaseFUsUsii = 0x80077860; + add__Q212TileRenderer4ListFP12TileRenderer = 0x80014820; remove__Q212TileRenderer4ListFP12TileRenderer = 0x80014860; -- cgit v1.2.3