Skip to content

Commit

Permalink
Standard names for struct fields (#1103)
Browse files Browse the repository at this point in the history
* position -> pos

* rotation -> rot

* velocity -> vel

* distance -> dist

* current -> cur

* current -> cur
  • Loading branch information
ethteck authored Jul 30, 2023
1 parent ae66312 commit b9cc734
Show file tree
Hide file tree
Showing 556 changed files with 7,530 additions and 7,535 deletions.
199 changes: 97 additions & 102 deletions include/common_structs.h

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions include/effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ typedef struct FlowerFXData {
/* 0x18 */ Vec3f scale;
/* 0x24 */ Vec3f rot;
/* 0x30 */ Mtx transformMtx;
/* 0x70 */ f32 velocityScaleA;
/* 0x74 */ f32 velocityScaleB;
/* 0x70 */ f32 velScaleA;
/* 0x74 */ f32 velScaleB;
/* 0x78 */ f32 visibilityAmt; // when this is zero, the flower can vanish. may have once controlled alpha.
/* 0x7C */ f32 unk_7C;
/* 0x80 */ f32 integrator[4];
/* 0x90 */ VecXZf velocity;
/* 0x90 */ VecXZf vel;
} FlowerFXData; // size = 0x98

typedef struct CloudPuffFXData {
Expand Down Expand Up @@ -833,7 +833,7 @@ typedef struct LightRaysFXData {
/* 0x50 */ f32 unk_50;
/* 0x54 */ f32 unk_54;
/* 0x58 */ f32 unk_58;
/* 0x5C */ Vec3f rotation;
/* 0x5C */ Vec3f rot;
/* 0x68 */ f32 unk_68;
/* 0x6C */ f32 unk_6C;
/* 0x70 */ Vec3f initialRot;
Expand Down Expand Up @@ -1746,7 +1746,7 @@ typedef struct ThrowSpinyFXData {
/* 0x48 */ f32 gravity;
/* 0x4C */ f32 unk_4C;
/* 0x50 */ f32 yaw;
/* 0x54 */ f32 rotationSpeed;
/* 0x54 */ f32 rotSpeed;
/* 0x58 */ f32 xScale;
/* 0x5C */ f32 yScale;
/* 0x60 */ u32 state;
Expand Down Expand Up @@ -2065,7 +2065,7 @@ typedef struct StaticStatusFXData {
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ s32 frame; // not visible when negative
/* 0x24 */ f32 rotation;
/* 0x24 */ f32 rot;
/* 0x28 */ s32 timeLeft;
/* 0x2C */ s32 lifetime;
/* 0x30 */ s32 alpha;
Expand Down Expand Up @@ -2125,7 +2125,7 @@ typedef struct Effect75FXData {
typedef struct FireworkRocketFXData {
/* 0x00 */ s32 variation;
/* 0x04 */ Vec3f pos;
/* 0x10 */ Vec3f velocity;
/* 0x10 */ Vec3f vel;
/* 0x1C */ s32 timeLeft;
/* 0x20 */ s32 lifeTime;
/* 0x24 */ s32 r;
Expand All @@ -2142,9 +2142,9 @@ typedef struct FireworkRocketFXData {
/* 0x50 */ f32 rocketX[4];
/* 0x60 */ f32 rocketY[4];
/* 0x70 */ f32 rocketZ[4];
/* 0x80 */ f32 rocketVelocityX[4];
/* 0x90 */ f32 rocketVelocityY[4];
/* 0xA0 */ f32 rocketVelocityZ[4];
/* 0x80 */ f32 rocketVelX[4];
/* 0x90 */ f32 rocketVelY[4];
/* 0xA0 */ f32 rocketVelZ[4];
} FireworkRocketFXData; // size = 0xB0

typedef struct PeachStarBeamSpirit {
Expand All @@ -2168,8 +2168,8 @@ typedef struct PeachStarBeamFXData {
/* 0x34 */ s32 envA;
/* 0x38 */ f32 beamScale;
/* 0x3C */ s32 unk_3C;
/* 0x40 */ f32 rotationSpeed;
/* 0x44 */ f32 rotationAngle;
/* 0x40 */ f32 rotSpeed;
/* 0x44 */ f32 rotAngle;
/* 0x48 */ f32 circleRadius;
/* 0x4C */ Vec3f circleCenter;
/* 0x58 */ f32 twinkYOffset;
Expand Down Expand Up @@ -2207,7 +2207,7 @@ typedef struct IceShardFXData {
/* 0x18 */ Color4i primCol;
/* 0x28 */ Color4i envCol;
/* 0x38 */ f32 scale;
/* 0x3C */ f32 rotation;
/* 0x3C */ f32 rot;
/* 0x40 */ f32 angularVel;
/* 0x44 */ f32 animFrame;
/* 0x48 */ f32 animRate;
Expand Down Expand Up @@ -2332,7 +2332,7 @@ typedef struct PartnerBuffFXData {

typedef struct QuizmoAssistantFXData {
/* 0x00 */ s32 unk_00;
/* 0x04 */ Vec3f position;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 vanishTimer;
/* 0x14 */ s32 lifetime;
/* 0x18 */ s32 fadeInAmt; // 0 = all-black, FF = fully-visible
Expand Down
34 changes: 17 additions & 17 deletions include/entity.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct SaveBlockData {
} SaveBlockData; // size = 0x20

typedef struct SwitchData {
/* 0x000 */ f32 fallVelocity;
/* 0x000 */ f32 fallVel;
/* 0x004 */ f32 deltaScaleX;
/* 0x008 */ f32 deltaScaleY;
/* 0x00C */ char unk_0C[4];
Expand Down Expand Up @@ -155,31 +155,31 @@ typedef struct HeartBlockContentData {
/* 0x00B */ char unk_0B; // padding?
/* 0x00C */ s32 unk_0C;
/* 0x010 */ s32 unk_10;
/* 0x014 */ f32 riseVelocity;
/* 0x014 */ f32 riseVel;
/* 0x018 */ f32 sparkleTrailAngle;
/* 0x01C */ f32 sparkleTrailRadius;
/* 0x020 */ f32 bouncePhase;
/* 0x024 */ u16 yawBufferPos;
/* 0x026 */ s16 unk_26;
/* 0x028 */ f32 yawBuffer[10];
/* 0x050 */ f32 unk_50;
/* 0x054 */ f32 rotationRate;
/* 0x054 */ f32 rotRate;
/* 0x058 */ Mtx unk_58;
/* 0x098 */ Mtx unk_98;
} HeartBlockContentData; // size = 0xD8

typedef struct WoodenCrateData {
/* 0x000 */ s32 itemID;
/* 0x004 */ u16 globalFlagIndex;
/* 0x006 */ u8 unk_06[2];
/* 0x006 */ u8 unk_06[2];
/* 0x008 */ Gfx** fragmentsGfx;
/* 0x00C */ f32 basePosY;
/* 0x010 */ s8 fragmentRebounds[36];
/* 0x034 */ u8 fragmentMoveAngle[36]; // X,Z plane -- scaled to map [0,255] -> [0,360], also used as fragment alpha
/* 0x058 */ u8 fragmentRotX[36]; // scaled to map [0,255] -> [0,360]
/* 0x07C */ u8 fragmentRotY[36]; // scaled to map [0,255] -> [0,360]
/* 0x0A0 */ u8 fragmentLateralSpeed[36]; // scaled to map [0,255] -> [0,25.5]
/* 0x0C4 */ f32 fragmentRotationSpeed[36];
/* 0x0C4 */ f32 fragmentRotSpeed[36];
/* 0x154 */ f32 fragmentPosX[36];
/* 0x1E4 */ f32 fragmentPosY[36];
/* 0x274 */ f32 fragmentPosZ[36];
Expand Down Expand Up @@ -218,7 +218,7 @@ typedef struct BlueWarpPipeData {
} BlueWarpPipeData; // size = 0x1C

typedef struct SimpleSpringData {
/* 0x00 */ s32 launchVelocity;
/* 0x00 */ s32 launchVel;
} SimpleSpringData; // size = 0x04

typedef struct HiddenPanelData {
Expand All @@ -235,9 +235,9 @@ typedef struct HiddenPanelData {
/* 0x14 */ s32 spawnedItemIndex;
/* 0x18 */ Vec3i spawnedItemPos;
/* 0x24 */ f32 initialY;
/* 0x28 */ f32 riseVelocity;
/* 0x28 */ f32 riseVel;
/* 0x2C */ f32 riseInterpPhase;
/* 0x30 */ f32 rotationSpeed;
/* 0x30 */ f32 rotSpeed;
/* 0x34 */ Matrix4f entityMatrix;
/* 0x74 */ u16 modelID;
/* 0x76 */ char unk_76[0x2];
Expand All @@ -252,7 +252,7 @@ typedef struct PadlockData {
/* 0x00 */ f32 pushSpeed;
/* 0x04 */ f32 shacklePos;
/* 0x08 */ f32 fallSpeed;
/* 0x0C */ f32 rotationSpeed;
/* 0x0C */ f32 rotSpeed;
/* 0x10 */ u8 blinkCounter;
/* 0x11 */ s8 timer;
/* 0x12 */ s8 state;
Expand All @@ -269,7 +269,7 @@ typedef struct BoardedFloorData {
/* 0x022 */ u8 fragmentRotX[13];
/* 0x02F */ u8 fragmentRotY[13];
/* 0x03C */ u8 fragmentLateralSpeed[13];
/* 0x04C */ f32 fragmentRotationSpeed[13];
/* 0x04C */ f32 fragmentRotSpeed[13];
/* 0x080 */ f32 fragmentPosX[13];
/* 0x0B4 */ f32 fragmentPosY[13];
/* 0x0E8 */ f32 fragmentPosZ[13];
Expand All @@ -284,7 +284,7 @@ typedef struct BombableRockData {
/* 0x14 */ u8 fragmentRotX[6];
/* 0x1A */ u8 fragmentRotY[6];
/* 0x20 */ u8 fragmentLateralSpeed[6];
/* 0x28 */ f32 fragmentRotationSpeed[6];
/* 0x28 */ f32 fragmentRotSpeed[6];
/* 0x40 */ f32 fragmentPosX[6];
/* 0x58 */ f32 fragmentPosY[6];
/* 0x70 */ f32 fragmentPosZ[6];
Expand All @@ -298,7 +298,7 @@ typedef struct TweesterData {
/* 0x01 */ s8 faceAnimState;
/* 0x02 */ s8 faceAnimTimer;
/* 0x03 */ s8 faceAnimTexOffset;
/* 0x04 */ f32 rotationSpeed;
/* 0x04 */ f32 rotSpeed;
/* 0x08 */ f32 innerWhirlRotY;
/* 0x0C */ f32 outerWhirlRotY;
/* 0x10 */ Mtx mtxInnerWhirl;
Expand All @@ -308,7 +308,7 @@ typedef struct TweesterData {
/* 0x94 */ s16 outerWhirlTexOffsetX;
/* 0x96 */ s16 outerWhirlTexOffsetY;
/* 0x98 */ s16 frameCounter;
/* 0x9C */ s32* currentPath;
/* 0x9C */ s32* curPath;
/* 0xA0 */ s32** paths;
/* 0xA4 */ s16 targetX;
/* 0xA6 */ s16 targetY;
Expand All @@ -330,9 +330,9 @@ typedef struct StarBoxLauncherData {
/* 0x0C */ f32 basePosZ;
/* 0x10 */ f32 basePosY;
/* 0x14 */ f32 riseSpeedPhase;
/* 0x18 */ f32 riseVelocity;
/* 0x1C */ f32 rotationZPhase;
/* 0x20 */ f32 maxRotationZ;
/* 0x18 */ f32 riseVel;
/* 0x1C */ f32 rotZPhase;
/* 0x20 */ f32 maxRotZ;
} StarBoxLauncherData; // size = 0x24

typedef struct CymbalPlantData {
Expand All @@ -353,7 +353,7 @@ typedef struct PinkFlowerData {
typedef struct SpinningFlowerData {
/* 0x00 */ s16 unk_00;
/* 0x02 */ s8 state;
/* 0x04 */ Vec3f rotation;
/* 0x04 */ Vec3f rot;
/* 0x10 */ s32 unk_10;
/* 0x14 */ f32 spinSpeed;
/* 0x18 */ s32 unk_18;
Expand Down
14 changes: 7 additions & 7 deletions include/npc.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ typedef void (*FireBarCallback)(struct FireBarData*, s32);

typedef struct FireBarAISettings {
/* 0x00 */ Vec3i centerPos;
/* 0x0C */ s32 rotationRate;
/* 0x0C */ s32 rotRate;
/* 0x10 */ s32 firstNpc;
/* 0x14 */ s32 npcCount;
/* 0x18 */ FireBarCallback callback;
Expand All @@ -126,7 +126,7 @@ typedef struct FireBarAISettings {
typedef struct FireBarData {
/* 0x00 */ s32 flags;
/* 0x04 */ Vec3f centerPos;
/* 0x10 */ f32 rotationRate;
/* 0x10 */ f32 rotRate;
/* 0x14 */ s32 firstNpc;
/* 0x18 */ s32 npcCount;
/* 0x1C */ FireBarCallback callback;
Expand Down Expand Up @@ -391,16 +391,16 @@ typedef struct EncounterStatus {
/* 0x014 */ s32 songID;
/* 0x018 */ s32 unk_18;
/* 0x01C */ s8 numEncounters; /* number of encounters for current map (in list) */
/* 0x01D */ s8 currentAreaIndex;
/* 0x01E */ u8 currentMapIndex;
/* 0x01F */ u8 currentEntryIndex;
/* 0x01D */ s8 curAreaIndex;
/* 0x01E */ u8 curMapIndex;
/* 0x01F */ u8 curEntryIndex;
/* 0x020 */ s8 mapID;
/* 0x021 */ s8 resetMapEncounterFlags;
/* 0x021 */ char unk_22[2];
/* 0x024 */ s32* npcGroupList;
/* 0x028 */ Encounter* encounterList[24];
/* 0x088 */ Encounter* currentEncounter;
/* 0x08C */ Enemy* currentEnemy;
/* 0x088 */ Encounter* curEncounter;
/* 0x08C */ Enemy* curEnemy;
/* 0x090 */ s32 fadeOutAmount;
/* 0x094 */ s32 unk_94;
/* 0x098 */ s32 fadeOutAccel;
Expand Down
Loading

0 comments on commit b9cc734

Please sign in to comment.