Appetizer sampler (#547)

* 2 fold funcs

* func_8013B1B0

* cleanup & naming

* more formatting

* cleanup

* progress & filemenu stuff

* 2

* func_8013CFA8

* fold_load_gfx (thanks Wiseguy)

* update_encounters_pre_battle

* 3 mdl funcs

* more model funcs

* cd180 funcs

* progrezz

* 3 cam funcs

* more

* 1 more

* eob30 progress

* sfx_play_sound_at_position & sound enum cleanup

* cleanup

* cleanup2

* PR comments
This commit is contained in:
Ethan Roseman 2021-12-13 04:27:28 -05:00 committed by GitHub
parent c719faf847
commit 7230c62545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
134 changed files with 3760 additions and 8006 deletions

View File

@ -2,6 +2,7 @@
#define _COMMON_H_
#include "ultra64.h"
#include "gbi_custom.h"
#include "types.h"
#include "common_structs.h"
#include "functions.h"

View File

@ -388,8 +388,7 @@ typedef struct Entity {
/* 0x54 */ Vec3f scale;
/* 0x60 */ Vec3f rotation;
/* 0x6C */ f32 shadowPosY;
/* 0x70 */ Matrix4f* inverseTransformMatrix; /* world-to-local */
/* 0x74 */ char unk_74[60];
/* 0x70 */ Matrix4f inverseTransformMatrix; /* world-to-local */
/* 0xB0 */ float effectiveSize;
/* 0xB4 */ char unk_B4[4];
/* 0xB8 */ Mtx transformMatrix;
@ -421,7 +420,7 @@ typedef struct StaticEntityData {
typedef struct MusicSettings {
/* 0x00 */ u16 flags;
/* 0x02 */ u16 unk_02;
/* 0x02 */ s16 unk_02;
/* 0x04 */ s32 fadeOutTime;
/* 0x08 */ s32 fadeInTime;
/* 0x0C */ s16 unk_0C;
@ -558,9 +557,9 @@ typedef struct Camera {
/* 0x03A */ char unk_3A[2];
/* 0x03C */ Vec3f lookAt_eye;
/* 0x048 */ Vec3f lookAt_obj;
/* 0x054 */ f32 unk_54;
/* 0x058 */ f32 unk_58;
/* 0x05C */ f32 unk_5C;
/* 0x054 */ f32 unk_54; // x-related
/* 0x058 */ f32 unk_58; // y-related
/* 0x05C */ f32 unk_5C; // z-related
/* 0x060 */ Vec3f targetPos;
/* 0x06C */ f32 currentYaw;
/* 0x070 */ f32 unk_70;
@ -1502,8 +1501,8 @@ typedef struct ShopOwner {
} ShopOwner;
typedef struct ShopItemLocation {
/* 0x0 */ s16 posModelID;
/* 0x2 */ s16 triggerColliderID;
/* 0x0 */ u16 posModelID;
/* 0x2 */ u16 triggerColliderID;
} ShopItemLocation; // size = 0x4
typedef struct StaticInventoryItem {
@ -1560,7 +1559,7 @@ typedef struct Shop {
typedef struct Encounter {
/* 0x00 */ s32 count;
/* 0x04 */ struct Enemy* enemy[16];
/* 0x44 */ u16 battle;
/* 0x44 */ s16 battle;
/* 0x46 */ s16 stage;
/* 0x48 */ s16 encounterID;
/* 0x4A */ char unk_4C[0x12];
@ -1873,7 +1872,10 @@ typedef struct EncounterStatus {
/* 0x094 */ s32 unk_94;
/* 0x098 */ s32 fadeOutAccel;
/* 0x09C */ s32 battleStartCountdown;
/* 0x0A0 */ char unk_A0[16];
/* 0x0A0 */ s8 unk_A0;
/* 0x0A1 */ char unk_A1[0x1];
/* 0x0A2 */ s16 unk_A2;
/* 0x0A4 */ char unk_A4[0xC];
/* 0x0B0 */ s32 defeatFlags[60][12];
/* 0xFB0 */ s16 recentMaps[2];
/* 0xFB4 */ char unk_FB4[4];
@ -1938,10 +1940,15 @@ typedef struct PauseMapSpace {
} PauseMapSpace; // size = 0x14
typedef struct MenuPanel {
/* 0x00 */ u8 initialized; //?
/* 0x01 */ s8 col;
/* 0x02 */ s8 row;
/* 0x03 */ u8 selected; // usually set to the current value from gridData
/* 0x00 */ union {
/* */ s32 s;
/* */ struct {
/* 0x00 */ u8 initialized;
/* 0x01 */ s8 col;
/* 0x02 */ s8 row;
/* 0x03 */ u8 selected; // usually set to the current value from gridData
/* */ } c;
/* */ } unk_00;
/* 0x04 */ s8 page; // filemenu: 0 = select, 1 = delete, 3 = copy from, 4 = copy to, all else = save
/* 0x05 */ s8 numCols;
/* 0x06 */ s8 numRows;
@ -2269,4 +2276,32 @@ typedef struct struct8015A578 {
/* 0x08 */ f32 unk_08;
} struct8015A578; // size = 0x0C
typedef struct SaveMetadata {
/* 0x00 */ s32 unk_00;
/* 0x04 */ u8 unk_04;
/* 0x05 */ char unk_05[0x1];
/* 0x06 */ s8 unk_06;
/* 0x07 */ s8 unk_07[8];
/* 0x0F */ char unk_0F[0x1];
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
} SaveMetadata; // size = 0x18
typedef struct SpriteShadingLightSource {
/* 0x00 */ s8 flags;
/* 0x01 */ s8 rgb[3];
/* 0x04 */ Vec3f pos;
/* 0x10 */ f32 falloff;
/* 0x14 */ s8 unk_14;
/* 0x15 */ char unk_15[0x3];
} SpriteShadingLightSource; // size = 0x18
typedef struct SpriteShadingProfile {
/* 0x00 */ s16 flags;
/* 0x02 */ char unk_02[0x2];
/* 0x04 */ SpriteShadingLightSource sources[7];
/* 0xAC */ s8 ambientColor[3];
/* 0xAF */ s8 ambientPower; // ?
} SpriteShadingProfile; // size = 0xB0
#endif

View File

@ -480,18 +480,18 @@ enum Easings {
};
enum SoundIDs {
SOUND_UNKNOWN_0 = 0x00000000,
SOUND_0 = 0x00000000,
SOUND_MENU_BADGE_EQUIP = 0x00000005,
SOUND_MENU_BADGE_UNEQUIP = 0x00000006,
SOUND_UNKNOWN_D = 0x0000000D,
SOUND_UNKNOWN_E = 0x0000000E,
SOUND_UNKNOWN_43 = 0x00000043,
SOUND_D = 0x0000000D,
SOUND_E = 0x0000000E,
SOUND_43 = 0x00000043,
SOUND_JR_TROOPA_SPLASH = 0x00000045,
SOUND_JR_TROOPA_SWIM = 0x00000046,
SOUND_BOO_SPOOK = 0x00000047,
SOUND_UNKNOWN_52 = 0x00000052,
SOUND_UNKNOWN_A2 = 0x000000A2,
SOUND_UNKNOWN_B4 = 0x000000B4,
SOUND_52 = 0x00000052,
SOUND_A2 = 0x000000A2,
SOUND_B4 = 0x000000B4,
SOUND_BOO_VANISH = 0x000000C1,
SOUND_BOO_APPEAR = 0x000000C3,
SOUND_MENU_OPEN = 0x000000C5,
@ -516,12 +516,12 @@ enum SoundIDs {
SOUND_LAND = 0x0000014B,
SOUND_HIT_BLOCK = 0x0000014E,
SOUND_SEARCH_BUSH = 0x00000153,
SOUND_UNKNOWN_162 = 0x00000162,
SOUND_162 = 0x00000162,
SOUND_SMASH_GOOMNUT_TREE = 0x00000165,
SOUND_UNKNOWN_167 = 0x00000167,
SOUND_UNKNOWN_172 = 0x00000172,
SOUND_UNKNOWN_17B = 0x0000017B,
SOUND_UNKNOWN_194 = 0x00000194,
SOUND_167 = 0x00000167,
SOUND_172 = 0x00000172,
SOUND_17B = 0x0000017B,
SOUND_194 = 0x00000194,
SOUND_BASIC_DOOR_OPEN = 0x000001C1,
SOUND_BASIC_DOOR_CLOSE = 0x000001C2,
SOUND_METAL_DOOR_OPEN = 0x000001C3,
@ -532,49 +532,51 @@ enum SoundIDs {
SOUND_CREAKY_DOOR_CLOSE = 0x000001C8,
SOUND_METAL_GATE_OPEN = 0x000001C9,
SOUND_METAL_GATE_CLOSE = 0x000001CA,
SOUND_1CB = 0x000001CB,
SOUND_1CC = 0x000001CC,
SOUND_MENU_BADGE_ERROR = 0x0000021D,
SOUND_UNKNOWN_231 = 0x00000231,
SOUND_UNKNOWN_246 = 0x00000246,
SOUND_UNKNOWN_259 = 0x00000259,
SOUND_UNKNOWN_25A = 0x0000025A,
SOUND_UNKNOWN_25C = 0x0000025C,
SOUND_UNKNOWN_25D = 0x0000025D,
SOUND_UNKNOWN_262 = 0x00000262,
SOUND_UNKNOWN_282 = 0x00000282,
SOUND_231 = 0x00000231,
SOUND_246 = 0x00000246,
SOUND_259 = 0x00000259,
SOUND_25A = 0x0000025A,
SOUND_25C = 0x0000025C,
SOUND_25D = 0x0000025D,
SOUND_262 = 0x00000262,
SOUND_282 = 0x00000282,
SOUND_BOW_SPOOK = 0x00000291,
SOUND_UNKNOWN_295 = 0x00000295,
SOUND_295 = 0x00000295,
SOUND_UNUSED_2C1 = 0x000002C1,
SOUND_SMOKE_BURST = 0x000002CD,
SOUND_DAYZEE_SONG = 0x000002D7,
SOUND_POWER_UP = 0x000002D8,
SOUND_UNKNOWN_2F1 = 0x000002F1,
SOUND_UNKNOWN_2F6 = 0x000002F6,
SOUND_UNKNOWN_2F7 = 0x000002F7,
SOUND_2F1 = 0x000002F1,
SOUND_2F6 = 0x000002F6,
SOUND_2F7 = 0x000002F7,
SOUND_CLOSE_SHELL = 0x000002FF,
SOUND_SHY_GUY_SCREAMS1 = 0x0000030C,
SOUND_SHY_GUY_SCREAMS2 = 0x0000030D,
SOUND_SHY_GUY_SCREAMS3 = 0x0000030E,
SOUND_TOY_TANK_MOVE1 = 0x0000030F,
SOUND_TOY_TANK_MOVE2 = 0x00000310,
SOUND_UNKNOWN_315 = 0x00000315,
SOUND_315 = 0x00000315,
SOUND_MOLE_SURFACE = 0x00000321,
SOUND_MOLE_DIG = 0x00000322,
SOUND_MOLE_POP = 0x00000323,
SOUND_UNKNOWN_32E = 0x0000032E,
SOUND_UNKNOWN_359 = 0x00000359,
SOUND_UNKNOWN_361 = 0x00000361,
SOUND_UNKNOWN_362 = 0x00000362,
SOUND_UNKNOWN_363 = 0x00000363,
SOUND_UNKNOWN_364 = 0x00000364,
SOUND_UNKNOWN_365 = 0x00000365,
SOUND_UNKNOWN_366 = 0x00000366,
SOUND_UNKNOWN_367 = 0x00000367,
SOUND_UNKNOWN_368 = 0x00000368,
SOUND_UNKNOWN_369 = 0x00000369,
SOUND_UNKNOWN_375 = 0x00000375,
SOUND_UNKNOWN_376 = 0x00000376,
SOUND_UNKNOWN_377 = 0x00000377,
SOUND_UNKNOWN_379 = 0x00000379,
SOUND_32E = 0x0000032E,
SOUND_359 = 0x00000359,
SOUND_361 = 0x00000361,
SOUND_362 = 0x00000362,
SOUND_363 = 0x00000363,
SOUND_364 = 0x00000364,
SOUND_365 = 0x00000365,
SOUND_366 = 0x00000366,
SOUND_367 = 0x00000367,
SOUND_368 = 0x00000368,
SOUND_369 = 0x00000369,
SOUND_375 = 0x00000375,
SOUND_376 = 0x00000376,
SOUND_377 = 0x00000377,
SOUND_379 = 0x00000379,
SOUND_37A = 0x0000037A,
SOUND_ELECTRIC = 0x0000037B,
SOUND_GENERAL_WHISTLE = 0x00000395,
@ -584,42 +586,48 @@ enum SoundIDs {
SOUND_DEATH = 0x000003E5,
SOUND_BIG_POWER_UP = 0x000003E6,
SOUND_MOLE_THROW = 0x000003E8,
SOUND_UNKNOWN_3F3 = 0x000003F3,
SOUND_3F3 = 0x000003F3,
SOUND_THROW = 0x000003FA,
SOUND_UNKNOWN_759 = 0x00000759,
SOUND_UNKNOWN_2003 = 0x00002003,
SOUND_UNKNOWN_200D = 0x0000200D,
SOUND_759 = 0x00000759,
SOUND_2003 = 0x00002003,
SOUND_200D = 0x0000200D,
SOUND_BOW_VANISH = 0x0000200E,
SOUND_BOW_APPEAR = 0x0000200F,
SOUND_UNKNOWN_2010 = 0x00002010,
SOUND_2010 = 0x00002010,
SOUND_CANNON1 = 0x00002016,
SOUND_CANNON2 = 0x00002017,
SOUND_CANNON3 = 0x00002018,
SOUND_UNKNOWN_202C = 0x0000202C,
SOUND_UNKNOWN_202D = 0x0000202D,
SOUND_UNKNOWN_202E = 0x0000202E,
SOUND_UNKNOWN_202F = 0x0000202F,
SOUND_UNKNOWN_2030 = 0x00002030,
SOUND_202C = 0x0000202C,
SOUND_202D = 0x0000202D,
SOUND_202E = 0x0000202E,
SOUND_202F = 0x0000202F,
SOUND_2030 = 0x00002030,
SOUND_INFLICT_SLEEP = 0x00002031,
SOUND_INFLICT_STATUS = 0x00002032, //< Stop, poison, paralyze
SOUND_UNKNOWN_2038 = 0x00002038,
SOUND_UNKNOWN_2039 = 0x00002039,
SOUND_2038 = 0x00002038,
SOUND_2039 = 0x00002039,
SOUND_BOMB_BLAST = 0x00002076,
SOUND_JUMP_2081 = 0x00002081,
SOUND_JUMP_8BIT_MARIO = 0x00002082,
SOUND_UNKNOWN_208C = 0x0000208C,
SOUND_UNKNOWN_208D = 0x0000208D,
SOUND_UNKNOWN_208E = 0x0000208E,
SOUND_UNKNOWN_208F = 0x0000208F,
SOUND_UNKNOWN_2095 = 0x00002095,
SOUND_208C = 0x0000208C,
SOUND_208D = 0x0000208D,
SOUND_208E = 0x0000208E,
SOUND_208F = 0x0000208F,
SOUND_2095 = 0x00002095,
SOUND_20A3 = 0x000020A3,
SOUND_20A4 = 0x000020A4,
SOUND_SPELL_CAST1 = 0x000020D4,
SOUND_SPELL_CAST2 = 0x000020D5,
SOUND_SPELL_CAST3 = 0x000020D6,
SOUND_SPELL_CAST4 = 0x000020D7,
SOUND_SPELL_CAST5 = 0x000020D8,
SOUND_UNKNOWN_20F6 = 0x000020F6,
SOUND_UNKNOWN_2106 = 0x00002106,
SOUND_UNKNOWN_2107 = 0x00002107,
SOUND_20F6 = 0x000020F6,
SOUND_2106 = 0x00002106,
SOUND_2107 = 0x00002107,
SOUND_2111 = 0x00002111,
SOUND_2112 = 0x00002112,
SOUND_2113 = 0x00002113,
SOUND_2114 = 0x00002114,
};
enum Cams {
@ -2965,14 +2973,25 @@ enum MsgWindowStates {
};
enum FoldStateFlags {
FOLD_STATE_FLAGS_0 = 0x00000000,
FOLD_STATE_FLAGS_1 = 0x00000001,
FOLD_STATE_FLAGS_80 = 0x00000080,
FOLD_STATE_FLAGS_100 = 0x00000100,
FOLD_STATE_FLAGS_800 = 0x00000800,
FOLD_STATE_FLAGS_1000 = 0x00001000,
FOLD_STATE_FLAGS_4000 = 0x00004000,
FOLD_STATE_FLAGS_20000 = 0x00020000,
FOLD_STATE_FLAG_ENABLED = 0x00000001,
FOLD_STATE_FLAG_G_CULL_BACK = 0x00000002,
FOLD_STATE_FLAG_G_CULL_FRONT = 0x00000004,
FOLD_STATE_FLAG_10 = 0x00000010,
FOLD_STATE_FLAG_20 = 0x00000020,
FOLD_STATE_FLAG_40 = 0x00000040,
FOLD_STATE_FLAG_80 = 0x00000080,
FOLD_STATE_FLAG_100 = 0x00000100,
FOLD_STATE_FLAG_200 = 0x00000200,
FOLD_STATE_FLAG_400 = 0x00000400,
FOLD_STATE_FLAG_800 = 0x00000800,
FOLD_STATE_FLAG_1000 = 0x00001000,
FOLD_STATE_FLAG_2000 = 0x00002000,
FOLD_STATE_FLAG_4000 = 0x00004000,
FOLD_STATE_FLAG_8000 = 0x00008000,
FOLD_STATE_FLAG_10000 = 0x00010000,
FOLD_STATE_FLAG_20000 = 0x00020000,
FOLD_STATE_FLAG_80000 = 0x00080000,
FOLD_STATE_FLAG_100000 = 0x00100000,
};
#endif

View File

@ -47,7 +47,6 @@ void gravity_use_fall_parms(void);
f32 get_clamped_angle_diff(f32, f32);
s32 intro_logos_fade_out(s16 addAlpha);
void _render_transition_stencil(s32, f32, s32);
u32 get_entity_type(s32 arg0);
Entity* get_entity_by_index(s32 index);
s32 create_entity(StaticEntityData*, s32, s32, s32, s32, ...);
@ -77,6 +76,11 @@ void setup_pause_menu_tab(MenuWindowBP* bpArray, s32 arraySize);
s32 draw_ci_image_with_clipping(s32* raster, s32 width, s32 height, s32 fmt, s32 bitDepth, s32* palette, s16 posX,
s16 posY, u16 clipULx, u16 clipULy, u16 clipLRx, u16 clipRLy, u8 opacity);
// file menu stuff
void filemenu_set_cursor_goal_pos(s32 windowIndex, s32 posX, s32 posY);
s8* filemenu_get_menu_message(s32 idx);
void filemenu_draw_message(s8*, s32 posX, s32 posY, s32 alpha, s32 color, s32 flags);
// append gfx funcs
void func_80257B28(s32);
void func_8025595C(Actor*);
@ -95,7 +99,13 @@ s32 can_trigger_loading_zone(void);
void func_802667F0(s32, Actor*, f32, f32, f32);
void* general_heap_malloc(s32 size);
s32 general_heap_free(s32* data);
s32 general_heap_free(void* data);
s32 integer_log(s32 number, u32 base);
void set_battle_formation(s32);
void set_battle_stage(s32);
void load_battle(s32);
void entity_Shadow_init(Shadow* entity);
void entity_SaveBlock_idle(Entity* entity);
@ -292,10 +302,10 @@ void set_animation_rate(s32 actorID, s32 partIndex, f32 rate);
void func_8011B7C0(u16, s32, s32);
ModelAnimator* get_animator_by_index(s32 arg0);
void set_screen_overlay_params_front(u8, f32);
void set_screen_overlay_params_back(s32, f32);
void set_screen_overlay_params_back(u8, f32);
void set_screen_overlay_alpha(s32, f32);
void get_screen_overlay_params(s32, f32*, f32*);
s32 set_screen_overlay_color(s32, u8, u8, u8);
void get_screen_overlay_params(s32, u8*, f32*);
void set_screen_overlay_color(s32, u8, u8, u8);
void set_screen_overlay_center(s32, s32, s32, s32);
s32 rand_int(s32);
void sort_items(void);
@ -407,6 +417,7 @@ void add_xz_vec3f(Vec3f* vector, f32 speed, f32 angleDeg);
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg);
void func_80138D88(s32, s32, s32, s32, f32);
void func_8013A4D0(void);
void btl_cam_set_target_pos(f32, f32, f32);
void deduct_current_move_fp(void);
@ -526,7 +537,7 @@ void* load_asset_by_name(const char* assetName, u32* decompressedSize);
void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex);
s32 func_8011CFBC(void);
s32 set_screen_overlay_center_worldpos(void);
void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z);
s32 mdl_get_next_texture_address(s32);
void draw_msg(s32 msgID, s32 posX, s32 posY, s32 opacity, s32 palette, u8 style);
void get_background_color_blend(u8* r, u8* g, u8* b, u8* a);

66
include/gbi_custom.h Normal file
View File

@ -0,0 +1,66 @@
#ifndef _GBI_CUSTOM_H_
#define _GBI_CUSTOM_H_
#include "ultra64.h"
#define gDPScrollMultiTile2_4b(pkt, timg, fmt, width, height, \
uls, ult, lrs, lrt, pal, \
cms, cmt, masks, maskt, shifts, shiftt,\
scrolls, scrollt) \
{ \
gDPSetTextureImage(pkt, fmt, G_IM_SIZ_8b, ((width)>>1), timg); \
gDPSetTile(pkt, fmt, G_IM_SIZ_8b, \
(((((lrs)-(uls)+1)>>1)+7)>>3), 0, \
G_TX_LOADTILE, 0 , cmt, maskt, shiftt, cms, masks, \
shifts); \
gDPLoadSync(pkt); \
gDPLoadTile( pkt, G_TX_LOADTILE, \
(uls)<<(G_TEXTURE_IMAGE_FRAC-1), \
(ult)<<(G_TEXTURE_IMAGE_FRAC), \
(lrs)<<(G_TEXTURE_IMAGE_FRAC-1), \
(lrt)<<(G_TEXTURE_IMAGE_FRAC)); \
gDPPipeSync(pkt); \
gDPSetTile(pkt, fmt, G_IM_SIZ_4b, \
(((((lrs)-(uls)+1)>>1)+7)>>3), 0, \
G_TX_RENDERTILE + 1, 0, cmt, maskt, shiftt, cms, masks, \
shifts); \
gDPSetTileSize(pkt, G_TX_RENDERTILE + 1, \
(uls + scrolls)<<G_TEXTURE_IMAGE_FRAC, \
(ult + scrollt)<<G_TEXTURE_IMAGE_FRAC, \
(lrs + scrolls)<<G_TEXTURE_IMAGE_FRAC, \
(lrt + scrollt)<<G_TEXTURE_IMAGE_FRAC) \
gDPSetTile(pkt, fmt, G_IM_SIZ_4b, \
(((((lrs)-(uls)+1)>>1)+7)>>3), 0, \
G_TX_RENDERTILE + 0, 1, cmt, maskt, shiftt, cms, masks, \
shifts); \
}
#define gDPScrollTextureTile_4b(pkt, timg, fmt, width, height, \
uls, ult, lrs, lrt, pal, \
cms, cmt, masks, maskt, shifts, shiftt, \
scrolls, scrollt) \
\
gDPSetTextureImage(pkt, fmt, G_IM_SIZ_8b, ((width)>>1), timg); \
gDPSetTile(pkt, fmt, G_IM_SIZ_8b, \
(((((lrs)-(uls)+1)>>1)+7)>>3), 0, \
G_TX_LOADTILE, 0 , cmt, maskt, shiftt, cms, masks, \
shifts); \
gDPLoadSync(pkt); \
gDPLoadTile( pkt, G_TX_LOADTILE, \
(uls)<<(G_TEXTURE_IMAGE_FRAC-1), \
(ult)<<(G_TEXTURE_IMAGE_FRAC), \
(lrs)<<(G_TEXTURE_IMAGE_FRAC-1), \
(lrt)<<(G_TEXTURE_IMAGE_FRAC)); \
gDPPipeSync(pkt); \
gDPSetTile(pkt, fmt, G_IM_SIZ_4b, \
(((((lrs)-(uls)+1)>>1)+7)>>3), 0, \
G_TX_RENDERTILE, 0, cmt, maskt, shiftt, cms, masks, \
shifts); \
gDPSetTileSize(pkt, G_TX_RENDERTILE, \
(uls + scrolls)<<G_TEXTURE_IMAGE_FRAC, \
(ult + scrollt)<<G_TEXTURE_IMAGE_FRAC, \
(lrs + scrolls)<<G_TEXTURE_IMAGE_FRAC, \
(lrt + scrollt)<<G_TEXTURE_IMAGE_FRAC) \
#endif

View File

@ -71,7 +71,7 @@ typedef struct ModelLocalVertexCopy {
typedef struct ModelTreeInfo {
/* 0x00 */ u8 modelIndex;
/* 0x01 */ s8 treeDepth;
/* 0x01 */ u8 treeDepth;
/* 0x02 */ s8 textureID;
/* 0x03 */ char unk_03;
} ModelTreeInfo; // size = 0x04

15
include/overlay.h Normal file
View File

@ -0,0 +1,15 @@
#ifndef _OVERLAY_H_
#define _OVERLAY_H_
#include "common.h"
typedef struct ScreenOverlay {
/* 0x00 */ Color_RGB8 color;
/* 0x03 */ char unk_03;
/* 0x04 */ s32 screenPos[2][2];
/* 0x14 */ f32 alpha;
} ScreenOverlay; // size = 0x18
void _render_transition_stencil(u8, f32, ScreenOverlay*);
#endif

View File

@ -2,6 +2,7 @@
#define _SCRIPT_API_MACROS_H_
#include "evt.h"
#include "stdlib/stdarg.h"
/****** EXPRESSIONS ***************************************************************************************************/
@ -125,10 +126,19 @@
/// Bytecode argv[argc];
/// }
/// This macro expands to the given opcode and argv, with argc calculated automatically.
#ifndef PERMUTER
#define EVT_CMD(opcode, argv...) \
opcode, \
(sizeof((Bytecode[]){argv})/sizeof(Bytecode)), \
##argv
#else
// This definition that passes in 0 for the number of args is used for pycparser since it can't handle varargs
#define EVT_CMD(opcode, argv...) \
opcode, \
0, \
##argv
#endif
/// Signals the end of EVT script data. A script missing this will likely crash on load.
#define EVT_END EVT_CMD(EVT_OP_END),

View File

@ -82,7 +82,6 @@ extern EncounterStatus gCurrentEncounter;
extern s8* D_801512F0;
extern s16 D_80151308;
extern s32 D_80151310;
extern s16* D_80151328;
extern s32 D_8010C92C;
extern s16 D_8010CD00;
@ -150,6 +149,8 @@ extern s32 D_800A0964;
extern s8 D_800A0B94;
extern s16 D_800A0BB8;
extern SpriteShadingProfile* D_80151328;
extern Window gWindows[64];

View File

@ -1,15 +1,32 @@
#include "common.h"
typedef struct UnkSpr10 {
/* 0x00 */ s32 unk_00;
/* 0x04 */ char unk_04[0xC];
} UnkSpr10;
extern s32 D_802E0C58;
extern UnkSpr10 D_802E0C70[];
INCLUDE_ASM(s32, "101b90_len_8f0", spr_swizzle_anim_offsets);
INCLUDE_ASM(s32, "101b90_len_8f0", spr_load_sprite);
// spr_init_player_raster_cache
INCLUDE_ASM(void, "101b90_len_8f0", spr_init_player_raster_cache, s32 cacheSize, s32 maxRasterSize);
INCLUDE_ASM(s32, "101b90_len_8f0", spr_get_player_raster);
INCLUDE_ASM(s32, "101b90_len_8f0", spr_update_player_raster_cache);
void spr_update_player_raster_cache(void) {
s32 i;
func_8013A4D0();
for (i = 0; i < D_802E0C58; i++) {
if (D_802E0C70[i].unk_00 != 0) {
D_802E0C70[i].unk_00--;
}
}
}
INCLUDE_ASM(s32, "101b90_len_8f0", spr_load_npc_extra_anims);

View File

@ -70,10 +70,10 @@ BSS s32 filemenu_8024C100[8];
INCLUDE_ASM(s32, "163400", mainmenu_draw_rect);
void filemenu_set_selected(MenuPanel* menu, s32 col, s32 row) {
menu->col = col;
menu->row = row;
menu->selected = menu->gridData[(menu->page * menu->numCols * menu->numRows) +
(menu->numCols * (s8) row) + menu->col];
menu->unk_00.c.col = col;
menu->unk_00.c.row = row;
menu->unk_00.c.selected = menu->gridData[(menu->page * menu->numCols * menu->numRows) +
(menu->numCols * menu->unk_00.c.row) + menu->unk_00.c.col];
}
void filemenu_set_cursor_alpha(s32 arg0) {

View File

@ -2,7 +2,53 @@
#include "filemenu.h"
#include "hud_element.h"
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_title);
extern SaveMetadata D_800779C4[4];
extern u8 D_80077A24[4];
extern s8* D_80249E20[14];
extern MenuWindowBP D_80249EA0[14];
extern s8 D_8024C098;
void filemenu_draw_contents_title(
MenuPanel* menu,
s32 baseX, s32 baseY,
s32 width, s32 height,
s32 opacity, s32 darkening
) {
s32 msgIdx;
s32 xOffset;
s32 yOffset;
switch (menu->page) {
case 0:
msgIdx = 1;
xOffset = 9;
yOffset = 4;
break;
case 1:
msgIdx = 2;
xOffset = 8;
yOffset = 4;
break;
case 3:
msgIdx = 4;
xOffset = 25;
yOffset = 4;
break;
case 4:
msgIdx = 5;
xOffset = 16;
yOffset = 4;
break;
case 2:
default:
msgIdx = 3;
xOffset = 10;
yOffset = 4;
break;
}
filemenu_draw_message(filemenu_get_menu_message(msgIdx), baseX + xOffset, baseY + yOffset, 255, 0, 0);
}
void filemenu_draw_contents_stereo(
MenuPanel* menu,
@ -34,15 +80,92 @@ void filemenu_draw_contents_mono(
}
}
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_option_left);
void filemenu_draw_contents_option_left(
MenuPanel* menu,
s32 baseX, s32 baseY,
s32 width, s32 height,
s32 opacity, s32 darkening
) {
if (menu->page != 2) {
if ((menu->unk_00.s & 0x00FFFF00) == 0x200) {
filemenu_set_cursor_goal_pos(53, baseX, baseY + 8);
}
filemenu_draw_message(filemenu_get_menu_message(9), baseX + 8, baseY + 2, 255, 0, 1);
}
}
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_option_center);
void filemenu_draw_contents_option_center(
MenuPanel* menu,
s32 baseX, s32 baseY,
s32 width, s32 height,
s32 opacity, s32 darkening
) {
s32 msgIdx;
s32 xOffset;
s32 yOffset;
switch (menu->page) {
case 1:
case 2:
case 3:
case 4:
msgIdx = 10;
xOffset = 18;
yOffset = 0;
if ((menu->unk_00.s & 0xFFFF00) == 0x010200) {
filemenu_set_cursor_goal_pos(54, baseX + 8, baseY + 8);
}
break;
default:
msgIdx = 11;
xOffset = 14;
yOffset = 0;
if ((menu->unk_00.s & 0xFFFF00) == 0x010200) {
filemenu_set_cursor_goal_pos(54, baseX + 4, baseY + 8);
}
break;
}
filemenu_draw_message(filemenu_get_menu_message(msgIdx), baseX + xOffset, baseY + yOffset + 2, 255, 0, 1);
}
void filemenu_draw_contents_option_right(
MenuPanel* menu,
s32 baseX, s32 baseY,
s32 width, s32 height,
s32 opacity, s32 darkening
) {
if (menu->page != 2) {
if ((menu->unk_00.s & 0xFFFF00) == 0x020200) {
filemenu_set_cursor_goal_pos(55, baseX + 8, baseY + 8);
}
filemenu_draw_message(filemenu_get_menu_message(10), baseX + 20, baseY + 2, 255, 0, 1);
}
}
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_option_right);
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_info);
INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_title);
void filemenu_draw_contents_file_title(
s32 fileIdx,
MenuPanel* menu,
s32 baseX, s32 baseY,
s32 width, s32 height,
s32 opacity, s32 darkening)
{
if (D_8024C098 == 0 && menu->unk_00.c.selected == fileIdx) {
filemenu_set_cursor_goal_pos(fileIdx + 60, baseX - 3, baseY + 8);
}
filemenu_draw_message(filemenu_get_menu_message(26), baseX + 5, baseY + 1, 255, 0, 1);
if (D_80077A24[fileIdx] == 0) {
draw_number(fileIdx + 1, baseX + 33, baseY + 1, 1, 0, 255, 2);
} else {
draw_number(fileIdx + 1, baseX + 33, baseY + 1, 1, 0, 255, 2);
filemenu_draw_file_name(D_800779C4[fileIdx].unk_07, 8, baseX + 46, baseY + 1, 255, 0, 1, 9);
}
}
void filemenu_draw_contents_file_0_info(
MenuPanel* menu,
@ -116,10 +239,71 @@ void filemenu_draw_contents_file_3_title(
filemenu_draw_contents_file_title(3, menu, baseX, baseY, width, height, opacity, darkening);
}
INCLUDE_ASM(s32, "165490", filemenu_main_init);
void filemenu_main_init(MenuPanel* menu) {
s32 halfWidth;
s32 halfWidth2;
s16* posXPtr;
s32 x;
s32 i;
for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) {
filemenu_hudElemIDs[i] = create_hud_element(D_80249E20[i]);
set_hud_element_flags(filemenu_hudElemIDs[i], 0x80);
}
for (i = 0; i < ARRAY_COUNT(D_80249EA0); i++) {
D_80249EA0[i].tab = menu;
}
setup_pause_menu_tab(D_80249EA0, ARRAY_COUNT(D_80249EA0));
menu->unk_00.c.selected = menu->gridData[(menu->page * menu->numCols * menu->numRows) +
(menu->numCols * menu->unk_00.c.row) +
menu->unk_00.c.col];
if (menu->page == 2) {
gWindows[45].pos.y = 1;
gWindows[45].width = 211;
gWindows[45].height = 25;
} else {
gWindows[45].pos.y = 1;
gWindows[45].width = 162;
gWindows[45].height = 25;
}
halfWidth = gWindows[45].width / 2;
posXPtr = &gWindows[45].pos.x;
if (gWindows[45].parent != -1) {
x = (gWindows[gWindows[45].parent].width / 2) - halfWidth;
} else {
x = 160 - halfWidth;
}
*posXPtr = x;
halfWidth2 = gWindows[54].width / 2;
posXPtr = &gWindows[54].pos.x;
if (gWindows[54].parent != -1) {
x = (gWindows[gWindows[54].parent].width / 2) - halfWidth2;
} else {
x = 160 - halfWidth2;
}
*posXPtr = x;
if (menu->page != 0) {
set_window_update(0x35, 2);
set_window_update(0x37, 2);
set_window_update(0x33, 2);
set_window_update(0x34, 2);
}
menu->unk_00.c.initialized = 1;
}
static const f32 padding[] = { 0.0f }; // TODO remove when the following func is matched
void filemenu_main_handle_input(MenuPanel* menu);
INCLUDE_ASM(s32, "165490", filemenu_main_handle_input);
extern s32 D_8014F150[];
INCLUDE_ASM(s32, "165490", filemenu_main_update);
void filemenu_main_cleanup(void) {

View File

@ -8,11 +8,10 @@ extern s32 filemenu_iterFileIdx;
extern s32 filemenu_pressedButtons;
extern s8 D_8024C090;
extern s32 filemenu_loadedFileIdx;
extern s8 D_8024C098_C09918;
extern s8 D_8024C098;
extern s32 D_8024C100_C09980[3];
extern s32 D_8024C110;
s32 filemenu_get_menu_message(s32 index);
void filemenu_update_show_options_left(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, s32* scaleX,
s32* scaleY, s32* rotX, s32* rotY, s32* rotZ, s32* darkening, s32* opacity);
void filemenu_update_show_options_right(s32 windowIndex, s32* flags, s32* posX, s32* posY, s32* posZ, s32* scaleX,
@ -26,7 +25,7 @@ void filemenu_info_draw_message_contents(MenuPanel* menu, s32 baseX, s32 baseY)
switch (page) {
case 0:
filemenu_draw_message(filemenu_get_menu_message(0x1A), baseX + 10, baseY + 4, 255, 0, 0);
draw_number(filemenu_menus[0]->selected + 1, baseX + 48, baseY + 6, 0, 0, 255, 3);
draw_number(filemenu_menus[0]->unk_00.c.selected + 1, baseX + 48, baseY + 6, 0, 0, 255, 3);
filemenu_draw_message(filemenu_get_menu_message(0x1B), baseX + 49, baseY + 4, 255, 0, 0);
break;
case 2:
@ -43,7 +42,7 @@ void filemenu_info_draw_message_contents(MenuPanel* menu, s32 baseX, s32 baseY)
break;
case 3:
filemenu_draw_message(filemenu_get_menu_message(0x1A), baseX + 10, baseY + 4, 255, 0, 0);
draw_number(filemenu_menus[0]->selected + 1, baseX + 48, baseY + 6, 0, 0, 255, page);
draw_number(filemenu_menus[0]->unk_00.c.selected + 1, baseX + 48, baseY + 6, 0, 0, 255, page);
filemenu_draw_message(filemenu_get_menu_message(0x1F), baseX + 49, baseY + 4, 255, 0, 0);
break;
}
@ -66,7 +65,7 @@ void filemenu_info_handle_input(void) {
MenuPanel* menu = filemenu_menus[0];
s32 page;
D_8024C098_C09918 = 0;
D_8024C098 = 0;
page = menu->page;
switch(page) {
@ -130,7 +129,7 @@ void filemenu_draw_contents_file_create_header(MenuPanel* menu, s32 baseX, s32 b
}
tempAmt = 8;
if (D_8024C098_C09918 == 3) {
if (D_8024C098 == 3) {
s32 phi_v0 = 122;
if (D_8024C090 != tempAmt) {

View File

@ -912,7 +912,7 @@ void btl_state_update_partner_move(void) {
break;
}
sfx_play_sound(SOUND_UNKNOWN_2107);
sfx_play_sound(SOUND_2107);
btl_show_battle_message(phi_s0, 0x3C);
for (i = 0; i < ARRAY_COUNT(battleStatus->enemyActors); i++) {

View File

@ -68,112 +68,6 @@ EvtSource BtlBringPartnerOut = {
EVT_END
};
s8 D_80280CE0[] = { 0, 0, 0, 0 };
s32 D_80280CE4 = -1;
EvtSource CamPreset_B = {
EVT_CALL(func_80248DD0)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_F = {
EVT_CALL(func_80248DE4)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_M = {
EVT_CALL(func_80249804)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_G = {
EVT_CALL(func_8024A214)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_I = {
EVT_CALL(func_8024A990)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_H = {
EVT_CALL(func_8024AFE4)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_N = {
EVT_CALL(func_8024B5FC)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_C = {
EVT_CALL(func_8024B9A0)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_D = {
EVT_CALL(func_8024BDA4)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_E = {
EVT_CALL(func_8024C180)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_J = {
EVT_CALL(func_8024C570)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_K = {
EVT_CALL(func_8024C944)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_L = {
EVT_CALL(func_8024CB68)
EVT_RETURN
EVT_END
};
EvtSource CamPreset_A = {
EVT_CALL(func_8024E9B0, 0, 15, 0)
EVT_CALL(func_8024E748, 2, 550)
EVT_CALL(func_8024E748, 3, 100)
EVT_CALL(func_8024E748, 4, 8)
EVT_RETURN
EVT_END
};
EvtSource D_80280EB8 = {
EVT_CALL(SetCamPerspective, 1, 6, 25, 16, 1024)
EVT_CALL(SetCamViewport, 1, 12, 20, 296, 200)
EVT_CALL(SetCamBGColor, 1, 0, 0, 0)
EVT_CALL(SetCamEnabled, 1, 1)
EVT_WAIT_FRAMES(1)
EVT_CALL(InitVirtualEntityList)
EVT_CALL(InitAnimatedModels)
EVT_CALL(func_802CABE8, 1, 0, 240, 100, 8)
EVT_CALL(func_802CAE50, 1, -75, 35, 0)
EVT_CALL(BattleCamTargetActor, 0)
EVT_CALL(func_8024CE9C)
EVT_RETURN
EVT_END
};
void get_dpad_input_radial(f32* angle, f32* magnitude) {
BattleStatus* battleStatus = &gBattleStatus;
u16 currentButtonsDown;

File diff suppressed because it is too large Load Diff

View File

@ -431,7 +431,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (blocked) {
damage--;
damage -= player_team_is_ability_active(target, ABILITY_DAMAGE_DODGE);
sfx_play_sound_at_position(SOUND_UNKNOWN_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
@ -444,7 +444,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
if (target->koStatus == STATUS_END && !(battleStatus->currentAttackElement & DAMAGE_TYPE_UNBLOCKABLE)) {
if (check_block_input(BUTTON_A)) {
damage = 0;
sfx_play_sound_at_position(SOUND_UNKNOWN_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
sfx_play_sound_at_position(SOUND_231, 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
func_802667F0(0, target, state->goalPos.x, state->goalPos.y, state->goalPos.z);
gBattleStatus.flags1 |= BS_FLAGS1_ATK_BLOCKED;
break;
@ -705,7 +705,7 @@ s32 calc_enemy_damage_target(Actor* attacker) {
func_80267018(target, 1);
if (attacker->actorTypeData1[5] != SOUND_UNKNOWN_0) {
if (attacker->actorTypeData1[5] != SOUND_0) {
sfx_play_sound_at_position(attacker->actorTypeData1[5], 0, state->goalPos.x, state->goalPos.y, state->goalPos.z);
}

View File

@ -1,7 +1,12 @@
#include "common.h"
#include "battle/battle.h"
#include "npc.h"
#include "effects.h"
#include "hud_element.h"
extern s32 D_80077C40;
extern s8 D_8009A654;
extern s16 D_8009A668;
extern s32 D_800A0BA0;
extern f32 D_800A0BA4;
@ -145,8 +150,8 @@ ApiStatus MerleeUpdateFX(Evt* script, s32 isInitialCall) {
if (D_800A0BB8 == 2) {
((EffectInstanceData*)D_800A0BA8->data)->unk_30 = 0.00001f;
((EffectInstanceData*)D_800A0BAC->data)->unk_30 = 0.00001f;
D_800A0BA8->flags |= 0x10;
D_800A0BAC->flags |= 0x10;
D_800A0BA8->flags |= EFFECT_INSTANCE_FLAGS_10;
D_800A0BAC->flags |= EFFECT_INSTANCE_FLAGS_10;
return ApiStatus_DONE1;
}
@ -223,9 +228,9 @@ ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) {
}
if (script->functionTemp[1] & 1) {
npc->flags &= ~2;
npc->flags &= ~NPC_FLAG_2;
} else {
npc->flags |= 2;
npc->flags |= NPC_FLAG_2;
}
if (script->functionTemp[1] == 15) {
@ -244,7 +249,7 @@ ApiStatus OnDefeatEnemy(Evt* script, s32 isInitialCall) {
script->functionTemp[1] -= 1;
if (script->functionTemp[1] == 0) {
npc->flags |= 2;
npc->flags |= NPC_FLAG_2;
return ApiStatus_DONE1;
}
@ -282,7 +287,209 @@ INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_neutral);
void draw_encounters_neutral(void) {
}
INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_pre_battle);
void update_encounters_pre_battle(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
PlayerData* playerData = &gPlayerData;
Encounter* encounter;
Enemy* enemy;
s32 i;
s32 j;
switch (D_8009A5D0) {
case 0:
currentEncounter->fadeOutAmount = 0;
currentEncounter->unk_94 = 1;
currentEncounter->fadeOutAccel = 1;
currentEncounter->unk_08 = -1;
D_8009A654 = 0;
D_80077C40 = 0;
suspend_all_group(0x10);
for (i = 0; i < currentEncounter->numEncounters; i++) {
encounter = currentEncounter->encounterList[i];
if (encounter != NULL) {
for (j = 0; j < encounter->count; j++) {
enemy = encounter->enemy[j];
if (enemy != NULL && !(enemy->flags & NPC_FLAG_NO_AI)) {
if (enemy->aiScript != NULL) {
suspend_all_script(enemy->aiScriptID);
}
if (enemy->auxScript != NULL) {
suspend_all_script(enemy->auxScriptID);
}
}
}
}
}
enemy = currentEncounter->currentEnemy;
if ((enemy->flags & NPC_FLAG_MOTION_BLUR) && currentEncounter->unk_12 == 0) {
currentEncounter->unk_94 = 0;
currentEncounter->battleStartCountdown = 0;
partner_handle_before_battle();
D_8009A5D0 = 3;
return;
}
if (gGameStatusPtr->debugEnemyContact == 2) {
currentEncounter->unk_94 = 0;
currentEncounter->battleStartCountdown = 10;
partner_handle_before_battle();
D_8009A5D0 = 2;
return;
}
enemy = currentEncounter->currentEnemy;
if (currentEncounter->hitType != 1 &&
currentEncounter->hitType != 3 &&
is_ability_active(ABILITY_FIRST_ATTACK) &&
(playerData->level >= enemy->npcSettings->level) &&
!(enemy->flags & ENEMY_FLAGS_40) &&
currentEncounter->unk_12 == 0)
{
currentEncounter->unk_94 = 0;
currentEncounter->battleStartCountdown = 0xA;
D_80077C40 = 1;
D_8009A5D0 = 2;
return;
}
enemy = currentEncounter->currentEnemy;
if ((
(is_ability_active(ABILITY_BUMP_ATTACK)) &&
(playerData->level >= enemy->npcSettings->level) &&
(!(enemy->flags & ENEMY_FLAGS_40) &&
(currentEncounter->unk_12 == 0))
) || (
(enemy = currentEncounter->currentEnemy,
(currentEncounter->hitType == 3)) &&
(is_ability_active(ABILITY_SPIN_ATTACK)) &&
playerData->level >= enemy->npcSettings->level &&
!(enemy->flags & ENEMY_FLAGS_40) &&
currentEncounter->unk_12 == 0
))
{
currentEncounter->battleStartCountdown = 10;
D_80077C40 = 1;
currentEncounter->unk_94 = 0;
D_8009A5D0 = 2;
return;
}
if (currentEncounter->songID < 0) {
switch (currentEncounter->eFirstStrike) {
case 0:
bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_NONE);
break;
case 1:
bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_PLAYER);
break;
case 2:
bgm_set_battle_song(SONG_NORMAL_BATTLE, FIRST_STRIKE_ENEMY);
break;
}
} else {
bgm_set_battle_song(currentEncounter->songID, FIRST_STRIKE_NONE);
}
bgm_push_battle_song();
D_8009A654 = 1;
currentEncounter->battleStartCountdown = 10;
D_8009A5D0 = 1;
case 1:
if (currentEncounter->fadeOutAmount == 255) {
if (currentEncounter->battleStartCountdown != 0) {
currentEncounter->battleStartCountdown--;
break;
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy != NULL &&
((!(enemy->flags & NPC_FLAG_ENABLE_HIT_SCRIPT) || enemy == currentEncounter->currentEnemy)) &&
!(enemy->flags & NPC_FLAG_NO_AI) &&
enemy->hitScript != NULL)
{
kill_script_by_ID(enemy->hitScriptID);
enemy->hitScript = NULL;
}
}
partner_handle_before_battle();
currentEncounter->unk_A0 = 0;
currentEncounter->unk_A2 = 0;
enemy = currentEncounter->currentEnemy;
currentEncounter->unk_10 = enemy->unk_B5;
if (is_ability_active(ABILITY_DIZZY_ATTACK) && currentEncounter->hitType == 3) {
currentEncounter->unk_A0 = 4;
currentEncounter->unk_A2 = 3;
}
sfx_stop_sound(SOUND_2111);
sfx_stop_sound(SOUND_2112);
sfx_stop_sound(SOUND_2113);
sfx_stop_sound(SOUND_2114);
set_battle_formation(0);
set_battle_stage(encounter->stage);
load_battle(encounter->battle);
currentEncounter->unk_07 = 1;
currentEncounter->unk_08 = 0;
currentEncounter->merleeCoinBonus = 0;
currentEncounter->damageTaken = 0;
currentEncounter->coinsEarned = 0;
currentEncounter->fadeOutAccel = 0;
currentEncounter->fadeOutAmount = 255;
set_screen_overlay_params_front(0, 255.0f);
gGameState = 5;
D_8009A678 = 1;
D_8009A5D0 = 0;
}
break;
case 2:
if (currentEncounter->battleStartCountdown != 0) {
currentEncounter->battleStartCountdown--;
break;
}
encounter = currentEncounter->currentEncounter;
for (i = 0; i < encounter->count; i++) {
enemy = encounter->enemy[i];
if (enemy != NULL &&
(!(enemy->flags & NPC_FLAG_ENABLE_HIT_SCRIPT) || enemy == currentEncounter->currentEnemy) &&
!(enemy->flags & NPC_FLAG_NO_AI) &&
(enemy->hitScript != 0))
{
kill_script_by_ID(enemy->hitScriptID);
enemy->hitScript = NULL;
}
}
currentEncounter->unk_08 = 1;
currentEncounter->unk_07 = 1;
currentEncounter->battleOutcome = 0;
currentEncounter->merleeCoinBonus = 0;
currentEncounter->damageTaken = 0;
gGameState = 5;
currentEncounter->coinsEarned = 0;
currentEncounter->fadeOutAccel = 0;
currentEncounter->fadeOutAmount = 0;
D_8009A678 = 1;
D_8009A5D0 = 0;
break;
case 3:
currentEncounter->battleOutcome = 4;
currentEncounter->unk_08 = 1;
currentEncounter->fadeOutAmount = 0;
currentEncounter->fadeOutAccel = 0;
gGameState = 5;
D_8009A678 = 1;
D_8009A5D0 = 0;
break;
}
}
void draw_encounters_pre_battle(void) {
EncounterStatus* encounter = &gCurrentEncounter;
@ -398,16 +605,14 @@ void show_first_strike_message(void) {
INCLUDE_ASM(s32, "1a1f0_len_5390", update_encounters_post_battle);
s32 draw_encounters_post_battle(void) {
void draw_encounters_post_battle(void) {
EncounterStatus* currentEncounter = &gCurrentEncounter;
s32 ret = currentEncounter->fadeOutAccel;
if (ret != 0) {
set_screen_overlay_params_front(0, currentEncounter->fadeOutAmount);
ret = set_screen_overlay_color(0, 0, 0, 0);
set_screen_overlay_color(0, 0, 0, 0);
}
return ret;
}
void update_encounters_conversation(void) {
@ -493,7 +698,7 @@ s8 check_conversation_trigger(void) {
s32 i, j;
playerStatus->unk_C8 = NULL;
playerStatus->flags &= ~0x2000000;
playerStatus->flags &= ~PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
playerColliderHeight = playerStatus->colliderHeight;
playerColliderRadius = playerStatus->colliderDiameter / 2;
playerX = playerStatus->position.x;
@ -592,7 +797,7 @@ s8 check_conversation_trigger(void) {
if (!(playerStatus->animFlags & PLAYER_STATUS_ANIM_FLAGS_8BIT_MARIO) && npc != NULL && !is_picking_up_item()) {
playerStatus->unk_C8 = npc;
playerStatus->flags |= 0x2000000;
playerStatus->flags |= PLAYER_STATUS_FLAGS_HAS_CONVERSATION_NPC;
if (playerStatus->pressedButtons & BUTTON_A) {
close_status_menu();
gCurrentEncounter.hitType = ENCOUNTER_TRIGGER_CONVERSATION;

View File

@ -366,8 +366,8 @@ void func_800559E0(void) {
func_8004DA74();
}
void func_800559FC(void) {
snd_is_song_playing();
s32 func_800559FC(void) {
return snd_is_song_playing();
}
INCLUDE_ASM(s32, "30450", snd_set_song_variation_fade);

View File

@ -25,7 +25,6 @@ INCLUDE_ASM(s32, "C50A0", draw_image_with_clipping);
INCLUDE_ASM(s32, "C50A0", draw_tiled_image);
s32 integer_log(s32 number, u32 base) {
f64 temp_f0;
f32 fNumber = number;
s32 ret = 1;

View File

@ -19,21 +19,22 @@ extern SoundInstance* D_80159AD0;
void snd_start_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
void snd_adjust_sound_with_shift(s32 soundID, u8 volume, u8 pan, s16 pitchShift);
s32 D_8014F2D0[] = { 0x00000287, 0x000002A8, 0x00000054, 0x00000056, 0x00000024, 0x00000027, 0x00000021, 0x00000022,
0x00000349, 0x00000273, 0x00000275, 0x00000275, 0x00000274, 0x00000273, 0x00000274, 0x00000099,
0x0000009E, 0x0000032E, 0x0000008E, 0x00000089, 0x00000083, 0x00000388, 0x000000A0, 0x0000004A,
0x0000009F, 0x00000168, 0x00000185, 0x00000052, 0x0000004E, 0x0000004F, 0x00000189, 0x00000000,
0x00000000, 0x00000198, 0x00000199, 0x00000194, 0x0000019A, 0x00000091, 0x00000164, 0x00000271,
0x00000271, 0x00000274, 0x00000275, 0x00000271, 0x00000273, 0x00000271, 0x00000273, 0x00000271,
0x00000274, 0x00000275, 0x00000276, 0x00000271, 0x00000273, 0x00000271, 0x00000274, 0x00000276,
0x00000275, 0x00000271, 0x00000271, 0x00000271, 0x00000271, 0x00000276, 0x00000275, 0x00000274,
0x0000039E, 0x00000341, 0x00000207, 0x00000271, 0x00000271, 0x00000275, 0x00000276, 0x00000271,
0x00000271, 0x00000271, 0x00000050, 0x00000070, 0x0000036C, 0x0000036D, 0x00000295, 0x00000043,
0x00000197, 0x00000221, 0x0000022A, 0x0000022B, 0x00002040, 0x00000046, 0x00000033, 0x00000034,
0x00000039, 0x0000004C, 0x0000004D, 0x000001B1, 0x000001B2, 0x00000094, 0x0000005D, 0x0000005B,
0x00000060, 0x000001B3, 0x00000000, 0x000000AD, 0x000000AE, 0x000000AF, 0x0000023D, 0x000000A2,
0x00000248, 0x00000249, 0x00000391, 0x000003BC, 0x000003AD, 0x0000022C, 0x0000022D,
};
// sound IDs
s32 D_8014F2D0[] = {
0x00000287, 0x000002A8, 0x00000054, 0x00000056, 0x00000024, 0x00000027, 0x00000021, 0x00000022, 0x00000349,
0x00000273, 0x00000275, 0x00000275, 0x00000274, 0x00000273, 0x00000274, 0x00000099, 0x0000009E, 0x0000032E,
0x0000008E, 0x00000089, 0x00000083, 0x00000388, 0x000000A0, 0x0000004A, 0x0000009F, 0x00000168, 0x00000185,
0x00000052, 0x0000004E, 0x0000004F, 0x00000189, 0x00000000, 0x00000000, 0x00000198, 0x00000199, 0x00000194,
0x0000019A, 0x00000091, 0x00000164, 0x00000271, 0x00000271, 0x00000274, 0x00000275, 0x00000271, 0x00000273,
0x00000271, 0x00000273, 0x00000271, 0x00000274, 0x00000275, 0x00000276, 0x00000271, 0x00000273, 0x00000271,
0x00000274, 0x00000276, 0x00000275, 0x00000271, 0x00000271, 0x00000271, 0x00000271, 0x00000276, 0x00000275,
0x00000274, 0x0000039E, 0x00000341, 0x00000207, 0x00000271, 0x00000271, 0x00000275, 0x00000276, 0x00000271,
0x00000271, 0x00000271, 0x00000050, 0x00000070, 0x0000036C, 0x0000036D, 0x00000295, 0x00000043, 0x00000197,
0x00000221, 0x0000022A, 0x0000022B, 0x00002040, 0x00000046, 0x00000033, 0x00000034, 0x00000039, 0x0000004C,
0x0000004D, 0x000001B1, 0x000001B2, 0x00000094, 0x0000005D, 0x0000005B, 0x00000060, 0x000001B3, 0x00000000,
0x000000AD, 0x000000AE, 0x000000AF, 0x0000023D, 0x000000A2, 0x00000248, 0x00000249, 0x00000391, 0x000003BC,
0x000003AD, 0x0000022C, 0x0000022D,
};
s32 D_8014F48C[] = { 0x00000336, 0x00000316 };
s32 D_8014F494[] = { 0x00000337, 0x00000317 };
@ -168,12 +169,10 @@ AlternatingSoundSet D_8014F5A4[] = {
{
.sounds = D_8014F540,
.soundCount = ARRAY_COUNT(D_8014F540),
},
{
.sounds = D_8014F548,
.soundCount = ARRAY_COUNT(D_8014F548),
},
{
.sounds = D_8014F554,
@ -217,9 +216,22 @@ AlternatingSoundSet D_8014F5A4[] = {
}
};
s32 D_8014F6B4[] = { 0x000001C1, 0x000001C2, 0x000001C3, 0x000001C4, 0x000001C5, 0x000001C6, 0x000001C7, 0x000001C8,
0x000001C9, 0x000001CA, 0x000001CB, 0x000001CC, 0x000020A3, 0x000020A4, 0x00000000,
};
s32 D_8014F6B4[] = {
SOUND_BASIC_DOOR_OPEN,
SOUND_BASIC_DOOR_CLOSE,
SOUND_METAL_DOOR_OPEN,
SOUND_METAL_DOOR_CLOSE,
SOUND_LARGE_DOOR_OPEN,
SOUND_LARGE_DOOR_CLOSE,
SOUND_CREAKY_DOOR_OPEN,
SOUND_CREAKY_DOOR_CLOSE,
SOUND_METAL_GATE_OPEN,
SOUND_METAL_GATE_CLOSE,
SOUND_1CB,
SOUND_1CC,
SOUND_20A3,
SOUND_20A4,
};
extern s32 D_80159AD4;
@ -452,8 +464,21 @@ void sfx_play_sound_at_npc(s32 soundID, s32 arg1, s32 npcID) {
}
}
INCLUDE_ASM(s32, "DF950", sfx_play_sound_at_position, s32 soundID, s32 value2, f32 posX, f32 posY,
f32 posZ);
void sfx_play_sound_at_position(s32 soundID, s32 flags, f32 posX, f32 posY, f32 posZ) {
if ((soundID & 0xF0000000) == 0x80000000) {
s32 id = D_8014F2D0[soundID & 0xFFFF];
sfx_register_looping_sound_at_position(id, flags, posX, posY, posZ);
} else {
s16 volume;
s16 pan;
sfx_get_spatialized_sound_params(posX, posY, posZ, &volume, &pan, flags);
if (volume >= 0) {
sfx_play_sound_with_params(soundID, volume, pan, 0);
}
}
}
INCLUDE_ASM(void, "DF950", sfx_get_spatialized_sound_params, f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4,
s32 arg5);

View File

@ -161,7 +161,7 @@ void func_802B735C_E2290C(void) {
case 2:
temp_a0->scale = 0.57f;
temp_a0->unk_24 += 1;
sfx_play_sound_at_player(SOUND_UNKNOWN_17B, 0);
sfx_play_sound_at_player(SOUND_17B, 0);
break;
case 3:
temp_a0->scale = 0.53f;

View File

@ -40,7 +40,7 @@ ApiStatus func_8024046C_EE6A1C(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = evt_get_variable(script, *args++);
script->functionTemp[1] = evt_get_variable(script, *args++);
script->functionTemp[2] = evt_get_variable(script, *args++);
sfx_adjust_env_sound_pos(SOUND_UNKNOWN_194, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]);
sfx_adjust_env_sound_pos(SOUND_194, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]);
return ApiStatus_DONE2;
}

View File

@ -943,11 +943,6 @@ s32 D_8014C188[] = { 0xFFFE7960, 0x000F4240, 0x000F4240, 0x000F4240, 0x00000000,
s8 D_8014C248[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, };
// TODO BSS to sort out
extern ModelNode** gCurrentModelTreeRoot;
extern ModelTransformGroupList wTransformGroups;
extern ModelTransformGroupList bTransformGroups;
// BSS
static s32 B_801512B0[2];
static ModelCustomGfxBuilderList* gCurrentCustomModelGfxBuildersPtr;
@ -957,6 +952,7 @@ static s32 gEntityHeapBase;
static s32 D_801512C8;
BSS ModelList* gCurrentModels;
static s32 D_801512D0[4];
extern ModelNode** gCurrentModelTreeRoot;
static ModelTransformGroupList* gCurrentTransformGroups;
static s8 gMsgGlobalWaveCounter[0x4];
static ModelCustomGfxList* gCurrentCustomModelGfxPtr;
@ -964,6 +960,9 @@ static s32 gLastCreatedEntityIndex;
static s8 B_801512F0[0x410];
static GameMode gMainGameState[2]; // TODO rename
extern s32 D_80151300;
extern s32 D_80151324;
extern s32 D_8015132C;
extern s32 D_80151330;
@ -974,11 +973,16 @@ extern s32 bStaticEntityDataSize;
extern StaticEntityData* wStaticEntityData[30];
extern StaticEntityData* bStaticEntityData[4];
extern s32* D_801516F4;
extern TileDescriptor gCurrentTileDescriptor;
extern ModelList wModelList;
extern ModelList bModelList;
extern ModelTransformGroupList wTransformGroups;
extern ModelTransformGroupList bTransformGroups;
extern ModelCustomGfxList wModelSpecialDls;
extern ModelCustomGfxList bModelSpecialDls;
@ -1017,6 +1021,8 @@ extern s8 D_8015A578;
extern TextureHandle mdl_textureHandles[128];
extern RenderTask mdl_clearRenderTasks[3][0x100];
extern s32 D_801A7000; // todo ???
void update_shadows(void);
s32 step_entity_commandlist(Entity* entity);
void render_shadows(void);
@ -1414,11 +1420,65 @@ void render_shadows(void) {
}
}
INCLUDE_ASM(void, "a5dd0_len_114e0", update_entity_transform_matrix, Entity* entity);
void update_entity_transform_matrix(Entity* entity) {
Matrix4f sp18;
Matrix4f sp58;
Matrix4f sp98;
Matrix4f spD8;
Matrix4f sp118;
Matrix4f sp158;
Matrix4f sp198;
INCLUDE_ASM(void, "a5dd0_len_114e0", update_shadow_transform_matrix, Shadow* shadow);
if (entity->updateMatrixOverride != NULL) {
entity->updateMatrixOverride(entity);
return;
}
INCLUDE_ASM(void, "a5dd0_len_114e0", update_entity_inverse_rotation_matrix, Entity* entity);
guTranslateF(sp58, entity->position.x, entity->position.y, entity->position.z);
guRotateF(spD8, entity->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(sp118, entity->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(sp158, entity->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(sp158, spD8, sp18);
guMtxCatF(sp18, sp118, sp98);
guScaleF(sp198, entity->scale.x, entity->scale.y, entity->scale.z);
guMtxCatF(sp198, sp98, sp18);
guMtxCatF(sp18, sp58, sp98);
guMtxF2L(sp98, &entity->transformMatrix);
}
void update_shadow_transform_matrix(Shadow* shadow) {
Matrix4f sp18;
Matrix4f sp58;
Matrix4f sp98;
Matrix4f spD8;
Matrix4f sp118;
Matrix4f sp158;
Matrix4f sp198;
guTranslateF(sp58, shadow->position.x, shadow->position.y, shadow->position.z);
guRotateF(sp118, shadow->rotation.x, 1.0f, 0.0f, 0.0f);
guRotateF(spD8, shadow->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(sp158, shadow->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(sp158, sp118, sp98);
guMtxCatF(spD8, sp98, sp98);
guScaleF(sp198, shadow->scale.x, shadow->scale.y, shadow->scale.z);
guMtxCatF(sp198, sp98, sp18);
guMtxCatF(sp18, sp58, sp98);
guMtxF2L(sp98, &shadow->transformMatrix);
}
void update_entity_inverse_rotation_matrix(Entity* entity) {
Matrix4f sp18;
Matrix4f sp58;
guRotateF(sp18, -entity->rotation.y, 0.0f, 1.0f, 0.0f);
guRotateF(sp58, -entity->rotation.z, 0.0f, 0.0f, 1.0f);
guMtxCatF(sp18, sp58, sp18);
guRotateF(sp58, -entity->rotation.x, 1.0f, 0.0f, 0.0f);
guMtxCatF(sp18, sp58, entity->inverseTransformMatrix);
entity->effectiveSize = sqrtf(((SQ(entity->aabb.x) + SQ(entity->aabb.z)) * 0.25f) + SQ(entity->aabb.y));
}
Entity* get_entity_by_index(s32 index) {
return (*gCurrentEntityListPtr)[index & 0xFFF];
@ -1569,28 +1629,28 @@ s32 entity_get_collision_flags(Entity* entity) {
INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_interacts_with_current_partner);
// float bs
#ifdef NON_EQUIVALENT
s32 test_player_entity_aabb(Entity* entity) {
f32 temp_f4;
f32 colliderDiameter;
f32 yTemp = entity->position.y - (gPlayerStatus.position.y + gPlayerStatus.colliderHeight);
f32 xCollRadius;
f32 zCollRadius;
f32 xDist;
f32 zDist;
temp_f4 = entity->position.y - (gPlayerStatus.position.y + gPlayerStatus.colliderHeight);
if (temp_f4 > 0.0f || gPlayerStatus.colliderHeight + entity->aabb.y < fabsf(temp_f4)) {
if (yTemp > 0.0f || gPlayerStatus.colliderHeight + entity->aabb.y < fabsf(yTemp)) {
return 0;
}
if ((gPlayerStatus.colliderDiameter + entity->aabb.x) * 0.5 < fabsf(gPlayerStatus.position.x - entity->position.x)) {
return 0;
}
if ((gPlayerStatus.colliderDiameter + entity->aabb.z) * 0.5 < fabsf(gPlayerStatus.position.z - entity->position.z)) {
xCollRadius = (gPlayerStatus.colliderDiameter + entity->aabb.x) * 0.5;
xDist = fabsf(gPlayerStatus.position.x - entity->position.x);
zCollRadius = ((gPlayerStatus.colliderDiameter + entity->aabb.z) * 0.5);
zDist = fabsf(gPlayerStatus.position.z - entity->position.z);
if (xCollRadius < xDist || zCollRadius < zDist) {
return 0;
}
return 1;
}
#else
INCLUDE_ASM(s32, "a5dd0_len_114e0", test_player_entity_aabb);
#endif
s32 is_player_action_state(s8 actionState) {
return actionState == gPlayerActionState;
@ -1629,10 +1689,29 @@ void load_area_specific_entity_data(void) {
INCLUDE_ASM(s32, "a5dd0_len_114e0", clear_entity_data);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80110E58);
void func_80110E58(void) {
if (!gGameStatusPtr->isBattle) {
D_80151300 = 0x80250000;
gEntityHeapBase = 0x80267FF0;
func_80110F10();
} else {
s32 i;
for (i = 0; i < 4; i++) {
bStaticEntityData[i] = 0;
}
D_80151300 = &D_801A7000;
gEntityHeapBase = D_80151300 + 0x3000;
}
gCurrentEntityListPtr = get_entity_list();
gCurrentShadowListPtr = get_shadow_list();
D_801512C0 = 0;
D_80151324 = 0;
}
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80110F10);
void entity_anim_make_vertex_pointers(StaticEntityData* entityData, void* baseAddr, Vtx* baseVtx);
INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_anim_make_vertex_pointers);
s32 is_entity_data_loaded(Entity* entity, StaticEntityData* entityData, s32* loadedStart, s32* loadedEnd);
@ -2364,7 +2443,27 @@ ModelNodeProperty* get_model_property(ModelNode* node, ModelPropertyKeys key) {
return NULL;
}
INCLUDE_ASM(s32, "a5dd0_len_114e0", _load_model_textures);
void _load_model_textures(ModelNode* model, s32 romOffset, s32 size) {
if (model->type != 2) {
if (model->groupData != NULL) {
s32 numChildren = model->groupData->numChildren;
if (numChildren != 0) {
s32 i;
for (i = 0; i < numChildren; i++) {
_load_model_textures(model->groupData->childList[i], romOffset, size);
}
}
}
} else {
char* textureName = (char*)get_model_property(model, MODEL_PROP_KEY_TEXTURE_NAME);
if (textureName != NULL) {
load_tile_header(textureName, romOffset, size);
}
}
mdl_treeIterPos++;
}
void load_model_textures(ModelNode* model, s32 romOffset, s32 size) {
s32 battleOffset = ((gGameStatusPtr->isBattle != 0) << 17);
@ -2380,7 +2479,7 @@ void load_model_textures(ModelNode* model, s32 romOffset, s32 size) {
mdl_treeIterPos = 0;
if (model != NULL) {
_load_model_textures();
_load_model_textures(model, romOffset, size);
}
}
}
@ -2531,8 +2630,19 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80116698);
INCLUDE_ASM(s32, "a5dd0_len_114e0", render_models);
void appendGfx_model_group(Model* model);
INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model_group, Model*);
void appendGfx_model_group(Model* model) {
s32 modelTreeDepth = (*mdl_currentModelTreeNodeInfo)[model->modelID].treeDepth;
s32 i;
for (i = model->modelID - 1; i >= 0; i--) {
if (modelTreeDepth >= (*mdl_currentModelTreeNodeInfo)[i].treeDepth) {
break;
}
}
mdl_treeIterPos = i + 1;
func_80117D00(model);
}
void func_80117D00(Model* model) {
Model* mdl = model; // temps needed to match
@ -3140,7 +3250,59 @@ void get_model_env_color_parameters(u8* primR, u8* primG, u8* primB, u8* envR, u
*envB = gRenderModelEnvB;
}
INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_get_vertex_count);
void mdl_get_vertex_count(Gfx* gfx, s32* numVertices, s32* baseVtx, s32* gfxCount, Vtx* baseAddr) {
s8 stuff[2];
s32 temp_t0_2;
u32 w0, w1;
u32 cmd;
u32 temp_v1;
s32 minVtx;
s32 maxVtx;
u32 phi_v1;
minVtx = 0;
maxVtx = 0;
if (gfx == NULL) {
*numVertices = maxVtx;
*baseVtx = minVtx;
} else {
Gfx* baseGfx = gfx;
do {
w0 = gfx->words.w0;
w1 = gfx->words.w1;
cmd = w0 >> 0x18;
if (cmd == G_DL_NOPUSH) {
phi_v1 = w1;
if (baseAddr != NULL) {
phi_v1 = (phi_v1 & 0xFFFF) + (s32)baseAddr;
}
temp_t0_2 = (w0 >> 0xC) & 0xFF;
if (minVtx == 0) {
minVtx = phi_v1;
maxVtx = phi_v1 + (temp_t0_2 * 0x10);
}
temp_v1 = phi_v1 + (temp_t0_2 * 0x10);
if (maxVtx < temp_v1) {
maxVtx = temp_v1;
}
if (minVtx > temp_v1) {
minVtx = temp_v1;
}
}
gfx++;
} while (cmd != G_ENDDL);
*numVertices = (maxVtx - minVtx) >> 4;
*baseVtx = minVtx;
*gfxCount = gfx - baseGfx;
w1 = gfx->words.w1; // TODO required to match
}
}
INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_local_gfx_update_vtx_pointers);

View File

@ -5,7 +5,7 @@ EvtSource N(UseItemWithEffect) = {
EVT_IF_EQ(EVT_VAR(1), 0)
EVT_CALL(UseBattleCamPreset, 69)
EVT_WAIT_FRAMES(10)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_208D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208D)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(0), 18)
@ -26,7 +26,7 @@ EvtSource N(UseItemWithEffect) = {
EVT_CALL(RemoveItemEntity, EVT_VAR(10))
EVT_ELSE
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_208D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208D)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_GOT_ITEM)
EVT_WAIT_FRAMES(4)
EVT_ADD(EVT_VAR(1), 45)
@ -79,7 +79,7 @@ EvtSource N(PlayerGoHome) = {
EvtSource N(EatItem) = {
EVT_THREAD
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_2095)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2095)
EVT_WAIT_FRAMES(10)
EVT_END_LOOP
EVT_END_THREAD
@ -92,7 +92,7 @@ EvtSource N(EatItem) = {
EvtSource N(DrinkItem) = {
EVT_THREAD
EVT_LOOP(4)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_2095)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2095)
EVT_WAIT_FRAMES(10)
EVT_END_LOOP
EVT_END_THREAD

View File

@ -91,7 +91,7 @@ EvtSource N(main) = {
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(1), 20)
EVT_CALL(PlayEffect, 0x57, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_FIXED(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySound, SOUND_UNKNOWN_379)
EVT_CALL(PlaySound, SOUND_379)
EVT_CALL(GetItemPower, ITEM_VOLT_SHROOM, EVT_VAR(0), EVT_VAR(1))
EVT_CALL(N(func_802A123C_7307DC))
EVT_WAIT_FRAMES(40)

View File

@ -38,7 +38,7 @@ EvtSource N(main) = {
EVT_SET_CONST(EVT_VAR(10), 0x00000080)
EVT_EXEC_WAIT(N(UseItemWithEffect))
EVT_CALL(N(FadeBackgroundToBlack))
EVT_CALL(PlaySound, SOUND_UNKNOWN_377)
EVT_CALL(PlaySound, SOUND_377)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_PLANT)
EVT_THREAD
EVT_WAIT_FRAMES(50)
@ -66,9 +66,9 @@ EvtSource N(main) = {
EVT_WAIT_FRAMES(25)
EVT_LOOP(12)
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySound, SOUND_UNKNOWN_202C)
EVT_CALL(PlaySound, SOUND_202C)
EVT_WAIT_FRAMES(2)
EVT_CALL(PlaySound, SOUND_UNKNOWN_202D)
EVT_CALL(PlaySound, SOUND_202D)
EVT_WAIT_FRAMES(1)
EVT_END_LOOP
EVT_END_THREAD

View File

@ -32,7 +32,7 @@ EvtSource N(main) = {
EVT_CALL(MoveBattleCamOver, 50)
EVT_END_THREAD
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_CROUCH)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_367)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_367)
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(0), -40)
EVT_ADD(EVT_VAR(1), 5)

View File

@ -51,7 +51,7 @@ EvtSource N(main) = {
EVT_CALL(UseBattleCamPreset, 13)
EVT_CALL(BattleCamTargetActor, ACTOR_SELF)
EVT_CALL(MoveBattleCamOver, 20)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_369)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_369)
EVT_THREAD
EVT_LOOP(2)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.0), EVT_FIXED(1.0), EVT_FIXED(1.0))
@ -89,7 +89,7 @@ EvtSource N(main) = {
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(1.4), EVT_FIXED(0.8), EVT_FIXED(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_208E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_208E)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(0.9), EVT_FIXED(1.3), EVT_FIXED(1.0))
EVT_WAIT_FRAMES(1)
EVT_CALL(SetActorScale, ACTOR_SELF, EVT_FIXED(0.9), EVT_FIXED(1.2), EVT_FIXED(1.0))
@ -101,7 +101,7 @@ EvtSource N(main) = {
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
EVT_END_THREAD
EVT_LOOP(10)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_369)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_369)
EVT_CALL(PlayEffect, 0x6, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlayEffect, 0x6, 1, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0)
EVT_WAIT_FRAMES(4)

View File

@ -278,9 +278,9 @@ EvtSource N(main) = {
EVT_EXEC_WAIT(N(UseItemWithEffect))
EVT_THREAD
EVT_WAIT_FRAMES(220)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_3F3)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_3F3)
EVT_END_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_368)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_368)
EVT_CALL(N(func_802A13E4_72C994))
EVT_WAIT_FRAMES(2)
EVT_IF_NE(EVT_VAR(0), 133)

View File

@ -76,7 +76,7 @@ EvtSource N(main) = {
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(6.0))
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(5.0))
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(4.0))
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_2030)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2030)
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(3.0))
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(2.0))
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(1.0))

View File

@ -19,14 +19,14 @@ ApiStatus N(func_802A123C_72DDAC)(Evt* script, s32 isInitialCall) {
EvtSource N(main) = {
EVT_SET_CONST(EVT_VAR(10), 0x00000097)
EVT_EXEC_WAIT(N(UseItemWithEffect))
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_375)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_375)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_30008)
EVT_WAIT_FRAMES(45)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_10002)
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_ADD(EVT_VAR(1), 20)
EVT_CALL(PlayEffect, 0x33, 3, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_FIXED(1.0), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_376)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_376)
EVT_CALL(GetItemPower, ITEM_REPEL_GEL, EVT_VAR(0), EVT_VAR(1))
EVT_CALL(N(func_802A123C_72DDAC))
EVT_WAIT_FRAMES(20)

View File

@ -105,11 +105,11 @@ EvtSource N(main) = {
EVT_THREAD
EVT_SET(EVT_VAR(0), 0)
EVT_LOOP(10)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_259)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_259)
EVT_CALL(N(func_802A123C_71D9AC))
EVT_ADD(EVT_VAR(0), 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_25A)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_25A)
EVT_CALL(N(func_802A123C_71D9AC))
EVT_ADD(EVT_VAR(0), 1)
EVT_WAIT_FRAMES(5)
@ -119,10 +119,10 @@ EvtSource N(main) = {
EVT_SET(EVT_VAR(0), 0)
EVT_WAIT_FRAMES(50)
EVT_LOOP(10)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_25C)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_25C)
EVT_ADD(EVT_VAR(0), 1)
EVT_WAIT_FRAMES(5)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_25D)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_25D)
EVT_ADD(EVT_VAR(0), 1)
EVT_WAIT_FRAMES(5)
EVT_END_LOOP

View File

@ -344,7 +344,7 @@ EvtSource N(main) = {
EVT_CALL(SetBattleCamZoom, 169)
EVT_CALL(MoveBattleCamOver, 50)
EVT_THREAD
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_364)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_364)
EVT_LOOP(7)
EVT_CALL(StartRumble, 2)
EVT_CALL(ShakeCam, 1, 0, 2, EVT_FIXED(0.5))

View File

@ -39,7 +39,7 @@ EvtSource N(main) = {
EVT_SET_CONST(EVT_VAR(10), 0x00000081)
EVT_EXEC_WAIT(N(UseItemWithEffect))
EVT_CALL(N(FadeBackgroundToBlack))
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_363)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_363)
EVT_THREAD
EVT_LOOP(45)
EVT_CALL(RandInt, 300, EVT_VAR(0))
@ -58,19 +58,19 @@ EvtSource N(main) = {
EVT_CALL(PlayEffect, 0x60, 0, 0, 0, 20, EVT_FIXED(1.0), 160, 0, 0, 0, 0, 0, 0, 0)
EVT_THREAD
EVT_WAIT_FRAMES(17)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_202E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_202E)
EVT_CALL(StartRumble, 9)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FIXED(1.0))
EVT_WAIT_FRAMES(46)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_202E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_202E)
EVT_CALL(StartRumble, 9)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FIXED(1.0))
EVT_WAIT_FRAMES(25)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_202E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_202E)
EVT_CALL(StartRumble, 9)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FIXED(1.0))
EVT_WAIT_FRAMES(25)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_202E)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_202E)
EVT_CALL(StartRumble, 9)
EVT_CALL(ShakeCam, 1, 0, 5, EVT_FIXED(1.0))
EVT_END_THREAD

View File

@ -50,12 +50,12 @@ ApiStatus N(func_802A123C_7217DC)(Evt* script, s32 isInitialCall) {
EvtSource N(main) = {
EVT_SET_CONST(EVT_VAR(10), 0x00000088)
EVT_EXEC_WAIT(N(UseItemWithEffect))
EVT_CALL(PlaySound, SOUND_UNKNOWN_361)
EVT_CALL(PlaySound, SOUND_361)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_30009)
EVT_WAIT_FRAMES(30)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_CROUCH)
EVT_CALL(GetItemPower, ITEM_STONE_CAP, EVT_VAR(0), EVT_VAR(1))
EVT_CALL(PlaySound, SOUND_UNKNOWN_362)
EVT_CALL(PlaySound, SOUND_362)
EVT_CALL(N(func_802A123C_7217DC))
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_WAIT_FRAMES(20)

View File

@ -32,7 +32,7 @@ EvtSource N(main) = {
EVT_END_THREAD
EVT_CALL(N(FadeBackgroundToBlack))
EVT_CALL(PlayEffect, 0x62, 0, 0, 0, 0, EVT_FIXED(1.0), 200, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_246)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_246)
EVT_WAIT_FRAMES(200)
EVT_CALL(UseBattleCamPreset, 3)
EVT_CALL(MoveBattleCamOver, 20)

View File

@ -167,7 +167,7 @@ EvtSource N(main) = {
EVT_CALL(InitTargetIterator)
EVT_CALL(GetOwnerTarget, EVT_VAR(0), EVT_VAR(1))
EVT_IF_EQ(EVT_VAR(0), 0)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_UNKNOWN_2095)
EVT_CALL(PlaySoundAtActor, ACTOR_PLAYER, SOUND_2095)
EVT_CALL(SetAnimation, ACTOR_PLAYER, 0, ANIM_DRINK)
EVT_WAIT_FRAMES(45)
EVT_CALL(GetActorPos, ACTOR_PLAYER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))

View File

@ -60,7 +60,7 @@ EvtSource N(main) = {
EVT_CALL(MoveBattleCamOver, 20)
EVT_END_CHILD_THREAD
EVT_CALL(N(FadeBackgroundToBlack))
EVT_CALL(PlaySound, SOUND_UNKNOWN_365)
EVT_CALL(PlaySound, SOUND_365)
EVT_WAIT_FRAMES(10)
EVT_CALL(InitTargetIterator)
EVT_LABEL(0)

View File

@ -25,7 +25,7 @@ EvtSource N(main) = {
EVT_SETF(EVT_VAR(3), EVT_FIXED(1.0))
EVT_CALL(MultiplyByActorScale, EVT_VAR(3))
EVT_CALL(PlayEffect, 0x57, 0, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2), EVT_VAR(3), 30, 0, 0, 0, 0, 0, 0, 0)
EVT_CALL(PlaySound, SOUND_UNKNOWN_379)
EVT_CALL(PlaySound, SOUND_379)
EVT_CALL(GetItemPower, ITEM_VOLT_SHROOM, EVT_VAR(0), EVT_VAR(1))
EVT_CALL(N(func_802A123C_71AA2C))
EVT_WAIT_FRAMES(20)

View File

@ -1,34 +1,367 @@
#include "common.h"
#include "overlay.h"
INCLUDE_ASM(void, "cd180_len_38f0", _render_transition_stencil, s32 arg0, f32 arg1, s32 arg2);
// BSS
extern s32 screen_overlay_frontType;
extern f32 screen_overlay_frontZoom;
extern s32 screen_overlay_backType;
extern f32 screen_overlay_backZoom;
extern s32 D_80156910;
extern ScreenOverlay D_8015C790[2];
INCLUDE_ASM(void, "cd180_len_38f0", set_screen_overlay_params_front, u8 arg0, f32 arg1);
s32 D_8014C6F0 = 2;
INCLUDE_ASM(void, "cd180_len_38f0", set_screen_overlay_params_back, s32 arg0, f32 arg1);
// padding?
s32 D_8014C6F4[] = { 0x00000000, 0x00000000, 0x00000000, };
INCLUDE_ASM(void, "cd180_len_38f0", get_screen_overlay_params, s32 arg0, f32* arg1, f32* arg2);
#include "ui/star_silhouette.png.inc.c"
INCLUDE_ASM(s32, "cd180_len_38f0", set_screen_overlay_color, s32 arg0, u8 arg1, u8 arg2, u8 arg3);
#include "ui/mario_head_silhouette.png.inc.c"
INCLUDE_ASM(void, "cd180_len_38f0", set_screen_overlay_center, s32 arg0, s32 arg1, s32 arg2, s32 arg3);
#include "ui/quarter_circle_silhouette.png.inc.c"
INCLUDE_ASM(s32, "cd180_len_38f0", set_screen_overlay_center_worldpos);
#include "ui/flame_thing_silhouette.png.inc.c"
INCLUDE_ASM(void, "cd180_len_38f0", set_screen_overlay_alpha, s32 arg0, f32 arg1);
s32 D_8014E500[] = { 0xFF8000A9, 0x00000000, 0x00000000, 0xFFFFFF00, 0xFF34FFBB, 0x00000000, 0x00000000, 0xFFFFFF00, 0x0000FF24, 0x00000000, 0x00000000, 0xFFFFFF00, 0x008000A9, 0x00000000, 0x00000000, 0xFFFFFF00, 0xFE88007B, 0x00000000, 0x00000000, 0xFFFFFF00, 0x0000018B, 0x00000000, 0x00000000, 0xFFFFFF00, 0xFF17FEC0, 0x00000000, 0x00000000, 0xFFFFFF00, 0x00CCFFBB, 0x00000000, 0x00000000, 0xFFFFFF00, 0x00E8FEC0, 0x00000000, 0x00000000, 0xFFFFFF00, 0x0178007A, 0x00000000, 0x00000000, 0xFFFFFF00, };
INCLUDE_ASM(s32, "cd180_len_38f0", clear_screen_overlays);
s32 D_8014E5A0[] = { 0xD7000002, 0xFFFFFFFF, 0xE7000000, 0x00000000, 0xE3000A01, 0x00000000, 0xE3000D01, 0x00000000, 0xE3000F00, 0x00000000, 0xE3001201, 0x00003000, 0xE3001402, 0x00000C00, 0xE3000C00, 0x00000000, 0xE3001801, 0x00000000, 0xE3001A01, 0x00000000, 0xFCFFE7FF, 0xFFCD92C9, 0xE200001C, 0x00504340, 0xD9000000, 0x00000000, 0xD9FFFFFF, 0x00200004, 0xDF000000, 0x00000000, };
INCLUDE_ASM(s32, "cd180_len_38f0", func_80138188);
s32 D_8014E618[] = { 0xDE000000, &D_8014E5A0, 0xE3001001, 0x00000000, 0xFD88000F, ui_quarter_circle_silhouette_png, 0xF5880400, 0x070D4350, 0xE6000000, 0x00000000, 0xF4000000, 0x0703E07C, 0xE7000000, 0x00000000, 0xF5800400, 0x000D4350, 0xF2000000, 0x0007C07C, 0xF2000000, 0x000FC0FC, 0xDF000000, 0x00000000, };
s32 D_8014E670[] = { 0xDE000000, &D_8014E5A0, 0xE3001001, 0x00000000, 0xFD88001F, ui_mario_head_silhouette_png, 0xF5880800, 0x07098260, 0xE6000000, 0x00000000, 0xF4000000, 0x0707E0FC, 0xE7000000, 0x00000000, 0xF5800800, 0x00098260, 0xF2000000, 0x000FC0FC, 0xDF000000, 0x00000000, };
s32 D_8014E6C0[] = { 0xDE000000, &D_8014E5A0, 0xE3001001, 0x00000000, 0xFD88000F, ui_star_silhouette_png, 0xF5880400, 0x07098350, 0xE6000000, 0x00000000, 0xF4000000, 0x0703E0FC, 0xE7000000, 0x00000000, 0xF5800400, 0x00098350, 0xF2000000, 0x0007C0FC, 0xF2000000, 0x000FC0FC, 0xDF000000, 0x00000000, };
s32 D_8014E718[] = { 0xDE000000, &D_8014E5A0, 0xE3001001, 0x00000000, 0xFD88003F, ui_flame_thing_silhouette_png, 0xF5881000, 0x070D8360, 0xE6000000, 0x00000000, 0xF4000000, 0x070FC0FC, 0xE7000000, 0x00000000, 0xF5881000, 0x000D8360, 0xF2000000, 0x000FC0FC, 0xF2000000, 0x001FC1FC, 0xDF000000, 0x00000000, };
s32 D_8014E770[] = { 0x000000F0, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x014000F0, 0x00000000, 0x28000000, 0xFFFFFFFF, 0x000000DA, 0x00000000, 0x000002C0, 0xFFFFFFFF, 0x014000DA, 0x00000000, 0x280002C0, 0xFFFFFFFF, 0x000000C4, 0x00000000, 0x00000580, 0xFFFFFFFF, 0x014000C4, 0x00000000, 0x28000580, 0xFFFFFFFF, 0x000000AE, 0x00000000, 0x00000840, 0xFFFFFFFF, 0x014000AE, 0x00000000, 0x28000840, 0xFFFFFFFF, 0x00000098, 0x00000000, 0x00000B00, 0xFFFFFFFF, 0x01400098, 0x00000000, 0x28000B00, 0xFFFFFFFF, 0x00000082, 0x00000000, 0x00000DC0, 0xFFFFFFFF, 0x01400082, 0x00000000, 0x28000DC0, 0xFFFFFFFF, 0x0000006C, 0x00000000, 0x00001080, 0xFFFFFFFF, 0x0140006C, 0x00000000, 0x28001080, 0xFFFFFFFF, 0x00000056, 0x00000000, 0x00001340, 0xFFFFFFFF, 0x01400056, 0x00000000, 0x28001340, 0xFFFFFFFF, 0x00000040, 0x00000000, 0x00001600, 0xFFFFFFFF, 0x01400040, 0x00000000, 0x28001600, 0xFFFFFFFF, 0x0000002A, 0x00000000, 0x000018C0, 0xFFFFFFFF, 0x0140002A, 0x00000000, 0x280018C0, 0xFFFFFFFF, 0x00000014, 0x00000000, 0x00001B80, 0xFFFFFFFF, 0x01400014, 0x00000000, 0x28001B80, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00001E00, 0xFFFFFFFF, 0x01400000, 0x00000000, 0x28001E00, 0xFFFFFFFF, };
s32 D_8014E8F0[] = { 0xD7000000, 0x80008000, 0xE7000000, 0x00000000, 0xE3000A01, 0x00000000, 0xE2001D00, 0x00000004, 0xEE000000, 0x00000000, 0xE200001C, 0x50504360, 0xFCFFE7FF, 0xFFCE7F3F, 0xE3000C00, 0x00080000, 0xE3000D01, 0x00000000, 0xE3000F00, 0x00000000, 0xE3001001, 0x00000000, 0xE3001201, 0x00002000, 0xE3001402, 0x00000C00, 0xD9DDF9FF, 0x00000000, 0xD9FFFFFF, 0x00000405, 0x0100A014, D_8014E500, 0x06000204, 0x00060004, 0x06000802, 0x00060A00, 0x06020C04, 0x000E0604, 0x06100E04, 0x000E1206, 0xE7000000, 0x00000000, 0xE2001D00, 0x00000000, 0xDF000000, 0x00000000, };
s32 D_8014E9A8[] = { 0xE7000000, 0x00000000, 0xE2001D00, 0x00000004, 0xEE000000, 0x00140000, 0xE200001C, 0x00504A50, 0xFCFFE7FF, 0xFFCE7F3F, 0xD9DDF9FF, 0x00000000, 0xD9FFFFFF, 0x00000005, 0xE3001801, 0x00000000, 0xE3000A01, 0x00000000, 0xE3001201, 0x00002000, 0xE3000C00, 0x00000000, 0xE3000F00, 0x00000000, 0xE3001001, 0x00000000, 0xE3000D01, 0x00000000, 0xE3001402, 0x00000C00, 0xF65003C0, 0x00000000, 0xE3001801, 0x000000C0, 0xE7000000, 0x00000000, 0xE2001D00, 0x00000000, 0xDF000000, 0x00000000, };
s32 D_8014EA48[] = { 0xE2001D00, 0x00000004, 0xEE000000, 0x00140000, 0xE200001C, 0x00552210, 0xD9FDF9FF, 0x00000000, 0xD9DFFFFF, 0x00000000, 0xD7000002, 0x80008000, 0xE7000000, 0x00000000, 0xFC121824, 0xFF33FFFF, 0xE3000C00, 0x00080000, 0xE3000D01, 0x00000000, 0xE3000F00, 0x00000000, 0xE3001001, 0x00000000, 0xE3001201, 0x00002000, 0xE3001402, 0x00000C00, 0x01018030, &D_8014E770, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF4000000, 0x0727C02C, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF2000000, 0x0027C02C, 0x06000402, 0x00060204, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF400002C, 0x0727C058, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF200002C, 0x0027C058, 0x06040806, 0x000A0608, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF4000058, 0x0727C084, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF2000058, 0x0027C084, 0x06080C0A, 0x000E0A0C, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF4000084, 0x0727C0B0, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF2000084, 0x0027C0B0, 0x060C100E, 0x00120E10, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF40000B0, 0x0727C0DC, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF20000B0, 0x0027C0DC, 0x06101412, 0x00161214, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF40000DC, 0x0727C108, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF20000DC, 0x0027C108, 0x06141816, 0x001A1618, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF4000108, 0x0727C134, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF2000108, 0x0027C134, 0x06181C1A, 0x001E1A1C, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF4000134, 0x0727C160, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF2000134, 0x0027C160, 0x061C201E, 0x00221E20, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF4000160, 0x0727C18C, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF2000160, 0x0027C18C, 0x06202422, 0x00262224, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF400018C, 0x0727C1B8, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF200018C, 0x0027C1B8, 0x06242826, 0x002A2628, 0xFD10009F, &D_80156910, 0xF5105000, 0x07090280, 0xE6000000, 0x00000000, 0xF40001B8, 0x0727C1DC, 0xE7000000, 0x00000000, 0xF5105000, 0x00090280, 0xF20001B8, 0x0027C1DC, 0x06282C2A, 0x002E2A2C, 0xE7000000, 0x00000000, 0xE2001D00, 0x00000000, };
INCLUDE_ASM(void, "cd180_len_38f0", _render_transition_stencil, u8 arg0, f32 arg1, ScreenOverlay* arg2);
void set_screen_overlay_params_front(u8 type, f32 zoom) {
screen_overlay_frontType = type;
screen_overlay_frontZoom = zoom;
}
void set_screen_overlay_params_back(u8 type, f32 zoom) {
screen_overlay_backType = type;
screen_overlay_backZoom = zoom;
}
void get_screen_overlay_params(s32 idx, u8* type, f32* zoom) {
switch (idx) {
case 0:
*type = screen_overlay_frontType;
*zoom = screen_overlay_frontZoom;
break;
case 1:
*type = screen_overlay_backType;
*zoom = screen_overlay_backZoom;
break;
}
}
void set_screen_overlay_color(s32 idx, u8 r, u8 g, u8 b) {
switch (idx) {
case 0:
case 1:
D_8015C790[idx].color.r = r;
D_8015C790[idx].color.g = g;
D_8015C790[idx].color.b = b;
break;
}
}
void set_screen_overlay_center(s32 idx, s32 arg1, s32 arg2, s32 arg3) {
switch (idx) {
case 0:
case 1:
switch (arg1) {
case 0:
D_8015C790[idx].screenPos[0][0] = arg2;
D_8015C790[idx].screenPos[0][1] = arg3;
break;
case 1:
D_8015C790[idx].screenPos[1][0] = arg2;
D_8015C790[idx].screenPos[1][1] = arg3;
break;
}
break;
}
}
void set_screen_overlay_center_worldpos(s32 idx, s32 posIdx, s32 x, s32 y, s32 z) {
Camera* camera = &gCameras[gCurrentCameraID];
f32 tx, ty, tz, ts;
switch (idx) {
case 0:
case 1:
transform_point(camera->perspectiveMatrix[0], x, y, z, 1.0f, &tx, &ty, &tz, &ts);
ts = 1.0f / ts;
tx *= ts;
ty *= -ts;
tz *= ts;
tx = (((tx * camera->viewportW) + camera->viewportW) * 0.5) + camera->viewportStartX;
ty = (((ty * camera->viewportH) + camera->viewportH) * 0.5) + camera->viewportStartY;
switch (posIdx) {
case 0:
D_8015C790[idx].screenPos[0][0] = tx;
D_8015C790[idx].screenPos[0][1] = ty;
break;
case 1:
D_8015C790[idx].screenPos[1][0] = tx;
D_8015C790[idx].screenPos[1][1] = ty;
break;
}
break;
}
}
void set_screen_overlay_alpha(s32 idx, f32 alpha) {
switch (idx) {
case 0:
case 1:
D_8015C790[idx].alpha = alpha;
break;
}
}
void clear_screen_overlays(void) {
ScreenOverlay* it;
s32 i;
screen_overlay_frontType = -1;
screen_overlay_backType = -1;
screen_overlay_frontZoom = -1.0f;
screen_overlay_backZoom = -1.0f;
for (it = &D_8015C790[0], i = 0; i < ARRAY_COUNT(D_8015C790); i++, it++) {
it->color.b = 0;
it->color.g = 0;
it->color.r = 0;
it->screenPos[1][1] = 0;
it->screenPos[1][0] = 0;
it->screenPos[0][1] = 0;
it->screenPos[0][0] = 0;
it->alpha = 255.0f;
}
}
void func_80138188(void) {
screen_overlay_backZoom = 0;
}
void func_80138198(void) {
}
INCLUDE_ASM(s32, "cd180_len_38f0", render_screen_overlay_frontUI);
void render_screen_overlay_frontUI(void) {
if (screen_overlay_frontType != -1 && screen_overlay_frontZoom != -1.0f && gGameStatusPtr->isBattle != 2) {
_render_transition_stencil(screen_overlay_frontType, screen_overlay_frontZoom, &D_8015C790[0]);
}
}
INCLUDE_ASM(s32, "cd180_len_38f0", render_screen_overlay_backUI);
void render_screen_overlay_backUI(void) {
if (screen_overlay_backType != -1 && screen_overlay_backZoom != -1.0f && gGameStatusPtr->isBattle != 2) {
_render_transition_stencil(screen_overlay_backType, screen_overlay_backZoom, &D_8015C790[1]);
}
}
INCLUDE_ASM(s32, "cd180_len_38f0", set_map_transition_effect);
void set_map_transition_effect(s32 arg0) {
D_8014C6F0 = arg0;
}
// r g b register ordering issues
#ifdef NON_EQUIVALENT
s32 update_exit_map_screen_overlay(s16* progress) {
u8 overlayColor;
u8 type;
s32 phi_s2;
s16 t;
u8 r;
u8 g;
u8 b;
type = 0;
g = 0;
b = 0;
r = 0;
t = 0;
phi_s2 = 20;
switch (D_8014C6F0) {
case 1:
type = 0;
break;
case 3:
r = g = b = 208;
type = 1;
phi_s2 = 10;
if (gGameStatusPtr->demoState == 2) {
gGameStatusPtr->nextDemoScene = 18;
}
break;
case 6:
r = g = b = 208;
case 0:
type = 1;
break;
case 7:
if (gGameStatusPtr->demoState == 2) {
gGameStatusPtr->nextDemoScene = 18;
}
case 11:
case 15:
r = g = b = 208;
case 4:
case 5:
type = 1;
phi_s2 = 7;
break;
case 14:
r = g = b = 208;
case 2:
type = 1;
phi_s2 = 50;
break;
case 8:
set_screen_overlay_alpha(0, 0.0f);
type = 4;
break;
case 9:
r = g = b = 208;
case 10:
set_screen_overlay_alpha(0, 0.0f);
type = 4;
phi_s2 = 7;
break;
case 12:
set_screen_overlay_alpha(0, 160.0f);
r = g = b = 208;
type = 5;
phi_s2 = 7;
break;
case 13:
set_screen_overlay_alpha(0, 0.0f);
type = 5;
phi_s2 = 7;
break;
case 16:
set_screen_overlay_center(0, 0, 15, 28);
set_screen_overlay_center(0, 1, 305, 156);
set_screen_overlay_params_front(12, 255.0f);
*progress = 0xFF;
return 1;
}
if (D_8014C6F0 == 5) {
overlayColor = ((255 - *progress) * 208) / 255;
set_screen_overlay_color(0, overlayColor, overlayColor, overlayColor);
set_screen_overlay_params_front(type, 255.0f);
if (*progress == 0xFF) {
return 1;
}
*progress += phi_s2;
if (*progress > 0xFF) {
*progress = 0xFF;
}
} else {
set_screen_overlay_color(t, r, g, b);
if (t == 0) {
set_screen_overlay_params_front(type, *progress);
} else {
set_screen_overlay_params_back(type, *progress);
}
if (*progress == 0xFF) {
return 1;
}
*progress += phi_s2;
if (*progress > 0xFF) {
*progress = 0xFF;
}
}
return 0;
}
#else
INCLUDE_ASM(s32, "cd180_len_38f0", update_exit_map_screen_overlay);
#endif
INCLUDE_ASM(s32, "cd180_len_38f0", update_enter_map_screen_overlay);
u8 update_enter_map_screen_overlay(s16* progress) {
u8 frontType = 0;
s32 amt = 20;
u8 ret = FALSE;
switch (D_8014C6F0) {
case 3:
set_screen_overlay_color(0, 208, 208, 208);
amt = 50;
break;
case 2:
frontType = 1;
amt = 50;
break;
case 4:
case 5:
case 7:
case 9:
case 10:
frontType = 1;
amt = 7;
break;
case 0:
case 1:
case 6:
case 13:
case 14:
frontType = 1;
break;
case 8:
case 15:
frontType = 4;
break;
case 11:
frontType = 5;
amt = 7;
break;
case 12:
frontType = 4;
amt = 7;
break;
case 16:
set_screen_overlay_center(0, 0, 15, 28);
set_screen_overlay_center(0, 1, 305, 156);
set_screen_overlay_params_front(12, *progress);
amt = 2;
break;
}
if (D_8014C6F0 != 0x10) {
set_screen_overlay_params_front(frontType, *progress);
}
if (*progress == 0) {
ret = TRUE;
}
*progress -= amt;
if (*progress < 0) {
*progress = 0;
}
return ret;
}

View File

@ -11,13 +11,13 @@ ApiStatus N(UnkSfxFunc)(Evt* script, s32 isInitialCall) {
distY = actor->state.goalPos.y - actor->currentPos.y;
distZ = actor->state.goalPos.z - actor->currentPos.z;
script->functionTemp[0] = ((sqrtf(SQ(distX) + SQ(distY) + SQ(distZ)) / actor->state.speed) * 0.5f) + 1.0f;
sfx_play_sound_at_position(SOUND_UNKNOWN_359, 0.0f, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
sfx_play_sound_at_position(SOUND_359, 0.0f, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
}
if (script->functionTemp[0]-- > 0) {
return ApiStatus_BLOCK;
}
sfx_play_sound_at_position(SOUND_UNKNOWN_759, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
sfx_play_sound_at_position(SOUND_759, 0, actor->currentPos.x, actor->currentPos.y, actor->currentPos.z);
return ApiStatus_DONE2;
}

File diff suppressed because it is too large Load Diff

View File

@ -28,7 +28,7 @@ void load_map_bg(char* optAssetName) {
void reset_background_settings(void) {
D_801595A0 = 0;
D_8014F12F = 0;
gGameStatusPtr->unk_15C = 0xB4;
gGameStatusPtr->unk_15C = 180;
gGameStatusPtr->enableBackground &= 0xF0;
}

View File

@ -31,14 +31,11 @@ void bgm_set_target_volume(s16 volume);
/// @see gSongsUsingVariationFlag
/// @returns -1: no override; 0: override to variation 0; 1 override to variation 1
s32 bgm_get_map_default_variation(s32 songID) {
u32 i = 0;
Area* areas = gAreas;
GameStatus** gameStatus = &gGameStatusPtr;
s32* allowed = gSongsUsingVariationFlag;
u32 i;
for (i = 0; i < ARRAY_COUNT(gSongsUsingVariationFlag); i++) {
if (allowed[i] == songID) {
Map* map = &areas[(*gameStatus)->areaID].maps[(*gameStatus)->mapID];
if (gSongsUsingVariationFlag[i] == songID) {
Map* map = &gAreas[gGameStatusPtr->areaID].maps[gGameStatusPtr->mapID];
return map->unk_1C.bytes.songVariation & 1;
}
@ -48,12 +45,10 @@ s32 bgm_get_map_default_variation(s32 songID) {
}
void bgm_reset_sequence_players(void) {
MusicSettings* src; // TODO: remove this temp when .data section for this file (incl. D_8014F6F0) is set up
s32 i;
for (i = 0; i < 2; i++) {
MusicSettings* musicSettings = gMusicSettings;
musicSettings[i] = *(src = &D_8014F6F0);
gMusicSettings[i] = D_8014F6F0;
}
gMusicTargetVolume = 8;
@ -67,15 +62,139 @@ void bgm_reset_volume(void) {
gMusicUnkVolume2 = 8;
}
// Loop struct shenanigans
#ifdef NON_EQUIVALENT
// Experiment to fix loop
typedef struct MusicSettingsInner {
/* 0x02 */ s16 unk_02;
/* 0x04 */ s32 fadeOutTime;
/* 0x08 */ s32 fadeInTime;
/* 0x0C */ s16 unk_0C;
/* 0x0E */ s16 unk_0E;
/* 0x10 */ s32 songID;
/* 0x14 */ s32 variation;
/* 0x18 */ s32 songName;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x24 */ s32 unk_24;
/* 0x28 */ s32 unk_28;
/* 0x2C */ s32 unk_2C;
} MusicSettingsInner;
typedef struct MusicSettings2 {
/* 0x00 */ u16 flags;
/* 0x02 */ MusicSettingsInner unk_02;
} MusicSettings2; // size = 0x30
void bgm_update_music_settings(void) {
MusicSettingsInner* inner;
MusicSettings2* phi_s1;
s32* flags;
s32 phi_v0;
s32 i;
s32 a;
s32 c;
phi_s1 = gMusicSettings;
for (i = 0; i < 2; i++, phi_s1++) {
inner = &phi_s1->unk_02;
c = 2;
a = ~0x4;
switch (inner->unk_02) {
case 0:
break;
case 1:
if (phi_s1->flags & 1) {
if (inner->fadeOutTime < 250) {
if (!(phi_s1->flags & 4)) {
phi_v0 = func_800559C4(inner->songName);
} else {
phi_v0 = func_80055AF0(inner->songName);
}
} else if (!(phi_s1->flags & 4)) {
phi_v0 = snd_set_song_variation_fade_time(inner->songName, inner->fadeOutTime, 0);
} else {
phi_v0 = func_80055BB8(inner->songName, 0xFA);
}
if (phi_v0 == 0) {
inner->unk_02 = c;
}
} else {
if (phi_s1->flags & 4) {
phi_s1->flags |= 0x10;
}
phi_s1->flags &= a;
inner->unk_02 = 5;
}
break;
case 2:
phi_s1->flags &= a;
if (!(phi_s1->flags & 1)) {
inner->unk_02 = 5;
break;
}
if (func_800559FC(inner->songName) == 0) {
phi_s1->flags &= ~0x1;
inner->unk_02 = 3;
}
break;
case 3:
inner->unk_02 = 4;
break;
case 4:
inner->unk_02 = 5;
break;
case 5:
if (!(phi_s1->flags & 8)) {
if (inner->songID < 0) {
inner->unk_02 = 0;
} else {
inner->songName = snd_load_song(inner->songID, i);
if (inner->songName > 0xFFFFU) {
if ((phi_s1->flags & 0x20) != 0) {
snd_set_song_variation_fade(inner->songName, inner->variation, inner->fadeInTime, inner->unk_0C, inner->unk_0E);
phi_s1->flags &= ~0x20;
} else {
bgm_set_target_volume(gMusicUnkVolume);
}
if (snd_start_song_variation(inner->songName, inner->variation) == 0) {
phi_s1->flags |= 1;
inner->unk_02 = 0;
}
}
}
} else {
if (phi_s1->flags & 0x10) {
inner->unk_02 = 0;
phi_s1->flags &= ~0x18;
} else if (func_80055B28(inner->unk_2C) == 0) {
inner->unk_02 = 0;
inner->songID = inner->unk_24;
inner->variation = inner->unk_28;
inner->songName = inner->unk_2C;
phi_s1->flags |= 1;
phi_s1->flags &= ~0x8;
}
}
break;
}
}
bgm_update_volume();
}
#else
INCLUDE_ASM(s32, "e0b30_len_b80", bgm_update_music_settings);
#endif
s32 _bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) {
if (gGameStatusPtr->demoState != 0) {
return 1;
} else {
// TODO: these two lines likely a MUSIC_PLAYER(idx) macro
MusicSettings* musicSettings = gMusicSettings;
MusicSettings* musicSetting = &musicSettings[playerIndex];
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!gGameStatusPtr->musicEnabled) {
func_800559C4(musicSetting->songName);
@ -112,9 +231,7 @@ s32 _bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s
}
s32 bgm_set_song(s32 playerIndex, s32 songID, s32 variation, s32 fadeOutTime, s16 volume) {
MusicSettings* musicSettings = gMusicSettings;
musicSettings[playerIndex].flags &= ~8;
gMusicSettings[playerIndex].flags &= ~8;
return _bgm_set_song(playerIndex, songID, variation, fadeOutTime, volume);
}
@ -123,8 +240,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1
if (gGameStatusPtr->demoState != 0) {
return 1;
} else {
MusicSettings* musicSettings = gMusicSettings;
MusicSettings* musicSetting = &musicSettings[playerIndex];
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!gGameStatusPtr->musicEnabled) {
func_800559C4(musicSetting->songName);
@ -152,8 +268,7 @@ s32 func_8014A964(s32 playerIndex, s32 songID, s32 variation, s32 fadeInTime, s1
}
s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) {
MusicSettings* musicSettings = gMusicSettings;
MusicSettings* musicSetting = &musicSettings[playerIndex];
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
return 0;
@ -179,8 +294,7 @@ s32 func_8014AA54(s32 playerIndex, s32 arg1, s16 arg2) {
}
s32 func_8014AB0C(s32 playerIndex, s16 arg1) {
MusicSettings* musicSettings = gMusicSettings;
MusicSettings* musicSetting = &musicSettings[playerIndex];
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
return 0;
@ -190,8 +304,7 @@ s32 func_8014AB0C(s32 playerIndex, s16 arg1) {
}
s32 func_8014AB60(s32 playerIndex, s16 arg1) {
MusicSettings* musicSettings = gMusicSettings;
MusicSettings* musicSetting = &musicSettings[playerIndex];
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
return 0;
@ -201,8 +314,7 @@ s32 func_8014AB60(s32 playerIndex, s16 arg1) {
}
s32 func_8014ABB4(s32 playerIndex, s16 arg1) {
MusicSettings* musicSettings = gMusicSettings;
MusicSettings* musicSetting = &musicSettings[playerIndex];
MusicSettings* musicSetting = &gMusicSettings[playerIndex];
if (!(musicSetting->flags & MUSIC_SETTINGS_FLAGS_1)) {
return 0;
@ -230,11 +342,7 @@ void bgm_set_target_volume(s16 volume) {
gMusicTargetVolume = volume;
}
//Data loading shenanigans
#ifdef NON_EQUIVALENT
void bgm_update_volume(void) {
s16* currentVolume;
s16 compareVolume;
s16 toVolume;
if (D_8014F738 != 0) {
@ -242,27 +350,41 @@ void bgm_update_volume(void) {
return;
}
compareVolume = gMusicTargetVolume;
if (gMusicUnkVolume2 < gMusicTargetVolume) {
compareVolume = gMusicUnkVolume2;
toVolume = gMusicTargetVolume;
if (toVolume > gMusicUnkVolume2) {
toVolume = gMusicUnkVolume2;
}
currentVolume = &gMusicCurrentVolume;
if (*currentVolume != compareVolume) {
toVolume = *currentVolume + 1;
if (*currentVolume >= compareVolume) {
toVolume = *currentVolume - 1;
if (gMusicCurrentVolume != toVolume) {
if (gMusicCurrentVolume >= toVolume) {
gMusicCurrentVolume--;
} else {
gMusicCurrentVolume++;
}
*currentVolume = toVolume;
func_800561A4(gMusicCurrentVolume);
D_8014F738 = 3;
}
}
#else
INCLUDE_ASM(s32, "e0b30_len_b80", bgm_update_volume);
#endif
// can't figure out the loop
#ifdef NON_EQUIVALENT
s32 func_8014AD40(void) {
s32 i;
for (i = 0; i < 2; i++) {
if (!(gMusicSettings[i].flags & MUSIC_SETTINGS_FLAGS_1)) {
continue;
}
if (func_800559FC(gMusicSettings[i].songName) != 0) {
return 1;
}
}
return 0;
}
#else
INCLUDE_ASM(s32, "e0b30_len_b80", func_8014AD40);
#endif
void bgm_pop_song(void) {
MusicSettings* musicSetting = &gMusicSettings[0];

View File

@ -10,9 +10,9 @@ INCLUDE_ASM(ApiStatus, "evt/demo_api", SetSpriteShading, Evt* script, s32 isInit
ApiStatus EnableSpriteShading(Evt* script, s32 isInitialCall) {
if (evt_get_variable(script, *script->ptrReadPos) != 0) {
*D_80151328 |= 1;
D_80151328->flags |= 1;
} else {
*D_80151328 &= ~1;
D_80151328->flags &= ~1;
}
return ApiStatus_DONE2;
}

View File

@ -62,9 +62,8 @@ ApiStatus FadeInMusic(Evt* script, s32 isInitialCall) {
ApiStatus func_802D5EE0(Evt* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos;
MusicSettings* musicSettings = gMusicSettings;
(&musicSettings[evt_get_variable(script, *args++)])->flags |= 0x2;
(&gMusicSettings[evt_get_variable(script, *args++)])->flags |= 0x2;
return ApiStatus_DONE2;
}

View File

@ -16,7 +16,7 @@ s32 general_heap_malloc_tail(s32 size) {
return _heap_malloc_tail(&heap_generalHead, size);
}
s32 general_heap_free(s32* data) {
s32 general_heap_free(void* data) {
return _heap_free(&heap_generalHead, data);
}

View File

@ -3,6 +3,7 @@
#include "ld_addrs.h"
#include "hud_element.h"
#include "sprite.h"
#include "overlay.h"
s8 D_80074020 = 1;
s8 D_80074021 = 5;
@ -221,7 +222,7 @@ void gfx_draw_frame(void) {
switch (D_800741A2) {
case 0:
case 1:
_render_transition_stencil(7, D_800741A0, 0);
_render_transition_stencil(7, D_800741A0, NULL);
break;
}
}

View File

@ -34,25 +34,25 @@ void pause_stats_init(MenuPanel* panel) {
}
setup_pause_menu_tab(gStatsMenuWindowBPs, ARRAY_COUNT(gStatsMenuWindowBPs));
panel->initialized = TRUE;
panel->unk_00.c.initialized = TRUE;
}
void pause_stats_handle_input(MenuPanel* panel) {
s32 initialSelection = panel->selected;
s32 initialSelection = panel->unk_00.c.selected;
s16 adjustedBootsLevel;
s16 adjustedHammerLevel;
s32 msgOffset;
if (gPauseMenuHeldButtons & BUTTON_STICK_LEFT) {
while (1) {
panel->col--;
if (panel->col < 0) {
panel->col = 0;
panel->unk_00.c.col--;
if (panel->unk_00.c.col < 0) {
panel->unk_00.c.col = 0;
break;
} else if (panel->selected != panel->gridData[
} else if (panel->unk_00.c.selected != panel->gridData[
(panel->page * panel->numCols * panel->numRows)
+ (panel->numCols * panel->row)
+ (panel->col)]) {
+ (panel->numCols * panel->unk_00.c.row)
+ (panel->unk_00.c.col)]) {
break;
}
}
@ -60,14 +60,14 @@ void pause_stats_handle_input(MenuPanel* panel) {
if (gPauseMenuHeldButtons & BUTTON_STICK_RIGHT) {
while (1) {
panel->col++;
if (panel->col >= panel->numCols) {
panel->col = panel->numCols - 1;
panel->unk_00.c.col++;
if (panel->unk_00.c.col >= panel->numCols) {
panel->unk_00.c.col = panel->numCols - 1;
break;
} else if (panel->selected != panel->gridData[
} else if (panel->unk_00.c.selected != panel->gridData[
(panel->page * panel->numCols * panel->numRows)
+ (panel->numCols * panel->row)
+ (panel->col)]) {
+ (panel->numCols * panel->unk_00.c.row)
+ (panel->unk_00.c.col)]) {
break;
}
}
@ -75,14 +75,14 @@ void pause_stats_handle_input(MenuPanel* panel) {
if (gPauseMenuHeldButtons & BUTTON_STICK_UP) {
while (1) {
panel->row--;
if (panel->row < 0) {
panel->row = 0;
panel->unk_00.c.row--;
if (panel->unk_00.c.row < 0) {
panel->unk_00.c.row = 0;
break;
} else if (panel->selected != panel->gridData[
} else if (panel->unk_00.c.selected != panel->gridData[
(panel->page * panel->numCols * panel->numRows)
+ (panel->numCols * panel->row)
+ (panel->col)]) {
+ (panel->numCols * panel->unk_00.c.row)
+ (panel->unk_00.c.col)]) {
break;
}
}
@ -90,24 +90,24 @@ void pause_stats_handle_input(MenuPanel* panel) {
if (gPauseMenuHeldButtons & BUTTON_STICK_DOWN) {
while (1) {
panel->row++;
if (panel->row >= panel->numRows) {
panel->row = panel->numRows - 1;
panel->unk_00.c.row++;
if (panel->unk_00.c.row >= panel->numRows) {
panel->unk_00.c.row = panel->numRows - 1;
break;
} else if (panel->selected != panel->gridData[
} else if (panel->unk_00.c.selected != panel->gridData[
(panel->page * panel->numCols * panel->numRows)
+ (panel->numCols * panel->row)
+ (panel->col)]) {
+ (panel->numCols * panel->unk_00.c.row)
+ (panel->unk_00.c.col)]) {
break;
}
}
}
panel->selected = panel->gridData[
panel->unk_00.c.selected = panel->gridData[
(panel->page * panel->numCols * panel->numRows)
+ (panel->numCols * panel->row)
+ (panel->col)];
if (panel->selected != initialSelection) {
+ (panel->numCols * panel->unk_00.c.row)
+ (panel->unk_00.c.col)];
if (panel->unk_00.c.selected != initialSelection) {
sfx_play_sound(SOUND_MENU_CHANGE_SELECTION);
}
@ -131,7 +131,7 @@ void pause_stats_handle_input(MenuPanel* panel) {
adjustedHammerLevel = 3;
}
switch (gStatsMenuEntries[panel->selected].baseMsgID) {
switch (gStatsMenuEntries[panel->unk_00.c.selected].baseMsgID) {
case 0x25:
if (adjustedBootsLevel > 1) {
msgOffset = adjustedBootsLevel - 1;
@ -147,7 +147,7 @@ void pause_stats_handle_input(MenuPanel* panel) {
break;
}
gPauseMenuCurrentDescMsg = pause_get_menu_msg(gStatsMenuEntries[panel->selected].baseMsgID + msgOffset);
gPauseMenuCurrentDescMsg = pause_get_menu_msg(gStatsMenuEntries[panel->unk_00.c.selected].baseMsgID + msgOffset);
gPauseMenuCurrentDescIconScript = NULL;
if (gPauseMenuPressedButtons & BUTTON_B) {
@ -459,7 +459,7 @@ void pause_badges_init(MenuPanel* panel) {
pause_badges_load_badges(FALSE);
if (gBadgeMenuItemIDs[0] == BADGE_NONE_STANDIN) {
panel->initialized = FALSE;
panel->unk_00.c.initialized = FALSE;
return;
}
@ -474,7 +474,7 @@ void pause_badges_init(MenuPanel* panel) {
gBadgeMenuWindowBPs[i].tab = panel;
}
setup_pause_menu_tab(gBadgeMenuWindowBPs, ARRAY_COUNT(gBadgeMenuWindowBPs));
panel->initialized = TRUE;
panel->unk_00.c.initialized = TRUE;
}
void pause_badges_handle_input(MenuPanel* panel) {

View File

@ -112,7 +112,7 @@ void pause_map_init(MenuPanel* tab) {
pause_map_cameraY = -209.0f;
}
tab->initialized = 1;
tab->unk_00.c.initialized = TRUE;
}
void pause_map_handle_input(void) {

View File

@ -192,4 +192,6 @@ s32** spr_get_npc_palettes(s32 npcSpriteID);
s32 spr_get_npc_color_variations(s32 npcSpriteID);
void render_shaded_sprite(Matrix4f mtx, s32 uls, s32 ult, s32 lrs, s32 lrt, s32 alpha, s32);
#endif

View File

@ -52,7 +52,7 @@ void func_802B6060_E27570(void) {
D_802B6798 = 0.0f;
D_802B679C = 0;
suggest_player_anim_clearUnkFlag(0x1000A);
sfx_play_sound_at_player(SOUND_UNKNOWN_167, 0);
sfx_play_sound_at_player(SOUND_167, 0);
gCameras[0].moveFlags |= 1;
}
tempCurrentSpeed = playerStatus->currentSpeed;
@ -100,7 +100,7 @@ void func_802B6060_E27570(void) {
}
sin_cos_rad((D_802B6790 * TAU) / 360.0f, &sp4C, &sp50);
playerStatus->position.y += fabsf((sp4C / sp50) * playerStatus->currentSpeed);
snd_stop_sound(SOUND_UNKNOWN_167);
snd_stop_sound(SOUND_167);
break;
case 1:
sp28 = playerStatus->position.x;
@ -115,7 +115,7 @@ void func_802B6060_E27570(void) {
}
playerStatus->currentSpeed -= tempCurrentSpeed;
if (playerStatus->currentSpeed <= 0.0f) {
sfx_play_sound_at_player(SOUND_UNKNOWN_172, 0);
sfx_play_sound_at_player(SOUND_172, 0);
suggest_player_anim_setUnkFlag(0x10031);
playerStatus->fallState = 6;
playerStatus->framesOnGround = 15;
@ -148,7 +148,7 @@ void func_802B6060_E27570(void) {
if (sp48 >= 0) {
D_802B678C = -1;
suggest_player_anim_setUnkFlag(0x80003);
sfx_play_sound_at_player(SOUND_UNKNOWN_162, 0);
sfx_play_sound_at_player(SOUND_162, 0);
playerStatus->fallState++;
}
break;
@ -169,7 +169,7 @@ void func_802B6060_E27570(void) {
}
if (playerStatus->unk_BC != 0) {
suggest_player_anim_setUnkFlag(0x10031);
sfx_play_sound_at_player(SOUND_UNKNOWN_172, 0);
sfx_play_sound_at_player(SOUND_172, 0);
playerStatus->framesOnGround = 15;
playerStatus->fallState++;
}

View File

@ -50,7 +50,7 @@ void func_802B6000_E291A0(void) {
gCameras[0].targetPos.z = playerStatus->position.z;
tempCollision = player_check_collision_below(D_802B62D0, &sp10);
if (sp10 >= 0) {
sfx_play_sound_at_player(SOUND_UNKNOWN_162, 0);
sfx_play_sound_at_player(SOUND_162, 0);
suggest_player_anim_setUnkFlag(0x80003);
playerStatus->position.y = tempCollision;
D_802B62E0 = 0xA;

View File

@ -35,7 +35,7 @@ void func_802B6000_E2A340(void) {
D_802B6350_E2A690->unk_14 = 6.0f;
D_802B6350_E2A690->unk_18 = 50.0f;
D_802B6350_E2A690->unk_00 = 0x78;
sfx_play_sound_at_player(SOUND_UNKNOWN_2F6, 0);
sfx_play_sound_at_player(SOUND_2F6, 0);
}
switch (playerStatus->fallState) {

View File

@ -478,7 +478,7 @@ StaticNpc N(npcGroup_8024223C)[] = {
EvtSource N(80242BEC) = SCRIPT({
loop EVT_VAR(0) {
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
ShakeCam(0, 0, 10, 0.5);
sleep 5;
}
@ -487,7 +487,7 @@ EvtSource N(80242BEC) = SCRIPT({
EvtSource N(80242C50) = SCRIPT({
DisablePlayerInput(TRUE);
NpcFacePlayer(NPC_BOO2, 1);
PlaySoundAtNpc(NPC_BOO2, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO2, SOUND_262, 0);
ShowEmote(2, EMOTE_EXCLAMATION, -45, 20, 1, 0, 0, 0, 0);
sleep 20;
GetNpcPos(NPC_BOO2, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2));
@ -510,12 +510,12 @@ EvtSource N(80242C50) = SCRIPT({
PanToTarget(0, 0, 1);
WaitForCam(0, 1.0);
SpeakToPlayer(NPC_BOO2, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 0, MESSAGE_ID(0x0E, 0x00A0));
PlaySoundAt(SOUND_UNKNOWN_20F6, 0, 450, 200, 160);
PlaySoundAt(SOUND_20F6, 0, 450, 200, 160);
ShakeCam(0, 0, 20, 0.80078125);
PlaySoundAtNpc(NPC_BOO0, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO1, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO2, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO4, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO0, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO1, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO2, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO4, SOUND_262, 0);
ShowEmote(0, EMOTE_EXCLAMATION, -45, 20, 1, 0, 0, 0, 0);
ShowEmote(1, EMOTE_EXCLAMATION, -45, 20, 1, 0, 0, 0, 0);
ShowEmote(2, EMOTE_EXCLAMATION, -45, 20, 1, 0, 0, 0, 0);
@ -595,8 +595,8 @@ EvtSource N(80242C50) = SCRIPT({
NpcFaceNpc(NPC_BOO0, NPC_WORLD_TUBBA, 1);
NpcFaceNpc(NPC_BOO1, NPC_WORLD_TUBBA, 1);
SetNpcPos(NPC_BOO2, 272, 190, 214);
PlaySoundAtNpc(NPC_BOO0, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO1, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO0, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO1, SOUND_262, 0);
ShowEmote(0, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0);
ShowEmote(1, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0);
spawn {
@ -678,7 +678,7 @@ EvtSource N(80242C50) = SCRIPT({
PanToTarget(0, 0, 1);
spawn {
sleep 50;
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_315, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_315, 0);
}
sleep 40;
SetNpcPos(NPC_BOO2, 0, -1000, 0);

View File

@ -171,7 +171,7 @@ NpcSettings N(npcSettings_80243DA0) = {
EvtSource N(80243DCC) = SCRIPT({
loop {
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
ShakeCam(0, 0, 3, 0.80078125);
}
});

View File

@ -189,7 +189,7 @@ EvtSource N(80240F50) = SCRIPT({
sleep EVT_VAR(0);
if (EVT_MAP_VAR(0) == 0) {
DisablePlayerInput(TRUE);
PlaySoundAt(SOUND_UNKNOWN_B4, 0, 240, 10, -125);
PlaySoundAt(SOUND_B4, 0, 240, 10, -125);
ShakeCam(0, 0, 20, 2.0);
ShowMessageAtScreenPos(MESSAGE_ID(0x0E, 0x00EF), 160, 40);
DisablePlayerInput(FALSE);
@ -227,10 +227,10 @@ EvtSource N(8024103C) = SCRIPT({
SpeakToPlayer(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 5, MESSAGE_ID(0x0E, 0x00DB));
SpeakToPlayer(NPC_BOO4, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 5, MESSAGE_ID(0x0E, 0x00DC));
SpeakToPlayer(NPC_BOO0, NPC_ANIM_boo_Palette_01_Anim_4, NPC_ANIM_boo_Palette_01_Anim_1, 5, MESSAGE_ID(0x0E, 0x00DD));
PlaySoundAt(SOUND_UNKNOWN_B4, 0, 240, 10, -125);
PlaySoundAt(SOUND_B4, 0, 240, 10, -125);
ShakeCam(0, 0, 20, 2.0);
sleep 10;
PlaySoundAt(SOUND_UNKNOWN_B4, 0, 240, 10, -125);
PlaySoundAt(SOUND_B4, 0, 240, 10, -125);
ShakeCam(0, 0, 20, 2.0);
InterpNpcYaw(NPC_BOO0, 90, 1);
ShowMessageAtScreenPos(MESSAGE_ID(0x0E, 0x00DE), 160, 40);
@ -244,12 +244,12 @@ EvtSource N(8024103C) = SCRIPT({
EvtSource N(802413F4) = SCRIPT({
SetPlayerSpeed(8.0);
PlayerMoveTo(184, -44, 0);
PlaySoundAtNpc(NPC_BOO0, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO1, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO2, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO3, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO4, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO5, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_BOO0, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO1, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO2, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO3, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO4, SOUND_262, 0);
PlaySoundAtNpc(NPC_BOO5, SOUND_262, 0);
ShowEmote(0, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0);
ShowEmote(1, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0);
ShowEmote(2, EMOTE_EXCLAMATION, 45, 20, 1, 0, 0, 0, 0);
@ -308,10 +308,10 @@ EvtSource N(802413F4) = SCRIPT({
PanToTarget(0, 0, 1);
WaitForCam(0, 1.0);
PanToTarget(0, 0, 0);
PlaySoundAt(SOUND_UNKNOWN_B4, 0, 240, 10, -125);
PlaySoundAt(SOUND_B4, 0, 240, 10, -125);
ShakeCam(0, 0, 20, 2.0);
sleep 5;
PlaySoundAt(SOUND_UNKNOWN_B4, 0, 240, 10, -125);
PlaySoundAt(SOUND_B4, 0, 240, 10, -125);
ShakeCam(0, 0, 20, 2.0);
ShowMessageAtScreenPos(MESSAGE_ID(0x0E, 0x00E7), 160, 40);
await N(80240B08);
@ -597,7 +597,7 @@ EvtSource N(80242B84) = SCRIPT({
DisablePlayerPhysics(TRUE);
DisablePartnerAI(0);
SetNpcPos(NPC_PARTNER, 320, 10, -160);
PlaySound(SOUND_UNKNOWN_32E);
PlaySound(SOUND_32E);
spawn {
loop 180 {
GetNpcPos(NPC_SENTINEL, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2));
@ -641,7 +641,7 @@ EvtSource N(80242B84) = SCRIPT({
SetNpcPos(NPC_SENTINEL, 175, 85, -33);
SetNpcAnimation(NPC_SENTINEL, NPC_ANIM_sentinel_Palette_00_Anim_9);
sleep 20;
PlaySoundAtNpc(NPC_SENTINEL, SOUND_UNKNOWN_2F7, 0);
PlaySoundAtNpc(NPC_SENTINEL, SOUND_2F7, 0);
SetNpcAnimation(NPC_SENTINEL, NPC_ANIM_sentinel_Palette_00_Anim_2);
SetNpcPos(NPC_SENTINEL, 175, 70, -33);
spawn {
@ -658,7 +658,7 @@ EvtSource N(80242B84) = SCRIPT({
}
SetPlayerJumpscale(0);
PlayerJump1(175, 0, -35, 10);
PlaySoundAtNpc(NPC_SENTINEL, SOUND_UNKNOWN_162, 0);
PlaySoundAtNpc(NPC_SENTINEL, SOUND_162, 0);
SetPlayerAnimation(ANIM_80003);
spawn {
sleep 2;

View File

@ -250,9 +250,9 @@ EvtSource N(80243EF0) = SCRIPT({
func_802D2B6C();
SetPlayerAnimation(0x8000A);
spawn {
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
sleep 5;
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
sleep 5;
}
spawn {
@ -261,7 +261,7 @@ EvtSource N(80243EF0) = SCRIPT({
sleep 30;
spawn {
loop 12 {
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
sleep 5;
}
}
@ -362,10 +362,10 @@ EvtSource N(80243EF0) = SCRIPT({
NpcMoveTo(NPC_WORLD_TUBBA, 176, 0, 0);
}
spawn {
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
ShakeCam(0, 0, 5, 0.30078125);
sleep 5;
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
ShakeCam(0, 0, 2, 0.150390625);
sleep 8;
}
@ -389,10 +389,10 @@ EvtSource N(80243EF0) = SCRIPT({
}
spawn {
loop {
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
ShakeCam(0, 0, 5, 0.30078125);
sleep 5;
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_WORLD_TUBBA, SOUND_20F6, 0);
ShakeCam(0, 0, 2, 0.150390625);
sleep 8;
}
@ -1409,10 +1409,10 @@ EvtSource N(idle_8024598C) = SCRIPT({
}
spawn {
loop {
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 4194304);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 4194304);
ShakeCam(0, 0, 5, 2.0);
sleep 5;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 4194304);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 4194304);
ShakeCam(0, 0, 2, 1.0);
sleep 8;
}

View File

@ -285,7 +285,7 @@ EvtSource N(80243D94) = SCRIPT({
PlaySound(0x212E);
N(func_80242F08_C39438)(70, 70);
sleep 27;
PlaySound(SOUND_UNKNOWN_208E);
PlaySound(SOUND_208E);
N(func_80242F08_C39438)(50, 50);
}
spawn {

View File

@ -429,10 +429,10 @@ EvtSource N(npcAI_80244D7C) = SCRIPT({
spawn N(80244D08);
spawn {
loop {
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 4194304);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 4194304);
ShakeCam(0, 0, 5, 2.0);
sleep 5;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 4194304);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 4194304);
ShakeCam(0, 0, 2, 1.0);
sleep 8;
}

View File

@ -273,7 +273,7 @@ EvtSource N(802424E8) = SCRIPT({
GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2));
GetNpcPos(NPC_SELF, EVT_VAR(3), EVT_VAR(4), EVT_VAR(5));
if (EVT_VAR(3) != EVT_VAR(6)) {
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 65538);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 65538);
GetDist2D(EVT_VAR(10), EVT_VAR(0), EVT_VAR(2), EVT_VAR(3), EVT_VAR(5));
match EVT_VAR(10) {
< 200 {

View File

@ -144,7 +144,7 @@ EvtSource N(idle_80241654) = SCRIPT({
FadeOutMusic(0, 500);
loop 3 {
SetPlayerAnimation(ANIM_8001E);
PlaySoundAt(SOUND_UNKNOWN_20F6, 0, 382, 0, 218);
PlaySoundAt(SOUND_20F6, 0, 382, 0, 218);
ShakeCam(0, 0, 5, 1.0);
sleep 20;
SetPlayerAnimation(ANIM_10002);
@ -179,7 +179,7 @@ EvtSource N(idle_80241654) = SCRIPT({
}
spawn {
loop 3 {
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 0);
ShakeCam(0, 0, 5, 0.30078125);
sleep 5;
}
@ -213,14 +213,14 @@ EvtSource N(idle_80241654) = SCRIPT({
if (EVT_VAR(0) == 1) {
break loop;
}
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 0);
ShakeCam(0, 0, 5, 0.30078125);
sleep 9;
GetSelfVar(0, EVT_VAR(0));
if (EVT_VAR(0) == 1) {
break loop;
}
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_20F6, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_20F6, 0);
ShakeCam(0, 0, 2, 0.150390625);
sleep 12;
}
@ -310,7 +310,7 @@ EvtSource N(idle_80241654) = SCRIPT({
sleep 15;
SetNpcAnimation(NPC_SELF, NPC_ANIM_world_tubba_Palette_00_Anim_24);
sleep 30;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2038, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2038, 0);
sleep 30;
spawn {
SetSelfVar(1, 0);
@ -319,12 +319,12 @@ EvtSource N(idle_80241654) = SCRIPT({
if (EVT_VAR(0) == 1) {
break loop;
}
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2039, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2039, 0);
RandInt(10, EVT_VAR(1));
EVT_VAR(1) += 15;
ShowSleepBubble(0, 0, 0, 2, 628, 121, 127, EVT_VAR(1), EVT_VAR(0));
sleep 48;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2038, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2038, 0);
RandInt(10, EVT_VAR(1));
EVT_VAR(1) += 10;
func_802D8248(EVT_VAR(0), EVT_VAR(1));
@ -351,7 +351,7 @@ EvtSource N(idle_80242494) = SCRIPT({
sleep 15;
SetNpcAnimation(NPC_SELF, NPC_ANIM_world_tubba_Palette_00_Anim_24);
sleep 30;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2038, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2038, 0);
sleep 30;
spawn {
SetSelfVar(1, 0);
@ -360,12 +360,12 @@ EvtSource N(idle_80242494) = SCRIPT({
if (EVT_VAR(0) == 1) {
break loop;
}
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2039, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2039, 0);
RandInt(10, EVT_VAR(1));
EVT_VAR(1) += 15;
ShowSleepBubble(0, 0, 0, 2, 628, 121, 127, EVT_VAR(1), EVT_VAR(0));
sleep 48;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2038, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2038, 0);
RandInt(10, EVT_VAR(1));
EVT_VAR(1) += 10;
func_802D8248(EVT_VAR(0), EVT_VAR(1));
@ -376,13 +376,13 @@ EvtSource N(idle_80242494) = SCRIPT({
EvtSource N(npcAI_802426B0) = SCRIPT({
group 11;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2039, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2039, 0);
ShowSleepBubble(0, 0, 50, 2, 552, 111, 128, 30, EVT_VAR(0));
sleep 360;
func_802D8248(EVT_VAR(0), 20);
SetNpcVar(-1, 1, 2);
sleep 20;
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2F1, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2F1, 0);
SetNpcAnimation(NPC_SELF, NPC_ANIM_world_tubba_Palette_00_Anim_19);
sleep 30;
spawn {

View File

@ -422,7 +422,7 @@ EvtSource N(enterWalk_80244C14) = {
EVT_CALL(SetNpcPos, NPC_PARTNER, EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
EVT_CALL(SetPlayerPos, EVT_VAR(0), -1000, EVT_VAR(2))
EVT_WAIT_FRAMES(30)
EVT_CALL(PlaySound, SOUND_UNKNOWN_208E)
EVT_CALL(PlaySound, SOUND_208E)
EVT_SET(EVT_SAVE_FLAG(1939), 1)
EVT_WAIT_FRAMES(30)
EVT_CALL(SetPlayerActionState, 0)

View File

@ -333,7 +333,7 @@ EvtSource N(interact_802412BC) = SCRIPT({
PanToTarget(0, 0, 1);
WaitForCam(0, 1.0);
SetNpcAnimation(NPC_DAYZEE, NPC_ANIM_dayzee_Palette_00_Anim_D);
PlaySoundAtNpc(NPC_DAYZEE, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_DAYZEE, SOUND_262, 0);
ShowEmote(1, EMOTE_EXCLAMATION, 45, 30, 1, 0, 0, 0, 0);
sleep 15;
SpeakToPlayer(NPC_SELF, NPC_ANIM_petunia_Palette_00_Anim_7, NPC_ANIM_petunia_Palette_00_Anim_6, 0, MESSAGE_ID(0x11, 0x0056));
@ -512,7 +512,7 @@ EvtSource N(idle_8024219C) = SCRIPT({
} else {
EVT_VAR(1) = 10;
}
PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_MONTY_MOLE0, SOUND_262, 0);
ShowEmote(2, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0);
sleep EVT_VAR(1);
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
@ -588,7 +588,7 @@ EvtSource N(idle_80242618) = SCRIPT({
} else {
EVT_VAR(1) = 10;
}
PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_MONTY_MOLE1, SOUND_262, 0);
ShowEmote(3, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0);
sleep EVT_VAR(1);
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
@ -664,7 +664,7 @@ EvtSource N(idle_80242A94) = SCRIPT({
} else {
EVT_VAR(1) = 10;
}
PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_MONTY_MOLE2, SOUND_262, 0);
ShowEmote(4, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0);
sleep EVT_VAR(1);
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);
@ -740,7 +740,7 @@ EvtSource N(idle_80242F10) = SCRIPT({
} else {
EVT_VAR(1) = 10;
}
PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_MONTY_MOLE3, SOUND_262, 0);
ShowEmote(5, EMOTE_EXCLAMATION, 0, EVT_VAR(1), 1, 0, 0, 0, 0);
sleep EVT_VAR(1);
SetSelfEnemyFlagBits(((NPC_FLAG_MOTION_BLUR | NPC_FLAG_1000000 | 0x02000000 | NPC_FLAG_PARTICLE | 0x10000000)), TRUE);

View File

@ -75,7 +75,7 @@ EvtSource N(80242014) = SCRIPT({
PlaySound(0x212E);
N(UnkFunc23)(70, 70);
sleep 27;
PlaySound(SOUND_UNKNOWN_208E);
PlaySound(SOUND_208E);
N(UnkFunc23)(50, 50);
}
spawn {
@ -445,7 +445,7 @@ EvtSource N(interact_80243214) = SCRIPT({
N(func_80241B5C_CB089C)(EVT_VAR(0));
MakeItemEntity(EVT_VAR(8), -695, 20, -29, 1, 0);
EVT_VAR(7) = EVT_VAR(0);
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2095, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2095, 0);
SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_02_Anim_3);
sleep 20;
RemoveItemEntity(EVT_VAR(7));

View File

@ -681,7 +681,7 @@ EvtSource N(interact_802437C8) = SCRIPT({
0x0079));
NpcFacePlayer(NPC_SELF, 1);
SetNpcAnimation(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_1);
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_262, 0);
ShowEmote(-1, EMOTE_EXCLAMATION, 0, 15, 1, 0, 0, 0, 0);
sleep 15;
SpeakToPlayer(NPC_SELF, NPC_ANIM_lily_Palette_00_Anim_1, NPC_ANIM_lily_Palette_00_Anim_1, 0, MESSAGE_ID(0x11,

View File

@ -259,7 +259,7 @@ EvtSource N(80243764) = SCRIPT({
PlaySound(0x212E);
N(UnkFunc23)(70, 70);
sleep 27;
PlaySound(SOUND_UNKNOWN_208E);
PlaySound(SOUND_208E);
N(UnkFunc23)(50, 50);
}
spawn {

View File

@ -215,7 +215,7 @@ EvtSource N(interact_80241564) = SCRIPT({
N(func_80240C2C_CEEE8C)(EVT_VAR(0));
MakeItemEntity(EVT_VAR(8), 385, 20, -34, 1, 0);
EVT_VAR(7) = EVT_VAR(0);
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2095, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2095, 0);
SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_00_Anim_3);
sleep 20;
RemoveItemEntity(EVT_VAR(7));

View File

@ -250,7 +250,7 @@ EvtSource N(interact_80242C58) = SCRIPT({
N(func_80241F44_CF4B14)(EVT_VAR(0));
MakeItemEntity(EVT_VAR(8), 505, 20, -24, 1, 0);
EVT_VAR(7) = EVT_VAR(0);
PlaySoundAtNpc(NPC_SELF, SOUND_UNKNOWN_2095, 0);
PlaySoundAtNpc(NPC_SELF, SOUND_2095, 0);
SetNpcAnimation(NPC_SELF, NPC_ANIM_gate_flower_Palette_01_Anim_3);
sleep 20;
RemoveItemEntity(EVT_VAR(7));

View File

@ -99,7 +99,7 @@ EvtSource N(npcAI_80240B50) = SCRIPT({
}
DisablePlayerInput(TRUE);
SetNpcAux(NPC_GOOMPA, 0);
PlaySoundAtNpc(NPC_GOOMPA, SOUND_UNKNOWN_262, 0);
PlaySoundAtNpc(NPC_GOOMPA, SOUND_262, 0);
ShowEmote(0, EMOTE_EXCLAMATION, 45, 15, 1, 0, 0, 0, 0);
sleep 15;
NpcFacePlayer(NPC_SELF, 5);

View File

@ -5,7 +5,7 @@
ApiStatus N(StarSpiritEffectFunc1)(Evt* script, s32 isInitialCall) {
StarSpiritEffect* ptr = (StarSpiritEffect*)script->varTable[0];
sfx_adjust_env_sound_pos(SOUND_UNKNOWN_A2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08);
sfx_adjust_env_sound_pos(SOUND_A2, 0, ptr->unk_00, ptr->unk_04, ptr->unk_08);
if (ptr->unk_44 < 2) {
return ApiStatus_BLOCK;

View File

@ -7,7 +7,7 @@ ApiStatus N(UnkFunc51)(Evt* script, s32 isInitialCall) {
script->functionTemp[0] = evt_get_variable(script, *args++);
script->functionTemp[1] = evt_get_variable(script, *args++);
script->functionTemp[2] = evt_get_variable(script, *args++);
sfx_adjust_env_sound_pos(SOUND_UNKNOWN_52, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]);
sfx_adjust_env_sound_pos(SOUND_52, 0, script->functionTemp[0], script->functionTemp[1], script->functionTemp[2]);
return ApiStatus_DONE2;
}

View File

@ -376,10 +376,10 @@ void func_802BDDD8_321928(Npc* npc) {
if (D_802BFF20 < 0x3C) {
phi_a3 = update_lerp(0, 0.0f, 100.0f, D_802BFF20, 60);
sfx_play_sound_with_params(SOUND_UNKNOWN_295, 0, 0x40, phi_a3);
sfx_play_sound_with_params(SOUND_295, 0, 0x40, phi_a3);
} else {
phi_a3 = update_lerp(0, 100.0f, 0.0f, D_802BFF20 - 60, 60);
sfx_play_sound_with_params(SOUND_UNKNOWN_295, 0, 0x40, phi_a3);
sfx_play_sound_with_params(SOUND_295, 0, 0x40, phi_a3);
}
}

View File

@ -9,10 +9,7 @@ dlabel D_80249E70
.word 0x00000102, 0x02030405, 0x06000001, 0x02020306, 0x06060000, 0x01020203, 0x06060600, 0x00010202, 0x03060606, 0x00000102, 0x02030606, 0x06000000
dlabel D_80249EA0
.word 0x2D000000, 0x00000000, 0x00000000, filemenu_draw_contents_title, 0x00000000, 0x2C000000, filemenu_update_show_title, 0x00000000, D_8024BB08, 0x3300FFFE, 0x00060044, 0x00140000, filemenu_draw_contents_stereo, 0x00000000, 0x2C000000, filemenu_update_show_options_left, 0x00000000, D_8024BAD0, 0x340000DD, 0x00060044, 0x00140000, filemenu_draw_contents_mono, 0x00000000, 0x2C000000, filemenu_update_show_options_right, 0x00000000, D_8024BAD0, 0x35000005, 0x00AB0058, 0x00100000, filemenu_draw_contents_option_left, 0x00000000, 0x2C000000, filemenu_update_show_options_bottom, 0x00000000, D_8024BB40, 0x36000000, 0x00AB0058, 0x00100000, filemenu_draw_contents_option_center, 0x00000000, 0x2C000000, filemenu_update_show_options_bottom, 0x00000000, D_8024BB78, 0x370000C3, 0x00AB0058, 0x00100000, filemenu_draw_contents_option_right, 0x00000000, 0x2C000000, filemenu_update_show_options_bottom, 0x00000000, D_8024BBB0, 0x3A000009, 0x006E0082, 0x00360000, filemenu_draw_contents_file_2_info, 0x00000000, 0x2C000000, filemenu_update_show_options_left, 0x00000000, D_8024BC58, 0x3E000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_2_title, 0x00000000, 0x3A000000, 0x00000001, 0x00000000, D_8024BD38, 0x3B000095, 0x006E0082, 0x00360000, filemenu_draw_contents_file_3_info, 0x00000000, 0x2C000000, filemenu_update_show_options_right, 0x00000000, D_8024BC90, 0x3F000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_3_title, 0x00000000, 0x3B000000, 0x00000001, 0x00000000, D_8024BD70, 0x38000009, 0x00290082, 0x00360000, filemenu_draw_contents_file_0_info, 0x00000000, 0x2C000000, filemenu_update_show_options_left, 0x00000000, D_8024BBE8, 0x3C000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_0_title, 0x00000000, 0x38000000, 0x00000001, 0x00000000, D_8024BCC8, 0x39000095, 0x00290082, 0x00360000, filemenu_draw_contents_file_1_info, 0x00000000, 0x2C000000, filemenu_update_show_options_right, 0x00000000, D_8024BC20
dlabel D_8024A074
.word 0x3D000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_1_title, 0x00000000, 0x39000000, 0x00000001, 0x00000000, D_8024BD00
.word 0x2D000000, 0x00000000, 0x00000000, filemenu_draw_contents_title, 0x00000000, 0x2C000000, filemenu_update_show_title, 0x00000000, D_8024BB08, 0x3300FFFE, 0x00060044, 0x00140000, filemenu_draw_contents_stereo, 0x00000000, 0x2C000000, filemenu_update_show_options_left, 0x00000000, D_8024BAD0, 0x340000DD, 0x00060044, 0x00140000, filemenu_draw_contents_mono, 0x00000000, 0x2C000000, filemenu_update_show_options_right, 0x00000000, D_8024BAD0, 0x35000005, 0x00AB0058, 0x00100000, filemenu_draw_contents_option_left, 0x00000000, 0x2C000000, filemenu_update_show_options_bottom, 0x00000000, D_8024BB40, 0x36000000, 0x00AB0058, 0x00100000, filemenu_draw_contents_option_center, 0x00000000, 0x2C000000, filemenu_update_show_options_bottom, 0x00000000, D_8024BB78, 0x370000C3, 0x00AB0058, 0x00100000, filemenu_draw_contents_option_right, 0x00000000, 0x2C000000, filemenu_update_show_options_bottom, 0x00000000, D_8024BBB0, 0x3A000009, 0x006E0082, 0x00360000, filemenu_draw_contents_file_2_info, 0x00000000, 0x2C000000, filemenu_update_show_options_left, 0x00000000, D_8024BC58, 0x3E000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_2_title, 0x00000000, 0x3A000000, 0x00000001, 0x00000000, D_8024BD38, 0x3B000095, 0x006E0082, 0x00360000, filemenu_draw_contents_file_3_info, 0x00000000, 0x2C000000, filemenu_update_show_options_right, 0x00000000, D_8024BC90, 0x3F000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_3_title, 0x00000000, 0x3B000000, 0x00000001, 0x00000000, D_8024BD70, 0x38000009, 0x00290082, 0x00360000, filemenu_draw_contents_file_0_info, 0x00000000, 0x2C000000, filemenu_update_show_options_left, 0x00000000, D_8024BBE8, 0x3C000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_0_title, 0x00000000, 0x38000000, 0x00000001, 0x00000000, D_8024BCC8, 0x39000095, 0x00290082, 0x00360000, filemenu_draw_contents_file_1_info, 0x00000000, 0x2C000000, filemenu_update_show_options_right, 0x00000000, D_8024BC20, 0x3D000003, 0xFFF8007C, 0x000F0000, filemenu_draw_contents_file_1_title, 0x00000000, 0x39000000, 0x00000001, 0x00000000, D_8024BD00
dlabel D_8024A098
.word 0x00000000, 0x00030300, D_80249E70, filemenu_main_init, filemenu_main_handle_input, filemenu_main_update, filemenu_main_cleanup, 0x00000000, 0x00000000, 0x00000000

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,15 @@
.include "macro.inc"
.section .data
dlabel D_8014ED90
.word 0xDF000000, 0x00000000
dlabel D_8014ED98
.word 0x00800080, 0x01FF0000, 0x00800080, 0x01FF0000
dlabel D_8014EDA8
.word 0xFFF0FFF0, 0x00000000, 0x00000000, 0x000000FF, 0x0010FFF0, 0x00000000, 0x10000000, 0x000000FF, 0x00100010, 0x00000000, 0x10001000, 0x000000FF, 0xFFF00010, 0x00000000, 0x00001000, 0x000000FF
dlabel D_8014EDE8
.word 0x01004008, D_8014EDA8, 0x06000204, 0x00000406, 0xE7000000, 0x00000000, 0xDF000000, 0x00000000, 0x00000000, 0x00000000

View File

@ -1,29 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel spr_update_player_raster_cache
/* 1020A4 802DEFB4 27BDFFE8 */ addiu $sp, $sp, -0x18
/* 1020A8 802DEFB8 AFBF0010 */ sw $ra, 0x10($sp)
/* 1020AC 802DEFBC 0C04E934 */ jal func_8013A4D0
/* 1020B0 802DEFC0 00000000 */ nop
/* 1020B4 802DEFC4 3C02802E */ lui $v0, %hi(D_802E0C58)
/* 1020B8 802DEFC8 8C420C58 */ lw $v0, %lo(D_802E0C58)($v0)
/* 1020BC 802DEFCC 1840000C */ blez $v0, .L802DF000
/* 1020C0 802DEFD0 0000202D */ daddu $a0, $zero, $zero
/* 1020C4 802DEFD4 0040282D */ daddu $a1, $v0, $zero
/* 1020C8 802DEFD8 3C03802E */ lui $v1, %hi(D_802E0C70)
/* 1020CC 802DEFDC 24630C70 */ addiu $v1, $v1, %lo(D_802E0C70)
.L802DEFE0:
/* 1020D0 802DEFE0 8C620000 */ lw $v0, ($v1)
/* 1020D4 802DEFE4 10400003 */ beqz $v0, .L802DEFF4
/* 1020D8 802DEFE8 24840001 */ addiu $a0, $a0, 1
/* 1020DC 802DEFEC 2442FFFF */ addiu $v0, $v0, -1
/* 1020E0 802DEFF0 AC620000 */ sw $v0, ($v1)
.L802DEFF4:
/* 1020E4 802DEFF4 0085102A */ slt $v0, $a0, $a1
/* 1020E8 802DEFF8 1440FFF9 */ bnez $v0, .L802DEFE0
/* 1020EC 802DEFFC 24630010 */ addiu $v1, $v1, 0x10
.L802DF000:
/* 1020F0 802DF000 8FBF0010 */ lw $ra, 0x10($sp)
/* 1020F4 802DF004 03E00008 */ jr $ra
/* 1020F8 802DF008 27BD0018 */ addiu $sp, $sp, 0x18

View File

@ -34,8 +34,8 @@ glabel filemenu_draw_contents_copy_arrow
/* 164990 80244130 8C63C094 */ lw $v1, %lo(filemenu_loadedFileIdx)($v1)
/* 164994 80244134 104301D8 */ beq $v0, $v1, .L80244898
/* 164998 80244138 24040002 */ addiu $a0, $zero, 2
/* 16499C 8024413C 3C028025 */ lui $v0, %hi(D_8024C098_C09918)
/* 1649A0 80244140 8042C098 */ lb $v0, %lo(D_8024C098_C09918)($v0)
/* 16499C 8024413C 3C028025 */ lui $v0, %hi(D_8024C098)
/* 1649A0 80244140 8042C098 */ lb $v0, %lo(D_8024C098)($v0)
/* 1649A4 80244144 104401D4 */ beq $v0, $a0, .L80244898
/* 1649A8 80244148 24020001 */ addiu $v0, $zero, 1
/* 1649AC 8024414C 10620011 */ beq $v1, $v0, .L80244194

View File

@ -51,8 +51,8 @@ glabel filemenu_init
/* 1651F0 80244990 24050003 */ addiu $a1, $zero, 3
/* 1651F4 80244994 3C138025 */ lui $s3, %hi(filemenu_menus)
/* 1651F8 80244998 8E739B84 */ lw $s3, %lo(filemenu_menus)($s3)
/* 1651FC 8024499C 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 165200 802449A0 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 1651FC 8024499C 3C018025 */ lui $at, %hi(D_8024C098)
/* 165200 802449A0 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 165204 802449A4 16800003 */ bnez $s4, .L802449B4
/* 165208 802449A8 24020002 */ addiu $v0, $zero, 2
/* 16520C 802449AC 0809126E */ j .L802449B8

View File

@ -7,8 +7,8 @@ glabel filemenu_update
/* 163A08 802431A8 2410002C */ addiu $s0, $zero, 0x2c
/* 163A0C 802431AC 2406FFFF */ addiu $a2, $zero, -1
/* 163A10 802431B0 0200282D */ daddu $a1, $s0, $zero
/* 163A14 802431B4 3C028025 */ lui $v0, %hi(D_8024C098_C09918)
/* 163A18 802431B8 8042C098 */ lb $v0, %lo(D_8024C098_C09918)($v0)
/* 163A14 802431B4 3C028025 */ lui $v0, %hi(D_8024C098)
/* 163A18 802431B8 8042C098 */ lb $v0, %lo(D_8024C098)($v0)
/* 163A1C 802431BC 3C038016 */ lui $v1, %hi(D_8015A2D0)
/* 163A20 802431C0 2463A2D0 */ addiu $v1, $v1, %lo(D_8015A2D0)
/* 163A24 802431C4 AFBF0018 */ sw $ra, 0x18($sp)

View File

@ -8,8 +8,8 @@ glabel func_80244BC4
/* 165430 80244BD0 80420004 */ lb $v0, 4($v0)
/* 165434 80244BD4 14400009 */ bnez $v0, .L80244BFC
/* 165438 80244BD8 24020001 */ addiu $v0, $zero, 1
/* 16543C 80244BDC 3C038025 */ lui $v1, %hi(D_8024C098_C09918)
/* 165440 80244BE0 8063C098 */ lb $v1, %lo(D_8024C098_C09918)($v1)
/* 16543C 80244BDC 3C038025 */ lui $v1, %hi(D_8024C098)
/* 165440 80244BE0 8063C098 */ lb $v1, %lo(D_8024C098)($v1)
/* 165444 80244BE4 14620005 */ bne $v1, $v0, .L80244BFC
/* 165448 80244BE8 00000000 */ nop
/* 16544C 80244BEC 8C820004 */ lw $v0, 4($a0)

View File

@ -1,86 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_draw_contents_file_title
/* 165CAC 8024544C 3C028025 */ lui $v0, %hi(D_8024C098_C09918)
/* 165CB0 80245450 8042C098 */ lb $v0, %lo(D_8024C098_C09918)($v0)
/* 165CB4 80245454 27BDFFC8 */ addiu $sp, $sp, -0x38
/* 165CB8 80245458 AFB10024 */ sw $s1, 0x24($sp)
/* 165CBC 8024545C 0080882D */ daddu $s1, $a0, $zero
/* 165CC0 80245460 AFB3002C */ sw $s3, 0x2c($sp)
/* 165CC4 80245464 00C0982D */ daddu $s3, $a2, $zero
/* 165CC8 80245468 AFB00020 */ sw $s0, 0x20($sp)
/* 165CCC 8024546C 00E0802D */ daddu $s0, $a3, $zero
/* 165CD0 80245470 AFBF0034 */ sw $ra, 0x34($sp)
/* 165CD4 80245474 AFB40030 */ sw $s4, 0x30($sp)
/* 165CD8 80245478 14400007 */ bnez $v0, .L80245498
/* 165CDC 8024547C AFB20028 */ sw $s2, 0x28($sp)
/* 165CE0 80245480 90A20003 */ lbu $v0, 3($a1)
/* 165CE4 80245484 14510004 */ bne $v0, $s1, .L80245498
/* 165CE8 80245488 2624003C */ addiu $a0, $s1, 0x3c
/* 165CEC 8024548C 2665FFFD */ addiu $a1, $s3, -3
/* 165CF0 80245490 0C090B80 */ jal filemenu_set_cursor_goal_pos
/* 165CF4 80245494 26060008 */ addiu $a2, $s0, 8
.L80245498:
/* 165CF8 80245498 0C0926A9 */ jal filemenu_get_menu_message
/* 165CFC 8024549C 2404001A */ addiu $a0, $zero, 0x1a
/* 165D00 802454A0 0040202D */ daddu $a0, $v0, $zero
/* 165D04 802454A4 26650005 */ addiu $a1, $s3, 5
/* 165D08 802454A8 26120001 */ addiu $s2, $s0, 1
/* 165D0C 802454AC 0240302D */ daddu $a2, $s2, $zero
/* 165D10 802454B0 240700FF */ addiu $a3, $zero, 0xff
/* 165D14 802454B4 24140001 */ addiu $s4, $zero, 1
/* 165D18 802454B8 AFA00010 */ sw $zero, 0x10($sp)
/* 165D1C 802454BC 0C09265F */ jal filemenu_draw_message
/* 165D20 802454C0 AFB40014 */ sw $s4, 0x14($sp)
/* 165D24 802454C4 3C028007 */ lui $v0, %hi(D_80077A24)
/* 165D28 802454C8 00511021 */ addu $v0, $v0, $s1
/* 165D2C 802454CC 90427A24 */ lbu $v0, %lo(D_80077A24)($v0)
/* 165D30 802454D0 1440000D */ bnez $v0, .L80245508
/* 165D34 802454D4 26240001 */ addiu $a0, $s1, 1
/* 165D38 802454D8 02342021 */ addu $a0, $s1, $s4
/* 165D3C 802454DC 26650021 */ addiu $a1, $s3, 0x21
/* 165D40 802454E0 0240302D */ daddu $a2, $s2, $zero
/* 165D44 802454E4 0280382D */ daddu $a3, $s4, $zero
/* 165D48 802454E8 240200FF */ addiu $v0, $zero, 0xff
/* 165D4C 802454EC AFA20014 */ sw $v0, 0x14($sp)
/* 165D50 802454F0 24020002 */ addiu $v0, $zero, 2
/* 165D54 802454F4 AFA00010 */ sw $zero, 0x10($sp)
/* 165D58 802454F8 0C049DA7 */ jal draw_number
/* 165D5C 802454FC AFA20018 */ sw $v0, 0x18($sp)
/* 165D60 80245500 0809155A */ j .L80245568
/* 165D64 80245504 00000000 */ nop
.L80245508:
/* 165D68 80245508 26650021 */ addiu $a1, $s3, 0x21
/* 165D6C 8024550C 0240302D */ daddu $a2, $s2, $zero
/* 165D70 80245510 24070001 */ addiu $a3, $zero, 1
/* 165D74 80245514 241000FF */ addiu $s0, $zero, 0xff
/* 165D78 80245518 24020002 */ addiu $v0, $zero, 2
/* 165D7C 8024551C AFA00010 */ sw $zero, 0x10($sp)
/* 165D80 80245520 AFB00014 */ sw $s0, 0x14($sp)
/* 165D84 80245524 0C049DA7 */ jal draw_number
/* 165D88 80245528 AFA20018 */ sw $v0, 0x18($sp)
/* 165D8C 8024552C 00112040 */ sll $a0, $s1, 1
/* 165D90 80245530 00912021 */ addu $a0, $a0, $s1
/* 165D94 80245534 000420C0 */ sll $a0, $a0, 3
/* 165D98 80245538 3C028007 */ lui $v0, %hi(D_800779CB)
/* 165D9C 8024553C 244279CB */ addiu $v0, $v0, %lo(D_800779CB)
/* 165DA0 80245540 00822021 */ addu $a0, $a0, $v0
/* 165DA4 80245544 24050008 */ addiu $a1, $zero, 8
/* 165DA8 80245548 2666002E */ addiu $a2, $s3, 0x2e
/* 165DAC 8024554C 0240382D */ daddu $a3, $s2, $zero
/* 165DB0 80245550 24020009 */ addiu $v0, $zero, 9
/* 165DB4 80245554 AFB00010 */ sw $s0, 0x10($sp)
/* 165DB8 80245558 AFA00014 */ sw $zero, 0x14($sp)
/* 165DBC 8024555C AFB40018 */ sw $s4, 0x18($sp)
/* 165DC0 80245560 0C0926AE */ jal filemenu_draw_file_name
/* 165DC4 80245564 AFA2001C */ sw $v0, 0x1c($sp)
.L80245568:
/* 165DC8 80245568 8FBF0034 */ lw $ra, 0x34($sp)
/* 165DCC 8024556C 8FB40030 */ lw $s4, 0x30($sp)
/* 165DD0 80245570 8FB3002C */ lw $s3, 0x2c($sp)
/* 165DD4 80245574 8FB20028 */ lw $s2, 0x28($sp)
/* 165DD8 80245578 8FB10024 */ lw $s1, 0x24($sp)
/* 165DDC 8024557C 8FB00020 */ lw $s0, 0x20($sp)
/* 165DE0 80245580 03E00008 */ jr $ra
/* 165DE4 80245584 27BD0038 */ addiu $sp, $sp, 0x38

View File

@ -1,67 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_draw_contents_option_center
/* 1656B4 80244E54 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 1656B8 80244E58 0080382D */ daddu $a3, $a0, $zero
/* 1656BC 80244E5C AFB00018 */ sw $s0, 0x18($sp)
/* 1656C0 80244E60 00A0802D */ daddu $s0, $a1, $zero
/* 1656C4 80244E64 AFBF002C */ sw $ra, 0x2c($sp)
/* 1656C8 80244E68 AFB40028 */ sw $s4, 0x28($sp)
/* 1656CC 80244E6C AFB30024 */ sw $s3, 0x24($sp)
/* 1656D0 80244E70 AFB20020 */ sw $s2, 0x20($sp)
/* 1656D4 80244E74 AFB1001C */ sw $s1, 0x1c($sp)
/* 1656D8 80244E78 80E30004 */ lb $v1, 4($a3)
/* 1656DC 80244E7C 28620005 */ slti $v0, $v1, 5
/* 1656E0 80244E80 1040000F */ beqz $v0, .L80244EC0
/* 1656E4 80244E84 00C0882D */ daddu $s1, $a2, $zero
/* 1656E8 80244E88 1860000D */ blez $v1, .L80244EC0
/* 1656EC 80244E8C 2412000A */ addiu $s2, $zero, 0xa
/* 1656F0 80244E90 24140012 */ addiu $s4, $zero, 0x12
/* 1656F4 80244E94 3C0400FF */ lui $a0, 0xff
/* 1656F8 80244E98 3484FF00 */ ori $a0, $a0, 0xff00
/* 1656FC 80244E9C 3C030001 */ lui $v1, 1
/* 165700 80244EA0 8CE20000 */ lw $v0, ($a3)
/* 165704 80244EA4 34630200 */ ori $v1, $v1, 0x200
/* 165708 80244EA8 00441024 */ and $v0, $v0, $a0
/* 16570C 80244EAC 14430012 */ bne $v0, $v1, .L80244EF8
/* 165710 80244EB0 0000982D */ daddu $s3, $zero, $zero
/* 165714 80244EB4 24040036 */ addiu $a0, $zero, 0x36
/* 165718 80244EB8 080913BC */ j .L80244EF0
/* 16571C 80244EBC 26050008 */ addiu $a1, $s0, 8
.L80244EC0:
/* 165720 80244EC0 2412000B */ addiu $s2, $zero, 0xb
/* 165724 80244EC4 2414000E */ addiu $s4, $zero, 0xe
/* 165728 80244EC8 3C0400FF */ lui $a0, 0xff
/* 16572C 80244ECC 3484FF00 */ ori $a0, $a0, 0xff00
/* 165730 80244ED0 3C030001 */ lui $v1, 1
/* 165734 80244ED4 8CE20000 */ lw $v0, ($a3)
/* 165738 80244ED8 34630200 */ ori $v1, $v1, 0x200
/* 16573C 80244EDC 00441024 */ and $v0, $v0, $a0
/* 165740 80244EE0 14430005 */ bne $v0, $v1, .L80244EF8
/* 165744 80244EE4 0000982D */ daddu $s3, $zero, $zero
/* 165748 80244EE8 24040036 */ addiu $a0, $zero, 0x36
/* 16574C 80244EEC 26050004 */ addiu $a1, $s0, 4
.L80244EF0:
/* 165750 80244EF0 0C090B80 */ jal filemenu_set_cursor_goal_pos
/* 165754 80244EF4 26260008 */ addiu $a2, $s1, 8
.L80244EF8:
/* 165758 80244EF8 0C0926A9 */ jal filemenu_get_menu_message
/* 16575C 80244EFC 0240202D */ daddu $a0, $s2, $zero
/* 165760 80244F00 0040202D */ daddu $a0, $v0, $zero
/* 165764 80244F04 02142821 */ addu $a1, $s0, $s4
/* 165768 80244F08 02333021 */ addu $a2, $s1, $s3
/* 16576C 80244F0C 24C60002 */ addiu $a2, $a2, 2
/* 165770 80244F10 24020001 */ addiu $v0, $zero, 1
/* 165774 80244F14 240700FF */ addiu $a3, $zero, 0xff
/* 165778 80244F18 AFA00010 */ sw $zero, 0x10($sp)
/* 16577C 80244F1C 0C09265F */ jal filemenu_draw_message
/* 165780 80244F20 AFA20014 */ sw $v0, 0x14($sp)
/* 165784 80244F24 8FBF002C */ lw $ra, 0x2c($sp)
/* 165788 80244F28 8FB40028 */ lw $s4, 0x28($sp)
/* 16578C 80244F2C 8FB30024 */ lw $s3, 0x24($sp)
/* 165790 80244F30 8FB20020 */ lw $s2, 0x20($sp)
/* 165794 80244F34 8FB1001C */ lw $s1, 0x1c($sp)
/* 165798 80244F38 8FB00018 */ lw $s0, 0x18($sp)
/* 16579C 80244F3C 03E00008 */ jr $ra
/* 1657A0 80244F40 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -1,39 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_draw_contents_option_left
/* 165630 80244DD0 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 165634 80244DD4 AFB00018 */ sw $s0, 0x18($sp)
/* 165638 80244DD8 00A0802D */ daddu $s0, $a1, $zero
/* 16563C 80244DDC AFB1001C */ sw $s1, 0x1c($sp)
/* 165640 80244DE0 AFBF0020 */ sw $ra, 0x20($sp)
/* 165644 80244DE4 80830004 */ lb $v1, 4($a0)
/* 165648 80244DE8 24020002 */ addiu $v0, $zero, 2
/* 16564C 80244DEC 10620014 */ beq $v1, $v0, .L80244E40
/* 165650 80244DF0 00C0882D */ daddu $s1, $a2, $zero
/* 165654 80244DF4 3C0200FF */ lui $v0, 0xff
/* 165658 80244DF8 8C830000 */ lw $v1, ($a0)
/* 16565C 80244DFC 3442FF00 */ ori $v0, $v0, 0xff00
/* 165660 80244E00 00621824 */ and $v1, $v1, $v0
/* 165664 80244E04 24020200 */ addiu $v0, $zero, 0x200
/* 165668 80244E08 14620003 */ bne $v1, $v0, .L80244E18
/* 16566C 80244E0C 24040035 */ addiu $a0, $zero, 0x35
/* 165670 80244E10 0C090B80 */ jal filemenu_set_cursor_goal_pos
/* 165674 80244E14 26260008 */ addiu $a2, $s1, 8
.L80244E18:
/* 165678 80244E18 0C0926A9 */ jal filemenu_get_menu_message
/* 16567C 80244E1C 24040009 */ addiu $a0, $zero, 9
/* 165680 80244E20 0040202D */ daddu $a0, $v0, $zero
/* 165684 80244E24 26050008 */ addiu $a1, $s0, 8
/* 165688 80244E28 26260002 */ addiu $a2, $s1, 2
/* 16568C 80244E2C 24020001 */ addiu $v0, $zero, 1
/* 165690 80244E30 240700FF */ addiu $a3, $zero, 0xff
/* 165694 80244E34 AFA00010 */ sw $zero, 0x10($sp)
/* 165698 80244E38 0C09265F */ jal filemenu_draw_message
/* 16569C 80244E3C AFA20014 */ sw $v0, 0x14($sp)
.L80244E40:
/* 1656A0 80244E40 8FBF0020 */ lw $ra, 0x20($sp)
/* 1656A4 80244E44 8FB1001C */ lw $s1, 0x1c($sp)
/* 1656A8 80244E48 8FB00018 */ lw $s0, 0x18($sp)
/* 1656AC 80244E4C 03E00008 */ jr $ra
/* 1656B0 80244E50 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,42 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_draw_contents_option_right
/* 1657A4 80244F44 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 1657A8 80244F48 0080382D */ daddu $a3, $a0, $zero
/* 1657AC 80244F4C AFB00018 */ sw $s0, 0x18($sp)
/* 1657B0 80244F50 00A0802D */ daddu $s0, $a1, $zero
/* 1657B4 80244F54 AFB1001C */ sw $s1, 0x1c($sp)
/* 1657B8 80244F58 AFBF0020 */ sw $ra, 0x20($sp)
/* 1657BC 80244F5C 80E30004 */ lb $v1, 4($a3)
/* 1657C0 80244F60 24020002 */ addiu $v0, $zero, 2
/* 1657C4 80244F64 10620016 */ beq $v1, $v0, .L80244FC0
/* 1657C8 80244F68 00C0882D */ daddu $s1, $a2, $zero
/* 1657CC 80244F6C 3C0400FF */ lui $a0, 0xff
/* 1657D0 80244F70 3484FF00 */ ori $a0, $a0, 0xff00
/* 1657D4 80244F74 3C030002 */ lui $v1, 2
/* 1657D8 80244F78 8CE20000 */ lw $v0, ($a3)
/* 1657DC 80244F7C 34630200 */ ori $v1, $v1, 0x200
/* 1657E0 80244F80 00441024 */ and $v0, $v0, $a0
/* 1657E4 80244F84 14430004 */ bne $v0, $v1, .L80244F98
/* 1657E8 80244F88 24040037 */ addiu $a0, $zero, 0x37
/* 1657EC 80244F8C 26050008 */ addiu $a1, $s0, 8
/* 1657F0 80244F90 0C090B80 */ jal filemenu_set_cursor_goal_pos
/* 1657F4 80244F94 26260008 */ addiu $a2, $s1, 8
.L80244F98:
/* 1657F8 80244F98 0C0926A9 */ jal filemenu_get_menu_message
/* 1657FC 80244F9C 2404000A */ addiu $a0, $zero, 0xa
/* 165800 80244FA0 0040202D */ daddu $a0, $v0, $zero
/* 165804 80244FA4 26050014 */ addiu $a1, $s0, 0x14
/* 165808 80244FA8 26260002 */ addiu $a2, $s1, 2
/* 16580C 80244FAC 24020001 */ addiu $v0, $zero, 1
/* 165810 80244FB0 240700FF */ addiu $a3, $zero, 0xff
/* 165814 80244FB4 AFA00010 */ sw $zero, 0x10($sp)
/* 165818 80244FB8 0C09265F */ jal filemenu_draw_message
/* 16581C 80244FBC AFA20014 */ sw $v0, 0x14($sp)
.L80244FC0:
/* 165820 80244FC0 8FBF0020 */ lw $ra, 0x20($sp)
/* 165824 80244FC4 8FB1001C */ lw $s1, 0x1c($sp)
/* 165828 80244FC8 8FB00018 */ lw $s0, 0x18($sp)
/* 16582C 80244FCC 03E00008 */ jr $ra
/* 165830 80244FD0 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -1,64 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
.section .rodata
dlabel jtbl_8024BF70
.word .L80244C74_1654D4, .L80244C80_1654E0, .L80244CA4_165504, .L80244C8C_1654EC, .L80244C98_1654F8, 0
.section .text
glabel filemenu_draw_contents_title
/* 165490 80244C30 27BDFFD0 */ addiu $sp, $sp, -0x30
/* 165494 80244C34 AFB20020 */ sw $s2, 0x20($sp)
/* 165498 80244C38 00A0902D */ daddu $s2, $a1, $zero
/* 16549C 80244C3C AFBF0028 */ sw $ra, 0x28($sp)
/* 1654A0 80244C40 AFB30024 */ sw $s3, 0x24($sp)
/* 1654A4 80244C44 AFB1001C */ sw $s1, 0x1c($sp)
/* 1654A8 80244C48 AFB00018 */ sw $s0, 0x18($sp)
/* 1654AC 80244C4C 80830004 */ lb $v1, 4($a0)
/* 1654B0 80244C50 2C620005 */ sltiu $v0, $v1, 5
/* 1654B4 80244C54 10400013 */ beqz $v0, .L80244CA4_165504
/* 1654B8 80244C58 00C0982D */ daddu $s3, $a2, $zero
/* 1654BC 80244C5C 00031080 */ sll $v0, $v1, 2
/* 1654C0 80244C60 3C018025 */ lui $at, %hi(jtbl_8024BF70)
/* 1654C4 80244C64 00220821 */ addu $at, $at, $v0
/* 1654C8 80244C68 8C22BF70 */ lw $v0, %lo(jtbl_8024BF70)($at)
/* 1654CC 80244C6C 00400008 */ jr $v0
/* 1654D0 80244C70 00000000 */ nop
.L80244C74_1654D4:
/* 1654D4 80244C74 24040001 */ addiu $a0, $zero, 1
/* 1654D8 80244C78 0809132B */ j .L80244CAC
/* 1654DC 80244C7C 24110009 */ addiu $s1, $zero, 9
.L80244C80_1654E0:
/* 1654E0 80244C80 24040002 */ addiu $a0, $zero, 2
/* 1654E4 80244C84 0809132B */ j .L80244CAC
/* 1654E8 80244C88 24110008 */ addiu $s1, $zero, 8
.L80244C8C_1654EC:
/* 1654EC 80244C8C 24040004 */ addiu $a0, $zero, 4
/* 1654F0 80244C90 0809132B */ j .L80244CAC
/* 1654F4 80244C94 24110019 */ addiu $s1, $zero, 0x19
.L80244C98_1654F8:
/* 1654F8 80244C98 24040005 */ addiu $a0, $zero, 5
/* 1654FC 80244C9C 0809132B */ j .L80244CAC
/* 165500 80244CA0 24110010 */ addiu $s1, $zero, 0x10
.L80244CA4_165504:
/* 165504 80244CA4 24040003 */ addiu $a0, $zero, 3
/* 165508 80244CA8 2411000A */ addiu $s1, $zero, 0xa
.L80244CAC:
/* 16550C 80244CAC 0C0926A9 */ jal filemenu_get_menu_message
/* 165510 80244CB0 24100004 */ addiu $s0, $zero, 4
/* 165514 80244CB4 0040202D */ daddu $a0, $v0, $zero
/* 165518 80244CB8 02512821 */ addu $a1, $s2, $s1
/* 16551C 80244CBC 02703021 */ addu $a2, $s3, $s0
/* 165520 80244CC0 240700FF */ addiu $a3, $zero, 0xff
/* 165524 80244CC4 AFA00010 */ sw $zero, 0x10($sp)
/* 165528 80244CC8 0C09265F */ jal filemenu_draw_message
/* 16552C 80244CCC AFA00014 */ sw $zero, 0x14($sp)
/* 165530 80244CD0 8FBF0028 */ lw $ra, 0x28($sp)
/* 165534 80244CD4 8FB30024 */ lw $s3, 0x24($sp)
/* 165538 80244CD8 8FB20020 */ lw $s2, 0x20($sp)
/* 16553C 80244CDC 8FB1001C */ lw $s1, 0x1c($sp)
/* 165540 80244CE0 8FB00018 */ lw $s0, 0x18($sp)
/* 165544 80244CE4 03E00008 */ jr $ra
/* 165548 80244CE8 27BD0030 */ addiu $sp, $sp, 0x30

View File

@ -337,8 +337,8 @@ glabel filemenu_main_handle_input
/* 166740 80245EE0 3C048025 */ lui $a0, %hi(filemenu_menus + 0xC)
/* 166744 80245EE4 8C849B90 */ lw $a0, %lo(filemenu_menus + 0xC)($a0)
/* 166748 80245EE8 24020003 */ addiu $v0, $zero, 3
/* 16674C 80245EEC 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166750 80245EF0 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 16674C 80245EEC 3C018025 */ lui $at, %hi(D_8024C098)
/* 166750 80245EF0 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166754 80245EF4 08091A38 */ j .L802468E0
/* 166758 80245EF8 A0800004 */ sb $zero, 4($a0)
.L80245EFC:
@ -533,8 +533,8 @@ glabel filemenu_main_handle_input
/* 166A2C 802461CC 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 166A30 802461D0 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 166A34 802461D4 24020001 */ addiu $v0, $zero, 1
/* 166A38 802461D8 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166A3C 802461DC A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166A38 802461D8 3C018025 */ lui $at, %hi(D_8024C098)
/* 166A3C 802461DC A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166A40 802461E0 08091A37 */ j .L802468DC
/* 166A44 802461E4 24020004 */ addiu $v0, $zero, 4
.L802461E8_166A48:
@ -637,8 +637,8 @@ glabel filemenu_main_handle_input
/* 166BB4 80246354 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 166BB8 80246358 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 166BBC 8024635C 00C0102D */ daddu $v0, $a2, $zero
/* 166BC0 80246360 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166BC4 80246364 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166BC0 80246360 3C018025 */ lui $at, %hi(D_8024C098)
/* 166BC4 80246364 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166BC8 80246368 08091A38 */ j .L802468E0
/* 166BCC 8024636C A0800004 */ sb $zero, 4($a0)
.L80246370_166BD0:
@ -725,8 +725,8 @@ glabel filemenu_main_handle_input
/* 166CFC 8024649C 0C05272D */ jal sfx_play_sound
/* 166D00 802464A0 240400C9 */ addiu $a0, $zero, 0xc9
/* 166D04 802464A4 24020002 */ addiu $v0, $zero, 2
/* 166D08 802464A8 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166D0C 802464AC A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166D08 802464A8 3C018025 */ lui $at, %hi(D_8024C098)
/* 166D0C 802464AC A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166D10 802464B0 24020002 */ addiu $v0, $zero, 2
/* 166D14 802464B4 3C048016 */ lui $a0, %hi(gWindows)
/* 166D18 802464B8 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -891,8 +891,8 @@ glabel filemenu_main_handle_input
/* 166F70 80246710 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 166F74 80246714 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 166F78 80246718 00C0102D */ daddu $v0, $a2, $zero
/* 166F7C 8024671C 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166F80 80246720 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166F7C 8024671C 3C018025 */ lui $at, %hi(D_8024C098)
/* 166F80 80246720 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166F84 80246724 08091A37 */ j .L802468DC
/* 166F88 80246728 24020003 */ addiu $v0, $zero, 3
.L8024672C_166F8C:
@ -923,8 +923,8 @@ glabel filemenu_main_handle_input
/* 166FE8 80246788 3C058014 */ lui $a1, %hi(main_menu_window_update)
/* 166FEC 8024678C 24A57650 */ addiu $a1, $a1, %lo(main_menu_window_update)
/* 166FF0 80246790 24020002 */ addiu $v0, $zero, 2
/* 166FF4 80246794 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 166FF8 80246798 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 166FF4 80246794 3C018025 */ lui $at, %hi(D_8024C098)
/* 166FF8 80246798 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 166FFC 8024679C 3C028025 */ lui $v0, %hi(filemenu_menus + 0x8)
/* 167000 802467A0 8C429B8C */ lw $v0, %lo(filemenu_menus + 0x8)($v0)
/* 167004 802467A4 24100001 */ addiu $s0, $zero, 1
@ -1007,8 +1007,8 @@ glabel filemenu_main_handle_input
/* 167124 802468C4 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 167128 802468C8 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 16712C 802468CC 00C0102D */ daddu $v0, $a2, $zero
/* 167130 802468D0 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167134 802468D4 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 167130 802468D0 3C018025 */ lui $at, %hi(D_8024C098)
/* 167134 802468D4 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167138 802468D8 00C0102D */ daddu $v0, $a2, $zero
.L802468DC:
/* 16713C 802468DC A0820004 */ sb $v0, 4($a0)

View File

@ -1,155 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel filemenu_main_init
/* 166068 80245808 27BDFFD8 */ addiu $sp, $sp, -0x28
/* 16606C 8024580C AFB3001C */ sw $s3, 0x1c($sp)
/* 166070 80245810 0080982D */ daddu $s3, $a0, $zero
/* 166074 80245814 AFB00010 */ sw $s0, 0x10($sp)
/* 166078 80245818 0000802D */ daddu $s0, $zero, $zero
/* 16607C 8024581C AFB20018 */ sw $s2, 0x18($sp)
/* 166080 80245820 3C128025 */ lui $s2, %hi(filemenu_hudElemIDs)
/* 166084 80245824 2652C0B0 */ addiu $s2, $s2, %lo(filemenu_hudElemIDs)
/* 166088 80245828 AFB10014 */ sw $s1, 0x14($sp)
/* 16608C 8024582C 3C118025 */ lui $s1, %hi(D_80249E20)
/* 166090 80245830 26319E20 */ addiu $s1, $s1, %lo(D_80249E20)
/* 166094 80245834 AFBF0020 */ sw $ra, 0x20($sp)
.L80245838:
/* 166098 80245838 8E240000 */ lw $a0, ($s1)
/* 16609C 8024583C 26310004 */ addiu $s1, $s1, 4
/* 1660A0 80245840 0C050529 */ jal create_hud_element
/* 1660A4 80245844 26100001 */ addiu $s0, $s0, 1
/* 1660A8 80245848 0040202D */ daddu $a0, $v0, $zero
/* 1660AC 8024584C 24050080 */ addiu $a1, $zero, 0x80
/* 1660B0 80245850 0C051280 */ jal set_hud_element_flags
/* 1660B4 80245854 AE440000 */ sw $a0, ($s2)
/* 1660B8 80245858 2A020014 */ slti $v0, $s0, 0x14
/* 1660BC 8024585C 1440FFF6 */ bnez $v0, .L80245838
/* 1660C0 80245860 26520004 */ addiu $s2, $s2, 4
/* 1660C4 80245864 2410000D */ addiu $s0, $zero, 0xd
/* 1660C8 80245868 3C028025 */ lui $v0, %hi(D_8024A074)
/* 1660CC 8024586C 2442A074 */ addiu $v0, $v0, %lo(D_8024A074)
.L80245870:
/* 1660D0 80245870 AC530010 */ sw $s3, 0x10($v0)
/* 1660D4 80245874 2610FFFF */ addiu $s0, $s0, -1
/* 1660D8 80245878 0601FFFD */ bgez $s0, .L80245870
/* 1660DC 8024587C 2442FFDC */ addiu $v0, $v0, -0x24
/* 1660E0 80245880 3C048025 */ lui $a0, %hi(D_80249EA0)
/* 1660E4 80245884 24849EA0 */ addiu $a0, $a0, %lo(D_80249EA0)
/* 1660E8 80245888 0C051FCC */ jal setup_pause_menu_tab
/* 1660EC 8024588C 2405000E */ addiu $a1, $zero, 0xe
/* 1660F0 80245890 82620004 */ lb $v0, 4($s3)
/* 1660F4 80245894 82630005 */ lb $v1, 5($s3)
/* 1660F8 80245898 00430018 */ mult $v0, $v1
/* 1660FC 8024589C 00003012 */ mflo $a2
/* 166100 802458A0 82620006 */ lb $v0, 6($s3)
/* 166104 802458A4 00000000 */ nop
/* 166108 802458A8 00C20018 */ mult $a2, $v0
/* 16610C 802458AC 00002012 */ mflo $a0
/* 166110 802458B0 82620002 */ lb $v0, 2($s3)
/* 166114 802458B4 00000000 */ nop
/* 166118 802458B8 00620018 */ mult $v1, $v0
/* 16611C 802458BC 00001812 */ mflo $v1
/* 166120 802458C0 00831821 */ addu $v1, $a0, $v1
/* 166124 802458C4 82640001 */ lb $a0, 1($s3)
/* 166128 802458C8 8E620008 */ lw $v0, 8($s3)
/* 16612C 802458CC 00641821 */ addu $v1, $v1, $a0
/* 166130 802458D0 00431021 */ addu $v0, $v0, $v1
/* 166134 802458D4 90420000 */ lbu $v0, ($v0)
/* 166138 802458D8 82630004 */ lb $v1, 4($s3)
/* 16613C 802458DC A2620003 */ sb $v0, 3($s3)
/* 166140 802458E0 24020002 */ addiu $v0, $zero, 2
/* 166144 802458E4 14620006 */ bne $v1, $v0, .L80245900
/* 166148 802458E8 24020001 */ addiu $v0, $zero, 1
/* 16614C 802458EC 3C038016 */ lui $v1, %hi(gWindows)
/* 166150 802458F0 24639D50 */ addiu $v1, $v1, %lo(gWindows)
/* 166154 802458F4 A46205AE */ sh $v0, 0x5ae($v1)
/* 166158 802458F8 08091644 */ j .L80245910
/* 16615C 802458FC 240200D3 */ addiu $v0, $zero, 0xd3
.L80245900:
/* 166160 80245900 3C038016 */ lui $v1, %hi(gWindows)
/* 166164 80245904 24639D50 */ addiu $v1, $v1, %lo(gWindows)
/* 166168 80245908 A46205AE */ sh $v0, 0x5ae($v1)
/* 16616C 8024590C 240200A2 */ addiu $v0, $zero, 0xa2
.L80245910:
/* 166170 80245910 A46205B0 */ sh $v0, 0x5b0($v1)
/* 166174 80245914 24020019 */ addiu $v0, $zero, 0x19
/* 166178 80245918 A46205B2 */ sh $v0, 0x5b2($v1)
/* 16617C 8024591C 3C048016 */ lui $a0, %hi(gWindows)
/* 166180 80245920 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 166184 80245924 948205B0 */ lhu $v0, 0x5b0($a0)
/* 166188 80245928 00021400 */ sll $v0, $v0, 0x10
/* 16618C 8024592C 00021C03 */ sra $v1, $v0, 0x10
/* 166190 80245930 000217C2 */ srl $v0, $v0, 0x1f
/* 166194 80245934 00621821 */ addu $v1, $v1, $v0
/* 166198 80245938 00032843 */ sra $a1, $v1, 1
/* 16619C 8024593C 808305A3 */ lb $v1, 0x5a3($a0)
/* 1661A0 80245940 2402FFFF */ addiu $v0, $zero, -1
/* 1661A4 80245944 1062000B */ beq $v1, $v0, .L80245974
/* 1661A8 80245948 248605AC */ addiu $a2, $a0, 0x5ac
/* 1661AC 8024594C 00031140 */ sll $v0, $v1, 5
/* 1661B0 80245950 00441021 */ addu $v0, $v0, $a0
/* 1661B4 80245954 94420010 */ lhu $v0, 0x10($v0)
/* 1661B8 80245958 00021400 */ sll $v0, $v0, 0x10
/* 1661BC 8024595C 00021C03 */ sra $v1, $v0, 0x10
/* 1661C0 80245960 000217C2 */ srl $v0, $v0, 0x1f
/* 1661C4 80245964 00621821 */ addu $v1, $v1, $v0
/* 1661C8 80245968 00031843 */ sra $v1, $v1, 1
/* 1661CC 8024596C 08091661 */ j .L80245984
/* 1661D0 80245970 00651023 */ subu $v0, $v1, $a1
.L80245974:
/* 1661D4 80245974 240200A0 */ addiu $v0, $zero, 0xa0
/* 1661D8 80245978 00451023 */ subu $v0, $v0, $a1
/* 1661DC 8024597C 3C048016 */ lui $a0, %hi(gWindows)
/* 1661E0 80245980 24849D50 */ addiu $a0, $a0, %lo(gWindows)
.L80245984:
/* 1661E4 80245984 A4C20000 */ sh $v0, ($a2)
/* 1661E8 80245988 948206D0 */ lhu $v0, 0x6d0($a0)
/* 1661EC 8024598C 00021400 */ sll $v0, $v0, 0x10
/* 1661F0 80245990 00021C03 */ sra $v1, $v0, 0x10
/* 1661F4 80245994 000217C2 */ srl $v0, $v0, 0x1f
/* 1661F8 80245998 00621821 */ addu $v1, $v1, $v0
/* 1661FC 8024599C 00032843 */ sra $a1, $v1, 1
/* 166200 802459A0 808306C3 */ lb $v1, 0x6c3($a0)
/* 166204 802459A4 2402FFFF */ addiu $v0, $zero, -1
/* 166208 802459A8 1062000B */ beq $v1, $v0, .L802459D8
/* 16620C 802459AC 248606CC */ addiu $a2, $a0, 0x6cc
/* 166210 802459B0 00031140 */ sll $v0, $v1, 5
/* 166214 802459B4 00441021 */ addu $v0, $v0, $a0
/* 166218 802459B8 94420010 */ lhu $v0, 0x10($v0)
/* 16621C 802459BC 00021400 */ sll $v0, $v0, 0x10
/* 166220 802459C0 00021C03 */ sra $v1, $v0, 0x10
/* 166224 802459C4 000217C2 */ srl $v0, $v0, 0x1f
/* 166228 802459C8 00621821 */ addu $v1, $v1, $v0
/* 16622C 802459CC 00031843 */ sra $v1, $v1, 1
/* 166230 802459D0 08091678 */ j .L802459E0
/* 166234 802459D4 00651023 */ subu $v0, $v1, $a1
.L802459D8:
/* 166238 802459D8 240200A0 */ addiu $v0, $zero, 0xa0
/* 16623C 802459DC 00451023 */ subu $v0, $v0, $a1
.L802459E0:
/* 166240 802459E0 A4C20000 */ sh $v0, ($a2)
/* 166244 802459E4 82620004 */ lb $v0, 4($s3)
/* 166248 802459E8 1040000C */ beqz $v0, .L80245A1C
/* 16624C 802459EC 24040035 */ addiu $a0, $zero, 0x35
/* 166250 802459F0 0C051F9F */ jal set_window_update
/* 166254 802459F4 24050002 */ addiu $a1, $zero, 2
/* 166258 802459F8 24040037 */ addiu $a0, $zero, 0x37
/* 16625C 802459FC 0C051F9F */ jal set_window_update
/* 166260 80245A00 24050002 */ addiu $a1, $zero, 2
/* 166264 80245A04 24040033 */ addiu $a0, $zero, 0x33
/* 166268 80245A08 0C051F9F */ jal set_window_update
/* 16626C 80245A0C 24050002 */ addiu $a1, $zero, 2
/* 166270 80245A10 24040034 */ addiu $a0, $zero, 0x34
/* 166274 80245A14 0C051F9F */ jal set_window_update
/* 166278 80245A18 24050002 */ addiu $a1, $zero, 2
.L80245A1C:
/* 16627C 80245A1C 24020001 */ addiu $v0, $zero, 1
/* 166280 80245A20 A2620000 */ sb $v0, ($s3)
/* 166284 80245A24 8FBF0020 */ lw $ra, 0x20($sp)
/* 166288 80245A28 8FB3001C */ lw $s3, 0x1c($sp)
/* 16628C 80245A2C 8FB20018 */ lw $s2, 0x18($sp)
/* 166290 80245A30 8FB10014 */ lw $s1, 0x14($sp)
/* 166294 80245A34 8FB00010 */ lw $s0, 0x10($sp)
/* 166298 80245A38 03E00008 */ jr $ra
/* 16629C 80245A3C 27BD0028 */ addiu $sp, $sp, 0x28

View File

@ -54,8 +54,8 @@ glabel filemenu_yesno_draw_options_contents
/* 167610 80246DB0 AFA00010 */ sw $zero, 0x10($sp)
/* 167614 80246DB4 0C09265F */ jal filemenu_draw_message
/* 167618 80246DB8 AFA00014 */ sw $zero, 0x14($sp)
/* 16761C 80246DBC 3C038025 */ lui $v1, %hi(D_8024C098_C09918)
/* 167620 80246DC0 8063C098 */ lb $v1, %lo(D_8024C098_C09918)($v1)
/* 16761C 80246DBC 3C038025 */ lui $v1, %hi(D_8024C098)
/* 167620 80246DC0 8063C098 */ lb $v1, %lo(D_8024C098)($v1)
/* 167624 80246DC4 24020001 */ addiu $v0, $zero, 1
/* 167628 80246DC8 1462000C */ bne $v1, $v0, .L80246DFC
/* 16762C 80246DCC 00000000 */ nop

View File

@ -123,8 +123,8 @@ glabel filemenu_yesno_handle_input
/* 167BD8 80247378 8C639B8C */ lw $v1, %lo(filemenu_menus + 0x8)($v1)
/* 167BDC 8024737C 3C048016 */ lui $a0, %hi(gWindows)
/* 167BE0 80247380 24849D50 */ addiu $a0, $a0, %lo(gWindows)
/* 167BE4 80247384 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167BE8 80247388 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 167BE4 80247384 3C018025 */ lui $at, %hi(D_8024C098)
/* 167BE8 80247388 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167BEC 8024738C 240200B6 */ addiu $v0, $zero, 0xb6
/* 167BF0 80247390 A0600004 */ sb $zero, 4($v1)
/* 167BF4 80247394 808305E3 */ lb $v1, 0x5e3($a0)
@ -218,8 +218,8 @@ glabel filemenu_yesno_handle_input
/* 167D40 802474E0 00000000 */ nop
.L802474E4_167D44:
/* 167D44 802474E4 24020002 */ addiu $v0, $zero, 2
/* 167D48 802474E8 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167D4C 802474EC A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 167D48 802474E8 3C018025 */ lui $at, %hi(D_8024C098)
/* 167D4C 802474EC A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167D50 802474F0 24020002 */ addiu $v0, $zero, 2
/* 167D54 802474F4 3C048016 */ lui $a0, %hi(gWindows)
/* 167D58 802474F8 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -319,8 +319,8 @@ glabel filemenu_yesno_handle_input
/* 167EC0 80247660 24020001 */ addiu $v0, $zero, 1
.L80247664_167EC4:
/* 167EC4 80247664 24020002 */ addiu $v0, $zero, 2
/* 167EC8 80247668 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 167ECC 8024766C A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 167EC8 80247668 3C018025 */ lui $at, %hi(D_8024C098)
/* 167ECC 8024766C A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 167ED0 80247670 24020001 */ addiu $v0, $zero, 1
/* 167ED4 80247674 3C048016 */ lui $a0, %hi(gWindows)
/* 167ED8 80247678 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -515,8 +515,8 @@ glabel filemenu_yesno_handle_input
/* 1681B0 80247950 0C051F9F */ jal set_window_update
/* 1681B4 80247954 24040032 */ addiu $a0, $zero, 0x32
/* 1681B8 80247958 24020002 */ addiu $v0, $zero, 2
/* 1681BC 8024795C 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 1681C0 80247960 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 1681BC 8024795C 3C018025 */ lui $at, %hi(D_8024C098)
/* 1681C0 80247960 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 1681C4 80247964 24020003 */ addiu $v0, $zero, 3
/* 1681C8 80247968 3C048016 */ lui $a0, %hi(gWindows)
/* 1681CC 8024796C 24849D50 */ addiu $a0, $a0, %lo(gWindows)
@ -614,16 +614,16 @@ glabel filemenu_yesno_handle_input
/* 16831C 80247ABC 00400008 */ jr $v0
/* 168320 80247AC0 00000000 */ nop
.L80247AC4_168324:
/* 168324 80247AC4 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168328 80247AC8 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 168324 80247AC4 3C018025 */ lui $at, %hi(D_8024C098)
/* 168328 80247AC8 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 16832C 80247ACC 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 168330 80247AD0 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168334 80247AD4 08091EEC */ j .L80247BB0
/* 168338 80247AD8 24040032 */ addiu $a0, $zero, 0x32
.L80247ADC_16833C:
/* 16833C 80247ADC 24020003 */ addiu $v0, $zero, 3
/* 168340 80247AE0 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168344 80247AE4 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 168340 80247AE0 3C018025 */ lui $at, %hi(D_8024C098)
/* 168344 80247AE4 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 168348 80247AE8 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 16834C 80247AEC 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168350 80247AF0 08091EEC */ j .L80247BB0
@ -634,8 +634,8 @@ glabel filemenu_yesno_handle_input
/* 168360 80247B00 2610381C */ addiu $s0, $s0, %lo(filemenu_update_show_with_rotation)
/* 168364 80247B04 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 168368 80247B08 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 16836C 80247B0C 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168370 80247B10 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 16836C 80247B0C 3C018025 */ lui $at, %hi(D_8024C098)
/* 168370 80247B10 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 168374 80247B14 90510003 */ lbu $s1, 3($v0)
/* 168378 80247B18 0C051F9F */ jal set_window_update
/* 16837C 80247B1C 0200282D */ daddu $a1, $s0, $zero
@ -700,16 +700,16 @@ glabel filemenu_yesno_handle_input
/* 168460 80247C00 00400008 */ jr $v0
/* 168464 80247C04 00000000 */ nop
.L80247C08_168468:
/* 168468 80247C08 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 16846C 80247C0C A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 168468 80247C08 3C018025 */ lui $at, %hi(D_8024C098)
/* 16846C 80247C0C A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 168470 80247C10 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 168474 80247C14 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168478 80247C18 08091F3D */ j .L80247CF4
/* 16847C 80247C1C 24040032 */ addiu $a0, $zero, 0x32
.L80247C20_168480:
/* 168480 80247C20 24020003 */ addiu $v0, $zero, 3
/* 168484 80247C24 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 168488 80247C28 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 168484 80247C24 3C018025 */ lui $at, %hi(D_8024C098)
/* 168488 80247C28 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 16848C 80247C2C 3C058024 */ lui $a1, %hi(filemenu_update_hidden_name_confirm)
/* 168490 80247C30 24A53EEC */ addiu $a1, $a1, %lo(filemenu_update_hidden_name_confirm)
/* 168494 80247C34 08091F3D */ j .L80247CF4
@ -720,8 +720,8 @@ glabel filemenu_yesno_handle_input
/* 1684A4 80247C44 2610381C */ addiu $s0, $s0, %lo(filemenu_update_show_with_rotation)
/* 1684A8 80247C48 3C028025 */ lui $v0, %hi(filemenu_menus)
/* 1684AC 80247C4C 8C429B84 */ lw $v0, %lo(filemenu_menus)($v0)
/* 1684B0 80247C50 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 1684B4 80247C54 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 1684B0 80247C50 3C018025 */ lui $at, %hi(D_8024C098)
/* 1684B4 80247C54 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 1684B8 80247C58 90510003 */ lbu $s1, 3($v0)
/* 1684BC 80247C5C 0C051F9F */ jal set_window_update
/* 1684C0 80247C60 0200282D */ daddu $a1, $s0, $zero

View File

@ -389,8 +389,8 @@ glabel filemenu_choose_name_handle_input
/* 1699C8 80249168 2404003B */ addiu $a0, $zero, 0x3b
/* 1699CC 8024916C 0C051F9F */ jal set_window_update
/* 1699D0 80249170 0200282D */ daddu $a1, $s0, $zero
/* 1699D4 80249174 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 1699D8 80249178 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at)
/* 1699D4 80249174 3C018025 */ lui $at, %hi(D_8024C098)
/* 1699D8 80249178 A020C098 */ sb $zero, %lo(D_8024C098)($at)
/* 1699DC 8024917C 080924C4 */ j .L80249310
/* 1699E0 80249180 00000000 */ nop
.L80249184:
@ -498,8 +498,8 @@ glabel filemenu_choose_name_handle_input
/* 169B50 802492F0 3C048025 */ lui $a0, %hi(filemenu_menus + 0x4)
/* 169B54 802492F4 8C849B88 */ lw $a0, %lo(filemenu_menus + 0x4)($a0)
/* 169B58 802492F8 24020001 */ addiu $v0, $zero, 1
/* 169B5C 802492FC 3C018025 */ lui $at, %hi(D_8024C098_C09918)
/* 169B60 80249300 A022C098 */ sb $v0, %lo(D_8024C098_C09918)($at)
/* 169B5C 802492FC 3C018025 */ lui $at, %hi(D_8024C098)
/* 169B60 80249300 A022C098 */ sb $v0, %lo(D_8024C098)($at)
/* 169B64 80249304 24020002 */ addiu $v0, $zero, 2
/* 169B68 80249308 0C090B65 */ jal filemenu_set_selected
/* 169B6C 8024930C A0820004 */ sb $v0, 4($a0)

View File

@ -466,8 +466,8 @@ glabel filemenu_draw_contents_choose_name
/* 169220 802489C0 1440FF9A */ bnez $v0, .L8024882C
/* 169224 802489C4 00000000 */ nop
.L802489C8:
/* 169228 802489C8 3C038025 */ lui $v1, %hi(D_8024C098_C09918)
/* 16922C 802489CC 8063C098 */ lb $v1, %lo(D_8024C098_C09918)($v1)
/* 169228 802489C8 3C038025 */ lui $v1, %hi(D_8024C098)
/* 16922C 802489CC 8063C098 */ lb $v1, %lo(D_8024C098)($v1)
/* 169230 802489D0 24020003 */ addiu $v0, $zero, 3
/* 169234 802489D4 1462001D */ bne $v1, $v0, .L80248A4C
/* 169238 802489D8 00000000 */ nop

View File

@ -1,7 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel btl_cam_unfreeze
/* 17CEE0 8024E600 3C018028 */ lui $at, %hi(D_80280CE0)
/* 17CEE4 8024E604 03E00008 */ jr $ra
/* 17CEE8 8024E608 A0200CE0 */ sb $zero, %lo(D_80280CE0)($at)

File diff suppressed because it is too large Load Diff

View File

@ -1,243 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024B5FC
/* 179EDC 8024B5FC 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 179EE0 8024B600 F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 179EE4 8024B604 3C01802A */ lui $at, %hi(D_8029F270)
/* 179EE8 8024B608 C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
/* 179EEC 8024B60C F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 179EF0 8024B610 3C01802A */ lui $at, %hi(D_8029F274)
/* 179EF4 8024B614 C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
/* 179EF8 8024B618 F7BE0048 */ sdc1 $f30, 0x48($sp)
/* 179EFC 8024B61C 3C01802A */ lui $at, %hi(D_8029F278)
/* 179F00 8024B620 C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
/* 179F04 8024B624 AFB00018 */ sw $s0, 0x18($sp)
/* 179F08 8024B628 3C10800B */ lui $s0, %hi(gCameras+0x558)
/* 179F0C 8024B62C 261022D8 */ addiu $s0, $s0, %lo(gCameras+0x558)
/* 179F10 8024B630 AFBF001C */ sw $ra, 0x1c($sp)
/* 179F14 8024B634 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 179F18 8024B638 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 179F1C 8024B63C F7B40020 */ sdc1 $f20, 0x20($sp)
/* 179F20 8024B640 10A00029 */ beqz $a1, .L8024B6E8
/* 179F24 8024B644 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 179F28 8024B648 8602001E */ lh $v0, 0x1e($s0)
/* 179F2C 8024B64C 86040026 */ lh $a0, 0x26($s0)
/* 179F30 8024B650 86030024 */ lh $v1, 0x24($s0)
/* 179F34 8024B654 44820000 */ mtc1 $v0, $f0
/* 179F38 8024B658 00000000 */ nop
/* 179F3C 8024B65C 46800020 */ cvt.s.w $f0, $f0
/* 179F40 8024B660 86020022 */ lh $v0, 0x22($s0)
/* 179F44 8024B664 3C01802A */ lui $at, %hi(D_8029F28C)
/* 179F48 8024B668 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 179F4C 8024B66C 44820000 */ mtc1 $v0, $f0
/* 179F50 8024B670 00000000 */ nop
/* 179F54 8024B674 46800020 */ cvt.s.w $f0, $f0
/* 179F58 8024B678 3C01802A */ lui $at, %hi(D_8029F294)
/* 179F5C 8024B67C E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 179F60 8024B680 44830000 */ mtc1 $v1, $f0
/* 179F64 8024B684 00000000 */ nop
/* 179F68 8024B688 46800020 */ cvt.s.w $f0, $f0
/* 179F6C 8024B68C 3C01802A */ lui $at, %hi(D_8029F290)
/* 179F70 8024B690 E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 179F74 8024B694 04820001 */ bltzl $a0, .L8024B69C
/* 179F78 8024B698 248400FF */ addiu $a0, $a0, 0xff
.L8024B69C:
/* 179F7C 8024B69C 00041203 */ sra $v0, $a0, 8
/* 179F80 8024B6A0 C6020054 */ lwc1 $f2, 0x54($s0)
/* 179F84 8024B6A4 C6040058 */ lwc1 $f4, 0x58($s0)
/* 179F88 8024B6A8 C606005C */ lwc1 $f6, 0x5c($s0)
/* 179F8C 8024B6AC 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 179F90 8024B6B0 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 179F94 8024B6B4 44820000 */ mtc1 $v0, $f0
/* 179F98 8024B6B8 00000000 */ nop
/* 179F9C 8024B6BC 46800020 */ cvt.s.w $f0, $f0
/* 179FA0 8024B6C0 3C01802A */ lui $at, %hi(D_8029F298)
/* 179FA4 8024B6C4 E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 179FA8 8024B6C8 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 179FAC 8024B6CC E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 179FB0 8024B6D0 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 179FB4 8024B6D4 E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
/* 179FB8 8024B6D8 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 179FBC 8024B6DC E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
/* 179FC0 8024B6E0 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 179FC4 8024B6E4 A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L8024B6E8:
/* 179FC8 8024B6E8 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 179FCC 8024B6EC 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 179FD0 8024B6F0 14400027 */ bnez $v0, .L8024B790
/* 179FD4 8024B6F4 00000000 */ nop
/* 179FD8 8024B6F8 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 179FDC 8024B6FC 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 179FE0 8024B700 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 179FE4 8024B704 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 179FE8 8024B708 3C013F80 */ lui $at, 0x3f80
/* 179FEC 8024B70C 4481C000 */ mtc1 $at, $f24
/* 179FF0 8024B710 44822000 */ mtc1 $v0, $f4
/* 179FF4 8024B714 00000000 */ nop
/* 179FF8 8024B718 46802120 */ cvt.s.w $f4, $f4
/* 179FFC 8024B71C 44830000 */ mtc1 $v1, $f0
/* 17A000 8024B720 00000000 */ nop
/* 17A004 8024B724 46800020 */ cvt.s.w $f0, $f0
/* 17A008 8024B728 46002103 */ div.s $f4, $f4, $f0
/* 17A00C 8024B72C 4604C301 */ sub.s $f12, $f24, $f4
/* 17A010 8024B730 3C014049 */ lui $at, 0x4049
/* 17A014 8024B734 34210FD0 */ ori $at, $at, 0xfd0
/* 17A018 8024B738 4481B000 */ mtc1 $at, $f22
/* 17A01C 8024B73C 00000000 */ nop
/* 17A020 8024B740 46166302 */ mul.s $f12, $f12, $f22
/* 17A024 8024B744 00000000 */ nop
/* 17A028 8024B748 3C013F00 */ lui $at, 0x3f00
/* 17A02C 8024B74C 4481A000 */ mtc1 $at, $f20
/* 17A030 8024B750 00000000 */ nop
/* 17A034 8024B754 46146302 */ mul.s $f12, $f12, $f20
/* 17A038 8024B758 0C00A85B */ jal sin_rad
/* 17A03C 8024B75C 00000000 */ nop
/* 17A040 8024B760 46160002 */ mul.s $f0, $f0, $f22
/* 17A044 8024B764 00000000 */ nop
/* 17A048 8024B768 46140302 */ mul.s $f12, $f0, $f20
/* 17A04C 8024B76C 0C00A85B */ jal sin_rad
/* 17A050 8024B770 00000000 */ nop
/* 17A054 8024B774 46160002 */ mul.s $f0, $f0, $f22
/* 17A058 8024B778 00000000 */ nop
/* 17A05C 8024B77C 46140302 */ mul.s $f12, $f0, $f20
/* 17A060 8024B780 0C00A85B */ jal sin_rad
/* 17A064 8024B784 00000000 */ nop
/* 17A068 8024B788 08092DEF */ j .L8024B7BC
/* 17A06C 8024B78C 4600C101 */ sub.s $f4, $f24, $f0
.L8024B790:
/* 17A070 8024B790 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17A074 8024B794 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17A078 8024B798 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17A07C 8024B79C 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17A080 8024B7A0 44822000 */ mtc1 $v0, $f4
/* 17A084 8024B7A4 00000000 */ nop
/* 17A088 8024B7A8 46802120 */ cvt.s.w $f4, $f4
/* 17A08C 8024B7AC 44830000 */ mtc1 $v1, $f0
/* 17A090 8024B7B0 00000000 */ nop
/* 17A094 8024B7B4 46800020 */ cvt.s.w $f0, $f0
/* 17A098 8024B7B8 46002103 */ div.s $f4, $f4, $f0
.L8024B7BC:
/* 17A09C 8024B7BC 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17A0A0 8024B7C0 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
/* 17A0A4 8024B7C4 4604A502 */ mul.s $f20, $f20, $f4
/* 17A0A8 8024B7C8 00000000 */ nop
/* 17A0AC 8024B7CC 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17A0B0 8024B7D0 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
/* 17A0B4 8024B7D4 46049482 */ mul.s $f18, $f18, $f4
/* 17A0B8 8024B7D8 00000000 */ nop
/* 17A0BC 8024B7DC 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17A0C0 8024B7E0 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
/* 17A0C4 8024B7E4 46048402 */ mul.s $f16, $f16, $f4
/* 17A0C8 8024B7E8 00000000 */ nop
/* 17A0CC 8024B7EC 3C01802A */ lui $at, %hi(D_8029F298)
/* 17A0D0 8024B7F0 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
/* 17A0D4 8024B7F4 46043182 */ mul.s $f6, $f6, $f4
/* 17A0D8 8024B7F8 00000000 */ nop
/* 17A0DC 8024B7FC 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17A0E0 8024B800 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
/* 17A0E4 8024B804 46046302 */ mul.s $f12, $f12, $f4
/* 17A0E8 8024B808 00000000 */ nop
/* 17A0EC 8024B80C 3C01802A */ lui $at, %hi(D_8029F290)
/* 17A0F0 8024B810 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 17A0F4 8024B814 46044202 */ mul.s $f8, $f8, $f4
/* 17A0F8 8024B818 00000000 */ nop
/* 17A0FC 8024B81C 3C013F80 */ lui $at, 0x3f80
/* 17A100 8024B820 44811000 */ mtc1 $at, $f2
/* 17A104 8024B824 00000000 */ nop
/* 17A108 8024B828 46041081 */ sub.s $f2, $f2, $f4
/* 17A10C 8024B82C 4602D682 */ mul.s $f26, $f26, $f2
/* 17A110 8024B830 00000000 */ nop
/* 17A114 8024B834 C7BC0010 */ lwc1 $f28, 0x10($sp)
/* 17A118 8024B838 4602E602 */ mul.s $f24, $f28, $f2
/* 17A11C 8024B83C 00000000 */ nop
/* 17A120 8024B840 3C02802A */ lui $v0, %hi(D_8029F286)
/* 17A124 8024B844 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 17A128 8024B848 44820000 */ mtc1 $v0, $f0
/* 17A12C 8024B84C 00000000 */ nop
/* 17A130 8024B850 46800020 */ cvt.s.w $f0, $f0
/* 17A134 8024B854 46020002 */ mul.s $f0, $f0, $f2
/* 17A138 8024B858 00000000 */ nop
/* 17A13C 8024B85C 4602F582 */ mul.s $f22, $f30, $f2
/* 17A140 8024B860 00000000 */ nop
/* 17A144 8024B864 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17A148 8024B868 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 17A14C 8024B86C 44827000 */ mtc1 $v0, $f14
/* 17A150 8024B870 00000000 */ nop
/* 17A154 8024B874 468073A0 */ cvt.s.w $f14, $f14
/* 17A158 8024B878 46027382 */ mul.s $f14, $f14, $f2
/* 17A15C 8024B87C 00000000 */ nop
/* 17A160 8024B880 3C02802A */ lui $v0, %hi(D_8029F282)
/* 17A164 8024B884 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 17A168 8024B888 44825000 */ mtc1 $v0, $f10
/* 17A16C 8024B88C 00000000 */ nop
/* 17A170 8024B890 468052A0 */ cvt.s.w $f10, $f10
/* 17A174 8024B894 46025282 */ mul.s $f10, $f10, $f2
/* 17A178 8024B898 00000000 */ nop
/* 17A17C 8024B89C 46003180 */ add.s $f6, $f6, $f0
/* 17A180 8024B8A0 3C014380 */ lui $at, 0x4380
/* 17A184 8024B8A4 44810000 */ mtc1 $at, $f0
/* 17A188 8024B8A8 00000000 */ nop
/* 17A18C 8024B8AC 46003182 */ mul.s $f6, $f6, $f0
/* 17A190 8024B8B0 00000000 */ nop
/* 17A194 8024B8B4 3C01802A */ lui $at, %hi(D_8029F294)
/* 17A198 8024B8B8 C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
/* 17A19C 8024B8BC 46040002 */ mul.s $f0, $f0, $f4
/* 17A1A0 8024B8C0 00000000 */ nop
/* 17A1A4 8024B8C4 461AA500 */ add.s $f20, $f20, $f26
/* 17A1A8 8024B8C8 46189480 */ add.s $f18, $f18, $f24
/* 17A1AC 8024B8CC 46168400 */ add.s $f16, $f16, $f22
/* 17A1B0 8024B8D0 460E6300 */ add.s $f12, $f12, $f14
/* 17A1B4 8024B8D4 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 17A1B8 8024B8D8 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 17A1BC 8024B8DC 3C02802A */ lui $v0, %hi(D_8029F284)
/* 17A1C0 8024B8E0 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 17A1C4 8024B8E4 460A4200 */ add.s $f8, $f8, $f10
/* 17A1C8 8024B8E8 E6140054 */ swc1 $f20, 0x54($s0)
/* 17A1CC 8024B8EC 44822000 */ mtc1 $v0, $f4
/* 17A1D0 8024B8F0 00000000 */ nop
/* 17A1D4 8024B8F4 46802120 */ cvt.s.w $f4, $f4
/* 17A1D8 8024B8F8 46022102 */ mul.s $f4, $f4, $f2
/* 17A1DC 8024B8FC 00000000 */ nop
/* 17A1E0 8024B900 E6120058 */ swc1 $f18, 0x58($s0)
/* 17A1E4 8024B904 E610005C */ swc1 $f16, 0x5c($s0)
/* 17A1E8 8024B908 4600670D */ trunc.w.s $f28, $f12
/* 17A1EC 8024B90C 4402E000 */ mfc1 $v0, $f28
/* 17A1F0 8024B910 00000000 */ nop
/* 17A1F4 8024B914 A602001E */ sh $v0, 0x1e($s0)
/* 17A1F8 8024B918 46040000 */ add.s $f0, $f0, $f4
/* 17A1FC 8024B91C 4600470D */ trunc.w.s $f28, $f8
/* 17A200 8024B920 4402E000 */ mfc1 $v0, $f28
/* 17A204 8024B924 00000000 */ nop
/* 17A208 8024B928 A6020024 */ sh $v0, 0x24($s0)
/* 17A20C 8024B92C 4600070D */ trunc.w.s $f28, $f0
/* 17A210 8024B930 4402E000 */ mfc1 $v0, $f28
/* 17A214 8024B934 00000000 */ nop
/* 17A218 8024B938 A6020022 */ sh $v0, 0x22($s0)
/* 17A21C 8024B93C 4600370D */ trunc.w.s $f28, $f6
/* 17A220 8024B940 4402E000 */ mfc1 $v0, $f28
/* 17A224 8024B944 00000000 */ nop
/* 17A228 8024B948 A6020026 */ sh $v0, 0x26($s0)
/* 17A22C 8024B94C 84820000 */ lh $v0, ($a0)
/* 17A230 8024B950 94830000 */ lhu $v1, ($a0)
/* 17A234 8024B954 14400006 */ bnez $v0, .L8024B970
/* 17A238 8024B958 2462FFFF */ addiu $v0, $v1, -1
/* 17A23C 8024B95C 24020001 */ addiu $v0, $zero, 1
/* 17A240 8024B960 3C01802A */ lui $at, %hi(D_8029F29C)
/* 17A244 8024B964 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 17A248 8024B968 08092E5D */ j .L8024B974
/* 17A24C 8024B96C 00000000 */ nop
.L8024B970:
/* 17A250 8024B970 A4820000 */ sh $v0, ($a0)
.L8024B974:
/* 17A254 8024B974 8FBF001C */ lw $ra, 0x1c($sp)
/* 17A258 8024B978 8FB00018 */ lw $s0, 0x18($sp)
/* 17A25C 8024B97C D7BE0048 */ ldc1 $f30, 0x48($sp)
/* 17A260 8024B980 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 17A264 8024B984 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 17A268 8024B988 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 17A26C 8024B98C D7B60028 */ ldc1 $f22, 0x28($sp)
/* 17A270 8024B990 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 17A274 8024B994 0000102D */ daddu $v0, $zero, $zero
/* 17A278 8024B998 03E00008 */ jr $ra
/* 17A27C 8024B99C 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,268 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024B9A0
/* 17A280 8024B9A0 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 17A284 8024B9A4 AFB00018 */ sw $s0, 0x18($sp)
/* 17A288 8024B9A8 3C10800B */ lui $s0, %hi(gCameras+0x558)
/* 17A28C 8024B9AC 261022D8 */ addiu $s0, $s0, %lo(gCameras+0x558)
/* 17A290 8024B9B0 AFBF001C */ sw $ra, 0x1c($sp)
/* 17A294 8024B9B4 F7BE0048 */ sdc1 $f30, 0x48($sp)
/* 17A298 8024B9B8 F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 17A29C 8024B9BC F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 17A2A0 8024B9C0 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 17A2A4 8024B9C4 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 17A2A8 8024B9C8 F7B40020 */ sdc1 $f20, 0x20($sp)
/* 17A2AC 8024B9CC 10A00046 */ beqz $a1, .L8024BAE8
/* 17A2B0 8024B9D0 24030008 */ addiu $v1, $zero, 8
/* 17A2B4 8024B9D4 3C014270 */ lui $at, 0x4270
/* 17A2B8 8024B9D8 44811000 */ mtc1 $at, $f2
/* 17A2BC 8024B9DC 3C04802A */ lui $a0, %hi(D_8029F270)
/* 17A2C0 8024B9E0 2484F270 */ addiu $a0, $a0, %lo(D_8029F270)
/* 17A2C4 8024B9E4 AC800000 */ sw $zero, ($a0)
/* 17A2C8 8024B9E8 3C02802A */ lui $v0, %hi(D_8029F2A4)
/* 17A2CC 8024B9EC 8042F2A4 */ lb $v0, %lo(D_8029F2A4)($v0)
/* 17A2D0 8024B9F0 3C01802A */ lui $at, %hi(D_8029F278)
/* 17A2D4 8024B9F4 AC20F278 */ sw $zero, %lo(D_8029F278)($at)
/* 17A2D8 8024B9F8 3C01802A */ lui $at, %hi(D_8029F282)
/* 17A2DC 8024B9FC A420F282 */ sh $zero, %lo(D_8029F282)($at)
/* 17A2E0 8024BA00 3C01802A */ lui $at, %hi(D_8029F284)
/* 17A2E4 8024BA04 A423F284 */ sh $v1, %lo(D_8029F284)($at)
/* 17A2E8 8024BA08 3C01802A */ lui $at, %hi(D_8029F286)
/* 17A2EC 8024BA0C A420F286 */ sh $zero, %lo(D_8029F286)($at)
/* 17A2F0 8024BA10 3C01802A */ lui $at, %hi(D_8029F274)
/* 17A2F4 8024BA14 E422F274 */ swc1 $f2, %lo(D_8029F274)($at)
/* 17A2F8 8024BA18 1040000B */ beqz $v0, .L8024BA48
/* 17A2FC 8024BA1C 00000000 */ nop
/* 17A300 8024BA20 C4800000 */ lwc1 $f0, ($a0)
/* 17A304 8024BA24 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17A308 8024BA28 9442F280 */ lhu $v0, %lo(D_8029F280)($v0)
/* 17A30C 8024BA2C E6020058 */ swc1 $f2, 0x58($s0)
/* 17A310 8024BA30 A6000026 */ sh $zero, 0x26($s0)
/* 17A314 8024BA34 A6000024 */ sh $zero, 0x24($s0)
/* 17A318 8024BA38 A6030022 */ sh $v1, 0x22($s0)
/* 17A31C 8024BA3C E6000054 */ swc1 $f0, 0x54($s0)
/* 17A320 8024BA40 E600005C */ swc1 $f0, 0x5c($s0)
/* 17A324 8024BA44 A602001E */ sh $v0, 0x1e($s0)
.L8024BA48:
/* 17A328 8024BA48 8602001E */ lh $v0, 0x1e($s0)
/* 17A32C 8024BA4C 86040026 */ lh $a0, 0x26($s0)
/* 17A330 8024BA50 86030024 */ lh $v1, 0x24($s0)
/* 17A334 8024BA54 44820000 */ mtc1 $v0, $f0
/* 17A338 8024BA58 00000000 */ nop
/* 17A33C 8024BA5C 46800020 */ cvt.s.w $f0, $f0
/* 17A340 8024BA60 86020022 */ lh $v0, 0x22($s0)
/* 17A344 8024BA64 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17A348 8024BA68 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 17A34C 8024BA6C 44820000 */ mtc1 $v0, $f0
/* 17A350 8024BA70 00000000 */ nop
/* 17A354 8024BA74 46800020 */ cvt.s.w $f0, $f0
/* 17A358 8024BA78 3C01802A */ lui $at, %hi(D_8029F294)
/* 17A35C 8024BA7C E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 17A360 8024BA80 44830000 */ mtc1 $v1, $f0
/* 17A364 8024BA84 00000000 */ nop
/* 17A368 8024BA88 46800020 */ cvt.s.w $f0, $f0
/* 17A36C 8024BA8C 3C01802A */ lui $at, %hi(D_8029F290)
/* 17A370 8024BA90 E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 17A374 8024BA94 04820001 */ bltzl $a0, .L8024BA9C
/* 17A378 8024BA98 248400FF */ addiu $a0, $a0, 0xff
.L8024BA9C:
/* 17A37C 8024BA9C 00041203 */ sra $v0, $a0, 8
/* 17A380 8024BAA0 C6020054 */ lwc1 $f2, 0x54($s0)
/* 17A384 8024BAA4 C6040058 */ lwc1 $f4, 0x58($s0)
/* 17A388 8024BAA8 C606005C */ lwc1 $f6, 0x5c($s0)
/* 17A38C 8024BAAC 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 17A390 8024BAB0 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 17A394 8024BAB4 44820000 */ mtc1 $v0, $f0
/* 17A398 8024BAB8 00000000 */ nop
/* 17A39C 8024BABC 46800020 */ cvt.s.w $f0, $f0
/* 17A3A0 8024BAC0 3C01802A */ lui $at, %hi(D_8029F298)
/* 17A3A4 8024BAC4 E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 17A3A8 8024BAC8 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17A3AC 8024BACC E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 17A3B0 8024BAD0 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17A3B4 8024BAD4 E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
/* 17A3B8 8024BAD8 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17A3BC 8024BADC E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
/* 17A3C0 8024BAE0 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 17A3C4 8024BAE4 A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L8024BAE8:
/* 17A3C8 8024BAE8 3C01802A */ lui $at, %hi(D_8029F274)
/* 17A3CC 8024BAEC C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
/* 17A3D0 8024BAF0 3C01802A */ lui $at, %hi(D_8029F270)
/* 17A3D4 8024BAF4 C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
/* 17A3D8 8024BAF8 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 17A3DC 8024BAFC 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 17A3E0 8024BB00 3C01802A */ lui $at, %hi(D_8029F278)
/* 17A3E4 8024BB04 C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
/* 17A3E8 8024BB08 14400022 */ bnez $v0, .L8024BB94
/* 17A3EC 8024BB0C E7BC0010 */ swc1 $f28, 0x10($sp)
/* 17A3F0 8024BB10 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17A3F4 8024BB14 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17A3F8 8024BB18 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17A3FC 8024BB1C 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17A400 8024BB20 3C013F80 */ lui $at, 0x3f80
/* 17A404 8024BB24 4481C000 */ mtc1 $at, $f24
/* 17A408 8024BB28 44822000 */ mtc1 $v0, $f4
/* 17A40C 8024BB2C 00000000 */ nop
/* 17A410 8024BB30 46802120 */ cvt.s.w $f4, $f4
/* 17A414 8024BB34 44830000 */ mtc1 $v1, $f0
/* 17A418 8024BB38 00000000 */ nop
/* 17A41C 8024BB3C 46800020 */ cvt.s.w $f0, $f0
/* 17A420 8024BB40 46002103 */ div.s $f4, $f4, $f0
/* 17A424 8024BB44 4604C301 */ sub.s $f12, $f24, $f4
/* 17A428 8024BB48 3C014049 */ lui $at, 0x4049
/* 17A42C 8024BB4C 34210FD0 */ ori $at, $at, 0xfd0
/* 17A430 8024BB50 4481B000 */ mtc1 $at, $f22
/* 17A434 8024BB54 00000000 */ nop
/* 17A438 8024BB58 46166302 */ mul.s $f12, $f12, $f22
/* 17A43C 8024BB5C 00000000 */ nop
/* 17A440 8024BB60 3C013F00 */ lui $at, 0x3f00
/* 17A444 8024BB64 4481A000 */ mtc1 $at, $f20
/* 17A448 8024BB68 00000000 */ nop
/* 17A44C 8024BB6C 46146302 */ mul.s $f12, $f12, $f20
/* 17A450 8024BB70 0C00A85B */ jal sin_rad
/* 17A454 8024BB74 00000000 */ nop
/* 17A458 8024BB78 46160002 */ mul.s $f0, $f0, $f22
/* 17A45C 8024BB7C 00000000 */ nop
/* 17A460 8024BB80 46140302 */ mul.s $f12, $f0, $f20
/* 17A464 8024BB84 0C00A85B */ jal sin_rad
/* 17A468 8024BB88 00000000 */ nop
/* 17A46C 8024BB8C 08092EF0 */ j .L8024BBC0
/* 17A470 8024BB90 4600C101 */ sub.s $f4, $f24, $f0
.L8024BB94:
/* 17A474 8024BB94 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17A478 8024BB98 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17A47C 8024BB9C 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17A480 8024BBA0 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17A484 8024BBA4 44822000 */ mtc1 $v0, $f4
/* 17A488 8024BBA8 00000000 */ nop
/* 17A48C 8024BBAC 46802120 */ cvt.s.w $f4, $f4
/* 17A490 8024BBB0 44830000 */ mtc1 $v1, $f0
/* 17A494 8024BBB4 00000000 */ nop
/* 17A498 8024BBB8 46800020 */ cvt.s.w $f0, $f0
/* 17A49C 8024BBBC 46002103 */ div.s $f4, $f4, $f0
.L8024BBC0:
/* 17A4A0 8024BBC0 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17A4A4 8024BBC4 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
/* 17A4A8 8024BBC8 4604A502 */ mul.s $f20, $f20, $f4
/* 17A4AC 8024BBCC 00000000 */ nop
/* 17A4B0 8024BBD0 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17A4B4 8024BBD4 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
/* 17A4B8 8024BBD8 46049482 */ mul.s $f18, $f18, $f4
/* 17A4BC 8024BBDC 00000000 */ nop
/* 17A4C0 8024BBE0 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17A4C4 8024BBE4 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
/* 17A4C8 8024BBE8 46048402 */ mul.s $f16, $f16, $f4
/* 17A4CC 8024BBEC 00000000 */ nop
/* 17A4D0 8024BBF0 3C01802A */ lui $at, %hi(D_8029F298)
/* 17A4D4 8024BBF4 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
/* 17A4D8 8024BBF8 46043182 */ mul.s $f6, $f6, $f4
/* 17A4DC 8024BBFC 00000000 */ nop
/* 17A4E0 8024BC00 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17A4E4 8024BC04 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
/* 17A4E8 8024BC08 46046302 */ mul.s $f12, $f12, $f4
/* 17A4EC 8024BC0C 00000000 */ nop
/* 17A4F0 8024BC10 3C01802A */ lui $at, %hi(D_8029F290)
/* 17A4F4 8024BC14 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 17A4F8 8024BC18 46044202 */ mul.s $f8, $f8, $f4
/* 17A4FC 8024BC1C 00000000 */ nop
/* 17A500 8024BC20 3C013F80 */ lui $at, 0x3f80
/* 17A504 8024BC24 44811000 */ mtc1 $at, $f2
/* 17A508 8024BC28 00000000 */ nop
/* 17A50C 8024BC2C 46041081 */ sub.s $f2, $f2, $f4
/* 17A510 8024BC30 4602D682 */ mul.s $f26, $f26, $f2
/* 17A514 8024BC34 00000000 */ nop
/* 17A518 8024BC38 C7BC0010 */ lwc1 $f28, 0x10($sp)
/* 17A51C 8024BC3C 4602E602 */ mul.s $f24, $f28, $f2
/* 17A520 8024BC40 00000000 */ nop
/* 17A524 8024BC44 3C02802A */ lui $v0, %hi(D_8029F286)
/* 17A528 8024BC48 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 17A52C 8024BC4C 44820000 */ mtc1 $v0, $f0
/* 17A530 8024BC50 00000000 */ nop
/* 17A534 8024BC54 46800020 */ cvt.s.w $f0, $f0
/* 17A538 8024BC58 46020002 */ mul.s $f0, $f0, $f2
/* 17A53C 8024BC5C 00000000 */ nop
/* 17A540 8024BC60 4602F582 */ mul.s $f22, $f30, $f2
/* 17A544 8024BC64 00000000 */ nop
/* 17A548 8024BC68 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17A54C 8024BC6C 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 17A550 8024BC70 44827000 */ mtc1 $v0, $f14
/* 17A554 8024BC74 00000000 */ nop
/* 17A558 8024BC78 468073A0 */ cvt.s.w $f14, $f14
/* 17A55C 8024BC7C 46027382 */ mul.s $f14, $f14, $f2
/* 17A560 8024BC80 00000000 */ nop
/* 17A564 8024BC84 3C02802A */ lui $v0, %hi(D_8029F282)
/* 17A568 8024BC88 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 17A56C 8024BC8C 44825000 */ mtc1 $v0, $f10
/* 17A570 8024BC90 00000000 */ nop
/* 17A574 8024BC94 468052A0 */ cvt.s.w $f10, $f10
/* 17A578 8024BC98 46025282 */ mul.s $f10, $f10, $f2
/* 17A57C 8024BC9C 00000000 */ nop
/* 17A580 8024BCA0 46003180 */ add.s $f6, $f6, $f0
/* 17A584 8024BCA4 3C014380 */ lui $at, 0x4380
/* 17A588 8024BCA8 44810000 */ mtc1 $at, $f0
/* 17A58C 8024BCAC 00000000 */ nop
/* 17A590 8024BCB0 46003182 */ mul.s $f6, $f6, $f0
/* 17A594 8024BCB4 00000000 */ nop
/* 17A598 8024BCB8 3C01802A */ lui $at, %hi(D_8029F294)
/* 17A59C 8024BCBC C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
/* 17A5A0 8024BCC0 46040002 */ mul.s $f0, $f0, $f4
/* 17A5A4 8024BCC4 00000000 */ nop
/* 17A5A8 8024BCC8 461AA500 */ add.s $f20, $f20, $f26
/* 17A5AC 8024BCCC 46189480 */ add.s $f18, $f18, $f24
/* 17A5B0 8024BCD0 46168400 */ add.s $f16, $f16, $f22
/* 17A5B4 8024BCD4 460E6300 */ add.s $f12, $f12, $f14
/* 17A5B8 8024BCD8 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 17A5BC 8024BCDC 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 17A5C0 8024BCE0 3C02802A */ lui $v0, %hi(D_8029F284)
/* 17A5C4 8024BCE4 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 17A5C8 8024BCE8 460A4200 */ add.s $f8, $f8, $f10
/* 17A5CC 8024BCEC E6140054 */ swc1 $f20, 0x54($s0)
/* 17A5D0 8024BCF0 44822000 */ mtc1 $v0, $f4
/* 17A5D4 8024BCF4 00000000 */ nop
/* 17A5D8 8024BCF8 46802120 */ cvt.s.w $f4, $f4
/* 17A5DC 8024BCFC 46022102 */ mul.s $f4, $f4, $f2
/* 17A5E0 8024BD00 00000000 */ nop
/* 17A5E4 8024BD04 E6120058 */ swc1 $f18, 0x58($s0)
/* 17A5E8 8024BD08 E610005C */ swc1 $f16, 0x5c($s0)
/* 17A5EC 8024BD0C 4600670D */ trunc.w.s $f28, $f12
/* 17A5F0 8024BD10 4402E000 */ mfc1 $v0, $f28
/* 17A5F4 8024BD14 00000000 */ nop
/* 17A5F8 8024BD18 A602001E */ sh $v0, 0x1e($s0)
/* 17A5FC 8024BD1C 46040000 */ add.s $f0, $f0, $f4
/* 17A600 8024BD20 4600470D */ trunc.w.s $f28, $f8
/* 17A604 8024BD24 4402E000 */ mfc1 $v0, $f28
/* 17A608 8024BD28 00000000 */ nop
/* 17A60C 8024BD2C A6020024 */ sh $v0, 0x24($s0)
/* 17A610 8024BD30 4600070D */ trunc.w.s $f28, $f0
/* 17A614 8024BD34 4402E000 */ mfc1 $v0, $f28
/* 17A618 8024BD38 00000000 */ nop
/* 17A61C 8024BD3C A6020022 */ sh $v0, 0x22($s0)
/* 17A620 8024BD40 4600370D */ trunc.w.s $f28, $f6
/* 17A624 8024BD44 4402E000 */ mfc1 $v0, $f28
/* 17A628 8024BD48 00000000 */ nop
/* 17A62C 8024BD4C A6020026 */ sh $v0, 0x26($s0)
/* 17A630 8024BD50 84820000 */ lh $v0, ($a0)
/* 17A634 8024BD54 94830000 */ lhu $v1, ($a0)
/* 17A638 8024BD58 14400006 */ bnez $v0, .L8024BD74
/* 17A63C 8024BD5C 2462FFFF */ addiu $v0, $v1, -1
/* 17A640 8024BD60 24020001 */ addiu $v0, $zero, 1
/* 17A644 8024BD64 3C01802A */ lui $at, %hi(D_8029F29C)
/* 17A648 8024BD68 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 17A64C 8024BD6C 08092F5E */ j .L8024BD78
/* 17A650 8024BD70 00000000 */ nop
.L8024BD74:
/* 17A654 8024BD74 A4820000 */ sh $v0, ($a0)
.L8024BD78:
/* 17A658 8024BD78 8FBF001C */ lw $ra, 0x1c($sp)
/* 17A65C 8024BD7C 8FB00018 */ lw $s0, 0x18($sp)
/* 17A660 8024BD80 D7BE0048 */ ldc1 $f30, 0x48($sp)
/* 17A664 8024BD84 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 17A668 8024BD88 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 17A66C 8024BD8C D7B80030 */ ldc1 $f24, 0x30($sp)
/* 17A670 8024BD90 D7B60028 */ ldc1 $f22, 0x28($sp)
/* 17A674 8024BD94 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 17A678 8024BD98 0000102D */ daddu $v0, $zero, $zero
/* 17A67C 8024BD9C 03E00008 */ jr $ra
/* 17A680 8024BDA0 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,257 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024BDA4
/* 17A684 8024BDA4 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 17A688 8024BDA8 AFB00018 */ sw $s0, 0x18($sp)
/* 17A68C 8024BDAC 3C10800B */ lui $s0, %hi(gCameras+0x558)
/* 17A690 8024BDB0 261022D8 */ addiu $s0, $s0, %lo(gCameras+0x558)
/* 17A694 8024BDB4 AFBF001C */ sw $ra, 0x1c($sp)
/* 17A698 8024BDB8 F7BE0048 */ sdc1 $f30, 0x48($sp)
/* 17A69C 8024BDBC F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 17A6A0 8024BDC0 F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 17A6A4 8024BDC4 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 17A6A8 8024BDC8 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 17A6AC 8024BDCC F7B40020 */ sdc1 $f20, 0x20($sp)
/* 17A6B0 8024BDD0 10A00037 */ beqz $a1, .L8024BEB0
/* 17A6B4 8024BDD4 24020008 */ addiu $v0, $zero, 8
/* 17A6B8 8024BDD8 86040026 */ lh $a0, 0x26($s0)
/* 17A6BC 8024BDDC 3C01420C */ lui $at, 0x420c
/* 17A6C0 8024BDE0 44810000 */ mtc1 $at, $f0
/* 17A6C4 8024BDE4 3C014270 */ lui $at, 0x4270
/* 17A6C8 8024BDE8 44811000 */ mtc1 $at, $f2
/* 17A6CC 8024BDEC 8603001E */ lh $v1, 0x1e($s0)
/* 17A6D0 8024BDF0 3C01802A */ lui $at, %hi(D_8029F284)
/* 17A6D4 8024BDF4 A422F284 */ sh $v0, %lo(D_8029F284)($at)
/* 17A6D8 8024BDF8 86020022 */ lh $v0, 0x22($s0)
/* 17A6DC 8024BDFC 3C01802A */ lui $at, %hi(D_8029F270)
/* 17A6E0 8024BE00 E420F270 */ swc1 $f0, %lo(D_8029F270)($at)
/* 17A6E4 8024BE04 44830000 */ mtc1 $v1, $f0
/* 17A6E8 8024BE08 00000000 */ nop
/* 17A6EC 8024BE0C 46800020 */ cvt.s.w $f0, $f0
/* 17A6F0 8024BE10 86030024 */ lh $v1, 0x24($s0)
/* 17A6F4 8024BE14 3C01802A */ lui $at, %hi(D_8029F278)
/* 17A6F8 8024BE18 AC20F278 */ sw $zero, %lo(D_8029F278)($at)
/* 17A6FC 8024BE1C 3C01802A */ lui $at, %hi(D_8029F282)
/* 17A700 8024BE20 A420F282 */ sh $zero, %lo(D_8029F282)($at)
/* 17A704 8024BE24 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17A708 8024BE28 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 17A70C 8024BE2C 44820000 */ mtc1 $v0, $f0
/* 17A710 8024BE30 00000000 */ nop
/* 17A714 8024BE34 46800020 */ cvt.s.w $f0, $f0
/* 17A718 8024BE38 3C01802A */ lui $at, %hi(D_8029F274)
/* 17A71C 8024BE3C E422F274 */ swc1 $f2, %lo(D_8029F274)($at)
/* 17A720 8024BE40 3C01802A */ lui $at, %hi(D_8029F294)
/* 17A724 8024BE44 E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 17A728 8024BE48 44830000 */ mtc1 $v1, $f0
/* 17A72C 8024BE4C 00000000 */ nop
/* 17A730 8024BE50 46800020 */ cvt.s.w $f0, $f0
/* 17A734 8024BE54 3C01802A */ lui $at, %hi(D_8029F290)
/* 17A738 8024BE58 E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 17A73C 8024BE5C 04820001 */ bltzl $a0, .L8024BE64
/* 17A740 8024BE60 248400FF */ addiu $a0, $a0, 0xff
.L8024BE64:
/* 17A744 8024BE64 00041203 */ sra $v0, $a0, 8
/* 17A748 8024BE68 C6020054 */ lwc1 $f2, 0x54($s0)
/* 17A74C 8024BE6C C6040058 */ lwc1 $f4, 0x58($s0)
/* 17A750 8024BE70 C606005C */ lwc1 $f6, 0x5c($s0)
/* 17A754 8024BE74 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 17A758 8024BE78 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 17A75C 8024BE7C 44820000 */ mtc1 $v0, $f0
/* 17A760 8024BE80 00000000 */ nop
/* 17A764 8024BE84 46800020 */ cvt.s.w $f0, $f0
/* 17A768 8024BE88 3C01802A */ lui $at, %hi(D_8029F298)
/* 17A76C 8024BE8C E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 17A770 8024BE90 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17A774 8024BE94 E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 17A778 8024BE98 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17A77C 8024BE9C E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
/* 17A780 8024BEA0 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17A784 8024BEA4 E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
/* 17A788 8024BEA8 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 17A78C 8024BEAC A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L8024BEB0:
/* 17A790 8024BEB0 3C01802A */ lui $at, %hi(D_8029F274)
/* 17A794 8024BEB4 C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
/* 17A798 8024BEB8 3C01802A */ lui $at, %hi(D_8029F270)
/* 17A79C 8024BEBC C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
/* 17A7A0 8024BEC0 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 17A7A4 8024BEC4 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 17A7A8 8024BEC8 3C01802A */ lui $at, %hi(D_8029F278)
/* 17A7AC 8024BECC C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
/* 17A7B0 8024BED0 14400027 */ bnez $v0, .L8024BF70
/* 17A7B4 8024BED4 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 17A7B8 8024BED8 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17A7BC 8024BEDC 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17A7C0 8024BEE0 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17A7C4 8024BEE4 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17A7C8 8024BEE8 3C013F80 */ lui $at, 0x3f80
/* 17A7CC 8024BEEC 4481C000 */ mtc1 $at, $f24
/* 17A7D0 8024BEF0 44822000 */ mtc1 $v0, $f4
/* 17A7D4 8024BEF4 00000000 */ nop
/* 17A7D8 8024BEF8 46802120 */ cvt.s.w $f4, $f4
/* 17A7DC 8024BEFC 44830000 */ mtc1 $v1, $f0
/* 17A7E0 8024BF00 00000000 */ nop
/* 17A7E4 8024BF04 46800020 */ cvt.s.w $f0, $f0
/* 17A7E8 8024BF08 46002103 */ div.s $f4, $f4, $f0
/* 17A7EC 8024BF0C 4604C301 */ sub.s $f12, $f24, $f4
/* 17A7F0 8024BF10 3C014049 */ lui $at, 0x4049
/* 17A7F4 8024BF14 34210FD0 */ ori $at, $at, 0xfd0
/* 17A7F8 8024BF18 4481B000 */ mtc1 $at, $f22
/* 17A7FC 8024BF1C 00000000 */ nop
/* 17A800 8024BF20 46166302 */ mul.s $f12, $f12, $f22
/* 17A804 8024BF24 00000000 */ nop
/* 17A808 8024BF28 3C013F00 */ lui $at, 0x3f00
/* 17A80C 8024BF2C 4481A000 */ mtc1 $at, $f20
/* 17A810 8024BF30 00000000 */ nop
/* 17A814 8024BF34 46146302 */ mul.s $f12, $f12, $f20
/* 17A818 8024BF38 0C00A85B */ jal sin_rad
/* 17A81C 8024BF3C 00000000 */ nop
/* 17A820 8024BF40 46160002 */ mul.s $f0, $f0, $f22
/* 17A824 8024BF44 00000000 */ nop
/* 17A828 8024BF48 46140302 */ mul.s $f12, $f0, $f20
/* 17A82C 8024BF4C 0C00A85B */ jal sin_rad
/* 17A830 8024BF50 00000000 */ nop
/* 17A834 8024BF54 46160002 */ mul.s $f0, $f0, $f22
/* 17A838 8024BF58 00000000 */ nop
/* 17A83C 8024BF5C 46140302 */ mul.s $f12, $f0, $f20
/* 17A840 8024BF60 0C00A85B */ jal sin_rad
/* 17A844 8024BF64 00000000 */ nop
/* 17A848 8024BF68 08092FE7 */ j .L8024BF9C
/* 17A84C 8024BF6C 4600C101 */ sub.s $f4, $f24, $f0
.L8024BF70:
/* 17A850 8024BF70 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17A854 8024BF74 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17A858 8024BF78 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17A85C 8024BF7C 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17A860 8024BF80 44822000 */ mtc1 $v0, $f4
/* 17A864 8024BF84 00000000 */ nop
/* 17A868 8024BF88 46802120 */ cvt.s.w $f4, $f4
/* 17A86C 8024BF8C 44830000 */ mtc1 $v1, $f0
/* 17A870 8024BF90 00000000 */ nop
/* 17A874 8024BF94 46800020 */ cvt.s.w $f0, $f0
/* 17A878 8024BF98 46002103 */ div.s $f4, $f4, $f0
.L8024BF9C:
/* 17A87C 8024BF9C 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17A880 8024BFA0 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
/* 17A884 8024BFA4 4604A502 */ mul.s $f20, $f20, $f4
/* 17A888 8024BFA8 00000000 */ nop
/* 17A88C 8024BFAC 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17A890 8024BFB0 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
/* 17A894 8024BFB4 46049482 */ mul.s $f18, $f18, $f4
/* 17A898 8024BFB8 00000000 */ nop
/* 17A89C 8024BFBC 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17A8A0 8024BFC0 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
/* 17A8A4 8024BFC4 46048402 */ mul.s $f16, $f16, $f4
/* 17A8A8 8024BFC8 00000000 */ nop
/* 17A8AC 8024BFCC 3C01802A */ lui $at, %hi(D_8029F298)
/* 17A8B0 8024BFD0 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
/* 17A8B4 8024BFD4 46043182 */ mul.s $f6, $f6, $f4
/* 17A8B8 8024BFD8 00000000 */ nop
/* 17A8BC 8024BFDC 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17A8C0 8024BFE0 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
/* 17A8C4 8024BFE4 46046302 */ mul.s $f12, $f12, $f4
/* 17A8C8 8024BFE8 00000000 */ nop
/* 17A8CC 8024BFEC 3C01802A */ lui $at, %hi(D_8029F290)
/* 17A8D0 8024BFF0 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 17A8D4 8024BFF4 46044202 */ mul.s $f8, $f8, $f4
/* 17A8D8 8024BFF8 00000000 */ nop
/* 17A8DC 8024BFFC 3C013F80 */ lui $at, 0x3f80
/* 17A8E0 8024C000 44811000 */ mtc1 $at, $f2
/* 17A8E4 8024C004 00000000 */ nop
/* 17A8E8 8024C008 46041081 */ sub.s $f2, $f2, $f4
/* 17A8EC 8024C00C 4602D682 */ mul.s $f26, $f26, $f2
/* 17A8F0 8024C010 00000000 */ nop
/* 17A8F4 8024C014 C7BC0010 */ lwc1 $f28, 0x10($sp)
/* 17A8F8 8024C018 4602E602 */ mul.s $f24, $f28, $f2
/* 17A8FC 8024C01C 00000000 */ nop
/* 17A900 8024C020 3C02802A */ lui $v0, %hi(D_8029F286)
/* 17A904 8024C024 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 17A908 8024C028 44820000 */ mtc1 $v0, $f0
/* 17A90C 8024C02C 00000000 */ nop
/* 17A910 8024C030 46800020 */ cvt.s.w $f0, $f0
/* 17A914 8024C034 46020002 */ mul.s $f0, $f0, $f2
/* 17A918 8024C038 00000000 */ nop
/* 17A91C 8024C03C 4602F582 */ mul.s $f22, $f30, $f2
/* 17A920 8024C040 00000000 */ nop
/* 17A924 8024C044 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17A928 8024C048 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 17A92C 8024C04C 44827000 */ mtc1 $v0, $f14
/* 17A930 8024C050 00000000 */ nop
/* 17A934 8024C054 468073A0 */ cvt.s.w $f14, $f14
/* 17A938 8024C058 46027382 */ mul.s $f14, $f14, $f2
/* 17A93C 8024C05C 00000000 */ nop
/* 17A940 8024C060 3C02802A */ lui $v0, %hi(D_8029F282)
/* 17A944 8024C064 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 17A948 8024C068 44825000 */ mtc1 $v0, $f10
/* 17A94C 8024C06C 00000000 */ nop
/* 17A950 8024C070 468052A0 */ cvt.s.w $f10, $f10
/* 17A954 8024C074 46025282 */ mul.s $f10, $f10, $f2
/* 17A958 8024C078 00000000 */ nop
/* 17A95C 8024C07C 46003180 */ add.s $f6, $f6, $f0
/* 17A960 8024C080 3C014380 */ lui $at, 0x4380
/* 17A964 8024C084 44810000 */ mtc1 $at, $f0
/* 17A968 8024C088 00000000 */ nop
/* 17A96C 8024C08C 46003182 */ mul.s $f6, $f6, $f0
/* 17A970 8024C090 00000000 */ nop
/* 17A974 8024C094 3C01802A */ lui $at, %hi(D_8029F294)
/* 17A978 8024C098 C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
/* 17A97C 8024C09C 46040002 */ mul.s $f0, $f0, $f4
/* 17A980 8024C0A0 00000000 */ nop
/* 17A984 8024C0A4 461AA500 */ add.s $f20, $f20, $f26
/* 17A988 8024C0A8 46189480 */ add.s $f18, $f18, $f24
/* 17A98C 8024C0AC 46168400 */ add.s $f16, $f16, $f22
/* 17A990 8024C0B0 460E6300 */ add.s $f12, $f12, $f14
/* 17A994 8024C0B4 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 17A998 8024C0B8 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 17A99C 8024C0BC 3C02802A */ lui $v0, %hi(D_8029F284)
/* 17A9A0 8024C0C0 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 17A9A4 8024C0C4 460A4200 */ add.s $f8, $f8, $f10
/* 17A9A8 8024C0C8 E6140054 */ swc1 $f20, 0x54($s0)
/* 17A9AC 8024C0CC 44822000 */ mtc1 $v0, $f4
/* 17A9B0 8024C0D0 00000000 */ nop
/* 17A9B4 8024C0D4 46802120 */ cvt.s.w $f4, $f4
/* 17A9B8 8024C0D8 46022102 */ mul.s $f4, $f4, $f2
/* 17A9BC 8024C0DC 00000000 */ nop
/* 17A9C0 8024C0E0 E6120058 */ swc1 $f18, 0x58($s0)
/* 17A9C4 8024C0E4 E610005C */ swc1 $f16, 0x5c($s0)
/* 17A9C8 8024C0E8 4600670D */ trunc.w.s $f28, $f12
/* 17A9CC 8024C0EC 4402E000 */ mfc1 $v0, $f28
/* 17A9D0 8024C0F0 00000000 */ nop
/* 17A9D4 8024C0F4 A602001E */ sh $v0, 0x1e($s0)
/* 17A9D8 8024C0F8 46040000 */ add.s $f0, $f0, $f4
/* 17A9DC 8024C0FC 4600470D */ trunc.w.s $f28, $f8
/* 17A9E0 8024C100 4402E000 */ mfc1 $v0, $f28
/* 17A9E4 8024C104 00000000 */ nop
/* 17A9E8 8024C108 A6020024 */ sh $v0, 0x24($s0)
/* 17A9EC 8024C10C 4600070D */ trunc.w.s $f28, $f0
/* 17A9F0 8024C110 4402E000 */ mfc1 $v0, $f28
/* 17A9F4 8024C114 00000000 */ nop
/* 17A9F8 8024C118 A6020022 */ sh $v0, 0x22($s0)
/* 17A9FC 8024C11C 4600370D */ trunc.w.s $f28, $f6
/* 17AA00 8024C120 4402E000 */ mfc1 $v0, $f28
/* 17AA04 8024C124 00000000 */ nop
/* 17AA08 8024C128 A6020026 */ sh $v0, 0x26($s0)
/* 17AA0C 8024C12C 84820000 */ lh $v0, ($a0)
/* 17AA10 8024C130 94830000 */ lhu $v1, ($a0)
/* 17AA14 8024C134 14400006 */ bnez $v0, .L8024C150
/* 17AA18 8024C138 2462FFFF */ addiu $v0, $v1, -1
/* 17AA1C 8024C13C 24020001 */ addiu $v0, $zero, 1
/* 17AA20 8024C140 3C01802A */ lui $at, %hi(D_8029F29C)
/* 17AA24 8024C144 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 17AA28 8024C148 08093055 */ j .L8024C154
/* 17AA2C 8024C14C 00000000 */ nop
.L8024C150:
/* 17AA30 8024C150 A4820000 */ sh $v0, ($a0)
.L8024C154:
/* 17AA34 8024C154 8FBF001C */ lw $ra, 0x1c($sp)
/* 17AA38 8024C158 8FB00018 */ lw $s0, 0x18($sp)
/* 17AA3C 8024C15C D7BE0048 */ ldc1 $f30, 0x48($sp)
/* 17AA40 8024C160 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 17AA44 8024C164 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 17AA48 8024C168 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 17AA4C 8024C16C D7B60028 */ ldc1 $f22, 0x28($sp)
/* 17AA50 8024C170 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 17AA54 8024C174 0000102D */ daddu $v0, $zero, $zero
/* 17AA58 8024C178 03E00008 */ jr $ra
/* 17AA5C 8024C17C 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,263 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024C180
/* 17AA60 8024C180 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 17AA64 8024C184 AFB00018 */ sw $s0, 0x18($sp)
/* 17AA68 8024C188 3C10800B */ lui $s0, %hi(gCameras+0x558)
/* 17AA6C 8024C18C 261022D8 */ addiu $s0, $s0, %lo(gCameras+0x558)
/* 17AA70 8024C190 AFBF001C */ sw $ra, 0x1c($sp)
/* 17AA74 8024C194 F7BE0048 */ sdc1 $f30, 0x48($sp)
/* 17AA78 8024C198 F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 17AA7C 8024C19C F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 17AA80 8024C1A0 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 17AA84 8024C1A4 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 17AA88 8024C1A8 10A0003D */ beqz $a1, .L8024C2A0
/* 17AA8C 8024C1AC F7B40020 */ sdc1 $f20, 0x20($sp)
/* 17AA90 8024C1B0 3C01420C */ lui $at, 0x420c
/* 17AA94 8024C1B4 44810000 */ mtc1 $at, $f0
/* 17AA98 8024C1B8 C6060058 */ lwc1 $f6, 0x58($s0)
/* 17AA9C 8024C1BC 3C01802A */ lui $at, %hi(D_8029F270)
/* 17AAA0 8024C1C0 E420F270 */ swc1 $f0, %lo(D_8029F270)($at)
/* 17AAA4 8024C1C4 3C014270 */ lui $at, 0x4270
/* 17AAA8 8024C1C8 44810000 */ mtc1 $at, $f0
/* 17AAAC 8024C1CC 3C02802A */ lui $v0, %hi(D_8029F274)
/* 17AAB0 8024C1D0 2442F274 */ addiu $v0, $v0, %lo(D_8029F274)
/* 17AAB4 8024C1D4 4600303C */ c.lt.s $f6, $f0
/* 17AAB8 8024C1D8 00000000 */ nop
/* 17AABC 8024C1DC 45000002 */ bc1f .L8024C1E8
/* 17AAC0 8024C1E0 E4460000 */ swc1 $f6, ($v0)
/* 17AAC4 8024C1E4 E4400000 */ swc1 $f0, ($v0)
.L8024C1E8:
/* 17AAC8 8024C1E8 86040026 */ lh $a0, 0x26($s0)
/* 17AACC 8024C1EC 8603001E */ lh $v1, 0x1e($s0)
/* 17AAD0 8024C1F0 24020008 */ addiu $v0, $zero, 8
/* 17AAD4 8024C1F4 3C01802A */ lui $at, %hi(D_8029F284)
/* 17AAD8 8024C1F8 A422F284 */ sh $v0, %lo(D_8029F284)($at)
/* 17AADC 8024C1FC 86020022 */ lh $v0, 0x22($s0)
/* 17AAE0 8024C200 44830000 */ mtc1 $v1, $f0
/* 17AAE4 8024C204 00000000 */ nop
/* 17AAE8 8024C208 46800020 */ cvt.s.w $f0, $f0
/* 17AAEC 8024C20C 86030024 */ lh $v1, 0x24($s0)
/* 17AAF0 8024C210 3C01802A */ lui $at, %hi(D_8029F278)
/* 17AAF4 8024C214 AC20F278 */ sw $zero, %lo(D_8029F278)($at)
/* 17AAF8 8024C218 3C01802A */ lui $at, %hi(D_8029F282)
/* 17AAFC 8024C21C A420F282 */ sh $zero, %lo(D_8029F282)($at)
/* 17AB00 8024C220 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17AB04 8024C224 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 17AB08 8024C228 44820000 */ mtc1 $v0, $f0
/* 17AB0C 8024C22C 00000000 */ nop
/* 17AB10 8024C230 46800020 */ cvt.s.w $f0, $f0
/* 17AB14 8024C234 3C01802A */ lui $at, %hi(D_8029F294)
/* 17AB18 8024C238 E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 17AB1C 8024C23C 44830000 */ mtc1 $v1, $f0
/* 17AB20 8024C240 00000000 */ nop
/* 17AB24 8024C244 46800020 */ cvt.s.w $f0, $f0
/* 17AB28 8024C248 3C01802A */ lui $at, %hi(D_8029F290)
/* 17AB2C 8024C24C E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 17AB30 8024C250 04820001 */ bltzl $a0, .L8024C258
/* 17AB34 8024C254 248400FF */ addiu $a0, $a0, 0xff
.L8024C258:
/* 17AB38 8024C258 00041203 */ sra $v0, $a0, 8
/* 17AB3C 8024C25C C6020054 */ lwc1 $f2, 0x54($s0)
/* 17AB40 8024C260 C604005C */ lwc1 $f4, 0x5c($s0)
/* 17AB44 8024C264 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 17AB48 8024C268 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 17AB4C 8024C26C 44820000 */ mtc1 $v0, $f0
/* 17AB50 8024C270 00000000 */ nop
/* 17AB54 8024C274 46800020 */ cvt.s.w $f0, $f0
/* 17AB58 8024C278 3C01802A */ lui $at, %hi(D_8029F298)
/* 17AB5C 8024C27C E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 17AB60 8024C280 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17AB64 8024C284 E426F2AC */ swc1 $f6, %lo(D_8029F2AC)($at)
/* 17AB68 8024C288 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17AB6C 8024C28C E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 17AB70 8024C290 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17AB74 8024C294 E424F2B0 */ swc1 $f4, %lo(D_8029F2B0)($at)
/* 17AB78 8024C298 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 17AB7C 8024C29C A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L8024C2A0:
/* 17AB80 8024C2A0 3C01802A */ lui $at, %hi(D_8029F274)
/* 17AB84 8024C2A4 C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
/* 17AB88 8024C2A8 3C01802A */ lui $at, %hi(D_8029F270)
/* 17AB8C 8024C2AC C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
/* 17AB90 8024C2B0 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 17AB94 8024C2B4 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 17AB98 8024C2B8 3C01802A */ lui $at, %hi(D_8029F278)
/* 17AB9C 8024C2BC C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
/* 17ABA0 8024C2C0 14400027 */ bnez $v0, .L8024C360
/* 17ABA4 8024C2C4 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 17ABA8 8024C2C8 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17ABAC 8024C2CC 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17ABB0 8024C2D0 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17ABB4 8024C2D4 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17ABB8 8024C2D8 3C013F80 */ lui $at, 0x3f80
/* 17ABBC 8024C2DC 4481C000 */ mtc1 $at, $f24
/* 17ABC0 8024C2E0 44822000 */ mtc1 $v0, $f4
/* 17ABC4 8024C2E4 00000000 */ nop
/* 17ABC8 8024C2E8 46802120 */ cvt.s.w $f4, $f4
/* 17ABCC 8024C2EC 44830000 */ mtc1 $v1, $f0
/* 17ABD0 8024C2F0 00000000 */ nop
/* 17ABD4 8024C2F4 46800020 */ cvt.s.w $f0, $f0
/* 17ABD8 8024C2F8 46002103 */ div.s $f4, $f4, $f0
/* 17ABDC 8024C2FC 4604C301 */ sub.s $f12, $f24, $f4
/* 17ABE0 8024C300 3C014049 */ lui $at, 0x4049
/* 17ABE4 8024C304 34210FD0 */ ori $at, $at, 0xfd0
/* 17ABE8 8024C308 4481B000 */ mtc1 $at, $f22
/* 17ABEC 8024C30C 00000000 */ nop
/* 17ABF0 8024C310 46166302 */ mul.s $f12, $f12, $f22
/* 17ABF4 8024C314 00000000 */ nop
/* 17ABF8 8024C318 3C013F00 */ lui $at, 0x3f00
/* 17ABFC 8024C31C 4481A000 */ mtc1 $at, $f20
/* 17AC00 8024C320 00000000 */ nop
/* 17AC04 8024C324 46146302 */ mul.s $f12, $f12, $f20
/* 17AC08 8024C328 0C00A85B */ jal sin_rad
/* 17AC0C 8024C32C 00000000 */ nop
/* 17AC10 8024C330 46160002 */ mul.s $f0, $f0, $f22
/* 17AC14 8024C334 00000000 */ nop
/* 17AC18 8024C338 46140302 */ mul.s $f12, $f0, $f20
/* 17AC1C 8024C33C 0C00A85B */ jal sin_rad
/* 17AC20 8024C340 00000000 */ nop
/* 17AC24 8024C344 46160002 */ mul.s $f0, $f0, $f22
/* 17AC28 8024C348 00000000 */ nop
/* 17AC2C 8024C34C 46140302 */ mul.s $f12, $f0, $f20
/* 17AC30 8024C350 0C00A85B */ jal sin_rad
/* 17AC34 8024C354 00000000 */ nop
/* 17AC38 8024C358 080930E3 */ j .L8024C38C
/* 17AC3C 8024C35C 4600C101 */ sub.s $f4, $f24, $f0
.L8024C360:
/* 17AC40 8024C360 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17AC44 8024C364 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17AC48 8024C368 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17AC4C 8024C36C 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17AC50 8024C370 44822000 */ mtc1 $v0, $f4
/* 17AC54 8024C374 00000000 */ nop
/* 17AC58 8024C378 46802120 */ cvt.s.w $f4, $f4
/* 17AC5C 8024C37C 44830000 */ mtc1 $v1, $f0
/* 17AC60 8024C380 00000000 */ nop
/* 17AC64 8024C384 46800020 */ cvt.s.w $f0, $f0
/* 17AC68 8024C388 46002103 */ div.s $f4, $f4, $f0
.L8024C38C:
/* 17AC6C 8024C38C 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17AC70 8024C390 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
/* 17AC74 8024C394 4604A502 */ mul.s $f20, $f20, $f4
/* 17AC78 8024C398 00000000 */ nop
/* 17AC7C 8024C39C 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17AC80 8024C3A0 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
/* 17AC84 8024C3A4 46049482 */ mul.s $f18, $f18, $f4
/* 17AC88 8024C3A8 00000000 */ nop
/* 17AC8C 8024C3AC 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17AC90 8024C3B0 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
/* 17AC94 8024C3B4 46048402 */ mul.s $f16, $f16, $f4
/* 17AC98 8024C3B8 00000000 */ nop
/* 17AC9C 8024C3BC 3C01802A */ lui $at, %hi(D_8029F298)
/* 17ACA0 8024C3C0 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
/* 17ACA4 8024C3C4 46043182 */ mul.s $f6, $f6, $f4
/* 17ACA8 8024C3C8 00000000 */ nop
/* 17ACAC 8024C3CC 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17ACB0 8024C3D0 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
/* 17ACB4 8024C3D4 46046302 */ mul.s $f12, $f12, $f4
/* 17ACB8 8024C3D8 00000000 */ nop
/* 17ACBC 8024C3DC 3C01802A */ lui $at, %hi(D_8029F290)
/* 17ACC0 8024C3E0 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 17ACC4 8024C3E4 46044202 */ mul.s $f8, $f8, $f4
/* 17ACC8 8024C3E8 00000000 */ nop
/* 17ACCC 8024C3EC 3C013F80 */ lui $at, 0x3f80
/* 17ACD0 8024C3F0 44811000 */ mtc1 $at, $f2
/* 17ACD4 8024C3F4 00000000 */ nop
/* 17ACD8 8024C3F8 46041081 */ sub.s $f2, $f2, $f4
/* 17ACDC 8024C3FC 4602D682 */ mul.s $f26, $f26, $f2
/* 17ACE0 8024C400 00000000 */ nop
/* 17ACE4 8024C404 C7BC0010 */ lwc1 $f28, 0x10($sp)
/* 17ACE8 8024C408 4602E602 */ mul.s $f24, $f28, $f2
/* 17ACEC 8024C40C 00000000 */ nop
/* 17ACF0 8024C410 3C02802A */ lui $v0, %hi(D_8029F286)
/* 17ACF4 8024C414 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 17ACF8 8024C418 44820000 */ mtc1 $v0, $f0
/* 17ACFC 8024C41C 00000000 */ nop
/* 17AD00 8024C420 46800020 */ cvt.s.w $f0, $f0
/* 17AD04 8024C424 46020002 */ mul.s $f0, $f0, $f2
/* 17AD08 8024C428 00000000 */ nop
/* 17AD0C 8024C42C 4602F582 */ mul.s $f22, $f30, $f2
/* 17AD10 8024C430 00000000 */ nop
/* 17AD14 8024C434 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17AD18 8024C438 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 17AD1C 8024C43C 44827000 */ mtc1 $v0, $f14
/* 17AD20 8024C440 00000000 */ nop
/* 17AD24 8024C444 468073A0 */ cvt.s.w $f14, $f14
/* 17AD28 8024C448 46027382 */ mul.s $f14, $f14, $f2
/* 17AD2C 8024C44C 00000000 */ nop
/* 17AD30 8024C450 3C02802A */ lui $v0, %hi(D_8029F282)
/* 17AD34 8024C454 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 17AD38 8024C458 44825000 */ mtc1 $v0, $f10
/* 17AD3C 8024C45C 00000000 */ nop
/* 17AD40 8024C460 468052A0 */ cvt.s.w $f10, $f10
/* 17AD44 8024C464 46025282 */ mul.s $f10, $f10, $f2
/* 17AD48 8024C468 00000000 */ nop
/* 17AD4C 8024C46C 46003180 */ add.s $f6, $f6, $f0
/* 17AD50 8024C470 3C014380 */ lui $at, 0x4380
/* 17AD54 8024C474 44810000 */ mtc1 $at, $f0
/* 17AD58 8024C478 00000000 */ nop
/* 17AD5C 8024C47C 46003182 */ mul.s $f6, $f6, $f0
/* 17AD60 8024C480 00000000 */ nop
/* 17AD64 8024C484 3C01802A */ lui $at, %hi(D_8029F294)
/* 17AD68 8024C488 C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
/* 17AD6C 8024C48C 46040002 */ mul.s $f0, $f0, $f4
/* 17AD70 8024C490 00000000 */ nop
/* 17AD74 8024C494 461AA500 */ add.s $f20, $f20, $f26
/* 17AD78 8024C498 46189480 */ add.s $f18, $f18, $f24
/* 17AD7C 8024C49C 46168400 */ add.s $f16, $f16, $f22
/* 17AD80 8024C4A0 460E6300 */ add.s $f12, $f12, $f14
/* 17AD84 8024C4A4 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 17AD88 8024C4A8 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 17AD8C 8024C4AC 3C02802A */ lui $v0, %hi(D_8029F284)
/* 17AD90 8024C4B0 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 17AD94 8024C4B4 460A4200 */ add.s $f8, $f8, $f10
/* 17AD98 8024C4B8 E6140054 */ swc1 $f20, 0x54($s0)
/* 17AD9C 8024C4BC 44822000 */ mtc1 $v0, $f4
/* 17ADA0 8024C4C0 00000000 */ nop
/* 17ADA4 8024C4C4 46802120 */ cvt.s.w $f4, $f4
/* 17ADA8 8024C4C8 46022102 */ mul.s $f4, $f4, $f2
/* 17ADAC 8024C4CC 00000000 */ nop
/* 17ADB0 8024C4D0 E6120058 */ swc1 $f18, 0x58($s0)
/* 17ADB4 8024C4D4 E610005C */ swc1 $f16, 0x5c($s0)
/* 17ADB8 8024C4D8 4600670D */ trunc.w.s $f28, $f12
/* 17ADBC 8024C4DC 4402E000 */ mfc1 $v0, $f28
/* 17ADC0 8024C4E0 00000000 */ nop
/* 17ADC4 8024C4E4 A602001E */ sh $v0, 0x1e($s0)
/* 17ADC8 8024C4E8 46040000 */ add.s $f0, $f0, $f4
/* 17ADCC 8024C4EC 4600470D */ trunc.w.s $f28, $f8
/* 17ADD0 8024C4F0 4402E000 */ mfc1 $v0, $f28
/* 17ADD4 8024C4F4 00000000 */ nop
/* 17ADD8 8024C4F8 A6020024 */ sh $v0, 0x24($s0)
/* 17ADDC 8024C4FC 4600070D */ trunc.w.s $f28, $f0
/* 17ADE0 8024C500 4402E000 */ mfc1 $v0, $f28
/* 17ADE4 8024C504 00000000 */ nop
/* 17ADE8 8024C508 A6020022 */ sh $v0, 0x22($s0)
/* 17ADEC 8024C50C 4600370D */ trunc.w.s $f28, $f6
/* 17ADF0 8024C510 4402E000 */ mfc1 $v0, $f28
/* 17ADF4 8024C514 00000000 */ nop
/* 17ADF8 8024C518 A6020026 */ sh $v0, 0x26($s0)
/* 17ADFC 8024C51C 84820000 */ lh $v0, ($a0)
/* 17AE00 8024C520 94830000 */ lhu $v1, ($a0)
/* 17AE04 8024C524 14400006 */ bnez $v0, .L8024C540
/* 17AE08 8024C528 2462FFFF */ addiu $v0, $v1, -1
/* 17AE0C 8024C52C 24020001 */ addiu $v0, $zero, 1
/* 17AE10 8024C530 3C01802A */ lui $at, %hi(D_8029F29C)
/* 17AE14 8024C534 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 17AE18 8024C538 08093151 */ j .L8024C544
/* 17AE1C 8024C53C 00000000 */ nop
.L8024C540:
/* 17AE20 8024C540 A4820000 */ sh $v0, ($a0)
.L8024C544:
/* 17AE24 8024C544 8FBF001C */ lw $ra, 0x1c($sp)
/* 17AE28 8024C548 8FB00018 */ lw $s0, 0x18($sp)
/* 17AE2C 8024C54C D7BE0048 */ ldc1 $f30, 0x48($sp)
/* 17AE30 8024C550 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 17AE34 8024C554 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 17AE38 8024C558 D7B80030 */ ldc1 $f24, 0x30($sp)
/* 17AE3C 8024C55C D7B60028 */ ldc1 $f22, 0x28($sp)
/* 17AE40 8024C560 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 17AE44 8024C564 0000102D */ daddu $v0, $zero, $zero
/* 17AE48 8024C568 03E00008 */ jr $ra
/* 17AE4C 8024C56C 27BD0050 */ addiu $sp, $sp, 0x50

View File

@ -1,256 +0,0 @@
.set noat # allow manual use of $at
.set noreorder # don't insert nops after branches
glabel func_8024C570
/* 17AE50 8024C570 27BDFFB0 */ addiu $sp, $sp, -0x50
/* 17AE54 8024C574 AFB00018 */ sw $s0, 0x18($sp)
/* 17AE58 8024C578 3C10800B */ lui $s0, %hi(gCameras+0x558)
/* 17AE5C 8024C57C 261022D8 */ addiu $s0, $s0, %lo(gCameras+0x558)
/* 17AE60 8024C580 AFBF001C */ sw $ra, 0x1c($sp)
/* 17AE64 8024C584 F7BE0048 */ sdc1 $f30, 0x48($sp)
/* 17AE68 8024C588 F7BC0040 */ sdc1 $f28, 0x40($sp)
/* 17AE6C 8024C58C F7BA0038 */ sdc1 $f26, 0x38($sp)
/* 17AE70 8024C590 F7B80030 */ sdc1 $f24, 0x30($sp)
/* 17AE74 8024C594 F7B60028 */ sdc1 $f22, 0x28($sp)
/* 17AE78 8024C598 10A00036 */ beqz $a1, .L8024C674
/* 17AE7C 8024C59C F7B40020 */ sdc1 $f20, 0x20($sp)
/* 17AE80 8024C5A0 3C02802A */ lui $v0, %hi(D_8029F2A4)
/* 17AE84 8024C5A4 8042F2A4 */ lb $v0, %lo(D_8029F2A4)($v0)
/* 17AE88 8024C5A8 1040000A */ beqz $v0, .L8024C5D4
/* 17AE8C 8024C5AC 00000000 */ nop
/* 17AE90 8024C5B0 C6000054 */ lwc1 $f0, 0x54($s0)
/* 17AE94 8024C5B4 C6020058 */ lwc1 $f2, 0x58($s0)
/* 17AE98 8024C5B8 C604005C */ lwc1 $f4, 0x5c($s0)
/* 17AE9C 8024C5BC 3C01802A */ lui $at, %hi(D_8029F270)
/* 17AEA0 8024C5C0 E420F270 */ swc1 $f0, %lo(D_8029F270)($at)
/* 17AEA4 8024C5C4 3C01802A */ lui $at, %hi(D_8029F274)
/* 17AEA8 8024C5C8 E422F274 */ swc1 $f2, %lo(D_8029F274)($at)
/* 17AEAC 8024C5CC 3C01802A */ lui $at, %hi(D_8029F278)
/* 17AEB0 8024C5D0 E424F278 */ swc1 $f4, %lo(D_8029F278)($at)
.L8024C5D4:
/* 17AEB4 8024C5D4 8602001E */ lh $v0, 0x1e($s0)
/* 17AEB8 8024C5D8 86040026 */ lh $a0, 0x26($s0)
/* 17AEBC 8024C5DC 86030024 */ lh $v1, 0x24($s0)
/* 17AEC0 8024C5E0 44820000 */ mtc1 $v0, $f0
/* 17AEC4 8024C5E4 00000000 */ nop
/* 17AEC8 8024C5E8 46800020 */ cvt.s.w $f0, $f0
/* 17AECC 8024C5EC 86020022 */ lh $v0, 0x22($s0)
/* 17AED0 8024C5F0 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17AED4 8024C5F4 E420F28C */ swc1 $f0, %lo(D_8029F28C)($at)
/* 17AED8 8024C5F8 44820000 */ mtc1 $v0, $f0
/* 17AEDC 8024C5FC 00000000 */ nop
/* 17AEE0 8024C600 46800020 */ cvt.s.w $f0, $f0
/* 17AEE4 8024C604 3C01802A */ lui $at, %hi(D_8029F294)
/* 17AEE8 8024C608 E420F294 */ swc1 $f0, %lo(D_8029F294)($at)
/* 17AEEC 8024C60C 44830000 */ mtc1 $v1, $f0
/* 17AEF0 8024C610 00000000 */ nop
/* 17AEF4 8024C614 46800020 */ cvt.s.w $f0, $f0
/* 17AEF8 8024C618 3C01802A */ lui $at, %hi(D_8029F290)
/* 17AEFC 8024C61C E420F290 */ swc1 $f0, %lo(D_8029F290)($at)
/* 17AF00 8024C620 04820001 */ bltzl $a0, .L8024C628
/* 17AF04 8024C624 248400FF */ addiu $a0, $a0, 0xff
.L8024C628:
/* 17AF08 8024C628 00041203 */ sra $v0, $a0, 8
/* 17AF0C 8024C62C C6020054 */ lwc1 $f2, 0x54($s0)
/* 17AF10 8024C630 C6040058 */ lwc1 $f4, 0x58($s0)
/* 17AF14 8024C634 C606005C */ lwc1 $f6, 0x5c($s0)
/* 17AF18 8024C638 3C03802A */ lui $v1, %hi(D_8029F29E)
/* 17AF1C 8024C63C 9463F29E */ lhu $v1, %lo(D_8029F29E)($v1)
/* 17AF20 8024C640 44820000 */ mtc1 $v0, $f0
/* 17AF24 8024C644 00000000 */ nop
/* 17AF28 8024C648 46800020 */ cvt.s.w $f0, $f0
/* 17AF2C 8024C64C 3C01802A */ lui $at, %hi(D_8029F298)
/* 17AF30 8024C650 E420F298 */ swc1 $f0, %lo(D_8029F298)($at)
/* 17AF34 8024C654 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17AF38 8024C658 E422F2A8 */ swc1 $f2, %lo(D_8029F2A8)($at)
/* 17AF3C 8024C65C 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17AF40 8024C660 E424F2AC */ swc1 $f4, %lo(D_8029F2AC)($at)
/* 17AF44 8024C664 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17AF48 8024C668 E426F2B0 */ swc1 $f6, %lo(D_8029F2B0)($at)
/* 17AF4C 8024C66C 3C01802A */ lui $at, %hi(D_8029F2A0)
/* 17AF50 8024C670 A423F2A0 */ sh $v1, %lo(D_8029F2A0)($at)
.L8024C674:
/* 17AF54 8024C674 3C01802A */ lui $at, %hi(D_8029F274)
/* 17AF58 8024C678 C43CF274 */ lwc1 $f28, %lo(D_8029F274)($at)
/* 17AF5C 8024C67C 3C01802A */ lui $at, %hi(D_8029F270)
/* 17AF60 8024C680 C43AF270 */ lwc1 $f26, %lo(D_8029F270)($at)
/* 17AF64 8024C684 3C02802A */ lui $v0, %hi(D_8029F2A5)
/* 17AF68 8024C688 8042F2A5 */ lb $v0, %lo(D_8029F2A5)($v0)
/* 17AF6C 8024C68C 3C01802A */ lui $at, %hi(D_8029F278)
/* 17AF70 8024C690 C43EF278 */ lwc1 $f30, %lo(D_8029F278)($at)
/* 17AF74 8024C694 14400027 */ bnez $v0, .L8024C734
/* 17AF78 8024C698 E7BC0010 */ swc1 $f28, 0x10($sp)
/* 17AF7C 8024C69C 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17AF80 8024C6A0 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17AF84 8024C6A4 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17AF88 8024C6A8 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17AF8C 8024C6AC 3C013F80 */ lui $at, 0x3f80
/* 17AF90 8024C6B0 4481C000 */ mtc1 $at, $f24
/* 17AF94 8024C6B4 44822000 */ mtc1 $v0, $f4
/* 17AF98 8024C6B8 00000000 */ nop
/* 17AF9C 8024C6BC 46802120 */ cvt.s.w $f4, $f4
/* 17AFA0 8024C6C0 44830000 */ mtc1 $v1, $f0
/* 17AFA4 8024C6C4 00000000 */ nop
/* 17AFA8 8024C6C8 46800020 */ cvt.s.w $f0, $f0
/* 17AFAC 8024C6CC 46002103 */ div.s $f4, $f4, $f0
/* 17AFB0 8024C6D0 4604C301 */ sub.s $f12, $f24, $f4
/* 17AFB4 8024C6D4 3C014049 */ lui $at, 0x4049
/* 17AFB8 8024C6D8 34210FD0 */ ori $at, $at, 0xfd0
/* 17AFBC 8024C6DC 4481B000 */ mtc1 $at, $f22
/* 17AFC0 8024C6E0 00000000 */ nop
/* 17AFC4 8024C6E4 46166302 */ mul.s $f12, $f12, $f22
/* 17AFC8 8024C6E8 00000000 */ nop
/* 17AFCC 8024C6EC 3C013F00 */ lui $at, 0x3f00
/* 17AFD0 8024C6F0 4481A000 */ mtc1 $at, $f20
/* 17AFD4 8024C6F4 00000000 */ nop
/* 17AFD8 8024C6F8 46146302 */ mul.s $f12, $f12, $f20
/* 17AFDC 8024C6FC 0C00A85B */ jal sin_rad
/* 17AFE0 8024C700 00000000 */ nop
/* 17AFE4 8024C704 46160002 */ mul.s $f0, $f0, $f22
/* 17AFE8 8024C708 00000000 */ nop
/* 17AFEC 8024C70C 46140302 */ mul.s $f12, $f0, $f20
/* 17AFF0 8024C710 0C00A85B */ jal sin_rad
/* 17AFF4 8024C714 00000000 */ nop
/* 17AFF8 8024C718 46160002 */ mul.s $f0, $f0, $f22
/* 17AFFC 8024C71C 00000000 */ nop
/* 17B000 8024C720 46140302 */ mul.s $f12, $f0, $f20
/* 17B004 8024C724 0C00A85B */ jal sin_rad
/* 17B008 8024C728 00000000 */ nop
/* 17B00C 8024C72C 080931D8 */ j .L8024C760
/* 17B010 8024C730 4600C101 */ sub.s $f4, $f24, $f0
.L8024C734:
/* 17B014 8024C734 3C02802A */ lui $v0, %hi(D_8029F29E)
/* 17B018 8024C738 8442F29E */ lh $v0, %lo(D_8029F29E)($v0)
/* 17B01C 8024C73C 3C03802A */ lui $v1, %hi(D_8029F2A0)
/* 17B020 8024C740 8463F2A0 */ lh $v1, %lo(D_8029F2A0)($v1)
/* 17B024 8024C744 44822000 */ mtc1 $v0, $f4
/* 17B028 8024C748 00000000 */ nop
/* 17B02C 8024C74C 46802120 */ cvt.s.w $f4, $f4
/* 17B030 8024C750 44830000 */ mtc1 $v1, $f0
/* 17B034 8024C754 00000000 */ nop
/* 17B038 8024C758 46800020 */ cvt.s.w $f0, $f0
/* 17B03C 8024C75C 46002103 */ div.s $f4, $f4, $f0
.L8024C760:
/* 17B040 8024C760 3C01802A */ lui $at, %hi(D_8029F2A8)
/* 17B044 8024C764 C434F2A8 */ lwc1 $f20, %lo(D_8029F2A8)($at)
/* 17B048 8024C768 4604A502 */ mul.s $f20, $f20, $f4
/* 17B04C 8024C76C 00000000 */ nop
/* 17B050 8024C770 3C01802A */ lui $at, %hi(D_8029F2AC)
/* 17B054 8024C774 C432F2AC */ lwc1 $f18, %lo(D_8029F2AC)($at)
/* 17B058 8024C778 46049482 */ mul.s $f18, $f18, $f4
/* 17B05C 8024C77C 00000000 */ nop
/* 17B060 8024C780 3C01802A */ lui $at, %hi(D_8029F2B0)
/* 17B064 8024C784 C430F2B0 */ lwc1 $f16, %lo(D_8029F2B0)($at)
/* 17B068 8024C788 46048402 */ mul.s $f16, $f16, $f4
/* 17B06C 8024C78C 00000000 */ nop
/* 17B070 8024C790 3C01802A */ lui $at, %hi(D_8029F298)
/* 17B074 8024C794 C426F298 */ lwc1 $f6, %lo(D_8029F298)($at)
/* 17B078 8024C798 46043182 */ mul.s $f6, $f6, $f4
/* 17B07C 8024C79C 00000000 */ nop
/* 17B080 8024C7A0 3C01802A */ lui $at, %hi(D_8029F28C)
/* 17B084 8024C7A4 C42CF28C */ lwc1 $f12, %lo(D_8029F28C)($at)
/* 17B088 8024C7A8 46046302 */ mul.s $f12, $f12, $f4
/* 17B08C 8024C7AC 00000000 */ nop
/* 17B090 8024C7B0 3C01802A */ lui $at, %hi(D_8029F290)
/* 17B094 8024C7B4 C428F290 */ lwc1 $f8, %lo(D_8029F290)($at)
/* 17B098 8024C7B8 46044202 */ mul.s $f8, $f8, $f4
/* 17B09C 8024C7BC 00000000 */ nop
/* 17B0A0 8024C7C0 3C013F80 */ lui $at, 0x3f80
/* 17B0A4 8024C7C4 44811000 */ mtc1 $at, $f2
/* 17B0A8 8024C7C8 00000000 */ nop
/* 17B0AC 8024C7CC 46041081 */ sub.s $f2, $f2, $f4
/* 17B0B0 8024C7D0 4602D682 */ mul.s $f26, $f26, $f2
/* 17B0B4 8024C7D4 00000000 */ nop
/* 17B0B8 8024C7D8 C7BC0010 */ lwc1 $f28, 0x10($sp)
/* 17B0BC 8024C7DC 4602E602 */ mul.s $f24, $f28, $f2
/* 17B0C0 8024C7E0 00000000 */ nop
/* 17B0C4 8024C7E4 3C02802A */ lui $v0, %hi(D_8029F286)
/* 17B0C8 8024C7E8 8442F286 */ lh $v0, %lo(D_8029F286)($v0)
/* 17B0CC 8024C7EC 44820000 */ mtc1 $v0, $f0
/* 17B0D0 8024C7F0 00000000 */ nop
/* 17B0D4 8024C7F4 46800020 */ cvt.s.w $f0, $f0
/* 17B0D8 8024C7F8 46020002 */ mul.s $f0, $f0, $f2
/* 17B0DC 8024C7FC 00000000 */ nop
/* 17B0E0 8024C800 4602F582 */ mul.s $f22, $f30, $f2
/* 17B0E4 8024C804 00000000 */ nop
/* 17B0E8 8024C808 3C02802A */ lui $v0, %hi(D_8029F280)
/* 17B0EC 8024C80C 8442F280 */ lh $v0, %lo(D_8029F280)($v0)
/* 17B0F0 8024C810 44827000 */ mtc1 $v0, $f14
/* 17B0F4 8024C814 00000000 */ nop
/* 17B0F8 8024C818 468073A0 */ cvt.s.w $f14, $f14
/* 17B0FC 8024C81C 46027382 */ mul.s $f14, $f14, $f2
/* 17B100 8024C820 00000000 */ nop
/* 17B104 8024C824 3C02802A */ lui $v0, %hi(D_8029F282)
/* 17B108 8024C828 8442F282 */ lh $v0, %lo(D_8029F282)($v0)
/* 17B10C 8024C82C 44825000 */ mtc1 $v0, $f10
/* 17B110 8024C830 00000000 */ nop
/* 17B114 8024C834 468052A0 */ cvt.s.w $f10, $f10
/* 17B118 8024C838 46025282 */ mul.s $f10, $f10, $f2
/* 17B11C 8024C83C 00000000 */ nop
/* 17B120 8024C840 46003180 */ add.s $f6, $f6, $f0
/* 17B124 8024C844 3C014380 */ lui $at, 0x4380
/* 17B128 8024C848 44810000 */ mtc1 $at, $f0
/* 17B12C 8024C84C 00000000 */ nop
/* 17B130 8024C850 46003182 */ mul.s $f6, $f6, $f0
/* 17B134 8024C854 00000000 */ nop
/* 17B138 8024C858 3C01802A */ lui $at, %hi(D_8029F294)
/* 17B13C 8024C85C C420F294 */ lwc1 $f0, %lo(D_8029F294)($at)
/* 17B140 8024C860 46040002 */ mul.s $f0, $f0, $f4
/* 17B144 8024C864 00000000 */ nop
/* 17B148 8024C868 461AA500 */ add.s $f20, $f20, $f26
/* 17B14C 8024C86C 46189480 */ add.s $f18, $f18, $f24
/* 17B150 8024C870 46168400 */ add.s $f16, $f16, $f22
/* 17B154 8024C874 460E6300 */ add.s $f12, $f12, $f14
/* 17B158 8024C878 3C04802A */ lui $a0, %hi(D_8029F29E)
/* 17B15C 8024C87C 2484F29E */ addiu $a0, $a0, %lo(D_8029F29E)
/* 17B160 8024C880 3C02802A */ lui $v0, %hi(D_8029F284)
/* 17B164 8024C884 8442F284 */ lh $v0, %lo(D_8029F284)($v0)
/* 17B168 8024C888 460A4200 */ add.s $f8, $f8, $f10
/* 17B16C 8024C88C E6140054 */ swc1 $f20, 0x54($s0)
/* 17B170 8024C890 44822000 */ mtc1 $v0, $f4
/* 17B174 8024C894 00000000 */ nop
/* 17B178 8024C898 46802120 */ cvt.s.w $f4, $f4
/* 17B17C 8024C89C 46022102 */ mul.s $f4, $f4, $f2
/* 17B180 8024C8A0 00000000 */ nop
/* 17B184 8024C8A4 E6120058 */ swc1 $f18, 0x58($s0)
/* 17B188 8024C8A8 E610005C */ swc1 $f16, 0x5c($s0)
/* 17B18C 8024C8AC 4600670D */ trunc.w.s $f28, $f12
/* 17B190 8024C8B0 4402E000 */ mfc1 $v0, $f28
/* 17B194 8024C8B4 00000000 */ nop
/* 17B198 8024C8B8 A602001E */ sh $v0, 0x1e($s0)
/* 17B19C 8024C8BC 46040000 */ add.s $f0, $f0, $f4
/* 17B1A0 8024C8C0 4600470D */ trunc.w.s $f28, $f8
/* 17B1A4 8024C8C4 4402E000 */ mfc1 $v0, $f28
/* 17B1A8 8024C8C8 00000000 */ nop
/* 17B1AC 8024C8CC A6020024 */ sh $v0, 0x24($s0)
/* 17B1B0 8024C8D0 4600070D */ trunc.w.s $f28, $f0
/* 17B1B4 8024C8D4 4402E000 */ mfc1 $v0, $f28
/* 17B1B8 8024C8D8 00000000 */ nop
/* 17B1BC 8024C8DC A6020022 */ sh $v0, 0x22($s0)
/* 17B1C0 8024C8E0 4600370D */ trunc.w.s $f28, $f6
/* 17B1C4 8024C8E4 4402E000 */ mfc1 $v0, $f28
/* 17B1C8 8024C8E8 00000000 */ nop
/* 17B1CC 8024C8EC A6020026 */ sh $v0, 0x26($s0)
/* 17B1D0 8024C8F0 84820000 */ lh $v0, ($a0)
/* 17B1D4 8024C8F4 94830000 */ lhu $v1, ($a0)
/* 17B1D8 8024C8F8 14400006 */ bnez $v0, .L8024C914
/* 17B1DC 8024C8FC 2462FFFF */ addiu $v0, $v1, -1
/* 17B1E0 8024C900 24020001 */ addiu $v0, $zero, 1
/* 17B1E4 8024C904 3C01802A */ lui $at, %hi(D_8029F29C)
/* 17B1E8 8024C908 A022F29C */ sb $v0, %lo(D_8029F29C)($at)
/* 17B1EC 8024C90C 08093246 */ j .L8024C918
/* 17B1F0 8024C910 00000000 */ nop
.L8024C914:
/* 17B1F4 8024C914 A4820000 */ sh $v0, ($a0)
.L8024C918:
/* 17B1F8 8024C918 8FBF001C */ lw $ra, 0x1c($sp)
/* 17B1FC 8024C91C 8FB00018 */ lw $s0, 0x18($sp)
/* 17B200 8024C920 D7BE0048 */ ldc1 $f30, 0x48($sp)
/* 17B204 8024C924 D7BC0040 */ ldc1 $f28, 0x40($sp)
/* 17B208 8024C928 D7BA0038 */ ldc1 $f26, 0x38($sp)
/* 17B20C 8024C92C D7B80030 */ ldc1 $f24, 0x30($sp)
/* 17B210 8024C930 D7B60028 */ ldc1 $f22, 0x28($sp)
/* 17B214 8024C934 D7B40020 */ ldc1 $f20, 0x20($sp)
/* 17B218 8024C938 0000102D */ daddu $v0, $zero, $zero
/* 17B21C 8024C93C 03E00008 */ jr $ra
/* 17B220 8024C940 27BD0050 */ addiu $sp, $sp, 0x50

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