text
stringlengths
6.38k
228k
### RAW ASSEMBLY INSTRUCTIONS: glabel imgfx_load_anim /* D2920 8013C220 27BDFFD8 */ addiu $sp, $sp, -0x28 /* D2924 8013C224 AFB20018 */ sw $s2, 0x18($sp) /* D2928 8013C228 0080902D */ daddu $s2, $a0, $zero /* D292C 8013C22C AFBF0020 */ sw $ra, 0x20($sp) /* D2930 8013C230 AFB3001C */ sw $s3, 0x1C($sp) /* D2934 8013C234 AFB10014 */ sw $s1, 0x14($sp) /* D2938 8013C238 AFB00010 */ sw $s0, 0x10($sp) /* D293C 8013C23C 8E42001C */ lw $v0, 0x1C($s2) /* D2940 8013C240 3C100025 */ lui $s0, %hi(D_24B7F0) /* D2944 8013C244 2610B7F0 */ addiu $s0, $s0, %lo(D_24B7F0) /* D2948 8013C248 00021080 */ sll $v0, $v0, 2 /* D294C 8013C24C 3C018015 */ lui $at, %hi(ImgFXAnimOffsets) /* D2950 8013C250 00220821 */ addu $at, $at, $v0 /* D2954 8013C254 8C22EF64 */ lw $v0, %lo(ImgFXAnimOffsets)($at) /* D2958 8013C258 3C048015 */ lui $a0, %hi(ImgFXAnimHeaders) /* D295C 8013C25C 24846980 */ addiu $a0, $a0, %lo(ImgFXAnimHeaders) /* D2960 8013C260 00508821 */ addu $s1, $v0, $s0 /* D2964 8013C264 92420000 */ lbu $v0, 0x0($s2) /* D2968 8013C268 8E430064 */ lw $v1, 0x64($s2) /* D296C 8013C26C 00021100 */ sll $v0, $v0, 4 /* D2970 8013C270 10710057 */ beq $v1, $s1, .L8013C3D0 /* D2974 8013C274 00449821 */ addu $s3, $v0, $a0 /* D2978 8013C278 0220202D */ daddu $a0, $s1, $zero /* D297C 8013C27C 24850010 */ addiu $a1, $a0, 0x10 /* D2980 8013C280 0260302D */ daddu $a2, $s3, $zero /* D2984 8013C284 0C00A5CF */ jal dma_copy /* D2988 8013C288 AE440064 */ sw $a0, 0x64($s2) /* D298C 8013C28C 8E440068 */ lw $a0, 0x68($s2) /* D2990 8013C290 10800004 */ beqz $a0, .L8013C2A4 /* D2994 8013C294 00000000 */ nop /* D2998 8013C298 0C04E984 */ jal imgfx_add_to_cache /* D299C 8013C29C 24050001 */ addiu $a1, $zero, 0x1 /* D29A0 8013C2A0 AE400068 */ sw $zero, 0x68($s2) .L8013C2A4: /* D29A4 8013C2A4 8E44006C */ lw $a0, 0x6C($s2) /* D29A8 8013C2A8 10800004 */ beqz $a0, .L8013C2BC /* D29AC 8013C2AC 00000000 */ nop /* D29B0 8013C2B0 0C04E984 */ jal imgfx_add_to_cache /* D29B4 8013C2B4 24050001 */ addiu $a1, $zero, 0x1 /* D29B8 8013C2B8 AE40006C */ sw $zero, 0x6C($s2) .L8013C2BC: /* D29BC 8013C2BC 8E440070 */ lw $a0, 0x70($s2) /* D29C0 8013C2C0 10800004 */ beqz $a0, .L8013C2D4 /* D29C4 8013C2C4 00000000 */ nop /* D29C8 8013C2C8 0C04E984 */ jal imgfx_add_to_cache /* D29CC 8013C2CC 24050001 */ addiu $a1, $zero, 0x1 /* D29D0 8013C2D0 AE400070 */ sw $zero, 0x70($s2) .L8013C2D4: /* D29D4 8013C2D4 8E440074 */ lw $a0, 0x74($s2) /* D29D8 8013C2D8 10800004 */ beqz $a0, .L8013C2EC /* D29DC 8013C2DC 00000000 */ nop /* D29E0 8013C2E0 0C04E984 */ jal imgfx_add_to_cache /* D29E4 8013C2E4 24050001 */ addiu $a1, $zero, 0x1 /* D29E8 8013C2E8 AE400074 */ sw $zero, 0x74($s2) .L8013C2EC: /* D29EC 8013C2EC 96640008 */ lhu $a0, 0x8($s3) /* D29F0 8013C2F0 0C00AB39 */ jal heap_malloc /* D29F4 8013C2F4 00042100 */ sll $a0, $a0, 4 /* D29F8 8013C2F8 AE420068 */ sw $v0, 0x68($s2) /* D29FC 8013C2FC 96640008 */ lhu $a0, 0x8($s3) /* D2A00 8013C300 0C00AB39 */ jal heap_malloc /* D2A04 8013C304 00042100 */ sll $a0, $a0, 4 /* D2A08 8013C308 AE42006C */ sw $v0, 0x6C($s2) /* D2A0C 8013C30C 9664000A */ lhu $a0, 0xA($s3) /* D2A10 8013C310 0C00AB39 */ jal heap_malloc /* D2A14 8013C314 000420C0 */ sll $a0, $a0, 3 /* D2A18 8013C318 AE420070 */ sw $v0, 0x70($s2) /* D2A1C 8013C31C 9664000A */ lhu $a0, 0xA($s3) /* D2A20 8013C320 0C00AB39 */ jal heap_malloc /* D2A24 8013C324 000420C0 */ sll $a0, $a0, 3 /* D2A28 8013C328 AE420074 */ sw $v0, 0x74($s2) /* D2A2C 8013C32C 8E620004 */ lw $v0, 0x4($s3) /* D2A30 8013C330 8E460070 */ lw $a2, 0x70($s2) /* D2A34 8013C334 00508821 */ addu $s1, $v0, $s0 /* D2A38 8013C338 9662000A */ lhu $v0, 0xA($s3) /* D2A3C 8013C33C 0220202D */ daddu $a0, $s1, $zero /* D2A40 8013C340 000210C0 */ sll $v0, $v0, 3 /* D2A44 8013C344 02228021 */ addu $s0, $s1, $v0 /* D2A48 8013C348 0C00A5CF */ jal dma_copy /* D2A4C 8013C34C 0200282D */ daddu $a1, $s0, $zero /* D2A50 8013C350 0220202D */ daddu $a0, $s1, $zero /* D2A54 8013C354 8E460074 */ lw $a2, 0x74($s2) /* D2A58 8013C358 0C00A5CF */ jal dma_copy /* D2A5C 8013C35C 0200282D */ daddu $a1, $s0, $zero /* D2A60 8013C360 24090001 */ addiu $t1, $zero, 0x1 /* D2A64 8013C364 3C075555 */ lui $a3, (0x55555556 >> 16) /* D2A68 8013C368 34E75556 */ ori $a3, $a3, (0x55555556 & 0xFFFF) /* D2A6C 8013C36C 240800DF */ addiu $t0, $zero, 0xDF /* D2A70 8013C370 0240202D */ daddu $a0, $s2, $zero /* D2A74 8013C374 248A0008 */ addiu $t2, $a0, 0x8 .L8013C378: /* D2A78 8013C378 8C850070 */ lw $a1, 0x70($a0) .L8013C37C: /* D2A7C 8013C37C 8CA20000 */ lw $v0, 0x0($a1) /* D2A80 8013C380 00023602 */ srl $a2, $v0, 24 /* D2A84 8013C384 14C9000C */ bne $a2, $t1, .L8013C3B8 /* D2A88 8013C388 24A50008 */ addiu $a1, $a1, 0x8 /* D2A8C 8013C38C 8CA2FFFC */ lw $v0, -0x4($a1) /* D2A90 8013C390 8E630000 */ lw $v1, 0x0($s3) /* D2A94 8013C394 00431023 */ subu $v0, $v0, $v1 /* D2A98 8013C398 00470018 */ mult $v0, $a3 /* D2A9C 8013C39C 000217C3 */ sra $v0, $v0, 31 /* D2AA0 8013C3A0 8C830068 */ lw $v1, 0x68($a0) /* D2AA4 8013C3A4 00005810 */ mfhi $t3 /* D2AA8 8013C3A8 01621023 */ subu $v0, $t3, $v0 /* D2AAC 8013C3AC 00021080 */ sll $v0, $v0, 2 /* D2AB0 8013C3B0 00431021 */ addu $v0, $v0, $v1 /* D2AB4 8013C3B4 ACA2FFFC */ sw $v0, -0x4($a1) .L8013C3B8: /* D2AB8 8013C3B8 14C8FFF0 */ bne $a2, $t0, .L8013C37C /* D2ABC 8013C3BC 00000000 */ nop /* D2AC0 8013C3C0 24840004 */ addiu $a0, $a0, 0x4 /* D2AC4 8013C3C4 008A102A */ slt $v0, $a0, $t2 /* D2AC8 8013C3C8 1440FFEB */ bnez $v0, .L8013C378 /* D2ACC 8013C3CC 00000000 */ nop .L8013C3D0: /* D2AD0 8013C3D0 0260102D */ daddu $v0, $s3, $zero /* D2AD4 8013C3D4 8FBF0020 */ lw $ra, 0x20($sp) /* D2AD8 8013C3D8 8FB3001C */ lw $s3, 0x1C($sp) /* D2ADC 8013C3DC 8FB20018 */ lw $s2, 0x18($sp) /* D2AE0 8013C3E0 8FB10014 */ lw $s1, 0x14($sp) /* D2AE4 8013C3E4 8FB00010 */ lw $s0, 0x10($sp) /* D2AE8 8013C3E8 03E00008 */ jr $ra /* D2AEC 8013C3EC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ImgFXAnimHeader* imgfx_load_anim(ImgFXState* state) { u8* romStart = (s32) ImgFXAnimOffsets[state->ints.anim.type] + imgfx_data_ROM_START; ImgFXAnimHeader* anim = &ImgFXAnimHeaders[state->arrayIdx]; if (state->curAnimOffset != romStart) { u8* romEnd; s32 i; state->curAnimOffset = romStart; dma_copy(state->curAnimOffset, state->curAnimOffset + sizeof(*anim), anim); if (state->vtxBufs[0] != NULL) { imgfx_add_to_cache(state->vtxBufs[0], 1); state->vtxBufs[0] = NULL; } if (state->vtxBufs[1] != NULL) { imgfx_add_to_cache(state->vtxBufs[1], 1); state->vtxBufs[1] = NULL; } if (state->gfxBufs[0] != NULL) { imgfx_add_to_cache(state->gfxBufs[0], 1); state->gfxBufs[0] = NULL; } if (state->gfxBufs[1] != NULL) { // imgfx_add_to_cache(state->gfxBufs[1], 1); romEnd = (u8*) state->gfxBufs[1]; // required to match imgfx_add_to_cache(state->gfxBufs[1], 1); state->gfxBufs[1] = NULL; } state->vtxBufs[0] = heap_malloc(anim->vtxCount * sizeof(Vtx)); state->vtxBufs[1] = heap_malloc(anim->vtxCount * sizeof(Vtx)); state->gfxBufs[0] = heap_malloc(anim->gfxCount * sizeof(Gfx)); state->gfxBufs[1] = heap_malloc(anim->gfxCount * sizeof(Gfx)); romStart = imgfx_data_ROM_START + (s32)anim->gfxOffset; romEnd = romStart + anim->gfxCount * sizeof(Gfx); dma_copy(romStart, romEnd, state->gfxBufs[0]); dma_copy(romStart, romEnd, state->gfxBufs[1]); // Search through the state's displaylists for vertex commands // and adjust their addresses to point into the vertex buffers for (i = 0; i < ARRAY_COUNT(state->gfxBufs); i++) { Gfx* gfxBuffer = state->gfxBufs[i]; s32 j = 0; u32 cmd; // Loop over the displaylist commands until we hit an ENDDL do { u32 w0 = gfxBuffer[j++].words.w0; cmd = w0 >> 0x18; // If this command is a vertex command, adjust the vertex buffer address if (cmd == G_VTX) { // ImgFXVtx structs are 0xC bytes while Vtx are 0x10, so we need a (4/3) scaling factor // to compute a new, equivalent Vtx[i] address for an existing ImgFXVtx[i] address. // Unfortunately, using sizeof here does not match. gfxBuffer[j-1].words.w1 = ((((s32) gfxBuffer[j-1].words.w1 - (s32) anim->keyframesOffset) / 3) * 4) + (s32) state->vtxBufs[i]; } } while (cmd != G_ENDDL); } } return anim; }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_startup /* E968 80033568 27BDFFE8 */ addiu $sp, $sp, -0x18 /* E96C 8003356C AFB00010 */ sw $s0, 0x10($sp) /* E970 80033570 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* E974 80033574 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* E978 80033578 AFBF0014 */ sw $ra, 0x14($sp) /* E97C 8003357C 8E040000 */ lw $a0, 0x0($s0) /* E980 80033580 808200AC */ lb $v0, 0xAC($a0) /* E984 80033584 908300AC */ lbu $v1, 0xAC($a0) /* E988 80033588 10400003 */ beqz $v0, .L80033598 /* E98C 8003358C 2462FFFF */ addiu $v0, $v1, -0x1 /* E990 80033590 0800CDDE */ j .L80033778 /* E994 80033594 A08200AC */ sb $v0, 0xAC($a0) .L80033598: /* E998 80033598 3C01800A */ lui $at, %hi(gOverrideFlags) /* E99C 8003359C AC20A650 */ sw $zero, %lo(gOverrideFlags)($at) /* E9A0 800335A0 A4800086 */ sh $zero, 0x86($a0) /* E9A4 800335A4 A0800070 */ sb $zero, 0x70($a0) /* E9A8 800335A8 8E020000 */ lw $v0, 0x0($s0) /* E9AC 800335AC 2403FFFF */ addiu $v1, $zero, -0x1 /* E9B0 800335B0 A4830088 */ sh $v1, 0x88($a0) /* E9B4 800335B4 A480008C */ sh $zero, 0x8C($a0) /* E9B8 800335B8 A480008E */ sh $zero, 0x8E($a0) /* E9BC 800335BC A0400076 */ sb $zero, 0x76($v0) /* E9C0 800335C0 8E020000 */ lw $v0, 0x0($s0) /* E9C4 800335C4 A0400078 */ sb $zero, 0x78($v0) /* E9C8 800335C8 8E020000 */ lw $v0, 0x0($s0) /* E9CC 800335CC A040007D */ sb $zero, 0x7D($v0) /* E9D0 800335D0 8E020000 */ lw $v0, 0x0($s0) /* E9D4 800335D4 A04300A8 */ sb $v1, 0xA8($v0) /* E9D8 800335D8 8E020000 */ lw $v0, 0x0($s0) /* E9DC 800335DC A04000AA */ sb $zero, 0xAA($v0) /* E9E0 800335E0 8E020000 */ lw $v0, 0x0($s0) /* E9E4 800335E4 A04300A9 */ sb $v1, 0xA9($v0) /* E9E8 800335E8 8E020000 */ lw $v0, 0x0($s0) /* E9EC 800335EC 0C00AB00 */ jal general_heap_create /* E9F0 800335F0 A0400071 */ sb $zero, 0x71($v0) /* E9F4 800335F4 0C047624 */ jal clear_render_tasks /* E9F8 800335F8 00000000 */ nop /* E9FC 800335FC 0C048C2E */ jal clear_worker_list /* EA00 80033600 00000000 */ nop /* EA04 80033604 0C0B0C77 */ jal clear_script_list /* EA08 80033608 00000000 */ nop /* EA0C 8003360C 0C00B7BD */ jal create_cameras_a /* EA10 80033610 00000000 */ nop /* EA14 80033614 0C0B763E */ jal spr_init_sprites /* EA18 80033618 0000202D */ daddu $a0, $zero, $zero /* EA1C 8003361C 0C0482EC */ jal clear_entity_models /* EA20 80033620 00000000 */ nop /* EA24 80033624 0C047889 */ jal clear_animator_list /* EA28 80033628 00000000 */ nop /* EA2C 8003362C 0C045751 */ jal clear_model_data /* EA30 80033630 00000000 */ nop /* EA34 80033634 0C052010 */ jal clear_sprite_shading_data /* EA38 80033638 00000000 */ nop /* EA3C 8003363C 0C05177E */ jal reset_background_settings /* EA40 80033640 00000000 */ nop /* EA44 80033644 0000202D */ daddu $a0, $zero, $zero /* EA48 80033648 0C0514BA */ jal hud_element_set_aux_cache /* EA4C 8003364C 0080282D */ daddu $a1, $a0, $zero /* EA50 80033650 0C050440 */ jal hud_element_clear_cache /* EA54 80033654 00000000 */ nop /* EA58 80033658 0C0515A0 */ jal clear_trigger_data /* EA5C 8003365C 00000000 */ nop /* EA60 80033660 0C048D9D */ jal clear_printers /* EA64 80033664 00000000 */ nop /* EA68 80033668 0C04432E */ jal clear_entity_data /* EA6C 8003366C 0000202D */ daddu $a0, $zero, $zero /* EA70 80033670 0C04E042 */ jal clear_screen_overlays /* EA74 80033674 00000000 */ nop /* EA78 80033678 0C037F14 */ jal clear_player_status /* EA7C 8003367C 00000000 */ nop /* EA80 80033680 0C00E12F */ jal clear_npcs /* EA84 80033684 00000000 */ nop /* EA88 80033688 0C039CE8 */ jal clear_player_data /* EA8C 8003368C 00000000 */ nop /* EA90 80033690 0C01CACC */ jal reset_battle_status /* EA94 80033694 00000000 */ nop /* EA98 80033698 0C00F8CE */ jal init_encounter_status /* EA9C 8003369C 00000000 */ nop /* EAA0 800336A0 0C016727 */ jal clear_effect_data /* EAA4 800336A4 00000000 */ nop /* EAA8 800336A8 0C04C3FC */ jal clear_item_entity_data /* EAAC 800336AC 00000000 */ nop /* EAB0 800336B0 0C0514C8 */ jal clear_saved_variables /* EAB4 800336B4 00000000 */ nop /* EAB8 800336B8 0C016BE5 */ jal initialize_collision /* EABC 800336BC 00000000 */ nop /* EAC0 800336C0 0C052B02 */ jal bgm_init_music_players /* EAC4 800336C4 00000000 */ nop /* EAC8 800336C8 0C051CFC */ jal clear_windows /* EACC 800336CC 00000000 */ nop /* EAD0 800336D0 0C03AD60 */ jal partner_initialize_data /* EAD4 800336D4 00000000 */ nop /* EAD8 800336D8 0C052586 */ jal sfx_clear_sounds /* EADC 800336DC 00000000 */ nop /* EAE0 800336E0 0C05294B */ jal bgm_reset_volume /* EAE4 800336E4 00000000 */ nop /* EAE8 800336E8 0C00AE90 */ jal initialize_curtains /* EAEC 800336EC 00000000 */ nop /* EAF0 800336F0 0000202D */ daddu $a0, $zero, $zero /* EAF4 800336F4 24060004 */ addiu $a2, $zero, 0x4 /* EAF8 800336F8 2405000F */ addiu $a1, $zero, 0xF /* EAFC 800336FC 8E030000 */ lw $v1, 0x0($s0) .L80033700: /* EB00 80033700 A4660050 */ sh $a2, 0x50($v1) /* EB04 80033704 A4650048 */ sh $a1, 0x48($v1) /* EB08 80033708 24840001 */ addiu $a0, $a0, 0x1 /* EB0C 8003370C 28820004 */ slti $v0, $a0, 0x4 /* EB10 80033710 1440FFFB */ bnez $v0, .L80033700 /* EB14 80033714 24630002 */ addiu $v1, $v1, 0x2 /* EB18 80033718 0C00ABF6 */ jal fio_has_valid_backup /* EB1C 8003371C 00000000 */ nop /* EB20 80033720 3C02800E */ lui $v0, %hi(D_800D9620) /* EB24 80033724 8C429620 */ lw $v0, %lo(D_800D9620)($v0) /* EB28 80033728 14400007 */ bnez $v0, .L80033748 /* EB2C 8003372C 24020001 */ addiu $v0, $zero, 0x1 /* EB30 80033730 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* EB34 80033734 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* EB38 80033738 0C015857 */ jal audio_set_stereo /* EB3C 8003373C A06200AB */ sb $v0, 0xAB($v1) /* EB40 80033740 0800CDD7 */ j .L8003375C /* EB44 80033744 24040001 */ addiu $a0, $zero, 0x1 .L80033748: /* EB48 80033748 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* EB4C 8003374C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* EB50 80033750 0C015860 */ jal audio_set_mono /* EB54 80033754 A04000AB */ sb $zero, 0xAB($v0) /* EB58 80033758 24040001 */ addiu $a0, $zero, 0x1 .L8003375C: /* EB5C 8003375C 3C02800A */ lui $v0, %hi(gOverrideFlags) /* EB60 80033760 2442A650 */ addiu $v0, $v0, %lo(gOverrideFlags) /* EB64 80033764 8C430000 */ lw $v1, 0x0($v0) /* EB68 80033768 2405FFF7 */ addiu $a1, $zero, -0x9 /* EB6C 8003376C 00651824 */ and $v1, $v1, $a1 /* EB70 80033770 0C00CD3C */ jal set_game_mode /* EB74 80033774 AC430000 */ sw $v1, 0x0($v0) .L80033778: /* EB78 80033778 8FBF0014 */ lw $ra, 0x14($sp) /* EB7C 8003377C 8FB00010 */ lw $s0, 0x10($sp) /* EB80 80033780 03E00008 */ jr $ra /* EB84 80033784 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void state_step_startup(void) { GameStatus* gameStatus = gGameStatusPtr; s32 i; if (gameStatus->introState != INTRO_STATE_0) { gameStatus->introState--; return; } gOverrideFlags = 0; gGameStatusPtr->areaID = 0; gGameStatusPtr->isBattle = 0; gameStatus->prevArea = -1; gameStatus->mapID = 0; gameStatus->entryID = 0; gGameStatusPtr->unk_76 = 0; gGameStatusPtr->disableScripts = 0; gGameStatusPtr->keepUsingPartnerOnMapChange = FALSE; gGameStatusPtr->creditsViewportMode = -1; gGameStatusPtr->demoFlags = 0; gGameStatusPtr->unk_A9 = -1; gGameStatusPtr->demoState = DEMO_STATE_NONE; general_heap_create(); clear_render_tasks(); clear_worker_list(); clear_script_list(); create_cameras_a(); spr_init_sprites(PLAYER_SPRITES_MARIO_WORLD); clear_entity_models(); clear_animator_list(); clear_model_data(); clear_sprite_shading_data(); reset_background_settings(); hud_element_set_aux_cache(0, 0); hud_element_clear_cache(); clear_trigger_data(); clear_printers(); clear_entity_data(0); clear_screen_overlays(); clear_player_status(); clear_npcs(); clear_player_data(); reset_battle_status(); init_encounter_status(); clear_effect_data(); clear_item_entity_data(); clear_saved_variables(); initialize_collision(); bgm_init_music_players(); clear_windows(); partner_initialize_data(); sfx_clear_sounds(); bgm_reset_volume(); initialize_curtains(); for (i = 0; i < 4; i++) { gGameStatusPtr->unk_50[i] = 4; gGameStatusPtr->unk_48[i] = 0xF; } fio_has_valid_backup(); if (D_800D95E8.saveSlot == 0) { gGameStatusPtr->soundOutputMode = SOUND_OUT_STEREO; audio_set_stereo(); } else { gGameStatusPtr->soundOutputMode = SOUND_OUT_MONO; audio_set_mono(); } gOverrideFlags &= ~GLOBAL_OVERRIDES_8; set_game_mode(GAME_MODE_LOGOS); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80242BA0 /* 163400 80242BA0 2882F581 */ slti $v0, $a0, -0xA7F /* 163404 80242BA4 8FA90014 */ lw $t1, 0x14($sp) glabel func_80242BA8 /* 163408 80242BA8 8FAA0018 */ lw $t2, 0x18($sp) glabel func_80242BAC /* 16340C 80242BAC 8FAB001C */ lw $t3, 0x1C($sp) D_80242BB0: /* 163410 80242BB0 8FAC0020 */ lw $t4, 0x20($sp) /* 163414 80242BB4 14400075 */ bnez $v0, func_80242D8C glabel func_80242BB8 /* 163418 80242BB8 28A2F581 */ slti $v0, $a1, -0xA7F glabel func_80242BBC /* 16341C 80242BBC 14400073 */ bnez $v0, func_80242D8C glabel func_80242BC0 /* 163420 80242BC0 00000000 */ nop glabel .L80242BC4 /* 163424 80242BC4 18C00071 */ blez $a2, func_80242D8C glabel .L80242BC8 /* 163428 80242BC8 00000000 */ nop .L80242BCC: /* 16342C 80242BCC 18E0006F */ blez $a3, func_80242D8C glabel func_80242BD0 /* 163430 80242BD0 28820500 */ slti $v0, $a0, 0x500 .L80242BD4: /* 163434 80242BD4 1040006D */ beqz $v0, func_80242D8C glabel dead_kzn_17_LetterDelivery_CalcLetterPos /* 163438 80242BD8 28A203C0 */ slti $v0, $a1, 0x3C0 .L80242BDC: /* 16343C 80242BDC 1040006B */ beqz $v0, func_80242D8C D_80242BE0: /* 163440 80242BE0 28C20A80 */ slti $v0, $a2, 0xA80 .L80242BE4: /* 163444 80242BE4 10400069 */ beqz $v0, func_80242D8C .L80242BE8: /* 163448 80242BE8 28E20A80 */ slti $v0, $a3, 0xA80 D_80242BEC: /* 16344C 80242BEC 10400067 */ beqz $v0, func_80242D8C D_80242BF0: /* 163450 80242BF0 00000000 */ nop flo_14_pad_2BF4: /* 163454 80242BF4 3C02800A */ lui $v0, %hi(gMainGfxPos) D_80242BF8: /* 163458 80242BF8 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) .L80242BFC: /* 16345C 80242BFC 8C480000 */ lw $t0, 0x0($v0) D_80242C00: /* 163460 80242C00 25030008 */ addiu $v1, $t0, 0x8 .L80242C04: /* 163464 80242C04 AC430000 */ sw $v1, 0x0($v0) D_80242C08: /* 163468 80242C08 00061400 */ sll $v0, $a2, 16 glabel func_80242C0C /* 16346C 80242C0C 00021403 */ sra $v0, $v0, 16 /* 163470 80242C10 18400005 */ blez $v0, .L80242C28 glabel func_80242C14 /* 163474 80242C14 30420FFF */ andi $v0, $v0, 0xFFF .L80242C18: /* 163478 80242C18 00021300 */ sll $v0, $v0, 12 glabel func_80242C1C /* 16347C 80242C1C 3C03E400 */ lui $v1, (0xE4000000 >> 16) glabel .L80242C20 /* 163480 80242C20 08090B0B */ j .L80242C2C glabel func_80242C24 /* 163484 80242C24 00431825 */ or $v1, $v0, $v1 glabel .L80242C28 /* 163488 80242C28 3C03E400 */ lui $v1, (0xE4000000 >> 16) glabel .L80242C2C /* 16348C 80242C2C 00071400 */ sll $v0, $a3, 16 D_80242C30: /* 163490 80242C30 00021403 */ sra $v0, $v0, 16 .L80242C34: /* 163494 80242C34 18400004 */ blez $v0, D_80242C48 D_80242C38: /* 163498 80242C38 AD030000 */ sw $v1, 0x0($t0) D_80242C3C: /* 16349C 80242C3C 30420FFF */ andi $v0, $v0, 0xFFF D_80242C40: /* 1634A0 80242C40 00621025 */ or $v0, $v1, $v0 glabel func_80242C44 /* 1634A4 80242C44 AD020000 */ sw $v0, 0x0($t0) D_80242C48: /* 1634A8 80242C48 8FA20010 */ lw $v0, 0x10($sp) .L80242C4C: /* 1634AC 80242C4C 30420007 */ andi $v0, $v0, 0x7 D_80242C50: /* 1634B0 80242C50 00021E00 */ sll $v1, $v0, 24 /* 1634B4 80242C54 00041400 */ sll $v0, $a0, 16 D_80242C58: /* 1634B8 80242C58 00023403 */ sra $a2, $v0, 16 glabel func_80242C5C /* 1634BC 80242C5C 18C00003 */ blez $a2, D_80242C6C D_80242C60: /* 1634C0 80242C60 30C20FFF */ andi $v0, $a2, 0xFFF D_80242C64: /* 1634C4 80242C64 00021300 */ sll $v0, $v0, 12 glabel func_80242C68 /* 1634C8 80242C68 00621825 */ or $v1, $v1, $v0 D_80242C6C: /* 1634CC 80242C6C 00051400 */ sll $v0, $a1, 16 D_80242C70: /* 1634D0 80242C70 00021403 */ sra $v0, $v0, 16 .L80242C74: /* 1634D4 80242C74 18400004 */ blez $v0, .L80242C88 glabel func_80242C78 /* 1634D8 80242C78 AD030004 */ sw $v1, 0x4($t0) /* 1634DC 80242C7C 30420FFF */ andi $v0, $v0, 0xFFF .L80242C80: /* 1634E0 80242C80 00621025 */ or $v0, $v1, $v0 glabel func_80242C84 /* 1634E4 80242C84 AD020004 */ sw $v0, 0x4($t0) .L80242C88: /* 1634E8 80242C88 3C03800A */ lui $v1, %hi(gMainGfxPos) .L80242C8C: /* 1634EC 80242C8C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) .L80242C90: /* 1634F0 80242C90 8C620000 */ lw $v0, 0x0($v1) glabel func_80242C94 /* 1634F4 80242C94 0040202D */ daddu $a0, $v0, $zero .L80242C98: /* 1634F8 80242C98 24420008 */ addiu $v0, $v0, 0x8 /* 1634FC 80242C9C AC620000 */ sw $v0, 0x0($v1) glabel func_80242CA0 /* 163500 80242CA0 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 163504 80242CA4 AC820000 */ sw $v0, 0x0($a0) /* 163508 80242CA8 04C10012 */ bgez $a2, D_80242CF4 .L80242CAC: /* 16350C 80242CAC 24840004 */ addiu $a0, $a0, 0x4 .L80242CB0: /* 163510 80242CB0 000B1400 */ sll $v0, $t3, 16 .L80242CB4: /* 163514 80242CB4 00021403 */ sra $v0, $v0, 16 .L80242CB8: /* 163518 80242CB8 04410007 */ bgez $v0, D_80242CD8 .L80242CBC: /* 16351C 80242CBC 00C20018 */ mult $a2, $v0 .L80242CC0: /* 163520 80242CC0 00006812 */ mflo $t5 .L80242CC4: /* 163524 80242CC4 000D11C3 */ sra $v0, $t5, 7 glabel func_80242CC8 /* 163528 80242CC8 04410008 */ bgez $v0, func_80242CEC .L80242CCC: /* 16352C 80242CCC 01221023 */ subu $v0, $t1, $v0 glabel func_80242CD0 /* 163530 80242CD0 08090B3A */ j D_80242CE8 .L80242CD4: /* 163534 80242CD4 0000102D */ daddu $v0, $zero, $zero D_80242CD8: /* 163538 80242CD8 00006812 */ mflo $t5 .L80242CDC: /* 16353C 80242CDC 000D11C3 */ sra $v0, $t5, 7 D_80242CE0: /* 163540 80242CE0 5C400001 */ bgtzl $v0, D_80242CE8 glabel func_80242CE4 /* 163544 80242CE4 0000102D */ daddu $v0, $zero, $zero D_80242CE8: /* 163548 80242CE8 01221023 */ subu $v0, $t1, $v0 glabel func_80242CEC /* 16354C 80242CEC 08090B3E */ j func_80242CF8 glabel func_80242CF0 /* 163550 80242CF0 00023400 */ sll $a2, $v0, 16 D_80242CF4: /* 163554 80242CF4 00093400 */ sll $a2, $t1, 16 glabel func_80242CF8 /* 163558 80242CF8 04A10016 */ bgez $a1, .L80242D54 .L80242CFC: /* 16355C 80242CFC 3142FFFF */ andi $v0, $t2, 0xFFFF glabel func_80242D00 /* 163560 80242D00 000C1400 */ sll $v0, $t4, 16 glabel func_80242D04 /* 163564 80242D04 00021C03 */ sra $v1, $v0, 16 .L80242D08: /* 163568 80242D08 0461000A */ bgez $v1, D_80242D34 glabel func_80242D0C /* 16356C 80242D0C 00051400 */ sll $v0, $a1, 16 /* 163570 80242D10 00021403 */ sra $v0, $v0, 16 glabel func_80242D14 /* 163574 80242D14 00430018 */ mult $v0, $v1 .L80242D18: /* 163578 80242D18 00006812 */ mflo $t5 glabel func_80242D1C /* 16357C 80242D1C 000D11C3 */ sra $v0, $t5, 7 glabel func_80242D20 /* 163580 80242D20 04420001 */ bltzl $v0, func_80242D28 .L80242D24: /* 163584 80242D24 0000102D */ daddu $v0, $zero, $zero glabel func_80242D28 /* 163588 80242D28 01421023 */ subu $v0, $t2, $v0 glabel func_80242D2C /* 16358C 80242D2C 08090B55 */ j .L80242D54 .L80242D30: /* 163590 80242D30 3042FFFF */ andi $v0, $v0, 0xFFFF D_80242D34: /* 163594 80242D34 00021403 */ sra $v0, $v0, 16 glabel func_80242D38 /* 163598 80242D38 00430018 */ mult $v0, $v1 glabel func_80242D3C /* 16359C 80242D3C 00006812 */ mflo $t5 D_80242D40: /* 1635A0 80242D40 000D11C3 */ sra $v0, $t5, 7 .L80242D44: /* 1635A4 80242D44 5C400001 */ bgtzl $v0, func_80242D4C glabel func_80242D48 /* 1635A8 80242D48 0000102D */ daddu $v0, $zero, $zero glabel func_80242D4C /* 1635AC 80242D4C 01421023 */ subu $v0, $t2, $v0 D_80242D50: /* 1635B0 80242D50 3042FFFF */ andi $v0, $v0, 0xFFFF glabel .L80242D54 /* 1635B4 80242D54 00C21025 */ or $v0, $a2, $v0 glabel func_80242D58 /* 1635B8 80242D58 AC820000 */ sw $v0, 0x0($a0) .L80242D5C: /* 1635BC 80242D5C 3C03800A */ lui $v1, %hi(gMainGfxPos) D_80242D60: /* 1635C0 80242D60 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) glabel func_80242D64 /* 1635C4 80242D64 8C620000 */ lw $v0, 0x0($v1) .L80242D68: /* 1635C8 80242D68 0040202D */ daddu $a0, $v0, $zero .L80242D6C: /* 1635CC 80242D6C 24420008 */ addiu $v0, $v0, 0x8 D_80242D70: /* 1635D0 80242D70 AC620000 */ sw $v0, 0x0($v1) .L80242D74: /* 1635D4 80242D74 3C02F100 */ lui $v0, (0xF1000000 >> 16) .L80242D78: /* 1635D8 80242D78 AC820000 */ sw $v0, 0x0($a0) .L80242D7C: /* 1635DC 80242D7C 000B1400 */ sll $v0, $t3, 16 D_80242D80: /* 1635E0 80242D80 3183FFFF */ andi $v1, $t4, 0xFFFF .L80242D84: /* 1635E4 80242D84 00431025 */ or $v0, $v0, $v1 .L80242D88: /* 1635E8 80242D88 AC820004 */ sw $v0, 0x4($a0) glabel func_80242D8C /* 1635EC 80242D8C 03E00008 */ jr $ra glabel func_80242D90 /* 1635F0 80242D90 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void filemenu_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileDescriptor, s32 uls, s32 ult, s32 dsdx, s32 dtdy) { if (ulx <= -2688 || uly <= -2688 || lrx <= 0 || lry <= 0) { return; } if (ulx >= 1280 || uly >= 960 || lrx >= 2688 || lry >= 2688) { return; } gSPScisTextureRectangle(gMainGfxPos++, ulx, uly, lrx, lry, tileDescriptor, uls, ult, dsdx, dtdy); }
### RAW ASSEMBLY INSTRUCTIONS: glabel start_script /* E7D90 802C33E0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* E7D94 802C33E4 AFB10014 */ sw $s1, 0x14($sp) /* E7D98 802C33E8 0080882D */ daddu $s1, $a0, $zero /* E7D9C 802C33EC AFB40020 */ sw $s4, 0x20($sp) /* E7DA0 802C33F0 00A0A02D */ daddu $s4, $a1, $zero /* E7DA4 802C33F4 AFB3001C */ sw $s3, 0x1C($sp) /* E7DA8 802C33F8 00C0982D */ daddu $s3, $a2, $zero /* E7DAC 802C33FC 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) /* E7DB0 802C3400 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) /* E7DB4 802C3404 0000282D */ daddu $a1, $zero, $zero /* E7DB8 802C3408 AFBF0024 */ sw $ra, 0x24($sp) /* E7DBC 802C340C AFB20018 */ sw $s2, 0x18($sp) /* E7DC0 802C3410 AFB00010 */ sw $s0, 0x10($sp) .L802C3414: /* E7DC4 802C3414 8C620000 */ lw $v0, 0x0($v1) /* E7DC8 802C3418 10400006 */ beqz $v0, .L802C3434 /* E7DCC 802C341C 28A20080 */ slti $v0, $a1, 0x80 /* E7DD0 802C3420 24A50001 */ addiu $a1, $a1, 0x1 /* E7DD4 802C3424 28A20080 */ slti $v0, $a1, 0x80 /* E7DD8 802C3428 1440FFFA */ bnez $v0, .L802C3414 /* E7DDC 802C342C 24630004 */ addiu $v1, $v1, 0x4 /* E7DE0 802C3430 28A20080 */ slti $v0, $a1, 0x80 .L802C3434: /* E7DE4 802C3434 14400003 */ bnez $v0, .L802C3444 /* E7DE8 802C3438 24040168 */ addiu $a0, $zero, 0x168 .L802C343C: /* E7DEC 802C343C 080B0D0F */ j .L802C343C /* E7DF0 802C3440 00000000 */ nop .L802C3444: /* E7DF4 802C3444 0C00AB39 */ jal heap_malloc /* E7DF8 802C3448 00A0902D */ daddu $s2, $a1, $zero /* E7DFC 802C344C 00122080 */ sll $a0, $s2, 2 /* E7E00 802C3450 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) /* E7E04 802C3454 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) /* E7E08 802C3458 3C05802E */ lui $a1, %hi(gNumScripts) /* E7E0C 802C345C 24A5A488 */ addiu $a1, $a1, %lo(gNumScripts) /* E7E10 802C3460 00832021 */ addu $a0, $a0, $v1 /* E7E14 802C3464 8CA30000 */ lw $v1, 0x0($a1) /* E7E18 802C3468 0040802D */ daddu $s0, $v0, $zero /* E7E1C 802C346C AC900000 */ sw $s0, 0x0($a0) /* E7E20 802C3470 24630001 */ addiu $v1, $v1, 0x1 /* E7E24 802C3474 16000003 */ bnez $s0, .L802C3484 /* E7E28 802C3478 ACA30000 */ sw $v1, 0x0($a1) .L802C347C: /* E7E2C 802C347C 080B0D1F */ j .L802C347C /* E7E30 802C3480 00000000 */ nop .L802C3484: /* E7E34 802C3484 36620001 */ ori $v0, $s3, 0x1 /* E7E38 802C3488 3C03802E */ lui $v1, %hi(gStaticScriptCounter) /* E7E3C 802C348C 24639CA0 */ addiu $v1, $v1, %lo(gStaticScriptCounter) /* E7E40 802C3490 A2020000 */ sb $v0, 0x0($s0) /* E7E44 802C3494 A2000002 */ sb $zero, 0x2($s0) /* E7E48 802C3498 A2140003 */ sb $s4, 0x3($s0) /* E7E4C 802C349C 8C620000 */ lw $v0, 0x0($v1) /* E7E50 802C34A0 2405000F */ addiu $a1, $zero, 0xF /* E7E54 802C34A4 AE020144 */ sw $v0, 0x144($s0) /* E7E58 802C34A8 24420001 */ addiu $v0, $v0, 0x1 /* E7E5C 802C34AC AC620000 */ sw $v0, 0x0($v1) /* E7E60 802C34B0 2403FFFF */ addiu $v1, $zero, -0x1 /* E7E64 802C34B4 240200EF */ addiu $v0, $zero, 0xEF /* E7E68 802C34B8 A2030006 */ sb $v1, 0x6($s0) /* E7E6C 802C34BC A2030007 */ sb $v1, 0x7($s0) /* E7E70 802C34C0 A2020004 */ sb $v0, 0x4($s0) /* E7E74 802C34C4 3C01802E */ lui $at, %hi(gGlobalTimeSpace) /* E7E78 802C34C8 C4209CA8 */ lwc1 $f0, %lo(gGlobalTimeSpace)($at) /* E7E7C 802C34CC 2602003C */ addiu $v0, $s0, 0x3C /* E7E80 802C34D0 AE110008 */ sw $s1, 0x8($s0) /* E7E84 802C34D4 AE11015C */ sw $s1, 0x15C($s0) /* E7E88 802C34D8 AE110164 */ sw $s1, 0x164($s0) /* E7E8C 802C34DC AE000060 */ sw $zero, 0x60($s0) /* E7E90 802C34E0 AE000064 */ sw $zero, 0x64($s0) /* E7E94 802C34E4 AE000068 */ sw $zero, 0x68($s0) /* E7E98 802C34E8 AE00006C */ sw $zero, 0x6C($s0) /* E7E9C 802C34EC AE030148 */ sw $v1, 0x148($s0) /* E7EA0 802C34F0 AE03014C */ sw $v1, 0x14C($s0) /* E7EA4 802C34F4 AE000160 */ sw $zero, 0x160($s0) /* E7EA8 802C34F8 AE000154 */ sw $zero, 0x154($s0) /* E7EAC 802C34FC AE000158 */ sw $zero, 0x158($s0) /* E7EB0 802C3500 E6000150 */ swc1 $f0, 0x150($s0) .L802C3504: /* E7EB4 802C3504 AC400084 */ sw $zero, 0x84($v0) /* E7EB8 802C3508 24A5FFFF */ addiu $a1, $a1, -0x1 /* E7EBC 802C350C 04A1FFFD */ bgez $a1, .L802C3504 /* E7EC0 802C3510 2442FFFC */ addiu $v0, $v0, -0x4 /* E7EC4 802C3514 24050002 */ addiu $a1, $zero, 0x2 /* E7EC8 802C3518 26020008 */ addiu $v0, $s0, 0x8 .L802C351C: /* E7ECC 802C351C AC4000C4 */ sw $zero, 0xC4($v0) /* E7ED0 802C3520 24A5FFFF */ addiu $a1, $a1, -0x1 /* E7ED4 802C3524 04A1FFFD */ bgez $a1, .L802C351C /* E7ED8 802C3528 2442FFFC */ addiu $v0, $v0, -0x4 /* E7EDC 802C352C 0C0B0C52 */ jal find_script_labels /* E7EE0 802C3530 0200202D */ daddu $a0, $s0, $zero /* E7EE4 802C3534 3C02802E */ lui $v0, %hi(gIsUpdatingScripts) /* E7EE8 802C3538 8C429CA4 */ lw $v0, %lo(gIsUpdatingScripts)($v0) /* E7EEC 802C353C 10400012 */ beqz $v0, .L802C3588 /* E7EF0 802C3540 00000000 */ nop /* E7EF4 802C3544 92020000 */ lbu $v0, 0x0($s0) /* E7EF8 802C3548 30420020 */ andi $v0, $v0, 0x20 /* E7EFC 802C354C 1040000E */ beqz $v0, .L802C3588 /* E7F00 802C3550 00000000 */ nop /* E7F04 802C3554 3C05802E */ lui $a1, %hi(gScriptListCount) /* E7F08 802C3558 24A5AC98 */ addiu $a1, $a1, %lo(gScriptListCount) /* E7F0C 802C355C 8CA20000 */ lw $v0, 0x0($a1) /* E7F10 802C3560 00022080 */ sll $a0, $v0, 2 /* E7F14 802C3564 3C01802E */ lui $at, %hi(gScriptIndexList) /* E7F18 802C3568 00240821 */ addu $at, $at, $a0 /* E7F1C 802C356C AC32A898 */ sw $s2, %lo(gScriptIndexList)($at) /* E7F20 802C3570 8E030144 */ lw $v1, 0x144($s0) /* E7F24 802C3574 24420001 */ addiu $v0, $v0, 0x1 /* E7F28 802C3578 ACA20000 */ sw $v0, 0x0($a1) /* E7F2C 802C357C 3C01802E */ lui $at, %hi(gScriptIdList) /* E7F30 802C3580 00240821 */ addu $at, $at, $a0 /* E7F34 802C3584 AC23AA98 */ sw $v1, %lo(gScriptIdList)($at) .L802C3588: /* E7F38 802C3588 0C0B0CE4 */ jal suspend_frozen_scripts /* E7F3C 802C358C 0200202D */ daddu $a0, $s0, $zero /* E7F40 802C3590 3C03802E */ lui $v1, %hi(gStaticScriptCounter) /* E7F44 802C3594 24639CA0 */ addiu $v1, $v1, %lo(gStaticScriptCounter) /* E7F48 802C3598 8C620000 */ lw $v0, 0x0($v1) /* E7F4C 802C359C 14400004 */ bnez $v0, .L802C35B0 /* E7F50 802C35A0 0200102D */ daddu $v0, $s0, $zero /* E7F54 802C35A4 24020001 */ addiu $v0, $zero, 0x1 /* E7F58 802C35A8 AC620000 */ sw $v0, 0x0($v1) /* E7F5C 802C35AC 0200102D */ daddu $v0, $s0, $zero .L802C35B0: /* E7F60 802C35B0 8FBF0024 */ lw $ra, 0x24($sp) /* E7F64 802C35B4 8FB40020 */ lw $s4, 0x20($sp) /* E7F68 802C35B8 8FB3001C */ lw $s3, 0x1C($sp) /* E7F6C 802C35BC 8FB20018 */ lw $s2, 0x18($sp) /* E7F70 802C35C0 8FB10014 */ lw $s1, 0x14($sp) /* E7F74 802C35C4 8FB00010 */ lw $s0, 0x10($sp) /* E7F78 802C35C8 03E00008 */ jr $ra /* E7F7C 802C35CC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: Evt* start_script(EvtScript* source, s32 priority, s32 flags) { Evt* newScript; s32 curScriptIndex; s32 scriptListCount; s32 i; for (i = 0; i < MAX_SCRIPTS; i++) { if ((*gCurrentScriptListPtr)[i] == NULL) { break; } } ASSERT(i < MAX_SCRIPTS); curScriptIndex = i; (*gCurrentScriptListPtr)[curScriptIndex] = newScript = heap_malloc(sizeof(*newScript)); gNumScripts++; ASSERT(newScript != NULL); newScript->stateFlags = flags | EVT_FLAG_ACTIVE; newScript->currentOpcode = EVT_OP_INTERNAL_FETCH; newScript->priority = priority; newScript->ptrNextLine = (Bytecode*)source; newScript->ptrFirstLine = (Bytecode*)source; newScript->ptrCurrentLine = (Bytecode*)source; newScript->userData = NULL; newScript->blockingParent = NULL; newScript->childScript = NULL; newScript->parentScript = NULL; newScript->id = gStaticScriptCounter++; newScript->owner1.actorID = -1; newScript->owner2.npcID = -1; newScript->loopDepth = -1; newScript->switchDepth = -1; newScript->groupFlags = ~EVT_GROUP_10; newScript->ptrSavedPos = NULL; newScript->frameCounter = 0.0f; newScript->unk_158 = 0; newScript->timeScale = gGlobalTimeSpace; scriptListCount = 0; for (i = 0; i < ARRAY_COUNT(newScript->varTable); i++) { newScript->varTable[i] = 0; } for (i = 0; i < ARRAY_COUNT(newScript->varFlags); i++) { newScript->varFlags[i] = 0; } find_script_labels(newScript); if (gIsUpdatingScripts && (newScript->stateFlags & EVT_FLAG_RUN_IMMEDIATELY)) { scriptListCount = gScriptListCount++; gScriptIndexList[scriptListCount] = curScriptIndex; gScriptIdList[scriptListCount] = newScript->id; } suspend_frozen_scripts(newScript); if (gStaticScriptCounter == 0) { gStaticScriptCounter = 1; } return newScript; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80246B2C /* 16738C 80246B2C 3C058015 */ lui $a1, %hi(gWindowStyles) .L80246B30: /* 167390 80246B30 24A5F150 */ addiu $a1, $a1, %lo(gWindowStyles) glabel func_80246B34 /* 167394 80246B34 3C068025 */ lui $a2, %hi(D_8024BDA8) /* 167398 80246B38 24C6BDA8 */ addiu $a2, $a2, %lo(D_8024BDA8) /* 16739C 80246B3C 24C20070 */ addiu $v0, $a2, 0x70 /* 1673A0 80246B40 ACA600E0 */ sw $a2, 0xE0($a1) /* 1673A4 80246B44 ACA600E4 */ sw $a2, 0xE4($a1) /* 1673A8 80246B48 ACA600E8 */ sw $a2, 0xE8($a1) /* 1673AC 80246B4C ACA600EC */ sw $a2, 0xEC($a1) /* 1673B0 80246B50 ACA200F0 */ sw $v0, 0xF0($a1) /* 1673B4 80246B54 ACA200F4 */ sw $v0, 0xF4($a1) /* 1673B8 80246B58 ACA200F8 */ sw $v0, 0xF8($a1) /* 1673BC 80246B5C ACA200FC */ sw $v0, 0xFC($a1) D_80246B60: /* 1673C0 80246B60 90830003 */ lbu $v1, 0x3($a0) /* 1673C4 80246B64 24020001 */ addiu $v0, $zero, 0x1 /* 1673C8 80246B68 10620011 */ beq $v1, $v0, .L80246BB0 /* 1673CC 80246B6C 28620002 */ slti $v0, $v1, 0x2 /* 1673D0 80246B70 10400005 */ beqz $v0, .L80246B88 glabel func_80246B74 /* 1673D4 80246B74 24020002 */ addiu $v0, $zero, 0x2 /* 1673D8 80246B78 10600009 */ beqz $v1, D_80246BA0 /* 1673DC 80246B7C 24C20038 */ addiu $v0, $a2, 0x38 /* 1673E0 80246B80 08091AF9 */ j .L80246BE4 /* 1673E4 80246B84 00000000 */ nop .L80246B88: /* 1673E8 80246B88 1062000E */ beq $v1, $v0, D_80246BC4 glabel .L80246B8C /* 1673EC 80246B8C 24020003 */ addiu $v0, $zero, 0x3 /* 1673F0 80246B90 10620011 */ beq $v1, $v0, D_80246BD8 /* 1673F4 80246B94 24C20038 */ addiu $v0, $a2, 0x38 /* 1673F8 80246B98 08091AF9 */ j .L80246BE4 /* 1673FC 80246B9C 00000000 */ nop D_80246BA0: /* 167400 80246BA0 ACA200E0 */ sw $v0, 0xE0($a1) .L80246BA4: /* 167404 80246BA4 24C200A8 */ addiu $v0, $a2, 0xA8 jtbl_80246BA8: /* 167408 80246BA8 08091AF9 */ j .L80246BE4 /* 16740C 80246BAC ACA200F0 */ sw $v0, 0xF0($a1) .L80246BB0: /* 167410 80246BB0 24C20038 */ addiu $v0, $a2, 0x38 /* 167414 80246BB4 ACA200E4 */ sw $v0, 0xE4($a1) /* 167418 80246BB8 24C200A8 */ addiu $v0, $a2, 0xA8 /* 16741C 80246BBC 08091AF9 */ j .L80246BE4 /* 167420 80246BC0 ACA200F4 */ sw $v0, 0xF4($a1) D_80246BC4: /* 167424 80246BC4 24C20038 */ addiu $v0, $a2, 0x38 /* 167428 80246BC8 ACA200E8 */ sw $v0, 0xE8($a1) /* 16742C 80246BCC 24C200A8 */ addiu $v0, $a2, 0xA8 D_80246BD0: /* 167430 80246BD0 08091AF9 */ j .L80246BE4 /* 167434 80246BD4 ACA200F8 */ sw $v0, 0xF8($a1) D_80246BD8: /* 167438 80246BD8 ACA200EC */ sw $v0, 0xEC($a1) /* 16743C 80246BDC 24C200A8 */ addiu $v0, $a2, 0xA8 jtbl_80246BE0: /* 167440 80246BE0 ACA200FC */ sw $v0, 0xFC($a1) .L80246BE4: /* 167444 80246BE4 3C028025 */ lui $v0, %hi(D_80249B84) D_80246BE8: /* 167448 80246BE8 8C429B84 */ lw $v0, %lo(D_80249B84)($v0) /* 16744C 80246BEC 80430004 */ lb $v1, 0x4($v0) /* 167450 80246BF0 24020004 */ addiu $v0, $zero, 0x4 D_80246BF4: /* 167454 80246BF4 14620009 */ bne $v1, $v0, .L80246C1C /* 167458 80246BF8 24020001 */ addiu $v0, $zero, 0x1 /* 16745C 80246BFC 3C038025 */ lui $v1, %hi(D_8024C094) /* 167460 80246C00 8C63C094 */ lw $v1, %lo(D_8024C094)($v1) D_80246C04: /* 167464 80246C04 10620015 */ beq $v1, $v0, .L80246C5C /* 167468 80246C08 28620002 */ slti $v0, $v1, 0x2 /* 16746C 80246C0C 50400005 */ beql $v0, $zero, .L80246C24 .L80246C10: /* 167470 80246C10 24020002 */ addiu $v0, $zero, 0x2 /* 167474 80246C14 10600009 */ beqz $v1, .L80246C3C /* 167478 80246C18 00000000 */ nop .L80246C1C: /* 16747C 80246C1C 03E00008 */ jr $ra /* 167480 80246C20 00000000 */ nop .L80246C24: /* 167484 80246C24 10620015 */ beq $v1, $v0, .L80246C7C /* 167488 80246C28 24020003 */ addiu $v0, $zero, 0x3 /* 16748C 80246C2C 1062001B */ beq $v1, $v0, .L80246C9C .L80246C30: /* 167490 80246C30 00000000 */ nop /* 167494 80246C34 03E00008 */ jr $ra /* 167498 80246C38 00000000 */ nop .L80246C3C: /* 16749C 80246C3C 3C038015 */ lui $v1, %hi(gWindowStyles) /* 1674A0 80246C40 2463F150 */ addiu $v1, $v1, %lo(gWindowStyles) /* 1674A4 80246C44 3C028025 */ lui $v0, %hi(hos_03_Quizmo_Worker + 0x10) /* 1674A8 80246C48 2442BDE0 */ addiu $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10) /* 1674AC 80246C4C AC6200E0 */ sw $v0, 0xE0($v1) /* 1674B0 80246C50 24420070 */ addiu $v0, $v0, 0x70 /* 1674B4 80246C54 03E00008 */ jr $ra /* 1674B8 80246C58 AC6200F0 */ sw $v0, 0xF0($v1) glabel .L80246C5C /* 1674BC 80246C5C 3C038015 */ lui $v1, %hi(gWindowStyles) D_80246C60: /* 1674C0 80246C60 2463F150 */ addiu $v1, $v1, %lo(gWindowStyles) /* 1674C4 80246C64 3C028025 */ lui $v0, %hi(hos_03_Quizmo_Worker + 0x10) /* 1674C8 80246C68 2442BDE0 */ addiu $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10) /* 1674CC 80246C6C AC6200E4 */ sw $v0, 0xE4($v1) /* 1674D0 80246C70 24420070 */ addiu $v0, $v0, 0x70 .L80246C74: /* 1674D4 80246C74 03E00008 */ jr $ra /* 1674D8 80246C78 AC6200F4 */ sw $v0, 0xF4($v1) .L80246C7C: /* 1674DC 80246C7C 3C038015 */ lui $v1, %hi(gWindowStyles) /* 1674E0 80246C80 2463F150 */ addiu $v1, $v1, %lo(gWindowStyles) /* 1674E4 80246C84 3C028025 */ lui $v0, %hi(hos_03_Quizmo_Worker + 0x10) /* 1674E8 80246C88 2442BDE0 */ addiu $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10) D_80246C8C: /* 1674EC 80246C8C AC6200E8 */ sw $v0, 0xE8($v1) .L80246C90: /* 1674F0 80246C90 24420070 */ addiu $v0, $v0, 0x70 D_80246C94: /* 1674F4 80246C94 03E00008 */ jr $ra /* 1674F8 80246C98 AC6200F8 */ sw $v0, 0xF8($v1) .L80246C9C: /* 1674FC 80246C9C 3C038015 */ lui $v1, %hi(gWindowStyles) /* 167500 80246CA0 2463F150 */ addiu $v1, $v1, %lo(gWindowStyles) /* 167504 80246CA4 3C028025 */ lui $v0, %hi(hos_03_Quizmo_Worker + 0x10) D_80246CA8: /* 167508 80246CA8 2442BDE0 */ addiu $v0, $v0, %lo(hos_03_Quizmo_Worker + 0x10) /* 16750C 80246CAC AC6200EC */ sw $v0, 0xEC($v1) D_80246CB0: /* 167510 80246CB0 24420070 */ addiu $v0, $v0, 0x70 .L80246CB4: /* 167514 80246CB4 03E00008 */ jr $ra jtbl_80246CB8: /* 167518 80246CB8 AC6200FC */ sw $v0, 0xFC($v1) ### DECOMPILED C INSTRUCTIONS: void filemenu_main_update(MenuPanel* menu) { gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[15]; gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[15]; gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[15]; gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[15]; gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[17]; gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[17]; gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[17]; gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[17]; switch (menu->selected) { case 0: gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[18]; break; case 1: gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[18]; break; case 2: gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[18]; break; case 3: gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[18]; break; } if (filemenu_menus[0]->page == PAGE_4) { switch (filemenu_loadedFileIdx) { case 0: gWindowStyles[WINDOW_ID_FILEMENU_FILE0_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE0_TITLE].customStyle = &filemenu_windowStyles[18]; return; case 1: gWindowStyles[WINDOW_ID_FILEMENU_FILE1_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE1_TITLE].customStyle = &filemenu_windowStyles[18]; return; case 2: gWindowStyles[WINDOW_ID_FILEMENU_FILE2_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE2_TITLE].customStyle = &filemenu_windowStyles[18]; return; case 3: gWindowStyles[WINDOW_ID_FILEMENU_FILE3_INFO].customStyle = &filemenu_windowStyles[16]; gWindowStyles[WINDOW_ID_FILEMENU_FILE3_TITLE].customStyle = &filemenu_windowStyles[18]; return; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel damage_indicator_update /* 34F704 E003C244 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 34F708 E003C248 AFBF0010 */ sw $ra, 0x10($sp) /* 34F70C E003C24C F7B40018 */ sdc1 $f20, 0x18($sp) /* 34F710 E003C250 8C85000C */ lw $a1, 0xC($a0) /* 34F714 E003C254 8CA30030 */ lw $v1, 0x30($a1) /* 34F718 E003C258 28620064 */ slti $v0, $v1, 0x64 /* 34F71C E003C25C 10400002 */ beqz $v0, .LE003C268 /* 34F720 E003C260 2462FFFF */ addiu $v0, $v1, -0x1 /* 34F724 E003C264 ACA20030 */ sw $v0, 0x30($a1) .LE003C268: /* 34F728 E003C268 8CA60034 */ lw $a2, 0x34($a1) /* 34F72C E003C26C 8CA30030 */ lw $v1, 0x30($a1) /* 34F730 E003C270 24C80001 */ addiu $t0, $a2, 0x1 /* 34F734 E003C274 04610005 */ bgez $v1, .LE003C28C /* 34F738 E003C278 ACA80034 */ sw $t0, 0x34($a1) /* 34F73C E003C27C 0C080128 */ jal shim_remove_effect /* 34F740 E003C280 00000000 */ nop /* 34F744 E003C284 0800F119 */ j .LE003C464 /* 34F748 E003C288 00000000 */ nop .LE003C28C: /* 34F74C E003C28C 8C820008 */ lw $v0, 0x8($a0) /* 34F750 E003C290 24070001 */ addiu $a3, $zero, 0x1 /* 34F754 E003C294 00E2102A */ slt $v0, $a3, $v0 /* 34F758 E003C298 10400072 */ beqz $v0, .LE003C464 /* 34F75C E003C29C 24A50040 */ addiu $a1, $a1, 0x40 /* 34F760 E003C2A0 286C0006 */ slti $t4, $v1, 0x6 /* 34F764 E003C2A4 286B0005 */ slti $t3, $v1, 0x5 /* 34F768 E003C2A8 28CA0009 */ slti $t2, $a2, 0x9 /* 34F76C E003C2AC 3C02E004 */ lui $v0, %hi(D_E003CD1C) /* 34F770 E003C2B0 2442CD1C */ addiu $v0, $v0, %lo(D_E003CD1C) /* 34F774 E003C2B4 00061880 */ sll $v1, $a2, 2 /* 34F778 E003C2B8 00624821 */ addu $t1, $v1, $v0 /* 34F77C E003C2BC 29080029 */ slti $t0, $t0, 0x29 /* 34F780 E003C2C0 3C02E004 */ lui $v0, %hi(D_E003CCD0) /* 34F784 E003C2C4 2442CCD0 */ addiu $v0, $v0, %lo(D_E003CCD0) /* 34F788 E003C2C8 00C21821 */ addu $v1, $a2, $v0 /* 34F78C E003C2CC 24A50038 */ addiu $a1, $a1, 0x38 /* 34F790 E003C2D0 3C013FE8 */ lui $at, (0x3FE80000 >> 16) /* 34F794 E003C2D4 44818800 */ mtc1 $at, $f17 /* 34F798 E003C2D8 44808000 */ mtc1 $zero, $f16 /* 34F79C E003C2DC 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34F7A0 E003C2E0 D432CD40 */ ldc1 $f18, -0x32C0($at) /* 34F7A4 E003C2E4 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34F7A8 E003C2E8 D42ECD48 */ ldc1 $f14, -0x32B8($at) .LE003C2EC: /* 34F7AC E003C2EC 15800013 */ bnez $t4, .LE003C33C /* 34F7B0 E003C2F0 00000000 */ nop /* 34F7B4 E003C2F4 C4A4FFE4 */ lwc1 $f4, -0x1C($a1) /* 34F7B8 E003C2F8 46002121 */ cvt.d.s $f4, $f4 /* 34F7BC E003C2FC 46302102 */ mul.d $f4, $f4, $f16 /* 34F7C0 E003C300 00000000 */ nop /* 34F7C4 E003C304 C4A2FFE8 */ lwc1 $f2, -0x18($a1) /* 34F7C8 E003C308 460010A1 */ cvt.d.s $f2, $f2 /* 34F7CC E003C30C 46301082 */ mul.d $f2, $f2, $f16 /* 34F7D0 E003C310 00000000 */ nop /* 34F7D4 E003C314 C4A0FFEC */ lwc1 $f0, -0x14($a1) /* 34F7D8 E003C318 46000021 */ cvt.d.s $f0, $f0 /* 34F7DC E003C31C 46300002 */ mul.d $f0, $f0, $f16 /* 34F7E0 E003C320 00000000 */ nop /* 34F7E4 E003C324 46202120 */ cvt.s.d $f4, $f4 /* 34F7E8 E003C328 462010A0 */ cvt.s.d $f2, $f2 /* 34F7EC E003C32C 46200020 */ cvt.s.d $f0, $f0 /* 34F7F0 E003C330 E4A4FFE4 */ swc1 $f4, -0x1C($a1) /* 34F7F4 E003C334 E4A2FFE8 */ swc1 $f2, -0x18($a1) /* 34F7F8 E003C338 E4A0FFEC */ swc1 $f0, -0x14($a1) .LE003C33C: /* 34F7FC E003C33C 11600019 */ beqz $t3, .LE003C3A4 /* 34F800 E003C340 00000000 */ nop /* 34F804 E003C344 C4A6FFF4 */ lwc1 $f6, -0xC($a1) /* 34F808 E003C348 468031A1 */ cvt.d.w $f6, $f6 /* 34F80C E003C34C 46323182 */ mul.d $f6, $f6, $f18 /* 34F810 E003C350 00000000 */ nop /* 34F814 E003C354 C4A4FFE4 */ lwc1 $f4, -0x1C($a1) /* 34F818 E003C358 46002121 */ cvt.d.s $f4, $f4 /* 34F81C E003C35C 462E2102 */ mul.d $f4, $f4, $f14 /* 34F820 E003C360 00000000 */ nop /* 34F824 E003C364 C4A2FFE8 */ lwc1 $f2, -0x18($a1) /* 34F828 E003C368 460010A1 */ cvt.d.s $f2, $f2 /* 34F82C E003C36C 462E1082 */ mul.d $f2, $f2, $f14 /* 34F830 E003C370 00000000 */ nop /* 34F834 E003C374 C4A0FFEC */ lwc1 $f0, -0x14($a1) /* 34F838 E003C378 46000021 */ cvt.d.s $f0, $f0 /* 34F83C E003C37C 462E0002 */ mul.d $f0, $f0, $f14 /* 34F840 E003C380 00000000 */ nop /* 34F844 E003C384 4620350D */ trunc.w.d $f20, $f6 /* 34F848 E003C388 E4B4FFF4 */ swc1 $f20, -0xC($a1) /* 34F84C E003C38C 46202120 */ cvt.s.d $f4, $f4 /* 34F850 E003C390 462010A0 */ cvt.s.d $f2, $f2 /* 34F854 E003C394 46200020 */ cvt.s.d $f0, $f0 /* 34F858 E003C398 E4A4FFE4 */ swc1 $f4, -0x1C($a1) /* 34F85C E003C39C E4A2FFE8 */ swc1 $f2, -0x18($a1) /* 34F860 E003C3A0 E4A0FFEC */ swc1 $f0, -0x14($a1) .LE003C3A4: /* 34F864 E003C3A4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 34F868 E003C3A8 44816000 */ mtc1 $at, $f12 /* 34F86C E003C3AC 11400002 */ beqz $t2, .LE003C3B8 /* 34F870 E003C3B0 00000000 */ nop /* 34F874 E003C3B4 C52C0000 */ lwc1 $f12, 0x0($t1) .LE003C3B8: /* 34F878 E003C3B8 C4AAFFCC */ lwc1 $f10, -0x34($a1) /* 34F87C E003C3BC 460C5282 */ mul.s $f10, $f10, $f12 /* 34F880 E003C3C0 00000000 */ nop /* 34F884 E003C3C4 C4A8FFD0 */ lwc1 $f8, -0x30($a1) /* 34F888 E003C3C8 460C4202 */ mul.s $f8, $f8, $f12 /* 34F88C E003C3CC 00000000 */ nop /* 34F890 E003C3D0 C4A6FFCC */ lwc1 $f6, -0x34($a1) /* 34F894 E003C3D4 C4A0FFE4 */ lwc1 $f0, -0x1C($a1) /* 34F898 E003C3D8 C4A4FFD0 */ lwc1 $f4, -0x30($a1) /* 34F89C E003C3DC 46003180 */ add.s $f6, $f6, $f0 /* 34F8A0 E003C3E0 C4A0FFE8 */ lwc1 $f0, -0x18($a1) /* 34F8A4 E003C3E4 C4A2FFD4 */ lwc1 $f2, -0x2C($a1) /* 34F8A8 E003C3E8 46002100 */ add.s $f4, $f4, $f0 /* 34F8AC E003C3EC C4A0FFEC */ lwc1 $f0, -0x14($a1) /* 34F8B0 E003C3F0 46001080 */ add.s $f2, $f2, $f0 /* 34F8B4 E003C3F4 C4A0FFD4 */ lwc1 $f0, -0x2C($a1) /* 34F8B8 E003C3F8 E4A6FFCC */ swc1 $f6, -0x34($a1) /* 34F8BC E003C3FC 460C0002 */ mul.s $f0, $f0, $f12 /* 34F8C0 E003C400 00000000 */ nop /* 34F8C4 E003C404 E4A4FFD0 */ swc1 $f4, -0x30($a1) /* 34F8C8 E003C408 E4A2FFD4 */ swc1 $f2, -0x2C($a1) /* 34F8CC E003C40C E4AAFFD8 */ swc1 $f10, -0x28($a1) /* 34F8D0 E003C410 E4A8FFDC */ swc1 $f8, -0x24($a1) /* 34F8D4 E003C414 1100000D */ beqz $t0, .LE003C44C /* 34F8D8 E003C418 E4A0FFE0 */ swc1 $f0, -0x20($a1) /* 34F8DC E003C41C 90620000 */ lbu $v0, 0x0($v1) /* 34F8E0 E003C420 3C01E004 */ lui $at, (0xE0040000 >> 16) /* 34F8E4 E003C424 D422CD50 */ ldc1 $f2, -0x32B0($at) /* 34F8E8 E003C428 44820000 */ mtc1 $v0, $f0 /* 34F8EC E003C42C 00000000 */ nop /* 34F8F0 E003C430 46800020 */ cvt.s.w $f0, $f0 /* 34F8F4 E003C434 46000021 */ cvt.d.s $f0, $f0 /* 34F8F8 E003C438 46220002 */ mul.d $f0, $f0, $f2 /* 34F8FC E003C43C 00000000 */ nop /* 34F900 E003C440 46200020 */ cvt.s.d $f0, $f0 /* 34F904 E003C444 0800F114 */ j .LE003C450 /* 34F908 E003C448 E4A00000 */ swc1 $f0, 0x0($a1) .LE003C44C: /* 34F90C E003C44C ACA00000 */ sw $zero, 0x0($a1) .LE003C450: /* 34F910 E003C450 24E70001 */ addiu $a3, $a3, 0x1 /* 34F914 E003C454 8C820008 */ lw $v0, 0x8($a0) /* 34F918 E003C458 00E2102A */ slt $v0, $a3, $v0 /* 34F91C E003C45C 1440FFA3 */ bnez $v0, .LE003C2EC /* 34F920 E003C460 24A50040 */ addiu $a1, $a1, 0x40 .LE003C464: /* 34F924 E003C464 8FBF0010 */ lw $ra, 0x10($sp) /* 34F928 E003C468 D7B40018 */ ldc1 $f20, 0x18($sp) /* 34F92C E003C46C 03E00008 */ jr $ra /* 34F930 E003C470 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void damage_indicator_update(EffectInstance* effect) { DamageIndicatorFXData* part = effect->data.damageIndicator; s32 temp_a2; s32 temp_t0; s32 timeLeft; f32 phi_f12; s32 i; if (part->timeLeft < 100) { part->timeLeft--; } temp_a2 = part->lifetime++; temp_t0 = part->lifetime; timeLeft = part->timeLeft; if (timeLeft < 0) { shim_remove_effect(effect); return; } part++; for (i = 1; i < effect->numParts; i++, part++) { f32 x, y, z; if (timeLeft > 5) { part->relPos.x = part->relPos.x * 0.75; part->relPos.y = part->relPos.y * 0.75; part->relPos.z = part->relPos.z * 0.75; } if (timeLeft < 5) { part->alpha = part->alpha * 0.6; part->relPos.x = part->relPos.x * 0.7; part->relPos.y = part->relPos.y * 0.7; part->relPos.z = part->relPos.z * 0.7; } phi_f12 = 1.0f; if (temp_a2 < 9) { phi_f12 = D_E003CD1C[temp_a2]; } part->curPos.x = part->basePos.x * phi_f12; part->curPos.y = part->basePos.y * phi_f12; part->curPos.z = part->basePos.z * phi_f12; part->basePos.x += part->relPos.x; part->basePos.y += part->relPos.y; part->basePos.z += part->relPos.z; if (temp_t0 <= 40) { part->scale = (f32)D_E003CCD0[temp_a2] * 0.01; } else { part->scale = 0.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel npc_raycast_up_corners /* 766D8 800DD228 27BDFF88 */ addiu $sp, $sp, -0x78 /* 766DC 800DD22C F7B40050 */ sdc1 $f20, 0x50($sp) /* 766E0 800DD230 C7B4008C */ lwc1 $f20, 0x8C($sp) /* 766E4 800DD234 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 766E8 800DD238 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 766EC 800DD23C 44810000 */ mtc1 $at, $f0 /* 766F0 800DD240 AFB60040 */ sw $s6, 0x40($sp) /* 766F4 800DD244 8FB60088 */ lw $s6, 0x88($sp) /* 766F8 800DD248 F7B60058 */ sdc1 $f22, 0x58($sp) /* 766FC 800DD24C C7B60090 */ lwc1 $f22, 0x90($sp) /* 76700 800DD250 AFB5003C */ sw $s5, 0x3C($sp) /* 76704 800DD254 0080A82D */ daddu $s5, $a0, $zero /* 76708 800DD258 AFB70044 */ sw $s7, 0x44($sp) /* 7670C 800DD25C 00A0B82D */ daddu $s7, $a1, $zero /* 76710 800DD260 AFBE0048 */ sw $fp, 0x48($sp) /* 76714 800DD264 4600A502 */ mul.s $f20, $f20, $f0 /* 76718 800DD268 00000000 */ nop /* 7671C 800DD26C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 76720 800DD270 44810000 */ mtc1 $at, $f0 /* 76724 800DD274 00C0F02D */ daddu $fp, $a2, $zero /* 76728 800DD278 AFBF004C */ sw $ra, 0x4C($sp) /* 7672C 800DD27C AFB40038 */ sw $s4, 0x38($sp) /* 76730 800DD280 AFB30034 */ sw $s3, 0x34($sp) /* 76734 800DD284 AFB20030 */ sw $s2, 0x30($sp) /* 76738 800DD288 AFB1002C */ sw $s1, 0x2C($sp) /* 7673C 800DD28C AFB00028 */ sw $s0, 0x28($sp) /* 76740 800DD290 F7BC0070 */ sdc1 $f28, 0x70($sp) /* 76744 800DD294 F7BA0068 */ sdc1 $f26, 0x68($sp) /* 76748 800DD298 F7B80060 */ sdc1 $f24, 0x60($sp) /* 7674C 800DD29C AFA70084 */ sw $a3, 0x84($sp) /* 76750 800DD2A0 4600A503 */ div.s $f20, $f20, $f0 /* 76754 800DD2A4 0C00A85B */ jal sin_rad /* 76758 800DD2A8 4600A306 */ mov.s $f12, $f20 /* 7675C 800DD2AC 4600B702 */ mul.s $f28, $f22, $f0 /* 76760 800DD2B0 00000000 */ nop /* 76764 800DD2B4 2414FFFF */ addiu $s4, $zero, -0x1 /* 76768 800DD2B8 4600A306 */ mov.s $f12, $f20 /* 7676C 800DD2BC 0C00A874 */ jal cos_rad /* 76770 800DD2C0 4600B587 */ neg.s $f22, $f22 /* 76774 800DD2C4 02A0202D */ daddu $a0, $s5, $zero /* 76778 800DD2C8 27B30018 */ addiu $s3, $sp, 0x18 /* 7677C 800DD2CC 0260282D */ daddu $a1, $s3, $zero /* 76780 800DD2D0 27B2001C */ addiu $s2, $sp, 0x1C /* 76784 800DD2D4 0240302D */ daddu $a2, $s2, $zero /* 76788 800DD2D8 27B10020 */ addiu $s1, $sp, 0x20 /* 7678C 800DD2DC 0220382D */ daddu $a3, $s1, $zero /* 76790 800DD2E0 4600B682 */ mul.s $f26, $f22, $f0 /* 76794 800DD2E4 00000000 */ nop /* 76798 800DD2E8 C6F60000 */ lwc1 $f22, 0x0($s7) /* 7679C 800DD2EC C7D80000 */ lwc1 $f24, 0x0($fp) /* 767A0 800DD2F0 8FA30084 */ lw $v1, 0x84($sp) /* 767A4 800DD2F4 C6C00000 */ lwc1 $f0, 0x0($s6) /* 767A8 800DD2F8 C4740000 */ lwc1 $f20, 0x0($v1) /* 767AC 800DD2FC 461CB080 */ add.s $f2, $f22, $f28 /* 767B0 800DD300 27B00024 */ addiu $s0, $sp, 0x24 /* 767B4 800DD304 E7A00024 */ swc1 $f0, 0x24($sp) /* 767B8 800DD308 461AA000 */ add.s $f0, $f20, $f26 /* 767BC 800DD30C E7B8001C */ swc1 $f24, 0x1C($sp) /* 767C0 800DD310 E7A20018 */ swc1 $f2, 0x18($sp) /* 767C4 800DD314 E7A00020 */ swc1 $f0, 0x20($sp) /* 767C8 800DD318 0C037413 */ jal npc_raycast_up_corner /* 767CC 800DD31C AFB00010 */ sw $s0, 0x10($sp) /* 767D0 800DD320 04410025 */ bgez $v0, .L800DD3B8 /* 767D4 800DD324 02A0202D */ daddu $a0, $s5, $zero /* 767D8 800DD328 0260282D */ daddu $a1, $s3, $zero /* 767DC 800DD32C 461CB081 */ sub.s $f2, $f22, $f28 /* 767E0 800DD330 0240302D */ daddu $a2, $s2, $zero /* 767E4 800DD334 0220382D */ daddu $a3, $s1, $zero /* 767E8 800DD338 461AA001 */ sub.s $f0, $f20, $f26 /* 767EC 800DD33C E7B8001C */ swc1 $f24, 0x1C($sp) /* 767F0 800DD340 E7A20018 */ swc1 $f2, 0x18($sp) /* 767F4 800DD344 E7A00020 */ swc1 $f0, 0x20($sp) /* 767F8 800DD348 0C037413 */ jal npc_raycast_up_corner /* 767FC 800DD34C AFB00010 */ sw $s0, 0x10($sp) /* 76800 800DD350 04410019 */ bgez $v0, .L800DD3B8 /* 76804 800DD354 02A0202D */ daddu $a0, $s5, $zero /* 76808 800DD358 0260282D */ daddu $a1, $s3, $zero /* 7680C 800DD35C 461AB080 */ add.s $f2, $f22, $f26 /* 76810 800DD360 0240302D */ daddu $a2, $s2, $zero /* 76814 800DD364 0220382D */ daddu $a3, $s1, $zero /* 76818 800DD368 461CA000 */ add.s $f0, $f20, $f28 /* 7681C 800DD36C E7B8001C */ swc1 $f24, 0x1C($sp) /* 76820 800DD370 E7A20018 */ swc1 $f2, 0x18($sp) /* 76824 800DD374 E7A00020 */ swc1 $f0, 0x20($sp) /* 76828 800DD378 0C037413 */ jal npc_raycast_up_corner /* 7682C 800DD37C AFB00010 */ sw $s0, 0x10($sp) /* 76830 800DD380 0441000D */ bgez $v0, .L800DD3B8 /* 76834 800DD384 02A0202D */ daddu $a0, $s5, $zero /* 76838 800DD388 0260282D */ daddu $a1, $s3, $zero /* 7683C 800DD38C 461AB081 */ sub.s $f2, $f22, $f26 /* 76840 800DD390 0240302D */ daddu $a2, $s2, $zero /* 76844 800DD394 0220382D */ daddu $a3, $s1, $zero /* 76848 800DD398 461CA001 */ sub.s $f0, $f20, $f28 /* 7684C 800DD39C E7B8001C */ swc1 $f24, 0x1C($sp) /* 76850 800DD3A0 E7A20018 */ swc1 $f2, 0x18($sp) /* 76854 800DD3A4 E7A00020 */ swc1 $f0, 0x20($sp) /* 76858 800DD3A8 0C037413 */ jal npc_raycast_up_corner /* 7685C 800DD3AC AFB00010 */ sw $s0, 0x10($sp) /* 76860 800DD3B0 0440000B */ bltz $v0, .L800DD3E0 /* 76864 800DD3B4 00000000 */ nop .L800DD3B8: /* 76868 800DD3B8 C7A00018 */ lwc1 $f0, 0x18($sp) /* 7686C 800DD3BC E6E00000 */ swc1 $f0, 0x0($s7) /* 76870 800DD3C0 C7A0001C */ lwc1 $f0, 0x1C($sp) /* 76874 800DD3C4 E7C00000 */ swc1 $f0, 0x0($fp) /* 76878 800DD3C8 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7687C 800DD3CC 8FA30084 */ lw $v1, 0x84($sp) /* 76880 800DD3D0 E4600000 */ swc1 $f0, 0x0($v1) /* 76884 800DD3D4 C7A00024 */ lwc1 $f0, 0x24($sp) /* 76888 800DD3D8 0040A02D */ daddu $s4, $v0, $zero /* 7688C 800DD3DC E6C00000 */ swc1 $f0, 0x0($s6) .L800DD3E0: /* 76890 800DD3E0 06810009 */ bgez $s4, .L800DD408 /* 76894 800DD3E4 0280102D */ daddu $v0, $s4, $zero /* 76898 800DD3E8 C7A00018 */ lwc1 $f0, 0x18($sp) /* 7689C 800DD3EC E6E00000 */ swc1 $f0, 0x0($s7) /* 768A0 800DD3F0 C7A0001C */ lwc1 $f0, 0x1C($sp) /* 768A4 800DD3F4 E7C00000 */ swc1 $f0, 0x0($fp) /* 768A8 800DD3F8 C7A00020 */ lwc1 $f0, 0x20($sp) /* 768AC 800DD3FC 8FA30084 */ lw $v1, 0x84($sp) /* 768B0 800DD400 E4600000 */ swc1 $f0, 0x0($v1) /* 768B4 800DD404 AEC00000 */ sw $zero, 0x0($s6) .L800DD408: /* 768B8 800DD408 8FBF004C */ lw $ra, 0x4C($sp) /* 768BC 800DD40C 8FBE0048 */ lw $fp, 0x48($sp) /* 768C0 800DD410 8FB70044 */ lw $s7, 0x44($sp) /* 768C4 800DD414 8FB60040 */ lw $s6, 0x40($sp) /* 768C8 800DD418 8FB5003C */ lw $s5, 0x3C($sp) /* 768CC 800DD41C 8FB40038 */ lw $s4, 0x38($sp) /* 768D0 800DD420 8FB30034 */ lw $s3, 0x34($sp) /* 768D4 800DD424 8FB20030 */ lw $s2, 0x30($sp) /* 768D8 800DD428 8FB1002C */ lw $s1, 0x2C($sp) /* 768DC 800DD42C 8FB00028 */ lw $s0, 0x28($sp) /* 768E0 800DD430 D7BC0070 */ ldc1 $f28, 0x70($sp) /* 768E4 800DD434 D7BA0068 */ ldc1 $f26, 0x68($sp) /* 768E8 800DD438 D7B80060 */ ldc1 $f24, 0x60($sp) /* 768EC 800DD43C D7B60058 */ ldc1 $f22, 0x58($sp) /* 768F0 800DD440 D7B40050 */ ldc1 $f20, 0x50($sp) /* 768F4 800DD444 03E00008 */ jr $ra /* 768F8 800DD448 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: s32 npc_raycast_up_corners(s32 ignoreFlags, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw, f32 radius) { f32 startX; f32 startY; f32 startZ; f32 depth; f32 theta; f32 deltaZ; f32 deltaX; f32 x,y,z; s32 ret; s32 hitID; f32 temp; theta = DEG_TO_RAD(yaw); deltaX = radius * sin_rad(theta); temp = -radius; // needed to match deltaZ = temp * cos_rad(theta); x = *posX; y = *posY; z = *posZ; depth = *hitDepth; startX = x + deltaX; startY = y; startZ = z + deltaZ; ret = -1; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); if (hitID < 0) { startX = x - deltaX; startY = y; startZ = z - deltaZ; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); } if (hitID < 0) { startX = x + deltaZ; startY = y; startZ = z + deltaX; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); } if (hitID < 0) { startX = x - deltaZ; startY = y; startZ = z - deltaX; hitID = npc_raycast_up_corner(ignoreFlags, &startX, &startY, &startZ, &depth); } if (hitID >= 0) { *posX = startX; *posY = startY; *posZ = startZ; *hitDepth = depth; ret = hitID; } if (ret < 0) { *posX = startX; *posY = startY; *posZ = startZ; *hitDepth = 0; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel floating_rock_appendGfx /* 395E9C E00982EC 27BDFF80 */ addiu $sp, $sp, -0x80 /* 395EA0 E00982F0 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 395EA4 E00982F4 AFB50074 */ sw $s5, 0x74($sp) /* 395EA8 E00982F8 3C15800A */ lui $s5, %hi(gMainGfxPos) /* 395EAC E00982FC 26B5A66C */ addiu $s5, $s5, %lo(gMainGfxPos) /* 395EB0 E0098300 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 395EB4 E0098304 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 395EB8 E0098308 AFBF0078 */ sw $ra, 0x78($sp) /* 395EBC E009830C AFB40070 */ sw $s4, 0x70($sp) /* 395EC0 E0098310 AFB3006C */ sw $s3, 0x6C($sp) /* 395EC4 E0098314 AFB20068 */ sw $s2, 0x68($sp) /* 395EC8 E0098318 AFB10064 */ sw $s1, 0x64($sp) /* 395ECC E009831C AFB00060 */ sw $s0, 0x60($sp) /* 395ED0 E0098320 8EA80000 */ lw $t0, 0x0($s5) /* 395ED4 E0098324 8C94000C */ lw $s4, 0xC($a0) /* 395ED8 E0098328 0100182D */ daddu $v1, $t0, $zero /* 395EDC E009832C 8E930044 */ lw $s3, 0x44($s4) /* 395EE0 E0098330 25080008 */ addiu $t0, $t0, 0x8 /* 395EE4 E0098334 AC620000 */ sw $v0, 0x0($v1) /* 395EE8 E0098338 AC600004 */ sw $zero, 0x4($v1) /* 395EEC E009833C AD050000 */ sw $a1, 0x0($t0) /* 395EF0 E0098340 8C820010 */ lw $v0, 0x10($a0) /* 395EF4 E0098344 8C42001C */ lw $v0, 0x1C($v0) /* 395EF8 E0098348 3C038000 */ lui $v1, (0x80000000 >> 16) /* 395EFC E009834C 00431021 */ addu $v0, $v0, $v1 /* 395F00 E0098350 AD020004 */ sw $v0, 0x4($t0) /* 395F04 E0098354 C680003C */ lwc1 $f0, 0x3C($s4) /* 395F08 E0098358 E7A00010 */ swc1 $f0, 0x10($sp) /* 395F0C E009835C C6800004 */ lwc1 $f0, 0x4($s4) /* 395F10 E0098360 3C120001 */ lui $s2, (0x11630 >> 16) /* 395F14 E0098364 E7A00014 */ swc1 $f0, 0x14($sp) /* 395F18 E0098368 C6800008 */ lwc1 $f0, 0x8($s4) /* 395F1C E009836C 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 395F20 E0098370 E7A00018 */ swc1 $f0, 0x18($sp) /* 395F24 E0098374 C680000C */ lwc1 $f0, 0xC($s4) /* 395F28 E0098378 27A40020 */ addiu $a0, $sp, 0x20 /* 395F2C E009837C AEA80000 */ sw $t0, 0x0($s5) /* 395F30 E0098380 E7A0001C */ swc1 $f0, 0x1C($sp) /* 395F34 E0098384 8E850024 */ lw $a1, 0x24($s4) /* 395F38 E0098388 8E86002C */ lw $a2, 0x2C($s4) /* 395F3C E009838C 8E870028 */ lw $a3, 0x28($s4) /* 395F40 E0098390 25080008 */ addiu $t0, $t0, 0x8 /* 395F44 E0098394 0C080180 */ jal shim_guPositionF /* 395F48 E0098398 AEA80000 */ sw $t0, 0x0($s5) /* 395F4C E009839C 27A40020 */ addiu $a0, $sp, 0x20 /* 395F50 E00983A0 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 395F54 E00983A4 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 395F58 E00983A8 3C11800A */ lui $s1, %hi(gDisplayContext) /* 395F5C E00983AC 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 395F60 E00983B0 96050000 */ lhu $a1, 0x0($s0) /* 395F64 E00983B4 8E220000 */ lw $v0, 0x0($s1) /* 395F68 E00983B8 00052980 */ sll $a1, $a1, 6 /* 395F6C E00983BC 00B22821 */ addu $a1, $a1, $s2 /* 395F70 E00983C0 0C080118 */ jal shim_guMtxF2L /* 395F74 E00983C4 00452821 */ addu $a1, $v0, $a1 /* 395F78 E00983C8 3C05D7D7 */ lui $a1, (0xD7D76E00 >> 16) /* 395F7C E00983CC 8EA60000 */ lw $a2, 0x0($s5) /* 395F80 E00983D0 34A56E00 */ ori $a1, $a1, (0xD7D76E00 & 0xFFFF) /* 395F84 E00983D4 00C0202D */ daddu $a0, $a2, $zero /* 395F88 E00983D8 24C60008 */ addiu $a2, $a2, 0x8 /* 395F8C E00983DC AEA60000 */ sw $a2, 0x0($s5) /* 395F90 E00983E0 96020000 */ lhu $v0, 0x0($s0) /* 395F94 E00983E4 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 395F98 E00983E8 AC830000 */ sw $v1, 0x0($a0) /* 395F9C E00983EC 24430001 */ addiu $v1, $v0, 0x1 /* 395FA0 E00983F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 395FA4 E00983F4 00021180 */ sll $v0, $v0, 6 /* 395FA8 E00983F8 A6030000 */ sh $v1, 0x0($s0) /* 395FAC E00983FC 8E230000 */ lw $v1, 0x0($s1) /* 395FB0 E0098400 00521021 */ addu $v0, $v0, $s2 /* 395FB4 E0098404 00621821 */ addu $v1, $v1, $v0 /* 395FB8 E0098408 24C20008 */ addiu $v0, $a2, 0x8 /* 395FBC E009840C AC830004 */ sw $v1, 0x4($a0) /* 395FC0 E0098410 AEA20000 */ sw $v0, 0x0($s5) /* 395FC4 E0098414 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 395FC8 E0098418 ACC20000 */ sw $v0, 0x0($a2) /* 395FCC E009841C 326200FF */ andi $v0, $s3, 0xFF /* 395FD0 E0098420 00451025 */ or $v0, $v0, $a1 /* 395FD4 E0098424 ACC20004 */ sw $v0, 0x4($a2) /* 395FD8 E0098428 240200FF */ addiu $v0, $zero, 0xFF /* 395FDC E009842C 12620005 */ beq $s3, $v0, .LE0098444 /* 395FE0 E0098430 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 395FE4 E0098434 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 395FE8 E0098438 3C030050 */ lui $v1, (0x5049D8 >> 16) /* 395FEC E009843C 08026114 */ j .LE0098450 /* 395FF0 E0098440 346349D8 */ ori $v1, $v1, (0x5049D8 & 0xFFFF) .LE0098444: /* 395FF4 E0098444 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 395FF8 E0098448 3C030055 */ lui $v1, (0x552078 >> 16) /* 395FFC E009844C 34632078 */ ori $v1, $v1, (0x552078 & 0xFFFF) .LE0098450: /* 396000 E0098450 24C20010 */ addiu $v0, $a2, 0x10 /* 396004 E0098454 AEA20000 */ sw $v0, 0x0($s5) /* 396008 E0098458 ACC40008 */ sw $a0, 0x8($a2) /* 39600C E009845C ACC3000C */ sw $v1, 0xC($a2) /* 396010 E0098460 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 396014 E0098464 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 396018 E0098468 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 39601C E009846C 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 396020 E0098470 3C06DE00 */ lui $a2, (0xDE000000 >> 16) /* 396024 E0098474 8CA40000 */ lw $a0, 0x0($a1) /* 396028 E0098478 3C020900 */ lui $v0, %hi(D_09000450_4154B0) /* 39602C E009847C 24420450 */ addiu $v0, $v0, %lo(D_09000450_4154B0) /* 396030 E0098480 0080182D */ daddu $v1, $a0, $zero /* 396034 E0098484 24840008 */ addiu $a0, $a0, 0x8 /* 396038 E0098488 ACA40000 */ sw $a0, 0x0($a1) /* 39603C E009848C AC620004 */ sw $v0, 0x4($v1) /* 396040 E0098490 24820008 */ addiu $v0, $a0, 0x8 /* 396044 E0098494 AC660000 */ sw $a2, 0x0($v1) /* 396048 E0098498 ACA20000 */ sw $v0, 0x0($a1) /* 39604C E009849C AC860000 */ sw $a2, 0x0($a0) /* 396050 E00984A0 8E820000 */ lw $v0, 0x0($s4) /* 396054 E00984A4 24830010 */ addiu $v1, $a0, 0x10 /* 396058 E00984A8 ACA30000 */ sw $v1, 0x0($a1) /* 39605C E00984AC 00021080 */ sll $v0, $v0, 2 /* 396060 E00984B0 3C03E00A */ lui $v1, (0xE00A0000 >> 16) /* 396064 E00984B4 00621821 */ addu $v1, $v1, $v0 /* 396068 E00984B8 8C638510 */ lw $v1, -0x7AF0($v1) /* 39606C E00984BC 24820018 */ addiu $v0, $a0, 0x18 /* 396070 E00984C0 ACA20000 */ sw $v0, 0x0($a1) /* 396074 E00984C4 24020040 */ addiu $v0, $zero, 0x40 /* 396078 E00984C8 AC82000C */ sw $v0, 0xC($a0) /* 39607C E00984CC 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 396080 E00984D0 AC870008 */ sw $a3, 0x8($a0) /* 396084 E00984D4 AC820010 */ sw $v0, 0x10($a0) /* 396088 E00984D8 AC800014 */ sw $zero, 0x14($a0) /* 39608C E00984DC AC830004 */ sw $v1, 0x4($a0) /* 396090 E00984E0 8FBF0078 */ lw $ra, 0x78($sp) /* 396094 E00984E4 8FB50074 */ lw $s5, 0x74($sp) /* 396098 E00984E8 8FB40070 */ lw $s4, 0x70($sp) /* 39609C E00984EC 8FB3006C */ lw $s3, 0x6C($sp) /* 3960A0 E00984F0 8FB20068 */ lw $s2, 0x68($sp) /* 3960A4 E00984F4 8FB10064 */ lw $s1, 0x64($sp) /* 3960A8 E00984F8 8FB00060 */ lw $s0, 0x60($sp) /* 3960AC E00984FC 03E00008 */ jr $ra /* 3960B0 E0098500 27BD0080 */ addiu $sp, $sp, 0x80 /* 3960B4 E0098504 00000000 */ nop /* 3960B8 E0098508 00000000 */ nop /* 3960BC E009850C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void floating_rock_appendGfx(void* effect) { FloatingRockFXData* data = ((EffectInstance*)effect)->data.floatingRock; s32 alpha = data->alpha; Matrix4f mtxTransform; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guPositionF(mtxTransform, data->rot.x, data->rot.z, data->rot.y, data->scale, data->pos.x, data->pos.y, data->pos.z); shim_guMtxF2L(mtxTransform, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 215, 215, 110, alpha); if (alpha != 255) { gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_XLU_SURF, G_RM_AA_ZB_XLU_SURF2); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_AA_ZB_OPA_SURF, G_RM_AA_ZB_OPA_SURF2); } gSPDisplayList(gMainGfxPos++, D_09000450_396540); gSPDisplayList(gMainGfxPos++, D_E0098510[data->type]); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel whirlwind_main /* 3D2AC0 E00CE000 27BDFF90 */ addiu $sp, $sp, -0x70 /* 3D2AC4 E00CE004 F7BC0060 */ sdc1 $f28, 0x60($sp) /* 3D2AC8 E00CE008 4485E000 */ mtc1 $a1, $f28 /* 3D2ACC E00CE00C AFB20030 */ sw $s2, 0x30($sp) /* 3D2AD0 E00CE010 0080902D */ daddu $s2, $a0, $zero /* 3D2AD4 E00CE014 F7BE0068 */ sdc1 $f30, 0x68($sp) /* 3D2AD8 E00CE018 4486F000 */ mtc1 $a2, $f30 /* 3D2ADC E00CE01C 27A40010 */ addiu $a0, $sp, 0x10 /* 3D2AE0 E00CE020 AFB00028 */ sw $s0, 0x28($sp) /* 3D2AE4 E00CE024 8FB00084 */ lw $s0, 0x84($sp) /* 3D2AE8 E00CE028 3C02E00D */ lui $v0, %hi(whirlwind_init) /* 3D2AEC E00CE02C 2442E21C */ addiu $v0, $v0, %lo(whirlwind_init) /* 3D2AF0 E00CE030 AFA20018 */ sw $v0, 0x18($sp) /* 3D2AF4 E00CE034 3C02E00D */ lui $v0, %hi(whirlwind_update) /* 3D2AF8 E00CE038 2442E224 */ addiu $v0, $v0, %lo(whirlwind_update) /* 3D2AFC E00CE03C AFA2001C */ sw $v0, 0x1C($sp) /* 3D2B00 E00CE040 3C02E00D */ lui $v0, %hi(whirlwind_render) /* 3D2B04 E00CE044 2442E428 */ addiu $v0, $v0, %lo(whirlwind_render) /* 3D2B08 E00CE048 AFA20020 */ sw $v0, 0x20($sp) /* 3D2B0C E00CE04C 24020067 */ addiu $v0, $zero, 0x67 /* 3D2B10 E00CE050 AFBF0038 */ sw $ra, 0x38($sp) /* 3D2B14 E00CE054 AFB30034 */ sw $s3, 0x34($sp) /* 3D2B18 E00CE058 AFB1002C */ sw $s1, 0x2C($sp) /* 3D2B1C E00CE05C F7BA0058 */ sdc1 $f26, 0x58($sp) /* 3D2B20 E00CE060 F7B80050 */ sdc1 $f24, 0x50($sp) /* 3D2B24 E00CE064 F7B60048 */ sdc1 $f22, 0x48($sp) /* 3D2B28 E00CE068 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3D2B2C E00CE06C AFA7007C */ sw $a3, 0x7C($sp) /* 3D2B30 E00CE070 AFA00010 */ sw $zero, 0x10($sp) /* 3D2B34 E00CE074 AFA00024 */ sw $zero, 0x24($sp) /* 3D2B38 E00CE078 0C080124 */ jal shim_create_effect_instance /* 3D2B3C E00CE07C AFA20014 */ sw $v0, 0x14($sp) /* 3D2B40 E00CE080 24040144 */ addiu $a0, $zero, 0x144 /* 3D2B44 E00CE084 24030001 */ addiu $v1, $zero, 0x1 /* 3D2B48 E00CE088 0040982D */ daddu $s3, $v0, $zero /* 3D2B4C E00CE08C 0C08012C */ jal shim_general_heap_malloc /* 3D2B50 E00CE090 AE630008 */ sw $v1, 0x8($s3) /* 3D2B54 E00CE094 0040882D */ daddu $s1, $v0, $zero /* 3D2B58 E00CE098 16200003 */ bnez $s1, .LE00CE0A8 /* 3D2B5C E00CE09C AE62000C */ sw $v0, 0xC($s3) .LE00CE0A0: /* 3D2B60 E00CE0A0 08033828 */ j .LE00CE0A0 /* 3D2B64 E00CE0A4 00000000 */ nop .LE00CE0A8: /* 3D2B68 E00CE0A8 AE320000 */ sw $s2, 0x0($s1) /* 3D2B6C E00CE0AC 1E000004 */ bgtz $s0, .LE00CE0C0 /* 3D2B70 E00CE0B0 AE200014 */ sw $zero, 0x14($s1) /* 3D2B74 E00CE0B4 240203E8 */ addiu $v0, $zero, 0x3E8 /* 3D2B78 E00CE0B8 08033831 */ j .LE00CE0C4 /* 3D2B7C E00CE0BC AE220010 */ sw $v0, 0x10($s1) .LE00CE0C0: /* 3D2B80 E00CE0C0 AE300010 */ sw $s0, 0x10($s1) .LE00CE0C4: /* 3D2B84 E00CE0C4 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D2B88 E00CE0C8 D43AEE50 */ ldc1 $f26, -0x11B0($at) /* 3D2B8C E00CE0CC 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 3D2B90 E00CE0D0 4481C800 */ mtc1 $at, $f25 /* 3D2B94 E00CE0D4 4480C000 */ mtc1 $zero, $f24 /* 3D2B98 E00CE0D8 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D2B9C E00CE0DC D434EE58 */ ldc1 $f20, -0x11A8($at) /* 3D2BA0 E00CE0E0 3C014000 */ lui $at, (0x40000000 >> 16) /* 3D2BA4 E00CE0E4 4481B800 */ mtc1 $at, $f23 /* 3D2BA8 E00CE0E8 4480B000 */ mtc1 $zero, $f22 /* 3D2BAC E00CE0EC 0000902D */ daddu $s2, $zero, $zero /* 3D2BB0 E00CE0F0 AE200024 */ sw $zero, 0x24($s1) /* 3D2BB4 E00CE0F4 E63C0004 */ swc1 $f28, 0x4($s1) /* 3D2BB8 E00CE0F8 E63E0008 */ swc1 $f30, 0x8($s1) /* 3D2BBC E00CE0FC C7A2007C */ lwc1 $f2, 0x7C($sp) /* 3D2BC0 E00CE100 0220802D */ daddu $s0, $s1, $zero /* 3D2BC4 E00CE104 E622000C */ swc1 $f2, 0xC($s1) /* 3D2BC8 E00CE108 C7A00080 */ lwc1 $f0, 0x80($sp) /* 3D2BCC E00CE10C 240200FF */ addiu $v0, $zero, 0xFF /* 3D2BD0 E00CE110 AE220018 */ sw $v0, 0x18($s1) /* 3D2BD4 E00CE114 AE22001C */ sw $v0, 0x1C($s1) /* 3D2BD8 E00CE118 AE220020 */ sw $v0, 0x20($s1) /* 3D2BDC E00CE11C AE220028 */ sw $v0, 0x28($s1) /* 3D2BE0 E00CE120 AE22002C */ sw $v0, 0x2C($s1) /* 3D2BE4 E00CE124 240200EB */ addiu $v0, $zero, 0xEB /* 3D2BE8 E00CE128 AE220030 */ sw $v0, 0x30($s1) /* 3D2BEC E00CE12C E6200034 */ swc1 $f0, 0x34($s1) .LE00CE130: /* 3D2BF0 E00CE130 44920000 */ mtc1 $s2, $f0 /* 3D2BF4 E00CE134 00000000 */ nop /* 3D2BF8 E00CE138 46800021 */ cvt.d.w $f0, $f0 /* 3D2BFC E00CE13C 463A0002 */ mul.d $f0, $f0, $f26 /* 3D2C00 E00CE140 00000000 */ nop /* 3D2C04 E00CE144 E61C0038 */ swc1 $f28, 0x38($s0) /* 3D2C08 E00CE148 E61E0058 */ swc1 $f30, 0x58($s0) /* 3D2C0C E00CE14C C7A2007C */ lwc1 $f2, 0x7C($sp) /* 3D2C10 E00CE150 46380000 */ add.d $f0, $f0, $f24 /* 3D2C14 E00CE154 24040168 */ addiu $a0, $zero, 0x168 /* 3D2C18 E00CE158 E6020078 */ swc1 $f2, 0x78($s0) /* 3D2C1C E00CE15C 46200020 */ cvt.s.d $f0, $f0 /* 3D2C20 E00CE160 0C080138 */ jal shim_rand_int /* 3D2C24 E00CE164 E6000098 */ swc1 $f0, 0x98($s0) /* 3D2C28 E00CE168 24040064 */ addiu $a0, $zero, 0x64 /* 3D2C2C E00CE16C 44820000 */ mtc1 $v0, $f0 /* 3D2C30 E00CE170 00000000 */ nop /* 3D2C34 E00CE174 46800020 */ cvt.s.w $f0, $f0 /* 3D2C38 E00CE178 0C080138 */ jal shim_rand_int /* 3D2C3C E00CE17C E60000B8 */ swc1 $f0, 0xB8($s0) /* 3D2C40 E00CE180 44820000 */ mtc1 $v0, $f0 /* 3D2C44 E00CE184 00000000 */ nop /* 3D2C48 E00CE188 46800021 */ cvt.d.w $f0, $f0 /* 3D2C4C E00CE18C 46340002 */ mul.d $f0, $f0, $f20 /* 3D2C50 E00CE190 00000000 */ nop /* 3D2C54 E00CE194 46360000 */ add.d $f0, $f0, $f22 /* 3D2C58 E00CE198 2404001E */ addiu $a0, $zero, 0x1E /* 3D2C5C E00CE19C 46200020 */ cvt.s.d $f0, $f0 /* 3D2C60 E00CE1A0 0C080138 */ jal shim_rand_int /* 3D2C64 E00CE1A4 E60000D8 */ swc1 $f0, 0xD8($s0) /* 3D2C68 E00CE1A8 44820000 */ mtc1 $v0, $f0 /* 3D2C6C E00CE1AC 00000000 */ nop /* 3D2C70 E00CE1B0 46800021 */ cvt.d.w $f0, $f0 /* 3D2C74 E00CE1B4 46340002 */ mul.d $f0, $f0, $f20 /* 3D2C78 E00CE1B8 00000000 */ nop /* 3D2C7C E00CE1BC 26520001 */ addiu $s2, $s2, 0x1 /* 3D2C80 E00CE1C0 2A420008 */ slti $v0, $s2, 0x8 /* 3D2C84 E00CE1C4 AE000118 */ sw $zero, 0x118($s0) /* 3D2C88 E00CE1C8 46200020 */ cvt.s.d $f0, $f0 /* 3D2C8C E00CE1CC E60000F8 */ swc1 $f0, 0xF8($s0) /* 3D2C90 E00CE1D0 1440FFD7 */ bnez $v0, .LE00CE130 /* 3D2C94 E00CE1D4 26100004 */ addiu $s0, $s0, 0x4 /* 3D2C98 E00CE1D8 0260102D */ daddu $v0, $s3, $zero /* 3D2C9C E00CE1DC AE200138 */ sw $zero, 0x138($s1) /* 3D2CA0 E00CE1E0 AE20013C */ sw $zero, 0x13C($s1) /* 3D2CA4 E00CE1E4 AE200140 */ sw $zero, 0x140($s1) /* 3D2CA8 E00CE1E8 8FBF0038 */ lw $ra, 0x38($sp) /* 3D2CAC E00CE1EC 8FB30034 */ lw $s3, 0x34($sp) /* 3D2CB0 E00CE1F0 8FB20030 */ lw $s2, 0x30($sp) /* 3D2CB4 E00CE1F4 8FB1002C */ lw $s1, 0x2C($sp) /* 3D2CB8 E00CE1F8 8FB00028 */ lw $s0, 0x28($sp) /* 3D2CBC E00CE1FC D7BE0068 */ ldc1 $f30, 0x68($sp) /* 3D2CC0 E00CE200 D7BC0060 */ ldc1 $f28, 0x60($sp) /* 3D2CC4 E00CE204 D7BA0058 */ ldc1 $f26, 0x58($sp) /* 3D2CC8 E00CE208 D7B80050 */ ldc1 $f24, 0x50($sp) /* 3D2CCC E00CE20C D7B60048 */ ldc1 $f22, 0x48($sp) /* 3D2CD0 E00CE210 D7B40040 */ ldc1 $f20, 0x40($sp) /* 3D2CD4 E00CE214 03E00008 */ jr $ra /* 3D2CD8 E00CE218 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: EffectInstance* whirlwind_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance *effect; WhirlwindFXData* part; s32 numParts; s32 i; bp.init = whirlwind_init; bp.update = whirlwind_update; bp.renderWorld = whirlwind_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_WHIRLWIND; numParts = 1; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.whirlwind = shim_general_heap_malloc(effect->numParts * sizeof(*part)); ASSERT(part != NULL); part->unk_00 = arg0; part->unk_14 = 0; if (arg5 <= 0) { part->unk_10 = 1000; } else { part->unk_10 = arg5; } part->primAlpha = 0; part->pos.x = arg1; part->pos.y = arg2; part->pos.z = arg3; part->unk_34 = arg4; part->primR = 255; part->primG = 255; part->primB = 255; part->envR = 255; part->envG = 255; part->envB = 235; for(i = 0; i < MAX_WHIRLWIND_SEGMENTS; i++) { part->unk_38[i] = arg1; part->unk_58[i] = arg2; part->unk_78[i] = arg3; part->unk_98[i] = i * 0.2 + 1.0; part->unk_B8[i] = shim_rand_int(360); part->unk_D8[i] = shim_rand_int(100) * 0.1 + 2.0; part->unk_F8[i] = shim_rand_int(30) * 0.1; part->unk_118[i] = 0; } part->unk_138 = 0; part->unk_13C = 0; part->unk_140 = 0; return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel sfx_compute_spatialized_sound_params_0 /* E0658 80149F58 44860000 */ mtc1 $a2, $f0 /* E065C 80149F5C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* E0660 80149F60 AFB00030 */ sw $s0, 0x30($sp) /* E0664 80149F64 00E0802D */ daddu $s0, $a3, $zero /* E0668 80149F68 AFB10034 */ sw $s1, 0x34($sp) /* E066C 80149F6C 8FB10058 */ lw $s1, 0x58($sp) /* E0670 80149F70 3C048007 */ lui $a0, %hi(gCurrentCameraID) /* E0674 80149F74 8C847410 */ lw $a0, %lo(gCurrentCameraID)($a0) /* E0678 80149F78 44056000 */ mfc1 $a1, $f12 /* E067C 80149F7C 44067000 */ mfc1 $a2, $f14 /* E0680 80149F80 27A20020 */ addiu $v0, $sp, 0x20 /* E0684 80149F84 AFA20010 */ sw $v0, 0x10($sp) /* E0688 80149F88 27A20024 */ addiu $v0, $sp, 0x24 /* E068C 80149F8C AFA20014 */ sw $v0, 0x14($sp) /* E0690 80149F90 44070000 */ mfc1 $a3, $f0 /* E0694 80149F94 27A20028 */ addiu $v0, $sp, 0x28 /* E0698 80149F98 AFBF0038 */ sw $ra, 0x38($sp) /* E069C 80149F9C F7B40040 */ sdc1 $f20, 0x40($sp) /* E06A0 80149FA0 0C00B94E */ jal get_screen_coords /* E06A4 80149FA4 AFA20018 */ sw $v0, 0x18($sp) /* E06A8 80149FA8 8FA20020 */ lw $v0, 0x20($sp) /* E06AC 80149FAC 24420BB8 */ addiu $v0, $v0, 0xBB8 /* E06B0 80149FB0 2C421771 */ sltiu $v0, $v0, 0x1771 /* E06B4 80149FB4 10400008 */ beqz $v0, .L80149FD8 /* E06B8 80149FB8 24020001 */ addiu $v0, $zero, 0x1 /* E06BC 80149FBC 8FA30024 */ lw $v1, 0x24($sp) /* E06C0 80149FC0 28620BB9 */ slti $v0, $v1, 0xBB9 /* E06C4 80149FC4 10400003 */ beqz $v0, .L80149FD4 /* E06C8 80149FC8 2862F448 */ slti $v0, $v1, -0xBB8 /* E06CC 80149FCC 10400005 */ beqz $v0, .L80149FE4 /* E06D0 80149FD0 2402007F */ addiu $v0, $zero, 0x7F .L80149FD4: /* E06D4 80149FD4 24020001 */ addiu $v0, $zero, 0x1 .L80149FD8: /* E06D8 80149FD8 A6020000 */ sh $v0, 0x0($s0) /* E06DC 80149FDC 08052867 */ j .L8014A19C /* E06E0 80149FE0 A6200000 */ sh $zero, 0x0($s1) .L80149FE4: /* E06E4 80149FE4 A6020000 */ sh $v0, 0x0($s0) /* E06E8 80149FE8 8FA20020 */ lw $v0, 0x20($sp) /* E06EC 80149FEC 04410012 */ bgez $v0, .L8014A038 /* E06F0 80149FF0 00000000 */ nop /* E06F4 80149FF4 3C013E99 */ lui $at, (0x3E99999A >> 16) /* E06F8 80149FF8 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF) /* E06FC 80149FFC 44811000 */ mtc1 $at, $f2 /* E0700 8014A000 44820000 */ mtc1 $v0, $f0 /* E0704 8014A004 00000000 */ nop /* E0708 8014A008 46800020 */ cvt.s.w $f0, $f0 /* E070C 8014A00C 46020002 */ mul.s $f0, $f0, $f2 /* E0710 8014A010 00000000 */ nop /* E0714 8014A014 3C0142FE */ lui $at, (0x42FE0000 >> 16) /* E0718 8014A018 44811000 */ mtc1 $at, $f2 /* E071C 8014A01C 00000000 */ nop /* E0720 8014A020 46020000 */ add.s $f0, $f0, $f2 /* E0724 8014A024 4600010D */ trunc.w.s $f4, $f0 /* E0728 8014A028 44022000 */ mfc1 $v0, $f4 /* E072C 8014A02C 00000000 */ nop /* E0730 8014A030 A6020000 */ sh $v0, 0x0($s0) /* E0734 8014A034 AFA00020 */ sw $zero, 0x20($sp) .L8014A038: /* E0738 8014A038 8FA30020 */ lw $v1, 0x20($sp) /* E073C 8014A03C 28620141 */ slti $v0, $v1, 0x141 /* E0740 8014A040 14400013 */ bnez $v0, .L8014A090 /* E0744 8014A044 2462FEC0 */ addiu $v0, $v1, -0x140 /* E0748 8014A048 3C013E99 */ lui $at, (0x3E99999A >> 16) /* E074C 8014A04C 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF) /* E0750 8014A050 44810000 */ mtc1 $at, $f0 /* E0754 8014A054 44821000 */ mtc1 $v0, $f2 /* E0758 8014A058 00000000 */ nop /* E075C 8014A05C 468010A0 */ cvt.s.w $f2, $f2 /* E0760 8014A060 46001082 */ mul.s $f2, $f2, $f0 /* E0764 8014A064 00000000 */ nop /* E0768 8014A068 3C0142FE */ lui $at, (0x42FE0000 >> 16) /* E076C 8014A06C 44810000 */ mtc1 $at, $f0 /* E0770 8014A070 00000000 */ nop /* E0774 8014A074 46020001 */ sub.s $f0, $f0, $f2 /* E0778 8014A078 4600010D */ trunc.w.s $f4, $f0 /* E077C 8014A07C 44022000 */ mfc1 $v0, $f4 /* E0780 8014A080 00000000 */ nop /* E0784 8014A084 A6020000 */ sh $v0, 0x0($s0) /* E0788 8014A088 24020140 */ addiu $v0, $zero, 0x140 /* E078C 8014A08C AFA20020 */ sw $v0, 0x20($sp) .L8014A090: /* E0790 8014A090 86020000 */ lh $v0, 0x0($s0) /* E0794 8014A094 1C400002 */ bgtz $v0, .L8014A0A0 /* E0798 8014A098 24020001 */ addiu $v0, $zero, 0x1 /* E079C 8014A09C A6020000 */ sh $v0, 0x0($s0) .L8014A0A0: /* E07A0 8014A0A0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* E07A4 8014A0A4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* E07A8 8014A0A8 80420070 */ lb $v0, 0x70($v0) /* E07AC 8014A0AC 14400010 */ bnez $v0, .L8014A0F0 /* E07B0 8014A0B0 00000000 */ nop /* E07B4 8014A0B4 3C013E4C */ lui $at, (0x3E4CCCCD >> 16) /* E07B8 8014A0B8 3421CCCD */ ori $at, $at, (0x3E4CCCCD & 0xFFFF) /* E07BC 8014A0BC 44811000 */ mtc1 $at, $f2 /* E07C0 8014A0C0 C7A00020 */ lwc1 $f0, 0x20($sp) /* E07C4 8014A0C4 46800020 */ cvt.s.w $f0, $f0 /* E07C8 8014A0C8 46020002 */ mul.s $f0, $f0, $f2 /* E07CC 8014A0CC 00000000 */ nop /* E07D0 8014A0D0 3C014200 */ lui $at, (0x42000000 >> 16) /* E07D4 8014A0D4 44811000 */ mtc1 $at, $f2 /* E07D8 8014A0D8 00000000 */ nop /* E07DC 8014A0DC 46020000 */ add.s $f0, $f0, $f2 /* E07E0 8014A0E0 4600010D */ trunc.w.s $f4, $f0 /* E07E4 8014A0E4 44022000 */ mfc1 $v0, $f4 /* E07E8 8014A0E8 08052867 */ j .L8014A19C /* E07EC 8014A0EC A6220000 */ sh $v0, 0x0($s1) .L8014A0F0: /* E07F0 8014A0F0 3C018015 */ lui $at, %hi(D_80151270) /* E07F4 8014A0F4 D4201270 */ ldc1 $f0, %lo(D_80151270)($at) /* E07F8 8014A0F8 C7B40020 */ lwc1 $f20, 0x20($sp) /* E07FC 8014A0FC 4680A521 */ cvt.d.w $f20, $f20 /* E0800 8014A100 4620A502 */ mul.d $f20, $f20, $f0 /* E0804 8014A104 00000000 */ nop /* E0808 8014A108 3C014074 */ lui $at, (0x40740000 >> 16) /* E080C 8014A10C 44810800 */ mtc1 $at, $f1 /* E0810 8014A110 44800000 */ mtc1 $zero, $f0 /* E0814 8014A114 3C014050 */ lui $at, (0x40500000 >> 16) /* E0818 8014A118 44811800 */ mtc1 $at, $f3 /* E081C 8014A11C 44801000 */ mtc1 $zero, $f2 /* E0820 8014A120 4620A503 */ div.d $f20, $f20, $f0 /* E0824 8014A124 4622A501 */ sub.d $f20, $f20, $f2 /* E0828 8014A128 3C018015 */ lui $at, %hi(D_80151278) /* E082C 8014A12C D4201278 */ ldc1 $f0, %lo(D_80151278)($at) /* E0830 8014A130 4620A520 */ cvt.s.d $f20, $f20 /* E0834 8014A134 4600A321 */ cvt.d.s $f12, $f20 /* E0838 8014A138 46206305 */ abs.d $f12, $f12 /* E083C 8014A13C 46206302 */ mul.d $f12, $f12, $f0 /* E0840 8014A140 00000000 */ nop /* E0844 8014A144 3C013F90 */ lui $at, (0x3F900000 >> 16) /* E0848 8014A148 44810800 */ mtc1 $at, $f1 /* E084C 8014A14C 44800000 */ mtc1 $zero, $f0 /* E0850 8014A150 00000000 */ nop /* E0854 8014A154 46206302 */ mul.d $f12, $f12, $f0 /* E0858 8014A158 00000000 */ nop /* E085C 8014A15C 3C018015 */ lui $at, %hi(D_80151280) /* E0860 8014A160 D4201280 */ ldc1 $f0, %lo(D_80151280)($at) /* E0864 8014A164 46206302 */ mul.d $f12, $f12, $f0 /* E0868 8014A168 00000000 */ nop /* E086C 8014A16C 3C018015 */ lui $at, %hi(D_80151288) /* E0870 8014A170 D4201288 */ ldc1 $f0, %lo(D_80151288)($at) /* E0874 8014A174 46206303 */ div.d $f12, $f12, $f0 /* E0878 8014A178 0C00A85B */ jal sin_rad /* E087C 8014A17C 46206320 */ cvt.s.d $f12, $f12 /* E0880 8014A180 4600A502 */ mul.s $f20, $f20, $f0 /* E0884 8014A184 00000000 */ nop /* E0888 8014A188 4600A10D */ trunc.w.s $f4, $f20 /* E088C 8014A18C 44022000 */ mfc1 $v0, $f4 /* E0890 8014A190 00000000 */ nop /* E0894 8014A194 24420040 */ addiu $v0, $v0, 0x40 /* E0898 8014A198 A6220000 */ sh $v0, 0x0($s1) .L8014A19C: /* E089C 8014A19C 8FBF0038 */ lw $ra, 0x38($sp) /* E08A0 8014A1A0 8FB10034 */ lw $s1, 0x34($sp) /* E08A4 8014A1A4 8FB00030 */ lw $s0, 0x30($sp) /* E08A8 8014A1A8 D7B40040 */ ldc1 $f20, 0x40($sp) /* E08AC 8014A1AC 03E00008 */ jr $ra /* E08B0 8014A1B0 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void sfx_compute_spatialized_sound_params_0(f32 x, f32 y, f32 z, s16* volume, s16* pan) { s32 screenX, screenY, screenZ; get_screen_coords(gCurrentCameraID, x, y, z, &screenX, &screenY, &screenZ); if (screenX > 3000 || screenX < -3000 || screenY > 3000 || screenY < -3000) { *volume = 1; *pan = 0; return; } *volume = 127; if (screenX < 0) { *volume = (screenX * 0.3f) + 127.0f; screenX = 0; } if (screenX > SCREEN_WIDTH) { *volume = 127.0f - ((screenX - SCREEN_WIDTH) * 0.3f); screenX = SCREEN_WIDTH; } if (*volume < 1) { *volume = 1; } if (!gGameStatusPtr->isBattle) { // 25/75 at screen edge *pan = (screenX * 0.2f) + 32.0f; } else { f32 temp_f20 = ((screenX * 127.0) / SCREEN_WIDTH) - 64.0; *pan = (s32) (temp_f20 * sin_rad(DEG_TO_RAD(fabs(temp_f20) * 90.0 / 64.0))) + 64; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80240B4C /* B2108C 80240B4C 27BDFFB0 */ addiu $sp, $sp, -0x50 D_80240B50: /* B21090 80240B50 AFB20018 */ sw $s2, 0x18($sp) glabel func_80240B54 /* B21094 80240B54 0080902D */ daddu $s2, $a0, $zero .L80240B58: /* B21098 80240B58 AFBF0028 */ sw $ra, 0x28($sp) glabel func_80240B5C /* B2109C 80240B5C AFB50024 */ sw $s5, 0x24($sp) glabel func_80240B60 /* B210A0 80240B60 AFB40020 */ sw $s4, 0x20($sp) glabel func_80240B64 /* B210A4 80240B64 AFB3001C */ sw $s3, 0x1C($sp) glabel func_80240B68 /* B210A8 80240B68 AFB10014 */ sw $s1, 0x14($sp) .L80240B6C: /* B210AC 80240B6C AFB00010 */ sw $s0, 0x10($sp) glabel func_80240B70 /* B210B0 80240B70 F7BA0048 */ sdc1 $f26, 0x48($sp) D_80240B74: /* B210B4 80240B74 F7B80040 */ sdc1 $f24, 0x40($sp) glabel func_80240B78 /* B210B8 80240B78 F7B60038 */ sdc1 $f22, 0x38($sp) glabel func_80240B7C /* B210BC 80240B7C F7B40030 */ sdc1 $f20, 0x30($sp) glabel .L80240B80 /* B210C0 80240B80 8E50000C */ lw $s0, 0xC($s2) glabel func_80240B84 /* B210C4 80240B84 4480A000 */ mtc1 $zero, $f20 D_80240B88: /* B210C8 80240B88 8E050000 */ lw $a1, 0x0($s0) glabel func_80240B8C /* B210CC 80240B8C 26100004 */ addiu $s0, $s0, 0x4 glabel func_80240B90 /* B210D0 80240B90 4600A686 */ mov.s $f26, $f20 glabel func_80240B94 /* B210D4 80240B94 0C0B1EAF */ jal evt_get_variable glabel arn_08_pad_B98 /* B210D8 80240B98 4600A606 */ mov.s $f24, $f20 glabel func_80240B9C /* B210DC 80240B9C 8E130000 */ lw $s3, 0x0($s0) glabel func_80240BA0 /* B210E0 80240BA0 26100004 */ addiu $s0, $s0, 0x4 D_80240BA4: /* B210E4 80240BA4 0000202D */ daddu $a0, $zero, $zero glabel func_80240BA8 /* B210E8 80240BA8 8E140000 */ lw $s4, 0x0($s0) glabel omo_11_SuperBlock_SwitchToPartner /* B210EC 80240BAC 8E150004 */ lw $s5, 0x4($s0) glabel mgm_02_RunMinigame /* B210F0 80240BB0 0C00EAD2 */ jal get_npc_safe glabel func_80240BB4 /* B210F4 80240BB4 0040882D */ daddu $s1, $v0, $zero glabel dead_flo_09_FlyingAI_Loiter /* B210F8 80240BB8 0040802D */ daddu $s0, $v0, $zero glabel func_80240BBC /* B210FC 80240BBC 24020001 */ addiu $v0, $zero, 0x1 glabel func_80240BC0 /* B21100 80240BC0 1222000F */ beq $s1, $v0, func_80240C00 glabel func_80240BC4 /* B21104 80240BC4 2A220002 */ slti $v0, $s1, 0x2 glabel func_80240BC8 /* B21108 80240BC8 10400005 */ beqz $v0, func_80240BE0 D_80240BCC: /* B2110C 80240BCC 24020002 */ addiu $v0, $zero, 0x2 glabel func_80240BD0 /* B21110 80240BD0 12200007 */ beqz $s1, D_80240BF0 glabel func_80240BD4 /* B21114 80240BD4 00000000 */ nop glabel func_80240BD8 /* B21118 80240BD8 08090308 */ j D_80240C20 arn_10_pad_BDC: /* B2111C 80240BDC 00000000 */ nop glabel func_80240BE0 /* B21120 80240BE0 1222000B */ beq $s1, $v0, func_80240C10 D_80240BE4: /* B21124 80240BE4 00000000 */ nop glabel func_80240BE8 /* B21128 80240BE8 08090308 */ j D_80240C20 glabel func_80240BEC /* B2112C 80240BEC 00000000 */ nop D_80240BF0: /* B21130 80240BF0 3C014302 */ lui $at, (0x43020000 >> 16) glabel mgm_01_EndPanelAnimation /* B21134 80240BF4 4481B000 */ mtc1 $at, $f22 D_80240BF8: /* B21138 80240BF8 0809030B */ j func_80240C2C glabel func_80240BFC /* B2113C 80240BFC 2A220004 */ slti $v0, $s1, 0x4 glabel func_80240C00 /* B21140 80240C00 3C014320 */ lui $at, (0x43200000 >> 16) glabel func_80240C04 /* B21144 80240C04 4481B000 */ mtc1 $at, $f22 glabel func_80240C08 /* B21148 80240C08 0809030B */ j func_80240C2C glabel func_80240C0C /* B2114C 80240C0C 2A220004 */ slti $v0, $s1, 0x4 glabel func_80240C10 /* B21150 80240C10 3C0142C8 */ lui $at, (0x42C80000 >> 16) .L80240C14: /* B21154 80240C14 4481B000 */ mtc1 $at, $f22 glabel func_80240C18 /* B21158 80240C18 0809030B */ j func_80240C2C glabel func_80240C1C /* B2115C 80240C1C 2A220004 */ slti $v0, $s1, 0x4 D_80240C20: /* B21160 80240C20 3C0142A0 */ lui $at, (0x42A00000 >> 16) D_80240C24: /* B21164 80240C24 4481B000 */ mtc1 $at, $f22 D_80240C28: /* B21168 80240C28 2A220004 */ slti $v0, $s1, 0x4 glabel func_80240C2C /* B2116C 80240C2C 10400019 */ beqz $v0, func_80240C94 glabel func_80240C30 /* B21170 80240C30 0240202D */ daddu $a0, $s2, $zero glabel func_80240C34 /* B21174 80240C34 C614000C */ lwc1 $f20, 0xC($s0) glabel omo_04_FlyingAI_Loiter /* B21178 80240C38 4600A507 */ neg.s $f20, $f20 .L80240C3C: /* B2117C 80240C3C 0C00A8BB */ jal sin_deg glabel func_80240C40 /* B21180 80240C40 4600A306 */ mov.s $f12, $f20 glabel func_80240C44 /* B21184 80240C44 46160002 */ mul.s $f0, $f0, $f22 .L80240C48: /* B21188 80240C48 00000000 */ nop glabel dead_11_FlyingAI_JumpInit /* B2118C 80240C4C C6020038 */ lwc1 $f2, 0x38($s0) glabel .L80240C50 /* B21190 80240C50 3C0141F0 */ lui $at, (0x41F00000 >> 16) glabel mgm_01_UpdateRecords /* B21194 80240C54 44812000 */ mtc1 $at, $f4 glabel func_80240C58 /* B21198 80240C58 00000000 */ nop glabel dead_kzn_17_PiranhaPlantAI_00 /* B2119C 80240C5C 46041080 */ add.s $f2, $f2, $f4 glabel func_80240C60 /* B211A0 80240C60 46001680 */ add.s $f26, $f2, $f0 glabel kzn_03_MeleeHitbox_31 /* B211A4 80240C64 0C00A8D4 */ jal cos_deg glabel func_80240C68 /* B211A8 80240C68 4600A306 */ mov.s $f12, $f20 glabel sam_07_WanderMeleeAI_Main /* B211AC 80240C6C 46160002 */ mul.s $f0, $f0, $f22 glabel func_80240C70 /* B211B0 80240C70 00000000 */ nop dgb_09_ClubbaNappingAI_LoiterInit: /* B211B4 80240C74 C604003C */ lwc1 $f4, 0x3C($s0) glabel func_80240C78 /* B211B8 80240C78 3C014248 */ lui $at, (0x42480000 >> 16) glabel func_80240C7C /* B211BC 80240C7C 44811000 */ mtc1 $at, $f2 glabel func_80240C80 /* B211C0 80240C80 00000000 */ nop glabel func_80240C84 /* B211C4 80240C84 46022500 */ add.s $f20, $f4, $f2 glabel func_80240C88 /* B211C8 80240C88 C6020040 */ lwc1 $f2, 0x40($s0) glabel func_80240C8C /* B211CC 80240C8C 46001600 */ add.s $f24, $f2, $f0 glabel arn_02_CleftAI_Main /* B211D0 80240C90 0240202D */ daddu $a0, $s2, $zero glabel func_80240C94 /* B211D4 80240C94 4406D000 */ mfc1 $a2, $f26 .L80240C98: /* B211D8 80240C98 0C0B2190 */ jal evt_set_float_variable glabel omo_07_PatrolAI_JumpInit /* B211DC 80240C9C 0260282D */ daddu $a1, $s3, $zero glabel func_80240CA0 /* B211E0 80240CA0 0240202D */ daddu $a0, $s2, $zero glabel .L80240CA4 /* B211E4 80240CA4 4406A000 */ mfc1 $a2, $f20 glabel func_80240CA8 /* B211E8 80240CA8 0C0B2190 */ jal evt_set_float_variable glabel func_80240CAC /* B211EC 80240CAC 0280282D */ daddu $a1, $s4, $zero glabel func_80240CB0 /* B211F0 80240CB0 0240202D */ daddu $a0, $s2, $zero glabel arn_08_pad_CB4 /* B211F4 80240CB4 4406C000 */ mfc1 $a2, $f24 glabel func_80240CB8 /* B211F8 80240CB8 0C0B2190 */ jal evt_set_float_variable D_80240CBC: /* B211FC 80240CBC 02A0282D */ daddu $a1, $s5, $zero glabel dead_flo_14_FlyingAI_Wander /* B21200 80240CC0 8FBF0028 */ lw $ra, 0x28($sp) glabel dead_11_FlyingAI_Jump /* B21204 80240CC4 8FB50024 */ lw $s5, 0x24($sp) glabel func_80240CC8 /* B21208 80240CC8 8FB40020 */ lw $s4, 0x20($sp) glabel func_80240CCC /* B2120C 80240CCC 8FB3001C */ lw $s3, 0x1C($sp) glabel func_80240CD0 /* B21210 80240CD0 8FB20018 */ lw $s2, 0x18($sp) glabel func_80240CD4 /* B21214 80240CD4 8FB10014 */ lw $s1, 0x14($sp) glabel func_80240CD8_EA97B8 /* B21218 80240CD8 8FB00010 */ lw $s0, 0x10($sp) glabel func_80240CDC /* B2121C 80240CDC D7BA0048 */ ldc1 $f26, 0x48($sp) glabel omo_17_GrooveGuyAI_Main /* B21220 80240CE0 D7B80040 */ ldc1 $f24, 0x40($sp) .L80240CE4: /* B21224 80240CE4 D7B60038 */ ldc1 $f22, 0x38($sp) glabel func_80240CE8 /* B21228 80240CE8 D7B40030 */ ldc1 $f20, 0x30($sp) glabel func_80240CEC /* B2122C 80240CEC 24020002 */ addiu $v0, $zero, 0x2 D_80240CF0: /* B21230 80240CF0 03E00008 */ jr $ra glabel func_80240CF4 /* B21234 80240CF4 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(func_80240B4C_B2108C) { Bytecode* args = script->ptrReadPos; s32 temp_s1 = evt_get_variable(script, *args++); Npc* npc; f32 temp_f20; f32 var_f22; f32 x, y, z; s32 outX, outY, outZ; x = 0.0f; y = 0.0f; z = 0.0f; outX = *args++; outY = *args++; outZ = *args++; npc = get_npc_safe(NPC_Whale); switch (temp_s1) { case 0: var_f22 = 130.0f; break; case 1: var_f22 = 160.0f; break; case 2: var_f22 = 100.0f; break; default: var_f22 = 80.0f; break; } if (temp_s1 < 4) { temp_f20 = -npc->yaw; x = npc->pos.x + 30.0f + sin_deg(temp_f20) * var_f22; z = npc->pos.z + cos_deg(temp_f20) * var_f22; y = npc->pos.y + 50.0f; } evt_set_float_variable(script, outX, x); evt_set_float_variable(script, outY, y); evt_set_float_variable(script, outZ, z); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel player_raycast_up_corners /* 77C94 800DE7E4 27BDFF90 */ addiu $sp, $sp, -0x70 /* 77C98 800DE7E8 F7B40048 */ sdc1 $f20, 0x48($sp) /* 77C9C 800DE7EC C7B40084 */ lwc1 $f20, 0x84($sp) /* 77CA0 800DE7F0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 77CA4 800DE7F4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 77CA8 800DE7F8 44810000 */ mtc1 $at, $f0 /* 77CAC 800DE7FC AFB60038 */ sw $s6, 0x38($sp) /* 77CB0 800DE800 00A0B02D */ daddu $s6, $a1, $zero /* 77CB4 800DE804 AFB7003C */ sw $s7, 0x3C($sp) /* 77CB8 800DE808 00C0B82D */ daddu $s7, $a2, $zero /* 77CBC 800DE80C AFBE0040 */ sw $fp, 0x40($sp) /* 77CC0 800DE810 00E0F02D */ daddu $fp, $a3, $zero /* 77CC4 800DE814 AFB40030 */ sw $s4, 0x30($sp) /* 77CC8 800DE818 2414FFFF */ addiu $s4, $zero, -0x1 /* 77CCC 800DE81C AFBF0044 */ sw $ra, 0x44($sp) /* 77CD0 800DE820 AFB50034 */ sw $s5, 0x34($sp) /* 77CD4 800DE824 AFB3002C */ sw $s3, 0x2C($sp) /* 77CD8 800DE828 AFB20028 */ sw $s2, 0x28($sp) /* 77CDC 800DE82C AFB10024 */ sw $s1, 0x24($sp) /* 77CE0 800DE830 AFB00020 */ sw $s0, 0x20($sp) /* 77CE4 800DE834 F7BC0068 */ sdc1 $f28, 0x68($sp) /* 77CE8 800DE838 F7BA0060 */ sdc1 $f26, 0x60($sp) /* 77CEC 800DE83C F7B80058 */ sdc1 $f24, 0x58($sp) /* 77CF0 800DE840 F7B60050 */ sdc1 $f22, 0x50($sp) /* 77CF4 800DE844 848200B2 */ lh $v0, 0xB2($a0) /* 77CF8 800DE848 4600A502 */ mul.s $f20, $f20, $f0 /* 77CFC 800DE84C 00000000 */ nop /* 77D00 800DE850 3C013E99 */ lui $at, (0x3E99999A >> 16) /* 77D04 800DE854 3421999A */ ori $at, $at, (0x3E99999A & 0xFFFF) /* 77D08 800DE858 44811000 */ mtc1 $at, $f2 /* 77D0C 800DE85C 8FB50080 */ lw $s5, 0x80($sp) /* 77D10 800DE860 4482B000 */ mtc1 $v0, $f22 /* 77D14 800DE864 00000000 */ nop /* 77D18 800DE868 4680B5A0 */ cvt.s.w $f22, $f22 /* 77D1C 800DE86C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 77D20 800DE870 44810000 */ mtc1 $at, $f0 /* 77D24 800DE874 4602B582 */ mul.s $f22, $f22, $f2 /* 77D28 800DE878 00000000 */ nop /* 77D2C 800DE87C 4600A503 */ div.s $f20, $f20, $f0 /* 77D30 800DE880 0C00A85B */ jal sin_rad /* 77D34 800DE884 4600A306 */ mov.s $f12, $f20 /* 77D38 800DE888 4600B702 */ mul.s $f28, $f22, $f0 /* 77D3C 800DE88C 00000000 */ nop /* 77D40 800DE890 0C00A874 */ jal cos_rad /* 77D44 800DE894 4600A306 */ mov.s $f12, $f20 /* 77D48 800DE898 27B30010 */ addiu $s3, $sp, 0x10 /* 77D4C 800DE89C 0260202D */ daddu $a0, $s3, $zero /* 77D50 800DE8A0 27B20014 */ addiu $s2, $sp, 0x14 /* 77D54 800DE8A4 0240282D */ daddu $a1, $s2, $zero /* 77D58 800DE8A8 27B10018 */ addiu $s1, $sp, 0x18 /* 77D5C 800DE8AC 0220302D */ daddu $a2, $s1, $zero /* 77D60 800DE8B0 27B0001C */ addiu $s0, $sp, 0x1C /* 77D64 800DE8B4 4600B587 */ neg.s $f22, $f22 /* 77D68 800DE8B8 4600B682 */ mul.s $f26, $f22, $f0 /* 77D6C 800DE8BC 00000000 */ nop /* 77D70 800DE8C0 C6D60000 */ lwc1 $f22, 0x0($s6) /* 77D74 800DE8C4 C6F80000 */ lwc1 $f24, 0x0($s7) /* 77D78 800DE8C8 C7D40000 */ lwc1 $f20, 0x0($fp) /* 77D7C 800DE8CC C6A00000 */ lwc1 $f0, 0x0($s5) /* 77D80 800DE8D0 461CB080 */ add.s $f2, $f22, $f28 /* 77D84 800DE8D4 0200382D */ daddu $a3, $s0, $zero /* 77D88 800DE8D8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 77D8C 800DE8DC 461AA000 */ add.s $f0, $f20, $f26 /* 77D90 800DE8E0 E7B80014 */ swc1 $f24, 0x14($sp) /* 77D94 800DE8E4 E7A20010 */ swc1 $f2, 0x10($sp) /* 77D98 800DE8E8 0C037A82 */ jal player_raycast_up_corner /* 77D9C 800DE8EC E7A00018 */ swc1 $f0, 0x18($sp) /* 77DA0 800DE8F0 04410022 */ bgez $v0, .L800DE97C /* 77DA4 800DE8F4 0260202D */ daddu $a0, $s3, $zero /* 77DA8 800DE8F8 0240282D */ daddu $a1, $s2, $zero /* 77DAC 800DE8FC 461CB081 */ sub.s $f2, $f22, $f28 /* 77DB0 800DE900 0220302D */ daddu $a2, $s1, $zero /* 77DB4 800DE904 0200382D */ daddu $a3, $s0, $zero /* 77DB8 800DE908 461AA001 */ sub.s $f0, $f20, $f26 /* 77DBC 800DE90C E7B80014 */ swc1 $f24, 0x14($sp) /* 77DC0 800DE910 E7A20010 */ swc1 $f2, 0x10($sp) /* 77DC4 800DE914 0C037A82 */ jal player_raycast_up_corner /* 77DC8 800DE918 E7A00018 */ swc1 $f0, 0x18($sp) /* 77DCC 800DE91C 04410017 */ bgez $v0, .L800DE97C /* 77DD0 800DE920 0260202D */ daddu $a0, $s3, $zero /* 77DD4 800DE924 0240282D */ daddu $a1, $s2, $zero /* 77DD8 800DE928 461AB080 */ add.s $f2, $f22, $f26 /* 77DDC 800DE92C 0220302D */ daddu $a2, $s1, $zero /* 77DE0 800DE930 0200382D */ daddu $a3, $s0, $zero /* 77DE4 800DE934 461CA000 */ add.s $f0, $f20, $f28 /* 77DE8 800DE938 E7B80014 */ swc1 $f24, 0x14($sp) /* 77DEC 800DE93C E7A20010 */ swc1 $f2, 0x10($sp) /* 77DF0 800DE940 0C037A82 */ jal player_raycast_up_corner /* 77DF4 800DE944 E7A00018 */ swc1 $f0, 0x18($sp) /* 77DF8 800DE948 0441000C */ bgez $v0, .L800DE97C /* 77DFC 800DE94C 0260202D */ daddu $a0, $s3, $zero /* 77E00 800DE950 0240282D */ daddu $a1, $s2, $zero /* 77E04 800DE954 461AB081 */ sub.s $f2, $f22, $f26 /* 77E08 800DE958 0220302D */ daddu $a2, $s1, $zero /* 77E0C 800DE95C 0200382D */ daddu $a3, $s0, $zero /* 77E10 800DE960 461CA001 */ sub.s $f0, $f20, $f28 /* 77E14 800DE964 E7B80014 */ swc1 $f24, 0x14($sp) /* 77E18 800DE968 E7A20010 */ swc1 $f2, 0x10($sp) /* 77E1C 800DE96C 0C037A82 */ jal player_raycast_up_corner /* 77E20 800DE970 E7A00018 */ swc1 $f0, 0x18($sp) /* 77E24 800DE974 0440000A */ bltz $v0, .L800DE9A0 /* 77E28 800DE978 00000000 */ nop .L800DE97C: /* 77E2C 800DE97C C7A00010 */ lwc1 $f0, 0x10($sp) /* 77E30 800DE980 E6C00000 */ swc1 $f0, 0x0($s6) /* 77E34 800DE984 C7A00014 */ lwc1 $f0, 0x14($sp) /* 77E38 800DE988 E6E00000 */ swc1 $f0, 0x0($s7) /* 77E3C 800DE98C C7A00018 */ lwc1 $f0, 0x18($sp) /* 77E40 800DE990 E7C00000 */ swc1 $f0, 0x0($fp) /* 77E44 800DE994 C7A0001C */ lwc1 $f0, 0x1C($sp) /* 77E48 800DE998 0040A02D */ daddu $s4, $v0, $zero /* 77E4C 800DE99C E6A00000 */ swc1 $f0, 0x0($s5) .L800DE9A0: /* 77E50 800DE9A0 06810008 */ bgez $s4, .L800DE9C4 /* 77E54 800DE9A4 0280102D */ daddu $v0, $s4, $zero /* 77E58 800DE9A8 C7A00010 */ lwc1 $f0, 0x10($sp) /* 77E5C 800DE9AC E6C00000 */ swc1 $f0, 0x0($s6) /* 77E60 800DE9B0 C7A00014 */ lwc1 $f0, 0x14($sp) /* 77E64 800DE9B4 E6E00000 */ swc1 $f0, 0x0($s7) /* 77E68 800DE9B8 C7A00018 */ lwc1 $f0, 0x18($sp) /* 77E6C 800DE9BC E7C00000 */ swc1 $f0, 0x0($fp) /* 77E70 800DE9C0 AEA00000 */ sw $zero, 0x0($s5) .L800DE9C4: /* 77E74 800DE9C4 8FBF0044 */ lw $ra, 0x44($sp) /* 77E78 800DE9C8 8FBE0040 */ lw $fp, 0x40($sp) /* 77E7C 800DE9CC 8FB7003C */ lw $s7, 0x3C($sp) /* 77E80 800DE9D0 8FB60038 */ lw $s6, 0x38($sp) /* 77E84 800DE9D4 8FB50034 */ lw $s5, 0x34($sp) /* 77E88 800DE9D8 8FB40030 */ lw $s4, 0x30($sp) /* 77E8C 800DE9DC 8FB3002C */ lw $s3, 0x2C($sp) /* 77E90 800DE9E0 8FB20028 */ lw $s2, 0x28($sp) /* 77E94 800DE9E4 8FB10024 */ lw $s1, 0x24($sp) /* 77E98 800DE9E8 8FB00020 */ lw $s0, 0x20($sp) /* 77E9C 800DE9EC D7BC0068 */ ldc1 $f28, 0x68($sp) /* 77EA0 800DE9F0 D7BA0060 */ ldc1 $f26, 0x60($sp) /* 77EA4 800DE9F4 D7B80058 */ ldc1 $f24, 0x58($sp) /* 77EA8 800DE9F8 D7B60050 */ ldc1 $f22, 0x50($sp) /* 77EAC 800DE9FC D7B40048 */ ldc1 $f20, 0x48($sp) /* 77EB0 800DEA00 03E00008 */ jr $ra /* 77EB4 800DEA04 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw) { f32 startX; f32 startY; f32 startZ; f32 depth; f32 theta; f32 deltaZ; f32 deltaX; f32 x,y,z; s32 ret; s32 hitID; f32 radius; radius = player->colliderDiameter * 0.3f; theta = DEG_TO_RAD(yaw); deltaX = radius * sin_rad(theta); deltaZ = -radius * cos_rad(theta); x = *posX; y = *posY; z = *posZ; depth = *hitDepth; startX = x + deltaX; startY = y; startZ = z + deltaZ; ret = NO_COLLIDER; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); if (hitID < 0) { startX = x - deltaX; startY = y; startZ = z - deltaZ; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } if (hitID < 0) { startX = x + deltaZ; startY = y; startZ = z + deltaX; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } if (hitID < 0) { startX = x - deltaZ; startY = y; startZ = z - deltaX; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } if (hitID >= 0) { *posX = startX; *posY = startY; *posZ = startZ; *hitDepth = depth; ret = hitID; } if (ret < 0) { *posX = startX; *posY = startY; *posZ = startZ; *hitDepth = 0; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel energy_shockwave_update /* 374FA0 E0072150 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 374FA4 E0072154 AFBF002C */ sw $ra, 0x2C($sp) /* 374FA8 E0072158 AFB20028 */ sw $s2, 0x28($sp) /* 374FAC E007215C AFB10024 */ sw $s1, 0x24($sp) /* 374FB0 E0072160 AFB00020 */ sw $s0, 0x20($sp) /* 374FB4 E0072164 F7B40030 */ sdc1 $f20, 0x30($sp) /* 374FB8 E0072168 8C90000C */ lw $s0, 0xC($a0) /* 374FBC E007216C 8E020028 */ lw $v0, 0x28($s0) /* 374FC0 E0072170 2442FFFF */ addiu $v0, $v0, -0x1 /* 374FC4 E0072174 AE020028 */ sw $v0, 0x28($s0) /* 374FC8 E0072178 8E02002C */ lw $v0, 0x2C($s0) /* 374FCC E007217C 8E120028 */ lw $s2, 0x28($s0) /* 374FD0 E0072180 24510001 */ addiu $s1, $v0, 0x1 /* 374FD4 E0072184 06410005 */ bgez $s2, .LE007219C /* 374FD8 E0072188 AE11002C */ sw $s1, 0x2C($s0) /* 374FDC E007218C 0C080128 */ jal shim_remove_effect /* 374FE0 E0072190 00000000 */ nop /* 374FE4 E0072194 0801C8DC */ j .LE0072370 /* 374FE8 E0072198 00000000 */ nop .LE007219C: /* 374FEC E007219C 32220001 */ andi $v0, $s1, 0x1 /* 374FF0 E00721A0 1040001E */ beqz $v0, .LE007221C /* 374FF4 E00721A4 00000000 */ nop /* 374FF8 E00721A8 24040168 */ addiu $a0, $zero, 0x168 /* 374FFC E00721AC 0C080011 */ jal func_E0200044 /* 375000 E00721B0 0220282D */ daddu $a1, $s1, $zero /* 375004 E00721B4 4482A000 */ mtc1 $v0, $f20 /* 375008 E00721B8 00000000 */ nop /* 37500C E00721BC 4680A520 */ cvt.s.w $f20, $f20 /* 375010 E00721C0 0C080140 */ jal shim_sin_deg /* 375014 E00721C4 4600A306 */ mov.s $f12, $f20 /* 375018 E00721C8 0C080144 */ jal shim_cos_deg /* 37501C E00721CC 4600A306 */ mov.s $f12, $f20 /* 375020 E00721D0 0C080150 */ jal shim_load_effect /* 375024 E00721D4 2404003A */ addiu $a0, $zero, 0x3A /* 375028 E00721D8 001110C0 */ sll $v0, $s1, 3 /* 37502C E00721DC 44820000 */ mtc1 $v0, $f0 /* 375030 E00721E0 00000000 */ nop /* 375034 E00721E4 46800020 */ cvt.s.w $f0, $f0 /* 375038 E00721E8 E7A00010 */ swc1 $f0, 0x10($sp) /* 37503C E00721EC 3C014120 */ lui $at, (0x41200000 >> 16) /* 375040 E00721F0 44810000 */ mtc1 $at, $f0 /* 375044 E00721F4 2402000A */ addiu $v0, $zero, 0xA /* 375048 E00721F8 AFA20018 */ sw $v0, 0x18($sp) /* 37504C E00721FC 24020014 */ addiu $v0, $zero, 0x14 /* 375050 E0072200 AFA2001C */ sw $v0, 0x1C($sp) /* 375054 E0072204 E7A00014 */ swc1 $f0, 0x14($sp) /* 375058 E0072208 8E050004 */ lw $a1, 0x4($s0) /* 37505C E007220C 8E060008 */ lw $a2, 0x8($s0) /* 375060 E0072210 8E07000C */ lw $a3, 0xC($s0) /* 375064 E0072214 0C01D000 */ jal shimmer_wave_main /* 375068 E0072218 0000202D */ daddu $a0, $zero, $zero .LE007221C: /* 37506C E007221C C600001C */ lwc1 $f0, 0x1C($s0) /* 375070 E0072220 C6020020 */ lwc1 $f2, 0x20($s0) /* 375074 E0072224 46020000 */ add.s $f0, $f0, $f2 /* 375078 E0072228 2A42000A */ slti $v0, $s2, 0xA /* 37507C E007222C 10400006 */ beqz $v0, .LE0072248 /* 375080 E0072230 E600001C */ swc1 $f0, 0x1C($s0) /* 375084 E0072234 00121040 */ sll $v0, $s2, 1 /* 375088 E0072238 00521021 */ addu $v0, $v0, $s2 /* 37508C E007223C 000210C0 */ sll $v0, $v0, 3 /* 375090 E0072240 00521021 */ addu $v0, $v0, $s2 /* 375094 E0072244 AE020024 */ sw $v0, 0x24($s0) .LE0072248: /* 375098 E0072248 C6020030 */ lwc1 $f2, 0x30($s0) /* 37509C E007224C C6000040 */ lwc1 $f0, 0x40($s0) /* 3750A0 E0072250 C6060034 */ lwc1 $f6, 0x34($s0) /* 3750A4 E0072254 46001080 */ add.s $f2, $f2, $f0 /* 3750A8 E0072258 C6000044 */ lwc1 $f0, 0x44($s0) /* 3750AC E007225C C6040038 */ lwc1 $f4, 0x38($s0) /* 3750B0 E0072260 46003180 */ add.s $f6, $f6, $f0 /* 3750B4 E0072264 C6000048 */ lwc1 $f0, 0x48($s0) /* 3750B8 E0072268 46002100 */ add.s $f4, $f4, $f0 /* 3750BC E007226C C600003C */ lwc1 $f0, 0x3C($s0) /* 3750C0 E0072270 E6020030 */ swc1 $f2, 0x30($s0) /* 3750C4 E0072274 C602004C */ lwc1 $f2, 0x4C($s0) /* 3750C8 E0072278 3C014300 */ lui $at, (0x43000000 >> 16) /* 3750CC E007227C 44814000 */ mtc1 $at, $f8 /* 3750D0 E0072280 46020000 */ add.s $f0, $f0, $f2 /* 3750D4 E0072284 C60A0030 */ lwc1 $f10, 0x30($s0) /* 3750D8 E0072288 460A403C */ c.lt.s $f8, $f10 /* 3750DC E007228C E6060034 */ swc1 $f6, 0x34($s0) /* 3750E0 E0072290 E6040038 */ swc1 $f4, 0x38($s0) /* 3750E4 E0072294 45000003 */ bc1f .LE00722A4 /* 3750E8 E0072298 E600003C */ swc1 $f0, 0x3C($s0) /* 3750EC E007229C 46085001 */ sub.s $f0, $f10, $f8 /* 3750F0 E00722A0 E6000030 */ swc1 $f0, 0x30($s0) .LE00722A4: /* 3750F4 E00722A4 C6000034 */ lwc1 $f0, 0x34($s0) /* 3750F8 E00722A8 4600403C */ c.lt.s $f8, $f0 /* 3750FC E00722AC 00000000 */ nop /* 375100 E00722B0 45000003 */ bc1f .LE00722C0 /* 375104 E00722B4 00000000 */ nop /* 375108 E00722B8 46080001 */ sub.s $f0, $f0, $f8 /* 37510C E00722BC E6000034 */ swc1 $f0, 0x34($s0) .LE00722C0: /* 375110 E00722C0 C6000038 */ lwc1 $f0, 0x38($s0) /* 375114 E00722C4 4600403C */ c.lt.s $f8, $f0 /* 375118 E00722C8 00000000 */ nop /* 37511C E00722CC 45000003 */ bc1f .LE00722DC /* 375120 E00722D0 00000000 */ nop /* 375124 E00722D4 46080001 */ sub.s $f0, $f0, $f8 /* 375128 E00722D8 E6000038 */ swc1 $f0, 0x38($s0) .LE00722DC: /* 37512C E00722DC C600003C */ lwc1 $f0, 0x3C($s0) /* 375130 E00722E0 4600403C */ c.lt.s $f8, $f0 /* 375134 E00722E4 00000000 */ nop /* 375138 E00722E8 45000003 */ bc1f .LE00722F8 /* 37513C E00722EC 00000000 */ nop /* 375140 E00722F0 46080001 */ sub.s $f0, $f0, $f8 /* 375144 E00722F4 E600003C */ swc1 $f0, 0x3C($s0) .LE00722F8: /* 375148 E00722F8 C6000030 */ lwc1 $f0, 0x30($s0) /* 37514C E00722FC 44801000 */ mtc1 $zero, $f2 /* 375150 E0072300 00000000 */ nop /* 375154 E0072304 4602003C */ c.lt.s $f0, $f2 /* 375158 E0072308 00000000 */ nop /* 37515C E007230C 45000003 */ bc1f .LE007231C /* 375160 E0072310 00000000 */ nop /* 375164 E0072314 46080000 */ add.s $f0, $f0, $f8 /* 375168 E0072318 E6000030 */ swc1 $f0, 0x30($s0) .LE007231C: /* 37516C E007231C C6000034 */ lwc1 $f0, 0x34($s0) /* 375170 E0072320 4602003C */ c.lt.s $f0, $f2 /* 375174 E0072324 00000000 */ nop /* 375178 E0072328 45000003 */ bc1f .LE0072338 /* 37517C E007232C 00000000 */ nop /* 375180 E0072330 46080000 */ add.s $f0, $f0, $f8 /* 375184 E0072334 E6000034 */ swc1 $f0, 0x34($s0) .LE0072338: /* 375188 E0072338 C6000038 */ lwc1 $f0, 0x38($s0) /* 37518C E007233C 4602003C */ c.lt.s $f0, $f2 /* 375190 E0072340 00000000 */ nop /* 375194 E0072344 45000003 */ bc1f .LE0072354 /* 375198 E0072348 00000000 */ nop /* 37519C E007234C 46080000 */ add.s $f0, $f0, $f8 /* 3751A0 E0072350 E6000038 */ swc1 $f0, 0x38($s0) .LE0072354: /* 3751A4 E0072354 C600003C */ lwc1 $f0, 0x3C($s0) /* 3751A8 E0072358 4602003C */ c.lt.s $f0, $f2 /* 3751AC E007235C 00000000 */ nop /* 3751B0 E0072360 45000003 */ bc1f .LE0072370 /* 3751B4 E0072364 00000000 */ nop /* 3751B8 E0072368 46080000 */ add.s $f0, $f0, $f8 /* 3751BC E007236C E600003C */ swc1 $f0, 0x3C($s0) .LE0072370: /* 3751C0 E0072370 8FBF002C */ lw $ra, 0x2C($sp) /* 3751C4 E0072374 8FB20028 */ lw $s2, 0x28($sp) /* 3751C8 E0072378 8FB10024 */ lw $s1, 0x24($sp) /* 3751CC E007237C 8FB00020 */ lw $s0, 0x20($sp) /* 3751D0 E0072380 D7B40030 */ ldc1 $f20, 0x30($sp) /* 3751D4 E0072384 03E00008 */ jr $ra /* 3751D8 E0072388 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void energy_shockwave_update(EffectInstance* effect) { EnergyShockwaveFXData* data = effect->data.energyShockwave; s32 unk_28; s32 unk_2C; f32 angle; data->unk_28--; data->unk_2C++; unk_28 = data->unk_28; unk_2C = data->unk_2C; if (unk_28 < 0) { shim_remove_effect(effect); return; } if (unk_2C % 2) { angle = func_E0200044(360, unk_2C); shim_sin_deg(angle); shim_cos_deg(angle); shim_load_effect(EFFECT_SHIMMER_WAVE); shimmer_wave_main(0, data->unk_04, data->unk_08, data->unk_0C, unk_2C * 8, 10.0f, 10, 20); } data->unk_1C += data->unk_20; if (unk_28 < 10) { data->unk_24 = unk_28 * 25; } data->unk_30 += data->unk_40; data->unk_34 += data->unk_44; data->unk_38 += data->unk_48; data->unk_3C += data->unk_4C; if (data->unk_30 > 128.0f) { data->unk_30 -= 128.0f; } if (data->unk_34 > 128.0f) { data->unk_34 -= 128.0f; } if (data->unk_38 > 128.0f) { data->unk_38 -= 128.0f; } if (data->unk_3C > 128.0f) { data->unk_3C -= 128.0f; } if (data->unk_30 < 0.0f) { data->unk_30 += 128.0f; } if (data->unk_34 < 0.0f) { data->unk_34 += 128.0f; } if (data->unk_38 < 0.0f) { data->unk_38 += 128.0f; } if (data->unk_3C < 0.0f) { data->unk_3C += 128.0f; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E011A48C /* 4046AC E011A48C 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 4046B0 E011A490 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 4046B4 E011A494 44872000 */ mtc1 $a3, $f4 /* 4046B8 E011A498 8C670000 */ lw $a3, 0x0($v1) /* 4046BC E011A49C 24E20008 */ addiu $v0, $a3, 0x8 /* 4046C0 E011A4A0 AC620000 */ sw $v0, 0x0($v1) /* 4046C4 E011A4A4 24820020 */ addiu $v0, $a0, 0x20 /* 4046C8 E011A4A8 00021480 */ sll $v0, $v0, 18 /* 4046CC E011A4AC 00021403 */ sra $v0, $v0, 16 /* 4046D0 E011A4B0 18400005 */ blez $v0, .LE011A4C8 /* 4046D4 E011A4B4 30420FFF */ andi $v0, $v0, 0xFFF /* 4046D8 E011A4B8 00021300 */ sll $v0, $v0, 12 /* 4046DC E011A4BC 3C03E400 */ lui $v1, (0xE4000000 >> 16) /* 4046E0 E011A4C0 08046933 */ j .LE011A4CC /* 4046E4 E011A4C4 00431825 */ or $v1, $v0, $v1 .LE011A4C8: /* 4046E8 E011A4C8 3C03E400 */ lui $v1, (0xE4000000 >> 16) .LE011A4CC: /* 4046EC E011A4CC 24A20020 */ addiu $v0, $a1, 0x20 /* 4046F0 E011A4D0 00021480 */ sll $v0, $v0, 18 /* 4046F4 E011A4D4 00021403 */ sra $v0, $v0, 16 /* 4046F8 E011A4D8 18400004 */ blez $v0, .LE011A4EC /* 4046FC E011A4DC ACE30000 */ sw $v1, 0x0($a3) /* 404700 E011A4E0 30420FFF */ andi $v0, $v0, 0xFFF /* 404704 E011A4E4 00621025 */ or $v0, $v1, $v0 /* 404708 E011A4E8 ACE20000 */ sw $v0, 0x0($a3) .LE011A4EC: /* 40470C E011A4EC 30C20007 */ andi $v0, $a2, 0x7 /* 404710 E011A4F0 00021E00 */ sll $v1, $v0, 24 /* 404714 E011A4F4 00041480 */ sll $v0, $a0, 18 /* 404718 E011A4F8 00023403 */ sra $a2, $v0, 16 /* 40471C E011A4FC 18C00003 */ blez $a2, .LE011A50C /* 404720 E011A500 30C20FFF */ andi $v0, $a2, 0xFFF /* 404724 E011A504 00021300 */ sll $v0, $v0, 12 /* 404728 E011A508 00621825 */ or $v1, $v1, $v0 .LE011A50C: /* 40472C E011A50C 00051480 */ sll $v0, $a1, 18 /* 404730 E011A510 00021403 */ sra $v0, $v0, 16 /* 404734 E011A514 18400004 */ blez $v0, .LE011A528 /* 404738 E011A518 ACE30004 */ sw $v1, 0x4($a3) /* 40473C E011A51C 30420FFF */ andi $v0, $v0, 0xFFF /* 404740 E011A520 00621025 */ or $v0, $v1, $v0 /* 404744 E011A524 ACE20004 */ sw $v0, 0x4($a3) .LE011A528: /* 404748 E011A528 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 40474C E011A52C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 404750 E011A530 8C620000 */ lw $v0, 0x0($v1) /* 404754 E011A534 0040202D */ daddu $a0, $v0, $zero /* 404758 E011A538 24420008 */ addiu $v0, $v0, 0x8 /* 40475C E011A53C AC620000 */ sw $v0, 0x0($v1) /* 404760 E011A540 3C02E100 */ lui $v0, (0xE1000000 >> 16) /* 404764 E011A544 AC820000 */ sw $v0, 0x0($a0) /* 404768 E011A548 04C10015 */ bgez $a2, .LE011A5A0 /* 40476C E011A54C 24840004 */ addiu $a0, $a0, 0x4 /* 404770 E011A550 4600218D */ trunc.w.s $f6, $f4 /* 404774 E011A554 44023000 */ mfc1 $v0, $f6 /* 404778 E011A558 00000000 */ nop /* 40477C E011A55C 00021400 */ sll $v0, $v0, 16 /* 404780 E011A560 00021403 */ sra $v0, $v0, 16 /* 404784 E011A564 04410007 */ bgez $v0, .LE011A584 /* 404788 E011A568 00C20018 */ mult $a2, $v0 /* 40478C E011A56C 00004012 */ mflo $t0 /* 404790 E011A570 000811C3 */ sra $v0, $t0, 7 /* 404794 E011A574 04410008 */ bgez $v0, .LE011A598 /* 404798 E011A578 00021023 */ negu $v0, $v0 /* 40479C E011A57C 08046965 */ j .LE011A594 /* 4047A0 E011A580 0000102D */ daddu $v0, $zero, $zero .LE011A584: /* 4047A4 E011A584 00004012 */ mflo $t0 /* 4047A8 E011A588 000811C3 */ sra $v0, $t0, 7 /* 4047AC E011A58C 5C400001 */ bgtzl $v0, .LE011A594 /* 4047B0 E011A590 0000102D */ daddu $v0, $zero, $zero .LE011A594: /* 4047B4 E011A594 00021023 */ negu $v0, $v0 .LE011A598: /* 4047B8 E011A598 08046969 */ j .LE011A5A4 /* 4047BC E011A59C 00023400 */ sll $a2, $v0, 16 .LE011A5A0: /* 4047C0 E011A5A0 0000302D */ daddu $a2, $zero, $zero .LE011A5A4: /* 4047C4 E011A5A4 00051080 */ sll $v0, $a1, 2 /* 4047C8 E011A5A8 0441001E */ bgez $v0, .LE011A624 /* 4047CC E011A5AC 34C20400 */ ori $v0, $a2, 0x400 /* 4047D0 E011A5B0 46002007 */ neg.s $f0, $f4 /* 4047D4 E011A5B4 4600018D */ trunc.w.s $f6, $f0 /* 4047D8 E011A5B8 44023000 */ mfc1 $v0, $f6 /* 4047DC E011A5BC 00000000 */ nop /* 4047E0 E011A5C0 00021400 */ sll $v0, $v0, 16 /* 4047E4 E011A5C4 00021C03 */ sra $v1, $v0, 16 /* 4047E8 E011A5C8 0461000C */ bgez $v1, .LE011A5FC /* 4047EC E011A5CC 00051480 */ sll $v0, $a1, 18 /* 4047F0 E011A5D0 00021403 */ sra $v0, $v0, 16 /* 4047F4 E011A5D4 00430018 */ mult $v0, $v1 /* 4047F8 E011A5D8 00004012 */ mflo $t0 /* 4047FC E011A5DC 000819C3 */ sra $v1, $t0, 7 /* 404800 E011A5E0 04620001 */ bltzl $v1, .LE011A5E8 /* 404804 E011A5E4 0000182D */ daddu $v1, $zero, $zero .LE011A5E8: /* 404808 E011A5E8 24020400 */ addiu $v0, $zero, 0x400 /* 40480C E011A5EC 00431023 */ subu $v0, $v0, $v1 /* 404810 E011A5F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 404814 E011A5F4 08046989 */ j .LE011A624 /* 404818 E011A5F8 00C21025 */ or $v0, $a2, $v0 .LE011A5FC: /* 40481C E011A5FC 00021403 */ sra $v0, $v0, 16 /* 404820 E011A600 00430018 */ mult $v0, $v1 /* 404824 E011A604 00004012 */ mflo $t0 /* 404828 E011A608 000819C3 */ sra $v1, $t0, 7 /* 40482C E011A60C 5C600001 */ bgtzl $v1, .LE011A614 /* 404830 E011A610 0000182D */ daddu $v1, $zero, $zero .LE011A614: /* 404834 E011A614 24020400 */ addiu $v0, $zero, 0x400 /* 404838 E011A618 00431023 */ subu $v0, $v0, $v1 /* 40483C E011A61C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 404840 E011A620 00C21025 */ or $v0, $a2, $v0 .LE011A624: /* 404844 E011A624 AC820000 */ sw $v0, 0x0($a0) /* 404848 E011A628 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 40484C E011A62C 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 404850 E011A630 8C620000 */ lw $v0, 0x0($v1) /* 404854 E011A634 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 404858 E011A638 44810000 */ mtc1 $at, $f0 /* 40485C E011A63C 0040202D */ daddu $a0, $v0, $zero /* 404860 E011A640 24420008 */ addiu $v0, $v0, 0x8 /* 404864 E011A644 AC620000 */ sw $v0, 0x0($v1) /* 404868 E011A648 3C02F100 */ lui $v0, (0xF1000000 >> 16) /* 40486C E011A64C AC820000 */ sw $v0, 0x0($a0) /* 404870 E011A650 4604003E */ c.le.s $f0, $f4 /* 404874 E011A654 00000000 */ nop /* 404878 E011A658 45010005 */ bc1t .LE011A670 /* 40487C E011A65C 24840004 */ addiu $a0, $a0, 0x4 /* 404880 E011A660 4600218D */ trunc.w.s $f6, $f4 /* 404884 E011A664 44033000 */ mfc1 $v1, $f6 /* 404888 E011A668 080469A2 */ j .LE011A688 /* 40488C E011A66C 00000000 */ nop .LE011A670: /* 404890 E011A670 46002001 */ sub.s $f0, $f4, $f0 /* 404894 E011A674 3C028000 */ lui $v0, (0x80000000 >> 16) /* 404898 E011A678 4600018D */ trunc.w.s $f6, $f0 /* 40489C E011A67C 44033000 */ mfc1 $v1, $f6 /* 4048A0 E011A680 00000000 */ nop /* 4048A4 E011A684 00621825 */ or $v1, $v1, $v0 .LE011A688: /* 4048A8 E011A688 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 4048AC E011A68C 44811000 */ mtc1 $at, $f2 /* 4048B0 E011A690 46002007 */ neg.s $f0, $f4 /* 4048B4 E011A694 4600103E */ c.le.s $f2, $f0 /* 4048B8 E011A698 00000000 */ nop /* 4048BC E011A69C 45010005 */ bc1t .LE011A6B4 /* 4048C0 E011A6A0 00033400 */ sll $a2, $v1, 16 /* 4048C4 E011A6A4 4600018D */ trunc.w.s $f6, $f0 /* 4048C8 E011A6A8 44073000 */ mfc1 $a3, $f6 /* 4048CC E011A6AC 080469B3 */ j .LE011A6CC /* 4048D0 E011A6B0 00000000 */ nop .LE011A6B4: /* 4048D4 E011A6B4 46020001 */ sub.s $f0, $f0, $f2 /* 4048D8 E011A6B8 3C028000 */ lui $v0, (0x80000000 >> 16) /* 4048DC E011A6BC 4600018D */ trunc.w.s $f6, $f0 /* 4048E0 E011A6C0 44073000 */ mfc1 $a3, $f6 /* 4048E4 E011A6C4 00000000 */ nop /* 4048E8 E011A6C8 00E23825 */ or $a3, $a3, $v0 .LE011A6CC: /* 4048EC E011A6CC 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 4048F0 E011A6D0 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 4048F4 E011A6D4 30E2FFFF */ andi $v0, $a3, 0xFFFF /* 4048F8 E011A6D8 8CA30000 */ lw $v1, 0x0($a1) /* 4048FC E011A6DC 00C21025 */ or $v0, $a2, $v0 /* 404900 E011A6E0 AC820000 */ sw $v0, 0x0($a0) /* 404904 E011A6E4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 404908 E011A6E8 0060202D */ daddu $a0, $v1, $zero /* 40490C E011A6EC 24630008 */ addiu $v1, $v1, 0x8 /* 404910 E011A6F0 ACA30000 */ sw $v1, 0x0($a1) /* 404914 E011A6F4 AC820000 */ sw $v0, 0x0($a0) /* 404918 E011A6F8 03E00008 */ jr $ra /* 40491C E011A6FC AC800004 */ sw $zero, 0x4($a0) ### DECOMPILED C INSTRUCTIONS: void func_E011A48C(s32 posX, s32 posY, s32 tile, f32 scale) { gSPScisTextureRectangle(gMainGfxPos++, posX * 4, posY * 4, (posX + 32) * 4, (posY + 32) * 4, tile, 0, 1024, scale, -scale); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel __osContRamRead /* 455D0 8006A1D0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 455D4 8006A1D4 AFB40038 */ sw $s4, 0x38($sp) /* 455D8 8006A1D8 0080A021 */ addu $s4, $a0, $zero /* 455DC 8006A1DC AFB30034 */ sw $s3, 0x34($sp) /* 455E0 8006A1E0 00A09821 */ addu $s3, $a1, $zero /* 455E4 8006A1E4 AFB5003C */ sw $s5, 0x3C($sp) /* 455E8 8006A1E8 24150002 */ addiu $s5, $zero, 0x2 /* 455EC 8006A1EC AFB00028 */ sw $s0, 0x28($sp) /* 455F0 8006A1F0 00C08021 */ addu $s0, $a2, $zero /* 455F4 8006A1F4 AFBF004C */ sw $ra, 0x4C($sp) /* 455F8 8006A1F8 AFBE0048 */ sw $fp, 0x48($sp) /* 455FC 8006A1FC AFB70044 */ sw $s7, 0x44($sp) /* 45600 8006A200 AFB60040 */ sw $s6, 0x40($sp) /* 45604 8006A204 AFB20030 */ sw $s2, 0x30($sp) /* 45608 8006A208 AFB1002C */ sw $s1, 0x2C($sp) /* 4560C 8006A20C 0C019771 */ jal __osSiGetAccess /* 45610 8006A210 AFA70014 */ sw $a3, 0x14($sp) /* 45614 8006A214 24170002 */ addiu $s7, $zero, 0x2 /* 45618 8006A218 3216FFFF */ andi $s6, $s0, 0xFFFF /* 4561C 8006A21C 00108140 */ sll $s0, $s0, 5 /* 45620 8006A220 3C1E800E */ lui $fp, %hi(__osPfsPifRam) /* 45624 8006A224 27DEA000 */ addiu $fp, $fp, %lo(__osPfsPifRam) /* 45628 8006A228 AFB0001C */ sw $s0, 0x1C($sp) .L8006A22C: /* 4562C 8006A22C 3C02800A */ lui $v0, %hi(__osContLastCmd) /* 45630 8006A230 9042A61C */ lbu $v0, %lo(__osContLastCmd)($v0) /* 45634 8006A234 3C10800E */ lui $s0, %hi(__osPfsPifRam) /* 45638 8006A238 14570005 */ bne $v0, $s7, .L8006A250 /* 4563C 8006A23C 2610A000 */ addiu $s0, $s0, %lo(__osPfsPifRam) /* 45640 8006A240 3C028009 */ lui $v0, %hi(D_800958E0) /* 45644 8006A244 8C4258E0 */ lw $v0, %lo(D_800958E0)($v0) /* 45648 8006A248 50530019 */ beql $v0, $s3, .L8006A2B0 /* 4564C 8006A24C 02708021 */ addu $s0, $s3, $s0 .L8006A250: /* 45650 8006A250 3C01800A */ lui $at, %hi(__osContLastCmd) /* 45654 8006A254 A037A61C */ sb $s7, %lo(__osContLastCmd)($at) /* 45658 8006A258 3C018009 */ lui $at, %hi(D_800958E0) /* 4565C 8006A25C AC3358E0 */ sw $s3, %lo(D_800958E0)($at) /* 45660 8006A260 1A600006 */ blez $s3, .L8006A27C /* 45664 8006A264 00001821 */ addu $v1, $zero, $zero .L8006A268: /* 45668 8006A268 A2000000 */ sb $zero, 0x0($s0) /* 4566C 8006A26C 24630001 */ addiu $v1, $v1, 0x1 /* 45670 8006A270 0073102A */ slt $v0, $v1, $s3 /* 45674 8006A274 1440FFFC */ bnez $v0, .L8006A268 /* 45678 8006A278 26100001 */ addiu $s0, $s0, 0x1 .L8006A27C: /* 4567C 8006A27C 24020001 */ addiu $v0, $zero, 0x1 /* 45680 8006A280 3C01800E */ lui $at, %hi(D_800DA03C) /* 45684 8006A284 AC22A03C */ sw $v0, %lo(D_800DA03C)($at) /* 45688 8006A288 240800FF */ addiu $t0, $zero, 0xFF /* 4568C 8006A28C 24020003 */ addiu $v0, $zero, 0x3 /* 45690 8006A290 A2020001 */ sb $v0, 0x1($s0) /* 45694 8006A294 24020021 */ addiu $v0, $zero, 0x21 /* 45698 8006A298 A2080000 */ sb $t0, 0x0($s0) /* 4569C 8006A29C A2020002 */ sb $v0, 0x2($s0) /* 456A0 8006A2A0 240200FE */ addiu $v0, $zero, 0xFE /* 456A4 8006A2A4 A2170003 */ sb $s7, 0x3($s0) /* 456A8 8006A2A8 A2080026 */ sb $t0, 0x26($s0) /* 456AC 8006A2AC A2020027 */ sb $v0, 0x27($s0) .L8006A2B0: /* 456B0 8006A2B0 02C02021 */ addu $a0, $s6, $zero /* 456B4 8006A2B4 001610C2 */ srl $v0, $s6, 3 /* 456B8 8006A2B8 0C01B218 */ jal __osContAddressCrc /* 456BC 8006A2BC A2020004 */ sb $v0, 0x4($s0) /* 456C0 8006A2C0 8FA8001C */ lw $t0, 0x1C($sp) /* 456C4 8006A2C4 24040001 */ addiu $a0, $zero, 0x1 /* 456C8 8006A2C8 03C02821 */ addu $a1, $fp, $zero /* 456CC 8006A2CC 00481025 */ or $v0, $v0, $t0 /* 456D0 8006A2D0 0C019730 */ jal __osSiRawStartDma /* 456D4 8006A2D4 A2020005 */ sb $v0, 0x5($s0) /* 456D8 8006A2D8 02802021 */ addu $a0, $s4, $zero /* 456DC 8006A2DC 00002821 */ addu $a1, $zero, $zero /* 456E0 8006A2E0 0C0195BC */ jal osRecvMesg /* 456E4 8006A2E4 24060001 */ addiu $a2, $zero, 0x1 /* 456E8 8006A2E8 00002021 */ addu $a0, $zero, $zero /* 456EC 8006A2EC 0C019730 */ jal __osSiRawStartDma /* 456F0 8006A2F0 03C02821 */ addu $a1, $fp, $zero /* 456F4 8006A2F4 02802021 */ addu $a0, $s4, $zero /* 456F8 8006A2F8 00002821 */ addu $a1, $zero, $zero /* 456FC 8006A2FC 0C0195BC */ jal osRecvMesg /* 45700 8006A300 24060001 */ addiu $a2, $zero, 0x1 /* 45704 8006A304 92020002 */ lbu $v0, 0x2($s0) /* 45708 8006A308 304200C0 */ andi $v0, $v0, 0xC0 /* 4570C 8006A30C 00028902 */ srl $s1, $v0, 4 /* 45710 8006A310 56200015 */ bnel $s1, $zero, .L8006A368 /* 45714 8006A314 24110001 */ addiu $s1, $zero, 0x1 /* 45718 8006A318 26120006 */ addiu $s2, $s0, 0x6 /* 4571C 8006A31C 0C01B233 */ jal __osContDataCrc /* 45720 8006A320 02402021 */ addu $a0, $s2, $zero /* 45724 8006A324 92030026 */ lbu $v1, 0x26($s0) /* 45728 8006A328 304200FF */ andi $v0, $v0, 0xFF /* 4572C 8006A32C 10430008 */ beq $v0, $v1, .L8006A350 /* 45730 8006A330 02802021 */ addu $a0, $s4, $zero /* 45734 8006A334 0C01A530 */ jal __osPfsGetStatus /* 45738 8006A338 02602821 */ addu $a1, $s3, $zero /* 4573C 8006A33C 00408821 */ addu $s1, $v0, $zero /* 45740 8006A340 1620000E */ bnez $s1, .L8006A37C /* 45744 8006A344 00000000 */ nop /* 45748 8006A348 0801A8DA */ j .L8006A368 /* 4574C 8006A34C 24110004 */ addiu $s1, $zero, 0x4 .L8006A350: /* 45750 8006A350 8FA50014 */ lw $a1, 0x14($sp) /* 45754 8006A354 02402021 */ addu $a0, $s2, $zero /* 45758 8006A358 0C019194 */ jal bcopy /* 4575C 8006A35C 24060020 */ addiu $a2, $zero, 0x20 /* 45760 8006A360 0801A8DB */ j .L8006A36C /* 45764 8006A364 24020004 */ addiu $v0, $zero, 0x4 .L8006A368: /* 45768 8006A368 24020004 */ addiu $v0, $zero, 0x4 .L8006A36C: /* 4576C 8006A36C 16220003 */ bne $s1, $v0, .L8006A37C /* 45770 8006A370 02A01021 */ addu $v0, $s5, $zero /* 45774 8006A374 0441FFAD */ bgez $v0, .L8006A22C /* 45778 8006A378 26B5FFFF */ addiu $s5, $s5, -0x1 .L8006A37C: /* 4577C 8006A37C 0C01978C */ jal __osSiRelAccess /* 45780 8006A380 00000000 */ nop /* 45784 8006A384 02201021 */ addu $v0, $s1, $zero /* 45788 8006A388 8FBF004C */ lw $ra, 0x4C($sp) /* 4578C 8006A38C 8FBE0048 */ lw $fp, 0x48($sp) /* 45790 8006A390 8FB70044 */ lw $s7, 0x44($sp) /* 45794 8006A394 8FB60040 */ lw $s6, 0x40($sp) /* 45798 8006A398 8FB5003C */ lw $s5, 0x3C($sp) /* 4579C 8006A39C 8FB40038 */ lw $s4, 0x38($sp) /* 457A0 8006A3A0 8FB30034 */ lw $s3, 0x34($sp) /* 457A4 8006A3A4 8FB20030 */ lw $s2, 0x30($sp) /* 457A8 8006A3A8 8FB1002C */ lw $s1, 0x2C($sp) /* 457AC 8006A3AC 8FB00028 */ lw $s0, 0x28($sp) /* 457B0 8006A3B0 03E00008 */ jr $ra /* 457B4 8006A3B4 27BD0050 */ addiu $sp, $sp, 0x50 /* 457B8 8006A3B8 00000000 */ nop /* 457BC 8006A3BC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: s32 __osContRamRead(OSMesgQueue *mq, int channel, u16 address, u8 *buffer) { s32 ret; u8* ptr; s32 i; int retry = 2; __osSiGetAccess(); do { ptr = (u8 *)(&__osPfsPifRam); if (__osContLastCmd != CONT_CMD_READ_MEMPACK || __osPfsLastChannel != channel) { __osContLastCmd = CONT_CMD_READ_MEMPACK; __osPfsLastChannel = channel; for (i = 0; i < channel; i++) { *ptr++ = 0; } __osPfsPifRam.pifstatus = CONT_CMD_EXE; ((__OSContRamReadFormat *)ptr)->dummy = 0xff; ((__OSContRamReadFormat *)ptr)->txsize = 3; ((__OSContRamReadFormat *)ptr)->rxsize = 33; ((__OSContRamReadFormat *)ptr)->cmd = CONT_CMD_READ_MEMPACK; ((__OSContRamReadFormat *)ptr)->datacrc = 0xff; ptr[sizeof(__OSContRamReadFormat)] = CONT_CMD_END; } else { ptr += channel; } ((__OSContRamReadFormat *)ptr)->addrh = address >> 3; ((__OSContRamReadFormat *)ptr)->addrl = (address << 5) | __osContAddressCrc(address) ; __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); __osSiRawStartDma(OS_READ, &__osPfsPifRam); osRecvMesg(mq, NULL, OS_MESG_BLOCK); ret = (((__OSContRamReadFormat *)ptr)->rxsize & 0xC0) >> 4; if (ret == 0) { if (__osContDataCrc(((__OSContRamReadFormat *)ptr)->data) != ((__OSContRamReadFormat *)ptr)->datacrc) { ret = __osPfsGetStatus(mq, channel); if (ret != 0) { break; } else { ret = PFS_ERR_CONTRFAIL; } } else { bcopy(((__OSContRamReadFormat *)ptr)->data, buffer, BLOCKSIZE); } } else { ret = PFS_ERR_NOPACK; } } while (ret == PFS_ERR_CONTRFAIL && retry-- >= 0); __osSiRelAccess(); return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8004DE2C /* 2922C 8004DE2C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 29230 8004DE30 AFB3001C */ sw $s3, 0x1C($sp) /* 29234 8004DE34 0080982D */ daddu $s3, $a0, $zero /* 29238 8004DE38 AFB20018 */ sw $s2, 0x18($sp) /* 2923C 8004DE3C AFBF0024 */ sw $ra, 0x24($sp) /* 29240 8004DE40 AFB40020 */ sw $s4, 0x20($sp) /* 29244 8004DE44 AFB10014 */ sw $s1, 0x14($sp) /* 29248 8004DE48 AFB00010 */ sw $s0, 0x10($sp) /* 2924C 8004DE4C 8E740000 */ lw $s4, 0x0($s3) /* 29250 8004DE50 8E700010 */ lw $s0, 0x10($s3) /* 29254 8004DE54 12800055 */ beqz $s4, .L8004DFAC /* 29258 8004DE58 0000902D */ daddu $s2, $zero, $zero /* 2925C 8004DE5C 8E620014 */ lw $v0, 0x14($s3) /* 29260 8004DE60 14400045 */ bnez $v0, .L8004DF78 /* 29264 8004DE64 00000000 */ nop /* 29268 8004DE68 0C014FD9 */ jal func_80053F64 /* 2926C 8004DE6C 0200202D */ daddu $a0, $s0, $zero /* 29270 8004DE70 0040882D */ daddu $s1, $v0, $zero /* 29274 8004DE74 1220003E */ beqz $s1, .L8004DF70 /* 29278 8004DE78 001010C0 */ sll $v0, $s0, 3 /* 2927C 8004DE7C 8E230000 */ lw $v1, 0x0($s1) /* 29280 8004DE80 00622021 */ addu $a0, $v1, $v0 /* 29284 8004DE84 90830070 */ lbu $v1, 0x70($a0) /* 29288 8004DE88 24020001 */ addiu $v0, $zero, 0x1 /* 2928C 8004DE8C 54620048 */ bnel $v1, $v0, .L8004DFB0 /* 29290 8004DE90 24120004 */ addiu $s2, $zero, 0x4 /* 29294 8004DE94 90840071 */ lbu $a0, 0x71($a0) /* 29298 8004DE98 0C015092 */ jal func_80054248 /* 2929C 8004DE9C 00000000 */ nop /* 292A0 8004DEA0 0040802D */ daddu $s0, $v0, $zero /* 292A4 8004DEA4 52000042 */ beql $s0, $zero, .L8004DFB0 /* 292A8 8004DEA8 24120006 */ addiu $s2, $zero, 0x6 /* 292AC 8004DEAC 0C0136CA */ jal func_8004DB28 /* 292B0 8004DEB0 0200202D */ daddu $a0, $s0, $zero /* 292B4 8004DEB4 1440003E */ bnez $v0, .L8004DFB0 /* 292B8 8004DEB8 24120007 */ addiu $s2, $zero, 0x7 /* 292BC 8004DEBC 8E240028 */ lw $a0, 0x28($s1) /* 292C0 8004DEC0 0C014F96 */ jal func_80053E58 /* 292C4 8004DEC4 8E250064 */ lw $a1, 0x64($s1) /* 292C8 8004DEC8 8E650004 */ lw $a1, 0x4($s3) /* 292CC 8004DECC 10A00008 */ beqz $a1, .L8004DEF0 /* 292D0 8004DED0 0040902D */ daddu $s2, $v0, $zero /* 292D4 8004DED4 28A22711 */ slti $v0, $a1, 0x2711 /* 292D8 8004DED8 14400003 */ bnez $v0, .L8004DEE8 /* 292DC 8004DEDC 28A200FA */ slti $v0, $a1, 0xFA /* 292E0 8004DEE0 080137BC */ j .L8004DEF0 /* 292E4 8004DEE4 24052710 */ addiu $a1, $zero, 0x2710 .L8004DEE8: /* 292E8 8004DEE8 54400001 */ bnel $v0, $zero, .L8004DEF0 /* 292EC 8004DEEC 240500FA */ addiu $a1, $zero, 0xFA .L8004DEF0: /* 292F0 8004DEF0 8E630008 */ lw $v1, 0x8($s3) /* 292F4 8004DEF4 28620080 */ slti $v0, $v1, 0x80 /* 292F8 8004DEF8 50400001 */ beql $v0, $zero, .L8004DF00 /* 292FC 8004DEFC 2403007F */ addiu $v1, $zero, 0x7F .L8004DF00: /* 29300 8004DF00 10600002 */ beqz $v1, .L8004DF0C /* 29304 8004DF04 00031200 */ sll $v0, $v1, 8 /* 29308 8004DF08 344300FF */ ori $v1, $v0, 0xFF .L8004DF0C: /* 2930C 8004DF0C 8E64000C */ lw $a0, 0xC($s3) /* 29310 8004DF10 28820080 */ slti $v0, $a0, 0x80 /* 29314 8004DF14 50400001 */ beql $v0, $zero, .L8004DF1C /* 29318 8004DF18 2404007F */ addiu $a0, $zero, 0x7F .L8004DF1C: /* 2931C 8004DF1C 10800003 */ beqz $a0, .L8004DF2C /* 29320 8004DF20 00041200 */ sll $v0, $a0, 8 /* 29324 8004DF24 080137CC */ j .L8004DF30 /* 29328 8004DF28 344400FF */ ori $a0, $v0, 0xFF .L8004DF2C: /* 2932C 8004DF2C 24047FFF */ addiu $a0, $zero, 0x7FFF .L8004DF30: /* 29330 8004DF30 8E020000 */ lw $v0, 0x0($s0) /* 29334 8004DF34 AC500074 */ sw $s0, 0x74($v0) /* 29338 8004DF38 8E020000 */ lw $v0, 0x0($s0) /* 2933C 8004DF3C AC510078 */ sw $s1, 0x78($v0) /* 29340 8004DF40 8E020000 */ lw $v0, 0x0($s0) /* 29344 8004DF44 AC54007C */ sw $s4, 0x7C($v0) /* 29348 8004DF48 8E020000 */ lw $v0, 0x0($s0) /* 2934C 8004DF4C AC450084 */ sw $a1, 0x84($v0) /* 29350 8004DF50 8E020000 */ lw $v0, 0x0($s0) /* 29354 8004DF54 AC430088 */ sw $v1, 0x88($v0) /* 29358 8004DF58 8E020000 */ lw $v0, 0x0($s0) /* 2935C 8004DF5C AC44008C */ sw $a0, 0x8C($v0) /* 29360 8004DF60 8E030000 */ lw $v1, 0x0($s0) glabel func_8004DF64 /* 29364 8004DF64 24020001 */ addiu $v0, $zero, 0x1 /* 29368 8004DF68 080137EC */ j .L8004DFB0 /* 2936C 8004DF6C AC620080 */ sw $v0, 0x80($v1) .L8004DF70: /* 29370 8004DF70 080137EC */ j .L8004DFB0 /* 29374 8004DF74 24120004 */ addiu $s2, $zero, 0x4 .L8004DF78: /* 29378 8004DF78 0C0135E5 */ jal au_bgm_get_player_with_song_name /* 2937C 8004DF7C 0280202D */ daddu $a0, $s4, $zero /* 29380 8004DF80 0040802D */ daddu $s0, $v0, $zero /* 29384 8004DF84 1200000B */ beqz $s0, .L8004DFB4 /* 29388 8004DF88 0240102D */ daddu $v0, $s2, $zero /* 2938C 8004DF8C 8E02001C */ lw $v0, 0x1C($s0) /* 29390 8004DF90 16820008 */ bne $s4, $v0, .L8004DFB4 /* 29394 8004DF94 0240102D */ daddu $v0, $s2, $zero /* 29398 8004DF98 92020220 */ lbu $v0, 0x220($s0) /* 2939C 8004DF9C 54400004 */ bnel $v0, $zero, .L8004DFB0 /* 293A0 8004DFA0 A2000220 */ sb $zero, 0x220($s0) /* 293A4 8004DFA4 080137ED */ j .L8004DFB4 /* 293A8 8004DFA8 0240102D */ daddu $v0, $s2, $zero .L8004DFAC: /* 293AC 8004DFAC 24120003 */ addiu $s2, $zero, 0x3 .L8004DFB0: /* 293B0 8004DFB0 0240102D */ daddu $v0, $s2, $zero .L8004DFB4: /* 293B4 8004DFB4 8FBF0024 */ lw $ra, 0x24($sp) /* 293B8 8004DFB8 8FB40020 */ lw $s4, 0x20($sp) /* 293BC 8004DFBC 8FB3001C */ lw $s3, 0x1C($sp) /* 293C0 8004DFC0 8FB20018 */ lw $s2, 0x18($sp) /* 293C4 8004DFC4 8FB10014 */ lw $s1, 0x14($sp) /* 293C8 8004DFC8 8FB00010 */ lw $s0, 0x10($sp) /* 293CC 8004DFCC 03E00008 */ jr $ra /* 293D0 8004DFD0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: AuResult func_8004DE2C(SongUpdateEvent* update) { AuResult status; BGMPlayer* playerA; BGMPlayer* playerB; s32 variation; s32 songName; s32 volume0; s32 volume1; s32 duration; songName = update->songName; variation = update->variation; status = AU_RESULT_OK; if (songName != 0) { if (update->unk14 == 0) { playerA = func_80053F64(variation); if (playerA != NULL && playerA->globals->unk_globals_6C[variation].unk_4 == 1) { playerB = func_80054248(playerA->globals->unk_globals_6C[variation].unk_5); if (playerB != NULL) { if (func_8004DB28(playerB) == 0) { status = func_80053E58(playerA->songID, playerA->bgmFile); duration = update->duration; if (duration != 0) { if (duration > SND_MAX_DURATION) { duration = SND_MAX_DURATION; } else if (duration < SND_MIN_DURATION) { duration = SND_MIN_DURATION; } } volume0 = update->startVolume; if (volume0 > BGM_MAX_VOLUME) { volume0 = BGM_MAX_VOLUME; } if (volume0 != 0) { volume0 = (volume0 << 8) | 0xFF; } volume1 = update->finalVolume; if (volume1 > BGM_MAX_VOLUME) { volume1 = BGM_MAX_VOLUME; } if (volume1 != 0) { volume1 = (volume1 << 8) | 0xFF; } else { volume1 = 0x7FFF; } playerB->globals->unk_74 = playerB; playerB->globals->unk_78 = playerA; playerB->globals->unkSongName = songName; playerB->globals->unkFadeTime = duration; playerB->globals->unkFadeStart = volume0; playerB->globals->unkFadeEnd = volume1; playerB->globals->unk_80 = 1; } else { status = AU_ERROR_7; } } else { status = AU_ERROR_6; } } else { status = AU_ERROR_INVALID_SONG_DURATION; } } else { playerB = au_bgm_get_player_with_song_name(songName); if (playerB != NULL) { if (songName == playerB->songName) { if (playerB->unk_220 != 0) { playerB->unk_220 = 0; } } } } } else { status = AU_ERROR_NULL_SONG_NAME; } return status; }
### RAW ASSEMBLY INSTRUCTIONS: glabel GetNextPathPos /* F9ED4 802D5524 27BDFFC8 */ addiu $sp, $sp, -0x38 /* F9ED8 802D5528 AFB1002C */ sw $s1, 0x2C($sp) /* F9EDC 802D552C 0080882D */ daddu $s1, $a0, $zero /* F9EE0 802D5530 AFBF0030 */ sw $ra, 0x30($sp) /* F9EE4 802D5534 AFB00028 */ sw $s0, 0x28($sp) /* F9EE8 802D5538 8E3000C0 */ lw $s0, 0xC0($s1) /* F9EEC 802D553C 8E030018 */ lw $v1, 0x18($s0) /* F9EF0 802D5540 24020001 */ addiu $v0, $zero, 0x1 /* F9EF4 802D5544 10620017 */ beq $v1, $v0, .L802D55A4 /* F9EF8 802D5548 28620002 */ slti $v0, $v1, 0x2 /* F9EFC 802D554C 10400005 */ beqz $v0, .L802D5564 /* F9F00 802D5550 24020004 */ addiu $v0, $zero, 0x4 /* F9F04 802D5554 10600009 */ beqz $v1, .L802D557C /* F9F08 802D5558 00000000 */ nop /* F9F0C 802D555C 080B55A3 */ j .L802D568C /* F9F10 802D5560 00000000 */ nop .L802D5564: /* F9F14 802D5564 10620022 */ beq $v1, $v0, .L802D55F0 /* F9F18 802D5568 2402000A */ addiu $v0, $zero, 0xA /* F9F1C 802D556C 10620032 */ beq $v1, $v0, .L802D5638 /* F9F20 802D5570 00000000 */ nop /* F9F24 802D5574 080B55A3 */ j .L802D568C /* F9F28 802D5578 00000000 */ nop .L802D557C: /* F9F2C 802D557C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F9F30 802D5580 44810000 */ mtc1 $at, $f0 /* F9F34 802D5584 C6020014 */ lwc1 $f2, 0x14($s0) /* F9F38 802D5588 468010A0 */ cvt.s.w $f2, $f2 /* F9F3C 802D558C 46020003 */ div.s $f0, $f0, $f2 /* F9F40 802D5590 C6020010 */ lwc1 $f2, 0x10($s0) /* F9F44 802D5594 468010A0 */ cvt.s.w $f2, $f2 /* F9F48 802D5598 46020302 */ mul.s $f12, $f0, $f2 /* F9F4C 802D559C 080B55A4 */ j .L802D5690 /* F9F50 802D55A0 00000000 */ nop .L802D55A4: /* F9F54 802D55A4 8E020014 */ lw $v0, 0x14($s0) /* F9F58 802D55A8 00420018 */ mult $v0, $v0 /* F9F5C 802D55AC 00001812 */ mflo $v1 /* F9F60 802D55B0 8E020010 */ lw $v0, 0x10($s0) /* F9F64 802D55B4 00000000 */ nop /* F9F68 802D55B8 00420018 */ mult $v0, $v0 /* F9F6C 802D55BC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F9F70 802D55C0 44810000 */ mtc1 $at, $f0 /* F9F74 802D55C4 44831000 */ mtc1 $v1, $f2 /* F9F78 802D55C8 00000000 */ nop /* F9F7C 802D55CC 468010A0 */ cvt.s.w $f2, $f2 /* F9F80 802D55D0 00001012 */ mflo $v0 /* F9F84 802D55D4 46020003 */ div.s $f0, $f0, $f2 /* F9F88 802D55D8 44821000 */ mtc1 $v0, $f2 /* F9F8C 802D55DC 00000000 */ nop /* F9F90 802D55E0 468010A0 */ cvt.s.w $f2, $f2 /* F9F94 802D55E4 46020302 */ mul.s $f12, $f0, $f2 /* F9F98 802D55E8 080B55A4 */ j .L802D5690 /* F9F9C 802D55EC 00000000 */ nop .L802D55F0: /* F9FA0 802D55F0 8E020014 */ lw $v0, 0x14($s0) /* F9FA4 802D55F4 00420018 */ mult $v0, $v0 /* F9FA8 802D55F8 8E030010 */ lw $v1, 0x10($s0) /* F9FAC 802D55FC 00431023 */ subu $v0, $v0, $v1 /* F9FB0 802D5600 44820000 */ mtc1 $v0, $f0 /* F9FB4 802D5604 00000000 */ nop /* F9FB8 802D5608 46800020 */ cvt.s.w $f0, $f0 /* F9FBC 802D560C 46000002 */ mul.s $f0, $f0, $f0 /* F9FC0 802D5610 00000000 */ nop /* F9FC4 802D5614 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F9FC8 802D5618 44812000 */ mtc1 $at, $f4 /* F9FCC 802D561C 00004012 */ mflo $t0 /* F9FD0 802D5620 44881000 */ mtc1 $t0, $f2 /* F9FD4 802D5624 00000000 */ nop /* F9FD8 802D5628 468010A0 */ cvt.s.w $f2, $f2 /* F9FDC 802D562C 46020003 */ div.s $f0, $f0, $f2 /* F9FE0 802D5630 080B55A4 */ j .L802D5690 /* F9FE4 802D5634 46002301 */ sub.s $f12, $f4, $f0 .L802D5638: /* F9FE8 802D5638 3C014049 */ lui $at, (0x40490FD8 >> 16) /* F9FEC 802D563C 34210FD8 */ ori $at, $at, (0x40490FD8 & 0xFFFF) /* F9FF0 802D5640 44816000 */ mtc1 $at, $f12 /* F9FF4 802D5644 C6000014 */ lwc1 $f0, 0x14($s0) /* F9FF8 802D5648 46800020 */ cvt.s.w $f0, $f0 /* F9FFC 802D564C 46006303 */ div.s $f12, $f12, $f0 /* FA000 802D5650 C6000010 */ lwc1 $f0, 0x10($s0) /* FA004 802D5654 46800020 */ cvt.s.w $f0, $f0 /* FA008 802D5658 46006302 */ mul.s $f12, $f12, $f0 /* FA00C 802D565C 0C00A874 */ jal cos_rad /* FA010 802D5660 00000000 */ nop /* FA014 802D5664 3C013F80 */ lui $at, (0x3F800000 >> 16) /* FA018 802D5668 44811000 */ mtc1 $at, $f2 /* FA01C 802D566C 00000000 */ nop /* FA020 802D5670 46001081 */ sub.s $f2, $f2, $f0 /* FA024 802D5674 3C013F00 */ lui $at, (0x3F000000 >> 16) /* FA028 802D5678 44810000 */ mtc1 $at, $f0 /* FA02C 802D567C 00000000 */ nop /* FA030 802D5680 46001302 */ mul.s $f12, $f2, $f0 /* FA034 802D5684 080B55A4 */ j .L802D5690 /* FA038 802D5688 00000000 */ nop .L802D568C: /* FA03C 802D568C 44806000 */ mtc1 $zero, $f12 .L802D5690: /* FA040 802D5690 8E020008 */ lw $v0, 0x8($s0) /* FA044 802D5694 AFA20010 */ sw $v0, 0x10($sp) /* FA048 802D5698 8E02000C */ lw $v0, 0xC($s0) /* FA04C 802D569C AFA20014 */ sw $v0, 0x14($sp) /* FA050 802D56A0 8E060000 */ lw $a2, 0x0($s0) /* FA054 802D56A4 8E070004 */ lw $a3, 0x4($s0) /* FA058 802D56A8 0C0B549C */ jal get_path_position /* FA05C 802D56AC 27A50018 */ addiu $a1, $sp, 0x18 /* FA060 802D56B0 C7A00018 */ lwc1 $f0, 0x18($sp) /* FA064 802D56B4 3C014480 */ lui $at, (0x44800000 >> 16) /* FA068 802D56B8 44812000 */ mtc1 $at, $f4 /* FA06C 802D56BC 00000000 */ nop /* FA070 802D56C0 46040002 */ mul.s $f0, $f0, $f4 /* FA074 802D56C4 00000000 */ nop /* FA078 802D56C8 3C01CD5B */ lui $at, (0xCD5B5858 >> 16) /* FA07C 802D56CC 34215858 */ ori $at, $at, (0xCD5B5858 & 0xFFFF) /* FA080 802D56D0 44811000 */ mtc1 $at, $f2 /* FA084 802D56D4 00000000 */ nop /* FA088 802D56D8 46020000 */ add.s $f0, $f0, $f2 /* FA08C 802D56DC 4600018D */ trunc.w.s $f6, $f0 /* FA090 802D56E0 E6260088 */ swc1 $f6, 0x88($s1) /* FA094 802D56E4 C7A0001C */ lwc1 $f0, 0x1C($sp) /* FA098 802D56E8 46040002 */ mul.s $f0, $f0, $f4 /* FA09C 802D56EC 00000000 */ nop /* FA0A0 802D56F0 46020000 */ add.s $f0, $f0, $f2 /* FA0A4 802D56F4 4600018D */ trunc.w.s $f6, $f0 /* FA0A8 802D56F8 E626008C */ swc1 $f6, 0x8C($s1) /* FA0AC 802D56FC C7A00020 */ lwc1 $f0, 0x20($sp) /* FA0B0 802D5700 46040002 */ mul.s $f0, $f0, $f4 /* FA0B4 802D5704 00000000 */ nop /* FA0B8 802D5708 46020000 */ add.s $f0, $f0, $f2 /* FA0BC 802D570C 4600018D */ trunc.w.s $f6, $f0 /* FA0C0 802D5710 E6260090 */ swc1 $f6, 0x90($s1) /* FA0C4 802D5714 8E030010 */ lw $v1, 0x10($s0) /* FA0C8 802D5718 8E020014 */ lw $v0, 0x14($s0) /* FA0CC 802D571C 0062102A */ slt $v0, $v1, $v0 /* FA0D0 802D5720 10400005 */ beqz $v0, .L802D5738 /* FA0D4 802D5724 24620001 */ addiu $v0, $v1, 0x1 /* FA0D8 802D5728 AE020010 */ sw $v0, 0x10($s0) /* FA0DC 802D572C 24020001 */ addiu $v0, $zero, 0x1 /* FA0E0 802D5730 080B55D6 */ j .L802D5758 /* FA0E4 802D5734 AE220084 */ sw $v0, 0x84($s1) .L802D5738: /* FA0E8 802D5738 8E040004 */ lw $a0, 0x4($s0) /* FA0EC 802D573C 0C00AB4B */ jal heap_free /* FA0F0 802D5740 00000000 */ nop /* FA0F4 802D5744 0C00AB4B */ jal heap_free /* FA0F8 802D5748 8E04000C */ lw $a0, 0xC($s0) /* FA0FC 802D574C 0C00AB4B */ jal heap_free /* FA100 802D5750 8E2400C0 */ lw $a0, 0xC0($s1) /* FA104 802D5754 AE200084 */ sw $zero, 0x84($s1) .L802D5758: /* FA108 802D5758 8FBF0030 */ lw $ra, 0x30($sp) /* FA10C 802D575C 8FB1002C */ lw $s1, 0x2C($sp) /* FA110 802D5760 8FB00028 */ lw $s0, 0x28($sp) /* FA114 802D5764 24020002 */ addiu $v0, $zero, 0x2 /* FA118 802D5768 03E00008 */ jr $ra /* FA11C 802D576C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: ApiStatus GetNextPathPos(Evt* script, s32 isInitialCall) { Path* path = script->varTablePtr[0xF]; Vec3f pos; f32 alpha; f32 diff; switch (path->easingType) { case EASING_LINEAR: alpha = 1.0f / path->timeLeft * path->timeElapsed; break; case EASING_QUADRATIC_IN: alpha = 1.0f / SQ(path->timeLeft) * SQ(path->timeElapsed); break; case EASING_QUADRATIC_OUT: diff = path->timeLeft - path->timeElapsed; alpha = 1.0f - (SQ(diff) / SQ(path->timeLeft)); break; case EASING_COS_IN_OUT: alpha = (1.0f - cos_rad((PI / path->timeLeft) * path->timeElapsed)) * 0.5f; break; default: alpha = 0.0f; break; } get_path_position(alpha, &pos, path->numVectors, path->lengths, path->staticVectorList, path->vectors); script->varTable[1] = (pos.x * 1024.0f) + -2.3e8f; script->varTable[2] = (pos.y * 1024.0f) + -2.3e8f; script->varTable[3] = (pos.z * 1024.0f) + -2.3e8f; if (path->timeElapsed < path->timeLeft) { path->timeElapsed = path->timeElapsed + 1; script->varTable[0] = 1; } else { heap_free(path->lengths); heap_free(path->vectors); heap_free(script->varTablePtr[15]); script->varTable[0] = 0; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel ShowSleepBubble /* FC9D8 802D8028 27BDFFA0 */ addiu $sp, $sp, -0x60 /* FC9DC 802D802C AFB1002C */ sw $s1, 0x2C($sp) /* FC9E0 802D8030 0080882D */ daddu $s1, $a0, $zero /* FC9E4 802D8034 AFBF003C */ sw $ra, 0x3C($sp) /* FC9E8 802D8038 AFB40038 */ sw $s4, 0x38($sp) /* FC9EC 802D803C AFB30034 */ sw $s3, 0x34($sp) /* FC9F0 802D8040 AFB20030 */ sw $s2, 0x30($sp) /* FC9F4 802D8044 AFB00028 */ sw $s0, 0x28($sp) /* FC9F8 802D8048 F7BA0058 */ sdc1 $f26, 0x58($sp) /* FC9FC 802D804C F7B80050 */ sdc1 $f24, 0x50($sp) /* FCA00 802D8050 F7B60048 */ sdc1 $f22, 0x48($sp) /* FCA04 802D8054 F7B40040 */ sdc1 $f20, 0x40($sp) /* FCA08 802D8058 8E30000C */ lw $s0, 0xC($s1) /* FCA0C 802D805C 8E050000 */ lw $a1, 0x0($s0) /* FCA10 802D8060 0C0B1EAF */ jal evt_get_variable /* FCA14 802D8064 26100004 */ addiu $s0, $s0, 0x4 /* FCA18 802D8068 8E050000 */ lw $a1, 0x0($s0) /* FCA1C 802D806C 26100004 */ addiu $s0, $s0, 0x4 /* FCA20 802D8070 0220202D */ daddu $a0, $s1, $zero /* FCA24 802D8074 0C0B1EAF */ jal evt_get_variable /* FCA28 802D8078 0040982D */ daddu $s3, $v0, $zero /* FCA2C 802D807C 8E050000 */ lw $a1, 0x0($s0) /* FCA30 802D8080 26100004 */ addiu $s0, $s0, 0x4 /* FCA34 802D8084 0220202D */ daddu $a0, $s1, $zero /* FCA38 802D8088 0C0B210B */ jal evt_get_float_variable /* FCA3C 802D808C 0040A02D */ daddu $s4, $v0, $zero /* FCA40 802D8090 8E050000 */ lw $a1, 0x0($s0) /* FCA44 802D8094 26100004 */ addiu $s0, $s0, 0x4 /* FCA48 802D8098 0220202D */ daddu $a0, $s1, $zero /* FCA4C 802D809C 0C0B1EAF */ jal evt_get_variable /* FCA50 802D80A0 46000686 */ mov.s $f26, $f0 /* FCA54 802D80A4 8E050000 */ lw $a1, 0x0($s0) /* FCA58 802D80A8 26100004 */ addiu $s0, $s0, 0x4 /* FCA5C 802D80AC 0220202D */ daddu $a0, $s1, $zero /* FCA60 802D80B0 0C0B210B */ jal evt_get_float_variable /* FCA64 802D80B4 0040902D */ daddu $s2, $v0, $zero /* FCA68 802D80B8 8E050000 */ lw $a1, 0x0($s0) /* FCA6C 802D80BC 26100004 */ addiu $s0, $s0, 0x4 /* FCA70 802D80C0 0220202D */ daddu $a0, $s1, $zero /* FCA74 802D80C4 0C0B210B */ jal evt_get_float_variable /* FCA78 802D80C8 46000606 */ mov.s $f24, $f0 /* FCA7C 802D80CC 8E050000 */ lw $a1, 0x0($s0) /* FCA80 802D80D0 26100004 */ addiu $s0, $s0, 0x4 /* FCA84 802D80D4 0220202D */ daddu $a0, $s1, $zero /* FCA88 802D80D8 0C0B210B */ jal evt_get_float_variable /* FCA8C 802D80DC 46000586 */ mov.s $f22, $f0 /* FCA90 802D80E0 8E050000 */ lw $a1, 0x0($s0) /* FCA94 802D80E4 26100004 */ addiu $s0, $s0, 0x4 /* FCA98 802D80E8 0220202D */ daddu $a0, $s1, $zero /* FCA9C 802D80EC 0C0B210B */ jal evt_get_float_variable /* FCAA0 802D80F0 46000506 */ mov.s $f20, $f0 /* FCAA4 802D80F4 8E100000 */ lw $s0, 0x0($s0) /* FCAA8 802D80F8 12400006 */ beqz $s2, .L802D8114 /* FCAAC 802D80FC 46000086 */ mov.s $f2, $f0 /* FCAB0 802D8100 24020001 */ addiu $v0, $zero, 0x1 /* FCAB4 802D8104 12420014 */ beq $s2, $v0, .L802D8158 /* FCAB8 802D8108 4600C186 */ mov.s $f6, $f24 /* FCABC 802D810C 080B6076 */ j .L802D81D8 /* FCAC0 802D8110 4600B006 */ mov.s $f0, $f22 .L802D8114: /* FCAC4 802D8114 3C055555 */ lui $a1, (0x55555556 >> 16) /* FCAC8 802D8118 3C048011 */ lui $a0, %hi(gPlayerStatus) /* FCACC 802D811C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* FCAD0 802D8120 948200B0 */ lhu $v0, 0xB0($a0) /* FCAD4 802D8124 34A55556 */ ori $a1, $a1, (0x55555556 & 0xFFFF) /* FCAD8 802D8128 00021400 */ sll $v0, $v0, 16 /* FCADC 802D812C 00021C03 */ sra $v1, $v0, 16 /* FCAE0 802D8130 00650018 */ mult $v1, $a1 /* FCAE4 802D8134 C4860028 */ lwc1 $f6, 0x28($a0) /* FCAE8 802D8138 C4880030 */ lwc1 $f8, 0x30($a0) /* FCAEC 802D813C C482002C */ lwc1 $f2, 0x2C($a0) /* FCAF0 802D8140 00031840 */ sll $v1, $v1, 1 /* FCAF4 802D8144 00004010 */ mfhi $t0 /* FCAF8 802D8148 000217C3 */ sra $v0, $v0, 31 /* FCAFC 802D814C 01021023 */ subu $v0, $t0, $v0 /* FCB00 802D8150 080B6069 */ j .L802D81A4 /* FCB04 802D8154 00650018 */ mult $v1, $a1 .L802D8158: /* FCB08 802D8158 0220202D */ daddu $a0, $s1, $zero /* FCB0C 802D815C 0C0B36B0 */ jal resolve_npc /* FCB10 802D8160 0260282D */ daddu $a1, $s3, $zero /* FCB14 802D8164 0040282D */ daddu $a1, $v0, $zero /* FCB18 802D8168 10A0002A */ beqz $a1, .L802D8214 /* FCB1C 802D816C 3C045555 */ lui $a0, (0x55555556 >> 16) /* FCB20 802D8170 94A200A8 */ lhu $v0, 0xA8($a1) /* FCB24 802D8174 34845556 */ ori $a0, $a0, (0x55555556 & 0xFFFF) /* FCB28 802D8178 00021400 */ sll $v0, $v0, 16 /* FCB2C 802D817C 00021C03 */ sra $v1, $v0, 16 /* FCB30 802D8180 00640018 */ mult $v1, $a0 /* FCB34 802D8184 C4A60038 */ lwc1 $f6, 0x38($a1) /* FCB38 802D8188 C4A80040 */ lwc1 $f8, 0x40($a1) /* FCB3C 802D818C C4A2003C */ lwc1 $f2, 0x3C($a1) /* FCB40 802D8190 00031840 */ sll $v1, $v1, 1 /* FCB44 802D8194 00004010 */ mfhi $t0 /* FCB48 802D8198 000217C3 */ sra $v0, $v0, 31 /* FCB4C 802D819C 01021023 */ subu $v0, $t0, $v0 /* FCB50 802D81A0 00640018 */ mult $v1, $a0 .L802D81A4: /* FCB54 802D81A4 00021400 */ sll $v0, $v0, 16 /* FCB58 802D81A8 00021403 */ sra $v0, $v0, 16 /* FCB5C 802D81AC 44822000 */ mtc1 $v0, $f4 /* FCB60 802D81B0 00000000 */ nop /* FCB64 802D81B4 46802120 */ cvt.s.w $f4, $f4 /* FCB68 802D81B8 00031FC3 */ sra $v1, $v1, 31 /* FCB6C 802D81BC 00004010 */ mfhi $t0 /* FCB70 802D81C0 01031823 */ subu $v1, $t0, $v1 /* FCB74 802D81C4 44830000 */ mtc1 $v1, $f0 /* FCB78 802D81C8 00000000 */ nop /* FCB7C 802D81CC 46800020 */ cvt.s.w $f0, $f0 /* FCB80 802D81D0 080B6078 */ j .L802D81E0 /* FCB84 802D81D4 46001000 */ add.s $f0, $f2, $f0 .L802D81D8: /* FCB88 802D81D8 4600A206 */ mov.s $f8, $f20 /* FCB8C 802D81DC 46001106 */ mov.s $f4, $f2 .L802D81E0: /* FCB90 802D81E0 0280202D */ daddu $a0, $s4, $zero /* FCB94 802D81E4 44053000 */ mfc1 $a1, $f6 /* FCB98 802D81E8 44060000 */ mfc1 $a2, $f0 /* FCB9C 802D81EC 44074000 */ mfc1 $a3, $f8 /* FCBA0 802D81F0 27A20020 */ addiu $v0, $sp, 0x20 /* FCBA4 802D81F4 E7A40010 */ swc1 $f4, 0x10($sp) /* FCBA8 802D81F8 E7BA0014 */ swc1 $f26, 0x14($sp) /* FCBAC 802D81FC 0C01C1FC */ jal fx_sleep_bubble /* FCBB0 802D8200 AFA20018 */ sw $v0, 0x18($sp) /* FCBB4 802D8204 0220202D */ daddu $a0, $s1, $zero /* FCBB8 802D8208 8FA60020 */ lw $a2, 0x20($sp) /* FCBBC 802D820C 0C0B2026 */ jal evt_set_variable /* FCBC0 802D8210 0200282D */ daddu $a1, $s0, $zero .L802D8214: /* FCBC4 802D8214 24020002 */ addiu $v0, $zero, 0x2 /* FCBC8 802D8218 8FBF003C */ lw $ra, 0x3C($sp) /* FCBCC 802D821C 8FB40038 */ lw $s4, 0x38($sp) /* FCBD0 802D8220 8FB30034 */ lw $s3, 0x34($sp) /* FCBD4 802D8224 8FB20030 */ lw $s2, 0x30($sp) /* FCBD8 802D8228 8FB1002C */ lw $s1, 0x2C($sp) /* FCBDC 802D822C 8FB00028 */ lw $s0, 0x28($sp) /* FCBE0 802D8230 D7BA0058 */ ldc1 $f26, 0x58($sp) /* FCBE4 802D8234 D7B80050 */ ldc1 $f24, 0x50($sp) /* FCBE8 802D8238 D7B60048 */ ldc1 $f22, 0x48($sp) /* FCBEC 802D823C D7B40040 */ ldc1 $f20, 0x40($sp) /* FCBF0 802D8240 03E00008 */ jr $ra /* FCBF4 802D8244 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: ApiStatus ShowSleepBubble(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 npcID = evt_get_variable(script, *args++); s32 type = evt_get_variable(script, *args++); f32 pitch = evt_get_float_variable(script, *args++); s32 emoterType = evt_get_variable(script, *args++); f32 posX = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++); f32 posZ = evt_get_float_variable(script, *args++); f32 radius = evt_get_float_variable(script, *args++); s32 outVar = *args++; Npc* npc; f32 x, y, z, r; EffectInstance* effectHandle; switch (emoterType) { case EMOTER_PLAYER: x = gPlayerStatus.position.x; y = gPlayerStatus.position.y + (gPlayerStatus.colliderHeight * 2) / 3; z = gPlayerStatus.position.z; r = gPlayerStatus.colliderHeight / 3; break; case EMOTER_NPC: npc = resolve_npc(script, npcID); if (npc == NULL) { return ApiStatus_DONE2; } x = npc->pos.x; y = npc->pos.y + (npc->collisionHeight * 2) / 3; z = npc->pos.z; r = npc->collisionHeight / 3; break; default: x = posX; y = posY; z = posZ; r = radius; break; } fx_sleep_bubble(type, x, y, z, r, pitch, &effectHandle); evt_set_variable(script, outVar, (s32)effectHandle); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel cloud_trail_main /* 32EE30 E0016000 27BDFF90 */ addiu $sp, $sp, -0x70 /* 32EE34 E0016004 F7B80058 */ sdc1 $f24, 0x58($sp) /* 32EE38 E0016008 4485C000 */ mtc1 $a1, $f24 /* 32EE3C E001600C AFB5003C */ sw $s5, 0x3C($sp) /* 32EE40 E0016010 0080A82D */ daddu $s5, $a0, $zero /* 32EE44 E0016014 F7BA0060 */ sdc1 $f26, 0x60($sp) /* 32EE48 E0016018 4486D000 */ mtc1 $a2, $f26 /* 32EE4C E001601C 27A40010 */ addiu $a0, $sp, 0x10 /* 32EE50 E0016020 F7BC0068 */ sdc1 $f28, 0x68($sp) /* 32EE54 E0016024 4487E000 */ mtc1 $a3, $f28 /* 32EE58 E0016028 3C02E001 */ lui $v0, %hi(cloud_trail_init) /* 32EE5C E001602C 24426220 */ addiu $v0, $v0, %lo(cloud_trail_init) /* 32EE60 E0016030 AFA20018 */ sw $v0, 0x18($sp) /* 32EE64 E0016034 3C02E001 */ lui $v0, %hi(cloud_trail_update) /* 32EE68 E0016038 24426228 */ addiu $v0, $v0, %lo(cloud_trail_update) /* 32EE6C E001603C AFA2001C */ sw $v0, 0x1C($sp) /* 32EE70 E0016040 3C02E001 */ lui $v0, %hi(cloud_trail_render) /* 32EE74 E0016044 24426410 */ addiu $v0, $v0, %lo(cloud_trail_render) /* 32EE78 E0016048 AFA20020 */ sw $v0, 0x20($sp) /* 32EE7C E001604C 2402000B */ addiu $v0, $zero, 0xB /* 32EE80 E0016050 AFBF0044 */ sw $ra, 0x44($sp) /* 32EE84 E0016054 AFB60040 */ sw $s6, 0x40($sp) /* 32EE88 E0016058 AFB40038 */ sw $s4, 0x38($sp) /* 32EE8C E001605C AFB30034 */ sw $s3, 0x34($sp) /* 32EE90 E0016060 AFB20030 */ sw $s2, 0x30($sp) /* 32EE94 E0016064 AFB1002C */ sw $s1, 0x2C($sp) /* 32EE98 E0016068 AFB00028 */ sw $s0, 0x28($sp) /* 32EE9C E001606C F7B60050 */ sdc1 $f22, 0x50($sp) /* 32EEA0 E0016070 F7B40048 */ sdc1 $f20, 0x48($sp) /* 32EEA4 E0016074 AFA00010 */ sw $zero, 0x10($sp) /* 32EEA8 E0016078 AFA00024 */ sw $zero, 0x24($sp) /* 32EEAC E001607C 0C080124 */ jal shim_create_effect_instance /* 32EEB0 E0016080 AFA20014 */ sw $v0, 0x14($sp) /* 32EEB4 E0016084 24040050 */ addiu $a0, $zero, 0x50 /* 32EEB8 E0016088 24130001 */ addiu $s3, $zero, 0x1 /* 32EEBC E001608C 0040802D */ daddu $s0, $v0, $zero /* 32EEC0 E0016090 0C08012C */ jal shim_general_heap_malloc /* 32EEC4 E0016094 AE130008 */ sw $s3, 0x8($s0) /* 32EEC8 E0016098 0040882D */ daddu $s1, $v0, $zero /* 32EECC E001609C 16200003 */ bnez $s1, .LE00160AC /* 32EED0 E00160A0 AE11000C */ sw $s1, 0xC($s0) .LE00160A4: /* 32EED4 E00160A4 08005829 */ j .LE00160A4 /* 32EED8 E00160A8 00000000 */ nop .LE00160AC: /* 32EEDC E00160AC 0220202D */ daddu $a0, $s1, $zero /* 32EEE0 E00160B0 00132880 */ sll $a1, $s3, 2 /* 32EEE4 E00160B4 00B32821 */ addu $a1, $a1, $s3 /* 32EEE8 E00160B8 0C080130 */ jal shim_mem_clear /* 32EEEC E00160BC 00052900 */ sll $a1, $a1, 4 /* 32EEF0 E00160C0 0000902D */ daddu $s2, $zero, $zero /* 32EEF4 E00160C4 0253102A */ slt $v0, $s2, $s3 /* 32EEF8 E00160C8 10400046 */ beqz $v0, .LE00161E4 /* 32EEFC E00160CC 24160001 */ addiu $s6, $zero, 0x1 /* 32EF00 E00160D0 241400FF */ addiu $s4, $zero, 0xFF /* 32EF04 E00160D4 26300008 */ addiu $s0, $s1, 0x8 /* 32EF08 E00160D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 32EF0C E00160DC 4481B000 */ mtc1 $at, $f22 /* 32EF10 E00160E0 3C01E001 */ lui $at, (0xE0016720 >> 16) /* 32EF14 E00160E4 D4346720 */ ldc1 $f20, (0xE0016720 & 0xFFFF)($at) .LE00160E8: /* 32EF18 E00160E8 2404000A */ addiu $a0, $zero, 0xA /* 32EF1C E00160EC AE360000 */ sw $s6, 0x0($s1) /* 32EF20 E00160F0 A615FFFC */ sh $s5, -0x4($s0) /* 32EF24 E00160F4 AE000038 */ sw $zero, 0x38($s0) /* 32EF28 E00160F8 AE00003C */ sw $zero, 0x3C($s0) /* 32EF2C E00160FC E6180004 */ swc1 $f24, 0x4($s0) /* 32EF30 E0016100 E61A0008 */ swc1 $f26, 0x8($s0) /* 32EF34 E0016104 E61C000C */ swc1 $f28, 0xC($s0) /* 32EF38 E0016108 E6160014 */ swc1 $f22, 0x14($s0) /* 32EF3C E001610C E6160018 */ swc1 $f22, 0x18($s0) /* 32EF40 E0016110 E616001C */ swc1 $f22, 0x1C($s0) /* 32EF44 E0016114 0C080138 */ jal shim_rand_int /* 32EF48 E0016118 A2140000 */ sb $s4, 0x0($s0) /* 32EF4C E001611C 44820000 */ mtc1 $v0, $f0 /* 32EF50 E0016120 00000000 */ nop /* 32EF54 E0016124 46800021 */ cvt.d.w $f0, $f0 /* 32EF58 E0016128 46340002 */ mul.d $f0, $f0, $f20 /* 32EF5C E001612C 00000000 */ nop /* 32EF60 E0016130 3C01E001 */ lui $at, (0xE0016728 >> 16) /* 32EF64 E0016134 D4226728 */ ldc1 $f2, (0xE0016728 & 0xFFFF)($at) /* 32EF68 E0016138 46220000 */ add.d $f0, $f0, $f2 /* 32EF6C E001613C 2404000A */ addiu $a0, $zero, 0xA /* 32EF70 E0016140 46200020 */ cvt.s.d $f0, $f0 /* 32EF74 E0016144 0C080138 */ jal shim_rand_int /* 32EF78 E0016148 E6000020 */ swc1 $f0, 0x20($s0) /* 32EF7C E001614C 44820000 */ mtc1 $v0, $f0 /* 32EF80 E0016150 00000000 */ nop /* 32EF84 E0016154 46800021 */ cvt.d.w $f0, $f0 /* 32EF88 E0016158 46340002 */ mul.d $f0, $f0, $f20 /* 32EF8C E001615C 00000000 */ nop /* 32EF90 E0016160 3C013FF8 */ lui $at, (0x3FF80000 >> 16) /* 32EF94 E0016164 44811800 */ mtc1 $at, $f3 /* 32EF98 E0016168 44801000 */ mtc1 $zero, $f2 /* 32EF9C E001616C 26520001 */ addiu $s2, $s2, 0x1 /* 32EFA0 E0016170 46220000 */ add.d $f0, $f0, $f2 /* 32EFA4 E0016174 26310050 */ addiu $s1, $s1, 0x50 /* 32EFA8 E0016178 2404003C */ addiu $a0, $zero, 0x3C /* 32EFAC E001617C 46200020 */ cvt.s.d $f0, $f0 /* 32EFB0 E0016180 0C080000 */ jal effect_rand_int /* 32EFB4 E0016184 E6000024 */ swc1 $f0, 0x24($s0) /* 32EFB8 E0016188 24040168 */ addiu $a0, $zero, 0x168 /* 32EFBC E001618C 44820000 */ mtc1 $v0, $f0 /* 32EFC0 E0016190 00000000 */ nop /* 32EFC4 E0016194 46800020 */ cvt.s.w $f0, $f0 /* 32EFC8 E0016198 E6000028 */ swc1 $f0, 0x28($s0) /* 32EFCC E001619C 3C014000 */ lui $at, (0x40000000 >> 16) /* 32EFD0 E00161A0 44810000 */ mtc1 $at, $f0 /* 32EFD4 E00161A4 3C01BF00 */ lui $at, (0xBF000000 >> 16) /* 32EFD8 E00161A8 44811000 */ mtc1 $at, $f2 /* 32EFDC E00161AC 2402000F */ addiu $v0, $zero, 0xF /* 32EFE0 E00161B0 A615FFFC */ sh $s5, -0x4($s0) /* 32EFE4 E00161B4 A602FFFE */ sh $v0, -0x2($s0) /* 32EFE8 E00161B8 E6000030 */ swc1 $f0, 0x30($s0) /* 32EFEC E00161BC 0C080000 */ jal effect_rand_int /* 32EFF0 E00161C0 E6020034 */ swc1 $f2, 0x34($s0) /* 32EFF4 E00161C4 44820000 */ mtc1 $v0, $f0 /* 32EFF8 E00161C8 00000000 */ nop /* 32EFFC E00161CC 46800020 */ cvt.s.w $f0, $f0 /* 32F000 E00161D0 E6000010 */ swc1 $f0, 0x10($s0) /* 32F004 E00161D4 A2140000 */ sb $s4, 0x0($s0) /* 32F008 E00161D8 0253102A */ slt $v0, $s2, $s3 /* 32F00C E00161DC 1440FFC2 */ bnez $v0, .LE00160E8 /* 32F010 E00161E0 26100050 */ addiu $s0, $s0, 0x50 .LE00161E4: /* 32F014 E00161E4 8FBF0044 */ lw $ra, 0x44($sp) /* 32F018 E00161E8 8FB60040 */ lw $s6, 0x40($sp) /* 32F01C E00161EC 8FB5003C */ lw $s5, 0x3C($sp) /* 32F020 E00161F0 8FB40038 */ lw $s4, 0x38($sp) /* 32F024 E00161F4 8FB30034 */ lw $s3, 0x34($sp) /* 32F028 E00161F8 8FB20030 */ lw $s2, 0x30($sp) /* 32F02C E00161FC 8FB1002C */ lw $s1, 0x2C($sp) /* 32F030 E0016200 8FB00028 */ lw $s0, 0x28($sp) /* 32F034 E0016204 D7BC0068 */ ldc1 $f28, 0x68($sp) /* 32F038 E0016208 D7BA0060 */ ldc1 $f26, 0x60($sp) /* 32F03C E001620C D7B80058 */ ldc1 $f24, 0x58($sp) /* 32F040 E0016210 D7B60050 */ ldc1 $f22, 0x50($sp) /* 32F044 E0016214 D7B40048 */ ldc1 $f20, 0x48($sp) /* 32F048 E0016218 03E00008 */ jr $ra /* 32F04C E001621C 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: void cloud_trail_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) { EffectBlueprint bp; EffectInstance* effect; CloudTrailFXData* part; s32 numParts = 1; s32 i; bp.unk_00 = 0; bp.init = cloud_trail_init; bp.update = cloud_trail_update; bp.renderWorld = cloud_trail_render; bp.renderUI = NULL; bp.effectID = EFFECT_CLOUD_TRAIL; effect = shim_create_effect_instance(&bp); effect->numParts = 1; part = shim_general_heap_malloc(numParts * sizeof(*part)); effect->data.cloudTrail = part; ASSERT(effect->data.cloudTrail != NULL); shim_mem_clear(part, numParts * sizeof(*part)); for (i = 0; i < numParts; i++, part++) { part->alive = 1; part->unk_04 = arg0; part->unk_40 = 0; part->unk_44 = 0; part->unk_0C = arg1; part->unk_10 = arg2; part->unk_14 = arg3; part->unk_1C = 1.0f; part->unk_20 = 1.0f; part->unk_24 = 1.0f; part->alpha = -1; part->unk_28 = (shim_rand_int(10) * 0.03) + 1.4; part->unk_2C = (shim_rand_int(10) * 0.03) + 1.5; part->unk_30 = effect_rand_int(60); part->unk_04 = arg0; part->lifetime = 15; part->unk_38 = 2.0f; part->unk_3C = -0.5f; part->unk_18 = effect_rand_int(360); part->alpha = -1; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802549F4 /* 1832D4 802549F4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1832D8 802549F8 AFB20018 */ sw $s2, 0x18($sp) /* 1832DC 802549FC 0080902D */ daddu $s2, $a0, $zero /* 1832E0 80254A00 AFBF0020 */ sw $ra, 0x20($sp) /* 1832E4 80254A04 AFB3001C */ sw $s3, 0x1C($sp) /* 1832E8 80254A08 AFB10014 */ sw $s1, 0x14($sp) /* 1832EC 80254A0C AFB00010 */ sw $s0, 0x10($sp) /* 1832F0 80254A10 8E4401F4 */ lw $a0, 0x1F4($s2) /* 1832F4 80254A14 8C820000 */ lw $v0, 0x0($a0) /* 1832F8 80254A18 8C9300C0 */ lw $s3, 0xC0($a0) /* 1832FC 80254A1C 30420001 */ andi $v0, $v0, 0x1 /* 183300 80254A20 14400084 */ bnez $v0, .L80254C34 /* 183304 80254A24 00000000 */ nop /* 183308 80254A28 8C820094 */ lw $v0, 0x94($a0) /* 18330C 80254A2C 10400081 */ beqz $v0, .L80254C34 /* 183310 80254A30 00000000 */ nop /* 183314 80254A34 827107D9 */ lb $s1, 0x7D9($s3) /* 183318 80254A38 C4800058 */ lwc1 $f0, 0x58($a0) /* 18331C 80254A3C 00111840 */ sll $v1, $s1, 1 /* 183320 80254A40 02631821 */ addu $v1, $s3, $v1 /* 183324 80254A44 4600010D */ trunc.w.s $f4, $f0 /* 183328 80254A48 44022000 */ mfc1 $v0, $f4 /* 18332C 80254A4C 00000000 */ nop /* 183330 80254A50 A46207FC */ sh $v0, 0x7FC($v1) /* 183334 80254A54 C480005C */ lwc1 $f0, 0x5C($a0) /* 183338 80254A58 4600010D */ trunc.w.s $f4, $f0 /* 18333C 80254A5C 44022000 */ mfc1 $v0, $f4 /* 183340 80254A60 00000000 */ nop /* 183344 80254A64 A462081C */ sh $v0, 0x81C($v1) /* 183348 80254A68 C4800060 */ lwc1 $f0, 0x60($a0) /* 18334C 80254A6C 4600010D */ trunc.w.s $f4, $f0 /* 183350 80254A70 44022000 */ mfc1 $v0, $f4 /* 183354 80254A74 00000000 */ nop /* 183358 80254A78 A462083C */ sh $v0, 0x83C($v1) /* 18335C 80254A7C C640018C */ lwc1 $f0, 0x18C($s2) /* 183360 80254A80 4600010D */ trunc.w.s $f4, $f0 /* 183364 80254A84 44022000 */ mfc1 $v0, $f4 /* 183368 80254A88 00000000 */ nop /* 18336C 80254A8C A46207DC */ sh $v0, 0x7DC($v1) /* 183370 80254A90 86420168 */ lh $v0, 0x168($s2) /* 183374 80254A94 C6420188 */ lwc1 $f2, 0x188($s2) /* 183378 80254A98 44820000 */ mtc1 $v0, $f0 /* 18337C 80254A9C 00000000 */ nop /* 183380 80254AA0 46800020 */ cvt.s.w $f0, $f0 /* 183384 80254AA4 46020002 */ mul.s $f0, $f0, $f2 /* 183388 80254AA8 00000000 */ nop /* 18338C 80254AAC 02718021 */ addu $s0, $s3, $s1 /* 183390 80254AB0 4600010D */ trunc.w.s $f4, $f0 /* 183394 80254AB4 44022000 */ mfc1 $v0, $f4 /* 183398 80254AB8 00000000 */ nop /* 18339C 80254ABC A202085C */ sb $v0, 0x85C($s0) /* 1833A0 80254AC0 8642016A */ lh $v0, 0x16A($s2) /* 1833A4 80254AC4 C6420188 */ lwc1 $f2, 0x188($s2) /* 1833A8 80254AC8 44820000 */ mtc1 $v0, $f0 /* 1833AC 80254ACC 00000000 */ nop /* 1833B0 80254AD0 46800020 */ cvt.s.w $f0, $f0 /* 1833B4 80254AD4 46020002 */ mul.s $f0, $f0, $f2 /* 1833B8 80254AD8 00000000 */ nop /* 1833BC 80254ADC 4600010D */ trunc.w.s $f4, $f0 /* 1833C0 80254AE0 44022000 */ mfc1 $v0, $f4 /* 1833C4 80254AE4 00000000 */ nop /* 1833C8 80254AE8 A202086C */ sb $v0, 0x86C($s0) /* 1833CC 80254AEC C64C015C */ lwc1 $f12, 0x15C($s2) /* 1833D0 80254AF0 0C00A6C9 */ jal clamp_angle /* 1833D4 80254AF4 2610087C */ addiu $s0, $s0, 0x87C /* 1833D8 80254AF8 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1833DC 80254AFC 44811000 */ mtc1 $at, $f2 /* 1833E0 80254B00 00000000 */ nop /* 1833E4 80254B04 46020002 */ mul.s $f0, $f0, $f2 /* 1833E8 80254B08 00000000 */ nop /* 1833EC 80254B0C 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 1833F0 80254B10 44811000 */ mtc1 $at, $f2 /* 1833F4 80254B14 00000000 */ nop /* 1833F8 80254B18 4600103E */ c.le.s $f2, $f0 /* 1833FC 80254B1C 00000000 */ nop /* 183400 80254B20 45030005 */ bc1tl .L80254B38 /* 183404 80254B24 46020001 */ sub.s $f0, $f0, $f2 /* 183408 80254B28 4600010D */ trunc.w.s $f4, $f0 /* 18340C 80254B2C 44032000 */ mfc1 $v1, $f4 /* 183410 80254B30 080952D4 */ j .L80254B50 /* 183414 80254B34 A2030000 */ sb $v1, 0x0($s0) .L80254B38: /* 183418 80254B38 3C028000 */ lui $v0, (0x80000000 >> 16) /* 18341C 80254B3C 4600010D */ trunc.w.s $f4, $f0 /* 183420 80254B40 44032000 */ mfc1 $v1, $f4 D_80254B44: /* 183424 80254B44 00000000 */ nop /* 183428 80254B48 00621825 */ or $v1, $v1, $v0 /* 18342C 80254B4C A2030000 */ sb $v1, 0x0($s0) .L80254B50: /* 183430 80254B50 0C00A6C9 */ jal clamp_angle /* 183434 80254B54 C64C0160 */ lwc1 $f12, 0x160($s2) /* 183438 80254B58 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 18343C 80254B5C 44811000 */ mtc1 $at, $f2 /* 183440 80254B60 00000000 */ nop /* 183444 80254B64 46020002 */ mul.s $f0, $f0, $f2 /* 183448 80254B68 00000000 */ nop /* 18344C 80254B6C 02711021 */ addu $v0, $s3, $s1 /* 183450 80254B70 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 183454 80254B74 44811000 */ mtc1 $at, $f2 /* 183458 80254B78 00000000 */ nop /* 18345C 80254B7C 4600103E */ c.le.s $f2, $f0 /* 183460 80254B80 00000000 */ nop /* 183464 80254B84 45010005 */ bc1t .L80254B9C /* 183468 80254B88 2444088C */ addiu $a0, $v0, 0x88C /* 18346C 80254B8C 4600010D */ trunc.w.s $f4, $f0 /* 183470 80254B90 44032000 */ mfc1 $v1, $f4 D_80254B94: /* 183474 80254B94 080952EE */ j .L80254BB8 /* 183478 80254B98 A0830000 */ sb $v1, 0x0($a0) .L80254B9C: /* 18347C 80254B9C 46020001 */ sub.s $f0, $f0, $f2 nok_02_D_80254BA0: /* 183480 80254BA0 3C028000 */ lui $v0, (0x80000000 >> 16) /* 183484 80254BA4 4600010D */ trunc.w.s $f4, $f0 /* 183488 80254BA8 44032000 */ mfc1 $v1, $f4 /* 18348C 80254BAC 00000000 */ nop /* 183490 80254BB0 00621825 */ or $v1, $v1, $v0 D_80254BB4: /* 183494 80254BB4 A0830000 */ sb $v1, 0x0($a0) .L80254BB8: /* 183498 80254BB8 0C00A6C9 */ jal clamp_angle /* 18349C 80254BBC C64C0164 */ lwc1 $f12, 0x164($s2) /* 1834A0 80254BC0 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1834A4 80254BC4 44811000 */ mtc1 $at, $f2 /* 1834A8 80254BC8 00000000 */ nop /* 1834AC 80254BCC 46020002 */ mul.s $f0, $f0, $f2 /* 1834B0 80254BD0 00000000 */ nop /* 1834B4 80254BD4 02711021 */ addu $v0, $s3, $s1 /* 1834B8 80254BD8 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 1834BC 80254BDC 44811000 */ mtc1 $at, $f2 /* 1834C0 80254BE0 00000000 */ nop /* 1834C4 80254BE4 4600103E */ c.le.s $f2, $f0 /* 1834C8 80254BE8 00000000 */ nop /* 1834CC 80254BEC 45010005 */ bc1t .L80254C04 /* 1834D0 80254BF0 2444089C */ addiu $a0, $v0, 0x89C /* 1834D4 80254BF4 4600010D */ trunc.w.s $f4, $f0 /* 1834D8 80254BF8 44032000 */ mfc1 $v1, $f4 /* 1834DC 80254BFC 08095308 */ j .L80254C20 /* 1834E0 80254C00 A0830000 */ sb $v1, 0x0($a0) .L80254C04: /* 1834E4 80254C04 46020001 */ sub.s $f0, $f0, $f2 /* 1834E8 80254C08 3C028000 */ lui $v0, (0x80000000 >> 16) /* 1834EC 80254C0C 4600010D */ trunc.w.s $f4, $f0 /* 1834F0 80254C10 44032000 */ mfc1 $v1, $f4 /* 1834F4 80254C14 00000000 */ nop /* 1834F8 80254C18 00621825 */ or $v1, $v1, $v0 /* 1834FC 80254C1C A0830000 */ sb $v1, 0x0($a0) .L80254C20: /* 183500 80254C20 26310001 */ addiu $s1, $s1, 0x1 /* 183504 80254C24 2A220010 */ slti $v0, $s1, 0x10 /* 183508 80254C28 50400001 */ beql $v0, $zero, .L80254C30 /* 18350C 80254C2C 0000882D */ daddu $s1, $zero, $zero .L80254C30: /* 183510 80254C30 A27107D9 */ sb $s1, 0x7D9($s3) .L80254C34: /* 183514 80254C34 8FBF0020 */ lw $ra, 0x20($sp) /* 183518 80254C38 8FB3001C */ lw $s3, 0x1C($sp) /* 18351C 80254C3C 8FB20018 */ lw $s2, 0x18($sp) /* 183520 80254C40 8FB10014 */ lw $s1, 0x14($sp) /* 183524 80254C44 8FB00010 */ lw $s0, 0x10($sp) /* 183528 80254C48 03E00008 */ jr $ra /* 18352C 80254C4C 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void func_802549F4(Actor* actor) { ActorPart* partsTable = actor->partsTable; DecorationTable* decorationTable = partsTable->decorationTable; if (!(partsTable->flags & ACTOR_PART_FLAG_INVISIBLE) && partsTable->idleAnimations != NULL) { s32 i = decorationTable->unk_7D9; decorationTable->posX[i] = partsTable->currentPos.x; decorationTable->posY[i] = partsTable->currentPos.y; decorationTable->posZ[i] = partsTable->currentPos.z; decorationTable->yaw[i] = actor->yaw; decorationTable->rotationPivotOffsetX[i] = actor->rotationPivotOffset.x * actor->scalingFactor; decorationTable->rotationPivotOffsetY[i] = actor->rotationPivotOffset.y * actor->scalingFactor; decorationTable->rotX[i] = clamp_angle(actor->rotation.x) * 0.5f; decorationTable->rotY[i] = clamp_angle(actor->rotation.y) * 0.5f; decorationTable->rotZ[i] = clamp_angle(actor->rotation.z) * 0.5f; i++; if (i >= ARRAY_COUNT(decorationTable->posX)) { i = 0; } decorationTable->unk_7D9 = i; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80114B58 /* AB258 80114B58 3C028015 */ lui $v0, %hi(mdl_nextTextureAddress) /* AB25C 80114B5C 8C423368 */ lw $v0, %lo(mdl_nextTextureAddress)($v0) /* AB260 80114B60 27BDFFB0 */ addiu $sp, $sp, -0x50 /* AB264 80114B64 AFB1002C */ sw $s1, 0x2C($sp) /* AB268 80114B68 0080882D */ daddu $s1, $a0, $zero /* AB26C 80114B6C AFB20030 */ sw $s2, 0x30($sp) /* AB270 80114B70 00A0902D */ daddu $s2, $a1, $zero /* AB274 80114B74 AFB70044 */ sw $s7, 0x44($sp) /* AB278 80114B78 00C0B82D */ daddu $s7, $a2, $zero /* AB27C 80114B7C AFB40038 */ sw $s4, 0x38($sp) /* AB280 80114B80 AFBF0048 */ sw $ra, 0x48($sp) /* AB284 80114B84 AFB60040 */ sw $s6, 0x40($sp) /* AB288 80114B88 AFB5003C */ sw $s5, 0x3C($sp) /* AB28C 80114B8C AFB30034 */ sw $s3, 0x34($sp) /* AB290 80114B90 AFB00028 */ sw $s0, 0x28($sp) /* AB294 80114B94 AE420034 */ sw $v0, 0x34($s2) /* AB298 80114B98 8FB30060 */ lw $s3, 0x60($sp) /* AB29C 80114B9C 8FB50064 */ lw $s5, 0x64($sp) /* AB2A0 80114BA0 8FB60068 */ lw $s6, 0x68($sp) /* AB2A4 80114BA4 12600004 */ beqz $s3, .L80114BB8 /* AB2A8 80114BA8 00E0A02D */ daddu $s4, $a3, $zero /* AB2AC 80114BAC 00541021 */ addu $v0, $v0, $s4 /* AB2B0 80114BB0 080452EF */ j .L80114BBC /* AB2B4 80114BB4 AE420038 */ sw $v0, 0x38($s2) .L80114BB8: /* AB2B8 80114BB8 AE400038 */ sw $zero, 0x38($s2) .L80114BBC: /* AB2BC 80114BBC 0220202D */ daddu $a0, $s1, $zero /* AB2C0 80114BC0 3C108015 */ lui $s0, %hi(mdl_nextTextureAddress) /* AB2C4 80114BC4 26103368 */ addiu $s0, $s0, %lo(mdl_nextTextureAddress) /* AB2C8 80114BC8 02342821 */ addu $a1, $s1, $s4 /* AB2CC 80114BCC 8E060000 */ lw $a2, 0x0($s0) /* AB2D0 80114BD0 0C00A5CF */ jal dma_copy /* AB2D4 80114BD4 00B32821 */ addu $a1, $a1, $s3 /* AB2D8 80114BD8 02931021 */ addu $v0, $s4, $s3 /* AB2DC 80114BDC 8E030000 */ lw $v1, 0x0($s0) /* AB2E0 80114BE0 02228821 */ addu $s1, $s1, $v0 /* AB2E4 80114BE4 00621021 */ addu $v0, $v1, $v0 /* AB2E8 80114BE8 12A00013 */ beqz $s5, .L80114C38 /* AB2EC 80114BEC AE020000 */ sw $v0, 0x0($s0) /* AB2F0 80114BF0 12C00004 */ beqz $s6, .L80114C04 /* AB2F4 80114BF4 AE42003C */ sw $v0, 0x3C($s2) /* AB2F8 80114BF8 00551021 */ addu $v0, $v0, $s5 /* AB2FC 80114BFC 08045302 */ j .L80114C08 /* AB300 80114C00 AE420040 */ sw $v0, 0x40($s2) .L80114C04: /* AB304 80114C04 AE400040 */ sw $zero, 0x40($s2) .L80114C08: /* AB308 80114C08 0220202D */ daddu $a0, $s1, $zero /* AB30C 80114C0C 3C108015 */ lui $s0, %hi(mdl_nextTextureAddress) /* AB310 80114C10 26103368 */ addiu $s0, $s0, %lo(mdl_nextTextureAddress) /* AB314 80114C14 00952821 */ addu $a1, $a0, $s5 /* AB318 80114C18 8E060000 */ lw $a2, 0x0($s0) /* AB31C 80114C1C 0C00A5CF */ jal dma_copy /* AB320 80114C20 00B62821 */ addu $a1, $a1, $s6 /* AB324 80114C24 8E020000 */ lw $v0, 0x0($s0) /* AB328 80114C28 02B61821 */ addu $v1, $s5, $s6 /* AB32C 80114C2C 00431021 */ addu $v0, $v0, $v1 /* AB330 80114C30 08045310 */ j .L80114C40 /* AB334 80114C34 AE020000 */ sw $v0, 0x0($s0) .L80114C38: /* AB338 80114C38 AE400040 */ sw $zero, 0x40($s2) /* AB33C 80114C3C AE40003C */ sw $zero, 0x3C($s2) .L80114C40: /* AB340 80114C40 26450004 */ addiu $a1, $s2, 0x4 /* AB344 80114C44 02E0202D */ daddu $a0, $s7, $zero /* AB348 80114C48 02E51025 */ or $v0, $s7, $a1 /* AB34C 80114C4C 3C038015 */ lui $v1, %hi(mdl_nextTextureAddress) /* AB350 80114C50 8C633368 */ lw $v1, %lo(mdl_nextTextureAddress)($v1) /* AB354 80114C54 30420003 */ andi $v0, $v0, 0x3 /* AB358 80114C58 10400017 */ beqz $v0, .L80114CB8 /* AB35C 80114C5C AE430000 */ sw $v1, 0x0($s2) /* AB360 80114C60 26E20030 */ addiu $v0, $s7, 0x30 .L80114C64: /* AB364 80114C64 88880000 */ lwl $t0, 0x0($a0) /* AB368 80114C68 98880003 */ lwr $t0, 0x3($a0) /* AB36C 80114C6C 88890004 */ lwl $t1, 0x4($a0) /* AB370 80114C70 98890007 */ lwr $t1, 0x7($a0) /* AB374 80114C74 888A0008 */ lwl $t2, 0x8($a0) /* AB378 80114C78 988A000B */ lwr $t2, 0xB($a0) /* AB37C 80114C7C 888B000C */ lwl $t3, 0xC($a0) /* AB380 80114C80 988B000F */ lwr $t3, 0xF($a0) /* AB384 80114C84 A8A80000 */ swl $t0, 0x0($a1) /* AB388 80114C88 B8A80003 */ swr $t0, 0x3($a1) /* AB38C 80114C8C A8A90004 */ swl $t1, 0x4($a1) /* AB390 80114C90 B8A90007 */ swr $t1, 0x7($a1) /* AB394 80114C94 A8AA0008 */ swl $t2, 0x8($a1) /* AB398 80114C98 B8AA000B */ swr $t2, 0xB($a1) /* AB39C 80114C9C A8AB000C */ swl $t3, 0xC($a1) /* AB3A0 80114CA0 B8AB000F */ swr $t3, 0xF($a1) /* AB3A4 80114CA4 24840010 */ addiu $a0, $a0, 0x10 /* AB3A8 80114CA8 1482FFEE */ bne $a0, $v0, .L80114C64 /* AB3AC 80114CAC 24A50010 */ addiu $a1, $a1, 0x10 /* AB3B0 80114CB0 0804533A */ j .L80114CE8 /* AB3B4 80114CB4 00000000 */ nop .L80114CB8: /* AB3B8 80114CB8 26E20030 */ addiu $v0, $s7, 0x30 .L80114CBC: /* AB3BC 80114CBC 8C880000 */ lw $t0, 0x0($a0) /* AB3C0 80114CC0 8C890004 */ lw $t1, 0x4($a0) /* AB3C4 80114CC4 8C8A0008 */ lw $t2, 0x8($a0) /* AB3C8 80114CC8 8C8B000C */ lw $t3, 0xC($a0) /* AB3CC 80114CCC ACA80000 */ sw $t0, 0x0($a1) /* AB3D0 80114CD0 ACA90004 */ sw $t1, 0x4($a1) /* AB3D4 80114CD4 ACAA0008 */ sw $t2, 0x8($a1) /* AB3D8 80114CD8 ACAB000C */ sw $t3, 0xC($a1) /* AB3DC 80114CDC 24840010 */ addiu $a0, $a0, 0x10 /* AB3E0 80114CE0 1482FFF6 */ bne $a0, $v0, .L80114CBC /* AB3E4 80114CE4 24A50010 */ addiu $a1, $a1, 0x10 .L80114CE8: /* AB3E8 80114CE8 8E42003C */ lw $v0, 0x3C($s2) /* AB3EC 80114CEC 02E0202D */ daddu $a0, $s7, $zero /* AB3F0 80114CF0 AFA20010 */ sw $v0, 0x10($sp) /* AB3F4 80114CF4 8E420040 */ lw $v0, 0x40($s2) /* AB3F8 80114CF8 3C108015 */ lui $s0, %hi(mdl_nextTextureAddress) /* AB3FC 80114CFC 26103368 */ addiu $s0, $s0, %lo(mdl_nextTextureAddress) /* AB400 80114D00 AFA00018 */ sw $zero, 0x18($sp) /* AB404 80114D04 AFA0001C */ sw $zero, 0x1C($sp) /* AB408 80114D08 AFA00020 */ sw $zero, 0x20($sp) /* AB40C 80114D0C AFA00024 */ sw $zero, 0x24($sp) /* AB410 80114D10 AFA20014 */ sw $v0, 0x14($sp) /* AB414 80114D14 8E460034 */ lw $a2, 0x34($s2) /* AB418 80114D18 8E470038 */ lw $a3, 0x38($s2) /* AB41C 80114D1C 0C04603A */ jal func_801180E8 /* AB420 80114D20 0200282D */ daddu $a1, $s0, $zero /* AB424 80114D24 8E020000 */ lw $v0, 0x0($s0) /* AB428 80114D28 0040182D */ daddu $v1, $v0, $zero /* AB42C 80114D2C 24420008 */ addiu $v0, $v0, 0x8 /* AB430 80114D30 AE020000 */ sw $v0, 0x0($s0) /* AB434 80114D34 3C02DF00 */ lui $v0, (0xDF000000 >> 16) /* AB438 80114D38 AC620000 */ sw $v0, 0x0($v1) /* AB43C 80114D3C AC600004 */ sw $zero, 0x4($v1) /* AB440 80114D40 8FBF0048 */ lw $ra, 0x48($sp) /* AB444 80114D44 8FB70044 */ lw $s7, 0x44($sp) /* AB448 80114D48 8FB60040 */ lw $s6, 0x40($sp) /* AB44C 80114D4C 8FB5003C */ lw $s5, 0x3C($sp) /* AB450 80114D50 8FB40038 */ lw $s4, 0x38($sp) /* AB454 80114D54 8FB30034 */ lw $s3, 0x34($sp) /* AB458 80114D58 8FB20030 */ lw $s2, 0x30($sp) /* AB45C 80114D5C 8FB1002C */ lw $s1, 0x2C($sp) /* AB460 80114D60 8FB00028 */ lw $s0, 0x28($sp) /* AB464 80114D64 03E00008 */ jr $ra /* AB468 80114D68 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void func_80114B58(u32 romOffset, TextureHandle* handle, TextureHeader* header, s32 mainSize, s32 mainPalSize, s32 auxSize, s32 auxPalSize) { Gfx** temp; handle->raster = (IMG_PTR) mdl_nextTextureAddress; if (mainPalSize != 0) { handle->palette = (PAL_PTR) (mdl_nextTextureAddress + mainSize); } else { handle->palette = NULL; } dma_copy((u8*) romOffset, (u8*) (romOffset + mainSize + mainPalSize), mdl_nextTextureAddress); romOffset += mainSize + mainPalSize; mdl_nextTextureAddress += mainSize + mainPalSize; if (auxSize != 0) { handle->auxRaster = (IMG_PTR) mdl_nextTextureAddress; if (auxPalSize != 0) { handle->auxPalette = (PAL_PTR) (mdl_nextTextureAddress + auxSize); } else { handle->auxPalette = NULL; } dma_copy((u8*) romOffset, (u8*) (romOffset + auxSize + auxPalSize), mdl_nextTextureAddress); mdl_nextTextureAddress += auxSize + auxPalSize; } else { handle->auxPalette = NULL; handle->auxRaster = NULL; } handle->gfx = (Gfx*) mdl_nextTextureAddress; memcpy(&handle->header, header, sizeof(*header)); func_801180E8(header, (Gfx**)&mdl_nextTextureAddress, handle->raster, handle->palette, handle->auxRaster, handle->auxPalette, 0, 0, 0, 0); temp = (Gfx**) &mdl_nextTextureAddress; gSPEndDisplayList((*temp)++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel flower_splash_main /* 32C988 E00101E8 27BDFF80 */ addiu $sp, $sp, -0x80 /* 32C98C E00101EC F7BA0068 */ sdc1 $f26, 0x68($sp) /* 32C990 E00101F0 46006686 */ mov.s $f26, $f12 /* 32C994 E00101F4 F7BC0070 */ sdc1 $f28, 0x70($sp) /* 32C998 E00101F8 46007706 */ mov.s $f28, $f14 /* 32C99C E00101FC 27A40010 */ addiu $a0, $sp, 0x10 /* 32C9A0 E0010200 F7BE0078 */ sdc1 $f30, 0x78($sp) /* 32C9A4 E0010204 4486F000 */ mtc1 $a2, $f30 /* 32C9A8 E0010208 3C02E001 */ lui $v0, %hi(flower_splash_init) /* 32C9AC E001020C 244203EC */ addiu $v0, $v0, %lo(flower_splash_init) /* 32C9B0 E0010210 AFA20018 */ sw $v0, 0x18($sp) /* 32C9B4 E0010214 3C02E001 */ lui $v0, %hi(flower_splash_update) /* 32C9B8 E0010218 244203F4 */ addiu $v0, $v0, %lo(flower_splash_update) /* 32C9BC E001021C AFA2001C */ sw $v0, 0x1C($sp) /* 32C9C0 E0010220 3C02E001 */ lui $v0, %hi(flower_splash_render) /* 32C9C4 E0010224 244204B0 */ addiu $v0, $v0, %lo(flower_splash_render) /* 32C9C8 E0010228 AFA20020 */ sw $v0, 0x20($sp) /* 32C9CC E001022C 24020008 */ addiu $v0, $zero, 0x8 /* 32C9D0 E0010230 AFBF0048 */ sw $ra, 0x48($sp) /* 32C9D4 E0010234 AFB70044 */ sw $s7, 0x44($sp) /* 32C9D8 E0010238 AFB60040 */ sw $s6, 0x40($sp) /* 32C9DC E001023C AFB5003C */ sw $s5, 0x3C($sp) /* 32C9E0 E0010240 AFB40038 */ sw $s4, 0x38($sp) /* 32C9E4 E0010244 AFB30034 */ sw $s3, 0x34($sp) /* 32C9E8 E0010248 AFB20030 */ sw $s2, 0x30($sp) /* 32C9EC E001024C AFB1002C */ sw $s1, 0x2C($sp) /* 32C9F0 E0010250 AFB00028 */ sw $s0, 0x28($sp) /* 32C9F4 E0010254 F7B80060 */ sdc1 $f24, 0x60($sp) /* 32C9F8 E0010258 F7B60058 */ sdc1 $f22, 0x58($sp) /* 32C9FC E001025C F7B40050 */ sdc1 $f20, 0x50($sp) /* 32CA00 E0010260 AFA7008C */ sw $a3, 0x8C($sp) /* 32CA04 E0010264 AFA00010 */ sw $zero, 0x10($sp) /* 32CA08 E0010268 AFA00024 */ sw $zero, 0x24($sp) /* 32CA0C E001026C 0C080124 */ jal shim_create_effect_instance /* 32CA10 E0010270 AFA20014 */ sw $v0, 0x14($sp) /* 32CA14 E0010274 240402F8 */ addiu $a0, $zero, 0x2F8 /* 32CA18 E0010278 24140005 */ addiu $s4, $zero, 0x5 /* 32CA1C E001027C 0040802D */ daddu $s0, $v0, $zero /* 32CA20 E0010280 0C08012C */ jal shim_general_heap_malloc /* 32CA24 E0010284 AE140008 */ sw $s4, 0x8($s0) /* 32CA28 E0010288 0040882D */ daddu $s1, $v0, $zero /* 32CA2C E001028C 16200003 */ bnez $s1, .LE001029C /* 32CA30 E0010290 AE11000C */ sw $s1, 0xC($s0) .LE0010294: /* 32CA34 E0010294 080040A5 */ j .LE0010294 /* 32CA38 E0010298 00000000 */ nop .LE001029C: /* 32CA3C E001029C 0220202D */ daddu $a0, $s1, $zero /* 32CA40 E00102A0 00142880 */ sll $a1, $s4, 2 /* 32CA44 E00102A4 00B42821 */ addu $a1, $a1, $s4 /* 32CA48 E00102A8 00052880 */ sll $a1, $a1, 2 /* 32CA4C E00102AC 00B42823 */ subu $a1, $a1, $s4 /* 32CA50 E00102B0 0C080130 */ jal shim_mem_clear /* 32CA54 E00102B4 000528C0 */ sll $a1, $a1, 3 /* 32CA58 E00102B8 1280003B */ beqz $s4, .LE00103A8 /* 32CA5C E00102BC 0000902D */ daddu $s2, $zero, $zero /* 32CA60 E00102C0 24170001 */ addiu $s7, $zero, 0x1 /* 32CA64 E00102C4 241600FF */ addiu $s6, $zero, 0xFF /* 32CA68 E00102C8 2415003C */ addiu $s5, $zero, 0x3C /* 32CA6C E00102CC 26300094 */ addiu $s0, $s1, 0x94 /* 32CA70 E00102D0 0240982D */ daddu $s3, $s2, $zero /* 32CA74 E00102D4 3C013E99 */ lui $at, (0x3E999999 >> 16) /* 32CA78 E00102D8 34219999 */ ori $at, $at, (0x3E999999 & 0xFFFF) /* 32CA7C E00102DC 4481C000 */ mtc1 $at, $f24 /* 32CA80 E00102E0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 32CA84 E00102E4 4481B000 */ mtc1 $at, $f22 .LE00102E8: /* 32CA88 E00102E8 44930000 */ mtc1 $s3, $f0 /* 32CA8C E00102EC 00000000 */ nop /* 32CA90 E00102F0 46800020 */ cvt.s.w $f0, $f0 /* 32CA94 E00102F4 26730048 */ addiu $s3, $s3, 0x48 /* 32CA98 E00102F8 C7A6008C */ lwc1 $f6, 0x8C($sp) /* 32CA9C E00102FC 3C01BDA3 */ lui $at, (0xBDA3D70A >> 16) /* 32CAA0 E0010300 3421D70A */ ori $at, $at, (0xBDA3D70A & 0xFFFF) /* 32CAA4 E0010304 44811000 */ mtc1 $at, $f2 /* 32CAA8 E0010308 3C01C079 */ lui $at, (0xC079999A >> 16) /* 32CAAC E001030C 3421999A */ ori $at, $at, (0xC079999A & 0xFFFF) /* 32CAB0 E0010310 44812000 */ mtc1 $at, $f4 /* 32CAB4 E0010314 46003000 */ add.s $f0, $f6, $f0 /* 32CAB8 E0010318 26520001 */ addiu $s2, $s2, 0x1 /* 32CABC E001031C AE370000 */ sw $s7, 0x0($s1) /* 32CAC0 E0010320 E600FF94 */ swc1 $f0, -0x6C($s0) /* 32CAC4 E0010324 46000306 */ mov.s $f12, $f0 /* 32CAC8 E0010328 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 32CACC E001032C 44810000 */ mtc1 $at, $f0 /* 32CAD0 E0010330 26310098 */ addiu $s1, $s1, 0x98 /* 32CAD4 E0010334 E618FFE0 */ swc1 $f24, -0x20($s0) /* 32CAD8 E0010338 AE00FFE4 */ sw $zero, -0x1C($s0) /* 32CADC E001033C AE00FFE8 */ sw $zero, -0x18($s0) /* 32CAE0 E0010340 E61AFF78 */ swc1 $f26, -0x88($s0) /* 32CAE4 E0010344 E61CFF7C */ swc1 $f28, -0x84($s0) /* 32CAE8 E0010348 E61EFF80 */ swc1 $f30, -0x80($s0) /* 32CAEC E001034C E616FF84 */ swc1 $f22, -0x7C($s0) /* 32CAF0 E0010350 E616FF88 */ swc1 $f22, -0x78($s0) /* 32CAF4 E0010354 E616FF8C */ swc1 $f22, -0x74($s0) /* 32CAF8 E0010358 A216FF74 */ sb $s6, -0x8C($s0) /* 32CAFC E001035C A615FF72 */ sh $s5, -0x8E($s0) /* 32CB00 E0010360 AE00FF90 */ sw $zero, -0x70($s0) /* 32CB04 E0010364 AE00FF98 */ sw $zero, -0x68($s0) /* 32CB08 E0010368 AE00FFF4 */ sw $zero, -0xC($s0) /* 32CB0C E001036C AE00FFF8 */ sw $zero, -0x8($s0) /* 32CB10 E0010370 E602FFF0 */ swc1 $f2, -0x10($s0) /* 32CB14 E0010374 E604FFDC */ swc1 $f4, -0x24($s0) /* 32CB18 E0010378 0C08013C */ jal shim_clamp_angle /* 32CB1C E001037C E600FFEC */ swc1 $f0, -0x14($s0) /* 32CB20 E0010380 46000506 */ mov.s $f20, $f0 /* 32CB24 E0010384 0C080140 */ jal shim_sin_deg /* 32CB28 E0010388 4600A306 */ mov.s $f12, $f20 /* 32CB2C E001038C 4600A306 */ mov.s $f12, $f20 /* 32CB30 E0010390 0C080144 */ jal shim_cos_deg /* 32CB34 E0010394 E600FFFC */ swc1 $f0, -0x4($s0) /* 32CB38 E0010398 E6000000 */ swc1 $f0, 0x0($s0) /* 32CB3C E001039C 0254102A */ slt $v0, $s2, $s4 /* 32CB40 E00103A0 1440FFD1 */ bnez $v0, .LE00102E8 /* 32CB44 E00103A4 26100098 */ addiu $s0, $s0, 0x98 .LE00103A8: /* 32CB48 E00103A8 8FBF0048 */ lw $ra, 0x48($sp) /* 32CB4C E00103AC 8FB70044 */ lw $s7, 0x44($sp) /* 32CB50 E00103B0 8FB60040 */ lw $s6, 0x40($sp) /* 32CB54 E00103B4 8FB5003C */ lw $s5, 0x3C($sp) /* 32CB58 E00103B8 8FB40038 */ lw $s4, 0x38($sp) /* 32CB5C E00103BC 8FB30034 */ lw $s3, 0x34($sp) /* 32CB60 E00103C0 8FB20030 */ lw $s2, 0x30($sp) /* 32CB64 E00103C4 8FB1002C */ lw $s1, 0x2C($sp) /* 32CB68 E00103C8 8FB00028 */ lw $s0, 0x28($sp) /* 32CB6C E00103CC D7BE0078 */ ldc1 $f30, 0x78($sp) /* 32CB70 E00103D0 D7BC0070 */ ldc1 $f28, 0x70($sp) /* 32CB74 E00103D4 D7BA0068 */ ldc1 $f26, 0x68($sp) /* 32CB78 E00103D8 D7B80060 */ ldc1 $f24, 0x60($sp) /* 32CB7C E00103DC D7B60058 */ ldc1 $f22, 0x58($sp) /* 32CB80 E00103E0 D7B40050 */ ldc1 $f20, 0x50($sp) /* 32CB84 E00103E4 03E00008 */ jr $ra /* 32CB88 E00103E8 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: void flower_splash_main(f32 posX, f32 posY, f32 posZ, f32 angle) { EffectBlueprint bp; EffectInstance* effect; FlowerFXData* part; s32 numParts = 5; f32 partAngle; s32 i; bp.init = flower_splash_init; bp.update = flower_splash_update; bp.renderWorld = flower_splash_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_FLOWER_SPLASH; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; part = effect->data.flowerSplash = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.flowerSplash != NULL); shim_mem_clear(part, numParts * sizeof(*part)); for (i = 0; i < numParts; i++, part++) { part->alive = TRUE; part->rot.y = angle + (i * 72); part->velocityScaleB = 0.29999998f; part->visibilityAmt = 0.0f; part->unk_7C = 0.0f; part->pos.x = posX; part->pos.y = posY; part->pos.z = posZ; part->scale.x = 1.0f; part->scale.y = 1.0f; part->scale.z = 1.0f; part->primAlpha = 255; part->timeLeft = 60; part->rot.x = 0.0f; part->rot.z = 0.0f; part->integrator[0] = 1.75f; part->integrator[1] = -0.08f; part->integrator[2] = 0.0f; part->integrator[3] = 0.0f; part->velocityScaleA = -3.9f; partAngle = shim_clamp_angle(part->rot.y); part->velocity.x = shim_sin_deg(partAngle); part->velocity.z = shim_cos_deg(partAngle); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel merlin_house_stars_update /* 3A5674 E00A6124 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 3A5678 E00A6128 AFBF0010 */ sw $ra, 0x10($sp) /* 3A567C E00A612C 8C830000 */ lw $v1, 0x0($a0) /* 3A5680 E00A6130 8C85000C */ lw $a1, 0xC($a0) /* 3A5684 E00A6134 30620010 */ andi $v0, $v1, 0x10 /* 3A5688 E00A6138 10400005 */ beqz $v0, .LE00A6150 /* 3A568C E00A613C 2402FFEF */ addiu $v0, $zero, -0x11 /* 3A5690 E00A6140 00621024 */ and $v0, $v1, $v0 /* 3A5694 E00A6144 AC820000 */ sw $v0, 0x0($a0) /* 3A5698 E00A6148 2402001E */ addiu $v0, $zero, 0x1E /* 3A569C E00A614C ACA20004 */ sw $v0, 0x4($a1) .LE00A6150: /* 3A56A0 E00A6150 8CA30004 */ lw $v1, 0x4($a1) /* 3A56A4 E00A6154 28620064 */ slti $v0, $v1, 0x64 /* 3A56A8 E00A6158 10400002 */ beqz $v0, .LE00A6164 /* 3A56AC E00A615C 2462FFFF */ addiu $v0, $v1, -0x1 /* 3A56B0 E00A6160 ACA20004 */ sw $v0, 0x4($a1) .LE00A6164: /* 3A56B4 E00A6164 8CA20008 */ lw $v0, 0x8($a1) /* 3A56B8 E00A6168 8CA30004 */ lw $v1, 0x4($a1) /* 3A56BC E00A616C 24420001 */ addiu $v0, $v0, 0x1 /* 3A56C0 E00A6170 04610005 */ bgez $v1, .LE00A6188 /* 3A56C4 E00A6174 ACA20008 */ sw $v0, 0x8($a1) /* 3A56C8 E00A6178 0C080128 */ jal shim_remove_effect /* 3A56CC E00A617C 00000000 */ nop /* 3A56D0 E00A6180 080298D3 */ j .LE00A634C /* 3A56D4 E00A6184 00000000 */ nop .LE00A6188: /* 3A56D8 E00A6188 C4A2001C */ lwc1 $f2, 0x1C($a1) /* 3A56DC E00A618C C4A0002C */ lwc1 $f0, 0x2C($a1) /* 3A56E0 E00A6190 C4A60020 */ lwc1 $f6, 0x20($a1) /* 3A56E4 E00A6194 C4A40024 */ lwc1 $f4, 0x24($a1) /* 3A56E8 E00A6198 46001080 */ add.s $f2, $f2, $f0 /* 3A56EC E00A619C C4A00030 */ lwc1 $f0, 0x30($a1) /* 3A56F0 E00A61A0 8CA40008 */ lw $a0, 0x8($a1) /* 3A56F4 E00A61A4 46003180 */ add.s $f6, $f6, $f0 /* 3A56F8 E00A61A8 C4A00034 */ lwc1 $f0, 0x34($a1) /* 3A56FC E00A61AC 8CA30004 */ lw $v1, 0x4($a1) /* 3A5700 E00A61B0 46002100 */ add.s $f4, $f4, $f0 /* 3A5704 E00A61B4 C4A00028 */ lwc1 $f0, 0x28($a1) /* 3A5708 E00A61B8 E4A2001C */ swc1 $f2, 0x1C($a1) /* 3A570C E00A61BC C4A20038 */ lwc1 $f2, 0x38($a1) /* 3A5710 E00A61C0 28820011 */ slti $v0, $a0, 0x11 /* 3A5714 E00A61C4 46020000 */ add.s $f0, $f0, $f2 /* 3A5718 E00A61C8 E4A60020 */ swc1 $f6, 0x20($a1) /* 3A571C E00A61CC E4A40024 */ swc1 $f4, 0x24($a1) /* 3A5720 E00A61D0 10400004 */ beqz $v0, .LE00A61E4 /* 3A5724 E00A61D4 E4A00028 */ swc1 $f0, 0x28($a1) /* 3A5728 E00A61D8 00041100 */ sll $v0, $a0, 4 /* 3A572C E00A61DC 2442FFFF */ addiu $v0, $v0, -0x1 /* 3A5730 E00A61E0 ACA20018 */ sw $v0, 0x18($a1) .LE00A61E4: /* 3A5734 E00A61E4 28620010 */ slti $v0, $v1, 0x10 /* 3A5738 E00A61E8 10400002 */ beqz $v0, .LE00A61F4 /* 3A573C E00A61EC 00031100 */ sll $v0, $v1, 4 /* 3A5740 E00A61F0 ACA20018 */ sw $v0, 0x18($a1) .LE00A61F4: /* 3A5744 E00A61F4 C4A2001C */ lwc1 $f2, 0x1C($a1) /* 3A5748 E00A61F8 44800000 */ mtc1 $zero, $f0 /* 3A574C E00A61FC 00000000 */ nop /* 3A5750 E00A6200 4600103C */ c.lt.s $f2, $f0 /* 3A5754 E00A6204 00000000 */ nop /* 3A5758 E00A6208 45000005 */ bc1f .LE00A6220 /* 3A575C E00A620C 00000000 */ nop /* 3A5760 E00A6210 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A5764 E00A6214 44810000 */ mtc1 $at, $f0 /* 3A5768 E00A6218 08029890 */ j .LE00A6240 /* 3A576C E00A621C 46001000 */ add.s $f0, $f2, $f0 .LE00A6220: /* 3A5770 E00A6220 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A5774 E00A6224 44810000 */ mtc1 $at, $f0 /* 3A5778 E00A6228 00000000 */ nop /* 3A577C E00A622C 4602003C */ c.lt.s $f0, $f2 /* 3A5780 E00A6230 00000000 */ nop /* 3A5784 E00A6234 45000003 */ bc1f .LE00A6244 /* 3A5788 E00A6238 00000000 */ nop /* 3A578C E00A623C 46001001 */ sub.s $f0, $f2, $f0 .LE00A6240: /* 3A5790 E00A6240 E4A0001C */ swc1 $f0, 0x1C($a1) .LE00A6244: /* 3A5794 E00A6244 C4A00020 */ lwc1 $f0, 0x20($a1) /* 3A5798 E00A6248 C4A20030 */ lwc1 $f2, 0x30($a1) /* 3A579C E00A624C 46020080 */ add.s $f2, $f0, $f2 /* 3A57A0 E00A6250 44800000 */ mtc1 $zero, $f0 /* 3A57A4 E00A6254 00000000 */ nop /* 3A57A8 E00A6258 4600103C */ c.lt.s $f2, $f0 /* 3A57AC E00A625C 00000000 */ nop /* 3A57B0 E00A6260 45000005 */ bc1f .LE00A6278 /* 3A57B4 E00A6264 E4A20020 */ swc1 $f2, 0x20($a1) /* 3A57B8 E00A6268 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A57BC E00A626C 44810000 */ mtc1 $at, $f0 /* 3A57C0 E00A6270 080298A6 */ j .LE00A6298 /* 3A57C4 E00A6274 46001000 */ add.s $f0, $f2, $f0 .LE00A6278: /* 3A57C8 E00A6278 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A57CC E00A627C 44810000 */ mtc1 $at, $f0 /* 3A57D0 E00A6280 00000000 */ nop /* 3A57D4 E00A6284 4602003C */ c.lt.s $f0, $f2 /* 3A57D8 E00A6288 00000000 */ nop /* 3A57DC E00A628C 45000003 */ bc1f .LE00A629C /* 3A57E0 E00A6290 00000000 */ nop /* 3A57E4 E00A6294 46001001 */ sub.s $f0, $f2, $f0 .LE00A6298: /* 3A57E8 E00A6298 E4A00020 */ swc1 $f0, 0x20($a1) .LE00A629C: /* 3A57EC E00A629C C4A00024 */ lwc1 $f0, 0x24($a1) /* 3A57F0 E00A62A0 C4A20034 */ lwc1 $f2, 0x34($a1) /* 3A57F4 E00A62A4 46020080 */ add.s $f2, $f0, $f2 /* 3A57F8 E00A62A8 44800000 */ mtc1 $zero, $f0 /* 3A57FC E00A62AC 00000000 */ nop /* 3A5800 E00A62B0 4600103C */ c.lt.s $f2, $f0 /* 3A5804 E00A62B4 00000000 */ nop /* 3A5808 E00A62B8 45000005 */ bc1f .LE00A62D0 /* 3A580C E00A62BC E4A20024 */ swc1 $f2, 0x24($a1) /* 3A5810 E00A62C0 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A5814 E00A62C4 44810000 */ mtc1 $at, $f0 /* 3A5818 E00A62C8 080298BC */ j .LE00A62F0 /* 3A581C E00A62CC 46001000 */ add.s $f0, $f2, $f0 .LE00A62D0: /* 3A5820 E00A62D0 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A5824 E00A62D4 44810000 */ mtc1 $at, $f0 /* 3A5828 E00A62D8 00000000 */ nop /* 3A582C E00A62DC 4602003C */ c.lt.s $f0, $f2 /* 3A5830 E00A62E0 00000000 */ nop /* 3A5834 E00A62E4 45000003 */ bc1f .LE00A62F4 /* 3A5838 E00A62E8 00000000 */ nop /* 3A583C E00A62EC 46001001 */ sub.s $f0, $f2, $f0 .LE00A62F0: /* 3A5840 E00A62F0 E4A00024 */ swc1 $f0, 0x24($a1) .LE00A62F4: /* 3A5844 E00A62F4 C4A00028 */ lwc1 $f0, 0x28($a1) /* 3A5848 E00A62F8 C4A20038 */ lwc1 $f2, 0x38($a1) /* 3A584C E00A62FC 46020080 */ add.s $f2, $f0, $f2 /* 3A5850 E00A6300 44800000 */ mtc1 $zero, $f0 /* 3A5854 E00A6304 00000000 */ nop /* 3A5858 E00A6308 4600103C */ c.lt.s $f2, $f0 /* 3A585C E00A630C 00000000 */ nop /* 3A5860 E00A6310 45000005 */ bc1f .LE00A6328 /* 3A5864 E00A6314 E4A20028 */ swc1 $f2, 0x28($a1) /* 3A5868 E00A6318 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A586C E00A631C 44810000 */ mtc1 $at, $f0 /* 3A5870 E00A6320 080298D2 */ j .LE00A6348 /* 3A5874 E00A6324 46001000 */ add.s $f0, $f2, $f0 .LE00A6328: /* 3A5878 E00A6328 3C014300 */ lui $at, (0x43000000 >> 16) /* 3A587C E00A632C 44810000 */ mtc1 $at, $f0 /* 3A5880 E00A6330 00000000 */ nop /* 3A5884 E00A6334 4602003C */ c.lt.s $f0, $f2 /* 3A5888 E00A6338 00000000 */ nop /* 3A588C E00A633C 45000003 */ bc1f .LE00A634C /* 3A5890 E00A6340 00000000 */ nop /* 3A5894 E00A6344 46001001 */ sub.s $f0, $f2, $f0 .LE00A6348: /* 3A5898 E00A6348 E4A00028 */ swc1 $f0, 0x28($a1) .LE00A634C: /* 3A589C E00A634C 8FBF0010 */ lw $ra, 0x10($sp) /* 3A58A0 E00A6350 03E00008 */ jr $ra /* 3A58A4 E00A6354 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void merlin_house_stars_update(EffectInstance* effect) { MerlinHouseStarsFXData* data = effect->data.merlinHouseStars; s32 unk_04; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; data->unk_04 = 30; } if (data->unk_04 < 100) { data->unk_04--; } data->unk_08++; if (data->unk_04 < 0) { shim_remove_effect(effect); return; } data->unk_1C += data->unk_2C; data->unk_20 += data->unk_30; data->unk_24 += data->unk_34; data->unk_28 += data->unk_38; unk_04 = data->unk_04; if (data->unk_08 < 17) { data->unk_18 = data->unk_08 * 16 - 1; } if (unk_04 < 16) { data->unk_18 = unk_04 * 16; } if (data->unk_1C < 0.0f) { data->unk_1C += 128.0f; } else if (data->unk_1C > 128.0f) { data->unk_1C -= 128.0f; } data->unk_20 += data->unk_30; if (data->unk_20 < 0.0f) { data->unk_20 += 128.0f; } else if (data->unk_20 > 128.0f) { data->unk_20 -= 128.0f; } data->unk_24 += data->unk_34; if (data->unk_24 < 0.0f) { data->unk_24 += 128.0f; } else if (data->unk_24 > 128.0f) { data->unk_24 -= 128.0f; } data->unk_28 += data->unk_38; if (data->unk_28 < 0.0f) { data->unk_28 += 128.0f; } else if (data->unk_28 > 128.0f) { data->unk_28 -= 128.0f; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel FacePlayerTowardPoint /* F7234 802D2884 27BDFFC8 */ addiu $sp, $sp, -0x38 /* F7238 802D2888 AFB20018 */ sw $s2, 0x18($sp) /* F723C 802D288C 0080902D */ daddu $s2, $a0, $zero /* F7240 802D2890 AFB3001C */ sw $s3, 0x1C($sp) /* F7244 802D2894 3C138011 */ lui $s3, %hi(gPlayerStatus) /* F7248 802D2898 2673EFC8 */ addiu $s3, $s3, %lo(gPlayerStatus) /* F724C 802D289C AFB50024 */ sw $s5, 0x24($sp) /* F7250 802D28A0 26550074 */ addiu $s5, $s2, 0x74 /* F7254 802D28A4 AFB10014 */ sw $s1, 0x14($sp) /* F7258 802D28A8 26510078 */ addiu $s1, $s2, 0x78 /* F725C 802D28AC AFB40020 */ sw $s4, 0x20($sp) /* F7260 802D28B0 AFBF0028 */ sw $ra, 0x28($sp) /* F7264 802D28B4 AFB00010 */ sw $s0, 0x10($sp) /* F7268 802D28B8 F7B40030 */ sdc1 $f20, 0x30($sp) /* F726C 802D28BC 8E50000C */ lw $s0, 0xC($s2) /* F7270 802D28C0 10A00043 */ beqz $a1, .L802D29D0 /* F7274 802D28C4 2654007C */ addiu $s4, $s2, 0x7C /* F7278 802D28C8 8E050000 */ lw $a1, 0x0($s0) /* F727C 802D28CC 0C0B210B */ jal evt_get_float_variable /* F7280 802D28D0 26100004 */ addiu $s0, $s0, 0x4 /* F7284 802D28D4 0240202D */ daddu $a0, $s2, $zero /* F7288 802D28D8 8E050000 */ lw $a1, 0x0($s0) /* F728C 802D28DC 0C0B210B */ jal evt_get_float_variable /* F7290 802D28E0 46000506 */ mov.s $f20, $f0 /* F7294 802D28E4 3C02802E */ lui $v0, %hi(playerNpc) /* F7298 802D28E8 8C429D20 */ lw $v0, %lo(playerNpc)($v0) /* F729C 802D28EC C6620080 */ lwc1 $f2, 0x80($s3) /* F72A0 802D28F0 26100004 */ addiu $s0, $s0, 0x4 /* F72A4 802D28F4 E442000C */ swc1 $f2, 0xC($v0) /* F72A8 802D28F8 E6420074 */ swc1 $f2, 0x74($s2) /* F72AC 802D28FC C66C0028 */ lwc1 $f12, 0x28($s3) /* F72B0 802D2900 46146032 */ c.eq.s $f12, $f20 /* F72B4 802D2904 00000000 */ nop /* F72B8 802D2908 45000006 */ bc1f .L802D2924 /* F72BC 802D290C 46000086 */ mov.s $f2, $f0 /* F72C0 802D2910 C6600030 */ lwc1 $f0, 0x30($s3) /* F72C4 802D2914 46020032 */ c.eq.s $f0, $f2 /* F72C8 802D2918 00000000 */ nop /* F72CC 802D291C 45010008 */ bc1t .L802D2940 /* F72D0 802D2920 00000000 */ nop .L802D2924: /* F72D4 802D2924 C66E0030 */ lwc1 $f14, 0x30($s3) /* F72D8 802D2928 4406A000 */ mfc1 $a2, $f20 /* F72DC 802D292C 44071000 */ mfc1 $a3, $f2 /* F72E0 802D2930 0C00A720 */ jal atan2 /* F72E4 802D2934 00000000 */ nop /* F72E8 802D2938 080B4A51 */ j .L802D2944 /* F72EC 802D293C 46000086 */ mov.s $f2, $f0 .L802D2940: /* F72F0 802D2940 C6620080 */ lwc1 $f2, 0x80($s3) .L802D2944: /* F72F4 802D2944 C6A00000 */ lwc1 $f0, 0x0($s5) /* F72F8 802D2948 46001001 */ sub.s $f0, $f2, $f0 /* F72FC 802D294C E6200000 */ swc1 $f0, 0x0($s1) /* F7300 802D2950 8E050000 */ lw $a1, 0x0($s0) /* F7304 802D2954 0C0B1EAF */ jal evt_get_variable /* F7308 802D2958 0240202D */ daddu $a0, $s2, $zero /* F730C 802D295C AE820000 */ sw $v0, 0x0($s4) /* F7310 802D2960 3C02802E */ lui $v0, %hi(playerNpc) /* F7314 802D2964 8C429D20 */ lw $v0, %lo(playerNpc)($v0) /* F7318 802D2968 3C01C334 */ lui $at, (0xC3340000 >> 16) /* F731C 802D296C 44810000 */ mtc1 $at, $f0 /* F7320 802D2970 A440008E */ sh $zero, 0x8E($v0) /* F7324 802D2974 C6220000 */ lwc1 $f2, 0x0($s1) /* F7328 802D2978 4600103C */ c.lt.s $f2, $f0 /* F732C 802D297C 00000000 */ nop /* F7330 802D2980 45000007 */ bc1f .L802D29A0 /* F7334 802D2984 00000000 */ nop /* F7338 802D2988 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* F733C 802D298C 44810000 */ mtc1 $at, $f0 /* F7340 802D2990 00000000 */ nop /* F7344 802D2994 46001000 */ add.s $f0, $f2, $f0 /* F7348 802D2998 E6200000 */ swc1 $f0, 0x0($s1) /* F734C 802D299C C6220000 */ lwc1 $f2, 0x0($s1) .L802D29A0: /* F7350 802D29A0 3C014334 */ lui $at, (0x43340000 >> 16) /* F7354 802D29A4 44810000 */ mtc1 $at, $f0 /* F7358 802D29A8 00000000 */ nop /* F735C 802D29AC 4602003C */ c.lt.s $f0, $f2 /* F7360 802D29B0 00000000 */ nop /* F7364 802D29B4 45000006 */ bc1f .L802D29D0 /* F7368 802D29B8 00000000 */ nop /* F736C 802D29BC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* F7370 802D29C0 44810000 */ mtc1 $at, $f0 /* F7374 802D29C4 00000000 */ nop /* F7378 802D29C8 46001001 */ sub.s $f0, $f2, $f0 /* F737C 802D29CC E6200000 */ swc1 $f0, 0x0($s1) .L802D29D0: /* F7380 802D29D0 8E820000 */ lw $v0, 0x0($s4) /* F7384 802D29D4 1C40000E */ bgtz $v0, .L802D2A10 /* F7388 802D29D8 00000000 */ nop /* F738C 802D29DC 3C10802E */ lui $s0, %hi(playerNpc) /* F7390 802D29E0 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F7394 802D29E4 8E020000 */ lw $v0, 0x0($s0) /* F7398 802D29E8 C6200000 */ lwc1 $f0, 0x0($s1) /* F739C 802D29EC C44C000C */ lwc1 $f12, 0xC($v0) /* F73A0 802D29F0 46006300 */ add.s $f12, $f12, $f0 /* F73A4 802D29F4 0C00A6C9 */ jal clamp_angle /* F73A8 802D29F8 E44C000C */ swc1 $f12, 0xC($v0) /* F73AC 802D29FC 8E030000 */ lw $v1, 0x0($s0) /* F73B0 802D2A00 24020002 */ addiu $v0, $zero, 0x2 /* F73B4 802D2A04 E460000C */ swc1 $f0, 0xC($v1) /* F73B8 802D2A08 080B4AA0 */ j .L802D2A80 /* F73BC 802D2A0C E6600080 */ swc1 $f0, 0x80($s3) .L802D2A10: /* F73C0 802D2A10 3C10802E */ lui $s0, %hi(playerNpc) /* F73C4 802D2A14 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F73C8 802D2A18 8E030000 */ lw $v1, 0x0($s0) /* F73CC 802D2A1C 9462008E */ lhu $v0, 0x8E($v1) /* F73D0 802D2A20 24420001 */ addiu $v0, $v0, 0x1 /* F73D4 802D2A24 A462008E */ sh $v0, 0x8E($v1) /* F73D8 802D2A28 00021400 */ sll $v0, $v0, 16 /* F73DC 802D2A2C 00021403 */ sra $v0, $v0, 16 /* F73E0 802D2A30 C6200000 */ lwc1 $f0, 0x0($s1) /* F73E4 802D2A34 44821000 */ mtc1 $v0, $f2 /* F73E8 802D2A38 00000000 */ nop /* F73EC 802D2A3C 468010A0 */ cvt.s.w $f2, $f2 /* F73F0 802D2A40 46020002 */ mul.s $f0, $f0, $f2 /* F73F4 802D2A44 00000000 */ nop /* F73F8 802D2A48 C6AC0000 */ lwc1 $f12, 0x0($s5) /* F73FC 802D2A4C C6820000 */ lwc1 $f2, 0x0($s4) /* F7400 802D2A50 468010A0 */ cvt.s.w $f2, $f2 /* F7404 802D2A54 46020003 */ div.s $f0, $f0, $f2 /* F7408 802D2A58 46006300 */ add.s $f12, $f12, $f0 /* F740C 802D2A5C 0C00A6C9 */ jal clamp_angle /* F7410 802D2A60 E46C000C */ swc1 $f12, 0xC($v1) /* F7414 802D2A64 8E020000 */ lw $v0, 0x0($s0) /* F7418 802D2A68 E440000C */ swc1 $f0, 0xC($v0) /* F741C 802D2A6C E6600080 */ swc1 $f0, 0x80($s3) /* F7420 802D2A70 8442008E */ lh $v0, 0x8E($v0) /* F7424 802D2A74 8E830000 */ lw $v1, 0x0($s4) /* F7428 802D2A78 0043102A */ slt $v0, $v0, $v1 /* F742C 802D2A7C 38420001 */ xori $v0, $v0, 0x1 .L802D2A80: /* F7430 802D2A80 8FBF0028 */ lw $ra, 0x28($sp) /* F7434 802D2A84 8FB50024 */ lw $s5, 0x24($sp) /* F7438 802D2A88 8FB40020 */ lw $s4, 0x20($sp) /* F743C 802D2A8C 8FB3001C */ lw $s3, 0x1C($sp) /* F7440 802D2A90 8FB20018 */ lw $s2, 0x18($sp) /* F7444 802D2A94 8FB10014 */ lw $s1, 0x14($sp) /* F7448 802D2A98 8FB00010 */ lw $s0, 0x10($sp) /* F744C 802D2A9C D7B40030 */ ldc1 $f20, 0x30($sp) /* F7450 802D2AA0 03E00008 */ jr $ra /* F7454 802D2AA4 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: ApiStatus FacePlayerTowardPoint(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; PlayerStatus* playerStatus = &gPlayerStatus; f32* initialYaw = &script->functionTempF[1]; f32* deltaYaw = &script->functionTempF[2]; s32* duration = &script->functionTemp[3]; if (isInitialCall) { f32 targetX = evt_get_float_variable(script, *args++); f32 targetY = evt_get_float_variable(script, *args++); f32 targetYaw; *initialYaw = playerNpc->yaw = playerStatus->targetYaw; if (playerStatus->position.x != targetX || playerStatus->position.z != targetY) { targetYaw = atan2(playerStatus->position.x, playerStatus->position.z, targetX, targetY); } else { targetYaw = playerStatus->targetYaw; } *deltaYaw = targetYaw - *initialYaw; *duration = evt_get_variable(script, *args++); playerNpc->duration = 0; if (*deltaYaw < -180.0f) { *deltaYaw += 360.0f; } if (*deltaYaw > 180.0f) { *deltaYaw -= 360.0f; } } if (*duration > 0) { playerNpc->duration++; playerNpc->yaw = *initialYaw + ((*deltaYaw * playerNpc->duration) / *duration); playerStatus->targetYaw = playerNpc->yaw = clamp_angle(playerNpc->yaw); if (playerNpc->duration < *duration) { return ApiStatus_BLOCK; } else { return ApiStatus_DONE1; } } playerNpc->yaw += *deltaYaw; playerStatus->targetYaw = playerNpc->yaw = clamp_angle(playerNpc->yaw); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802550BC /* 18399C 802550BC 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 1839A0 802550C0 AFB50024 */ sw $s5, 0x24($sp) /* 1839A4 802550C4 00A0A82D */ daddu $s5, $a1, $zero /* 1839A8 802550C8 AFB40020 */ sw $s4, 0x20($sp) /* 1839AC 802550CC AFBF0030 */ sw $ra, 0x30($sp) /* 1839B0 802550D0 AFB7002C */ sw $s7, 0x2C($sp) /* 1839B4 802550D4 AFB60028 */ sw $s6, 0x28($sp) /* 1839B8 802550D8 AFB3001C */ sw $s3, 0x1C($sp) /* 1839BC 802550DC AFB20018 */ sw $s2, 0x18($sp) /* 1839C0 802550E0 AFB10014 */ sw $s1, 0x14($sp) /* 1839C4 802550E4 AFB00010 */ sw $s0, 0x10($sp) /* 1839C8 802550E8 F7B60040 */ sdc1 $f22, 0x40($sp) /* 1839CC 802550EC F7B40038 */ sdc1 $f20, 0x38($sp) /* 1839D0 802550F0 82B601F3 */ lb $s6, 0x1F3($s5) /* 1839D4 802550F4 8EB201F4 */ lw $s2, 0x1F4($s5) /* 1839D8 802550F8 1AC0006F */ blez $s6, .L802552B8 /* 1839DC 802550FC 0000A02D */ daddu $s4, $zero, $zero /* 1839E0 80255100 3C178000 */ lui $s7, (0x80000000 >> 16) /* 1839E4 80255104 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 1839E8 80255108 4481B000 */ mtc1 $at, $f22 /* 1839EC 8025510C 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 1839F0 80255110 4481A000 */ mtc1 $at, $f20 .L80255114: /* 1839F4 80255114 8E430000 */ lw $v1, 0x0($s2) /* 1839F8 80255118 30620001 */ andi $v0, $v1, 0x1 /* 1839FC 8025511C 14400006 */ bnez $v0, .L80255138 /* 183A00 80255120 00000000 */ nop /* 183A04 80255124 8E420094 */ lw $v0, 0x94($s2) /* 183A08 80255128 10400003 */ beqz $v0, .L80255138 /* 183A0C 8025512C 30620002 */ andi $v0, $v1, 0x2 /* 183A10 80255130 10400004 */ beqz $v0, .L80255144 /* 183A14 80255134 00000000 */ nop .L80255138: /* 183A18 80255138 8E52000C */ lw $s2, 0xC($s2) /* 183A1C 8025513C 080954AB */ j .L802552AC /* 183A20 80255140 26940001 */ addiu $s4, $s4, 0x1 .L80255144: /* 183A24 80255144 8E5300C0 */ lw $s3, 0xC0($s2) /* 183A28 80255148 C6400058 */ lwc1 $f0, 0x58($s2) /* 183A2C 8025514C 827107D9 */ lb $s1, 0x7D9($s3) /* 183A30 80255150 4600008D */ trunc.w.s $f2, $f0 /* 183A34 80255154 44021000 */ mfc1 $v0, $f2 /* 183A38 80255158 00111840 */ sll $v1, $s1, 1 /* 183A3C 8025515C 02631821 */ addu $v1, $s3, $v1 D_80255160: /* 183A40 80255160 A46207FC */ sh $v0, 0x7FC($v1) /* 183A44 80255164 C640005C */ lwc1 $f0, 0x5C($s2) /* 183A48 80255168 4600008D */ trunc.w.s $f2, $f0 /* 183A4C 8025516C 44021000 */ mfc1 $v0, $f2 /* 183A50 80255170 00000000 */ nop /* 183A54 80255174 A462081C */ sh $v0, 0x81C($v1) /* 183A58 80255178 C6400060 */ lwc1 $f0, 0x60($s2) /* 183A5C 8025517C 4600008D */ trunc.w.s $f2, $f0 /* 183A60 80255180 44021000 */ mfc1 $v0, $f2 /* 183A64 80255184 00000000 */ nop /* 183A68 80255188 A462083C */ sh $v0, 0x83C($v1) /* 183A6C 8025518C C6A0018C */ lwc1 $f0, 0x18C($s5) D_80255190: /* 183A70 80255190 4600008D */ trunc.w.s $f2, $f0 /* 183A74 80255194 44021000 */ mfc1 $v0, $f2 /* 183A78 80255198 00000000 */ nop /* 183A7C 8025519C A46207DC */ sh $v0, 0x7DC($v1) /* 183A80 802551A0 92A20169 */ lbu $v0, 0x169($s5) /* 183A84 802551A4 02718021 */ addu $s0, $s3, $s1 /* 183A88 802551A8 A202085C */ sb $v0, 0x85C($s0) /* 183A8C 802551AC 92A2016B */ lbu $v0, 0x16B($s5) /* 183A90 802551B0 A202086C */ sb $v0, 0x86C($s0) /* 183A94 802551B4 C6AC015C */ lwc1 $f12, 0x15C($s5) /* 183A98 802551B8 0C00A6C9 */ jal clamp_angle /* 183A9C 802551BC 2610087C */ addiu $s0, $s0, 0x87C /* 183AA0 802551C0 46160002 */ mul.s $f0, $f0, $f22 /* 183AA4 802551C4 00000000 */ nop /* 183AA8 802551C8 4600A03E */ c.le.s $f20, $f0 /* 183AAC 802551CC 00000000 */ nop /* 183AB0 802551D0 45030005 */ bc1tl .L802551E8 /* 183AB4 802551D4 46140001 */ sub.s $f0, $f0, $f20 /* 183AB8 802551D8 4600008D */ trunc.w.s $f2, $f0 /* 183ABC 802551DC 44021000 */ mfc1 $v0, $f2 /* 183AC0 802551E0 0809547F */ j .L802551FC /* 183AC4 802551E4 A2020000 */ sb $v0, 0x0($s0) .L802551E8: /* 183AC8 802551E8 4600008D */ trunc.w.s $f2, $f0 /* 183ACC 802551EC 44021000 */ mfc1 $v0, $f2 /* 183AD0 802551F0 00000000 */ nop /* 183AD4 802551F4 00571025 */ or $v0, $v0, $s7 /* 183AD8 802551F8 A2020000 */ sb $v0, 0x0($s0) .L802551FC: /* 183ADC 802551FC 0C00A6C9 */ jal clamp_angle /* 183AE0 80255200 C6AC0160 */ lwc1 $f12, 0x160($s5) /* 183AE4 80255204 46160002 */ mul.s $f0, $f0, $f22 /* 183AE8 80255208 00000000 */ nop /* 183AEC 8025520C 02711021 */ addu $v0, $s3, $s1 /* 183AF0 80255210 4600A03E */ c.le.s $f20, $f0 /* 183AF4 80255214 00000000 */ nop /* 183AF8 80255218 45010005 */ bc1t .L80255230 /* 183AFC 8025521C 2442088C */ addiu $v0, $v0, 0x88C /* 183B00 80255220 4600008D */ trunc.w.s $f2, $f0 /* 183B04 80255224 44031000 */ mfc1 $v1, $f2 /* 183B08 80255228 08095492 */ j .L80255248 /* 183B0C 8025522C A0430000 */ sb $v1, 0x0($v0) .L80255230: /* 183B10 80255230 46140001 */ sub.s $f0, $f0, $f20 /* 183B14 80255234 4600008D */ trunc.w.s $f2, $f0 /* 183B18 80255238 44031000 */ mfc1 $v1, $f2 /* 183B1C 8025523C 00000000 */ nop D_80255240: /* 183B20 80255240 00771825 */ or $v1, $v1, $s7 /* 183B24 80255244 A0430000 */ sb $v1, 0x0($v0) .L80255248: /* 183B28 80255248 0C00A6C9 */ jal clamp_angle /* 183B2C 8025524C C6AC0164 */ lwc1 $f12, 0x164($s5) /* 183B30 80255250 46160002 */ mul.s $f0, $f0, $f22 /* 183B34 80255254 00000000 */ nop /* 183B38 80255258 02711021 */ addu $v0, $s3, $s1 /* 183B3C 8025525C 4600A03E */ c.le.s $f20, $f0 /* 183B40 80255260 00000000 */ nop /* 183B44 80255264 45010005 */ bc1t .L8025527C /* 183B48 80255268 2442089C */ addiu $v0, $v0, 0x89C /* 183B4C 8025526C 4600008D */ trunc.w.s $f2, $f0 /* 183B50 80255270 44031000 */ mfc1 $v1, $f2 /* 183B54 80255274 080954A5 */ j .L80255294 /* 183B58 80255278 A0430000 */ sb $v1, 0x0($v0) .L8025527C: /* 183B5C 8025527C 46140001 */ sub.s $f0, $f0, $f20 D_80255280: /* 183B60 80255280 4600008D */ trunc.w.s $f2, $f0 /* 183B64 80255284 44031000 */ mfc1 $v1, $f2 /* 183B68 80255288 00000000 */ nop /* 183B6C 8025528C 00771825 */ or $v1, $v1, $s7 /* 183B70 80255290 A0430000 */ sb $v1, 0x0($v0) .L80255294: /* 183B74 80255294 26310001 */ addiu $s1, $s1, 0x1 /* 183B78 80255298 2A220010 */ slti $v0, $s1, 0x10 /* 183B7C 8025529C 50400001 */ beql $v0, $zero, .L802552A4 /* 183B80 802552A0 0000882D */ daddu $s1, $zero, $zero .L802552A4: /* 183B84 802552A4 A27107D9 */ sb $s1, 0x7D9($s3) /* 183B88 802552A8 26940001 */ addiu $s4, $s4, 0x1 .L802552AC: /* 183B8C 802552AC 0296102A */ slt $v0, $s4, $s6 /* 183B90 802552B0 1440FF98 */ bnez $v0, .L80255114 /* 183B94 802552B4 00000000 */ nop .L802552B8: /* 183B98 802552B8 8FBF0030 */ lw $ra, 0x30($sp) /* 183B9C 802552BC 8FB7002C */ lw $s7, 0x2C($sp) /* 183BA0 802552C0 8FB60028 */ lw $s6, 0x28($sp) /* 183BA4 802552C4 8FB50024 */ lw $s5, 0x24($sp) /* 183BA8 802552C8 8FB40020 */ lw $s4, 0x20($sp) /* 183BAC 802552CC 8FB3001C */ lw $s3, 0x1C($sp) /* 183BB0 802552D0 8FB20018 */ lw $s2, 0x18($sp) /* 183BB4 802552D4 8FB10014 */ lw $s1, 0x14($sp) /* 183BB8 802552D8 8FB00010 */ lw $s0, 0x10($sp) /* 183BBC 802552DC D7B60040 */ ldc1 $f22, 0x40($sp) /* 183BC0 802552E0 D7B40038 */ ldc1 $f20, 0x38($sp) /* 183BC4 802552E4 03E00008 */ jr $ra /* 183BC8 802552E8 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void func_802550BC(s32 arg0, Actor* actor) { s32 numParts = actor->numParts; ActorPart* partsTable = actor->partsTable; DecorationTable* decorationTable; s32 i, j; for (i = 0; i < numParts; i++) { if (partsTable->flags & ACTOR_PART_FLAG_INVISIBLE || partsTable->idleAnimations == NULL || partsTable->flags & ACTOR_PART_FLAG_2) { partsTable = partsTable->nextPart; } else { decorationTable = partsTable->decorationTable; j = decorationTable->unk_7D9; decorationTable->posX[j] = partsTable->currentPos.x; decorationTable->posY[j] = partsTable->currentPos.y; decorationTable->posZ[j] = partsTable->currentPos.z; decorationTable->yaw[j] = actor->yaw; decorationTable->rotationPivotOffsetX[j] = actor->rotationPivotOffset.x; decorationTable->rotationPivotOffsetY[j] = actor->rotationPivotOffset.y; decorationTable->rotX[j] = clamp_angle(actor->rotation.x) * 0.5f; decorationTable->rotY[j] = clamp_angle(actor->rotation.y) * 0.5f; decorationTable->rotZ[j] = clamp_angle(actor->rotation.z) * 0.5f; j++; if (j >= ARRAY_COUNT(decorationTable->posX)) { j = 0; } decorationTable->unk_7D9 = j; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ALT_clear_hud_element_cache /* DB15C 80144A5C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* DB160 80144A60 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* DB164 80144A64 27BDFFE8 */ addiu $sp, $sp, -0x18 /* DB168 80144A68 AFBF0014 */ sw $ra, 0x14($sp) /* DB16C 80144A6C AFB00010 */ sw $s0, 0x10($sp) /* DB170 80144A70 80420070 */ lb $v0, 0x70($v0) /* DB174 80144A74 14400030 */ bnez $v0, .L80144B38 /* DB178 80144A78 00000000 */ nop /* DB17C 80144A7C 3C108015 */ lui $s0, %hi(gHudElementCacheBuffer) /* DB180 80144A80 26101314 */ addiu $s0, $s0, %lo(gHudElementCacheBuffer) /* DB184 80144A84 0C00AB4B */ jal heap_free /* DB188 80144A88 8E040000 */ lw $a0, 0x0($s0) /* DB18C 80144A8C 3C048015 */ lui $a0, %hi(gHudElementCacheCapacity) /* DB190 80144A90 0C00AB39 */ jal heap_malloc /* DB194 80144A94 8C84EFC4 */ lw $a0, %lo(gHudElementCacheCapacity)($a0) /* DB198 80144A98 14400003 */ bnez $v0, .L80144AA8 /* DB19C 80144A9C AE020000 */ sw $v0, 0x0($s0) .L80144AA0: /* DB1A0 80144AA0 080512A8 */ j .L80144AA0 /* DB1A4 80144AA4 00000000 */ nop .L80144AA8: /* DB1A8 80144AA8 0000482D */ daddu $t1, $zero, $zero /* DB1AC 80144AAC 240AFFFF */ addiu $t2, $zero, -0x1 /* DB1B0 80144AB0 3C028015 */ lui $v0, %hi(gHudElementCacheTablePaletteWorld) /* DB1B4 80144AB4 24427F70 */ addiu $v0, $v0, %lo(gHudElementCacheTablePaletteWorld) /* DB1B8 80144AB8 0040402D */ daddu $t0, $v0, $zero /* DB1BC 80144ABC 3C028015 */ lui $v0, %hi(gHudElementCacheTableRasterWorld) /* DB1C0 80144AC0 24427970 */ addiu $v0, $v0, %lo(gHudElementCacheTableRasterWorld) /* DB1C4 80144AC4 0040382D */ daddu $a3, $v0, $zero /* DB1C8 80144AC8 3C068015 */ lui $a2, %hi(gHudElementCacheBuffer) /* DB1CC 80144ACC 24C61314 */ addiu $a2, $a2, %lo(gHudElementCacheBuffer) /* DB1D0 80144AD0 3C058015 */ lui $a1, %hi(gHudElementCacheSize) /* DB1D4 80144AD4 24A5133C */ addiu $a1, $a1, %lo(gHudElementCacheSize) /* DB1D8 80144AD8 8CC30000 */ lw $v1, 0x0($a2) /* DB1DC 80144ADC 8CA40000 */ lw $a0, 0x0($a1) /* DB1E0 80144AE0 3C028015 */ lui $v0, %hi(gHudElementCacheBufferWorld) /* DB1E4 80144AE4 24427964 */ addiu $v0, $v0, %lo(gHudElementCacheBufferWorld) /* DB1E8 80144AE8 AC430000 */ sw $v1, 0x0($v0) /* DB1EC 80144AEC AC800000 */ sw $zero, 0x0($a0) /* DB1F0 80144AF0 8C430000 */ lw $v1, 0x0($v0) /* DB1F4 80144AF4 3C028015 */ lui $v0, %hi(gHudElementCacheSizeWorld) /* DB1F8 80144AF8 24427968 */ addiu $v0, $v0, %lo(gHudElementCacheSizeWorld) /* DB1FC 80144AFC ACA20000 */ sw $v0, 0x0($a1) /* DB200 80144B00 3C018015 */ lui $at, %hi(gHudElementCacheTableRaster) /* DB204 80144B04 AC2712C8 */ sw $a3, %lo(gHudElementCacheTableRaster)($at) /* DB208 80144B08 3C018015 */ lui $at, %hi(gHudElementCacheTablePalette) /* DB20C 80144B0C AC2812D0 */ sw $t0, %lo(gHudElementCacheTablePalette)($at) /* DB210 80144B10 ACC30000 */ sw $v1, 0x0($a2) .L80144B14: /* DB214 80144B14 ACEA0000 */ sw $t2, 0x0($a3) /* DB218 80144B18 AD0A0000 */ sw $t2, 0x0($t0) /* DB21C 80144B1C 25080008 */ addiu $t0, $t0, 0x8 /* DB220 80144B20 25290001 */ addiu $t1, $t1, 0x1 /* DB224 80144B24 292200C0 */ slti $v0, $t1, 0xC0 /* DB228 80144B28 1440FFFA */ bnez $v0, .L80144B14 /* DB22C 80144B2C 24E70008 */ addiu $a3, $a3, 0x8 /* DB230 80144B30 08051304 */ j .L80144C10 /* DB234 80144B34 00000000 */ nop .L80144B38: /* DB238 80144B38 3C028015 */ lui $v0, %hi(gHudElementAuxCache) /* DB23C 80144B3C 8C42EFC0 */ lw $v0, %lo(gHudElementAuxCache)($v0) /* DB240 80144B40 1440000F */ bnez $v0, .L80144B80 /* DB244 80144B44 00000000 */ nop /* DB248 80144B48 3C108015 */ lui $s0, %hi(gHudElementCacheBuffer) /* DB24C 80144B4C 26101314 */ addiu $s0, $s0, %lo(gHudElementCacheBuffer) /* DB250 80144B50 0C00AB4B */ jal heap_free /* DB254 80144B54 8E040000 */ lw $a0, 0x0($s0) /* DB258 80144B58 3C048015 */ lui $a0, %hi(gHudElementCacheCapacity) /* DB25C 80144B5C 8C84EFC4 */ lw $a0, %lo(gHudElementCacheCapacity)($a0) /* DB260 80144B60 000417C2 */ srl $v0, $a0, 31 /* DB264 80144B64 00822021 */ addu $a0, $a0, $v0 /* DB268 80144B68 0C00AB39 */ jal heap_malloc /* DB26C 80144B6C 00042043 */ sra $a0, $a0, 1 /* DB270 80144B70 14400005 */ bnez $v0, .L80144B88 /* DB274 80144B74 AE020000 */ sw $v0, 0x0($s0) .L80144B78: /* DB278 80144B78 080512DE */ j .L80144B78 /* DB27C 80144B7C 00000000 */ nop .L80144B80: /* DB280 80144B80 3C018015 */ lui $at, %hi(gHudElementCacheBuffer) /* DB284 80144B84 AC221314 */ sw $v0, %lo(gHudElementCacheBuffer)($at) .L80144B88: /* DB288 80144B88 0000482D */ daddu $t1, $zero, $zero /* DB28C 80144B8C 240AFFFF */ addiu $t2, $zero, -0x1 /* DB290 80144B90 3C028016 */ lui $v0, %hi(gHudElementCacheTablePaletteBattle) /* DB294 80144B94 24428B80 */ addiu $v0, $v0, %lo(gHudElementCacheTablePaletteBattle) /* DB298 80144B98 0040402D */ daddu $t0, $v0, $zero /* DB29C 80144B9C 3C028016 */ lui $v0, %hi(gHudElementCacheTableRasterBattle) /* DB2A0 80144BA0 24428580 */ addiu $v0, $v0, %lo(gHudElementCacheTableRasterBattle) /* DB2A4 80144BA4 0040382D */ daddu $a3, $v0, $zero /* DB2A8 80144BA8 3C068015 */ lui $a2, %hi(gHudElementCacheBuffer) /* DB2AC 80144BAC 24C61314 */ addiu $a2, $a2, %lo(gHudElementCacheBuffer) /* DB2B0 80144BB0 3C058015 */ lui $a1, %hi(gHudElementCacheSize) /* DB2B4 80144BB4 24A5133C */ addiu $a1, $a1, %lo(gHudElementCacheSize) /* DB2B8 80144BB8 8CC30000 */ lw $v1, 0x0($a2) /* DB2BC 80144BBC 8CA40000 */ lw $a0, 0x0($a1) /* DB2C0 80144BC0 3C028016 */ lui $v0, %hi(gHudElementCacheBufferBattle) /* DB2C4 80144BC4 24428570 */ addiu $v0, $v0, %lo(gHudElementCacheBufferBattle) /* DB2C8 80144BC8 AC430000 */ sw $v1, 0x0($v0) /* DB2CC 80144BCC AC800000 */ sw $zero, 0x0($a0) /* DB2D0 80144BD0 8C430000 */ lw $v1, 0x0($v0) /* DB2D4 80144BD4 3C028016 */ lui $v0, %hi(gHudElementCacheSizeBattle) /* DB2D8 80144BD8 24428574 */ addiu $v0, $v0, %lo(gHudElementCacheSizeBattle) /* DB2DC 80144BDC ACA20000 */ sw $v0, 0x0($a1) /* DB2E0 80144BE0 3C018015 */ lui $at, %hi(gHudElementCacheTableRaster) /* DB2E4 80144BE4 AC2712C8 */ sw $a3, %lo(gHudElementCacheTableRaster)($at) /* DB2E8 80144BE8 3C018015 */ lui $at, %hi(gHudElementCacheTablePalette) /* DB2EC 80144BEC AC2812D0 */ sw $t0, %lo(gHudElementCacheTablePalette)($at) /* DB2F0 80144BF0 ACC30000 */ sw $v1, 0x0($a2) .L80144BF4: /* DB2F4 80144BF4 ACEA0000 */ sw $t2, 0x0($a3) /* DB2F8 80144BF8 AD0A0000 */ sw $t2, 0x0($t0) /* DB2FC 80144BFC 25080008 */ addiu $t0, $t0, 0x8 /* DB300 80144C00 25290001 */ addiu $t1, $t1, 0x1 /* DB304 80144C04 292200C0 */ slti $v0, $t1, 0xC0 /* DB308 80144C08 1440FFFA */ bnez $v0, .L80144BF4 /* DB30C 80144C0C 24E70008 */ addiu $a3, $a3, 0x8 .L80144C10: /* DB310 80144C10 8FBF0014 */ lw $ra, 0x14($sp) /* DB314 80144C14 8FB00010 */ lw $s0, 0x10($sp) /* DB318 80144C18 03E00008 */ jr $ra /* DB31C 80144C1C 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void ALT_clear_hud_element_cache(void) { s32 i; if (!gGameStatusPtr->isBattle) { heap_free(gHudElementCacheBuffer); gHudElementCacheBuffer = heap_malloc(gHudElementCacheCapacity); ASSERT(gHudElementCacheBuffer); gHudElementCacheBufferWorld = gHudElementCacheBuffer; *gHudElementCacheSize = 0; gHudElementCacheSize = &gHudElementCacheSizeWorld; gHudElementCacheTableRaster = gHudElementCacheTableRasterWorld; gHudElementCacheTablePalette = gHudElementCacheTablePaletteWorld; gHudElementCacheBuffer = gHudElementCacheBufferWorld; for (i = 0; i < MAX_HUD_CACHE_ENTRIES; i++) { gHudElementCacheTableRasterWorld[i].id = -1; gHudElementCacheTablePaletteWorld[i].id = -1; } } else { if (gHudElementAuxCache == NULL) { heap_free(gHudElementCacheBuffer); gHudElementCacheBuffer = heap_malloc(gHudElementCacheCapacity / 2); ASSERT(gHudElementCacheBuffer); } else { gHudElementCacheBuffer = gHudElementAuxCache; } gHudElementCacheBufferBattle = gHudElementCacheBuffer; *gHudElementCacheSize = 0; gHudElementCacheSize = &gHudElementCacheSizeBattle; gHudElementCacheTableRaster = gHudElementCacheTableRasterBattle; gHudElementCacheTablePalette = gHudElementCacheTablePaletteBattle; gHudElementCacheBuffer = gHudElementCacheBufferBattle; for (i = 0; i < MAX_HUD_CACHE_ENTRIES; i++) { gHudElementCacheTableRasterBattle[i].id = -1; gHudElementCacheTablePaletteBattle[i].id = -1; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ShowSweat /* FC7B8 802D7E08 27BDFFA0 */ addiu $sp, $sp, -0x60 /* FC7BC 802D7E0C AFB10024 */ sw $s1, 0x24($sp) /* FC7C0 802D7E10 0080882D */ daddu $s1, $a0, $zero /* FC7C4 802D7E14 AFBF0034 */ sw $ra, 0x34($sp) /* FC7C8 802D7E18 AFB40030 */ sw $s4, 0x30($sp) /* FC7CC 802D7E1C AFB3002C */ sw $s3, 0x2C($sp) /* FC7D0 802D7E20 AFB20028 */ sw $s2, 0x28($sp) /* FC7D4 802D7E24 AFB00020 */ sw $s0, 0x20($sp) /* FC7D8 802D7E28 F7BC0058 */ sdc1 $f28, 0x58($sp) /* FC7DC 802D7E2C F7BA0050 */ sdc1 $f26, 0x50($sp) /* FC7E0 802D7E30 F7B80048 */ sdc1 $f24, 0x48($sp) /* FC7E4 802D7E34 F7B60040 */ sdc1 $f22, 0x40($sp) /* FC7E8 802D7E38 F7B40038 */ sdc1 $f20, 0x38($sp) /* FC7EC 802D7E3C 8E30000C */ lw $s0, 0xC($s1) /* FC7F0 802D7E40 8E050000 */ lw $a1, 0x0($s0) /* FC7F4 802D7E44 0C0B1EAF */ jal evt_get_variable /* FC7F8 802D7E48 26100004 */ addiu $s0, $s0, 0x4 /* FC7FC 802D7E4C 8E050000 */ lw $a1, 0x0($s0) /* FC800 802D7E50 26100004 */ addiu $s0, $s0, 0x4 /* FC804 802D7E54 0220202D */ daddu $a0, $s1, $zero /* FC808 802D7E58 0C0B1EAF */ jal evt_get_variable /* FC80C 802D7E5C 0040982D */ daddu $s3, $v0, $zero /* FC810 802D7E60 8E050000 */ lw $a1, 0x0($s0) /* FC814 802D7E64 26100004 */ addiu $s0, $s0, 0x4 /* FC818 802D7E68 0220202D */ daddu $a0, $s1, $zero /* FC81C 802D7E6C 0C0B210B */ jal evt_get_float_variable /* FC820 802D7E70 0040A02D */ daddu $s4, $v0, $zero /* FC824 802D7E74 8E050000 */ lw $a1, 0x0($s0) /* FC828 802D7E78 26100004 */ addiu $s0, $s0, 0x4 /* FC82C 802D7E7C 0220202D */ daddu $a0, $s1, $zero /* FC830 802D7E80 0C0B1EAF */ jal evt_get_variable /* FC834 802D7E84 46000706 */ mov.s $f28, $f0 /* FC838 802D7E88 8E050000 */ lw $a1, 0x0($s0) /* FC83C 802D7E8C 26100004 */ addiu $s0, $s0, 0x4 /* FC840 802D7E90 0220202D */ daddu $a0, $s1, $zero /* FC844 802D7E94 0C0B210B */ jal evt_get_float_variable /* FC848 802D7E98 0040902D */ daddu $s2, $v0, $zero /* FC84C 802D7E9C 8E050000 */ lw $a1, 0x0($s0) /* FC850 802D7EA0 26100004 */ addiu $s0, $s0, 0x4 /* FC854 802D7EA4 0220202D */ daddu $a0, $s1, $zero /* FC858 802D7EA8 0C0B210B */ jal evt_get_float_variable /* FC85C 802D7EAC 46000686 */ mov.s $f26, $f0 /* FC860 802D7EB0 8E050000 */ lw $a1, 0x0($s0) /* FC864 802D7EB4 26100004 */ addiu $s0, $s0, 0x4 /* FC868 802D7EB8 0220202D */ daddu $a0, $s1, $zero /* FC86C 802D7EBC 0C0B210B */ jal evt_get_float_variable /* FC870 802D7EC0 46000606 */ mov.s $f24, $f0 /* FC874 802D7EC4 8E050000 */ lw $a1, 0x0($s0) /* FC878 802D7EC8 26100004 */ addiu $s0, $s0, 0x4 /* FC87C 802D7ECC 0220202D */ daddu $a0, $s1, $zero /* FC880 802D7ED0 0C0B210B */ jal evt_get_float_variable /* FC884 802D7ED4 46000586 */ mov.s $f22, $f0 /* FC888 802D7ED8 0220202D */ daddu $a0, $s1, $zero /* FC88C 802D7EDC 8E050000 */ lw $a1, 0x0($s0) /* FC890 802D7EE0 0C0B1EAF */ jal evt_get_variable /* FC894 802D7EE4 46000506 */ mov.s $f20, $f0 /* FC898 802D7EE8 12400006 */ beqz $s2, .L802D7F04 /* FC89C 802D7EEC 0040802D */ daddu $s0, $v0, $zero /* FC8A0 802D7EF0 24020001 */ addiu $v0, $zero, 0x1 /* FC8A4 802D7EF4 12420014 */ beq $s2, $v0, .L802D7F48 /* FC8A8 802D7EF8 4600D206 */ mov.s $f8, $f26 /* FC8AC 802D7EFC 080B5FF2 */ j .L802D7FC8 /* FC8B0 802D7F00 4600C006 */ mov.s $f0, $f24 .L802D7F04: /* FC8B4 802D7F04 3C055555 */ lui $a1, (0x55555556 >> 16) /* FC8B8 802D7F08 3C048011 */ lui $a0, %hi(gPlayerStatus) /* FC8BC 802D7F0C 2484EFC8 */ addiu $a0, $a0, %lo(gPlayerStatus) /* FC8C0 802D7F10 948200B0 */ lhu $v0, 0xB0($a0) /* FC8C4 802D7F14 34A55556 */ ori $a1, $a1, (0x55555556 & 0xFFFF) /* FC8C8 802D7F18 00021400 */ sll $v0, $v0, 16 /* FC8CC 802D7F1C 00021C03 */ sra $v1, $v0, 16 /* FC8D0 802D7F20 00650018 */ mult $v1, $a1 /* FC8D4 802D7F24 C4880028 */ lwc1 $f8, 0x28($a0) /* FC8D8 802D7F28 C4860030 */ lwc1 $f6, 0x30($a0) /* FC8DC 802D7F2C C482002C */ lwc1 $f2, 0x2C($a0) /* FC8E0 802D7F30 00031840 */ sll $v1, $v1, 1 /* FC8E4 802D7F34 00004010 */ mfhi $t0 /* FC8E8 802D7F38 000217C3 */ sra $v0, $v0, 31 /* FC8EC 802D7F3C 01021023 */ subu $v0, $t0, $v0 /* FC8F0 802D7F40 080B5FE5 */ j .L802D7F94 /* FC8F4 802D7F44 00650018 */ mult $v1, $a1 .L802D7F48: /* FC8F8 802D7F48 0220202D */ daddu $a0, $s1, $zero /* FC8FC 802D7F4C 0C0B36B0 */ jal resolve_npc /* FC900 802D7F50 0260282D */ daddu $a1, $s3, $zero /* FC904 802D7F54 0040282D */ daddu $a1, $v0, $zero /* FC908 802D7F58 10A00025 */ beqz $a1, .L802D7FF0 /* FC90C 802D7F5C 3C045555 */ lui $a0, (0x55555556 >> 16) /* FC910 802D7F60 94A200A8 */ lhu $v0, 0xA8($a1) /* FC914 802D7F64 34845556 */ ori $a0, $a0, (0x55555556 & 0xFFFF) /* FC918 802D7F68 00021400 */ sll $v0, $v0, 16 /* FC91C 802D7F6C 00021C03 */ sra $v1, $v0, 16 /* FC920 802D7F70 00640018 */ mult $v1, $a0 /* FC924 802D7F74 C4A80038 */ lwc1 $f8, 0x38($a1) /* FC928 802D7F78 C4A60040 */ lwc1 $f6, 0x40($a1) /* FC92C 802D7F7C C4A2003C */ lwc1 $f2, 0x3C($a1) /* FC930 802D7F80 00031840 */ sll $v1, $v1, 1 /* FC934 802D7F84 00004010 */ mfhi $t0 /* FC938 802D7F88 000217C3 */ sra $v0, $v0, 31 /* FC93C 802D7F8C 01021023 */ subu $v0, $t0, $v0 /* FC940 802D7F90 00640018 */ mult $v1, $a0 .L802D7F94: /* FC944 802D7F94 00021400 */ sll $v0, $v0, 16 /* FC948 802D7F98 00021403 */ sra $v0, $v0, 16 /* FC94C 802D7F9C 44822000 */ mtc1 $v0, $f4 /* FC950 802D7FA0 00000000 */ nop /* FC954 802D7FA4 46802120 */ cvt.s.w $f4, $f4 /* FC958 802D7FA8 00031FC3 */ sra $v1, $v1, 31 /* FC95C 802D7FAC 00004010 */ mfhi $t0 /* FC960 802D7FB0 01031823 */ subu $v1, $t0, $v1 /* FC964 802D7FB4 44830000 */ mtc1 $v1, $f0 /* FC968 802D7FB8 00000000 */ nop /* FC96C 802D7FBC 46800020 */ cvt.s.w $f0, $f0 /* FC970 802D7FC0 080B5FF4 */ j .L802D7FD0 /* FC974 802D7FC4 46001000 */ add.s $f0, $f2, $f0 .L802D7FC8: /* FC978 802D7FC8 4600B186 */ mov.s $f6, $f22 /* FC97C 802D7FCC 4600A106 */ mov.s $f4, $f20 .L802D7FD0: /* FC980 802D7FD0 44054000 */ mfc1 $a1, $f8 /* FC984 802D7FD4 44060000 */ mfc1 $a2, $f0 /* FC988 802D7FD8 44073000 */ mfc1 $a3, $f6 /* FC98C 802D7FDC 0280202D */ daddu $a0, $s4, $zero /* FC990 802D7FE0 E7A40010 */ swc1 $f4, 0x10($sp) /* FC994 802D7FE4 E7BC0014 */ swc1 $f28, 0x14($sp) /* FC998 802D7FE8 0C01C1E4 */ jal fx_sweat /* FC99C 802D7FEC AFB00018 */ sw $s0, 0x18($sp) .L802D7FF0: /* FC9A0 802D7FF0 24020002 */ addiu $v0, $zero, 0x2 /* FC9A4 802D7FF4 8FBF0034 */ lw $ra, 0x34($sp) /* FC9A8 802D7FF8 8FB40030 */ lw $s4, 0x30($sp) /* FC9AC 802D7FFC 8FB3002C */ lw $s3, 0x2C($sp) /* FC9B0 802D8000 8FB20028 */ lw $s2, 0x28($sp) /* FC9B4 802D8004 8FB10024 */ lw $s1, 0x24($sp) /* FC9B8 802D8008 8FB00020 */ lw $s0, 0x20($sp) /* FC9BC 802D800C D7BC0058 */ ldc1 $f28, 0x58($sp) /* FC9C0 802D8010 D7BA0050 */ ldc1 $f26, 0x50($sp) /* FC9C4 802D8014 D7B80048 */ ldc1 $f24, 0x48($sp) /* FC9C8 802D8018 D7B60040 */ ldc1 $f22, 0x40($sp) /* FC9CC 802D801C D7B40038 */ ldc1 $f20, 0x38($sp) /* FC9D0 802D8020 03E00008 */ jr $ra /* FC9D4 802D8024 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: ApiStatus ShowSweat(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 npcID = evt_get_variable(script, *args++); s32 type = evt_get_variable(script, *args++); f32 pitch = evt_get_float_variable(script, *args++); s32 emoterType = evt_get_variable(script, *args++); f32 posX = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++); f32 posZ = evt_get_float_variable(script, *args++); f32 radius = evt_get_float_variable(script, *args++); s32 duration = evt_get_variable(script, *args++); Npc* npc; f32 x, y, z, r; switch (emoterType) { case EMOTER_PLAYER: x = gPlayerStatus.position.x; y = gPlayerStatus.position.y + (gPlayerStatus.colliderHeight * 2) / 3; z = gPlayerStatus.position.z; r = gPlayerStatus.colliderHeight / 3; break; case EMOTER_NPC: npc = resolve_npc(script, npcID); if (npc == NULL) { return ApiStatus_DONE2; } x = npc->pos.x; y = npc->pos.y + (npc->collisionHeight * 2) / 3; z = npc->pos.z; r = npc->collisionHeight / 3; break; default: x = posX; y = posY; z = posZ; r = radius; break; } fx_sweat(type, x, y, z, r, pitch, duration); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel flower_trail_appendGfx /* 32E274 E0012564 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 32E278 E0012568 0080602D */ daddu $t4, $a0, $zero /* 32E27C E001256C 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 32E280 E0012570 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 32E284 E0012574 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 32E288 E0012578 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 32E28C E001257C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32E290 E0012580 AFB7001C */ sw $s7, 0x1C($sp) /* 32E294 E0012584 AFB60018 */ sw $s6, 0x18($sp) /* 32E298 E0012588 AFB50014 */ sw $s5, 0x14($sp) /* 32E29C E001258C AFB40010 */ sw $s4, 0x10($sp) /* 32E2A0 E0012590 AFB3000C */ sw $s3, 0xC($sp) /* 32E2A4 E0012594 AFB20008 */ sw $s2, 0x8($sp) /* 32E2A8 E0012598 AFB10004 */ sw $s1, 0x4($sp) /* 32E2AC E001259C AFB00000 */ sw $s0, 0x0($sp) /* 32E2B0 E00125A0 8CC40000 */ lw $a0, 0x0($a2) /* 32E2B4 E00125A4 8D87000C */ lw $a3, 0xC($t4) /* 32E2B8 E00125A8 0080182D */ daddu $v1, $a0, $zero /* 32E2BC E00125AC 24840008 */ addiu $a0, $a0, 0x8 /* 32E2C0 E00125B0 AC620000 */ sw $v0, 0x0($v1) /* 32E2C4 E00125B4 AC600004 */ sw $zero, 0x4($v1) /* 32E2C8 E00125B8 AC850000 */ sw $a1, 0x0($a0) /* 32E2CC E00125BC 8D820010 */ lw $v0, 0x10($t4) /* 32E2D0 E00125C0 0000482D */ daddu $t1, $zero, $zero /* 32E2D4 E00125C4 ACC40000 */ sw $a0, 0x0($a2) /* 32E2D8 E00125C8 8C42001C */ lw $v0, 0x1C($v0) /* 32E2DC E00125CC 3C038000 */ lui $v1, (0x80000000 >> 16) /* 32E2E0 E00125D0 00431021 */ addu $v0, $v0, $v1 /* 32E2E4 E00125D4 AC820004 */ sw $v0, 0x4($a0) /* 32E2E8 E00125D8 8D820008 */ lw $v0, 0x8($t4) /* 32E2EC E00125DC 24840008 */ addiu $a0, $a0, 0x8 /* 32E2F0 E00125E0 18400053 */ blez $v0, .LE0012730 /* 32E2F4 E00125E4 ACC40000 */ sw $a0, 0x0($a2) /* 32E2F8 E00125E8 3C0E800A */ lui $t6, %hi(gDisplayContext) /* 32E2FC E00125EC 25CEA674 */ addiu $t6, $t6, %lo(gDisplayContext) /* 32E300 E00125F0 3C0D8007 */ lui $t5, %hi(gMatrixListPos) /* 32E304 E00125F4 25AD41F0 */ addiu $t5, $t5, %lo(gMatrixListPos) /* 32E308 E00125F8 3C0B0001 */ lui $t3, (0x11630 >> 16) /* 32E30C E00125FC 356B1630 */ ori $t3, $t3, (0x11630 & 0xFFFF) /* 32E310 E0012600 00C0502D */ daddu $t2, $a2, $zero /* 32E314 E0012604 3C13E700 */ lui $s3, (0xE7000000 >> 16) /* 32E318 E0012608 3C12FA00 */ lui $s2, (0xFA000000 >> 16) /* 32E31C E001260C 3C187060 */ lui $t8, (0x70601800 >> 16) /* 32E320 E0012610 37181800 */ ori $t8, $t8, (0x70601800 & 0xFFFF) /* 32E324 E0012614 3C11DA38 */ lui $s1, (0xDA380000 >> 16) /* 32E328 E0012618 3C10DE00 */ lui $s0, (0xDE000000 >> 16) /* 32E32C E001261C 3C0FD838 */ lui $t7, (0xD8380002 >> 16) /* 32E330 E0012620 35EF0002 */ ori $t7, $t7, (0xD8380002 & 0xFFFF) /* 32E334 E0012624 24190040 */ addiu $t9, $zero, 0x40 /* 32E338 E0012628 24E60008 */ addiu $a2, $a3, 0x8 .LE001262C: /* 32E33C E001262C 8CE20000 */ lw $v0, 0x0($a3) /* 32E340 E0012630 5040003A */ beql $v0, $zero, .LE001271C /* 32E344 E0012634 25290001 */ addiu $t1, $t1, 0x1 /* 32E348 E0012638 80C20001 */ lb $v0, 0x1($a2) /* 32E34C E001263C 3C080900 */ lui $t0, %hi(D_09000E38_40E0C8) /* 32E350 E0012640 25080E38 */ addiu $t0, $t0, %lo(D_09000E38_40E0C8) /* 32E354 E0012644 10400003 */ beqz $v0, .LE0012654 /* 32E358 E0012648 24E40030 */ addiu $a0, $a3, 0x30 /* 32E35C E001264C 3C080900 */ lui $t0, %hi(D_09000E20_40E0B0) /* 32E360 E0012650 25080E20 */ addiu $t0, $t0, %lo(D_09000E20_40E0B0) .LE0012654: /* 32E364 E0012654 24E50070 */ addiu $a1, $a3, 0x70 /* 32E368 E0012658 95A20000 */ lhu $v0, 0x0($t5) /* 32E36C E001265C 8DC30000 */ lw $v1, 0x0($t6) /* 32E370 E0012660 00021180 */ sll $v0, $v0, 6 /* 32E374 E0012664 00621821 */ addu $v1, $v1, $v0 /* 32E378 E0012668 006B1821 */ addu $v1, $v1, $t3 .LE001266C: /* 32E37C E001266C 8C940000 */ lw $s4, 0x0($a0) /* 32E380 E0012670 8C950004 */ lw $s5, 0x4($a0) /* 32E384 E0012674 8C960008 */ lw $s6, 0x8($a0) /* 32E388 E0012678 8C97000C */ lw $s7, 0xC($a0) /* 32E38C E001267C AC740000 */ sw $s4, 0x0($v1) /* 32E390 E0012680 AC750004 */ sw $s5, 0x4($v1) /* 32E394 E0012684 AC760008 */ sw $s6, 0x8($v1) /* 32E398 E0012688 AC77000C */ sw $s7, 0xC($v1) /* 32E39C E001268C 24840010 */ addiu $a0, $a0, 0x10 /* 32E3A0 E0012690 1485FFF6 */ bne $a0, $a1, .LE001266C /* 32E3A4 E0012694 24630010 */ addiu $v1, $v1, 0x10 /* 32E3A8 E0012698 8D440000 */ lw $a0, 0x0($t2) /* 32E3AC E001269C 0080102D */ daddu $v0, $a0, $zero /* 32E3B0 E00126A0 24840008 */ addiu $a0, $a0, 0x8 /* 32E3B4 E00126A4 AD440000 */ sw $a0, 0x0($t2) /* 32E3B8 E00126A8 AC530000 */ sw $s3, 0x0($v0) /* 32E3BC E00126AC AC400004 */ sw $zero, 0x4($v0) /* 32E3C0 E00126B0 24820008 */ addiu $v0, $a0, 0x8 /* 32E3C4 E00126B4 AD420000 */ sw $v0, 0x0($t2) /* 32E3C8 E00126B8 AC920000 */ sw $s2, 0x0($a0) /* 32E3CC E00126BC 90C50000 */ lbu $a1, 0x0($a2) /* 32E3D0 E00126C0 95A30000 */ lhu $v1, 0x0($t5) /* 32E3D4 E00126C4 24820010 */ addiu $v0, $a0, 0x10 /* 32E3D8 E00126C8 AD420000 */ sw $v0, 0x0($t2) /* 32E3DC E00126CC AC910008 */ sw $s1, 0x8($a0) /* 32E3E0 E00126D0 24620001 */ addiu $v0, $v1, 0x1 /* 32E3E4 E00126D4 3063FFFF */ andi $v1, $v1, 0xFFFF /* 32E3E8 E00126D8 00031980 */ sll $v1, $v1, 6 /* 32E3EC E00126DC 006B1821 */ addu $v1, $v1, $t3 /* 32E3F0 E00126E0 A5A20000 */ sh $v0, 0x0($t5) /* 32E3F4 E00126E4 8DC20000 */ lw $v0, 0x0($t6) /* 32E3F8 E00126E8 00B82825 */ or $a1, $a1, $t8 /* 32E3FC E00126EC 00431021 */ addu $v0, $v0, $v1 /* 32E400 E00126F0 AC82000C */ sw $v0, 0xC($a0) /* 32E404 E00126F4 24820018 */ addiu $v0, $a0, 0x18 /* 32E408 E00126F8 AD420000 */ sw $v0, 0x0($t2) /* 32E40C E00126FC 24820020 */ addiu $v0, $a0, 0x20 /* 32E410 E0012700 AC900010 */ sw $s0, 0x10($a0) /* 32E414 E0012704 AC880014 */ sw $t0, 0x14($a0) /* 32E418 E0012708 AD420000 */ sw $v0, 0x0($t2) /* 32E41C E001270C AC8F0018 */ sw $t7, 0x18($a0) /* 32E420 E0012710 AC99001C */ sw $t9, 0x1C($a0) /* 32E424 E0012714 AC850004 */ sw $a1, 0x4($a0) /* 32E428 E0012718 25290001 */ addiu $t1, $t1, 0x1 .LE001271C: /* 32E42C E001271C 24C60098 */ addiu $a2, $a2, 0x98 /* 32E430 E0012720 8D820008 */ lw $v0, 0x8($t4) /* 32E434 E0012724 0122102A */ slt $v0, $t1, $v0 /* 32E438 E0012728 1440FFC0 */ bnez $v0, .LE001262C /* 32E43C E001272C 24E70098 */ addiu $a3, $a3, 0x98 .LE0012730: /* 32E440 E0012730 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 32E444 E0012734 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 32E448 E0012738 8C620000 */ lw $v0, 0x0($v1) /* 32E44C E001273C 0040202D */ daddu $a0, $v0, $zero /* 32E450 E0012740 24420008 */ addiu $v0, $v0, 0x8 /* 32E454 E0012744 AC620000 */ sw $v0, 0x0($v1) /* 32E458 E0012748 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32E45C E001274C AC820000 */ sw $v0, 0x0($a0) /* 32E460 E0012750 AC800004 */ sw $zero, 0x4($a0) /* 32E464 E0012754 8FB7001C */ lw $s7, 0x1C($sp) /* 32E468 E0012758 8FB60018 */ lw $s6, 0x18($sp) /* 32E46C E001275C 8FB50014 */ lw $s5, 0x14($sp) /* 32E470 E0012760 8FB40010 */ lw $s4, 0x10($sp) /* 32E474 E0012764 8FB3000C */ lw $s3, 0xC($sp) /* 32E478 E0012768 8FB20008 */ lw $s2, 0x8($sp) /* 32E47C E001276C 8FB10004 */ lw $s1, 0x4($sp) /* 32E480 E0012770 8FB00000 */ lw $s0, 0x0($sp) /* 32E484 E0012774 03E00008 */ jr $ra /* 32E488 E0012778 27BD0020 */ addiu $sp, $sp, 0x20 /* 32E48C E001277C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void flower_trail_appendGfx(void* argEffect) { EffectInstance* effect = argEffect; FlowerFXData* part = effect->data.flowerTrail; Gfx* dlist; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effect->graphics->data)); for (i = 0; i < effect->numParts; i++, part++) { if (part->alive) { if (part->useAltColor) { dlist = D_09000E20_32DCE0; } else { dlist = D_09000E38_32DCF8; } gDisplayContext->matrixStack[gMatrixListPos] = part->transformMtx; gDPPipeSync(gMainGfxPos++); gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->primAlpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel PlayerFaceNpc /* F64B4 802D1B04 27BDFFD0 */ addiu $sp, $sp, -0x30 /* F64B8 802D1B08 AFB20018 */ sw $s2, 0x18($sp) /* F64BC 802D1B0C 0080902D */ daddu $s2, $a0, $zero /* F64C0 802D1B10 AFB60028 */ sw $s6, 0x28($sp) /* F64C4 802D1B14 3C168011 */ lui $s6, %hi(gPlayerStatus) /* F64C8 802D1B18 26D6EFC8 */ addiu $s6, $s6, %lo(gPlayerStatus) /* F64CC 802D1B1C AFB50024 */ sw $s5, 0x24($sp) /* F64D0 802D1B20 26550074 */ addiu $s5, $s2, 0x74 /* F64D4 802D1B24 AFB10014 */ sw $s1, 0x14($sp) /* F64D8 802D1B28 26510078 */ addiu $s1, $s2, 0x78 /* F64DC 802D1B2C AFB40020 */ sw $s4, 0x20($sp) /* F64E0 802D1B30 AFBF002C */ sw $ra, 0x2C($sp) /* F64E4 802D1B34 AFB3001C */ sw $s3, 0x1C($sp) /* F64E8 802D1B38 AFB00010 */ sw $s0, 0x10($sp) /* F64EC 802D1B3C 8E53000C */ lw $s3, 0xC($s2) /* F64F0 802D1B40 10A00043 */ beqz $a1, .L802D1C50 /* F64F4 802D1B44 2654007C */ addiu $s4, $s2, 0x7C /* F64F8 802D1B48 8E650000 */ lw $a1, 0x0($s3) /* F64FC 802D1B4C 0C0B1EAF */ jal evt_get_variable /* F6500 802D1B50 26730004 */ addiu $s3, $s3, 0x4 /* F6504 802D1B54 0040202D */ daddu $a0, $v0, $zero /* F6508 802D1B58 2402FFFF */ addiu $v0, $zero, -0x1 /* F650C 802D1B5C 14820006 */ bne $a0, $v0, .L802D1B78 /* F6510 802D1B60 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16) /* F6514 802D1B64 8E44014C */ lw $a0, 0x14C($s2) /* F6518 802D1B68 0C00EAD2 */ jal get_npc_safe /* F651C 802D1B6C 00000000 */ nop /* F6520 802D1B70 080B46E7 */ j .L802D1B9C /* F6524 802D1B74 0040202D */ daddu $a0, $v0, $zero .L802D1B78: /* F6528 802D1B78 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF) /* F652C 802D1B7C 0082102A */ slt $v0, $a0, $v0 /* F6530 802D1B80 14400006 */ bnez $v0, .L802D1B9C /* F6534 802D1B84 00000000 */ nop /* F6538 802D1B88 0C00EAD2 */ jal get_npc_safe /* F653C 802D1B8C 00000000 */ nop /* F6540 802D1B90 0040202D */ daddu $a0, $v0, $zero /* F6544 802D1B94 1080005A */ beqz $a0, .L802D1D00 /* F6548 802D1B98 24020002 */ addiu $v0, $zero, 0x2 .L802D1B9C: /* F654C 802D1B9C 3C10802E */ lui $s0, %hi(playerNpc) /* F6550 802D1BA0 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F6554 802D1BA4 8E020000 */ lw $v0, 0x0($s0) /* F6558 802D1BA8 C6C00080 */ lwc1 $f0, 0x80($s6) /* F655C 802D1BAC E440000C */ swc1 $f0, 0xC($v0) /* F6560 802D1BB0 E6A00000 */ swc1 $f0, 0x0($s5) /* F6564 802D1BB4 C6CC0028 */ lwc1 $f12, 0x28($s6) /* F6568 802D1BB8 C6CE0030 */ lwc1 $f14, 0x30($s6) /* F656C 802D1BBC 8C860038 */ lw $a2, 0x38($a0) /* F6570 802D1BC0 0C00A720 */ jal atan2 /* F6574 802D1BC4 8C870040 */ lw $a3, 0x40($a0) /* F6578 802D1BC8 C6A20000 */ lwc1 $f2, 0x0($s5) /* F657C 802D1BCC 46020001 */ sub.s $f0, $f0, $f2 /* F6580 802D1BD0 E6200000 */ swc1 $f0, 0x0($s1) /* F6584 802D1BD4 8E650000 */ lw $a1, 0x0($s3) /* F6588 802D1BD8 0C0B1EAF */ jal evt_get_variable /* F658C 802D1BDC 0240202D */ daddu $a0, $s2, $zero /* F6590 802D1BE0 AE820000 */ sw $v0, 0x0($s4) /* F6594 802D1BE4 8E020000 */ lw $v0, 0x0($s0) /* F6598 802D1BE8 3C01C334 */ lui $at, (0xC3340000 >> 16) /* F659C 802D1BEC 44810000 */ mtc1 $at, $f0 /* F65A0 802D1BF0 A440008E */ sh $zero, 0x8E($v0) /* F65A4 802D1BF4 C6220000 */ lwc1 $f2, 0x0($s1) /* F65A8 802D1BF8 4600103C */ c.lt.s $f2, $f0 /* F65AC 802D1BFC 00000000 */ nop /* F65B0 802D1C00 45000007 */ bc1f .L802D1C20 /* F65B4 802D1C04 00000000 */ nop /* F65B8 802D1C08 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* F65BC 802D1C0C 44810000 */ mtc1 $at, $f0 /* F65C0 802D1C10 00000000 */ nop /* F65C4 802D1C14 46001000 */ add.s $f0, $f2, $f0 /* F65C8 802D1C18 E6200000 */ swc1 $f0, 0x0($s1) /* F65CC 802D1C1C C6220000 */ lwc1 $f2, 0x0($s1) .L802D1C20: /* F65D0 802D1C20 3C014334 */ lui $at, (0x43340000 >> 16) /* F65D4 802D1C24 44810000 */ mtc1 $at, $f0 /* F65D8 802D1C28 00000000 */ nop /* F65DC 802D1C2C 4602003C */ c.lt.s $f0, $f2 /* F65E0 802D1C30 00000000 */ nop /* F65E4 802D1C34 45000006 */ bc1f .L802D1C50 /* F65E8 802D1C38 00000000 */ nop /* F65EC 802D1C3C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* F65F0 802D1C40 44810000 */ mtc1 $at, $f0 /* F65F4 802D1C44 00000000 */ nop /* F65F8 802D1C48 46001001 */ sub.s $f0, $f2, $f0 /* F65FC 802D1C4C E6200000 */ swc1 $f0, 0x0($s1) .L802D1C50: /* F6600 802D1C50 8E820000 */ lw $v0, 0x0($s4) /* F6604 802D1C54 1C40000E */ bgtz $v0, .L802D1C90 /* F6608 802D1C58 00000000 */ nop /* F660C 802D1C5C 3C10802E */ lui $s0, %hi(playerNpc) /* F6610 802D1C60 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F6614 802D1C64 8E020000 */ lw $v0, 0x0($s0) /* F6618 802D1C68 C6200000 */ lwc1 $f0, 0x0($s1) /* F661C 802D1C6C C44C000C */ lwc1 $f12, 0xC($v0) /* F6620 802D1C70 46006300 */ add.s $f12, $f12, $f0 /* F6624 802D1C74 0C00A6C9 */ jal clamp_angle /* F6628 802D1C78 E44C000C */ swc1 $f12, 0xC($v0) /* F662C 802D1C7C 8E030000 */ lw $v1, 0x0($s0) /* F6630 802D1C80 24020002 */ addiu $v0, $zero, 0x2 /* F6634 802D1C84 E460000C */ swc1 $f0, 0xC($v1) /* F6638 802D1C88 080B4740 */ j .L802D1D00 /* F663C 802D1C8C E6C00080 */ swc1 $f0, 0x80($s6) .L802D1C90: /* F6640 802D1C90 3C10802E */ lui $s0, %hi(playerNpc) /* F6644 802D1C94 26109D20 */ addiu $s0, $s0, %lo(playerNpc) /* F6648 802D1C98 8E030000 */ lw $v1, 0x0($s0) /* F664C 802D1C9C 9462008E */ lhu $v0, 0x8E($v1) /* F6650 802D1CA0 24420001 */ addiu $v0, $v0, 0x1 /* F6654 802D1CA4 A462008E */ sh $v0, 0x8E($v1) /* F6658 802D1CA8 00021400 */ sll $v0, $v0, 16 /* F665C 802D1CAC 00021403 */ sra $v0, $v0, 16 /* F6660 802D1CB0 C6200000 */ lwc1 $f0, 0x0($s1) /* F6664 802D1CB4 44821000 */ mtc1 $v0, $f2 /* F6668 802D1CB8 00000000 */ nop /* F666C 802D1CBC 468010A0 */ cvt.s.w $f2, $f2 /* F6670 802D1CC0 46020002 */ mul.s $f0, $f0, $f2 /* F6674 802D1CC4 00000000 */ nop /* F6678 802D1CC8 C6AC0000 */ lwc1 $f12, 0x0($s5) /* F667C 802D1CCC C6820000 */ lwc1 $f2, 0x0($s4) /* F6680 802D1CD0 468010A0 */ cvt.s.w $f2, $f2 /* F6684 802D1CD4 46020003 */ div.s $f0, $f0, $f2 /* F6688 802D1CD8 46006300 */ add.s $f12, $f12, $f0 /* F668C 802D1CDC 0C00A6C9 */ jal clamp_angle /* F6690 802D1CE0 E46C000C */ swc1 $f12, 0xC($v1) /* F6694 802D1CE4 8E020000 */ lw $v0, 0x0($s0) /* F6698 802D1CE8 E440000C */ swc1 $f0, 0xC($v0) /* F669C 802D1CEC E6C00080 */ swc1 $f0, 0x80($s6) /* F66A0 802D1CF0 8442008E */ lh $v0, 0x8E($v0) /* F66A4 802D1CF4 8E830000 */ lw $v1, 0x0($s4) /* F66A8 802D1CF8 0043102A */ slt $v0, $v0, $v1 /* F66AC 802D1CFC 38420001 */ xori $v0, $v0, 0x1 .L802D1D00: /* F66B0 802D1D00 8FBF002C */ lw $ra, 0x2C($sp) /* F66B4 802D1D04 8FB60028 */ lw $s6, 0x28($sp) /* F66B8 802D1D08 8FB50024 */ lw $s5, 0x24($sp) /* F66BC 802D1D0C 8FB40020 */ lw $s4, 0x20($sp) /* F66C0 802D1D10 8FB3001C */ lw $s3, 0x1C($sp) /* F66C4 802D1D14 8FB20018 */ lw $s2, 0x18($sp) /* F66C8 802D1D18 8FB10014 */ lw $s1, 0x14($sp) /* F66CC 802D1D1C 8FB00010 */ lw $s0, 0x10($sp) /* F66D0 802D1D20 03E00008 */ jr $ra /* F66D4 802D1D24 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: ApiStatus PlayerFaceNpc(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; s32* args = script->ptrReadPos; f32* playerTargetYaw = &script->functionTempF[1]; f32* angle = &script->functionTempF[2]; s32* ft3 = &script->functionTemp[3]; if (isInitialCall) { s32 npcID = evt_get_variable(script, *args++); Npc* npc; if (npcID == NPC_SELF) { npc = get_npc_safe(script->owner2.npcID); } else if (npcID < EVT_LIMIT) { npc = (Npc*)npcID; } else { npc = get_npc_safe(npcID); if (npc == NULL) { return ApiStatus_DONE2; } } *playerTargetYaw = playerNpc->yaw = playerStatus->targetYaw; *angle = atan2(playerStatus->position.x, playerStatus->position.z, npc->pos.x, npc->pos.z) - *playerTargetYaw; *ft3 = evt_get_variable(script, *args++); playerNpc->duration = 0; if (*angle < -180.0f) { *angle += 360.0f; } if (*angle > 180.0f) { *angle -= 360.0f; } } if (*ft3 > 0) { playerNpc->duration++; playerNpc->yaw = *playerTargetYaw + ((*angle * playerNpc->duration) / *ft3); playerStatus->targetYaw = playerNpc->yaw = clamp_angle(playerNpc->yaw); return (playerNpc->duration >= *ft3) * ApiStatus_DONE1; } playerNpc->yaw += *angle; playerStatus->targetYaw = playerNpc->yaw = clamp_angle(playerNpc->yaw); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel fio_serialize_state /* 6A30 8002B630 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 6A34 8002B634 AFB20018 */ sw $s2, 0x18($sp) /* 6A38 8002B638 3C12800E */ lui $s2, %hi(gCurrentSaveFile) /* 6A3C 8002B63C 2652ACC0 */ addiu $s2, $s2, %lo(gCurrentSaveFile) glabel func_8002B640 /* 6A40 8002B640 26440040 */ addiu $a0, $s2, 0x40 /* 6A44 8002B644 3C028011 */ lui $v0, %hi(gPlayerData) /* 6A48 8002B648 2442F290 */ addiu $v0, $v0, %lo(gPlayerData) /* 6A4C 8002B64C 24430420 */ addiu $v1, $v0, 0x420 /* 6A50 8002B650 AFBF001C */ sw $ra, 0x1C($sp) /* 6A54 8002B654 AFB10014 */ sw $s1, 0x14($sp) /* 6A58 8002B658 AFB00010 */ sw $s0, 0x10($sp) .L8002B65C: /* 6A5C 8002B65C 8C480000 */ lw $t0, 0x0($v0) /* 6A60 8002B660 8C490004 */ lw $t1, 0x4($v0) /* 6A64 8002B664 8C4A0008 */ lw $t2, 0x8($v0) /* 6A68 8002B668 8C4B000C */ lw $t3, 0xC($v0) /* 6A6C 8002B66C AC880000 */ sw $t0, 0x0($a0) /* 6A70 8002B670 AC890004 */ sw $t1, 0x4($a0) /* 6A74 8002B674 AC8A0008 */ sw $t2, 0x8($a0) /* 6A78 8002B678 AC8B000C */ sw $t3, 0xC($a0) /* 6A7C 8002B67C 24420010 */ addiu $v0, $v0, 0x10 /* 6A80 8002B680 1443FFF6 */ bne $v0, $v1, .L8002B65C /* 6A84 8002B684 24840010 */ addiu $a0, $a0, 0x10 /* 6A88 8002B688 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 6A8C 8002B68C 8C63419C */ lw $v1, %lo(gGameStatusPtr)($v1) /* 6A90 8002B690 8C480000 */ lw $t0, 0x0($v0) /* 6A94 8002B694 8C490004 */ lw $t1, 0x4($v0) /* 6A98 8002B698 AC880000 */ sw $t0, 0x0($a0) /* 6A9C 8002B69C AC890004 */ sw $t1, 0x4($a0) /* 6AA0 8002B6A0 94620086 */ lhu $v0, 0x86($v1) glabel func_8002B6A4 /* 6AA4 8002B6A4 A6420468 */ sh $v0, 0x468($s2) /* 6AA8 8002B6A8 9462008C */ lhu $v0, 0x8C($v1) /* 6AAC 8002B6AC A642046A */ sh $v0, 0x46A($s2) /* 6AB0 8002B6B0 9462008E */ lhu $v0, 0x8E($v1) /* 6AB4 8002B6B4 A642046C */ sh $v0, 0x46C($s2) /* 6AB8 8002B6B8 94620160 */ lhu $v0, 0x160($v1) /* 6ABC 8002B6BC A64212E6 */ sh $v0, 0x12E6($s2) /* 6AC0 8002B6C0 94620162 */ lhu $v0, 0x162($v1) /* 6AC4 8002B6C4 0000302D */ daddu $a2, $zero, $zero /* 6AC8 8002B6C8 A64212E8 */ sh $v0, 0x12E8($s2) /* 6ACC 8002B6CC 94620164 */ lhu $v0, 0x164($v1) /* 6AD0 8002B6D0 3C07800B */ lui $a3, %hi(gCurrentEncounter) /* 6AD4 8002B6D4 24E70F10 */ addiu $a3, $a3, %lo(gCurrentEncounter) /* 6AD8 8002B6D8 A64212EA */ sh $v0, 0x12EA($s2) /* 6ADC 8002B6DC 0000282D */ daddu $a1, $zero, $zero .L8002B6E0: /* 6AE0 8002B6E0 00062080 */ sll $a0, $a2, 2 .L8002B6E4: /* 6AE4 8002B6E4 02441821 */ addu $v1, $s2, $a0 /* 6AE8 8002B6E8 00871021 */ addu $v0, $a0, $a3 /* 6AEC 8002B6EC 8C4200B0 */ lw $v0, 0xB0($v0) /* 6AF0 8002B6F0 24A50001 */ addiu $a1, $a1, 0x1 /* 6AF4 8002B6F4 AC620470 */ sw $v0, 0x470($v1) /* 6AF8 8002B6F8 28A2003C */ slti $v0, $a1, 0x3C /* 6AFC 8002B6FC 1440FFF9 */ bnez $v0, .L8002B6E4 /* 6B00 8002B700 24840030 */ addiu $a0, $a0, 0x30 /* 6B04 8002B704 24C60001 */ addiu $a2, $a2, 0x1 /* 6B08 8002B708 28C2000C */ slti $v0, $a2, 0xC /* 6B0C 8002B70C 1440FFF4 */ bnez $v0, .L8002B6E0 /* 6B10 8002B710 0000282D */ daddu $a1, $zero, $zero /* 6B14 8002B714 3C108007 */ lui $s0, %hi(gGameStatusPtr) /* 6B18 8002B718 2610419C */ addiu $s0, $s0, %lo(gGameStatusPtr) /* 6B1C 8002B71C 8E020000 */ lw $v0, 0x0($s0) /* 6B20 8002B720 8E030000 */ lw $v1, 0x0($s0) /* 6B24 8002B724 90420074 */ lbu $v0, 0x74($v0) /* 6B28 8002B728 A24212E0 */ sb $v0, 0x12E0($s2) /* 6B2C 8002B72C 90620076 */ lbu $v0, 0x76($v1) /* 6B30 8002B730 8E030000 */ lw $v1, 0x0($s0) /* 6B34 8002B734 A24212E1 */ sb $v0, 0x12E1($s2) /* 6B38 8002B738 90620077 */ lbu $v0, 0x77($v1) /* 6B3C 8002B73C 8E030000 */ lw $v1, 0x0($s0) /* 6B40 8002B740 A24212E2 */ sb $v0, 0x12E2($s2) /* 6B44 8002B744 9062007A */ lbu $v0, 0x7A($v1) /* 6B48 8002B748 8E030000 */ lw $v1, 0x0($s0) /* 6B4C 8002B74C A24212E3 */ sb $v0, 0x12E3($s2) /* 6B50 8002B750 90630166 */ lbu $v1, 0x166($v1) /* 6B54 8002B754 3C118011 */ lui $s1, %hi(gPlayerData) /* 6B58 8002B758 2631F290 */ addiu $s1, $s1, %lo(gPlayerData) /* 6B5C 8002B75C 00031040 */ sll $v0, $v1, 1 /* 6B60 8002B760 00431021 */ addu $v0, $v0, $v1 /* 6B64 8002B764 92230009 */ lbu $v1, 0x9($s1) /* 6B68 8002B768 000210C0 */ sll $v0, $v0, 3 /* 6B6C 8002B76C 3C018007 */ lui $at, %hi(D_800779CA) /* 6B70 8002B770 00220821 */ addu $at, $at, $v0 /* 6B74 8002B774 A02379CA */ sb $v1, %lo(D_800779CA)($at) /* 6B78 8002B778 0C00AB90 */ jal get_spirits_rescued /* 6B7C 8002B77C 00000000 */ nop /* 6B80 8002B780 8E030000 */ lw $v1, 0x0($s0) /* 6B84 8002B784 90640166 */ lbu $a0, 0x166($v1) /* 6B88 8002B788 00041840 */ sll $v1, $a0, 1 /* 6B8C 8002B78C 00641821 */ addu $v1, $v1, $a0 /* 6B90 8002B790 000318C0 */ sll $v1, $v1, 3 /* 6B94 8002B794 3C018007 */ lui $at, %hi(D_800779C8) /* 6B98 8002B798 00230821 */ addu $at, $at, $v1 /* 6B9C 8002B79C A02279C8 */ sb $v0, %lo(D_800779C8)($at) /* 6BA0 8002B7A0 8E040000 */ lw $a0, 0x0($s0) /* 6BA4 8002B7A4 90830166 */ lbu $v1, 0x166($a0) /* 6BA8 8002B7A8 00031040 */ sll $v0, $v1, 1 /* 6BAC 8002B7AC 00431021 */ addu $v0, $v0, $v1 /* 6BB0 8002B7B0 8E2302BC */ lw $v1, 0x2BC($s1) /* 6BB4 8002B7B4 000210C0 */ sll $v0, $v0, 3 /* 6BB8 8002B7B8 3C018007 */ lui $at, %hi(gSaveSlotMetadata) /* 6BBC 8002B7BC 00220821 */ addu $at, $at, $v0 /* 6BC0 8002B7C0 AC2379C4 */ sw $v1, %lo(gSaveSlotMetadata)($at) /* 6BC4 8002B7C4 90830166 */ lbu $v1, 0x166($a0) /* 6BC8 8002B7C8 00031040 */ sll $v0, $v1, 1 /* 6BCC 8002B7CC 00431021 */ addu $v0, $v0, $v1 /* 6BD0 8002B7D0 000210C0 */ sll $v0, $v0, 3 /* 6BD4 8002B7D4 3C088007 */ lui $t0, %hi(gSaveSlotMetadata) /* 6BD8 8002B7D8 01024021 */ addu $t0, $t0, $v0 /* 6BDC 8002B7DC 8D0879C4 */ lw $t0, %lo(gSaveSlotMetadata)($t0) /* 6BE0 8002B7E0 3C098007 */ lui $t1, %hi(D_800779C8) /* 6BE4 8002B7E4 01224821 */ addu $t1, $t1, $v0 /* 6BE8 8002B7E8 8D2979C8 */ lw $t1, %lo(D_800779C8)($t1) /* 6BEC 8002B7EC 3C0A8007 */ lui $t2, %hi(D_800779CC) /* 6BF0 8002B7F0 01425021 */ addu $t2, $t2, $v0 /* 6BF4 8002B7F4 8D4A79CC */ lw $t2, %lo(D_800779CC)($t2) /* 6BF8 8002B7F8 3C0B8007 */ lui $t3, %hi(D_800779D0) /* 6BFC 8002B7FC 01625821 */ addu $t3, $t3, $v0 /* 6C00 8002B800 8D6B79D0 */ lw $t3, %lo(D_800779D0)($t3) /* 6C04 8002B804 AE4812EC */ sw $t0, 0x12EC($s2) /* 6C08 8002B808 AE4912F0 */ sw $t1, 0x12F0($s2) /* 6C0C 8002B80C AE4A12F4 */ sw $t2, 0x12F4($s2) /* 6C10 8002B810 AE4B12F8 */ sw $t3, 0x12F8($s2) /* 6C14 8002B814 3C088007 */ lui $t0, %hi(D_800779D4) /* 6C18 8002B818 01024021 */ addu $t0, $t0, $v0 /* 6C1C 8002B81C 8D0879D4 */ lw $t0, %lo(D_800779D4)($t0) /* 6C20 8002B820 3C098007 */ lui $t1, %hi(D_800779D8) /* 6C24 8002B824 01224821 */ addu $t1, $t1, $v0 /* 6C28 8002B828 8D2979D8 */ lw $t1, %lo(D_800779D8)($t1) /* 6C2C 8002B82C AE4812FC */ sw $t0, 0x12FC($s2) /* 6C30 8002B830 AE491300 */ sw $t1, 0x1300($s2) /* 6C34 8002B834 8FBF001C */ lw $ra, 0x1C($sp) /* 6C38 8002B838 8FB20018 */ lw $s2, 0x18($sp) /* 6C3C 8002B83C 8FB10014 */ lw $s1, 0x14($sp) /* 6C40 8002B840 8FB00010 */ lw $s0, 0x10($sp) /* 6C44 8002B844 03E00008 */ jr $ra /* 6C48 8002B848 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void fio_serialize_state(void) { SaveData* saveData = &gCurrentSaveFile; s32 i, j; saveData->player = gPlayerData; saveData->areaID = gGameStatusPtr->areaID; saveData->mapID = gGameStatusPtr->mapID; saveData->entryID = gGameStatusPtr->entryID; saveData->savePos.x = gGameStatusPtr->savedPos.x; saveData->savePos.y = gGameStatusPtr->savedPos.y; saveData->savePos.z = gGameStatusPtr->savedPos.z; for (i = 0; i < ARRAY_COUNT(gCurrentEncounter.defeatFlags[0]); i++) { for (j = 0; j < ARRAY_COUNT(gCurrentEncounter.defeatFlags); j++) { saveData->enemyDefeatFlags[j][i] = gCurrentEncounter.defeatFlags[j][i]; } } saveData->debugEnemyContact = gGameStatusPtr->debugEnemyContact; saveData->unk_12E1 = gGameStatusPtr->unk_76; saveData->unk_12E2 = gGameStatusPtr->unk_77; saveData->musicEnabled = gGameStatusPtr->musicEnabled; gSaveSlotMetadata[gGameStatusPtr->saveSlot].level = gPlayerData.level; gSaveSlotMetadata[gGameStatusPtr->saveSlot].spiritsRescued = get_spirits_rescued(); gSaveSlotMetadata[gGameStatusPtr->saveSlot].timePlayed = gPlayerData.frameCounter; saveData->unk_12EC = gSaveSlotMetadata[gGameStatusPtr->saveSlot]; }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_draw_npc_sprite /* 1014C8 802DE3D8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 1014CC 802DE3DC 308900FF */ andi $t1, $a0, 0xFF /* 1014D0 802DE3E0 3C02802E */ lui $v0, %hi(SpriteInstances) /* 1014D4 802DE3E4 2442FA48 */ addiu $v0, $v0, %lo(SpriteInstances) /* 1014D8 802DE3E8 00091880 */ sll $v1, $t1, 2 /* 1014DC 802DE3EC 00691821 */ addu $v1, $v1, $t1 /* 1014E0 802DE3F0 00031880 */ sll $v1, $v1, 2 /* 1014E4 802DE3F4 00621821 */ addu $v1, $v1, $v0 /* 1014E8 802DE3F8 2402FFFF */ addiu $v0, $zero, -0x1 /* 1014EC 802DE3FC AFBF003C */ sw $ra, 0x3C($sp) /* 1014F0 802DE400 AFB60038 */ sw $s6, 0x38($sp) /* 1014F4 802DE404 AFB50034 */ sw $s5, 0x34($sp) /* 1014F8 802DE408 AFB40030 */ sw $s4, 0x30($sp) /* 1014FC 802DE40C AFB3002C */ sw $s3, 0x2C($sp) /* 101500 802DE410 AFB20028 */ sw $s2, 0x28($sp) /* 101504 802DE414 AFB10024 */ sw $s1, 0x24($sp) /* 101508 802DE418 AFB00020 */ sw $s0, 0x20($sp) /* 10150C 802DE41C F7B40040 */ sdc1 $f20, 0x40($sp) /* 101510 802DE420 8C68000C */ lw $t0, 0xC($v1) /* 101514 802DE424 8FB60058 */ lw $s6, 0x58($sp) /* 101518 802DE428 1102005C */ beq $t0, $v0, .L802DE59C /* 10151C 802DE42C 0000102D */ daddu $v0, $zero, $zero /* 101520 802DE430 8C620008 */ lw $v0, 0x8($v1) /* 101524 802DE434 310300FF */ andi $v1, $t0, 0xFF /* 101528 802DE438 00031880 */ sll $v1, $v1, 2 /* 10152C 802DE43C 8C550000 */ lw $s5, 0x0($v0) /* 101530 802DE440 24420004 */ addiu $v0, $v0, 0x4 /* 101534 802DE444 8C540000 */ lw $s4, 0x0($v0) /* 101538 802DE448 00431021 */ addu $v0, $v0, $v1 /* 10153C 802DE44C 8C51000C */ lw $s1, 0xC($v0) /* 101540 802DE450 3C02802E */ lui $v0, %hi(D_802DFEA0) /* 101544 802DE454 2442FEA0 */ addiu $v0, $v0, %lo(D_802DFEA0) /* 101548 802DE458 AC400000 */ sw $zero, 0x0($v0) /* 10154C 802DE45C AC450004 */ sw $a1, 0x4($v0) /* 101550 802DE460 AC400008 */ sw $zero, 0x8($v0) /* 101554 802DE464 3C024000 */ lui $v0, (0x40000000 >> 16) /* 101558 802DE468 00821024 */ and $v0, $a0, $v0 /* 10155C 802DE46C 1440001B */ bnez $v0, .L802DE4DC /* 101560 802DE470 24A2FFA5 */ addiu $v0, $a1, -0x5B /* 101564 802DE474 3C03800A */ lui $v1, %hi(gCurrentCamID) /* 101568 802DE478 8463A634 */ lh $v1, %lo(gCurrentCamID)($v1) /* 10156C 802DE47C 00031080 */ sll $v0, $v1, 2 /* 101570 802DE480 00431021 */ addu $v0, $v0, $v1 /* 101574 802DE484 00021080 */ sll $v0, $v0, 2 /* 101578 802DE488 00431023 */ subu $v0, $v0, $v1 /* 10157C 802DE48C 000218C0 */ sll $v1, $v0, 3 /* 101580 802DE490 00431021 */ addu $v0, $v0, $v1 /* 101584 802DE494 000210C0 */ sll $v0, $v0, 3 /* 101588 802DE498 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 10158C 802DE49C 00220821 */ addu $at, $at, $v0 /* 101590 802DE4A0 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 101594 802DE4A4 44850000 */ mtc1 $a1, $f0 /* 101598 802DE4A8 00000000 */ nop /* 10159C 802DE4AC 46800020 */ cvt.s.w $f0, $f0 /* 1015A0 802DE4B0 46020000 */ add.s $f0, $f0, $f2 /* 1015A4 802DE4B4 4600010D */ trunc.w.s $f4, $f0 /* 1015A8 802DE4B8 44052000 */ mfc1 $a1, $f4 /* 1015AC 802DE4BC 00000000 */ nop /* 1015B0 802DE4C0 28A20169 */ slti $v0, $a1, 0x169 /* 1015B4 802DE4C4 50400001 */ beql $v0, $zero, .L802DE4CC /* 1015B8 802DE4C8 24A5FE98 */ addiu $a1, $a1, -0x168 .L802DE4CC: /* 1015BC 802DE4CC 28A2FE98 */ slti $v0, $a1, -0x168 /* 1015C0 802DE4D0 54400001 */ bnel $v0, $zero, .L802DE4D8 /* 1015C4 802DE4D4 24A50168 */ addiu $a1, $a1, 0x168 .L802DE4D8: /* 1015C8 802DE4D8 24A2FFA5 */ addiu $v0, $a1, -0x5B .L802DE4DC: /* 1015CC 802DE4DC 2C4200B4 */ sltiu $v0, $v0, 0xB4 /* 1015D0 802DE4E0 14400004 */ bnez $v0, .L802DE4F4 /* 1015D4 802DE4E4 24A2010E */ addiu $v0, $a1, 0x10E /* 1015D8 802DE4E8 2C4200B4 */ sltiu $v0, $v0, 0xB4 /* 1015DC 802DE4EC 10400005 */ beqz $v0, .L802DE504 /* 1015E0 802DE4F0 00000000 */ nop .L802DE4F4: /* 1015E4 802DE4F4 3C01BFC0 */ lui $at, (0xBFC00000 >> 16) /* 1015E8 802DE4F8 4481A000 */ mtc1 $at, $f20 /* 1015EC 802DE4FC 080B7943 */ j .L802DE50C /* 1015F0 802DE500 00000000 */ nop .L802DE504: /* 1015F4 802DE504 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* 1015F8 802DE508 4481A000 */ mtc1 $at, $f20 .L802DE50C: /* 1015FC 802DE50C 04810005 */ bgez $a0, .L802DE524 /* 101600 802DE510 241300FF */ addiu $s3, $zero, 0xFF /* 101604 802DE514 14C00003 */ bnez $a2, .L802DE524 /* 101608 802DE518 30D300FF */ andi $s3, $a2, 0xFF /* 10160C 802DE51C 080B7967 */ j .L802DE59C /* 101610 802DE520 0000102D */ daddu $v0, $zero, $zero .L802DE524: /* 101614 802DE524 00091080 */ sll $v0, $t1, 2 /* 101618 802DE528 00491021 */ addu $v0, $v0, $t1 /* 10161C 802DE52C 00021080 */ sll $v0, $v0, 2 /* 101620 802DE530 3C10802E */ lui $s0, %hi(D_802DFA4C) /* 101624 802DE534 02028021 */ addu $s0, $s0, $v0 /* 101628 802DE538 8E10FA4C */ lw $s0, %lo(D_802DFA4C)($s0) /* 10162C 802DE53C 3C022000 */ lui $v0, (0x20000000 >> 16) /* 101630 802DE540 00821024 */ and $v0, $a0, $v0 /* 101634 802DE544 54400001 */ bnel $v0, $zero, .L802DE54C /* 101638 802DE548 00E0A02D */ daddu $s4, $a3, $zero .L802DE54C: /* 10163C 802DE54C 8E030000 */ lw $v1, 0x0($s0) /* 101640 802DE550 2402FFFF */ addiu $v0, $zero, -0x1 /* 101644 802DE554 10620010 */ beq $v1, $v0, .L802DE598 /* 101648 802DE558 0040902D */ daddu $s2, $v0, $zero .L802DE55C: /* 10164C 802DE55C 8E050000 */ lw $a1, 0x0($s0) /* 101650 802DE560 0260202D */ daddu $a0, $s3, $zero /* 101654 802DE564 AFB40010 */ sw $s4, 0x10($sp) /* 101658 802DE568 E7B40014 */ swc1 $f20, 0x14($sp) /* 10165C 802DE56C AFB60018 */ sw $s6, 0x18($sp) /* 101660 802DE570 8E260000 */ lw $a2, 0x0($s1) /* 101664 802DE574 0C0B73B7 */ jal spr_draw_component /* 101668 802DE578 02A0382D */ daddu $a3, $s5, $zero /* 10166C 802DE57C 8E220000 */ lw $v0, 0x0($s1) /* 101670 802DE580 10520002 */ beq $v0, $s2, .L802DE58C /* 101674 802DE584 26100004 */ addiu $s0, $s0, 0x4 /* 101678 802DE588 26310004 */ addiu $s1, $s1, 0x4 .L802DE58C: /* 10167C 802DE58C 8E020000 */ lw $v0, 0x0($s0) /* 101680 802DE590 1452FFF2 */ bne $v0, $s2, .L802DE55C /* 101684 802DE594 00000000 */ nop .L802DE598: /* 101688 802DE598 24020001 */ addiu $v0, $zero, 0x1 .L802DE59C: /* 10168C 802DE59C 8FBF003C */ lw $ra, 0x3C($sp) /* 101690 802DE5A0 8FB60038 */ lw $s6, 0x38($sp) /* 101694 802DE5A4 8FB50034 */ lw $s5, 0x34($sp) /* 101698 802DE5A8 8FB40030 */ lw $s4, 0x30($sp) /* 10169C 802DE5AC 8FB3002C */ lw $s3, 0x2C($sp) /* 1016A0 802DE5B0 8FB20028 */ lw $s2, 0x28($sp) /* 1016A4 802DE5B4 8FB10024 */ lw $s1, 0x24($sp) /* 1016A8 802DE5B8 8FB00020 */ lw $s0, 0x20($sp) /* 1016AC 802DE5BC D7B40040 */ ldc1 $f20, 0x40($sp) /* 1016B0 802DE5C0 03E00008 */ jr $ra /* 1016B4 802DE5C4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 spr_draw_npc_sprite(s32 spriteInstanceID, s32 yaw, s32 arg2, PAL_PTR* paletteList, Matrix4f mtx) { s32 i = spriteInstanceID & 0xFF; s32 animID = SpriteInstances[i].currentAnimID; SpriteRasterCacheEntry** rasters; PAL_PTR* palettes; SpriteAnimComponent** animComponents; SpriteComponent** components; f32 zscale; u32 alpha; u32* spriteData; if (animID == ANIM_LIST_END) { return FALSE; } spriteData = (u32*)SpriteInstances[i].spriteData; // TODO: fake match or not? rasters = (SpriteRasterCacheEntry**)*spriteData++; palettes = (PAL_PTR*)*spriteData++; spriteData++; spriteData++; animComponents = (SpriteAnimComponent**)spriteData[animID & 0xFF]; D_802DFEA0[0] = 0; D_802DFEA0[1] = yaw; D_802DFEA0[2] = 0; if (!(spriteInstanceID & DRAW_SPRITE_OVERRIDE_YAW)) { yaw += gCameras[gCurrentCamID].currentYaw; if (yaw > 360) { yaw -= 360; } if (yaw < -360) { yaw += 360; } } if (yaw > 90 && yaw <= 270 || yaw >= -270 && yaw < -90) { zscale = -1.5f; } else { zscale = 1.5f; } if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_ALPHA) { alpha = arg2 & 0xFF; if (arg2 == 0) { return FALSE; } } else { alpha = 255; } components = SpriteInstances[i].componentList; if (spriteInstanceID & DRAW_SPRITE_OVERRIDE_PALETTES) { palettes = paletteList; } while (*components != PTR_LIST_END) { spr_draw_component(alpha, *components++, *animComponents, rasters, palettes, zscale, mtx); if (*animComponents != PTR_LIST_END) { animComponents++; } } return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel balloon_appendGfx /* 39443C E00961BC 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 394440 E00961C0 0080182D */ daddu $v1, $a0, $zero /* 394444 E00961C4 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 394448 E00961C8 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 39444C E00961CC 27A40018 */ addiu $a0, $sp, 0x18 /* 394450 E00961D0 AFB1009C */ sw $s1, 0x9C($sp) /* 394454 E00961D4 3C11800A */ lui $s1, %hi(gMainGfxPos) /* 394458 E00961D8 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* 39445C E00961DC AFB400A8 */ sw $s4, 0xA8($sp) /* 394460 E00961E0 3C140001 */ lui $s4, (0x11630 >> 16) /* 394464 E00961E4 AFB500AC */ sw $s5, 0xAC($sp) /* 394468 E00961E8 3C15E700 */ lui $s5, (0xE7000000 >> 16) /* 39446C E00961EC AFBF00B0 */ sw $ra, 0xB0($sp) /* 394470 E00961F0 AFB300A4 */ sw $s3, 0xA4($sp) /* 394474 E00961F4 AFB200A0 */ sw $s2, 0xA0($sp) /* 394478 E00961F8 AFB00098 */ sw $s0, 0x98($sp) /* 39447C E00961FC F7B400B8 */ sdc1 $f20, 0xB8($sp) /* 394480 E0096200 8E280000 */ lw $t0, 0x0($s1) /* 394484 E0096204 8C72000C */ lw $s2, 0xC($v1) /* 394488 E0096208 0100102D */ daddu $v0, $t0, $zero /* 39448C E009620C 8E530000 */ lw $s3, 0x0($s2) /* 394490 E0096210 25080008 */ addiu $t0, $t0, 0x8 /* 394494 E0096214 AC550000 */ sw $s5, 0x0($v0) /* 394498 E0096218 AC400004 */ sw $zero, 0x4($v0) /* 39449C E009621C AD050000 */ sw $a1, 0x0($t0) /* 3944A0 E0096220 8C620010 */ lw $v0, 0x10($v1) /* 3944A4 E0096224 36941630 */ ori $s4, $s4, (0x11630 & 0xFFFF) /* 3944A8 E0096228 AE280000 */ sw $t0, 0x0($s1) /* 3944AC E009622C 8C42001C */ lw $v0, 0x1C($v0) /* 3944B0 E0096230 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3944B4 E0096234 00431021 */ addu $v0, $v0, $v1 /* 3944B8 E0096238 AD020004 */ sw $v0, 0x4($t0) /* 3944BC E009623C 8E450004 */ lw $a1, 0x4($s2) /* 3944C0 E0096240 8E460008 */ lw $a2, 0x8($s2) /* 3944C4 E0096244 8E47000C */ lw $a3, 0xC($s2) /* 3944C8 E0096248 25080008 */ addiu $t0, $t0, 0x8 /* 3944CC E009624C 0C080108 */ jal shim_guTranslateF /* 3944D0 E0096250 AE280000 */ sw $t0, 0x0($s1) /* 3944D4 E0096254 27B00058 */ addiu $s0, $sp, 0x58 /* 3944D8 E0096258 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3944DC E009625C 4481A000 */ mtc1 $at, $f20 /* 3944E0 E0096260 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 3944E4 E0096264 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 3944E8 E0096268 44800000 */ mtc1 $zero, $f0 /* 3944EC E009626C 00031080 */ sll $v0, $v1, 2 /* 3944F0 E0096270 00431021 */ addu $v0, $v0, $v1 /* 3944F4 E0096274 00021080 */ sll $v0, $v0, 2 /* 3944F8 E0096278 00431023 */ subu $v0, $v0, $v1 /* 3944FC E009627C 000218C0 */ sll $v1, $v0, 3 /* 394500 E0096280 00431021 */ addu $v0, $v0, $v1 /* 394504 E0096284 000210C0 */ sll $v0, $v0, 3 /* 394508 E0096288 44060000 */ mfc1 $a2, $f0 /* 39450C E009628C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 394510 E0096290 00220821 */ addu $at, $at, $v0 /* 394514 E0096294 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 394518 E0096298 4407A000 */ mfc1 $a3, $f20 /* 39451C E009629C 46000007 */ neg.s $f0, $f0 /* 394520 E00962A0 44050000 */ mfc1 $a1, $f0 /* 394524 E00962A4 0200202D */ daddu $a0, $s0, $zero /* 394528 E00962A8 0C080104 */ jal shim_guRotateF /* 39452C E00962AC AFA60010 */ sw $a2, 0x10($sp) /* 394530 E00962B0 0200202D */ daddu $a0, $s0, $zero /* 394534 E00962B4 27A50018 */ addiu $a1, $sp, 0x18 /* 394538 E00962B8 0C080114 */ jal shim_guMtxCatF /* 39453C E00962BC 00A0302D */ daddu $a2, $a1, $zero /* 394540 E00962C0 0200202D */ daddu $a0, $s0, $zero /* 394544 E00962C4 8E450018 */ lw $a1, 0x18($s2) /* 394548 E00962C8 4407A000 */ mfc1 $a3, $f20 /* 39454C E00962CC 0C080110 */ jal shim_guScaleF /* 394550 E00962D0 00A0302D */ daddu $a2, $a1, $zero /* 394554 E00962D4 0200202D */ daddu $a0, $s0, $zero /* 394558 E00962D8 27A50018 */ addiu $a1, $sp, 0x18 /* 39455C E00962DC 0C080114 */ jal shim_guMtxCatF /* 394560 E00962E0 00A0302D */ daddu $a2, $a1, $zero /* 394564 E00962E4 27A40018 */ addiu $a0, $sp, 0x18 /* 394568 E00962E8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 39456C E00962EC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 394570 E00962F0 3C12800A */ lui $s2, %hi(gDisplayContext) /* 394574 E00962F4 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 394578 E00962F8 96050000 */ lhu $a1, 0x0($s0) /* 39457C E00962FC 8E420000 */ lw $v0, 0x0($s2) /* 394580 E0096300 00052980 */ sll $a1, $a1, 6 /* 394584 E0096304 00B42821 */ addu $a1, $a1, $s4 /* 394588 E0096308 0C080118 */ jal shim_guMtxF2L /* 39458C E009630C 00452821 */ addu $a1, $v0, $a1 /* 394590 E0096310 3C06D838 */ lui $a2, (0xD8380002 >> 16) /* 394594 E0096314 34C60002 */ ori $a2, $a2, (0xD8380002 & 0xFFFF) /* 394598 E0096318 8E240000 */ lw $a0, 0x0($s1) /* 39459C E009631C 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 3945A0 E0096320 0080282D */ daddu $a1, $a0, $zero /* 3945A4 E0096324 24840008 */ addiu $a0, $a0, 0x8 /* 3945A8 E0096328 AE240000 */ sw $a0, 0x0($s1) /* 3945AC E009632C 96020000 */ lhu $v0, 0x0($s0) /* 3945B0 E0096330 00139880 */ sll $s3, $s3, 2 /* 3945B4 E0096334 ACA30000 */ sw $v1, 0x0($a1) /* 3945B8 E0096338 24430001 */ addiu $v1, $v0, 0x1 /* 3945BC E009633C 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3945C0 E0096340 00021180 */ sll $v0, $v0, 6 /* 3945C4 E0096344 A6030000 */ sh $v1, 0x0($s0) /* 3945C8 E0096348 8E430000 */ lw $v1, 0x0($s2) /* 3945CC E009634C 00541021 */ addu $v0, $v0, $s4 /* 3945D0 E0096350 00621821 */ addu $v1, $v1, $v0 /* 3945D4 E0096354 24820008 */ addiu $v0, $a0, 0x8 /* 3945D8 E0096358 ACA30004 */ sw $v1, 0x4($a1) /* 3945DC E009635C 3C03DE00 */ lui $v1, (0xDE000000 >> 16) /* 3945E0 E0096360 AE220000 */ sw $v0, 0x0($s1) /* 3945E4 E0096364 AC830000 */ sw $v1, 0x0($a0) /* 3945E8 E0096368 3C05E009 */ lui $a1, (0xE00963E0 >> 16) /* 3945EC E009636C 00B32821 */ addu $a1, $a1, $s3 /* 3945F0 E0096370 8CA563E0 */ lw $a1, (0xE00963E0 & 0xFFFF)($a1) /* 3945F4 E0096374 24820010 */ addiu $v0, $a0, 0x10 /* 3945F8 E0096378 AE220000 */ sw $v0, 0x0($s1) /* 3945FC E009637C 3C020900 */ lui $v0, %hi(D_09001508_40E798) /* 394600 E0096380 24421508 */ addiu $v0, $v0, %lo(D_09001508_40E798) /* 394604 E0096384 AC82000C */ sw $v0, 0xC($a0) /* 394608 E0096388 24820018 */ addiu $v0, $a0, 0x18 /* 39460C E009638C AC830008 */ sw $v1, 0x8($a0) /* 394610 E0096390 AE220000 */ sw $v0, 0x0($s1) /* 394614 E0096394 24020040 */ addiu $v0, $zero, 0x40 /* 394618 E0096398 AC820014 */ sw $v0, 0x14($a0) /* 39461C E009639C 24820020 */ addiu $v0, $a0, 0x20 /* 394620 E00963A0 AC860010 */ sw $a2, 0x10($a0) /* 394624 E00963A4 AE220000 */ sw $v0, 0x0($s1) /* 394628 E00963A8 AC950018 */ sw $s5, 0x18($a0) /* 39462C E00963AC AC80001C */ sw $zero, 0x1C($a0) /* 394630 E00963B0 AC850004 */ sw $a1, 0x4($a0) /* 394634 E00963B4 8FBF00B0 */ lw $ra, 0xB0($sp) /* 394638 E00963B8 8FB500AC */ lw $s5, 0xAC($sp) /* 39463C E00963BC 8FB400A8 */ lw $s4, 0xA8($sp) /* 394640 E00963C0 8FB300A4 */ lw $s3, 0xA4($sp) /* 394644 E00963C4 8FB200A0 */ lw $s2, 0xA0($sp) /* 394648 E00963C8 8FB1009C */ lw $s1, 0x9C($sp) /* 39464C E00963CC 8FB00098 */ lw $s0, 0x98($sp) /* 394650 E00963D0 D7B400B8 */ ldc1 $f20, 0xB8($sp) /* 394654 E00963D4 03E00008 */ jr $ra /* 394658 E00963D8 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 39465C E00963DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void balloon_appendGfx(void* effect) { Matrix4f sp18; Matrix4f sp58; BalloonFXData* data = ((EffectInstance*)effect)->data.balloon; s32 idx = data->unk_00; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); shim_guTranslateF(sp18, data->unk_04, data->unk_08, data->unk_0C); shim_guRotateF(sp58, -gCameras[gCurrentCameraID].currentYaw, 0.0f, 1.0f, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guScaleF(sp58, data->unk_18, data->unk_18, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, D_E00963E0[idx]); gSPDisplayList(gMainGfxPos++, D_09001508_395B78); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802546D4 /* 182FB4 802546D4 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 182FB8 802546D8 AFB10014 */ sw $s1, 0x14($sp) /* 182FBC 802546DC 3C11800E */ lui $s1, %hi(gBattleStatus + 0xD8) /* 182FC0 802546E0 8E31C148 */ lw $s1, %lo(gBattleStatus + 0xD8)($s1) /* 182FC4 802546E4 AFB40020 */ sw $s4, 0x20($sp) /* 182FC8 802546E8 0000A02D */ daddu $s4, $zero, $zero /* 182FCC 802546EC AFB50024 */ sw $s5, 0x24($sp) /* 182FD0 802546F0 3C158000 */ lui $s5, (0x80000000 >> 16) /* 182FD4 802546F4 AFBF0028 */ sw $ra, 0x28($sp) /* 182FD8 802546F8 AFB3001C */ sw $s3, 0x1C($sp) /* 182FDC 802546FC AFB20018 */ sw $s2, 0x18($sp) /* 182FE0 80254700 AFB00010 */ sw $s0, 0x10($sp) /* 182FE4 80254704 F7B60038 */ sdc1 $f22, 0x38($sp) /* 182FE8 80254708 F7B40030 */ sdc1 $f20, 0x30($sp) /* 182FEC 8025470C 8E3301F4 */ lw $s3, 0x1F4($s1) /* 182FF0 80254710 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 182FF4 80254714 4481B000 */ mtc1 $at, $f22 /* 182FF8 80254718 8E6200C0 */ lw $v0, 0xC0($s3) /* 182FFC 8025471C 3C014F00 */ lui $at, (0x4F000000 >> 16) /* 183000 80254720 4481A000 */ mtc1 $at, $f20 /* 183004 80254724 0040802D */ daddu $s0, $v0, $zero /* 183008 80254728 920207DB */ lbu $v0, 0x7DB($s0) /* 18300C 8025472C 3C031000 */ lui $v1, (0x10000000 >> 16) /* 183010 80254730 A20008AC */ sb $zero, 0x8AC($s0) /* 183014 80254734 24420001 */ addiu $v0, $v0, 0x1 /* 183018 80254738 A20207DB */ sb $v0, 0x7DB($s0) /* 18301C 8025473C 8E220000 */ lw $v0, 0x0($s1) /* 183020 80254740 0200902D */ daddu $s2, $s0, $zero /* 183024 80254744 00431025 */ or $v0, $v0, $v1 /* 183028 80254748 AE220000 */ sw $v0, 0x0($s1) /* 18302C 8025474C A20007D8 */ sb $zero, 0x7D8($s0) /* 183030 80254750 A20007D9 */ sb $zero, 0x7D9($s0) .L80254754: /* 183034 80254754 C6600058 */ lwc1 $f0, 0x58($s3) /* 183038 80254758 4600010D */ trunc.w.s $f4, $f0 /* 18303C 8025475C 44022000 */ mfc1 $v0, $f4 /* 183040 80254760 00000000 */ nop /* 183044 80254764 A60207FC */ sh $v0, 0x7FC($s0) /* 183048 80254768 C660005C */ lwc1 $f0, 0x5C($s3) /* 18304C 8025476C 4600010D */ trunc.w.s $f4, $f0 /* 183050 80254770 44022000 */ mfc1 $v0, $f4 /* 183054 80254774 00000000 */ nop /* 183058 80254778 A602081C */ sh $v0, 0x81C($s0) /* 18305C 8025477C C6600060 */ lwc1 $f0, 0x60($s3) /* 183060 80254780 4600010D */ trunc.w.s $f4, $f0 /* 183064 80254784 44022000 */ mfc1 $v0, $f4 /* 183068 80254788 00000000 */ nop /* 18306C 8025478C A602083C */ sh $v0, 0x83C($s0) /* 183070 80254790 C620018C */ lwc1 $f0, 0x18C($s1) /* 183074 80254794 4600010D */ trunc.w.s $f4, $f0 /* 183078 80254798 44022000 */ mfc1 $v0, $f4 /* 18307C 8025479C 00000000 */ nop /* 183080 802547A0 A60207DC */ sh $v0, 0x7DC($s0) /* 183084 802547A4 86220168 */ lh $v0, 0x168($s1) /* 183088 802547A8 C6220188 */ lwc1 $f2, 0x188($s1) /* 18308C 802547AC 44820000 */ mtc1 $v0, $f0 /* 183090 802547B0 00000000 */ nop /* 183094 802547B4 46800020 */ cvt.s.w $f0, $f0 /* 183098 802547B8 46020002 */ mul.s $f0, $f0, $f2 /* 18309C 802547BC 00000000 */ nop /* 1830A0 802547C0 4600010D */ trunc.w.s $f4, $f0 /* 1830A4 802547C4 44022000 */ mfc1 $v0, $f4 /* 1830A8 802547C8 00000000 */ nop /* 1830AC 802547CC A242085C */ sb $v0, 0x85C($s2) nok_02_D_802547D0: /* 1830B0 802547D0 8622016A */ lh $v0, 0x16A($s1) /* 1830B4 802547D4 C6220188 */ lwc1 $f2, 0x188($s1) /* 1830B8 802547D8 44820000 */ mtc1 $v0, $f0 /* 1830BC 802547DC 00000000 */ nop /* 1830C0 802547E0 46800020 */ cvt.s.w $f0, $f0 /* 1830C4 802547E4 46020002 */ mul.s $f0, $f0, $f2 /* 1830C8 802547E8 00000000 */ nop /* 1830CC 802547EC 4600010D */ trunc.w.s $f4, $f0 /* 1830D0 802547F0 44022000 */ mfc1 $v0, $f4 /* 1830D4 802547F4 00000000 */ nop /* 1830D8 802547F8 A242086C */ sb $v0, 0x86C($s2) /* 1830DC 802547FC 0C00A6C9 */ jal clamp_angle /* 1830E0 80254800 C62C015C */ lwc1 $f12, 0x15C($s1) /* 1830E4 80254804 46160002 */ mul.s $f0, $f0, $f22 /* 1830E8 80254808 00000000 */ nop /* 1830EC 8025480C 4600A03E */ c.le.s $f20, $f0 /* 1830F0 80254810 00000000 */ nop /* 1830F4 80254814 45010005 */ bc1t .L8025482C /* 1830F8 80254818 2643087C */ addiu $v1, $s2, 0x87C /* 1830FC 8025481C 4600010D */ trunc.w.s $f4, $f0 /* 183100 80254820 44022000 */ mfc1 $v0, $f4 /* 183104 80254824 08095211 */ j .L80254844 /* 183108 80254828 A0620000 */ sb $v0, 0x0($v1) .L8025482C: /* 18310C 8025482C 46140001 */ sub.s $f0, $f0, $f20 /* 183110 80254830 4600010D */ trunc.w.s $f4, $f0 /* 183114 80254834 44022000 */ mfc1 $v0, $f4 /* 183118 80254838 00000000 */ nop /* 18311C 8025483C 00551025 */ or $v0, $v0, $s5 /* 183120 80254840 A0620000 */ sb $v0, 0x0($v1) .L80254844: /* 183124 80254844 0C00A6C9 */ jal clamp_angle /* 183128 80254848 C62C0160 */ lwc1 $f12, 0x160($s1) /* 18312C 8025484C 46160002 */ mul.s $f0, $f0, $f22 /* 183130 80254850 00000000 */ nop /* 183134 80254854 4600A03E */ c.le.s $f20, $f0 D_80254858: /* 183138 80254858 00000000 */ nop /* 18313C 8025485C 45010005 */ bc1t .L80254874 D_80254860: /* 183140 80254860 2643088C */ addiu $v1, $s2, 0x88C /* 183144 80254864 4600010D */ trunc.w.s $f4, $f0 /* 183148 80254868 44022000 */ mfc1 $v0, $f4 /* 18314C 8025486C 08095223 */ j .L8025488C /* 183150 80254870 A0620000 */ sb $v0, 0x0($v1) .L80254874: /* 183154 80254874 46140001 */ sub.s $f0, $f0, $f20 /* 183158 80254878 4600010D */ trunc.w.s $f4, $f0 /* 18315C 8025487C 44022000 */ mfc1 $v0, $f4 /* 183160 80254880 00000000 */ nop /* 183164 80254884 00551025 */ or $v0, $v0, $s5 /* 183168 80254888 A0620000 */ sb $v0, 0x0($v1) .L8025488C: /* 18316C 8025488C 0C00A6C9 */ jal clamp_angle /* 183170 80254890 C62C0164 */ lwc1 $f12, 0x164($s1) /* 183174 80254894 46160002 */ mul.s $f0, $f0, $f22 /* 183178 80254898 00000000 */ nop /* 18317C 8025489C 4600A03E */ c.le.s $f20, $f0 /* 183180 802548A0 00000000 */ nop /* 183184 802548A4 45010005 */ bc1t .L802548BC /* 183188 802548A8 2643089C */ addiu $v1, $s2, 0x89C /* 18318C 802548AC 4600010D */ trunc.w.s $f4, $f0 /* 183190 802548B0 44022000 */ mfc1 $v0, $f4 /* 183194 802548B4 08095235 */ j .L802548D4 /* 183198 802548B8 A0620000 */ sb $v0, 0x0($v1) .L802548BC: /* 18319C 802548BC 46140001 */ sub.s $f0, $f0, $f20 /* 1831A0 802548C0 4600010D */ trunc.w.s $f4, $f0 /* 1831A4 802548C4 44022000 */ mfc1 $v0, $f4 /* 1831A8 802548C8 00000000 */ nop /* 1831AC 802548CC 00551025 */ or $v0, $v0, $s5 /* 1831B0 802548D0 A0620000 */ sb $v0, 0x0($v1) .L802548D4: /* 1831B4 802548D4 26520001 */ addiu $s2, $s2, 0x1 /* 1831B8 802548D8 26940001 */ addiu $s4, $s4, 0x1 /* 1831BC 802548DC 2A820010 */ slti $v0, $s4, 0x10 /* 1831C0 802548E0 1440FF9C */ bnez $v0, .L80254754 /* 1831C4 802548E4 26100002 */ addiu $s0, $s0, 0x2 /* 1831C8 802548E8 8FBF0028 */ lw $ra, 0x28($sp) /* 1831CC 802548EC 8FB50024 */ lw $s5, 0x24($sp) /* 1831D0 802548F0 8FB40020 */ lw $s4, 0x20($sp) /* 1831D4 802548F4 8FB3001C */ lw $s3, 0x1C($sp) /* 1831D8 802548F8 8FB20018 */ lw $s2, 0x18($sp) /* 1831DC 802548FC 8FB10014 */ lw $s1, 0x14($sp) /* 1831E0 80254900 8FB00010 */ lw $s0, 0x10($sp) /* 1831E4 80254904 D7B60038 */ ldc1 $f22, 0x38($sp) /* 1831E8 80254908 D7B40030 */ ldc1 $f20, 0x30($sp) /* 1831EC 8025490C 03E00008 */ jr $ra /* 1831F0 80254910 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void enable_player_blur(void) { Actor* playerActor = gBattleStatus.playerActor; ActorPart* partsTable = playerActor->partsTable; DecorationTable* decorationTable = partsTable->decorationTable; s32 i; decorationTable->effectType = 0; decorationTable->unk_7DB++; playerActor->flags |= ACTOR_FLAG_BLUR_ENABLED; decorationTable->unk_7D8 = 0; decorationTable->unk_7D9 = 0; for (i = 0; i < ARRAY_COUNT(decorationTable->posX); i++) { decorationTable->posX[i] = partsTable->currentPos.x; decorationTable->posY[i] = partsTable->currentPos.y; decorationTable->posZ[i] = partsTable->currentPos.z; decorationTable->yaw[i] = playerActor->yaw; decorationTable->rotationPivotOffsetX[i] = playerActor->rotationPivotOffset.x * playerActor->scalingFactor; decorationTable->rotationPivotOffsetY[i] = playerActor->rotationPivotOffset.y * playerActor->scalingFactor; decorationTable->rotX[i] = clamp_angle(playerActor->rotation.x) * 0.5f; decorationTable->rotY[i] = clamp_angle(playerActor->rotation.y) * 0.5f; decorationTable->rotZ[i] = clamp_angle(playerActor->rotation.z) * 0.5f; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_camera_mode_5 /* B400 80030000 3C014190 */ lui $at, (0x41900000 >> 16) /* B404 80030004 44810000 */ mtc1 $at, $f0 /* B408 80030008 3C01442C */ lui $at, (0x442C8000 >> 16) /* B40C 8003000C 34218000 */ ori $at, $at, (0x442C8000 & 0xFFFF) /* B410 80030010 44811000 */ mtc1 $at, $f2 /* B414 80030014 3C01423C */ lui $at, (0x423C0000 >> 16) /* B418 80030018 44812000 */ mtc1 $at, $f4 /* B41C 8003001C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* B420 80030020 AFB00010 */ sw $s0, 0x10($sp) /* B424 80030024 0080802D */ daddu $s0, $a0, $zero /* B428 80030028 AFBF0014 */ sw $ra, 0x14($sp) /* B42C 8003002C F7BA0030 */ sdc1 $f26, 0x30($sp) /* B430 80030030 F7B80028 */ sdc1 $f24, 0x28($sp) /* B434 80030034 F7B60020 */ sdc1 $f22, 0x20($sp) /* B438 80030038 F7B40018 */ sdc1 $f20, 0x18($sp) /* B43C 8003003C 86020006 */ lh $v0, 0x6($s0) /* B440 80030040 E6000074 */ swc1 $f0, 0x74($s0) /* B444 80030044 E6020078 */ swc1 $f2, 0x78($s0) /* B448 80030048 10400013 */ beqz $v0, .L80030098 /* B44C 8003004C E604007C */ swc1 $f4, 0x7C($s0) /* B450 80030050 46002086 */ mov.s $f2, $f4 /* B454 80030054 44800000 */ mtc1 $zero, $f0 /* B458 80030058 C6060060 */ lwc1 $f6, 0x60($s0) /* B45C 8003005C C6040068 */ lwc1 $f4, 0x68($s0) /* B460 80030060 44050000 */ mfc1 $a1, $f0 /* B464 80030064 E6000550 */ swc1 $f0, 0x550($s0) /* B468 80030068 E6000070 */ swc1 $f0, 0x70($s0) /* B46C 8003006C E6000084 */ swc1 $f0, 0x84($s0) /* B470 80030070 C6000064 */ lwc1 $f0, 0x64($s0) /* B474 80030074 0000382D */ daddu $a3, $zero, $zero /* B478 80030078 A6000006 */ sh $zero, 0x6($s0) /* B47C 8003007C A6000554 */ sh $zero, 0x554($s0) /* B480 80030080 E6060048 */ swc1 $f6, 0x48($s0) /* B484 80030084 46020000 */ add.s $f0, $f0, $f2 /* B488 80030088 E6040050 */ swc1 $f4, 0x50($s0) /* B48C 8003008C 00A0302D */ daddu $a2, $a1, $zero /* B490 80030090 0800C04F */ j .L8003013C /* B494 80030094 E600004C */ swc1 $f0, 0x4C($s0) .L80030098: /* B498 80030098 3C028011 */ lui $v0, %hi(gPlayerStatus) /* B49C 8003009C 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) /* B4A0 800300A0 C4480054 */ lwc1 $f8, 0x54($v0) /* B4A4 800300A4 3C013FC0 */ lui $at, (0x3FC00000 >> 16) /* B4A8 800300A8 44813000 */ mtc1 $at, $f6 /* B4AC 800300AC 00000000 */ nop /* B4B0 800300B0 46064182 */ mul.s $f6, $f8, $f6 /* B4B4 800300B4 00000000 */ nop /* B4B8 800300B8 3C013D4C */ lui $at, (0x3D4CCCCD >> 16) /* B4BC 800300BC 3421CCCD */ ori $at, $at, (0x3D4CCCCD & 0xFFFF) /* B4C0 800300C0 44816000 */ mtc1 $at, $f12 /* B4C4 800300C4 00000000 */ nop /* B4C8 800300C8 460C4202 */ mul.s $f8, $f8, $f12 /* B4CC 800300CC 00000000 */ nop /* B4D0 800300D0 C6040060 */ lwc1 $f4, 0x60($s0) /* B4D4 800300D4 C6000550 */ lwc1 $f0, 0x550($s0) /* B4D8 800300D8 C6020064 */ lwc1 $f2, 0x64($s0) /* B4DC 800300DC 46002100 */ add.s $f4, $f4, $f0 /* B4E0 800300E0 C600007C */ lwc1 $f0, 0x7C($s0) /* B4E4 800300E4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* B4E8 800300E8 44815000 */ mtc1 $at, $f10 /* B4EC 800300EC 46001080 */ add.s $f2, $f2, $f0 /* B4F0 800300F0 C6000068 */ lwc1 $f0, 0x68($s0) /* B4F4 800300F4 0200202D */ daddu $a0, $s0, $zero /* B4F8 800300F8 E600005C */ swc1 $f0, 0x5C($s0) /* B4FC 800300FC 460A3580 */ add.s $f22, $f6, $f10 /* B500 80030100 E6040054 */ swc1 $f4, 0x54($s0) /* B504 80030104 E6020058 */ swc1 $f2, 0x58($s0) /* B508 80030108 0C00C0D3 */ jal func_8003034C /* B50C 8003010C 460C4500 */ add.s $f20, $f8, $f12 /* B510 80030110 96020002 */ lhu $v0, 0x2($s0) /* B514 80030114 30420001 */ andi $v0, $v0, 0x1 /* B518 80030118 14400005 */ bnez $v0, .L80030130 /* B51C 8003011C 0200202D */ daddu $a0, $s0, $zero /* B520 80030120 4405A000 */ mfc1 $a1, $f20 /* B524 80030124 4406B000 */ mfc1 $a2, $f22 /* B528 80030128 0800C04F */ j .L8003013C /* B52C 8003012C 0000382D */ daddu $a3, $zero, $zero .L80030130: /* B530 80030130 4405A000 */ mfc1 $a1, $f20 /* B534 80030134 4406B000 */ mfc1 $a2, $f22 /* B538 80030138 24070001 */ addiu $a3, $zero, 0x1 .L8003013C: /* B53C 8003013C 0C00C084 */ jal cam_interp_lookat_pos /* B540 80030140 00000000 */ nop /* B544 80030144 C60C003C */ lwc1 $f12, 0x3C($s0) /* B548 80030148 C60E0044 */ lwc1 $f14, 0x44($s0) /* B54C 8003014C 8E060048 */ lw $a2, 0x48($s0) /* B550 80030150 8E070050 */ lw $a3, 0x50($s0) /* B554 80030154 4480C000 */ mtc1 $zero, $f24 /* B558 80030158 0C00A720 */ jal atan2 /* B55C 8003015C 00000000 */ nop /* B560 80030160 4600C306 */ mov.s $f12, $f24 /* B564 80030164 4600C386 */ mov.s $f14, $f24 /* B568 80030168 C6040048 */ lwc1 $f4, 0x48($s0) /* B56C 8003016C C602003C */ lwc1 $f2, 0x3C($s0) /* B570 80030170 C6140050 */ lwc1 $f20, 0x50($s0) /* B574 80030174 46022581 */ sub.s $f22, $f4, $f2 /* B578 80030178 C6020044 */ lwc1 $f2, 0x44($s0) /* B57C 8003017C C604004C */ lwc1 $f4, 0x4C($s0) /* B580 80030180 4602A501 */ sub.s $f20, $f20, $f2 /* B584 80030184 C6020040 */ lwc1 $f2, 0x40($s0) /* B588 80030188 4406B000 */ mfc1 $a2, $f22 /* B58C 8003018C 4407A000 */ mfc1 $a3, $f20 /* B590 80030190 46022681 */ sub.s $f26, $f4, $f2 /* B594 80030194 0C00A720 */ jal atan2 /* B598 80030198 E600006C */ swc1 $f0, 0x6C($s0) /* B59C 8003019C 4616B082 */ mul.s $f2, $f22, $f22 /* B5A0 800301A0 00000000 */ nop /* B5A4 800301A4 4614A502 */ mul.s $f20, $f20, $f20 /* B5A8 800301A8 00000000 */ nop /* B5AC 800301AC 46141300 */ add.s $f12, $f2, $f20 /* B5B0 800301B0 46000007 */ neg.s $f0, $f0 /* B5B4 800301B4 E6000090 */ swc1 $f0, 0x90($s0) /* B5B8 800301B8 46006004 */ sqrt.s $f0, $f12 /* B5BC 800301BC 46000032 */ c.eq.s $f0, $f0 /* B5C0 800301C0 00000000 */ nop /* B5C4 800301C4 45030004 */ bc1tl .L800301D8 /* B5C8 800301C8 4600C306 */ mov.s $f12, $f24 /* B5CC 800301CC 0C0187BC */ jal sqrtf /* B5D0 800301D0 00000000 */ nop /* B5D4 800301D4 4600C306 */ mov.s $f12, $f24 .L800301D8: /* B5D8 800301D8 46000007 */ neg.s $f0, $f0 /* B5DC 800301DC 4406D000 */ mfc1 $a2, $f26 /* B5E0 800301E0 44070000 */ mfc1 $a3, $f0 /* B5E4 800301E4 0C00A720 */ jal atan2 /* B5E8 800301E8 46006386 */ mov.s $f14, $f12 /* B5EC 800301EC E6000094 */ swc1 $f0, 0x94($s0) /* B5F0 800301F0 8FBF0014 */ lw $ra, 0x14($sp) /* B5F4 800301F4 8FB00010 */ lw $s0, 0x10($sp) /* B5F8 800301F8 D7BA0030 */ ldc1 $f26, 0x30($sp) /* B5FC 800301FC D7B80028 */ ldc1 $f24, 0x28($sp) /* B600 80030200 D7B60020 */ ldc1 $f22, 0x20($sp) /* B604 80030204 D7B40018 */ ldc1 $f20, 0x18($sp) /* B608 80030208 03E00008 */ jr $ra /* B60C 8003020C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void update_camera_mode_5(Camera* camera) { PlayerStatus* playerStatus = &gPlayerStatus; f32 lookXDelta, lookYDelta, lookZDelta; camera->currentBoomYaw = 18.0f; camera->currentBoomLength = 690.0f; camera->currentYOffset = 47.0f; if (camera->needsInit) { camera->unk_550 = 0.0f; camera->unk_70 = 0.0f; camera->trueRotation.x = 0.0f; camera->needsInit = FALSE; camera->unk_554 = 0; camera->lookAt_obj.x = camera->targetPos.x; camera->lookAt_obj.y = camera->targetPos.y + camera->currentYOffset; camera->lookAt_obj.z = camera->targetPos.z; cam_interp_lookat_pos(camera, 0.0f, 0.0f, FALSE); } else { f32 maxInterpSpeed = (playerStatus->currentSpeed * 1.5f) + 1.0f; f32 interpRate = (playerStatus->currentSpeed * 0.05f) + 0.05f; camera->lookAt_obj_target.x = camera->targetPos.x + camera->unk_550; camera->lookAt_obj_target.y = camera->targetPos.y + camera->currentYOffset; camera->lookAt_obj_target.z = camera->targetPos.z; func_8003034C(camera); if (!(camera->moveFlags & CAMERA_MOVE_IGNORE_PLAYER_Y)) { cam_interp_lookat_pos(camera, interpRate, maxInterpSpeed, FALSE); } else { lookXDelta = maxInterpSpeed; // needed to match cam_interp_lookat_pos(camera, interpRate, lookXDelta, TRUE); } } camera->currentYaw = atan2(camera->lookAt_eye.x, camera->lookAt_eye.z, camera->lookAt_obj.x, camera->lookAt_obj.z); lookXDelta = camera->lookAt_obj.x - camera->lookAt_eye.x; lookYDelta = camera->lookAt_obj.y - camera->lookAt_eye.y; lookZDelta = camera->lookAt_obj.z - camera->lookAt_eye.z; camera->currentBlendedYawNegated = -atan2(0.0f, 0.0f, lookXDelta, lookZDelta); camera->currentPitch = atan2(0.0f, 0.0f, lookYDelta, -sqrtf(SQ(lookXDelta) + SQ(lookZDelta))); }
### RAW ASSEMBLY INSTRUCTIONS: glabel dispatch_damage_event_player /* 1A1A9C 802731BC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 1A1AA0 802731C0 00A0402D */ daddu $t0, $a1, $zero /* 1A1AA4 802731C4 AFB30024 */ sw $s3, 0x24($sp) /* 1A1AA8 802731C8 3C13800E */ lui $s3, %hi(gBattleStatus) /* 1A1AAC 802731CC 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus) /* 1A1AB0 802731D0 AFBF0028 */ sw $ra, 0x28($sp) /* 1A1AB4 802731D4 AFB20020 */ sw $s2, 0x20($sp) /* 1A1AB8 802731D8 AFB1001C */ sw $s1, 0x1C($sp) /* 1A1ABC 802731DC AFB00018 */ sw $s0, 0x18($sp) /* 1A1AC0 802731E0 A664017E */ sh $a0, 0x17E($s3) /* 1A1AC4 802731E4 00042400 */ sll $a0, $a0, 16 /* 1A1AC8 802731E8 8E7000D8 */ lw $s0, 0xD8($s3) /* 1A1ACC 802731EC 00043C03 */ sra $a3, $a0, 16 /* 1A1AD0 802731F0 960201FA */ lhu $v0, 0x1FA($s0) /* 1A1AD4 802731F4 3C058011 */ lui $a1, %hi(gPlayerData) /* 1A1AD8 802731F8 24A5F290 */ addiu $a1, $a1, %lo(gPlayerData) /* 1A1ADC 802731FC 00471021 */ addu $v0, $v0, $a3 /* 1A1AE0 80273200 00021C00 */ sll $v1, $v0, 16 /* 1A1AE4 80273204 00033C03 */ sra $a3, $v1, 16 /* 1A1AE8 80273208 A60201FA */ sh $v0, 0x1FA($s0) /* 1A1AEC 8027320C 90A40002 */ lbu $a0, 0x2($a1) /* 1A1AF0 80273210 960201FC */ lhu $v0, 0x1FC($s0) /* 1A1AF4 80273214 960301FA */ lhu $v1, 0x1FA($s0) /* 1A1AF8 80273218 00471021 */ addu $v0, $v0, $a3 /* 1A1AFC 8027321C 00671823 */ subu $v1, $v1, $a3 /* 1A1B00 80273220 A60201FC */ sh $v0, 0x1FC($s0) /* 1A1B04 80273224 A20401B8 */ sb $a0, 0x1B8($s0) /* 1A1B08 80273228 A60301FA */ sh $v1, 0x1FA($s0) /* 1A1B0C 8027322C A6600180 */ sh $zero, 0x180($s3) /* 1A1B10 80273230 920201B8 */ lbu $v0, 0x1B8($s0) /* 1A1B14 80273234 00471023 */ subu $v0, $v0, $a3 /* 1A1B18 80273238 A20201B8 */ sb $v0, 0x1B8($s0) /* 1A1B1C 8027323C 9262007B */ lbu $v0, 0x7B($s3) /* 1A1B20 80273240 0100902D */ daddu $s2, $t0, $zero /* 1A1B24 80273244 00471021 */ addu $v0, $v0, $a3 /* 1A1B28 80273248 A262007B */ sb $v0, 0x7B($s3) /* 1A1B2C 8027324C 820301B8 */ lb $v1, 0x1B8($s0) /* 1A1B30 80273250 1C600006 */ bgtz $v1, .L8027326C /* 1A1B34 80273254 2611000C */ addiu $s1, $s0, 0xC /* 1A1B38 80273258 96620180 */ lhu $v0, 0x180($s3) /* 1A1B3C 8027325C 24120020 */ addiu $s2, $zero, 0x20 /* 1A1B40 80273260 00431021 */ addu $v0, $v0, $v1 /* 1A1B44 80273264 A6620180 */ sh $v0, 0x180($s3) /* 1A1B48 80273268 A20001B8 */ sb $zero, 0x1B8($s0) .L8027326C: /* 1A1B4C 8027326C 96620180 */ lhu $v0, 0x180($s3) /* 1A1B50 80273270 00471021 */ addu $v0, $v0, $a3 /* 1A1B54 80273274 A6620180 */ sh $v0, 0x180($s3) /* 1A1B58 80273278 920201B8 */ lbu $v0, 0x1B8($s0) /* 1A1B5C 8027327C A0A20002 */ sb $v0, 0x2($a1) /* 1A1B60 80273280 24020009 */ addiu $v0, $zero, 0x9 /* 1A1B64 80273284 52420001 */ beql $s2, $v0, .L8027328C /* 1A1B68 80273288 2412000A */ addiu $s2, $zero, 0xA .L8027328C: /* 1A1B6C 8027328C 24020017 */ addiu $v0, $zero, 0x17 /* 1A1B70 80273290 52420001 */ beql $s2, $v0, .L80273298 /* 1A1B74 80273294 24120019 */ addiu $s2, $zero, 0x19 .L80273298: /* 1A1B78 80273298 24020020 */ addiu $v0, $zero, 0x20 /* 1A1B7C 8027329C 16420009 */ bne $s2, $v0, .L802732C4 /* 1A1B80 802732A0 2402002A */ addiu $v0, $zero, 0x2A /* 1A1B84 802732A4 51020001 */ beql $t0, $v0, .L802732AC /* 1A1B88 802732A8 24120027 */ addiu $s2, $zero, 0x27 .L802732AC: /* 1A1B8C 802732AC 2402002C */ addiu $v0, $zero, 0x2C /* 1A1B90 802732B0 51020001 */ beql $t0, $v0, .L802732B8 /* 1A1B94 802732B4 24120024 */ addiu $s2, $zero, 0x24 .L802732B8: /* 1A1B98 802732B8 2402002F */ addiu $v0, $zero, 0x2F /* 1A1B9C 802732BC 51020001 */ beql $t0, $v0, .L802732C4 /* 1A1BA0 802732C0 24120026 */ addiu $s2, $zero, 0x26 .L802732C4: /* 1A1BA4 802732C4 14C0000D */ bnez $a2, .L802732FC /* 1A1BA8 802732C8 24020001 */ addiu $v0, $zero, 0x1 /* 1A1BAC 802732CC 0220202D */ daddu $a0, $s1, $zero /* 1A1BB0 802732D0 0000282D */ daddu $a1, $zero, $zero /* 1A1BB4 802732D4 0C09A5D5 */ jal set_goal_pos_to_part /* 1A1BB8 802732D8 00A0302D */ daddu $a2, $a1, $zero /* 1A1BBC 802732DC C6200014 */ lwc1 $f0, 0x14($s1) /* 1A1BC0 802732E0 240400E9 */ addiu $a0, $zero, 0xE9 /* 1A1BC4 802732E4 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A1BC8 802732E8 8E26000C */ lw $a2, 0xC($s1) /* 1A1BCC 802732EC 8E270010 */ lw $a3, 0x10($s1) /* 1A1BD0 802732F0 0C052757 */ jal sfx_play_sound_at_position /* 1A1BD4 802732F4 0000282D */ daddu $a1, $zero, $zero /* 1A1BD8 802732F8 24020001 */ addiu $v0, $zero, 0x1 .L802732FC: /* 1A1BDC 802732FC AFA20010 */ sw $v0, 0x10($sp) /* 1A1BE0 80273300 8E260014 */ lw $a2, 0x14($s1) /* 1A1BE4 80273304 86670180 */ lh $a3, 0x180($s3) /* 1A1BE8 80273308 C62C000C */ lwc1 $f12, 0xC($s1) /* 1A1BEC 8027330C 0C09996B */ jal show_next_damage_popup /* 1A1BF0 80273310 C62E0010 */ lwc1 $f14, 0x10($s1) /* 1A1BF4 80273314 86620180 */ lh $v0, 0x180($s3) /* 1A1BF8 80273318 AFA20010 */ sw $v0, 0x10($sp) /* 1A1BFC 8027331C 8E25000C */ lw $a1, 0xC($s1) /* 1A1C00 80273320 8E260010 */ lw $a2, 0x10($s1) /* 1A1C04 80273324 8E270014 */ lw $a3, 0x14($s1) /* 1A1C08 80273328 0C0999B9 */ jal show_damage_fx /* 1A1C0C 8027332C 0200202D */ daddu $a0, $s0, $zero /* 1A1C10 80273330 86620180 */ lh $v0, 0x180($s3) /* 1A1C14 80273334 18400003 */ blez $v0, .L80273344 /* 1A1C18 80273338 0200202D */ daddu $a0, $s0, $zero /* 1A1C1C 8027333C 0C099C06 */ jal func_80267018 /* 1A1C20 80273340 24050001 */ addiu $a1, $zero, 0x1 .L80273344: /* 1A1C24 80273344 3C10800E */ lui $s0, %hi(gBattleStatus) /* 1A1C28 80273348 8E10C070 */ lw $s0, %lo(gBattleStatus)($s0) /* 1A1C2C 8027334C 0240202D */ daddu $a0, $s2, $zero /* 1A1C30 80273350 32100240 */ andi $s0, $s0, 0x240 /* 1A1C34 80273354 0C09C596 */ jal dispatch_event_player /* 1A1C38 80273358 0010802B */ sltu $s0, $zero, $s0 /* 1A1C3C 8027335C 0200102D */ daddu $v0, $s0, $zero /* 1A1C40 80273360 8FBF0028 */ lw $ra, 0x28($sp) /* 1A1C44 80273364 8FB30024 */ lw $s3, 0x24($sp) /* 1A1C48 80273368 8FB20020 */ lw $s2, 0x20($sp) /* 1A1C4C 8027336C 8FB1001C */ lw $s1, 0x1C($sp) /* 1A1C50 80273370 8FB00018 */ lw $s0, 0x18($sp) /* 1A1C54 80273374 03E00008 */ jr $ra /* 1A1C58 80273378 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: s32 dispatch_damage_event_player(s32 damageAmount, s32 event, s32 arg2) { BattleStatus* battleStatus = &gBattleStatus; PlayerData* playerData = &gPlayerData; Actor* player = battleStatus->playerActor; ActorState* state = &player->state; s32 oldHPChangeCounter; s32 flags; s32 dispatchEvent; s32 oldPlayerHP; s32 temp; battleStatus->currentAttackDamage = damageAmount; temp = (s16)damageAmount; //TODO usage of temp here required to match player->hpChangeCounter += temp; temp = player->hpChangeCounter; player->currentHP = playerData->curHP; player->damageCounter += temp; player->hpChangeCounter -= temp; battleStatus->lastAttackDamage = 0; player->currentHP -= temp; battleStatus->damageTaken += temp; oldPlayerHP = player->currentHP; dispatchEvent = event; if (player->currentHP < 1) { battleStatus->lastAttackDamage += oldPlayerHP; player->currentHP = 0; dispatchEvent = EVENT_DEATH; } battleStatus->lastAttackDamage += temp; playerData->curHP = player->currentHP; if (dispatchEvent == EVENT_HIT_COMBO) { dispatchEvent = EVENT_HIT; } if (dispatchEvent == EVENT_ZERO_DAMAGE) { dispatchEvent = EVENT_IMMUNE; } if (dispatchEvent == EVENT_DEATH) { if (event == EVENT_SPIKE_CONTACT) { dispatchEvent = EVENT_SPIKE_DEATH; } if (event == EVENT_BURN_CONTACT) { dispatchEvent = EVENT_BURN_DEATH; } if (event == EVENT_SHOCK_HIT) { dispatchEvent = EVENT_SHOCK_DEATH; } } if (!arg2) { set_goal_pos_to_part(state, ACTOR_PLAYER, 0); sfx_play_sound_at_position(SOUND_HIT_NORMAL, SOUND_SPACE_MODE_0, state->goalPos.x, state->goalPos.y, state->goalPos.z); } show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 1); show_damage_fx(player, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage); if (battleStatus->lastAttackDamage > 0) { func_80267018(player, 1); } flags = (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) != 0; dispatch_event_player(dispatchEvent); return flags; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HiddenPanel_init /* 1084A4 802E6C24 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 1084A8 802E6C28 AFB300A4 */ sw $s3, 0xA4($sp) /* 1084AC 802E6C2C 0080982D */ daddu $s3, $a0, $zero /* 1084B0 802E6C30 AFB400A8 */ sw $s4, 0xA8($sp) /* 1084B4 802E6C34 3C148016 */ lui $s4, %hi(gCurrentHiddenPanels) /* 1084B8 802E6C38 2694A578 */ addiu $s4, $s4, %lo(gCurrentHiddenPanels) /* 1084BC 802E6C3C 0280202D */ daddu $a0, $s4, $zero /* 1084C0 802E6C40 AFBF00AC */ sw $ra, 0xAC($sp) /* 1084C4 802E6C44 AFB200A0 */ sw $s2, 0xA0($sp) /* 1084C8 802E6C48 AFB1009C */ sw $s1, 0x9C($sp) /* 1084CC 802E6C4C AFB00098 */ sw $s0, 0x98($sp) /* 1084D0 802E6C50 F7B600B8 */ sdc1 $f22, 0xB8($sp) /* 1084D4 802E6C54 F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 1084D8 802E6C58 8E720040 */ lw $s2, 0x40($s3) /* 1084DC 802E6C5C 0C00A580 */ jal mem_clear /* 1084E0 802E6C60 24050010 */ addiu $a1, $zero, 0x10 /* 1084E4 802E6C64 3C02802E */ lui $v0, %hi(entity_HiddenPanel_setupGfx) /* 1084E8 802E6C68 244261B0 */ addiu $v0, $v0, %lo(entity_HiddenPanel_setupGfx) /* 1084EC 802E6C6C AE62003C */ sw $v0, 0x3C($s3) /* 1084F0 802E6C70 3402FFFF */ ori $v0, $zero, 0xFFFF /* 1084F4 802E6C74 A6420006 */ sh $v0, 0x6($s2) /* 1084F8 802E6C78 C660004C */ lwc1 $f0, 0x4C($s3) /* 1084FC 802E6C7C 3C038016 */ lui $v1, %hi(CreateEntityVarArgBuffer) /* 108500 802E6C80 2463C7D0 */ addiu $v1, $v1, %lo(CreateEntityVarArgBuffer) /* 108504 802E6C84 E6400024 */ swc1 $f0, 0x24($s2) /* 108508 802E6C88 94620002 */ lhu $v0, 0x2($v1) /* 10850C 802E6C8C A6420074 */ sh $v0, 0x74($s2) /* 108510 802E6C90 8C630004 */ lw $v1, 0x4($v1) /* 108514 802E6C94 24020001 */ addiu $v0, $zero, 0x1 /* 108518 802E6C98 A2420003 */ sb $v0, 0x3($s2) /* 10851C 802E6C9C 2402FFFF */ addiu $v0, $zero, -0x1 /* 108520 802E6CA0 AE420014 */ sw $v0, 0x14($s2) /* 108524 802E6CA4 14600003 */ bnez $v1, .L802E6CB4 /* 108528 802E6CA8 AE430010 */ sw $v1, 0x10($s2) /* 10852C 802E6CAC 2402015C */ addiu $v0, $zero, 0x15C /* 108530 802E6CB0 AE420010 */ sw $v0, 0x10($s2) .L802E6CB4: /* 108534 802E6CB4 26510034 */ addiu $s1, $s2, 0x34 /* 108538 802E6CB8 0C019D28 */ jal guMtxIdentF /* 10853C 802E6CBC 0220202D */ daddu $a0, $s1, $zero /* 108540 802E6CC0 8E650048 */ lw $a1, 0x48($s3) /* 108544 802E6CC4 8E66004C */ lw $a2, 0x4C($s3) /* 108548 802E6CC8 8E670050 */ lw $a3, 0x50($s3) /* 10854C 802E6CCC 4480A000 */ mtc1 $zero, $f20 /* 108550 802E6CD0 0C019E40 */ jal guTranslateF /* 108554 802E6CD4 27A40018 */ addiu $a0, $sp, 0x18 /* 108558 802E6CD8 27B00058 */ addiu $s0, $sp, 0x58 /* 10855C 802E6CDC E7B40010 */ swc1 $f20, 0x10($sp) /* 108560 802E6CE0 8E650064 */ lw $a1, 0x64($s3) /* 108564 802E6CE4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 108568 802E6CE8 4481B000 */ mtc1 $at, $f22 /* 10856C 802E6CEC 4406A000 */ mfc1 $a2, $f20 /* 108570 802E6CF0 4407B000 */ mfc1 $a3, $f22 /* 108574 802E6CF4 0C019EC8 */ jal guRotateF /* 108578 802E6CF8 0200202D */ daddu $a0, $s0, $zero /* 10857C 802E6CFC 0200202D */ daddu $a0, $s0, $zero /* 108580 802E6D00 27A50018 */ addiu $a1, $sp, 0x18 /* 108584 802E6D04 0C019D80 */ jal guMtxCatF /* 108588 802E6D08 00A0302D */ daddu $a2, $a1, $zero /* 10858C 802E6D0C E7B40010 */ swc1 $f20, 0x10($sp) /* 108590 802E6D10 8E650060 */ lw $a1, 0x60($s3) /* 108594 802E6D14 4406B000 */ mfc1 $a2, $f22 /* 108598 802E6D18 4407A000 */ mfc1 $a3, $f20 /* 10859C 802E6D1C 0C019EC8 */ jal guRotateF /* 1085A0 802E6D20 0200202D */ daddu $a0, $s0, $zero /* 1085A4 802E6D24 0200202D */ daddu $a0, $s0, $zero /* 1085A8 802E6D28 27A50018 */ addiu $a1, $sp, 0x18 /* 1085AC 802E6D2C 0C019D80 */ jal guMtxCatF /* 1085B0 802E6D30 00A0302D */ daddu $a2, $a1, $zero /* 1085B4 802E6D34 4406A000 */ mfc1 $a2, $f20 /* 1085B8 802E6D38 0200202D */ daddu $a0, $s0, $zero /* 1085BC 802E6D3C E7B60010 */ swc1 $f22, 0x10($sp) /* 1085C0 802E6D40 8E650068 */ lw $a1, 0x68($s3) /* 1085C4 802E6D44 0C019EC8 */ jal guRotateF /* 1085C8 802E6D48 00C0382D */ daddu $a3, $a2, $zero /* 1085CC 802E6D4C 0200202D */ daddu $a0, $s0, $zero /* 1085D0 802E6D50 27A50018 */ addiu $a1, $sp, 0x18 /* 1085D4 802E6D54 0C019D80 */ jal guMtxCatF /* 1085D8 802E6D58 00A0302D */ daddu $a2, $a1, $zero /* 1085DC 802E6D5C 8E650054 */ lw $a1, 0x54($s3) /* 1085E0 802E6D60 8E660058 */ lw $a2, 0x58($s3) /* 1085E4 802E6D64 8E67005C */ lw $a3, 0x5C($s3) /* 1085E8 802E6D68 0C019DF0 */ jal guScaleF /* 1085EC 802E6D6C 0200202D */ daddu $a0, $s0, $zero /* 1085F0 802E6D70 0200202D */ daddu $a0, $s0, $zero /* 1085F4 802E6D74 27A50018 */ addiu $a1, $sp, 0x18 /* 1085F8 802E6D78 0C019D80 */ jal guMtxCatF /* 1085FC 802E6D7C 0220302D */ daddu $a2, $s1, $zero /* 108600 802E6D80 92820001 */ lbu $v0, 0x1($s4) /* 108604 802E6D84 30420001 */ andi $v0, $v0, 0x1 /* 108608 802E6D88 10400009 */ beqz $v0, .L802E6DB0 /* 10860C 802E6D8C 00000000 */ nop /* 108610 802E6D90 3C100A00 */ lui $s0, %hi(D_0A0001B0_E9D800) /* 108614 802E6D94 261001B0 */ addiu $s0, $s0, %lo(D_0A0001B0_E9D800) /* 108618 802E6D98 3C05802F */ lui $a1, %hi(D_802EAAE0) /* 10861C 802E6D9C 24A5AAE0 */ addiu $a1, $a1, %lo(D_802EAAE0) /* 108620 802E6DA0 0C0442F3 */ jal entity_set_render_script /* 108624 802E6DA4 0260202D */ daddu $a0, $s3, $zero /* 108628 802E6DA8 080B9B6F */ j .L802E6DBC /* 10862C 802E6DAC 3202FFFF */ andi $v0, $s0, 0xFFFF .L802E6DB0: /* 108630 802E6DB0 3C100A00 */ lui $s0, %hi(D_0A000180_E9D7D0) /* 108634 802E6DB4 26100180 */ addiu $s0, $s0, %lo(D_0A000180_E9D7D0) /* 108638 802E6DB8 3202FFFF */ andi $v0, $s0, 0xFFFF .L802E6DBC: /* 10863C 802E6DBC 8E650044 */ lw $a1, 0x44($s3) /* 108640 802E6DC0 96440074 */ lhu $a0, 0x74($s2) /* 108644 802E6DC4 00A22821 */ addu $a1, $a1, $v0 /* 108648 802E6DC8 AE450078 */ sw $a1, 0x78($s2) /* 10864C 802E6DCC 8E670044 */ lw $a3, 0x44($s3) /* 108650 802E6DD0 0C0470CB */ jal mdl_project_tex_coords /* 108654 802E6DD4 26460034 */ addiu $a2, $s2, 0x34 /* 108658 802E6DD8 3C038016 */ lui $v1, %hi(gCurrentHiddenPanels) /* 10865C 802E6DDC 2463A578 */ addiu $v1, $v1, %lo(gCurrentHiddenPanels) /* 108660 802E6DE0 90620001 */ lbu $v0, 0x1($v1) /* 108664 802E6DE4 24420001 */ addiu $v0, $v0, 0x1 /* 108668 802E6DE8 A0620001 */ sb $v0, 0x1($v1) /* 10866C 802E6DEC 8FBF00AC */ lw $ra, 0xAC($sp) /* 108670 802E6DF0 8FB400A8 */ lw $s4, 0xA8($sp) /* 108674 802E6DF4 8FB300A4 */ lw $s3, 0xA4($sp) /* 108678 802E6DF8 8FB200A0 */ lw $s2, 0xA0($sp) /* 10867C 802E6DFC 8FB1009C */ lw $s1, 0x9C($sp) /* 108680 802E6E00 8FB00098 */ lw $s0, 0x98($sp) /* 108684 802E6E04 D7B600B8 */ ldc1 $f22, 0xB8($sp) /* 108688 802E6E08 D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 10868C 802E6E0C 03E00008 */ jr $ra /* 108690 802E6E10 27BD00C0 */ addiu $sp, $sp, 0xC0 /* 108694 802E6E14 00000000 */ nop /* 108698 802E6E18 00000000 */ nop /* 10869C 802E6E1C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void entity_HiddenPanel_init(Entity* entity) { HiddenPanelData* data = entity->dataBuf.hiddenPanel; Matrix4f sp18; Matrix4f sp58; Gfx* dlist; mem_clear(&gCurrentHiddenPanels, sizeof(gCurrentHiddenPanels)); entity->renderSetupFunc = entity_HiddenPanel_setupGfx; data->pickupVar = 0xFFFF; data->initialY = entity->position.y; data->modelID = CreateEntityVarArgBuffer[0]; data->itemID = CreateEntityVarArgBuffer[1]; data->needSpawnItem = TRUE; data->spawnedItemIndex = -1; if (data->itemID == 0) { data->itemID = ITEM_STAR_PIECE; } guMtxIdentF(data->entityMatrix); guTranslateF(sp18, entity->position.x, entity->position.y, entity->position.z); guRotateF(sp58, entity->rotation.y, 0.0f, 1.0f, 0.0f); guMtxCatF(sp58, sp18, sp18); guRotateF(sp58, entity->rotation.x, 1.0f, 0.0f, 0.0f); guMtxCatF(sp58, sp18, sp18); guRotateF(sp58, entity->rotation.z, 0.0f, 0.0f, 1.0f); guMtxCatF(sp58, sp18, sp18); guScaleF(sp58, entity->scale.x, entity->scale.y, entity->scale.z); guMtxCatF(sp58, sp18, data->entityMatrix); if (gCurrentHiddenPanels.panelsCount & 1) { dlist = Gfx_AltHiddenPanel_RenderTop; entity_set_render_script(entity, &ERS_AltHiddenPanel); } else { dlist = Gfx_HiddenPanel_RenderTop; } data->renderDList = ENTITY_ADDR(entity, Gfx*, dlist); mdl_project_tex_coords(data->modelID, data->renderDList, data->entityMatrix, entity->gfxBaseAddr); gCurrentHiddenPanels.panelsCount++; }
### RAW ASSEMBLY INSTRUCTIONS: glabel osSpTaskLoad /* 40E10 80065A10 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 40E14 80065A14 AFB00010 */ sw $s0, 0x10($sp) /* 40E18 80065A18 00808021 */ addu $s0, $a0, $zero /* 40E1C 80065A1C AFB10014 */ sw $s1, 0x14($sp) /* 40E20 80065A20 3C11800B */ lui $s1, %hi(tmp_task) /* 40E24 80065A24 2631F8C0 */ addiu $s1, $s1, %lo(tmp_task) /* 40E28 80065A28 02202821 */ addu $a1, $s1, $zero /* 40E2C 80065A2C AFBF0018 */ sw $ra, 0x18($sp) /* 40E30 80065A30 0C019194 */ jal bcopy /* 40E34 80065A34 24060040 */ addiu $a2, $zero, 0x40 /* 40E38 80065A38 3C04800B */ lui $a0, %hi(D_800AF8D0) /* 40E3C 80065A3C 8C84F8D0 */ lw $a0, %lo(D_800AF8D0)($a0) /* 40E40 80065A40 10800005 */ beqz $a0, .L80065A58 /* 40E44 80065A44 00000000 */ nop /* 40E48 80065A48 0C0187A4 */ jal osVirtualToPhysical /* 40E4C 80065A4C 00000000 */ nop /* 40E50 80065A50 3C01800B */ lui $at, %hi(D_800AF8D0) /* 40E54 80065A54 AC22F8D0 */ sw $v0, %lo(D_800AF8D0)($at) .L80065A58: /* 40E58 80065A58 3C04800B */ lui $a0, %hi(D_800AF8D8) /* 40E5C 80065A5C 8C84F8D8 */ lw $a0, %lo(D_800AF8D8)($a0) /* 40E60 80065A60 10800005 */ beqz $a0, .L80065A78 /* 40E64 80065A64 00000000 */ nop /* 40E68 80065A68 0C0187A4 */ jal osVirtualToPhysical /* 40E6C 80065A6C 00000000 */ nop /* 40E70 80065A70 3C01800B */ lui $at, %hi(D_800AF8D8) /* 40E74 80065A74 AC22F8D8 */ sw $v0, %lo(D_800AF8D8)($at) .L80065A78: /* 40E78 80065A78 3C04800B */ lui $a0, %hi(D_800AF8E0) /* 40E7C 80065A7C 8C84F8E0 */ lw $a0, %lo(D_800AF8E0)($a0) /* 40E80 80065A80 10800005 */ beqz $a0, .L80065A98 /* 40E84 80065A84 00000000 */ nop /* 40E88 80065A88 0C0187A4 */ jal osVirtualToPhysical /* 40E8C 80065A8C 00000000 */ nop /* 40E90 80065A90 3C01800B */ lui $at, %hi(D_800AF8E0) /* 40E94 80065A94 AC22F8E0 */ sw $v0, %lo(D_800AF8E0)($at) .L80065A98: /* 40E98 80065A98 3C04800B */ lui $a0, %hi(D_800AF8E8) /* 40E9C 80065A9C 8C84F8E8 */ lw $a0, %lo(D_800AF8E8)($a0) /* 40EA0 80065AA0 10800005 */ beqz $a0, .L80065AB8 /* 40EA4 80065AA4 00000000 */ nop /* 40EA8 80065AA8 0C0187A4 */ jal osVirtualToPhysical /* 40EAC 80065AAC 00000000 */ nop /* 40EB0 80065AB0 3C01800B */ lui $at, %hi(D_800AF8E8) /* 40EB4 80065AB4 AC22F8E8 */ sw $v0, %lo(D_800AF8E8)($at) .L80065AB8: /* 40EB8 80065AB8 3C04800B */ lui $a0, %hi(D_800AF8EC) /* 40EBC 80065ABC 8C84F8EC */ lw $a0, %lo(D_800AF8EC)($a0) /* 40EC0 80065AC0 10800005 */ beqz $a0, .L80065AD8 /* 40EC4 80065AC4 00000000 */ nop /* 40EC8 80065AC8 0C0187A4 */ jal osVirtualToPhysical /* 40ECC 80065ACC 00000000 */ nop /* 40ED0 80065AD0 3C01800B */ lui $at, %hi(D_800AF8EC) /* 40ED4 80065AD4 AC22F8EC */ sw $v0, %lo(D_800AF8EC)($at) .L80065AD8: /* 40ED8 80065AD8 3C04800B */ lui $a0, %hi(D_800AF8F0) /* 40EDC 80065ADC 8C84F8F0 */ lw $a0, %lo(D_800AF8F0)($a0) /* 40EE0 80065AE0 10800005 */ beqz $a0, .L80065AF8 /* 40EE4 80065AE4 00000000 */ nop /* 40EE8 80065AE8 0C0187A4 */ jal osVirtualToPhysical /* 40EEC 80065AEC 00000000 */ nop /* 40EF0 80065AF0 3C01800B */ lui $at, %hi(D_800AF8F0) /* 40EF4 80065AF4 AC22F8F0 */ sw $v0, %lo(D_800AF8F0)($at) .L80065AF8: /* 40EF8 80065AF8 3C04800B */ lui $a0, %hi(D_800AF8F8) /* 40EFC 80065AFC 8C84F8F8 */ lw $a0, %lo(D_800AF8F8)($a0) /* 40F00 80065B00 10800005 */ beqz $a0, .L80065B18 /* 40F04 80065B04 00000000 */ nop /* 40F08 80065B08 0C0187A4 */ jal osVirtualToPhysical /* 40F0C 80065B0C 00000000 */ nop /* 40F10 80065B10 3C01800B */ lui $at, %hi(D_800AF8F8) /* 40F14 80065B14 AC22F8F8 */ sw $v0, %lo(D_800AF8F8)($at) .L80065B18: /* 40F18 80065B18 3C02800B */ lui $v0, %hi(D_800AF8C4) /* 40F1C 80065B1C 8C42F8C4 */ lw $v0, %lo(D_800AF8C4)($v0) /* 40F20 80065B20 30420001 */ andi $v0, $v0, 0x1 /* 40F24 80065B24 10400019 */ beqz $v0, .L80065B8C /* 40F28 80065B28 02202021 */ addu $a0, $s1, $zero /* 40F2C 80065B2C 3C02800B */ lui $v0, %hi(D_800AF8F8) /* 40F30 80065B30 8C42F8F8 */ lw $v0, %lo(D_800AF8F8)($v0) /* 40F34 80065B34 3C03800B */ lui $v1, %hi(D_800AF8FC) /* 40F38 80065B38 8C63F8FC */ lw $v1, %lo(D_800AF8FC)($v1) /* 40F3C 80065B3C 3C01800B */ lui $at, %hi(D_800AF8D8) /* 40F40 80065B40 AC22F8D8 */ sw $v0, %lo(D_800AF8D8)($at) /* 40F44 80065B44 3C01800B */ lui $at, %hi(D_800AF8DC) /* 40F48 80065B48 AC23F8DC */ sw $v1, %lo(D_800AF8DC)($at) /* 40F4C 80065B4C 8E020004 */ lw $v0, 0x4($s0) /* 40F50 80065B50 2403FFFE */ addiu $v1, $zero, -0x2 /* 40F54 80065B54 00431024 */ and $v0, $v0, $v1 /* 40F58 80065B58 AE020004 */ sw $v0, 0x4($s0) /* 40F5C 80065B5C 3C02800B */ lui $v0, %hi(D_800AF8C4) /* 40F60 80065B60 8C42F8C4 */ lw $v0, %lo(D_800AF8C4)($v0) /* 40F64 80065B64 30420004 */ andi $v0, $v0, 0x4 /* 40F68 80065B68 10400008 */ beqz $v0, .L80065B8C /* 40F6C 80065B6C 3C03A000 */ lui $v1, %hi(D_A0000000) /* 40F70 80065B70 8E020038 */ lw $v0, 0x38($s0) /* 40F74 80065B74 24420BFC */ addiu $v0, $v0, 0xBFC /* 40F78 80065B78 00431025 */ or $v0, $v0, $v1 /* 40F7C 80065B7C 8C420000 */ lw $v0, %lo(D_A0000000)($v0) /* 40F80 80065B80 3C01800B */ lui $at, %hi(D_800AF8D0) /* 40F84 80065B84 AC22F8D0 */ sw $v0, %lo(D_800AF8D0)($at) /* 40F88 80065B88 02202021 */ addu $a0, $s1, $zero .L80065B8C: /* 40F8C 80065B8C 0C018614 */ jal osWritebackDCache /* 40F90 80065B90 24050040 */ addiu $a1, $zero, 0x40 /* 40F94 80065B94 0C01B1BC */ jal __osSpSetStatus /* 40F98 80065B98 24042B00 */ addiu $a0, $zero, 0x2B00 /* 40F9C 80065B9C 2410FFFF */ addiu $s0, $zero, -0x1 /* 40FA0 80065BA0 3C040400 */ lui $a0, (0x4001000 >> 16) .L80065BA4: /* 40FA4 80065BA4 0C01B1C0 */ jal __osSpSetPc /* 40FA8 80065BA8 34841000 */ ori $a0, $a0, (0x4001000 & 0xFFFF) /* 40FAC 80065BAC 1050FFFD */ beq $v0, $s0, .L80065BA4 /* 40FB0 80065BB0 3C040400 */ lui $a0, (0x4001000 >> 16) /* 40FB4 80065BB4 2410FFFF */ addiu $s0, $zero, -0x1 /* 40FB8 80065BB8 24040001 */ addiu $a0, $zero, 0x1 .L80065BBC: /* 40FBC 80065BBC 3C050400 */ lui $a1, (0x4000FC0 >> 16) /* 40FC0 80065BC0 34A50FC0 */ ori $a1, $a1, (0x4000FC0 & 0xFFFF) /* 40FC4 80065BC4 02203021 */ addu $a2, $s1, $zero /* 40FC8 80065BC8 0C01B1CC */ jal __osSpRawStartDma /* 40FCC 80065BCC 24070040 */ addiu $a3, $zero, 0x40 /* 40FD0 80065BD0 1050FFFA */ beq $v0, $s0, .L80065BBC /* 40FD4 80065BD4 24040001 */ addiu $a0, $zero, 0x1 .L80065BD8: /* 40FD8 80065BD8 0C01B1B0 */ jal __osSpDeviceBusy /* 40FDC 80065BDC 00000000 */ nop /* 40FE0 80065BE0 1440FFFD */ bnez $v0, .L80065BD8 /* 40FE4 80065BE4 24040001 */ addiu $a0, $zero, 0x1 /* 40FE8 80065BE8 2410FFFF */ addiu $s0, $zero, -0x1 .L80065BEC: /* 40FEC 80065BEC 8E260008 */ lw $a2, 0x8($s1) /* 40FF0 80065BF0 8E27000C */ lw $a3, 0xC($s1) /* 40FF4 80065BF4 3C050400 */ lui $a1, (0x4001000 >> 16) /* 40FF8 80065BF8 0C01B1CC */ jal __osSpRawStartDma /* 40FFC 80065BFC 34A51000 */ ori $a1, $a1, (0x4001000 & 0xFFFF) /* 41000 80065C00 1050FFFA */ beq $v0, $s0, .L80065BEC /* 41004 80065C04 24040001 */ addiu $a0, $zero, 0x1 /* 41008 80065C08 8FBF0018 */ lw $ra, 0x18($sp) /* 4100C 80065C0C 8FB10014 */ lw $s1, 0x14($sp) /* 41010 80065C10 8FB00010 */ lw $s0, 0x10($sp) /* 41014 80065C14 03E00008 */ jr $ra /* 41018 80065C18 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void osSpTaskLoad(OSTask *intp) { OSTask *tp; tp = &tmp_task; bcopy(intp, tp, sizeof(OSTask)); _osVirtualToPhysical(tp->t.ucode); _osVirtualToPhysical(tp->t.ucode_data); _osVirtualToPhysical(tp->t.dram_stack); _osVirtualToPhysical(tp->t.output_buff); _osVirtualToPhysical(tp->t.output_buff_size); _osVirtualToPhysical(tp->t.data_ptr); _osVirtualToPhysical(tp->t.yield_data_ptr); if (tp->t.flags & OS_TASK_YIELDED) { tp->t.ucode_data = tp->t.yield_data_ptr; tp->t.ucode_data_size = tp->t.yield_data_size; intp->t.flags &= ~OS_TASK_YIELDED; if (tp->t.flags & OS_TASK_LOADABLE) { tp->t.ucode = (u64 *)IO_READ((u32)intp->t.yield_data_ptr + OS_YIELD_DATA_SIZE - 4); } } osWritebackDCache(tp, sizeof(OSTask)); __osSpSetStatus(SP_CLR_YIELD | SP_CLR_YIELDED | SP_CLR_TASKDONE | SP_SET_INTR_BREAK); while (__osSpSetPc(SP_IMEM_START) == -1) { } while (__osSpRawStartDma(1, (SP_IMEM_START - sizeof(*tp)), tp, sizeof(OSTask)) == -1) { } while (__osSpDeviceBusy()) { } while (__osSpRawStartDma(1, SP_IMEM_START, tp->t.ucode_boot, tp->t.ucode_boot_size) == -1) { } }
### RAW ASSEMBLY INSTRUCTIONS: glabel whirlwind_update /* 3D2CE4 E00CE224 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 3D2CE8 E00CE228 AFBF0010 */ sw $ra, 0x10($sp) /* 3D2CEC E00CE22C 8C830000 */ lw $v1, 0x0($a0) /* 3D2CF0 E00CE230 8C85000C */ lw $a1, 0xC($a0) /* 3D2CF4 E00CE234 30620010 */ andi $v0, $v1, 0x10 /* 3D2CF8 E00CE238 10400005 */ beqz $v0, .LE00CE250 /* 3D2CFC E00CE23C 2402FFEF */ addiu $v0, $zero, -0x11 /* 3D2D00 E00CE240 00621024 */ and $v0, $v1, $v0 /* 3D2D04 E00CE244 AC820000 */ sw $v0, 0x0($a0) /* 3D2D08 E00CE248 24020010 */ addiu $v0, $zero, 0x10 /* 3D2D0C E00CE24C ACA20010 */ sw $v0, 0x10($a1) .LE00CE250: /* 3D2D10 E00CE250 8CA30010 */ lw $v1, 0x10($a1) /* 3D2D14 E00CE254 286203E8 */ slti $v0, $v1, 0x3E8 /* 3D2D18 E00CE258 10400002 */ beqz $v0, .LE00CE264 /* 3D2D1C E00CE25C 2462FFFF */ addiu $v0, $v1, -0x1 /* 3D2D20 E00CE260 ACA20010 */ sw $v0, 0x10($a1) .LE00CE264: /* 3D2D24 E00CE264 8CA20014 */ lw $v0, 0x14($a1) /* 3D2D28 E00CE268 8CA30010 */ lw $v1, 0x10($a1) /* 3D2D2C E00CE26C 24460001 */ addiu $a2, $v0, 0x1 /* 3D2D30 E00CE270 04610005 */ bgez $v1, .LE00CE288 /* 3D2D34 E00CE274 ACA60014 */ sw $a2, 0x14($a1) /* 3D2D38 E00CE278 0C080128 */ jal shim_remove_effect /* 3D2D3C E00CE27C 00000000 */ nop /* 3D2D40 E00CE280 08033907 */ j .LE00CE41C /* 3D2D44 E00CE284 00000000 */ nop .LE00CE288: /* 3D2D48 E00CE288 C4AC0034 */ lwc1 $f12, 0x34($a1) /* 3D2D4C E00CE28C 28620010 */ slti $v0, $v1, 0x10 /* 3D2D50 E00CE290 10400002 */ beqz $v0, .LE00CE29C /* 3D2D54 E00CE294 00031100 */ sll $v0, $v1, 4 /* 3D2D58 E00CE298 ACA20024 */ sw $v0, 0x24($a1) .LE00CE29C: /* 3D2D5C E00CE29C 28C20010 */ slti $v0, $a2, 0x10 /* 3D2D60 E00CE2A0 10400003 */ beqz $v0, .LE00CE2B0 /* 3D2D64 E00CE2A4 00061100 */ sll $v0, $a2, 4 /* 3D2D68 E00CE2A8 2442000F */ addiu $v0, $v0, 0xF /* 3D2D6C E00CE2AC ACA20024 */ sw $v0, 0x24($a1) .LE00CE2B0: /* 3D2D70 E00CE2B0 24040007 */ addiu $a0, $zero, 0x7 /* 3D2D74 E00CE2B4 24060018 */ addiu $a2, $zero, 0x18 /* 3D2D78 E00CE2B8 24A3001C */ addiu $v1, $a1, 0x1C /* 3D2D7C E00CE2BC 3C014080 */ lui $at, (0x40800000 >> 16) /* 3D2D80 E00CE2C0 44817000 */ mtc1 $at, $f14 /* 3D2D84 E00CE2C4 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 3D2D88 E00CE2C8 44815000 */ mtc1 $at, $f10 /* 3D2D8C E00CE2CC 3C01C2B4 */ lui $at, (0xC2B40000 >> 16) /* 3D2D90 E00CE2D0 44814000 */ mtc1 $at, $f8 /* 3D2D94 E00CE2D4 C4A40004 */ lwc1 $f4, 0x4($a1) /* 3D2D98 E00CE2D8 C4A60008 */ lwc1 $f6, 0x8($a1) /* 3D2D9C E00CE2DC 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 3D2DA0 E00CE2E0 44810000 */ mtc1 $at, $f0 /* 3D2DA4 E00CE2E4 C4A2000C */ lwc1 $f2, 0xC($a1) /* 3D2DA8 E00CE2E8 46006302 */ mul.s $f12, $f12, $f0 /* 3D2DAC E00CE2EC 00000000 */ nop /* 3D2DB0 E00CE2F0 E4A40038 */ swc1 $f4, 0x38($a1) /* 3D2DB4 E00CE2F4 E4A60058 */ swc1 $f6, 0x58($a1) /* 3D2DB8 E00CE2F8 E4A20078 */ swc1 $f2, 0x78($a1) .LE00CE2FC: /* 3D2DBC E00CE2FC 00A61021 */ addu $v0, $a1, $a2 /* 3D2DC0 E00CE300 C4400038 */ lwc1 $f0, 0x38($v0) /* 3D2DC4 E00CE304 C4620038 */ lwc1 $f2, 0x38($v1) /* 3D2DC8 E00CE308 46020001 */ sub.s $f0, $f0, $f2 /* 3D2DCC E00CE30C 460E0002 */ mul.s $f0, $f0, $f14 /* 3D2DD0 E00CE310 00000000 */ nop /* 3D2DD4 E00CE314 E4600118 */ swc1 $f0, 0x118($v1) /* 3D2DD8 E00CE318 C4400038 */ lwc1 $f0, 0x38($v0) /* 3D2DDC E00CE31C E4600038 */ swc1 $f0, 0x38($v1) /* 3D2DE0 E00CE320 C4400058 */ lwc1 $f0, 0x58($v0) /* 3D2DE4 E00CE324 460C0000 */ add.s $f0, $f0, $f12 /* 3D2DE8 E00CE328 C4620118 */ lwc1 $f2, 0x118($v1) /* 3D2DEC E00CE32C E4600058 */ swc1 $f0, 0x58($v1) /* 3D2DF0 E00CE330 C4400078 */ lwc1 $f0, 0x78($v0) /* 3D2DF4 E00CE334 4602503C */ c.lt.s $f10, $f2 /* 3D2DF8 E00CE338 00000000 */ nop /* 3D2DFC E00CE33C 45000003 */ bc1f .LE00CE34C /* 3D2E00 E00CE340 E4600078 */ swc1 $f0, 0x78($v1) /* 3D2E04 E00CE344 080338D7 */ j .LE00CE35C /* 3D2E08 E00CE348 E46A0118 */ swc1 $f10, 0x118($v1) .LE00CE34C: /* 3D2E0C E00CE34C 4608103C */ c.lt.s $f2, $f8 /* 3D2E10 E00CE350 00000000 */ nop /* 3D2E14 E00CE354 45030001 */ bc1tl .LE00CE35C /* 3D2E18 E00CE358 E4680118 */ swc1 $f8, 0x118($v1) .LE00CE35C: /* 3D2E1C E00CE35C 24C6FFFC */ addiu $a2, $a2, -0x4 /* 3D2E20 E00CE360 2484FFFF */ addiu $a0, $a0, -0x1 /* 3D2E24 E00CE364 1C80FFE5 */ bgtz $a0, .LE00CE2FC /* 3D2E28 E00CE368 2463FFFC */ addiu $v1, $v1, -0x4 /* 3D2E2C E00CE36C C4A40138 */ lwc1 $f4, 0x138($a1) /* 3D2E30 E00CE370 3C014120 */ lui $at, (0x41200000 >> 16) /* 3D2E34 E00CE374 44810000 */ mtc1 $at, $f0 /* 3D2E38 E00CE378 00000000 */ nop /* 3D2E3C E00CE37C 46002100 */ add.s $f4, $f4, $f0 /* 3D2E40 E00CE380 C4A0013C */ lwc1 $f0, 0x13C($a1) /* 3D2E44 E00CE384 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D2E48 E00CE388 D422EE60 */ ldc1 $f2, -0x11A0($at) /* 3D2E4C E00CE38C 46000021 */ cvt.d.s $f0, $f0 /* 3D2E50 E00CE390 46220000 */ add.d $f0, $f0, $f2 /* 3D2E54 E00CE394 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3D2E58 E00CE398 D422EE68 */ ldc1 $f2, -0x1198($at) /* 3D2E5C E00CE39C E4A40138 */ swc1 $f4, 0x138($a1) /* 3D2E60 E00CE3A0 46200020 */ cvt.s.d $f0, $f0 /* 3D2E64 E00CE3A4 E4A0013C */ swc1 $f0, 0x13C($a1) /* 3D2E68 E00CE3A8 C4A00140 */ lwc1 $f0, 0x140($a1) /* 3D2E6C E00CE3AC C4A4013C */ lwc1 $f4, 0x13C($a1) /* 3D2E70 E00CE3B0 46000021 */ cvt.d.s $f0, $f0 /* 3D2E74 E00CE3B4 46220000 */ add.d $f0, $f0, $f2 /* 3D2E78 E00CE3B8 3C014280 */ lui $at, (0x42800000 >> 16) /* 3D2E7C E00CE3BC 44811000 */ mtc1 $at, $f2 /* 3D2E80 E00CE3C0 00000000 */ nop /* 3D2E84 E00CE3C4 4604103C */ c.lt.s $f2, $f4 /* 3D2E88 E00CE3C8 46200020 */ cvt.s.d $f0, $f0 /* 3D2E8C E00CE3CC 45000003 */ bc1f .LE00CE3DC /* 3D2E90 E00CE3D0 E4A00140 */ swc1 $f0, 0x140($a1) /* 3D2E94 E00CE3D4 46022001 */ sub.s $f0, $f4, $f2 /* 3D2E98 E00CE3D8 E4A0013C */ swc1 $f0, 0x13C($a1) .LE00CE3DC: /* 3D2E9C E00CE3DC C4A00140 */ lwc1 $f0, 0x140($a1) /* 3D2EA0 E00CE3E0 4600103C */ c.lt.s $f2, $f0 /* 3D2EA4 E00CE3E4 00000000 */ nop /* 3D2EA8 E00CE3E8 45000003 */ bc1f .LE00CE3F8 /* 3D2EAC E00CE3EC 0000202D */ daddu $a0, $zero, $zero /* 3D2EB0 E00CE3F0 46020001 */ sub.s $f0, $f0, $f2 /* 3D2EB4 E00CE3F4 E4A00140 */ swc1 $f0, 0x140($a1) .LE00CE3F8: /* 3D2EB8 E00CE3F8 00A0182D */ daddu $v1, $a1, $zero .LE00CE3FC: /* 3D2EBC E00CE3FC C46000B8 */ lwc1 $f0, 0xB8($v1) /* 3D2EC0 E00CE400 C46200D8 */ lwc1 $f2, 0xD8($v1) /* 3D2EC4 E00CE404 46020000 */ add.s $f0, $f0, $f2 /* 3D2EC8 E00CE408 24840001 */ addiu $a0, $a0, 0x1 /* 3D2ECC E00CE40C 28820008 */ slti $v0, $a0, 0x8 /* 3D2ED0 E00CE410 E46000B8 */ swc1 $f0, 0xB8($v1) /* 3D2ED4 E00CE414 1440FFF9 */ bnez $v0, .LE00CE3FC /* 3D2ED8 E00CE418 24630004 */ addiu $v1, $v1, 0x4 .LE00CE41C: /* 3D2EDC E00CE41C 8FBF0010 */ lw $ra, 0x10($sp) /* 3D2EE0 E00CE420 03E00008 */ jr $ra /* 3D2EE4 E00CE424 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void whirlwind_update(EffectInstance* effect) { s32 temp_a2; s32 temp_v1_3; WhirlwindFXData* part; s32 i; f32 temp; part = effect->data.whirlwind; if ((effect->flags & FX_INSTANCE_FLAG_DISMISS)) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->unk_10 = 16; } if (part->unk_10 < 1000) { part->unk_10--; } part->unk_14++; if (part->unk_10 < 0) { shim_remove_effect(effect); return; } temp = part->unk_34; temp_v1_3 = part->unk_10; temp_a2 = part->unk_14; if (temp_v1_3 < 0x10) { part->primAlpha = temp_v1_3 * 16; } if (temp_a2 < 0x10) { part->primAlpha = temp_a2 * 16 + 15; } part->unk_38[0] = part->pos.x; part->unk_58[0] = part->pos.y; part->unk_78[0] = part->pos.z; for (i = MAX_WHIRLWIND_SEGMENTS - 1; i > 0; i--) { part->unk_118[i] = (part->unk_38[i - 1] - part->unk_38[i]) * 4.0f; part->unk_38[i] = part->unk_38[i - 1]; part->unk_58[i] = part->unk_58[i - 1] + temp * 5.0f; part->unk_78[i] = part->unk_78[i - 1]; if (part->unk_118[i] > 90.0f) { part->unk_118[i] = 90.0f; } else if (part->unk_118[i] < -90.0f) { part->unk_118[i] = -90.0f; } } part->unk_138 += 10.0f; part->unk_13C += 12.96; part->unk_140 += 17.28; if (part->unk_13C > 64.0f) { part->unk_13C -= 64.0f; } if (part->unk_140 > 64.0f) { part->unk_140 -= 64.0f; } for(i = 0; i < MAX_WHIRLWIND_SEGMENTS; i++) { part->unk_B8[i] += part->unk_D8[i]; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel gather_magic_main /* 38EE60 E008E000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 38EE64 E008E004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 38EE68 E008E008 4485A000 */ mtc1 $a1, $f20 /* 38EE6C E008E00C F7B60048 */ sdc1 $f22, 0x48($sp) /* 38EE70 E008E010 4486B000 */ mtc1 $a2, $f22 /* 38EE74 E008E014 AFB30034 */ sw $s3, 0x34($sp) /* 38EE78 E008E018 0080982D */ daddu $s3, $a0, $zero /* 38EE7C E008E01C F7B80050 */ sdc1 $f24, 0x50($sp) /* 38EE80 E008E020 4487C000 */ mtc1 $a3, $f24 /* 38EE84 E008E024 27A40010 */ addiu $a0, $sp, 0x10 /* 38EE88 E008E028 AFB20030 */ sw $s2, 0x30($sp) /* 38EE8C E008E02C 8FB2006C */ lw $s2, 0x6C($sp) /* 38EE90 E008E030 3C02E009 */ lui $v0, %hi(gather_magic_init) /* 38EE94 E008E034 2442E1FC */ addiu $v0, $v0, %lo(gather_magic_init) /* 38EE98 E008E038 AFA20018 */ sw $v0, 0x18($sp) /* 38EE9C E008E03C 3C02E009 */ lui $v0, %hi(gather_magic_update) /* 38EEA0 E008E040 2442E204 */ addiu $v0, $v0, %lo(gather_magic_update) /* 38EEA4 E008E044 AFA2001C */ sw $v0, 0x1C($sp) /* 38EEA8 E008E048 3C02E009 */ lui $v0, %hi(gather_magic_render) /* 38EEAC E008E04C 2442E498 */ addiu $v0, $v0, %lo(gather_magic_render) /* 38EEB0 E008E050 AFA20020 */ sw $v0, 0x20($sp) /* 38EEB4 E008E054 24020047 */ addiu $v0, $zero, 0x47 /* 38EEB8 E008E058 AFBF0038 */ sw $ra, 0x38($sp) /* 38EEBC E008E05C AFB1002C */ sw $s1, 0x2C($sp) /* 38EEC0 E008E060 AFB00028 */ sw $s0, 0x28($sp) /* 38EEC4 E008E064 AFA00010 */ sw $zero, 0x10($sp) /* 38EEC8 E008E068 AFA00024 */ sw $zero, 0x24($sp) /* 38EECC E008E06C 0C080124 */ jal shim_create_effect_instance /* 38EED0 E008E070 AFA20014 */ sw $v0, 0x14($sp) /* 38EED4 E008E074 240408B8 */ addiu $a0, $zero, 0x8B8 /* 38EED8 E008E078 2411001F */ addiu $s1, $zero, 0x1F /* 38EEDC E008E07C 0040802D */ daddu $s0, $v0, $zero /* 38EEE0 E008E080 0C08012C */ jal shim_general_heap_malloc /* 38EEE4 E008E084 AE110008 */ sw $s1, 0x8($s0) /* 38EEE8 E008E088 0040282D */ daddu $a1, $v0, $zero /* 38EEEC E008E08C 14A00003 */ bnez $a1, .LE008E09C /* 38EEF0 E008E090 AE05000C */ sw $a1, 0xC($s0) .LE008E094: /* 38EEF4 E008E094 08023825 */ j .LE008E094 /* 38EEF8 E008E098 00000000 */ nop .LE008E09C: /* 38EEFC E008E09C ACB30004 */ sw $s3, 0x4($a1) /* 38EF00 E008E0A0 1E400004 */ bgtz $s2, .LE008E0B4 /* 38EF04 E008E0A4 ACA0001C */ sw $zero, 0x1C($a1) /* 38EF08 E008E0A8 24020064 */ addiu $v0, $zero, 0x64 /* 38EF0C E008E0AC 0802382E */ j .LE008E0B8 /* 38EF10 E008E0B0 ACA20018 */ sw $v0, 0x18($a1) .LE008E0B4: /* 38EF14 E008E0B4 ACB20018 */ sw $s2, 0x18($a1) .LE008E0B8: /* 38EF18 E008E0B8 ACA00014 */ sw $zero, 0x14($a1) /* 38EF1C E008E0BC E4B40008 */ swc1 $f20, 0x8($a1) /* 38EF20 E008E0C0 E4B6000C */ swc1 $f22, 0xC($a1) /* 38EF24 E008E0C4 16600008 */ bnez $s3, .LE008E0E8 /* 38EF28 E008E0C8 E4B80010 */ swc1 $f24, 0x10($a1) /* 38EF2C E008E0CC 240200FF */ addiu $v0, $zero, 0xFF /* 38EF30 E008E0D0 ACA20030 */ sw $v0, 0x30($a1) /* 38EF34 E008E0D4 ACA00034 */ sw $zero, 0x34($a1) /* 38EF38 E008E0D8 ACA20038 */ sw $v0, 0x38($a1) /* 38EF3C E008E0DC ACA2003C */ sw $v0, 0x3C($a1) /* 38EF40 E008E0E0 08023844 */ j .LE008E110 /* 38EF44 E008E0E4 ACA20040 */ sw $v0, 0x40($a1) .LE008E0E8: /* 38EF48 E008E0E8 240200FF */ addiu $v0, $zero, 0xFF /* 38EF4C E008E0EC 24030014 */ addiu $v1, $zero, 0x14 /* 38EF50 E008E0F0 ACA20030 */ sw $v0, 0x30($a1) /* 38EF54 E008E0F4 24020021 */ addiu $v0, $zero, 0x21 /* 38EF58 E008E0F8 ACA20038 */ sw $v0, 0x38($a1) /* 38EF5C E008E0FC 24020032 */ addiu $v0, $zero, 0x32 /* 38EF60 E008E100 ACA2003C */ sw $v0, 0x3C($a1) /* 38EF64 E008E104 2402000A */ addiu $v0, $zero, 0xA /* 38EF68 E008E108 ACA30034 */ sw $v1, 0x34($a1) /* 38EF6C E008E10C ACA30040 */ sw $v1, 0x40($a1) .LE008E110: /* 38EF70 E008E110 ACA20044 */ sw $v0, 0x44($a1) /* 38EF74 E008E114 240A0001 */ addiu $t2, $zero, 0x1 /* 38EF78 E008E118 0151102A */ slt $v0, $t2, $s1 /* 38EF7C E008E11C 1040002C */ beqz $v0, .LE008E1D0 /* 38EF80 E008E120 24A50048 */ addiu $a1, $a1, 0x48 /* 38EF84 E008E124 2629FFFF */ addiu $t1, $s1, -0x1 /* 38EF88 E008E128 44801000 */ mtc1 $zero, $f2 /* 38EF8C E008E12C 24A6002C */ addiu $a2, $a1, 0x2C /* 38EF90 E008E130 0000402D */ daddu $t0, $zero, $zero /* 38EF94 E008E134 0100382D */ daddu $a3, $t0, $zero .LE008E138: /* 38EF98 E008E138 15200002 */ bnez $t1, .LE008E144 /* 38EF9C E008E13C 00E9001A */ div $zero, $a3, $t1 /* 38EFA0 E008E140 0007000D */ break 7 .LE008E144: /* 38EFA4 E008E144 2401FFFF */ addiu $at, $zero, -0x1 /* 38EFA8 E008E148 15210004 */ bne $t1, $at, .LE008E15C /* 38EFAC E008E14C 3C018000 */ lui $at, (0x80000000 >> 16) /* 38EFB0 E008E150 14E10002 */ bne $a3, $at, .LE008E15C /* 38EFB4 E008E154 00000000 */ nop /* 38EFB8 E008E158 0006000D */ break 6 .LE008E15C: /* 38EFBC E008E15C 00001812 */ mflo $v1 /* 38EFC0 E008E160 00000000 */ nop /* 38EFC4 E008E164 15200002 */ bnez $t1, .LE008E170 /* 38EFC8 E008E168 0109001A */ div $zero, $t0, $t1 /* 38EFCC E008E16C 0007000D */ break 7 .LE008E170: /* 38EFD0 E008E170 2401FFFF */ addiu $at, $zero, -0x1 /* 38EFD4 E008E174 15210004 */ bne $t1, $at, .LE008E188 /* 38EFD8 E008E178 3C018000 */ lui $at, (0x80000000 >> 16) /* 38EFDC E008E17C 15010002 */ bne $t0, $at, .LE008E188 /* 38EFE0 E008E180 00000000 */ nop /* 38EFE4 E008E184 0006000D */ break 6 .LE008E188: /* 38EFE8 E008E188 00002012 */ mflo $a0 /* 38EFEC E008E18C 25080064 */ addiu $t0, $t0, 0x64 /* 38EFF0 E008E190 24E70CA8 */ addiu $a3, $a3, 0xCA8 /* 38EFF4 E008E194 254A0001 */ addiu $t2, $t2, 0x1 /* 38EFF8 E008E198 0151102A */ slt $v0, $t2, $s1 /* 38EFFC E008E19C E4C2FFF8 */ swc1 $f2, -0x8($a2) /* 38F000 E008E1A0 44830000 */ mtc1 $v1, $f0 /* 38F004 E008E1A4 00000000 */ nop /* 38F008 E008E1A8 46800020 */ cvt.s.w $f0, $f0 /* 38F00C E008E1AC E4C0FFF4 */ swc1 $f0, -0xC($a2) /* 38F010 E008E1B0 44840000 */ mtc1 $a0, $f0 /* 38F014 E008E1B4 00000000 */ nop /* 38F018 E008E1B8 46800020 */ cvt.s.w $f0, $f0 /* 38F01C E008E1BC E4C00000 */ swc1 $f0, 0x0($a2) /* 38F020 E008E1C0 24C60048 */ addiu $a2, $a2, 0x48 /* 38F024 E008E1C4 ACA00000 */ sw $zero, 0x0($a1) /* 38F028 E008E1C8 1440FFDB */ bnez $v0, .LE008E138 /* 38F02C E008E1CC 24A50048 */ addiu $a1, $a1, 0x48 .LE008E1D0: /* 38F030 E008E1D0 0200102D */ daddu $v0, $s0, $zero /* 38F034 E008E1D4 8FBF0038 */ lw $ra, 0x38($sp) /* 38F038 E008E1D8 8FB30034 */ lw $s3, 0x34($sp) /* 38F03C E008E1DC 8FB20030 */ lw $s2, 0x30($sp) /* 38F040 E008E1E0 8FB1002C */ lw $s1, 0x2C($sp) /* 38F044 E008E1E4 8FB00028 */ lw $s0, 0x28($sp) /* 38F048 E008E1E8 D7B80050 */ ldc1 $f24, 0x50($sp) /* 38F04C E008E1EC D7B60048 */ ldc1 $f22, 0x48($sp) /* 38F050 E008E1F0 D7B40040 */ ldc1 $f20, 0x40($sp) /* 38F054 E008E1F4 03E00008 */ jr $ra /* 38F058 E008E1F8 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* gather_magic_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectInstance* effect; GatherMagicFXData* data; s32 numParts = 31; s32 i; bp.unk_00 = 0; bp.init = gather_magic_init; bp.update = gather_magic_update; bp.renderWorld = gather_magic_render; bp.renderUI = NULL; bp.effectID = EFFECT_GATHER_MAGIC; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = shim_general_heap_malloc(numParts * sizeof(*data)); effect->data.gatherMagic = data; ASSERT(effect->data.gatherMagic != NULL); data->unk_04 = arg0; data->unk_1C = 0; if (arg5 <= 0) { data->unk_18 = 100; } else { data->unk_18 = arg5; } data->unk_14 = 0; data->unk_08 = arg1; data->unk_0C = arg2; data->unk_10 = arg3; if (arg0 == 0) { data->unk_30 = 255; data->unk_34 = 0; data->unk_38 = 255; data->unk_3C = 255; data->unk_40 = 255; data->unk_44 = 255; } else { data->unk_30 = 255; data->unk_34 = 20; data->unk_38 = 33; data->unk_3C = 50; data->unk_40 = 20; data->unk_44 = 10; } data++; for (i = 1; i < numParts; i++, data++) { s32 d = numParts - 1; f32 zero = 0.0f; data->unk_20 = ((i - 1) * 3240) / d; data->unk_24 = zero; data->unk_2C = ((i - 1) * 100) / d; data->unk_00 = 0; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel phys_player_land /* 7C728 800E3278 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 7C72C 800E327C 3C02FF7F */ lui $v0, (0xFF7FFFFF >> 16) /* 7C730 800E3280 3442FFFF */ ori $v0, $v0, (0xFF7FFFFF & 0xFFFF) /* 7C734 800E3284 24040148 */ addiu $a0, $zero, 0x148 /* 7C738 800E3288 AFB00018 */ sw $s0, 0x18($sp) /* 7C73C 800E328C 3C108011 */ lui $s0, %hi(gPlayerStatus) /* 7C740 800E3290 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* 7C744 800E3294 AFBF0020 */ sw $ra, 0x20($sp) /* 7C748 800E3298 AFB1001C */ sw $s1, 0x1C($sp) /* 7C74C 800E329C 8E030000 */ lw $v1, 0x0($s0) /* 7C750 800E32A0 C6000028 */ lwc1 $f0, 0x28($s0) /* 7C754 800E32A4 C6020030 */ lwc1 $f2, 0x30($s0) /* 7C758 800E32A8 0000282D */ daddu $a1, $zero, $zero /* 7C75C 800E32AC A60000C0 */ sh $zero, 0xC0($s0) /* 7C760 800E32B0 A60000C2 */ sh $zero, 0xC2($s0) /* 7C764 800E32B4 00621824 */ and $v1, $v1, $v0 /* 7C768 800E32B8 2402FFF1 */ addiu $v0, $zero, -0xF /* 7C76C 800E32BC AE030000 */ sw $v1, 0x0($s0) /* 7C770 800E32C0 00621824 */ and $v1, $v1, $v0 /* 7C774 800E32C4 E6000044 */ swc1 $f0, 0x44($s0) /* 7C778 800E32C8 E6020048 */ swc1 $f2, 0x48($s0) /* 7C77C 800E32CC 0C052736 */ jal sfx_play_sound_at_player /* 7C780 800E32D0 AE030000 */ sw $v1, 0x0($s0) /* 7C784 800E32D4 3C038016 */ lui $v1, %hi(gCollisionStatus) /* 7C788 800E32D8 2463A550 */ addiu $v1, $v1, %lo(gCollisionStatus) /* 7C78C 800E32DC 94620002 */ lhu $v0, 0x2($v1) /* 7C790 800E32E0 30424000 */ andi $v0, $v0, 0x4000 /* 7C794 800E32E4 14400003 */ bnez $v0, .L800E32F4 /* 7C798 800E32E8 0060882D */ daddu $s1, $v1, $zero /* 7C79C 800E32EC 0C03954C */ jal phys_adjust_cam_on_landing /* 7C7A0 800E32F0 00000000 */ nop .L800E32F4: /* 7C7A4 800E32F4 96240002 */ lhu $a0, 0x2($s1) /* 7C7A8 800E32F8 2402FFFF */ addiu $v0, $zero, -0x1 /* 7C7AC 800E32FC A6220004 */ sh $v0, 0x4($s1) /* 7C7B0 800E3300 30824000 */ andi $v0, $a0, 0x4000 /* 7C7B4 800E3304 10400022 */ beqz $v0, .L800E3390 /* 7C7B8 800E3308 00042400 */ sll $a0, $a0, 16 /* 7C7BC 800E330C 0C0441A9 */ jal get_entity_type /* 7C7C0 800E3310 00042403 */ sra $a0, $a0, 16 /* 7C7C4 800E3314 0040182D */ daddu $v1, $v0, $zero /* 7C7C8 800E3318 28620009 */ slti $v0, $v1, 0x9 /* 7C7CC 800E331C 1040001C */ beqz $v0, .L800E3390 /* 7C7D0 800E3320 28620007 */ slti $v0, $v1, 0x7 /* 7C7D4 800E3324 1440001A */ bnez $v0, .L800E3390 /* 7C7D8 800E3328 00000000 */ nop /* 7C7DC 800E332C 0C04417A */ jal get_entity_by_index /* 7C7E0 800E3330 86240002 */ lh $a0, 0x2($s1) /* 7C7E4 800E3334 90430006 */ lbu $v1, 0x6($v0) /* 7C7E8 800E3338 34630001 */ ori $v1, $v1, 0x1 /* 7C7EC 800E333C A0430006 */ sb $v1, 0x6($v0) /* 7C7F0 800E3340 920300B4 */ lbu $v1, 0xB4($s0) /* 7C7F4 800E3344 2462FFF1 */ addiu $v0, $v1, -0xF /* 7C7F8 800E3348 2C420002 */ sltiu $v0, $v0, 0x2 /* 7C7FC 800E334C 1440000B */ bnez $v0, .L800E337C /* 7C800 800E3350 00031600 */ sll $v0, $v1, 24 /* 7C804 800E3354 00021E03 */ sra $v1, $v0, 24 /* 7C808 800E3358 2402000D */ addiu $v0, $zero, 0xD /* 7C80C 800E335C 10620007 */ beq $v1, $v0, .L800E337C /* 7C810 800E3360 2402000E */ addiu $v0, $zero, 0xE /* 7C814 800E3364 10620005 */ beq $v1, $v0, .L800E337C /* 7C818 800E3368 00000000 */ nop /* 7C81C 800E336C 0C039769 */ jal set_action_state /* 7C820 800E3370 24040007 */ addiu $a0, $zero, 0x7 /* 7C824 800E3374 08038D0D */ j .L800E3434 /* 7C828 800E3378 00000000 */ nop .L800E337C: /* 7C82C 800E337C 0C03805E */ jal disable_player_input /* 7C830 800E3380 00000000 */ nop /* 7C834 800E3384 2402000B */ addiu $v0, $zero, 0xB /* 7C838 800E3388 08038D0D */ j .L800E3434 /* 7C83C 800E338C A20200B6 */ sb $v0, 0xB6($s0) .L800E3390: /* 7C840 800E3390 8E020000 */ lw $v0, 0x0($s0) /* 7C844 800E3394 30424000 */ andi $v0, $v0, 0x4000 /* 7C848 800E3398 10400005 */ beqz $v0, .L800E33B0 /* 7C84C 800E339C 24020007 */ addiu $v0, $zero, 0x7 /* 7C850 800E33A0 0C039769 */ jal set_action_state /* 7C854 800E33A4 24040002 */ addiu $a0, $zero, 0x2 /* 7C858 800E33A8 08038D0D */ j .L800E3434 /* 7C85C 800E33AC 00000000 */ nop .L800E33B0: /* 7C860 800E33B0 820300B4 */ lb $v1, 0xB4($s0) /* 7C864 800E33B4 14620005 */ bne $v1, $v0, .L800E33CC /* 7C868 800E33B8 27A40010 */ addiu $a0, $sp, 0x10 /* 7C86C 800E33BC 0C039769 */ jal set_action_state /* 7C870 800E33C0 24040020 */ addiu $a0, $zero, 0x20 /* 7C874 800E33C4 08038D0D */ j .L800E3434 /* 7C878 800E33C8 00000000 */ nop .L800E33CC: /* 7C87C 800E33CC 0C0388C1 */ jal player_input_to_move_vector /* 7C880 800E33D0 27A50014 */ addiu $a1, $sp, 0x14 /* 7C884 800E33D4 C7A00014 */ lwc1 $f0, 0x14($sp) /* 7C888 800E33D8 44801000 */ mtc1 $zero, $f2 /* 7C88C 800E33DC 00000000 */ nop /* 7C890 800E33E0 46020032 */ c.eq.s $f0, $f2 /* 7C894 800E33E4 00000000 */ nop /* 7C898 800E33E8 4500000C */ bc1f .L800E341C /* 7C89C 800E33EC 24020009 */ addiu $v0, $zero, 0x9 /* 7C8A0 800E33F0 820300B4 */ lb $v1, 0xB4($s0) /* 7C8A4 800E33F4 10620005 */ beq $v1, $v0, .L800E340C /* 7C8A8 800E33F8 00000000 */ nop /* 7C8AC 800E33FC 0C039769 */ jal set_action_state /* 7C8B0 800E3400 2404000A */ addiu $a0, $zero, 0xA /* 7C8B4 800E3404 08038D0D */ j .L800E3434 /* 7C8B8 800E3408 00000000 */ nop .L800E340C: /* 7C8BC 800E340C 0C039769 */ jal set_action_state /* 7C8C0 800E3410 2404000B */ addiu $a0, $zero, 0xB /* 7C8C4 800E3414 08038D0D */ j .L800E3434 /* 7C8C8 800E3418 00000000 */ nop .L800E341C: /* 7C8CC 800E341C 45010003 */ bc1t .L800E342C /* 7C8D0 800E3420 00000000 */ nop /* 7C8D4 800E3424 C7A00010 */ lwc1 $f0, 0x10($sp) /* 7C8D8 800E3428 E6000080 */ swc1 $f0, 0x80($s0) .L800E342C: /* 7C8DC 800E342C 0C0397DA */ jal update_locomotion_state /* 7C8E0 800E3430 00000000 */ nop .L800E3434: /* 7C8E4 800E3434 8FBF0020 */ lw $ra, 0x20($sp) /* 7C8E8 800E3438 8FB1001C */ lw $s1, 0x1C($sp) /* 7C8EC 800E343C 8FB00018 */ lw $s0, 0x18($sp) /* 7C8F0 800E3440 03E00008 */ jr $ra /* 7C8F4 800E3444 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void phys_player_land(void) { PlayerStatus* playerStatus = &gPlayerStatus; CollisionStatus* collisionStatus = &gCollisionStatus; f32 moveAngle; f32 moveMagnitude; playerStatus->timeInAir = 0; playerStatus->peakJumpTime = 0; playerStatus->flags &= ~PS_FLAG_SCRIPTED_FALL; playerStatus->landPos.x = playerStatus->position.x; playerStatus->landPos.z = playerStatus->position.z; playerStatus->flags &= ~PS_FLAG_AIRBORNE; sfx_play_sound_at_player(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0); if (!(collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT)) { phys_adjust_cam_on_landing(); } collisionStatus->lastTouchedFloor = -1; if (collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT) { s32 entityType = get_entity_type(collisionStatus->currentFloor); if (entityType <= ACTION_STATE_FALLING) { if (entityType >= ACTION_STATE_LANDING_ON_SWITCH) { Entity* entity = get_entity_by_index(collisionStatus->currentFloor); entity->collisionFlags |= ENTITY_COLLISION_PLAYER_TOUCH_FLOOR; if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && playerStatus->actionState != ACTION_STATE_TORNADO_POUND && playerStatus->actionState != ACTION_STATE_SPIN_JUMP && playerStatus->actionState != ACTION_STATE_SPIN_POUND ) { set_action_state(ACTION_STATE_LANDING_ON_SWITCH); } else { disable_player_input(); playerStatus->actionSubstate = 11; } return; } } } if (playerStatus->flags & PS_FLAG_CUTSCENE_MOVEMENT) { set_action_state(ACTION_STATE_RUN); return; } if (playerStatus->actionState == ACTION_STATE_LANDING_ON_SWITCH) { set_action_state(ACTION_STATE_BOUNCE_OFF_SWITCH); return; } player_input_to_move_vector(&moveAngle, &moveMagnitude); if (moveMagnitude == 0.0f) { if (playerStatus->actionState != ACTION_STATE_STEP_DOWN) { set_action_state(ACTION_STATE_LAND); } else { set_action_state(ACTION_STATE_STEP_DOWN_LAND); } return; } if (moveMagnitude != 0.0f) { playerStatus->targetYaw = moveAngle; } update_locomotion_state(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel VirtualEntityMoveTo /* F8410 802D3A60 27BDFFC0 */ addiu $sp, $sp, -0x40 /* F8414 802D3A64 AFB20018 */ sw $s2, 0x18($sp) /* F8418 802D3A68 0080902D */ daddu $s2, $a0, $zero /* F841C 802D3A6C AFBF001C */ sw $ra, 0x1C($sp) /* F8420 802D3A70 AFB10014 */ sw $s1, 0x14($sp) /* F8424 802D3A74 AFB00010 */ sw $s0, 0x10($sp) /* F8428 802D3A78 F7BA0038 */ sdc1 $f26, 0x38($sp) /* F842C 802D3A7C F7B80030 */ sdc1 $f24, 0x30($sp) /* F8430 802D3A80 F7B60028 */ sdc1 $f22, 0x28($sp) /* F8434 802D3A84 F7B40020 */ sdc1 $f20, 0x20($sp) /* F8438 802D3A88 8E51000C */ lw $s1, 0xC($s2) /* F843C 802D3A8C 54A00001 */ bnel $a1, $zero, .L802D3A94 /* F8440 802D3A90 AE400070 */ sw $zero, 0x70($s2) .L802D3A94: /* F8444 802D3A94 8E420070 */ lw $v0, 0x70($s2) /* F8448 802D3A98 14400049 */ bnez $v0, .L802D3BC0 /* F844C 802D3A9C 00000000 */ nop /* F8450 802D3AA0 8E250000 */ lw $a1, 0x0($s1) /* F8454 802D3AA4 26310004 */ addiu $s1, $s1, 0x4 /* F8458 802D3AA8 0C0B1EAF */ jal evt_get_variable /* F845C 802D3AAC 0240202D */ daddu $a0, $s2, $zero /* F8460 802D3AB0 8E250000 */ lw $a1, 0x0($s1) /* F8464 802D3AB4 26310004 */ addiu $s1, $s1, 0x4 /* F8468 802D3AB8 0240202D */ daddu $a0, $s2, $zero /* F846C 802D3ABC 0C0B1EAF */ jal evt_get_variable /* F8470 802D3AC0 0040802D */ daddu $s0, $v0, $zero /* F8474 802D3AC4 4482D000 */ mtc1 $v0, $f26 /* F8478 802D3AC8 00000000 */ nop /* F847C 802D3ACC 4680D6A0 */ cvt.s.w $f26, $f26 /* F8480 802D3AD0 8E250000 */ lw $a1, 0x0($s1) /* F8484 802D3AD4 26310004 */ addiu $s1, $s1, 0x4 /* F8488 802D3AD8 0C0B1EAF */ jal evt_get_variable /* F848C 802D3ADC 0240202D */ daddu $a0, $s2, $zero /* F8490 802D3AE0 8E250000 */ lw $a1, 0x0($s1) /* F8494 802D3AE4 26310004 */ addiu $s1, $s1, 0x4 /* F8498 802D3AE8 4482A000 */ mtc1 $v0, $f20 /* F849C 802D3AEC 00000000 */ nop /* F84A0 802D3AF0 4680A520 */ cvt.s.w $f20, $f20 /* F84A4 802D3AF4 0C0B1EAF */ jal evt_get_variable /* F84A8 802D3AF8 0240202D */ daddu $a0, $s2, $zero /* F84AC 802D3AFC 4482C000 */ mtc1 $v0, $f24 /* F84B0 802D3B00 00000000 */ nop /* F84B4 802D3B04 4680C620 */ cvt.s.w $f24, $f24 /* F84B8 802D3B08 8E250000 */ lw $a1, 0x0($s1) /* F84BC 802D3B0C 0C0B1EAF */ jal evt_get_variable /* F84C0 802D3B10 0240202D */ daddu $a0, $s2, $zero /* F84C4 802D3B14 3C04802E */ lui $a0, %hi(gCurrentVirtualEntityListPtr) /* F84C8 802D3B18 8C84B7C0 */ lw $a0, %lo(gCurrentVirtualEntityListPtr)($a0) /* F84CC 802D3B1C 00101880 */ sll $v1, $s0, 2 /* F84D0 802D3B20 00641821 */ addu $v1, $v1, $a0 /* F84D4 802D3B24 8C710000 */ lw $s1, 0x0($v1) /* F84D8 802D3B28 AE500074 */ sw $s0, 0x74($s2) /* F84DC 802D3B2C E63A0028 */ swc1 $f26, 0x28($s1) /* F84E0 802D3B30 C63A0004 */ lwc1 $f26, 0x4($s1) /* F84E4 802D3B34 E6380030 */ swc1 $f24, 0x30($s1) /* F84E8 802D3B38 C638000C */ lwc1 $f24, 0xC($s1) /* F84EC 802D3B3C E634002C */ swc1 $f20, 0x2C($s1) /* F84F0 802D3B40 C6340028 */ lwc1 $f20, 0x28($s1) /* F84F4 802D3B44 C6360030 */ lwc1 $f22, 0x30($s1) /* F84F8 802D3B48 44820000 */ mtc1 $v0, $f0 /* F84FC 802D3B4C 00000000 */ nop /* F8500 802D3B50 46800020 */ cvt.s.w $f0, $f0 /* F8504 802D3B54 E6200048 */ swc1 $f0, 0x48($s1) /* F8508 802D3B58 4600D306 */ mov.s $f12, $f26 /* F850C 802D3B5C 4406A000 */ mfc1 $a2, $f20 /* F8510 802D3B60 4407B000 */ mfc1 $a3, $f22 /* F8514 802D3B64 0C00A720 */ jal atan2 /* F8518 802D3B68 4600C386 */ mov.s $f14, $f24 /* F851C 802D3B6C 4600D306 */ mov.s $f12, $f26 /* F8520 802D3B70 4406A000 */ mfc1 $a2, $f20 /* F8524 802D3B74 4407B000 */ mfc1 $a3, $f22 /* F8528 802D3B78 4600C386 */ mov.s $f14, $f24 /* F852C 802D3B7C 0C00A7B5 */ jal dist2D /* F8530 802D3B80 E6200038 */ swc1 $f0, 0x38($s1) /* F8534 802D3B84 C6260048 */ lwc1 $f6, 0x48($s1) /* F8538 802D3B88 44801000 */ mtc1 $zero, $f2 /* F853C 802D3B8C 46000106 */ mov.s $f4, $f0 /* F8540 802D3B90 46023032 */ c.eq.s $f6, $f2 /* F8544 802D3B94 00000000 */ nop /* F8548 802D3B98 45000005 */ bc1f .L802D3BB0 /* F854C 802D3B9C E6240034 */ swc1 $f4, 0x34($s1) /* F8550 802D3BA0 C620003C */ lwc1 $f0, 0x3C($s1) /* F8554 802D3BA4 46002003 */ div.s $f0, $f4, $f0 /* F8558 802D3BA8 080B4EEE */ j .L802D3BB8 /* F855C 802D3BAC E6200048 */ swc1 $f0, 0x48($s1) .L802D3BB0: /* F8560 802D3BB0 46062003 */ div.s $f0, $f4, $f6 /* F8564 802D3BB4 E620003C */ swc1 $f0, 0x3C($s1) .L802D3BB8: /* F8568 802D3BB8 24020001 */ addiu $v0, $zero, 0x1 /* F856C 802D3BBC AE420070 */ sw $v0, 0x70($s2) .L802D3BC0: /* F8570 802D3BC0 8E420074 */ lw $v0, 0x74($s2) /* F8574 802D3BC4 3C03802E */ lui $v1, %hi(gCurrentVirtualEntityListPtr) /* F8578 802D3BC8 8C63B7C0 */ lw $v1, %lo(gCurrentVirtualEntityListPtr)($v1) /* F857C 802D3BCC 00021080 */ sll $v0, $v0, 2 /* F8580 802D3BD0 00431021 */ addu $v0, $v0, $v1 /* F8584 802D3BD4 8C510000 */ lw $s1, 0x0($v0) /* F8588 802D3BD8 8E25003C */ lw $a1, 0x3C($s1) /* F858C 802D3BDC 8E260038 */ lw $a2, 0x38($s1) /* F8590 802D3BE0 0C0B4BCD */ jal virtual_entity_move_polar /* F8594 802D3BE4 0220202D */ daddu $a0, $s1, $zero /* F8598 802D3BE8 C6200048 */ lwc1 $f0, 0x48($s1) /* F859C 802D3BEC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F85A0 802D3BF0 44811000 */ mtc1 $at, $f2 /* F85A4 802D3BF4 00000000 */ nop /* F85A8 802D3BF8 46020001 */ sub.s $f0, $f0, $f2 /* F85AC 802D3BFC 44801000 */ mtc1 $zero, $f2 /* F85B0 802D3C00 00000000 */ nop /* F85B4 802D3C04 4602003E */ c.le.s $f0, $f2 /* F85B8 802D3C08 00000000 */ nop /* F85BC 802D3C0C 45010003 */ bc1t .L802D3C1C /* F85C0 802D3C10 E6200048 */ swc1 $f0, 0x48($s1) /* F85C4 802D3C14 080B4F0C */ j .L802D3C30 /* F85C8 802D3C18 0000102D */ daddu $v0, $zero, $zero .L802D3C1C: /* F85CC 802D3C1C C6200028 */ lwc1 $f0, 0x28($s1) /* F85D0 802D3C20 C6220030 */ lwc1 $f2, 0x30($s1) /* F85D4 802D3C24 24020001 */ addiu $v0, $zero, 0x1 /* F85D8 802D3C28 E6200004 */ swc1 $f0, 0x4($s1) /* F85DC 802D3C2C E622000C */ swc1 $f2, 0xC($s1) .L802D3C30: /* F85E0 802D3C30 8FBF001C */ lw $ra, 0x1C($sp) /* F85E4 802D3C34 8FB20018 */ lw $s2, 0x18($sp) /* F85E8 802D3C38 8FB10014 */ lw $s1, 0x14($sp) /* F85EC 802D3C3C 8FB00010 */ lw $s0, 0x10($sp) /* F85F0 802D3C40 D7BA0038 */ ldc1 $f26, 0x38($sp) /* F85F4 802D3C44 D7B80030 */ ldc1 $f24, 0x30($sp) /* F85F8 802D3C48 D7B60028 */ ldc1 $f22, 0x28($sp) /* F85FC 802D3C4C D7B40020 */ ldc1 $f20, 0x20($sp) /* F8600 802D3C50 03E00008 */ jr $ra /* F8604 802D3C54 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: ApiStatus VirtualEntityMoveTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; VirtualEntity* virtualEntity; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { s32 index = evt_get_variable(script, *args++); f32 xTemp = evt_get_variable(script, *args++); f32 yTemp = evt_get_variable(script, *args++); f32 zTemp = evt_get_variable(script, *args++); s32 moveTime = evt_get_variable(script, *args++); f32 goalPosX; f32 goalPosZ; virtualEntity = (*gCurrentVirtualEntityListPtr)[index]; script->functionTemp[1] = index; virtualEntity->goalPos.x = xTemp; virtualEntity->goalPos.y = yTemp; virtualEntity->goalPos.z = zTemp; xTemp = virtualEntity->pos.x; zTemp = virtualEntity->pos.z; goalPosX = virtualEntity->goalPos.x; goalPosZ = virtualEntity->goalPos.z; virtualEntity->moveTime = moveTime; virtualEntity->moveAngle = atan2(xTemp, zTemp, goalPosX, goalPosZ); virtualEntity->moveDist = dist2D(xTemp, zTemp, goalPosX, goalPosZ); if (virtualEntity->moveTime == 0.0f) { virtualEntity->moveTime = virtualEntity->moveDist / virtualEntity->moveSpeed; } else { virtualEntity->moveSpeed = virtualEntity->moveDist / virtualEntity->moveTime; } script->functionTemp[0] = 1; } virtualEntity = (*gCurrentVirtualEntityListPtr)[script->functionTemp[1]]; virtual_entity_move_polar(virtualEntity, virtualEntity->moveSpeed, virtualEntity->moveAngle); virtualEntity->moveTime--; if (virtualEntity->moveTime <= 0.0f) { virtualEntity->pos.x = virtualEntity->goalPos.x; virtualEntity->pos.z = virtualEntity->goalPos.z; return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel should_continue_inspect /* E20560 802B7450 27BDFFE0 */ addiu $sp, $sp, -0x20 /* E20564 802B7454 3C028016 */ lui $v0, %hi(gCollisionStatus) /* E20568 802B7458 2442A550 */ addiu $v0, $v0, %lo(gCollisionStatus) /* E2056C 802B745C AFB10014 */ sw $s1, 0x14($sp) .L802B7460: /* E20570 802B7460 3C118011 */ lui $s1, %hi(gPlayerStatus) .L802B7464: /* E20574 802B7464 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* E20578 802B7468 AFB20018 */ sw $s2, 0x18($sp) /* E2057C 802B746C 2412FFFF */ addiu $s2, $zero, -0x1 /* E20580 802B7470 AFBF001C */ sw $ra, 0x1C($sp) /* E20584 802B7474 AFB00010 */ sw $s0, 0x10($sp) .L802B7478: /* E20588 802B7478 84500012 */ lh $s0, 0x12($v0) /* E2058C 802B747C 8E2500C8 */ lw $a1, 0xC8($s1) /* E20590 802B7480 56120030 */ bnel $s0, $s2, .L802B7544 /* E20594 802B7484 32024000 */ andi $v0, $s0, 0x4000 /* E20598 802B7488 84440002 */ lh $a0, 0x2($v0) /* E2059C 802B748C 04800010 */ bltz $a0, .L802B74D0 /* E205A0 802B7490 30824000 */ andi $v0, $a0, 0x4000 /* E205A4 802B7494 1040000F */ beqz $v0, .L802B74D4 .L802B7498: /* E205A8 802B7498 3C020200 */ lui $v0, (0x2002000 >> 16) /* E205AC 802B749C 0C0441A9 */ jal get_entity_type /* E205B0 802B74A0 0080802D */ daddu $s0, $a0, $zero /* E205B4 802B74A4 2443FFFD */ addiu $v1, $v0, -0x3 .L802B74A8: /* E205B8 802B74A8 2C620031 */ sltiu $v0, $v1, 0x31 /* E205BC 802B74AC 10400038 */ beqz $v0, .L802B7590 .L802B74B0: /* E205C0 802B74B0 00031080 */ sll $v0, $v1, 2 /* E205C4 802B74B4 3C01802B */ lui $at, %hi(jtbl_802B7CC0) /* E205C8 802B74B8 00220821 */ addu $at, $at, $v0 /* E205CC 802B74BC 8C227CC0 */ lw $v0, %lo(jtbl_802B7CC0)($at) /* E205D0 802B74C0 00400008 */ jr $v0 /* E205D4 802B74C4 00000000 */ nop glabel .L802B74C8 /* E205D8 802B74C8 080ADD64 */ j .L802B7590 /* E205DC 802B74CC 2410FFFF */ addiu $s0, $zero, -0x1 .L802B74D0: /* E205E0 802B74D0 3C020200 */ lui $v0, (0x2002000 >> 16) .L802B74D4: /* E205E4 802B74D4 8E230000 */ lw $v1, 0x0($s1) /* E205E8 802B74D8 34422000 */ ori $v0, $v0, (0x2002000 & 0xFFFF) .L802B74DC: /* E205EC 802B74DC 00621824 */ and $v1, $v1, $v0 .L802B74E0: /* E205F0 802B74E0 3C020200 */ lui $v0, (0x2000000 >> 16) /* E205F4 802B74E4 1462000F */ bne $v1, $v0, .L802B7524 /* E205F8 802B74E8 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) /* E205FC 802B74EC 10A0000C */ beqz $a1, .L802B7520 glabel pulse_stone_notification_update /* E20600 802B74F0 3C031000 */ lui $v1, (0x10000000 >> 16) .L802B74F4: /* E20604 802B74F4 8CA20000 */ lw $v0, 0x0($a1) /* E20608 802B74F8 00431024 */ and $v0, $v0, $v1 /* E2060C 802B74FC 10400009 */ beqz $v0, .L802B7524 /* E20610 802B7500 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) /* E20614 802B7504 80A200A4 */ lb $v0, 0xA4($a1) /* E20618 802B7508 862300C6 */ lh $v1, 0xC6($s1) .L802B750C: /* E2061C 802B750C 34502000 */ ori $s0, $v0, 0x2000 /* E20620 802B7510 14700029 */ bne $v1, $s0, .L802B75B8 /* E20624 802B7514 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) /* E20628 802B7518 080ADD74 */ j .L802B75D0 /* E2062C 802B751C 24020001 */ addiu $v0, $zero, 0x1 .L802B7520: /* E20630 802B7520 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) .L802B7524: /* E20634 802B7524 3463FFFF */ ori $v1, $v1, (0xF7FFFFFF & 0xFFFF) .L802B7528: /* E20638 802B7528 0000102D */ daddu $v0, $zero, $zero /* E2063C 802B752C 8E240000 */ lw $a0, 0x0($s1) /* E20640 802B7530 2405FFFF */ addiu $a1, $zero, -0x1 /* E20644 802B7534 A62500C6 */ sh $a1, 0xC6($s1) /* E20648 802B7538 00832024 */ and $a0, $a0, $v1 /* E2064C 802B753C 080ADD74 */ j .L802B75D0 /* E20650 802B7540 AE240000 */ sw $a0, 0x0($s1) .L802B7544: /* E20654 802B7544 14400007 */ bnez $v0, .L802B7564 /* E20658 802B7548 32022000 */ andi $v0, $s0, 0x2000 /* E2065C 802B754C 14400010 */ bnez $v0, .L802B7590 /* E20660 802B7550 00000000 */ nop /* E20664 802B7554 0C05173A */ jal should_collider_allow_interact .L802B7558: /* E20668 802B7558 0200202D */ daddu $a0, $s0, $zero /* E2066C 802B755C 080ADD5B */ j .L802B756C /* E20670 802B7560 00000000 */ nop .L802B7564: /* E20674 802B7564 0C0394BE */ jal phys_can_player_interact .L802B7568: /* E20678 802B7568 00000000 */ nop .L802B756C: /* E2067C 802B756C 14400008 */ bnez $v0, .L802B7590 /* E20680 802B7570 3C04F7FF */ lui $a0, (0xF7FFFFFF >> 16) /* E20684 802B7574 3484FFFF */ ori $a0, $a0, (0xF7FFFFFF & 0xFFFF) /* E20688 802B7578 8E230000 */ lw $v1, 0x0($s1) glabel func_802B757C /* E2068C 802B757C 0000102D */ daddu $v0, $zero, $zero ispy_icon_img: /* E20690 802B7580 A63200C6 */ sh $s2, 0xC6($s1) /* E20694 802B7584 00641824 */ and $v1, $v1, $a0 /* E20698 802B7588 080ADD74 */ j .L802B75D0 /* E2069C 802B758C AE230000 */ sw $v1, 0x0($s1) glabel .L802B7590 /* E206A0 802B7590 862200C6 */ lh $v0, 0xC6($s1) /* E206A4 802B7594 14500008 */ bne $v0, $s0, .L802B75B8 /* E206A8 802B7598 3C03F7FF */ lui $v1, (0xF7FFFFFF >> 16) /* E206AC 802B759C 8E220000 */ lw $v0, 0x0($s1) /* E206B0 802B75A0 3C030800 */ lui $v1, (0x800FFFF >> 16) /* E206B4 802B75A4 00431024 */ and $v0, $v0, $v1 /* E206B8 802B75A8 10400007 */ beqz $v0, .L802B75C8 .L802B75AC: /* E206BC 802B75AC 0000102D */ daddu $v0, $zero, $zero /* E206C0 802B75B0 080ADD74 */ j .L802B75D0 .L802B75B4: /* E206C4 802B75B4 00000000 */ nop .L802B75B8: /* E206C8 802B75B8 8E220000 */ lw $v0, 0x0($s1) /* E206CC 802B75BC 3463FFFF */ ori $v1, $v1, (0x800FFFF & 0xFFFF) /* E206D0 802B75C0 00431024 */ and $v0, $v0, $v1 /* E206D4 802B75C4 AE220000 */ sw $v0, 0x0($s1) .L802B75C8: /* E206D8 802B75C8 A63000C6 */ sh $s0, 0xC6($s1) /* E206DC 802B75CC 24020001 */ addiu $v0, $zero, 0x1 .L802B75D0: /* E206E0 802B75D0 8FBF001C */ lw $ra, 0x1C($sp) /* E206E4 802B75D4 8FB20018 */ lw $s2, 0x18($sp) /* E206E8 802B75D8 8FB10014 */ lw $s1, 0x14($sp) /* E206EC 802B75DC 8FB00010 */ lw $s0, 0x10($sp) /* E206F0 802B75E0 03E00008 */ jr $ra .L802B75E4: /* E206F4 802B75E4 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: s32 should_continue_inspect(void) { CollisionStatus* collisionStatus = &gCollisionStatus; PlayerStatus* playerStatus = &gPlayerStatus; s32 curInteraction = collisionStatus->currentWall; Npc* npc = playerStatus->encounteredNPC; if (curInteraction == NO_COLLIDER) { s32 floor = gCollisionStatus.currentFloor; if (floor >= 0 && (floor & COLLISION_WITH_ENTITY_BIT)) { curInteraction = floor; switch (get_entity_type(floor)) { case ENTITY_TYPE_PADLOCK: case ENTITY_TYPE_PADLOCK_RED_FRAME: case ENTITY_TYPE_PADLOCK_RED_FACE: case ENTITY_TYPE_PADLOCK_BLUE_FACE: case ENTITY_TYPE_PUSH_BLOCK: case ENTITY_TYPE_CHEST: case ENTITY_TYPE_SIGNPOST: curInteraction = NO_COLLIDER; break; } } else if ( ((playerStatus->flags & (PS_FLAG_HAS_CONVERSATION_NPC | PS_FLAG_INPUT_DISABLED)) == PS_FLAG_HAS_CONVERSATION_NPC) && (npc != NULL) && (npc->flags & NPC_FLAG_10000000) ) { curInteraction = npc->npcID | COLLISION_WITH_NPC_BIT; if (playerStatus->interactingWithID == curInteraction) { return TRUE; } } else { playerStatus->interactingWithID = NO_COLLIDER; playerStatus->flags &= ~PS_FLAG_INTERACTED; return FALSE; } } else { if (!(curInteraction & COLLISION_WITH_ENTITY_BIT)) { if (!(curInteraction & COLLISION_WITH_NPC_BIT)) { if (!should_collider_allow_interact(curInteraction)) { playerStatus->interactingWithID = NO_COLLIDER; playerStatus->flags &= ~PS_FLAG_INTERACTED; return FALSE; } } } else { if (!phys_can_player_interact()) { playerStatus->interactingWithID = NO_COLLIDER; playerStatus->flags &= ~PS_FLAG_INTERACTED; return FALSE; } } } if (playerStatus->interactingWithID == curInteraction) { if ((playerStatus->flags & PS_FLAG_INTERACTED)) { return FALSE; } } else { playerStatus->flags &= ~PS_FLAG_INTERACTED; } playerStatus->interactingWithID = curInteraction; return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel collision_main_above /* 7BC90 800E27E0 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 7BC94 800E27E4 AFB10034 */ sw $s1, 0x34($sp) /* 7BC98 800E27E8 3C118011 */ lui $s1, %hi(gPlayerStatus) /* 7BC9C 800E27EC 2631EFC8 */ addiu $s1, $s1, %lo(gPlayerStatus) /* 7BCA0 800E27F0 AFBF003C */ sw $ra, 0x3C($sp) /* 7BCA4 800E27F4 AFB20038 */ sw $s2, 0x38($sp) /* 7BCA8 800E27F8 AFB00030 */ sw $s0, 0x30($sp) /* 7BCAC 800E27FC F7B40040 */ sdc1 $f20, 0x40($sp) /* 7BCB0 800E2800 862200B0 */ lh $v0, 0xB0($s1) /* 7BCB4 800E2804 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 7BCB8 800E2808 44811000 */ mtc1 $at, $f2 /* 7BCBC 800E280C 44820000 */ mtc1 $v0, $f0 /* 7BCC0 800E2810 00000000 */ nop /* 7BCC4 800E2814 46800020 */ cvt.s.w $f0, $f0 /* 7BCC8 800E2818 46020002 */ mul.s $f0, $f0, $f2 /* 7BCCC 800E281C 00000000 */ nop /* 7BCD0 800E2820 27A40018 */ addiu $a0, $sp, 0x18 /* 7BCD4 800E2824 C6220028 */ lwc1 $f2, 0x28($s1) /* 7BCD8 800E2828 27A5001C */ addiu $a1, $sp, 0x1C /* 7BCDC 800E282C E7A20020 */ swc1 $f2, 0x20($sp) /* 7BCE0 800E2830 46000506 */ mov.s $f20, $f0 /* 7BCE4 800E2834 C620002C */ lwc1 $f0, 0x2C($s1) /* 7BCE8 800E2838 C6220030 */ lwc1 $f2, 0x30($s1) /* 7BCEC 800E283C 46140000 */ add.s $f0, $f0, $f20 /* 7BCF0 800E2840 E7A20028 */ swc1 $f2, 0x28($sp) /* 7BCF4 800E2844 E7B4002C */ swc1 $f20, 0x2C($sp) /* 7BCF8 800E2848 0C0388C1 */ jal player_input_to_move_vector /* 7BCFC 800E284C E7A00024 */ swc1 $f0, 0x24($sp) /* 7BD00 800E2850 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 7BD04 800E2854 44800000 */ mtc1 $zero, $f0 /* 7BD08 800E2858 3C128016 */ lui $s2, %hi(gCollisionStatus) /* 7BD0C 800E285C 2652A550 */ addiu $s2, $s2, %lo(gCollisionStatus) /* 7BD10 800E2860 46001032 */ c.eq.s $f2, $f0 /* 7BD14 800E2864 00000000 */ nop /* 7BD18 800E2868 45010004 */ bc1t .L800E287C /* 7BD1C 800E286C 0220202D */ daddu $a0, $s1, $zero /* 7BD20 800E2870 C6220080 */ lwc1 $f2, 0x80($s1) /* 7BD24 800E2874 08038A31 */ j .L800E28C4 /* 7BD28 800E2878 27A50020 */ addiu $a1, $sp, 0x20 .L800E287C: /* 7BD2C 800E287C 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 7BD30 800E2880 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 7BD34 800E2884 C62200A8 */ lwc1 $f2, 0xA8($s1) /* 7BD38 800E2888 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7BD3C 800E288C 44810000 */ mtc1 $at, $f0 /* 7BD40 800E2890 00031080 */ sll $v0, $v1, 2 /* 7BD44 800E2894 00431021 */ addu $v0, $v0, $v1 /* 7BD48 800E2898 00021080 */ sll $v0, $v0, 2 /* 7BD4C 800E289C 00431023 */ subu $v0, $v0, $v1 /* 7BD50 800E28A0 000218C0 */ sll $v1, $v0, 3 /* 7BD54 800E28A4 00431021 */ addu $v0, $v0, $v1 /* 7BD58 800E28A8 000210C0 */ sll $v0, $v0, 3 /* 7BD5C 800E28AC 46001081 */ sub.s $f2, $f2, $f0 /* 7BD60 800E28B0 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 7BD64 800E28B4 00220821 */ addu $at, $at, $v0 /* 7BD68 800E28B8 C4201DEC */ lwc1 $f0, %lo(gCameras + 0x6C)($at) /* 7BD6C 800E28BC 46001080 */ add.s $f2, $f2, $f0 /* 7BD70 800E28C0 27A50020 */ addiu $a1, $sp, 0x20 .L800E28C4: /* 7BD74 800E28C4 27A2002C */ addiu $v0, $sp, 0x2C /* 7BD78 800E28C8 27A60024 */ addiu $a2, $sp, 0x24 /* 7BD7C 800E28CC 27A70028 */ addiu $a3, $sp, 0x28 /* 7BD80 800E28D0 E7A20018 */ swc1 $f2, 0x18($sp) /* 7BD84 800E28D4 AFA20010 */ sw $v0, 0x10($sp) /* 7BD88 800E28D8 0C0379F9 */ jal player_raycast_up_corners /* 7BD8C 800E28DC E7A20014 */ swc1 $f2, 0x14($sp) /* 7BD90 800E28E0 0040802D */ daddu $s0, $v0, $zero /* 7BD94 800E28E4 06000030 */ bltz $s0, .L800E29A8 /* 7BD98 800E28E8 A6500008 */ sh $s0, 0x8($s2) /* 7BD9C 800E28EC 922200B4 */ lbu $v0, 0xB4($s1) /* 7BDA0 800E28F0 2442FFF8 */ addiu $v0, $v0, -0x8 /* 7BDA4 800E28F4 2C420002 */ sltiu $v0, $v0, 0x2 /* 7BDA8 800E28F8 1440002C */ bnez $v0, .L800E29AC /* 7BDAC 800E28FC 0200102D */ daddu $v0, $s0, $zero /* 7BDB0 800E2900 86420002 */ lh $v0, 0x2($s2) /* 7BDB4 800E2904 04410029 */ bgez $v0, .L800E29AC /* 7BDB8 800E2908 0200102D */ daddu $v0, $s0, $zero /* 7BDBC 800E290C C6200070 */ lwc1 $f0, 0x70($s1) /* 7BDC0 800E2910 4600A000 */ add.s $f0, $f20, $f0 /* 7BDC4 800E2914 C7A2002C */ lwc1 $f2, 0x2C($sp) /* 7BDC8 800E2918 46000005 */ abs.s $f0, $f0 /* 7BDCC 800E291C 4600103E */ c.le.s $f2, $f0 /* 7BDD0 800E2920 00000000 */ nop /* 7BDD4 800E2924 45000020 */ bc1f .L800E29A8 /* 7BDD8 800E2928 32024000 */ andi $v0, $s0, 0x4000 /* 7BDDC 800E292C 10400006 */ beqz $v0, .L800E2948 /* 7BDE0 800E2930 00000000 */ nop /* 7BDE4 800E2934 0C0441A9 */ jal get_entity_type /* 7BDE8 800E2938 0200202D */ daddu $a0, $s0, $zero /* 7BDEC 800E293C 2403000D */ addiu $v1, $zero, 0xD /* 7BDF0 800E2940 1043001A */ beq $v0, $v1, .L800E29AC /* 7BDF4 800E2944 0200102D */ daddu $v0, $s0, $zero .L800E2948: /* 7BDF8 800E2948 862200B0 */ lh $v0, 0xB0($s1) /* 7BDFC 800E294C 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 7BE00 800E2950 44810000 */ mtc1 $at, $f0 /* 7BE04 800E2954 3C014040 */ lui $at, (0x40400000 >> 16) /* 7BE08 800E2958 44812000 */ mtc1 $at, $f4 /* 7BE0C 800E295C 44821000 */ mtc1 $v0, $f2 /* 7BE10 800E2960 00000000 */ nop /* 7BE14 800E2964 468010A0 */ cvt.s.w $f2, $f2 /* 7BE18 800E2968 46001083 */ div.s $f2, $f2, $f0 /* 7BE1C 800E296C 46041082 */ mul.s $f2, $f2, $f4 /* 7BE20 800E2970 00000000 */ nop /* 7BE24 800E2974 C7A00024 */ lwc1 $f0, 0x24($sp) /* 7BE28 800E2978 46020001 */ sub.s $f0, $f0, $f2 /* 7BE2C 800E297C 822300B4 */ lb $v1, 0xB4($s1) /* 7BE30 800E2980 2402000F */ addiu $v0, $zero, 0xF /* 7BE34 800E2984 10620008 */ beq $v1, $v0, .L800E29A8 /* 7BE38 800E2988 E620002C */ swc1 $f0, 0x2C($s1) /* 7BE3C 800E298C 2402000D */ addiu $v0, $zero, 0xD /* 7BE40 800E2990 10620006 */ beq $v1, $v0, .L800E29AC /* 7BE44 800E2994 0200102D */ daddu $v0, $s0, $zero /* 7BE48 800E2998 AE200070 */ sw $zero, 0x70($s1) /* 7BE4C 800E299C AE200074 */ sw $zero, 0x74($s1) /* 7BE50 800E29A0 AE200078 */ sw $zero, 0x78($s1) /* 7BE54 800E29A4 AE20007C */ sw $zero, 0x7C($s1) .L800E29A8: /* 7BE58 800E29A8 0200102D */ daddu $v0, $s0, $zero .L800E29AC: /* 7BE5C 800E29AC 8FBF003C */ lw $ra, 0x3C($sp) /* 7BE60 800E29B0 8FB20038 */ lw $s2, 0x38($sp) /* 7BE64 800E29B4 8FB10034 */ lw $s1, 0x34($sp) /* 7BE68 800E29B8 8FB00030 */ lw $s0, 0x30($sp) /* 7BE6C 800E29BC D7B40040 */ ldc1 $f20, 0x40($sp) /* 7BE70 800E29C0 03E00008 */ jr $ra /* 7BE74 800E29C4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 collision_main_above(void) { PlayerStatus* playerStatus = &gPlayerStatus; CollisionStatus* collisionStatus = &gCollisionStatus; f32 x, y, z; f32 new_var; f32 moveAngle; f32 moveMagnitude; f32 sp2C; s32 hitResult; f32 phi_f2; new_var = sp2C = playerStatus->colliderHeight * 0.5f; x = playerStatus->position.x; y = playerStatus->position.y + new_var; z = playerStatus->position.z; player_input_to_move_vector(&moveAngle, &moveMagnitude); if (moveMagnitude != 0.0f) { phi_f2 = playerStatus->targetYaw; } else { phi_f2 = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw; } moveAngle = phi_f2; hitResult = player_raycast_up_corners(playerStatus, &x, &y, &z, &sp2C, moveAngle); collisionStatus->currentCeiling = hitResult; if (hitResult >= 0) { if (playerStatus->actionState != ACTION_STATE_FALLING && playerStatus->actionState != ACTION_STATE_STEP_DOWN && collisionStatus->currentFloor <= NO_COLLIDER ) { if (sp2C <= fabsf(new_var + playerStatus->gravityIntegrator[0])) { do { if ((hitResult & COLLISION_WITH_ENTITY_BIT) && get_entity_type(hitResult) == ENTITY_TYPE_BRICK_BLOCK) { return hitResult; } } while (0); playerStatus->position.y = y - ((playerStatus->colliderHeight / 5.0f) * 3.0f); if (playerStatus->actionState != ACTION_STATE_TORNADO_JUMP && playerStatus->actionState != ACTION_STATE_SPIN_JUMP ) { playerStatus->gravityIntegrator[0] = 0.0f; playerStatus->gravityIntegrator[1] = 0.0f; playerStatus->gravityIntegrator[2] = 0.0f; playerStatus->gravityIntegrator[3] = 0.0f; } } } } return hitResult; }
### RAW ASSEMBLY INSTRUCTIONS: glabel energy_in_out_update /* 3D5740 E00D6720 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 3D5744 E00D6724 AFB20018 */ sw $s2, 0x18($sp) /* 3D5748 E00D6728 0080902D */ daddu $s2, $a0, $zero /* 3D574C E00D672C AFBF001C */ sw $ra, 0x1C($sp) /* 3D5750 E00D6730 AFB10014 */ sw $s1, 0x14($sp) /* 3D5754 E00D6734 AFB00010 */ sw $s0, 0x10($sp) /* 3D5758 E00D6738 F7B40020 */ sdc1 $f20, 0x20($sp) /* 3D575C E00D673C 8E430000 */ lw $v1, 0x0($s2) /* 3D5760 E00D6740 8E44000C */ lw $a0, 0xC($s2) /* 3D5764 E00D6744 30620010 */ andi $v0, $v1, 0x10 /* 3D5768 E00D6748 10400005 */ beqz $v0, .LE00D6760 /* 3D576C E00D674C 2402FFEF */ addiu $v0, $zero, -0x11 /* 3D5770 E00D6750 00621024 */ and $v0, $v1, $v0 /* 3D5774 E00D6754 AE420000 */ sw $v0, 0x0($s2) /* 3D5778 E00D6758 24020010 */ addiu $v0, $zero, 0x10 /* 3D577C E00D675C AC820010 */ sw $v0, 0x10($a0) .LE00D6760: /* 3D5780 E00D6760 8C830010 */ lw $v1, 0x10($a0) /* 3D5784 E00D6764 286203E8 */ slti $v0, $v1, 0x3E8 /* 3D5788 E00D6768 10400002 */ beqz $v0, .LE00D6774 /* 3D578C E00D676C 2462FFFF */ addiu $v0, $v1, -0x1 /* 3D5790 E00D6770 AC820010 */ sw $v0, 0x10($a0) .LE00D6774: /* 3D5794 E00D6774 8C820014 */ lw $v0, 0x14($a0) /* 3D5798 E00D6778 8C830010 */ lw $v1, 0x10($a0) /* 3D579C E00D677C 24450001 */ addiu $a1, $v0, 0x1 /* 3D57A0 E00D6780 04610005 */ bgez $v1, .LE00D6798 /* 3D57A4 E00D6784 AC850014 */ sw $a1, 0x14($a0) /* 3D57A8 E00D6788 0C080128 */ jal shim_remove_effect /* 3D57AC E00D678C 0240202D */ daddu $a0, $s2, $zero /* 3D57B0 E00D6790 08035A48 */ j .LE00D6920 /* 3D57B4 E00D6794 00000000 */ nop .LE00D6798: /* 3D57B8 E00D6798 28620010 */ slti $v0, $v1, 0x10 /* 3D57BC E00D679C 10400002 */ beqz $v0, .LE00D67A8 /* 3D57C0 E00D67A0 00031100 */ sll $v0, $v1, 4 /* 3D57C4 E00D67A4 AC820024 */ sw $v0, 0x24($a0) .LE00D67A8: /* 3D57C8 E00D67A8 28A20010 */ slti $v0, $a1, 0x10 /* 3D57CC E00D67AC 10400003 */ beqz $v0, .LE00D67BC /* 3D57D0 E00D67B0 00051100 */ sll $v0, $a1, 4 /* 3D57D4 E00D67B4 2442000F */ addiu $v0, $v0, 0xF /* 3D57D8 E00D67B8 AC820024 */ sw $v0, 0x24($a0) .LE00D67BC: /* 3D57DC E00D67BC 8E420008 */ lw $v0, 0x8($s2) /* 3D57E0 E00D67C0 24110001 */ addiu $s1, $zero, 0x1 /* 3D57E4 E00D67C4 0222102A */ slt $v0, $s1, $v0 /* 3D57E8 E00D67C8 10400055 */ beqz $v0, .LE00D6920 /* 3D57EC E00D67CC 24840048 */ addiu $a0, $a0, 0x48 /* 3D57F0 E00D67D0 4480A000 */ mtc1 $zero, $f20 /* 3D57F4 E00D67D4 24900024 */ addiu $s0, $a0, 0x24 .LE00D67D8: /* 3D57F8 E00D67D8 8E02FFF0 */ lw $v0, -0x10($s0) /* 3D57FC E00D67DC 8E03FFEC */ lw $v1, -0x14($s0) /* 3D5800 E00D67E0 24420001 */ addiu $v0, $v0, 0x1 /* 3D5804 E00D67E4 AE02FFF0 */ sw $v0, -0x10($s0) /* 3D5808 E00D67E8 0043102A */ slt $v0, $v0, $v1 /* 3D580C E00D67EC 14400016 */ bnez $v0, .LE00D6848 /* 3D5810 E00D67F0 00000000 */ nop /* 3D5814 E00D67F4 C6020014 */ lwc1 $f2, 0x14($s0) /* 3D5818 E00D67F8 4614103C */ c.lt.s $f2, $f20 /* 3D581C E00D67FC 00000000 */ nop /* 3D5820 E00D6800 4500000A */ bc1f .LE00D682C /* 3D5824 E00D6804 AE00FFF0 */ sw $zero, -0x10($s0) /* 3D5828 E00D6808 0060102D */ daddu $v0, $v1, $zero /* 3D582C E00D680C 00021023 */ negu $v0, $v0 /* 3D5830 E00D6810 44820000 */ mtc1 $v0, $f0 /* 3D5834 E00D6814 00000000 */ nop /* 3D5838 E00D6818 46800020 */ cvt.s.w $f0, $f0 /* 3D583C E00D681C 46020002 */ mul.s $f0, $f0, $f2 /* 3D5840 E00D6820 00000000 */ nop /* 3D5844 E00D6824 08035A0C */ j .LE00D6830 /* 3D5848 E00D6828 E600FFE0 */ swc1 $f0, -0x20($s0) .LE00D682C: /* 3D584C E00D682C E614FFE0 */ swc1 $f20, -0x20($s0) .LE00D6830: /* 3D5850 E00D6830 0C080138 */ jal shim_rand_int /* 3D5854 E00D6834 24040167 */ addiu $a0, $zero, 0x167 /* 3D5858 E00D6838 44820000 */ mtc1 $v0, $f0 /* 3D585C E00D683C 00000000 */ nop /* 3D5860 E00D6840 46800020 */ cvt.s.w $f0, $f0 /* 3D5864 E00D6844 E6000018 */ swc1 $f0, 0x18($s0) .LE00D6848: /* 3D5868 E00D6848 8E03FFF0 */ lw $v1, -0x10($s0) /* 3D586C E00D684C 00031040 */ sll $v0, $v1, 1 /* 3D5870 E00D6850 00431021 */ addu $v0, $v0, $v1 /* 3D5874 E00D6854 00021900 */ sll $v1, $v0, 4 /* 3D5878 E00D6858 00621823 */ subu $v1, $v1, $v0 /* 3D587C E00D685C 8E02FFEC */ lw $v0, -0x14($s0) /* 3D5880 E00D6860 00031880 */ sll $v1, $v1, 2 /* 3D5884 E00D6864 14400002 */ bnez $v0, .LE00D6870 /* 3D5888 E00D6868 0062001A */ div $zero, $v1, $v0 /* 3D588C E00D686C 0007000D */ break 7 .LE00D6870: /* 3D5890 E00D6870 2401FFFF */ addiu $at, $zero, -0x1 /* 3D5894 E00D6874 14410004 */ bne $v0, $at, .LE00D6888 /* 3D5898 E00D6878 3C018000 */ lui $at, (0x80000000 >> 16) /* 3D589C E00D687C 14610002 */ bne $v1, $at, .LE00D6888 /* 3D58A0 E00D6880 00000000 */ nop /* 3D58A4 E00D6884 0006000D */ break 6 .LE00D6888: /* 3D58A8 E00D6888 00001812 */ mflo $v1 /* 3D58AC E00D688C C604FFE0 */ lwc1 $f4, -0x20($s0) /* 3D58B0 E00D6890 C6000014 */ lwc1 $f0, 0x14($s0) /* 3D58B4 E00D6894 C6020018 */ lwc1 $f2, 0x18($s0) /* 3D58B8 E00D6898 46002100 */ add.s $f4, $f4, $f0 /* 3D58BC E00D689C C600001C */ lwc1 $f0, 0x1C($s0) /* 3D58C0 E00D68A0 46001080 */ add.s $f2, $f2, $f0 /* 3D58C4 E00D68A4 E604FFE0 */ swc1 $f4, -0x20($s0) /* 3D58C8 E00D68A8 44836000 */ mtc1 $v1, $f12 /* 3D58CC E00D68AC 00000000 */ nop /* 3D58D0 E00D68B0 46806320 */ cvt.s.w $f12, $f12 /* 3D58D4 E00D68B4 4614603C */ c.lt.s $f12, $f20 /* 3D58D8 E00D68B8 00000000 */ nop /* 3D58DC E00D68BC 45010008 */ bc1t .LE00D68E0 /* 3D58E0 E00D68C0 E6020018 */ swc1 $f2, 0x18($s0) /* 3D58E4 E00D68C4 3C014334 */ lui $at, (0x43340000 >> 16) /* 3D58E8 E00D68C8 44810000 */ mtc1 $at, $f0 /* 3D58EC E00D68CC 00000000 */ nop /* 3D58F0 E00D68D0 460C003C */ c.lt.s $f0, $f12 /* 3D58F4 E00D68D4 00000000 */ nop /* 3D58F8 E00D68D8 45000003 */ bc1f .LE00D68E8 /* 3D58FC E00D68DC 00000000 */ nop .LE00D68E0: /* 3D5900 E00D68E0 08035A43 */ j .LE00D690C /* 3D5904 E00D68E4 AE000000 */ sw $zero, 0x0($s0) .LE00D68E8: /* 3D5908 E00D68E8 0C080140 */ jal shim_sin_deg /* 3D590C E00D68EC 00000000 */ nop /* 3D5910 E00D68F0 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3D5914 E00D68F4 44811000 */ mtc1 $at, $f2 /* 3D5918 E00D68F8 00000000 */ nop /* 3D591C E00D68FC 46020002 */ mul.s $f0, $f0, $f2 /* 3D5920 E00D6900 00000000 */ nop /* 3D5924 E00D6904 4600018D */ trunc.w.s $f6, $f0 /* 3D5928 E00D6908 E6060000 */ swc1 $f6, 0x0($s0) .LE00D690C: /* 3D592C E00D690C 26310001 */ addiu $s1, $s1, 0x1 /* 3D5930 E00D6910 8E420008 */ lw $v0, 0x8($s2) /* 3D5934 E00D6914 0222102A */ slt $v0, $s1, $v0 /* 3D5938 E00D6918 1440FFAF */ bnez $v0, .LE00D67D8 /* 3D593C E00D691C 26100048 */ addiu $s0, $s0, 0x48 .LE00D6920: /* 3D5940 E00D6920 8FBF001C */ lw $ra, 0x1C($sp) /* 3D5944 E00D6924 8FB20018 */ lw $s2, 0x18($sp) /* 3D5948 E00D6928 8FB10014 */ lw $s1, 0x14($sp) /* 3D594C E00D692C 8FB00010 */ lw $s0, 0x10($sp) /* 3D5950 E00D6930 D7B40020 */ ldc1 $f20, 0x20($sp) /* 3D5954 E00D6934 03E00008 */ jr $ra /* 3D5958 E00D6938 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void energy_in_out_update(EffectInstance* effect) { EnergyInOutFXData* part = effect->data.energyInOut; s32 unk_10; s32 unk_14; f32 angle; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->unk_10 = 16; } if (part->unk_10 < 1000) { part->unk_10--; } part->unk_14++; if (part->unk_10 < 0) { shim_remove_effect(effect); return; } unk_10 = part->unk_10; unk_14 = part->unk_14; if (unk_10 < 16) { part->unk_24 = unk_10 * 16; } if (unk_14 < 16) { part->unk_24 = unk_14 * 16 + 15; } part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_14++; if (part->unk_14 >= part->unk_10) { part->unk_14 = 0; if (part->unk_38 < 0.0f) { part->pos.x = -part->unk_10 * part->unk_38; } else { part->pos.x = 0.0f; } part->unk_3C = shim_rand_int(359); } part->pos.x += part->unk_38; part->unk_3C += part->unk_40; angle = (part->unk_14 * 180) / part->unk_10; if (angle < 0.0f || angle > 180.0f) { part->unk_24 = 0; } else { part->unk_24 = shim_sin_deg(angle) * 255.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_window_root /* DE1C4 80147AC4 27BDFED0 */ addiu $sp, $sp, -0x130 /* DE1C8 80147AC8 27A20020 */ addiu $v0, $sp, 0x20 /* DE1CC 80147ACC 2404FFFF */ addiu $a0, $zero, -0x1 /* DE1D0 80147AD0 2403003F */ addiu $v1, $zero, 0x3F /* DE1D4 80147AD4 AFBF012C */ sw $ra, 0x12C($sp) /* DE1D8 80147AD8 AFB20128 */ sw $s2, 0x128($sp) /* DE1DC 80147ADC AFB10124 */ sw $s1, 0x124($sp) /* DE1E0 80147AE0 AFB00120 */ sw $s0, 0x120($sp) .L80147AE4: /* DE1E4 80147AE4 AC440000 */ sw $a0, 0x0($v0) /* DE1E8 80147AE8 2463FFFF */ addiu $v1, $v1, -0x1 /* DE1EC 80147AEC 0461FFFD */ bgez $v1, .L80147AE4 /* DE1F0 80147AF0 24420004 */ addiu $v0, $v0, 0x4 /* DE1F4 80147AF4 0000182D */ daddu $v1, $zero, $zero /* DE1F8 80147AF8 3C048016 */ lui $a0, %hi(gWindows) /* DE1FC 80147AFC 24849D50 */ addiu $a0, $a0, %lo(gWindows) /* DE200 80147B00 27A50020 */ addiu $a1, $sp, 0x20 .L80147B04: /* DE204 80147B04 90820000 */ lbu $v0, 0x0($a0) /* DE208 80147B08 50400006 */ beql $v0, $zero, .L80147B24 /* DE20C 80147B0C 24630001 */ addiu $v1, $v1, 0x1 /* DE210 80147B10 90820001 */ lbu $v0, 0x1($a0) /* DE214 80147B14 00021080 */ sll $v0, $v0, 2 /* DE218 80147B18 00A21021 */ addu $v0, $a1, $v0 /* DE21C 80147B1C AC430000 */ sw $v1, 0x0($v0) /* DE220 80147B20 24630001 */ addiu $v1, $v1, 0x1 .L80147B24: /* DE224 80147B24 28620040 */ slti $v0, $v1, 0x40 /* DE228 80147B28 1440FFF6 */ bnez $v0, .L80147B04 /* DE22C 80147B2C 24840020 */ addiu $a0, $a0, 0x20 /* DE230 80147B30 3C06D9FF */ lui $a2, (0xD9FFFFFF >> 16) /* DE234 80147B34 34C6FFFF */ ori $a2, $a2, (0xD9FFFFFF & 0xFFFF) /* DE238 80147B38 3C050020 */ lui $a1, (0x200605 >> 16) /* DE23C 80147B3C 34A50605 */ ori $a1, $a1, (0x200605 & 0xFFFF) /* DE240 80147B40 3C07E300 */ lui $a3, (0xE3000800 >> 16) /* DE244 80147B44 34E70800 */ ori $a3, $a3, (0xE3000800 & 0xFFFF) /* DE248 80147B48 3C09FCFF */ lui $t1, (0xFCFFFFFF >> 16) /* DE24C 80147B4C 3529FFFF */ ori $t1, $t1, (0xFCFFFFFF & 0xFFFF) /* DE250 80147B50 3C08FFFE */ lui $t0, (0xFFFE793C >> 16) /* DE254 80147B54 3508793C */ ori $t0, $t0, (0xFFFE793C & 0xFFFF) /* DE258 80147B58 3C0AE200 */ lui $t2, (0xE2001E01 >> 16) /* DE25C 80147B5C 354A1E01 */ ori $t2, $t2, (0xE2001E01 & 0xFFFF) /* DE260 80147B60 3C0BE300 */ lui $t3, (0xE3000C0F >> 16) /* DE264 80147B64 356B0C0F */ ori $t3, $t3, (0xE3000C0F & 0xFFFF) /* DE268 80147B68 3C0CDB04 */ lui $t4, (0xDB040004 >> 16) /* DE26C 80147B6C 358C0004 */ ori $t4, $t4, (0xDB040004 & 0xFFFF) /* DE270 80147B70 3C0DDB04 */ lui $t5, (0xDB04000C >> 16) /* DE274 80147B74 35AD000C */ ori $t5, $t5, (0xDB04000C & 0xFFFF) /* DE278 80147B78 3C0EDB04 */ lui $t6, (0xDB040014 >> 16) /* DE27C 80147B7C 35CE0014 */ ori $t6, $t6, (0xDB040014 & 0xFFFF) /* DE280 80147B80 3C0FDB04 */ lui $t7, (0xDB04001C >> 16) /* DE284 80147B84 35EF001C */ ori $t7, $t7, (0xDB04001C & 0xFFFF) /* DE288 80147B88 3C12FF10 */ lui $s2, (0xFF10013F >> 16) /* DE28C 80147B8C 3652013F */ ori $s2, $s2, (0xFF10013F & 0xFFFF) /* DE290 80147B90 3C11800A */ lui $s1, %hi(gMainGfxPos) /* DE294 80147B94 2631A66C */ addiu $s1, $s1, %lo(gMainGfxPos) /* DE298 80147B98 3C02D900 */ lui $v0, (0xD9000000 >> 16) /* DE29C 80147B9C 8E300000 */ lw $s0, 0x0($s1) /* DE2A0 80147BA0 3C04800A */ lui $a0, %hi(nuGfxCfb_ptr) /* DE2A4 80147BA4 8C84A64C */ lw $a0, %lo(nuGfxCfb_ptr)($a0) /* DE2A8 80147BA8 0200182D */ daddu $v1, $s0, $zero /* DE2AC 80147BAC 26100008 */ addiu $s0, $s0, 0x8 /* DE2B0 80147BB0 AE300000 */ sw $s0, 0x0($s1) /* DE2B4 80147BB4 AC620000 */ sw $v0, 0x0($v1) /* DE2B8 80147BB8 26020008 */ addiu $v0, $s0, 0x8 /* DE2BC 80147BBC AC600004 */ sw $zero, 0x4($v1) /* DE2C0 80147BC0 AE220000 */ sw $v0, 0x0($s1) /* DE2C4 80147BC4 26020010 */ addiu $v0, $s0, 0x10 /* DE2C8 80147BC8 AE060000 */ sw $a2, 0x0($s0) /* DE2CC 80147BCC AE050004 */ sw $a1, 0x4($s0) /* DE2D0 80147BD0 AE220000 */ sw $v0, 0x0($s1) /* DE2D4 80147BD4 26020018 */ addiu $v0, $s0, 0x18 /* DE2D8 80147BD8 AE070008 */ sw $a3, 0x8($s0) /* DE2DC 80147BDC AE00000C */ sw $zero, 0xC($s0) /* DE2E0 80147BE0 AE220000 */ sw $v0, 0x0($s1) /* DE2E4 80147BE4 26020020 */ addiu $v0, $s0, 0x20 /* DE2E8 80147BE8 AE090010 */ sw $t1, 0x10($s0) /* DE2EC 80147BEC AE080014 */ sw $t0, 0x14($s0) /* DE2F0 80147BF0 AE220000 */ sw $v0, 0x0($s1) /* DE2F4 80147BF4 26020028 */ addiu $v0, $s0, 0x28 /* DE2F8 80147BF8 AE0A0018 */ sw $t2, 0x18($s0) /* DE2FC 80147BFC AE00001C */ sw $zero, 0x1C($s0) /* DE300 80147C00 AE220000 */ sw $v0, 0x0($s1) /* DE304 80147C04 24022CF0 */ addiu $v0, $zero, 0x2CF0 /* DE308 80147C08 AE020024 */ sw $v0, 0x24($s0) /* DE30C 80147C0C 26020030 */ addiu $v0, $s0, 0x30 /* DE310 80147C10 24030002 */ addiu $v1, $zero, 0x2 /* DE314 80147C14 AE0B0020 */ sw $t3, 0x20($s0) /* DE318 80147C18 AE220000 */ sw $v0, 0x0($s1) /* DE31C 80147C1C 26020038 */ addiu $v0, $s0, 0x38 /* DE320 80147C20 AE0C0028 */ sw $t4, 0x28($s0) /* DE324 80147C24 AE03002C */ sw $v1, 0x2C($s0) /* DE328 80147C28 AE220000 */ sw $v0, 0x0($s1) /* DE32C 80147C2C 26020040 */ addiu $v0, $s0, 0x40 /* DE330 80147C30 AE030034 */ sw $v1, 0x34($s0) /* DE334 80147C34 3403FFFE */ ori $v1, $zero, 0xFFFE /* DE338 80147C38 AE0D0030 */ sw $t5, 0x30($s0) /* DE33C 80147C3C AE220000 */ sw $v0, 0x0($s1) /* DE340 80147C40 26020048 */ addiu $v0, $s0, 0x48 /* DE344 80147C44 AE0E0038 */ sw $t6, 0x38($s0) /* DE348 80147C48 AE03003C */ sw $v1, 0x3C($s0) /* DE34C 80147C4C AE220000 */ sw $v0, 0x0($s1) /* DE350 80147C50 26020050 */ addiu $v0, $s0, 0x50 /* DE354 80147C54 AE0F0040 */ sw $t7, 0x40($s0) /* DE358 80147C58 AE030044 */ sw $v1, 0x44($s0) /* DE35C 80147C5C AE220000 */ sw $v0, 0x0($s1) /* DE360 80147C60 0C0187A4 */ jal osVirtualToPhysical /* DE364 80147C64 AE120048 */ sw $s2, 0x48($s0) /* DE368 80147C68 8E230000 */ lw $v1, 0x0($s1) /* DE36C 80147C6C 27A40020 */ addiu $a0, $sp, 0x20 /* DE370 80147C70 AE02004C */ sw $v0, 0x4C($s0) /* DE374 80147C74 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* DE378 80147C78 0000302D */ daddu $a2, $zero, $zero /* DE37C 80147C7C 00C0382D */ daddu $a3, $a2, $zero /* DE380 80147C80 0060282D */ daddu $a1, $v1, $zero /* DE384 80147C84 24630008 */ addiu $v1, $v1, 0x8 /* DE388 80147C88 AE230000 */ sw $v1, 0x0($s1) /* DE38C 80147C8C ACA20000 */ sw $v0, 0x0($a1) /* DE390 80147C90 240200FF */ addiu $v0, $zero, 0xFF /* DE394 80147C94 ACA00004 */ sw $zero, 0x4($a1) /* DE398 80147C98 2405FFFF */ addiu $a1, $zero, -0x1 /* DE39C 80147C9C AFA00010 */ sw $zero, 0x10($sp) /* DE3A0 80147CA0 AFA20014 */ sw $v0, 0x14($sp) /* DE3A4 80147CA4 AFA00018 */ sw $zero, 0x18($sp) /* DE3A8 80147CA8 0C051DA6 */ jal render_windows /* DE3AC 80147CAC AFA0001C */ sw $zero, 0x1C($sp) /* DE3B0 80147CB0 8FBF012C */ lw $ra, 0x12C($sp) /* DE3B4 80147CB4 8FB20128 */ lw $s2, 0x128($sp) /* DE3B8 80147CB8 8FB10124 */ lw $s1, 0x124($sp) /* DE3BC 80147CBC 8FB00120 */ lw $s0, 0x120($sp) /* DE3C0 80147CC0 03E00008 */ jr $ra /* DE3C4 80147CC4 27BD0130 */ addiu $sp, $sp, 0x130 ### DECOMPILED C INSTRUCTIONS: void render_window_root(void) { s32 priorityArray[ARRAY_COUNT(gWindows)]; s32* ptr = priorityArray; s32 i; Window* window; for (i = 0; i < ARRAY_COUNT(gWindows); i++) { *ptr++ = -1; } for (i = 0, window = gWindows; i < ARRAY_COUNT(gWindows); window++, i++) { if (window->flags != 0) { priorityArray[window->priority] = i; } } gSPLoadGeometryMode(gMainGfxPos++, 0); gSPSetGeometryMode(gMainGfxPos++, G_ZBUFFER | G_SHADE | G_CULL_BOTH | G_SHADING_SMOOTH); gDPPipelineMode(gMainGfxPos++, G_PM_NPRIMITIVE); gDPSetCombineMode(gMainGfxPos++, G_CC_SHADE, G_CC_SHADE); gDPSetAlphaCompare(gMainGfxPos++, G_AC_NONE); gSPSetOtherMode(gMainGfxPos++, G_SETOTHERMODE_H, G_MDSFT_ALPHADITHER, 16, G_AD_DISABLE | G_CD_DISABLE | G_CK_NONE | G_TC_FILT | G_TF_BILERP | G_TT_NONE | G_TL_TILE | G_TD_CLAMP | G_TP_NONE); gSPClipRatio(gMainGfxPos++, FRUSTRATIO_2); gDPSetColorImage(gMainGfxPos++, G_IM_FMT_RGBA, G_IM_SIZ_16b, SCREEN_WIDTH, osVirtualToPhysical(nuGfxCfb_ptr)); gDPPipeSync(gMainGfxPos++); render_windows(priorityArray, WINDOW_ID_NONE, 0, 0, 0, 255, 0, NULL); }
### RAW ASSEMBLY INSTRUCTIONS: glabel fire_flower_main /* 37F720 E007E000 27BDFF98 */ addiu $sp, $sp, -0x68 /* 37F724 E007E004 F7B40050 */ sdc1 $f20, 0x50($sp) /* 37F728 E007E008 4485A000 */ mtc1 $a1, $f20 /* 37F72C E007E00C AFB00028 */ sw $s0, 0x28($sp) /* 37F730 E007E010 0080802D */ daddu $s0, $a0, $zero /* 37F734 E007E014 F7B60058 */ sdc1 $f22, 0x58($sp) /* 37F738 E007E018 4486B000 */ mtc1 $a2, $f22 /* 37F73C E007E01C 27A40010 */ addiu $a0, $sp, 0x10 /* 37F740 E007E020 F7B80060 */ sdc1 $f24, 0x60($sp) /* 37F744 E007E024 4487C000 */ mtc1 $a3, $f24 /* 37F748 E007E028 3C02E008 */ lui $v0, %hi(fire_flower_init) /* 37F74C E007E02C 2442E1FC */ addiu $v0, $v0, %lo(fire_flower_init) /* 37F750 E007E030 AFA20018 */ sw $v0, 0x18($sp) /* 37F754 E007E034 3C02E008 */ lui $v0, %hi(fire_flower_update) /* 37F758 E007E038 2442E204 */ addiu $v0, $v0, %lo(fire_flower_update) /* 37F75C E007E03C AFA2001C */ sw $v0, 0x1C($sp) /* 37F760 E007E040 3C02E008 */ lui $v0, %hi(fire_flower_render) /* 37F764 E007E044 2442E508 */ addiu $v0, $v0, %lo(fire_flower_render) /* 37F768 E007E048 AFA20020 */ sw $v0, 0x20($sp) /* 37F76C E007E04C 2402003F */ addiu $v0, $zero, 0x3F /* 37F770 E007E050 AFBF0048 */ sw $ra, 0x48($sp) /* 37F774 E007E054 AFB70044 */ sw $s7, 0x44($sp) /* 37F778 E007E058 AFB60040 */ sw $s6, 0x40($sp) /* 37F77C E007E05C AFB5003C */ sw $s5, 0x3C($sp) /* 37F780 E007E060 AFB40038 */ sw $s4, 0x38($sp) /* 37F784 E007E064 AFB30034 */ sw $s3, 0x34($sp) /* 37F788 E007E068 AFB20030 */ sw $s2, 0x30($sp) /* 37F78C E007E06C AFB1002C */ sw $s1, 0x2C($sp) /* 37F790 E007E070 AFA00010 */ sw $zero, 0x10($sp) /* 37F794 E007E074 AFA00024 */ sw $zero, 0x24($sp) /* 37F798 E007E078 0C080124 */ jal shim_create_effect_instance /* 37F79C E007E07C AFA20014 */ sw $v0, 0x14($sp) /* 37F7A0 E007E080 24040934 */ addiu $a0, $zero, 0x934 /* 37F7A4 E007E084 2414001F */ addiu $s4, $zero, 0x1F /* 37F7A8 E007E088 0040982D */ daddu $s3, $v0, $zero /* 37F7AC E007E08C 0C08012C */ jal shim_general_heap_malloc /* 37F7B0 E007E090 AE740008 */ sw $s4, 0x8($s3) /* 37F7B4 E007E094 0040882D */ daddu $s1, $v0, $zero /* 37F7B8 E007E098 16200003 */ bnez $s1, .LE007E0A8 /* 37F7BC E007E09C AE71000C */ sw $s1, 0xC($s3) .LE007E0A0: /* 37F7C0 E007E0A0 0801F828 */ j .LE007E0A0 /* 37F7C4 E007E0A4 00000000 */ nop .LE007E0A8: /* 37F7C8 E007E0A8 AE200004 */ sw $zero, 0x4($s1) /* 37F7CC E007E0AC AE300000 */ sw $s0, 0x0($s1) /* 37F7D0 E007E0B0 E6340008 */ swc1 $f20, 0x8($s1) /* 37F7D4 E007E0B4 E636000C */ swc1 $f22, 0xC($s1) /* 37F7D8 E007E0B8 E6380010 */ swc1 $f24, 0x10($s1) /* 37F7DC E007E0BC 8FA20078 */ lw $v0, 0x78($sp) /* 37F7E0 E007E0C0 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 37F7E4 E007E0C4 44810000 */ mtc1 $at, $f0 /* 37F7E8 E007E0C8 3C01C120 */ lui $at, (0xC1200000 >> 16) /* 37F7EC E007E0CC 44811000 */ mtc1 $at, $f2 /* 37F7F0 E007E0D0 24120001 */ addiu $s2, $zero, 0x1 /* 37F7F4 E007E0D4 AE200044 */ sw $zero, 0x44($s1) /* 37F7F8 E007E0D8 AE200034 */ sw $zero, 0x34($s1) /* 37F7FC E007E0DC AE200038 */ sw $zero, 0x38($s1) /* 37F800 E007E0E0 AE200028 */ sw $zero, 0x28($s1) /* 37F804 E007E0E4 AE220040 */ sw $v0, 0x40($s1) /* 37F808 E007E0E8 240200FF */ addiu $v0, $zero, 0xFF /* 37F80C E007E0EC AE22003C */ sw $v0, 0x3C($s1) /* 37F810 E007E0F0 E6200030 */ swc1 $f0, 0x30($s1) /* 37F814 E007E0F4 E622002C */ swc1 $f2, 0x2C($s1) /* 37F818 E007E0F8 0254102A */ slt $v0, $s2, $s4 /* 37F81C E007E0FC 10400030 */ beqz $v0, .LE007E1C0 /* 37F820 E007E100 2631004C */ addiu $s1, $s1, 0x4C /* 37F824 E007E104 0240B82D */ daddu $s7, $s2, $zero /* 37F828 E007E108 241600FF */ addiu $s6, $zero, 0xFF /* 37F82C E007E10C 2415000A */ addiu $s5, $zero, 0xA /* 37F830 E007E110 26300040 */ addiu $s0, $s1, 0x40 /* 37F834 E007E114 3C014100 */ lui $at, (0x41000000 >> 16) /* 37F838 E007E118 4481B000 */ mtc1 $at, $f22 /* 37F83C E007E11C 3C01E008 */ lui $at, (0xE0080000 >> 16) /* 37F840 E007E120 D434EC40 */ ldc1 $f20, -0x13C0($at) .LE007E124: /* 37F844 E007E124 24040014 */ addiu $a0, $zero, 0x14 /* 37F848 E007E128 AE370000 */ sw $s7, 0x0($s1) /* 37F84C E007E12C AE00FFC8 */ sw $zero, -0x38($s0) /* 37F850 E007E130 AE00FFCC */ sw $zero, -0x34($s0) /* 37F854 E007E134 AE00FFD0 */ sw $zero, -0x30($s0) /* 37F858 E007E138 E616FFD4 */ swc1 $f22, -0x2C($s0) /* 37F85C E007E13C 0C080000 */ jal effect_rand_int /* 37F860 E007E140 AE00FFD8 */ sw $zero, -0x28($s0) /* 37F864 E007E144 2404000A */ addiu $a0, $zero, 0xA /* 37F868 E007E148 2442FFF8 */ addiu $v0, $v0, -0x8 /* 37F86C E007E14C 44820000 */ mtc1 $v0, $f0 /* 37F870 E007E150 00000000 */ nop /* 37F874 E007E154 46800020 */ cvt.s.w $f0, $f0 /* 37F878 E007E158 0C080000 */ jal effect_rand_int /* 37F87C E007E15C E600FFDC */ swc1 $f0, -0x24($s0) /* 37F880 E007E160 2442FFFB */ addiu $v0, $v0, -0x5 /* 37F884 E007E164 44820000 */ mtc1 $v0, $f0 /* 37F888 E007E168 00000000 */ nop /* 37F88C E007E16C 46800021 */ cvt.d.w $f0, $f0 /* 37F890 E007E170 46340002 */ mul.d $f0, $f0, $f20 /* 37F894 E007E174 00000000 */ nop /* 37F898 E007E178 24040050 */ addiu $a0, $zero, 0x50 /* 37F89C E007E17C 2631004C */ addiu $s1, $s1, 0x4C /* 37F8A0 E007E180 46200020 */ cvt.s.d $f0, $f0 /* 37F8A4 E007E184 0C080000 */ jal effect_rand_int /* 37F8A8 E007E188 E600FFE0 */ swc1 $f0, -0x20($s0) /* 37F8AC E007E18C 2643FFFF */ addiu $v1, $s2, -0x1 /* 37F8B0 E007E190 26520001 */ addiu $s2, $s2, 0x1 /* 37F8B4 E007E194 24420005 */ addiu $v0, $v0, 0x5 /* 37F8B8 E007E198 44820000 */ mtc1 $v0, $f0 /* 37F8BC E007E19C 00000000 */ nop /* 37F8C0 E007E1A0 46800020 */ cvt.s.w $f0, $f0 /* 37F8C4 E007E1A4 E600FFE4 */ swc1 $f0, -0x1C($s0) /* 37F8C8 E007E1A8 AE16FFFC */ sw $s6, -0x4($s0) /* 37F8CC E007E1AC AE030008 */ sw $v1, 0x8($s0) /* 37F8D0 E007E1B0 AE150000 */ sw $s5, 0x0($s0) /* 37F8D4 E007E1B4 0254102A */ slt $v0, $s2, $s4 /* 37F8D8 E007E1B8 1440FFDA */ bnez $v0, .LE007E124 /* 37F8DC E007E1BC 2610004C */ addiu $s0, $s0, 0x4C .LE007E1C0: /* 37F8E0 E007E1C0 0260102D */ daddu $v0, $s3, $zero /* 37F8E4 E007E1C4 8FBF0048 */ lw $ra, 0x48($sp) /* 37F8E8 E007E1C8 8FB70044 */ lw $s7, 0x44($sp) /* 37F8EC E007E1CC 8FB60040 */ lw $s6, 0x40($sp) /* 37F8F0 E007E1D0 8FB5003C */ lw $s5, 0x3C($sp) /* 37F8F4 E007E1D4 8FB40038 */ lw $s4, 0x38($sp) /* 37F8F8 E007E1D8 8FB30034 */ lw $s3, 0x34($sp) /* 37F8FC E007E1DC 8FB20030 */ lw $s2, 0x30($sp) /* 37F900 E007E1E0 8FB1002C */ lw $s1, 0x2C($sp) /* 37F904 E007E1E4 8FB00028 */ lw $s0, 0x28($sp) /* 37F908 E007E1E8 D7B80060 */ ldc1 $f24, 0x60($sp) /* 37F90C E007E1EC D7B60058 */ ldc1 $f22, 0x58($sp) /* 37F910 E007E1F0 D7B40050 */ ldc1 $f20, 0x50($sp) /* 37F914 E007E1F4 03E00008 */ jr $ra /* 37F918 E007E1F8 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: EffectInstance* fire_flower_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; FireFlowerFXData* part; Vec3i* partData; s32 numParts = 31; s32 i; bp.unk_00 = 0; bp.init = fire_flower_init; bp.update = fire_flower_update; bp.renderWorld = fire_flower_render; bp.renderUI = NULL; bp.effectID = EFFECT_FIRE_FLOWER; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; part = shim_general_heap_malloc(numParts * sizeof(*part)); effect->data.fireFlower = part; ASSERT(effect->data.fireFlower != NULL); part->unk_04 = 0; part->unk_00 = arg0; part->pos.x = arg1; part->pos.y = arg2; part->pos.z = arg3; part->unk_40.x = arg4; part->unk_40.y = 0; part->unk_34 = 0; part->unk_38 = 0; part->unk_28 = 0; part->unk_3C = 255; part->unk_30 = 0.5f; part->unk_2C = -10.0f; part++; for (i = 1; i < numParts; i++, part++) { partData = &part->unk_40; part->unk_00 = 1; part->pos.x = 0; part->pos.y = 0; part->pos.z = 0; part->unk_14 = 8.0f; part->unk_18 = 0; part->unk_1C = effect_rand_int(20) - 8; part->unk_20 = (effect_rand_int(10) - 5) * 0.05; part->unk_24 = effect_rand_int(80) + 5; part->unk_3C = 255; partData->z = i - 1; partData->x = 10; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel NpcMoveTo /* F2BDC 802CE22C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* F2BE0 802CE230 AFB20018 */ sw $s2, 0x18($sp) /* F2BE4 802CE234 0080902D */ daddu $s2, $a0, $zero /* F2BE8 802CE238 AFBF001C */ sw $ra, 0x1C($sp) /* F2BEC 802CE23C AFB10014 */ sw $s1, 0x14($sp) /* F2BF0 802CE240 AFB00010 */ sw $s0, 0x10($sp) /* F2BF4 802CE244 F7B60028 */ sdc1 $f22, 0x28($sp) /* F2BF8 802CE248 F7B40020 */ sdc1 $f20, 0x20($sp) /* F2BFC 802CE24C 8E51000C */ lw $s1, 0xC($s2) /* F2C00 802CE250 54A00001 */ bnel $a1, $zero, .L802CE258 /* F2C04 802CE254 AE400070 */ sw $zero, 0x70($s2) .L802CE258: /* F2C08 802CE258 8E420070 */ lw $v0, 0x70($s2) /* F2C0C 802CE25C 1440003D */ bnez $v0, .L802CE354 /* F2C10 802CE260 00000000 */ nop /* F2C14 802CE264 8E250000 */ lw $a1, 0x0($s1) /* F2C18 802CE268 26310004 */ addiu $s1, $s1, 0x4 /* F2C1C 802CE26C 0C0B1EAF */ jal evt_get_variable /* F2C20 802CE270 0240202D */ daddu $a0, $s2, $zero /* F2C24 802CE274 8E250000 */ lw $a1, 0x0($s1) /* F2C28 802CE278 26310004 */ addiu $s1, $s1, 0x4 /* F2C2C 802CE27C 0240202D */ daddu $a0, $s2, $zero /* F2C30 802CE280 0C0B1EAF */ jal evt_get_variable /* F2C34 802CE284 0040802D */ daddu $s0, $v0, $zero /* F2C38 802CE288 8E250000 */ lw $a1, 0x0($s1) /* F2C3C 802CE28C 26310004 */ addiu $s1, $s1, 0x4 /* F2C40 802CE290 4482B000 */ mtc1 $v0, $f22 /* F2C44 802CE294 00000000 */ nop /* F2C48 802CE298 4680B5A0 */ cvt.s.w $f22, $f22 /* F2C4C 802CE29C 0C0B1EAF */ jal evt_get_variable /* F2C50 802CE2A0 0240202D */ daddu $a0, $s2, $zero /* F2C54 802CE2A4 8E250000 */ lw $a1, 0x0($s1) /* F2C58 802CE2A8 4482A000 */ mtc1 $v0, $f20 /* F2C5C 802CE2AC 00000000 */ nop /* F2C60 802CE2B0 4680A520 */ cvt.s.w $f20, $f20 /* F2C64 802CE2B4 0C0B1EAF */ jal evt_get_variable /* F2C68 802CE2B8 0240202D */ daddu $a0, $s2, $zero /* F2C6C 802CE2BC 0240202D */ daddu $a0, $s2, $zero /* F2C70 802CE2C0 0200282D */ daddu $a1, $s0, $zero /* F2C74 802CE2C4 0C0B36B0 */ jal resolve_npc /* F2C78 802CE2C8 0040882D */ daddu $s1, $v0, $zero /* F2C7C 802CE2CC 0040802D */ daddu $s0, $v0, $zero /* F2C80 802CE2D0 56000003 */ bnel $s0, $zero, .L802CE2E0 /* F2C84 802CE2D4 AE500074 */ sw $s0, 0x74($s2) /* F2C88 802CE2D8 080B3905 */ j .L802CE414 /* F2C8C 802CE2DC 24020002 */ addiu $v0, $zero, 0x2 .L802CE2E0: /* F2C90 802CE2E0 C60C0038 */ lwc1 $f12, 0x38($s0) /* F2C94 802CE2E4 C60E0040 */ lwc1 $f14, 0x40($s0) /* F2C98 802CE2E8 E6160060 */ swc1 $f22, 0x60($s0) /* F2C9C 802CE2EC 4406B000 */ mfc1 $a2, $f22 /* F2CA0 802CE2F0 E6140068 */ swc1 $f20, 0x68($s0) /* F2CA4 802CE2F4 4407A000 */ mfc1 $a3, $f20 /* F2CA8 802CE2F8 0C00A7B5 */ jal dist2D /* F2CAC 802CE2FC A611008E */ sh $s1, 0x8E($s0) /* F2CB0 802CE300 8602008E */ lh $v0, 0x8E($s0) /* F2CB4 802CE304 14400007 */ bnez $v0, .L802CE324 /* F2CB8 802CE308 46000186 */ mov.s $f6, $f0 /* F2CBC 802CE30C C6000018 */ lwc1 $f0, 0x18($s0) /* F2CC0 802CE310 46003003 */ div.s $f0, $f6, $f0 /* F2CC4 802CE314 4600020D */ trunc.w.s $f8, $f0 /* F2CC8 802CE318 44024000 */ mfc1 $v0, $f8 /* F2CCC 802CE31C 080B38CE */ j .L802CE338 /* F2CD0 802CE320 A602008E */ sh $v0, 0x8E($s0) .L802CE324: /* F2CD4 802CE324 44820000 */ mtc1 $v0, $f0 /* F2CD8 802CE328 00000000 */ nop /* F2CDC 802CE32C 46800020 */ cvt.s.w $f0, $f0 /* F2CE0 802CE330 46003003 */ div.s $f0, $f6, $f0 /* F2CE4 802CE334 E6000018 */ swc1 $f0, 0x18($s0) .L802CE338: /* F2CE8 802CE338 8602008E */ lh $v0, 0x8E($s0) /* F2CEC 802CE33C 14400004 */ bnez $v0, .L802CE350 /* F2CF0 802CE340 24020001 */ addiu $v0, $zero, 0x1 /* F2CF4 802CE344 24020001 */ addiu $v0, $zero, 0x1 /* F2CF8 802CE348 A602008E */ sh $v0, 0x8E($s0) /* F2CFC 802CE34C 24020001 */ addiu $v0, $zero, 0x1 .L802CE350: /* F2D00 802CE350 AE420070 */ sw $v0, 0x70($s2) .L802CE354: /* F2D04 802CE354 8E500074 */ lw $s0, 0x74($s2) /* F2D08 802CE358 C60C0038 */ lwc1 $f12, 0x38($s0) /* F2D0C 802CE35C C60E0040 */ lwc1 $f14, 0x40($s0) /* F2D10 802CE360 8E060060 */ lw $a2, 0x60($s0) /* F2D14 802CE364 0C00A720 */ jal atan2 /* F2D18 802CE368 8E070068 */ lw $a3, 0x68($s0) /* F2D1C 802CE36C 8E050018 */ lw $a1, 0x18($s0) /* F2D20 802CE370 44060000 */ mfc1 $a2, $f0 /* F2D24 802CE374 0200202D */ daddu $a0, $s0, $zero /* F2D28 802CE378 0C00EA95 */ jal npc_move_heading /* F2D2C 802CE37C AE06000C */ sw $a2, 0xC($s0) /* F2D30 802CE380 C6000018 */ lwc1 $f0, 0x18($s0) /* F2D34 802CE384 3C014010 */ lui $at, (0x40100000 >> 16) /* F2D38 802CE388 44811800 */ mtc1 $at, $f3 /* F2D3C 802CE38C 44801000 */ mtc1 $zero, $f2 /* F2D40 802CE390 46000021 */ cvt.d.s $f0, $f0 /* F2D44 802CE394 4622003C */ c.lt.d $f0, $f2 /* F2D48 802CE398 00000000 */ nop /* F2D4C 802CE39C 45000003 */ bc1f .L802CE3AC /* F2D50 802CE3A0 0200202D */ daddu $a0, $s0, $zero /* F2D54 802CE3A4 080B38EC */ j .L802CE3B0 /* F2D58 802CE3A8 0000282D */ daddu $a1, $zero, $zero .L802CE3AC: /* F2D5C 802CE3AC 24050001 */ addiu $a1, $zero, 0x1 .L802CE3B0: /* F2D60 802CE3B0 0C00F598 */ jal spawn_surface_effects /* F2D64 802CE3B4 00000000 */ nop /* F2D68 802CE3B8 C60C0038 */ lwc1 $f12, 0x38($s0) /* F2D6C 802CE3BC C60E0040 */ lwc1 $f14, 0x40($s0) /* F2D70 802CE3C0 8E060060 */ lw $a2, 0x60($s0) /* F2D74 802CE3C4 0C00A7B5 */ jal dist2D /* F2D78 802CE3C8 8E070068 */ lw $a3, 0x68($s0) /* F2D7C 802CE3CC 46000186 */ mov.s $f6, $f0 /* F2D80 802CE3D0 C6040018 */ lwc1 $f4, 0x18($s0) /* F2D84 802CE3D4 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* F2D88 802CE3D8 44811800 */ mtc1 $at, $f3 /* F2D8C 802CE3DC 44801000 */ mtc1 $zero, $f2 /* F2D90 802CE3E0 46002021 */ cvt.d.s $f0, $f4 /* F2D94 802CE3E4 4622003C */ c.lt.d $f0, $f2 /* F2D98 802CE3E8 00000000 */ nop /* F2D9C 802CE3EC 45000004 */ bc1f .L802CE400 /* F2DA0 802CE3F0 00000000 */ nop /* F2DA4 802CE3F4 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F2DA8 802CE3F8 44812000 */ mtc1 $at, $f4 /* F2DAC 802CE3FC 00000000 */ nop .L802CE400: /* F2DB0 802CE400 4604303E */ c.le.s $f6, $f4 /* F2DB4 802CE404 00000000 */ nop /* F2DB8 802CE408 45010002 */ bc1t .L802CE414 /* F2DBC 802CE40C 24020001 */ addiu $v0, $zero, 0x1 /* F2DC0 802CE410 0000102D */ daddu $v0, $zero, $zero .L802CE414: /* F2DC4 802CE414 8FBF001C */ lw $ra, 0x1C($sp) /* F2DC8 802CE418 8FB20018 */ lw $s2, 0x18($sp) /* F2DCC 802CE41C 8FB10014 */ lw $s1, 0x14($sp) /* F2DD0 802CE420 8FB00010 */ lw $s0, 0x10($sp) /* F2DD4 802CE424 D7B60028 */ ldc1 $f22, 0x28($sp) /* F2DD8 802CE428 D7B40020 */ ldc1 $f20, 0x20($sp) /* F2DDC 802CE42C 03E00008 */ jr $ra /* F2DE0 802CE430 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: ApiStatus NpcMoveTo(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Npc* npc; f32 dist; f32 moveSpeed; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { s32 npcID = evt_get_variable(script, *args++); f32 goalX = evt_get_variable(script, *args++); f32 goalZ = evt_get_variable(script, *args++); s32 duration = evt_get_variable(script, *args++); npc = resolve_npc(script, npcID); if (npc == NULL) { return ApiStatus_DONE2; } script->functionTempPtr[1] = npc; npc->moveToPos.x = goalX; npc->moveToPos.z = goalZ; npc->duration = duration; dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); if (npc->duration == 0) { npc->duration = dist / npc->moveSpeed; } else { npc->moveSpeed = dist / npc->duration; } if (npc->duration == 0) { npc->duration = 1; } script->functionTemp[0] = 1; } npc = script->functionTempPtr[1]; npc->yaw = atan2(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); npc_move_heading(npc, npc->moveSpeed, npc->yaw); if (npc->moveSpeed < 4.0) { spawn_surface_effects(npc, SURFACE_INTERACT_WALK); } else { spawn_surface_effects(npc, SURFACE_INTERACT_RUN); } dist = dist2D(npc->pos.x, npc->pos.z, npc->moveToPos.x, npc->moveToPos.z); moveSpeed = npc->moveSpeed; if (moveSpeed < 1.0) { moveSpeed = 1.0f; } if (dist <= moveSpeed) { return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel squirt_main /* 3B4790 E00B2000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 3B4794 E00B2004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 3B4798 E00B2008 4485A000 */ mtc1 $a1, $f20 /* 3B479C E00B200C F7B60040 */ sdc1 $f22, 0x40($sp) /* 3B47A0 E00B2010 4486B000 */ mtc1 $a2, $f22 /* 3B47A4 E00B2014 AFB20030 */ sw $s2, 0x30($sp) /* 3B47A8 E00B2018 0080902D */ daddu $s2, $a0, $zero /* 3B47AC E00B201C F7B80048 */ sdc1 $f24, 0x48($sp) /* 3B47B0 E00B2020 4487C000 */ mtc1 $a3, $f24 /* 3B47B4 E00B2024 27A40010 */ addiu $a0, $sp, 0x10 /* 3B47B8 E00B2028 AFB00028 */ sw $s0, 0x28($sp) /* 3B47BC E00B202C 8FB00070 */ lw $s0, 0x70($sp) /* 3B47C0 E00B2030 3C02E00B */ lui $v0, %hi(squirt_init) /* 3B47C4 E00B2034 244221DC */ addiu $v0, $v0, %lo(squirt_init) /* 3B47C8 E00B2038 AFA20018 */ sw $v0, 0x18($sp) /* 3B47CC E00B203C 3C02E00B */ lui $v0, %hi(squirt_update) /* 3B47D0 E00B2040 244221E4 */ addiu $v0, $v0, %lo(squirt_update) /* 3B47D4 E00B2044 AFA2001C */ sw $v0, 0x1C($sp) /* 3B47D8 E00B2048 3C02E00B */ lui $v0, %hi(squirt_render) /* 3B47DC E00B204C 24422460 */ addiu $v0, $v0, %lo(squirt_render) /* 3B47E0 E00B2050 AFA20020 */ sw $v0, 0x20($sp) /* 3B47E4 E00B2054 24020059 */ addiu $v0, $zero, 0x59 /* 3B47E8 E00B2058 AFBF0034 */ sw $ra, 0x34($sp) /* 3B47EC E00B205C AFB1002C */ sw $s1, 0x2C($sp) /* 3B47F0 E00B2060 AFA00010 */ sw $zero, 0x10($sp) /* 3B47F4 E00B2064 AFA00024 */ sw $zero, 0x24($sp) /* 3B47F8 E00B2068 0C080124 */ jal shim_create_effect_instance /* 3B47FC E00B206C AFA20014 */ sw $v0, 0x14($sp) /* 3B4800 E00B2070 240401E4 */ addiu $a0, $zero, 0x1E4 /* 3B4804 E00B2074 24030001 */ addiu $v1, $zero, 0x1 /* 3B4808 E00B2078 0040882D */ daddu $s1, $v0, $zero /* 3B480C E00B207C 0C08012C */ jal shim_general_heap_malloc /* 3B4810 E00B2080 AE230008 */ sw $v1, 0x8($s1) /* 3B4814 E00B2084 0040182D */ daddu $v1, $v0, $zero /* 3B4818 E00B2088 14600003 */ bnez $v1, .LE00B2098 /* 3B481C E00B208C AE22000C */ sw $v0, 0xC($s1) .LE00B2090: /* 3B4820 E00B2090 0802C824 */ j .LE00B2090 /* 3B4824 E00B2094 00000000 */ nop .LE00B2098: /* 3B4828 E00B2098 AC720000 */ sw $s2, 0x0($v1) /* 3B482C E00B209C 1E000003 */ bgtz $s0, .LE00B20AC /* 3B4830 E00B20A0 AC600030 */ sw $zero, 0x30($v1) /* 3B4834 E00B20A4 0802C82E */ j .LE00B20B8 /* 3B4838 E00B20A8 240203E8 */ addiu $v0, $zero, 0x3E8 .LE00B20AC: /* 3B483C E00B20AC 16400002 */ bnez $s2, .LE00B20B8 /* 3B4840 E00B20B0 00101080 */ sll $v0, $s0, 2 /* 3B4844 E00B20B4 00101040 */ sll $v0, $s0, 1 .LE00B20B8: /* 3B4848 E00B20B8 AC62002C */ sw $v0, 0x2C($v1) /* 3B484C E00B20BC 16400003 */ bnez $s2, .LE00B20CC /* 3B4850 E00B20C0 AC700028 */ sw $s0, 0x28($v1) /* 3B4854 E00B20C4 0802C834 */ j .LE00B20D0 /* 3B4858 E00B20C8 240200C8 */ addiu $v0, $zero, 0xC8 .LE00B20CC: /* 3B485C E00B20CC 240200FF */ addiu $v0, $zero, 0xFF .LE00B20D0: /* 3B4860 E00B20D0 AC620040 */ sw $v0, 0x40($v1) /* 3B4864 E00B20D4 0000282D */ daddu $a1, $zero, $zero /* 3B4868 E00B20D8 3C014120 */ lui $at, (0x41200000 >> 16) /* 3B486C E00B20DC 44814000 */ mtc1 $at, $f8 /* 3B4870 E00B20E0 3C014000 */ lui $at, (0x40000000 >> 16) /* 3B4874 E00B20E4 44813000 */ mtc1 $at, $f6 /* 3B4878 E00B20E8 0060202D */ daddu $a0, $v1, $zero /* 3B487C E00B20EC E4740010 */ swc1 $f20, 0x10($v1) /* 3B4880 E00B20F0 E4760014 */ swc1 $f22, 0x14($v1) /* 3B4884 E00B20F4 E4780018 */ swc1 $f24, 0x18($v1) /* 3B4888 E00B20F8 C7A00060 */ lwc1 $f0, 0x60($sp) /* 3B488C E00B20FC 24060001 */ addiu $a2, $zero, 0x1 /* 3B4890 E00B2100 E460001C */ swc1 $f0, 0x1C($v1) /* 3B4894 E00B2104 C7A00064 */ lwc1 $f0, 0x64($sp) /* 3B4898 E00B2108 240200D2 */ addiu $v0, $zero, 0xD2 /* 3B489C E00B210C E4600020 */ swc1 $f0, 0x20($v1) /* 3B48A0 E00B2110 C7A00068 */ lwc1 $f0, 0x68($sp) /* 3B48A4 E00B2114 4600B086 */ mov.s $f2, $f22 /* 3B48A8 E00B2118 E4600024 */ swc1 $f0, 0x24($v1) /* 3B48AC E00B211C C7A0006C */ lwc1 $f0, 0x6C($sp) /* 3B48B0 E00B2120 4600C106 */ mov.s $f4, $f24 /* 3B48B4 E00B2124 AC620034 */ sw $v0, 0x34($v1) /* 3B48B8 E00B2128 240200E6 */ addiu $v0, $zero, 0xE6 /* 3B48BC E00B212C AC620038 */ sw $v0, 0x38($v1) /* 3B48C0 E00B2130 240200FF */ addiu $v0, $zero, 0xFF /* 3B48C4 E00B2134 AC62003C */ sw $v0, 0x3C($v1) /* 3B48C8 E00B2138 2402001E */ addiu $v0, $zero, 0x1E /* 3B48CC E00B213C AC620048 */ sw $v0, 0x48($v1) /* 3B48D0 E00B2140 240200CD */ addiu $v0, $zero, 0xCD /* 3B48D4 E00B2144 AC600044 */ sw $zero, 0x44($v1) /* 3B48D8 E00B2148 AC62004C */ sw $v0, 0x4C($v1) /* 3B48DC E00B214C AC600054 */ sw $zero, 0x54($v1) /* 3B48E0 E00B2150 E4620008 */ swc1 $f2, 0x8($v1) /* 3B48E4 E00B2154 E464000C */ swc1 $f4, 0xC($v1) /* 3B48E8 E00B2158 E4600050 */ swc1 $f0, 0x50($v1) /* 3B48EC E00B215C 4600A006 */ mov.s $f0, $f20 /* 3B48F0 E00B2160 E4600004 */ swc1 $f0, 0x4($v1) .LE00B2164: /* 3B48F4 E00B2164 E4880058 */ swc1 $f8, 0x58($a0) /* 3B48F8 E00B2168 E4860088 */ swc1 $f6, 0x88($a0) /* 3B48FC E00B216C 16400004 */ bnez $s2, .LE00B2180 /* 3B4900 E00B2170 AC8000B8 */ sw $zero, 0xB8($a0) /* 3B4904 E00B2174 24A20001 */ addiu $v0, $a1, 0x1 /* 3B4908 E00B2178 0802C861 */ j .LE00B2184 /* 3B490C E00B217C AC820178 */ sw $v0, 0x178($a0) .LE00B2180: /* 3B4910 E00B2180 AC860178 */ sw $a2, 0x178($a0) .LE00B2184: /* 3B4914 E00B2184 C4600004 */ lwc1 $f0, 0x4($v1) /* 3B4918 E00B2188 24C60005 */ addiu $a2, $a2, 0x5 /* 3B491C E00B218C E48000E8 */ swc1 $f0, 0xE8($a0) /* 3B4920 E00B2190 C4600008 */ lwc1 $f0, 0x8($v1) /* 3B4924 E00B2194 24A50001 */ addiu $a1, $a1, 0x1 /* 3B4928 E00B2198 E4800118 */ swc1 $f0, 0x118($a0) /* 3B492C E00B219C C460000C */ lwc1 $f0, 0xC($v1) /* 3B4930 E00B21A0 28A2000C */ slti $v0, $a1, 0xC /* 3B4934 E00B21A4 AC8001A8 */ sw $zero, 0x1A8($a0) /* 3B4938 E00B21A8 E4800148 */ swc1 $f0, 0x148($a0) /* 3B493C E00B21AC 1440FFED */ bnez $v0, .LE00B2164 /* 3B4940 E00B21B0 24840004 */ addiu $a0, $a0, 0x4 /* 3B4944 E00B21B4 0220102D */ daddu $v0, $s1, $zero /* 3B4948 E00B21B8 8FBF0034 */ lw $ra, 0x34($sp) /* 3B494C E00B21BC 8FB20030 */ lw $s2, 0x30($sp) /* 3B4950 E00B21C0 8FB1002C */ lw $s1, 0x2C($sp) /* 3B4954 E00B21C4 8FB00028 */ lw $s0, 0x28($sp) /* 3B4958 E00B21C8 D7B80048 */ ldc1 $f24, 0x48($sp) /* 3B495C E00B21CC D7B60040 */ ldc1 $f22, 0x40($sp) /* 3B4960 E00B21D0 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3B4964 E00B21D4 03E00008 */ jr $ra /* 3B4968 E00B21D8 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: EffectInstance* squirt_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, s32 arg8) { EffectBlueprint bp; EffectInstance* effect; SquirtFXData* data; s32 numParts = 1; s32 i; bp.init = squirt_init; bp.update = squirt_update; bp.renderWorld = squirt_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_SQUIRT; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.squirt = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.squirt != NULL); data->unk_00 = arg0; data->unk_30 = 0; if (arg8 <= 0) { data->unk_2C = 1000; } else if (arg0 == 0) { data->unk_2C = arg8 * 2; } else { data->unk_2C = arg8 * 4; } data->unk_28 = arg8; if (arg0 == 0) { data->unk_40 = 200; } else { data->unk_40 = 255; } data->unk_10 = arg1; data->unk_14 = arg2; data->unk_18 = arg3; data->unk_04 = data->unk_10; data->unk_08 = data->unk_14; data->unk_0C = data->unk_18; data->unk_1C = arg4; data->unk_20 = arg5; data->unk_24 = arg6; data->unk_50 = arg7; data->unk_34 = 210; data->unk_38 = 230; data->unk_3C = 255; data->unk_44 = 0; data->unk_48 = 30; data->unk_4C = 205; data->unk_54 = 0; for (i = 0; i < 12; i++) { data->unk_58[i] = 10.0f; data->unk_88[i] = 2.0f; data->unk_B8[i] = 0; if (arg0 == 0) { data->unk_178[i] = i + 1; } else { data->unk_178[i] = i * 5 + 1; } data->unk_E8[i] = data->unk_04; data->unk_118[i] = data->unk_08; data->unk_148[i] = data->unk_0C; data->unk_1A8[i] = 0; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel chapter_change_appendGfx /* 3EBA38 E010E558 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 3EBA3C E010E55C 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3EBA40 E010E560 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 3EBA44 E010E564 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 3EBA48 E010E568 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3EBA4C E010E56C AFBF0024 */ sw $ra, 0x24($sp) /* 3EBA50 E010E570 AFB20020 */ sw $s2, 0x20($sp) /* 3EBA54 E010E574 AFB1001C */ sw $s1, 0x1C($sp) /* 3EBA58 E010E578 AFB00018 */ sw $s0, 0x18($sp) /* 3EBA5C E010E57C 8CC50000 */ lw $a1, 0x0($a2) /* 3EBA60 E010E580 8C90000C */ lw $s0, 0xC($a0) /* 3EBA64 E010E584 00A0182D */ daddu $v1, $a1, $zero /* 3EBA68 E010E588 24A50008 */ addiu $a1, $a1, 0x8 /* 3EBA6C E010E58C ACC50000 */ sw $a1, 0x0($a2) /* 3EBA70 E010E590 8E0B002C */ lw $t3, 0x2C($s0) /* 3EBA74 E010E594 8E080000 */ lw $t0, 0x0($s0) /* 3EBA78 E010E598 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3EBA7C E010E59C AC620000 */ sw $v0, 0x0($v1) /* 3EBA80 E010E5A0 AC600004 */ sw $zero, 0x4($v1) /* 3EBA84 E010E5A4 ACA70000 */ sw $a3, 0x0($a1) /* 3EBA88 E010E5A8 8C830010 */ lw $v1, 0x10($a0) /* 3EBA8C E010E5AC 24A20008 */ addiu $v0, $a1, 0x8 /* 3EBA90 E010E5B0 ACC20000 */ sw $v0, 0x0($a2) /* 3EBA94 E010E5B4 8C62001C */ lw $v0, 0x1C($v1) /* 3EBA98 E010E5B8 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3EBA9C E010E5BC 00431021 */ addu $v0, $v0, $v1 /* 3EBAA0 E010E5C0 ACA20004 */ sw $v0, 0x4($a1) /* 3EBAA4 E010E5C4 2D020013 */ sltiu $v0, $t0, 0x13 /* 3EBAA8 E010E5C8 1040001A */ beqz $v0, .LE010E634 /* 3EBAAC E010E5CC 00081080 */ sll $v0, $t0, 2 /* 3EBAB0 E010E5D0 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3EBAB4 E010E5D4 00220821 */ addu $at, $at, $v0 /* 3EBAB8 E010E5D8 8C22E930 */ lw $v0, -0x16D0($at) /* 3EBABC E010E5DC 00400008 */ jr $v0 /* 3EBAC0 E010E5E0 00000000 */ nop /* 3EBAC4 E010E5E4 3C06E011 */ lui $a2, %hi(D_E010E7FC) /* 3EBAC8 E010E5E8 24C6E7FC */ addiu $a2, $a2, %lo(D_E010E7FC) /* 3EBACC E010E5EC 3C04E011 */ lui $a0, %hi(D_E010E868) /* 3EBAD0 E010E5F0 2484E868 */ addiu $a0, $a0, %lo(D_E010E868) /* 3EBAD4 E010E5F4 2503FFFF */ addiu $v1, $t0, -0x1 /* 3EBAD8 E010E5F8 00031040 */ sll $v0, $v1, 1 /* 3EBADC E010E5FC 00431021 */ addu $v0, $v0, $v1 /* 3EBAE0 E010E600 000210C0 */ sll $v0, $v0, 3 /* 3EBAE4 E010E604 0804398F */ j .LE010E63C /* 3EBAE8 E010E608 00448821 */ addu $s1, $v0, $a0 /* 3EBAEC E010E60C 3C06E011 */ lui $a2, %hi(D_E010E7D8) /* 3EBAF0 E010E610 24C6E7D8 */ addiu $a2, $a2, %lo(D_E010E7D8) /* 3EBAF4 E010E614 0804398F */ j .LE010E63C /* 3EBAF8 E010E618 0000882D */ daddu $s1, $zero, $zero /* 3EBAFC E010E61C 3C06E011 */ lui $a2, %hi(D_E010E79C) /* 3EBB00 E010E620 24C6E79C */ addiu $a2, $a2, %lo(D_E010E79C) /* 3EBB04 E010E624 3C11E011 */ lui $s1, %hi(D_E010E838) /* 3EBB08 E010E628 2631E838 */ addiu $s1, $s1, %lo(D_E010E838) /* 3EBB0C E010E62C 08043990 */ j .LE010E640 /* 3EBB10 E010E630 0200202D */ daddu $a0, $s0, $zero .LE010E634: /* 3EBB14 E010E634 0000882D */ daddu $s1, $zero, $zero /* 3EBB18 E010E638 0220302D */ daddu $a2, $s1, $zero .LE010E63C: /* 3EBB1C E010E63C 0200202D */ daddu $a0, $s0, $zero .LE010E640: /* 3EBB20 E010E640 0000282D */ daddu $a1, $zero, $zero /* 3EBB24 E010E644 3C12800A */ lui $s2, %hi(gMainGfxPos) /* 3EBB28 E010E648 2652A66C */ addiu $s2, $s2, %lo(gMainGfxPos) /* 3EBB2C E010E64C 8E490000 */ lw $t1, 0x0($s2) /* 3EBB30 E010E650 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 3EBB34 E010E654 0120502D */ daddu $t2, $t1, $zero /* 3EBB38 E010E658 25290008 */ addiu $t1, $t1, 0x8 /* 3EBB3C E010E65C AE490000 */ sw $t1, 0x0($s2) /* 3EBB40 E010E660 AD420000 */ sw $v0, 0x0($t2) /* 3EBB44 E010E664 92020023 */ lbu $v0, 0x23($s0) /* 3EBB48 E010E668 92070027 */ lbu $a3, 0x27($s0) /* 3EBB4C E010E66C 9208002B */ lbu $t0, 0x2B($s0) /* 3EBB50 E010E670 25230008 */ addiu $v1, $t1, 0x8 /* 3EBB54 E010E674 AE430000 */ sw $v1, 0x0($s2) /* 3EBB58 E010E678 316300FF */ andi $v1, $t3, 0xFF /* 3EBB5C E010E67C 00021600 */ sll $v0, $v0, 24 /* 3EBB60 E010E680 00073C00 */ sll $a3, $a3, 16 /* 3EBB64 E010E684 00471025 */ or $v0, $v0, $a3 /* 3EBB68 E010E688 00084200 */ sll $t0, $t0, 8 /* 3EBB6C E010E68C 00481025 */ or $v0, $v0, $t0 /* 3EBB70 E010E690 00431025 */ or $v0, $v0, $v1 /* 3EBB74 E010E694 AD420004 */ sw $v0, 0x4($t2) /* 3EBB78 E010E698 3C02FB00 */ lui $v0, (0xFB000000 >> 16) /* 3EBB7C E010E69C AD220000 */ sw $v0, 0x0($t1) /* 3EBB80 E010E6A0 92020033 */ lbu $v0, 0x33($s0) /* 3EBB84 E010E6A4 92030037 */ lbu $v1, 0x37($s0) /* 3EBB88 E010E6A8 9207003B */ lbu $a3, 0x3B($s0) /* 3EBB8C E010E6AC 00021600 */ sll $v0, $v0, 24 /* 3EBB90 E010E6B0 00031C00 */ sll $v1, $v1, 16 /* 3EBB94 E010E6B4 00431025 */ or $v0, $v0, $v1 /* 3EBB98 E010E6B8 00073A00 */ sll $a3, $a3, 8 /* 3EBB9C E010E6BC 9203003F */ lbu $v1, 0x3F($s0) /* 3EBBA0 E010E6C0 00471025 */ or $v0, $v0, $a3 /* 3EBBA4 E010E6C4 00431025 */ or $v0, $v0, $v1 /* 3EBBA8 E010E6C8 0C043800 */ jal func_E010E000 /* 3EBBAC E010E6CC AD220004 */ sw $v0, 0x4($t1) /* 3EBBB0 E010E6D0 0200202D */ daddu $a0, $s0, $zero /* 3EBBB4 E010E6D4 24050001 */ addiu $a1, $zero, 0x1 /* 3EBBB8 E010E6D8 0C043800 */ jal func_E010E000 /* 3EBBBC E010E6DC 0220302D */ daddu $a2, $s1, $zero /* 3EBBC0 E010E6E0 8E020054 */ lw $v0, 0x54($s0) /* 3EBBC4 E010E6E4 0440000A */ bltz $v0, .LE010E710 /* 3EBBC8 E010E6E8 24020015 */ addiu $v0, $zero, 0x15 /* 3EBBCC E010E6EC 8E030040 */ lw $v1, 0x40($s0) /* 3EBBD0 E010E6F0 8E050048 */ lw $a1, 0x48($s0) /* 3EBBD4 E010E6F4 240700FF */ addiu $a3, $zero, 0xFF /* 3EBBD8 E010E6F8 AFA20010 */ sw $v0, 0x10($sp) /* 3EBBDC E010E6FC AFA00014 */ sw $zero, 0x14($sp) /* 3EBBE0 E010E700 8E040054 */ lw $a0, 0x54($s0) /* 3EBBE4 E010E704 8E060044 */ lw $a2, 0x44($s0) /* 3EBBE8 E010E708 0C080194 */ jal shim_draw_msg /* 3EBBEC E010E70C 00652823 */ subu $a1, $v1, $a1 .LE010E710: /* 3EBBF0 E010E710 8E420000 */ lw $v0, 0x0($s2) /* 3EBBF4 E010E714 0040182D */ daddu $v1, $v0, $zero /* 3EBBF8 E010E718 24420008 */ addiu $v0, $v0, 0x8 /* 3EBBFC E010E71C AE420000 */ sw $v0, 0x0($s2) /* 3EBC00 E010E720 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3EBC04 E010E724 AC620000 */ sw $v0, 0x0($v1) /* 3EBC08 E010E728 AC600004 */ sw $zero, 0x4($v1) /* 3EBC0C E010E72C 8FBF0024 */ lw $ra, 0x24($sp) /* 3EBC10 E010E730 8FB20020 */ lw $s2, 0x20($sp) /* 3EBC14 E010E734 8FB1001C */ lw $s1, 0x1C($sp) /* 3EBC18 E010E738 8FB00018 */ lw $s0, 0x18($sp) /* 3EBC1C E010E73C 03E00008 */ jr $ra /* 3EBC20 E010E740 27BD0028 */ addiu $sp, $sp, 0x28 /* 3EBC24 E010E744 00000000 */ nop /* 3EBC28 E010E748 00000000 */ nop /* 3EBC2C E010E74C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void chapter_change_appendGfx(void* effect) { ChapterChangeFXData* data = ((EffectInstance*)effect)->data.chapterChange; s32 unk_2C = data->unk_2C; u32 unk_00 = data->unk_00; UnkStruct* ptr0; UnkStruct* ptr1; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); switch (unk_00) { case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: ptr0 = D_E010E7FC; ptr1 = &D_E010E868[(unk_00 - 1) * 2]; break; case 9: ptr0 = D_E010E7D8; ptr1 = NULL; break; case 0: case 10: case 11: case 12: case 13: case 14: case 15: case 16: case 17: case 18: ptr0 = D_E010E79C; ptr1 = D_E010E838; break; default: ptr1 = NULL; ptr0 = NULL; break; } gDPSetPrimColor(gMainGfxPos++, 0, 0, data->unk_20, data->unk_24, data->unk_28, unk_2C); gDPSetEnvColor(gMainGfxPos++, data->unk_30, data->unk_34, data->unk_38, data->unk_3C); func_E010E000(data, 0, ptr0); func_E010E000(data, 1, ptr1); if (data->unk_54 >= 0) { shim_draw_msg(data->unk_54, data->unk_40 - data->unk_48, data->unk_44, 255, 21, 0); } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel music_note_main /* 359F20 E004C000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 359F24 E004C004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 359F28 E004C008 4485A000 */ mtc1 $a1, $f20 /* 359F2C E004C00C AFB1002C */ sw $s1, 0x2C($sp) /* 359F30 E004C010 0080882D */ daddu $s1, $a0, $zero /* 359F34 E004C014 F7B60040 */ sdc1 $f22, 0x40($sp) /* 359F38 E004C018 4486B000 */ mtc1 $a2, $f22 /* 359F3C E004C01C 27A40010 */ addiu $a0, $sp, 0x10 /* 359F40 E004C020 F7B80048 */ sdc1 $f24, 0x48($sp) /* 359F44 E004C024 4487C000 */ mtc1 $a3, $f24 /* 359F48 E004C028 3C02E005 */ lui $v0, %hi(music_note_init) /* 359F4C E004C02C 2442C204 */ addiu $v0, $v0, %lo(music_note_init) /* 359F50 E004C030 AFA20018 */ sw $v0, 0x18($sp) /* 359F54 E004C034 3C02E005 */ lui $v0, %hi(music_note_update) /* 359F58 E004C038 2442C20C */ addiu $v0, $v0, %lo(music_note_update) /* 359F5C E004C03C AFA2001C */ sw $v0, 0x1C($sp) /* 359F60 E004C040 3C02E005 */ lui $v0, %hi(music_note_render) /* 359F64 E004C044 2442C364 */ addiu $v0, $v0, %lo(music_note_render) /* 359F68 E004C048 AFA20020 */ sw $v0, 0x20($sp) /* 359F6C E004C04C 24020026 */ addiu $v0, $zero, 0x26 /* 359F70 E004C050 AFBF0030 */ sw $ra, 0x30($sp) /* 359F74 E004C054 AFB00028 */ sw $s0, 0x28($sp) /* 359F78 E004C058 AFA00010 */ sw $zero, 0x10($sp) /* 359F7C E004C05C AFA00024 */ sw $zero, 0x24($sp) /* 359F80 E004C060 0C080124 */ jal shim_create_effect_instance /* 359F84 E004C064 AFA20014 */ sw $v0, 0x14($sp) /* 359F88 E004C068 24040034 */ addiu $a0, $zero, 0x34 /* 359F8C E004C06C 24030001 */ addiu $v1, $zero, 0x1 /* 359F90 E004C070 0040802D */ daddu $s0, $v0, $zero /* 359F94 E004C074 0C08012C */ jal shim_general_heap_malloc /* 359F98 E004C078 AE030008 */ sw $v1, 0x8($s0) /* 359F9C E004C07C AE02000C */ sw $v0, 0xC($s0) /* 359FA0 E004C080 0040802D */ daddu $s0, $v0, $zero /* 359FA4 E004C084 16000003 */ bnez $s0, .LE004C094 /* 359FA8 E004C088 24040006 */ addiu $a0, $zero, 0x6 .LE004C08C: /* 359FAC E004C08C 08013023 */ j .LE004C08C /* 359FB0 E004C090 00000000 */ nop .LE004C094: /* 359FB4 E004C094 24020040 */ addiu $v0, $zero, 0x40 /* 359FB8 E004C098 AE110000 */ sw $s1, 0x0($s0) /* 359FBC E004C09C E6140004 */ swc1 $f20, 0x4($s0) /* 359FC0 E004C0A0 E6160008 */ swc1 $f22, 0x8($s0) /* 359FC4 E004C0A4 E618000C */ swc1 $f24, 0xC($s0) /* 359FC8 E004C0A8 AE000010 */ sw $zero, 0x10($s0) /* 359FCC E004C0AC AE020018 */ sw $v0, 0x18($s0) /* 359FD0 E004C0B0 AE000014 */ sw $zero, 0x14($s0) /* 359FD4 E004C0B4 0C080138 */ jal shim_rand_int /* 359FD8 E004C0B8 AE00001C */ sw $zero, 0x1C($s0) /* 359FDC E004C0BC 12200006 */ beqz $s1, .LE004C0D8 /* 359FE0 E004C0C0 AE020020 */ sw $v0, 0x20($s0) /* 359FE4 E004C0C4 24020001 */ addiu $v0, $zero, 0x1 /* 359FE8 E004C0C8 1222000A */ beq $s1, $v0, .LE004C0F4 /* 359FEC E004C0CC 00000000 */ nop /* 359FF0 E004C0D0 08013059 */ j .LE004C164 /* 359FF4 E004C0D4 00000000 */ nop .LE004C0D8: /* 359FF8 E004C0D8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 359FFC E004C0DC 44810000 */ mtc1 $at, $f0 /* 35A000 E004C0E0 AE000024 */ sw $zero, 0x24($s0) /* 35A004 E004C0E4 AE00002C */ sw $zero, 0x2C($s0) /* 35A008 E004C0E8 E6000028 */ swc1 $f0, 0x28($s0) /* 35A00C E004C0EC 08013079 */ j .LE004C1E4 /* 35A010 E004C0F0 E6000030 */ swc1 $f0, 0x30($s0) .LE004C0F4: /* 35A014 E004C0F4 0C080138 */ jal shim_rand_int /* 35A018 E004C0F8 2404000A */ addiu $a0, $zero, 0xA /* 35A01C E004C0FC 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 35A020 E004C100 D434C6A0 */ ldc1 $f20, -0x3960($at) /* 35A024 E004C104 44820000 */ mtc1 $v0, $f0 /* 35A028 E004C108 00000000 */ nop /* 35A02C E004C10C 46800021 */ cvt.d.w $f0, $f0 /* 35A030 E004C110 46340002 */ mul.d $f0, $f0, $f20 /* 35A034 E004C114 00000000 */ nop /* 35A038 E004C118 3C01C014 */ lui $at, (0xC0140000 >> 16) /* 35A03C E004C11C 44811800 */ mtc1 $at, $f3 /* 35A040 E004C120 44801000 */ mtc1 $zero, $f2 /* 35A044 E004C124 00000000 */ nop /* 35A048 E004C128 46220000 */ add.d $f0, $f0, $f2 /* 35A04C E004C12C 2404000A */ addiu $a0, $zero, 0xA /* 35A050 E004C130 46200020 */ cvt.s.d $f0, $f0 /* 35A054 E004C134 0C080138 */ jal shim_rand_int /* 35A058 E004C138 E6000024 */ swc1 $f0, 0x24($s0) /* 35A05C E004C13C 44820000 */ mtc1 $v0, $f0 /* 35A060 E004C140 00000000 */ nop /* 35A064 E004C144 46800021 */ cvt.d.w $f0, $f0 /* 35A068 E004C148 46340002 */ mul.d $f0, $f0, $f20 /* 35A06C E004C14C 00000000 */ nop /* 35A070 E004C150 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 35A074 E004C154 44811800 */ mtc1 $at, $f3 /* 35A078 E004C158 44801000 */ mtc1 $zero, $f2 /* 35A07C E004C15C 08013075 */ j .LE004C1D4 /* 35A080 E004C160 46220000 */ add.d $f0, $f0, $f2 .LE004C164: /* 35A084 E004C164 0C080138 */ jal shim_rand_int /* 35A088 E004C168 2404000A */ addiu $a0, $zero, 0xA /* 35A08C E004C16C 3C01E005 */ lui $at, (0xE0050000 >> 16) /* 35A090 E004C170 D434C6A8 */ ldc1 $f20, -0x3958($at) /* 35A094 E004C174 44821000 */ mtc1 $v0, $f2 /* 35A098 E004C178 00000000 */ nop /* 35A09C E004C17C 468010A1 */ cvt.d.w $f2, $f2 /* 35A0A0 E004C180 46341082 */ mul.d $f2, $f2, $f20 /* 35A0A4 E004C184 00000000 */ nop /* 35A0A8 E004C188 3C014014 */ lui $at, (0x40140000 >> 16) /* 35A0AC E004C18C 44810800 */ mtc1 $at, $f1 /* 35A0B0 E004C190 44800000 */ mtc1 $zero, $f0 /* 35A0B4 E004C194 00000000 */ nop /* 35A0B8 E004C198 46220001 */ sub.d $f0, $f0, $f2 /* 35A0BC E004C19C 2404000A */ addiu $a0, $zero, 0xA /* 35A0C0 E004C1A0 46200020 */ cvt.s.d $f0, $f0 /* 35A0C4 E004C1A4 0C080138 */ jal shim_rand_int /* 35A0C8 E004C1A8 E6000024 */ swc1 $f0, 0x24($s0) /* 35A0CC E004C1AC 44820000 */ mtc1 $v0, $f0 /* 35A0D0 E004C1B0 00000000 */ nop /* 35A0D4 E004C1B4 46800021 */ cvt.d.w $f0, $f0 /* 35A0D8 E004C1B8 46340002 */ mul.d $f0, $f0, $f20 /* 35A0DC E004C1BC 00000000 */ nop /* 35A0E0 E004C1C0 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 35A0E4 E004C1C4 44811800 */ mtc1 $at, $f3 /* 35A0E8 E004C1C8 44801000 */ mtc1 $zero, $f2 /* 35A0EC E004C1CC 00000000 */ nop /* 35A0F0 E004C1D0 46220000 */ add.d $f0, $f0, $f2 .LE004C1D4: /* 35A0F4 E004C1D4 AE00002C */ sw $zero, 0x2C($s0) /* 35A0F8 E004C1D8 AE000030 */ sw $zero, 0x30($s0) /* 35A0FC E004C1DC 46200020 */ cvt.s.d $f0, $f0 /* 35A100 E004C1E0 E6000028 */ swc1 $f0, 0x28($s0) .LE004C1E4: /* 35A104 E004C1E4 8FBF0030 */ lw $ra, 0x30($sp) /* 35A108 E004C1E8 8FB1002C */ lw $s1, 0x2C($sp) /* 35A10C E004C1EC 8FB00028 */ lw $s0, 0x28($sp) /* 35A110 E004C1F0 D7B80048 */ ldc1 $f24, 0x48($sp) /* 35A114 E004C1F4 D7B60040 */ ldc1 $f22, 0x40($sp) /* 35A118 E004C1F8 D7B40038 */ ldc1 $f20, 0x38($sp) /* 35A11C E004C1FC 03E00008 */ jr $ra /* 35A120 E004C200 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void music_note_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; MusicNoteFXData* part; s32 numParts = 1; s32 randInt; bp.unk_00 = 0; bp.init = music_note_init; bp.update = music_note_update; bp.renderWorld = music_note_render; bp.renderUI = NULL; bp.effectID = EFFECT_MUSIC_NOTE; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.musicNote = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.musicNote != NULL); part->unk_00 = arg0; part->pos.x = arg1; part->pos.y = arg2; part->pos.z = arg3; part->unk_10 = 0; part->timeLeft = 0x40; part->unk_14 = 0; part->unk_1C = 0; part->unk_20 = shim_rand_int(6); switch (arg0) { case 0: part->unk_24 = 0.0f; part->unk_28 = 1.0f; part->unk_2C = 0; part->unk_30 = 1.0f; break; case 1: randInt = shim_rand_int(10); part->unk_24 = (randInt * 0.1) + -5.0; part->unk_28 = (shim_rand_int(10) * 0.1) + 0.5; part->unk_2C = 0; part->unk_30 = 0.0f; break; default: randInt = shim_rand_int(10); part->unk_24 = 5.0 - (randInt * 0.1); part->unk_28 = (shim_rand_int(10) * 0.1) + 1.0; part->unk_2C = 0; part->unk_30 = 0.0f; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel confetti_update /* 38B398 E00885A8 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 38B39C E00885AC AFBF0028 */ sw $ra, 0x28($sp) /* 38B3A0 E00885B0 AFB50024 */ sw $s5, 0x24($sp) /* 38B3A4 E00885B4 AFB40020 */ sw $s4, 0x20($sp) /* 38B3A8 E00885B8 AFB3001C */ sw $s3, 0x1C($sp) /* 38B3AC E00885BC AFB20018 */ sw $s2, 0x18($sp) /* 38B3B0 E00885C0 AFB10014 */ sw $s1, 0x14($sp) /* 38B3B4 E00885C4 AFB00010 */ sw $s0, 0x10($sp) /* 38B3B8 E00885C8 F7B40030 */ sdc1 $f20, 0x30($sp) /* 38B3BC E00885CC 8C91000C */ lw $s1, 0xC($a0) /* 38B3C0 E00885D0 8E220020 */ lw $v0, 0x20($s1) /* 38B3C4 E00885D4 2442FFFF */ addiu $v0, $v0, -0x1 /* 38B3C8 E00885D8 04410005 */ bgez $v0, .LE00885F0 /* 38B3CC E00885DC AE220020 */ sw $v0, 0x20($s1) /* 38B3D0 E00885E0 0C080128 */ jal shim_remove_effect /* 38B3D4 E00885E4 00000000 */ nop /* 38B3D8 E00885E8 080221E0 */ j .LE0088780 /* 38B3DC E00885EC 00000000 */ nop .LE00885F0: /* 38B3E0 E00885F0 3C030004 */ lui $v1, (0x4F1A0 >> 16) /* 38B3E4 E00885F4 8E220024 */ lw $v0, 0x24($s1) /* 38B3E8 E00885F8 3463F1A0 */ ori $v1, $v1, (0x4F1A0 & 0xFFFF) /* 38B3EC E00885FC 24420001 */ addiu $v0, $v0, 0x1 /* 38B3F0 E0088600 0062182A */ slt $v1, $v1, $v0 /* 38B3F4 E0088604 10600003 */ beqz $v1, .LE0088614 /* 38B3F8 E0088608 AE220024 */ sw $v0, 0x24($s1) /* 38B3FC E008860C 2402000A */ addiu $v0, $zero, 0xA /* 38B400 E0088610 AE220024 */ sw $v0, 0x24($s1) .LE0088614: /* 38B404 E0088614 8E230020 */ lw $v1, 0x20($s1) /* 38B408 E0088618 8E350024 */ lw $s5, 0x24($s1) /* 38B40C E008861C 8E330000 */ lw $s3, 0x0($s1) /* 38B410 E0088620 8E34002C */ lw $s4, 0x2C($s1) /* 38B414 E0088624 2862000A */ slti $v0, $v1, 0xA /* 38B418 E0088628 10400005 */ beqz $v0, .LE0088640 /* 38B41C E008862C 00031040 */ sll $v0, $v1, 1 /* 38B420 E0088630 00431021 */ addu $v0, $v0, $v1 /* 38B424 E0088634 000210C0 */ sll $v0, $v0, 3 /* 38B428 E0088638 00431021 */ addu $v0, $v0, $v1 /* 38B42C E008863C AE220028 */ sw $v0, 0x28($s1) .LE0088640: /* 38B430 E0088640 26310034 */ addiu $s1, $s1, 0x34 /* 38B434 E0088644 1A80004E */ blez $s4, .LE0088780 /* 38B438 E0088648 0000902D */ daddu $s2, $zero, $zero /* 38B43C E008864C 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38B440 E0088650 D4348DA0 */ ldc1 $f20, -0x7260($at) /* 38B444 E0088654 2630000C */ addiu $s0, $s1, 0xC .LE0088658: /* 38B448 E0088658 24020003 */ addiu $v0, $zero, 0x3 /* 38B44C E008865C 16620010 */ bne $s3, $v0, .LE00886A0 /* 38B450 E0088660 00000000 */ nop /* 38B454 E0088664 8E020024 */ lw $v0, 0x24($s0) /* 38B458 E0088668 18400003 */ blez $v0, .LE0088678 /* 38B45C E008866C 2442FFFF */ addiu $v0, $v0, -0x1 /* 38B460 E0088670 1C40003E */ bgtz $v0, .LE008876C /* 38B464 E0088674 AE020024 */ sw $v0, 0x24($s0) .LE0088678: /* 38B468 E0088678 8E020014 */ lw $v0, 0x14($s0) /* 38B46C E008867C 2442FFFF */ addiu $v0, $v0, -0x1 /* 38B470 E0088680 0441002E */ bgez $v0, .LE008873C /* 38B474 E0088684 AE020014 */ sw $v0, 0x14($s0) /* 38B478 E0088688 0C022000 */ jal func_E0088000 /* 38B47C E008868C 0220202D */ daddu $a0, $s1, $zero /* 38B480 E0088690 8E020014 */ lw $v0, 0x14($s0) /* 38B484 E0088694 2442FFFF */ addiu $v0, $v0, -0x1 /* 38B488 E0088698 080221CF */ j .LE008873C /* 38B48C E008869C AE020014 */ sw $v0, 0x14($s0) .LE00886A0: /* 38B490 E00886A0 8E020024 */ lw $v0, 0x24($s0) /* 38B494 E00886A4 18400003 */ blez $v0, .LE00886B4 /* 38B498 E00886A8 2442FFFF */ addiu $v0, $v0, -0x1 /* 38B49C E00886AC 1C40002F */ bgtz $v0, .LE008876C /* 38B4A0 E00886B0 AE020024 */ sw $v0, 0x24($s0) .LE00886B4: /* 38B4A4 E00886B4 2A620004 */ slti $v0, $s3, 0x4 /* 38B4A8 E00886B8 14400020 */ bnez $v0, .LE008873C /* 38B4AC E00886BC 2AA20006 */ slti $v0, $s5, 0x6 /* 38B4B0 E00886C0 C6040004 */ lwc1 $f4, 0x4($s0) /* 38B4B4 E00886C4 46002121 */ cvt.d.s $f4, $f4 /* 38B4B8 E00886C8 46342102 */ mul.d $f4, $f4, $f20 /* 38B4BC E00886CC 00000000 */ nop /* 38B4C0 E00886D0 C6020008 */ lwc1 $f2, 0x8($s0) /* 38B4C4 E00886D4 460010A1 */ cvt.d.s $f2, $f2 /* 38B4C8 E00886D8 46341082 */ mul.d $f2, $f2, $f20 /* 38B4CC E00886DC 00000000 */ nop /* 38B4D0 E00886E0 C600000C */ lwc1 $f0, 0xC($s0) /* 38B4D4 E00886E4 46000021 */ cvt.d.s $f0, $f0 /* 38B4D8 E00886E8 46340002 */ mul.d $f0, $f0, $f20 /* 38B4DC E00886EC 00000000 */ nop /* 38B4E0 E00886F0 46202120 */ cvt.s.d $f4, $f4 /* 38B4E4 E00886F4 462010A0 */ cvt.s.d $f2, $f2 /* 38B4E8 E00886F8 46200020 */ cvt.s.d $f0, $f0 /* 38B4EC E00886FC E6040004 */ swc1 $f4, 0x4($s0) /* 38B4F0 E0088700 E6020008 */ swc1 $f2, 0x8($s0) /* 38B4F4 E0088704 1440000D */ bnez $v0, .LE008873C /* 38B4F8 E0088708 E600000C */ swc1 $f0, 0xC($s0) /* 38B4FC E008870C 46001106 */ mov.s $f4, $f2 /* 38B500 E0088710 3C01BFE0 */ lui $at, (0xBFE00000 >> 16) /* 38B504 E0088714 44811800 */ mtc1 $at, $f3 /* 38B508 E0088718 44801000 */ mtc1 $zero, $f2 /* 38B50C E008871C 46002021 */ cvt.d.s $f0, $f4 /* 38B510 E0088720 4620103C */ c.lt.d $f2, $f0 /* 38B514 E0088724 00000000 */ nop /* 38B518 E0088728 45000004 */ bc1f .LE008873C /* 38B51C E008872C 00000000 */ nop /* 38B520 E0088730 C6000010 */ lwc1 $f0, 0x10($s0) /* 38B524 E0088734 46002000 */ add.s $f0, $f4, $f0 /* 38B528 E0088738 E6000008 */ swc1 $f0, 0x8($s0) .LE008873C: /* 38B52C E008873C C606FFF8 */ lwc1 $f6, -0x8($s0) /* 38B530 E0088740 C6000004 */ lwc1 $f0, 0x4($s0) /* 38B534 E0088744 C604FFFC */ lwc1 $f4, -0x4($s0) /* 38B538 E0088748 46003180 */ add.s $f6, $f6, $f0 /* 38B53C E008874C C6000008 */ lwc1 $f0, 0x8($s0) /* 38B540 E0088750 C6020000 */ lwc1 $f2, 0x0($s0) /* 38B544 E0088754 46002100 */ add.s $f4, $f4, $f0 /* 38B548 E0088758 C600000C */ lwc1 $f0, 0xC($s0) /* 38B54C E008875C 46001080 */ add.s $f2, $f2, $f0 /* 38B550 E0088760 E606FFF8 */ swc1 $f6, -0x8($s0) /* 38B554 E0088764 E604FFFC */ swc1 $f4, -0x4($s0) /* 38B558 E0088768 E6020000 */ swc1 $f2, 0x0($s0) .LE008876C: /* 38B55C E008876C 26520001 */ addiu $s2, $s2, 0x1 /* 38B560 E0088770 26100034 */ addiu $s0, $s0, 0x34 /* 38B564 E0088774 0254102A */ slt $v0, $s2, $s4 /* 38B568 E0088778 1440FFB7 */ bnez $v0, .LE0088658 /* 38B56C E008877C 26310034 */ addiu $s1, $s1, 0x34 .LE0088780: /* 38B570 E0088780 8FBF0028 */ lw $ra, 0x28($sp) /* 38B574 E0088784 8FB50024 */ lw $s5, 0x24($sp) /* 38B578 E0088788 8FB40020 */ lw $s4, 0x20($sp) /* 38B57C E008878C 8FB3001C */ lw $s3, 0x1C($sp) /* 38B580 E0088790 8FB20018 */ lw $s2, 0x18($sp) /* 38B584 E0088794 8FB10014 */ lw $s1, 0x14($sp) /* 38B588 E0088798 8FB00010 */ lw $s0, 0x10($sp) /* 38B58C E008879C D7B40030 */ ldc1 $f20, 0x30($sp) /* 38B590 E00887A0 03E00008 */ jr $ra /* 38B594 E00887A4 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void confetti_update(EffectInstance* effect) { ConfettiFXData* part = effect->data.confetti; s32 unk_00; s32 unk_24; s32 unk_2C; s32 i; part->unk_20--; if (part->unk_20 < 0) { shim_remove_effect(effect); return; } part->unk_24++; if (part->unk_24 > 324000) { part->unk_24 = 10; } unk_24 = part->unk_24; unk_00 = part->unk_00; unk_2C = part->unk_2C; if (part->unk_20 < 10) { part->unk_28 = part->unk_20 * 25; } part++; for (i = 0; i < unk_2C; i++, part++) { if (unk_00 == 3) { if (part->unk_30 <= 0 || --part->unk_30 <= 0) { part->unk_20--; if (part->unk_20 < 0) { func_E0088000(part); part->unk_20--; } part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; part->unk_0C += part->unk_18; } } else { if (part->unk_30 <= 0 || --part->unk_30 <= 0) { if (unk_00 >= 4) { part->unk_10 *= 0.98; part->unk_14 *= 0.98; part->unk_18 *= 0.98; if (unk_24 >= 6 && part->unk_14 > -0.5) { part->unk_14 += part->unk_1C; } } part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; part->unk_0C += part->unk_18; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E00826C4 /* 385D04 E00826C4 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 385D08 E00826C8 AFB1009C */ sw $s1, 0x9C($sp) /* 385D0C E00826CC 0080882D */ daddu $s1, $a0, $zero /* 385D10 E00826D0 27A40018 */ addiu $a0, $sp, 0x18 /* 385D14 E00826D4 AFB300A4 */ sw $s3, 0xA4($sp) /* 385D18 E00826D8 3C130001 */ lui $s3, (0x11630 >> 16) /* 385D1C E00826DC AFBF00A8 */ sw $ra, 0xA8($sp) /* 385D20 E00826E0 AFB200A0 */ sw $s2, 0xA0($sp) /* 385D24 E00826E4 AFB00098 */ sw $s0, 0x98($sp) /* 385D28 E00826E8 F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 385D2C E00826EC 8E250008 */ lw $a1, 0x8($s1) /* 385D30 E00826F0 8E26000C */ lw $a2, 0xC($s1) /* 385D34 E00826F4 8E270010 */ lw $a3, 0x10($s1) /* 385D38 E00826F8 0C080108 */ jal shim_guTranslateF /* 385D3C E00826FC 36731630 */ ori $s3, $s3, (0x11630 & 0xFFFF) /* 385D40 E0082700 27B00058 */ addiu $s0, $sp, 0x58 /* 385D44 E0082704 0200202D */ daddu $a0, $s0, $zero /* 385D48 E0082708 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 385D4C E008270C 4481A000 */ mtc1 $at, $f20 /* 385D50 E0082710 8E250030 */ lw $a1, 0x30($s1) /* 385D54 E0082714 4407A000 */ mfc1 $a3, $f20 /* 385D58 E0082718 0C080110 */ jal shim_guScaleF /* 385D5C E008271C 00A0302D */ daddu $a2, $a1, $zero /* 385D60 E0082720 0200202D */ daddu $a0, $s0, $zero /* 385D64 E0082724 27A50018 */ addiu $a1, $sp, 0x18 /* 385D68 E0082728 0C080114 */ jal shim_guMtxCatF /* 385D6C E008272C 00A0302D */ daddu $a2, $a1, $zero /* 385D70 E0082730 E7B40010 */ swc1 $f20, 0x10($sp) /* 385D74 E0082734 4480A000 */ mtc1 $zero, $f20 /* 385D78 E0082738 8E250040 */ lw $a1, 0x40($s1) /* 385D7C E008273C 4406A000 */ mfc1 $a2, $f20 /* 385D80 E0082740 4407A000 */ mfc1 $a3, $f20 /* 385D84 E0082744 0C080104 */ jal shim_guRotateF /* 385D88 E0082748 0200202D */ daddu $a0, $s0, $zero /* 385D8C E008274C 0200202D */ daddu $a0, $s0, $zero /* 385D90 E0082750 27A50018 */ addiu $a1, $sp, 0x18 /* 385D94 E0082754 0C080114 */ jal shim_guMtxCatF /* 385D98 E0082758 00A0302D */ daddu $a2, $a1, $zero /* 385D9C E008275C 0200202D */ daddu $a0, $s0, $zero /* 385DA0 E0082760 4405A000 */ mfc1 $a1, $f20 /* 385DA4 E0082764 8E260020 */ lw $a2, 0x20($s1) /* 385DA8 E0082768 0C080108 */ jal shim_guTranslateF /* 385DAC E008276C 00A0382D */ daddu $a3, $a1, $zero /* 385DB0 E0082770 0200202D */ daddu $a0, $s0, $zero /* 385DB4 E0082774 27A50018 */ addiu $a1, $sp, 0x18 /* 385DB8 E0082778 0C080114 */ jal shim_guMtxCatF /* 385DBC E008277C 00A0302D */ daddu $a2, $a1, $zero /* 385DC0 E0082780 27A40018 */ addiu $a0, $sp, 0x18 /* 385DC4 E0082784 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 385DC8 E0082788 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 385DCC E008278C 3C12800A */ lui $s2, %hi(gDisplayContext) /* 385DD0 E0082790 2652A674 */ addiu $s2, $s2, %lo(gDisplayContext) /* 385DD4 E0082794 96050000 */ lhu $a1, 0x0($s0) /* 385DD8 E0082798 8E420000 */ lw $v0, 0x0($s2) /* 385DDC E008279C 00052980 */ sll $a1, $a1, 6 /* 385DE0 E00827A0 00B32821 */ addu $a1, $a1, $s3 /* 385DE4 E00827A4 0C080118 */ jal shim_guMtxF2L /* 385DE8 E00827A8 00452821 */ addu $a1, $v0, $a1 /* 385DEC E00827AC 3C08800A */ lui $t0, %hi(gMainGfxPos) /* 385DF0 E00827B0 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* 385DF4 E00827B4 8D070000 */ lw $a3, 0x0($t0) /* 385DF8 E00827B8 00E0202D */ daddu $a0, $a3, $zero /* 385DFC E00827BC 24E70008 */ addiu $a3, $a3, 0x8 /* 385E00 E00827C0 AD070000 */ sw $a3, 0x0($t0) /* 385E04 E00827C4 96020000 */ lhu $v0, 0x0($s0) /* 385E08 E00827C8 3C03DA38 */ lui $v1, (0xDA380000 >> 16) /* 385E0C E00827CC AC830000 */ sw $v1, 0x0($a0) /* 385E10 E00827D0 24430001 */ addiu $v1, $v0, 0x1 /* 385E14 E00827D4 3042FFFF */ andi $v0, $v0, 0xFFFF /* 385E18 E00827D8 00021180 */ sll $v0, $v0, 6 /* 385E1C E00827DC A6030000 */ sh $v1, 0x0($s0) /* 385E20 E00827E0 8E430000 */ lw $v1, 0x0($s2) /* 385E24 E00827E4 00531021 */ addu $v0, $v0, $s3 /* 385E28 E00827E8 00621821 */ addu $v1, $v1, $v0 /* 385E2C E00827EC 24E20008 */ addiu $v0, $a3, 0x8 /* 385E30 E00827F0 AC830004 */ sw $v1, 0x4($a0) /* 385E34 E00827F4 AD020000 */ sw $v0, 0x0($t0) /* 385E38 E00827F8 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* 385E3C E00827FC ACE20000 */ sw $v0, 0x0($a3) /* 385E40 E0082800 92220027 */ lbu $v0, 0x27($s1) /* 385E44 E0082804 ACE20004 */ sw $v0, 0x4($a3) /* 385E48 E0082808 8E230024 */ lw $v1, 0x24($s1) /* 385E4C E008280C 240200FF */ addiu $v0, $zero, 0xFF /* 385E50 E0082810 14620011 */ bne $v1, $v0, .LE0082858 /* 385E54 E0082814 3C05E200 */ lui $a1, (0xE200001C >> 16) /* 385E58 E0082818 3C04E200 */ lui $a0, (0xE200001C >> 16) /* 385E5C E008281C 3484001C */ ori $a0, $a0, (0xE200001C & 0xFFFF) /* 385E60 E0082820 3C030055 */ lui $v1, (0x551208 >> 16) /* 385E64 E0082824 34631208 */ ori $v1, $v1, (0x551208 & 0xFFFF) /* 385E68 E0082828 3C05FC12 */ lui $a1, (0xFC127E24 >> 16) /* 385E6C E008282C 34A57E24 */ ori $a1, $a1, (0xFC127E24 & 0xFFFF) /* 385E70 E0082830 24E20010 */ addiu $v0, $a3, 0x10 /* 385E74 E0082834 AD020000 */ sw $v0, 0x0($t0) /* 385E78 E0082838 24E20018 */ addiu $v0, $a3, 0x18 /* 385E7C E008283C ACE40008 */ sw $a0, 0x8($a3) /* 385E80 E0082840 ACE3000C */ sw $v1, 0xC($a3) /* 385E84 E0082844 AD020000 */ sw $v0, 0x0($t0) /* 385E88 E0082848 2402F3F9 */ addiu $v0, $zero, -0xC07 /* 385E8C E008284C ACE50010 */ sw $a1, 0x10($a3) /* 385E90 E0082850 08020A25 */ j .LE0082894 /* 385E94 E0082854 ACE20014 */ sw $v0, 0x14($a3) .LE0082858: /* 385E98 E0082858 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF) /* 385E9C E008285C 3C030050 */ lui $v1, (0x504340 >> 16) /* 385EA0 E0082860 34634340 */ ori $v1, $v1, (0x504340 & 0xFFFF) /* 385EA4 E0082864 3C06FC12 */ lui $a2, (0xFC123224 >> 16) /* 385EA8 E0082868 34C63224 */ ori $a2, $a2, (0xFC123224 & 0xFFFF) /* 385EAC E008286C 3C04FF67 */ lui $a0, (0xFF67FFFF >> 16) /* 385EB0 E0082870 3484FFFF */ ori $a0, $a0, (0xFF67FFFF & 0xFFFF) /* 385EB4 E0082874 24E20010 */ addiu $v0, $a3, 0x10 /* 385EB8 E0082878 AD020000 */ sw $v0, 0x0($t0) /* 385EBC E008287C 24E20018 */ addiu $v0, $a3, 0x18 /* 385EC0 E0082880 ACE50008 */ sw $a1, 0x8($a3) /* 385EC4 E0082884 ACE3000C */ sw $v1, 0xC($a3) /* 385EC8 E0082888 AD020000 */ sw $v0, 0x0($t0) /* 385ECC E008288C ACE60010 */ sw $a2, 0x10($a3) /* 385ED0 E0082890 ACE40014 */ sw $a0, 0x14($a3) .LE0082894: /* 385ED4 E0082894 8FBF00A8 */ lw $ra, 0xA8($sp) /* 385ED8 E0082898 8FB300A4 */ lw $s3, 0xA4($sp) /* 385EDC E008289C 8FB200A0 */ lw $s2, 0xA0($sp) /* 385EE0 E00828A0 8FB1009C */ lw $s1, 0x9C($sp) /* 385EE4 E00828A4 8FB00098 */ lw $s0, 0x98($sp) /* 385EE8 E00828A8 D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 385EEC E00828AC 03E00008 */ jr $ra /* 385EF0 E00828B0 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: void func_E00826C4(DisableXFXData* data) { Matrix4f sp18, sp58; shim_guTranslateF(sp18, data->pos.x, data->pos.y, data->pos.z); shim_guScaleF(sp58, data->unk_30, data->unk_30, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guRotateF(sp58, data->unk_40, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guTranslateF(sp58, 0.0f, data->unk_20, 0.0f); shim_guMtxCatF(sp58, sp18, sp18); shim_guMtxF2L(sp18, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gDPSetPrimColor(gMainGfxPos++, 0, 0, 0, 0, 0, data->alpha); if (data->alpha == 255) { gDPSetRenderMode(gMainGfxPos++, AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c1(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM), AA_EN | CVG_DST_FULL | ZMODE_OPA | CVG_X_ALPHA | GBL_c2(G_BL_CLR_IN, G_BL_A_IN, G_BL_CLR_MEM, G_BL_A_MEM)); gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA, G_CC_MODULATEIDECALA); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_CLD_SURF, G_RM_CLD_SURF2); gDPSetCombineLERP(gMainGfxPos++, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0, TEXEL0, 0, SHADE, 0, PRIMITIVE, 0, TEXEL0, 0); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel big_snowflakes_update /* 363340 E00601E0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 363344 E00601E4 AFB3001C */ sw $s3, 0x1C($sp) /* 363348 E00601E8 0080982D */ daddu $s3, $a0, $zero /* 36334C E00601EC AFBF0020 */ sw $ra, 0x20($sp) /* 363350 E00601F0 AFB20018 */ sw $s2, 0x18($sp) /* 363354 E00601F4 AFB10014 */ sw $s1, 0x14($sp) /* 363358 E00601F8 AFB00010 */ sw $s0, 0x10($sp) /* 36335C E00601FC F7B60030 */ sdc1 $f22, 0x30($sp) /* 363360 E0060200 F7B40028 */ sdc1 $f20, 0x28($sp) /* 363364 E0060204 8E64000C */ lw $a0, 0xC($s3) /* 363368 E0060208 8C820028 */ lw $v0, 0x28($a0) /* 36336C E006020C 2442FFFF */ addiu $v0, $v0, -0x1 /* 363370 E0060210 AC820028 */ sw $v0, 0x28($a0) /* 363374 E0060214 8C82002C */ lw $v0, 0x2C($a0) /* 363378 E0060218 8C850028 */ lw $a1, 0x28($a0) /* 36337C E006021C 24420001 */ addiu $v0, $v0, 0x1 /* 363380 E0060220 04A10005 */ bgez $a1, .LE0060238 /* 363384 E0060224 AC82002C */ sw $v0, 0x2C($a0) /* 363388 E0060228 0C080128 */ jal shim_remove_effect /* 36338C E006022C 0260202D */ daddu $a0, $s3, $zero /* 363390 E0060230 080180FA */ j .LE00603E8 /* 363394 E0060234 00000000 */ nop .LE0060238: /* 363398 E0060238 2842000A */ slti $v0, $v0, 0xA /* 36339C E006023C 10400011 */ beqz $v0, .LE0060284 /* 3633A0 E0060240 00A0302D */ daddu $a2, $a1, $zero /* 3633A4 E0060244 240200FF */ addiu $v0, $zero, 0xFF /* 3633A8 E0060248 8C830024 */ lw $v1, 0x24($a0) /* 3633AC E006024C 3C01E006 */ lui $at, (0xE0060740 >> 16) /* 3633B0 E0060250 D4200740 */ ldc1 $f0, (0xE0060740 & 0xFFFF)($at) /* 3633B4 E0060254 00431023 */ subu $v0, $v0, $v1 /* 3633B8 E0060258 44821000 */ mtc1 $v0, $f2 /* 3633BC E006025C 00000000 */ nop /* 3633C0 E0060260 468010A1 */ cvt.d.w $f2, $f2 /* 3633C4 E0060264 46201082 */ mul.d $f2, $f2, $f0 /* 3633C8 E0060268 00000000 */ nop /* 3633CC E006026C 44830000 */ mtc1 $v1, $f0 /* 3633D0 E0060270 00000000 */ nop /* 3633D4 E0060274 46800021 */ cvt.d.w $f0, $f0 /* 3633D8 E0060278 46220000 */ add.d $f0, $f0, $f2 /* 3633DC E006027C 4620020D */ trunc.w.d $f8, $f0 /* 3633E0 E0060280 E4880024 */ swc1 $f8, 0x24($a0) .LE0060284: /* 3633E4 E0060284 28C2000A */ slti $v0, $a2, 0xA /* 3633E8 E0060288 10400009 */ beqz $v0, .LE00602B0 /* 3633EC E006028C 00000000 */ nop /* 3633F0 E0060290 3C01E006 */ lui $at, (0xE0060748 >> 16) /* 3633F4 E0060294 D4220748 */ ldc1 $f2, (0xE0060748 & 0xFFFF)($at) /* 3633F8 E0060298 C4800024 */ lwc1 $f0, 0x24($a0) /* 3633FC E006029C 46800021 */ cvt.d.w $f0, $f0 /* 363400 E00602A0 46220002 */ mul.d $f0, $f0, $f2 /* 363404 E00602A4 00000000 */ nop /* 363408 E00602A8 4620020D */ trunc.w.d $f8, $f0 /* 36340C E00602AC E4880024 */ swc1 $f8, 0x24($a0) .LE00602B0: /* 363410 E00602B0 8E620008 */ lw $v0, 0x8($s3) /* 363414 E00602B4 24110001 */ addiu $s1, $zero, 0x1 /* 363418 E00602B8 0222102A */ slt $v0, $s1, $v0 /* 36341C E00602BC 1040004A */ beqz $v0, .LE00603E8 /* 363420 E00602C0 24840030 */ addiu $a0, $a0, 0x30 /* 363424 E00602C4 24900008 */ addiu $s0, $a0, 0x8 /* 363428 E00602C8 24B20014 */ addiu $s2, $a1, 0x14 /* 36342C E00602CC 3C01BD4C */ lui $at, (0xBD4CCCCD >> 16) /* 363430 E00602D0 3421CCCD */ ori $at, $at, (0xBD4CCCCD & 0xFFFF) /* 363434 E00602D4 4481B000 */ mtc1 $at, $f22 /* 363438 E00602D8 3C014120 */ lui $at, (0x41200000 >> 16) /* 36343C E00602DC 4481A000 */ mtc1 $at, $f20 .LE00602E0: /* 363440 E00602E0 C60C0010 */ lwc1 $f12, 0x10($s0) /* 363444 E00602E4 0C080140 */ jal shim_sin_deg /* 363448 E00602E8 460C6300 */ add.s $f12, $f12, $f12 /* 36344C E00602EC 3C01E006 */ lui $at, (0xE0060750 >> 16) /* 363450 E00602F0 D4220750 */ ldc1 $f2, (0xE0060750 & 0xFFFF)($at) /* 363454 E00602F4 46000021 */ cvt.d.s $f0, $f0 /* 363458 E00602F8 46220002 */ mul.d $f0, $f0, $f2 /* 36345C E00602FC 00000000 */ nop /* 363460 E0060300 C6020008 */ lwc1 $f2, 0x8($s0) /* 363464 E0060304 46200020 */ cvt.s.d $f0, $f0 /* 363468 E0060308 46001080 */ add.s $f2, $f2, $f0 /* 36346C E006030C 3C01E006 */ lui $at, (0xE0060758 >> 16) /* 363470 E0060310 D4200758 */ ldc1 $f0, (0xE0060758 & 0xFFFF)($at) /* 363474 E0060314 E6020008 */ swc1 $f2, 0x8($s0) /* 363478 E0060318 460010A1 */ cvt.d.s $f2, $f2 /* 36347C E006031C 46201082 */ mul.d $f2, $f2, $f0 /* 363480 E0060320 00000000 */ nop /* 363484 E0060324 C600000C */ lwc1 $f0, 0xC($s0) /* 363488 E0060328 46160000 */ add.s $f0, $f0, $f22 /* 36348C E006032C E600000C */ swc1 $f0, 0xC($s0) /* 363490 E0060330 46160000 */ add.s $f0, $f0, $f22 /* 363494 E0060334 24040032 */ addiu $a0, $zero, 0x32 /* 363498 E0060338 0240282D */ daddu $a1, $s2, $zero /* 36349C E006033C E600000C */ swc1 $f0, 0xC($s0) /* 3634A0 E0060340 462010A0 */ cvt.s.d $f2, $f2 /* 3634A4 E0060344 0C080011 */ jal func_E0200044 /* 3634A8 E0060348 E6020008 */ swc1 $f2, 0x8($s0) /* 3634AC E006034C 2442FFE7 */ addiu $v0, $v0, -0x19 /* 3634B0 E0060350 C60C0014 */ lwc1 $f12, 0x14($s0) /* 3634B4 E0060354 44820000 */ mtc1 $v0, $f0 /* 3634B8 E0060358 00000000 */ nop /* 3634BC E006035C 46800020 */ cvt.s.w $f0, $f0 /* 3634C0 E0060360 46006300 */ add.s $f12, $f12, $f0 /* 3634C4 E0060364 0C080140 */ jal shim_sin_deg /* 3634C8 E0060368 E60C0014 */ swc1 $f12, 0x14($s0) /* 3634CC E006036C 46140002 */ mul.s $f0, $f0, $f20 /* 3634D0 E0060370 00000000 */ nop /* 3634D4 E0060374 C6020014 */ lwc1 $f2, 0x14($s0) /* 3634D8 E0060378 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 3634DC E006037C 44816000 */ mtc1 $at, $f12 /* 3634E0 E0060380 00000000 */ nop /* 3634E4 E0060384 460C1302 */ mul.s $f12, $f2, $f12 /* 3634E8 E0060388 00000000 */ nop /* 3634EC E006038C C6020010 */ lwc1 $f2, 0x10($s0) /* 3634F0 E0060390 46001080 */ add.s $f2, $f2, $f0 /* 3634F4 E0060394 0C080144 */ jal shim_cos_deg /* 3634F8 E0060398 E6020010 */ swc1 $f2, 0x10($s0) /* 3634FC E006039C 46140002 */ mul.s $f0, $f0, $f20 /* 363500 E00603A0 00000000 */ nop /* 363504 E00603A4 C606FFFC */ lwc1 $f6, -0x4($s0) /* 363508 E00603A8 C6020008 */ lwc1 $f2, 0x8($s0) /* 36350C E00603AC C6040000 */ lwc1 $f4, 0x0($s0) /* 363510 E00603B0 46023180 */ add.s $f6, $f6, $f2 /* 363514 E00603B4 C602000C */ lwc1 $f2, 0xC($s0) /* 363518 E00603B8 26310001 */ addiu $s1, $s1, 0x1 /* 36351C E00603BC 46022100 */ add.s $f4, $f4, $f2 /* 363520 E00603C0 C6020018 */ lwc1 $f2, 0x18($s0) /* 363524 E00603C4 26520014 */ addiu $s2, $s2, 0x14 /* 363528 E00603C8 46001080 */ add.s $f2, $f2, $f0 /* 36352C E00603CC E606FFFC */ swc1 $f6, -0x4($s0) /* 363530 E00603D0 E6040000 */ swc1 $f4, 0x0($s0) /* 363534 E00603D4 E6020018 */ swc1 $f2, 0x18($s0) /* 363538 E00603D8 8E620008 */ lw $v0, 0x8($s3) /* 36353C E00603DC 0222102A */ slt $v0, $s1, $v0 /* 363540 E00603E0 1440FFBF */ bnez $v0, .LE00602E0 /* 363544 E00603E4 26100030 */ addiu $s0, $s0, 0x30 .LE00603E8: /* 363548 E00603E8 8FBF0020 */ lw $ra, 0x20($sp) /* 36354C E00603EC 8FB3001C */ lw $s3, 0x1C($sp) /* 363550 E00603F0 8FB20018 */ lw $s2, 0x18($sp) /* 363554 E00603F4 8FB10014 */ lw $s1, 0x14($sp) /* 363558 E00603F8 8FB00010 */ lw $s0, 0x10($sp) /* 36355C E00603FC D7B60030 */ ldc1 $f22, 0x30($sp) /* 363560 E0060400 D7B40028 */ ldc1 $f20, 0x28($sp) /* 363564 E0060404 03E00008 */ jr $ra /* 363568 E0060408 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void big_snowflakes_update(EffectInstance* effect) { BigSnowflakesFXData* data = effect->data.bigSnowflakes; s32 unk_28; s32 i; data->unk_28--; data->unk_2C++; if (data->unk_28 < 0) { shim_remove_effect(effect); return; } unk_28 = data->unk_28; if (data->unk_2C < 10) { data->unk_24 += (255 - data->unk_24) * 0.3; } if (unk_28 < 10) { data->unk_24 *= 0.8; } data++; for (i = 1; i < effect->numParts; i++, data++) { data->unk_10 += (f32) (shim_sin_deg(2.0f * data->unk_18) * 0.2); data->unk_14 += -0.05f; data->unk_10 *= 0.92; data->unk_14 += -0.05f; data->unk_1C += func_E0200044(50, unk_28 + (i * 20)) - 25; data->unk_18 += shim_sin_deg(data->unk_1C) * 10.0f; data->unk_20 += shim_cos_deg(data->unk_1C * 0.5f) * 10.0f; data->unk_04 += data->unk_10; data->unk_08 += data->unk_14; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80257BAC /* 18648C 80257BAC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 186490 80257BB0 3C02800E */ lui $v0, %hi(gBattleStatus) /* 186494 80257BB4 2442C070 */ addiu $v0, $v0, %lo(gBattleStatus) /* 186498 80257BB8 AFBF0038 */ sw $ra, 0x38($sp) /* 18649C 80257BBC AFB30034 */ sw $s3, 0x34($sp) /* 1864A0 80257BC0 AFB20030 */ sw $s2, 0x30($sp) /* 1864A4 80257BC4 AFB1002C */ sw $s1, 0x2C($sp) /* 1864A8 80257BC8 AFB00028 */ sw $s0, 0x28($sp) /* 1864AC 80257BCC 8C5000D8 */ lw $s0, 0xD8($v0) /* 1864B0 80257BD0 8E1201F4 */ lw $s2, 0x1F4($s0) /* 1864B4 80257BD4 0000202D */ daddu $a0, $zero, $zero /* 1864B8 80257BD8 8E450088 */ lw $a1, 0x88($s2) /* 1864BC 80257BDC 8E460090 */ lw $a2, 0x90($s2) /* 1864C0 80257BE0 0C0B76A3 */ jal spr_update_player_sprite /* 1864C4 80257BE4 0040982D */ daddu $s3, $v0, $zero /* 1864C8 80257BE8 AE42008C */ sw $v0, 0x8C($s2) /* 1864CC 80257BEC 8E020000 */ lw $v0, 0x0($s0) /* 1864D0 80257BF0 3C031000 */ lui $v1, (0x10000000 >> 16) /* 1864D4 80257BF4 00431024 */ and $v0, $v0, $v1 /* 1864D8 80257BF8 10400003 */ beqz $v0, .L80257C08 /* 1864DC 80257BFC 00000000 */ nop /* 1864E0 80257C00 0C09527D */ jal func_802549F4 /* 1864E4 80257C04 0200202D */ daddu $a0, $s0, $zero .L80257C08: /* 1864E8 80257C08 8E04042C */ lw $a0, 0x42C($s0) /* 1864EC 80257C0C 0C044181 */ jal get_shadow_by_index /* 1864F0 80257C10 00000000 */ nop /* 1864F4 80257C14 0040882D */ daddu $s1, $v0, $zero /* 1864F8 80257C18 8E220000 */ lw $v0, 0x0($s1) /* 1864FC 80257C1C 2403FFFE */ addiu $v1, $zero, -0x2 /* 186500 80257C20 00431024 */ and $v0, $v0, $v1 /* 186504 80257C24 AE220000 */ sw $v0, 0x0($s1) /* 186508 80257C28 8262009A */ lb $v0, 0x9A($s3) /* 18650C 80257C2C 14400002 */ bnez $v0, .L80257C38 /* 186510 80257C30 24020028 */ addiu $v0, $zero, 0x28 /* 186514 80257C34 24020080 */ addiu $v0, $zero, 0x80 .L80257C38: /* 186518 80257C38 A2220005 */ sb $v0, 0x5($s1) /* 18651C 80257C3C 0000202D */ daddu $a0, $zero, $zero /* 186520 80257C40 27A50018 */ addiu $a1, $sp, 0x18 /* 186524 80257C44 27A6001C */ addiu $a2, $sp, 0x1C /* 186528 80257C48 3C0146FF */ lui $at, (0x46FFFE00 >> 16) /* 18652C 80257C4C 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF) /* 186530 80257C50 44810000 */ mtc1 $at, $f0 /* 186534 80257C54 27A70020 */ addiu $a3, $sp, 0x20 /* 186538 80257C58 E7A00024 */ swc1 $f0, 0x24($sp) /* 18653C 80257C5C 86020150 */ lh $v0, 0x150($s0) /* 186540 80257C60 C6060144 */ lwc1 $f6, 0x144($s0) /* 186544 80257C64 C604014C */ lwc1 $f4, 0x14C($s0) /* 186548 80257C68 44820000 */ mtc1 $v0, $f0 /* 18654C 80257C6C 00000000 */ nop /* 186550 80257C70 46800020 */ cvt.s.w $f0, $f0 /* 186554 80257C74 46003180 */ add.s $f6, $f6, $f0 /* 186558 80257C78 86020152 */ lh $v0, 0x152($s0) /* 18655C 80257C7C C6000148 */ lwc1 $f0, 0x148($s0) /* 186560 80257C80 44821000 */ mtc1 $v0, $f2 /* 186564 80257C84 00000000 */ nop /* 186568 80257C88 468010A0 */ cvt.s.w $f2, $f2 /* 18656C 80257C8C 86020154 */ lh $v0, 0x154($s0) /* 186570 80257C90 46020000 */ add.s $f0, $f0, $f2 /* 186574 80257C94 44821000 */ mtc1 $v0, $f2 /* 186578 80257C98 00000000 */ nop /* 18657C 80257C9C 468010A0 */ cvt.s.w $f2, $f2 /* 186580 80257CA0 27A20024 */ addiu $v0, $sp, 0x24 /* 186584 80257CA4 46022100 */ add.s $f4, $f4, $f2 /* 186588 80257CA8 3C014028 */ lui $at, (0x40280000 >> 16) /* 18658C 80257CAC 44811800 */ mtc1 $at, $f3 /* 186590 80257CB0 44801000 */ mtc1 $zero, $f2 /* 186594 80257CB4 46000021 */ cvt.d.s $f0, $f0 /* 186598 80257CB8 46220000 */ add.d $f0, $f0, $f2 /* 18659C 80257CBC E7A60018 */ swc1 $f6, 0x18($sp) /* 1865A0 80257CC0 E7A40020 */ swc1 $f4, 0x20($sp) /* 1865A4 80257CC4 46200020 */ cvt.s.d $f0, $f0 /* 1865A8 80257CC8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 1865AC 80257CCC 0C0372DF */ jal npc_raycast_down_sides /* 1865B0 80257CD0 AFA20010 */ sw $v0, 0x10($sp) /* 1865B4 80257CD4 C7A20024 */ lwc1 $f2, 0x24($sp) /* 1865B8 80257CD8 3C014348 */ lui $at, (0x43480000 >> 16) /* 1865BC 80257CDC 44810000 */ mtc1 $at, $f0 /* 1865C0 80257CE0 00000000 */ nop /* 1865C4 80257CE4 4602003C */ c.lt.s $f0, $f2 /* 1865C8 80257CE8 00000000 */ nop /* 1865CC 80257CEC 45000004 */ bc1f D_80257D00 /* 1865D0 80257CF0 00000000 */ nop /* 1865D4 80257CF4 8E220000 */ lw $v0, 0x0($s1) /* 1865D8 80257CF8 34420001 */ ori $v0, $v0, 0x1 /* 1865DC 80257CFC AE220000 */ sw $v0, 0x0($s1) D_80257D00: /* 1865E0 80257D00 C7A00018 */ lwc1 $f0, 0x18($sp) /* 1865E4 80257D04 C7A2001C */ lwc1 $f2, 0x1C($sp) /* 1865E8 80257D08 C7A40020 */ lwc1 $f4, 0x20($sp) /* 1865EC 80257D0C 3C02800B */ lui $v0, %hi(gCameras + 0x558) /* 1865F0 80257D10 244222D8 */ addiu $v0, $v0, %lo(gCameras + 0x558) /* 1865F4 80257D14 E6200010 */ swc1 $f0, 0x10($s1) /* 1865F8 80257D18 E6220014 */ swc1 $f2, 0x14($s1) D_80257D1C: /* 1865FC 80257D1C E6240018 */ swc1 $f4, 0x18($s1) D_80257D20: /* 186600 80257D20 C600018C */ lwc1 $f0, 0x18C($s0) /* 186604 80257D24 C44C006C */ lwc1 $f12, 0x6C($v0) D_80257D28: /* 186608 80257D28 0C00A6C9 */ jal clamp_angle /* 18660C 80257D2C 460C0301 */ sub.s $f12, $f0, $f12 D_80257D30: /* 186610 80257D30 8FA50024 */ lw $a1, 0x24($sp) /* 186614 80257D34 0220202D */ daddu $a0, $s1, $zero /* 186618 80257D38 0C044A17 */ jal set_standard_shadow_scale /* 18661C 80257D3C E620002C */ swc1 $f0, 0x2C($s1) D_80257D40: /* 186620 80257D40 C6020430 */ lwc1 $f2, 0x430($s0) /* 186624 80257D44 C6000188 */ lwc1 $f0, 0x188($s0) D_80257D48: /* 186628 80257D48 46001082 */ mul.s $f2, $f2, $f0 /* 18662C 80257D4C 00000000 */ nop D_80257D50: /* 186630 80257D50 C620001C */ lwc1 $f0, 0x1C($s1) /* 186634 80257D54 46020002 */ mul.s $f0, $f0, $f2 jtbl_80257D58: /* 186638 80257D58 00000000 */ nop /* 18663C 80257D5C E620001C */ swc1 $f0, 0x1C($s1) /* 186640 80257D60 86420098 */ lh $v0, 0x98($s2) /* 186644 80257D64 284200FF */ slti $v0, $v0, 0xFF /* 186648 80257D68 14400006 */ bnez $v0, .L80257D84 /* 18664C 80257D6C 24020022 */ addiu $v0, $zero, 0x22 /* 186650 80257D70 8E420000 */ lw $v0, 0x0($s2) /* 186654 80257D74 30420100 */ andi $v0, $v0, 0x100 /* 186658 80257D78 14400002 */ bnez $v0, .L80257D84 /* 18665C 80257D7C 24020022 */ addiu $v0, $zero, 0x22 /* 186660 80257D80 2402000D */ addiu $v0, $zero, 0xD .L80257D84: /* 186664 80257D84 A6020434 */ sh $v0, 0x434($s0) /* 186668 80257D88 8FBF0038 */ lw $ra, 0x38($sp) /* 18666C 80257D8C 8FB30034 */ lw $s3, 0x34($sp) /* 186670 80257D90 8FB20030 */ lw $s2, 0x30($sp) /* 186674 80257D94 8FB1002C */ lw $s1, 0x2C($sp) /* 186678 80257D98 8FB00028 */ lw $s0, 0x28($sp) /* 18667C 80257D9C 03E00008 */ jr $ra /* 186680 80257DA0 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void update_player_actor_shadow(void) { BattleStatus* battleStatus = &gBattleStatus; Camera* camera = &gCameras[CAM_BATTLE]; Actor* player = battleStatus->playerActor; ActorPart* parts = player->partsTable; Shadow* shadow; f32 x, y, z, distance; parts->animNotifyValue = spr_update_player_sprite(PLAYER_SPRITE_MAIN, parts->currentAnimation, parts->animationRate); if (player->flags & ACTOR_FLAG_BLUR_ENABLED) { func_802549F4(player); } shadow = get_shadow_by_index(player->shadow.id); shadow->flags &= ~ENTITY_FLAG_HIDDEN; if (!battleStatus->outtaSightActive) { shadow->alpha = 128; } else { shadow->alpha = 40; } distance = 32767.0f; x = player->currentPos.x + player->headOffset.x; z = player->currentPos.z + player->headOffset.z; y = player->currentPos.y + player->headOffset.y + 12.0; npc_raycast_down_sides(0, &x, &y, &z, &distance); if (distance > 200.0f) { shadow->flags |= ENTITY_FLAG_HIDDEN; } shadow->position.x = x; shadow->position.y = y; shadow->position.z = z; shadow->rotation.y = clamp_angle(player->yaw - camera->currentYaw); set_standard_shadow_scale(shadow, distance); shadow->scale.x *= player->shadowScale * player->scalingFactor; if (parts->opacity >= 255 && !(parts->flags & ACTOR_PART_FLAG_100)) { player->renderMode = RENDER_MODE_ALPHATEST; } else { player->renderMode = RENDER_MODE_SURFACE_XLU_LAYER3; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_Chest_open /* 108AB0 802E7230 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 108AB4 802E7234 AFBF0014 */ sw $ra, 0x14($sp) /* 108AB8 802E7238 AFB00010 */ sw $s0, 0x10($sp) /* 108ABC 802E723C 8C900040 */ lw $s0, 0x40($a0) /* 108AC0 802E7240 92030005 */ lbu $v1, 0x5($s0) /* 108AC4 802E7244 2C620006 */ sltiu $v0, $v1, 0x6 /* 108AC8 802E7248 10400074 */ beqz $v0, .L802E741C /* 108ACC 802E724C 00031080 */ sll $v0, $v1, 2 /* 108AD0 802E7250 3C01802F */ lui $at, %hi(jtbl_802EB2F0) /* 108AD4 802E7254 00220821 */ addu $at, $at, $v0 /* 108AD8 802E7258 8C22B2F0 */ lw $v0, %lo(jtbl_802EB2F0)($at) /* 108ADC 802E725C 00400008 */ jr $v0 /* 108AE0 802E7260 00000000 */ nop glabel .L802E7264 /* 108AE4 802E7264 C6020008 */ lwc1 $f2, 0x8($s0) /* 108AE8 802E7268 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 108AEC 802E726C 44810000 */ mtc1 $at, $f0 /* 108AF0 802E7270 92020006 */ lbu $v0, 0x6($s0) /* 108AF4 802E7274 46001081 */ sub.s $f2, $f2, $f0 /* 108AF8 802E7278 3C01C000 */ lui $at, (0xC0000000 >> 16) /* 108AFC 802E727C 44810000 */ mtc1 $at, $f0 /* 108B00 802E7280 2442FFFF */ addiu $v0, $v0, -0x1 /* 108B04 802E7284 A2020006 */ sb $v0, 0x6($s0) /* 108B08 802E7288 4600103C */ c.lt.s $f2, $f0 /* 108B0C 802E728C 00000000 */ nop /* 108B10 802E7290 45000002 */ bc1f .L802E729C /* 108B14 802E7294 E6020008 */ swc1 $f2, 0x8($s0) /* 108B18 802E7298 E6000008 */ swc1 $f0, 0x8($s0) .L802E729C: /* 108B1C 802E729C 82020006 */ lb $v0, 0x6($s0) /* 108B20 802E72A0 1440005E */ bnez $v0, .L802E741C /* 108B24 802E72A4 24030008 */ addiu $v1, $zero, 0x8 /* 108B28 802E72A8 92020005 */ lbu $v0, 0x5($s0) /* 108B2C 802E72AC 080B9D05 */ j .L802E7414 /* 108B30 802E72B0 A2030006 */ sb $v1, 0x6($s0) glabel .L802E72B4 /* 108B34 802E72B4 92020006 */ lbu $v0, 0x6($s0) /* 108B38 802E72B8 2442FFFF */ addiu $v0, $v0, -0x1 /* 108B3C 802E72BC A2020006 */ sb $v0, 0x6($s0) /* 108B40 802E72C0 00021600 */ sll $v0, $v0, 24 /* 108B44 802E72C4 14400055 */ bnez $v0, .L802E741C /* 108B48 802E72C8 00000000 */ nop /* 108B4C 802E72CC 92020005 */ lbu $v0, 0x5($s0) /* 108B50 802E72D0 080B9D05 */ j .L802E7414 /* 108B54 802E72D4 AE00000C */ sw $zero, 0xC($s0) glabel .L802E72D8 /* 108B58 802E72D8 C600000C */ lwc1 $f0, 0xC($s0) /* 108B5C 802E72DC 3C014080 */ lui $at, (0x40800000 >> 16) /* 108B60 802E72E0 44811000 */ mtc1 $at, $f2 /* 108B64 802E72E4 00000000 */ nop /* 108B68 802E72E8 46020000 */ add.s $f0, $f0, $f2 /* 108B6C 802E72EC 3C014334 */ lui $at, (0x43340000 >> 16) /* 108B70 802E72F0 44811000 */ mtc1 $at, $f2 /* 108B74 802E72F4 00000000 */ nop /* 108B78 802E72F8 4600103E */ c.le.s $f2, $f0 /* 108B7C 802E72FC 00000000 */ nop /* 108B80 802E7300 45000004 */ bc1f .L802E7314 /* 108B84 802E7304 E600000C */ swc1 $f0, 0xC($s0) /* 108B88 802E7308 92020005 */ lbu $v0, 0x5($s0) /* 108B8C 802E730C 24420001 */ addiu $v0, $v0, 0x1 /* 108B90 802E7310 A2020005 */ sb $v0, 0x5($s0) .L802E7314: /* 108B94 802E7314 C60C000C */ lwc1 $f12, 0xC($s0) /* 108B98 802E7318 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 108B9C 802E731C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 108BA0 802E7320 44810000 */ mtc1 $at, $f0 /* 108BA4 802E7324 00000000 */ nop /* 108BA8 802E7328 46006302 */ mul.s $f12, $f12, $f0 /* 108BAC 802E732C 00000000 */ nop /* 108BB0 802E7330 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 108BB4 802E7334 44810000 */ mtc1 $at, $f0 /* 108BB8 802E7338 0C00A85B */ jal sin_rad /* 108BBC 802E733C 46006303 */ div.s $f12, $f12, $f0 /* 108BC0 802E7340 3C014040 */ lui $at, (0x40400000 >> 16) /* 108BC4 802E7344 44811000 */ mtc1 $at, $f2 /* 108BC8 802E7348 00000000 */ nop /* 108BCC 802E734C 46020082 */ mul.s $f2, $f0, $f2 /* 108BD0 802E7350 080B9CF3 */ j .L802E73CC /* 108BD4 802E7354 00000000 */ nop glabel .L802E7358 /* 108BD8 802E7358 C600000C */ lwc1 $f0, 0xC($s0) /* 108BDC 802E735C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 108BE0 802E7360 44811000 */ mtc1 $at, $f2 /* 108BE4 802E7364 00000000 */ nop /* 108BE8 802E7368 46020000 */ add.s $f0, $f0, $f2 /* 108BEC 802E736C 3C01433E */ lui $at, (0x433E0000 >> 16) /* 108BF0 802E7370 44811000 */ mtc1 $at, $f2 /* 108BF4 802E7374 00000000 */ nop /* 108BF8 802E7378 4600103E */ c.le.s $f2, $f0 /* 108BFC 802E737C 00000000 */ nop /* 108C00 802E7380 45000006 */ bc1f .L802E739C /* 108C04 802E7384 E600000C */ swc1 $f0, 0xC($s0) /* 108C08 802E7388 92020005 */ lbu $v0, 0x5($s0) /* 108C0C 802E738C 2403000A */ addiu $v1, $zero, 0xA /* 108C10 802E7390 A2030006 */ sb $v1, 0x6($s0) /* 108C14 802E7394 24420001 */ addiu $v0, $v0, 0x1 /* 108C18 802E7398 A2020005 */ sb $v0, 0x5($s0) .L802E739C: /* 108C1C 802E739C C60C000C */ lwc1 $f12, 0xC($s0) /* 108C20 802E73A0 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 108C24 802E73A4 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 108C28 802E73A8 44810000 */ mtc1 $at, $f0 /* 108C2C 802E73AC 00000000 */ nop /* 108C30 802E73B0 46006302 */ mul.s $f12, $f12, $f0 /* 108C34 802E73B4 00000000 */ nop /* 108C38 802E73B8 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 108C3C 802E73BC 44810000 */ mtc1 $at, $f0 /* 108C40 802E73C0 0C00A85B */ jal sin_rad /* 108C44 802E73C4 46006303 */ div.s $f12, $f12, $f0 /* 108C48 802E73C8 46000080 */ add.s $f2, $f0, $f0 .L802E73CC: /* 108C4C 802E73CC C6000008 */ lwc1 $f0, 0x8($s0) /* 108C50 802E73D0 46020001 */ sub.s $f0, $f0, $f2 /* 108C54 802E73D4 080B9D07 */ j .L802E741C /* 108C58 802E73D8 E6000008 */ swc1 $f0, 0x8($s0) glabel .L802E73DC /* 108C5C 802E73DC 92020006 */ lbu $v0, 0x6($s0) /* 108C60 802E73E0 2442FFFF */ addiu $v0, $v0, -0x1 /* 108C64 802E73E4 A2020006 */ sb $v0, 0x6($s0) /* 108C68 802E73E8 00021600 */ sll $v0, $v0, 24 /* 108C6C 802E73EC 1440000B */ bnez $v0, .L802E741C /* 108C70 802E73F0 00000000 */ nop /* 108C74 802E73F4 82020007 */ lb $v0, 0x7($s0) /* 108C78 802E73F8 10400005 */ beqz $v0, .L802E7410 /* 108C7C 802E73FC 00000000 */ nop /* 108C80 802E7400 0C043F5A */ jal exec_entity_commandlist /* 108C84 802E7404 00000000 */ nop /* 108C88 802E7408 080B9D07 */ j .L802E741C /* 108C8C 802E740C 00000000 */ nop .L802E7410: /* 108C90 802E7410 92020005 */ lbu $v0, 0x5($s0) .L802E7414: /* 108C94 802E7414 24420001 */ addiu $v0, $v0, 0x1 /* 108C98 802E7418 A2020005 */ sb $v0, 0x5($s0) glabel .L802E741C /* 108C9C 802E741C 8FBF0014 */ lw $ra, 0x14($sp) /* 108CA0 802E7420 8FB00010 */ lw $s0, 0x10($sp) /* 108CA4 802E7424 03E00008 */ jr $ra /* 108CA8 802E7428 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void entity_Chest_open(Entity* entity) { ChestData* data = entity->dataBuf.chest; f32 temp; switch (data->openState) { case 0: data->postLidAnimDelay--; data->lidAngle -= 1.0f; if (data->lidAngle < -2.0f) { data->lidAngle = -2.0f; } if (data->postLidAnimDelay == 0) { data->postLidAnimDelay = 8; data->openState++; } break; case 1: data->postLidAnimDelay--; if (data->postLidAnimDelay == 0) { data->lidAnimInterpPhase = 0.0f; data->openState++; } break; case 2: data->lidAnimInterpPhase += 4.0f; if (data->lidAnimInterpPhase >= 180.0f) { data->openState++; } temp = sin_rad(DEG_TO_RAD(data->lidAnimInterpPhase)) * 3.0f; data->lidAngle -= temp; break; case 3: data->lidAnimInterpPhase += 1.0f; if (data->lidAnimInterpPhase >= 190.0f) { data->postLidAnimDelay = 10; data->openState++; } temp = sin_rad(DEG_TO_RAD(data->lidAnimInterpPhase)) * 2.0f; data->lidAngle -= temp; break; case 4: data->postLidAnimDelay--; if (data->postLidAnimDelay == 0) { if (data->unk_07 != 0) { exec_entity_commandlist(entity); } else { data->openState++; } } break; case 5: break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HiddenPanel_idle /* 107C28 802E63A8 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 107C2C 802E63AC AFB3001C */ sw $s3, 0x1C($sp) /* 107C30 802E63B0 0080982D */ daddu $s3, $a0, $zero /* 107C34 802E63B4 AFBF0020 */ sw $ra, 0x20($sp) /* 107C38 802E63B8 AFB20018 */ sw $s2, 0x18($sp) /* 107C3C 802E63BC AFB10014 */ sw $s1, 0x14($sp) /* 107C40 802E63C0 AFB00010 */ sw $s0, 0x10($sp) /* 107C44 802E63C4 92620006 */ lbu $v0, 0x6($s3) /* 107C48 802E63C8 8E720040 */ lw $s2, 0x40($s3) /* 107C4C 802E63CC 30420001 */ andi $v0, $v0, 0x1 /* 107C50 802E63D0 5040000A */ beql $v0, $zero, .L802E63FC /* 107C54 802E63D4 A2400004 */ sb $zero, 0x4($s2) /* 107C58 802E63D8 82420004 */ lb $v0, 0x4($s2) /* 107C5C 802E63DC 14400008 */ bnez $v0, .L802E6400 /* 107C60 802E63E0 2402FFFF */ addiu $v0, $zero, -0x1 /* 107C64 802E63E4 24020001 */ addiu $v0, $zero, 0x1 /* 107C68 802E63E8 A2420004 */ sb $v0, 0x4($s2) /* 107C6C 802E63EC 0C03BCF5 */ jal func_800EF3D4 /* 107C70 802E63F0 24040001 */ addiu $a0, $zero, 0x1 /* 107C74 802E63F4 080B9900 */ j .L802E6400 /* 107C78 802E63F8 2402FFFF */ addiu $v0, $zero, -0x1 .L802E63FC: /* 107C7C 802E63FC 2402FFFF */ addiu $v0, $zero, -0x1 .L802E6400: /* 107C80 802E6400 3C038016 */ lui $v1, %hi(gCurrentHiddenPanels) /* 107C84 802E6404 2463A578 */ addiu $v1, $v1, %lo(gCurrentHiddenPanels) /* 107C88 802E6408 AE420008 */ sw $v0, 0x8($s2) /* 107C8C 802E640C AE40000C */ sw $zero, 0xC($s2) /* 107C90 802E6410 80620000 */ lb $v0, 0x0($v1) /* 107C94 802E6414 10400050 */ beqz $v0, .L802E6558 /* 107C98 802E6418 00000000 */ nop /* 107C9C 802E641C C4600008 */ lwc1 $f0, 0x8($v1) /* 107CA0 802E6420 C662004C */ lwc1 $f2, 0x4C($s3) /* 107CA4 802E6424 46020001 */ sub.s $f0, $f0, $f2 /* 107CA8 802E6428 3C014024 */ lui $at, (0x40240000 >> 16) /* 107CAC 802E642C 44811800 */ mtc1 $at, $f3 /* 107CB0 802E6430 44801000 */ mtc1 $zero, $f2 /* 107CB4 802E6434 46000021 */ cvt.d.s $f0, $f0 /* 107CB8 802E6438 46200005 */ abs.d $f0, $f0 /* 107CBC 802E643C 4622003E */ c.le.d $f0, $f2 /* 107CC0 802E6440 00000000 */ nop /* 107CC4 802E6444 45000044 */ bc1f .L802E6558 /* 107CC8 802E6448 2402000A */ addiu $v0, $zero, 0xA /* 107CCC 802E644C A2420000 */ sb $v0, 0x0($s2) /* 107CD0 802E6450 C66C0048 */ lwc1 $f12, 0x48($s3) /* 107CD4 802E6454 0C038022 */ jal get_xz_dist_to_player /* 107CD8 802E6458 C66E0050 */ lwc1 $f14, 0x50($s3) /* 107CDC 802E645C 4600010D */ trunc.w.s $f4, $f0 /* 107CE0 802E6460 44102000 */ mfc1 $s0, $f4 /* 107CE4 802E6464 00000000 */ nop /* 107CE8 802E6468 2A020065 */ slti $v0, $s0, 0x65 /* 107CEC 802E646C 1040003A */ beqz $v0, .L802E6558 /* 107CF0 802E6470 00000000 */ nop /* 107CF4 802E6474 92620006 */ lbu $v0, 0x6($s3) /* 107CF8 802E6478 30420001 */ andi $v0, $v0, 0x1 /* 107CFC 802E647C 10400005 */ beqz $v0, .L802E6494 /* 107D00 802E6480 0260202D */ daddu $a0, $s3, $zero /* 107D04 802E6484 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 107D08 802E6488 44810000 */ mtc1 $at, $f0 /* 107D0C 802E648C 080B9954 */ j .L802E6550 /* 107D10 802E6490 00000000 */ nop .L802E6494: /* 107D14 802E6494 0C0B9ADB */ jal entity_HiddenPanel_is_item_on_top /* 107D18 802E6498 0260202D */ daddu $a0, $s3, $zero /* 107D1C 802E649C 10400005 */ beqz $v0, .L802E64B4 /* 107D20 802E64A0 0260202D */ daddu $a0, $s3, $zero /* 107D24 802E64A4 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 107D28 802E64A8 44810000 */ mtc1 $at, $f0 /* 107D2C 802E64AC 080B9954 */ j .L802E6550 /* 107D30 802E64B0 00000000 */ nop .L802E64B4: /* 107D34 802E64B4 0C00F475 */ jal npc_find_standing_on_entity /* 107D38 802E64B8 92640004 */ lbu $a0, 0x4($s3) /* 107D3C 802E64BC 0040882D */ daddu $s1, $v0, $zero /* 107D40 802E64C0 06200016 */ bltz $s1, .L802E651C /* 107D44 802E64C4 00000000 */ nop /* 107D48 802E64C8 0C00E2B7 */ jal get_npc_by_index /* 107D4C 802E64CC 0220202D */ daddu $a0, $s1, $zero /* 107D50 802E64D0 0040802D */ daddu $s0, $v0, $zero /* 107D54 802E64D4 C66C0048 */ lwc1 $f12, 0x48($s3) /* 107D58 802E64D8 C66E0050 */ lwc1 $f14, 0x50($s3) /* 107D5C 802E64DC 8E060038 */ lw $a2, 0x38($s0) /* 107D60 802E64E0 0C00A7B5 */ jal dist2D /* 107D64 802E64E4 8E070040 */ lw $a3, 0x40($s0) /* 107D68 802E64E8 0260202D */ daddu $a0, $s3, $zero /* 107D6C 802E64EC AE510008 */ sw $s1, 0x8($s2) /* 107D70 802E64F0 8E020000 */ lw $v0, 0x0($s0) /* 107D74 802E64F4 2403FFF7 */ addiu $v1, $zero, -0x9 /* 107D78 802E64F8 30420208 */ andi $v0, $v0, 0x208 /* 107D7C 802E64FC AE42000C */ sw $v0, 0xC($s2) /* 107D80 802E6500 8E020000 */ lw $v0, 0x0($s0) /* 107D84 802E6504 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 107D88 802E6508 44810000 */ mtc1 $at, $f0 /* 107D8C 802E650C 00431024 */ and $v0, $v0, $v1 /* 107D90 802E6510 34420200 */ ori $v0, $v0, 0x200 /* 107D94 802E6514 080B9954 */ j .L802E6550 /* 107D98 802E6518 AE020000 */ sw $v0, 0x0($s0) .L802E651C: /* 107D9C 802E651C 8E620000 */ lw $v0, 0x0($s3) /* 107DA0 802E6520 34420020 */ ori $v0, $v0, 0x20 /* 107DA4 802E6524 AE620000 */ sw $v0, 0x0($s3) /* 107DA8 802E6528 2A02003D */ slti $v0, $s0, 0x3D /* 107DAC 802E652C 14400005 */ bnez $v0, .L802E6544 /* 107DB0 802E6530 0260202D */ daddu $a0, $s3, $zero /* 107DB4 802E6534 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 107DB8 802E6538 44810000 */ mtc1 $at, $f0 /* 107DBC 802E653C 080B9954 */ j .L802E6550 /* 107DC0 802E6540 00000000 */ nop .L802E6544: /* 107DC4 802E6544 3C014120 */ lui $at, (0x41200000 >> 16) /* 107DC8 802E6548 44810000 */ mtc1 $at, $f0 /* 107DCC 802E654C A2400000 */ sb $zero, 0x0($s2) .L802E6550: /* 107DD0 802E6550 0C043F5A */ jal exec_entity_commandlist /* 107DD4 802E6554 E6400028 */ swc1 $f0, 0x28($s2) .L802E6558: /* 107DD8 802E6558 8FBF0020 */ lw $ra, 0x20($sp) /* 107DDC 802E655C 8FB3001C */ lw $s3, 0x1C($sp) /* 107DE0 802E6560 8FB20018 */ lw $s2, 0x18($sp) /* 107DE4 802E6564 8FB10014 */ lw $s1, 0x14($sp) /* 107DE8 802E6568 8FB00010 */ lw $s0, 0x10($sp) /* 107DEC 802E656C 03E00008 */ jr $ra /* 107DF0 802E6570 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void entity_HiddenPanel_idle(Entity* entity) { HiddenPanelData* data = entity->dataBuf.hiddenPanel; s32 distToPlayer; if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) { if (!data->unk_04) { data->unk_04 = TRUE; func_800EF3D4(1); } } else { data->unk_04 = FALSE; } data->standingNpcIndex = -1; data->npcFlags = 0; if (gCurrentHiddenPanels.tryFlipTrigger && fabs(gCurrentHiddenPanels.flipTriggerPosY - entity->position.y) <= 10.0) { data->state = 10; distToPlayer = get_xz_dist_to_player(entity->position.x, entity->position.z); if (distToPlayer <= 100) { if (entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) { data->riseVelocity = 0.5f; exec_entity_commandlist(entity); } else if (entity_HiddenPanel_is_item_on_top(entity)) { data->riseVelocity = 0.5f; exec_entity_commandlist(entity); } else { s32 npcIndex = npc_find_standing_on_entity(entity->listIndex); if (npcIndex >= 0) { Npc* npc = get_npc_by_index(npcIndex); dist2D(entity->position.x, entity->position.z, npc->pos.x, npc->pos.z); data->standingNpcIndex = npcIndex; data->npcFlags = npc->flags & (NPC_FLAG_GRAVITY | NPC_FLAG_8); npc->flags &= ~NPC_FLAG_8; npc->flags |= NPC_FLAG_GRAVITY; data->riseVelocity = 0.5f; exec_entity_commandlist(entity); } else { entity->flags |= ENTITY_FLAG_DISABLE_COLLISION; if (distToPlayer > 60) { data->riseVelocity = 0.5f; exec_entity_commandlist(entity); } else { data->state = 0; data->riseVelocity = 10.0f; exec_entity_commandlist(entity); } } } } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802A2910_7AA2B0 /* 4176A0 802A2910 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 4176A4 802A2914 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 4176A8 802A2918 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 4176AC 802A291C AFB00010 */ sw $s0, 0x10($sp) /* 4176B0 802A2920 0000802D */ daddu $s0, $zero, $zero /* 4176B4 802A2924 AFBF0018 */ sw $ra, 0x18($sp) D_802A2928_7AA2C8: /* 4176B8 802A2928 1840000F */ blez $v0, .L802A2968_7AA308 /* 4176BC 802A292C AFB10014 */ sw $s1, 0x14($sp) /* 4176C0 802A2930 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionIDs) /* 4176C4 802A2934 2631D128 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionIDs) /* 4176C8 802A2938 240500FF */ addiu $a1, $zero, 0xFF .L802A293C_7AA2DC: /* 4176CC 802A293C 00A0302D */ daddu $a2, $a1, $zero /* 4176D0 802A2940 00A0382D */ daddu $a3, $a1, $zero /* 4176D4 802A2944 8E240000 */ lw $a0, 0x0($s1) /* 4176D8 802A2948 0C0513BF */ jal hud_element_set_tint /* 4176DC 802A294C 26310004 */ addiu $s1, $s1, 0x4 /* 4176E0 802A2950 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 4176E4 802A2954 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 4176E8 802A2958 26100001 */ addiu $s0, $s0, 0x1 /* 4176EC 802A295C 0202102A */ slt $v0, $s0, $v0 /* 4176F0 802A2960 1440FFF6 */ bnez $v0, .L802A293C_7AA2DC /* 4176F4 802A2964 240500FF */ addiu $a1, $zero, 0xFF .L802A2968_7AA308: /* 4176F8 802A2968 240500FF */ addiu $a1, $zero, 0xFF /* 4176FC 802A296C 00A0302D */ daddu $a2, $a1, $zero /* 417700 802A2970 3C04802B */ lui $a0, %hi(BattleMenu_Moves_CursorID) /* 417704 802A2974 8C84D118 */ lw $a0, %lo(BattleMenu_Moves_CursorID)($a0) /* 417708 802A2978 0C0513BF */ jal hud_element_set_tint /* 41770C 802A297C 00A0382D */ daddu $a3, $a1, $zero /* 417710 802A2980 240500FF */ addiu $a1, $zero, 0xFF /* 417714 802A2984 00A0302D */ daddu $a2, $a1, $zero /* 417718 802A2988 3C04802B */ lui $a0, %hi(BattleMenu_Moves_UpArrowID) /* 41771C 802A298C 8C84D11C */ lw $a0, %lo(BattleMenu_Moves_UpArrowID)($a0) /* 417720 802A2990 0C0513BF */ jal hud_element_set_tint /* 417724 802A2994 00A0382D */ daddu $a3, $a1, $zero /* 417728 802A2998 240500FF */ addiu $a1, $zero, 0xFF /* 41772C 802A299C 00A0302D */ daddu $a2, $a1, $zero /* 417730 802A29A0 3C04802B */ lui $a0, %hi(BattleMenu_Moves_DownArrowID) /* 417734 802A29A4 8C84D120 */ lw $a0, %lo(BattleMenu_Moves_DownArrowID)($a0) /* 417738 802A29A8 0C0513BF */ jal hud_element_set_tint /* 41773C 802A29AC 00A0382D */ daddu $a3, $a1, $zero /* 417740 802A29B0 240500FF */ addiu $a1, $zero, 0xFF /* 417744 802A29B4 00A0302D */ daddu $a2, $a1, $zero /* 417748 802A29B8 3C04802B */ lui $a0, %hi(BattleMenu_Moves_TitleID) /* 41774C 802A29BC 8C84D188 */ lw $a0, %lo(BattleMenu_Moves_TitleID)($a0) /* 417750 802A29C0 0C0513BF */ jal hud_element_set_tint /* 417754 802A29C4 00A0382D */ daddu $a3, $a1, $zero /* 417758 802A29C8 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 41775C 802A29CC 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) D_802A29D0_7AA370: /* 417760 802A29D0 1840000F */ blez $v0, .L802A2A10_7AA3B0 /* 417764 802A29D4 0000802D */ daddu $s0, $zero, $zero /* 417768 802A29D8 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionCostUnitIDs) /* 41776C 802A29DC 2631D190 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionCostUnitIDs) /* 417770 802A29E0 240500FF */ addiu $a1, $zero, 0xFF .L802A29E4_7AA384: /* 417774 802A29E4 00A0302D */ daddu $a2, $a1, $zero /* 417778 802A29E8 00A0382D */ daddu $a3, $a1, $zero /* 41777C 802A29EC 8E240000 */ lw $a0, 0x0($s1) D_802A29F0_7AA390: /* 417780 802A29F0 0C0513BF */ jal hud_element_set_tint /* 417784 802A29F4 26310004 */ addiu $s1, $s1, 0x4 /* 417788 802A29F8 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 41778C 802A29FC 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 417790 802A2A00 26100001 */ addiu $s0, $s0, 0x1 /* 417794 802A2A04 0202102A */ slt $v0, $s0, $v0 /* 417798 802A2A08 5440FFF6 */ bnel $v0, $zero, .L802A29E4_7AA384 /* 41779C 802A2A0C 240500FF */ addiu $a1, $zero, 0xFF .L802A2A10_7AA3B0: /* 4177A0 802A2A10 3C04802B */ lui $a0, %hi(BattleMenu_Moves_CursorID) /* 4177A4 802A2A14 8C84D118 */ lw $a0, %lo(BattleMenu_Moves_CursorID)($a0) /* 4177A8 802A2A18 3C058010 */ lui $a1, %hi(HES_AnimatedHandPointer) /* 4177AC 802A2A1C 24A54A28 */ addiu $a1, $a1, %lo(HES_AnimatedHandPointer) /* 4177B0 802A2A20 0C0511FF */ jal hud_element_set_script /* 4177B4 802A2A24 00000000 */ nop /* 4177B8 802A2A28 24040001 */ addiu $a0, $zero, 0x1 /* 4177BC 802A2A2C 0C051F9F */ jal set_window_update D_802A2A30_7AA3D0: /* 4177C0 802A2A30 24050005 */ addiu $a1, $zero, 0x5 /* 4177C4 802A2A34 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu) /* 4177C8 802A2A38 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0) /* 4177CC 802A2A3C 54400006 */ bnel $v0, $zero, .L802A2A58_7AA3F8 /* 4177D0 802A2A40 24040004 */ addiu $a0, $zero, 0x4 /* 4177D4 802A2A44 24040002 */ addiu $a0, $zero, 0x2 /* 4177D8 802A2A48 0C051F9F */ jal set_window_update /* 4177DC 802A2A4C 24050005 */ addiu $a1, $zero, 0x5 /* 4177E0 802A2A50 080A8A99 */ j .L802A2A64_7AA404 /* 4177E4 802A2A54 24040003 */ addiu $a0, $zero, 0x3 .L802A2A58_7AA3F8: /* 4177E8 802A2A58 0C051F9F */ jal set_window_update /* 4177EC 802A2A5C 24050005 */ addiu $a1, $zero, 0x5 /* 4177F0 802A2A60 24040005 */ addiu $a0, $zero, 0x5 .L802A2A64_7AA404: /* 4177F4 802A2A64 0C051F9F */ jal set_window_update /* 4177F8 802A2A68 24050005 */ addiu $a1, $zero, 0x5 /* 4177FC 802A2A6C 24040008 */ addiu $a0, $zero, 0x8 /* 417800 802A2A70 0C051F9F */ jal set_window_update /* 417804 802A2A74 24050001 */ addiu $a1, $zero, 0x1 /* 417808 802A2A78 2402000A */ addiu $v0, $zero, 0xA /* 41780C 802A2A7C 8FBF0018 */ lw $ra, 0x18($sp) /* 417810 802A2A80 8FB10014 */ lw $s1, 0x14($sp) /* 417814 802A2A84 8FB00010 */ lw $s0, 0x10($sp) /* 417818 802A2A88 24030001 */ addiu $v1, $zero, 0x1 /* 41781C 802A2A8C 3C01802B */ lui $at, %hi(BattleMenu_Moves_TextColor) /* 417820 802A2A90 A422D114 */ sh $v0, %lo(BattleMenu_Moves_TextColor)($at) /* 417824 802A2A94 240200FF */ addiu $v0, $zero, 0xFF /* 417828 802A2A98 3C01802B */ lui $at, %hi(D_802AD10F) /* 41782C 802A2A9C A023D10F */ sb $v1, %lo(D_802AD10F)($at) /* 417830 802A2AA0 3C01802B */ lui $at, %hi(BattleMenu_Moves_TextAlpha) /* 417834 802A2AA4 A422D116 */ sh $v0, %lo(BattleMenu_Moves_TextAlpha)($at) /* 417838 802A2AA8 3C01802B */ lui $at, %hi(battle_menu_moveState) /* 41783C 802A2AAC A023D108 */ sb $v1, %lo(battle_menu_moveState)($at) /* 417840 802A2AB0 03E00008 */ jr $ra /* 417844 802A2AB4 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void func_802A2910(void) { s32* moveOptionIconIDs; s32* moveOptionCostUnitIconIDs; s32 i; moveOptionIconIDs = BattleMenu_Moves_OptionIDs; for (i = 0; i < BattleMenu_Moves_OptionCount; i++) { hud_element_set_tint(moveOptionIconIDs[i], 255, 255, 255); } hud_element_set_tint(BattleMenu_Moves_CursorID, 255, 255, 255); hud_element_set_tint(BattleMenu_Moves_UpArrowID, 255, 255, 255); hud_element_set_tint(BattleMenu_Moves_DownArrowID, 255, 255, 255); hud_element_set_tint(BattleMenu_Moves_TitleID, 255, 255, 255); moveOptionCostUnitIconIDs = BattleMenu_Moves_OptionCostUnitIDs; for (i = 0; i < BattleMenu_Moves_OptionCount; i++) { hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); } hud_element_set_script(BattleMenu_Moves_CursorID, &HES_AnimatedHandPointer); set_window_update(WINDOW_ID_1, WINDOW_UPDATE_TRANSPARENT); if (!BattleMenu_UsingSpiritsSubmenu) { set_window_update(WINDOW_ID_2, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_3, WINDOW_UPDATE_TRANSPARENT); } else { set_window_update(WINDOW_ID_4, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_5, WINDOW_UPDATE_TRANSPARENT); } set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); BattleMenu_Moves_TextColor = MSG_PAL_STANDARD; D_802AD10F = 1; BattleMenu_Moves_TextAlpha = 255; battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel hide_popup_menu /* 8A860 800F13B0 3C028011 */ lui $v0, %hi(PopupNotBattle) /* 8A864 800F13B4 8042D68E */ lb $v0, %lo(PopupNotBattle)($v0) /* 8A868 800F13B8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 8A86C 800F13BC AFBF0018 */ sw $ra, 0x18($sp) /* 8A870 800F13C0 AFB10014 */ sw $s1, 0x14($sp) /* 8A874 800F13C4 1040001A */ beqz $v0, .L800F1430 /* 8A878 800F13C8 AFB00010 */ sw $s0, 0x10($sp) /* 8A87C 800F13CC 3C028011 */ lui $v0, %hi(gPopupMenu) /* 8A880 800F13D0 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0) /* 8A884 800F13D4 8C430318 */ lw $v1, 0x318($v0) /* 8A888 800F13D8 2C62000E */ sltiu $v0, $v1, 0xE /* 8A88C 800F13DC 10400012 */ beqz $v0, .L800F1428 /* 8A890 800F13E0 00031080 */ sll $v0, $v1, 2 /* 8A894 800F13E4 3C018011 */ lui $at, %hi(jtbl_8010C330) /* 8A898 800F13E8 00220821 */ addu $at, $at, $v0 /* 8A89C 800F13EC 8C22C330 */ lw $v0, %lo(jtbl_8010C330)($at) /* 8A8A0 800F13F0 00400008 */ jr $v0 /* 8A8A4 800F13F4 00000000 */ nop glabel .L800F13F8 /* 8A8A8 800F13F8 2404000E */ addiu $a0, $zero, 0xE /* 8A8AC 800F13FC 3C108014 */ lui $s0, %hi(basic_hidden_window_update) /* 8A8B0 800F1400 26107574 */ addiu $s0, $s0, %lo(basic_hidden_window_update) /* 8A8B4 800F1404 0C051F9F */ jal set_window_update /* 8A8B8 800F1408 0200282D */ daddu $a1, $s0, $zero /* 8A8BC 800F140C 0803C506 */ j .L800F1418 /* 8A8C0 800F1410 24040013 */ addiu $a0, $zero, 0x13 glabel .L800F1414 /* 8A8C4 800F1414 2404000E */ addiu $a0, $zero, 0xE .L800F1418: /* 8A8C8 800F1418 3C058014 */ lui $a1, %hi(basic_hidden_window_update) /* 8A8CC 800F141C 24A57574 */ addiu $a1, $a1, %lo(basic_hidden_window_update) /* 8A8D0 800F1420 0C051F9F */ jal set_window_update /* 8A8D4 800F1424 00000000 */ nop .L800F1428: /* 8A8D8 800F1428 0803C51D */ j .L800F1474 /* 8A8DC 800F142C 24040015 */ addiu $a0, $zero, 0x15 .L800F1430: /* 8A8E0 800F1430 3C028011 */ lui $v0, %hi(gPopupMenu) /* 8A8E4 800F1434 8C42D69C */ lw $v0, %lo(gPopupMenu)($v0) /* 8A8E8 800F1438 8C430318 */ lw $v1, 0x318($v0) /* 8A8EC 800F143C 2C62000E */ sltiu $v0, $v1, 0xE /* 8A8F0 800F1440 1040000E */ beqz $v0, .L800F147C /* 8A8F4 800F1444 00031080 */ sll $v0, $v1, 2 /* 8A8F8 800F1448 3C018011 */ lui $at, %hi(jtbl_8010C368) /* 8A8FC 800F144C 00220821 */ addu $at, $at, $v0 /* 8A900 800F1450 8C22C368 */ lw $v0, %lo(jtbl_8010C368)($at) /* 8A904 800F1454 00400008 */ jr $v0 /* 8A908 800F1458 00000000 */ nop glabel .L800F145C /* 8A90C 800F145C 2404000E */ addiu $a0, $zero, 0xE /* 8A910 800F1460 0C051F9F */ jal set_window_update /* 8A914 800F1464 24050002 */ addiu $a1, $zero, 0x2 /* 8A918 800F1468 0803C51D */ j .L800F1474 /* 8A91C 800F146C 24040013 */ addiu $a0, $zero, 0x13 glabel .L800F1470 /* 8A920 800F1470 2404000E */ addiu $a0, $zero, 0xE .L800F1474: /* 8A924 800F1474 0C051F9F */ jal set_window_update /* 8A928 800F1478 24050002 */ addiu $a1, $zero, 0x2 .L800F147C: /* 8A92C 800F147C 3C118011 */ lui $s1, %hi(gPopupMenu) /* 8A930 800F1480 2631D69C */ addiu $s1, $s1, %lo(gPopupMenu) /* 8A934 800F1484 8E220000 */ lw $v0, 0x0($s1) /* 8A938 800F1488 8C430318 */ lw $v1, 0x318($v0) /* 8A93C 800F148C 24020003 */ addiu $v0, $zero, 0x3 /* 8A940 800F1490 14620008 */ bne $v1, $v0, .L800F14B4 /* 8A944 800F1494 24040010 */ addiu $a0, $zero, 0x10 /* 8A948 800F1498 3C108014 */ lui $s0, %hi(basic_hidden_window_update) /* 8A94C 800F149C 26107574 */ addiu $s0, $s0, %lo(basic_hidden_window_update) /* 8A950 800F14A0 0C051F9F */ jal set_window_update /* 8A954 800F14A4 0200282D */ daddu $a1, $s0, $zero /* 8A958 800F14A8 24040014 */ addiu $a0, $zero, 0x14 /* 8A95C 800F14AC 0C051F9F */ jal set_window_update /* 8A960 800F14B0 0200282D */ daddu $a1, $s0, $zero .L800F14B4: /* 8A964 800F14B4 8E220000 */ lw $v0, 0x0($s1) /* 8A968 800F14B8 8C430318 */ lw $v1, 0x318($v0) /* 8A96C 800F14BC 24020004 */ addiu $v0, $zero, 0x4 /* 8A970 800F14C0 14620005 */ bne $v1, $v0, .L800F14D8 /* 8A974 800F14C4 00000000 */ nop /* 8A978 800F14C8 3C058014 */ lui $a1, %hi(basic_hidden_window_update) /* 8A97C 800F14CC 24A57574 */ addiu $a1, $a1, %lo(basic_hidden_window_update) /* 8A980 800F14D0 0C051F9F */ jal set_window_update /* 8A984 800F14D4 24040012 */ addiu $a0, $zero, 0x12 .L800F14D8: /* 8A988 800F14D8 8E220000 */ lw $v0, 0x0($s1) /* 8A98C 800F14DC 8C430318 */ lw $v1, 0x318($v0) /* 8A990 800F14E0 24020005 */ addiu $v0, $zero, 0x5 /* 8A994 800F14E4 14620008 */ bne $v1, $v0, .L800F1508 /* 8A998 800F14E8 24040010 */ addiu $a0, $zero, 0x10 /* 8A99C 800F14EC 3C108014 */ lui $s0, %hi(basic_hidden_window_update) /* 8A9A0 800F14F0 26107574 */ addiu $s0, $s0, %lo(basic_hidden_window_update) /* 8A9A4 800F14F4 0C051F9F */ jal set_window_update /* 8A9A8 800F14F8 0200282D */ daddu $a1, $s0, $zero /* 8A9AC 800F14FC 24040014 */ addiu $a0, $zero, 0x14 /* 8A9B0 800F1500 0C051F9F */ jal set_window_update /* 8A9B4 800F1504 0200282D */ daddu $a1, $s0, $zero .L800F1508: /* 8A9B8 800F1508 3C038011 */ lui $v1, %hi(D_8010D692) /* 8A9BC 800F150C 8063D692 */ lb $v1, %lo(D_8010D692)($v1) /* 8A9C0 800F1510 8FBF0018 */ lw $ra, 0x18($sp) /* 8A9C4 800F1514 8FB10014 */ lw $s1, 0x14($sp) /* 8A9C8 800F1518 8FB00010 */ lw $s0, 0x10($sp) /* 8A9CC 800F151C 2402000A */ addiu $v0, $zero, 0xA /* 8A9D0 800F1520 3C018011 */ lui $at, %hi(gPopupState) /* 8A9D4 800F1524 AC22D640 */ sw $v0, %lo(gPopupState)($at) /* 8A9D8 800F1528 3C018011 */ lui $at, %hi(D_8010D644) /* 8A9DC 800F152C AC23D644 */ sw $v1, %lo(D_8010D644)($at) /* 8A9E0 800F1530 03E00008 */ jr $ra /* 8A9E4 800F1534 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void hide_popup_menu(void) { if (PopupNotBattle) { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_THROW_AWAY_ITEM: case POPUP_MENU_TRADE_FOR_BADGE: case POPUP_MENU_UPGRADE_PARTNER: case POPUP_MENU_SELL_ITEM: case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: set_window_update(WINDOW_ID_14, (s32) basic_hidden_window_update); set_window_update(WINDOW_ID_19, (s32) basic_hidden_window_update); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: set_window_update(WINDOW_ID_14, (s32) basic_hidden_window_update); break; } set_window_update(WINDOW_ID_21, WINDOW_UPDATE_HIDE); } else { switch (gPopupMenu->popupType) { case POPUP_MENU_USE_ITEM: case POPUP_MENU_SWITCH_PARTNER: case POPUP_MENU_THROW_AWAY_ITEM: case POPUP_MENU_TRADE_FOR_BADGE: case POPUP_MENU_UPGRADE_PARTNER: case POPUP_MENU_SELL_ITEM: case POPUP_MENU_CHECK_ITEM: case POPUP_MENU_CLAIM_ITEM: case POPUP_MENU_READ_LETTER: case POPUP_MENU_TAKE_FROM_CHEST: case POPUP_MENU_USEKEY: set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_19, WINDOW_UPDATE_HIDE); break; case POPUP_MENU_READ_DIARY_PAGE: case POPUP_MENU_READ_POSTCARD: case POPUP_MENU_POST_OFFICE: set_window_update(WINDOW_ID_14, WINDOW_UPDATE_HIDE); break; } } if (gPopupMenu->popupType == POPUP_MENU_TRADE_FOR_BADGE) { set_window_update(WINDOW_ID_16, (s32) basic_hidden_window_update); set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_hidden_window_update); } if (gPopupMenu->popupType == POPUP_MENU_UPGRADE_PARTNER) { set_window_update(WINDOW_ID_18, (s32) basic_hidden_window_update); } if (gPopupMenu->popupType == POPUP_MENU_SELL_ITEM) { set_window_update(WINDOW_ID_16, (s32) basic_hidden_window_update); set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32) basic_hidden_window_update); } gPopupState = POPUP_STATE_10; D_8010D644 = D_8010D692; }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_step_exit_file_select /* 10F40 80035B40 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 10F44 80035B44 AFBF0014 */ sw $ra, 0x14($sp) /* 10F48 80035B48 0C0912F1 */ jal func_80244BC4 /* 10F4C 80035B4C AFB00010 */ sw $s0, 0x10($sp) /* 10F50 80035B50 3C03800A */ lui $v1, %hi(D_800A0931) /* 10F54 80035B54 80630931 */ lb $v1, %lo(D_800A0931)($v1) /* 10F58 80035B58 0040802D */ daddu $s0, $v0, $zero /* 10F5C 80035B5C 2C620007 */ sltiu $v0, $v1, 0x7 /* 10F60 80035B60 10400069 */ beqz $v0, .L80035D08 /* 10F64 80035B64 00031080 */ sll $v0, $v1, 2 /* 10F68 80035B68 3C01800A */ lui $at, %hi(jtbl_80098300) /* 10F6C 80035B6C 00220821 */ addu $at, $at, $v0 /* 10F70 80035B70 8C228300 */ lw $v0, %lo(jtbl_80098300)($at) /* 10F74 80035B74 00400008 */ jr $v0 /* 10F78 80035B78 00000000 */ nop glabel .L80035B7C /* 10F7C 80035B7C 0000282D */ daddu $a1, $zero, $zero /* 10F80 80035B80 2404002C */ addiu $a0, $zero, 0x2C /* 10F84 80035B84 0080382D */ daddu $a3, $a0, $zero /* 10F88 80035B88 2406FFFF */ addiu $a2, $zero, -0x1 /* 10F8C 80035B8C 3C038016 */ lui $v1, %hi(D_8015A2D0) /* 10F90 80035B90 2463A2D0 */ addiu $v1, $v1, %lo(D_8015A2D0) .L80035B94: /* 10F94 80035B94 80620003 */ lb $v0, 0x3($v1) /* 10F98 80035B98 10470003 */ beq $v0, $a3, .L80035BA8 /* 10F9C 80035B9C 00000000 */ nop /* 10FA0 80035BA0 54460005 */ bnel $v0, $a2, .L80035BB8 /* 10FA4 80035BA4 24840001 */ addiu $a0, $a0, 0x1 .L80035BA8: /* 10FA8 80035BA8 90620000 */ lbu $v0, 0x0($v1) /* 10FAC 80035BAC 30420008 */ andi $v0, $v0, 0x8 /* 10FB0 80035BB0 00A22821 */ addu $a1, $a1, $v0 /* 10FB4 80035BB4 24840001 */ addiu $a0, $a0, 0x1 .L80035BB8: /* 10FB8 80035BB8 28820040 */ slti $v0, $a0, 0x40 /* 10FBC 80035BBC 1440FFF5 */ bnez $v0, .L80035B94 /* 10FC0 80035BC0 24630020 */ addiu $v1, $v1, 0x20 /* 10FC4 80035BC4 14A00050 */ bnez $a1, .L80035D08 /* 10FC8 80035BC8 24020001 */ addiu $v0, $zero, 0x1 /* 10FCC 80035BCC 3C01800A */ lui $at, %hi(D_800A0931) /* 10FD0 80035BD0 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 10FD4 80035BD4 0800D742 */ j .L80035D08 /* 10FD8 80035BD8 00000000 */ nop glabel .L80035BDC /* 10FDC 80035BDC 12000008 */ beqz $s0, .L80035C00 /* 10FE0 80035BE0 24020002 */ addiu $v0, $zero, 0x2 /* 10FE4 80035BE4 3C04800A */ lui $a0, %hi(D_800A0932) /* 10FE8 80035BE8 24840932 */ addiu $a0, $a0, %lo(D_800A0932) /* 10FEC 80035BEC 0C04E0AB */ jal update_exit_map_screen_overlay /* 10FF0 80035BF0 00000000 */ nop /* 10FF4 80035BF4 00021400 */ sll $v0, $v0, 16 /* 10FF8 80035BF8 10400043 */ beqz $v0, .L80035D08 /* 10FFC 80035BFC 24020002 */ addiu $v0, $zero, 0x2 .L80035C00: /* 11000 80035C00 3C01800A */ lui $at, %hi(D_800A0931) /* 11004 80035C04 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 11008 80035C08 0800D742 */ j .L80035D08 /* 1100C 80035C0C 00000000 */ nop glabel .L80035C10 /* 11010 80035C10 0C0912C0 */ jal func_80244B00 /* 11014 80035C14 00000000 */ nop /* 11018 80035C18 0C051FB1 */ jal set_windows_visible /* 1101C 80035C1C 0000202D */ daddu $a0, $zero, $zero /* 11020 80035C20 24020003 */ addiu $v0, $zero, 0x3 /* 11024 80035C24 3C01800A */ lui $at, %hi(D_800A0931) /* 11028 80035C28 A0220931 */ sb $v0, %lo(D_800A0931)($at) glabel .L80035C2C /* 1102C 80035C2C 0C009C22 */ jal set_time_freeze_mode /* 11030 80035C30 0000202D */ daddu $a0, $zero, $zero /* 11034 80035C34 1600000B */ bnez $s0, .L80035C64 /* 11038 80035C38 2402000A */ addiu $v0, $zero, 0xA /* 1103C 80035C3C 0C00CD3C */ jal set_game_mode /* 11040 80035C40 24040002 */ addiu $a0, $zero, 0x2 /* 11044 80035C44 3C04FFFE */ lui $a0, (0xFFFEFFFF >> 16) /* 11048 80035C48 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 1104C 80035C4C 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 11050 80035C50 8C620000 */ lw $v0, 0x0($v1) /* 11054 80035C54 3484FFFF */ ori $a0, $a0, (0xFFFEFFFF & 0xFFFF) /* 11058 80035C58 00441024 */ and $v0, $v0, $a0 /* 1105C 80035C5C 0800D742 */ j .L80035D08 /* 11060 80035C60 AC620000 */ sw $v0, 0x0($v1) .L80035C64: /* 11064 80035C64 3C01800A */ lui $at, %hi(D_800A0930) /* 11068 80035C68 A0220930 */ sb $v0, %lo(D_800A0930)($at) /* 1106C 80035C6C 24020004 */ addiu $v0, $zero, 0x4 /* 11070 80035C70 3C01800A */ lui $at, %hi(D_800A0931) /* 11074 80035C74 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 11078 80035C78 0800D742 */ j .L80035D08 /* 1107C 80035C7C 00000000 */ nop glabel .L80035C80 /* 11080 80035C80 3C10800A */ lui $s0, %hi(D_800A0930) /* 11084 80035C84 26100930 */ addiu $s0, $s0, %lo(D_800A0930) /* 11088 80035C88 82020000 */ lb $v0, 0x0($s0) /* 1108C 80035C8C 92030000 */ lbu $v1, 0x0($s0) /* 11090 80035C90 18400003 */ blez $v0, .L80035CA0 /* 11094 80035C94 2462FFFF */ addiu $v0, $v1, -0x1 /* 11098 80035C98 0800D742 */ j .L80035D08 /* 1109C 80035C9C A2020000 */ sb $v0, 0x0($s0) .L80035CA0: /* 110A0 80035CA0 3C014000 */ lui $at, (0x40000000 >> 16) /* 110A4 80035CA4 44816000 */ mtc1 $at, $f12 /* 110A8 80035CA8 0C00AFB7 */ jal set_curtain_scale_goal /* 110AC 80035CAC 00000000 */ nop /* 110B0 80035CB0 2402000A */ addiu $v0, $zero, 0xA /* 110B4 80035CB4 A2020000 */ sb $v0, 0x0($s0) /* 110B8 80035CB8 24020005 */ addiu $v0, $zero, 0x5 /* 110BC 80035CBC 3C01800A */ lui $at, %hi(D_800A0931) /* 110C0 80035CC0 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 110C4 80035CC4 0800D742 */ j .L80035D08 /* 110C8 80035CC8 00000000 */ nop glabel .L80035CCC /* 110CC 80035CCC 3C04800A */ lui $a0, %hi(D_800A0930) /* 110D0 80035CD0 24840930 */ addiu $a0, $a0, %lo(D_800A0930) /* 110D4 80035CD4 80820000 */ lb $v0, 0x0($a0) /* 110D8 80035CD8 90830000 */ lbu $v1, 0x0($a0) /* 110DC 80035CDC 18400003 */ blez $v0, .L80035CEC /* 110E0 80035CE0 2462FFFF */ addiu $v0, $v1, -0x1 /* 110E4 80035CE4 0800D742 */ j .L80035D08 /* 110E8 80035CE8 A0820000 */ sb $v0, 0x0($a0) .L80035CEC: /* 110EC 80035CEC 24020006 */ addiu $v0, $zero, 0x6 /* 110F0 80035CF0 3C01800A */ lui $at, %hi(D_800A0931) /* 110F4 80035CF4 A0220931 */ sb $v0, %lo(D_800A0931)($at) /* 110F8 80035CF8 0800D742 */ j .L80035D08 /* 110FC 80035CFC 00000000 */ nop glabel .L80035D00 /* 11100 80035D00 0C00CD3C */ jal set_game_mode /* 11104 80035D04 24040007 */ addiu $a0, $zero, 0x7 .L80035D08: /* 11108 80035D08 8FBF0014 */ lw $ra, 0x14($sp) /* 1110C 80035D0C 8FB00010 */ lw $s0, 0x10($sp) /* 11110 80035D10 03E00008 */ jr $ra /* 11114 80035D14 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void state_step_exit_file_select(void) { s32 temp_s0 = func_80244BC4(); s32 flagSum; s32 i; switch (D_800A0931) { case 0: flagSum = 0; for (i = 44; i < ARRAY_COUNT(gWindows); i++) { Window* window = &gWindows[i]; if (window->parent == WINDOW_ID_FILEMENU_MAIN || window->parent == -1) { flagSum += window->flags & WINDOW_FLAG_INITIAL_ANIMATION; } } if (flagSum == 0) { D_800A0931 = 1; } break; case 1: if (temp_s0 == 0 || update_exit_map_screen_overlay(D_800A0932) != 0) { D_800A0931 = 2; } break; case 2: filemenu_cleanup(); set_windows_visible(WINDOW_GROUP_ALL); D_800A0931 = 3; case 3: set_time_freeze_mode(TIME_FREEZE_NORMAL); if (temp_s0 == 0) { set_game_mode(GAME_MODE_TITLE_SCREEN); gOverrideFlags &= ~GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS; } else { D_800A0930 = 10; D_800A0931 = 4; } break; case 4: if (D_800A0930 > 0) { D_800A0930--; } else { set_curtain_scale_goal(2.0f); D_800A0930 = 10; D_800A0931 = 5; } break; case 5: if (D_800A0930 > 0) { D_800A0930--; } else { D_800A0931 = 6; } break; case 6: set_game_mode(GAME_MODE_WORLD); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80054AA0 /* 2FEA0 80054AA0 3C028008 */ lui $v0, %hi(gSynDriverPtr) /* 2FEA4 80054AA4 8C428E54 */ lw $v0, %lo(gSynDriverPtr)($v0) /* 2FEA8 80054AA8 27BDFF80 */ addiu $sp, $sp, -0x80 /* 2FEAC 80054AAC AFB60070 */ sw $s6, 0x70($sp) /* 2FEB0 80054AB0 0080B02D */ daddu $s6, $a0, $zero /* 2FEB4 80054AB4 AFB30064 */ sw $s3, 0x64($sp) /* 2FEB8 80054AB8 00A0982D */ daddu $s3, $a1, $zero /* 2FEBC 80054ABC AFB40068 */ sw $s4, 0x68($sp) /* 2FEC0 80054AC0 27B40018 */ addiu $s4, $sp, 0x18 /* 2FEC4 80054AC4 AFBE0078 */ sw $fp, 0x78($sp) /* 2FEC8 80054AC8 0000F02D */ daddu $fp, $zero, $zero /* 2FECC 80054ACC AFB1005C */ sw $s1, 0x5C($sp) /* 2FED0 80054AD0 2411000B */ addiu $s1, $zero, 0xB /* 2FED4 80054AD4 AFB20060 */ sw $s2, 0x60($sp) /* 2FED8 80054AD8 24120001 */ addiu $s2, $zero, 0x1 /* 2FEDC 80054ADC AFBF007C */ sw $ra, 0x7C($sp) /* 2FEE0 80054AE0 AFB70074 */ sw $s7, 0x74($sp) /* 2FEE4 80054AE4 AFB5006C */ sw $s5, 0x6C($sp) /* 2FEE8 80054AE8 AFB00058 */ sw $s0, 0x58($sp) /* 2FEEC 80054AEC AFA60088 */ sw $a2, 0x88($sp) /* 2FEF0 80054AF0 AFA7008C */ sw $a3, 0x8C($sp) /* 2FEF4 80054AF4 8C570018 */ lw $s7, 0x18($v0) /* 2FEF8 80054AF8 2402000B */ addiu $v0, $zero, 0xB .L80054AFC: /* 2FEFC 80054AFC 1222000A */ beq $s1, $v0, .L80054B28 /* 2FF00 80054B00 2E22000C */ sltiu $v0, $s1, 0xC /* 2FF04 80054B04 54400042 */ bnel $v0, $zero, .L80054C10 /* 2FF08 80054B08 0000902D */ daddu $s2, $zero, $zero /* 2FF0C 80054B0C 24020015 */ addiu $v0, $zero, 0x15 /* 2FF10 80054B10 12220015 */ beq $s1, $v0, .L80054B68 /* 2FF14 80054B14 2402001F */ addiu $v0, $zero, 0x1F /* 2FF18 80054B18 52220035 */ beql $s1, $v0, .L80054BF0 /* 2FF1C 80054B1C AFA00010 */ sw $zero, 0x10($sp) /* 2FF20 80054B20 08015304 */ j .L80054C10 /* 2FF24 80054B24 0000902D */ daddu $s2, $zero, $zero .L80054B28: /* 2FF28 80054B28 27A50018 */ addiu $a1, $sp, 0x18 /* 2FF2C 80054B2C 8EC40000 */ lw $a0, 0x0($s6) /* 2FF30 80054B30 0C015380 */ jal au_read_rom /* 2FF34 80054B34 24060040 */ addiu $a2, $zero, 0x40 /* 2FF38 80054B38 96830000 */ lhu $v1, 0x0($s4) /* 2FF3C 80054B3C 2402424B */ addiu $v0, $zero, 0x424B /* 2FF40 80054B40 54620033 */ bnel $v1, $v0, .L80054C10 /* 2FF44 80054B44 0000902D */ daddu $s2, $zero, $zero /* 2FF48 80054B48 8E820004 */ lw $v0, 0x4($s4) /* 2FF4C 80054B4C 1040002F */ beqz $v0, .L80054C0C /* 2FF50 80054B50 24024352 */ addiu $v0, $zero, 0x4352 /* 2FF54 80054B54 9683000C */ lhu $v1, 0xC($s4) /* 2FF58 80054B58 5462002D */ bnel $v1, $v0, .L80054C10 /* 2FF5C 80054B5C 0000902D */ daddu $s2, $zero, $zero /* 2FF60 80054B60 08015304 */ j .L80054C10 /* 2FF64 80054B64 24110015 */ addiu $s1, $zero, 0x15 .L80054B68: /* 2FF68 80054B68 16600005 */ bnez $s3, .L80054B80 /* 2FF6C 80054B6C 02E0202D */ daddu $a0, $s7, $zero /* 2FF70 80054B70 8E860004 */ lw $a2, 0x4($s4) /* 2FF74 80054B74 0C015FE4 */ jal alHeapAlloc /* 2FF78 80054B78 24050001 */ addiu $a1, $zero, 0x1 /* 2FF7C 80054B7C 0040982D */ daddu $s3, $v0, $zero .L80054B80: /* 2FF80 80054B80 8EC40000 */ lw $a0, 0x0($s6) /* 2FF84 80054B84 8E860004 */ lw $a2, 0x4($s4) /* 2FF88 80054B88 0C015380 */ jal au_read_rom /* 2FF8C 80054B8C 0260282D */ daddu $a1, $s3, $zero /* 2FF90 80054B90 8FA4008C */ lw $a0, 0x8C($sp) /* 2FF94 80054B94 8FA50088 */ lw $a1, 0x88($sp) /* 2FF98 80054B98 0C0151D1 */ jal au_get_BK_instruments /* 2FF9C 80054B9C 0000802D */ daddu $s0, $zero, $zero /* 2FFA0 80054BA0 0040A82D */ daddu $s5, $v0, $zero /* 2FFA4 80054BA4 02A0182D */ daddu $v1, $s5, $zero /* 2FFA8 80054BA8 0200282D */ daddu $a1, $s0, $zero /* 2FFAC 80054BAC 0280202D */ daddu $a0, $s4, $zero .L80054BB0: /* 2FFB0 80054BB0 94820012 */ lhu $v0, 0x12($a0) /* 2FFB4 80054BB4 10400004 */ beqz $v0, .L80054BC8 /* 2FFB8 80054BB8 00531021 */ addu $v0, $v0, $s3 /* 2FFBC 80054BBC 26100001 */ addiu $s0, $s0, 0x1 /* 2FFC0 80054BC0 080152F3 */ j .L80054BCC /* 2FFC4 80054BC4 AC620000 */ sw $v0, 0x0($v1) .L80054BC8: /* 2FFC8 80054BC8 AC600000 */ sw $zero, 0x0($v1) .L80054BCC: /* 2FFCC 80054BCC 24630004 */ addiu $v1, $v1, 0x4 /* 2FFD0 80054BD0 24A50001 */ addiu $a1, $a1, 0x1 /* 2FFD4 80054BD4 2CA20010 */ sltiu $v0, $a1, 0x10 /* 2FFD8 80054BD8 1440FFF5 */ bnez $v0, .L80054BB0 /* 2FFDC 80054BDC 24840002 */ addiu $a0, $a0, 0x2 /* 2FFE0 80054BE0 5200000B */ beql $s0, $zero, .L80054C10 /* 2FFE4 80054BE4 0000902D */ daddu $s2, $zero, $zero /* 2FFE8 80054BE8 08015304 */ j .L80054C10 /* 2FFEC 80054BEC 2411001F */ addiu $s1, $zero, 0x1F .L80054BF0: /* 2FFF0 80054BF0 0260202D */ daddu $a0, $s3, $zero /* 2FFF4 80054BF4 0260282D */ daddu $a1, $s3, $zero /* 2FFF8 80054BF8 02A0302D */ daddu $a2, $s5, $zero /* 2FFFC 80054BFC 0C01527E */ jal au_swizzle_BK_instruments /* 30000 80054C00 24070010 */ addiu $a3, $zero, 0x10 /* 30004 80054C04 08015304 */ j .L80054C10 /* 30008 80054C08 0000882D */ daddu $s1, $zero, $zero .L80054C0C: /* 3000C 80054C0C 0000902D */ daddu $s2, $zero, $zero .L80054C10: /* 30010 80054C10 1640FFBA */ bnez $s2, .L80054AFC /* 30014 80054C14 2402000B */ addiu $v0, $zero, 0xB /* 30018 80054C18 0260102D */ daddu $v0, $s3, $zero /* 3001C 80054C1C 8FBF007C */ lw $ra, 0x7C($sp) /* 30020 80054C20 8FBE0078 */ lw $fp, 0x78($sp) /* 30024 80054C24 8FB70074 */ lw $s7, 0x74($sp) /* 30028 80054C28 8FB60070 */ lw $s6, 0x70($sp) /* 3002C 80054C2C 8FB5006C */ lw $s5, 0x6C($sp) /* 30030 80054C30 8FB40068 */ lw $s4, 0x68($sp) /* 30034 80054C34 8FB30064 */ lw $s3, 0x64($sp) /* 30038 80054C38 8FB20060 */ lw $s2, 0x60($sp) /* 3003C 80054C3C 8FB1005C */ lw $s1, 0x5C($sp) /* 30040 80054C40 8FB00058 */ lw $s0, 0x58($sp) /* 30044 80054C44 03E00008 */ jr $ra /* 30048 80054C48 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: s32* func_80054AA0(s32* bkFileOffset, void* vaddr, s32 bankIndex, s32 bankGroup) { ALHeap* heap = gSynDriverPtr->heap; BKHeader localHeader; void* fileData = vaddr; BKHeader* header = &localHeader; InstrumentGroup* group; Instrument* instruments; Instrument** inst; u32 instrCount; u32 readState; s32 keepReading; u32 i; s32 swizzleArg; swizzleArg = 0; readState = BK_READ_FETCH_HEADER; keepReading = TRUE; while (keepReading) { switch (readState) { case BK_READ_DONE: keepReading = FALSE; break; case BK_READ_FETCH_HEADER: au_read_rom(*bkFileOffset, &localHeader, sizeof(localHeader)); if (header->signature != AL_HEADER_SIG_BK) { keepReading = FALSE; } else if (header->size == 0) { keepReading = FALSE; } else if (header->format != AL_HEADER_SIG_CR) { keepReading = FALSE; } else { readState = BK_READ_FETCH_DATA; } break; case BK_READ_FETCH_DATA: if (fileData == NULL) { fileData = alHeapAlloc(heap, 1, header->size); } au_read_rom(*bkFileOffset, fileData, header->size); instrCount = 0; group = au_get_BK_instruments(bankGroup, bankIndex); inst = (*group); for(i = 0; i < ARRAY_COUNT(header->instruments); inst++, i++) { u16 instOffset = header->instruments[i]; if(instOffset != 0) { instrCount++; *inst = AU_FILE_RELATIVE(fileData, instOffset); } else { *inst = NULL; } } if (instrCount != 0) { readState = BK_READ_SWIZZLE; } else { keepReading = FALSE; } break; case BK_READ_SWIZZLE: au_swizzle_BK_instruments((s32)fileData, fileData, *group, 0x10U, swizzleArg); readState = BK_READ_DONE; break; default: keepReading = FALSE; break; } } return fileData; }
### RAW ASSEMBLY INSTRUCTIONS: glabel osPfsInitPak /* 44590 80069190 27BDFF90 */ addiu $sp, $sp, -0x70 /* 44594 80069194 AFB20060 */ sw $s2, 0x60($sp) /* 44598 80069198 00809021 */ addu $s2, $a0, $zero /* 4459C 8006919C AFB1005C */ sw $s1, 0x5C($sp) /* 445A0 800691A0 00A08821 */ addu $s1, $a1, $zero /* 445A4 800691A4 AFB30064 */ sw $s3, 0x64($sp) /* 445A8 800691A8 00C09821 */ addu $s3, $a2, $zero /* 445AC 800691AC AFBF0068 */ sw $ra, 0x68($sp) /* 445B0 800691B0 0C019771 */ jal __osSiGetAccess /* 445B4 800691B4 AFB00058 */ sw $s0, 0x58($sp) /* 445B8 800691B8 02402021 */ addu $a0, $s2, $zero /* 445BC 800691BC 0C01A530 */ jal __osPfsGetStatus /* 445C0 800691C0 02602821 */ addu $a1, $s3, $zero /* 445C4 800691C4 0C01978C */ jal __osSiRelAccess /* 445C8 800691C8 00408021 */ addu $s0, $v0, $zero /* 445CC 800691CC 16000067 */ bnez $s0, .L8006936C /* 445D0 800691D0 02001021 */ addu $v0, $s0, $zero /* 445D4 800691D4 02202021 */ addu $a0, $s1, $zero /* 445D8 800691D8 AE320004 */ sw $s2, 0x4($s1) /* 445DC 800691DC AE330008 */ sw $s3, 0x8($s1) /* 445E0 800691E0 0C01A4E2 */ jal osPfsCheckRamArea /* 445E4 800691E4 AE200000 */ sw $zero, 0x0($s1) /* 445E8 800691E8 00408021 */ addu $s0, $v0, $zero /* 445EC 800691EC 1600005F */ bnez $s0, .L8006936C /* 445F0 800691F0 02202021 */ addu $a0, $s1, $zero /* 445F4 800691F4 0C01A5B4 */ jal __osPfsSelectBank /* 445F8 800691F8 00002821 */ addu $a1, $zero, $zero /* 445FC 800691FC 00408021 */ addu $s0, $v0, $zero /* 44600 80069200 1600005A */ bnez $s0, .L8006936C /* 44604 80069204 24060001 */ addiu $a2, $zero, 0x1 /* 44608 80069208 8E240004 */ lw $a0, 0x4($s1) /* 4460C 8006920C 8E250008 */ lw $a1, 0x8($s1) /* 44610 80069210 0C01A874 */ jal __osContRamRead /* 44614 80069214 27A70010 */ addiu $a3, $sp, 0x10 /* 44618 80069218 00408021 */ addu $s0, $v0, $zero /* 4461C 8006921C 16000053 */ bnez $s0, .L8006936C /* 44620 80069220 27A40010 */ addiu $a0, $sp, 0x10 /* 44624 80069224 27A50050 */ addiu $a1, $sp, 0x50 /* 44628 80069228 0C01A5DD */ jal __osIdCheckSum /* 4462C 8006922C 27A60052 */ addiu $a2, $sp, 0x52 /* 44630 80069230 97A3002C */ lhu $v1, 0x2C($sp) /* 44634 80069234 97A20050 */ lhu $v0, 0x50($sp) /* 44638 80069238 14620005 */ bne $v1, $v0, .L80069250 /* 4463C 8006923C 27B20010 */ addiu $s2, $sp, 0x10 /* 44640 80069240 97A3002E */ lhu $v1, 0x2E($sp) /* 44644 80069244 97A20052 */ lhu $v0, 0x52($sp) /* 44648 80069248 1062000B */ beq $v1, $v0, .L80069278 /* 4464C 8006924C 00000000 */ nop .L80069250: /* 44650 80069250 02202021 */ addu $a0, $s1, $zero /* 44654 80069254 0C01A6A9 */ jal __osCheckPackId /* 44658 80069258 02402821 */ addu $a1, $s2, $zero /* 4465C 8006925C 00408021 */ addu $s0, $v0, $zero /* 44660 80069260 12000005 */ beqz $s0, .L80069278 /* 44664 80069264 00000000 */ nop /* 44668 80069268 8E230000 */ lw $v1, 0x0($s1) /* 4466C 8006926C 34630004 */ ori $v1, $v1, 0x4 /* 44670 80069270 0801A4DB */ j .L8006936C /* 44674 80069274 AE230000 */ sw $v1, 0x0($s1) .L80069278: /* 44678 80069278 96420018 */ lhu $v0, 0x18($s2) /* 4467C 8006927C 30420001 */ andi $v0, $v0, 0x1 /* 44680 80069280 14400015 */ bnez $v0, .L800692D8 /* 44684 80069284 02402021 */ addu $a0, $s2, $zero /* 44688 80069288 02202021 */ addu $a0, $s1, $zero /* 4468C 8006928C 02402821 */ addu $a1, $s2, $zero /* 44690 80069290 27B20030 */ addiu $s2, $sp, 0x30 /* 44694 80069294 0C01A5EE */ jal __osRepairPackId /* 44698 80069298 02403021 */ addu $a2, $s2, $zero /* 4469C 8006929C 00408021 */ addu $s0, $v0, $zero /* 446A0 800692A0 12000007 */ beqz $s0, .L800692C0 /* 446A4 800692A4 2402000A */ addiu $v0, $zero, 0xA /* 446A8 800692A8 16020030 */ bne $s0, $v0, .L8006936C /* 446AC 800692AC 02001021 */ addu $v0, $s0, $zero /* 446B0 800692B0 8E220000 */ lw $v0, 0x0($s1) /* 446B4 800692B4 34420004 */ ori $v0, $v0, 0x4 /* 446B8 800692B8 0801A4DA */ j .L80069368 /* 446BC 800692BC AE220000 */ sw $v0, 0x0($s1) .L800692C0: /* 446C0 800692C0 97A20048 */ lhu $v0, 0x48($sp) /* 446C4 800692C4 30420001 */ andi $v0, $v0, 0x1 /* 446C8 800692C8 14400003 */ bnez $v0, .L800692D8 /* 446CC 800692CC 02402021 */ addu $a0, $s2, $zero /* 446D0 800692D0 0801A4DB */ j .L8006936C /* 446D4 800692D4 2402000B */ addiu $v0, $zero, 0xB .L800692D8: /* 446D8 800692D8 2625000C */ addiu $a1, $s1, 0xC /* 446DC 800692DC 0C019194 */ jal bcopy /* 446E0 800692E0 24060020 */ addiu $a2, $zero, 0x20 /* 446E4 800692E4 8E240004 */ lw $a0, 0x4($s1) /* 446E8 800692E8 8E250008 */ lw $a1, 0x8($s1) /* 446EC 800692EC 9242001B */ lbu $v0, 0x1B($s2) /* 446F0 800692F0 24060007 */ addiu $a2, $zero, 0x7 /* 446F4 800692F4 AE22004C */ sw $v0, 0x4C($s1) /* 446F8 800692F8 9243001A */ lbu $v1, 0x1A($s2) /* 446FC 800692FC 2627002C */ addiu $a3, $s1, 0x2C /* 44700 80069300 24020010 */ addiu $v0, $zero, 0x10 /* 44704 80069304 AE220050 */ sw $v0, 0x50($s1) /* 44708 80069308 24020008 */ addiu $v0, $zero, 0x8 /* 4470C 8006930C AE220054 */ sw $v0, 0x54($s1) /* 44710 80069310 A2230064 */ sb $v1, 0x64($s1) /* 44714 80069314 92220064 */ lbu $v0, 0x64($s1) /* 44718 80069318 00031840 */ sll $v1, $v1, 1 /* 4471C 8006931C 24630003 */ addiu $v1, $v1, 0x3 /* 44720 80069320 AE230060 */ sw $v1, 0x60($s1) /* 44724 80069324 92230064 */ lbu $v1, 0x64($s1) /* 44728 80069328 24420001 */ addiu $v0, $v0, 0x1 /* 4472C 8006932C 000210C0 */ sll $v0, $v0, 3 /* 44730 80069330 000318C0 */ sll $v1, $v1, 3 /* 44734 80069334 AE220058 */ sw $v0, 0x58($s1) /* 44738 80069338 00431021 */ addu $v0, $v0, $v1 /* 4473C 8006933C 0C01A874 */ jal __osContRamRead /* 44740 80069340 AE22005C */ sw $v0, 0x5C($s1) /* 44744 80069344 00408021 */ addu $s0, $v0, $zero /* 44748 80069348 16000008 */ bnez $s0, .L8006936C /* 4474C 8006934C 02001021 */ addu $v0, $s0, $zero /* 44750 80069350 0C01B308 */ jal osPfsChecker /* 44754 80069354 02202021 */ addu $a0, $s1, $zero /* 44758 80069358 8E230000 */ lw $v1, 0x0($s1) /* 4475C 8006935C 34630001 */ ori $v1, $v1, 0x1 /* 44760 80069360 0801A4DB */ j .L8006936C /* 44764 80069364 AE230000 */ sw $v1, 0x0($s1) .L80069368: /* 44768 80069368 02001021 */ addu $v0, $s0, $zero .L8006936C: /* 4476C 8006936C 8FBF0068 */ lw $ra, 0x68($sp) /* 44770 80069370 8FB30064 */ lw $s3, 0x64($sp) /* 44774 80069374 8FB20060 */ lw $s2, 0x60($sp) /* 44778 80069378 8FB1005C */ lw $s1, 0x5C($sp) /* 4477C 8006937C 8FB00058 */ lw $s0, 0x58($sp) /* 44780 80069380 03E00008 */ jr $ra /* 44784 80069384 27BD0070 */ addiu $sp, $sp, 0x70 ### DECOMPILED C INSTRUCTIONS: s32 osPfsInitPak(OSMesgQueue *queue, OSPfs *pfs, int channel) { int k; s32 ret; u16 sum; u16 isum; u8 temp[BLOCKSIZE]; __OSPackId *id; __OSPackId newid; PFS_GET_STATUS; pfs->queue = queue; pfs->channel = channel; pfs->status = 0; ERRCK(osPfsCheckRamArea(pfs)); ERRCK(__osPfsSelectBank(pfs, 0)); ERRCK(__osContRamRead(pfs->queue, pfs->channel, 1, (u8*)temp)); __osIdCheckSum((u16*)temp, &sum, &isum); id = (__OSPackId *)temp; if (id->checksum != sum || id->inverted_checksum != isum) { ret = __osCheckPackId(pfs, id); if (ret != 0) { pfs->status |= PFS_ID_BROKEN; return ret; } } if ((id->deviceid & 1) == 0) { ret = __osRepairPackId(pfs, id, &newid); if (ret != 0) { if (ret == PFS_ERR_ID_FATAL) { pfs->status |= PFS_ID_BROKEN; } return ret; } id = &newid; if ((id->deviceid & 1) == 0) { return PFS_ERR_DEVICE; } } bcopy(id, pfs->id, ARRAY_COUNT(pfs->id)); pfs->version = id->version; pfs->banks = id->banks; pfs->inode_start_page = pfs->banks * 2 + 3; pfs->dir_size = 0x10; pfs->inode_table = 8; pfs->minode_table = (pfs->banks + 1) * PFS_ONE_PAGE; pfs->dir_table = pfs->minode_table + pfs->banks * PFS_ONE_PAGE; ERRCK(__osContRamRead(pfs->queue, pfs->channel, 7, pfs->label)); ret = osPfsChecker(pfs); pfs->status |= PFS_INITIALIZED; return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel corrupted /* 485D8 8006D1D8 00052C03 */ sra $a1, $a1, 16 /* 485DC 8006D1DC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 485E0 8006D1E0 AFB40028 */ sw $s4, 0x28($sp) /* 485E4 8006D1E4 0080A021 */ addu $s4, $a0, $zero /* 485E8 8006D1E8 AFB1001C */ sw $s1, 0x1C($sp) /* 485EC 8006D1EC 00C08821 */ addu $s1, $a2, $zero /* 485F0 8006D1F0 AFB20020 */ sw $s2, 0x20($sp) /* 485F4 8006D1F4 00009021 */ addu $s2, $zero, $zero /* 485F8 8006D1F8 AFB00018 */ sw $s0, 0x18($sp) /* 485FC 8006D1FC 00008021 */ addu $s0, $zero, $zero /* 48600 8006D200 30A300FF */ andi $v1, $a1, 0xFF /* 48604 8006D204 00031882 */ srl $v1, $v1, 2 /* 48608 8006D208 30A5FFFF */ andi $a1, $a1, 0xFFFF /* 4860C 8006D20C 00053202 */ srl $a2, $a1, 8 /* 48610 8006D210 30C20007 */ andi $v0, $a2, 0x7 /* 48614 8006D214 AFBF0038 */ sw $ra, 0x38($sp) /* 48618 8006D218 AFB70034 */ sw $s7, 0x34($sp) /* 4861C 8006D21C AFB60030 */ sw $s6, 0x30($sp) /* 48620 8006D220 AFB5002C */ sw $s5, 0x2C($sp) /* 48624 8006D224 AFB30024 */ sw $s3, 0x24($sp) /* 48628 8006D228 92840064 */ lbu $a0, 0x64($s4) /* 4862C 8006D22C 00021140 */ sll $v0, $v0, 5 /* 48630 8006D230 10800037 */ beqz $a0, .L8006D310 /* 48634 8006D234 0062B821 */ addu $s7, $v1, $v0 /* 48638 8006D238 00A0A821 */ addu $s5, $a1, $zero /* 4863C 8006D23C 00C0B021 */ addu $s6, $a2, $zero /* 48640 8006D240 324700FF */ andi $a3, $s2, 0xFF .L8006D244: /* 48644 8006D244 14E00002 */ bnez $a3, .L8006D250 /* 48648 8006D248 24130001 */ addiu $s3, $zero, 0x1 /* 4864C 8006D24C 8E930060 */ lw $s3, 0x60($s4) .L8006D250: /* 48650 8006D250 10F60007 */ beq $a3, $s6, .L8006D270 /* 48654 8006D254 02371021 */ addu $v0, $s1, $s7 /* 48658 8006D258 90420101 */ lbu $v0, 0x101($v0) /* 4865C 8006D25C 30E30007 */ andi $v1, $a3, 0x7 /* 48660 8006D260 00621007 */ srav $v0, $v0, $v1 /* 48664 8006D264 30420001 */ andi $v0, $v0, 0x1 /* 48668 8006D268 10400023 */ beqz $v0, .L8006D2F8 /* 4866C 8006D26C 00000000 */ nop .L8006D270: /* 48670 8006D270 92220100 */ lbu $v0, 0x100($s1) /* 48674 8006D274 10E2000C */ beq $a3, $v0, .L8006D2A8 /* 48678 8006D278 02802021 */ addu $a0, $s4, $zero /* 4867C 8006D27C 02202821 */ addu $a1, $s1, $zero /* 48680 8006D280 0C01A7A3 */ jal __osPfsRWInode /* 48684 8006D284 00003021 */ addu $a2, $zero, $zero /* 48688 8006D288 00402021 */ addu $a0, $v0, $zero /* 4868C 8006D28C 0004182B */ sltu $v1, $zero, $a0 /* 48690 8006D290 38820003 */ xori $v0, $a0, 0x3 /* 48694 8006D294 0002102B */ sltu $v0, $zero, $v0 /* 48698 8006D298 00621824 */ and $v1, $v1, $v0 /* 4869C 8006D29C 1460001D */ bnez $v1, .L8006D314 /* 486A0 8006D2A0 00801021 */ addu $v0, $a0, $zero /* 486A4 8006D2A4 A2320100 */ sb $s2, 0x100($s1) .L8006D2A8: /* 486A8 8006D2A8 02602821 */ addu $a1, $s3, $zero /* 486AC 8006D2AC 2A020002 */ slti $v0, $s0, 0x2 /* 486B0 8006D2B0 28A30080 */ slti $v1, $a1, 0x80 /* 486B4 8006D2B4 00431024 */ and $v0, $v0, $v1 /* 486B8 8006D2B8 1040000C */ beqz $v0, .L8006D2EC /* 486BC 8006D2BC 00051040 */ sll $v0, $a1, 1 /* 486C0 8006D2C0 00512021 */ addu $a0, $v0, $s1 .L8006D2C4: /* 486C4 8006D2C4 94820000 */ lhu $v0, 0x0($a0) /* 486C8 8006D2C8 24A50001 */ addiu $a1, $a1, 0x1 /* 486CC 8006D2CC 28A30080 */ slti $v1, $a1, 0x80 /* 486D0 8006D2D0 00551026 */ xor $v0, $v0, $s5 /* 486D4 8006D2D4 2C420001 */ sltiu $v0, $v0, 0x1 /* 486D8 8006D2D8 02028021 */ addu $s0, $s0, $v0 /* 486DC 8006D2DC 2A020002 */ slti $v0, $s0, 0x2 /* 486E0 8006D2E0 00431024 */ and $v0, $v0, $v1 /* 486E4 8006D2E4 1440FFF7 */ bnez $v0, .L8006D2C4 /* 486E8 8006D2E8 24840002 */ addiu $a0, $a0, 0x2 .L8006D2EC: /* 486EC 8006D2EC 2A020002 */ slti $v0, $s0, 0x2 /* 486F0 8006D2F0 10400008 */ beqz $v0, .L8006D314 /* 486F4 8006D2F4 24020002 */ addiu $v0, $zero, 0x2 .L8006D2F8: /* 486F8 8006D2F8 92830064 */ lbu $v1, 0x64($s4) /* 486FC 8006D2FC 26520001 */ addiu $s2, $s2, 0x1 /* 48700 8006D300 324200FF */ andi $v0, $s2, 0xFF /* 48704 8006D304 0043102B */ sltu $v0, $v0, $v1 /* 48708 8006D308 1440FFCE */ bnez $v0, .L8006D244 /* 4870C 8006D30C 324700FF */ andi $a3, $s2, 0xFF .L8006D310: /* 48710 8006D310 02001021 */ addu $v0, $s0, $zero .L8006D314: /* 48714 8006D314 8FBF0038 */ lw $ra, 0x38($sp) /* 48718 8006D318 8FB70034 */ lw $s7, 0x34($sp) /* 4871C 8006D31C 8FB60030 */ lw $s6, 0x30($sp) /* 48720 8006D320 8FB5002C */ lw $s5, 0x2C($sp) /* 48724 8006D324 8FB40028 */ lw $s4, 0x28($sp) /* 48728 8006D328 8FB30024 */ lw $s3, 0x24($sp) /* 4872C 8006D32C 8FB20020 */ lw $s2, 0x20($sp) /* 48730 8006D330 8FB1001C */ lw $s1, 0x1C($sp) /* 48734 8006D334 8FB00018 */ lw $s0, 0x18($sp) /* 48738 8006D338 03E00008 */ jr $ra /* 4873C 8006D33C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: if ((ret = corrupted_init(pfs, &cache)) != 0) { return ret; } for (j = 0; j < pfs->dir_size; j++) { if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir)) != 0) { return ret; } if ((tempDir.company_code != 0) || (tempDir.game_code != 0)) { if ((tempDir.company_code == 0) || (tempDir.game_code == 0)) { cc = -1; } else { next = tempDir.start_page; cl = cc = 0; bank = 255; while (CHECK_IPAGE(next)) { if (bank != next.inode_t.bank) { bank = next.inode_t.bank; if (prevBank != bank) { ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank); prevBank = bank; } if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) { return ret; } } if ((cc = corrupted(pfs, next, &cache) - cl) != 0) { break; } cl = 1; next = tempInode.inode_page[next.inode_t.page]; } } if ((cc != 0) || (next.ipage != PFS_EOF)) { bzero(&tempDir, sizeof(__OSDir)); if (pfs->activebank != 0) { if ((ret = __osPfsSelectBank(pfs, 0)) != 0) { return ret; } } if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir, 0)) != 0) { return ret; } fixed++; } } } for (j = 0; j < pfs->dir_size; j++) { if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir)) != 0) { return ret; } if ((tempDir.company_code != 0) && (tempDir.game_code != 0) && (tempDir.start_page.ipage >= (u16)pfs->inode_start_page)) { // cast required nextNodeInFile[j].ipage = tempDir.start_page.ipage; } else { nextNodeInFile[j].ipage = 0; } } for (bank = 0; bank < pfs->banks; bank++) { ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank); if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) { return (ret); } offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inode_start_page); for (j = 0; j < offset; j++) { checkedInode.inode_page[j].ipage = tempInode.inode_page[j].ipage; } for (; j < PFS_INODE_SIZE_PER_PAGE; j++) { checkedInode.inode_page[j].ipage = PFS_PAGE_NOT_USED; } for (j = 0; j < pfs->dir_size; j++) { while (nextNodeInFile[j].inode_t.bank == bank && nextNodeInFile[j].ipage >= (u16)pfs->inode_start_page) { // cast required u8 val; val = nextNodeInFile[j].inode_t.page; nextNodeInFile[j] = checkedInode.inode_page[val] = tempInode.inode_page[val]; } } if ((ret = __osPfsRWInode(pfs, &checkedInode, PFS_WRITE, bank)) != 0) { return ret; } } if (fixed != 0) { pfs->status |= PFS_CORRUPTED; } else { pfs->status &= ~PFS_CORRUPTED; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel appendGfx_msg_prim_rect /* C3108 8012CA08 0080502D */ daddu $t2, $a0, $zero /* C310C 8012CA0C 00A0582D */ daddu $t3, $a1, $zero /* C3110 8012CA10 3C09800A */ lui $t1, %hi(gMainGfxPos) /* C3114 8012CA14 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* C3118 8012CA18 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* C311C 8012CA1C 8D280000 */ lw $t0, 0x0($t1) /* C3120 8012CA20 97AF0012 */ lhu $t7, 0x12($sp) /* C3124 8012CA24 97B80016 */ lhu $t8, 0x16($sp) /* C3128 8012CA28 97AD001A */ lhu $t5, 0x1A($sp) /* C312C 8012CA2C 97AE001E */ lhu $t6, 0x1E($sp) /* C3130 8012CA30 0100182D */ daddu $v1, $t0, $zero /* C3134 8012CA34 25080008 */ addiu $t0, $t0, 0x8 /* C3138 8012CA38 AD280000 */ sw $t0, 0x0($t1) /* C313C 8012CA3C AC620000 */ sw $v0, 0x0($v1) /* C3140 8012CA40 AC600004 */ sw $zero, 0x4($v1) /* C3144 8012CA44 30E300FF */ andi $v1, $a3, 0xFF /* C3148 8012CA48 240200FF */ addiu $v0, $zero, 0xFF /* C314C 8012CA4C 1462000A */ bne $v1, $v0, .L8012CA78 /* C3150 8012CA50 00C0602D */ daddu $t4, $a2, $zero /* C3154 8012CA54 3C04FCFF */ lui $a0, (0xFCFFFFFF >> 16) /* C3158 8012CA58 3484FFFF */ ori $a0, $a0, (0xFCFFFFFF & 0xFFFF) /* C315C 8012CA5C 3C03FFFD */ lui $v1, (0xFFFDFCFE >> 16) /* C3160 8012CA60 3463FCFE */ ori $v1, $v1, (0xFFFDFCFE & 0xFFFF) /* C3164 8012CA64 25020008 */ addiu $v0, $t0, 0x8 /* C3168 8012CA68 AD220000 */ sw $v0, 0x0($t1) /* C316C 8012CA6C AD040000 */ sw $a0, 0x0($t0) /* C3170 8012CA70 0804B2AE */ j .L8012CAB8 /* C3174 8012CA74 AD030004 */ sw $v1, 0x4($t0) .L8012CA78: /* C3178 8012CA78 3C05E200 */ lui $a1, (0xE200001C >> 16) /* C317C 8012CA7C 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF) /* C3180 8012CA80 3C030050 */ lui $v1, (0x504240 >> 16) /* C3184 8012CA84 34634240 */ ori $v1, $v1, (0x504240 & 0xFFFF) /* C3188 8012CA88 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16) /* C318C 8012CA8C 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF) /* C3190 8012CA90 3C04FFFD */ lui $a0, (0xFFFDF6FB >> 16) /* C3194 8012CA94 3484F6FB */ ori $a0, $a0, (0xFFFDF6FB & 0xFFFF) /* C3198 8012CA98 25020008 */ addiu $v0, $t0, 0x8 /* C319C 8012CA9C AD220000 */ sw $v0, 0x0($t1) /* C31A0 8012CAA0 25020010 */ addiu $v0, $t0, 0x10 /* C31A4 8012CAA4 AD050000 */ sw $a1, 0x0($t0) /* C31A8 8012CAA8 AD030004 */ sw $v1, 0x4($t0) /* C31AC 8012CAAC AD220000 */ sw $v0, 0x0($t1) /* C31B0 8012CAB0 AD060008 */ sw $a2, 0x8($t0) /* C31B4 8012CAB4 AD04000C */ sw $a0, 0xC($t0) .L8012CAB8: /* C31B8 8012CAB8 3C06E200 */ lui $a2, (0xE200001C >> 16) /* C31BC 8012CABC 34C6001C */ ori $a2, $a2, (0xE200001C & 0xFFFF) /* C31C0 8012CAC0 3C050F0A */ lui $a1, (0xF0A7008 >> 16) /* C31C4 8012CAC4 3C09800A */ lui $t1, %hi(gMainGfxPos) /* C31C8 8012CAC8 2529A66C */ addiu $t1, $t1, %lo(gMainGfxPos) /* C31CC 8012CACC 34A57008 */ ori $a1, $a1, (0xF0A7008 & 0xFFFF) /* C31D0 8012CAD0 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* C31D4 8012CAD4 8D280000 */ lw $t0, 0x0($t1) /* C31D8 8012CAD8 000A1E00 */ sll $v1, $t2, 24 /* C31DC 8012CADC 0100202D */ daddu $a0, $t0, $zero /* C31E0 8012CAE0 25080008 */ addiu $t0, $t0, 0x8 /* C31E4 8012CAE4 AD280000 */ sw $t0, 0x0($t1) /* C31E8 8012CAE8 AC820000 */ sw $v0, 0x0($a0) /* C31EC 8012CAEC 316200FF */ andi $v0, $t3, 0xFF /* C31F0 8012CAF0 00021400 */ sll $v0, $v0, 16 /* C31F4 8012CAF4 00621825 */ or $v1, $v1, $v0 /* C31F8 8012CAF8 318200FF */ andi $v0, $t4, 0xFF /* C31FC 8012CAFC 00021200 */ sll $v0, $v0, 8 /* C3200 8012CB00 00621825 */ or $v1, $v1, $v0 /* C3204 8012CB04 30E200FF */ andi $v0, $a3, 0xFF /* C3208 8012CB08 00621825 */ or $v1, $v1, $v0 /* C320C 8012CB0C 25020008 */ addiu $v0, $t0, 0x8 /* C3210 8012CB10 AC830004 */ sw $v1, 0x4($a0) /* C3214 8012CB14 31A403FF */ andi $a0, $t5, 0x3FF /* C3218 8012CB18 00042380 */ sll $a0, $a0, 14 /* C321C 8012CB1C AD220000 */ sw $v0, 0x0($t1) /* C3220 8012CB20 31C203FF */ andi $v0, $t6, 0x3FF /* C3224 8012CB24 00021080 */ sll $v0, $v0, 2 /* C3228 8012CB28 3C03F600 */ lui $v1, (0xF6000000 >> 16) /* C322C 8012CB2C 00431025 */ or $v0, $v0, $v1 /* C3230 8012CB30 00822025 */ or $a0, $a0, $v0 /* C3234 8012CB34 31E303FF */ andi $v1, $t7, 0x3FF /* C3238 8012CB38 00031B80 */ sll $v1, $v1, 14 /* C323C 8012CB3C 330203FF */ andi $v0, $t8, 0x3FF /* C3240 8012CB40 00021080 */ sll $v0, $v0, 2 /* C3244 8012CB44 00621825 */ or $v1, $v1, $v0 /* C3248 8012CB48 25020010 */ addiu $v0, $t0, 0x10 /* C324C 8012CB4C AD040000 */ sw $a0, 0x0($t0) /* C3250 8012CB50 AD030004 */ sw $v1, 0x4($t0) /* C3254 8012CB54 AD220000 */ sw $v0, 0x0($t1) /* C3258 8012CB58 3C038015 */ lui $v1, %hi(msg_drawState) /* C325C 8012CB5C 8C635D74 */ lw $v1, %lo(msg_drawState)($v1) /* C3260 8012CB60 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* C3264 8012CB64 AD020008 */ sw $v0, 0x8($t0) /* C3268 8012CB68 25020018 */ addiu $v0, $t0, 0x18 /* C326C 8012CB6C AD00000C */ sw $zero, 0xC($t0) /* C3270 8012CB70 AD220000 */ sw $v0, 0x0($t1) /* C3274 8012CB74 AD060010 */ sw $a2, 0x10($t0) /* C3278 8012CB78 AD050014 */ sw $a1, 0x14($t0) /* C327C 8012CB7C 90630029 */ lbu $v1, 0x29($v1) /* C3280 8012CB80 10600005 */ beqz $v1, .L8012CB98 /* C3284 8012CB84 24020001 */ addiu $v0, $zero, 0x1 /* C3288 8012CB88 1062000C */ beq $v1, $v0, .L8012CBBC /* C328C 8012CB8C 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16) /* C3290 8012CB90 0804B2F7 */ j .L8012CBDC /* C3294 8012CB94 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF) .L8012CB98: /* C3298 8012CB98 3C04FCFF */ lui $a0, (0xFCFFFFFF >> 16) /* C329C 8012CB9C 3484FFFF */ ori $a0, $a0, (0xFCFFFFFF & 0xFFFF) /* C32A0 8012CBA0 3C03FFFC */ lui $v1, (0xFFFCF279 >> 16) /* C32A4 8012CBA4 3463F279 */ ori $v1, $v1, (0xFFFCF279 & 0xFFFF) /* C32A8 8012CBA8 25020020 */ addiu $v0, $t0, 0x20 /* C32AC 8012CBAC AD220000 */ sw $v0, 0x0($t1) /* C32B0 8012CBB0 AD040018 */ sw $a0, 0x18($t0) /* C32B4 8012CBB4 03E00008 */ jr $ra /* C32B8 8012CBB8 AD03001C */ sw $v1, 0x1C($t0) .L8012CBBC: /* C32BC 8012CBBC 3C02FC11 */ lui $v0, (0xFC11FE23 >> 16) /* C32C0 8012CBC0 3442FE23 */ ori $v0, $v0, (0xFC11FE23 & 0xFFFF) /* C32C4 8012CBC4 25030020 */ addiu $v1, $t0, 0x20 /* C32C8 8012CBC8 AD230000 */ sw $v1, 0x0($t1) /* C32CC 8012CBCC AD020018 */ sw $v0, 0x18($t0) /* C32D0 8012CBD0 2402F3F9 */ addiu $v0, $zero, -0xC07 /* C32D4 8012CBD4 03E00008 */ jr $ra /* C32D8 8012CBD8 AD02001C */ sw $v0, 0x1C($t0) .L8012CBDC: /* C32DC 8012CBDC 3C05FFFC */ lui $a1, (0xFFFCF279 >> 16) /* C32E0 8012CBE0 3C04800A */ lui $a0, %hi(gMainGfxPos) /* C32E4 8012CBE4 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* C32E8 8012CBE8 8C820000 */ lw $v0, 0x0($a0) /* C32EC 8012CBEC 34A5F279 */ ori $a1, $a1, (0xFFFCF279 & 0xFFFF) /* C32F0 8012CBF0 0040182D */ daddu $v1, $v0, $zero /* C32F4 8012CBF4 24420008 */ addiu $v0, $v0, 0x8 /* C32F8 8012CBF8 AC820000 */ sw $v0, 0x0($a0) /* C32FC 8012CBFC AC660000 */ sw $a2, 0x0($v1) /* C3300 8012CC00 03E00008 */ jr $ra /* C3304 8012CC04 AC650004 */ sw $a1, 0x4($v1) ### DECOMPILED C INSTRUCTIONS: void appendGfx_msg_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 ulX, u16 ulY, u16 lrX, u16 lrY) { gDPPipeSync(gMainGfxPos++); if (a == 255) { gDPSetCombineMode(gMainGfxPos++, PM_CC_08, PM_CC_08); } else { gDPSetRenderMode(gMainGfxPos++, G_RM_XLU_SURF, G_RM_XLU_SURF2); gDPSetCombineMode(gMainGfxPos++, G_CC_PRIMITIVE, G_CC_PRIMITIVE); } gDPSetPrimColor(gMainGfxPos++, 0, 0, r, g, b, a); gDPFillRectangle(gMainGfxPos++, ulX, ulY, lrX, lrY); gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); switch (msg_drawState->unk_29) { case 0: gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); break; case 1: gDPSetCombineMode(gMainGfxPos++, G_CC_MODULATEIDECALA_PRIM, G_CC_MODULATEIDECALA_PRIM); break; default: gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel shimmer_burst_main /* 3740B0 E0070000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3740B4 E0070004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3740B8 E0070008 4485A000 */ mtc1 $a1, $f20 /* 3740BC E007000C F7B60048 */ sdc1 $f22, 0x48($sp) /* 3740C0 E0070010 4486B000 */ mtc1 $a2, $f22 /* 3740C4 E0070014 AFB30034 */ sw $s3, 0x34($sp) /* 3740C8 E0070018 0080982D */ daddu $s3, $a0, $zero /* 3740CC E007001C F7B80050 */ sdc1 $f24, 0x50($sp) /* 3740D0 E0070020 4487C000 */ mtc1 $a3, $f24 /* 3740D4 E0070024 27A40010 */ addiu $a0, $sp, 0x10 /* 3740D8 E0070028 AFB20030 */ sw $s2, 0x30($sp) /* 3740DC E007002C 8FB2006C */ lw $s2, 0x6C($sp) /* 3740E0 E0070030 3C02E007 */ lui $v0, %hi(shimmer_burst_init) /* 3740E4 E0070034 244201EC */ addiu $v0, $v0, %lo(shimmer_burst_init) /* 3740E8 E0070038 AFA20018 */ sw $v0, 0x18($sp) /* 3740EC E007003C 3C02E007 */ lui $v0, %hi(shimmer_burst_update) /* 3740F0 E0070040 244201F4 */ addiu $v0, $v0, %lo(shimmer_burst_update) /* 3740F4 E0070044 AFA2001C */ sw $v0, 0x1C($sp) /* 3740F8 E0070048 3C02E007 */ lui $v0, %hi(shimmer_burst_render) /* 3740FC E007004C 244206F0 */ addiu $v0, $v0, %lo(shimmer_burst_render) /* 374100 E0070050 AFA20020 */ sw $v0, 0x20($sp) /* 374104 E0070054 24020038 */ addiu $v0, $zero, 0x38 /* 374108 E0070058 AFBF0038 */ sw $ra, 0x38($sp) /* 37410C E007005C AFB1002C */ sw $s1, 0x2C($sp) /* 374110 E0070060 AFB00028 */ sw $s0, 0x28($sp) /* 374114 E0070064 AFA00010 */ sw $zero, 0x10($sp) /* 374118 E0070068 AFA00024 */ sw $zero, 0x24($sp) /* 37411C E007006C 0C080124 */ jal shim_create_effect_instance /* 374120 E0070070 AFA20014 */ sw $v0, 0x14($sp) /* 374124 E0070074 240419BC */ addiu $a0, $zero, 0x19BC /* 374128 E0070078 2411003D */ addiu $s1, $zero, 0x3D /* 37412C E007007C 0040802D */ daddu $s0, $v0, $zero /* 374130 E0070080 0C08012C */ jal shim_general_heap_malloc /* 374134 E0070084 AE110008 */ sw $s1, 0x8($s0) /* 374138 E0070088 0040182D */ daddu $v1, $v0, $zero /* 37413C E007008C 14600003 */ bnez $v1, .LE007009C /* 374140 E0070090 AE03000C */ sw $v1, 0xC($s0) .LE0070094: /* 374144 E0070094 0801C025 */ j .LE0070094 /* 374148 E0070098 00000000 */ nop .LE007009C: /* 37414C E007009C AC730000 */ sw $s3, 0x0($v1) /* 374150 E00700A0 1E400004 */ bgtz $s2, .LE00700B4 /* 374154 E00700A4 AC60003C */ sw $zero, 0x3C($v1) /* 374158 E00700A8 240203E8 */ addiu $v0, $zero, 0x3E8 /* 37415C E00700AC 0801C02E */ j .LE00700B8 /* 374160 E00700B0 AC620038 */ sw $v0, 0x38($v1) .LE00700B4: /* 374164 E00700B4 AC720038 */ sw $s2, 0x38($v1) .LE00700B8: /* 374168 E00700B8 240400FF */ addiu $a0, $zero, 0xFF /* 37416C E00700BC AC64004C */ sw $a0, 0x4C($v1) /* 374170 E00700C0 E4740004 */ swc1 $f20, 0x4($v1) /* 374174 E00700C4 E4760008 */ swc1 $f22, 0x8($v1) /* 374178 E00700C8 E478000C */ swc1 $f24, 0xC($v1) /* 37417C E00700CC C7A00068 */ lwc1 $f0, 0x68($sp) /* 374180 E00700D0 2402001E */ addiu $v0, $zero, 0x1E /* 374184 E00700D4 AC640040 */ sw $a0, 0x40($v1) /* 374188 E00700D8 AC640044 */ sw $a0, 0x44($v1) /* 37418C E00700DC AC640048 */ sw $a0, 0x48($v1) /* 374190 E00700E0 E4600060 */ swc1 $f0, 0x60($v1) /* 374194 E00700E4 44820000 */ mtc1 $v0, $f0 /* 374198 E00700E8 00000000 */ nop /* 37419C E00700EC 46800020 */ cvt.s.w $f0, $f0 /* 3741A0 E00700F0 E4600010 */ swc1 $f0, 0x10($v1) /* 3741A4 E00700F4 16600007 */ bnez $s3, .LE0070114 /* 3741A8 E00700F8 E4600014 */ swc1 $f0, 0x14($v1) /* 3741AC E00700FC 240200D7 */ addiu $v0, $zero, 0xD7 /* 3741B0 E0070100 AC620050 */ sw $v0, 0x50($v1) /* 3741B4 E0070104 240200EB */ addiu $v0, $zero, 0xEB /* 3741B8 E0070108 AC640054 */ sw $a0, 0x54($v1) /* 3741BC E007010C 0801C049 */ j .LE0070124 /* 3741C0 E0070110 AC620058 */ sw $v0, 0x58($v1) .LE0070114: /* 3741C4 E0070114 2402007F */ addiu $v0, $zero, 0x7F /* 3741C8 E0070118 AC640050 */ sw $a0, 0x50($v1) /* 3741CC E007011C AC620054 */ sw $v0, 0x54($v1) /* 3741D0 E0070120 AC640058 */ sw $a0, 0x58($v1) .LE0070124: /* 3741D4 E0070124 AC64005C */ sw $a0, 0x5C($v1) /* 3741D8 E0070128 2A420014 */ slti $v0, $s2, 0x14 /* 3741DC E007012C 10400009 */ beqz $v0, .LE0070154 /* 3741E0 E0070130 2463006C */ addiu $v1, $v1, 0x6C /* 3741E4 E0070134 2622FFFF */ addiu $v0, $s1, -0x1 /* 3741E8 E0070138 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3741EC E007013C 44811000 */ mtc1 $at, $f2 /* 3741F0 E0070140 44820000 */ mtc1 $v0, $f0 /* 3741F4 E0070144 00000000 */ nop /* 3741F8 E0070148 46800020 */ cvt.s.w $f0, $f0 /* 3741FC E007014C 0801C05D */ j .LE0070174 /* 374200 E0070150 46001083 */ div.s $f2, $f2, $f0 .LE0070154: /* 374204 E0070154 44920000 */ mtc1 $s2, $f0 /* 374208 E0070158 00000000 */ nop /* 37420C E007015C 46800020 */ cvt.s.w $f0, $f0 /* 374210 E0070160 2622FFFF */ addiu $v0, $s1, -0x1 /* 374214 E0070164 44821000 */ mtc1 $v0, $f2 /* 374218 E0070168 00000000 */ nop /* 37421C E007016C 468010A0 */ cvt.s.w $f2, $f2 /* 374220 E0070170 46020083 */ div.s $f2, $f0, $f2 .LE0070174: /* 374224 E0070174 24040001 */ addiu $a0, $zero, 0x1 /* 374228 E0070178 0091102A */ slt $v0, $a0, $s1 /* 37422C E007017C 10400011 */ beqz $v0, .LE00701C4 /* 374230 E0070180 0200102D */ daddu $v0, $s0, $zero .LE0070184: /* 374234 E0070184 44840000 */ mtc1 $a0, $f0 /* 374238 E0070188 00000000 */ nop /* 37423C E007018C 46800020 */ cvt.s.w $f0, $f0 /* 374240 E0070190 46000007 */ neg.s $f0, $f0 /* 374244 E0070194 46020002 */ mul.s $f0, $f0, $f2 /* 374248 E0070198 00000000 */ nop /* 37424C E007019C 24840001 */ addiu $a0, $a0, 0x1 /* 374250 E00701A0 4600010D */ trunc.w.s $f4, $f0 /* 374254 E00701A4 44022000 */ mfc1 $v0, $f4 /* 374258 E00701A8 00000000 */ nop /* 37425C E00701AC 2442FFFF */ addiu $v0, $v0, -0x1 /* 374260 E00701B0 AC620030 */ sw $v0, 0x30($v1) /* 374264 E00701B4 0091102A */ slt $v0, $a0, $s1 /* 374268 E00701B8 1440FFF2 */ bnez $v0, .LE0070184 /* 37426C E00701BC 2463006C */ addiu $v1, $v1, 0x6C /* 374270 E00701C0 0200102D */ daddu $v0, $s0, $zero .LE00701C4: /* 374274 E00701C4 8FBF0038 */ lw $ra, 0x38($sp) /* 374278 E00701C8 8FB30034 */ lw $s3, 0x34($sp) /* 37427C E00701CC 8FB20030 */ lw $s2, 0x30($sp) /* 374280 E00701D0 8FB1002C */ lw $s1, 0x2C($sp) /* 374284 E00701D4 8FB00028 */ lw $s0, 0x28($sp) /* 374288 E00701D8 D7B80050 */ ldc1 $f24, 0x50($sp) /* 37428C E00701DC D7B60048 */ ldc1 $f22, 0x48($sp) /* 374290 E00701E0 D7B40040 */ ldc1 $f20, 0x40($sp) /* 374294 E00701E4 03E00008 */ jr $ra /* 374298 E00701E8 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* shimmer_burst_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectInstance* effect; ShimmerBurstFXData* part; s32 numParts = 61; s32 temp30 = 30; f32 temp; s32 i; bp.init = shimmer_burst_init; bp.update = shimmer_burst_update; bp.renderWorld = shimmer_burst_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_SHIMMER_BURST; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; part = effect->data.shimmerBurst = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.shimmerBurst != NULL); part->unk_00 = arg0; part->unk_3C = 0; if (arg5 <= 0) { part->unk_38 = 1000; } else { part->unk_38 = arg5; } part->unk_4C = 255; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_60 = arg4; part->unk_10 = temp30; part->unk_14 = temp30; part->unk_40 = 255; part->unk_44 = 255; part->unk_48 = 255; if (arg0 == 0) { part->unk_50 = 215; part->unk_54 = 255; part->unk_58 = 235; part->unk_5C = 255; } else { part->unk_50 = 255; part->unk_54 = 127; part->unk_58 = 255; part->unk_5C = 255; } part++; if (arg5 < 20) { temp = 20.0f / (numParts - 1); } else { temp = (f32) arg5 / (numParts - 1); } for (i = 1; i < numParts; i++, part++) { part->unk_30 = (s32) (-(f32) i * temp) - 1; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_effects /* 35150 80059D50 3C02800A */ lui $v0, %hi(gOverrideFlags) /* 35154 80059D54 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) /* 35158 80059D58 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 3515C 80059D5C AFBF0020 */ sw $ra, 0x20($sp) /* 35160 80059D60 AFB3001C */ sw $s3, 0x1C($sp) /* 35164 80059D64 AFB20018 */ sw $s2, 0x18($sp) /* 35168 80059D68 AFB10014 */ sw $s1, 0x14($sp) /* 3516C 80059D6C 30420C00 */ andi $v0, $v0, 0xC00 /* 35170 80059D70 14400059 */ bnez $v0, .L80059ED8 /* 35174 80059D74 AFB00010 */ sw $s0, 0x10($sp) /* 35178 80059D78 0000902D */ daddu $s2, $zero, $zero /* 3517C 80059D7C 3C10800A */ lui $s0, %hi(gEffectGraphicsData) /* 35180 80059D80 26104000 */ addiu $s0, $s0, %lo(gEffectGraphicsData) /* 35184 80059D84 24040003 */ addiu $a0, $zero, 0x3 .L80059D88: /* 35188 80059D88 8E030000 */ lw $v1, 0x0($s0) /* 3518C 80059D8C 30620001 */ andi $v0, $v1, 0x1 /* 35190 80059D90 10400007 */ beqz $v0, .L80059DB0 /* 35194 80059D94 26520001 */ addiu $s2, $s2, 0x1 /* 35198 80059D98 30620002 */ andi $v0, $v1, 0x2 /* 3519C 80059D9C 14400004 */ bnez $v0, .L80059DB0 /* 351A0 80059DA0 00000000 */ nop /* 351A4 80059DA4 34620002 */ ori $v0, $v1, 0x2 /* 351A8 80059DA8 AE020000 */ sw $v0, 0x0($s0) /* 351AC 80059DAC AE04000C */ sw $a0, 0xC($s0) .L80059DB0: /* 351B0 80059DB0 2A42000F */ slti $v0, $s2, 0xF /* 351B4 80059DB4 1440FFF4 */ bnez $v0, .L80059D88 /* 351B8 80059DB8 26100020 */ addiu $s0, $s0, 0x20 /* 351BC 80059DBC 0000902D */ daddu $s2, $zero, $zero /* 351C0 80059DC0 2413FFFD */ addiu $s3, $zero, -0x3 /* 351C4 80059DC4 3C11800B */ lui $s1, %hi(gEffectInstances) /* 351C8 80059DC8 26314398 */ addiu $s1, $s1, %lo(gEffectInstances) .L80059DCC: /* 351CC 80059DCC 8E300000 */ lw $s0, 0x0($s1) /* 351D0 80059DD0 52000020 */ beql $s0, $zero, .L80059E54 /* 351D4 80059DD4 26520001 */ addiu $s2, $s2, 0x1 /* 351D8 80059DD8 8E020000 */ lw $v0, 0x0($s0) /* 351DC 80059DDC 30420001 */ andi $v0, $v0, 0x1 /* 351E0 80059DE0 5040001C */ beql $v0, $zero, .L80059E54 /* 351E4 80059DE4 26520001 */ addiu $s2, $s2, 0x1 /* 351E8 80059DE8 8E030010 */ lw $v1, 0x10($s0) /* 351EC 80059DEC 8C620000 */ lw $v0, 0x0($v1) /* 351F0 80059DF0 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* 351F4 80059DF4 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* 351F8 80059DF8 00531024 */ and $v0, $v0, $s3 /* 351FC 80059DFC AC620000 */ sw $v0, 0x0($v1) /* 35200 80059E00 80820070 */ lb $v0, 0x70($a0) /* 35204 80059E04 10400007 */ beqz $v0, .L80059E24 /* 35208 80059E08 00000000 */ nop /* 3520C 80059E0C 8E020000 */ lw $v0, 0x0($s0) /* 35210 80059E10 30420004 */ andi $v0, $v0, 0x4 /* 35214 80059E14 5040000F */ beql $v0, $zero, .L80059E54 /* 35218 80059E18 26520001 */ addiu $s2, $s2, 0x1 /* 3521C 80059E1C 0801678D */ j .L80059E34 /* 35220 80059E20 00000000 */ nop .L80059E24: /* 35224 80059E24 8E020000 */ lw $v0, 0x0($s0) /* 35228 80059E28 30420004 */ andi $v0, $v0, 0x4 /* 3522C 80059E2C 54400009 */ bnel $v0, $zero, .L80059E54 /* 35230 80059E30 26520001 */ addiu $s2, $s2, 0x1 .L80059E34: /* 35234 80059E34 8E020010 */ lw $v0, 0x10($s0) /* 35238 80059E38 8C420010 */ lw $v0, 0x10($v0) /* 3523C 80059E3C 0040F809 */ jalr $v0 /* 35240 80059E40 0200202D */ daddu $a0, $s0, $zero /* 35244 80059E44 8E020000 */ lw $v0, 0x0($s0) /* 35248 80059E48 34420008 */ ori $v0, $v0, 0x8 /* 3524C 80059E4C AE020000 */ sw $v0, 0x0($s0) /* 35250 80059E50 26520001 */ addiu $s2, $s2, 0x1 .L80059E54: /* 35254 80059E54 2A420060 */ slti $v0, $s2, 0x60 /* 35258 80059E58 1440FFDC */ bnez $v0, .L80059DCC /* 3525C 80059E5C 26310004 */ addiu $s1, $s1, 0x4 /* 35260 80059E60 0000902D */ daddu $s2, $zero, $zero /* 35264 80059E64 3C10800A */ lui $s0, %hi(gEffectGraphicsData) /* 35268 80059E68 26104000 */ addiu $s0, $s0, %lo(gEffectGraphicsData) /* 3526C 80059E6C 2611001C */ addiu $s1, $s0, 0x1C .L80059E70: /* 35270 80059E70 8E030000 */ lw $v1, 0x0($s0) /* 35274 80059E74 30620001 */ andi $v0, $v1, 0x1 /* 35278 80059E78 50400013 */ beql $v0, $zero, .L80059EC8 /* 3527C 80059E7C 26520001 */ addiu $s2, $s2, 0x1 /* 35280 80059E80 30620002 */ andi $v0, $v1, 0x2 /* 35284 80059E84 50400010 */ beql $v0, $zero, .L80059EC8 /* 35288 80059E88 26520001 */ addiu $s2, $s2, 0x1 /* 3528C 80059E8C 8E22FFF0 */ lw $v0, -0x10($s1) /* 35290 80059E90 10400003 */ beqz $v0, .L80059EA0 /* 35294 80059E94 2442FFFF */ addiu $v0, $v0, -0x1 /* 35298 80059E98 080167B1 */ j .L80059EC4 /* 3529C 80059E9C AE22FFF0 */ sw $v0, -0x10($s1) .L80059EA0: /* 352A0 80059EA0 8E240000 */ lw $a0, 0x0($s1) /* 352A4 80059EA4 50800005 */ beql $a0, $zero, .L80059EBC /* 352A8 80059EA8 AE000000 */ sw $zero, 0x0($s0) /* 352AC 80059EAC 0C00AB1E */ jal general_heap_free /* 352B0 80059EB0 00000000 */ nop /* 352B4 80059EB4 AE200000 */ sw $zero, 0x0($s1) /* 352B8 80059EB8 AE000000 */ sw $zero, 0x0($s0) .L80059EBC: /* 352BC 80059EBC 0C019A48 */ jal osUnmapTLB /* 352C0 80059EC0 0240202D */ daddu $a0, $s2, $zero .L80059EC4: /* 352C4 80059EC4 26520001 */ addiu $s2, $s2, 0x1 .L80059EC8: /* 352C8 80059EC8 26310020 */ addiu $s1, $s1, 0x20 /* 352CC 80059ECC 2A42000F */ slti $v0, $s2, 0xF /* 352D0 80059ED0 1440FFE7 */ bnez $v0, .L80059E70 /* 352D4 80059ED4 26100020 */ addiu $s0, $s0, 0x20 .L80059ED8: /* 352D8 80059ED8 8FBF0020 */ lw $ra, 0x20($sp) /* 352DC 80059EDC 8FB3001C */ lw $s3, 0x1C($sp) /* 352E0 80059EE0 8FB20018 */ lw $s2, 0x18($sp) /* 352E4 80059EE4 8FB10014 */ lw $s1, 0x14($sp) /* 352E8 80059EE8 8FB00010 */ lw $s0, 0x10($sp) /* 352EC 80059EEC 03E00008 */ jr $ra /* 352F0 80059EF0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void update_effects(void) { if (!(gOverrideFlags & (GLOBAL_OVERRIDES_800 | GLOBAL_OVERRIDES_400))) { EffectGraphics* effectGraphics; s32 i; // reset free delay for each EffectGraphics touched in previous update for (i = 0, effectGraphics = gEffectGraphicsData; i < ARRAY_COUNT(gEffectGraphicsData); i++, effectGraphics++) { if (effectGraphics->flags & FX_GRAPHICS_LOADED) { if (!(effectGraphics->flags & FX_GRAPHICS_CAN_FREE)) { effectGraphics->flags |= FX_GRAPHICS_CAN_FREE; effectGraphics->freeDelay = 3; } } } // update each EffectInstances for (i = 0; i < ARRAY_COUNT(gEffectInstances); i++) { EffectInstance* effectInstance = gEffectInstances[i]; if (effectInstance != NULL && (effectInstance->flags & FX_INSTANCE_FLAG_ENABLED)) { effectInstance->graphics->flags &= ~FX_GRAPHICS_CAN_FREE; if (gGameStatusPtr->isBattle) { if (effectInstance->flags & FX_INSTANCE_FLAG_BATTLE) { effectInstance->graphics->update(effectInstance); effectInstance->flags |= FX_INSTANCE_FLAG_HAS_UPDATED; } } else { if (!(effectInstance->flags & FX_INSTANCE_FLAG_BATTLE)) { effectInstance->graphics->update(effectInstance); effectInstance->flags |= FX_INSTANCE_FLAG_HAS_UPDATED; } } } } // free any EffectGraphics which haven't been used recently for (i = 0, effectGraphics = gEffectGraphicsData; i < ARRAY_COUNT(gEffectGraphicsData); i++, effectGraphics++) { if (effectGraphics->flags & FX_GRAPHICS_LOADED) { if (effectGraphics->flags & FX_GRAPHICS_CAN_FREE) { if (effectGraphics->freeDelay != 0) { effectGraphics->freeDelay--; } else { if (effectGraphics->data != NULL) { general_heap_free(effectGraphics->data); effectGraphics->data = NULL; } effectGraphics->flags = FX_GRAPHICS_DISABLED; osUnmapTLB(i); } } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel player_raycast_up_corner /* 77EB8 800DEA08 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 77EBC 800DEA0C AFB30064 */ sw $s3, 0x64($sp) /* 77EC0 800DEA10 0080982D */ daddu $s3, $a0, $zero /* 77EC4 800DEA14 AFB40068 */ sw $s4, 0x68($sp) /* 77EC8 800DEA18 00A0A02D */ daddu $s4, $a1, $zero /* 77ECC 800DEA1C AFB5006C */ sw $s5, 0x6C($sp) /* 77ED0 800DEA20 00C0A82D */ daddu $s5, $a2, $zero /* 77ED4 800DEA24 AFB20060 */ sw $s2, 0x60($sp) /* 77ED8 800DEA28 00E0902D */ daddu $s2, $a3, $zero /* 77EDC 800DEA2C AFB1005C */ sw $s1, 0x5C($sp) /* 77EE0 800DEA30 2411FFFF */ addiu $s1, $zero, -0x1 /* 77EE4 800DEA34 3C040001 */ lui $a0, (0x10000 >> 16) /* 77EE8 800DEA38 AFBF0070 */ sw $ra, 0x70($sp) /* 77EEC 800DEA3C AFB00058 */ sw $s0, 0x58($sp) /* 77EF0 800DEA40 F7BE00A0 */ sdc1 $f30, 0xA0($sp) /* 77EF4 800DEA44 F7BC0098 */ sdc1 $f28, 0x98($sp) /* 77EF8 800DEA48 F7BA0090 */ sdc1 $f26, 0x90($sp) /* 77EFC 800DEA4C F7B80088 */ sdc1 $f24, 0x88($sp) /* 77F00 800DEA50 F7B60080 */ sdc1 $f22, 0x80($sp) /* 77F04 800DEA54 F7B40078 */ sdc1 $f20, 0x78($sp) /* 77F08 800DEA58 C6780000 */ lwc1 $f24, 0x0($s3) /* 77F0C 800DEA5C C6960000 */ lwc1 $f22, 0x0($s4) /* 77F10 800DEA60 C6B40000 */ lwc1 $f20, 0x0($s5) /* 77F14 800DEA64 C6400000 */ lwc1 $f0, 0x0($s2) /* 77F18 800DEA68 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 77F1C 800DEA6C 44811000 */ mtc1 $at, $f2 /* 77F20 800DEA70 4406B000 */ mfc1 $a2, $f22 /* 77F24 800DEA74 4407A000 */ mfc1 $a3, $f20 /* 77F28 800DEA78 4405C000 */ mfc1 $a1, $f24 /* 77F2C 800DEA7C 27A20038 */ addiu $v0, $sp, 0x38 /* 77F30 800DEA80 E7A00044 */ swc1 $f0, 0x44($sp) /* 77F34 800DEA84 AFA2001C */ sw $v0, 0x1C($sp) /* 77F38 800DEA88 27A2003C */ addiu $v0, $sp, 0x3C /* 77F3C 800DEA8C AFA20020 */ sw $v0, 0x20($sp) /* 77F40 800DEA90 27A20040 */ addiu $v0, $sp, 0x40 /* 77F44 800DEA94 AFA20024 */ sw $v0, 0x24($sp) /* 77F48 800DEA98 27A20044 */ addiu $v0, $sp, 0x44 /* 77F4C 800DEA9C AFA20028 */ sw $v0, 0x28($sp) /* 77F50 800DEAA0 27A20048 */ addiu $v0, $sp, 0x48 /* 77F54 800DEAA4 AFA2002C */ sw $v0, 0x2C($sp) /* 77F58 800DEAA8 27A2004C */ addiu $v0, $sp, 0x4C /* 77F5C 800DEAAC AFA20030 */ sw $v0, 0x30($sp) /* 77F60 800DEAB0 27A20050 */ addiu $v0, $sp, 0x50 /* 77F64 800DEAB4 AFA00010 */ sw $zero, 0x10($sp) /* 77F68 800DEAB8 E7A20014 */ swc1 $f2, 0x14($sp) /* 77F6C 800DEABC AFA00018 */ sw $zero, 0x18($sp) /* 77F70 800DEAC0 0C017334 */ jal test_ray_colliders /* 77F74 800DEAC4 AFA20034 */ sw $v0, 0x34($sp) /* 77F78 800DEAC8 0040802D */ daddu $s0, $v0, $zero /* 77F7C 800DEACC 4600C686 */ mov.s $f26, $f24 /* 77F80 800DEAD0 4600B706 */ mov.s $f28, $f22 /* 77F84 800DEAD4 0600000C */ bltz $s0, .L800DEB08 /* 77F88 800DEAD8 4600A786 */ mov.s $f30, $f20 /* 77F8C 800DEADC C6400000 */ lwc1 $f0, 0x0($s2) /* 77F90 800DEAE0 C7A20044 */ lwc1 $f2, 0x44($sp) /* 77F94 800DEAE4 4600103C */ c.lt.s $f2, $f0 /* 77F98 800DEAE8 00000000 */ nop /* 77F9C 800DEAEC 45020007 */ bc1fl .L800DEB0C /* 77FA0 800DEAF0 4600D606 */ mov.s $f24, $f26 /* 77FA4 800DEAF4 0200882D */ daddu $s1, $s0, $zero /* 77FA8 800DEAF8 E6420000 */ swc1 $f2, 0x0($s2) /* 77FAC 800DEAFC E6780000 */ swc1 $f24, 0x0($s3) /* 77FB0 800DEB00 E6960000 */ swc1 $f22, 0x0($s4) /* 77FB4 800DEB04 E6B40000 */ swc1 $f20, 0x0($s5) .L800DEB08: /* 77FB8 800DEB08 4600D606 */ mov.s $f24, $f26 .L800DEB0C: /* 77FBC 800DEB0C 4600E586 */ mov.s $f22, $f28 /* 77FC0 800DEB10 3C014120 */ lui $at, (0x41200000 >> 16) /* 77FC4 800DEB14 44811000 */ mtc1 $at, $f2 /* 77FC8 800DEB18 44802000 */ mtc1 $zero, $f4 /* 77FCC 800DEB1C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 77FD0 800DEB20 44810000 */ mtc1 $at, $f0 /* 77FD4 800DEB24 27A20038 */ addiu $v0, $sp, 0x38 /* 77FD8 800DEB28 E7A20044 */ swc1 $f2, 0x44($sp) /* 77FDC 800DEB2C AFA20018 */ sw $v0, 0x18($sp) /* 77FE0 800DEB30 27A2003C */ addiu $v0, $sp, 0x3C /* 77FE4 800DEB34 AFA2001C */ sw $v0, 0x1C($sp) /* 77FE8 800DEB38 27A20040 */ addiu $v0, $sp, 0x40 /* 77FEC 800DEB3C AFA20020 */ sw $v0, 0x20($sp) /* 77FF0 800DEB40 27A20044 */ addiu $v0, $sp, 0x44 /* 77FF4 800DEB44 AFA20024 */ sw $v0, 0x24($sp) /* 77FF8 800DEB48 27A20048 */ addiu $v0, $sp, 0x48 /* 77FFC 800DEB4C AFA20028 */ sw $v0, 0x28($sp) /* 78000 800DEB50 27A2004C */ addiu $v0, $sp, 0x4C /* 78004 800DEB54 AFA2002C */ sw $v0, 0x2C($sp) /* 78008 800DEB58 27A20050 */ addiu $v0, $sp, 0x50 /* 7800C 800DEB5C E7A00010 */ swc1 $f0, 0x10($sp) /* 78010 800DEB60 E7A40014 */ swc1 $f4, 0x14($sp) /* 78014 800DEB64 AFA20030 */ sw $v0, 0x30($sp) /* 78018 800DEB68 8EA60000 */ lw $a2, 0x0($s5) /* 7801C 800DEB6C 44072000 */ mfc1 $a3, $f4 /* 78020 800DEB70 C66C0000 */ lwc1 $f12, 0x0($s3) /* 78024 800DEB74 C68E0000 */ lwc1 $f14, 0x0($s4) /* 78028 800DEB78 0C017512 */ jal test_ray_entities /* 7802C 800DEB7C 4600F506 */ mov.s $f20, $f30 /* 78030 800DEB80 0040802D */ daddu $s0, $v0, $zero /* 78034 800DEB84 06000010 */ bltz $s0, .L800DEBC8 /* 78038 800DEB88 0220102D */ daddu $v0, $s1, $zero /* 7803C 800DEB8C C6420000 */ lwc1 $f2, 0x0($s2) /* 78040 800DEB90 C7A00044 */ lwc1 $f0, 0x44($sp) /* 78044 800DEB94 4602003C */ c.lt.s $f0, $f2 /* 78048 800DEB98 00000000 */ nop /* 7804C 800DEB9C 4500000A */ bc1f .L800DEBC8 /* 78050 800DEBA0 00000000 */ nop /* 78054 800DEBA4 0C04417A */ jal get_entity_by_index /* 78058 800DEBA8 0200202D */ daddu $a0, $s0, $zero /* 7805C 800DEBAC C7A00044 */ lwc1 $f0, 0x44($sp) /* 78060 800DEBB0 36114000 */ ori $s1, $s0, 0x4000 /* 78064 800DEBB4 E6400000 */ swc1 $f0, 0x0($s2) /* 78068 800DEBB8 E6780000 */ swc1 $f24, 0x0($s3) /* 7806C 800DEBBC E6960000 */ swc1 $f22, 0x0($s4) /* 78070 800DEBC0 E6B40000 */ swc1 $f20, 0x0($s5) /* 78074 800DEBC4 0220102D */ daddu $v0, $s1, $zero .L800DEBC8: /* 78078 800DEBC8 8FBF0070 */ lw $ra, 0x70($sp) /* 7807C 800DEBCC 8FB5006C */ lw $s5, 0x6C($sp) /* 78080 800DEBD0 8FB40068 */ lw $s4, 0x68($sp) /* 78084 800DEBD4 8FB30064 */ lw $s3, 0x64($sp) /* 78088 800DEBD8 8FB20060 */ lw $s2, 0x60($sp) /* 7808C 800DEBDC 8FB1005C */ lw $s1, 0x5C($sp) /* 78090 800DEBE0 8FB00058 */ lw $s0, 0x58($sp) /* 78094 800DEBE4 D7BE00A0 */ ldc1 $f30, 0xA0($sp) /* 78098 800DEBE8 D7BC0098 */ ldc1 $f28, 0x98($sp) /* 7809C 800DEBEC D7BA0090 */ ldc1 $f26, 0x90($sp) /* 780A0 800DEBF0 D7B80088 */ ldc1 $f24, 0x88($sp) /* 780A4 800DEBF4 D7B60080 */ ldc1 $f22, 0x80($sp) /* 780A8 800DEBF8 D7B40078 */ ldc1 $f20, 0x78($sp) /* 780AC 800DEBFC 03E00008 */ jr $ra /* 780B0 800DEC00 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: s32 player_raycast_up_corners(PlayerStatus* player, f32* posX, f32* posY, f32* posZ, f32* hitDepth, f32 yaw) { f32 startX; f32 startY; f32 startZ; f32 depth; f32 theta; f32 deltaZ; f32 deltaX; f32 x,y,z; s32 ret; s32 hitID; f32 radius; radius = player->colliderDiameter * 0.3f; theta = DEG_TO_RAD(yaw); deltaX = radius * sin_rad(theta); deltaZ = -radius * cos_rad(theta); x = *posX; y = *posY; z = *posZ; depth = *hitDepth; startX = x + deltaX; startY = y; startZ = z + deltaZ; ret = NO_COLLIDER; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); if (hitID < 0) { startX = x - deltaX; startY = y; startZ = z - deltaZ; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } if (hitID < 0) { startX = x + deltaZ; startY = y; startZ = z + deltaX; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } if (hitID < 0) { startX = x - deltaZ; startY = y; startZ = z - deltaX; hitID = player_raycast_up_corner(&startX, &startY, &startZ, &depth); } if (hitID >= 0) { *posX = startX; *posY = startY; *posZ = startZ; *hitDepth = depth; ret = hitID; } if (ret < 0) { *posX = startX; *posY = startY; *posZ = startZ; *hitDepth = 0; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80263064 /* 191944 80263064 0000402D */ daddu $t0, $zero, $zero /* 191948 80263068 14A00003 */ bnez $a1, .L80263078 /* 19194C 8026306C 248A022C */ addiu $t2, $a0, 0x22C /* 191950 80263070 03E00008 */ jr $ra /* 191954 80263074 0100102D */ daddu $v0, $t0, $zero .L80263078: /* 191958 80263078 80AC01F3 */ lb $t4, 0x1F3($a1) /* 19195C 8026307C 8CA601F4 */ lw $a2, 0x1F4($a1) /* 191960 80263080 010C102A */ slt $v0, $t0, $t4 /* 191964 80263084 10400067 */ beqz $v0, .L80263224 /* 191968 80263088 0000482D */ daddu $t1, $zero, $zero /* 19196C 8026308C 3C0F0002 */ lui $t7, (0x20000 >> 16) /* 191970 80263090 3C0E0080 */ lui $t6, (0x800000 >> 16) /* 191974 80263094 3C0D0010 */ lui $t5, (0x100000 >> 16) /* 191978 80263098 2487023C */ addiu $a3, $a0, 0x23C .L8026309C: /* 19197C 8026309C 8CC30000 */ lw $v1, 0x0($a2) /* 191980 802630A0 006F1024 */ and $v0, $v1, $t7 /* 191984 802630A4 1440005A */ bnez $v0, .L80263210 /* 191988 802630A8 006E1024 */ and $v0, $v1, $t6 /* 19198C 802630AC 5040005A */ beql $v0, $zero, .L80263218 /* 191990 802630B0 25290001 */ addiu $t1, $t1, 0x1 /* 191994 802630B4 8CCB0008 */ lw $t3, 0x8($a2) /* 191998 802630B8 006D1024 */ and $v0, $v1, $t5 /* 19199C 802630BC 14400026 */ bnez $v0, .L80263158 /* 1919A0 802630C0 00000000 */ nop /* 1919A4 802630C4 C4A40144 */ lwc1 $f4, 0x144($a1) /* 1919A8 802630C8 C4A20148 */ lwc1 $f2, 0x148($a1) /* 1919AC 802630CC 84C20014 */ lh $v0, 0x14($a2) /* 1919B0 802630D0 C4A6014C */ lwc1 $f6, 0x14C($a1) /* 1919B4 802630D4 44820000 */ mtc1 $v0, $f0 /* 1919B8 802630D8 00000000 */ nop /* 1919BC 802630DC 46800020 */ cvt.s.w $f0, $f0 /* 1919C0 802630E0 8CA20000 */ lw $v0, 0x0($a1) /* 1919C4 802630E4 30420800 */ andi $v0, $v0, 0x800 /* 1919C8 802630E8 14400007 */ bnez $v0, .L80263108 /* 1919CC 802630EC 46002100 */ add.s $f4, $f4, $f0 /* 1919D0 802630F0 84C20016 */ lh $v0, 0x16($a2) /* 1919D4 802630F4 44820000 */ mtc1 $v0, $f0 /* 1919D8 802630F8 00000000 */ nop /* 1919DC 802630FC 46800020 */ cvt.s.w $f0, $f0 /* 1919E0 80263100 08098C47 */ j .L8026311C /* 1919E4 80263104 46001080 */ add.s $f2, $f2, $f0 .L80263108: /* 1919E8 80263108 84C20016 */ lh $v0, 0x16($a2) /* 1919EC 8026310C 44820000 */ mtc1 $v0, $f0 /* 1919F0 80263110 00000000 */ nop /* 1919F4 80263114 46800020 */ cvt.s.w $f0, $f0 /* 1919F8 80263118 46001081 */ sub.s $f2, $f2, $f0 .L8026311C: /* 1919FC 8026311C 84C20018 */ lh $v0, 0x18($a2) /* 191A00 80263120 44820000 */ mtc1 $v0, $f0 /* 191A04 80263124 00000000 */ nop /* 191A08 80263128 46800020 */ cvt.s.w $f0, $f0 /* 191A0C 8026312C 84C2006C */ lh $v0, 0x6C($a2) /* 191A10 80263130 46003180 */ add.s $f6, $f6, $f0 /* 191A14 80263134 44820000 */ mtc1 $v0, $f0 /* 191A18 80263138 00000000 */ nop /* 191A1C 8026313C 46800020 */ cvt.s.w $f0, $f0 /* 191A20 80263140 8CA20000 */ lw $v0, 0x0($a1) /* 191A24 80263144 30420800 */ andi $v0, $v0, 0x800 /* 191A28 80263148 1040000E */ beqz $v0, .L80263184 /* 191A2C 8026314C 46002100 */ add.s $f4, $f4, $f0 /* 191A30 80263150 08098C67 */ j .L8026319C /* 191A34 80263154 00000000 */ nop .L80263158: /* 191A38 80263158 C4C4002C */ lwc1 $f4, 0x2C($a2) /* 191A3C 8026315C C4C20030 */ lwc1 $f2, 0x30($a2) /* 191A40 80263160 84C2006C */ lh $v0, 0x6C($a2) /* 191A44 80263164 C4C60034 */ lwc1 $f6, 0x34($a2) /* 191A48 80263168 44820000 */ mtc1 $v0, $f0 /* 191A4C 8026316C 00000000 */ nop /* 191A50 80263170 46800020 */ cvt.s.w $f0, $f0 /* 191A54 80263174 8CA20000 */ lw $v0, 0x0($a1) /* 191A58 80263178 30420800 */ andi $v0, $v0, 0x800 /* 191A5C 8026317C 14400007 */ bnez $v0, .L8026319C /* 191A60 80263180 46002100 */ add.s $f4, $f4, $f0 .L80263184: /* 191A64 80263184 84C2006E */ lh $v0, 0x6E($a2) /* 191A68 80263188 44820000 */ mtc1 $v0, $f0 /* 191A6C 8026318C 00000000 */ nop /* 191A70 80263190 46800020 */ cvt.s.w $f0, $f0 /* 191A74 80263194 08098C6C */ j .L802631B0 /* 191A78 80263198 46001080 */ add.s $f2, $f2, $f0 .L8026319C: /* 191A7C 8026319C 84C2006E */ lh $v0, 0x6E($a2) /* 191A80 802631A0 44820000 */ mtc1 $v0, $f0 /* 191A84 802631A4 00000000 */ nop /* 191A88 802631A8 46800020 */ cvt.s.w $f0, $f0 /* 191A8C 802631AC 46001081 */ sub.s $f2, $f2, $f0 .L802631B0: /* 191A90 802631B0 94A20192 */ lhu $v0, 0x192($a1) /* 191A94 802631B4 25080001 */ addiu $t0, $t0, 0x1 /* 191A98 802631B8 A5420000 */ sh $v0, 0x0($t2) /* 191A9C 802631BC A4820428 */ sh $v0, 0x428($a0) /* 191AA0 802631C0 91620004 */ lbu $v0, 0x4($t3) /* 191AA4 802631C4 254A0014 */ addiu $t2, $t2, 0x14 /* 191AA8 802631C8 00021600 */ sll $v0, $v0, 24 /* 191AAC 802631CC 00021603 */ sra $v0, $v0, 24 /* 191AB0 802631D0 A4E2FFF2 */ sh $v0, -0xE($a3) /* 191AB4 802631D4 A0820426 */ sb $v0, 0x426($a0) /* 191AB8 802631D8 4600220D */ trunc.w.s $f8, $f4 /* 191ABC 802631DC 44024000 */ mfc1 $v0, $f8 /* 191AC0 802631E0 00000000 */ nop /* 191AC4 802631E4 A4E2FFF4 */ sh $v0, -0xC($a3) /* 191AC8 802631E8 4600120D */ trunc.w.s $f8, $f2 /* 191ACC 802631EC 44024000 */ mfc1 $v0, $f8 /* 191AD0 802631F0 00000000 */ nop /* 191AD4 802631F4 A4E2FFF6 */ sh $v0, -0xA($a3) /* 191AD8 802631F8 4600320D */ trunc.w.s $f8, $f6 /* 191ADC 802631FC 44024000 */ mfc1 $v0, $f8 /* 191AE0 80263200 00000000 */ nop /* 191AE4 80263204 A4E2FFF8 */ sh $v0, -0x8($a3) /* 191AE8 80263208 A0E00000 */ sb $zero, 0x0($a3) /* 191AEC 8026320C 24E70014 */ addiu $a3, $a3, 0x14 .L80263210: /* 191AF0 80263210 8CC6000C */ lw $a2, 0xC($a2) /* 191AF4 80263214 25290001 */ addiu $t1, $t1, 0x1 .L80263218: /* 191AF8 80263218 012C102A */ slt $v0, $t1, $t4 /* 191AFC 8026321C 1440FF9F */ bnez $v0, .L8026309C /* 191B00 80263220 00000000 */ nop .L80263224: /* 191B04 80263224 A088040C */ sb $t0, 0x40C($a0) /* 191B08 80263228 03E00008 */ jr $ra /* 191B0C 8026322C 0100102D */ daddu $v0, $t0, $zero ### DECOMPILED C INSTRUCTIONS: s32 func_80263064(Actor* actor0, Actor* actor1, s32 unused) { s32 ret = 0; SelectableTarget* target = actor0->targetData; s32 numParts; ActorPart* part; s32 i; if (actor1 == NULL) { return ret; } numParts = actor1->numParts; part = actor1->partsTable; for (i = 0; i < numParts; i++) { if (!(part->flags & ACTOR_PART_FLAG_NO_TARGET)) { if (!(part->flags & ACTOR_PART_FLAG_MULTI_TARGET)) { continue; } else { ActorPartBlueprint* bp = part->staticData; f32 x, y, z; if (!(part->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { x = actor1->currentPos.x; y = actor1->currentPos.y; z = actor1->currentPos.z; x += part->partOffset.x; if (!(actor1->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y += part->partOffset.y; } else { y -= part->partOffset.y; } z += part->partOffset.z; x += part->targetOffset.x; if (!(actor1->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y += part->targetOffset.y; } else { y -= part->targetOffset.y; } } else { x = part->absolutePosition.x; y = part->absolutePosition.y; z = part->absolutePosition.z; x += part->targetOffset.x; if (!(actor1->flags & ACTOR_FLAG_UPSIDE_DOWN)) { y += part->targetOffset.y; } else { y -= part->targetOffset.y; } } actor0->targetActorID = target->actorID = actor1->actorID; actor0->targetPartIndex = target->partID = bp->index; target->posA.x = x; target->posA.y = y; target->posA.z = z; target->unk_10 = 0; target++; ret++; } } part = part->nextPart; } actor0->targetListLength = ret; return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel FinishPushBlockMotion /* 7E3AC0 80282C40 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 7E3AC4 80282C44 AFB30034 */ sw $s3, 0x34($sp) /* 7E3AC8 80282C48 0080982D */ daddu $s3, $a0, $zero /* 7E3ACC 80282C4C AFB00028 */ sw $s0, 0x28($sp) /* 7E3AD0 80282C50 AFBF0038 */ sw $ra, 0x38($sp) /* 7E3AD4 80282C54 AFB20030 */ sw $s2, 0x30($sp) /* 7E3AD8 80282C58 AFB1002C */ sw $s1, 0x2C($sp) /* 7E3ADC 80282C5C 8E6400B0 */ lw $a0, 0xB0($s3) /* 7E3AE0 80282C60 8E7200AC */ lw $s2, 0xAC($s3) /* 7E3AE4 80282C64 0C04417A */ jal get_entity_by_index /* 7E3AE8 80282C68 00A0802D */ daddu $s0, $a1, $zero /* 7E3AEC 80282C6C 12000023 */ beqz $s0, .L80282CFC /* 7E3AF0 80282C70 0040882D */ daddu $s1, $v0, $zero /* 7E3AF4 80282C74 0000202D */ daddu $a0, $zero, $zero /* 7E3AF8 80282C78 27A50018 */ addiu $a1, $sp, 0x18 /* 7E3AFC 80282C7C 27A20024 */ addiu $v0, $sp, 0x24 /* 7E3B00 80282C80 27A6001C */ addiu $a2, $sp, 0x1C /* 7E3B04 80282C84 27A70020 */ addiu $a3, $sp, 0x20 /* 7E3B08 80282C88 AE600070 */ sw $zero, 0x70($s3) /* 7E3B0C 80282C8C C620004C */ lwc1 $f0, 0x4C($s1) /* 7E3B10 80282C90 3C01420C */ lui $at, (0x420C0000 >> 16) /* 7E3B14 80282C94 44811000 */ mtc1 $at, $f2 /* 7E3B18 80282C98 4600020D */ trunc.w.s $f8, $f0 /* 7E3B1C 80282C9C E6680084 */ swc1 $f8, 0x84($s3) /* 7E3B20 80282CA0 E7A20024 */ swc1 $f2, 0x24($sp) /* 7E3B24 80282CA4 C6260048 */ lwc1 $f6, 0x48($s1) /* 7E3B28 80282CA8 C620004C */ lwc1 $f0, 0x4C($s1) /* 7E3B2C 80282CAC 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 7E3B30 80282CB0 44811000 */ mtc1 $at, $f2 /* 7E3B34 80282CB4 C6240050 */ lwc1 $f4, 0x50($s1) /* 7E3B38 80282CB8 46020000 */ add.s $f0, $f0, $f2 /* 7E3B3C 80282CBC E7A60018 */ swc1 $f6, 0x18($sp) /* 7E3B40 80282CC0 E7A40020 */ swc1 $f4, 0x20($sp) /* 7E3B44 80282CC4 E7A0001C */ swc1 $f0, 0x1C($sp) /* 7E3B48 80282CC8 0C0372DF */ jal npc_raycast_down_sides /* 7E3B4C 80282CCC AFA20010 */ sw $v0, 0x10($sp) /* 7E3B50 80282CD0 C7A20024 */ lwc1 $f2, 0x24($sp) /* 7E3B54 80282CD4 4600120D */ trunc.w.s $f8, $f2 /* 7E3B58 80282CD8 10400008 */ beqz $v0, .L80282CFC /* 7E3B5C 80282CDC E6680074 */ swc1 $f8, 0x74($s3) /* 7E3B60 80282CE0 3C0140C0 */ lui $at, (0x40C00000 >> 16) /* 7E3B64 80282CE4 44810000 */ mtc1 $at, $f0 /* 7E3B68 80282CE8 00000000 */ nop /* 7E3B6C 80282CEC 4600103E */ c.le.s $f2, $f0 /* 7E3B70 80282CF0 00000000 */ nop /* 7E3B74 80282CF4 45010047 */ bc1t .L80282E14 /* 7E3B78 80282CF8 24020002 */ addiu $v0, $zero, 0x2 .L80282CFC: /* 7E3B7C 80282CFC 8E420014 */ lw $v0, 0x14($s2) /* 7E3B80 80282D00 10400019 */ beqz $v0, .L80282D68 /* 7E3B84 80282D04 0220202D */ daddu $a0, $s1, $zero /* 7E3B88 80282D08 0040F809 */ jalr $v0 /* 7E3B8C 80282D0C 0260282D */ daddu $a1, $s3, $zero /* 7E3B90 80282D10 10400040 */ beqz $v0, .L80282E14 /* 7E3B94 80282D14 0000102D */ daddu $v0, $zero, $zero /* 7E3B98 80282D18 C6460008 */ lwc1 $f6, 0x8($s2) /* 7E3B9C 80282D1C 468031A0 */ cvt.s.w $f6, $f6 /* 7E3BA0 80282D20 C6400010 */ lwc1 $f0, 0x10($s2) /* 7E3BA4 80282D24 46800020 */ cvt.s.w $f0, $f0 /* 7E3BA8 80282D28 C6220050 */ lwc1 $f2, 0x50($s1) /* 7E3BAC 80282D2C 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 7E3BB0 80282D30 44812000 */ mtc1 $at, $f4 /* 7E3BB4 80282D34 46001081 */ sub.s $f2, $f2, $f0 /* 7E3BB8 80282D38 C6200048 */ lwc1 $f0, 0x48($s1) /* 7E3BBC 80282D3C 92420004 */ lbu $v0, 0x4($s2) /* 7E3BC0 80282D40 46060001 */ sub.s $f0, $f0, $f6 /* 7E3BC4 80282D44 46041083 */ div.s $f2, $f2, $f4 /* 7E3BC8 80282D48 4600120D */ trunc.w.s $f8, $f2 /* 7E3BCC 80282D4C 44034000 */ mfc1 $v1, $f8 /* 7E3BD0 80282D50 00000000 */ nop /* 7E3BD4 80282D54 00620018 */ mult $v1, $v0 /* 7E3BD8 80282D58 24020001 */ addiu $v0, $zero, 0x1 /* 7E3BDC 80282D5C 8E430000 */ lw $v1, 0x0($s2) /* 7E3BE0 80282D60 080A0B7D */ j .L80282DF4 /* 7E3BE4 80282D64 46040003 */ div.s $f0, $f0, $f4 .L80282D68: /* 7E3BE8 80282D68 8E620070 */ lw $v0, 0x70($s3) /* 7E3BEC 80282D6C 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 7E3BF0 80282D70 44813000 */ mtc1 $at, $f6 /* 7E3BF4 80282D74 00021080 */ sll $v0, $v0, 2 /* 7E3BF8 80282D78 3C018028 */ lui $at, %hi(D_80285640) /* 7E3BFC 80282D7C 00220821 */ addu $at, $at, $v0 /* 7E3C00 80282D80 C4225640 */ lwc1 $f2, %lo(D_80285640)($at) /* 7E3C04 80282D84 46061082 */ mul.s $f2, $f2, $f6 /* 7E3C08 80282D88 00000000 */ nop /* 7E3C0C 80282D8C C6600084 */ lwc1 $f0, 0x84($s3) /* 7E3C10 80282D90 46800020 */ cvt.s.w $f0, $f0 /* 7E3C14 80282D94 46020001 */ sub.s $f0, $f0, $f2 /* 7E3C18 80282D98 E620004C */ swc1 $f0, 0x4C($s1) /* 7E3C1C 80282D9C 8E620070 */ lw $v0, 0x70($s3) /* 7E3C20 80282DA0 2403000D */ addiu $v1, $zero, 0xD /* 7E3C24 80282DA4 24420001 */ addiu $v0, $v0, 0x1 /* 7E3C28 80282DA8 14430019 */ bne $v0, $v1, .L80282E10 /* 7E3C2C 80282DAC AE620070 */ sw $v0, 0x70($s3) /* 7E3C30 80282DB0 C6400010 */ lwc1 $f0, 0x10($s2) /* 7E3C34 80282DB4 46800020 */ cvt.s.w $f0, $f0 /* 7E3C38 80282DB8 C6220050 */ lwc1 $f2, 0x50($s1) /* 7E3C3C 80282DBC C6440008 */ lwc1 $f4, 0x8($s2) /* 7E3C40 80282DC0 46802120 */ cvt.s.w $f4, $f4 /* 7E3C44 80282DC4 46001081 */ sub.s $f2, $f2, $f0 /* 7E3C48 80282DC8 C6200048 */ lwc1 $f0, 0x48($s1) /* 7E3C4C 80282DCC 92420004 */ lbu $v0, 0x4($s2) /* 7E3C50 80282DD0 46040001 */ sub.s $f0, $f0, $f4 /* 7E3C54 80282DD4 46061083 */ div.s $f2, $f2, $f6 /* 7E3C58 80282DD8 4600120D */ trunc.w.s $f8, $f2 /* 7E3C5C 80282DDC 44034000 */ mfc1 $v1, $f8 /* 7E3C60 80282DE0 00000000 */ nop /* 7E3C64 80282DE4 00620018 */ mult $v1, $v0 /* 7E3C68 80282DE8 24020001 */ addiu $v0, $zero, 0x1 /* 7E3C6C 80282DEC 8E430000 */ lw $v1, 0x0($s2) /* 7E3C70 80282DF0 46060003 */ div.s $f0, $f0, $f6 .L80282DF4: /* 7E3C74 80282DF4 4600020D */ trunc.w.s $f8, $f0 /* 7E3C78 80282DF8 44044000 */ mfc1 $a0, $f8 /* 7E3C7C 80282DFC 00004012 */ mflo $t0 /* 7E3C80 80282E00 00882021 */ addu $a0, $a0, $t0 /* 7E3C84 80282E04 00641821 */ addu $v1, $v1, $a0 /* 7E3C88 80282E08 080A0B85 */ j .L80282E14 /* 7E3C8C 80282E0C A0600000 */ sb $zero, 0x0($v1) .L80282E10: /* 7E3C90 80282E10 0000102D */ daddu $v0, $zero, $zero .L80282E14: /* 7E3C94 80282E14 8FBF0038 */ lw $ra, 0x38($sp) /* 7E3C98 80282E18 8FB30034 */ lw $s3, 0x34($sp) /* 7E3C9C 80282E1C 8FB20030 */ lw $s2, 0x30($sp) /* 7E3CA0 80282E20 8FB1002C */ lw $s1, 0x2C($sp) /* 7E3CA4 80282E24 8FB00028 */ lw $s0, 0x28($sp) /* 7E3CA8 80282E28 03E00008 */ jr $ra /* 7E3CAC 80282E2C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(FinishPushBlockMotion) { PushBlockGrid* grid = script->varTablePtr[10]; Entity* block = get_entity_by_index(script->varTable[11]); f32 hitX, hitY, hitZ, hitDepth; s32 hitResult; s32 i, j; if (isInitialCall) { script->functionTemp[0] = 0; script->varTable[0] = block->position.y; hitX = block->position.x; hitZ = block->position.z; hitY = block->position.y + 5.0f; hitDepth = 35.0f; hitResult = npc_raycast_down_sides(0, &hitX, &hitY, &hitZ, &hitDepth); script->functionTemp[1] = hitDepth; if (hitResult != 0 && hitDepth <= 6.0f) { return ApiStatus_DONE2; } } if (grid->dropCallback != NULL) { if (grid->dropCallback(block, script)) { i = (block->position.x - grid->centerPos.x) / BLOCK_GRID_SIZE; j = (block->position.z - grid->centerPos.z) / BLOCK_GRID_SIZE; grid->cells[i + (j * grid->numCellsX)] = 0; return ApiStatus_DONE1; } else { return ApiStatus_BLOCK; } } else { block->position.y = script->varTable[0] - (PushBlockMovePositions[script->functionTemp[0]] * BLOCK_GRID_SIZE); script->functionTemp[0]++; if (script->functionTemp[0] != ARRAY_COUNT(PushBlockMovePositions)) { return ApiStatus_BLOCK; } i = (block->position.x - grid->centerPos.x) / BLOCK_GRID_SIZE; j = (block->position.z - grid->centerPos.z) / BLOCK_GRID_SIZE; grid->cells[i + (j * grid->numCellsX)] = PUSH_GRID_EMPTY; } return ApiStatus_DONE1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel gfx_transfer_frame_to_depth /* 2DB4 800279B4 27BDFF98 */ addiu $sp, $sp, -0x68 /* 2DB8 800279B8 AFB50054 */ sw $s5, 0x54($sp) /* 2DBC 800279BC 0080A82D */ daddu $s5, $a0, $zero /* 2DC0 800279C0 AFB60058 */ sw $s6, 0x58($sp) /* 2DC4 800279C4 00A0B02D */ daddu $s6, $a1, $zero /* 2DC8 800279C8 AFB3004C */ sw $s3, 0x4C($sp) /* 2DCC 800279CC 24130001 */ addiu $s3, $zero, 0x1 /* 2DD0 800279D0 27A80018 */ addiu $t0, $sp, 0x18 /* 2DD4 800279D4 AFA80038 */ sw $t0, 0x38($sp) /* 2DD8 800279D8 24080140 */ addiu $t0, $zero, 0x140 /* 2DDC 800279DC AFBF0064 */ sw $ra, 0x64($sp) /* 2DE0 800279E0 AFBE0060 */ sw $fp, 0x60($sp) /* 2DE4 800279E4 AFB7005C */ sw $s7, 0x5C($sp) /* 2DE8 800279E8 AFB40050 */ sw $s4, 0x50($sp) /* 2DEC 800279EC AFB20048 */ sw $s2, 0x48($sp) /* 2DF0 800279F0 AFB10044 */ sw $s1, 0x44($sp) /* 2DF4 800279F4 AFB00040 */ sw $s0, 0x40($sp) /* 2DF8 800279F8 AFA60070 */ sw $a2, 0x70($sp) /* 2DFC 800279FC AFA8003C */ sw $t0, 0x3C($sp) .L80027A00: /* 2E00 80027A00 24120002 */ addiu $s2, $zero, 0x2 /* 2E04 80027A04 267EFFFF */ addiu $fp, $s3, -0x1 /* 2E08 80027A08 26770001 */ addiu $s7, $s3, 0x1 .L80027A0C: /* 2E0C 80027A0C 8FA8003C */ lw $t0, 0x3C($sp) /* 2E10 80027A10 01121021 */ addu $v0, $t0, $s2 /* 2E14 80027A14 0002A040 */ sll $s4, $v0, 1 /* 2E18 80027A18 02961021 */ addu $v0, $s4, $s6 /* 2E1C 80027A1C 94420000 */ lhu $v0, 0x0($v0) /* 2E20 80027A20 00021082 */ srl $v0, $v0, 2 /* 2E24 80027A24 3042000F */ andi $v0, $v0, 0xF /* 2E28 80027A28 2C420008 */ sltiu $v0, $v0, 0x8 /* 2E2C 80027A2C 10400043 */ beqz $v0, .L80027B3C /* 2E30 80027A30 02A0202D */ daddu $a0, $s5, $zero /* 2E34 80027A34 02C0282D */ daddu $a1, $s6, $zero /* 2E38 80027A38 03C0302D */ daddu $a2, $fp, $zero /* 2E3C 80027A3C 2650FFFF */ addiu $s0, $s2, -0x1 /* 2E40 80027A40 8FA80038 */ lw $t0, 0x38($sp) /* 2E44 80027A44 0200382D */ daddu $a3, $s0, $zero /* 2E48 80027A48 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2E4C 80027A4C AFA80010 */ sw $t0, 0x10($sp) /* 2E50 80027A50 02A0202D */ daddu $a0, $s5, $zero /* 2E54 80027A54 02C0282D */ daddu $a1, $s6, $zero /* 2E58 80027A58 03C0302D */ daddu $a2, $fp, $zero /* 2E5C 80027A5C 26510001 */ addiu $s1, $s2, 0x1 /* 2E60 80027A60 0220382D */ daddu $a3, $s1, $zero /* 2E64 80027A64 27A2001C */ addiu $v0, $sp, 0x1C /* 2E68 80027A68 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2E6C 80027A6C AFA20010 */ sw $v0, 0x10($sp) /* 2E70 80027A70 02A0202D */ daddu $a0, $s5, $zero /* 2E74 80027A74 02C0282D */ daddu $a1, $s6, $zero /* 2E78 80027A78 0260302D */ daddu $a2, $s3, $zero /* 2E7C 80027A7C 2647FFFE */ addiu $a3, $s2, -0x2 /* 2E80 80027A80 27A20020 */ addiu $v0, $sp, 0x20 /* 2E84 80027A84 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2E88 80027A88 AFA20010 */ sw $v0, 0x10($sp) /* 2E8C 80027A8C 02A0202D */ daddu $a0, $s5, $zero /* 2E90 80027A90 02C0282D */ daddu $a1, $s6, $zero /* 2E94 80027A94 0260302D */ daddu $a2, $s3, $zero /* 2E98 80027A98 26470002 */ addiu $a3, $s2, 0x2 /* 2E9C 80027A9C 27A20024 */ addiu $v0, $sp, 0x24 /* 2EA0 80027AA0 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2EA4 80027AA4 AFA20010 */ sw $v0, 0x10($sp) /* 2EA8 80027AA8 02A0202D */ daddu $a0, $s5, $zero /* 2EAC 80027AAC 02C0282D */ daddu $a1, $s6, $zero /* 2EB0 80027AB0 02E0302D */ daddu $a2, $s7, $zero /* 2EB4 80027AB4 0200382D */ daddu $a3, $s0, $zero /* 2EB8 80027AB8 27A20028 */ addiu $v0, $sp, 0x28 /* 2EBC 80027ABC 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2EC0 80027AC0 AFA20010 */ sw $v0, 0x10($sp) /* 2EC4 80027AC4 02A0202D */ daddu $a0, $s5, $zero /* 2EC8 80027AC8 02C0282D */ daddu $a1, $s6, $zero /* 2ECC 80027ACC 02E0302D */ daddu $a2, $s7, $zero /* 2ED0 80027AD0 0220382D */ daddu $a3, $s1, $zero /* 2ED4 80027AD4 27A2002C */ addiu $v0, $sp, 0x2C /* 2ED8 80027AD8 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2EDC 80027ADC AFA20010 */ sw $v0, 0x10($sp) /* 2EE0 80027AE0 02A0202D */ daddu $a0, $s5, $zero /* 2EE4 80027AE4 02C0282D */ daddu $a1, $s6, $zero /* 2EE8 80027AE8 0260302D */ daddu $a2, $s3, $zero /* 2EEC 80027AEC 0240382D */ daddu $a3, $s2, $zero /* 2EF0 80027AF0 27A20030 */ addiu $v0, $sp, 0x30 /* 2EF4 80027AF4 0C009C7F */ jal gfx_frame_filter_pass_0 /* 2EF8 80027AF8 AFA20010 */ sw $v0, 0x10($sp) /* 2EFC 80027AFC 8FA40038 */ lw $a0, 0x38($sp) /* 2F00 80027B00 8FA80070 */ lw $t0, 0x70($sp) /* 2F04 80027B04 93A50030 */ lbu $a1, 0x30($sp) /* 2F08 80027B08 93A20031 */ lbu $v0, 0x31($sp) /* 2F0C 80027B0C 93A30032 */ lbu $v1, 0x32($sp) /* 2F10 80027B10 01143021 */ addu $a2, $t0, $s4 /* 2F14 80027B14 00052E00 */ sll $a1, $a1, 24 /* 2F18 80027B18 00021400 */ sll $v0, $v0, 16 /* 2F1C 80027B1C 00A22825 */ or $a1, $a1, $v0 /* 2F20 80027B20 00031A00 */ sll $v1, $v1, 8 /* 2F24 80027B24 93A20033 */ lbu $v0, 0x33($sp) /* 2F28 80027B28 00A32825 */ or $a1, $a1, $v1 /* 2F2C 80027B2C 0C009C97 */ jal gfx_frame_filter_pass_1 /* 2F30 80027B30 00A22825 */ or $a1, $a1, $v0 /* 2F34 80027B34 08009ED6 */ j .L80027B58 /* 2F38 80027B38 26520001 */ addiu $s2, $s2, 0x1 .L80027B3C: /* 2F3C 80027B3C 02951021 */ addu $v0, $s4, $s5 /* 2F40 80027B40 8FA80070 */ lw $t0, 0x70($sp) /* 2F44 80027B44 94420000 */ lhu $v0, 0x0($v0) /* 2F48 80027B48 02881821 */ addu $v1, $s4, $t0 /* 2F4C 80027B4C 34420001 */ ori $v0, $v0, 0x1 /* 2F50 80027B50 A4620000 */ sh $v0, 0x0($v1) /* 2F54 80027B54 26520001 */ addiu $s2, $s2, 0x1 .L80027B58: /* 2F58 80027B58 2A42013E */ slti $v0, $s2, 0x13E /* 2F5C 80027B5C 1440FFAB */ bnez $v0, .L80027A0C /* 2F60 80027B60 00000000 */ nop /* 2F64 80027B64 26730001 */ addiu $s3, $s3, 0x1 /* 2F68 80027B68 8FA8003C */ lw $t0, 0x3C($sp) /* 2F6C 80027B6C 2A6200EF */ slti $v0, $s3, 0xEF /* 2F70 80027B70 25080140 */ addiu $t0, $t0, 0x140 /* 2F74 80027B74 1440FFA2 */ bnez $v0, .L80027A00 /* 2F78 80027B78 AFA8003C */ sw $t0, 0x3C($sp) /* 2F7C 80027B7C 8FBF0064 */ lw $ra, 0x64($sp) /* 2F80 80027B80 8FBE0060 */ lw $fp, 0x60($sp) /* 2F84 80027B84 8FB7005C */ lw $s7, 0x5C($sp) /* 2F88 80027B88 8FB60058 */ lw $s6, 0x58($sp) /* 2F8C 80027B8C 8FB50054 */ lw $s5, 0x54($sp) /* 2F90 80027B90 8FB40050 */ lw $s4, 0x50($sp) /* 2F94 80027B94 8FB3004C */ lw $s3, 0x4C($sp) /* 2F98 80027B98 8FB20048 */ lw $s2, 0x48($sp) /* 2F9C 80027B9C 8FB10044 */ lw $s1, 0x44($sp) /* 2FA0 80027BA0 8FB00040 */ lw $s0, 0x40($sp) /* 2FA4 80027BA4 03E00008 */ jr $ra /* 2FA8 80027BA8 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void gfx_transfer_frame_to_depth(u16* frameBuffer0, u16* frameBuffer1, u16* zBuffer) { Color_RGBA8 filterBuf0[6]; Color_RGBA8 filterBuf1; s32 y; s32 x; for (y = 1; y < SCREEN_HEIGHT - 1; y++) { for (x = 2; x < SCREEN_WIDTH - 2; x++) { s32 pixel = SCREEN_WIDTH * y + x; /* The application of gfx_frame_filter_pass_0 is done to the following pixels, where x is the current pixel. . . . x . . . */ if (((frameBuffer1[pixel] >> 2) & 0xF) < 8) { gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x - 1, &filterBuf0[0]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y - 1, x + 1, &filterBuf0[1]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x - 2, &filterBuf0[2]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x + 2, &filterBuf0[3]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x - 1, &filterBuf0[4]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y + 1, x + 1, &filterBuf0[5]); gfx_frame_filter_pass_0(frameBuffer0, frameBuffer1, y, x, &filterBuf1); gfx_frame_filter_pass_1(filterBuf0, filterBuf1, &zBuffer[pixel]); } else { // Don't apply any filters to the edges of the screen zBuffer[pixel] = frameBuffer0[pixel] | 1; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel explosion_main /* 343680 E0032000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 343684 E0032004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 343688 E0032008 4485A000 */ mtc1 $a1, $f20 /* 34368C E003200C AFB1002C */ sw $s1, 0x2C($sp) /* 343690 E0032010 0080882D */ daddu $s1, $a0, $zero /* 343694 E0032014 F7B60040 */ sdc1 $f22, 0x40($sp) /* 343698 E0032018 4486B000 */ mtc1 $a2, $f22 /* 34369C E003201C 27A40010 */ addiu $a0, $sp, 0x10 /* 3436A0 E0032020 F7B80048 */ sdc1 $f24, 0x48($sp) /* 3436A4 E0032024 4487C000 */ mtc1 $a3, $f24 /* 3436A8 E0032028 3C02E003 */ lui $v0, %hi(explosion_init) /* 3436AC E003202C 244221D0 */ addiu $v0, $v0, %lo(explosion_init) /* 3436B0 E0032030 AFBF0030 */ sw $ra, 0x30($sp) /* 3436B4 E0032034 AFB00028 */ sw $s0, 0x28($sp) /* 3436B8 E0032038 AFA00010 */ sw $zero, 0x10($sp) /* 3436BC E003203C AC820008 */ sw $v0, 0x8($a0) /* 3436C0 E0032040 3C02E003 */ lui $v0, %hi(explosion_update) /* 3436C4 E0032044 244221D8 */ addiu $v0, $v0, %lo(explosion_update) /* 3436C8 E0032048 AC82000C */ sw $v0, 0xC($a0) /* 3436CC E003204C 3C02E003 */ lui $v0, %hi(explosion_render) /* 3436D0 E0032050 24422420 */ addiu $v0, $v0, %lo(explosion_render) /* 3436D4 E0032054 AC820010 */ sw $v0, 0x10($a0) /* 3436D8 E0032058 24020019 */ addiu $v0, $zero, 0x19 /* 3436DC E003205C AC800014 */ sw $zero, 0x14($a0) /* 3436E0 E0032060 0C080124 */ jal shim_create_effect_instance /* 3436E4 E0032064 AC820004 */ sw $v0, 0x4($a0) /* 3436E8 E0032068 240400B4 */ addiu $a0, $zero, 0xB4 /* 3436EC E003206C 24030003 */ addiu $v1, $zero, 0x3 /* 3436F0 E0032070 0040802D */ daddu $s0, $v0, $zero /* 3436F4 E0032074 0C08012C */ jal shim_general_heap_malloc /* 3436F8 E0032078 AE030008 */ sw $v1, 0x8($s0) /* 3436FC E003207C 0040182D */ daddu $v1, $v0, $zero /* 343700 E0032080 14600003 */ bnez $v1, .LE0032090 /* 343704 E0032084 AE03000C */ sw $v1, 0xC($s0) .LE0032088: /* 343708 E0032088 0800C822 */ j .LE0032088 /* 34370C E003208C 00000000 */ nop .LE0032090: /* 343710 E0032090 2402003C */ addiu $v0, $zero, 0x3C /* 343714 E0032094 E4740004 */ swc1 $f20, 0x4($v1) /* 343718 E0032098 E4760008 */ swc1 $f22, 0x8($v1) /* 34371C E003209C E478000C */ swc1 $f24, 0xC($v1) /* 343720 E00320A0 AC600034 */ sw $zero, 0x34($v1) /* 343724 E00320A4 AC620030 */ sw $v0, 0x30($v1) /* 343728 E00320A8 AC710000 */ sw $s1, 0x0($v1) /* 34372C E00320AC 00621821 */ addu $v1, $v1, $v0 /* 343730 E00320B0 16200003 */ bnez $s1, .LE00320C0 /* 343734 E00320B4 AC710000 */ sw $s1, 0x0($v1) /* 343738 E00320B8 2402FFFF */ addiu $v0, $zero, -0x1 /* 34373C E00320BC AC620000 */ sw $v0, 0x0($v1) .LE00320C0: /* 343740 E00320C0 24020001 */ addiu $v0, $zero, 0x1 /* 343744 E00320C4 16220005 */ bne $s1, $v0, .LE00320DC /* 343748 E00320C8 AC600038 */ sw $zero, 0x38($v1) /* 34374C E00320CC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 343750 E00320D0 44810000 */ mtc1 $at, $f0 /* 343754 E00320D4 0800C83C */ j .LE00320F0 /* 343758 E00320D8 E4600020 */ swc1 $f0, 0x20($v1) .LE00320DC: /* 34375C E00320DC 3C014040 */ lui $at, (0x40400000 >> 16) /* 343760 E00320E0 44810000 */ mtc1 $at, $f0 /* 343764 E00320E4 00000000 */ nop /* 343768 E00320E8 E4600020 */ swc1 $f0, 0x20($v1) /* 34376C E00320EC 24020001 */ addiu $v0, $zero, 0x1 .LE00320F0: /* 343770 E00320F0 16220005 */ bne $s1, $v0, .LE0032108 /* 343774 E00320F4 00000000 */ nop /* 343778 E00320F8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 34377C E00320FC 44810000 */ mtc1 $at, $f0 /* 343780 E0032100 0800C846 */ j .LE0032118 /* 343784 E0032104 E4600024 */ swc1 $f0, 0x24($v1) .LE0032108: /* 343788 E0032108 3C014040 */ lui $at, (0x40400000 >> 16) /* 34378C E003210C 44810000 */ mtc1 $at, $f0 /* 343790 E0032110 00000000 */ nop /* 343794 E0032114 E4600024 */ swc1 $f0, 0x24($v1) .LE0032118: /* 343798 E0032118 2463003C */ addiu $v1, $v1, 0x3C /* 34379C E003211C 240200FF */ addiu $v0, $zero, 0xFF /* 3437A0 E0032120 AC710000 */ sw $s1, 0x0($v1) /* 3437A4 E0032124 12200006 */ beqz $s1, .LE0032140 /* 3437A8 E0032128 AC620038 */ sw $v0, 0x38($v1) /* 3437AC E003212C 24020001 */ addiu $v0, $zero, 0x1 /* 3437B0 E0032130 1222000B */ beq $s1, $v0, .LE0032160 /* 3437B4 E0032134 00000000 */ nop /* 3437B8 E0032138 0800C860 */ j .LE0032180 /* 3437BC E003213C 00000000 */ nop .LE0032140: /* 3437C0 E0032140 3C01411E */ lui $at, (0x411E6666 >> 16) /* 3437C4 E0032144 34216666 */ ori $at, $at, (0x411E6666 & 0xFFFF) /* 3437C8 E0032148 44810000 */ mtc1 $at, $f0 /* 3437CC E003214C 3C013FCC */ lui $at, (0x3FCCCCCD >> 16) /* 3437D0 E0032150 3421CCCD */ ori $at, $at, (0x3FCCCCCD & 0xFFFF) /* 3437D4 E0032154 44811000 */ mtc1 $at, $f2 /* 3437D8 E0032158 0800C867 */ j .LE003219C /* 3437DC E003215C E4600020 */ swc1 $f0, 0x20($v1) .LE0032160: /* 3437E0 E0032160 3C01415E */ lui $at, (0x415E6666 >> 16) /* 3437E4 E0032164 34216666 */ ori $at, $at, (0x415E6666 & 0xFFFF) /* 3437E8 E0032168 44810000 */ mtc1 $at, $f0 /* 3437EC E003216C 3C014019 */ lui $at, (0x4019999A >> 16) /* 3437F0 E0032170 3421999A */ ori $at, $at, (0x4019999A & 0xFFFF) /* 3437F4 E0032174 44811000 */ mtc1 $at, $f2 /* 3437F8 E0032178 0800C867 */ j .LE003219C /* 3437FC E003217C E4600020 */ swc1 $f0, 0x20($v1) .LE0032180: /* 343800 E0032180 3C01418E */ lui $at, (0x418E6666 >> 16) /* 343804 E0032184 34216666 */ ori $at, $at, (0x418E6666 & 0xFFFF) /* 343808 E0032188 44810000 */ mtc1 $at, $f0 /* 34380C E003218C 3C01404C */ lui $at, (0x404CCCCD >> 16) /* 343810 E0032190 3421CCCD */ ori $at, $at, (0x404CCCCD & 0xFFFF) /* 343814 E0032194 44811000 */ mtc1 $at, $f2 /* 343818 E0032198 E4600020 */ swc1 $f0, 0x20($v1) .LE003219C: /* 34381C E003219C E4620024 */ swc1 $f2, 0x24($v1) /* 343820 E00321A0 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 343824 E00321A4 44810000 */ mtc1 $at, $f0 /* 343828 E00321A8 AC600028 */ sw $zero, 0x28($v1) /* 34382C E00321AC E460002C */ swc1 $f0, 0x2C($v1) /* 343830 E00321B0 8FBF0030 */ lw $ra, 0x30($sp) /* 343834 E00321B4 8FB1002C */ lw $s1, 0x2C($sp) /* 343838 E00321B8 8FB00028 */ lw $s0, 0x28($sp) /* 34383C E00321BC D7B80048 */ ldc1 $f24, 0x48($sp) /* 343840 E00321C0 D7B60040 */ ldc1 $f22, 0x40($sp) /* 343844 E00321C4 D7B40038 */ ldc1 $f20, 0x38($sp) /* 343848 E00321C8 03E00008 */ jr $ra /* 34384C E00321CC 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void explosion_main(s32 type, f32 x, f32 y, f32 z) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; ExplosionFXData* data; s32 numParts = 3; // TODO this terrible if-else required to match s32 dumb; s32 temp; if (type != 0) { dumb = 0; } else { temp = 0; dumb = temp; } bpPtr->unk_00 = 0; bpPtr->init = explosion_init; bpPtr->update = explosion_update; bpPtr->renderWorld = explosion_render; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_EXPLOSION; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; effect->data.explosion = data = shim_general_heap_malloc(effect->numParts * sizeof(*data)); ASSERT(effect->data.explosion != NULL); data->pos.x = x; data->pos.y = y; data->pos.z = z; data->unk_34 = 0; data->unk_30 = 60; data->unk_00 = type; data++; data->unk_00 = type; if (type == 0) { data->unk_00 = -1; } data->unk_38 = 0; if (type == 1) { data->unk_20 = 1.0f; } else { data->unk_20 = 3.0f; } if (type == 1) { data->unk_24 = 1.0f; } else { data->unk_24 = 3.0f; } data++; data->unk_00 = type; data->unk_38 = 255; switch (type) { case 0: data->unk_20 = 9.9f; data->unk_24 = 1.6f; break; case 1: data->unk_20 = 13.9f; data->unk_24 = 2.4f; break; default: data->unk_20 = 17.8f; data->unk_24 = 3.2f; break; } data->unk_28 = 0.0f; data->unk_2C = 30.0f; }
### RAW ASSEMBLY INSTRUCTIONS: glabel action_command_update /* 197218 80268938 3C02800E */ lui $v0, %hi(gBattleStatus) /* 19721C 8026893C 8C42C070 */ lw $v0, %lo(gBattleStatus)($v0) /* 197220 80268940 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 197224 80268944 30428000 */ andi $v0, $v0, 0x8000 /* 197228 80268948 10400003 */ beqz $v0, .L80268958 /* 19722C 8026894C AFBF0010 */ sw $ra, 0x10($sp) /* 197230 80268950 0C09A327 */ jal action_command_free /* 197234 80268954 00000000 */ nop .L80268958: /* 197238 80268958 3C02802A */ lui $v0, %hi(gActionCommandStatus) /* 19723C 8026895C 2442FBE0 */ addiu $v0, $v0, %lo(gActionCommandStatus) /* 197240 80268960 8443004A */ lh $v1, 0x4A($v0) /* 197244 80268964 2C620018 */ sltiu $v0, $v1, 0x18 /* 197248 80268968 10400060 */ beqz $v0, .L80268AEC /* 19724C 8026896C 00031080 */ sll $v0, $v1, 2 /* 197250 80268970 3C01802A */ lui $at, %hi(jtbl_8029D6A0) /* 197254 80268974 00220821 */ addu $at, $at, $v0 /* 197258 80268978 8C22D6A0 */ lw $v0, %lo(jtbl_8029D6A0)($at) /* 19725C 8026897C 00400008 */ jr $v0 /* 197260 80268980 00000000 */ nop glabel .L80268984 /* 197264 80268984 0C0AA48D */ jal func_802A9234 /* 197268 80268988 00000000 */ nop /* 19726C 8026898C 0809A2BB */ j .L80268AEC /* 197270 80268990 00000000 */ nop glabel .L80268994 /* 197274 80268994 0C0AA4DB */ jal func_802A936C /* 197278 80268998 00000000 */ nop /* 19727C 8026899C 0809A2BB */ j .L80268AEC /* 197280 802689A0 00000000 */ nop glabel .L802689A4 /* 197284 802689A4 0C0AA4DE */ jal func_802A9378 /* 197288 802689A8 00000000 */ nop /* 19728C 802689AC 0809A2BB */ j .L80268AEC /* 197290 802689B0 00000000 */ nop glabel .L802689B4 /* 197294 802689B4 0C0AA4B7 */ jal func_802A92DC /* 197298 802689B8 00000000 */ nop /* 19729C 802689BC 0809A2BB */ j .L80268AEC /* 1972A0 802689C0 00000000 */ nop glabel .L802689C4 /* 1972A4 802689C4 0C0AA4BC */ jal func_802A92F0 /* 1972A8 802689C8 00000000 */ nop /* 1972AC 802689CC 0809A2BB */ j .L80268AEC /* 1972B0 802689D0 00000000 */ nop glabel .L802689D4 /* 1972B4 802689D4 0C0AA47E */ jal func_802A91F8 /* 1972B8 802689D8 00000000 */ nop /* 1972BC 802689DC 0809A2BB */ j .L80268AEC /* 1972C0 802689E0 00000000 */ nop glabel .L802689E4 /* 1972C4 802689E4 0C0AA48A */ jal func_802A9228 /* 1972C8 802689E8 00000000 */ nop /* 1972CC 802689EC 0809A2BB */ j .L80268AEC /* 1972D0 802689F0 00000000 */ nop glabel .L802689F4 /* 1972D4 802689F4 0C0AA4A3 */ jal func_802A928C /* 1972D8 802689F8 00000000 */ nop /* 1972DC 802689FC 0809A2BB */ j .L80268AEC /* 1972E0 80268A00 00000000 */ nop glabel .L80268A04 /* 1972E4 80268A04 0C0AA4A5 */ jal func_802A9294 /* 1972E8 80268A08 00000000 */ nop /* 1972EC 80268A0C 0809A2BB */ j .L80268AEC /* 1972F0 80268A10 00000000 */ nop glabel .L80268A14 /* 1972F4 80268A14 0C0AA4A3 */ jal func_802A928C /* 1972F8 80268A18 00000000 */ nop /* 1972FC 80268A1C 0809A2BB */ j .L80268AEC /* 197300 80268A20 00000000 */ nop glabel .L80268A24 /* 197304 80268A24 0C0AA4A3 */ jal func_802A928C /* 197308 80268A28 00000000 */ nop /* 19730C 80268A2C 0809A2BB */ j .L80268AEC /* 197310 80268A30 00000000 */ nop glabel .L80268A34 /* 197314 80268A34 0C0AA4B5 */ jal func_802A92D4 /* 197318 80268A38 00000000 */ nop /* 19731C 80268A3C 0809A2BB */ j .L80268AEC /* 197320 80268A40 00000000 */ nop glabel .L80268A44 /* 197324 80268A44 0C0AA49E */ jal func_802A9278 /* 197328 80268A48 00000000 */ nop /* 19732C 80268A4C 0809A2BB */ j .L80268AEC /* 197330 80268A50 00000000 */ nop glabel .L80268A54 /* 197334 80268A54 0C0AA4A5 */ jal func_802A9294 /* 197338 80268A58 00000000 */ nop /* 19733C 80268A5C 0809A2BB */ j .L80268AEC /* 197340 80268A60 00000000 */ nop glabel .L80268A64 /* 197344 80268A64 0C0AA482 */ jal func_802A9208 /* 197348 80268A68 00000000 */ nop /* 19734C 80268A6C 0809A2BB */ j .L80268AEC /* 197350 80268A70 00000000 */ nop glabel .L80268A74 /* 197354 80268A74 0C0AA4C4 */ jal func_802A9310 /* 197358 80268A78 00000000 */ nop /* 19735C 80268A7C 0809A2BB */ j .L80268AEC /* 197360 80268A80 00000000 */ nop glabel .L80268A84 /* 197364 80268A84 0C0AA4A8 */ jal func_802A92A0 /* 197368 80268A88 00000000 */ nop /* 19736C 80268A8C 0809A2BB */ j .L80268AEC /* 197370 80268A90 00000000 */ nop glabel .L80268A94 /* 197374 80268A94 0C0AA4A6 */ jal func_802A9298 /* 197378 80268A98 00000000 */ nop /* 19737C 80268A9C 0809A2BB */ j .L80268AEC /* 197380 80268AA0 00000000 */ nop glabel .L80268AA4 /* 197384 80268AA4 0C0AA495 */ jal func_802A9254 /* 197388 80268AA8 00000000 */ nop /* 19738C 80268AAC 0809A2BB */ j .L80268AEC /* 197390 80268AB0 00000000 */ nop glabel .L80268AB4 /* 197394 80268AB4 0C0AA4A8 */ jal func_802A92A0 /* 197398 80268AB8 00000000 */ nop /* 19739C 80268ABC 0809A2BB */ j .L80268AEC /* 1973A0 80268AC0 00000000 */ nop glabel .L80268AC4 /* 1973A4 80268AC4 0C0AA4A6 */ jal func_802A9298 /* 1973A8 80268AC8 00000000 */ nop /* 1973AC 80268ACC 0809A2BB */ j .L80268AEC /* 1973B0 80268AD0 00000000 */ nop glabel .L80268AD4 /* 1973B4 80268AD4 0C0AA523 */ jal func_802A948C /* 1973B8 80268AD8 00000000 */ nop /* 1973BC 80268ADC 0809A2BB */ j .L80268AEC /* 1973C0 80268AE0 00000000 */ nop glabel .L80268AE4 /* 1973C4 80268AE4 0C0AA48A */ jal func_802A9228 /* 1973C8 80268AE8 00000000 */ nop glabel .L80268AEC /* 1973CC 80268AEC 8FBF0010 */ lw $ra, 0x10($sp) /* 1973D0 80268AF0 03E00008 */ jr $ra /* 1973D4 80268AF4 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void action_command_update(void) { ActionCommandStatus* actionCommandStatus = &gActionCommandStatus; if (gBattleStatus.flags1 & BS_FLAGS1_8000) { action_command_free(); } switch (actionCommandStatus->actionCommandID) { case ACTION_COMMAND_NONE: break; case ACTION_COMMAND_JUMP: action_command_jump_update(); break; case ACTION_COMMAND_SMASH: action_command_hammer_update(); break; case ACTION_COMMAND_FLEE: action_command_flee_update(); break; case ACTION_COMMAND_BREAK_FREE: action_command_break_free_update(); break; case ACTION_COMMAND_WHIRLWIND: action_command_whirlwind_update(); break; case ACTION_COMMAND_STOP_LEECH: action_command_stop_leech_update(); break; case ACTION_COMMAND_07: action_command_07_update(); break; case ACTION_COMMAND_DIZZY_SHELL: action_command_dizzy_shell_update(); break; case ACTION_COMMAND_FIRE_SHELL: action_command_fire_shell_update(); break; case ACTION_COMMAND_0A: action_command_0A_update(); break; case ACTION_COMMAND_BOMB: action_command_bomb_update(); break; case ACTION_COMMAND_BODY_SLAM: action_command_body_slam_update(); break; case ACTION_COMMAND_AIR_LIFT: action_command_air_lift_update(); break; case ACTION_COMMAND_AIR_RAID: action_command_air_raid_update(); break; case ACTION_COMMAND_SQUIRT: action_command_squirt_update(); break; case ACTION_COMMAND_POWER_SHOCK: action_command_power_shock_update(); break; case ACTION_COMMAND_MEGA_SHOCK: action_command_mega_shock_update(); break; case ACTION_COMMAND_SMACK: action_command_smack_update(); break; case ACTION_COMMAND_SPINY_SURGE: action_command_spiny_surge_update(); break; case ACTION_COMMAND_HURRICANE: action_command_hurricane_update(); break; case ACTION_COMMAND_SPOOK: action_command_spook_update(); break; case ACTION_COMMAND_WATER_BLOCK: action_command_water_block_update(); break; case ACTION_COMMAND_TIDAL_WAVE: action_command_tidal_wave_update(); break; default: break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel draw_message_window /* BE2A4 80127BA4 27BDFFA8 */ addiu $sp, $sp, -0x58 /* BE2A8 80127BA8 0080402D */ daddu $t0, $a0, $zero /* BE2AC 80127BAC 2402000D */ addiu $v0, $zero, 0xD /* BE2B0 80127BB0 AFBF0050 */ sw $ra, 0x50($sp) /* BE2B4 80127BB4 910304F8 */ lbu $v1, 0x4F8($t0) /* BE2B8 80127BB8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* BE2BC 80127BBC 44810000 */ mtc1 $at, $f0 /* BE2C0 80127BC0 10620006 */ beq $v1, $v0, .L80127BDC /* BE2C4 80127BC4 0000482D */ daddu $t1, $zero, $zero /* BE2C8 80127BC8 2402000E */ addiu $v0, $zero, 0xE /* BE2CC 80127BCC 1062001D */ beq $v1, $v0, .L80127C44 /* BE2D0 80127BD0 2862000F */ slti $v0, $v1, 0xF /* BE2D4 80127BD4 08049F2B */ j .L80127CAC /* BE2D8 80127BD8 00000000 */ nop .L80127BDC: /* BE2DC 80127BDC 24050004 */ addiu $a1, $zero, 0x4 /* BE2E0 80127BE0 91030509 */ lbu $v1, 0x509($t0) /* BE2E4 80127BE4 3C014059 */ lui $at, (0x40590000 >> 16) /* BE2E8 80127BE8 44811800 */ mtc1 $at, $f3 /* BE2EC 80127BEC 44801000 */ mtc1 $zero, $f2 /* BE2F0 80127BF0 00A32023 */ subu $a0, $a1, $v1 /* BE2F4 80127BF4 00041040 */ sll $v0, $a0, 1 /* BE2F8 80127BF8 00444821 */ addu $t1, $v0, $a0 /* BE2FC 80127BFC 3C028015 */ lui $v0, %hi(D_8014C580) /* BE300 80127C00 00431021 */ addu $v0, $v0, $v1 /* BE304 80127C04 9042C580 */ lbu $v0, %lo(D_8014C580)($v0) /* BE308 80127C08 24630001 */ addiu $v1, $v1, 0x1 /* BE30C 80127C0C A1030509 */ sb $v1, 0x509($t0) /* BE310 80127C10 44820000 */ mtc1 $v0, $f0 /* BE314 80127C14 00000000 */ nop /* BE318 80127C18 46800020 */ cvt.s.w $f0, $f0 /* BE31C 80127C1C 46000021 */ cvt.d.s $f0, $f0 /* BE320 80127C20 306200FF */ andi $v0, $v1, 0xFF /* BE324 80127C24 46220003 */ div.d $f0, $f0, $f2 /* BE328 80127C28 3C018015 */ lui $at, %hi(D_8014C580) /* BE32C 80127C2C 00220821 */ addu $at, $at, $v0 /* BE330 80127C30 9022C580 */ lbu $v0, %lo(D_8014C580)($at) /* BE334 80127C34 1440001B */ bnez $v0, .L80127CA4 /* BE338 80127C38 46200020 */ cvt.s.d $f0, $f0 /* BE33C 80127C3C 08049F29 */ j .L80127CA4 /* BE340 80127C40 A10504F8 */ sb $a1, 0x4F8($t0) .L80127C44: /* BE344 80127C44 91020512 */ lbu $v0, 0x512($t0) /* BE348 80127C48 3C014059 */ lui $at, (0x40590000 >> 16) /* BE34C 80127C4C 44811800 */ mtc1 $at, $f3 /* BE350 80127C50 44801000 */ mtc1 $zero, $f2 /* BE354 80127C54 00024823 */ negu $t1, $v0 /* BE358 80127C58 3C038015 */ lui $v1, %hi(D_8014C588) /* BE35C 80127C5C 00621821 */ addu $v1, $v1, $v0 /* BE360 80127C60 9063C588 */ lbu $v1, %lo(D_8014C588)($v1) /* BE364 80127C64 24420001 */ addiu $v0, $v0, 0x1 /* BE368 80127C68 A1020512 */ sb $v0, 0x512($t0) /* BE36C 80127C6C 304200FF */ andi $v0, $v0, 0xFF /* BE370 80127C70 3C018015 */ lui $at, %hi(D_8014C588) /* BE374 80127C74 00220821 */ addu $at, $at, $v0 /* BE378 80127C78 9022C588 */ lbu $v0, %lo(D_8014C588)($at) /* BE37C 80127C7C 44830000 */ mtc1 $v1, $f0 /* BE380 80127C80 00000000 */ nop /* BE384 80127C84 46800020 */ cvt.s.w $f0, $f0 /* BE388 80127C88 46000021 */ cvt.d.s $f0, $f0 /* BE38C 80127C8C 46220003 */ div.d $f0, $f0, $f2 /* BE390 80127C90 14400004 */ bnez $v0, .L80127CA4 /* BE394 80127C94 46200020 */ cvt.s.d $f0, $f0 /* BE398 80127C98 8D0204FC */ lw $v0, 0x4FC($t0) /* BE39C 80127C9C 34420001 */ ori $v0, $v0, 0x1 /* BE3A0 80127CA0 AD0204FC */ sw $v0, 0x4FC($t0) .L80127CA4: /* BE3A4 80127CA4 910304F8 */ lbu $v1, 0x4F8($t0) /* BE3A8 80127CA8 2862000F */ slti $v0, $v1, 0xF .L80127CAC: /* BE3AC 80127CAC 1040002B */ beqz $v0, .L80127D5C /* BE3B0 80127CB0 2862000D */ slti $v0, $v1, 0xD /* BE3B4 80127CB4 1440002A */ bnez $v0, .L80127D60 /* BE3B8 80127CB8 0100202D */ daddu $a0, $t0, $zero /* BE3BC 80127CBC 24040001 */ addiu $a0, $zero, 0x1 /* BE3C0 80127CC0 24070038 */ addiu $a3, $zero, 0x38 /* BE3C4 80127CC4 95030514 */ lhu $v1, 0x514($t0) /* BE3C8 80127CC8 240200A0 */ addiu $v0, $zero, 0xA0 /* BE3CC 80127CCC 00831806 */ srlv $v1, $v1, $a0 /* BE3D0 80127CD0 00431023 */ subu $v0, $v0, $v1 /* BE3D4 80127CD4 A502045A */ sh $v0, 0x45A($t0) /* BE3D8 80127CD8 8506045A */ lh $a2, 0x45A($t0) /* BE3DC 80127CDC 00E0102D */ daddu $v0, $a3, $zero /* BE3E0 80127CE0 A502045C */ sh $v0, 0x45C($t0) /* BE3E4 80127CE4 AFA00010 */ sw $zero, 0x10($sp) /* BE3E8 80127CE8 95020514 */ lhu $v0, 0x514($t0) /* BE3EC 80127CEC 0000282D */ daddu $a1, $zero, $zero /* BE3F0 80127CF0 AFA20014 */ sw $v0, 0x14($sp) /* BE3F4 80127CF4 95030516 */ lhu $v1, 0x516($t0) /* BE3F8 80127CF8 240200FF */ addiu $v0, $zero, 0xFF /* BE3FC 80127CFC E7A00024 */ swc1 $f0, 0x24($sp) /* BE400 80127D00 E7A00028 */ swc1 $f0, 0x28($sp) /* BE404 80127D04 44890000 */ mtc1 $t1, $f0 /* BE408 80127D08 00000000 */ nop /* BE40C 80127D0C 46800020 */ cvt.s.w $f0, $f0 /* BE410 80127D10 AFA2001C */ sw $v0, 0x1C($sp) /* BE414 80127D14 3C028012 */ lui $v0, %hi(drawbox_message_delegate) /* BE418 80127D18 24427B70 */ addiu $v0, $v0, %lo(drawbox_message_delegate) /* BE41C 80127D1C AFA20038 */ sw $v0, 0x38($sp) /* BE420 80127D20 24020140 */ addiu $v0, $zero, 0x140 /* BE424 80127D24 AFA20044 */ sw $v0, 0x44($sp) /* BE428 80127D28 240200F0 */ addiu $v0, $zero, 0xF0 /* BE42C 80127D2C AFA00020 */ sw $zero, 0x20($sp) /* BE430 80127D30 AFA0002C */ sw $zero, 0x2C($sp) /* BE434 80127D34 AFA00030 */ sw $zero, 0x30($sp) /* BE438 80127D38 E7A00034 */ swc1 $f0, 0x34($sp) /* BE43C 80127D3C AFA8003C */ sw $t0, 0x3C($sp) /* BE440 80127D40 AFA00040 */ sw $zero, 0x40($sp) /* BE444 80127D44 AFA20048 */ sw $v0, 0x48($sp) /* BE448 80127D48 AFA0004C */ sw $zero, 0x4C($sp) /* BE44C 80127D4C 0C03D4B8 */ jal draw_box /* BE450 80127D50 AFA30018 */ sw $v1, 0x18($sp) /* BE454 80127D54 08049F61 */ j .L80127D84 /* BE458 80127D58 00000000 */ nop .L80127D5C: /* BE45C 80127D5C 0100202D */ daddu $a0, $t0, $zero .L80127D60: /* BE460 80127D60 84850456 */ lh $a1, 0x456($a0) /* BE464 80127D64 84860458 */ lh $a2, 0x458($a0) /* BE468 80127D68 9487046E */ lhu $a3, 0x46E($a0) /* BE46C 80127D6C 94830462 */ lhu $v1, 0x462($a0) /* BE470 80127D70 24020004 */ addiu $v0, $zero, 0x4 /* BE474 80127D74 AFA20014 */ sw $v0, 0x14($sp) /* BE478 80127D78 AFA00018 */ sw $zero, 0x18($sp) /* BE47C 80127D7C 0C049F64 */ jal appendGfx_message /* BE480 80127D80 AFA30010 */ sw $v1, 0x10($sp) .L80127D84: /* BE484 80127D84 8FBF0050 */ lw $ra, 0x50($sp) /* BE488 80127D88 03E00008 */ jr $ra /* BE48C 80127D8C 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void draw_message_window(MessagePrintState* printer) { f32 scale = 1.0f; s32 rotZ = 0; switch (printer->windowState) { case MSG_WINDOW_STATE_D: scale = (f32)D_8014C580[printer->fadeInCounter] / 100.0; rotZ = (4 - printer->fadeInCounter) * 3; printer->fadeInCounter++; if (D_8014C580[printer->fadeInCounter] == 0) { printer->windowState = MSG_WINDOW_STATE_PRINTING; } break; case MSG_WINDOW_STATE_E: scale = (f32)D_8014C588[printer->fadeOutCounter] / 100.0; rotZ = -printer->fadeOutCounter; printer->fadeOutCounter++; if (D_8014C588[printer->fadeOutCounter] == 0) { printer->stateFlags |= MSG_STATE_FLAG_1; } break; } switch (printer->windowState) { case MSG_WINDOW_STATE_D: case MSG_WINDOW_STATE_E: printer->windowBasePos.x = 160 - (printer->windowSize.x / 2); printer->windowBasePos.y = 56; draw_box(DRAW_FLAG_ROTSCALE, WINDOW_STYLE_0, printer->windowBasePos.x, 56, 0, printer->windowSize.x, printer->windowSize.y, 255, 0, scale, scale, 0.0f, 0.0f, rotZ, drawbox_message_delegate, printer, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); break; default: appendGfx_message(printer, printer->windowOffsetPos.x, printer->windowOffsetPos.y, printer->unk_46C, printer->curLinePos, 4, 0); break; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802A2AB8_7AA458 /* 417848 802A2AB8 27BDFFE0 */ addiu $sp, $sp, -0x20 D_802A2ABC_7AA45C: /* 41784C 802A2ABC 24040001 */ addiu $a0, $zero, 0x1 /* 417850 802A2AC0 24050005 */ addiu $a1, $zero, 0x5 /* 417854 802A2AC4 AFBF0018 */ sw $ra, 0x18($sp) /* 417858 802A2AC8 AFB10014 */ sw $s1, 0x14($sp) /* 41785C 802A2ACC 0C051F9F */ jal set_window_update /* 417860 802A2AD0 AFB00010 */ sw $s0, 0x10($sp) /* 417864 802A2AD4 3C02802B */ lui $v0, %hi(BattleMenu_UsingSpiritsSubmenu) /* 417868 802A2AD8 8C42D4A0 */ lw $v0, %lo(BattleMenu_UsingSpiritsSubmenu)($v0) /* 41786C 802A2ADC 54400006 */ bnel $v0, $zero, .L802A2AF8_7AA498 /* 417870 802A2AE0 24040004 */ addiu $a0, $zero, 0x4 /* 417874 802A2AE4 24040002 */ addiu $a0, $zero, 0x2 /* 417878 802A2AE8 0C051F9F */ jal set_window_update /* 41787C 802A2AEC 24050005 */ addiu $a1, $zero, 0x5 /* 417880 802A2AF0 080A8AC1 */ j .L802A2B04_7AA4A4 /* 417884 802A2AF4 24040003 */ addiu $a0, $zero, 0x3 .L802A2AF8_7AA498: /* 417888 802A2AF8 0C051F9F */ jal set_window_update D_802A2AFC_7AA49C: /* 41788C 802A2AFC 24050005 */ addiu $a1, $zero, 0x5 /* 417890 802A2B00 24040005 */ addiu $a0, $zero, 0x5 .L802A2B04_7AA4A4: /* 417894 802A2B04 0C051F9F */ jal set_window_update /* 417898 802A2B08 24050005 */ addiu $a1, $zero, 0x5 /* 41789C 802A2B0C 24040008 */ addiu $a0, $zero, 0x8 /* 4178A0 802A2B10 0C051F9F */ jal set_window_update /* 4178A4 802A2B14 24050001 */ addiu $a1, $zero, 0x1 /* 4178A8 802A2B18 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 4178AC 802A2B1C 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 4178B0 802A2B20 1840000F */ blez $v0, .L802A2B60_7AA500 /* 4178B4 802A2B24 0000802D */ daddu $s0, $zero, $zero /* 4178B8 802A2B28 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionIDs) /* 4178BC 802A2B2C 2631D128 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionIDs) /* 4178C0 802A2B30 240500FF */ addiu $a1, $zero, 0xFF .L802A2B34_7AA4D4: /* 4178C4 802A2B34 00A0302D */ daddu $a2, $a1, $zero /* 4178C8 802A2B38 00A0382D */ daddu $a3, $a1, $zero /* 4178CC 802A2B3C 8E240000 */ lw $a0, 0x0($s1) /* 4178D0 802A2B40 0C0513BF */ jal hud_element_set_tint /* 4178D4 802A2B44 26310004 */ addiu $s1, $s1, 0x4 /* 4178D8 802A2B48 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 4178DC 802A2B4C 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 4178E0 802A2B50 26100001 */ addiu $s0, $s0, 0x1 /* 4178E4 802A2B54 0202102A */ slt $v0, $s0, $v0 /* 4178E8 802A2B58 1440FFF6 */ bnez $v0, .L802A2B34_7AA4D4 /* 4178EC 802A2B5C 240500FF */ addiu $a1, $zero, 0xFF .L802A2B60_7AA500: /* 4178F0 802A2B60 240500FF */ addiu $a1, $zero, 0xFF /* 4178F4 802A2B64 00A0302D */ daddu $a2, $a1, $zero /* 4178F8 802A2B68 3C04802B */ lui $a0, %hi(BattleMenu_Moves_CursorID) /* 4178FC 802A2B6C 8C84D118 */ lw $a0, %lo(BattleMenu_Moves_CursorID)($a0) D_802A2B70_7AA510: /* 417900 802A2B70 0C0513BF */ jal hud_element_set_tint /* 417904 802A2B74 00A0382D */ daddu $a3, $a1, $zero /* 417908 802A2B78 240500FF */ addiu $a1, $zero, 0xFF /* 41790C 802A2B7C 00A0302D */ daddu $a2, $a1, $zero /* 417910 802A2B80 3C04802B */ lui $a0, %hi(BattleMenu_Moves_UpArrowID) /* 417914 802A2B84 8C84D11C */ lw $a0, %lo(BattleMenu_Moves_UpArrowID)($a0) /* 417918 802A2B88 0C0513BF */ jal hud_element_set_tint /* 41791C 802A2B8C 00A0382D */ daddu $a3, $a1, $zero /* 417920 802A2B90 240500FF */ addiu $a1, $zero, 0xFF /* 417924 802A2B94 00A0302D */ daddu $a2, $a1, $zero /* 417928 802A2B98 3C04802B */ lui $a0, %hi(BattleMenu_Moves_DownArrowID) /* 41792C 802A2B9C 8C84D120 */ lw $a0, %lo(BattleMenu_Moves_DownArrowID)($a0) /* 417930 802A2BA0 0C0513BF */ jal hud_element_set_tint /* 417934 802A2BA4 00A0382D */ daddu $a3, $a1, $zero /* 417938 802A2BA8 240500FF */ addiu $a1, $zero, 0xFF /* 41793C 802A2BAC 00A0302D */ daddu $a2, $a1, $zero /* 417940 802A2BB0 3C04802B */ lui $a0, %hi(BattleMenu_Moves_TitleID) /* 417944 802A2BB4 8C84D188 */ lw $a0, %lo(BattleMenu_Moves_TitleID)($a0) /* 417948 802A2BB8 0C0513BF */ jal hud_element_set_tint /* 41794C 802A2BBC 00A0382D */ daddu $a3, $a1, $zero /* 417950 802A2BC0 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 417954 802A2BC4 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 417958 802A2BC8 1840000F */ blez $v0, .L802A2C08_7AA5A8 /* 41795C 802A2BCC 0000802D */ daddu $s0, $zero, $zero /* 417960 802A2BD0 3C11802B */ lui $s1, %hi(BattleMenu_Moves_OptionCostUnitIDs) /* 417964 802A2BD4 2631D190 */ addiu $s1, $s1, %lo(BattleMenu_Moves_OptionCostUnitIDs) /* 417968 802A2BD8 240500FF */ addiu $a1, $zero, 0xFF .L802A2BDC_7AA57C: /* 41796C 802A2BDC 00A0302D */ daddu $a2, $a1, $zero /* 417970 802A2BE0 00A0382D */ daddu $a3, $a1, $zero /* 417974 802A2BE4 8E240000 */ lw $a0, 0x0($s1) /* 417978 802A2BE8 0C0513BF */ jal hud_element_set_tint /* 41797C 802A2BEC 26310004 */ addiu $s1, $s1, 0x4 /* 417980 802A2BF0 3C02802B */ lui $v0, %hi(BattleMenu_Moves_OptionCount) /* 417984 802A2BF4 8C42D4A4 */ lw $v0, %lo(BattleMenu_Moves_OptionCount)($v0) /* 417988 802A2BF8 26100001 */ addiu $s0, $s0, 0x1 /* 41798C 802A2BFC 0202102A */ slt $v0, $s0, $v0 /* 417990 802A2C00 1440FFF6 */ bnez $v0, .L802A2BDC_7AA57C /* 417994 802A2C04 240500FF */ addiu $a1, $zero, 0xFF .L802A2C08_7AA5A8: /* 417998 802A2C08 3C04802B */ lui $a0, %hi(BattleMenu_Moves_CursorID) D_802A2C0C_7AA5AC: /* 41799C 802A2C0C 8C84D118 */ lw $a0, %lo(BattleMenu_Moves_CursorID)($a0) /* 4179A0 802A2C10 3C058010 */ lui $a1, %hi(HES_AnimatedHandPointer) /* 4179A4 802A2C14 24A54A28 */ addiu $a1, $a1, %lo(HES_AnimatedHandPointer) /* 4179A8 802A2C18 0C0511FF */ jal hud_element_set_script /* 4179AC 802A2C1C 00000000 */ nop D_802A2C20_7AA5C0: /* 4179B0 802A2C20 8FBF0018 */ lw $ra, 0x18($sp) /* 4179B4 802A2C24 8FB10014 */ lw $s1, 0x14($sp) /* 4179B8 802A2C28 8FB00010 */ lw $s0, 0x10($sp) /* 4179BC 802A2C2C 2402000A */ addiu $v0, $zero, 0xA /* 4179C0 802A2C30 3C01802B */ lui $at, %hi(BattleMenu_Moves_TextColor) /* 4179C4 802A2C34 A422D114 */ sh $v0, %lo(BattleMenu_Moves_TextColor)($at) /* 4179C8 802A2C38 24020001 */ addiu $v0, $zero, 0x1 /* 4179CC 802A2C3C 3C01802B */ lui $at, %hi(D_802AD10F) D_802A2C40_7AA5E0: /* 4179D0 802A2C40 A022D10F */ sb $v0, %lo(D_802AD10F)($at) /* 4179D4 802A2C44 24020014 */ addiu $v0, $zero, 0x14 /* 4179D8 802A2C48 3C01802B */ lui $at, %hi(battle_menu_moveState) /* 4179DC 802A2C4C A022D108 */ sb $v0, %lo(battle_menu_moveState)($at) D_802A2C50_7AA5F0: /* 4179E0 802A2C50 03E00008 */ jr $ra /* 4179E4 802A2C54 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void func_802A2AB8(void) { s32* moveOptionIconIDs; s32* moveOptionCostUnitIconIDs; s32 i; set_window_update(WINDOW_ID_1, WINDOW_UPDATE_TRANSPARENT); if (!BattleMenu_UsingSpiritsSubmenu) { set_window_update(WINDOW_ID_2, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_3, WINDOW_UPDATE_TRANSPARENT); } else { set_window_update(WINDOW_ID_4, WINDOW_UPDATE_TRANSPARENT); set_window_update(WINDOW_ID_5, WINDOW_UPDATE_TRANSPARENT); } set_window_update(WINDOW_ID_8, WINDOW_UPDATE_SHOW); moveOptionIconIDs = BattleMenu_Moves_OptionIDs; for (i = 0; i < BattleMenu_Moves_OptionCount; i++) { hud_element_set_tint(moveOptionIconIDs[i], 255, 255, 255); } hud_element_set_tint(BattleMenu_Moves_CursorID, 255, 255, 255); hud_element_set_tint(BattleMenu_Moves_UpArrowID, 255, 255, 255); hud_element_set_tint(BattleMenu_Moves_DownArrowID, 255, 255, 255); hud_element_set_tint(BattleMenu_Moves_TitleID, 255, 255, 255); moveOptionCostUnitIconIDs = BattleMenu_Moves_OptionCostUnitIDs; for (i = 0; i < BattleMenu_Moves_OptionCount; i++) { hud_element_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); } hud_element_set_script(BattleMenu_Moves_CursorID, &HES_AnimatedHandPointer); BattleMenu_Moves_TextColor = MSG_PAL_STANDARD; D_802AD10F = 1; battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_14; }
### RAW ASSEMBLY INSTRUCTIONS: glabel get_overriding_player_anim /* 791F8 800DFD48 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 791FC 800DFD4C AFB00010 */ sw $s0, 0x10($sp) /* 79200 800DFD50 0080802D */ daddu $s0, $a0, $zero /* 79204 800DFD54 3C058011 */ lui $a1, %hi(gPlayerStatus) /* 79208 800DFD58 24A5EFC8 */ addiu $a1, $a1, %lo(gPlayerStatus) /* 7920C 800DFD5C 3C048011 */ lui $a0, %hi(gPartnerStatus) /* 79210 800DFD60 2484EBB0 */ addiu $a0, $a0, %lo(gPartnerStatus) /* 79214 800DFD64 AFBF0014 */ sw $ra, 0x14($sp) /* 79218 800DFD68 80A300B4 */ lb $v1, 0xB4($a1) /* 7921C 800DFD6C 2402001D */ addiu $v0, $zero, 0x1D /* 79220 800DFD70 14620007 */ bne $v1, $v0, .L800DFD90 /* 79224 800DFD74 3C020001 */ lui $v0, (0x1002B >> 16) /* 79228 800DFD78 3442002B */ ori $v0, $v0, (0x1002B & 0xFFFF) /* 7922C 800DFD7C 12020004 */ beq $s0, $v0, .L800DFD90 /* 79230 800DFD80 3C020001 */ lui $v0, (0x10007 >> 16) /* 79234 800DFD84 34420007 */ ori $v0, $v0, (0x10007 & 0xFFFF) /* 79238 800DFD88 16020058 */ bne $s0, $v0, .L800DFEEC /* 7923C 800DFD8C 2402FFFF */ addiu $v0, $zero, -0x1 .L800DFD90: /* 79240 800DFD90 80820000 */ lb $v0, 0x0($a0) /* 79244 800DFD94 10400017 */ beqz $v0, .L800DFDF4 /* 79248 800DFD98 24020008 */ addiu $v0, $zero, 0x8 /* 7924C 800DFD9C 80830003 */ lb $v1, 0x3($a0) /* 79250 800DFDA0 14620006 */ bne $v1, $v0, .L800DFDBC /* 79254 800DFDA4 3C020001 */ lui $v0, (0x10002 >> 16) /* 79258 800DFDA8 34420002 */ ori $v0, $v0, (0x10002 & 0xFFFF) /* 7925C 800DFDAC 16020003 */ bne $s0, $v0, .L800DFDBC /* 79260 800DFDB0 00000000 */ nop /* 79264 800DFDB4 3C100008 */ lui $s0, (0x8000E >> 16) /* 79268 800DFDB8 3610000E */ ori $s0, $s0, (0x8000E & 0xFFFF) .L800DFDBC: /* 7926C 800DFDBC 80820000 */ lb $v0, 0x0($a0) /* 79270 800DFDC0 1040000C */ beqz $v0, .L800DFDF4 /* 79274 800DFDC4 24020009 */ addiu $v0, $zero, 0x9 /* 79278 800DFDC8 80830003 */ lb $v1, 0x3($a0) /* 7927C 800DFDCC 1462000A */ bne $v1, $v0, .L800DFDF8 /* 79280 800DFDD0 3C020001 */ lui $v0, (0x10014 >> 16) /* 79284 800DFDD4 34420014 */ ori $v0, $v0, (0x10014 & 0xFFFF) /* 79288 800DFDD8 12020006 */ beq $s0, $v0, .L800DFDF4 /* 7928C 800DFDDC 3C020001 */ lui $v0, (0x10002 >> 16) /* 79290 800DFDE0 34420002 */ ori $v0, $v0, (0x10002 & 0xFFFF) /* 79294 800DFDE4 12020004 */ beq $s0, $v0, .L800DFDF8 /* 79298 800DFDE8 3C020001 */ lui $v0, (0x10032 >> 16) .L800DFDEC: /* 7929C 800DFDEC 08037FBB */ j .L800DFEEC /* 792A0 800DFDF0 2402FFFF */ addiu $v0, $zero, -0x1 .L800DFDF4: /* 792A4 800DFDF4 3C020001 */ lui $v0, (0x10032 >> 16) .L800DFDF8: /* 792A8 800DFDF8 34420032 */ ori $v0, $v0, (0x10032 & 0xFFFF) /* 792AC 800DFDFC 16020005 */ bne $s0, $v0, .L800DFE14 /* 792B0 800DFE00 3C020006 */ lui $v0, (0x6000C >> 16) /* 792B4 800DFE04 80830000 */ lb $v1, 0x0($a0) /* 792B8 800DFE08 24020001 */ addiu $v0, $zero, 0x1 /* 792BC 800DFE0C 1062FFF7 */ beq $v1, $v0, .L800DFDEC /* 792C0 800DFE10 3C020006 */ lui $v0, (0x6000C >> 16) .L800DFE14: /* 792C4 800DFE14 3442000C */ ori $v0, $v0, (0x6000C & 0xFFFF) /* 792C8 800DFE18 12020007 */ beq $s0, $v0, .L800DFE38 /* 792CC 800DFE1C 3C02000C */ lui $v0, (0xC0010 >> 16) /* 792D0 800DFE20 34420010 */ ori $v0, $v0, (0xC0010 & 0xFFFF) /* 792D4 800DFE24 12020004 */ beq $s0, $v0, .L800DFE38 /* 792D8 800DFE28 3C020001 */ lui $v0, (0x10002 >> 16) /* 792DC 800DFE2C 34420002 */ ori $v0, $v0, (0x10002 & 0xFFFF) /* 792E0 800DFE30 1602001A */ bne $s0, $v0, .L800DFE9C /* 792E4 800DFE34 00000000 */ nop .L800DFE38: /* 792E8 800DFE38 8CA30004 */ lw $v1, 0x4($a1) /* 792EC 800DFE3C 30621000 */ andi $v0, $v1, 0x1000 /* 792F0 800DFE40 14400007 */ bnez $v0, .L800DFE60 /* 792F4 800DFE44 30622000 */ andi $v0, $v1, 0x2000 /* 792F8 800DFE48 0C037F3D */ jal is_player_dismounted /* 792FC 800DFE4C 00000000 */ nop /* 79300 800DFE50 1440001E */ bnez $v0, .L800DFECC /* 79304 800DFE54 3C020008 */ lui $v0, (0x80003 >> 16) /* 79308 800DFE58 08037FBB */ j .L800DFEEC /* 7930C 800DFE5C 2402FFFF */ addiu $v0, $zero, -0x1 .L800DFE60: /* 79310 800DFE60 14400003 */ bnez $v0, .L800DFE70 /* 79314 800DFE64 3C10000C */ lui $s0, (0xC0010 >> 16) /* 79318 800DFE68 08037FB2 */ j .L800DFEC8 /* 7931C 800DFE6C 36100010 */ ori $s0, $s0, (0xC0010 & 0xFFFF) .L800DFE70: /* 79320 800DFE70 80A3000C */ lb $v1, 0xC($a1) /* 79324 800DFE74 00031040 */ sll $v0, $v1, 1 /* 79328 800DFE78 00431021 */ addu $v0, $v0, $v1 /* 7932C 800DFE7C 000210C0 */ sll $v0, $v0, 3 /* 79330 800DFE80 3C04800F */ lui $a0, %hi(BasicPeachDisguiseAnims + 0x14) /* 79334 800DFE84 00822021 */ addu $a0, $a0, $v0 /* 79338 800DFE88 8C847C30 */ lw $a0, %lo(BasicPeachDisguiseAnims + 0x14)($a0) /* 7933C 800DFE8C 0C0398DB */ jal peach_set_disguise_anim /* 79340 800DFE90 00000000 */ nop /* 79344 800DFE94 08037FBB */ j .L800DFEEC /* 79348 800DFE98 2402FFFF */ addiu $v0, $zero, -0x1 .L800DFE9C: /* 7934C 800DFE9C 8CA20004 */ lw $v0, 0x4($a1) /* 79350 800DFEA0 30421000 */ andi $v0, $v0, 0x1000 /* 79354 800DFEA4 10400009 */ beqz $v0, .L800DFECC /* 79358 800DFEA8 3C020008 */ lui $v0, (0x80003 >> 16) /* 7935C 800DFEAC 80A200C4 */ lb $v0, 0xC4($a1) /* 79360 800DFEB0 10400005 */ beqz $v0, .L800DFEC8 /* 79364 800DFEB4 3C02FFF4 */ lui $v0, (0xFFF40000 >> 16) /* 79368 800DFEB8 02021021 */ addu $v0, $s0, $v0 /* 7936C 800DFEBC 2C420003 */ sltiu $v0, $v0, 0x3 /* 79370 800DFEC0 54400001 */ bnel $v0, $zero, .L800DFEC8 /* 79374 800DFEC4 3C10000D */ lui $s0, (0xD0000 >> 16) .L800DFEC8: /* 79378 800DFEC8 3C020008 */ lui $v0, (0x80003 >> 16) .L800DFECC: /* 7937C 800DFECC 34420003 */ ori $v0, $v0, (0x80003 & 0xFFFF) /* 79380 800DFED0 16020006 */ bne $s0, $v0, .L800DFEEC /* 79384 800DFED4 0200102D */ daddu $v0, $s0, $zero /* 79388 800DFED8 0000202D */ daddu $a0, $zero, $zero /* 7938C 800DFEDC 0080282D */ daddu $a1, $a0, $zero /* 79390 800DFEE0 0C0B2D5B */ jal exec_ShakeCam1 /* 79394 800DFEE4 24060002 */ addiu $a2, $zero, 0x2 /* 79398 800DFEE8 0200102D */ daddu $v0, $s0, $zero .L800DFEEC: /* 7939C 800DFEEC 8FBF0014 */ lw $ra, 0x14($sp) /* 793A0 800DFEF0 8FB00010 */ lw $s0, 0x10($sp) /* 793A4 800DFEF4 03E00008 */ jr $ra /* 793A8 800DFEF8 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: s32 get_overriding_player_anim(s32 anim) { PlayerStatus* playerStatus = &gPlayerStatus; PartnerStatus* partnerStatus = &gPartnerStatus; if (playerStatus->actionState == ACTION_STATE_USE_SPINNING_FLOWER && anim != ANIM_Mario1_Flail && anim != ANIM_Mario1_Jump ) { return -1; } if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE) { if (partnerStatus->actingPartner == PARTNER_LAKILESTER && anim == ANIM_Mario1_Idle) { anim = ANIM_MarioW2_RideLaki; } if (partnerStatus->partnerActionState != PARTNER_ACTION_NONE && partnerStatus->actingPartner == PARTNER_BOW && anim != ANIM_Mario1_Crouch && anim != ANIM_Mario1_Idle ) { return -1; } } if (anim == ANIM_Mario1_ThumbsUp && partnerStatus->partnerActionState == PARTNER_ACTION_USE) { return -1; } if (anim == ANIM_MarioW1_Lift || anim == ANIM_Peach2_SpreadArms || anim == ANIM_Mario1_Idle) { if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) { if (!is_player_dismounted()) { return -1; } } else if (!(playerStatus->animFlags & PA_FLAG_INVISIBLE)) { anim = ANIM_Peach2_SpreadArms; } else { peach_set_disguise_anim(BasicPeachDisguiseAnims[playerStatus->peachDisguise].hold); return -1; } } else if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) { if ((playerStatus->peachItemHeld != 0) && (anim == ANIM_Peach2_RaiseArms || anim == ANIM_Peach2_Talk || anim == ANIM_Peach2_LowerArms)) { anim = ANIM_Peach3_PresentCompleteCake; } } if (anim == ANIM_MarioW2_Collapse) { exec_ShakeCam1(0, 0, 2); } return anim; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802431A0 /* 163A00 802431A0 27BDFFE0 */ addiu $sp, $sp, -0x20 D_802431A4: /* 163A04 802431A4 AFB00010 */ sw $s0, 0x10($sp) .L802431A8: /* 163A08 802431A8 2410002C */ addiu $s0, $zero, 0x2C .L802431AC: /* 163A0C 802431AC 2406FFFF */ addiu $a2, $zero, -0x1 glabel func_802431B0 /* 163A10 802431B0 0200282D */ daddu $a1, $s0, $zero glabel func_802431B4 /* 163A14 802431B4 3C028025 */ lui $v0, %hi(D_8024C098_C09918) glabel func_802431B8 /* 163A18 802431B8 8042C098 */ lb $v0, %lo(D_8024C098_C09918)($v0) glabel .L802431BC /* 163A1C 802431BC 3C038016 */ lui $v1, %hi(D_8015A2D0) .L802431C0: /* 163A20 802431C0 2463A2D0 */ addiu $v1, $v1, %lo(D_8015A2D0) D_802431C4: /* 163A24 802431C4 AFBF0018 */ sw $ra, 0x18($sp) D_802431C8: /* 163A28 802431C8 AFB10014 */ sw $s1, 0x14($sp) D_802431CC: /* 163A2C 802431CC 00021080 */ sll $v0, $v0, 2 D_802431D0: /* 163A30 802431D0 3C048025 */ lui $a0, %hi(D_80249B84) D_802431D4: /* 163A34 802431D4 00822021 */ addu $a0, $a0, $v0 /* 163A38 802431D8 8C849B84 */ lw $a0, %lo(D_80249B84)($a0) glabel func_802431DC /* 163A3C 802431DC 80620003 */ lb $v0, 0x3($v1) glabel func_802431E0 /* 163A40 802431E0 10460003 */ beq $v0, $a2, D_802431F0 D_802431E4: /* 163A44 802431E4 00000000 */ nop D_802431E8: /* 163A48 802431E8 54450006 */ bnel $v0, $a1, .L80243204 .L802431EC: /* 163A4C 802431EC 26100001 */ addiu $s0, $s0, 0x1 D_802431F0: /* 163A50 802431F0 90620000 */ lbu $v0, 0x0($v1) glabel func_802431F4 /* 163A54 802431F4 30420008 */ andi $v0, $v0, 0x8 glabel func_802431F8 /* 163A58 802431F8 14400006 */ bnez $v0, D_80243214 D_802431FC: /* 163A5C 802431FC 2A020040 */ slti $v0, $s0, 0x40 D_80243200: /* 163A60 80243200 26100001 */ addiu $s0, $s0, 0x1 .L80243204: /* 163A64 80243204 2A020040 */ slti $v0, $s0, 0x40 dgb_04_pad_3208: /* 163A68 80243208 1440FFF4 */ bnez $v0, func_802431DC glabel .L8024320C /* 163A6C 8024320C 24630020 */ addiu $v1, $v1, 0x20 D_80243210: /* 163A70 80243210 2A020040 */ slti $v0, $s0, 0x40 D_80243214: /* 163A74 80243214 1440000B */ bnez $v0, .L80243244 flo_10_pad_3218: /* 163A78 80243218 00000000 */ nop .L8024321C: /* 163A7C 8024321C 3C028007 */ lui $v0, %hi(gGameStatusPtr) glabel func_80243220 /* 163A80 80243220 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) glabel .L80243224 /* 163A84 80243224 8C430020 */ lw $v1, 0x20($v0) D_80243228: /* 163A88 80243228 8C420010 */ lw $v0, 0x10($v0) .L8024322C: /* 163A8C 8024322C 3C018025 */ lui $at, %hi(D_8024C08C) glabel func_80243230 /* 163A90 80243230 AC23C08C */ sw $v1, %lo(D_8024C08C)($at) .L80243234: /* 163A94 80243234 3C018025 */ lui $at, %hi(D_8024C084) glabel func_80243238 /* 163A98 80243238 AC22C084 */ sw $v0, %lo(D_8024C084)($at) /* 163A9C 8024323C 08090C95 */ j D_80243254 D_80243240: /* 163AA0 80243240 00000000 */ nop glabel .L80243244 /* 163AA4 80243244 3C018025 */ lui $at, %hi(D_8024C08C) D_80243248: /* 163AA8 80243248 AC20C08C */ sw $zero, %lo(D_8024C08C)($at) glabel func_8024324C /* 163AAC 8024324C 3C018025 */ lui $at, %hi(D_8024C084) D_80243250: /* 163AB0 80243250 AC20C084 */ sw $zero, %lo(D_8024C084)($at) D_80243254: /* 163AB4 80243254 3C058025 */ lui $a1, %hi(D_8024C084) D_80243258: /* 163AB8 80243258 24A5C084 */ addiu $a1, $a1, %lo(D_8024C084) .L8024325C: /* 163ABC 8024325C 8CA30000 */ lw $v1, 0x0($a1) glabel func_80243260 /* 163AC0 80243260 30624000 */ andi $v0, $v1, 0x4000 D_80243264: /* 163AC4 80243264 10400004 */ beqz $v0, .L80243278 .L80243268: /* 163AC8 80243268 3C02FFFF */ lui $v0, (0xFFFF7FFF >> 16) D_8024326C: /* 163ACC 8024326C 34427FFF */ ori $v0, $v0, (0xFFFF7FFF & 0xFFFF) glabel func_80243270 /* 163AD0 80243270 00621024 */ and $v0, $v1, $v0 .L80243274: /* 163AD4 80243274 ACA20000 */ sw $v0, 0x0($a1) .L80243278: /* 163AD8 80243278 3C058025 */ lui $a1, %hi(D_8024C08C) .L8024327C: /* 163ADC 8024327C 24A5C08C */ addiu $a1, $a1, %lo(D_8024C08C) D_80243280: /* 163AE0 80243280 8CA30000 */ lw $v1, 0x0($a1) D_80243284: /* 163AE4 80243284 30624000 */ andi $v0, $v1, 0x4000 D_80243288: /* 163AE8 80243288 10400004 */ beqz $v0, D_8024329C glabel func_8024328C /* 163AEC 8024328C 3C02FFFF */ lui $v0, (0xFFFF7FFF >> 16) glabel .L80243290 /* 163AF0 80243290 34427FFF */ ori $v0, $v0, (0xFFFF7FFF & 0xFFFF) glabel func_80243294 /* 163AF4 80243294 00621024 */ and $v0, $v1, $v0 glabel .L80243298 /* 163AF8 80243298 ACA20000 */ sw $v0, 0x0($a1) D_8024329C: /* 163AFC 8024329C 90820000 */ lbu $v0, 0x0($a0) .L802432A0: /* 163B00 802432A0 10400006 */ beqz $v0, .L802432BC glabel .L802432A4 /* 163B04 802432A4 00000000 */ nop glabel .L802432A8 /* 163B08 802432A8 8C820010 */ lw $v0, 0x10($a0) glabel func_802432AC /* 163B0C 802432AC 10400003 */ beqz $v0, .L802432BC glabel func_802432B0 /* 163B10 802432B0 00000000 */ nop glabel .L802432B4 /* 163B14 802432B4 0040F809 */ jalr $v0 /* 163B18 802432B8 00000000 */ nop .L802432BC: /* 163B1C 802432BC 3C118025 */ lui $s1, %hi(D_80249B84) glabel func_802432C0 /* 163B20 802432C0 26319B84 */ addiu $s1, $s1, %lo(D_80249B84) D_802432C4: /* 163B24 802432C4 0000802D */ daddu $s0, $zero, $zero glabel .L802432C8 /* 163B28 802432C8 8E240000 */ lw $a0, 0x0($s1) glabel .L802432CC /* 163B2C 802432CC 90820000 */ lbu $v0, 0x0($a0) D_802432D0: /* 163B30 802432D0 10400006 */ beqz $v0, .L802432EC D_802432D4: /* 163B34 802432D4 26100001 */ addiu $s0, $s0, 0x1 glabel .L802432D8 /* 163B38 802432D8 8C820014 */ lw $v0, 0x14($a0) glabel .L802432DC /* 163B3C 802432DC 10400003 */ beqz $v0, .L802432EC D_802432E0: /* 163B40 802432E0 00000000 */ nop /* 163B44 802432E4 0040F809 */ jalr $v0 D_802432E8: /* 163B48 802432E8 00000000 */ nop .L802432EC: /* 163B4C 802432EC 2A020004 */ slti $v0, $s0, 0x4 D_802432F0: /* 163B50 802432F0 1440FFF5 */ bnez $v0, .L802432C8 glabel .L802432F4 /* 163B54 802432F4 26310004 */ addiu $s1, $s1, 0x4 glabel .L802432F8 /* 163B58 802432F8 8FBF0018 */ lw $ra, 0x18($sp) glabel func_802432FC /* 163B5C 802432FC 8FB10014 */ lw $s1, 0x14($sp) D_80243300: /* 163B60 80243300 8FB00010 */ lw $s0, 0x10($sp) /* 163B64 80243304 03E00008 */ jr $ra .L80243308: /* 163B68 80243308 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void filemenu_update_cursor(void) { s32 targetPosX = filemenu_cursor_targetX; s32 targetPosY = filemenu_cursor_targetY; s32 xDelta; s32 yDelta; s32 i; xDelta = (targetPosX - filemenu_cursor_posX) * 0.5; yDelta = (targetPosY - filemenu_cursor_posY) * 0.5; if ((targetPosX != filemenu_cursor_posX) || (targetPosY != filemenu_cursor_posY)) { if ((xDelta == 0) && (yDelta == 0)) { filemenu_cursor_posX = targetPosX; filemenu_cursor_posY = targetPosY; } } filemenu_cursor_posX += xDelta; filemenu_cursor_posY += yDelta; if (filemenu_cursorGoalAlpha == 0) { filemenu_cursor_alpha -= 128; if (filemenu_cursor_alpha < 0) { filemenu_cursor_alpha = 0; } } else { filemenu_cursor_alpha += 32; if (filemenu_cursor_alpha > 255) { filemenu_cursor_alpha = 255; } } for (i = WINDOW_ID_FILEMENU_MAIN; i < ARRAY_COUNT(gWindows); i++) { Window* window = &gWindows[i]; s8 parent = window->parent; if ((parent == -1 || parent == WINDOW_ID_FILEMENU_MAIN) && (window->flags & WINDOW_FLAG_INITIAL_ANIMATION)) { break; } } if (D_80249BB8 == 0) { if (filemenu_cursorGoalAlpha == 0) { D_80249BB8 = 1; } } if (i >= ARRAY_COUNT(gWindows)) { if (filemenu_cursorGoalAlpha2 == 255) { if (D_80249BB8 != 0) { D_80249BB8--; if (D_80249BB8 == 0) { filemenu_cursor_posX = filemenu_cursor_targetX; filemenu_cursor_posY = filemenu_cursor_targetY; } } } if (D_80249BB8 == 0) { filemenu_cursorGoalAlpha = filemenu_cursorGoalAlpha2; } } else if (filemenu_cursorGoalAlpha == 0) { D_80249BB8 = 1; } filemenu_cursorGoalAlpha2 = 255; }
### RAW ASSEMBLY INSTRUCTIONS: glabel contRmbControl /* 3AD20 8005F920 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 3AD24 8005F924 AFB20018 */ sw $s2, 0x18($sp) /* 3AD28 8005F928 0080902D */ daddu $s2, $a0, $zero /* 3AD2C 8005F92C 00A0302D */ daddu $a2, $a1, $zero /* 3AD30 8005F930 AFB00010 */ sw $s0, 0x10($sp) /* 3AD34 8005F934 AFBF0020 */ sw $ra, 0x20($sp) /* 3AD38 8005F938 AFB3001C */ sw $s3, 0x1C($sp) /* 3AD3C 8005F93C AFB10014 */ sw $s1, 0x14($sp) /* 3AD40 8005F940 92430006 */ lbu $v1, 0x6($s2) /* 3AD44 8005F944 24130002 */ addiu $s3, $zero, 0x2 /* 3AD48 8005F948 10730069 */ beq $v1, $s3, .L8005FAF0 /* 3AD4C 8005F94C 0000802D */ daddu $s0, $zero, $zero /* 3AD50 8005F950 28620003 */ slti $v0, $v1, 0x3 /* 3AD54 8005F954 10400005 */ beqz $v0, .L8005F96C /* 3AD58 8005F958 24020001 */ addiu $v0, $zero, 0x1 /* 3AD5C 8005F95C 1062000A */ beq $v1, $v0, .L8005F988 /* 3AD60 8005F960 0200102D */ daddu $v0, $s0, $zero /* 3AD64 8005F964 08017EBD */ j .L8005FAF4 /* 3AD68 8005F968 00000000 */ nop .L8005F96C: /* 3AD6C 8005F96C 24020003 */ addiu $v0, $zero, 0x3 /* 3AD70 8005F970 10620018 */ beq $v1, $v0, .L8005F9D4 /* 3AD74 8005F974 24020004 */ addiu $v0, $zero, 0x4 /* 3AD78 8005F978 10620048 */ beq $v1, $v0, .L8005FA9C /* 3AD7C 8005F97C 0200102D */ daddu $v0, $s0, $zero /* 3AD80 8005F980 08017EBD */ j .L8005FAF4 /* 3AD84 8005F984 00000000 */ nop .L8005F988: /* 3AD88 8005F988 96420004 */ lhu $v0, 0x4($s2) /* 3AD8C 8005F98C 1040000C */ beqz $v0, .L8005F9C0 /* 3AD90 8005F990 00062040 */ sll $a0, $a2, 1 /* 3AD94 8005F994 00862021 */ addu $a0, $a0, $a2 /* 3AD98 8005F998 00042080 */ sll $a0, $a0, 2 /* 3AD9C 8005F99C 00862021 */ addu $a0, $a0, $a2 /* 3ADA0 8005F9A0 000420C0 */ sll $a0, $a0, 3 /* 3ADA4 8005F9A4 3C02800E */ lui $v0, %hi(nuContPfs) /* 3ADA8 8005F9A8 2442AAD8 */ addiu $v0, $v0, %lo(nuContPfs) /* 3ADAC 8005F9AC 00822021 */ addu $a0, $a0, $v0 /* 3ADB0 8005F9B0 0C019F80 */ jal __osMotorAccess /* 3ADB4 8005F9B4 0000282D */ daddu $a1, $zero, $zero /* 3ADB8 8005F9B8 08017E71 */ j .L8005F9C4 /* 3ADBC 8005F9BC 0040802D */ daddu $s0, $v0, $zero .L8005F9C0: /* 3ADC0 8005F9C0 A2530006 */ sb $s3, 0x6($s2) .L8005F9C4: /* 3ADC4 8005F9C4 96420004 */ lhu $v0, 0x4($s2) /* 3ADC8 8005F9C8 2442FFFF */ addiu $v0, $v0, -0x1 /* 3ADCC 8005F9CC 08017EBC */ j .L8005FAF0 /* 3ADD0 8005F9D0 A6420004 */ sh $v0, 0x4($s2) .L8005F9D4: /* 3ADD4 8005F9D4 96420002 */ lhu $v0, 0x2($s2) /* 3ADD8 8005F9D8 1040001F */ beqz $v0, .L8005FA58 /* 3ADDC 8005F9DC 00062040 */ sll $a0, $a2, 1 /* 3ADE0 8005F9E0 96420004 */ lhu $v0, 0x4($s2) /* 3ADE4 8005F9E4 96430000 */ lhu $v1, 0x0($s2) /* 3ADE8 8005F9E8 00431021 */ addu $v0, $v0, $v1 /* 3ADEC 8005F9EC 304300FF */ andi $v1, $v0, 0xFF /* 3ADF0 8005F9F0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3ADF4 8005F9F4 00021202 */ srl $v0, $v0, 8 /* 3ADF8 8005F9F8 1040000B */ beqz $v0, .L8005FA28 /* 3ADFC 8005F9FC A6430004 */ sh $v1, 0x4($s2) /* 3AE00 8005FA00 00062040 */ sll $a0, $a2, 1 /* 3AE04 8005FA04 00862021 */ addu $a0, $a0, $a2 /* 3AE08 8005FA08 00042080 */ sll $a0, $a0, 2 /* 3AE0C 8005FA0C 00862021 */ addu $a0, $a0, $a2 /* 3AE10 8005FA10 000420C0 */ sll $a0, $a0, 3 /* 3AE14 8005FA14 3C02800E */ lui $v0, %hi(nuContPfs) /* 3AE18 8005FA18 2442AAD8 */ addiu $v0, $v0, %lo(nuContPfs) /* 3AE1C 8005FA1C 00822021 */ addu $a0, $a0, $v0 /* 3AE20 8005FA20 08017E92 */ j .L8005FA48 /* 3AE24 8005FA24 24050001 */ addiu $a1, $zero, 0x1 .L8005FA28: /* 3AE28 8005FA28 00862021 */ addu $a0, $a0, $a2 /* 3AE2C 8005FA2C 00042080 */ sll $a0, $a0, 2 /* 3AE30 8005FA30 00862021 */ addu $a0, $a0, $a2 /* 3AE34 8005FA34 000420C0 */ sll $a0, $a0, 3 /* 3AE38 8005FA38 3C02800E */ lui $v0, %hi(nuContPfs) /* 3AE3C 8005FA3C 2442AAD8 */ addiu $v0, $v0, %lo(nuContPfs) /* 3AE40 8005FA40 00822021 */ addu $a0, $a0, $v0 /* 3AE44 8005FA44 0000282D */ daddu $a1, $zero, $zero .L8005FA48: /* 3AE48 8005FA48 0C019F80 */ jal __osMotorAccess /* 3AE4C 8005FA4C 00000000 */ nop /* 3AE50 8005FA50 08017EA3 */ j .L8005FA8C /* 3AE54 8005FA54 0040802D */ daddu $s0, $v0, $zero .L8005FA58: /* 3AE58 8005FA58 00862021 */ addu $a0, $a0, $a2 /* 3AE5C 8005FA5C 00042080 */ sll $a0, $a0, 2 /* 3AE60 8005FA60 00862021 */ addu $a0, $a0, $a2 /* 3AE64 8005FA64 000420C0 */ sll $a0, $a0, 3 /* 3AE68 8005FA68 3C02800E */ lui $v0, %hi(nuContPfs) /* 3AE6C 8005FA6C 2442AAD8 */ addiu $v0, $v0, %lo(nuContPfs) /* 3AE70 8005FA70 00822021 */ addu $a0, $a0, $v0 /* 3AE74 8005FA74 0C019F80 */ jal __osMotorAccess /* 3AE78 8005FA78 0000282D */ daddu $a1, $zero, $zero /* 3AE7C 8005FA7C 0040802D */ daddu $s0, $v0, $zero /* 3AE80 8005FA80 24020001 */ addiu $v0, $zero, 0x1 /* 3AE84 8005FA84 A2420006 */ sb $v0, 0x6($s2) /* 3AE88 8005FA88 A6530004 */ sh $s3, 0x4($s2) .L8005FA8C: /* 3AE8C 8005FA8C 96420002 */ lhu $v0, 0x2($s2) /* 3AE90 8005FA90 2442FFFF */ addiu $v0, $v0, -0x1 /* 3AE94 8005FA94 08017EBC */ j .L8005FAF0 /* 3AE98 8005FA98 A6420002 */ sh $v0, 0x2($s2) .L8005FA9C: /* 3AE9C 8005FA9C 3C04800E */ lui $a0, %hi(nuSiMesgQ) /* 3AEA0 8005FAA0 2484AC78 */ addiu $a0, $a0, %lo(nuSiMesgQ) /* 3AEA4 8005FAA4 00061040 */ sll $v0, $a2, 1 /* 3AEA8 8005FAA8 00461021 */ addu $v0, $v0, $a2 /* 3AEAC 8005FAAC 00021080 */ sll $v0, $v0, 2 /* 3AEB0 8005FAB0 00461021 */ addu $v0, $v0, $a2 /* 3AEB4 8005FAB4 000210C0 */ sll $v0, $v0, 3 /* 3AEB8 8005FAB8 3C03800E */ lui $v1, %hi(nuContPfs) /* 3AEBC 8005FABC 2463AAD8 */ addiu $v1, $v1, %lo(nuContPfs) /* 3AEC0 8005FAC0 00438821 */ addu $s1, $v0, $v1 /* 3AEC4 8005FAC4 0C019FD1 */ jal osMotorInit /* 3AEC8 8005FAC8 0220282D */ daddu $a1, $s1, $zero /* 3AECC 8005FACC 0040802D */ daddu $s0, $v0, $zero /* 3AED0 8005FAD0 16000005 */ bnez $s0, .L8005FAE8 /* 3AED4 8005FAD4 24020001 */ addiu $v0, $zero, 0x1 /* 3AED8 8005FAD8 0220202D */ daddu $a0, $s1, $zero /* 3AEDC 8005FADC 0C019F80 */ jal __osMotorAccess /* 3AEE0 8005FAE0 0000282D */ daddu $a1, $zero, $zero /* 3AEE4 8005FAE4 24020001 */ addiu $v0, $zero, 0x1 .L8005FAE8: /* 3AEE8 8005FAE8 A2420006 */ sb $v0, 0x6($s2) /* 3AEEC 8005FAEC A6530004 */ sh $s3, 0x4($s2) .L8005FAF0: /* 3AEF0 8005FAF0 0200102D */ daddu $v0, $s0, $zero .L8005FAF4: /* 3AEF4 8005FAF4 8FBF0020 */ lw $ra, 0x20($sp) /* 3AEF8 8005FAF8 8FB3001C */ lw $s3, 0x1C($sp) /* 3AEFC 8005FAFC 8FB20018 */ lw $s2, 0x18($sp) /* 3AF00 8005FB00 8FB10014 */ lw $s1, 0x14($sp) /* 3AF04 8005FB04 8FB00010 */ lw $s0, 0x10($sp) /* 3AF08 8005FB08 03E00008 */ jr $ra /* 3AF0C 8005FB0C 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 contRmbControl(NUContRmbCtl* rmbCtl, u32 contNo) { s32 ret = 0; u32 cnt; switch (rmbCtl->state) { case NU_CONT_RMB_STATE_STOPPED: break; case NU_CONT_RMB_STATE_STOPPING: if (rmbCtl->counter != 0) { ret = osMotorStop(&nuContPfs[contNo]); } else { rmbCtl->state = NU_CONT_RMB_STATE_STOPPED; } rmbCtl->counter--; break; case NU_CONT_RMB_STATE_RUN: if (rmbCtl->frame > 0) { rmbCtl->counter += rmbCtl->freq; cnt = rmbCtl->counter >> 8; rmbCtl->counter &= 0xFF; if (cnt > 0) { ret = osMotorStart(&nuContPfs[contNo]); } else { ret = osMotorStop(&nuContPfs[contNo]); } } else { ret = osMotorStop(&nuContPfs[contNo]); rmbCtl->state = NU_CONT_RMB_STATE_STOPPING; rmbCtl->counter = 2; } rmbCtl->frame--; break; case NU_CONT_RMB_STATE_FORCESTOP: ret = osMotorInit(&nuSiMesgQ, &nuContPfs[contNo], contNo); if (ret == 0) { osMotorStop(&nuContPfs[contNo]); } rmbCtl->state = NU_CONT_RMB_STATE_STOPPING; rmbCtl->counter = 2; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel show_action_rating /* 1950D0 802667F0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 1950D4 802667F4 44860000 */ mtc1 $a2, $f0 /* 1950D8 802667F8 44871000 */ mtc1 $a3, $f2 /* 1950DC 802667FC AFB00018 */ sw $s0, 0x18($sp) /* 1950E0 80266800 00A0802D */ daddu $s0, $a1, $zero /* 1950E4 80266804 AFBF001C */ sw $ra, 0x1C($sp) /* 1950E8 80266808 8E020200 */ lw $v0, 0x200($s0) /* 1950EC 8026680C C7A40030 */ lwc1 $f4, 0x30($sp) /* 1950F0 80266810 3C05800E */ lui $a1, %hi(gBattleStatus + 0xD8) /* 1950F4 80266814 8CA5C148 */ lw $a1, %lo(gBattleStatus + 0xD8)($a1) /* 1950F8 80266818 1440001A */ bnez $v0, .L80266884 /* 1950FC 8026681C 0080182D */ daddu $v1, $a0, $zero /* 195100 80266820 2C620006 */ sltiu $v0, $v1, 0x6 /* 195104 80266824 1040003E */ beqz $v0, .L80266920 /* 195108 80266828 0000202D */ daddu $a0, $zero, $zero /* 19510C 8026682C 00031080 */ sll $v0, $v1, 2 /* 195110 80266830 3C01802A */ lui $at, %hi(jtbl_8029D640) /* 195114 80266834 00220821 */ addu $at, $at, $v0 /* 195118 80266838 8C22D640 */ lw $v0, %lo(jtbl_8029D640)($at) /* 19511C 8026683C 00400008 */ jr $v0 /* 195120 80266840 00000000 */ nop glabel .L80266844 /* 195124 80266844 0000202D */ daddu $a0, $zero, $zero /* 195128 80266848 24020001 */ addiu $v0, $zero, 0x1 /* 19512C 8026684C 08099A48 */ j .L80266920 /* 195130 80266850 A2020204 */ sb $v0, 0x204($s0) glabel .L80266854 /* 195134 80266854 24040004 */ addiu $a0, $zero, 0x4 /* 195138 80266858 08099A48 */ j .L80266920 /* 19513C 8026685C A2000204 */ sb $zero, 0x204($s0) glabel .L80266860 /* 195140 80266860 24040003 */ addiu $a0, $zero, 0x3 /* 195144 80266864 08099A48 */ j .L80266920 /* 195148 80266868 A2000204 */ sb $zero, 0x204($s0) glabel .L8026686C /* 19514C 8026686C 24040002 */ addiu $a0, $zero, 0x2 /* 195150 80266870 08099A48 */ j .L80266920 /* 195154 80266874 A2040204 */ sb $a0, 0x204($s0) glabel .L80266878 /* 195158 80266878 0000202D */ daddu $a0, $zero, $zero /* 19515C 8026687C 08099A48 */ j .L80266920 /* 195160 80266880 A2000204 */ sb $zero, 0x204($s0) .L80266884: /* 195164 80266884 8C42000C */ lw $v0, 0xC($v0) /* 195168 80266888 AC400018 */ sw $zero, 0x18($v0) /* 19516C 8026688C 2C620006 */ sltiu $v0, $v1, 0x6 /* 195170 80266890 82040204 */ lb $a0, 0x204($s0) /* 195174 80266894 10400022 */ beqz $v0, .L80266920 /* 195178 80266898 00031080 */ sll $v0, $v1, 2 /* 19517C 8026689C 3C01802A */ lui $at, %hi(jtbl_8029D658) /* 195180 802668A0 00220821 */ addu $at, $at, $v0 /* 195184 802668A4 8C22D658 */ lw $v0, %lo(jtbl_8029D658)($at) /* 195188 802668A8 00400008 */ jr $v0 /* 19518C 802668AC 00000000 */ nop glabel .L802668B0 /* 195190 802668B0 92020204 */ lbu $v0, 0x204($s0) /* 195194 802668B4 24420001 */ addiu $v0, $v0, 0x1 /* 195198 802668B8 A2020204 */ sb $v0, 0x204($s0) /* 19519C 802668BC 00021600 */ sll $v0, $v0, 24 /* 1951A0 802668C0 00021603 */ sra $v0, $v0, 24 /* 1951A4 802668C4 28420003 */ slti $v0, $v0, 0x3 /* 1951A8 802668C8 14400015 */ bnez $v0, .L80266920 /* 1951AC 802668CC 24020002 */ addiu $v0, $zero, 0x2 /* 1951B0 802668D0 08099A48 */ j .L80266920 /* 1951B4 802668D4 A2020204 */ sb $v0, 0x204($s0) glabel .L802668D8 /* 1951B8 802668D8 08099A48 */ j .L80266920 /* 1951BC 802668DC 24040004 */ addiu $a0, $zero, 0x4 glabel .L802668E0 /* 1951C0 802668E0 08099A48 */ j .L80266920 /* 1951C4 802668E4 24040003 */ addiu $a0, $zero, 0x3 glabel .L802668E8 /* 1951C8 802668E8 08099A48 */ j .L80266920 /* 1951CC 802668EC 24040002 */ addiu $a0, $zero, 0x2 glabel .L802668F0 /* 1951D0 802668F0 08099A48 */ j .L80266920 /* 1951D4 802668F4 0000202D */ daddu $a0, $zero, $zero glabel .L802668F8 /* 1951D8 802668F8 90A20204 */ lbu $v0, 0x204($a1) /* 1951DC 802668FC 80A40204 */ lb $a0, 0x204($a1) /* 1951E0 80266900 24420001 */ addiu $v0, $v0, 0x1 /* 1951E4 80266904 A0A20204 */ sb $v0, 0x204($a1) /* 1951E8 80266908 00021600 */ sll $v0, $v0, 24 /* 1951EC 8026690C 00021603 */ sra $v0, $v0, 24 /* 1951F0 80266910 28420003 */ slti $v0, $v0, 0x3 /* 1951F4 80266914 14400002 */ bnez $v0, .L80266920 /* 1951F8 80266918 24020002 */ addiu $v0, $zero, 0x2 /* 1951FC 8026691C A0A20204 */ sb $v0, 0x204($a1) .L80266920: /* 195200 80266920 44050000 */ mfc1 $a1, $f0 /* 195204 80266924 3C014120 */ lui $at, (0x41200000 >> 16) /* 195208 80266928 44810000 */ mtc1 $at, $f0 /* 19520C 8026692C 00000000 */ nop /* 195210 80266930 46002101 */ sub.s $f4, $f4, $f0 /* 195214 80266934 44061000 */ mfc1 $a2, $f2 /* 195218 80266938 3C014140 */ lui $at, (0x41400000 >> 16) /* 19521C 8026693C 44810000 */ mtc1 $at, $f0 /* 195220 80266940 44072000 */ mfc1 $a3, $f4 /* 195224 80266944 2402005A */ addiu $v0, $zero, 0x5A /* 195228 80266948 AFA20014 */ sw $v0, 0x14($sp) /* 19522C 8026694C 0C01C4E4 */ jal fx_attack_result_text /* 195230 80266950 E7A00010 */ swc1 $f0, 0x10($sp) /* 195234 80266954 AE020200 */ sw $v0, 0x200($s0) /* 195238 80266958 24020050 */ addiu $v0, $zero, 0x50 /* 19523C 8026695C A2020205 */ sb $v0, 0x205($s0) /* 195240 80266960 8FBF001C */ lw $ra, 0x1C($sp) /* 195244 80266964 8FB00018 */ lw $s0, 0x18($sp) /* 195248 80266968 03E00008 */ jr $ra /* 19524C 8026696C 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void show_action_rating(s32 rating, Actor* actor, f32 x, f32 y, f32 z) { BattleStatus* battleStatus = &gBattleStatus; Actor* player; s32 new_var; // TODO required to match s32 type; actor->attackResultEffect = actor->attackResultEffect; // TODO required to match player = battleStatus->playerActor; if (actor->attackResultEffect == NULL) { type = 0; switch (rating) { case ACTION_RATING_NICE: type = 0; actor->actionRatingCombo = 1; break; case ACTION_RATING_MISS: type = 4; actor->actionRatingCombo = 0; break; case ACTION_RATING_LUCKY: type = 3; actor->actionRatingCombo = 0; break; case ACTION_RATING_SUPER: type = 2; actor->actionRatingCombo = 2; break; case ACTION_RATING_NICE_NO_COMBO: type = 0; actor->actionRatingCombo = 0; break; case ACTION_RATING_NICE_SUPER_COMBO: type = player->actionRatingCombo; player->actionRatingCombo++; if (player->actionRatingCombo > 2) { player->actionRatingCombo = 2; } break; } actor->attackResultEffect = fx_attack_result_text(type, x, y, z - 10.0f, 12.0f, 90); actor->actionRatingTime = 80; new_var = 2; // TODO required to match } else { actor->attackResultEffect->data.attackResultText->timeLeft = 0; type = actor->actionRatingCombo; new_var = rating; // TODO required to match switch (new_var) { // TODO required to match case ACTION_RATING_NICE: actor->actionRatingCombo++; if (actor->actionRatingCombo > 2) { actor->actionRatingCombo = 2; } break; case ACTION_RATING_MISS: type = 4; break; case ACTION_RATING_LUCKY: type = 3; break; case ACTION_RATING_SUPER: type = 2; break; case ACTION_RATING_NICE_NO_COMBO: type = 0; break; case ACTION_RATING_NICE_SUPER_COMBO: type = player->actionRatingCombo; player->actionRatingCombo++; if (player->actionRatingCombo > 2) { player->actionRatingCombo = 2; } break; } actor->attackResultEffect = fx_attack_result_text(type, x, y, z - 10.0f, 12.0f, 90); actor->actionRatingTime = 80; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ResetCam /* F1278 802CC8C8 27BDFF78 */ addiu $sp, $sp, -0x88 /* F127C 802CC8CC AFB1005C */ sw $s1, 0x5C($sp) /* F1280 802CC8D0 0080882D */ daddu $s1, $a0, $zero /* F1284 802CC8D4 AFB20060 */ sw $s2, 0x60($sp) /* F1288 802CC8D8 00A0902D */ daddu $s2, $a1, $zero /* F128C 802CC8DC AFBF0064 */ sw $ra, 0x64($sp) /* F1290 802CC8E0 AFB00058 */ sw $s0, 0x58($sp) /* F1294 802CC8E4 F7BA0080 */ sdc1 $f26, 0x80($sp) /* F1298 802CC8E8 F7B80078 */ sdc1 $f24, 0x78($sp) /* F129C 802CC8EC F7B60070 */ sdc1 $f22, 0x70($sp) /* F12A0 802CC8F0 F7B40068 */ sdc1 $f20, 0x68($sp) /* F12A4 802CC8F4 8E30000C */ lw $s0, 0xC($s1) /* F12A8 802CC8F8 8E050000 */ lw $a1, 0x0($s0) /* F12AC 802CC8FC 0C0B1EAF */ jal evt_get_variable /* F12B0 802CC900 26100004 */ addiu $s0, $s0, 0x4 /* F12B4 802CC904 0220202D */ daddu $a0, $s1, $zero /* F12B8 802CC908 3C06800B */ lui $a2, %hi(gCameras) /* F12BC 802CC90C 24C61D80 */ addiu $a2, $a2, %lo(gCameras) /* F12C0 802CC910 00021880 */ sll $v1, $v0, 2 /* F12C4 802CC914 00621821 */ addu $v1, $v1, $v0 /* F12C8 802CC918 00031880 */ sll $v1, $v1, 2 /* F12CC 802CC91C 00621823 */ subu $v1, $v1, $v0 /* F12D0 802CC920 000310C0 */ sll $v0, $v1, 3 /* F12D4 802CC924 00621821 */ addu $v1, $v1, $v0 /* F12D8 802CC928 000318C0 */ sll $v1, $v1, 3 /* F12DC 802CC92C 8E050000 */ lw $a1, 0x0($s0) /* F12E0 802CC930 0C0B210B */ jal evt_get_float_variable /* F12E4 802CC934 00668021 */ addu $s0, $v1, $a2 /* F12E8 802CC938 3C038011 */ lui $v1, %hi(gPlayerStatus) /* F12EC 802CC93C 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) /* F12F0 802CC940 12400047 */ beqz $s2, .L802CCA60 /* F12F4 802CC944 46000686 */ mov.s $f26, $f0 /* F12F8 802CC948 3C0146FF */ lui $at, (0x46FFFE00 >> 16) /* F12FC 802CC94C 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF) /* F1300 802CC950 44811000 */ mtc1 $at, $f2 /* F1304 802CC954 44802000 */ mtc1 $zero, $f4 /* F1308 802CC958 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* F130C 802CC95C 44810000 */ mtc1 $at, $f0 /* F1310 802CC960 3C014120 */ lui $at, (0x41200000 >> 16) /* F1314 802CC964 44817000 */ mtc1 $at, $f14 /* F1318 802CC968 27A20038 */ addiu $v0, $sp, 0x38 /* F131C 802CC96C E7A20044 */ swc1 $f2, 0x44($sp) /* F1320 802CC970 AFA20018 */ sw $v0, 0x18($sp) /* F1324 802CC974 27A2003C */ addiu $v0, $sp, 0x3C /* F1328 802CC978 AFA2001C */ sw $v0, 0x1C($sp) /* F132C 802CC97C 27A20040 */ addiu $v0, $sp, 0x40 /* F1330 802CC980 AFA20020 */ sw $v0, 0x20($sp) /* F1334 802CC984 27A20044 */ addiu $v0, $sp, 0x44 /* F1338 802CC988 AFA20024 */ sw $v0, 0x24($sp) /* F133C 802CC98C 27A20048 */ addiu $v0, $sp, 0x48 /* F1340 802CC990 AFA20028 */ sw $v0, 0x28($sp) /* F1344 802CC994 27A2004C */ addiu $v0, $sp, 0x4C /* F1348 802CC998 E7A00010 */ swc1 $f0, 0x10($sp) /* F134C 802CC99C E7A40014 */ swc1 $f4, 0x14($sp) /* F1350 802CC9A0 AFA2002C */ sw $v0, 0x2C($sp) /* F1354 802CC9A4 C478002C */ lwc1 $f24, 0x2C($v1) /* F1358 802CC9A8 27A20050 */ addiu $v0, $sp, 0x50 /* F135C 802CC9AC AFA20030 */ sw $v0, 0x30($sp) /* F1360 802CC9B0 C4760030 */ lwc1 $f22, 0x30($v1) /* F1364 802CC9B4 C4740028 */ lwc1 $f20, 0x28($v1) /* F1368 802CC9B8 44072000 */ mfc1 $a3, $f4 /* F136C 802CC9BC 460EC380 */ add.s $f14, $f24, $f14 /* F1370 802CC9C0 4406B000 */ mfc1 $a2, $f22 /* F1374 802CC9C4 0C017449 */ jal test_ray_zones /* F1378 802CC9C8 4600A306 */ mov.s $f12, $f20 /* F137C 802CC9CC 0040182D */ daddu $v1, $v0, $zero /* F1380 802CC9D0 0460001A */ bltz $v1, .L802CCA3C /* F1384 802CC9D4 000310C0 */ sll $v0, $v1, 3 /* F1388 802CC9D8 00431023 */ subu $v0, $v0, $v1 /* F138C 802CC9DC 3C03800E */ lui $v1, %hi(D_800D91D4) /* F1390 802CC9E0 8C6391D4 */ lw $v1, %lo(D_800D91D4)($v1) /* F1394 802CC9E4 00021080 */ sll $v0, $v0, 2 /* F1398 802CC9E8 00431021 */ addu $v0, $v0, $v1 /* F139C 802CC9EC 8C420010 */ lw $v0, 0x10($v0) /* F13A0 802CC9F0 260304D8 */ addiu $v1, $s0, 0x4D8 /* F13A4 802CC9F4 24440020 */ addiu $a0, $v0, 0x20 .L802CC9F8: /* F13A8 802CC9F8 8C480000 */ lw $t0, 0x0($v0) /* F13AC 802CC9FC 8C490004 */ lw $t1, 0x4($v0) /* F13B0 802CCA00 8C4A0008 */ lw $t2, 0x8($v0) /* F13B4 802CCA04 8C4B000C */ lw $t3, 0xC($v0) /* F13B8 802CCA08 AC680000 */ sw $t0, 0x0($v1) /* F13BC 802CCA0C AC690004 */ sw $t1, 0x4($v1) /* F13C0 802CCA10 AC6A0008 */ sw $t2, 0x8($v1) /* F13C4 802CCA14 AC6B000C */ sw $t3, 0xC($v1) /* F13C8 802CCA18 24420010 */ addiu $v0, $v0, 0x10 /* F13CC 802CCA1C 1444FFF6 */ bne $v0, $a0, .L802CC9F8 /* F13D0 802CCA20 24630010 */ addiu $v1, $v1, 0x10 /* F13D4 802CCA24 8C480000 */ lw $t0, 0x0($v0) /* F13D8 802CCA28 8C490004 */ lw $t1, 0x4($v0) /* F13DC 802CCA2C 8C4A0008 */ lw $t2, 0x8($v0) /* F13E0 802CCA30 AC680000 */ sw $t0, 0x0($v1) /* F13E4 802CCA34 AC690004 */ sw $t1, 0x4($v1) /* F13E8 802CCA38 AC6A0008 */ sw $t2, 0x8($v1) .L802CCA3C: /* F13EC 802CCA3C 0000102D */ daddu $v0, $zero, $zero /* F13F0 802CCA40 24030001 */ addiu $v1, $zero, 0x1 /* F13F4 802CCA44 E61404B0 */ swc1 $f20, 0x4B0($s0) /* F13F8 802CCA48 E61804B4 */ swc1 $f24, 0x4B4($s0) /* F13FC 802CCA4C E61604B8 */ swc1 $f22, 0x4B8($s0) /* F1400 802CCA50 E61A0490 */ swc1 $f26, 0x490($s0) /* F1404 802CCA54 A6030506 */ sh $v1, 0x506($s0) /* F1408 802CCA58 080B32A5 */ j .L802CCA94 /* F140C 802CCA5C A6030504 */ sh $v1, 0x504($s0) .L802CCA60: /* F1410 802CCA60 C6000484 */ lwc1 $f0, 0x484($s0) /* F1414 802CCA64 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F1418 802CCA68 44811000 */ mtc1 $at, $f2 /* F141C 802CCA6C 00000000 */ nop /* F1420 802CCA70 4600103E */ c.le.s $f2, $f0 /* F1424 802CCA74 00000000 */ nop /* F1428 802CCA78 45000007 */ bc1f .L802CCA98 /* F142C 802CCA7C 0000102D */ daddu $v0, $zero, $zero /* F1430 802CCA80 24020002 */ addiu $v0, $zero, 0x2 /* F1434 802CCA84 24030001 */ addiu $v1, $zero, 0x1 /* F1438 802CCA88 A6030506 */ sh $v1, 0x506($s0) /* F143C 802CCA8C A6000504 */ sh $zero, 0x504($s0) /* F1440 802CCA90 E6020490 */ swc1 $f2, 0x490($s0) .L802CCA94: /* F1444 802CCA94 AE000508 */ sw $zero, 0x508($s0) .L802CCA98: /* F1448 802CCA98 8FBF0064 */ lw $ra, 0x64($sp) /* F144C 802CCA9C 8FB20060 */ lw $s2, 0x60($sp) /* F1450 802CCAA0 8FB1005C */ lw $s1, 0x5C($sp) /* F1454 802CCAA4 8FB00058 */ lw $s0, 0x58($sp) /* F1458 802CCAA8 D7BA0080 */ ldc1 $f26, 0x80($sp) /* F145C 802CCAAC D7B80078 */ ldc1 $f24, 0x78($sp) /* F1460 802CCAB0 D7B60070 */ ldc1 $f22, 0x70($sp) /* F1464 802CCAB4 D7B40068 */ ldc1 $f20, 0x68($sp) /* F1468 802CCAB8 03E00008 */ jr $ra /* F146C 802CCABC 27BD0088 */ addiu $sp, $sp, 0x88 ### DECOMPILED C INSTRUCTIONS: ApiStatus ResetCam(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); Camera* camera = &gCameras[id]; f32 moveSpeed = evt_get_float_variable(script, *args++); PlayerStatus* playerStatus = &gPlayerStatus; if (isInitialCall) { f32 x = playerStatus->position.x; f32 y = playerStatus->position.y; f32 z = playerStatus->position.z; f32 hitX, hitY, hitZ; f32 hitDepth = 32767.0f; f32 nx, ny, nz; s32 hitID; hitID = test_ray_zones(x, y + 10.0f, z, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &nx, &ny, &nz); if (hitID >= 0) { camera->controlSettings = *gZoneCollisionData.colliderList[hitID].camSettings; } camera->movePos.x = x; camera->movePos.y = y; camera->movePos.z = z; camera->moveSpeed = moveSpeed; camera->panActive = TRUE; camera->followPlayer = TRUE; camera->panPhase = 0.0f; return ApiStatus_BLOCK; } if (camera->interpAlpha >= 1.0f) { camera->panActive = TRUE; camera->followPlayer = FALSE; camera->moveSpeed = 1.0f; camera->panPhase = 0.0f; return ApiStatus_DONE2; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel dispatch_damage_event_partner /* 1AE2AC 8027F9CC 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 1AE2B0 8027F9D0 AFB30024 */ sw $s3, 0x24($sp) /* 1AE2B4 8027F9D4 00A0982D */ daddu $s3, $a1, $zero /* 1AE2B8 8027F9D8 AFB20020 */ sw $s2, 0x20($sp) /* 1AE2BC 8027F9DC 3C12800E */ lui $s2, %hi(gBattleStatus) /* 1AE2C0 8027F9E0 2652C070 */ addiu $s2, $s2, %lo(gBattleStatus) /* 1AE2C4 8027F9E4 00041400 */ sll $v0, $a0, 16 /* 1AE2C8 8027F9E8 AFBF002C */ sw $ra, 0x2C($sp) /* 1AE2CC 8027F9EC AFB40028 */ sw $s4, 0x28($sp) /* 1AE2D0 8027F9F0 AFB1001C */ sw $s1, 0x1C($sp) /* 1AE2D4 8027F9F4 AFB00018 */ sw $s0, 0x18($sp) /* 1AE2D8 8027F9F8 8E5000DC */ lw $s0, 0xDC($s2) /* 1AE2DC 8027F9FC 00022C03 */ sra $a1, $v0, 16 /* 1AE2E0 8027FA00 A644017E */ sh $a0, 0x17E($s2) /* 1AE2E4 8027FA04 960301FA */ lhu $v1, 0x1FA($s0) /* 1AE2E8 8027FA08 2402007F */ addiu $v0, $zero, 0x7F /* 1AE2EC 8027FA0C A20201B8 */ sb $v0, 0x1B8($s0) /* 1AE2F0 8027FA10 00651821 */ addu $v1, $v1, $a1 /* 1AE2F4 8027FA14 00031400 */ sll $v0, $v1, 16 /* 1AE2F8 8027FA18 00022C03 */ sra $a1, $v0, 16 /* 1AE2FC 8027FA1C 960201FC */ lhu $v0, 0x1FC($s0) /* 1AE300 8027FA20 00C0A02D */ daddu $s4, $a2, $zero /* 1AE304 8027FA24 A60301FA */ sh $v1, 0x1FA($s0) /* 1AE308 8027FA28 00651823 */ subu $v1, $v1, $a1 /* 1AE30C 8027FA2C A60301FA */ sh $v1, 0x1FA($s0) /* 1AE310 8027FA30 00451021 */ addu $v0, $v0, $a1 /* 1AE314 8027FA34 A60201FC */ sh $v0, 0x1FC($s0) /* 1AE318 8027FA38 A6400180 */ sh $zero, 0x180($s2) /* 1AE31C 8027FA3C 920201B8 */ lbu $v0, 0x1B8($s0) /* 1AE320 8027FA40 00451023 */ subu $v0, $v0, $a1 /* 1AE324 8027FA44 A20201B8 */ sb $v0, 0x1B8($s0) /* 1AE328 8027FA48 00021600 */ sll $v0, $v0, 24 /* 1AE32C 8027FA4C 00021E03 */ sra $v1, $v0, 24 /* 1AE330 8027FA50 1C600006 */ bgtz $v1, .L8027FA6C /* 1AE334 8027FA54 2611000C */ addiu $s1, $s0, 0xC /* 1AE338 8027FA58 96420180 */ lhu $v0, 0x180($s2) /* 1AE33C 8027FA5C 24130020 */ addiu $s3, $zero, 0x20 /* 1AE340 8027FA60 00431021 */ addu $v0, $v0, $v1 /* 1AE344 8027FA64 A6420180 */ sh $v0, 0x180($s2) /* 1AE348 8027FA68 A20001B8 */ sb $zero, 0x1B8($s0) .L8027FA6C: /* 1AE34C 8027FA6C 96420180 */ lhu $v0, 0x180($s2) /* 1AE350 8027FA70 00451021 */ addu $v0, $v0, $a1 /* 1AE354 8027FA74 A6420180 */ sh $v0, 0x180($s2) /* 1AE358 8027FA78 A60201F8 */ sh $v0, 0x1F8($s0) /* 1AE35C 8027FA7C 8E420000 */ lw $v0, 0x0($s2) /* 1AE360 8027FA80 30420020 */ andi $v0, $v0, 0x20 /* 1AE364 8027FA84 10400007 */ beqz $v0, .L8027FAA4 /* 1AE368 8027FA88 A240019A */ sb $zero, 0x19A($s2) /* 1AE36C 8027FA8C 24020009 */ addiu $v0, $zero, 0x9 /* 1AE370 8027FA90 52620001 */ beql $s3, $v0, .L8027FA98 /* 1AE374 8027FA94 2413000A */ addiu $s3, $zero, 0xA .L8027FA98: /* 1AE378 8027FA98 24020017 */ addiu $v0, $zero, 0x17 /* 1AE37C 8027FA9C 52620001 */ beql $s3, $v0, .L8027FAA4 /* 1AE380 8027FAA0 24130019 */ addiu $s3, $zero, 0x19 .L8027FAA4: /* 1AE384 8027FAA4 86420180 */ lh $v0, 0x180($s2) /* 1AE388 8027FAA8 18400009 */ blez $v0, .L8027FAD0 /* 1AE38C 8027FAAC 0200202D */ daddu $a0, $s0, $zero /* 1AE390 8027FAB0 2405000D */ addiu $a1, $zero, 0xD /* 1AE394 8027FAB4 3C03800E */ lui $v1, %hi(gBattleStatus) /* 1AE398 8027FAB8 2463C070 */ addiu $v1, $v1, %lo(gBattleStatus) /* 1AE39C 8027FABC 8C620000 */ lw $v0, 0x0($v1) /* 1AE3A0 8027FAC0 86460180 */ lh $a2, 0x180($s2) /* 1AE3A4 8027FAC4 34420020 */ ori $v0, $v0, 0x20 /* 1AE3A8 8027FAC8 0C0997D0 */ jal inflict_status /* 1AE3AC 8027FACC AC620000 */ sw $v0, 0x0($v1) .L8027FAD0: /* 1AE3B0 8027FAD0 16800006 */ bnez $s4, .L8027FAEC /* 1AE3B4 8027FAD4 24020001 */ addiu $v0, $zero, 0x1 /* 1AE3B8 8027FAD8 0220202D */ daddu $a0, $s1, $zero /* 1AE3BC 8027FADC 24050100 */ addiu $a1, $zero, 0x100 /* 1AE3C0 8027FAE0 0C09A5D5 */ jal set_goal_pos_to_part /* 1AE3C4 8027FAE4 0000302D */ daddu $a2, $zero, $zero /* 1AE3C8 8027FAE8 24020001 */ addiu $v0, $zero, 0x1 .L8027FAEC: /* 1AE3CC 8027FAEC AFA20010 */ sw $v0, 0x10($sp) /* 1AE3D0 8027FAF0 8E260014 */ lw $a2, 0x14($s1) /* 1AE3D4 8027FAF4 86470180 */ lh $a3, 0x180($s2) /* 1AE3D8 8027FAF8 C62C000C */ lwc1 $f12, 0xC($s1) /* 1AE3DC 8027FAFC 0C09996B */ jal show_next_damage_popup /* 1AE3E0 8027FB00 C62E0010 */ lwc1 $f14, 0x10($s1) /* 1AE3E4 8027FB04 86420180 */ lh $v0, 0x180($s2) /* 1AE3E8 8027FB08 AFA20010 */ sw $v0, 0x10($sp) /* 1AE3EC 8027FB0C 8E25000C */ lw $a1, 0xC($s1) /* 1AE3F0 8027FB10 8E260010 */ lw $a2, 0x10($s1) /* 1AE3F4 8027FB14 8E270014 */ lw $a3, 0x14($s1) /* 1AE3F8 8027FB18 0C0999B9 */ jal show_damage_fx /* 1AE3FC 8027FB1C 0200202D */ daddu $a0, $s0, $zero /* 1AE400 8027FB20 86420180 */ lh $v0, 0x180($s2) /* 1AE404 8027FB24 18400003 */ blez $v0, .L8027FB34 /* 1AE408 8027FB28 0200202D */ daddu $a0, $s0, $zero /* 1AE40C 8027FB2C 0C099C06 */ jal func_80267018 /* 1AE410 8027FB30 24050001 */ addiu $a1, $zero, 0x1 .L8027FB34: /* 1AE414 8027FB34 8E020000 */ lw $v0, 0x0($s0) /* 1AE418 8027FB38 3C030008 */ lui $v1, (0x80000 >> 16) /* 1AE41C 8027FB3C 00431025 */ or $v0, $v0, $v1 /* 1AE420 8027FB40 AE020000 */ sw $v0, 0x0($s0) /* 1AE424 8027FB44 3C10800E */ lui $s0, %hi(gBattleStatus) /* 1AE428 8027FB48 8E10C070 */ lw $s0, %lo(gBattleStatus)($s0) /* 1AE42C 8027FB4C 0260202D */ daddu $a0, $s3, $zero /* 1AE430 8027FB50 32100240 */ andi $s0, $s0, 0x240 /* 1AE434 8027FB54 0C09F7A0 */ jal dispatch_event_partner /* 1AE438 8027FB58 0010802B */ sltu $s0, $zero, $s0 /* 1AE43C 8027FB5C 0200102D */ daddu $v0, $s0, $zero /* 1AE440 8027FB60 8FBF002C */ lw $ra, 0x2C($sp) /* 1AE444 8027FB64 8FB40028 */ lw $s4, 0x28($sp) /* 1AE448 8027FB68 8FB30024 */ lw $s3, 0x24($sp) /* 1AE44C 8027FB6C 8FB20020 */ lw $s2, 0x20($sp) /* 1AE450 8027FB70 8FB1001C */ lw $s1, 0x1C($sp) /* 1AE454 8027FB74 8FB00018 */ lw $s0, 0x18($sp) /* 1AE458 8027FB78 03E00008 */ jr $ra /* 1AE45C 8027FB7C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: s32 dispatch_damage_event_partner(s32 damageAmount, s32 event, s32 stopMotion) { BattleStatus* battleStatus = &gBattleStatus; Actor* partner = battleStatus->partnerActor; ActorState* state = &partner->state; s32 hpChange; s32 flagCheck; battleStatus->currentAttackDamage = damageAmount; hpChange = (s16)damageAmount; partner->hpChangeCounter += hpChange; hpChange = partner->hpChangeCounter; partner->currentHP = 127; partner->damageCounter += hpChange; partner->hpChangeCounter -= hpChange; battleStatus->lastAttackDamage = 0; partner->currentHP -= hpChange; if (partner->currentHP <= 0) { event = EVENT_DEATH; battleStatus->lastAttackDamage += partner->currentHP; partner->currentHP = 0; } battleStatus->lastAttackDamage += hpChange; partner->lastDamageTaken = battleStatus->lastAttackDamage; battleStatus->currentDamageSource = DMG_SRC_DEFAULT; if (gBattleStatus.flags1 & BS_FLAGS1_SP_EVT_ACTIVE) { if (event == EVENT_HIT_COMBO) { event = EVENT_HIT; } if (event == EVENT_ZERO_DAMAGE) { event = EVENT_IMMUNE; } } if (battleStatus->lastAttackDamage > 0) { gBattleStatus.flags1 |= BS_FLAGS1_SP_EVT_ACTIVE; inflict_status(partner, STATUS_KEY_DAZE, battleStatus->lastAttackDamage); } if (!stopMotion) { set_goal_pos_to_part(state, ACTOR_PARTNER, 0); } show_next_damage_popup(state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage, 1); show_damage_fx(partner, state->goalPos.x, state->goalPos.y, state->goalPos.z, battleStatus->lastAttackDamage); if (battleStatus->lastAttackDamage > 0) { func_80267018(partner, 1); } partner->flags |= ACTOR_FLAG_HEALTH_BAR_HIDDEN; flagCheck = (gBattleStatus.flags1 & (BS_FLAGS1_200 | BS_FLAGS1_40)) != 0; dispatch_event_partner(event); return flagCheck; }
### RAW ASSEMBLY INSTRUCTIONS: glabel corrupted_init /* 48480 8006D080 27BDFED0 */ addiu $sp, $sp, -0x130 /* 48484 8006D084 AFB20118 */ sw $s2, 0x118($sp) /* 48488 8006D088 00809021 */ addu $s2, $a0, $zero /* 4848C 8006D08C AFB40120 */ sw $s4, 0x120($sp) /* 48490 8006D090 00A0A021 */ addu $s4, $a1, $zero /* 48494 8006D094 240500FF */ addiu $a1, $zero, 0xFF /* 48498 8006D098 268200FF */ addiu $v0, $s4, 0xFF /* 4849C 8006D09C AFBF012C */ sw $ra, 0x12C($sp) /* 484A0 8006D0A0 AFB60128 */ sw $s6, 0x128($sp) /* 484A4 8006D0A4 AFB50124 */ sw $s5, 0x124($sp) /* 484A8 8006D0A8 AFB3011C */ sw $s3, 0x11C($sp) /* 484AC 8006D0AC AFB10114 */ sw $s1, 0x114($sp) /* 484B0 8006D0B0 AFB00110 */ sw $s0, 0x110($sp) .L8006D0B4: /* 484B4 8006D0B4 A0400101 */ sb $zero, 0x101($v0) /* 484B8 8006D0B8 24A5FFFF */ addiu $a1, $a1, -0x1 /* 484BC 8006D0BC 04A1FFFD */ bgez $a1, .L8006D0B4 /* 484C0 8006D0C0 2442FFFF */ addiu $v0, $v0, -0x1 /* 484C4 8006D0C4 240200FF */ addiu $v0, $zero, 0xFF /* 484C8 8006D0C8 A2820100 */ sb $v0, 0x100($s4) /* 484CC 8006D0CC 92420064 */ lbu $v0, 0x64($s2) /* 484D0 8006D0D0 10400036 */ beqz $v0, .L8006D1AC /* 484D4 8006D0D4 00009821 */ addu $s3, $zero, $zero /* 484D8 8006D0D8 27B50010 */ addiu $s5, $sp, 0x10 /* 484DC 8006D0DC 24160001 */ addiu $s6, $zero, 0x1 /* 484E0 8006D0E0 327000FF */ andi $s0, $s3, 0xFF .L8006D0E4: /* 484E4 8006D0E4 16000002 */ bnez $s0, .L8006D0F0 /* 484E8 8006D0E8 24110001 */ addiu $s1, $zero, 0x1 /* 484EC 8006D0EC 8E510060 */ lw $s1, 0x60($s2) .L8006D0F0: /* 484F0 8006D0F0 02402021 */ addu $a0, $s2, $zero /* 484F4 8006D0F4 27A50010 */ addiu $a1, $sp, 0x10 /* 484F8 8006D0F8 00003021 */ addu $a2, $zero, $zero /* 484FC 8006D0FC 0C01A7A3 */ jal __osPfsRWInode /* 48500 8006D100 02003821 */ addu $a3, $s0, $zero /* 48504 8006D104 00402021 */ addu $a0, $v0, $zero /* 48508 8006D108 0004182B */ sltu $v1, $zero, $a0 /* 4850C 8006D10C 38820003 */ xori $v0, $a0, 0x3 /* 48510 8006D110 0002102B */ sltu $v0, $zero, $v0 /* 48514 8006D114 00621824 */ and $v1, $v1, $v0 /* 48518 8006D118 14600025 */ bnez $v1, .L8006D1B0 /* 4851C 8006D11C 00801021 */ addu $v0, $a0, $zero /* 48520 8006D120 02202821 */ addu $a1, $s1, $zero /* 48524 8006D124 28A20080 */ slti $v0, $a1, 0x80 /* 48528 8006D128 1040001A */ beqz $v0, .L8006D194 /* 4852C 8006D12C 32020007 */ andi $v0, $s0, 0x7 /* 48530 8006D130 02003821 */ addu $a3, $s0, $zero /* 48534 8006D134 00564004 */ sllv $t0, $s6, $v0 /* 48538 8006D138 00051040 */ sll $v0, $a1, 1 /* 4853C 8006D13C 00553021 */ addu $a2, $v0, $s5 .L8006D140: /* 48540 8006D140 94C40000 */ lhu $a0, 0x0($a2) /* 48544 8006D144 8E420060 */ lw $v0, 0x60($s2) /* 48548 8006D148 3083FFFF */ andi $v1, $a0, 0xFFFF /* 4854C 8006D14C 0062102A */ slt $v0, $v1, $v0 /* 48550 8006D150 1440000D */ bnez $v0, .L8006D188 /* 48554 8006D154 24A50001 */ addiu $a1, $a1, 0x1 /* 48558 8006D158 00031A02 */ srl $v1, $v1, 8 /* 4855C 8006D15C 1067000A */ beq $v1, $a3, .L8006D188 /* 48560 8006D160 00000000 */ nop /* 48564 8006D164 3082007F */ andi $v0, $a0, 0x7F /* 48568 8006D168 00021082 */ srl $v0, $v0, 2 /* 4856C 8006D16C 30630007 */ andi $v1, $v1, 0x7 /* 48570 8006D170 00031940 */ sll $v1, $v1, 5 /* 48574 8006D174 00431021 */ addu $v0, $v0, $v1 /* 48578 8006D178 02821021 */ addu $v0, $s4, $v0 /* 4857C 8006D17C 90430101 */ lbu $v1, 0x101($v0) /* 48580 8006D180 00681825 */ or $v1, $v1, $t0 /* 48584 8006D184 A0430101 */ sb $v1, 0x101($v0) .L8006D188: /* 48588 8006D188 28A20080 */ slti $v0, $a1, 0x80 /* 4858C 8006D18C 1440FFEC */ bnez $v0, .L8006D140 /* 48590 8006D190 24C60002 */ addiu $a2, $a2, 0x2 .L8006D194: /* 48594 8006D194 92430064 */ lbu $v1, 0x64($s2) /* 48598 8006D198 26730001 */ addiu $s3, $s3, 0x1 /* 4859C 8006D19C 326200FF */ andi $v0, $s3, 0xFF /* 485A0 8006D1A0 0043102B */ sltu $v0, $v0, $v1 /* 485A4 8006D1A4 1440FFCF */ bnez $v0, .L8006D0E4 /* 485A8 8006D1A8 327000FF */ andi $s0, $s3, 0xFF .L8006D1AC: /* 485AC 8006D1AC 00001021 */ addu $v0, $zero, $zero .L8006D1B0: /* 485B0 8006D1B0 8FBF012C */ lw $ra, 0x12C($sp) /* 485B4 8006D1B4 8FB60128 */ lw $s6, 0x128($sp) /* 485B8 8006D1B8 8FB50124 */ lw $s5, 0x124($sp) /* 485BC 8006D1BC 8FB40120 */ lw $s4, 0x120($sp) /* 485C0 8006D1C0 8FB3011C */ lw $s3, 0x11C($sp) /* 485C4 8006D1C4 8FB20118 */ lw $s2, 0x118($sp) /* 485C8 8006D1C8 8FB10114 */ lw $s1, 0x114($sp) /* 485CC 8006D1CC 8FB00110 */ lw $s0, 0x110($sp) /* 485D0 8006D1D0 03E00008 */ jr $ra /* 485D4 8006D1D4 27BD0130 */ addiu $sp, $sp, 0x130 ### DECOMPILED C INSTRUCTIONS: if ((ret = corrupted_init(pfs, &cache)) != 0) { return ret; } for (j = 0; j < pfs->dir_size; j++) { if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir)) != 0) { return ret; } if ((tempDir.company_code != 0) || (tempDir.game_code != 0)) { if ((tempDir.company_code == 0) || (tempDir.game_code == 0)) { cc = -1; } else { next = tempDir.start_page; cl = cc = 0; bank = 255; while (CHECK_IPAGE(next)) { if (bank != next.inode_t.bank) { bank = next.inode_t.bank; if (prevBank != bank) { ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank); prevBank = bank; } if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) { return ret; } } if ((cc = corrupted(pfs, next, &cache) - cl) != 0) { break; } cl = 1; next = tempInode.inode_page[next.inode_t.page]; } } if ((cc != 0) || (next.ipage != PFS_EOF)) { bzero(&tempDir, sizeof(__OSDir)); if (pfs->activebank != 0) { if ((ret = __osPfsSelectBank(pfs, 0)) != 0) { return ret; } } if ((ret = __osContRamWrite(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir, 0)) != 0) { return ret; } fixed++; } } } for (j = 0; j < pfs->dir_size; j++) { if ((ret = __osContRamRead(pfs->queue, pfs->channel, pfs->dir_table + j, (u8*)&tempDir)) != 0) { return ret; } if ((tempDir.company_code != 0) && (tempDir.game_code != 0) && (tempDir.start_page.ipage >= (u16)pfs->inode_start_page)) { // cast required nextNodeInFile[j].ipage = tempDir.start_page.ipage; } else { nextNodeInFile[j].ipage = 0; } } for (bank = 0; bank < pfs->banks; bank++) { ret = __osPfsRWInode(pfs, &tempInode, PFS_READ, bank); if ((ret != 0) && (ret != PFS_ERR_INCONSISTENT)) { return (ret); } offset = ((bank > PFS_ID_BANK_256K) ? 1 : pfs->inode_start_page); for (j = 0; j < offset; j++) { checkedInode.inode_page[j].ipage = tempInode.inode_page[j].ipage; } for (; j < PFS_INODE_SIZE_PER_PAGE; j++) { checkedInode.inode_page[j].ipage = PFS_PAGE_NOT_USED; } for (j = 0; j < pfs->dir_size; j++) { while (nextNodeInFile[j].inode_t.bank == bank && nextNodeInFile[j].ipage >= (u16)pfs->inode_start_page) { // cast required u8 val; val = nextNodeInFile[j].inode_t.page; nextNodeInFile[j] = checkedInode.inode_page[val] = tempInode.inode_page[val]; } } if ((ret = __osPfsRWInode(pfs, &checkedInode, PFS_WRITE, bank)) != 0) { return ret; } } if (fixed != 0) { pfs->status |= PFS_CORRUPTED; } else { pfs->status &= ~PFS_CORRUPTED; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_fx_param_hdl /* 34CA0 800598A0 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 34CA4 800598A4 00063400 */ sll $a2, $a2, 16 /* 34CA8 800598A8 00063403 */ sra $a2, $a2, 16 /* 34CAC 800598AC 2CC20008 */ sltiu $v0, $a2, 0x8 /* 34CB0 800598B0 1040007D */ beqz $v0, .L80059AA8 /* 34CB4 800598B4 AFBF0010 */ sw $ra, 0x10($sp) /* 34CB8 800598B8 00061080 */ sll $v0, $a2, 2 /* 34CBC 800598BC 3C01800A */ lui $at, %hi(jtbl_80098970) /* 34CC0 800598C0 00220821 */ addu $at, $at, $v0 /* 34CC4 800598C4 8C228970 */ lw $v0, %lo(jtbl_80098970)($at) /* 34CC8 800598C8 00400008 */ jr $v0 /* 34CCC 800598CC 00000000 */ nop glabel .L800598D0 /* 34CD0 800598D0 00051400 */ sll $v0, $a1, 16 /* 34CD4 800598D4 00021403 */ sra $v0, $v0, 16 /* 34CD8 800598D8 00021840 */ sll $v1, $v0, 1 /* 34CDC 800598DC 00621821 */ addu $v1, $v1, $v0 /* 34CE0 800598E0 8C82000C */ lw $v0, 0xC($a0) /* 34CE4 800598E4 00031900 */ sll $v1, $v1, 4 /* 34CE8 800598E8 00621821 */ addu $v1, $v1, $v0 /* 34CEC 800598EC 2402FFF8 */ addiu $v0, $zero, -0x8 /* 34CF0 800598F0 00E21024 */ and $v0, $a3, $v0 /* 34CF4 800598F4 080166AA */ j .L80059AA8 /* 34CF8 800598F8 AC620000 */ sw $v0, 0x0($v1) glabel .L800598FC /* 34CFC 800598FC 00051400 */ sll $v0, $a1, 16 /* 34D00 80059900 00021403 */ sra $v0, $v0, 16 /* 34D04 80059904 00021840 */ sll $v1, $v0, 1 /* 34D08 80059908 00621821 */ addu $v1, $v1, $v0 /* 34D0C 8005990C 8C82000C */ lw $v0, 0xC($a0) /* 34D10 80059910 00031900 */ sll $v1, $v1, 4 /* 34D14 80059914 00621821 */ addu $v1, $v1, $v0 /* 34D18 80059918 2402FFF8 */ addiu $v0, $zero, -0x8 /* 34D1C 8005991C 00E21024 */ and $v0, $a3, $v0 /* 34D20 80059920 080166AA */ j .L80059AA8 /* 34D24 80059924 AC620004 */ sw $v0, 0x4($v1) glabel .L80059928 /* 34D28 80059928 00051400 */ sll $v0, $a1, 16 /* 34D2C 8005992C 00021403 */ sra $v0, $v0, 16 /* 34D30 80059930 00021840 */ sll $v1, $v0, 1 /* 34D34 80059934 00621821 */ addu $v1, $v1, $v0 /* 34D38 80059938 8C82000C */ lw $v0, 0xC($a0) /* 34D3C 8005993C 00031900 */ sll $v1, $v1, 4 /* 34D40 80059940 00621821 */ addu $v1, $v1, $v0 /* 34D44 80059944 080166AA */ j .L80059AA8 /* 34D48 80059948 A4670008 */ sh $a3, 0x8($v1) glabel .L8005994C /* 34D4C 8005994C 00051400 */ sll $v0, $a1, 16 /* 34D50 80059950 00021403 */ sra $v0, $v0, 16 /* 34D54 80059954 00021840 */ sll $v1, $v0, 1 /* 34D58 80059958 00621821 */ addu $v1, $v1, $v0 /* 34D5C 8005995C 8C82000C */ lw $v0, 0xC($a0) /* 34D60 80059960 00031900 */ sll $v1, $v1, 4 /* 34D64 80059964 00621821 */ addu $v1, $v1, $v0 /* 34D68 80059968 080166AA */ j .L80059AA8 /* 34D6C 8005996C A467000A */ sh $a3, 0xA($v1) glabel .L80059970 /* 34D70 80059970 00051400 */ sll $v0, $a1, 16 /* 34D74 80059974 00021403 */ sra $v0, $v0, 16 /* 34D78 80059978 00021840 */ sll $v1, $v0, 1 /* 34D7C 8005997C 00621821 */ addu $v1, $v1, $v0 /* 34D80 80059980 8C82000C */ lw $v0, 0xC($a0) /* 34D84 80059984 00031900 */ sll $v1, $v1, 4 /* 34D88 80059988 00621821 */ addu $v1, $v1, $v0 /* 34D8C 8005998C 080166AA */ j .L80059AA8 /* 34D90 80059990 A467000C */ sh $a3, 0xC($v1) glabel .L80059994 /* 34D94 80059994 00051400 */ sll $v0, $a1, 16 /* 34D98 80059998 00021403 */ sra $v0, $v0, 16 /* 34D9C 8005999C 00021840 */ sll $v1, $v0, 1 /* 34DA0 800599A0 00621821 */ addu $v1, $v1, $v0 /* 34DA4 800599A4 00031900 */ sll $v1, $v1, 4 /* 34DA8 800599A8 44870000 */ mtc1 $a3, $f0 /* 34DAC 800599AC 00000000 */ nop /* 34DB0 800599B0 46800020 */ cvt.s.w $f0, $f0 /* 34DB4 800599B4 3C01447A */ lui $at, (0x447A0000 >> 16) /* 34DB8 800599B8 44811000 */ mtc1 $at, $f2 /* 34DBC 800599BC 8C82000C */ lw $v0, 0xC($a0) /* 34DC0 800599C0 3C048008 */ lui $a0, %hi(gActiveSynDriverPtr) /* 34DC4 800599C4 8C848E50 */ lw $a0, %lo(gActiveSynDriverPtr)($a0) /* 34DC8 800599C8 46020003 */ div.s $f0, $f0, $f2 /* 34DCC 800599CC 46000021 */ cvt.d.s $f0, $f0 /* 34DD0 800599D0 46200000 */ add.d $f0, $f0, $f0 /* 34DD4 800599D4 00621821 */ addu $v1, $v1, $v0 /* 34DD8 800599D8 C4820008 */ lwc1 $f2, 0x8($a0) /* 34DDC 800599DC 468010A1 */ cvt.d.w $f2, $f2 /* 34DE0 800599E0 46220003 */ div.d $f0, $f0, $f2 /* 34DE4 800599E4 46200020 */ cvt.s.d $f0, $f0 /* 34DE8 800599E8 080166AA */ j .L80059AA8 /* 34DEC 800599EC E4600010 */ swc1 $f0, 0x10($v1) glabel .L800599F0 /* 34DF0 800599F0 00051400 */ sll $v0, $a1, 16 /* 34DF4 800599F4 00021403 */ sra $v0, $v0, 16 /* 34DF8 800599F8 00021840 */ sll $v1, $v0, 1 /* 34DFC 800599FC 00621821 */ addu $v1, $v1, $v0 /* 34E00 80059A00 00031900 */ sll $v1, $v1, 4 /* 34E04 80059A04 44870000 */ mtc1 $a3, $f0 /* 34E08 80059A08 00000000 */ nop /* 34E0C 80059A0C 46800020 */ cvt.s.w $f0, $f0 /* 34E10 80059A10 46000021 */ cvt.d.s $f0, $f0 /* 34E14 80059A14 8C82000C */ lw $v0, 0xC($a0) /* 34E18 80059A18 3C01800A */ lui $at, %hi(D_80098990) /* 34E1C 80059A1C D4228990 */ ldc1 $f2, %lo(D_80098990)($at) /* 34E20 80059A20 00622021 */ addu $a0, $v1, $v0 /* 34E24 80059A24 8C830004 */ lw $v1, 0x4($a0) /* 34E28 80059A28 8C820000 */ lw $v0, 0x0($a0) /* 34E2C 80059A2C 00621823 */ subu $v1, $v1, $v0 /* 34E30 80059A30 44832000 */ mtc1 $v1, $f4 /* 34E34 80059A34 00000000 */ nop /* 34E38 80059A38 46802121 */ cvt.d.w $f4, $f4 /* 34E3C 80059A3C 04610006 */ bgez $v1, .L80059A58 /* 34E40 80059A40 46220083 */ div.d $f2, $f0, $f2 /* 34E44 80059A44 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 34E48 80059A48 44810800 */ mtc1 $at, $f1 /* 34E4C 80059A4C 44800000 */ mtc1 $zero, $f0 /* 34E50 80059A50 00000000 */ nop /* 34E54 80059A54 46202100 */ add.d $f4, $f4, $f0 .L80059A58: /* 34E58 80059A58 46241002 */ mul.d $f0, $f2, $f4 /* 34E5C 80059A5C 00000000 */ nop /* 34E60 80059A60 46200020 */ cvt.s.d $f0, $f0 /* 34E64 80059A64 080166AA */ j .L80059AA8 /* 34E68 80059A68 E480001C */ swc1 $f0, 0x1C($a0) glabel .L80059A6C /* 34E6C 80059A6C 00051400 */ sll $v0, $a1, 16 /* 34E70 80059A70 00021403 */ sra $v0, $v0, 16 /* 34E74 80059A74 00021840 */ sll $v1, $v0, 1 /* 34E78 80059A78 00621821 */ addu $v1, $v1, $v0 /* 34E7C 80059A7C 8C82000C */ lw $v0, 0xC($a0) /* 34E80 80059A80 00031900 */ sll $v1, $v1, 4 /* 34E84 80059A84 00621021 */ addu $v0, $v1, $v0 /* 34E88 80059A88 8C420020 */ lw $v0, 0x20($v0) /* 34E8C 80059A8C 10400006 */ beqz $v0, .L80059AA8 /* 34E90 80059A90 00000000 */ nop /* 34E94 80059A94 A4470000 */ sh $a3, 0x0($v0) /* 34E98 80059A98 8C82000C */ lw $v0, 0xC($a0) /* 34E9C 80059A9C 00621021 */ addu $v0, $v1, $v0 /* 34EA0 80059AA0 0C016374 */ jal _init_lpfilter /* 34EA4 80059AA4 8C440020 */ lw $a0, 0x20($v0) .L80059AA8: /* 34EA8 80059AA8 8FBF0010 */ lw $ra, 0x10($sp) /* 34EAC 80059AAC 0000102D */ daddu $v0, $zero, $zero /* 34EB0 80059AB0 03E00008 */ jr $ra /* 34EB4 80059AB4 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: s32 au_fx_param_hdl(AuFX* fx, s16 index, s16 paramID, s32 value) { switch (paramID) { case INPUT_PARAM: fx->delays[index].input = value & 0xFFFFFFF8; break; case OUTPUT_PARAM: fx->delays[index].output = value & 0xFFFFFFF8; break; case FFCOEF_PARAM: fx->delays[index].ffcoef = value; break; case FBCOEF_PARAM: fx->delays[index].fbcoef = value; break; case GAIN_PARAM: fx->delays[index].gain = value; break; case CHORUSRATE_PARAM: fx->delays[index].rsinc = (2.0 * (value / 1000.0f)) / gActiveSynDriverPtr->outputRate; break; case CHORUSDEPTH_PARAM: fx->delays[index].rsgain = ((f32)value / CONVERT) * (fx->delays[index].output - fx->delays[index].input); break; case LPFILT_PARAM: if (fx->delays[index].lowpass_20) { fx->delays[index].lowpass_20->fc = value; _init_lpfilter(fx->delays[index].lowpass_20); } break; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel flower_splash_appendGfx /* 32CCB0 E0010510 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 32CCB4 E0010514 0080602D */ daddu $t4, $a0, $zero /* 32CCB8 E0010518 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 32CCBC E001051C 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 32CCC0 E0010520 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 32CCC4 E0010524 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 32CCC8 E0010528 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32CCCC E001052C AFB7001C */ sw $s7, 0x1C($sp) /* 32CCD0 E0010530 AFB60018 */ sw $s6, 0x18($sp) /* 32CCD4 E0010534 AFB50014 */ sw $s5, 0x14($sp) /* 32CCD8 E0010538 AFB40010 */ sw $s4, 0x10($sp) /* 32CCDC E001053C AFB3000C */ sw $s3, 0xC($sp) /* 32CCE0 E0010540 AFB20008 */ sw $s2, 0x8($sp) /* 32CCE4 E0010544 AFB10004 */ sw $s1, 0x4($sp) /* 32CCE8 E0010548 AFB00000 */ sw $s0, 0x0($sp) /* 32CCEC E001054C 8CC40000 */ lw $a0, 0x0($a2) /* 32CCF0 E0010550 8D88000C */ lw $t0, 0xC($t4) /* 32CCF4 E0010554 0080182D */ daddu $v1, $a0, $zero /* 32CCF8 E0010558 24840008 */ addiu $a0, $a0, 0x8 /* 32CCFC E001055C AC620000 */ sw $v0, 0x0($v1) /* 32CD00 E0010560 AC600004 */ sw $zero, 0x4($v1) /* 32CD04 E0010564 AC850000 */ sw $a1, 0x0($a0) /* 32CD08 E0010568 8D820010 */ lw $v0, 0x10($t4) /* 32CD0C E001056C 0000482D */ daddu $t1, $zero, $zero /* 32CD10 E0010570 ACC40000 */ sw $a0, 0x0($a2) /* 32CD14 E0010574 8C42001C */ lw $v0, 0x1C($v0) /* 32CD18 E0010578 3C038000 */ lui $v1, (0x80000000 >> 16) /* 32CD1C E001057C 00431021 */ addu $v0, $v0, $v1 /* 32CD20 E0010580 AC820004 */ sw $v0, 0x4($a0) /* 32CD24 E0010584 8D820008 */ lw $v0, 0x8($t4) /* 32CD28 E0010588 24840008 */ addiu $a0, $a0, 0x8 /* 32CD2C E001058C 1840004A */ blez $v0, .LE00106B8 /* 32CD30 E0010590 ACC40000 */ sw $a0, 0x0($a2) /* 32CD34 E0010594 3C0F800A */ lui $t7, %hi(gDisplayContext) /* 32CD38 E0010598 25EFA674 */ addiu $t7, $t7, %lo(gDisplayContext) /* 32CD3C E001059C 3C0D8007 */ lui $t5, %hi(gMatrixListPos) /* 32CD40 E00105A0 25AD41F0 */ addiu $t5, $t5, %lo(gMatrixListPos) /* 32CD44 E00105A4 3C0B0001 */ lui $t3, (0x11630 >> 16) /* 32CD48 E00105A8 356B1630 */ ori $t3, $t3, (0x11630 & 0xFFFF) /* 32CD4C E00105AC 00C0502D */ daddu $t2, $a2, $zero /* 32CD50 E00105B0 3C13FA00 */ lui $s3, (0xFA000000 >> 16) /* 32CD54 E00105B4 3C197060 */ lui $t9, (0x70601800 >> 16) /* 32CD58 E00105B8 37391800 */ ori $t9, $t9, (0x70601800 & 0xFFFF) /* 32CD5C E00105BC 3C12DA38 */ lui $s2, (0xDA380000 >> 16) /* 32CD60 E00105C0 3C11DE00 */ lui $s1, (0xDE000000 >> 16) /* 32CD64 E00105C4 3C18D838 */ lui $t8, (0xD8380002 >> 16) /* 32CD68 E00105C8 37180002 */ ori $t8, $t8, (0xD8380002 & 0xFFFF) /* 32CD6C E00105CC 24100040 */ addiu $s0, $zero, 0x40 /* 32CD70 E00105D0 25070070 */ addiu $a3, $t0, 0x70 .LE00105D4: /* 32CD74 E00105D4 8D020000 */ lw $v0, 0x0($t0) /* 32CD78 E00105D8 50400032 */ beql $v0, $zero, .LE00106A4 /* 32CD7C E00105DC 25290001 */ addiu $t1, $t1, 0x1 /* 32CD80 E00105E0 3C0E0900 */ lui $t6, %hi(D_09000E08_40E098) /* 32CD84 E00105E4 25CE0E08 */ addiu $t6, $t6, %lo(D_09000E08_40E098) /* 32CD88 E00105E8 25040030 */ addiu $a0, $t0, 0x30 /* 32CD8C E00105EC 00E0282D */ daddu $a1, $a3, $zero /* 32CD90 E00105F0 95A20000 */ lhu $v0, 0x0($t5) /* 32CD94 E00105F4 8DE30000 */ lw $v1, 0x0($t7) /* 32CD98 E00105F8 00021180 */ sll $v0, $v0, 6 /* 32CD9C E00105FC 00621821 */ addu $v1, $v1, $v0 /* 32CDA0 E0010600 006B1821 */ addu $v1, $v1, $t3 .LE0010604: /* 32CDA4 E0010604 8C940000 */ lw $s4, 0x0($a0) /* 32CDA8 E0010608 8C950004 */ lw $s5, 0x4($a0) /* 32CDAC E001060C 8C960008 */ lw $s6, 0x8($a0) /* 32CDB0 E0010610 8C97000C */ lw $s7, 0xC($a0) /* 32CDB4 E0010614 AC740000 */ sw $s4, 0x0($v1) /* 32CDB8 E0010618 AC750004 */ sw $s5, 0x4($v1) /* 32CDBC E001061C AC760008 */ sw $s6, 0x8($v1) /* 32CDC0 E0010620 AC77000C */ sw $s7, 0xC($v1) /* 32CDC4 E0010624 24840010 */ addiu $a0, $a0, 0x10 /* 32CDC8 E0010628 1485FFF6 */ bne $a0, $a1, .LE0010604 /* 32CDCC E001062C 24630010 */ addiu $v1, $v1, 0x10 /* 32CDD0 E0010630 8D440000 */ lw $a0, 0x0($t2) /* 32CDD4 E0010634 0080302D */ daddu $a2, $a0, $zero /* 32CDD8 E0010638 24840008 */ addiu $a0, $a0, 0x8 /* 32CDDC E001063C AD440000 */ sw $a0, 0x0($t2) /* 32CDE0 E0010640 ACD30000 */ sw $s3, 0x0($a2) /* 32CDE4 E0010644 90E5FF98 */ lbu $a1, -0x68($a3) /* 32CDE8 E0010648 95A30000 */ lhu $v1, 0x0($t5) /* 32CDEC E001064C 24820008 */ addiu $v0, $a0, 0x8 /* 32CDF0 E0010650 AD420000 */ sw $v0, 0x0($t2) /* 32CDF4 E0010654 24620001 */ addiu $v0, $v1, 0x1 /* 32CDF8 E0010658 A5A20000 */ sh $v0, 0x0($t5) /* 32CDFC E001065C 24820010 */ addiu $v0, $a0, 0x10 /* 32CE00 E0010660 AD420000 */ sw $v0, 0x0($t2) /* 32CE04 E0010664 24820018 */ addiu $v0, $a0, 0x18 /* 32CE08 E0010668 00B92825 */ or $a1, $a1, $t9 /* 32CE0C E001066C 3063FFFF */ andi $v1, $v1, 0xFFFF /* 32CE10 E0010670 00031980 */ sll $v1, $v1, 6 /* 32CE14 E0010674 AD420000 */ sw $v0, 0x0($t2) /* 32CE18 E0010678 ACC50004 */ sw $a1, 0x4($a2) /* 32CE1C E001067C AC920000 */ sw $s2, 0x0($a0) /* 32CE20 E0010680 8DE20000 */ lw $v0, 0x0($t7) /* 32CE24 E0010684 006B1821 */ addu $v1, $v1, $t3 /* 32CE28 E0010688 AC910008 */ sw $s1, 0x8($a0) /* 32CE2C E001068C AC8E000C */ sw $t6, 0xC($a0) /* 32CE30 E0010690 AC980010 */ sw $t8, 0x10($a0) /* 32CE34 E0010694 AC900014 */ sw $s0, 0x14($a0) /* 32CE38 E0010698 00431021 */ addu $v0, $v0, $v1 /* 32CE3C E001069C AC820004 */ sw $v0, 0x4($a0) /* 32CE40 E00106A0 25290001 */ addiu $t1, $t1, 0x1 .LE00106A4: /* 32CE44 E00106A4 24E70098 */ addiu $a3, $a3, 0x98 /* 32CE48 E00106A8 8D820008 */ lw $v0, 0x8($t4) /* 32CE4C E00106AC 0122102A */ slt $v0, $t1, $v0 /* 32CE50 E00106B0 1440FFC8 */ bnez $v0, .LE00105D4 /* 32CE54 E00106B4 25080098 */ addiu $t0, $t0, 0x98 .LE00106B8: /* 32CE58 E00106B8 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 32CE5C E00106BC 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 32CE60 E00106C0 8C620000 */ lw $v0, 0x0($v1) /* 32CE64 E00106C4 0040202D */ daddu $a0, $v0, $zero /* 32CE68 E00106C8 24420008 */ addiu $v0, $v0, 0x8 /* 32CE6C E00106CC AC620000 */ sw $v0, 0x0($v1) /* 32CE70 E00106D0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32CE74 E00106D4 AC820000 */ sw $v0, 0x0($a0) /* 32CE78 E00106D8 AC800004 */ sw $zero, 0x4($a0) /* 32CE7C E00106DC 8FB7001C */ lw $s7, 0x1C($sp) /* 32CE80 E00106E0 8FB60018 */ lw $s6, 0x18($sp) /* 32CE84 E00106E4 8FB50014 */ lw $s5, 0x14($sp) /* 32CE88 E00106E8 8FB40010 */ lw $s4, 0x10($sp) /* 32CE8C E00106EC 8FB3000C */ lw $s3, 0xC($sp) /* 32CE90 E00106F0 8FB20008 */ lw $s2, 0x8($sp) /* 32CE94 E00106F4 8FB10004 */ lw $s1, 0x4($sp) /* 32CE98 E00106F8 8FB00000 */ lw $s0, 0x0($sp) /* 32CE9C E00106FC 03E00008 */ jr $ra /* 32CEA0 E0010700 27BD0020 */ addiu $sp, $sp, 0x20 /* 32CEA4 E0010704 00000000 */ nop /* 32CEA8 E0010708 00000000 */ nop /* 32CEAC E001070C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void flower_splash_appendGfx(void* effect) { EffectInstance* effectTemp = effect; FlowerFXData* data = effectTemp->data.flowerSplash; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); for (i = 0; i < effectTemp->numParts; i++, data++) { if (data->alive) { Gfx* dlist = D_09000E08_32DCC8; gDisplayContext->matrixStack[gMatrixListPos] = data->transformMtx; gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, data->primAlpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_shattering_init_pieces /* 103CEC 802E246C 27BDFF40 */ addiu $sp, $sp, -0xC0 /* 103CF0 802E2470 AFB500A4 */ sw $s5, 0xA4($sp) /* 103CF4 802E2474 0080A82D */ daddu $s5, $a0, $zero /* 103CF8 802E2478 AFB600A8 */ sw $s6, 0xA8($sp) /* 103CFC 802E247C 00C0B02D */ daddu $s6, $a2, $zero /* 103D00 802E2480 27A40050 */ addiu $a0, $sp, 0x50 /* 103D04 802E2484 30A5FFFF */ andi $a1, $a1, 0xFFFF /* 103D08 802E2488 AFBF00B0 */ sw $ra, 0xB0($sp) /* 103D0C 802E248C AFB700AC */ sw $s7, 0xAC($sp) /* 103D10 802E2490 AFB400A0 */ sw $s4, 0xA0($sp) /* 103D14 802E2494 AFB3009C */ sw $s3, 0x9C($sp) /* 103D18 802E2498 AFB20098 */ sw $s2, 0x98($sp) /* 103D1C 802E249C AFB10094 */ sw $s1, 0x94($sp) /* 103D20 802E24A0 AFB00090 */ sw $s0, 0x90($sp) /* 103D24 802E24A4 F7B400B8 */ sdc1 $f20, 0xB8($sp) /* 103D28 802E24A8 8EA20044 */ lw $v0, 0x44($s5) /* 103D2C 802E24AC 8EB00040 */ lw $s0, 0x40($s5) /* 103D30 802E24B0 00451021 */ addu $v0, $v0, $a1 /* 103D34 802E24B4 AE020034 */ sw $v0, 0x34($s0) /* 103D38 802E24B8 3C02802E */ lui $v0, %hi(entity_shattering_setupGfx) /* 103D3C 802E24BC 24422BA4 */ addiu $v0, $v0, %lo(entity_shattering_setupGfx) /* 103D40 802E24C0 AEA2003C */ sw $v0, 0x3C($s5) /* 103D44 802E24C4 240200FF */ addiu $v0, $zero, 0xFF /* 103D48 802E24C8 A2A2000B */ sb $v0, 0xB($s5) /* 103D4C 802E24CC C6000038 */ lwc1 $f0, 0x38($s0) /* 103D50 802E24D0 8EA50048 */ lw $a1, 0x48($s5) /* 103D54 802E24D4 8EA70050 */ lw $a3, 0x50($s5) /* 103D58 802E24D8 44060000 */ mfc1 $a2, $f0 /* 103D5C 802E24DC 24170002 */ addiu $s7, $zero, 0x2 /* 103D60 802E24E0 0C019E40 */ jal guTranslateF /* 103D64 802E24E4 AEA6004C */ sw $a2, 0x4C($s5) /* 103D68 802E24E8 0C044AC8 */ jal is_block_on_ground /* 103D6C 802E24EC 02A0202D */ daddu $a0, $s5, $zero /* 103D70 802E24F0 50400001 */ beql $v0, $zero, .L802E24F8 /* 103D74 802E24F4 24170001 */ addiu $s7, $zero, 0x1 .L802E24F8: /* 103D78 802E24F8 0000A02D */ daddu $s4, $zero, $zero /* 103D7C 802E24FC 0200902D */ daddu $s2, $s0, $zero /* 103D80 802E2500 0240882D */ daddu $s1, $s2, $zero /* 103D84 802E2504 0240982D */ daddu $s3, $s2, $zero /* 103D88 802E2508 240200FF */ addiu $v0, $zero, 0xFF /* 103D8C 802E250C A640003E */ sh $zero, 0x3E($s2) /* 103D90 802E2510 A642003C */ sh $v0, 0x3C($s2) .L802E2514: /* 103D94 802E2514 32C2FFFF */ andi $v0, $s6, 0xFFFF /* 103D98 802E2518 26D60040 */ addiu $s6, $s6, 0x40 /* 103D9C 802E251C 8EA50044 */ lw $a1, 0x44($s5) /* 103DA0 802E2520 27A40010 */ addiu $a0, $sp, 0x10 /* 103DA4 802E2524 0C019D60 */ jal guMtxL2F /* 103DA8 802E2528 00A22821 */ addu $a1, $a1, $v0 /* 103DAC 802E252C 27A40050 */ addiu $a0, $sp, 0x50 /* 103DB0 802E2530 27A50010 */ addiu $a1, $sp, 0x10 /* 103DB4 802E2534 0C019D80 */ jal guMtxCatF /* 103DB8 802E2538 00A0302D */ daddu $a2, $a1, $zero /* 103DBC 802E253C C7A00040 */ lwc1 $f0, 0x40($sp) /* 103DC0 802E2540 E64000C0 */ swc1 $f0, 0xC0($s2) /* 103DC4 802E2544 C7A00044 */ lwc1 $f0, 0x44($sp) /* 103DC8 802E2548 E6400124 */ swc1 $f0, 0x124($s2) /* 103DCC 802E254C C7A00048 */ lwc1 $f0, 0x48($sp) /* 103DD0 802E2550 240400FF */ addiu $a0, $zero, 0xFF /* 103DD4 802E2554 0C00A67F */ jal rand_int /* 103DD8 802E2558 E6400188 */ swc1 $f0, 0x188($s2) /* 103DDC 802E255C 00021023 */ negu $v0, $v0 /* 103DE0 802E2560 A2220072 */ sb $v0, 0x72($s1) /* 103DE4 802E2564 24020001 */ addiu $v0, $zero, 0x1 /* 103DE8 802E2568 16E20008 */ bne $s7, $v0, .L802E258C /* 103DEC 802E256C 24100028 */ addiu $s0, $zero, 0x28 /* 103DF0 802E2570 24100014 */ addiu $s0, $zero, 0x14 /* 103DF4 802E2574 96620000 */ lhu $v0, 0x0($s3) /* 103DF8 802E2578 3C0140CC */ lui $at, (0x40CCCCCD >> 16) /* 103DFC 802E257C 3421CCCD */ ori $at, $at, (0x40CCCCCD & 0xFFFF) /* 103E00 802E2580 4481A000 */ mtc1 $at, $f20 /* 103E04 802E2584 080B8968 */ j .L802E25A0 /* 103E08 802E2588 34420001 */ ori $v0, $v0, 0x1 .L802E258C: /* 103E0C 802E258C 96620000 */ lhu $v0, 0x0($s3) /* 103E10 802E2590 3C014109 */ lui $at, (0x4109999A >> 16) /* 103E14 802E2594 3421999A */ ori $at, $at, (0x4109999A & 0xFFFF) /* 103E18 802E2598 4481A000 */ mtc1 $at, $f20 /* 103E1C 802E259C 34420002 */ ori $v0, $v0, 0x2 .L802E25A0: /* 103E20 802E25A0 A6620000 */ sh $v0, 0x0($s3) /* 103E24 802E25A4 0C00A67F */ jal rand_int /* 103E28 802E25A8 2404000A */ addiu $a0, $zero, 0xA /* 103E2C 802E25AC 02028021 */ addu $s0, $s0, $v0 /* 103E30 802E25B0 32820001 */ andi $v0, $s4, 0x1 /* 103E34 802E25B4 14400003 */ bnez $v0, .L802E25C4 /* 103E38 802E25B8 A2300059 */ sb $s0, 0x59($s1) /* 103E3C 802E25BC 00101023 */ negu $v0, $s0 /* 103E40 802E25C0 A2220059 */ sb $v0, 0x59($s1) .L802E25C4: /* 103E44 802E25C4 0C00A64D */ jal rand_float /* 103E48 802E25C8 26730002 */ addiu $s3, $s3, 0x2 /* 103E4C 802E25CC 3C01802F */ lui $at, %hi(D_802EB130) /* 103E50 802E25D0 D422B130 */ ldc1 $f2, %lo(D_802EB130)($at) /* 103E54 802E25D4 46000021 */ cvt.d.s $f0, $f0 /* 103E58 802E25D8 46220002 */ mul.d $f0, $f0, $f2 /* 103E5C 802E25DC 00000000 */ nop /* 103E60 802E25E0 46200020 */ cvt.s.d $f0, $f0 /* 103E64 802E25E4 4600A000 */ add.s $f0, $f20, $f0 /* 103E68 802E25E8 26940001 */ addiu $s4, $s4, 0x1 /* 103E6C 802E25EC 2A820018 */ slti $v0, $s4, 0x18 /* 103E70 802E25F0 E64001EC */ swc1 $f0, 0x1EC($s2) /* 103E74 802E25F4 26520004 */ addiu $s2, $s2, 0x4 /* 103E78 802E25F8 A2200040 */ sb $zero, 0x40($s1) /* 103E7C 802E25FC A220008B */ sb $zero, 0x8B($s1) /* 103E80 802E2600 A22000A4 */ sb $zero, 0xA4($s1) /* 103E84 802E2604 1440FFC3 */ bnez $v0, .L802E2514 /* 103E88 802E2608 26310001 */ addiu $s1, $s1, 0x1 /* 103E8C 802E260C 8FBF00B0 */ lw $ra, 0xB0($sp) /* 103E90 802E2610 8FB700AC */ lw $s7, 0xAC($sp) /* 103E94 802E2614 8FB600A8 */ lw $s6, 0xA8($sp) /* 103E98 802E2618 8FB500A4 */ lw $s5, 0xA4($sp) /* 103E9C 802E261C 8FB400A0 */ lw $s4, 0xA0($sp) /* 103EA0 802E2620 8FB3009C */ lw $s3, 0x9C($sp) /* 103EA4 802E2624 8FB20098 */ lw $s2, 0x98($sp) /* 103EA8 802E2628 8FB10094 */ lw $s1, 0x94($sp) /* 103EAC 802E262C 8FB00090 */ lw $s0, 0x90($sp) /* 103EB0 802E2630 D7B400B8 */ ldc1 $f20, 0xB8($sp) /* 103EB4 802E2634 03E00008 */ jr $ra /* 103EB8 802E2638 27BD00C0 */ addiu $sp, $sp, 0xC0 ### DECOMPILED C INSTRUCTIONS: void entity_shattering_init_pieces(Entity* entity, Gfx** dlists, Mtx* matrices) { ShatteringBlockData* data = entity->dataBuf.shatteringBlock; s32 s7; s32 i; Matrix4f mtxFragment; Matrix4f mtxTrans; s32 rotSpeed; f32 fallSpeed; data->fragmentDisplayLists = ENTITY_ADDR(entity, Gfx**, dlists); entity->renderSetupFunc = entity_shattering_setupGfx; entity->alpha = 255; entity->position.y = data->originalPosY; guTranslateF(mtxTrans, entity->position.x, entity->position.y, entity->position.z); s7 = 2; if (!is_block_on_ground(entity)) { s7 = 1; } data->fadeOutCounter = 0; data->alpha = 255; for (i = 0; i < 24; i++) { guMtxL2F(mtxFragment, ENTITY_ADDR(entity, Mtx*, matrices++)); guMtxCatF(mtxTrans, mtxFragment, mtxFragment); data->fragmentPosX[i] = mtxFragment[3][0]; data->fragmentPosY[i] = mtxFragment[3][1]; data->fragmentPosZ[i] = mtxFragment[3][2]; data->fragmentMoveAngle[i] = -rand_int(255); if (s7 == 1) { rotSpeed = 20; fallSpeed = 6.4f; data->fragmentFlags[i] |= 1; } else { rotSpeed = 40; fallSpeed = 8.6f; data->fragmentFlags[i] |= 2; } rotSpeed += rand_int(10); data->fragmentRotSpeed[i] = rotSpeed; if ((i % 2) == 0) { data->fragmentRotSpeed[i] = -rotSpeed; } data->fragmentFallSpeed[i] = fallSpeed + (f32)(rand_float() * 2.7); data->fragmentRebounds[i] = 0; data->fragmentRotX[i] = 0; data->fragmentRotY[i] = 0; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HeartBlockContent_anim_idle /* 106490 802E4C10 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 106494 802E4C14 AFB10024 */ sw $s1, 0x24($sp) /* 106498 802E4C18 0080882D */ daddu $s1, $a0, $zero /* 10649C 802E4C1C AFBF0028 */ sw $ra, 0x28($sp) /* 1064A0 802E4C20 AFB00020 */ sw $s0, 0x20($sp) /* 1064A4 802E4C24 8E300040 */ lw $s0, 0x40($s1) /* 1064A8 802E4C28 92030001 */ lbu $v1, 0x1($s0) /* 1064AC 802E4C2C 24020001 */ addiu $v0, $zero, 0x1 /* 1064B0 802E4C30 10620014 */ beq $v1, $v0, .L802E4C84 /* 1064B4 802E4C34 28620002 */ slti $v0, $v1, 0x2 /* 1064B8 802E4C38 10400005 */ beqz $v0, .L802E4C50 /* 1064BC 802E4C3C 24020002 */ addiu $v0, $zero, 0x2 /* 1064C0 802E4C40 50600009 */ beql $v1, $zero, .L802E4C68 /* 1064C4 802E4C44 AE200054 */ sw $zero, 0x54($s1) /* 1064C8 802E4C48 080B935C */ j .L802E4D70 /* 1064CC 802E4C4C 00000000 */ nop .L802E4C50: /* 1064D0 802E4C50 10620028 */ beq $v1, $v0, .L802E4CF4 /* 1064D4 802E4C54 24020003 */ addiu $v0, $zero, 0x3 /* 1064D8 802E4C58 1062002B */ beq $v1, $v0, .L802E4D08 /* 1064DC 802E4C5C 00000000 */ nop /* 1064E0 802E4C60 080B935C */ j .L802E4D70 /* 1064E4 802E4C64 00000000 */ nop .L802E4C68: /* 1064E8 802E4C68 AE200058 */ sw $zero, 0x58($s1) /* 1064EC 802E4C6C 14A00057 */ bnez $a1, .L802E4DCC /* 1064F0 802E4C70 AE20005C */ sw $zero, 0x5C($s1) /* 1064F4 802E4C74 92020001 */ lbu $v0, 0x1($s0) /* 1064F8 802E4C78 24420001 */ addiu $v0, $v0, 0x1 /* 1064FC 802E4C7C 080B935C */ j .L802E4D70 /* 106500 802E4C80 A2020001 */ sb $v0, 0x1($s0) .L802E4C84: /* 106504 802E4C84 C6200054 */ lwc1 $f0, 0x54($s1) /* 106508 802E4C88 3C01802F */ lui $at, %hi(D_802EB270) /* 10650C 802E4C8C D422B270 */ ldc1 $f2, %lo(D_802EB270)($at) /* 106510 802E4C90 46000021 */ cvt.d.s $f0, $f0 /* 106514 802E4C94 46220000 */ add.d $f0, $f0, $f2 /* 106518 802E4C98 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 10651C 802E4C9C 44811800 */ mtc1 $at, $f3 /* 106520 802E4CA0 44801000 */ mtc1 $zero, $f2 /* 106524 802E4CA4 46200020 */ cvt.s.d $f0, $f0 /* 106528 802E4CA8 E6200054 */ swc1 $f0, 0x54($s1) /* 10652C 802E4CAC 46000021 */ cvt.d.s $f0, $f0 /* 106530 802E4CB0 4620103E */ c.le.d $f2, $f0 /* 106534 802E4CB4 00000000 */ nop /* 106538 802E4CB8 45000009 */ bc1f .L802E4CE0 /* 10653C 802E4CBC 00000000 */ nop /* 106540 802E4CC0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 106544 802E4CC4 44810000 */ mtc1 $at, $f0 /* 106548 802E4CC8 00000000 */ nop /* 10654C 802E4CCC E6200054 */ swc1 $f0, 0x54($s1) /* 106550 802E4CD0 92020001 */ lbu $v0, 0x1($s0) /* 106554 802E4CD4 A2000002 */ sb $zero, 0x2($s0) /* 106558 802E4CD8 24420001 */ addiu $v0, $v0, 0x1 /* 10655C 802E4CDC A2020001 */ sb $v0, 0x1($s0) .L802E4CE0: /* 106560 802E4CE0 C6200054 */ lwc1 $f0, 0x54($s1) /* 106564 802E4CE4 46000086 */ mov.s $f2, $f0 /* 106568 802E4CE8 E620005C */ swc1 $f0, 0x5C($s1) /* 10656C 802E4CEC 080B935C */ j .L802E4D70 /* 106570 802E4CF0 E6220058 */ swc1 $f2, 0x58($s1) .L802E4CF4: /* 106574 802E4CF4 0C0B92C4 */ jal entity_HeartBlockContent_set_initial_pos /* 106578 802E4CF8 0220202D */ daddu $a0, $s1, $zero /* 10657C 802E4CFC 92020001 */ lbu $v0, 0x1($s0) /* 106580 802E4D00 24420001 */ addiu $v0, $v0, 0x1 /* 106584 802E4D04 A2020001 */ sb $v0, 0x1($s0) .L802E4D08: /* 106588 802E4D08 3C02800A */ lui $v0, %hi(gOverrideFlags) /* 10658C 802E4D0C 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) /* 106590 802E4D10 14400017 */ bnez $v0, .L802E4D70 /* 106594 802E4D14 00000000 */ nop /* 106598 802E4D18 92020002 */ lbu $v0, 0x2($s0) /* 10659C 802E4D1C 2442FFFF */ addiu $v0, $v0, -0x1 /* 1065A0 802E4D20 A2020002 */ sb $v0, 0x2($s0) /* 1065A4 802E4D24 00021600 */ sll $v0, $v0, 24 /* 1065A8 802E4D28 1C400011 */ bgtz $v0, .L802E4D70 /* 1065AC 802E4D2C 24020032 */ addiu $v0, $zero, 0x32 /* 1065B0 802E4D30 9204000A */ lbu $a0, 0xA($s0) /* 1065B4 802E4D34 3C0141B0 */ lui $at, (0x41B00000 >> 16) /* 1065B8 802E4D38 44810000 */ mtc1 $at, $f0 /* 1065BC 802E4D3C 3C014100 */ lui $at, (0x41000000 >> 16) /* 1065C0 802E4D40 44811000 */ mtc1 $at, $f2 /* 1065C4 802E4D44 A2020002 */ sb $v0, 0x2($s0) /* 1065C8 802E4D48 24020004 */ addiu $v0, $zero, 0x4 /* 1065CC 802E4D4C AFA20018 */ sw $v0, 0x18($sp) /* 1065D0 802E4D50 24020014 */ addiu $v0, $zero, 0x14 /* 1065D4 802E4D54 AFA2001C */ sw $v0, 0x1C($sp) /* 1065D8 802E4D58 E7A00010 */ swc1 $f0, 0x10($sp) /* 1065DC 802E4D5C E7A20014 */ swc1 $f2, 0x14($sp) /* 1065E0 802E4D60 8E250048 */ lw $a1, 0x48($s1) /* 1065E4 802E4D64 8E26004C */ lw $a2, 0x4C($s1) /* 1065E8 802E4D68 0C01C154 */ jal fx_stars_shimmer /* 1065EC 802E4D6C 8E270050 */ lw $a3, 0x50($s1) .L802E4D70: /* 1065F0 802E4D70 0C04417A */ jal get_entity_by_index /* 1065F4 802E4D74 92040000 */ lbu $a0, 0x0($s0) /* 1065F8 802E4D78 0C0B836C */ jal entity_can_collide_with_jumping_player /* 1065FC 802E4D7C 0040202D */ daddu $a0, $v0, $zero /* 106600 802E4D80 10400012 */ beqz $v0, .L802E4DCC /* 106604 802E4D84 00000000 */ nop /* 106608 802E4D88 0C043F5A */ jal exec_entity_commandlist /* 10660C 802E4D8C 0220202D */ daddu $a0, $s1, $zero /* 106610 802E4D90 0C03805E */ jal disable_player_input /* 106614 802E4D94 00000000 */ nop /* 106618 802E4D98 3C038011 */ lui $v1, %hi(gPlayerStatus) /* 10661C 802E4D9C 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) /* 106620 802E4DA0 8C620004 */ lw $v0, 0x4($v1) /* 106624 802E4DA4 24040001 */ addiu $a0, $zero, 0x1 /* 106628 802E4DA8 AC600054 */ sw $zero, 0x54($v1) /* 10662C 802E4DAC 34420200 */ ori $v0, $v0, 0x200 /* 106630 802E4DB0 0C009C22 */ jal set_time_freeze_mode /* 106634 802E4DB4 AC620004 */ sw $v0, 0x4($v1) /* 106638 802E4DB8 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 10663C 802E4DBC 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 106640 802E4DC0 8C620000 */ lw $v0, 0x0($v1) /* 106644 802E4DC4 34420040 */ ori $v0, $v0, 0x40 /* 106648 802E4DC8 AC620000 */ sw $v0, 0x0($v1) .L802E4DCC: /* 10664C 802E4DCC 8FBF0028 */ lw $ra, 0x28($sp) /* 106650 802E4DD0 8FB10024 */ lw $s1, 0x24($sp) /* 106654 802E4DD4 8FB00020 */ lw $s0, 0x20($sp) /* 106658 802E4DD8 03E00008 */ jr $ra /* 10665C 802E4DDC 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void entity_HeartBlockContent_anim_idle(Entity* entity, s32 arg1) { HeartBlockContentData* data = entity->dataBuf.heartBlockContent; switch (data->state) { case 0: entity->scale.x = 0.0f; entity->scale.y = 0.0f; entity->scale.z = 0.0f; if (arg1 == 0) { data->state++; break; } return; case 1: entity->scale.x += 0.01; if (entity->scale.x >= 1.0) { entity->scale.x = 1.0f; data->sparkleTimer = 0; data->state++; } entity->scale.z = entity->scale.x; entity->scale.y = entity->scale.x; break; case 2: entity_HeartBlockContent_set_initial_pos(entity); data->state++; // fallthrough case 3: if (gOverrideFlags == 0) { // create an effect every 50 frames data->sparkleTimer--; if (data->sparkleTimer <= 0) { data->sparkleTimer = 50; fx_stars_shimmer(data->sparkleEffectType, entity->position.x, entity->position.y, entity->position.z, 22.0f, 8.0f, 4, 20); } } break; } if (entity_can_collide_with_jumping_player(get_entity_by_index(data->parentEntityIndex))) { exec_entity_commandlist(entity); disable_player_input(); gPlayerStatus.currentSpeed = 0; gPlayerStatus.animFlags |= PA_FLAG_RAISED_ARMS; set_time_freeze_mode(TIME_FREEZE_PARTIAL); gOverrideFlags |= GLOBAL_OVERRIDES_40; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel reset_status_bar /* 83060 800E9BB0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 83064 800E9BB4 AFB20018 */ sw $s2, 0x18($sp) /* 83068 800E9BB8 0000902D */ daddu $s2, $zero, $zero /* 8306C 800E9BBC AFB10014 */ sw $s1, 0x14($sp) /* 83070 800E9BC0 3C118011 */ lui $s1, %hi(gUIStatus) /* 83074 800E9BC4 2631EF58 */ addiu $s1, $s1, %lo(gUIStatus) /* 83078 800E9BC8 AFB00010 */ sw $s0, 0x10($sp) /* 8307C 800E9BCC 0220802D */ daddu $s0, $s1, $zero /* 83080 800E9BD0 2402000C */ addiu $v0, $zero, 0xC /* 83084 800E9BD4 AFBF001C */ sw $ra, 0x1C($sp) /* 83088 800E9BD8 A6220034 */ sh $v0, 0x34($s1) /* 8308C 800E9BDC 2402FF9C */ addiu $v0, $zero, -0x64 /* 83090 800E9BE0 A6220036 */ sh $v0, 0x36($s1) /* 83094 800E9BE4 240200D2 */ addiu $v0, $zero, 0xD2 /* 83098 800E9BE8 3C038011 */ lui $v1, %hi(gPlayerData) /* 8309C 800E9BEC 2463F290 */ addiu $v1, $v1, %lo(gPlayerData) /* 830A0 800E9BF0 A220003A */ sb $zero, 0x3A($s1) /* 830A4 800E9BF4 A6220038 */ sh $v0, 0x38($s1) /* 830A8 800E9BF8 A220003B */ sb $zero, 0x3B($s1) /* 830AC 800E9BFC A2200044 */ sb $zero, 0x44($s1) /* 830B0 800E9C00 A2200045 */ sb $zero, 0x45($s1) /* 830B4 800E9C04 A2200046 */ sb $zero, 0x46($s1) /* 830B8 800E9C08 A220004A */ sb $zero, 0x4A($s1) /* 830BC 800E9C0C A220004B */ sb $zero, 0x4B($s1) /* 830C0 800E9C10 A220004C */ sb $zero, 0x4C($s1) /* 830C4 800E9C14 A220004D */ sb $zero, 0x4D($s1) /* 830C8 800E9C18 A220004E */ sb $zero, 0x4E($s1) /* 830CC 800E9C1C A220004F */ sb $zero, 0x4F($s1) /* 830D0 800E9C20 A2200054 */ sb $zero, 0x54($s1) /* 830D4 800E9C24 A2200055 */ sb $zero, 0x55($s1) /* 830D8 800E9C28 A2200056 */ sb $zero, 0x56($s1) /* 830DC 800E9C2C A2200050 */ sb $zero, 0x50($s1) /* 830E0 800E9C30 A2200051 */ sb $zero, 0x51($s1) /* 830E4 800E9C34 A2200047 */ sb $zero, 0x47($s1) /* 830E8 800E9C38 A2200052 */ sb $zero, 0x52($s1) /* 830EC 800E9C3C A2200053 */ sb $zero, 0x53($s1) /* 830F0 800E9C40 90640010 */ lbu $a0, 0x10($v1) /* 830F4 800E9C44 2402FFFF */ addiu $v0, $zero, -0x1 /* 830F8 800E9C48 A222006E */ sb $v0, 0x6E($s1) /* 830FC 800E9C4C 90620002 */ lbu $v0, 0x2($v1) /* 83100 800E9C50 90650005 */ lbu $a1, 0x5($v1) /* 83104 800E9C54 9466000C */ lhu $a2, 0xC($v1) /* 83108 800E9C58 94630290 */ lhu $v1, 0x290($v1) /* 8310C 800E9C5C 00042600 */ sll $a0, $a0, 24 /* 83110 800E9C60 00042603 */ sra $a0, $a0, 24 /* 83114 800E9C64 A222003D */ sb $v0, 0x3D($s1) /* 83118 800E9C68 A225003E */ sb $a1, 0x3E($s1) /* 8311C 800E9C6C A6260040 */ sh $a2, 0x40($s1) /* 83120 800E9C70 A6240042 */ sh $a0, 0x42($s1) /* 83124 800E9C74 A6230048 */ sh $v1, 0x48($s1) /* 83128 800E9C78 A220003C */ sb $zero, 0x3C($s1) .L800E9C7C: /* 8312C 800E9C7C 8E040000 */ lw $a0, 0x0($s0) /* 83130 800E9C80 26100004 */ addiu $s0, $s0, 0x4 /* 83134 800E9C84 26520001 */ addiu $s2, $s2, 0x1 /* 83138 800E9C88 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 8313C 800E9C8C 0080282D */ daddu $a1, $a0, $zero /* 83140 800E9C90 2A420002 */ slti $v0, $s2, 0x2 /* 83144 800E9C94 1440FFF9 */ bnez $v0, .L800E9C7C /* 83148 800E9C98 00000000 */ nop /* 8314C 800E9C9C 0000902D */ daddu $s2, $zero, $zero /* 83150 800E9CA0 0220802D */ daddu $s0, $s1, $zero .L800E9CA4: /* 83154 800E9CA4 8E040008 */ lw $a0, 0x8($s0) /* 83158 800E9CA8 26100004 */ addiu $s0, $s0, 0x4 /* 8315C 800E9CAC 26520001 */ addiu $s2, $s2, 0x1 /* 83160 800E9CB0 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 83164 800E9CB4 0080282D */ daddu $a1, $a0, $zero /* 83168 800E9CB8 2A420002 */ slti $v0, $s2, 0x2 /* 8316C 800E9CBC 1440FFF9 */ bnez $v0, .L800E9CA4 /* 83170 800E9CC0 00000000 */ nop /* 83174 800E9CC4 8E240010 */ lw $a0, 0x10($s1) /* 83178 800E9CC8 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 8317C 800E9CCC 0080282D */ daddu $a1, $a0, $zero /* 83180 800E9CD0 8E240014 */ lw $a0, 0x14($s1) /* 83184 800E9CD4 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 83188 800E9CD8 0080282D */ daddu $a1, $a0, $zero /* 8318C 800E9CDC 8E240018 */ lw $a0, 0x18($s1) /* 83190 800E9CE0 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 83194 800E9CE4 0080282D */ daddu $a1, $a0, $zero /* 83198 800E9CE8 8E24001C */ lw $a0, 0x1C($s1) /* 8319C 800E9CEC 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 831A0 800E9CF0 0080282D */ daddu $a1, $a0, $zero /* 831A4 800E9CF4 8E240020 */ lw $a0, 0x20($s1) /* 831A8 800E9CF8 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 831AC 800E9CFC 0080282D */ daddu $a1, $a0, $zero /* 831B0 800E9D00 8E240024 */ lw $a0, 0x24($s1) /* 831B4 800E9D04 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 831B8 800E9D08 0080282D */ daddu $a1, $a0, $zero /* 831BC 800E9D0C 8E240028 */ lw $a0, 0x28($s1) /* 831C0 800E9D10 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 831C4 800E9D14 0080282D */ daddu $a1, $a0, $zero /* 831C8 800E9D18 8E24002C */ lw $a0, 0x2C($s1) /* 831CC 800E9D1C 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 831D0 800E9D20 0080282D */ daddu $a1, $a0, $zero /* 831D4 800E9D24 8E240030 */ lw $a0, 0x30($s1) /* 831D8 800E9D28 0C0514AD */ jal copy_world_hud_element_ref_to_battle /* 831DC 800E9D2C 0080282D */ daddu $a1, $a0, $zero /* 831E0 800E9D30 8FBF001C */ lw $ra, 0x1C($sp) /* 831E4 800E9D34 8FB20018 */ lw $s2, 0x18($sp) /* 831E8 800E9D38 8FB10014 */ lw $s1, 0x14($sp) /* 831EC 800E9D3C 8FB00010 */ lw $s0, 0x10($sp) /* 831F0 800E9D40 03E00008 */ jr $ra /* 831F4 800E9D44 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void reset_status_bar(void) { PlayerData* playerData = &gPlayerData; UiStatus* uiStatus = &gUIStatus; s32 i; uiStatus->drawPosX = 12; uiStatus->drawPosY = -100; uiStatus->hidden = 0; uiStatus->showTimer = 210; uiStatus->unk_3B[0] = 0; uiStatus->ignoreChanges = FALSE; uiStatus->unk_45[0] = 0; uiStatus->unk_45[1] = 0; uiStatus->hpBlinking = 0; uiStatus->hpBlinkCounter = 0; uiStatus->hpBlinkTimer = 0; uiStatus->fpBlinking = 0; uiStatus->fpBlinkCounter = 0; uiStatus->fpBlinkTimer = 0; uiStatus->coinsBlinking = 0; uiStatus->coinsBlinkCounter = 0; uiStatus->coinsBlinkTimer = 0; uiStatus->spBlinking = 0; uiStatus->spBlinkCounter = 0; uiStatus->disabled = 0; uiStatus->starpointsBlinking = 0; uiStatus->starpointsBlinkCounter = 0; uiStatus->unk_6C[2] = -1; uiStatus->displayHP = playerData->curHP; uiStatus->displayFP = playerData->curFP; uiStatus->displayCoins = playerData->coins; uiStatus->displayStarpoints = playerData->starPoints; uiStatus->displaySP = playerData->specialBarsFilled; uiStatus->unk_3B[1] = 0; for (i = 0; i < ARRAY_COUNT(uiStatus->hpIconIndices); i++) { copy_world_hud_element_ref_to_battle(uiStatus->hpIconIndices[i], uiStatus->hpIconIndices[i]); } for (i = 0; i < ARRAY_COUNT(uiStatus->fpIconIndices); i++) { copy_world_hud_element_ref_to_battle(uiStatus->fpIconIndices[i], uiStatus->fpIconIndices[i]); } copy_world_hud_element_ref_to_battle(uiStatus->coinIconIndex, uiStatus->coinIconIndex); copy_world_hud_element_ref_to_battle(uiStatus->coinSparkleIconIndex, uiStatus->coinSparkleIconIndex); copy_world_hud_element_ref_to_battle(uiStatus->starpointsIconIndex, uiStatus->starpointsIconIndex); copy_world_hud_element_ref_to_battle(uiStatus->starpointsShineIconIndex, uiStatus->starpointsShineIconIndex); copy_world_hud_element_ref_to_battle(uiStatus->iconIndex8, uiStatus->iconIndex8); copy_world_hud_element_ref_to_battle(uiStatus->iconIndex9, uiStatus->iconIndex9); copy_world_hud_element_ref_to_battle(uiStatus->iconIndexA, uiStatus->iconIndexA); copy_world_hud_element_ref_to_battle(uiStatus->iconIndexB, uiStatus->iconIndexB); copy_world_hud_element_ref_to_battle(uiStatus->starIconIndex, uiStatus->starIconIndex); }
### RAW ASSEMBLY INSTRUCTIONS: glabel throw_spiny_update /* 3CF5C0 E00C8220 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 3CF5C4 E00C8224 AFBF0010 */ sw $ra, 0x10($sp) /* 3CF5C8 E00C8228 8C830000 */ lw $v1, 0x0($a0) /* 3CF5CC E00C822C 8C85000C */ lw $a1, 0xC($a0) /* 3CF5D0 E00C8230 30620010 */ andi $v0, $v1, 0x10 /* 3CF5D4 E00C8234 10400005 */ beqz $v0, .LE00C824C /* 3CF5D8 E00C8238 2402FFEF */ addiu $v0, $zero, -0x11 /* 3CF5DC E00C823C 00621024 */ and $v0, $v1, $v0 /* 3CF5E0 E00C8240 AC820000 */ sw $v0, 0x0($a0) /* 3CF5E4 E00C8244 24020010 */ addiu $v0, $zero, 0x10 /* 3CF5E8 E00C8248 ACA20028 */ sw $v0, 0x28($a1) .LE00C824C: /* 3CF5EC E00C824C 8CA30028 */ lw $v1, 0x28($a1) /* 3CF5F0 E00C8250 286203E8 */ slti $v0, $v1, 0x3E8 /* 3CF5F4 E00C8254 10400002 */ beqz $v0, .LE00C8260 /* 3CF5F8 E00C8258 2462FFFF */ addiu $v0, $v1, -0x1 /* 3CF5FC E00C825C ACA20028 */ sw $v0, 0x28($a1) .LE00C8260: /* 3CF600 E00C8260 8CA2002C */ lw $v0, 0x2C($a1) /* 3CF604 E00C8264 8CA30028 */ lw $v1, 0x28($a1) /* 3CF608 E00C8268 24420001 */ addiu $v0, $v0, 0x1 /* 3CF60C E00C826C 04610005 */ bgez $v1, .LE00C8284 /* 3CF610 E00C8270 ACA2002C */ sw $v0, 0x2C($a1) /* 3CF614 E00C8274 0C080128 */ jal shim_remove_effect /* 3CF618 E00C8278 00000000 */ nop /* 3CF61C E00C827C 080320FE */ j .LE00C83F8 /* 3CF620 E00C8280 00000000 */ nop .LE00C8284: /* 3CF624 E00C8284 8CA30060 */ lw $v1, 0x60($a1) /* 3CF628 E00C8288 0040202D */ daddu $a0, $v0, $zero /* 3CF62C E00C828C 2C620007 */ sltiu $v0, $v1, 0x7 /* 3CF630 E00C8290 1040001F */ beqz $v0, .LE00C8310 /* 3CF634 E00C8294 00000000 */ nop /* 3CF638 E00C8298 3C02E00D */ lui $v0, (0xE00D0000 >> 16) /* 3CF63C E00C829C 00431021 */ addu $v0, $v0, $v1 /* 3CF640 E00C82A0 90428718 */ lbu $v0, -0x78E8($v0) /* 3CF644 E00C82A4 3C013C23 */ lui $at, (0x3C23D70A >> 16) /* 3CF648 E00C82A8 3421D70A */ ori $at, $at, (0x3C23D70A & 0xFFFF) /* 3CF64C E00C82AC 44811000 */ mtc1 $at, $f2 /* 3CF650 E00C82B0 44820000 */ mtc1 $v0, $f0 /* 3CF654 E00C82B4 00000000 */ nop /* 3CF658 E00C82B8 46800020 */ cvt.s.w $f0, $f0 /* 3CF65C E00C82BC 46020002 */ mul.s $f0, $f0, $f2 /* 3CF660 E00C82C0 00000000 */ nop /* 3CF664 E00C82C4 E4A00058 */ swc1 $f0, 0x58($a1) /* 3CF668 E00C82C8 3C02E00D */ lui $v0, (0xE00D0000 >> 16) /* 3CF66C E00C82CC 00431021 */ addu $v0, $v0, $v1 /* 3CF670 E00C82D0 90428720 */ lbu $v0, -0x78E0($v0) /* 3CF674 E00C82D4 44822000 */ mtc1 $v0, $f4 /* 3CF678 E00C82D8 00000000 */ nop /* 3CF67C E00C82DC 46802120 */ cvt.s.w $f4, $f4 /* 3CF680 E00C82E0 46022102 */ mul.s $f4, $f4, $f2 /* 3CF684 E00C82E4 00000000 */ nop /* 3CF688 E00C82E8 C4A00050 */ lwc1 $f0, 0x50($a1) /* 3CF68C E00C82EC 3C014220 */ lui $at, (0x42200000 >> 16) /* 3CF690 E00C82F0 44811000 */ mtc1 $at, $f2 /* 3CF694 E00C82F4 0060102D */ daddu $v0, $v1, $zero /* 3CF698 E00C82F8 46020001 */ sub.s $f0, $f0, $f2 /* 3CF69C E00C82FC 24420001 */ addiu $v0, $v0, 0x1 /* 3CF6A0 E00C8300 ACA20060 */ sw $v0, 0x60($a1) /* 3CF6A4 E00C8304 E4A00050 */ swc1 $f0, 0x50($a1) /* 3CF6A8 E00C8308 080320D9 */ j .LE00C8364 /* 3CF6AC E00C830C E4A4005C */ swc1 $f4, 0x5C($a1) .LE00C8310: /* 3CF6B0 E00C8310 C4A20048 */ lwc1 $f2, 0x48($a1) /* 3CF6B4 E00C8314 3C01BE4C */ lui $at, (0xBE4CCCCD >> 16) /* 3CF6B8 E00C8318 3421CCCD */ ori $at, $at, (0xBE4CCCCD & 0xFFFF) /* 3CF6BC E00C831C 44810000 */ mtc1 $at, $f0 /* 3CF6C0 E00C8320 C4A80004 */ lwc1 $f8, 0x4($a1) /* 3CF6C4 E00C8324 46001080 */ add.s $f2, $f2, $f0 /* 3CF6C8 E00C8328 C4A00044 */ lwc1 $f0, 0x44($a1) /* 3CF6CC E00C832C C4A6000C */ lwc1 $f6, 0xC($a1) /* 3CF6D0 E00C8330 46004200 */ add.s $f8, $f8, $f0 /* 3CF6D4 E00C8334 C4A0004C */ lwc1 $f0, 0x4C($a1) /* 3CF6D8 E00C8338 C4A40050 */ lwc1 $f4, 0x50($a1) /* 3CF6DC E00C833C 46003180 */ add.s $f6, $f6, $f0 /* 3CF6E0 E00C8340 C4A00054 */ lwc1 $f0, 0x54($a1) /* 3CF6E4 E00C8344 46002100 */ add.s $f4, $f4, $f0 /* 3CF6E8 E00C8348 C4A00008 */ lwc1 $f0, 0x8($a1) /* 3CF6EC E00C834C E4A20048 */ swc1 $f2, 0x48($a1) /* 3CF6F0 E00C8350 E4A80004 */ swc1 $f8, 0x4($a1) /* 3CF6F4 E00C8354 46020000 */ add.s $f0, $f0, $f2 /* 3CF6F8 E00C8358 E4A6000C */ swc1 $f6, 0xC($a1) /* 3CF6FC E00C835C E4A40050 */ swc1 $f4, 0x50($a1) /* 3CF700 E00C8360 E4A00008 */ swc1 $f0, 0x8($a1) .LE00C8364: /* 3CF704 E00C8364 8CA30068 */ lw $v1, 0x68($a1) /* 3CF708 E00C8368 2482FFFF */ addiu $v0, $a0, -0x1 /* 3CF70C E00C836C 1443000A */ bne $v0, $v1, .LE00C8398 /* 3CF710 E00C8370 00000000 */ nop /* 3CF714 E00C8374 C4A00048 */ lwc1 $f0, 0x48($a1) /* 3CF718 E00C8378 C4A20044 */ lwc1 $f2, 0x44($a1) /* 3CF71C E00C837C 3C01C080 */ lui $at, (0xC0800000 >> 16) /* 3CF720 E00C8380 44812000 */ mtc1 $at, $f4 /* 3CF724 E00C8384 ACA00060 */ sw $zero, 0x60($a1) /* 3CF728 E00C8388 46000007 */ neg.s $f0, $f0 /* 3CF72C E00C838C E4A00048 */ swc1 $f0, 0x48($a1) /* 3CF730 E00C8390 080320FE */ j .LE00C83F8 /* 3CF734 E00C8394 E4A40054 */ swc1 $f4, 0x54($a1) .LE00C8398: /* 3CF738 E00C8398 C4A40048 */ lwc1 $f4, 0x48($a1) /* 3CF73C E00C839C 44800000 */ mtc1 $zero, $f0 /* 3CF740 E00C83A0 00000000 */ nop /* 3CF744 E00C83A4 4600203C */ c.lt.s $f4, $f0 /* 3CF748 E00C83A8 00000000 */ nop /* 3CF74C E00C83AC 45000012 */ bc1f .LE00C83F8 /* 3CF750 E00C83B0 00000000 */ nop /* 3CF754 E00C83B4 C4A00008 */ lwc1 $f0, 0x8($a1) /* 3CF758 E00C83B8 3C01E00D */ lui $at, (0xE00D0000 >> 16) /* 3CF75C E00C83BC D4228738 */ ldc1 $f2, -0x78C8($at) /* 3CF760 E00C83C0 46000021 */ cvt.d.s $f0, $f0 /* 3CF764 E00C83C4 4622003C */ c.lt.d $f0, $f2 /* 3CF768 E00C83C8 00000000 */ nop /* 3CF76C E00C83CC 4500000A */ bc1f .LE00C83F8 /* 3CF770 E00C83D0 00000000 */ nop /* 3CF774 E00C83D4 3C014164 */ lui $at, (0x41649249 >> 16) /* 3CF778 E00C83D8 34219249 */ ori $at, $at, (0x41649249 & 0xFFFF) /* 3CF77C E00C83DC 44810000 */ mtc1 $at, $f0 /* 3CF780 E00C83E0 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 3CF784 E00C83E4 44811000 */ mtc1 $at, $f2 /* 3CF788 E00C83E8 46042101 */ sub.s $f4, $f4, $f4 /* 3CF78C E00C83EC E4A00008 */ swc1 $f0, 0x8($a1) /* 3CF790 E00C83F0 E4A20054 */ swc1 $f2, 0x54($a1) /* 3CF794 E00C83F4 E4A40048 */ swc1 $f4, 0x48($a1) .LE00C83F8: /* 3CF798 E00C83F8 8FBF0010 */ lw $ra, 0x10($sp) /* 3CF79C E00C83FC 03E00008 */ jr $ra /* 3CF7A0 E00C8400 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void throw_spiny_update(EffectInstance* effectInstance) { ThrowSpinyFXData* spinyObject = effectInstance->data.throwSpiny; u32 state; f32 gravity; s32 lifeDuration; if (effectInstance->flags & FX_INSTANCE_FLAG_DISMISS) { effectInstance->flags &= ~FX_INSTANCE_FLAG_DISMISS; spinyObject->life = 16; } if (spinyObject->life < 1000) { spinyObject->life--; } spinyObject->lifeDuration++; if (spinyObject->life < 0) { shim_remove_effect(effectInstance); return; } lifeDuration = spinyObject->lifeDuration; state = spinyObject->state; if (state < 7) { spinyObject->xScale = D_E00C8718[state] * 0.01f; spinyObject->yScale = D_E00C8720[state] * 0.01f; spinyObject->state += 1; spinyObject->yaw -= 40.0f; } else { spinyObject->gravity += -0.2f; spinyObject->pos.x += spinyObject->unk_44; spinyObject->pos.y += spinyObject->gravity; spinyObject->pos.z += spinyObject->unk_4C; spinyObject->yaw += spinyObject->rotationSpeed; } if ((lifeDuration - 1) == spinyObject->timeUntilFall) { spinyObject->state = 0; spinyObject->gravity = -spinyObject->gravity; spinyObject->unk_44 = spinyObject->unk_44; spinyObject->rotationSpeed = -4.0f; return; } gravity = spinyObject->gravity; if ((gravity < 0.0f) && (spinyObject->pos.y < 100.0 / 7.0)) { spinyObject->pos.y = 100.0f / 7.0f; spinyObject->rotationSpeed = -20.0f; spinyObject->gravity = gravity - gravity; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_update_player_sprite /* 100B7C 802DDA8C 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 100B80 802DDA90 AFB70034 */ sw $s7, 0x34($sp) /* 100B84 802DDA94 0080B82D */ daddu $s7, $a0, $zero /* 100B88 802DDA98 AFB5002C */ sw $s5, 0x2C($sp) /* 100B8C 802DDA9C 00A0A82D */ daddu $s5, $a1, $zero /* 100B90 802DDAA0 00151403 */ sra $v0, $s5, 16 /* 100B94 802DDAA4 304200FF */ andi $v0, $v0, 0xFF /* 100B98 802DDAA8 AFB40028 */ sw $s4, 0x28($sp) /* 100B9C 802DDAAC 2454FFFF */ addiu $s4, $v0, -0x1 /* 100BA0 802DDAB0 AFB20020 */ sw $s2, 0x20($sp) /* 100BA4 802DDAB4 32F200FF */ andi $s2, $s7, 0xFF /* 100BA8 802DDAB8 3C03802E */ lui $v1, %hi(spr_playerCurrentAnimInfo) /* 100BAC 802DDABC 2463F588 */ addiu $v1, $v1, %lo(spr_playerCurrentAnimInfo) /* 100BB0 802DDAC0 00121040 */ sll $v0, $s2, 1 /* 100BB4 802DDAC4 00521021 */ addu $v0, $v0, $s2 /* 100BB8 802DDAC8 F7B40040 */ sdc1 $f20, 0x40($sp) /* 100BBC 802DDACC 4486A000 */ mtc1 $a2, $f20 /* 100BC0 802DDAD0 00021080 */ sll $v0, $v0, 2 /* 100BC4 802DDAD4 AFB00018 */ sw $s0, 0x18($sp) /* 100BC8 802DDAD8 00438021 */ addu $s0, $v0, $v1 /* 100BCC 802DDADC AFBF0038 */ sw $ra, 0x38($sp) /* 100BD0 802DDAE0 AFB60030 */ sw $s6, 0x30($sp) /* 100BD4 802DDAE4 AFB30024 */ sw $s3, 0x24($sp) /* 100BD8 802DDAE8 AFB1001C */ sw $s1, 0x1C($sp) /* 100BDC 802DDAEC 8E020000 */ lw $v0, 0x0($s0) /* 100BE0 802DDAF0 3C01802E */ lui $at, %hi(D_802DF57C) /* 100BE4 802DDAF4 AC34F57C */ sw $s4, %lo(D_802DF57C)($at) /* 100BE8 802DDAF8 14400013 */ bnez $v0, .L802DDB48 /* 100BEC 802DDAFC 32B600FF */ andi $s6, $s5, 0xFF /* 100BF0 802DDB00 3C04802E */ lui $a0, %hi(spr_playerMaxComponents) /* 100BF4 802DDB04 8C84F580 */ lw $a0, %lo(spr_playerMaxComponents)($a0) /* 100BF8 802DDB08 0C0B7CB6 */ jal spr_allocate_components /* 100BFC 802DDB0C 00000000 */ nop /* 100C00 802DDB10 0040882D */ daddu $s1, $v0, $zero /* 100C04 802DDB14 AE110000 */ sw $s1, 0x0($s0) /* 100C08 802DDB18 8E230000 */ lw $v1, 0x0($s1) /* 100C0C 802DDB1C 2402FFFF */ addiu $v0, $zero, -0x1 /* 100C10 802DDB20 10620009 */ beq $v1, $v0, .L802DDB48 /* 100C14 802DDB24 0040982D */ daddu $s3, $v0, $zero .L802DDB28: /* 100C18 802DDB28 8E300000 */ lw $s0, 0x0($s1) /* 100C1C 802DDB2C 0C04E9C1 */ jal imgfx_get_free_instances /* 100C20 802DDB30 24040001 */ addiu $a0, $zero, 0x1 /* 100C24 802DDB34 26310004 */ addiu $s1, $s1, 0x4 /* 100C28 802DDB38 AE02004C */ sw $v0, 0x4C($s0) /* 100C2C 802DDB3C 8E220000 */ lw $v0, 0x0($s1) /* 100C30 802DDB40 1453FFF9 */ bne $v0, $s3, .L802DDB28 /* 100C34 802DDB44 00000000 */ nop .L802DDB48: /* 100C38 802DDB48 00141080 */ sll $v0, $s4, 2 /* 100C3C 802DDB4C 3C03802E */ lui $v1, %hi(spr_playerCurrentAnimInfo) /* 100C40 802DDB50 2463F588 */ addiu $v1, $v1, %lo(spr_playerCurrentAnimInfo) /* 100C44 802DDB54 3C05802E */ lui $a1, %hi(spr_playerSprites) /* 100C48 802DDB58 00A22821 */ addu $a1, $a1, $v0 /* 100C4C 802DDB5C 8CA5F548 */ lw $a1, %lo(spr_playerSprites)($a1) /* 100C50 802DDB60 00121040 */ sll $v0, $s2, 1 /* 100C54 802DDB64 00521021 */ addu $v0, $v0, $s2 /* 100C58 802DDB68 00021080 */ sll $v0, $v0, 2 /* 100C5C 802DDB6C 00438021 */ addu $s0, $v0, $v1 /* 100C60 802DDB70 8E110000 */ lw $s1, 0x0($s0) /* 100C64 802DDB74 10A00026 */ beqz $a1, .L802DDC10 /* 100C68 802DDB78 0000102D */ daddu $v0, $zero, $zero /* 100C6C 802DDB7C 00161080 */ sll $v0, $s6, 2 /* 100C70 802DDB80 24420010 */ addiu $v0, $v0, 0x10 /* 100C74 802DDB84 8CB40000 */ lw $s4, 0x0($a1) /* 100C78 802DDB88 00A22821 */ addu $a1, $a1, $v0 /* 100C7C 802DDB8C 8CB30000 */ lw $s3, 0x0($a1) /* 100C80 802DDB90 0C0B7623 */ jal spr_set_anim_timescale /* 100C84 802DDB94 4600A306 */ mov.s $f12, $f20 /* 100C88 802DDB98 06E00007 */ bltz $s7, .L802DDBB8 /* 100C8C 802DDB9C 3C02FEFF */ lui $v0, (0xFEFFFFFF >> 16) /* 100C90 802DDBA0 3442FFFF */ ori $v0, $v0, (0xFEFFFFFF & 0xFFFF) /* 100C94 802DDBA4 8E030004 */ lw $v1, 0x4($s0) /* 100C98 802DDBA8 02A22024 */ and $a0, $s5, $v0 /* 100C9C 802DDBAC 00621824 */ and $v1, $v1, $v0 /* 100CA0 802DDBB0 10830005 */ beq $a0, $v1, .L802DDBC8 /* 100CA4 802DDBB4 00000000 */ nop .L802DDBB8: /* 100CA8 802DDBB8 0220202D */ daddu $a0, $s1, $zero /* 100CAC 802DDBBC 0C0B7608 */ jal spr_init_anim_state /* 100CB0 802DDBC0 0260282D */ daddu $a1, $s3, $zero /* 100CB4 802DDBC4 AE000008 */ sw $zero, 0x8($s0) .L802DDBC8: /* 100CB8 802DDBC8 3C02802E */ lui $v0, %hi(spr_playerCurrentAnimInfo) /* 100CBC 802DDBCC 2442F588 */ addiu $v0, $v0, %lo(spr_playerCurrentAnimInfo) /* 100CC0 802DDBD0 00121840 */ sll $v1, $s2, 1 /* 100CC4 802DDBD4 00721821 */ addu $v1, $v1, $s2 /* 100CC8 802DDBD8 00031880 */ sll $v1, $v1, 2 /* 100CCC 802DDBDC 00628021 */ addu $s0, $v1, $v0 /* 100CD0 802DDBE0 3C024000 */ lui $v0, (0x40000000 >> 16) /* 100CD4 802DDBE4 02E21024 */ and $v0, $s7, $v0 /* 100CD8 802DDBE8 14400008 */ bnez $v0, .L802DDC0C /* 100CDC 802DDBEC AE150004 */ sw $s5, 0x4($s0) /* 100CE0 802DDBF0 0220282D */ daddu $a1, $s1, $zero /* 100CE4 802DDBF4 0260302D */ daddu $a2, $s3, $zero /* 100CE8 802DDBF8 AFA00010 */ sw $zero, 0x10($sp) /* 100CEC 802DDBFC 8E040008 */ lw $a0, 0x8($s0) /* 100CF0 802DDC00 0C0B75B7 */ jal spr_component_update /* 100CF4 802DDC04 0280382D */ daddu $a3, $s4, $zero /* 100CF8 802DDC08 AE020008 */ sw $v0, 0x8($s0) .L802DDC0C: /* 100CFC 802DDC0C 8E020008 */ lw $v0, 0x8($s0) .L802DDC10: /* 100D00 802DDC10 8FBF0038 */ lw $ra, 0x38($sp) /* 100D04 802DDC14 8FB70034 */ lw $s7, 0x34($sp) /* 100D08 802DDC18 8FB60030 */ lw $s6, 0x30($sp) /* 100D0C 802DDC1C 8FB5002C */ lw $s5, 0x2C($sp) /* 100D10 802DDC20 8FB40028 */ lw $s4, 0x28($sp) /* 100D14 802DDC24 8FB30024 */ lw $s3, 0x24($sp) /* 100D18 802DDC28 8FB20020 */ lw $s2, 0x20($sp) /* 100D1C 802DDC2C 8FB1001C */ lw $s1, 0x1C($sp) /* 100D20 802DDC30 8FB00018 */ lw $s0, 0x18($sp) /* 100D24 802DDC34 D7B40040 */ ldc1 $f20, 0x40($sp) /* 100D28 802DDC38 03E00008 */ jr $ra /* 100D2C 802DDC3C 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 spr_update_player_sprite(s32 spriteInstanceID, s32 animID, f32 timeScale) { u32* spriteData; SpriteComponent** compList; SpriteComponent* component; SpriteAnimComponent** animList; SpriteRasterCacheEntry** rasterList; s32 spriteId = ((animID >> 16) & 0xFF) - 1; s32 instanceIdx = spriteInstanceID & 0xFF; s32 animIndex = animID & 0xFF; D_802DF57C = spriteId; if (spr_playerCurrentAnimInfo[instanceIdx].componentList == NULL) { compList = spr_allocate_components(spr_playerMaxComponents); spr_playerCurrentAnimInfo[instanceIdx].componentList = compList; while (*compList != PTR_LIST_END) { component = *compList; component->imgfxIdx = imgfx_get_free_instances(1); compList++; } } spriteData = (u32*)spr_playerSprites[spriteId]; compList = spr_playerCurrentAnimInfo[instanceIdx].componentList; if (spriteData == NULL) { return 0; } rasterList = (SpriteRasterCacheEntry**)*spriteData; spriteData += 4 + animIndex; animList = (SpriteAnimComponent**)*spriteData; spr_set_anim_timescale(timeScale); if ((spriteInstanceID & DRAW_SPRITE_OVERRIDE_ALPHA) || (animID & ~SPRITE_ID_BACK_FACING) != (spr_playerCurrentAnimInfo[instanceIdx].animID & ~SPRITE_ID_BACK_FACING)) { spr_init_anim_state(compList, animList); spr_playerCurrentAnimInfo[instanceIdx].notifyValue = 0; } spr_playerCurrentAnimInfo[instanceIdx].animID = animID; if (!(spriteInstanceID & DRAW_SPRITE_OVERRIDE_YAW)) { spr_playerCurrentAnimInfo[instanceIdx].notifyValue = spr_component_update(spr_playerCurrentAnimInfo[instanceIdx].notifyValue, compList, animList, rasterList, 0); } return spr_playerCurrentAnimInfo[instanceIdx].notifyValue; }
### RAW ASSEMBLY INSTRUCTIONS: glabel parasol_get_npc /* E245D0 802B6000 27BDFFD8 */ addiu $sp, $sp, -0x28 /* E245D4 802B6004 AFB00020 */ sw $s0, 0x20($sp) /* E245D8 802B6008 3C108011 */ lui $s0, %hi(gPlayerStatus) /* E245DC 802B600C 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) /* E245E0 802B6010 AFBF0024 */ sw $ra, 0x24($sp) /* E245E4 802B6014 8E030000 */ lw $v1, 0x0($s0) .L802B6018: /* E245E8 802B6018 04610024 */ bgez $v1, .L802B60AC /* E245EC 802B601C 3C027FFF */ lui $v0, (0x7FFFFFFF >> 16) /* E245F0 802B6020 3442FFFF */ ori $v0, $v0, (0x7FFFFFFF & 0xFFFF) /* E245F4 802B6024 00621024 */ and $v0, $v1, $v0 /* E245F8 802B6028 0C03954C */ jal phys_adjust_cam_on_landing /* E245FC 802B602C AE020000 */ sw $v0, 0x0($s0) /* E24600 802B6030 8E030004 */ lw $v1, 0x4($s0) /* E24604 802B6034 30621000 */ andi $v0, $v1, 0x1000 /* E24608 802B6038 14400009 */ bnez $v0, action_update_sliding /* E2460C 802B603C 30620001 */ andi $v0, $v1, 0x1 .L802B6040: /* E24610 802B6040 14400003 */ bnez $v0, .L802B6050 .L802B6044: /* E24614 802B6044 3C040006 */ lui $a0, (0x60000 >> 16) glabel action_hammer_play_hit_fx /* E24618 802B6048 3C040001 */ lui $a0, (0x10004 >> 16) .L802B604C: /* E2461C 802B604C 34840004 */ ori $a0, $a0, (0x10004 & 0xFFFF) .L802B6050: /* E24620 802B6050 0C037FBF */ jal suggest_player_anim_allow_backward /* E24624 802B6054 00000000 */ nop .L802B6058: /* E24628 802B6058 080AD81A */ j .L802B6068 /* E2462C 802B605C 00000000 */ nop glabel action_update_sliding /* E24630 802B6060 0C0AD866 */ jal func_802B6198 /* E24634 802B6064 00000000 */ nop .L802B6068: /* E24638 802B6068 3C01418E */ lui $at, (0x418E0D84 >> 16) /* E2463C 802B606C 34210D84 */ ori $at, $at, (0x418E0D84 & 0xFFFF) /* E24640 802B6070 44810000 */ mtc1 $at, $f0 .L802B6074: /* E24644 802B6074 3C01C136 */ lui $at, (0xC1362DE0 >> 16) /* E24648 802B6078 34212DE0 */ ori $at, $at, (0xC1362DE0 & 0xFFFF) glabel .L802B607C /* E2464C 802B607C 44811000 */ mtc1 $at, $f2 .L802B6080: /* E24650 802B6080 3C014060 */ lui $at, (0x40600000 >> 16) /* E24654 802B6084 44812000 */ mtc1 $at, $f4 /* E24658 802B6088 3C01BF40 */ lui $at, (0xBF400000 >> 16) .L802B608C: /* E2465C 802B608C 44813000 */ mtc1 $at, $f6 .L802B6090: /* E24660 802B6090 A20000B6 */ sb $zero, 0xB6($s0) .L802B6094: /* E24664 802B6094 A60000C0 */ sh $zero, 0xC0($s0) /* E24668 802B6098 A60000C2 */ sh $zero, 0xC2($s0) glabel action_update_state_23 /* E2466C 802B609C E6000070 */ swc1 $f0, 0x70($s0) /* E24670 802B60A0 E6020074 */ swc1 $f2, 0x74($s0) glabel action_update_use_spinning_flower /* E24674 802B60A4 E6040078 */ swc1 $f4, 0x78($s0) .L802B60A8: /* E24678 802B60A8 E606007C */ swc1 $f6, 0x7C($s0) .L802B60AC: /* E2467C 802B60AC 0C038D12 */ jal integrate_gravity /* E24680 802B60B0 00000000 */ nop glabel action_update_jump /* E24684 802B60B4 C60C0080 */ lwc1 $f12, 0x80($s0) /* E24688 802B60B8 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* E2468C 802B60BC 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* E24690 802B60C0 44810000 */ mtc1 $at, $f0 /* E24694 802B60C4 00000000 */ nop .L802B60C8: /* E24698 802B60C8 46006302 */ mul.s $f12, $f12, $f0 /* E2469C 802B60CC 00000000 */ nop glabel .L802B60D0 /* E246A0 802B60D0 27A50010 */ addiu $a1, $sp, 0x10 .L802B60D4: /* E246A4 802B60D4 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* E246A8 802B60D8 44810000 */ mtc1 $at, $f0 /* E246AC 802B60DC 27A60014 */ addiu $a2, $sp, 0x14 /* E246B0 802B60E0 0C00A82D */ jal sin_cos_rad /* E246B4 802B60E4 46006303 */ div.s $f12, $f12, $f0 .L802B60E8: /* E246B8 802B60E8 C7A00010 */ lwc1 $f0, 0x10($sp) .L802B60EC: /* E246BC 802B60EC 3C014040 */ lui $at, (0x40400000 >> 16) .L802B60F0: /* E246C0 802B60F0 44811000 */ mtc1 $at, $f2 glabel .L802B60F4 /* E246C4 802B60F4 00000000 */ nop /* E246C8 802B60F8 46020002 */ mul.s $f0, $f0, $f2 /* E246CC 802B60FC 00000000 */ nop .L802B6100: /* E246D0 802B6100 C7A40014 */ lwc1 $f4, 0x14($sp) .L802B6104: /* E246D4 802B6104 46022102 */ mul.s $f4, $f4, $f2 .L802B6108: /* E246D8 802B6108 00000000 */ nop glabel .L802B610C /* E246DC 802B610C 2402FFFF */ addiu $v0, $zero, -0x1 .L802B6110: /* E246E0 802B6110 C6020028 */ lwc1 $f2, 0x28($s0) /* E246E4 802B6114 C60C0070 */ lwc1 $f12, 0x70($s0) .L802B6118: /* E246E8 802B6118 46001080 */ add.s $f2, $f2, $f0 /* E246EC 802B611C 44803000 */ mtc1 $zero, $f6 glabel action_update_parasol /* E246F0 802B6120 C6000030 */ lwc1 $f0, 0x30($s0) .L802B6124: /* E246F4 802B6124 4606603C */ c.lt.s $f12, $f6 .L802B6128: /* E246F8 802B6128 46040001 */ sub.s $f0, $f0, $f4 /* E246FC 802B612C AFA20018 */ sw $v0, 0x18($sp) /* E24700 802B6130 E6020028 */ swc1 $f2, 0x28($s0) glabel .L802B6134 /* E24704 802B6134 45000005 */ bc1f .L802B614C /* E24708 802B6138 E6000030 */ swc1 $f0, 0x30($s0) .L802B613C: /* E2470C 802B613C 0C038D45 */ jal player_check_collision_below .L802B6140: /* E24710 802B6140 27A50018 */ addiu $a1, $sp, 0x18 .L802B6144: /* E24714 802B6144 080AD856 */ j .L802B6158 /* E24718 802B6148 E600002C */ swc1 $f0, 0x2C($s0) .L802B614C: /* E2471C 802B614C C600002C */ lwc1 $f0, 0x2C($s0) .L802B6150: /* E24720 802B6150 460C0000 */ add.s $f0, $f0, $f12 .L802B6154: /* E24724 802B6154 E600002C */ swc1 $f0, 0x2C($s0) .L802B6158: /* E24728 802B6158 8FA20018 */ lw $v0, 0x18($sp) .L802B615C: /* E2472C 802B615C 0440000A */ bltz $v0, .L802B6188 /* E24730 802B6160 2402001A */ addiu $v0, $zero, 0x1A .L802B6164: /* E24734 802B6164 820400B5 */ lb $a0, 0xB5($s0) .L802B6168: /* E24738 802B6168 10820005 */ beq $a0, $v0, .L802B6180 /* E2473C 802B616C 00000000 */ nop glabel .L802B6170 /* E24740 802B6170 0C039769 */ jal set_action_state glabel .L802B6174 /* E24744 802B6174 00000000 */ nop /* E24748 802B6178 080AD862 */ j .L802B6188 .L802B617C: /* E2474C 802B617C 00000000 */ nop .L802B6180: /* E24750 802B6180 0C0397DA */ jal update_locomotion_state glabel .L802B6184 /* E24754 802B6184 00000000 */ nop .L802B6188: /* E24758 802B6188 8FBF0024 */ lw $ra, 0x24($sp) .L802B618C: /* E2475C 802B618C 8FB00020 */ lw $s0, 0x20($sp) .L802B6190: /* E24760 802B6190 03E00008 */ jr $ra .L802B6194: /* E24764 802B6194 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void action_update_step_up(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 cosTheta; f32 sinTheta; s32 colliderID; AnimID anim; if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED; phys_adjust_cam_on_landing(); if (!(playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS)) { if (!(playerStatus->animFlags & PA_FLAG_USING_WATT)) { anim = ANIM_Mario1_Walk; } else { anim = ANIM_MarioW1_CarryWalk; } suggest_player_anim_allow_backward(anim); } else { func_802B6198_E24768(); } playerStatus->actionSubstate = 0; playerStatus->timeInAir = 0; playerStatus->peakJumpTime = 0; playerStatus->gravityIntegrator[0] = 17.7566f; playerStatus->gravityIntegrator[1] = -11.3862f; playerStatus->gravityIntegrator[2] = 3.5f; playerStatus->gravityIntegrator[3] = -0.75f; } integrate_gravity(); sin_cos_rad(DEG_TO_RAD(playerStatus->targetYaw), &sinTheta, &cosTheta); colliderID = NO_COLLIDER; playerStatus->position.x += sinTheta * 3.0f; playerStatus->position.z -= cosTheta * 3.0f; if (playerStatus->gravityIntegrator[0] < 0.0f) { playerStatus->position.y = player_check_collision_below(playerStatus->gravityIntegrator[0], &colliderID); } else { playerStatus->position.y += playerStatus->gravityIntegrator[0]; } if (colliderID >= 0) { if (playerStatus->prevActionState != ACTION_STATE_SPIN) { set_action_state(playerStatus->prevActionState); } else { update_locomotion_state(); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel basic_ai_loiter /* 25004 80049C04 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 25008 80049C08 AFB40048 */ sw $s4, 0x48($sp) /* 2500C 80049C0C 0080A02D */ daddu $s4, $a0, $zero /* 25010 80049C10 AFBF004C */ sw $ra, 0x4C($sp) /* 25014 80049C14 AFB30044 */ sw $s3, 0x44($sp) /* 25018 80049C18 AFB20040 */ sw $s2, 0x40($sp) /* 2501C 80049C1C AFB1003C */ sw $s1, 0x3C($sp) /* 25020 80049C20 AFB00038 */ sw $s0, 0x38($sp) /* 25024 80049C24 F7B40050 */ sdc1 $f20, 0x50($sp) /* 25028 80049C28 8E920148 */ lw $s2, 0x148($s4) /* 2502C 80049C2C 00A0982D */ daddu $s3, $a1, $zero /* 25030 80049C30 86440008 */ lh $a0, 0x8($s2) /* 25034 80049C34 0C00EABB */ jal get_npc_unsafe /* 25038 80049C38 00C0882D */ daddu $s1, $a2, $zero /* 2503C 80049C3C 8E630014 */ lw $v1, 0x14($s3) /* 25040 80049C40 0460004F */ bltz $v1, .L80049D80 /* 25044 80049C44 0040802D */ daddu $s0, $v0, $zero /* 25048 80049C48 0220202D */ daddu $a0, $s1, $zero /* 2504C 80049C4C AFA00010 */ sw $zero, 0x10($sp) /* 25050 80049C50 8E660024 */ lw $a2, 0x24($s3) /* 25054 80049C54 8E670028 */ lw $a3, 0x28($s3) /* 25058 80049C58 0C01242D */ jal basic_ai_check_player_dist /* 2505C 80049C5C 0240282D */ daddu $a1, $s2, $zero /* 25060 80049C60 10400047 */ beqz $v0, .L80049D80 /* 25064 80049C64 00000000 */ nop /* 25068 80049C68 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* 2506C 80049C6C 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* 25070 80049C70 C60C0038 */ lwc1 $f12, 0x38($s0) /* 25074 80049C74 C602003C */ lwc1 $f2, 0x3C($s0) /* 25078 80049C78 C6040040 */ lwc1 $f4, 0x40($s0) /* 2507C 80049C7C 46006006 */ mov.s $f0, $f12 /* 25080 80049C80 8C460028 */ lw $a2, 0x28($v0) /* 25084 80049C84 8C470030 */ lw $a3, 0x30($v0) /* 25088 80049C88 46002386 */ mov.s $f14, $f4 /* 2508C 80049C8C E7A00028 */ swc1 $f0, 0x28($sp) /* 25090 80049C90 E7A2002C */ swc1 $f2, 0x2C($sp) /* 25094 80049C94 0C00A720 */ jal atan2 /* 25098 80049C98 E7A40030 */ swc1 $f4, 0x30($sp) /* 2509C 80049C9C C6620018 */ lwc1 $f2, 0x18($s3) /* 250A0 80049CA0 46000506 */ mov.s $f20, $f0 /* 250A4 80049CA4 E7B40014 */ swc1 $f20, 0x14($sp) /* 250A8 80049CA8 E7A20010 */ swc1 $f2, 0x10($sp) /* 250AC 80049CAC 860200A8 */ lh $v0, 0xA8($s0) /* 250B0 80049CB0 27A50028 */ addiu $a1, $sp, 0x28 /* 250B4 80049CB4 44820000 */ mtc1 $v0, $f0 /* 250B8 80049CB8 00000000 */ nop /* 250BC 80049CBC 46800020 */ cvt.s.w $f0, $f0 /* 250C0 80049CC0 E7A00018 */ swc1 $f0, 0x18($sp) /* 250C4 80049CC4 860200A6 */ lh $v0, 0xA6($s0) /* 250C8 80049CC8 27A6002C */ addiu $a2, $sp, 0x2C /* 250CC 80049CCC 44820000 */ mtc1 $v0, $f0 /* 250D0 80049CD0 00000000 */ nop /* 250D4 80049CD4 46800020 */ cvt.s.w $f0, $f0 /* 250D8 80049CD8 E7A0001C */ swc1 $f0, 0x1C($sp) /* 250DC 80049CDC 8E040080 */ lw $a0, 0x80($s0) /* 250E0 80049CE0 0C037711 */ jal npc_test_move_simple_with_slipping /* 250E4 80049CE4 27A70030 */ addiu $a3, $sp, 0x30 /* 250E8 80049CE8 14400025 */ bnez $v0, .L80049D80 /* 250EC 80049CEC 0200202D */ daddu $a0, $s0, $zero /* 250F0 80049CF0 240502F4 */ addiu $a1, $zero, 0x2F4 /* 250F4 80049CF4 3C060020 */ lui $a2, (0x200000 >> 16) /* 250F8 80049CF8 0C012530 */ jal ai_enemy_play_sound /* 250FC 80049CFC E614000C */ swc1 $f20, 0xC($s0) /* 25100 80049D00 0000202D */ daddu $a0, $zero, $zero /* 25104 80049D04 0200282D */ daddu $a1, $s0, $zero /* 25108 80049D08 0000302D */ daddu $a2, $zero, $zero /* 2510C 80049D0C 84A300A8 */ lh $v1, 0xA8($a1) /* 25110 80049D10 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 25114 80049D14 44810000 */ mtc1 $at, $f0 /* 25118 80049D18 3C014000 */ lui $at, (0x40000000 >> 16) /* 2511C 80049D1C 44811000 */ mtc1 $at, $f2 /* 25120 80049D20 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 25124 80049D24 44812000 */ mtc1 $at, $f4 /* 25128 80049D28 2402000F */ addiu $v0, $zero, 0xF /* 2512C 80049D2C AFA2001C */ sw $v0, 0x1C($sp) /* 25130 80049D30 44833000 */ mtc1 $v1, $f6 /* 25134 80049D34 00000000 */ nop /* 25138 80049D38 468031A0 */ cvt.s.w $f6, $f6 /* 2513C 80049D3C 44073000 */ mfc1 $a3, $f6 /* 25140 80049D40 27A20034 */ addiu $v0, $sp, 0x34 /* 25144 80049D44 AFA20020 */ sw $v0, 0x20($sp) /* 25148 80049D48 E7A00010 */ swc1 $f0, 0x10($sp) /* 2514C 80049D4C E7A20014 */ swc1 $f2, 0x14($sp) /* 25150 80049D50 0C01BFA4 */ jal fx_emote /* 25154 80049D54 E7A40018 */ swc1 $f4, 0x18($sp) /* 25158 80049D58 8E420018 */ lw $v0, 0x18($s2) /* 2515C 80049D5C 9442002A */ lhu $v0, 0x2A($v0) /* 25160 80049D60 30420001 */ andi $v0, $v0, 0x1 /* 25164 80049D64 10400003 */ beqz $v0, .L80049D74 /* 25168 80049D68 2402000A */ addiu $v0, $zero, 0xA /* 2516C 80049D6C 08012786 */ j .L80049E18 /* 25170 80049D70 AE820070 */ sw $v0, 0x70($s4) .L80049D74: /* 25174 80049D74 2402000C */ addiu $v0, $zero, 0xC /* 25178 80049D78 08012786 */ j .L80049E18 /* 2517C 80049D7C AE820070 */ sw $v0, 0x70($s4) .L80049D80: /* 25180 80049D80 8602008C */ lh $v0, 0x8C($s0) /* 25184 80049D84 14400024 */ bnez $v0, .L80049E18 /* 25188 80049D88 00000000 */ nop /* 2518C 80049D8C 9602008E */ lhu $v0, 0x8E($s0) /* 25190 80049D90 2442FFFF */ addiu $v0, $v0, -0x1 /* 25194 80049D94 A602008E */ sh $v0, 0x8E($s0) /* 25198 80049D98 00021400 */ sll $v0, $v0, 16 /* 2519C 80049D9C 1C40001E */ bgtz $v0, .L80049E18 /* 251A0 80049DA0 00000000 */ nop /* 251A4 80049DA4 8E820074 */ lw $v0, 0x74($s4) /* 251A8 80049DA8 2442FFFF */ addiu $v0, $v0, -0x1 /* 251AC 80049DAC 10400019 */ beqz $v0, .L80049E14 /* 251B0 80049DB0 AE820074 */ sw $v0, 0x74($s4) /* 251B4 80049DB4 8E420018 */ lw $v0, 0x18($s2) /* 251B8 80049DB8 9442002A */ lhu $v0, 0x2A($v0) /* 251BC 80049DBC 30420010 */ andi $v0, $v0, 0x10 /* 251C0 80049DC0 14400007 */ bnez $v0, .L80049DE0 /* 251C4 80049DC4 00000000 */ nop /* 251C8 80049DC8 C600000C */ lwc1 $f0, 0xC($s0) /* 251CC 80049DCC 3C014334 */ lui $at, (0x43340000 >> 16) /* 251D0 80049DD0 44816000 */ mtc1 $at, $f12 /* 251D4 80049DD4 0C00A6C9 */ jal clamp_angle /* 251D8 80049DD8 460C0300 */ add.s $f12, $f0, $f12 /* 251DC 80049DDC E600000C */ swc1 $f0, 0xC($s0) .L80049DE0: /* 251E0 80049DE0 8E640008 */ lw $a0, 0x8($s3) /* 251E4 80049DE4 000417C2 */ srl $v0, $a0, 31 /* 251E8 80049DE8 00822021 */ addu $a0, $a0, $v0 /* 251EC 80049DEC 00042043 */ sra $a0, $a0, 1 /* 251F0 80049DF0 0C00A67F */ jal rand_int /* 251F4 80049DF4 24840001 */ addiu $a0, $a0, 0x1 /* 251F8 80049DF8 8E630008 */ lw $v1, 0x8($s3) /* 251FC 80049DFC 000327C2 */ srl $a0, $v1, 31 /* 25200 80049E00 00641821 */ addu $v1, $v1, $a0 /* 25204 80049E04 00031843 */ sra $v1, $v1, 1 /* 25208 80049E08 00621821 */ addu $v1, $v1, $v0 /* 2520C 80049E0C 08012786 */ j .L80049E18 /* 25210 80049E10 A603008E */ sh $v1, 0x8E($s0) .L80049E14: /* 25214 80049E14 AE800070 */ sw $zero, 0x70($s4) .L80049E18: /* 25218 80049E18 8FBF004C */ lw $ra, 0x4C($sp) /* 2521C 80049E1C 8FB40048 */ lw $s4, 0x48($sp) /* 25220 80049E20 8FB30044 */ lw $s3, 0x44($sp) /* 25224 80049E24 8FB20040 */ lw $s2, 0x40($sp) /* 25228 80049E28 8FB1003C */ lw $s1, 0x3C($sp) /* 2522C 80049E2C 8FB00038 */ lw $s0, 0x38($sp) /* 25230 80049E30 D7B40050 */ ldc1 $f20, 0x50($sp) /* 25234 80049E34 03E00008 */ jr $ra /* 25238 80049E38 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void basic_ai_loiter_init(Evt* script, MobileAISettings* aiSettings, EnemyDetectVolume* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); npc->duration = (aiSettings->waitTime / 2) + rand_int((aiSettings->waitTime / 2) + 1); npc->yaw = clamp_angle(npc->yaw + rand_int(180) - 90.0f); npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_IDLE]; script->AI_TEMP_STATE = AI_STATE_LOITER; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8003646C /* 1186C 8003646C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 11870 80036470 AFB00010 */ sw $s0, 0x10($sp) /* 11874 80036474 3C10800A */ lui $s0, %hi(gMapTransitionState) /* 11878 80036478 26100944 */ addiu $s0, $s0, %lo(gMapTransitionState) /* 1187C 8003647C 24020002 */ addiu $v0, $zero, 0x2 /* 11880 80036480 AFBF0014 */ sw $ra, 0x14($sp) /* 11884 80036484 86030000 */ lh $v1, 0x0($s0) /* 11888 80036488 96070000 */ lhu $a3, 0x0($s0) /* 1188C 8003648C 1062001A */ beq $v1, $v0, .L800364F8 /* 11890 80036490 28620003 */ slti $v0, $v1, 0x3 /* 11894 80036494 10400005 */ beqz $v0, .L800364AC /* 11898 80036498 24020001 */ addiu $v0, $zero, 0x1 /* 1189C 8003649C 1062000A */ beq $v1, $v0, .L800364C8 /* 118A0 800364A0 00000000 */ nop /* 118A4 800364A4 0800D984 */ j .L80036610 /* 118A8 800364A8 00000000 */ nop .L800364AC: /* 118AC 800364AC 24020003 */ addiu $v0, $zero, 0x3 /* 118B0 800364B0 1062002A */ beq $v1, $v0, .L8003655C /* 118B4 800364B4 24020004 */ addiu $v0, $zero, 0x4 /* 118B8 800364B8 1062003C */ beq $v1, $v0, .L800365AC /* 118BC 800364BC 00000000 */ nop /* 118C0 800364C0 0800D984 */ j .L80036610 /* 118C4 800364C4 00000000 */ nop .L800364C8: /* 118C8 800364C8 3C03800A */ lui $v1, %hi(gOverrideFlags) /* 118CC 800364CC 2463A650 */ addiu $v1, $v1, %lo(gOverrideFlags) /* 118D0 800364D0 8C620000 */ lw $v0, 0x0($v1) /* 118D4 800364D4 34420008 */ ori $v0, $v0, 0x8 /* 118D8 800364D8 0C018028 */ jal nuContRmbForceStop /* 118DC 800364DC AC620000 */ sw $v0, 0x0($v1) /* 118E0 800364E0 96020000 */ lhu $v0, 0x0($s0) /* 118E4 800364E4 24030004 */ addiu $v1, $zero, 0x4 /* 118E8 800364E8 3C01800A */ lui $at, %hi(gMapTransitionStateTime) /* 118EC 800364EC A4230946 */ sh $v1, %lo(gMapTransitionStateTime)($at) /* 118F0 800364F0 0800D955 */ j .L80036554 /* 118F4 800364F4 24420001 */ addiu $v0, $v0, 0x1 .L800364F8: /* 118F8 800364F8 3C04800A */ lui $a0, %hi(gMapTransitionStateTime) /* 118FC 800364FC 24840946 */ addiu $a0, $a0, %lo(gMapTransitionStateTime) /* 11900 80036500 84820000 */ lh $v0, 0x0($a0) /* 11904 80036504 94830000 */ lhu $v1, 0x0($a0) /* 11908 80036508 10400003 */ beqz $v0, .L80036518 /* 1190C 8003650C 2462FFFF */ addiu $v0, $v1, -0x1 /* 11910 80036510 0800D984 */ j .L80036610 /* 11914 80036514 A4820000 */ sh $v0, 0x0($a0) .L80036518: /* 11918 80036518 3C038007 */ lui $v1, %hi(gGameStatusPtr) /* 1191C 8003651C 2463419C */ addiu $v1, $v1, %lo(gGameStatusPtr) /* 11920 80036520 8C620000 */ lw $v0, 0x0($v1) /* 11924 80036524 A0400070 */ sb $zero, 0x70($v0) /* 11928 80036528 8C620000 */ lw $v0, 0x0($v1) /* 1192C 8003652C A0400078 */ sb $zero, 0x78($v0) /* 11930 80036530 8C620000 */ lw $v0, 0x0($v1) /* 11934 80036534 84440086 */ lh $a0, 0x86($v0) /* 11938 80036538 8445008C */ lh $a1, 0x8C($v0) /* 1193C 8003653C 0C0169BD */ jal load_map_by_IDs /* 11940 80036540 0000302D */ daddu $a2, $zero, $zero /* 11944 80036544 0C018030 */ jal nuContRmbForceStopEnd /* 11948 80036548 00000000 */ nop /* 1194C 8003654C 96020000 */ lhu $v0, 0x0($s0) /* 11950 80036550 24420001 */ addiu $v0, $v0, 0x1 .L80036554: /* 11954 80036554 0800D984 */ j .L80036610 /* 11958 80036558 A6020000 */ sh $v0, 0x0($s0) .L8003655C: /* 1195C 8003655C 0C00F949 */ jal update_encounters /* 11960 80036560 00000000 */ nop /* 11964 80036564 0C00E64C */ jal update_npcs /* 11968 80036568 00000000 */ nop /* 1196C 8003656C 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 11970 80036570 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 11974 80036574 0C0B1059 */ jal does_script_exist /* 11978 80036578 8C44006C */ lw $a0, 0x6C($v0) /* 1197C 8003657C 1440002C */ bnez $v0, .L80036630 /* 11980 80036580 00000000 */ nop /* 11984 80036584 3C05800A */ lui $a1, %hi(gOverrideFlags) /* 11988 80036588 24A5A650 */ addiu $a1, $a1, %lo(gOverrideFlags) /* 1198C 8003658C 2404FFF7 */ addiu $a0, $zero, -0x9 /* 11990 80036590 8CA20000 */ lw $v0, 0x0($a1) /* 11994 80036594 96030000 */ lhu $v1, 0x0($s0) /* 11998 80036598 00441024 */ and $v0, $v0, $a0 /* 1199C 8003659C 24630001 */ addiu $v1, $v1, 0x1 /* 119A0 800365A0 ACA20000 */ sw $v0, 0x0($a1) /* 119A4 800365A4 0800D984 */ j .L80036610 /* 119A8 800365A8 A6030000 */ sh $v1, 0x0($s0) .L800365AC: /* 119AC 800365AC 3C06800A */ lui $a2, %hi(gMapTransitionAlpha) /* 119B0 800365B0 24C60940 */ addiu $a2, $a2, %lo(gMapTransitionAlpha) /* 119B4 800365B4 94C20000 */ lhu $v0, 0x0($a2) /* 119B8 800365B8 3C03800A */ lui $v1, %hi(gMapTransitionFadeRate) /* 119BC 800365BC 94630942 */ lhu $v1, %lo(gMapTransitionFadeRate)($v1) /* 119C0 800365C0 00431023 */ subu $v0, $v0, $v1 /* 119C4 800365C4 A4C20000 */ sh $v0, 0x0($a2) /* 119C8 800365C8 00021400 */ sll $v0, $v0, 16 /* 119CC 800365CC 04410008 */ bgez $v0, .L800365F0 /* 119D0 800365D0 240400FF */ addiu $a0, $zero, 0xFF /* 119D4 800365D4 3C05BF80 */ lui $a1, (0xBF800000 >> 16) /* 119D8 800365D8 24E20001 */ addiu $v0, $a3, 0x1 /* 119DC 800365DC A4C00000 */ sh $zero, 0x0($a2) /* 119E0 800365E0 0C04DF62 */ jal set_screen_overlay_params_front /* 119E4 800365E4 A6020000 */ sh $v0, 0x0($s0) /* 119E8 800365E8 0C00CD3C */ jal set_game_mode /* 119EC 800365EC 24040004 */ addiu $a0, $zero, 0x4 .L800365F0: /* 119F0 800365F0 0C00E64C */ jal update_npcs /* 119F4 800365F4 00000000 */ nop /* 119F8 800365F8 0C037DD0 */ jal update_player /* 119FC 800365FC 00000000 */ nop /* 11A00 80036600 0C016754 */ jal update_effects /* 11A04 80036604 00000000 */ nop /* 11A08 80036608 0C00B500 */ jal update_cameras /* 11A0C 8003660C 00000000 */ nop .L80036610: /* 11A10 80036610 3C02800A */ lui $v0, %hi(gMapTransitionAlpha) /* 11A14 80036614 84420940 */ lh $v0, %lo(gMapTransitionAlpha)($v0) /* 11A18 80036618 44820000 */ mtc1 $v0, $f0 /* 11A1C 8003661C 00000000 */ nop /* 11A20 80036620 46800020 */ cvt.s.w $f0, $f0 /* 11A24 80036624 44050000 */ mfc1 $a1, $f0 /* 11A28 80036628 0C04DF62 */ jal set_screen_overlay_params_front /* 11A2C 8003662C 0000202D */ daddu $a0, $zero, $zero .L80036630: /* 11A30 80036630 8FBF0014 */ lw $ra, 0x14($sp) /* 11A34 80036634 8FB00010 */ lw $s0, 0x10($sp) /* 11A38 80036638 03E00008 */ jr $ra /* 11A3C 8003663C 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void func_8003646C(void) { switch (gMapTransitionState) { case 1: gOverrideFlags |= GLOBAL_OVERRIDES_8; nuContRmbForceStop(); gMapTransitionStateTime = 4; gMapTransitionState++; break; case 2: if (gMapTransitionStateTime != 0) { gMapTransitionStateTime--; } else { gGameStatusPtr->isBattle = FALSE; gGameStatusPtr->disableScripts = FALSE; load_map_by_IDs(gGameStatusPtr->areaID, gGameStatusPtr->mapID, 0); nuContRmbForceStopEnd(); gMapTransitionState++; } break; case 3: update_encounters(); update_npcs(); if (!does_script_exist(gGameStatusPtr->mainScriptID)) { gOverrideFlags &= ~GLOBAL_OVERRIDES_8; gMapTransitionState++; break; } return; case 4: gMapTransitionAlpha -= gMapTransitionFadeRate; if (gMapTransitionAlpha < 0) { gMapTransitionAlpha = 0; gMapTransitionState++; set_screen_overlay_params_front(OVERLAY_NONE, -1.0f); set_game_mode(GAME_MODE_CHANGE_MAP); } update_npcs(); update_player(); update_effects(); update_cameras(); break; } set_screen_overlay_params_front(OVERLAY_SCREEN_COLOR, gMapTransitionAlpha); }
### RAW ASSEMBLY INSTRUCTIONS: glabel footprint_appendGfx /* 32F958 E00183D8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 32F95C E00183DC 0080602D */ daddu $t4, $a0, $zero /* 32F960 E00183E0 3C05DB06 */ lui $a1, (0xDB060024 >> 16) /* 32F964 E00183E4 34A50024 */ ori $a1, $a1, (0xDB060024 & 0xFFFF) /* 32F968 E00183E8 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 32F96C E00183EC 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 32F970 E00183F0 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32F974 E00183F4 AFB7001C */ sw $s7, 0x1C($sp) /* 32F978 E00183F8 AFB60018 */ sw $s6, 0x18($sp) /* 32F97C E00183FC AFB50014 */ sw $s5, 0x14($sp) /* 32F980 E0018400 AFB40010 */ sw $s4, 0x10($sp) /* 32F984 E0018404 AFB3000C */ sw $s3, 0xC($sp) /* 32F988 E0018408 AFB20008 */ sw $s2, 0x8($sp) /* 32F98C E001840C AFB10004 */ sw $s1, 0x4($sp) /* 32F990 E0018410 AFB00000 */ sw $s0, 0x0($sp) /* 32F994 E0018414 8CC40000 */ lw $a0, 0x0($a2) /* 32F998 E0018418 8D88000C */ lw $t0, 0xC($t4) /* 32F99C E001841C 0080182D */ daddu $v1, $a0, $zero /* 32F9A0 E0018420 24840008 */ addiu $a0, $a0, 0x8 /* 32F9A4 E0018424 AC620000 */ sw $v0, 0x0($v1) /* 32F9A8 E0018428 AC600004 */ sw $zero, 0x4($v1) /* 32F9AC E001842C AC850000 */ sw $a1, 0x0($a0) /* 32F9B0 E0018430 8D820010 */ lw $v0, 0x10($t4) /* 32F9B4 E0018434 0000482D */ daddu $t1, $zero, $zero /* 32F9B8 E0018438 ACC40000 */ sw $a0, 0x0($a2) /* 32F9BC E001843C 8C42001C */ lw $v0, 0x1C($v0) /* 32F9C0 E0018440 3C038000 */ lui $v1, (0x80000000 >> 16) /* 32F9C4 E0018444 00431021 */ addu $v0, $v0, $v1 /* 32F9C8 E0018448 AC820004 */ sw $v0, 0x4($a0) /* 32F9CC E001844C 8D820008 */ lw $v0, 0x8($t4) /* 32F9D0 E0018450 24840008 */ addiu $a0, $a0, 0x8 /* 32F9D4 E0018454 1840004A */ blez $v0, .LE0018580 /* 32F9D8 E0018458 ACC40000 */ sw $a0, 0x0($a2) /* 32F9DC E001845C 3C0F800A */ lui $t7, %hi(gDisplayContext) /* 32F9E0 E0018460 25EFA674 */ addiu $t7, $t7, %lo(gDisplayContext) /* 32F9E4 E0018464 3C0D8007 */ lui $t5, %hi(gMatrixListPos) /* 32F9E8 E0018468 25AD41F0 */ addiu $t5, $t5, %lo(gMatrixListPos) /* 32F9EC E001846C 3C0B0001 */ lui $t3, (0x11630 >> 16) /* 32F9F0 E0018470 356B1630 */ ori $t3, $t3, (0x11630 & 0xFFFF) /* 32F9F4 E0018474 00C0502D */ daddu $t2, $a2, $zero /* 32F9F8 E0018478 3C13FA00 */ lui $s3, (0xFA000000 >> 16) /* 32F9FC E001847C 3C197060 */ lui $t9, (0x70601800 >> 16) /* 32FA00 E0018480 37391800 */ ori $t9, $t9, (0x70601800 & 0xFFFF) /* 32FA04 E0018484 3C12DA38 */ lui $s2, (0xDA380000 >> 16) /* 32FA08 E0018488 3C11DE00 */ lui $s1, (0xDE000000 >> 16) /* 32FA0C E001848C 3C18D838 */ lui $t8, (0xD8380002 >> 16) /* 32FA10 E0018490 37180002 */ ori $t8, $t8, (0xD8380002 & 0xFFFF) /* 32FA14 E0018494 24100040 */ addiu $s0, $zero, 0x40 /* 32FA18 E0018498 25070070 */ addiu $a3, $t0, 0x70 .LE001849C: /* 32FA1C E001849C 8D020000 */ lw $v0, 0x0($t0) /* 32FA20 E00184A0 50400032 */ beql $v0, $zero, .LE001856C /* 32FA24 E00184A4 25290001 */ addiu $t1, $t1, 0x1 /* 32FA28 E00184A8 3C0E0900 */ lui $t6, %hi(D_09000240_4152A0) /* 32FA2C E00184AC 25CE0240 */ addiu $t6, $t6, %lo(D_09000240_4152A0) /* 32FA30 E00184B0 25040030 */ addiu $a0, $t0, 0x30 /* 32FA34 E00184B4 00E0282D */ daddu $a1, $a3, $zero /* 32FA38 E00184B8 95A20000 */ lhu $v0, 0x0($t5) /* 32FA3C E00184BC 8DE30000 */ lw $v1, 0x0($t7) /* 32FA40 E00184C0 00021180 */ sll $v0, $v0, 6 /* 32FA44 E00184C4 00621821 */ addu $v1, $v1, $v0 /* 32FA48 E00184C8 006B1821 */ addu $v1, $v1, $t3 .LE00184CC: /* 32FA4C E00184CC 8C940000 */ lw $s4, 0x0($a0) /* 32FA50 E00184D0 8C950004 */ lw $s5, 0x4($a0) /* 32FA54 E00184D4 8C960008 */ lw $s6, 0x8($a0) /* 32FA58 E00184D8 8C97000C */ lw $s7, 0xC($a0) /* 32FA5C E00184DC AC740000 */ sw $s4, 0x0($v1) /* 32FA60 E00184E0 AC750004 */ sw $s5, 0x4($v1) /* 32FA64 E00184E4 AC760008 */ sw $s6, 0x8($v1) /* 32FA68 E00184E8 AC77000C */ sw $s7, 0xC($v1) /* 32FA6C E00184EC 24840010 */ addiu $a0, $a0, 0x10 /* 32FA70 E00184F0 1485FFF6 */ bne $a0, $a1, .LE00184CC /* 32FA74 E00184F4 24630010 */ addiu $v1, $v1, 0x10 /* 32FA78 E00184F8 8D440000 */ lw $a0, 0x0($t2) /* 32FA7C E00184FC 0080302D */ daddu $a2, $a0, $zero /* 32FA80 E0018500 24840008 */ addiu $a0, $a0, 0x8 /* 32FA84 E0018504 AD440000 */ sw $a0, 0x0($t2) /* 32FA88 E0018508 ACD30000 */ sw $s3, 0x0($a2) /* 32FA8C E001850C 90E5FF98 */ lbu $a1, -0x68($a3) /* 32FA90 E0018510 95A30000 */ lhu $v1, 0x0($t5) /* 32FA94 E0018514 24820008 */ addiu $v0, $a0, 0x8 /* 32FA98 E0018518 AD420000 */ sw $v0, 0x0($t2) /* 32FA9C E001851C 24620001 */ addiu $v0, $v1, 0x1 /* 32FAA0 E0018520 A5A20000 */ sh $v0, 0x0($t5) /* 32FAA4 E0018524 24820010 */ addiu $v0, $a0, 0x10 /* 32FAA8 E0018528 AD420000 */ sw $v0, 0x0($t2) /* 32FAAC E001852C 24820018 */ addiu $v0, $a0, 0x18 /* 32FAB0 E0018530 00B92825 */ or $a1, $a1, $t9 /* 32FAB4 E0018534 3063FFFF */ andi $v1, $v1, 0xFFFF /* 32FAB8 E0018538 00031980 */ sll $v1, $v1, 6 /* 32FABC E001853C AD420000 */ sw $v0, 0x0($t2) /* 32FAC0 E0018540 ACC50004 */ sw $a1, 0x4($a2) /* 32FAC4 E0018544 AC920000 */ sw $s2, 0x0($a0) /* 32FAC8 E0018548 8DE20000 */ lw $v0, 0x0($t7) /* 32FACC E001854C 006B1821 */ addu $v1, $v1, $t3 /* 32FAD0 E0018550 AC910008 */ sw $s1, 0x8($a0) /* 32FAD4 E0018554 AC8E000C */ sw $t6, 0xC($a0) /* 32FAD8 E0018558 AC980010 */ sw $t8, 0x10($a0) /* 32FADC E001855C AC900014 */ sw $s0, 0x14($a0) /* 32FAE0 E0018560 00431021 */ addu $v0, $v0, $v1 /* 32FAE4 E0018564 AC820004 */ sw $v0, 0x4($a0) /* 32FAE8 E0018568 25290001 */ addiu $t1, $t1, 0x1 .LE001856C: /* 32FAEC E001856C 24E70098 */ addiu $a3, $a3, 0x98 /* 32FAF0 E0018570 8D820008 */ lw $v0, 0x8($t4) /* 32FAF4 E0018574 0122102A */ slt $v0, $t1, $v0 /* 32FAF8 E0018578 1440FFC8 */ bnez $v0, .LE001849C /* 32FAFC E001857C 25080098 */ addiu $t0, $t0, 0x98 .LE0018580: /* 32FB00 E0018580 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 32FB04 E0018584 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 32FB08 E0018588 8C620000 */ lw $v0, 0x0($v1) /* 32FB0C E001858C 0040202D */ daddu $a0, $v0, $zero /* 32FB10 E0018590 24420008 */ addiu $v0, $v0, 0x8 /* 32FB14 E0018594 AC620000 */ sw $v0, 0x0($v1) /* 32FB18 E0018598 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 32FB1C E001859C AC820000 */ sw $v0, 0x0($a0) /* 32FB20 E00185A0 AC800004 */ sw $zero, 0x4($a0) /* 32FB24 E00185A4 8FB7001C */ lw $s7, 0x1C($sp) /* 32FB28 E00185A8 8FB60018 */ lw $s6, 0x18($sp) /* 32FB2C E00185AC 8FB50014 */ lw $s5, 0x14($sp) /* 32FB30 E00185B0 8FB40010 */ lw $s4, 0x10($sp) /* 32FB34 E00185B4 8FB3000C */ lw $s3, 0xC($sp) /* 32FB38 E00185B8 8FB20008 */ lw $s2, 0x8($sp) /* 32FB3C E00185BC 8FB10004 */ lw $s1, 0x4($sp) /* 32FB40 E00185C0 8FB00000 */ lw $s0, 0x0($sp) /* 32FB44 E00185C4 03E00008 */ jr $ra /* 32FB48 E00185C8 27BD0020 */ addiu $sp, $sp, 0x20 /* 32FB4C E00185CC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void footprint_appendGfx(void* effect) { EffectInstance* effectTemp = effect; FootprintFXData* part = effectTemp->data.footprint; s32 i; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(effectTemp->graphics->data)); for (i = 0; i < effectTemp->numParts; i++, part++) { if (part->alive) { Gfx* dlist = D_09000240_32FD90; gDisplayContext->matrixStack[gMatrixListPos] = part->mtx; gDPSetPrimColor(gMainGfxPos++, 0, 0, 112, 96, 24, part->alpha); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_MUL | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, dlist); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } } gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel recover_main /* 3812C0 E0080000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3812C4 E0080004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3812C8 E0080008 4485A000 */ mtc1 $a1, $f20 /* 3812CC E008000C F7B60048 */ sdc1 $f22, 0x48($sp) /* 3812D0 E0080010 4486B000 */ mtc1 $a2, $f22 /* 3812D4 E0080014 AFB30034 */ sw $s3, 0x34($sp) /* 3812D8 E0080018 0080982D */ daddu $s3, $a0, $zero /* 3812DC E008001C F7B80050 */ sdc1 $f24, 0x50($sp) /* 3812E0 E0080020 4487C000 */ mtc1 $a3, $f24 /* 3812E4 E0080024 27A40010 */ addiu $a0, $sp, 0x10 /* 3812E8 E0080028 AFB00028 */ sw $s0, 0x28($sp) /* 3812EC E008002C 8FB00068 */ lw $s0, 0x68($sp) /* 3812F0 E0080030 3C02E008 */ lui $v0, %hi(recover_init) /* 3812F4 E0080034 244201C8 */ addiu $v0, $v0, %lo(recover_init) /* 3812F8 E0080038 AFA20018 */ sw $v0, 0x18($sp) /* 3812FC E008003C 3C02E008 */ lui $v0, %hi(recover_update) /* 381300 E0080040 244201D0 */ addiu $v0, $v0, %lo(recover_update) /* 381304 E0080044 AFA2001C */ sw $v0, 0x1C($sp) /* 381308 E0080048 3C02E008 */ lui $v0, %hi(recover_render) /* 38130C E008004C 24420424 */ addiu $v0, $v0, %lo(recover_render) /* 381310 E0080050 AFA20020 */ sw $v0, 0x20($sp) /* 381314 E0080054 3C02E008 */ lui $v0, %hi(func_E008042C) /* 381318 E0080058 2442042C */ addiu $v0, $v0, %lo(func_E008042C) /* 38131C E008005C AFA20024 */ sw $v0, 0x24($sp) /* 381320 E0080060 24020040 */ addiu $v0, $zero, 0x40 /* 381324 E0080064 AFBF0038 */ sw $ra, 0x38($sp) /* 381328 E0080068 AFB20030 */ sw $s2, 0x30($sp) /* 38132C E008006C AFB1002C */ sw $s1, 0x2C($sp) /* 381330 E0080070 AFA00010 */ sw $zero, 0x10($sp) /* 381334 E0080074 0C080124 */ jal shim_create_effect_instance /* 381338 E0080078 AFA20014 */ sw $v0, 0x14($sp) /* 38133C E008007C 24040090 */ addiu $a0, $zero, 0x90 /* 381340 E0080080 24120002 */ addiu $s2, $zero, 0x2 /* 381344 E0080084 0040882D */ daddu $s1, $v0, $zero /* 381348 E0080088 0C08012C */ jal shim_general_heap_malloc /* 38134C E008008C AE320008 */ sw $s2, 0x8($s1) /* 381350 E0080090 0040182D */ daddu $v1, $v0, $zero /* 381354 E0080094 14600003 */ bnez $v1, .LE00800A4 /* 381358 E0080098 AE23000C */ sw $v1, 0xC($s1) .LE008009C: /* 38135C E008009C 08020027 */ j .LE008009C /* 381360 E00800A0 00000000 */ nop .LE00800A4: /* 381364 E00800A4 2402002E */ addiu $v0, $zero, 0x2E /* 381368 E00800A8 AC730000 */ sw $s3, 0x0($v1) /* 38136C E00800AC E4740004 */ swc1 $f20, 0x4($v1) /* 381370 E00800B0 E4760008 */ swc1 $f22, 0x8($v1) /* 381374 E00800B4 E478000C */ swc1 $f24, 0xC($v1) /* 381378 E00800B8 AC62002C */ sw $v0, 0x2C($v1) /* 38137C E00800BC 06010005 */ bgez $s0, .LE00800D4 /* 381380 E00800C0 AC600030 */ sw $zero, 0x30($v1) /* 381384 E00800C4 24020001 */ addiu $v0, $zero, 0x1 /* 381388 E00800C8 AC620044 */ sw $v0, 0x44($v1) /* 38138C E00800CC 08020036 */ j .LE00800D8 /* 381390 E00800D0 00108023 */ negu $s0, $s0 .LE00800D4: /* 381394 E00800D4 AC600044 */ sw $zero, 0x44($v1) .LE00800D8: /* 381398 E00800D8 AC700040 */ sw $s0, 0x40($v1) /* 38139C E00800DC 24050001 */ addiu $a1, $zero, 0x1 /* 3813A0 E00800E0 00B2102A */ slt $v0, $a1, $s2 /* 3813A4 E00800E4 1040002D */ beqz $v0, .LE008019C /* 3813A8 E00800E8 24630048 */ addiu $v1, $v1, 0x48 /* 3813AC E00800EC 00A0382D */ daddu $a3, $a1, $zero /* 3813B0 E00800F0 3C013FB3 */ lui $at, (0x3FB33333 >> 16) /* 3813B4 E00800F4 34213333 */ ori $at, $at, (0x3FB33333 & 0xFFFF) /* 3813B8 E00800F8 44811000 */ mtc1 $at, $f2 /* 3813BC E00800FC 240600FF */ addiu $a2, $zero, 0xFF /* 3813C0 E0080100 24640028 */ addiu $a0, $v1, 0x28 .LE0080104: /* 3813C4 E0080104 AC80FFDC */ sw $zero, -0x24($a0) /* 3813C8 E0080108 AC80FFE0 */ sw $zero, -0x20($a0) /* 3813CC E008010C AC80FFE4 */ sw $zero, -0x1C($a0) /* 3813D0 E0080110 AC80FFFC */ sw $zero, -0x4($a0) /* 3813D4 E0080114 AC80FFE8 */ sw $zero, -0x18($a0) /* 3813D8 E0080118 AC80FFF0 */ sw $zero, -0x10($a0) /* 3813DC E008011C AC80FFF8 */ sw $zero, -0x8($a0) /* 3813E0 E0080120 14A70007 */ bne $a1, $a3, .LE0080140 /* 3813E4 E0080124 AC80FFF4 */ sw $zero, -0xC($a0) /* 3813E8 E0080128 AC80FFDC */ sw $zero, -0x24($a0) /* 3813EC E008012C AC80000C */ sw $zero, 0xC($a0) /* 3813F0 E0080130 AC800010 */ sw $zero, 0x10($a0) /* 3813F4 E0080134 AC800014 */ sw $zero, 0x14($a0) /* 3813F8 E0080138 08020061 */ j .LE0080184 /* 3813FC E008013C E482FFEC */ swc1 $f2, -0x14($a0) .LE0080140: /* 381400 E0080140 30A30001 */ andi $v1, $a1, 0x1 /* 381404 E0080144 00031840 */ sll $v1, $v1, 1 /* 381408 E0080148 2463FFFF */ addiu $v1, $v1, -0x1 /* 38140C E008014C 24A2FFFF */ addiu $v0, $a1, -0x1 /* 381410 E0080150 00021043 */ sra $v0, $v0, 1 /* 381414 E0080154 00620018 */ mult $v1, $v0 /* 381418 E0080158 24A2000A */ addiu $v0, $a1, 0xA /* 38141C E008015C E482FFEC */ swc1 $f2, -0x14($a0) /* 381420 E0080160 AC82000C */ sw $v0, 0xC($a0) /* 381424 E0080164 AC800010 */ sw $zero, 0x10($a0) /* 381428 E0080168 AC800014 */ sw $zero, 0x14($a0) /* 38142C E008016C 00004012 */ mflo $t0 /* 381430 E0080170 00081080 */ sll $v0, $t0, 2 /* 381434 E0080174 44820000 */ mtc1 $v0, $f0 /* 381438 E0080178 00000000 */ nop /* 38143C E008017C 46800020 */ cvt.s.w $f0, $f0 /* 381440 E0080180 E480FFDC */ swc1 $f0, -0x24($a0) .LE0080184: /* 381444 E0080184 24A50001 */ addiu $a1, $a1, 0x1 /* 381448 E0080188 AC800004 */ sw $zero, 0x4($a0) /* 38144C E008018C AC860000 */ sw $a2, 0x0($a0) /* 381450 E0080190 00B2102A */ slt $v0, $a1, $s2 /* 381454 E0080194 1440FFDB */ bnez $v0, .LE0080104 /* 381458 E0080198 24840048 */ addiu $a0, $a0, 0x48 .LE008019C: /* 38145C E008019C 0220102D */ daddu $v0, $s1, $zero /* 381460 E00801A0 8FBF0038 */ lw $ra, 0x38($sp) /* 381464 E00801A4 8FB30034 */ lw $s3, 0x34($sp) /* 381468 E00801A8 8FB20030 */ lw $s2, 0x30($sp) /* 38146C E00801AC 8FB1002C */ lw $s1, 0x2C($sp) /* 381470 E00801B0 8FB00028 */ lw $s0, 0x28($sp) /* 381474 E00801B4 D7B80050 */ ldc1 $f24, 0x50($sp) /* 381478 E00801B8 D7B60048 */ ldc1 $f22, 0x48($sp) /* 38147C E00801BC D7B40040 */ ldc1 $f20, 0x40($sp) /* 381480 E00801C0 03E00008 */ jr $ra /* 381484 E00801C4 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* recover_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4) { EffectBlueprint bp; EffectInstance* effect; RecoverFXData* part; s32 numParts = 2; s32 i; bp.init = recover_init; bp.update = recover_update; bp.renderWorld = recover_render; bp.renderUI = func_E008042C; bp.unk_00 = 0; bp.effectID = EFFECT_RECOVER; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; part = effect->data.recover = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.recover != NULL); part->unk_00 = arg0; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_2C = 46; part->unk_30 = 0; if (arg4 < 0) { part->unk_44 = 1; arg4 = -arg4; } else { part->unk_44 = 0; } part->unk_40 = arg4; part++; for (i = 1; i < numParts; i++, part++) { part->unk_04 = 0.0f; part->unk_08 = 0; part->unk_0C = 0; part->unk_24 = 0; part->unk_10 = 0; part->unk_18 = 0; part->unk_20 = 0; part->unk_1C = 0; if (i == 1) { part->unk_04 = 0.0f; part->unk_34 = 0; part->unk_38 = 0; part->unk_3C = 0; part->unk_14 = 1.4f; } else { part->unk_14 = 1.4f; part->unk_34 = i + 10; part->unk_38 = 0; part->unk_3C = 0; part->unk_04 = ((i & 1) * 2 - 1) * ((i - 1) >> 1) * 4; } part->unk_2C = 0; part->unk_28 = 255; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802D7690 /* FC040 802D7690 27BDFFA8 */ addiu $sp, $sp, -0x58 /* FC044 802D7694 AFB20020 */ sw $s2, 0x20($sp) /* FC048 802D7698 0080902D */ daddu $s2, $a0, $zero /* FC04C 802D769C AFB1001C */ sw $s1, 0x1C($sp) /* FC050 802D76A0 00A0882D */ daddu $s1, $a1, $zero /* FC054 802D76A4 AFBF0024 */ sw $ra, 0x24($sp) /* FC058 802D76A8 AFB00018 */ sw $s0, 0x18($sp) /* FC05C 802D76AC F7BE0050 */ sdc1 $f30, 0x50($sp) /* FC060 802D76B0 F7BC0048 */ sdc1 $f28, 0x48($sp) /* FC064 802D76B4 F7BA0040 */ sdc1 $f26, 0x40($sp) /* FC068 802D76B8 F7B80038 */ sdc1 $f24, 0x38($sp) /* FC06C 802D76BC F7B60030 */ sdc1 $f22, 0x30($sp) /* FC070 802D76C0 F7B40028 */ sdc1 $f20, 0x28($sp) /* FC074 802D76C4 8E50000C */ lw $s0, 0xC($s2) /* FC078 802D76C8 8E050000 */ lw $a1, 0x0($s0) /* FC07C 802D76CC 0C0B210B */ jal evt_get_float_variable /* FC080 802D76D0 26100004 */ addiu $s0, $s0, 0x4 /* FC084 802D76D4 8E050000 */ lw $a1, 0x0($s0) /* FC088 802D76D8 26100004 */ addiu $s0, $s0, 0x4 /* FC08C 802D76DC 0240202D */ daddu $a0, $s2, $zero /* FC090 802D76E0 0C0B210B */ jal evt_get_float_variable /* FC094 802D76E4 E7A00010 */ swc1 $f0, 0x10($sp) /* FC098 802D76E8 8E050000 */ lw $a1, 0x0($s0) /* FC09C 802D76EC 26100004 */ addiu $s0, $s0, 0x4 /* FC0A0 802D76F0 0240202D */ daddu $a0, $s2, $zero /* FC0A4 802D76F4 0C0B210B */ jal evt_get_float_variable /* FC0A8 802D76F8 46000786 */ mov.s $f30, $f0 /* FC0AC 802D76FC 8E050000 */ lw $a1, 0x0($s0) /* FC0B0 802D7700 26100004 */ addiu $s0, $s0, 0x4 /* FC0B4 802D7704 0240202D */ daddu $a0, $s2, $zero /* FC0B8 802D7708 0C0B210B */ jal evt_get_float_variable /* FC0BC 802D770C E7A00014 */ swc1 $f0, 0x14($sp) /* FC0C0 802D7710 8E050000 */ lw $a1, 0x0($s0) /* FC0C4 802D7714 26100004 */ addiu $s0, $s0, 0x4 /* FC0C8 802D7718 0240202D */ daddu $a0, $s2, $zero /* FC0CC 802D771C 0C0B210B */ jal evt_get_float_variable /* FC0D0 802D7720 46000586 */ mov.s $f22, $f0 /* FC0D4 802D7724 0240202D */ daddu $a0, $s2, $zero /* FC0D8 802D7728 8E050000 */ lw $a1, 0x0($s0) /* FC0DC 802D772C 0C0B1EAF */ jal evt_get_variable /* FC0E0 802D7730 46000706 */ mov.s $f28, $f0 /* FC0E4 802D7734 12200002 */ beqz $s1, .L802D7740 /* FC0E8 802D7738 0040802D */ daddu $s0, $v0, $zero /* FC0EC 802D773C AE400070 */ sw $zero, 0x70($s2) .L802D7740: /* FC0F0 802D7740 0C00A67F */ jal rand_int /* FC0F4 802D7744 2404000A */ addiu $a0, $zero, 0xA /* FC0F8 802D7748 2442FFFB */ addiu $v0, $v0, -0x5 /* FC0FC 802D774C 4482D000 */ mtc1 $v0, $f26 /* FC100 802D7750 00000000 */ nop /* FC104 802D7754 4680D6A0 */ cvt.s.w $f26, $f26 /* FC108 802D7758 0C00A67F */ jal rand_int /* FC10C 802D775C 2404000A */ addiu $a0, $zero, 0xA /* FC110 802D7760 461AD082 */ mul.s $f2, $f26, $f26 /* FC114 802D7764 00000000 */ nop /* FC118 802D7768 2442FFFB */ addiu $v0, $v0, -0x5 /* FC11C 802D776C 4482C000 */ mtc1 $v0, $f24 /* FC120 802D7770 00000000 */ nop /* FC124 802D7774 4680C620 */ cvt.s.w $f24, $f24 /* FC128 802D7778 4618C102 */ mul.s $f4, $f24, $f24 /* FC12C 802D777C 00000000 */ nop /* FC130 802D7780 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* FC134 802D7784 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* FC138 802D7788 4481A000 */ mtc1 $at, $f20 /* FC13C 802D778C 00000000 */ nop /* FC140 802D7790 4614B502 */ mul.s $f20, $f22, $f20 /* FC144 802D7794 00000000 */ nop /* FC148 802D7798 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* FC14C 802D779C 44810000 */ mtc1 $at, $f0 /* FC150 802D77A0 3C01C000 */ lui $at, (0xC0000000 >> 16) /* FC154 802D77A4 4481B000 */ mtc1 $at, $f22 /* FC158 802D77A8 46041080 */ add.s $f2, $f2, $f4 /* FC15C 802D77AC 4600A503 */ div.s $f20, $f20, $f0 /* FC160 802D77B0 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* FC164 802D77B4 44810000 */ mtc1 $at, $f0 /* FC168 802D77B8 4600A306 */ mov.s $f12, $f20 /* FC16C 802D77BC 46001083 */ div.s $f2, $f2, $f0 /* FC170 802D77C0 0C00A85B */ jal sin_rad /* FC174 802D77C4 4602B581 */ sub.s $f22, $f22, $f2 /* FC178 802D77C8 4600A306 */ mov.s $f12, $f20 /* FC17C 802D77CC 0C00A874 */ jal cos_rad /* FC180 802D77D0 46000506 */ mov.s $f20, $f0 /* FC184 802D77D4 461CA502 */ mul.s $f20, $f20, $f28 /* FC188 802D77D8 00000000 */ nop /* FC18C 802D77DC 46000007 */ neg.s $f0, $f0 /* FC190 802D77E0 461C0002 */ mul.s $f0, $f0, $f28 /* FC194 802D77E4 00000000 */ nop /* FC198 802D77E8 C6420070 */ lwc1 $f2, 0x70($s2) /* FC19C 802D77EC 468010A0 */ cvt.s.w $f2, $f2 /* FC1A0 802D77F0 4602A502 */ mul.s $f20, $f20, $f2 /* FC1A4 802D77F4 00000000 */ nop /* FC1A8 802D77F8 46020002 */ mul.s $f0, $f0, $f2 /* FC1AC 802D77FC 00000000 */ nop /* FC1B0 802D7800 3C014178 */ lui $at, (0x41780000 >> 16) /* FC1B4 802D7804 44811000 */ mtc1 $at, $f2 /* FC1B8 802D7808 00000000 */ nop /* FC1BC 802D780C 4602F080 */ add.s $f2, $f30, $f2 /* FC1C0 802D7810 46161080 */ add.s $f2, $f2, $f22 /* FC1C4 802D7814 C7A60010 */ lwc1 $f6, 0x10($sp) /* FC1C8 802D7818 44051000 */ mfc1 $a1, $f2 /* FC1CC 802D781C 44901000 */ mtc1 $s0, $f2 /* FC1D0 802D7820 00000000 */ nop /* FC1D4 802D7824 468010A0 */ cvt.s.w $f2, $f2 /* FC1D8 802D7828 4602A503 */ div.s $f20, $f20, $f2 /* FC1DC 802D782C 46143500 */ add.s $f20, $f6, $f20 /* FC1E0 802D7830 C7A60014 */ lwc1 $f6, 0x14($sp) /* FC1E4 802D7834 46020003 */ div.s $f0, $f0, $f2 /* FC1E8 802D7838 46003000 */ add.s $f0, $f6, $f0 /* FC1EC 802D783C 46180000 */ add.s $f0, $f0, $f24 /* FC1F0 802D7840 461AA500 */ add.s $f20, $f20, $f26 /* FC1F4 802D7844 44060000 */ mfc1 $a2, $f0 /* FC1F8 802D7848 4600A18D */ trunc.w.s $f6, $f20 /* FC1FC 802D784C 44043000 */ mfc1 $a0, $f6 /* FC200 802D7850 0C01BF2C */ jal fx_cloud_trail /* FC204 802D7854 0000382D */ daddu $a3, $zero, $zero /* FC208 802D7858 8E430070 */ lw $v1, 0x70($s2) /* FC20C 802D785C 24630001 */ addiu $v1, $v1, 0x1 /* FC210 802D7860 0070102A */ slt $v0, $v1, $s0 /* FC214 802D7864 38420001 */ xori $v0, $v0, 0x1 /* FC218 802D7868 AE430070 */ sw $v1, 0x70($s2) /* FC21C 802D786C 8FBF0024 */ lw $ra, 0x24($sp) /* FC220 802D7870 8FB20020 */ lw $s2, 0x20($sp) /* FC224 802D7874 8FB1001C */ lw $s1, 0x1C($sp) /* FC228 802D7878 8FB00018 */ lw $s0, 0x18($sp) /* FC22C 802D787C D7BE0050 */ ldc1 $f30, 0x50($sp) /* FC230 802D7880 D7BC0048 */ ldc1 $f28, 0x48($sp) /* FC234 802D7884 D7BA0040 */ ldc1 $f26, 0x40($sp) /* FC238 802D7888 D7B80038 */ ldc1 $f24, 0x38($sp) /* FC23C 802D788C D7B60030 */ ldc1 $f22, 0x30($sp) /* FC240 802D7890 D7B40028 */ ldc1 $f20, 0x28($sp) /* FC244 802D7894 00021040 */ sll $v0, $v0, 1 /* FC248 802D7898 03E00008 */ jr $ra /* FC24C 802D789C 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: ApiStatus func_802D7690(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; f32 posX = evt_get_float_variable(script, *args++); f32 posY = evt_get_float_variable(script, *args++); f32 posZ = evt_get_float_variable(script, *args++); f32 angle = evt_get_float_variable(script, *args++); f32 magnitude = evt_get_float_variable(script, *args++); s32 duration = evt_get_variable(script, *args++); f32 offsetX, offsetY, offsetZ; f32 sinA, cosA; if (isInitialCall) { script->functionTemp[0] = 0; } offsetX = rand_int(10) - 5; offsetZ = rand_int(10) - 5; offsetY = -2.0f - ((SQ(offsetX) + SQ(offsetZ)) / 5.0f); sinA = sin_rad(DEG_TO_RAD(angle)); cosA = cos_rad(DEG_TO_RAD(angle)); fx_cloud_trail( posX + ((sinA * magnitude * script->functionTemp[0]) / duration) + offsetX, posY + 15.5f + offsetY, posZ + ((-cosA * magnitude * script->functionTemp[0]) / duration) + offsetZ, 0.0f ); script->functionTemp[0]++; if (script->functionTemp[0] < duration) { return ApiStatus_BLOCK; } else { return ApiStatus_DONE2; } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802490A8 /* 13C3E8 802490A8 3C038027 */ lui $v1, %hi(gPauseBadgesCurrentPage) /* 13C3EC 802490AC 8C630280 */ lw $v1, %lo(gPauseBadgesCurrentPage)($v1) /* 13C3F0 802490B0 3C098027 */ lui $t1, %hi(gPauseBadgesSelectedIndex) /* 13C3F4 802490B4 8D290378 */ lw $t1, %lo(gPauseBadgesSelectedIndex)($t1) /* 13C3F8 802490B8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 13C3FC 802490BC AFBF001C */ sw $ra, 0x1C($sp) /* 13C400 802490C0 AFB20018 */ sw $s2, 0x18($sp) /* 13C404 802490C4 AFB10014 */ sw $s1, 0x14($sp) /* 13C408 802490C8 AFB00010 */ sw $s0, 0x10($sp) /* 13C40C 802490CC 00031040 */ sll $v0, $v1, 1 /* 13C410 802490D0 00431021 */ addu $v0, $v0, $v1 /* 13C414 802490D4 00021080 */ sll $v0, $v0, 2 /* 13C418 802490D8 3C018027 */ lui $at, %hi(D_8027028A) /* 13C41C 802490DC 00220821 */ addu $at, $at, $v0 /* 13C420 802490E0 9022028A */ lbu $v0, %lo(D_8027028A)($at) /* 13C424 802490E4 3C038027 */ lui $v1, %hi(gPausePressedButtons) /* 13C428 802490E8 8C6300C4 */ lw $v1, %lo(gPausePressedButtons)($v1) /* 13C42C 802490EC 14400002 */ bnez $v0, .L802490F8 /* 13C430 802490F0 0122001A */ div $zero, $t1, $v0 /* 13C434 802490F4 0007000D */ break 7 .L802490F8: /* 13C438 802490F8 2401FFFF */ addiu $at, $zero, -0x1 /* 13C43C 802490FC 14410004 */ bne $v0, $at, .L80249110 /* 13C440 80249100 3C018000 */ lui $at, (0x80000000 >> 16) /* 13C444 80249104 15210002 */ bne $t1, $at, .L80249110 /* 13C448 80249108 00000000 */ nop .L8024910C: /* 13C44C 8024910C 0006000D */ break 6 .L80249110: /* 13C450 80249110 00002812 */ mflo $a1 /* 13C454 80249114 00004010 */ mfhi $t0 /* 13C458 80249118 30628000 */ andi $v0, $v1, 0x8000 /* 13C45C 8024911C 1040003F */ beqz $v0, .L8024921C /* 13C460 80249120 00000000 */ nop /* 13C464 80249124 3C128027 */ lui $s2, (0x80270000 >> 16) ### DECOMPILED C INSTRUCTIONS: void pause_badges_handle_input(MenuPanel* panel) { s32 selectedIndex = gPauseBadgesSelectedIndex; s32 numCols = gPauseBadgesPages[gPauseBadgesCurrentPage].numCols; s32 selectedCol = selectedIndex % numCols; s32 selectedRow = selectedIndex / numCols; if (gPausePressedButtons & BUTTON_A) { s16 badgeID; if (gPauseBadgesShowNotEnoughBP != 0) { gPauseBadgesShowNotEnoughBP = 0; } else if (gPauseBadgesLevel == 0) { if (gPauseBadgesItemIds[selectedIndex] == BADGE_NONE_STANDIN) { sfx_play_sound(SOUND_MENU_ERROR); } else { gPauseBadgesLevel = 1; sfx_play_sound(SOUND_MENU_NEXT); } } else { badgeID = gPauseBadgesItemIds[selectedIndex]; switch (pause_badges_try_equip(badgeID)) { case EQUIP_RESULT_ALREADY_EQUIPPED: sfx_play_sound(SOUND_MENU_BADGE_UNEQUIP); pause_badges_try_remove(badgeID); break; case EQUIP_RESULT_NOT_ENOUGH_BP: sfx_play_sound(SOUND_MENU_ERROR); gPauseBadgesShowNotEnoughBP = 1; break; case EQUIP_RESULT_TOO_MANY_BADGES: sfx_play_sound(SOUND_MENU_ERROR); gPauseBadgesShowNotEnoughBP = 2; break; case EQUIP_RESULT_SUCCESS: sfx_play_sound(SOUND_MENU_BADGE_EQUIP); break; } } return; } if ((gPausePressedButtons != 0) || (gPauseHeldButtons != 0)) { gPauseBadgesShowNotEnoughBP = 0; } if (gPauseBadgesNumItems != 0) { if (gPauseBadgesLevel == 0) { s32 oldTab = gPauseBadgesCurrentTab; if (gPauseHeldButtons & (BUTTON_STICK_UP | BUTTON_STICK_DOWN)) { gPauseBadgesCurrentTab ^= 1; } if (oldTab != gPauseBadgesCurrentTab) { sfx_play_sound(SOUND_MENU_CHANGE_TAB); pause_badges_load_badges(gPauseBadgesCurrentTab); } } else { s32 heldButtons = gPauseHeldButtons; s32 heldButtons2; u8 newPageNumCols; if (heldButtons & (BUTTON_STICK_UP | BUTTON_Z)) { if (heldButtons & BUTTON_STICK_UP) { selectedRow -= 1; if (selectedRow < 0) { selectedRow = 0; } if (selectedRow < gPauseBadgesPages[gPauseBadgesCurrentPage].listStart) { gPauseBadgesCurrentPage -= 1; } } else { // Z button press gPauseBadgesCurrentPage -= 1; if (gPauseBadgesCurrentPage < 0) { gPauseBadgesCurrentPage = 0; } selectedRow = gPauseBadgesPages[gPauseBadgesCurrentPage].listStart; } } // Need to re-read button state here for strange regalloc reasons heldButtons2 = gPauseHeldButtons; if (heldButtons2 & (BUTTON_STICK_DOWN | BUTTON_R)) { if (heldButtons2 & BUTTON_STICK_DOWN) { PauseItemPage* page = &gPauseBadgesPages[gPauseBadgesCurrentPage]; selectedRow += 1; if (selectedRow >= (page->listStart + page->numRows)) { gPauseBadgesCurrentPage += 1; if (!gPauseBadgesPages[gPauseBadgesCurrentPage].enabled) { gPauseBadgesCurrentPage -= 1; selectedRow -= 1; } } } else { // R button press PauseItemPage* newPage; gPauseBadgesCurrentPage++; newPage = &gPauseBadgesPages[gPauseBadgesCurrentPage]; if (!newPage->enabled) { gPauseBadgesCurrentPage -= 1; } else { selectedRow = newPage->listStart; } } } newPageNumCols = gPauseBadgesPages[gPauseBadgesCurrentPage].numCols; if (gPauseBadgesItemIds[selectedRow * newPageNumCols] != BADGE_NONE_STANDIN) { if (gPauseHeldButtons & BUTTON_STICK_LEFT) { selectedCol -= 1; if (selectedCol < 0) { selectedCol = newPageNumCols - 1; } } else if (gPauseHeldButtons & BUTTON_STICK_RIGHT) { selectedCol += 1; if (selectedCol >= newPageNumCols) { selectedCol = 0; } } } else { selectedCol = 0; } gPauseBadgesSelectedIndex = selectedCol + (selectedRow * gPauseBadgesPages[gPauseBadgesCurrentPage].numCols); if (gPauseBadgesSelectedIndex != selectedIndex) { sfx_play_sound(SOUND_MENU_CHANGE_SELECTION); } gPauseBadgesSelectedItem = gPauseBadgesItemIds[gPauseBadgesSelectedIndex]; } } if (gPauseBadgesLevel == 1) { s32 itemID = gPauseBadgesSelectedItem; if (((itemID != BADGE_NONE_STANDIN) && (itemID != BADGE_INVALID) && (itemID != 0))) { gPauseCurrentDescMsg = gItemTable[itemID].fullDescMsg; } else { gPauseCurrentDescMsg = MSG_NONE; gPauseCurrentDescIconScript = NULL; } } else { gPauseCurrentDescMsg = pause_get_menu_msg(gPauseBadgesCurrentTab == 0 ? PAUSE_MSG_BAGDE_DESC_ALL : PAUSE_MSG_BAGDE_DESC_ACTIVE); gPauseCurrentDescIconScript = NULL; } if (gPausePressedButtons & BUTTON_B) { if (gPauseBadgesLevel == 0) { sfx_play_sound(SOUND_MENU_BACK); gPauseMenuCurrentTab = 0; } else { sfx_play_sound(SOUND_MENU_BACK); gPauseBadgesLevel = 0; enforce_hpfp_limits(); if (gPauseBadgesCurrentTab == 1) { pause_badges_load_badges(TRUE); } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel cloud_trail_update /* 32F058 E0016228 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 32F05C E001622C AFB40020 */ sw $s4, 0x20($sp) /* 32F060 E0016230 0080A02D */ daddu $s4, $a0, $zero /* 32F064 E0016234 AFB20018 */ sw $s2, 0x18($sp) /* 32F068 E0016238 0000902D */ daddu $s2, $zero, $zero /* 32F06C E001623C AFB3001C */ sw $s3, 0x1C($sp) /* 32F070 E0016240 AFBF0024 */ sw $ra, 0x24($sp) /* 32F074 E0016244 AFB10014 */ sw $s1, 0x14($sp) /* 32F078 E0016248 AFB00010 */ sw $s0, 0x10($sp) /* 32F07C E001624C F7B60030 */ sdc1 $f22, 0x30($sp) /* 32F080 E0016250 F7B40028 */ sdc1 $f20, 0x28($sp) /* 32F084 E0016254 8E820008 */ lw $v0, 0x8($s4) /* 32F088 E0016258 8E91000C */ lw $s1, 0xC($s4) /* 32F08C E001625C 1840005E */ blez $v0, .LE00163D8 /* 32F090 E0016260 0240982D */ daddu $s3, $s2, $zero /* 32F094 E0016264 26300038 */ addiu $s0, $s1, 0x38 /* 32F098 E0016268 3C01E001 */ lui $at, (0xE0016730 >> 16) /* 32F09C E001626C D4346730 */ ldc1 $f20, (0xE0016730 & 0xFFFF)($at) /* 32F0A0 E0016270 4480B000 */ mtc1 $zero, $f22 .LE0016274: /* 32F0A4 E0016274 8E220000 */ lw $v0, 0x0($s1) /* 32F0A8 E0016278 50400052 */ beql $v0, $zero, .LE00163C4 /* 32F0AC E001627C 26520001 */ addiu $s2, $s2, 0x1 /* 32F0B0 E0016280 9602FFCE */ lhu $v0, -0x32($s0) /* 32F0B4 E0016284 2442FFFF */ addiu $v0, $v0, -0x1 /* 32F0B8 E0016288 A602FFCE */ sh $v0, -0x32($s0) /* 32F0BC E001628C 00021400 */ sll $v0, $v0, 16 /* 32F0C0 E0016290 1C400003 */ bgtz $v0, .LE00162A0 /* 32F0C4 E0016294 00000000 */ nop /* 32F0C8 E0016298 080058F0 */ j .LE00163C0 /* 32F0CC E001629C AE200000 */ sw $zero, 0x0($s1) .LE00162A0: /* 32F0D0 E00162A0 C600FFF8 */ lwc1 $f0, -0x8($s0) /* 32F0D4 E00162A4 3C014140 */ lui $at, (0x41400000 >> 16) /* 32F0D8 E00162A8 44816000 */ mtc1 $at, $f12 /* 32F0DC E00162AC 0C08013C */ jal shim_clamp_angle /* 32F0E0 E00162B0 460C0300 */ add.s $f12, $f0, $f12 /* 32F0E4 E00162B4 46000306 */ mov.s $f12, $f0 /* 32F0E8 E00162B8 0C080140 */ jal shim_sin_deg /* 32F0EC E00162BC E60CFFF8 */ swc1 $f12, -0x8($s0) /* 32F0F0 E00162C0 46000021 */ cvt.d.s $f0, $f0 /* 32F0F4 E00162C4 46340002 */ mul.d $f0, $f0, $f20 /* 32F0F8 E00162C8 00000000 */ nop /* 32F0FC E00162CC C602FFF0 */ lwc1 $f2, -0x10($s0) /* 32F100 E00162D0 460010A1 */ cvt.d.s $f2, $f2 /* 32F104 E00162D4 46201080 */ add.d $f2, $f2, $f0 /* 32F108 E00162D8 C60CFFF8 */ lwc1 $f12, -0x8($s0) /* 32F10C E00162DC 462010A0 */ cvt.s.d $f2, $f2 /* 32F110 E00162E0 0C080144 */ jal shim_cos_deg /* 32F114 E00162E4 E602FFE4 */ swc1 $f2, -0x1C($s0) /* 32F118 E00162E8 46000021 */ cvt.d.s $f0, $f0 /* 32F11C E00162EC 46340002 */ mul.d $f0, $f0, $f20 /* 32F120 E00162F0 00000000 */ nop /* 32F124 E00162F4 C602FFF4 */ lwc1 $f2, -0xC($s0) /* 32F128 E00162F8 460010A1 */ cvt.d.s $f2, $f2 /* 32F12C E00162FC 46201080 */ add.d $f2, $f2, $f0 /* 32F130 E0016300 24130001 */ addiu $s3, $zero, 0x1 /* 32F134 E0016304 9602FFCC */ lhu $v0, -0x34($s0) /* 32F138 E0016308 462010A0 */ cvt.s.d $f2, $f2 /* 32F13C E001630C 1440000B */ bnez $v0, .LE001633C /* 32F140 E0016310 E602FFE8 */ swc1 $f2, -0x18($s0) /* 32F144 E0016314 24030005 */ addiu $v1, $zero, 0x5 /* 32F148 E0016318 8602FFCE */ lh $v0, -0x32($s0) /* 32F14C E001631C 14430007 */ bne $v0, $v1, .LE001633C /* 32F150 E0016320 9604FFCE */ lhu $a0, -0x32($s0) /* 32F154 E0016324 3C028011 */ lui $v0, %hi(gPlayerStatus + 0xB4) /* 32F158 E0016328 8042F07C */ lb $v0, %lo(gPlayerStatus + 0xB4)($v0) /* 32F15C E001632C 14400003 */ bnez $v0, .LE001633C /* 32F160 E0016330 00931021 */ addu $v0, $a0, $s3 /* 32F164 E0016334 080058FA */ j .LE00163E8 /* 32F168 E0016338 A602FFCE */ sh $v0, -0x32($s0) .LE001633C: /* 32F16C E001633C C604FFF4 */ lwc1 $f4, -0xC($s0) /* 32F170 E0016340 3C01E001 */ lui $at, (0xE0016738 >> 16) /* 32F174 E0016344 D4206738 */ ldc1 $f0, (0xE0016738 & 0xFFFF)($at) /* 32F178 E0016348 46002121 */ cvt.d.s $f4, $f4 /* 32F17C E001634C 46202102 */ mul.d $f4, $f4, $f0 /* 32F180 E0016350 00000000 */ nop /* 32F184 E0016354 9202FFD0 */ lbu $v0, -0x30($s0) /* 32F188 E0016358 C6080004 */ lwc1 $f8, 0x4($s0) /* 32F18C E001635C C6020008 */ lwc1 $f2, 0x8($s0) /* 32F190 E0016360 C6060000 */ lwc1 $f6, 0x0($s0) /* 32F194 E0016364 2442FFF1 */ addiu $v0, $v0, -0xF /* 32F198 E0016368 46024200 */ add.s $f8, $f8, $f2 /* 32F19C E001636C C600FFF0 */ lwc1 $f0, -0x10($s0) /* 32F1A0 E0016370 3C01E001 */ lui $at, (0xE0016740 >> 16) /* 32F1A4 E0016374 D4226740 */ ldc1 $f2, (0xE0016740 & 0xFFFF)($at) /* 32F1A8 E0016378 46000021 */ cvt.d.s $f0, $f0 /* 32F1AC E001637C 46220000 */ add.d $f0, $f0, $f2 /* 32F1B0 E0016380 A202FFD0 */ sb $v0, -0x30($s0) /* 32F1B4 E0016384 C602FFD8 */ lwc1 $f2, -0x28($s0) /* 32F1B8 E0016388 46083180 */ add.s $f6, $f6, $f8 /* 32F1BC E001638C E6080004 */ swc1 $f8, 0x4($s0) /* 32F1C0 E0016390 46200020 */ cvt.s.d $f0, $f0 /* 32F1C4 E0016394 E600FFF0 */ swc1 $f0, -0x10($s0) /* 32F1C8 E0016398 46061080 */ add.s $f2, $f2, $f6 /* 32F1CC E001639C E6060000 */ swc1 $f6, 0x0($s0) /* 32F1D0 E00163A0 46003006 */ mov.s $f0, $f6 /* 32F1D4 E00163A4 4616003C */ c.lt.s $f0, $f22 /* 32F1D8 E00163A8 E602FFD8 */ swc1 $f2, -0x28($s0) /* 32F1DC E00163AC 46202120 */ cvt.s.d $f4, $f4 /* 32F1E0 E00163B0 45000003 */ bc1f .LE00163C0 /* 32F1E4 E00163B4 E604FFF4 */ swc1 $f4, -0xC($s0) /* 32F1E8 E00163B8 E6160004 */ swc1 $f22, 0x4($s0) /* 32F1EC E00163BC E6160000 */ swc1 $f22, 0x0($s0) .LE00163C0: /* 32F1F0 E00163C0 26520001 */ addiu $s2, $s2, 0x1 .LE00163C4: /* 32F1F4 E00163C4 26100050 */ addiu $s0, $s0, 0x50 /* 32F1F8 E00163C8 8E820008 */ lw $v0, 0x8($s4) /* 32F1FC E00163CC 0242102A */ slt $v0, $s2, $v0 /* 32F200 E00163D0 1440FFA8 */ bnez $v0, .LE0016274 /* 32F204 E00163D4 26310050 */ addiu $s1, $s1, 0x50 .LE00163D8: /* 32F208 E00163D8 16600003 */ bnez $s3, .LE00163E8 /* 32F20C E00163DC 00000000 */ nop /* 32F210 E00163E0 0C080128 */ jal shim_remove_effect /* 32F214 E00163E4 0280202D */ daddu $a0, $s4, $zero .LE00163E8: /* 32F218 E00163E8 8FBF0024 */ lw $ra, 0x24($sp) /* 32F21C E00163EC 8FB40020 */ lw $s4, 0x20($sp) /* 32F220 E00163F0 8FB3001C */ lw $s3, 0x1C($sp) /* 32F224 E00163F4 8FB20018 */ lw $s2, 0x18($sp) /* 32F228 E00163F8 8FB10014 */ lw $s1, 0x14($sp) /* 32F22C E00163FC 8FB00010 */ lw $s0, 0x10($sp) /* 32F230 E0016400 D7B60030 */ ldc1 $f22, 0x30($sp) /* 32F234 E0016404 D7B40028 */ ldc1 $f20, 0x28($sp) /* 32F238 E0016408 03E00008 */ jr $ra /* 32F23C E001640C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void cloud_trail_update(EffectInstance* effect) { CloudTrailFXData* part = effect->data.cloudTrail; s32 cond = FALSE; s32 i; for (i = 0; i < effect->numParts; i++, part++) { if (part->alive) { part->lifetime--; if (part->lifetime <= 0) { part->alive = FALSE; } else { cond = TRUE; part->unk_30 = shim_clamp_angle(part->unk_30 + 12.0f); part->unk_1C = part->unk_28 + shim_sin_deg(part->unk_30) * 0.1; part->unk_20 = part->unk_2C + shim_cos_deg(part->unk_30) * 0.1; if (part->unk_04 == 0 && (part->lifetime == 5 && gPlayerStatus.actionState == ACTION_STATE_IDLE)) { part->lifetime++; return; } part->alpha -= 15; part->unk_3C += part->unk_40; part->unk_38 += part->unk_3C; part->unk_10 += part->unk_38; part->unk_28 += 0.14; part->unk_2C *= 0.94; if (part->unk_38 < 0.0f) { part->unk_3C = 0.0f; part->unk_38 = 0.0f; } } } } if (!cond) { shim_remove_effect(effect); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel ResetActorSounds /* 19E118 8026F838 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 19E11C 8026F83C AFB20018 */ sw $s2, 0x18($sp) /* 19E120 8026F840 0080902D */ daddu $s2, $a0, $zero /* 19E124 8026F844 AFBF0020 */ sw $ra, 0x20($sp) /* 19E128 8026F848 AFB3001C */ sw $s3, 0x1C($sp) /* 19E12C 8026F84C AFB10014 */ sw $s1, 0x14($sp) /* 19E130 8026F850 AFB00010 */ sw $s0, 0x10($sp) /* 19E134 8026F854 8E50000C */ lw $s0, 0xC($s2) /* 19E138 8026F858 8E050000 */ lw $a1, 0x0($s0) /* 19E13C 8026F85C 0C0B1EAF */ jal evt_get_variable /* 19E140 8026F860 26100004 */ addiu $s0, $s0, 0x4 /* 19E144 8026F864 0040882D */ daddu $s1, $v0, $zero /* 19E148 8026F868 2402FF81 */ addiu $v0, $zero, -0x7F /* 19E14C 8026F86C 16220002 */ bne $s1, $v0, .L8026F878 /* 19E150 8026F870 00000000 */ nop /* 19E154 8026F874 8E510148 */ lw $s1, 0x148($s2) .L8026F878: /* 19E158 8026F878 8E050000 */ lw $a1, 0x0($s0) /* 19E15C 8026F87C 26100004 */ addiu $s0, $s0, 0x4 /* 19E160 8026F880 0C0B1EAF */ jal evt_get_variable /* 19E164 8026F884 0240202D */ daddu $a0, $s2, $zero /* 19E168 8026F888 8E050000 */ lw $a1, 0x0($s0) /* 19E16C 8026F88C 26100004 */ addiu $s0, $s0, 0x4 /* 19E170 8026F890 0240202D */ daddu $a0, $s2, $zero /* 19E174 8026F894 0C0B1EAF */ jal evt_get_variable /* 19E178 8026F898 0040982D */ daddu $s3, $v0, $zero /* 19E17C 8026F89C 8E050000 */ lw $a1, 0x0($s0) /* 19E180 8026F8A0 0C0B1EAF */ jal evt_get_variable /* 19E184 8026F8A4 0240202D */ daddu $a0, $s2, $zero /* 19E188 8026F8A8 0C09A75B */ jal get_actor /* 19E18C 8026F8AC 0220202D */ daddu $a0, $s1, $zero /* 19E190 8026F8B0 0040202D */ daddu $a0, $v0, $zero /* 19E194 8026F8B4 2E620006 */ sltiu $v0, $s3, 0x6 /* 19E198 8026F8B8 10400049 */ beqz $v0, D_8026F9E0 /* 19E19C 8026F8BC 00131080 */ sll $v0, $s3, 2 /* 19E1A0 8026F8C0 3C01802A */ lui $at, %hi(jtbl_8029D7D8) /* 19E1A4 8026F8C4 00220821 */ addu $at, $at, $v0 /* 19E1A8 8026F8C8 8C22D7D8 */ lw $v0, %lo(jtbl_8029D7D8)($at) /* 19E1AC 8026F8CC 00400008 */ jr $v0 /* 19E1B0 8026F8D0 00000000 */ nop gPauseDLLabels: /* 19E1B4 8026F8D4 90830136 */ lbu $v1, 0x136($a0) /* 19E1B8 8026F8D8 000310C0 */ sll $v0, $v1, 3 /* 19E1BC 8026F8DC 00431023 */ subu $v0, $v0, $v1 /* 19E1C0 8026F8E0 00021080 */ sll $v0, $v0, 2 /* 19E1C4 8026F8E4 3C018028 */ lui $at, %hi(bActorSoundTable) /* 19E1C8 8026F8E8 00220821 */ addu $at, $at, $v0 /* 19E1CC 8026F8EC 8C221468 */ lw $v0, %lo(bActorSoundTable)($at) /* 19E1D0 8026F8F0 AC82019C */ sw $v0, 0x19C($a0) /* 19E1D4 8026F8F4 000310C0 */ sll $v0, $v1, 3 /* 19E1D8 8026F8F8 00431023 */ subu $v0, $v0, $v1 /* 19E1DC 8026F8FC 00021080 */ sll $v0, $v0, 2 gPauseWS_0: /* 19E1E0 8026F900 3C018028 */ lui $at, %hi(bActorSoundTable + 0x4) /* 19E1E4 8026F904 00220821 */ addu $at, $at, $v0 /* 19E1E8 8026F908 8C22146C */ lw $v0, %lo(bActorSoundTable + 0x4)($at) /* 19E1EC 8026F90C 0809BE78 */ j D_8026F9E0 /* 19E1F0 8026F910 AC8201A0 */ sw $v0, 0x1A0($a0) glabel .L8026F914 /* 19E1F4 8026F914 90830136 */ lbu $v1, 0x136($a0) /* 19E1F8 8026F918 000310C0 */ sll $v0, $v1, 3 /* 19E1FC 8026F91C 00431023 */ subu $v0, $v0, $v1 /* 19E200 8026F920 00021080 */ sll $v0, $v0, 2 /* 19E204 8026F924 3C018028 */ lui $at, %hi(bActorSoundTable + 0x8) /* 19E208 8026F928 00220821 */ addu $at, $at, $v0 /* 19E20C 8026F92C 8C221470 */ lw $v0, %lo(bActorSoundTable + 0x8)($at) /* 19E210 8026F930 AC8201A4 */ sw $v0, 0x1A4($a0) /* 19E214 8026F934 000310C0 */ sll $v0, $v1, 3 gPauseWS_1: /* 19E218 8026F938 00431023 */ subu $v0, $v0, $v1 /* 19E21C 8026F93C 00021080 */ sll $v0, $v0, 2 /* 19E220 8026F940 3C018028 */ lui $at, %hi(bActorSoundTable + 0xC) /* 19E224 8026F944 00220821 */ addu $at, $at, $v0 /* 19E228 8026F948 8C221474 */ lw $v0, %lo(bActorSoundTable + 0xC)($at) /* 19E22C 8026F94C 0809BE78 */ j D_8026F9E0 /* 19E230 8026F950 AC8201A8 */ sw $v0, 0x1A8($a0) glabel .L8026F954 /* 19E234 8026F954 90820136 */ lbu $v0, 0x136($a0) /* 19E238 8026F958 000218C0 */ sll $v1, $v0, 3 /* 19E23C 8026F95C 00621823 */ subu $v1, $v1, $v0 /* 19E240 8026F960 00031880 */ sll $v1, $v1, 2 /* 19E244 8026F964 3C028028 */ lui $v0, %hi(bActorSoundTable + 0x10) /* 19E248 8026F968 00431021 */ addu $v0, $v0, $v1 /* 19E24C 8026F96C 8C421478 */ lw $v0, %lo(bActorSoundTable + 0x10)($v0) gPauseWS_2: /* 19E250 8026F970 0809BE78 */ j D_8026F9E0 /* 19E254 8026F974 AC8201AC */ sw $v0, 0x1AC($a0) glabel .L8026F978 /* 19E258 8026F978 90820136 */ lbu $v0, 0x136($a0) /* 19E25C 8026F97C 000218C0 */ sll $v1, $v0, 3 /* 19E260 8026F980 00621823 */ subu $v1, $v1, $v0 /* 19E264 8026F984 00031880 */ sll $v1, $v1, 2 /* 19E268 8026F988 3C028028 */ lui $v0, %hi(bActorSoundTable + 0x14) /* 19E26C 8026F98C 00431021 */ addu $v0, $v0, $v1 /* 19E270 8026F990 8C42147C */ lw $v0, %lo(bActorSoundTable + 0x14)($v0) /* 19E274 8026F994 0809BE78 */ j D_8026F9E0 /* 19E278 8026F998 AC8201B0 */ sw $v0, 0x1B0($a0) glabel .L8026F99C /* 19E27C 8026F99C 90820136 */ lbu $v0, 0x136($a0) /* 19E280 8026F9A0 000218C0 */ sll $v1, $v0, 3 /* 19E284 8026F9A4 00621823 */ subu $v1, $v1, $v0 gPauseWS_3: /* 19E288 8026F9A8 00031880 */ sll $v1, $v1, 2 /* 19E28C 8026F9AC 3C028028 */ lui $v0, %hi(bActorSoundTable + 0x18) /* 19E290 8026F9B0 00431021 */ addu $v0, $v0, $v1 /* 19E294 8026F9B4 94421480 */ lhu $v0, %lo(bActorSoundTable + 0x18)($v0) /* 19E298 8026F9B8 0809BE78 */ j D_8026F9E0 /* 19E29C 8026F9BC A48201B4 */ sh $v0, 0x1B4($a0) glabel .L8026F9C0 /* 19E2A0 8026F9C0 90820136 */ lbu $v0, 0x136($a0) /* 19E2A4 8026F9C4 000218C0 */ sll $v1, $v0, 3 /* 19E2A8 8026F9C8 00621823 */ subu $v1, $v1, $v0 /* 19E2AC 8026F9CC 00031880 */ sll $v1, $v1, 2 /* 19E2B0 8026F9D0 3C028028 */ lui $v0, %hi(bActorSoundTable + 0x1A) /* 19E2B4 8026F9D4 00431021 */ addu $v0, $v0, $v1 /* 19E2B8 8026F9D8 94421482 */ lhu $v0, %lo(bActorSoundTable + 0x1A)($v0) /* 19E2BC 8026F9DC A48201B6 */ sh $v0, 0x1B6($a0) D_8026F9E0: /* 19E2C0 8026F9E0 8FBF0020 */ lw $ra, 0x20($sp) /* 19E2C4 8026F9E4 8FB3001C */ lw $s3, 0x1C($sp) /* 19E2C8 8026F9E8 8FB20018 */ lw $s2, 0x18($sp) /* 19E2CC 8026F9EC 8FB10014 */ lw $s1, 0x14($sp) D_8026F9F0: /* 19E2D0 8026F9F0 8FB00010 */ lw $s0, 0x10($sp) /* 19E2D4 8026F9F4 24020002 */ addiu $v0, $zero, 0x2 /* 19E2D8 8026F9F8 03E00008 */ jr $ra /* 19E2DC 8026F9FC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus ResetActorSounds(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 actorID = evt_get_variable(script, *args++); Actor* actor; s32 temp_s3; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } temp_s3 = evt_get_variable(script, *args++); evt_get_variable(script, *args++); evt_get_variable(script, *args++); actor = get_actor(actorID); switch (temp_s3) { case 0: actor->actorTypeData1[0] = bActorSoundTable[actor->actorType].walk[0]; actor->actorTypeData1[1] = bActorSoundTable[actor->actorType].walk[1]; break; case 1: actor->actorTypeData1[2] = bActorSoundTable[actor->actorType].fly[0]; actor->actorTypeData1[3] = bActorSoundTable[actor->actorType].fly[1]; break; case 2: actor->actorTypeData1[4] = bActorSoundTable[actor->actorType].jump; break; case 3: actor->actorTypeData1[5] = bActorSoundTable[actor->actorType].hurt; break; case 4: actor->actorTypeData1b[0] = bActorSoundTable[actor->actorType].delay[0]; break; case 5: actor->actorTypeData1b[1] = bActorSoundTable[actor->actorType].delay[1]; break; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel set_screen_overlay_center_worldpos /* CE5C0 80137EC0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* CE5C4 80137EC4 AFB1003C */ sw $s1, 0x3C($sp) /* CE5C8 80137EC8 0080882D */ daddu $s1, $a0, $zero /* CE5CC 80137ECC AFB20040 */ sw $s2, 0x40($sp) /* CE5D0 80137ED0 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* CE5D4 80137ED4 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* CE5D8 80137ED8 3C04800B */ lui $a0, %hi(gCameras) /* CE5DC 80137EDC 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* CE5E0 80137EE0 AFBF0044 */ sw $ra, 0x44($sp) /* CE5E4 80137EE4 AFB00038 */ sw $s0, 0x38($sp) /* CE5E8 80137EE8 F7B40048 */ sdc1 $f20, 0x48($sp) /* CE5EC 80137EEC 00031080 */ sll $v0, $v1, 2 /* CE5F0 80137EF0 00431021 */ addu $v0, $v0, $v1 /* CE5F4 80137EF4 00021080 */ sll $v0, $v0, 2 /* CE5F8 80137EF8 00431023 */ subu $v0, $v0, $v1 /* CE5FC 80137EFC 000218C0 */ sll $v1, $v0, 3 /* CE600 80137F00 00431021 */ addu $v0, $v0, $v1 /* CE604 80137F04 000210C0 */ sll $v0, $v0, 3 /* CE608 80137F08 00448021 */ addu $s0, $v0, $a0 /* CE60C 80137F0C 2A220002 */ slti $v0, $s1, 0x2 /* CE610 80137F10 10400069 */ beqz $v0, .L801380B8 /* CE614 80137F14 00A0902D */ daddu $s2, $a1, $zero /* CE618 80137F18 06200067 */ bltz $s1, .L801380B8 /* CE61C 80137F1C 27A20028 */ addiu $v0, $sp, 0x28 /* CE620 80137F20 AFA20014 */ sw $v0, 0x14($sp) /* CE624 80137F24 27A2002C */ addiu $v0, $sp, 0x2C /* CE628 80137F28 AFA20018 */ sw $v0, 0x18($sp) /* CE62C 80137F2C 27A20030 */ addiu $v0, $sp, 0x30 /* CE630 80137F30 AFA2001C */ sw $v0, 0x1C($sp) /* CE634 80137F34 27A20034 */ addiu $v0, $sp, 0x34 /* CE638 80137F38 44866000 */ mtc1 $a2, $f12 /* CE63C 80137F3C 00000000 */ nop /* CE640 80137F40 46806320 */ cvt.s.w $f12, $f12 /* CE644 80137F44 44056000 */ mfc1 $a1, $f12 /* CE648 80137F48 44876000 */ mtc1 $a3, $f12 /* CE64C 80137F4C 00000000 */ nop /* CE650 80137F50 46806320 */ cvt.s.w $f12, $f12 /* CE654 80137F54 44066000 */ mfc1 $a2, $f12 /* CE658 80137F58 C7AC0060 */ lwc1 $f12, 0x60($sp) /* CE65C 80137F5C 46806320 */ cvt.s.w $f12, $f12 /* CE660 80137F60 3C013F80 */ lui $at, (0x3F800000 >> 16) /* CE664 80137F64 4481A000 */ mtc1 $at, $f20 /* CE668 80137F68 44076000 */ mfc1 $a3, $f12 /* CE66C 80137F6C 260400D4 */ addiu $a0, $s0, 0xD4 /* CE670 80137F70 AFA20020 */ sw $v0, 0x20($sp) /* CE674 80137F74 0C00A588 */ jal transform_point /* CE678 80137F78 E7B40010 */ swc1 $f20, 0x10($sp) /* CE67C 80137F7C C7A00034 */ lwc1 $f0, 0x34($sp) /* CE680 80137F80 C7AA0028 */ lwc1 $f10, 0x28($sp) /* CE684 80137F84 4600A503 */ div.s $f20, $f20, $f0 /* CE688 80137F88 46145282 */ mul.s $f10, $f10, $f20 /* CE68C 80137F8C 00000000 */ nop /* CE690 80137F90 8602000A */ lh $v0, 0xA($s0) /* CE694 80137F94 44820000 */ mtc1 $v0, $f0 /* CE698 80137F98 00000000 */ nop /* CE69C 80137F9C 46800020 */ cvt.s.w $f0, $f0 /* CE6A0 80137FA0 46005102 */ mul.s $f4, $f10, $f0 /* CE6A4 80137FA4 00000000 */ nop /* CE6A8 80137FA8 46002100 */ add.s $f4, $f4, $f0 /* CE6AC 80137FAC 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* CE6B0 80137FB0 44813800 */ mtc1 $at, $f7 /* CE6B4 80137FB4 44803000 */ mtc1 $zero, $f6 /* CE6B8 80137FB8 46002121 */ cvt.d.s $f4, $f4 /* CE6BC 80137FBC 46262102 */ mul.d $f4, $f4, $f6 /* CE6C0 80137FC0 00000000 */ nop /* CE6C4 80137FC4 C7A8002C */ lwc1 $f8, 0x2C($sp) /* CE6C8 80137FC8 4600A007 */ neg.s $f0, $f20 /* CE6CC 80137FCC 46004202 */ mul.s $f8, $f8, $f0 /* CE6D0 80137FD0 00000000 */ nop /* CE6D4 80137FD4 8602000C */ lh $v0, 0xC($s0) /* CE6D8 80137FD8 44820000 */ mtc1 $v0, $f0 /* CE6DC 80137FDC 00000000 */ nop /* CE6E0 80137FE0 46800020 */ cvt.s.w $f0, $f0 /* CE6E4 80137FE4 46004082 */ mul.s $f2, $f8, $f0 /* CE6E8 80137FE8 00000000 */ nop /* CE6EC 80137FEC 46001080 */ add.s $f2, $f2, $f0 /* CE6F0 80137FF0 460010A1 */ cvt.d.s $f2, $f2 /* CE6F4 80137FF4 46261082 */ mul.d $f2, $f2, $f6 /* CE6F8 80137FF8 00000000 */ nop /* CE6FC 80137FFC E7B40034 */ swc1 $f20, 0x34($sp) /* CE700 80138000 C7A60030 */ lwc1 $f6, 0x30($sp) /* CE704 80138004 8602000E */ lh $v0, 0xE($s0) /* CE708 80138008 46143182 */ mul.s $f6, $f6, $f20 /* CE70C 8013800C 00000000 */ nop /* CE710 80138010 E7AA0028 */ swc1 $f10, 0x28($sp) /* CE714 80138014 E7A8002C */ swc1 $f8, 0x2C($sp) /* CE718 80138018 44820000 */ mtc1 $v0, $f0 /* CE71C 8013801C 00000000 */ nop /* CE720 80138020 46800021 */ cvt.d.w $f0, $f0 /* CE724 80138024 86020010 */ lh $v0, 0x10($s0) /* CE728 80138028 46202100 */ add.d $f4, $f4, $f0 /* CE72C 8013802C 44820000 */ mtc1 $v0, $f0 /* CE730 80138030 00000000 */ nop /* CE734 80138034 46800021 */ cvt.d.w $f0, $f0 /* CE738 80138038 46202120 */ cvt.s.d $f4, $f4 /* CE73C 8013803C 46201080 */ add.d $f2, $f2, $f0 /* CE740 80138040 E7A40028 */ swc1 $f4, 0x28($sp) /* CE744 80138044 E7A60030 */ swc1 $f6, 0x30($sp) /* CE748 80138048 462010A0 */ cvt.s.d $f2, $f2 /* CE74C 8013804C 12400006 */ beqz $s2, .L80138068 /* CE750 80138050 E7A2002C */ swc1 $f2, 0x2C($sp) /* CE754 80138054 24020001 */ addiu $v0, $zero, 0x1 /* CE758 80138058 1242000E */ beq $s2, $v0, .L80138094 /* CE75C 8013805C 00111040 */ sll $v0, $s1, 1 /* CE760 80138060 0804E02E */ j .L801380B8 /* CE764 80138064 00000000 */ nop .L80138068: /* CE768 80138068 3C038016 */ lui $v1, %hi(ScreenOverlays) /* CE76C 8013806C 2463C790 */ addiu $v1, $v1, %lo(ScreenOverlays) /* CE770 80138070 00111040 */ sll $v0, $s1, 1 /* CE774 80138074 00511021 */ addu $v0, $v0, $s1 /* CE778 80138078 000210C0 */ sll $v0, $v0, 3 /* CE77C 8013807C 00431021 */ addu $v0, $v0, $v1 /* CE780 80138080 4600230D */ trunc.w.s $f12, $f4 /* CE784 80138084 E44C0004 */ swc1 $f12, 0x4($v0) /* CE788 80138088 4600130D */ trunc.w.s $f12, $f2 /* CE78C 8013808C 0804E02E */ j .L801380B8 /* CE790 80138090 E44C0008 */ swc1 $f12, 0x8($v0) .L80138094: /* CE794 80138094 3C038016 */ lui $v1, %hi(ScreenOverlays) /* CE798 80138098 2463C790 */ addiu $v1, $v1, %lo(ScreenOverlays) /* CE79C 8013809C 00511021 */ addu $v0, $v0, $s1 /* CE7A0 801380A0 000210C0 */ sll $v0, $v0, 3 /* CE7A4 801380A4 00431021 */ addu $v0, $v0, $v1 /* CE7A8 801380A8 4600230D */ trunc.w.s $f12, $f4 /* CE7AC 801380AC E44C000C */ swc1 $f12, 0xC($v0) /* CE7B0 801380B0 4600130D */ trunc.w.s $f12, $f2 /* CE7B4 801380B4 E44C0010 */ swc1 $f12, 0x10($v0) .L801380B8: /* CE7B8 801380B8 8FBF0044 */ lw $ra, 0x44($sp) /* CE7BC 801380BC 8FB20040 */ lw $s2, 0x40($sp) /* CE7C0 801380C0 8FB1003C */ lw $s1, 0x3C($sp) /* CE7C4 801380C4 8FB00038 */ lw $s0, 0x38($sp) /* CE7C8 801380C8 D7B40048 */ ldc1 $f20, 0x48($sp) /* CE7CC 801380CC 03E00008 */ jr $ra /* CE7D0 801380D0 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void set_screen_overlay_center_worldpos(s32 layer, s32 posIdx, s32 worldPosX, s32 worldPosY, s32 worldPosZ) { Camera* camera = &gCameras[gCurrentCameraID]; f32 tx, ty, tz, tw; switch (layer) { case SCREEN_LAYER_FRONT: case SCREEN_LAYER_BACK: transform_point(camera->perspectiveMatrix, worldPosX, worldPosY, worldPosZ, 1.0f, &tx, &ty, &tz, &tw); tw = 1.0f / tw; tx *= tw; ty *= -tw; tz *= tw; tx = (((tx * camera->viewportW) + camera->viewportW) * 0.5) + camera->viewportStartX; ty = (((ty * camera->viewportH) + camera->viewportH) * 0.5) + camera->viewportStartY; switch (posIdx) { case 0: ScreenOverlays[layer].screenPos[0][0] = tx; ScreenOverlays[layer].screenPos[0][1] = ty; break; case 1: ScreenOverlays[layer].screenPos[1][0] = tx; ScreenOverlays[layer].screenPos[1][1] = ty; break; } break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel nuAuDmaCallBack /* 26474 8004B074 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 26478 8004B078 AFB3001C */ sw $s3, 0x1C($sp) /* 2647C 8004B07C 0080982D */ daddu $s3, $a0, $zero /* 26480 8004B080 30E700FF */ andi $a3, $a3, 0xFF /* 26484 8004B084 AFBF0020 */ sw $ra, 0x20($sp) /* 26488 8004B088 AFB20018 */ sw $s2, 0x18($sp) /* 2648C 8004B08C AFB10014 */ sw $s1, 0x14($sp) /* 26490 8004B090 14E00005 */ bnez $a3, .L8004B0A8 /* 26494 8004B094 AFB00010 */ sw $s0, 0x10($sp) /* 26498 8004B098 0C0187A4 */ jal osVirtualToPhysical /* 2649C 8004B09C 00000000 */ nop /* 264A0 8004B0A0 08012C82 */ j .L8004B208 /* 264A4 8004B0A4 00000000 */ nop .L8004B0A8: /* 264A8 8004B0A8 0000802D */ daddu $s0, $zero, $zero /* 264AC 8004B0AC 3C11800A */ lui $s1, %hi(D_800A3BD4) /* 264B0 8004B0B0 8E313BD4 */ lw $s1, %lo(D_800A3BD4)($s1) /* 264B4 8004B0B4 1220000B */ beqz $s1, .L8004B0E4 /* 264B8 8004B0B8 02652821 */ addu $a1, $s3, $a1 .L8004B0BC: /* 264BC 8004B0BC 8E220008 */ lw $v0, 0x8($s1) /* 264C0 8004B0C0 24430500 */ addiu $v1, $v0, 0x500 /* 264C4 8004B0C4 0262102B */ sltu $v0, $s3, $v0 /* 264C8 8004B0C8 14400006 */ bnez $v0, .L8004B0E4 /* 264CC 8004B0CC 0065102A */ slt $v0, $v1, $a1 /* 264D0 8004B0D0 1040001F */ beqz $v0, .L8004B150 /* 264D4 8004B0D4 0220802D */ daddu $s0, $s1, $zero /* 264D8 8004B0D8 8E310000 */ lw $s1, 0x0($s1) /* 264DC 8004B0DC 1620FFF7 */ bnez $s1, .L8004B0BC /* 264E0 8004B0E0 00000000 */ nop .L8004B0E4: /* 264E4 8004B0E4 3C12800A */ lui $s2, %hi(nuAuDmaState) /* 264E8 8004B0E8 26523BD0 */ addiu $s2, $s2, %lo(nuAuDmaState) /* 264EC 8004B0EC 8E510008 */ lw $s1, 0x8($s2) /* 264F0 8004B0F0 16200006 */ bnez $s1, .L8004B10C /* 264F4 8004B0F4 0220202D */ daddu $a0, $s1, $zero /* 264F8 8004B0F8 8E440004 */ lw $a0, 0x4($s2) /* 264FC 8004B0FC 0C0187A4 */ jal osVirtualToPhysical /* 26500 8004B100 00000000 */ nop /* 26504 8004B104 08012C82 */ j .L8004B208 /* 26508 8004B108 00000000 */ nop .L8004B10C: /* 2650C 8004B10C 8E220000 */ lw $v0, 0x0($s1) /* 26510 8004B110 0C012D03 */ jal alUnlink /* 26514 8004B114 AE420008 */ sw $v0, 0x8($s2) /* 26518 8004B118 12000005 */ beqz $s0, .L8004B130 /* 2651C 8004B11C 0220202D */ daddu $a0, $s1, $zero /* 26520 8004B120 0C012CFB */ jal alLink /* 26524 8004B124 0200282D */ daddu $a1, $s0, $zero /* 26528 8004B128 08012C61 */ j .L8004B184 /* 2652C 8004B12C 00000000 */ nop .L8004B130: /* 26530 8004B130 8E450004 */ lw $a1, 0x4($s2) /* 26534 8004B134 10A00010 */ beqz $a1, .L8004B178 /* 26538 8004B138 00A0802D */ daddu $s0, $a1, $zero /* 2653C 8004B13C AE510004 */ sw $s1, 0x4($s2) /* 26540 8004B140 AE300000 */ sw $s0, 0x0($s1) /* 26544 8004B144 AE200004 */ sw $zero, 0x4($s1) /* 26548 8004B148 08012C61 */ j .L8004B184 /* 2654C 8004B14C AE110004 */ sw $s1, 0x4($s0) .L8004B150: /* 26550 8004B150 8E240010 */ lw $a0, 0x10($s1) /* 26554 8004B154 8E220008 */ lw $v0, 0x8($s1) /* 26558 8004B158 3C038008 */ lui $v1, %hi(nuAuFrameCounter) /* 2655C 8004B15C 8C63817C */ lw $v1, %lo(nuAuFrameCounter)($v1) /* 26560 8004B160 00932021 */ addu $a0, $a0, $s3 /* 26564 8004B164 00822023 */ subu $a0, $a0, $v0 /* 26568 8004B168 0C0187A4 */ jal osVirtualToPhysical /* 2656C 8004B16C AE23000C */ sw $v1, 0xC($s1) /* 26570 8004B170 08012C82 */ j .L8004B208 /* 26574 8004B174 00000000 */ nop .L8004B178: /* 26578 8004B178 AE510004 */ sw $s1, 0x4($s2) /* 2657C 8004B17C AE200000 */ sw $zero, 0x0($s1) /* 26580 8004B180 AE200004 */ sw $zero, 0x4($s1) .L8004B184: /* 26584 8004B184 3C048008 */ lui $a0, %hi(nuAuDmaNext) /* 26588 8004B188 24848178 */ addiu $a0, $a0, %lo(nuAuDmaNext) /* 2658C 8004B18C 32700001 */ andi $s0, $s3, 0x1 /* 26590 8004B190 02709823 */ subu $s3, $s3, $s0 /* 26594 8004B194 3C02800A */ lui $v0, %hi(nuAuDmaIOMesgBuf) /* 26598 8004B198 24423720 */ addiu $v0, $v0, %lo(nuAuDmaIOMesgBuf) /* 2659C 8004B19C 8C830000 */ lw $v1, 0x0($a0) /* 265A0 8004B1A0 8E320010 */ lw $s2, 0x10($s1) /* 265A4 8004B1A4 0000302D */ daddu $a2, $zero, $zero /* 265A8 8004B1A8 AE330008 */ sw $s3, 0x8($s1) /* 265AC 8004B1AC 00032840 */ sll $a1, $v1, 1 /* 265B0 8004B1B0 00A32821 */ addu $a1, $a1, $v1 /* 265B4 8004B1B4 000528C0 */ sll $a1, $a1, 3 /* 265B8 8004B1B8 00A22821 */ addu $a1, $a1, $v0 /* 265BC 8004B1BC 3C028008 */ lui $v0, %hi(nuAuFrameCounter) /* 265C0 8004B1C0 8C42817C */ lw $v0, %lo(nuAuFrameCounter)($v0) /* 265C4 8004B1C4 24630001 */ addiu $v1, $v1, 0x1 /* 265C8 8004B1C8 AE22000C */ sw $v0, 0xC($s1) /* 265CC 8004B1CC AC830000 */ sw $v1, 0x0($a0) /* 265D0 8004B1D0 A0A00002 */ sb $zero, 0x2($a1) /* 265D4 8004B1D4 3C04800A */ lui $a0, %hi(nuPiCartHandle) /* 265D8 8004B1D8 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0) /* 265DC 8004B1DC 3C02800A */ lui $v0, %hi(nuAuDmaMesgQ) /* 265E0 8004B1E0 24423640 */ addiu $v0, $v0, %lo(nuAuDmaMesgQ) /* 265E4 8004B1E4 ACA20004 */ sw $v0, 0x4($a1) /* 265E8 8004B1E8 24020500 */ addiu $v0, $zero, 0x500 /* 265EC 8004B1EC ACB20008 */ sw $s2, 0x8($a1) /* 265F0 8004B1F0 ACB3000C */ sw $s3, 0xC($a1) /* 265F4 8004B1F4 0C018388 */ jal osEPiStartDma /* 265F8 8004B1F8 ACA20010 */ sw $v0, 0x10($a1) /* 265FC 8004B1FC 0C0187A4 */ jal osVirtualToPhysical /* 26600 8004B200 0240202D */ daddu $a0, $s2, $zero /* 26604 8004B204 00501021 */ addu $v0, $v0, $s0 .L8004B208: /* 26608 8004B208 8FBF0020 */ lw $ra, 0x20($sp) /* 2660C 8004B20C 8FB3001C */ lw $s3, 0x1C($sp) /* 26610 8004B210 8FB20018 */ lw $s2, 0x18($sp) /* 26614 8004B214 8FB10014 */ lw $s1, 0x14($sp) /* 26618 8004B218 8FB00010 */ lw $s0, 0x10($sp) /* 2661C 8004B21C 03E00008 */ jr $ra /* 26620 8004B220 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 nuAuDmaCallBack(s32 addr, s32 len, void *state, u8 arg3) { NUDMABuffer* dmaPtr; NUDMABuffer* freeBuffer; OSIoMesg* mesg; s32 delta; u32 startAddr; s32 addrEnd, buffEnd; NUDMABuffer* lastDmaPtr; if (arg3 == 0) { return osVirtualToPhysical((void*)addr); } lastDmaPtr = NULL; dmaPtr = nuAuDmaState.firstUsed; addrEnd = addr + len; while (dmaPtr != NULL) { startAddr = dmaPtr->startAddr; buffEnd = dmaPtr->startAddr + 0x500; if (addr >= startAddr && buffEnd >= addrEnd) { dmaPtr->frameCnt = nuAuFrameCounter; freeBuffer = (NUDMABuffer*)(dmaPtr->ptr + addr - dmaPtr->startAddr); return osVirtualToPhysical(freeBuffer); } else if (addr < startAddr) { break; } lastDmaPtr = dmaPtr; dmaPtr = (NUDMABuffer*)dmaPtr->node.next; } dmaPtr = nuAuDmaState.firstFree; if (dmaPtr == NULL) { return osVirtualToPhysical(nuAuDmaState.firstUsed); } nuAuDmaState.firstFree = (NUDMABuffer*)dmaPtr->node.next; alUnlink(&dmaPtr->node); if (lastDmaPtr != NULL) { alLink(&dmaPtr->node, &lastDmaPtr->node); } else if (nuAuDmaState.firstUsed != NULL){ lastDmaPtr = nuAuDmaState.firstUsed; nuAuDmaState.firstUsed = dmaPtr; dmaPtr->node.next = &lastDmaPtr->node; dmaPtr->node.prev = NULL; lastDmaPtr->node.prev = &dmaPtr->node; } else { nuAuDmaState.firstUsed = dmaPtr; dmaPtr->node.next = NULL; dmaPtr->node.prev = NULL; } freeBuffer = (NUDMABuffer*)dmaPtr->ptr; delta = addr & 1; addr -= delta; dmaPtr->startAddr = addr; dmaPtr->frameCnt = nuAuFrameCounter; mesg = &nuAuDmaIOMesgBuf[nuAuDmaNext++]; mesg->hdr.pri = OS_MESG_PRI_NORMAL; mesg->hdr.retQueue = &nuAuDmaMesgQ; mesg->dramAddr = freeBuffer; mesg->devAddr = addr; mesg->size = 0x500; osEPiStartDma(nuPiCartHandle, mesg, 0); return osVirtualToPhysical(freeBuffer) + delta; }
### RAW ASSEMBLY INSTRUCTIONS: glabel radiating_energy_orb_update /* 3A0104 E009E1E4 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 3A0108 E009E1E8 AFB20018 */ sw $s2, 0x18($sp) /* 3A010C E009E1EC 0080902D */ daddu $s2, $a0, $zero /* 3A0110 E009E1F0 AFBF001C */ sw $ra, 0x1C($sp) /* 3A0114 E009E1F4 AFB10014 */ sw $s1, 0x14($sp) /* 3A0118 E009E1F8 AFB00010 */ sw $s0, 0x10($sp) /* 3A011C E009E1FC F7BC0040 */ sdc1 $f28, 0x40($sp) /* 3A0120 E009E200 F7BA0038 */ sdc1 $f26, 0x38($sp) /* 3A0124 E009E204 F7B80030 */ sdc1 $f24, 0x30($sp) /* 3A0128 E009E208 F7B60028 */ sdc1 $f22, 0x28($sp) /* 3A012C E009E20C F7B40020 */ sdc1 $f20, 0x20($sp) /* 3A0130 E009E210 8E430000 */ lw $v1, 0x0($s2) /* 3A0134 E009E214 8E45000C */ lw $a1, 0xC($s2) /* 3A0138 E009E218 30620010 */ andi $v0, $v1, 0x10 /* 3A013C E009E21C 10400005 */ beqz $v0, .LE009E234 /* 3A0140 E009E220 2402FFEF */ addiu $v0, $zero, -0x11 /* 3A0144 E009E224 00621024 */ and $v0, $v1, $v0 /* 3A0148 E009E228 AE420000 */ sw $v0, 0x0($s2) /* 3A014C E009E22C 2402001E */ addiu $v0, $zero, 0x1E /* 3A0150 E009E230 ACA20018 */ sw $v0, 0x18($a1) .LE009E234: /* 3A0154 E009E234 8CA30018 */ lw $v1, 0x18($a1) /* 3A0158 E009E238 28620064 */ slti $v0, $v1, 0x64 /* 3A015C E009E23C 10400002 */ beqz $v0, .LE009E248 /* 3A0160 E009E240 2462FFFF */ addiu $v0, $v1, -0x1 /* 3A0164 E009E244 ACA20018 */ sw $v0, 0x18($a1) .LE009E248: /* 3A0168 E009E248 8CA2001C */ lw $v0, 0x1C($a1) /* 3A016C E009E24C 8CA40018 */ lw $a0, 0x18($a1) /* 3A0170 E009E250 24430001 */ addiu $v1, $v0, 0x1 /* 3A0174 E009E254 04810005 */ bgez $a0, .LE009E26C /* 3A0178 E009E258 ACA3001C */ sw $v1, 0x1C($a1) /* 3A017C E009E25C 0C080128 */ jal shim_remove_effect /* 3A0180 E009E260 0240202D */ daddu $a0, $s2, $zero /* 3A0184 E009E264 080278EC */ j .LE009E3B0 /* 3A0188 E009E268 00000000 */ nop .LE009E26C: /* 3A018C E009E26C 28620015 */ slti $v0, $v1, 0x15 /* 3A0190 E009E270 10400003 */ beqz $v0, .LE009E280 /* 3A0194 E009E274 00031040 */ sll $v0, $v1, 1 /* 3A0198 E009E278 080278A4 */ j .LE009E290 /* 3A019C E009E27C 00431021 */ addu $v0, $v0, $v1 .LE009E280: /* 3A01A0 E009E280 28820014 */ slti $v0, $a0, 0x14 /* 3A01A4 E009E284 10400004 */ beqz $v0, .LE009E298 /* 3A01A8 E009E288 00041040 */ sll $v0, $a0, 1 /* 3A01AC E009E28C 00441021 */ addu $v0, $v0, $a0 .LE009E290: /* 3A01B0 E009E290 00021080 */ sll $v0, $v0, 2 /* 3A01B4 E009E294 ACA20014 */ sw $v0, 0x14($a1) .LE009E298: /* 3A01B8 E009E298 8E420008 */ lw $v0, 0x8($s2) /* 3A01BC E009E29C 24110001 */ addiu $s1, $zero, 0x1 /* 3A01C0 E009E2A0 0222102A */ slt $v0, $s1, $v0 /* 3A01C4 E009E2A4 10400042 */ beqz $v0, .LE009E3B0 /* 3A01C8 E009E2A8 24A50034 */ addiu $a1, $a1, 0x34 /* 3A01CC E009E2AC 24B00020 */ addiu $s0, $a1, 0x20 /* 3A01D0 E009E2B0 3C01428C */ lui $at, (0x428C0000 >> 16) /* 3A01D4 E009E2B4 4481E000 */ mtc1 $at, $f28 /* 3A01D8 E009E2B8 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 3A01DC E009E2BC 4481D000 */ mtc1 $at, $f26 /* 3A01E0 E009E2C0 3C014120 */ lui $at, (0x41200000 >> 16) /* 3A01E4 E009E2C4 4481C000 */ mtc1 $at, $f24 /* 3A01E8 E009E2C8 3C01437F */ lui $at, (0x437F0000 >> 16) /* 3A01EC E009E2CC 4481B000 */ mtc1 $at, $f22 /* 3A01F0 E009E2D0 3C01E00A */ lui $at, (0xE00A0000 >> 16) /* 3A01F4 E009E2D4 D434EE10 */ ldc1 $f20, -0x11F0($at) .LE009E2D8: /* 3A01F8 E009E2D8 C60C000C */ lwc1 $f12, 0xC($s0) /* 3A01FC E009E2DC 461C6301 */ sub.s $f12, $f12, $f28 /* 3A0200 E009E2E0 461A6302 */ mul.s $f12, $f12, $f26 /* 3A0204 E009E2E4 00000000 */ nop /* 3A0208 E009E2E8 0C080144 */ jal shim_cos_deg /* 3A020C E009E2EC 46186303 */ div.s $f12, $f12, $f24 /* 3A0210 E009E2F0 46160002 */ mul.s $f0, $f0, $f22 /* 3A0214 E009E2F4 00000000 */ nop /* 3A0218 E009E2F8 C604000C */ lwc1 $f4, 0xC($s0) /* 3A021C E009E2FC C6020010 */ lwc1 $f2, 0x10($s0) /* 3A0220 E009E300 46022100 */ add.s $f4, $f4, $f2 /* 3A0224 E009E304 3C0142A0 */ lui $at, (0x42A00000 >> 16) /* 3A0228 E009E308 44811000 */ mtc1 $at, $f2 /* 3A022C E009E30C E604000C */ swc1 $f4, 0xC($s0) /* 3A0230 E009E310 4604103C */ c.lt.s $f2, $f4 /* 3A0234 E009E314 4600018D */ trunc.w.s $f6, $f0 /* 3A0238 E009E318 E606FFF4 */ swc1 $f6, -0xC($s0) /* 3A023C E009E31C 4500001F */ bc1f .LE009E39C /* 3A0240 E009E320 2404000F */ addiu $a0, $zero, 0xF /* 3A0244 E009E324 3C014270 */ lui $at, (0x42700000 >> 16) /* 3A0248 E009E328 44810000 */ mtc1 $at, $f0 /* 3A024C E009E32C 0C080138 */ jal shim_rand_int /* 3A0250 E009E330 E600000C */ swc1 $f0, 0xC($s0) /* 3A0254 E009E334 44820000 */ mtc1 $v0, $f0 /* 3A0258 E009E338 00000000 */ nop /* 3A025C E009E33C 46800021 */ cvt.d.w $f0, $f0 /* 3A0260 E009E340 46340002 */ mul.d $f0, $f0, $f20 /* 3A0264 E009E344 00000000 */ nop /* 3A0268 E009E348 3C01E00A */ lui $at, (0xE00A0000 >> 16) /* 3A026C E009E34C D422EE18 */ ldc1 $f2, -0x11E8($at) /* 3A0270 E009E350 46220000 */ add.d $f0, $f0, $f2 /* 3A0274 E009E354 2404000A */ addiu $a0, $zero, 0xA /* 3A0278 E009E358 46200020 */ cvt.s.d $f0, $f0 /* 3A027C E009E35C 0C080138 */ jal shim_rand_int /* 3A0280 E009E360 E6000008 */ swc1 $f0, 0x8($s0) /* 3A0284 E009E364 44820000 */ mtc1 $v0, $f0 /* 3A0288 E009E368 00000000 */ nop /* 3A028C E009E36C 46800021 */ cvt.d.w $f0, $f0 /* 3A0290 E009E370 46340002 */ mul.d $f0, $f0, $f20 /* 3A0294 E009E374 00000000 */ nop /* 3A0298 E009E378 46340000 */ add.d $f0, $f0, $f20 /* 3A029C E009E37C 24040168 */ addiu $a0, $zero, 0x168 /* 3A02A0 E009E380 46200020 */ cvt.s.d $f0, $f0 /* 3A02A4 E009E384 0C080138 */ jal shim_rand_int /* 3A02A8 E009E388 E6000010 */ swc1 $f0, 0x10($s0) /* 3A02AC E009E38C 44820000 */ mtc1 $v0, $f0 /* 3A02B0 E009E390 00000000 */ nop /* 3A02B4 E009E394 46800020 */ cvt.s.w $f0, $f0 /* 3A02B8 E009E398 E6000000 */ swc1 $f0, 0x0($s0) .LE009E39C: /* 3A02BC E009E39C 26310001 */ addiu $s1, $s1, 0x1 /* 3A02C0 E009E3A0 8E420008 */ lw $v0, 0x8($s2) /* 3A02C4 E009E3A4 0222102A */ slt $v0, $s1, $v0 /* 3A02C8 E009E3A8 1440FFCB */ bnez $v0, .LE009E2D8 /* 3A02CC E009E3AC 26100034 */ addiu $s0, $s0, 0x34 .LE009E3B0: /* 3A02D0 E009E3B0 8FBF001C */ lw $ra, 0x1C($sp) /* 3A02D4 E009E3B4 8FB20018 */ lw $s2, 0x18($sp) /* 3A02D8 E009E3B8 8FB10014 */ lw $s1, 0x14($sp) /* 3A02DC E009E3BC 8FB00010 */ lw $s0, 0x10($sp) /* 3A02E0 E009E3C0 D7BC0040 */ ldc1 $f28, 0x40($sp) /* 3A02E4 E009E3C4 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 3A02E8 E009E3C8 D7B80030 */ ldc1 $f24, 0x30($sp) /* 3A02EC E009E3CC D7B60028 */ ldc1 $f22, 0x28($sp) /* 3A02F0 E009E3D0 D7B40020 */ ldc1 $f20, 0x20($sp) /* 3A02F4 E009E3D4 03E00008 */ jr $ra /* 3A02F8 E009E3D8 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void radiating_energy_orb_update(EffectInstance* effect) { RadiatingEnergyOrbFXData* part = effect->data.radiatingEnergyOrb; s32 unk_18; s32 unk_1C; s32 i; if (effect->flags & FX_INSTANCE_FLAG_DISMISS) { effect->flags &= ~FX_INSTANCE_FLAG_DISMISS; part->unk_18 = 30; } if (part->unk_18 < 100) { part->unk_18--; } part->unk_1C++; if (part->unk_18 < 0) { shim_remove_effect(effect); return; } unk_18 = part->unk_18; unk_1C = part->unk_1C; if (unk_1C < 21) { part->unk_14 = unk_1C * 12; } else if (unk_18 < 20) { part->unk_14 = unk_18 * 12; } part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_14 = shim_cos_deg((part->unk_2C - 70.0f) * 90.0f / 10.0f) * 255.0f; part->unk_2C += part->unk_30; if (part->unk_2C > 80.0f) { part->unk_2C = 60.0f; part->unk_28 = shim_rand_int(15) * 0.1 + 0.4; part->unk_30 = shim_rand_int(10) * 0.1 + 0.1; part->unk_20 = shim_rand_int(360); } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8024DB1C /* 140E5C 8024DB1C 27BDFF60 */ addiu $sp, $sp, -0xA0 /* 140E60 8024DB20 AFB7008C */ sw $s7, 0x8C($sp) /* 140E64 8024DB24 0000B82D */ daddu $s7, $zero, $zero /* 140E68 8024DB28 3C02800A */ lui $v0, %hi(gMainGfxPos) /* 140E6C 8024DB2C 2442A66C */ addiu $v0, $v0, %lo(gMainGfxPos) /* 140E70 8024DB30 AFB10074 */ sw $s1, 0x74($sp) /* 140E74 8024DB34 0040882D */ daddu $s1, $v0, $zero /* 140E78 8024DB38 AFB40080 */ sw $s4, 0x80($sp) /* 140E7C 8024DB3C 3C14F548 */ lui $s4, (0xF5485000 >> 16) /* 140E80 8024DB40 3C018027 */ lui $at, %hi(gPauseMapCameraY) /* 140E84 8024DB44 C4200708 */ lwc1 $f0, %lo(gPauseMapCameraY)($at) /* 140E88 8024DB48 36945000 */ ori $s4, $s4, (0xF5485000 & 0xFFFF) /* 140E8C 8024DB4C AFBE0090 */ sw $fp, 0x90($sp) /* 140E90 8024DB50 3C1EE700 */ lui $fp, (0xE7000000 >> 16) /* 140E94 8024DB54 AFB50084 */ sw $s5, 0x84($sp) /* 140E98 8024DB58 AFA500A4 */ sw $a1, 0xA4($sp) /* 140E9C 8024DB5C 24B5001A */ addiu $s5, $a1, 0x1A /* 140EA0 8024DB60 AFB60088 */ sw $s6, 0x88($sp) /* 140EA4 8024DB64 24B60104 */ addiu $s6, $a1, 0x104 /* 140EA8 8024DB68 AFB20078 */ sw $s2, 0x78($sp) /* 140EAC 8024DB6C 24120004 */ addiu $s2, $zero, 0x4 /* 140EB0 8024DB70 AFB3007C */ sw $s3, 0x7C($sp) /* 140EB4 8024DB74 24130016 */ addiu $s3, $zero, 0x16 /* 140EB8 8024DB78 AFB00070 */ sw $s0, 0x70($sp) /* 140EBC 8024DB7C 02E0802D */ daddu $s0, $s7, $zero /* 140EC0 8024DB80 AFBF0094 */ sw $ra, 0x94($sp) /* 140EC4 8024DB84 F7B40098 */ sdc1 $f20, 0x98($sp) /* 140EC8 8024DB88 AFA600A8 */ sw $a2, 0xA8($sp) /* 140ECC 8024DB8C AFA700AC */ sw $a3, 0xAC($sp) /* 140ED0 8024DB90 8E220000 */ lw $v0, 0x0($s1) /* 140ED4 8024DB94 4600018D */ trunc.w.s $f6, $f0 /* 140ED8 8024DB98 E7A60054 */ swc1 $f6, 0x54($sp) /* 140EDC 8024DB9C 3C018027 */ lui $at, %hi(gPauseMapCameraX) /* 140EE0 8024DBA0 C4200704 */ lwc1 $f0, %lo(gPauseMapCameraX)($at) /* 140EE4 8024DBA4 0040202D */ daddu $a0, $v0, $zero /* 140EE8 8024DBA8 4600018D */ trunc.w.s $f6, $f0 /* 140EEC 8024DBAC E7A60050 */ swc1 $f6, 0x50($sp) D_8024DBB0_C0B430: /* 140EF0 8024DBB0 8FAF0050 */ lw $t7, 0x50($sp) /* 140EF4 8024DBB4 24420008 */ addiu $v0, $v0, 0x8 /* 140EF8 8024DBB8 000F1823 */ negu $v1, $t7 /* 140EFC 8024DBBC 00031940 */ sll $v1, $v1, 5 ### DECOMPILED C INSTRUCTIONS: void pause_map_draw_contents(MenuPanel* menu, s32 baseX, s32 baseY, s32 width, s32 height, s32 opacity, s32 darkening) { s32 cameraX = gPauseMapCameraX; s32 cameraY = gPauseMapCameraY; s32 i, j; s32 tileHeight; s32 x1, y1, x2, y2; s32 x1a, y1a, x2a, y2a; s32 posX, posY; s32 ult; PauseMapSpace* mapSpace; s32 camX, camY; s32 pathX, pathY; s32 currentTab; s32 offset, offsetLeft, offsetRight, offsetUp, offsetDown; s32 mapULX, mapULY; s32 bigPointX, bigPointY; Vec2b* path; s32 pathLength; gSPDisplayList(gMainGfxPos++, gPauseDLWorldMap); ult = -cameraX * 32; for (i = 0; i < 60; i++) { if (4 * i + 4 < 111) { tileHeight = 4; } else { tileHeight = 111 - 4 * i; } gDPLoadTextureTile(gMainGfxPos++, pause_world_map_png, G_IM_FMT_CI, G_IM_SIZ_8b, 320, 320, 0, i * 4 - cameraY, 319, i * 4 + tileHeight - 1 - cameraY, 0, G_TX_CLAMP, G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD); pause_draw_rect((baseX + 26) * 4, (baseY + 22 + 4 * i) * 4, (baseX + 260) * 4, (baseY + 22 + i * 4 + tileHeight) * 4, 0, ult, (-cameraY + i * 4) * 32, 0x400, 0x400); gDPPipeSync(gMainGfxPos++); if (4 * i + 4 >= 110) { break; } } gSPDisplayList(gMainGfxPos++, gPauseDLPathPoints); x1 = baseX + 26; y1 = baseY + 22; x2 = baseX + 260; y2 = baseY + 132; if (x1 <= 0) { x1 = 1; } if (y1 <= 0) { y1 = 1; } if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) { return; } if (x2 >= SCREEN_WIDTH - 1) { x2 = SCREEN_WIDTH - 1; } if (y2 >= SCREEN_HEIGHT - 1) { y2 = SCREEN_HEIGHT - 1; } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2); mapSpace = gPauseMapSpaces; camX = cameraX + baseX; camY = cameraY + baseY; for (i = 0; i < ARRAY_COUNT(gPauseMapSpaces); i++, mapSpace++) { posX = mapSpace->pos.x; posY = mapSpace->pos.y; if (evt_get_variable(NULL, GF_MAP_ToadTown + i) == 0) { continue; } if (i != gPauseMapCursorCurrentOption) { gDPSetPrimColor(gMainGfxPos++, 0, 0, 220, 80, 30, 255); } else { gDPSetPrimColor(gMainGfxPos++, 0, 0, (gGameStatusPtr->frameCounter * 10) % 120 + 120, (gGameStatusPtr->frameCounter * 10) % 120 + 120, (gGameStatusPtr->frameCounter * 10) % 120, 255); } bigPointX = camX + 26 + posX; bigPointY = camY + 22 + posY; pause_draw_rect((bigPointX - 8) * 4, (bigPointY - 8) * 4, (bigPointX + 8) * 4, (bigPointY + 8) * 4, 0, 0, 0, 0x400, 0x400); gDPPipeSync(gMainGfxPos++); gDPSetPrimColor(gMainGfxPos++, 0, 0, 230, 190, 180, 255); pathLength = mapSpace->pathLength; path = mapSpace->path; if (path) { pathX = 0; pathY = 0; for (j = 0; j < pathLength; j++, path++) { pathX += path->x; pathY += path->y; pause_draw_rect((camX + 26 + posX + pathX - 8) * 4, (camY + 22 + posY + pathY - 8) * 4, (camX + 26 + posX + pathX + 8) * 4, (camY + 22 + posY + pathY + 8) * 4, 1, 0, 0, 0x400, 0x400); } } } mapULX = baseX + 26 + cameraX; mapULY = baseY + 22 + cameraY; hud_element_set_render_pos(gPauseMapIconIDs[0], mapULX + gPauseMapMarioX, mapULY + gPauseMapMarioY - 7); hud_element_draw_without_clipping(gPauseMapIconIDs[0]); currentTab = gPauseMenuCurrentTab; if (currentTab == 6) { pause_set_cursor_pos(WINDOW_ID_PAUSE_MAP, mapULX + gPauseMapTargetX - 8.0f, mapULY + gPauseMapTargetY); if (gPauseMenuCurrentTab == currentTab) { offset = gPauseMapArrowWobble[gGameStatusPtr->frameCounter % 12]; offsetLeft = offset; offsetRight = offset; offsetUp = offset; offsetDown = offset; gSPDisplayList(gMainGfxPos++, gPauseDLArrows); if (!(gPauseMapCameraX < 0.0f)) { offsetLeft = 0; } pause_map_draw_border_arrows(0, baseX + 26 - offsetLeft, baseY + height / 2 - 8); if (!(gPauseMapCameraX > -86.0f)) { offsetRight = 0; } pause_map_draw_border_arrows(1, baseX + width - 50 + offsetRight, baseY + height / 2 - 8); if (!(gPauseMapCameraY < 0.0f)) { offsetUp = 0; } pause_map_draw_border_arrows(2, baseX + width / 2 - 8, baseY + 24 - offsetUp); if (!(gPauseMapCameraY > -210.0f)) { offsetDown = 0; } pause_map_draw_border_arrows(3, baseX + width / 2 - 8, baseY + height - 44 + offsetDown); } } { s32 x1, y1, x2, y2; x1 = baseX + 18; y1 = baseY + 14; x2 = baseX + 268; y2 = baseY + 140; if (x1 <= 0) { x1 = 1; } if (y1 <= 0) { y1 = 1; } if (x2 <= 0 || y2 <= 0 || x1 >= SCREEN_WIDTH - 1 || y1 >= SCREEN_HEIGHT - 1) { return; } if (x2 >= SCREEN_WIDTH - 1) { x2 = SCREEN_WIDTH - 1; } if (y2 >= SCREEN_HEIGHT - 1) { y2 = SCREEN_HEIGHT - 1; } gDPSetScissor(gMainGfxPos++, G_SC_NON_INTERLACE, x1, y1, x2, y2); } draw_box(0, &gPauseWS_27, baseX + 18, baseY + 14, 0, 250, 126, opacity, darkening, 1.0f, 1.0f, 0, 0, 0, 0, 0, 0, width, height, 0); }