mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Santas workshop (#670)
* initial name changes * hud_element function names * missing player data fields * entity cleanup * missed a few things + starting action states * some world partner cleanup * idle/walk/hammer + peach cooking stuff * clean Co-authored-by: HailSanta <Hail2Santa@gmail.com> Co-authored-by: Ethan Roseman <ethteck@gmail.com>
This commit is contained in:
parent
70a0b67237
commit
7dbd1770ec
@ -69,6 +69,11 @@ typedef struct Vec2f {
|
|||||||
/* 0x04 */ f32 y;
|
/* 0x04 */ f32 y;
|
||||||
} Vec2f; // size = 0x08
|
} Vec2f; // size = 0x08
|
||||||
|
|
||||||
|
typedef struct Vec2XZf {
|
||||||
|
/* 0x00 */ f32 x;
|
||||||
|
/* 0x04 */ f32 z;
|
||||||
|
} Vec2XZf; // size = 0x08
|
||||||
|
|
||||||
typedef struct Vec3f {
|
typedef struct Vec3f {
|
||||||
/* 0x00 */ f32 x;
|
/* 0x00 */ f32 x;
|
||||||
/* 0x04 */ f32 y;
|
/* 0x04 */ f32 y;
|
||||||
@ -247,29 +252,32 @@ typedef struct PlayerData {
|
|||||||
/* 0x28E */ s8 maxStarPower;
|
/* 0x28E */ s8 maxStarPower;
|
||||||
/* 0x28F */ char unk_28F;
|
/* 0x28F */ char unk_28F;
|
||||||
/* 0x290 */ s16 specialBarsFilled;
|
/* 0x290 */ s16 specialBarsFilled;
|
||||||
/* 0x292 */ s8 unk_292;
|
/* 0x292 */ s8 starBeamLevel;
|
||||||
/* 0x293 */ char unk_293[0x1];
|
/* 0x293 */ char unk_293;
|
||||||
/* 0x294 */ u16 otherHitsTaken;
|
/* 0x294 */ u16 actionCommandAttempts;
|
||||||
/* 0x296 */ s16 unk_296;
|
/* 0x296 */ s16 actionCommandSuccesses;
|
||||||
/* 0x298 */ u16 hitsTaken;
|
/* 0x298 */ u16 hitsTaken;
|
||||||
/* 0x29A */ u16 hitsBlocked;
|
/* 0x29A */ u16 hitsBlocked;
|
||||||
/* 0x29C */ s16 playerFirstStrikes;
|
/* 0x29C */ s16 playerFirstStrikes;
|
||||||
/* 0x29E */ s16 enemyFirstStrikes;
|
/* 0x29E */ s16 enemyFirstStrikes;
|
||||||
/* 0x2A0 */ u16 powerBounces;
|
/* 0x2A0 */ u16 powerBounces;
|
||||||
/* 0x2A2 */ u16 battlesCount;
|
/* 0x2A2 */ u16 battlesCount;
|
||||||
/* 0x2A4 */ s16 unk_2A4[4];
|
/* 0x2A4 */ s16 battlesWon;
|
||||||
/* 0x2AC */ s32 unk_2AC;
|
/* 0x2A6 */ s16 unk_2A6;
|
||||||
/* 0x2B0 */ s32 unk_2B0;
|
/* 0x2A8 */ s16 battlesFled;
|
||||||
|
/* 0x2AA */ s16 trainingsDone;
|
||||||
|
/* 0x2AC */ s32 walkingStepsTaken;
|
||||||
|
/* 0x2B0 */ s32 runningStepsTaken;
|
||||||
/* 0x2B4 */ u32 totalCoinsEarned;
|
/* 0x2B4 */ u32 totalCoinsEarned;
|
||||||
/* 0x2B8 */ s16 idleFrameCounter; /* frames with no inputs, overflows ever ~36 minutes of idling */
|
/* 0x2B8 */ s16 idleFrameCounter; /* frames with no inputs, overflows ever ~36 minutes of idling */
|
||||||
/* 0x2BA */ char unk_2BA[2];
|
/* 0x2BA */ char unk_2BA[2];
|
||||||
/* 0x2BC */ u32 frameCounter; /* increases by 2 per frame */
|
/* 0x2BC */ u32 frameCounter; /* increases by 2 per frame */
|
||||||
/* 0x2C0 */ s16 quizzesAnswered;
|
/* 0x2C0 */ s16 quizzesAnswered;
|
||||||
/* 0x2C2 */ s16 quizzesCorrect;
|
/* 0x2C2 */ s16 quizzesCorrect;
|
||||||
/* 0x2C4 */ s32 unk_2C4[12];
|
/* 0x2C4 */ s32 partnerUnlockedTime[12];
|
||||||
/* 0x2F4 */ s32 unk_2F4[12];
|
/* 0x2F4 */ s32 partnerUsedTime[12];
|
||||||
/* 0x324 */ s32 tradeEventStartTime;
|
/* 0x324 */ s32 tradeEventStartTime;
|
||||||
/* 0x328 */ s32 unk_328;
|
/* 0x328 */ s32 droTreeOrbitTime;
|
||||||
/* 0x32C */ s16 starPiecesCollected;
|
/* 0x32C */ s16 starPiecesCollected;
|
||||||
/* 0x32E */ s16 jumpGamePlays;
|
/* 0x32E */ s16 jumpGamePlays;
|
||||||
/* 0x330 */ s32 jumpGameTotal; /* all-time winnings, max = 99999 */
|
/* 0x330 */ s32 jumpGameTotal; /* all-time winnings, max = 99999 */
|
||||||
@ -397,16 +405,18 @@ typedef struct struct802E2BA4 {
|
|||||||
} struct802E2BA4;
|
} struct802E2BA4;
|
||||||
|
|
||||||
// from 102c80, size unknown.
|
// from 102c80, size unknown.
|
||||||
typedef struct struct802E1400 {
|
typedef struct SwitchData {
|
||||||
/* 0x000 */ Vec3f unk_00;
|
/* 0x000 */ f32 fallVelocity;
|
||||||
|
/* 0x004 */ f32 deltaScaleX;
|
||||||
|
/* 0x008 */ f32 deltaScaleY;
|
||||||
/* 0x00C */ char unk_0C[4];
|
/* 0x00C */ char unk_0C[4];
|
||||||
/* 0x010 */ s8 unk_10;
|
/* 0x010 */ s8 animStateScaleX;
|
||||||
/* 0x011 */ s8 unk_11;
|
/* 0x011 */ s8 animStateScaleY;
|
||||||
/* 0x014 */ Vec3f unk_14;
|
/* 0x014 */ Vec3f baseScale;
|
||||||
/* 0x020 */ u16 unk_20;
|
/* 0x020 */ u16 areaFlagIndex;
|
||||||
/* 0x022 */ s16 unk_22;
|
/* 0x022 */ s16 greenMotionTimer;
|
||||||
/* 0x024 */ s16 unk_24;
|
/* 0x024 */ s16 scaleAnimTimer;
|
||||||
/* 0x028 */ struct Entity* attachedEntity;
|
/* 0x028 */ struct Entity* linkedSwitch; /* a hidden switch can be linked to a visible one and automatically trigger it on hit */
|
||||||
/* 0x02C */ char unk_2C[8];
|
/* 0x02C */ char unk_2C[8];
|
||||||
/* 0x034 */ struct802E2BA4* unk_34;
|
/* 0x034 */ struct802E2BA4* unk_34;
|
||||||
/* 0x038 */ f32 unk_38;
|
/* 0x038 */ f32 unk_38;
|
||||||
@ -415,16 +425,16 @@ typedef struct struct802E1400 {
|
|||||||
/* */ s8 b[2];
|
/* */ s8 b[2];
|
||||||
} unk_3C;
|
} unk_3C;
|
||||||
/* 0x03E */ char unk_3E[0x4D];
|
/* 0x03E */ char unk_3E[0x4D];
|
||||||
/* 0x08B */ u8 unk_8B[24];
|
/* 0x08B */ u8 fragmentRotX[24]; // scaled to map [0,255] -> [0,360]
|
||||||
/* 0x0A3 */ char unk_A3; // padding?
|
/* 0x0A3 */ char unk_A3; // padding?
|
||||||
/* 0x0A4 */ u8 unk_A4[24];
|
/* 0x0A4 */ u8 fragmentRotY[24]; // scaled to map [0,255] -> [0,360]
|
||||||
/* 0x0BC */ char unk_BC[4];
|
/* 0x0BC */ char unk_BC[4];
|
||||||
/* 0x0C0 */ f32 unk_C0[24];
|
/* 0x0C0 */ f32 fragmentPosX[24];
|
||||||
/* 0x120 */ char unk_120[4];
|
/* 0x120 */ char unk_120[4];
|
||||||
/* 0x124 */ f32 unk_124[24];
|
/* 0x124 */ f32 fragmentPosY[24];
|
||||||
/* 0x184 */ char unk_184[4];
|
/* 0x184 */ char unk_184[4];
|
||||||
/* 0x188 */ f32 unk_188[24];
|
/* 0x188 */ f32 fragmentPosZ[24];
|
||||||
} struct802E1400;
|
} SwitchData;
|
||||||
|
|
||||||
// from 104940_len_dc0, size unknown
|
// from 104940_len_dc0, size unknown
|
||||||
// appears to belong to the hammer blocks(?)
|
// appears to belong to the hammer blocks(?)
|
||||||
@ -490,6 +500,54 @@ typedef struct SuperBlockContentData {
|
|||||||
/* 0x12C */ s32* unk_12C;
|
/* 0x12C */ s32* unk_12C;
|
||||||
} SuperBlockContentData;
|
} SuperBlockContentData;
|
||||||
|
|
||||||
|
// size unknown
|
||||||
|
typedef struct HeartBlockContentData {
|
||||||
|
/* 0x000 */ u8 parentEntityIndex; // for block entities spawned by other block entities
|
||||||
|
/* 0x001 */ u8 state;
|
||||||
|
/* 0x002 */ s8 sparkleTimer;
|
||||||
|
/* 0x003 */ s8 sparkleTrailTimer;
|
||||||
|
/* 0x004 */ f32 sparkleTrailPosY;
|
||||||
|
/* 0x008 */ char heartbeatTimer;
|
||||||
|
/* 0x009 */ u8 unk_09;
|
||||||
|
/* 0x00A */ u8 sparkleEffectType;
|
||||||
|
/* 0x00B */ char unk_0B; // padding?
|
||||||
|
/* 0x00C */ s32 unk_0C;
|
||||||
|
/* 0x010 */ s32 unk_10;
|
||||||
|
/* 0x014 */ f32 riseVelocity;
|
||||||
|
/* 0x018 */ f32 sparkleTrailAngle;
|
||||||
|
/* 0x01C */ f32 sparkleTrailRadius;
|
||||||
|
/* 0x020 */ f32 bouncePhase;
|
||||||
|
/* 0x024 */ u16 yawBufferPos;
|
||||||
|
/* 0x024 */ s16 unk_26;
|
||||||
|
/* 0x028 */ f32 yawBuffer[10];
|
||||||
|
/* 0x050 */ f32 unk_50;
|
||||||
|
/* 0x054 */ f32 rotationRate;
|
||||||
|
/* 0x058 */ char unk_58[0x78];
|
||||||
|
/* 0x0D0 */ u16 yawBufferPosX;
|
||||||
|
/* 0x0D4 */ f32 yawBufferX[20];
|
||||||
|
/* 0x124 */ s32 unk_124;
|
||||||
|
/* 0x128 */ s32* unk_128;
|
||||||
|
/* 0x12C */ s32* unk_12C;
|
||||||
|
} HeartBlockContentData;
|
||||||
|
|
||||||
|
typedef struct WoodenCrateData {
|
||||||
|
/* 0x000 */ s32 itemID;
|
||||||
|
/* 0x004 */ u16 globalFlagIndex;
|
||||||
|
/* 0x006 */ u8 unk_06[2];
|
||||||
|
/* 0x008 */ u8* fragmentsGfx; //TODO type when more WoodenCrate.c is done
|
||||||
|
/* 0x00C */ f32 basePosY;
|
||||||
|
/* 0x010 */ u8 fragmentScale[36];
|
||||||
|
/* 0x034 */ s8 fragmentMoveAngle[36]; // X,Z plane -- scaled to map [0,255] -> [0,360]
|
||||||
|
/* 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];
|
||||||
|
/* 0x0C4 */ f32 fragmentFallSpeed[36];
|
||||||
|
/* 0x154 */ f32 fragmentPosX[36];
|
||||||
|
/* 0x1E4 */ f32 fragmentPosY[36];
|
||||||
|
/* 0x274 */ f32 fragmentPosZ[36];
|
||||||
|
/* 0x304 */ f32 unk_304[36];
|
||||||
|
} WoodenCrateData;
|
||||||
|
|
||||||
// size unknown
|
// size unknown
|
||||||
typedef struct ChestData {
|
typedef struct ChestData {
|
||||||
/* 0x00 */ u16 gameFlagIndex;
|
/* 0x00 */ u16 gameFlagIndex;
|
||||||
@ -521,6 +579,10 @@ typedef struct BlueWarpPipeData {
|
|||||||
/* 0x18 */ f32 finalPosY;
|
/* 0x18 */ f32 finalPosY;
|
||||||
} BlueWarpPipeData;
|
} BlueWarpPipeData;
|
||||||
|
|
||||||
|
typedef struct SimpleSpringData {
|
||||||
|
/* 0x00 */ s32 launchVelocity;
|
||||||
|
} SimpleSpringData;
|
||||||
|
|
||||||
// END ENTITY-SPECIFIC STRUCTS
|
// END ENTITY-SPECIFIC STRUCTS
|
||||||
|
|
||||||
typedef s32 (*EntityCallback)(struct Entity*);
|
typedef s32 (*EntityCallback)(struct Entity*);
|
||||||
@ -564,12 +626,16 @@ typedef struct Entity {
|
|||||||
/* 0x3C */ UNK_PTR renderSetupFunc; // pointer to draw func(?)
|
/* 0x3C */ UNK_PTR renderSetupFunc; // pointer to draw func(?)
|
||||||
/* 0x40 */ union {
|
/* 0x40 */ union {
|
||||||
s32* any;
|
s32* any;
|
||||||
|
SwitchData* swtch;
|
||||||
BlockData* block;
|
BlockData* block;
|
||||||
ItemBlockData* itemBlock;
|
ItemBlockData* itemBlock;
|
||||||
SaveBlockData* saveBlock;
|
SaveBlockData* saveBlock;
|
||||||
|
WoodenCrateData* crate;
|
||||||
ChestData* chest;
|
ChestData* chest;
|
||||||
BlueWarpPipeData* bluePipe;
|
BlueWarpPipeData* bluePipe;
|
||||||
|
HeartBlockContentData* heartBlockContent;
|
||||||
SuperBlockContentData* superBlockContent;
|
SuperBlockContentData* superBlockContent;
|
||||||
|
SimpleSpringData* simpleSpring;
|
||||||
s32* unk;
|
s32* unk;
|
||||||
} dataBuf;
|
} dataBuf;
|
||||||
/* 0x44 */ Mtx* vertexData;
|
/* 0x44 */ Mtx* vertexData;
|
||||||
@ -1388,7 +1454,7 @@ typedef struct GameStatus {
|
|||||||
/* 0x07D */ s8 keepUsingPartnerOnMapChange;
|
/* 0x07D */ s8 keepUsingPartnerOnMapChange;
|
||||||
/* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
|
/* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
|
||||||
/* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */
|
/* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */
|
||||||
/* 0x080 */ u8 peachAnimIdx; ///< @see world_action_idle_peachAnims
|
/* 0x080 */ u8 peachCookingIngredient; ///< @see enum CookingIngredient
|
||||||
/* 0x081 */ s8 unk_81;
|
/* 0x081 */ s8 unk_81;
|
||||||
/* 0x082 */ s8 unk_82;
|
/* 0x082 */ s8 unk_82;
|
||||||
/* 0x083 */ s8 unk_83;
|
/* 0x083 */ s8 unk_83;
|
||||||
@ -1939,38 +2005,37 @@ typedef struct FontData {
|
|||||||
typedef struct PlayerStatus {
|
typedef struct PlayerStatus {
|
||||||
/* 0x000 */ s32 flags; // PlayerStatusFlags
|
/* 0x000 */ s32 flags; // PlayerStatusFlags
|
||||||
/* 0x004 */ u32 animFlags;
|
/* 0x004 */ u32 animFlags;
|
||||||
/* 0x008 */ s16 framesOnGround; /* Number of frames since last jump landed */
|
/* 0x008 */ s16 currentStateTime;
|
||||||
/* 0x00A */ s8 unk_0A;
|
/* 0x00A */ s8 unk_0A;
|
||||||
/* 0x00B */ char unk_0B;
|
/* 0x00B */ char unk_0B;
|
||||||
/* 0x00C */ s8 peachDisguise;
|
/* 0x00C */ s8 peachDisguise;
|
||||||
/* 0x00D */ s8 unk_0D;
|
/* 0x00D */ s8 unk_0D;
|
||||||
/* 0x00E */ u8 alpha1;
|
/* 0x00E */ u8 alpha1;
|
||||||
/* 0x00F */ u8 alpha2;
|
/* 0x00F */ u8 alpha2;
|
||||||
/* 0x010 */ s16 unk_10;
|
/* 0x010 */ s16 blinkTimer;
|
||||||
/* 0x012 */ s16 moveFrames;
|
/* 0x012 */ s16 moveFrames;
|
||||||
/* 0x014 */ s8 enableCollisionOverlapsCheck;
|
/* 0x014 */ s8 enableCollisionOverlapsCheck;
|
||||||
/* 0x015 */ s8 statusMenuCounterinputEnabledCounter; /* whether the C-up menu can appear */
|
/* 0x015 */ s8 inputEnabledCounter; /* whether the C-up menu can appear */
|
||||||
/* 0x016 */ Vec3s lastGoodPosition;
|
/* 0x016 */ Vec3s lastGoodPosition;
|
||||||
/* 0x01C */ Vec3f extraVelocity;
|
/* 0x01C */ Vec3f extraVelocity;
|
||||||
/* 0x028 */ Vec3f position;
|
/* 0x028 */ Vec3f position;
|
||||||
/* 0x034 */ char unk_34[8];
|
/* 0x034 */ Vec2f groundAnglesXZ; /* angles along X/Z axes of ground beneath player */
|
||||||
/* 0x03C */ f32 unk_3C;
|
/* 0x03C */ Vec2XZf jumpFromPos;
|
||||||
/* 0x040 */ f32 unk_40;
|
/* 0x044 */ Vec2XZf landPos;
|
||||||
/* 0x044 */ f32 decorationPos[2];
|
/* 0x04C */ f32 jumpFromHeight;
|
||||||
/* 0x04C */ f32 unk_4C;
|
|
||||||
/* 0x050 */ f32 jumpApexHeight;
|
/* 0x050 */ f32 jumpApexHeight;
|
||||||
/* 0x054 */ f32 currentSpeed;
|
/* 0x054 */ f32 currentSpeed;
|
||||||
/* 0x058 */ f32 walkSpeed;
|
/* 0x058 */ f32 walkSpeed;
|
||||||
/* 0x05C */ f32 runSpeed;
|
/* 0x05C */ f32 runSpeed;
|
||||||
/* 0x060 */ s32 unk_60;
|
/* 0x060 */ s32 unk_60;
|
||||||
/* 0x064 */ f32 unk_64;
|
/* 0x064 */ f32 overlapPushAmount;
|
||||||
/* 0x068 */ f32 normalPitch;
|
/* 0x068 */ f32 groundNormalPitch;
|
||||||
/* 0x06C */ f32 unk_6C;
|
/* 0x06C */ f32 maxJumpSpeed;
|
||||||
/* 0x070 */ f32 gravityIntegrator[4];
|
/* 0x070 */ f32 gravityIntegrator[4];
|
||||||
/* 0x080 */ f32 targetYaw;
|
/* 0x080 */ f32 targetYaw;
|
||||||
/* 0x084 */ f32 currentYaw;
|
/* 0x084 */ f32 currentYaw;
|
||||||
/* 0x088 */ f32 unk_88;
|
/* 0x088 */ f32 overlapPushYaw;
|
||||||
/* 0x08C */ f32 unk_8C;
|
/* 0x08C */ f32 pitch;
|
||||||
/* 0x090 */ f32 unk_90;
|
/* 0x090 */ f32 unk_90;
|
||||||
/* 0x094 */ s32 unk_94;
|
/* 0x094 */ s32 unk_94;
|
||||||
/* 0x098 */ s32 unk_98;
|
/* 0x098 */ s32 unk_98;
|
||||||
@ -1993,11 +2058,11 @@ typedef struct PlayerStatus {
|
|||||||
/* 0x0C2 */ s16 unk_C2;
|
/* 0x0C2 */ s16 unk_C2;
|
||||||
/* 0x0C4 */ char unk_C4;
|
/* 0x0C4 */ char unk_C4;
|
||||||
/* 0x0C5 */ s8 unk_C5;
|
/* 0x0C5 */ s8 unk_C5;
|
||||||
/* 0x0C6 */ s16 unk_C6;
|
/* 0x0C6 */ s16 interactingWithID;
|
||||||
/* 0x0C8 */ Npc* unk_C8;
|
/* 0x0C8 */ Npc* encounteredNPC;
|
||||||
/* 0x0CC */ s32 shadowID;
|
/* 0x0CC */ s32 shadowID;
|
||||||
/* 0x0D0 */ f32* unk_D0;
|
/* 0x0D0 */ f32* unk_D0;
|
||||||
/* 0x0D4 */ f32 unk_D4;
|
/* 0x0D4 */ f32 spinRate;
|
||||||
/* 0x0D8 */ UNK_PTR** unk_D8;
|
/* 0x0D8 */ UNK_PTR** unk_D8;
|
||||||
/* 0x0DC */ s32 currentButtons;
|
/* 0x0DC */ s32 currentButtons;
|
||||||
/* 0x0E0 */ s32 pressedButtons;
|
/* 0x0E0 */ s32 pressedButtons;
|
||||||
@ -2228,6 +2293,16 @@ typedef struct PlayerSpinState {
|
|||||||
/* 0x30 */ s32 spinSoundID;
|
/* 0x30 */ s32 spinSoundID;
|
||||||
} PlayerSpinState; // size = 0x34
|
} PlayerSpinState; // size = 0x34
|
||||||
|
|
||||||
|
typedef struct TweesterPhysics {
|
||||||
|
/* 0x00 */ s32 countdown;
|
||||||
|
/* 0x04 */ s32 state;
|
||||||
|
/* 0x08 */ s32 prevFlags; ///< Partner npc flags before contact with Tweester
|
||||||
|
/* 0x0C */ f32 radius;
|
||||||
|
/* 0x10 */ f32 angle;
|
||||||
|
/* 0x14 */ f32 angularVelocity;
|
||||||
|
/* 0x18 */ f32 liftoffVelocityPhase;
|
||||||
|
} TweesterPhysics; // size = 0x1C
|
||||||
|
|
||||||
typedef struct PartnerActionStatus {
|
typedef struct PartnerActionStatus {
|
||||||
/* 0x000 */ union {
|
/* 0x000 */ union {
|
||||||
/* */ s32 i;
|
/* */ s32 i;
|
||||||
@ -2350,16 +2425,6 @@ typedef struct PopupMessage {
|
|||||||
/* 0x18 */ Message* message;
|
/* 0x18 */ Message* message;
|
||||||
} PopupMessage; // size = 0x1C
|
} PopupMessage; // size = 0x1C
|
||||||
|
|
||||||
typedef struct unkPartnerStruct {
|
|
||||||
/* 0x000 */ s32 unk_00;
|
|
||||||
/* 0x004 */ s32 unk_04;
|
|
||||||
/* 0x008 */ s32 flags;
|
|
||||||
/* 0x00c */ f32 unk_0C;
|
|
||||||
/* 0x010 */ f32 unk_10;
|
|
||||||
/* 0x014 */ f32 unk_14;
|
|
||||||
/* 0x018 */ f32 unk_18;
|
|
||||||
} unkPartnerStruct; // size = 0x1C
|
|
||||||
|
|
||||||
typedef struct struct8015A578 {
|
typedef struct struct8015A578 {
|
||||||
/* 0x00 */ u8 unk_00;
|
/* 0x00 */ u8 unk_00;
|
||||||
/* 0x01 */ u8 unk_01;
|
/* 0x01 */ u8 unk_01;
|
||||||
@ -2369,11 +2434,11 @@ typedef struct struct8015A578 {
|
|||||||
} struct8015A578; // size = 0x0C
|
} struct8015A578; // size = 0x0C
|
||||||
|
|
||||||
typedef struct SaveMetadata {
|
typedef struct SaveMetadata {
|
||||||
/* 0x00 */ s32 unk_00;
|
/* 0x00 */ s32 timePlayed;
|
||||||
/* 0x04 */ u8 unk_04;
|
/* 0x04 */ u8 spiritsRescued;
|
||||||
/* 0x05 */ char unk_05[0x1];
|
/* 0x05 */ char unk_05[0x1];
|
||||||
/* 0x06 */ s8 unk_06;
|
/* 0x06 */ s8 level;
|
||||||
/* 0x07 */ s8 unk_07[8];
|
/* 0x07 */ char filename[8];
|
||||||
/* 0x0F */ char unk_0F[0x1];
|
/* 0x0F */ char unk_0F[0x1];
|
||||||
/* 0x10 */ s32 unk_10;
|
/* 0x10 */ s32 unk_10;
|
||||||
/* 0x14 */ s32 unk_14;
|
/* 0x14 */ s32 unk_14;
|
||||||
|
109
include/enums.h
109
include/enums.h
@ -1479,7 +1479,7 @@ enum ActionStates {
|
|||||||
ACTION_STATE_USE_SNEAKY_PARASOL = 0x00000019,
|
ACTION_STATE_USE_SNEAKY_PARASOL = 0x00000019,
|
||||||
ACTION_STATE_SPIN = 0x0000001A,
|
ACTION_STATE_SPIN = 0x0000001A,
|
||||||
ACTION_STATE_ENEMY_FIRST_STRIKE = 0x0000001B,
|
ACTION_STATE_ENEMY_FIRST_STRIKE = 0x0000001B,
|
||||||
ACTION_STATE_GET_STAR_SPIRIT = 0x0000001C,
|
ACTION_STATE_RAISE_ARMS = 0x0000001C,
|
||||||
ACTION_STATE_USE_SPINNING_FLOWER = 0x0000001D,
|
ACTION_STATE_USE_SPINNING_FLOWER = 0x0000001D,
|
||||||
ACTION_STATE_USE_MUNCHLESIA = 0x0000001E, ///< Set by the jan_09 squishy flower entity; throws the player in the air.
|
ACTION_STATE_USE_MUNCHLESIA = 0x0000001E, ///< Set by the jan_09 squishy flower entity; throws the player in the air.
|
||||||
ACTION_STATE_USE_TWEESTER = 0x0000001F,
|
ACTION_STATE_USE_TWEESTER = 0x0000001F,
|
||||||
@ -1492,6 +1492,36 @@ enum ActionStates {
|
|||||||
ACTION_STATE_USE_SPRING = 0x00000026,
|
ACTION_STATE_USE_SPRING = 0x00000026,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
|
||||||
|
enum PeachStatusFlags {
|
||||||
|
PEACH_STATUS_FLAG_IS_PEACH = 0x01,
|
||||||
|
PEACH_STATUS_FLAG_DISGUISED = 0x02,
|
||||||
|
PEACH_STATUS_FLAG_HAS_PARASOL = 0x04,
|
||||||
|
PEACH_STATUS_FLAG_HAS_INGREDIENT = 0x10
|
||||||
|
};
|
||||||
|
|
||||||
|
enum CookingIngredients {
|
||||||
|
PEACH_COOKING_NONE = 0x00,
|
||||||
|
PEACH_COOKING_CREAM = 0x01,
|
||||||
|
PEACH_COOKING_STRAWBERRY = 0x02,
|
||||||
|
PEACH_COOKING_BUTTER = 0x03,
|
||||||
|
PEACH_COOKING_CLEANSER = 0x04,
|
||||||
|
PEACH_COOKING_WATER = 0x05,
|
||||||
|
PEACH_COOKING_MILK = 0x06,
|
||||||
|
PEACH_COOKING_FLOUR = 0x07,
|
||||||
|
PEACH_COOKING_EGG = 0x08,
|
||||||
|
PEACH_COOKING_COMPLETE_CAKE = 0x09,
|
||||||
|
PEACH_COOKING_CAKE_BOWL = 0x0A,
|
||||||
|
PEACH_COOKING_CAKE_MIXED = 0x0B,
|
||||||
|
PEACH_COOKING_CAKE_PAN = 0x0C,
|
||||||
|
PEACH_COOKING_CAKE_BATTER = 0x0D,
|
||||||
|
PEACH_COOKING_CAKE_BARE = 0x0E,
|
||||||
|
PEACH_COOKING_SALT = 0x0F,
|
||||||
|
PEACH_COOKING_SUGAR = 0x10,
|
||||||
|
PEACH_COOKING_CAKE_WITH_ICING = 0x11,
|
||||||
|
PEACH_COOKING_CAKE_WITH_BERRIES = 0x12,
|
||||||
|
};
|
||||||
|
|
||||||
// Requires decimals
|
// Requires decimals
|
||||||
enum NpcIDs {
|
enum NpcIDs {
|
||||||
NPC_SELF = -1,
|
NPC_SELF = -1,
|
||||||
@ -1602,14 +1632,15 @@ enum EntityFlags {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum EntityCollisionFlags {
|
enum EntityCollisionFlags {
|
||||||
ENTITY_COLLISION_FLAGS_1 = 0x00000001,
|
ENTITY_COLLISION_PLAYER_TOUCH_FLOOR = 0x00000001,
|
||||||
ENTITY_COLLISION_FLAGS_2 = 0x00000002,
|
ENTITY_COLLISION_FLAGS_2 = 0x00000002,
|
||||||
ENTITY_COLLISION_FLAGS_4 = 0x00000004,
|
ENTITY_COLLISION_PLAYER_TOUCH_CEILING = 0x00000004,
|
||||||
ENTITY_COLLISION_FLAGS_8 = 0x00000008,
|
ENTITY_COLLISION_PLAYER_TOUCH_WALL = 0x00000008,
|
||||||
ENTITY_COLLISION_FLAGS_10 = 0x00000010,
|
ENTITY_COLLISION_PLAYER_PUSHING_AGAINST = 0x00000010,
|
||||||
ENTITY_COLLISION_FLAGS_20 = 0x00000020,
|
ENTITY_COLLISION_FLAGS_20 = 0x00000020,
|
||||||
ENTITY_COLLISION_FLAGS_40 = 0x00000040,
|
ENTITY_COLLISION_PLAYER_HAMMER = 0x00000040,
|
||||||
ENTITY_COLLISION_FLAGS_80 = 0x00000080
|
ENTITY_COLLISION_BLOCK_HIT = 0x00000080,
|
||||||
|
ENTITY_COLLISION_PLAYER_LAST_FLOOR = 0x00000100
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TriggerFlags {
|
enum TriggerFlags {
|
||||||
@ -1634,6 +1665,10 @@ enum TriggerFlags {
|
|||||||
TRIGGER_SCRIPT_BOUND = 0x01000000
|
TRIGGER_SCRIPT_BOUND = 0x01000000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum ItemEntityFlags {
|
||||||
|
ITEM_ENTITY_FLAGS_TINY = 0x00004000,
|
||||||
|
};
|
||||||
|
|
||||||
enum Buttons {
|
enum Buttons {
|
||||||
BUTTON_C_RIGHT = 0x00000001,
|
BUTTON_C_RIGHT = 0x00000001,
|
||||||
BUTTON_C_LEFT = 0x00000002,
|
BUTTON_C_LEFT = 0x00000002,
|
||||||
@ -1826,7 +1861,7 @@ enum NpcFlags {
|
|||||||
enum PlayerStatusFlags {
|
enum PlayerStatusFlags {
|
||||||
PLAYER_STATUS_FLAGS_JUMPING = 0x00000002,
|
PLAYER_STATUS_FLAGS_JUMPING = 0x00000002,
|
||||||
PLAYER_STATUS_FLAGS_FALLING = 0x00000004,
|
PLAYER_STATUS_FLAGS_FALLING = 0x00000004,
|
||||||
PLAYER_STATUS_FLAGS_8 = 0x00000008,
|
PLAYER_STATUS_FLAGS_FLYING = 0x00000008,
|
||||||
PLAYER_STATUS_FLAGS_10 = 0x00000010,
|
PLAYER_STATUS_FLAGS_10 = 0x00000010,
|
||||||
PLAYER_STATUS_FLAGS_20 = 0x00000020,
|
PLAYER_STATUS_FLAGS_20 = 0x00000020,
|
||||||
PLAYER_STATUS_FLAGS_80 = 0x00000080,
|
PLAYER_STATUS_FLAGS_80 = 0x00000080,
|
||||||
@ -1841,11 +1876,15 @@ enum PlayerStatusFlags {
|
|||||||
PLAYER_STATUS_FLAGS_20000 = 0x00020000,
|
PLAYER_STATUS_FLAGS_20000 = 0x00020000,
|
||||||
PLAYER_STATUS_FLAGS_40000 = 0x00040000,
|
PLAYER_STATUS_FLAGS_40000 = 0x00040000,
|
||||||
PLAYER_STATUS_FLAGS_80000 = 0x00080000,
|
PLAYER_STATUS_FLAGS_80000 = 0x00080000,
|
||||||
|
PLAYER_STATUS_FLAGS_100000 = 0x00100000,
|
||||||
|
PLAYER_STATUS_FLAGS_200000 = 0x00200000, // using hammer?
|
||||||
PLAYER_STATUS_FLAGS_800000 = 0x00800000,
|
PLAYER_STATUS_FLAGS_800000 = 0x00800000,
|
||||||
|
PLAYER_STATUS_FLAGS_1000000 = 0x01000000,
|
||||||
PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC = 0x02000000,
|
PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC = 0x02000000,
|
||||||
PLAYER_STATUS_FLAGS_CAMERA_DOESNT_FOLLOW = 0x04000000,
|
PLAYER_STATUS_FLAGS_CAMERA_DOESNT_FOLLOW = 0x04000000,
|
||||||
PLAYER_STATUS_FLAGS_8000000 = 0x08000000,
|
PLAYER_STATUS_FLAGS_8000000 = 0x08000000,
|
||||||
PLAYER_STATUS_FLAGS_10000000 = 0x10000000,
|
PLAYER_STATUS_FLAGS_10000000 = 0x10000000,
|
||||||
|
PLAYER_STATUS_FLAGS_20000000 = 0x20000000, // done hammer?
|
||||||
PLAYER_STATUS_FLAGS_40000000 = 0x40000000,
|
PLAYER_STATUS_FLAGS_40000000 = 0x40000000,
|
||||||
PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED = 0x80000000,
|
PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED = 0x80000000,
|
||||||
};
|
};
|
||||||
@ -1855,13 +1894,13 @@ enum PlayerStatusAnimFlags {
|
|||||||
PLAYER_STATUS_ANIM_FLAGS_HOLDING_WATT = 0x00000001,
|
PLAYER_STATUS_ANIM_FLAGS_HOLDING_WATT = 0x00000001,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_2 = 0x00000002,
|
PLAYER_STATUS_ANIM_FLAGS_2 = 0x00000002,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_4 = 0x00000004,
|
PLAYER_STATUS_ANIM_FLAGS_4 = 0x00000004,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_8 = 0x00000008,
|
PLAYER_STATUS_ANIM_FLAGS_8 = 0x00000008, ///< triggers partner use when set
|
||||||
PLAYER_STATUS_ANIM_FLAGS_INTERACT_PROMPT_AVAILABLE = 0x00000010, ///< ! prompt
|
PLAYER_STATUS_ANIM_FLAGS_INTERACT_PROMPT_AVAILABLE = 0x00000010, ///< ! prompt
|
||||||
PLAYER_STATUS_ANIM_FLAGS_SPEECH_PROMPT_AVAILABLE = 0x00000020, ///< (...) prompt
|
PLAYER_STATUS_ANIM_FLAGS_SPEECH_PROMPT_AVAILABLE = 0x00000020, ///< (...) prompt
|
||||||
PLAYER_STATUS_ANIM_FLAGS_40 = 0x00000040,
|
PLAYER_STATUS_ANIM_FLAGS_40 = 0x00000040,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_USING_PULSE_STONE = 0x00000080,
|
PLAYER_STATUS_ANIM_FLAGS_USING_PULSE_STONE = 0x00000080,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_100 = 0x00000100,
|
PLAYER_STATUS_ANIM_FLAGS_100 = 0x00000100,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_GET_STAR_SPIRIT = 0x00000200, ///< Sets action state to ACTION_STATE_GET_STAR_SPIRIT on idle
|
PLAYER_STATUS_ANIM_FLAGS_RAISED_ARMS = 0x00000200, ///< Sets action state to ACTION_STATE_RAISE_ARMS on idle
|
||||||
PLAYER_STATUS_ANIM_FLAGS_SHIVERING = 0x00000400,
|
PLAYER_STATUS_ANIM_FLAGS_SHIVERING = 0x00000400,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_800 = 0x00000800,
|
PLAYER_STATUS_ANIM_FLAGS_800 = 0x00000800,
|
||||||
PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS = 0x00001000,
|
PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS = 0x00001000,
|
||||||
@ -2610,10 +2649,10 @@ enum MusicSettingsFlags {
|
|||||||
};
|
};
|
||||||
|
|
||||||
enum ColliderFlags {
|
enum ColliderFlags {
|
||||||
COLLIDER_FLAGS_1 = 0x00000001,
|
COLLIDER_FLAGS_WATER_FLOOR = 0x00000001,
|
||||||
COLLIDER_FLAGS_2 = 0x00000002,
|
COLLIDER_FLAGS_LAVA_FLOOR = 0x00000002,
|
||||||
COLLIDER_FLAGS_4 = 0x00000004,
|
COLLIDER_FLAGS_SUSHIE_DOCK_WALL = 0x00000004,
|
||||||
COLLIDER_FLAGS_8 = 0x00000008,
|
COLLIDER_FLAGS_SNOW_FLOOR = 0x00000008,
|
||||||
COLLIDER_FLAGS_10 = 0x00000010,
|
COLLIDER_FLAGS_10 = 0x00000010,
|
||||||
COLLIDER_FLAGS_20 = 0x00000020,
|
COLLIDER_FLAGS_20 = 0x00000020,
|
||||||
COLLIDER_FLAGS_40 = 0x00000040,
|
COLLIDER_FLAGS_40 = 0x00000040,
|
||||||
@ -2625,8 +2664,8 @@ enum ColliderFlags {
|
|||||||
COLLIDER_FLAGS_1000 = 0x00001000,
|
COLLIDER_FLAGS_1000 = 0x00001000,
|
||||||
COLLIDER_FLAGS_2000 = 0x00002000,
|
COLLIDER_FLAGS_2000 = 0x00002000,
|
||||||
COLLIDER_FLAGS_4000 = 0x00004000,
|
COLLIDER_FLAGS_4000 = 0x00004000,
|
||||||
COLLIDER_FLAGS_8000 = 0x00008000,
|
COLLIDER_FLAGS_IGNORE_SHELL = 0x00008000,
|
||||||
COLLIDER_FLAGS_10000 = 0x00010000,
|
COLLIDER_FLAGS_IGNORE_PLAYER = 0x00010000,
|
||||||
COLLIDER_FLAGS_20000 = 0x00020000,
|
COLLIDER_FLAGS_20000 = 0x00020000,
|
||||||
COLLIDER_FLAGS_40000 = 0x00040000,
|
COLLIDER_FLAGS_40000 = 0x00040000,
|
||||||
COLLIDER_FLAGS_80000 = 0x00080000,
|
COLLIDER_FLAGS_80000 = 0x00080000,
|
||||||
@ -3378,4 +3417,42 @@ enum RushFlags {
|
|||||||
RUSH_FLAG_POWER = 2,
|
RUSH_FLAG_POWER = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum FileMenuMessages {
|
||||||
|
FILE_MESSAGE_NONE = 0,
|
||||||
|
FILE_MESSAGE_SELECT_FILE_TO_START = 1, // Select file to start:[End]
|
||||||
|
FILE_MESSAGE_SELECT_FILE_TO_DELETE = 2, // Select file to delete:[End]
|
||||||
|
FILE_MESSAGE_SELECT_FILE_TO_SAVE = 3, // Select file to save[End]
|
||||||
|
FILE_MESSAGE_COPY_WHICH_FILE = 4, // Copy which file?[End]
|
||||||
|
FILE_MESSAGE_COPY_TO_WHICH_FILE = 5, // Copy to which file?[End]
|
||||||
|
FILE_MESSAGE_NEW = 6, // NEW[End]
|
||||||
|
FILE_MESSAGE_LEVEL = 7, // Level[End]
|
||||||
|
FILE_MESSAGE_PLAY_TIME = 8, // Play Time[End]
|
||||||
|
FILE_MESSAGE_DELETE_FILE = 9, // Delete File[End]
|
||||||
|
FILE_MESSAGE_CANCEL = 10, // Cancel[End]
|
||||||
|
FILE_MESSAGE_COPY_FILE = 11, // Copy File[End]
|
||||||
|
FILE_MESSAGE_FIRST_PLAY = 12, // First Play[End]
|
||||||
|
FILE_MESSAGE_PERIOD_13 = 13, // .[End]
|
||||||
|
FILE_MESSAGE_YES = 14, // Yes[End]
|
||||||
|
FILE_MESSAGE_NO = 15, // No[End]
|
||||||
|
FILE_MESSAGE_DELETE = 16, // Delete[End]
|
||||||
|
FILE_MESSAGE_OVERRIDE_TO_NEW_DATA = 17, // Override to New Data[End]
|
||||||
|
FILE_MESSAGE_SAVE_OK = 18, // Save OK?[End]
|
||||||
|
FILE_MESSAGE_FILE_NAME_IS = 19, // File name is :[End]
|
||||||
|
FILE_MESSAGE_PERIOD_20 = 20, // .[End]
|
||||||
|
FILE_MESSAGE_OK = 21, // OK?[End]
|
||||||
|
FILE_MESSAGE_FILE_22 = 22, // File[End]
|
||||||
|
FILE_MESSAGE_WILL_BE_DELETED = 23, // will be deleted.[End]
|
||||||
|
FILE_MESSAGE_OK_TO_COPY_TO_THIS_FILE = 24, // OK to copy to this file?[End]
|
||||||
|
FILE_MESSAGE_START_GAME_WITH = 25, // Start game with[End]
|
||||||
|
FILE_MESSAGE_FILE_26 = 26, // File[End]
|
||||||
|
FILE_MESSAGE_HAS_BEEN_DELETED = 27, // has been deleted.[End]
|
||||||
|
FILE_MESSAGE_28 = 28, // [End]
|
||||||
|
FILE_MESSAGE_COPY_FROM = 29, // Copy from[End]
|
||||||
|
FILE_MESSAGE_TO = 30, // to[End]
|
||||||
|
FILE_MESSAGE_HAS_BEEN_CREATED = 31, // has been created.[End]
|
||||||
|
FILE_MESSAGE_ENTER_A_FILE_NAME = 32, // Enter a file name![End]
|
||||||
|
FILE_MESSAGE_QUESTION = 33, // ?[End]
|
||||||
|
FILE_MESSAGE_PERIOD_34 = 34, // .[End]
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -74,6 +74,11 @@
|
|||||||
|
|
||||||
#define BATTLE_ENTITY_ID_MASK 0x800
|
#define BATTLE_ENTITY_ID_MASK 0x800
|
||||||
|
|
||||||
|
#define COLLISION_WITH_NPC_BIT 0x2000
|
||||||
|
#define COLLISION_WITH_ENTITY_BIT 0x4000
|
||||||
|
#define COLLISION_IGNORE_ENTITIES 0x40000
|
||||||
|
#define COLLISION_ONLY_ENTITIES 0x100000
|
||||||
|
|
||||||
#define PACK_FILL_COLOR(r, g, b, a) (GPACK_RGBA5551(r, g, b, a) << 0x10) | GPACK_RGBA5551(r, g, b, a)
|
#define PACK_FILL_COLOR(r, g, b, a) (GPACK_RGBA5551(r, g, b, a) << 0x10) | GPACK_RGBA5551(r, g, b, a)
|
||||||
|
|
||||||
#define SQ(x) (x*x)
|
#define SQ(x) (x*x)
|
||||||
|
@ -237,7 +237,7 @@ ApiStatus CountFortessKeys(Evt* script, s32 isInitialCall);
|
|||||||
ApiStatus RemoveFortressKeys(Evt* script, s32 isInitialCall);
|
ApiStatus RemoveFortressKeys(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall);
|
ApiStatus MakeItemEntity(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus DropItemEntity(Evt* script, s32 isInitialCall);
|
ApiStatus DropItemEntity(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus DropItemEntityB(Evt* script, s32 isInitialCall);
|
ApiStatus DropTinyItemEntity(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall);
|
ApiStatus RemoveItemEntity(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus AddBadge(Evt* script, s32 isInitialCall);
|
ApiStatus AddBadge(Evt* script, s32 isInitialCall);
|
||||||
ApiStatus RemoveBadge(Evt* script, s32 isInitialCall);
|
ApiStatus RemoveBadge(Evt* script, s32 isInitialCall);
|
||||||
|
@ -76,7 +76,7 @@ extern s32 gCurrentCameraID;
|
|||||||
extern CollisionData gCollisionData;
|
extern CollisionData gCollisionData;
|
||||||
|
|
||||||
extern s8 D_800A0900;
|
extern s8 D_800A0900;
|
||||||
extern f32 D_800F7B60[];
|
extern f32 GravityParamsStartFall[];
|
||||||
extern s16 D_800F7B80;
|
extern s16 D_800F7B80;
|
||||||
extern EncounterStatus gCurrentEncounter;
|
extern EncounterStatus gCurrentEncounter;
|
||||||
extern u8* D_801512F0;
|
extern u8* D_801512F0;
|
||||||
@ -100,16 +100,16 @@ extern MessagePrintState* D_802DB268;
|
|||||||
extern ShadowBlueprint CircularShadowA;
|
extern ShadowBlueprint CircularShadowA;
|
||||||
extern ShadowBlueprint CircularShadowB;
|
extern ShadowBlueprint CircularShadowB;
|
||||||
extern ShadowBlueprint SquareShadow;
|
extern ShadowBlueprint SquareShadow;
|
||||||
extern s32 SaveBlockTutorialMessagePrinterClosed;
|
extern s32 SaveBlockTutorialPrinterClosed;
|
||||||
extern s32 SaveBlockResultMessagePrinterClosed;
|
extern s32 SaveBlockResultPrinterClosed;
|
||||||
extern MessagePrintState* SaveBlockTutorialMessagePrinter;
|
extern MessagePrintState* SaveBlockTutorialPrinter;
|
||||||
extern MessagePrintState* SaveBlockResultMessagePrinter;
|
extern MessagePrintState* SaveBlockResultPrinter;
|
||||||
extern s32 D_802E99DC;
|
extern s32 D_802E99DC;
|
||||||
|
|
||||||
extern Entity* D_802EB3A0;
|
extern Entity* SwitchToLink;
|
||||||
extern s32 CreateEntityVarArgBuffer[3]; // not size 3
|
extern s32 CreateEntityVarArgBuffer[3]; // not size 3
|
||||||
|
|
||||||
extern f32 D_800F7B70[4];
|
extern f32 DefaultMoveSpeeds[4];
|
||||||
|
|
||||||
extern TempSetZoneEnabled* D_800D91D4;
|
extern TempSetZoneEnabled* D_800D91D4;
|
||||||
|
|
||||||
@ -201,7 +201,7 @@ extern s8 D_8014C248[];
|
|||||||
|
|
||||||
extern UNK_FUN_PTR(D_8010C920);
|
extern UNK_FUN_PTR(D_8010C920);
|
||||||
extern UNK_FUN_PTR(D_8010C940);
|
extern UNK_FUN_PTR(D_8010C940);
|
||||||
extern Entity* D_8010C954;
|
extern Entity* TweesterTouchingPartner;
|
||||||
extern UNK_FUN_PTR(D_8010C958);
|
extern UNK_FUN_PTR(D_8010C958);
|
||||||
extern s32 D_8010C95C;
|
extern s32 D_8010C95C;
|
||||||
extern s32 D_8010C96C;
|
extern s32 D_8010C96C;
|
||||||
@ -294,8 +294,8 @@ extern s32 D_80292110[];
|
|||||||
|
|
||||||
extern s32 D_8029FBD0;
|
extern s32 D_8029FBD0;
|
||||||
|
|
||||||
extern s32 D_800F7BE8[];
|
extern s32 KoopatrolDisguiseExtraAnims[];
|
||||||
extern s32 D_800F7BBC[];
|
extern s32 HammerBroDisguiseExtraAnims[];
|
||||||
|
|
||||||
//various
|
//various
|
||||||
extern s32 D_802C05CC;
|
extern s32 D_802C05CC;
|
||||||
|
@ -227,7 +227,8 @@ void entity_shattering_block_init(Entity* entity) {
|
|||||||
void* a2 = NULL;
|
void* a2 = NULL;
|
||||||
void* a1 = NULL;
|
void* a1 = NULL;
|
||||||
|
|
||||||
((struct802E1400*)entity->dataBuf.unk)->unk_38 = entity->position.y;
|
//TODO must be HAMMER BLOCK TYPE!
|
||||||
|
entity->dataBuf.swtch->unk_38 = entity->position.y;
|
||||||
type = get_entity_type((u8)entity->listIndex);
|
type = get_entity_type((u8)entity->listIndex);
|
||||||
|
|
||||||
if ((type - 24) < 3) {
|
if ((type - 24) < 3) {
|
||||||
|
@ -676,9 +676,9 @@ void filemenu_draw_cursor(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32
|
|||||||
if (temp_a1 > 255) {
|
if (temp_a1 > 255) {
|
||||||
temp_a1 = 255;
|
temp_a1 = 255;
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(filemenu_cursorHudElemID[0], temp_a1);
|
hud_element_set_alpha(filemenu_cursorHudElemID[0], temp_a1);
|
||||||
set_hud_element_render_pos(filemenu_cursorHudElemID[0], baseX + D_80249B94, baseY + D_80249B98);
|
hud_element_set_render_pos(filemenu_cursorHudElemID[0], baseX + D_80249B94, baseY + D_80249B98);
|
||||||
draw_hud_element_3(filemenu_cursorHudElemID[0]);
|
hud_element_draw_without_clipping(filemenu_cursorHudElemID[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -692,7 +692,7 @@ void filemenu_cleanup(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(filemenu_cursorHudElemID); i++) {
|
for (i = 0; i < ARRAY_COUNT(filemenu_cursorHudElemID); i++) {
|
||||||
free_hud_element(filemenu_cursorHudElemID[i]);
|
hud_element_free(filemenu_cursorHudElemID[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
panelIt = filemenu_menus;
|
panelIt = filemenu_menus;
|
||||||
|
113
src/165490.c
113
src/165490.c
@ -4,10 +4,10 @@
|
|||||||
#include "audio.h"
|
#include "audio.h"
|
||||||
#include "fio.h"
|
#include "fio.h"
|
||||||
|
|
||||||
extern SaveMetadata D_800779C4[4];
|
extern SaveMetadata gSaveSlotMetadata[4];
|
||||||
extern u8 D_80077A24[4];
|
extern u8 gSaveSlotHasData[4];
|
||||||
extern HudScript* D_80249E20[14];
|
extern HudScript* filemenu_hudElemScripts[14];
|
||||||
extern MenuWindowBP D_80249EA0[14];
|
extern MenuWindowBP filemenu_windowBPs[14];
|
||||||
|
|
||||||
extern s8 D_8024C090;
|
extern s8 D_8024C090;
|
||||||
|
|
||||||
@ -23,28 +23,28 @@ void filemenu_draw_contents_title(
|
|||||||
|
|
||||||
switch (menu->page) {
|
switch (menu->page) {
|
||||||
case 0:
|
case 0:
|
||||||
msgIdx = 1;
|
msgIdx = FILE_MESSAGE_SELECT_FILE_TO_START;
|
||||||
xOffset = 9;
|
xOffset = 9;
|
||||||
yOffset = 4;
|
yOffset = 4;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
msgIdx = 2;
|
msgIdx = FILE_MESSAGE_SELECT_FILE_TO_DELETE;
|
||||||
xOffset = 8;
|
xOffset = 8;
|
||||||
yOffset = 4;
|
yOffset = 4;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
msgIdx = 4;
|
msgIdx = FILE_MESSAGE_COPY_WHICH_FILE;
|
||||||
xOffset = 25;
|
xOffset = 25;
|
||||||
yOffset = 4;
|
yOffset = 4;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
msgIdx = 5;
|
msgIdx = FILE_MESSAGE_COPY_TO_WHICH_FILE;
|
||||||
xOffset = 16;
|
xOffset = 16;
|
||||||
yOffset = 4;
|
yOffset = 4;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
default:
|
||||||
msgIdx = 3;
|
msgIdx = FILE_MESSAGE_SELECT_FILE_TO_SAVE;
|
||||||
xOffset = 10;
|
xOffset = 10;
|
||||||
yOffset = 4;
|
yOffset = 4;
|
||||||
break;
|
break;
|
||||||
@ -60,11 +60,11 @@ void filemenu_draw_contents_stereo(
|
|||||||
s32 opacity, s32 darkening
|
s32 opacity, s32 darkening
|
||||||
) {
|
) {
|
||||||
if (gGameStatusPtr->soundOutputMode == SOUND_OUT_STEREO) {
|
if (gGameStatusPtr->soundOutputMode == SOUND_OUT_STEREO) {
|
||||||
set_hud_element_render_pos(filemenu_hudElemIDs[18], baseX + 34, baseY + 10);
|
hud_element_set_render_pos(filemenu_hudElemIDs[18], baseX + 34, baseY + 10);
|
||||||
draw_hud_element_3(filemenu_hudElemIDs[18]);
|
hud_element_draw_without_clipping(filemenu_hudElemIDs[18]);
|
||||||
} else {
|
} else {
|
||||||
set_hud_element_render_pos(filemenu_hudElemIDs[19], baseX + 34, baseY + 10);
|
hud_element_set_render_pos(filemenu_hudElemIDs[19], baseX + 34, baseY + 10);
|
||||||
draw_hud_element_3(filemenu_hudElemIDs[19]);
|
hud_element_draw_without_clipping(filemenu_hudElemIDs[19]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -75,11 +75,11 @@ void filemenu_draw_contents_mono(
|
|||||||
s32 opacity, s32 darkening
|
s32 opacity, s32 darkening
|
||||||
) {
|
) {
|
||||||
if (gGameStatusPtr->soundOutputMode == SOUND_OUT_MONO) {
|
if (gGameStatusPtr->soundOutputMode == SOUND_OUT_MONO) {
|
||||||
set_hud_element_render_pos(filemenu_hudElemIDs[16], baseX + 34, baseY + 10);
|
hud_element_set_render_pos(filemenu_hudElemIDs[16], baseX + 34, baseY + 10);
|
||||||
draw_hud_element_3(filemenu_hudElemIDs[16]);
|
hud_element_draw_without_clipping(filemenu_hudElemIDs[16]);
|
||||||
} else {
|
} else {
|
||||||
set_hud_element_render_pos(filemenu_hudElemIDs[17], baseX + 34, baseY + 10);
|
hud_element_set_render_pos(filemenu_hudElemIDs[17], baseX + 34, baseY + 10);
|
||||||
draw_hud_element_3(filemenu_hudElemIDs[17]);
|
hud_element_draw_without_clipping(filemenu_hudElemIDs[17]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,7 +93,7 @@ void filemenu_draw_contents_option_left(
|
|||||||
if (menu->col == 0 && menu->row == 2) {
|
if (menu->col == 0 && menu->row == 2) {
|
||||||
filemenu_set_cursor_goal_pos(53, baseX, baseY + 8);
|
filemenu_set_cursor_goal_pos(53, baseX, baseY + 8);
|
||||||
}
|
}
|
||||||
filemenu_draw_message(filemenu_get_menu_message(9), baseX + 8, baseY + 2, 255, 0, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_DELETE_FILE), baseX + 8, baseY + 2, 255, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ void filemenu_draw_contents_option_center(
|
|||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
msgIdx = 10;
|
msgIdx = FILE_MESSAGE_CANCEL;
|
||||||
xOffset = 18;
|
xOffset = 18;
|
||||||
yOffset = 0;
|
yOffset = 0;
|
||||||
if (menu->col == 1 && menu->row == 2) {
|
if (menu->col == 1 && menu->row == 2) {
|
||||||
@ -120,7 +120,7 @@ void filemenu_draw_contents_option_center(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
msgIdx = 11;
|
msgIdx = FILE_MESSAGE_COPY_FILE;
|
||||||
xOffset = 14;
|
xOffset = 14;
|
||||||
yOffset = 0;
|
yOffset = 0;
|
||||||
if (menu->col == 1 && menu->row == 2) {
|
if (menu->col == 1 && menu->row == 2) {
|
||||||
@ -142,11 +142,11 @@ void filemenu_draw_contents_option_right(
|
|||||||
if (menu->col == 2 && menu->row == 2) {
|
if (menu->col == 2 && menu->row == 2) {
|
||||||
filemenu_set_cursor_goal_pos(55, baseX + 8, baseY + 8);
|
filemenu_set_cursor_goal_pos(55, baseX + 8, baseY + 8);
|
||||||
}
|
}
|
||||||
filemenu_draw_message(filemenu_get_menu_message(10), baseX + 20, baseY + 2, 255, 0, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_CANCEL), baseX + 20, baseY + 2, 255, 0, 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void filemenu_draw_contents_file_info(s32 arg0,
|
void filemenu_draw_contents_file_info(s32 fileIdx,
|
||||||
MenuPanel* menu,
|
MenuPanel* menu,
|
||||||
s32 baseX, s32 baseY,
|
s32 baseX, s32 baseY,
|
||||||
s32 width, s32 height,
|
s32 width, s32 height,
|
||||||
@ -160,51 +160,52 @@ void filemenu_draw_contents_file_info(s32 arg0,
|
|||||||
s32 temp_s3;
|
s32 temp_s3;
|
||||||
s32 id;
|
s32 id;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
const int MAX_DISPLAYED_TIME = 100*60*60*60 - 1; // 100 hours minus one frame at 60 fps
|
||||||
|
|
||||||
if (D_80077A24[arg0] == 0) {
|
if (!gSaveSlotHasData[fileIdx]) {
|
||||||
filemenu_draw_message(filemenu_get_menu_message(6), baseX + 50, baseY + 20, 0xFF, 0xA, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_NEW), baseX + 50, baseY + 20, 0xFF, 0xA, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
save = &D_800779C4[arg0];
|
save = &gSaveSlotMetadata[fileIdx];
|
||||||
if (save->unk_00 == 0) {
|
if (save->timePlayed == 0) {
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0xC), baseX + 30, baseY + 20, 0xFF, 0xA, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FIRST_PLAY), baseX + 30, baseY + 20, 0xFF, 0xA, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
filemenu_draw_message(filemenu_get_menu_message(7), baseX + 0x22, baseY + 10, 0xFF, 0xA, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_LEVEL), baseX + 0x22, baseY + 10, 0xFF, 0xA, 1);
|
||||||
temp_s3_2 = save->unk_06;
|
temp_s3_2 = save->level;
|
||||||
temp_s3 = temp_s3_2;
|
temp_s3 = temp_s3_2;
|
||||||
temp_s0 = temp_s3 / 10;
|
temp_s0 = temp_s3 / 10;
|
||||||
draw_number(temp_s0, baseX + 79, baseY + 10, 1, 0xA, 0xFF, 2);
|
draw_number(temp_s0, baseX + 79, baseY + 10, 1, 0xA, 0xFF, 2);
|
||||||
draw_number(temp_s3 - (temp_s0 * 10), baseX + 88, baseY + 10, 1, 0xA, 0xFF, 2);
|
draw_number(temp_s3 - (temp_s0 * 10), baseX + 88, baseY + 10, 1, 0xA, 0xFF, 2);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(8), baseX + 11, baseY + 24, 0xFF, 0xA, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PLAY_TIME), baseX + 11, baseY + 24, 0xFF, 0xA, 1);
|
||||||
|
|
||||||
temp_s3_2 = save->unk_00;
|
temp_s3_2 = save->timePlayed;
|
||||||
if (temp_s3_2 > 21599999) {
|
if (temp_s3_2 > MAX_DISPLAYED_TIME) {
|
||||||
temp_s3_2 = 21599999;
|
temp_s3_2 = MAX_DISPLAYED_TIME;
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_number((temp_s3_2 / 2160000) % 10, baseX + 76, baseY + 24, 1, 0xA, 0xFF, 2);
|
draw_number((temp_s3_2 / 2160000) % 10, baseX + 76, baseY + 24, 1, 0xA, 0xFF, 2);
|
||||||
temp_s1_2 = temp_s3_2 / 216000;
|
temp_s1_2 = temp_s3_2 / 216000;
|
||||||
draw_number(temp_s1_2 - ((temp_s3_2 / 2160000) * 10), baseX + 85, baseY + 24, 1, 0xA, 0xFF, 2);
|
draw_number(temp_s1_2 - ((temp_s3_2 / 2160000) * 10), baseX + 85, baseY + 24, 1, 0xA, 0xFF, 2);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0xD), baseX + 95, baseY + 23, 0xFF, 0xA, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_13), baseX + 95, baseY + 23, 0xFF, 0xA, 1);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0xD), baseX + 95, baseY + 18, 0xFF, 0xA, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_13), baseX + 95, baseY + 18, 0xFF, 0xA, 1);
|
||||||
temp_s0_3 = temp_s3_2 / 36000;
|
temp_s0_3 = temp_s3_2 / 36000;
|
||||||
draw_number(temp_s0_3 - (temp_s1_2 * 6), baseX + 100, baseY + 24, 1, 0xA, 0xFF, 2);
|
draw_number(temp_s0_3 - (temp_s1_2 * 6), baseX + 100, baseY + 24, 1, 0xA, 0xFF, 2);
|
||||||
draw_number((temp_s3_2 / 3600) - (temp_s0_3 * 10), baseX + 109, baseY + 24, 1, 0xA, 0xFF, 2);
|
draw_number((temp_s3_2 / 3600) - (temp_s0_3 * 10), baseX + 109, baseY + 24, 1, 0xA, 0xFF, 2);
|
||||||
|
|
||||||
for (i = 0; i < 7; i++) {
|
for (i = 0; i < 7; i++) {
|
||||||
if (i < D_800779C4[arg0].unk_04) {
|
if (i < gSaveSlotMetadata[fileIdx].spiritsRescued) {
|
||||||
id = filemenu_hudElemIDs[i];
|
id = filemenu_hudElemIDs[i];
|
||||||
} else {
|
} else {
|
||||||
id = filemenu_hudElemIDs[i + 7];
|
id = filemenu_hudElemIDs[i + 7];
|
||||||
}
|
}
|
||||||
set_hud_element_render_pos(id, baseX + 17 + (i * 16), baseY + 44);
|
hud_element_set_render_pos(id, baseX + 17 + (i * 16), baseY + 44);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
draw_hud_element_3(id);
|
hud_element_draw_without_clipping(id);
|
||||||
} else {
|
} else {
|
||||||
draw_hud_element_2(id);
|
hud_element_draw_next(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -220,13 +221,13 @@ void filemenu_draw_contents_file_title(
|
|||||||
filemenu_set_cursor_goal_pos(fileIdx + 60, baseX - 3, baseY + 8);
|
filemenu_set_cursor_goal_pos(fileIdx + 60, baseX - 3, baseY + 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
filemenu_draw_message(filemenu_get_menu_message(26), baseX + 5, baseY + 1, 255, 0, 1);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 5, baseY + 1, 255, 0, 1);
|
||||||
|
|
||||||
if (D_80077A24[fileIdx] == 0) {
|
if (!gSaveSlotHasData[fileIdx]) {
|
||||||
draw_number(fileIdx + 1, baseX + 33, baseY + 1, 1, 0, 255, 2);
|
draw_number(fileIdx + 1, baseX + 33, baseY + 1, 1, 0, 255, 2);
|
||||||
} else {
|
} else {
|
||||||
draw_number(fileIdx + 1, baseX + 33, baseY + 1, 1, 0, 255, 2);
|
draw_number(fileIdx + 1, baseX + 33, baseY + 1, 1, 0, 255, 2);
|
||||||
filemenu_draw_file_name(D_800779C4[fileIdx].unk_07, 8, baseX + 46, baseY + 1, 255, 0, 1, 9);
|
filemenu_draw_file_name(gSaveSlotMetadata[fileIdx].filename, 8, baseX + 46, baseY + 1, 255, 0, 1, 9);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -310,15 +311,15 @@ void filemenu_main_init(MenuPanel* menu) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
|
||||||
filemenu_hudElemIDs[i] = create_hud_element(D_80249E20[i]);
|
filemenu_hudElemIDs[i] = hud_element_create(filemenu_hudElemScripts[i]);
|
||||||
set_hud_element_flags(filemenu_hudElemIDs[i], HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(filemenu_hudElemIDs[i], HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_80249EA0); i++) {
|
for (i = 0; i < ARRAY_COUNT(filemenu_windowBPs); i++) {
|
||||||
D_80249EA0[i].tab = menu;
|
filemenu_windowBPs[i].tab = menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_pause_menu_tab(D_80249EA0, ARRAY_COUNT(D_80249EA0));
|
setup_pause_menu_tab(filemenu_windowBPs, ARRAY_COUNT(filemenu_windowBPs));
|
||||||
menu->selected = menu->gridData[(menu->page * menu->numCols * menu->numRows) +
|
menu->selected = menu->gridData[(menu->page * menu->numCols * menu->numRows) +
|
||||||
(menu->numCols * menu->row) +
|
(menu->numCols * menu->row) +
|
||||||
menu->col];
|
menu->col];
|
||||||
@ -485,7 +486,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
|
|
||||||
switch (menu->page) {
|
switch (menu->page) {
|
||||||
case 0:
|
case 0:
|
||||||
if (menu->selected < 4 && D_80077A24[menu->selected] == 0) {
|
if (menu->selected < 4 && !gSaveSlotHasData[menu->selected] == 0) {
|
||||||
cond = TRUE;
|
cond = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -586,7 +587,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
set_window_update(0x37, filemenu_update_show_options_bottom);
|
set_window_update(0x37, filemenu_update_show_options_bottom);
|
||||||
filemenu_set_selected(menu, 0, 2);
|
filemenu_set_selected(menu, 0, 2);
|
||||||
} else if (menu->selected < 4) {
|
} else if (menu->selected < 4) {
|
||||||
if (D_80077A24[menu->selected] != 0) {
|
if (gSaveSlotHasData[menu->selected] != 0) {
|
||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
set_window_update(0x32, filemenu_update_show_name_confirm);
|
set_window_update(0x32, filemenu_update_show_name_confirm);
|
||||||
gWindows[50].pos.y = 121;
|
gWindows[50].pos.y = 121;
|
||||||
@ -618,7 +619,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
set_window_update(0x37, filemenu_update_show_options_bottom);
|
set_window_update(0x37, filemenu_update_show_options_bottom);
|
||||||
filemenu_set_selected(menu, 0, 1);
|
filemenu_set_selected(menu, 0, 1);
|
||||||
} else if (menu->selected < 4) {
|
} else if (menu->selected < 4) {
|
||||||
if (D_80077A24[menu->selected] != 0) {
|
if (gSaveSlotHasData[menu->selected] != 0) {
|
||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
menu->page = 4;
|
menu->page = 4;
|
||||||
filemenu_loadedFileIdx = menu->selected;
|
filemenu_loadedFileIdx = menu->selected;
|
||||||
@ -637,7 +638,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
sfx_play_sound(SOUND_MENU_ERROR);
|
sfx_play_sound(SOUND_MENU_ERROR);
|
||||||
} else {
|
} else {
|
||||||
filemenu_iterFileIdx = menu->selected;
|
filemenu_iterFileIdx = menu->selected;
|
||||||
if (D_80077A24[menu->selected] == 0) {
|
if (gSaveSlotHasData[menu->selected] == 0) {
|
||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
filemenu_8024C098 = 2;
|
filemenu_8024C098 = 2;
|
||||||
filemenu_menus[filemenu_8024C098]->page = 2;
|
filemenu_menus[filemenu_8024C098]->page = 2;
|
||||||
@ -651,9 +652,9 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
set_window_update(0x2F, 1);
|
set_window_update(0x2F, 1);
|
||||||
set_window_update(0x32, 2);
|
set_window_update(0x32, 2);
|
||||||
fio_load_game(filemenu_loadedFileIdx);
|
fio_load_game(filemenu_loadedFileIdx);
|
||||||
D_800779C4[filemenu_iterFileIdx] = D_800779C4[filemenu_loadedFileIdx];
|
gSaveSlotMetadata[filemenu_iterFileIdx] = gSaveSlotMetadata[filemenu_loadedFileIdx];
|
||||||
fio_save_game(filemenu_iterFileIdx);
|
fio_save_game(filemenu_iterFileIdx);
|
||||||
D_80077A24[filemenu_iterFileIdx] = 1;
|
gSaveSlotHasData[filemenu_iterFileIdx] = 1;
|
||||||
} else {
|
} else {
|
||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
set_window_update(0x32, filemenu_update_show_name_confirm);
|
set_window_update(0x32, filemenu_update_show_name_confirm);
|
||||||
@ -681,7 +682,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
set_game_mode(0xD);
|
set_game_mode(0xD);
|
||||||
} else if (menu->selected < 4) {
|
} else if (menu->selected < 4) {
|
||||||
if (D_80077A24[menu->selected] == 0) {
|
if (gSaveSlotHasData[menu->selected] == 0) {
|
||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
filemenu_8024C098 = 2;
|
filemenu_8024C098 = 2;
|
||||||
filemenu_menus[filemenu_8024C098]->page = 1;
|
filemenu_menus[filemenu_8024C098]->page = 1;
|
||||||
@ -689,7 +690,7 @@ void filemenu_main_handle_input(MenuPanel* menu) {
|
|||||||
set_window_update(0x2F, 1);
|
set_window_update(0x2F, 1);
|
||||||
set_window_update(0x32, 2);
|
set_window_update(0x32, 2);
|
||||||
fio_save_game(menu->selected);
|
fio_save_game(menu->selected);
|
||||||
D_80077A24[menu->selected] = 1;
|
gSaveSlotHasData[menu->selected] = 1;
|
||||||
} else {
|
} else {
|
||||||
sfx_play_sound(SOUND_MENU_NEXT);
|
sfx_play_sound(SOUND_MENU_NEXT);
|
||||||
set_window_update(0x32, filemenu_update_show_name_confirm);
|
set_window_update(0x32, filemenu_update_show_name_confirm);
|
||||||
@ -787,6 +788,6 @@ void filemenu_main_cleanup(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
|
||||||
free_hud_element(filemenu_hudElemIDs[i]);
|
hud_element_free(filemenu_hudElemIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
32
src/167570.c
32
src/167570.c
@ -44,8 +44,8 @@ void filemenu_yesno_draw_options_contents(MenuPanel* tab, s32 posX, s32 posY) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0xE), posX + xOffset1, posY + yOffset1, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_YES), posX + xOffset1, posY + yOffset1, 0xFF, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0xF), posX + xOffset2, posY + yOffset2, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_NO), posX + xOffset2, posY + yOffset2, 0xFF, 0, 0);
|
||||||
|
|
||||||
if (filemenu_8024C098 == 1) {
|
if (filemenu_8024C098 == 1) {
|
||||||
if (tab->selected == 0) {
|
if (tab->selected == 0) {
|
||||||
@ -65,23 +65,23 @@ void filemenu_yesno_draw_prompt_contents(MenuPanel* tab, s32 posX, s32 posY) {
|
|||||||
|
|
||||||
switch (tab->page) {
|
switch (tab->page) {
|
||||||
case 0:
|
case 0:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x10), posX + 10, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_DELETE), posX + 10, posY + 4, 0xFF, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x16), posX + 60, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_22), posX + 60, posY + 4, 0xFF, 0, 0);
|
||||||
draw_number(filemenu_menus[0]->selected + 1, posX + 98, posY + 6, 0, 0, 0xFF, 3);
|
draw_number(filemenu_menus[0]->selected + 1, posX + 98, posY + 6, 0, 0, 0xFF, 3);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x21), posX + 99, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_QUESTION), posX + 99, posY + 4, 0xFF, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x16), posX + 10, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_22), posX + 10, posY + 4, 0xFF, 0, 0);
|
||||||
draw_number(filemenu_menus[0]->selected + 1, posX + 48, posY + 6, 0, 0, 0xFF, 3);
|
draw_number(filemenu_menus[0]->selected + 1, posX + 48, posY + 6, 0, 0, 0xFF, 3);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x17), posX + 49, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_WILL_BE_DELETED), posX + 49, posY + 4, 0xFF, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x18), posX + 10, posY + 18, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_OK_TO_COPY_TO_THIS_FILE), posX + 10, posY + 18, 0xFF, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x11), posX + 10, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_OVERRIDE_TO_NEW_DATA), posX + 10, posY + 4, 0xFF, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x12), posX + 10, posY + 18, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_SAVE_OK), posX + 10, posY + 18, 0xFF, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x13), posX + 10, posY + 6, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_NAME_IS), posX + 10, posY + 6, 0xFF, 0, 0);
|
||||||
|
|
||||||
for (i = ARRAY_COUNT(filemenu_8024C110) - 1; i >= 0; i--) {
|
for (i = ARRAY_COUNT(filemenu_8024C110) - 1; i >= 0; i--) {
|
||||||
if (filemenu_8024C110[i] != 0xF7) {
|
if (filemenu_8024C110[i] != 0xF7) {
|
||||||
@ -92,14 +92,14 @@ void filemenu_yesno_draw_prompt_contents(MenuPanel* tab, s32 posX, s32 posY) {
|
|||||||
xOffset = (147 - (i * 11)) / 2;
|
xOffset = (147 - (i * 11)) / 2;
|
||||||
filemenu_draw_file_name(&filemenu_8024C110, i + 1, posX + xOffset, posY + 22, 0xFF, 0, 8, 0xB);
|
filemenu_draw_file_name(&filemenu_8024C110, i + 1, posX + xOffset, posY + 22, 0xFF, 0, 8, 0xB);
|
||||||
xOffset += (i + 1) * 11;
|
xOffset += (i + 1) * 11;
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x14), posX + xOffset, posY + 22, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_20), posX + xOffset, posY + 22, 0xFF, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x15), posX + 70, posY + 38, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_OK), posX + 70, posY + 38, 0xFF, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x19), posX + 10, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_START_GAME_WITH), posX + 10, posY + 4, 0xFF, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x16), posX + 127, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_22), posX + 127, posY + 4, 0xFF, 0, 0);
|
||||||
draw_number(filemenu_menus[0]->selected + 1, posX + 165, posY + 6, 0, 0, 0xFF, 3);
|
draw_number(filemenu_menus[0]->selected + 1, posX + 165, posY + 6, 0, 0, 0xFF, 3);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x21), posX + 162, posY + 4, 0xFF, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_QUESTION), posX + 162, posY + 4, 0xFF, 0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
34
src/168590.c
34
src/168590.c
@ -12,26 +12,26 @@ void filemenu_info_draw_message_contents(MenuPanel* menu, s32 baseX, s32 baseY)
|
|||||||
|
|
||||||
switch (page) {
|
switch (page) {
|
||||||
case 0:
|
case 0:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1A), baseX + 10, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 10, baseY + 4, 255, 0, 0);
|
||||||
draw_number(filemenu_menus[0]->selected + 1, baseX + 48, baseY + 6, 0, 0, 255, 3);
|
draw_number(filemenu_menus[0]->selected + 1, baseX + 48, baseY + 6, 0, 0, 255, 3);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1B), baseX + 49, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_HAS_BEEN_DELETED), baseX + 49, baseY + 4, 255, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1D), baseX + 10, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_COPY_FROM), baseX + 10, baseY + 4, 255, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1A), baseX + 84, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 84, baseY + 4, 255, 0, 0);
|
||||||
draw_number(filemenu_loadedFileIdx + 1, baseX + 122, baseY + 6, 0, 0, 255, 3);
|
draw_number(filemenu_loadedFileIdx + 1, baseX + 122, baseY + 6, 0, 0, 255, 3);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1E), baseX + 10, baseY + 18, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_TO), baseX + 10, baseY + 18, 255, 0, 0);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1A), baseX + 30, baseY + 18, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 30, baseY + 18, 255, 0, 0);
|
||||||
draw_number(filemenu_iterFileIdx + 1, baseX + 68, baseY + 20, 0, 0, 255, 3);
|
draw_number(filemenu_iterFileIdx + 1, baseX + 68, baseY + 20, 0, 0, 255, 3);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x22), baseX + 65, baseY + 18, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_PERIOD_34), baseX + 65, baseY + 18, 255, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1C), baseX + 10, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_28), baseX + 10, baseY + 4, 255, 0, 0);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1A), baseX + 10, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_FILE_26), baseX + 10, baseY + 4, 255, 0, 0);
|
||||||
draw_number(filemenu_menus[0]->selected + 1, baseX + 48, baseY + 6, 0, 0, 255, page);
|
draw_number(filemenu_menus[0]->selected + 1, baseX + 48, baseY + 6, 0, 0, 255, page);
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x1F), baseX + 49, baseY + 4, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_HAS_BEEN_CREATED), baseX + 49, baseY + 4, 255, 0, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
filemenu_set_cursor_alpha(0);
|
filemenu_set_cursor_alpha(0);
|
||||||
@ -103,16 +103,16 @@ void filemenu_draw_contents_file_create_header(MenuPanel* menu, s32 baseX, s32 b
|
|||||||
s32 i;
|
s32 i;
|
||||||
s32 tempAmt;
|
s32 tempAmt;
|
||||||
|
|
||||||
filemenu_draw_message(filemenu_get_menu_message(0x20), baseX + 10, baseY + 6, 255, 0, 0);
|
filemenu_draw_message(filemenu_get_menu_message(FILE_MESSAGE_ENTER_A_FILE_NAME), baseX + 10, baseY + 6, 255, 0, 0);
|
||||||
filemenu_draw_file_name(filemenu_8024C110, 8, baseX + 36, baseY + 22, 255, 0, 0, 0xB);
|
filemenu_draw_file_name(filemenu_8024C110, 8, baseX + 36, baseY + 22, 255, 0, 0, 0xB);
|
||||||
xOffset = 41;
|
xOffset = 41;
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < 8; i++) {
|
||||||
set_hud_element_render_pos(D_8024C100_C09980[1], baseX + 42 + (i * 11), baseY + xOffset);
|
hud_element_set_render_pos(D_8024C100_C09980[1], baseX + 42 + (i * 11), baseY + xOffset);
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
draw_hud_element_3(D_8024C100_C09980[1]);
|
hud_element_draw_without_clipping(D_8024C100_C09980[1]);
|
||||||
} else {
|
} else {
|
||||||
draw_hud_element_2(D_8024C100_C09980[1]);
|
hud_element_draw_next(D_8024C100_C09980[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -123,8 +123,8 @@ void filemenu_draw_contents_file_create_header(MenuPanel* menu, s32 baseX, s32 b
|
|||||||
if (D_8024C090 != tempAmt) {
|
if (D_8024C090 != tempAmt) {
|
||||||
phi_v0 = (D_8024C090 * 0xB) + 45;
|
phi_v0 = (D_8024C090 * 0xB) + 45;
|
||||||
}
|
}
|
||||||
set_hud_element_render_pos(D_8024C100_C09980[0], baseX + phi_v0, baseY + 45);
|
hud_element_set_render_pos(D_8024C100_C09980[0], baseX + phi_v0, baseY + 45);
|
||||||
draw_hud_element_2(D_8024C100_C09980[0]);
|
hud_element_draw_next(D_8024C100_C09980[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -141,6 +141,6 @@ void filemenu_choose_name_cleanup(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8024C100_C09980); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8024C100_C09980); i++) {
|
||||||
free_hud_element(D_8024C100_C09980[i]);
|
hud_element_free(D_8024C100_C09980[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -410,8 +410,8 @@ void btl_state_update_victory(void) {
|
|||||||
if (gBattleStatus.flags1 & BS_FLAGS1_1000000) {
|
if (gBattleStatus.flags1 & BS_FLAGS1_1000000) {
|
||||||
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
|
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
|
||||||
}
|
}
|
||||||
if ((u16) playerData->unk_2A4[0] < 0x270F) {
|
if ((u16) playerData->battlesWon < 9999) {
|
||||||
playerData->unk_2A4[0]++;
|
playerData->battlesWon++;
|
||||||
}
|
}
|
||||||
if (gBattleStatus.flags1 & BS_FLAGS1_40000) {
|
if (gBattleStatus.flags1 & BS_FLAGS1_40000) {
|
||||||
currentEncounter->battleOutcome = OUTCOME_ENEMY_FLED;
|
currentEncounter->battleOutcome = OUTCOME_ENEMY_FLED;
|
||||||
|
82
src/16c8e0.c
82
src/16c8e0.c
@ -198,25 +198,25 @@ void initialize_battle(void) {
|
|||||||
func_8024EDC0();
|
func_8024EDC0();
|
||||||
func_80268E88();
|
func_80268E88();
|
||||||
set_windows_visible(WINDOW_GROUP_1);
|
set_windows_visible(WINDOW_GROUP_1);
|
||||||
D_8029EFBC = create_hud_element(HudScript_HPBar);
|
D_8029EFBC = hud_element_create(HudScript_HPBar);
|
||||||
set_hud_element_flags(D_8029EFBC, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(D_8029EFBC, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029EFC0); i++) {
|
||||||
hudElemID = D_8029EFC0[i] = create_hud_element(HudScript_Item_StarPoint);
|
hudElemID = D_8029EFC0[i] = hud_element_create(HudScript_Item_StarPoint);
|
||||||
set_hud_element_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_depth(hudElemID, 20);
|
hud_element_set_render_depth(hudElemID, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029EFE8); i++) {
|
||||||
hudElemID = D_8029EFE8[i] = create_hud_element(HudScript_StatusSPShine);
|
hudElemID = D_8029EFE8[i] = hud_element_create(HudScript_StatusSPShine);
|
||||||
set_hud_element_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_depth(hudElemID, 20);
|
hud_element_set_render_depth(hudElemID, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029F010); i++) {
|
||||||
hudElemID = D_8029F010[i] = create_hud_element(HudScript_Item_SmallStarPoint);
|
hudElemID = D_8029F010[i] = hud_element_create(HudScript_Item_SmallStarPoint);
|
||||||
set_hud_element_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElemID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_depth(hudElemID, 20);
|
hud_element_set_render_depth(hudElemID, 20);
|
||||||
}
|
}
|
||||||
|
|
||||||
tattleCam->fpDoPreRender = func_8023F088;
|
tattleCam->fpDoPreRender = func_8023F088;
|
||||||
@ -770,10 +770,10 @@ void btl_draw_enemy_health_bars(void) {
|
|||||||
get_screen_coords(1, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(1, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
screenY += 16;
|
screenY += 16;
|
||||||
id = D_8029EFBC;
|
id = D_8029EFBC;
|
||||||
set_hud_element_render_depth(id, 10);
|
hud_element_set_render_depth(id, 10);
|
||||||
set_hud_element_anim(id, &HudScript_HPBar);
|
hud_element_set_script(id, &HudScript_HPBar);
|
||||||
set_hud_element_render_pos(id, screenX, screenY);
|
hud_element_set_render_pos(id, screenX, screenY);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
|
|
||||||
temp = currentHP / 10;
|
temp = currentHP / 10;
|
||||||
ones = currentHP % 10;
|
ones = currentHP % 10;
|
||||||
@ -781,20 +781,20 @@ void btl_draw_enemy_health_bars(void) {
|
|||||||
// tens digit
|
// tens digit
|
||||||
if (temp > 0) {
|
if (temp > 0) {
|
||||||
id = D_8029EFBC;
|
id = D_8029EFBC;
|
||||||
set_hud_element_render_depth(id, 10);
|
hud_element_set_render_depth(id, 10);
|
||||||
set_hud_element_anim(id, bHPDigitHudScripts[temp]);
|
hud_element_set_script(id, bHPDigitHudScripts[temp]);
|
||||||
btl_draw_prim_quad(0, 0, 0, 0, screenX, screenY + 2, 8, 8);
|
btl_draw_prim_quad(0, 0, 0, 0, screenX, screenY + 2, 8, 8);
|
||||||
set_hud_element_render_pos(id, screenX + 4, screenY + 6);
|
hud_element_set_render_pos(id, screenX + 4, screenY + 6);
|
||||||
draw_hud_element_2(id);
|
hud_element_draw_next(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ones digit
|
// ones digit
|
||||||
id = D_8029EFBC;
|
id = D_8029EFBC;
|
||||||
set_hud_element_render_depth(id, 10);
|
hud_element_set_render_depth(id, 10);
|
||||||
set_hud_element_anim(id, bHPDigitHudScripts[ones]);
|
hud_element_set_script(id, bHPDigitHudScripts[ones]);
|
||||||
btl_draw_prim_quad(0, 0, 0, 0, screenX + 6, screenY + 2, 8, 8);
|
btl_draw_prim_quad(0, 0, 0, 0, screenX + 6, screenY + 2, 8, 8);
|
||||||
set_hud_element_render_pos(id, screenX + 10, screenY + 6);
|
hud_element_set_render_pos(id, screenX + 10, screenY + 6);
|
||||||
draw_hud_element_2(id);
|
hud_element_draw_next(id);
|
||||||
|
|
||||||
temp = enemy->hpFraction;
|
temp = enemy->hpFraction;
|
||||||
temp = 25 - temp;
|
temp = 25 - temp;
|
||||||
@ -883,26 +883,26 @@ void btl_update_starpoints_display(void) {
|
|||||||
|
|
||||||
for (i = 0; i < tens; i++) {
|
for (i = 0; i < tens; i++) {
|
||||||
id = D_8029EFC0[i];
|
id = D_8029EFC0[i];
|
||||||
if (get_hud_element_anim(id) != HudScript_Item_StarPoint) {
|
if (hud_element_get_script(id) != HudScript_Item_StarPoint) {
|
||||||
set_hud_element_anim(id, HudScript_Item_StarPoint);
|
hud_element_set_script(id, HudScript_Item_StarPoint);
|
||||||
}
|
}
|
||||||
clear_hud_element_flags(id, 2);
|
hud_element_clear_flags(id, 2);
|
||||||
set_hud_element_render_pos(id, posX, posY);
|
hud_element_set_render_pos(id, posX, posY);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
|
|
||||||
id = D_8029EFE8[i];
|
id = D_8029EFE8[i];
|
||||||
if (get_hud_element_anim(id) != HudScript_StatusSPShine) {
|
if (hud_element_get_script(id) != HudScript_StatusSPShine) {
|
||||||
set_hud_element_anim(id, HudScript_StatusSPShine);
|
hud_element_set_script(id, HudScript_StatusSPShine);
|
||||||
}
|
}
|
||||||
clear_hud_element_flags(id, 2);
|
hud_element_clear_flags(id, 2);
|
||||||
set_hud_element_render_pos(id, posX, posY - 5);
|
hud_element_set_render_pos(id, posX, posY - 5);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
posX -= (one * 20.0f);
|
posX -= (one * 20.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; i < ARRAY_COUNT(D_8029EFC0); i++) {
|
for (; i < ARRAY_COUNT(D_8029EFC0); i++) {
|
||||||
set_hud_element_flags(D_8029EFC0[i], 2);
|
hud_element_set_flags(D_8029EFC0[i], 2);
|
||||||
set_hud_element_flags(D_8029EFE8[i], 2);
|
hud_element_set_flags(D_8029EFE8[i], 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
posX = D_8029DA40;
|
posX = D_8029DA40;
|
||||||
@ -916,17 +916,17 @@ void btl_update_starpoints_display(void) {
|
|||||||
|
|
||||||
for (i = 0; i < ones; i++) {
|
for (i = 0; i < ones; i++) {
|
||||||
id = D_8029F010[i];
|
id = D_8029F010[i];
|
||||||
if (get_hud_element_anim(id) != HudScript_Item_SmallStarPoint) {
|
if (hud_element_get_script(id) != HudScript_Item_SmallStarPoint) {
|
||||||
set_hud_element_anim(id, HudScript_Item_SmallStarPoint);
|
hud_element_set_script(id, HudScript_Item_SmallStarPoint);
|
||||||
}
|
}
|
||||||
clear_hud_element_flags(id, 2);
|
hud_element_clear_flags(id, 2);
|
||||||
set_hud_element_render_pos(id, posX, posY);
|
hud_element_set_render_pos(id, posX, posY);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
posX -= one * 10.0f;
|
posX -= one * 10.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (; i < ARRAY_COUNT(D_8029F010); i++) {
|
for (; i < ARRAY_COUNT(D_8029F010); i++) {
|
||||||
set_hud_element_flags(D_8029F010[i], 2);
|
hud_element_set_flags(D_8029F010[i], 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
450
src/18C790.c
450
src/18C790.c
@ -302,60 +302,60 @@ void btl_state_update_celebration(void) {
|
|||||||
set_background_color_blend(0, 0, 0, ((10 - D_8029FB4C) * 0x10) & 0xF0);
|
set_background_color_blend(0, 0, 0, ((10 - D_8029FB4C) * 0x10) & 0xF0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
id = create_hud_element(&D_802A9F0C);
|
id = hud_element_create(&D_802A9F0C);
|
||||||
D_8029FA80[0] = id;
|
D_8029FA80[0] = id;
|
||||||
set_hud_element_render_pos(id, 310, 140);
|
hud_element_set_render_pos(id, 310, 140);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
id = create_hud_element(&D_802A9F5C);
|
id = hud_element_create(&D_802A9F5C);
|
||||||
D_8029FA80[1] = id;
|
D_8029FA80[1] = id;
|
||||||
set_hud_element_render_pos(id, 158, 340);
|
hud_element_set_render_pos(id, 158, 340);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
id = create_hud_element(&D_802A9F84);
|
id = hud_element_create(&D_802A9F84);
|
||||||
D_8029FA80[3] = id;
|
D_8029FA80[3] = id;
|
||||||
set_hud_element_render_pos(id, 158, 340);
|
hud_element_set_render_pos(id, 158, 340);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
id = create_hud_element(&D_802A9FAC);
|
id = hud_element_create(&D_802A9FAC);
|
||||||
D_8029FA80[2] = id;
|
D_8029FA80[2] = id;
|
||||||
set_hud_element_render_pos(id, 6, 140);
|
hud_element_set_render_pos(id, 6, 140);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
id = create_hud_element(D_802841B4);
|
id = hud_element_create(D_802841B4);
|
||||||
D_8029FA90[0][0] = id;
|
D_8029FA90[0][0] = id;
|
||||||
set_hud_element_render_pos(id, 160, 317);
|
hud_element_set_render_pos(id, 160, 317);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = create_hud_element(D_802841C0[0][0]);
|
id = hud_element_create(D_802841C0[0][0]);
|
||||||
D_8029FA90[0][i] = id;
|
D_8029FA90[0][i] = id;
|
||||||
set_hud_element_render_pos(id, 160, 317);
|
hud_element_set_render_pos(id, 160, 317);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
id = create_hud_element(D_802841B8);
|
id = hud_element_create(D_802841B8);
|
||||||
D_8029FA90[0][7] = id;
|
D_8029FA90[0][7] = id;
|
||||||
set_hud_element_render_pos(id, 312, 117);
|
hud_element_set_render_pos(id, 312, 117);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 1; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = create_hud_element(D_802841C0[1][0]);
|
id = hud_element_create(D_802841C0[1][0]);
|
||||||
D_8029FA90[1][i] = id;
|
D_8029FA90[1][i] = id;
|
||||||
set_hud_element_render_pos(id, 312, 117);
|
hud_element_set_render_pos(id, 312, 117);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
id = create_hud_element(D_802841BC);
|
id = hud_element_create(D_802841BC);
|
||||||
D_8029FA90[2][0] = id;
|
D_8029FA90[2][0] = id;
|
||||||
set_hud_element_render_pos(id, 8, 117);
|
hud_element_set_render_pos(id, 8, 117);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
for (i = 1; i < ARRAY_COUNT(D_8029FA90[20]); i++) {
|
for (i = 1; i < ARRAY_COUNT(D_8029FA90[20]); i++) {
|
||||||
id = create_hud_element(D_802841C0[2][0]);
|
id = hud_element_create(D_802841C0[2][0]);
|
||||||
D_8029FA90[2][i] = id;
|
D_8029FA90[2][i] = id;
|
||||||
set_hud_element_render_pos(id, 8, 117);
|
hud_element_set_render_pos(id, 8, 117);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029FB60[0] = 0;
|
D_8029FB60[0] = 0;
|
||||||
@ -366,67 +366,67 @@ void btl_state_update_celebration(void) {
|
|||||||
fpTens = playerData->curMaxFP / 10;
|
fpTens = playerData->curMaxFP / 10;
|
||||||
fpOnes = playerData->curMaxFP % 10;
|
fpOnes = playerData->curMaxFP % 10;
|
||||||
id = D_8029FA90[0][1];
|
id = D_8029FA90[0][1];
|
||||||
set_hud_element_anim(id, D_80284238[0][fpTens]);
|
hud_element_set_script(id, D_80284238[0][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 14, y + 46);
|
hud_element_set_render_pos(id, x - 14, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[0][2];
|
id = D_8029FA90[0][2];
|
||||||
set_hud_element_anim(id, D_80284238[0][fpOnes]);
|
hud_element_set_script(id, D_80284238[0][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 8, y + 46);
|
hud_element_set_render_pos(id, x - 8, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[0][3];
|
id = D_8029FA90[0][3];
|
||||||
set_hud_element_anim(id, &D_802AA320);
|
hud_element_set_script(id, &D_802AA320);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 3, y + 46);
|
hud_element_set_render_pos(id, x - 3, y + 46);
|
||||||
|
|
||||||
|
|
||||||
fpTens = (playerData->curMaxFP + 5) / 10;
|
fpTens = (playerData->curMaxFP + 5) / 10;
|
||||||
fpOnes = (playerData->curMaxFP + 5) % 10;
|
fpOnes = (playerData->curMaxFP + 5) % 10;
|
||||||
id = D_8029FA90[0][4];
|
id = D_8029FA90[0][4];
|
||||||
set_hud_element_anim(id, D_802841C0[0][fpTens]);
|
hud_element_set_script(id, D_802841C0[0][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 3, y + 46);
|
hud_element_set_render_pos(id, x + 3, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[0][5];
|
id = D_8029FA90[0][5];
|
||||||
set_hud_element_anim(id, D_802841C0[0][fpOnes]);
|
hud_element_set_script(id, D_802841C0[0][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 10, y + 46);
|
hud_element_set_render_pos(id, x + 10, y + 46);
|
||||||
} else {
|
} else {
|
||||||
id = D_8029FA90[0][4];
|
id = D_8029FA90[0][4];
|
||||||
fpTens = playerData->curMaxFP / 10;
|
fpTens = playerData->curMaxFP / 10;
|
||||||
fpOnes = playerData->curMaxFP % 10;
|
fpOnes = playerData->curMaxFP % 10;
|
||||||
set_hud_element_anim(id, D_802841C0[0][fpTens]);
|
hud_element_set_script(id, D_802841C0[0][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 6, y + 46);
|
hud_element_set_render_pos(id, x - 6, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[0][5];
|
id = D_8029FA90[0][5];
|
||||||
set_hud_element_anim(id, D_802841C0[0][fpOnes]);
|
hud_element_set_script(id, D_802841C0[0][fpOnes]);
|
||||||
clear_hud_element_flags(id, 2);
|
hud_element_clear_flags(id, 2);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 2, y + 46);
|
hud_element_set_render_pos(id, x + 2, y + 46);
|
||||||
D_8029FB60[1] = 1;
|
D_8029FB60[1] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ability_active(0xC)) {
|
if (is_ability_active(ABILITY_FP_PLUS)) {
|
||||||
id = D_8029FAA8;
|
id = D_8029FAA8;
|
||||||
set_hud_element_anim(id, gItemHudScripts[gItemTable[248].iconID].enabled);
|
hud_element_set_script(id, gItemHudScripts[gItemTable[248].iconID].enabled);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_scale(id, 0.5f);
|
hud_element_set_scale(id, 0.5f);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 17, y + 46);
|
hud_element_set_render_pos(id, x + 17, y + 46);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerData->hardMaxHP != 50) {
|
if (playerData->hardMaxHP != 50) {
|
||||||
@ -434,68 +434,68 @@ void btl_state_update_celebration(void) {
|
|||||||
fpOnes = playerData->curMaxHP % 10;
|
fpOnes = playerData->curMaxHP % 10;
|
||||||
|
|
||||||
id = D_8029FA90[1][1];
|
id = D_8029FA90[1][1];
|
||||||
set_hud_element_anim(id, D_80284238[1][fpTens]);
|
hud_element_set_script(id, D_80284238[1][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 14, y + 46);
|
hud_element_set_render_pos(id, x - 14, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[1][2];
|
id = D_8029FA90[1][2];
|
||||||
set_hud_element_anim(id, D_80284238[1][fpOnes]);
|
hud_element_set_script(id, D_80284238[1][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 8, y + 46);
|
hud_element_set_render_pos(id, x - 8, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[1][3];
|
id = D_8029FA90[1][3];
|
||||||
set_hud_element_anim(id, &D_802AA694);
|
hud_element_set_script(id, &D_802AA694);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 3, y + 46);
|
hud_element_set_render_pos(id, x - 3, y + 46);
|
||||||
|
|
||||||
fpTens = (playerData->curMaxHP + 5) / 10;
|
fpTens = (playerData->curMaxHP + 5) / 10;
|
||||||
fpOnes = (playerData->curMaxHP + 5) % 10;
|
fpOnes = (playerData->curMaxHP + 5) % 10;
|
||||||
|
|
||||||
id = D_8029FA90[1][4];
|
id = D_8029FA90[1][4];
|
||||||
set_hud_element_anim(id, D_802841C0[1][fpTens]);
|
hud_element_set_script(id, D_802841C0[1][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 3, y + 46);
|
hud_element_set_render_pos(id, x + 3, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[1][5];
|
id = D_8029FA90[1][5];
|
||||||
set_hud_element_anim(id, D_802841C0[1][fpOnes]);
|
hud_element_set_script(id, D_802841C0[1][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 10, y + 46);
|
hud_element_set_render_pos(id, x + 10, y + 46);
|
||||||
} else {
|
} else {
|
||||||
fpTens = playerData->curMaxHP / 10;
|
fpTens = playerData->curMaxHP / 10;
|
||||||
fpOnes = playerData->curMaxHP % 10;
|
fpOnes = playerData->curMaxHP % 10;
|
||||||
|
|
||||||
id = D_8029FA90[1][4];
|
id = D_8029FA90[1][4];
|
||||||
set_hud_element_anim(id, D_802841C0[1][fpTens]);
|
hud_element_set_script(id, D_802841C0[1][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 6, y + 46);
|
hud_element_set_render_pos(id, x - 6, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[1][5];
|
id = D_8029FA90[1][5];
|
||||||
set_hud_element_anim(id, D_802841C0[1][fpOnes]);
|
hud_element_set_script(id, D_802841C0[1][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 2, y + 46);
|
hud_element_set_render_pos(id, x + 2, y + 46);
|
||||||
D_8029FB60[0] = 1;
|
D_8029FB60[0] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ability_active(4)) {
|
if (is_ability_active(ABILITY_HP_PLUS)) {
|
||||||
id = D_8029FAC4;
|
id = D_8029FAC4;
|
||||||
set_hud_element_anim(id, gItemHudScripts[gItemTable[231].iconID].enabled);
|
hud_element_set_script(id, gItemHudScripts[gItemTable[231].iconID].enabled);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_scale(id, 0.5f);
|
hud_element_set_scale(id, 0.5f);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 17, y + 46);
|
hud_element_set_render_pos(id, x + 17, y + 46);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerData->maxBP != 30) {
|
if (playerData->maxBP != 30) {
|
||||||
@ -503,69 +503,69 @@ void btl_state_update_celebration(void) {
|
|||||||
fpOnes = playerData->maxBP % 10;
|
fpOnes = playerData->maxBP % 10;
|
||||||
|
|
||||||
id = D_8029FA90[2][1];
|
id = D_8029FA90[2][1];
|
||||||
set_hud_element_anim(id, D_80284238[2][fpTens]);
|
hud_element_set_script(id, D_80284238[2][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 14, y + 46);
|
hud_element_set_render_pos(id, x - 14, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[2][2];
|
id = D_8029FA90[2][2];
|
||||||
set_hud_element_anim(id, D_80284238[2][fpOnes]);
|
hud_element_set_script(id, D_80284238[2][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 8, y + 46);
|
hud_element_set_render_pos(id, x - 8, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[2][3];
|
id = D_8029FA90[2][3];
|
||||||
set_hud_element_anim(id, &D_802AAA08);
|
hud_element_set_script(id, &D_802AAA08);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 3, y + 46);
|
hud_element_set_render_pos(id, x - 3, y + 46);
|
||||||
|
|
||||||
fpTens = (playerData->maxBP + 3) / 10;
|
fpTens = (playerData->maxBP + 3) / 10;
|
||||||
fpOnes = (playerData->maxBP + 3) % 10;
|
fpOnes = (playerData->maxBP + 3) % 10;
|
||||||
|
|
||||||
id = D_8029FA90[2][4];
|
id = D_8029FA90[2][4];
|
||||||
set_hud_element_anim(id, D_802841C0[2][fpTens]);
|
hud_element_set_script(id, D_802841C0[2][fpTens]);
|
||||||
if (fpTens != 0) {
|
if (fpTens != 0) {
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 3, y + 46);
|
hud_element_set_render_pos(id, x + 3, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[2][5];
|
id = D_8029FA90[2][5];
|
||||||
set_hud_element_anim(id, D_802841C0[2][fpOnes]);
|
hud_element_set_script(id, D_802841C0[2][fpOnes]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 10, y + 46);
|
hud_element_set_render_pos(id, x + 10, y + 46);
|
||||||
} else {
|
} else {
|
||||||
id = D_8029FA90[2][4];
|
id = D_8029FA90[2][4];
|
||||||
set_hud_element_anim(id, D_802841C0[2][3]);
|
hud_element_set_script(id, D_802841C0[2][3]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x - 6, y + 46);
|
hud_element_set_render_pos(id, x - 6, y + 46);
|
||||||
|
|
||||||
id = D_8029FA90[2][5];
|
id = D_8029FA90[2][5];
|
||||||
set_hud_element_anim(id, D_802841C0[2][0]);
|
hud_element_set_script(id, D_802841C0[2][0]);
|
||||||
clear_hud_element_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
set_hud_element_render_pos(id, x + 2, y + 46);
|
hud_element_set_render_pos(id, x + 2, y + 46);
|
||||||
D_8029FB60[2] = 1;
|
D_8029FB60[2] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029FAE8 = id = create_hud_element(&HudScript_ProjectorBeam);
|
D_8029FAE8 = id = hud_element_create(&HudScript_ProjectorBeam);
|
||||||
create_hud_element_transform_B(id);
|
hud_element_create_transform_B(id);
|
||||||
set_hud_element_render_pos(id, 156, 13);
|
hud_element_set_render_pos(id, 156, 13);
|
||||||
set_hud_element_tint(id, 255, 255, 255);
|
hud_element_set_tint(id, 255, 255, 255);
|
||||||
set_hud_element_transform_rotation_pivot(id, 0, -35);
|
hud_element_set_transform_rotation_pivot(id, 0, -35);
|
||||||
set_hud_element_transform_rotation(id, 0.0f, 0.0f, 180.0f);
|
hud_element_set_transform_rotation(id, 0.0f, 0.0f, 180.0f);
|
||||||
set_hud_element_transform_scale(id, 1.0f, 1.5f, 1.0f);
|
hud_element_set_transform_scale(id, 1.0f, 1.5f, 1.0f);
|
||||||
set_hud_element_alpha(id, 200);
|
hud_element_set_alpha(id, 200);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
D_8029FB48 = id = create_hud_element(&D_802AAA30);
|
D_8029FB48 = id = hud_element_create(&D_802AAA30);
|
||||||
set_hud_element_render_pos(id, 0, 0);
|
hud_element_set_render_pos(id, 0, 0);
|
||||||
set_hud_element_flags(id, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
battleStatus->currentSubmenu = 1;
|
battleStatus->currentSubmenu = 1;
|
||||||
D_8029FB4C = 10;
|
D_8029FB4C = 10;
|
||||||
gBattleState2 = BATTLE_STATE2_UNK_7;
|
gBattleState2 = BATTLE_STATE2_UNK_7;
|
||||||
@ -573,49 +573,49 @@ void btl_state_update_celebration(void) {
|
|||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_UNK_7:
|
case BATTLE_STATE2_UNK_7:
|
||||||
id = D_8029FA80[0];
|
id = D_8029FA80[0];
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
x -= 20;
|
x -= 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
||||||
id = D_8029FA90[1][i];
|
id = D_8029FA90[1][i];
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
x -= 20;
|
x -= 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
id = D_8029FA80[1];
|
id = D_8029FA80[1];
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
y -= 20;
|
y -= 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
|
|
||||||
id = D_8029FA80[3];
|
id = D_8029FA80[3];
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
y -= 20;
|
y -= 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = D_8029FA90[0][i];
|
id = D_8029FA90[0][i];
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
y -= 20;
|
y -= 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
id = D_8029FA88;
|
id = D_8029FA88;
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
x += 20;
|
x += 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
||||||
id = D_8029FA90[2][i];
|
id = D_8029FA90[2][i];
|
||||||
get_hud_element_render_pos(id, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
x += 20;
|
x += 20;
|
||||||
set_hud_element_render_pos(id, x, y);
|
hud_element_set_render_pos(id, x, y);
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029FB4C--;
|
D_8029FB4C--;
|
||||||
if (D_8029FB4C == 0) {
|
if (D_8029FB4C == 0) {
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
x = 20;
|
x = 20;
|
||||||
y = 186;
|
y = 186;
|
||||||
set_window_properties(8, 20, 186, 280, 32, 20, func_80260948, NULL, -1);
|
set_window_properties(8, 20, 186, 280, 32, 20, func_80260948, NULL, -1);
|
||||||
@ -661,7 +661,7 @@ void btl_state_update_celebration(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_UNK_9:
|
case BATTLE_STATE2_UNK_9:
|
||||||
free_hud_element(D_8029FAE8);
|
hud_element_free(D_8029FAE8);
|
||||||
set_window_update(8, WINDOW_UPDATE_HIDE);
|
set_window_update(8, WINDOW_UPDATE_HIDE);
|
||||||
|
|
||||||
switch (battleStatus->currentSubmenu) {
|
switch (battleStatus->currentSubmenu) {
|
||||||
@ -715,27 +715,27 @@ void btl_state_update_celebration(void) {
|
|||||||
if ((gGameStatusPtr->frameCounter % 2) != 0) {
|
if ((gGameStatusPtr->frameCounter % 2) != 0) {
|
||||||
switch (battleStatus->currentSubmenu) {
|
switch (battleStatus->currentSubmenu) {
|
||||||
case 0:
|
case 0:
|
||||||
set_hud_element_flags(D_8029FA80[0], HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(D_8029FA80[0], HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
set_hud_element_flags(D_8029FA80[1], HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(D_8029FA80[1], HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(D_8029FA80[3], HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(D_8029FA80[3], HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
set_hud_element_flags(D_8029FA88, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(D_8029FA88, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (battleStatus->currentSubmenu) {
|
switch (battleStatus->currentSubmenu) {
|
||||||
case 0:
|
case 0:
|
||||||
clear_hud_element_flags(D_8029FA80[0], HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(D_8029FA80[0], HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
clear_hud_element_flags(D_8029FA80[1], HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(D_8029FA80[1], HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
clear_hud_element_flags(D_8029FA80[3], HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(D_8029FA80[3], HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
clear_hud_element_flags(D_8029FA88, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(D_8029FA88, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -749,18 +749,18 @@ void btl_state_update_celebration(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_UNK_B:
|
case BATTLE_STATE2_UNK_B:
|
||||||
free_hud_element(D_8029FA80[0]);
|
hud_element_free(D_8029FA80[0]);
|
||||||
free_hud_element(D_8029FA80[1]);
|
hud_element_free(D_8029FA80[1]);
|
||||||
free_hud_element(D_8029FA80[3]);
|
hud_element_free(D_8029FA80[3]);
|
||||||
free_hud_element(D_8029FA80[2]);
|
hud_element_free(D_8029FA80[2]);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90); i++) {
|
||||||
for (j = 0; j < ARRAY_COUNT(D_8029FA90[0]); j++) {
|
for (j = 0; j < ARRAY_COUNT(D_8029FA90[0]); j++) {
|
||||||
free_hud_element(D_8029FA90[i][j]);
|
hud_element_free(D_8029FA90[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
free_hud_element(D_8029FB48);
|
hud_element_free(D_8029FB48);
|
||||||
set_background_color_blend(0, 0, 0, 0);
|
set_background_color_blend(0, 0, 0, 0);
|
||||||
btl_set_state(0x20);
|
btl_set_state(0x20);
|
||||||
gBattleState2 = BATTLE_STATE2_UNK_2;
|
gBattleState2 = BATTLE_STATE2_UNK_2;
|
||||||
@ -880,13 +880,13 @@ void btl_draw_upgrade_windows(s32 arg0) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_hud_element_render_pos(D_8029FA80[0], &x, &y);
|
hud_element_get_render_pos(D_8029FA80[0], &x, &y);
|
||||||
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d1, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
get_hud_element_render_pos(D_8029FA80[3], &x, &y);
|
hud_element_get_render_pos(D_8029FA80[3], &x, &y);
|
||||||
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d2, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
get_hud_element_render_pos(D_8029FA80[2], &x, &y);
|
hud_element_get_render_pos(D_8029FA80[2], &x, &y);
|
||||||
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
draw_box(0, 0xF, x - 22, y - 22, 0, 44, 44, 255, d3, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL,
|
||||||
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
}
|
}
|
||||||
@ -905,24 +905,24 @@ void btl_state_draw_celebration(void) {
|
|||||||
case BATTLE_STATE2_UNK_7:
|
case BATTLE_STATE2_UNK_7:
|
||||||
btl_draw_upgrade_windows(0);
|
btl_draw_upgrade_windows(0);
|
||||||
id = D_8029FA80[0];
|
id = D_8029FA80[0];
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
id = D_8029FA80[3];
|
id = D_8029FA80[3];
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
id = D_8029FA80[1];
|
id = D_8029FA80[1];
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
id = D_8029FA80[2];
|
id = D_8029FA80[2];
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
|
|
||||||
for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) {
|
for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) {
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = D_8029FA90[j][i];
|
id = D_8029FA90[j][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -932,127 +932,127 @@ void btl_state_draw_celebration(void) {
|
|||||||
switch (battleStatus->currentSubmenu) {
|
switch (battleStatus->currentSubmenu) {
|
||||||
case 0:
|
case 0:
|
||||||
rotZ = 152;
|
rotZ = 152;
|
||||||
set_hud_element_tint(D_8029FA80[0], 255, 255, 255);
|
hud_element_set_tint(D_8029FA80[0], 255, 255, 255);
|
||||||
set_hud_element_tint(D_8029FA80[3], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[3], 128, 128, 128);
|
||||||
set_hud_element_tint(D_8029FA80[1], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[1], 128, 128, 128);
|
||||||
set_hud_element_tint(D_8029FA80[2], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[2], 128, 128, 128);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = D_8029FA90[0][i];
|
id = D_8029FA90[0][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
||||||
id = D_8029FA90[1][i];
|
id = D_8029FA90[1][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 255, 255, 255);
|
hud_element_set_tint(id, 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
||||||
id = D_8029FA90[2][i];
|
id = D_8029FA90[2][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
id = D_8029FA80[0];
|
id = D_8029FA80[0];
|
||||||
if (get_hud_element_anim(id) != &D_802A9F34) {
|
if (hud_element_get_script(id) != &D_802A9F34) {
|
||||||
set_hud_element_anim(id, &D_802A9F34);
|
hud_element_set_script(id, &D_802A9F34);
|
||||||
}
|
}
|
||||||
id = D_8029FA80[3];
|
id = D_8029FA80[3];
|
||||||
if (get_hud_element_anim(id) != &D_802A9F84) {
|
if (hud_element_get_script(id) != &D_802A9F84) {
|
||||||
set_hud_element_anim(id, &D_802A9F84);
|
hud_element_set_script(id, &D_802A9F84);
|
||||||
}
|
}
|
||||||
id = D_8029FA80[1];
|
id = D_8029FA80[1];
|
||||||
if (get_hud_element_anim(id) != &D_802A9F5C) {
|
if (hud_element_get_script(id) != &D_802A9F5C) {
|
||||||
set_hud_element_anim(id, &D_802A9F5C);
|
hud_element_set_script(id, &D_802A9F5C);
|
||||||
}
|
}
|
||||||
id = D_8029FA80[2];
|
id = D_8029FA80[2];
|
||||||
if (get_hud_element_anim(id) != &D_802A9FAC) {
|
if (hud_element_get_script(id) != &D_802A9FAC) {
|
||||||
set_hud_element_anim(id, &D_802A9FAC);
|
hud_element_set_script(id, &D_802A9FAC);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
rotZ = 180;
|
rotZ = 180;
|
||||||
set_hud_element_tint(D_8029FA80[0], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[0], 128, 128, 128);
|
||||||
set_hud_element_tint(D_8029FA80[3], 255, 255, 255);
|
hud_element_set_tint(D_8029FA80[3], 255, 255, 255);
|
||||||
set_hud_element_tint(D_8029FA80[1], 255, 255, 255);
|
hud_element_set_tint(D_8029FA80[1], 255, 255, 255);
|
||||||
set_hud_element_tint(D_8029FA80[2], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[2], 128, 128, 128);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = D_8029FA90[0][i];
|
id = D_8029FA90[0][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 255, 255, 255);
|
hud_element_set_tint(id, 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
||||||
id = D_8029FA90[1][i];
|
id = D_8029FA90[1][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
||||||
id = D_8029FA90[2][i];
|
id = D_8029FA90[2][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
default:
|
default:
|
||||||
rotZ = 208;
|
rotZ = 208;
|
||||||
set_hud_element_tint(D_8029FA80[0], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[0], 128, 128, 128);
|
||||||
set_hud_element_tint(D_8029FA80[3], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[3], 128, 128, 128);
|
||||||
set_hud_element_tint(D_8029FA80[1], 128, 128, 128);
|
hud_element_set_tint(D_8029FA80[1], 128, 128, 128);
|
||||||
set_hud_element_tint(D_8029FA80[2], 255, 255, 255);
|
hud_element_set_tint(D_8029FA80[2], 255, 255, 255);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
id = D_8029FA90[0][i];
|
id = D_8029FA90[0][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[1]); i++) {
|
||||||
id = D_8029FA90[1][i];
|
id = D_8029FA90[1][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 128, 128, 128);
|
hud_element_set_tint(id, 128, 128, 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[2]); i++) {
|
||||||
id = D_8029FA90[2][i];
|
id = D_8029FA90[2][i];
|
||||||
|
|
||||||
set_hud_element_tint(id, 255, 255, 255);
|
hud_element_set_tint(id, 255, 255, 255);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
btl_draw_upgrade_windows(1);
|
btl_draw_upgrade_windows(1);
|
||||||
draw_hud_element_clipped(D_8029FA80[0]);
|
hud_element_draw_clipped(D_8029FA80[0]);
|
||||||
draw_hud_element_clipped(D_8029FA80[3]);
|
hud_element_draw_clipped(D_8029FA80[3]);
|
||||||
draw_hud_element_clipped(D_8029FA80[1]);
|
hud_element_draw_clipped(D_8029FA80[1]);
|
||||||
draw_hud_element_clipped(D_8029FA80[2]);
|
hud_element_draw_clipped(D_8029FA80[2]);
|
||||||
|
|
||||||
for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) {
|
for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) {
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
draw_hud_element_clipped(D_8029FA90[j][i]);
|
hud_element_draw_clipped(D_8029FA90[j][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func_80144218(-1);
|
func_80144218(-1);
|
||||||
id = D_8029FAE8;
|
id = D_8029FAE8;
|
||||||
set_hud_element_transform_rotation(id, 0.0f, 0.0f, rotZ);
|
hud_element_set_transform_rotation(id, 0.0f, 0.0f, rotZ);
|
||||||
func_80144238(id);
|
func_80144238(id);
|
||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_UNK_9:
|
case BATTLE_STATE2_UNK_9:
|
||||||
case BATTLE_STATE2_PLAYER_DEFEATED:
|
case BATTLE_STATE2_PLAYER_DEFEATED:
|
||||||
btl_draw_upgrade_windows(1);
|
btl_draw_upgrade_windows(1);
|
||||||
draw_hud_element_clipped(D_8029FA80[0]);
|
hud_element_draw_clipped(D_8029FA80[0]);
|
||||||
draw_hud_element_clipped(D_8029FA80[3]);
|
hud_element_draw_clipped(D_8029FA80[3]);
|
||||||
draw_hud_element_clipped(D_8029FA80[1]);
|
hud_element_draw_clipped(D_8029FA80[1]);
|
||||||
draw_hud_element_clipped(D_8029FA80[2]);
|
hud_element_draw_clipped(D_8029FA80[2]);
|
||||||
|
|
||||||
for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) {
|
for (j = 0; j < ARRAY_COUNT(D_8029FA90); j++) {
|
||||||
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
for (i = 0; i < ARRAY_COUNT(D_8029FA90[0]); i++) {
|
||||||
draw_hud_element_clipped(D_8029FA90[j][i]);
|
hud_element_draw_clipped(D_8029FA90[j][i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1079,8 +1079,8 @@ void btl_state_draw_celebration(void) {
|
|||||||
D_8029FB8C = -D_8029FB8C / 3;
|
D_8029FB8C = -D_8029FB8C / 3;
|
||||||
}
|
}
|
||||||
id = D_8029FB48;
|
id = D_8029FB48;
|
||||||
set_hud_element_render_pos(id, D_8029FB88 - 43, 176);
|
hud_element_set_render_pos(id, D_8029FB88 - 43, 176);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
break;
|
break;
|
||||||
case BATTLE_STATE2_PLAYER_DEFEATED:
|
case BATTLE_STATE2_PLAYER_DEFEATED:
|
||||||
D_8029FB8C += 4;
|
D_8029FB8C += 4;
|
||||||
@ -1089,8 +1089,8 @@ void btl_state_draw_celebration(void) {
|
|||||||
D_8029FB88 = 500;
|
D_8029FB88 = 500;
|
||||||
}
|
}
|
||||||
id = D_8029FB48;
|
id = D_8029FB48;
|
||||||
set_hud_element_render_pos(id, D_8029FB88 - 43, 176);
|
hud_element_set_render_pos(id, D_8029FB88 - 43, 176);
|
||||||
draw_hud_element_clipped(id);
|
hud_element_draw_clipped(id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
18
src/18F340.c
18
src/18F340.c
@ -135,8 +135,8 @@ ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
|
|||||||
posY = player->currentPos.y;
|
posY = player->currentPos.y;
|
||||||
posZ = player->currentPos.z;
|
posZ = player->currentPos.z;
|
||||||
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
|
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
|
||||||
D_8029FBA0 = create_hud_element(HudScript_Refund);
|
D_8029FBA0 = hud_element_create(HudScript_Refund);
|
||||||
set_hud_element_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63);
|
hud_element_set_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63);
|
||||||
}
|
}
|
||||||
|
|
||||||
script->varTable[0] = sleepTime;
|
script->varTable[0] = sleepTime;
|
||||||
@ -148,7 +148,7 @@ ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 sellValue = gItemTable[gBattleStatus.selectedItemID].sellValue;
|
s32 sellValue = gItemTable[gBattleStatus.selectedItemID].sellValue;
|
||||||
|
|
||||||
if (player_team_is_ability_active(gBattleStatus.playerActor, ABILITY_REFUND) && sellValue > 0) {
|
if (player_team_is_ability_active(gBattleStatus.playerActor, ABILITY_REFUND) && sellValue > 0) {
|
||||||
free_hud_element(D_8029FBA0);
|
hud_element_free(D_8029FBA0);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -407,24 +407,24 @@ ApiStatus func_802619E8(Evt* script, s32 isInitialCall) {
|
|||||||
screenY -= 19;
|
screenY -= 19;
|
||||||
|
|
||||||
if (script->varTable[10] > 0) {
|
if (script->varTable[10] > 0) {
|
||||||
D_8029FBAC = create_hud_element(HudScript_HPDrain);
|
D_8029FBAC = hud_element_create(HudScript_HPDrain);
|
||||||
set_hud_element_render_pos(D_8029FBAC, screenX, screenY);
|
hud_element_set_render_pos(D_8029FBAC, screenX, screenY);
|
||||||
screenY += 9;
|
screenY += 9;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (script->varTable[11] > 0 || script->varTable[12] > 0) {
|
if (script->varTable[11] > 0 || script->varTable[12] > 0) {
|
||||||
D_8029FBA8 = create_hud_element(HudScript_Happy);
|
D_8029FBA8 = hud_element_create(HudScript_Happy);
|
||||||
set_hud_element_render_pos(D_8029FBA8, screenX, screenY);
|
hud_element_set_render_pos(D_8029FBA8, screenX, screenY);
|
||||||
}
|
}
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80261B40(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80261B40(Evt* script, s32 isInitialCall) {
|
||||||
if (script->varTable[10] > 0) {
|
if (script->varTable[10] > 0) {
|
||||||
free_hud_element(D_8029FBAC);
|
hud_element_free(D_8029FBAC);
|
||||||
}
|
}
|
||||||
if (script->varTable[11] > 0 || script->varTable[12] > 0) {
|
if (script->varTable[11] > 0 || script->varTable[12] > 0) {
|
||||||
free_hud_element(D_8029FBA8);
|
hud_element_free(D_8029FBA8);
|
||||||
}
|
}
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -318,8 +318,8 @@ void func_80269118(void) {
|
|||||||
ActionCommandStatus *actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus *actionCommandStatus = &gActionCommandStatus;
|
||||||
|
|
||||||
if (!actionCommandStatus->autoSucceed) {
|
if (!actionCommandStatus->autoSucceed) {
|
||||||
if (playerData->otherHitsTaken < 9999) {
|
if (playerData->actionCommandAttempts < 9999) {
|
||||||
playerData->otherHitsTaken++;
|
playerData->actionCommandAttempts++;
|
||||||
actionCommandStatus->hitsTakenIsMax = FALSE;
|
actionCommandStatus->hitsTakenIsMax = FALSE;
|
||||||
} else {
|
} else {
|
||||||
actionCommandStatus->hitsTakenIsMax = TRUE;
|
actionCommandStatus->hitsTakenIsMax = TRUE;
|
||||||
@ -331,7 +331,7 @@ void func_80269160(void) {
|
|||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
if (!gActionCommandStatus.autoSucceed && gActionCommandStatus.hitsTakenIsMax) {
|
if (!gActionCommandStatus.autoSucceed && gActionCommandStatus.hitsTakenIsMax) {
|
||||||
playerData->unk_296++;
|
playerData->actionCommandSuccesses++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,14 +203,14 @@ s32 calc_player_test_enemy(void) {
|
|||||||
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
sfx_play_sound_at_position(SOUND_IMMUNE, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||||
return 8;
|
return 8;
|
||||||
} else if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) &&
|
} else if ((battleStatus->currentAttackElement & DAMAGE_TYPE_JUMP) && (part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_TOP) &&
|
||||||
!player_team_is_ability_active(player, 2))
|
!player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD))
|
||||||
{
|
{
|
||||||
sfx_play_sound_at_position(SOUND_108, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
sfx_play_sound_at_position(SOUND_108, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||||
return 4;
|
return 4;
|
||||||
} else if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP)) &&
|
} else if (!(battleStatus->currentAttackElement & (DAMAGE_TYPE_NO_CONTACT | DAMAGE_TYPE_JUMP)) &&
|
||||||
(part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT) &&
|
(part->eventFlags & ACTOR_EVENT_FLAG_SPIKY_FRONT) &&
|
||||||
(!(battleStatus->currentAttackEventSuppression & 4) &&
|
(!(battleStatus->currentAttackEventSuppression & 4) &&
|
||||||
!player_team_is_ability_active(player, 2)))
|
!player_team_is_ability_active(player, ABILITY_SPIKE_SHIELD)))
|
||||||
{
|
{
|
||||||
sfx_play_sound_at_position(SOUND_108, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
sfx_play_sound_at_position(SOUND_108, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
|
||||||
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
|
dispatch_damage_event_player_1(1, EVENT_SPIKE_CONTACT);
|
||||||
|
@ -77,7 +77,7 @@ s32 calc_partner_test_enemy(void) {
|
|||||||
|
|
||||||
if (!(battleStatus->currentAttackElement & (0x10000000 | 0x80)) &&
|
if (!(battleStatus->currentAttackElement & (0x10000000 | 0x80)) &&
|
||||||
(actorPart->eventFlags & 0x10000) && !(battleStatus->currentAttackEventSuppression & 4) &&
|
(actorPart->eventFlags & 0x10000) && !(battleStatus->currentAttackEventSuppression & 4) &&
|
||||||
!(player_team_is_ability_active(state, 2))) {
|
!(player_team_is_ability_active(state, ABILITY_SPIKE_SHIELD))) {
|
||||||
sfx_play_sound_at_position(0x108, 0, partner->state.currentPos.x,
|
sfx_play_sound_at_position(0x108, 0, partner->state.currentPos.x,
|
||||||
partner->state.currentPos.y, partner->state.currentPos.z);
|
partner->state.currentPos.y, partner->state.currentPos.z);
|
||||||
dispatch_damage_event_partner_1(1, 0x2A);
|
dispatch_damage_event_partner_1(1, 0x2A);
|
||||||
|
@ -697,7 +697,7 @@ s32 check_conversation_trigger(void) {
|
|||||||
f32 xTemp, yTemp, zTemp;
|
f32 xTemp, yTemp, zTemp;
|
||||||
s32 i, j;
|
s32 i, j;
|
||||||
|
|
||||||
playerStatus->unk_C8 = NULL;
|
playerStatus->encounteredNPC = NULL;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
|
||||||
playerColliderHeight = playerStatus->colliderHeight;
|
playerColliderHeight = playerStatus->colliderHeight;
|
||||||
playerColliderRadius = playerStatus->colliderDiameter / 2;
|
playerColliderRadius = playerStatus->colliderDiameter / 2;
|
||||||
@ -796,7 +796,7 @@ s32 check_conversation_trigger(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) && npc != NULL && !is_picking_up_item()) {
|
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) && npc != NULL && !is_picking_up_item()) {
|
||||||
playerStatus->unk_C8 = npc;
|
playerStatus->encounteredNPC = npc;
|
||||||
playerStatus->flags |= PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
|
playerStatus->flags |= PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
|
||||||
if (playerStatus->pressedButtons & BUTTON_A) {
|
if (playerStatus->pressedButtons & BUTTON_A) {
|
||||||
close_status_menu();
|
close_status_menu();
|
||||||
|
118
src/415D90.c
118
src/415D90.c
@ -282,18 +282,18 @@ void func_802A10B8(void) {
|
|||||||
s32* icons1 = D_802AD010;
|
s32* icons1 = D_802AD010;
|
||||||
s32* icons2 = D_802AD028;
|
s32* icons2 = D_802AD028;
|
||||||
|
|
||||||
free_hud_element(icons1[i]);
|
hud_element_free(icons1[i]);
|
||||||
free_hud_element(icons2[i]);
|
hud_element_free(icons2[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_hud_element(D_802AD040);
|
hud_element_free(D_802AD040);
|
||||||
free_hud_element(D_802AD044);
|
hud_element_free(D_802AD044);
|
||||||
free_hud_element(D_802AD048);
|
hud_element_free(D_802AD048);
|
||||||
free_hud_element(D_802AD04C);
|
hud_element_free(D_802AD04C);
|
||||||
free_hud_element(D_802AD05C);
|
hud_element_free(D_802AD05C);
|
||||||
free_hud_element(D_802AD050);
|
hud_element_free(D_802AD050);
|
||||||
free_hud_element(D_802AD054);
|
hud_element_free(D_802AD054);
|
||||||
free_hud_element(D_802AD058);
|
hud_element_free(D_802AD058);
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "415D90", func_802A11B0);
|
INCLUDE_ASM(s32, "415D90", func_802A11B0);
|
||||||
@ -362,16 +362,16 @@ void func_802A27E4(void) {
|
|||||||
set_window_update(8, WINDOW_UPDATE_HIDE);
|
set_window_update(8, WINDOW_UPDATE_HIDE);
|
||||||
|
|
||||||
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
||||||
free_hud_element(battle_menu_moveOptionIconIDs[i]);
|
hud_element_free(battle_menu_moveOptionIconIDs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_hud_element(battle_menu_moveCursorIcon);
|
hud_element_free(battle_menu_moveCursorIcon);
|
||||||
free_hud_element(battle_menu_moveUpArrowIcon);
|
hud_element_free(battle_menu_moveUpArrowIcon);
|
||||||
free_hud_element(battle_menu_moveDownArrowIcon);
|
hud_element_free(battle_menu_moveDownArrowIcon);
|
||||||
free_hud_element(battle_menu_moveTitleIcon);
|
hud_element_free(battle_menu_moveTitleIcon);
|
||||||
|
|
||||||
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
||||||
free_hud_element(battle_menu_moveOptionCostUnitIconIDs[i]);
|
hud_element_free(battle_menu_moveOptionCostUnitIconIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -383,21 +383,21 @@ void func_802A2910(void) {
|
|||||||
moveOptionIconIDs = battle_menu_moveOptionIconIDs;
|
moveOptionIconIDs = battle_menu_moveOptionIconIDs;
|
||||||
|
|
||||||
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
||||||
set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255);
|
hud_element_set_tint(moveOptionIconIDs[i], 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_tint(battle_menu_moveCursorIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveCursorIcon, 255, 255, 255);
|
||||||
set_hud_element_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
|
||||||
set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
|
||||||
set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveTitleIcon, 255, 255, 255);
|
||||||
|
|
||||||
moveOptionCostUnitIconIDs = battle_menu_moveOptionCostUnitIconIDs;
|
moveOptionCostUnitIconIDs = battle_menu_moveOptionCostUnitIconIDs;
|
||||||
|
|
||||||
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
||||||
set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
|
hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_anim(battle_menu_moveCursorIcon, HudScript_AnimatedHandPointer);
|
hud_element_set_script(battle_menu_moveCursorIcon, HudScript_AnimatedHandPointer);
|
||||||
set_window_update(1, WINDOW_UPDATE_TRANSPARENT);
|
set_window_update(1, WINDOW_UPDATE_TRANSPARENT);
|
||||||
|
|
||||||
if (!battle_menu_hasSpiritsMenu) {
|
if (!battle_menu_hasSpiritsMenu) {
|
||||||
@ -434,21 +434,21 @@ void func_802A2AB8(void) {
|
|||||||
moveOptionIconIDs = battle_menu_moveOptionIconIDs;
|
moveOptionIconIDs = battle_menu_moveOptionIconIDs;
|
||||||
|
|
||||||
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
||||||
set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255);
|
hud_element_set_tint(moveOptionIconIDs[i], 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_tint(battle_menu_moveCursorIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveCursorIcon, 255, 255, 255);
|
||||||
set_hud_element_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
|
||||||
set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
|
||||||
set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255);
|
hud_element_set_tint(battle_menu_moveTitleIcon, 255, 255, 255);
|
||||||
|
|
||||||
moveOptionCostUnitIconIDs = battle_menu_moveOptionCostUnitIconIDs;
|
moveOptionCostUnitIconIDs = battle_menu_moveOptionCostUnitIconIDs;
|
||||||
|
|
||||||
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
for (i = 0; i < battle_menu_moveOptionCount; i++) {
|
||||||
set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
|
hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_anim(battle_menu_moveCursorIcon, HudScript_AnimatedHandPointer);
|
hud_element_set_script(battle_menu_moveCursorIcon, HudScript_AnimatedHandPointer);
|
||||||
battle_menu_moveTextColor = 10;
|
battle_menu_moveTextColor = 10;
|
||||||
D_802AD10F = 1;
|
D_802AD10F = 1;
|
||||||
battle_menu_moveState = 20;
|
battle_menu_moveState = 20;
|
||||||
@ -489,9 +489,9 @@ void func_802A43DC(s32 arg0, s32 x, s32 y) {
|
|||||||
void func_802A4448(s32 arg0, s32 x, s32 y) {
|
void func_802A4448(s32 arg0, s32 x, s32 y) {
|
||||||
s32 icon = battle_menu_moveTitleIcon;
|
s32 icon = battle_menu_moveTitleIcon;
|
||||||
|
|
||||||
set_hud_element_render_pos(icon, x + 16, y + 15);
|
hud_element_set_render_pos(icon, x + 16, y + 15);
|
||||||
set_hud_element_alpha(icon, battle_menu_moveTextOpacity);
|
hud_element_set_alpha(icon, battle_menu_moveTextOpacity);
|
||||||
draw_hud_element_clipped(icon);
|
hud_element_draw_clipped(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A4494(s32 arg0, s32 x, s32 y) {
|
void func_802A4494(s32 arg0, s32 x, s32 y) {
|
||||||
@ -581,25 +581,25 @@ void func_802A472C(void) {
|
|||||||
set_window_update(8, WINDOW_UPDATE_HIDE);
|
set_window_update(8, WINDOW_UPDATE_HIDE);
|
||||||
|
|
||||||
for (i = 0; i < D_802AD66C; i++) {
|
for (i = 0; i < D_802AD66C; i++) {
|
||||||
free_hud_element(D_802AD628[i]);
|
hud_element_free(D_802AD628[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_hud_element(D_802AD618);
|
hud_element_free(D_802AD618);
|
||||||
free_hud_element(D_802AD61C);
|
hud_element_free(D_802AD61C);
|
||||||
free_hud_element(D_802AD620);
|
hud_element_free(D_802AD620);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A47E0(void) {
|
void func_802A47E0(void) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < D_802AD66C; i++) {
|
for (i = 0; i < D_802AD66C; i++) {
|
||||||
set_hud_element_tint(D_802AD628[i], 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD628[i], 0xFF, 0xFF, 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
|
||||||
set_hud_element_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
|
||||||
set_hud_element_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
|
||||||
set_hud_element_anim(D_802AD618, HudScript_AnimatedHandPointer);
|
hud_element_set_script(D_802AD618, HudScript_AnimatedHandPointer);
|
||||||
set_window_update(6, WINDOW_UPDATE_TRANSPARENT);
|
set_window_update(6, WINDOW_UPDATE_TRANSPARENT);
|
||||||
set_window_update(7, WINDOW_UPDATE_TRANSPARENT);
|
set_window_update(7, WINDOW_UPDATE_TRANSPARENT);
|
||||||
set_window_update(8, WINDOW_UPDATE_SHOW);
|
set_window_update(8, WINDOW_UPDATE_SHOW);
|
||||||
@ -617,13 +617,13 @@ void func_802A48FC(void) {
|
|||||||
set_window_update(8, WINDOW_UPDATE_SHOW);
|
set_window_update(8, WINDOW_UPDATE_SHOW);
|
||||||
|
|
||||||
for (i = 0; i < D_802AD66C; i++) {
|
for (i = 0; i < D_802AD66C; i++) {
|
||||||
set_hud_element_tint(D_802AD628[i], 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD628[i], 0xFF, 0xFF, 0xFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD618, 0xFF, 0xFF, 0xFF);
|
||||||
set_hud_element_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD61C, 0xFF, 0xFF, 0xFF);
|
||||||
set_hud_element_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
|
hud_element_set_tint(D_802AD620, 0xFF, 0xFF, 0xFF);
|
||||||
set_hud_element_anim(D_802AD618, HudScript_AnimatedHandPointer);
|
hud_element_set_script(D_802AD618, HudScript_AnimatedHandPointer);
|
||||||
D_802AD614 = 10;
|
D_802AD614 = 10;
|
||||||
D_802AD60B = 1;
|
D_802AD60B = 1;
|
||||||
D_802AD604 = 20;
|
D_802AD604 = 20;
|
||||||
@ -698,9 +698,9 @@ void func_802A5290(s32 arg0, s32 x, s32 y) {
|
|||||||
for (i = 0; i < D_802AD66C; i++, phi_s1_2 += 0xD) {
|
for (i = 0; i < D_802AD66C; i++, phi_s1_2 += 0xD) {
|
||||||
iconIndex = D_802AD628[i];
|
iconIndex = D_802AD628[i];
|
||||||
|
|
||||||
set_hud_element_render_pos(iconIndex, xTemp, phi_s1_2);
|
hud_element_set_render_pos(iconIndex, xTemp, phi_s1_2);
|
||||||
set_hud_element_alpha(iconIndex, D_802AD624);
|
hud_element_set_alpha(iconIndex, D_802AD624);
|
||||||
draw_hud_element_3(iconIndex);
|
hud_element_draw_without_clipping(iconIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_s1_3 = (D_802AD605 - D_802AD608) * 13;
|
temp_s1_3 = (D_802AD605 - D_802AD608) * 13;
|
||||||
@ -712,22 +712,22 @@ void func_802A5290(s32 arg0, s32 x, s32 y) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
iconIndex = D_802AD618;
|
iconIndex = D_802AD618;
|
||||||
set_hud_element_render_pos(iconIndex, x + 10, y + (D_802AD60E + 26));
|
hud_element_set_render_pos(iconIndex, x + 10, y + (D_802AD60E + 26));
|
||||||
set_hud_element_alpha(iconIndex, D_802AD624);
|
hud_element_set_alpha(iconIndex, D_802AD624);
|
||||||
draw_hud_element_clipped(iconIndex);
|
hud_element_draw_clipped(iconIndex);
|
||||||
|
|
||||||
if (D_802AD608 > 0) {
|
if (D_802AD608 > 0) {
|
||||||
iconIndex = D_802AD61C;
|
iconIndex = D_802AD61C;
|
||||||
set_hud_element_render_pos(iconIndex, x + 67, y + 16);
|
hud_element_set_render_pos(iconIndex, x + 67, y + 16);
|
||||||
set_hud_element_alpha(iconIndex, D_802AD624);
|
hud_element_set_alpha(iconIndex, D_802AD624);
|
||||||
draw_hud_element_clipped(iconIndex);
|
hud_element_draw_clipped(iconIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_802AD609 < D_802AD66C) {
|
if (D_802AD609 < D_802AD66C) {
|
||||||
iconIndex = D_802AD620;
|
iconIndex = D_802AD620;
|
||||||
set_hud_element_render_pos(iconIndex, x + 67, y + 100);
|
hud_element_set_render_pos(iconIndex, x + 67, y + 100);
|
||||||
set_hud_element_alpha(iconIndex, D_802AD624);
|
hud_element_set_alpha(iconIndex, D_802AD624);
|
||||||
draw_hud_element_clipped(iconIndex);
|
hud_element_draw_clipped(iconIndex);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
126
src/77480.c
126
src/77480.c
@ -13,7 +13,7 @@ void func_800F0C9C(void);
|
|||||||
|
|
||||||
extern UNK_FUN_PTR(D_8010C93C);
|
extern UNK_FUN_PTR(D_8010C93C);
|
||||||
|
|
||||||
extern s32 D_802BDF60;
|
extern s32 GoombarioGetTattleID;
|
||||||
extern s8 D_8015A57A;
|
extern s8 D_8015A57A;
|
||||||
extern s32 D_800F7B4C;
|
extern s32 D_800F7B4C;
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ s32 player_raycast_down(f32* x, f32* y, f32* z, f32* length) {
|
|||||||
entity->unk_07 = 4;
|
entity->unk_07 = 4;
|
||||||
entity->flags |= ENTITY_FLAGS_CONTINUOUS_COLLISION;
|
entity->flags |= ENTITY_FLAGS_CONTINUOUS_COLLISION;
|
||||||
} else {
|
} else {
|
||||||
ret = entityID | 0x4000;
|
ret = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,7 +358,7 @@ s32 player_raycast_up_corner(f32* x, f32* y, f32* z, f32* length) {
|
|||||||
sz = sz2;
|
sz = sz2;
|
||||||
if (hitID >= 0 && *length > hitDepth) {
|
if (hitID >= 0 && *length > hitDepth) {
|
||||||
get_entity_by_index(hitID);
|
get_entity_by_index(hitID);
|
||||||
ret = hitID | 0x4000;
|
ret = hitID | COLLISION_WITH_ENTITY_BIT;
|
||||||
*length = hitDepth;
|
*length = hitDepth;
|
||||||
*x = sx;
|
*x = sx;
|
||||||
*y = sy;
|
*y = sy;
|
||||||
@ -451,17 +451,17 @@ s32 player_raycast_general(s32 mode, f32 startX, f32 startY, f32 startZ, f32 dir
|
|||||||
entity->unk_07 = 0;
|
entity->unk_07 = 0;
|
||||||
entity->flags |= ENTITY_FLAGS_CONTINUOUS_COLLISION;
|
entity->flags |= ENTITY_FLAGS_CONTINUOUS_COLLISION;
|
||||||
} else {
|
} else {
|
||||||
ret = entityID | 0x4000;
|
ret = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
}
|
}
|
||||||
} else if (mode == 3) {
|
} else if (mode == 3) {
|
||||||
ret = test_ray_colliders(0x8000, startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, hitDepth,
|
ret = test_ray_colliders(COLLIDER_FLAGS_IGNORE_SHELL, startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, hitDepth,
|
||||||
hitNx, hitNy, hitNz);
|
hitNx, hitNy, hitNz);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mode == 1 || mode == 3)
|
if (mode == 1 || mode == 3)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
ignoreFlags = 0x10000;
|
ignoreFlags = COLLIDER_FLAGS_IGNORE_PLAYER;
|
||||||
if (mode == 4) {
|
if (mode == 4) {
|
||||||
ignoreFlags = 0x80000;
|
ignoreFlags = 0x80000;
|
||||||
}
|
}
|
||||||
@ -705,13 +705,13 @@ void check_input_use_partner(void) {
|
|||||||
u32 actionState = playerStatus->actionState;
|
u32 actionState = playerStatus->actionState;
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO)) {
|
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO)) {
|
||||||
if (playerStatus->animFlags & 8 || playerStatus->statusMenuCounterinputEnabledCounter == 0) {
|
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8 || playerStatus->inputEnabledCounter == 0) {
|
||||||
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PLAYER_STATUS_FLAGS_80) &&
|
if (playerStatus->pressedButtons & BUTTON_C_DOWN && !(playerStatus->flags & PLAYER_STATUS_FLAGS_80) &&
|
||||||
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PLAYER_STATUS_FLAGS_1000) &&
|
!(playerStatus->pressedButtons & BUTTON_B) && !(playerStatus->animFlags & PLAYER_STATUS_FLAGS_1000) &&
|
||||||
actionState <= ACTION_STATE_RUN) {
|
actionState <= ACTION_STATE_RUN) {
|
||||||
|
|
||||||
if (playerData->currentPartner == PARTNER_GOOMBARIO) {
|
if (playerData->currentPartner == PARTNER_GOOMBARIO) {
|
||||||
D_802BDF60 = playerStatus->unk_C6;
|
GoombarioGetTattleID = playerStatus->interactingWithID;
|
||||||
}
|
}
|
||||||
partner_use_ability();
|
partner_use_ability();
|
||||||
}
|
}
|
||||||
@ -847,7 +847,7 @@ s32 get_overriding_player_anim(s32 anim) {
|
|||||||
} else if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_IN_DISGUISE)) {
|
} else if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_IN_DISGUISE)) {
|
||||||
anim = ANIM_C0010;
|
anim = ANIM_C0010;
|
||||||
} else {
|
} else {
|
||||||
peach_set_disguise_anim(world_actions_peachDisguises[playerStatus->peachDisguise].unk_14);
|
peach_set_disguise_anim(BasicPeachDisguiseAnims[playerStatus->peachDisguise].hold);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
} else if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS) {
|
} else if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS) {
|
||||||
@ -863,31 +863,31 @@ s32 get_overriding_player_anim(s32 anim) {
|
|||||||
return anim;
|
return anim;
|
||||||
}
|
}
|
||||||
|
|
||||||
void suggest_player_anim_clearUnkFlag(s32 arg0) {
|
void suggest_player_anim_clearUnkFlag(s32 anim) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 temp_v0 = get_overriding_player_anim(arg0);
|
s32 newAnim = get_overriding_player_anim(anim);
|
||||||
|
|
||||||
if (temp_v0 != -1) {
|
if (newAnim != -1) {
|
||||||
playerStatus->anim = temp_v0;
|
playerStatus->anim = newAnim;
|
||||||
playerStatus->unk_BC = 0;
|
playerStatus->unk_BC = 0;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_10000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_10000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void force_player_anim(s32 arg0) {
|
void force_player_anim(s32 anim) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
playerStatus->anim = arg0;
|
playerStatus->anim = anim;
|
||||||
playerStatus->unk_BC = 0;
|
playerStatus->unk_BC = 0;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_10000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_10000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void suggest_player_anim_setUnkFlag(s32 arg0) {
|
void suggest_player_anim_setUnkFlag(s32 anim) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 temp_v0 = get_overriding_player_anim(arg0);
|
s32 newAnim = get_overriding_player_anim(anim);
|
||||||
|
|
||||||
if (temp_v0 != -1) {
|
if (newAnim != -1) {
|
||||||
playerStatus->anim = temp_v0;
|
playerStatus->anim = newAnim;
|
||||||
playerStatus->unk_BC = 0;
|
playerStatus->unk_BC = 0;
|
||||||
playerStatus->flags |= PLAYER_STATUS_FLAGS_10000000;
|
playerStatus->flags |= PLAYER_STATUS_FLAGS_10000000;
|
||||||
}
|
}
|
||||||
@ -903,8 +903,8 @@ void update_player_blink(void) {
|
|||||||
phi_a2 = gPartnerActionStatus.actionState.b[0] != 0;
|
phi_a2 = gPartnerActionStatus.actionState.b[0] != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->unk_10 > 0) {
|
if (playerStatus->blinkTimer > 0) {
|
||||||
playerStatus->unk_10--;
|
playerStatus->blinkTimer--;
|
||||||
alpha = &playerStatus->alpha1;
|
alpha = &playerStatus->alpha1;
|
||||||
if (!(gGameStatusPtr->frameCounter & 1)) {
|
if (!(gGameStatusPtr->frameCounter & 1)) {
|
||||||
if (phi_a2) {
|
if (phi_a2) {
|
||||||
@ -917,7 +917,7 @@ void update_player_blink(void) {
|
|||||||
}
|
}
|
||||||
*alpha = phi_v1;
|
*alpha = phi_v1;
|
||||||
|
|
||||||
if (!playerStatus->unk_10) {
|
if (!playerStatus->blinkTimer) {
|
||||||
if (phi_a2) {
|
if (phi_a2) {
|
||||||
playerStatus->alpha1 = 0x80;
|
playerStatus->alpha1 = 0x80;
|
||||||
playerStatus->flags |= PLAYER_STATUS_FLAGS_8000;
|
playerStatus->flags |= PLAYER_STATUS_FLAGS_8000;
|
||||||
@ -968,18 +968,18 @@ s32 disable_player_input(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
playerStatus->flags |= PLAYER_STATUS_FLAGS_INPUT_DISABLED;
|
playerStatus->flags |= PLAYER_STATUS_FLAGS_INPUT_DISABLED;
|
||||||
playerStatus->statusMenuCounterinputEnabledCounter++;
|
playerStatus->inputEnabledCounter++;
|
||||||
return playerStatus->statusMenuCounterinputEnabledCounter;
|
return playerStatus->inputEnabledCounter;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 enable_player_input(void) {
|
s32 enable_player_input(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
playerStatus->statusMenuCounterinputEnabledCounter--;
|
playerStatus->inputEnabledCounter--;
|
||||||
if (playerStatus->statusMenuCounterinputEnabledCounter == 0) {
|
if (playerStatus->inputEnabledCounter == 0) {
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_INPUT_DISABLED;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_INPUT_DISABLED;
|
||||||
}
|
}
|
||||||
return playerStatus->statusMenuCounterinputEnabledCounter;
|
return playerStatus->inputEnabledCounter;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800E01DC(void) {
|
void func_800E01DC(void) {
|
||||||
@ -1059,7 +1059,7 @@ void check_for_pulse_stone(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPlayerStatus.flags & PLAYER_STATUS_FLAGS_20 || gPlayerStatus.statusMenuCounterinputEnabledCounter) {
|
if (gPlayerStatus.flags & PLAYER_STATUS_FLAGS_20 || gPlayerStatus.inputEnabledCounter) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1087,11 +1087,11 @@ void func_800E0514(void) {
|
|||||||
|
|
||||||
s32 has_valid_conversation_npc(void) {
|
s32 has_valid_conversation_npc(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
Npc* unk_C8 = playerStatus->unk_C8;
|
Npc* npc = playerStatus->encounteredNPC;
|
||||||
s32 ret = 0;
|
s32 ret = FALSE;
|
||||||
s32 cond;
|
s32 cond;
|
||||||
|
|
||||||
if (unk_C8 != NULL && !(unk_C8->flags & 0x10000000)) {
|
if (npc != NULL && !(npc->flags & 0x10000000)) {
|
||||||
cond = (playerStatus->flags & (PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC | PLAYER_STATUS_FLAGS_INPUT_DISABLED))
|
cond = (playerStatus->flags & (PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC | PLAYER_STATUS_FLAGS_INPUT_DISABLED))
|
||||||
== PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
|
== PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
|
||||||
ret = cond;
|
ret = cond;
|
||||||
@ -1105,7 +1105,7 @@ void check_for_conversation_prompt(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (D_8010C940 == NULL) {
|
if (D_8010C940 == NULL) {
|
||||||
if (gPlayerStatus.statusMenuCounterinputEnabledCounter || gPlayerStatus.flags & PLAYER_STATUS_FLAGS_20) {
|
if (gPlayerStatus.inputEnabledCounter || gPlayerStatus.flags & PLAYER_STATUS_FLAGS_20) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1141,11 +1141,11 @@ void func_800E06C0(s32 arg0) {
|
|||||||
|
|
||||||
s32 func_800E06D8(void) {
|
s32 func_800E06D8(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
Npc* npc = playerStatus->unk_C8;
|
Npc* npc = playerStatus->encounteredNPC;
|
||||||
s32 temp = playerStatus->unk_C6;
|
s32 temp = playerStatus->interactingWithID;
|
||||||
s32 wall;
|
s32 wall;
|
||||||
|
|
||||||
if (playerStatus->decorationList || playerStatus->statusMenuCounterinputEnabledCounter) {
|
if (playerStatus->decorationList || playerStatus->inputEnabledCounter) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
if (gCollisionStatus.currentWall == -1) {
|
if (gCollisionStatus.currentWall == -1) {
|
||||||
@ -1153,17 +1153,17 @@ s32 func_800E06D8(void) {
|
|||||||
}
|
}
|
||||||
if (playerStatus->flags & PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC && !(playerStatus->flags & PLAYER_STATUS_FLAGS_INPUT_DISABLED)
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC && !(playerStatus->flags & PLAYER_STATUS_FLAGS_INPUT_DISABLED)
|
||||||
&& npc != NULL && npc->flags & NPC_FLAG_10000000) {
|
&& npc != NULL && npc->flags & NPC_FLAG_10000000) {
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
wall = gCollisionStatus.currentWall;
|
wall = gCollisionStatus.currentWall;
|
||||||
if (!(wall & 0x4000)) {
|
if (!(wall & COLLISION_WITH_ENTITY_BIT)) {
|
||||||
if (!should_collider_allow_interact(wall)) {
|
if (!should_collider_allow_interact(wall)) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
} else if (!phys_can_player_interact()) {
|
} else if (!phys_can_player_interact()) {
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else if (get_entity_type(wall) == 0xC) {
|
} else if (get_entity_type(wall) == 0xC) {
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1176,7 +1176,7 @@ s32 func_800E06D8(void) {
|
|||||||
} else {
|
} else {
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
||||||
}
|
}
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -1185,7 +1185,7 @@ static const f32 pad[1] = { 0.0f};
|
|||||||
|
|
||||||
void check_for_interactables(void) {
|
void check_for_interactables(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
Npc* npc = gPlayerStatus.unk_C8;
|
Npc* npc = gPlayerStatus.encounteredNPC;
|
||||||
s32 phi_s2;
|
s32 phi_s2;
|
||||||
|
|
||||||
if ((playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_100) || D_8010C940 || D_8010C920) {
|
if ((playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_100) || D_8010C940 || D_8010C920) {
|
||||||
@ -1193,11 +1193,11 @@ void check_for_interactables(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (D_8010C958 == NULL) {
|
if (D_8010C958 == NULL) {
|
||||||
s32 phi_s0 = gCollisionStatus.currentWall;
|
s32 curInteraction = gCollisionStatus.currentWall;
|
||||||
|
|
||||||
if (playerStatus->statusMenuCounterinputEnabledCounter != 0) {
|
if (playerStatus->inputEnabledCounter != 0) {
|
||||||
if (gPlayerStatus.unk_C6 != phi_s0) {
|
if (gPlayerStatus.interactingWithID != curInteraction) {
|
||||||
gPlayerStatus.unk_C6 = phi_s0;
|
gPlayerStatus.interactingWithID = curInteraction;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1206,12 +1206,12 @@ void check_for_interactables(void) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phi_s0 == -1) {
|
if (curInteraction == -1) {
|
||||||
s32 floor = gCollisionStatus.currentFloor;
|
s32 floor = gCollisionStatus.currentFloor;
|
||||||
|
|
||||||
if ((floor >= 0) && (floor & 0x4000)) {
|
if ((floor >= 0) && (floor & COLLISION_WITH_ENTITY_BIT)) {
|
||||||
phi_s2 = 1;
|
phi_s2 = 1;
|
||||||
phi_s0 = floor;
|
curInteraction = floor;
|
||||||
switch (get_entity_type(floor)) {
|
switch (get_entity_type(floor)) {
|
||||||
case ENTITY_TYPE_PADLOCK:
|
case ENTITY_TYPE_PADLOCK:
|
||||||
case ENTITY_TYPE_PADLOCK_RED_FRAME:
|
case ENTITY_TYPE_PADLOCK_RED_FRAME:
|
||||||
@ -1220,27 +1220,27 @@ void check_for_interactables(void) {
|
|||||||
case ENTITY_TYPE_PUSH_BLOCK:
|
case ENTITY_TYPE_PUSH_BLOCK:
|
||||||
case ENTITY_TYPE_CHEST:
|
case ENTITY_TYPE_CHEST:
|
||||||
case ENTITY_TYPE_SIGNPOST:
|
case ENTITY_TYPE_SIGNPOST:
|
||||||
phi_s0 = -1;
|
curInteraction = -1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (((playerStatus->flags & (PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC | PLAYER_STATUS_FLAGS_INPUT_DISABLED)) == PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC)
|
} else if (((playerStatus->flags & (PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC | PLAYER_STATUS_FLAGS_INPUT_DISABLED)) == PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC)
|
||||||
&& (npc != NULL) && (npc->flags & NPC_FLAG_10000000)) {
|
&& (npc != NULL) && (npc->flags & NPC_FLAG_10000000)) {
|
||||||
phi_s0 = npc->npcID | 0x2000;
|
curInteraction = npc->npcID | COLLISION_WITH_NPC_BIT;
|
||||||
if (playerStatus->unk_C6 == phi_s0) {
|
if (playerStatus->interactingWithID == curInteraction) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
phi_s2 = 0;
|
phi_s2 = 0;
|
||||||
} else {
|
} else {
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!(phi_s0 & 0x4000)) {
|
if (!(curInteraction & COLLISION_WITH_ENTITY_BIT)) {
|
||||||
phi_s2 = 0;
|
phi_s2 = 0;
|
||||||
if (!(phi_s0 & 0x2000)) {
|
if (!(curInteraction & COLLISION_WITH_NPC_BIT)) {
|
||||||
if (!should_collider_allow_interact(phi_s0)) {
|
if (!should_collider_allow_interact(curInteraction)) {
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1248,14 +1248,14 @@ void check_for_interactables(void) {
|
|||||||
} else {
|
} else {
|
||||||
if (!phys_can_player_interact()) {
|
if (!phys_can_player_interact()) {
|
||||||
phi_s2 = 1;
|
phi_s2 = 1;
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
phi_s2 = 1;
|
phi_s2 = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (playerStatus->unk_C6 == phi_s0) {
|
if (playerStatus->interactingWithID == curInteraction) {
|
||||||
if ((playerStatus->flags & PLAYER_STATUS_FLAGS_8000000)) {
|
if ((playerStatus->flags & PLAYER_STATUS_FLAGS_8000000)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1263,8 +1263,8 @@ void check_for_interactables(void) {
|
|||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_8000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->unk_C6 = phi_s0;
|
playerStatus->interactingWithID = curInteraction;
|
||||||
if ((phi_s2 == 0) || phi_s0 >= 0 && get_entity_by_index(phi_s0)->flags & ENTITY_FLAGS_SHOWS_INSPECT_PROMPT) {
|
if ((phi_s2 == 0) || curInteraction >= 0 && get_entity_by_index(curInteraction)->flags & ENTITY_FLAGS_SHOWS_INSPECT_PROMPT) {
|
||||||
if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) {
|
if (playerStatus->actionState == ACTION_STATE_IDLE || playerStatus->actionState == ACTION_STATE_WALK || playerStatus->actionState == ACTION_STATE_RUN) {
|
||||||
playerStatus->animFlags |= PLAYER_STATUS_ANIM_FLAGS_INTERACT_PROMPT_AVAILABLE;
|
playerStatus->animFlags |= PLAYER_STATUS_ANIM_FLAGS_INTERACT_PROMPT_AVAILABLE;
|
||||||
func_800EF3D4(2);
|
func_800EF3D4(2);
|
||||||
@ -1308,9 +1308,9 @@ void update_partner_timers(void) {
|
|||||||
if (!gGameStatusPtr->isBattle) {
|
if (!gGameStatusPtr->isBattle) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 1; i < ARRAY_COUNT(playerData->unk_2C4); i++) {
|
for (i = 1; i < ARRAY_COUNT(playerData->partnerUnlockedTime); i++) {
|
||||||
if (playerData->partners[i].enabled) {
|
if (playerData->partners[i].enabled) {
|
||||||
playerData->unk_2C4[i] += 1;
|
playerData->partnerUnlockedTime[i] += 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1400,7 +1400,7 @@ void appendGfx_player(void* data) {
|
|||||||
spr_draw_player_sprite(0, 0, 0, 0, sp20);
|
spr_draw_player_sprite(0, 0, 0, 0, sp20);
|
||||||
} else {
|
} else {
|
||||||
guRotateF(spA0, temp_f0, 0.0f, -1.0f, 0.0f);
|
guRotateF(spA0, temp_f0, 0.0f, -1.0f, 0.0f);
|
||||||
guRotateF(sp20, clamp_angle(playerStatus->unk_8C), 0.0f, 0.0f, 1.0f);
|
guRotateF(sp20, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f);
|
||||||
guMtxCatF(spA0, sp20, sp20);
|
guMtxCatF(spA0, sp20, sp20);
|
||||||
guTranslateF(sp60, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f);
|
guTranslateF(sp60, 0.0f, -playerStatus->colliderHeight * 0.5f, 0.0f);
|
||||||
guMtxCatF(sp60, sp20, sp20);
|
guMtxCatF(sp60, sp20, sp20);
|
||||||
@ -1485,7 +1485,7 @@ void appendGfx_player_spin(void* data) {
|
|||||||
func_802DDFF8(0, 6, tint, tint, tint, 255, 0);
|
func_802DDFF8(0, 6, tint, tint, tint, 255, 0);
|
||||||
|
|
||||||
guRotateF(rotation, yaw, 0.0f, -1.0f, 0.0f);
|
guRotateF(rotation, yaw, 0.0f, -1.0f, 0.0f);
|
||||||
guRotateF(mtx, clamp_angle(playerStatus->unk_8C), 0.0f, 0.0f, 1.0f);
|
guRotateF(mtx, clamp_angle(playerStatus->pitch), 0.0f, 0.0f, 1.0f);
|
||||||
guMtxCatF(rotation, mtx, mtx);
|
guMtxCatF(rotation, mtx, mtx);
|
||||||
px = playerStatus->position.x;
|
px = playerStatus->position.x;
|
||||||
py = playerStatus->position.y;
|
py = playerStatus->position.y;
|
||||||
|
28
src/7B440.c
28
src/7B440.c
@ -45,7 +45,7 @@ void reset_player_status(void) {
|
|||||||
f32* floatsTemp;
|
f32* floatsTemp;
|
||||||
|
|
||||||
D_8010C96C = -1;
|
D_8010C96C = -1;
|
||||||
D_8010C954 = 0;
|
TweesterTouchingPartner = NULL;
|
||||||
D_8010C920 = 0;
|
D_8010C920 = 0;
|
||||||
D_8010C940 = 0;
|
D_8010C940 = 0;
|
||||||
D_8010C958 = 0;
|
D_8010C958 = 0;
|
||||||
@ -82,7 +82,7 @@ void reset_player_status(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// This grossness is needed for matching
|
// This grossness is needed for matching
|
||||||
floatsTemp = &D_800F7B70[0];
|
floatsTemp = &DefaultMoveSpeeds[0];
|
||||||
playerStatus->walkSpeed = *(floatsTemp++) * one;
|
playerStatus->walkSpeed = *(floatsTemp++) * one;
|
||||||
playerStatus->runSpeed = *(floatsTemp++) * one;
|
playerStatus->runSpeed = *(floatsTemp++) * one;
|
||||||
playerStatus->unk_6C = *(floatsTemp++) * one;
|
playerStatus->unk_6C = *(floatsTemp++) * one;
|
||||||
@ -157,26 +157,26 @@ void player_input_to_move_vector(f32* angle, f32* magnitude) {
|
|||||||
*magnitude = mag;
|
*magnitude = mag;
|
||||||
}
|
}
|
||||||
|
|
||||||
void game_input_to_move_vector(f32* arg0, f32* arg1) {
|
void game_input_to_move_vector(f32* outAngle, f32* outMagnitude) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 stickX = gGameStatusPtr->stickX;
|
f32 stickX = gGameStatusPtr->stickX;
|
||||||
f32 stickY = -gGameStatusPtr->stickY;
|
f32 stickY = -gGameStatusPtr->stickY;
|
||||||
f32 tempMax = 70.0f;
|
f32 maxRadius = 70.0f;
|
||||||
f32 temp1;
|
f32 magnitude;
|
||||||
f32 temp2;
|
f32 angle;
|
||||||
|
|
||||||
temp1 = dist2D(0.0f, 0.0f, stickX, stickY);
|
magnitude = dist2D(0.0f, 0.0f, stickX, stickY);
|
||||||
if (temp1 >= tempMax) {
|
if (magnitude >= maxRadius) {
|
||||||
temp1 = tempMax;
|
magnitude = maxRadius;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp2 = clamp_angle(atan2(0.0f, 0.0f, stickX, stickY) + gCameras[CAM_DEFAULT].currentYaw);
|
angle = clamp_angle(atan2(0.0f, 0.0f, stickX, stickY) + gCameras[CAM_DEFAULT].currentYaw);
|
||||||
if (temp1 == 0.0f) {
|
if (magnitude == 0.0f) {
|
||||||
temp2 = playerStatus->targetYaw;
|
angle = playerStatus->targetYaw;
|
||||||
}
|
}
|
||||||
|
|
||||||
*arg0 = temp2;
|
*outAngle = angle;
|
||||||
*arg1 = temp1;
|
*outMagnitude = magnitude;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800E24F8(void) {
|
void func_800E24F8(void) {
|
||||||
|
16
src/7E9D0.c
16
src/7E9D0.c
@ -78,22 +78,22 @@ void phys_peach_update(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
action = &D_800F7C8C[playerStatus->actionState];
|
action = &PlayerActionsTable[playerStatus->actionState];
|
||||||
if (action->flag) {
|
if (action->flag) {
|
||||||
if (action->dmaStart != NULL && action->dmaStart != D_8010C924) {
|
if (action->dmaStart != NULL && action->dmaStart != D_8010C924) {
|
||||||
D_8010C924 = action->dmaStart;
|
D_8010C924 = action->dmaStart;
|
||||||
|
|
||||||
// TODO: This needs to be a defined linker define for full shiftability
|
// TODO: This needs to be a defined linker define for full shiftability
|
||||||
dma_copy(D_8010C924, D_800F7C8C[playerStatus->actionState].dmaEnd, (void* )0x802B6000);
|
dma_copy(D_8010C924, PlayerActionsTable[playerStatus->actionState].dmaEnd, (void* )0x802B6000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_800F7C8C[playerStatus->actionState].flag) {
|
if (PlayerActionsTable[playerStatus->actionState].flag) {
|
||||||
D_800F7C8C[playerStatus->actionState].update();
|
PlayerActionsTable[playerStatus->actionState].update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (D_800F7C8C[playerStatus->actionState].flag) {
|
if (PlayerActionsTable[playerStatus->actionState].flag) {
|
||||||
D_800F7C8C[playerStatus->actionState].update();
|
PlayerActionsTable[playerStatus->actionState].update();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED);
|
} while (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED);
|
||||||
@ -367,10 +367,10 @@ Npc* peach_make_disguise_npc(s32 peachDisguise) {
|
|||||||
playerStatus->peachDisguise = gGameStatusPtr->peachDisguise = peachDisguise;
|
playerStatus->peachDisguise = gGameStatusPtr->peachDisguise = peachDisguise;
|
||||||
|
|
||||||
blueprint.flags = NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_100 | NPC_FLAG_40000;
|
blueprint.flags = NPC_FLAG_ENABLE_HIT_SCRIPT | NPC_FLAG_40 | NPC_FLAG_100 | NPC_FLAG_40000;
|
||||||
blueprint.initialAnim = world_actions_peachDisguises[playerStatus->peachDisguise].idle;
|
blueprint.initialAnim = BasicPeachDisguiseAnims[playerStatus->peachDisguise].idle;
|
||||||
blueprint.onRender = NULL;
|
blueprint.onRender = NULL;
|
||||||
blueprint.onUpdate = NULL;
|
blueprint.onUpdate = NULL;
|
||||||
D_8010C96C = _create_npc_standard(&blueprint, &D_800F7C7C[playerStatus->peachDisguise]);
|
D_8010C96C = _create_npc_standard(&blueprint, &PeachDisguiseExtraAnims[playerStatus->peachDisguise]);
|
||||||
npc = get_npc_by_index(D_8010C96C);
|
npc = get_npc_by_index(D_8010C96C);
|
||||||
|
|
||||||
disable_npc_shadow(npc);
|
disable_npc_shadow(npc);
|
||||||
|
@ -62,7 +62,7 @@ INCLUDE_ASM(s32, "7bb60_len_41b0", phys_update_jump);
|
|||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
#ifdef NON_EQUIVALENT
|
||||||
// Rodata issue.
|
// Rodata issue.
|
||||||
extern s32 D_800F7B50;
|
extern s32 GravityParamsStartJump;
|
||||||
|
|
||||||
void phys_init_integrator_for_current_state(void) {
|
void phys_init_integrator_for_current_state(void) {
|
||||||
f32* temp_a0;
|
f32* temp_a0;
|
||||||
@ -84,7 +84,7 @@ void phys_init_integrator_for_current_state(void) {
|
|||||||
case 13:
|
case 13:
|
||||||
case 18:
|
case 18:
|
||||||
case 20:
|
case 20:
|
||||||
temp_a0 = &D_800F7B50 ;
|
temp_a0 = &GravityParamsStartJump ;
|
||||||
if ((playerStatus->flags & 0x40000) == 0) {
|
if ((playerStatus->flags & 0x40000) == 0) {
|
||||||
playerStatus->gravityIntegrator[0] = *temp_a0++;
|
playerStatus->gravityIntegrator[0] = *temp_a0++;
|
||||||
playerStatus->gravityIntegrator[1] = *temp_a0++;
|
playerStatus->gravityIntegrator[1] = *temp_a0++;
|
||||||
@ -107,7 +107,7 @@ INCLUDE_ASM(void, "7bb60_len_41b0", phys_init_integrator_for_current_state, void
|
|||||||
|
|
||||||
// This function is wack. This weird stuff is needed to match
|
// This function is wack. This weird stuff is needed to match
|
||||||
void gravity_use_fall_parms(void) {
|
void gravity_use_fall_parms(void) {
|
||||||
f32* floats = D_800F7B60;
|
f32* floats = GravityParamsStartFall;
|
||||||
PlayerStatus* playerStatus;
|
PlayerStatus* playerStatus;
|
||||||
do {} while (0);
|
do {} while (0);
|
||||||
playerStatus = &gPlayerStatus;
|
playerStatus = &gPlayerStatus;
|
||||||
@ -268,25 +268,25 @@ s32 func_800E4404(s32 arg0, s32 arg1, f32 arg2, f32* outX, f32* outY, f32* outZ)
|
|||||||
|
|
||||||
void collision_check_player_overlaps(void) {
|
void collision_check_player_overlaps(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 temp_64 = playerStatus->unk_64;
|
f32 overlapPush = playerStatus->overlapPushAmount;
|
||||||
|
|
||||||
if (temp_64 != 0.0f) {
|
if (overlapPush != 0.0f) {
|
||||||
f32 x = playerStatus->position.x;
|
f32 x = playerStatus->position.x;
|
||||||
f32 y = playerStatus->position.y;
|
f32 y = playerStatus->position.y;
|
||||||
f32 z = playerStatus->position.z;
|
f32 z = playerStatus->position.z;
|
||||||
|
|
||||||
player_test_lateral_overlap(0, &gPlayerStatus, &x, &y, &z, temp_64, playerStatus->unk_88);
|
player_test_lateral_overlap(0, &gPlayerStatus, &x, &y, &z, overlapPush, playerStatus->overlapPushYaw);
|
||||||
|
|
||||||
temp_64 -= playerStatus->runSpeed / 10.0f;
|
overlapPush -= playerStatus->runSpeed / 10.0f;
|
||||||
playerStatus->position.x = x;
|
playerStatus->position.x = x;
|
||||||
playerStatus->position.y = y;
|
playerStatus->position.y = y;
|
||||||
playerStatus->position.z = z;
|
playerStatus->position.z = z;
|
||||||
|
|
||||||
if (temp_64 < 0.0f) {
|
if (overlapPush < 0.0f) {
|
||||||
temp_64 = 0.0f;
|
overlapPush = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->unk_64 = temp_64;
|
playerStatus->overlapPushAmount = overlapPush;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,7 +43,7 @@ void clear_player_data(void) {
|
|||||||
playerData->merleeTurnCount = -1;
|
playerData->merleeTurnCount = -1;
|
||||||
playerData->maxStarPower = 0;
|
playerData->maxStarPower = 0;
|
||||||
playerData->specialBarsFilled = 0;
|
playerData->specialBarsFilled = 0;
|
||||||
playerData->unk_292 = 0;
|
playerData->starBeamLevel = 0;
|
||||||
playerData->currentPartner = 0;
|
playerData->currentPartner = 0;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) {
|
for (i = 0; i < ARRAY_COUNT(playerData->partners); i++) {
|
||||||
@ -74,32 +74,32 @@ void clear_player_data(void) {
|
|||||||
playerData->storedItems[i] = ITEM_NONE;
|
playerData->storedItems[i] = ITEM_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData->otherHitsTaken = 0;
|
playerData->actionCommandAttempts = 0;
|
||||||
playerData->unk_296 = 0;
|
playerData->actionCommandSuccesses = 0;
|
||||||
playerData->hitsTaken = 0;
|
playerData->hitsTaken = 0;
|
||||||
playerData->hitsBlocked = 0;
|
playerData->hitsBlocked = 0;
|
||||||
playerData->playerFirstStrikes = 0;
|
playerData->playerFirstStrikes = 0;
|
||||||
playerData->enemyFirstStrikes = 0;
|
playerData->enemyFirstStrikes = 0;
|
||||||
playerData->powerBounces = 0;
|
playerData->powerBounces = 0;
|
||||||
playerData->battlesCount = 0;
|
playerData->battlesCount = 0;
|
||||||
playerData->unk_2A4[0] = 0;
|
playerData->battlesWon = 0;
|
||||||
playerData->unk_2A4[1] = 0;
|
playerData->unk_2A6 = 0;
|
||||||
playerData->unk_2A4[2] = 0;
|
playerData->battlesFled = 0;
|
||||||
playerData->unk_2A4[3] = 0;
|
playerData->trainingsDone = 0;
|
||||||
playerData->unk_2AC = 0;
|
playerData->walkingStepsTaken = 0;
|
||||||
playerData->unk_2B0 = 0;
|
playerData->runningStepsTaken = 0;
|
||||||
playerData->idleFrameCounter = 0;
|
playerData->idleFrameCounter = 0;
|
||||||
playerData->totalCoinsEarned = 0;
|
playerData->totalCoinsEarned = 0;
|
||||||
playerData->frameCounter = 0;
|
playerData->frameCounter = 0;
|
||||||
playerData->quizzesAnswered = 0;
|
playerData->quizzesAnswered = 0;
|
||||||
playerData->quizzesCorrect = 0;
|
playerData->quizzesCorrect = 0;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(playerData->unk_2C4); i++) {
|
for (i = 0; i < ARRAY_COUNT(playerData->partnerUnlockedTime); i++) {
|
||||||
playerData->unk_2C4[i] = 0;
|
playerData->partnerUnlockedTime[i] = 0;
|
||||||
playerData->unk_2F4[i] = 0;
|
playerData->partnerUsedTime[i] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData->unk_328 = 0;
|
playerData->droTreeOrbitTime = 0;
|
||||||
playerData->starPiecesCollected = 0;
|
playerData->starPiecesCollected = 0;
|
||||||
playerData->jumpGamePlays = 0;
|
playerData->jumpGamePlays = 0;
|
||||||
playerData->jumpGameTotal = 0;
|
playerData->jumpGameTotal = 0;
|
||||||
@ -266,7 +266,7 @@ s32 get_stored_empty_count(void) {
|
|||||||
void enforce_hpfp_limits(void) {
|
void enforce_hpfp_limits(void) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
playerData->curMaxHP = playerData->hardMaxHP + (is_ability_active(4) * 5);
|
playerData->curMaxHP = playerData->hardMaxHP + (is_ability_active(ABILITY_HP_PLUS) * 5);
|
||||||
if (playerData->curMaxHP > 75) {
|
if (playerData->curMaxHP > 75) {
|
||||||
playerData->curMaxHP = 75;
|
playerData->curMaxHP = 75;
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ void enforce_hpfp_limits(void) {
|
|||||||
playerData->curHP = playerData->curMaxHP;
|
playerData->curHP = playerData->curMaxHP;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerData->curMaxFP = playerData->hardMaxFP + (is_ability_active(12) * 5);
|
playerData->curMaxFP = playerData->hardMaxFP + (is_ability_active(ABILITY_FP_PLUS) * 5);
|
||||||
if (playerData->curMaxFP > 75) {
|
if (playerData->curMaxFP > 75) {
|
||||||
playerData->curMaxFP = 75;
|
playerData->curMaxFP = 75;
|
||||||
}
|
}
|
||||||
@ -330,71 +330,71 @@ void initialize_status_menu(void) {
|
|||||||
|
|
||||||
close_status_menu();
|
close_status_menu();
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusHP);
|
iconIndex = hud_element_create(HudScript_StatusHP);
|
||||||
uiStatus->hpIconIndices[0] = iconIndex;
|
uiStatus->hpIconIndices[0] = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusHeart);
|
iconIndex = hud_element_create(HudScript_StatusHeart);
|
||||||
uiStatus->hpIconIndices[1] = iconIndex;
|
uiStatus->hpIconIndices[1] = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusFP);
|
iconIndex = hud_element_create(HudScript_StatusFP);
|
||||||
uiStatus->fpIconIndices[0] = iconIndex;
|
uiStatus->fpIconIndices[0] = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusFlower);
|
iconIndex = hud_element_create(HudScript_StatusFlower);
|
||||||
uiStatus->fpIconIndices[1] = iconIndex;
|
uiStatus->fpIconIndices[1] = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusCoin);
|
iconIndex = hud_element_create(HudScript_StatusCoin);
|
||||||
uiStatus->coinIconIndex = iconIndex;
|
uiStatus->coinIconIndex = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_Item_CoinSparkleRandom);
|
iconIndex = hud_element_create(HudScript_Item_CoinSparkleRandom);
|
||||||
uiStatus->coinSparkleIconIndex = iconIndex;
|
uiStatus->coinSparkleIconIndex = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusStarPoint);
|
iconIndex = hud_element_create(HudScript_StatusStarPoint);
|
||||||
uiStatus->starpointsIconIndex = iconIndex;
|
uiStatus->starpointsIconIndex = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusSPShine);
|
iconIndex = hud_element_create(HudScript_StatusSPShine);
|
||||||
uiStatus->starpointsShineIconIndex = iconIndex;
|
uiStatus->starpointsShineIconIndex = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
newVar = create_hud_element(HudScript_StatusTimes);
|
newVar = hud_element_create(HudScript_StatusTimes);
|
||||||
iconIndex = newVar;
|
iconIndex = newVar;
|
||||||
uiStatus->iconIndex8 = iconIndex;
|
uiStatus->iconIndex8 = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusTimes);
|
iconIndex = hud_element_create(HudScript_StatusTimes);
|
||||||
uiStatus->iconIndex9 = iconIndex;
|
uiStatus->iconIndex9 = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusTimes);
|
iconIndex = hud_element_create(HudScript_StatusTimes);
|
||||||
uiStatus->iconIndexA = iconIndex;
|
uiStatus->iconIndexA = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusTimes);
|
iconIndex = hud_element_create(HudScript_StatusTimes);
|
||||||
uiStatus->iconIndexB = iconIndex;
|
uiStatus->iconIndexB = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
iconIndex = create_hud_element(HudScript_StatusStar1);
|
iconIndex = hud_element_create(HudScript_StatusStar1);
|
||||||
uiStatus->starIconIndex = iconIndex;
|
uiStatus->starIconIndex = iconIndex;
|
||||||
set_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconIndex, HUD_ELEMENT_FLAGS_80);
|
||||||
clear_hud_element_flags(iconIndex, HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(iconIndex, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
|
|
||||||
func_800F0D5C();
|
func_800F0D5C();
|
||||||
}
|
}
|
||||||
@ -409,12 +409,12 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits)
|
|||||||
s32 digit;
|
s32 digit;
|
||||||
s32 place;
|
s32 place;
|
||||||
|
|
||||||
set_hud_element_anim(iconID, TimesHudScript);
|
hud_element_set_script(iconID, TimesHudScript);
|
||||||
x += 8;
|
x += 8;
|
||||||
y2 = y + 8;
|
y2 = y + 8;
|
||||||
set_hud_element_render_pos(iconID, x, y + 7);
|
hud_element_set_render_pos(iconID, x, y + 7);
|
||||||
clear_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
draw_hud_element_2(iconID);
|
hud_element_draw_next(iconID);
|
||||||
|
|
||||||
// Write each digit of the input number into the digits array
|
// Write each digit of the input number into the digits array
|
||||||
for (i = 0; i < numDigits; i++) {
|
for (i = 0; i < numDigits; i++) {
|
||||||
@ -434,10 +434,10 @@ void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits)
|
|||||||
// Once we have encountered our first non-zero digit, we need to keep drawing the remaining digits
|
// Once we have encountered our first non-zero digit, we need to keep drawing the remaining digits
|
||||||
if (digit != 0 || keepDrawing || (i == numDigits - 1)) {
|
if (digit != 0 || keepDrawing || (i == numDigits - 1)) {
|
||||||
keepDrawing = TRUE;
|
keepDrawing = TRUE;
|
||||||
set_hud_element_anim(iconID, DigitHudScripts[digit]);
|
hud_element_set_script(iconID, DigitHudScripts[digit]);
|
||||||
set_hud_element_render_pos(iconID, x, y2);
|
hud_element_set_render_pos(iconID, x, y2);
|
||||||
clear_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(iconID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
draw_hud_element_2(iconID);
|
hud_element_draw_next(iconID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -458,12 +458,12 @@ void coin_counter_draw_content(UNK_TYPE arg0, s32 posX, s32 posY) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
iconIndex = uiStatus->iconIndex10;
|
iconIndex = uiStatus->iconIndex10;
|
||||||
set_hud_element_render_pos(iconIndex, posX + 27, posY + 11);
|
hud_element_set_render_pos(iconIndex, posX + 27, posY + 11);
|
||||||
draw_hud_element_clipped(iconIndex);
|
hud_element_draw_clipped(iconIndex);
|
||||||
|
|
||||||
iconIndex = uiStatus->iconIndex11;
|
iconIndex = uiStatus->iconIndex11;
|
||||||
set_hud_element_render_pos(iconIndex, posX + 15, posY + 11);
|
hud_element_set_render_pos(iconIndex, posX + 15, posY + 11);
|
||||||
draw_hud_element_clipped(iconIndex);
|
hud_element_draw_clipped(iconIndex);
|
||||||
|
|
||||||
draw_number(uiStatus->displayCoins, posX + 58, posY + 4, 1, 10, 255, 3);
|
draw_number(uiStatus->displayCoins, posX + 58, posY + 4, 1, 10, 255, 3);
|
||||||
}
|
}
|
||||||
@ -477,8 +477,8 @@ void update_coin_counter(void) {
|
|||||||
if (uiStatus->unk_6C[1] != 0) {
|
if (uiStatus->unk_6C[1] != 0) {
|
||||||
uiStatus->unk_6C[1] -= 1;
|
uiStatus->unk_6C[1] -= 1;
|
||||||
if (((uiStatus->unk_6C[1] << 24) == 0) && (uiStatus->iconIndex12 >= 0)) {
|
if (((uiStatus->unk_6C[1] << 24) == 0) && (uiStatus->iconIndex12 >= 0)) {
|
||||||
free_hud_element(uiStatus->iconIndex12);
|
hud_element_free(uiStatus->iconIndex12);
|
||||||
free_hud_element(uiStatus->iconIndex13);
|
hud_element_free(uiStatus->iconIndex13);
|
||||||
uiStatus->iconIndex12 = -1;
|
uiStatus->iconIndex12 = -1;
|
||||||
}
|
}
|
||||||
D_8010CD12 = 0;
|
D_8010CD12 = 0;
|
||||||
@ -515,8 +515,8 @@ void show_coin_counter(void) {
|
|||||||
if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) {
|
if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) {
|
||||||
set_window_update(20, WINDOW_UPDATE_HIDE);
|
set_window_update(20, WINDOW_UPDATE_HIDE);
|
||||||
if (uiStatus->iconIndex12 > -1) {
|
if (uiStatus->iconIndex12 > -1) {
|
||||||
free_hud_element(uiStatus->iconIndex10);
|
hud_element_free(uiStatus->iconIndex10);
|
||||||
free_hud_element(uiStatus->iconIndex11);
|
hud_element_free(uiStatus->iconIndex11);
|
||||||
uiStatus->iconIndex12 = -1;
|
uiStatus->iconIndex12 = -1;
|
||||||
}
|
}
|
||||||
uiStatus->unk_6C[0] = 0;
|
uiStatus->unk_6C[0] = 0;
|
||||||
@ -528,14 +528,14 @@ void show_coin_counter(void) {
|
|||||||
if (uiStatus->unk_6C[0] == 0) {
|
if (uiStatus->unk_6C[0] == 0) {
|
||||||
set_window_properties(0x14, 32, 164, 64, 20, 0x15, coin_counter_draw_content, 0, -1);
|
set_window_properties(0x14, 32, 164, 64, 20, 0x15, coin_counter_draw_content, 0, -1);
|
||||||
set_window_update(20, (s32)basic_window_update);
|
set_window_update(20, (s32)basic_window_update);
|
||||||
index = create_hud_element(HudScript_MenuTimes);
|
index = hud_element_create(HudScript_MenuTimes);
|
||||||
uiStatus->iconIndex10 = index;
|
uiStatus->iconIndex10 = index;
|
||||||
set_hud_element_flags(index, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(index, 255, 255, 255);
|
hud_element_set_tint(index, 255, 255, 255);
|
||||||
index = create_hud_element(HudScript_StatusCoin);
|
index = hud_element_create(HudScript_StatusCoin);
|
||||||
uiStatus->iconIndex11 = index;
|
uiStatus->iconIndex11 = index;
|
||||||
set_hud_element_flags(index, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(index, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(index, 255, 255, 255);
|
hud_element_set_tint(index, 255, 255, 255);
|
||||||
uiStatus->unk_6C[0] = 0;
|
uiStatus->unk_6C[0] = 0;
|
||||||
|
|
||||||
if (uiStatus->unk_6C[2] < 0) {
|
if (uiStatus->unk_6C[2] < 0) {
|
||||||
|
@ -91,28 +91,28 @@ void func_800F4D28(PopupMessage* popup, s32 x, s32 y);
|
|||||||
INCLUDE_ASM(s32, "8a860_len_3f30", hide_popup_menu);
|
INCLUDE_ASM(s32, "8a860_len_3f30", hide_popup_menu);
|
||||||
|
|
||||||
void destroy_popup_menu(void) {
|
void destroy_popup_menu(void) {
|
||||||
free_hud_element(D_8010D65C);
|
hud_element_free(D_8010D65C);
|
||||||
free_hud_element(D_8010D678);
|
hud_element_free(D_8010D678);
|
||||||
free_hud_element(D_8010D66C);
|
hud_element_free(D_8010D66C);
|
||||||
free_hud_element(D_8010D670);
|
hud_element_free(D_8010D670);
|
||||||
free_hud_element(D_8010D674);
|
hud_element_free(D_8010D674);
|
||||||
|
|
||||||
if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) {
|
if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) {
|
||||||
free_hud_element(D_8010D660);
|
hud_element_free(D_8010D660);
|
||||||
free_hud_element(D_8010D664);
|
hud_element_free(D_8010D664);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) {
|
if (gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) {
|
||||||
free_hud_element(D_8010D660);
|
hud_element_free(D_8010D660);
|
||||||
free_hud_element(D_8010D664);
|
hud_element_free(D_8010D664);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPopupMenu->popupType == POPUP_TYPE_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) {
|
if (gPopupMenu->popupType == POPUP_TYPE_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) {
|
||||||
free_hud_element(D_8010D668);
|
hud_element_free(D_8010D668);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPopupMenu->popupType == POPUP_TYPE_SELL_ITEM) {
|
if (gPopupMenu->popupType == POPUP_TYPE_SELL_ITEM) {
|
||||||
free_hud_element(D_8010D660);
|
hud_element_free(D_8010D660);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((gPopupMenu->popupType <= POPUP_TYPE_USE_ITEM ||
|
if ((gPopupMenu->popupType <= POPUP_TYPE_USE_ITEM ||
|
||||||
@ -161,61 +161,61 @@ s32 popup_menu_update(void) {
|
|||||||
D_8010D67E = 62;
|
D_8010D67E = 62;
|
||||||
}
|
}
|
||||||
D_8010D68C = 0;
|
D_8010D68C = 0;
|
||||||
elementID = create_hud_element(HudScript_EmptyBar);
|
elementID = hud_element_create(HudScript_EmptyBar);
|
||||||
D_8010D65C = elementID;
|
D_8010D65C = elementID;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(elementID, 255, 255, 255);
|
hud_element_set_tint(elementID, 255, 255, 255);
|
||||||
if (gPopupMenu->popupType != 2) {
|
if (gPopupMenu->popupType != 2) {
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
one = 1; // required to match (why is 1 loaded so early?)
|
one = 1; // required to match (why is 1 loaded so early?)
|
||||||
elementID = create_hud_element(gPopupMenu->ptrIcon[0]);
|
elementID = hud_element_create(gPopupMenu->ptrIcon[0]);
|
||||||
D_8010D678 = elementID;
|
D_8010D678 = elementID;
|
||||||
set_hud_element_scale(elementID, 0.45f);
|
hud_element_set_scale(elementID, 0.45f);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_AnimatedHandPointer);
|
elementID = hud_element_create(HudScript_AnimatedHandPointer);
|
||||||
D_8010D66C = elementID;
|
D_8010D66C = elementID;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_GreenArrowUp);
|
elementID = hud_element_create(HudScript_GreenArrowUp);
|
||||||
D_8010D670 = elementID;
|
D_8010D670 = elementID;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_GreenArrowDown);
|
elementID = hud_element_create(HudScript_GreenArrowDown);
|
||||||
D_8010D674 = elementID;
|
D_8010D674 = elementID;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
if (gPopupMenu->popupType == 3) {
|
if (gPopupMenu->popupType == 3) {
|
||||||
D_8010D660 = create_hud_element(HudScript_StatusStarPiece);
|
D_8010D660 = hud_element_create(HudScript_StatusStarPiece);
|
||||||
elementID = D_8010D660;
|
elementID = D_8010D660;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(elementID, 255, 255, 255);
|
hud_element_set_tint(elementID, 255, 255, 255);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 4) {
|
||||||
D_8010D660 = create_hud_element(HudScript_StatusStarPiece);
|
D_8010D660 = hud_element_create(HudScript_StatusStarPiece);
|
||||||
elementID = D_8010D660;
|
elementID = D_8010D660;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_8000 | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_FILTER_TEX | HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(elementID, 255, 255, 255);
|
hud_element_set_tint(elementID, 255, 255, 255);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 5) {
|
if (gPopupMenu->popupType == 5) {
|
||||||
D_8010D660 = create_hud_element(HudScript_StatusCoin);
|
D_8010D660 = hud_element_create(HudScript_StatusCoin);
|
||||||
elementID = D_8010D660;
|
elementID = D_8010D660;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(elementID, 255, 255, 255);
|
hud_element_set_tint(elementID, 255, 255, 255);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 3 || gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 3 || gPopupMenu->popupType == 4) {
|
||||||
D_8010D664 = create_hud_element(HudScript_MenuTimes);
|
D_8010D664 = hud_element_create(HudScript_MenuTimes);
|
||||||
elementID = D_8010D664;
|
elementID = D_8010D664;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(elementID, 255, 255, 255);
|
hud_element_set_tint(elementID, 255, 255, 255);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == one || gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == one || gPopupMenu->popupType == 4) {
|
||||||
D_8010D668 = create_hud_element(D_80109890[0]);
|
D_8010D668 = hud_element_create(D_80109890[0]);
|
||||||
elementID = D_8010D668;
|
elementID = D_8010D668;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
set_hud_element_tint(elementID, 255, 255, 255);
|
hud_element_set_tint(elementID, 255, 255, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8010D65A = -200;
|
D_8010D65A = -200;
|
||||||
@ -598,25 +598,25 @@ s32 popup_menu_update(void) {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case -1:
|
case -1:
|
||||||
set_hud_element_tint(D_8010D65C, 160, 160, 160);
|
hud_element_set_tint(D_8010D65C, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D678, 160, 160, 160);
|
hud_element_set_tint(D_8010D678, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D66C, 160, 160, 160);
|
hud_element_set_tint(D_8010D66C, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D670, 160, 160, 160);
|
hud_element_set_tint(D_8010D670, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D674, 160, 160, 160);
|
hud_element_set_tint(D_8010D674, 160, 160, 160);
|
||||||
set_hud_element_anim(D_8010D66C, HudScript_HandPointer);
|
hud_element_set_script(D_8010D66C, HudScript_HandPointer);
|
||||||
if (gPopupMenu->popupType == 3) {
|
if (gPopupMenu->popupType == 3) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D664, 160, 160, 160);
|
hud_element_set_tint(D_8010D664, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 4) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D664, 160, 160, 160);
|
hud_element_set_tint(D_8010D664, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 1 || gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 1 || gPopupMenu->popupType == 4) {
|
||||||
set_hud_element_tint(D_8010D668, 160, 160, 160);
|
hud_element_set_tint(D_8010D668, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 5) {
|
if (gPopupMenu->popupType == 5) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
}
|
}
|
||||||
D_8010D690 = 0xD;
|
D_8010D690 = 0xD;
|
||||||
|
|
||||||
@ -717,26 +717,26 @@ s32 popup_menu_update(void) {
|
|||||||
gPopupMenu->result = 0;
|
gPopupMenu->result = 0;
|
||||||
break;
|
break;
|
||||||
case 100:
|
case 100:
|
||||||
set_hud_element_tint(D_8010D65C, 160, 160, 160);
|
hud_element_set_tint(D_8010D65C, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D678, 160, 160, 160);
|
hud_element_set_tint(D_8010D678, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D66C, 160, 160, 160);
|
hud_element_set_tint(D_8010D66C, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D670, 160, 160, 160);
|
hud_element_set_tint(D_8010D670, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D674, 160, 160, 160);
|
hud_element_set_tint(D_8010D674, 160, 160, 160);
|
||||||
set_hud_element_anim(D_8010D66C, HudScript_HandPointer);
|
hud_element_set_script(D_8010D66C, HudScript_HandPointer);
|
||||||
|
|
||||||
if (gPopupMenu->popupType == 3) {
|
if (gPopupMenu->popupType == 3) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D664, 160, 160, 160);
|
hud_element_set_tint(D_8010D664, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 4) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D664, 160, 160, 160);
|
hud_element_set_tint(D_8010D664, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 1 || gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 1 || gPopupMenu->popupType == 4) {
|
||||||
set_hud_element_tint(D_8010D668, 160, 160, 160);
|
hud_element_set_tint(D_8010D668, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 5) {
|
if (gPopupMenu->popupType == 5) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (gPopupMenu->popupType) {
|
switch (gPopupMenu->popupType) {
|
||||||
@ -794,26 +794,26 @@ s32 popup_menu_update(void) {
|
|||||||
D_8010D640 = -3;
|
D_8010D640 = -3;
|
||||||
break;
|
break;
|
||||||
case 103:
|
case 103:
|
||||||
set_hud_element_tint(D_8010D65C, 255, 255, 255);
|
hud_element_set_tint(D_8010D65C, 255, 255, 255);
|
||||||
set_hud_element_tint(D_8010D678, 255, 255, 255);
|
hud_element_set_tint(D_8010D678, 255, 255, 255);
|
||||||
set_hud_element_tint(D_8010D66C, 255, 255, 255);
|
hud_element_set_tint(D_8010D66C, 255, 255, 255);
|
||||||
set_hud_element_tint(D_8010D670, 255, 255, 255);
|
hud_element_set_tint(D_8010D670, 255, 255, 255);
|
||||||
set_hud_element_tint(D_8010D674, 255, 255, 255);
|
hud_element_set_tint(D_8010D674, 255, 255, 255);
|
||||||
if (gPopupMenu->popupType == 3) {
|
if (gPopupMenu->popupType == 3) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D664, 160, 160, 160);
|
hud_element_set_tint(D_8010D664, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 4) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
set_hud_element_tint(D_8010D664, 160, 160, 160);
|
hud_element_set_tint(D_8010D664, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 1 || gPopupMenu->popupType == 4) {
|
if (gPopupMenu->popupType == 1 || gPopupMenu->popupType == 4) {
|
||||||
set_hud_element_tint(D_8010D668, 160, 160, 160);
|
hud_element_set_tint(D_8010D668, 160, 160, 160);
|
||||||
}
|
}
|
||||||
if (gPopupMenu->popupType == 5) {
|
if (gPopupMenu->popupType == 5) {
|
||||||
set_hud_element_tint(D_8010D660, 160, 160, 160);
|
hud_element_set_tint(D_8010D660, 160, 160, 160);
|
||||||
}
|
}
|
||||||
set_hud_element_anim(D_8010D66C, HudScript_HandPointer);
|
hud_element_set_script(D_8010D66C, HudScript_HandPointer);
|
||||||
|
|
||||||
switch (gPopupMenu->popupType) {
|
switch (gPopupMenu->popupType) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -888,9 +888,9 @@ void func_800F4C6C(PopupMessage* popup, s32 x, s32 y) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(hudElement, xPos, yPos);
|
hud_element_set_render_pos(hudElement, xPos, yPos);
|
||||||
set_hud_element_alpha(hudElement, D_8010D650);
|
hud_element_set_alpha(hudElement, D_8010D650);
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_800F4CF0(PopupMessage* popup, s32 x, s32 y) {
|
void func_800F4CF0(PopupMessage* popup, s32 x, s32 y) {
|
||||||
@ -904,19 +904,19 @@ void func_800F4D28(PopupMessage* popup, s32 x, s32 y) {
|
|||||||
s32 yPos = y + 9;
|
s32 yPos = y + 9;
|
||||||
s32 type;
|
s32 type;
|
||||||
|
|
||||||
set_hud_element_alpha(hudElement, D_8010D650);
|
hud_element_set_alpha(hudElement, D_8010D650);
|
||||||
|
|
||||||
if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) {
|
if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) {
|
||||||
set_hud_element_render_pos(hudElement, xPos, yPos);
|
hud_element_set_render_pos(hudElement, xPos, yPos);
|
||||||
} else {
|
} else {
|
||||||
set_hud_element_render_pos(hudElement, xPos, y + 10);
|
hud_element_set_render_pos(hudElement, xPos, y + 10);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
hudElement = D_8010D664;
|
hudElement = D_8010D664;
|
||||||
set_hud_element_render_pos(hudElement, x + 26, y + 11);
|
hud_element_set_render_pos(hudElement, x + 26, y + 11);
|
||||||
set_hud_element_alpha(hudElement, D_8010D650);
|
hud_element_set_alpha(hudElement, D_8010D650);
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
|
|
||||||
type = gPopupMenu->popupType;
|
type = gPopupMenu->popupType;
|
||||||
if (type == POPUP_TYPE_TRADE_FOR_BADGE) {
|
if (type == POPUP_TYPE_TRADE_FOR_BADGE) {
|
||||||
|
@ -58,9 +58,9 @@ INCLUDE_ASM(s32, "E20110", func_802B7728_E20838);
|
|||||||
|
|
||||||
void func_802B79C8_E20AD8(void) {
|
void func_802B79C8_E20AD8(void) {
|
||||||
func_802B75E8_E206F8();
|
func_802B75E8_E206F8();
|
||||||
gPlayerStatusPtr->unk_C6 = -1;
|
gPlayerStatusPtr->interactingWithID = -1;
|
||||||
D_8010C958 = 0;
|
D_8010C958 = 0;
|
||||||
gPlayerStatusPtr->unk_C8 = NULL;
|
gPlayerStatusPtr->encounteredNPC = NULL;
|
||||||
gPlayerStatusPtr->animFlags &= ~0x10;
|
gPlayerStatusPtr->animFlags &= ~0x10;
|
||||||
func_800EF3D4(0);
|
func_800EF3D4(0);
|
||||||
repartner_set_tether_distance();
|
repartner_set_tether_distance();
|
||||||
|
@ -1585,45 +1585,45 @@ void _delete_shadow(s32 shadowIndex) {
|
|||||||
|
|
||||||
s32 entity_get_collision_flags(Entity* entity) {
|
s32 entity_get_collision_flags(Entity* entity) {
|
||||||
u32 listIndex = entity->listIndex;
|
u32 listIndex = entity->listIndex;
|
||||||
s32 ret = 0;
|
s32 entityFlags = 0;
|
||||||
u32 flag;
|
u32 flag;
|
||||||
|
|
||||||
if (entity->flags & ENTITY_FLAGS_BLOCK_BEING_HIT) {
|
if (entity->flags & ENTITY_FLAGS_BLOCK_BEING_HIT) {
|
||||||
ret = 0x80;
|
entityFlags = ENTITY_COLLISION_BLOCK_HIT;
|
||||||
entity->flags &= ~ENTITY_FLAGS_BLOCK_BEING_HIT;
|
entity->flags &= ~ENTITY_FLAGS_BLOCK_BEING_HIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = gCollisionStatus.currentFloor;
|
flag = gCollisionStatus.currentFloor;
|
||||||
if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) {
|
if (flag != -1 && (flag & COLLISION_WITH_ENTITY_BIT) && listIndex == (u8)flag) {
|
||||||
ret |= 1;
|
entityFlags |= ENTITY_COLLISION_PLAYER_TOUCH_FLOOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = gCollisionStatus.lastTouchedFloor;
|
flag = gCollisionStatus.lastTouchedFloor;
|
||||||
if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) {
|
if (flag != -1 && (flag & COLLISION_WITH_ENTITY_BIT) && listIndex == (u8)flag) {
|
||||||
ret |= 0x100;
|
entityFlags |= ENTITY_COLLISION_PLAYER_LAST_FLOOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = gCollisionStatus.currentCeiling;
|
flag = gCollisionStatus.currentCeiling;
|
||||||
if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) {
|
if (flag != -1 && (flag & COLLISION_WITH_ENTITY_BIT) && listIndex == (u8)flag) {
|
||||||
ret |= 0x4;
|
entityFlags |= ENTITY_COLLISION_PLAYER_TOUCH_CEILING;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = gCollisionStatus.pushingAgainstWall;
|
flag = gCollisionStatus.pushingAgainstWall;
|
||||||
if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) {
|
if (flag != -1 && (flag & COLLISION_WITH_ENTITY_BIT) && listIndex == (u8)flag) {
|
||||||
ret |= 0x10;
|
entityFlags |= ENTITY_COLLISION_PLAYER_PUSHING_AGAINST;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = gCollisionStatus.lastWallHammered;
|
flag = gCollisionStatus.lastWallHammered;
|
||||||
if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag) {
|
if (flag != -1 && (flag & COLLISION_WITH_ENTITY_BIT) && listIndex == (u8)flag) {
|
||||||
ret |= 0x40;
|
entityFlags |= ENTITY_COLLISION_PLAYER_HAMMER;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = gCollisionStatus.currentWall;
|
flag = gCollisionStatus.currentWall;
|
||||||
if (flag != -1 && (flag & 0x4000) && listIndex == (u8)flag && gPlayerStatusPtr->pressedButtons & 0x8000) {
|
if (flag != -1 && (flag & COLLISION_WITH_ENTITY_BIT) && listIndex == (u8)flag && gPlayerStatusPtr->pressedButtons & 0x8000) {
|
||||||
ret |= 8;
|
entityFlags |= ENTITY_COLLISION_PLAYER_TOUCH_WALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return entityFlags;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_interacts_with_current_partner);
|
INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_interacts_with_current_partner);
|
||||||
@ -2131,7 +2131,7 @@ s32 entity_raycast_down(f32* x, f32* y, f32* z, f32* hitYaw, f32* hitPitch, f32*
|
|||||||
ret = FALSE;
|
ret = FALSE;
|
||||||
|
|
||||||
if ((entityID >= 0) && ((get_entity_type(entityID) != 0xC) || (hitNx == 0.0f && hitNz == 0.0f && hitNy == 1.0))) {
|
if ((entityID >= 0) && ((get_entity_type(entityID) != 0xC) || (hitNx == 0.0f && hitNz == 0.0f && hitNy == 1.0))) {
|
||||||
hitID = entityID | 0x4000;
|
hitID = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
colliderID = test_ray_colliders(0x10000, *x, *y, *z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx,
|
colliderID = test_ray_colliders(0x10000, *x, *y, *z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &hitNx,
|
||||||
|
@ -31,28 +31,28 @@ ApiStatus func_802A9000_425B50(Evt* script, s32 isInitialCall) {
|
|||||||
D_802A9620 = 0;
|
D_802A9620 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
// Weird use of an extra temp settles regalloc here.
|
// Weird use of an extra temp settles regalloc here.
|
||||||
hudElementTemp = create_hud_element(HudScript_BlueMeter);
|
hudElementTemp = hud_element_create(HudScript_BlueMeter);
|
||||||
hudElement = hudElementTemp;
|
hudElement = hudElementTemp;
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RunAwayOK);
|
hudElement = hud_element_create(HudScript_RunAwayOK);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
battleStatus->flags1 &= ~0x8000;
|
battleStatus->flags1 &= ~0x8000;
|
||||||
|
|
||||||
@ -90,10 +90,10 @@ void func_802A94D8_426028(void) {
|
|||||||
s32 hudY;
|
s32 hudY;
|
||||||
s32 hudElement1;
|
s32 hudElement1;
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
hudElement1 = actionCommandStatus->hudElements[1];
|
hudElement1 = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement1);
|
hud_element_draw_clipped(hudElement1);
|
||||||
get_hud_element_render_pos(hudElement1, &hudX, &hudY);
|
hud_element_get_render_pos(hudElement1, &hudX, &hudY);
|
||||||
|
|
||||||
if (D_802A9620 == 0) {
|
if (D_802A9620 == 0) {
|
||||||
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
|
||||||
@ -101,7 +101,7 @@ void func_802A94D8_426028(void) {
|
|||||||
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 2);
|
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "common/free_hud_elements.inc.c"
|
#include "common/free_hud_elements.inc.c"
|
||||||
|
@ -36,23 +36,23 @@ ApiStatus func_802A9000_4273B0(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -38,23 +38,23 @@ ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) {
|
|||||||
air_lift_bss_0 = 0;
|
air_lift_bss_0 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -98,12 +98,12 @@ void func_802A96EC_42915C(void) {
|
|||||||
s32 hudElement1;
|
s32 hudElement1;
|
||||||
|
|
||||||
if (gBattleStatus.unk_83 != 0) {
|
if (gBattleStatus.unk_83 != 0) {
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement1 = actionCommandStatus->hudElements[1];
|
hudElement1 = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement1);
|
hud_element_draw_clipped(hudElement1);
|
||||||
get_hud_element_render_pos(hudElement1, &hudX, &hudY);
|
hud_element_get_render_pos(hudElement1, &hudX, &hudY);
|
||||||
|
|
||||||
if (air_lift_bss_0 == 0) {
|
if (air_lift_bss_0 == 0) {
|
||||||
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(hudX, hudY, actionCommandStatus->barFillLevel / 100, 1);
|
||||||
@ -113,7 +113,7 @@ void func_802A96EC_42915C(void) {
|
|||||||
func_80268834(hudX, hudY, actionCommandStatus->barFillLevel / 100, 4);
|
func_80268834(hudX, hudY, actionCommandStatus->barFillLevel / 100, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "common/free_hud_elements.inc.c"
|
#include "common/free_hud_elements.inc.c"
|
||||||
|
@ -37,23 +37,23 @@ ApiStatus func_802A9000_429320(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_StickNeutral);
|
hudElement = hud_element_create(HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -34,29 +34,29 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_FillGaugeResult);
|
hudElement = hud_element_create(HudScript_FillGaugeResult);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_TimingWait);
|
hudElement = hud_element_create(HudScript_TimingWait);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,18 +68,18 @@ void N(draw_hud_elements)(void) {
|
|||||||
s32 x, y;
|
s32 x, y;
|
||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
|
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[0]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
|
||||||
hudElement = gActionCommandStatus.hudElements[1];
|
hudElement = gActionCommandStatus.hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[3]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[3]);
|
||||||
func_80268770(x, y, gActionCommandStatus.barFillLevel / 100);
|
func_80268770(x, y, gActionCommandStatus.barFillLevel / 100);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[2]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
}
|
}
|
||||||
|
@ -53,23 +53,23 @@ ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -86,15 +86,15 @@ void func_802A928C_427CFC(void) {
|
|||||||
case 0:
|
case 0:
|
||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
if (actionCommandStatus->unk_61) {
|
if (actionCommandStatus->unk_61) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
if (actionCommandStatus->unk_61) {
|
if (actionCommandStatus->unk_61) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
@ -107,9 +107,9 @@ void func_802A928C_427CFC(void) {
|
|||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@ -120,7 +120,7 @@ void func_802A928C_427CFC(void) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
||||||
actionCommandStatus->barFillLevel = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
@ -161,9 +161,9 @@ void func_802A928C_427CFC(void) {
|
|||||||
hudElement = actionCommandStatus->hudElements[2];
|
hudElement = actionCommandStatus->hudElements[2];
|
||||||
actionCommandStatus->barFillLevel = 10000;
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
actionCommandStatus->unk_68 = TRUE;
|
actionCommandStatus->unk_68 = TRUE;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
@ -35,29 +35,29 @@ ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RunningAway);
|
hudElement = hud_element_create(HudScript_RunningAway);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RunAwayOK);
|
hudElement = hud_element_create(HudScript_RunAwayOK);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -112,27 +112,27 @@ void func_802A96B8_423AA8(void) {
|
|||||||
|
|
||||||
// Putting 31 into a variable manually fixes regalloc, so perhaps this was a constant defined somewhere?
|
// Putting 31 into a variable manually fixes regalloc, so perhaps this was a constant defined somewhere?
|
||||||
thirtyOne = 31;
|
thirtyOne = 31;
|
||||||
set_hud_element_render_pos(hudElements[3], actionCommandStatus->hudElementX - (hudX - thirtyOne),
|
hud_element_set_render_pos(hudElements[3], actionCommandStatus->hudElementX - (hudX - thirtyOne),
|
||||||
actionCommandStatus->hudElementY + 17);
|
actionCommandStatus->hudElementY + 17);
|
||||||
set_hud_element_render_pos(hudElements[2], actionCommandStatus->hudElementX - (hudX - thirtyOne),
|
hud_element_set_render_pos(hudElements[2], actionCommandStatus->hudElementX - (hudX - thirtyOne),
|
||||||
actionCommandStatus->hudElementY - 1);
|
actionCommandStatus->hudElementY - 1);
|
||||||
|
|
||||||
if (actionCommandStatus->unk_6A == 0) {
|
if (actionCommandStatus->unk_6A == 0) {
|
||||||
draw_hud_element_clipped(hudElements[0]);
|
hud_element_draw_clipped(hudElements[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = hudElements[1];
|
hudElement = hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &hudX, &hudY);
|
hud_element_get_render_pos(hudElement, &hudX, &hudY);
|
||||||
|
|
||||||
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
||||||
draw_hud_element_clipped(hudElements[2]);
|
hud_element_draw_clipped(hudElements[2]);
|
||||||
draw_hud_element_clipped(hudElements[3]);
|
hud_element_draw_clipped(hudElements[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A97FC_423BEC(void) {
|
void func_802A97FC_423BEC(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,11 @@ void N(UnkActionCommandFunc1)(void) {
|
|||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
s32 barFillLevel;
|
s32 barFillLevel;
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &hudX, &hudY);
|
hud_element_get_render_pos(hudElement, &hudX, &hudY);
|
||||||
|
|
||||||
if (actionCommandStatus->unk_68 == 0) {
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
||||||
@ -20,5 +20,5 @@ void N(UnkActionCommandFunc1)(void) {
|
|||||||
func_8026880C(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
func_8026880C(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
}
|
}
|
||||||
|
@ -34,23 +34,23 @@ ApiStatus func_802A9000_426170(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -35,23 +35,23 @@ ApiStatus func_802A9000_4269D0(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_StickNeutral);
|
hudElement = hud_element_create(HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -38,39 +38,39 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
|
|||||||
D_802A9920 = 0;
|
D_802A9920 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RunningAway);
|
hudElement = hud_element_create(HudScript_RunningAway);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RunAwayOK);
|
hudElement = hud_element_create(HudScript_RunAwayOK);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
xOffset = 29 - ((100 - actionCommandStatus->unk_46) * 60) / 100;
|
xOffset = 29 - ((100 - actionCommandStatus->unk_46) * 60) / 100;
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY + 17);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX - xOffset, actionCommandStatus->hudElementY - 1);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -103,27 +103,27 @@ void func_802A9378_422E48(void) {
|
|||||||
switch (actionCommandStatus->state) {
|
switch (actionCommandStatus->state) {
|
||||||
case 0:
|
case 0:
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[2];
|
hudElement = actionCommandStatus->hudElements[2];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[3];
|
hudElement = actionCommandStatus->hudElements[3];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
@ -133,8 +133,8 @@ void func_802A9378_422E48(void) {
|
|||||||
if (actionCommandStatus->hudElementX > 50) {
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
if (actionCommandStatus->unk_4E != 0) {
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
@ -142,7 +142,7 @@ void func_802A9378_422E48(void) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
||||||
D_802A9920 = 1;
|
D_802A9920 = 1;
|
||||||
actionCommandStatus->state = 11;
|
actionCommandStatus->state = 11;
|
||||||
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
@ -154,8 +154,8 @@ void func_802A9378_422E48(void) {
|
|||||||
hudElement = actionCommandStatus->hudElements[4];
|
hudElement = actionCommandStatus->hudElements[4];
|
||||||
actionCommandStatus->barFillLevel = 10000;
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
actionCommandStatus->unk_68 = 1;
|
actionCommandStatus->unk_68 = 1;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
|
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
|
||||||
@ -217,16 +217,16 @@ void func_802A96F4_4231C4(void) {
|
|||||||
x = 60 - temp_v1 / 100;
|
x = 60 - temp_v1 / 100;
|
||||||
temp_a1 = x - 31;
|
temp_a1 = x - 31;
|
||||||
|
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - temp_a1, actionCommandStatus->hudElementY + 17);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - temp_a1, actionCommandStatus->hudElementY + 17);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 31 - x, actionCommandStatus->hudElementY - 1);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 31 - x, actionCommandStatus->hudElementY - 1);
|
||||||
|
|
||||||
if (battleStatus->unk_83 != 0) {
|
if (battleStatus->unk_83 != 0) {
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
|
|
||||||
if (D_802A9920 == 0) {
|
if (D_802A9920 == 0) {
|
||||||
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
||||||
@ -238,15 +238,15 @@ void func_802A96F4_4231C4(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[3]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[4]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A9894_423364(void) {
|
void func_802A9894_423364(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[4]);
|
hud_element_free(gActionCommandStatus.hudElements[4]);
|
||||||
}
|
}
|
||||||
|
@ -36,48 +36,48 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->hudElementY = 96;
|
actionCommandStatus->hudElementY = 96;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_TimingBar1Chance);
|
hudElement = hud_element_create(HudScript_TimingBar1Chance);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 10);
|
hud_element_set_render_depth(hudElement, 10);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_TimingWait);
|
hudElement = hud_element_create(HudScript_TimingWait);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_TimingCharge4a);
|
hudElement = hud_element_create(HudScript_TimingCharge4a);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_TimingCharge4b);
|
hudElement = hud_element_create(HudScript_TimingCharge4b);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_TimingCharge4c);
|
hudElement = hud_element_create(HudScript_TimingCharge4c);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_StickHoldLeft);
|
hudElement = hud_element_create(HudScript_StickHoldLeft);
|
||||||
actionCommandStatus->hudElements[5] = hudElement;
|
actionCommandStatus->hudElements[5] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RightOn);
|
hudElement = hud_element_create(HudScript_RightOn);
|
||||||
actionCommandStatus->hudElements[6] = hudElement;
|
actionCommandStatus->hudElements[6] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -118,21 +118,21 @@ ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) {
|
|||||||
INCLUDE_ASM(s32, "battle/action_cmd/hammer", func_802A936C_42236C);
|
INCLUDE_ASM(s32, "battle/action_cmd/hammer", func_802A936C_42236C);
|
||||||
|
|
||||||
void N(draw_hud_elements)(void) {
|
void N(draw_hud_elements)(void) {
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[0]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[1]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[1]);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[2]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[2]);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[3]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[3]);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[4]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[4]);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[5]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[5]);
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[6]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[6]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[4]);
|
hud_element_free(gActionCommandStatus.hudElements[4]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[5]);
|
hud_element_free(gActionCommandStatus.hudElements[5]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[6]);
|
hud_element_free(gActionCommandStatus.hudElements[6]);
|
||||||
}
|
}
|
||||||
|
@ -33,29 +33,29 @@ ApiStatus func_802A9000_42F6E0(void) {
|
|||||||
actionCommandStatus->unk_68 = 0;
|
actionCommandStatus->unk_68 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BButton);
|
hudElement = hud_element_create(HudScript_BButton);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -99,12 +99,12 @@ void func_802A97AC_42FE8C(void) {
|
|||||||
s32 hudX;
|
s32 hudX;
|
||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &hudX, &hudY);
|
hud_element_get_render_pos(hudElement, &hudX, &hudY);
|
||||||
|
|
||||||
if (actionCommandStatus->unk_68 == 0) {
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
||||||
@ -112,12 +112,12 @@ void func_802A97AC_42FE8C(void) {
|
|||||||
func_8026880C(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
func_8026880C(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[4]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A9894_42FF74(void) {
|
void func_802A9894_42FF74(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[4]);
|
hud_element_free(gActionCommandStatus.hudElements[4]);
|
||||||
}
|
}
|
||||||
|
@ -30,19 +30,19 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RightOn);
|
hudElement = hud_element_create(HudScript_RightOn);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -69,9 +69,9 @@ ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
battleStatus->flags1 &= ~0x8000;
|
battleStatus->flags1 &= ~0x8000;
|
||||||
battleStatus->flags1 &= ~0x2000;
|
battleStatus->flags1 &= ~0x2000;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
actionCommandStatus->state = 10;
|
actionCommandStatus->state = 10;
|
||||||
@ -105,16 +105,16 @@ void N(update)(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
if (actionCommandStatus->unk_61) {
|
if (actionCommandStatus->unk_61) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actionCommandStatus->autoSucceed) {
|
if (actionCommandStatus->autoSucceed) {
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY);
|
||||||
if (actionCommandStatus->unk_61) {
|
if (actionCommandStatus->unk_61) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -126,7 +126,7 @@ void N(update)(void) {
|
|||||||
|
|
||||||
temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50];
|
temp_s0_3 = battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) {
|
if (((actionCommandStatus->unk_4E - temp_s0_3) - 2) <= 0) {
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], HudScript_AButtonDown);
|
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_AButtonDown);
|
||||||
}
|
}
|
||||||
if (((battleStatus->currentButtonsPressed & 0x8000) != 0) && (actionCommandStatus->autoSucceed == 0)) {
|
if (((battleStatus->currentButtonsPressed & 0x8000) != 0) && (actionCommandStatus->autoSucceed == 0)) {
|
||||||
actionCommandStatus->unk_60 = 1;
|
actionCommandStatus->unk_60 = 1;
|
||||||
@ -152,7 +152,7 @@ void N(update)(void) {
|
|||||||
if (battleStatus->actionSuccess >= 0) {
|
if (battleStatus->actionSuccess >= 0) {
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -191,13 +191,13 @@ void N(update)(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void N(draw_hud_elements)(void) {
|
void N(draw_hud_elements)(void) {
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[0]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
|
||||||
if (!(gGameStatusPtr->demoFlags & 1)) {
|
if (!(gGameStatusPtr->demoFlags & 1)) {
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[1]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
}
|
}
|
||||||
|
@ -49,29 +49,29 @@ ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -0x30;
|
actionCommandStatus->hudElementX = -0x30;
|
||||||
actionCommandStatus->hudElementY = 0x50;
|
actionCommandStatus->hudElementY = 0x50;
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_AButton);
|
elementID = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = elementID;
|
actionCommandStatus->hudElements[0] = elementID;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(elementID, 0);
|
hud_element_set_render_depth(elementID, 0);
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_BButton);
|
elementID = hud_element_create(HudScript_BButton);
|
||||||
actionCommandStatus->hudElements[2] = elementID;
|
actionCommandStatus->hudElements[2] = elementID;
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(elementID, 0);
|
hud_element_set_render_depth(elementID, 0);
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_BlueMeter);
|
elementID = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = elementID;
|
actionCommandStatus->hudElements[1] = elementID;
|
||||||
set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
|
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
|
||||||
set_hud_element_render_depth(elementID, 0);
|
hud_element_set_render_depth(elementID, 0);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
elementID = create_hud_element(HudScript_100pct);
|
elementID = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[4] = elementID;
|
actionCommandStatus->hudElements[4] = elementID;
|
||||||
set_hud_element_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
|
hud_element_set_render_pos(elementID, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 0x1C);
|
||||||
set_hud_element_render_depth(elementID, 0);
|
hud_element_set_render_depth(elementID, 0);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -132,20 +132,20 @@ void func_802A92A0_42DCB0(void) {
|
|||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[2];
|
hudElement = actionCommandStatus->hudElements[2];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
@ -162,11 +162,11 @@ void func_802A92A0_42DCB0(void) {
|
|||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX - 17,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX - 17,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 23,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 23,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@ -175,8 +175,8 @@ void func_802A92A0_42DCB0(void) {
|
|||||||
actionCommandStatus->unk_4E--;
|
actionCommandStatus->unk_4E--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[2], &HudScript_MashBButton1);
|
hud_element_set_script(actionCommandStatus->hudElements[2], &HudScript_MashBButton1);
|
||||||
actionCommandStatus->barFillLevel = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
actionCommandStatus->unk_5C = 0;
|
actionCommandStatus->unk_5C = 0;
|
||||||
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
@ -267,9 +267,9 @@ void func_802A92A0_42DCB0(void) {
|
|||||||
hudElement = actionCommandStatus->hudElements[4];
|
hudElement = actionCommandStatus->hudElements[4];
|
||||||
actionCommandStatus->barFillLevel = 10000;
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
actionCommandStatus->unk_68 = 1;
|
actionCommandStatus->unk_68 = 1;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
|
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
|
||||||
@ -340,12 +340,12 @@ void func_802A97F8_42E208(void) {
|
|||||||
s32 hudElementX;
|
s32 hudElementX;
|
||||||
s32 hudElementY;
|
s32 hudElementY;
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &hudElementX, &hudElementY);
|
hud_element_get_render_pos(hudElement, &hudElementX, &hudElementY);
|
||||||
|
|
||||||
if (actionCommandStatus->unk_68 == 0) {
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
func_80268770(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
|
func_80268770(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
|
||||||
@ -353,12 +353,12 @@ void func_802A97F8_42E208(void) {
|
|||||||
func_8026880C(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
|
func_8026880C(hudElementX, hudElementY, actionCommandStatus->barFillLevel / 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[4]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A98E0_42E2F0(void) {
|
void func_802A98E0_42E2F0(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[4]);
|
hud_element_free(gActionCommandStatus.hudElements[4]);
|
||||||
}
|
}
|
||||||
|
@ -42,34 +42,34 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
D_802A9B00 = 0;
|
D_802A9B00 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_RunAwayOK);
|
hudElement = hud_element_create(HudScript_RunAwayOK);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
temp_v1 = (100 - actionCommandStatus->unk_46) * 60;
|
temp_v1 = (100 - actionCommandStatus->unk_46) * 60;
|
||||||
temp_v1 /= 100;
|
temp_v1 /= 100;
|
||||||
temp_v1 = 29 - temp_v1;
|
temp_v1 = 29 - temp_v1;
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - temp_v1, actionCommandStatus->hudElementY + 17);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - temp_v1, actionCommandStatus->hudElementY + 17);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,18 +115,18 @@ void func_802A9310_42D220(void) {
|
|||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[4];
|
hudElement = actionCommandStatus->hudElements[4];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
break;
|
break;
|
||||||
@ -139,18 +139,18 @@ void func_802A9310_42D220(void) {
|
|||||||
if (actionCommandStatus->hudElementX > 50) {
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
actionCommandStatus->hudElements[0],
|
actionCommandStatus->hudElements[0],
|
||||||
actionCommandStatus->hudElementX,
|
actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
actionCommandStatus->hudElements[1],
|
actionCommandStatus->hudElements[1],
|
||||||
actionCommandStatus->hudElementX,
|
actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
|
||||||
temp_v0_2 = (((100 - actionCommandStatus->unk_46) * 60) / 100);
|
temp_v0_2 = (((100 - actionCommandStatus->unk_46) * 60) / 100);
|
||||||
temp_v0_2 = 29 - temp_v0_2;
|
temp_v0_2 = 29 - temp_v0_2;
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
actionCommandStatus->hudElements[4],
|
actionCommandStatus->hudElements[4],
|
||||||
actionCommandStatus->hudElementX - temp_v0_2,
|
actionCommandStatus->hudElementX - temp_v0_2,
|
||||||
actionCommandStatus->hudElementY + 17);
|
actionCommandStatus->hudElementY + 17);
|
||||||
@ -162,7 +162,7 @@ void func_802A9310_42D220(void) {
|
|||||||
actionCommandStatus->unk_4E--;
|
actionCommandStatus->unk_4E--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
actionCommandStatus->unk_5C = 0;
|
actionCommandStatus->unk_5C = 0;
|
||||||
D_802A9B00 = 1;
|
D_802A9B00 = 1;
|
||||||
@ -204,11 +204,11 @@ void func_802A9310_42D220(void) {
|
|||||||
hudElement = actionCommandStatus->hudElements[3];
|
hudElement = actionCommandStatus->hudElements[3];
|
||||||
actionCommandStatus->unk_44 = 10000;
|
actionCommandStatus->unk_44 = 10000;
|
||||||
actionCommandStatus->unk_68 = 1;
|
actionCommandStatus->unk_68 = 1;
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
hudElement,
|
hudElement,
|
||||||
actionCommandStatus->hudElementX + 50,
|
actionCommandStatus->hudElementX + 50,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
battleStatus->unk_84 = actionCommandStatus->unk_44 / 100;
|
battleStatus->unk_84 = actionCommandStatus->unk_44 / 100;
|
||||||
@ -298,14 +298,14 @@ void N(draw_hud_elements)(void) {
|
|||||||
temp_v0 = actionCommandStatus->unk_46 * 60;
|
temp_v0 = actionCommandStatus->unk_46 * 60;
|
||||||
x = 60 - temp_v0 / 100;
|
x = 60 - temp_v0 / 100;
|
||||||
temp_a1 = x - 31;
|
temp_a1 = x - 31;
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX - temp_a1, actionCommandStatus->hudElementY + 17);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX - temp_a1, actionCommandStatus->hudElementY + 17);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
// Redundant call, but needed to match.
|
// Redundant call, but needed to match.
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
|
|
||||||
if (D_802A9B00 == 0) {
|
if (D_802A9B00 == 0) {
|
||||||
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
||||||
@ -315,12 +315,12 @@ void N(draw_hud_elements)(void) {
|
|||||||
func_80268834(x, y, actionCommandStatus->barFillLevel / 100, 4);
|
func_80268834(x, y, actionCommandStatus->barFillLevel / 100, 4);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[3];
|
hudElement = actionCommandStatus->hudElements[3];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[4]);
|
hud_element_free(gActionCommandStatus.hudElements[4]);
|
||||||
}
|
}
|
||||||
|
@ -65,23 +65,23 @@ ApiStatus func_802A9000_42E3A0(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_StickNeutral);
|
hudElement = hud_element_create(HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -100,14 +100,14 @@ void func_802A9298_42E638(void) {
|
|||||||
case 0:
|
case 0:
|
||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_alpha(hudElement, 255);
|
hud_element_set_alpha(hudElement, 255);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
break;
|
break;
|
||||||
@ -123,9 +123,9 @@ void func_802A9298_42E638(void) {
|
|||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
@ -134,7 +134,7 @@ void func_802A9298_42E638(void) {
|
|||||||
actionCommandStatus->unk_4E--;
|
actionCommandStatus->unk_4E--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], HudScript_StickMashLeft);
|
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_StickMashLeft);
|
||||||
actionCommandStatus->barFillLevel = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
battleStatus->unk_85 = 0;
|
battleStatus->unk_85 = 0;
|
||||||
actionCommandStatus->unk_5C = 0;
|
actionCommandStatus->unk_5C = 0;
|
||||||
@ -186,9 +186,9 @@ void func_802A9298_42E638(void) {
|
|||||||
hudElement = actionCommandStatus->hudElements[2];
|
hudElement = actionCommandStatus->hudElements[2];
|
||||||
actionCommandStatus->barFillLevel = 10000;
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
actionCommandStatus->unk_68 = 1;
|
actionCommandStatus->unk_68 = 1;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
@ -35,23 +35,23 @@ ApiStatus func_802A9000_42EE20(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_StickNeutral);
|
hudElement = hud_element_create(HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -34,23 +34,23 @@ ApiStatus func_802A9000_430020(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_StickNeutral);
|
hudElement = hud_element_create(HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_100pct);
|
hudElement = hud_element_create(HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -30,17 +30,17 @@ ApiStatus func_802A9000_429D20(void) {
|
|||||||
actionCommandStatus->unk_5C = 0;
|
actionCommandStatus->unk_5C = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -78,10 +78,10 @@ void func_802A9634_42A354(void) {
|
|||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
if (actionCommandStatus->unk_5C == 0) {
|
if (actionCommandStatus->unk_5C == 0) {
|
||||||
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
||||||
} else {
|
} else {
|
||||||
@ -91,6 +91,6 @@ void func_802A9634_42A354(void) {
|
|||||||
|
|
||||||
void func_802A9720_42A440(void) {
|
void func_802A9720_42A440(void) {
|
||||||
sfx_stop_sound(0x80000041);
|
sfx_stop_sound(0x80000041);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
}
|
}
|
||||||
|
@ -29,17 +29,17 @@ ApiStatus func_802A9000_425590(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->unk_48 = 0;
|
actionCommandStatus->unk_48 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,13 +80,13 @@ void func_802A91F8_425788(void) {
|
|||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
break;
|
break;
|
||||||
@ -97,8 +97,8 @@ void func_802A91F8_425788(void) {
|
|||||||
if (hudElementX > 50) {
|
if (hudElementX > 50) {
|
||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
break;
|
break;
|
||||||
case 10:
|
case 10:
|
||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
@ -106,7 +106,7 @@ void func_802A91F8_425788(void) {
|
|||||||
actionCommandStatus->unk_4E -= 1;
|
actionCommandStatus->unk_4E -= 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_hud_element_anim(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
||||||
actionCommandStatus->barFillLevel = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
actionCommandStatus->state = 11;
|
actionCommandStatus->state = 11;
|
||||||
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
@ -152,16 +152,16 @@ void func_802A94A4_425A34(void) {
|
|||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
|
|
||||||
if (actionCommandStatus->unk_6A == 0) {
|
if (actionCommandStatus->unk_6A == 0) {
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 2);
|
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A9544_425AD4(void) {
|
void func_802A9544_425AD4(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
}
|
}
|
||||||
|
@ -33,18 +33,18 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) {
|
for (i = 1; i < ARRAY_COUNT(actionCommandStatus->hudElements); i++) {
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[i] = hudElement;
|
actionCommandStatus->hudElements[i] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -95,9 +95,9 @@ void N(update)(void) {
|
|||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(hudElement, 0xFF);
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -106,7 +106,7 @@ void N(update)(void) {
|
|||||||
if (actionCommandStatus->hudElementX > 50) {
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
actionCommandStatus->hudElementX = 50;
|
actionCommandStatus->hudElementX = 50;
|
||||||
}
|
}
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
actionCommandStatus->hudElements[0],
|
actionCommandStatus->hudElements[0],
|
||||||
actionCommandStatus->hudElementX + 21,
|
actionCommandStatus->hudElementX + 21,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
@ -134,13 +134,13 @@ void N(update)(void) {
|
|||||||
} while (oldButton == newButton);
|
} while (oldButton == newButton);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
hudElement = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
||||||
set_hud_element_anim(
|
hud_element_set_script(
|
||||||
hudElement, D_802A97C0_42CEB0[newButton]);
|
hudElement, D_802A97C0_42CEB0[newButton]);
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
hudElement,
|
hudElement,
|
||||||
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
|
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
clear_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
sfx_play_sound(0x233);
|
sfx_play_sound(0x233);
|
||||||
actionCommandStatus->unk_70 = 1;
|
actionCommandStatus->unk_70 = 1;
|
||||||
actionCommandStatus->state = 12;
|
actionCommandStatus->state = 12;
|
||||||
@ -251,9 +251,9 @@ void N(update)(void) {
|
|||||||
if (success) {
|
if (success) {
|
||||||
// Correct; shrink button, set up next button press, etc.
|
// Correct; shrink button, set up next button press, etc.
|
||||||
hudElement = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
hudElement = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
||||||
set_hud_element_anim(hudElement, D_802A97CC_42CEBC[actionCommandStatus->unk_5C]);
|
hud_element_set_script(hudElement, D_802A97CC_42CEBC[actionCommandStatus->unk_5C]);
|
||||||
set_hud_element_scale(hudElement, 0.5f);
|
hud_element_set_scale(hudElement, 0.5f);
|
||||||
set_hud_element_render_pos(
|
hud_element_set_render_pos(
|
||||||
hudElement,
|
hudElement,
|
||||||
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20),
|
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20),
|
||||||
actionCommandStatus->hudElementY + 7);
|
actionCommandStatus->hudElementY + 7);
|
||||||
@ -301,16 +301,16 @@ void N(draw_hud_elements)(void) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 1; i < 15; i++) {
|
for (i = 1; i < 15; i++) {
|
||||||
draw_hud_element_clipped(gActionCommandStatus.hudElements[i]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
|
|
||||||
for (i = 1; i < 15; i++) {
|
for (i = 1; i < 15; i++) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[i]);
|
hud_element_free(gActionCommandStatus.hudElements[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,37 +42,37 @@ void func_802AA014_42B504(void) {
|
|||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[1]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[1]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[3]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[4]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[4]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[6]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[6]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[7]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[7]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[8]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[8]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[13]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[13]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[10];
|
hudElement = actionCommandStatus->hudElements[10];
|
||||||
if (get_hud_element_anim(hudElement) != D_802AB180_42C670[battleStatus->unk_84]) {
|
if (hud_element_get_script(hudElement) != D_802AB180_42C670[battleStatus->unk_84]) {
|
||||||
set_hud_element_anim(hudElement, D_802AB180_42C670[battleStatus->unk_84]);
|
hud_element_set_script(hudElement, D_802AB180_42C670[battleStatus->unk_84]);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[11]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[11]);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[12]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[12]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802AA0D8_42B5C8(void) {
|
void func_802AA0D8_42B5C8(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[4]);
|
hud_element_free(gActionCommandStatus.hudElements[4]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[6]);
|
hud_element_free(gActionCommandStatus.hudElements[6]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[7]);
|
hud_element_free(gActionCommandStatus.hudElements[7]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[8]);
|
hud_element_free(gActionCommandStatus.hudElements[8]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[10]);
|
hud_element_free(gActionCommandStatus.hudElements[10]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[11]);
|
hud_element_free(gActionCommandStatus.hudElements[11]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[12]);
|
hud_element_free(gActionCommandStatus.hudElements[12]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[13]);
|
hud_element_free(gActionCommandStatus.hudElements[13]);
|
||||||
}
|
}
|
||||||
|
@ -35,29 +35,29 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_AButton);
|
hudElement = hud_element_create(HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = hudElement;
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
|
|
||||||
hudElement = create_hud_element(HudScript_BlueMeter);
|
hudElement = hud_element_create(HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(&D_802AA7F0_425460);
|
hudElement = hud_element_create(&D_802AA7F0_425460);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = create_hud_element(&D_802AA818_425488);
|
hudElement = hud_element_create(&D_802AA818_425488);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = hudElement;
|
||||||
set_hud_element_render_pos(hudElement, actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 28);
|
||||||
set_hud_element_render_depth(hudElement, 0);
|
hud_element_set_render_depth(hudElement, 0);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -80,30 +80,30 @@ void func_802A9744_4243B4(void) {
|
|||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
|
|
||||||
if (actionCommandStatus->unk_6A == 0) {
|
if (actionCommandStatus->unk_6A == 0) {
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
get_hud_element_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(hudElement, &x, &y);
|
||||||
|
|
||||||
func_80268798(x, y, (s16) actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(x, y, (s16) actionCommandStatus->barFillLevel / 100, 1);
|
||||||
draw_hud_element_clipped(actionCommandStatus->hudElements[3]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
|
||||||
hudElement = actionCommandStatus->hudElements[2];
|
hudElement = actionCommandStatus->hudElements[2];
|
||||||
if (actionCommandStatus->unk_64 == 0) {
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
if (D_802AA888_4254F8[battleStatus->unk_84] != get_hud_element_anim(hudElement)) {
|
if (D_802AA888_4254F8[battleStatus->unk_84] != hud_element_get_script(hudElement)) {
|
||||||
set_hud_element_anim(hudElement, D_802AA888_4254F8[battleStatus->unk_84]);
|
hud_element_set_script(hudElement, D_802AA888_4254F8[battleStatus->unk_84]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (D_802AA8A0_425510[battleStatus->unk_84] != get_hud_element_anim(hudElement)) {
|
if (D_802AA8A0_425510[battleStatus->unk_84] != hud_element_get_script(hudElement)) {
|
||||||
set_hud_element_anim(hudElement, D_802AA8A0_425510[battleStatus->unk_84]);
|
hud_element_set_script(hudElement, D_802AA8A0_425510[battleStatus->unk_84]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
draw_hud_element_clipped(hudElement);
|
hud_element_draw_clipped(hudElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A9898_424508(void) {
|
void func_802A9898_424508(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[3]);
|
hud_element_free(gActionCommandStatus.hudElements[3]);
|
||||||
}
|
}
|
||||||
|
@ -545,11 +545,11 @@ ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 posX = evt_get_float_variable(script, *args++);
|
f32 posX = evt_get_float_variable(script, *args++);
|
||||||
f32 posY = evt_get_float_variable(script, *args++);
|
f32 posY = evt_get_float_variable(script, *args++);
|
||||||
s32 icon = create_hud_element(HudScript_AnimatedHandPointer);
|
s32 icon = hud_element_create(HudScript_AnimatedHandPointer);
|
||||||
|
|
||||||
set_hud_element_render_pos(icon, posX, posY);
|
hud_element_set_render_pos(icon, posX, posY);
|
||||||
set_hud_element_scale(icon, 1.5f);
|
hud_element_set_scale(icon, 1.5f);
|
||||||
clear_hud_element_flags(icon, HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon, HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
evt_set_variable(script, *args++, icon);
|
evt_set_variable(script, *args++, icon);
|
||||||
load_tattle_flags(0x8B);
|
load_tattle_flags(0x8B);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -386,7 +386,7 @@ void setup_demo_player(void) {
|
|||||||
playerData->merleeTurnCount = 0;
|
playerData->merleeTurnCount = 0;
|
||||||
playerData->maxStarPower = 0;
|
playerData->maxStarPower = 0;
|
||||||
playerData->specialBarsFilled = 0;
|
playerData->specialBarsFilled = 0;
|
||||||
playerData->unk_292 = 0;
|
playerData->starBeamLevel = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void load_demo_battle(u32 index) {
|
void load_demo_battle(u32 index) {
|
||||||
@ -407,7 +407,7 @@ void load_demo_battle(u32 index) {
|
|||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_npcs();
|
clear_npcs();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
clear_trigger_data();
|
clear_trigger_data();
|
||||||
clear_model_data();
|
clear_model_data();
|
||||||
clear_sprite_shading_data();
|
clear_sprite_shading_data();
|
||||||
|
@ -40,8 +40,8 @@ ApiStatus N(GiveRefund)(Evt* script, s32 isInitialCall) {
|
|||||||
posZ = player->currentPos.z;
|
posZ = player->currentPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ);
|
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ);
|
||||||
itemIcon = create_hud_element(HudScript_Refund);
|
itemIcon = hud_element_create(HudScript_Refund);
|
||||||
set_hud_element_render_pos(itemIcon, iconX + 36, iconY - 63);
|
hud_element_set_render_pos(itemIcon, iconX + 36, iconY - 63);
|
||||||
}
|
}
|
||||||
|
|
||||||
script->varTable[0] = sleepTime;
|
script->varTable[0] = sleepTime;
|
||||||
@ -54,7 +54,7 @@ ApiStatus N(GiveRefundCleanup)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
|
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
|
||||||
|
|
||||||
if (player_team_is_ability_active(battleStatus->playerActor, ABILITY_REFUND) && sellValue > 0) {
|
if (player_team_is_ability_active(battleStatus->playerActor, ABILITY_REFUND) && sellValue > 0) {
|
||||||
free_hud_element(itemIcon);
|
hud_element_free(itemIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -28,14 +28,14 @@ void N(func_802A123C_72C7EC)(void) {
|
|||||||
var2 = *ptr;
|
var2 = *ptr;
|
||||||
var = (D_802A25EC / 100) - 0x68;
|
var = (D_802A25EC / 100) - 0x68;
|
||||||
ptr++;
|
ptr++;
|
||||||
set_hud_element_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
||||||
draw_hud_element_3(var2);
|
hud_element_draw_without_clipping(var2);
|
||||||
}
|
}
|
||||||
|
|
||||||
var2 = D_802A25C8;
|
var2 = D_802A25C8;
|
||||||
var = (D_802A25EC / 100) - 0x68;
|
var = (D_802A25EC / 100) - 0x68;
|
||||||
set_hud_element_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
||||||
draw_hud_element_3(var2);
|
hud_element_draw_without_clipping(var2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -92,9 +92,9 @@ ApiStatus N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) {
|
|||||||
itemTable = gItemTable;
|
itemTable = gItemTable;
|
||||||
iconPtr = &D_802A25C8;
|
iconPtr = &D_802A25C8;
|
||||||
for (; i < 7; i++, iconPtr++) {
|
for (; i < 7; i++, iconPtr++) {
|
||||||
icon = create_hud_element(ic[itemTable[D_802A25FC[i]].iconID].iconId);
|
icon = hud_element_create(ic[itemTable[D_802A25FC[i]].iconID].iconId);
|
||||||
*iconPtr = icon;
|
*iconPtr = icon;
|
||||||
set_hud_element_flags(icon, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(icon, HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
D_802A25E4 = 1;
|
D_802A25E4 = 1;
|
||||||
}
|
}
|
||||||
@ -199,7 +199,7 @@ ApiStatus N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) {
|
|||||||
script->varTable[0] = g;
|
script->varTable[0] = g;
|
||||||
free_generic_entity(D_802A25F8);
|
free_generic_entity(D_802A25F8);
|
||||||
for (i = 0; i < 7; i++) {
|
for (i = 0; i < 7; i++) {
|
||||||
free_hud_element(*iconPtr++);
|
hud_element_free(*iconPtr++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -29,14 +29,14 @@ ApiStatus N(func_802A123C_73153C)(Evt* script, s32 isInitialCall) {
|
|||||||
var2 = *ptr;
|
var2 = *ptr;
|
||||||
var = (D_802A2DD8 / 100) - 0x68;
|
var = (D_802A2DD8 / 100) - 0x68;
|
||||||
ptr++;
|
ptr++;
|
||||||
set_hud_element_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
||||||
draw_hud_element_3(var2);
|
hud_element_draw_without_clipping(var2);
|
||||||
}
|
}
|
||||||
|
|
||||||
var2 = D_802A2DF4;
|
var2 = D_802A2DF4;
|
||||||
var = (D_802A2DD8 / 100) - 0x68;
|
var = (D_802A2DD8 / 100) - 0x68;
|
||||||
set_hud_element_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
||||||
draw_hud_element_3(var2);
|
hud_element_draw_without_clipping(var2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,10 +84,10 @@ ApiStatus N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) {
|
|||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
s32* B48Ptr = &N(D_802A2848_732B48);
|
s32* B48Ptr = &N(D_802A2848_732B48);
|
||||||
s32* B58Ptr = &N(D_802A2858_732B58);
|
s32* B58Ptr = &N(D_802A2858_732B58);
|
||||||
HudElement* icon = create_hud_element(*(B48Ptr + * (B58Ptr + i)));
|
HudElement* icon = hud_element_create(*(B48Ptr + * (B58Ptr + i)));
|
||||||
|
|
||||||
*(&D_802A2DD8 + i) = icon;
|
*(&D_802A2DD8 + i) = icon;
|
||||||
set_hud_element_flags(icon, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(icon, HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
D_802A2DEC = 1;
|
D_802A2DEC = 1;
|
||||||
}
|
}
|
||||||
@ -192,7 +192,7 @@ ApiStatus N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) {
|
|||||||
script->varTable[0] = g;
|
script->varTable[0] = g;
|
||||||
free_generic_entity(D_802A2E00);
|
free_generic_entity(D_802A2E00);
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < 5; i++) {
|
||||||
free_hud_element(*iconPtr++);
|
hud_element_free(*iconPtr++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -13,7 +13,7 @@ BSS void* D_8010C924;
|
|||||||
BSS s32 D_8010C928;
|
BSS s32 D_8010C928;
|
||||||
BSS s32 D_8010C92C;
|
BSS s32 D_8010C92C;
|
||||||
BSS s32 wPartnerNpc;
|
BSS s32 wPartnerNpc;
|
||||||
BSS s32 D_8010C934;
|
BSS s32* TweesterTouchingPlayer;
|
||||||
BSS s32 D_8010C938;
|
BSS s32 D_8010C938;
|
||||||
BSS s32 D_8010C93C;
|
BSS s32 D_8010C93C;
|
||||||
BSS s32 D_8010C940;
|
BSS s32 D_8010C940;
|
||||||
@ -21,7 +21,7 @@ BSS s32 gSpinHistoryBufferPos;
|
|||||||
BSS char D_8010C948[0x4];
|
BSS char D_8010C948[0x4];
|
||||||
BSS s32 D_8010C94C;
|
BSS s32 D_8010C94C;
|
||||||
BSS s32 D_8010C950;
|
BSS s32 D_8010C950;
|
||||||
BSS s32 D_8010C954;
|
BSS s32 TweesterTouchingPartner;
|
||||||
BSS s32 D_8010C958;
|
BSS s32 D_8010C958;
|
||||||
BSS s32 D_8010C95C;
|
BSS s32 D_8010C95C;
|
||||||
BSS s32 D_8010C960;
|
BSS s32 D_8010C960;
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
|
|
||||||
ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) {
|
||||||
free_hud_element(evt_get_variable(script, *script->ptrReadPos));
|
hud_element_free(evt_get_variable(script, *script->ptrReadPos));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
free_hud_element(gActionCommandStatus.hudElements[0]);
|
hud_element_free(gActionCommandStatus.hudElements[0]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[1]);
|
hud_element_free(gActionCommandStatus.hudElements[1]);
|
||||||
free_hud_element(gActionCommandStatus.hudElements[2]);
|
hud_element_free(gActionCommandStatus.hudElements[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,15 +57,15 @@ void entity_block_hit_animate_scale(Entity* entity) {
|
|||||||
INCLUDE_ASM(s32, "entity/Block", entity_base_block_update_slow_sinking);
|
INCLUDE_ASM(s32, "entity/Block", entity_base_block_update_slow_sinking);
|
||||||
|
|
||||||
s32 entity_base_block_idle(Entity* entity) {
|
s32 entity_base_block_idle(Entity* entity) {
|
||||||
BlockData* temp = entity->dataBuf.block;
|
BlockData* data = entity->dataBuf.block;
|
||||||
s32 ret = 0;
|
s32 ret = 0;
|
||||||
|
|
||||||
if (is_block_on_ground(entity) != 0) {
|
if (is_block_on_ground(entity) != 0) {
|
||||||
if (entity->flags & ENTITY_FLAGS_200000) {
|
if (entity->flags & ENTITY_FLAGS_200000) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
entity_base_block_update_slow_sinking(entity);
|
entity_base_block_update_slow_sinking(entity);
|
||||||
if (temp->itemEntityIndex != -1) {
|
if (data->itemEntityIndex != -1) {
|
||||||
ItemEntity* itemEntity = get_item_entity(temp->itemEntityIndex);
|
ItemEntity* itemEntity = get_item_entity(data->itemEntityIndex);
|
||||||
itemEntity->position.y = entity->position.y + 4.0f;
|
itemEntity->position.y = entity->position.y + 4.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -75,58 +75,57 @@ s32 entity_base_block_idle(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_base_block_init(Entity* entity) {
|
void entity_base_block_init(Entity* entity) {
|
||||||
BlockData* temp = entity->dataBuf.block;
|
BlockData* data = entity->dataBuf.block;
|
||||||
f32 posY;
|
|
||||||
|
|
||||||
temp->itemEntityIndex = -1;
|
data->itemEntityIndex = -1;
|
||||||
temp->initialY = entity->position.y;
|
data->initialY = entity->position.y;
|
||||||
temp->unk_0E = -1;
|
data->unk_0E = -1;
|
||||||
entity->flags &= ~ENTITY_FLAGS_200000;
|
entity->flags &= ~ENTITY_FLAGS_200000;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_inactive_block_hit_init(Entity* entity) {
|
void entity_inactive_block_hit_init(Entity* entity) {
|
||||||
BlockData* temp = entity->dataBuf.block;
|
BlockData* data = entity->dataBuf.block;
|
||||||
|
|
||||||
temp->recoilInterpPhase = 90.0f;
|
data->recoilInterpPhase = 90.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_inactive_block_hit_anim(Entity* entity) {
|
void entity_inactive_block_hit_anim(Entity* entity) {
|
||||||
f64 temp_f20;
|
BlockData* data = entity->dataBuf.block;
|
||||||
BlockData* temp = entity->dataBuf.block;
|
f64 currentY;
|
||||||
|
|
||||||
entity_MulticoinBlock_update_timer(entity);
|
entity_MulticoinBlock_update_timer(entity);
|
||||||
temp_f20 = entity->position.y;
|
currentY = entity->position.y;
|
||||||
entity->position.y = temp_f20 + ((f64)sin_rad((temp->recoilInterpPhase * 6.28318f) / 360.0f) * 2);
|
entity->position.y = currentY + ((f64)sin_rad((data->recoilInterpPhase * 6.28318f) / 360.0f) * 2);
|
||||||
temp->recoilInterpPhase += 60.0f;
|
data->recoilInterpPhase += 60.0f;
|
||||||
if (temp->recoilInterpPhase > 450.0f) {
|
if (data->recoilInterpPhase > 450.0f) {
|
||||||
temp->recoilInterpPhase = clamp_angle(temp->recoilInterpPhase);
|
data->recoilInterpPhase = clamp_angle(data->recoilInterpPhase);
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_inactive_block_recoil_anim(Entity* entity) {
|
void entity_inactive_block_recoil_anim(Entity* entity) {
|
||||||
|
BlockData* data = entity->dataBuf.block;
|
||||||
f64 currentY;
|
f64 currentY;
|
||||||
BlockData* temp = entity->dataBuf.block;
|
|
||||||
|
|
||||||
entity_MulticoinBlock_update_timer(entity);
|
entity_MulticoinBlock_update_timer(entity);
|
||||||
currentY = entity->position.y;
|
currentY = entity->position.y;
|
||||||
entity->position.y = currentY + ((f64)sin_rad((temp->recoilInterpPhase * 6.28318f) / 360.0f));
|
entity->position.y = currentY + ((f64)sin_rad((data->recoilInterpPhase * 6.28318f) / 360.0f));
|
||||||
temp->recoilInterpPhase += 60.0f;
|
data->recoilInterpPhase += 60.0f;
|
||||||
if (temp->recoilInterpPhase >= 360.0f) {
|
if (data->recoilInterpPhase >= 360.0f) {
|
||||||
temp->recoilInterpPhase = 0.0f;
|
data->recoilInterpPhase = 0.0f;
|
||||||
entity->position.y = temp->initialY;
|
entity->position.y = data->initialY;
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_MulticoinBlock_init(Entity* entity) {
|
void entity_MulticoinBlock_init(Entity* entity) {
|
||||||
BlockData* temp;
|
BlockData* data;
|
||||||
|
|
||||||
entity_base_block_init(entity);
|
entity_base_block_init(entity);
|
||||||
temp = entity->dataBuf.block;
|
data = entity->dataBuf.block;
|
||||||
temp->coinsLeft = MULTICOIN_BLOCK_MAX_COINS;
|
data->coinsLeft = MULTICOIN_BLOCK_MAX_COINS;
|
||||||
temp->timeLeft = 123;
|
data->timeLeft = 123;
|
||||||
temp->gameFlagIndex = 0xFFFF;
|
data->gameFlagIndex = 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern s32 D_802E9E54;
|
extern s32 D_802E9E54;
|
||||||
@ -175,7 +174,7 @@ void entity_MulticoinBlock_update_timer(Entity* entity) {
|
|||||||
void entity_MulticoinBlock_idle(Entity* entity) {
|
void entity_MulticoinBlock_idle(Entity* entity) {
|
||||||
BlockData* data = entity->dataBuf.block;
|
BlockData* data = entity->dataBuf.block;
|
||||||
|
|
||||||
if ((entity->collisionFlags & ENTITY_COLLISION_FLAGS_80) != 0) {
|
if ((entity->collisionFlags & ENTITY_COLLISION_BLOCK_HIT) != 0) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -324,7 +323,6 @@ void entity_init_Hammer1Block_normal(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 entity_init_HammerBlock_small(Entity* entity) {
|
s32 entity_init_HammerBlock_small(Entity* entity) {
|
||||||
s32 temp_v0;
|
|
||||||
BlockData* data = entity->dataBuf.block;
|
BlockData* data = entity->dataBuf.block;
|
||||||
|
|
||||||
data->itemEntityIndex = -1;
|
data->itemEntityIndex = -1;
|
||||||
|
@ -53,7 +53,7 @@ void entity_BlueWarpPipe_wait_for_player_to_get_off(Entity* entity) {
|
|||||||
void entity_BlueWarpPipe_idle(Entity* entity) {
|
void entity_BlueWarpPipe_idle(Entity* entity) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if ((entity->collisionFlags & ENTITY_COLLISION_FLAGS_1) != 0) {
|
if ((entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) != 0) {
|
||||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||||
|
|
||||||
if (!(playerStatus->flags & (PLAYER_STATUS_FLAGS_1000 | PLAYER_STATUS_FLAGS_INPUT_DISABLED))) {
|
if (!(playerStatus->flags & (PLAYER_STATUS_FLAGS_1000 | PLAYER_STATUS_FLAGS_INPUT_DISABLED))) {
|
||||||
|
@ -58,10 +58,10 @@ void entity_Chest_idle(Entity* entity) {
|
|||||||
rotation = clamp_angle(180.0f - entity->rotation.y);
|
rotation = clamp_angle(180.0f - entity->rotation.y);
|
||||||
angle = fabsf(rotation - clamp_angle(atan2(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)));
|
angle = fabsf(rotation - clamp_angle(atan2(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)));
|
||||||
if ((!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_HOLDING_WATT)) &&
|
if ((!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_HOLDING_WATT)) &&
|
||||||
(!(entity->collisionFlags & ENTITY_COLLISION_FLAGS_1)) &&
|
(!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) &&
|
||||||
((angle <= 40.0f) || (angle >= 320.0f))) {
|
((angle <= 40.0f) || (angle >= 320.0f))) {
|
||||||
entity->flags |= ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
entity->flags |= ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
||||||
if ((playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_INTERACT_PROMPT_AVAILABLE) && (entity->collisionFlags & ENTITY_COLLISION_FLAGS_8)) {
|
if ((playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_INTERACT_PROMPT_AVAILABLE) && (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_WALL)) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
data = entity->dataBuf.chest;
|
data = entity->dataBuf.chest;
|
||||||
data->state = 0;
|
data->state = 0;
|
||||||
@ -230,22 +230,22 @@ void entity_GiantChest_give_equipment(Entity* entity) {
|
|||||||
s32 flag;
|
s32 flag;
|
||||||
|
|
||||||
switch (data->itemID) {
|
switch (data->itemID) {
|
||||||
case 1:
|
case ITEM_JUMP:
|
||||||
gPlayerData.bootsLevel = 0;
|
gPlayerData.bootsLevel = 0;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case ITEM_SPIN_JUMP:
|
||||||
gPlayerData.bootsLevel = 1;
|
gPlayerData.bootsLevel = 1;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case ITEM_TORNADO_JUMP:
|
||||||
gPlayerData.bootsLevel = 2;
|
gPlayerData.bootsLevel = 2;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case ITEM_HAMMER:
|
||||||
gPlayerData.hammerLevel = 0;
|
gPlayerData.hammerLevel = 0;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case ITEM_SUPER_HAMMER:
|
||||||
gPlayerData.hammerLevel = 1;
|
gPlayerData.hammerLevel = 1;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case ITEM_ULTRA_HAMMER:
|
||||||
gPlayerData.hammerLevel = 2;
|
gPlayerData.hammerLevel = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
extern u32* D_802EA728;
|
extern u32* D_802EA728;
|
||||||
extern u32* D_802EA760;
|
extern u32* D_802EA760;
|
||||||
extern EntityBlueprint Entity_HeartBlockContent;
|
extern EntityBlueprint Entity_HeartBlockContent;
|
||||||
extern UNK_TYPE D_802EB3C0;
|
extern u32 HeartBlockPrinterClosed;
|
||||||
extern s32 D_802EA744; //
|
extern s32 D_802EA744; //
|
||||||
|
|
||||||
f32 entity_HeartBlockContent_get_previous_yaw(SuperBlockContentData* data, s32 arg1) {
|
f32 entity_HeartBlockContent_get_previous_yaw(HeartBlockContentData* data, s32 lagTime) {
|
||||||
s32 temp = data->unk_24 - arg1;
|
s32 bufIdx = data->yawBufferPos - lagTime;
|
||||||
if (temp < 0) {
|
if (bufIdx < 0) {
|
||||||
temp += 10;
|
bufIdx += ARRAY_COUNT(data->yawBuffer);
|
||||||
}
|
}
|
||||||
return data->unk_28[temp];
|
return data->yawBuffer[bufIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity/HeartBlock", entity_HeartBlockContent__setupGfx);
|
INCLUDE_ASM(s32, "entity/HeartBlock", entity_HeartBlockContent__setupGfx);
|
||||||
@ -22,7 +22,7 @@ void entity_HeartBlockContent_setupGfx(s32 entityIndex) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_HeartBlockContent_set_initial_pos(Entity* entity) {
|
void entity_HeartBlockContent_set_initial_pos(Entity* entity) {
|
||||||
SuperBlockContentData* temp = entity->dataBuf.superBlockContent;
|
HeartBlockContentData* temp = entity->dataBuf.heartBlockContent;
|
||||||
Entity* entityTemp = get_entity_by_index(temp->parentEntityIndex);
|
Entity* entityTemp = get_entity_by_index(temp->parentEntityIndex);
|
||||||
|
|
||||||
entity->position.x = entityTemp->position.x;
|
entity->position.x = entityTemp->position.x;
|
||||||
@ -31,21 +31,21 @@ void entity_HeartBlockContent_set_initial_pos(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_HeartBlockContent__reset(Entity* entity) {
|
void entity_HeartBlockContent__reset(Entity* entity) {
|
||||||
SuperBlockContentData* data;
|
HeartBlockContentData* data;
|
||||||
Entity* someEntity;
|
Entity* someEntity;
|
||||||
|
|
||||||
entity->renderSetupFunc = entity_HeartBlockContent_setupGfx;
|
entity->renderSetupFunc = entity_HeartBlockContent_setupGfx;
|
||||||
entity->alpha = 255;
|
entity->alpha = 255;
|
||||||
data = entity->dataBuf.superBlockContent;
|
data = entity->dataBuf.heartBlockContent;
|
||||||
entity->flags |= ENTITY_FLAGS_ALWAYS_FACE_CAMERA;
|
entity->flags |= ENTITY_FLAGS_ALWAYS_FACE_CAMERA;
|
||||||
someEntity = get_entity_by_index(data->parentEntityIndex);
|
someEntity = get_entity_by_index(data->parentEntityIndex);
|
||||||
|
|
||||||
if (data->unk_09 == 0) {
|
if (data->unk_09 == 0) {
|
||||||
data->unk_09 = 1;
|
data->unk_09 = 1;
|
||||||
data->unk_01 = 2;
|
data->state = 2;
|
||||||
entity->scale.x = 1.0f;
|
entity->scale.x = 1.0f;
|
||||||
} else {
|
} else {
|
||||||
data->unk_01 = 0;
|
data->state = 0;
|
||||||
entity->scale.x = 0.0f;
|
entity->scale.x = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,14 +61,14 @@ void entity_HeartBlockContent__reset(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_HeartBlockContent_anim_idle(Entity* entity, s32 arg1) {
|
void entity_HeartBlockContent_anim_idle(Entity* entity, s32 arg1) {
|
||||||
SuperBlockContentData* data = entity->dataBuf.superBlockContent;
|
HeartBlockContentData* data = entity->dataBuf.heartBlockContent;
|
||||||
switch (data->unk_01) {
|
switch (data->state) {
|
||||||
case 0:
|
case 0:
|
||||||
entity->scale.x = 0.0f;
|
entity->scale.x = 0.0f;
|
||||||
entity->scale.y = 0.0f;
|
entity->scale.y = 0.0f;
|
||||||
entity->scale.z = 0.0f;
|
entity->scale.z = 0.0f;
|
||||||
if (arg1 == 0) {
|
if (arg1 == 0) {
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -76,23 +76,23 @@ void entity_HeartBlockContent_anim_idle(Entity* entity, s32 arg1) {
|
|||||||
entity->scale.x += 0.01;
|
entity->scale.x += 0.01;
|
||||||
if (entity->scale.x >= 1.0) {
|
if (entity->scale.x >= 1.0) {
|
||||||
entity->scale.x = 1.0f;
|
entity->scale.x = 1.0f;
|
||||||
data->unk_02 = 0;
|
data->sparkleTimer = 0;
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
}
|
}
|
||||||
entity->scale.z = entity->scale.x;
|
entity->scale.z = entity->scale.x;
|
||||||
entity->scale.y = entity->scale.x;
|
entity->scale.y = entity->scale.x;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
entity_HeartBlockContent_set_initial_pos(entity);
|
entity_HeartBlockContent_set_initial_pos(entity);
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case 3:
|
case 3:
|
||||||
if (gOverrideFlags == 0) {
|
if (gOverrideFlags == 0) {
|
||||||
// create an effect every 50 frames
|
// create an effect every 50 frames
|
||||||
data->unk_02--;
|
data->sparkleTimer--;
|
||||||
if (data->unk_02 <= 0) {
|
if (data->sparkleTimer <= 0) {
|
||||||
data->unk_02 = 50;
|
data->sparkleTimer = 50;
|
||||||
fx_stars_shimmer(data->unk_0A, entity->position.x, entity->position.y, entity->position.z, 22.0f, 8.0f, 4, 20);
|
fx_stars_shimmer(data->sparkleEffectType, entity->position.x, entity->position.y, entity->position.z, 22.0f, 8.0f, 4, 20);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -102,16 +102,16 @@ void entity_HeartBlockContent_anim_idle(Entity* entity, s32 arg1) {
|
|||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
gPlayerStatus.currentSpeed = 0;
|
gPlayerStatus.currentSpeed = 0;
|
||||||
gPlayerStatus.animFlags |= 0x200;
|
gPlayerStatus.animFlags |= PLAYER_STATUS_ANIM_FLAGS_RAISED_ARMS;
|
||||||
set_time_freeze_mode(1);
|
set_time_freeze_mode(1);
|
||||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802E4DE0(Entity* entity) {
|
void func_802E4DE0(Entity* entity) {
|
||||||
SuperBlockContentData* temp = entity->dataBuf.superBlockContent;
|
HeartBlockContentData* temp = entity->dataBuf.heartBlockContent;
|
||||||
|
|
||||||
temp->unk_01 = 0;
|
temp->state = 0;
|
||||||
entity->scale.x = 1.0f;
|
entity->scale.x = 1.0f;
|
||||||
entity->scale.y = 1.0f;
|
entity->scale.y = 1.0f;
|
||||||
entity->scale.z = 1.0f;
|
entity->scale.z = 1.0f;
|
||||||
@ -120,107 +120,107 @@ void func_802E4DE0(Entity* entity) {
|
|||||||
|
|
||||||
void entity_HeartBlockContent__anim_heal(Entity* entity, s32 arg1) {
|
void entity_HeartBlockContent__anim_heal(Entity* entity, s32 arg1) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
SuperBlockContentData* data = entity->dataBuf.superBlockContent;
|
HeartBlockContentData* data = entity->dataBuf.heartBlockContent;
|
||||||
f32 offsetX, offsetY, offsetZ;
|
f32 offsetX, offsetY, offsetZ;
|
||||||
|
|
||||||
switch (data->unk_01) {
|
switch (data->state) {
|
||||||
case 0:
|
case 0:
|
||||||
fx_sparkles(0, entity->position.x, entity->position.y, entity->position.z, 2.0f);
|
fx_sparkles(0, entity->position.x, entity->position.y, entity->position.z, 2.0f);
|
||||||
data->unk_20 = 0.0f;
|
data->bouncePhase = 0.0f;
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
data->unk_14 = 6.0f;
|
data->riseVelocity = 6.0f;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
entity->position.y = entity->position.y + data->unk_14;
|
entity->position.y = entity->position.y + data->riseVelocity;
|
||||||
data->unk_14 -= 1.0f;
|
data->riseVelocity -= 1.0f;
|
||||||
if (data->unk_14 <= 2.0f) {
|
if (data->riseVelocity <= 2.0f) {
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
entity->flags &= ~ENTITY_FLAGS_ALWAYS_FACE_CAMERA;
|
entity->flags &= ~ENTITY_FLAGS_ALWAYS_FACE_CAMERA;
|
||||||
data->unk_54 = -10.0f;
|
data->rotationRate = -10.0f;
|
||||||
entity_set_render_script(entity, &D_802EA744);
|
entity_set_render_script(entity, &D_802EA744);
|
||||||
entity->renderSetupFunc = &entity_HeartBlockContent_setupGfx;
|
entity->renderSetupFunc = &entity_HeartBlockContent_setupGfx;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
entity->position.y += sin_rad((data->unk_20 * TAU) / 360.0f) * 0.5f;
|
entity->position.y += sin_rad((data->bouncePhase * TAU) / 360.0f) * 0.5f;
|
||||||
data->unk_20 -= 30.0f;
|
data->bouncePhase -= 30.0f;
|
||||||
if (data->unk_20 < 0.0f) {
|
if (data->bouncePhase < 0.0f) {
|
||||||
data->unk_20 += 360.0f;
|
data->bouncePhase += 360.0f;
|
||||||
}
|
}
|
||||||
entity->rotation.y += data->unk_54;
|
entity->rotation.y += data->rotationRate;
|
||||||
data->unk_54 += 2.0f;
|
data->rotationRate += 2.0f;
|
||||||
if (data->unk_54 >= 0.0f) {
|
if (data->rotationRate >= 0.0f) {
|
||||||
data->unk_18 = 0.0f;
|
data->sparkleTrailAngle = 0.0f;
|
||||||
data->unk_1C = 0.0f;
|
data->sparkleTrailRadius = 0.0f;
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
data->unk_04 = playerStatus->colliderHeight + 5;
|
data->sparkleTrailPosY = playerStatus->colliderHeight + 5;
|
||||||
data->unk_03 = 0;
|
data->sparkleTrailTimer = 0;
|
||||||
recover_hp(-1);
|
recover_hp(-1);
|
||||||
recover_fp(-1);
|
recover_fp(-1);
|
||||||
sfx_play_sound(0x131);
|
sfx_play_sound(0x131);
|
||||||
}
|
}
|
||||||
data->unk_28[data->unk_24] = entity->rotation.y;
|
data->yawBuffer[data->yawBufferPos] = entity->rotation.y;
|
||||||
data->unk_24++;
|
data->yawBufferPos++;
|
||||||
if (data->unk_24 >= 11) {
|
if (data->yawBufferPos > ARRAY_COUNT(data->yawBuffer)) {
|
||||||
data->unk_24 = 0;
|
data->yawBufferPos = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
data->unk_1C += 2.0;
|
data->sparkleTrailRadius += 2.0;
|
||||||
if (data->unk_1C >= 10.0f) {
|
if (data->sparkleTrailRadius >= 10.0f) {
|
||||||
data->unk_1C = 10.0f;
|
data->sparkleTrailRadius = 10.0f;
|
||||||
}
|
}
|
||||||
data->unk_18 += 18.0f;
|
data->sparkleTrailAngle += 18.0f;
|
||||||
if (data->unk_18 >= 360.0f) {
|
if (data->sparkleTrailAngle >= 360.0f) {
|
||||||
data->unk_18 -= 360.0f;
|
data->sparkleTrailAngle -= 360.0f;
|
||||||
}
|
}
|
||||||
offsetX = data->unk_1C * sin_rad((data->unk_18 * TAU) / 360.0f);
|
offsetX = data->sparkleTrailRadius * sin_rad((data->sparkleTrailAngle * TAU) / 360.0f);
|
||||||
offsetZ = data->unk_1C * cos_rad((data->unk_18 * TAU) / 360.0f);
|
offsetZ = data->sparkleTrailRadius * cos_rad((data->sparkleTrailAngle * TAU) / 360.0f);
|
||||||
offsetY = data->unk_04;
|
offsetY = data->sparkleTrailPosY;
|
||||||
|
|
||||||
data->unk_04 -= 0.7;
|
data->sparkleTrailPosY -= 0.7;
|
||||||
|
|
||||||
if ((data->unk_03++ & 1) != 0) {
|
if ((data->sparkleTrailTimer++ & 1) != 0) {
|
||||||
fx_sparkles(3, playerStatus->position.x + offsetX,
|
fx_sparkles(3, playerStatus->position.x + offsetX,
|
||||||
playerStatus->position.y + offsetY,
|
playerStatus->position.y + offsetY,
|
||||||
playerStatus->position.z - offsetZ,
|
playerStatus->position.z - offsetZ,
|
||||||
8.0f
|
8.0f
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (data->unk_04 < 20.0f) {
|
if (data->sparkleTrailPosY < 20.0f) {
|
||||||
data->unk_04 = 20.0f;
|
data->sparkleTrailPosY = 20.0f;
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
}
|
}
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case 4:
|
case 4:
|
||||||
entity->position.y += sin_rad((data->unk_20 * TAU) / 360.0f) * 0.5f;
|
entity->position.y += sin_rad((data->bouncePhase * TAU) / 360.0f) * 0.5f;
|
||||||
data->unk_20 -= 30.0f;
|
data->bouncePhase -= 30.0f;
|
||||||
if (data->unk_20 < 0.0f) {
|
if (data->bouncePhase < 0.0f) {
|
||||||
data->unk_20 += 360.0f;
|
data->bouncePhase += 360.0f;
|
||||||
}
|
}
|
||||||
data->unk_54 += 1.0;
|
data->rotationRate += 1.0;
|
||||||
if (data->unk_54 > 30.0f) {
|
if (data->rotationRate > 30.0f) {
|
||||||
data->unk_54 = 30.0f;
|
data->rotationRate = 30.0f;
|
||||||
}
|
}
|
||||||
entity->rotation.y += data->unk_54;
|
entity->rotation.y += data->rotationRate;
|
||||||
if (entity->rotation.y >= 360.0f) {
|
if (entity->rotation.y >= 360.0f) {
|
||||||
entity->rotation.y -= 360.0f;
|
entity->rotation.y -= 360.0f;
|
||||||
}
|
}
|
||||||
entity->alpha -= 5;
|
entity->alpha -= 5;
|
||||||
if (entity->alpha < 7) {
|
if (entity->alpha < 7) {
|
||||||
entity->alpha = 5;
|
entity->alpha = 5;
|
||||||
if (data->unk_01 == 4) {
|
if (data->state == 4) {
|
||||||
data->unk_01++;
|
data->state++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data->unk_28[data->unk_24] = entity->rotation.y;
|
data->yawBuffer[data->yawBufferPos] = entity->rotation.y;
|
||||||
data->unk_24++;
|
data->yawBufferPos++;
|
||||||
if (data->unk_24 >= 11) {
|
if (data->yawBufferPos > ARRAY_COUNT(data->yawBuffer)) {
|
||||||
data->unk_24 = 0;
|
data->yawBufferPos = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
playerStatus->animFlags &= ~0x200;
|
playerStatus->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_RAISED_ARMS;
|
||||||
enable_player_input();
|
enable_player_input();
|
||||||
set_time_freeze_mode(0);
|
set_time_freeze_mode(0);
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
@ -259,9 +259,8 @@ void entity_HeartBlock_change_render_script(Entity* entity) {
|
|||||||
|
|
||||||
void entity_HeartBlock_show_tutorial_message(Entity* entity) {
|
void entity_HeartBlock_show_tutorial_message(Entity* entity) {
|
||||||
if ((!gPlayerData.partners[1].enabled) && get_global_flag(EVT_SAVE_FLAG(96)) == 0) {
|
if ((!gPlayerData.partners[1].enabled) && get_global_flag(EVT_SAVE_FLAG(96)) == 0) {
|
||||||
UNK_TYPE* ptr = &D_802EB3C0;
|
HeartBlockPrinterClosed = FALSE;
|
||||||
*ptr = 0;
|
msg_get_printer_for_msg(0x1D0001, &HeartBlockPrinterClosed);
|
||||||
msg_get_printer_for_msg(0x1D0001, ptr);
|
|
||||||
set_time_freeze_mode(TIME_FREEZE_PARTIAL);
|
set_time_freeze_mode(TIME_FREEZE_PARTIAL);
|
||||||
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
gOverrideFlags |= GLOBAL_OVERRIDES_40;
|
||||||
disable_player_input();
|
disable_player_input();
|
||||||
@ -272,7 +271,7 @@ void entity_HeartBlock_show_tutorial_message(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_HeartBlock_wait_for_close_tutorial(Entity* entity) {
|
void entity_HeartBlock_wait_for_close_tutorial(Entity* entity) {
|
||||||
if (D_802EB3C0) {
|
if (HeartBlockPrinterClosed) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
set_time_freeze_mode(TIME_FREEZE_NORMAL);
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
@ -280,21 +279,21 @@ void entity_HeartBlock_wait_for_close_tutorial(Entity* entity) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s8 entity_HeartBlock_create_child_entity(Entity* entity, EntityBlueprint* data) {
|
s8 entity_HeartBlock_create_child_entity(Entity* entity, EntityBlueprint* bp) {
|
||||||
s32 temp_s2 = CreateEntityVarArgBuffer[0];
|
s32 useAltSparkleType = CreateEntityVarArgBuffer[0];
|
||||||
Entity* someEntity;
|
Entity* childEntity;
|
||||||
SuperBlockContentData* temp_v1;
|
HeartBlockContentData* data;
|
||||||
|
|
||||||
entity_base_block_init(entity);
|
entity_base_block_init(entity);
|
||||||
someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f,
|
childEntity = get_entity_by_index(create_entity(bp, entity->position.x, entity->position.y, entity->position.z, 0.0f,
|
||||||
0x80000000));
|
0x80000000));
|
||||||
temp_v1 = someEntity->dataBuf.superBlockContent;
|
data = childEntity->dataBuf.heartBlockContent;
|
||||||
temp_v1->parentEntityIndex = entity->listIndex;
|
data->parentEntityIndex = entity->listIndex;
|
||||||
|
|
||||||
if (temp_s2 == 0) {
|
if (useAltSparkleType == FALSE) {
|
||||||
temp_v1->unk_0A = 3;
|
data->sparkleEffectType = 3;
|
||||||
} else {
|
} else {
|
||||||
temp_v1->unk_0A = 6;
|
data->sparkleEffectType = 6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@ void entity_ItemBlock_replace_with_inactive(Entity* entity) {
|
|||||||
s32 childEntityIndex;
|
s32 childEntityIndex;
|
||||||
s32 isBlockOnGround;
|
s32 isBlockOnGround;
|
||||||
s32 parentEntityType;
|
s32 parentEntityType;
|
||||||
ItemBlockData* temp;
|
ItemBlockData* childData;
|
||||||
Entity* childEntity;
|
Entity* childEntity;
|
||||||
Shadow* shadow;
|
Shadow* shadow;
|
||||||
|
|
||||||
@ -130,8 +130,8 @@ void entity_ItemBlock_replace_with_inactive(Entity* entity) {
|
|||||||
childEntity->flags |= ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE2;
|
childEntity->flags |= ENTITY_FLAGS_DRAW_IF_CLOSE_HIDE_MODE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
temp = childEntity->dataBuf.unk;
|
childData = childEntity->dataBuf.itemBlock;
|
||||||
temp->childEntityIndex = childEntityIndex;
|
childData->childEntityIndex = childEntityIndex;
|
||||||
|
|
||||||
if (entity->flags & ENTITY_FLAGS_HAS_DYNAMIC_SHADOW) {
|
if (entity->flags & ENTITY_FLAGS_HAS_DYNAMIC_SHADOW) {
|
||||||
childEntity->flags |= ENTITY_FLAGS_HAS_DYNAMIC_SHADOW;
|
childEntity->flags |= ENTITY_FLAGS_HAS_DYNAMIC_SHADOW;
|
||||||
|
@ -46,8 +46,8 @@ void entity_SaveBlock_save_data(void) {
|
|||||||
|
|
||||||
void entity_SaveBlock_show_tutorial_message(Entity* entity) {
|
void entity_SaveBlock_show_tutorial_message(Entity* entity) {
|
||||||
if (!get_global_flag(EVT_SAVE_FLAG(95))) {
|
if (!get_global_flag(EVT_SAVE_FLAG(95))) {
|
||||||
SaveBlockTutorialMessagePrinterClosed = FALSE;
|
SaveBlockTutorialPrinterClosed = FALSE;
|
||||||
msg_get_printer_for_msg(0x1D0000, &SaveBlockTutorialMessagePrinterClosed);
|
msg_get_printer_for_msg(0x1D0000, &SaveBlockTutorialPrinterClosed);
|
||||||
set_global_flag(EVT_SAVE_FLAG(95));
|
set_global_flag(EVT_SAVE_FLAG(95));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -57,37 +57,37 @@ void entity_SaveBlock_show_tutorial_message(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_SaveBlock_wait_for_close_tutorial(Entity* entity) {
|
void entity_SaveBlock_wait_for_close_tutorial(Entity* entity) {
|
||||||
if (SaveBlockTutorialMessagePrinterClosed) {
|
if (SaveBlockTutorialPrinterClosed) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_SaveBlock_show_choice_message(void) {
|
void entity_SaveBlock_show_choice_message(void) {
|
||||||
SaveBlockTutorialMessagePrinterClosed = FALSE;
|
SaveBlockTutorialPrinterClosed = FALSE;
|
||||||
SaveBlockResultMessagePrinterClosed = FALSE;
|
SaveBlockResultPrinterClosed = FALSE;
|
||||||
SaveBlockResultMessagePrinter = msg_get_printer_for_msg(0x1D0004, &SaveBlockResultMessagePrinterClosed);
|
SaveBlockResultPrinter = msg_get_printer_for_msg(0x1D0004, &SaveBlockResultPrinterClosed);
|
||||||
SaveBlockTutorialMessagePrinter = msg_get_printer_for_msg(0x1E000A, &SaveBlockTutorialMessagePrinterClosed);
|
SaveBlockTutorialPrinter = msg_get_printer_for_msg(0x1E000A, &SaveBlockTutorialPrinterClosed);
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_SaveBlock_show_result_message(void) {
|
void entity_SaveBlock_show_result_message(void) {
|
||||||
msg_printer_load_msg(0x1D0005, SaveBlockResultMessagePrinter);
|
msg_printer_load_msg(0x1D0005, SaveBlockResultPrinter);
|
||||||
sfx_play_sound(0x10);
|
sfx_play_sound(0x10);
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_SaveBlock_wait_for_close_result(Entity* entity) {
|
void entity_SaveBlock_wait_for_close_result(Entity* entity) {
|
||||||
if (SaveBlockResultMessagePrinterClosed) {
|
if (SaveBlockResultPrinterClosed) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_SaveBlock_wait_for_close_choice(Entity* entity) {
|
void entity_SaveBlock_wait_for_close_choice(Entity* entity) {
|
||||||
if (SaveBlockTutorialMessagePrinterClosed) {
|
if (SaveBlockTutorialPrinterClosed) {
|
||||||
if (SaveBlockTutorialMessagePrinter->currentOption == 1) {
|
if (SaveBlockTutorialPrinter->currentOption == 1) {
|
||||||
set_entity_commandlist(entity, &D_802E99DC);
|
set_entity_commandlist(entity, &D_802E99DC);
|
||||||
} else {
|
} else {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
close_message(SaveBlockResultMessagePrinter);
|
close_message(SaveBlockResultPrinter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,6 @@ void entity_Signpost_idle(Entity* entity) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
entity->flags &= ~ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
entity->flags &= ~ENTITY_FLAGS_SHOWS_INSPECT_PROMPT;
|
||||||
playerStatus->unk_C6 = -1;
|
playerStatus->interactingWithID = -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -34,12 +34,12 @@ INCLUDE_ASM(s32, "entity/SimpleSpring", entity_SimpleSpring_idle);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void entity_SimpleSpring_set_jump_params(Entity* ent) {
|
void entity_SimpleSpring_set_jump_params(Entity* ent) {
|
||||||
s32* data = ent->dataBuf.unk;
|
SimpleSpringData* data = ent->dataBuf.simpleSpring;
|
||||||
|
|
||||||
set_action_state(ACTION_STATE_LAUNCH);
|
set_action_state(ACTION_STATE_LAUNCH);
|
||||||
gPlayerStatus.gravityIntegrator[1] = 0;
|
gPlayerStatus.gravityIntegrator[1] = 0;
|
||||||
gPlayerStatus.gravityIntegrator[0] = 15.0f;
|
gPlayerStatus.gravityIntegrator[0] = 15.0f;
|
||||||
gPlayerStatus.gravityIntegrator[2] = (f32)*data;
|
gPlayerStatus.gravityIntegrator[2] = (f32)data->launchVelocity;
|
||||||
gPlayerStatus.gravityIntegrator[3] = ent->position.y;
|
gPlayerStatus.gravityIntegrator[3] = ent->position.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,7 +51,7 @@ void entity_ScriptSpring_init(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_SimpleSpring_init(Entity* ent) {
|
void entity_SimpleSpring_init(Entity* ent) {
|
||||||
ent->dataBuf.unk[0] = *CreateEntityVarArgBuffer;
|
ent->dataBuf.simpleSpring->launchVelocity = *CreateEntityVarArgBuffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity/SimpleSpring", entity_HiddenPanel_setupGfx);
|
INCLUDE_ASM(s32, "entity/SimpleSpring", entity_HiddenPanel_setupGfx);
|
||||||
|
@ -5,13 +5,13 @@ extern EntityBlueprint Entity_SuperBlockContent;
|
|||||||
|
|
||||||
void entity_SuperBlockContent_setupGfx();
|
void entity_SuperBlockContent_setupGfx();
|
||||||
|
|
||||||
f32 entity_SuperBlockContent_get_previous_yaw(SuperBlockContentData* data, s32 arg1) {
|
f32 entity_SuperBlockContent_get_previous_yaw(SuperBlockContentData* data, s32 lagTime) {
|
||||||
s32 idx = data->yawBufferPos - arg1;
|
s32 bufIdx = data->yawBufferPos - lagTime;
|
||||||
|
|
||||||
if (idx < 0) {
|
if (bufIdx < 0) {
|
||||||
idx += 20;
|
bufIdx += ARRAY_COUNT(data->yawBuffer);
|
||||||
}
|
}
|
||||||
return data->yawBuffer[idx];
|
return data->yawBuffer[bufIdx];
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_upgrade_block_hide_content(s32 entityIndex) {
|
void entity_upgrade_block_hide_content(s32 entityIndex) {
|
||||||
|
@ -1,50 +1,53 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
|
#define REFLECTED_SWITCH_LINKED 2
|
||||||
|
#define REFLECTED_SWITCH_HIDDEN 1
|
||||||
|
|
||||||
void entity_shattering_init_pieces(Entity* entity, void* arg1, void* arg2);
|
void entity_shattering_init_pieces(Entity* entity, void* arg1, void* arg2);
|
||||||
|
|
||||||
void entity_GreenStompSwitch_idle(Entity* entity) {
|
void entity_GreenStompSwitch_idle(Entity* entity) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
|
|
||||||
if (entity->collisionFlags & 1) {
|
if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) {
|
||||||
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|
||||||
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
|
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
temp->unk_22 = 8;
|
data->greenMotionTimer = 8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_GreenStompSwitch_retract(Entity* entity) {
|
void entity_GreenStompSwitch_retract(Entity* entity) {
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
u16 temp2 = temp->unk_22--;
|
u16 curTime = data->greenMotionTimer--;
|
||||||
|
|
||||||
if (temp2) {
|
if (curTime) {
|
||||||
entity->position.y -= 1.8625;
|
entity->position.y -= 1.8625;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
entity_start_script(entity);
|
entity_start_script(entity);
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
temp->unk_22 = 8;
|
data->greenMotionTimer = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_GreenStompSwitch_extend(Entity* entity) {
|
void entity_GreenStompSwitch_extend(Entity* entity) {
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
u16 temp2 = temp->unk_22--;
|
u16 curTime = data->greenMotionTimer--;
|
||||||
|
|
||||||
if (temp2) {
|
if (curTime) {
|
||||||
entity->position.y += 1.8625;
|
entity->position.y += 1.8625;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
temp->unk_22 = 8;
|
data->greenMotionTimer = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_raycast_down(f32*, f32*, f32*, f32*, f32*, f32*);
|
void entity_raycast_down(f32*, f32*, f32*, f32*, f32*, f32*);
|
||||||
|
|
||||||
void entity_switch_fall_down(Entity* entity) {
|
void entity_switch_fall_down(Entity* entity) {
|
||||||
struct802E1400* temp_s1 = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
f32 hitDepth = 10.0f;
|
f32 hitDepth = 10.0f;
|
||||||
f32 x = entity->position.x;
|
f32 x = entity->position.x;
|
||||||
f32 y = entity->position.y;
|
f32 y = entity->position.y;
|
||||||
@ -55,9 +58,9 @@ void entity_switch_fall_down(Entity* entity) {
|
|||||||
entity_raycast_down(&x, &y, &z, &hitYaw, &hitPitch, &hitDepth);
|
entity_raycast_down(&x, &y, &z, &hitYaw, &hitPitch, &hitDepth);
|
||||||
|
|
||||||
if ((entity->position.y != y) && (entity->position.y > y)) {
|
if ((entity->position.y != y) && (entity->position.y > y)) {
|
||||||
f32 var = temp_s1->unk_00.x;
|
f32 var = data->fallVelocity;
|
||||||
var += 0.5;
|
var += 0.5;
|
||||||
temp_s1->unk_00.x = var;
|
data->fallVelocity = var;
|
||||||
entity->position.y -= var;
|
entity->position.y -= var;
|
||||||
if (entity->position.y < y) {
|
if (entity->position.y < y) {
|
||||||
entity->position.y = y;
|
entity->position.y = y;
|
||||||
@ -68,7 +71,7 @@ void entity_switch_fall_down(Entity* entity) {
|
|||||||
void entity_HugeBlueSwitch_idle(Entity* entity) {
|
void entity_HugeBlueSwitch_idle(Entity* entity) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
if (entity->collisionFlags & 1) {
|
if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) {
|
||||||
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|
||||||
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
|
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
@ -77,24 +80,24 @@ void entity_HugeBlueSwitch_idle(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_small_switch_idle(Entity* entity) {
|
void entity_small_switch_idle(Entity* entity) {
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
PartnerActionStatus* partnerActionStatus = &gPartnerActionStatus;
|
||||||
|
|
||||||
entity_switch_fall_down(entity);
|
entity_switch_fall_down(entity);
|
||||||
|
|
||||||
if (entity->collisionFlags & 0x40) {
|
if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_HAMMER) {
|
||||||
if (playerStatus->actionState == ACTION_STATE_HAMMER) {
|
if (playerStatus->actionState == ACTION_STATE_HAMMER) {
|
||||||
if (gPlayerData.hammerLevel < 0) {
|
if (gPlayerData.hammerLevel < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
|
|
||||||
if (temp->attachedEntity == NULL) {
|
if (data->linkedSwitch == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
exec_entity_commandlist(temp->attachedEntity);
|
exec_entity_commandlist(data->linkedSwitch);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -115,11 +118,11 @@ void entity_small_switch_idle(Entity* entity) {
|
|||||||
|
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
|
|
||||||
if (temp->attachedEntity == NULL) {
|
if (data->linkedSwitch == NULL) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
exec_entity_commandlist(temp->attachedEntity);
|
exec_entity_commandlist(data->linkedSwitch);
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_RedSwitch_wait_and_reset(Entity* entity) {
|
void entity_RedSwitch_wait_and_reset(Entity* entity) {
|
||||||
@ -129,13 +132,13 @@ void entity_RedSwitch_wait_and_reset(Entity* entity) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void entity_base_switch_anim_init(Entity* entity) {
|
void entity_base_switch_anim_init(Entity* entity) {
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* temp = entity->dataBuf.swtch;
|
||||||
|
|
||||||
temp->unk_00.x = 1.0f;
|
temp->fallVelocity = 1.0f;
|
||||||
temp->unk_00.y = 0.1f;
|
temp->deltaScaleX = 0.1f;
|
||||||
temp->unk_00.z = -0.1f;
|
temp->deltaScaleY = -0.1f;
|
||||||
temp->unk_10 = 0;
|
temp->animStateScaleX = 0;
|
||||||
temp->unk_11 = 0;
|
temp->animStateScaleY = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 entity_RedSwitch_animate_scale(Entity* entity) {
|
s32 entity_RedSwitch_animate_scale(Entity* entity) {
|
||||||
@ -143,79 +146,79 @@ s32 entity_RedSwitch_animate_scale(Entity* entity) {
|
|||||||
f32 temp_f2;
|
f32 temp_f2;
|
||||||
f32 temp_f4;
|
f32 temp_f4;
|
||||||
f32 temp_f6;
|
f32 temp_f6;
|
||||||
struct802E1400* temp_s0 = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
f32 phi_f4;
|
f32 phi_f4;
|
||||||
s32 phi_s2 = 0;
|
s32 phi_s2 = 0;
|
||||||
|
|
||||||
switch (temp_s0->unk_10) {
|
switch (data->animStateScaleX) {
|
||||||
case 0: // switch 1
|
case 0: // switch 1
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.3;
|
temp_f6 = data->baseScale.z * 0.3;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0;
|
temp_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 4.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) {
|
if ((data->baseScale.x + temp_f6) <= entity->scale.x) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: // switch 1
|
case 1: // switch 1
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.2;
|
temp_f6 = data->baseScale.z * -0.2;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0;
|
temp_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 6.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) {
|
if (entity->scale.x <= (data->baseScale.x + temp_f6)) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // switch 1
|
case 2: // switch 1
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.15;
|
temp_f6 = data->baseScale.z * 0.15;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0;
|
temp_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 4.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) {
|
if ((data->baseScale.x + temp_f6) <= entity->scale.x) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: // switch 1
|
case 3: // switch 1
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.1;
|
temp_f6 = data->baseScale.z * -0.1;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0;
|
temp_f4 = ((data->baseScale.x + temp_f6) - entity->scale.x) / 6.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) {
|
if (entity->scale.x <= (data->baseScale.x + temp_f6)) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: // switch 1
|
case 4: // switch 1
|
||||||
temp_f4 = (temp_s0->unk_14.x - entity->scale.x) / 4.0;
|
temp_f4 = (data->baseScale.x - entity->scale.x) / 4.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if (temp_s0->unk_14.x <= entity->scale.x) {
|
if (data->baseScale.x <= entity->scale.x) {
|
||||||
entity->scale.x = temp_s0->unk_14.x;
|
entity->scale.x = data->baseScale.x;
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5: // switch 1
|
case 5: // switch 1
|
||||||
@ -225,76 +228,76 @@ s32 entity_RedSwitch_animate_scale(Entity* entity) {
|
|||||||
|
|
||||||
entity->scale.z = entity->scale.x;
|
entity->scale.z = entity->scale.x;
|
||||||
|
|
||||||
switch (temp_s0->unk_11) {
|
switch (data->animStateScaleY) {
|
||||||
|
|
||||||
case 0: // switch 2
|
case 0: // switch 2
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.5;
|
temp_f6 = data->baseScale.z * -0.5;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0;
|
temp_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 5.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) {
|
if (entity->scale.y <= (data->baseScale.y + temp_f6)) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1: // switch 2
|
case 1: // switch 2
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.1;
|
temp_f6 = data->baseScale.z * 0.1;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 10.0;
|
temp_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 10.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if ((temp_s0->unk_14.y + temp_f6) <= entity->scale.y) {
|
if ((data->baseScale.y + temp_f6) <= entity->scale.y) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // switch 2
|
case 2: // switch 2
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.3;
|
temp_f6 = data->baseScale.z * -0.3;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0;
|
temp_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 5.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) {
|
if (entity->scale.y <= (data->baseScale.y + temp_f6)) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3: // switch 2
|
case 3: // switch 2
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.0;
|
temp_f6 = data->baseScale.z * 0.0;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 10.0;
|
temp_f4 = ((data->baseScale.y + temp_f6) - entity->scale.y) / 10.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if ((temp_s0->unk_14.y + temp_f6) <= entity->scale.y) {
|
if ((data->baseScale.y + temp_f6) <= entity->scale.y) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 4: // switch 2
|
case 4: // switch 2
|
||||||
temp_f4 = (temp_s0->unk_14.y - entity->scale.y) / 5.0;
|
temp_f4 = (data->baseScale.y - entity->scale.y) / 5.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if (entity->scale.y <= temp_s0->unk_14.y) {
|
if (entity->scale.y <= data->baseScale.y) {
|
||||||
entity->scale.y = temp_s0->unk_14.y;
|
entity->scale.y = data->baseScale.y;
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 5: // switch 2
|
case 5: // switch 2
|
||||||
@ -304,84 +307,84 @@ s32 entity_RedSwitch_animate_scale(Entity* entity) {
|
|||||||
|
|
||||||
entity_switch_fall_down(entity);
|
entity_switch_fall_down(entity);
|
||||||
if (phi_s2 == 2) {
|
if (phi_s2 == 2) {
|
||||||
temp_s0->unk_10 = 0;
|
data->animStateScaleX = 0;
|
||||||
temp_s0->unk_11 = 0;
|
data->animStateScaleY = 0;
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_base_switch_start_bound_script(Entity* entity) {
|
void entity_base_switch_start_bound_script(Entity* entity) {
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
set_area_flag(temp->unk_20);
|
set_area_flag(data->areaFlagIndex);
|
||||||
entity_start_script(entity);
|
entity_start_script(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_base_switch_animate_scale(Entity* entity) {
|
void entity_base_switch_animate_scale(Entity* entity) {
|
||||||
f32 temp_f0;
|
f32 temp_f0;
|
||||||
f32 temp_f4;
|
f32 temp_f4;
|
||||||
f32 temp_f6;
|
f32 scaleChange;
|
||||||
struct802E1400* temp_s0 = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
f32 phi_f4;
|
f32 phi_f4;
|
||||||
s32 phi_s2 = 0;
|
s32 phi_s2 = 0;
|
||||||
|
|
||||||
switch (temp_s0->unk_10) {
|
switch (data->animStateScaleX) {
|
||||||
case 0:
|
case 0:
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.3;
|
scaleChange = data->baseScale.z * 0.3;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0;
|
temp_f4 = ((data->baseScale.x + scaleChange) - entity->scale.x) / 4.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) {
|
if ((data->baseScale.x + scaleChange) <= entity->scale.x) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
temp_f6 = (temp_s0->unk_14.z * -0.2);
|
scaleChange = (data->baseScale.z * -0.2);
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0;
|
temp_f4 = ((data->baseScale.x + scaleChange) - entity->scale.x) / 6.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) {
|
if (entity->scale.x <= (data->baseScale.x + scaleChange)) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.15;
|
scaleChange = data->baseScale.z * 0.15;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 4.0;
|
temp_f4 = ((data->baseScale.x + scaleChange) - entity->scale.x) / 4.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if ((temp_s0->unk_14.x + temp_f6) <= entity->scale.x) {
|
if ((data->baseScale.x + scaleChange) <= entity->scale.x) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.1;
|
scaleChange = data->baseScale.z * -0.1;
|
||||||
temp_f4 = ((temp_s0->unk_14.x + temp_f6) - entity->scale.x) / 6.0;
|
temp_f4 = ((data->baseScale.x + scaleChange) - entity->scale.x) / 6.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.y += phi_f4;
|
data->deltaScaleX += phi_f4;
|
||||||
entity->scale.x += temp_s0->unk_00.y;
|
entity->scale.x += data->deltaScaleX;
|
||||||
if (entity->scale.x <= (temp_s0->unk_14.x + temp_f6)) {
|
if (entity->scale.x <= (data->baseScale.x + scaleChange)) {
|
||||||
temp_s0->unk_00.y = 0.0f;
|
data->deltaScaleX = 0.0f;
|
||||||
temp_s0->unk_10++;
|
data->animStateScaleX++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -392,49 +395,49 @@ void entity_base_switch_animate_scale(Entity* entity) {
|
|||||||
|
|
||||||
entity->scale.z = entity->scale.x;
|
entity->scale.z = entity->scale.x;
|
||||||
|
|
||||||
switch (temp_s0->unk_11) {
|
switch (data->animStateScaleY) {
|
||||||
case 0:
|
case 0:
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.5;
|
scaleChange = data->baseScale.z * -0.5;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0;
|
temp_f4 = ((data->baseScale.y + scaleChange) - entity->scale.y) / 5.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) {
|
if (entity->scale.y <= (data->baseScale.y + scaleChange)) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
temp_f6 = temp_s0->unk_14.z * 0.1;
|
scaleChange = data->baseScale.z * 0.1;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 10.0;
|
temp_f4 = ((data->baseScale.y + scaleChange) - entity->scale.y) / 10.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 < 0.01) {
|
if (temp_f4 < 0.01) {
|
||||||
phi_f4 = 0.01f;
|
phi_f4 = 0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if ((temp_s0->unk_14.y + temp_f6) <= entity->scale.y) {
|
if ((data->baseScale.y + scaleChange) <= entity->scale.y) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
temp_f6 = temp_s0->unk_14.z * -0.3;
|
scaleChange = data->baseScale.z * -0.3;
|
||||||
temp_f4 = ((temp_s0->unk_14.y + temp_f6) - entity->scale.y) / 5.0;
|
temp_f4 = ((data->baseScale.y + scaleChange) - entity->scale.y) / 5.0;
|
||||||
phi_f4 = temp_f4;
|
phi_f4 = temp_f4;
|
||||||
if (temp_f4 > -0.01) {
|
if (temp_f4 > -0.01) {
|
||||||
phi_f4 = -0.01f;
|
phi_f4 = -0.01f;
|
||||||
}
|
}
|
||||||
temp_s0->unk_00.z += phi_f4;
|
data->deltaScaleY += phi_f4;
|
||||||
entity->scale.y += temp_s0->unk_00.z;
|
entity->scale.y += data->deltaScaleY;
|
||||||
if (entity->scale.y <= (temp_s0->unk_14.y + temp_f6)) {
|
if (entity->scale.y <= (data->baseScale.y + scaleChange)) {
|
||||||
temp_s0->unk_00.z = 0.0f;
|
data->deltaScaleY = 0.0f;
|
||||||
temp_s0->unk_11++;
|
data->animStateScaleY++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -445,66 +448,64 @@ void entity_base_switch_animate_scale(Entity* entity) {
|
|||||||
|
|
||||||
entity_switch_fall_down(entity);
|
entity_switch_fall_down(entity);
|
||||||
if (phi_s2 == 2) {
|
if (phi_s2 == 2) {
|
||||||
temp_s0->unk_10 = 0;
|
data->animStateScaleX = 0;
|
||||||
temp_s0->unk_11 = 0;
|
data->animStateScaleY = 0;
|
||||||
exec_entity_commandlist(entity);
|
exec_entity_commandlist(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
temp_s0->unk_24++;
|
data->scaleAnimTimer++;
|
||||||
if ((temp_s0->unk_24 == 10) && (temp_s0->attachedEntity == NULL)) {
|
if ((data->scaleAnimTimer == 10) && (data->linkedSwitch == NULL)) {
|
||||||
fx_cold_breath(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C);
|
fx_cold_breath(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_base_switch_init(Entity* entity) {
|
void entity_base_switch_init(Entity* entity) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
|
|
||||||
playerStatus->animFlags |= 0x1000000;
|
playerStatus->animFlags |= PLAYER_STATUS_ANIM_FLAGS_1000000;
|
||||||
temp->unk_14.x = 1.0f;
|
data->baseScale.x = 1.0f;
|
||||||
temp->unk_14.y = 1.0f;
|
data->baseScale.y = 1.0f;
|
||||||
temp->unk_14.z = 1.0f;
|
data->baseScale.z = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_BlueSwitch_init(Entity* entity) {
|
void entity_BlueSwitch_init(Entity* entity) {
|
||||||
Entity* temp_v0_2;
|
SwitchData* data = entity->dataBuf.swtch;
|
||||||
struct802E1400* temp = (struct802E1400*) entity->dataBuf.unk;
|
|
||||||
|
|
||||||
entity_base_switch_init(entity);
|
entity_base_switch_init(entity);
|
||||||
if (CreateEntityVarArgBuffer[0] == 2) {
|
if (CreateEntityVarArgBuffer[0] == REFLECTED_SWITCH_LINKED) {
|
||||||
D_802EB3A0 = entity;
|
SwitchToLink = entity;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CreateEntityVarArgBuffer[0] == 1) {
|
if (CreateEntityVarArgBuffer[0] == REFLECTED_SWITCH_HIDDEN) {
|
||||||
if (D_802EB3A0 != NULL) {
|
if (SwitchToLink != NULL) {
|
||||||
temp->attachedEntity = D_802EB3A0;
|
data->linkedSwitch = SwitchToLink;
|
||||||
entity->flags |= ENTITY_FLAGS_HIDDEN;
|
entity->flags |= ENTITY_FLAGS_HIDDEN;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
D_802EB3A0 = NULL;
|
SwitchToLink = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_HugeBlueSwitch_init(Entity* entity) {
|
void entity_HugeBlueSwitch_init(Entity* entity) {
|
||||||
struct802E1400* temp;
|
SwitchData* data;
|
||||||
|
|
||||||
entity_base_switch_init(entity);
|
entity_base_switch_init(entity);
|
||||||
temp = (struct802E1400*) entity->dataBuf.unk;
|
data = entity->dataBuf.swtch;
|
||||||
entity->scale.x = 3.0f;
|
entity->scale.x = 3.0f;
|
||||||
entity->scale.y = 3.0f;
|
entity->scale.y = 3.0f;
|
||||||
entity->scale.z = 3.0f;
|
entity->scale.z = 3.0f;
|
||||||
temp->unk_14.x = 3.0f;
|
data->baseScale.x = 3.0f;
|
||||||
temp->unk_14.y = 3.0f;
|
data->baseScale.y = 3.0f;
|
||||||
temp->unk_14.z = 3.0f;
|
data->baseScale.z = 3.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_BrickBlock_idle(Entity* entity) {
|
void entity_BrickBlock_idle(Entity* entity) {
|
||||||
entity_base_block_idle(entity);
|
entity_base_block_idle(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
INCLUDE_ASM(void, "entity/Switch", entity_shattering_init_pieces, Entity* entity, void* arg1, void* arg2);
|
INCLUDE_ASM(void, "entity/Switch", entity_shattering_init_pieces, Entity* entity, void* arg1, void* arg2);
|
||||||
|
|
||||||
INCLUDE_ASM(void, "entity/Switch", entity_shattering_idle, Entity* entity);
|
INCLUDE_ASM(void, "entity/Switch", entity_shattering_idle, Entity* entity);
|
||||||
@ -513,7 +514,7 @@ INCLUDE_ASM(void, "entity/Switch", entity_shattering_idle, Entity* entity);
|
|||||||
// display list issues
|
// display list issues
|
||||||
void entity_shattering_setupGfx(s32 entityIndex) {
|
void entity_shattering_setupGfx(s32 entityIndex) {
|
||||||
Gfx* temp_s2;
|
Gfx* temp_s2;
|
||||||
struct802E1400* temp_s4;
|
SwitchData* data;
|
||||||
struct802E2BA4* phi_fp;
|
struct802E2BA4* phi_fp;
|
||||||
Matrix4f subroutine_arg6;
|
Matrix4f subroutine_arg6;
|
||||||
Matrix4f subroutine_arg16;
|
Matrix4f subroutine_arg16;
|
||||||
@ -533,25 +534,25 @@ void entity_shattering_setupGfx(s32 entityIndex) {
|
|||||||
threeSixty = 360.0f;
|
threeSixty = 360.0f;
|
||||||
someFloat = 0.00390625f;
|
someFloat = 0.00390625f;
|
||||||
entity = get_entity_by_index(entityIndex);
|
entity = get_entity_by_index(entityIndex);
|
||||||
temp_s4 = (struct802E1400*) entity->dataBuf.unk;
|
data = entity->dataBuf.swtch;
|
||||||
x_inv = -entity->position.x;
|
x_inv = -entity->position.x;
|
||||||
y_inv = -entity->position.y;
|
y_inv = -entity->position.y;
|
||||||
z_inv = -entity->position.z;
|
z_inv = -entity->position.z;
|
||||||
phi_fp = temp_s4->renderYaw;
|
phi_fp = data->renderYaw;
|
||||||
for (i = 0; i < 24; i++) {
|
for (i = 0; i < 24; i++) {
|
||||||
if (temp_s4->unk_3C.s == 0xFF) {
|
if (data->unk_3C.s == 0xFF) {
|
||||||
gDPSetRenderMode(temp_s2++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
gDPSetRenderMode(temp_s2++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2);
|
||||||
gDPSetCombineMode(temp_s2++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
gDPSetCombineMode(temp_s2++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||||
} else {
|
} else {
|
||||||
gDPSetCombineLERP(temp_s2++, 0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0);
|
gDPSetCombineLERP(temp_s2++, 0, 0, 0, TEXEL0, SHADE, 0, TEXEL0, 0, 0, 0, 0, TEXEL0, TEXEL0, 0, SHADE, 0);
|
||||||
gDPSetPrimColor(temp_s2++, 0, 0, 0x00, 0x00, 0x00, temp_s4->unk_3C.b[1])
|
gDPSetPrimColor(temp_s2++, 0, 0, 0x00, 0x00, 0x00, data->unk_3C.b[1])
|
||||||
}
|
}
|
||||||
guTranslateF(&subroutine_arg6, x_inv, y_inv, z_inv);
|
guTranslateF(&subroutine_arg6, x_inv, y_inv, z_inv);
|
||||||
guRotateF(&subroutine_arg36, temp_s4->unk_8B[i] * threeSixty * someFloat, 1.0f, 0.0f, 0.0f);
|
guRotateF(&subroutine_arg36, data->unk_8B[i] * threeSixty * someFloat, 1.0f, 0.0f, 0.0f);
|
||||||
guRotateF(&subroutine_arg48, temp_s4->unk_A4[i] * threeSixty * someFloat, 0.0f, 1.0f, 0.0f);
|
guRotateF(&subroutine_arg48, data->unk_A4[i] * threeSixty * someFloat, 0.0f, 1.0f, 0.0f);
|
||||||
guMtxCatF(&subroutine_arg36, &subroutine_arg48, &subroutine_arg48);
|
guMtxCatF(&subroutine_arg36, &subroutine_arg48, &subroutine_arg48);
|
||||||
guMtxCatF(&subroutine_arg48, &subroutine_arg6, &subroutine_arg6);
|
guMtxCatF(&subroutine_arg48, &subroutine_arg6, &subroutine_arg6);
|
||||||
guTranslateF(&subroutine_arg16, temp_s4->unk_C0[i], temp_s4->unk_124[i], temp_s4->unk_188[i]);
|
guTranslateF(&subroutine_arg16, data->unk_C0[i], data->unk_124[i], data->unk_188[i]);
|
||||||
guMtxCatF(&subroutine_arg6, &subroutine_arg16, &subroutine_arg16);
|
guMtxCatF(&subroutine_arg6, &subroutine_arg16, &subroutine_arg16);
|
||||||
guMtxF2L(&subroutine_arg16, &gDisplayContext->matrixStack[gMatrixListPos]);
|
guMtxF2L(&subroutine_arg16, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
gSPMatrix(temp_s2++, &gDisplayContext->matrixStack[++gMatrixListPos], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
gSPMatrix(temp_s2++, &gDisplayContext->matrixStack[++gMatrixListPos], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
@ -1,46 +1,20 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
|
|
||||||
typedef struct struct802E7DE0 {
|
|
||||||
/* 0x000 */ s32 unk_000;
|
|
||||||
/* 0x004 */ s32 unk_004;
|
|
||||||
/* 0x008 */ u8* unk_008;
|
|
||||||
/* 0x00C */ s32 unk_00C;
|
|
||||||
/* 0x010 */ u8 unk_010[36];
|
|
||||||
/* 0x034 */ s8 unk_034[36];
|
|
||||||
/* 0x058 */ u8 unk_058[36];
|
|
||||||
/* 0x07C */ u8 unk_07C[36];
|
|
||||||
/* 0x0A0 */ u8 unk_0A0[36];
|
|
||||||
/* 0x0C4 */ f32 unk_0C4[36];
|
|
||||||
/* 0x154 */ f32 unk_154[36];
|
|
||||||
/* 0x1E4 */ f32 unk_1E4[36];
|
|
||||||
/* 0x274 */ f32 unk_274[36];
|
|
||||||
/* 0x304 */ f32 unk_304[36];
|
|
||||||
} struct802E7DE0;
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity/WoodenCrate", entity_WoodenCrate_init_fragments);
|
INCLUDE_ASM(s32, "entity/WoodenCrate", entity_WoodenCrate_init_fragments);
|
||||||
|
|
||||||
typedef struct struct802E7F40 {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ u16 unk_04;
|
|
||||||
/* 0x06 */ char unk_06[6];
|
|
||||||
/* 0x0C */ f32 unk_0C;
|
|
||||||
/* 0x10 */ char unk_10[4];
|
|
||||||
/* 0x14 */ s32 unk_14;
|
|
||||||
} struct802E7F40;
|
|
||||||
|
|
||||||
void entity_WoodenCrate_init(Entity* entity) {
|
void entity_WoodenCrate_init(Entity* entity) {
|
||||||
struct802E7F40* temp = entity->dataBuf.unk;
|
WoodenCrateData* data = entity->dataBuf.crate;
|
||||||
|
|
||||||
entity->scale.y = 0.85714287f;
|
entity->scale.y = 0.85714287f;
|
||||||
temp->unk_00 = CreateEntityVarArgBuffer[0];
|
data->itemID = CreateEntityVarArgBuffer[0];
|
||||||
temp->unk_04 = 0xFFFF;
|
data->globalFlagIndex = 0xFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
void entity_WoodenCrate_reset_fragments(Entity* entity) {
|
void entity_WoodenCrate_reset_fragments(Entity* entity) {
|
||||||
struct802E7F40* temp = entity->dataBuf.unk;
|
WoodenCrateData* data = entity->dataBuf.crate;
|
||||||
|
|
||||||
temp->unk_0C = entity->position.y;
|
data->basePosY = entity->position.y;
|
||||||
entity_WoodenCrate_init_fragments(entity, &D_0A004350, &D_0A0026F0);
|
entity_WoodenCrate_init_fragments(entity, &D_0A004350, &D_0A0026F0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,17 +24,17 @@ INCLUDE_ASM(s32, "entity/WoodenCrate", entity_WoodenCrate_setupGfx);
|
|||||||
|
|
||||||
s32 entity_WoodenCrate_idle(Entity* entity) {
|
s32 entity_WoodenCrate_idle(Entity* entity) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 phi_a0 = FALSE;
|
s32 shouldBreak = FALSE;
|
||||||
|
|
||||||
if (entity->collisionFlags & 1) {
|
if (entity->collisionFlags & 1) {
|
||||||
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|
||||||
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
|
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
|
||||||
set_action_state(ACTION_STATE_FALLING);
|
set_action_state(ACTION_STATE_FALLING);
|
||||||
phi_a0 = TRUE;
|
shouldBreak = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phi_a0) {
|
if (shouldBreak) {
|
||||||
entity_WoodenCrate_reset_fragments(entity);
|
entity_WoodenCrate_reset_fragments(entity);
|
||||||
entity_set_render_script(entity, &D_802EAE7C);
|
entity_set_render_script(entity, &D_802EAE7C);
|
||||||
entity_start_script(entity);
|
entity_start_script(entity);
|
||||||
@ -72,21 +46,21 @@ s32 entity_WoodenCrate_idle(Entity* entity) {
|
|||||||
f32 player_get_camera_facing_angle(void);
|
f32 player_get_camera_facing_angle(void);
|
||||||
|
|
||||||
void entity_WoodenCrate_shatter(Entity* entity, f32 arg1) {
|
void entity_WoodenCrate_shatter(Entity* entity, f32 arg1) {
|
||||||
struct802E7F40* temp = entity->dataBuf.unk;
|
WoodenCrateData* data = entity->dataBuf.crate;
|
||||||
|
|
||||||
if (temp->unk_00 != -1) {
|
if (data->itemID != -1) {
|
||||||
s32 flag = FALSE;
|
s32 flag = FALSE;
|
||||||
|
|
||||||
// can't do || here, or gcc realizes it can reuse the temp->unk_04 load
|
// can't do || here, or gcc realizes it can reuse the temp->unk_04 load
|
||||||
if (temp->unk_04 == 0xFFFF) {
|
if (data->globalFlagIndex == 0xFFFF) {
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
} else if (!get_global_flag(temp->unk_04)) {
|
} else if (!get_global_flag(data->globalFlagIndex)) {
|
||||||
flag = TRUE;
|
flag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flag) {
|
if (flag) {
|
||||||
make_item_entity(temp->unk_00, entity->position.x, entity->position.y + 33.0, entity->position.z, 0xA, 0,
|
make_item_entity(data->itemID, entity->position.x, entity->position.y + 33.0, entity->position.z, 0xA, 0,
|
||||||
player_get_camera_facing_angle(), temp->unk_04);
|
player_get_camera_facing_angle(), data->globalFlagIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -263,23 +263,23 @@ ApiStatus ShakeCam(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void exec_ShakeCam1(s32 arg0, s32 arg1, s32 arg2) {
|
void exec_ShakeCam1(s32 camID, s32 mode, s32 duration) {
|
||||||
Evt* script;
|
Evt* script;
|
||||||
|
|
||||||
script = start_script_in_group(&ShakeCam1, 1, 0, 4);
|
script = start_script_in_group(&ShakeCam1, 1, 0, 4);
|
||||||
script->varTable[0] = arg0;
|
script->varTable[0] = camID;
|
||||||
script->varTable[1] = arg1;
|
script->varTable[1] = mode;
|
||||||
script->varTable[2] = arg2;
|
script->varTable[2] = duration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3) {
|
void exec_ShakeCamX(s32 camID, s32 mode, s32 duration, f32 magnitude) {
|
||||||
Evt* script;
|
Evt* script;
|
||||||
|
|
||||||
script = start_script_in_group(&ShakeCamX, 1, 0, 4);
|
script = start_script_in_group(&ShakeCamX, 1, 0, 4);
|
||||||
evt_set_variable(script, EVT_VAR(0), arg0);
|
evt_set_variable(script, EVT_VAR(0), camID);
|
||||||
evt_set_variable(script, EVT_VAR(1), arg1);
|
evt_set_variable(script, EVT_VAR(1), mode);
|
||||||
evt_set_variable(script, EVT_VAR(2), arg2);
|
evt_set_variable(script, EVT_VAR(2), duration);
|
||||||
evt_set_float_variable(script, EVT_VAR(3), arg3);
|
evt_set_float_variable(script, EVT_VAR(3), magnitude);
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) {
|
ApiStatus SetCamLeadPlayer(Evt* script, s32 isInitialCall) {
|
||||||
|
@ -394,7 +394,7 @@ ApiStatus DropItemEntity(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus DropItemEntityB(Evt* script, s32 isInitialCall) {
|
ApiStatus DropTinyItemEntity(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 itemID = evt_get_variable(script, *args++);
|
s32 itemID = evt_get_variable(script, *args++);
|
||||||
s32 x = evt_get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
@ -404,7 +404,7 @@ ApiStatus DropItemEntityB(Evt* script, s32 isInitialCall) {
|
|||||||
s32 pickupVar = evt_get_variable_index(script, *args++);
|
s32 pickupVar = evt_get_variable_index(script, *args++);
|
||||||
|
|
||||||
script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z, itemSpawnMode, pickupVar);
|
script->varTable[0] = make_item_entity_nodelay(itemID, x, y, z, itemSpawnMode, pickupVar);
|
||||||
set_item_entity_flags(script->varTable[0], 0x4000);
|
set_item_entity_flags(script->varTable[0], ITEM_ENTITY_FLAGS_TINY);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ typedef struct HudCacheEntry {
|
|||||||
/* 0x04 */ u8* data;
|
/* 0x04 */ u8* data;
|
||||||
} HudCacheEntry; // size = 0x08;
|
} HudCacheEntry; // size = 0x08;
|
||||||
|
|
||||||
u8* gHudElementCacheNonWorld = NULL;
|
u8* gHudElementAuxCache = NULL;
|
||||||
s32 gHudElementCacheCapacity = 0x11000;
|
s32 gHudElementCacheCapacity = 0x11000;
|
||||||
|
|
||||||
HudScript hud_element_defaultAnim = {
|
HudScript hud_element_defaultAnim = {
|
||||||
@ -126,7 +126,7 @@ extern u8* gHudElementCacheBuffer;
|
|||||||
s32 fold_appendGfx_component(s32 idx, FoldImageRecPart* image, u32 flagBits, Matrix4f mtx);
|
s32 fold_appendGfx_component(s32 idx, FoldImageRecPart* image, u32 flagBits, Matrix4f mtx);
|
||||||
void func_801413F8(void);
|
void func_801413F8(void);
|
||||||
|
|
||||||
void load_hud_element(HudElement* hudElement, const HudScript* anim) {
|
void hud_element_load_script(HudElement* hudElement, const HudScript* anim) {
|
||||||
s32* pos = (s32*)anim;
|
s32* pos = (s32*)anim;
|
||||||
s32 raster;
|
s32 raster;
|
||||||
s32 palette;
|
s32 palette;
|
||||||
@ -263,7 +263,7 @@ void load_hud_element(HudElement* hudElement, const HudScript* anim) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s16 drawSizeX, s16 drawSizeY,
|
void hud_element_draw_rect(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s16 drawSizeX, s16 drawSizeY,
|
||||||
s16 offsetX, s16 offsetY, s32 clamp, s32 dropShadow) {
|
s16 offsetX, s16 offsetY, s32 clamp, s32 dropShadow) {
|
||||||
u32 isFmtCI4;
|
u32 isFmtCI4;
|
||||||
u32 isFmtIA8;
|
u32 isFmtIA8;
|
||||||
@ -391,7 +391,7 @@ void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_8000) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_FILTER_TEX) {
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE);
|
gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE);
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
||||||
@ -586,7 +586,7 @@ void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_8000) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_FILTER_TEX) {
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, 0, texStartX * 32 + 16, texStartY * 32 + 16, widthScale, heightScale);
|
gSPScisTextureRectangle(gMasterGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, 0, texStartX * 32 + 16, texStartY * 32 + 16, widthScale, heightScale);
|
||||||
} else {
|
} else {
|
||||||
gSPScisTextureRectangle(gMasterGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, 0, texStartX * 32, texStartY * 32, widthScale, heightScale);
|
gSPScisTextureRectangle(gMasterGfxPos++, ulx * 4, uly * 4, lrx * 4, lry * 4, 0, texStartX * 32, texStartY * 32, widthScale, heightScale);
|
||||||
@ -609,7 +609,7 @@ void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s
|
|||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear_hud_element_cache(void) {
|
void hud_element_clear_cache(void) {
|
||||||
s32 i;
|
s32 i;
|
||||||
HudCacheEntry* entryRaster;
|
HudCacheEntry* entryRaster;
|
||||||
HudCacheEntry* entryPalette;
|
HudCacheEntry* entryPalette;
|
||||||
@ -638,11 +638,11 @@ void clear_hud_element_cache(void) {
|
|||||||
entryPalette[i].id = -1;
|
entryPalette[i].id = -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gHudElementCacheNonWorld == NULL) {
|
if (gHudElementAuxCache == NULL) {
|
||||||
gHudElementCacheBuffer = general_heap_malloc(gHudElementCacheCapacity / 2);
|
gHudElementCacheBuffer = general_heap_malloc(gHudElementCacheCapacity / 2);
|
||||||
ASSERT(gHudElementCacheBuffer);
|
ASSERT(gHudElementCacheBuffer);
|
||||||
} else {
|
} else {
|
||||||
gHudElementCacheBuffer = gHudElementCacheNonWorld;
|
gHudElementCacheBuffer = gHudElementAuxCache;
|
||||||
}
|
}
|
||||||
gHudElementCacheBufferBattle = gHudElementCacheBuffer;
|
gHudElementCacheBufferBattle = gHudElementCacheBuffer;
|
||||||
*gHudElementCacheSize = 0;
|
*gHudElementCacheSize = 0;
|
||||||
@ -707,7 +707,7 @@ void func_801413F8(void) {
|
|||||||
gCameras[CAM_CAM3].flags &= ~0x6;
|
gCameras[CAM_CAM3].flags &= ~0x6;
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 create_hud_element(const HudScript* anim) {
|
s32 hud_element_create(const HudScript* anim) {
|
||||||
HudElement* hudElement;
|
HudElement* hudElement;
|
||||||
s32 id;
|
s32 id;
|
||||||
|
|
||||||
@ -751,10 +751,10 @@ s32 create_hud_element(const HudScript* anim) {
|
|||||||
|
|
||||||
if (gGameStatusPtr->isBattle) {
|
if (gGameStatusPtr->isBattle) {
|
||||||
hudElement->flags |= HUD_ELEMENT_FLAGS_BATTLE;
|
hudElement->flags |= HUD_ELEMENT_FLAGS_BATTLE;
|
||||||
id |= 0x800;
|
id |= HUD_ELEMENT_BATTLE_ID_MASK;
|
||||||
}
|
}
|
||||||
|
|
||||||
load_hud_element(hudElement, hudElement->readPos);
|
hud_element_load_script(hudElement, hudElement->readPos);
|
||||||
while (hud_element_update(hudElement) != 0);
|
while (hud_element_update(hudElement) != 0);
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
@ -769,7 +769,7 @@ void update_hud_elements(void) {
|
|||||||
|
|
||||||
if (elem != NULL && elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) {
|
if (elem != NULL && elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) {
|
||||||
if (elem->flags & HUD_ELEMENT_FLAGS_DELETE) {
|
if (elem->flags & HUD_ELEMENT_FLAGS_DELETE) {
|
||||||
free_hud_element(i);
|
hud_element_free(i);
|
||||||
i++;
|
i++;
|
||||||
} else if (elem->readPos != NULL) {
|
} else if (elem->readPos != NULL) {
|
||||||
elem->updateTimer--;
|
elem->updateTimer--;
|
||||||
@ -1143,7 +1143,7 @@ s32 hud_element_update(HudElement* hudElement) {
|
|||||||
s1 = *nextPos++;
|
s1 = *nextPos++;
|
||||||
newReadPos = (HudScript*)nextPos[rand_int(s1 - 1)];
|
newReadPos = (HudScript*)nextPos[rand_int(s1 - 1)];
|
||||||
hudElement->readPos = newReadPos;
|
hudElement->readPos = newReadPos;
|
||||||
load_hud_element(hudElement, newReadPos);
|
hud_element_load_script(hudElement, newReadPos);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
case HUD_ELEMENT_OP_PlaySound:
|
case HUD_ELEMENT_OP_PlaySound:
|
||||||
arg2 = *nextPos++;
|
arg2 = *nextPos++;
|
||||||
@ -1249,15 +1249,15 @@ void render_hud_elements_backUI(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(hudElement->flags & HUD_ELEMENT_FLAGS_REPEATED)) {
|
if (!(hudElement->flags & HUD_ELEMENT_FLAGS_REPEATED)) {
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
|
||||||
} else {
|
} else {
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f32 xScaled, yScaled;
|
f32 xScaled, yScaled;
|
||||||
@ -1285,10 +1285,10 @@ void render_hud_elements_backUI(void) {
|
|||||||
hudElement->widthScale = X10(xScaled);
|
hudElement->widthScale = X10(xScaled);
|
||||||
hudElement->heightScale = X10(yScaled);
|
hudElement->heightScale = X10(yScaled);
|
||||||
|
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1364,15 +1364,15 @@ void render_hud_elements_frontUI(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(hudElement->flags & HUD_ELEMENT_FLAGS_REPEATED)) {
|
if (!(hudElement->flags & HUD_ELEMENT_FLAGS_REPEATED)) {
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
|
||||||
} else {
|
} else {
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f32 xScaled, yScaled;
|
f32 xScaled, yScaled;
|
||||||
@ -1400,10 +1400,10 @@ void render_hud_elements_frontUI(void) {
|
|||||||
hudElement->widthScale = X10(xScaled);
|
hudElement->widthScale = X10(xScaled);
|
||||||
hudElement->heightScale = X10(yScaled);
|
hudElement->heightScale = X10(yScaled);
|
||||||
|
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
hud_element_draw_rect(hudElement, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1435,7 +1435,7 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
s32 ulx, uly, lrx, lry;
|
s32 ulx, uly, lrx, lry;
|
||||||
Vtx* vtx;
|
Vtx* vtx;
|
||||||
|
|
||||||
if (hudElement->flags & HUD_ELEMENT_FLAGS_8000) {
|
if (hudElement->flags & HUD_ELEMENT_FLAGS_FILTER_TEX) {
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE);
|
gDPSetTextureFilter(gMasterGfxPos++, G_TF_AVERAGE);
|
||||||
} else {
|
} else {
|
||||||
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
gDPSetTextureFilter(gMasterGfxPos++, G_TF_POINT);
|
||||||
@ -1610,7 +1610,6 @@ void render_hud_element(HudElement* hudElement) {
|
|||||||
INCLUDE_ASM(void, "hud_element", render_hud_element, HudElement* hudElement);
|
INCLUDE_ASM(void, "hud_element", render_hud_element, HudElement* hudElement);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void render_hud_elements_world(void) {
|
void render_hud_elements_world(void) {
|
||||||
s32 i, count, j;
|
s32 i, count, j;
|
||||||
s32 sortedElements[ARRAY_COUNT(*gHudElements)];
|
s32 sortedElements[ARRAY_COUNT(*gHudElements)];
|
||||||
@ -1783,7 +1782,7 @@ void func_80143C48(s32 elemID, s32 arg1, s32 camID) {
|
|||||||
if (elemID >= 0) {
|
if (elemID >= 0) {
|
||||||
HudElement* elem;
|
HudElement* elem;
|
||||||
|
|
||||||
elemID &= ~0x800;
|
elemID &= ~HUD_ELEMENT_BATTLE_ID_MASK;
|
||||||
elem = (*gHudElements)[elemID];
|
elem = (*gHudElements)[elemID];
|
||||||
|
|
||||||
if (elem != NULL) {
|
if (elem != NULL) {
|
||||||
@ -1816,8 +1815,8 @@ void func_80144278(s32 arg0) {
|
|||||||
func_80143C48(arg0, 0, CAM_BATTLE);
|
func_80143C48(arg0, 0, CAM_BATTLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_hud_element(s32 id, s32 clipMode) {
|
void draw_hud_element_internal(s32 id, s32 clipMode) {
|
||||||
HudElement* elem = (*gHudElements)[id & ~0x800];
|
HudElement* elem = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
s32 texSizeX, texSizeY;
|
s32 texSizeX, texSizeY;
|
||||||
s32 drawSizeX, drawSizeY;
|
s32 drawSizeX, drawSizeY;
|
||||||
s32 offsetX, offsetY;
|
s32 offsetX, offsetY;
|
||||||
@ -1825,9 +1824,9 @@ void draw_hud_element(s32 id, s32 clipMode) {
|
|||||||
|
|
||||||
if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) {
|
if (elem->flags && !(elem->flags & HUD_ELEMENT_FLAGS_DISABLED)) {
|
||||||
if (!(elem->flags & (HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000)) && (elem->drawSizePreset >= 0)) {
|
if (!(elem->flags & (HUD_ELEMENT_FLAGS_200000 | HUD_ELEMENT_FLAGS_10000000)) && (elem->drawSizePreset >= 0)) {
|
||||||
if (clipMode != 1) {
|
if (clipMode != HUD_ELEMENT_DRAW_NEXT) {
|
||||||
if (clipMode == 0) {
|
if (clipMode == HUD_ELEMENT_DRAW_FIRST_WITH_CLIPPING) {
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, 308, 220);
|
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 12, 20, SCREEN_WIDTH - 12, SCREEN_HEIGHT - 20);
|
||||||
}
|
}
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
|
||||||
@ -1872,15 +1871,15 @@ void draw_hud_element(s32 id, s32 clipMode) {
|
|||||||
} while (0); // required to match
|
} while (0); // required to match
|
||||||
|
|
||||||
if (!(elem->flags & HUD_ELEMENT_FLAGS_REPEATED)) {
|
if (!(elem->flags & HUD_ELEMENT_FLAGS_REPEATED)) {
|
||||||
if (elem->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (elem->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
|
hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
|
hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, TRUE, FALSE);
|
||||||
} else {
|
} else {
|
||||||
if (elem->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (elem->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f32 xScaled, yScaled;
|
f32 xScaled, yScaled;
|
||||||
@ -1909,29 +1908,29 @@ void draw_hud_element(s32 id, s32 clipMode) {
|
|||||||
elem->widthScale = X10(xScaled);
|
elem->widthScale = X10(xScaled);
|
||||||
elem->heightScale = X10(yScaled);
|
elem->heightScale = X10(yScaled);
|
||||||
|
|
||||||
if (elem->flags & HUD_ELEMENT_FLAGS_SHADOW) {
|
if (elem->flags & HUD_ELEMENT_FLAGS_DROP_SHADOW) {
|
||||||
draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
draw_rect_hud_element(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
hud_element_draw_rect(elem, texSizeX, texSizeY, drawSizeX, drawSizeY, offsetX, offsetY, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_hud_element_clipped(s32 id) {
|
void hud_element_draw_clipped(s32 id) {
|
||||||
draw_hud_element(id, 0);
|
draw_hud_element_internal(id, HUD_ELEMENT_DRAW_FIRST_WITH_CLIPPING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_hud_element_2(s32 id) {
|
void hud_element_draw_next(s32 id) {
|
||||||
draw_hud_element(id, 1);
|
draw_hud_element_internal(id, HUD_ELEMENT_DRAW_NEXT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_hud_element_3(s32 id) {
|
void hud_element_draw_without_clipping(s32 id) {
|
||||||
draw_hud_element(id, 2);
|
draw_hud_element_internal(id, HUD_ELEMENT_DRAW_FIRST_WITHOUT_CLIPPING);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_anim(s32 id, const HudScript* anim) {
|
void hud_element_set_script(s32 id, const HudScript* anim) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
if (anim == NULL) {
|
if (anim == NULL) {
|
||||||
anim = &hud_element_defaultAnim;
|
anim = &hud_element_defaultAnim;
|
||||||
@ -1950,53 +1949,53 @@ void set_hud_element_anim(s32 id, const HudScript* anim) {
|
|||||||
hudElement->flags &= ~HUD_ELEMENT_FLAGS_ANIMATION_FINISHED;
|
hudElement->flags &= ~HUD_ELEMENT_FLAGS_ANIMATION_FINISHED;
|
||||||
hudElement->uniformScale = 1.0f;
|
hudElement->uniformScale = 1.0f;
|
||||||
hudElement->flags &= ~(HUD_ELEMENT_FLAGS_SCALED | HUD_ELEMENT_FLAGS_TRANSPARENT | HUD_ELEMENT_FLAGS_FIXEDSCALE | HUD_ELEMENT_FLAGS_REPEATED);
|
hudElement->flags &= ~(HUD_ELEMENT_FLAGS_SCALED | HUD_ELEMENT_FLAGS_TRANSPARENT | HUD_ELEMENT_FLAGS_FIXEDSCALE | HUD_ELEMENT_FLAGS_REPEATED);
|
||||||
load_hud_element(hudElement, anim);
|
hud_element_load_script(hudElement, anim);
|
||||||
|
|
||||||
while (hud_element_update(hudElement) != 0) {}
|
while (hud_element_update(hudElement) != 0) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
HudScript* get_hud_element_anim(s32 id) {
|
HudScript* hud_element_get_script(s32 id) {
|
||||||
return (*gHudElements)[id & ~0x800]->anim;
|
return (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]->anim;
|
||||||
}
|
}
|
||||||
|
|
||||||
HudElement* get_hud_element(s32 id) {
|
HudElement* get_hud_element(s32 id) {
|
||||||
return (*gHudElements)[id & ~0x800];
|
return (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_hud_element(s32 id) {
|
void hud_element_free(s32 id) {
|
||||||
if ((*gHudElements)[id & ~0x800]->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
if ((*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
||||||
free_hud_element_transform(id & ~0x800);
|
hud_element_free_transform(id & ~HUD_ELEMENT_BATTLE_ID_MASK);
|
||||||
}
|
}
|
||||||
|
|
||||||
heap_free((*gHudElements)[id & ~0x800]);
|
heap_free((*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]);
|
||||||
(*gHudElements)[id & ~0x800] = NULL;
|
(*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK] = NULL;
|
||||||
gHudElementsNumber--;
|
gHudElementsNumber--;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_render_pos(s32 id, s32 x, s32 y) {
|
void hud_element_set_render_pos(s32 id, s32 x, s32 y) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
hudElement->renderPosX = x;
|
hudElement->renderPosX = x;
|
||||||
hudElement->renderPosY = y;
|
hudElement->renderPosY = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
void get_hud_element_render_pos(s32 id, s32* x, s32* y) {
|
void hud_element_get_render_pos(s32 id, s32* x, s32* y) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
*x = hudElement->renderPosX;
|
*x = hudElement->renderPosX;
|
||||||
*y = hudElement->renderPosY;
|
*y = hudElement->renderPosY;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_render_depth(s32 id, s32 z) {
|
void hud_element_set_render_depth(s32 id, s32 z) {
|
||||||
(*gHudElements)[id & ~0x800]->worldPosOffset.z = z;
|
(*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]->worldPosOffset.z = z;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_flags(s32 id, s32 flags) {
|
void hud_element_set_flags(s32 id, s32 flags) {
|
||||||
(*gHudElements)[id & ~0x800]->flags |= flags;
|
(*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]->flags |= flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear_hud_element_flags(s32 id, s32 flags) {
|
void hud_element_clear_flags(s32 id, s32 flags) {
|
||||||
(*gHudElements)[id & ~0x800]->flags &= ~flags;
|
(*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]->flags &= ~flags;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ALT_clear_hud_element_cache(void) {
|
void ALT_clear_hud_element_cache(void) {
|
||||||
@ -2018,12 +2017,12 @@ void ALT_clear_hud_element_cache(void) {
|
|||||||
gHudElementCacheTablePaletteWorld[i].id = -1;
|
gHudElementCacheTablePaletteWorld[i].id = -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (gHudElementCacheNonWorld == NULL) {
|
if (gHudElementAuxCache == NULL) {
|
||||||
heap_free(gHudElementCacheBuffer);
|
heap_free(gHudElementCacheBuffer);
|
||||||
gHudElementCacheBuffer = heap_malloc(gHudElementCacheCapacity / 2);
|
gHudElementCacheBuffer = heap_malloc(gHudElementCacheCapacity / 2);
|
||||||
ASSERT(gHudElementCacheBuffer);
|
ASSERT(gHudElementCacheBuffer);
|
||||||
} else {
|
} else {
|
||||||
gHudElementCacheBuffer = gHudElementCacheNonWorld;
|
gHudElementCacheBuffer = gHudElementAuxCache;
|
||||||
}
|
}
|
||||||
gHudElementCacheBufferBattle = gHudElementCacheBuffer;
|
gHudElementCacheBufferBattle = gHudElementCacheBuffer;
|
||||||
*gHudElementCacheSize = 0;
|
*gHudElementCacheSize = 0;
|
||||||
@ -2039,8 +2038,8 @@ void ALT_clear_hud_element_cache(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_scale(s32 index, f32 scale) {
|
void hud_element_set_scale(s32 index, f32 scale) {
|
||||||
HudElement* elem = (*gHudElements)[index & ~0x800];
|
HudElement* elem = (*gHudElements)[index & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
s32 drawSizeX;
|
s32 drawSizeX;
|
||||||
s32 drawSizeY;
|
s32 drawSizeY;
|
||||||
s32 imgSizeX;
|
s32 imgSizeX;
|
||||||
@ -2074,8 +2073,8 @@ void set_hud_element_scale(s32 index, f32 scale) {
|
|||||||
elem->heightScale = X10(yScaled);
|
elem->heightScale = X10(yScaled);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_size_preset(s32 id, s8 sizePreset) {
|
void hud_element_use_preset_size(s32 id, s8 sizePreset) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
hudElement->widthScale = X10(1.0f);
|
hudElement->widthScale = X10(1.0f);
|
||||||
hudElement->heightScale = X10(1.0f);
|
hudElement->heightScale = X10(1.0f);
|
||||||
@ -2087,18 +2086,18 @@ void set_hud_element_size_preset(s32 id, s8 sizePreset) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
s32 func_80144E4C(s32 id) {
|
s32 func_80144E4C(s32 id) {
|
||||||
return ((*gHudElements)[id & ~0x800]->flags >> 24) & 0xF;
|
return ((*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK]->flags >> 24) & 0xF;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80144E74(s32 id, s32 arg1) {
|
void func_80144E74(s32 id, s32 arg1) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
hudElement->flags &= ~(HUD_ELEMENT_FLAGS_1000000 | HUD_ELEMENT_FLAGS_2000000 | HUD_ELEMENT_FLAGS_4000000 | HUD_ELEMENT_FLAGS_8000000);
|
hudElement->flags &= ~(HUD_ELEMENT_FLAGS_1000000 | HUD_ELEMENT_FLAGS_2000000 | HUD_ELEMENT_FLAGS_4000000 | HUD_ELEMENT_FLAGS_8000000);
|
||||||
hudElement->flags |= arg1 << 24;
|
hudElement->flags |= arg1 << 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_alpha(s32 id, s32 opacity) {
|
void hud_element_set_alpha(s32 id, s32 opacity) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
hudElement->flags |= HUD_ELEMENT_FLAGS_TRANSPARENT;
|
hudElement->flags |= HUD_ELEMENT_FLAGS_TRANSPARENT;
|
||||||
hudElement->opacity = opacity;
|
hudElement->opacity = opacity;
|
||||||
@ -2108,16 +2107,16 @@ void set_hud_element_alpha(s32 id, s32 opacity) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_tint(s32 id, s32 r, s32 g, s32 b) {
|
void hud_element_set_tint(s32 id, s32 r, s32 g, s32 b) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
|
|
||||||
hudElement->tint.r = r;
|
hudElement->tint.r = r;
|
||||||
hudElement->tint.g = g;
|
hudElement->tint.g = g;
|
||||||
hudElement->tint.b = b;
|
hudElement->tint.b = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_hud_element_transform_A(s32 id) {
|
void hud_element_create_transform_A(s32 id) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = general_heap_malloc(sizeof(HudTransform));
|
HudTransform* transform = general_heap_malloc(sizeof(HudTransform));
|
||||||
|
|
||||||
element->hudTransform = transform;
|
element->hudTransform = transform;
|
||||||
@ -2138,8 +2137,8 @@ void create_hud_element_transform_A(s32 id) {
|
|||||||
func_801413F8();
|
func_801413F8();
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_hud_element_transform_B(s32 id) {
|
void hud_element_create_transform_B(s32 id) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = general_heap_malloc(sizeof(HudTransform));
|
HudTransform* transform = general_heap_malloc(sizeof(HudTransform));
|
||||||
|
|
||||||
element->hudTransform = transform;
|
element->hudTransform = transform;
|
||||||
@ -2158,8 +2157,8 @@ void create_hud_element_transform_B(s32 id) {
|
|||||||
func_801413F8();
|
func_801413F8();
|
||||||
}
|
}
|
||||||
|
|
||||||
void create_hud_element_transform_C(s32 id) {
|
void hud_element_create_transform_C(s32 id) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = general_heap_malloc(sizeof(HudTransform));
|
HudTransform* transform = general_heap_malloc(sizeof(HudTransform));
|
||||||
|
|
||||||
element->hudTransform = transform;
|
element->hudTransform = transform;
|
||||||
@ -2178,8 +2177,8 @@ void create_hud_element_transform_C(s32 id) {
|
|||||||
func_801413F8();
|
func_801413F8();
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_hud_element_transform(s32 id) {
|
void hud_element_free_transform(s32 id) {
|
||||||
HudElement* hudElement = (*gHudElements)[id & ~0x800];
|
HudElement* hudElement = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* hudTransform = hudElement->hudTransform;
|
HudTransform* hudTransform = hudElement->hudTransform;
|
||||||
|
|
||||||
if (!(hudElement->flags & HUD_ELEMENT_FLAGS_NO_FOLD)) {
|
if (!(hudElement->flags & HUD_ELEMENT_FLAGS_NO_FOLD)) {
|
||||||
@ -2191,8 +2190,8 @@ void free_hud_element_transform(s32 id) {
|
|||||||
hudElement->flags &= ~(HUD_ELEMENT_FLAGS_40000000 | HUD_ELEMENT_FLAGS_NO_FOLD | HUD_ELEMENT_FLAGS_TRANSFORM);
|
hudElement->flags &= ~(HUD_ELEMENT_FLAGS_40000000 | HUD_ELEMENT_FLAGS_NO_FOLD | HUD_ELEMENT_FLAGS_TRANSFORM);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_transform_pos(s32 id, f32 x, f32 y, f32 z) {
|
void hud_element_set_transform_pos(s32 id, f32 x, f32 y, f32 z) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = element->hudTransform;
|
HudTransform* transform = element->hudTransform;
|
||||||
|
|
||||||
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
||||||
@ -2202,8 +2201,8 @@ void set_hud_element_transform_pos(s32 id, f32 x, f32 y, f32 z) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_transform_scale(s32 id, f32 x, f32 y, f32 z) {
|
void hud_element_set_transform_scale(s32 id, f32 x, f32 y, f32 z) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = element->hudTransform;
|
HudTransform* transform = element->hudTransform;
|
||||||
|
|
||||||
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
||||||
@ -2213,8 +2212,8 @@ void set_hud_element_transform_scale(s32 id, f32 x, f32 y, f32 z) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_transform_rotation(s32 id, f32 x, f32 y, f32 z) {
|
void hud_element_set_transform_rotation(s32 id, f32 x, f32 y, f32 z) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = element->hudTransform;
|
HudTransform* transform = element->hudTransform;
|
||||||
|
|
||||||
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
||||||
@ -2224,8 +2223,8 @@ void set_hud_element_transform_rotation(s32 id, f32 x, f32 y, f32 z) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_transform_rotation_pivot(s32 id, s32 dx, s32 dy) {
|
void hud_element_set_transform_rotation_pivot(s32 id, s32 dx, s32 dy) {
|
||||||
HudElement* element = (*gHudElements)[id & ~0x800];
|
HudElement* element = (*gHudElements)[id & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
HudTransform* transform = element->hudTransform;
|
HudTransform* transform = element->hudTransform;
|
||||||
|
|
||||||
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
if (element->flags & HUD_ELEMENT_FLAGS_TRANSFORM) {
|
||||||
@ -2235,11 +2234,11 @@ void set_hud_element_transform_rotation_pivot(s32 id, s32 dx, s32 dy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID) {
|
void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID) {
|
||||||
gHudElementsBattle[battleID & ~0x800] = gHudElementsWorld[worldID & ~0x800];
|
gHudElementsBattle[battleID & ~HUD_ELEMENT_BATTLE_ID_MASK] = gHudElementsWorld[worldID & ~HUD_ELEMENT_BATTLE_ID_MASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_hud_element_nonworld_cache(void* base, s32 size) {
|
void hud_element_set_aux_cache(void* base, s32 size) {
|
||||||
gHudElementCacheNonWorld = (u8*)base;
|
gHudElementAuxCache = (u8*)base;
|
||||||
if (base == NULL) {
|
if (base == NULL) {
|
||||||
gHudElementCacheCapacity = 0x11000;
|
gHudElementCacheCapacity = 0x11000;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
|
#define HUD_ELEMENT_BATTLE_ID_MASK 0x800
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
HUD_ELEMENT_OP_End,
|
HUD_ELEMENT_OP_End,
|
||||||
HUD_ELEMENT_OP_SetRGBA,
|
HUD_ELEMENT_OP_SetRGBA,
|
||||||
@ -78,7 +80,7 @@ enum HudElementFlags {
|
|||||||
HUD_ELEMENT_FLAGS_FLIPX = 0x00001000,
|
HUD_ELEMENT_FLAGS_FLIPX = 0x00001000,
|
||||||
HUD_ELEMENT_FLAGS_FLIPY = 0x00002000,
|
HUD_ELEMENT_FLAGS_FLIPY = 0x00002000,
|
||||||
HUD_ELEMENT_FLAGS_FMT_CI4 = 0x00004000,
|
HUD_ELEMENT_FLAGS_FMT_CI4 = 0x00004000,
|
||||||
HUD_ELEMENT_FLAGS_8000 = 0x00008000,
|
HUD_ELEMENT_FLAGS_FILTER_TEX = 0x00008000,
|
||||||
HUD_ELEMENT_FLAGS_TRANSFORM = 0x00010000,
|
HUD_ELEMENT_FLAGS_TRANSFORM = 0x00010000,
|
||||||
HUD_ELEMENT_FLAGS_NO_FOLD = 0x00020000,
|
HUD_ELEMENT_FLAGS_NO_FOLD = 0x00020000,
|
||||||
HUD_ELEMENT_FLAGS_DELETE = 0x00040000,
|
HUD_ELEMENT_FLAGS_DELETE = 0x00040000,
|
||||||
@ -92,11 +94,17 @@ enum HudElementFlags {
|
|||||||
HUD_ELEMENT_FLAGS_4000000 = 0x04000000,
|
HUD_ELEMENT_FLAGS_4000000 = 0x04000000,
|
||||||
HUD_ELEMENT_FLAGS_8000000 = 0x08000000,
|
HUD_ELEMENT_FLAGS_8000000 = 0x08000000,
|
||||||
HUD_ELEMENT_FLAGS_10000000 = 0x10000000,
|
HUD_ELEMENT_FLAGS_10000000 = 0x10000000,
|
||||||
HUD_ELEMENT_FLAGS_SHADOW = 0x20000000,
|
HUD_ELEMENT_FLAGS_DROP_SHADOW = 0x20000000,
|
||||||
HUD_ELEMENT_FLAGS_40000000 = 0x40000000,
|
HUD_ELEMENT_FLAGS_40000000 = 0x40000000,
|
||||||
HUD_ELEMENT_FLAGS_80000000 = 0x80000000,
|
HUD_ELEMENT_FLAGS_80000000 = 0x80000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
HUD_ELEMENT_DRAW_FIRST_WITH_CLIPPING = 0,
|
||||||
|
HUD_ELEMENT_DRAW_NEXT = 1,
|
||||||
|
HUD_ELEMENT_DRAW_FIRST_WITHOUT_CLIPPING = 2,
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct HudScriptPair {
|
typedef struct HudScriptPair {
|
||||||
/* 0x00 */ HudScript* enabled;
|
/* 0x00 */ HudScript* enabled;
|
||||||
/* 0x04 */ HudScript* disabled;
|
/* 0x04 */ HudScript* disabled;
|
||||||
@ -183,18 +191,18 @@ extern HudScript HudScript_MenuTimes[];
|
|||||||
#define he_PlaySound(arg0) HUD_ELEMENT_OP_PlaySound, arg0
|
#define he_PlaySound(arg0) HUD_ELEMENT_OP_PlaySound, arg0
|
||||||
#define he_SetPivot(arg0, arg1) HUD_ELEMENT_OP_SetPivot, arg0, arg1
|
#define he_SetPivot(arg0, arg1) HUD_ELEMENT_OP_SetPivot, arg0, arg1
|
||||||
|
|
||||||
void load_hud_element(HudElement* hudElement, const HudScript* anim);
|
void hud_element_load_script(HudElement* hudElement, const HudScript* anim);
|
||||||
|
|
||||||
/// @param clamp 0 = repeat; 1 = clamp
|
/// @param clamp 0 = repeat; 1 = clamp
|
||||||
/// @param dropShadow Whether to render a drop shadow or not
|
/// @param dropShadow Whether to render a drop shadow or not
|
||||||
void draw_rect_hud_element(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s16 drawSizeX, s16 drawSizeY, s16 offsetX, s16 offsetY, s32 clamp, s32 dropShadow);
|
void hud_element_draw_rect(HudElement* hudElement, s16 texSizeX, s16 texSizeY, s16 drawSizeX, s16 drawSizeY, s16 offsetX, s16 offsetY, s32 clamp, s32 dropShadow);
|
||||||
|
|
||||||
void clear_hud_element_cache(void);
|
void hud_element_clear_cache(void);
|
||||||
|
|
||||||
void init_hud_element_list(void);
|
void init_hud_element_list(void);
|
||||||
|
|
||||||
/// Creates a new HUD element and returns its ID.
|
/// Creates a new HUD element and returns its ID.
|
||||||
s32 create_hud_element(const HudScript* anim);
|
s32 hud_element_create(const HudScript* anim);
|
||||||
|
|
||||||
void update_hud_elements(void);
|
void update_hud_elements(void);
|
||||||
|
|
||||||
@ -215,65 +223,65 @@ void func_80144238(s32 arg0);
|
|||||||
void func_80144258(s32 arg0);
|
void func_80144258(s32 arg0);
|
||||||
void func_80144278(s32 arg0);
|
void func_80144278(s32 arg0);
|
||||||
|
|
||||||
void draw_hud_element(s32 id, s32 clipMode);
|
void draw_hud_element_internal(s32 id, s32 clipMode);
|
||||||
void draw_hud_element_clipped(s32 id);
|
void hud_element_draw_clipped(s32 id);
|
||||||
void draw_hud_element_2(s32 id);
|
void hud_element_draw_next(s32 id);
|
||||||
void draw_hud_element_3(s32 id);
|
void hud_element_draw_without_clipping(s32 id);
|
||||||
|
|
||||||
void set_hud_element_anim(s32 id, const HudScript* anim);
|
void hud_element_set_script(s32 id, const HudScript* anim);
|
||||||
|
|
||||||
HudScript* get_hud_element_anim(s32 id);
|
HudScript* hud_element_get_script(s32 id);
|
||||||
|
|
||||||
HudElement* get_hud_element(s32 id);
|
HudElement* get_hud_element(s32 id);
|
||||||
|
|
||||||
void free_hud_element(s32 id);
|
void hud_element_free(s32 id);
|
||||||
|
|
||||||
void set_hud_element_render_pos(s32 id, s32 x, s32 y);
|
void hud_element_set_render_pos(s32 id, s32 x, s32 y);
|
||||||
|
|
||||||
void get_hud_element_render_pos(s32 id, s32* x, s32* y);
|
void hud_element_get_render_pos(s32 id, s32* x, s32* y);
|
||||||
|
|
||||||
void set_hud_element_render_depth(s32 id, s32 z);
|
void hud_element_set_render_depth(s32 id, s32 z);
|
||||||
|
|
||||||
/// Turns on the given flags.
|
/// Turns on the given flags.
|
||||||
void set_hud_element_flags(s32 id, s32 flags);
|
void hud_element_set_flags(s32 id, s32 flags);
|
||||||
|
|
||||||
/// Turns off the given flags.
|
/// Turns off the given flags.
|
||||||
void clear_hud_element_flags(s32 id, s32 flags);
|
void hud_element_clear_flags(s32 id, s32 flags);
|
||||||
|
|
||||||
/// @see clear_hud_element_cache
|
/// @see hud_element_clear_cache
|
||||||
void ALT_clear_hud_element_cache(void);
|
void ALT_clear_hud_element_cache(void);
|
||||||
|
|
||||||
void set_hud_element_scale(s32 index, f32 scale);
|
void hud_element_set_scale(s32 index, f32 scale);
|
||||||
|
|
||||||
void set_hud_element_size_preset(s32 id, s8 size);
|
void hud_element_use_preset_size(s32 id, s8 size);
|
||||||
|
|
||||||
s32 func_80144E4C(s32 id);
|
s32 func_80144E4C(s32 id);
|
||||||
|
|
||||||
void func_80144E74(s32 id, s32 arg1);
|
void func_80144E74(s32 id, s32 arg1);
|
||||||
|
|
||||||
/// @param opacity 0 = invisible; 255 = opaque
|
/// @param opacity 0 = invisible; 255 = opaque
|
||||||
void set_hud_element_alpha(s32 id, s32 opacity);
|
void hud_element_set_alpha(s32 id, s32 opacity);
|
||||||
|
|
||||||
void set_hud_element_tint(s32 id, s32 r, s32 g, s32 b);
|
void hud_element_set_tint(s32 id, s32 r, s32 g, s32 b);
|
||||||
|
|
||||||
void create_hud_element_transform_A(s32 id);
|
void hud_element_create_transform_A(s32 id);
|
||||||
|
|
||||||
void create_hud_element_transform_B(s32 id);
|
void hud_element_create_transform_B(s32 id);
|
||||||
|
|
||||||
void create_hud_element_transform_C(s32 id);
|
void hud_element_create_transform_C(s32 id);
|
||||||
|
|
||||||
void free_hud_element_transform(s32 id);
|
void hud_element_free_transform(s32 id);
|
||||||
|
|
||||||
void set_hud_element_transform_pos(s32 id, f32 x, f32 y, f32 z);
|
void hud_element_set_transform_pos(s32 id, f32 x, f32 y, f32 z);
|
||||||
|
|
||||||
void set_hud_element_transform_scale(s32 id, f32 x, f32 y, f32 z);
|
void hud_element_set_transform_scale(s32 id, f32 x, f32 y, f32 z);
|
||||||
|
|
||||||
void set_hud_element_transform_rotation(s32 id, f32 x, f32 y, f32 z);
|
void hud_element_set_transform_rotation(s32 id, f32 x, f32 y, f32 z);
|
||||||
|
|
||||||
void set_hud_element_transform_rotation_pivot(s32 id, s32 dx, s32 dy);
|
void hud_element_set_transform_rotation_pivot(s32 id, s32 dx, s32 dy);
|
||||||
|
|
||||||
void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID);
|
void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID);
|
||||||
|
|
||||||
void set_hud_element_nonworld_cache(void* base, s32 size);
|
void hud_element_set_aux_cache(void* base, s32 size);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -282,7 +282,7 @@ void load_engine_data(void) {
|
|||||||
clear_printers();
|
clear_printers();
|
||||||
clear_game_modes();
|
clear_game_modes();
|
||||||
clear_npcs();
|
clear_npcs();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
clear_trigger_data();
|
clear_trigger_data();
|
||||||
clear_entity_data(0);
|
clear_entity_data(0);
|
||||||
clear_player_data();
|
clear_player_data();
|
||||||
|
@ -32,10 +32,10 @@ s32 npc_raycast_down(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32
|
|||||||
sy = *startY;
|
sy = *startY;
|
||||||
sz = *startZ;
|
sz = *startZ;
|
||||||
colliderID = test_ray_colliders(ignoreFlags, sx, sy, sz, 0.0f, -1.0f, 0.0f, &cHitX, &cHitY, &cHitZ, &cHitDepth, &cHitNx, &cHitNy, &cHitNz);
|
colliderID = test_ray_colliders(ignoreFlags, sx, sy, sz, 0.0f, -1.0f, 0.0f, &cHitX, &cHitY, &cHitZ, &cHitDepth, &cHitNx, &cHitNy, &cHitNz);
|
||||||
if ((ignoreFlags & 0x40000) == 0) {
|
if ((ignoreFlags & COLLISION_IGNORE_ENTITIES) == 0) {
|
||||||
entityID = test_ray_entities(*startX, *startY, *startZ, 0.0f, -1.0f, 0.0f, &eHitX, &eHitY, &eHitZ, &eHitDepth, &eHitNx, &eHitNy, &eHitNz);
|
entityID = test_ray_entities(*startX, *startY, *startZ, 0.0f, -1.0f, 0.0f, &eHitX, &eHitY, &eHitZ, &eHitDepth, &eHitNx, &eHitNy, &eHitNz);
|
||||||
if (entityID >= 0) {
|
if (entityID >= 0) {
|
||||||
colliderID = entityID | 0x4000;
|
colliderID = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
if (eHitDepth < cHitDepth) {
|
if (eHitDepth < cHitDepth) {
|
||||||
cHitDepth = eHitDepth;
|
cHitDepth = eHitDepth;
|
||||||
cHitX = eHitX;
|
cHitX = eHitX;
|
||||||
@ -297,9 +297,9 @@ s32 npc_raycast_up(s32 ignoreFlags, f32* startX, f32* startY, f32* startZ, f32*
|
|||||||
sz = *startZ;
|
sz = *startZ;
|
||||||
ret = test_ray_colliders(ignoreFlags, sx, sy, sz, 0.0f, 1.0f, 0.0f, &cHitX, &cHitY, &cHitZ, &cHitDepth, &cHitNx, &cHitNy, &cHitNz);
|
ret = test_ray_colliders(ignoreFlags, sx, sy, sz, 0.0f, 1.0f, 0.0f, &cHitX, &cHitY, &cHitZ, &cHitDepth, &cHitNx, &cHitNy, &cHitNz);
|
||||||
colliderID = ret;
|
colliderID = ret;
|
||||||
if ((ignoreFlags & 0x40000) == 0) {
|
if ((ignoreFlags & COLLISION_IGNORE_ENTITIES) == 0) {
|
||||||
entityID = test_ray_entities(sx, sy, sz, 0.0f, 1.0f, 0.0f, &eHitX, &eHitY, &eHitZ, &eHitDepth, &eHitNx, &eHitNy, &eHitNz);
|
entityID = test_ray_entities(sx, sy, sz, 0.0f, 1.0f, 0.0f, &eHitX, &eHitY, &eHitZ, &eHitDepth, &eHitNx, &eHitNy, &eHitNz);
|
||||||
ret = entityID | 0x4000;
|
ret = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
if (entityID >= 0) {
|
if (entityID >= 0) {
|
||||||
cHitDepth = eHitDepth;
|
cHitDepth = eHitDepth;
|
||||||
cHitX = eHitX;
|
cHitX = eHitX;
|
||||||
@ -361,7 +361,7 @@ s32 npc_raycast_up_corner(s32 ignoreFlags, f32* x, f32* y, f32* z, f32* length)
|
|||||||
sy = sy2;
|
sy = sy2;
|
||||||
sz = sz2;
|
sz = sz2;
|
||||||
if (entityID >= 0 && *length > hitDepth) {
|
if (entityID >= 0 && *length > hitDepth) {
|
||||||
ret = entityID | 0x4000;
|
ret = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
*length = hitDepth;
|
*length = hitDepth;
|
||||||
*x = sx;
|
*x = sx;
|
||||||
*y = sy;
|
*y = sy;
|
||||||
@ -446,23 +446,23 @@ s32 npc_raycast_general(s32 flags, f32 startX, f32 startY, f32 startZ, f32 dirX,
|
|||||||
s32 entityID;
|
s32 entityID;
|
||||||
|
|
||||||
ret = -1;
|
ret = -1;
|
||||||
if (flags & 0x100000) {
|
if (flags & COLLISION_ONLY_ENTITIES) {
|
||||||
entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx, hitNy,
|
entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx, hitNy,
|
||||||
hitNz);
|
hitNz);
|
||||||
if (entityID >= 0) {
|
if (entityID >= 0) {
|
||||||
ret = entityID | 0x4000;
|
ret = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
ret = test_ray_colliders(flags, startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx,
|
ret = test_ray_colliders(flags, startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx,
|
||||||
hitNy, hitNz);
|
hitNy, hitNz);
|
||||||
if (flags & 0x40000) {
|
if (flags & COLLISION_IGNORE_ENTITIES) {
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx,
|
entityID = test_ray_entities(startX, startY, startZ, dirX, dirY, dirZ, hitX, hitY, hitZ, outDepth, hitNx,
|
||||||
hitNy, hitNz);
|
hitNy, hitNz);
|
||||||
if (entityID >= 0) {
|
if (entityID >= 0) {
|
||||||
ret = entityID | 0x4000;
|
ret = entityID | COLLISION_WITH_ENTITY_BIT;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO required to match
|
// TODO required to match
|
||||||
|
@ -310,9 +310,9 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
|||||||
currentBadgeRow = gPauseBadgesSelectedIndex % currentPage->numCols;
|
currentBadgeRow = gPauseBadgesSelectedIndex % currentPage->numCols;
|
||||||
|
|
||||||
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_15, baseX + 84, baseY, 0, width - 84, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
draw_box(DRAW_FLAGS_CLIP, &gPauseWS_15, baseX + 84, baseY, 0, width - 84, height, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT, 0);
|
||||||
set_hud_element_render_pos(gPauseBadgesIconIDs[20], baseX + 241, baseY + 11);
|
hud_element_set_render_pos(gPauseBadgesIconIDs[20], baseX + 241, baseY + 11);
|
||||||
palette = 10;
|
palette = 10;
|
||||||
draw_hud_element_3(gPauseBadgesIconIDs[20]);
|
hud_element_draw_without_clipping(gPauseBadgesIconIDs[20]);
|
||||||
|
|
||||||
x1 = baseX + 1;
|
x1 = baseX + 1;
|
||||||
y1 = baseY + 14;
|
y1 = baseY + 14;
|
||||||
@ -436,31 +436,31 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
|||||||
|
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
badgeIconElement = iconIDs[badgeIndex];
|
badgeIconElement = iconIDs[badgeIndex];
|
||||||
clear_hud_element_flags(badgeIconElement, HUD_ELEMENT_FLAGS_SHADOW);
|
hud_element_clear_flags(badgeIconElement, HUD_ELEMENT_FLAGS_DROP_SHADOW);
|
||||||
set_hud_element_flags(badgeIconElement, HUD_ELEMENT_FLAGS_8000);
|
hud_element_set_flags(badgeIconElement, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
if (isNone) {
|
if (isNone) {
|
||||||
badgeIconElement = gPauseBadgesIconIDs[21];
|
badgeIconElement = gPauseBadgesIconIDs[21];
|
||||||
} else {
|
} else {
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
set_hud_element_flags(badgeIconElement, HUD_ELEMENT_FLAGS_SHADOW);
|
hud_element_set_flags(badgeIconElement, HUD_ELEMENT_FLAGS_DROP_SHADOW);
|
||||||
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[badgeID].iconID].enabled;
|
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[badgeID].iconID].enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isEquipped && cannotBeEquipped) {
|
if (!isEquipped && cannotBeEquipped) {
|
||||||
set_hud_element_anim(badgeIconElement, gItemHudScripts[gItemTable[badgeID].iconID].disabled);
|
hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].iconID].disabled);
|
||||||
} else {
|
} else {
|
||||||
set_hud_element_anim(badgeIconElement, gItemHudScripts[gItemTable[badgeID].iconID].enabled);
|
hud_element_set_script(badgeIconElement, gItemHudScripts[gItemTable[badgeID].iconID].enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_scale(badgeIconElement, 0.670816f);
|
hud_element_set_scale(badgeIconElement, 0.670816f);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(badgeIconElement, baseX + 107 + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX,
|
hud_element_set_render_pos(badgeIconElement, baseX + 107 + pause_badges_scroll_offset_x(posX) + badgeEntryOffsetX,
|
||||||
baseY + 23 + pause_badges_scroll_offset_y(posY) + badgeEntryOffsetY);
|
baseY + 23 + pause_badges_scroll_offset_y(posY) + badgeEntryOffsetY);
|
||||||
if (badgeIndex == 0) {
|
if (badgeIndex == 0) {
|
||||||
draw_hud_element_3(badgeIconElement);
|
hud_element_draw_without_clipping(badgeIconElement);
|
||||||
} else {
|
} else {
|
||||||
draw_hud_element_2(badgeIconElement);
|
hud_element_draw_next(badgeIconElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
badgeIndex++;
|
badgeIndex++;
|
||||||
@ -550,18 +550,18 @@ void pause_badges_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width
|
|||||||
|
|
||||||
if (gPauseMenuCurrentTab == 2 && gPauseBadgesLevel == 1) {
|
if (gPauseMenuCurrentTab == 2 && gPauseBadgesLevel == 1) {
|
||||||
if (gPauseBadgesCurrentPage > 0) {
|
if (gPauseBadgesCurrentPage > 0) {
|
||||||
set_hud_element_render_pos(gPauseBadgesIconIDs[17], baseX + 278, baseY + 14);
|
hud_element_set_render_pos(gPauseBadgesIconIDs[17], baseX + 278, baseY + 14);
|
||||||
draw_hud_element_3(gPauseBadgesIconIDs[17]);
|
hud_element_draw_without_clipping(gPauseBadgesIconIDs[17]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPauseBadgesPages[gPauseBadgesCurrentPage + 1].enabled) {
|
if (gPauseBadgesPages[gPauseBadgesCurrentPage + 1].enabled) {
|
||||||
set_hud_element_render_pos(gPauseBadgesIconIDs[18], baseX + 278, baseY + 146);
|
hud_element_set_render_pos(gPauseBadgesIconIDs[18], baseX + 278, baseY + 146);
|
||||||
draw_hud_element_3(gPauseBadgesIconIDs[18]);
|
hud_element_draw_without_clipping(gPauseBadgesIconIDs[18]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseBadgesIconIDs[16], baseX + 43, baseY + 81);
|
hud_element_set_render_pos(gPauseBadgesIconIDs[16], baseX + 43, baseY + 81);
|
||||||
draw_hud_element_3(gPauseBadgesIconIDs[16]);
|
hud_element_draw_without_clipping(gPauseBadgesIconIDs[16]);
|
||||||
draw_msg(pause_get_menu_msg(70), baseX + 16, baseY + 74, 255, 10, 1);
|
draw_msg(pause_get_menu_msg(70), baseX + 16, baseY + 74, 255, 10, 1);
|
||||||
draw_number(playerData->maxBP, baseX + 69, baseY + 74, 1, 10, 255, 3);
|
draw_number(playerData->maxBP, baseX + 69, baseY + 74, 1, 10, 255, 3);
|
||||||
bpAmount = playerData->maxBP - pause_get_total_equipped_bp_cost();
|
bpAmount = playerData->maxBP - pause_get_total_equipped_bp_cost();
|
||||||
@ -788,10 +788,10 @@ void pause_badges_init(MenuPanel* panel) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseBadgesIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseBadgesIconIDs); i++) {
|
||||||
s32 iconID = create_hud_element(gPauseBadgesElements[i]);
|
s32 iconID = hud_element_create(gPauseBadgesElements[i]);
|
||||||
|
|
||||||
gPauseBadgesIconIDs[i] = iconID;
|
gPauseBadgesIconIDs[i] = iconID;
|
||||||
set_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconID, HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseBadgesWindowBPs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseBadgesWindowBPs); i++) {
|
||||||
@ -989,6 +989,6 @@ void pause_badges_cleanup(MenuPanel* panel) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseBadgesIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseBadgesIconIDs); i++) {
|
||||||
free_hud_element(gPauseBadgesIconIDs[i]);
|
hud_element_free(gPauseBadgesIconIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -226,26 +226,26 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
|
|||||||
|
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
itemIcon = iconIDs[totalItemIndex];
|
itemIcon = iconIDs[totalItemIndex];
|
||||||
clear_hud_element_flags(itemIcon, HUD_ELEMENT_FLAGS_SHADOW);
|
hud_element_clear_flags(itemIcon, HUD_ELEMENT_FLAGS_DROP_SHADOW);
|
||||||
set_hud_element_flags(itemIcon, HUD_ELEMENT_FLAGS_8000);
|
hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
if (isNone) {
|
if (isNone) {
|
||||||
itemIcon = gPauseItemsIconIDs[19];
|
itemIcon = gPauseItemsIconIDs[19];
|
||||||
} else {
|
} else {
|
||||||
if (isSelected) {
|
if (isSelected) {
|
||||||
set_hud_element_flags(itemIcon, HUD_ELEMENT_FLAGS_SHADOW);
|
hud_element_set_flags(itemIcon, HUD_ELEMENT_FLAGS_DROP_SHADOW);
|
||||||
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].iconID].enabled;
|
gPauseCurrentDescIconScript = gItemHudScripts[gItemTable[itemID].iconID].enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_anim(itemIcon, gItemHudScripts[gItemTable[itemID].iconID].enabled);
|
hud_element_set_script(itemIcon, gItemHudScripts[gItemTable[itemID].iconID].enabled);
|
||||||
set_hud_element_scale(itemIcon, 0.670816f);
|
hud_element_set_scale(itemIcon, 0.670816f);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(itemIcon, baseX + 105 + pause_items_scroll_offset_x(posX) + itemOffsetX,
|
hud_element_set_render_pos(itemIcon, baseX + 105 + pause_items_scroll_offset_x(posX) + itemOffsetX,
|
||||||
baseY + 23 + pause_items_scroll_offset_y(posY) + itemOffsetY);
|
baseY + 23 + pause_items_scroll_offset_y(posY) + itemOffsetY);
|
||||||
if (totalItemIndex == 0) {
|
if (totalItemIndex == 0) {
|
||||||
draw_hud_element_3(itemIcon);
|
hud_element_draw_without_clipping(itemIcon);
|
||||||
} else {
|
} else {
|
||||||
draw_hud_element_2(itemIcon);
|
hud_element_draw_next(itemIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
totalItemIndex++;
|
totalItemIndex++;
|
||||||
@ -282,13 +282,13 @@ void pause_items_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
|
|||||||
|
|
||||||
if (gPauseMenuCurrentTab == 3 && gPauseItemsLevel == 1) {
|
if (gPauseMenuCurrentTab == 3 && gPauseItemsLevel == 1) {
|
||||||
if (gPauseItemsCurrentPage > 0) {
|
if (gPauseItemsCurrentPage > 0) {
|
||||||
set_hud_element_render_pos(gPauseItemsIconIDs[16], baseX + 278, baseY + 14);
|
hud_element_set_render_pos(gPauseItemsIconIDs[16], baseX + 278, baseY + 14);
|
||||||
draw_hud_element_3(gPauseItemsIconIDs[16]);
|
hud_element_draw_without_clipping(gPauseItemsIconIDs[16]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPauseItemsPages [gPauseItemsCurrentPage + 1].enabled) {
|
if (gPauseItemsPages [gPauseItemsCurrentPage + 1].enabled) {
|
||||||
set_hud_element_render_pos(gPauseItemsIconIDs[17], baseX + 278, baseY + 146);
|
hud_element_set_render_pos(gPauseItemsIconIDs[17], baseX + 278, baseY + 146);
|
||||||
draw_hud_element_3(gPauseItemsIconIDs[17]);
|
hud_element_draw_without_clipping(gPauseItemsIconIDs[17]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -430,8 +430,8 @@ void pause_items_init(MenuPanel* panel) {
|
|||||||
pause_items_load_items(FALSE);
|
pause_items_load_items(FALSE);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) {
|
||||||
gPauseItemsIconIDs[i] = create_hud_element(gPauseItemsElements[i]);
|
gPauseItemsIconIDs[i] = hud_element_create(gPauseItemsElements[i]);
|
||||||
set_hud_element_flags(gPauseItemsIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(gPauseItemsIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseItemsWindowBPs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseItemsWindowBPs); i++) {
|
||||||
@ -587,6 +587,6 @@ void pause_items_cleanup(MenuPanel* panel) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseItemsIconIDs); i++) {
|
||||||
free_hud_element(gPauseItemsIconIDs[i]);
|
hud_element_free(gPauseItemsIconIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -444,9 +444,9 @@ void pause_draw_cursor(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 hei
|
|||||||
if (currentOpacity > 255) {
|
if (currentOpacity > 255) {
|
||||||
currentOpacity = 255;
|
currentOpacity = 255;
|
||||||
}
|
}
|
||||||
set_hud_element_alpha(gPauseCommonIconIDs[0], currentOpacity);
|
hud_element_set_alpha(gPauseCommonIconIDs[0], currentOpacity);
|
||||||
set_hud_element_render_pos(gPauseCommonIconIDs[0], baseX + gPauseCursorPosX, baseY + gPauseCursorPosY);
|
hud_element_set_render_pos(gPauseCommonIconIDs[0], baseX + gPauseCursorPosX, baseY + gPauseCursorPosY);
|
||||||
draw_hud_element_3(gPauseCommonIconIDs[0]);
|
hud_element_draw_without_clipping(gPauseCommonIconIDs[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -460,13 +460,13 @@ void pause_textbox_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 widt
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (gPauseDescTextPos != 0) {
|
if (gPauseDescTextPos != 0) {
|
||||||
set_hud_element_render_pos(gPauseCommonIconIDs[1], baseX + width - 4, baseY + 4);
|
hud_element_set_render_pos(gPauseCommonIconIDs[1], baseX + width - 4, baseY + 4);
|
||||||
draw_hud_element_3(gPauseCommonIconIDs[1]);
|
hud_element_draw_without_clipping(gPauseCommonIconIDs[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (gPauseDescTextPos < gPauseDescTextMaxPos) {
|
if (gPauseDescTextPos < gPauseDescTextMaxPos) {
|
||||||
set_hud_element_render_pos(gPauseCommonIconIDs[2], baseX + width - 4, baseY + height - 4);
|
hud_element_set_render_pos(gPauseCommonIconIDs[2], baseX + width - 4, baseY + height - 4);
|
||||||
draw_hud_element_3(gPauseCommonIconIDs[2]);
|
hud_element_draw_without_clipping(gPauseCommonIconIDs[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
gDPPipeSync(gMasterGfxPos++);
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
@ -474,12 +474,12 @@ void pause_textbox_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 widt
|
|||||||
draw_msg(msgID, baseX + 10, baseY - gPauseDescTextOffset, 255, 10, 0);
|
draw_msg(msgID, baseX + 10, baseY - gPauseDescTextOffset, 255, 10, 0);
|
||||||
if (gPauseShownDescIconScript != 0) {
|
if (gPauseShownDescIconScript != 0) {
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
|
||||||
set_hud_element_render_pos(gPauseCommonIconIDs[3], baseX - 4, baseY + 16);
|
hud_element_set_render_pos(gPauseCommonIconIDs[3], baseX - 4, baseY + 16);
|
||||||
set_hud_element_anim(gPauseCommonIconIDs[3], gPauseShownDescIconScript);
|
hud_element_set_script(gPauseCommonIconIDs[3], gPauseShownDescIconScript);
|
||||||
set_hud_element_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAGS_SHADOW);
|
hud_element_set_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAGS_DROP_SHADOW);
|
||||||
clear_hud_element_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAGS_8000);
|
hud_element_clear_flags(gPauseCommonIconIDs[3], HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
set_hud_element_scale(gPauseCommonIconIDs[3], 1.0f);
|
hud_element_set_scale(gPauseCommonIconIDs[3], 1.0f);
|
||||||
draw_hud_element_3(gPauseCommonIconIDs[3]);
|
hud_element_draw_without_clipping(gPauseCommonIconIDs[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,14 +558,14 @@ void pause_tutorial_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid
|
|||||||
get_msg_properties(pause_get_menu_msg(gPauseTutorialDescMessages[state]), &msgHeight2, &msgWidth2, &msgMaxLineChars2, &msgNumLines2, &msgMaxLinesPerPage2, NULL, 1);
|
get_msg_properties(pause_get_menu_msg(gPauseTutorialDescMessages[state]), &msgHeight2, &msgWidth2, &msgMaxLineChars2, &msgNumLines2, &msgMaxLinesPerPage2, NULL, 1);
|
||||||
margin2 = (s32)(width - msgWidth2) >> 1;
|
margin2 = (s32)(width - msgWidth2) >> 1;
|
||||||
draw_msg(pause_get_menu_msg(gPauseTutorialDescMessages[state]), baseX + margin2, baseY + 13 + state * 140 - gPauseTutorialScrollPos, 255, 10, 1);
|
draw_msg(pause_get_menu_msg(gPauseTutorialDescMessages[state]), baseX + margin2, baseY + 13 + state * 140 - gPauseTutorialScrollPos, 255, 10, 1);
|
||||||
set_hud_element_render_pos(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], baseX + width / 2 - 2, baseY + 52);
|
hud_element_set_render_pos(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], baseX + width / 2 - 2, baseY + 52);
|
||||||
set_hud_element_flags(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], HUD_ELEMENT_FLAGS_8000);
|
hud_element_set_flags(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], HUD_ELEMENT_FLAGS_FILTER_TEX);
|
||||||
set_hud_element_scale(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], 0.5f);
|
hud_element_set_scale(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]], 0.5f);
|
||||||
draw_hud_element_3(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]]);
|
hud_element_draw_without_clipping(gPauseCommonIconIDs[gPauseTutorialIconIDs[gPauseTutorialState]]);
|
||||||
|
|
||||||
if (gPauseTutorialIconIDs[gPauseTutorialState] == 6) {
|
if (gPauseTutorialIconIDs[gPauseTutorialState] == 6) {
|
||||||
set_hud_element_render_pos(gPauseCommonIconIDs[7], baseX + width / 2 + 1, baseY + 50);
|
hud_element_set_render_pos(gPauseCommonIconIDs[7], baseX + width / 2 + 1, baseY + 50);
|
||||||
draw_hud_element_3(gPauseCommonIconIDs[7]);
|
hud_element_draw_without_clipping(gPauseCommonIconIDs[7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
draw_msg(pause_get_menu_msg(gPauseTutorialCmdMessages[gPauseTutorialState]), baseX + width / 2 + 10, baseY + 44, 255, 10, 0);
|
draw_msg(pause_get_menu_msg(gPauseTutorialCmdMessages[gPauseTutorialState]), baseX + width / 2 + 10, baseY + 44, 255, 10, 0);
|
||||||
@ -581,11 +581,11 @@ void pause_init(void) {
|
|||||||
dma_copy(_131340_ROM_START, _131340_ROM_END, _131340_VRAM);
|
dma_copy(_131340_ROM_START, _131340_ROM_END, _131340_VRAM);
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseIconScripts); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseIconScripts); i++) {
|
||||||
gPauseCommonIconIDs[i] = create_hud_element(gPauseIconScripts[i]);
|
gPauseCommonIconIDs[i] = hud_element_create(gPauseIconScripts[i]);
|
||||||
if (gPauseIconScripts[i] == HudScript_AnimatedCursorHand) {
|
if (gPauseIconScripts[i] == HudScript_AnimatedCursorHand) {
|
||||||
set_hud_element_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_SHADOW | HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_DROP_SHADOW | HUD_ELEMENT_FLAGS_80);
|
||||||
} else {
|
} else {
|
||||||
set_hud_element_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(gPauseCommonIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -769,7 +769,7 @@ void pause_cleanup(void) {
|
|||||||
MenuPanel** menuPanels;
|
MenuPanel** menuPanels;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseCommonIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseCommonIconIDs); i++) {
|
||||||
free_hud_element(gPauseCommonIconIDs[i]);
|
hud_element_free(gPauseCommonIconIDs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (evt_get_variable(NULL, EVT_SAVE_FLAG(94))) {
|
if (evt_get_variable(NULL, EVT_SAVE_FLAG(94))) {
|
||||||
|
@ -299,8 +299,8 @@ void pause_map_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s
|
|||||||
|
|
||||||
mapULX = baseX + 26 + cameraX;
|
mapULX = baseX + 26 + cameraX;
|
||||||
mapULY = baseY + 22 + cameraY;
|
mapULY = baseY + 22 + cameraY;
|
||||||
set_hud_element_render_pos(gPauseMapIconIDs[0], mapULX + gPauseMapMarioX, mapULY + gPauseMapMarioY - 7);
|
hud_element_set_render_pos(gPauseMapIconIDs[0], mapULX + gPauseMapMarioX, mapULY + gPauseMapMarioY - 7);
|
||||||
draw_hud_element_3(gPauseMapIconIDs[0]);
|
hud_element_draw_without_clipping(gPauseMapIconIDs[0]);
|
||||||
|
|
||||||
currentTab = gPauseMenuCurrentTab;
|
currentTab = gPauseMenuCurrentTab;
|
||||||
if (currentTab == 6) {
|
if (currentTab == 6) {
|
||||||
@ -385,8 +385,8 @@ void pause_map_init(MenuPanel* tab) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseMapIconScripts); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseMapIconScripts); i++) {
|
||||||
gPauseMapIconIDs[i] = create_hud_element(gPauseMapIconScripts[i]);
|
gPauseMapIconIDs[i] = hud_element_create(gPauseMapIconScripts[i]);
|
||||||
set_hud_element_flags(gPauseMapIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(gPauseMapIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseMapWindowBPs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseMapWindowBPs); i++) {
|
||||||
@ -563,6 +563,6 @@ void pause_map_cleanup(MenuPanel* tab) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseMapIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseMapIconIDs); i++) {
|
||||||
free_hud_element(gPauseMapIconIDs[i]);
|
hud_element_free(gPauseMapIconIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -418,13 +418,13 @@ void pause_partners_draw_title(MenuPanel* menu, s32 baseX, s32 baseY, s32 width,
|
|||||||
draw_msg(msgID, baseX + ((width - offset - msgWidth) >> 1), baseY + 1, 255, 0, 0);
|
draw_msg(msgID, baseX + ((width - offset - msgWidth) >> 1), baseY + 1, 255, 0, 0);
|
||||||
|
|
||||||
if (level == 1) {
|
if (level == 1) {
|
||||||
set_hud_element_render_pos(gPausePartnersIconIDs[2], baseX + 95, baseY + 10);
|
hud_element_set_render_pos(gPausePartnersIconIDs[2], baseX + 95, baseY + 10);
|
||||||
draw_hud_element_3(gPausePartnersIconIDs[2]);
|
hud_element_draw_without_clipping(gPausePartnersIconIDs[2]);
|
||||||
} else if (level == 2) {
|
} else if (level == 2) {
|
||||||
set_hud_element_render_pos(gPausePartnersIconIDs[2], baseX + 91, baseY + 10);
|
hud_element_set_render_pos(gPausePartnersIconIDs[2], baseX + 91, baseY + 10);
|
||||||
draw_hud_element_3(gPausePartnersIconIDs[2]);
|
hud_element_draw_without_clipping(gPausePartnersIconIDs[2]);
|
||||||
set_hud_element_render_pos(gPausePartnersIconIDs[3], baseX + 101, baseY + 10);
|
hud_element_set_render_pos(gPausePartnersIconIDs[3], baseX + 101, baseY + 10);
|
||||||
draw_hud_element_3(gPausePartnersIconIDs[3]);
|
hud_element_draw_without_clipping(gPausePartnersIconIDs[3]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,16 +467,16 @@ void pause_partners_draw_movelist(MenuPanel* menu, s32 baseX, s32 baseY, s32 wid
|
|||||||
}
|
}
|
||||||
|
|
||||||
draw_msg(moveNameID, msgX, msgY, 255, 10, style);
|
draw_msg(moveNameID, msgX, msgY, 255, 10, style);
|
||||||
set_hud_element_scale(gPausePartnersIconIDs[i + 4], 0.5f);
|
hud_element_set_scale(gPausePartnersIconIDs[i + 4], 0.5f);
|
||||||
//TODO find better match
|
//TODO find better match
|
||||||
set_hud_element_render_pos(gPausePartnersIconIDs[i + 4], 12 - (-baseX), baseY + 28 + i * 13);
|
hud_element_set_render_pos(gPausePartnersIconIDs[i + 4], 12 - (-baseX), baseY + 28 + i * 13);
|
||||||
draw_hud_element_3(gPausePartnersIconIDs[i + 4]);
|
hud_element_draw_without_clipping(gPausePartnersIconIDs[i + 4]);
|
||||||
|
|
||||||
if (costFP != 0) {
|
if (costFP != 0) {
|
||||||
draw_number(costFP, baseX + 125, baseY + 22 + i * 13, style, 10, 255, 3);
|
draw_number(costFP, baseX + 125, baseY + 22 + i * 13, style, 10, 255, 3);
|
||||||
if (costFP > 0) {
|
if (costFP > 0) {
|
||||||
set_hud_element_render_pos(gPausePartnersIconIDs[0], baseX + 134, baseY + 29 + i * 13);
|
hud_element_set_render_pos(gPausePartnersIconIDs[0], baseX + 134, baseY + 29 + i * 13);
|
||||||
draw_hud_element_3(gPausePartnersIconIDs[0]);
|
hud_element_draw_without_clipping(gPausePartnersIconIDs[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -491,8 +491,8 @@ void pause_partners_draw_movelist_title(MenuPanel* menu, s32 baseX, s32 baseY, s
|
|||||||
}
|
}
|
||||||
|
|
||||||
void pause_partners_draw_movelist_flower(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_partners_draw_movelist_flower(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
set_hud_element_render_pos(gPausePartnersIconIDs[1], baseX + 17, baseY + 16);
|
hud_element_set_render_pos(gPausePartnersIconIDs[1], baseX + 17, baseY + 16);
|
||||||
draw_hud_element_3(gPausePartnersIconIDs[1]);
|
hud_element_draw_without_clipping(gPausePartnersIconIDs[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pause_partners_init(MenuPanel* panel) {
|
void pause_partners_init(MenuPanel* panel) {
|
||||||
@ -518,8 +518,8 @@ void pause_partners_init(MenuPanel* panel) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPausePartnersIconScripts); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPausePartnersIconScripts); i++) {
|
||||||
gPausePartnersIconIDs[i] = create_hud_element(gPausePartnersIconScripts[i]);
|
gPausePartnersIconIDs[i] = hud_element_create(gPausePartnersIconScripts[i]);
|
||||||
set_hud_element_flags(gPausePartnersIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(gPausePartnersIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPausePartnersWindowBPs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPausePartnersWindowBPs); i++) {
|
||||||
@ -690,7 +690,7 @@ void pause_partners_cleanup(MenuPanel* panel) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPausePartnersIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPausePartnersIconIDs); i++) {
|
||||||
free_hud_element(gPausePartnersIconIDs[i]);
|
hud_element_free(gPausePartnersIconIDs[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPausePartnersSpriteIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPausePartnersSpriteIDs); i++) {
|
||||||
|
@ -98,10 +98,10 @@ void pause_stats_init(MenuPanel* panel) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseStatsIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseStatsIconIDs); i++) {
|
||||||
s32 iconID = create_hud_element(gStatsMenuElements[i]);
|
s32 iconID = hud_element_create(gStatsMenuElements[i]);
|
||||||
|
|
||||||
gPauseStatsIconIDs[i] = iconID;
|
gPauseStatsIconIDs[i] = iconID;
|
||||||
set_hud_element_flags(iconID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(iconID, HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gStatsMenuWindowBPs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gStatsMenuWindowBPs); i++) {
|
||||||
@ -220,6 +220,6 @@ void pause_stats_cleanup(MenuPanel* panel) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseStatsIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseStatsIconIDs); i++) {
|
||||||
free_hud_element(gPauseStatsIconIDs[i]);
|
hud_element_free(gPauseStatsIconIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -148,15 +148,15 @@ void pause_tabs_draw_invis(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32
|
|||||||
|
|
||||||
void pause_tabs_draw_stats(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_tabs_draw_stats(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
if (darkening != 0) {
|
if (darkening != 0) {
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[0], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_set_flags(gPauseTabsIconIDs[0], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[0], 255.0 - darkening * 0.5);
|
hud_element_set_alpha(gPauseTabsIconIDs[0], 255.0 - darkening * 0.5);
|
||||||
} else {
|
} else {
|
||||||
clear_hud_element_flags(gPauseTabsIconIDs[0], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_clear_flags(gPauseTabsIconIDs[0], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[0], 255);
|
hud_element_set_alpha(gPauseTabsIconIDs[0], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseTabsIconIDs[0], baseX + 22, baseY + 7);
|
hud_element_set_render_pos(gPauseTabsIconIDs[0], baseX + 22, baseY + 7);
|
||||||
draw_hud_element_3(gPauseTabsIconIDs[0]);
|
hud_element_draw_without_clipping(gPauseTabsIconIDs[0]);
|
||||||
if (gPauseMenuCurrentTab == 0) {
|
if (gPauseMenuCurrentTab == 0) {
|
||||||
if (gPauseTabsWindowIDs[menu->col] == 25) {
|
if (gPauseTabsWindowIDs[menu->col] == 25) {
|
||||||
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
||||||
@ -166,15 +166,15 @@ void pause_tabs_draw_stats(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32
|
|||||||
|
|
||||||
void pause_tabs_draw_badges(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_tabs_draw_badges(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
if (darkening != 0) {
|
if (darkening != 0) {
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[1], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_set_flags(gPauseTabsIconIDs[1], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[1], 255.0 - darkening * 0.5);
|
hud_element_set_alpha(gPauseTabsIconIDs[1], 255.0 - darkening * 0.5);
|
||||||
} else {
|
} else {
|
||||||
clear_hud_element_flags(gPauseTabsIconIDs[1], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_clear_flags(gPauseTabsIconIDs[1], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[1], 255);
|
hud_element_set_alpha(gPauseTabsIconIDs[1], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseTabsIconIDs[1], baseX + 22, baseY + 7);
|
hud_element_set_render_pos(gPauseTabsIconIDs[1], baseX + 22, baseY + 7);
|
||||||
draw_hud_element_3(gPauseTabsIconIDs[1]);
|
hud_element_draw_without_clipping(gPauseTabsIconIDs[1]);
|
||||||
if (gPauseMenuCurrentTab == 0) {
|
if (gPauseMenuCurrentTab == 0) {
|
||||||
if (gPauseTabsWindowIDs[menu->col] == 26) {
|
if (gPauseTabsWindowIDs[menu->col] == 26) {
|
||||||
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
||||||
@ -184,15 +184,15 @@ void pause_tabs_draw_badges(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s3
|
|||||||
|
|
||||||
void pause_tabs_draw_items(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_tabs_draw_items(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
if (darkening != 0) {
|
if (darkening != 0) {
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[2], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_set_flags(gPauseTabsIconIDs[2], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[2], 255.0 - darkening * 0.5);
|
hud_element_set_alpha(gPauseTabsIconIDs[2], 255.0 - darkening * 0.5);
|
||||||
} else {
|
} else {
|
||||||
clear_hud_element_flags(gPauseTabsIconIDs[2], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_clear_flags(gPauseTabsIconIDs[2], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[2], 255);
|
hud_element_set_alpha(gPauseTabsIconIDs[2], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseTabsIconIDs[2], baseX + 22, baseY + 7);
|
hud_element_set_render_pos(gPauseTabsIconIDs[2], baseX + 22, baseY + 7);
|
||||||
draw_hud_element_3(gPauseTabsIconIDs[2]);
|
hud_element_draw_without_clipping(gPauseTabsIconIDs[2]);
|
||||||
if (gPauseMenuCurrentTab == 0) {
|
if (gPauseMenuCurrentTab == 0) {
|
||||||
if (gPauseTabsWindowIDs[menu->col] == 27) {
|
if (gPauseTabsWindowIDs[menu->col] == 27) {
|
||||||
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
||||||
@ -202,15 +202,15 @@ void pause_tabs_draw_items(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32
|
|||||||
|
|
||||||
void pause_tabs_draw_party(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_tabs_draw_party(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
if (darkening != 0) {
|
if (darkening != 0) {
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[3], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_set_flags(gPauseTabsIconIDs[3], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[3], 255.0 - darkening * 0.5);
|
hud_element_set_alpha(gPauseTabsIconIDs[3], 255.0 - darkening * 0.5);
|
||||||
} else {
|
} else {
|
||||||
clear_hud_element_flags(gPauseTabsIconIDs[3], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_clear_flags(gPauseTabsIconIDs[3], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[3], 255);
|
hud_element_set_alpha(gPauseTabsIconIDs[3], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseTabsIconIDs[3], baseX + 22, baseY + 7);
|
hud_element_set_render_pos(gPauseTabsIconIDs[3], baseX + 22, baseY + 7);
|
||||||
draw_hud_element_3(gPauseTabsIconIDs[3]);
|
hud_element_draw_without_clipping(gPauseTabsIconIDs[3]);
|
||||||
if (gPauseMenuCurrentTab == 0) {
|
if (gPauseMenuCurrentTab == 0) {
|
||||||
if (gPauseTabsWindowIDs[menu->col] == 28) {
|
if (gPauseTabsWindowIDs[menu->col] == 28) {
|
||||||
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
||||||
@ -220,15 +220,15 @@ void pause_tabs_draw_party(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32
|
|||||||
|
|
||||||
void pause_tabs_draw_spirits(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_tabs_draw_spirits(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
if (darkening != 0) {
|
if (darkening != 0) {
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[4], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_set_flags(gPauseTabsIconIDs[4], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[4], 255.0 - darkening * 0.5);
|
hud_element_set_alpha(gPauseTabsIconIDs[4], 255.0 - darkening * 0.5);
|
||||||
} else {
|
} else {
|
||||||
clear_hud_element_flags(gPauseTabsIconIDs[4], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_clear_flags(gPauseTabsIconIDs[4], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[4], 255);
|
hud_element_set_alpha(gPauseTabsIconIDs[4], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseTabsIconIDs[4], baseX + 22, baseY + 7);
|
hud_element_set_render_pos(gPauseTabsIconIDs[4], baseX + 22, baseY + 7);
|
||||||
draw_hud_element_3(gPauseTabsIconIDs[4]);
|
hud_element_draw_without_clipping(gPauseTabsIconIDs[4]);
|
||||||
if (gPauseMenuCurrentTab == 0) {
|
if (gPauseMenuCurrentTab == 0) {
|
||||||
if (gPauseTabsWindowIDs[menu->col] == 29) {
|
if (gPauseTabsWindowIDs[menu->col] == 29) {
|
||||||
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
||||||
@ -238,15 +238,15 @@ void pause_tabs_draw_spirits(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s
|
|||||||
|
|
||||||
void pause_tabs_draw_map(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
void pause_tabs_draw_map(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) {
|
||||||
if (darkening != 0) {
|
if (darkening != 0) {
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[5], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_set_flags(gPauseTabsIconIDs[5], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[5], 255.0 - darkening * 0.5);
|
hud_element_set_alpha(gPauseTabsIconIDs[5], 255.0 - darkening * 0.5);
|
||||||
} else {
|
} else {
|
||||||
clear_hud_element_flags(gPauseTabsIconIDs[5], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
hud_element_clear_flags(gPauseTabsIconIDs[5], HUD_ELEMENT_FLAGS_TRANSPARENT);
|
||||||
set_hud_element_alpha(gPauseTabsIconIDs[5], 255);
|
hud_element_set_alpha(gPauseTabsIconIDs[5], 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_render_pos(gPauseTabsIconIDs[5], baseX + 23, baseY + 7);
|
hud_element_set_render_pos(gPauseTabsIconIDs[5], baseX + 23, baseY + 7);
|
||||||
draw_hud_element_3(gPauseTabsIconIDs[5]);
|
hud_element_draw_without_clipping(gPauseTabsIconIDs[5]);
|
||||||
if (gPauseMenuCurrentTab == 0) {
|
if (gPauseMenuCurrentTab == 0) {
|
||||||
if (gPauseTabsWindowIDs[menu->col] == 30) {
|
if (gPauseTabsWindowIDs[menu->col] == 30) {
|
||||||
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
pause_set_cursor_pos(gPauseTabsWindowIDs[menu->col], baseX, baseY + 6);
|
||||||
@ -258,8 +258,8 @@ void pause_tabs_init(MenuPanel* tab) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseTabsHudScripts); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseTabsHudScripts); i++) {
|
||||||
gPauseTabsIconIDs[i] = create_hud_element(gPauseTabsHudScripts[i]);
|
gPauseTabsIconIDs[i] = hud_element_create(gPauseTabsHudScripts[i]);
|
||||||
set_hud_element_flags(gPauseTabsIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(gPauseTabsIconIDs[i], HUD_ELEMENT_FLAGS_80);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseTabsWindowBPs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseTabsWindowBPs); i++) {
|
||||||
@ -400,6 +400,6 @@ void pause_tabs_cleanup(MenuPanel* tab) {
|
|||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < ARRAY_COUNT(gPauseTabsIconIDs); i++) {
|
for (i = 0; i < ARRAY_COUNT(gPauseTabsIconIDs); i++) {
|
||||||
free_hud_element(gPauseTabsIconIDs[i]);
|
hud_element_free(gPauseTabsIconIDs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ void state_step_battle(void) {
|
|||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_generic_entity_list();
|
clear_generic_entity_list();
|
||||||
set_hud_element_nonworld_cache(NULL, 0);
|
hud_element_set_aux_cache(NULL, 0);
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
reset_status_menu();
|
reset_status_menu();
|
||||||
clear_item_entity_data();
|
clear_item_entity_data();
|
||||||
clear_script_list();
|
clear_script_list();
|
||||||
@ -164,7 +164,7 @@ void state_step_end_battle(void) {
|
|||||||
init_entity_models();
|
init_entity_models();
|
||||||
reset_animator_list();
|
reset_animator_list();
|
||||||
init_generic_entity_list();
|
init_generic_entity_list();
|
||||||
set_hud_element_nonworld_cache(0, 0);
|
hud_element_set_aux_cache(0, 0);
|
||||||
init_hud_element_list();
|
init_hud_element_list();
|
||||||
init_item_entity_list();
|
init_item_entity_list();
|
||||||
init_script_list();
|
init_script_list();
|
||||||
|
@ -109,7 +109,7 @@ void state_step_demo(void) {
|
|||||||
clear_model_data();
|
clear_model_data();
|
||||||
clear_sprite_shading_data();
|
clear_sprite_shading_data();
|
||||||
reset_background_settings();
|
reset_background_settings();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
clear_trigger_data();
|
clear_trigger_data();
|
||||||
clear_printers();
|
clear_printers();
|
||||||
clear_entity_data(0);
|
clear_entity_data(0);
|
||||||
|
@ -37,8 +37,8 @@ void state_init_file_select(void) {
|
|||||||
disable_player_input();
|
disable_player_input();
|
||||||
set_time_freeze_mode(TIME_FREEZE_FULL);
|
set_time_freeze_mode(TIME_FREEZE_FULL);
|
||||||
general_heap_create();
|
general_heap_create();
|
||||||
set_hud_element_nonworld_cache(0, 0);
|
hud_element_set_aux_cache(0, 0);
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
load_model_textures(0, 0, 0);
|
load_model_textures(0, 0, 0);
|
||||||
gCameras[CAM_DEFAULT].updateMode = 6;
|
gCameras[CAM_DEFAULT].updateMode = 6;
|
||||||
gCameras[CAM_DEFAULT].unk_06 = 1;
|
gCameras[CAM_DEFAULT].unk_06 = 1;
|
||||||
@ -127,8 +127,8 @@ void state_step_language_select(void) {
|
|||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_generic_entity_list();
|
clear_generic_entity_list();
|
||||||
set_hud_element_nonworld_cache(&D_80200000, 0x20000);
|
hud_element_set_aux_cache(&D_80200000, 0x20000);
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
reset_status_menu();
|
reset_status_menu();
|
||||||
clear_item_entity_data();
|
clear_item_entity_data();
|
||||||
clear_script_list();
|
clear_script_list();
|
||||||
@ -279,7 +279,7 @@ void state_step_exit_language_select(void) {
|
|||||||
init_entity_models();
|
init_entity_models();
|
||||||
reset_animator_list();
|
reset_animator_list();
|
||||||
init_generic_entity_list();
|
init_generic_entity_list();
|
||||||
set_hud_element_nonworld_cache(0, 0);
|
hud_element_set_aux_cache(0, 0);
|
||||||
init_hud_element_list();
|
init_hud_element_list();
|
||||||
init_item_entity_list();
|
init_item_entity_list();
|
||||||
init_script_list();
|
init_script_list();
|
||||||
|
@ -153,7 +153,7 @@ void state_step_intro(void) {
|
|||||||
clear_model_data();
|
clear_model_data();
|
||||||
clear_sprite_shading_data();
|
clear_sprite_shading_data();
|
||||||
reset_background_settings();
|
reset_background_settings();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
clear_trigger_data();
|
clear_trigger_data();
|
||||||
clear_printers();
|
clear_printers();
|
||||||
clear_entity_data(0);
|
clear_entity_data(0);
|
||||||
|
@ -69,7 +69,7 @@ void state_init_logos(void) {
|
|||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_npcs();
|
clear_npcs();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
reset_background_settings();
|
reset_background_settings();
|
||||||
clear_entity_data(1);
|
clear_entity_data(1);
|
||||||
clear_effect_data();
|
clear_effect_data();
|
||||||
|
@ -69,8 +69,8 @@ void state_step_pause(void) {
|
|||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_generic_entity_list();
|
clear_generic_entity_list();
|
||||||
set_hud_element_nonworld_cache(_3169F0_VRAM, 0x38000);
|
hud_element_set_aux_cache(_3169F0_VRAM, 0x38000);
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
reset_status_menu();
|
reset_status_menu();
|
||||||
clear_item_entity_data();
|
clear_item_entity_data();
|
||||||
clear_script_list();
|
clear_script_list();
|
||||||
@ -151,7 +151,7 @@ void state_step_unpause(void) {
|
|||||||
init_entity_models();
|
init_entity_models();
|
||||||
reset_animator_list();
|
reset_animator_list();
|
||||||
init_generic_entity_list();
|
init_generic_entity_list();
|
||||||
set_hud_element_nonworld_cache(0, 0);
|
hud_element_set_aux_cache(0, 0);
|
||||||
init_hud_element_list();
|
init_hud_element_list();
|
||||||
init_item_entity_list();
|
init_item_entity_list();
|
||||||
init_script_list();
|
init_script_list();
|
||||||
|
@ -42,8 +42,8 @@ void state_step_startup(void) {
|
|||||||
clear_model_data();
|
clear_model_data();
|
||||||
clear_sprite_shading_data();
|
clear_sprite_shading_data();
|
||||||
reset_background_settings();
|
reset_background_settings();
|
||||||
set_hud_element_nonworld_cache(0, 0);
|
hud_element_set_aux_cache(0, 0);
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
clear_trigger_data();
|
clear_trigger_data();
|
||||||
clear_printers();
|
clear_printers();
|
||||||
clear_entity_data(0);
|
clear_entity_data(0);
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#define TITLE_POS_TOP 15 // Top edge of the texture on screen (with no offset)
|
#define TITLE_POS_TOP 15 // Top edge of the texture on screen (with no offset)
|
||||||
|
|
||||||
s16 D_800779C0[2] = {0, 0};
|
s16 D_800779C0[2] = {0, 0};
|
||||||
s32 D_800779C4 = 0;
|
s32 gSaveSlotMetadata = 0;
|
||||||
s8 D_800779C8[2] = {0, 0};
|
s8 D_800779C8[2] = {0, 0};
|
||||||
s8 D_800779CA = 0;
|
s8 D_800779CA = 0;
|
||||||
s8 D_800779CB = 0x45;
|
s8 D_800779CB = 0x45;
|
||||||
@ -24,7 +24,7 @@ s32 D_800779D8[] = { 0x00000000, 0x00000000, 0x00000045, 0x52524F52, 0xF7F7F700,
|
|||||||
0x00000045, 0x52524F52, 0xF7F7F700, 0x00000000, 0x00000000, 0x00000000, 0x00000045, 0x52524F52,
|
0x00000045, 0x52524F52, 0xF7F7F700, 0x00000000, 0x00000000, 0x00000000, 0x00000045, 0x52524F52,
|
||||||
0xF7F7F700, 0x00000000, 0x00000000,
|
0xF7F7F700, 0x00000000, 0x00000000,
|
||||||
};
|
};
|
||||||
s32 D_80077A24 = 0x01010101;
|
s32 gSaveSlotHasData = 0x01010101;
|
||||||
s32 D_80077A28 = 0;
|
s32 D_80077A28 = 0;
|
||||||
s32 D_80077A2C = 0;
|
s32 D_80077A2C = 0;
|
||||||
s32 D_80077A30 = 0;
|
s32 D_80077A30 = 0;
|
||||||
@ -146,7 +146,7 @@ void state_init_title_screen(void) {
|
|||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_npcs();
|
clear_npcs();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
reset_background_settings();
|
reset_background_settings();
|
||||||
clear_entity_data(1);
|
clear_entity_data(1);
|
||||||
clear_effect_data();
|
clear_effect_data();
|
||||||
@ -265,7 +265,7 @@ void state_step_title_screen(void) {
|
|||||||
clear_entity_models();
|
clear_entity_models();
|
||||||
clear_animator_list();
|
clear_animator_list();
|
||||||
clear_npcs();
|
clear_npcs();
|
||||||
clear_hud_element_cache();
|
hud_element_clear_cache();
|
||||||
spr_init_sprites(0);
|
spr_init_sprites(0);
|
||||||
clear_entity_data(1);
|
clear_entity_data(1);
|
||||||
clear_windows();
|
clear_windows();
|
||||||
|
@ -310,35 +310,35 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
if (icon->status1.activeTask == STATUS_ICON_TASK_LOAD) {
|
if (icon->status1.activeTask == STATUS_ICON_TASK_LOAD) {
|
||||||
switch (icon->status1.active) {
|
switch (icon->status1.active) {
|
||||||
case STATUS_SLEEP:
|
case STATUS_SLEEP:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_AsleepBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_AsleepBegin);
|
||||||
break;
|
break;
|
||||||
case STATUS_PARALYZE:
|
case STATUS_PARALYZE:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_ParalyzedBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_ParalyzedBegin);
|
||||||
break;
|
break;
|
||||||
case STATUS_DIZZY:
|
case STATUS_DIZZY:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_DizzyBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_DizzyBegin);
|
||||||
break;
|
break;
|
||||||
case STATUS_FEAR:
|
case STATUS_FEAR:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_WeakenedLoop);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_WeakenedLoop);
|
||||||
break;
|
break;
|
||||||
case STATUS_STOP:
|
case STATUS_STOP:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_StoppedBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_StoppedBegin);
|
||||||
break;
|
break;
|
||||||
case STATUS_POISON:
|
case STATUS_POISON:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_PoisonedBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_PoisonedBegin);
|
||||||
break;
|
break;
|
||||||
case STATUS_SHRINK:
|
case STATUS_SHRINK:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_ShrunkBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_ShrunkBegin);
|
||||||
break;
|
break;
|
||||||
case STATUS_FROZEN:
|
case STATUS_FROZEN:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_FrozenBegin);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_FrozenBegin);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
elementID = icon->status1.activeElementID = create_hud_element(&HudScript_Item_Present);
|
elementID = icon->status1.activeElementID = hud_element_create(&HudScript_Item_Present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
icon->status1.activeTask = STATUS_ICON_TASK_DRAW;
|
icon->status1.activeTask = STATUS_ICON_TASK_DRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,31 +348,31 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
case STATUS_ICON_TASK_LOAD:
|
case STATUS_ICON_TASK_LOAD:
|
||||||
switch (icon->status1.removing) {
|
switch (icon->status1.removing) {
|
||||||
case STATUS_SLEEP:
|
case STATUS_SLEEP:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_AsleepEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_AsleepEnd);
|
||||||
break;
|
break;
|
||||||
case STATUS_PARALYZE:
|
case STATUS_PARALYZE:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_ParalyzedEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_ParalyzedEnd);
|
||||||
break;
|
break;
|
||||||
case STATUS_DIZZY:
|
case STATUS_DIZZY:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_DizzyEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_DizzyEnd);
|
||||||
break;
|
break;
|
||||||
case STATUS_FEAR:
|
case STATUS_FEAR:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_WeakenedLoop);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_WeakenedLoop);
|
||||||
break;
|
break;
|
||||||
case STATUS_STOP:
|
case STATUS_STOP:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_StoppedEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_StoppedEnd);
|
||||||
break;
|
break;
|
||||||
case STATUS_POISON:
|
case STATUS_POISON:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_PoisonedEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_PoisonedEnd);
|
||||||
break;
|
break;
|
||||||
case STATUS_SHRINK:
|
case STATUS_SHRINK:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_ShrunkEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_ShrunkEnd);
|
||||||
break;
|
break;
|
||||||
case STATUS_FROZEN:
|
case STATUS_FROZEN:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_FrozenEnd);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_FrozenEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
set_hud_element_anim(icon->status1.removingElementID, &HudScript_Item_Present);
|
hud_element_set_script(icon->status1.removingElementID, &HudScript_Item_Present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -385,7 +385,7 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
icon->status1.frameCounter--;
|
icon->status1.frameCounter--;
|
||||||
} else {
|
} else {
|
||||||
icon->status1.removing = 0;
|
icon->status1.removing = 0;
|
||||||
free_hud_element(icon->status1.removingElementID);
|
hud_element_free(icon->status1.removingElementID);
|
||||||
icon->status1.removingTask = STATUS_ICON_TASK_NONE;
|
icon->status1.removingTask = STATUS_ICON_TASK_NONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -394,15 +394,15 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
if (icon->status2.activeTask == STATUS_ICON_TASK_LOAD) {
|
if (icon->status2.activeTask == STATUS_ICON_TASK_LOAD) {
|
||||||
switch (icon->status2.active) {
|
switch (icon->status2.active) {
|
||||||
case STATUS_STATIC:
|
case STATUS_STATIC:
|
||||||
elementID = icon->status2.activeElementID = create_hud_element(&HudScript_ElectrifiedBegin);
|
elementID = icon->status2.activeElementID = hud_element_create(&HudScript_ElectrifiedBegin);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
elementID = icon->status2.activeElementID = create_hud_element(&HudScript_Item_Present);
|
elementID = icon->status2.activeElementID = hud_element_create(&HudScript_Item_Present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
icon->status2.activeTask = STATUS_ICON_TASK_DRAW;
|
icon->status2.activeTask = STATUS_ICON_TASK_DRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -412,10 +412,10 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
case STATUS_ICON_TASK_LOAD:
|
case STATUS_ICON_TASK_LOAD:
|
||||||
switch (icon->status2.removing) {
|
switch (icon->status2.removing) {
|
||||||
case STATUS_STATIC:
|
case STATUS_STATIC:
|
||||||
set_hud_element_anim(icon->status2.removingElementID, &HudScript_ElectrifiedEnd);
|
hud_element_set_script(icon->status2.removingElementID, &HudScript_ElectrifiedEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
set_hud_element_anim(icon->status2.removingElementID, &HudScript_Item_Present);
|
hud_element_set_script(icon->status2.removingElementID, &HudScript_Item_Present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
icon->status2.frameCounter--;
|
icon->status2.frameCounter--;
|
||||||
} else {
|
} else {
|
||||||
icon->status2.removing = 0;
|
icon->status2.removing = 0;
|
||||||
free_hud_element(icon->status2.removingElementID);
|
hud_element_free(icon->status2.removingElementID);
|
||||||
icon->status2.removingTask = STATUS_ICON_TASK_NONE;
|
icon->status2.removingTask = STATUS_ICON_TASK_NONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -436,15 +436,15 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
if (icon->status3.activeTask == STATUS_ICON_TASK_LOAD) {
|
if (icon->status3.activeTask == STATUS_ICON_TASK_LOAD) {
|
||||||
switch (icon->status3.active) {
|
switch (icon->status3.active) {
|
||||||
case STATUS_E:
|
case STATUS_E:
|
||||||
elementID = icon->status3.activeElementID = create_hud_element(&HudScript_TransparentBegin);
|
elementID = icon->status3.activeElementID = hud_element_create(&HudScript_TransparentBegin);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
elementID = icon->status3.activeElementID = create_hud_element(&HudScript_Item_Present);
|
elementID = icon->status3.activeElementID = hud_element_create(&HudScript_Item_Present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
icon->status3.activeTask = STATUS_ICON_TASK_DRAW;
|
icon->status3.activeTask = STATUS_ICON_TASK_DRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -454,10 +454,10 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
case STATUS_ICON_TASK_LOAD:
|
case STATUS_ICON_TASK_LOAD:
|
||||||
switch (icon->status3.removing) {
|
switch (icon->status3.removing) {
|
||||||
case STATUS_E:
|
case STATUS_E:
|
||||||
set_hud_element_anim(icon->status3.removingElementID, &HudScript_TransparentEnd);
|
hud_element_set_script(icon->status3.removingElementID, &HudScript_TransparentEnd);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
set_hud_element_anim(icon->status3.removingElementID, &HudScript_Item_Present);
|
hud_element_set_script(icon->status3.removingElementID, &HudScript_Item_Present);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -469,16 +469,16 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
icon->status3.frameCounter--;
|
icon->status3.frameCounter--;
|
||||||
} else {
|
} else {
|
||||||
icon->status3.removing = 0;
|
icon->status3.removing = 0;
|
||||||
free_hud_element(icon->status3.removingElementID);
|
hud_element_free(icon->status3.removingElementID);
|
||||||
icon->status3.removingTask = STATUS_ICON_TASK_NONE;
|
icon->status3.removingTask = STATUS_ICON_TASK_NONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon->status4.activeTask == STATUS_ICON_TASK_LOAD) {
|
if (icon->status4.activeTask == STATUS_ICON_TASK_LOAD) {
|
||||||
elementID = icon->status4.activeElementID = create_hud_element(&HudScript_WeakenedBegin);
|
elementID = icon->status4.activeElementID = hud_element_create(&HudScript_WeakenedBegin);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(elementID, HUD_ELEMENT_FLAGS_80);
|
||||||
icon->status4.activeTask = STATUS_ICON_TASK_DRAW;
|
icon->status4.activeTask = STATUS_ICON_TASK_DRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,7 +486,7 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
case STATUS_ICON_TASK_NONE:
|
case STATUS_ICON_TASK_NONE:
|
||||||
break;
|
break;
|
||||||
case STATUS_ICON_TASK_LOAD:
|
case STATUS_ICON_TASK_LOAD:
|
||||||
set_hud_element_anim(icon->status4.removingElementID, &HudScript_WeakenedEnd);
|
hud_element_set_script(icon->status4.removingElementID, &HudScript_WeakenedEnd);
|
||||||
icon->status4.frameCounter = 20;
|
icon->status4.frameCounter = 20;
|
||||||
icon->status4.removingTask = STATUS_ICON_TASK_DRAW;
|
icon->status4.removingTask = STATUS_ICON_TASK_DRAW;
|
||||||
break;
|
break;
|
||||||
@ -495,7 +495,7 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
icon->status4.frameCounter--;
|
icon->status4.frameCounter--;
|
||||||
} else {
|
} else {
|
||||||
icon->status4.removing = 0;
|
icon->status4.removing = 0;
|
||||||
free_hud_element(icon->status4.removingElementID);
|
hud_element_free(icon->status4.removingElementID);
|
||||||
icon->status4.removingTask = STATUS_ICON_TASK_NONE;
|
icon->status4.removingTask = STATUS_ICON_TASK_NONE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -506,7 +506,7 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
s32 index = icon->prevIndexBoostJump;
|
s32 index = icon->prevIndexBoostJump;
|
||||||
|
|
||||||
if (get_hud_element(index)->flags & HUD_ELEMENT_FLAGS_ANIMATION_FINISHED) {
|
if (get_hud_element(index)->flags & HUD_ELEMENT_FLAGS_ANIMATION_FINISHED) {
|
||||||
free_hud_element(index);
|
hud_element_free(index);
|
||||||
icon->boostJump.removing = 0;
|
icon->boostJump.removing = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -517,7 +517,7 @@ void update_all_status_icons(PopupMessage* popup) {
|
|||||||
s32 index = icon->prevIndexBoostHammer;
|
s32 index = icon->prevIndexBoostHammer;
|
||||||
|
|
||||||
if (get_hud_element(index)->flags & HUD_ELEMENT_FLAGS_ANIMATION_FINISHED) {
|
if (get_hud_element(index)->flags & HUD_ELEMENT_FLAGS_ANIMATION_FINISHED) {
|
||||||
free_hud_element(index);
|
hud_element_free(index);
|
||||||
icon->boostHammer.removing = 0;
|
icon->boostHammer.removing = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -558,9 +558,9 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
isActiveDrawn = 0;
|
isActiveDrawn = 0;
|
||||||
if (icon->status1.activeTask == STATUS_ICON_TASK_DRAW) {
|
if (icon->status1.activeTask == STATUS_ICON_TASK_DRAW) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_DEBUFF) {
|
if (icon->flags & STATUS_ICON_FLAG_DEBUFF) {
|
||||||
set_hud_element_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status1.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
y = icon->worldPos.y + icon->status1OffsetY;
|
y = icon->worldPos.y + icon->status1OffsetY;
|
||||||
@ -569,15 +569,15 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status1.activeElementID;
|
elementId = icon->status1.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
iconCounter = 1;
|
iconCounter = 1;
|
||||||
isActiveDrawn = 1;
|
isActiveDrawn = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon->status1.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
if (icon->status1.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
||||||
clear_hud_element_flags(icon->status1.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status1.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
if (isActiveDrawn == 0) {
|
if (isActiveDrawn == 0) {
|
||||||
iconCounter++;
|
iconCounter++;
|
||||||
@ -590,16 +590,16 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status1Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status1.removingElementID;
|
elementId = icon->status1.removingElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
|
|
||||||
isActiveDrawn = 0;
|
isActiveDrawn = 0;
|
||||||
if (icon->status2.activeTask == STATUS_ICON_TASK_DRAW) {
|
if (icon->status2.activeTask == STATUS_ICON_TASK_DRAW) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_STATIC) {
|
if (icon->flags & STATUS_ICON_FLAG_STATIC) {
|
||||||
set_hud_element_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status2.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
if (iconCounter == 0) {
|
if (iconCounter == 0) {
|
||||||
@ -613,8 +613,8 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status2.activeElementID;
|
elementId = icon->status2.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
|
|
||||||
iconCounter++;
|
iconCounter++;
|
||||||
isActiveDrawn = 1;
|
isActiveDrawn = 1;
|
||||||
@ -622,7 +622,7 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (icon->status2.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
if (icon->status2.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
||||||
clear_hud_element_flags(icon->status2.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status2.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
if (iconCounter == 0) {
|
if (iconCounter == 0) {
|
||||||
@ -639,16 +639,16 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status2Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status2.removingElementID;
|
elementId = icon->status2.removingElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
|
|
||||||
isActiveDrawn = 0;
|
isActiveDrawn = 0;
|
||||||
if (icon->status3.activeTask == STATUS_ICON_TASK_DRAW) {
|
if (icon->status3.activeTask == STATUS_ICON_TASK_DRAW) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_TRANSPARENT) {
|
if (icon->flags & STATUS_ICON_FLAG_TRANSPARENT) {
|
||||||
set_hud_element_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status3.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
if (iconCounter == 1) {
|
if (iconCounter == 1) {
|
||||||
@ -664,15 +664,15 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status3.activeElementID;
|
elementId = icon->status3.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
iconCounter++;
|
iconCounter++;
|
||||||
isActiveDrawn = 1;
|
isActiveDrawn = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon->status3.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
if (icon->status3.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
||||||
clear_hud_element_flags(icon->status3.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status3.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
if (iconCounter == 1) {
|
if (iconCounter == 1) {
|
||||||
@ -692,16 +692,16 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status3Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status3.removingElementID;
|
elementId = icon->status3.removingElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
|
|
||||||
isActiveDrawn = 0;
|
isActiveDrawn = 0;
|
||||||
if (icon->status4.activeTask == STATUS_ICON_TASK_DRAW) {
|
if (icon->status4.activeTask == STATUS_ICON_TASK_DRAW) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_STATUS_CHILL_OUT) {
|
if (icon->flags & STATUS_ICON_FLAG_STATUS_CHILL_OUT) {
|
||||||
set_hud_element_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status4.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
if (iconCounter == 2) {
|
if (iconCounter == 2) {
|
||||||
@ -721,15 +721,15 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status4.activeElementID;
|
elementId = icon->status4.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
iconCounter++;
|
iconCounter++;
|
||||||
isActiveDrawn = 1;
|
isActiveDrawn = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (icon->status4.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
if (icon->status4.removingTask == STATUS_ICON_TASK_DRAW && (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1)) {
|
||||||
clear_hud_element_flags(icon->status4.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->status4.removingElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
offsetY = 0;
|
offsetY = 0;
|
||||||
if (iconCounter == 2) {
|
if (iconCounter == 2) {
|
||||||
@ -752,84 +752,84 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90));
|
add_vec2D_polar(&x, &z, icon->status4Radius, clamp_angle(camera->currentYaw + 90));
|
||||||
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->status4.removingElementID;
|
elementId = icon->status4.removingElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX - 8, screenY - 8);
|
hud_element_set_render_pos(elementId, screenX - 8, screenY - 8);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (icon->boostJump.active) {
|
if (icon->boostJump.active) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_BOOST_JUMP) {
|
if (icon->flags & STATUS_ICON_FLAG_BOOST_JUMP) {
|
||||||
set_hud_element_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->boostJump.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->boostJump.activeElementID;
|
elementId = icon->boostJump.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 12);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
if (icon->boostJump.removing) {
|
if (icon->boostJump.removing) {
|
||||||
clear_hud_element_flags(icon->prevIndexBoostJump, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->prevIndexBoostJump, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->prevIndexBoostJump;
|
elementId = icon->prevIndexBoostJump;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 12);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (icon->boostHammer.active) {
|
if (icon->boostHammer.active) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_BOOST_HAMMER) {
|
if (icon->flags & STATUS_ICON_FLAG_BOOST_HAMMER) {
|
||||||
set_hud_element_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->boostHammer.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->boostHammer.activeElementID;
|
elementId = icon->boostHammer.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 12);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
|
|
||||||
if (icon->boostHammer.removing) {
|
if (icon->boostHammer.removing) {
|
||||||
clear_hud_element_flags(icon->prevIndexBoostHammer, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->prevIndexBoostHammer, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->prevIndexBoostHammer;
|
elementId = icon->prevIndexBoostHammer;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 12);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
if (icon->boostPartner.active) {
|
if (icon->boostPartner.active) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_BOOST_PARTNER) {
|
if (icon->flags & STATUS_ICON_FLAG_BOOST_PARTNER) {
|
||||||
set_hud_element_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->boostPartner.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->boostPartner.activeElementID;
|
elementId = icon->boostPartner.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 12);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 12);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
@ -837,17 +837,17 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
do {
|
do {
|
||||||
if (icon->surprise.active) {
|
if (icon->surprise.active) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_SURPRISE) {
|
if (icon->flags & STATUS_ICON_FLAG_SURPRISE) {
|
||||||
set_hud_element_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->surprise.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->surprise.activeElementID;
|
elementId = icon->surprise.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 15);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 15);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
@ -855,17 +855,17 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
do {
|
do {
|
||||||
if (icon->peril.active) {
|
if (icon->peril.active) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_PERIL) {
|
if (icon->flags & STATUS_ICON_FLAG_PERIL) {
|
||||||
set_hud_element_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->peril.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->peril.activeElementID;
|
elementId = icon->peril.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 16);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 16);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
@ -873,17 +873,17 @@ void draw_all_status_icons(PopupMessage* popup) {
|
|||||||
do {
|
do {
|
||||||
if (icon->danger.active) {
|
if (icon->danger.active) {
|
||||||
if (icon->flags & STATUS_ICON_FLAG_DANGER) {
|
if (icon->flags & STATUS_ICON_FLAG_DANGER) {
|
||||||
set_hud_element_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
} else if (icon->flags & STATUS_ICON_FLAG_BATTLE || gGameStatusPtr->isBattle != 1) {
|
||||||
clear_hud_element_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(icon->danger.activeElementID, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
x = icon->worldPos.x;
|
x = icon->worldPos.x;
|
||||||
z = icon->worldPos.z;
|
z = icon->worldPos.z;
|
||||||
|
|
||||||
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
get_screen_coords(gCurrentCameraID, x, icon->worldPos.y + icon->offsetY, z, &screenX, &screenY, &screenZ);
|
||||||
elementId = icon->danger.activeElementID;
|
elementId = icon->danger.activeElementID;
|
||||||
set_hud_element_render_pos(elementId, screenX + 2, screenY - 16);
|
hud_element_set_render_pos(elementId, screenX + 2, screenY - 16);
|
||||||
draw_hud_element_2(elementId);
|
hud_element_draw_next(elementId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (0);
|
} while (0);
|
||||||
@ -1112,9 +1112,9 @@ void create_status_icon_boost_jump(s32 iconID) {
|
|||||||
statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_JUMP;
|
statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_JUMP;
|
||||||
if (!statusIcon->boostJump.active) {
|
if (!statusIcon->boostJump.active) {
|
||||||
statusIcon->boostJump.active = TRUE;
|
statusIcon->boostJump.active = TRUE;
|
||||||
hudElement = create_hud_element(&HudScript_BoostJumpBegin);
|
hudElement = hud_element_create(&HudScript_BoostJumpBegin);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
statusIcon->boostJump.activeElementID = hudElement;
|
statusIcon->boostJump.activeElementID = hudElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1127,7 +1127,7 @@ void remove_status_icon_boost_jump(s32 iconID) {
|
|||||||
statusIcon->boostJump.active = FALSE;
|
statusIcon->boostJump.active = FALSE;
|
||||||
statusIcon->boostJump.removing = TRUE;
|
statusIcon->boostJump.removing = TRUE;
|
||||||
statusIcon->prevIndexBoostJump = hudElemIndex;
|
statusIcon->prevIndexBoostJump = hudElemIndex;
|
||||||
set_hud_element_anim(hudElemIndex, &HudScript_BoostJumpEnd);
|
hud_element_set_script(hudElemIndex, &HudScript_BoostJumpEnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1144,9 +1144,9 @@ void create_status_icon_boost_hammer(s32 iconID) {
|
|||||||
statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_HAMMER;
|
statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_HAMMER;
|
||||||
if (!statusIcon->boostHammer.active) {
|
if (!statusIcon->boostHammer.active) {
|
||||||
statusIcon->boostHammer.active = TRUE;
|
statusIcon->boostHammer.active = TRUE;
|
||||||
hudElement = create_hud_element(&HudScript_BoostHammerBegin);
|
hudElement = hud_element_create(&HudScript_BoostHammerBegin);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
statusIcon->boostHammer.activeElementID = hudElement;
|
statusIcon->boostHammer.activeElementID = hudElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1159,7 +1159,7 @@ void remove_status_icon_boost_hammer(s32 iconID) {
|
|||||||
statusIcon->boostHammer.active = FALSE;
|
statusIcon->boostHammer.active = FALSE;
|
||||||
statusIcon->boostHammer.removing = FALSE;
|
statusIcon->boostHammer.removing = FALSE;
|
||||||
statusIcon->prevIndexBoostHammer = hudElemIndex;
|
statusIcon->prevIndexBoostHammer = hudElemIndex;
|
||||||
set_hud_element_anim(hudElemIndex, &HudScript_BoostHammerEnd);
|
hud_element_set_script(hudElemIndex, &HudScript_BoostHammerEnd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1176,9 +1176,9 @@ void create_status_icon_boost_partner(s32 iconID) {
|
|||||||
statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_PARTNER;
|
statusIcon->flags &= ~STATUS_ICON_FLAG_BOOST_PARTNER;
|
||||||
if (!statusIcon->boostPartner.active) {
|
if (!statusIcon->boostPartner.active) {
|
||||||
statusIcon->boostPartner.active = TRUE;
|
statusIcon->boostPartner.active = TRUE;
|
||||||
hudElement = create_hud_element(&HudScript_BoostPartner);
|
hudElement = hud_element_create(&HudScript_BoostPartner);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
statusIcon->boostPartner.activeElementID = hudElement;
|
statusIcon->boostPartner.activeElementID = hudElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1188,7 +1188,7 @@ void remove_status_icon_boost_partner(s32 iconID) {
|
|||||||
|
|
||||||
if (statusIcon->boostPartner.active) {
|
if (statusIcon->boostPartner.active) {
|
||||||
statusIcon->boostPartner.active = FALSE;
|
statusIcon->boostPartner.active = FALSE;
|
||||||
free_hud_element(statusIcon->boostPartner.activeElementID);
|
hud_element_free(statusIcon->boostPartner.activeElementID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1205,9 +1205,9 @@ void create_status_icon_surprise(s32 iconID) {
|
|||||||
statusIcon->flags &= ~STATUS_ICON_FLAG_SURPRISE;
|
statusIcon->flags &= ~STATUS_ICON_FLAG_SURPRISE;
|
||||||
if (!statusIcon->surprise.active) {
|
if (!statusIcon->surprise.active) {
|
||||||
statusIcon->surprise.active = TRUE;
|
statusIcon->surprise.active = TRUE;
|
||||||
hudElement = create_hud_element(&HudScript_Surprise);
|
hudElement = hud_element_create(&HudScript_Surprise);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
statusIcon->surprise.activeElementID = hudElement;
|
statusIcon->surprise.activeElementID = hudElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1217,7 +1217,7 @@ void remove_status_icon_surprise(s32 iconID) {
|
|||||||
|
|
||||||
if (statusIcon->surprise.active) {
|
if (statusIcon->surprise.active) {
|
||||||
statusIcon->surprise.active = FALSE;
|
statusIcon->surprise.active = FALSE;
|
||||||
free_hud_element(statusIcon->surprise.activeElementID);
|
hud_element_free(statusIcon->surprise.activeElementID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1234,9 +1234,9 @@ void create_status_icon_peril(s32 iconID) {
|
|||||||
statusIcon->flags &= ~STATUS_ICON_FLAG_PERIL;
|
statusIcon->flags &= ~STATUS_ICON_FLAG_PERIL;
|
||||||
if (!statusIcon->peril.active) {
|
if (!statusIcon->peril.active) {
|
||||||
statusIcon->peril.active = TRUE;
|
statusIcon->peril.active = TRUE;
|
||||||
hudElement = create_hud_element(&HudScript_Peril);
|
hudElement = hud_element_create(&HudScript_Peril);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
statusIcon->peril.activeElementID = hudElement;
|
statusIcon->peril.activeElementID = hudElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1246,7 +1246,7 @@ void remove_status_icon_peril(s32 iconID) {
|
|||||||
|
|
||||||
if (statusIcon->peril.active) {
|
if (statusIcon->peril.active) {
|
||||||
statusIcon->peril.active = FALSE;
|
statusIcon->peril.active = FALSE;
|
||||||
free_hud_element(statusIcon->peril.activeElementID);
|
hud_element_free(statusIcon->peril.activeElementID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1263,9 +1263,9 @@ void create_status_icon_danger(s32 iconID) {
|
|||||||
statusIcon->flags &= ~STATUS_ICON_FLAG_DANGER;
|
statusIcon->flags &= ~STATUS_ICON_FLAG_DANGER;
|
||||||
if (!statusIcon->danger.active) {
|
if (!statusIcon->danger.active) {
|
||||||
statusIcon->danger.active = TRUE;
|
statusIcon->danger.active = TRUE;
|
||||||
hudElement = create_hud_element(&HudScript_Danger);
|
hudElement = hud_element_create(&HudScript_Danger);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
set_hud_element_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
||||||
statusIcon->danger.activeElementID = hudElement;
|
statusIcon->danger.activeElementID = hudElement;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1275,7 +1275,7 @@ void remove_status_icon_danger(s32 iconID) {
|
|||||||
|
|
||||||
if (statusIcon->danger.active) {
|
if (statusIcon->danger.active) {
|
||||||
statusIcon->danger.active = FALSE;
|
statusIcon->danger.active = FALSE;
|
||||||
free_hud_element(statusIcon->danger.activeElementID);
|
hud_element_free(statusIcon->danger.activeElementID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,10 +1,27 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "world/actions.h"
|
#include "world/actions.h"
|
||||||
|
|
||||||
s32 D_802B6300_E248D0[] = {
|
s32 State18PeachAnims[] = {
|
||||||
0x000A0002, 0x000A002B, 0x000A002D, 0x000A002F, 0x000A0031, 0x000A0033, 0x000A0035, 0x000A0037, 0x000A0039,
|
0x000A0002, // none
|
||||||
0x000A003B, 0x000A003D, 0x000A003F, 0x000A0041, 0x000A0043, 0x000A0045, 0x000A0047, 0x000A0049, 0x000A004B,
|
0x000A002B, // cream
|
||||||
0x000A004D
|
0x000A002D, // strawberry
|
||||||
|
0x000A002F, // butter
|
||||||
|
0x000A0031, // cleanser
|
||||||
|
0x000A0033, // water
|
||||||
|
0x000A0035, // milk
|
||||||
|
0x000A0037, // flour
|
||||||
|
0x000A0039, // egg
|
||||||
|
0x000A003B, // complete cake
|
||||||
|
0x000A003D, // cake bowl
|
||||||
|
0x000A003F, // cake mixed
|
||||||
|
0x000A0041, // cake pan
|
||||||
|
0x000A0043, // cake batter
|
||||||
|
0x000A0045, // cake bare
|
||||||
|
0x000A0047, // salt
|
||||||
|
0x000A0049, // sugar
|
||||||
|
0x000A004B, // cake with icing
|
||||||
|
0x000A004D, // cake with berries
|
||||||
|
0x00000000
|
||||||
};
|
};
|
||||||
|
|
||||||
void func_802B6000_E245D0(void) {
|
void func_802B6000_E245D0(void) {
|
||||||
@ -61,12 +78,12 @@ void func_802B6000_E245D0(void) {
|
|||||||
void func_802B6198_E24768(void) {
|
void func_802B6198_E24768(void) {
|
||||||
if (!(gPlayerStatus.animFlags & 0x2000)) {
|
if (!(gPlayerStatus.animFlags & 0x2000)) {
|
||||||
if (!(gGameStatusPtr->peachFlags & 0x10)) {
|
if (!(gGameStatusPtr->peachFlags & 0x10)) {
|
||||||
suggest_player_anim_clearUnkFlag((D_802B6300_E248D0)[gGameStatusPtr->peachAnimIdx]);
|
suggest_player_anim_clearUnkFlag((State18PeachAnims)[gGameStatusPtr->peachCookingIngredient]);
|
||||||
} else {
|
} else {
|
||||||
suggest_player_anim_clearUnkFlag(0xD000D); // doood
|
suggest_player_anim_clearUnkFlag(0xD000D); // doood
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
peach_set_disguise_anim(world_actions_peachDisguises[gPlayerStatus.peachDisguise].unk_04);
|
peach_set_disguise_anim(BasicPeachDisguiseAnims[gPlayerStatus.peachDisguise].walk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,12 +93,12 @@ void func_802B6230_E24800(void) {
|
|||||||
if (playerStatus->flags < 0) {
|
if (playerStatus->flags < 0) {
|
||||||
playerStatus->flags &= ~0x80000000;
|
playerStatus->flags &= ~0x80000000;
|
||||||
suggest_player_anim_clearUnkFlag(0xA0005);
|
suggest_player_anim_clearUnkFlag(0xA0005);
|
||||||
playerStatus->framesOnGround = 8;
|
playerStatus->currentStateTime = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->framesOnGround != 0) {
|
if (playerStatus->currentStateTime != 0) {
|
||||||
playerStatus->framesOnGround--;
|
playerStatus->currentStateTime--;
|
||||||
if (playerStatus->framesOnGround == 4) {
|
if (playerStatus->currentStateTime == 4) {
|
||||||
try_player_footstep_sounds(1);
|
try_player_footstep_sounds(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -134,20 +134,20 @@ void func_802B6350_E28D80(void) {
|
|||||||
if (playerStatus->flags < 0) {
|
if (playerStatus->flags < 0) {
|
||||||
playerStatus->flags &= ~(0x80000000 | 0x80000 | 0x8 | 0x4 | 0x2);
|
playerStatus->flags &= ~(0x80000000 | 0x80000 | 0x8 | 0x4 | 0x2);
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->unk_8C = 0.0f;
|
playerStatus->pitch = 0.0f;
|
||||||
|
|
||||||
if (playerStatus->animFlags & 0x1000) {
|
if (playerStatus->animFlags & 0x1000) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
playerStatus->framesOnGround = 5;
|
playerStatus->currentStateTime = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->framesOnGround--;
|
playerStatus->currentStateTime--;
|
||||||
if (playerStatus->framesOnGround == 0) {
|
if (playerStatus->currentStateTime == 0) {
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -161,13 +161,13 @@ void func_802B63D4_E28E04(void) {
|
|||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->unk_8C = 0.0f;
|
playerStatus->pitch = 0.0f;
|
||||||
suggest_player_anim_setUnkFlag(0x10017);
|
suggest_player_anim_setUnkFlag(0x10017);
|
||||||
playerStatus->framesOnGround = 30;
|
playerStatus->currentStateTime = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->framesOnGround != 0) {
|
if (playerStatus->currentStateTime != 0) {
|
||||||
playerStatus->framesOnGround--;
|
playerStatus->currentStateTime--;
|
||||||
} else if (!gGameStatusPtr->isBattle) {
|
} else if (!gGameStatusPtr->isBattle) {
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
}
|
}
|
||||||
@ -179,10 +179,10 @@ void func_802B6478_E28EA8(void) {
|
|||||||
if (playerStatus->flags < 0) {
|
if (playerStatus->flags < 0) {
|
||||||
playerStatus->flags &= ~0x80000000;
|
playerStatus->flags &= ~0x80000000;
|
||||||
playerStatus->flags |= 0x80000;
|
playerStatus->flags |= 0x80000;
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->unk_8C = 0.0f;
|
playerStatus->pitch = 0.0f;
|
||||||
suggest_player_anim_setUnkFlag(0x1001F);
|
suggest_player_anim_setUnkFlag(0x1001F);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ void func_802B6508_E28F38(void) {
|
|||||||
playerStatus->flags &= ~0x80000000;
|
playerStatus->flags &= ~0x80000000;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->unk_60 = 0;
|
playerStatus->unk_60 = 0;
|
||||||
playerStatus->framesOnGround = 5;
|
playerStatus->currentStateTime = 5;
|
||||||
player_input_to_move_vector(&angle, &magnitude);
|
player_input_to_move_vector(&angle, &magnitude);
|
||||||
|
|
||||||
if (((angle >= 45.0f) && (angle <= 135.0f)) || ((angle >= 225.0f) && (angle <= 315.0f))) {
|
if (((angle >= 45.0f) && (angle <= 135.0f)) || ((angle >= 225.0f) && (angle <= 315.0f))) {
|
||||||
@ -215,9 +215,9 @@ void func_802B6508_E28F38(void) {
|
|||||||
check_input_jump();
|
check_input_jump();
|
||||||
|
|
||||||
if (playerStatus->animFlags & 0x800000) {
|
if (playerStatus->animFlags & 0x800000) {
|
||||||
if (playerStatus->framesOnGround != 0) {
|
if (playerStatus->currentStateTime != 0) {
|
||||||
playerStatus->framesOnGround--;
|
playerStatus->currentStateTime--;
|
||||||
if (playerStatus->framesOnGround == 0) {
|
if (playerStatus->currentStateTime == 0) {
|
||||||
set_action_state(ACTION_STATE_IDLE);
|
set_action_state(ACTION_STATE_IDLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -238,20 +238,20 @@ void func_802B6638_E29068(void) {
|
|||||||
if (!(playerStatus->animFlags & 0x2000)) {
|
if (!(playerStatus->animFlags & 0x2000)) {
|
||||||
suggest_player_anim_setUnkFlag(0xC0000);
|
suggest_player_anim_setUnkFlag(0xC0000);
|
||||||
} else {
|
} else {
|
||||||
peach_set_disguise_anim(world_actions_peachDisguises[playerStatus->peachDisguise].unk_0C);
|
peach_set_disguise_anim(BasicPeachDisguiseAnims[playerStatus->peachDisguise].talk);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
playerStatus->framesOnGround = 30;
|
playerStatus->currentStateTime = 30;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & 0x1000) {
|
if (playerStatus->animFlags & 0x1000) {
|
||||||
if (playerStatus->framesOnGround != 0) {
|
if (playerStatus->currentStateTime != 0) {
|
||||||
playerStatus->framesOnGround--;
|
playerStatus->currentStateTime--;
|
||||||
} else if (playerStatus->unk_C4 == 0) {
|
} else if (playerStatus->unk_C4 == 0) {
|
||||||
if (!(playerStatus->animFlags & 0x2000)) {
|
if (!(playerStatus->animFlags & 0x2000)) {
|
||||||
suggest_player_anim_setUnkFlag(0xA0001);
|
suggest_player_anim_setUnkFlag(0xA0001);
|
||||||
} else {
|
} else {
|
||||||
peach_set_disguise_anim(world_actions_peachDisguises[playerStatus->peachDisguise].idle);
|
peach_set_disguise_anim(BasicPeachDisguiseAnims[playerStatus->peachDisguise].idle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,62 +1,59 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
typedef struct HammerUnk {
|
typedef struct HammerHitData {
|
||||||
/* 0x00 */ Vec3f unk_00;
|
/* 0x00 */ Vec3f hitPos;
|
||||||
/* 0x0C */ s32 unk_0C;
|
/* 0x0C */ s32 unk_0C;
|
||||||
/* 0x10 */ s32 unk_10;
|
/* 0x10 */ s32 hitID;
|
||||||
/* 0x14 */ s32 unk_14;
|
/* 0x14 */ s32 unk_14;
|
||||||
/* 0x18 */ s32 unk_18;
|
/* 0x18 */ s32 timer;
|
||||||
/* 0x1C */ s32 unk_1C;
|
/* 0x1C */ s32 unk_1C;
|
||||||
} HammerUnk;
|
} HammerHitData;
|
||||||
|
|
||||||
extern HammerUnk* D_802B6DB0_E25C80;
|
extern HammerHitData* HammerHit;
|
||||||
|
|
||||||
s32 func_802B6000_E24ED0(s32 arg0) {
|
s32 action_hammer_is_swinging_away(s32 animID) {
|
||||||
if (arg0 & 0x1000000) {
|
if (animID & 0x1000000) {
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (arg0 + ~0x6000F) {
|
// away-facing swing anims
|
||||||
case 1:
|
switch (animID) {
|
||||||
case 3:
|
case 0x60011:
|
||||||
case 5:
|
case 0x60013:
|
||||||
case 7:
|
case 0x60015:
|
||||||
case 9:
|
case 0x60017:
|
||||||
case 11:
|
case 0x60019:
|
||||||
|
case 0x6001B:
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802B6048_E24F18(s32 arg0) {
|
void action_hammer_play_hit_fx(s32 hitID) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
f32 phi_f24;
|
f32 shakeAmt;
|
||||||
s32 s2temp;
|
s32 time;
|
||||||
s32 phi_s1;
|
s32 radius;
|
||||||
s32 soundID;
|
s32 soundID;
|
||||||
f32 theta;
|
f32 theta, sinTheta, cosTheta;
|
||||||
f32 sinTheta;
|
s32 numParticles;
|
||||||
f32 cosTheta;
|
f32 x, y, z;
|
||||||
s32 phi_s3;
|
|
||||||
f32 xTemp;
|
|
||||||
f32 yTemp;
|
|
||||||
f32 zTemp;
|
|
||||||
|
|
||||||
if (gPlayerData.hammerLevel == 2) {
|
if (gPlayerData.hammerLevel == 2) {
|
||||||
phi_f24 = 1.2f;
|
shakeAmt = 1.2f;
|
||||||
s2temp = 1;
|
time = 1;
|
||||||
phi_s1 = 28;
|
radius = 28;
|
||||||
soundID = 0x211A;
|
soundID = 0x211A;
|
||||||
} else if (gPlayerData.hammerLevel == 1) {
|
} else if (gPlayerData.hammerLevel == 1) {
|
||||||
phi_f24 = 0.8f;
|
shakeAmt = 0.8f;
|
||||||
s2temp = 1;
|
time = 1;
|
||||||
phi_s1 = 16;
|
radius = 16;
|
||||||
soundID = 0x2119;
|
soundID = 0x2119;
|
||||||
} else {
|
} else {
|
||||||
phi_f24 = 0.4f;
|
shakeAmt = 0.4f;
|
||||||
s2temp = 1;
|
time = 1;
|
||||||
phi_s1 = 4;
|
radius = 4;
|
||||||
soundID = 0x2118;
|
soundID = 0x2118;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -64,21 +61,21 @@ void func_802B6048_E24F18(s32 arg0) {
|
|||||||
sinTheta = sin_rad(theta) * 25.0f;
|
sinTheta = sin_rad(theta) * 25.0f;
|
||||||
cosTheta = cos_rad(theta) * -25.0f;
|
cosTheta = cos_rad(theta) * -25.0f;
|
||||||
|
|
||||||
if (arg0 < 0) {
|
if (hitID < 0) {
|
||||||
phi_s3 = 6;
|
numParticles = 6;
|
||||||
xTemp = playerStatus->position.x + sinTheta;
|
x = playerStatus->position.x + sinTheta;
|
||||||
yTemp = playerStatus->position.y;
|
y = playerStatus->position.y;
|
||||||
zTemp = playerStatus->position.z + cosTheta;
|
z = playerStatus->position.z + cosTheta;
|
||||||
} else {
|
} else {
|
||||||
phi_s3 = 3;
|
numParticles = 3;
|
||||||
xTemp = D_802B6DB0_E25C80->unk_00.x + sinTheta;
|
x = HammerHit->hitPos.x + sinTheta;
|
||||||
yTemp = D_802B6DB0_E25C80->unk_00.y + playerStatus->colliderHeight - 5.0f;
|
y = HammerHit->hitPos.y + playerStatus->colliderHeight - 5.0f;
|
||||||
zTemp = D_802B6DB0_E25C80->unk_00.z + cosTheta;
|
z = HammerHit->hitPos.z + cosTheta;
|
||||||
phi_s1 = 1;
|
radius = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
exec_ShakeCamX(0, 2, s2temp, phi_f24);
|
exec_ShakeCamX(0, 2, time, shakeAmt);
|
||||||
fx_smoke_impact(0, xTemp, yTemp, zTemp, phi_s1, phi_s3, 0, (s2temp + 3) * 3);
|
fx_smoke_impact(0, x, y, z, radius, numParticles, 0, (time + 3) * 3);
|
||||||
|
|
||||||
switch (is_ability_active(ABILITY_ATTACK_FX)) {
|
switch (is_ability_active(ABILITY_ATTACK_FX)) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -107,41 +104,41 @@ void func_802B6048_E24F18(s32 arg0) {
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/action/hammer", func_802B62A4_E25174);
|
INCLUDE_ASM(s32, "world/action/hammer", func_802B62A4_E25174);
|
||||||
|
|
||||||
void func_802B66A8_E25578(void) {
|
void action_hammer_update(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
|
|
||||||
D_802B6DB0_E25C80->unk_1C = 0;
|
HammerHit->unk_1C = 0;
|
||||||
|
|
||||||
if (playerStatus->flags < 0) {
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
s32 animID;
|
s32 animID;
|
||||||
s32 soundID;
|
s32 soundID;
|
||||||
|
|
||||||
playerStatus->flags &= ~0x80000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->flags |= 0x200000;
|
playerStatus->flags |= PLAYER_STATUS_FLAGS_200000;
|
||||||
D_802B6DB0_E25C80->unk_18 = 0;
|
HammerHit->timer = 0;
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->unk_BC = 0;
|
playerStatus->unk_BC = 0;
|
||||||
D_802B6DB0_E25C80->unk_10 = func_802B62A4_E25174(D_802B6DB0_E25C80);
|
HammerHit->hitID = func_802B62A4_E25174(HammerHit);
|
||||||
|
|
||||||
if (gPlayerData.hammerLevel == 2) {
|
if (gPlayerData.hammerLevel == 2) {
|
||||||
soundID = 0x2117;
|
soundID = 0x2117;
|
||||||
animID = 0x6001A;
|
animID = 0x6001A;
|
||||||
if (D_802B6DB0_E25C80->unk_10 < 0) {
|
if (HammerHit->hitID < 0) {
|
||||||
animID = 0x60018;
|
|
||||||
soundID = 0x2117;
|
soundID = 0x2117;
|
||||||
|
animID = 0x60018;
|
||||||
}
|
}
|
||||||
} else if (gPlayerData.hammerLevel == 1) {
|
} else if (gPlayerData.hammerLevel == 1) {
|
||||||
soundID = 0x2116;
|
soundID = 0x2116;
|
||||||
animID = 0x60016;
|
animID = 0x60016;
|
||||||
if (D_802B6DB0_E25C80->unk_10 < 0) {
|
if (HammerHit->hitID < 0) {
|
||||||
soundID = 0x2116;
|
soundID = 0x2116;
|
||||||
animID = 0x60014;
|
animID = 0x60014;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
soundID = 0x2115;
|
soundID = 0x2115;
|
||||||
animID = 0x60012;
|
animID = 0x60012;
|
||||||
if (D_802B6DB0_E25C80->unk_10 < 0) {
|
if (HammerHit->hitID < 0) {
|
||||||
soundID = 0x2115;
|
soundID = 0x2115;
|
||||||
animID = 0x60010;
|
animID = 0x60010;
|
||||||
}
|
}
|
||||||
@ -149,17 +146,17 @@ void func_802B66A8_E25578(void) {
|
|||||||
|
|
||||||
suggest_player_anim_clearUnkFlag(animID);
|
suggest_player_anim_clearUnkFlag(animID);
|
||||||
sfx_play_sound_at_player(soundID, 0);
|
sfx_play_sound_at_player(soundID, 0);
|
||||||
D_802B6DB0_E25C80->unk_0C = 0;
|
HammerHit->unk_0C = 0;
|
||||||
D_802B6DB0_E25C80->unk_14 = 0;
|
HammerHit->unk_14 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->flags &= ~0x1000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_1000000;
|
||||||
if (D_802B6DB0_E25C80->unk_18 < 3 && (playerStatus->flags & 0x40000)) {
|
if (HammerHit->timer < 3 && (playerStatus->flags & PLAYER_STATUS_FLAGS_40000)) {
|
||||||
playerStatus->flags |= 0x20000000;
|
playerStatus->flags |= PLAYER_STATUS_FLAGS_20000000;
|
||||||
} else if (D_802B6DB0_E25C80->unk_18 < 2) {
|
} else if (HammerHit->timer < 2) {
|
||||||
D_802B6DB0_E25C80->unk_18++;
|
HammerHit->timer++;
|
||||||
} else {
|
} else {
|
||||||
func_802B6820_E256F0(D_802B6DB0_E25C80);
|
func_802B6820_E256F0(HammerHit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@ void func_802B6000_E27C90(void) {
|
|||||||
f32 cosTheta;
|
f32 cosTheta;
|
||||||
f32 speed;
|
f32 speed;
|
||||||
|
|
||||||
if (playerStatus->flags < 0) {
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~0x80000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->animFlags |= 4;
|
playerStatus->animFlags |= PLAYER_STATUS_ANIM_FLAGS_4;
|
||||||
playerStatus->flags |= (0x800 | 0x8);
|
playerStatus->flags |= (PLAYER_STATUS_FLAGS_800 | PLAYER_STATUS_FLAGS_FLYING);
|
||||||
suggest_player_anim_setUnkFlag(0x10019);
|
suggest_player_anim_setUnkFlag(0x10019);
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->gravityIntegrator[0] = 18.3473f;
|
playerStatus->gravityIntegrator[0] = 18.3473f;
|
||||||
@ -50,7 +50,7 @@ void func_802B6000_E27C90(void) {
|
|||||||
if (collider >= 0) {
|
if (collider >= 0) {
|
||||||
collider = get_collider_type_by_id(collider);
|
collider = get_collider_type_by_id(collider);
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
playerStatus->unk_10 = 60;
|
playerStatus->blinkTimer = 60;
|
||||||
playerStatus->unk_BF = 0;
|
playerStatus->unk_BF = 0;
|
||||||
playerStatus->flags &= ~0x800;
|
playerStatus->flags &= ~0x800;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
|
@ -25,7 +25,7 @@ void func_802B6000_E27F40(void) {
|
|||||||
playerStatus->flags |= 0x800;
|
playerStatus->flags |= 0x800;
|
||||||
if (playerStatus->unk_BF == 1) {
|
if (playerStatus->unk_BF == 1) {
|
||||||
playerStatus->fallState = 0x14;
|
playerStatus->fallState = 0x14;
|
||||||
playerStatus->framesOnGround = 2;
|
playerStatus->currentStateTime = 2;
|
||||||
} else {
|
} else {
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
}
|
}
|
||||||
@ -43,12 +43,12 @@ void func_802B6000_E27F40(void) {
|
|||||||
|
|
||||||
switch (playerStatus->fallState) {
|
switch (playerStatus->fallState) {
|
||||||
case 21:
|
case 21:
|
||||||
if (--playerStatus->framesOnGround == -1) {
|
if (--playerStatus->currentStateTime == -1) {
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 20:
|
case 20:
|
||||||
if (--playerStatus->framesOnGround == -1) {
|
if (--playerStatus->currentStateTime == -1) {
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
}
|
}
|
||||||
playerStatus->position.y -= 4.0f;
|
playerStatus->position.y -= 4.0f;
|
||||||
@ -62,17 +62,17 @@ void func_802B6000_E27F40(void) {
|
|||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->fallState = 2;
|
playerStatus->fallState = 2;
|
||||||
playerStatus->framesOnGround = 1;
|
playerStatus->currentStateTime = 1;
|
||||||
playerStatus->gravityIntegrator[0] = 20.0f;
|
playerStatus->gravityIntegrator[0] = 20.0f;
|
||||||
playerStatus->gravityIntegrator[2] = 250.0f;
|
playerStatus->gravityIntegrator[2] = 250.0f;
|
||||||
playerStatus->gravityIntegrator[3] = D_802B68BC;
|
playerStatus->gravityIntegrator[3] = D_802B68BC;
|
||||||
playerStatus->unk_3C = playerStatus->position.x;
|
playerStatus->jumpFromPos.x = playerStatus->position.x;
|
||||||
playerStatus->unk_40 = playerStatus->position.z;
|
playerStatus->jumpFromPos.z = playerStatus->position.z;
|
||||||
playerStatus->unk_4C = playerStatus->position.y;
|
playerStatus->jumpFromHeight = playerStatus->position.y;
|
||||||
playerStatus->flags |= 0x2;
|
playerStatus->flags |= 0x2;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (--playerStatus->framesOnGround << 16 <= 0) {
|
if (--playerStatus->currentStateTime << 16 <= 0) {
|
||||||
playerStatus->fallState++;
|
playerStatus->fallState++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -180,12 +180,12 @@ void func_802B6000_E27F40(void) {
|
|||||||
playerStatus->gravityIntegrator[0] = tempGravityIntegrator;
|
playerStatus->gravityIntegrator[0] = tempGravityIntegrator;
|
||||||
playerStatus->position.y = player_check_collision_below(tempGravityIntegrator, &sp2C);
|
playerStatus->position.y = player_check_collision_below(tempGravityIntegrator, &sp2C);
|
||||||
if (sp2C >= 0) {
|
if (sp2C >= 0) {
|
||||||
playerStatus->framesOnGround = 0xA;
|
playerStatus->currentStateTime = 0xA;
|
||||||
playerStatus->fallState++;
|
playerStatus->fallState++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8:
|
case 8:
|
||||||
if (--playerStatus->framesOnGround << 16 <= 0) {
|
if (--playerStatus->currentStateTime << 16 <= 0) {
|
||||||
set_action_state(ACTION_STATE_LAND);
|
set_action_state(ACTION_STATE_LAND);
|
||||||
playerStatus->flags &= ~0x800000;
|
playerStatus->flags &= ~0x800000;
|
||||||
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
gOverrideFlags &= ~GLOBAL_OVERRIDES_40;
|
||||||
|
@ -1,40 +1,59 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "../actions.h"
|
#include "../actions.h"
|
||||||
|
|
||||||
s32 world_action_idle_peachAnims[] = {
|
s32 IdlePeachAnims[] = {
|
||||||
0x000A0001, // Idle
|
0x000A0001, // none
|
||||||
|
0x000A0007, // cream
|
||||||
// Cooking:
|
0x000A0009, // strawberry
|
||||||
0x000A0007, 0x000A0009, 0x000A000B, 0x000A000D, 0x000A000F, 0x000A0011, 0x000A0013,
|
0x000A000B, // butter
|
||||||
0x000A0015, 0x000A0017, 0x000A0019, 0x000A001B, 0x000A001D, 0x000A001F, 0x000A0021, 0x000A0023,
|
0x000A000D, // cleanser
|
||||||
0x000A0025, 0x000A0027, 0x000A0029, 0x00000000,
|
0x000A000F, // water
|
||||||
|
0x000A0011, // milk
|
||||||
|
0x000A0013, // flour
|
||||||
|
0x000A0015, // egg
|
||||||
|
0x000A0017, // complete cake
|
||||||
|
0x000A0019, // cake bowl
|
||||||
|
0x000A001B, // cake mixed
|
||||||
|
0x000A001D, // cake pan
|
||||||
|
0x000A001F, // cake batter
|
||||||
|
0x000A0021, // cake bare
|
||||||
|
0x000A0023, // salt
|
||||||
|
0x000A0025, // sugar
|
||||||
|
0x000A0027, // cake with icing
|
||||||
|
0x000A0029, // cake with berries
|
||||||
|
0x00000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
void func_802B61E4_E23444(void);
|
void action_idle_update_peach(void);
|
||||||
|
|
||||||
void world_action_idle_update(void) {
|
void action_idle_update(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
s32 wasMoving = FALSE;
|
s32 wasMoving = FALSE;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS) {
|
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_USING_PEACH_PHYSICS) {
|
||||||
func_802B61E4_E23444();
|
action_idle_update_peach();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->framesOnGround++;
|
playerStatus->currentStateTime++;
|
||||||
|
|
||||||
if (playerStatus->flags & 0x80000000) {
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
s32 anim;
|
s32 anim;
|
||||||
|
|
||||||
playerStatus->flags &= ~0x8008000E;
|
playerStatus->flags &=
|
||||||
|
~(PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED
|
||||||
|
| PLAYER_STATUS_FLAGS_80000
|
||||||
|
| PLAYER_STATUS_FLAGS_JUMPING
|
||||||
|
| PLAYER_STATUS_FLAGS_FALLING
|
||||||
|
| PLAYER_STATUS_FLAGS_FLYING);
|
||||||
wasMoving = TRUE;
|
wasMoving = TRUE;
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->unk_8C = 0.0f;
|
playerStatus->pitch = 0.0f;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) {
|
||||||
anim = 0x90002;
|
anim = 0x90002;
|
||||||
@ -48,8 +67,8 @@ void world_action_idle_update(void) {
|
|||||||
suggest_player_anim_clearUnkFlag(anim);
|
suggest_player_anim_clearUnkFlag(anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_GET_STAR_SPIRIT) {
|
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_RAISED_ARMS) {
|
||||||
set_action_state(ACTION_STATE_GET_STAR_SPIRIT);
|
set_action_state(ACTION_STATE_RAISE_ARMS);
|
||||||
} else {
|
} else {
|
||||||
f32 angle;
|
f32 angle;
|
||||||
f32 magnitude;
|
f32 magnitude;
|
||||||
@ -65,72 +84,75 @@ void world_action_idle_update(void) {
|
|||||||
if (magnitude == 0.0f) {
|
if (magnitude == 0.0f) {
|
||||||
playerData->idleFrameCounter++;
|
playerData->idleFrameCounter++;
|
||||||
} else {
|
} else {
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
set_action_state(ACTION_STATE_WALK);
|
set_action_state(ACTION_STATE_WALK);
|
||||||
if (magnitude != 0.0f) {
|
if (magnitude != 0.0f) {
|
||||||
playerStatus->targetYaw = angle;
|
playerStatus->targetYaw = angle;
|
||||||
playerStatus->animFlags &= ~0x80000000;
|
playerStatus->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_80000000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802B61E4_E23444(void) {
|
void action_idle_update_peach(void) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
f32 angle;
|
f32 angle;
|
||||||
f32 magnitude;
|
f32 magnitude;
|
||||||
|
|
||||||
if (playerStatus->flags & 0x80000000) {
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~0x80000000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED;
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
playerStatus->flags &= ~0xE;
|
playerStatus->flags &=
|
||||||
|
~(PLAYER_STATUS_FLAGS_JUMPING
|
||||||
|
| PLAYER_STATUS_FLAGS_FALLING
|
||||||
|
| PLAYER_STATUS_FLAGS_FLYING);
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_IN_DISGUISE)) {
|
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_IN_DISGUISE)) {
|
||||||
if (!(gGameStatusPtr->peachFlags & 0x10)) {
|
if (!(gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_HAS_INGREDIENT)) {
|
||||||
suggest_player_anim_clearUnkFlag(world_action_idle_peachAnims[gGameStatusPtr->peachAnimIdx]);
|
suggest_player_anim_clearUnkFlag(IdlePeachAnims[gGameStatusPtr->peachCookingIngredient]);
|
||||||
} else {
|
} else {
|
||||||
suggest_player_anim_clearUnkFlag(0xC000E);
|
suggest_player_anim_clearUnkFlag(0xC000E);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
peach_set_disguise_anim(world_actions_peachDisguises[gPlayerStatus.peachDisguise].idle);
|
peach_set_disguise_anim(BasicPeachDisguiseAnims[gPlayerStatus.peachDisguise].idle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(playerStatus->animFlags & 0x2000)) {
|
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_IN_DISGUISE)) {
|
||||||
switch (playerStatus->fallState) {
|
switch (playerStatus->fallState) {
|
||||||
case 0:
|
case 0:
|
||||||
if (((playerStatus->flags & 0x3000) == 0) && (playerStatus->unk_C4 == 0)) {
|
if (!(playerStatus->flags & (PLAYER_STATUS_FLAGS_1000 | PLAYER_STATUS_FLAGS_INPUT_DISABLED)) && (playerStatus->unk_C4 == 0)) {
|
||||||
if (playerStatus->framesOnGround > 1800) {
|
if (playerStatus->currentStateTime > 1800) {
|
||||||
playerStatus->fallState++;
|
playerStatus->fallState++;
|
||||||
suggest_player_anim_clearUnkFlag(0xC0003);
|
suggest_player_anim_clearUnkFlag(0xC0003);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
playerStatus->framesOnGround++;
|
playerStatus->currentStateTime++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
if (playerStatus->unk_BC != 0) {
|
if (playerStatus->unk_BC != 0) {
|
||||||
playerStatus->fallState++;
|
playerStatus->fallState++;
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
suggest_player_anim_clearUnkFlag(0xA0001);
|
suggest_player_anim_clearUnkFlag(0xA0001);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2: {
|
case 2: {
|
||||||
playerStatus->framesOnGround++;
|
playerStatus->currentStateTime++;
|
||||||
if (playerStatus->framesOnGround > 200) {
|
if (playerStatus->currentStateTime > 200) {
|
||||||
playerStatus->fallState++;
|
playerStatus->fallState++;
|
||||||
suggest_player_anim_clearUnkFlag(0xC0003);
|
suggest_player_anim_clearUnkFlag(0xC0003);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
if ((playerStatus->flags & 0x3000) != 0) {
|
if (playerStatus->flags & (PLAYER_STATUS_FLAGS_1000 | PLAYER_STATUS_FLAGS_INPUT_DISABLED)) {
|
||||||
suggest_player_anim_clearUnkFlag(0xA0001);
|
suggest_player_anim_clearUnkFlag(0xA0001);
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
} else if (playerStatus->unk_BC != 0) {
|
} else if (playerStatus->unk_BC != 0) {
|
||||||
@ -144,7 +166,7 @@ void func_802B61E4_E23444(void) {
|
|||||||
phys_update_interact_collider();
|
phys_update_interact_collider();
|
||||||
|
|
||||||
if (magnitude != 0.0f) {
|
if (magnitude != 0.0f) {
|
||||||
playerStatus->framesOnGround = 0;
|
playerStatus->currentStateTime = 0;
|
||||||
playerStatus->targetYaw = angle;
|
playerStatus->targetYaw = angle;
|
||||||
set_action_state(ACTION_STATE_WALK);
|
set_action_state(ACTION_STATE_WALK);
|
||||||
}
|
}
|
||||||
|
@ -16,9 +16,9 @@ void func_802B6000_E24040(void) {
|
|||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->flags &= ~0x80000008;
|
playerStatus->flags &= ~0x80000008;
|
||||||
playerStatus->flags |= 2;
|
playerStatus->flags |= 2;
|
||||||
playerStatus->unk_3C = playerStatus->position.x;
|
playerStatus->jumpFromPos.x = playerStatus->position.x;
|
||||||
playerStatus->unk_40 = playerStatus->position.z;
|
playerStatus->jumpFromPos.z = playerStatus->position.z;
|
||||||
playerStatus->unk_4C = playerStatus->position.y;
|
playerStatus->jumpFromHeight = playerStatus->position.y;
|
||||||
|
|
||||||
phys_init_integrator_for_current_state();
|
phys_init_integrator_for_current_state();
|
||||||
|
|
||||||
|
@ -22,15 +22,15 @@ void func_802B6000_E24920(void) {
|
|||||||
PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED |
|
PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED |
|
||||||
PLAYER_STATUS_FLAGS_800000 |
|
PLAYER_STATUS_FLAGS_800000 |
|
||||||
PLAYER_STATUS_FLAGS_80000 |
|
PLAYER_STATUS_FLAGS_80000 |
|
||||||
PLAYER_STATUS_FLAGS_8 |
|
PLAYER_STATUS_FLAGS_FLYING |
|
||||||
PLAYER_STATUS_FLAGS_FALLING |
|
PLAYER_STATUS_FLAGS_FALLING |
|
||||||
PLAYER_STATUS_FLAGS_JUMPING
|
PLAYER_STATUS_FLAGS_JUMPING
|
||||||
);
|
);
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->decorationPos[0] = playerStatus->position.x;
|
playerStatus->landPos.x = playerStatus->position.x;
|
||||||
playerStatus->decorationPos[1] = playerStatus->position.z;
|
playerStatus->landPos.z = playerStatus->position.z;
|
||||||
|
|
||||||
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) {
|
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) {
|
||||||
phi_a0 = 0x90000;
|
phi_a0 = 0x90000;
|
||||||
@ -90,15 +90,15 @@ void func_802B61C0_E24AE0(void) {
|
|||||||
PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED |
|
PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED |
|
||||||
PLAYER_STATUS_FLAGS_800000 |
|
PLAYER_STATUS_FLAGS_800000 |
|
||||||
PLAYER_STATUS_FLAGS_80000 |
|
PLAYER_STATUS_FLAGS_80000 |
|
||||||
PLAYER_STATUS_FLAGS_8 |
|
PLAYER_STATUS_FLAGS_FLYING |
|
||||||
PLAYER_STATUS_FLAGS_FALLING |
|
PLAYER_STATUS_FLAGS_FALLING |
|
||||||
PLAYER_STATUS_FLAGS_JUMPING
|
PLAYER_STATUS_FLAGS_JUMPING
|
||||||
);
|
);
|
||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->decorationPos[0] = playerStatus->position.x;
|
playerStatus->landPos.x = playerStatus->position.x;
|
||||||
playerStatus->decorationPos[1] = playerStatus->position.z;
|
playerStatus->landPos.z = playerStatus->position.z;
|
||||||
|
|
||||||
if (!(currentCollisionStatus->currentFloor & 0x4000)) {
|
if (!(currentCollisionStatus->currentFloor & 0x4000)) {
|
||||||
phys_adjust_cam_on_landing();
|
phys_adjust_cam_on_landing();
|
||||||
@ -133,9 +133,9 @@ void func_802B62CC_E24BEC(void) {
|
|||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->flags &= ~(PLAYER_STATUS_FLAGS_8 | PLAYER_STATUS_FLAGS_FALLING | PLAYER_STATUS_FLAGS_JUMPING);
|
playerStatus->flags &= ~(PLAYER_STATUS_FLAGS_FLYING | PLAYER_STATUS_FLAGS_FALLING | PLAYER_STATUS_FLAGS_JUMPING);
|
||||||
playerStatus->decorationPos[0] = playerStatus->position.x;
|
playerStatus->landPos.x = playerStatus->position.x;
|
||||||
playerStatus->decorationPos[1] = playerStatus->position.z;
|
playerStatus->landPos.z = playerStatus->position.z;
|
||||||
|
|
||||||
sfx_play_sound_at_player(0x148, 0);
|
sfx_play_sound_at_player(0x148, 0);
|
||||||
|
|
||||||
@ -183,9 +183,9 @@ void func_802B644C_E24D6C(void) {
|
|||||||
playerStatus->fallState = 0;
|
playerStatus->fallState = 0;
|
||||||
playerStatus->decorationList = 0;
|
playerStatus->decorationList = 0;
|
||||||
playerStatus->unk_C2 = 0;
|
playerStatus->unk_C2 = 0;
|
||||||
playerStatus->flags &= ~(PLAYER_STATUS_FLAGS_8 | PLAYER_STATUS_FLAGS_FALLING | PLAYER_STATUS_FLAGS_JUMPING);
|
playerStatus->flags &= ~(PLAYER_STATUS_FLAGS_FLYING | PLAYER_STATUS_FLAGS_FALLING | PLAYER_STATUS_FLAGS_JUMPING);
|
||||||
playerStatus->decorationPos[0] = playerStatus->position.x;
|
playerStatus->landPos.x = playerStatus->position.x;
|
||||||
playerStatus->decorationPos[1] = playerStatus->position.z;
|
playerStatus->landPos.z = playerStatus->position.z;
|
||||||
|
|
||||||
if (!(currentCollisionStatus->currentFloor & 0x4000)) {
|
if (!(currentCollisionStatus->currentFloor & 0x4000)) {
|
||||||
phys_adjust_cam_on_landing();
|
phys_adjust_cam_on_landing();
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user