effect shims and more battle matches (#347)

This commit is contained in:
Ethan Roseman 2021-07-31 10:32:19 -04:00 committed by GitHub
parent 90497377b9
commit 5d69c3454f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
194 changed files with 2765 additions and 4655 deletions

View File

@ -199,7 +199,7 @@ typedef struct PlayerData {
/* 0x006 */ s8 curMaxFP;
/* 0x007 */ u8 hardMaxFP;
/* 0x008 */ u8 maxBP;
/* 0x009 */ u8 level;
/* 0x009 */ s8 level;
/* 0x00A */ s8 hasActionCommands;
/* 0x00B */ char unk_0B;
/* 0x00C */ s16 coins;
@ -365,7 +365,7 @@ typedef struct Entity {
/* 0x30 */ char unk_30[0x8];
/* 0x38 */ struct StaticEntityData* staticData;
/* 0x3C */ UNK_PTR renderSetupFunc; // pointer to draw func(?)
/* 0x40 */ void* dataBuf;
/* 0x40 */ s32* dataBuf;
/* 0x44 */ Mtx* vertexData;
/* 0x48 */ Vec3f position;
/* 0x54 */ Vec3f scale;
@ -665,11 +665,12 @@ typedef struct BattleStatus {
/* 0x088 */ u8 itemUsesLeft; /* set to 2 for doublke dip, 3 for triple */
/* 0x089 */ u8 hpDrainCount;
/* 0x08A */ s8 unk_8A;
/* 0x08B */ u8 hustleTurns; /* numTurns from hustle drink, normally 0 */
/* 0x08B */ s8 hustleTurns; /* numTurns from hustle drink, normally 0 */
/* 0x08C */ char unk_8C;
/* 0x08D */ s8 unk_8D;
/* 0x08E */ u8 initialEnemyCount; /* used for SP award bonus */
/* 0x08F */ char unk_8F[3];
/* 0x08E */ s8 initialEnemyCount; /* used for SP award bonus */
/* 0x08F */ char unk_8F[1];
/* 0x090 */ s16 unk_90;
/* 0x092 */ s8 unk_92;
/* 0x093 */ char unk_93;
/* 0x094 */ s8 unk_94;
@ -695,7 +696,7 @@ typedef struct BattleStatus {
/* 0x0B0 */ u8 itemLossTurns;
/* 0x0B1 */ char unk_B1[3];
/* 0x0B4 */ UNK_FUN_PTR(preUpdateCallback);
/* 0x0B8 */ char unk_B8[4];
/* 0x0B8 */ UNK_FUN_PTR(unk_B8);
/* 0x0BC */ struct ScriptInstance* controlScript; /* control handed over to this when changing partners */
/* 0x0C0 */ ScriptID controlScriptID;
/* 0x0C4 */ struct ScriptInstance* camMovementScript;
@ -751,7 +752,7 @@ typedef struct BattleStatus {
/* 0x230 */ s32 holdInputBuffer[64];
/* 0x330 */ s32 pushInputBuffer[64];
/* 0x430 */ u8 holdInputBufferPos;
/* 0x431 */ u8 inputBufferPos;
/* 0x431 */ s8 inputBufferPos;
/* 0x432 */ s8 unk_432;
/* 0x433 */ char unk_433;
/* 0x434 */ s32 unk_434;
@ -1229,10 +1230,10 @@ typedef struct GameStatus {
/* 0x030 */ u32 prevButtons; /* from previous frame */
/* 0x034 */ char unk_34[12];
/* 0x040 */ s8 stickX; /* with deadzone */
/* 0x041 */ u8 altStickX; /* input used for batte when flag 80000 set */
/* 0x041 */ s8 altStickX; /* input used for batte when flag 80000 set */
/* 0x042 */ char unk_42[2];
/* 0x044 */ s8 stickY; /* with deadzone */
/* 0x045 */ u8 altStickY; /* input used for batte when flag 80000 set */
/* 0x045 */ s8 altStickY; /* input used for batte when flag 80000 set */
/* 0x046 */ char unk_46[2];
/* 0x048 */ s16 unk_48[4];
/* 0x050 */ s16 unk_50[4];
@ -1381,7 +1382,7 @@ typedef struct CustomModelGfx {
typedef struct SelectableTarget {
/* 0x00 */ s16 actorID;
/* 0x02 */ s16 partID; /* sometimes loaded as byte from 0x3 */
/* 0x04 */ s16 pos[3];
/* 0x04 */ Vec3s pos;
/* 0x0A */ char unk_0A[7];
/* 0x11 */ u8 homeCol; /* from xpos --> 0-3 */
/* 0x12 */ u8 homeRow; /* from ypos --> 0-3 */
@ -1544,7 +1545,7 @@ typedef struct DecorationTable {
/* 0x8AC */ u8 effectType; /* 0 = blur, 14 = none? */
/* 0x8AD */ char unk_8AD[3];
/* 0x8B0 */ struct Temp8025D160* unk_8B0[2];
/* 0x8B8 */ u8 decorationType[2];
/* 0x8B8 */ s8 decorationType[2];
/* 0x8BA */ u8 unk_8BA[2];
/* 0x8BC */ u8 unk_8BC[2];
/* 0x8C0 */ s16 unk_8C0[6];
@ -1760,7 +1761,7 @@ typedef struct Actor {
/* 0x1F3 */ u8 numParts;
/* 0x1F4 */ struct ActorPart* partsTable;
/* 0x1F8 */ s16 lastDamageTaken;
/* 0x1FA */ s16 hpChangeCounter;
/* 0x1FA */ u16 hpChangeCounter;
/* 0x1FC */ s16 damageCounter;
/* 0x1FE */ char unk_1FE[2];
/* 0x200 */ s32** unk_200; // Probably a struct but not sure what yet
@ -1787,7 +1788,8 @@ typedef struct Actor {
/* 0x222 */ s8 defenseBoost;
/* 0x223 */ u8 chillOutAmount; /* attack reduction */
/* 0x224 */ u8 chillOutTurns;
/* 0x225 */ char unk_225[7];
/* 0x225 */ char unk_225[3];
/* 0x228 */ EffectInstance* unk_228;
/* 0x22C */ struct SelectableTarget targetData[24];
/* 0x40C */ s8 targetListLength;
/* 0x40D */ s8 targetIndexList[24]; /* into targetData */
@ -1934,7 +1936,7 @@ typedef struct AnimatedModelNode {
typedef struct EncounterStatus {
/* 0x000 */ s32 flags;
/* 0x004 */ u8 eFirstStrike; /* 0 = none, 1 = player, 2 = enemy */
/* 0x004 */ s8 eFirstStrike; /* 0 = none, 1 = player, 2 = enemy */
/* 0x005 */ s8 hitType; /* 1 = none/enemy, 2 = jump */
/* 0x006 */ s8 hitTier; /* 0 = normal, 1 = super, 2 = ultra */
/* 0x007 */ char unk_07;
@ -2219,4 +2221,11 @@ typedef struct TempSetZoneEnabled {
/* 0x14 */ char unk_14[0x8];
} TempSetZoneEnabled; // size = 0x1C
typedef struct RenderTaskEntry {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ void* appendGfxArg;
/* 0x0C */ void (*appendGfx)(void*);
} RenderTaskEntry; // size = 0x10
#endif

View File

@ -135,7 +135,7 @@ EffectInstance* playFX_7D(s32, f32, f32, f32, f32, s32);
EffectInstance* playFX_7E(s32, f32, f32, f32, f32, s32);
EffectInstance* playFX_7F(s32, f32, f32, f32, f32, s32);
EffectInstance* playFX_80(s32, f32, f32, f32, f32, s32);
EffectInstance* playFX_81(s32, f32, f32, f32, f32, s32);
EffectInstance* playFX_81(s32, f32 x, f32 y, f32 z, f32, s32);
void playFX_82(s32, f32, f32, f32, f32, s32 time);
EffectInstance* playFX_83(s32, f32, f32, f32, f32, s32);
EffectInstance* playFX_84(s32, f32, f32, f32, f32, f32);

View File

@ -1191,39 +1191,41 @@ enum Elements {
typedef UNK_TYPE Event;
enum Events {
EVENT_HIT_COMBO = 9,
EVENT_HIT_COMBO = 9,
EVENT_HIT,
EVENT_SPIN_SMASH_HIT,
EVENT_FALL_TRIGGER,
EVENT_FLIP_TRIGGER,
EVENT_BURN_HIT,
EVENT_SPIN_SMASH_LAUNCH_HIT = 17,
EVENT_STAR_BEAM = 19,
EVENT_POWER_BOUNCE_HIT = 21,
EVENT_SPIN_SMASH_LAUNCH_HIT = 17,
EVENT_STAR_BEAM = 19,
EVENT_POWER_BOUNCE_HIT = 21,
EVENT_BLOW_AWAY,
EVENT_IMMUNE = 25,
EVENT_23 = 23,
EVENT_IMMUNE = 25,
EVENT_BLOCK,
EVENT_SPIKE_TAUNT,
EVENT_BURN_TAUNT,
EVENT_AIR_LIFT_FAILED = 31,
EVENT_AIR_LIFT_FAILED = 31,
EVENT_DEATH,
EVENT_SPIN_SMASH_DEATH,
EVENT_EXPLODE_TRIGGER,
EVENT_BURN_DEATH = 36,
EVENT_SHOCK_DEATH = 38,
EVENT_BURN_DEATH = 36,
EVENT_SPIN_SMASH_LAUNCH_DEATH = 37,
EVENT_SHOCK_DEATH = 38,
EVENT_SPIKE_DEATH,
EVENT_POWER_BOUNCE_DEATH,
EVENT_SPIKE_CONTACT = 42,
EVENT_BURN_CONTACT = 44,
EVENT_SHOCK_HIT = 47,
EVENT_RECOVER_STATUS = 49,
EVENT_END_FIRST_STRIKE = 53,
EVENT_LUCKY = 55,
EVENT_SPIKE_CONTACT = 42,
EVENT_BURN_CONTACT = 44,
EVENT_SHOCK_HIT = 47,
EVENT_RECOVER_STATUS = 49,
EVENT_END_FIRST_STRIKE = 53,
EVENT_LUCKY = 55,
EVENT_BEGIN_FIRST_STRIKE,
EVENT_SCARE_AWAY,
EVENT_BEGIN_AIR_LIFT,
EVENT_UP_AND_AWAY = 61,
EVENT_SWAP_PARTNER = 63,
EVENT_UP_AND_AWAY = 61,
EVENT_SWAP_PARTNER = 63,
EVENT_LIFE_SHROOM_PROC,
EVENT_REVIVE,
};
@ -1637,12 +1639,15 @@ enum RenderMode {
};
enum ActorFlags {
ACTOR_FLAG_DISABLED = 0x00000001, ///< Disables the actor.
ACTOR_FLAG_NO_SHADOW = 0x00000004, ///< Hide shadow.
ACTOR_FLAG_FLYING = 0x00000200, ///< Quake Hammer can't hit.
ACTOR_FLAG_HP_OFFSET_BELOW = 0x00000800, ///< HP bar offset below actor (e.g. Swooper when upside-down).
ACTOR_FLAG_TARGET_ONLY = 0x00004000, ///< Battle ends even if undefeated. No turn.
ACTOR_FLAG_80000 = 0x00080000,
ACTOR_FLAG_NO_ATTACK = 0x00200000, ///< Skip attack turn.
ACTOR_FLAG_NO_DMG_POPUP = 0x02000000, ///< Hide damage popup.
ACTOR_FLAG_10000000 = 0x10000000,
};
enum ActorPartFlags {
@ -1677,6 +1682,12 @@ enum PartnerAnims {
PARTNER_ANIM_HURT,
};
enum FirstStrikes {
FIRST_STRIKE_NONE,
FIRST_STRIKE_PLAYER,
FIRST_STRIKE_ENEMY,
};
enum TimeFreezeMode {
TIME_FREEZE_NORMAL,
TIME_FREEZE_PARTIAL,

View File

@ -62,6 +62,18 @@ void set_entity_model_flags(s32 idx, s32 newFlags);
void clear_entity_model_flags(s32 idx, s32 newFlags);
void exec_entity_model_commandlist(s32 idx);
s32 load_entity_model(s32* cmdList);
RenderTaskEntry* queue_render_task(RenderTask* task);
// append gfx funcs
void func_80257B28(s32);
void func_8025595C(Actor*);
void func_80257B68(Actor*);
void func_80257B48(s32);
void func_8025599C(s32);
void func_80257B88(void);
void func_80257DA4(void);
void func_80254C50(void);
void func_80258E14(void);
f32 func_800E34D8(void);
f32 player_check_collision_below(f32, s32* colliderID);
@ -121,9 +133,10 @@ s32 collision_main_above(void);
s32 player_test_lateral_overlap(s32, PlayerStatus*, f32*, f32*, f32*, f32, f32);
Npc* peach_make_disguise_npc(s32 peachDisguise);
void draw_box(s32 flags, s32 windowStyle, s16 posX, s16 posY, s32 posZ, s32 width, s32 height, s32 opacity,
void draw_box(s32 flags, s32 windowStyle, s32 posX, s32 posY, s32 posZ, s32 width, s32 height, s32 opacity,
s32 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ, void (*fpDrawContents)(s32),
s32 drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY, Matrix4f* outMtx);
s32 get_string_width(s32 stringID, u16 charset);
s32 partner_player_can_pause(void);
s32 disable_player_static_collisions(void);
@ -135,6 +148,8 @@ s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID);
void get_dpad_input_radial(f32* angle, f32* magnitude);
void transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outS);
void try_player_footstep_sounds(s32 arg0);
void phys_update_interact_collider(void);
void create_popup_menu(void*);
s32 npc_test_move_simple_without_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
@ -194,7 +209,7 @@ void fx_emote(s32, Npc*, f32, f32, f32, f32, f32, s32, s32*);
f32 get_xz_dist_to_player(f32, f32);
void func_800E06C0(s32);
void close_status_menu(void);
void btl_state_update_switch_to_partner(s32);
void btl_state_update_switch_to_partner(void);
Shadow* create_shadow_type(s32 type, f32 x, f32 y, f32 z);
s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 centerY, f32 sizeX, f32 sizeZ);
@ -441,4 +456,14 @@ void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta);
void* load_asset_by_name(const char* assetName, u32* decompressedSize);
EffectInstance* func_8005A2BC(EffectBlueprint* effectBp);
void remove_effect(EffectInstance* arg0);
s32 load_effect(s32 effectIndex);
void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex);
s32 func_8011CFBC(void);
s32 set_screen_overlay_center_worldpos(void);
s32 mdl_get_next_texture_address(void);
void draw_string(s32 stringID, s32 posX, s32 posY, s32 opacity, s32 palette, s32 style);
void get_background_color_blend(u8* r, u8* g, u8* b, u8* a);
#endif

View File

@ -226,8 +226,6 @@ extern s32 gItemMenuScrollUpIcon;
extern s32 gStatsMenuIconIDs[12];
extern s32 gGameState;
extern s16 gNpcCount;
extern s32 D_8009A64C;
extern s32* D_8009A658;
extern s32 gOverrideFlags;
extern u16 D_8009A6A0;
extern u16 D_8009A6A2;
@ -295,9 +293,6 @@ extern Temp8010F250 D_8010F250; // sfx_play_sound state struct?
// Effects
extern EffectTableEntry gEffectTable[135];
//nusys
extern OSPiHandle* carthandle;
extern SaveData gCurrentSaveFile;
extern u32* gMapFlags;
@ -354,7 +349,6 @@ extern MusicSettings D_8014F6F0;
// OS
extern OSThread D_800A4270; // idle thread, id 1
extern OSThread D_800A4420; // id 3
extern s32 D_800B8590;
extern OSThread* __osActiveQueue;
extern OSThread* __osRunningThread;
extern OSThread* __osRunQueue;

View File

@ -147,7 +147,7 @@ INCLUDE_ASM(s32, "16F740", btl_state_update_begin_partner_turn);
void btl_state_draw_begin_partner_turn(void) {
}
void btl_state_update_switch_to_partner(s32 arg0) {
void btl_state_update_switch_to_partner(void) {
Actor* player = gBattleStatus.playerActor;
Actor* partner = gBattleStatus.partnerActor;
s32 i;

View File

@ -15,6 +15,13 @@ void* D_802809FC[] = {
s32 D_80280A30 = 0xFF;
extern PartnerID D_8029DA33;
extern s32 D_8029DA34;
extern Camera D_8029DA50[ARRAY_COUNT(gCameras)];
extern f32 D_8029EFB0;
extern f32 D_8029EFB4;
extern f32 D_8029EFB8;
Script BtlPutPartnerAway = SCRIPT({
DispatchEvent(ACTOR_PARTNER, 62);
parallel {
@ -193,11 +200,337 @@ void update_actor_shadows(void) {
}
}
INCLUDE_ASM(s32, "16c8e0", btl_update);
void btl_update(void) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Actor* partner = battleStatus->partnerActor;
f32 dpadAngle;
f32 dpadMagnitude;
s32 cond;
if (battleStatus->inputBitmask != -1) {
if (battleStatus->flags1 & 0x80000 && gGameStatusPtr->unk_81 != 0) {
s32 inputBitmask = battleStatus->inputBitmask;
battleStatus->currentButtonsDown = gGameStatusPtr->altCurrentButtons & inputBitmask;
battleStatus->currentButtonsPressed = gGameStatusPtr->altPressedButtons & inputBitmask;
battleStatus->currentButtonsHeld = gGameStatusPtr->altHeldButtons & inputBitmask;
battleStatus->stickX = gGameStatusPtr->altStickX;
battleStatus->stickY = gGameStatusPtr->altStickY;
} else {
s32 inputBitmask2 = battleStatus->inputBitmask;
battleStatus->currentButtonsDown = gGameStatusPtr->currentButtons & inputBitmask2;
battleStatus->currentButtonsPressed = gGameStatusPtr->pressedButtons & inputBitmask2;
battleStatus->currentButtonsHeld = gGameStatusPtr->heldButtons & inputBitmask2;
battleStatus->stickX = gGameStatusPtr->stickX;
battleStatus->stickY = gGameStatusPtr->stickY;
}
}
get_dpad_input_radial(&dpadAngle, &dpadMagnitude);
battleStatus->dpadX = dpadAngle;
battleStatus->dpadY = dpadMagnitude;
battleStatus->pushInputBuffer[battleStatus->inputBufferPos] = battleStatus->currentButtonsPressed;
battleStatus->holdInputBuffer[battleStatus->inputBufferPos] = battleStatus->currentButtonsDown;
battleStatus->inputBufferPos++;
if (battleStatus->inputBufferPos >= ARRAY_COUNT(battleStatus->pushInputBuffer)) {
battleStatus->inputBufferPos = 0;
}
if (battleStatus->preUpdateCallback != NULL) {
battleStatus->preUpdateCallback();
}
cond = TRUE;
if (battleStatus->unk_95 == 0 || battleStatus->unk_95 != gBattleState) {
switch (gBattleState) {
case -1:
case 0:
return;
case 1:
btl_state_update_normal_start();
cond = FALSE;
break;
case 7:
btl_state_update_begin_player_turn();
break;
case 8:
btl_state_update_begin_partner_turn();
break;
case 9:
func_80242FE0();
break;
case 5:
btl_state_update_begin_turn();
break;
case 6:
btl_state_update_end_turn();
break;
case 10:
btl_state_update_switch_to_player();
break;
case 11:
btl_state_update_switch_to_partner();
break;
case 12:
btl_state_update_prepare_menu();
break;
case 13:
btl_state_update_player_menu();
break;
case 14:
btl_state_update_partner_menu();
break;
case 16:
btl_state_update_twink_menu();
break;
case 15:
btl_state_update_peach_menu();
break;
case 17:
btl_state_update_select_target();
break;
case 18:
btl_state_update_player_move();
break;
case 2:
btl_state_update_first_strike();
break;
case 22:
btl_state_update_end_player_turn();
break;
case 23:
btl_state_update_end_partner_turn();
break;
case 21:
btl_state_update_enemy_move();
break;
case 3:
btl_state_update_partner_striking_first();
break;
case 20:
btl_state_update_next_enemy();
break;
case 19:
btl_state_update_partner_move();
break;
case 26:
btl_state_update_victory();
break;
case 32:
btl_state_update_end_battle();
break;
case 29:
btl_state_update_change_partner();
break;
case 24:
btl_state_update_run_away();
break;
case 25:
btl_state_update_defend();
break;
case 27:
btl_state_update_defeat();
break;
case 28:
btl_state_update_1C();
break;
case 30:
btl_state_update_end_training_battle();
break;
case 4:
btl_state_update_enemy_striking_first();
break;
case 34:
btl_state_update_22();
break;
case 33:
btl_state_update_celebration();
break;
case 35:
btl_state_update_end_demo_battle();
cond = FALSE;
break;
}
}
battleStatus->unk_90++;
if (battleStatus->unk_90 == 40) {
func_8024F7C8();
}
func_80266684();
func_80266978();
func_80266B14();
func_8024EE48();
update_actor_shadows();
if (battleStatus->unk_432 != -2) {
u8 paramType;
f32 paramAmount;
get_screen_overlay_params(1, &paramType, &paramAmount);
if (battleStatus->unk_432 > 0) {
set_screen_overlay_color(1, 0, 0, 0);
if (partner == NULL) {
set_screen_overlay_params_back(0, 215.0f);
} else if (playerData->currentPartner == 6) {
paramAmount -= 10.0f;
if (paramAmount < 0.0f) {
paramAmount = 0.0f;
}
set_screen_overlay_params_back(0, paramAmount);
} else {
paramAmount += 10.0f;
if (paramAmount > 215.0f) {
paramAmount = 215.0f;
}
set_screen_overlay_params_back(0, paramAmount);
}
} else if (battleStatus->unk_432 < 0) {
paramAmount -= 10.0f;
if (paramAmount < 0.0f) {
paramAmount = 0.0f;
set_screen_overlay_params_back(0xFF, -1.0f);
battleStatus->unk_432 = 0;
} else {
set_screen_overlay_params_back(0, paramAmount);
}
}
if (cond || D_802809F6 != -1) {
if (D_802809F6 == -1) {
if (gGameStatusPtr->demoState == 2) {
u8 paramType;
f32 paramAmount;
get_screen_overlay_params(0, &paramType, &paramAmount);
if (paramType == 0xFF) {
D_802809F6 = 0;
set_screen_overlay_params_front(0, 0.0f);
}
}
} else if (D_802809F6 == 0xFF) {
if (gBattleState != 0x23) {
btl_set_state(0x23, 0xFF);
}
} else {
D_802809F6 += 10;
if (D_802809F6 > 0xFF) {
D_802809F6 = 0xFF;
}
set_screen_overlay_params_front(0, D_802809F6);
set_screen_overlay_color(0, 208, 208, 208);
intro_logos_set_fade_alpha(255);
intro_logos_set_fade_color(224);
}
}
}
}
INCLUDE_ASM(s32, "16c8e0", btl_draw_ui);
INCLUDE_ASM(s32, "16c8e0", func_8023ED5C);
void func_8023ED5C(void) {
BattleStatus* battleStatus = &gBattleStatus;
RenderTask renderTask;
RenderTask* renderTaskPtr = &renderTask;
Actor* actor;
s32 i;
if (gBattleState != 0) {
func_8024EEA8();
if (battleStatus->unk_B8 != NULL) {
battleStatus->unk_B8();
}
if (battleStatus->flags1 & 1) {
func_80255FD8();
if (gCurrentCamID == 1 || gCurrentCamID == 2) {
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {
actor = battleStatus->enemyActors[i];
if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) {
renderTaskPtr->appendGfxArg = i;
renderTaskPtr->appendGfx = func_80257B28;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = actor->renderMode;
queue_render_task(renderTaskPtr);
if (actor->flags & ACTOR_FLAG_10000000) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_8025595C;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = 0x22;
queue_render_task(renderTaskPtr);
}
if (battleStatus->unk_92 & 1) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_80257B68;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = actor->renderMode;
queue_render_task(renderTaskPtr);
}
}
}
actor = battleStatus->partnerActor;
if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) {
renderTaskPtr->appendGfxArg = NULL;
renderTaskPtr->appendGfx = func_80257B48;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = actor->renderMode;
queue_render_task(renderTaskPtr);
if (actor->flags & ACTOR_FLAG_10000000) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_8025599C;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = 0x22;
queue_render_task(renderTaskPtr);
}
if (battleStatus->unk_92 & 1) {
renderTaskPtr->appendGfxArg = NULL;
renderTaskPtr->appendGfx = func_80257B88;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = actor->renderMode;
queue_render_task(renderTaskPtr);
}
}
actor = battleStatus->playerActor;
if (actor != NULL && !(actor->flags & ACTOR_FLAG_DISABLED)) {
renderTaskPtr->appendGfxArg = NULL;
renderTaskPtr->appendGfx = func_80257DA4;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = actor->renderMode;
queue_render_task(renderTaskPtr);
if (actor->flags & ACTOR_FLAG_10000000) {
renderTaskPtr->appendGfxArg = actor;
renderTaskPtr->appendGfx = func_80254C50;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = 0x22;
queue_render_task(renderTaskPtr);
}
if (battleStatus->unk_92 & 1) {
renderTaskPtr->appendGfxArg = NULL;
renderTaskPtr->appendGfx = func_80258E14;
renderTaskPtr->distance = actor->currentPos.z;
renderTaskPtr->renderMode = actor->renderMode;
queue_render_task(renderTaskPtr);
}
}
}
}
}
}
INCLUDE_ASM(s32, "16c8e0", func_8023F060);
@ -211,9 +544,46 @@ INCLUDE_ASM(s32, "16c8e0", btl_draw_enemy_health_bars);
INCLUDE_ASM(s32, "16c8e0", btl_update_starpoints_display);
INCLUDE_ASM(s32, "16c8e0", btl_save_world_cameras);
void btl_save_world_cameras(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
s32 i;
INCLUDE_ASM(s32, "16c8e0", btl_restore_world_cameras);
for (i = 0; i < ARRAY_COUNT(gCameras); i++) {
D_8029DA50[i] = gCameras[i];
}
D_8029EFB0 = playerStatus->position.x;
D_8029EFB4 = playerStatus->position.y;
D_8029EFB8 = playerStatus->position.z;
playerStatus->position.x = 0.0f;
playerStatus->position.y = -1000.0f;
playerStatus->position.z = 0.0f;
}
void btl_restore_world_cameras(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
PlayerData* playerData = &gPlayerData;
s32 i;
for (i = 0; i < ARRAY_COUNT(gCameras); i++) {
gCameras[i] = D_8029DA50[i];
}
gCurrentCameraID = 0;
playerStatus->position.x = D_8029EFB0;
playerStatus->position.y = D_8029EFB4;
playerStatus->position.z = D_8029EFB8;
if (D_8029DA34 & 0x80) {
gOverrideFlags |= 0x80;
} else {
gOverrideFlags &= ~0x80;
}
if (gBattleStatus.flags2 & 0x40) {
playerData->currentPartner = D_8029DA33;
}
}
void btl_delete_actor(Actor* actor) {
ActorPart* partsTable;

View File

@ -51,7 +51,7 @@ void reset_actor_blur(Actor* actor) {
if (decorationTable->unk_7DB != 0) {
decorationTable->unk_7DB--;
if (decorationTable->unk_7DB == 0) {
actor->flags &= ~0x10000000;
actor->flags &= ~ACTOR_FLAG_10000000;
decorationTable->effectType = 1;
}
}
@ -93,7 +93,7 @@ void enable_player_blur(void) {
decorationTable->effectType = 0;
decorationTable->unk_7DB++;
playerActor->flags |= 0x10000000;
playerActor->flags |= ACTOR_FLAG_10000000;
decorationTable->unk_7D8 = 0;
decorationTable->unk_7D9 = 0;
@ -129,7 +129,7 @@ void func_80254950(void) {
if (decorationTable->unk_7DB != 0) {
decorationTable->unk_7DB--;
if (decorationTable->unk_7DB == 0) {
playerActor->flags &= ~0x10000000;
playerActor->flags &= ~ACTOR_FLAG_10000000;
decorationTable->effectType = 1;
}
}
@ -146,14 +146,14 @@ void func_802549C0(void) {
Actor* playerActor = gBattleStatus.playerActor;
DecorationTable* decorationTable = playerActor->partsTable->decorationTable;
playerActor->flags &= ~0x10000000;
playerActor->flags &= ~ACTOR_FLAG_10000000;
decorationTable->unk_7DB = 0;
decorationTable->effectType = 1;
}
INCLUDE_ASM(s32, "182B30", func_802549F4);
INCLUDE_ASM(s32, "182B30", func_80254C50);
INCLUDE_ASM(void, "182B30", func_80254C50);
INCLUDE_ASM(s32, "182B30", func_802550BC);
@ -163,8 +163,8 @@ void func_8025593C(s32 arg0) {
func_802550BC(0, arg0);
}
void func_8025595C(s32 arg0) {
func_802552EC(0, arg0);
void func_8025595C(Actor* actor) {
func_802552EC(0, actor);
}
void func_8025597C(s32 arg0) {
@ -206,8 +206,8 @@ void func_80257B48(s32 arg0) {
func_80255FE0(1, arg0);
}
void func_80257B68(s32 arg0) {
func_802571F0(0, arg0);
void func_80257B68(Actor* actor) {
func_802571F0(0, actor);
}
void func_80257B88(void) {
@ -216,9 +216,9 @@ void func_80257B88(void) {
INCLUDE_ASM(s32, "182B30", update_player_actor_shadow);
INCLUDE_ASM(s32, "182B30", func_80257DA4);
INCLUDE_ASM(void, "182B30", func_80257DA4);
INCLUDE_ASM(s32, "182B30", func_80258E14);
INCLUDE_ASM(void, "182B30", func_80258E14);
INCLUDE_ASM(s32, "182B30", func_802591EC);
@ -326,62 +326,117 @@ INCLUDE_ASM(s32, "182B30", func_8025CD40);
INCLUDE_ASM(s32, "182B30", func_8025CEC8);
INCLUDE_ASM(s32, "182B30", _remove_part_decoration);
void _remove_part_decoration(ActorPart* part, s32 decorationIndex) {
DecorationTable* decorationTable = part->decorationTable;
switch (decorationTable->decorationType[decorationIndex]) {
case 0:
func_8025D158(part, decorationIndex);
break;
case 1:
func_8025D290(part, decorationIndex);
break;
case 2:
func_8025D3C4(part, decorationIndex);
break;
case 3:
func_8025D4A0(part, decorationIndex);
break;
case 4:
func_8025D620(part, decorationIndex);
break;
case 5:
func_8025D6FC(part, decorationIndex);
break;
case 6:
func_8025D810(part, decorationIndex);
break;
case 7:
func_8025D8EC(part, decorationIndex);
break;
case 8:
func_8025DA60(part, decorationIndex);
break;
case 9:
func_8025DBC8(part, decorationIndex);
break;
case 10:
func_8025DD40(part, decorationIndex);
break;
case 11:
func_8025DE88(part, decorationIndex);
break;
}
decorationTable->decorationType[decorationIndex] = 0;
}
void func_8025D150(void) {
}
void func_8025D158(void) {
void func_8025D158(ActorPart* part, s32 decorationIndex) {
}
INCLUDE_ASM(s32, "182B30", func_8025D160);
INCLUDE_ASM(s32, "182B30", func_8025D290);
void func_8025D290(ActorPart* part, s32 decorationIndex) {
part->decorationTable->unk_8B0[decorationIndex]->unk_0C->unk_2C = 5;
}
INCLUDE_ASM(s32, "182B30", func_8025D2B0);
void func_8025D3C4(void) {
void func_8025D3C4(ActorPart* part, s32 decorationIndex) {
}
INCLUDE_ASM(s32, "182B30", func_8025D3CC);
INCLUDE_ASM(s32, "182B30", func_8025D4A0);
void func_8025D4A0(ActorPart* part, s32 decorationIndex) {
remove_effect(part->decorationTable->unk_8B0[decorationIndex]);
}
INCLUDE_ASM(s32, "182B30", func_8025D4C8);
INCLUDE_ASM(s32, "182B30", func_8025D620);
void func_8025D620(ActorPart* part, s32 decorationIndex) {
part->decorationTable->unk_8B0[decorationIndex]->unk_0C->unk_2C = 5;
}
INCLUDE_ASM(s32, "182B30", func_8025D640);
INCLUDE_ASM(s32, "182B30", func_8025D6FC);
void func_8025D6FC(ActorPart* part, s32 decorationIndex) {
part->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10;
}
INCLUDE_ASM(s32, "182B30", func_8025D71C);
INCLUDE_ASM(s32, "182B30", func_8025D810);
void func_8025D810(ActorPart* part, s32 decorationIndex) {
part->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10;
}
INCLUDE_ASM(s32, "182B30", func_8025D830);
INCLUDE_ASM(s32, "182B30", func_8025D8EC);
void func_8025D8EC(ActorPart* part, s32 decorationIndex) {
part->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10;
}
INCLUDE_ASM(s32, "182B30", func_8025D90C);
void func_8025DA60(void) {
void func_8025DA60(ActorPart* part, s32 decorationIndex) {
}
INCLUDE_ASM(s32, "182B30", func_8025DA68);
void func_8025DBC8(void) {
void func_8025DBC8(ActorPart* part, s32 decorationIndex) {
}
INCLUDE_ASM(s32, "182B30", func_8025DBD0);
void func_8025DD40(ActorPart* actorPart, s32 arg1) {
actorPart->decorationTable->unk_8B0[arg1]->unk_0C->unk_2C = 5;
void func_8025DD40(ActorPart* actorPart, s32 decorationIndex) {
actorPart->decorationTable->unk_8B0[decorationIndex]->unk_0C->unk_2C = 5;
}
INCLUDE_ASM(s32, "182B30", func_8025DD60);
void func_8025DE88(ActorPart* actorPart, s32 arg1) {
actorPart->decorationTable->unk_8B0[arg1]->unk_00 |= 0x10;
void func_8025DE88(ActorPart* actorPart, s32 decorationIndex) {
actorPart->decorationTable->unk_8B0[decorationIndex]->unk_00 |= 0x10;
}

View File

@ -1202,7 +1202,124 @@ INCLUDE_ASM(s32, "190B20", lookup_status_chance); // exactly (?) the same as loo
INCLUDE_ASM(s32, "190B20", lookup_status_duration_mod); // exactly (?) the same as lookup_defense
INCLUDE_ASM(s32, "190B20", inflict_status);
s32 inflict_status(Actor* target, s32 statusTypeKey, s32 duration) {
BattleStatus* battleStatus = &gBattleStatus;
EffectInstance* effect;
switch (statusTypeKey) {
case STATUS_FEAR:
case STATUS_DIZZY:
case STATUS_PARALYZE:
case STATUS_SLEEP:
case STATUS_FROZEN:
case STATUS_STOP:
case STATUS_POISON:
case STATUS_SHRINK:
if (target->actorID != ACTOR_PLAYER || (!is_ability_active(ABILITY_FEELING_FINE) &&
!is_ability_active(ABILITY_BERSERKER) && battleStatus->hustleTurns == 0)) {
if (target->actorID != ACTOR_PARTNER) {
if (target->debuff != statusTypeKey) {
target->status = statusTypeKey;
}
target->ptrDefuffIcon->ptrPropertyList[15] = 0;
target->debuff = statusTypeKey;
target->debuffDuration = duration;
if ((s8)duration > 9) {
target->debuffDuration = 9;
}
switch (statusTypeKey) {
case STATUS_FROZEN:
if (target->actorID != ACTOR_PARTNER) {
effect = target->unk_228;
if (effect != NULL) {
effect->flags |= 0x10;
}
target->unk_228 = playFX_81(0, target->currentPos.x, target->currentPos.y,
target->currentPos.z, 1.0f, 0);
func_80047820(target->unk_436, STATUS_FROZEN);
}
return TRUE;
case STATUS_SLEEP:
func_80266DAC(target, 3);
func_80047820(target->unk_436, STATUS_SLEEP);
return TRUE;
case STATUS_PARALYZE:
func_80266DAC(target, 7);
func_80047820(target->unk_436, STATUS_PARALYZE);
return TRUE;
case STATUS_DIZZY:
func_80047820(target->unk_436, STATUS_DIZZY);
return TRUE;
case STATUS_FEAR:
func_80266DAC(target, 5);
func_80047820(target->unk_436, STATUS_FEAR);
return TRUE;
case STATUS_POISON:
func_80266DAC(target, 6);
func_80047820(target->unk_436, STATUS_POISON);
return TRUE;
case STATUS_SHRINK:
func_80047820(target->unk_436, STATUS_SHRINK);
return TRUE;
}
}
return TRUE;
} else {
return FALSE;
}
break;
case STATUS_STATIC:
if (target->actorID != ACTOR_PARTNER) {
target->staticStatus = statusTypeKey;
target->staticDuration = duration;
if ((s8)duration > 9) {
target->staticDuration = 9;
}
target->status = STATUS_STATIC;
func_80266DAC(target, 4);
func_80047928(target->unk_436, STATUS_STATIC);
}
return TRUE;
case STATUS_STONE:
if (target->actorID != ACTOR_PARTNER) {
target->stoneStatus = STATUS_STONE;
target->stoneDuration = duration;
if ((s8)duration > 9) {
target->stoneDuration = 9;
}
target->status = STATUS_STONE;
}
return TRUE;
case STATUS_DAZE:
if (target->koStatus < statusTypeKey) {
target->koStatus = STATUS_DAZE;
target->koDuration = duration;
if ((s8)duration > 9) {
target->koDuration = 9;
}
target->status = STATUS_DAZE;
}
return TRUE;
case STATUS_E:
if (target->actorID != ACTOR_PARTNER) {
target->transStatus = STATUS_E;
target->transDuration = duration;
if ((s8)duration > 9) {
target->transDuration = 9;
}
target->status = STATUS_E;
func_80047A30(target->unk_436, STATUS_E);
}
return TRUE;
case STATUS_END:
case STATUS_NORMAL:
case STATUS_DEFAULT:
default:
return TRUE;
}
}
s32 inflict_partner_ko(Actor* target, s32 statusTypeKey, s32 duration) {
if (statusTypeKey == STATUS_DAZE) {

View File

@ -1,7 +1,11 @@
#include "common.h"
#include "battle/battle.h"
extern s32 D_802946E0[];
void dispatch_event_actor(Actor* actor, Event event);
s32 func_80263230(Actor*, Actor*);
void func_80267018(Actor* actor, s32 arg1);
s32 has_enchanted_part(Actor* actor) {
ActorPart* partIt = actor->partsTable;
@ -127,7 +131,82 @@ INCLUDE_ASM(s32, "1A5830", calc_enemy_test_target);
INCLUDE_ASM(s32, "1A5830", calc_enemy_damage_target);
// part before the first conditional needs work
#ifdef NON_MATCHING
s32 dispatch_damage_event_actor(Actor* actor, s32 damageAmount, s32 originalEvent, s32 stopMotion) {
BattleStatus* battleStatus = &gBattleStatus;
ActorMovementWalk* walk;
s32 dispatchEvent;
u16 temp_v1;
battleStatus->currentAttackDamage = damageAmount;
temp_v1 = actor->hpChangeCounter + battleStatus->currentAttackDamage;
actor->hpChangeCounter += temp_v1;
actor->damageCounter += temp_v1;
battleStatus->lastAttackDamage = 0;
actor->hpChangeCounter -= temp_v1;
actor->currentHP -= temp_v1;
dispatchEvent = originalEvent;
walk = &actor->walk;
if (actor->currentHP <= 0) {
battleStatus->lastAttackDamage += actor->currentHP;
actor->currentHP = 0;
dispatchEvent = EVENT_DEATH;
}
battleStatus->lastAttackDamage += temp_v1;
actor->lastDamageTaken = battleStatus->lastAttackDamage;
battleStatus->unk_19A = 0;
if (battleStatus->flags1 & 0x20) {
if (dispatchEvent == EVENT_HIT_COMBO) {
dispatchEvent = EVENT_HIT;
}
if (dispatchEvent == EVENT_23) {
dispatchEvent = EVENT_IMMUNE;
}
}
if (dispatchEvent == EVENT_DEATH) {
if (originalEvent == EVENT_SPIN_SMASH_LAUNCH_HIT) {
dispatchEvent = EVENT_SPIN_SMASH_LAUNCH_DEATH;
}
if (originalEvent == EVENT_SHOCK_HIT) {
dispatchEvent = EVENT_SHOCK_DEATH;
}
}
if (stopMotion == 0) {
s32 targetActorID = actor->targetActorID; // why?
if (func_80263230(actor, actor) != 0) {
show_damage_popup(actor->targetData[0].pos.x, actor->targetData[0].pos.y, actor->targetData[0].pos.z,
battleStatus->lastAttackDamage, 0);
func_802666E4(actor, actor->targetData[0].pos.x, actor->targetData[0].pos.y, actor->targetData[0].pos.z,
battleStatus->lastAttackDamage);
actor->targetActorID = targetActorID;
} else {
actor->targetActorID = targetActorID;
}
} else {
show_damage_popup(walk->goalPos.x, walk->goalPos.y, walk->goalPos.z, battleStatus->lastAttackDamage, 0);
func_802666E4(actor, walk->goalPos.x, walk->goalPos.y, walk->goalPos.z, battleStatus->lastAttackDamage);
}
if (battleStatus->lastAttackDamage > 0) {
func_80267018(actor, 1);
}
actor->flags |= ACTOR_FLAG_80000;
dispatch_event_actor(actor, dispatchEvent);
return 0;
}
#else
INCLUDE_ASM(s32, "1A5830", dispatch_damage_event_actor);
#endif
s32 dispatch_damage_event_actor_0(Actor* actor, s32 damageAmount, s32 event) {
return dispatch_damage_event_actor(actor, damageAmount, event, FALSE);
@ -466,7 +545,62 @@ ApiStatus RemoveActor(ScriptInstance* script, s32 isInitialCall) {
INCLUDE_ASM(s32, "1A5830", RemoveActor);
#endif
INCLUDE_ASM(s32, "1A5830", DropStarPoints);
ApiStatus DropStarPoints(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus;
PlayerData* playerData = &gPlayerData;
Bytecode* args = script->ptrReadPos;
Actor* dropper;
f32 playerLevel;
f32 enemyLevel;
ActorID actorID;
f32 ntd;
s32 numToDrop;
actorID = get_variable(script, *args++);
if (actorID == ACTOR_SELF) {
actorID = script->owner1.enemyID;
}
dropper = get_actor(actorID);
enemyLevel = dropper->staticActorData->level;
if (dropper->staticActorData->level == 0.0f) {
enemyLevel = 1.0f;
}
playerLevel = playerData->level;
if (playerLevel == 0.0f) {
playerLevel = 1.0f;
}
ntd = 0.0f;
if (!(enemyLevel < playerLevel)) {
ntd = ((enemyLevel - playerLevel) * 0.5f) * D_802946E0[battleStatus->initialEnemyCount];
ntd = (ntd + 50.0f) / 100.0f;
}
numToDrop = ntd;
if (playerData->level < 27) {
s32 spawnMode;
s32 i;
if (dropper->flags & ACTOR_FLAG_HP_OFFSET_BELOW) {
spawnMode = ITEM_SPAWN_MODE_UNKNOWN_19;
} else {
spawnMode = ITEM_SPAWN_MODE_UNKNOWN_17;
}
for (i = 0; i < numToDrop; i++) {
make_item_entity_delayed(ITEM_STAR_POINT, dropper->currentPos.x, dropper->currentPos.y,
dropper->currentPos.z, spawnMode, i, 0);
}
battleStatus->incrementStarPointDelay = 40;
battleStatus->pendingStarPoints += numToDrop;
}
gBattleStatus.flags1 |= 0x1000000;
return ApiStatus_DONE2;
}
ApiStatus SetDefenseTable(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;

View File

@ -2,6 +2,7 @@
#include "map.h"
#include "effects.h"
extern s16 D_8009A668;
extern s32 D_800A0BA0;
extern f32 D_800A0BA4;
extern EffectInstance* D_800A0BA8;
@ -59,7 +60,11 @@ ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall) {
set_background_color_blend(0, 0, 0, ((25 - script->functionTemp[0]) * 10) & 254);
script->functionTemp[0]--;
do {} while (0);
return (script->functionTemp[0] == 0) * ApiStatus_DONE2;
if (script->functionTemp[0] == 0) {
return ApiStatus_DONE2;
}
return ApiStatus_BLOCK;
}
ApiStatus UnfadeBackgroundFromBlack(ScriptInstance* script, s32 isInitialCall) {
@ -335,9 +340,61 @@ void draw_encounters_pre_battle(void) {
}
}
extern s16* D_8009A668;
void show_first_strike_message(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
s32 posX;
s32 width;
s32 xOffset;
s32 screenWidthHalf;
INCLUDE_ASM(s32, "1a1f0_len_5390", show_first_strike_message);
if (currentEncounter->unk_94 == 0) {
D_8009A668 = -200;
return;
}
D_8009A668 += 40;
xOffset = D_8009A668;
if (xOffset > 0) {
if (xOffset < 1600) {
xOffset = 0;
} else {
xOffset -= 1600;
}
}
screenWidthHalf = SCREEN_WIDTH / 2;
switch (currentEncounter->eFirstStrike) {
case FIRST_STRIKE_PLAYER:
switch (currentEncounter->hitType) {
case 2:
case 4:
width = get_string_width(0x1D00AC, 0) + 24;
posX = (xOffset + screenWidthHalf) - (width / 2);
draw_box(0, 0x14, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
draw_string(0x1D00AC, posX + 11, 75, 0xFF, 0xA, 0);
break;
case 6:
width = get_string_width(0x1D00AD, 0) + 24;
posX = (xOffset + screenWidthHalf) - (width / 2);
draw_box(0, 0x14, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
draw_string(0x1D00AD, posX + 11, 75, 0xFF, 0xA, 0);
break;
}
break;
case FIRST_STRIKE_ENEMY:
if (!is_ability_active(ABILITY_CHILL_OUT)) {
width = get_string_width(0x1D00AE, 0) + 24;
posX = (xOffset + screenWidthHalf) - (width / 2);
draw_box(0, 4, posX, 69, 0, width, 28, 255, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, NULL, 0, NULL,
SCREEN_WIDTH, SCREEN_HEIGHT, NULL);
draw_string(0x1D00AE, posX + 11, 75, 0xFF, 0xA, 0);
}
break;
}
}
INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_post_battle);

View File

@ -101,7 +101,7 @@ s32 nuAuDmaCallBack(s32 addr, s32 len, void *state, u8 arg3) {
mesg->dramAddr = temp_s2;
mesg->devAddr = temp_s3;
mesg->size = 0x500;
osEPiStartDma(carthandle, mesg, 0);
osEPiStartDma(nuPiCartHandle, mesg, 0);
return osVirtualToPhysical(temp_s2) + temp_s0;
}
#else

View File

@ -1,7 +1,34 @@
#include "common.h"
extern u32 D_E0200690;
extern u32 D_E0200734[];
u32 D_E0200690 = 0x1E6D3457;
void* effectFuncs[] = {
guRotateF, guTranslateF, guTranslate, guScaleF, guMtxCatF, guMtxF2L, guMtxL2F, queue_render_task, func_8005A2BC,
remove_effect, general_heap_malloc, mem_clear, NULL, rand_int, clamp_angle, sin_deg, cos_deg, atan2,
npc_raycast_down_sides, load_effect, sqrtf, mdl_draw_hidden_panel_surface, func_8011CFBC, guPerspectiveF,
guMtxIdentF, transform_point, guLookAtHiliteF, set_screen_overlay_params_back, set_screen_overlay_center,
set_screen_overlay_center_worldpos, mdl_get_next_texture_address, guPositionF, guOrthoF, guFrustumF, func_80138D88,
draw_box, draw_string, get_string_width, get_background_color_blend, sfx_play_sound_at_position
};
s32 D_E0200734[128] = {
0x100B2AF5, 0x45B59924, 0x35094B45, 0x4ABFA67A, 0x164F5371, 0x7B195845, 0x58562A56, 0x25733D41, 0x48008107,
0x0E004F28, 0x6963B8AD, 0x5B82AB71, 0x6BC1F51B, 0x3D947816, 0x39705175, 0x44409A59, 0x0ED99067, 0x5F70B6F8,
0x3225AEEE, 0x08B5E97C, 0x2CDE7594, 0x5E9E5B7D, 0x5B2A2888, 0x107F0F50, 0x58FBC53B, 0x65F69F19, 0x3AF6CEF3,
0x15C3894F, 0x4C931A2C, 0x39A897E9, 0x5945BB8C, 0x5C9E4521, 0x7F5E310D, 0x0E4F06D2, 0x275DEB9C, 0x15AD847F,
0x09685F17, 0x7FB415F2, 0x3B20C1C0, 0x5168E01E, 0x0DB4651A, 0x24847A6D, 0x2CEB8B8F, 0x79765A35, 0x6218F283,
0x665BDD04, 0x3DB6F48F, 0x70F282EB, 0x45CC93FC, 0x6FDCA37D, 0x79A86C67, 0x72AB0990, 0x4E7AFEFA, 0x54D294F0,
0x032A18E0, 0x2776C435, 0x3AC93409, 0x3E20E7D4, 0x3D3A4D85, 0x075C4E35, 0x77C97FBD, 0x16800911, 0x63FA9357,
0x7727B0CB, 0x24CF0FE3, 0x0B587EF3, 0x0CD5354A, 0x2E376EFA, 0x0B0C94E5, 0x47F5F70A, 0x7FA04F19, 0x18C0FA00,
0x6C7A7178, 0x2C8BDAA8, 0x12375435, 0x4E9363FB, 0x12E7B7AD, 0x4FEE48C4, 0x3F85E6E6, 0x58B44BA9, 0x3FCAEC41,
0x392E534E, 0x4B5F553A, 0x0E45EB3C, 0x0E00E83E, 0x4E896E1A, 0x35BCAF71, 0x48CA1C47, 0x0CAA55EE, 0x72F6FCF6,
0x50266A7D, 0x0473D5AC, 0x09770608, 0x3420FDD4, 0x7B9B8677, 0x2E4615EB, 0x3F797CC7, 0x0870BBC1, 0x5C7D84E6,
0x4A8611AC, 0x5066B2CB, 0x5C1DD3FF, 0x63470BAC, 0x3CE12443, 0x08A9AEA7, 0x757E5FE2, 0x0B74883F, 0x1B916654,
0x456CA8A6, 0x4AFA6F25, 0x7445B1FE, 0x053794E8, 0x0428C273, 0x3FA50738, 0x137D8024, 0x1229AAB1, 0x0E2E7552,
0x493A2F95, 0x5AF3C6F9, 0x1AD8CB41, 0x3C312C8C, 0x2B1A3176, 0x1F4CA0ED, 0x45A83294, 0x5F3B2F4A, 0x1AE82764,
0x73EE487F, 0x1EB4AC11
};
u32 func_E0200000(s32 arg0) {
s32 temp_v0 = D_E0200690 * 4;
@ -12,7 +39,7 @@ u32 func_E0200000(s32 arg0) {
}
s32 func_E0200044(s32 arg0, s32 arg1) {
s32 temp_v0 = D_E0200734[arg1 - ((arg1 / 128) * 128)];
s32 temp_v0 = D_E0200734[arg1 % ARRAY_COUNT(D_E0200734)];
if (temp_v0 < 0) {
temp_v0 = -temp_v0;

View File

@ -1,81 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "325EE0", func_E0200410);
INCLUDE_ASM(s32, "325EE0", func_E0200420);
INCLUDE_ASM(s32, "325EE0", func_E0200430);
INCLUDE_ASM(s32, "325EE0", func_E0200440);
INCLUDE_ASM(s32, "325EE0", func_E0200450);
INCLUDE_ASM(s32, "325EE0", func_E0200460);
INCLUDE_ASM(s32, "325EE0", func_E0200470);
INCLUDE_ASM(s32, "325EE0", func_E0200480);
INCLUDE_ASM(s32, "325EE0", func_E0200490);
INCLUDE_ASM(s32, "325EE0", func_E02004A0);
INCLUDE_ASM(s32, "325EE0", func_E02004B0);
INCLUDE_ASM(s32, "325EE0", func_E02004C0);
INCLUDE_ASM(s32, "325EE0", func_E02004D0);
INCLUDE_ASM(s32, "325EE0", func_E02004E0);
INCLUDE_ASM(s32, "325EE0", func_E02004F0);
INCLUDE_ASM(s32, "325EE0", func_E0200500);
INCLUDE_ASM(s32, "325EE0", func_E0200510);
INCLUDE_ASM(s32, "325EE0", func_E0200520);
INCLUDE_ASM(s32, "325EE0", func_E0200530);
INCLUDE_ASM(s32, "325EE0", func_E0200540);
INCLUDE_ASM(s32, "325EE0", func_E0200550);
INCLUDE_ASM(s32, "325EE0", func_E0200560);
INCLUDE_ASM(s32, "325EE0", func_E0200570);
INCLUDE_ASM(s32, "325EE0", func_E0200580);
INCLUDE_ASM(s32, "325EE0", func_E0200590);
INCLUDE_ASM(s32, "325EE0", func_E02005A0);
INCLUDE_ASM(s32, "325EE0", func_E02005B0);
INCLUDE_ASM(s32, "325EE0", func_E02005C0);
INCLUDE_ASM(s32, "325EE0", func_E02005D0);
INCLUDE_ASM(s32, "325EE0", func_E02005E0);
INCLUDE_ASM(s32, "325EE0", func_E02005F0);
INCLUDE_ASM(s32, "325EE0", func_E0200600);
INCLUDE_ASM(s32, "325EE0", func_E0200610);
INCLUDE_ASM(s32, "325EE0", func_E0200620);
INCLUDE_ASM(s32, "325EE0", func_E0200630);
INCLUDE_ASM(s32, "325EE0", func_E0200640);
INCLUDE_ASM(s32, "325EE0", func_E0200650);
INCLUDE_ASM(s32, "325EE0", func_E0200660);
INCLUDE_ASM(s32, "325EE0", func_E0200670);
INCLUDE_ASM(s32, "325EE0", func_E0200680);

View File

@ -29,17 +29,17 @@ void func_E00D8288(s32 l, s32 r, s32 t, s32 b) {
b = 0;
}
if (l > 319) {
l = 319;
if (l > SCREEN_WIDTH - 1) {
l = SCREEN_WIDTH - 1;
}
if (r > 239) {
r = 239;
if (r > SCREEN_HEIGHT - 1) {
r = SCREEN_HEIGHT - 1;
}
if (t > 319) {
t = 319;
if (t > SCREEN_WIDTH - 1) {
t = SCREEN_WIDTH - 1;
}
if (b > 239) {
b = 239;
if (b > SCREEN_HEIGHT - 1) {
b = SCREEN_HEIGHT - 1;
}
gDPFillRectangle(gMasterGfxPos++, l, r, t, b);

View File

@ -1,4 +1,5 @@
#include "common.h"
#include "nu/nusys.h"
s32 D_80074270 = 0;
@ -224,7 +225,7 @@ void dma_write_block(s32 dramAddr, s32 devAddr, s32 size) {
osIoMesg.devAddr = devAddr;
osIoMesg.size = size;
osEPiStartDma(carthandle, &osIoMesg, 1);
osEPiStartDma(nuPiCartHandle, &osIoMesg, 1);
osRecvMesg(&osMesgQueue, &osMesg, 1);
}

View File

@ -179,4 +179,60 @@ void game_input_to_move_vector(f32* arg0, f32* arg1) {
*arg1 = temp1;
}
// tail merge crap
#ifdef NON_MATCHING
void func_800E24F8(void) {
Shadow* playerShadow = get_shadow_by_index(gPlayerStatus.shadowID);
Camera* camera = &gCameras[0];
f32 x = playerShadow->rotation.x + 180.0;
f32 z = playerShadow->rotation.z + 180.0;
if (x != 0.0f || z != 0.0f) {
switch (gPlayerStatus.actionState) {
case 3:
case 8:
camera->unk_49C = 32.0f;
break;
case 1:
case 2:
if (camera->targetScreenCoords[1] < 130) {
camera->unk_49C = 3.0f;
return;
}
if (D_8010C9A0++ > 10) {
D_8010C9A0 = 10;
camera->unk_49C -= 2.0f;
if (camera->unk_49C < 3.0f) {
camera->unk_49C = 3.0f;
}
}
break;
case 17:
camera->unk_49C = 3.0f;
break;
default:
D_8010C9A0 = 0;
camera->unk_49C -= 2.0f;
if (camera->unk_49C < 3.0f) {
camera->unk_49C = 3.0f;
}
break;
}
} else {
switch (gPlayerStatus.actionState) {
case 1:
case 2:
case 3:
case 0x11:
camera->unk_49C = 7.2f;
break;
default:
camera->unk_49C = 24.0f;
break;
}
}
}
#else
INCLUDE_ASM(s32, "7B440", func_800E24F8);
#endif

View File

@ -1,5 +1,12 @@
#include "common.h"
extern s32 D_800F7FA8;
extern s32 D_800F7F80[10];
void set_hud_element_script(s32, s32);
void clear_hud_element_flags(s32, s32);
void draw_hud_element_2(s32);
void clear_player_data(void) {
PlayerData* playerData = &gPlayerData;
s32 i;
@ -385,7 +392,51 @@ void initialize_status_menu(void) {
func_800F0D5C();
}
// close but maybe just regalloc remaining?
#ifdef NON_MATCHING
void status_menu_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits) {
s8 digits[4];
s32 i;
s32 y2;
s32 keepDrawing;
s32 digit;
s32 place;
set_hud_element_script(iconID, D_800F7FA8);
x += 8;
y2 = y + 8;
set_hud_element_render_pos(iconID, x, y + 7);
clear_hud_element_flags(iconID, 2);
draw_hud_element_2(iconID);
// Write each digit of the input number into the digits array
for (i = 0; i < numDigits; i++) {
digit = value / 10;
place = (digit) * 10;
digit = value - place;
digits[(numDigits - i) - 1] = digit;
value /= 10;
}
x += 13;
keepDrawing = FALSE;
for (i = 0; i < numDigits; i++, x += 8) {
digit = digits[i];
// Once we have encountered our first non-zero digit, we need to keep drawing the remaining digits
if (digit != 0 || keepDrawing || (i == numDigits - 1)) {
keepDrawing = TRUE;
set_hud_element_script(iconID, D_800F7F80[digit]);
set_hud_element_render_pos(iconID, x, y2);
clear_hud_element_flags(iconID, 2);
draw_hud_element_2(iconID);
}
}
}
#else
INCLUDE_ASM(s32, "80850_len_3060", status_menu_draw_number);
#endif
INCLUDE_ASM(s32, "80850_len_3060", status_menu_draw_stat);
@ -822,262 +873,248 @@ void reset_status_menu(void) {
copy_world_hud_element_ref_to_battle(uiStatus->iconIndexC, uiStatus->iconIndexC);
}
// Weird order of loading stuff
#ifdef NON_MATCHING
// uses a jumptable, which we need .rodata support for.
// Somewhat close. Needs work.
/*
s32 is_ability_active(s32 arg0) {
s32 iVar2;
u32 uVar3;
s32 iVar5;
s32 piVar6;
s32 is_ability_active(Ability ability) {
s32 abilityMoveID;
PlayerData* playerData = &gPlayerData;
s32 attackFXArray[6];
s32 ret;
s32 attackFXIndex;
s32 badgeMoveID;
s32 i;
s32 local_20[6];
s32 badge;
player_data* playerData = &gPlayerData;
s32 iVar7 = 0;
u32 uVar4;
iVar5 = 0;
//iVar7 = 0;
ret = 0;
attackFXIndex = 0;
for (i = 5; i >= 0; i--) {
local_20[i] = 0;
for (i = 0; i < ARRAY_COUNT(attackFXArray); i++) {
attackFXArray[i] = 0;
}
if ((gGameStatusPtr->unk_7E & 1) == 0) {
iVar2 = 0;
iVar7 = 0;
piVar6 = 0;
for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) {
s32 index = i;
badge = playerData->equippedBadges[index];
if (playerData->equippedBadges[index] != 0) {
uVar4 = gItemTable[badge].moveID;
}
switch (arg0) {
case 0:
uVar3 = 0x4c;
break;
default:
continue;
case 2:
uVar3 = 0x40;
break;
case 3:
uVar3 = 0x4d;
break;
case 4:
uVar3 = 0x52;
break;
case 5:
uVar3 = 0x35;
break;
case 6:
if (uVar4 == 0x53) {
iVar7++;
}
if (playerData->hasActionCommands != 0) {
iVar7++;
}
continue;
case 7:
uVar3 = 0x41;
break;
case 8:
uVar3 = 0x42;
break;
case 9:
uVar3 = 0x5a;
break;
case 10:
uVar3 = 0x3c;
break;
case 0xb:
uVar3 = 0x4e;
break;
case 0xc:
uVar3 = 0x5b;
break;
case 0xd:
uVar3 = 0x3d;
break;
case 0xe:
uVar3 = 0x43;
break;
case 0xf:
if (uVar4 == 0x54) {
local_20[piVar6] = 1;
piVar6++;
iVar5++;
iVar7 = -1;
}
if (uVar4 == 0x55) {
local_20[piVar6] = 2;
piVar6++;
iVar5++;
iVar7 = -1;
}
if (uVar4 == 0x56) {
local_20[piVar6] = 3;
piVar6++;
iVar5++;
iVar7 = -1;
}
if (uVar4 == 0x57) {
local_20[piVar6] = 4;
piVar6++;
iVar5++;
iVar7 = -1;
}
if (uVar4 == 0x58) {
local_20[piVar6] = 5;
piVar6++;
iVar5++;
iVar7 = -1;
}
if (uVar4 == 0x59) {
local_20[piVar6] = 6;
piVar6++;
iVar5++;
iVar7 = -1;
}
continue;
case 0x10:
uVar3 = 0x5c;
break;
case 0x11:
uVar3 = 0x5d;
break;
case 0x12:
uVar3 = 0x5e;
break;
case 0x13:
uVar3 = 0x44;
break;
case 0x14:
uVar3 = 0x5f;
break;
case 0x15:
uVar3 = 0x60;
break;
case 0x16:
uVar3 = 0x4f;
break;
case 0x17:
uVar3 = 0x61;
break;
case 0x18:
uVar3 = 0x62;
break;
case 0x19:
uVar3 = 99;
break;
case 0x1b:
uVar3 = 0x45;
break;
case 0x1c:
uVar3 = 0x3b;
break;
case 0x1d:
uVar3 = 0x6e;
break;
case 0x1e:
uVar3 = 100;
break;
case 0x1f:
uVar3 = 0x65;
break;
case 0x20:
uVar3 = 0x46;
break;
case 0x21:
uVar3 = 0x47;
break;
case 0x22:
uVar3 = 0x3e;
break;
case 0x23:
uVar3 = 0x48;
break;
case 0x24:
uVar3 = 0x66;
break;
case 0x25:
uVar3 = 0x49;
break;
case 0x26:
uVar3 = 0x67;
break;
case 0x27:
uVar3 = 0x6d;
break;
case 0x28:
uVar3 = 0x6a;
break;
case 0x29:
uVar3 = 0x6c;
break;
case 0x2a:
uVar3 = 0x50;
break;
case 0x1a:
uVar3 = 0x38;
break;
case 0x2b:
uVar3 = 0x68;
break;
case 0x2c:
uVar3 = 0x69;
break;
case 0x2d:
uVar3 = 0x6b;
break;
case 0x2e:
uVar3 = 0x6f;
break;
case 0x2f:
uVar3 = 0x70;
break;
case 0x30:
uVar3 = 0x71;
break;
case 0x31:
uVar3 = 0x72;
break;
case 0x32:
uVar3 = 0x73;
break;
case 0x33:
uVar3 = 0x33;
break;
case 0x34:
uVar3 = 0x74;
break;
case 0x35:
uVar3 = 0x75;
break;
case 0x36:
uVar3 = 0x76;
break;
case 0x37:
uVar3 = 0x4a;
}
if (uVar4 == uVar3) {
iVar7++;
}
}
if (iVar7 < 0) {
iVar7 = local_20[rand_int(iVar5 - 1)];
}
return iVar7;
if (gGameStatusPtr->peachFlags & 1) {
return 0;
}
for (i = 0; i < ARRAY_COUNT(playerData->equippedBadges); i++) {
s32 b = playerData->equippedBadges[i];
if (b != 0) {
badgeMoveID = gItemTable[b].moveID;
}
switch (ability) {
default:
continue;
case ABILITY_DODGE_MASTER:
abilityMoveID = 0x4c;
break;
case ABILITY_SPIKE_SHIELD:
abilityMoveID = 0x40;
break;
case ABILITY_FIRST_ATTACK:
abilityMoveID = 0x4d;
break;
case ABILITY_HP_PLUS:
abilityMoveID = 0x52;
break;
case ABILITY_DOUBLE_DIP:
abilityMoveID = 0x35;
break;
case ABILITY_MYSTERY_SCROLL:
if (badgeMoveID == 0x53) {
ret++;
}
if (playerData->hasActionCommands) {
ret++;
}
continue;
case ABILITY_FIRE_SHIELD:
abilityMoveID = 0x41;
break;
case ABILITY_PRETTY_LUCKY:
abilityMoveID = 0x42;
break;
case ABILITY_HP_DRAIN:
abilityMoveID = 0x5a;
break;
case ABILITY_ALL_OR_NOTHING:
abilityMoveID = 0x3c;
break;
case ABILITY_SLOW_GO:
abilityMoveID = 0x4e;
break;
case ABILITY_FP_PLUS:
abilityMoveID = 0x5b;
break;
case ABILITY_ICE_POWER:
abilityMoveID = 0x3d;
break;
case ABILITY_FEELING_FINE:
abilityMoveID = 0x43;
break;
case ABILITY_ATTACK_F_X:
if (badgeMoveID == 0x54) {
attackFXArray[attackFXIndex++] = 1;
ret = -1;
}
if (badgeMoveID == 0x55) {
attackFXArray[attackFXIndex++] = 2;
ret = -1;
}
if (badgeMoveID == 0x56) {
attackFXArray[attackFXIndex++] = 3;
ret = -1;
}
if (badgeMoveID == 0x57) {
attackFXArray[attackFXIndex++] = 4;
ret = -1;
}
if (badgeMoveID == 0x58) {
attackFXArray[attackFXIndex++] = 5;
ret = -1;
}
if (badgeMoveID == 0x59) {
attackFXArray[attackFXIndex++] = 6;
ret = -1;
}
continue;
case ABILITY_MONEY_MONEY:
abilityMoveID = 0x5c;
break;
case ABILITY_CHILL_OUT:
abilityMoveID = 0x5d;
break;
case ABILITY_HAPPY_HEART:
abilityMoveID = 0x5e;
break;
case ABILITY_ZAP_TAP:
abilityMoveID = 0x44;
break;
case ABILITY_MEGA_RUSH:
abilityMoveID = 0x5f;
break;
case ABILITY_BERSERKER:
abilityMoveID = 0x60;
break;
case ABILITY_RIGHT_ON:
abilityMoveID = 0x4f;
break;
case ABILITY_RUNAWAY_PAY:
abilityMoveID = 0x61;
break;
case ABILITY_FLOWER_SAVER:
abilityMoveID = 0x62;
break;
case ABILITY_PAY_OFF:
abilityMoveID = 99;
break;
case ABILITY_DEFEND_PLUS:
abilityMoveID = 0x45;
break;
case ABILITY_POWER_PLUS:
abilityMoveID = 0x3b;
break;
case ABILITY_REFUND:
abilityMoveID = 0x6e;
break;
case ABILITY_POWER_RUSH:
abilityMoveID = 100;
break;
case ABILITY_CRAZY_HEART:
abilityMoveID = 0x65;
break;
case ABILITY_LAST_STAND:
abilityMoveID = 0x46;
break;
case ABILITY_CLOSE_CALL:
abilityMoveID = 0x47;
break;
case ABILITY_P_UP_D_DOWN:
abilityMoveID = 0x3e;
break;
case ABILITY_LUCKY_DAY:
abilityMoveID = 0x48;
break;
case ABILITY_MEGA_HP_DRAIN:
abilityMoveID = 0x66;
break;
case ABILITY_P_DOWN_D_UP:
abilityMoveID = 0x49;
break;
case ABILITY_FLOWER_FANATIC:
abilityMoveID = 0x67;
break;
case ABILITY_SPEEDY_SPIN:
abilityMoveID = 0x6d;
break;
case ABILITY_SPIN_ATTACK:
abilityMoveID = 0x6a;
break;
case ABILITY_I_SPY:
abilityMoveID = 0x6c;
break;
case ABILITY_BUMP_ATTACK:
abilityMoveID = 0x50;
break;
case ABILITY_QUICK_CHANGE:
abilityMoveID = 0x38;
break;
case ABILITY_HEART_FINDER:
abilityMoveID = 0x68;
break;
case ABILITY_FLOWER_FINDER:
abilityMoveID = 0x69;
break;
case ABILITY_DIZZY_ATTACK:
abilityMoveID = 0x6b;
break;
case ABILITY_FINAL_GOOMPA:
abilityMoveID = 0x6f;
break;
case ABILITY_FINAL_BOMBOMB:
abilityMoveID = 0x70;
break;
case ABILITY_DEEP_FOCUS:
abilityMoveID = 0x71;
break;
case ABILITY_SUPER_FOCUS:
abilityMoveID = 0x72;
break;
case ABILITY_KAIDEN:
abilityMoveID = 0x73;
break;
case ABILITY_DAMAGE_DODGE:
abilityMoveID = 0x33;
break;
case ABILITY_HAPPY_FLOWER:
abilityMoveID = 0x74;
break;
case ABILITY_GROUP_FOCUS:
abilityMoveID = 0x75;
break;
case ABILITY_PEEKABOO:
abilityMoveID = 0x76;
break;
case ABILITY_HEALTHY_HEALTHY:
abilityMoveID = 0x4a;
break;
}
if (badgeMoveID == abilityMoveID) {
ret++;
}
}
if (ret < 0) {
ret = attackFXArray[rand_int(attackFXIndex - 1)];
}
return ret;
}
*/
#else
INCLUDE_ASM(s32, "80850_len_3060", is_ability_active, s32 arg0);
INCLUDE_ASM(s32, "80850_len_3060", is_ability_active);
#endif
s32 is_partner_ability_active(void) {
return 0;
}

View File

@ -1,6 +1,6 @@
#include "common.h"
INCLUDE_ASM(void, "8e790_len_2850", draw_box, s32 flags, s32 windowStyle, s16 posX, s16 posY, s32 posZ, s32 width,
INCLUDE_ASM(void, "8e790_len_2850", draw_box, s32 flags, s32 windowStyle, s32 posX, s32 posY, s32 posZ, s32 width,
s32 height, s32 opacity, s32 darkening, f32 scaleX, f32 scaleY, f32 rotX, f32 rotY, f32 rotZ,
void (*fpDrawContents)(s32),s32 drawContentsArg0, Matrix4f rotScaleMtx, s32 translateX, s32 translateY,
Matrix4f* outMtx);

View File

@ -11,13 +11,6 @@ typedef struct Fog {
/* 0x18 */ s32 endDistance;
} Fog; // size = 0x1C
typedef struct RenderTaskEntry {
/* 0x00 */ s32 unk_00;
/* 0x04 */ s32 unk_04;
/* 0x08 */ void* appendGfxArg;
/* 0x0C */ void (*appendGfx)(void*);
} RenderTaskEntry; // size = 0x10
typedef struct GameMode {
/* 0x00 */ u16 flags;
/* 0x04 */ void (*init)(void);
@ -863,10 +856,23 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", create_shadow_from_data);
INCLUDE_ASM(s32, "a5dd0_len_114e0", MakeEntity, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "a5dd0_len_114e0", SetEntityCullMode);
INCLUDE_ASM(s32, "a5dd0_len_114e0", UseDynamicShadow);
ApiStatus UseDynamicShadow(ScriptInstance* script, s32 isInitialCall) {
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
if (get_variable(script, *script->ptrReadPos)) {
Shadow* shadow;
entity->flags |= 4;
shadow = get_shadow_by_index(entity->shadowIndex);
shadow->flags |= 0x400000;
} else {
entity->flags &= ~4;
}
return ApiStatus_DONE2;
}
ApiStatus AssignScript(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;

View File

@ -17,10 +17,10 @@ ApiStatus func_802A10C8_74F1F8(ScriptInstance* script, s32 isInitialCall) {
s32 var3 = get_variable(script, *args++);
playFX_56(0, var1, var2, var3, 1.0f, 60);
battleStatus->hammerCharge += 1;
battleStatus->hammerCharge++;
if (battleStatus->hammerCharge > 99) {
(* &battleStatus)->hammerCharge = 99; // TODO: macro?
battleStatus->hammerCharge = 99;
}
battleStatus->jumpCharge = 0;

View File

@ -15,10 +15,10 @@ ApiStatus func_802A1108_74D678(ScriptInstance* script, s32 isInitialCall) {
s32 var3 = get_variable(script, *args++);
playFX_56(0, var1, var2, var3, 1.0f, 60);
battleStatus->jumpCharge += 1;
battleStatus->jumpCharge++;
if (battleStatus->jumpCharge > 99) {
(* &battleStatus)->jumpCharge = 99; // TODO: macro?
battleStatus->jumpCharge = 99;
}
battleStatus->hammerCharge = 0;

View File

@ -1,6 +1,7 @@
#include "common.h"
#include "no_controller.png.h"
#include "ui/no_controller.png.h"
#include "ld_addrs.h"
#include "nu/nusys.h"
extern s32 D_80076078;
extern s32 D_800760C0;
@ -17,7 +18,7 @@ Gfx D_80077140[] = {
gsDPSetCombineMode(G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM),
gsDPSetRenderMode(G_RM_XLU_SURF, G_RM_XLU_SURF2),
gsDPSetTextureLUT(G_TT_NONE),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_8b, no_controller_png_width, no_controller_png),
gsDPSetTextureImage(G_IM_FMT_IA, G_IM_SIZ_8b, ui_no_controller_png_width, ui_no_controller_png),
gsDPSetTile(G_IM_FMT_IA, G_IM_SIZ_8b, 16, 0x0000, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_CLAMP, 5, G_TX_NOLOD,
G_TX_NOMIRROR | G_TX_CLAMP, 7, G_TX_NOLOD),
gsDPLoadSync(),
@ -66,7 +67,7 @@ void render_curtains(void) {
s8 rgb;
gDPPipeSync(gMasterGfxPos++);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C));
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gSPDisplayList(gMasterGfxPos++, &D_800760C0);
guFrustumF(m.m[0], -80.0f, 80.0f, -60.0f, 60.0f, 160.0f, 640.0f, 1.0f);

View File

@ -1,5 +1,6 @@
#include "common.h"
#include "stdlib/stdarg.h"
#include "nu/nusys.h"
typedef struct {
/* 0x00 */ u32 magic;
@ -15,9 +16,9 @@ typedef struct {
u32 is_debug_print(void* arg0, const unsigned char* str, s32 count);
void is_debug_init(void) {
osEPiWriteIo(carthandle, (u32) &gISVDbgPrnAdrs->put, 0);
osEPiWriteIo(carthandle, (u32) &gISVDbgPrnAdrs->get, 0);
osEPiWriteIo(carthandle, (u32) &gISVDbgPrnAdrs->magic, ASCII_TO_U32('I', 'S', '6', '4'));
osEPiWriteIo(nuPiCartHandle, (u32) &gISVDbgPrnAdrs->put, 0);
osEPiWriteIo(nuPiCartHandle, (u32) &gISVDbgPrnAdrs->get, 0);
osEPiWriteIo(nuPiCartHandle, (u32) &gISVDbgPrnAdrs->magic, ASCII_TO_U32('I', 'S', '6', '4'));
}
void printf(const char* fmt, ...) {
@ -47,13 +48,13 @@ u32 is_debug_print(void* arg0, const unsigned char* str, s32 count) {
s32 start;
s32 end;
osEPiReadIo(carthandle, (u32) &gISVDbgPrnAdrs->magic, &data);
osEPiReadIo(nuPiCartHandle, (u32) &gISVDbgPrnAdrs->magic, &data);
if (data != ASCII_TO_U32('I', 'S', '6', '4')) {
return 1;
}
osEPiReadIo(carthandle, (u32) &gISVDbgPrnAdrs->get, &data);
osEPiReadIo(nuPiCartHandle, (u32) &gISVDbgPrnAdrs->get, &data);
pos = data;
osEPiReadIo(carthandle, (u32) &gISVDbgPrnAdrs->put, &data);
osEPiReadIo(nuPiCartHandle, (u32) &gISVDbgPrnAdrs->put, &data);
start = data;
end = start + count;
if (end >= 0xffe0) {
@ -71,8 +72,8 @@ u32 is_debug_print(void* arg0, const unsigned char* str, s32 count) {
u32 addr = (u32) &gISVDbgPrnAdrs->data + (start & 0xffffffc);
s32 shift = ((3 - (start & 3)) * 8);
osEPiReadIo(carthandle, addr, &data);
osEPiWriteIo(carthandle, addr, (data & ~(0xff << shift)) | (*str << shift));
osEPiReadIo(nuPiCartHandle, addr, &data);
osEPiWriteIo(nuPiCartHandle, addr, (data & ~(0xff << shift)) | (*str << shift));
start++;
if (start >= 0xffe0) {
@ -82,7 +83,7 @@ u32 is_debug_print(void* arg0, const unsigned char* str, s32 count) {
count--;
str++;
}
osEPiWriteIo(carthandle, (u32)&gISVDbgPrnAdrs->put, start);
osEPiWriteIo(nuPiCartHandle, (u32)&gISVDbgPrnAdrs->put, start);
return 1;
}

View File

@ -1,12 +1,13 @@
#include "common.h"
#include "stdlib/stdarg.h"
#include "nu/nusys.h"
// TODO: use src/is_debug.c instead as this file is identical between versions
u32 func_80025D74(void* arg0, const unsigned char* str, s32 count);
void func_80025C60(void) {
OSPiHandle** handle = &carthandle;
OSPiHandle** handle = &nuPiCartHandle;
osEPiWriteIo(*handle, 0xB3FF0014, 0);
osEPiWriteIo(*handle, 0xB3FF0004, 0);
@ -40,13 +41,13 @@ u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) {
s32 start;
s32 end;
osEPiReadIo(carthandle, 0xB3FF0000, &data);
osEPiReadIo(nuPiCartHandle, 0xB3FF0000, &data);
if (data != ASCII_TO_U32('I', 'S', '6', '4')) {
return 1;
}
osEPiReadIo(carthandle, 0xB3FF0004, &data);
osEPiReadIo(nuPiCartHandle, 0xB3FF0004, &data);
pos = data;
osEPiReadIo(carthandle, 0xB3FF0014, &data);
osEPiReadIo(nuPiCartHandle, 0xB3FF0014, &data);
start = data;
end = start + count;
if (end >= 0xffe0) {
@ -64,8 +65,8 @@ u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) {
u32 addr = 0xB3FF0020 + (start & 0xffffffc);
s32 shift = ((3 - (start & 3)) * 8);
osEPiReadIo(carthandle, addr, &data);
osEPiWriteIo(carthandle, addr, (data & ~(0xff << shift)) | (*str << shift));
osEPiReadIo(nuPiCartHandle, addr, &data);
osEPiWriteIo(nuPiCartHandle, addr, (data & ~(0xff << shift)) | (*str << shift));
start++;
if (start >= 0xffe0) {
@ -75,7 +76,7 @@ u32 func_80025D74(void* arg0, const unsigned char* str, s32 count) {
count--;
str++;
}
osEPiWriteIo(carthandle, 0xB3FF0014, start);
osEPiWriteIo(nuPiCartHandle, 0xB3FF0014, start);
return 1;
}

View File

@ -232,7 +232,7 @@ void gfx_draw_frame(void) {
nuGfxTaskStart(gDisplayContext->mainGfx, (u32)(gMasterGfxPos - gDisplayContext->mainGfx) * 8, NU_GFX_UCODE_F3DEX2,
NU_SC_TASK_LODABLE | NU_SC_SWAPBUFFER);
gCurrentDisplayContextIndex = gCurrentDisplayContextIndex ^ 1;
func_8002C890(D_8009A64C, 0x140, 0xF0);
func_8002C890(nuGfxCfb_ptr, 0x140, 0xF0);
}
void load_engine_data(void) {
@ -293,7 +293,7 @@ void load_engine_data(void) {
initialize_curtains();
poll_rumble();
for (i = 0; i < 4; i++) {
for (i = 0; i < ARRAY_COUNT(gGameStatusPtr->unk_50); i++) {
gGameStatusPtr->unk_50[i] = 3;
gGameStatusPtr->unk_48[i] = 12;
}
@ -350,8 +350,8 @@ void gfx_init_state(void) {
gSPDisplayList(gMasterGfxPos++, OS_K0_TO_PHYSICAL(D_80074210));
}
s32 func_800271FC(const u16* framebuf1, const u16* framebuf2, s32 x, s32 y, u8* out) {
s32 pixel = (x * SCREEN_WIDTH) + y;
s32 func_800271FC(const u16* framebuf1, const u16* framebuf2, s32 y, s32 x, u8* out) {
s32 pixel = SCREEN_WIDTH * y + x;
out[3] = (framebuf2[pixel] >> 2) & 0xF;
out[0] = framebuf1[pixel] >> 11; // red
@ -359,51 +359,39 @@ s32 func_800271FC(const u16* framebuf1, const u16* framebuf2, s32 x, s32 y, u8*
out[2] = (framebuf1[pixel] >> 1) & 0x1F; // blue
}
INCLUDE_ASM(s32, "main_loop", func_8002725C);
void func_8002725C(u8*, u32, u16*);
INCLUDE_ASM(void, "main_loop", func_8002725C, u8* arg0, u32 arg1, u16* arg2);
INCLUDE_ASM(s32, "main_loop", func_80027600);
INCLUDE_ASM(s32, "main_loop", func_80027774);
// alex: mystery t0=SCREEN_WIDTH temp and weirdness with the `pixel` calculation
#ifdef NON_MATCHING
void func_800279B4(const u16* framebuf1, u16* framebuf2, u16* arg2) {
s32 x;
void func_800279B4(u16* arg0, u16* arg1, u16* arg2) {
u8 filterBuf[0x18];
u8 sp30[4];
s32 y;
s32 subroutine_argE;
s32 subroutine_arg7;
s32 subroutine_arg8;
s32 subroutine_arg9;
s32 subroutine_argA;
s32 subroutine_argB;
s32 subroutine_argC;
s32 subroutine_argF;
s32 x;
for (y = 1; y < SCREEN_HEIGHT - 1; y++) {
for (x = 2; x < SCREEN_WIDTH - 2; x++) {
s32 pixel = (subroutine_argF + x) * 2;
s32 pixel = SCREEN_WIDTH * y + x;
// Wii U VC changes this condition to FALSE to fix pause menu lag
if (((framebuf2[pixel] >> 2) & 0xF) < 8) {
func_800271FC(framebuf1, framebuf2, y - 1, x - 1, &subroutine_argE);
func_800271FC(framebuf1, framebuf2, y - 1, x + 1, &subroutine_arg7);
func_800271FC(framebuf1, framebuf2, y, x - 2, &subroutine_arg8);
func_800271FC(framebuf1, framebuf2, y, x + 2, &subroutine_arg9);
func_800271FC(framebuf1, framebuf2, y + 1, x - 1, &subroutine_argA);
func_800271FC(framebuf1, framebuf2, y + 1, x + 1, &subroutine_argB);
func_800271FC(framebuf1, framebuf2, y, x, &subroutine_argC);
func_8002725C(&subroutine_argE, (subroutine_argC << 24) | (subroutine_argC << 16) | (subroutine_argC << 8) | subroutine_argC, &framebuf2[pixel]);
if (((arg1[pixel] >> 2) & 0xF) < 8) {
func_800271FC(arg0, arg1, y - 1, x - 1, &filterBuf[0x00]);
func_800271FC(arg0, arg1, y - 1, x + 1, &filterBuf[0x04]);
func_800271FC(arg0, arg1, y, x - 2, &filterBuf[0x08]);
func_800271FC(arg0, arg1, y, x + 2, &filterBuf[0x0C]);
func_800271FC(arg0, arg1, y + 1, x - 1, &filterBuf[0x10]);
func_800271FC(arg0, arg1, y + 1, x + 1, &filterBuf[0x14]);
func_800271FC(arg0, arg1, y, x, &sp30);
func_8002725C(&filterBuf, (sp30[0] << 24) | (sp30[1] << 16) | (sp30[2] << 8) | sp30[3], &arg2[pixel]);
} else {
// Edge
framebuf2[pixel] = framebuf1[pixel] | 1;
arg2[pixel] = arg0[pixel] | 1;
}
}
}
}
#else
INCLUDE_ASM(s32, "main_loop", func_800279B4);
#endif
void func_80027BAC(s32 arg0, s32 arg1) {
s32 i;
@ -454,7 +442,7 @@ void gfx_draw_background(void) {
switch (bgFlags) {
case 0x10:
gDPPipeSync(gMasterGfxPos++);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, D_8009A658[1]);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb[1]);
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
gDPSetBlendColor(gMasterGfxPos++, 0x80, 0x80, 0x80, 0xFF);
gDPSetPrimDepth(gMasterGfxPos++, -1, -1);
@ -467,7 +455,7 @@ void gfx_draw_background(void) {
gGameStatusPtr->enableBackground |= 0x20;
break;
case 0x20:
func_800279B4(D_8009A658[0], D_8009A658[1], nuGfxZBuffer);
func_800279B4(nuGfxCfb[0], nuGfxCfb[1], nuGfxZBuffer);
D_800741F8 = 0;
gGameStatusPtr->enableBackground &= ~0xF0;
gGameStatusPtr->enableBackground |= 0x30;
@ -481,9 +469,9 @@ void gfx_draw_background(void) {
gDPSetScissor(gMasterGfxPos++, G_SC_NON_INTERLACE, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT);
gDPSetCycleType(gMasterGfxPos++, G_CYC_FILL);
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, D_8009A64C);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, nuGfxCfb_ptr);
gDPSetFillColor(gMasterGfxPos++, 0x00010001);
gDPFillRectangle(gMasterGfxPos++, 0, 0, 319, 239);
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPSetCycleType(gMasterGfxPos++, G_CYC_1CYCLE);
gDPSetTexturePersp(gMasterGfxPos++, G_TP_NONE);
gDPSetTextureLUT(gMasterGfxPos++, G_TT_NONE);
@ -512,7 +500,7 @@ void gfx_draw_background(void) {
break;
default:
if (gOverrideFlags & 8) {
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C));
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
return;
}
@ -521,9 +509,9 @@ void gfx_draw_background(void) {
gDPSetRenderMode(gMasterGfxPos++, G_RM_NOOP, G_RM_NOOP2);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, OS_PHYSICAL_TO_K0(nuGfxZBuffer));
gDPSetFillColor(gMasterGfxPos++, 0xFFFCFFFC);
gDPFillRectangle(gMasterGfxPos++, 0, 0, 319, 239);
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPPipeSync(gMasterGfxPos++);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C));
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetFillColor(gMasterGfxPos++, PACK_FILL_COLOR(camera->bgColor[0], camera->bgColor[1], camera->bgColor[2], 1));
backgroundMinW = gGameStatusPtr->backgroundMinW;
@ -593,7 +581,7 @@ void gfx_draw_background(void) {
gDPPipeSync(gMasterGfxPos++);
if (backgroundMinH > 0) {
gDPFillRectangle(gMasterGfxPos++, 0, 0, 319, backgroundMinH - 1);
gDPFillRectangle(gMasterGfxPos++, 0, 0, SCREEN_WIDTH - 1, backgroundMinH - 1);
gDPNoOp(gMasterGfxPos++);
}
@ -602,13 +590,13 @@ void gfx_draw_background(void) {
gDPNoOp(gMasterGfxPos++);
}
if (backgroundSumW < 0x140) {
gDPFillRectangle(gMasterGfxPos++, backgroundSumW, backgroundMinH, 319, backgroundSumH - 1);
if (backgroundSumW < SCREEN_WIDTH) {
gDPFillRectangle(gMasterGfxPos++, backgroundSumW, backgroundMinH, SCREEN_WIDTH - 1, backgroundSumH - 1);
gDPNoOp(gMasterGfxPos++);
}
if (backgroundSumH < 0xF0) {
gDPFillRectangle(gMasterGfxPos++, 0, backgroundSumH, 319, 239);
gDPFillRectangle(gMasterGfxPos++, 0, backgroundSumH, SCREEN_WIDTH - 1, SCREEN_HEIGHT - 1);
gDPNoOp(gMasterGfxPos++);
}
break;

View File

@ -21,7 +21,7 @@ void boot_idle(void) {
nuPiInit();
nuScCreateScheduler(OS_VI_NTSC_LAN1, 1);
osViSetSpecialFeatures(OS_VI_GAMMA_OFF | OS_VI_GAMMA_DITHER_OFF | OS_VI_DIVOT_ON | OS_VI_DITHER_FILTER_ON);
osCreateThread(&D_800A4420, NU_MAIN_THREAD_ID, boot_main, NULL, &D_800B8590, NU_MAIN_THREAD_PRI);
osCreateThread(&D_800A4420, NU_MAIN_THREAD_ID, boot_main, NULL, &nuYieldBuf, NU_MAIN_THREAD_PRI);
osStartThread(&D_800A4420);
osSetThreadPri(&D_800A4270, NU_IDLE_THREAD_PRI);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/3b710_len_40", nuGfxSwapCfbFuncSet);

View File

@ -1,3 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/3b770_len_80", nuGfxRetraceWait);

View File

@ -1,5 +0,0 @@
#include "common.h"
INCLUDE_ASM(s32, "os/3b7f0_len_120", nuSiCallBackAdd);
INCLUDE_ASM(s32, "os/3b7f0_len_120", nuSiCallBackRemove);

View File

@ -1,45 +0,0 @@
#include "common.h"
#include "nu/nusys.h"
s32 contRetrace();
s32 contReadData();
s32 contReadNW();
s32 contQuery();
u32 D_80093D20 = 0;
UNK_FUN_PTR(D_80093D24[4]) = {
contRetrace,
contReadData,
contReadNW,
contQuery,
};
s32 D_80093D34 = 0;
NUCallBackList nuContCallBack = {
NULL,
D_80093D24,
0x100,
0,
};
INCLUDE_ASM(u8, "os/nuContMgr", nuContMgrInit);
INCLUDE_ASM(void, "os/nuContMgr", nuContMgrRemove);
INCLUDE_ASM(void, "os/nuContMgr", nuContDataClose);
INCLUDE_ASM(void, "os/nuContMgr", nuContDataOpen);
INCLUDE_ASM(s32, "os/nuContMgr", contRetrace);
INCLUDE_ASM(s32, "os/nuContMgr", contReadData);
INCLUDE_ASM(s32, "os/nuContMgr", contReadNW);
INCLUDE_ASM(s32, "os/nuContMgr", contQuery);
INCLUDE_ASM(void, "os/nuContMgr", nuContDataLock);
INCLUDE_ASM(void, "os/nuContMgr", nuContDataUnLock);

View File

@ -1,12 +0,0 @@
#include "common.h"
#include "nu/nusys.h"
void nuContRmbForceStop(void) {
nuSiSendMesg(NU_CONT_RMB_FORCESTOP_MSG, NULL);
}
void nuContRmbForceStopEnd(void) {
nuSiSendMesg(NU_CONT_RMB_FORCESTOPEND_MSG, NULL);
}
INCLUDE_ASM(void, "os/nusys/3B4A0", nuPiReadRomOverlay, NUPiOverlaySegment* segment);

View File

@ -1,12 +0,0 @@
#include "common.h"
s32 D_800773F0 = 1;
s32 D_800773F4 = 0;
s32 D_800773F8 = 0;
s32 D_800773FC = 0;
INCLUDE_ASM(s32, "os/nusys/7e40_len_3f0", nuGfxTaskMgr);
INCLUDE_ASM(s32, "os/nusys/7e40_len_3f0", nuGfxTaskMgrInit);
INCLUDE_ASM(s32, "os/nusys/7e40_len_3f0", nuGfxTaskStart);

View File

@ -0,0 +1,16 @@
#include "common.h"
#include "nu/nusys.h"
void nuContDataLock(void) {
OSIntMask mask = osSetIntMask(OS_IM_NONE);
nuContDataLockKey = NU_CONT_DATA_LOCK;
osSetIntMask(mask);
}
void nuContDataUnLock(void) {
OSIntMask mask = osSetIntMask(OS_IM_NONE);
nuContDataLockKey = NU_CONT_DATA_UNLOCK;
osSetIntMask(mask);
}

96
src/os/nusys/nuContMgr.c Normal file
View File

@ -0,0 +1,96 @@
#include "common.h"
#include "nu/nusys.h"
s32 contRetrace();
s32 contReadData();
s32 contReadNW();
s32 contQuery();
u32 D_80093D20 = 0;
UNK_FUN_PTR(D_80093D24[4]) = {
contRetrace,
contReadData,
contReadNW,
contQuery,
};
s32 D_80093D34 = 0;
NUCallBackList nuContCallBack = {
NULL,
D_80093D24,
0x100,
0,
};
extern OSMesg nuContWaitMesgBuf;
extern OSMesg nuContDataMutexBuf;
extern OSMesgQueue nuContDataMutexQ;
u8 nuContMgrInit(void) {
s32 i;
u8 pattern;
u8 bitmask;
nuContDataUnLock();
osCreateMesgQueue(&nuContWaitMesgQ, &nuContWaitMesgBuf, 1);
osCreateMesgQueue(&nuContDataMutexQ, &nuContDataMutexBuf, 1);
nuSiCallBackAdd(&nuContCallBack);
nuContQueryRead();
nuContNum = 0;
bitmask = 1;
pattern = 0;
for (i = 0; i < NU_CONT_MAXCONTROLLERS; i++) {
if (nuContStatus[i].errno != 0) {
continue;
}
if ((nuContStatus[i].type & CONT_TYPE_MASK) == CONT_TYPE_NORMAL) {
nuContNum++;
pattern |= bitmask;
}
bitmask <<= 1;
}
return pattern;
}
void nuContMgrRemove(void) {
nuSiCallBackRemove(&nuContCallBack);
}
void nuContDataClose(void) {
osSendMesg(&nuContDataMutexQ, NULL, OS_MESG_BLOCK);
}
void nuContDataOpen(void) {
osRecvMesg(&nuContDataMutexQ, NULL, OS_MESG_BLOCK);
}
INCLUDE_ASM(s32, "os/nusys/nuContMgr", contRetrace);
INCLUDE_ASM(s32, "os/nusys/nuContMgr", contReadData);
INCLUDE_ASM(s32, "os/nusys/nuContMgr", contReadNW);
// nuContStatus needs to be declared in this file.
#ifdef NON_MATCHING
s32 contQuery(void) {
s32 ret = osContStartQuery(&nuSiMesgQ);
if (ret != 0) {
return ret;
}
osRecvMesg(&nuSiMesgQ, NULL, OS_MESG_BLOCK);
osContGetQuery(nuContStatus);
return ret;
}
#else
INCLUDE_ASM(s32, "os/nusys/nuContMgr", contQuery);
#endif

View File

@ -0,0 +1,6 @@
#include "common.h"
#include "nu/nusys.h"
void nuContRmbForceStop(void) {
nuSiSendMesg(NU_CONT_RMB_FORCESTOP_MSG, NULL);
}

View File

@ -0,0 +1,6 @@
#include "common.h"
#include "nu/nusys.h"
void nuContRmbForceStopEnd(void) {
nuSiSendMesg(NU_CONT_RMB_FORCESTOPEND_MSG, NULL);
}

View File

@ -1,3 +1,27 @@
#include "common.h"
#include "nu/nusys.h"
INCLUDE_ASM(s32, "os/nusys/nuContRmbModeSet", nuContRmbModeSet);
void nuContRmbModeSet(u32 contNo, u8 mode) {
OSIntMask mask = osSetIntMask(OS_IM_NONE);
s32 forceStop = nuContRmbCtl[contNo].mode & NU_CONT_RMB_MODE_PAUSE;
switch (mode) {
case NU_CONT_RMB_MODE_DISABLE:
nuContRmbCtl[contNo].mode = mode | forceStop;
break;
case NU_CONT_RMB_MODE_ENABLE:
if (nuContRmbCtl[contNo].type == NU_CONT_PAK_TYPE_RUMBLE) {
nuContRmbCtl[contNo].mode = mode | forceStop;
}
break;
case NU_CONT_RMB_MODE_AUTORUN:
nuContRmbCtl[contNo].mode = mode | forceStop;
if (nuContRmbCtl[contNo].type == NU_CONT_PAK_TYPE_RUMBLE) {
nuContRmbCtl[contNo].autorun = NU_CONT_RMB_AUTO_FIND;
} else {
nuContRmbCtl[contNo].autorun = NU_CONT_RMB_AUTO_SEARCH;
}
break;
}
osSetIntMask(mask);
}

View File

@ -2,8 +2,7 @@
#include "nu/nusys.h"
extern u16* FrameBuf[3];
extern UNK_PTR D_8009A610;
extern UNK_PTR D_80093BA0;
extern UNK_PTR nugfx_ucode;
extern Gfx rdpstateinit_dl[];
void nuGfxInitEX2(void) {
@ -14,11 +13,10 @@ void nuGfxInitEX2(void) {
nuGfxSetCfb(FrameBuf, NU_GFX_FRAMEBUFFER_NUM);
nuGfxSetZBuffer((u16*) NU_GFX_ZBUFFER_ADDR);
nuGfxSwapCfbFuncSet(nuGfxSwapCfb);
D_8009A610 = &D_80093BA0;
nuGfxUcode = &nugfx_ucode;
nuGfxTaskMgrInit();
ptr = gfx;
// TODO: Verify that this macro call works in PM64.
gSPDisplayList(ptr++, OS_K0_TO_PHYSICAL(&rdpstateinit_dl));
gDPFullSync(ptr++);
gSPEndDisplayList(ptr++);

View File

@ -0,0 +1,19 @@
#include "common.h"
#include "nu/nusys.h"
void nuGfxRetraceWait(u32 retrace_num) {
NUScClient client;
OSMesg mesgBuf;
OSMesgQueue mesgQ;
osCreateMesgQueue(&mesgQ, &mesgBuf, 1);
nuScAddClient(&client, &mesgQ , NU_SC_RETRACE_MSG);
while(retrace_num) {
osRecvMesg(&mesgQ, NULL, OS_MESG_BLOCK);
retrace_num--;
}
nuScRemoveClient(&client);
}

View File

@ -1,3 +1,36 @@
#include "common.h"
#include "nu/nusys.h"
INCLUDE_ASM(void, "os/nusys/nuGfxSetCfb", nuGfxSetCfb);
void nuGfxSetCfb(u16** framebuf, u32 framebufnum) {
u32 i;
nuGfxCfb = framebuf;
nuGfxCfbNum = framebufnum;
nuGfxCfbCounter = 0;
nuGfxCfb_ptr = nuGfxCfb[0];
nuGfxRetraceWait(1);
nuScSetFrameBufferNum(framebufnum);
if(framebufnum > 1) {
s32 i;
for (i = 0; i < framebufnum - 1; i++) {
if (nuGfxCfb[i] != nuGfxCfb[i+1]) {
break;
}
}
if (i == framebufnum - 1) {
nuScSetFrameBufferNum(1);
} else {
for (i = 0; i < framebufnum; i++) {
if (osViGetCurrentFramebuffer() != nuGfxCfb[i]) {
nuGfxCfbCounter = i;
nuGfxCfb_ptr = nuGfxCfb[i];
break;
}
}
}
}
}

View File

@ -0,0 +1,9 @@
#include "common.h"
#include "nu/nusys.h"
void nuGfxSwapCfbFuncSet(NUGfxSwapCfbFunc func) {
OSIntMask mask = osSetIntMask(OS_IM_NONE);
nuGfxSwapCfbFunc = func;
osSetIntMask(mask);
}

123
src/os/nusys/nuGfxTaskMgr.c Normal file
View File

@ -0,0 +1,123 @@
#include "common.h"
#include "nu/nusys.h"
u32 nuGfxCfbNum = 1;
NUGfxSwapCfbFunc nuGfxSwapCfbFunc = NULL;
NUGfxTaskEndFunc nuGfxTaskEndFunc = NULL;
u16 beforeFlag = 0;
extern OSMesg D_8009E6D0[NU_GFX_TASKMGR_MESGS];
extern OSMesgQueue D_800DAC90;
extern NUScTask* nuGfxTask_ptr;
extern s16 taskDoneMsg;
extern s16 swapBufMsg;
extern OSThread GfxTaskMgrThread;
extern NUScTask nuGfxTask[NU_GFX_TASK_NUM];
extern s32 D_800DA040;
extern s32 D_800B91D0;
extern s32 D_800D91D0;
extern void D_800D9780;
extern u32 nuGfxCfbCounter;
extern OSMesgQueue D_800DA47C;
void nuGfxTaskMgr(void) {
NUScTask* task;
s16* msg;
OSIntMask mask;
osCreateMesgQueue(&D_800DAC90, &D_8009E6D0[0], NU_GFX_MESGS);
while (TRUE) {
osRecvMesg(&D_800DAC90, (OSMesg*)&task, OS_MESG_BLOCK);
msg = task->msg;
switch (*msg) {
case NU_SC_SWAPBUFFER_MSG:
if (nuGfxSwapCfbFunc != NULL) {
nuGfxSwapCfbFunc(task);
}
if (nuGfxDisplay & NU_GFX_DISPLAY_ON_TRIGGER) {
osViBlack(FALSE);
nuGfxDisplay = NU_GFX_DISPLAY_ON;
}
mask = osSetIntMask(OS_IM_NONE);
nuGfxTaskSpool--;
osSetIntMask(mask);
break;
case NU_SC_GTASKEND_MSG:
if (nuGfxTaskEndFunc != NULL) {
nuGfxTaskEndFunc(task);
}
mask = osSetIntMask(OS_IM_NONE);
nuGfxTaskSpool--;
osSetIntMask(mask);
break;
}
}
}
void nuGfxTaskMgrInit(void) {
u32 i;
taskDoneMsg = NU_SC_GTASKEND_MSG;
swapBufMsg = NU_SC_SWAPBUFFER_MSG;
nuGfxTaskSpool = 0;
nuGfxDisplayOff();
osCreateThread(&GfxTaskMgrThread, NU_GFX_TASKMGR_THREAD_ID, nuGfxTaskMgr, NULL, &D_8009E6D0, NU_GFX_TASKMGR_THREAD_PRI);
osStartThread(&GfxTaskMgrThread);
for (i = 0; i < NU_GFX_TASK_NUM; i++) {
nuGfxTask[i].next = &nuGfxTask[i + 1];
nuGfxTask[i].msgQ = &D_800DAC90;
nuGfxTask[i].list.t.type = M_GFXTASK;
nuGfxTask[i].list.t.flags = 0;
dma_copy((u8* )0xB0000B70, (u8* )0xB0000C70, &D_800D9780);
nuGfxTask[i].list.t.ucode_boot = &D_800D9780;
nuGfxTask[i].list.t.ucode_boot_size = 0x100;
nuGfxTask[i].list.t.ucode_size = SP_UCODE_SIZE;
nuGfxTask[i].list.t.ucode_data_size = SP_UCODE_DATA_SIZE;
nuGfxTask[i].list.t.dram_stack = &D_800DA040;
nuGfxTask[i].list.t.dram_stack_size = SP_DRAM_STACK_SIZE8;
nuGfxTask[i].list.t.output_buff = &D_800B91D0;
nuGfxTask[i].list.t.output_buff_size = &D_800D91D0;
nuGfxTask[i].list.t.yield_data_ptr = &nuYieldBuf;
nuGfxTask[i].list.t.yield_data_size = NU_GFX_YIELD_BUF_SIZE;
}
nuGfxTask[NU_GFX_TASK_NUM - 1].next = &nuGfxTask[0];
nuGfxTask_ptr = &nuGfxTask[0];
}
void nuGfxTaskStart(Gfx* gfxList_ptr, u32 gfxListSize, u32 ucode, u32 flag) {
u32 mask;
nuGfxTask_ptr->list.t.data_ptr = (u64*) gfxList_ptr;
nuGfxTask_ptr->list.t.data_size = gfxListSize;
nuGfxTask_ptr->list.t.flags = flag >> 16;
nuGfxTask_ptr->list.t.ucode = nuGfxUcode[ucode].ucode;
nuGfxTask_ptr->list.t.ucode_data = nuGfxUcode[ucode].ucode_data;
nuGfxTask_ptr->flags = flag & 0xFFFF;
nuGfxTask_ptr->framebuffer = nuGfxCfb_ptr;
if (beforeFlag & NU_SC_UCODE_XBUS) {
beforeFlag ^= NU_SC_UCODE_XBUS;
nuGfxTask_ptr->list.t.flags |= OS_TASK_DP_WAIT;
}
beforeFlag = flag;
if (flag & NU_SC_SWAPBUFFER) {
nuGfxTask_ptr->msg = (void*) &swapBufMsg;
nuGfxCfbCounter = (nuGfxCfbCounter + 1) % nuGfxCfbNum;
nuGfxCfb_ptr = nuGfxCfb[nuGfxCfbCounter];
} else {
nuGfxTask_ptr->msg = (void*) &taskDoneMsg;
}
mask = osSetIntMask(OS_IM_NONE);
nuGfxTaskSpool++;
osSetIntMask(mask);
osWritebackDCacheAll();
osSendMesg(&D_800DA47C, (void*) nuGfxTask_ptr, OS_MESG_BLOCK);
nuGfxTask_ptr = nuGfxTask_ptr->next;
}

View File

@ -1,14 +1,39 @@
#include "common.h"
#include "nu/nusys.h"
void nuGfxThread2(void);
void gfxThread(void);
extern s32 D_800AE6D0;
extern s32 nuContWaitMesgBuf;
extern OSThread D_800B1B90;
extern OSMesg nuGfxMesgBuf[NU_GFX_MESGS];
extern OSMesgQueue nuGfxMesgQ;
void nuGfxThreadStart(void) {
osCreateThread(&D_800B1B90, 4, nuGfxThread2, NULL, &D_800AE6D0, NU_GFX_THREAD_PRI);
osCreateThread(&D_800B1B90, 4, gfxThread, NULL, &nuContWaitMesgBuf, NU_GFX_THREAD_PRI);
osStartThread(&D_800B1B90);
}
INCLUDE_ASM(void, "os/nusys/nuGfxThread", nuGfxThread2);
void gfxThread(void) {
NUScClient gfxClient;
NUScMsg* mesgType;
osCreateMesgQueue(&nuGfxMesgQ, &nuGfxMesgBuf, NU_GFX_MESGS);
nuScAddClient(&gfxClient, &nuGfxMesgQ, NU_SC_RETRACE_MSG | NU_SC_PRENMI_MSG);
while (TRUE) {
osRecvMesg(&nuGfxMesgQ, &mesgType, OS_MESG_BLOCK);
switch (*mesgType) {
case NU_SC_RETRACE_MSG:
if (nuGfxFunc != NULL) {
(*nuGfxFunc)(nuGfxTaskSpool);
}
break;
case NU_SC_PRENMI_MSG:
if (nuGfxPreNMIFunc != NULL) {
(*nuGfxPreNMIFunc)();
}
break;
}
}
}

View File

@ -6,5 +6,5 @@ extern OSMesg D_800AC5E8[NU_PI_MESG_NUM];
void nuPiInit(void) {
osCreatePiManager(OS_PRIORITY_PIMGR, &D_800AC5D0, D_800AC5E8, NU_PI_MESG_NUM);
carthandle = osCartRomInit();
nuPiCartHandle = osCartRomInit();
}

View File

@ -25,7 +25,7 @@ void nuPiReadRom(u32 rom_addr, void* buf_ptr, u32 size) {
ioMesg.devAddr = rom_addr;
ioMesg.size = mesgSize;
osEPiStartDma(carthandle, &ioMesg, OS_READ);
osEPiStartDma(nuPiCartHandle, &ioMesg, OS_READ);
osRecvMesg(&queue, &mesg, OS_MESG_BLOCK);
rom_addr += mesgSize;

View File

@ -0,0 +1,48 @@
#include "common.h"
#include "nu/nusys.h"
void nuPiReadRomOverlay(NUPiOverlaySegment* segment) {
OSIoMesg dmaIoMesgBuf;
OSMesgQueue dmaMesgQ;
OSMesg dmaMesgBuf;
u32 readSize;
u8* romAddr;
u32 size;
s32 clearBSS = TRUE;
void* bufPtr;
osCreateMesgQueue(&dmaMesgQ, &dmaMesgBuf, 1);
dmaIoMesgBuf.hdr.pri = OS_MESG_PRI_NORMAL;
dmaIoMesgBuf.hdr.retQueue = &dmaMesgQ;
osInvalDCache(segment->dataStart, segment->dataEnd - segment->dataStart);
osInvalICache(segment->textStart, segment->textEnd - segment->textStart);
romAddr = segment->romStart;
size = segment->romEnd - romAddr;
bufPtr = segment->ramStart;
while (size != 0) {
if (size > NU_PI_CART_BLOCK_READ_SIZE) {
readSize = NU_PI_CART_BLOCK_READ_SIZE;
} else {
readSize = size;
}
dmaIoMesgBuf.dramAddr = bufPtr;
dmaIoMesgBuf.devAddr = (u32)romAddr;
dmaIoMesgBuf.size = readSize;
osEPiStartDma(nuPiCartHandle, &dmaIoMesgBuf, OS_READ);
if (clearBSS) {
bzero(segment->bssStart, segment->bssEnd - segment->bssStart);
clearBSS = FALSE;
}
osRecvMesg(&dmaMesgQ, &dmaMesgBuf, OS_MESG_BLOCK);
romAddr += readSize;
bufPtr = (void*)((u8*)bufPtr + readSize);
size -= readSize;
}
}

View File

@ -0,0 +1,23 @@
#include "common.h"
#include "nu/nusys.h"
void nuSiCallBackAdd(NUCallBackList* list) {
OSIntMask mask;
NUCallBackList** siCallBackListPtr = &nuSiCallBackList;
u32 i;
while (*siCallBackListPtr != NULL) {
if ((*siCallBackListPtr)->majorNo == list->majorNo) {
return;
}
siCallBackListPtr = &(*siCallBackListPtr)->next;
}
for (i = 1; list->func[i] != NULL; i++);
mask = osSetIntMask(OS_IM_NONE);
*siCallBackListPtr = list;
list->next = NULL;
list->funcNum = i;
osSetIntMask(mask);
}

View File

@ -0,0 +1,18 @@
#include "common.h"
#include "nu/nusys.h"
void nuSiCallBackRemove(NUCallBackList* list) {
OSIntMask mask;
NUCallBackList** siCallBackListPtr = &nuSiCallBackList;
while (*siCallBackListPtr) {
if ((*siCallBackListPtr)->next == list) {
mask = osSetIntMask(OS_IM_NONE);
(*siCallBackListPtr)->next = list->next;
list->next = NULL;
osSetIntMask(mask);
break;
}
siCallBackListPtr = &(*siCallBackListPtr)->next;
}
}

View File

@ -1,16 +1,111 @@
#include "common.h"
#include "nu/nusys.h"
s32 D_80077400[] = {0, 0, 0, 0};
NUCallBackList* nuSiCallBackList = NULL;
INCLUDE_ASM(u8, "os/nusys/nuSiMgr", nuSiMgrInit);
extern OSMesg nuSiMesgBuf[8];
extern OSThread siMgrThread;
extern s32 D_800A08C0;
INCLUDE_ASM(s32, "os/nusys/nuSiMgr", nuSiSendMesg, NUScMsg mesg, void* dataPtr);
static void nuSiMgrThread(void* arg);
u8 nuSiMgrInit(void) {
u8 pattern;
OSContStatus status[NU_CONT_MAXCONTROLLERS];
u32 i;
osCreateMesgQueue(&nuSiMesgQ, &nuSiMesgBuf, ARRAY_COUNT(nuSiMesgBuf));
osSetEventMesg(OS_EVENT_SI, &nuSiMesgQ, NULL);
osContInit(&nuSiMesgQ, &pattern, &status[0]);
for (i = 0; i < ARRAY_COUNT(status); i++) {
if (((pattern >> i) & 1) && (status[i].errno == 0) && ((status[i].type & 0x1F07) != 5)) {
pattern &= ~(1 << i);
}
}
osCreateThread(&siMgrThread, NU_SI_THREAD_ID, nuSiMgrThread, NULL, &D_800A08C0, NU_SI_THREAD_PRI);
osStartThread(&siMgrThread);
return pattern;
}
s32 nuSiSendMesg(NUScMsg mesg, void* dataPtr) {
OSMesg rtnMesgBuf;
OSMesgQueue rtnMesgQ;
NUSiCommonMesg siCommonMesg;
siCommonMesg.mesg = mesg;
siCommonMesg.dataPtr = dataPtr;
siCommonMesg.rtnMesgQ = &rtnMesgQ;
osCreateMesgQueue(&rtnMesgQ, &rtnMesgBuf, 1);
osSendMesg(&nuSiMgrMesgQ, &siCommonMesg, OS_MESG_BLOCK);
osRecvMesg(&rtnMesgQ, NULL, OS_MESG_BLOCK);
return siCommonMesg.error;
}
void nuSiMgrStop(void) {
nuSiSendMesg(NU_SI_STOP_MGR_MSG, NULL);
}
INCLUDE_ASM(void, "os/nusys/nuSiMgr", nuSiMgrRestart);
void nuSiMgrRestart(void) {
osStartThread(&siMgrThread);
}
INCLUDE_ASM(s32, "os/nusys/nuSiMgr", nuSiMgrThread);
void nuSiMgrThread(void* arg) {
NUScClient siClient;
OSMesg siMgrMesgBuf[NU_SI_MESG_MAX];
NUSiCommonMesg* siMesg;
NUCallBackList** siCallBackListPtr;
s32 temp;
u16 majorNo;
u16 minorNo;
osCreateMesgQueue(&nuSiMgrMesgQ, &siMgrMesgBuf, NU_SI_MESG_MAX);
nuScAddClient(&siClient, &nuSiMgrMesgQ, NU_SC_RETRACE_MSG);
while (TRUE) {
osRecvMesg(&nuSiMgrMesgQ, &siMesg, OS_MESG_BLOCK);
siCallBackListPtr = &nuSiCallBackList;
switch (siMesg->mesg) {
case NU_SC_RETRACE_MSG:
while (*siCallBackListPtr) {
if ((*siCallBackListPtr)->func[0]){
temp = (*((*siCallBackListPtr)->func[0]))(siMesg);
}
if (temp != 0) {
break;
}
siCallBackListPtr = &(*siCallBackListPtr)->next;
}
break;
case NU_SI_STOP_MGR_MSG:
osSendMesg(siMesg->rtnMesgQ, NULL, OS_MESG_BLOCK);
nuScResetClientMesgType(&siClient, 0);
osStopThread(NULL);
nuScResetClientMesgType(&siClient, NU_SC_RETRACE_MSG);
break;
default:
majorNo = siMesg->mesg & NU_SI_MSG_MAJOR_NO_MASK;
minorNo = siMesg->mesg & NU_SI_MSG_MINOR_NO_MASK;
while (*siCallBackListPtr) {
if ((*siCallBackListPtr)->majorNo == majorNo) {
if ((*siCallBackListPtr)->funcNum > minorNo) {
siMesg->error = (*((*siCallBackListPtr)->func[minorNo]))(siMesg);
}
if (siMesg->rtnMesgQ != NULL) {
osSendMesg(siMesg->rtnMesgQ, NULL, OS_MESG_BLOCK);
}
break;
}
siCallBackListPtr = &(*siCallBackListPtr)->next;
}
break;
}
}
}

View File

@ -44,7 +44,7 @@ void state_step_battle(void) {
u32 unk_47B;
if (D_800A0900 == 5) {
if (D_8009A658[1] != D_8009A64C) {
if (nuGfxCfb[1] != nuGfxCfb_ptr) {
return;
}
D_800A0900--;

View File

@ -34,7 +34,7 @@ void state_step_pause(void) {
update_npcs();
update_player();
update_effects();
if (D_8009A658[1] == D_8009A64C) {
if (nuGfxCfb[1] == nuGfxCfb_ptr) {
D_800A0920 = 4;
D_800A0921 = 2;
gOverrideFlags |= 0x8;

View File

@ -1,68 +1,56 @@
#include "common.h"
void sin_cos_rad(f32, f32*, f32*);
f32 func_800E34D8(void);
f32 player_check_collision_below(f32 length, s32* hitColliderID); // player_check_collision_below
s32 get_collider_type_by_id(s32 colliderID);
extern f32 D_802B6240; // bss? angle to lastGoodPosition
// Float problems near get_xz_dist_to_player; almost matching otherwise
#ifndef NON_MATCHING
INCLUDE_ASM(void, "world/action/16", func_802B6000_E287F0, void);
#else
void func_802B6000_E287F0(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 dx;
f32 dy;
f32 speed;
f32 angleRad;
if (gPlayerStatus.flags & 0x80000000) {
Camera* cameras = gCameras;
gPlayerStatus.flags &= ~0x80000000;
if (playerStatus->flags & 0x80000000) {
playerStatus->flags &= ~0x80000000;
suggest_player_anim_setUnkFlag(0x10017);
cameras[0].moveFlags |= 1;
playerStatus->flags |= 8;
playerStatus->fallState = 0;
playerStatus->gravityIntegrator[0] = 18.3473f;
playerStatus->gravityIntegrator[1] = -3.738f;
playerStatus->gravityIntegrator[2] = 0.8059f;
playerStatus->gravityIntegrator[3] = -0.0987f;
gPlayerStatus.fallState = 0;
gPlayerStatus.gravityIntegrator[0] = 18.3473f;
gPlayerStatus.gravityIntegrator[1] = -3.738f;
gPlayerStatus.gravityIntegrator[2] = 0.8059f;
gPlayerStatus.gravityIntegrator[3] = -0.0987f;
gPlayerStatus.flags |= 8;
gCameras[0].moveFlags |= 1;
D_802B6240 = atan2(gPlayerStatus.position.x, gPlayerStatus.position.z, gPlayerStatus.lastGoodPosition.x,
gPlayerStatus.lastGoodPosition.z);
gPlayerStatus.currentSpeed = get_xz_dist_to_player(gPlayerStatus.lastGoodPosition.x, gPlayerStatus.lastGoodPosition.z) / 18.0f;
D_802B6240 = atan2(playerStatus->position.x, playerStatus->position.z, playerStatus->lastGoodPosition.x,
playerStatus->lastGoodPosition.z);
playerStatus->currentSpeed = get_xz_dist_to_player(playerStatus->lastGoodPosition.x, playerStatus->lastGoodPosition.z) / 18.0f;
}
angleRad = (D_802B6240 * TAU) / 360.0f;
sin_cos_rad(angleRad, &dx, &dy);
sin_cos_rad((D_802B6240 * TAU) / 360.0f, &dx, &dy);
speed = gPlayerStatus.currentSpeed;
speed = playerStatus->currentSpeed;
if (gPlayerStatus.flags & 0x40000) {
if (playerStatus->flags & 0x40000) {
speed *= 0.5f;
}
gPlayerStatus.position.x += speed * dx;
gPlayerStatus.position.z -= speed * dy;
playerStatus->position.x += speed * dx;
playerStatus->position.z -= speed * dy;
if (gPlayerStatus.fallState == 0) {
if (playerStatus->fallState == 0) {
integrate_gravity();
gPlayerStatus.position.y += gPlayerStatus.gravityIntegrator[0];
playerStatus->position.y += playerStatus->gravityIntegrator[0];
if (gPlayerStatus.gravityIntegrator[0] < 0.0f) {
gPlayerStatus.fallState = 1; // Now start checking for floor
gPlayerStatus.flags |= 4;
if (playerStatus->gravityIntegrator[0] < 0.0f) {
playerStatus->fallState = 1; // Now start checking for floor
playerStatus->flags |= 4;
}
} else {
s32 colliderID;
gPlayerStatus.position.y = player_check_collision_below(func_800E34D8(), &colliderID);
playerStatus->position.y = player_check_collision_below(func_800E34D8(), &colliderID);
if (colliderID >= 0) {
colliderID = get_collider_type_by_id(colliderID); // what
@ -70,4 +58,3 @@ void func_802B6000_E287F0(void) {
}
}
}
#endif

View File

@ -63,7 +63,7 @@ void func_802B6198_E24768(void) {
if (!(gGameStatusPtr->peachFlags & 0x10)) {
suggest_player_anim_clearUnkFlag((D_802B6300_E248D0)[gGameStatusPtr->peachAnimIdx]);
} else {
suggest_player_anim_clearUnkFlag(0xD000D); // dood
suggest_player_anim_clearUnkFlag(0xD000D); // doood
}
} else {
peach_set_disguise_anim(world_actions_peachDisguises[gPlayerStatus.peachDisguise].unk_04);

View File

@ -9,6 +9,40 @@ INCLUDE_ASM(void, "world/action/walk", func_802B6288_E23968, void);
// same as func_802B6198_E24768 but requires data stuff
INCLUDE_ASM(void, "world/action/walk", func_802B6550_E23C30, void);
INCLUDE_ASM(void, "world/action/walk", func_802B65E8_E23CC8, void);
void func_802B65E8_E23CC8(void) {
PlayerStatus* playerStatus = &gPlayerStatus;
f32 magnitude;
f32 angle;
if (playerStatus->flags & 0x80000000) {
playerStatus->flags &= ~0x80000000;
playerStatus->unk_60 = 0;
if (!(playerStatus->flags & 0x4000)) {
playerStatus->currentSpeed = playerStatus->walkSpeed;
}
func_802B6550_E23C30();
}
if (playerStatus->flags & 0x4000) {
playerStatus->targetYaw = playerStatus->heading;
try_player_footstep_sounds(8);
return;
}
player_input_to_move_vector(&angle, &magnitude);
phys_update_interact_collider();
if (magnitude == 0.0f) {
set_action_state(ACTION_STATE_IDLE);
return;
}
playerStatus->targetYaw = angle;
if (gGameStatusPtr->peachAnimIdx == 0 && sqrtf(SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1])) > 55.0f) {
set_action_state(ACTION_STATE_RUN);
return;
}
try_player_footstep_sounds(8);
}
INCLUDE_ASM(void, "world/action/walk", func_802B6738_E23E18, void);

View File

@ -3124,7 +3124,7 @@ ApiStatus N(func_80241DF8_95CFF8)(ScriptInstance* script, s32 isInitialCall) {
if (effectPtr->unk_18 <= 0) {
effectPtr->unk_18 = 0;
remove_effect(N(D_8024DFE0), effectPtr);
remove_effect(N(D_8024DFE0));
free_generic_entity(N(D_8024DFC0));
return ApiStatus_DONE2;
}

View File

@ -3237,7 +3237,7 @@ ApiStatus N(func_80240C88_969E48)(ScriptInstance* script, s32 isInitialCall) {
if (effectPtr->unk_18 <= 0) {
effectPtr->unk_18 = 0;
remove_effect(N(D_8024EFC0), effectPtr);
remove_effect(N(D_8024EFC0));
free_generic_entity(gPauseMenuCursorPosY);
return ApiStatus_DONE2;
}

View File

@ -1,4 +1,5 @@
#include "flo_10.h"
#include "nu/nusys.h"
extern u16* nuGfxZBuffer;
@ -68,7 +69,7 @@ void N(func_802404B0_CB96B0)(s32 arg0, s32 arg1, s32 arg2, s32 arg3) {
}
subroutine_arg5 = phi_s4 / 6;
subroutine_arg4 = phi_s4 / 6;
subroutine_arg6 = D_8009A64C;
subroutine_arg6 = nuGfxCfb_ptr;
for (i = 0; i < subroutine_arg4; i++) {
phi_s5 = arg1 - ((i + 1) * 6);
@ -300,7 +301,7 @@ void N(func_80240A98_CB9C98)(void) {
gSPDisplayList(gMasterGfxPos++, model->modelNode->displayData->displayList);
gDPPipeSync(gMasterGfxPos++);
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(D_8009A64C));
gDPSetColorImage(gMasterGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr));
gDPSetDepthSource(gMasterGfxPos++, G_ZS_PRIM);
gDPSetPrimDepth(gMasterGfxPos++, 32734, 0);
gDPSetRenderMode(gMasterGfxPos++, G_RM_ZB_XLU_DECAL, G_RM_ZB_XLU_DECAL2);

View File

@ -3,7 +3,7 @@
import glob
import os
print_funcs = False
print_funcs = True
sizes = {}

View File

@ -184,7 +184,7 @@ class Configure:
modes = ["ld"]
if assets:
modes.extend(["bin", "Yay0", "img", "pm_map_data", "pm_msg", "pm_npc_sprites", "pm_charset",
"pm_charset_palettes", "pm_effects"])
"pm_charset_palettes", "pm_effect_loads", "pm_effect_shims"])
if code:
modes.extend(["code", "c", "data", "rodata"])
@ -546,7 +546,7 @@ class Configure:
build(entry.object_path.with_suffix(""), palettes, "pm_charset_palettes")
build(entry.object_path, [entry.object_path.with_suffix("")], "bin")
elif seg.type == "pm_effects":
elif seg.type in ["pm_effect_loads", "pm_effect_shims"]:
build(entry.object_path, entry.src_paths, "as")
elif seg.type == "linker" or seg.type == "linker_offset":
pass

View File

@ -26,7 +26,8 @@ def get_c_file(directory):
def import_c_file(in_file):
in_file = os.path.relpath(in_file, root_dir)
cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-Iver/current/build/include" ,"-D_LANGUAGE_C", "-ffreestanding", "-DF3DEX_GBI_2", in_file]
cpp_command = ["gcc", "-E", "-P", "-Iinclude", "-Isrc", "-Iver/current/build/include" ,"-D_LANGUAGE_C",
"-ffreestanding", "-DF3DEX_GBI_2", "-DSCRIPT(...)={}", in_file]
try:
return subprocess.check_output(cpp_command, cwd=root_dir, encoding="utf-8")
except subprocess.CalledProcessError:

View File

@ -3,7 +3,7 @@ from segtypes.n64.segment import N64Segment
from util import options
import yaml
class N64SegPm_effects(N64Segment):
class N64SegPm_effect_loads(N64Segment):
effects = []
@staticmethod
@ -55,7 +55,7 @@ glabel {name}
def split(self, rom_bytes):
for i, effect in enumerate(self.effects):
effect_asm = N64SegPm_effects.get_effect_asm(i, effect)
effect_asm = N64SegPm_effect_loads.get_effect_asm(i, effect)
self.effect_path("").parent.mkdir(parents=True, exist_ok=True)

View File

@ -0,0 +1,58 @@
from yaml.loader import Loader
from segtypes.n64.segment import N64Segment
from util import options
import yaml
class N64SegPm_effect_shims(N64Segment):
shims = []
@staticmethod
def get_shim_asm(index, name):
return f""".include "macro.inc"
# assembler directives
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.set gp=64 # allow use of 64-bit general purpose registers
.section .text, "ax"
glabel {name}
/* 0 3C01E020 */ lui $at, %hi(effectFuncs + 0x{index * 4:X})
/* 4 8C210694 */ lw $at, %lo(effectFuncs + 0x{index * 4:X})($at)
/* 8 00200008 */ jr $at
/* C 00000000 */ nop
"""
def shim_path(self, shim):
return options.get_build_path() / "asm" / "effect_shims" / f"{shim}.s"
def __init__(self, rom_start, rom_end, type, name, vram_start, extract, given_subalign, given_is_overlay, given_dir, args, yml):
super().__init__(rom_start, rom_end, type, name, vram_start, extract, given_subalign, given_is_overlay, given_dir, args, yml)
with open(options.get_asm_path() / ".." / "effect_shims.yaml") as f:
self.shims = yaml.load(f.read(), Loader=yaml.SafeLoader)
def split(self, rom_bytes):
for i, shim in enumerate(self.shims):
shim_asm = N64SegPm_effect_shims.get_shim_asm(i, shim)
self.shim_path("").parent.mkdir(parents=True, exist_ok=True)
with open(self.shim_path(shim), "w") as f:
f.write(shim_asm)
def get_linker_entries(self):
from segtypes.linker_entry import LinkerEntry
ret = []
for shim in self.shims:
ret.append(LinkerEntry(
self,
[self.shim_path(shim)],
self.shim_path(shim),
".text"
))
return ret

View File

@ -267,8 +267,8 @@ glabel func_8004AAB8
/* 26278 8004AE78 AE22000C */ sw $v0, 0xc($s1)
/* 2627C 8004AE7C AC830000 */ sw $v1, ($a0)
/* 26280 8004AE80 A0A00002 */ sb $zero, 2($a1)
/* 26284 8004AE84 3C04800A */ lui $a0, %hi(carthandle)
/* 26288 8004AE88 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 26284 8004AE84 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 26288 8004AE88 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 2628C 8004AE8C 3C02800A */ lui $v0, %hi(D_800A1450)
/* 26290 8004AE90 24421450 */ addiu $v0, $v0, %lo(D_800A1450)
/* 26294 8004AE94 ACA20004 */ sw $v0, 4($a1)

View File

@ -14,7 +14,7 @@ glabel func_8005F100
/* 3A524 8005F124 0C0183B8 */ jal func_80060EE0
/* 3A528 8005F128 00000000 */ nop
/* 3A52C 8005F12C 8FBF0010 */ lw $ra, 0x10($sp)
/* 3A530 8005F130 3C01800A */ lui $at, %hi(carthandle)
/* 3A534 8005F134 AC22A618 */ sw $v0, %lo(carthandle)($at)
/* 3A530 8005F130 3C01800A */ lui $at, %hi(nuPiCartHandle)
/* 3A534 8005F134 AC22A618 */ sw $v0, %lo(nuPiCartHandle)($at)
/* 3A538 8005F138 03E00008 */ jr $ra
/* 3A53C 8005F13C 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -33,8 +33,8 @@ glabel func_8005F140
/* 3A5AC 8005F1AC 24104000 */ addiu $s0, $zero, 0x4000
.L8005F1B0:
/* 3A5B0 8005F1B0 27A50010 */ addiu $a1, $sp, 0x10
/* 3A5B4 8005F1B4 3C04800A */ lui $a0, %hi(carthandle)
/* 3A5B8 8005F1B8 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 3A5B4 8005F1B4 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 3A5B8 8005F1B8 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 3A5BC 8005F1BC 0000302D */ daddu $a2, $zero, $zero
/* 3A5C0 8005F1C0 AFB20018 */ sw $s2, 0x18($sp)
/* 3A5C4 8005F1C4 AFB3001C */ sw $s3, 0x1c($sp)

View File

@ -21,8 +21,8 @@ glabel func_80029820
/* 4C60 80029860 0C019554 */ jal func_80065550
/* 4C64 80029864 24060001 */ addiu $a2, $zero, 1
/* 4C68 80029868 27A50010 */ addiu $a1, $sp, 0x10
/* 4C6C 8002986C 3C04800A */ lui $a0, %hi(carthandle)
/* 4C70 80029870 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 4C6C 8002986C 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 4C70 80029870 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 4C74 80029874 24060001 */ addiu $a2, $zero, 1
/* 4C78 80029878 A3A00012 */ sb $zero, 0x12($sp)
/* 4C7C 8002987C AFB00014 */ sw $s0, 0x14($sp)

View File

@ -16,8 +16,8 @@ glabel func_8002CA00
/* 7E2C 8002CA2C 0000802D */ daddu $s0, $zero, $zero
/* 7E30 8002CA30 3C05B000 */ lui $a1, 0xb000
/* 7E34 8002CA34 34A50D10 */ ori $a1, $a1, 0xd10
/* 7E38 8002CA38 3C04800A */ lui $a0, %hi(carthandle)
/* 7E3C 8002CA3C 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 7E38 8002CA38 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 7E3C 8002CA3C 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 7E40 8002CA40 27A60010 */ addiu $a2, $sp, 0x10
/* 7E44 8002CA44 AFB20020 */ sw $s2, 0x20($sp)
/* 7E48 8002CA48 0200902D */ daddu $s2, $s0, $zero
@ -41,8 +41,8 @@ glabel func_8002CA00
/* 7E90 8002CA90 0060B82D */ daddu $s7, $v1, $zero
.L8002CA94:
/* 7E94 8002CA94 0220282D */ daddu $a1, $s1, $zero
/* 7E98 8002CA98 3C04800A */ lui $a0, %hi(carthandle)
/* 7E9C 8002CA9C 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 7E98 8002CA98 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 7E9C 8002CA9C 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 7EA0 8002CAA0 0280F809 */ jalr $s4
/* 7EA4 8002CAA4 27A60010 */ addiu $a2, $sp, 0x10
/* 7EA8 8002CAA8 8FA30010 */ lw $v1, 0x10($sp)
@ -96,8 +96,8 @@ glabel func_8002CA00
/* 7F58 8002CB58 3C05B000 */ lui $a1, 0xb000
/* 7F5C 8002CB5C 34A50E38 */ ori $a1, $a1, 0xe38
/* 7F60 8002CB60 27A60014 */ addiu $a2, $sp, 0x14
/* 7F64 8002CB64 3C04800A */ lui $a0, %hi(carthandle)
/* 7F68 8002CB68 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 7F64 8002CB64 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 7F68 8002CB68 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 7F6C 8002CB6C 3C148006 */ lui $s4, %hi(osEPiReadIo)
/* 7F70 8002CB70 26940D90 */ addiu $s4, $s4, %lo(osEPiReadIo)
/* 7F74 8002CB74 0280F809 */ jalr $s4
@ -114,8 +114,8 @@ glabel func_8002CA00
/* 7FA0 8002CBA0 0060B82D */ daddu $s7, $v1, $zero
.L8002CBA4:
/* 7FA4 8002CBA4 0220282D */ daddu $a1, $s1, $zero
/* 7FA8 8002CBA8 3C04800A */ lui $a0, %hi(carthandle)
/* 7FAC 8002CBAC 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 7FA8 8002CBA8 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 7FAC 8002CBAC 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 7FB0 8002CBB0 0280F809 */ jalr $s4
/* 7FB4 8002CBB4 27A60014 */ addiu $a2, $sp, 0x14
/* 7FB8 8002CBB8 8FA30014 */ lw $v1, 0x14($sp)

View File

@ -40,8 +40,8 @@ glabel func_8005FD90
/* 3B218 8005FE18 24104000 */ addiu $s0, $zero, 0x4000
.L8005FE1C:
/* 3B21C 8005FE1C 27A50010 */ addiu $a1, $sp, 0x10
/* 3B220 8005FE20 3C04800A */ lui $a0, %hi(carthandle)
/* 3B224 8005FE24 8C84A618 */ lw $a0, %lo(carthandle)($a0)
/* 3B220 8005FE20 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 3B224 8005FE24 8C84A618 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 3B228 8005FE28 0000302D */ daddu $a2, $zero, $zero
/* 3B22C 8005FE2C AFB30018 */ sw $s3, 0x18($sp)
/* 3B230 8005FE30 AFB2001C */ sw $s2, 0x1c($sp)

View File

@ -3,4 +3,4 @@ nuContRmbForceStop = 0x8005FD50; // type:func
osEPiWriteIo = 0x80060D30; // type:func rom:0x3C130
osEPiReadIo = 0x80060D90; // type:func rom:0x3C190
_Printf = 0x80064A70; // type:func rom:0x3FE70
carthandle = 0x8009A618; //
nuPiCartHandle = 0x8009A618; //

View File

@ -1,4 +1,4 @@
carthandle = 0x8009A618;
nuPiCartHandle = 0x8009A618;
D_8009A590 = 0x8009A590;
D_800B6570 = 0x800B6570;
D_8005E560 = 0x8005E560;

View File

@ -1,129 +0,0 @@
.include "macro.inc"
.section .data
glabel D_E0200690
.word 0x1E6D3457
glabel D_E0200694
.word guRotateF
glabel D_E0200698
.word guTranslateF
glabel D_E020069C
.word guTranslate
glabel D_E02006A0
.word guScaleF
glabel D_E02006A4
.word guMtxCatF
glabel D_E02006A8
.word guMtxF2L
glabel D_E02006AC
.word guMtxL2F
glabel D_E02006B0
.word queue_render_task
glabel D_E02006B4
.word func_8005A2BC
glabel D_E02006B8
.word remove_effect
glabel D_E02006BC
.word general_heap_malloc
glabel D_E02006C0
.word mem_clear
glabel D_E02006C4
.word 0x00000000
glabel D_E02006C8
.word rand_int
glabel D_E02006CC
.word clamp_angle
glabel D_E02006D0
.word sin_deg
glabel D_E02006D4
.word cos_deg
glabel D_E02006D8
.word atan2
glabel D_E02006DC
.word npc_raycast_down_sides
glabel D_E02006E0
.word load_effect
glabel D_E02006E4
.word sqrtf
glabel D_E02006E8
.word mdl_draw_hidden_panel_surface
glabel D_E02006EC
.word func_8011CFBC
glabel D_E02006F0
.word guPerspectiveF
glabel D_E02006F4
.word guMtxIdentF
glabel D_E02006F8
.word transform_point
glabel D_E02006FC
.word guLookAtHiliteF
glabel D_E0200700
.word set_screen_overlay_params_back
glabel D_E0200704
.word set_screen_overlay_center
glabel D_E0200708
.word set_screen_overlay_center_worldpos
glabel D_E020070C
.word mdl_get_next_texture_address
glabel D_E0200710
.word guPositionF
glabel D_E0200714
.word guOrthoF
glabel D_E0200718
.word guFrustumF
glabel D_E020071C
.word func_80138D88
glabel D_E0200720
.word draw_box
glabel D_E0200724
.word draw_string
glabel D_E0200728
.word get_string_width
glabel D_E020072C
.word get_background_color_blend
glabel D_E0200730
.word sfx_play_sound_at_position
glabel D_E0200734
.word 0x100B2AF5, 0x45B59924, 0x35094B45, 0x4ABFA67A, 0x164F5371, 0x7B195845, 0x58562A56, 0x25733D41, 0x48008107, 0x0E004F28, 0x6963B8AD, 0x5B82AB71, 0x6BC1F51B, 0x3D947816, 0x39705175, 0x44409A59, 0x0ED99067, 0x5F70B6F8, 0x3225AEEE, 0x08B5E97C, 0x2CDE7594, 0x5E9E5B7D, 0x5B2A2888, 0x107F0F50, 0x58FBC53B, 0x65F69F19, 0x3AF6CEF3, 0x15C3894F, 0x4C931A2C, 0x39A897E9, 0x5945BB8C, 0x5C9E4521, 0x7F5E310D, 0x0E4F06D2, 0x275DEB9C, 0x15AD847F, 0x09685F17, 0x7FB415F2, 0x3B20C1C0, 0x5168E01E, 0x0DB4651A, 0x24847A6D, 0x2CEB8B8F, 0x79765A35, 0x6218F283, 0x665BDD04, 0x3DB6F48F, 0x70F282EB, 0x45CC93FC, 0x6FDCA37D, 0x79A86C67, 0x72AB0990, 0x4E7AFEFA, 0x54D294F0, 0x032A18E0, 0x2776C435, 0x3AC93409, 0x3E20E7D4, 0x3D3A4D85, 0x075C4E35, 0x77C97FBD, 0x16800911, 0x63FA9357, 0x7727B0CB, 0x24CF0FE3, 0x0B587EF3, 0x0CD5354A, 0x2E376EFA, 0x0B0C94E5, 0x47F5F70A, 0x7FA04F19, 0x18C0FA00, 0x6C7A7178, 0x2C8BDAA8, 0x12375435, 0x4E9363FB, 0x12E7B7AD, 0x4FEE48C4, 0x3F85E6E6, 0x58B44BA9, 0x3FCAEC41, 0x392E534E, 0x4B5F553A, 0x0E45EB3C, 0x0E00E83E, 0x4E896E1A, 0x35BCAF71, 0x48CA1C47, 0x0CAA55EE, 0x72F6FCF6, 0x50266A7D, 0x0473D5AC, 0x09770608, 0x3420FDD4, 0x7B9B8677, 0x2E4615EB, 0x3F797CC7, 0x0870BBC1, 0x5C7D84E6, 0x4A8611AC, 0x5066B2CB, 0x5C1DD3FF, 0x63470BAC, 0x3CE12443, 0x08A9AEA7, 0x757E5FE2, 0x0B74883F, 0x1B916654, 0x456CA8A6, 0x4AFA6F25, 0x7445B1FE, 0x053794E8, 0x0428C273, 0x3FA50738, 0x137D8024, 0x1229AAB1, 0x0E2E7552, 0x493A2F95, 0x5AF3C6F9, 0x1AD8CB41, 0x3C312C8C, 0x2B1A3176, 0x1F4CA0ED, 0x45A83294, 0x5F3B2F4A, 0x1AE82764, 0x73EE487F, 0x1EB4AC11, 0x00000000, 0x00000000, 0x00000000

View File

@ -17,7 +17,7 @@ glabel D_80093B84
glabel D_80093B94
.word D_80093B84, 0x00000000, 0x00000000
glabel D_80093BA0
glabel nugfx_ucode
.word 0x80096030, 0x80097660
glabel FrameBuf

View File

@ -3,6 +3,7 @@
.section .rodata
.balign 8
glabel jtbl_8029C9F8
.word L8023EB20_16D400, L8023EC10_16D4F0, L8023EC40_16D520, L8023ED00_16D5E0, L8023EB60_16D440, L8023EB70_16D450, L8023EB30_16D410, L8023EB40_16D420, L8023EB50_16D430, L8023EB80_16D460, L8023EB90_16D470, L8023EBA0_16D480, L8023EBB0_16D490, L8023EBC0_16D4A0, L8023EBE0_16D4C0, L8023EBD0_16D4B0, L8023EBF0_16D4D0, L8023EC00_16D4E0, L8023EC70_16D550, L8023EC60_16D540, L8023EC50_16D530, L8023EC20_16D500, L8023EC30_16D510, L8023ECB0_16D590, L8023ECC0_16D5A0, L8023EC80_16D560, L8023ECD0_16D5B0, L8023ECE0_16D5C0, L8023ECA0_16D580, L8023ECF0_16D5D0, L8023ED38_16D618, L8023EC90_16D570, L8023ED20_16D600, L8023ED10_16D5F0, L8023ED30_16D610, 0

View File

@ -1,78 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel btl_restore_world_cameras
/* 16F388 80240AA8 3C088011 */ lui $t0, %hi(gPlayerStatus)
/* 16F38C 80240AAC 2508EFC8 */ addiu $t0, $t0, %lo(gPlayerStatus)
/* 16F390 80240AB0 0000382D */ daddu $a3, $zero, $zero
/* 16F394 80240AB4 3C04802A */ lui $a0, %hi(D_8029DA50)
/* 16F398 80240AB8 2484DA50 */ addiu $a0, $a0, %lo(D_8029DA50)
/* 16F39C 80240ABC 3C06800B */ lui $a2, %hi(gCameras)
/* 16F3A0 80240AC0 24C61D80 */ addiu $a2, $a2, %lo(gCameras)
.L80240AC4:
/* 16F3A4 80240AC4 00C0182D */ daddu $v1, $a2, $zero
/* 16F3A8 80240AC8 0080102D */ daddu $v0, $a0, $zero
/* 16F3AC 80240ACC 24850550 */ addiu $a1, $a0, 0x550
.L80240AD0:
/* 16F3B0 80240AD0 8C490000 */ lw $t1, ($v0)
/* 16F3B4 80240AD4 8C4A0004 */ lw $t2, 4($v0)
/* 16F3B8 80240AD8 8C4B0008 */ lw $t3, 8($v0)
/* 16F3BC 80240ADC 8C4C000C */ lw $t4, 0xc($v0)
/* 16F3C0 80240AE0 AC690000 */ sw $t1, ($v1)
/* 16F3C4 80240AE4 AC6A0004 */ sw $t2, 4($v1)
/* 16F3C8 80240AE8 AC6B0008 */ sw $t3, 8($v1)
/* 16F3CC 80240AEC AC6C000C */ sw $t4, 0xc($v1)
/* 16F3D0 80240AF0 24420010 */ addiu $v0, $v0, 0x10
/* 16F3D4 80240AF4 1445FFF6 */ bne $v0, $a1, .L80240AD0
/* 16F3D8 80240AF8 24630010 */ addiu $v1, $v1, 0x10
/* 16F3DC 80240AFC 8C490000 */ lw $t1, ($v0)
/* 16F3E0 80240B00 8C4A0004 */ lw $t2, 4($v0)
/* 16F3E4 80240B04 AC690000 */ sw $t1, ($v1)
/* 16F3E8 80240B08 AC6A0004 */ sw $t2, 4($v1)
/* 16F3EC 80240B0C 24840558 */ addiu $a0, $a0, 0x558
/* 16F3F0 80240B10 24E70001 */ addiu $a3, $a3, 1
/* 16F3F4 80240B14 28E20004 */ slti $v0, $a3, 4
/* 16F3F8 80240B18 1440FFEA */ bnez $v0, .L80240AC4
/* 16F3FC 80240B1C 24C60558 */ addiu $a2, $a2, 0x558
/* 16F400 80240B20 3C01802A */ lui $at, %hi(D_8029EFB0)
/* 16F404 80240B24 C420EFB0 */ lwc1 $f0, %lo(D_8029EFB0)($at)
/* 16F408 80240B28 3C01802A */ lui $at, %hi(D_8029EFB4)
/* 16F40C 80240B2C C422EFB4 */ lwc1 $f2, %lo(D_8029EFB4)($at)
/* 16F410 80240B30 3C01802A */ lui $at, %hi(D_8029EFB8)
/* 16F414 80240B34 C424EFB8 */ lwc1 $f4, %lo(D_8029EFB8)($at)
/* 16F418 80240B38 3C02802A */ lui $v0, %hi(D_8029DA34)
/* 16F41C 80240B3C 8C42DA34 */ lw $v0, %lo(D_8029DA34)($v0)
/* 16F420 80240B40 3C018007 */ lui $at, %hi(gCurrentCameraID)
/* 16F424 80240B44 AC207410 */ sw $zero, %lo(gCurrentCameraID)($at)
/* 16F428 80240B48 30420080 */ andi $v0, $v0, 0x80
/* 16F42C 80240B4C E5000028 */ swc1 $f0, 0x28($t0)
/* 16F430 80240B50 E502002C */ swc1 $f2, 0x2c($t0)
/* 16F434 80240B54 10400007 */ beqz $v0, .L80240B74
/* 16F438 80240B58 E5040030 */ swc1 $f4, 0x30($t0)
/* 16F43C 80240B5C 3C03800A */ lui $v1, %hi(gOverrideFlags)
/* 16F440 80240B60 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags)
/* 16F444 80240B64 8C620000 */ lw $v0, ($v1)
/* 16F448 80240B68 34420080 */ ori $v0, $v0, 0x80
/* 16F44C 80240B6C 080902E3 */ j .L80240B8C
/* 16F450 80240B70 AC620000 */ sw $v0, ($v1)
.L80240B74:
/* 16F454 80240B74 3C02800A */ lui $v0, %hi(gOverrideFlags)
/* 16F458 80240B78 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags)
/* 16F45C 80240B7C 8C430000 */ lw $v1, ($v0)
/* 16F460 80240B80 2404FF7F */ addiu $a0, $zero, -0x81
/* 16F464 80240B84 00641824 */ and $v1, $v1, $a0
/* 16F468 80240B88 AC430000 */ sw $v1, ($v0)
.L80240B8C:
/* 16F46C 80240B8C 3C02800E */ lui $v0, %hi(gBattleStatus+0x4)
/* 16F470 80240B90 8C42C074 */ lw $v0, %lo(gBattleStatus+0x4)($v0)
/* 16F474 80240B94 30420040 */ andi $v0, $v0, 0x40
/* 16F478 80240B98 10400006 */ beqz $v0, .L80240BB4
/* 16F47C 80240B9C 00000000 */ nop
/* 16F480 80240BA0 3C03802A */ lui $v1, %hi(D_8029DA33)
/* 16F484 80240BA4 9063DA33 */ lbu $v1, %lo(D_8029DA33)($v1)
/* 16F488 80240BA8 3C028011 */ lui $v0, %hi(gPlayerData)
/* 16F48C 80240BAC 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* 16F490 80240BB0 A0430012 */ sb $v1, 0x12($v0)
.L80240BB4:
/* 16F494 80240BB4 03E00008 */ jr $ra
/* 16F498 80240BB8 00000000 */ nop

View File

@ -1,51 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel btl_save_world_cameras
/* 16F2D4 802409F4 3C088011 */ lui $t0, %hi(gPlayerStatus)
/* 16F2D8 802409F8 2508EFC8 */ addiu $t0, $t0, %lo(gPlayerStatus)
/* 16F2DC 802409FC 0000382D */ daddu $a3, $zero, $zero
/* 16F2E0 80240A00 3C04800B */ lui $a0, %hi(gCameras)
/* 16F2E4 80240A04 24841D80 */ addiu $a0, $a0, %lo(gCameras)
/* 16F2E8 80240A08 3C06802A */ lui $a2, %hi(D_8029DA50)
/* 16F2EC 80240A0C 24C6DA50 */ addiu $a2, $a2, %lo(D_8029DA50)
.L80240A10:
/* 16F2F0 80240A10 00C0182D */ daddu $v1, $a2, $zero
/* 16F2F4 80240A14 0080102D */ daddu $v0, $a0, $zero
/* 16F2F8 80240A18 24850550 */ addiu $a1, $a0, 0x550
.L80240A1C:
/* 16F2FC 80240A1C 8C490000 */ lw $t1, ($v0)
/* 16F300 80240A20 8C4A0004 */ lw $t2, 4($v0)
/* 16F304 80240A24 8C4B0008 */ lw $t3, 8($v0)
/* 16F308 80240A28 8C4C000C */ lw $t4, 0xc($v0)
/* 16F30C 80240A2C AC690000 */ sw $t1, ($v1)
/* 16F310 80240A30 AC6A0004 */ sw $t2, 4($v1)
/* 16F314 80240A34 AC6B0008 */ sw $t3, 8($v1)
/* 16F318 80240A38 AC6C000C */ sw $t4, 0xc($v1)
/* 16F31C 80240A3C 24420010 */ addiu $v0, $v0, 0x10
/* 16F320 80240A40 1445FFF6 */ bne $v0, $a1, .L80240A1C
/* 16F324 80240A44 24630010 */ addiu $v1, $v1, 0x10
/* 16F328 80240A48 8C490000 */ lw $t1, ($v0)
/* 16F32C 80240A4C 8C4A0004 */ lw $t2, 4($v0)
/* 16F330 80240A50 AC690000 */ sw $t1, ($v1)
/* 16F334 80240A54 AC6A0004 */ sw $t2, 4($v1)
/* 16F338 80240A58 24840558 */ addiu $a0, $a0, 0x558
/* 16F33C 80240A5C 24E70001 */ addiu $a3, $a3, 1
/* 16F340 80240A60 28E20004 */ slti $v0, $a3, 4
/* 16F344 80240A64 1440FFEA */ bnez $v0, .L80240A10
/* 16F348 80240A68 24C60558 */ addiu $a2, $a2, 0x558
/* 16F34C 80240A6C C5000028 */ lwc1 $f0, 0x28($t0)
/* 16F350 80240A70 C502002C */ lwc1 $f2, 0x2c($t0)
/* 16F354 80240A74 C5040030 */ lwc1 $f4, 0x30($t0)
/* 16F358 80240A78 3C01C47A */ lui $at, 0xc47a
/* 16F35C 80240A7C 44813000 */ mtc1 $at, $f6
/* 16F360 80240A80 AD000028 */ sw $zero, 0x28($t0)
/* 16F364 80240A84 AD000030 */ sw $zero, 0x30($t0)
/* 16F368 80240A88 3C01802A */ lui $at, %hi(D_8029EFB0)
/* 16F36C 80240A8C E420EFB0 */ swc1 $f0, %lo(D_8029EFB0)($at)
/* 16F370 80240A90 3C01802A */ lui $at, %hi(D_8029EFB4)
/* 16F374 80240A94 E422EFB4 */ swc1 $f2, %lo(D_8029EFB4)($at)
/* 16F378 80240A98 3C01802A */ lui $at, %hi(D_8029EFB8)
/* 16F37C 80240A9C E424EFB8 */ swc1 $f4, %lo(D_8029EFB8)($at)
/* 16F380 80240AA0 03E00008 */ jr $ra
/* 16F384 80240AA4 E506002C */ swc1 $f6, 0x2c($t0)

View File

@ -1,466 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
glabel jtbl_8029C960
.word L8023EA64_16D344, L8023EA64_16D344, L8023E5CC_16CEAC, L8023E6BC_16CF9C, L8023E6FC_16CFDC, L8023E7AC_16D08C, L8023E60C_16CEEC, L8023E61C_16CEFC, L8023E5DC_16CEBC, L8023E5EC_16CECC, L8023E5FC_16CEDC, L8023E62C_16CF0C, L8023E63C_16CF1C, L8023E64C_16CF2C, L8023E65C_16CF3C, L8023E66C_16CF4C, L8023E68C_16CF6C, L8023E67C_16CF5C, L8023E69C_16CF7C, L8023E6AC_16CF8C, L8023E71C_16CFFC, L8023E70C_16CFEC, L8023E6EC_16CFCC, L8023E6CC_16CFAC, L8023E6DC_16CFBC, L8023E75C_16D03C, L8023E76C_16D04C, L8023E72C_16D00C, L8023E77C_16D05C, L8023E78C_16D06C, L8023E74C_16D02C, L8023E79C_16D07C, L8023E7E4_16D0C4, L8023E73C_16D01C, L8023E7CC_16D0AC, L8023E7BC_16D09C, L8023E7DC_16D0BC, 0
.section .text
glabel btl_update
/* 16CD18 8023E438 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 16CD1C 8023E43C AFB00028 */ sw $s0, 0x28($sp)
/* 16CD20 8023E440 3C10800E */ lui $s0, %hi(gBattleStatus)
/* 16CD24 8023E444 2610C070 */ addiu $s0, $s0, %lo(gBattleStatus)
/* 16CD28 8023E448 2402FFFF */ addiu $v0, $zero, -1
/* 16CD2C 8023E44C AFBF0034 */ sw $ra, 0x34($sp)
/* 16CD30 8023E450 AFB20030 */ sw $s2, 0x30($sp)
/* 16CD34 8023E454 AFB1002C */ sw $s1, 0x2c($sp)
/* 16CD38 8023E458 8E040224 */ lw $a0, 0x224($s0)
/* 16CD3C 8023E45C 8E1200DC */ lw $s2, 0xdc($s0)
/* 16CD40 8023E460 10820028 */ beq $a0, $v0, .L8023E504
/* 16CD44 8023E464 3C030008 */ lui $v1, 8
/* 16CD48 8023E468 8E020000 */ lw $v0, ($s0)
/* 16CD4C 8023E46C 00431024 */ and $v0, $v0, $v1
/* 16CD50 8023E470 10400014 */ beqz $v0, .L8023E4C4
/* 16CD54 8023E474 00000000 */ nop
/* 16CD58 8023E478 3C038007 */ lui $v1, %hi(gGameStatusPtr)
/* 16CD5C 8023E47C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1)
/* 16CD60 8023E480 80620081 */ lb $v0, 0x81($v1)
/* 16CD64 8023E484 1040000F */ beqz $v0, .L8023E4C4
/* 16CD68 8023E488 00000000 */ nop
/* 16CD6C 8023E48C 8C620004 */ lw $v0, 4($v1)
/* 16CD70 8023E490 00441024 */ and $v0, $v0, $a0
/* 16CD74 8023E494 AE020210 */ sw $v0, 0x210($s0)
/* 16CD78 8023E498 8C620014 */ lw $v0, 0x14($v1)
/* 16CD7C 8023E49C 00441024 */ and $v0, $v0, $a0
/* 16CD80 8023E4A0 AE020214 */ sw $v0, 0x214($s0)
/* 16CD84 8023E4A4 8C620024 */ lw $v0, 0x24($v1)
/* 16CD88 8023E4A8 00441024 */ and $v0, $v0, $a0
/* 16CD8C 8023E4AC AE020218 */ sw $v0, 0x218($s0)
/* 16CD90 8023E4B0 80620041 */ lb $v0, 0x41($v1)
/* 16CD94 8023E4B4 AE02021C */ sw $v0, 0x21c($s0)
/* 16CD98 8023E4B8 80620045 */ lb $v0, 0x45($v1)
/* 16CD9C 8023E4BC 0808F941 */ j .L8023E504
/* 16CDA0 8023E4C0 AE020220 */ sw $v0, 0x220($s0)
.L8023E4C4:
/* 16CDA4 8023E4C4 3C048007 */ lui $a0, %hi(gGameStatusPtr)
/* 16CDA8 8023E4C8 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0)
/* 16CDAC 8023E4CC 8E030224 */ lw $v1, 0x224($s0)
/* 16CDB0 8023E4D0 8C820000 */ lw $v0, ($a0)
/* 16CDB4 8023E4D4 00431024 */ and $v0, $v0, $v1
/* 16CDB8 8023E4D8 AE020210 */ sw $v0, 0x210($s0)
/* 16CDBC 8023E4DC 8C820010 */ lw $v0, 0x10($a0)
/* 16CDC0 8023E4E0 00431024 */ and $v0, $v0, $v1
/* 16CDC4 8023E4E4 AE020214 */ sw $v0, 0x214($s0)
/* 16CDC8 8023E4E8 8C820020 */ lw $v0, 0x20($a0)
/* 16CDCC 8023E4EC 00431024 */ and $v0, $v0, $v1
/* 16CDD0 8023E4F0 AE020218 */ sw $v0, 0x218($s0)
/* 16CDD4 8023E4F4 80820040 */ lb $v0, 0x40($a0)
/* 16CDD8 8023E4F8 AE02021C */ sw $v0, 0x21c($s0)
/* 16CDDC 8023E4FC 80820044 */ lb $v0, 0x44($a0)
/* 16CDE0 8023E500 AE020220 */ sw $v0, 0x220($s0)
.L8023E504:
/* 16CDE4 8023E504 27A40010 */ addiu $a0, $sp, 0x10
/* 16CDE8 8023E508 0C08F800 */ jal get_dpad_input_radial
/* 16CDEC 8023E50C 27A50014 */ addiu $a1, $sp, 0x14
/* 16CDF0 8023E510 C7A00010 */ lwc1 $f0, 0x10($sp)
/* 16CDF4 8023E514 82020431 */ lb $v0, 0x431($s0)
/* 16CDF8 8023E518 8E030214 */ lw $v1, 0x214($s0)
/* 16CDFC 8023E51C 4600010D */ trunc.w.s $f4, $f0
/* 16CE00 8023E520 E6040228 */ swc1 $f4, 0x228($s0)
/* 16CE04 8023E524 00021080 */ sll $v0, $v0, 2
/* 16CE08 8023E528 C7A00014 */ lwc1 $f0, 0x14($sp)
/* 16CE0C 8023E52C 02021021 */ addu $v0, $s0, $v0
/* 16CE10 8023E530 4600010D */ trunc.w.s $f4, $f0
/* 16CE14 8023E534 E604022C */ swc1 $f4, 0x22c($s0)
/* 16CE18 8023E538 AC430330 */ sw $v1, 0x330($v0)
/* 16CE1C 8023E53C 82020431 */ lb $v0, 0x431($s0)
/* 16CE20 8023E540 8E030210 */ lw $v1, 0x210($s0)
/* 16CE24 8023E544 00021080 */ sll $v0, $v0, 2
/* 16CE28 8023E548 02021021 */ addu $v0, $s0, $v0
/* 16CE2C 8023E54C AC430230 */ sw $v1, 0x230($v0)
/* 16CE30 8023E550 92020431 */ lbu $v0, 0x431($s0)
/* 16CE34 8023E554 24420001 */ addiu $v0, $v0, 1
/* 16CE38 8023E558 A2020431 */ sb $v0, 0x431($s0)
/* 16CE3C 8023E55C 00021600 */ sll $v0, $v0, 0x18
/* 16CE40 8023E560 00021603 */ sra $v0, $v0, 0x18
/* 16CE44 8023E564 28420040 */ slti $v0, $v0, 0x40
/* 16CE48 8023E568 50400001 */ beql $v0, $zero, .L8023E570
/* 16CE4C 8023E56C A2000431 */ sb $zero, 0x431($s0)
.L8023E570:
/* 16CE50 8023E570 8E0200B4 */ lw $v0, 0xb4($s0)
/* 16CE54 8023E574 10400003 */ beqz $v0, .L8023E584
/* 16CE58 8023E578 00000000 */ nop
/* 16CE5C 8023E57C 0040F809 */ jalr $v0
/* 16CE60 8023E580 00000000 */ nop
.L8023E584:
/* 16CE64 8023E584 82030095 */ lb $v1, 0x95($s0)
/* 16CE68 8023E588 10600005 */ beqz $v1, .L8023E5A0
/* 16CE6C 8023E58C 24110001 */ addiu $s1, $zero, 1
/* 16CE70 8023E590 3C02800E */ lui $v0, %hi(gBattleState)
/* 16CE74 8023E594 8C42C068 */ lw $v0, %lo(gBattleState)($v0)
/* 16CE78 8023E598 10620092 */ beq $v1, $v0, L8023E7E4_16D0C4
/* 16CE7C 8023E59C 00000000 */ nop
.L8023E5A0:
/* 16CE80 8023E5A0 3C02800E */ lui $v0, %hi(gBattleState)
/* 16CE84 8023E5A4 8C42C068 */ lw $v0, %lo(gBattleState)($v0)
/* 16CE88 8023E5A8 24430001 */ addiu $v1, $v0, 1
/* 16CE8C 8023E5AC 2C620025 */ sltiu $v0, $v1, 0x25
/* 16CE90 8023E5B0 1040008C */ beqz $v0, L8023E7E4_16D0C4
/* 16CE94 8023E5B4 00031080 */ sll $v0, $v1, 2
/* 16CE98 8023E5B8 3C01802A */ lui $at, %hi(jtbl_8029C960)
/* 16CE9C 8023E5BC 00220821 */ addu $at, $at, $v0
/* 16CEA0 8023E5C0 8C22C960 */ lw $v0, %lo(jtbl_8029C960)($at)
/* 16CEA4 8023E5C4 00400008 */ jr $v0
/* 16CEA8 8023E5C8 00000000 */ nop
glabel L8023E5CC_16CEAC
/* 16CEAC 8023E5CC 0C090486 */ jal btl_state_update_normal_start
/* 16CEB0 8023E5D0 0000882D */ daddu $s1, $zero, $zero
/* 16CEB4 8023E5D4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CEB8 8023E5D8 00000000 */ nop
glabel L8023E5DC_16CEBC
/* 16CEBC 8023E5DC 0C090809 */ jal btl_state_update_begin_player_turn
/* 16CEC0 8023E5E0 00000000 */ nop
/* 16CEC4 8023E5E4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CEC8 8023E5E8 00000000 */ nop
glabel L8023E5EC_16CECC
/* 16CECC 8023E5EC 0C090AEC */ jal btl_state_update_begin_partner_turn
/* 16CED0 8023E5F0 00000000 */ nop
/* 16CED4 8023E5F4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CED8 8023E5F8 00000000 */ nop
glabel L8023E5FC_16CEDC
/* 16CEDC 8023E5FC 0C090BF8 */ jal func_80242FE0
/* 16CEE0 8023E600 00000000 */ nop
/* 16CEE4 8023E604 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CEE8 8023E608 00000000 */ nop
glabel L8023E60C_16CEEC
/* 16CEEC 8023E60C 0C0906C5 */ jal btl_state_update_begin_turn
/* 16CEF0 8023E610 00000000 */ nop
/* 16CEF4 8023E614 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CEF8 8023E618 00000000 */ nop
glabel L8023E61C_16CEFC
/* 16CEFC 8023E61C 0C090E76 */ jal btl_state_update_end_turn
/* 16CF00 8023E620 00000000 */ nop
/* 16CF04 8023E624 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF08 8023E628 00000000 */ nop
glabel L8023E62C_16CF0C
/* 16CF0C 8023E62C 0C090AB2 */ jal btl_state_update_switch_to_player
/* 16CF10 8023E630 00000000 */ nop
/* 16CF14 8023E634 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF18 8023E638 00000000 */ nop
glabel L8023E63C_16CF1C
/* 16CF1C 8023E63C 0C090BC0 */ jal btl_state_update_switch_to_partner
/* 16CF20 8023E640 00000000 */ nop
/* 16CF24 8023E644 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF28 8023E648 00000000 */ nop
glabel L8023E64C_16CF2C
/* 16CF2C 8023E64C 0C090E46 */ jal btl_state_update_prepare_menu
/* 16CF30 8023E650 00000000 */ nop
/* 16CF34 8023E654 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF38 8023E658 00000000 */ nop
glabel L8023E65C_16CF3C
/* 16CF3C 8023E65C 0C0A9662 */ jal btl_state_update_player_menu
/* 16CF40 8023E660 00000000 */ nop
/* 16CF44 8023E664 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF48 8023E668 00000000 */ nop
glabel L8023E66C_16CF4C
/* 16CF4C 8023E66C 0C0AA072 */ jal btl_state_update_partner_menu
/* 16CF50 8023E670 00000000 */ nop
/* 16CF54 8023E674 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF58 8023E678 00000000 */ nop
glabel L8023E67C_16CF5C
/* 16CF5C 8023E67C 0C0AA82E */ jal btl_state_update_twink_menu
/* 16CF60 8023E680 00000000 */ nop
/* 16CF64 8023E684 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF68 8023E688 00000000 */ nop
glabel L8023E68C_16CF6C
/* 16CF6C 8023E68C 0C0AA6D1 */ jal btl_state_update_peach_menu
/* 16CF70 8023E690 00000000 */ nop
/* 16CF74 8023E694 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF78 8023E698 00000000 */ nop
glabel L8023E69C_16CF7C
/* 16CF7C 8023E69C 0C0AA9A2 */ jal btl_state_update_select_target
/* 16CF80 8023E6A0 00000000 */ nop
/* 16CF84 8023E6A4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF88 8023E6A8 00000000 */ nop
glabel L8023E6AC_16CF8C
/* 16CF8C 8023E6AC 0C0916B4 */ jal btl_state_update_player_move
/* 16CF90 8023E6B0 00000000 */ nop
/* 16CF94 8023E6B4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CF98 8023E6B8 00000000 */ nop
glabel L8023E6BC_16CF9C
/* 16CF9C 8023E6BC 0C091EC1 */ jal btl_state_update_first_strike
/* 16CFA0 8023E6C0 00000000 */ nop
/* 16CFA4 8023E6C4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CFA8 8023E6C8 00000000 */ nop
glabel L8023E6CC_16CFAC
/* 16CFAC 8023E6CC 0C091914 */ jal btl_state_update_end_player_turn
/* 16CFB0 8023E6D0 00000000 */ nop
/* 16CFB4 8023E6D4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CFB8 8023E6D8 00000000 */ nop
glabel L8023E6DC_16CFBC
/* 16CFBC 8023E6DC 0C091C87 */ jal btl_state_update_end_partner_turn
/* 16CFC0 8023E6E0 00000000 */ nop
/* 16CFC4 8023E6E4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CFC8 8023E6E8 00000000 */ nop
glabel L8023E6EC_16CFCC
/* 16CFCC 8023E6EC 0C091D5C */ jal btl_state_update_enemy_move
/* 16CFD0 8023E6F0 00000000 */ nop
/* 16CFD4 8023E6F4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CFD8 8023E6F8 00000000 */ nop
glabel L8023E6FC_16CFDC
/* 16CFDC 8023E6FC 0C092064 */ jal btl_state_update_partner_striking_first
/* 16CFE0 8023E700 00000000 */ nop
/* 16CFE4 8023E704 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CFE8 8023E708 00000000 */ nop
glabel L8023E70C_16CFEC
/* 16CFEC 8023E70C 0C091CAB */ jal btl_state_update_next_enemy
/* 16CFF0 8023E710 00000000 */ nop
/* 16CFF4 8023E714 0808F9F9 */ j L8023E7E4_16D0C4
/* 16CFF8 8023E718 00000000 */ nop
glabel L8023E71C_16CFFC
/* 16CFFC 8023E71C 0C091ACD */ jal btl_state_update_partner_move
/* 16D000 8023E720 00000000 */ nop
/* 16D004 8023E724 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D008 8023E728 00000000 */ nop
glabel L8023E72C_16D00C
/* 16D00C 8023E72C 0C091002 */ jal btl_state_update_victory
/* 16D010 8023E730 00000000 */ nop
/* 16D014 8023E734 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D018 8023E738 00000000 */ nop
glabel L8023E73C_16D01C
/* 16D01C 8023E73C 0C091294 */ jal btl_state_update_end_battle
/* 16D020 8023E740 00000000 */ nop
/* 16D024 8023E744 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D028 8023E748 00000000 */ nop
glabel L8023E74C_16D02C
/* 16D02C 8023E74C 0C0915BE */ jal btl_state_update_change_partner
/* 16D030 8023E750 00000000 */ nop
/* 16D034 8023E754 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D038 8023E758 00000000 */ nop
glabel L8023E75C_16D03C
/* 16D03C 8023E75C 0C0913C0 */ jal btl_state_update_run_away
/* 16D040 8023E760 00000000 */ nop
/* 16D044 8023E764 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D048 8023E768 00000000 */ nop
glabel L8023E76C_16D04C
/* 16D04C 8023E76C 0C09138E */ jal btl_state_update_defend
/* 16D050 8023E770 00000000 */ nop
/* 16D054 8023E774 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D058 8023E778 00000000 */ nop
glabel L8023E77C_16D05C
/* 16D05C 8023E77C 0C091510 */ jal btl_state_update_defeat
/* 16D060 8023E780 00000000 */ nop
/* 16D064 8023E784 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D068 8023E788 00000000 */ nop
glabel L8023E78C_16D06C
/* 16D06C 8023E78C 0C090FF7 */ jal btl_state_update_1C
/* 16D070 8023E790 00000000 */ nop
/* 16D074 8023E794 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D078 8023E798 00000000 */ nop
glabel L8023E79C_16D07C
/* 16D07C 8023E79C 0C0911C4 */ jal btl_state_update_end_training_battle
/* 16D080 8023E7A0 00000000 */ nop
/* 16D084 8023E7A4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D088 8023E7A8 00000000 */ nop
glabel L8023E7AC_16D08C
/* 16D08C 8023E7AC 0C092198 */ jal btl_state_update_enemy_striking_first
/* 16D090 8023E7B0 00000000 */ nop
/* 16D094 8023E7B4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D098 8023E7B8 00000000 */ nop
glabel L8023E7BC_16D09C
/* 16D09C 8023E7BC 0C0AACCC */ jal btl_state_update_22
/* 16D0A0 8023E7C0 00000000 */ nop
/* 16D0A4 8023E7C4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D0A8 8023E7C8 00000000 */ nop
glabel L8023E7CC_16D0AC
/* 16D0AC 8023E7CC 0C097864 */ jal btl_state_update_celebration
/* 16D0B0 8023E7D0 00000000 */ nop
/* 16D0B4 8023E7D4 0808F9F9 */ j L8023E7E4_16D0C4
/* 16D0B8 8023E7D8 00000000 */ nop
glabel L8023E7DC_16D0BC
/* 16D0BC 8023E7DC 0C0922C2 */ jal btl_state_update_end_demo_battle
/* 16D0C0 8023E7E0 0000882D */ daddu $s1, $zero, $zero
glabel L8023E7E4_16D0C4
/* 16D0C4 8023E7E4 96020090 */ lhu $v0, 0x90($s0)
/* 16D0C8 8023E7E8 24030028 */ addiu $v1, $zero, 0x28
/* 16D0CC 8023E7EC 24420001 */ addiu $v0, $v0, 1
/* 16D0D0 8023E7F0 A6020090 */ sh $v0, 0x90($s0)
/* 16D0D4 8023E7F4 00021400 */ sll $v0, $v0, 0x10
/* 16D0D8 8023E7F8 00021403 */ sra $v0, $v0, 0x10
/* 16D0DC 8023E7FC 14430003 */ bne $v0, $v1, .L8023E80C
/* 16D0E0 8023E800 00000000 */ nop
/* 16D0E4 8023E804 0C093DF2 */ jal func_8024F7C8
/* 16D0E8 8023E808 00000000 */ nop
.L8023E80C:
/* 16D0EC 8023E80C 0C0999A1 */ jal func_80266684
/* 16D0F0 8023E810 00000000 */ nop
/* 16D0F4 8023E814 0C099A5E */ jal func_80266978
/* 16D0F8 8023E818 00000000 */ nop
/* 16D0FC 8023E81C 0C099AC5 */ jal func_80266B14
/* 16D100 8023E820 00000000 */ nop
/* 16D104 8023E824 0C093B92 */ jal func_8024EE48
/* 16D108 8023E828 00000000 */ nop
/* 16D10C 8023E82C 0C08F901 */ jal update_actor_shadows
/* 16D110 8023E830 00000000 */ nop
/* 16D114 8023E834 82030432 */ lb $v1, 0x432($s0)
/* 16D118 8023E838 2402FFFE */ addiu $v0, $zero, -2
/* 16D11C 8023E83C 10620089 */ beq $v1, $v0, L8023EA64_16D344
/* 16D120 8023E840 27A50018 */ addiu $a1, $sp, 0x18
/* 16D124 8023E844 24040001 */ addiu $a0, $zero, 1
/* 16D128 8023E848 0C04DF70 */ jal get_screen_overlay_params
/* 16D12C 8023E84C 27A6001C */ addiu $a2, $sp, 0x1c
/* 16D130 8023E850 82020432 */ lb $v0, 0x432($s0)
/* 16D134 8023E854 1840002C */ blez $v0, .L8023E908
/* 16D138 8023E858 24040001 */ addiu $a0, $zero, 1
/* 16D13C 8023E85C 0000282D */ daddu $a1, $zero, $zero
/* 16D140 8023E860 00A0302D */ daddu $a2, $a1, $zero
/* 16D144 8023E864 0C04DF84 */ jal set_screen_overlay_color
/* 16D148 8023E868 00A0382D */ daddu $a3, $a1, $zero
/* 16D14C 8023E86C 16400003 */ bnez $s2, .L8023E87C
/* 16D150 8023E870 00000000 */ nop
/* 16D154 8023E874 0808FA56 */ j .L8023E958
/* 16D158 8023E878 3C054357 */ lui $a1, 0x4357
.L8023E87C:
/* 16D15C 8023E87C 3C028011 */ lui $v0, %hi(gPlayerData)
/* 16D160 8023E880 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* 16D164 8023E884 80430012 */ lb $v1, 0x12($v0)
/* 16D168 8023E888 24020006 */ addiu $v0, $zero, 6
/* 16D16C 8023E88C 1462000F */ bne $v1, $v0, .L8023E8CC
/* 16D170 8023E890 00000000 */ nop
/* 16D174 8023E894 C7A0001C */ lwc1 $f0, 0x1c($sp)
/* 16D178 8023E898 3C014120 */ lui $at, 0x4120
/* 16D17C 8023E89C 44811000 */ mtc1 $at, $f2
/* 16D180 8023E8A0 00000000 */ nop
/* 16D184 8023E8A4 46020001 */ sub.s $f0, $f0, $f2
/* 16D188 8023E8A8 44801000 */ mtc1 $zero, $f2
/* 16D18C 8023E8AC 00000000 */ nop
/* 16D190 8023E8B0 4602003C */ c.lt.s $f0, $f2
/* 16D194 8023E8B4 00000000 */ nop
/* 16D198 8023E8B8 45000002 */ bc1f .L8023E8C4
/* 16D19C 8023E8BC E7A0001C */ swc1 $f0, 0x1c($sp)
/* 16D1A0 8023E8C0 E7A2001C */ swc1 $f2, 0x1c($sp)
.L8023E8C4:
/* 16D1A4 8023E8C4 0808FA56 */ j .L8023E958
/* 16D1A8 8023E8C8 8FA5001C */ lw $a1, 0x1c($sp)
.L8023E8CC:
/* 16D1AC 8023E8CC C7A0001C */ lwc1 $f0, 0x1c($sp)
/* 16D1B0 8023E8D0 3C014120 */ lui $at, 0x4120
/* 16D1B4 8023E8D4 44811000 */ mtc1 $at, $f2
/* 16D1B8 8023E8D8 00000000 */ nop
/* 16D1BC 8023E8DC 46020000 */ add.s $f0, $f0, $f2
/* 16D1C0 8023E8E0 3C014357 */ lui $at, 0x4357
/* 16D1C4 8023E8E4 44811000 */ mtc1 $at, $f2
/* 16D1C8 8023E8E8 00000000 */ nop
/* 16D1CC 8023E8EC 4600103C */ c.lt.s $f2, $f0
/* 16D1D0 8023E8F0 00000000 */ nop
/* 16D1D4 8023E8F4 45000002 */ bc1f .L8023E900
/* 16D1D8 8023E8F8 E7A0001C */ swc1 $f0, 0x1c($sp)
/* 16D1DC 8023E8FC E7A2001C */ swc1 $f2, 0x1c($sp)
.L8023E900:
/* 16D1E0 8023E900 0808FA56 */ j .L8023E958
/* 16D1E4 8023E904 8FA5001C */ lw $a1, 0x1c($sp)
.L8023E908:
/* 16D1E8 8023E908 04410015 */ bgez $v0, .L8023E960
/* 16D1EC 8023E90C 00000000 */ nop
/* 16D1F0 8023E910 C7A2001C */ lwc1 $f2, 0x1c($sp)
/* 16D1F4 8023E914 3C014120 */ lui $at, 0x4120
/* 16D1F8 8023E918 44810000 */ mtc1 $at, $f0
/* 16D1FC 8023E91C 00000000 */ nop
/* 16D200 8023E920 46001081 */ sub.s $f2, $f2, $f0
/* 16D204 8023E924 44800000 */ mtc1 $zero, $f0
/* 16D208 8023E928 00000000 */ nop
/* 16D20C 8023E92C 4600103C */ c.lt.s $f2, $f0
/* 16D210 8023E930 00000000 */ nop
/* 16D214 8023E934 45000007 */ bc1f .L8023E954
/* 16D218 8023E938 E7A2001C */ swc1 $f2, 0x1c($sp)
/* 16D21C 8023E93C 3C05BF80 */ lui $a1, 0xbf80
/* 16D220 8023E940 240400FF */ addiu $a0, $zero, 0xff
/* 16D224 8023E944 0C04DF69 */ jal set_screen_overlay_params_back
/* 16D228 8023E948 E7A0001C */ swc1 $f0, 0x1c($sp)
/* 16D22C 8023E94C 0808FA58 */ j .L8023E960
/* 16D230 8023E950 A2000432 */ sb $zero, 0x432($s0)
.L8023E954:
/* 16D234 8023E954 44051000 */ mfc1 $a1, $f2
.L8023E958:
/* 16D238 8023E958 0C04DF69 */ jal set_screen_overlay_params_back
/* 16D23C 8023E95C 0000202D */ daddu $a0, $zero, $zero
.L8023E960:
/* 16D240 8023E960 16200005 */ bnez $s1, .L8023E978
/* 16D244 8023E964 2402FFFF */ addiu $v0, $zero, -1
/* 16D248 8023E968 3C038028 */ lui $v1, %hi(D_802809F6)
/* 16D24C 8023E96C 846309F6 */ lh $v1, %lo(D_802809F6)($v1)
/* 16D250 8023E970 1062003C */ beq $v1, $v0, L8023EA64_16D344
/* 16D254 8023E974 00000000 */ nop
.L8023E978:
/* 16D258 8023E978 3C108028 */ lui $s0, %hi(D_802809F6)
/* 16D25C 8023E97C 261009F6 */ addiu $s0, $s0, %lo(D_802809F6)
/* 16D260 8023E980 2402FFFF */ addiu $v0, $zero, -1
/* 16D264 8023E984 86040000 */ lh $a0, ($s0)
/* 16D268 8023E988 96030000 */ lhu $v1, ($s0)
/* 16D26C 8023E98C 14820014 */ bne $a0, $v0, .L8023E9E0
/* 16D270 8023E990 240500FF */ addiu $a1, $zero, 0xff
/* 16D274 8023E994 3C028007 */ lui $v0, %hi(gGameStatusPtr)
/* 16D278 8023E998 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0)
/* 16D27C 8023E99C 80430071 */ lb $v1, 0x71($v0)
/* 16D280 8023E9A0 24020002 */ addiu $v0, $zero, 2
/* 16D284 8023E9A4 1462002F */ bne $v1, $v0, L8023EA64_16D344
/* 16D288 8023E9A8 27A50020 */ addiu $a1, $sp, 0x20
/* 16D28C 8023E9AC 0000202D */ daddu $a0, $zero, $zero
/* 16D290 8023E9B0 0C04DF70 */ jal get_screen_overlay_params
/* 16D294 8023E9B4 27A60024 */ addiu $a2, $sp, 0x24
/* 16D298 8023E9B8 93A30020 */ lbu $v1, 0x20($sp)
/* 16D29C 8023E9BC 240200FF */ addiu $v0, $zero, 0xff
/* 16D2A0 8023E9C0 14620028 */ bne $v1, $v0, L8023EA64_16D344
/* 16D2A4 8023E9C4 00000000 */ nop
/* 16D2A8 8023E9C8 A6000000 */ sh $zero, ($s0)
/* 16D2AC 8023E9CC 0000202D */ daddu $a0, $zero, $zero
/* 16D2B0 8023E9D0 0C04DF62 */ jal set_screen_overlay_params_front
/* 16D2B4 8023E9D4 0000282D */ daddu $a1, $zero, $zero
/* 16D2B8 8023E9D8 0808FA99 */ j L8023EA64_16D344
/* 16D2BC 8023E9DC 00000000 */ nop
.L8023E9E0:
/* 16D2C0 8023E9E0 1485000A */ bne $a0, $a1, .L8023EA0C
/* 16D2C4 8023E9E4 2462000A */ addiu $v0, $v1, 0xa
/* 16D2C8 8023E9E8 3C03800E */ lui $v1, %hi(gBattleState)
/* 16D2CC 8023E9EC 8C63C068 */ lw $v1, %lo(gBattleState)($v1)
/* 16D2D0 8023E9F0 24020023 */ addiu $v0, $zero, 0x23
/* 16D2D4 8023E9F4 1062001B */ beq $v1, $v0, L8023EA64_16D344
/* 16D2D8 8023E9F8 00000000 */ nop
/* 16D2DC 8023E9FC 0C090464 */ jal btl_set_state
/* 16D2E0 8023EA00 0040202D */ daddu $a0, $v0, $zero
/* 16D2E4 8023EA04 0808FA99 */ j L8023EA64_16D344
/* 16D2E8 8023EA08 00000000 */ nop
.L8023EA0C:
/* 16D2EC 8023EA0C A6020000 */ sh $v0, ($s0)
/* 16D2F0 8023EA10 00021400 */ sll $v0, $v0, 0x10
/* 16D2F4 8023EA14 00021403 */ sra $v0, $v0, 0x10
/* 16D2F8 8023EA18 28420100 */ slti $v0, $v0, 0x100
/* 16D2FC 8023EA1C 50400001 */ beql $v0, $zero, .L8023EA24
/* 16D300 8023EA20 A6050000 */ sh $a1, ($s0)
.L8023EA24:
/* 16D304 8023EA24 86020000 */ lh $v0, ($s0)
/* 16D308 8023EA28 44822000 */ mtc1 $v0, $f4
/* 16D30C 8023EA2C 00000000 */ nop
/* 16D310 8023EA30 46802120 */ cvt.s.w $f4, $f4
/* 16D314 8023EA34 44052000 */ mfc1 $a1, $f4
/* 16D318 8023EA38 0C04DF62 */ jal set_screen_overlay_params_front
/* 16D31C 8023EA3C 0000202D */ daddu $a0, $zero, $zero
/* 16D320 8023EA40 0000202D */ daddu $a0, $zero, $zero
/* 16D324 8023EA44 240500D0 */ addiu $a1, $zero, 0xd0
/* 16D328 8023EA48 00A0302D */ daddu $a2, $a1, $zero
/* 16D32C 8023EA4C 0C04DF84 */ jal set_screen_overlay_color
/* 16D330 8023EA50 00A0382D */ daddu $a3, $a1, $zero
/* 16D334 8023EA54 0C00CDF4 */ jal intro_logos_set_fade_alpha
/* 16D338 8023EA58 240400FF */ addiu $a0, $zero, 0xff
/* 16D33C 8023EA5C 0C00CDF8 */ jal intro_logos_set_fade_color
/* 16D340 8023EA60 240400E0 */ addiu $a0, $zero, 0xe0
glabel L8023EA64_16D344
/* 16D344 8023EA64 8FBF0034 */ lw $ra, 0x34($sp)
/* 16D348 8023EA68 8FB20030 */ lw $s2, 0x30($sp)
/* 16D34C 8023EA6C 8FB1002C */ lw $s1, 0x2c($sp)
/* 16D350 8023EA70 8FB00028 */ lw $s0, 0x28($sp)
/* 16D354 8023EA74 03E00008 */ jr $ra
/* 16D358 8023EA78 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,205 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8023ED5C
/* 16D63C 8023ED5C 3C02800E */ lui $v0, %hi(gBattleState)
/* 16D640 8023ED60 8C42C068 */ lw $v0, %lo(gBattleState)($v0)
/* 16D644 8023ED64 27BDFFB8 */ addiu $sp, $sp, -0x48
/* 16D648 8023ED68 AFB40030 */ sw $s4, 0x30($sp)
/* 16D64C 8023ED6C 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 16D650 8023ED70 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 16D654 8023ED74 AFB00020 */ sw $s0, 0x20($sp)
/* 16D658 8023ED78 27B00010 */ addiu $s0, $sp, 0x10
/* 16D65C 8023ED7C AFBF0040 */ sw $ra, 0x40($sp)
/* 16D660 8023ED80 AFB7003C */ sw $s7, 0x3c($sp)
/* 16D664 8023ED84 AFB60038 */ sw $s6, 0x38($sp)
/* 16D668 8023ED88 AFB50034 */ sw $s5, 0x34($sp)
/* 16D66C 8023ED8C AFB3002C */ sw $s3, 0x2c($sp)
/* 16D670 8023ED90 AFB20028 */ sw $s2, 0x28($sp)
/* 16D674 8023ED94 104000A7 */ beqz $v0, .L8023F034
/* 16D678 8023ED98 AFB10024 */ sw $s1, 0x24($sp)
/* 16D67C 8023ED9C 0C093BAA */ jal func_8024EEA8
/* 16D680 8023EDA0 00000000 */ nop
/* 16D684 8023EDA4 8E8200B8 */ lw $v0, 0xb8($s4)
/* 16D688 8023EDA8 10400003 */ beqz $v0, .L8023EDB8
/* 16D68C 8023EDAC 00000000 */ nop
/* 16D690 8023EDB0 0040F809 */ jalr $v0
/* 16D694 8023EDB4 00000000 */ nop
.L8023EDB8:
/* 16D698 8023EDB8 8E820000 */ lw $v0, ($s4)
/* 16D69C 8023EDBC 30420001 */ andi $v0, $v0, 1
/* 16D6A0 8023EDC0 1040009C */ beqz $v0, .L8023F034
/* 16D6A4 8023EDC4 00000000 */ nop
/* 16D6A8 8023EDC8 0C0957F6 */ jal func_80255FD8
/* 16D6AC 8023EDCC 00000000 */ nop
/* 16D6B0 8023EDD0 3C02800A */ lui $v0, %hi(gCurrentCamID)
/* 16D6B4 8023EDD4 9442A634 */ lhu $v0, %lo(gCurrentCamID)($v0)
/* 16D6B8 8023EDD8 2442FFFF */ addiu $v0, $v0, -1
/* 16D6BC 8023EDDC 2C420002 */ sltiu $v0, $v0, 2
/* 16D6C0 8023EDE0 10400094 */ beqz $v0, .L8023F034
/* 16D6C4 8023EDE4 0000902D */ daddu $s2, $zero, $zero
/* 16D6C8 8023EDE8 3C178025 */ lui $s7, %hi(func_80257B28)
/* 16D6CC 8023EDEC 26F77B28 */ addiu $s7, $s7, %lo(func_80257B28)
/* 16D6D0 8023EDF0 3C161000 */ lui $s6, 0x1000
/* 16D6D4 8023EDF4 3C158025 */ lui $s5, %hi(func_8025595C)
/* 16D6D8 8023EDF8 26B5595C */ addiu $s5, $s5, %lo(func_8025595C)
/* 16D6DC 8023EDFC 0280982D */ daddu $s3, $s4, $zero
.L8023EE00:
/* 16D6E0 8023EE00 8E7100E0 */ lw $s1, 0xe0($s3)
/* 16D6E4 8023EE04 5220002A */ beql $s1, $zero, .L8023EEB0
/* 16D6E8 8023EE08 26520001 */ addiu $s2, $s2, 1
/* 16D6EC 8023EE0C 8E220000 */ lw $v0, ($s1)
/* 16D6F0 8023EE10 30420001 */ andi $v0, $v0, 1
/* 16D6F4 8023EE14 54400026 */ bnel $v0, $zero, .L8023EEB0
/* 16D6F8 8023EE18 26520001 */ addiu $s2, $s2, 1
/* 16D6FC 8023EE1C AE120008 */ sw $s2, 8($s0)
/* 16D700 8023EE20 AE17000C */ sw $s7, 0xc($s0)
/* 16D704 8023EE24 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D708 8023EE28 4600008D */ trunc.w.s $f2, $f0
/* 16D70C 8023EE2C E6020004 */ swc1 $f2, 4($s0)
/* 16D710 8023EE30 86220434 */ lh $v0, 0x434($s1)
/* 16D714 8023EE34 0200202D */ daddu $a0, $s0, $zero
/* 16D718 8023EE38 0C047644 */ jal queue_render_task
/* 16D71C 8023EE3C AE020000 */ sw $v0, ($s0)
/* 16D720 8023EE40 8E220000 */ lw $v0, ($s1)
/* 16D724 8023EE44 00561024 */ and $v0, $v0, $s6
/* 16D728 8023EE48 10400009 */ beqz $v0, .L8023EE70
/* 16D72C 8023EE4C 24020022 */ addiu $v0, $zero, 0x22
/* 16D730 8023EE50 AE110008 */ sw $s1, 8($s0)
/* 16D734 8023EE54 AE15000C */ sw $s5, 0xc($s0)
/* 16D738 8023EE58 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D73C 8023EE5C AE020000 */ sw $v0, ($s0)
/* 16D740 8023EE60 4600008D */ trunc.w.s $f2, $f0
/* 16D744 8023EE64 E6020004 */ swc1 $f2, 4($s0)
/* 16D748 8023EE68 0C047644 */ jal queue_render_task
/* 16D74C 8023EE6C 0200202D */ daddu $a0, $s0, $zero
.L8023EE70:
/* 16D750 8023EE70 92820092 */ lbu $v0, 0x92($s4)
/* 16D754 8023EE74 30420001 */ andi $v0, $v0, 1
/* 16D758 8023EE78 5040000D */ beql $v0, $zero, .L8023EEB0
/* 16D75C 8023EE7C 26520001 */ addiu $s2, $s2, 1
/* 16D760 8023EE80 3C028025 */ lui $v0, %hi(func_80257B68)
/* 16D764 8023EE84 24427B68 */ addiu $v0, $v0, %lo(func_80257B68)
/* 16D768 8023EE88 AE110008 */ sw $s1, 8($s0)
/* 16D76C 8023EE8C AE02000C */ sw $v0, 0xc($s0)
/* 16D770 8023EE90 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D774 8023EE94 4600008D */ trunc.w.s $f2, $f0
/* 16D778 8023EE98 E6020004 */ swc1 $f2, 4($s0)
/* 16D77C 8023EE9C 86220434 */ lh $v0, 0x434($s1)
/* 16D780 8023EEA0 0200202D */ daddu $a0, $s0, $zero
/* 16D784 8023EEA4 0C047644 */ jal queue_render_task
/* 16D788 8023EEA8 AE020000 */ sw $v0, ($s0)
/* 16D78C 8023EEAC 26520001 */ addiu $s2, $s2, 1
.L8023EEB0:
/* 16D790 8023EEB0 2A420018 */ slti $v0, $s2, 0x18
/* 16D794 8023EEB4 1440FFD2 */ bnez $v0, .L8023EE00
/* 16D798 8023EEB8 26730004 */ addiu $s3, $s3, 4
/* 16D79C 8023EEBC 8E9100DC */ lw $s1, 0xdc($s4)
/* 16D7A0 8023EEC0 1220002D */ beqz $s1, .L8023EF78
/* 16D7A4 8023EEC4 00000000 */ nop
/* 16D7A8 8023EEC8 8E220000 */ lw $v0, ($s1)
/* 16D7AC 8023EECC 30420001 */ andi $v0, $v0, 1
/* 16D7B0 8023EED0 14400029 */ bnez $v0, .L8023EF78
/* 16D7B4 8023EED4 0200202D */ daddu $a0, $s0, $zero
/* 16D7B8 8023EED8 3C028025 */ lui $v0, %hi(func_80257B48)
/* 16D7BC 8023EEDC 24427B48 */ addiu $v0, $v0, %lo(func_80257B48)
/* 16D7C0 8023EEE0 AE000008 */ sw $zero, 8($s0)
/* 16D7C4 8023EEE4 AE02000C */ sw $v0, 0xc($s0)
/* 16D7C8 8023EEE8 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D7CC 8023EEEC 4600008D */ trunc.w.s $f2, $f0
/* 16D7D0 8023EEF0 E6020004 */ swc1 $f2, 4($s0)
/* 16D7D4 8023EEF4 86220434 */ lh $v0, 0x434($s1)
/* 16D7D8 8023EEF8 0C047644 */ jal queue_render_task
/* 16D7DC 8023EEFC AE020000 */ sw $v0, ($s0)
/* 16D7E0 8023EF00 8E220000 */ lw $v0, ($s1)
/* 16D7E4 8023EF04 3C031000 */ lui $v1, 0x1000
/* 16D7E8 8023EF08 00431024 */ and $v0, $v0, $v1
/* 16D7EC 8023EF0C 1040000C */ beqz $v0, .L8023EF40
/* 16D7F0 8023EF10 00000000 */ nop
/* 16D7F4 8023EF14 3C028025 */ lui $v0, %hi(func_8025599C)
/* 16D7F8 8023EF18 2442599C */ addiu $v0, $v0, %lo(func_8025599C)
/* 16D7FC 8023EF1C AE110008 */ sw $s1, 8($s0)
/* 16D800 8023EF20 AE02000C */ sw $v0, 0xc($s0)
/* 16D804 8023EF24 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D808 8023EF28 24020022 */ addiu $v0, $zero, 0x22
/* 16D80C 8023EF2C AE020000 */ sw $v0, ($s0)
/* 16D810 8023EF30 4600008D */ trunc.w.s $f2, $f0
/* 16D814 8023EF34 E6020004 */ swc1 $f2, 4($s0)
/* 16D818 8023EF38 0C047644 */ jal queue_render_task
/* 16D81C 8023EF3C 0200202D */ daddu $a0, $s0, $zero
.L8023EF40:
/* 16D820 8023EF40 92820092 */ lbu $v0, 0x92($s4)
/* 16D824 8023EF44 30420001 */ andi $v0, $v0, 1
/* 16D828 8023EF48 1040000B */ beqz $v0, .L8023EF78
/* 16D82C 8023EF4C 0200202D */ daddu $a0, $s0, $zero
/* 16D830 8023EF50 3C028025 */ lui $v0, %hi(func_80257B88)
/* 16D834 8023EF54 24427B88 */ addiu $v0, $v0, %lo(func_80257B88)
/* 16D838 8023EF58 AE000008 */ sw $zero, 8($s0)
/* 16D83C 8023EF5C AE02000C */ sw $v0, 0xc($s0)
/* 16D840 8023EF60 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D844 8023EF64 4600008D */ trunc.w.s $f2, $f0
/* 16D848 8023EF68 E6020004 */ swc1 $f2, 4($s0)
/* 16D84C 8023EF6C 86220434 */ lh $v0, 0x434($s1)
/* 16D850 8023EF70 0C047644 */ jal queue_render_task
/* 16D854 8023EF74 AE020000 */ sw $v0, ($s0)
.L8023EF78:
/* 16D858 8023EF78 8E9100D8 */ lw $s1, 0xd8($s4)
/* 16D85C 8023EF7C 1220002D */ beqz $s1, .L8023F034
/* 16D860 8023EF80 00000000 */ nop
/* 16D864 8023EF84 8E220000 */ lw $v0, ($s1)
/* 16D868 8023EF88 30420001 */ andi $v0, $v0, 1
/* 16D86C 8023EF8C 14400029 */ bnez $v0, .L8023F034
/* 16D870 8023EF90 0200202D */ daddu $a0, $s0, $zero
/* 16D874 8023EF94 3C028025 */ lui $v0, %hi(func_80257DA4)
/* 16D878 8023EF98 24427DA4 */ addiu $v0, $v0, %lo(func_80257DA4)
/* 16D87C 8023EF9C AE000008 */ sw $zero, 8($s0)
/* 16D880 8023EFA0 AE02000C */ sw $v0, 0xc($s0)
/* 16D884 8023EFA4 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D888 8023EFA8 4600008D */ trunc.w.s $f2, $f0
/* 16D88C 8023EFAC E6020004 */ swc1 $f2, 4($s0)
/* 16D890 8023EFB0 86220434 */ lh $v0, 0x434($s1)
/* 16D894 8023EFB4 0C047644 */ jal queue_render_task
/* 16D898 8023EFB8 AE020000 */ sw $v0, ($s0)
/* 16D89C 8023EFBC 8E220000 */ lw $v0, ($s1)
/* 16D8A0 8023EFC0 3C031000 */ lui $v1, 0x1000
/* 16D8A4 8023EFC4 00431024 */ and $v0, $v0, $v1
/* 16D8A8 8023EFC8 1040000C */ beqz $v0, .L8023EFFC
/* 16D8AC 8023EFCC 00000000 */ nop
/* 16D8B0 8023EFD0 3C028025 */ lui $v0, %hi(func_80254C50)
/* 16D8B4 8023EFD4 24424C50 */ addiu $v0, $v0, %lo(func_80254C50)
/* 16D8B8 8023EFD8 AE110008 */ sw $s1, 8($s0)
/* 16D8BC 8023EFDC AE02000C */ sw $v0, 0xc($s0)
/* 16D8C0 8023EFE0 C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D8C4 8023EFE4 24020022 */ addiu $v0, $zero, 0x22
/* 16D8C8 8023EFE8 AE020000 */ sw $v0, ($s0)
/* 16D8CC 8023EFEC 4600008D */ trunc.w.s $f2, $f0
/* 16D8D0 8023EFF0 E6020004 */ swc1 $f2, 4($s0)
/* 16D8D4 8023EFF4 0C047644 */ jal queue_render_task
/* 16D8D8 8023EFF8 0200202D */ daddu $a0, $s0, $zero
.L8023EFFC:
/* 16D8DC 8023EFFC 92820092 */ lbu $v0, 0x92($s4)
/* 16D8E0 8023F000 30420001 */ andi $v0, $v0, 1
/* 16D8E4 8023F004 1040000B */ beqz $v0, .L8023F034
/* 16D8E8 8023F008 0200202D */ daddu $a0, $s0, $zero
/* 16D8EC 8023F00C 3C028026 */ lui $v0, %hi(func_80258E14)
/* 16D8F0 8023F010 24428E14 */ addiu $v0, $v0, %lo(func_80258E14)
/* 16D8F4 8023F014 AE000008 */ sw $zero, 8($s0)
/* 16D8F8 8023F018 AE02000C */ sw $v0, 0xc($s0)
/* 16D8FC 8023F01C C620014C */ lwc1 $f0, 0x14c($s1)
/* 16D900 8023F020 4600008D */ trunc.w.s $f2, $f0
/* 16D904 8023F024 E6020004 */ swc1 $f2, 4($s0)
/* 16D908 8023F028 86220434 */ lh $v0, 0x434($s1)
/* 16D90C 8023F02C 0C047644 */ jal queue_render_task
/* 16D910 8023F030 AC820000 */ sw $v0, ($a0)
.L8023F034:
/* 16D914 8023F034 8FBF0040 */ lw $ra, 0x40($sp)
/* 16D918 8023F038 8FB7003C */ lw $s7, 0x3c($sp)
/* 16D91C 8023F03C 8FB60038 */ lw $s6, 0x38($sp)
/* 16D920 8023F040 8FB50034 */ lw $s5, 0x34($sp)
/* 16D924 8023F044 8FB40030 */ lw $s4, 0x30($sp)
/* 16D928 8023F048 8FB3002C */ lw $s3, 0x2c($sp)
/* 16D92C 8023F04C 8FB20028 */ lw $s2, 0x28($sp)
/* 16D930 8023F050 8FB10024 */ lw $s1, 0x24($sp)
/* 16D934 8023F054 8FB00020 */ lw $s0, 0x20($sp)
/* 16D938 8023F058 03E00008 */ jr $ra
/* 16D93C 8023F05C 27BD0048 */ addiu $sp, $sp, 0x48

View File

@ -831,8 +831,8 @@ glabel func_8023F088
/* 16E614 8023FD34 AE0200B4 */ sw $v0, 0xb4($s0)
/* 16E618 8023FD38 3C10F700 */ lui $s0, 0xf700
/* 16E61C 8023FD3C 3C14F600 */ lui $s4, 0xf600
/* 16E620 8023FD40 3C04800A */ lui $a0, %hi(D_8009A64C)
/* 16E624 8023FD44 8C84A64C */ lw $a0, %lo(D_8009A64C)($a0)
/* 16E620 8023FD40 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr)
/* 16E624 8023FD44 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0)
/* 16E628 8023FD48 0220102D */ daddu $v0, $s1, $zero
/* 16E62C 8023FD4C 26310008 */ addiu $s1, $s1, 8
/* 16E630 8023FD50 AFD10000 */ sw $s1, ($fp)

View File

@ -1,94 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
glabel jtbl_8029D4B8
.word L8025D07C_18B95C, L8025D08C_18B96C, L8025D09C_18B97C, L8025D0AC_18B98C, L8025D0BC_18B99C, L8025D0CC_18B9AC, L8025D0DC_18B9BC, L8025D0EC_18B9CC, L8025D0FC_18B9DC, L8025D10C_18B9EC, L8025D11C_18B9FC, L8025D12C_18BA0C
.section .text
glabel _remove_part_decoration
/* 18B91C 8025D03C 27BDFFE0 */ addiu $sp, $sp, -0x20
/* 18B920 8025D040 AFBF0018 */ sw $ra, 0x18($sp)
/* 18B924 8025D044 AFB10014 */ sw $s1, 0x14($sp)
/* 18B928 8025D048 AFB00010 */ sw $s0, 0x10($sp)
/* 18B92C 8025D04C 8C9100C0 */ lw $s1, 0xc0($a0)
/* 18B930 8025D050 00A0802D */ daddu $s0, $a1, $zero
/* 18B934 8025D054 02301021 */ addu $v0, $s1, $s0
/* 18B938 8025D058 804308B8 */ lb $v1, 0x8b8($v0)
/* 18B93C 8025D05C 2C62000C */ sltiu $v0, $v1, 0xc
/* 18B940 8025D060 10400034 */ beqz $v0, .L8025D134
/* 18B944 8025D064 00031080 */ sll $v0, $v1, 2
/* 18B948 8025D068 3C01802A */ lui $at, %hi(jtbl_8029D4B8)
/* 18B94C 8025D06C 00220821 */ addu $at, $at, $v0
/* 18B950 8025D070 8C22D4B8 */ lw $v0, %lo(jtbl_8029D4B8)($at)
/* 18B954 8025D074 00400008 */ jr $v0
/* 18B958 8025D078 00000000 */ nop
glabel L8025D07C_18B95C
/* 18B95C 8025D07C 0C097456 */ jal func_8025D158
/* 18B960 8025D080 0200282D */ daddu $a1, $s0, $zero
/* 18B964 8025D084 0809744E */ j .L8025D138
/* 18B968 8025D088 02301021 */ addu $v0, $s1, $s0
glabel L8025D08C_18B96C
/* 18B96C 8025D08C 0C0974A4 */ jal func_8025D290
/* 18B970 8025D090 0200282D */ daddu $a1, $s0, $zero
/* 18B974 8025D094 0809744E */ j .L8025D138
/* 18B978 8025D098 02301021 */ addu $v0, $s1, $s0
glabel L8025D09C_18B97C
/* 18B97C 8025D09C 0C0974F1 */ jal func_8025D3C4
/* 18B980 8025D0A0 0200282D */ daddu $a1, $s0, $zero
/* 18B984 8025D0A4 0809744E */ j .L8025D138
/* 18B988 8025D0A8 02301021 */ addu $v0, $s1, $s0
glabel L8025D0AC_18B98C
/* 18B98C 8025D0AC 0C097528 */ jal func_8025D4A0
/* 18B990 8025D0B0 0200282D */ daddu $a1, $s0, $zero
/* 18B994 8025D0B4 0809744E */ j .L8025D138
/* 18B998 8025D0B8 02301021 */ addu $v0, $s1, $s0
glabel L8025D0BC_18B99C
/* 18B99C 8025D0BC 0C097588 */ jal func_8025D620
/* 18B9A0 8025D0C0 0200282D */ daddu $a1, $s0, $zero
/* 18B9A4 8025D0C4 0809744E */ j .L8025D138
/* 18B9A8 8025D0C8 02301021 */ addu $v0, $s1, $s0
glabel L8025D0CC_18B9AC
/* 18B9AC 8025D0CC 0C0975BF */ jal func_8025D6FC
/* 18B9B0 8025D0D0 0200282D */ daddu $a1, $s0, $zero
/* 18B9B4 8025D0D4 0809744E */ j .L8025D138
/* 18B9B8 8025D0D8 02301021 */ addu $v0, $s1, $s0
glabel L8025D0DC_18B9BC
/* 18B9BC 8025D0DC 0C097604 */ jal func_8025D810
/* 18B9C0 8025D0E0 0200282D */ daddu $a1, $s0, $zero
/* 18B9C4 8025D0E4 0809744E */ j .L8025D138
/* 18B9C8 8025D0E8 02301021 */ addu $v0, $s1, $s0
glabel L8025D0EC_18B9CC
/* 18B9CC 8025D0EC 0C09763B */ jal func_8025D8EC
/* 18B9D0 8025D0F0 0200282D */ daddu $a1, $s0, $zero
/* 18B9D4 8025D0F4 0809744E */ j .L8025D138
/* 18B9D8 8025D0F8 02301021 */ addu $v0, $s1, $s0
glabel L8025D0FC_18B9DC
/* 18B9DC 8025D0FC 0C097698 */ jal func_8025DA60
/* 18B9E0 8025D100 0200282D */ daddu $a1, $s0, $zero
/* 18B9E4 8025D104 0809744E */ j .L8025D138
/* 18B9E8 8025D108 02301021 */ addu $v0, $s1, $s0
glabel L8025D10C_18B9EC
/* 18B9EC 8025D10C 0C0976F2 */ jal func_8025DBC8
/* 18B9F0 8025D110 0200282D */ daddu $a1, $s0, $zero
/* 18B9F4 8025D114 0809744E */ j .L8025D138
/* 18B9F8 8025D118 02301021 */ addu $v0, $s1, $s0
glabel L8025D11C_18B9FC
/* 18B9FC 8025D11C 0C097750 */ jal func_8025DD40
/* 18BA00 8025D120 0200282D */ daddu $a1, $s0, $zero
/* 18BA04 8025D124 0809744E */ j .L8025D138
/* 18BA08 8025D128 02301021 */ addu $v0, $s1, $s0
glabel L8025D12C_18BA0C
/* 18BA0C 8025D12C 0C0977A2 */ jal func_8025DE88
/* 18BA10 8025D130 0200282D */ daddu $a1, $s0, $zero
.L8025D134:
/* 18BA14 8025D134 02301021 */ addu $v0, $s1, $s0
.L8025D138:
/* 18BA18 8025D138 A04008B8 */ sb $zero, 0x8b8($v0)
/* 18BA1C 8025D13C 8FBF0018 */ lw $ra, 0x18($sp)
/* 18BA20 8025D140 8FB10014 */ lw $s1, 0x14($sp)
/* 18BA24 8025D144 8FB00010 */ lw $s0, 0x10($sp)
/* 18BA28 8025D148 03E00008 */ jr $ra
/* 18BA2C 8025D14C 27BD0020 */ addiu $sp, $sp, 0x20

View File

@ -1,12 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025D290
/* 18BB70 8025D290 8C8200C0 */ lw $v0, 0xc0($a0)
/* 18BB74 8025D294 00052880 */ sll $a1, $a1, 2
/* 18BB78 8025D298 00451021 */ addu $v0, $v0, $a1
/* 18BB7C 8025D29C 8C4208B0 */ lw $v0, 0x8b0($v0)
/* 18BB80 8025D2A0 8C43000C */ lw $v1, 0xc($v0)
/* 18BB84 8025D2A4 24020005 */ addiu $v0, $zero, 5
/* 18BB88 8025D2A8 03E00008 */ jr $ra
/* 18BB8C 8025D2AC AC62002C */ sw $v0, 0x2c($v1)

View File

@ -1,14 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025D4A0
/* 18BD80 8025D4A0 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 18BD84 8025D4A4 AFBF0010 */ sw $ra, 0x10($sp)
/* 18BD88 8025D4A8 8C8200C0 */ lw $v0, 0xc0($a0)
/* 18BD8C 8025D4AC 00052880 */ sll $a1, $a1, 2
/* 18BD90 8025D4B0 00451021 */ addu $v0, $v0, $a1
/* 18BD94 8025D4B4 0C016914 */ jal remove_effect
/* 18BD98 8025D4B8 8C4408B0 */ lw $a0, 0x8b0($v0)
/* 18BD9C 8025D4BC 8FBF0010 */ lw $ra, 0x10($sp)
/* 18BDA0 8025D4C0 03E00008 */ jr $ra
/* 18BDA4 8025D4C4 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -1,12 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025D620
/* 18BF00 8025D620 8C8200C0 */ lw $v0, 0xc0($a0)
/* 18BF04 8025D624 00052880 */ sll $a1, $a1, 2
/* 18BF08 8025D628 00451021 */ addu $v0, $v0, $a1
/* 18BF0C 8025D62C 8C4208B0 */ lw $v0, 0x8b0($v0)
/* 18BF10 8025D630 8C43000C */ lw $v1, 0xc($v0)
/* 18BF14 8025D634 24020005 */ addiu $v0, $zero, 5
/* 18BF18 8025D638 03E00008 */ jr $ra
/* 18BF1C 8025D63C AC62002C */ sw $v0, 0x2c($v1)

View File

@ -1,12 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025D6FC
/* 18BFDC 8025D6FC 8C8200C0 */ lw $v0, 0xc0($a0)
/* 18BFE0 8025D700 00052880 */ sll $a1, $a1, 2
/* 18BFE4 8025D704 00451021 */ addu $v0, $v0, $a1
/* 18BFE8 8025D708 8C4308B0 */ lw $v1, 0x8b0($v0)
/* 18BFEC 8025D70C 8C620000 */ lw $v0, ($v1)
/* 18BFF0 8025D710 34420010 */ ori $v0, $v0, 0x10
/* 18BFF4 8025D714 03E00008 */ jr $ra
/* 18BFF8 8025D718 AC620000 */ sw $v0, ($v1)

View File

@ -1,12 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025D810
/* 18C0F0 8025D810 8C8200C0 */ lw $v0, 0xc0($a0)
/* 18C0F4 8025D814 00052880 */ sll $a1, $a1, 2
/* 18C0F8 8025D818 00451021 */ addu $v0, $v0, $a1
/* 18C0FC 8025D81C 8C4308B0 */ lw $v1, 0x8b0($v0)
/* 18C100 8025D820 8C620000 */ lw $v0, ($v1)
/* 18C104 8025D824 34420010 */ ori $v0, $v0, 0x10
/* 18C108 8025D828 03E00008 */ jr $ra
/* 18C10C 8025D82C AC620000 */ sw $v0, ($v1)

View File

@ -1,12 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8025D8EC
/* 18C1CC 8025D8EC 8C8200C0 */ lw $v0, 0xc0($a0)
/* 18C1D0 8025D8F0 00052880 */ sll $a1, $a1, 2
/* 18C1D4 8025D8F4 00451021 */ addu $v0, $v0, $a1
/* 18C1D8 8025D8F8 8C4308B0 */ lw $v1, 0x8b0($v0)
/* 18C1DC 8025D8FC 8C620000 */ lw $v0, ($v1)
/* 18C1E0 8025D900 34420010 */ ori $v0, $v0, 0x10
/* 18C1E4 8025D904 03E00008 */ jr $ra
/* 18C1E8 8025D908 AC620000 */ sw $v0, ($v1)

View File

@ -1,232 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
glabel jtbl_8029D5E0
.word L80266238_194B18, L80266238_194B18, L80266238_194B18, L80265F80_194860, L80265F80_194860, L80265F80_194860, L80265F80_194860, L80265F80_194860, L80265F80_194860, L80265F80_194860, L80265F80_194860, L80266138_194A18, L8026618C_194A6C, L802661C0_194AA0, L802661F8_194AD8, 0
glabel jtbl_8029D620
.word L802660E4_1949C4, L802660D0_1949B0, L802660B0_194990, L80266090_194970, L8026602C_19490C, L80266238_194B18, L80266104_1949E4, L80266124_194A04
.section .text
glabel inflict_status
/* 194820 80265F40 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 194824 80265F44 AFB00018 */ sw $s0, 0x18($sp)
/* 194828 80265F48 0080802D */ daddu $s0, $a0, $zero
/* 19482C 80265F4C AFB1001C */ sw $s1, 0x1c($sp)
/* 194830 80265F50 00A0882D */ daddu $s1, $a1, $zero
/* 194834 80265F54 AFB20020 */ sw $s2, 0x20($sp)
/* 194838 80265F58 00C0902D */ daddu $s2, $a2, $zero
/* 19483C 80265F5C 2E22000F */ sltiu $v0, $s1, 0xf
/* 194840 80265F60 104000B5 */ beqz $v0, L80266238_194B18
/* 194844 80265F64 AFBF0024 */ sw $ra, 0x24($sp)
/* 194848 80265F68 00111080 */ sll $v0, $s1, 2
/* 19484C 80265F6C 3C01802A */ lui $at, %hi(jtbl_8029D5E0)
/* 194850 80265F70 00220821 */ addu $at, $at, $v0
/* 194854 80265F74 8C22D5E0 */ lw $v0, %lo(jtbl_8029D5E0)($at)
/* 194858 80265F78 00400008 */ jr $v0
/* 19485C 80265F7C 00000000 */ nop
glabel L80265F80_194860
/* 194860 80265F80 86020192 */ lh $v0, 0x192($s0)
/* 194864 80265F84 1440000E */ bnez $v0, .L80265FC0
/* 194868 80265F88 00000000 */ nop
/* 19486C 80265F8C 0C03A752 */ jal is_ability_active
/* 194870 80265F90 2404000E */ addiu $a0, $zero, 0xe
/* 194874 80265F94 144000A9 */ bnez $v0, .L8026623C
/* 194878 80265F98 0000102D */ daddu $v0, $zero, $zero
/* 19487C 80265F9C 0C03A752 */ jal is_ability_active
/* 194880 80265FA0 24040015 */ addiu $a0, $zero, 0x15
/* 194884 80265FA4 144000A5 */ bnez $v0, .L8026623C
/* 194888 80265FA8 0000102D */ daddu $v0, $zero, $zero
/* 19488C 80265FAC 3C02800E */ lui $v0, %hi(gBattleStatus)
/* 194890 80265FB0 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus)
/* 194894 80265FB4 8042008B */ lb $v0, 0x8b($v0)
/* 194898 80265FB8 144000A0 */ bnez $v0, .L8026623C
/* 19489C 80265FBC 0000102D */ daddu $v0, $zero, $zero
.L80265FC0:
/* 1948A0 80265FC0 86030192 */ lh $v1, 0x192($s0)
/* 1948A4 80265FC4 24020100 */ addiu $v0, $zero, 0x100
/* 1948A8 80265FC8 1062009C */ beq $v1, $v0, .L8026623C
/* 1948AC 80265FCC 24020001 */ addiu $v0, $zero, 1
/* 1948B0 80265FD0 82020210 */ lb $v0, 0x210($s0)
/* 1948B4 80265FD4 54510001 */ bnel $v0, $s1, .L80265FDC
/* 1948B8 80265FD8 A211021C */ sb $s1, 0x21c($s0)
.L80265FDC:
/* 1948BC 80265FDC 8E020440 */ lw $v0, 0x440($s0)
/* 1948C0 80265FE0 8C42000C */ lw $v0, 0xc($v0)
/* 1948C4 80265FE4 AC40003C */ sw $zero, 0x3c($v0)
/* 1948C8 80265FE8 00121600 */ sll $v0, $s2, 0x18
/* 1948CC 80265FEC 00021603 */ sra $v0, $v0, 0x18
/* 1948D0 80265FF0 2842000A */ slti $v0, $v0, 0xa
/* 1948D4 80265FF4 A2110210 */ sb $s1, 0x210($s0)
/* 1948D8 80265FF8 14400003 */ bnez $v0, .L80266008
/* 1948DC 80265FFC A2120211 */ sb $s2, 0x211($s0)
/* 1948E0 80266000 24020009 */ addiu $v0, $zero, 9
/* 1948E4 80266004 A2020211 */ sb $v0, 0x211($s0)
.L80266008:
/* 1948E8 80266008 2625FFFD */ addiu $a1, $s1, -3
/* 1948EC 8026600C 2CA20008 */ sltiu $v0, $a1, 8
/* 1948F0 80266010 10400089 */ beqz $v0, L80266238_194B18
/* 1948F4 80266014 00051080 */ sll $v0, $a1, 2
/* 1948F8 80266018 3C01802A */ lui $at, %hi(jtbl_8029D620)
/* 1948FC 8026601C 00220821 */ addu $at, $at, $v0
/* 194900 80266020 8C22D620 */ lw $v0, %lo(jtbl_8029D620)($at)
/* 194904 80266024 00400008 */ jr $v0
/* 194908 80266028 00000000 */ nop
glabel L8026602C_19490C
/* 19490C 8026602C 86030192 */ lh $v1, 0x192($s0)
/* 194910 80266030 24020100 */ addiu $v0, $zero, 0x100
/* 194914 80266034 10620081 */ beq $v1, $v0, .L8026623C
/* 194918 80266038 24020001 */ addiu $v0, $zero, 1
/* 19491C 8026603C 8E030228 */ lw $v1, 0x228($s0)
/* 194920 80266040 10600004 */ beqz $v1, .L80266054
/* 194924 80266044 00000000 */ nop
/* 194928 80266048 8C620000 */ lw $v0, ($v1)
/* 19492C 8026604C 34420010 */ ori $v0, $v0, 0x10
/* 194930 80266050 AC620000 */ sw $v0, ($v1)
.L80266054:
/* 194934 80266054 3C013F80 */ lui $at, 0x3f80
/* 194938 80266058 44810000 */ mtc1 $at, $f0
/* 19493C 8026605C AFA00014 */ sw $zero, 0x14($sp)
/* 194940 80266060 E7A00010 */ swc1 $f0, 0x10($sp)
/* 194944 80266064 8E050144 */ lw $a1, 0x144($s0)
/* 194948 80266068 8E060148 */ lw $a2, 0x148($s0)
/* 19494C 8026606C 8E07014C */ lw $a3, 0x14c($s0)
/* 194950 80266070 0C01CA3C */ jal playFX_81
/* 194954 80266074 0000202D */ daddu $a0, $zero, $zero
/* 194958 80266078 86040436 */ lh $a0, 0x436($s0)
/* 19495C 8026607C 24050007 */ addiu $a1, $zero, 7
/* 194960 80266080 0C011E08 */ jal func_80047820
/* 194964 80266084 AE020228 */ sw $v0, 0x228($s0)
/* 194968 80266088 0809988F */ j .L8026623C
/* 19496C 8026608C 24020001 */ addiu $v0, $zero, 1
glabel L80266090_194970
/* 194970 80266090 0200202D */ daddu $a0, $s0, $zero
/* 194974 80266094 0C099B6B */ jal func_80266DAC
/* 194978 80266098 24050003 */ addiu $a1, $zero, 3
/* 19497C 8026609C 86040436 */ lh $a0, 0x436($s0)
/* 194980 802660A0 0C011E08 */ jal func_80047820
/* 194984 802660A4 24050006 */ addiu $a1, $zero, 6
/* 194988 802660A8 0809988F */ j .L8026623C
/* 19498C 802660AC 24020001 */ addiu $v0, $zero, 1
glabel L802660B0_194990
/* 194990 802660B0 0200202D */ daddu $a0, $s0, $zero
/* 194994 802660B4 0C099B6B */ jal func_80266DAC
/* 194998 802660B8 24050007 */ addiu $a1, $zero, 7
/* 19499C 802660BC 86040436 */ lh $a0, 0x436($s0)
/* 1949A0 802660C0 0C011E08 */ jal func_80047820
/* 1949A4 802660C4 24050005 */ addiu $a1, $zero, 5
/* 1949A8 802660C8 0809988F */ j .L8026623C
/* 1949AC 802660CC 24020001 */ addiu $v0, $zero, 1
glabel L802660D0_1949B0
/* 1949B0 802660D0 86040436 */ lh $a0, 0x436($s0)
/* 1949B4 802660D4 0C011E08 */ jal func_80047820
/* 1949B8 802660D8 24050004 */ addiu $a1, $zero, 4
/* 1949BC 802660DC 0809988F */ j .L8026623C
/* 1949C0 802660E0 24020001 */ addiu $v0, $zero, 1
glabel L802660E4_1949C4
/* 1949C4 802660E4 0200202D */ daddu $a0, $s0, $zero
/* 1949C8 802660E8 0C099B6B */ jal func_80266DAC
/* 1949CC 802660EC 24050005 */ addiu $a1, $zero, 5
/* 1949D0 802660F0 86040436 */ lh $a0, 0x436($s0)
/* 1949D4 802660F4 0C011E08 */ jal func_80047820
/* 1949D8 802660F8 24050003 */ addiu $a1, $zero, 3
/* 1949DC 802660FC 0809988F */ j .L8026623C
/* 1949E0 80266100 24020001 */ addiu $v0, $zero, 1
glabel L80266104_1949E4
/* 1949E4 80266104 0200202D */ daddu $a0, $s0, $zero
/* 1949E8 80266108 0C099B6B */ jal func_80266DAC
/* 1949EC 8026610C 24050006 */ addiu $a1, $zero, 6
/* 1949F0 80266110 86040436 */ lh $a0, 0x436($s0)
/* 1949F4 80266114 0C011E08 */ jal func_80047820
/* 1949F8 80266118 24050009 */ addiu $a1, $zero, 9
/* 1949FC 8026611C 0809988F */ j .L8026623C
/* 194A00 80266120 24020001 */ addiu $v0, $zero, 1
glabel L80266124_194A04
/* 194A04 80266124 86040436 */ lh $a0, 0x436($s0)
/* 194A08 80266128 0C011E08 */ jal func_80047820
/* 194A0C 8026612C 2405000A */ addiu $a1, $zero, 0xa
/* 194A10 80266130 0809988F */ j .L8026623C
/* 194A14 80266134 24020001 */ addiu $v0, $zero, 1
glabel L80266138_194A18
/* 194A18 80266138 86030192 */ lh $v1, 0x192($s0)
/* 194A1C 8026613C 24020100 */ addiu $v0, $zero, 0x100
/* 194A20 80266140 1062003D */ beq $v1, $v0, L80266238_194B18
/* 194A24 80266144 00121600 */ sll $v0, $s2, 0x18
/* 194A28 80266148 00021603 */ sra $v0, $v0, 0x18
/* 194A2C 8026614C 2842000A */ slti $v0, $v0, 0xa
/* 194A30 80266150 A2110212 */ sb $s1, 0x212($s0)
/* 194A34 80266154 14400003 */ bnez $v0, .L80266164
/* 194A38 80266158 A2120213 */ sb $s2, 0x213($s0)
/* 194A3C 8026615C 24020009 */ addiu $v0, $zero, 9
/* 194A40 80266160 A2020213 */ sb $v0, 0x213($s0)
.L80266164:
/* 194A44 80266164 0200202D */ daddu $a0, $s0, $zero
/* 194A48 80266168 24050004 */ addiu $a1, $zero, 4
/* 194A4C 8026616C 2402000B */ addiu $v0, $zero, 0xb
/* 194A50 80266170 0C099B6B */ jal func_80266DAC
/* 194A54 80266174 A202021C */ sb $v0, 0x21c($s0)
/* 194A58 80266178 86040436 */ lh $a0, 0x436($s0)
/* 194A5C 8026617C 0C011E4A */ jal func_80047928
/* 194A60 80266180 2405000B */ addiu $a1, $zero, 0xb
/* 194A64 80266184 0809988F */ j .L8026623C
/* 194A68 80266188 24020001 */ addiu $v0, $zero, 1
glabel L8026618C_194A6C
/* 194A6C 8026618C 86030192 */ lh $v1, 0x192($s0)
/* 194A70 80266190 24020100 */ addiu $v0, $zero, 0x100
/* 194A74 80266194 10620028 */ beq $v1, $v0, L80266238_194B18
/* 194A78 80266198 2403000C */ addiu $v1, $zero, 0xc
/* 194A7C 8026619C 00121600 */ sll $v0, $s2, 0x18
/* 194A80 802661A0 00021603 */ sra $v0, $v0, 0x18
/* 194A84 802661A4 2842000A */ slti $v0, $v0, 0xa
/* 194A88 802661A8 A2030214 */ sb $v1, 0x214($s0)
/* 194A8C 802661AC 14400010 */ bnez $v0, .L802661F0
/* 194A90 802661B0 A2120215 */ sb $s2, 0x215($s0)
/* 194A94 802661B4 24020009 */ addiu $v0, $zero, 9
/* 194A98 802661B8 0809987C */ j .L802661F0
/* 194A9C 802661BC A2020215 */ sb $v0, 0x215($s0)
glabel L802661C0_194AA0
/* 194AA0 802661C0 82020216 */ lb $v0, 0x216($s0)
/* 194AA4 802661C4 0051102A */ slt $v0, $v0, $s1
/* 194AA8 802661C8 1040001B */ beqz $v0, L80266238_194B18
/* 194AAC 802661CC 2403000D */ addiu $v1, $zero, 0xd
/* 194AB0 802661D0 00121600 */ sll $v0, $s2, 0x18
/* 194AB4 802661D4 00021603 */ sra $v0, $v0, 0x18
/* 194AB8 802661D8 2842000A */ slti $v0, $v0, 0xa
/* 194ABC 802661DC A2030216 */ sb $v1, 0x216($s0)
/* 194AC0 802661E0 14400003 */ bnez $v0, .L802661F0
/* 194AC4 802661E4 A2120217 */ sb $s2, 0x217($s0)
/* 194AC8 802661E8 24020009 */ addiu $v0, $zero, 9
/* 194ACC 802661EC A2020217 */ sb $v0, 0x217($s0)
.L802661F0:
/* 194AD0 802661F0 0809988E */ j L80266238_194B18
/* 194AD4 802661F4 A203021C */ sb $v1, 0x21c($s0)
glabel L802661F8_194AD8
/* 194AD8 802661F8 86030192 */ lh $v1, 0x192($s0)
/* 194ADC 802661FC 24020100 */ addiu $v0, $zero, 0x100
/* 194AE0 80266200 1062000D */ beq $v1, $v0, L80266238_194B18
/* 194AE4 80266204 2403000E */ addiu $v1, $zero, 0xe
/* 194AE8 80266208 00121600 */ sll $v0, $s2, 0x18
/* 194AEC 8026620C 00021603 */ sra $v0, $v0, 0x18
/* 194AF0 80266210 2842000A */ slti $v0, $v0, 0xa
/* 194AF4 80266214 A2030218 */ sb $v1, 0x218($s0)
/* 194AF8 80266218 14400003 */ bnez $v0, .L80266228
/* 194AFC 8026621C A2120219 */ sb $s2, 0x219($s0)
/* 194B00 80266220 24020009 */ addiu $v0, $zero, 9
/* 194B04 80266224 A2020219 */ sb $v0, 0x219($s0)
.L80266228:
/* 194B08 80266228 86040436 */ lh $a0, 0x436($s0)
/* 194B0C 8026622C 2405000E */ addiu $a1, $zero, 0xe
/* 194B10 80266230 0C011E8C */ jal func_80047A30
/* 194B14 80266234 A203021C */ sb $v1, 0x21c($s0)
glabel L80266238_194B18
/* 194B18 80266238 24020001 */ addiu $v0, $zero, 1
.L8026623C:
/* 194B1C 8026623C 8FBF0024 */ lw $ra, 0x24($sp)
/* 194B20 80266240 8FB20020 */ lw $s2, 0x20($sp)
/* 194B24 80266244 8FB1001C */ lw $s1, 0x1c($sp)
/* 194B28 80266248 8FB00018 */ lw $s0, 0x18($sp)
/* 194B2C 8026624C 03E00008 */ jr $ra
/* 194B30 80266250 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,128 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel DropStarPoints
/* 1AB184 8027C8A4 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 1AB188 8027C8A8 AFB00020 */ sw $s0, 0x20($sp)
/* 1AB18C 8027C8AC 0080802D */ daddu $s0, $a0, $zero
/* 1AB190 8027C8B0 AFBF0034 */ sw $ra, 0x34($sp)
/* 1AB194 8027C8B4 AFB40030 */ sw $s4, 0x30($sp)
/* 1AB198 8027C8B8 AFB3002C */ sw $s3, 0x2c($sp)
/* 1AB19C 8027C8BC AFB20028 */ sw $s2, 0x28($sp)
/* 1AB1A0 8027C8C0 AFB10024 */ sw $s1, 0x24($sp)
/* 1AB1A4 8027C8C4 8E02000C */ lw $v0, 0xc($s0)
/* 1AB1A8 8027C8C8 0C0B1EAF */ jal get_variable
/* 1AB1AC 8027C8CC 8C450000 */ lw $a1, ($v0)
/* 1AB1B0 8027C8D0 0040202D */ daddu $a0, $v0, $zero
/* 1AB1B4 8027C8D4 3C14800E */ lui $s4, %hi(gBattleStatus)
/* 1AB1B8 8027C8D8 2694C070 */ addiu $s4, $s4, %lo(gBattleStatus)
/* 1AB1BC 8027C8DC 2402FF81 */ addiu $v0, $zero, -0x7f
/* 1AB1C0 8027C8E0 14820002 */ bne $a0, $v0, .L8027C8EC
/* 1AB1C4 8027C8E4 00000000 */ nop
/* 1AB1C8 8027C8E8 8E040148 */ lw $a0, 0x148($s0)
.L8027C8EC:
/* 1AB1CC 8027C8EC 0C09A75B */ jal get_actor
/* 1AB1D0 8027C8F0 00000000 */ nop
/* 1AB1D4 8027C8F4 0040882D */ daddu $s1, $v0, $zero
/* 1AB1D8 8027C8F8 8E220008 */ lw $v0, 8($s1)
/* 1AB1DC 8027C8FC 90420006 */ lbu $v0, 6($v0)
/* 1AB1E0 8027C900 44800000 */ mtc1 $zero, $f0
/* 1AB1E4 8027C904 44823000 */ mtc1 $v0, $f6
/* 1AB1E8 8027C908 00000000 */ nop
/* 1AB1EC 8027C90C 468031A0 */ cvt.s.w $f6, $f6
/* 1AB1F0 8027C910 46003032 */ c.eq.s $f6, $f0
/* 1AB1F4 8027C914 00000000 */ nop
/* 1AB1F8 8027C918 45000003 */ bc1f .L8027C928
/* 1AB1FC 8027C91C 00000000 */ nop
/* 1AB200 8027C920 3C013F80 */ lui $at, 0x3f80
/* 1AB204 8027C924 44813000 */ mtc1 $at, $f6
.L8027C928:
/* 1AB208 8027C928 3C028011 */ lui $v0, %hi(gPlayerData)
/* 1AB20C 8027C92C 2442F290 */ addiu $v0, $v0, %lo(gPlayerData)
/* 1AB210 8027C930 80430009 */ lb $v1, 9($v0)
/* 1AB214 8027C934 44832000 */ mtc1 $v1, $f4
/* 1AB218 8027C938 00000000 */ nop
/* 1AB21C 8027C93C 46802120 */ cvt.s.w $f4, $f4
/* 1AB220 8027C940 46002032 */ c.eq.s $f4, $f0
/* 1AB224 8027C944 00000000 */ nop
/* 1AB228 8027C948 45000004 */ bc1f .L8027C95C
/* 1AB22C 8027C94C 00000000 */ nop
/* 1AB230 8027C950 3C013F80 */ lui $at, 0x3f80
/* 1AB234 8027C954 44812000 */ mtc1 $at, $f4
/* 1AB238 8027C958 00000000 */ nop
.L8027C95C:
/* 1AB23C 8027C95C 4604303C */ c.lt.s $f6, $f4
/* 1AB240 8027C960 00000000 */ nop
/* 1AB244 8027C964 45010017 */ bc1t .L8027C9C4
/* 1AB248 8027C968 46000086 */ mov.s $f2, $f0
/* 1AB24C 8027C96C 46043081 */ sub.s $f2, $f6, $f4
/* 1AB250 8027C970 3C013F00 */ lui $at, 0x3f00
/* 1AB254 8027C974 44810000 */ mtc1 $at, $f0
/* 1AB258 8027C978 00000000 */ nop
/* 1AB25C 8027C97C 46001082 */ mul.s $f2, $f2, $f0
/* 1AB260 8027C980 00000000 */ nop
/* 1AB264 8027C984 8282008E */ lb $v0, 0x8e($s4)
/* 1AB268 8027C988 00021080 */ sll $v0, $v0, 2
/* 1AB26C 8027C98C 3C018029 */ lui $at, %hi(D_802946E0)
/* 1AB270 8027C990 00220821 */ addu $at, $at, $v0
/* 1AB274 8027C994 C42046E0 */ lwc1 $f0, %lo(D_802946E0)($at)
/* 1AB278 8027C998 46800020 */ cvt.s.w $f0, $f0
/* 1AB27C 8027C99C 46001082 */ mul.s $f2, $f2, $f0
/* 1AB280 8027C9A0 00000000 */ nop
/* 1AB284 8027C9A4 3C014248 */ lui $at, 0x4248
/* 1AB288 8027C9A8 44810000 */ mtc1 $at, $f0
/* 1AB28C 8027C9AC 00000000 */ nop
/* 1AB290 8027C9B0 46001000 */ add.s $f0, $f2, $f0
/* 1AB294 8027C9B4 3C0142C8 */ lui $at, 0x42c8
/* 1AB298 8027C9B8 44811000 */ mtc1 $at, $f2
/* 1AB29C 8027C9BC 00000000 */ nop
/* 1AB2A0 8027C9C0 46020083 */ div.s $f2, $f0, $f2
.L8027C9C4:
/* 1AB2A4 8027C9C4 4600120D */ trunc.w.s $f8, $f2
/* 1AB2A8 8027C9C8 44134000 */ mfc1 $s3, $f8
/* 1AB2AC 8027C9CC 2862001B */ slti $v0, $v1, 0x1b
/* 1AB2B0 8027C9D0 10400019 */ beqz $v0, .L8027CA38
/* 1AB2B4 8027C9D4 00000000 */ nop
/* 1AB2B8 8027C9D8 8E220000 */ lw $v0, ($s1)
/* 1AB2BC 8027C9DC 30420800 */ andi $v0, $v0, 0x800
/* 1AB2C0 8027C9E0 10400002 */ beqz $v0, .L8027C9EC
/* 1AB2C4 8027C9E4 24120017 */ addiu $s2, $zero, 0x17
/* 1AB2C8 8027C9E8 24120019 */ addiu $s2, $zero, 0x19
.L8027C9EC:
/* 1AB2CC 8027C9EC 1A60000D */ blez $s3, .L8027CA24
/* 1AB2D0 8027C9F0 0000802D */ daddu $s0, $zero, $zero
/* 1AB2D4 8027C9F4 24040159 */ addiu $a0, $zero, 0x159
.L8027C9F8:
/* 1AB2D8 8027C9F8 AFB20010 */ sw $s2, 0x10($sp)
/* 1AB2DC 8027C9FC AFB00014 */ sw $s0, 0x14($sp)
/* 1AB2E0 8027CA00 AFA00018 */ sw $zero, 0x18($sp)
/* 1AB2E4 8027CA04 8E250144 */ lw $a1, 0x144($s1)
/* 1AB2E8 8027CA08 8E260148 */ lw $a2, 0x148($s1)
/* 1AB2EC 8027CA0C 8E27014C */ lw $a3, 0x14c($s1)
/* 1AB2F0 8027CA10 0C04C6B2 */ jal make_item_entity_delayed
/* 1AB2F4 8027CA14 26100001 */ addiu $s0, $s0, 1
/* 1AB2F8 8027CA18 0213102A */ slt $v0, $s0, $s3
/* 1AB2FC 8027CA1C 1440FFF6 */ bnez $v0, .L8027C9F8
/* 1AB300 8027CA20 24040159 */ addiu $a0, $zero, 0x159
.L8027CA24:
/* 1AB304 8027CA24 92820079 */ lbu $v0, 0x79($s4)
/* 1AB308 8027CA28 24030028 */ addiu $v1, $zero, 0x28
/* 1AB30C 8027CA2C A283007A */ sb $v1, 0x7a($s4)
/* 1AB310 8027CA30 00531021 */ addu $v0, $v0, $s3
/* 1AB314 8027CA34 A2820079 */ sb $v0, 0x79($s4)
.L8027CA38:
/* 1AB318 8027CA38 3C03800E */ lui $v1, %hi(gBattleStatus)
/* 1AB31C 8027CA3C 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus)
/* 1AB320 8027CA40 8C640000 */ lw $a0, ($v1)
/* 1AB324 8027CA44 3C050100 */ lui $a1, 0x100
/* 1AB328 8027CA48 00852025 */ or $a0, $a0, $a1
/* 1AB32C 8027CA4C AC640000 */ sw $a0, ($v1)
/* 1AB330 8027CA50 8FBF0034 */ lw $ra, 0x34($sp)
/* 1AB334 8027CA54 8FB40030 */ lw $s4, 0x30($sp)
/* 1AB338 8027CA58 8FB3002C */ lw $s3, 0x2c($sp)
/* 1AB33C 8027CA5C 8FB20028 */ lw $s2, 0x28($sp)
/* 1AB340 8027CA60 8FB10024 */ lw $s1, 0x24($sp)
/* 1AB344 8027CA64 8FB00020 */ lw $s0, 0x20($sp)
/* 1AB348 8027CA68 24020002 */ addiu $v0, $zero, 2
/* 1AB34C 8027CA6C 03E00008 */ jr $ra
/* 1AB350 8027CA70 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,187 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel show_first_strike_message
/* 1D05C 80041C5C 27BDFFA8 */ addiu $sp, $sp, -0x58
/* 1D060 80041C60 3C05800B */ lui $a1, %hi(gCurrentEncounter)
/* 1D064 80041C64 24A50F10 */ addiu $a1, $a1, %lo(gCurrentEncounter)
/* 1D068 80041C68 AFBF0054 */ sw $ra, 0x54($sp)
/* 1D06C 80041C6C AFB00050 */ sw $s0, 0x50($sp)
/* 1D070 80041C70 8CA20094 */ lw $v0, 0x94($a1)
/* 1D074 80041C74 14400005 */ bnez $v0, .L80041C8C
/* 1D078 80041C78 2402FF38 */ addiu $v0, $zero, -0xc8
/* 1D07C 80041C7C 3C01800A */ lui $at, %hi(D_8009A668)
/* 1D080 80041C80 A422A668 */ sh $v0, %lo(D_8009A668)($at)
/* 1D084 80041C84 080107C0 */ j .L80041F00
/* 1D088 80041C88 00000000 */ nop
.L80041C8C:
/* 1D08C 80041C8C 3C02800A */ lui $v0, %hi(D_8009A668)
/* 1D090 80041C90 2442A668 */ addiu $v0, $v0, %lo(D_8009A668)
/* 1D094 80041C94 94430000 */ lhu $v1, ($v0)
/* 1D098 80041C98 24630028 */ addiu $v1, $v1, 0x28
/* 1D09C 80041C9C 00032400 */ sll $a0, $v1, 0x10
/* 1D0A0 80041CA0 00048403 */ sra $s0, $a0, 0x10
/* 1D0A4 80041CA4 1A000005 */ blez $s0, .L80041CBC
/* 1D0A8 80041CA8 A4430000 */ sh $v1, ($v0)
/* 1D0AC 80041CAC 2A020640 */ slti $v0, $s0, 0x640
/* 1D0B0 80041CB0 10400002 */ beqz $v0, .L80041CBC
/* 1D0B4 80041CB4 2610F9C0 */ addiu $s0, $s0, -0x640
/* 1D0B8 80041CB8 0000802D */ daddu $s0, $zero, $zero
.L80041CBC:
/* 1D0BC 80041CBC 80A30004 */ lb $v1, 4($a1)
/* 1D0C0 80041CC0 24020001 */ addiu $v0, $zero, 1
/* 1D0C4 80041CC4 10620005 */ beq $v1, $v0, .L80041CDC
/* 1D0C8 80041CC8 24020002 */ addiu $v0, $zero, 2
/* 1D0CC 80041CCC 1062005D */ beq $v1, $v0, .L80041E44
/* 1D0D0 80041CD0 00000000 */ nop
/* 1D0D4 80041CD4 080107C0 */ j .L80041F00
/* 1D0D8 80041CD8 00000000 */ nop
.L80041CDC:
/* 1D0DC 80041CDC 80A30005 */ lb $v1, 5($a1)
/* 1D0E0 80041CE0 24020004 */ addiu $v0, $zero, 4
/* 1D0E4 80041CE4 1062000C */ beq $v1, $v0, .L80041D18
/* 1D0E8 80041CE8 28620005 */ slti $v0, $v1, 5
/* 1D0EC 80041CEC 10400005 */ beqz $v0, .L80041D04
/* 1D0F0 80041CF0 24020002 */ addiu $v0, $zero, 2
/* 1D0F4 80041CF4 10620009 */ beq $v1, $v0, .L80041D1C
/* 1D0F8 80041CF8 3C04001D */ lui $a0, 0x1d
/* 1D0FC 80041CFC 080107C0 */ j .L80041F00
/* 1D100 80041D00 00000000 */ nop
.L80041D04:
/* 1D104 80041D04 24020006 */ addiu $v0, $zero, 6
/* 1D108 80041D08 10620029 */ beq $v1, $v0, .L80041DB0
/* 1D10C 80041D0C 3C04001D */ lui $a0, 0x1d
/* 1D110 80041D10 080107C0 */ j .L80041F00
/* 1D114 80041D14 00000000 */ nop
.L80041D18:
/* 1D118 80041D18 3C04001D */ lui $a0, 0x1d
.L80041D1C:
/* 1D11C 80041D1C 348400AC */ ori $a0, $a0, 0xac
/* 1D120 80041D20 0C04991D */ jal get_string_width
/* 1D124 80041D24 0000282D */ daddu $a1, $zero, $zero
/* 1D128 80041D28 24480018 */ addiu $t0, $v0, 0x18
/* 1D12C 80041D2C 260300A0 */ addiu $v1, $s0, 0xa0
/* 1D130 80041D30 000817C2 */ srl $v0, $t0, 0x1f
/* 1D134 80041D34 01021021 */ addu $v0, $t0, $v0
/* 1D138 80041D38 00021043 */ sra $v0, $v0, 1
/* 1D13C 80041D3C 00628023 */ subu $s0, $v1, $v0
/* 1D140 80041D40 0000202D */ daddu $a0, $zero, $zero
/* 1D144 80041D44 24050014 */ addiu $a1, $zero, 0x14
/* 1D148 80041D48 0200302D */ daddu $a2, $s0, $zero
/* 1D14C 80041D4C 24070045 */ addiu $a3, $zero, 0x45
/* 1D150 80041D50 2402001C */ addiu $v0, $zero, 0x1c
/* 1D154 80041D54 AFA20018 */ sw $v0, 0x18($sp)
/* 1D158 80041D58 240200FF */ addiu $v0, $zero, 0xff
/* 1D15C 80041D5C AFA2001C */ sw $v0, 0x1c($sp)
/* 1D160 80041D60 24020140 */ addiu $v0, $zero, 0x140
/* 1D164 80041D64 AFA20044 */ sw $v0, 0x44($sp)
/* 1D168 80041D68 240200F0 */ addiu $v0, $zero, 0xf0
/* 1D16C 80041D6C AFA00010 */ sw $zero, 0x10($sp)
/* 1D170 80041D70 AFA80014 */ sw $t0, 0x14($sp)
/* 1D174 80041D74 AFA00020 */ sw $zero, 0x20($sp)
/* 1D178 80041D78 AFA00024 */ sw $zero, 0x24($sp)
/* 1D17C 80041D7C AFA00028 */ sw $zero, 0x28($sp)
/* 1D180 80041D80 AFA0002C */ sw $zero, 0x2c($sp)
/* 1D184 80041D84 AFA00030 */ sw $zero, 0x30($sp)
/* 1D188 80041D88 AFA00034 */ sw $zero, 0x34($sp)
/* 1D18C 80041D8C AFA00038 */ sw $zero, 0x38($sp)
/* 1D190 80041D90 AFA0003C */ sw $zero, 0x3c($sp)
/* 1D194 80041D94 AFA00040 */ sw $zero, 0x40($sp)
/* 1D198 80041D98 AFA20048 */ sw $v0, 0x48($sp)
/* 1D19C 80041D9C 0C03D4B8 */ jal draw_box
/* 1D1A0 80041DA0 AFA0004C */ sw $zero, 0x4c($sp)
/* 1D1A4 80041DA4 3C04001D */ lui $a0, 0x1d
/* 1D1A8 80041DA8 080107B9 */ j .L80041EE4
/* 1D1AC 80041DAC 348400AC */ ori $a0, $a0, 0xac
.L80041DB0:
/* 1D1B0 80041DB0 348400AD */ ori $a0, $a0, 0xad
/* 1D1B4 80041DB4 0C04991D */ jal get_string_width
/* 1D1B8 80041DB8 0000282D */ daddu $a1, $zero, $zero
/* 1D1BC 80041DBC 24480018 */ addiu $t0, $v0, 0x18
/* 1D1C0 80041DC0 260300A0 */ addiu $v1, $s0, 0xa0
/* 1D1C4 80041DC4 000817C2 */ srl $v0, $t0, 0x1f
/* 1D1C8 80041DC8 01021021 */ addu $v0, $t0, $v0
/* 1D1CC 80041DCC 00021043 */ sra $v0, $v0, 1
/* 1D1D0 80041DD0 00628023 */ subu $s0, $v1, $v0
/* 1D1D4 80041DD4 0000202D */ daddu $a0, $zero, $zero
/* 1D1D8 80041DD8 24050014 */ addiu $a1, $zero, 0x14
/* 1D1DC 80041DDC 0200302D */ daddu $a2, $s0, $zero
/* 1D1E0 80041DE0 24070045 */ addiu $a3, $zero, 0x45
/* 1D1E4 80041DE4 2402001C */ addiu $v0, $zero, 0x1c
/* 1D1E8 80041DE8 AFA20018 */ sw $v0, 0x18($sp)
/* 1D1EC 80041DEC 240200FF */ addiu $v0, $zero, 0xff
/* 1D1F0 80041DF0 AFA2001C */ sw $v0, 0x1c($sp)
/* 1D1F4 80041DF4 24020140 */ addiu $v0, $zero, 0x140
/* 1D1F8 80041DF8 AFA20044 */ sw $v0, 0x44($sp)
/* 1D1FC 80041DFC 240200F0 */ addiu $v0, $zero, 0xf0
/* 1D200 80041E00 AFA00010 */ sw $zero, 0x10($sp)
/* 1D204 80041E04 AFA80014 */ sw $t0, 0x14($sp)
/* 1D208 80041E08 AFA00020 */ sw $zero, 0x20($sp)
/* 1D20C 80041E0C AFA00024 */ sw $zero, 0x24($sp)
/* 1D210 80041E10 AFA00028 */ sw $zero, 0x28($sp)
/* 1D214 80041E14 AFA0002C */ sw $zero, 0x2c($sp)
/* 1D218 80041E18 AFA00030 */ sw $zero, 0x30($sp)
/* 1D21C 80041E1C AFA00034 */ sw $zero, 0x34($sp)
/* 1D220 80041E20 AFA00038 */ sw $zero, 0x38($sp)
/* 1D224 80041E24 AFA0003C */ sw $zero, 0x3c($sp)
/* 1D228 80041E28 AFA00040 */ sw $zero, 0x40($sp)
/* 1D22C 80041E2C AFA20048 */ sw $v0, 0x48($sp)
/* 1D230 80041E30 0C03D4B8 */ jal draw_box
/* 1D234 80041E34 AFA0004C */ sw $zero, 0x4c($sp)
/* 1D238 80041E38 3C04001D */ lui $a0, 0x1d
/* 1D23C 80041E3C 080107B9 */ j .L80041EE4
/* 1D240 80041E40 348400AD */ ori $a0, $a0, 0xad
.L80041E44:
/* 1D244 80041E44 0C03A752 */ jal is_ability_active
/* 1D248 80041E48 24040011 */ addiu $a0, $zero, 0x11
/* 1D24C 80041E4C 1440002C */ bnez $v0, .L80041F00
/* 1D250 80041E50 3C04001D */ lui $a0, 0x1d
/* 1D254 80041E54 348400AE */ ori $a0, $a0, 0xae
/* 1D258 80041E58 0C04991D */ jal get_string_width
/* 1D25C 80041E5C 0000282D */ daddu $a1, $zero, $zero
/* 1D260 80041E60 24480018 */ addiu $t0, $v0, 0x18
/* 1D264 80041E64 260300A0 */ addiu $v1, $s0, 0xa0
/* 1D268 80041E68 000817C2 */ srl $v0, $t0, 0x1f
/* 1D26C 80041E6C 01021021 */ addu $v0, $t0, $v0
/* 1D270 80041E70 00021043 */ sra $v0, $v0, 1
/* 1D274 80041E74 00628023 */ subu $s0, $v1, $v0
/* 1D278 80041E78 0000202D */ daddu $a0, $zero, $zero
/* 1D27C 80041E7C 24050004 */ addiu $a1, $zero, 4
/* 1D280 80041E80 0200302D */ daddu $a2, $s0, $zero
/* 1D284 80041E84 24070045 */ addiu $a3, $zero, 0x45
/* 1D288 80041E88 2402001C */ addiu $v0, $zero, 0x1c
/* 1D28C 80041E8C AFA20018 */ sw $v0, 0x18($sp)
/* 1D290 80041E90 240200FF */ addiu $v0, $zero, 0xff
/* 1D294 80041E94 AFA2001C */ sw $v0, 0x1c($sp)
/* 1D298 80041E98 24020140 */ addiu $v0, $zero, 0x140
/* 1D29C 80041E9C AFA20044 */ sw $v0, 0x44($sp)
/* 1D2A0 80041EA0 240200F0 */ addiu $v0, $zero, 0xf0
/* 1D2A4 80041EA4 AFA00010 */ sw $zero, 0x10($sp)
/* 1D2A8 80041EA8 AFA80014 */ sw $t0, 0x14($sp)
/* 1D2AC 80041EAC AFA00020 */ sw $zero, 0x20($sp)
/* 1D2B0 80041EB0 AFA00024 */ sw $zero, 0x24($sp)
/* 1D2B4 80041EB4 AFA00028 */ sw $zero, 0x28($sp)
/* 1D2B8 80041EB8 AFA0002C */ sw $zero, 0x2c($sp)
/* 1D2BC 80041EBC AFA00030 */ sw $zero, 0x30($sp)
/* 1D2C0 80041EC0 AFA00034 */ sw $zero, 0x34($sp)
/* 1D2C4 80041EC4 AFA00038 */ sw $zero, 0x38($sp)
/* 1D2C8 80041EC8 AFA0003C */ sw $zero, 0x3c($sp)
/* 1D2CC 80041ECC AFA00040 */ sw $zero, 0x40($sp)
/* 1D2D0 80041ED0 AFA20048 */ sw $v0, 0x48($sp)
/* 1D2D4 80041ED4 0C03D4B8 */ jal draw_box
/* 1D2D8 80041ED8 AFA0004C */ sw $zero, 0x4c($sp)
/* 1D2DC 80041EDC 3C04001D */ lui $a0, 0x1d
/* 1D2E0 80041EE0 348400AE */ ori $a0, $a0, 0xae
.L80041EE4:
/* 1D2E4 80041EE4 2605000B */ addiu $a1, $s0, 0xb
/* 1D2E8 80041EE8 2406004B */ addiu $a2, $zero, 0x4b
/* 1D2EC 80041EEC 240700FF */ addiu $a3, $zero, 0xff
/* 1D2F0 80041EF0 2402000A */ addiu $v0, $zero, 0xa
/* 1D2F4 80041EF4 AFA20010 */ sw $v0, 0x10($sp)
/* 1D2F8 80041EF8 0C04993B */ jal draw_string
/* 1D2FC 80041EFC AFA00014 */ sw $zero, 0x14($sp)
.L80041F00:
/* 1D300 80041F00 8FBF0054 */ lw $ra, 0x54($sp)
/* 1D304 80041F04 8FB00050 */ lw $s0, 0x50($sp)
/* 1D308 80041F08 03E00008 */ jr $ra
/* 1D30C 80041F0C 27BD0058 */ addiu $sp, $sp, 0x58

View File

@ -98,8 +98,8 @@ glabel nuAuDmaCallBack
/* 265C8 8004B1C8 AE22000C */ sw $v0, 0xc($s1)
/* 265CC 8004B1CC AC830000 */ sw $v1, ($a0)
/* 265D0 8004B1D0 A0A00002 */ sb $zero, 2($a1)
/* 265D4 8004B1D4 3C04800A */ lui $a0, %hi(carthandle)
/* 265D8 8004B1D8 8C84A638 */ lw $a0, %lo(carthandle)($a0)
/* 265D4 8004B1D4 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 265D8 8004B1D8 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 265DC 8004B1DC 3C02800A */ lui $v0, %hi(D_800A3640)
/* 265E0 8004B1E0 24423640 */ addiu $v0, $v0, %lo(D_800A3640)
/* 265E4 8004B1E4 ACA20004 */ sw $v0, 4($a1)

View File

@ -13,8 +13,8 @@ glabel func_802AE000_316C00
/* 316C20 802AE020 0000802D */ daddu $s0, $zero, $zero
/* 316C24 802AE024 3C05B000 */ lui $a1, 0xb000
/* 316C28 802AE028 34A50574 */ ori $a1, $a1, 0x574
/* 316C2C 802AE02C 3C04800A */ lui $a0, %hi(carthandle)
/* 316C30 802AE030 8C84A638 */ lw $a0, %lo(carthandle)($a0)
/* 316C2C 802AE02C 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 316C30 802AE030 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 316C34 802AE034 27A60010 */ addiu $a2, $sp, 0x10
/* 316C38 802AE038 AFB20020 */ sw $s2, 0x20($sp)
/* 316C3C 802AE03C 0200902D */ daddu $s2, $s0, $zero
@ -40,8 +40,8 @@ glabel func_802AE000_316C00
/* 316C8C 802AE08C 0060B02D */ daddu $s6, $v1, $zero
.L802AE090:
/* 316C90 802AE090 0220282D */ daddu $a1, $s1, $zero
/* 316C94 802AE094 3C04800A */ lui $a0, %hi(carthandle)
/* 316C98 802AE098 8C84A638 */ lw $a0, %lo(carthandle)($a0)
/* 316C94 802AE094 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 316C98 802AE098 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 316C9C 802AE09C 02A0F809 */ jalr $s5
/* 316CA0 802AE0A0 27A60010 */ addiu $a2, $sp, 0x10
/* 316CA4 802AE0A4 8FA30010 */ lw $v1, 0x10($sp)

View File

@ -12,8 +12,8 @@ glabel func_802AE000
/* 316DAC 802AE01C 0000802D */ daddu $s0, $zero, $zero
/* 316DB0 802AE020 3C05B000 */ lui $a1, 0xb000
/* 316DB4 802AE024 34A50800 */ ori $a1, $a1, 0x800
/* 316DB8 802AE028 3C04800A */ lui $a0, %hi(carthandle)
/* 316DBC 802AE02C 8C84A638 */ lw $a0, %lo(carthandle)($a0)
/* 316DB8 802AE028 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 316DBC 802AE02C 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 316DC0 802AE030 27A60010 */ addiu $a2, $sp, 0x10
/* 316DC4 802AE034 AFB20020 */ sw $s2, 0x20($sp)
/* 316DC8 802AE038 0200902D */ daddu $s2, $s0, $zero
@ -39,8 +39,8 @@ glabel func_802AE000
/* 316E18 802AE088 0060B02D */ daddu $s6, $v1, $zero
.L802AE08C:
/* 316E1C 802AE08C 0220282D */ daddu $a1, $s1, $zero
/* 316E20 802AE090 3C04800A */ lui $a0, %hi(carthandle)
/* 316E24 802AE094 8C84A638 */ lw $a0, %lo(carthandle)($a0)
/* 316E20 802AE090 3C04800A */ lui $a0, %hi(nuPiCartHandle)
/* 316E24 802AE094 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0)
/* 316E28 802AE098 02A0F809 */ jalr $s5
/* 316E2C 802AE09C 27A60010 */ addiu $a2, $sp, 0x10
/* 316E30 802AE0A0 8FA30010 */ lw $v1, 0x10($sp)

View File

@ -85,8 +85,8 @@ glabel func_E02000AC
/* 325CB8 E02001E8 00021080 */ sll $v0, $v0, 2
/* 325CBC E02001EC 30580FFF */ andi $t8, $v0, 0xfff
/* 325CC0 E02001F0 8D430000 */ lw $v1, ($t2)
/* 325CC4 E02001F4 3C0E800A */ lui $t6, %hi(D_8009A64C)
/* 325CC8 E02001F8 8DCEA64C */ lw $t6, %lo(D_8009A64C)($t6)
/* 325CC4 E02001F4 3C0E800A */ lui $t6, %hi(nuGfxCfb_ptr)
/* 325CC8 E02001F8 8DCEA64C */ lw $t6, %lo(nuGfxCfb_ptr)($t6)
/* 325CCC E02001FC 0060102D */ daddu $v0, $v1, $zero
/* 325CD0 E0200200 01C0202D */ daddu $a0, $t6, $zero
/* 325CD4 E0200204 24630008 */ addiu $v1, $v1, 8

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0200410
/* 325EE0 E0200410 3C01E020 */ lui $at, %hi(D_E0200694)
/* 325EE4 E0200414 8C210694 */ lw $at, %lo(D_E0200694)($at)
/* 325EE8 E0200418 00200008 */ jr $at
/* 325EEC E020041C 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0200420
/* 325EF0 E0200420 3C01E020 */ lui $at, %hi(D_E0200698)
/* 325EF4 E0200424 8C210698 */ lw $at, %lo(D_E0200698)($at)
/* 325EF8 E0200428 00200008 */ jr $at
/* 325EFC E020042C 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0200430
/* 325F00 E0200430 3C01E020 */ lui $at, %hi(D_E020069C)
/* 325F04 E0200434 8C21069C */ lw $at, %lo(D_E020069C)($at)
/* 325F08 E0200438 00200008 */ jr $at
/* 325F0C E020043C 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0200440
/* 325F10 E0200440 3C01E020 */ lui $at, %hi(D_E02006A0)
/* 325F14 E0200444 8C2106A0 */ lw $at, %lo(D_E02006A0)($at)
/* 325F18 E0200448 00200008 */ jr $at
/* 325F1C E020044C 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0200450
/* 325F20 E0200450 3C01E020 */ lui $at, %hi(D_E02006A4)
/* 325F24 E0200454 8C2106A4 */ lw $at, %lo(D_E02006A4)($at)
/* 325F28 E0200458 00200008 */ jr $at
/* 325F2C E020045C 00000000 */ nop

View File

@ -1,8 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_E0200460
/* 325F30 E0200460 3C01E020 */ lui $at, %hi(D_E02006A8)
/* 325F34 E0200464 8C2106A8 */ lw $at, %lo(D_E02006A8)($at)
/* 325F38 E0200468 00200008 */ jr $at
/* 325F3C E020046C 00000000 */ nop

Some files were not shown because too many files have changed in this diff Show More