Misc matches & cleanup (#868)

* yaml updates

* 2 funcs & cleanup

* anotha 1

* re-org

* PR & cleanup
This commit is contained in:
Ethan Roseman 2022-11-24 03:33:39 +09:00 committed by GitHub
parent c776b32bc6
commit 78c30637f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
36 changed files with 329 additions and 832 deletions

View File

@ -2256,28 +2256,6 @@ typedef struct UnkEntityStruct {
/* 0x38 */ f32 unk_38; /* 0x38 */ f32 unk_38;
} UnkEntityStruct; // size = 0x3C } UnkEntityStruct; // size = 0x3C
typedef struct EntityModel {
/* 0x00 */ s32 flags;
/* 0x04 */ s8 renderMode;
/* 0x05 */ u8 unk_05;
/* 0x06 */ u8 unk_06;
/* 0x07 */ u8 unk_07;
/* 0x08 */ f32 nextFrameTime; ///< Set to 1.0 after each update
/* 0x0C */ f32 timeScale; ///< Default is 1.0
/* 0x10 */ s32* cmdListReadPos;
/* 0x14 */ union {
Gfx* displayList;
SpriteRasterInfo* imageData;
} gfx;
/* 0x18 */ Mtx transform;
/* 0x58 */ s32* cmdListSavedPos;
/* 0x5C */ Vec3s* vertexArray;
/* 0x60 */ void (*fpSetupGfxCallback)(void*);
/* 0x64 */ void* setupGfxCallbackArg0;
} EntityModel; // size = 0x68
typedef EntityModel* EntityModelList[MAX_ENTITY_MODELS];
typedef struct VirtualEntity { typedef struct VirtualEntity {
/* 0x00 */ s32 entityModelIndex; /* 0x00 */ s32 entityModelIndex;
/* 0x04 */ Vec3f pos; /* 0x04 */ Vec3f pos;
@ -2522,4 +2500,11 @@ typedef struct LavaPiranhaVine {
/* 0x1DC */ s32 numPoints; /* 0x1DC */ s32 numPoints;
} LavaPiranhaVine; } LavaPiranhaVine;
// TODO look into making options here better. it's really an array of 5 substructs, each having and [8][2] array
typedef struct PlayerCelebrationAnimOptions {
/* 0x00 */ s16 randomChance;
/* 0x02 */ s16 hpBasedChance;
/* 0x04 */ s32 options[0];
} PlayerCelebrationAnimOptions; // size = 0x8
#endif #endif

View File

@ -442,4 +442,35 @@ extern EntityBlueprint Entity_TrumpetPlant;
extern EntityBlueprint Entity_Munchlesia; extern EntityBlueprint Entity_Munchlesia;
extern EntityBlueprint Entity_ArrowSign; extern EntityBlueprint Entity_ArrowSign;
typedef struct EntityModel {
/* 0x00 */ s32 flags;
/* 0x04 */ s8 renderMode;
/* 0x05 */ u8 unk_05;
/* 0x06 */ u8 unk_06;
/* 0x07 */ u8 unk_07;
/* 0x08 */ f32 nextFrameTime; ///< Set to 1.0 after each update
/* 0x0C */ f32 timeScale; ///< Default is 1.0
/* 0x10 */ EntityModelScript* cmdListReadPos;
/* 0x14 */ union {
Gfx* displayList;
SpriteRasterInfo* imageData;
} gfx;
/* 0x18 */ Mtx transform;
/* 0x58 */ EntityModelScript* cmdListSavedPos;
/* 0x5C */ Vec3s* vertexArray;
/* 0x60 */ void (*fpSetupGfxCallback)(void*);
/* 0x64 */ void* setupGfxCallbackArg0;
} EntityModel; // size = 0x68
typedef EntityModel* EntityModelList[MAX_ENTITY_MODELS];
EntityModel* get_entity_model(s32 idx);
s32 load_entity_model(EntityModelScript* cmdList);
s32 ALT_load_entity_model(EntityModelScript* cmdList);
void entity_set_render_script(Entity* entity, EntityModelScript* cmdList);
void set_entity_model_render_command_list(s32 idx, EntityModelScript* cmdList);
void virtual_entity_list_render_world(void);
void virtual_entity_list_render_UI(void);
#endif #endif

View File

@ -2520,7 +2520,7 @@ enum Phases {
PHASE_FIRST_STRIKE = 1, PHASE_FIRST_STRIKE = 1,
PHASE_RUN_AWAY_START = 3, PHASE_RUN_AWAY_START = 3,
PHASE_RUN_AWAY_RESET = 4, PHASE_RUN_AWAY_RESET = 4,
PHASE_5 = 5, PHASE_CELEBRATE = 5,
PHASE_USE_DEFEND = 6, PHASE_USE_DEFEND = 6,
PHASE_RUN_AWAY_FAIL = 7, PHASE_RUN_AWAY_FAIL = 7,
PHASE_USE_LIFE_SHROOM = 8, PHASE_USE_LIFE_SHROOM = 8,

View File

@ -78,11 +78,9 @@ f32 func_800E5348(void);
void draw_number(s32 value, s32 x, s32 y, s32 variableWidthChars, s32 palette, s32 opacity, u16 style); void draw_number(s32 value, s32 x, s32 y, s32 variableWidthChars, s32 palette, s32 opacity, u16 style);
void set_entity_model_render_command_list(s32 idx, u32* commandList);
void set_entity_model_flags(s32 idx, s32 newFlags); void set_entity_model_flags(s32 idx, s32 newFlags);
void clear_entity_model_flags(s32 idx, s32 newFlags); void clear_entity_model_flags(s32 idx, s32 newFlags);
void exec_entity_model_commandlist(s32 idx); void exec_entity_model_commandlist(s32 idx);
s32 load_entity_model(s32* cmdList);
RenderTask* queue_render_task(RenderTask* task); RenderTask* queue_render_task(RenderTask* task);
s32 create_mesh_animator(s16* animPos, s16* animBuffer); s32 create_mesh_animator(s16* animPos, s16* animBuffer);
@ -795,7 +793,6 @@ typedef union {
s32 create_worker_world(WorldArgs, WorldArgs); s32 create_worker_world(WorldArgs, WorldArgs);
void init_entity_models(void); void init_entity_models(void);
EntityModel* get_entity_model(s32 idx);
f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z); f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z);
void fold_update(u32, FoldType, s32, s32, s32, s32, s32); void fold_update(u32, FoldType, s32, s32, s32, s32, s32);
s32 fold_appendGfx_component(s32, FoldImageRecPart*, u32, Matrix4f); s32 fold_appendGfx_component(s32, FoldImageRecPart*, u32, Matrix4f);
@ -834,7 +831,6 @@ s32 entity_base_block_idle(Entity* entity);
void add_SP(s32 amt); void add_SP(s32 amt);
s32 recover_hp(s32 amt); s32 recover_hp(s32 amt);
s32 recover_fp(s32 amt); s32 recover_fp(s32 amt);
void entity_set_render_script(Entity* entity, u32* commandList);
s32 entity_can_collide_with_jumping_player(Entity* entity); s32 entity_can_collide_with_jumping_player(Entity* entity);
void entity_base_block_init(Entity* entity); void entity_base_block_init(Entity* entity);
s32 entity_start_script(Entity* entity); s32 entity_start_script(Entity* entity);

View File

@ -23,47 +23,50 @@ extern ActorBlueprint battle_partner_lakilester;
extern ActorBlueprint battle_partner_bow; extern ActorBlueprint battle_partner_bow;
extern ActorBlueprint battle_partner_twink; extern ActorBlueprint battle_partner_twink;
s16 D_80280FC0[] = { PlayerCelebrationAnimOptions D_80280FC0 = {
10, 90, 0, 50, 10, 90,
3, 11, 0, 50, {
1, 45, 0, 0, 50, 196619,
0, 0, 0, 0, 50, ANIM_Mario_1002D,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 50, 0, 0,
1, 49, 0, 50, 0, 0,
1, 49, 0, 0, 50, ANIM_Mario_DustOff,
0, 0, 0, 0, 50, ANIM_Mario_DustOff,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 50, 0, 0,
1, 50, 0, 50, 0, 0,
1, 50, 0, 0, 50, ANIM_Mario_ThumbsUp,
0, 0, 0, 0, 50, ANIM_Mario_ThumbsUp,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 50, 0, 0,
3, 10, 0, 50, 0, 0,
3, 10, 0, 0, 50, ANIM_Mario_3000A,
0, 0, 0, 0, 50, ANIM_Mario_3000A,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 80, 0, 0,
3, 10, 0, 20, 0, 0,
3, 11, 0, 0, 80, ANIM_Mario_3000A,
0, 0, 0, 0, 20, ANIM_Mario_3000B,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0,
0, 0,
0, 0,
}
}; };
s32 bActorNames[ACTOR_TYPE_COUNT] = { s32 bActorNames[ACTOR_TYPE_COUNT] = {
@ -2714,7 +2717,7 @@ void func_8024EFE0(f32 x, f32 y, f32 z, s32 numMessages, s32 arg4, s32 arg5) {
for (i = 0; i < numMessages; i++, message++) { for (i = 0; i < numMessages; i++, message++) {
sp10 = &D_80283744[numMessages]; sp10 = &D_80283744[numMessages];
message->unk_00 = 1; message->unk_00 = 1;
message->unk_04 = load_entity_model(**sp10); message->unk_04 = load_entity_model(*sp10);
set_entity_model_flags(message->unk_04, ENTITY_MODEL_FLAGS_HIDDEN); set_entity_model_flags(message->unk_04, ENTITY_MODEL_FLAGS_HIDDEN);
bind_entity_model_setupGfx(message->unk_04, message, func_8024F768); bind_entity_model_setupGfx(message->unk_04, message, func_8024F768);
message->pos.x = x; message->pos.x = x;

View File

@ -551,7 +551,7 @@ void btl_state_update_celebration(void) {
if (partner != NULL) { if (partner != NULL) {
partner->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000); partner->flags &= ~(ACTOR_FLAG_4000000 | ACTOR_FLAG_8000000);
} }
battleStatus->battlePhase = PHASE_5; battleStatus->battlePhase = PHASE_CELEBRATE;
script = start_script(&PlayerScriptDispatcher, EVT_PRIORITY_A, 0); script = start_script(&PlayerScriptDispatcher, EVT_PRIORITY_A, 0);
player->takeTurnScript = script; player->takeTurnScript = script;
player->takeTurnID = script->id; player->takeTurnID = script->id;

View File

@ -10,7 +10,7 @@
extern HudScript HES_Happy; extern HudScript HES_Happy;
extern HudScript HES_HPDrain; extern HudScript HES_HPDrain;
extern EvtScript D_80286194; extern EvtScript PlayerCelebrate;
extern EvtScript D_802988F0; extern EvtScript D_802988F0;
extern EvtScript D_80298724; extern EvtScript D_80298724;
extern EvtScript D_80298948; extern EvtScript D_80298948;
@ -79,8 +79,57 @@ ApiStatus func_80260B70(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80260BF4(Evt* script, s32 isInitialCall); extern PlayerCelebrationAnimOptions D_80280FC0;
INCLUDE_ASM(s32, "18F340", func_80260BF4);
ApiStatus ChoosePlayerCelebrationAnim(Evt* script, s32 isInitialCall) {
PlayerCelebrationAnimOptions* pcao = &D_80280FC0;
PlayerData* playerData = &gPlayerData;
s32 temp;
s32 i;
if (rand_int(pcao->randomChance + pcao->hpBasedChance) < pcao->randomChance) {
temp = 0;
for (i = 0; i < 8; i++) {
temp += pcao->options[i * 2];
}
temp = rand_int(temp);
for (i = 0; i < 8; i++) {
temp -= pcao->options[i * 2];
if (temp <= 0) {
break;
}
}
script->varTable[0] = pcao->options[i * 2 + 1];
} else {
s32* opts;
f32 healthRatio = playerData->curHP / (f32) playerData->curMaxHP;
if (healthRatio <= 0.25) {
opts = &pcao->options[16];
} else if (healthRatio <= 0.5) {
opts = &pcao->options[32];
} else if (healthRatio <= 0.75) {
opts = &pcao->options[48];
} else {
opts = &pcao->options[64];
}
temp = 0;
for (i = 0; i < 8; i++) {
temp += opts[i * 2];
}
temp = rand_int(temp);
for (i = 0; i < 8; i++) {
temp -= opts[i * 2];
if (temp <= 0) {
break;
}
}
script->varTable[0] = opts[i * 2 + 1];
}
return ApiStatus_DONE2;
}
ApiStatus func_80260DB8(Evt* script, s32 isInitialCall) { ApiStatus func_80260DB8(Evt* script, s32 isInitialCall) {
gBattleStatus.flags1 |= BS_FLAGS1_ENEMY_FLED; gBattleStatus.flags1 |= BS_FLAGS1_ENEMY_FLED;
@ -683,8 +732,8 @@ EvtScript PlayerScriptDispatcher = {
EVT_EXEC_WAIT(ExecutePlayerAction) EVT_EXEC_WAIT(ExecutePlayerAction)
EVT_CASE_EQ(PHASE_FIRST_STRIKE) EVT_CASE_EQ(PHASE_FIRST_STRIKE)
EVT_EXEC_WAIT(PlayerFirstStrike) EVT_EXEC_WAIT(PlayerFirstStrike)
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(D_80286194) EVT_EXEC_WAIT(PlayerCelebrate)
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(RunAwayStart) EVT_EXEC_WAIT(RunAwayStart)
EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL) EVT_CASE_EQ(PHASE_RUN_AWAY_FAIL)
@ -986,14 +1035,14 @@ EvtScript HandleEvent_Player = {
EVT_END EVT_END
}; };
EvtScript D_80286194 = { EvtScript PlayerCelebrate = {
EVT_SET(LVar0, 0) EVT_SET(LVar0, 0)
EVT_LOOP(5) EVT_LOOP(5)
EVT_ADD(LVar0, 72) EVT_ADD(LVar0, 72)
EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0) EVT_CALL(SetActorYaw, ACTOR_SELF, LVar0)
EVT_WAIT(1) EVT_WAIT(1)
EVT_END_LOOP EVT_END_LOOP
EVT_CALL(func_80260BF4) EVT_CALL(ChoosePlayerCelebrationAnim)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar0) EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, LVar0)
EVT_WAIT(31) EVT_WAIT(31)
EVT_RETURN EVT_RETURN

View File

@ -1770,9 +1770,9 @@ s32 is_player_action_state(s8 actionState) {
return actionState == gPlayerStatus.actionState; return actionState == gPlayerStatus.actionState;
} }
void entity_set_render_script(Entity* entity, u32* commandList) { void entity_set_render_script(Entity* entity, EntityModelScript* cmdList) {
if (!(entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) { if (!(entity->flags & ENTITY_FLAGS_HAS_ANIMATED_MODEL)) {
set_entity_model_render_command_list(entity->virtualModelIndex, commandList); set_entity_model_render_command_list(entity->virtualModelIndex, cmdList);
} }
} }

View File

@ -118,23 +118,16 @@ void au_bgm_update_main(BGMPlayer* player) {
} }
} }
// Return values are being pushed into v0 in the wrong place
// May depend on data decomp
#ifdef NON_EQUIVALENT
BGMPlayer* au_bgm_get_player_with_song_name(s32 songString) { BGMPlayer* au_bgm_get_player_with_song_name(s32 songString) {
SndGlobals* globals = gBGMPlayerA->data; if (songString != gBGMPlayerA->globals->dataBGM[0]->name) {
if (songString == gBGMPlayerA->globals->dataBGM[1]->name) {
if (songString == globals->dataBGM[0]->name) { return gBGMPlayerB;
}
} else {
return gBGMPlayerA; return gBGMPlayerA;
} }
if (songString == globals->dataBGM[1]->name) {
return gBGMPlayerB;
}
return NULL; return NULL;
} }
#else
INCLUDE_ASM(BGMPlayer*, "audio/28910_len_5090", au_bgm_get_player_with_song_name, s32 songString);
#endif
AuResult au_bgm_dispatch_player_event(SongUpdateEvent* event) { AuResult au_bgm_dispatch_player_event(SongUpdateEvent* event) {
BGMPlayer* player; BGMPlayer* player;
@ -929,7 +922,7 @@ void au_bgm_load_subsegment(BGMPlayer* player, u32 cmd) {
s32 nextRelativePos; s32 nextRelativePos;
s32 bUsesPolyphony; s32 bUsesPolyphony;
s32 i; s32 i;
nextRelativePos = 0; nextRelativePos = 0;
bUsesPolyphony = FALSE; bUsesPolyphony = FALSE;
player->subSegmentStartPos = AU_FILE_RELATIVE(player->segmentStartPos, (cmd & 0xFFFF) << 2); player->subSegmentStartPos = AU_FILE_RELATIVE(player->segmentStartPos, (cmd & 0xFFFF) << 2);
@ -950,10 +943,10 @@ void au_bgm_load_subsegment(BGMPlayer* player, u32 cmd) {
track->unk_51 = parentTrack->unk_51; track->unk_51 = parentTrack->unk_51;
track->unk_52 = parentTrack->unk_52; track->unk_52 = parentTrack->unk_52;
track->unk_53 = parentTrack->unk_53; track->unk_53 = parentTrack->unk_53;
track->bgmReadPos = (track->bgmReadPos + (s32)player->subSegmentStartPos); track->bgmReadPos = (track->bgmReadPos + (s32)player->subSegmentStartPos);
track->delayTime = 1; track->delayTime = 1;
track->parentTrackIdx = parentIdx; track->parentTrackIdx = parentIdx;
if (player->unk_233 != 0) { if (player->unk_233 != 0) {
track->unk_5A = 1; track->unk_5A = 1;
@ -968,7 +961,7 @@ void au_bgm_load_subsegment(BGMPlayer* player, u32 cmd) {
track->unk_52 = nextRelativePos; track->unk_52 = nextRelativePos;
nextRelativePos += count; nextRelativePos += count;
track->unk_53 = nextRelativePos; track->unk_53 = nextRelativePos;
track->bgmReadPos = (track->bgmReadPos + (s32)player->subSegmentStartPos); track->bgmReadPos = (track->bgmReadPos + (s32)player->subSegmentStartPos);
track->delayTime = 1; track->delayTime = 1;
} }
@ -1375,9 +1368,9 @@ void au_bgm_player_update_playing(BGMPlayer *player) {
} }
if (track->changed.volume) { if (track->changed.volume) {
voice->adjustedVolume = ( voice->adjustedVolume = (
((((player->masterVolume >> 0x15) ((((player->masterVolume >> 0x15)
* (track->subTrackVolume >> 0x15)) * (track->subTrackVolume >> 0x15))
* (track->unkVolume >> 0x15)) >> 0x14) * (track->unkVolume >> 0x15)) >> 0x14)
* (track->segTrackVolume * note->volume)) >> 0x10; * (track->segTrackVolume * note->volume)) >> 0x10;
voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED; voice->unk_flags_3D |= AU_VOICE_3D_FLAGS_VOL_CHANGED;
} }

View File

@ -339,7 +339,7 @@ void func_800522A8(AuAmbienceManager* arg0, AuAmbPlayer* lambda) {
AlUnkOmega* omega = lambda->unk_1D4; AlUnkOmega* omega = lambda->unk_1D4;
u32 copied = 0; u32 copied = 0;
s32 i; s32 i;
for (i = lambda->firstVoiceIdx; i < lambda->lastVoiceIdx; i++) { for (i = lambda->firstVoiceIdx; i < lambda->lastVoiceIdx; i++) {
AlUnkIota* iota = &arg0->mseqVoiceStates[i - lambda->firstVoiceIdx]; AlUnkIota* iota = &arg0->mseqVoiceStates[i - lambda->firstVoiceIdx];
@ -366,7 +366,7 @@ void func_8005232C(AuAmbienceManager* manager, AuAmbPlayer* lambda) {
AlUnkIota* iota; AlUnkIota* iota;
AlUnkXi* xi; AlUnkXi* xi;
u32 i, j; u32 i, j;
globals = manager->globals; globals = manager->globals;
if (lambda->playState == MSEQ_PLAYER_PLAYING) { if (lambda->playState == MSEQ_PLAYER_PLAYING) {
for (i = 0; i < ARRAY_COUNT(lambda->unk_1D4); i++) { for (i = 0; i < ARRAY_COUNT(lambda->unk_1D4); i++) {
@ -392,7 +392,7 @@ void func_8005232C(AuAmbienceManager* manager, AuAmbPlayer* lambda) {
} }
} }
} }
if (j < lambda->lastVoiceIdx) { if (j < lambda->lastVoiceIdx) {
iota = &manager->mseqVoiceStates[j - lambda->firstVoiceIdx]; iota = &manager->mseqVoiceStates[j - lambda->firstVoiceIdx];
iota->unk_00.s32 = lambda->unk_14.s32 + (omega->unk_00 << 0x10) + (omega->unk_01 << 8); iota->unk_00.s32 = lambda->unk_14.s32 + (omega->unk_00 << 0x10) + (omega->unk_01 << 8);

View File

@ -1,169 +1,100 @@
#include "sleepy_sheep.h" #include "sleepy_sheep.h"
#include "entity.h" #include "entity.h"
#include "ld_addrs.h" #include "ld_addrs.h"
#include "effects.h"
#include "battle/item/sleepy_sheep1.png.h" #include "battle/item/sleepy_sheep1.png.h"
#include "battle/item/sleepy_sheep2.png.h" #include "battle/item/sleepy_sheep2.png.h"
#include "battle/item/sleepy_sheep3.png.h" #include "battle/item/sleepy_sheep3.png.h"
#include "ItemRefund.inc.c" #include "ItemRefund.inc.c"
s32 virtual_entity_create(EntityModelScript*);
void virtual_entity_set_pos(s32, s32, s32, s32); void virtual_entity_set_pos(s32, s32, s32, s32);
void virtual_entity_set_scale(s32, f32, f32, f32); void virtual_entity_set_scale(s32, f32, f32, f32);
void virtual_entity_delete_by_index(s32); void virtual_entity_delete_by_index(s32);
#ifdef NON_EQUIVALENT extern s32 D_802A3E88_7214D8[];
extern EntityModelScript* D_802A3F28_721578[10];
extern f32 D_802A3F00_721550[];
extern Vec3f D_802A3F88; extern Vec3f D_802A3F88;
extern s32* D_802A3F58; extern s32 D_802A3F58[10];
s32 N(D_802A3E88_7214D8)[] = { ApiStatus N(func_802A123C_71E88C)(Evt* script, s32 isInitialCall) {
0, 0 Vec3f* posPtr = &D_802A3F88;
}; s32 entityID;
f32 x, y, z;
s32 N(D_802A3E88_7214E0)[] = { s32 cond;
0x00000000,
0xFFFFFFE2, 0x00000000, 0xFFFFFFCE,
0xFFFFFFE5, 0x00000000, 0x0000001E,
0xFFFFFFBA, 0x00000000, 0xFFFFFFFB,
0xFFFFFF97, 0x00000000, 0x0000001E,
0xFFFFFF92, 0x00000000, 0xFFFFFFCE,
0xFFFFFF6F, 0x00000000, 0xFFFFFFFB,
0xFFFFFF56, 0x00000000, 0xFFFFFFCE,
0xFFFFFF42, 0x00000000, 0xFFFFFFE2,
0xFFFFFF2E, 0x00000000, 0xFFFFFFF6
};
f32 N(D_802A3F00_721550)[] = {
0x3F800000, 0x3F800000, 0x3F400000, 0x3F800000,
0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000,
0x3F400000, 0x3F400000
};
s32 N(D_802A3F28_721578)[] = {
0x802A3260, 0x802A32A0, 0x802A32E0, 0x802A3260,
0x802A32A0, 0x802A32E0, 0x802A3260, 0x802A32A0,
0x802A32E0, 0x802A3260
};
ApiStatus func_802A123C_71E88C(Evt* script, s32 isInitialCall) {
s32 i; s32 i;
Vec3f vecf;
s32 flag;
Vec3f* D_802A3F88_ptr = &D_802A3F88;
s32* D_802A3E88_7214D8_ptr1; // = &N(D_802A3E88_7214D8);
s32* D_802A3E88_7214D8_ptr2; // = &N(D_802A3E88_7214D8);
s32* D_802A3E88_7214D8_ptr3; // = &N(D_802A3E88_7214D8);
s32* D_802A3F58_ptr;
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[0] = 0; script->functionTemp[0] = 0;
} }
switch (script->functionTemp[0]) { switch (script->functionTemp[0]) {
case 0: { case 0:
s32* D_802A3F28_721578_ptr = &N(D_802A3F28_721578); posPtr->x = -200.0f;
s32 loop1, loop2, loop3; posPtr->z = 10.0f;
D_802A3F58_ptr = &D_802A3F58; for (i = 0; i < ARRAY_COUNT(D_802A3F58); i++) {
entityID = D_802A3F58[i] = virtual_entity_create(D_802A3F28_721578[i]);
D_802A3F88_ptr->x = -200.0f; x = D_802A3E88_7214D8[i * 3] + posPtr->x;
D_802A3F88_ptr->z = 10.0f; y = D_802A3E88_7214D8[i * 3 + 1];
z = D_802A3E88_7214D8[i * 3 + 2] + posPtr->z;
D_802A3E88_7214D8_ptr1 = N(D_802A3E88_7214D8) + 0; virtual_entity_set_pos(entityID, x, y, z);
D_802A3E88_7214D8_ptr2 = N(D_802A3E88_7214D8) + 1; virtual_entity_set_scale(entityID, D_802A3F00_721550[i], D_802A3F00_721550[i], 1.0f);
D_802A3E88_7214D8_ptr3 = N(D_802A3E88_7214D8) + 2;
for (i = 0; i < 10; i++) {
D_802A3F58_ptr[i] = virtual_entity_create(D_802A3F28_721578_ptr[i]);
virtual_entity_set_pos(D_802A3F58_ptr[i],
*D_802A3E88_7214D8_ptr1 + D_802A3F88_ptr->x,
*D_802A3E88_7214D8_ptr2,
*D_802A3E88_7214D8_ptr3 + D_802A3F88_ptr->z);
virtual_entity_set_scale(D_802A3F58_ptr[i], N(D_802A3F00_721550)[i], N(D_802A3F00_721550)[i], 1.0f);
D_802A3E88_7214D8_ptr1 += i * 3 + 0;
D_802A3E88_7214D8_ptr2 += i * 3 + 1;
D_802A3E88_7214D8_ptr3 += i * 3 + 2;
} }
script->functionTemp[1] = (gGameStatusPtr->frameCounter % 10) & 0xFFFF;
script->functionTemp[0] = 1; script->functionTemp[0] = 1;
script->functionTemp[1] = gGameStatusPtr->frameCounter % 10; break;
}
break;
case 1: case 1:
D_802A3F88.x += 6.0f; posPtr->x += 6.0f;
if (gGameStatusPtr->frameCounter % 3 == 0) { cond = FALSE;
script->functionTemp[1]++; if (!((gGameStatusPtr->frameCounter % 3) & 0xFFFF)) {
script->functionTemp[1] %= 10; script->functionTemp[1] = (script->functionTemp[1] + 1) % 10;
} }
flag = 0; for (i = 0; i < ARRAY_COUNT(D_802A3F58); i++) {
D_802A3F58_ptr = &D_802A3F58; entityID = D_802A3F58[i];
D_802A3E88_7214D8_ptr1 = N(D_802A3E88_7214D8); x = D_802A3E88_7214D8[i * 3] + posPtr->x;
D_802A3E88_7214D8_ptr2 = N(D_802A3E88_7214D8); y = D_802A3E88_7214D8[i * 3 + 1];
D_802A3E88_7214D8_ptr3 = N(D_802A3E88_7214D8); z = D_802A3E88_7214D8[i * 3 + 2] + posPtr->z;
for (i = 0; i < 10; i++) { virtual_entity_set_pos(entityID, x, y, z);
f32 x, y, z; if (!cond && script->functionTemp[1] == i && !((gGameStatusPtr->frameCounter % 5) & 0xFFFF)) {
if (x > 0.0f) {
D_802A3E88_7214D8_ptr1 += i * 3 + 0; y = x;
D_802A3E88_7214D8_ptr2 += i * 3 + 1; if (x > 100.0f) {
D_802A3E88_7214D8_ptr3 += i * 3 + 2; y = x - 50.0f;
x = *D_802A3E88_7214D8_ptr1 + D_802A3F88.x;
y = *D_802A3E88_7214D8_ptr2;
z = *D_802A3E88_7214D8_ptr3 + D_802A3F88.z;
virtual_entity_set_pos(D_802A3F58_ptr[i], x, y, z);
if (flag == 0 && script->functionTemp[1] == i) {
f32 x2, y2;
if (gGameStatusPtr->frameCounter % 5 == 0) {
y2 = y;
if (x > 0.0f) {
x2 = x;
if (x > 100.0f) {
x2 = x - 50.0f;
}
y2 = rand_int(x2);
} }
x2 = x; y = rand_int(y);
if (x > 40.0f) {
x2 = -(x - 40.0f);
}
fx_landing_dust(3, x2, y2, z, 0);
flag = 1;
} }
if (x > 40.0f) {
x = -(x - 40.0f);
}
fx_landing_dust(3, x, y, z, 0.0f);
cond = TRUE;
} }
D_802A3E88_7214D8_ptr1 += 0xC;
D_802A3E88_7214D8_ptr2 += 0xC;
D_802A3E88_7214D8_ptr3 += 0xC;
} }
if (gGameStatusPtr->frameCounter & 1) { if (gGameStatusPtr->frameCounter & 1) {
s32 randIdx = rand_int(9); s32 randIdx = rand_int(9);
fx_landing_dust(2, N(D_802A3E88_7214D8)[randIdx * 3 + 0] + D_802A3F88_ptr->x,
N(D_802A3E88_7214D8)[randIdx * 3 + 1], x = D_802A3E88_7214D8[randIdx * 3] + posPtr->x;
N(D_802A3E88_7214D8)[randIdx * 3 + 2] + D_802A3F88_ptr->z, 0); y = D_802A3E88_7214D8[randIdx * 3 + 1];
z = D_802A3E88_7214D8[randIdx * 3 + 2] + posPtr->z;
fx_landing_dust(2, x, y, z, 0.0f);
} }
if (D_802A3F88_ptr->x >= 320.0f) { if (posPtr->x >= 320.0f) {
script->functionTemp[0] = 2; script->functionTemp[0] = 2;
break;
} }
return ApiStatus_DONE2; break;
case 2: case 2:
for (i = 0; i < 10; i++) { for (i = 0; i < ARRAY_COUNT(D_802A3F58); i++) {
virtual_entity_delete_by_index(*(&D_802A3F58 + i)); virtual_entity_delete_by_index(D_802A3F58[i]);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
#else
INCLUDE_ASM(ApiStatus, "battle/item/sleepy_sheep", battle_item_sleepy_sheep_func_802A123C_71E88C,
Evt* script, s32 isInitialCall);
#endif
ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall) { ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -181,7 +112,7 @@ ApiStatus N(func_802A1740_71ED90)(Evt* script, s32 isInitialCall) {
Actor* targetActor = get_actor(target->actorID); Actor* targetActor = get_actor(target->actorID);
ActorPart* targetPart = get_actor_part(targetActor, target->partID); ActorPart* targetPart = get_actor_part(targetActor, target->partID);
if ((targetActor->transparentStatus == 0) && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) { if (targetActor->transparentStatus == 0 && !(targetPart->eventFlags & ACTOR_EVENT_FLAG_ILLUSORY)) {
targetActor->yaw += 33.0f; targetActor->yaw += 33.0f;
targetActor->yaw = clamp_angle(targetActor->yaw); targetActor->yaw = clamp_angle(targetActor->yaw);
} }
@ -199,13 +130,13 @@ ApiStatus N(func_802A1848_71EE98)(Evt* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 i; s32 i;
s32 ret; s32 cond;
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[0] = 0; script->functionTemp[0] = 0;
} }
ret = 0; cond = FALSE;
for (i = 0; i < player->targetListLength; i++) { for (i = 0; i < player->targetListLength; i++) {
s8 targetIdx = player->targetIndexList[i]; s8 targetIdx = player->targetIndexList[i];
@ -220,13 +151,16 @@ ApiStatus N(func_802A1848_71EE98)(Evt* script, s32 isInitialCall) {
if (targetActor->yaw >= 360.0f) { if (targetActor->yaw >= 360.0f) {
targetActor->yaw = 360.0f; targetActor->yaw = 360.0f;
} }
ret = 1; cond = TRUE;
} }
} }
} }
} }
return (ret == 0) * ApiStatus_DONE2; if (!cond) {
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
} }
#include "UseItem.inc.c" #include "UseItem.inc.c"
@ -323,7 +257,7 @@ EntityModelScript N(modelCommandList) = {
ems_End ems_End
}; };
EntityModelScript N(modelCommandList_unused1) = { EntityModelScript N(modelCommandList2) = {
ems_SetRenderMode(RENDER_MODE_ALPHATEST) ems_SetRenderMode(RENDER_MODE_ALPHATEST)
ems_Draw(N(frame2_displayList),3) ems_Draw(N(frame2_displayList),3)
ems_Draw(N(frame1_displayList),2) ems_Draw(N(frame1_displayList),2)
@ -333,7 +267,7 @@ EntityModelScript N(modelCommandList_unused1) = {
ems_End ems_End
}; };
EntityModelScript N(modelCommandList_unused2) = { EntityModelScript N(modelCommandList3) = {
ems_SetRenderMode(RENDER_MODE_ALPHATEST) ems_SetRenderMode(RENDER_MODE_ALPHATEST)
ems_Draw(N(frame1_displayList), 2) ems_Draw(N(frame1_displayList), 2)
ems_Draw(N(frame3_displayList), 2) ems_Draw(N(frame3_displayList), 2)
@ -494,5 +428,29 @@ EvtScript N(main) = {
}; };
s32 D_802A3E88_7214D8[] = { s32 D_802A3E88_7214D8[] = {
0, 0 0, 0, 0,
-30, 0, -50,
-27, 0, 30,
-70, 0, -5,
-105, 0, 30,
-110, 0, -50,
-145, 0, -5,
-170, 0, -50,
-190, 0, -30,
-210, 0, -10,
};
f32 D_802A3F00_721550[] = { 1.0f, 1.0f, 0.75f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.75f, 0.75f };
EntityModelScript* D_802A3F28_721578[] = {
&N(modelCommandList),
&N(modelCommandList2),
&N(modelCommandList3),
&N(modelCommandList),
&N(modelCommandList2),
&N(modelCommandList3),
&N(modelCommandList),
&N(modelCommandList2),
&N(modelCommandList3),
&N(modelCommandList)
}; };

View File

@ -595,7 +595,7 @@ EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(firstStrike)) EVT_EXEC_WAIT(N(firstStrike))
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -310,7 +310,7 @@ EvtScript N(takeTurn) = {
EVT_SWITCH(LVar0) EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -645,7 +645,7 @@ EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(firstStrike)) EVT_EXEC_WAIT(N(firstStrike))
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -140,7 +140,7 @@ EvtScript N(takeTurn) = {
EVT_SWITCH(LVar0) EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -346,7 +346,7 @@ EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(firstStrike)) EVT_EXEC_WAIT(N(firstStrike))
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -267,7 +267,7 @@ EvtScript N(takeTurn) = {
EVT_SWITCH(LVar0) EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -781,7 +781,7 @@ EvtScript N(takeTurn) = {
EVT_EXEC_WAIT(N(firstStrike)) EVT_EXEC_WAIT(N(firstStrike))
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -549,7 +549,7 @@ EvtScript N(takeTurn) = {
EVT_SWITCH(LVar0) EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -173,7 +173,7 @@ EvtScript N(takeTurn) = {
EVT_SWITCH(LVar0) EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -622,7 +622,7 @@ EvtScript N(takeTurn) = {
EVT_SWITCH(LVar0) EVT_SWITCH(LVar0)
EVT_CASE_EQ(PHASE_EXECUTE_ACTION) EVT_CASE_EQ(PHASE_EXECUTE_ACTION)
EVT_EXEC_WAIT(N(executeAction)) EVT_EXEC_WAIT(N(executeAction))
EVT_CASE_EQ(PHASE_5) EVT_CASE_EQ(PHASE_CELEBRATE)
EVT_EXEC_WAIT(N(celebrate)) EVT_EXEC_WAIT(N(celebrate))
EVT_CASE_EQ(PHASE_RUN_AWAY_START) EVT_CASE_EQ(PHASE_RUN_AWAY_START)
EVT_EXEC_WAIT(N(runAway)) EVT_EXEC_WAIT(N(runAway))

View File

@ -192,8 +192,8 @@ void entity_HeartBlockContent__anim_heal(Entity* entity, s32 arg1) {
data->state++; data->state++;
entity->flags &= ~ENTITY_FLAGS_ALWAYS_FACE_CAMERA; entity->flags &= ~ENTITY_FLAGS_ALWAYS_FACE_CAMERA;
data->rotationRate = -10.0f; data->rotationRate = -10.0f;
entity_set_render_script(entity, Entity_HeartBlockContent_RenderScriptHit); entity_set_render_script(entity, &Entity_HeartBlockContent_RenderScriptHit);
entity->renderSetupFunc = &entity_HeartBlockContent_setupGfx; entity->renderSetupFunc = entity_HeartBlockContent_setupGfx;
} }
break; break;
case 2: case 2:
@ -340,7 +340,7 @@ void entity_HeartBlockContent_init(Entity* entity) {
void entity_HeartBlockContent_reset(Entity* entity) { void entity_HeartBlockContent_reset(Entity* entity) {
entity_HeartBlockContent__reset(entity); entity_HeartBlockContent__reset(entity);
entity_set_render_script(entity, Entity_HeartBlockContent_RenderScriptIdle); entity_set_render_script(entity, &Entity_HeartBlockContent_RenderScriptIdle);
} }
void entity_HeartBlockContent_idle(Entity* entity) { void entity_HeartBlockContent_idle(Entity* entity) {
@ -353,7 +353,7 @@ void entity_HeartBlockContent_anim_heal(Entity* entity) {
} }
void entity_HeartBlock_change_render_script(Entity* entity) { void entity_HeartBlock_change_render_script(Entity* entity) {
entity_set_render_script(entity, Entity_HeartBlockContent_RenderScriptAfterHit); entity_set_render_script(entity, &Entity_HeartBlockContent_RenderScriptAfterHit);
} }
void entity_HeartBlock_show_tutorial_message(Entity* entity) { void entity_HeartBlock_show_tutorial_message(Entity* entity) {

View File

@ -319,7 +319,7 @@ void entity_HiddenPanel_init(Entity* entity) {
if (gCurrentHiddenPanels.panelsCount & 1) { if (gCurrentHiddenPanels.panelsCount & 1) {
dlist = Gfx_AltHiddenPanel_RenderTop; dlist = Gfx_AltHiddenPanel_RenderTop;
entity_set_render_script(entity, ERS_AltHiddenPanel); entity_set_render_script(entity, &ERS_AltHiddenPanel);
} else { } else {
dlist = Gfx_HiddenPanel_RenderTop; dlist = Gfx_HiddenPanel_RenderTop;
} }

View File

@ -229,7 +229,7 @@ s32 entity_WoodenCrate_idle(Entity* entity) {
if (shouldBreak) { if (shouldBreak) {
entity_WoodenCrate_reset_fragments(entity); entity_WoodenCrate_reset_fragments(entity);
entity_set_render_script(entity, Entity_WoodenCrate_RenderShatteredScript); entity_set_render_script(entity, &Entity_WoodenCrate_RenderShatteredScript);
entity_start_script(entity); entity_start_script(entity);
exec_entity_commandlist(entity); exec_entity_commandlist(entity);
sfx_play_sound(SOUND_20AE); sfx_play_sound(SOUND_20AE);

View File

@ -226,7 +226,7 @@ void Entity_BoardedFloor_shatter(Entity* entity) {
data->fragmentPosY[i] += 1.0f; data->fragmentPosY[i] += 1.0f;
} }
entity_set_render_script(entity, Entity_BoardedFloor_RenderScriptShattered); entity_set_render_script(entity, &Entity_BoardedFloor_RenderScriptShattered);
} }
EntityScript Entity_BoardedFloor_Script = { EntityScript Entity_BoardedFloor_Script = {

View File

@ -1,6 +1,7 @@
#include "common.h" #include "common.h"
#include "entity.h"
s32 D_8014C260[] = { 0x00000000, 0x00000000 }; EntityModelScript D_8014C260[] = { {ems_End}, {ems_End }};
Lights1 D_8014C268 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0); Lights1 D_8014C268 = gdSPDefLights1(255, 255, 255, 0, 0, 0, 0, 0, 0);
extern EntityModelList gWorldEntityModelList; extern EntityModelList gWorldEntityModelList;
@ -85,7 +86,7 @@ void init_entity_models(void) {
entity_fog_dist_max = 1000; entity_fog_dist_max = 1000;
} }
s32 load_entity_model(s32* cmdList) { s32 load_entity_model(EntityModelScript* cmdList) {
EntityModel* newEntityModel; EntityModel* newEntityModel;
s32 i; s32 i;
@ -123,7 +124,7 @@ s32 load_entity_model(s32* cmdList) {
return i; return i;
} }
s32 ALT_load_entity_model(s32* cmdList) { s32 ALT_load_entity_model(EntityModelScript* cmdList) {
EntityModel* newEntityModel; EntityModel* newEntityModel;
SpriteRasterInfo* imageData; SpriteRasterInfo* imageData;
s32 i; s32 i;
@ -189,7 +190,7 @@ void exec_entity_model_commandlist(s32 idx) {
s32 step_entity_model_commandlist(EntityModel* entityModel) { s32 step_entity_model_commandlist(EntityModel* entityModel) {
SpriteRasterInfo* imageData; SpriteRasterInfo* imageData;
u32* curPos = entityModel->cmdListReadPos; u32* curPos = entityModel->cmdListReadPos[0];
switch (*curPos++) { switch (*curPos++) {
case 0: // kill model case 0: // kill model
free_entity_model_by_ref(entityModel); free_entity_model_by_ref(entityModel);
@ -197,25 +198,25 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) {
case 1: // set display list ptr case 1: // set display list ptr
entityModel->nextFrameTime = (f32) *curPos++; entityModel->nextFrameTime = (f32) *curPos++;
entityModel->gfx.displayList = (Gfx*) *curPos++; entityModel->gfx.displayList = (Gfx*) *curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = (EntityModelScript*) curPos;
break; break;
case 2: // restore saved position case 2: // restore saved position
entityModel->cmdListReadPos = entityModel->cmdListSavedPos; entityModel->cmdListReadPos = entityModel->cmdListSavedPos;
return 1; return 1;
case 3: // set saved position case 3: // set saved position
entityModel->cmdListReadPos = entityModel->cmdListSavedPos = curPos; entityModel->cmdListReadPos = entityModel->cmdListSavedPos = (EntityModelScript*) curPos;
return 1; return 1;
case 4: // set render mode case 4: // set render mode
entityModel->renderMode = *curPos++; entityModel->renderMode = *curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = (EntityModelScript*) curPos;
return 1; return 1;
case 5: // set flags case 5: // set flags
entityModel->flags |= *curPos++; entityModel->flags |= *curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = (EntityModelScript*) curPos;
return 1; return 1;
case 6: // clear flags case 6: // clear flags
entityModel->flags &= ~*curPos++; entityModel->flags &= ~*curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = (EntityModelScript*) curPos;
return 1; return 1;
case 7: // set image data case 7: // set image data
imageData = entityModel->gfx.imageData; imageData = entityModel->gfx.imageData;
@ -224,7 +225,7 @@ s32 step_entity_model_commandlist(EntityModel* entityModel) {
imageData->defaultPal = (PAL_PTR) *curPos++; imageData->defaultPal = (PAL_PTR) *curPos++;
imageData->width = *curPos++; imageData->width = *curPos++;
imageData->height = *curPos++; imageData->height = *curPos++;
entityModel->cmdListReadPos = curPos; entityModel->cmdListReadPos = (EntityModelScript*) curPos;
break; break;
} }
return 0; return 0;
@ -714,17 +715,15 @@ void draw_entity_model_E(s32 modelIdx, Mtx* transformMtx) {
gDPPipeSync(gMasterGfxPos++); gDPPipeSync(gMasterGfxPos++);
} }
void set_entity_model_render_command_list(s32 idx, u32* commandList) { void set_entity_model_render_command_list(s32 idx, EntityModelScript* cmdList) {
u32* phi_a1;
EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK]; EntityModel* entityModel = (*gCurrentEntityModelList)[idx & ~BATTLE_ENTITY_ID_MASK];
if (entityModel != NULL && entityModel->flags) { if (entityModel != NULL && entityModel->flags) {
phi_a1 = commandList; if (cmdList == NULL) {
if (commandList == NULL) { cmdList = D_8014C260;
phi_a1 = D_8014C260;
} }
entityModel->cmdListReadPos = phi_a1; entityModel->cmdListReadPos = cmdList;
entityModel->cmdListSavedPos = phi_a1; entityModel->cmdListSavedPos = cmdList;
entityModel->nextFrameTime = 1.0f; entityModel->nextFrameTime = 1.0f;
entityModel->timeScale = 1.0f; entityModel->timeScale = 1.0f;
} }

View File

@ -1,12 +1,10 @@
#include "common.h" #include "common.h"
#include "entity.h"
extern VirtualEntityList bBattleVirtualEntityList; extern VirtualEntityList bBattleVirtualEntityList;
extern VirtualEntityList wWorldVirtualEntityList; extern VirtualEntityList wWorldVirtualEntityList;
extern VirtualEntityList* gCurrentVirtualEntityListPtr; extern VirtualEntityList* gCurrentVirtualEntityListPtr;
void virtual_entity_list_render_world(void);
void virtual_entity_list_render_UI(void);
s32 ALT_load_entity_model(s32* cmdList);
s32 create_worker_backUI(void (*updateFunc)(void), void (*drawFunc)(void)); s32 create_worker_backUI(void (*updateFunc)(void), void (*drawFunc)(void));
void virtual_entity_appendGfx_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) { void virtual_entity_appendGfx_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
@ -132,7 +130,7 @@ ApiStatus InitVirtualEntityList(Evt* script, s32 isInitialCall) {
ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) { ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
u32* cmdList = (u32*) evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index]; VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index];
virtualEntity->entityModelIndex = load_entity_model(cmdList); virtualEntity->entityModelIndex = load_entity_model(cmdList);
@ -153,7 +151,7 @@ ApiStatus CreateVirtualEntityAt(Evt* script, s32 isInitialCall) {
ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) { ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
s32* unkStructPtr = (s32*)evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*)evt_get_variable(script, *args++);
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;
s32 i; s32 i;
@ -168,7 +166,7 @@ ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
virtualEntity->entityModelIndex = load_entity_model(unkStructPtr); virtualEntity->entityModelIndex = load_entity_model(cmdList);
virtualEntity->pos.x = 0.0f; virtualEntity->pos.x = 0.0f;
virtualEntity->pos.y = 0.0f; virtualEntity->pos.y = 0.0f;
virtualEntity->pos.z = 0.0f; virtualEntity->pos.z = 0.0f;
@ -188,7 +186,7 @@ ApiStatus CreateVirtualEntity(Evt* script, s32 isInitialCall) {
ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) { ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
s32* unkStructPtr = (s32*) evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;
s32 i; s32 i;
@ -203,7 +201,7 @@ ApiStatus CreateVirtualEntity_ALT(Evt* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
virtualEntity->entityModelIndex = ALT_load_entity_model(unkStructPtr); virtualEntity->entityModelIndex = ALT_load_entity_model(cmdList);
virtualEntity->pos.x = 0.0f; virtualEntity->pos.x = 0.0f;
virtualEntity->pos.y = 0.0f; virtualEntity->pos.y = 0.0f;
virtualEntity->pos.z = 0.0f; virtualEntity->pos.z = 0.0f;
@ -231,9 +229,9 @@ ApiStatus DeleteVirtualEntity(Evt* script, s32 isInitialCall) {
ApiStatus SetVirtualEntityRenderCommands(Evt* script, s32 isInitialCall) { ApiStatus SetVirtualEntityRenderCommands(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 index = evt_get_variable(script, *args++); s32 index = evt_get_variable(script, *args++);
u32* commandList = (u32*) evt_get_variable(script, *args++); EntityModelScript* cmdList = (EntityModelScript*) evt_get_variable(script, *args++);
set_entity_model_render_command_list((*gCurrentVirtualEntityListPtr)[index]->entityModelIndex, commandList); set_entity_model_render_command_list((*gCurrentVirtualEntityListPtr)[index]->entityModelIndex, cmdList);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -531,7 +529,7 @@ VirtualEntity* virtual_entity_get_by_index(s32 index) {
return (*gCurrentVirtualEntityListPtr)[index]; return (*gCurrentVirtualEntityListPtr)[index];
} }
VirtualEntity* virtual_entity_create_at_index(s32 index, s32* entityModelData) { VirtualEntity* virtual_entity_create_at_index(s32 index, EntityModelScript* entityModelData) {
VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index]; VirtualEntity* virtualEntity = (*gCurrentVirtualEntityListPtr)[index];
virtualEntity->entityModelIndex = load_entity_model(entityModelData); virtualEntity->entityModelIndex = load_entity_model(entityModelData);
@ -549,7 +547,7 @@ VirtualEntity* virtual_entity_create_at_index(s32 index, s32* entityModelData) {
return (*gCurrentVirtualEntityListPtr)[index]; return (*gCurrentVirtualEntityListPtr)[index];
} }
s32 virtual_entity_create(s32* cmdList) { s32 virtual_entity_create(EntityModelScript* cmdList) {
s32 i; s32 i;
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;
@ -580,7 +578,7 @@ s32 virtual_entity_create(s32* cmdList) {
return i; return i;
} }
VirtualEntity* ALT_virtual_entity_create(s32* cmdList) { VirtualEntity* ALT_virtual_entity_create(EntityModelScript* cmdList) {
s32 i; s32 i;
VirtualEntity* virtualEntity; VirtualEntity* virtualEntity;

View File

@ -1,5 +1,6 @@
#include "common.h" #include "common.h"
#include "npc.h" #include "npc.h"
#include "entity.h"
#include "effects.h" #include "effects.h"
#include "sprite.h" #include "sprite.h"
#include "world/partners.h" #include "world/partners.h"

View File

@ -1,5 +1,6 @@
#include "tst_04.h" #include "tst_04.h"
#include "sprite.h" #include "sprite.h"
#include "entity.h"
#include "model.h" #include "model.h"
void N(worker_render_player_reflection)(void); void N(worker_render_player_reflection)(void);

View File

@ -1,4 +1,5 @@
#include "tst_11.h" #include "tst_11.h"
#include "entity.h"
#include "sprite.h" #include "sprite.h"
void N(test_reflection_worker_render_wall)(void); void N(test_reflection_worker_render_wall)(void);

View File

@ -4,6 +4,7 @@
/// See also tst_11, which has a more primitive reflection implementation. /// See also tst_11, which has a more primitive reflection implementation.
#include "common.h" #include "common.h"
#include "entity.h"
#include "npc.h" #include "npc.h"
#include "sprite.h" #include "sprite.h"

View File

@ -1,127 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_80260BF4
/* 18F4D4 80260BF4 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 18F4D8 80260BF8 AFB20018 */ sw $s2, 0x18($sp)
/* 18F4DC 80260BFC 0080902D */ daddu $s2, $a0, $zero
/* 18F4E0 80260C00 AFB00010 */ sw $s0, 0x10($sp)
/* 18F4E4 80260C04 3C108028 */ lui $s0, %hi(D_80280FC0)
/* 18F4E8 80260C08 26100FC0 */ addiu $s0, $s0, %lo(D_80280FC0)
/* 18F4EC 80260C0C AFBF001C */ sw $ra, 0x1c($sp)
/* 18F4F0 80260C10 AFB10014 */ sw $s1, 0x14($sp)
/* 18F4F4 80260C14 86020000 */ lh $v0, ($s0)
/* 18F4F8 80260C18 86040002 */ lh $a0, 2($s0)
/* 18F4FC 80260C1C 0C00A67F */ jal rand_int
/* 18F500 80260C20 00442021 */ addu $a0, $v0, $a0
/* 18F504 80260C24 86030000 */ lh $v1, ($s0)
/* 18F508 80260C28 3C118011 */ lui $s1, %hi(gPlayerData)
/* 18F50C 80260C2C 2631F290 */ addiu $s1, $s1, %lo(gPlayerData)
/* 18F510 80260C30 0043102A */ slt $v0, $v0, $v1
/* 18F514 80260C34 10400019 */ beqz $v0, .L80260C9C
/* 18F518 80260C38 0000202D */ daddu $a0, $zero, $zero
/* 18F51C 80260C3C 0080182D */ daddu $v1, $a0, $zero
/* 18F520 80260C40 0200282D */ daddu $a1, $s0, $zero
.L80260C44:
/* 18F524 80260C44 8CA20004 */ lw $v0, 4($a1)
/* 18F528 80260C48 24630001 */ addiu $v1, $v1, 1
/* 18F52C 80260C4C 00822021 */ addu $a0, $a0, $v0
/* 18F530 80260C50 28620008 */ slti $v0, $v1, 8
/* 18F534 80260C54 1440FFFB */ bnez $v0, .L80260C44
/* 18F538 80260C58 24A50008 */ addiu $a1, $a1, 8
/* 18F53C 80260C5C 0C00A67F */ jal rand_int
/* 18F540 80260C60 00000000 */ nop
/* 18F544 80260C64 0040202D */ daddu $a0, $v0, $zero
/* 18F548 80260C68 0000182D */ daddu $v1, $zero, $zero
/* 18F54C 80260C6C 0200282D */ daddu $a1, $s0, $zero
.L80260C70:
/* 18F550 80260C70 8CA20004 */ lw $v0, 4($a1)
/* 18F554 80260C74 00822023 */ subu $a0, $a0, $v0
/* 18F558 80260C78 18800006 */ blez $a0, .L80260C94
/* 18F55C 80260C7C 000310C0 */ sll $v0, $v1, 3
/* 18F560 80260C80 24630001 */ addiu $v1, $v1, 1
/* 18F564 80260C84 28620008 */ slti $v0, $v1, 8
/* 18F568 80260C88 1440FFF9 */ bnez $v0, .L80260C70
/* 18F56C 80260C8C 24A50008 */ addiu $a1, $a1, 8
/* 18F570 80260C90 000310C0 */ sll $v0, $v1, 3
.L80260C94:
/* 18F574 80260C94 08098364 */ j .L80260D90
/* 18F578 80260C98 34420004 */ ori $v0, $v0, 4
.L80260C9C:
/* 18F57C 80260C9C 82220002 */ lb $v0, 2($s1)
/* 18F580 80260CA0 82230003 */ lb $v1, 3($s1)
/* 18F584 80260CA4 44820000 */ mtc1 $v0, $f0
/* 18F588 80260CA8 00000000 */ nop
/* 18F58C 80260CAC 46800020 */ cvt.s.w $f0, $f0
/* 18F590 80260CB0 44831000 */ mtc1 $v1, $f2
/* 18F594 80260CB4 00000000 */ nop
/* 18F598 80260CB8 468010A0 */ cvt.s.w $f2, $f2
/* 18F59C 80260CBC 46020003 */ div.s $f0, $f0, $f2
/* 18F5A0 80260CC0 3C013FD0 */ lui $at, 0x3fd0
/* 18F5A4 80260CC4 44811800 */ mtc1 $at, $f3
/* 18F5A8 80260CC8 44801000 */ mtc1 $zero, $f2
/* 18F5AC 80260CCC 46000121 */ cvt.d.s $f4, $f0
/* 18F5B0 80260CD0 4622203E */ c.le.d $f4, $f2
/* 18F5B4 80260CD4 00000000 */ nop
/* 18F5B8 80260CD8 45000003 */ bc1f .L80260CE8
/* 18F5BC 80260CDC 00000000 */ nop
/* 18F5C0 80260CE0 0809834D */ j .L80260D34
/* 18F5C4 80260CE4 26100044 */ addiu $s0, $s0, 0x44
.L80260CE8:
/* 18F5C8 80260CE8 3C013FE0 */ lui $at, 0x3fe0
/* 18F5CC 80260CEC 44810800 */ mtc1 $at, $f1
/* 18F5D0 80260CF0 44800000 */ mtc1 $zero, $f0
/* 18F5D4 80260CF4 00000000 */ nop
/* 18F5D8 80260CF8 4620203E */ c.le.d $f4, $f0
/* 18F5DC 80260CFC 00000000 */ nop
/* 18F5E0 80260D00 45000003 */ bc1f .L80260D10
/* 18F5E4 80260D04 00000000 */ nop
/* 18F5E8 80260D08 0809834D */ j .L80260D34
/* 18F5EC 80260D0C 26100084 */ addiu $s0, $s0, 0x84
.L80260D10:
/* 18F5F0 80260D10 3C013FE8 */ lui $at, 0x3fe8
/* 18F5F4 80260D14 44810800 */ mtc1 $at, $f1
/* 18F5F8 80260D18 44800000 */ mtc1 $zero, $f0
/* 18F5FC 80260D1C 00000000 */ nop
/* 18F600 80260D20 4620203E */ c.le.d $f4, $f0
/* 18F604 80260D24 00000000 */ nop
/* 18F608 80260D28 45020002 */ bc1fl .L80260D34
/* 18F60C 80260D2C 26100104 */ addiu $s0, $s0, 0x104
/* 18F610 80260D30 261000C4 */ addiu $s0, $s0, 0xc4
.L80260D34:
/* 18F614 80260D34 0000202D */ daddu $a0, $zero, $zero
/* 18F618 80260D38 0080182D */ daddu $v1, $a0, $zero
/* 18F61C 80260D3C 0200282D */ daddu $a1, $s0, $zero
.L80260D40:
/* 18F620 80260D40 8CA20000 */ lw $v0, ($a1)
/* 18F624 80260D44 24630001 */ addiu $v1, $v1, 1
/* 18F628 80260D48 00822021 */ addu $a0, $a0, $v0
/* 18F62C 80260D4C 28620008 */ slti $v0, $v1, 8
/* 18F630 80260D50 1440FFFB */ bnez $v0, .L80260D40
/* 18F634 80260D54 24A50008 */ addiu $a1, $a1, 8
/* 18F638 80260D58 0C00A67F */ jal rand_int
/* 18F63C 80260D5C 00000000 */ nop
/* 18F640 80260D60 0040202D */ daddu $a0, $v0, $zero
/* 18F644 80260D64 0000182D */ daddu $v1, $zero, $zero
/* 18F648 80260D68 0200282D */ daddu $a1, $s0, $zero
.L80260D6C:
/* 18F64C 80260D6C 8CA20000 */ lw $v0, ($a1)
/* 18F650 80260D70 00822023 */ subu $a0, $a0, $v0
/* 18F654 80260D74 18800006 */ blez $a0, .L80260D90
/* 18F658 80260D78 000310C0 */ sll $v0, $v1, 3
/* 18F65C 80260D7C 24630001 */ addiu $v1, $v1, 1
/* 18F660 80260D80 28620008 */ slti $v0, $v1, 8
/* 18F664 80260D84 1440FFF9 */ bnez $v0, .L80260D6C
/* 18F668 80260D88 24A50008 */ addiu $a1, $a1, 8
/* 18F66C 80260D8C 000310C0 */ sll $v0, $v1, 3
.L80260D90:
/* 18F670 80260D90 00501021 */ addu $v0, $v0, $s0
/* 18F674 80260D94 8C420004 */ lw $v0, 4($v0)
/* 18F678 80260D98 AE420084 */ sw $v0, 0x84($s2)
/* 18F67C 80260D9C 8FBF001C */ lw $ra, 0x1c($sp)
/* 18F680 80260DA0 8FB20018 */ lw $s2, 0x18($sp)
/* 18F684 80260DA4 8FB10014 */ lw $s1, 0x14($sp)
/* 18F688 80260DA8 8FB00010 */ lw $s0, 0x10($sp)
/* 18F68C 80260DAC 24020002 */ addiu $v0, $zero, 2
/* 18F690 80260DB0 03E00008 */ jr $ra
/* 18F694 80260DB4 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,25 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel au_bgm_get_player_with_song_name
/* 28B94 8004D794 3C05800A */ lui $a1, %hi(gBGMPlayerA)
/* 28B98 8004D798 8CA5A664 */ lw $a1, %lo(gBGMPlayerA)($a1)
/* 28B9C 8004D79C 8CA30000 */ lw $v1, ($a1)
/* 28BA0 8004D7A0 8C62005C */ lw $v0, 0x5c($v1)
/* 28BA4 8004D7A4 8C420008 */ lw $v0, 8($v0)
/* 28BA8 8004D7A8 10820009 */ beq $a0, $v0, .L8004D7D0
/* 28BAC 8004D7AC 00000000 */ nop
/* 28BB0 8004D7B0 8C620060 */ lw $v0, 0x60($v1)
/* 28BB4 8004D7B4 8C420008 */ lw $v0, 8($v0)
/* 28BB8 8004D7B8 14820007 */ bne $a0, $v0, .L8004D7D8
/* 28BBC 8004D7BC 00000000 */ nop
/* 28BC0 8004D7C0 3C02800A */ lui $v0, %hi(gBGMPlayerB)
/* 28BC4 8004D7C4 8C42A5FC */ lw $v0, %lo(gBGMPlayerB)($v0)
/* 28BC8 8004D7C8 03E00008 */ jr $ra
/* 28BCC 8004D7CC 00000000 */ nop
.L8004D7D0:
/* 28BD0 8004D7D0 03E00008 */ jr $ra
/* 28BD4 8004D7D4 00A0102D */ daddu $v0, $a1, $zero
.L8004D7D8:
/* 28BD8 8004D7D8 03E00008 */ jr $ra
/* 28BDC 8004D7DC 0000102D */ daddu $v0, $zero, $zero

View File

@ -1,354 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel D_802A3E88_7214E0
.word 0x00000000, 0xFFFFFFE2, 0x00000000, 0xFFFFFFCE, 0xFFFFFFE5, 0x00000000, 0x0000001E, 0xFFFFFFBA, 0x00000000, 0xFFFFFFFB, 0xFFFFFF97, 0x00000000, 0x0000001E, 0xFFFFFF92, 0x00000000, 0xFFFFFFCE, 0xFFFFFF6F, 0x00000000, 0xFFFFFFFB, 0xFFFFFF56, 0x00000000, 0xFFFFFFCE, 0xFFFFFF42, 0x00000000, 0xFFFFFFE2, 0xFFFFFF2E, 0x00000000, 0xFFFFFFF6
dlabel D_802A3F00_721550
.word 0x3F800000, 0x3F800000, 0x3F400000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F800000, 0x3F400000, 0x3F400000
dlabel D_802A3F28_721578
.word battle_item_sleepy_sheep_modelCommandList, 0x802A32A0, 0x802A32E0, battle_item_sleepy_sheep_modelCommandList, 0x802A32A0, 0x802A32E0, battle_item_sleepy_sheep_modelCommandList, 0x802A32A0, 0x802A32E0, battle_item_sleepy_sheep_modelCommandList
.section .text
glabel battle_item_sleepy_sheep_func_802A123C_71E88C
/* 71E88C 802A123C 27BDFFA0 */ addiu $sp, $sp, -0x60
/* 71E890 802A1240 AFBE0038 */ sw $fp, 0x38($sp)
/* 71E894 802A1244 3C1E802A */ lui $fp, %hi(D_802A3F88)
/* 71E898 802A1248 27DE3F88 */ addiu $fp, $fp, %lo(D_802A3F88)
/* 71E89C 802A124C AFBF003C */ sw $ra, 0x3c($sp)
/* 71E8A0 802A1250 AFB70034 */ sw $s7, 0x34($sp)
/* 71E8A4 802A1254 AFB60030 */ sw $s6, 0x30($sp)
/* 71E8A8 802A1258 AFB5002C */ sw $s5, 0x2c($sp)
/* 71E8AC 802A125C AFB40028 */ sw $s4, 0x28($sp)
/* 71E8B0 802A1260 AFB30024 */ sw $s3, 0x24($sp)
/* 71E8B4 802A1264 AFB20020 */ sw $s2, 0x20($sp)
/* 71E8B8 802A1268 AFB1001C */ sw $s1, 0x1c($sp)
/* 71E8BC 802A126C AFB00018 */ sw $s0, 0x18($sp)
/* 71E8C0 802A1270 F7BA0058 */ sdc1 $f26, 0x58($sp)
/* 71E8C4 802A1274 F7B80050 */ sdc1 $f24, 0x50($sp)
/* 71E8C8 802A1278 F7B60048 */ sdc1 $f22, 0x48($sp)
/* 71E8CC 802A127C F7B40040 */ sdc1 $f20, 0x40($sp)
/* 71E8D0 802A1280 10A00002 */ beqz $a1, .L802A128C
/* 71E8D4 802A1284 AFA40060 */ sw $a0, 0x60($sp)
/* 71E8D8 802A1288 AC800070 */ sw $zero, 0x70($a0)
.L802A128C:
/* 71E8DC 802A128C 8FA80060 */ lw $t0, 0x60($sp)
/* 71E8E0 802A1290 8D030070 */ lw $v1, 0x70($t0)
/* 71E8E4 802A1294 24020001 */ addiu $v0, $zero, 1
/* 71E8E8 802A1298 1062005A */ beq $v1, $v0, .L802A1404
/* 71E8EC 802A129C 28620002 */ slti $v0, $v1, 2
/* 71E8F0 802A12A0 10400005 */ beqz $v0, .L802A12B8
/* 71E8F4 802A12A4 24020002 */ addiu $v0, $zero, 2
/* 71E8F8 802A12A8 10600007 */ beqz $v1, .L802A12C8
/* 71E8FC 802A12AC 0000102D */ daddu $v0, $zero, $zero
/* 71E900 802A12B0 080A85C0 */ j .L802A1700
/* 71E904 802A12B4 00000000 */ nop
.L802A12B8:
/* 71E908 802A12B8 10620104 */ beq $v1, $v0, .L802A16CC
/* 71E90C 802A12BC 0000102D */ daddu $v0, $zero, $zero
/* 71E910 802A12C0 080A85C0 */ j .L802A1700
/* 71E914 802A12C4 00000000 */ nop
.L802A12C8:
/* 71E918 802A12C8 0000882D */ daddu $s1, $zero, $zero
/* 71E91C 802A12CC 3C17802A */ lui $s7, %hi(D_802A3F00_721550)
/* 71E920 802A12D0 26F73F00 */ addiu $s7, $s7, %lo(D_802A3F00_721550)
/* 71E924 802A12D4 24160008 */ addiu $s6, $zero, 8
/* 71E928 802A12D8 24150004 */ addiu $s5, $zero, 4
/* 71E92C 802A12DC 3C14802A */ lui $s4, %hi(D_802A3E88_7214D8)
/* 71E930 802A12E0 26943E88 */ addiu $s4, $s4, %lo(D_802A3E88_7214D8)
/* 71E934 802A12E4 3C13802A */ lui $s3, %hi(D_802A3F58)
/* 71E938 802A12E8 26733F58 */ addiu $s3, $s3, %lo(D_802A3F58)
/* 71E93C 802A12EC 3C01C348 */ lui $at, 0xc348
/* 71E940 802A12F0 44810000 */ mtc1 $at, $f0
/* 71E944 802A12F4 3C014120 */ lui $at, 0x4120
/* 71E948 802A12F8 44811000 */ mtc1 $at, $f2
/* 71E94C 802A12FC 3C12802A */ lui $s2, %hi(D_802A3F28_721578)
/* 71E950 802A1300 26523F28 */ addiu $s2, $s2, %lo(D_802A3F28_721578)
/* 71E954 802A1304 E7C00000 */ swc1 $f0, ($fp)
/* 71E958 802A1308 E7C20008 */ swc1 $f2, 8($fp)
.L802A130C:
/* 71E95C 802A130C 8E440000 */ lw $a0, ($s2)
/* 71E960 802A1310 26520004 */ addiu $s2, $s2, 4
/* 71E964 802A1314 0C0B5083 */ jal virtual_entity_create
/* 71E968 802A1318 26310001 */ addiu $s1, $s1, 1
/* 71E96C 802A131C 3C08802A */ lui $t0, %hi(D_802A3E88_7214D8)
/* 71E970 802A1320 25083E88 */ addiu $t0, $t0, %lo(D_802A3E88_7214D8)
/* 71E974 802A1324 02A81821 */ addu $v1, $s5, $t0
/* 71E978 802A1328 AE620000 */ sw $v0, ($s3)
/* 71E97C 802A132C C4740000 */ lwc1 $f20, ($v1)
/* 71E980 802A1330 4680A520 */ cvt.s.w $f20, $f20
/* 71E984 802A1334 0040802D */ daddu $s0, $v0, $zero
/* 71E988 802A1338 0200202D */ daddu $a0, $s0, $zero
/* 71E98C 802A133C 4600A10D */ trunc.w.s $f4, $f20
/* 71E990 802A1340 44062000 */ mfc1 $a2, $f4
/* 71E994 802A1344 3C08802A */ lui $t0, %hi(D_802A3E88_7214D8)
/* 71E998 802A1348 25083E88 */ addiu $t0, $t0, %lo(D_802A3E88_7214D8)
/* 71E99C 802A134C 02C81021 */ addu $v0, $s6, $t0
/* 71E9A0 802A1350 26D6000C */ addiu $s6, $s6, 0xc
/* 71E9A4 802A1354 26B5000C */ addiu $s5, $s5, 0xc
/* 71E9A8 802A1358 C6820000 */ lwc1 $f2, ($s4)
/* 71E9AC 802A135C 468010A0 */ cvt.s.w $f2, $f2
/* 71E9B0 802A1360 C7C00000 */ lwc1 $f0, ($fp)
/* 71E9B4 802A1364 2694000C */ addiu $s4, $s4, 0xc
/* 71E9B8 802A1368 46001580 */ add.s $f22, $f2, $f0
/* 71E9BC 802A136C C7C20008 */ lwc1 $f2, 8($fp)
/* 71E9C0 802A1370 C4400000 */ lwc1 $f0, ($v0)
/* 71E9C4 802A1374 46800020 */ cvt.s.w $f0, $f0
/* 71E9C8 802A1378 46020600 */ add.s $f24, $f0, $f2
/* 71E9CC 802A137C 4600B10D */ trunc.w.s $f4, $f22
/* 71E9D0 802A1380 44052000 */ mfc1 $a1, $f4
/* 71E9D4 802A1384 4600C10D */ trunc.w.s $f4, $f24
/* 71E9D8 802A1388 44072000 */ mfc1 $a3, $f4
/* 71E9DC 802A138C 0C0B50D9 */ jal virtual_entity_set_pos
/* 71E9E0 802A1390 26730004 */ addiu $s3, $s3, 4
/* 71E9E4 802A1394 0200202D */ daddu $a0, $s0, $zero
/* 71E9E8 802A1398 8EE50000 */ lw $a1, ($s7)
/* 71E9EC 802A139C 26F70004 */ addiu $s7, $s7, 4
/* 71E9F0 802A13A0 3C073F80 */ lui $a3, 0x3f80
/* 71E9F4 802A13A4 0C0B50EB */ jal virtual_entity_set_scale
/* 71E9F8 802A13A8 00A0302D */ daddu $a2, $a1, $zero
/* 71E9FC 802A13AC 2A22000A */ slti $v0, $s1, 0xa
/* 71EA00 802A13B0 1440FFD6 */ bnez $v0, .L802A130C
/* 71EA04 802A13B4 00000000 */ nop
/* 71EA08 802A13B8 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 71EA0C 802A13BC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 71EA10 802A13C0 94440134 */ lhu $a0, 0x134($v0)
/* 71EA14 802A13C4 3C02CCCC */ lui $v0, 0xcccc
/* 71EA18 802A13C8 3442CCCD */ ori $v0, $v0, 0xcccd
/* 71EA1C 802A13CC 00820019 */ multu $a0, $v0
/* 71EA20 802A13D0 8FA80060 */ lw $t0, 0x60($sp)
/* 71EA24 802A13D4 24020001 */ addiu $v0, $zero, 1
/* 71EA28 802A13D8 AD020070 */ sw $v0, 0x70($t0)
/* 71EA2C 802A13DC 00004010 */ mfhi $t0
/* 71EA30 802A13E0 000818C2 */ srl $v1, $t0, 3
/* 71EA34 802A13E4 00031080 */ sll $v0, $v1, 2
/* 71EA38 802A13E8 00431021 */ addu $v0, $v0, $v1
/* 71EA3C 802A13EC 00021040 */ sll $v0, $v0, 1
/* 71EA40 802A13F0 00822023 */ subu $a0, $a0, $v0
/* 71EA44 802A13F4 8FA80060 */ lw $t0, 0x60($sp)
/* 71EA48 802A13F8 3084FFFF */ andi $a0, $a0, 0xffff
/* 71EA4C 802A13FC 080A85BF */ j .L802A16FC
/* 71EA50 802A1400 AD040074 */ sw $a0, 0x74($t0)
.L802A1404:
/* 71EA54 802A1404 C7C00000 */ lwc1 $f0, ($fp)
/* 71EA58 802A1408 3C0140C0 */ lui $at, 0x40c0
/* 71EA5C 802A140C 44811000 */ mtc1 $at, $f2
/* 71EA60 802A1410 00000000 */ nop
/* 71EA64 802A1414 46020000 */ add.s $f0, $f0, $f2
/* 71EA68 802A1418 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 71EA6C 802A141C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 71EA70 802A1420 E7C00000 */ swc1 $f0, ($fp)
/* 71EA74 802A1424 94430134 */ lhu $v1, 0x134($v0)
/* 71EA78 802A1428 3C02AAAA */ lui $v0, 0xaaaa
/* 71EA7C 802A142C 3442AAAB */ ori $v0, $v0, 0xaaab
/* 71EA80 802A1430 00620019 */ multu $v1, $v0
/* 71EA84 802A1434 00004010 */ mfhi $t0
/* 71EA88 802A1438 00082042 */ srl $a0, $t0, 1
/* 71EA8C 802A143C 00041040 */ sll $v0, $a0, 1
/* 71EA90 802A1440 00441021 */ addu $v0, $v0, $a0
/* 71EA94 802A1444 00621823 */ subu $v1, $v1, $v0
/* 71EA98 802A1448 3063FFFF */ andi $v1, $v1, 0xffff
/* 71EA9C 802A144C 14600011 */ bnez $v1, .L802A1494
/* 71EAA0 802A1450 0000A82D */ daddu $s5, $zero, $zero
/* 71EAA4 802A1454 8FA80060 */ lw $t0, 0x60($sp)
/* 71EAA8 802A1458 3C026666 */ lui $v0, 0x6666
/* 71EAAC 802A145C 8D040074 */ lw $a0, 0x74($t0)
/* 71EAB0 802A1460 34426667 */ ori $v0, $v0, 0x6667
/* 71EAB4 802A1464 24840001 */ addiu $a0, $a0, 1
/* 71EAB8 802A1468 00820018 */ mult $a0, $v0
/* 71EABC 802A146C 000417C3 */ sra $v0, $a0, 0x1f
/* 71EAC0 802A1470 00004010 */ mfhi $t0
/* 71EAC4 802A1474 00081883 */ sra $v1, $t0, 2
/* 71EAC8 802A1478 00621823 */ subu $v1, $v1, $v0
/* 71EACC 802A147C 00031080 */ sll $v0, $v1, 2
/* 71EAD0 802A1480 00431021 */ addu $v0, $v0, $v1
/* 71EAD4 802A1484 00021040 */ sll $v0, $v0, 1
/* 71EAD8 802A1488 8FA80060 */ lw $t0, 0x60($sp)
/* 71EADC 802A148C 00822023 */ subu $a0, $a0, $v0
/* 71EAE0 802A1490 AD040074 */ sw $a0, 0x74($t0)
.L802A1494:
/* 71EAE4 802A1494 0000882D */ daddu $s1, $zero, $zero
/* 71EAE8 802A1498 3C014220 */ lui $at, 0x4220
/* 71EAEC 802A149C 4481D000 */ mtc1 $at, $f26
/* 71EAF0 802A14A0 24140008 */ addiu $s4, $zero, 8
/* 71EAF4 802A14A4 24130004 */ addiu $s3, $zero, 4
/* 71EAF8 802A14A8 3C16802A */ lui $s6, %hi(D_802A3E88_7214D8)
/* 71EAFC 802A14AC 26D63E88 */ addiu $s6, $s6, %lo(D_802A3E88_7214D8)
/* 71EB00 802A14B0 02C0902D */ daddu $s2, $s6, $zero
/* 71EB04 802A14B4 3C10802A */ lui $s0, %hi(D_802A3F58)
/* 71EB08 802A14B8 26103F58 */ addiu $s0, $s0, %lo(D_802A3F58)
.L802A14BC:
/* 71EB0C 802A14BC 02761021 */ addu $v0, $s3, $s6
/* 71EB10 802A14C0 C4540000 */ lwc1 $f20, ($v0)
/* 71EB14 802A14C4 4680A520 */ cvt.s.w $f20, $f20
/* 71EB18 802A14C8 4600A10D */ trunc.w.s $f4, $f20
/* 71EB1C 802A14CC 44062000 */ mfc1 $a2, $f4
/* 71EB20 802A14D0 C6400000 */ lwc1 $f0, ($s2)
/* 71EB24 802A14D4 46800020 */ cvt.s.w $f0, $f0
/* 71EB28 802A14D8 C7C20000 */ lwc1 $f2, ($fp)
/* 71EB2C 802A14DC 02961021 */ addu $v0, $s4, $s6
/* 71EB30 802A14E0 46020580 */ add.s $f22, $f0, $f2
/* 71EB34 802A14E4 C7C20008 */ lwc1 $f2, 8($fp)
/* 71EB38 802A14E8 C4400000 */ lwc1 $f0, ($v0)
/* 71EB3C 802A14EC 46800020 */ cvt.s.w $f0, $f0
/* 71EB40 802A14F0 46020600 */ add.s $f24, $f0, $f2
/* 71EB44 802A14F4 8E040000 */ lw $a0, ($s0)
/* 71EB48 802A14F8 4600B10D */ trunc.w.s $f4, $f22
/* 71EB4C 802A14FC 44052000 */ mfc1 $a1, $f4
/* 71EB50 802A1500 4600C10D */ trunc.w.s $f4, $f24
/* 71EB54 802A1504 44072000 */ mfc1 $a3, $f4
/* 71EB58 802A1508 0C0B50D9 */ jal virtual_entity_set_pos
/* 71EB5C 802A150C 00000000 */ nop
/* 71EB60 802A1510 56A00038 */ bnel $s5, $zero, .L802A15F4
/* 71EB64 802A1514 2694000C */ addiu $s4, $s4, 0xc
/* 71EB68 802A1518 8FA80060 */ lw $t0, 0x60($sp)
/* 71EB6C 802A151C 8D020074 */ lw $v0, 0x74($t0)
/* 71EB70 802A1520 54510034 */ bnel $v0, $s1, .L802A15F4
/* 71EB74 802A1524 2694000C */ addiu $s4, $s4, 0xc
/* 71EB78 802A1528 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 71EB7C 802A152C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 71EB80 802A1530 94440134 */ lhu $a0, 0x134($v0)
/* 71EB84 802A1534 3C02CCCC */ lui $v0, 0xcccc
/* 71EB88 802A1538 3442CCCD */ ori $v0, $v0, 0xcccd
/* 71EB8C 802A153C 00820019 */ multu $a0, $v0
/* 71EB90 802A1540 00004010 */ mfhi $t0
/* 71EB94 802A1544 00081882 */ srl $v1, $t0, 2
/* 71EB98 802A1548 00031080 */ sll $v0, $v1, 2
/* 71EB9C 802A154C 00431021 */ addu $v0, $v0, $v1
/* 71EBA0 802A1550 00822023 */ subu $a0, $a0, $v0
/* 71EBA4 802A1554 3084FFFF */ andi $a0, $a0, 0xffff
/* 71EBA8 802A1558 54800026 */ bnel $a0, $zero, .L802A15F4
/* 71EBAC 802A155C 2694000C */ addiu $s4, $s4, 0xc
/* 71EBB0 802A1560 44800000 */ mtc1 $zero, $f0
/* 71EBB4 802A1564 00000000 */ nop
/* 71EBB8 802A1568 4616003C */ c.lt.s $f0, $f22
/* 71EBBC 802A156C 00000000 */ nop
/* 71EBC0 802A1570 45000013 */ bc1f .L802A15C0
/* 71EBC4 802A1574 00000000 */ nop
/* 71EBC8 802A1578 3C0142C8 */ lui $at, 0x42c8
/* 71EBCC 802A157C 44810000 */ mtc1 $at, $f0
/* 71EBD0 802A1580 00000000 */ nop
/* 71EBD4 802A1584 4616003C */ c.lt.s $f0, $f22
/* 71EBD8 802A1588 00000000 */ nop
/* 71EBDC 802A158C 45000005 */ bc1f .L802A15A4
/* 71EBE0 802A1590 4600B506 */ mov.s $f20, $f22
/* 71EBE4 802A1594 3C014248 */ lui $at, 0x4248
/* 71EBE8 802A1598 44810000 */ mtc1 $at, $f0
/* 71EBEC 802A159C 00000000 */ nop
/* 71EBF0 802A15A0 4600A501 */ sub.s $f20, $f20, $f0
.L802A15A4:
/* 71EBF4 802A15A4 4600A10D */ trunc.w.s $f4, $f20
/* 71EBF8 802A15A8 44042000 */ mfc1 $a0, $f4
/* 71EBFC 802A15AC 0C00A67F */ jal rand_int
/* 71EC00 802A15B0 00000000 */ nop
/* 71EC04 802A15B4 4482A000 */ mtc1 $v0, $f20
/* 71EC08 802A15B8 00000000 */ nop
/* 71EC0C 802A15BC 4680A520 */ cvt.s.w $f20, $f20
.L802A15C0:
/* 71EC10 802A15C0 4616D03C */ c.lt.s $f26, $f22
/* 71EC14 802A15C4 00000000 */ nop
/* 71EC18 802A15C8 45000003 */ bc1f .L802A15D8
/* 71EC1C 802A15CC 24040003 */ addiu $a0, $zero, 3
/* 71EC20 802A15D0 461AB001 */ sub.s $f0, $f22, $f26
/* 71EC24 802A15D4 46000587 */ neg.s $f22, $f0
.L802A15D8:
/* 71EC28 802A15D8 4405B000 */ mfc1 $a1, $f22
/* 71EC2C 802A15DC 4406A000 */ mfc1 $a2, $f20
/* 71EC30 802A15E0 4407C000 */ mfc1 $a3, $f24
/* 71EC34 802A15E4 24150001 */ addiu $s5, $zero, 1
/* 71EC38 802A15E8 0C01BEB4 */ jal fx_landing_dust
/* 71EC3C 802A15EC AFA00010 */ sw $zero, 0x10($sp)
/* 71EC40 802A15F0 2694000C */ addiu $s4, $s4, 0xc
.L802A15F4:
/* 71EC44 802A15F4 2673000C */ addiu $s3, $s3, 0xc
/* 71EC48 802A15F8 2652000C */ addiu $s2, $s2, 0xc
/* 71EC4C 802A15FC 26310001 */ addiu $s1, $s1, 1
/* 71EC50 802A1600 2A22000A */ slti $v0, $s1, 0xa
/* 71EC54 802A1604 1440FFAD */ bnez $v0, .L802A14BC
/* 71EC58 802A1608 26100004 */ addiu $s0, $s0, 4
/* 71EC5C 802A160C 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 71EC60 802A1610 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 71EC64 802A1614 94420134 */ lhu $v0, 0x134($v0)
/* 71EC68 802A1618 30420001 */ andi $v0, $v0, 1
/* 71EC6C 802A161C 10400020 */ beqz $v0, .L802A16A0
/* 71EC70 802A1620 00000000 */ nop
/* 71EC74 802A1624 0C00A67F */ jal rand_int
/* 71EC78 802A1628 24040009 */ addiu $a0, $zero, 9
/* 71EC7C 802A162C 00021840 */ sll $v1, $v0, 1
/* 71EC80 802A1630 00621821 */ addu $v1, $v1, $v0
/* 71EC84 802A1634 24620001 */ addiu $v0, $v1, 1
/* 71EC88 802A1638 00021080 */ sll $v0, $v0, 2
/* 71EC8C 802A163C 3C01802A */ lui $at, %hi(D_802A3E88_7214D8)
/* 71EC90 802A1640 00220821 */ addu $at, $at, $v0
/* 71EC94 802A1644 C4343E88 */ lwc1 $f20, %lo(D_802A3E88_7214D8)($at)
/* 71EC98 802A1648 4680A520 */ cvt.s.w $f20, $f20
/* 71EC9C 802A164C 00031080 */ sll $v0, $v1, 2
/* 71ECA0 802A1650 3C01802A */ lui $at, %hi(D_802A3E88_7214D8)
/* 71ECA4 802A1654 00220821 */ addu $at, $at, $v0
/* 71ECA8 802A1658 C4203E88 */ lwc1 $f0, %lo(D_802A3E88_7214D8)($at)
/* 71ECAC 802A165C 46800020 */ cvt.s.w $f0, $f0
/* 71ECB0 802A1660 C7C20000 */ lwc1 $f2, ($fp)
/* 71ECB4 802A1664 24630002 */ addiu $v1, $v1, 2
/* 71ECB8 802A1668 46020000 */ add.s $f0, $f0, $f2
/* 71ECBC 802A166C 00031880 */ sll $v1, $v1, 2
/* 71ECC0 802A1670 C7C20008 */ lwc1 $f2, 8($fp)
/* 71ECC4 802A1674 44050000 */ mfc1 $a1, $f0
/* 71ECC8 802A1678 3C01802A */ lui $at, %hi(D_802A3E88_7214D8)
/* 71ECCC 802A167C 00230821 */ addu $at, $at, $v1
/* 71ECD0 802A1680 C4203E88 */ lwc1 $f0, %lo(D_802A3E88_7214D8)($at)
/* 71ECD4 802A1684 46800020 */ cvt.s.w $f0, $f0
/* 71ECD8 802A1688 46020000 */ add.s $f0, $f0, $f2
/* 71ECDC 802A168C 4406A000 */ mfc1 $a2, $f20
/* 71ECE0 802A1690 44070000 */ mfc1 $a3, $f0
/* 71ECE4 802A1694 24040002 */ addiu $a0, $zero, 2
/* 71ECE8 802A1698 0C01BEB4 */ jal fx_landing_dust
/* 71ECEC 802A169C AFA00010 */ sw $zero, 0x10($sp)
.L802A16A0:
/* 71ECF0 802A16A0 C7C20000 */ lwc1 $f2, ($fp)
/* 71ECF4 802A16A4 3C0143A0 */ lui $at, 0x43a0
/* 71ECF8 802A16A8 44810000 */ mtc1 $at, $f0
/* 71ECFC 802A16AC 00000000 */ nop
/* 71ED00 802A16B0 4602003E */ c.le.s $f0, $f2
/* 71ED04 802A16B4 00000000 */ nop
/* 71ED08 802A16B8 45000010 */ bc1f .L802A16FC
/* 71ED0C 802A16BC 24020002 */ addiu $v0, $zero, 2
/* 71ED10 802A16C0 8FA80060 */ lw $t0, 0x60($sp)
/* 71ED14 802A16C4 080A85BF */ j .L802A16FC
/* 71ED18 802A16C8 AD020070 */ sw $v0, 0x70($t0)
.L802A16CC:
/* 71ED1C 802A16CC 0000882D */ daddu $s1, $zero, $zero
/* 71ED20 802A16D0 3C10802A */ lui $s0, %hi(D_802A3F58)
/* 71ED24 802A16D4 26103F58 */ addiu $s0, $s0, %lo(D_802A3F58)
.L802A16D8:
/* 71ED28 802A16D8 8E040000 */ lw $a0, ($s0)
/* 71ED2C 802A16DC 26100004 */ addiu $s0, $s0, 4
/* 71ED30 802A16E0 0C0B50FD */ jal virtual_entity_delete_by_index
/* 71ED34 802A16E4 26310001 */ addiu $s1, $s1, 1
/* 71ED38 802A16E8 2A22000A */ slti $v0, $s1, 0xa
/* 71ED3C 802A16EC 1440FFFA */ bnez $v0, .L802A16D8
/* 71ED40 802A16F0 24020002 */ addiu $v0, $zero, 2
/* 71ED44 802A16F4 080A85C0 */ j .L802A1700
/* 71ED48 802A16F8 00000000 */ nop
.L802A16FC:
/* 71ED4C 802A16FC 0000102D */ daddu $v0, $zero, $zero
.L802A1700:
/* 71ED50 802A1700 8FBF003C */ lw $ra, 0x3c($sp)
/* 71ED54 802A1704 8FBE0038 */ lw $fp, 0x38($sp)
/* 71ED58 802A1708 8FB70034 */ lw $s7, 0x34($sp)
/* 71ED5C 802A170C 8FB60030 */ lw $s6, 0x30($sp)
/* 71ED60 802A1710 8FB5002C */ lw $s5, 0x2c($sp)
/* 71ED64 802A1714 8FB40028 */ lw $s4, 0x28($sp)
/* 71ED68 802A1718 8FB30024 */ lw $s3, 0x24($sp)
/* 71ED6C 802A171C 8FB20020 */ lw $s2, 0x20($sp)
/* 71ED70 802A1720 8FB1001C */ lw $s1, 0x1c($sp)
/* 71ED74 802A1724 8FB00018 */ lw $s0, 0x18($sp)
/* 71ED78 802A1728 D7BA0058 */ ldc1 $f26, 0x58($sp)
/* 71ED7C 802A172C D7B80050 */ ldc1 $f24, 0x50($sp)
/* 71ED80 802A1730 D7B60048 */ ldc1 $f22, 0x48($sp)
/* 71ED84 802A1734 D7B40040 */ ldc1 $f20, 0x40($sp)
/* 71ED88 802A1738 03E00008 */ jr $ra
/* 71ED8C 802A173C 27BD0060 */ addiu $sp, $sp, 0x60

View File

@ -15914,6 +15914,11 @@ segments:
subsegments: subsegments:
- [0xEFEB00, c] - [0xEFEB00, c]
- [0xEFF440, bin] # some of this is audio-related and not part of this overlay - [0xEFF440, bin] # some of this is audio-related and not part of this overlay
#############
### Audio ###
#############
- [0xF00000, bin, SBN]
- [0xF007C0, bin, bgm/Battle_Fanfare_02] # BGM start - [0xF007C0, bin, bgm/Battle_Fanfare_02] # BGM start
- [0xF02160, bin, bgm/Hey_You_03] - [0xF02160, bin, bgm/Hey_You_03]
- [0xF03740, bin, bgm/The_Goomba_King_s_Decree_07] - [0xF03740, bin, bgm/The_Goomba_King_s_Decree_07]
@ -16058,52 +16063,34 @@ segments:
- [0xFAD8F0, bin, bgm/SMW_Remix_2F] - [0xFAD8F0, bin, bgm/SMW_Remix_2F]
- [0xFADE70, bin, bgm/New_Partner_82] # BGM end - [0xFADE70, bin, bgm/New_Partner_82] # BGM end
- [0xFAE860, bin] # more audio stuff - [0xFAE860, bin] # more audio stuff
- [0x19425C0, bin] # INIT file
###############
### Sprites ###
###############
- [0x1942C40, bin]
- [0x1943000, bin] # sprite data build metadata (build date, major file divisions)
- [0x1943000, bin] # sprite data build metadata # player sprite raster table:
- [0x1943020, bin] # Player sprite table - [0x1943020, bin] # Player sprite table
- [0x1943BA0, bin] # Mario world sprites # - [0x1943BA0, bin] # Mario world sprites
- [0x199A8C0, bin] # Retro sprites # - [0x199A8C0, bin] # Retro sprites
- [0x199BB00, bin] # Princess Peach sprites # - [0x199BB00, bin] # Princess Peach sprites
- [0x19E0970, bin] # Player sprite Yay0 table (following 13 entries)
- start: 0x19E09A8 - [0x19E0970, bin] # Player sprite Yay0 table (offsets to the following 13 entries)
type: Yay0 - { start: 0x19E09A8, type: Yay0, align: 8 }
align: 8 - { start: 0x19E1390, type: Yay0, align: 8 }
- start: 0x19E1390 - { start: 0x19E1888, type: Yay0, align: 8 }
type: Yay0 - { start: 0x19E2330, type: Yay0, align: 8 }
align: 8 - { start: 0x19E2DE0, type: Yay0, align: 8 }
- start: 0x19E1888 - { start: 0x19E3208, type: Yay0, align: 8 }
type: Yay0 - { start: 0x19E3BA8, type: Yay0, align: 8 }
align: 8 - { start: 0x19E3FD8, type: Yay0, align: 8 }
- start: 0x19E2330 - { start: 0x19E4828, type: Yay0, align: 8 }
type: Yay0 - { start: 0x19E4BE0, type: Yay0, align: 8 }
align: 8 - { start: 0x19E5758, type: Yay0, align: 8 }
- start: 0x19E2DE0 - { start: 0x19E5950, type: Yay0, align: 8 }
type: Yay0 - { start: 0x19E62A0, type: Yay0, align: 8 }
align: 8
- start: 0x19E3208
type: Yay0
align: 8
- start: 0x19E3BA8
type: Yay0
align: 8
- start: 0x19E3FD8
type: Yay0
align: 8
- start: 0x19E4828
type: Yay0
align: 8
- start: 0x19E4BE0
type: Yay0
align: 8
- start: 0x19E5758
type: Yay0
align: 8
- start: 0x19E5950
type: Yay0
align: 8
- start: 0x19E62A0
type: Yay0
align: 8
- start: 0x19E67B8 - start: 0x19E67B8
align: 8 align: 8
type: pm_npc_sprites type: pm_npc_sprites
@ -16343,7 +16330,7 @@ segments:
- ParadeShyGuy - ParadeShyGuy
- ParadeTwink - ParadeTwink
- Leaf - Leaf
- [0x1B82208, bin] # todo: figure out what this is - [0x1B82208, bin] # end of sprite data - todo: figure out what this is
- start: 0x1B83000 - start: 0x1B83000
type: pm_msg type: pm_msg
files: files:

View File

@ -6798,7 +6798,7 @@ func_80260A60 = 0x80260A60; // type:func rom:0x18F340
IsPartnerImmobile = 0x80260AD4; // type:func rom:0x18F3B4 IsPartnerImmobile = 0x80260AD4; // type:func rom:0x18F3B4
activate_defend_command = 0x80260B04; // type:func rom:0x18F3E4 activate_defend_command = 0x80260B04; // type:func rom:0x18F3E4
func_80260B70 = 0x80260B70; // type:func rom:0x18F450 func_80260B70 = 0x80260B70; // type:func rom:0x18F450
func_80260BF4 = 0x80260BF4; // type:func rom:0x18F4D4 ChoosePlayerCelebrationAnim = 0x80260BF4; // type:func rom:0x18F4D4
func_80260DB8 = 0x80260DB8; // type:func rom:0x18F698 func_80260DB8 = 0x80260DB8; // type:func rom:0x18F698
func_80260DD8 = 0x80260DD8; // type:func rom:0x18F6B8 func_80260DD8 = 0x80260DD8; // type:func rom:0x18F6B8
func_80260E38 = 0x80260E38; // type:func rom:0x18F718 func_80260E38 = 0x80260E38; // type:func rom:0x18F718