mirror of
https://github.com/pmret/papermario.git
synced 2024-11-08 12:02:30 +01:00
Misc decomp 70 (#716)
* aura_appendGfx * 3 more action commands * fire_shell * hammer, hurricane * spiny_surge * data stuff, cleanup, whirlwind * warnings * water_block data and func * water_block * effect stuff cleanup * big_snowflakes effect * data cleanup, fpr abi regs * 2 battle item funcs + data * 2 mo * shooting_star func * 3 16F740 funcs * btl_state_update_end_battle * map funcs * more dedupe * cleanin * draw_entity_model_C/D * effect butterflies, btl state funcs * it is done * it is done * PR comments, some cleanup
This commit is contained in:
parent
dcd315865c
commit
021592d219
@ -7,3 +7,4 @@ def apply(config, args):
|
|||||||
config['mapfile'] = f'{ver_dir}build/papermario.map'
|
config['mapfile'] = f'{ver_dir}build/papermario.map'
|
||||||
config['source_directories'] = ['src', f'{ver_dir}asm', 'include', f'{ver_dir}assets']
|
config['source_directories'] = ['src', f'{ver_dir}asm', 'include', f'{ver_dir}assets']
|
||||||
config['make_command'] = ['ninja']
|
config['make_command'] = ['ninja']
|
||||||
|
config['objdump_flags'] = ['-M','reg-names=32']
|
||||||
|
@ -245,7 +245,7 @@ typedef struct PlayerData {
|
|||||||
/* 0x1C8 */ s16 storedItems[32];
|
/* 0x1C8 */ s16 storedItems[32];
|
||||||
/* 0x208 */ s16 equippedBadges[64];
|
/* 0x208 */ s16 equippedBadges[64];
|
||||||
/* 0x288 */ char unk_288;
|
/* 0x288 */ char unk_288;
|
||||||
/* 0x289 */ u8 merleeSpellType;
|
/* 0x289 */ s8 merleeSpellType;
|
||||||
/* 0x28A */ s8 merleeCastsLeft;
|
/* 0x28A */ s8 merleeCastsLeft;
|
||||||
/* 0x28B */ char unk_28B;
|
/* 0x28B */ char unk_28B;
|
||||||
/* 0x28C */ s16 merleeTurnCount;
|
/* 0x28C */ s16 merleeTurnCount;
|
||||||
@ -1616,7 +1616,7 @@ typedef struct ActorPartBlueprint {
|
|||||||
/* 0x14 */ s32 eventFlags;
|
/* 0x14 */ s32 eventFlags;
|
||||||
/* 0x18 */ s32 elementImmunityFlags;
|
/* 0x18 */ s32 elementImmunityFlags;
|
||||||
/* 0x1C */ s8 unk_1C;
|
/* 0x1C */ s8 unk_1C;
|
||||||
/* 0x1C */ s8 unk_1D;
|
/* 0x1D */ s8 unk_1D;
|
||||||
/* 0x1E */ char unk_1E[2];
|
/* 0x1E */ char unk_1E[2];
|
||||||
/* 0x20 */ s32 unk_20;
|
/* 0x20 */ s32 unk_20;
|
||||||
} ActorPartBlueprint; // size = 0x24
|
} ActorPartBlueprint; // size = 0x24
|
||||||
@ -2048,7 +2048,7 @@ typedef struct PlayerStatus {
|
|||||||
/* 0x0CC */ s32 shadowID;
|
/* 0x0CC */ s32 shadowID;
|
||||||
/* 0x0D0 */ f32* unk_D0;
|
/* 0x0D0 */ f32* unk_D0;
|
||||||
/* 0x0D4 */ f32 spinRate;
|
/* 0x0D4 */ f32 spinRate;
|
||||||
/* 0x0D8 */ UNK_PTR** unk_D8;
|
/* 0x0D8 */ struct EffectInstance* unk_D8; // effect 46
|
||||||
/* 0x0DC */ s32 currentButtons;
|
/* 0x0DC */ s32 currentButtons;
|
||||||
/* 0x0E0 */ s32 pressedButtons;
|
/* 0x0E0 */ s32 pressedButtons;
|
||||||
/* 0x0E4 */ s32 heldButtons;
|
/* 0x0E4 */ s32 heldButtons;
|
||||||
@ -2283,7 +2283,7 @@ typedef struct PartnerActionStatus {
|
|||||||
|
|
||||||
typedef struct EntityModel {
|
typedef struct EntityModel {
|
||||||
/* 0x00 */ s32 flags;
|
/* 0x00 */ s32 flags;
|
||||||
/* 0x04 */ u8 renderMode;
|
/* 0x04 */ s8 renderMode;
|
||||||
/* 0x05 */ u8 unk_05;
|
/* 0x05 */ u8 unk_05;
|
||||||
/* 0x06 */ u8 unk_06;
|
/* 0x06 */ u8 unk_06;
|
||||||
/* 0x07 */ u8 unk_07;
|
/* 0x07 */ u8 unk_07;
|
||||||
@ -2291,7 +2291,7 @@ typedef struct EntityModel {
|
|||||||
/* 0x0C */ f32 timeScale; ///< Default is 1.0
|
/* 0x0C */ f32 timeScale; ///< Default is 1.0
|
||||||
/* 0x10 */ s32* cmdListReadPos;
|
/* 0x10 */ s32* cmdListReadPos;
|
||||||
/* 0x14 */ Gfx* displayList;
|
/* 0x14 */ Gfx* displayList;
|
||||||
/* 0x18 */ Matrix4s transform;
|
/* 0x18 */ Mtx transform;
|
||||||
/* 0x58 */ s32* cmdListSavedPos;
|
/* 0x58 */ s32* cmdListSavedPos;
|
||||||
/* 0x5C */ Vtx* vertexArray;
|
/* 0x5C */ Vtx* vertexArray;
|
||||||
/* 0x60 */ UNK_FUN_PTR(fpSetupGfxCallback);
|
/* 0x60 */ UNK_FUN_PTR(fpSetupGfxCallback);
|
||||||
|
@ -142,66 +142,29 @@ enum EffectID {
|
|||||||
EFFECT_86,
|
EFFECT_86,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct {
|
typedef struct StarSpiritsEnergyFXData {
|
||||||
char unk_00[0x38];
|
/* 0x00 */ char unk_00[0x8];
|
||||||
f32 unk_38[4];
|
|
||||||
} EffectUnkStruct1;
|
|
||||||
|
|
||||||
typedef struct EffectStruct {
|
|
||||||
char unk_00[0x4];
|
|
||||||
f32 unk_04;
|
|
||||||
f32 unk_08;
|
|
||||||
f32 unk_0C;
|
|
||||||
f32 unk_10;
|
|
||||||
char unk_14[0x4];
|
|
||||||
s32 unk_18;
|
|
||||||
s32 unk_1C;
|
|
||||||
s32 unk_20;
|
|
||||||
X32 unk_24;
|
|
||||||
s32 unk_28;
|
|
||||||
s32 unk_2C;
|
|
||||||
s32 unk_30;
|
|
||||||
u8 unk_34;
|
|
||||||
s32 unk_38;
|
|
||||||
char unk_3C[0xC];
|
|
||||||
EffectUnkStruct1* unk_48;
|
|
||||||
char unk_4C[0x24];
|
|
||||||
s32 unk_70;
|
|
||||||
s32 unk_74;
|
|
||||||
} EffectStruct;
|
|
||||||
|
|
||||||
typedef struct StarSpiritEffectUnkStruct {
|
|
||||||
char unk_00[0xC];
|
|
||||||
EffectStruct* unk_0C;
|
|
||||||
} StarSpiritEffectUnkStruct;
|
|
||||||
|
|
||||||
typedef struct StarSpiritEffect {
|
|
||||||
/* 0x00 */ f32 unk_00;
|
|
||||||
/* 0x04 */ f32 unk_04;
|
|
||||||
/* 0x08 */ f32 unk_08;
|
/* 0x08 */ f32 unk_08;
|
||||||
/* 0x0C */ f32 unk_0C;
|
/* 0x0C */ f32 unk_0C;
|
||||||
/* 0x10 */ f32 unk_10;
|
/* 0x10 */ f32 unk_10;
|
||||||
/* 0x14 */ f32 unk_14;
|
/* 0x14 */ char unk_14[0x20];
|
||||||
/* 0x18 */ f32 unk_18;
|
/* 0x34 */ s32 unk_34;
|
||||||
/* 0x1C */ f32 unk_1C;
|
/* 0x38 */ char unk_38[0x38];
|
||||||
/* 0x20 */ f32 unk_20;
|
/* 0x70 */ s32 unk_70;
|
||||||
|
/* 0x74 */ s32 unk_74;
|
||||||
|
} StarSpiritsEnergyFXData; // size = ?
|
||||||
|
|
||||||
|
typedef struct SpiritCardFXData {
|
||||||
|
/* 0x00 */ char unk_00[0x4];
|
||||||
|
/* 0x04 */ f32 unk_04;
|
||||||
|
/* 0x08 */ f32 unk_08;
|
||||||
|
/* 0x0C */ f32 unk_0C;
|
||||||
|
/* 0x10 */ char unk_10[0x10];
|
||||||
|
/* 0x20 */ s32 unk_20;
|
||||||
/* 0x24 */ f32 unk_24;
|
/* 0x24 */ f32 unk_24;
|
||||||
/* 0x28 */ f32 unk_28;
|
/* 0x28 */ char unk_28[0xC];
|
||||||
/* 0x2C */ f32 unk_2C;
|
/* 0x34 */ s8 unk_34;
|
||||||
/* 0x30 */ f32 unk_30;
|
} SpiritCardFXData; // ?
|
||||||
/* 0x34 */ f32 unk_34;
|
|
||||||
/* 0x38 */ s32 unk_38;
|
|
||||||
/* 0x3C */ s32 unk_3C;
|
|
||||||
/* 0x40 */ s32 unk_40; // a shadowID
|
|
||||||
/* 0x44 */ s16 unk_44;
|
|
||||||
/* 0x46 */ s16 unk_46;
|
|
||||||
/* 0x48 */ s16 unk_48;
|
|
||||||
/* 0x4A */ s16 unk_4A;
|
|
||||||
/* 0x4C */ s16 unk_4C;
|
|
||||||
/* 0x4E */ s16 unk_4E;
|
|
||||||
/* 0x50 */ struct StarSpiritEffectUnkStruct* unk_50;
|
|
||||||
/* 0x54 */ struct StarSpiritEffectUnkStruct* unk_54;
|
|
||||||
} StarSpiritEffect; // size = 0x58
|
|
||||||
|
|
||||||
typedef struct BigSmokePuffFXData {
|
typedef struct BigSmokePuffFXData {
|
||||||
/* 0x00 */ s16 unk_00;
|
/* 0x00 */ s16 unk_00;
|
||||||
@ -219,6 +182,21 @@ typedef struct BigSmokePuffFXData {
|
|||||||
/* 0x28 */ char unk_28[0x4];
|
/* 0x28 */ char unk_28[0x4];
|
||||||
} BigSmokePuffFXData; // size = 0x2C
|
} BigSmokePuffFXData; // size = 0x2C
|
||||||
|
|
||||||
|
typedef struct BigSnowflakeFXData {
|
||||||
|
/* 0x00 */ s32 unk_00;
|
||||||
|
/* 0x04 */ f32 unk_04;
|
||||||
|
/* 0x08 */ f32 unk_08;
|
||||||
|
/* 0x0C */ f32 unk_0C;
|
||||||
|
/* 0x10 */ f32 unk_10;
|
||||||
|
/* 0x14 */ f32 unk_14;
|
||||||
|
/* 0x18 */ f32 unk_18;
|
||||||
|
/* 0x1C */ f32 unk_1C;
|
||||||
|
/* 0x20 */ f32 unk_20;
|
||||||
|
/* 0x24 */ s32 unk_24;
|
||||||
|
/* 0x28 */ s32 unk_28;
|
||||||
|
/* 0x2C */ s32 unk_2C;
|
||||||
|
} BigSnowflakeFXData; // size = 0x30
|
||||||
|
|
||||||
typedef struct LandingDustFXData {
|
typedef struct LandingDustFXData {
|
||||||
/* 0x00 */ u16 type;
|
/* 0x00 */ u16 type;
|
||||||
/* 0x02 */ char unk_02[0x2];
|
/* 0x02 */ char unk_02[0x2];
|
||||||
@ -535,6 +513,19 @@ typedef struct SleepBubbleFXData {
|
|||||||
/* 0xC8 */ f32 unk_C8;
|
/* 0xC8 */ f32 unk_C8;
|
||||||
} SleepBubbleFXData; // size = 0xCC
|
} SleepBubbleFXData; // size = 0xCC
|
||||||
|
|
||||||
|
typedef struct WaterFountainFXData {
|
||||||
|
/* 0x00 */ char unk_00[0x18];
|
||||||
|
/* 0x18 */ s32 unk_18;
|
||||||
|
/* 0x1C */ s32 unk_1C;
|
||||||
|
/* 0x20 */ s32 unk_20;
|
||||||
|
/* 0x24 */ char unk_24[0x4];
|
||||||
|
/* 0x28 */ s32 unk_28;
|
||||||
|
/* 0x2C */ s32 unk_2C;
|
||||||
|
/* 0x30 */ s32 unk_30;
|
||||||
|
/* 0x34 */ char unk_34[0x4];
|
||||||
|
/* 0x38 */ f32 unk_38;
|
||||||
|
} WaterFountainFXData; // size = ?
|
||||||
|
|
||||||
typedef struct AuraFXData {
|
typedef struct AuraFXData {
|
||||||
/* 0x00 */ s32 type;
|
/* 0x00 */ s32 type;
|
||||||
/* 0x04 */ Vec3f pos;
|
/* 0x04 */ Vec3f pos;
|
||||||
@ -544,7 +535,7 @@ typedef struct AuraFXData {
|
|||||||
/* 0x1C */ f32 unk_1C;
|
/* 0x1C */ f32 unk_1C;
|
||||||
/* 0x20 */ f32 unk_20;
|
/* 0x20 */ f32 unk_20;
|
||||||
/* 0x24 */ f32 unk_24;
|
/* 0x24 */ f32 unk_24;
|
||||||
/* 0x28 */ s32 unk_28;
|
/* 0x28 */ s32 primA;
|
||||||
/* 0x2C */ s32 unk_2C;
|
/* 0x2C */ s32 unk_2C;
|
||||||
/* 0x30 */ s32 unk_30;
|
/* 0x30 */ s32 unk_30;
|
||||||
/* 0x34 */ f32 unk_34;
|
/* 0x34 */ f32 unk_34;
|
||||||
@ -563,13 +554,13 @@ typedef struct AuraFXData {
|
|||||||
s32 s;
|
s32 s;
|
||||||
f32 f;
|
f32 f;
|
||||||
} unk_64;
|
} unk_64;
|
||||||
/* 0x68 */ u8 unk_68;
|
/* 0x68 */ u8 primR;
|
||||||
/* 0x69 */ u8 unk_69;
|
/* 0x69 */ u8 primG;
|
||||||
/* 0x6A */ u8 unk_6A;
|
/* 0x6A */ u8 primB;
|
||||||
/* 0x6B */ u8 unk_6B;
|
/* 0x6B */ u8 envR;
|
||||||
/* 0x6C */ u8 unk_6C;
|
/* 0x6C */ u8 envG;
|
||||||
/* 0x6D */ u8 unk_6D;
|
/* 0x6D */ u8 engB;
|
||||||
/* 0x6E */ u8 unk_6E;
|
/* 0x6E */ u8 engA;
|
||||||
} AuraFXData; // size = 0x70
|
} AuraFXData; // size = 0x70
|
||||||
|
|
||||||
typedef struct BlastFXData {
|
typedef struct BlastFXData {
|
||||||
@ -660,98 +651,15 @@ typedef struct DamageIndicatorFXData {
|
|||||||
/* 0x3C */ s32 numParts;
|
/* 0x3C */ s32 numParts;
|
||||||
} DamageIndicatorFXData; // size = 0x40
|
} DamageIndicatorFXData; // size = 0x40
|
||||||
|
|
||||||
// TODO figure out what this actually is
|
// seems to actually be PlayerStatus, but it's too large seemingly given the bss padding in UnkWhirlwindEffectFunc.inc.c
|
||||||
// fx_quizmo_stage invokes gEffectTable[78]'s entryPoint function
|
typedef struct EffectWhirlwindUnk {
|
||||||
// fx_cold_breath invokes gEffectTable[111]'s entryPoint function
|
/* 0x00 */ char unk_00[0x28];
|
||||||
// fx_star_spirits_energy invokes gEffectTable[131]'s entryPoint function
|
|
||||||
// These functions are currently typed to return void
|
|
||||||
// Assume they return an Effect*, and this struct is accessed at unk_0C,
|
|
||||||
// but this struct differs from EffectInstanceData
|
|
||||||
// Search for "struct N(temp)" for examples
|
|
||||||
typedef struct EffectInstanceDataThing {
|
|
||||||
char unk_00[0x4];
|
|
||||||
f32 unk_04;
|
|
||||||
f32 unk_08;
|
|
||||||
f32 unk_0C;
|
|
||||||
f32 unk_10;
|
|
||||||
char unk_14[0x4];
|
|
||||||
s32 unk_18;
|
|
||||||
s32 unk_1C;
|
|
||||||
s32 unk_20;
|
|
||||||
X32 unk_24;
|
|
||||||
s32 unk_28;
|
|
||||||
s32 unk_2C;
|
|
||||||
s32 unk_30;
|
|
||||||
s32 unk_34;
|
|
||||||
s32 unk_38;
|
|
||||||
char unk_3C[0xC];
|
|
||||||
EffectUnkStruct1* unk_48;
|
|
||||||
char unk_4C[0x24];
|
|
||||||
s32 unk_70;
|
|
||||||
s32 unk_74;
|
|
||||||
} EffectInstanceDataThing; // TODO remove / convert to appropriate effect data struct
|
|
||||||
|
|
||||||
typedef struct EffectInstanceData {
|
|
||||||
/* 0x00 */ EffectInstanceDataThing* unk_00;
|
|
||||||
/* 0x04 */ Vec3f pos;
|
|
||||||
/* 0x10 */ Vec3f rotation;
|
|
||||||
/* 0x1C */ Vec3f scale;
|
|
||||||
/* 0x28 */ f32 unk_28;
|
|
||||||
/* 0x2C */ s32 unk_2C;
|
|
||||||
/* 0x30 */ f32 unk_30;
|
|
||||||
/* 0x34 */ f32 unk_34;
|
|
||||||
/* 0x38 */ f32 unk_38;
|
|
||||||
/* 0x3C */ s32 unk_3C;
|
|
||||||
/* 0x40 */ char unk_40[0x24];
|
|
||||||
/* 0x64 */ f32 unk_64;
|
|
||||||
/* 0x68 */ char unk_68[0x18];
|
|
||||||
} EffectInstanceData; // size = 0x80
|
|
||||||
|
|
||||||
typedef struct EffectInstance {
|
|
||||||
/* 0x00 */ s32 flags;
|
|
||||||
/* 0x04 */ s32 effectIndex;
|
|
||||||
/* 0x08 */ s32 numParts;
|
|
||||||
/* 0x0C */ void* data;
|
|
||||||
/* 0x10 */ struct EffectGraphics* graphics;
|
|
||||||
} EffectInstance; // size = 0x14
|
|
||||||
|
|
||||||
typedef struct EffectBlueprint {
|
|
||||||
/* 0x00 */ s32 unk_00;
|
|
||||||
/* 0x04 */ s32 effectID;
|
|
||||||
/* 0x08 */ void (*init)(EffectInstance* effectInst);
|
|
||||||
/* 0x0C */ void (*update)(EffectInstance* effectInst);
|
|
||||||
/* 0x10 */ void (*renderWorld)(EffectInstance* effectInst);
|
|
||||||
/* 0x14 */ void (*unk_14)(EffectInstance* effectInst);
|
|
||||||
} EffectBlueprint; // size = 0x18
|
|
||||||
|
|
||||||
typedef struct EffectGraphics {
|
|
||||||
/* 0x00 */ s32 flags;
|
|
||||||
/* 0x04 */ s32 effectIndex;
|
|
||||||
/* 0x08 */ s32 instanceCounter;
|
|
||||||
/* 0x0C */ s32 freeDelay;
|
|
||||||
/* 0x10 */ void (*update)(EffectInstance* effectInst);
|
|
||||||
/* 0x14 */ void (*renderWorld)(EffectInstance* effectInst);
|
|
||||||
/* 0x18 */ void (*renderUI)(EffectInstance* effectInst);
|
|
||||||
/* 0x1C */ s32* data;
|
|
||||||
} EffectGraphics; // size = 0x20
|
|
||||||
|
|
||||||
typedef struct EffectTableEntry {
|
|
||||||
/* 0x00 */ void (*entryPoint);
|
|
||||||
/* 0x04 */ void* dmaStart;
|
|
||||||
/* 0x08 */ void* dmaEnd;
|
|
||||||
/* 0x0C */ void* dmaDest;
|
|
||||||
/* 0x10 */ void* graphicsDmaStart;
|
|
||||||
/* 0x14 */ void* graphicsDmaEnd;
|
|
||||||
} EffectTableEntry; // size = 0x18
|
|
||||||
|
|
||||||
typedef struct EffectWhirlwind {
|
|
||||||
/* 0x00 */ char unk_00[40];
|
|
||||||
/* 0x28 */ f32 unk_28;
|
/* 0x28 */ f32 unk_28;
|
||||||
/* 0x2C */ f32 unk_2C;
|
/* 0x2C */ f32 unk_2C;
|
||||||
/* 0x30 */ f32 unk_30;
|
/* 0x30 */ f32 unk_30;
|
||||||
} EffectWhirlwind;
|
} EffectWhirlwindUnk;
|
||||||
|
|
||||||
typedef struct Effect6BData {
|
typedef struct Effect6BFXData {
|
||||||
/* 0x00 */ s32 unk_00;
|
/* 0x00 */ s32 unk_00;
|
||||||
/* 0x04 */ Vec3f pos;
|
/* 0x04 */ Vec3f pos;
|
||||||
/* 0x10 */ char unk_10[12];
|
/* 0x10 */ char unk_10[12];
|
||||||
@ -764,16 +672,32 @@ typedef struct Effect6BData {
|
|||||||
/* 0x38 */ f32 unk_38;
|
/* 0x38 */ f32 unk_38;
|
||||||
/* 0x3C */ s32 unk_3C;
|
/* 0x3C */ s32 unk_3C;
|
||||||
/* 0x40 */ char unk_40[0x4];
|
/* 0x40 */ char unk_40[0x4];
|
||||||
} Effect6BData; // size = 0x44
|
} Effect6BFXData; // size = 0x44
|
||||||
|
|
||||||
typedef struct Effect6BInstance {
|
typedef struct ColdBreathFXData {
|
||||||
/* 0x00 */ s32 unk_00;
|
/* 0x00 */ char unk_00[0x18];
|
||||||
/* 0x04 */ char unk_04[8];
|
/* 0x18 */ s32 unk_18;
|
||||||
/* 0x0C */ Effect6BData* data;
|
/* 0x1C */ s32 unk_1C;
|
||||||
} Effect6BInstance;
|
/* 0x20 */ s32 unk_20;
|
||||||
|
/* 0x24 */ char unk_24[0x4];
|
||||||
|
/* 0x28 */ s32 unk_28;
|
||||||
|
/* 0x2C */ s32 unk_2C;
|
||||||
|
/* 0x30 */ s32 unk_30;
|
||||||
|
} ColdBreathFXData; // size = ?
|
||||||
|
|
||||||
typedef struct Effect6FData {
|
typedef struct LightningFXData {
|
||||||
/* 0x00 */ EffectInstanceDataThing* unk_00;
|
/* 0x00 */ char unk_00[0x30];
|
||||||
|
/* 0x30 */ s32 unk_30;
|
||||||
|
/* 0x34 */ s32 unk_34;
|
||||||
|
/* 0x38 */ s32 unk_38;
|
||||||
|
/* 0x3C */ char unk_3C[0x4];
|
||||||
|
/* 0x40 */ s32 unk_40;
|
||||||
|
/* 0x44 */ s32 unk_44;
|
||||||
|
/* 0x48 */ s32 unk_48;
|
||||||
|
} LightningFXData; // size = ?
|
||||||
|
|
||||||
|
typedef struct Effect6FFXData {
|
||||||
|
/* 0x00 */ char unk_00[0x4];
|
||||||
/* 0x04 */ Vec3f pos;
|
/* 0x04 */ Vec3f pos;
|
||||||
/* 0x10 */ Vec3i rotation;
|
/* 0x10 */ Vec3i rotation;
|
||||||
/* 0x1C */ Vec3i scale;
|
/* 0x1C */ Vec3i scale;
|
||||||
@ -782,15 +706,49 @@ typedef struct Effect6FData {
|
|||||||
/* 0x38 */ f32 unk_38;
|
/* 0x38 */ f32 unk_38;
|
||||||
/* 0x3C */ s32 unk_3C;
|
/* 0x3C */ s32 unk_3C;
|
||||||
/* 0x40 */ char unk_40[0x4];
|
/* 0x40 */ char unk_40[0x4];
|
||||||
} Effect6FData; // size = 0x44
|
} Effect6FFXData; // size = 0x44
|
||||||
|
|
||||||
typedef struct Effect6FInstance {
|
typedef struct MiscParticlesFXData {
|
||||||
/* 0x00 */ s32 flags;
|
char unk_00[0x38];
|
||||||
/* 0x04 */ s32 effectIndex;
|
s32 unk_38;
|
||||||
/* 0x08 */ s32 numParts;
|
s32 unk_3C;
|
||||||
/* 0x0C */ Effect6FData* data;
|
s32 unk_40;
|
||||||
/* 0x10 */ struct EffectGraphics* effect;
|
char unk_44[0x4];
|
||||||
} Effect6FInstance;
|
s32 unk_48;
|
||||||
|
s32 unk_4C;
|
||||||
|
s32 unk_50;
|
||||||
|
} MiscParticlesFXData; // size = ?
|
||||||
|
|
||||||
|
typedef struct ButterflyFXData {
|
||||||
|
/* 0x00 */ s32 unk_00;
|
||||||
|
/* 0x04 */ s32 unk_04;
|
||||||
|
/* 0x08 */ s32 unk_08;
|
||||||
|
/* 0x0C */ f32 unk_0C;
|
||||||
|
/* 0x10 */ f32 unk_10;
|
||||||
|
/* 0x14 */ f32 unk_14;
|
||||||
|
/* 0x18 */ f32 unk_18;
|
||||||
|
/* 0x1C */ f32 unk_1C;
|
||||||
|
/* 0x20 */ f32 unk_20;
|
||||||
|
/* 0x24 */ s32 unk_24;
|
||||||
|
/* 0x28 */ f32 unk_28;
|
||||||
|
/* 0x2C */ s32 unk_2C;
|
||||||
|
/* 0x30 */ s32 unk_30;
|
||||||
|
/* 0x34 */ f32 unk_34;
|
||||||
|
/* 0x38 */ f32 unk_38;
|
||||||
|
/* 0x3C */ f32 unk_3C;
|
||||||
|
/* 0x40 */ f32 unk_40;
|
||||||
|
/* 0x44 */ f32 unk_44;
|
||||||
|
} ButterflyFXData; // size = 0x48
|
||||||
|
|
||||||
|
typedef struct Effect46FXData {
|
||||||
|
/* 0x00 */ char unk_00[0x24];
|
||||||
|
/* 0x04 */ s32 unk_24;
|
||||||
|
} Effect46FXData; // size = 0x44
|
||||||
|
|
||||||
|
typedef struct ThunderboltRingFXData {
|
||||||
|
/* 0x00 */ char unk_00[0x30];
|
||||||
|
/* 0x30 */ s32 unk_30;
|
||||||
|
} ThunderboltRingFXData; // size = ?
|
||||||
|
|
||||||
// fx_quizmo_stage
|
// fx_quizmo_stage
|
||||||
typedef struct EffectDataQuizStage {
|
typedef struct EffectDataQuizStage {
|
||||||
@ -821,6 +779,87 @@ typedef struct EffectDataQuizVannaT {
|
|||||||
/* 0x1C */ s32 anim;
|
/* 0x1C */ s32 anim;
|
||||||
} EffectDataQuizVannaT; // size = 0x20
|
} EffectDataQuizVannaT; // size = 0x20
|
||||||
|
|
||||||
|
typedef struct EffectInstanceData {
|
||||||
|
/* 0x00 */ s32 unk_00;
|
||||||
|
/* 0x04 */ Vec3f pos;
|
||||||
|
/* 0x10 */ Vec3f rotation;
|
||||||
|
/* 0x1C */ Vec3f scale;
|
||||||
|
/* 0x28 */ f32 unk_28;
|
||||||
|
/* 0x2C */ s32 unk_2C;
|
||||||
|
/* 0x30 */ f32 unk_30;
|
||||||
|
/* 0x34 */ f32 unk_34;
|
||||||
|
/* 0x38 */ f32 unk_38;
|
||||||
|
/* 0x3C */ s32 unk_3C;
|
||||||
|
/* 0x40 */ char unk_40[0x24];
|
||||||
|
/* 0x64 */ f32 unk_64;
|
||||||
|
/* 0x68 */ char unk_68[0x18];
|
||||||
|
} EffectInstanceData; // size = 0x80
|
||||||
|
|
||||||
|
typedef struct EffectInstance {
|
||||||
|
/* 0x00 */ s32 flags;
|
||||||
|
/* 0x04 */ s32 effectIndex;
|
||||||
|
/* 0x08 */ s32 numParts;
|
||||||
|
/* 0x0C */ void* data;
|
||||||
|
/* 0x10 */ struct EffectGraphics* graphics;
|
||||||
|
} EffectInstance; // size = 0x14
|
||||||
|
|
||||||
|
typedef struct StarSpiritData {
|
||||||
|
/* 0x00 */ f32 unk_00;
|
||||||
|
/* 0x04 */ f32 unk_04;
|
||||||
|
/* 0x08 */ f32 unk_08;
|
||||||
|
/* 0x0C */ f32 unk_0C;
|
||||||
|
/* 0x10 */ f32 unk_10;
|
||||||
|
/* 0x14 */ f32 unk_14;
|
||||||
|
/* 0x18 */ f32 unk_18;
|
||||||
|
/* 0x1C */ f32 unk_1C;
|
||||||
|
/* 0x20 */ f32 unk_20;
|
||||||
|
/* 0x24 */ f32 unk_24;
|
||||||
|
/* 0x28 */ f32 unk_28;
|
||||||
|
/* 0x2C */ f32 unk_2C;
|
||||||
|
/* 0x30 */ f32 unk_30;
|
||||||
|
/* 0x34 */ f32 unk_34;
|
||||||
|
/* 0x38 */ s32 unk_38;
|
||||||
|
/* 0x3C */ s32 unk_3C;
|
||||||
|
/* 0x40 */ s32 unk_40; // a shadowID
|
||||||
|
/* 0x44 */ s16 unk_44;
|
||||||
|
/* 0x46 */ s16 unk_46;
|
||||||
|
/* 0x48 */ s16 unk_48;
|
||||||
|
/* 0x4A */ s16 unk_4A;
|
||||||
|
/* 0x4C */ s16 unk_4C;
|
||||||
|
/* 0x4E */ s16 unk_4E;
|
||||||
|
/* 0x50 */ EffectInstance* unk_50;
|
||||||
|
/* 0x54 */ EffectInstance* unk_54;
|
||||||
|
} StarSpiritData; // size = 0x58
|
||||||
|
|
||||||
|
typedef struct EffectBlueprint {
|
||||||
|
/* 0x00 */ s32 unk_00;
|
||||||
|
/* 0x04 */ s32 effectID;
|
||||||
|
/* 0x08 */ void (*init)(EffectInstance* effectInst);
|
||||||
|
/* 0x0C */ void (*update)(EffectInstance* effectInst);
|
||||||
|
/* 0x10 */ void (*renderWorld)(EffectInstance* effectInst);
|
||||||
|
/* 0x14 */ void (*unk_14)(EffectInstance* effectInst);
|
||||||
|
} EffectBlueprint; // size = 0x18
|
||||||
|
|
||||||
|
typedef struct EffectGraphics {
|
||||||
|
/* 0x00 */ s32 flags;
|
||||||
|
/* 0x04 */ s32 effectIndex;
|
||||||
|
/* 0x08 */ s32 instanceCounter;
|
||||||
|
/* 0x0C */ s32 freeDelay;
|
||||||
|
/* 0x10 */ void (*update)(EffectInstance* effectInst);
|
||||||
|
/* 0x14 */ void (*renderWorld)(EffectInstance* effectInst);
|
||||||
|
/* 0x18 */ void (*renderUI)(EffectInstance* effectInst);
|
||||||
|
/* 0x1C */ s32* data;
|
||||||
|
} EffectGraphics; // size = 0x20
|
||||||
|
|
||||||
|
typedef struct EffectTableEntry {
|
||||||
|
/* 0x00 */ void (*entryPoint);
|
||||||
|
/* 0x04 */ void* dmaStart;
|
||||||
|
/* 0x08 */ void* dmaEnd;
|
||||||
|
/* 0x0C */ void* dmaDest;
|
||||||
|
/* 0x10 */ void* graphicsDmaStart;
|
||||||
|
/* 0x14 */ void* graphicsDmaEnd;
|
||||||
|
} EffectTableEntry; // size = 0x18
|
||||||
|
|
||||||
enum FireBreathType {
|
enum FireBreathType {
|
||||||
FIRE_BREATH_LARGE = 0,
|
FIRE_BREATH_LARGE = 0,
|
||||||
FIRE_BREATH_SMALL = 1,
|
FIRE_BREATH_SMALL = 1,
|
||||||
@ -897,7 +936,7 @@ EffectInstance* fx_bombette_breaking(s32, s32, s32, f32, s32, s32);
|
|||||||
EffectInstance* fx_firework(s32, f32, f32, f32, f32, s32);
|
EffectInstance* fx_firework(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* fx_confetti(s32, f32, f32, f32, f32, s32);
|
EffectInstance* fx_confetti(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* fx_snowfall(s32, s32);
|
EffectInstance* fx_snowfall(s32, s32);
|
||||||
EffectInstance* fx_46(s32, EffectWhirlwind*, f32, s32);
|
EffectInstance* fx_46(s32, EffectWhirlwindUnk*, f32, s32);
|
||||||
EffectInstance* fx_gather_magic(s32, f32, f32, f32, f32, s32);
|
EffectInstance* fx_gather_magic(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* fx_attack_result_text(s32, f32, f32, f32, f32, s32);
|
EffectInstance* fx_attack_result_text(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* fx_small_gold_sparkle(s32, f32, f32, f32, f32, s32);
|
EffectInstance* fx_small_gold_sparkle(s32, f32, f32, f32, f32, s32);
|
||||||
|
@ -76,7 +76,7 @@ FX_MAIN(falling_leaves_main);
|
|||||||
FX_MAIN(stars_spread_main);
|
FX_MAIN(stars_spread_main);
|
||||||
FX_MAIN(steam_burst_main);
|
FX_MAIN(steam_burst_main);
|
||||||
FX_MAIN(stars_orbiting_main);
|
FX_MAIN(stars_orbiting_main);
|
||||||
FX_MAIN(big_snowflakes_main);
|
void big_snowflakes_main(s32, f32, f32, f32);
|
||||||
EffectInstance* debuff_main(s32, f32, f32, f32);
|
EffectInstance* debuff_main(s32, f32, f32, f32);
|
||||||
FX_MAIN(green_impact_main);
|
FX_MAIN(green_impact_main);
|
||||||
FX_MAIN(radial_shimmer_main);
|
FX_MAIN(radial_shimmer_main);
|
||||||
@ -101,7 +101,7 @@ FX_MAIN(snowfall_main);
|
|||||||
FX_MAIN(fx_46_main);
|
FX_MAIN(fx_46_main);
|
||||||
FX_MAIN(gather_magic_main);
|
FX_MAIN(gather_magic_main);
|
||||||
EffectInstance* attack_result_text_main(s32, f32, f32, f32, f32, s32);
|
EffectInstance* attack_result_text_main(s32, f32, f32, f32, f32, s32);
|
||||||
EffectInstance* small_gold_sparkle_main(EffectInstanceDataThing*, f32, f32, f32, f32);
|
EffectInstance* small_gold_sparkle_main(s32, f32, f32, f32, f32);
|
||||||
FX_MAIN(flashing_box_shockwave_main);
|
FX_MAIN(flashing_box_shockwave_main);
|
||||||
EffectInstance* balloon_main(s32, f32, f32, f32, f32, s32);
|
EffectInstance* balloon_main(s32, f32, f32, f32, f32, s32);
|
||||||
FX_MAIN(floating_rock_main);
|
FX_MAIN(floating_rock_main);
|
||||||
@ -113,7 +113,7 @@ FX_MAIN(motion_blur_flame_main);
|
|||||||
FX_MAIN(energy_orb_wave_main);
|
FX_MAIN(energy_orb_wave_main);
|
||||||
FX_MAIN(merlin_house_stars_main);
|
FX_MAIN(merlin_house_stars_main);
|
||||||
FX_MAIN(quizmo_audience_main);
|
FX_MAIN(quizmo_audience_main);
|
||||||
FX_MAIN(butterflies_main);
|
EffectInstance* butterflies_main(s32, f32, f32, f32);
|
||||||
EffectInstance* stat_change_main(s32, f32, f32, f32, f32, s32);
|
EffectInstance* stat_change_main(s32, f32, f32, f32, f32, s32);
|
||||||
FX_MAIN(snaking_static_main);
|
FX_MAIN(snaking_static_main);
|
||||||
FX_MAIN(thunderbolt_ring_main);
|
FX_MAIN(thunderbolt_ring_main);
|
||||||
|
@ -574,6 +574,8 @@ enum SoundIDs {
|
|||||||
SOUND_21C = 0x0000021C,
|
SOUND_21C = 0x0000021C,
|
||||||
SOUND_MENU_ERROR = 0x0000021D,
|
SOUND_MENU_ERROR = 0x0000021D,
|
||||||
SOUND_231 = 0x00000231,
|
SOUND_231 = 0x00000231,
|
||||||
|
SOUND_233 = 0x00000233,
|
||||||
|
SOUND_234 = 0x00000234,
|
||||||
SOUND_246 = 0x00000246,
|
SOUND_246 = 0x00000246,
|
||||||
SOUND_259 = 0x00000259,
|
SOUND_259 = 0x00000259,
|
||||||
SOUND_25A = 0x0000025A,
|
SOUND_25A = 0x0000025A,
|
||||||
@ -2585,7 +2587,7 @@ enum BattleStatusFlags1 {
|
|||||||
BS_FLAGS1_400 = 0x00000400,
|
BS_FLAGS1_400 = 0x00000400,
|
||||||
BS_FLAGS1_800 = 0x00000800,
|
BS_FLAGS1_800 = 0x00000800,
|
||||||
BS_FLAGS1_1000 = 0x00001000,
|
BS_FLAGS1_1000 = 0x00001000,
|
||||||
BS_FLAGS1_2000 = 0x08002000,
|
BS_FLAGS1_2000 = 0x00002000,
|
||||||
BS_FLAGS1_4000 = 0x00004000,
|
BS_FLAGS1_4000 = 0x00004000,
|
||||||
BS_FLAGS1_8000 = 0x00008000,
|
BS_FLAGS1_8000 = 0x00008000,
|
||||||
BS_FLAGS1_10000 = 0x00010000,
|
BS_FLAGS1_10000 = 0x00010000,
|
||||||
@ -2620,10 +2622,12 @@ enum BattleStatusFlags2 {
|
|||||||
BS_FLAGS2_800 = 0x00000800,
|
BS_FLAGS2_800 = 0x00000800,
|
||||||
BS_FLAGS2_NO_TARGET_AVAILABLE = 0x00001000,
|
BS_FLAGS2_NO_TARGET_AVAILABLE = 0x00001000,
|
||||||
BS_FLAGS2_10000 = 0x00010000,
|
BS_FLAGS2_10000 = 0x00010000,
|
||||||
|
BS_FLAGS2_100000 = 0x00100000,
|
||||||
BS_FLAGS2_1000000 = 0x01000000,
|
BS_FLAGS2_1000000 = 0x01000000,
|
||||||
BS_FLAGS2_2000000 = 0x02000000,
|
BS_FLAGS2_2000000 = 0x02000000,
|
||||||
BS_FLAGS2_4000000 = 0x04000000,
|
BS_FLAGS2_4000000 = 0x04000000,
|
||||||
BS_FLAGS2_8000000 = 0x08000000,
|
BS_FLAGS2_8000000 = 0x08000000,
|
||||||
|
BS_FLAGS2_10000000 = 0x10000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum BattleStates {
|
enum BattleStates {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include "map.h"
|
#include "map.h"
|
||||||
#include "enums.h"
|
#include "enums.h"
|
||||||
#include "stdlib/stdarg.h"
|
#include "stdlib/stdarg.h"
|
||||||
|
#include "xstdio.h"
|
||||||
|
|
||||||
f32 fabsf(f32 f);
|
f32 fabsf(f32 f);
|
||||||
f64 fabs(f64 f);
|
f64 fabs(f64 f);
|
||||||
@ -33,8 +34,6 @@ s32 dma_copy(Addr romStart, Addr romEnd, void* vramDest);
|
|||||||
f32 rand_float(void);
|
f32 rand_float(void);
|
||||||
void copy_matrix(Matrix4f src, Matrix4f dest);
|
void copy_matrix(Matrix4f src, Matrix4f dest);
|
||||||
|
|
||||||
s32 _Printf(PrintCallback pfn, char* arg, const char* fmt, va_list ap);
|
|
||||||
|
|
||||||
s32 get_global_byte(s32 index);
|
s32 get_global_byte(s32 index);
|
||||||
s32 get_global_flag(s32 index);
|
s32 get_global_flag(s32 index);
|
||||||
s32 get_area_byte(s32 index);
|
s32 get_area_byte(s32 index);
|
||||||
@ -256,6 +255,7 @@ f32 clamp_angle(f32 theta);
|
|||||||
s32 sign(s32 value);
|
s32 sign(s32 value);
|
||||||
s32 func_80055448(s32);
|
s32 func_80055448(s32);
|
||||||
s32 func_80055464(s32, s32);
|
s32 func_80055464(s32, s32);
|
||||||
|
s32 func_80055618(s32, s32);
|
||||||
s32 func_800E0208(void);
|
s32 func_800E0208(void);
|
||||||
|
|
||||||
s32 battle_heap_create(void);
|
s32 battle_heap_create(void);
|
||||||
@ -432,7 +432,7 @@ ModelAnimator* get_animator_by_index(s32 arg0);
|
|||||||
void set_screen_overlay_params_front(u8, f32);
|
void set_screen_overlay_params_front(u8, f32);
|
||||||
void set_screen_overlay_params_back(u8, f32);
|
void set_screen_overlay_params_back(u8, f32);
|
||||||
void set_screen_overlay_alpha(s32, f32);
|
void set_screen_overlay_alpha(s32, f32);
|
||||||
void get_screen_overlay_params(s32, u8*, f32*);
|
void get_screen_overlay_params(s32, u8* type, f32* zoom);
|
||||||
void set_screen_overlay_color(s32, u8, u8, u8);
|
void set_screen_overlay_color(s32, u8, u8, u8);
|
||||||
void set_screen_overlay_center(s32, s32, s32, s32);
|
void set_screen_overlay_center(s32, s32, s32, s32);
|
||||||
s32 rand_int(s32);
|
s32 rand_int(s32);
|
||||||
@ -722,6 +722,8 @@ void load_font(s32 font);
|
|||||||
|
|
||||||
void* load_asset_by_name(const char* assetName, u32* decompressedSize);
|
void* load_asset_by_name(const char* assetName, u32* decompressedSize);
|
||||||
|
|
||||||
|
Gfx* mdl_get_copied_gfx(s32 copyIndex);
|
||||||
|
void mdl_get_copied_vertices(s32 copyIndex, Vtx** firstVertex, Vtx** copiedVertices, s32* numCopied);
|
||||||
void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex);
|
void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex);
|
||||||
s32 func_8011CFBC(void);
|
s32 func_8011CFBC(void);
|
||||||
void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z);
|
void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z);
|
||||||
@ -769,8 +771,11 @@ void hide_foreground_models_unchecked(void);
|
|||||||
void show_foreground_models(void);
|
void show_foreground_models(void);
|
||||||
void hide_foreground_models(void);
|
void hide_foreground_models(void);
|
||||||
void btl_set_state(s32 battleState);
|
void btl_set_state(s32 battleState);
|
||||||
void draw_entity_model_E(s32, Mtx*);
|
|
||||||
void draw_entity_model_A(s32, Mtx*);
|
void draw_entity_model_A(s32, Mtx*);
|
||||||
|
void draw_entity_model_B(s32, Mtx*, s32, s32);
|
||||||
|
void draw_entity_model_C(s32, Mtx*);
|
||||||
|
void draw_entity_model_D(s32, Mtx*, s32, Vtx*);
|
||||||
|
void draw_entity_model_E(s32, Mtx*);
|
||||||
void free_entity_model_by_index(s32 idx);
|
void free_entity_model_by_index(s32 idx);
|
||||||
void btl_cam_use_preset(s32);
|
void btl_cam_use_preset(s32);
|
||||||
void btl_cam_set_params(s16, s16, s16, s16, s32, s32, s32, s32);
|
void btl_cam_set_params(s16, s16, s16, s16, s32, s32, s32, s32);
|
||||||
@ -879,6 +884,9 @@ void func_80254950(void);
|
|||||||
void func_802549A0(void);
|
void func_802549A0(void);
|
||||||
void func_802549C0(void);
|
void func_802549C0(void);
|
||||||
|
|
||||||
|
void func_8023E104(void);
|
||||||
|
void func_8023E11C(void);
|
||||||
|
|
||||||
void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partIndex);
|
void set_goal_pos_to_part(ActorState* state, s32 actorID, s32 partIndex);
|
||||||
|
|
||||||
void init_encounters_ui(void);
|
void init_encounters_ui(void);
|
||||||
@ -891,6 +899,8 @@ s32 get_asset_offset(char*, s32*);
|
|||||||
void initialize_status_menu(void);
|
void initialize_status_menu(void);
|
||||||
void status_menu_start_blinking_fp(void);
|
void status_menu_start_blinking_fp(void);
|
||||||
s32 is_status_menu_visible(void);
|
s32 is_status_menu_visible(void);
|
||||||
|
void status_menu_start_blinking_starpoints(void);
|
||||||
|
void status_menu_stop_blinking_starpoints(void);
|
||||||
void status_menu_start_blinking_hp(void);
|
void status_menu_start_blinking_hp(void);
|
||||||
void status_menu_start_blinking_sp(void);
|
void status_menu_start_blinking_sp(void);
|
||||||
void status_menu_stop_blinking_fp(void);
|
void status_menu_stop_blinking_fp(void);
|
||||||
|
23
include/gcc/memory.h
Normal file
23
include/gcc/memory.h
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ifndef _MEMORY_H
|
||||||
|
#define _MEMORY_H
|
||||||
|
/*
|
||||||
|
memory.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _SIZE_T_DEF
|
||||||
|
#define _SIZE_T_DEF
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void *memccpy(void *,void *,int,size_t);
|
||||||
|
void *memchr(void *,int,size_t);
|
||||||
|
int memcmp(const void *,const void *,size_t);
|
||||||
|
void *memcpy(void *,const void *,size_t);
|
||||||
|
int memicmp(void *,void *,size_t);
|
||||||
|
void *memmove(void *,void *,size_t);
|
||||||
|
void *memset(void *,int,size_t);
|
||||||
|
|
||||||
|
void movmem(void *,void *,unsigned);
|
||||||
|
void setmem(void *,unsigned,int);
|
||||||
|
|
||||||
|
#endif
|
42
include/gcc/string.h
Executable file
42
include/gcc/string.h
Executable file
@ -0,0 +1,42 @@
|
|||||||
|
#ifndef _STRING_H
|
||||||
|
#define _STRING_H
|
||||||
|
/*
|
||||||
|
string.h
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef _SIZE_T_DEF
|
||||||
|
#define _SIZE_T_DEF
|
||||||
|
typedef unsigned size_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "memory.h"
|
||||||
|
|
||||||
|
char *stpcpy(char *,const char *);
|
||||||
|
char *strcat(char *,const char *);
|
||||||
|
char *strchr(const char *,int);
|
||||||
|
int strcmp(const char *,const char *);
|
||||||
|
char *strcpy(char *,const char *);
|
||||||
|
size_t strcspn(const char *,const char *);
|
||||||
|
char *strdup(const char *);
|
||||||
|
char *strerror(int);
|
||||||
|
int stricmp(const char *,const char *);
|
||||||
|
size_t strlen(const char *);
|
||||||
|
char *strlwr(char *);
|
||||||
|
char *strncat(char *,const char *,size_t);
|
||||||
|
int strncmp(const char *,const char *,size_t);
|
||||||
|
char *strncpy(char *,const char *,size_t);
|
||||||
|
int strnicmp(const char *,const char *,size_t);
|
||||||
|
char *strnset(char *,int,size_t);
|
||||||
|
char *strpbrk(const char *,const char *);
|
||||||
|
char *strrchr(const char *,int);
|
||||||
|
char *strrev(char *);
|
||||||
|
char *strset(char *,int);
|
||||||
|
size_t strspn(const char *,const char *);
|
||||||
|
char *strstr(const char *,const char *);
|
||||||
|
char *strtok(char *,const char *);
|
||||||
|
char *strupr(char *);
|
||||||
|
|
||||||
|
#define strcmpi(s1,s2) stricmp(s1,s2)
|
||||||
|
#define strncmpi(s1,s2,n) strnicmp(s1,s2,n)
|
||||||
|
|
||||||
|
#endif
|
@ -152,6 +152,7 @@ typedef enum ShapeTypes {
|
|||||||
|
|
||||||
typedef ModelTreeInfo ModelTreeInfoList[0x200];
|
typedef ModelTreeInfo ModelTreeInfoList[0x200];
|
||||||
extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo;
|
extern ModelTreeInfoList* mdl_currentModelTreeNodeInfo;
|
||||||
|
extern ModelList* gCurrentModels;
|
||||||
|
|
||||||
void update_model_animator(s32);
|
void update_model_animator(s32);
|
||||||
void update_model_animator_with_transform(s32 animatorID, Mtx* mtx);
|
void update_model_animator_with_transform(s32 animatorID, Mtx* mtx);
|
||||||
|
37
include/xstdio.h
Executable file
37
include/xstdio.h
Executable file
@ -0,0 +1,37 @@
|
|||||||
|
#ifndef _XSTDIO_H
|
||||||
|
#define _XSTDIO_H
|
||||||
|
#include "PR/ultratypes.h"
|
||||||
|
//#include "stdlib.h"
|
||||||
|
//#include "stdarg.h"
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
/* 0x0 */ union {
|
||||||
|
/* 0x0 */ long long ll;
|
||||||
|
/* 0x0 */ double ld;
|
||||||
|
} v;
|
||||||
|
/* 0x8 */ unsigned char* s;
|
||||||
|
/* 0xC */ int n0;
|
||||||
|
/* 0x10 */ int nz0;
|
||||||
|
/* 0x14 */ int n1;
|
||||||
|
/* 0x18 */ int nz1;
|
||||||
|
/* 0x1C */ int n2;
|
||||||
|
/* 0x20 */ int nz2;
|
||||||
|
/* 0x24 */ int prec;
|
||||||
|
/* 0x28 */ int width;
|
||||||
|
/* 0x2C */ size_t nchar;
|
||||||
|
/* 0x30 */ unsigned int flags;
|
||||||
|
/* 0x34 */ char qual;
|
||||||
|
} _Pft;
|
||||||
|
|
||||||
|
#define FLAGS_SPACE 1
|
||||||
|
#define FLAGS_PLUS 2
|
||||||
|
#define FLAGS_MINUS 4
|
||||||
|
#define FLAGS_HASH 8
|
||||||
|
#define FLAGS_ZERO 16
|
||||||
|
typedef char *outfun(char*,const char*,size_t);
|
||||||
|
|
||||||
|
int _Printf(outfun prout, char *arg, const char *fmt, va_list args);
|
||||||
|
void _Litob(_Pft *args, char type);
|
||||||
|
void _Ldtob(_Pft* args, char type);
|
||||||
|
|
||||||
|
#endif
|
873
src/16F740.c
873
src/16F740.c
@ -10,66 +10,141 @@ extern s32* D_800DC064;
|
|||||||
extern s16 D_802809F6;
|
extern s16 D_802809F6;
|
||||||
extern s16 D_802809F8;
|
extern s16 D_802809F8;
|
||||||
extern s32 D_80280A30;
|
extern s32 D_80280A30;
|
||||||
extern s32 D_8029F254;
|
|
||||||
extern u8 D_8029F244;
|
extern u8 D_8029F244;
|
||||||
extern s32 D_8029F248;
|
extern s32 D_8029F248;
|
||||||
|
extern s32 D_8029F24C;
|
||||||
|
extern s32 D_8029F250;
|
||||||
|
extern s32 D_8029F254;
|
||||||
extern s32 D_8029F258;
|
extern s32 D_8029F258;
|
||||||
|
extern s32 D_8029F25C;
|
||||||
|
extern s32 D_8029F260;
|
||||||
|
extern s32 D_8029F264;
|
||||||
|
|
||||||
// Almost good but some reorderings at the beginning
|
|
||||||
#ifdef NON_EQUIVALENT
|
|
||||||
void btl_merlee_on_start_turn(void) {
|
void btl_merlee_on_start_turn(void) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||||
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
if (!(gBattleStatus.flags2 & 0x40) && battleStatus->unk_8A != 3 && battleStatus->unk_8A != 4 && playerData->merleeCastsLeft > 0) {
|
do {
|
||||||
if (playerData->merleeTurnCount <= 0) {
|
if (!(gBattleStatus.flags2 & BS_FLAGS2_40) &&
|
||||||
s32 d100 = rand_int(100);
|
battleStatus->nextMerleeSpellType != 3 &&
|
||||||
|
battleStatus->nextMerleeSpellType != 4 &&
|
||||||
|
playerData->merleeCastsLeft > 0)
|
||||||
|
{
|
||||||
|
if (playerData->merleeTurnCount <= 0) {
|
||||||
|
s32 temp = rand_int(100);
|
||||||
|
|
||||||
if (currentEncounter->currentEnemy != NULL) {
|
if (currentEncounter->currentEnemy != NULL) {
|
||||||
if (currentEncounter->currentEnemy->flags & 0x40000) {
|
if (currentEncounter->currentEnemy->flags & ENEMY_FLAGS_40000) {
|
||||||
if (d100 <= 45) {
|
if (temp <= 45) {
|
||||||
|
playerData->merleeSpellType = 1;
|
||||||
|
} else if (temp <= 90) {
|
||||||
|
playerData->merleeSpellType = 2;
|
||||||
|
} else {
|
||||||
|
playerData->merleeSpellType = 3;
|
||||||
|
}
|
||||||
|
} else if (temp <= 30) {
|
||||||
playerData->merleeSpellType = 1;
|
playerData->merleeSpellType = 1;
|
||||||
} else if (d100 <= 90) {
|
} else if (temp <= 60) {
|
||||||
playerData->merleeSpellType = 2;
|
playerData->merleeSpellType = 2;
|
||||||
} else {
|
} else if (temp <= 80) {
|
||||||
playerData->merleeSpellType = 3;
|
playerData->merleeSpellType = 3;
|
||||||
|
} else {
|
||||||
|
playerData->merleeSpellType = 4;
|
||||||
}
|
}
|
||||||
} else if (d100 <= 30) {
|
} else if (temp <= 30) {
|
||||||
playerData->merleeSpellType = 1;
|
playerData->merleeSpellType = 1;
|
||||||
} else if (d100 <= 60) {
|
} else if (temp <= 60) {
|
||||||
playerData->merleeSpellType = 2;
|
playerData->merleeSpellType = 2;
|
||||||
} else if (d100 <= 80) {
|
} else if (temp <= 80) {
|
||||||
playerData->merleeSpellType = 3;
|
playerData->merleeSpellType = 3;
|
||||||
} else {
|
} else {
|
||||||
playerData->merleeSpellType = 4;
|
playerData->merleeSpellType = 4;
|
||||||
}
|
}
|
||||||
} else if (d100 <= 30) {
|
|
||||||
playerData->merleeSpellType = 1;
|
temp = rand_int(10) + 6;
|
||||||
} else if (d100 <= 60) {
|
playerData->merleeTurnCount = temp;
|
||||||
playerData->merleeSpellType = 2;
|
|
||||||
} else if (d100 <= 80) {
|
|
||||||
playerData->merleeSpellType = 3;
|
|
||||||
} else {
|
|
||||||
playerData->merleeSpellType = 4;
|
|
||||||
}
|
}
|
||||||
playerData->merleeTurnCount = rand_int(10) + 6;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (playerData->merleeTurnCount >= 2) {
|
if (playerData->merleeTurnCount >= 2) {
|
||||||
playerData->merleeTurnCount--;
|
playerData->merleeTurnCount--;
|
||||||
} else {
|
} else {
|
||||||
playerData->merleeTurnCount = 0;
|
playerData->merleeTurnCount = 0;
|
||||||
battleStatus->unk_8A = playerData->merleeSpellType;
|
battleStatus->nextMerleeSpellType = playerData->merleeSpellType;
|
||||||
playerData->merleeCastsLeft--;
|
playerData->merleeCastsLeft--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
} while (0); // TODO: required to match
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "16F740", btl_merlee_on_start_turn);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "16F740", btl_merlee_on_first_strike);
|
void btl_merlee_on_first_strike(void) {
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||||
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (!(gBattleStatus.flags2 & BS_FLAGS2_40) &&
|
||||||
|
battleStatus->nextMerleeSpellType != 3 &&
|
||||||
|
battleStatus->nextMerleeSpellType != 4 &&
|
||||||
|
playerData->merleeCastsLeft > 0)
|
||||||
|
{
|
||||||
|
if (playerData->merleeTurnCount <= 0) {
|
||||||
|
s32 temp = rand_int(100);
|
||||||
|
|
||||||
|
if (currentEncounter->currentEnemy != NULL) {
|
||||||
|
if (currentEncounter->currentEnemy->flags & ENEMY_FLAGS_40000) {
|
||||||
|
if (temp <= 45) {
|
||||||
|
playerData->merleeSpellType = 1;
|
||||||
|
} else if (temp <= 90) {
|
||||||
|
playerData->merleeSpellType = 2;
|
||||||
|
} else {
|
||||||
|
playerData->merleeSpellType = 3;
|
||||||
|
}
|
||||||
|
} else if (temp <= 30) {
|
||||||
|
playerData->merleeSpellType = 1;
|
||||||
|
} else if (temp <= 60) {
|
||||||
|
playerData->merleeSpellType = 2;
|
||||||
|
} else if (temp <= 80) {
|
||||||
|
playerData->merleeSpellType = 3;
|
||||||
|
} else {
|
||||||
|
playerData->merleeSpellType = 4;
|
||||||
|
}
|
||||||
|
} else if (temp <= 30) {
|
||||||
|
playerData->merleeSpellType = 1;
|
||||||
|
} else if (temp <= 60) {
|
||||||
|
playerData->merleeSpellType = 2;
|
||||||
|
} else if (temp <= 80) {
|
||||||
|
playerData->merleeSpellType = 3;
|
||||||
|
} else {
|
||||||
|
playerData->merleeSpellType = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (playerData->merleeSpellType != 4) {
|
||||||
|
// same outcome either way. has to be written like this, and the check does exist in the code. bug?
|
||||||
|
if (playerData->merleeTurnCount == -1) {
|
||||||
|
temp = rand_int(5) + 5;
|
||||||
|
} else {
|
||||||
|
temp = rand_int(5) + 5;
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
temp = rand_int(8) + 5;
|
||||||
|
}
|
||||||
|
playerData->merleeTurnCount = temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (playerData->merleeSpellType == 3 || playerData->merleeSpellType == 4) {
|
||||||
|
if (playerData->merleeTurnCount >= 2) {
|
||||||
|
playerData->merleeTurnCount--;
|
||||||
|
} else {
|
||||||
|
battleStatus->nextMerleeSpellType = playerData->merleeSpellType;
|
||||||
|
playerData->merleeTurnCount = 0;
|
||||||
|
playerData->merleeCastsLeft--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (0); // TODO: required to match
|
||||||
|
}
|
||||||
|
|
||||||
void btl_set_state(s32 battleState) {
|
void btl_set_state(s32 battleState) {
|
||||||
s32 flags = gBattleStatus.flags2;
|
s32 flags = gBattleStatus.flags2;
|
||||||
@ -441,9 +516,9 @@ void btl_state_update_begin_player_turn(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (D_8029F254 == 0) {
|
if (D_8029F254 == 0) {
|
||||||
btl_set_state(BATTLE_STATE2_PLAYER_DEFEATED);
|
btl_set_state(BATTLE_STATE_SWITCH_TO_PLAYER);
|
||||||
} else{
|
} else{
|
||||||
btl_set_state(BATTLE_STATE2_UNK_8);
|
btl_set_state(BATTLE_STATE_BEGIN_PARTNER_TURN);
|
||||||
gBattleStatus.flags2 |= 2;
|
gBattleStatus.flags2 |= 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -489,7 +564,121 @@ void btl_state_update_switch_to_player(void) {
|
|||||||
void btl_state_draw_switch_to_player(void) {
|
void btl_state_draw_switch_to_player(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "16F740", btl_state_update_begin_partner_turn);
|
void btl_state_update_begin_partner_turn(void) {
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Actor* partner = battleStatus->partnerActor;
|
||||||
|
Actor* enemy;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_UNK_0) {
|
||||||
|
if (partner == NULL) {
|
||||||
|
D_8029F254 = 1;
|
||||||
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
|
} else if ((battleStatus->flags2 & (BS_FLAGS2_4 | BS_FLAGS2_2)) != (BS_FLAGS2_4 | BS_FLAGS2_2)) {
|
||||||
|
if (!(partner->flags & ACTOR_FLAG_NO_ATTACK)) {
|
||||||
|
btl_cam_use_preset(2);
|
||||||
|
btl_cam_move(5);
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_64;
|
||||||
|
} else {
|
||||||
|
btl_set_state(BATTLE_STATE_9);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
btl_set_state(BATTLE_STATE_9);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_UNK_64) {
|
||||||
|
if (btl_cam_is_moving_done()) {
|
||||||
|
D_8029F258 = 0;
|
||||||
|
reset_actor_turn_info();
|
||||||
|
partner = battleStatus->partnerActor;
|
||||||
|
battleStatus->unk_86 = 0x7F;
|
||||||
|
battleStatus->blockResult = 0x7F;
|
||||||
|
D_8029F254 = 0;
|
||||||
|
gBattleStatus.flags1 |= BS_FLAGS1_80000;
|
||||||
|
gBattleStatus.flags2 |= BS_FLAGS1_100000;
|
||||||
|
partner->flags |= ACTOR_FLAG_8000000;
|
||||||
|
|
||||||
|
if (partner->koStatus != 0) {
|
||||||
|
partner->koDuration--;
|
||||||
|
D_8029F254 = 1;
|
||||||
|
D_8029F258 = 20;
|
||||||
|
if (partner->koDuration > 0) {
|
||||||
|
// TODO: We believe these are DebuffFXData*,
|
||||||
|
// but unk_3C is a u8 for these and we need it to be an s32...
|
||||||
|
((s32*)(partner->debuffEffect->data))[15] = partner->koDuration;
|
||||||
|
} else {
|
||||||
|
partner->koStatus = 0;
|
||||||
|
dispatch_event_partner(EVENT_34);
|
||||||
|
// TODO: We believe these are DebuffFXData*,
|
||||||
|
// but unk_3C is a u8 for these and we need it to be an s32...
|
||||||
|
((s32*)(partner->debuffEffect->data))[15] = 0;
|
||||||
|
gBattleStatus.flags2 |= BS_FLAGS2_8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
enemy = battleStatus->enemyActors[i];
|
||||||
|
if (enemy != NULL) {
|
||||||
|
enemy->flags |= ACTOR_FLAG_8000000 | ACTOR_FLAG_4000000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_UNK_1) {
|
||||||
|
if (partner != NULL) {
|
||||||
|
if (partner->onHitScript == NULL || !does_script_exist(partner->onHitID)) {
|
||||||
|
partner->onHitScript = NULL;
|
||||||
|
} else {
|
||||||
|
goto block_27; // TODO find a way to remove
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gBattleStatus.flags2 &= ~BS_FLAGS2_8;
|
||||||
|
if (btl_check_player_defeated() || btl_check_enemies_defeated()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_8;
|
||||||
|
}
|
||||||
|
|
||||||
|
block_27:
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_UNK_8) {
|
||||||
|
if (partner->onTurnChanceScriptSource != NULL) {
|
||||||
|
Evt* script;
|
||||||
|
|
||||||
|
battleStatus->battlePhase = 0xC;
|
||||||
|
script = start_script(partner->onTurnChanceScriptSource, 0xA, 0);
|
||||||
|
partner->onTurnChangeScript = script;
|
||||||
|
partner->onTurnChangeID = script->id;
|
||||||
|
script->owner1.actorID = ACTOR_PARTNER;
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_9;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_UNK_9 &&
|
||||||
|
(partner->onTurnChanceScriptSource == NULL || !does_script_exist(partner->onTurnChangeID)))
|
||||||
|
{
|
||||||
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_PLAYER_DEFEATED) {
|
||||||
|
if (D_8029F258 != 0) {
|
||||||
|
D_8029F258--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gBattleStatus.flags2 &= ~BS_FLAGS2_100000;
|
||||||
|
if (D_8029F254 == 0) {
|
||||||
|
btl_set_state(BATTLE_STATE_SWITCH_TO_PARTNER);
|
||||||
|
} else {
|
||||||
|
gBattleStatus.flags2 |= BS_FLAGS2_4;
|
||||||
|
btl_set_state(BATTLE_STATE_9);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void btl_state_draw_begin_partner_turn(void) {
|
void btl_state_draw_begin_partner_turn(void) {
|
||||||
}
|
}
|
||||||
@ -889,7 +1078,115 @@ void btl_state_update_end_training_battle(void) {
|
|||||||
void btl_state_draw_end_training_battle(void) {
|
void btl_state_draw_end_training_battle(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "16F740", btl_state_update_end_battle);
|
void btl_state_update_end_battle(void) {
|
||||||
|
Battle* blah = (*D_800DC4FC);
|
||||||
|
EncounterStatus* encounterStatus = &gCurrentEncounter;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Stage* stage;
|
||||||
|
Evt* script;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
switch (gBattleState2) {
|
||||||
|
case BATTLE_STATE2_UNK_0:
|
||||||
|
D_80280A30 = 0;
|
||||||
|
if (gGameStatusPtr->debugEnemyContact == 2) {
|
||||||
|
D_80280A30 = 255;
|
||||||
|
}
|
||||||
|
if (encounterStatus->battleOutcome == 1 && !(gBattleStatus.flags1 & BS_FLAGS1_800000)) {
|
||||||
|
btl_cam_unfreeze();
|
||||||
|
btl_cam_use_preset(BTL_CAM_PRESET_B);
|
||||||
|
set_screen_overlay_color(0, 0, 0, 0);
|
||||||
|
set_screen_overlay_center(0, 0, 160, 120);
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_1:
|
||||||
|
if (D_80280A30 == 255) {
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_2;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
D_80280A30 += battleStatus->unk_8D;
|
||||||
|
if (D_80280A30 > 255) {
|
||||||
|
D_80280A30 = 255;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_2:
|
||||||
|
D_80280A30 = 255;
|
||||||
|
gBattleStatus.flags1 &= ~BS_FLAGS1_1;
|
||||||
|
if (D_800DC064 == NULL) {
|
||||||
|
stage = blah->stage;
|
||||||
|
} else {
|
||||||
|
stage = D_800DC064[1];
|
||||||
|
}
|
||||||
|
if (stage->postBattle == NULL) {
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_4;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
script = start_script(stage->postBattle, 0xA, 0);
|
||||||
|
battleStatus->controlScript = script;
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_3;
|
||||||
|
battleStatus->controlScriptID = script->id;
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_3:
|
||||||
|
if (!does_script_exist(battleStatus->controlScriptID)) {
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_4;
|
||||||
|
// fallthrough
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case BATTLE_STATE2_UNK_4:
|
||||||
|
kill_all_scripts();
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
if (battleStatus->enemyActors[i] != NULL) {
|
||||||
|
btl_delete_actor(battleStatus->enemyActors[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (battleStatus->partnerActor != NULL) {
|
||||||
|
btl_delete_actor(battleStatus->partnerActor);
|
||||||
|
}
|
||||||
|
|
||||||
|
btl_delete_player_actor(battleStatus->playerActor);
|
||||||
|
|
||||||
|
if (battleStatus->nextMerleeSpellType == 4) {
|
||||||
|
encounterStatus->merleeCoinBonus = 1;
|
||||||
|
battleStatus->nextMerleeSpellType = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
encounterStatus->damageTaken = battleStatus->damageTaken;
|
||||||
|
|
||||||
|
if (gBattleStatus.flags2 & BS_FLAGS2_10000000) {
|
||||||
|
encounterStatus->dropWhackaBump = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
remove_all_effects();
|
||||||
|
set_windows_visible(0);
|
||||||
|
|
||||||
|
if (gBattleStatus.flags2 & BS_FLAGS2_40) {
|
||||||
|
decrement_status_menu_disabled();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (encounterStatus->battleOutcome == OUTCOME_PLAYER_LOST &&
|
||||||
|
!(gBattleStatus.flags1 & BS_FLAGS1_800000))
|
||||||
|
{
|
||||||
|
s16 areaID;
|
||||||
|
s16 mapID;
|
||||||
|
|
||||||
|
btl_set_state(BATTLE_STATE_0);
|
||||||
|
D_800DC4D0 = gBattleState;
|
||||||
|
get_map_IDs_by_name("gv_01", &areaID, &mapID);
|
||||||
|
gGameStatusPtr->areaID = areaID;
|
||||||
|
gGameStatusPtr->mapID = mapID;
|
||||||
|
gGameStatusPtr->entryID = 0;
|
||||||
|
set_game_mode(GAME_MODE_ENTER_WORLD);
|
||||||
|
} else {
|
||||||
|
btl_set_state(BATTLE_STATE_0);
|
||||||
|
D_800DC4D0 = gBattleState;
|
||||||
|
func_8003E514(1);
|
||||||
|
set_game_mode(GAME_MODE_END_BATTLE);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void btl_state_draw_end_battle(void) {
|
void btl_state_draw_end_battle(void) {
|
||||||
Camera* camera = &gCameras[gCurrentCameraID];
|
Camera* camera = &gCameras[gCurrentCameraID];
|
||||||
@ -926,7 +1223,162 @@ void btl_state_update_defend(void) {
|
|||||||
void btl_state_draw_defend(void) {
|
void btl_state_draw_defend(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "16F740", btl_state_update_run_away);
|
void btl_state_update_run_away(void) {
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||||
|
Actor* player = battleStatus->playerActor;
|
||||||
|
Actor* partner = battleStatus->partnerActor;
|
||||||
|
Actor* enemy;
|
||||||
|
s32 var_s0;
|
||||||
|
f32 var_f2;
|
||||||
|
Evt* script;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
switch (gBattleState2) {
|
||||||
|
case BATTLE_STATE2_UNK_0:
|
||||||
|
battleStatus->unk_8C = 0;
|
||||||
|
gBattleStatus.flags1 &= ~BS_FLAGS1_40000;
|
||||||
|
gBattleStatus.flags2 |= BS_FLAGS2_10 | BS_FLAGS2_8 | BS_FLAGS2_4 | BS_FLAGS2_2;
|
||||||
|
playerData->unk_2A6++;
|
||||||
|
btl_cam_use_preset(BTL_CAM_PRESET_25);
|
||||||
|
var_s0 = 0;
|
||||||
|
btl_cam_target_actor(ACTOR_PLAYER);
|
||||||
|
var_f2 = 0.0f;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
enemy = battleStatus->enemyActors[i];
|
||||||
|
if (enemy != NULL) {
|
||||||
|
if (!(enemy->flags & ACTOR_FLAG_TARGET_ONLY)) {
|
||||||
|
if (!(enemy->flags & ACTOR_FLAG_NO_DMG_APPLY)) {
|
||||||
|
f32 escapeChance = enemy->actorBlueprint->escapeChance;
|
||||||
|
|
||||||
|
var_s0 += 1;
|
||||||
|
if (enemy->debuff == 3 ||
|
||||||
|
enemy->debuff == 4 ||
|
||||||
|
enemy->debuff == 5 ||
|
||||||
|
enemy->debuff == 6 ||
|
||||||
|
enemy->debuff == 7 ||
|
||||||
|
enemy->debuff == 8)
|
||||||
|
{
|
||||||
|
escapeChance = 100.0f;
|
||||||
|
}
|
||||||
|
var_f2 += escapeChance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
player->state.varTable[0] = var_f2 / var_s0;
|
||||||
|
if (gGameStatusPtr->debugEnemyContact == 4) {
|
||||||
|
player->state.varTable[0] = 100;
|
||||||
|
}
|
||||||
|
battleStatus->battlePhase = 3;
|
||||||
|
script = start_script(PlayerScriptDispatcher, 0xA, 0);
|
||||||
|
player->takeTurnScript = script;
|
||||||
|
player->takeTurnID = script->id;
|
||||||
|
script->owner1.actorID = ACTOR_PLAYER;
|
||||||
|
if (partner != NULL && partner->koStatus == 0) {
|
||||||
|
script = start_script(partner->takeTurnScriptSource, 0xA, 0);
|
||||||
|
partner->takeTurnScript = script;
|
||||||
|
partner->takeTurnID = script->id;
|
||||||
|
script->owner1.actorID = ACTOR_PARTNER;
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_2;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (!does_script_exist(player->takeTurnID) && battleStatus->unk_8C == 0) {
|
||||||
|
if (!(gBattleStatus.flags1 & BS_FLAGS1_40000)) {
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_3;
|
||||||
|
} else {
|
||||||
|
currentEncounter->battleOutcome = 2;
|
||||||
|
if (is_ability_active(ABILITY_RUNAWAY_PAY) == 0) {
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_B;
|
||||||
|
} else {
|
||||||
|
status_menu_start_blinking_starpoints();
|
||||||
|
func_8023E104();
|
||||||
|
D_8029F264 = 0;
|
||||||
|
D_8029F24C = 0;
|
||||||
|
D_80280A30 = 0;
|
||||||
|
D_8029F25C = battleStatus->totalStarPoints * 100;
|
||||||
|
D_8029F250 = 20;
|
||||||
|
D_8029F260 = D_8029F25C / D_8029F250;
|
||||||
|
gBattleState2 = BATTLE_STATE2_PLAYER_DEFEATED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_PLAYER_DEFEATED) {
|
||||||
|
if (battleStatus->totalStarPoints != 0) {
|
||||||
|
s8 temp_v1_4;
|
||||||
|
|
||||||
|
D_8029F25C -= D_8029F260;
|
||||||
|
temp_v1_4 = D_8029F25C / 100;
|
||||||
|
var_s0 = battleStatus->totalStarPoints - temp_v1_4;
|
||||||
|
battleStatus->totalStarPoints = temp_v1_4;
|
||||||
|
|
||||||
|
if (var_s0 > 0) {
|
||||||
|
sfx_play_sound(SOUND_211);
|
||||||
|
}
|
||||||
|
playerData->starPoints += var_s0;
|
||||||
|
D_80280A30 += 1;
|
||||||
|
if (D_8029F250 == 0 && battleStatus->totalStarPoints != 0) {
|
||||||
|
playerData->starPoints++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (playerData->starPoints >= 99) {
|
||||||
|
playerData->starPoints = 99;
|
||||||
|
}
|
||||||
|
if (battleStatus->totalStarPoints == 0) {
|
||||||
|
if (D_8029F250 != 0) {
|
||||||
|
D_8029F250--;
|
||||||
|
} else {
|
||||||
|
status_menu_stop_blinking_starpoints();
|
||||||
|
func_8023E11C();
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_B;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (gBattleState2 == BATTLE_STATE2_UNK_B) {
|
||||||
|
playerData->battlesFled++;
|
||||||
|
if (!(gBattleStatus.flags2 & 0x02000000)) {
|
||||||
|
bgm_set_song(0, -1, 0, 1500, 8);
|
||||||
|
}
|
||||||
|
btl_set_state(BATTLE_STATE_END_BATTLE);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (gBattleState2) {
|
||||||
|
case BATTLE_STATE2_UNK_3:
|
||||||
|
battleStatus->battlePhase = 7;
|
||||||
|
script = start_script(PlayerScriptDispatcher, 0xA, 0);
|
||||||
|
player->takeTurnScript = script;
|
||||||
|
player->takeTurnID = script->id;
|
||||||
|
script->owner1.actorID = ACTOR_PLAYER;
|
||||||
|
if (partner != NULL && partner->koStatus == 0) {
|
||||||
|
script = start_script(partner->takeTurnScriptSource, 0xA, 0);
|
||||||
|
partner->takeTurnScript = script;
|
||||||
|
partner->takeTurnID = script->id;
|
||||||
|
script->owner1.actorID = ACTOR_PARTNER;
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_4;
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_4:
|
||||||
|
if (D_8029F248 != 0) {
|
||||||
|
D_8029F248--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!does_script_exist(player->takeTurnID) &&
|
||||||
|
(partner == NULL || !does_script_exist(partner->takeTurnID)) &&
|
||||||
|
battleStatus->unk_8C == 0)
|
||||||
|
{
|
||||||
|
btl_set_state(BATTLE_STATE_9);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void btl_state_draw_run_away(void) {
|
void btl_state_draw_run_away(void) {
|
||||||
}
|
}
|
||||||
@ -1586,7 +2038,156 @@ void btl_state_draw_first_stike(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "16F740", btl_state_update_partner_striking_first);
|
void btl_state_update_partner_striking_first(void) {
|
||||||
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Actor* player = battleStatus->playerActor;
|
||||||
|
Actor* partner = battleStatus->partnerActor;
|
||||||
|
Actor* actor;
|
||||||
|
s32 found;
|
||||||
|
SelectableTarget* target;
|
||||||
|
Evt* script;
|
||||||
|
s32 level;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
switch (gBattleState2) {
|
||||||
|
case BATTLE_STATE2_UNK_0:
|
||||||
|
D_8029F254 = 0;
|
||||||
|
level = partner->actorBlueprint->level;
|
||||||
|
switch (playerData->currentPartner) {
|
||||||
|
case PARTNER_KOOPER:
|
||||||
|
battleStatus->moveCategory = 5;
|
||||||
|
battleStatus->selectedItemID = ITEM_NONE;
|
||||||
|
battleStatus->selectedMoveID = level + MOVE_SHELL_TOSS1;
|
||||||
|
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
|
||||||
|
break;
|
||||||
|
case PARTNER_BOMBETTE:
|
||||||
|
battleStatus->moveCategory = 5;
|
||||||
|
battleStatus->selectedItemID = ITEM_NONE;
|
||||||
|
battleStatus->selectedMoveID = level + MOVE_BODY_SLAM1;
|
||||||
|
battleStatus->currentTargetListFlags = gMoveTable[battleStatus->selectedMoveID].flags;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
actor = get_actor(ACTOR_ENEMY0);
|
||||||
|
if (actor->onHitScriptSource != NULL) {
|
||||||
|
actor->lastEventType = EVENT_BEGIN_FIRST_STRIKE;
|
||||||
|
script = start_script(actor->onHitScriptSource, 0xA, 0x20);
|
||||||
|
actor->onHitScript = script;
|
||||||
|
actor->onHitID = script->id;
|
||||||
|
script->owner1.actorID = actor->actorID;
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_1:
|
||||||
|
player_create_target_list(partner);
|
||||||
|
target = &partner->targetData[partner->targetIndexList[0]];
|
||||||
|
partner->targetActorID = target->actorID;
|
||||||
|
partner->targetPartIndex = target->partID;
|
||||||
|
battleStatus->unk_8C = 0;
|
||||||
|
battleStatus->lastAttackDamage = 0;
|
||||||
|
battleStatus->unk_19A = 0;
|
||||||
|
gBattleStatus.flags1 &= ~BS_FLAGS1_2;
|
||||||
|
gBattleStatus.flags2 |= BS_FLAGS2_1000000;
|
||||||
|
gBattleStatus.flags1 |= BS_FLAGS1_80000;
|
||||||
|
increment_status_menu_disabled();
|
||||||
|
btl_cam_use_preset(BTL_CAM_PRESET_10);
|
||||||
|
btl_cam_target_actor(ACTOR_PARTNER);
|
||||||
|
reset_actor_turn_info();
|
||||||
|
battleStatus->battlePhase = PHASE_FIRST_STRIKE;
|
||||||
|
script = start_script(partner->takeTurnScriptSource, 0xA, 0);
|
||||||
|
partner->takeTurnScript = script;
|
||||||
|
D_8029F248 = 3;
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_2;
|
||||||
|
partner->takeTurnID = script->id;
|
||||||
|
script->owner1.actorID = ACTOR_PARTNER;
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_2:
|
||||||
|
if (D_8029F248 != 0) {
|
||||||
|
D_8029F248--;
|
||||||
|
} else {
|
||||||
|
D_8029F254 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (partner->takeTurnScript == NULL || !does_script_exist(partner->takeTurnID)) {
|
||||||
|
partner->takeTurnScript = NULL;
|
||||||
|
if (partner->onHitScript == NULL || !does_script_exist(partner->onHitID)) {
|
||||||
|
partner->onHitScript = NULL;
|
||||||
|
if (player->onHitScript == NULL || !does_script_exist(player->onHitID)) {
|
||||||
|
player->onHitScript = NULL;
|
||||||
|
found = FALSE;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
actor = battleStatus->enemyActors[i];
|
||||||
|
if (actor != NULL && actor->takeTurnScript != NULL) {
|
||||||
|
if (does_script_exist(actor->takeTurnID)) {
|
||||||
|
found = TRUE;
|
||||||
|
} else {
|
||||||
|
actor->takeTurnScript = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
actor = battleStatus->enemyActors[i];
|
||||||
|
if (actor != NULL && actor->onHitScript != NULL) {
|
||||||
|
if (does_script_exist(actor->onHitID)) {
|
||||||
|
found = TRUE;
|
||||||
|
} else {
|
||||||
|
actor->onHitScript = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!found) {
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
actor = battleStatus->enemyActors[i];
|
||||||
|
if (actor != NULL) {
|
||||||
|
actor->flags &= ~ACTOR_FLAG_80000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->unk_8C == 0) {
|
||||||
|
decrement_status_menu_disabled();
|
||||||
|
if (!btl_check_player_defeated() && !btl_check_enemies_defeated()) {
|
||||||
|
actor = get_actor(partner->targetActorID);
|
||||||
|
if (actor != NULL) {
|
||||||
|
if (actor->onHitScriptSource != NULL) {
|
||||||
|
actor->lastEventType = EVENT_END_FIRST_STRIKE;
|
||||||
|
script = start_script(actor->onHitScriptSource, 0xA, 0x20);
|
||||||
|
actor->onHitScript = script;
|
||||||
|
actor->onHitID = script->id;
|
||||||
|
script->owner1.actorID = actor->actorID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
gBattleState2 = BATTLE_STATE2_UNK_3;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case BATTLE_STATE2_UNK_3:
|
||||||
|
found = FALSE;
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
actor = battleStatus->enemyActors[i];
|
||||||
|
if (actor != NULL && actor->onHitScript != NULL) {
|
||||||
|
if (does_script_exist(actor->onHitID)) {
|
||||||
|
found = TRUE;
|
||||||
|
} else {
|
||||||
|
actor->onHitScript = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!found) {
|
||||||
|
btl_set_state(BATTLE_STATE_BEGIN_TURN);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void btl_state_draw_partner_striking_first(void) {
|
void btl_state_draw_partner_striking_first(void) {
|
||||||
if (D_8029F254 != 0) {
|
if (D_8029F254 != 0) {
|
||||||
@ -1603,7 +2204,195 @@ void btl_state_draw_partner_striking_first(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ugly loops and such
|
||||||
|
#ifdef NON_EQUIVALENT
|
||||||
|
void btl_state_update_enemy_striking_first(void) {
|
||||||
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Actor* player = battleStatus->playerActor;
|
||||||
|
Actor* partner = battleStatus->partnerActor;
|
||||||
|
Evt* script;
|
||||||
|
Actor* enemy;
|
||||||
|
s32 cond;
|
||||||
|
s32 i;
|
||||||
|
s32 j;
|
||||||
|
|
||||||
|
Actor* temp_s0;
|
||||||
|
s32 temp_t0;
|
||||||
|
s32 temp_a1;
|
||||||
|
s16* temp_t4;
|
||||||
|
s16* var_a2;
|
||||||
|
s16* var_t3;
|
||||||
|
s32 temp_v0;
|
||||||
|
s32 var_a3;
|
||||||
|
s32 var_t2;
|
||||||
|
|
||||||
|
s32 nextEnemyIdx;
|
||||||
|
s32 count;
|
||||||
|
|
||||||
|
switch (gBattleState2) {
|
||||||
|
case 0:
|
||||||
|
battleStatus->unk_8C = 0;
|
||||||
|
battleStatus->lastAttackDamage = 0;
|
||||||
|
battleStatus->unk_19A = 0;
|
||||||
|
playerData->enemyFirstStrikes++;
|
||||||
|
battleStatus->flags1 &= ~2;
|
||||||
|
D_8029F254 = 0;
|
||||||
|
player->flags &= ~ACTOR_FLAG_8000000;
|
||||||
|
if (partner != NULL) {
|
||||||
|
partner->flags &= ~ACTOR_FLAG_8000000;
|
||||||
|
}
|
||||||
|
battleStatus->flags2 |= 0x01000000 | 0x4000;
|
||||||
|
count = 0;
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
if (battleStatus->enemyActors[i] != NULL) {
|
||||||
|
battleStatus->enemyIDs[i] = i | 0x200;
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->numEnemyActors = count;
|
||||||
|
// for (i = 0; i < count - 1; i++) {
|
||||||
|
// for (j = i + 1; j < count; j++) {
|
||||||
|
// s32 temp_t0;
|
||||||
|
// s32 temp_a1;
|
||||||
|
|
||||||
|
// temp_t0 = battleStatus->enemyActors[battleStatus->enemyIDs[i]]->turnPriority;
|
||||||
|
// temp_a1 = battleStatus->enemyActors[battleStatus->enemyIDs[j]]->turnPriority;
|
||||||
|
// if (temp_t0 < temp_a1) {
|
||||||
|
// battleStatus->enemyActors[battleStatus->enemyIDs[i]]->turnPriority = temp_a1;
|
||||||
|
// battleStatus->enemyActors[battleStatus->enemyIDs[j]]->turnPriority = temp_t0;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
i = 0;
|
||||||
|
temp_v0 = var_t2 - 1;
|
||||||
|
temp_t4 = battleStatus->enemyIDs;
|
||||||
|
if (temp_v0 > 0) {
|
||||||
|
var_t3 = temp_t4;
|
||||||
|
do {
|
||||||
|
var_a3 = i + 1;
|
||||||
|
if (var_a3 < var_t2) {
|
||||||
|
var_a2 = &temp_t4[var_a3];
|
||||||
|
do {
|
||||||
|
temp_t0 = (u16) *var_t3;
|
||||||
|
temp_a1 = (u16) *var_a2;
|
||||||
|
var_a3 += 1;
|
||||||
|
if (battleStatus->enemyActors[temp_t0 & 0xFF]->turnPriority < battleStatus->enemyActors[temp_a1 & 0xFF]->turnPriority) {
|
||||||
|
*var_t3 = temp_a1;
|
||||||
|
*var_a2 = temp_t0;
|
||||||
|
}
|
||||||
|
var_a2 += 2;
|
||||||
|
} while (var_a3 < var_t2);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
var_t3 += 2;
|
||||||
|
} while (i < temp_v0);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->nextEnemyIndex = 0;
|
||||||
|
i = 0;
|
||||||
|
loop_18:
|
||||||
|
loop_19:
|
||||||
|
temp_s0 = battleStatus->enemyActors[battleStatus->enemyIDs[i]];
|
||||||
|
if (temp_s0 == NULL) {
|
||||||
|
block_21:
|
||||||
|
i++;
|
||||||
|
if (i >= battleStatus->numEnemyActors) {
|
||||||
|
i = 0;
|
||||||
|
goto loop_18;
|
||||||
|
}
|
||||||
|
goto loop_19;
|
||||||
|
}
|
||||||
|
if (temp_s0->flags & 0x204000) {
|
||||||
|
goto block_21;
|
||||||
|
}
|
||||||
|
|
||||||
|
nextEnemyIdx = i + 1;
|
||||||
|
battleStatus->currentTurnEnemy = enemy;
|
||||||
|
battleStatus->activeEnemyActorID = battleStatus->enemyIDs[i];
|
||||||
|
if (nextEnemyIdx >= battleStatus->numEnemyActors) {
|
||||||
|
nextEnemyIdx = 0;
|
||||||
|
}
|
||||||
|
battleStatus->nextEnemyIndex = nextEnemyIdx;
|
||||||
|
btl_cam_target_actor(battleStatus->activeEnemyActorID);
|
||||||
|
enemy = battleStatus->currentTurnEnemy;
|
||||||
|
reset_actor_turn_info();
|
||||||
|
battleStatus->battlePhase = 1;
|
||||||
|
script = start_script(enemy->takeTurnScriptSource, 0xA, 0);
|
||||||
|
enemy->takeTurnScript = script;
|
||||||
|
D_8029F248 = 3;
|
||||||
|
enemy->takeTurnID = script->id;
|
||||||
|
gBattleState2 = 2;
|
||||||
|
script->owner1.enemyID = battleStatus->activeEnemyActorID;
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (D_8029F248 != 0) {
|
||||||
|
D_8029F248--;
|
||||||
|
} else {
|
||||||
|
D_8029F254 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
enemy = battleStatus->currentTurnEnemy;
|
||||||
|
if ((enemy->takeTurnScript == NULL || !does_script_exist(enemy->takeTurnID)) &&
|
||||||
|
((enemy->takeTurnScript = NULL, (player->onHitScript == NULL)) || !does_script_exist(player->onHitID))) {
|
||||||
|
player->onHitScript = NULL;
|
||||||
|
if (partner != NULL) {
|
||||||
|
if (partner->onHitScript == NULL || !does_script_exist(partner->onHitID)) {
|
||||||
|
partner->onHitScript = NULL;
|
||||||
|
goto block_39;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
block_39:
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
enemy = battleStatus->enemyActors[i];
|
||||||
|
if (enemy != NULL && enemy->takeTurnScript != NULL) {
|
||||||
|
if (does_script_exist(enemy->takeTurnID)) {
|
||||||
|
cond = TRUE;
|
||||||
|
} else {
|
||||||
|
enemy->takeTurnScript = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!cond) {
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
enemy = battleStatus->enemyActors[i];
|
||||||
|
if (enemy != NULL && enemy->onHitScript != NULL) {
|
||||||
|
if (does_script_exist(enemy->onHitID)) {
|
||||||
|
cond = TRUE;
|
||||||
|
} else {
|
||||||
|
enemy->onHitScript = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!cond) {
|
||||||
|
gBattleStatus.flags2 &= ~0x4000;
|
||||||
|
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
|
||||||
|
enemy = battleStatus->enemyActors[i];
|
||||||
|
if (enemy != NULL) {
|
||||||
|
enemy->flags &= 0xFFF7FFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->unk_8C == 0 &&
|
||||||
|
!btl_check_player_defeated() &&
|
||||||
|
!btl_check_enemies_defeated())
|
||||||
|
{
|
||||||
|
btl_set_state(5);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#else
|
||||||
INCLUDE_ASM(s32, "16F740", btl_state_update_enemy_striking_first);
|
INCLUDE_ASM(s32, "16F740", btl_state_update_enemy_striking_first);
|
||||||
|
#endif
|
||||||
|
|
||||||
void btl_state_draw_enemy_striking_first(void) {
|
void btl_state_draw_enemy_striking_first(void) {
|
||||||
if (D_8029F254 != 0) {
|
if (D_8029F254 != 0) {
|
||||||
|
10
src/5B320.c
10
src/5B320.c
@ -191,8 +191,10 @@ extern HudScript HudScript_Parakarry;
|
|||||||
extern HudScript HudScript_Watt;
|
extern HudScript HudScript_Watt;
|
||||||
extern HudScript HudScript_Sushie;
|
extern HudScript HudScript_Sushie;
|
||||||
extern HudScript HudScript_Lakilester;
|
extern HudScript HudScript_Lakilester;
|
||||||
|
extern HudScript HudScript_Partner9;
|
||||||
extern HudScript HudScript_Bow;
|
extern HudScript HudScript_Bow;
|
||||||
extern HudScript HudScript_PartnerA;
|
extern HudScript HudScript_PartnerA;
|
||||||
|
extern HudScript HudScript_PartnerB;
|
||||||
extern HudScript HudScript_Partner0Disabled;
|
extern HudScript HudScript_Partner0Disabled;
|
||||||
extern HudScript HudScript_GoombarioDisabled;
|
extern HudScript HudScript_GoombarioDisabled;
|
||||||
extern HudScript HudScript_KooperDisabled;
|
extern HudScript HudScript_KooperDisabled;
|
||||||
@ -201,8 +203,10 @@ extern HudScript HudScript_ParakarryDisabled;
|
|||||||
extern HudScript HudScript_WattDisabled;
|
extern HudScript HudScript_WattDisabled;
|
||||||
extern HudScript HudScript_SushieDisabled;
|
extern HudScript HudScript_SushieDisabled;
|
||||||
extern HudScript HudScript_LakilesterDisabled;
|
extern HudScript HudScript_LakilesterDisabled;
|
||||||
|
extern HudScript HudScript_Partner9Disabled;
|
||||||
extern HudScript HudScript_BowDisabled;
|
extern HudScript HudScript_BowDisabled;
|
||||||
extern HudScript HudScript_PartnerADisabled;
|
extern HudScript HudScript_PartnerADisabled;
|
||||||
|
extern HudScript HudScript_PartnerBDisabled;
|
||||||
|
|
||||||
IconHudScriptPair gPartnerIconHudScripts[] = {
|
IconHudScriptPair gPartnerIconHudScripts[] = {
|
||||||
{ .enabled = &HudScript_Partner0, .disabled = &HudScript_Partner0Disabled, },
|
{ .enabled = &HudScript_Partner0, .disabled = &HudScript_Partner0Disabled, },
|
||||||
@ -214,10 +218,10 @@ IconHudScriptPair gPartnerIconHudScripts[] = {
|
|||||||
{ .enabled = &HudScript_Watt, .disabled = &HudScript_WattDisabled, },
|
{ .enabled = &HudScript_Watt, .disabled = &HudScript_WattDisabled, },
|
||||||
{ .enabled = &HudScript_Sushie, .disabled = &HudScript_SushieDisabled, },
|
{ .enabled = &HudScript_Sushie, .disabled = &HudScript_SushieDisabled, },
|
||||||
{ .enabled = &HudScript_Lakilester, .disabled = &HudScript_LakilesterDisabled, },
|
{ .enabled = &HudScript_Lakilester, .disabled = &HudScript_LakilesterDisabled, },
|
||||||
{ .enabled = (HudScript*)0x80107F78, .disabled = (HudScript*)0x80107FA0, },
|
{ .enabled = &HudScript_Partner9, .disabled = &HudScript_Partner9Disabled, },
|
||||||
{ .enabled = &HudScript_PartnerA, .disabled = &HudScript_PartnerADisabled, },
|
{ .enabled = &HudScript_PartnerA, .disabled = &HudScript_PartnerADisabled, },
|
||||||
{ .enabled = (HudScript*)0x80108018, .disabled = (HudScript*)0x80108040, },
|
{ .enabled = &HudScript_PartnerB, .disabled = &HudScript_PartnerBDisabled, },
|
||||||
{ .enabled = (HudScript*)0x80108018, .disabled = (HudScript*)0x80108040 },
|
{ .enabled = &HudScript_PartnerB, .disabled = &HudScript_PartnerBDisabled },
|
||||||
};
|
};
|
||||||
|
|
||||||
#include "move_table.inc.c"
|
#include "move_table.inc.c"
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "world/partners.h"
|
#include "world/partners.h"
|
||||||
#include "world/actions.h"
|
#include "world/actions.h"
|
||||||
#include "npc.h"
|
#include "npc.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
extern void* D_8010C924;
|
extern void* D_8010C924;
|
||||||
extern s32 D_8010C964;
|
extern s32 D_8010C964;
|
||||||
@ -390,8 +391,8 @@ void set_action_state(s32 actionState) {
|
|||||||
sfx_stop_sound(spinState->spinSoundID);
|
sfx_stop_sound(spinState->spinSoundID);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->unk_D8) {
|
if (playerStatus->unk_D8 != NULL) {
|
||||||
playerStatus->unk_D8[3][9] = 0xA; // TODO: Substruct? Currently UB.
|
((Effect46FXData*)playerStatus->unk_D8->data)->unk_24 = 10;
|
||||||
playerStatus->unk_D8 = NULL;
|
playerStatus->unk_D8 = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
14
src/C50A0.c
14
src/C50A0.c
@ -192,7 +192,7 @@ s32 make_item_entity_at_player(s32 itemID, s32 arg1, s32 pickupMsgFlags) {
|
|||||||
f32 posZ;
|
f32 posZ;
|
||||||
f32 depth;
|
f32 depth;
|
||||||
s32 id;
|
s32 id;
|
||||||
|
|
||||||
for (i = 0; i < MAX_ITEM_ENTITIES; i++) {
|
for (i = 0; i < MAX_ITEM_ENTITIES; i++) {
|
||||||
if (gCurrentItemEntities[i] == NULL) {
|
if (gCurrentItemEntities[i] == NULL) {
|
||||||
break;
|
break;
|
||||||
@ -200,11 +200,11 @@ s32 make_item_entity_at_player(s32 itemID, s32 arg1, s32 pickupMsgFlags) {
|
|||||||
}
|
}
|
||||||
ASSERT(i < MAX_ITEM_ENTITIES);
|
ASSERT(i < MAX_ITEM_ENTITIES);
|
||||||
id = i;
|
id = i;
|
||||||
|
|
||||||
gCurrentItemEntities[id] = item = heap_malloc(sizeof(*item));
|
gCurrentItemEntities[id] = item = heap_malloc(sizeof(*item));
|
||||||
ItemEntitiesCreated++;
|
ItemEntitiesCreated++;
|
||||||
ASSERT(item != NULL);
|
ASSERT(item != NULL);
|
||||||
|
|
||||||
itemID &= 0xFFFF;
|
itemID &= 0xFFFF;
|
||||||
item->renderGroup = -1;
|
item->renderGroup = -1;
|
||||||
item->flags = (ITEM_ENTITY_FLAGS_CAM0 | ITEM_ENTITY_FLAGS_CAM1 | ITEM_ENTITY_FLAGS_CAM2 | ITEM_ENTITY_FLAGS_10 | ITEM_ENTITY_FLAGS_2000000);
|
item->flags = (ITEM_ENTITY_FLAGS_CAM0 | ITEM_ENTITY_FLAGS_CAM1 | ITEM_ENTITY_FLAGS_CAM2 | ITEM_ENTITY_FLAGS_10 | ITEM_ENTITY_FLAGS_2000000);
|
||||||
@ -218,7 +218,7 @@ s32 make_item_entity_at_player(s32 itemID, s32 arg1, s32 pickupMsgFlags) {
|
|||||||
item->position.x = playerStatus->position.x;
|
item->position.x = playerStatus->position.x;
|
||||||
item->position.y = playerStatus->position.y;
|
item->position.y = playerStatus->position.y;
|
||||||
item->position.z = playerStatus->position.z;
|
item->position.z = playerStatus->position.z;
|
||||||
|
|
||||||
item->shadowIndex = -1;
|
item->shadowIndex = -1;
|
||||||
item->nextUpdate = 1;
|
item->nextUpdate = 1;
|
||||||
item->unk_34.x = -9999;
|
item->unk_34.x = -9999;
|
||||||
@ -238,7 +238,7 @@ s32 make_item_entity_at_player(s32 itemID, s32 arg1, s32 pickupMsgFlags) {
|
|||||||
item->flags |= ITEM_ENTITY_FLAGS_20000;
|
item->flags |= ITEM_ENTITY_FLAGS_20000;
|
||||||
}
|
}
|
||||||
ItemEntityAlternatingSpawn = 1 - ItemEntityAlternatingSpawn;
|
ItemEntityAlternatingSpawn = 1 - ItemEntityAlternatingSpawn;
|
||||||
|
|
||||||
item->shadowIndex = create_shadow_type(0, item->position.x, item->position.y, item->position.z);
|
item->shadowIndex = create_shadow_type(0, item->position.x, item->position.y, item->position.z);
|
||||||
shadow = get_shadow_by_index(item->shadowIndex);
|
shadow = get_shadow_by_index(item->shadowIndex);
|
||||||
shadow->flags |= 1;
|
shadow->flags |= 1;
|
||||||
@ -251,12 +251,12 @@ s32 make_item_entity_at_player(s32 itemID, s32 arg1, s32 pickupMsgFlags) {
|
|||||||
shadow->position.x = posX;
|
shadow->position.x = posX;
|
||||||
shadow->position.y = posY;
|
shadow->position.y = posY;
|
||||||
shadow->position.z = posZ;
|
shadow->position.z = posZ;
|
||||||
|
|
||||||
shadow->rotation.x = gGameStatusPtr->playerGroundTraceAngles.x;
|
shadow->rotation.x = gGameStatusPtr->playerGroundTraceAngles.x;
|
||||||
shadow->rotation.y = 0.0f;
|
shadow->rotation.y = 0.0f;
|
||||||
shadow->rotation.z = gGameStatusPtr->playerGroundTraceAngles.z;
|
shadow->rotation.z = gGameStatusPtr->playerGroundTraceAngles.z;
|
||||||
set_standard_shadow_scale(shadow, depth * 0.5f);
|
set_standard_shadow_scale(shadow, depth * 0.5f);
|
||||||
|
|
||||||
item_entity_load(item);
|
item_entity_load(item);
|
||||||
if (item->itemID == ITEM_COIN) {
|
if (item->itemID == ITEM_COIN) {
|
||||||
sparkle_script_init(item, &SparkleScript_Coin);
|
sparkle_script_init(item, &SparkleScript_Coin);
|
||||||
|
@ -5,14 +5,16 @@
|
|||||||
|
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_AButton;
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_AButtonDown;
|
||||||
extern HudScript HudScript_TimingWait;
|
extern HudScript HudScript_TimingWait;
|
||||||
|
extern HudScript HudScript_TimingReady;
|
||||||
extern HudScript HudScript_FillGaugeResult;
|
extern HudScript HudScript_FillGaugeResult;
|
||||||
extern s32 D_80294320;
|
extern s32 D_80294320;
|
||||||
|
|
||||||
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 100;
|
battleStatus->unk_82 = 100;
|
||||||
battleStatus->unk_434 = &D_80294320;
|
battleStatus->unk_434 = &D_80294320;
|
||||||
@ -34,35 +36,148 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_FillGaugeResult);
|
id = hud_element_create(&HudScript_FillGaugeResult);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_TimingWait);
|
id = hud_element_create(&HudScript_TimingWait);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "common/MashActionCommandInit.inc.c"
|
#include "common/MashActionCommandInit.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/body_slam", func_802A92D4_4285B4);
|
void func_802A92D4_4285B4(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
s32 phi_v0;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[3];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 22);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 42, actionCommandStatus->hudElementY + 24);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButtonDown);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_46 = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
if (battleStatus->currentButtonsDown & BUTTON_A) {
|
||||||
|
actionCommandStatus->barFillLevel += 154;
|
||||||
|
actionCommandStatus->unk_46 += 154;
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->unk_54 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel >= 10000) {
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[2], &HudScript_TimingReady);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButton);
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
sfx_play_sound(SOUND_234);
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (actionCommandStatus->unk_46 < 10000) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else if (actionCommandStatus->unk_46 - (battleStatus->unk_434[actionCommandStatus->unk_50] * 154) >= 10309) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = 1;
|
||||||
|
}
|
||||||
|
} while (0); // required to match
|
||||||
|
|
||||||
|
battleStatus->unk_86 = 0;
|
||||||
|
if (battleStatus->actionSuccess == 1) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
sfx_stop_sound(0x80000041);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void N(draw_hud_elements)(void) {
|
void N(draw_hud_elements)(void) {
|
||||||
s32 x, y;
|
s32 x, y;
|
||||||
|
@ -10,21 +10,7 @@ extern s32 D_80294300;
|
|||||||
|
|
||||||
extern HudScript HudScript_MashAButton;
|
extern HudScript HudScript_MashAButton;
|
||||||
|
|
||||||
typedef struct UnkVec2s {
|
s32 D_802A9810_428280[] = { 0, 25, 50, 75, 75, 0, 0, 0 };
|
||||||
/* 0x00 */ s16 unk_0;
|
|
||||||
/* 0x02 */ s16 unk_2;
|
|
||||||
} UnkVec2s;
|
|
||||||
|
|
||||||
UnkVec2s D_802A9812_428280[] = {
|
|
||||||
{ 0x0, 0x00 },
|
|
||||||
{ 0x0, 0x19 },
|
|
||||||
{ 0x0, 0x32 },
|
|
||||||
{ 0x0, 0x4B },
|
|
||||||
{ 0x0, 0x4B },
|
|
||||||
{ 0x0, 0x00 },
|
|
||||||
{ 0x0, 0x00 },
|
|
||||||
{ 0x0, 0x00 },
|
|
||||||
};
|
|
||||||
|
|
||||||
ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A9000_427A70(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
@ -132,7 +118,7 @@ void func_802A928C_427CFC(void) {
|
|||||||
if (!actionCommandStatus->unk_68) {
|
if (!actionCommandStatus->unk_68) {
|
||||||
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
actionCommandStatus->barFillLevel -=
|
actionCommandStatus->barFillLevel -=
|
||||||
D_802A9812_428280[actionCommandStatus->barFillLevel / mashMeterCutoff / 20].unk_2;
|
D_802A9810_428280[actionCommandStatus->barFillLevel / mashMeterCutoff / 20];
|
||||||
|
|
||||||
if (actionCommandStatus->barFillLevel < 0) {
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
actionCommandStatus->barFillLevel = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
extern s32 D_80294220;
|
extern s32 D_80294220;
|
||||||
extern HudScript HudScript_AButton;
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_MashAButton;
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_RunningAway;
|
extern HudScript HudScript_RunningAway;
|
||||||
extern HudScript HudScript_RunAwayOK;
|
extern HudScript HudScript_RunAwayOK;
|
||||||
@ -12,7 +13,7 @@ extern HudScript HudScript_RunAwayOK;
|
|||||||
ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 0;
|
battleStatus->unk_82 = 0;
|
||||||
battleStatus->unk_434 = &D_80294220;
|
battleStatus->unk_434 = &D_80294220;
|
||||||
@ -35,29 +36,29 @@ ApiStatus func_802A9000_4233F0(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_RunningAway);
|
id = hud_element_create(&HudScript_RunningAway);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_RunAwayOK);
|
id = hud_element_create(&HudScript_RunAwayOK);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -96,14 +97,137 @@ ApiStatus func_802A91B0_4235A0(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/break_free", func_802A92DC_4236CC);
|
|
||||||
|
void func_802A92DC_4236CC(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[3];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 31, actionCommandStatus->hudElementY - 1);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 31, actionCommandStatus->hudElementY + 17);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_5C == 0) {
|
||||||
|
actionCommandStatus->unk_46++;
|
||||||
|
if (actionCommandStatus->unk_46 >= actionCommandStatus->unk_5A) {
|
||||||
|
actionCommandStatus->unk_46 = actionCommandStatus->unk_5A;
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->unk_46--;
|
||||||
|
if (actionCommandStatus->unk_46 <= 0) {
|
||||||
|
actionCommandStatus->unk_46 = 0;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_6A == 0) {
|
||||||
|
s32 inputBufPos = battleStatus->inputBufferPos;
|
||||||
|
s32 temp_a2 = actionCommandStatus->unk_52 - actionCommandStatus->unk_54;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
|
||||||
|
inputBufPos -= temp_a2;
|
||||||
|
if (inputBufPos < 0) {
|
||||||
|
inputBufPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < temp_a2; i++, inputBufPos++) {
|
||||||
|
if (inputBufPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
|
inputBufPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
if (battleStatus->pushInputBuffer[inputBufPos] & BUTTON_A) {
|
||||||
|
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50]) / 4;
|
||||||
|
actionCommandStatus->barFillLevel += rand_int(battleStatus->unk_434[actionCommandStatus->unk_50] / 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess >= actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals] - actionCommandStatus->unk_46) {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
battleStatus->actionSuccess = 1;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = -2;
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 20;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void func_802A96B8_423AA8(void) {
|
void func_802A96B8_423AA8(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
s32* hudElements = actionCommandStatus->hudElements;
|
s32* hudElements = actionCommandStatus->hudElements;
|
||||||
s32 hudX;
|
s32 hudX;
|
||||||
s32 hudY;
|
s32 hudY;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
s16 mashMeterCutoff;
|
s16 mashMeterCutoff;
|
||||||
s32 thirtyOne;
|
s32 thirtyOne;
|
||||||
|
|
||||||
@ -121,9 +245,9 @@ void func_802A96B8_423AA8(void) {
|
|||||||
hud_element_draw_clipped(hudElements[0]);
|
hud_element_draw_clipped(hudElements[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
hudElement = hudElements[1];
|
id = hudElements[1];
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
hud_element_get_render_pos(hudElement, &hudX, &hudY);
|
hud_element_get_render_pos(id, &hudX, &hudY);
|
||||||
|
|
||||||
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
func_80268770(hudX, hudY, actionCommandStatus->barFillLevel / 100);
|
||||||
hud_element_draw_clipped(hudElements[2]);
|
hud_element_draw_clipped(hudElements[2]);
|
||||||
|
@ -6,12 +6,15 @@
|
|||||||
extern s32 D_802942A0;
|
extern s32 D_802942A0;
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_AButton;
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_MashAButton;
|
||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
|
|
||||||
|
s32 D_802A9800_426970[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
|
||||||
|
|
||||||
ApiStatus func_802A9000_426170(void) {
|
ApiStatus func_802A9000_426170(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 100;
|
battleStatus->unk_82 = 100;
|
||||||
battleStatus->unk_434 = &D_802942A0;
|
battleStatus->unk_434 = &D_802942A0;
|
||||||
@ -34,30 +37,166 @@ ApiStatus func_802A9000_426170(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_100pct);
|
id = hud_element_create(&HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "common/MashActionCommandInit.inc.c"
|
#include "common/MashActionCommandInit.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/dizzy_shell", func_802A928C_4263FC);
|
void func_802A928C_4263FC(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
s32 cutoff;
|
||||||
|
s32 fillLevel;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
if (actionCommandStatus->unk_64 != 0) {
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel -= D_802A9800_426970[actionCommandStatus->barFillLevel / cutoff / 20];
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel -= 10;
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->currentButtonsPressed & A_BUTTON) {
|
||||||
|
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
|
s32 b = actionCommandStatus->unk_64 * 850;
|
||||||
|
s32 temp_v1_2 = (a * b) / 10000;
|
||||||
|
|
||||||
|
if (temp_v1_2 != 0) {
|
||||||
|
actionCommandStatus->barFillLevel += temp_v1_2;
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel += 100;
|
||||||
|
if (actionCommandStatus->barFillLevel >= 500) {
|
||||||
|
actionCommandStatus->barFillLevel = 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel >= 10000) {
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fillLevel = actionCommandStatus->barFillLevel;
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
fillLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fillLevel == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = fillLevel / 100;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
|
||||||
|
if (battleStatus->actionSuccess >= cutoff) {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 100) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
sfx_stop_sound(0x80000041);
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
actionCommandStatus->barFillLevel -= 100;
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "common/UnkActionCommandFunc1.inc.c"
|
#include "common/UnkActionCommandFunc1.inc.c"
|
||||||
|
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "hud_element.h"
|
#include "hud_element.h"
|
||||||
|
#include "battle/battle.h"
|
||||||
|
|
||||||
#define NAMESPACE action_command_fire_shell
|
#define NAMESPACE action_command_fire_shell
|
||||||
|
|
||||||
extern s32 D_802942C0;
|
extern s32 D_802942C0;
|
||||||
|
extern HudScript HudScript_StickMashLeft;
|
||||||
extern HudScript HudScript_StickNeutral;
|
extern HudScript HudScript_StickNeutral;
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
|
|
||||||
|
s32 D_802A9950_427320[5] = { 0, 25, 50, 75, 75 };
|
||||||
|
s32 D_802A9964_427334[4] = { 40, 70, 99, 200 };
|
||||||
|
s32 D_802A9974_427344[5] = { 35, 60, 80, 99, 200 };
|
||||||
|
s32 D_802A9988_427358[6] = { 35, 35, 60, 80, 99, 200 };
|
||||||
|
|
||||||
ApiStatus func_802A9000_4269D0(void) {
|
ApiStatus func_802A9000_4269D0(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 100;
|
battleStatus->unk_82 = 100;
|
||||||
battleStatus->unk_434 = &D_802942C0;
|
battleStatus->unk_434 = &D_802942C0;
|
||||||
@ -35,31 +42,178 @@ ApiStatus func_802A9000_4269D0(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_StickNeutral);
|
id = hud_element_create(&HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_100pct);
|
id = hud_element_create(&HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#include "common/MashActionCommandInit.inc.c"
|
#include "common/MashActionCommandInit.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/fire_shell", func_802A9294_426C64);
|
void func_802A9294_426C64(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Actor* partner = battleStatus->partnerActor;
|
||||||
|
s32 id;
|
||||||
|
s32 cutoff;
|
||||||
|
s32 fillLevel;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_StickMashLeft);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
battleStatus->unk_85 = 0;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
|
actionCommandStatus->barFillLevel -= D_802A9950_427320[actionCommandStatus->barFillLevel / cutoff / 20];
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && (actionCommandStatus->unk_5C != 0)) {
|
||||||
|
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50] * 950) / 100;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
|
||||||
|
actionCommandStatus->barFillLevel -= (battleStatus->unk_434[actionCommandStatus->unk_50] * 950) / 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel > 10000) {
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
||||||
|
switch (partner->actorBlueprint->level) {
|
||||||
|
case 0:
|
||||||
|
if (battleStatus->unk_84 >= D_802A9964_427334[battleStatus->unk_85]) {
|
||||||
|
battleStatus->unk_85++;
|
||||||
|
}
|
||||||
|
if (battleStatus->unk_85 > 0 && (battleStatus->unk_84 < D_802A9964_427334[battleStatus->unk_85 - 1])) {
|
||||||
|
battleStatus->unk_85--;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
if (battleStatus->unk_84 >= D_802A9974_427344[battleStatus->unk_85]) {
|
||||||
|
battleStatus->unk_85++;
|
||||||
|
}
|
||||||
|
if (battleStatus->unk_85 > 0 && (battleStatus->unk_84 < D_802A9974_427344[battleStatus->unk_85 - 1])) {
|
||||||
|
battleStatus->unk_85--;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
if (battleStatus->unk_84 >= D_802A9988_427358[battleStatus->unk_85]) {
|
||||||
|
battleStatus->unk_85++;
|
||||||
|
}
|
||||||
|
if (battleStatus->unk_85 > 0 && (battleStatus->unk_84 < D_802A9988_427358[battleStatus->unk_85 - 1])) {
|
||||||
|
battleStatus->unk_85--;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
|
||||||
|
if (cutoff >= battleStatus->actionSuccess) {
|
||||||
|
battleStatus->unk_86 = -2;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 100) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
sfx_stop_sound(0x80000041);
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "common/UnkActionCommandFunc1.inc.c"
|
#include "common/UnkActionCommandFunc1.inc.c"
|
||||||
|
|
||||||
|
@ -6,18 +6,23 @@
|
|||||||
// icon indexes for hud elements
|
// icon indexes for hud elements
|
||||||
extern HudScript HudScript_TimingBar1Chance;
|
extern HudScript HudScript_TimingBar1Chance;
|
||||||
extern HudScript HudScript_TimingWait;
|
extern HudScript HudScript_TimingWait;
|
||||||
|
extern HudScript HudScript_TimingCharge1;
|
||||||
|
extern HudScript HudScript_TimingCharge2;
|
||||||
|
extern HudScript HudScript_TimingCharge3;
|
||||||
extern HudScript HudScript_TimingCharge4a;
|
extern HudScript HudScript_TimingCharge4a;
|
||||||
extern HudScript HudScript_TimingCharge4b;
|
extern HudScript HudScript_TimingCharge4b;
|
||||||
extern HudScript HudScript_TimingCharge4c;
|
extern HudScript HudScript_TimingCharge4c;
|
||||||
extern HudScript HudScript_StickHoldLeft;
|
extern HudScript HudScript_StickHoldLeft;
|
||||||
|
extern HudScript HudScript_StickTapNeutral;
|
||||||
extern HudScript HudScript_RightOn;
|
extern HudScript HudScript_RightOn;
|
||||||
|
extern HudScript HudScript_TimingReady;
|
||||||
|
|
||||||
extern s32 D_802941E0;
|
extern s32 D_802941E0;
|
||||||
|
|
||||||
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 1;
|
battleStatus->unk_82 = 1;
|
||||||
battleStatus->unk_434 = &D_802941E0;
|
battleStatus->unk_434 = &D_802941E0;
|
||||||
@ -36,48 +41,48 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->hudElementY = 96;
|
actionCommandStatus->hudElementY = 96;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_TimingBar1Chance);
|
id = hud_element_create(&HudScript_TimingBar1Chance);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 10);
|
hud_element_set_render_depth(id, 10);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_TimingWait);
|
id = hud_element_create(&HudScript_TimingWait);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_TimingCharge4a);
|
id = hud_element_create(&HudScript_TimingCharge4a);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_TimingCharge4b);
|
id = hud_element_create(&HudScript_TimingCharge4b);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_TimingCharge4c);
|
id = hud_element_create(&HudScript_TimingCharge4c);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_StickHoldLeft);
|
id = hud_element_create(&HudScript_StickHoldLeft);
|
||||||
actionCommandStatus->hudElements[5] = hudElement;
|
actionCommandStatus->hudElements[5] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_RightOn);
|
id = hud_element_create(&HudScript_RightOn);
|
||||||
actionCommandStatus->hudElements[6] = hudElement;
|
actionCommandStatus->hudElements[6] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(id, 0xFF);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -115,7 +120,215 @@ ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/hammer", func_802A936C_42236C);
|
void func_802A936C_42236C(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Actor* partner = battleStatus->partnerActor;
|
||||||
|
s32 id;
|
||||||
|
f32 temp_f20;
|
||||||
|
s32 phi_s0;
|
||||||
|
s32 new_var;
|
||||||
|
s32 a;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[3];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[4];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[5];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX + 21, actionCommandStatus->hudElementY - 3);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 5, actionCommandStatus->hudElementY + 1);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX - 7, actionCommandStatus->hudElementY + 1);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX - 19, actionCommandStatus->hudElementY + 1);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[5], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY - 23);
|
||||||
|
if (actionCommandStatus->autoSucceed != 0) {
|
||||||
|
id = actionCommandStatus->hudElements[6];
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E < 15) {
|
||||||
|
hud_element_set_alpha(actionCommandStatus->hudElements[0], 255);
|
||||||
|
hud_element_set_alpha(actionCommandStatus->hudElements[1], 255);
|
||||||
|
hud_element_set_alpha(actionCommandStatus->hudElements[2], 255);
|
||||||
|
hud_element_set_alpha(actionCommandStatus->hudElements[3], 255);
|
||||||
|
hud_element_set_alpha(actionCommandStatus->hudElements[4], 255);
|
||||||
|
hud_element_set_alpha(actionCommandStatus->hudElements[5], 255);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->unk_54 = 0;
|
||||||
|
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && battleStatus->unk_83 < 2) {
|
||||||
|
actionCommandStatus->unk_5F = 1;
|
||||||
|
}
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
if (battleStatus->unk_83 < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
phi_s0 = battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
|
new_var = phi_s0 + 2;
|
||||||
|
temp_f20 = (actionCommandStatus->unk_52 - new_var) / 3;
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 < temp_f20) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[4], &HudScript_TimingCharge3);
|
||||||
|
battleStatus->unk_84 = 0;
|
||||||
|
if (actionCommandStatus->unk_54 == 0 && actionCommandStatus->unk_62 != 0) {
|
||||||
|
sfx_play_sound(SOUND_233);
|
||||||
|
}
|
||||||
|
} else if (actionCommandStatus->unk_54 < temp_f20 * 2) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[3], &HudScript_TimingCharge2);
|
||||||
|
battleStatus->unk_84 = 1;
|
||||||
|
if (actionCommandStatus->unk_54 == temp_f20) {
|
||||||
|
if (actionCommandStatus->unk_62 != 0) {
|
||||||
|
sfx_play_sound(SOUND_233);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (actionCommandStatus->unk_54 < temp_f20 * 3.0f) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[2], &HudScript_TimingCharge1);
|
||||||
|
battleStatus->unk_84 = 2;
|
||||||
|
if (actionCommandStatus->unk_54 == temp_f20 * 2) {
|
||||||
|
if (actionCommandStatus->unk_62 != 0) {
|
||||||
|
sfx_play_sound(SOUND_233);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 == (~phi_s0 + actionCommandStatus->unk_52)) {
|
||||||
|
battleStatus->unk_84 = 3;
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[1], &HudScript_TimingReady);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[5], &HudScript_StickTapNeutral);
|
||||||
|
if (actionCommandStatus->unk_62 != 0) {
|
||||||
|
sfx_play_sound(SOUND_234);
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->autoSucceed != 0 && actionCommandStatus->autoSucceed != 2) {
|
||||||
|
actionCommandStatus->autoSucceed = 2;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52 - 4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a = actionCommandStatus->unk_52 - actionCommandStatus->unk_54;
|
||||||
|
phi_s0 = battleStatus->unk_434[actionCommandStatus->unk_50] - a + 3;
|
||||||
|
if (phi_s0 < 0) {
|
||||||
|
phi_s0 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) &&
|
||||||
|
phi_s0 == 0 &&
|
||||||
|
actionCommandStatus->autoSucceed == 0 &&
|
||||||
|
battleStatus->unk_83 < 2)
|
||||||
|
{
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
battleStatus->unk_86 = -1;
|
||||||
|
func_80268C9C();
|
||||||
|
} else {
|
||||||
|
s32 i;
|
||||||
|
s32 bufferPos;
|
||||||
|
|
||||||
|
bufferPos = battleStatus->inputBufferPos;
|
||||||
|
bufferPos -= phi_s0;
|
||||||
|
if (bufferPos < 0) {
|
||||||
|
bufferPos += ARRAY_COUNT(battleStatus->holdInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 0) {
|
||||||
|
for (i = 0; i < phi_s0; i++, bufferPos++) {
|
||||||
|
if (bufferPos >= ARRAY_COUNT(battleStatus->holdInputBuffer)) {
|
||||||
|
bufferPos -= ARRAY_COUNT(battleStatus->holdInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(battleStatus->holdInputBuffer[bufferPos] & BUTTON_STICK_LEFT) ||
|
||||||
|
actionCommandStatus->autoSucceed != 0)
|
||||||
|
{
|
||||||
|
battleStatus->actionSuccess = 1;
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
gBattleStatus.flags1 |= BS_FLAGS1_2000;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->unk_83 < 2 || actionCommandStatus->unk_54 != actionCommandStatus->unk_52) {
|
||||||
|
actionCommandStatus->unk_54++;
|
||||||
|
if (actionCommandStatus->unk_52 < actionCommandStatus->unk_54) {
|
||||||
|
if (battleStatus->actionSuccess == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 1) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void N(draw_hud_elements)(void) {
|
void N(draw_hud_elements)(void) {
|
||||||
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
|
hud_element_draw_clipped(gActionCommandStatus.hudElements[0]);
|
||||||
|
@ -6,13 +6,17 @@
|
|||||||
extern s32 D_80294420;
|
extern s32 D_80294420;
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_AButton;
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_MashAButton;
|
||||||
extern HudScript HudScript_BButton;
|
extern HudScript HudScript_BButton;
|
||||||
|
extern HudScript HudScript_MashBButton1;
|
||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
|
|
||||||
|
s32 D_802A98E0_42FFC0[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
|
||||||
|
|
||||||
ApiStatus func_802A9000_42F6E0(void) {
|
ApiStatus func_802A9000_42F6E0(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 5;
|
battleStatus->unk_82 = 5;
|
||||||
battleStatus->unk_434 = &D_80294420;
|
battleStatus->unk_434 = &D_80294420;
|
||||||
@ -33,29 +37,29 @@ ApiStatus func_802A9000_42F6E0(void) {
|
|||||||
actionCommandStatus->unk_68 = 0;
|
actionCommandStatus->unk_68 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BButton);
|
id = hud_element_create(&HudScript_BButton);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_100pct);
|
id = hud_element_create(&HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -63,7 +67,7 @@ ApiStatus func_802A9000_42F6E0(void) {
|
|||||||
ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (battleStatus->unk_83 == 0) {
|
if (battleStatus->unk_83 == 0) {
|
||||||
battleStatus->actionSuccess = 0;
|
battleStatus->actionSuccess = 0;
|
||||||
@ -91,20 +95,237 @@ ApiStatus func_802A91A0_42F880(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/hurricane", func_802A92A0_42F980);
|
// Almost identical to func_802A92A0_42DCB0 (mega_shock)
|
||||||
|
void func_802A92A0_42F980(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
|
||||||
|
s32 buttonsPushed;
|
||||||
|
s32 frameCount;
|
||||||
|
s32 buttonsAB;
|
||||||
|
s32 bufferPos;
|
||||||
|
s32 hudElement;
|
||||||
|
s32 mashMeterIndex;
|
||||||
|
s32 mashMeterCutoff;
|
||||||
|
s8 adjustedFillLevel;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
hudElement = actionCommandStatus->hudElements[0];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(hudElement, 255);
|
||||||
|
|
||||||
|
hudElement = actionCommandStatus->hudElements[2];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(hudElement, 255);
|
||||||
|
|
||||||
|
hudElement = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(hudElement, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_6C != 0) {
|
||||||
|
actionCommandStatus->unk_6C--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX - 17,
|
||||||
|
actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 23,
|
||||||
|
actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
||||||
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[2], &HudScript_MashBButton1);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
// fallthrough
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
s16 newFillLevel;
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_64 != 0) {
|
||||||
|
s8 mashMeterIntervals = actionCommandStatus->mashMeterIntervals;
|
||||||
|
s16* mashMeterCutoffs = actionCommandStatus->mashMeterCutoffs;
|
||||||
|
s32 index;
|
||||||
|
|
||||||
|
mashMeterCutoff = mashMeterCutoffs[mashMeterIntervals];
|
||||||
|
index = actionCommandStatus->barFillLevel / mashMeterCutoff / 20;
|
||||||
|
newFillLevel = actionCommandStatus->barFillLevel - D_802A98E0_42FFC0[index];
|
||||||
|
} else {
|
||||||
|
newFillLevel = actionCommandStatus->barFillLevel - 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel = newFillLevel;
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bufferPos = battleStatus->inputBufferPos;
|
||||||
|
bufferPos -= 2;
|
||||||
|
if (bufferPos < 0) {
|
||||||
|
bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonsPushed = 0;
|
||||||
|
frameCount = 1;
|
||||||
|
|
||||||
|
while(frameCount >= 0) {
|
||||||
|
if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
|
bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonsPushed |= battleStatus->pushInputBuffer[bufferPos++];
|
||||||
|
frameCount--;
|
||||||
|
}
|
||||||
|
|
||||||
|
buttonsAB = BUTTON_A | BUTTON_B;
|
||||||
|
if ((buttonsPushed & buttonsAB) == buttonsAB) {
|
||||||
|
if (actionCommandStatus->unk_64 != 0) {
|
||||||
|
s32 fillLevel;
|
||||||
|
|
||||||
|
fillLevel = actionCommandStatus->unk_64 * 650;
|
||||||
|
fillLevel = fillLevel / 100 * battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
|
|
||||||
|
// Perplexing reuse of buttonsPushed here, but it fixes register allocation. Likely another
|
||||||
|
// subexpression from above can be put into a variable and reused instead.
|
||||||
|
//
|
||||||
|
// TODO: Find a way to avoid reusing buttonsPushed.
|
||||||
|
buttonsPushed = fillLevel / 100;
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel += buttonsPushed;
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel += 100;
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel >= 500) {
|
||||||
|
actionCommandStatus->barFillLevel = 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bufferPos = battleStatus->inputBufferPos;
|
||||||
|
bufferPos -= 2;
|
||||||
|
if (bufferPos < 0) {
|
||||||
|
bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
frameCount = 1;
|
||||||
|
while (frameCount >= 0) {
|
||||||
|
if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
|
bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->pushInputBuffer[bufferPos++] = 0;
|
||||||
|
frameCount--;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel > 10000) {
|
||||||
|
hudElement = actionCommandStatus->hudElements[4];
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 50,
|
||||||
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
adjustedFillLevel = actionCommandStatus->barFillLevel / 100;
|
||||||
|
|
||||||
|
battleStatus->unk_84 = adjustedFillLevel;
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 == 0) {
|
||||||
|
s16 threshold;
|
||||||
|
|
||||||
|
// Again, reusing buttonsPushed specifically for reg-alloc. See above.
|
||||||
|
//
|
||||||
|
// TODO: Find a way to avoid reusing buttonsPushed.
|
||||||
|
buttonsPushed = actionCommandStatus->barFillLevel;
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
buttonsPushed = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (buttonsPushed == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = buttonsPushed / 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
mashMeterIndex = actionCommandStatus->mashMeterIntervals - 1;
|
||||||
|
mashMeterCutoff = actionCommandStatus->mashMeterCutoffs[mashMeterIndex];
|
||||||
|
threshold = mashMeterCutoff / 2;
|
||||||
|
|
||||||
|
if (battleStatus->unk_84 <= threshold) {
|
||||||
|
battleStatus->unk_86 = -4;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 100) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->unk_54 -= 1;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
actionCommandStatus->barFillLevel -= 100;
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54 -= 1;
|
||||||
|
} else {
|
||||||
|
func_80268C9C();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void func_802A97AC_42FE8C(void) {
|
void func_802A97AC_42FE8C(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
s32 hudY;
|
s32 hudY;
|
||||||
s32 hudX;
|
s32 hudX;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[2]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
id = actionCommandStatus->hudElements[1];
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
hud_element_get_render_pos(hudElement, &hudX, &hudY);
|
hud_element_get_render_pos(id, &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);
|
||||||
|
@ -9,22 +9,10 @@ extern HudScript HudScript_BButton;
|
|||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
extern s32 D_802943C0;
|
extern s32 D_802943C0;
|
||||||
|
|
||||||
extern HudScript HudScript_MashAButton;
|
extern HudScript HudScript_MashAButton[];
|
||||||
extern HudScript HudScript_MashBButton1;
|
extern HudScript HudScript_MashBButton1[];
|
||||||
|
|
||||||
typedef struct structD_802A9930_42E340 {
|
s32 D_802A9930_42E340[] = { 0, 25, 50, 75, 75, 0, 0, 0 };
|
||||||
/* 0x00 */ s16 unk_0;
|
|
||||||
/* 0x08 */ u16 unk_8;
|
|
||||||
} structD_802A9930_42E340;
|
|
||||||
|
|
||||||
structD_802A9930_42E340 D_802A9930_42E340[] = {
|
|
||||||
{ 0, 0, },
|
|
||||||
{ 0, 0x19 },
|
|
||||||
{ 0, 0x32 },
|
|
||||||
{ 0, 0x4B },
|
|
||||||
{ 0, 0x4B },
|
|
||||||
{ 0, 0 },
|
|
||||||
};
|
|
||||||
|
|
||||||
ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A9000_42DA10(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
@ -175,8 +163,8 @@ void func_802A92A0_42DCB0(void) {
|
|||||||
actionCommandStatus->unk_4E--;
|
actionCommandStatus->unk_4E--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
hud_element_set_script(actionCommandStatus->hudElements[0], HudScript_MashAButton);
|
||||||
hud_element_set_script(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;
|
||||||
@ -194,7 +182,7 @@ void func_802A92A0_42DCB0(void) {
|
|||||||
|
|
||||||
mashMeterCutoff = mashMeterCutoffs[mashMeterIntervals];
|
mashMeterCutoff = mashMeterCutoffs[mashMeterIntervals];
|
||||||
index = actionCommandStatus->barFillLevel / mashMeterCutoff / 20;
|
index = actionCommandStatus->barFillLevel / mashMeterCutoff / 20;
|
||||||
newFillLevel = actionCommandStatus->barFillLevel - D_802A9930_42E340[index].unk_8;
|
newFillLevel = actionCommandStatus->barFillLevel - D_802A9930_42E340[index];
|
||||||
} else {
|
} else {
|
||||||
newFillLevel = actionCommandStatus->barFillLevel - 10;
|
newFillLevel = actionCommandStatus->barFillLevel - 10;
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ extern HudScript HudScript_MashAButton;
|
|||||||
extern HudScript HudScript_RunAwayOK;
|
extern HudScript HudScript_RunAwayOK;
|
||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
extern s32 D_802943A0[];
|
extern s32 D_802943A0[];
|
||||||
extern s16 D_802A9AA2_42D9B2[];
|
s32 D_802A9AA0_42D9B0[] = { 0, 25, 50, 75, 75, 0, 0, 0};
|
||||||
extern s32 D_802A9B00;
|
extern s32 D_802A9B00;
|
||||||
|
|
||||||
void func_80268834(s32, s32, s32, s32);
|
void func_80268834(s32, s32, s32, s32);
|
||||||
@ -17,10 +17,10 @@ void func_80268834(s32, s32, s32, s32);
|
|||||||
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
s32 temp_v1;
|
s32 temp_v1;
|
||||||
|
|
||||||
battleStatus->unk_82 = 0x64;
|
battleStatus->unk_82 = 100;
|
||||||
battleStatus->unk_434 = D_802943A0;
|
battleStatus->unk_434 = D_802943A0;
|
||||||
|
|
||||||
if (battleStatus->unk_83 == 0) {
|
if (battleStatus->unk_83 == 0) {
|
||||||
@ -42,29 +42,29 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
D_802A9B00 = 0;
|
D_802A9B00 = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_100pct);
|
id = hud_element_create(&HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_RunAwayOK);
|
id = hud_element_create(&HudScript_RunAwayOK);
|
||||||
actionCommandStatus->hudElements[4] = hudElement;
|
actionCommandStatus->hudElements[4] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, 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;
|
||||||
@ -104,29 +104,28 @@ ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall) {
|
|||||||
void func_802A9310_42D220(void) {
|
void func_802A9310_42D220(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
s32 temp_lo;
|
|
||||||
s32 temp_v0_2;
|
s32 temp_v0_2;
|
||||||
s16 phi_v0;
|
|
||||||
s32 phi_a1;
|
s32 phi_a1;
|
||||||
|
s32 cutoff;
|
||||||
|
|
||||||
switch (actionCommandStatus->state) {
|
switch (actionCommandStatus->state) {
|
||||||
case 0:
|
case 0:
|
||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
id = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
hud_element_set_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(id, 255);
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
id = actionCommandStatus->hudElements[1];
|
||||||
hud_element_set_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(id, 255);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[4];
|
id = actionCommandStatus->hudElements[4];
|
||||||
hud_element_set_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(id, 255);
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
break;
|
break;
|
||||||
@ -148,8 +147,9 @@ void func_802A9310_42D220(void) {
|
|||||||
actionCommandStatus->hudElementX,
|
actionCommandStatus->hudElementX,
|
||||||
actionCommandStatus->hudElementY + 28);
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
|
||||||
temp_v0_2 = (((100 - actionCommandStatus->unk_46) * 60) / 100);
|
cutoff = 100 - actionCommandStatus->unk_46;
|
||||||
temp_v0_2 = 29 - temp_v0_2;
|
cutoff = (cutoff * 60) / 100;
|
||||||
|
temp_v0_2 = 29 - cutoff;
|
||||||
hud_element_set_render_pos(
|
hud_element_set_render_pos(
|
||||||
actionCommandStatus->hudElements[4],
|
actionCommandStatus->hudElements[4],
|
||||||
actionCommandStatus->hudElementX - temp_v0_2,
|
actionCommandStatus->hudElementX - temp_v0_2,
|
||||||
@ -167,7 +167,7 @@ void func_802A9310_42D220(void) {
|
|||||||
actionCommandStatus->unk_5C = 0;
|
actionCommandStatus->unk_5C = 0;
|
||||||
D_802A9B00 = 1;
|
D_802A9B00 = 1;
|
||||||
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
sfx_play_sound_with_params(0x80000041, 0U, 0U, 0U);
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
actionCommandStatus->state = 11;
|
actionCommandStatus->state = 11;
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case 11:
|
case 11:
|
||||||
@ -175,47 +175,50 @@ void func_802A9310_42D220(void) {
|
|||||||
|
|
||||||
if (actionCommandStatus->unk_68 == 0) {
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
if (actionCommandStatus->unk_64 != 0) {
|
if (actionCommandStatus->unk_64 != 0) {
|
||||||
temp_lo = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
temp_lo = actionCommandStatus->unk_44 / temp_lo;
|
actionCommandStatus->barFillLevel -= D_802A9AA0_42D9B0[actionCommandStatus->barFillLevel / cutoff / 20];
|
||||||
phi_v0 = actionCommandStatus->unk_44 - D_802A9AA2_42D9B2[temp_lo / 20 * 2];
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
phi_v0 = actionCommandStatus->unk_44 - 10;
|
actionCommandStatus->barFillLevel -= 10;
|
||||||
}
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
actionCommandStatus->unk_44 = phi_v0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
if (actionCommandStatus->unk_44 < 0) {
|
|
||||||
actionCommandStatus->unk_44 = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((battleStatus->currentButtonsPressed & 0x8000) != 0) {
|
|
||||||
if (actionCommandStatus->unk_64 != 0) {
|
|
||||||
// unk_434 = array of scaling values based on attack difficulty (unk_50).
|
|
||||||
actionCommandStatus->unk_44 +=
|
|
||||||
battleStatus->unk_434[actionCommandStatus->unk_50] * 850 / 100 * actionCommandStatus->unk_64 / 100;
|
|
||||||
} else {
|
|
||||||
actionCommandStatus->unk_44 += 100;
|
|
||||||
if (actionCommandStatus->unk_44 >= 500) {
|
|
||||||
actionCommandStatus->unk_44 = 500;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (actionCommandStatus->unk_44 > 10000) {
|
if (battleStatus->currentButtonsPressed & BUTTON_A) {
|
||||||
hudElement = actionCommandStatus->hudElements[3];
|
phi_a1 = actionCommandStatus->unk_64;
|
||||||
actionCommandStatus->unk_44 = 10000;
|
// unk_434 = array of scaling values based on attack difficulty (unk_50).
|
||||||
actionCommandStatus->unk_68 = 1;
|
if (phi_a1 != 0) {
|
||||||
hud_element_set_render_pos(
|
s32 a;
|
||||||
hudElement,
|
a = battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
actionCommandStatus->hudElementX + 50,
|
actionCommandStatus->barFillLevel += a * 850 / 100 * phi_a1 / 100;
|
||||||
actionCommandStatus->hudElementY + 28);
|
} else {
|
||||||
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
actionCommandStatus->barFillLevel += 100;
|
||||||
|
if (actionCommandStatus->barFillLevel >= 500) {
|
||||||
|
actionCommandStatus->barFillLevel = 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
battleStatus->unk_84 = actionCommandStatus->unk_44 / 100;
|
if (actionCommandStatus->barFillLevel > 10000) {
|
||||||
|
id = actionCommandStatus->hudElements[3];
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
hud_element_set_render_pos(
|
||||||
|
id,
|
||||||
|
actionCommandStatus->hudElementX + 50,
|
||||||
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
||||||
|
|
||||||
if (actionCommandStatus->unk_54 == 0) {
|
if (actionCommandStatus->unk_54 == 0) {
|
||||||
phi_a1 = actionCommandStatus->unk_44;
|
phi_a1 = actionCommandStatus->barFillLevel;
|
||||||
if (actionCommandStatus->unk_64 == 0) {
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
phi_a1 = 0;
|
phi_a1 = 0;
|
||||||
}
|
}
|
||||||
@ -229,7 +232,8 @@ void func_802A9310_42D220(void) {
|
|||||||
battleStatus->actionSuccess = 0;
|
battleStatus->actionSuccess = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1] / 2) < battleStatus->unk_84) {
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
|
||||||
|
if (cutoff / 2 < battleStatus->unk_84) {
|
||||||
battleStatus->unk_86 = 1;
|
battleStatus->unk_86 = 1;
|
||||||
} else {
|
} else {
|
||||||
battleStatus->unk_86 = -4;
|
battleStatus->unk_86 = -4;
|
||||||
@ -249,9 +253,9 @@ void func_802A9310_42D220(void) {
|
|||||||
break;
|
break;
|
||||||
case 12:
|
case 12:
|
||||||
if (actionCommandStatus->unk_64 == 0) {
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
actionCommandStatus->unk_44 -= 100;
|
actionCommandStatus->barFillLevel -= 100;
|
||||||
if (actionCommandStatus->unk_44 < 0) {
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (actionCommandStatus->unk_54 != 0) {
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
@ -291,7 +295,7 @@ void N(draw_hud_elements)(void) {
|
|||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
s32 y;
|
s32 y;
|
||||||
s32 x;
|
s32 x;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
s32 temp_a1;
|
s32 temp_a1;
|
||||||
s32 temp_v0;
|
s32 temp_v0;
|
||||||
|
|
||||||
@ -301,11 +305,11 @@ void N(draw_hud_elements)(void) {
|
|||||||
hud_element_set_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);
|
||||||
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
id = actionCommandStatus->hudElements[1];
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
hud_element_get_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
// Redundant call, but needed to match.
|
// Redundant call, but needed to match.
|
||||||
hud_element_get_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(id, &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);
|
||||||
@ -314,8 +318,8 @@ void N(draw_hud_elements)(void) {
|
|||||||
} else {
|
} else {
|
||||||
func_80268834(x, y, actionCommandStatus->barFillLevel / 100, 4);
|
func_80268834(x, y, actionCommandStatus->barFillLevel / 100, 4);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[3];
|
id = actionCommandStatus->hudElements[3];
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void N(free_hud_elements)(void) {
|
void N(free_hud_elements)(void) {
|
||||||
|
@ -156,13 +156,11 @@ void func_802A9298_42E638(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (actionCommandStatus->unk_68 == 0) {
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
|
||||||
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
|
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
|
||||||
actionCommandStatus->unk_5C = TRUE;
|
actionCommandStatus->unk_5C = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) {
|
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) {
|
||||||
s16 phi_v1;
|
|
||||||
if (actionCommandStatus->unk_64 == 0) {
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 13;
|
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] * 13;
|
||||||
} else {
|
} else {
|
||||||
|
@ -6,12 +6,16 @@
|
|||||||
extern s32 D_80294400;
|
extern s32 D_80294400;
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_StickNeutral;
|
extern HudScript HudScript_StickNeutral;
|
||||||
|
extern HudScript HudScript_StickMashLeft;
|
||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
|
|
||||||
|
s32 D_802A9860_42F680[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
|
||||||
|
extern s32 D_802A98C0; // bss?
|
||||||
|
|
||||||
ApiStatus func_802A9000_42EE20(void) {
|
ApiStatus func_802A9000_42EE20(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 0x10;
|
battleStatus->unk_82 = 0x10;
|
||||||
battleStatus->unk_434 = &D_80294400;
|
battleStatus->unk_434 = &D_80294400;
|
||||||
@ -35,23 +39,23 @@ ApiStatus func_802A9000_42EE20(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_StickNeutral);
|
id = hud_element_create(&HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_100pct);
|
id = hud_element_create(&HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -59,7 +63,7 @@ ApiStatus func_802A9000_42EE20(void) {
|
|||||||
ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (battleStatus->unk_83 == 0) {
|
if (battleStatus->unk_83 == 0) {
|
||||||
battleStatus->actionSuccess = 0;
|
battleStatus->actionSuccess = 0;
|
||||||
@ -85,7 +89,152 @@ ApiStatus func_802A916C_42EF8C(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/spiny_surge", func_802A9254_42F074);
|
void func_802A9254_42F074(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
s32 cutoff;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61) {
|
||||||
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61) {
|
||||||
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_6C != 0) {
|
||||||
|
actionCommandStatus->unk_6C--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
|
||||||
|
actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
||||||
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_StickMashLeft);
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
D_802A98C0 = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
|
||||||
|
// fallthrough
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
|
actionCommandStatus->barFillLevel -=
|
||||||
|
D_802A9860_42F680[actionCommandStatus->barFillLevel / cutoff / 20];
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
if (battleStatus->currentButtonsPressed & BUTTON_STICK_LEFT) {
|
||||||
|
actionCommandStatus->barFillLevel += (battleStatus->unk_434[actionCommandStatus->unk_50] * 1250) / 100;
|
||||||
|
}
|
||||||
|
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
|
||||||
|
actionCommandStatus->barFillLevel -= (battleStatus->unk_434[actionCommandStatus->unk_50] * 1250) / 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel > 10000) {
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (D_802A98C0 & BUTTON_STICK_LEFT) {
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
}
|
||||||
|
if (D_802A98C0 & BUTTON_STICK_RIGHT) {
|
||||||
|
actionCommandStatus->unk_5C = -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(D_802A98C0 & BUTTON_STICK_LEFT) &&
|
||||||
|
!(battleStatus->currentButtonsDown & BUTTON_STICK_RIGHT) &&
|
||||||
|
actionCommandStatus->unk_5C == 1)
|
||||||
|
{
|
||||||
|
actionCommandStatus->unk_5C = 2;
|
||||||
|
}
|
||||||
|
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
|
||||||
|
D_802A98C0 = battleStatus->currentButtonsDown;
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->unk_5C;
|
||||||
|
|
||||||
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->actionSuccess * 12);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = actionCommandStatus->barFillLevel / 100;
|
||||||
|
}
|
||||||
|
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
|
||||||
|
if (cutoff >= battleStatus->actionSuccess) {
|
||||||
|
battleStatus->unk_86 = -2;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 100) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
sfx_stop_sound(0x80000041);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
} else {
|
||||||
|
func_80268C9C();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "common/UnkActionCommandFunc1.inc.c"
|
#include "common/UnkActionCommandFunc1.inc.c"
|
||||||
|
|
||||||
|
@ -5,13 +5,16 @@
|
|||||||
|
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_StickNeutral;
|
extern HudScript HudScript_StickNeutral;
|
||||||
|
extern HudScript HudScript_StickMashLeft;
|
||||||
extern HudScript HudScript_100pct;
|
extern HudScript HudScript_100pct;
|
||||||
extern s32 D_80294440;
|
extern s32 D_80294440;
|
||||||
|
|
||||||
|
s32 D_802A9920_430940[8] = { 0, 25, 50, 75, 75, 0, 0, 0 };
|
||||||
|
|
||||||
ApiStatus func_802A9000_430020(void) {
|
ApiStatus func_802A9000_430020(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 100;
|
battleStatus->unk_82 = 100;
|
||||||
battleStatus->unk_434 = &D_80294440;
|
battleStatus->unk_434 = &D_80294440;
|
||||||
@ -34,30 +37,196 @@ ApiStatus func_802A9000_430020(void) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_StickNeutral);
|
id = hud_element_create(&HudScript_StickNeutral);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_100pct);
|
id = hud_element_create(&HudScript_100pct);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "common/MashActionCommandInit.inc.c"
|
#include "common/MashActionCommandInit.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/spook", func_802A9298_4302B8);
|
void func_802A9298_4302B8(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
s32 cutoff;
|
||||||
|
s32 fillLevel;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_StickMashLeft);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
battleStatus->unk_84 = 0;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
if (actionCommandStatus->unk_64 != 0) {
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel -= D_802A9920_430940[actionCommandStatus->barFillLevel / cutoff / 20];
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel -= 10;
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_68 == 0) {
|
||||||
|
if (actionCommandStatus->unk_64 != 0) {
|
||||||
|
|
||||||
|
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
|
||||||
|
actionCommandStatus->unk_5C = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) {
|
||||||
|
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
|
s32 b = actionCommandStatus->unk_64 * 850;
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel += (a * b) / 10000;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
|
||||||
|
s32 a = battleStatus->unk_434[actionCommandStatus->unk_50];
|
||||||
|
s32 b = actionCommandStatus->unk_64 * 850;
|
||||||
|
|
||||||
|
actionCommandStatus->barFillLevel -= (a * b) / 10000;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) {
|
||||||
|
actionCommandStatus->unk_5C = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!(battleStatus->currentButtonsDown & BUTTON_STICK_LEFT) && actionCommandStatus->unk_5C) {
|
||||||
|
actionCommandStatus->barFillLevel += 100;
|
||||||
|
if (actionCommandStatus->barFillLevel >= 500) {
|
||||||
|
actionCommandStatus->barFillLevel = 500;
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->currentButtonsPressed & BUTTON_STICK_RIGHT) {
|
||||||
|
actionCommandStatus->barFillLevel -= 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->barFillLevel > 10000) {
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_68 = 1;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 50, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
fillLevel = actionCommandStatus->barFillLevel;
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
fillLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fillLevel == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = fillLevel / 100;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
|
||||||
|
if (battleStatus->actionSuccess > cutoff) {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = -2;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 100) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
sfx_stop_sound(0x80000041);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
actionCommandStatus->barFillLevel -= 100;
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "common/UnkActionCommandFunc1.inc.c"
|
#include "common/UnkActionCommandFunc1.inc.c"
|
||||||
|
|
||||||
|
@ -5,12 +5,17 @@
|
|||||||
|
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
extern HudScript HudScript_AButton;
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_AButtonDown;
|
||||||
|
extern HudScript HudScript_PressAButton;
|
||||||
extern s32 D_80294380;
|
extern s32 D_80294380;
|
||||||
|
|
||||||
|
s32 D_802A9760_42A480[] = { 300, 300, 265, 220, 175, 175, };
|
||||||
|
s32 D_802A9778_42A498[] = { 300, 300, 265, 220, 175, 175, };
|
||||||
|
|
||||||
ApiStatus func_802A9000_429D20(void) {
|
ApiStatus func_802A9000_429D20(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 5;
|
battleStatus->unk_82 = 5;
|
||||||
battleStatus->unk_434 = &D_80294380;
|
battleStatus->unk_434 = &D_80294380;
|
||||||
@ -30,17 +35,17 @@ ApiStatus func_802A9000_429D20(void) {
|
|||||||
actionCommandStatus->unk_5C = 0;
|
actionCommandStatus->unk_5C = 0;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -71,17 +76,143 @@ ApiStatus func_802A911C_429E3C(Evt* script) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/squirt", func_802A9208_429F28);
|
void func_802A9208_429F28(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
s32 mashMeterCutoff;
|
||||||
|
s32 cutoff;
|
||||||
|
s32 temp;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
if (actionCommandStatus->unk_61) {
|
||||||
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61) {
|
||||||
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX,
|
||||||
|
actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX,
|
||||||
|
actionCommandStatus->hudElementY + 28);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButtonDown);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
sfx_play_sound_with_params(0x80000041, 0, 0, 0);
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
// fallthrough
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
|
temp = actionCommandStatus->barFillLevel / cutoff;
|
||||||
|
if (actionCommandStatus->unk_5C == 0) {
|
||||||
|
if (!(battleStatus->currentButtonsDown & BUTTON_A)) {
|
||||||
|
actionCommandStatus->barFillLevel -= D_802A9760_42A480[temp / 20];
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel += D_802A9778_42A498[temp / 20] * battleStatus->unk_434[actionCommandStatus->unk_50] / 100;
|
||||||
|
if (actionCommandStatus->barFillLevel > 10000) {
|
||||||
|
actionCommandStatus->barFillLevel = 10000;
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel -= 250;
|
||||||
|
if (actionCommandStatus->barFillLevel <= 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 100;
|
||||||
|
sfx_adjust_env_sound_params(0x80000041, 0, 0, battleStatus->unk_84 * 12);
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
if (temp < 80) {
|
||||||
|
if (hud_element_get_script(id) != &HudScript_AButtonDown) {
|
||||||
|
hud_element_set_script(id, &HudScript_AButtonDown);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (hud_element_get_script(id) != &HudScript_PressAButton) {
|
||||||
|
hud_element_set_script(id, &HudScript_PressAButton);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = battleStatus->unk_84;
|
||||||
|
}
|
||||||
|
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals - 1];
|
||||||
|
if (cutoff / 2 < battleStatus->unk_84) {
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_86 = -4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (battleStatus->actionSuccess == 100) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
sfx_stop_sound(0x80000041);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
} else {
|
||||||
|
func_80268C9C();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void func_802A9634_42A354(void) {
|
void func_802A9634_42A354(void) {
|
||||||
s32 x, y;
|
s32 x, y;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
|
||||||
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
id = actionCommandStatus->hudElements[1];
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
hud_element_get_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(id, &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 {
|
||||||
|
@ -4,16 +4,22 @@
|
|||||||
#define NAMESPACE action_command_tidal_wave
|
#define NAMESPACE action_command_tidal_wave
|
||||||
|
|
||||||
extern HudScript HudScript_BlueMeter;
|
extern HudScript HudScript_BlueMeter;
|
||||||
|
extern HudScript HudScript_PressAButton;
|
||||||
|
extern HudScript HudScript_PressBButton;
|
||||||
|
extern HudScript HudScript_BButtonHeld;
|
||||||
|
extern HudScript HudScript_8029265C;
|
||||||
|
extern HudScript HudScript_PressCDownButton;
|
||||||
extern HudScript HudScript_AButton;
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_AButtonDown;
|
||||||
extern s32 D_802944A0;
|
extern s32 D_802944A0;
|
||||||
|
|
||||||
extern HudScript* D_802A97C0_42CEB0[];
|
HudScript* D_802A97C0_42CEB0[3] = { &HudScript_PressAButton, &HudScript_PressBButton, &HudScript_PressCDownButton };
|
||||||
extern HudScript* D_802A97CC_42CEBC[];
|
HudScript* D_802A97CC_42CEBC[3] = { &HudScript_AButtonDown, &HudScript_BButtonHeld, &HudScript_8029265C };
|
||||||
|
|
||||||
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
battleStatus->unk_82 = 5;
|
battleStatus->unk_82 = 5;
|
||||||
@ -33,18 +39,18 @@ ApiStatus N(CreateHudElements)(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, 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 = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[i] = hudElement;
|
actionCommandStatus->hudElements[i] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -81,7 +87,7 @@ ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall) {
|
|||||||
void N(update)(void) {
|
void N(update)(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
s8 oldButton;
|
s8 oldButton;
|
||||||
s8 newButton;
|
s8 newButton;
|
||||||
s32 numLookbackFrames;
|
s32 numLookbackFrames;
|
||||||
@ -93,11 +99,11 @@ void N(update)(void) {
|
|||||||
switch (actionCommandStatus->state) {
|
switch (actionCommandStatus->state) {
|
||||||
case 0:
|
case 0:
|
||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
hudElement = actionCommandStatus->hudElements[0];
|
id = actionCommandStatus->hudElements[0];
|
||||||
if (actionCommandStatus->unk_61 != 0) {
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
}
|
}
|
||||||
hud_element_set_alpha(hudElement, 0xFF);
|
hud_element_set_alpha(id, 255);
|
||||||
actionCommandStatus->state = 1;
|
actionCommandStatus->state = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -121,7 +127,7 @@ void N(update)(void) {
|
|||||||
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
actionCommandStatus->unk_5C = rand_int(2);
|
actionCommandStatus->unk_5C = rand_int(2);
|
||||||
actionCommandStatus->state = 11;
|
actionCommandStatus->state = 11;
|
||||||
actionCommandStatus->unk_72 = 0U;
|
actionCommandStatus->unk_72 = 0;
|
||||||
// fallthrough
|
// fallthrough
|
||||||
case 11:
|
case 11:
|
||||||
btl_set_popup_duration(99);
|
btl_set_popup_duration(99);
|
||||||
@ -133,14 +139,14 @@ void N(update)(void) {
|
|||||||
actionCommandStatus->unk_5C = newButton;
|
actionCommandStatus->unk_5C = newButton;
|
||||||
} while (oldButton == newButton);
|
} while (oldButton == newButton);
|
||||||
|
|
||||||
hudElement = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
id = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
||||||
hud_element_set_script(
|
hud_element_set_script(
|
||||||
hudElement, D_802A97C0_42CEB0[newButton]);
|
id, D_802A97C0_42CEB0[newButton]);
|
||||||
hud_element_set_render_pos(
|
hud_element_set_render_pos(
|
||||||
hudElement,
|
id,
|
||||||
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
|
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20) + 16,
|
||||||
actionCommandStatus->hudElementY);
|
actionCommandStatus->hudElementY);
|
||||||
hud_element_clear_flags(hudElement, HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_clear_flags(id, 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;
|
||||||
@ -173,7 +179,7 @@ void N(update)(void) {
|
|||||||
// Determine starting point in input buffer.
|
// Determine starting point in input buffer.
|
||||||
bufferPos = battleStatus->inputBufferPos - numLookbackFrames;
|
bufferPos = battleStatus->inputBufferPos - numLookbackFrames;
|
||||||
if (bufferPos < 0) {
|
if (bufferPos < 0) {
|
||||||
bufferPos += 0x40;
|
bufferPos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If determined that 0 frames should be searched, search a minimum of 1.
|
// If determined that 0 frames should be searched, search a minimum of 1.
|
||||||
@ -183,8 +189,8 @@ void N(update)(void) {
|
|||||||
|
|
||||||
// Check buffer for past N frames' worth of button presses.
|
// Check buffer for past N frames' worth of button presses.
|
||||||
for (i = 0; i < numLookbackFrames; i++) {
|
for (i = 0; i < numLookbackFrames; i++) {
|
||||||
if (bufferPos >= 0x40) {
|
if (bufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
bufferPos -= 0x40;
|
bufferPos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If not locked out from previous wrong press...
|
// If not locked out from previous wrong press...
|
||||||
@ -203,7 +209,7 @@ void N(update)(void) {
|
|||||||
} else {
|
} else {
|
||||||
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
|
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
|
||||||
if (buttonsPressed != 0) {
|
if (buttonsPressed != 0) {
|
||||||
if (buttonsPressed & ~0x8000) {
|
if (buttonsPressed & ~BUTTON_A) {
|
||||||
actionCommandStatus->unk_60 = TRUE;
|
actionCommandStatus->unk_60 = TRUE;
|
||||||
} else {
|
} else {
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
@ -217,7 +223,7 @@ void N(update)(void) {
|
|||||||
} else {
|
} else {
|
||||||
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
|
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
|
||||||
if (buttonsPressed != 0) {
|
if (buttonsPressed != 0) {
|
||||||
if (buttonsPressed & ~0x4000) {
|
if (buttonsPressed & ~BUTTON_B) {
|
||||||
actionCommandStatus->unk_60 = TRUE;
|
actionCommandStatus->unk_60 = TRUE;
|
||||||
} else {
|
} else {
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
@ -231,7 +237,7 @@ void N(update)(void) {
|
|||||||
} else {
|
} else {
|
||||||
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
|
buttonsPressed = battleStatus->pushInputBuffer[bufferPos];
|
||||||
if (buttonsPressed != 0) {
|
if (buttonsPressed != 0) {
|
||||||
if (buttonsPressed & ~0x4) {
|
if (buttonsPressed & ~BUTTON_C_DOWN) {
|
||||||
actionCommandStatus->unk_60 = TRUE;
|
actionCommandStatus->unk_60 = TRUE;
|
||||||
} else {
|
} else {
|
||||||
success = TRUE;
|
success = TRUE;
|
||||||
@ -244,17 +250,17 @@ void N(update)(void) {
|
|||||||
if (actionCommandStatus->unk_60) {
|
if (actionCommandStatus->unk_60) {
|
||||||
// Wrong; prevent successful inputs for 10 frames.
|
// Wrong; prevent successful inputs for 10 frames.
|
||||||
actionCommandStatus->unk_72 = 10;
|
actionCommandStatus->unk_72 = 10;
|
||||||
sfx_play_sound(0x21D);
|
sfx_play_sound(SOUND_MENU_ERROR);
|
||||||
actionCommandStatus->unk_70 = 0;
|
actionCommandStatus->unk_70 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
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];
|
id = actionCommandStatus->hudElements[actionCommandStatus->unk_5D];
|
||||||
hud_element_set_script(hudElement, D_802A97CC_42CEBC[actionCommandStatus->unk_5C]);
|
hud_element_set_script(id, D_802A97CC_42CEBC[actionCommandStatus->unk_5C]);
|
||||||
hud_element_set_scale(hudElement, 0.5f);
|
hud_element_set_scale(id, 0.5f);
|
||||||
hud_element_set_render_pos(
|
hud_element_set_render_pos(
|
||||||
hudElement,
|
id,
|
||||||
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20),
|
actionCommandStatus->hudElementX + ((actionCommandStatus->unk_5D - 1) * 20),
|
||||||
actionCommandStatus->hudElementY + 7);
|
actionCommandStatus->hudElementY + 7);
|
||||||
actionCommandStatus->unk_5D++;
|
actionCommandStatus->unk_5D++;
|
||||||
@ -265,7 +271,7 @@ void N(update)(void) {
|
|||||||
}
|
}
|
||||||
actionCommandStatus->state = 11;
|
actionCommandStatus->state = 11;
|
||||||
battleStatus->unk_84++;
|
battleStatus->unk_84++;
|
||||||
sfx_play_sound(0x21C);
|
sfx_play_sound(SOUND_21C);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,228 @@
|
|||||||
|
|
||||||
#define NAMESPACE action_command_water_block
|
#define NAMESPACE action_command_water_block
|
||||||
|
|
||||||
// requires .data migration
|
#include "battle/action_cmd/water_block_1.png.inc.c"
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/water_block", func_802A9000_42A4F0);
|
#include "battle/action_cmd/water_block_1.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_2.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_2.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_3.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_3.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_0.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_0.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_block.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_block.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_circle.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_circle.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_cloud.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_cloud.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/water_block_4.png.inc.c"
|
||||||
|
#include "battle/action_cmd/water_block_4.pal.inc.c"
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlock1 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_1_png, (s32)battle_action_cmd_water_block_1_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlock2 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_2_png, (s32)battle_action_cmd_water_block_2_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlock3 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_3_png, (s32)battle_action_cmd_water_block_3_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlock0 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_0_png, (s32)battle_action_cmd_water_block_0_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlock4 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_4_png, (s32)battle_action_cmd_water_block_4_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlockBlock = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_block_png, (s32)battle_action_cmd_water_block_block_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlockCircle = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_40x40,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_circle_png, (s32)battle_action_cmd_water_block_circle_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WaterBlockCloud = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_40x40,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_water_block_cloud_png, (s32)battle_action_cmd_water_block_cloud_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript* D_802AB180_42C670[] = {
|
||||||
|
&HudScript_WaterBlock0
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript* D_802AB184_42C674[] = {
|
||||||
|
&HudScript_WaterBlock1, &HudScript_WaterBlock2, &HudScript_WaterBlock3, &HudScript_WaterBlock4, &HudScript_WaterBlock4, &HudScript_WaterBlock4, &HudScript_WaterBlock4, &HudScript_WaterBlock4, &HudScript_WaterBlock4, 0, 0
|
||||||
|
};
|
||||||
|
|
||||||
|
extern s32 D_80294460;
|
||||||
|
|
||||||
|
extern HudScript HudScript_AButton;
|
||||||
|
extern HudScript HudScript_AButtonDown;
|
||||||
|
extern HudScript HudScript_TimingBar3Chances;
|
||||||
|
extern HudScript HudScript_TimingCharge2;
|
||||||
|
extern HudScript HudScript_TimingCharge3;
|
||||||
|
extern HudScript HudScript_TimingCharge4b;
|
||||||
|
extern HudScript HudScript_TimingCharge4c;
|
||||||
|
extern HudScript HudScript_TimingOK;
|
||||||
|
extern HudScript HudScript_TimingMiss;
|
||||||
|
extern HudScript HudScript_TimingWait;
|
||||||
|
extern HudScript HudScript_TimingReady;
|
||||||
|
|
||||||
|
ApiStatus func_802A9000_42A4F0(Evt* script, s32 isInitialCall) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
s32 id;
|
||||||
|
|
||||||
|
battleStatus->unk_82 = 5;
|
||||||
|
battleStatus->unk_434 = &D_80294460;
|
||||||
|
|
||||||
|
if (battleStatus->unk_83 == 0) {
|
||||||
|
battleStatus->actionSuccess = 0;
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
|
func_80268858();
|
||||||
|
actionCommandStatus->actionCommandID = ACTION_COMMAND_WATER_BLOCK;
|
||||||
|
actionCommandStatus->state = 0;
|
||||||
|
actionCommandStatus->unk_60 = 0;
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_48 = 0;
|
||||||
|
actionCommandStatus->unk_64 = evt_get_variable(script, *args++);
|
||||||
|
battleStatus->unk_84 = 1;
|
||||||
|
actionCommandStatus->unk_6C = 30;
|
||||||
|
actionCommandStatus->hudElementX = -48;
|
||||||
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_AButton);
|
||||||
|
actionCommandStatus->hudElements[0] = id;
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingBar3Chances);
|
||||||
|
actionCommandStatus->hudElements[1] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingWait);
|
||||||
|
actionCommandStatus->hudElements[2] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingWait);
|
||||||
|
actionCommandStatus->hudElements[3] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingWait);
|
||||||
|
actionCommandStatus->hudElements[4] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingOK);
|
||||||
|
actionCommandStatus->hudElements[6] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingOK);
|
||||||
|
actionCommandStatus->hudElements[7] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingOK);
|
||||||
|
actionCommandStatus->hudElements[8] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_depth(id, 0);
|
||||||
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
|
actionCommandStatus->hudElements[10] = hud_element_create(D_802AB184_42C674[0]);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[10],
|
||||||
|
actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
|
||||||
|
actionCommandStatus->hudElements[11] = hud_element_create(&HudScript_TimingCharge4c);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[11],
|
||||||
|
actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
|
||||||
|
id = hud_element_create(&HudScript_TimingCharge4b);
|
||||||
|
actionCommandStatus->hudElements[12] = id;
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
|
||||||
|
switch (actionCommandStatus->unk_64) {
|
||||||
|
case 0:
|
||||||
|
actionCommandStatus->hudElements[13] = hud_element_create(&HudScript_WaterBlockBlock);
|
||||||
|
id = actionCommandStatus->hudElements[13];
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
actionCommandStatus->hudElements[13] = hud_element_create(&HudScript_WaterBlockCircle);
|
||||||
|
id = actionCommandStatus->hudElements[13];
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
actionCommandStatus->hudElements[13] = hud_element_create(&HudScript_WaterBlockCloud);
|
||||||
|
id = actionCommandStatus->hudElements[13];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
@ -28,14 +248,370 @@ ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
|
|||||||
battleStatus->actionSuccess = 0;
|
battleStatus->actionSuccess = 0;
|
||||||
battleStatus->unk_86 = 0;
|
battleStatus->unk_86 = 0;
|
||||||
actionCommandStatus->state = 10;
|
actionCommandStatus->state = 10;
|
||||||
battleStatus->flags1 &= ~0x8000;
|
battleStatus->flags1 &= ~BS_FLAGS1_8000;
|
||||||
func_80269118();
|
func_80269118();
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/water_block", func_802A948C_42A97C);
|
void func_802A948C_42A97C(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 pos;
|
||||||
|
s32 i;
|
||||||
|
s32 limit;
|
||||||
|
s32 id;
|
||||||
|
|
||||||
extern HudScript* D_802AB180_42C670[];
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[3];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[4];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[10];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[11];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[12];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
id = actionCommandStatus->hudElements[13];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_6C != 0) {
|
||||||
|
actionCommandStatus->unk_6C--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX + 28, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 21, actionCommandStatus->hudElementY + 24);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 41, actionCommandStatus->hudElementY + 24);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[4], actionCommandStatus->hudElementX + 61, actionCommandStatus->hudElementY + 24);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[10];
|
||||||
|
switch (actionCommandStatus->unk_64) {
|
||||||
|
case 0:
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 7);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 13);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 91, actionCommandStatus->hudElementY + 13);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[11], actionCommandStatus->hudElementX - 5, actionCommandStatus->hudElementY + 29);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[12], actionCommandStatus->hudElementX + 7, actionCommandStatus->hudElementY + 29);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[13], actionCommandStatus->hudElementX + 92, actionCommandStatus->hudElementY + 23);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52 - 60;
|
||||||
|
if (actionCommandStatus->unk_54 < 42) {
|
||||||
|
actionCommandStatus->unk_54 = 42;
|
||||||
|
}
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
// fallthrough
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_54 == 42) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[11], &HudScript_TimingCharge3);
|
||||||
|
sfx_play_sound(SOUND_233);
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_54 == 22) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[12], &HudScript_TimingCharge2);
|
||||||
|
sfx_play_sound(SOUND_233);
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_54 == 2) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[2], &HudScript_TimingReady);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButtonDown);
|
||||||
|
sfx_play_sound(SOUND_234);
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
if (actionCommandStatus->unk_54 == 0) {
|
||||||
|
actionCommandStatus->unk_54 = 20;
|
||||||
|
actionCommandStatus->unk_5D = 0;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_60 = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if ((actionCommandStatus->unk_60 == 0) && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
|
||||||
|
limit = battleStatus->unk_434[actionCommandStatus->unk_50 * 2] +
|
||||||
|
battleStatus->unk_434[actionCommandStatus->unk_50 * 2 + 1] +
|
||||||
|
5;
|
||||||
|
pos = battleStatus->inputBufferPos;
|
||||||
|
pos -= limit;
|
||||||
|
if (pos < 0) {
|
||||||
|
pos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
if (limit == 0) {
|
||||||
|
limit = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < limit; pos++, i++) {
|
||||||
|
if (pos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
|
pos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < 5 && (battleStatus->pushInputBuffer[pos] & BUTTON_A)) {
|
||||||
|
actionCommandStatus->unk_60 = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !(actionCommandStatus->unk_60 != 0)) ||
|
||||||
|
(actionCommandStatus->autoSucceed != 0)) {
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
battleStatus->unk_84++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((actionCommandStatus->unk_5D >= -4) && ((actionCommandStatus->unk_60 != 0) || (actionCommandStatus->unk_5C != 0))) {
|
||||||
|
id = actionCommandStatus->hudElements[6];
|
||||||
|
if (actionCommandStatus->unk_5C != 0) {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingOK);
|
||||||
|
} else {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingMiss);
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 28, actionCommandStatus->hudElementY + 38);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_5D == -5) {
|
||||||
|
id = actionCommandStatus->hudElements[6];
|
||||||
|
if (actionCommandStatus->unk_5C != 0) {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingOK);
|
||||||
|
} else {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingMiss);
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 28, actionCommandStatus->hudElementY + 38);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButton);
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_5D--;
|
||||||
|
if (actionCommandStatus->unk_54 == 2) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[3], &HudScript_TimingReady);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButtonDown);
|
||||||
|
sfx_play_sound(SOUND_234);
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
if (actionCommandStatus->unk_54 == 0) {
|
||||||
|
actionCommandStatus->unk_54 = 20;
|
||||||
|
actionCommandStatus->unk_5D = 0;
|
||||||
|
actionCommandStatus->state = 13;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_60 = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 13:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if ((actionCommandStatus->unk_60 == 0) && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
|
||||||
|
limit = battleStatus->unk_434[actionCommandStatus->unk_50 * 2] +
|
||||||
|
battleStatus->unk_434[actionCommandStatus->unk_50 * 2 + 1] +
|
||||||
|
4;
|
||||||
|
if (limit < 6) {
|
||||||
|
limit = 6;
|
||||||
|
}
|
||||||
|
pos = battleStatus->inputBufferPos;
|
||||||
|
pos -= limit;
|
||||||
|
if (pos < 0) {
|
||||||
|
pos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
if (limit == 0) {
|
||||||
|
limit = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < limit; pos++, i++) {
|
||||||
|
if (pos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
|
pos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < 5) {
|
||||||
|
if (battleStatus->pushInputBuffer[pos] & BUTTON_A) {
|
||||||
|
actionCommandStatus->unk_60 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !(actionCommandStatus->unk_60 != 0)) ||
|
||||||
|
(actionCommandStatus->autoSucceed != 0)) {
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
battleStatus->unk_84++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ((actionCommandStatus->unk_5D >= -4) && ((actionCommandStatus->unk_60 != 0) || (actionCommandStatus->unk_5C != 0))) {
|
||||||
|
id = actionCommandStatus->hudElements[7];
|
||||||
|
if (actionCommandStatus->unk_5C != 0) {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingOK);
|
||||||
|
} else {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingMiss);
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 48, actionCommandStatus->hudElementY + 38);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_5D == -5) {
|
||||||
|
id = actionCommandStatus->hudElements[7];
|
||||||
|
if (actionCommandStatus->unk_5C != 0) {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingOK);
|
||||||
|
} else {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingMiss);
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 48, actionCommandStatus->hudElementY + 38);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButton);
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_5D--;
|
||||||
|
if (actionCommandStatus->unk_54 == 2) {
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[4], &HudScript_TimingReady);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButtonDown);
|
||||||
|
sfx_play_sound(SOUND_234);
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
if (actionCommandStatus->unk_54 == 0) {
|
||||||
|
actionCommandStatus->unk_54 = 20;
|
||||||
|
actionCommandStatus->unk_5D = 0;
|
||||||
|
actionCommandStatus->state = 14;
|
||||||
|
actionCommandStatus->unk_5C = 0;
|
||||||
|
actionCommandStatus->unk_60 = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 14:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if ((actionCommandStatus->unk_60 == 0) && (actionCommandStatus->unk_5C == 0) && (actionCommandStatus->unk_5D >= -5)) {
|
||||||
|
limit = battleStatus->unk_434[actionCommandStatus->unk_50 * 2] +
|
||||||
|
battleStatus->unk_434[actionCommandStatus->unk_50 * 2 + 1] +
|
||||||
|
3;
|
||||||
|
if (limit < 6) {
|
||||||
|
limit = 6;
|
||||||
|
}
|
||||||
|
pos = battleStatus->inputBufferPos;
|
||||||
|
pos -= limit;
|
||||||
|
if (pos < 0) {
|
||||||
|
pos += ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
if (limit == 0) {
|
||||||
|
limit = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < limit; pos++, i++) {
|
||||||
|
if (pos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
|
||||||
|
pos -= ARRAY_COUNT(battleStatus->pushInputBuffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < 5) {
|
||||||
|
if (battleStatus->pushInputBuffer[pos] & BUTTON_A) {
|
||||||
|
actionCommandStatus->unk_60 = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (((battleStatus->pushInputBuffer[pos] & BUTTON_A) && !(actionCommandStatus->unk_60 != 0)) ||
|
||||||
|
(actionCommandStatus->autoSucceed != 0)) {
|
||||||
|
actionCommandStatus->unk_5C = 1;
|
||||||
|
battleStatus->unk_84++;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_5D >= -4) {
|
||||||
|
if ((actionCommandStatus->unk_60 != 0) || (actionCommandStatus->unk_5C != 0)) {
|
||||||
|
id = actionCommandStatus->hudElements[8];
|
||||||
|
if (actionCommandStatus->unk_5C != 0) {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingOK);
|
||||||
|
} else {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingMiss);
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 68, actionCommandStatus->hudElementY + 38);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_5D == -5) {
|
||||||
|
id = actionCommandStatus->hudElements[8];
|
||||||
|
if (actionCommandStatus->unk_5C != 0) {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingOK);
|
||||||
|
} else {
|
||||||
|
hud_element_set_script(id, &HudScript_TimingMiss);
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 68, actionCommandStatus->hudElementY + 38);
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_AButton);
|
||||||
|
actionCommandStatus->state = 16;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
actionCommandStatus->unk_5D--;
|
||||||
|
break;
|
||||||
|
case 16:
|
||||||
|
if (battleStatus->unk_84 == 0) {
|
||||||
|
battleStatus->actionSuccess = -1;
|
||||||
|
} else {
|
||||||
|
battleStatus->actionSuccess = battleStatus->unk_84;
|
||||||
|
}
|
||||||
|
battleStatus->unk_86 = 1;
|
||||||
|
if (battleStatus->actionSuccess == 3) {
|
||||||
|
func_80269160();
|
||||||
|
}
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 17;
|
||||||
|
break;
|
||||||
|
case 17:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void func_802AA014_42B504(void) {
|
void func_802AA014_42B504(void) {
|
||||||
s32 hudElement;
|
s32 hudElement;
|
||||||
|
@ -1,16 +1,136 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "hud_element.h"
|
#include "hud_element.h"
|
||||||
|
#include "battle/action_cmd/whirlwind_bubble.png.h"
|
||||||
|
|
||||||
#define NAMESPACE action_command_whirlwind
|
#define NAMESPACE action_command_whirlwind
|
||||||
|
|
||||||
// requires .data migration
|
extern HudScript HudScript_BlueMeter;
|
||||||
#ifdef NON_MATCHING
|
extern HudScript HudScript_MashAButton;
|
||||||
|
extern HudScript HudScript_AButton;
|
||||||
|
|
||||||
|
extern s32 D_80294240;
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_1.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_1.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_2.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_2.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_3.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_3.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_4.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_4.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_5.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_5.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_6.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_6.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_7.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_7.pal.inc.c"
|
||||||
|
|
||||||
|
#include "battle/action_cmd/whirlwind_bubble.png.inc.c"
|
||||||
|
#include "battle/action_cmd/whirlwind_bubble.pal.inc.c"
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind1 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_whirlwind_1_png, (s32)battle_action_cmd_whirlwind_1_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind2 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_whirlwind_2_png, (s32)battle_action_cmd_whirlwind_2_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind3 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI,
|
||||||
|
60, (s32)battle_action_cmd_whirlwind_3_png, (s32)battle_action_cmd_whirlwind_3_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind4 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI,
|
||||||
|
60, (s32)battle_action_cmd_whirlwind_4_png, (s32)battle_action_cmd_whirlwind_4_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind5 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI,
|
||||||
|
60, (s32)battle_action_cmd_whirlwind_5_png, (s32)battle_action_cmd_whirlwind_5_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind6 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI,
|
||||||
|
60, (s32)battle_action_cmd_whirlwind_6_png, (s32)battle_action_cmd_whirlwind_6_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_Whirlwind7 = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_24x24,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI,
|
||||||
|
60, (s32)battle_action_cmd_whirlwind_7_png, (s32)battle_action_cmd_whirlwind_7_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript HudScript_WhirlwindBubble = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetCustomSize, battle_action_cmd_whirlwind_bubble_png_width, battle_action_cmd_whirlwind_bubble_png_height,
|
||||||
|
0x00000004,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32)battle_action_cmd_whirlwind_bubble_png, (s32)battle_action_cmd_whirlwind_bubble_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
s32 D_802AA844_4254B4[] = { 0, 25, 50, 75, 100, 100 };
|
||||||
|
|
||||||
|
s32 D_802AA85C_4254CC[] = { 50, 50, 50, 50, 75, 75, 75, 100, 100, 100, 100 };
|
||||||
|
|
||||||
|
HudScript* D_802AA888_4254F8[] = {
|
||||||
|
&HudScript_Whirlwind7, &HudScript_Whirlwind6, &HudScript_Whirlwind5, &HudScript_Whirlwind4, &HudScript_Whirlwind3, &HudScript_Whirlwind2
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript* D_802AA8A0_425510[] = {
|
||||||
|
&HudScript_Whirlwind1, &HudScript_Whirlwind1, &HudScript_Whirlwind2, &HudScript_Whirlwind3, &HudScript_Whirlwind3
|
||||||
|
};
|
||||||
|
|
||||||
|
s32 D_802AA8B4_425524[] = { 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 1 };
|
||||||
|
|
||||||
ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s16 temp_v0;
|
s16 temp_v0;
|
||||||
HudElement* hudElement;
|
s32 id;
|
||||||
|
|
||||||
battleStatus->unk_82 = 5;
|
battleStatus->unk_82 = 5;
|
||||||
battleStatus->unk_434 = &D_80294240;
|
battleStatus->unk_434 = &D_80294240;
|
||||||
@ -20,12 +140,12 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
temp_v0 = evt_get_variable(script, *args);
|
temp_v0 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_64 = temp_v0;
|
actionCommandStatus->unk_64 = temp_v0;
|
||||||
actionCommandStatus->actionCommandID = ACTION_COMMAND_WHIRLWIND;
|
actionCommandStatus->actionCommandID = ACTION_COMMAND_WHIRLWIND;
|
||||||
actionCommandStatus->state = 0;
|
actionCommandStatus->state = 0;
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->barFillLevel = 0;
|
||||||
actionCommandStatus->unk_48 = 0;
|
actionCommandStatus->unk_48 = 0;
|
||||||
if (temp_v0 == 0) {
|
if (temp_v0 == 0) {
|
||||||
battleStatus->unk_84 = 0;
|
battleStatus->unk_84 = 0;
|
||||||
@ -35,70 +155,208 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
|
|||||||
actionCommandStatus->hudElementX = -48;
|
actionCommandStatus->hudElementX = -48;
|
||||||
actionCommandStatus->hudElementY = 80;
|
actionCommandStatus->hudElementY = 80;
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_AButton);
|
id = hud_element_create(&HudScript_AButton);
|
||||||
actionCommandStatus->hudElements[0] = hudElement;
|
actionCommandStatus->hudElements[0] = id;
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
|
|
||||||
hudElement = hud_element_create(&HudScript_BlueMeter);
|
id = hud_element_create(&HudScript_BlueMeter);
|
||||||
actionCommandStatus->hudElements[1] = hudElement;
|
actionCommandStatus->hudElements[1] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&D_802AA7F0_425460);
|
id = hud_element_create(&HudScript_Whirlwind7);
|
||||||
actionCommandStatus->hudElements[2] = hudElement;
|
actionCommandStatus->hudElements[2] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
hudElement = hud_element_create(&D_802AA818_425488);
|
id = hud_element_create(&HudScript_WhirlwindBubble);
|
||||||
actionCommandStatus->hudElements[3] = hudElement;
|
actionCommandStatus->hudElements[3] = id;
|
||||||
hud_element_set_render_pos(hudElement, actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 28);
|
hud_element_set_render_pos(id, actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 28);
|
||||||
hud_element_set_render_depth(hudElement, 0);
|
hud_element_set_render_depth(id, 0);
|
||||||
hud_element_set_flags(hudElement, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80 | HUD_ELEMENT_FLAGS_DISABLED);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/whirlwind", func_802A9000_423C70);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/whirlwind", func_802A91E0_423E50);
|
ApiStatus func_802A91E0_423E50(Evt* script, s32 isInitialCall) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/action_cmd/whirlwind", func_802A92F0_423F60);
|
if (battleStatus->unk_83 == 0) {
|
||||||
|
battleStatus->actionSuccess = 0;
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
// hud element scripts
|
func_80268858();
|
||||||
extern HudScript* D_802AA888_4254F8[];
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
extern HudScript* D_802AA8A0_425510[];
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
|
actionCommandStatus->unk_60 = 0;
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->unk_48 = 0;
|
||||||
|
battleStatus->actionSuccess = 0;
|
||||||
|
battleStatus->unk_86 = 0;
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
battleStatus->unk_84 = 0;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_84 = 3;
|
||||||
|
}
|
||||||
|
actionCommandStatus->state = 10;
|
||||||
|
gBattleStatus.flags1 &= ~BS_FLAGS1_8000;
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
|
void func_802A92F0_423F60(void) {
|
||||||
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 id;
|
||||||
|
s32 cutoff;
|
||||||
|
s32 temp;
|
||||||
|
s32 amt;
|
||||||
|
|
||||||
|
switch (actionCommandStatus->state) {
|
||||||
|
case 0:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[0];
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[1];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[2];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
id = actionCommandStatus->hudElements[3];
|
||||||
|
hud_element_set_alpha(id, 255);
|
||||||
|
if (actionCommandStatus->unk_61 != 0) {
|
||||||
|
hud_element_clear_flags(id, 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
actionCommandStatus->state = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
actionCommandStatus->hudElementX += 20;
|
||||||
|
if (actionCommandStatus->hudElementX > 50) {
|
||||||
|
actionCommandStatus->hudElementX = 50;
|
||||||
|
}
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[0], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[1], actionCommandStatus->hudElementX, actionCommandStatus->hudElementY + 28);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[2], actionCommandStatus->hudElementX + 54, actionCommandStatus->hudElementY + 23);
|
||||||
|
hud_element_set_render_pos(actionCommandStatus->hudElements[3], actionCommandStatus->hudElementX + 60, actionCommandStatus->hudElementY + 23);
|
||||||
|
break;
|
||||||
|
case 10:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
if (actionCommandStatus->unk_4E != 0) {
|
||||||
|
actionCommandStatus->unk_4E--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
hud_element_set_script(actionCommandStatus->hudElements[0], &HudScript_MashAButton);
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
actionCommandStatus->state = 11;
|
||||||
|
actionCommandStatus->unk_54 = actionCommandStatus->unk_52;
|
||||||
|
case 11:
|
||||||
|
btl_set_popup_duration(99);
|
||||||
|
cutoff = actionCommandStatus->mashMeterCutoffs[actionCommandStatus->mashMeterIntervals];
|
||||||
|
temp = actionCommandStatus->barFillLevel / cutoff;
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
amt = D_802AA844_4254B4[temp / 20];
|
||||||
|
} else {
|
||||||
|
amt = D_802AA85C_4254CC[temp / 10];
|
||||||
|
}
|
||||||
|
actionCommandStatus->barFillLevel -= amt;
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel < 0) {
|
||||||
|
actionCommandStatus->barFillLevel = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_6A == 0) {
|
||||||
|
if (battleStatus->currentButtonsPressed & BUTTON_A) {
|
||||||
|
s32 amt;
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
amt = battleStatus->unk_434[actionCommandStatus->unk_50] * 5;
|
||||||
|
} else {
|
||||||
|
amt = battleStatus->unk_434[actionCommandStatus->unk_50] * 6;
|
||||||
|
}
|
||||||
|
actionCommandStatus->barFillLevel += amt;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
actionCommandStatus->barFillLevel += battleStatus->unk_434[actionCommandStatus->unk_50] / 4;
|
||||||
|
actionCommandStatus->barFillLevel += rand_int(battleStatus->unk_434[actionCommandStatus->unk_50] / 4);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->barFillLevel > cutoff * 100) {
|
||||||
|
actionCommandStatus->barFillLevel = cutoff * 100;
|
||||||
|
}
|
||||||
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
|
battleStatus->unk_84 = actionCommandStatus->barFillLevel / 2000;
|
||||||
|
} else {
|
||||||
|
battleStatus->unk_84 = D_802AA8B4_425524[actionCommandStatus->barFillLevel / 1000];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
battleStatus->unk_86 = 127;
|
||||||
|
battleStatus->actionSuccess = battleStatus->unk_84;
|
||||||
|
btl_set_popup_duration(0);
|
||||||
|
actionCommandStatus->unk_54 = 5;
|
||||||
|
actionCommandStatus->state = 12;
|
||||||
|
break;
|
||||||
|
case 12:
|
||||||
|
if (actionCommandStatus->unk_54 != 0) {
|
||||||
|
actionCommandStatus->unk_54--;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
func_80268C9C();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void func_802A9744_4243B4(void) {
|
void func_802A9744_4243B4(void) {
|
||||||
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
ActionCommandStatus* actionCommandStatus = &gActionCommandStatus;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 x, y;
|
s32 x, y;
|
||||||
s32 hudElement;
|
s32 id;
|
||||||
|
|
||||||
if (actionCommandStatus->unk_6A == 0) {
|
if (actionCommandStatus->unk_6A == 0) {
|
||||||
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[0]);
|
||||||
}
|
}
|
||||||
hudElement = actionCommandStatus->hudElements[1];
|
id = actionCommandStatus->hudElements[1];
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
hud_element_get_render_pos(hudElement, &x, &y);
|
hud_element_get_render_pos(id, &x, &y);
|
||||||
|
|
||||||
func_80268798(x, y, (s16) actionCommandStatus->barFillLevel / 100, 1);
|
func_80268798(x, y, actionCommandStatus->barFillLevel / 100, 1);
|
||||||
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
|
hud_element_draw_clipped(actionCommandStatus->hudElements[3]);
|
||||||
hudElement = actionCommandStatus->hudElements[2];
|
id = actionCommandStatus->hudElements[2];
|
||||||
if (actionCommandStatus->unk_64 == 0) {
|
if (actionCommandStatus->unk_64 == 0) {
|
||||||
if (D_802AA888_4254F8[battleStatus->unk_84] != hud_element_get_script(hudElement)) {
|
if (D_802AA888_4254F8[battleStatus->unk_84] != hud_element_get_script(id)) {
|
||||||
hud_element_set_script(hudElement, D_802AA888_4254F8[battleStatus->unk_84]);
|
hud_element_set_script(id, D_802AA888_4254F8[battleStatus->unk_84]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (D_802AA8A0_425510[battleStatus->unk_84] != hud_element_get_script(hudElement)) {
|
if (D_802AA8A0_425510[battleStatus->unk_84] != hud_element_get_script(id)) {
|
||||||
hud_element_set_script(hudElement, D_802AA8A0_425510[battleStatus->unk_84]);
|
hud_element_set_script(id, D_802AA8A0_425510[battleStatus->unk_84]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hud_element_draw_clipped(hudElement);
|
hud_element_draw_clipped(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_802A9898_424508(void) {
|
void func_802A9898_424508(void) {
|
||||||
|
@ -144,17 +144,17 @@ EvtScript N(init_80223DA0) = {
|
|||||||
|
|
||||||
ApiStatus func_80218680_4FF0D0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218680_4FF0D0(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode *args = script->ptrReadPos;
|
Bytecode *args = script->ptrReadPos;
|
||||||
Effect6BInstance* effect = (Effect6BInstance*) evt_get_variable(script, *args++);
|
EffectInstance* effect = (EffectInstance*) evt_get_variable(script, *args++);
|
||||||
|
|
||||||
s32 x = evt_get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
s32 y = evt_get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 z = evt_get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
f32 scale = evt_get_float_variable(script, *args++);
|
f32 scale = evt_get_float_variable(script, *args++);
|
||||||
|
|
||||||
effect->data->pos.x = x;
|
((Effect6BFXData*)effect->data)->pos.x = x;
|
||||||
effect->data->pos.y = y;
|
((Effect6BFXData*)effect->data)->pos.y = y;
|
||||||
effect->data->pos.z = z;
|
((Effect6BFXData*)effect->data)->pos.z = z;
|
||||||
effect->data->scale = scale;
|
((Effect6BFXData*)effect->data)->scale = scale;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "sprite/npc/battle_bowser.h"
|
||||||
|
#include "sprite/npc/parade_peach.h"
|
||||||
|
#include "battle/battle.h"
|
||||||
|
#include "script_api/battle.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
#define NAMESPACE b_area_kpa2
|
#define NAMESPACE b_area_kpa2
|
||||||
|
|
||||||
@ -64,8 +69,10 @@ INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219818_6A0A18);
|
|||||||
#include "common/GetItemEntityPosition.inc.c"
|
#include "common/GetItemEntityPosition.inc.c"
|
||||||
#define NAMESPACE b_area_kpa2
|
#define NAMESPACE b_area_kpa2
|
||||||
|
|
||||||
//#include "common/DisableRandomAbility.inc.c"
|
|
||||||
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219FFC_6A11FC);
|
INCLUDE_ASM(s32, "battle/area_kpa2/69F320", func_80219FFC_6A11FC);
|
||||||
|
// #define NAMESPACE dup_b_area_kpa2
|
||||||
|
// #include "common/DisableRandomAbility.inc.c"
|
||||||
|
// #define NAMESPACE dup_b_area_kpa2
|
||||||
|
|
||||||
#define NAMESPACE dup_b_area_kpa2
|
#define NAMESPACE dup_b_area_kpa2
|
||||||
#include "common/CanPlayerLoseAction.inc.c"
|
#include "common/CanPlayerLoseAction.inc.c"
|
||||||
|
@ -1,19 +1,19 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
#include "sprite.h"
|
||||||
|
|
||||||
#define NAMESPACE b_area_kpa2
|
#define NAMESPACE b_area_kpa2
|
||||||
|
|
||||||
typedef struct KpaStruct {
|
// typedef struct KpaStruct {
|
||||||
/* 0x00 */ s32 unk_00;
|
// /* 0x00 */ s32 unk_00;
|
||||||
/* 0x04 */ s32 unk_04;
|
// /* 0x04 */ s32 unk_04;
|
||||||
/* 0x08 */ s32 unk_08;
|
// /* 0x08 */ s32 unk_08;
|
||||||
/* 0x0C */ s32 unk_0C;
|
// /* 0x0C */ s32 unk_0C;
|
||||||
/* 0x10 */ s32 unk_10;
|
// /* 0x10 */ s32 unk_10;
|
||||||
/* 0x14 */ s32 unk_14;
|
// /* 0x14 */ s32 unk_14;
|
||||||
} KpaStruct; // size = 0x14
|
// } KpaStruct; // size = 0x14
|
||||||
|
|
||||||
extern f32 D_80234828_6BBA28; //f64?
|
// extern KpaStruct D_80234810_6BBA10;
|
||||||
extern KpaStruct D_80234810_6BBA10;
|
|
||||||
|
|
||||||
#include "common/StartRumbleWithParams.inc.c"
|
#include "common/StartRumbleWithParams.inc.c"
|
||||||
|
|
||||||
@ -51,3 +51,23 @@ INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021CF54_6A4154);
|
|||||||
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021CFC0_6A41C0);
|
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021CFC0_6A41C0);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021D290_6A4490);
|
INCLUDE_ASM(s32, "battle/area_kpa2/6A2B50", func_8021D290_6A4490);
|
||||||
|
|
||||||
|
// const char* D_80234880_6BBA80 = "kpa_bt01_hit";
|
||||||
|
// const char* D_80234890_6BBA90 = "kpa_bt01_shape";
|
||||||
|
// const char* D_802348A0_6BBAA0 = "kpa_tex";
|
||||||
|
// const char* D_802348A8_6BBAA8 = "kpa_bg";
|
||||||
|
// const char* D_802348B0_6BBAB0 = "kkj_bt01_hit";
|
||||||
|
// const char* D_802348C0_6BBAC0 = "kkj_bt01_shape";
|
||||||
|
// const char* D_802348D0_6BBAD0 = "kkj_tex";
|
||||||
|
// const char* D_802348D8_6BBAD8 = "kpa_bg";
|
||||||
|
// const char* D_802348E0_6BBAE0 = "kkj_bt02_hit";
|
||||||
|
// const char* D_802348F0_6BBAF0 = "kkj_bt02_shape";
|
||||||
|
// const char* D_80234900_6BBB00 = "kkj_tex";
|
||||||
|
// const char* D_80234908_6BBB08 = "クッパ(ラストバトル3)";
|
||||||
|
// const char* D_80234920_6BBB20 = "クッパ(ラストバトル2)";
|
||||||
|
// const char* D_80234938_6BBB38 = "クッパ(ラストバトル1)";
|
||||||
|
// const char* D_80234950_6BBB50 = "クッパ(オープニング)";
|
||||||
|
// const char* D_80234968_6BBB68 = "クッパ";
|
||||||
|
// const char* D_80234970_6BBB70 = "kpa_03";
|
||||||
|
// const char* D_80234978_6BBB78 = "kpa_02";
|
||||||
|
// const char* D_80234980_6BBB80 = "kpa_01";
|
||||||
|
@ -65,6 +65,8 @@ s32 N(statusTable_80224A40)[] = {
|
|||||||
STATUS_END,
|
STATUS_END,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BSS EffectWhirlwindUnk D_802310D0;
|
||||||
|
|
||||||
ActorPartBlueprint N(partsTable_80224AEC)[] = {
|
ActorPartBlueprint N(partsTable_80224AEC)[] = {
|
||||||
{
|
{
|
||||||
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
.flags = ACTOR_PART_FLAG_MULTI_TARGET,
|
||||||
@ -595,8 +597,6 @@ EvtScript N(randomSummon) = {
|
|||||||
EVT_END
|
EVT_END
|
||||||
};
|
};
|
||||||
|
|
||||||
BSS EffectWhirlwind D_802310D0;
|
|
||||||
|
|
||||||
s32 func_8021878C_512D5C(Evt* script, s32 isInitialCall) {
|
s32 func_8021878C_512D5C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 x, y, z;
|
s32 x, y, z;
|
||||||
|
@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
#include "common/StartRumbleWithParams.inc.c"
|
#include "common/StartRumbleWithParams.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/area_tik2/608AB0", func_80218058_608B08);
|
#include "common/UnkWaterFountainFunc.inc.c"
|
||||||
|
@ -14,7 +14,9 @@ INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218258_608D08);
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218404_608EB4);
|
INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218404_608EB4);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_802184E4_608F94);
|
#define NAMESPACE dup_b_area_tik2
|
||||||
|
#include "common/UnkWaterFountainFunc.inc.c"
|
||||||
|
#define NAMESPACE b_area_tik2
|
||||||
|
|
||||||
#define NAMESPACE dup2_b_area_tik2
|
#define NAMESPACE dup2_b_area_tik2
|
||||||
#include "common/StartRumbleWithParams.inc.c"
|
#include "common/StartRumbleWithParams.inc.c"
|
||||||
@ -30,7 +32,9 @@ INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_802186D8_609188);
|
|||||||
#include "common/UnfadeBackgroundToBlack.inc.c"
|
#include "common/UnfadeBackgroundToBlack.inc.c"
|
||||||
#define NAMESPACE b_area_tik2
|
#define NAMESPACE b_area_tik2
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/area_tik2/608CB0", func_80218884_609334);
|
#define NAMESPACE dup2_b_area_tik2
|
||||||
|
#include "common/UnkWaterFountainFunc.inc.c"
|
||||||
|
#define NAMESPACE b_area_tik2
|
||||||
|
|
||||||
#define NAMESPACE dup3_b_area_tik2
|
#define NAMESPACE dup3_b_area_tik2
|
||||||
#include "common/StartRumbleWithParams.inc.c"
|
#include "common/StartRumbleWithParams.inc.c"
|
||||||
|
@ -26,29 +26,24 @@ ApiStatus N(func_802A1280_72A9D0)(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct N(temp) {
|
|
||||||
char unk_00[0xC];
|
|
||||||
EffectInstanceDataThing* unk_0C;
|
|
||||||
} N(temp);
|
|
||||||
|
|
||||||
ApiStatus N(func_802A12E0_72AA30)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A12E0_72AA30)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 a = evt_get_variable(script, *args++);
|
f32 a = evt_get_variable(script, *args++);
|
||||||
f32 b = evt_get_variable(script, *args++);
|
f32 b = evt_get_variable(script, *args++);
|
||||||
f32 c = evt_get_variable(script, *args++);
|
f32 c = evt_get_variable(script, *args++);
|
||||||
struct N(temp)* effect;
|
EffectInstance* effect;
|
||||||
|
|
||||||
a += rand_int(20) - 10;
|
a += rand_int(20) - 10;
|
||||||
b += rand_int(10) - 5;
|
b += rand_int(10) - 5;
|
||||||
|
|
||||||
effect = (struct N(temp)*)fx_cold_breath(0, a, b, c, 1.0f, 30);
|
effect = fx_cold_breath(0, a, b, c, 1.0f, 30);
|
||||||
|
|
||||||
effect->unk_0C->unk_18 = 0xF4;
|
((ColdBreathFXData*)effect->data)->unk_18 = 244;
|
||||||
effect->unk_0C->unk_1C = 0xF4;
|
((ColdBreathFXData*)effect->data)->unk_1C = 244;
|
||||||
effect->unk_0C->unk_20 = 0xDC;
|
((ColdBreathFXData*)effect->data)->unk_20 = 220;
|
||||||
effect->unk_0C->unk_28 = 0xD2;
|
((ColdBreathFXData*)effect->data)->unk_28 = 210;
|
||||||
effect->unk_0C->unk_2C = 0xD2;
|
((ColdBreathFXData*)effect->data)->unk_2C = 210;
|
||||||
effect->unk_0C->unk_30 = 0xBE;
|
((ColdBreathFXData*)effect->data)->unk_30 = 190;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -61,10 +56,10 @@ static s32 _pad = 0; // XXX
|
|||||||
#include "battle/item/insecticide_herb.pal.inc.c"
|
#include "battle/item/insecticide_herb.pal.inc.c"
|
||||||
|
|
||||||
Vtx N(model)[] = {
|
Vtx N(model)[] = {
|
||||||
{ .v = { -16, -16, 0, FALSE, 0, 0, 0, 0, 0, 255 } },
|
{ .v = { .ob = {-16, -16, 0}, FALSE, .tc = {0, 0}, .cn = {0, 0, 0, 255} } },
|
||||||
{ .v = { 15, -16, 0, FALSE, 1024, 0, 0, 0, 0, 255 } },
|
{ .v = { .ob = {15, -16, 0}, FALSE, .tc = {1024, 0}, .cn = {0, 0, 0, 255} } },
|
||||||
{ .v = { 15, 15, 0, FALSE, 1024, 1024, 0, 0, 0, 255 } },
|
{ .v = { .ob = {15, 15, 0}, FALSE, .tc = {1024, 1024}, .cn = {0, 0, 0, 255} } },
|
||||||
{ .v = { -16, 15, 0, FALSE, 0, 1024, 0, 0, 0, 255 } },
|
{ .v = { .ob = {-16, 15, 0}, FALSE, .tc = {0, 1024}, .cn = {0, 0, 0, 255} } },
|
||||||
};
|
};
|
||||||
|
|
||||||
Gfx N(displayList)[] = {
|
Gfx N(displayList)[] = {
|
||||||
|
@ -2,215 +2,162 @@
|
|||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
#include "ld_addrs.h"
|
#include "ld_addrs.h"
|
||||||
#include "battle/item/mystery.png.h"
|
#include "battle/item/mystery.png.h"
|
||||||
|
#include "pause/pause_common.h"
|
||||||
|
|
||||||
|
BSS s32 D_802A25B8[2];
|
||||||
|
|
||||||
#include "ItemRefund.inc.c"
|
#include "ItemRefund.inc.c"
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
extern s32 D_802A25C8[7];
|
||||||
|
|
||||||
extern s32 D_802A25E4;
|
|
||||||
extern HudElement* D_802A25C8;
|
|
||||||
extern s32 D_802A25EC;
|
|
||||||
|
|
||||||
void N(func_802A123C_72C7EC)(void) {
|
|
||||||
s32 i;
|
|
||||||
HudElement** ptr;
|
|
||||||
s32 var;
|
|
||||||
s32* var2;
|
|
||||||
|
|
||||||
if (D_802A25E4 < 6) {
|
|
||||||
if (D_802A25E4 > 0) {
|
|
||||||
draw_box(0, 7, 0x6A, 0x56, 0, 0x24, 0x24, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x140, 0xF0, 0);
|
|
||||||
|
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
|
||||||
|
|
||||||
ptr = &D_802A25C8;
|
|
||||||
for (i = 0; i < 7; i++) {
|
|
||||||
var2 = *ptr;
|
|
||||||
var = (D_802A25EC / 100) - 0x68;
|
|
||||||
ptr++;
|
|
||||||
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
|
||||||
hud_element_draw_without_clipping(var2);
|
|
||||||
}
|
|
||||||
|
|
||||||
var2 = D_802A25C8;
|
|
||||||
var = (D_802A25EC / 100) - 0x68;
|
|
||||||
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
|
||||||
hud_element_draw_without_clipping(var2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A123C_72C7EC, Evt* script,
|
|
||||||
s32 isInitialCall);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
|
||||||
|
|
||||||
extern s32 D_802A25E4;
|
extern s32 D_802A25E4;
|
||||||
extern s32 D_802A25E8;
|
extern s32 D_802A25E8;
|
||||||
extern s32 D_802A25EC;
|
extern s32 D_802A25EC;
|
||||||
extern s32 D_802A25F0;
|
extern s32 D_802A25F0;
|
||||||
extern s32 D_802A25F4;
|
extern s32 D_802A25F4;
|
||||||
extern s32 D_802A25F8;
|
extern s32 D_802A25F8;
|
||||||
extern s16** D_802A25FC;
|
extern s32* D_802A25FC;
|
||||||
extern HudElement** D_802A25C8;
|
|
||||||
extern struct N(tempStc) gItemHudScripts[100];
|
|
||||||
|
|
||||||
ApiStatus N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) {
|
void N(func_802A123C_72C7EC(void)) {
|
||||||
|
s32 var_s3;
|
||||||
|
s32 id;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
if (D_802A25E4 < 6) {
|
||||||
|
if (D_802A25E4 > 0) {
|
||||||
|
draw_box(0, 7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
|
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
||||||
|
|
||||||
|
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
|
||||||
|
id = D_802A25C8[i];
|
||||||
|
hud_element_set_render_pos(id, 124, (i * 26) + 104 - (D_802A25EC / 100));
|
||||||
|
hud_element_draw_without_clipping(id);
|
||||||
|
}
|
||||||
|
id = D_802A25C8[0];
|
||||||
|
hud_element_set_render_pos(id, 124, (i * 26) + 104 - (D_802A25EC / 100));
|
||||||
|
hud_element_draw_without_clipping(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 N(func_802A13E4_72C994)(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 temp_a0_4;
|
||||||
|
s32 temp_v1_3;
|
||||||
|
s32 var_v0_2;
|
||||||
|
s32 var_v0_3;
|
||||||
|
s32 id;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
D_802A25E4 = 0;
|
D_802A25E4 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (D_802A25E4) {
|
switch (D_802A25E4) {
|
||||||
case 0: {
|
case 0:
|
||||||
s32* tablePtr;
|
D_802A25F8 = create_generic_entity_frontUI(NULL, N(func_802A123C_72C7EC));
|
||||||
s32 i;
|
|
||||||
f32 t0;
|
|
||||||
f32 t1;
|
|
||||||
HudElement* icon;
|
|
||||||
HudElement** iconPtr;
|
|
||||||
struct N(tempStc)* ic;
|
|
||||||
ItemData* itemTable;
|
|
||||||
|
|
||||||
D_802A25F8 = create_generic_entity_frontUI(NULL, func_802A123C_72C7EC);
|
|
||||||
D_802A25EC = rand_int(18200);
|
D_802A25EC = rand_int(18200);
|
||||||
D_802A25F0 = 1000;
|
D_802A25F0 = 1000;
|
||||||
tablePtr = &D_802A25FC;
|
D_802A25FC = N(D_802A227C_72D82C);
|
||||||
*tablePtr = N(D_802A227C_72D82C);
|
|
||||||
|
|
||||||
if (battleStatus->unk_432 > 0) {
|
if (battleStatus->unk_432 > 0) {
|
||||||
get_screen_overlay_params(1, &t0, &t1);
|
u8 type;
|
||||||
if (t1 >= 215.0f) {
|
f32 zoom;
|
||||||
*tablePtr = N(D_802A229C_72D84C);
|
|
||||||
|
get_screen_overlay_params(1, &type, &zoom);
|
||||||
|
if (zoom >= 215.0f) {
|
||||||
|
D_802A25FC = N(D_802A229C_72D84C);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
i = 0;
|
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
|
||||||
ic = &gItemHudScripts;
|
id = hud_element_create(gItemHudScripts[gItemTable[D_802A25FC[i]].hudElemID].enabled);
|
||||||
itemTable = gItemTable;
|
D_802A25C8[i] = id;
|
||||||
iconPtr = &D_802A25C8;
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
for (; i < 7; i++, iconPtr++) {
|
|
||||||
icon = hud_element_create(ic[itemTable[D_802A25FC[i]].iconID].iconId);
|
|
||||||
*iconPtr = icon;
|
|
||||||
hud_element_set_flags(icon, HUD_ELEMENT_FLAGS_80);
|
|
||||||
}
|
}
|
||||||
D_802A25E4 = 1;
|
D_802A25E4 = 1;
|
||||||
}
|
return ApiStatus_BLOCK;
|
||||||
break;
|
case 1:
|
||||||
|
D_802A25EC += D_802A25F0;
|
||||||
case 1: {
|
if (D_802A25EC / 100 >= 182) {
|
||||||
s32* ECptr = &D_802A25EC;
|
D_802A25EC -= 18200;
|
||||||
s32* F0ptr = &D_802A25F0;
|
|
||||||
|
|
||||||
*ECptr += *F0ptr;
|
|
||||||
if (*ECptr / 100 > 181) {
|
|
||||||
s32* test = ECptr;
|
|
||||||
*test -= 0x4718;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*F0ptr > 400) {
|
if (D_802A25F0 > 400) {
|
||||||
*F0ptr -= 10;
|
D_802A25F0 -= 10;
|
||||||
} else if (*F0ptr > 100) {
|
} else if (D_802A25F0 > 100) {
|
||||||
*F0ptr -= 5;
|
D_802A25F0 -= 5;
|
||||||
} else {
|
} else {
|
||||||
*F0ptr -= 1;
|
D_802A25F0 -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_802A25F0 < 10) {
|
if (D_802A25F0 < 10) {
|
||||||
D_802A25E8 = D_802A25EC / 100;
|
D_802A25E8 = D_802A25EC / 100;
|
||||||
if (D_802A25E8 % 26 < 13) {
|
|
||||||
|
if (((D_802A25EC / 100) % 26) < 13) {
|
||||||
if (rand_int(100) < 80) {
|
if (rand_int(100) < 80) {
|
||||||
D_802A25E4 = 2;
|
D_802A25E4 = 2;
|
||||||
} else {
|
} else {
|
||||||
D_802A25E4 = 3;
|
D_802A25E4 = 3;
|
||||||
}
|
}
|
||||||
} else if (rand_int(100) < 60) {
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rand_int(100) < 60) {
|
||||||
D_802A25E4 = 3;
|
D_802A25E4 = 3;
|
||||||
} else {
|
} else {
|
||||||
D_802A25E4 = 2;
|
D_802A25E4 = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case 2:
|
||||||
|
temp_a0_4 = D_802A25E8 % 26;
|
||||||
case 2: {
|
var_v0_2 = temp_a0_4 + 3;
|
||||||
s32* E8ptr = &D_802A25E8;
|
if (var_v0_2 < 0) {
|
||||||
s32 a, b, c, d;
|
var_v0_2 += 3;
|
||||||
|
|
||||||
d = *E8ptr % 26;
|
|
||||||
a = d;
|
|
||||||
c = a + 3;
|
|
||||||
if (c < 0) {
|
|
||||||
c = a + 6;
|
|
||||||
}
|
}
|
||||||
d = c >> 2;
|
temp_a0_4 = var_v0_2 >> 2;
|
||||||
*E8ptr -= d;
|
D_802A25E8 -= temp_a0_4;
|
||||||
D_802A25EC = *E8ptr * 100;
|
D_802A25EC = D_802A25E8 * 100;
|
||||||
if (d == 0) {
|
if (temp_a0_4 == 0) {
|
||||||
D_802A25E4 = 4;
|
D_802A25E4 = 4;
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case 3:
|
||||||
|
temp_v1_3 = D_802A25E8 % 26;
|
||||||
case 3: {
|
if (temp_v1_3 == 0) {
|
||||||
s32* E8ptr = &D_802A25E8;
|
|
||||||
s32 a, b, c, d;
|
|
||||||
|
|
||||||
d = *E8ptr % 26;
|
|
||||||
if (d == 0) {
|
|
||||||
D_802A25E4 = 4;
|
D_802A25E4 = 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
a = d;
|
temp_a0_4 = 26 - temp_v1_3;
|
||||||
b = 26;
|
var_v0_3 = temp_a0_4 + 3;
|
||||||
b -= a;
|
if (var_v0_3 < 0) {
|
||||||
c = b + 3;
|
var_v0_3 += 3;
|
||||||
if (c < 0) {
|
|
||||||
c = b + 6;
|
|
||||||
}
|
}
|
||||||
c = c >> 2;
|
temp_a0_4 = var_v0_3 >> 2;
|
||||||
*E8ptr += c;
|
D_802A25E8 += temp_a0_4;
|
||||||
D_802A25EC = *E8ptr * 100;
|
D_802A25EC = D_802A25E8 * 100;
|
||||||
}
|
break;
|
||||||
break;
|
case 4:
|
||||||
|
|
||||||
case 4: {
|
|
||||||
D_802A25F4 = 20;
|
D_802A25F4 = 20;
|
||||||
D_802A25E4 = 5;
|
D_802A25E4 = 5;
|
||||||
}
|
break;
|
||||||
break;
|
case 5:
|
||||||
|
if (D_802A25F4 != 0) {
|
||||||
case 5: {
|
D_802A25F4--;
|
||||||
s32* F4ptr = &D_802A25F4;
|
|
||||||
s32 i;
|
|
||||||
s16 g;
|
|
||||||
HudElement** iconPtr;
|
|
||||||
|
|
||||||
if (*F4ptr != 0) {
|
|
||||||
*F4ptr -= 1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iconPtr = &D_802A25C8;
|
|
||||||
i = D_802A25E8 / 26;
|
|
||||||
g = D_802A25FC[i];
|
|
||||||
battleStatus->selectedItemID = g;
|
|
||||||
script->varTable[0] = g;
|
|
||||||
free_generic_entity(D_802A25F8);
|
|
||||||
for (i = 0; i < 7; i++) {
|
|
||||||
hud_element_free(*iconPtr++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var_v0_3 = i = D_802A25E8 / 26; // use of i required to match
|
||||||
|
battleStatus->selectedItemID = D_802A25FC[D_802A25E8 / 26];
|
||||||
|
script->varTable[0] = battleStatus->selectedItemID;
|
||||||
|
free_generic_entity(D_802A25F8);
|
||||||
|
for (i = 0; i < ARRAY_COUNT(D_802A25C8); i++) {
|
||||||
|
hud_element_free(D_802A25C8[i]);
|
||||||
|
}
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A13E4_72C994, Evt* script,
|
|
||||||
s32 isInitialCall);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ApiStatus N(func_802A188C_72CE3C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A188C_72CE3C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
@ -260,7 +207,7 @@ Gfx N(displayList)[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
s32 N(modelCommandList)[] = {
|
s32 N(modelCommandList)[] = {
|
||||||
0x00000004, 0x0000000D, 0x00000001, sizeof(N(displayList)) / sizeof(s32), &N(displayList), 0x00000002, 0x00000000,
|
0x00000004, 0x0000000D, 0x00000001, sizeof(N(displayList)) / sizeof(s32), (s32) &N(displayList), 0x00000002, 0x00000000,
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 N(D_802A227C_72D82C)[8] = {
|
s32 N(D_802A227C_72D82C)[8] = {
|
||||||
|
@ -3,51 +3,21 @@
|
|||||||
|
|
||||||
#include "ItemRefund.inc.c"
|
#include "ItemRefund.inc.c"
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
ApiStatus battle_item_shooting_star_func_802A123C_71D9AC(Evt* script, s32 isInitialCall) {
|
||||||
ApiStatus N(func_802A123C_71D9AC)(Evt* script, s32 isInitialCall) {
|
s32 t1 = 200;
|
||||||
s32 c8 = 200;
|
s32 r1 = rand_int(t1) + 100; // 100-299
|
||||||
s32 temp_s1 = 100 + rand_int(c8);
|
s32 r2 = rand_int(40); // 0-39
|
||||||
s32 temp_s0 = rand_int(40);
|
f32 var_f22;
|
||||||
s32 phi_a0;
|
|
||||||
s32 phi_v0;
|
|
||||||
s32 rand;
|
|
||||||
f32 temp_f20;
|
|
||||||
f32 temp_f22;
|
|
||||||
f32 test;
|
|
||||||
|
|
||||||
if (script->varTable[0] & 3) {
|
if ((script->varTable[0] % 4) != 0) {
|
||||||
rand = rand_int(100);
|
var_f22 = r1 - (rand_int(100) + t1);
|
||||||
rand += c8;
|
fx_star(2, r1, t1, r2, var_f22, 0.0f, r2 + 50 - rand_int(100), rand_int(10) + 7);
|
||||||
temp_f22 = temp_s1 - rand;
|
|
||||||
rand = rand_int(100);
|
|
||||||
rand -= 50;
|
|
||||||
temp_f20 = temp_s0 - rand;
|
|
||||||
phi_v0 = rand_int(10);
|
|
||||||
phi_a0 = 2;
|
|
||||||
} else {
|
} else {
|
||||||
rand = rand_int(100);
|
var_f22 = r1 - (rand_int(100) + t1);
|
||||||
rand += 200;
|
fx_star(3, r1, t1, r2, var_f22, 0.0f, r2 + 50 - rand_int(100), rand_int(10) + 7);
|
||||||
temp_f22 = temp_s1 - rand;
|
|
||||||
rand = rand_int(100);
|
|
||||||
rand -= 50;
|
|
||||||
temp_f20 = temp_s0 - rand;
|
|
||||||
phi_v0 = rand_int(10);
|
|
||||||
phi_a0 = 3;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
|
||||||
fx_star(phi_a0, temp_s1, c8, temp_s0, temp_f22, 0, temp_f20, phi_v0 + 7);
|
|
||||||
if (temp_f20) {
|
|
||||||
temp_f20 -= rand;
|
|
||||||
}
|
|
||||||
} while (0);
|
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(ApiStatus, "battle/item/shooting_star", battle_item_shooting_star_func_802A123C_71D9AC,
|
|
||||||
Evt* script, s32 isInitialCall);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
@ -1,209 +1,158 @@
|
|||||||
#include "strange_cake.h"
|
#include "strange_cake.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
#include "pause/pause_common.h"
|
||||||
|
#include "hud_element.h"
|
||||||
#include "battle/item/strange_cake1.png.h"
|
#include "battle/item/strange_cake1.png.h"
|
||||||
#include "battle/item/strange_cake2.png.h"
|
#include "battle/item/strange_cake2.png.h"
|
||||||
#include "battle/item/strange_cake3.png.h"
|
#include "battle/item/strange_cake3.png.h"
|
||||||
|
|
||||||
|
BSS s32 D_802A2DC8[2];
|
||||||
|
|
||||||
#include "ItemRefund.inc.c"
|
#include "ItemRefund.inc.c"
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
extern HudScript* N(D_802A2848_732B48)[];
|
||||||
|
extern s32 N(D_802A2858_732B58)[];
|
||||||
extern s32 D_802A25E4;
|
|
||||||
extern HudElement* D_802A2DF4;
|
|
||||||
extern s32 D_802A2DD8;
|
|
||||||
|
|
||||||
ApiStatus N(func_802A123C_73153C)(Evt* script, s32 isInitialCall) {
|
|
||||||
s32 i;
|
|
||||||
HudElement** ptr;
|
|
||||||
s32 var;
|
|
||||||
s32* var2;
|
|
||||||
|
|
||||||
if (D_802A25E4 < 6) {
|
|
||||||
if (D_802A25E4 > 0) {
|
|
||||||
draw_box(0, 7, 0x6A, 0x56, 0, 0x24, 0x24, 0xFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x140, 0xF0, 0);
|
|
||||||
|
|
||||||
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
|
||||||
|
|
||||||
ptr = &D_802A2DF4;
|
|
||||||
for (i = 0; i < 7; i++) {
|
|
||||||
var2 = *ptr;
|
|
||||||
var = (D_802A2DD8 / 100) - 0x68;
|
|
||||||
ptr++;
|
|
||||||
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
|
||||||
hud_element_draw_without_clipping(var2);
|
|
||||||
}
|
|
||||||
|
|
||||||
var2 = D_802A2DF4;
|
|
||||||
var = (D_802A2DD8 / 100) - 0x68;
|
|
||||||
hud_element_set_render_pos(var2, 0x7C, (i * 0x1A) - var);
|
|
||||||
hud_element_draw_without_clipping(var2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
INCLUDE_ASM(ApiStatus, "battle/item/strange_cake", battle_item_strange_cake_func_802A123C_73153C);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef NON_EQUIVALENT
|
|
||||||
|
|
||||||
|
extern s32 D_802A2DD8[5];
|
||||||
|
extern s32 D_802A2DE4;
|
||||||
extern s32 D_802A2DEC;
|
extern s32 D_802A2DEC;
|
||||||
extern s32 D_802A2DF0;
|
extern s32 D_802A2DF0;
|
||||||
extern s32 D_802A2DF4;
|
extern s32 D_802A2DF4;
|
||||||
extern s32 D_802A2DF8;
|
extern s32 D_802A2DF8;
|
||||||
extern s32 D_802A2DFC;
|
extern s32 D_802A2DFC;
|
||||||
extern s32 D_802A2E00;
|
extern s32 D_802A2E00;
|
||||||
extern s32* D_802A2DD8;
|
|
||||||
extern HudElement** D_802A25C8;
|
|
||||||
|
|
||||||
s32 N(D_802A2848_732B48)[] = {
|
void N(func_802A123C_73153C(void)) {
|
||||||
0x802A27F8, 0x802A2820, 0x802A27D0, 0x802A27F8
|
s32 var_s3;
|
||||||
};
|
s32 id;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
s32 N(D_802A2858_732B58)[] = {
|
if (D_802A2DEC < 6) {
|
||||||
0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000001
|
if (D_802A2DEC > 0) {
|
||||||
};
|
draw_box(0, 7, 106, 86, 0, 36, 36, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, NULL, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
|
||||||
|
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 108, 90, 139, 118);
|
||||||
|
|
||||||
ApiStatus N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) {
|
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
|
||||||
|
id = D_802A2DD8[i];
|
||||||
|
hud_element_set_render_pos(id, 124, (i * 26) + 104 - (D_802A2DF4 / 100));
|
||||||
|
hud_element_draw_without_clipping(id);
|
||||||
|
}
|
||||||
|
id = D_802A2DD8[0];
|
||||||
|
hud_element_set_render_pos(id, 124, (i * 26) + 104 - (D_802A2DF4 / 100));
|
||||||
|
hud_element_draw_without_clipping(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
s32 N(func_802A13E4_7316E4)(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
s32 temp_a0_4;
|
||||||
|
s32 temp_v1_3;
|
||||||
|
s32 var_v0_2;
|
||||||
|
s32 var_v0_3;
|
||||||
|
s32 id;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
D_802A2DEC = 0;
|
D_802A2DEC = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (D_802A2DEC) {
|
switch (D_802A2DEC) {
|
||||||
case 0: {
|
case 0:
|
||||||
s32 i;
|
D_802A2E00 = create_generic_entity_frontUI(NULL, N(func_802A123C_73153C));
|
||||||
HudElement** iconPtr;
|
D_802A2DF4 = rand_int(13000);
|
||||||
|
|
||||||
D_802A2E00 = create_generic_entity_frontUI(NULL, func_802A123C_73153C);
|
|
||||||
i = rand_int(13000);
|
|
||||||
D_802A2DF4 = i;
|
|
||||||
|
|
||||||
D_802A2DF8 = 1000;
|
D_802A2DF8 = 1000;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
|
||||||
s32* B48Ptr = &N(D_802A2848_732B48);
|
id = hud_element_create(N(D_802A2848_732B48)[N(D_802A2858_732B58)[i]]);
|
||||||
s32* B58Ptr = &N(D_802A2858_732B58);
|
D_802A2DD8[i] = id;
|
||||||
HudElement* icon = hud_element_create(*(B48Ptr + * (B58Ptr + i)));
|
hud_element_set_flags(id, HUD_ELEMENT_FLAGS_80);
|
||||||
|
|
||||||
*(&D_802A2DD8 + i) = icon;
|
|
||||||
hud_element_set_flags(icon, HUD_ELEMENT_FLAGS_80);
|
|
||||||
}
|
}
|
||||||
D_802A2DEC = 1;
|
D_802A2DEC = 1;
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1: {
|
return ApiStatus_BLOCK;
|
||||||
s32* ECptr = &D_802A2DF4;
|
case 1:
|
||||||
s32* F0ptr = &D_802A2DF8;
|
D_802A2DF4 += D_802A2DF8;
|
||||||
|
if (D_802A2DF4 / 100 >= 130) {
|
||||||
*ECptr += *F0ptr;
|
D_802A2DF4 -= 13000;
|
||||||
if (*ECptr / 100 >= 130) {
|
|
||||||
s32* test = ECptr;
|
|
||||||
*test -= 0x32C8;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*F0ptr > 400) {
|
if (D_802A2DF8 > 400) {
|
||||||
*F0ptr -= 10;
|
D_802A2DF8 -= 10;
|
||||||
} else if (*F0ptr > 100) {
|
} else if (D_802A2DF8 > 100) {
|
||||||
*F0ptr -= 5;
|
D_802A2DF8 -= 5;
|
||||||
} else {
|
} else {
|
||||||
*F0ptr -= 1;
|
D_802A2DF8 -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (D_802A2DF8 < 10) {
|
if (D_802A2DF8 < 10) {
|
||||||
D_802A2DF0 = D_802A2DF4 / 100;
|
D_802A2DF0 = D_802A2DF4 / 100;
|
||||||
if (D_802A2DF0 % 26 < 13) {
|
|
||||||
|
if (((D_802A2DF4 / 100) % 26) < 13) {
|
||||||
if (rand_int(100) < 80) {
|
if (rand_int(100) < 80) {
|
||||||
D_802A2DEC = 2;
|
D_802A2DEC = 2;
|
||||||
} else {
|
} else {
|
||||||
D_802A2DEC = 3;
|
D_802A2DEC = 3;
|
||||||
}
|
}
|
||||||
} else if (rand_int(100) < 60) {
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rand_int(100) < 60) {
|
||||||
D_802A2DEC = 3;
|
D_802A2DEC = 3;
|
||||||
} else {
|
} else {
|
||||||
D_802A2DEC = 2;
|
D_802A2DEC = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case 2:
|
||||||
|
temp_a0_4 = D_802A2DF0 % 26;
|
||||||
case 2: {
|
var_v0_2 = temp_a0_4 + 3;
|
||||||
s32* E8ptr = &D_802A2DF0;
|
if (var_v0_2 < 0) {
|
||||||
s32 a, b, c, d;
|
var_v0_2 += 3;
|
||||||
|
|
||||||
d = *E8ptr % 26;
|
|
||||||
a = d;
|
|
||||||
c = a + 3;
|
|
||||||
if (c < 0) {
|
|
||||||
c = a + 6;
|
|
||||||
}
|
}
|
||||||
d = c >> 2;
|
temp_a0_4 = var_v0_2 >> 2;
|
||||||
*E8ptr -= d;
|
D_802A2DF0 -= temp_a0_4;
|
||||||
D_802A2DF4 = *E8ptr * 100;
|
D_802A2DF4 = D_802A2DF0 * 100;
|
||||||
if (d == 0) {
|
if (temp_a0_4 == 0) {
|
||||||
D_802A2DEC = 4;
|
D_802A2DEC = 4;
|
||||||
}
|
}
|
||||||
}
|
break;
|
||||||
break;
|
case 3:
|
||||||
|
temp_v1_3 = D_802A2DF0 % 26;
|
||||||
case 3: {
|
if (temp_v1_3 == 0) {
|
||||||
s32* E8ptr = &D_802A2DF0;
|
|
||||||
s32 a, b, c, d;
|
|
||||||
|
|
||||||
d = *E8ptr % 26;
|
|
||||||
if (d == 0) {
|
|
||||||
D_802A2DEC = 4;
|
D_802A2DEC = 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
a = d;
|
temp_a0_4 = 26 - temp_v1_3;
|
||||||
b = 26;
|
var_v0_3 = temp_a0_4 + 3;
|
||||||
b -= a;
|
if (var_v0_3 < 0) {
|
||||||
c = b + 3;
|
var_v0_3 += 3;
|
||||||
if (c < 0) {
|
|
||||||
c = b + 6;
|
|
||||||
}
|
}
|
||||||
c = c >> 2;
|
temp_a0_4 = var_v0_3 >> 2;
|
||||||
*E8ptr += c;
|
D_802A2DF0 += temp_a0_4;
|
||||||
D_802A2DF4 = *E8ptr * 100;
|
D_802A2DF4 = D_802A2DF0 * 100;
|
||||||
}
|
break;
|
||||||
break;
|
case 4:
|
||||||
|
|
||||||
case 4: {
|
|
||||||
D_802A2DFC = 20;
|
D_802A2DFC = 20;
|
||||||
D_802A2DEC = 5;
|
D_802A2DEC = 5;
|
||||||
}
|
break;
|
||||||
break;
|
case 5:
|
||||||
|
if (D_802A2DFC != 0) {
|
||||||
case 5: {
|
D_802A2DFC--;
|
||||||
s32* F4ptr = &D_802A2DFC;
|
|
||||||
s32 i;
|
|
||||||
s16 g;
|
|
||||||
HudElement** iconPtr;
|
|
||||||
|
|
||||||
if (*F4ptr != 0) {
|
|
||||||
*F4ptr -= 1;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iconPtr = &D_802A25C8;
|
|
||||||
i = D_802A2DF0 / 26;
|
|
||||||
g = N(D_802A2858_732B58)[i];
|
|
||||||
battleStatus->selectedItemID = g;
|
|
||||||
script->varTable[0] = g;
|
|
||||||
free_generic_entity(D_802A2E00);
|
|
||||||
for (i = 0; i < 5; i++) {
|
|
||||||
hud_element_free(*iconPtr++);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ApiStatus_DONE2;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
var_v0_3 = i = D_802A2DF0 / 26; // use of i required to match
|
||||||
|
battleStatus->selectedItemID = N(D_802A2858_732B58)[var_v0_3];
|
||||||
|
script->varTable[0] = battleStatus->selectedItemID;
|
||||||
|
free_generic_entity(D_802A2E00);
|
||||||
|
for (i = 0; i < ARRAY_COUNT(D_802A2DD8); i++) {
|
||||||
|
hud_element_free(D_802A2DD8[i]);
|
||||||
|
}
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
INCLUDE_ASM(ApiStatus, "battle/item/strange_cake", battle_item_strange_cake_func_802A13E4_7316E4,
|
|
||||||
Evt* script, s32 isInitialCall);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
ApiStatus N(func_802A1818_731B18)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1818_731B18)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
@ -302,23 +251,38 @@ static s32 _pad = 0; // XXX
|
|||||||
#include "battle/item/strange_cake3.png.inc.c"
|
#include "battle/item/strange_cake3.png.inc.c"
|
||||||
#include "battle/item/strange_cake3.pal.inc.c"
|
#include "battle/item/strange_cake3.pal.inc.c"
|
||||||
|
|
||||||
s32 N(data)[] = {
|
HudScript N(D_802A27D0) = {
|
||||||
0x00000008, 0x00000005, 0x00000003, 0x00000004,
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
0x00000002, 0x0000003C, 0x802A2170, 0x802A2370,
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32, HUD_ELEMENT_OP_Loop,
|
||||||
0x00000003, 0x00000000, 0x00000008, 0x00000005,
|
HUD_ELEMENT_OP_SetCI, 60, (s32) battle_item_strange_cake1_png, (s32) battle_item_strange_cake1_pal,
|
||||||
0x00000003, 0x00000004, 0x00000002, 0x0000003C,
|
0x00000003,
|
||||||
0x802A2390, 0x802A2590, 0x00000003, 0x00000000,
|
HUD_ELEMENT_OP_End,
|
||||||
0x00000008, 0x00000005, 0x00000003, 0x00000004,
|
|
||||||
0x00000002, 0x0000003C, 0x802A25B0, 0x802A27B0,
|
|
||||||
0x00000003, 0x00000000
|
|
||||||
};
|
};
|
||||||
|
|
||||||
s32 N(D_802A2848_732B48)[] = {
|
HudScript N(D_802A27F8) = {
|
||||||
0x802A27F8, 0x802A2820, 0x802A27D0, 0x802A27F8
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32, HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32) battle_item_strange_cake2_png, (s32) battle_item_strange_cake2_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
HudScript N(D_802A2820) = {
|
||||||
|
HUD_ELEMENT_OP_SetVisible,
|
||||||
|
HUD_ELEMENT_OP_SetTileSize, HUD_ELEMENT_SIZE_32x32,
|
||||||
|
HUD_ELEMENT_OP_Loop,
|
||||||
|
HUD_ELEMENT_OP_SetCI, 60, (s32) battle_item_strange_cake3_png, (s32) battle_item_strange_cake3_pal,
|
||||||
|
0x00000003,
|
||||||
|
HUD_ELEMENT_OP_End
|
||||||
|
};
|
||||||
|
|
||||||
|
HudScript* N(D_802A2848_732B48)[] = {
|
||||||
|
&N(D_802A27F8), &N(D_802A2820), &N(D_802A27D0), &N(D_802A27F8)
|
||||||
|
};
|
||||||
|
|
||||||
|
// indexes into D_802A2848_732B48
|
||||||
s32 N(D_802A2858_732B58)[] = {
|
s32 N(D_802A2858_732B58)[] = {
|
||||||
0x00000000, 0x00000001, 0x00000002, 0x00000000, 0x00000001, 0x000000000
|
0, 1, 2, 0, 1, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
EvtScript N(script6) = {
|
EvtScript N(script6) = {
|
||||||
|
@ -67,28 +67,26 @@ ApiStatus func_802384B0_703FA0(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80238570_704060(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238570_704060(Evt* script, s32 isInitialCall) {
|
||||||
s32* var = D_80239A0C_7054FC;
|
EffectInstance* effect = D_80239A0C_7054FC;
|
||||||
|
|
||||||
if (var != NULL) {
|
if (effect != NULL) {
|
||||||
*var |= 0x10;
|
effect->flags |= 0x10;
|
||||||
}
|
}
|
||||||
D_80239A0C_7054FC = NULL;
|
D_80239A0C_7054FC = NULL;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Beware this demon because "EffectInstanceDataThing" is one hell of a
|
|
||||||
// janky solution, but this does match.
|
|
||||||
ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = evt_get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = evt_get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = evt_get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
EffectInstanceDataThing* dataThing;
|
ThunderboltRingFXData* data;
|
||||||
|
|
||||||
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 10);
|
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 10);
|
||||||
dataThing = D_8023C1B4->data;
|
data = D_8023C1B4->data;
|
||||||
dataThing->unk_30 = 3;
|
data->unk_30 = 3;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -116,18 +114,16 @@ ApiStatus func_80238784_704274(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "battle/partner/watt", func_80238810_704300);
|
INCLUDE_ASM(s32, "battle/partner/watt", func_80238810_704300);
|
||||||
|
|
||||||
// Beware this demon because "EffectInstanceDataThing" is one hell of a
|
|
||||||
// janky solution, but this does match.
|
|
||||||
ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = evt_get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = evt_get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = evt_get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
EffectInstanceDataThing* temp_a0;
|
ThunderboltRingFXData* data;
|
||||||
|
|
||||||
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 60);
|
D_8023C1B4 = fx_thunderbolt_ring(0, var1, var2, var3, 1.0f, 60);
|
||||||
temp_a0 = D_8023C1B4->data;
|
data = D_8023C1B4->data;
|
||||||
temp_a0->unk_30 = 2;
|
data->unk_30 = 2;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkEffect6FFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkEffect6FFunc)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Effect6FInstance* effect;
|
EffectInstance* effect;
|
||||||
s32 unused_var = evt_get_variable(script, *args++);
|
s32 unused_var = evt_get_variable(script, *args++);
|
||||||
s32 temp_s6 = evt_get_variable(script, *args++);
|
s32 temp_s6 = evt_get_variable(script, *args++);
|
||||||
s32 temp_s5 = evt_get_variable(script, *args++);
|
s32 temp_s5 = evt_get_variable(script, *args++);
|
||||||
@ -14,13 +14,13 @@ ApiStatus N(UnkEffect6FFunc)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 temp_s1 = evt_get_variable(script, *args++);
|
s32 temp_s1 = evt_get_variable(script, *args++);
|
||||||
s32 temp_s0_9 = evt_get_variable(script, *args++);
|
s32 temp_s0_9 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
effect = (Effect6FInstance*)fx_cold_breath(1, temp_s6, temp_s5, temp_s4, temp_f20, temp_s2);
|
effect = fx_cold_breath(1, temp_s6, temp_s5, temp_s4, temp_f20, temp_s2);
|
||||||
effect->data->rotation.z = temp_s3;
|
((Effect6FFXData*)effect->data)->rotation.z = temp_s3;
|
||||||
effect->data->scale.x = temp_s1;
|
((Effect6FFXData*)effect->data)->scale.x = temp_s1;
|
||||||
effect->data->scale.y = temp_s0_9;
|
((Effect6FFXData*)effect->data)->scale.y = temp_s0_9;
|
||||||
effect->data->color.x = 255;
|
((Effect6FFXData*)effect->data)->color.x = 255;
|
||||||
effect->data->color.y = 255;
|
((Effect6FFXData*)effect->data)->color.y = 255;
|
||||||
effect->data->color.z = 255;
|
((Effect6FFXData*)effect->data)->color.z = 255;
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
31
src/common/UnkWaterFountainFunc.inc.c
Normal file
31
src/common/UnkWaterFountainFunc.inc.c
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
|
ApiStatus N(UnkWaterFountainFunc)(Evt* script, s32 isInitialCall) {
|
||||||
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
EffectInstance* effect;
|
||||||
|
f32 temp_f28;
|
||||||
|
f32 temp_f26;
|
||||||
|
f32 temp_f20;
|
||||||
|
f32 temp_f22;
|
||||||
|
f32 temp_f24;
|
||||||
|
f32 temp_f20_2;
|
||||||
|
|
||||||
|
temp_f28 = evt_get_variable(script, *args++);
|
||||||
|
temp_f26 = evt_get_variable(script, *args++);
|
||||||
|
evt_get_variable(script, *args++);
|
||||||
|
temp_f20 = evt_get_variable(script, *args++);
|
||||||
|
temp_f22 = evt_get_variable(script, *args++);
|
||||||
|
temp_f24 = evt_get_variable(script, *args++);
|
||||||
|
temp_f20_2 = atan2(temp_f28, temp_f26, temp_f20, temp_f22 + 40.0f);
|
||||||
|
|
||||||
|
effect = fx_water_fountain(0, temp_f20 - 10.0f, temp_f22 + 60.0f, temp_f24 + 20.0f, 2.5f, 40);
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_38 = temp_f20_2;
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_18 = 2;
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_1C = 2;
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_20 = 2;
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_28 = 80;
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_2C = 80;
|
||||||
|
((WaterFountainFXData*)effect->data)->unk_30 = 80;
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
@ -1,7 +1,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
BSS EffectWhirlwind N(effectStruct);
|
BSS EffectWhirlwindUnk N(effectUnk);
|
||||||
BSS static s32 padding[0x94];
|
BSS static s32 padding[0x94];
|
||||||
|
|
||||||
ApiStatus N(UnkWhirlwindEffectFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkWhirlwindEffectFunc)(Evt* script, s32 isInitialCall) {
|
||||||
@ -11,10 +11,10 @@ ApiStatus N(UnkWhirlwindEffectFunc)(Evt* script, s32 isInitialCall) {
|
|||||||
s32 var3 = evt_get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = evt_get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
N(effectStruct).unk_28 = var1;
|
N(effectUnk).unk_28 = var1;
|
||||||
N(effectStruct).unk_2C = var2 - 10.0f;
|
N(effectUnk).unk_2C = var2 - 10.0f;
|
||||||
N(effectStruct).unk_30 = var3;
|
N(effectUnk).unk_30 = var3;
|
||||||
|
|
||||||
fx_46(6, &N(effectStruct), 1.0f, var4);
|
fx_46(6, &N(effectUnk), 1.0f, var4);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -1,17 +1,17 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
extern Gfx D_090023E0[];
|
|
||||||
extern Gfx D_09002440[];
|
|
||||||
extern Gfx D_090023F8[];
|
|
||||||
extern Gfx D_09002458[];
|
|
||||||
extern Gfx D_090023B0[];
|
|
||||||
extern Gfx D_09002410[];
|
|
||||||
extern Gfx D_090023C8[];
|
|
||||||
extern Gfx D_09002428[];
|
|
||||||
extern Gfx D_09002000[];
|
extern Gfx D_09002000[];
|
||||||
extern Gfx D_090020E8[];
|
extern Gfx D_090020E8[];
|
||||||
extern Gfx D_090021D0[];
|
extern Gfx D_090021D0[];
|
||||||
|
extern Gfx D_090023B0[];
|
||||||
|
extern Gfx D_090023C8[];
|
||||||
|
extern Gfx D_090023E0[];
|
||||||
|
extern Gfx D_090023F8[];
|
||||||
|
extern Gfx D_09002410[];
|
||||||
|
extern Gfx D_09002428[];
|
||||||
|
extern Gfx D_09002440[];
|
||||||
|
extern Gfx D_09002458[];
|
||||||
|
|
||||||
Gfx* D_E0076E90[] = { D_090023E0, D_090023E0, D_09002440, D_09002440 };
|
Gfx* D_E0076E90[] = { D_090023E0, D_090023E0, D_09002440, D_09002440 };
|
||||||
Gfx* D_E0076EA0[] = { D_090023F8, D_090023F8, D_09002458, D_09002458 };
|
Gfx* D_E0076EA0[] = { D_090023F8, D_090023F8, D_09002458, D_09002458 };
|
||||||
@ -57,20 +57,20 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->unk_2C = 100;
|
part->unk_2C = 100;
|
||||||
part->type = arg0;
|
part->type = arg0;
|
||||||
part->unk_30 = 0;
|
part->unk_30 = 0;
|
||||||
part->unk_28 = 0;
|
part->primA = 0;
|
||||||
part->pos.x = arg1;
|
part->pos.x = arg1;
|
||||||
part->pos.y = arg2;
|
part->pos.y = arg2;
|
||||||
part->pos.z = arg3;
|
part->pos.z = arg3;
|
||||||
|
|
||||||
switch (arg0) {
|
switch (arg0) {
|
||||||
case 0:
|
case 0:
|
||||||
part->unk_68 = 75;
|
part->primR = 75;
|
||||||
part->unk_69 = 75;
|
part->primG = 75;
|
||||||
part->unk_6A = 75;
|
part->primB = 75;
|
||||||
part->unk_6B = 255;
|
part->envR = 255;
|
||||||
part->unk_6C = 247;
|
part->envG = 247;
|
||||||
part->unk_6D = 155;
|
part->engB = 155;
|
||||||
part->unk_6E = 0;
|
part->engA = 0;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
part->unk_20 = arg4 * 0.6;
|
part->unk_20 = arg4 * 0.6;
|
||||||
part->unk_1C = arg4 * 2.0;
|
part->unk_1C = arg4 * 2.0;
|
||||||
@ -84,13 +84,13 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->unk_60 = 0.9f;
|
part->unk_60 = 0.9f;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
part->unk_68 = 75;
|
part->primR = 75;
|
||||||
part->unk_69 = 75;
|
part->primG = 75;
|
||||||
part->unk_6A = 75;
|
part->primB = 75;
|
||||||
part->unk_6B = 255;
|
part->envR = 255;
|
||||||
part->unk_6C = 0;
|
part->envG = 0;
|
||||||
part->unk_6D = 0;
|
part->engB = 0;
|
||||||
part->unk_6E = 0;
|
part->engA = 0;
|
||||||
part->unk_1C = arg4;
|
part->unk_1C = arg4;
|
||||||
part->unk_20 = arg4;
|
part->unk_20 = arg4;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
@ -104,13 +104,13 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->unk_60 = 0.9f;
|
part->unk_60 = 0.9f;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
part->unk_68 = 25;
|
part->primR = 25;
|
||||||
part->unk_69 = 121;
|
part->primG = 121;
|
||||||
part->unk_6A = 142;
|
part->primB = 142;
|
||||||
part->unk_6B = 34;
|
part->envR = 34;
|
||||||
part->unk_6D = 255;
|
part->engB = 255;
|
||||||
part->unk_6C = 0;
|
part->envG = 0;
|
||||||
part->unk_6E = 81;
|
part->engA = 81;
|
||||||
part->unk_1C = arg4;
|
part->unk_1C = arg4;
|
||||||
part->unk_20 = arg4;
|
part->unk_20 = arg4;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
@ -124,13 +124,13 @@ void aura_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstance*
|
|||||||
part->unk_60 = 1.04f;
|
part->unk_60 = 1.04f;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
part->unk_68 = 179;
|
part->primR = 179;
|
||||||
part->unk_69 = 169;
|
part->primG = 169;
|
||||||
part->unk_6A = 85;
|
part->primB = 85;
|
||||||
part->unk_6B = 34;
|
part->envR = 34;
|
||||||
part->unk_6D = 255;
|
part->engB = 255;
|
||||||
part->unk_6C = 0;
|
part->envG = 0;
|
||||||
part->unk_6E = 63;
|
part->engA = 63;
|
||||||
part->unk_1C = arg4;
|
part->unk_1C = arg4;
|
||||||
part->unk_20 = arg4;
|
part->unk_20 = arg4;
|
||||||
part->unk_24 = arg4;
|
part->unk_24 = arg4;
|
||||||
@ -187,16 +187,16 @@ void aura_update(EffectInstance* effect) {
|
|||||||
|
|
||||||
if (type < 2) {
|
if (type < 2) {
|
||||||
if (unk_30 <= 10) {
|
if (unk_30 <= 10) {
|
||||||
data->unk_28 += (128 - data->unk_28) * 0.5;
|
data->primA += (128 - data->primA) * 0.5;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (unk_30 <= 10) {
|
if (unk_30 <= 10) {
|
||||||
data->unk_28 = (unk_30 * 0xFF) / 10;
|
data->primA = (unk_30 * 0xFF) / 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unk_2C < 10) {
|
if (unk_2C < 10) {
|
||||||
data->unk_28 *= 0.5;
|
data->primA *= 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
@ -263,4 +263,68 @@ void func_E007684C(void) {
|
|||||||
void func_E0076854(void) {
|
void func_E0076854(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/aura", aura_appendGfx);
|
void aura_appendGfx(void* effect) {
|
||||||
|
Matrix4f sp18, sp58, sp98;
|
||||||
|
EffectInstance* eff = (EffectInstance*)effect;
|
||||||
|
AuraFXData* data = ((EffectInstance*)effect)->data;
|
||||||
|
s32 type = data->type;
|
||||||
|
s32 primA = data->primA;
|
||||||
|
s32 v1, v2;
|
||||||
|
|
||||||
|
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_E0076ED0[type]);
|
||||||
|
|
||||||
|
shim_guTranslateF(sp18, data->unk_10, data->unk_14, data->unk_18);
|
||||||
|
if (type == 2) {
|
||||||
|
shim_guRotateF(sp58, data->unk_64.f, 0.0f, 1.0f, 0.0f);
|
||||||
|
} else {
|
||||||
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
|
}
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp98);
|
||||||
|
shim_guScaleF(sp58, data->unk_1C, data->unk_20, 1.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp98, sp98);
|
||||||
|
if (type == 0) {
|
||||||
|
shim_guTranslateF(sp58, (-(data->unk_1C - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp98, sp98);
|
||||||
|
}
|
||||||
|
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_E0076EC0[type]);
|
||||||
|
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
|
shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z);
|
||||||
|
if (type == 2) {
|
||||||
|
shim_guRotateF(sp58, data->unk_64.f, 0.0f, 1.0f, 0.0f);
|
||||||
|
} else {
|
||||||
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
|
}
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp98);
|
||||||
|
shim_guScaleF(sp58, data->unk_1C, data->unk_20, 1.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp98, sp98);
|
||||||
|
if (type == 0) {
|
||||||
|
shim_guTranslateF(sp58, (-(data->unk_1C - data->unk_24) / data->unk_24) * 10.0f, 0.0f, 0.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp98, sp98);
|
||||||
|
}
|
||||||
|
shim_guMtxF2L(sp98, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_E0076EB0[type]);
|
||||||
|
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
|
||||||
|
gDPSetPrimColor(gMasterGfxPos++, 0, 0, data->primR, data->primG, data->primB, primA);
|
||||||
|
gDPSetEnvColor(gMasterGfxPos++, data->envR, data->envG, data->engB, data->engA);
|
||||||
|
|
||||||
|
v1 = data->unk_34 * 4.0f;
|
||||||
|
v2 = data->unk_40 * 4.0f;
|
||||||
|
|
||||||
|
gDPSetTileSize(gMasterGfxPos++, 1, v1, v2, v1 + 124, v2 + 508);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_E0076E90[type]);
|
||||||
|
|
||||||
|
v1 = data->unk_4C * 4.0f;
|
||||||
|
v2 = data->unk_58 * 4.0f;
|
||||||
|
|
||||||
|
gDPSetTileSize(gMasterGfxPos++, 1, v1 + 30, v2 + 30, v1 + 282, v2 + 538);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_E0076EA0[type]);
|
||||||
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
}
|
||||||
|
@ -1,14 +1,98 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
|
extern Gfx D_09000900[];
|
||||||
|
extern Gfx D_090009E8[];
|
||||||
|
extern Gfx D_09000A10[];
|
||||||
|
|
||||||
|
Gfx* D_E0060730[] = { D_090009E8, D_09000A10 };
|
||||||
|
Gfx* D_E0060738[] = { D_09000900, D_09000900 };
|
||||||
|
|
||||||
|
void big_snowflakes_init(EffectInstance* effect);
|
||||||
|
void big_snowflakes_update(EffectInstance* effect);
|
||||||
|
void big_snowflakes_render(EffectInstance* effect);
|
||||||
void big_snowflakes_appendGfx(void* effect);
|
void big_snowflakes_appendGfx(void* effect);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/big_snowflakes", big_snowflakes_main);
|
void big_snowflakes_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||||
|
EffectBlueprint bp;
|
||||||
|
EffectInstance* effect;
|
||||||
|
BigSnowflakeFXData* data;
|
||||||
|
s32 numParts = 9;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
void big_snowflakes_init(void) {
|
bp.unk_00 = 0;
|
||||||
|
bp.init = big_snowflakes_init;
|
||||||
|
bp.update = big_snowflakes_update;
|
||||||
|
bp.renderWorld = big_snowflakes_render;
|
||||||
|
bp.unk_14 = 0;
|
||||||
|
bp.effectID = EFFECT_BIG_SNOWFLAKES;
|
||||||
|
|
||||||
|
effect = shim_create_effect_instance(&bp);
|
||||||
|
effect->numParts = numParts;
|
||||||
|
|
||||||
|
data = shim_general_heap_malloc(effect->numParts * sizeof(*data));
|
||||||
|
effect->data = data;
|
||||||
|
|
||||||
|
ASSERT(data != NULL);
|
||||||
|
|
||||||
|
shim_mem_clear(data, numParts * sizeof(*data));
|
||||||
|
data->unk_00 = arg0;
|
||||||
|
data->unk_04 = arg1;
|
||||||
|
data->unk_08 = arg2;
|
||||||
|
data->unk_0C = arg3;
|
||||||
|
data->unk_28 = 30;
|
||||||
|
data->unk_2C = 0;
|
||||||
|
data->unk_24 = 0;
|
||||||
|
|
||||||
|
data++;
|
||||||
|
for (i = 1; i < numParts; i++, data++) {
|
||||||
|
data->unk_04 = func_E0200000(10) - 5;
|
||||||
|
data->unk_08 = func_E0200000(10) + 5;
|
||||||
|
data->unk_0C = 10.0f;
|
||||||
|
data->unk_18 = func_E0200000(360);
|
||||||
|
data->unk_20 = func_E0200000(360);
|
||||||
|
data->unk_1C = func_E0200000(100) / 10;
|
||||||
|
data->unk_10 = 0;
|
||||||
|
data->unk_14 = 2.0f;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/big_snowflakes", big_snowflakes_update);
|
void big_snowflakes_init(EffectInstance* effect) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void big_snowflakes_update(EffectInstance* effect) {
|
||||||
|
BigSnowflakeFXData* data = effect->data;
|
||||||
|
s32 unk_28;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
data->unk_28--;
|
||||||
|
data->unk_2C++;
|
||||||
|
if (data->unk_28 < 0) {
|
||||||
|
shim_remove_effect(effect);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
unk_28 = data->unk_28;
|
||||||
|
if (data->unk_2C < 10) {
|
||||||
|
data->unk_24 += (255 - data->unk_24) * 0.3;
|
||||||
|
}
|
||||||
|
if (unk_28 < 10) {
|
||||||
|
data->unk_24 *= 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
data++;
|
||||||
|
for (i = 1; i < effect->numParts; i++, data++) {
|
||||||
|
data->unk_10 += (f32) (shim_sin_deg(2.0f * data->unk_18) * 0.2);
|
||||||
|
data->unk_14 += -0.05f;
|
||||||
|
data->unk_10 *= 0.92;
|
||||||
|
data->unk_14 += -0.05f;
|
||||||
|
data->unk_1C += func_E0200044(50, unk_28 + (i * 20)) - 25;
|
||||||
|
data->unk_18 += shim_sin_deg(data->unk_1C) * 10.0f;
|
||||||
|
data->unk_20 += shim_cos_deg(data->unk_1C * 0.5f) * 10.0f;
|
||||||
|
data->unk_04 += data->unk_10;
|
||||||
|
data->unk_08 += data->unk_14;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void big_snowflakes_render(EffectInstance* effect) {
|
void big_snowflakes_render(EffectInstance* effect) {
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
@ -23,4 +107,39 @@ void big_snowflakes_render(EffectInstance* effect) {
|
|||||||
retTask->renderMode |= RENDER_MODE_2;
|
retTask->renderMode |= RENDER_MODE_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/big_snowflakes", big_snowflakes_appendGfx);
|
void big_snowflakes_appendGfx(void* effect) {
|
||||||
|
BigSnowflakeFXData* data = ((EffectInstance*)effect)->data;
|
||||||
|
Matrix4f sp18;
|
||||||
|
Matrix4f sp58;
|
||||||
|
Matrix4f sp98;
|
||||||
|
Gfx* dlist = D_E0060738[0];
|
||||||
|
s32 i;
|
||||||
|
|
||||||
|
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data));
|
||||||
|
gSPDisplayList(gMasterGfxPos++, dlist);
|
||||||
|
gDPSetPrimColor(gMasterGfxPos++, 0, 0, 20, 100, 20, data->unk_24);
|
||||||
|
|
||||||
|
shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
|
shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp98);
|
||||||
|
|
||||||
|
data++;
|
||||||
|
for (i = 1; i < ((EffectInstance*)effect)->numParts; i++, data++) {
|
||||||
|
Gfx* dlist2 = D_E0060730[i & 1]; // should be able to be i % 2 (ARRAY_COUNT(D_E0060730))
|
||||||
|
|
||||||
|
shim_guTranslateF(sp58, data->unk_04, data->unk_08, data->unk_0C);
|
||||||
|
shim_guMtxCatF(sp58, sp98, sp18);
|
||||||
|
|
||||||
|
if (!(i & 1)) {
|
||||||
|
shim_guRotateF(sp58, data->unk_18, 0.0f, 0.0f, 1.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
|
shim_guRotateF(sp58, data->unk_20, 0.0f, 1.0f, 0.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
|
}
|
||||||
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, dlist2);
|
||||||
|
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -1,18 +1,150 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "effects_internal.h"
|
#include "effects_internal.h"
|
||||||
|
|
||||||
s32 D_E00AA6C0[] = { 0x090038F8, 0x09003968, 0x090039D8, 0x09003A48, 0x09003AB8, 0x09003B28, 0x09003B98, 0x09003C08, 0x09003C78, 0x09003CE8, 0x09003D58 };
|
extern Vtx D_09002D40[][6]; // TODO confirm this type is correct
|
||||||
|
extern Gfx D_09003880[];
|
||||||
|
extern Gfx D_090038F8[];
|
||||||
|
extern Gfx D_09003968[];
|
||||||
|
extern Gfx D_090039D8[];
|
||||||
|
extern Gfx D_09003A48[];
|
||||||
|
extern Gfx D_09003AB8[];
|
||||||
|
extern Gfx D_09003B28[];
|
||||||
|
extern Gfx D_09003B98[];
|
||||||
|
extern Gfx D_09003C08[];
|
||||||
|
extern Gfx D_09003C78[];
|
||||||
|
extern Gfx D_09003CE8[];
|
||||||
|
extern Gfx D_09003D58[];
|
||||||
|
extern Gfx D_09003DC8[];
|
||||||
|
|
||||||
s8 D_E00AA6EC[] = { 0xFF, 0xFE, 0xFD, 0xFC, 0xFB, 0xFA, 0xF9, 0xF8, 0xF7, 0xF6, 0xF5, 0xF4, 0xF3, 0xF2, 0xF1, 0xF0, 0xEF, 0xEE, 0xED, 0xEF, 0xF1, 0xF3, 0xF5, 0xF7, 0xF9, 0xFB, 0xFD, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
Gfx* D_E00AA6C0[11] = {
|
||||||
|
D_090038F8, D_09003968, D_090039D8, D_09003A48, D_09003AB8, D_09003B28, D_09003B98, D_09003C08, D_09003C78, D_09003CE8, D_09003D58
|
||||||
|
};
|
||||||
|
|
||||||
|
s8 D_E00AA6EC[] = {
|
||||||
|
-1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15, -16, -17, -18, -19, -17, -15, -13, -11, -9, -7, -5, -3, -1, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
void butterflies_init(EffectInstance* effect);
|
||||||
|
void butterflies_update(EffectInstance* effect);
|
||||||
|
void butterflies_render(EffectInstance* effect);
|
||||||
void butterflies_appendGfx(void* effect);
|
void butterflies_appendGfx(void* effect);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/butterflies", butterflies_main);
|
EffectInstance* butterflies_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) {
|
||||||
|
EffectBlueprint bp;
|
||||||
|
EffectInstance* effect;
|
||||||
|
ButterflyFXData* part;
|
||||||
|
s32 numParts = 1;
|
||||||
|
s32 i;
|
||||||
|
|
||||||
void butterflies_init(void) {
|
bp.unk_00 = 0;
|
||||||
|
bp.init = butterflies_init;
|
||||||
|
bp.update = butterflies_update;
|
||||||
|
bp.renderWorld = butterflies_render;
|
||||||
|
bp.unk_14 = NULL;
|
||||||
|
bp.effectID = EFFECT_BUTTERFLIES;
|
||||||
|
|
||||||
|
effect = shim_create_effect_instance(&bp);
|
||||||
|
effect->numParts = numParts;
|
||||||
|
part = effect->data = shim_general_heap_malloc(numParts * sizeof(*part));
|
||||||
|
ASSERT(effect->data != NULL);
|
||||||
|
|
||||||
|
part->unk_04 = 1000;
|
||||||
|
part->unk_00 = arg0;
|
||||||
|
part->unk_24 = 255;
|
||||||
|
part->unk_0C = arg1;
|
||||||
|
part->unk_18 = arg1;
|
||||||
|
part->unk_10 = arg2;
|
||||||
|
part->unk_1C = arg2;
|
||||||
|
part->unk_14 = arg3;
|
||||||
|
part->unk_20 = arg3;
|
||||||
|
part->unk_08 = 0;
|
||||||
|
part->unk_2C = 0;
|
||||||
|
part->unk_30 = 0;
|
||||||
|
part->unk_34 = 50.0f;
|
||||||
|
part->unk_38 = 30.0f;
|
||||||
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/butterflies", butterflies_update);
|
void butterflies_init(EffectInstance* effect) {
|
||||||
|
}
|
||||||
|
|
||||||
|
void butterflies_update(EffectInstance* effect) {
|
||||||
|
ButterflyFXData* temp_s0;
|
||||||
|
f32 temp_f20;
|
||||||
|
f32 temp_f20_2;
|
||||||
|
f32 temp_f22;
|
||||||
|
f32 temp_f24;
|
||||||
|
f32 temp_f4;
|
||||||
|
f32 temp_f6;
|
||||||
|
f32 temp_f8;
|
||||||
|
f32 var_f12;
|
||||||
|
f32 var_f20;
|
||||||
|
f32 var_f22;
|
||||||
|
f32 var_f24;
|
||||||
|
|
||||||
|
temp_s0 = effect->data;
|
||||||
|
if (effect->flags & 0x10) {
|
||||||
|
effect->flags &= ~0x10;
|
||||||
|
temp_s0->unk_04 = 900;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (temp_s0->unk_04 < 1000) {
|
||||||
|
temp_s0->unk_04--;
|
||||||
|
}
|
||||||
|
temp_s0->unk_08 += 1;
|
||||||
|
if (temp_s0->unk_04 < 0) {
|
||||||
|
shim_remove_effect(effect);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (temp_s0->unk_04 < 0x10) {
|
||||||
|
temp_s0->unk_24 = temp_s0->unk_04 * 0x10;
|
||||||
|
}
|
||||||
|
|
||||||
|
temp_s0->unk_30--;
|
||||||
|
if (temp_s0->unk_30 <= 0) {
|
||||||
|
s32 t;
|
||||||
|
|
||||||
|
temp_f20 = shim_rand_int(359);
|
||||||
|
temp_f24 = temp_s0->unk_18 + (temp_s0->unk_34 * shim_sin_deg(temp_f20));
|
||||||
|
temp_f22 = temp_s0->unk_1C + shim_rand_int(temp_s0->unk_38);
|
||||||
|
temp_f20_2 = temp_s0->unk_20 + (temp_s0->unk_34 * shim_cos_deg(temp_f20));
|
||||||
|
t = shim_rand_int(100) + 10;
|
||||||
|
temp_f4 = temp_s0->unk_0C;
|
||||||
|
temp_f6 = temp_s0->unk_10;
|
||||||
|
temp_f8 = temp_s0->unk_14;
|
||||||
|
var_f24 = temp_f24 - temp_f4;
|
||||||
|
var_f22 = temp_f22 - temp_f6;
|
||||||
|
var_f20 = temp_f20_2 - temp_f8;
|
||||||
|
temp_s0->unk_30 = t;
|
||||||
|
if (var_f24 == 0.0f && var_f22 == 0.0f && var_f20 == 0.0f) {
|
||||||
|
var_f24 = temp_s0->unk_18 - temp_f4;
|
||||||
|
var_f22 = temp_s0->unk_1C - temp_f6;
|
||||||
|
var_f20 = temp_s0->unk_20 - temp_f8;
|
||||||
|
if (var_f24 == 0.0f && var_f22 == 0.0f && var_f20 == 0.0f) {
|
||||||
|
var_f24 = 1.0f;
|
||||||
|
var_f20 = 0.0f;
|
||||||
|
var_f22 = 0.0f;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var_f12 = SQ(var_f24) + SQ(var_f22) + SQ(var_f20);
|
||||||
|
if (var_f12 != 0.0f) {
|
||||||
|
var_f12 = 1.0f / shim_sqrtf(var_f12);
|
||||||
|
}
|
||||||
|
var_f24 *= var_f12;
|
||||||
|
var_f22 *= var_f12;
|
||||||
|
var_f20 *= var_f12;
|
||||||
|
temp_s0->unk_3C = var_f24;
|
||||||
|
temp_s0->unk_40 = var_f22;
|
||||||
|
temp_s0->unk_44 = var_f20;
|
||||||
|
temp_s0->unk_28 = shim_atan2(0.0f, 0.0f, -temp_s0->unk_3C, temp_s0->unk_44);
|
||||||
|
}
|
||||||
|
temp_s0->unk_2C += 3;
|
||||||
|
if (temp_s0->unk_2C >= 30) {
|
||||||
|
temp_s0->unk_2C -= 30;
|
||||||
|
}
|
||||||
|
temp_s0->unk_0C += temp_s0->unk_3C;
|
||||||
|
temp_s0->unk_10 += temp_s0->unk_40;
|
||||||
|
temp_s0->unk_14 += temp_s0->unk_44;
|
||||||
|
}
|
||||||
|
|
||||||
void butterflies_render(EffectInstance* effect) {
|
void butterflies_render(EffectInstance* effect) {
|
||||||
RenderTask renderTask;
|
RenderTask renderTask;
|
||||||
@ -27,4 +159,32 @@ void butterflies_render(EffectInstance* effect) {
|
|||||||
retTask->renderMode |= RENDER_MODE_2;
|
retTask->renderMode |= RENDER_MODE_2;
|
||||||
}
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "effects/butterflies", butterflies_appendGfx);
|
|
||||||
|
void butterflies_appendGfx(void* effect) {
|
||||||
|
EffectInstance* effectTemp = effect;
|
||||||
|
ButterflyFXData* data = effectTemp->data;
|
||||||
|
Matrix4f sp18;
|
||||||
|
Matrix4f sp58;
|
||||||
|
|
||||||
|
s32 primColor = data->unk_24;
|
||||||
|
s32 type = data->unk_00;
|
||||||
|
|
||||||
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
gSPSegment(gMasterGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data));
|
||||||
|
|
||||||
|
shim_guTranslateF(sp18, data->unk_0C, data->unk_10 + D_E00AA6EC[data->unk_2C] * 0.3f, data->unk_14);
|
||||||
|
shim_guRotateF(sp58, data->unk_28, 0.0f, 1.0f, 0.0f);
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
|
shim_guScaleF(sp58, 0.02f, 0.02f, 0.02f);
|
||||||
|
shim_guMtxCatF(sp58, sp18, sp18);
|
||||||
|
shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]);
|
||||||
|
|
||||||
|
gSPMatrix(gMasterGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
|
gDPSetPrimColor(gMasterGfxPos++, 0, 0, primColor, primColor, primColor, 255);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_09003880);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_E00AA6C0[type]);
|
||||||
|
gSPVertex(gMasterGfxPos++, &D_09002D40[data->unk_2C], 6, 0);
|
||||||
|
gSPDisplayList(gMasterGfxPos++, D_09003DC8);
|
||||||
|
gSPPopMatrix(gMasterGfxPos++, G_MTX_MODELVIEW);
|
||||||
|
gDPPipeSync(gMasterGfxPos++);
|
||||||
|
}
|
||||||
|
@ -23,7 +23,7 @@ void small_gold_sparkle_update(EffectInstance* effect);
|
|||||||
void small_gold_sparkle_render(EffectInstance* effect);
|
void small_gold_sparkle_render(EffectInstance* effect);
|
||||||
void small_gold_sparkle_appendGfx(void* effect);
|
void small_gold_sparkle_appendGfx(void* effect);
|
||||||
|
|
||||||
EffectInstance* small_gold_sparkle_main(EffectInstanceDataThing* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
EffectInstance* small_gold_sparkle_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) {
|
||||||
EffectBlueprint bp;
|
EffectBlueprint bp;
|
||||||
EffectInstance* effect;
|
EffectInstance* effect;
|
||||||
SmallGoldSparkleFXData* data;
|
SmallGoldSparkleFXData* data;
|
||||||
|
67
src/entity.c
67
src/entity.c
@ -8,6 +8,8 @@ extern EntityModelList gWorldEntityModelList;
|
|||||||
extern EntityModelList gBattleEntityModelList;
|
extern EntityModelList gBattleEntityModelList;
|
||||||
extern EntityModelList* gCurrentEntityModelList;
|
extern EntityModelList* gCurrentEntityModelList;
|
||||||
extern s32 gEntityModelCount;
|
extern s32 gEntityModelCount;
|
||||||
|
|
||||||
|
extern s32 D_80154374;
|
||||||
extern s32 entity_fog_enabled;
|
extern s32 entity_fog_enabled;
|
||||||
extern s32 entity_fog_red;
|
extern s32 entity_fog_red;
|
||||||
extern s32 entity_fog_green;
|
extern s32 entity_fog_green;
|
||||||
@ -16,6 +18,7 @@ extern s32 entity_fog_alpha;
|
|||||||
extern s32 entity_fog_dist_min;
|
extern s32 entity_fog_dist_min;
|
||||||
extern s32 entity_fog_dist_max;
|
extern s32 entity_fog_dist_max;
|
||||||
|
|
||||||
|
|
||||||
s32 step_entity_model_commandlist(EntityModel* entityModel);
|
s32 step_entity_model_commandlist(EntityModel* entityModel);
|
||||||
void free_entity_model_by_ref(EntityModel* entityModel);
|
void free_entity_model_by_ref(EntityModel* entityModel);
|
||||||
|
|
||||||
@ -214,15 +217,73 @@ void make_entity_model_mtx_flipZ(Matrix4f mtx) {
|
|||||||
mtx[3][3] = 1.0f;
|
mtx[3][3] = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void appendGfx_entity_model(void* data);
|
||||||
INCLUDE_ASM(s32, "entity", appendGfx_entity_model);
|
INCLUDE_ASM(s32, "entity", appendGfx_entity_model);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity", draw_entity_model_A);
|
INCLUDE_ASM(s32, "entity", draw_entity_model_A);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity", draw_entity_model_B);
|
INCLUDE_ASM(s32, "entity", draw_entity_model_B);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity", draw_entity_model_C);
|
void draw_entity_model_C(s32 modelIdx, Mtx* transformMtx) {
|
||||||
|
EntityModel* model;
|
||||||
|
RenderTask rt;
|
||||||
|
RenderTask* rtPtr = &rt;
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity", draw_entity_model_D);
|
if ((gGameStatusPtr->isBattle == 0) || (modelIdx & 0x800)) {
|
||||||
|
modelIdx &= ~0x800;
|
||||||
|
model = (*gCurrentEntityModelList)[modelIdx];
|
||||||
|
|
||||||
|
if (model != NULL) {
|
||||||
|
if (model->flags != 0) {
|
||||||
|
if (!(model->flags & MODEL_FLAGS_USE_CAMERA_UNK_MATRIX)) {
|
||||||
|
if (!(model->flags & MODEL_FLAGS_FLAG_20)) {
|
||||||
|
if (!(model->flags & MODEL_FLAGS_FLAG_40) && (model->flags & (1 << gCurrentCamID))) {
|
||||||
|
model->flags |= MODEL_FLAGS_FLAG_200;
|
||||||
|
model->transform = *transformMtx;
|
||||||
|
model->vertexArray = NULL;
|
||||||
|
rtPtr->renderMode = model->renderMode;
|
||||||
|
rtPtr->appendGfxArg = model;
|
||||||
|
rtPtr->appendGfx = appendGfx_entity_model;
|
||||||
|
rtPtr->distance = (u32)(model->flags & 0xF000) >> 8;
|
||||||
|
queue_render_task(rtPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void draw_entity_model_D(s32 modelIdx, Mtx* transformMtx, s32 arg2, Vtx* vertexArray) {
|
||||||
|
EntityModel* model;
|
||||||
|
RenderTask rt;
|
||||||
|
RenderTask* rtPtr = &rt;
|
||||||
|
|
||||||
|
if ((gGameStatusPtr->isBattle == 0) || (modelIdx & 0x800)) {
|
||||||
|
modelIdx &= ~0x800;
|
||||||
|
model = (*gCurrentEntityModelList)[modelIdx];
|
||||||
|
|
||||||
|
if (model != NULL) {
|
||||||
|
if (model->flags != 0) {
|
||||||
|
if (!(model->flags & MODEL_FLAGS_USE_CAMERA_UNK_MATRIX)) {
|
||||||
|
if (!(model->flags & MODEL_FLAGS_FLAG_20)) {
|
||||||
|
if (model->flags & (1 << gCurrentCamID)) {
|
||||||
|
model->flags |= MODEL_FLAGS_FLAG_200;
|
||||||
|
model->transform = *transformMtx;
|
||||||
|
D_80154374 = arg2;
|
||||||
|
model->vertexArray = vertexArray;
|
||||||
|
rtPtr->renderMode = model->renderMode;
|
||||||
|
rtPtr->appendGfxArg = model;
|
||||||
|
rtPtr->appendGfx = appendGfx_entity_model;
|
||||||
|
rtPtr->distance = (u32)(model->flags & 0xF000) >> 8;
|
||||||
|
queue_render_task(rtPtr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "entity", draw_entity_model_E);
|
INCLUDE_ASM(s32, "entity", draw_entity_model_E);
|
||||||
|
|
||||||
@ -373,7 +434,7 @@ void init_generic_entity_list(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 create_generic_entity_world(void (*updateFunc)(Evt*, s32), void (*drawFunc)(Evt*, s32)) {
|
s32 create_generic_entity_world(void (*updateFunc)(void), void (*drawFunc)(void)) {
|
||||||
s32 i;
|
s32 i;
|
||||||
DynamicEntity* newDynEntity;
|
DynamicEntity* newDynEntity;
|
||||||
|
|
||||||
|
@ -399,7 +399,7 @@ ApiStatus PlayEffect(Evt* script, s32 isInitialCall) {
|
|||||||
effectRet = fx_snowfall(iVar1, iVar2);
|
effectRet = fx_snowfall(iVar1, iVar2);
|
||||||
break;
|
break;
|
||||||
case EFFECT_46:
|
case EFFECT_46:
|
||||||
effectRet = fx_46(iVar1, (EffectWhirlwind*)a2, fVar3, iVar4);
|
effectRet = fx_46(iVar1, (EffectWhirlwindUnk*)a2, fVar3, iVar4);
|
||||||
break;
|
break;
|
||||||
case EFFECT_GATHER_MAGIC:
|
case EFFECT_GATHER_MAGIC:
|
||||||
effectRet = fx_gather_magic(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
effectRet = fx_gather_magic(iVar1, fVar2, fVar3, fVar4, fVar5, iVar6);
|
||||||
|
@ -332,7 +332,6 @@ void copy_world_hud_element_ref_to_battle(s32 worldID, s32 battleID);
|
|||||||
|
|
||||||
void hud_element_set_aux_cache(void* base, s32 size);
|
void hud_element_set_aux_cache(void* base, s32 size);
|
||||||
|
|
||||||
|
|
||||||
void create_popup_menu(PopupMenu*);
|
void create_popup_menu(PopupMenu*);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#include "common.h"
|
|
||||||
#include "stdlib/stdarg.h"
|
|
||||||
|
|
||||||
char spaces[] = " ";
|
|
||||||
char zeroes[] = "00000000000000000000000000000000";
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "os/3FEA0", _Printf);
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "os/3FEA0", _Putfld);
|
|
242
src/os/xprintf.c
Normal file
242
src/os/xprintf.c
Normal file
@ -0,0 +1,242 @@
|
|||||||
|
#include "stdlib/stdarg.h"
|
||||||
|
#include "xstdio.h"
|
||||||
|
#include "gcc/string.h"
|
||||||
|
|
||||||
|
#define isdigit(x) ((x >= '0' && x <= '9'))
|
||||||
|
#define LDSIGN(x) (((unsigned short *)&(x))[0] & 0x8000)
|
||||||
|
|
||||||
|
#define ATOI(dst, src) \
|
||||||
|
for (dst = 0; isdigit(*src); ++src) \
|
||||||
|
{ \
|
||||||
|
if (dst < 999) \
|
||||||
|
dst = dst * 10 + *src - '0'; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define MAX_PAD ((sizeof(spaces) - 1))
|
||||||
|
#define PAD(s, n) \
|
||||||
|
if (0 < (n)) \
|
||||||
|
{ \
|
||||||
|
int i, j = (n); \
|
||||||
|
for (; 0 < j; j -= i) \
|
||||||
|
{ \
|
||||||
|
i = MAX_PAD < (unsigned int)j ? (int)MAX_PAD : j; \
|
||||||
|
PUT(s, i); \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
#define PUT(s, n) \
|
||||||
|
if (0 < (n)) \
|
||||||
|
{ \
|
||||||
|
if ((arg = (*prout)(arg, s, n)) != NULL) \
|
||||||
|
x.nchar += (n); \
|
||||||
|
else \
|
||||||
|
return x.nchar; \
|
||||||
|
}
|
||||||
|
|
||||||
|
char spaces[] = " ";
|
||||||
|
char zeroes[] = "00000000000000000000000000000000";
|
||||||
|
|
||||||
|
// INCLUDE_ASM(s32, "os/3FEA0", _Printf);
|
||||||
|
|
||||||
|
// INCLUDE_ASM(s32, "os/3FEA0", _Putfld);
|
||||||
|
|
||||||
|
static void _Putfld(_Pft *pf, va_list *pap, char code, char *ac);
|
||||||
|
|
||||||
|
int _Printf(outfun prout, char *arg, const char *fmt, va_list args) {
|
||||||
|
_Pft x;
|
||||||
|
const char *s;
|
||||||
|
char c;
|
||||||
|
const char *t;
|
||||||
|
static const char fchar[] = {' ', '+', '-', '#', '0', '\0'};
|
||||||
|
static const int fbit[] = {FLAGS_SPACE, FLAGS_PLUS, FLAGS_MINUS, FLAGS_HASH, FLAGS_ZERO, 0};
|
||||||
|
char ac[32];
|
||||||
|
|
||||||
|
x.nchar = 0;
|
||||||
|
|
||||||
|
for (;;) {
|
||||||
|
s = fmt;
|
||||||
|
|
||||||
|
for (c = *s; c != 0 && c != '%';) {
|
||||||
|
c = *++s;
|
||||||
|
}
|
||||||
|
|
||||||
|
PUT(fmt, s - fmt);
|
||||||
|
|
||||||
|
if (c == 0) {
|
||||||
|
return x.nchar;
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt = ++s;
|
||||||
|
|
||||||
|
for (x.flags = 0; (t = strchr(fchar, *s)) != NULL; s++) {
|
||||||
|
x.flags |= fbit[t - fchar];
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*s == '*') {
|
||||||
|
x.width = va_arg(args, int);
|
||||||
|
|
||||||
|
if (x.width < 0) {
|
||||||
|
x.width = -x.width;
|
||||||
|
x.flags |= FLAGS_MINUS;
|
||||||
|
}
|
||||||
|
s++;
|
||||||
|
} else {
|
||||||
|
ATOI(x.width, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*s != '.') {
|
||||||
|
x.prec = -1;
|
||||||
|
} else if (*++s == '*') {
|
||||||
|
x.prec = va_arg(args, int);
|
||||||
|
++s;
|
||||||
|
} else {
|
||||||
|
ATOI(x.prec, s);
|
||||||
|
}
|
||||||
|
|
||||||
|
x.qual = strchr("hlL", *s) ? *s++ : '\0';
|
||||||
|
|
||||||
|
if (x.qual == 'l' && *s == 'l') {
|
||||||
|
x.qual = 'L';
|
||||||
|
++s;
|
||||||
|
}
|
||||||
|
|
||||||
|
_Putfld(&x, &args, *s, ac);
|
||||||
|
x.width -= x.n0 + x.nz0 + x.n1 + x.nz1 + x.n2 + x.nz2;
|
||||||
|
|
||||||
|
if (!(x.flags & FLAGS_MINUS)) {
|
||||||
|
PAD(spaces, x.width);
|
||||||
|
}
|
||||||
|
|
||||||
|
PUT(ac, x.n0);
|
||||||
|
PAD(zeroes, x.nz0);
|
||||||
|
PUT(x.s, x.n1);
|
||||||
|
PAD(zeroes, x.nz1);
|
||||||
|
PUT(x.s + x.n1, x.n2);
|
||||||
|
PAD(zeroes, x.nz2);
|
||||||
|
|
||||||
|
if (x.flags & FLAGS_MINUS) {
|
||||||
|
PAD(spaces, x.width);
|
||||||
|
}
|
||||||
|
|
||||||
|
fmt = s + 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void _Putfld(_Pft *x, va_list *args, char type, char *buff) {
|
||||||
|
x->n0 = x->nz0 = x->n1 = x->nz1 = x->n2 =
|
||||||
|
x->nz2 = 0;
|
||||||
|
|
||||||
|
switch (type) {
|
||||||
|
case 'c':
|
||||||
|
buff[x->n0++] = va_arg(*args, int);
|
||||||
|
break;
|
||||||
|
case 'd':
|
||||||
|
case 'i':
|
||||||
|
if (x->qual == 'l') {
|
||||||
|
x->v.ll = va_arg(*args, int);
|
||||||
|
} else if (x->qual == 'L') {
|
||||||
|
x->v.ll = va_arg(*args, s64);
|
||||||
|
} else {
|
||||||
|
x->v.ll = va_arg(*args, int);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x->qual == 'h') {
|
||||||
|
x->v.ll = (s16)x->v.ll;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x->v.ll < 0) {
|
||||||
|
buff[x->n0++] = '-';
|
||||||
|
} else if (x->flags & FLAGS_PLUS) {
|
||||||
|
buff[x->n0++] = '+';
|
||||||
|
} else if (x->flags & FLAGS_SPACE) {
|
||||||
|
buff[x->n0++] = ' ';
|
||||||
|
}
|
||||||
|
|
||||||
|
x->s = (char *)&buff[x->n0];
|
||||||
|
|
||||||
|
_Litob(x, type);
|
||||||
|
break;
|
||||||
|
case 'x':
|
||||||
|
case 'X':
|
||||||
|
case 'u':
|
||||||
|
case 'o':
|
||||||
|
if (x->qual == 'l') {
|
||||||
|
x->v.ll = va_arg(*args, int);
|
||||||
|
} else if (x->qual == 'L') {
|
||||||
|
x->v.ll = va_arg(*args, s64);
|
||||||
|
} else {
|
||||||
|
x->v.ll = va_arg(*args, int);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x->qual == 'h') {
|
||||||
|
x->v.ll = (u16)x->v.ll;
|
||||||
|
} else if (x->qual == 0) {
|
||||||
|
x->v.ll = (unsigned int)x->v.ll;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x->flags & FLAGS_HASH) {
|
||||||
|
buff[x->n0++] = '0';
|
||||||
|
|
||||||
|
if (type == 'x' || type == 'X') {
|
||||||
|
buff[x->n0++] = type;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
x->s = (char *)&buff[x->n0];
|
||||||
|
_Litob(x, type);
|
||||||
|
break;
|
||||||
|
case 'e':
|
||||||
|
case 'f':
|
||||||
|
case 'g':
|
||||||
|
case 'E':
|
||||||
|
case 'G':
|
||||||
|
//... okay?
|
||||||
|
x->v.ld = x->qual == 'L' ? va_arg(*args, f64) : va_arg(*args, f64);
|
||||||
|
|
||||||
|
if (LDSIGN(x->v.ld))
|
||||||
|
buff[x->n0++] = '-';
|
||||||
|
else if (x->flags & FLAGS_PLUS)
|
||||||
|
buff[x->n0++] = '+';
|
||||||
|
else if (x->flags & FLAGS_SPACE)
|
||||||
|
buff[x->n0++] = ' ';
|
||||||
|
|
||||||
|
x->s = (char *)&buff[x->n0];
|
||||||
|
_Ldtob(x, type);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
if (x->qual == 'h') {
|
||||||
|
*(va_arg(*args, u16 *)) = x->nchar;
|
||||||
|
} else if (x->qual == 'l') {
|
||||||
|
*va_arg(*args, unsigned int *) = x->nchar;
|
||||||
|
} else if (x->qual == 'L') {
|
||||||
|
*va_arg(*args, u64 *) = x->nchar;
|
||||||
|
} else {
|
||||||
|
*va_arg(*args, unsigned int *) = x->nchar;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case 'p':
|
||||||
|
x->v.ll = (long)va_arg(*args, void *);
|
||||||
|
x->s = (char *)&buff[x->n0];
|
||||||
|
_Litob(x, 'x');
|
||||||
|
break;
|
||||||
|
case 's':
|
||||||
|
x->s = va_arg(*args, char *);
|
||||||
|
x->n1 = strlen(x->s);
|
||||||
|
|
||||||
|
if (x->prec >= 0 && x->n1 > x->prec) {
|
||||||
|
x->n1 = x->prec;
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case '%':
|
||||||
|
buff[x->n0++] = '%';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
buff[x->n0++] = type;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static const f32 padding = 0.0f;
|
@ -15,7 +15,7 @@ void func_802B6000_E25D60(void) {
|
|||||||
s32 phi_s2, phi_s3, phi_s4;
|
s32 phi_s2, phi_s3, phi_s4;
|
||||||
s32 temp_v1_2;
|
s32 temp_v1_2;
|
||||||
s32 phi_s5 = 0;
|
s32 phi_s5 = 0;
|
||||||
|
|
||||||
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
if (playerStatus->flags & PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED) {
|
||||||
playerStatus->flags &= ~(PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED | PLAYER_STATUS_FLAGS_80000);
|
playerStatus->flags &= ~(PLAYER_STATUS_FLAGS_ACTION_STATE_CHANGED | PLAYER_STATUS_FLAGS_80000);
|
||||||
playerStatus->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_40000;
|
playerStatus->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_40000;
|
||||||
@ -50,7 +50,7 @@ void func_802B6000_E25D60(void) {
|
|||||||
if (is_ability_active(ABILITY_DIZZY_ATTACK)) {
|
if (is_ability_active(ABILITY_DIZZY_ATTACK)) {
|
||||||
phi_s2 = phi_s2 | 2;
|
phi_s2 = phi_s2 | 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_ability_active(ABILITY_SPEEDY_SPIN)) {
|
if (is_ability_active(ABILITY_SPEEDY_SPIN)) {
|
||||||
playerSpinState->initialSpinTime = 30;
|
playerSpinState->initialSpinTime = 30;
|
||||||
playerSpinState->spinRate = 40.0f;
|
playerSpinState->spinRate = 40.0f;
|
||||||
@ -60,10 +60,10 @@ void func_802B6000_E25D60(void) {
|
|||||||
playerSpinState->frictionScale = 0.9f;
|
playerSpinState->frictionScale = 0.9f;
|
||||||
phi_s2 |= 1;
|
phi_s2 |= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
phi_s4 = -1;
|
phi_s4 = -1;
|
||||||
phi_s3 = 0x10010;
|
phi_s3 = 0x10010;
|
||||||
|
|
||||||
if (phi_s2) {
|
if (phi_s2) {
|
||||||
if (phi_s2 & 4) {
|
if (phi_s2 & 4) {
|
||||||
phi_s4 = 2;
|
phi_s4 = 2;
|
||||||
@ -75,10 +75,10 @@ void func_802B6000_E25D60(void) {
|
|||||||
phi_s3 = 0x10011;
|
phi_s3 = 0x10011;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
playerSpinState->spinSoundID = SOUND_2111;
|
playerSpinState->spinSoundID = SOUND_2111;
|
||||||
temp_v1_2 = phi_s2 & ~2;
|
temp_v1_2 = phi_s2 & ~2;
|
||||||
|
|
||||||
if (temp_v1_2 == 4) {
|
if (temp_v1_2 == 4) {
|
||||||
playerSpinState->spinSoundID = SOUND_2113;
|
playerSpinState->spinSoundID = SOUND_2113;
|
||||||
}
|
}
|
||||||
@ -88,10 +88,10 @@ void func_802B6000_E25D60(void) {
|
|||||||
if (temp_v1_2 == 5) {
|
if (temp_v1_2 == 5) {
|
||||||
playerSpinState->spinSoundID = SOUND_2114;
|
playerSpinState->spinSoundID = SOUND_2114;
|
||||||
}
|
}
|
||||||
|
|
||||||
sfx_play_sound_at_player(playerSpinState->spinSoundID, 0);
|
sfx_play_sound_at_player(playerSpinState->spinSoundID, 0);
|
||||||
suggest_player_anim_setUnkFlag(phi_s3);
|
suggest_player_anim_setUnkFlag(phi_s3);
|
||||||
|
|
||||||
if ((clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw) <= 180.0f)) {
|
if ((clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw) <= 180.0f)) {
|
||||||
playerStatus->spinRate = playerSpinState->spinRate;
|
playerStatus->spinRate = playerSpinState->spinRate;
|
||||||
} else {
|
} else {
|
||||||
@ -99,31 +99,31 @@ void func_802B6000_E25D60(void) {
|
|||||||
playerStatus->spinRate = -playerSpinState->spinRate;
|
playerStatus->spinRate = -playerSpinState->spinRate;
|
||||||
}
|
}
|
||||||
if (phi_s2 != 0) {
|
if (phi_s2 != 0) {
|
||||||
playerStatus->unk_D8 = (void*)fx_46(phi_s4, (EffectWhirlwind* ) playerStatus, 1.0f, 1000);
|
playerStatus->unk_D8 = fx_46(phi_s4, playerStatus, 1.0f, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
phys_clear_spin_history();
|
phys_clear_spin_history();
|
||||||
player_input_to_move_vector(&sp10, &sp14);
|
player_input_to_move_vector(&sp10, &sp14);
|
||||||
playerStatus->targetYaw = sp10;
|
playerStatus->targetYaw = sp10;
|
||||||
playerSpinState->inputMagnitude = sp14;
|
playerSpinState->inputMagnitude = sp14;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSpinHistoryPosAngle[gSpinHistoryBufferPos++] = playerStatus->spriteFacingAngle;
|
gSpinHistoryPosAngle[gSpinHistoryBufferPos++] = playerStatus->spriteFacingAngle;
|
||||||
|
|
||||||
if (gSpinHistoryBufferPos >= 6) {
|
if (gSpinHistoryBufferPos >= 6) {
|
||||||
gSpinHistoryBufferPos = 0;
|
gSpinHistoryBufferPos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
gSpinHistoryPosX[gSpinHistoryBufferPos] = playerStatus->position.x;
|
gSpinHistoryPosX[gSpinHistoryBufferPos] = playerStatus->position.x;
|
||||||
gSpinHistoryPosY[gSpinHistoryBufferPos] = playerStatus->position.y;
|
gSpinHistoryPosY[gSpinHistoryBufferPos] = playerStatus->position.y;
|
||||||
gSpinHistoryPosZ[gSpinHistoryBufferPos] = playerStatus->position.z;
|
gSpinHistoryPosZ[gSpinHistoryBufferPos] = playerStatus->position.z;
|
||||||
gSpinHistoryPosAngle[gSpinHistoryBufferPos] = playerStatus->spriteFacingAngle;
|
gSpinHistoryPosAngle[gSpinHistoryBufferPos] = playerStatus->spriteFacingAngle;
|
||||||
gSpinHistoryBufferPos++;
|
gSpinHistoryBufferPos++;
|
||||||
|
|
||||||
if (gSpinHistoryBufferPos >= 6) {
|
if (gSpinHistoryBufferPos >= 6) {
|
||||||
gSpinHistoryBufferPos = 0;
|
gSpinHistoryBufferPos = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phi_s5 == 0 && (check_input_hammer() || check_input_jump())) {
|
if (phi_s5 == 0 && (check_input_hammer() || check_input_jump())) {
|
||||||
playerStatus->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_SPINNING;
|
playerStatus->animFlags &= ~PLAYER_STATUS_ANIM_FLAGS_SPINNING;
|
||||||
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_20000;
|
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_20000;
|
||||||
@ -132,20 +132,20 @@ void func_802B6000_E25D60(void) {
|
|||||||
playerStatus->targetYaw = sp10;
|
playerStatus->targetYaw = sp10;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerSpinState->spinCountdown < 11 && playerStatus->pressedButtons & Z_TRIG) {
|
if (playerSpinState->spinCountdown < 11 && playerStatus->pressedButtons & Z_TRIG) {
|
||||||
playerSpinState->hasBufferedSpin = 1;
|
playerSpinState->hasBufferedSpin = 1;
|
||||||
playerSpinState->prevActionState = playerStatus->prevActionState;
|
playerSpinState->prevActionState = playerStatus->prevActionState;
|
||||||
playerSpinState->bufferedStickAxis.x = playerStatus->stickAxis[0];
|
playerSpinState->bufferedStickAxis.x = playerStatus->stickAxis[0];
|
||||||
playerSpinState->bufferedStickAxis.y = playerStatus->stickAxis[1];
|
playerSpinState->bufferedStickAxis.y = playerStatus->stickAxis[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->fallState >= 2) {
|
if (playerStatus->fallState >= 2) {
|
||||||
playerSpinState->spinDirectionMagnitude = playerSpinState->spinDirectionMagnitude - 1.0f;;
|
playerSpinState->spinDirectionMagnitude = playerSpinState->spinDirectionMagnitude - 1.0f;;
|
||||||
if (playerSpinState->spinDirectionMagnitude < 0.0f) {
|
if (playerSpinState->spinDirectionMagnitude < 0.0f) {
|
||||||
playerSpinState->spinDirectionMagnitude = 0.0f;
|
playerSpinState->spinDirectionMagnitude = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp10 = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
sp10 = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
||||||
playerSpinState->spinDirection.x = sin_rad(sp10 * TAU / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
playerSpinState->spinDirection.x = sin_rad(sp10 * TAU / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
||||||
playerSpinState->spinDirection.y = -cos_rad((sp10 * TAU) / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
playerSpinState->spinDirection.y = -cos_rad((sp10 * TAU) / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
||||||
@ -160,7 +160,7 @@ void func_802B6000_E25D60(void) {
|
|||||||
playerStatus->currentSpeed = 0.0f;
|
playerStatus->currentSpeed = 0.0f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->fallState == 0) {
|
if (playerStatus->fallState == 0) {
|
||||||
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_40000) {
|
if (playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_40000) {
|
||||||
playerStatus->fallState = 1;
|
playerStatus->fallState = 1;
|
||||||
@ -171,15 +171,15 @@ void func_802B6000_E25D60(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(playerStatus->currentStateTime > playerSpinState->fullSpeedSpinTime)) {
|
if (!(playerStatus->currentStateTime > playerSpinState->fullSpeedSpinTime)) {
|
||||||
temp_f24 = (playerSpinState->inputMagnitude) ? playerSpinState->speedScale : 0.0f;
|
temp_f24 = (playerSpinState->inputMagnitude) ? playerSpinState->speedScale : 0.0f;
|
||||||
playerSpinState->spinDirectionMagnitude = playerSpinState->spinDirectionMagnitude + 0.9;
|
playerSpinState->spinDirectionMagnitude = playerSpinState->spinDirectionMagnitude + 0.9;
|
||||||
|
|
||||||
if (playerSpinState->spinDirectionMagnitude > 9.0f) {
|
if (playerSpinState->spinDirectionMagnitude > 9.0f) {
|
||||||
playerSpinState->spinDirectionMagnitude = 9.0f;
|
playerSpinState->spinDirectionMagnitude = 9.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp10 = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
sp10 = clamp_angle(playerStatus->targetYaw - gCameras[gCurrentCameraID].currentYaw);
|
||||||
playerSpinState->spinDirection.x = sin_rad(sp10 * TAU / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
playerSpinState->spinDirection.x = sin_rad(sp10 * TAU / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
||||||
playerSpinState->spinDirection.y = -cos_rad(sp10 * TAU / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
playerSpinState->spinDirection.y = -cos_rad(sp10 * TAU / 360.0f) * playerSpinState->spinDirectionMagnitude;
|
||||||
@ -188,19 +188,19 @@ void func_802B6000_E25D60(void) {
|
|||||||
if (temp_f24 < 0.1) {
|
if (temp_f24 < 0.1) {
|
||||||
temp_f24 = 0.1f;
|
temp_f24 = 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerSpinState->inputMagnitude == 0.0f) {
|
if (playerSpinState->inputMagnitude == 0.0f) {
|
||||||
temp_f24 = 0.0f;
|
temp_f24 = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
playerSpinState->spinDirectionMagnitude -= 1.0f;
|
playerSpinState->spinDirectionMagnitude -= 1.0f;
|
||||||
if (playerSpinState->spinDirectionMagnitude < 0.0f) {
|
if (playerSpinState->spinDirectionMagnitude < 0.0f) {
|
||||||
playerSpinState->spinDirectionMagnitude = 0.0f;
|
playerSpinState->spinDirectionMagnitude = 0.0f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
playerStatus->currentStateTime++;
|
playerStatus->currentStateTime++;
|
||||||
|
|
||||||
switch (playerStatus->prevActionState) {
|
switch (playerStatus->prevActionState) {
|
||||||
case 0:
|
case 0:
|
||||||
player_input_to_move_vector(&sp10, &sp14);
|
player_input_to_move_vector(&sp10, &sp14);
|
||||||
@ -228,11 +228,11 @@ void func_802B6000_E25D60(void) {
|
|||||||
playerStatus->fallState = 1;
|
playerStatus->fallState = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (playerStatus->fallState == 1) {
|
if (playerStatus->fallState == 1) {
|
||||||
sp10 = playerStatus->spriteFacingAngle;
|
sp10 = playerStatus->spriteFacingAngle;
|
||||||
playerStatus->spriteFacingAngle = sp10 + playerStatus->spinRate;
|
playerStatus->spriteFacingAngle = sp10 + playerStatus->spinRate;
|
||||||
|
|
||||||
if (playerSpinState->hasBufferedSpin != 0) {
|
if (playerSpinState->hasBufferedSpin != 0) {
|
||||||
playerStatus->currentStateTime = 2;
|
playerStatus->currentStateTime = 2;
|
||||||
playerStatus->fallState = 2;
|
playerStatus->fallState = 2;
|
||||||
|
@ -34,13 +34,6 @@ enum {
|
|||||||
|
|
||||||
// BSS
|
// BSS
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
s32 flags;
|
|
||||||
char unk_04[0x4];
|
|
||||||
s32 unk_08;
|
|
||||||
EffectInstanceDataThing* unk_0C;
|
|
||||||
} N(temp);
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
s32 unk_00;
|
s32 unk_00;
|
||||||
f32 unk_04;
|
f32 unk_04;
|
||||||
@ -57,7 +50,7 @@ static s8 N(pad_D_8024EF80)[0x4];
|
|||||||
static f32 N(D_8024EF84);
|
static f32 N(D_8024EF84);
|
||||||
static s32 N(D_8024EF88);
|
static s32 N(D_8024EF88);
|
||||||
static s8 N(pad_D_8024EF8C)[0x4];
|
static s8 N(pad_D_8024EF8C)[0x4];
|
||||||
static N(temp)* N(D_8024EF90)[4]; // possibly bigger?
|
static EffectInstance* N(D_8024EF90)[4]; // possibly bigger?
|
||||||
static s32 N(Quizmo_Worker);
|
static s32 N(Quizmo_Worker);
|
||||||
static s32 N(pad_D_8024EFA4);
|
static s32 N(pad_D_8024EFA4);
|
||||||
static s32 N(Quizmo_ScriptArray)[4];
|
static s32 N(Quizmo_ScriptArray)[4];
|
||||||
|
@ -5,30 +5,14 @@
|
|||||||
|
|
||||||
#include "world/common/SpawnSunEffect.inc.c"
|
#include "world/common/SpawnSunEffect.inc.c"
|
||||||
|
|
||||||
typedef struct N(unk_effect) {
|
|
||||||
char unk_00[0x38];
|
|
||||||
s32 unk_38;
|
|
||||||
s32 unk_3C;
|
|
||||||
s32 unk_40;
|
|
||||||
char unk_44[0x4];
|
|
||||||
s32 unk_48;
|
|
||||||
s32 unk_4C;
|
|
||||||
s32 unk_50;
|
|
||||||
} N(unk_effect);
|
|
||||||
|
|
||||||
typedef struct N(temp) {
|
|
||||||
char unk_00[0xC];
|
|
||||||
N(unk_effect)* unk_0C;
|
|
||||||
} N(temp);
|
|
||||||
|
|
||||||
ApiStatus N(func_80240344_CAC534)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_80240344_CAC534)(Evt* script, s32 isInitialCall) {
|
||||||
N(temp)* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0);
|
EffectInstance* effect = fx_misc_particles(3, -272.0f, 80.0f, 20.0f, 200.0f, 120.0f, 4.0f, 8, 0);
|
||||||
|
|
||||||
effect->unk_0C->unk_38 = 0xF0;
|
((MiscParticlesFXData*)effect->data)->unk_38 = 240;
|
||||||
effect->unk_0C->unk_3C = 0xF0;
|
((MiscParticlesFXData*)effect->data)->unk_3C = 240;
|
||||||
effect->unk_0C->unk_40 = 0xF0;
|
((MiscParticlesFXData*)effect->data)->unk_40 = 240;
|
||||||
effect->unk_0C->unk_48 = 0xE6;
|
((MiscParticlesFXData*)effect->data)->unk_48 = 230;
|
||||||
effect->unk_0C->unk_4C = 0xE6;
|
((MiscParticlesFXData*)effect->data)->unk_4C = 230;
|
||||||
effect->unk_0C->unk_50 = 0xF0;
|
((MiscParticlesFXData*)effect->data)->unk_50 = 240;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -613,8 +613,6 @@ ApiStatus N(func_8024046C_CCB77C)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
// graphics macros
|
// graphics macros
|
||||||
#ifdef NON_EQUIVALENT
|
#ifdef NON_EQUIVALENT
|
||||||
s32 mdl_get_copied_gfx(s32);
|
|
||||||
void mdl_get_copied_vertices(s32, s32*, s32*, s32*);
|
|
||||||
void guMtxF2L(Matrix4f, Mtx* m);
|
void guMtxF2L(Matrix4f, Mtx* m);
|
||||||
void guMtxIdentF(Matrix4f);
|
void guMtxIdentF(Matrix4f);
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include "sprite/npc/lakitu.h"
|
#include "sprite/npc/lakitu.h"
|
||||||
#include "sprite/npc/magikoopa.h"
|
#include "sprite/npc/magikoopa.h"
|
||||||
#include "sprite/npc/world_lakilester.h"
|
#include "sprite/npc/world_lakilester.h"
|
||||||
|
#include "effects.h"
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
NPC_LAKITU0,
|
NPC_LAKITU0,
|
||||||
@ -964,7 +965,7 @@ NpcSettings N(npcSettings_80243F10) = {
|
|||||||
.onHit = &EnemyNpcHit,
|
.onHit = &EnemyNpcHit,
|
||||||
.onDefeat = &EnemyNpcDefeat,
|
.onDefeat = &EnemyNpcDefeat,
|
||||||
.level = 20,
|
.level = 20,
|
||||||
};
|
};
|
||||||
|
|
||||||
NpcSettings N(npcSettings_80243F3C) = {
|
NpcSettings N(npcSettings_80243F3C) = {
|
||||||
.height = 34,
|
.height = 34,
|
||||||
@ -1736,42 +1737,27 @@ static s32 N(pad_66B4)[] = {
|
|||||||
|
|
||||||
// It seems like fx_sun was not properly defined for this file. Having a proper
|
// It seems like fx_sun was not properly defined for this file. Having a proper
|
||||||
// declaration makes it not match.
|
// declaration makes it not match.
|
||||||
|
|
||||||
#ifdef AVOID_UB
|
#ifdef AVOID_UB
|
||||||
void fx_sun(s32, f32, f32, f32, f32, s32);
|
void fx_sun_undeclared(s32, f32, f32, f32, f32, s32);
|
||||||
#else
|
#else
|
||||||
void fx_sun(s32, s32, s32, s32, s32, s32);
|
void fx_sun_undeclared(s32, s32, s32, s32, s32, s32);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_8024030C_CDC9AC)(Evt* script, s32 isInitialCall) {
|
||||||
fx_sun(1, 0, 0, 0, 0, 0);
|
fx_sun_undeclared(1, 0, 0, 0, 0, 0);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct N(unk_effect) {
|
|
||||||
char unk_00[0x30];
|
|
||||||
s32 unk_30;
|
|
||||||
s32 unk_34;
|
|
||||||
s32 unk_38;
|
|
||||||
char unk_3C[0x4];
|
|
||||||
s32 unk_40;
|
|
||||||
s32 unk_44;
|
|
||||||
s32 unk_48;
|
|
||||||
} N(unk_effect);
|
|
||||||
|
|
||||||
typedef struct N(temp) {
|
|
||||||
char unk_00[0xC];
|
|
||||||
N(unk_effect)* unk_0C;
|
|
||||||
} N(temp);
|
|
||||||
|
|
||||||
ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_80240340_CDC9E0)(Evt* script, s32 isInitialCall) {
|
||||||
N(temp)* ptr = (N(temp)*) script->varTable[15];
|
EffectInstance* effect = (EffectInstance*) script->varTable[15];
|
||||||
|
|
||||||
ptr->unk_0C->unk_30 = 69;
|
((LightningFXData*)effect->data)->unk_30 = 69;
|
||||||
ptr->unk_0C->unk_34 = 255;
|
((LightningFXData*)effect->data)->unk_34 = 255;
|
||||||
ptr->unk_0C->unk_38 = 217;
|
((LightningFXData*)effect->data)->unk_38 = 217;
|
||||||
ptr->unk_0C->unk_40 = 176;
|
((LightningFXData*)effect->data)->unk_40 = 176;
|
||||||
ptr->unk_0C->unk_44 = 254;
|
((LightningFXData*)effect->data)->unk_44 = 254;
|
||||||
ptr->unk_0C->unk_48 = 124;
|
((LightningFXData*)effect->data)->unk_48 = 124;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,16 +4,31 @@ static char* N(exit_str_0) = "jan_01";
|
|||||||
static char* N(exit_str_1) = "jan_08";
|
static char* N(exit_str_1) = "jan_08";
|
||||||
static char* N(exit_str_2) = "mac_06";
|
static char* N(exit_str_2) = "mac_06";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_802411A0_B216E0);
|
extern u32 N(unkAngle1);
|
||||||
|
extern s32 N(unkAngle2);
|
||||||
|
extern s32 N(unkAngle3);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_802411EC_B2172C);
|
void N(unkVtxFunc001)(Vtx* firstVertex, Vtx* copiedVertices, s32 numVertices, s32* arg3);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_80241338_B21878);
|
#include "world/common/resolve_npc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_802415B0_B21AF0);
|
#include "world/common/UnkAngleFunc001.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_80241654_B21B94);
|
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", jan_00_unkVtxFunc001);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_802416F8_B21C38);
|
#include "world/common/unkAngleFuncs023.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_jan/jan_00/B216E0", func_80241868_B21DA8);
|
#include "world/common/UnkFloatFunc001.inc.c"
|
||||||
|
|
||||||
|
ApiStatus func_80241868_B21DA8(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* player = get_npc_safe(ACTOR_PLAYER);
|
||||||
|
f32 yaw = -player->yaw;
|
||||||
|
f32 x = player->pos.x + 30.0f + (sin_deg(yaw) * 170.0f);
|
||||||
|
f32 z = player->pos.z + (cos_deg(yaw) * 170.0f);
|
||||||
|
f32 y = player->pos.y + 50.0f;
|
||||||
|
|
||||||
|
evt_set_float_variable(script, EVT_VAR(0), x);
|
||||||
|
evt_set_float_variable(script, EVT_VAR(1), y);
|
||||||
|
evt_set_float_variable(script, EVT_VAR(2), z);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#include "kgr_01.h"
|
#include "kgr_01.h"
|
||||||
|
|
||||||
void mdl_get_copied_vertices(s32 copyIndex, Vtx** firstVertex, Vtx** copiedVertices, s32* numCopied);
|
|
||||||
Gfx* mdl_get_copied_gfx(s32 copyIndex);
|
|
||||||
|
|
||||||
#define TONGUE_WIGGLE_RATE 10
|
#define TONGUE_WIGGLE_RATE 10
|
||||||
|
|
||||||
extern u16 N(TongueWiggleTime); // tongue wiggle rate
|
extern u16 N(TongueWiggleTime); // tongue wiggle rate
|
||||||
@ -16,7 +13,7 @@ void N(add_tongue_deformation)(Vtx* src, Vtx* dest, s32 numVertices, s32 time) {
|
|||||||
s32 offset;
|
s32 offset;
|
||||||
s32 pct;
|
s32 pct;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
for (i = 0; i < numVertices; i++) {
|
for (i = 0; i < numVertices; i++) {
|
||||||
vs = &src[i].v;
|
vs = &src[i].v;
|
||||||
vd = &dest[i].v;
|
vd = &dest[i].v;
|
||||||
@ -61,7 +58,7 @@ void N(make_tongue_gfx)(s32 index) {
|
|||||||
Vtx* vtxSrc;
|
Vtx* vtxSrc;
|
||||||
Vtx* vtxCopy;
|
Vtx* vtxCopy;
|
||||||
s32 numCopied;
|
s32 numCopied;
|
||||||
|
|
||||||
mdl_get_copied_vertices(1, &vtxSrc, &vtxCopy, &numCopied);
|
mdl_get_copied_vertices(1, &vtxSrc, &vtxCopy, &numCopied);
|
||||||
N(add_tongue_deformation)(vtxSrc, vtxCopy, numCopied, N(TongueWiggleTime));
|
N(add_tongue_deformation)(vtxSrc, vtxCopy, numCopied, N(TongueWiggleTime));
|
||||||
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||||
@ -74,10 +71,10 @@ void N(make_tongue_gfx)(s32 index) {
|
|||||||
// ignoring minor undulations and deformation imposed by the player.
|
// ignoring minor undulations and deformation imposed by the player.
|
||||||
ApiStatus N(GetEffectiveTongueOffset)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(GetEffectiveTongueOffset)(Evt* script, s32 isInitialCall) {
|
||||||
f32 amplitude = 2.0f * sin_rad(
|
f32 amplitude = 2.0f * sin_rad(
|
||||||
(f32)script->varTable[0] * 0.06 +
|
(f32)script->varTable[0] * 0.06 +
|
||||||
(f32)script->varTable[2] * 0.03f +
|
(f32)script->varTable[2] * 0.03f +
|
||||||
(f32)N(TongueWiggleTime) * 0.01f);
|
(f32)N(TongueWiggleTime) * 0.01f);
|
||||||
|
|
||||||
f32 percent = 200.0f - (f32)script->varTable[0];
|
f32 percent = 200.0f - (f32)script->varTable[0];
|
||||||
if (percent < 0.0f){
|
if (percent < 0.0f){
|
||||||
percent = 0.0f;
|
percent = 0.0f;
|
||||||
|
@ -61,7 +61,8 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_802427EC_8B285C);
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_8024280C_8B287C);
|
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_8024280C_8B287C);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_02/8B0070", func_80242860_8B28D0);
|
#define UNK_NPC_POS_FUNC_NUM 7
|
||||||
|
#include "world/common/UnkNpcPosFunc.inc.c"
|
||||||
|
|
||||||
#include "world/common/SyncStatusMenu.inc.c"
|
#include "world/common/SyncStatusMenu.inc.c"
|
||||||
|
|
||||||
|
@ -6,4 +6,5 @@ INCLUDE_ASM(s32, "world/area_kmr/kmr_11/8DA3A0", func_80240344_8DA444);
|
|||||||
|
|
||||||
#include "world/common/enemy/StationaryAI.inc.c"
|
#include "world/common/enemy/StationaryAI.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kmr/kmr_11/8DA3A0", func_80240DDC_8DAEDC);
|
#define UNK_NPC_POS_FUNC_NUM 4
|
||||||
|
#include "world/common/UnkNpcPosFunc.inc.c"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#include "kzn_06.h"
|
#include "kzn_06.h"
|
||||||
|
#include "model.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_kzn/kzn_06/C6CD10", func_802403F0_C6CD10);
|
INCLUDE_ASM(s32, "world/area_kzn/kzn_06/C6CD10", func_802403F0_C6CD10);
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@ static char* N(exit_str_1) = "kgr_01";
|
|||||||
|
|
||||||
#include "world/common/atomic/TexturePan.inc.c"
|
#include "world/common/atomic/TexturePan.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024030C_85247C);
|
#define NAMESPACE dup_mac_05
|
||||||
|
#include "world/common/UnkFloatFunc001.inc.c"
|
||||||
|
#define NAMESPACE mac_05
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024047C_8525EC);
|
INCLUDE_ASM(s32, "world/area_mac/mac_05/852170", func_8024047C_8525EC);
|
||||||
|
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
#include "mac_05.h"
|
#include "mac_05.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_802433F0_855560);
|
extern u32 N(unkAngle1);
|
||||||
|
extern s32 N(unkAngle2);
|
||||||
|
extern s32 N(unkAngle3);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_8024343C_8555AC);
|
void N(unkVtxFunc001)(Vtx* firstVertex, Vtx* copiedVertices, s32 numVertices, s32* arg3);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_80243588_8556F8);
|
#include "world/common/resolve_npc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_80243800_855970);
|
#include "world/common/UnkAngleFunc001.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_802438A4_855A14);
|
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", mac_05_unkVtxFunc001);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_80243948_855AB8);
|
#include "world/common/unkAngleFuncs023.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_05/855560", func_80243AB8_855C28);
|
#include "world/common/UnkFloatFunc001.inc.c"
|
||||||
|
|
||||||
|
#include "world/common/UnkPlayerPosFunc.inc.c"
|
||||||
|
|
||||||
#include "world/common/PlayFX3D.inc.c"
|
#include "world/common/PlayFX3D.inc.c"
|
||||||
|
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
#include "world/common/atomic/TexturePan.inc.c"
|
#include "world/common/atomic/TexturePan.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/864B40", func_8024030C_864E4C);
|
#define NAMESPACE dup_mac_06
|
||||||
|
#include "world/common/UnkFloatFunc001.inc.c"
|
||||||
|
#define NAMESPACE mac_06
|
||||||
|
|
||||||
#include "world/common/SpawnSunEffect.inc.c"
|
#include "world/common/SpawnSunEffect.inc.c"
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
#include "mac_06.h"
|
#include "mac_06.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_802404C0_865000);
|
extern u32 N(unkAngle1);
|
||||||
|
extern s32 N(unkAngle2);
|
||||||
|
extern s32 N(unkAngle3);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_8024050C_86504C);
|
void N(unkVtxFunc001)(Vtx* firstVertex, Vtx* copiedVertices, s32 numVertices, s32* arg3);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_80240658_865198);
|
#include "world/common/resolve_npc.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_802408D0_865410);
|
#include "world/common/UnkAngleFunc001.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_80240974_8654B4);
|
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", mac_06_unkVtxFunc001);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_80240A18_865558);
|
#include "world/common/unkAngleFuncs023.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_mac/mac_06/865000", func_80240B88_8656C8);
|
#include "world/common/UnkFloatFunc001.inc.c"
|
||||||
|
|
||||||
|
#include "world/common/UnkPlayerPosFunc.inc.c"
|
||||||
|
|
||||||
#include "world/common/PlayFX3D.inc.c"
|
#include "world/common/PlayFX3D.inc.c"
|
||||||
|
|
||||||
|
@ -7,6 +7,6 @@ static char* N(exit_str_3) = "";
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_02/BC2A90", func_80240000_BC2A90);
|
INCLUDE_ASM(s32, "world/area_obk/obk_02/BC2A90", func_80240000_BC2A90);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_02/BC2A90", func_8024000C_BC2A9C);
|
#include "world/common/UnkAngleFunc004.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_02/BC2A90", func_80240194_BC2C24);
|
INCLUDE_ASM(s32, "world/area_obk/obk_02/BC2A90", func_80240194_BC2C24);
|
||||||
|
@ -4,6 +4,38 @@ INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD7D0", func_80240770_BCD7D0);
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD7D0", func_802407A0_BCD800);
|
INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD7D0", func_802407A0_BCD800);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD7D0", func_802407AC_BCD80C);
|
ApiStatus func_802407AC_BCD80C(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* npc = get_npc_safe(script->owner2.npcID);
|
||||||
|
|
||||||
|
switch (script->functionTemp[1]) {
|
||||||
|
case 0:
|
||||||
|
npc->duration = rand_int(180) + 30;
|
||||||
|
npc->pos.z = -430.0f;
|
||||||
|
npc->pos.y = rand_int(50) + 40.0f;
|
||||||
|
npc->moveSpeed = (2.0f * rand_float()) + 2.0f;
|
||||||
|
if (rand_int(100) < 50) {
|
||||||
|
npc->pos.x = 270.0f;
|
||||||
|
npc->yaw = 270.0f;
|
||||||
|
} else {
|
||||||
|
npc->pos.x = -270.0f;
|
||||||
|
npc->yaw = 90.0f;
|
||||||
|
}
|
||||||
|
script->functionTemp[1] = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
npc->duration--;
|
||||||
|
if (npc->duration == 0) {
|
||||||
|
script->functionTemp[1] = 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||||
|
if (npc->pos.x < -280.0f || npc->pos.x > 280.0f) {
|
||||||
|
script->functionTemp[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD7D0", func_80240934_BCD994);
|
INCLUDE_ASM(s32, "world/area_obk/obk_05/BCD7D0", func_80240934_BCD994);
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEEB0", func_802402C0_BCEEB0);
|
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEEB0", func_802402C0_BCEEB0);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEEB0", func_802402CC_BCEEBC);
|
#include "world/common/UnkAngleFunc004.inc.c"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEEB0", func_80240454_BCF044);
|
INCLUDE_ASM(s32, "world/area_obk/obk_07/BCEEB0", func_80240454_BCF044);
|
||||||
|
@ -18,6 +18,38 @@ INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_80240D10_BD4580);
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_80240FD8_BD4848);
|
INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_80240FD8_BD4848);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_80240FE4_BD4854);
|
ApiStatus func_80240FE4_BD4854(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* npc = get_npc_safe(script->owner2.npcID);
|
||||||
|
|
||||||
|
switch (script->functionTemp[1]) {
|
||||||
|
case 0:
|
||||||
|
npc->duration = rand_int(180) + 30;
|
||||||
|
npc->pos.z = -430.0f;
|
||||||
|
npc->pos.y = rand_int(50) + 40.0f;
|
||||||
|
npc->moveSpeed = (2.0f * rand_float()) + 2.0f;
|
||||||
|
if (rand_int(100) < 50) {
|
||||||
|
npc->pos.x = 270.0f;
|
||||||
|
npc->yaw = 270.0f;
|
||||||
|
} else {
|
||||||
|
npc->pos.x = -270.0f;
|
||||||
|
npc->yaw = 90.0f;
|
||||||
|
}
|
||||||
|
script->functionTemp[1] = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
npc->duration--;
|
||||||
|
if (npc->duration == 0) {
|
||||||
|
script->functionTemp[1] = 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||||
|
if (npc->pos.x < -280.0f || npc->pos.x > 280.0f) {
|
||||||
|
script->functionTemp[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_8024116C_BD49DC);
|
INCLUDE_ASM(s32, "world/area_obk/obk_08/BD4110", func_8024116C_BD49DC);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
#include "omo_04.h"
|
#include "omo_04.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_04/DAF240", func_80241E40_DAF240);
|
#define UNK_NPC_POS_FUNC_NUM 2
|
||||||
|
#include "world/common/UnkNpcPosFunc.inc.c"
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
#include "omo_07.h"
|
#include "omo_07.h"
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_07/DC04D0", func_80243220_DC04D0);
|
#define UNK_NPC_POS_FUNC_NUM 7
|
||||||
|
#include "world/common/UnkNpcPosFunc.inc.c"
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
static char* N(exit_str_0) = "omo_09";
|
static char* N(exit_str_0) = "omo_09";
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_omo/omo_09/DD02E0", func_80243610_DD02E0);
|
#define UNK_NPC_POS_FUNC_NUM 7
|
||||||
|
#include "world/common/UnkNpcPosFunc.inc.c"
|
||||||
|
@ -4,7 +4,15 @@ INCLUDE_ASM(s32, "world/area_osr/osr_03/AB62B0", func_80240020_AB62B0);
|
|||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_03/AB62B0", func_80240090_AB6320);
|
INCLUDE_ASM(s32, "world/area_osr/osr_03/AB62B0", func_80240090_AB6320);
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_03/AB62B0", func_802400C4_AB6354);
|
ApiStatus func_802400C4_AB6354(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* npc = get_npc_unsafe(0);
|
||||||
|
|
||||||
|
script->varTable[0] = npc->pos.x + (sin_deg(npc->yaw + gCameras[CAM_DEFAULT].currentYaw + 180.0f) * 20.0f);
|
||||||
|
script->varTable[1] = npc->pos.y + 18.0f;
|
||||||
|
script->varTable[2] = npc->pos.z - (cos_deg(npc->yaw + gCameras[CAM_DEFAULT].currentYaw + 180.0f) * 20.0f);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
INCLUDE_ASM(s32, "world/area_osr/osr_03/AB62B0", func_802401A0_AB6430);
|
INCLUDE_ASM(s32, "world/area_osr/osr_03/AB62B0", func_802401A0_AB6430);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "effects.h"
|
#include "effects.h"
|
||||||
|
|
||||||
ApiStatus N(StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall) {
|
||||||
StarSpiritEffect* ptr = (StarSpiritEffect*)script->varTable[0];
|
StarSpiritData* ptr = script->varTablePtr[0];
|
||||||
|
|
||||||
sfx_adjust_env_sound_pos(SOUND_A2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08);
|
sfx_adjust_env_sound_pos(SOUND_A2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08);
|
||||||
|
|
||||||
@ -18,8 +18,9 @@ ApiStatus N(StarSpiritEffectFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
StarSpiritEffect* ptr = heap_malloc(sizeof(*ptr));
|
StarSpiritData* ptr = heap_malloc(sizeof(*ptr));
|
||||||
script->varTable[0] = (s32) ptr;
|
|
||||||
|
script->varTablePtr[0] = ptr;
|
||||||
evt_set_variable(NULL, EVT_MAP_VAR(1), script->varTable[0]);
|
evt_set_variable(NULL, EVT_MAP_VAR(1), script->varTable[0]);
|
||||||
ptr->unk_38 = evt_get_variable(script, *args++);
|
ptr->unk_38 = evt_get_variable(script, *args++);
|
||||||
ptr->unk_3C = evt_get_variable(script, *args++);
|
ptr->unk_3C = evt_get_variable(script, *args++);
|
||||||
@ -31,7 +32,7 @@ ApiStatus N(StarSpiritEffectFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
ptr->unk_20 = evt_get_float_variable(script, *args++);
|
ptr->unk_20 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_24 = evt_get_float_variable(script, *args++);
|
ptr->unk_24 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_28 = evt_get_float_variable(script, *args++);
|
ptr->unk_28 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_50 = (struct StarSpiritEffectUnkStruct*) fx_star_spirits_energy(2, ptr->unk_0C, ptr->unk_10, ptr->unk_14, 1.0f, 0);
|
ptr->unk_50 = fx_star_spirits_energy(2, ptr->unk_0C, ptr->unk_10, ptr->unk_14, 1.0f, 0);
|
||||||
ptr->unk_4E = 0;
|
ptr->unk_4E = 0;
|
||||||
ptr->unk_48 = 0;
|
ptr->unk_48 = 0;
|
||||||
ptr->unk_4A = 0;
|
ptr->unk_4A = 0;
|
||||||
@ -44,16 +45,16 @@ ApiStatus N(StarSpiritEffectFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
StarSpiritEffect* ptr = (StarSpiritEffect*)script->varTable[0];
|
StarSpiritData* ptr = script->varTablePtr[0];
|
||||||
|
|
||||||
switch (ptr->unk_44) {
|
switch (ptr->unk_44) {
|
||||||
case 0:
|
case 0:
|
||||||
ptr->unk_04 = update_lerp(5, ptr->unk_10, ptr->unk_1C, ptr->unk_46, ptr->unk_3C);
|
ptr->unk_04 = update_lerp(5, ptr->unk_10, ptr->unk_1C, ptr->unk_46, ptr->unk_3C);
|
||||||
ptr->unk_00 = update_lerp(0, ptr->unk_0C, ptr->unk_18, ptr->unk_46, ptr->unk_3C);
|
ptr->unk_00 = update_lerp(0, ptr->unk_0C, ptr->unk_18, ptr->unk_46, ptr->unk_3C);
|
||||||
ptr->unk_08 = update_lerp(0, ptr->unk_14, ptr->unk_20, ptr->unk_46, ptr->unk_3C);
|
ptr->unk_08 = update_lerp(0, ptr->unk_14, ptr->unk_20, ptr->unk_46, ptr->unk_3C);
|
||||||
ptr->unk_50->unk_0C->unk_08 = ptr->unk_00;
|
((StarSpiritsEnergyFXData*)ptr->unk_50->data)->unk_08 = ptr->unk_00;
|
||||||
ptr->unk_50->unk_0C->unk_0C = ptr->unk_04;
|
((StarSpiritsEnergyFXData*)ptr->unk_50->data)->unk_0C = ptr->unk_04;
|
||||||
ptr->unk_50->unk_0C->unk_10 = ptr->unk_08;
|
((StarSpiritsEnergyFXData*)ptr->unk_50->data)->unk_10 = ptr->unk_08;
|
||||||
ptr->unk_46++;
|
ptr->unk_46++;
|
||||||
if (ptr->unk_46 >= ptr->unk_3C) {
|
if (ptr->unk_46 >= ptr->unk_3C) {
|
||||||
ptr->unk_44 = 1;
|
ptr->unk_44 = 1;
|
||||||
@ -65,16 +66,16 @@ ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
|||||||
if (ptr->unk_46 >= 60) {
|
if (ptr->unk_46 >= 60) {
|
||||||
ptr->unk_44 = 2;
|
ptr->unk_44 = 2;
|
||||||
ptr->unk_46 = 0;
|
ptr->unk_46 = 0;
|
||||||
ptr->unk_50->unk_0C->unk_70 = 1;
|
((StarSpiritsEnergyFXData*)ptr->unk_50->data)->unk_70 = 1;
|
||||||
ptr->unk_50->unk_0C->unk_74 = 0;
|
((StarSpiritsEnergyFXData*)ptr->unk_50->data)->unk_74 = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ptr->unk_46++;
|
ptr->unk_46++;
|
||||||
if (ptr->unk_46 >= 60) {
|
if (ptr->unk_46 >= 60) {
|
||||||
ptr->unk_54 = fx_spirit_card(1, ptr->unk_18, ptr->unk_1C, ptr->unk_20, 1.0f, 0);
|
ptr->unk_54 = fx_spirit_card(1, ptr->unk_18, ptr->unk_1C, ptr->unk_20, 1.0f, 0);
|
||||||
*((s8*)ptr->unk_54->unk_0C + 0x34) = ptr->unk_38;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_34 = ptr->unk_38;
|
||||||
ptr->unk_54->unk_0C->unk_20 = 0;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_20 = 0;
|
||||||
ptr->unk_40 = create_shadow_type(0, ptr->unk_18, ptr->unk_28, ptr->unk_20);
|
ptr->unk_40 = create_shadow_type(0, ptr->unk_18, ptr->unk_28, ptr->unk_20);
|
||||||
ptr->unk_44 = 3;
|
ptr->unk_44 = 3;
|
||||||
ptr->unk_46 = 0;
|
ptr->unk_46 = 0;
|
||||||
@ -96,7 +97,6 @@ ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
|||||||
ptr->unk_34 = ptr->unk_2C;
|
ptr->unk_34 = ptr->unk_2C;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 4:
|
case 4:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
|||||||
ptr->unk_04 = update_lerp(0xA, ptr->unk_1C, ptr->unk_24, ptr->unk_4C, 120);
|
ptr->unk_04 = update_lerp(0xA, ptr->unk_1C, ptr->unk_24, ptr->unk_4C, 120);
|
||||||
ptr->unk_4C++;
|
ptr->unk_4C++;
|
||||||
if (ptr->unk_4C >= 120) {
|
if (ptr->unk_4C >= 120) {
|
||||||
ptr->unk_4C = 0x10E;
|
ptr->unk_4C = 270;
|
||||||
ptr->unk_4A = 2;
|
ptr->unk_4A = 2;
|
||||||
ptr->unk_4E = 2;
|
ptr->unk_4E = 2;
|
||||||
}
|
}
|
||||||
@ -126,10 +126,10 @@ ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
|||||||
case 1:
|
case 1:
|
||||||
ptr->unk_2C = clamp_angle(ptr->unk_2C + ptr->unk_30);
|
ptr->unk_2C = clamp_angle(ptr->unk_2C + ptr->unk_30);
|
||||||
case 2:
|
case 2:
|
||||||
ptr->unk_54->unk_0C->unk_24.f = ptr->unk_2C;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_24 = ptr->unk_2C;
|
||||||
ptr->unk_54->unk_0C->unk_04 = ptr->unk_18;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_04 = ptr->unk_18;
|
||||||
ptr->unk_54->unk_0C->unk_08 = ptr->unk_04;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_08 = ptr->unk_04;
|
||||||
ptr->unk_54->unk_0C->unk_0C = ptr->unk_20;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_0C = ptr->unk_20;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +138,7 @@ ApiStatus N(StarSpiritEffectFunc3)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(StarSpiritEffectFunc4)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(StarSpiritEffectFunc4)(Evt* script, s32 isInitialCall) {
|
||||||
s32 var = evt_get_variable(script, *script->ptrReadPos);
|
s32 var = evt_get_variable(script, *script->ptrReadPos);
|
||||||
StarSpiritEffect* ptr = (StarSpiritEffect*) script->varTable[0];
|
StarSpiritData* ptr = script->varTablePtr[0];
|
||||||
|
|
||||||
return (ptr->unk_4E == var) * ApiStatus_DONE2;
|
return (ptr->unk_4E == var) * ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -147,18 +147,18 @@ ApiStatus N(StarSpiritEffectFunc5)(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
StarSpiritEffect* ptr = (StarSpiritEffect*) heap_malloc(sizeof(*ptr));
|
StarSpiritData* ptr = heap_malloc(sizeof(*ptr));
|
||||||
script->varTable[0] = (s32) ptr;
|
script->varTablePtr[0] = ptr;
|
||||||
ptr->unk_38 = evt_get_variable(script, *args++);
|
ptr->unk_38 = evt_get_variable(script, *args++);
|
||||||
ptr->unk_18 = evt_get_float_variable(script, *args++);
|
ptr->unk_18 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_24 = evt_get_float_variable(script, *args++);
|
ptr->unk_24 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_20 = evt_get_float_variable(script, *args++);
|
ptr->unk_20 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_28 = evt_get_float_variable(script, *args++);
|
ptr->unk_28 = evt_get_float_variable(script, *args++);
|
||||||
ptr->unk_54 = fx_spirit_card(1, ptr->unk_18, ptr->unk_24, ptr->unk_20, 1.0f, 0);
|
ptr->unk_54 = fx_spirit_card(1, ptr->unk_18, ptr->unk_24, ptr->unk_20, 1.0f, 0);
|
||||||
ptr->unk_54->unk_0C->unk_34 = ptr->unk_38;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_34 = ptr->unk_38;
|
||||||
ptr->unk_54->unk_0C->unk_20 = 0;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_20 = 0;
|
||||||
ptr->unk_40 = create_shadow_type(0, ptr->unk_18, ptr->unk_28, ptr->unk_20);
|
ptr->unk_40 = create_shadow_type(0, ptr->unk_18, ptr->unk_28, ptr->unk_20);
|
||||||
ptr->unk_4C = 0x10E;
|
ptr->unk_4C = 270;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -166,7 +166,7 @@ ApiStatus N(StarSpiritEffectFunc5)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(StarSpiritEffectFunc6)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(StarSpiritEffectFunc6)(Evt* script, s32 isInitialCall) {
|
||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
StarSpiritEffect* ptr = (StarSpiritEffect*) script->varTable[0];
|
StarSpiritData* ptr = script->varTablePtr[0];
|
||||||
|
|
||||||
ptr->unk_04 = ptr->unk_24 + (2.0f * (sin_deg(ptr->unk_4C) + 1.0f));
|
ptr->unk_04 = ptr->unk_24 + (2.0f * (sin_deg(ptr->unk_4C) + 1.0f));
|
||||||
ptr->unk_4C = clamp_angle(ptr->unk_4C + 8);
|
ptr->unk_4C = clamp_angle(ptr->unk_4C + 8);
|
||||||
@ -174,9 +174,9 @@ ApiStatus N(StarSpiritEffectFunc6)(Evt* script, s32 isInitialCall) {
|
|||||||
ptr->unk_18, ptr->unk_20) <= 30.0f) {
|
ptr->unk_18, ptr->unk_20) <= 30.0f) {
|
||||||
ptr->unk_4E = 3;
|
ptr->unk_4E = 3;
|
||||||
}
|
}
|
||||||
ptr->unk_54->unk_0C->unk_04 = ptr->unk_18;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_04 = ptr->unk_18;
|
||||||
ptr->unk_54->unk_0C->unk_08 = ptr->unk_04;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_08 = ptr->unk_04;
|
||||||
ptr->unk_54->unk_0C->unk_0C = ptr->unk_20;
|
((SpiritCardFXData*)ptr->unk_54->data)->unk_0C = ptr->unk_20;
|
||||||
|
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
35
src/world/common/UnkAngleFunc001.inc.c
Normal file
35
src/world/common/UnkAngleFunc001.inc.c
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
ApiStatus N(UnkAngleFunc001)(Evt* script, s32 isInitialCall) {
|
||||||
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
s32 npcID = evt_get_variable(script, *args++);
|
||||||
|
s32 outX = *args++;
|
||||||
|
s32 outY = *args++;
|
||||||
|
s32 outZ = *args++;
|
||||||
|
Npc* npc = N(resolve_npc)(script, npcID);
|
||||||
|
f32 y;
|
||||||
|
|
||||||
|
if (npc == NULL) {
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
||||||
|
|
||||||
|
N(unkAngle1) += 4;
|
||||||
|
if (N(unkAngle1) >= 360) {
|
||||||
|
N(unkAngle1) -= 360;
|
||||||
|
}
|
||||||
|
|
||||||
|
y = npc->pos.y;
|
||||||
|
if (npc->currentAnim.w == 0xB60000 ||
|
||||||
|
npc->currentAnim.w == 0xB60004 ||
|
||||||
|
npc->currentAnim.w == 0xB60008 ||
|
||||||
|
npc->currentAnim.w == 0xB6000C)
|
||||||
|
{
|
||||||
|
y += 2.0f * sin_deg(N(unkAngle1));
|
||||||
|
}
|
||||||
|
|
||||||
|
evt_set_float_variable(script, outX, npc->pos.x);
|
||||||
|
evt_set_float_variable(script, outY, y);
|
||||||
|
evt_set_float_variable(script, outZ, npc->pos.z);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
36
src/world/common/UnkAngleFunc004.inc.c
Normal file
36
src/world/common/UnkAngleFunc004.inc.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
ApiStatus N(UnkAngleFunc004)(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* npc = get_npc_safe(script->owner2.npcID);
|
||||||
|
|
||||||
|
switch (script->functionTemp[1]) {
|
||||||
|
case 0:
|
||||||
|
npc->duration = rand_int(180) + 30;
|
||||||
|
npc->pos.z = -300.0f;
|
||||||
|
npc->pos.y = rand_int(50) + 80.0f;
|
||||||
|
npc->moveSpeed = (2.0f * rand_float()) + 2.0f;
|
||||||
|
if (rand_int(100) < 50) {
|
||||||
|
npc->pos.x = 270.0f;
|
||||||
|
npc->yaw = 270.0f;
|
||||||
|
} else {
|
||||||
|
npc->pos.x = -270.0f;
|
||||||
|
npc->yaw = 90.0f;
|
||||||
|
}
|
||||||
|
script->functionTemp[1] = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
npc->duration--;
|
||||||
|
if (npc->duration == 0) {
|
||||||
|
script->functionTemp[1] = 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||||
|
if (npc->pos.x < -280.0f || npc->pos.x > 280.0f) {
|
||||||
|
script->functionTemp[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
36
src/world/common/UnkAngleFunc005.inc.c
Normal file
36
src/world/common/UnkAngleFunc005.inc.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
ApiStatus N(UnkAngleFunc005)(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* npc = get_npc_safe(script->owner2.npcID);
|
||||||
|
|
||||||
|
switch (script->functionTemp[1]) {
|
||||||
|
case 0:
|
||||||
|
npc->duration = rand_int(180) + 30;
|
||||||
|
npc->pos.z = -430.0f;
|
||||||
|
npc->pos.y = rand_int(50) + 40.0f;
|
||||||
|
npc->moveSpeed = (2.0f * rand_float()) + 2.0f;
|
||||||
|
if (rand_int(100) < 50) {
|
||||||
|
npc->pos.x = 270.0f;
|
||||||
|
npc->yaw = 270.0f;
|
||||||
|
} else {
|
||||||
|
npc->pos.x = -270.0f;
|
||||||
|
npc->yaw = 90.0f;
|
||||||
|
}
|
||||||
|
script->functionTemp[1] = 1;
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
npc->duration--;
|
||||||
|
if (npc->duration == 0) {
|
||||||
|
script->functionTemp[1] = 2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
npc_move_heading(npc, npc->moveSpeed, npc->yaw);
|
||||||
|
if (npc->pos.x < -280.0f || npc->pos.x > 280.0f) {
|
||||||
|
script->functionTemp[1] = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
24
src/world/common/UnkFloatFunc001.inc.c
Normal file
24
src/world/common/UnkFloatFunc001.inc.c
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
// Similar to UnkFloatFunc
|
||||||
|
ApiStatus N(UnkFloatFunc001)(Evt* script, s32 isInitialCall) {
|
||||||
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
s32 a1 = *args++;
|
||||||
|
s32 var0 = evt_get_variable(script, a1);
|
||||||
|
s32 a2 = *args++;
|
||||||
|
f32 var1 = evt_get_float_variable(script, *args++);
|
||||||
|
f32 var2 = evt_get_float_variable(script, *args++);
|
||||||
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
f32 temp = evt_get_float_variable(script, *args++);
|
||||||
|
f32 diff = (var2 - var1) / 2;
|
||||||
|
|
||||||
|
if (var4 != 0 && var3 < var0) {
|
||||||
|
var0 = var3;
|
||||||
|
evt_set_variable(script, a1, var3);
|
||||||
|
}
|
||||||
|
|
||||||
|
evt_set_float_variable(script, a2, (var1 + diff) - (diff * cos_deg(((var0 * 180.0f) / var3) + temp)));
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
16
src/world/common/UnkNpcPosFunc.inc.c
Normal file
16
src/world/common/UnkNpcPosFunc.inc.c
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
#ifndef UNK_NPC_POS_FUNC_NUM
|
||||||
|
#error UNK_NPC_POS_FUNC_NUM must be defined
|
||||||
|
#define UNK_NPC_POS_FUNC_NUM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
ApiStatus N(UnkNpcPosFunc)(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* npc = get_npc_unsafe(UNK_NPC_POS_FUNC_NUM);
|
||||||
|
|
||||||
|
script->varTable[0] = npc->pos.x + (sin_deg(npc->yaw + gCameras[CAM_DEFAULT].currentYaw + 180.0f) * 40.0f);
|
||||||
|
script->varTable[1] = npc->pos.y + 8.0f;
|
||||||
|
script->varTable[2] = npc->pos.z - (cos_deg(npc->yaw + gCameras[CAM_DEFAULT].currentYaw + 180.0f) * 40.0f);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
15
src/world/common/UnkPlayerPosFunc.inc.c
Normal file
15
src/world/common/UnkPlayerPosFunc.inc.c
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
ApiStatus N(UnkPlayerPosFunc)(Evt* script, s32 isInitialCall) {
|
||||||
|
Npc* player = get_npc_safe(ACTOR_PLAYER);
|
||||||
|
f32 yaw = -player->yaw;
|
||||||
|
f32 x = player->pos.x + 30.0f + (sin_deg(yaw) * 70.0f);
|
||||||
|
f32 z = player->pos.z + (cos_deg(yaw) * 70.0f);
|
||||||
|
f32 y = player->pos.y + 50.0f;
|
||||||
|
|
||||||
|
evt_set_float_variable(script, EVT_VAR(0), x);
|
||||||
|
evt_set_float_variable(script, EVT_VAR(1), y);
|
||||||
|
evt_set_float_variable(script, EVT_VAR(2), z);
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
7
src/world/common/UnkVtxFunc.inc.c
Normal file
7
src/world/common/UnkVtxFunc.inc.c
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
void N(SomeVtxFunc)(void) {
|
||||||
|
script->varTable[0] = gPlayerData.coins;
|
||||||
|
return ApiStatus_DONE2;
|
||||||
|
}
|
11
src/world/common/resolve_npc.inc.c
Normal file
11
src/world/common/resolve_npc.inc.c
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
Npc* N(resolve_npc)(Evt* script, s32 npcIdOrPtr) {
|
||||||
|
if (npcIdOrPtr == NPC_SELF) {
|
||||||
|
return get_npc_safe(script->owner2.npcID);
|
||||||
|
} else if (npcIdOrPtr >= -270000000) {
|
||||||
|
return get_npc_safe(npcIdOrPtr);
|
||||||
|
} else {
|
||||||
|
return (Npc*) npcIdOrPtr;
|
||||||
|
}
|
||||||
|
}
|
36
src/world/common/unkAngleFuncs023.inc.c
Normal file
36
src/world/common/unkAngleFuncs023.inc.c
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "npc.h"
|
||||||
|
|
||||||
|
void N(unkAngleFunc002)(void) {
|
||||||
|
Vtx* firstVertex;
|
||||||
|
Vtx* copiedVertices;
|
||||||
|
s32 numVertices;
|
||||||
|
|
||||||
|
mdl_get_copied_vertices(1, &firstVertex, &copiedVertices, &numVertices);
|
||||||
|
N(unkVtxFunc001)(firstVertex, copiedVertices, numVertices, &N(unkAngle2));
|
||||||
|
|
||||||
|
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(1));
|
||||||
|
if (N(unkAngle2) >= 0) {
|
||||||
|
N(unkAngle2) += 4;
|
||||||
|
}
|
||||||
|
if (N(unkAngle2) >= 360) {
|
||||||
|
N(unkAngle2) = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void N(unkAngleFunc003)(void) {
|
||||||
|
Vtx* firstVertex;
|
||||||
|
Vtx* copiedVertices;
|
||||||
|
s32 numVertices;
|
||||||
|
|
||||||
|
mdl_get_copied_vertices(2, &firstVertex, &copiedVertices, &numVertices);
|
||||||
|
N(unkVtxFunc001)(firstVertex, copiedVertices, numVertices, &N(unkAngle3));
|
||||||
|
|
||||||
|
gSPDisplayList(gMasterGfxPos++, mdl_get_copied_gfx(2));
|
||||||
|
if (N(unkAngle3) >= 0) {
|
||||||
|
N(unkAngle3) += 4;
|
||||||
|
}
|
||||||
|
if (N(unkAngle3) >= 360) {
|
||||||
|
N(unkAngle3) = -1;
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@ groups = {}
|
|||||||
|
|
||||||
with open("tools/symz.txt") as f:
|
with open("tools/symz.txt") as f:
|
||||||
for line in f.readlines():
|
for line in f.readlines():
|
||||||
if line and not line.startswith("//"):
|
if line.strip() and not line.startswith("//"):
|
||||||
name, addr = line.strip().strip(";").split(" = ")
|
name, addr = line.strip().strip(";").split(" = ")
|
||||||
syms.append({"name": name, "address": int(addr, 0), "found_in": set(), "dead": False})
|
syms.append({"name": name, "address": int(addr, 0), "found_in": set(), "dead": False})
|
||||||
|
|
||||||
|
@ -780,7 +780,10 @@ dlabel HudScript_MashCUpButton
|
|||||||
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x00000002, D_8028BEC0, D_8028C168, 0x00000002, 0x00000002, D_8028C188, D_8028C430, 0x00000003, 0x00000000
|
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x00000002, D_8028BEC0, D_8028C168, 0x00000002, 0x00000002, D_8028C188, D_8028C430, 0x00000003, 0x00000000
|
||||||
|
|
||||||
dlabel HudScript_CDownButton
|
dlabel HudScript_CDownButton
|
||||||
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x0000003C, D_8028C450, D_8028C6F8, 0x00000003, 0x00000000, 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x0000003C, D_8028C718, D_8028C9C0, 0x00000003, 0x00000000
|
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x0000003C, D_8028C450, D_8028C6F8, 0x00000003, 0x00000000
|
||||||
|
|
||||||
|
dlabel HudScript_8029265C
|
||||||
|
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x0000003C, D_8028C718, D_8028C9C0, 0x00000003, 0x00000000
|
||||||
|
|
||||||
dlabel HudScript_MashCDownButton1
|
dlabel HudScript_MashCDownButton1
|
||||||
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x00000002, D_8028C450, D_8028C6F8, 0x00000002, 0x00000002, D_8028C718, D_8028C9C0, 0x00000003, 0x00000000
|
.word 0x00000008, 0x00000013, 0x00000028, 0x00000022, 0x00000004, 0x00000002, 0x00000002, D_8028C450, D_8028C6F8, 0x00000002, 0x00000002, D_8028C718, D_8028C9C0, 0x00000003, 0x00000000
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel jtbl_802A9A90_422A90
|
|
||||||
.word L802A93BC_4223BC, L802A94A8_4224A8, L802A99B4_4229B4, L802A99B4_4229B4, L802A99B4_4229B4, L802A99B4_4229B4, L802A99B4_4229B4, L802A99B4_4229B4, L802A99B4_4229B4, L802A99B4_4229B4, L802A9598_422598, L802A9644_422644, L802A9994_422994, 0, 0, 0
|
|
@ -1,6 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel jtbl_802A9840_423C30
|
|
||||||
.word L802A9320_423710, L802A93C4_4237B4, L802A96A4_423A94, L802A96A4_423A94, L802A96A4_423A94, L802A96A4_423A94, L802A96A4_423A94, L802A96A4_423A94, L802A96A4_423A94, L802A96A4_423A94, L802A944C_42383C, L802A9490_423880, L802A9684_423A74, 0, 0, 0
|
|
@ -1,93 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A98E0_424550
|
|
||||||
.word 0x00000000, 0x00007770, 0x00000000, 0x00000000, 0x00777777, 0x00000000, 0x00000000, 0x0778D1D7, 0x70000000, 0x00000007, 0x77B1111D, 0x77000000, 0x00000777, 0x91111111, 0xB7700000, 0x0000777E, 0x11111111, 0xB7700000, 0x00007711, 0x11111111, 0xA7700000, 0x00007711, 0x11111111, 0x77000000, 0x000077A2, 0x222B222D, 0x77000000, 0x00000779, 0x2B77222B, 0x77000000, 0x00000087, 0x777B333A, 0x70000000, 0x00000007, 0x77733337, 0x70000000, 0x00000000, 0x77A444D7, 0x70000000, 0x00000000, 0x774444C7, 0x70000000, 0x00000007, 0x775555A7, 0x00000000, 0x00000007, 0x7D555577, 0x00000000, 0x00000077, 0x76666D77, 0x00000000, 0x00000077, 0x66666A77, 0x00000000, 0x00000078, 0x66666770, 0x00000000, 0x00000078, 0x6666D770, 0x00000000, 0x00000077, 0xD666C770, 0x00000000, 0x00000077, 0x7D667700, 0x00000000, 0x00000007, 0x77777700, 0x00000000, 0x00000000, 0x77777000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802A9A00_424670
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802A9A20_424690
|
|
||||||
.word 0x00000000, 0x07777770, 0x00000000, 0x00000007, 0x77777777, 0x70000000, 0x00000087, 0xA111111D, 0x77000000, 0x0000777B, 0x11111111, 0xD7700000, 0x000777D1, 0x11111111, 0x11870000, 0x00777111, 0x11111111, 0x11B70000, 0x07771111, 0x11DD1111, 0x11B70000, 0x077E1111, 0x1777A111, 0x11B70000, 0x07772222, 0x77778222, 0x22770000, 0x00787227, 0x70772222, 0x27700000, 0x00078777, 0x07733333, 0x87000000, 0x00007870, 0x78333337, 0x80000000, 0x00000007, 0x74444477, 0x77700000, 0x00000078, 0x44444777, 0x77770000, 0x00000785, 0x5555777A, 0x55A77000, 0x00007855, 0x55577AD5, 0x555D7800, 0x00078666, 0x667AD666, 0x66667700, 0x00776666, 0x66DE6666, 0x666D7700, 0x00776666, 0x66666666, 0x6D777000, 0x0077C666, 0x6666666C, 0x77770000, 0x00077A66, 0x6666DA77, 0x87000000, 0x00007776, 0x66C77777, 0x00000000, 0x00000777, 0x77777700, 0x00000000, 0x00000007, 0x77700000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802A9B40_4247B0
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802A9B60_4247D0
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00888888, 0x00000000, 0x00000000, 0x77787788, 0x77000000, 0x00000077, 0x7B111111, 0xD7700000, 0x00007779, 0x11111111, 0x1D770000, 0x000777D1, 0x11111111, 0x11D77000, 0x00077111, 0x111A7C11, 0x11177000, 0x00077111, 0x11777711, 0x11177000, 0x00077222, 0x27707722, 0x22D77000, 0x0000772D, 0x77077222, 0x2D770000, 0x00000777, 0x70873333, 0xA7700000, 0x00000000, 0x0773333A, 0x77000000, 0x00000000, 0x07744449, 0x77000000, 0x00000000, 0x00774444, 0xA7700000, 0x00000787, 0x77077555, 0x5D770000, 0x000077D5, 0x57707755, 0x55D77000, 0x00077D66, 0x66977796, 0x66667700, 0x00078666, 0x666B7776, 0x66667700, 0x00077966, 0x6666DCD6, 0x66667700, 0x0000777D, 0x66666666, 0x66D77000, 0x00000777, 0xA6666666, 0x6A770000, 0x00000077, 0x7766666D, 0x77700000, 0x00000000, 0x77777777, 0x77000000, 0x00000000, 0x00777777, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802A9C80_4248F0
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802A9CA0_424910
|
|
||||||
.word 0x00000000, 0x00077777, 0x00000000, 0x00000000, 0x00777777, 0x70000000, 0x00000000, 0x07771111, 0x77000000, 0x00000000, 0x07711111, 0x17000000, 0x00000000, 0x77B11111, 0xC7000000, 0x00000000, 0x7911111C, 0x77000000, 0x00000007, 0x7D1111B7, 0x70000000, 0x00000077, 0xB1111B77, 0x70000000, 0x00000077, 0x22222227, 0x77000000, 0x0000077D, 0x22222222, 0x77000000, 0x00007793, 0x33373333, 0x77700000, 0x00007733, 0x33B77333, 0x77700000, 0x00077D44, 0xED777444, 0x77770000, 0x00079444, 0xD7777444, 0x44770000, 0x00775555, 0xC777B555, 0x55B77000, 0x00775555, 0x55555555, 0x55D77000, 0x0077D666, 0x66666666, 0x66677000, 0x00777D66, 0x66666669, 0x77777000, 0x00077777, 0x77766667, 0x77770000, 0x00000777, 0x77766667, 0x70000000, 0x00000000, 0x077666C7, 0x70000000, 0x00000000, 0x0776C977, 0x70000000, 0x00000000, 0x07777770, 0x00000000, 0x00000000, 0x00777000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802A9DC0_424A30
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802A9DE0_424A50
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x88777777, 0x78700000, 0x00000007, 0x77777777, 0x77770000, 0x00000077, 0xA1111111, 0x11780000, 0x00000077, 0xD1111111, 0x11780000, 0x0000077A, 0x11111111, 0x11780000, 0x00000771, 0x111D7777, 0x77770000, 0x000077B1, 0x11177000, 0x00000000, 0x00007722, 0x22A77778, 0x80000000, 0x00077D22, 0x2B77D22D, 0x77000000, 0x00077333, 0x37D33333, 0xD7700000, 0x0077D333, 0x33333333, 0x3D770000, 0x00774444, 0x4444A7B4, 0x44D77000, 0x00077444, 0x4DB77778, 0x44477000, 0x00007755, 0xB7770777, 0x55577000, 0x00000778, 0x770077A5, 0x55D77000, 0x00000077, 0x00778666, 0x6D770000, 0x00000000, 0x877D6666, 0xD7700000, 0x00000077, 0x7B666666, 0x77000000, 0x00000078, 0xD6666667, 0x70000000, 0x00000087, 0xB6666677, 0x00000000, 0x00000008, 0x7B666770, 0x00000000, 0x00000000, 0x87777700, 0x00000000, 0x00000000, 0x08888000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802A9F00_424B70
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802A9F20_424B90
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07777770, 0x00000000, 0x00000000, 0x778BBB77, 0x00000000, 0x00000007, 0x78E111C7, 0x70000000, 0x00000007, 0x7C1111E7, 0x70000000, 0x00000077, 0xB11111E7, 0x70000000, 0x00000077, 0xE11111B7, 0x70000000, 0x0000077B, 0x11111977, 0x00000000, 0x0000078E, 0x222C8770, 0x00000000, 0x000077A2, 0x2222DC77, 0x70000000, 0x000078D3, 0x3333333C, 0x77700000, 0x00077B33, 0x33C9C333, 0x3C777000, 0x00078444, 0x44777C44, 0x44497700, 0x0077B444, 0xC77077C4, 0x444B7700, 0x0077D555, 0x97000795, 0x555C7700, 0x00775555, 0x77000775, 0x555C7700, 0x00776666, 0x97707796, 0x666B7000, 0x0077C666, 0x69777966, 0x66C77000, 0x00077B66, 0x6D979666, 0x6D770000, 0x00007796, 0x66666666, 0xD7700000, 0x00000779, 0x6666666D, 0x77000000, 0x00000077, 0x8D6666D7, 0x70000000, 0x00000007, 0x77777777, 0x00000000, 0x00000000, 0x77777770, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA040_424CB0
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802AA060_424CD0
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x77777777, 0x77000000, 0x00000007, 0x77777777, 0x77700000, 0x00000077, 0xA1111111, 0x11770000, 0x00000779, 0x11111111, 0x11E77000, 0x00000771, 0x11111111, 0x11177000, 0x000077D1, 0x11111111, 0x11E77000, 0x00007911, 0x1D777779, 0x11C77000, 0x00077E22, 0x2B777782, 0x22770000, 0x00077222, 0x277778D2, 0x2C770000, 0x00077C33, 0x97777C33, 0xE7700000, 0x00007777, 0x7777C333, 0x97700000, 0x00000777, 0x777C444C, 0x77000000, 0x00000000, 0x07744449, 0x77000000, 0x00000000, 0x77D555C7, 0x70000000, 0x00000000, 0x77555597, 0x70000000, 0x00000007, 0x7B666677, 0x00000000, 0x00000007, 0x76666677, 0x00000000, 0x00000007, 0x76666677, 0x00000000, 0x00000007, 0x76666677, 0x00000000, 0x00000007, 0x76666677, 0x00000000, 0x00000007, 0x7C666C77, 0x00000000, 0x00000000, 0x77777770, 0x00000000, 0x00000000, 0x07777700, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA180_424DF0
|
|
||||||
.word 0xBDE0FC05, 0xFD81FE41, 0xC081E143, 0xFA033843, 0x58C17141, 0x8983A203, 0xBA43D2C5, 0xEB05FFFF
|
|
||||||
|
|
||||||
dlabel D_802AA1A0_424E10
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000055, 0x55555555, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00055555, 0x55555555, 0x66000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x55555543, 0x22111234, 0x66660000, 0x00000000, 0x00000000, 0x00000000, 0x00000055, 0x55543211, 0x11111111, 0x24666000, 0x00000000, 0x00000000, 0x00000000, 0x00000555, 0x53211111, 0x11111111, 0x11266600, 0x00000000, 0x00000000, 0x00000000, 0x00055553, 0x21111111, 0x11111111, 0x11126660, 0x00000000, 0x00000000, 0x00000000, 0x00555421, 0x11111111, 0x11111111, 0x11112666, 0x00000000, 0x00000000, 0x00000000, 0x05553111, 0x11111111, 0x11111111, 0x11111266, 0x00000000, 0x00000000, 0x00000000, 0x55521111, 0x11111111, 0x11111111, 0x11111146, 0x60000000, 0x00000000, 0x00000005, 0x55211111, 0x11111111, 0x11111111, 0x11111126, 0x60000000, 0x00000000, 0x00000055, 0x52111111, 0x11111111, 0x11111111, 0x11111114, 0x66000000, 0x00000000, 0x00000555, 0x31111111, 0x11111111, 0x11111111, 0x11111113, 0x66000000, 0x00000000, 0x00000554, 0x11111111, 0x11111111, 0x11111111, 0x11111112, 0x66000000, 0x00000000, 0x00005541, 0x11111111, 0x11111111, 0x11111111, 0x11111112, 0x66000000, 0x00000000, 0x00005521, 0x11111111, 0x11111111, 0x11111111, 0x11111112, 0x66000000, 0x00000000, 0x00055411, 0x11111111, 0x11111111, 0x11111111, 0x11111112, 0x66000000, 0x00000000, 0x00055211, 0x11111111, 0x11111111, 0x11111111, 0x11111113, 0x66000000, 0x00000000, 0x00554111, 0x11111111, 0x11111111, 0x11111111, 0x11111114, 0x66000000, 0x00000000, 0x00553111, 0x11111111, 0x11111111, 0x11111111, 0x11111126, 0x66000000, 0x00000000, 0x00552111, 0x11111111, 0x11111111, 0x11111111, 0x11111136, 0x60000000, 0x00000000, 0x05541111, 0x11111111, 0x11111111, 0x11111111, 0x11111246, 0x60000666, 0x66000000, 0x05531111, 0x11111111, 0x11111111, 0x11111111, 0x11111366, 0x00666666, 0x66000000, 0x05521111, 0x11111111, 0x11111111, 0x11111111, 0x11112466, 0x66664222, 0x66000000, 0x05511111, 0x11111111, 0x11111111, 0x11111111, 0x11113666, 0x64211126, 0x60000000, 0x05511111, 0x11111111, 0x11111111, 0x11111111, 0x11125542, 0x11111266, 0x60000000, 0x05611111, 0x11111111, 0x11111111, 0x11111111, 0x11152111, 0x11112666, 0x00000000, 0x05611111, 0x11111111, 0x11111111, 0x11111111, 0x11411111, 0x11126660, 0x00000000, 0x05621111, 0x11111111, 0x11111111, 0x11111111, 0x13111111, 0x11266600, 0x00000000, 0x05631111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x13666000, 0x00000000, 0x05641111, 0x11111111, 0x11111111, 0x11111111, 0x11111111, 0x46660000, 0x00000000, 0x05661111, 0x11111111, 0x11111111, 0x11111111, 0x11111126, 0x66600000, 0x00000000, 0x00663111, 0x11111111, 0x11111111, 0x11111111, 0x11112466, 0x60000000, 0x00000000, 0x00664111, 0x11111111, 0x11111111, 0x11111111, 0x11246666, 0x00000000, 0x00000000, 0x00066311, 0x11111111, 0x11111111, 0x11111111, 0x24666600, 0x00000000, 0x00000000, 0x00066621, 0x11111111, 0x11111111, 0x11111124, 0x66660000, 0x00000000, 0x00000000, 0x00006662, 0x11111111, 0x11111111, 0x11112466, 0x66000000, 0x00000000, 0x00000000, 0x00000666, 0x42111111, 0x11111111, 0x22466666, 0x00000000, 0x00000000, 0x00000000, 0x00000066, 0x66422111, 0x11112246, 0x66666600, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x66666666, 0x66666666, 0x66600000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00666666, 0x66666666, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA6E0_425350
|
|
||||||
.word 0x294CD6B5, 0xB5B18C69, 0x6B614215, 0x294D0001, 0x00010001, 0x00010001, 0x00010001, 0xFFEBAAC9
|
|
||||||
|
|
||||||
dlabel D_802AA700_425370
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802A98E0_424550, D_802A9A00_424670, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA728_425398
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802A9A20_424690, D_802A9B40_4247B0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA750_4253C0
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802A9B60_4247D0, D_802A9C80_4248F0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA778_4253E8
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802A9CA0_424910, D_802A9DC0_424A30, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA7A0_425410
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802A9DE0_424A50, D_802A9F00_424B70, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA7C8_425438
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802A9F20_424B90, D_802AA040_424CB0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA7F0_425460
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802AA060_424CD0, D_802AA180_424DF0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA818_425488
|
|
||||||
.word 0x00000008, 0x00000013, 0x00000038, 0x00000030, 0x00000004, 0x00000002, 0x0000003C, D_802AA1A0_424E10, D_802AA6E0_425350, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA844_4254B4
|
|
||||||
.word 0x00000000, 0x00000019, 0x00000032, 0x0000004B, 0x00000064, 0x00000064
|
|
||||||
|
|
||||||
dlabel D_802AA85C_4254CC
|
|
||||||
.word 0x00000032, 0x00000032, 0x00000032, 0x00000032, 0x0000004B, 0x0000004B, 0x0000004B, 0x00000064, 0x00000064, 0x00000064, 0x00000064
|
|
||||||
|
|
||||||
dlabel D_802AA888_4254F8
|
|
||||||
.word D_802AA7F0_425460, D_802AA7C8_425438, D_802AA7A0_425410, D_802AA778_4253E8, D_802AA750_4253C0, D_802AA728_425398
|
|
||||||
|
|
||||||
dlabel D_802AA8A0_425510
|
|
||||||
.byte 0x80, 0x2A, 0xA7, 0x00, 0x80, 0x2A, 0xA7, 0x00, 0x80, 0x2A, 0xA7, 0x28, 0x80, 0x2A, 0xA7, 0x50, 0x80, 0x2A, 0xA7, 0x50, 0x00, 0x00, 0x00
|
|
||||||
|
|
||||||
dlabel D_802AA8B7_425527
|
|
||||||
.byte 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01
|
|
||||||
|
|
||||||
dlabel jtbl_802AA8E0_425550
|
|
||||||
.word L802A9338_423FA8, L802A93DC_42404C, L802A972C_42439C, L802A972C_42439C, L802A972C_42439C, L802A972C_42439C, L802A972C_42439C, L802A972C_42439C, L802A972C_42439C, L802A972C_42439C, L802A9464_4240D4, L802A94AC_42411C, L802A970C_42437C, 0, 0, 0
|
|
@ -1,12 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9800_426970
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9802_426972
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
|
||||||
|
|
||||||
dlabel jtbl_802A9820_426990
|
|
||||||
.word L802A92D4_426444, L802A9330_4264A0, L802A96C4_426834, L802A96C4_426834, L802A96C4_426834, L802A96C4_426834, L802A96C4_426834, L802A96C4_426834, L802A96C4_426834, L802A96C4_426834, L802A9388_4264F8, L802A93E8_426558, L802A9680_4267F0, 0, 0, 0
|
|
@ -1,21 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9950_427320
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9952_427322
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B
|
|
||||||
|
|
||||||
dlabel D_802A9964_427334
|
|
||||||
.word 0x00000028, 0x00000046, 0x00000063, 0x000000C8
|
|
||||||
|
|
||||||
dlabel D_802A9974_427344
|
|
||||||
.word 0x00000023, 0x0000003C, 0x00000050, 0x00000063, 0x000000C8
|
|
||||||
|
|
||||||
dlabel D_802A9988_427358
|
|
||||||
.word 0x00000023, 0x00000023, 0x0000003C, 0x00000050, 0x00000063, 0x000000C8
|
|
||||||
|
|
||||||
dlabel jtbl_802A99A0_427370
|
|
||||||
.word L802A92E4_426CB4, L802A9340_426D10, L802A9818_4271E8, L802A9818_4271E8, L802A9818_4271E8, L802A9818_4271E8, L802A9818_4271E8, L802A9818_4271E8, L802A9818_4271E8, L802A9818_4271E8, L802A9398_426D68, L802A9400_426DD0, L802A97F8_4271C8, 0, 0, 0
|
|
@ -1,12 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9810_428280
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9812_428282
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
|
||||||
|
|
||||||
dlabel jtbl_802A9830_4282A0
|
|
||||||
.word L802A92D4_427D44, L802A9330_427DA0, L802A96D4_428144, L802A96D4_428144, L802A96D4_428144, L802A96D4_428144, L802A96D4_428144, L802A96D4_428144, L802A96D4_428144, L802A96D4_428144, L802A9388_427DF8, L802A93E8_427E58, L802A96B4_428124, 0, 0, 0
|
|
@ -1,9 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9850_4292C0
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9852_4292C2
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
|
@ -1,15 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9760_42A480
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9762_42A482
|
|
||||||
.short 0x012C, 0x0000, 0x012C, 0x0000, 0x0109, 0x0000, 0x00DC, 0x0000, 0x00AF, 0x0000, 0x00AF
|
|
||||||
|
|
||||||
dlabel D_802A9778_42A498
|
|
||||||
.word 0x0000012C, 0x0000012C, 0x00000109, 0x000000DC, 0x000000AF, 0x000000AF
|
|
||||||
|
|
||||||
dlabel jtbl_802A9790_42A4B0
|
|
||||||
.word L802A9254_429F74, L802A92B0_429FD0, L802A9618_42A338, L802A9618_42A338, L802A9618_42A338, L802A9618_42A338, L802A9618_42A338, L802A9618_42A338, L802A9618_42A338, L802A9618_42A338, L802A9308_42A028, L802A936C_42A08C, L802A95F8_42A318, 0, 0, 0
|
|
@ -1,84 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802AA160_42B650
|
|
||||||
.word 0x00000000, 0x00007770, 0x00000000, 0x00000000, 0x00777777, 0x00000000, 0x00000000, 0x0778D1D7, 0x70000000, 0x00000007, 0x77B1111D, 0x77000000, 0x00000777, 0x91111111, 0xB7700000, 0x0000777E, 0x11111111, 0xB7700000, 0x00007711, 0x11111111, 0xA7700000, 0x00007711, 0x11111111, 0x77000000, 0x000077A2, 0x222B222D, 0x77000000, 0x00000779, 0x2B77222B, 0x77000000, 0x00000087, 0x777B333A, 0x70000000, 0x00000007, 0x77733337, 0x70000000, 0x00000000, 0x77A444D7, 0x70000000, 0x00000000, 0x774444C7, 0x70000000, 0x00000007, 0x775555A7, 0x00000000, 0x00000007, 0x7D555577, 0x00000000, 0x00000077, 0x76666D77, 0x00000000, 0x00000077, 0x66666A77, 0x00000000, 0x00000078, 0x66666770, 0x00000000, 0x00000078, 0x6666D770, 0x00000000, 0x00000077, 0xD666C770, 0x00000000, 0x00000077, 0x7D667700, 0x00000000, 0x00000007, 0x77777700, 0x00000000, 0x00000000, 0x77777000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA280_42B770
|
|
||||||
.word 0xBDE0FEED, 0xFEE9FFAB, 0xCBD9E4DB, 0xFDDF288F, 0x294F498D, 0x62537B19, 0x93DFB4E5, 0xDE2FFFFF
|
|
||||||
|
|
||||||
dlabel D_802AA2A0_42B790
|
|
||||||
.word 0x00000000, 0x07777770, 0x00000000, 0x00000007, 0x77777777, 0x70000000, 0x00000087, 0xA111111D, 0x77000000, 0x0000777B, 0x11111111, 0xD7700000, 0x000777D1, 0x11111111, 0x11870000, 0x00777111, 0x11111111, 0x11B70000, 0x07771111, 0x11DD1111, 0x11B70000, 0x077E1111, 0x1777A111, 0x11B70000, 0x07772222, 0x77778222, 0x22770000, 0x00787227, 0x70772222, 0x27700000, 0x00078777, 0x07733333, 0x87000000, 0x00007870, 0x78333337, 0x80000000, 0x00000007, 0x74444477, 0x77700000, 0x00000078, 0x44444777, 0x77770000, 0x00000785, 0x5555777A, 0x55A77000, 0x00007855, 0x55577AD5, 0x555D7800, 0x00078666, 0x667AD666, 0x66667700, 0x00776666, 0x66DE6666, 0x666D7700, 0x00776666, 0x66666666, 0x6D777000, 0x0077C666, 0x6666666C, 0x77770000, 0x00077A66, 0x6666DA77, 0x87000000, 0x00007776, 0x66C77777, 0x00000000, 0x00000777, 0x77777700, 0x00000000, 0x00000007, 0x77700000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA3C0_42B8B0
|
|
||||||
.word 0xBDE0FEED, 0xFEE9FFAB, 0xCBD9E4DB, 0xFDDF288F, 0x294F498D, 0x62537B19, 0x93DFB4E5, 0xDE2FFFFF
|
|
||||||
|
|
||||||
dlabel D_802AA3E0_42B8D0
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00888888, 0x00000000, 0x00000000, 0x77787788, 0x77000000, 0x00000077, 0x7B111111, 0xD7700000, 0x00007779, 0x11111111, 0x1D770000, 0x000777D1, 0x11111111, 0x11D77000, 0x00077111, 0x111A7C11, 0x11177000, 0x00077111, 0x11777711, 0x11177000, 0x00077222, 0x27707722, 0x22D77000, 0x0000772D, 0x77077222, 0x2D770000, 0x00000777, 0x70873333, 0xA7700000, 0x00000000, 0x0773333A, 0x77000000, 0x00000000, 0x07744449, 0x77000000, 0x00000000, 0x00774444, 0xA7700000, 0x00000787, 0x77077555, 0x5D770000, 0x000077D5, 0x57707755, 0x55D77000, 0x00077D66, 0x66977796, 0x66667700, 0x00078666, 0x666B7776, 0x66667700, 0x00077966, 0x6666DCD6, 0x66667700, 0x0000777D, 0x66666666, 0x66D77000, 0x00000777, 0xA6666666, 0x6A770000, 0x00000077, 0x7766666D, 0x77700000, 0x00000000, 0x77777777, 0x77000000, 0x00000000, 0x00777777, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA500_42B9F0
|
|
||||||
.word 0xBDE0FEED, 0xFEE9FFAB, 0xCBD9E4DB, 0xFDDF288F, 0x294F498D, 0x62537B19, 0x93DFB4E5, 0xDE2FFFFF
|
|
||||||
|
|
||||||
dlabel D_802AA520_42BA10
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x07777770, 0x00000000, 0x00000000, 0x77777777, 0x70000000, 0x00000007, 0x771111D7, 0x77000000, 0x00000007, 0x7D111111, 0x77700000, 0x00000077, 0xB1111111, 0xB7700000, 0x00000077, 0x11111111, 0x1B770000, 0x0000077D, 0x111E77D1, 0x11877000, 0x00007782, 0x222B7772, 0x22277000, 0x000077D2, 0x22E77072, 0x222B7700, 0x00077833, 0x33B78073, 0x33337700, 0x00077D33, 0x3E770073, 0x33337700, 0x00778444, 0x4B780074, 0x44447700, 0x0077D444, 0x47700074, 0x44447700, 0x00775555, 0x58780775, 0x55557700, 0x00775555, 0x558777B5, 0x555D7700, 0x0077D666, 0x66687B66, 0x66677000, 0x00077666, 0x66666666, 0x66777000, 0x00077766, 0x66666666, 0xD7770000, 0x00007776, 0x6666666D, 0x77700000, 0x00000777, 0x666666D7, 0x77000000, 0x00000077, 0x7D666D77, 0x70000000, 0x00000007, 0x77777777, 0x00000000, 0x00000000, 0x07777700, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA640_42BB30
|
|
||||||
.word 0xBDE0FEED, 0xFEE9FFAB, 0xCBD9E4DB, 0xFDDF288F, 0x294F498D, 0x62537B19, 0x93DFB4E5, 0xDE2FFFFF
|
|
||||||
|
|
||||||
dlabel D_802AA660_42BB50
|
|
||||||
.word 0x000000BD, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEED00, 0x000DDE77, 0x77777777, 0x77777777, 0x777777C0, 0x0DEE78F8, 0xF8F8F8F8, 0xF8F8F8F8, 0xF8F87DB0, 0xE7FFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFEDCB0, 0xEEEEEEEE, 0x66666777, 0x8888FFFF, 0xFFDDCCB0, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEDDDCB0, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEDDCCB0, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEDDDCB0, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEDDCCB0, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEDDDCB0, 0xEEEEEEEE, 0xCCCEEEEE, 0xCCCEEEEE, 0xEEDDCCB0, 0xEEEEEEEE, 0xCAAEEEEE, 0xCAAEEEEE, 0xEEDDDCB0, 0xDEEEEEEE, 0xAAAEEEEE, 0xAAAEEEEE, 0xEEDDCCB0, 0xDEEEEEEE, 0xAAAEEEEE, 0xAAAEEEEE, 0xEEDDDCB0, 0xDEEEEEEE, 0xAAAEEEEE, 0xAAAEEEEE, 0xEEDDCCB0, 0xDEEEEEEE, 0xAAAEEEEE, 0xAAAEEEEE, 0xEEEDDCB0, 0xDEEEEEEE, 0xAAAEEEEE, 0xAAAEEEEE, 0xEEEDCCB0, 0xCEEEEEEE, 0xAAAEEEEE, 0xAAAEEEEE, 0xEEEDDCB0, 0xCEEEEEEE, 0xCCCEEEEE, 0xCCCEEEEE, 0xEEEDCCB0, 0xCEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDDCD0, 0xBEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDCCD0, 0xBEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDDCD0, 0xBEEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDCCC0, 0xBDEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDDCB0, 0x0DEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDCC00, 0x0DEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDDC00, 0x0BEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDCC00, 0x0BEEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDD000, 0x00BEEEEE, 0xEEEEEEEE, 0xEEEEEEEE, 0xEEEDC000, 0x000BBBBB, 0xBBBBBBBB, 0xBBBBBBBB, 0xBBBB0000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AA860_42BD50
|
|
||||||
.word 0xBDE0FFC1, 0xFFC1FFC1, 0xFFC1FFC1, 0x1AB122F3, 0x2B35FFC1, 0x005300D9, 0x016101A7, 0x0A2D3377
|
|
||||||
|
|
||||||
dlabel D_802AA880_42BD70
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000011, 0x11111111, 0x10000000, 0x00000000, 0x00000000, 0x00001111, 0x11111111, 0x11100000, 0x00000000, 0x00000000, 0x0011118A, 0xDFFFFFDA, 0x81111000, 0x00000000, 0x00000000, 0x1112AFFF, 0xFFFFFFFF, 0xFFA21110, 0x00000000, 0x00000001, 0x11AFFFFF, 0xFFFFFFFF, 0xFFFFA111, 0x00000000, 0x00000011, 0x2DFFFFFF, 0xFFFFFFFF, 0xFFFFFD21, 0x10000000, 0x00000112, 0xDFFFFFFF, 0xDDCBCDDF, 0xFFFFFFD2, 0x11000000, 0x0000112D, 0xFFFFFFD7, 0x65555567, 0xDFFFFFFD, 0x21100000, 0x000011DF, 0xFFFFD955, 0x55555555, 0x59DFFFFF, 0xD1100000, 0x00011AFF, 0xFFFB6555, 0x55555555, 0x556BFFFF, 0xFA110000, 0x00012FFF, 0xFFB65555, 0x67999765, 0x5556BFFF, 0xFF210000, 0x0011AFFF, 0xFD655557, 0x9BCCCB97, 0x55556DFF, 0xFFA11000, 0x0011FFFF, 0xF955559B, 0xCCCCCCCB, 0x955559FF, 0xFFF11000, 0x0118FFFF, 0xD55559CC, 0xCCCCCCCC, 0xC95555DF, 0xFFF81100, 0x011AFFFF, 0x75557BCC, 0xCCCCCCCC, 0xCB75557F, 0xFFFA1100, 0x011DFFFD, 0x65569CCC, 0xCCCCCCCC, 0xCC96556D, 0xFFFD1100, 0x011FFFFD, 0x6557BCCC, 0xCCCCCCCC, 0xCCB7555D, 0xFFFF1100, 0x011FFFFC, 0x5559CCCC, 0xCCCCCCCC, 0xCCC9555C, 0xFFFF1100, 0x011FFFFB, 0x5559CCCC, 0xCCCCCCCC, 0xCCC9555B, 0xFFFF1100, 0x011FFFFC, 0x5559CCCC, 0xCCCCCCCC, 0xCCC9555C, 0xFFFF1100, 0x011FFFFD, 0x6557BCCC, 0xCCCCCCCC, 0xCCB7555D, 0xFFFF1100, 0x011DFFFD, 0x65569CCC, 0xCCCCCCCC, 0xCC96556D, 0xFFFD1100, 0x011AFFFF, 0x95557BCC, 0xCCCCCCCC, 0xCB75559F, 0xFFFA1100, 0x0118FFFF, 0xD55559CC, 0xCCCCCCCC, 0xC95555DF, 0xFFF81100, 0x0011FFFF, 0xF755559B, 0xCCCCCCCB, 0x955557FF, 0xFFF11000, 0x0011AFFF, 0xFD655557, 0x9BCCCB97, 0x55556DFF, 0xFFA11000, 0x00012FFF, 0xFFB65555, 0x67999765, 0x5556BFFF, 0xFF210000, 0x00011AFF, 0xFFFB6555, 0x55555555, 0x556BFFFF, 0xFA110000, 0x000011DF, 0xFFFFD955, 0x55555555, 0x59DFFFFF, 0xD1100000, 0x0000112D, 0xFFFFFFD7, 0x65555569, 0xDFFFFFFD, 0x21100000, 0x00000112, 0xDFFFFFFF, 0xDDCBCDDF, 0xFFFFFFD2, 0x11000000, 0x00000011, 0x2DFFFFFF, 0xFFFFFFFF, 0xFFFFFD21, 0x10000000, 0x00000001, 0x11AFFFFF, 0xFFFFFFFF, 0xFFFFA111, 0x00000000, 0x00000000, 0x1112AFFF, 0xFFFFFFFF, 0xFFA21110, 0x00000000, 0x00000000, 0x0011118A, 0xDFFFFFDA, 0x81111000, 0x00000000, 0x00000000, 0x00001111, 0x11111111, 0x11100000, 0x00000000, 0x00000000, 0x00000011, 0x11111111, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AABA0_42C090
|
|
||||||
.word 0x52924101, 0x6A41318D, 0x294BA941, 0xBA01C281, 0xA3C1CB81, 0xBC81E481, 0xFD01E5C1, 0x294BFE81
|
|
||||||
|
|
||||||
dlabel D_802AABC0_42C0B0
|
|
||||||
.word 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000001, 0x22111122, 0x00000000, 0x00000000, 0x00000000, 0x00000211, 0x11111111, 0x11000000, 0x00000000, 0x00000000, 0x00001112, 0x7ACEDCA5, 0x21120000, 0x00000000, 0x00000000, 0x0001139C, 0xEFFFFFFE, 0xC7212000, 0x00000000, 0x00000000, 0x00115CDE, 0xFFFFFFFF, 0xEEA21200, 0x00000000, 0x00000000, 0x0115CCEF, 0xFFFFFFFF, 0xFEDA2100, 0x00000000, 0x00000000, 0x012CCDEF, 0xFFFFFFFF, 0xFFDC7110, 0x00000000, 0x00000011, 0x116CDEFF, 0xFFFFFFFF, 0xFFEDA212, 0x20000000, 0x00002112, 0x44ADEEFF, 0xFFFFFFFF, 0xFFEDC511, 0x11100000, 0x0002129C, 0xFEEEEFFF, 0xFFFFFFFF, 0xFFFEDB9A, 0x83110000, 0x00212CEF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFEEFF, 0xFD811000, 0x0011AEFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFE81100, 0x0214EEFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFEE5120, 0x0119EEFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFEEB110, 0x011DEEEF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFEED210, 0x012CDEEE, 0xEFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFEEEC210, 0x011BCDDE, 0xEEFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE, 0xEEDDC110, 0x0216CDDD, 0xEEEEEEFF, 0xFFFFFFFF, 0xFFFEEEEE, 0xEDCC6110, 0x00117BCD, 0xDEEEEEEF, 0xFFFFFFFF, 0xFEEEEEDD, 0xDCCA1100, 0x000117BC, 0xDDEEEEEE, 0xEFFFFFEE, 0xEEEEEEDD, 0xCCB31200, 0x000015BB, 0xCDDDDDEE, 0xEEEEEEEE, 0xEDDDDDDC, 0xC9211000, 0x000015BB, 0xCCCDDDDD, 0xEEEEEEEE, 0xDDDDDCCC, 0xC5110000, 0x000017BB, 0xBCCCCCCD, 0xDDDEEEED, 0xDDCCCCCC, 0xC7100000, 0x000016BB, 0xBBCCCCCC, 0xCDDDDDDD, 0xCCBBBCCC, 0xC7100000, 0x000014BB, 0xBBBBBBCC, 0xCCCCCCCC, 0xCBBBBBBB, 0xB5100000, 0x0000119B, 0xBBBBBBBB, 0xBBBBBBBB, 0xBBBBBBBB, 0xB2100000, 0x0000212A, 0xBBBBBBBB, 0xBBBBBBBB, 0xBBBBBBBB, 0x61100000, 0x00000112, 0x69ABBBBB, 0xBBBBBBBB, 0xBBBBBA96, 0x11000000, 0x00000011, 0x11444ABB, 0xBBBBBBBB, 0xBB688741, 0x10000000, 0x00000000, 0x111114AB, 0xBBBBBBBB, 0xB9111111, 0x00000000, 0x00000000, 0x00021126, 0x9BBBBBB9, 0x72122000, 0x00000000, 0x00000000, 0x00001111, 0x14677631, 0x11200000, 0x00000000, 0x00000000, 0x00000011, 0x11111111, 0x10000000, 0x00000000, 0x00000000, 0x00000000, 0x02222220, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AAEE0_42C3D0
|
|
||||||
.word 0x84202991, 0x31D34257, 0x4A995B1D, 0x635F73E3, 0x7C258CA9, 0x9D2BADAF, 0xBDF1CE75, 0xDEF7EF7B
|
|
||||||
|
|
||||||
dlabel D_802AAF00_42C3F0
|
|
||||||
.word 0x00000000, 0x00077777, 0x00000000, 0x00000000, 0x00777777, 0x70000000, 0x00000000, 0x07771111, 0x77000000, 0x00000000, 0x07711111, 0x17000000, 0x00000000, 0x77B11111, 0xC7000000, 0x00000000, 0x7911111C, 0x77000000, 0x00000007, 0x7D1111B7, 0x70000000, 0x00000077, 0xB1111B77, 0x70000000, 0x00000077, 0x22222227, 0x77000000, 0x0000077D, 0x22222222, 0x77000000, 0x00007793, 0x33373333, 0x77700000, 0x00007733, 0x33B77333, 0x78700000, 0x00077D44, 0xED777444, 0x77770000, 0x00079444, 0xD7777444, 0x44770000, 0x00775555, 0xC777B555, 0x55B77000, 0x00775555, 0x55555555, 0x55D77000, 0x0077D666, 0x66666666, 0x66677000, 0x00777D66, 0x66666669, 0x77777000, 0x00077777, 0x77766667, 0x77770000, 0x00000777, 0x77766667, 0x70000000, 0x00000000, 0x077666C7, 0x70000000, 0x00000000, 0x0776C977, 0x70000000, 0x00000000, 0x07777770, 0x00000000, 0x00000000, 0x00777000, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB020_42C510
|
|
||||||
.word 0xBDE0FEED, 0xFEE9FFAB, 0xCBD9E4DB, 0xFDDF288F, 0x294F498D, 0x62537B19, 0x93DFB4E5, 0xDE2FFFFF
|
|
||||||
|
|
||||||
dlabel D_802AB040_42C530
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802AA160_42B650, D_802AA280_42B770, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB068_42C558
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802AA2A0_42B790, D_802AA3C0_42B8B0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB090_42C580
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802AA3E0_42B8D0, D_802AA500_42B9F0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB0B8_42C5A8
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802AA520_42BA10, D_802AA640_42BB30, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB0E0_42C5D0
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000002, 0x00000004, 0x00000002, 0x0000003C, D_802AAF00_42C3F0, D_802AB020_42C510, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB108_42C5F8
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000003, 0x00000004, 0x00000002, 0x0000003C, D_802AA660_42BB50, D_802AA860_42BD50, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB130_42C620
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000013, 0x00000004, 0x00000002, 0x0000003C, D_802AA880_42BD70, D_802AABA0_42C090, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB158_42C648
|
|
||||||
.word 0x00000008, 0x00000005, 0x00000013, 0x00000004, 0x00000002, 0x0000003C, D_802AABC0_42C0B0, D_802AAEE0_42C3D0, 0x00000003, 0x00000000
|
|
||||||
|
|
||||||
dlabel D_802AB180_42C670
|
|
||||||
.word D_802AB0B8_42C5A8
|
|
||||||
|
|
||||||
dlabel D_802AB184_42C674
|
|
||||||
.word D_802AB040_42C530, D_802AB068_42C558, D_802AB090_42C580, D_802AB0E0_42C5D0, D_802AB0E0_42C5D0, D_802AB0E0_42C5D0, D_802AB0E0_42C5D0, D_802AB0E0_42C5D0, D_802AB0E0_42C5D0, 0x00000000, 0x00000000
|
|
||||||
|
|
||||||
dlabel jtbl_802AB1B0_42C6A0
|
|
||||||
.word L802A94D0_42A9C0, L802A9628_42AB18, L802AA000_42B4F0, L802AA000_42B4F0, L802AA000_42B4F0, L802AA000_42B4F0, L802AA000_42B4F0, L802AA000_42B4F0, L802AA000_42B4F0, L802AA000_42B4F0, L802A9798_42AC88, L802A97E4_42ACD4, L802A98A8_42AD98, L802A9B04_42AFF4, L802A9D7C_42B26C, L802AA000_42B4F0, L802A9F8C_42B47C, L802A9FE0_42B4D0, 0, 0
|
|
@ -1,9 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A97C0_42CEB0
|
|
||||||
.word HudScript_PressAButton, HudScript_PressBButton, HudScript_PressCDownButton
|
|
||||||
|
|
||||||
dlabel D_802A97CC_42CEBC
|
|
||||||
.word HudScript_AButtonDown, 0x80292348, 0x8029265C, 0x00000000, 0x00000000
|
|
@ -1,9 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9AA0_42D9B0
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9AA2_42D9B2
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
|
@ -1,12 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A9860_42F680
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A9862_42F682
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
|
||||||
|
|
||||||
dlabel jtbl_802A9880_42F6A0
|
|
||||||
.word L802A929C_42F0BC, L802A92F8_42F118, L802A9724_42F544, L802A9724_42F544, L802A9724_42F544, L802A9724_42F544, L802A9724_42F544, L802A9724_42F544, L802A9724_42F544, L802A9724_42F544, L802A9368_42F188, L802A93D0_42F1F0, L802A9704_42F524, 0, 0, 0
|
|
@ -1,12 +0,0 @@
|
|||||||
.include "macro.inc"
|
|
||||||
|
|
||||||
.section .data
|
|
||||||
|
|
||||||
dlabel D_802A98E0_42FFC0
|
|
||||||
.short 0x0000
|
|
||||||
|
|
||||||
dlabel D_802A98E2_42FFC2
|
|
||||||
.short 0x0000, 0x0000, 0x0019, 0x0000, 0x0032, 0x0000, 0x004B, 0x0000, 0x004B, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000
|
|
||||||
|
|
||||||
dlabel jtbl_802A9900_42FFE0
|
|
||||||
.word L802A92E8_42F9C8, L802A9368_42FA48, L802A9794_42FE74, L802A9794_42FE74, L802A9794_42FE74, L802A9794_42FE74, L802A9794_42FE74, L802A9794_42FE74, L802A9794_42FE74, L802A9794_42FE74, L802A93F0_42FAD0, L802A9450_42FB30, L802A9750_42FE30, 0, 0, 0
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user