text
stringlengths
6.38k
228k
### RAW ASSEMBLY INSTRUCTIONS: glabel basic_ai_chase_init /* 2537C 80049F7C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 25380 80049F80 AFB40020 */ sw $s4, 0x20($sp) /* 25384 80049F84 0080A02D */ daddu $s4, $a0, $zero /* 25388 80049F88 AFBF0024 */ sw $ra, 0x24($sp) /* 2538C 80049F8C AFB3001C */ sw $s3, 0x1C($sp) /* 25390 80049F90 AFB20018 */ sw $s2, 0x18($sp) /* 25394 80049F94 AFB10014 */ sw $s1, 0x14($sp) /* 25398 80049F98 AFB00010 */ sw $s0, 0x10($sp) /* 2539C 80049F9C F7B40028 */ sdc1 $f20, 0x28($sp) /* 253A0 80049FA0 8E930148 */ lw $s3, 0x148($s4) /* 253A4 80049FA4 86640008 */ lh $a0, 0x8($s3) /* 253A8 80049FA8 0C00EABB */ jal get_npc_unsafe /* 253AC 80049FAC 00A0902D */ daddu $s2, $a1, $zero /* 253B0 80049FB0 3C04800F */ lui $a0, %hi(gPlayerStatusPtr) /* 253B4 80049FB4 8C847B30 */ lw $a0, %lo(gPlayerStatusPtr)($a0) /* 253B8 80049FB8 908300B4 */ lbu $v1, 0xB4($a0) /* 253BC 80049FBC 0040802D */ daddu $s0, $v0, $zero /* 253C0 80049FC0 2462FFFD */ addiu $v0, $v1, -0x3 /* 253C4 80049FC4 2C420003 */ sltiu $v0, $v0, 0x3 /* 253C8 80049FC8 14400006 */ bnez $v0, .L80049FE4 /* 253CC 80049FCC 0000882D */ daddu $s1, $zero, $zero /* 253D0 80049FD0 00031600 */ sll $v0, $v1, 24 /* 253D4 80049FD4 00021603 */ sra $v0, $v0, 24 /* 253D8 80049FD8 24030008 */ addiu $v1, $zero, 0x8 /* 253DC 80049FDC 1443000F */ bne $v0, $v1, .L8004A01C /* 253E0 80049FE0 00000000 */ nop .L80049FE4: /* 253E4 80049FE4 C60C0038 */ lwc1 $f12, 0x38($s0) /* 253E8 80049FE8 C60E0040 */ lwc1 $f14, 0x40($s0) /* 253EC 80049FEC 8C860028 */ lw $a2, 0x28($a0) /* 253F0 80049FF0 0C00A7B5 */ jal dist2D /* 253F4 80049FF4 8C870030 */ lw $a3, 0x30($a0) /* 253F8 80049FF8 860200A6 */ lh $v0, 0xA6($s0) /* 253FC 80049FFC 46000021 */ cvt.d.s $f0, $f0 /* 25400 8004A000 44821000 */ mtc1 $v0, $f2 /* 25404 8004A004 00000000 */ nop /* 25408 8004A008 468010A1 */ cvt.d.w $f2, $f2 /* 2540C 8004A00C 4622003C */ c.lt.d $f0, $f2 /* 25410 8004A010 00000000 */ nop /* 25414 8004A014 45030001 */ bc1tl .L8004A01C /* 25418 8004A018 24110001 */ addiu $s1, $zero, 0x1 .L8004A01C: /* 2541C 8004A01C 56200031 */ bnel $s1, $zero, .L8004A0E4 /* 25420 8004A020 A600008E */ sh $zero, 0x8E($s0) /* 25424 8004A024 C60C0038 */ lwc1 $f12, 0x38($s0) /* 25428 8004A028 3C02800F */ lui $v0, %hi(gPlayerStatusPtr) /* 2542C 8004A02C 8C427B30 */ lw $v0, %lo(gPlayerStatusPtr)($v0) /* 25430 8004A030 C60E0040 */ lwc1 $f14, 0x40($s0) /* 25434 8004A034 8C460028 */ lw $a2, 0x28($v0) /* 25438 8004A038 0C00A720 */ jal atan2 /* 2543C 8004A03C 8C470030 */ lw $a3, 0x30($v0) /* 25440 8004A040 46000506 */ mov.s $f20, $f0 /* 25444 8004A044 C60C000C */ lwc1 $f12, 0xC($s0) /* 25448 8004A048 0C00A70A */ jal get_clamped_angle_diff /* 2544C 8004A04C 4600A386 */ mov.s $f14, $f20 /* 25450 8004A050 46000086 */ mov.s $f2, $f0 /* 25454 8004A054 8E42001C */ lw $v0, 0x1C($s2) /* 25458 8004A058 46001005 */ abs.s $f0, $f2 /* 2545C 8004A05C 44822000 */ mtc1 $v0, $f4 /* 25460 8004A060 00000000 */ nop /* 25464 8004A064 46802120 */ cvt.s.w $f4, $f4 /* 25468 8004A068 4600203C */ c.lt.s $f4, $f0 /* 2546C 8004A06C 00000000 */ nop /* 25470 8004A070 4500000D */ bc1f .L8004A0A8 /* 25474 8004A074 00000000 */ nop /* 25478 8004A078 44800000 */ mtc1 $zero, $f0 /* 2547C 8004A07C C614000C */ lwc1 $f20, 0xC($s0) /* 25480 8004A080 4600103C */ c.lt.s $f2, $f0 /* 25484 8004A084 00000000 */ nop /* 25488 8004A088 45000006 */ bc1f .L8004A0A4 /* 2548C 8004A08C 00021023 */ negu $v0, $v0 /* 25490 8004A090 44820000 */ mtc1 $v0, $f0 /* 25494 8004A094 00000000 */ nop /* 25498 8004A098 46800020 */ cvt.s.w $f0, $f0 /* 2549C 8004A09C 0801282A */ j .L8004A0A8 /* 254A0 8004A0A0 4600A500 */ add.s $f20, $f20, $f0 .L8004A0A4: /* 254A4 8004A0A4 4604A500 */ add.s $f20, $f20, $f4 .L8004A0A8: /* 254A8 8004A0A8 0C00A6C9 */ jal clamp_angle /* 254AC 8004A0AC 4600A306 */ mov.s $f12, $f20 /* 254B0 8004A0B0 E600000C */ swc1 $f0, 0xC($s0) /* 254B4 8004A0B4 8E440020 */ lw $a0, 0x20($s2) /* 254B8 8004A0B8 000417C2 */ srl $v0, $a0, 31 /* 254BC 8004A0BC 00822021 */ addu $a0, $a0, $v0 /* 254C0 8004A0C0 00042043 */ sra $a0, $a0, 1 /* 254C4 8004A0C4 0C00A67F */ jal rand_int /* 254C8 8004A0C8 24840001 */ addiu $a0, $a0, 0x1 /* 254CC 8004A0CC 8E430020 */ lw $v1, 0x20($s2) /* 254D0 8004A0D0 000327C2 */ srl $a0, $v1, 31 /* 254D4 8004A0D4 00641821 */ addu $v1, $v1, $a0 /* 254D8 8004A0D8 00031843 */ sra $v1, $v1, 1 /* 254DC 8004A0DC 00621821 */ addu $v1, $v1, $v0 /* 254E0 8004A0E0 A603008E */ sh $v1, 0x8E($s0) .L8004A0E4: /* 254E4 8004A0E4 8E6200CC */ lw $v0, 0xCC($s3) /* 254E8 8004A0E8 8C42000C */ lw $v0, 0xC($v0) /* 254EC 8004A0EC AE020028 */ sw $v0, 0x28($s0) /* 254F0 8004A0F0 C6400018 */ lwc1 $f0, 0x18($s2) /* 254F4 8004A0F4 2402000D */ addiu $v0, $zero, 0xD /* 254F8 8004A0F8 E6000018 */ swc1 $f0, 0x18($s0) /* 254FC 8004A0FC AE820070 */ sw $v0, 0x70($s4) /* 25500 8004A100 8FBF0024 */ lw $ra, 0x24($sp) /* 25504 8004A104 8FB40020 */ lw $s4, 0x20($sp) /* 25508 8004A108 8FB3001C */ lw $s3, 0x1C($sp) /* 2550C 8004A10C 8FB20018 */ lw $s2, 0x18($sp) /* 25510 8004A110 8FB10014 */ lw $s1, 0x14($sp) /* 25514 8004A114 8FB00010 */ lw $s0, 0x10($sp) /* 25518 8004A118 D7B40028 */ ldc1 $f20, 0x28($sp) /* 2551C 8004A11C 03E00008 */ jr $ra /* 25520 8004A120 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void basic_ai_chase_init(Evt* script, MobileAISettings* npcAISettings, EnemyDetectVolume* territory) { Enemy* enemy = script->owner1.enemy; Npc* npc = get_npc_unsafe(enemy->npcID); s32 skipTurnAround = FALSE; if ((gPlayerStatusPtr->actionState == ACTION_STATE_JUMP || gPlayerStatusPtr->actionState == ACTION_STATE_BOUNCE || gPlayerStatusPtr->actionState == ACTION_STATE_HOP || gPlayerStatusPtr->actionState == ACTION_STATE_FALLING) && (f64)dist2D(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z) < npc->collisionDiameter) { skipTurnAround = TRUE; } if (!skipTurnAround) { f32 angle = atan2(npc->pos.x, npc->pos.z, gPlayerStatusPtr->position.x, gPlayerStatusPtr->position.z); f32 deltaAngleToPlayer = get_clamped_angle_diff(npc->yaw, angle); if (npcAISettings->chaseTurnRate < fabsf(deltaAngleToPlayer)) { angle = npc->yaw; if (deltaAngleToPlayer < 0.0f) { angle += -npcAISettings->chaseTurnRate; } else { angle += npcAISettings->chaseTurnRate; } } npc->yaw = clamp_angle(angle); npc->duration = (npcAISettings->chaseUpdateInterval / 2) + rand_int((npcAISettings->chaseUpdateInterval / 2) + 1); } else { npc->duration = 0; } npc->currentAnim = enemy->animList[ENEMY_ANIM_INDEX_CHASE]; npc->moveSpeed = npcAISettings->chaseSpeed; script->AI_TEMP_STATE = AI_STATE_CHASE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel step_entity_model_commandlist /* B76B8 80120FB8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* B76BC 80120FBC 0080302D */ daddu $a2, $a0, $zero /* B76C0 80120FC0 AFBF0010 */ sw $ra, 0x10($sp) /* B76C4 80120FC4 8CC50010 */ lw $a1, 0x10($a2) /* B76C8 80120FC8 8CA30000 */ lw $v1, 0x0($a1) /* B76CC 80120FCC 2C620008 */ sltiu $v0, $v1, 0x8 /* B76D0 80120FD0 10400057 */ beqz $v0, .L80121130 /* B76D4 80120FD4 24A50004 */ addiu $a1, $a1, 0x4 /* B76D8 80120FD8 00031080 */ sll $v0, $v1, 2 /* B76DC 80120FDC 3C018015 */ lui $at, %hi(jtbl_801500B0) /* B76E0 80120FE0 00220821 */ addu $at, $at, $v0 /* B76E4 80120FE4 8C2200B0 */ lw $v0, %lo(jtbl_801500B0)($at) /* B76E8 80120FE8 00400008 */ jr $v0 /* B76EC 80120FEC 00000000 */ nop glabel .L80120FF0 /* B76F0 80120FF0 0C048BA5 */ jal free_entity_model_by_ref /* B76F4 80120FF4 00C0202D */ daddu $a0, $a2, $zero /* B76F8 80120FF8 0804844D */ j .L80121134 /* B76FC 80120FFC 24020001 */ addiu $v0, $zero, 0x1 glabel .L80121000 /* B7700 80121000 8CA20000 */ lw $v0, 0x0($a1) /* B7704 80121004 44821000 */ mtc1 $v0, $f2 /* B7708 80121008 00000000 */ nop /* B770C 8012100C 468010A1 */ cvt.d.w $f2, $f2 /* B7710 80121010 04410006 */ bgez $v0, .L8012102C /* B7714 80121014 24A50004 */ addiu $a1, $a1, 0x4 /* B7718 80121018 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* B771C 8012101C 44810800 */ mtc1 $at, $f1 /* B7720 80121020 44800000 */ mtc1 $zero, $f0 /* B7724 80121024 00000000 */ nop /* B7728 80121028 46201080 */ add.d $f2, $f2, $f0 .L8012102C: /* B772C 8012102C 46201020 */ cvt.s.d $f0, $f2 /* B7730 80121030 E4C00008 */ swc1 $f0, 0x8($a2) /* B7734 80121034 8CA20000 */ lw $v0, 0x0($a1) /* B7738 80121038 24A50004 */ addiu $a1, $a1, 0x4 /* B773C 8012103C ACC50010 */ sw $a1, 0x10($a2) /* B7740 80121040 0804844C */ j .L80121130 /* B7744 80121044 ACC20014 */ sw $v0, 0x14($a2) glabel .L80121048 /* B7748 80121048 8CC30058 */ lw $v1, 0x58($a2) /* B774C 8012104C 24020001 */ addiu $v0, $zero, 0x1 /* B7750 80121050 0804844D */ j .L80121134 /* B7754 80121054 ACC30010 */ sw $v1, 0x10($a2) glabel .L80121058 /* B7758 80121058 24020001 */ addiu $v0, $zero, 0x1 /* B775C 8012105C ACC50058 */ sw $a1, 0x58($a2) /* B7760 80121060 0804844D */ j .L80121134 /* B7764 80121064 ACC50010 */ sw $a1, 0x10($a2) glabel .L80121068 /* B7768 80121068 90A30003 */ lbu $v1, 0x3($a1) /* B776C 8012106C 24A50004 */ addiu $a1, $a1, 0x4 /* B7770 80121070 24020001 */ addiu $v0, $zero, 0x1 /* B7774 80121074 ACC50010 */ sw $a1, 0x10($a2) /* B7778 80121078 0804844D */ j .L80121134 /* B777C 8012107C A0C30004 */ sb $v1, 0x4($a2) glabel .L80121080 /* B7780 80121080 8CA40000 */ lw $a0, 0x0($a1) /* B7784 80121084 24A50004 */ addiu $a1, $a1, 0x4 /* B7788 80121088 8CC30000 */ lw $v1, 0x0($a2) /* B778C 8012108C 24020001 */ addiu $v0, $zero, 0x1 /* B7790 80121090 ACC50010 */ sw $a1, 0x10($a2) /* B7794 80121094 00641825 */ or $v1, $v1, $a0 /* B7798 80121098 0804844D */ j .L80121134 /* B779C 8012109C ACC30000 */ sw $v1, 0x0($a2) glabel .L801210A0 /* B77A0 801210A0 8CA40000 */ lw $a0, 0x0($a1) /* B77A4 801210A4 24A50004 */ addiu $a1, $a1, 0x4 /* B77A8 801210A8 8CC30000 */ lw $v1, 0x0($a2) /* B77AC 801210AC 24020001 */ addiu $v0, $zero, 0x1 /* B77B0 801210B0 ACC50010 */ sw $a1, 0x10($a2) /* B77B4 801210B4 00042027 */ nor $a0, $zero, $a0 /* B77B8 801210B8 00641824 */ and $v1, $v1, $a0 /* B77BC 801210BC 0804844D */ j .L80121134 /* B77C0 801210C0 ACC30000 */ sw $v1, 0x0($a2) glabel .L801210C4 /* B77C4 801210C4 8CA20000 */ lw $v0, 0x0($a1) /* B77C8 801210C8 8CC30014 */ lw $v1, 0x14($a2) /* B77CC 801210CC 44821000 */ mtc1 $v0, $f2 /* B77D0 801210D0 00000000 */ nop /* B77D4 801210D4 468010A1 */ cvt.d.w $f2, $f2 /* B77D8 801210D8 04410006 */ bgez $v0, .L801210F4 /* B77DC 801210DC 24A50004 */ addiu $a1, $a1, 0x4 /* B77E0 801210E0 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* B77E4 801210E4 44810800 */ mtc1 $at, $f1 /* B77E8 801210E8 44800000 */ mtc1 $zero, $f0 /* B77EC 801210EC 00000000 */ nop /* B77F0 801210F0 46201080 */ add.d $f2, $f2, $f0 .L801210F4: /* B77F4 801210F4 46201020 */ cvt.s.d $f0, $f2 /* B77F8 801210F8 E4C00008 */ swc1 $f0, 0x8($a2) /* B77FC 801210FC 8CA20000 */ lw $v0, 0x0($a1) /* B7800 80121100 24A50004 */ addiu $a1, $a1, 0x4 /* B7804 80121104 AC620000 */ sw $v0, 0x0($v1) /* B7808 80121108 8CA20000 */ lw $v0, 0x0($a1) /* B780C 8012110C 24A50004 */ addiu $a1, $a1, 0x4 /* B7810 80121110 AC620004 */ sw $v0, 0x4($v1) /* B7814 80121114 8CA20000 */ lw $v0, 0x0($a1) /* B7818 80121118 24A50004 */ addiu $a1, $a1, 0x4 /* B781C 8012111C AC620008 */ sw $v0, 0x8($v1) /* B7820 80121120 8CA20000 */ lw $v0, 0x0($a1) /* B7824 80121124 24A50004 */ addiu $a1, $a1, 0x4 /* B7828 80121128 AC62000C */ sw $v0, 0xC($v1) /* B782C 8012112C ACC50010 */ sw $a1, 0x10($a2) .L80121130: /* B7830 80121130 0000102D */ daddu $v0, $zero, $zero .L80121134: /* B7834 80121134 8FBF0010 */ lw $ra, 0x10($sp) /* B7838 80121138 03E00008 */ jr $ra /* B783C 8012113C 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: s32 step_entity_model_commandlist(EntityModel* entityModel) { SpriteRasterInfo* imageData; u32* curPos = *entityModel->cmdListReadPos; switch (*curPos++) { case 0: // kill model free_entity_model_by_ref(entityModel); return 1; case 1: // set display list ptr entityModel->nextFrameTime = (f32) *curPos++; entityModel->gfx.displayList = (Gfx*) *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; break; case 2: // restore saved position entityModel->cmdListReadPos = entityModel->cmdListSavedPos; return 1; case 3: // set saved position entityModel->cmdListReadPos = entityModel->cmdListSavedPos = (EntityModelScript*) curPos; return 1; case 4: // set render mode entityModel->renderMode = *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; return 1; case 5: // set flags entityModel->flags |= *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; return 1; case 6: // clear flags entityModel->flags &= ~*curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; return 1; case 7: // set image data imageData = entityModel->gfx.imageData; entityModel->nextFrameTime = *curPos++; imageData->raster = (u8*)*curPos++; imageData->defaultPal = (PAL_PTR) *curPos++; imageData->width = *curPos++; imageData->height = *curPos++; entityModel->cmdListReadPos = (EntityModelScript*) curPos; break; } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_amb_manager_update /* 2C5BC 800511BC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 2C5C0 800511C0 AFB10014 */ sw $s1, 0x14($sp) /* 2C5C4 800511C4 0080882D */ daddu $s1, $a0, $zero /* 2C5C8 800511C8 0000382D */ daddu $a3, $zero, $zero /* 2C5CC 800511CC 24080001 */ addiu $t0, $zero, 0x1 /* 2C5D0 800511D0 00E0302D */ daddu $a2, $a3, $zero /* 2C5D4 800511D4 240507B4 */ addiu $a1, $zero, 0x7B4 /* 2C5D8 800511D8 AFBF0024 */ sw $ra, 0x24($sp) /* 2C5DC 800511DC AFB40020 */ sw $s4, 0x20($sp) /* 2C5E0 800511E0 AFB3001C */ sw $s3, 0x1C($sp) /* 2C5E4 800511E4 AFB20018 */ sw $s2, 0x18($sp) /* 2C5E8 800511E8 AFB00010 */ sw $s0, 0x10($sp) .L800511EC: /* 2C5EC 800511EC 02252021 */ addu $a0, $s1, $a1 /* 2C5F0 800511F0 90820003 */ lbu $v0, 0x3($a0) /* 2C5F4 800511F4 54480008 */ bnel $v0, $t0, .L80051218 /* 2C5F8 800511F8 24C60048 */ addiu $a2, $a2, 0x48 /* 2C5FC 800511FC 8E220000 */ lw $v0, 0x0($s1) /* 2C600 80051200 00461021 */ addu $v0, $v0, $a2 /* 2C604 80051204 90431365 */ lbu $v1, 0x1365($v0) /* 2C608 80051208 92220022 */ lbu $v0, 0x22($s1) /* 2C60C 8005120C 54620001 */ bnel $v1, $v0, .L80051214 /* 2C610 80051210 AC800000 */ sw $zero, 0x0($a0) .L80051214: /* 2C614 80051214 24C60048 */ addiu $a2, $a2, 0x48 .L80051218: /* 2C618 80051218 24E70001 */ addiu $a3, $a3, 0x1 /* 2C61C 8005121C 2CE20010 */ sltiu $v0, $a3, 0x10 /* 2C620 80051220 1440FFF2 */ bnez $v0, .L800511EC /* 2C624 80051224 24A50008 */ addiu $a1, $a1, 0x8 /* 2C628 80051228 0000982D */ daddu $s3, $zero, $zero /* 2C62C 8005122C 24140001 */ addiu $s4, $zero, 0x1 /* 2C630 80051230 24120024 */ addiu $s2, $zero, 0x24 /* 2C634 80051234 02328021 */ addu $s0, $s1, $s2 .L80051238: /* 2C638 80051238 8E020008 */ lw $v0, 0x8($s0) /* 2C63C 8005123C 50400030 */ beql $v0, $zero, .L80051300 /* 2C640 80051240 265201E4 */ addiu $s2, $s2, 0x1E4 /* 2C644 80051244 92220021 */ lbu $v0, 0x21($s1) /* 2C648 80051248 10400003 */ beqz $v0, .L80051258 /* 2C64C 8005124C 0220202D */ daddu $a0, $s1, $zero /* 2C650 80051250 0C0144CD */ jal au_amb_load_track_fade_info /* 2C654 80051254 0200282D */ daddu $a1, $s0, $zero .L80051258: /* 2C658 80051258 92030024 */ lbu $v1, 0x24($s0) /* 2C65C 8005125C 10600018 */ beqz $v1, .L800512C0 /* 2C660 80051260 24020003 */ addiu $v0, $zero, 0x3 /* 2C664 80051264 1462000A */ bne $v1, $v0, .L80051290 /* 2C668 80051268 24020002 */ addiu $v0, $zero, 0x2 /* 2C66C 8005126C A2020024 */ sb $v0, 0x24($s0) /* 2C670 80051270 0220202D */ daddu $a0, $s1, $zero /* 2C674 80051274 0C0148AA */ jal au_amb_save_voices /* 2C678 80051278 0200282D */ daddu $a1, $s0, $zero /* 2C67C 8005127C 0220202D */ daddu $a0, $s1, $zero /* 2C680 80051280 0C01487A */ jal au_amb_player_stop /* 2C684 80051284 0200282D */ daddu $a1, $s0, $zero /* 2C688 80051288 080144C0 */ j .L80051300 /* 2C68C 8005128C 265201E4 */ addiu $s2, $s2, 0x1E4 .L80051290: /* 2C690 80051290 5474001B */ bnel $v1, $s4, .L80051300 /* 2C694 80051294 265201E4 */ addiu $s2, $s2, 0x1E4 /* 2C698 80051298 96020028 */ lhu $v0, 0x28($s0) /* 2C69C 8005129C 10400003 */ beqz $v0, .L800512AC /* 2C6A0 800512A0 A2000024 */ sb $zero, 0x24($s0) /* 2C6A4 800512A4 0C014354 */ jal au_amb_fade_setup /* 2C6A8 800512A8 0200202D */ daddu $a0, $s0, $zero .L800512AC: /* 2C6AC 800512AC 0220202D */ daddu $a0, $s1, $zero /* 2C6B0 800512B0 0C0148CB */ jal au_amb_restore_voices /* 2C6B4 800512B4 0200282D */ daddu $a1, $s0, $zero /* 2C6B8 800512B8 080144C0 */ j .L80051300 /* 2C6BC 800512BC 265201E4 */ addiu $s2, $s2, 0x1E4 .L800512C0: /* 2C6C0 800512C0 96020028 */ lhu $v0, 0x28($s0) /* 2C6C4 800512C4 10400003 */ beqz $v0, .L800512D4 /* 2C6C8 800512C8 00000000 */ nop /* 2C6CC 800512CC 0C014354 */ jal au_amb_fade_setup /* 2C6D0 800512D0 0200202D */ daddu $a0, $s0, $zero .L800512D4: /* 2C6D4 800512D4 92030025 */ lbu $v1, 0x25($s0) /* 2C6D8 800512D8 24020002 */ addiu $v0, $zero, 0x2 /* 2C6DC 800512DC 14620005 */ bne $v1, $v0, .L800512F4 /* 2C6E0 800512E0 0220202D */ daddu $a0, $s1, $zero /* 2C6E4 800512E4 0C01487A */ jal au_amb_player_stop /* 2C6E8 800512E8 0200282D */ daddu $a1, $s0, $zero /* 2C6EC 800512EC A2140025 */ sb $s4, 0x25($s0) /* 2C6F0 800512F0 0220202D */ daddu $a0, $s1, $zero .L800512F4: /* 2C6F4 800512F4 0C01450D */ jal au_amb_player_update /* 2C6F8 800512F8 0200282D */ daddu $a1, $s0, $zero /* 2C6FC 800512FC 265201E4 */ addiu $s2, $s2, 0x1E4 .L80051300: /* 2C700 80051300 26730001 */ addiu $s3, $s3, 0x1 /* 2C704 80051304 2A620004 */ slti $v0, $s3, 0x4 /* 2C708 80051308 1440FFCB */ bnez $v0, .L80051238 /* 2C70C 8005130C 02328021 */ addu $s0, $s1, $s2 /* 2C710 80051310 A2200021 */ sb $zero, 0x21($s1) /* 2C714 80051314 8FBF0024 */ lw $ra, 0x24($sp) /* 2C718 80051318 8FB40020 */ lw $s4, 0x20($sp) /* 2C71C 8005131C 8FB3001C */ lw $s3, 0x1C($sp) /* 2C720 80051320 8FB20018 */ lw $s2, 0x18($sp) /* 2C724 80051324 8FB10014 */ lw $s1, 0x14($sp) /* 2C728 80051328 8FB00010 */ lw $s0, 0x10($sp) /* 2C72C 8005132C 03E00008 */ jr $ra /* 2C730 80051330 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void au_amb_manager_update(AmbienceManager* manager) { u32 i; s32 j; for (i = 0; i < ARRAY_COUNT(manager->voiceStates); i++) { AmbienceVoiceState* voiceState = &manager->voiceStates[i]; if (voiceState->info.released == TRUE && manager->globals->voices[i].priority != manager->priority) { voiceState->info.all = 0; } } for (j = 0; j < ARRAY_COUNT(manager->players); j++) { AmbiencePlayer* player = &manager->players[j]; s32 mode; if (player->mseqReadPos != NULL) { if (manager->loadTracksFadeInfo) { au_amb_load_track_fade_info(manager, player); } mode = player->mode; if (mode != AMB_MODE_NORMAL) { if (mode == AMB_MODE_PAUSING) { player->mode = AMB_MODE_STOPPED; au_amb_save_voices(manager, player); au_amb_player_stop(manager, player); } else if (player->mode == AMB_MODE_RESUMING) { player->mode = AMB_MODE_NORMAL; if (player->fadeSettingsTime != 0) { au_amb_fade_setup(player); } au_amb_restore_voices(manager, player); } } else { // case AMB_MODE_NORMAL if (player->fadeSettingsTime != 0) { au_amb_fade_setup(player); } if (player->playState == AMB_PLAYER_STOPPING) { au_amb_player_stop(manager, player); player->playState = AMB_PLAYER_STOPPED; } au_amb_player_update(manager, player); } } } manager->loadTracksFadeInfo = FALSE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel huff_puff_breath_main /* 3D7A70 E00DC000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3D7A74 E00DC004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3D7A78 E00DC008 4485A000 */ mtc1 $a1, $f20 /* 3D7A7C E00DC00C F7B60048 */ sdc1 $f22, 0x48($sp) /* 3D7A80 E00DC010 4486B000 */ mtc1 $a2, $f22 /* 3D7A84 E00DC014 AFB30034 */ sw $s3, 0x34($sp) /* 3D7A88 E00DC018 0080982D */ daddu $s3, $a0, $zero /* 3D7A8C E00DC01C F7B80050 */ sdc1 $f24, 0x50($sp) /* 3D7A90 E00DC020 4487C000 */ mtc1 $a3, $f24 /* 3D7A94 E00DC024 27A40010 */ addiu $a0, $sp, 0x10 /* 3D7A98 E00DC028 AFB00028 */ sw $s0, 0x28($sp) /* 3D7A9C E00DC02C 8FB00074 */ lw $s0, 0x74($sp) /* 3D7AA0 E00DC030 3C02E00E */ lui $v0, %hi(huff_puff_breath_init) /* 3D7AA4 E00DC034 2442C190 */ addiu $v0, $v0, %lo(huff_puff_breath_init) /* 3D7AA8 E00DC038 AFA20018 */ sw $v0, 0x18($sp) /* 3D7AAC E00DC03C 3C02E00E */ lui $v0, %hi(huff_puff_breath_update) /* 3D7AB0 E00DC040 2442C198 */ addiu $v0, $v0, %lo(huff_puff_breath_update) /* 3D7AB4 E00DC044 AFA2001C */ sw $v0, 0x1C($sp) /* 3D7AB8 E00DC048 3C02E00E */ lui $v0, %hi(huff_puff_breath_render) /* 3D7ABC E00DC04C 2442C2C0 */ addiu $v0, $v0, %lo(huff_puff_breath_render) /* 3D7AC0 E00DC050 AFA20020 */ sw $v0, 0x20($sp) /* 3D7AC4 E00DC054 2402006E */ addiu $v0, $zero, 0x6E /* 3D7AC8 E00DC058 AFBF0038 */ sw $ra, 0x38($sp) /* 3D7ACC E00DC05C AFB20030 */ sw $s2, 0x30($sp) /* 3D7AD0 E00DC060 AFB1002C */ sw $s1, 0x2C($sp) /* 3D7AD4 E00DC064 AFA00010 */ sw $zero, 0x10($sp) /* 3D7AD8 E00DC068 AFA00024 */ sw $zero, 0x24($sp) /* 3D7ADC E00DC06C 0C080124 */ jal shim_create_effect_instance /* 3D7AE0 E00DC070 AFA20014 */ sw $v0, 0x14($sp) /* 3D7AE4 E00DC074 24040050 */ addiu $a0, $zero, 0x50 /* 3D7AE8 E00DC078 24030001 */ addiu $v1, $zero, 0x1 /* 3D7AEC E00DC07C 0040902D */ daddu $s2, $v0, $zero /* 3D7AF0 E00DC080 0C08012C */ jal shim_general_heap_malloc /* 3D7AF4 E00DC084 AE430008 */ sw $v1, 0x8($s2) /* 3D7AF8 E00DC088 0040882D */ daddu $s1, $v0, $zero /* 3D7AFC E00DC08C 16200003 */ bnez $s1, .LE00DC09C /* 3D7B00 E00DC090 AE42000C */ sw $v0, 0xC($s2) .LE00DC094: /* 3D7B04 E00DC094 08037025 */ j .LE00DC094 /* 3D7B08 E00DC098 00000000 */ nop .LE00DC09C: /* 3D7B0C E00DC09C AE330000 */ sw $s3, 0x0($s1) /* 3D7B10 E00DC0A0 1E000004 */ bgtz $s0, .LE00DC0B4 /* 3D7B14 E00DC0A4 AE200014 */ sw $zero, 0x14($s1) /* 3D7B18 E00DC0A8 240203E8 */ addiu $v0, $zero, 0x3E8 /* 3D7B1C E00DC0AC 0803702E */ j .LE00DC0B8 /* 3D7B20 E00DC0B0 AE220010 */ sw $v0, 0x10($s1) .LE00DC0B4: /* 3D7B24 E00DC0B4 AE300010 */ sw $s0, 0x10($s1) .LE00DC0B8: /* 3D7B28 E00DC0B8 241000FF */ addiu $s0, $zero, 0xFF /* 3D7B2C E00DC0BC AE200024 */ sw $zero, 0x24($s1) /* 3D7B30 E00DC0C0 E6340004 */ swc1 $f20, 0x4($s1) /* 3D7B34 E00DC0C4 E6360008 */ swc1 $f22, 0x8($s1) /* 3D7B38 E00DC0C8 E638000C */ swc1 $f24, 0xC($s1) /* 3D7B3C E00DC0CC C7A00070 */ lwc1 $f0, 0x70($sp) /* 3D7B40 E00DC0D0 240200E6 */ addiu $v0, $zero, 0xE6 /* 3D7B44 E00DC0D4 AE22002C */ sw $v0, 0x2C($s1) /* 3D7B48 E00DC0D8 24020032 */ addiu $v0, $zero, 0x32 /* 3D7B4C E00DC0DC AE300018 */ sw $s0, 0x18($s1) /* 3D7B50 E00DC0E0 AE30001C */ sw $s0, 0x1C($s1) /* 3D7B54 E00DC0E4 AE300020 */ sw $s0, 0x20($s1) /* 3D7B58 E00DC0E8 AE300028 */ sw $s0, 0x28($s1) /* 3D7B5C E00DC0EC AE220030 */ sw $v0, 0x30($s1) /* 3D7B60 E00DC0F0 AE300034 */ sw $s0, 0x34($s1) /* 3D7B64 E00DC0F4 E620004C */ swc1 $f0, 0x4C($s1) /* 3D7B68 E00DC0F8 C7A00068 */ lwc1 $f0, 0x68($sp) /* 3D7B6C E00DC0FC AE200044 */ sw $zero, 0x44($s1) /* 3D7B70 E00DC100 E6200048 */ swc1 $f0, 0x48($s1) /* 3D7B74 E00DC104 C7A0006C */ lwc1 $f0, 0x6C($sp) /* 3D7B78 E00DC108 24040020 */ addiu $a0, $zero, 0x20 /* 3D7B7C E00DC10C 0C080138 */ jal shim_rand_int /* 3D7B80 E00DC110 E620003C */ swc1 $f0, 0x3C($s1) /* 3D7B84 E00DC114 24040010 */ addiu $a0, $zero, 0x10 /* 3D7B88 E00DC118 44820000 */ mtc1 $v0, $f0 /* 3D7B8C E00DC11C 00000000 */ nop /* 3D7B90 E00DC120 46800020 */ cvt.s.w $f0, $f0 /* 3D7B94 E00DC124 0C080138 */ jal shim_rand_int /* 3D7B98 E00DC128 E6200038 */ swc1 $f0, 0x38($s1) /* 3D7B9C E00DC12C 44820000 */ mtc1 $v0, $f0 /* 3D7BA0 E00DC130 00000000 */ nop /* 3D7BA4 E00DC134 46800020 */ cvt.s.w $f0, $f0 /* 3D7BA8 E00DC138 0240102D */ daddu $v0, $s2, $zero /* 3D7BAC E00DC13C 24030096 */ addiu $v1, $zero, 0x96 /* 3D7BB0 E00DC140 AE230020 */ sw $v1, 0x20($s1) /* 3D7BB4 E00DC144 240300D7 */ addiu $v1, $zero, 0xD7 /* 3D7BB8 E00DC148 AE230028 */ sw $v1, 0x28($s1) /* 3D7BBC E00DC14C 240300D2 */ addiu $v1, $zero, 0xD2 /* 3D7BC0 E00DC150 AE23002C */ sw $v1, 0x2C($s1) /* 3D7BC4 E00DC154 2403000A */ addiu $v1, $zero, 0xA /* 3D7BC8 E00DC158 E6200040 */ swc1 $f0, 0x40($s1) /* 3D7BCC E00DC15C AE300018 */ sw $s0, 0x18($s1) /* 3D7BD0 E00DC160 AE30001C */ sw $s0, 0x1C($s1) /* 3D7BD4 E00DC164 AE230030 */ sw $v1, 0x30($s1) /* 3D7BD8 E00DC168 8FBF0038 */ lw $ra, 0x38($sp) /* 3D7BDC E00DC16C 8FB30034 */ lw $s3, 0x34($sp) /* 3D7BE0 E00DC170 8FB20030 */ lw $s2, 0x30($sp) /* 3D7BE4 E00DC174 8FB1002C */ lw $s1, 0x2C($sp) /* 3D7BE8 E00DC178 8FB00028 */ lw $s0, 0x28($sp) /* 3D7BEC E00DC17C D7B80050 */ ldc1 $f24, 0x50($sp) /* 3D7BF0 E00DC180 D7B60048 */ ldc1 $f22, 0x48($sp) /* 3D7BF4 E00DC184 D7B40040 */ ldc1 $f20, 0x40($sp) /* 3D7BF8 E00DC188 03E00008 */ jr $ra /* 3D7BFC E00DC18C 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* huff_puff_breath_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 angle, f32 speed, f32 scale, s32 timeLeft) { EffectBlueprint effectBp; EffectInstance* effect; HuffPuffBreathFXData* data; s32 numParts = 1; effectBp.init = huff_puff_breath_init; effectBp.update = huff_puff_breath_update; effectBp.renderWorld = huff_puff_breath_render; effectBp.unk_00 = 0; effectBp.renderUI = NULL; effectBp.effectID = EFFECT_HUFF_PUFF_BREATH; effect = shim_create_effect_instance(&effectBp); effect->numParts = numParts; data = effect->data.huffPuffBreath = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(data != NULL); data->type = type; data->lifeTime = 0; if (timeLeft <= 0) { data->timeLeft = 1000; } else { data->timeLeft = timeLeft; } data->primA = 0; data->pos.x = posX; data->pos.y = posY; data->pos.z = posZ; data->scale = scale; data->primR = 255; data->envG = 230; data->primG = 255; data->primB = 255; data->envR = 255; data->envB = 50; data->envA = 255; data->angle = angle; data->speedY = 0; data->speedX = speed; data->texOffsetX = shim_rand_int(32); data->texOffsetY = shim_rand_int(16); data->primB = 150; data->envR = 215; data->envG = 210; data->primR = 255; data->primG = 255; data->envB = 10; return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel apply_transform_to_children /* EDF50 802C95A0 27BDFE70 */ addiu $sp, $sp, -0x190 /* EDF54 802C95A4 AFB40188 */ sw $s4, 0x188($sp) /* EDF58 802C95A8 0080A02D */ daddu $s4, $a0, $zero /* EDF5C 802C95AC AFB30184 */ sw $s3, 0x184($sp) /* EDF60 802C95B0 00A0982D */ daddu $s3, $a1, $zero /* EDF64 802C95B4 AFBF018C */ sw $ra, 0x18C($sp) /* EDF68 802C95B8 AFB20180 */ sw $s2, 0x180($sp) /* EDF6C 802C95BC AFB1017C */ sw $s1, 0x17C($sp) /* EDF70 802C95C0 AFB00178 */ sw $s0, 0x178($sp) /* EDF74 802C95C4 8E62000C */ lw $v0, 0xC($s3) /* EDF78 802C95C8 2411FFFF */ addiu $s1, $zero, -0x1 /* EDF7C 802C95CC 8C450000 */ lw $a1, 0x0($v0) /* EDF80 802C95D0 0C0B1EAF */ jal evt_get_variable /* EDF84 802C95D4 0260202D */ daddu $a0, $s3, $zero /* EDF88 802C95D8 0040282D */ daddu $a1, $v0, $zero /* EDF8C 802C95DC 3C06800A */ lui $a2, %hi(mdl_currentModelTreeNodeInfo) /* EDF90 802C95E0 8CC6A5F4 */ lw $a2, %lo(mdl_currentModelTreeNodeInfo)($a2) /* EDF94 802C95E4 00051080 */ sll $v0, $a1, 2 /* EDF98 802C95E8 00462021 */ addu $a0, $v0, $a2 /* EDF9C 802C95EC 90830000 */ lbu $v1, 0x0($a0) /* EDFA0 802C95F0 286200FF */ slti $v0, $v1, 0xFF /* EDFA4 802C95F4 10400004 */ beqz $v0, .L802C9608 /* EDFA8 802C95F8 0220902D */ daddu $s2, $s1, $zero /* EDFAC 802C95FC 0060902D */ daddu $s2, $v1, $zero /* EDFB0 802C9600 080B2597 */ j .L802C965C /* EDFB4 802C9604 0240882D */ daddu $s1, $s2, $zero .L802C9608: /* EDFB8 802C9608 24B0FFFF */ addiu $s0, $a1, -0x1 /* EDFBC 802C960C 90850001 */ lbu $a1, 0x1($a0) /* EDFC0 802C9610 06000013 */ bltz $s0, .L802C9660 /* EDFC4 802C9614 27A20010 */ addiu $v0, $sp, 0x10 /* EDFC8 802C9618 2407FFFF */ addiu $a3, $zero, -0x1 /* EDFCC 802C961C 00101080 */ sll $v0, $s0, 2 /* EDFD0 802C9620 00462021 */ addu $a0, $v0, $a2 .L802C9624: /* EDFD4 802C9624 90820001 */ lbu $v0, 0x1($a0) /* EDFD8 802C9628 00A2102A */ slt $v0, $a1, $v0 /* EDFDC 802C962C 1040000C */ beqz $v0, .L802C9660 /* EDFE0 802C9630 27A20010 */ addiu $v0, $sp, 0x10 /* EDFE4 802C9634 90830000 */ lbu $v1, 0x0($a0) /* EDFE8 802C9638 286200FF */ slti $v0, $v1, 0xFF /* EDFEC 802C963C 50400005 */ beql $v0, $zero, .L802C9654 /* EDFF0 802C9640 2610FFFF */ addiu $s0, $s0, -0x1 /* EDFF4 802C9644 52470001 */ beql $s2, $a3, .L802C964C /* EDFF8 802C9648 0060902D */ daddu $s2, $v1, $zero .L802C964C: /* EDFFC 802C964C 0060882D */ daddu $s1, $v1, $zero /* EE000 802C9650 2610FFFF */ addiu $s0, $s0, -0x1 .L802C9654: /* EE004 802C9654 0601FFF3 */ bgez $s0, .L802C9624 /* EE008 802C9658 2484FFFC */ addiu $a0, $a0, -0x4 .L802C965C: /* EE00C 802C965C 27A20010 */ addiu $v0, $sp, 0x10 .L802C9660: /* EE010 802C9660 0260202D */ daddu $a0, $s3, $zero /* EE014 802C9664 24830160 */ addiu $v1, $a0, 0x160 .L802C9668: /* EE018 802C9668 8C880000 */ lw $t0, 0x0($a0) /* EE01C 802C966C 8C890004 */ lw $t1, 0x4($a0) /* EE020 802C9670 8C8A0008 */ lw $t2, 0x8($a0) /* EE024 802C9674 8C8B000C */ lw $t3, 0xC($a0) /* EE028 802C9678 AC480000 */ sw $t0, 0x0($v0) /* EE02C 802C967C AC490004 */ sw $t1, 0x4($v0) /* EE030 802C9680 AC4A0008 */ sw $t2, 0x8($v0) /* EE034 802C9684 AC4B000C */ sw $t3, 0xC($v0) /* EE038 802C9688 24840010 */ addiu $a0, $a0, 0x10 /* EE03C 802C968C 1483FFF6 */ bne $a0, $v1, .L802C9668 /* EE040 802C9690 24420010 */ addiu $v0, $v0, 0x10 /* EE044 802C9694 0220802D */ daddu $s0, $s1, $zero /* EE048 802C9698 8C880000 */ lw $t0, 0x0($a0) /* EE04C 802C969C 8C890004 */ lw $t1, 0x4($a0) /* EE050 802C96A0 AC480000 */ sw $t0, 0x0($v0) /* EE054 802C96A4 AC490004 */ sw $t1, 0x4($v0) /* EE058 802C96A8 8FB1001C */ lw $s1, 0x1C($sp) /* EE05C 802C96AC 0250102A */ slt $v0, $s2, $s0 /* EE060 802C96B0 8E330000 */ lw $s3, 0x0($s1) /* EE064 802C96B4 54400011 */ bnel $v0, $zero, .L802C96FC /* EE068 802C96B8 AE330000 */ sw $s3, 0x0($s1) /* EE06C 802C96BC 27A40010 */ addiu $a0, $sp, 0x10 .L802C96C0: /* EE070 802C96C0 3C038015 */ lui $v1, %hi(gCurrentModels) /* EE074 802C96C4 8C6312CC */ lw $v1, %lo(gCurrentModels)($v1) /* EE078 802C96C8 00101080 */ sll $v0, $s0, 2 /* EE07C 802C96CC 00431021 */ addu $v0, $v0, $v1 /* EE080 802C96D0 8C420000 */ lw $v0, 0x0($v0) /* EE084 802C96D4 24050001 */ addiu $a1, $zero, 0x1 /* EE088 802C96D8 AFB1001C */ sw $s1, 0x1C($sp) /* EE08C 802C96DC 94420002 */ lhu $v0, 0x2($v0) /* EE090 802C96E0 02058021 */ addu $s0, $s0, $a1 /* EE094 802C96E4 0280F809 */ jalr $s4 /* EE098 802C96E8 AE220000 */ sw $v0, 0x0($s1) /* EE09C 802C96EC 0250102A */ slt $v0, $s2, $s0 /* EE0A0 802C96F0 1040FFF3 */ beqz $v0, .L802C96C0 /* EE0A4 802C96F4 27A40010 */ addiu $a0, $sp, 0x10 /* EE0A8 802C96F8 AE330000 */ sw $s3, 0x0($s1) .L802C96FC: /* EE0AC 802C96FC 8FBF018C */ lw $ra, 0x18C($sp) /* EE0B0 802C9700 8FB40188 */ lw $s4, 0x188($sp) /* EE0B4 802C9704 8FB30184 */ lw $s3, 0x184($sp) /* EE0B8 802C9708 8FB20180 */ lw $s2, 0x180($sp) /* EE0BC 802C970C 8FB1017C */ lw $s1, 0x17C($sp) /* EE0C0 802C9710 8FB00178 */ lw $s0, 0x178($sp) /* EE0C4 802C9714 03E00008 */ jr $ra /* EE0C8 802C9718 27BD0190 */ addiu $sp, $sp, 0x190 ### DECOMPILED C INSTRUCTIONS: void apply_transform_to_children(ApiStatus (*apiFunc)(Evt*, s32), Evt* script) { Evt localEvt; ModelTreeInfo* parentModelInfo; ModelTreeInfo* childModelInfo; s32 parentModelID; s32 originalArg; s32* argsPtr; s32 modelIndex; s32 firstChild; s32 lastChild; s32 i; firstChild = -1; parentModelID = evt_get_variable(script, *script->ptrReadPos); modelIndex = (*mdl_currentModelTreeNodeInfo)[parentModelID].modelIndex; lastChild = -1; if (modelIndex < 0xFF) { firstChild = lastChild = modelIndex; } else { s32 treeDepth = (*mdl_currentModelTreeNodeInfo)[parentModelID].treeDepth; // check all models with a lowerID in the tree for (i = parentModelID - 1; i >= 0; i--) { childModelInfo = &(*mdl_currentModelTreeNodeInfo)[i]; if (treeDepth < childModelInfo->treeDepth) { s32 childModelIndex = childModelInfo->modelIndex; if (childModelIndex < 0xFF) { if (lastChild == -1) { lastChild = childModelIndex; } firstChild = childModelIndex; } } else { // if node is no longer deeper than parent, we've exhausted the children break; } } } // copy the input script into a local one we will modify localEvt = *script; argsPtr = localEvt.ptrReadPos; originalArg = *argsPtr; for (i = firstChild; i <= lastChild; i++) { Model* model = (*gCurrentModels)[i]; localEvt.ptrReadPos = argsPtr; *argsPtr = model->modelID; apiFunc(&localEvt, TRUE); } *argsPtr = originalArg; }
### RAW ASSEMBLY INSTRUCTIONS: glabel falling_leaves_main /* 35E920 E0058000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 35E924 E0058004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 35E928 E0058008 4485A000 */ mtc1 $a1, $f20 /* 35E92C E005800C AFB1002C */ sw $s1, 0x2C($sp) /* 35E930 E0058010 0080882D */ daddu $s1, $a0, $zero /* 35E934 E0058014 F7B60048 */ sdc1 $f22, 0x48($sp) /* 35E938 E0058018 4486B000 */ mtc1 $a2, $f22 /* 35E93C E005801C 27A40010 */ addiu $a0, $sp, 0x10 /* 35E940 E0058020 F7B80050 */ sdc1 $f24, 0x50($sp) /* 35E944 E0058024 4487C000 */ mtc1 $a3, $f24 /* 35E948 E0058028 3C02E006 */ lui $v0, %hi(falling_leaves_init) /* 35E94C E005802C 244281AC */ addiu $v0, $v0, %lo(falling_leaves_init) /* 35E950 E0058030 AFA20018 */ sw $v0, 0x18($sp) /* 35E954 E0058034 3C02E006 */ lui $v0, %hi(falling_leaves_update) /* 35E958 E0058038 244281B4 */ addiu $v0, $v0, %lo(falling_leaves_update) /* 35E95C E005803C AFA2001C */ sw $v0, 0x1C($sp) /* 35E960 E0058040 3C02E006 */ lui $v0, %hi(falling_leaves_render) /* 35E964 E0058044 24428490 */ addiu $v0, $v0, %lo(falling_leaves_render) /* 35E968 E0058048 AFA20020 */ sw $v0, 0x20($sp) /* 35E96C E005804C 2402002C */ addiu $v0, $zero, 0x2C /* 35E970 E0058050 AFBF0038 */ sw $ra, 0x38($sp) /* 35E974 E0058054 AFB30034 */ sw $s3, 0x34($sp) /* 35E978 E0058058 AFB20030 */ sw $s2, 0x30($sp) /* 35E97C E005805C AFB00028 */ sw $s0, 0x28($sp) /* 35E980 E0058060 AFA00010 */ sw $zero, 0x10($sp) /* 35E984 E0058064 AFA00024 */ sw $zero, 0x24($sp) /* 35E988 E0058068 0C080124 */ jal shim_create_effect_instance /* 35E98C E005806C AFA20014 */ sw $v0, 0x14($sp) /* 35E990 E0058070 24040104 */ addiu $a0, $zero, 0x104 /* 35E994 E0058074 24120005 */ addiu $s2, $zero, 0x5 /* 35E998 E0058078 0040802D */ daddu $s0, $v0, $zero /* 35E99C E005807C 0C08012C */ jal shim_general_heap_malloc /* 35E9A0 E0058080 AE120008 */ sw $s2, 0x8($s0) /* 35E9A4 E0058084 0040182D */ daddu $v1, $v0, $zero /* 35E9A8 E0058088 14600003 */ bnez $v1, .LE0058098 /* 35E9AC E005808C AE03000C */ sw $v1, 0xC($s0) .LE0058090: /* 35E9B0 E0058090 08016024 */ j .LE0058090 /* 35E9B4 E0058094 00000000 */ nop .LE0058098: /* 35E9B8 E0058098 24020064 */ addiu $v0, $zero, 0x64 /* 35E9BC E005809C AC710000 */ sw $s1, 0x0($v1) /* 35E9C0 E00580A0 E4740004 */ swc1 $f20, 0x4($v1) /* 35E9C4 E00580A4 E4760008 */ swc1 $f22, 0x8($v1) /* 35E9C8 E00580A8 E478000C */ swc1 $f24, 0xC($v1) /* 35E9CC E00580AC AC620028 */ sw $v0, 0x28($v1) /* 35E9D0 E00580B0 AC60002C */ sw $zero, 0x2C($v1) /* 35E9D4 E00580B4 AC600024 */ sw $zero, 0x24($v1) /* 35E9D8 E00580B8 24110001 */ addiu $s1, $zero, 0x1 /* 35E9DC E00580BC 0232102A */ slt $v0, $s1, $s2 /* 35E9E0 E00580C0 10400030 */ beqz $v0, .LE0058184 /* 35E9E4 E00580C4 24630034 */ addiu $v1, $v1, 0x34 /* 35E9E8 E00580C8 3C136666 */ lui $s3, (0x66666667 >> 16) /* 35E9EC E00580CC 36736667 */ ori $s3, $s3, (0x66666667 & 0xFFFF) /* 35E9F0 E00580D0 24700014 */ addiu $s0, $v1, 0x14 .LE00580D4: /* 35E9F4 E00580D4 0C080138 */ jal shim_rand_int /* 35E9F8 E00580D8 2404001E */ addiu $a0, $zero, 0x1E /* 35E9FC E00580DC 2404001E */ addiu $a0, $zero, 0x1E /* 35EA00 E00580E0 2442FFF1 */ addiu $v0, $v0, -0xF /* 35EA04 E00580E4 44820000 */ mtc1 $v0, $f0 /* 35EA08 E00580E8 00000000 */ nop /* 35EA0C E00580EC 46800020 */ cvt.s.w $f0, $f0 /* 35EA10 E00580F0 E600FFF0 */ swc1 $f0, -0x10($s0) /* 35EA14 E00580F4 0C080138 */ jal shim_rand_int /* 35EA18 E00580F8 AE00FFF4 */ sw $zero, -0xC($s0) /* 35EA1C E00580FC 24040168 */ addiu $a0, $zero, 0x168 /* 35EA20 E0058100 2442FFF1 */ addiu $v0, $v0, -0xF /* 35EA24 E0058104 44820000 */ mtc1 $v0, $f0 /* 35EA28 E0058108 00000000 */ nop /* 35EA2C E005810C 46800020 */ cvt.s.w $f0, $f0 /* 35EA30 E0058110 0C080138 */ jal shim_rand_int /* 35EA34 E0058114 E600FFF8 */ swc1 $f0, -0x8($s0) /* 35EA38 E0058118 24040168 */ addiu $a0, $zero, 0x168 /* 35EA3C E005811C 44820000 */ mtc1 $v0, $f0 /* 35EA40 E0058120 00000000 */ nop /* 35EA44 E0058124 46800020 */ cvt.s.w $f0, $f0 /* 35EA48 E0058128 0C080138 */ jal shim_rand_int /* 35EA4C E005812C E6000004 */ swc1 $f0, 0x4($s0) /* 35EA50 E0058130 24040064 */ addiu $a0, $zero, 0x64 /* 35EA54 E0058134 44820000 */ mtc1 $v0, $f0 /* 35EA58 E0058138 00000000 */ nop /* 35EA5C E005813C 46800020 */ cvt.s.w $f0, $f0 /* 35EA60 E0058140 0C080138 */ jal shim_rand_int /* 35EA64 E0058144 E600000C */ swc1 $f0, 0xC($s0) /* 35EA68 E0058148 00530018 */ mult $v0, $s3 /* 35EA6C E005814C 26310001 */ addiu $s1, $s1, 0x1 /* 35EA70 E0058150 000217C3 */ sra $v0, $v0, 31 /* 35EA74 E0058154 AE00FFFC */ sw $zero, -0x4($s0) /* 35EA78 E0058158 AE000000 */ sw $zero, 0x0($s0) /* 35EA7C E005815C 00004010 */ mfhi $t0 /* 35EA80 E0058160 00081883 */ sra $v1, $t0, 2 /* 35EA84 E0058164 00621823 */ subu $v1, $v1, $v0 /* 35EA88 E0058168 44830000 */ mtc1 $v1, $f0 /* 35EA8C E005816C 00000000 */ nop /* 35EA90 E0058170 46800020 */ cvt.s.w $f0, $f0 /* 35EA94 E0058174 E6000008 */ swc1 $f0, 0x8($s0) /* 35EA98 E0058178 0232102A */ slt $v0, $s1, $s2 /* 35EA9C E005817C 1440FFD5 */ bnez $v0, .LE00580D4 /* 35EAA0 E0058180 26100034 */ addiu $s0, $s0, 0x34 .LE0058184: /* 35EAA4 E0058184 8FBF0038 */ lw $ra, 0x38($sp) /* 35EAA8 E0058188 8FB30034 */ lw $s3, 0x34($sp) /* 35EAAC E005818C 8FB20030 */ lw $s2, 0x30($sp) /* 35EAB0 E0058190 8FB1002C */ lw $s1, 0x2C($sp) /* 35EAB4 E0058194 8FB00028 */ lw $s0, 0x28($sp) /* 35EAB8 E0058198 D7B80050 */ ldc1 $f24, 0x50($sp) /* 35EABC E005819C D7B60048 */ ldc1 $f22, 0x48($sp) /* 35EAC0 E00581A0 D7B40040 */ ldc1 $f20, 0x40($sp) /* 35EAC4 E00581A4 03E00008 */ jr $ra /* 35EAC8 E00581A8 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void falling_leaves_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3) { EffectBlueprint bp; EffectInstance* effect; FallingLeavesFXData* part; s32 numParts = 5; s32 i; bp.init = falling_leaves_init; bp.update = falling_leaves_update; bp.renderWorld = falling_leaves_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_FALLING_LEAVES; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; part = effect->data.fallingLeaves = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.fallingLeaves != NULL); part->unk_00 = arg0; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_28 = 100; part->unk_2C = 0; part->unk_24 = 0; part++; for (i = 1; i < numParts; i++, part++) { part->unk_04 = shim_rand_int(30) - 15; part->unk_08 = 0; part->unk_0C = shim_rand_int(30) - 15; part->unk_18 = shim_rand_int(360); part->unk_20 = shim_rand_int(360); part->unk_1C = shim_rand_int(100) / 10; part->unk_10 = 0; part->unk_14 = 0; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel guPerspective /* 3F140 80063D40 27BDFF78 */ addiu $sp, $sp, -0x88 /* 3F144 80063D44 F7B80070 */ sdc1 $f24, 0x70($sp) /* 3F148 80063D48 C7B80098 */ lwc1 $f24, 0x98($sp) /* 3F14C 80063D4C F7BA0078 */ sdc1 $f26, 0x78($sp) /* 3F150 80063D50 C7BA009C */ lwc1 $f26, 0x9C($sp) /* 3F154 80063D54 F7BC0080 */ sdc1 $f28, 0x80($sp) /* 3F158 80063D58 C7BC00A0 */ lwc1 $f28, 0xA0($sp) /* 3F15C 80063D5C F7B40060 */ sdc1 $f20, 0x60($sp) /* 3F160 80063D60 4486A000 */ mtc1 $a2, $f20 /* 3F164 80063D64 AFB20058 */ sw $s2, 0x58($sp) /* 3F168 80063D68 00809021 */ addu $s2, $a0, $zero /* 3F16C 80063D6C AFB10054 */ sw $s1, 0x54($sp) /* 3F170 80063D70 00A08821 */ addu $s1, $a1, $zero /* 3F174 80063D74 AFB00050 */ sw $s0, 0x50($sp) /* 3F178 80063D78 27B00010 */ addiu $s0, $sp, 0x10 /* 3F17C 80063D7C F7B60068 */ sdc1 $f22, 0x68($sp) /* 3F180 80063D80 4487B000 */ mtc1 $a3, $f22 /* 3F184 80063D84 AFBF005C */ sw $ra, 0x5C($sp) /* 3F188 80063D88 0C019D28 */ jal guMtxIdentF /* 3F18C 80063D8C 02002021 */ addu $a0, $s0, $zero /* 3F190 80063D90 3C01800A */ lui $at, %hi(D_80099BD0) /* 3F194 80063D94 D4209BD0 */ ldc1 $f0, %lo(D_80099BD0)($at) /* 3F198 80063D98 4600A521 */ cvt.d.s $f20, $f20 /* 3F19C 80063D9C 4620A502 */ mul.d $f20, $f20, $f0 /* 3F1A0 80063DA0 3C014000 */ lui $at, (0x40000000 >> 16) /* 3F1A4 80063DA4 44810000 */ mtc1 $at, $f0 /* 3F1A8 80063DA8 4620A520 */ cvt.s.d $f20, $f20 /* 3F1AC 80063DAC 4600A503 */ div.s $f20, $f20, $f0 /* 3F1B0 80063DB0 0C00A874 */ jal cos_rad /* 3F1B4 80063DB4 4600A306 */ mov.s $f12, $f20 /* 3F1B8 80063DB8 4600A306 */ mov.s $f12, $f20 /* 3F1BC 80063DBC 0C00A85B */ jal sin_rad /* 3F1C0 80063DC0 46000506 */ mov.s $f20, $f0 /* 3F1C4 80063DC4 4600A503 */ div.s $f20, $f20, $f0 /* 3F1C8 80063DC8 461AC100 */ add.s $f4, $f24, $f26 /* 3F1CC 80063DCC 461AC081 */ sub.s $f2, $f24, $f26 /* 3F1D0 80063DD0 46022103 */ div.s $f4, $f4, $f2 /* 3F1D4 80063DD4 4618C000 */ add.s $f0, $f24, $f24 /* 3F1D8 80063DD8 461A0002 */ mul.s $f0, $f0, $f26 /* 3F1DC 80063DDC 46020003 */ div.s $f0, $f0, $f2 /* 3F1E0 80063DE0 4616A583 */ div.s $f22, $f20, $f22 /* 3F1E4 80063DE4 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3F1E8 80063DE8 44811000 */ mtc1 $at, $f2 /* 3F1EC 80063DEC 00002821 */ addu $a1, $zero, $zero /* 3F1F0 80063DF0 AFA0004C */ sw $zero, 0x4C($sp) /* 3F1F4 80063DF4 E7A2003C */ swc1 $f2, 0x3C($sp) /* 3F1F8 80063DF8 E7B40024 */ swc1 $f20, 0x24($sp) /* 3F1FC 80063DFC E7A40038 */ swc1 $f4, 0x38($sp) /* 3F200 80063E00 E7A00048 */ swc1 $f0, 0x48($sp) /* 3F204 80063E04 E7B60010 */ swc1 $f22, 0x10($sp) .L80063E08: /* 3F208 80063E08 00002021 */ addu $a0, $zero, $zero /* 3F20C 80063E0C 02001821 */ addu $v1, $s0, $zero .L80063E10: /* 3F210 80063E10 C4600000 */ lwc1 $f0, 0x0($v1) /* 3F214 80063E14 461C0002 */ mul.s $f0, $f0, $f28 /* 3F218 80063E18 24840001 */ addiu $a0, $a0, 0x1 /* 3F21C 80063E1C 28820004 */ slti $v0, $a0, 0x4 /* 3F220 80063E20 E4600000 */ swc1 $f0, 0x0($v1) /* 3F224 80063E24 1440FFFA */ bnez $v0, .L80063E10 /* 3F228 80063E28 24630004 */ addiu $v1, $v1, 0x4 /* 3F22C 80063E2C 24A50001 */ addiu $a1, $a1, 0x1 /* 3F230 80063E30 28A20004 */ slti $v0, $a1, 0x4 /* 3F234 80063E34 1440FFF4 */ bnez $v0, .L80063E08 /* 3F238 80063E38 26100010 */ addiu $s0, $s0, 0x10 /* 3F23C 80063E3C 52200025 */ beql $s1, $zero, .L80063ED4 /* 3F240 80063E40 27A40010 */ addiu $a0, $sp, 0x10 /* 3F244 80063E44 461AC080 */ add.s $f2, $f24, $f26 /* 3F248 80063E48 3C01800A */ lui $at, %hi(D_80099BD8) /* 3F24C 80063E4C D4209BD8 */ ldc1 $f0, %lo(D_80099BD8)($at) /* 3F250 80063E50 460010A1 */ cvt.d.s $f2, $f2 /* 3F254 80063E54 4620103E */ c.le.d $f2, $f0 /* 3F258 80063E58 00000000 */ nop /* 3F25C 80063E5C 00000000 */ nop /* 3F260 80063E60 4501001A */ bc1t .L80063ECC /* 3F264 80063E64 3402FFFF */ ori $v0, $zero, 0xFFFF /* 3F268 80063E68 3C01800A */ lui $at, %hi(D_80099BE0) /* 3F26C 80063E6C D4209BE0 */ ldc1 $f0, %lo(D_80099BE0)($at) /* 3F270 80063E70 46220083 */ div.d $f2, $f0, $f2 /* 3F274 80063E74 3C01800A */ lui $at, %hi(D_80099BE8) /* 3F278 80063E78 D4209BE8 */ ldc1 $f0, %lo(D_80099BE8)($at) /* 3F27C 80063E7C 4622003E */ c.le.d $f0, $f2 /* 3F280 80063E80 00000000 */ nop /* 3F284 80063E84 00000000 */ nop /* 3F288 80063E88 45030006 */ bc1tl .L80063EA4 /* 3F28C 80063E8C 46201001 */ sub.d $f0, $f2, $f0 /* 3F290 80063E90 4620100D */ trunc.w.d $f0, $f2 /* 3F294 80063E94 44030000 */ mfc1 $v1, $f0 /* 3F298 80063E98 00000000 */ nop /* 3F29C 80063E9C 08018FAE */ j .L80063EB8 /* 3F2A0 80063EA0 00601021 */ addu $v0, $v1, $zero .L80063EA4: /* 3F2A4 80063EA4 4620008D */ trunc.w.d $f2, $f0 /* 3F2A8 80063EA8 44031000 */ mfc1 $v1, $f2 /* 3F2AC 80063EAC 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3F2B0 80063EB0 00621825 */ or $v1, $v1, $v0 /* 3F2B4 80063EB4 00601021 */ addu $v0, $v1, $zero .L80063EB8: /* 3F2B8 80063EB8 A6220000 */ sh $v0, 0x0($s1) /* 3F2BC 80063EBC 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3F2C0 80063EC0 14400004 */ bnez $v0, .L80063ED4 /* 3F2C4 80063EC4 27A40010 */ addiu $a0, $sp, 0x10 /* 3F2C8 80063EC8 24020001 */ addiu $v0, $zero, 0x1 .L80063ECC: /* 3F2CC 80063ECC A6220000 */ sh $v0, 0x0($s1) /* 3F2D0 80063ED0 27A40010 */ addiu $a0, $sp, 0x10 .L80063ED4: /* 3F2D4 80063ED4 0C019D40 */ jal guMtxF2L /* 3F2D8 80063ED8 02402821 */ addu $a1, $s2, $zero /* 3F2DC 80063EDC 8FBF005C */ lw $ra, 0x5C($sp) /* 3F2E0 80063EE0 8FB20058 */ lw $s2, 0x58($sp) /* 3F2E4 80063EE4 8FB10054 */ lw $s1, 0x54($sp) /* 3F2E8 80063EE8 8FB00050 */ lw $s0, 0x50($sp) /* 3F2EC 80063EEC D7BC0080 */ ldc1 $f28, 0x80($sp) /* 3F2F0 80063EF0 D7BA0078 */ ldc1 $f26, 0x78($sp) /* 3F2F4 80063EF4 D7B80070 */ ldc1 $f24, 0x70($sp) /* 3F2F8 80063EF8 D7B60068 */ ldc1 $f22, 0x68($sp) /* 3F2FC 80063EFC D7B40060 */ ldc1 $f20, 0x60($sp) /* 3F300 80063F00 03E00008 */ jr $ra /* 3F304 80063F04 27BD0088 */ addiu $sp, $sp, 0x88 /* 3F308 80063F08 00000000 */ nop /* 3F30C 80063F0C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void guPerspectiveF(f32 mf[4][4], u16 *perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) { f32 cot; s32 i, j; guMtxIdentF(mf); fovy *= 3.1415926 / 180.0; cot = cos_rad(fovy/2) / sin_rad(fovy/2); mf[0][0] = cot / aspect; mf[1][1] = cot; mf[2][2] = (near + far) / (near - far); mf[2][3] = -1; mf[3][2] = (2 * near * far) / (near - far); mf[3][3] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { mf[i][j] *= scale; } } if (perspNorm != (u16 *) NULL) { if (near + far <= 2.0) { *perspNorm = (u16) 0xFFFF; } else { *perspNorm = (u16) ((2.0 * 65536.0) / (near + far)); if (*perspNorm <= 0) { *perspNorm = (u16) 0x0001; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel destroy_popup_menu /* 8A9E8 800F1538 3C048011 */ lui $a0, %hi(PopupMenu_EmptybarHEID) /* 8A9EC 800F153C 8C84D65C */ lw $a0, %lo(PopupMenu_EmptybarHEID)($a0) /* 8A9F0 800F1540 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 8A9F4 800F1544 AFBF0018 */ sw $ra, 0x18($sp) /* 8A9F8 800F1548 AFB10014 */ sw $s1, 0x14($sp) /* 8A9FC 800F154C 0C05123D */ jal hud_element_free /* 8AA00 800F1550 AFB00010 */ sw $s0, 0x10($sp) /* 8AA04 800F1554 3C048011 */ lui $a0, %hi(D_8010D678) /* 8AA08 800F1558 8C84D678 */ lw $a0, %lo(D_8010D678)($a0) /* 8AA0C 800F155C 0C05123D */ jal hud_element_free /* 8AA10 800F1560 00000000 */ nop /* 8AA14 800F1564 3C048011 */ lui $a0, %hi(D_8010D66C) /* 8AA18 800F1568 8C84D66C */ lw $a0, %lo(D_8010D66C)($a0) /* 8AA1C 800F156C 0C05123D */ jal hud_element_free /* 8AA20 800F1570 00000000 */ nop /* 8AA24 800F1574 3C048011 */ lui $a0, %hi(D_8010D670) /* 8AA28 800F1578 8C84D670 */ lw $a0, %lo(D_8010D670)($a0) /* 8AA2C 800F157C 0C05123D */ jal hud_element_free /* 8AA30 800F1580 00000000 */ nop /* 8AA34 800F1584 3C048011 */ lui $a0, %hi(D_8010D674) /* 8AA38 800F1588 8C84D674 */ lw $a0, %lo(D_8010D674)($a0) /* 8AA3C 800F158C 0C05123D */ jal hud_element_free /* 8AA40 800F1590 00000000 */ nop /* 8AA44 800F1594 3C108011 */ lui $s0, %hi(gPopupMenu) /* 8AA48 800F1598 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu) /* 8AA4C 800F159C 8E020000 */ lw $v0, 0x0($s0) /* 8AA50 800F15A0 8C430318 */ lw $v1, 0x318($v0) /* 8AA54 800F15A4 24020003 */ addiu $v0, $zero, 0x3 /* 8AA58 800F15A8 14620009 */ bne $v1, $v0, .L800F15D0 /* 8AA5C 800F15AC 00000000 */ nop /* 8AA60 800F15B0 3C048011 */ lui $a0, %hi(PopupTitleIconHEID) /* 8AA64 800F15B4 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0) /* 8AA68 800F15B8 0C05123D */ jal hud_element_free /* 8AA6C 800F15BC 00000000 */ nop /* 8AA70 800F15C0 3C048011 */ lui $a0, %hi(D_8010D664) /* 8AA74 800F15C4 8C84D664 */ lw $a0, %lo(D_8010D664)($a0) /* 8AA78 800F15C8 0C05123D */ jal hud_element_free /* 8AA7C 800F15CC 00000000 */ nop .L800F15D0: /* 8AA80 800F15D0 8E020000 */ lw $v0, 0x0($s0) /* 8AA84 800F15D4 8C420318 */ lw $v0, 0x318($v0) /* 8AA88 800F15D8 24110004 */ addiu $s1, $zero, 0x4 /* 8AA8C 800F15DC 14510009 */ bne $v0, $s1, .L800F1604 /* 8AA90 800F15E0 00000000 */ nop /* 8AA94 800F15E4 3C048011 */ lui $a0, %hi(PopupTitleIconHEID) /* 8AA98 800F15E8 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0) /* 8AA9C 800F15EC 0C05123D */ jal hud_element_free /* 8AAA0 800F15F0 00000000 */ nop /* 8AAA4 800F15F4 3C048011 */ lui $a0, %hi(D_8010D664) /* 8AAA8 800F15F8 8C84D664 */ lw $a0, %lo(D_8010D664)($a0) /* 8AAAC 800F15FC 0C05123D */ jal hud_element_free /* 8AAB0 800F1600 00000000 */ nop .L800F1604: /* 8AAB4 800F1604 8E020000 */ lw $v0, 0x0($s0) /* 8AAB8 800F1608 8C430318 */ lw $v1, 0x318($v0) /* 8AABC 800F160C 24020001 */ addiu $v0, $zero, 0x1 /* 8AAC0 800F1610 10620003 */ beq $v1, $v0, .L800F1620 /* 8AAC4 800F1614 00000000 */ nop /* 8AAC8 800F1618 14710005 */ bne $v1, $s1, .L800F1630 /* 8AACC 800F161C 00000000 */ nop .L800F1620: /* 8AAD0 800F1620 3C048011 */ lui $a0, %hi(D_8010D668) /* 8AAD4 800F1624 8C84D668 */ lw $a0, %lo(D_8010D668)($a0) /* 8AAD8 800F1628 0C05123D */ jal hud_element_free /* 8AADC 800F162C 00000000 */ nop .L800F1630: /* 8AAE0 800F1630 3C108011 */ lui $s0, %hi(gPopupMenu) /* 8AAE4 800F1634 2610D69C */ addiu $s0, $s0, %lo(gPopupMenu) /* 8AAE8 800F1638 8E020000 */ lw $v0, 0x0($s0) /* 8AAEC 800F163C 8C430318 */ lw $v1, 0x318($v0) /* 8AAF0 800F1640 24020005 */ addiu $v0, $zero, 0x5 /* 8AAF4 800F1644 14620005 */ bne $v1, $v0, .L800F165C /* 8AAF8 800F1648 00000000 */ nop /* 8AAFC 800F164C 3C048011 */ lui $a0, %hi(PopupTitleIconHEID) /* 8AB00 800F1650 8C84D660 */ lw $a0, %lo(PopupTitleIconHEID)($a0) /* 8AB04 800F1654 0C05123D */ jal hud_element_free /* 8AB08 800F1658 00000000 */ nop .L800F165C: /* 8AB0C 800F165C 8E020000 */ lw $v0, 0x0($s0) /* 8AB10 800F1660 8C430318 */ lw $v1, 0x318($v0) /* 8AB14 800F1664 28620005 */ slti $v0, $v1, 0x5 /* 8AB18 800F1668 14400003 */ bnez $v0, .L800F1678 /* 8AB1C 800F166C 2402000C */ addiu $v0, $zero, 0xC /* 8AB20 800F1670 1462000E */ bne $v1, $v0, .L800F16AC /* 8AB24 800F1674 00000000 */ nop .L800F1678: /* 8AB28 800F1678 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 8AB2C 800F167C 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 8AB30 800F1680 80420070 */ lb $v0, 0x70($v0) /* 8AB34 800F1684 14400009 */ bnez $v0, .L800F16AC /* 8AB38 800F1688 00000000 */ nop /* 8AB3C 800F168C 3C028011 */ lui $v0, %hi(D_8010D69A) /* 8AB40 800F1690 8042D69A */ lb $v0, %lo(D_8010D69A)($v0) /* 8AB44 800F1694 14400003 */ bnez $v0, .L800F16A4 /* 8AB48 800F1698 00000000 */ nop /* 8AB4C 800F169C 0C03A631 */ jal status_bar_respond_to_changes /* 8AB50 800F16A0 00000000 */ nop .L800F16A4: /* 8AB54 800F16A4 0C03A5EE */ jal close_status_bar /* 8AB58 800F16A8 00000000 */ nop .L800F16AC: /* 8AB5C 800F16AC 8FBF0018 */ lw $ra, 0x18($sp) /* 8AB60 800F16B0 8FB10014 */ lw $s1, 0x14($sp) /* 8AB64 800F16B4 8FB00010 */ lw $s0, 0x10($sp) /* 8AB68 800F16B8 2402FFFC */ addiu $v0, $zero, -0x4 /* 8AB6C 800F16BC 3C018011 */ lui $at, %hi(gPopupState) /* 8AB70 800F16C0 AC22D640 */ sw $v0, %lo(gPopupState)($at) /* 8AB74 800F16C4 03E00008 */ jr $ra /* 8AB78 800F16C8 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void destroy_popup_menu(void) { hud_element_free(PopupMenu_EmptybarHEID); hud_element_free(PopupMenu_EntryIconHEID); hud_element_free(PopupMenu_CursorHEID); hud_element_free(PopupMenu_UpArrowHEID); hud_element_free(PopupMenu_DownArrowHEID); if (gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE) { hud_element_free(PopupMenu_TitleIconHEID); hud_element_free(PopupMenu_TimesHEID); } if (gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) { hud_element_free(PopupMenu_TitleIconHEID); hud_element_free(PopupMenu_TimesHEID); } if (gPopupMenu->popupType == POPUP_TYPE_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER) { hud_element_free(PopupMenu_PartnerLevelHEID); } if (gPopupMenu->popupType == POPUP_TYPE_SELL_ITEM) { hud_element_free(PopupMenu_TitleIconHEID); } if ((gPopupMenu->popupType <= POPUP_TYPE_USE_ITEM || gPopupMenu->popupType == POPUP_TYPE_SWITCH_PARTNER || gPopupMenu->popupType == POPUP_TYPE_THROW_AWAY_ITEM || gPopupMenu->popupType == POPUP_TYPE_TRADE_FOR_BADGE || gPopupMenu->popupType == POPUP_TYPE_UPGRADE_PARTNER || gPopupMenu->popupType == POPUP_TYPE_USE_KEY ) && !gGameStatusPtr->isBattle) { if (D_8010D69A == 0) { status_bar_respond_to_changes(); } close_status_bar(); } gPopupState = POPUP_STATE_MINUS_4; }
### RAW ASSEMBLY INSTRUCTIONS: glabel shop_open_item_select_popup /* 7E17D4 80280954 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 7E17D8 80280958 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 7E17DC 8028095C 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 7E17E0 80280960 AFBF003C */ sw $ra, 0x3C($sp) /* 7E17E4 80280964 AFBE0038 */ sw $fp, 0x38($sp) /* 7E17E8 80280968 AFB70034 */ sw $s7, 0x34($sp) /* 7E17EC 8028096C AFB60030 */ sw $s6, 0x30($sp) /* 7E17F0 80280970 AFB5002C */ sw $s5, 0x2C($sp) /* 7E17F4 80280974 AFB40028 */ sw $s4, 0x28($sp) /* 7E17F8 80280978 AFB30024 */ sw $s3, 0x24($sp) /* 7E17FC 8028097C AFB20020 */ sw $s2, 0x20($sp) /* 7E1800 80280980 AFB1001C */ sw $s1, 0x1C($sp) /* 7E1804 80280984 AFB00018 */ sw $s0, 0x18($sp) /* 7E1808 80280988 8C420144 */ lw $v0, 0x144($v0) /* 7E180C 8028098C 0080B82D */ daddu $s7, $a0, $zero /* 7E1810 80280990 24420028 */ addiu $v0, $v0, 0x28 /* 7E1814 80280994 12E00006 */ beqz $s7, .L802809B0 /* 7E1818 80280998 AFA20010 */ sw $v0, 0x10($sp) /* 7E181C 8028099C 24020001 */ addiu $v0, $zero, 0x1 /* 7E1820 802809A0 12E20006 */ beq $s7, $v0, .L802809BC /* 7E1824 802809A4 24150007 */ addiu $s5, $zero, 0x7 /* 7E1828 802809A8 080A0271 */ j .L802809C4 /* 7E182C 802809AC 24140020 */ addiu $s4, $zero, 0x20 .L802809B0: /* 7E1830 802809B0 24150005 */ addiu $s5, $zero, 0x5 /* 7E1834 802809B4 080A0271 */ j .L802809C4 /* 7E1838 802809B8 2414000A */ addiu $s4, $zero, 0xA .L802809BC: /* 7E183C 802809BC 24150006 */ addiu $s5, $zero, 0x6 /* 7E1840 802809C0 2414000A */ addiu $s4, $zero, 0xA .L802809C4: /* 7E1844 802809C4 0000902D */ daddu $s2, $zero, $zero /* 7E1848 802809C8 12800027 */ beqz $s4, .L80280A68 /* 7E184C 802809CC 0240982D */ daddu $s3, $s2, $zero /* 7E1850 802809D0 2AFE0002 */ slti $fp, $s7, 0x2 /* 7E1854 802809D4 3C168008 */ lui $s6, %hi(gItemTable) /* 7E1858 802809D8 26D678E0 */ addiu $s6, $s6, %lo(gItemTable) /* 7E185C 802809DC 3C118011 */ lui $s1, %hi(gPlayerData) /* 7E1860 802809E0 2631F290 */ addiu $s1, $s1, %lo(gPlayerData) /* 7E1864 802809E4 8FB00010 */ lw $s0, 0x10($sp) .L802809E8: /* 7E1868 802809E8 13C00005 */ beqz $fp, .L80280A00 /* 7E186C 802809EC 00000000 */ nop D_802809F0: /* 7E1870 802809F0 06E00003 */ bltz $s7, .L80280A00 D_802809F4: /* 7E1874 802809F4 00000000 */ nop DemoBattleBeginDelay: /* 7E1878 802809F8 080A0281 */ j .L80280A04 bHPDigitHudScripts: /* 7E187C 802809FC 862401B4 */ lh $a0, 0x1B4($s1) .L80280A00: /* 7E1880 80280A00 862401C8 */ lh $a0, 0x1C8($s1) .L80280A04: /* 7E1884 80280A04 10800014 */ beqz $a0, .L80280A58 /* 7E1888 80280A08 00041140 */ sll $v0, $a0, 5 /* 7E188C 80280A0C 00561821 */ addu $v1, $v0, $s6 /* 7E1890 80280A10 84620004 */ lh $v0, 0x4($v1) /* 7E1894 80280A14 3C058009 */ lui $a1, %hi(gItemHudScripts) /* 7E1898 80280A18 24A5A680 */ addiu $a1, $a1, %lo(gItemHudScripts) /* 7E189C 80280A1C 000210C0 */ sll $v0, $v0, 3 /* 7E18A0 80280A20 00451021 */ addu $v0, $v0, $a1 /* 7E18A4 80280A24 8C420000 */ lw $v0, 0x0($v0) /* 7E18A8 80280A28 24050001 */ addiu $a1, $zero, 0x1 /* 7E18AC 80280A2C AE120108 */ sw $s2, 0x108($s0) BattleScreenFadeAmt: /* 7E18B0 80280A30 AE05018C */ sw $a1, 0x18C($s0) BtlPutPartnerAway: /* 7E18B4 80280A34 AE020000 */ sw $v0, 0x0($s0) /* 7E18B8 80280A38 8C620000 */ lw $v0, 0x0($v1) /* 7E18BC 80280A3C AE020084 */ sw $v0, 0x84($s0) /* 7E18C0 80280A40 8C620014 */ lw $v0, 0x14($v1) /* 7E18C4 80280A44 02659821 */ addu $s3, $s3, $a1 /* 7E18C8 80280A48 0C0A02DE */ jal shop_get_sell_price /* 7E18CC 80280A4C AE020294 */ sw $v0, 0x294($s0) /* 7E18D0 80280A50 AE020210 */ sw $v0, 0x210($s0) /* 7E18D4 80280A54 26100004 */ addiu $s0, $s0, 0x4 .L80280A58: /* 7E18D8 80280A58 26520001 */ addiu $s2, $s2, 0x1 /* 7E18DC 80280A5C 0254102A */ slt $v0, $s2, $s4 /* 7E18E0 80280A60 1440FFE1 */ bnez $v0, .L802809E8 /* 7E18E4 80280A64 26310002 */ addiu $s1, $s1, 0x2 .L80280A68: /* 7E18E8 80280A68 8FA40010 */ lw $a0, 0x10($sp) /* 7E18EC 80280A6C AC950318 */ sw $s5, 0x318($a0) /* 7E18F0 80280A70 AC930324 */ sw $s3, 0x324($a0) /* 7E18F4 80280A74 0C03D3F1 */ jal create_shop_popup_menu /* 7E18F8 80280A78 AC800328 */ sw $zero, 0x328($a0) /* 7E18FC 80280A7C 0C03A625 */ jal status_bar_ignore_changes /* 7E1900 80280A80 00000000 */ nop /* 7E1904 80280A84 0C03A63B */ jal func_800E98EC /* 7E1908 80280A88 00000000 */ nop /* 7E190C 80280A8C 0C03A5E3 */ jal open_status_bar_short /* 7E1910 80280A90 00000000 */ nop /* 7E1914 80280A94 8FBF003C */ lw $ra, 0x3C($sp) /* 7E1918 80280A98 8FBE0038 */ lw $fp, 0x38($sp) /* 7E191C 80280A9C 8FB70034 */ lw $s7, 0x34($sp) /* 7E1920 80280AA0 8FB60030 */ lw $s6, 0x30($sp) /* 7E1924 80280AA4 8FB5002C */ lw $s5, 0x2C($sp) /* 7E1928 80280AA8 8FB40028 */ lw $s4, 0x28($sp) /* 7E192C 80280AAC 8FB30024 */ lw $s3, 0x24($sp) /* 7E1930 80280AB0 8FB20020 */ lw $s2, 0x20($sp) /* 7E1934 80280AB4 8FB1001C */ lw $s1, 0x1C($sp) /* 7E1938 80280AB8 8FB00018 */ lw $s0, 0x18($sp) /* 7E193C 80280ABC 03E00008 */ jr $ra /* 7E1940 80280AC0 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void shop_open_item_select_popup(s32 mode) { PopupMenu* menu = &gGameStatusPtr->mapShop->itemSelectMenu; s32 numItemSlots; s32 popupType; s32 numEntries; s32 itemID; s32 i; switch (mode) { case 0: popupType = POPUP_MENU_SELL_ITEM; numItemSlots = 10; break; case 1: popupType = POPUP_MENU_CHECK_ITEM; numItemSlots = 10; break; default: popupType = POPUP_MENU_CLAIM_ITEM; numItemSlots = 32; break; } numEntries = 0; for (i = 0; i < numItemSlots; i++) { ItemData* itemData; switch (mode) { case 0: case 1: itemID = gPlayerData.invItems[i]; if (itemID == ITEM_NONE) { continue; } itemData = &gItemTable[itemID]; break; default: itemID = gPlayerData.storedItems[i]; if (itemID == ITEM_NONE) { continue; } itemData = &gItemTable[itemID]; break; } menu->ptrIcon[numEntries] = gItemHudScripts[itemData->hudElemID].enabled; menu->userIndex[numEntries] = i; menu->enabled[numEntries] = TRUE; menu->nameMsg[numEntries] = itemData->nameMsg; menu->descMsg[numEntries] = itemData->shortDescMsg; menu->value[numEntries] = shop_get_sell_price(itemID); numEntries++; } menu->popupType = popupType; menu->numEntries = numEntries; menu->initialPos = 0; create_shop_popup_menu(menu); status_bar_ignore_changes(); func_800E98EC(); open_status_bar_short(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel NpcFacePlayer /* F3678 802CECC8 27BDFFD0 */ addiu $sp, $sp, -0x30 /* F367C 802CECCC AFB10014 */ sw $s1, 0x14($sp) /* F3680 802CECD0 0080882D */ daddu $s1, $a0, $zero /* F3684 802CECD4 AFB40020 */ sw $s4, 0x20($sp) /* F3688 802CECD8 3C148011 */ lui $s4, %hi(gPlayerStatus) /* F368C 802CECDC 2694EFC8 */ addiu $s4, $s4, %lo(gPlayerStatus) /* F3690 802CECE0 AFB60028 */ sw $s6, 0x28($sp) /* F3694 802CECE4 26360074 */ addiu $s6, $s1, 0x74 /* F3698 802CECE8 AFB50024 */ sw $s5, 0x24($sp) /* F369C 802CECEC 26350078 */ addiu $s5, $s1, 0x78 /* F36A0 802CECF0 AFB3001C */ sw $s3, 0x1C($sp) /* F36A4 802CECF4 AFBF002C */ sw $ra, 0x2C($sp) /* F36A8 802CECF8 AFB20018 */ sw $s2, 0x18($sp) /* F36AC 802CECFC AFB00010 */ sw $s0, 0x10($sp) /* F36B0 802CED00 8E32000C */ lw $s2, 0xC($s1) /* F36B4 802CED04 10A00034 */ beqz $a1, .L802CEDD8 /* F36B8 802CED08 2633007C */ addiu $s3, $s1, 0x7C /* F36BC 802CED0C 8E450000 */ lw $a1, 0x0($s2) /* F36C0 802CED10 0C0B1EAF */ jal evt_get_variable /* F36C4 802CED14 26520004 */ addiu $s2, $s2, 0x4 /* F36C8 802CED18 0220202D */ daddu $a0, $s1, $zero /* F36CC 802CED1C 0C0B36B0 */ jal resolve_npc /* F36D0 802CED20 0040282D */ daddu $a1, $v0, $zero /* F36D4 802CED24 0040802D */ daddu $s0, $v0, $zero /* F36D8 802CED28 1200004B */ beqz $s0, .L802CEE58 /* F36DC 802CED2C 24020002 */ addiu $v0, $zero, 0x2 /* F36E0 802CED30 C600000C */ lwc1 $f0, 0xC($s0) /* F36E4 802CED34 E6200074 */ swc1 $f0, 0x74($s1) /* F36E8 802CED38 C60C0038 */ lwc1 $f12, 0x38($s0) /* F36EC 802CED3C C60E0040 */ lwc1 $f14, 0x40($s0) /* F36F0 802CED40 8E860028 */ lw $a2, 0x28($s4) /* F36F4 802CED44 0C00A720 */ jal atan2 /* F36F8 802CED48 8E870030 */ lw $a3, 0x30($s4) /* F36FC 802CED4C C6220074 */ lwc1 $f2, 0x74($s1) /* F3700 802CED50 46020001 */ sub.s $f0, $f0, $f2 /* F3704 802CED54 AE300070 */ sw $s0, 0x70($s1) /* F3708 802CED58 E6200078 */ swc1 $f0, 0x78($s1) /* F370C 802CED5C 8E450000 */ lw $a1, 0x0($s2) /* F3710 802CED60 0C0B1EAF */ jal evt_get_variable /* F3714 802CED64 0220202D */ daddu $a0, $s1, $zero /* F3718 802CED68 AE22007C */ sw $v0, 0x7C($s1) /* F371C 802CED6C A600008E */ sh $zero, 0x8E($s0) /* F3720 802CED70 C6220078 */ lwc1 $f2, 0x78($s1) /* F3724 802CED74 3C01C334 */ lui $at, (0xC3340000 >> 16) /* F3728 802CED78 44810000 */ mtc1 $at, $f0 /* F372C 802CED7C 00000000 */ nop /* F3730 802CED80 4600103C */ c.lt.s $f2, $f0 /* F3734 802CED84 00000000 */ nop /* F3738 802CED88 45000007 */ bc1f .L802CEDA8 /* F373C 802CED8C 00000000 */ nop /* F3740 802CED90 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* F3744 802CED94 44810000 */ mtc1 $at, $f0 /* F3748 802CED98 00000000 */ nop /* F374C 802CED9C 46001000 */ add.s $f0, $f2, $f0 /* F3750 802CEDA0 E6200078 */ swc1 $f0, 0x78($s1) /* F3754 802CEDA4 C6220078 */ lwc1 $f2, 0x78($s1) .L802CEDA8: /* F3758 802CEDA8 3C014334 */ lui $at, (0x43340000 >> 16) /* F375C 802CEDAC 44810000 */ mtc1 $at, $f0 /* F3760 802CEDB0 00000000 */ nop /* F3764 802CEDB4 4602003C */ c.lt.s $f0, $f2 /* F3768 802CEDB8 00000000 */ nop /* F376C 802CEDBC 45000006 */ bc1f .L802CEDD8 /* F3770 802CEDC0 00000000 */ nop /* F3774 802CEDC4 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* F3778 802CEDC8 44810000 */ mtc1 $at, $f0 /* F377C 802CEDCC 00000000 */ nop /* F3780 802CEDD0 46001001 */ sub.s $f0, $f2, $f0 /* F3784 802CEDD4 E6200078 */ swc1 $f0, 0x78($s1) .L802CEDD8: /* F3788 802CEDD8 8E620000 */ lw $v0, 0x0($s3) /* F378C 802CEDDC 8E300070 */ lw $s0, 0x70($s1) /* F3790 802CEDE0 1C400006 */ bgtz $v0, .L802CEDFC /* F3794 802CEDE4 24020002 */ addiu $v0, $zero, 0x2 /* F3798 802CEDE8 C600000C */ lwc1 $f0, 0xC($s0) /* F379C 802CEDEC C6A20000 */ lwc1 $f2, 0x0($s5) /* F37A0 802CEDF0 46020000 */ add.s $f0, $f0, $f2 /* F37A4 802CEDF4 080B3B96 */ j .L802CEE58 /* F37A8 802CEDF8 E600000C */ swc1 $f0, 0xC($s0) .L802CEDFC: /* F37AC 802CEDFC 9602008E */ lhu $v0, 0x8E($s0) /* F37B0 802CEE00 24420001 */ addiu $v0, $v0, 0x1 /* F37B4 802CEE04 A602008E */ sh $v0, 0x8E($s0) /* F37B8 802CEE08 00021400 */ sll $v0, $v0, 16 /* F37BC 802CEE0C 00021403 */ sra $v0, $v0, 16 /* F37C0 802CEE10 C6A00000 */ lwc1 $f0, 0x0($s5) /* F37C4 802CEE14 44821000 */ mtc1 $v0, $f2 /* F37C8 802CEE18 00000000 */ nop /* F37CC 802CEE1C 468010A0 */ cvt.s.w $f2, $f2 /* F37D0 802CEE20 46020002 */ mul.s $f0, $f0, $f2 /* F37D4 802CEE24 00000000 */ nop /* F37D8 802CEE28 C6CC0000 */ lwc1 $f12, 0x0($s6) /* F37DC 802CEE2C C6620000 */ lwc1 $f2, 0x0($s3) /* F37E0 802CEE30 468010A0 */ cvt.s.w $f2, $f2 /* F37E4 802CEE34 46020003 */ div.s $f0, $f0, $f2 /* F37E8 802CEE38 46006300 */ add.s $f12, $f12, $f0 /* F37EC 802CEE3C 0C00A6C9 */ jal clamp_angle /* F37F0 802CEE40 E60C000C */ swc1 $f12, 0xC($s0) /* F37F4 802CEE44 8602008E */ lh $v0, 0x8E($s0) /* F37F8 802CEE48 E600000C */ swc1 $f0, 0xC($s0) /* F37FC 802CEE4C 8E630000 */ lw $v1, 0x0($s3) /* F3800 802CEE50 0043102A */ slt $v0, $v0, $v1 /* F3804 802CEE54 38420001 */ xori $v0, $v0, 0x1 .L802CEE58: /* F3808 802CEE58 8FBF002C */ lw $ra, 0x2C($sp) /* F380C 802CEE5C 8FB60028 */ lw $s6, 0x28($sp) /* F3810 802CEE60 8FB50024 */ lw $s5, 0x24($sp) /* F3814 802CEE64 8FB40020 */ lw $s4, 0x20($sp) /* F3818 802CEE68 8FB3001C */ lw $s3, 0x1C($sp) /* F381C 802CEE6C 8FB20018 */ lw $s2, 0x18($sp) /* F3820 802CEE70 8FB10014 */ lw $s1, 0x14($sp) /* F3824 802CEE74 8FB00010 */ lw $s0, 0x10($sp) /* F3828 802CEE78 03E00008 */ jr $ra /* F382C 802CEE7C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: ApiStatus NpcFacePlayer(Evt* script, s32 isInitialCall) { PlayerStatus* playerStatus = &gPlayerStatus; Bytecode* args = script->ptrReadPos; f32* initialYaw = &script->functionTempF[1]; f32* deltaYaw = &script->functionTempF[2]; s32* turnTime = &script->functionTemp[3]; Npc* npc; if (isInitialCall) { s32 npcID = evt_get_variable(script, *args++); npc = resolve_npc(script, npcID); if (npc == NULL) { return ApiStatus_DONE2; } *initialYaw = npc->yaw; *deltaYaw = atan2(npc->pos.x, npc->pos.z, playerStatus->position.x, playerStatus->position.z) - *initialYaw; script->functionTempPtr[0] = npc; *turnTime = evt_get_variable(script, *args++); npc->duration = 0; if (*deltaYaw < -180.0f) { *deltaYaw += 360.0f; } if (*deltaYaw > 180.0f) { *deltaYaw -= 360.0f; } } npc = script->functionTempPtr[0]; if (*turnTime > 0) { npc->duration++; npc->yaw = *initialYaw + ((*deltaYaw * npc->duration) / *turnTime); npc->yaw = clamp_angle(npc->yaw); return !(npc->duration < *turnTime) * ApiStatus_DONE1; } npc->yaw += *deltaYaw; return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel CreatePushBlockGrid /* 7E4160 802832E0 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 7E4164 802832E4 AFB10014 */ sw $s1, 0x14($sp) /* 7E4168 802832E8 0080882D */ daddu $s1, $a0, $zero /* 7E416C 802832EC AFBF0034 */ sw $ra, 0x34($sp) /* 7E4170 802832F0 AFBE0030 */ sw $fp, 0x30($sp) /* 7E4174 802832F4 AFB7002C */ sw $s7, 0x2C($sp) /* 7E4178 802832F8 AFB60028 */ sw $s6, 0x28($sp) /* 7E417C 802832FC AFB50024 */ sw $s5, 0x24($sp) /* 7E4180 80283300 AFB40020 */ sw $s4, 0x20($sp) /* 7E4184 80283304 AFB3001C */ sw $s3, 0x1C($sp) /* 7E4188 80283308 AFB20018 */ sw $s2, 0x18($sp) /* 7E418C 8028330C AFB00010 */ sw $s0, 0x10($sp) /* 7E4190 80283310 8E30000C */ lw $s0, 0xC($s1) /* 7E4194 80283314 8E050000 */ lw $a1, 0x0($s0) /* 7E4198 80283318 0C0B1EAF */ jal evt_get_variable /* 7E419C 8028331C 26100004 */ addiu $s0, $s0, 0x4 /* 7E41A0 80283320 8E050000 */ lw $a1, 0x0($s0) /* 7E41A4 80283324 26100004 */ addiu $s0, $s0, 0x4 /* 7E41A8 80283328 0220202D */ daddu $a0, $s1, $zero /* 7E41AC 8028332C 0C0B1EAF */ jal evt_get_variable /* 7E41B0 80283330 0040902D */ daddu $s2, $v0, $zero /* 7E41B4 80283334 8E050000 */ lw $a1, 0x0($s0) /* 7E41B8 80283338 26100004 */ addiu $s0, $s0, 0x4 /* 7E41BC 8028333C 0220202D */ daddu $a0, $s1, $zero /* 7E41C0 80283340 0C0B1EAF */ jal evt_get_variable /* 7E41C4 80283344 0040A82D */ daddu $s5, $v0, $zero /* 7E41C8 80283348 8E050000 */ lw $a1, 0x0($s0) /* 7E41CC 8028334C 26100004 */ addiu $s0, $s0, 0x4 /* 7E41D0 80283350 0220202D */ daddu $a0, $s1, $zero /* 7E41D4 80283354 0C0B1EAF */ jal evt_get_variable /* 7E41D8 80283358 0040A02D */ daddu $s4, $v0, $zero /* 7E41DC 8028335C 8E050000 */ lw $a1, 0x0($s0) /* 7E41E0 80283360 26100004 */ addiu $s0, $s0, 0x4 /* 7E41E4 80283364 0220202D */ daddu $a0, $s1, $zero /* 7E41E8 80283368 0C0B1EAF */ jal evt_get_variable /* 7E41EC 8028336C 0040F02D */ daddu $fp, $v0, $zero bMarioHideAnims: /* 7E41F0 80283370 0220202D */ daddu $a0, $s1, $zero /* 7E41F4 80283374 8E050000 */ lw $a1, 0x0($s0) /* 7E41F8 80283378 0C0B1EAF */ jal evt_get_variable /* 7E41FC 8028337C 0040B82D */ daddu $s7, $v0, $zero /* 7E4200 80283380 02B40018 */ mult $s5, $s4 /* 7E4204 80283384 26100004 */ addiu $s0, $s0, 0x4 /* 7E4208 80283388 0220202D */ daddu $a0, $s1, $zero /* 7E420C 8028338C 8E050000 */ lw $a1, 0x0($s0) /* 7E4210 80283390 00008812 */ mflo $s1 /* 7E4214 80283394 0C0B1EAF */ jal evt_get_variable /* 7E4218 80283398 0040B02D */ daddu $s6, $v0, $zero /* 7E421C 8028339C 2404001C */ addiu $a0, $zero, 0x1C /* 7E4220 802833A0 0C00AB0A */ jal general_heap_malloc /* 7E4224 802833A4 0040982D */ daddu $s3, $v0, $zero /* 7E4228 802833A8 00129080 */ sll $s2, $s2, 2 /* 7E422C 802833AC 0040802D */ daddu $s0, $v0, $zero /* 7E4230 802833B0 3C01802E */ lui $at, %hi(wPushBlockGrids) /* 7E4234 802833B4 00320821 */ addu $at, $at, $s2 /* 7E4238 802833B8 AC30BC88 */ sw $s0, %lo(wPushBlockGrids)($at) /* 7E423C 802833BC 0C00AB0A */ jal general_heap_malloc /* 7E4240 802833C0 0220202D */ daddu $a0, $s1, $zero /* 7E4244 802833C4 1660000D */ bnez $s3, .L802833FC /* 7E4248 802833C8 AE020000 */ sw $v0, 0x0($s0) /* 7E424C 802833CC 1A200018 */ blez $s1, .L80283430 /* 7E4250 802833D0 0000282D */ daddu $a1, $zero, $zero /* 7E4254 802833D4 0220202D */ daddu $a0, $s1, $zero .L802833D8: /* 7E4258 802833D8 8E020000 */ lw $v0, 0x0($s0) /* 7E425C 802833DC 00451021 */ addu $v0, $v0, $a1 /* 7E4260 802833E0 24A50001 */ addiu $a1, $a1, 0x1 /* 7E4264 802833E4 A0400000 */ sb $zero, 0x0($v0) /* 7E4268 802833E8 00A4102A */ slt $v0, $a1, $a0 /* 7E426C 802833EC 1440FFFA */ bnez $v0, .L802833D8 /* 7E4270 802833F0 00000000 */ nop /* 7E4274 802833F4 080A0D0D */ j .L80283434 /* 7E4278 802833F8 A2150004 */ sb $s5, 0x4($s0) .L802833FC: /* 7E427C 802833FC 0000282D */ daddu $a1, $zero, $zero /* 7E4280 80283400 1A20000B */ blez $s1, .L80283430 /* 7E4284 80283404 0260302D */ daddu $a2, $s3, $zero /* 7E4288 80283408 0220202D */ daddu $a0, $s1, $zero bPeachIdleAnims: /* 7E428C 8028340C 00C51021 */ addu $v0, $a2, $a1 .L80283410: /* 7E4290 80283410 8E030000 */ lw $v1, 0x0($s0) /* 7E4294 80283414 90420000 */ lbu $v0, 0x0($v0) /* 7E4298 80283418 00651821 */ addu $v1, $v1, $a1 /* 7E429C 8028341C 24A50001 */ addiu $a1, $a1, 0x1 bMarioDefenseTable: /* 7E42A0 80283420 A0620000 */ sb $v0, 0x0($v1) /* 7E42A4 80283424 00A4102A */ slt $v0, $a1, $a0 /* 7E42A8 80283428 1440FFF9 */ bnez $v0, .L80283410 bPlayerStatusTable: /* 7E42AC 8028342C 00C51021 */ addu $v0, $a2, $a1 .L80283430: /* 7E42B0 80283430 A2150004 */ sb $s5, 0x4($s0) .L80283434: /* 7E42B4 80283434 A2140005 */ sb $s4, 0x5($s0) /* 7E42B8 80283438 AE1E0008 */ sw $fp, 0x8($s0) /* 7E42BC 8028343C AE17000C */ sw $s7, 0xC($s0) /* 7E42C0 80283440 AE160010 */ sw $s6, 0x10($s0) /* 7E42C4 80283444 AE000014 */ sw $zero, 0x14($s0) /* 7E42C8 80283448 8FBF0034 */ lw $ra, 0x34($sp) /* 7E42CC 8028344C 8FBE0030 */ lw $fp, 0x30($sp) /* 7E42D0 80283450 8FB7002C */ lw $s7, 0x2C($sp) /* 7E42D4 80283454 8FB60028 */ lw $s6, 0x28($sp) /* 7E42D8 80283458 8FB50024 */ lw $s5, 0x24($sp) /* 7E42DC 8028345C 8FB40020 */ lw $s4, 0x20($sp) /* 7E42E0 80283460 8FB3001C */ lw $s3, 0x1C($sp) /* 7E42E4 80283464 8FB20018 */ lw $s2, 0x18($sp) /* 7E42E8 80283468 8FB10014 */ lw $s1, 0x14($sp) /* 7E42EC 8028346C 8FB00010 */ lw $s0, 0x10($sp) /* 7E42F0 80283470 24020002 */ addiu $v0, $zero, 0x2 /* 7E42F4 80283474 03E00008 */ jr $ra /* 7E42F8 80283478 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(CreatePushBlockGrid) { Bytecode* arg = script->ptrReadPos; s32 blockSystemID = evt_get_variable(script, *arg++); s32 sizeNx = evt_get_variable(script, *arg++); s32 sizeNz = evt_get_variable(script, *arg++); s32 centerX = evt_get_variable(script, *arg++); s32 centerY = evt_get_variable(script, *arg++); s32 centerZ = evt_get_variable(script, *arg++); u8* inputGridData = (u8*) evt_get_variable(script, *arg++); PushBlockGrid* blockGrid; u8* dataToCopy; s32 i; wPushBlockGrids[blockSystemID] = blockGrid = general_heap_malloc(sizeof(*blockGrid)); blockGrid->cells = general_heap_malloc(sizeNx*sizeNz); if (inputGridData == NULL) { for (i = 0; i < sizeNx*sizeNz; i++) { blockGrid->cells[i] = 0; } } else { dataToCopy = inputGridData; for (i = 0; i < sizeNx*sizeNz; i++) { blockGrid->cells[i] = dataToCopy[i]; } } blockGrid->numCellsX = sizeNx; blockGrid->numCellsZ = sizeNz; blockGrid->centerPos.x = centerX; blockGrid->centerPos.y = centerY; blockGrid->centerPos.z = centerZ; blockGrid->dropCallback = NULL; return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_effect /* 35964 8005A564 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 35968 8005A568 AFB20020 */ sw $s2, 0x20($sp) /* 3596C 8005A56C 0080902D */ daddu $s2, $a0, $zero /* 35970 8005A570 3C038008 */ lui $v1, %hi(gEffectTable) /* 35974 8005A574 2463F210 */ addiu $v1, $v1, %lo(gEffectTable) /* 35978 8005A578 00121040 */ sll $v0, $s2, 1 /* 3597C 8005A57C 00521021 */ addu $v0, $v0, $s2 /* 35980 8005A580 000210C0 */ sll $v0, $v0, 3 /* 35984 8005A584 AFB1001C */ sw $s1, 0x1C($sp) /* 35988 8005A588 00438821 */ addu $s1, $v0, $v1 /* 3598C 8005A58C 0000202D */ daddu $a0, $zero, $zero /* 35990 8005A590 AFB00018 */ sw $s0, 0x18($sp) /* 35994 8005A594 3C10800A */ lui $s0, %hi(gEffectGraphicsData) /* 35998 8005A598 26104000 */ addiu $s0, $s0, %lo(gEffectGraphicsData) /* 3599C 8005A59C AFBF0024 */ sw $ra, 0x24($sp) .L8005A5A0: /* 359A0 8005A5A0 8E020000 */ lw $v0, 0x0($s0) /* 359A4 8005A5A4 30420001 */ andi $v0, $v0, 0x1 /* 359A8 8005A5A8 50400005 */ beql $v0, $zero, .L8005A5C0 /* 359AC 8005A5AC 24840001 */ addiu $a0, $a0, 0x1 /* 359B0 8005A5B0 8E020004 */ lw $v0, 0x4($s0) /* 359B4 8005A5B4 10520006 */ beq $v0, $s2, .L8005A5D0 /* 359B8 8005A5B8 2882000F */ slti $v0, $a0, 0xF /* 359BC 8005A5BC 24840001 */ addiu $a0, $a0, 0x1 .L8005A5C0: /* 359C0 8005A5C0 2882000F */ slti $v0, $a0, 0xF /* 359C4 8005A5C4 1440FFF6 */ bnez $v0, .L8005A5A0 /* 359C8 8005A5C8 26100020 */ addiu $s0, $s0, 0x20 /* 359CC 8005A5CC 2882000F */ slti $v0, $a0, 0xF .L8005A5D0: /* 359D0 8005A5D0 14400030 */ bnez $v0, .L8005A694 /* 359D4 8005A5D4 24020001 */ addiu $v0, $zero, 0x1 /* 359D8 8005A5D8 0000202D */ daddu $a0, $zero, $zero /* 359DC 8005A5DC 3C10800A */ lui $s0, %hi(gEffectGraphicsData) /* 359E0 8005A5E0 26104000 */ addiu $s0, $s0, %lo(gEffectGraphicsData) .L8005A5E4: /* 359E4 8005A5E4 8E020000 */ lw $v0, 0x0($s0) /* 359E8 8005A5E8 30420001 */ andi $v0, $v0, 0x1 /* 359EC 8005A5EC 10400006 */ beqz $v0, .L8005A608 /* 359F0 8005A5F0 2882000F */ slti $v0, $a0, 0xF /* 359F4 8005A5F4 24840001 */ addiu $a0, $a0, 0x1 /* 359F8 8005A5F8 2882000F */ slti $v0, $a0, 0xF /* 359FC 8005A5FC 1440FFF9 */ bnez $v0, .L8005A5E4 /* 35A00 8005A600 26100020 */ addiu $s0, $s0, 0x20 /* 35A04 8005A604 2882000F */ slti $v0, $a0, 0xF .L8005A608: /* 35A08 8005A608 14400003 */ bnez $v0, .L8005A618 /* 35A0C 8005A60C 3C0700FF */ lui $a3, (0xFFFFFF >> 16) .L8005A610: /* 35A10 8005A610 08016984 */ j .L8005A610 /* 35A14 8005A614 00000000 */ nop .L8005A618: /* 35A18 8005A618 34E7FFFF */ ori $a3, $a3, (0xFFFFFF & 0xFFFF) /* 35A1C 8005A61C 0000282D */ daddu $a1, $zero, $zero /* 35A20 8005A620 2402FFFF */ addiu $v0, $zero, -0x1 /* 35A24 8005A624 3C038019 */ lui $v1, %hi(D_80197000) /* 35A28 8005A628 24637000 */ addiu $v1, $v1, %lo(D_80197000) /* 35A2C 8005A62C AFA20010 */ sw $v0, 0x10($sp) /* 35A30 8005A630 AFA20014 */ sw $v0, 0x14($sp) /* 35A34 8005A634 00041300 */ sll $v0, $a0, 12 /* 35A38 8005A638 00431021 */ addu $v0, $v0, $v1 /* 35A3C 8005A63C 8E26000C */ lw $a2, 0xC($s1) /* 35A40 8005A640 0C0199E8 */ jal osMapTLB /* 35A44 8005A644 00473824 */ and $a3, $v0, $a3 /* 35A48 8005A648 8E240004 */ lw $a0, 0x4($s1) /* 35A4C 8005A64C 8E250008 */ lw $a1, 0x8($s1) /* 35A50 8005A650 0C00A5CF */ jal dma_copy /* 35A54 8005A654 8E26000C */ lw $a2, 0xC($s1) /* 35A58 8005A658 8E220010 */ lw $v0, 0x10($s1) /* 35A5C 8005A65C 5040000D */ beql $v0, $zero, .L8005A694 /* 35A60 8005A660 24020001 */ addiu $v0, $zero, 0x1 /* 35A64 8005A664 8E240014 */ lw $a0, 0x14($s1) /* 35A68 8005A668 0C00AB0A */ jal general_heap_malloc /* 35A6C 8005A66C 00822023 */ subu $a0, $a0, $v0 /* 35A70 8005A670 14400003 */ bnez $v0, .L8005A680 /* 35A74 8005A674 AE02001C */ sw $v0, 0x1C($s0) .L8005A678: /* 35A78 8005A678 0801699E */ j .L8005A678 /* 35A7C 8005A67C 00000000 */ nop .L8005A680: /* 35A80 8005A680 8E240010 */ lw $a0, 0x10($s1) /* 35A84 8005A684 8E250014 */ lw $a1, 0x14($s1) /* 35A88 8005A688 0C00A5CF */ jal dma_copy /* 35A8C 8005A68C 8E06001C */ lw $a2, 0x1C($s0) /* 35A90 8005A690 24020001 */ addiu $v0, $zero, 0x1 .L8005A694: /* 35A94 8005A694 0040182D */ daddu $v1, $v0, $zero /* 35A98 8005A698 AE120004 */ sw $s2, 0x4($s0) /* 35A9C 8005A69C AE000008 */ sw $zero, 0x8($s0) /* 35AA0 8005A6A0 AE030000 */ sw $v1, 0x0($s0) /* 35AA4 8005A6A4 8FBF0024 */ lw $ra, 0x24($sp) /* 35AA8 8005A6A8 8FB20020 */ lw $s2, 0x20($sp) /* 35AAC 8005A6AC 8FB1001C */ lw $s1, 0x1C($sp) /* 35AB0 8005A6B0 8FB00018 */ lw $s0, 0x18($sp) /* 35AB4 8005A6B4 03E00008 */ jr $ra /* 35AB8 8005A6B8 27BD0028 */ addiu $sp, $sp, 0x28 /* 35ABC 8005A6BC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: s32 load_effect(s32 effectIndex) { EffectTableEntry* effectEntry = &gEffectTable[effectIndex]; EffectGraphics* effectGraphics; TlbMappablePage* tlbMappablePages; s32 i; // Look for a loaded effect matching the desired index for (i = 0, effectGraphics = &gEffectGraphicsData[0]; i < ARRAY_COUNT(gEffectGraphicsData); i++) { if (effectGraphics->flags & FX_GRAPHICS_LOADED && effectGraphics->effectIndex == effectIndex) { break; } effectGraphics++; } // If an effect was found within the table, initialize it and return if (i < ARRAY_COUNT(gEffectGraphicsData)) { effectGraphics->effectIndex = effectIndex; effectGraphics->instanceCounter = 0; effectGraphics->flags = FX_GRAPHICS_LOADED; return 1; } // If a loaded effect wasn't found, look for the first empty space for (i = 0, effectGraphics = &gEffectGraphicsData[0]; i < ARRAY_COUNT(gEffectGraphicsData); i++) { if (!(effectGraphics->flags & FX_GRAPHICS_LOADED)) { break; } effectGraphics++; } // If no empty space was found, panic ASSERT(i < ARRAY_COUNT(gEffectGraphicsData)); // Map space for the effect tlbMappablePages = &D_80197000; osMapTLB(i, 0, effectEntry->dmaDest, (s32)((*tlbMappablePages)[i]) & 0xFFFFFF, -1, -1); // Copy the effect into the newly mapped space dma_copy(effectEntry->dmaStart, effectEntry->dmaEnd, effectEntry->dmaDest); // If there's extra data the effect normally loads, allocate space and copy into the new space if (effectEntry->graphicsDmaStart != NULL) { void* effectDataBuf = general_heap_malloc(effectEntry->graphicsDmaEnd - effectEntry->graphicsDmaStart); effectGraphics->data = effectDataBuf; ASSERT(effectDataBuf != NULL); dma_copy(effectEntry->graphicsDmaStart, effectEntry->graphicsDmaEnd, effectGraphics->data); } // Initialize the newly loaded effect data effectGraphics->effectIndex = effectIndex; effectGraphics->instanceCounter = 0; effectGraphics->flags = FX_GRAPHICS_LOADED; return 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_syn_set_pan_fxmix /* 32948 80057548 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 3294C 8005754C AFB20018 */ sw $s2, 0x18($sp) /* 32950 80057550 00A0902D */ daddu $s2, $a1, $zero /* 32954 80057554 AFB3001C */ sw $s3, 0x1C($sp) /* 32958 80057558 00C0982D */ daddu $s3, $a2, $zero /* 3295C 8005755C 308400FF */ andi $a0, $a0, 0xFF /* 32960 80057560 00041140 */ sll $v0, $a0, 5 /* 32964 80057564 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 32968 80057568 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 3296C 8005756C 00441023 */ subu $v0, $v0, $a0 /* 32970 80057570 AFBF0020 */ sw $ra, 0x20($sp) /* 32974 80057574 AFB10014 */ sw $s1, 0x14($sp) /* 32978 80057578 AFB00010 */ sw $s0, 0x10($sp) /* 3297C 8005757C 8C63001C */ lw $v1, 0x1C($v1) /* 32980 80057580 00021080 */ sll $v0, $v0, 2 /* 32984 80057584 00628021 */ addu $s0, $v1, $v0 /* 32988 80057588 8E050064 */ lw $a1, 0x64($s0) /* 3298C 8005758C 8E030068 */ lw $v1, 0x68($s0) /* 32990 80057590 00A3102A */ slt $v0, $a1, $v1 /* 32994 80057594 14400029 */ bnez $v0, .L8005763C /* 32998 80057598 26110048 */ addiu $s1, $s0, 0x48 /* 3299C 8005759C 3C028008 */ lui $v0, %hi(AuSynUseStereo) /* 329A0 800575A0 24428181 */ addiu $v0, $v0, %lo(AuSynUseStereo) /* 329A4 800575A4 90420000 */ lbu $v0, 0x0($v0) /* 329A8 800575A8 1440000E */ bnez $v0, .L800575E4 /* 329AC 800575AC AE030064 */ sw $v1, 0x64($s0) /* 329B0 800575B0 3C048008 */ lui $a0, %hi(AlCosineBlend) /* 329B4 800575B4 24848E60 */ addiu $a0, $a0, %lo(AlCosineBlend) /* 329B8 800575B8 8603004E */ lh $v1, 0x4E($s0) /* 329BC 800575BC 84820080 */ lh $v0, 0x80($a0) /* 329C0 800575C0 00620018 */ mult $v1, $v0 /* 329C4 800575C4 00004012 */ mflo $t0 /* 329C8 800575C8 000813C3 */ sra $v0, $t0, 15 /* 329CC 800575CC A6020050 */ sh $v0, 0x50($s0) /* 329D0 800575D0 84820080 */ lh $v0, 0x80($a0) /* 329D4 800575D4 00620018 */ mult $v1, $v0 /* 329D8 800575D8 00004012 */ mflo $t0 /* 329DC 800575DC 08015D99 */ j .L80057664 /* 329E0 800575E0 000813C3 */ sra $v0, $t0, 15 .L800575E4: /* 329E4 800575E4 8602004C */ lh $v0, 0x4C($s0) /* 329E8 800575E8 8603004E */ lh $v1, 0x4E($s0) /* 329EC 800575EC 00021040 */ sll $v0, $v0, 1 /* 329F0 800575F0 3C018008 */ lui $at, %hi(AlCosineBlend) /* 329F4 800575F4 00220821 */ addu $at, $at, $v0 /* 329F8 800575F8 84228E60 */ lh $v0, %lo(AlCosineBlend)($at) /* 329FC 800575FC 00620018 */ mult $v1, $v0 /* 32A00 80057600 8603004C */ lh $v1, 0x4C($s0) /* 32A04 80057604 00004012 */ mflo $t0 /* 32A08 80057608 000813C3 */ sra $v0, $t0, 15 /* 32A0C 8005760C A6020050 */ sh $v0, 0x50($s0) /* 32A10 80057610 2402007F */ addiu $v0, $zero, 0x7F /* 32A14 80057614 00431023 */ subu $v0, $v0, $v1 /* 32A18 80057618 00021040 */ sll $v0, $v0, 1 /* 32A1C 8005761C 8603004E */ lh $v1, 0x4E($s0) /* 32A20 80057620 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32A24 80057624 00220821 */ addu $at, $at, $v0 /* 32A28 80057628 84228E60 */ lh $v0, %lo(AlCosineBlend)($at) /* 32A2C 8005762C 00620018 */ mult $v1, $v0 /* 32A30 80057630 00004012 */ mflo $t0 /* 32A34 80057634 08015D99 */ j .L80057664 /* 32A38 80057638 000813C3 */ sra $v0, $t0, 15 .L8005763C: /* 32A3C 8005763C 86040050 */ lh $a0, 0x50($s0) /* 32A40 80057640 8606005A */ lh $a2, 0x5A($s0) /* 32A44 80057644 0C016001 */ jal func_80058004 /* 32A48 80057648 96070058 */ lhu $a3, 0x58($s0) /* 32A4C 8005764C 86040052 */ lh $a0, 0x52($s0) /* 32A50 80057650 8E050064 */ lw $a1, 0x64($s0) /* 32A54 80057654 86060060 */ lh $a2, 0x60($s0) /* 32A58 80057658 9607005E */ lhu $a3, 0x5E($s0) /* 32A5C 8005765C 0C016001 */ jal func_80058004 /* 32A60 80057660 A6020050 */ sh $v0, 0x50($s0) .L80057664: /* 32A64 80057664 A6020052 */ sh $v0, 0x52($s0) /* 32A68 80057668 86220008 */ lh $v0, 0x8($s1) /* 32A6C 8005766C 14400002 */ bnez $v0, .L80057678 /* 32A70 80057670 24020001 */ addiu $v0, $zero, 0x1 /* 32A74 80057674 A6220008 */ sh $v0, 0x8($s1) .L80057678: /* 32A78 80057678 8622000A */ lh $v0, 0xA($s1) /* 32A7C 8005767C 14400004 */ bnez $v0, .L80057690 /* 32A80 80057680 324200FF */ andi $v0, $s2, 0xFF /* 32A84 80057684 24020001 */ addiu $v0, $zero, 0x1 /* 32A88 80057688 A622000A */ sh $v0, 0xA($s1) /* 32A8C 8005768C 324200FF */ andi $v0, $s2, 0xFF .L80057690: /* 32A90 80057690 326300FF */ andi $v1, $s3, 0xFF /* 32A94 80057694 A6220004 */ sh $v0, 0x4($s1) /* 32A98 80057698 00031040 */ sll $v0, $v1, 1 /* 32A9C 8005769C 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32AA0 800576A0 00220821 */ addu $at, $at, $v0 /* 32AA4 800576A4 94228E60 */ lhu $v0, %lo(AlCosineBlend)($at) /* 32AA8 800576A8 A622000C */ sh $v0, 0xC($s1) /* 32AAC 800576AC 2402007F */ addiu $v0, $zero, 0x7F /* 32AB0 800576B0 00431023 */ subu $v0, $v0, $v1 /* 32AB4 800576B4 00021040 */ sll $v0, $v0, 1 /* 32AB8 800576B8 3C038008 */ lui $v1, %hi(AlCosineBlend) /* 32ABC 800576BC 00621821 */ addu $v1, $v1, $v0 /* 32AC0 800576C0 94638E60 */ lhu $v1, %lo(AlCosineBlend)($v1) /* 32AC4 800576C4 24020001 */ addiu $v0, $zero, 0x1 /* 32AC8 800576C8 AE220024 */ sw $v0, 0x24($s1) /* 32ACC 800576CC A623000E */ sh $v1, 0xE($s1) /* 32AD0 800576D0 8FBF0020 */ lw $ra, 0x20($sp) /* 32AD4 800576D4 8FB3001C */ lw $s3, 0x1C($sp) /* 32AD8 800576D8 8FB20018 */ lw $s2, 0x18($sp) /* 32ADC 800576DC 8FB10014 */ lw $s1, 0x14($sp) /* 32AE0 800576E0 8FB00010 */ lw $s0, 0x10($sp) /* 32AE4 800576E4 03E00008 */ jr $ra /* 32AE8 800576E8 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void au_syn_set_pan_fxmix(u8 voiceIdx, u8 pan, u8 fxMix) { AuPVoice* pvoice = &gSynDriverPtr->pvoices[voiceIdx]; AuEnvMixer* envMixer = &pvoice->envMixer; if (envMixer->delta >= envMixer->segEnd) { envMixer->delta = envMixer->segEnd; if (!AuSynUseStereo) { envMixer->cvolL = (envMixer->volume * AuEqPower[AU_EQPOW_MID_IDX]) >> 0xF; envMixer->cvolR = (envMixer->volume * AuEqPower[AU_EQPOW_MID_IDX]) >> 0xF; } else { envMixer->cvolL = (envMixer->volume * AuEqPower[envMixer->pan]) >> 0xF; envMixer->cvolR = (envMixer->volume * AuEqPower[AU_EQPOW_MAX_IDX - envMixer->pan]) >> 0xF; } } else { envMixer->cvolL = _getVol(envMixer->cvolL, envMixer->delta, envMixer->lratm, envMixer->lratl); envMixer->cvolR = _getVol(envMixer->cvolR, envMixer->delta, envMixer->rratm, envMixer->rratl); } if (envMixer->cvolL == 0) { envMixer->cvolL = 1; } if (envMixer->cvolR == 0) { envMixer->cvolR = 1; } envMixer->pan = pan; envMixer->dryamt = AuEqPower[fxMix]; envMixer->wetamt = AuEqPower[AU_EQPOW_MAX_IDX - fxMix]; envMixer->first = 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel red_impact_main /* 3D3E20 E00D0000 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 3D3E24 E00D0004 F7B60040 */ sdc1 $f22, 0x40($sp) /* 3D3E28 E00D0008 4485B000 */ mtc1 $a1, $f22 /* 3D3E2C E00D000C F7B80048 */ sdc1 $f24, 0x48($sp) /* 3D3E30 E00D0010 4486C000 */ mtc1 $a2, $f24 /* 3D3E34 E00D0014 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 3D3E38 E00D0018 4487D000 */ mtc1 $a3, $f26 /* 3D3E3C E00D001C F7B40038 */ sdc1 $f20, 0x38($sp) /* 3D3E40 E00D0020 C7B40070 */ lwc1 $f20, 0x70($sp) /* 3D3E44 E00D0024 AFB20030 */ sw $s2, 0x30($sp) /* 3D3E48 E00D0028 0080902D */ daddu $s2, $a0, $zero /* 3D3E4C E00D002C AFB00028 */ sw $s0, 0x28($sp) /* 3D3E50 E00D0030 24100003 */ addiu $s0, $zero, 0x3 /* 3D3E54 E00D0034 F7BC0058 */ sdc1 $f28, 0x58($sp) /* 3D3E58 E00D0038 4480E000 */ mtc1 $zero, $f28 /* 3D3E5C E00D003C 27A40010 */ addiu $a0, $sp, 0x10 /* 3D3E60 E00D0040 AFBF0034 */ sw $ra, 0x34($sp) /* 3D3E64 E00D0044 16400002 */ bnez $s2, .LE00D0050 /* 3D3E68 E00D0048 AFB1002C */ sw $s1, 0x2C($sp) /* 3D3E6C E00D004C 24100007 */ addiu $s0, $zero, 0x7 .LE00D0050: /* 3D3E70 E00D0050 26100001 */ addiu $s0, $s0, 0x1 /* 3D3E74 E00D0054 3C02E00D */ lui $v0, %hi(red_impact_init) /* 3D3E78 E00D0058 2442018C */ addiu $v0, $v0, %lo(red_impact_init) /* 3D3E7C E00D005C AFA00010 */ sw $zero, 0x10($sp) /* 3D3E80 E00D0060 AC820008 */ sw $v0, 0x8($a0) /* 3D3E84 E00D0064 3C02E00D */ lui $v0, %hi(red_impact_update) /* 3D3E88 E00D0068 24420194 */ addiu $v0, $v0, %lo(red_impact_update) /* 3D3E8C E00D006C AC82000C */ sw $v0, 0xC($a0) /* 3D3E90 E00D0070 3C02E00D */ lui $v0, %hi(red_impact_render) /* 3D3E94 E00D0074 24420448 */ addiu $v0, $v0, %lo(red_impact_render) /* 3D3E98 E00D0078 AC820010 */ sw $v0, 0x10($a0) /* 3D3E9C E00D007C 24020068 */ addiu $v0, $zero, 0x68 /* 3D3EA0 E00D0080 AC800014 */ sw $zero, 0x14($a0) /* 3D3EA4 E00D0084 0C080124 */ jal shim_create_effect_instance /* 3D3EA8 E00D0088 AC820004 */ sw $v0, 0x4($a0) /* 3D3EAC E00D008C 00102040 */ sll $a0, $s0, 1 /* 3D3EB0 E00D0090 00902021 */ addu $a0, $a0, $s0 /* 3D3EB4 E00D0094 00042080 */ sll $a0, $a0, 2 /* 3D3EB8 E00D0098 00902023 */ subu $a0, $a0, $s0 /* 3D3EBC E00D009C 000420C0 */ sll $a0, $a0, 3 /* 3D3EC0 E00D00A0 0040882D */ daddu $s1, $v0, $zero /* 3D3EC4 E00D00A4 0C08012C */ jal shim_general_heap_malloc /* 3D3EC8 E00D00A8 AE300008 */ sw $s0, 0x8($s1) /* 3D3ECC E00D00AC 0040182D */ daddu $v1, $v0, $zero /* 3D3ED0 E00D00B0 14600003 */ bnez $v1, .LE00D00C0 /* 3D3ED4 E00D00B4 AE23000C */ sw $v1, 0xC($s1) .LE00D00B8: /* 3D3ED8 E00D00B8 0803402E */ j .LE00D00B8 /* 3D3EDC E00D00BC 00000000 */ nop .LE00D00C0: /* 3D3EE0 E00D00C0 2402003C */ addiu $v0, $zero, 0x3C /* 3D3EE4 E00D00C4 AC620028 */ sw $v0, 0x28($v1) /* 3D3EE8 E00D00C8 240200FF */ addiu $v0, $zero, 0xFF /* 3D3EEC E00D00CC AC620038 */ sw $v0, 0x38($v1) /* 3D3EF0 E00D00D0 A0620050 */ sb $v0, 0x50($v1) /* 3D3EF4 E00D00D4 A0620053 */ sb $v0, 0x53($v1) /* 3D3EF8 E00D00D8 240200C8 */ addiu $v0, $zero, 0xC8 /* 3D3EFC E00D00DC A0620054 */ sb $v0, 0x54($v1) /* 3D3F00 E00D00E0 24020064 */ addiu $v0, $zero, 0x64 /* 3D3F04 E00D00E4 AC60002C */ sw $zero, 0x2C($v1) /* 3D3F08 E00D00E8 A4720000 */ sh $s2, 0x0($v1) /* 3D3F0C E00D00EC E4760004 */ swc1 $f22, 0x4($v1) /* 3D3F10 E00D00F0 E4780008 */ swc1 $f24, 0x8($v1) /* 3D3F14 E00D00F4 E47A000C */ swc1 $f26, 0xC($v1) /* 3D3F18 E00D00F8 E4740024 */ swc1 $f20, 0x24($v1) /* 3D3F1C E00D00FC E4740020 */ swc1 $f20, 0x20($v1) /* 3D3F20 E00D0100 E474001C */ swc1 $f20, 0x1C($v1) /* 3D3F24 E00D0104 A0600051 */ sb $zero, 0x51($v1) /* 3D3F28 E00D0108 A0600052 */ sb $zero, 0x52($v1) /* 3D3F2C E00D010C A0620055 */ sb $v0, 0x55($v1) /* 3D3F30 E00D0110 24040001 */ addiu $a0, $zero, 0x1 /* 3D3F34 E00D0114 0090102A */ slt $v0, $a0, $s0 /* 3D3F38 E00D0118 10400010 */ beqz $v0, .LE00D015C /* 3D3F3C E00D011C 24630058 */ addiu $v1, $v1, 0x58 /* 3D3F40 E00D0120 24630030 */ addiu $v1, $v1, 0x30 /* 3D3F44 E00D0124 2406001E */ addiu $a2, $zero, 0x1E /* 3D3F48 E00D0128 2405FFFF */ addiu $a1, $zero, -0x1 .LE00D012C: /* 3D3F4C E00D012C 44860000 */ mtc1 $a2, $f0 /* 3D3F50 E00D0130 00000000 */ nop /* 3D3F54 E00D0134 46800020 */ cvt.s.w $f0, $f0 /* 3D3F58 E00D0138 24C6001E */ addiu $a2, $a2, 0x1E /* 3D3F5C E00D013C AC65001C */ sw $a1, 0x1C($v1) /* 3D3F60 E00D0140 24A5FFFE */ addiu $a1, $a1, -0x2 /* 3D3F64 E00D0144 24840001 */ addiu $a0, $a0, 0x1 /* 3D3F68 E00D0148 E47C0004 */ swc1 $f28, 0x4($v1) /* 3D3F6C E00D014C E4600000 */ swc1 $f0, 0x0($v1) /* 3D3F70 E00D0150 0090102A */ slt $v0, $a0, $s0 /* 3D3F74 E00D0154 1440FFF5 */ bnez $v0, .LE00D012C /* 3D3F78 E00D0158 24630058 */ addiu $v1, $v1, 0x58 .LE00D015C: /* 3D3F7C E00D015C 0220102D */ daddu $v0, $s1, $zero /* 3D3F80 E00D0160 8FBF0034 */ lw $ra, 0x34($sp) /* 3D3F84 E00D0164 8FB20030 */ lw $s2, 0x30($sp) /* 3D3F88 E00D0168 8FB1002C */ lw $s1, 0x2C($sp) /* 3D3F8C E00D016C 8FB00028 */ lw $s0, 0x28($sp) /* 3D3F90 E00D0170 D7BC0058 */ ldc1 $f28, 0x58($sp) /* 3D3F94 E00D0174 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 3D3F98 E00D0178 D7B80048 */ ldc1 $f24, 0x48($sp) /* 3D3F9C E00D017C D7B60040 */ ldc1 $f22, 0x40($sp) /* 3D3FA0 E00D0180 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3D3FA4 E00D0184 03E00008 */ jr $ra /* 3D3FA8 E00D0188 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: EffectInstance* red_impact_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; RedImpactFXData* part; f32 zero = 0.0f; s32 numParts; s32 temp; s32 i; if (arg0 == 0) { numParts = 7; } else { temp = 3; // Required to match numParts = temp; } numParts++; bpPtr->unk_00 = 0; bpPtr->init = red_impact_init; bpPtr->update = red_impact_update; bpPtr->renderWorld = red_impact_render; bpPtr->renderUI = NULL; bpPtr->effectID = EFFECT_RED_IMPACT; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.redImpact = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.redImpact != NULL); part->unk_2C = 0; part->unk_00 = arg0; part->unk_04 = arg1; part->unk_08 = arg2; part->unk_0C = arg3; part->unk_24 = arg4; part->unk_20 = arg4; part->unk_1C = arg4; part->unk_28 = 60; part->unk_38 = 255; part->unk_50.r = 255; part->unk_50.g = 0; part->unk_50.b = 0; part->unk_53.r = 255; part->unk_53.g = 200; part->unk_53.b = 100; part++; for (i = 1; i < numParts; i++, part++) { part->unk_4C = -1 + (i - 1) * (-2); part->unk_34 = zero; part->unk_30 = i * 30; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel guPositionF /* 3F310 80063F10 3C018009 */ lui $at, %hi(dtor) /* 3F314 80063F14 C4203DC0 */ lwc1 $f0, %lo(dtor)($at) /* 3F318 80063F18 44859000 */ mtc1 $a1, $f18 /* 3F31C 80063F1C 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 3F320 80063F20 F7BC0040 */ sdc1 $f28, 0x40($sp) /* 3F324 80063F24 F7B40020 */ sdc1 $f20, 0x20($sp) /* 3F328 80063F28 46009502 */ mul.s $f20, $f18, $f0 /* 3F32C 80063F2C C7BC0060 */ lwc1 $f28, 0x60($sp) /* 3F330 80063F30 44869000 */ mtc1 $a2, $f18 /* 3F334 80063F34 AFB00010 */ sw $s0, 0x10($sp) /* 3F338 80063F38 F7B60028 */ sdc1 $f22, 0x28($sp) /* 3F33C 80063F3C 46009582 */ mul.s $f22, $f18, $f0 /* 3F340 80063F40 44879000 */ mtc1 $a3, $f18 /* 3F344 80063F44 00808021 */ addu $s0, $a0, $zero /* 3F348 80063F48 AFBF0018 */ sw $ra, 0x18($sp) /* 3F34C 80063F4C AFB10014 */ sw $s1, 0x14($sp) /* 3F350 80063F50 F7BE0048 */ sdc1 $f30, 0x48($sp) /* 3F354 80063F54 F7BA0038 */ sdc1 $f26, 0x38($sp) /* 3F358 80063F58 F7B80030 */ sdc1 $f24, 0x30($sp) /* 3F35C 80063F5C 46009602 */ mul.s $f24, $f18, $f0 /* 3F360 80063F60 0C00A85B */ jal sin_rad /* 3F364 80063F64 4600A306 */ mov.s $f12, $f20 /* 3F368 80063F68 44110000 */ mfc1 $s1, $f0 /* 3F36C 80063F6C 00000000 */ nop /* 3F370 80063F70 0C00A874 */ jal cos_rad /* 3F374 80063F74 4600A306 */ mov.s $f12, $f20 /* 3F378 80063F78 46000686 */ mov.s $f26, $f0 /* 3F37C 80063F7C 0C00A85B */ jal sin_rad /* 3F380 80063F80 4600B306 */ mov.s $f12, $f22 /* 3F384 80063F84 4600B306 */ mov.s $f12, $f22 /* 3F388 80063F88 0C00A874 */ jal cos_rad /* 3F38C 80063F8C 46000506 */ mov.s $f20, $f0 /* 3F390 80063F90 46000786 */ mov.s $f30, $f0 /* 3F394 80063F94 0C00A85B */ jal sin_rad /* 3F398 80063F98 4600C306 */ mov.s $f12, $f24 /* 3F39C 80063F9C 4600C306 */ mov.s $f12, $f24 /* 3F3A0 80063FA0 0C00A874 */ jal cos_rad /* 3F3A4 80063FA4 46000586 */ mov.s $f22, $f0 /* 3F3A8 80063FA8 00000000 */ nop /* 3F3AC 80063FAC 4600F382 */ mul.s $f14, $f30, $f0 /* 3F3B0 80063FB0 00000000 */ nop /* 3F3B4 80063FB4 4616F402 */ mul.s $f16, $f30, $f22 /* 3F3B8 80063FB8 00000000 */ nop /* 3F3BC 80063FBC 4616D082 */ mul.s $f2, $f26, $f22 /* 3F3C0 80063FC0 00000000 */ nop /* 3F3C4 80063FC4 4600D182 */ mul.s $f6, $f26, $f0 /* 3F3C8 80063FC8 44919000 */ mtc1 $s1, $f18 /* 3F3CC 80063FCC 00000000 */ nop /* 3F3D0 80063FD0 46149102 */ mul.s $f4, $f18, $f20 /* 3F3D4 80063FD4 4600A307 */ neg.s $f12, $f20 /* 3F3D8 80063FD8 461C6302 */ mul.s $f12, $f12, $f28 /* 3F3DC 80063FDC 00000000 */ nop /* 3F3E0 80063FE0 4614D502 */ mul.s $f20, $f26, $f20 /* 3F3E4 80063FE4 00000000 */ nop /* 3F3E8 80063FE8 461E9282 */ mul.s $f10, $f18, $f30 /* 3F3EC 80063FEC 00000000 */ nop /* 3F3F0 80063FF0 461ED682 */ mul.s $f26, $f26, $f30 /* 3F3F4 80063FF4 00000000 */ nop /* 3F3F8 80063FF8 461C7382 */ mul.s $f14, $f14, $f28 /* 3F3FC 80063FFC 00000000 */ nop /* 3F400 80064000 461C8402 */ mul.s $f16, $f16, $f28 /* 3F404 80064004 00000000 */ nop /* 3F408 80064008 46002202 */ mul.s $f8, $f4, $f0 /* 3F40C 8006400C 00000000 */ nop /* 3F410 80064010 46162102 */ mul.s $f4, $f4, $f22 /* 3F414 80064014 00000000 */ nop /* 3F418 80064018 461C5282 */ mul.s $f10, $f10, $f28 /* 3F41C 8006401C 00000000 */ nop /* 3F420 80064020 461CD682 */ mul.s $f26, $f26, $f28 /* 3F424 80064024 46062100 */ add.s $f4, $f4, $f6 /* 3F428 80064028 4600A182 */ mul.s $f6, $f20, $f0 /* 3F42C 8006402C 46024201 */ sub.s $f8, $f8, $f2 /* 3F430 80064030 46169082 */ mul.s $f2, $f18, $f22 /* 3F434 80064034 00000000 */ nop /* 3F438 80064038 4616A502 */ mul.s $f20, $f20, $f22 /* 3F43C 8006403C 00000000 */ nop /* 3F440 80064040 46009482 */ mul.s $f18, $f18, $f0 /* 3F444 80064044 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3F448 80064048 44810000 */ mtc1 $at, $f0 /* 3F44C 8006404C 461C4202 */ mul.s $f8, $f8, $f28 /* 3F450 80064050 AE00000C */ sw $zero, 0xC($s0) /* 3F454 80064054 AE00001C */ sw $zero, 0x1C($s0) /* 3F458 80064058 AE00002C */ sw $zero, 0x2C($s0) /* 3F45C 8006405C 44119000 */ mfc1 $s1, $f18 /* 3F460 80064060 C7B20064 */ lwc1 $f18, 0x64($sp) /* 3F464 80064064 461C2102 */ mul.s $f4, $f4, $f28 /* 3F468 80064068 E6120030 */ swc1 $f18, 0x30($s0) /* 3F46C 8006406C C7B20068 */ lwc1 $f18, 0x68($sp) /* 3F470 80064070 46023180 */ add.s $f6, $f6, $f2 /* 3F474 80064074 E6120034 */ swc1 $f18, 0x34($s0) /* 3F478 80064078 C7B2006C */ lwc1 $f18, 0x6C($sp) /* 3F47C 8006407C 461C3182 */ mul.s $f6, $f6, $f28 /* 3F480 80064080 E6120038 */ swc1 $f18, 0x38($s0) /* 3F484 80064084 44919000 */ mtc1 $s1, $f18 /* 3F488 80064088 00000000 */ nop /* 3F48C 8006408C 4612A501 */ sub.s $f20, $f20, $f18 /* 3F490 80064090 E600003C */ swc1 $f0, 0x3C($s0) /* 3F494 80064094 E60C0008 */ swc1 $f12, 0x8($s0) /* 3F498 80064098 E60E0000 */ swc1 $f14, 0x0($s0) /* 3F49C 8006409C 461CA502 */ mul.s $f20, $f20, $f28 /* 3F4A0 800640A0 E6100004 */ swc1 $f16, 0x4($s0) /* 3F4A4 800640A4 E60A0018 */ swc1 $f10, 0x18($s0) /* 3F4A8 800640A8 E61A0028 */ swc1 $f26, 0x28($s0) /* 3F4AC 800640AC E6080010 */ swc1 $f8, 0x10($s0) /* 3F4B0 800640B0 E6040014 */ swc1 $f4, 0x14($s0) /* 3F4B4 800640B4 E6060020 */ swc1 $f6, 0x20($s0) /* 3F4B8 800640B8 E6140024 */ swc1 $f20, 0x24($s0) /* 3F4BC 800640BC 8FBF0018 */ lw $ra, 0x18($sp) /* 3F4C0 800640C0 8FB10014 */ lw $s1, 0x14($sp) /* 3F4C4 800640C4 8FB00010 */ lw $s0, 0x10($sp) /* 3F4C8 800640C8 D7BE0048 */ ldc1 $f30, 0x48($sp) /* 3F4CC 800640CC D7BC0040 */ ldc1 $f28, 0x40($sp) /* 3F4D0 800640D0 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 3F4D4 800640D4 D7B80030 */ ldc1 $f24, 0x30($sp) /* 3F4D8 800640D8 D7B60028 */ ldc1 $f22, 0x28($sp) /* 3F4DC 800640DC D7B40020 */ ldc1 $f20, 0x20($sp) /* 3F4E0 800640E0 03E00008 */ jr $ra /* 3F4E4 800640E4 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void guPositionF(f32 mf[4][4], f32 r, f32 p, f32 h, f32 s, f32 x, f32 y, f32 z) { static f32 dtor = 3.1415926 / 180.0; f32 sinr, sinp, sinh; f32 cosr, cosp, cosh; r *= dtor; p *= dtor; h *= dtor; sinr = sin_rad(r); cosr = cos_rad(r); sinp = sin_rad(p); cosp = cos_rad(p); sinh = sin_rad(h); cosh = cos_rad(h); mf[0][0] = (cosp * cosh) * s; mf[0][1] = (cosp * sinh) * s; mf[0][2] = (-sinp) * s; mf[0][3] = 0.0; mf[1][0] = (sinr * sinp * cosh - cosr * sinh) * s; mf[1][1] = (sinr * sinp * sinh + cosr * cosh) * s; mf[1][2] = (sinr * cosp) * s; mf[1][3] = 0.0; mf[2][0] = (cosr * sinp * cosh + sinr * sinh) * s; mf[2][1] = (cosr * sinp * sinh - sinr * cosh) * s; mf[2][2] = (cosr * cosp) * s; mf[2][3] = 0.0; mf[3][0] = x; mf[3][1] = y; mf[3][2] = z; mf[3][3] = 1.0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_GiantChest_give_equipment /* 109364 802E7AE4 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 109368 802E7AE8 AFB1001C */ sw $s1, 0x1C($sp) /* 10936C 802E7AEC 0080882D */ daddu $s1, $a0, $zero /* 109370 802E7AF0 AFBF0020 */ sw $ra, 0x20($sp) /* 109374 802E7AF4 AFB00018 */ sw $s0, 0x18($sp) /* 109378 802E7AF8 F7B60030 */ sdc1 $f22, 0x30($sp) /* 10937C 802E7AFC F7B40028 */ sdc1 $f20, 0x28($sp) /* 109380 802E7B00 8E300040 */ lw $s0, 0x40($s1) /* 109384 802E7B04 8E020010 */ lw $v0, 0x10($s0) /* 109388 802E7B08 2443FFFF */ addiu $v1, $v0, -0x1 /* 10938C 802E7B0C 2C620006 */ sltiu $v0, $v1, 0x6 /* 109390 802E7B10 1040001D */ beqz $v0, .L802E7B88 /* 109394 802E7B14 00031080 */ sll $v0, $v1, 2 /* 109398 802E7B18 3C01802F */ lui $at, %hi(jtbl_802EB330) /* 10939C 802E7B1C 00220821 */ addu $at, $at, $v0 /* 1093A0 802E7B20 8C22B330 */ lw $v0, %lo(jtbl_802EB330)($at) /* 1093A4 802E7B24 00400008 */ jr $v0 /* 1093A8 802E7B28 00000000 */ nop glabel .L802E7B2C /* 1093AC 802E7B2C 3C018011 */ lui $at, %hi(gPlayerData) /* 1093B0 802E7B30 A020F290 */ sb $zero, %lo(gPlayerData)($at) /* 1093B4 802E7B34 080B9EE2 */ j .L802E7B88 /* 1093B8 802E7B38 00000000 */ nop glabel .L802E7B3C /* 1093BC 802E7B3C 24020001 */ addiu $v0, $zero, 0x1 /* 1093C0 802E7B40 3C018011 */ lui $at, %hi(gPlayerData) /* 1093C4 802E7B44 A022F290 */ sb $v0, %lo(gPlayerData)($at) /* 1093C8 802E7B48 080B9EE2 */ j .L802E7B88 /* 1093CC 802E7B4C 00000000 */ nop glabel .L802E7B50 /* 1093D0 802E7B50 24020002 */ addiu $v0, $zero, 0x2 /* 1093D4 802E7B54 3C018011 */ lui $at, %hi(gPlayerData) /* 1093D8 802E7B58 A022F290 */ sb $v0, %lo(gPlayerData)($at) /* 1093DC 802E7B5C 080B9EE2 */ j .L802E7B88 /* 1093E0 802E7B60 00000000 */ nop glabel .L802E7B64 /* 1093E4 802E7B64 3C018011 */ lui $at, %hi(gPlayerData + 0x1) /* 1093E8 802E7B68 A020F291 */ sb $zero, %lo(gPlayerData + 0x1)($at) /* 1093EC 802E7B6C 080B9EE2 */ j .L802E7B88 /* 1093F0 802E7B70 00000000 */ nop glabel .L802E7B74 /* 1093F4 802E7B74 080B9EE0 */ j .L802E7B80 /* 1093F8 802E7B78 24020001 */ addiu $v0, $zero, 0x1 glabel .L802E7B7C /* 1093FC 802E7B7C 24020002 */ addiu $v0, $zero, 0x2 .L802E7B80: /* 109400 802E7B80 3C018011 */ lui $at, %hi(gPlayerData + 0x1) /* 109404 802E7B84 A022F291 */ sb $v0, %lo(gPlayerData + 0x1)($at) .L802E7B88: /* 109408 802E7B88 8E020010 */ lw $v0, 0x10($s0) /* 10940C 802E7B8C 10400027 */ beqz $v0, .L802E7C2C /* 109410 802E7B90 00000000 */ nop /* 109414 802E7B94 C6340064 */ lwc1 $f20, 0x64($s1) /* 109418 802E7B98 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 10941C 802E7B9C 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 109420 802E7BA0 44810000 */ mtc1 $at, $f0 /* 109424 802E7BA4 00000000 */ nop /* 109428 802E7BA8 4600A502 */ mul.s $f20, $f20, $f0 /* 10942C 802E7BAC 00000000 */ nop /* 109430 802E7BB0 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 109434 802E7BB4 44810000 */ mtc1 $at, $f0 /* 109438 802E7BB8 3C014120 */ lui $at, (0x41200000 >> 16) /* 10943C 802E7BBC 4481B000 */ mtc1 $at, $f22 /* 109440 802E7BC0 4600A503 */ div.s $f20, $f20, $f0 /* 109444 802E7BC4 0C00A85B */ jal sin_rad /* 109448 802E7BC8 4600A306 */ mov.s $f12, $f20 /* 10944C 802E7BCC 46160002 */ mul.s $f0, $f0, $f22 /* 109450 802E7BD0 00000000 */ nop /* 109454 802E7BD4 C6220048 */ lwc1 $f2, 0x48($s1) /* 109458 802E7BD8 46001080 */ add.s $f2, $f2, $f0 /* 10945C 802E7BDC E6020018 */ swc1 $f2, 0x18($s0) /* 109460 802E7BE0 C620004C */ lwc1 $f0, 0x4C($s1) /* 109464 802E7BE4 4600A306 */ mov.s $f12, $f20 /* 109468 802E7BE8 0C00A874 */ jal cos_rad /* 10946C 802E7BEC E600001C */ swc1 $f0, 0x1C($s0) /* 109470 802E7BF0 46160002 */ mul.s $f0, $f0, $f22 /* 109474 802E7BF4 00000000 */ nop /* 109478 802E7BF8 C6220050 */ lwc1 $f2, 0x50($s1) /* 10947C 802E7BFC 46001080 */ add.s $f2, $f2, $f0 /* 109480 802E7C00 24020001 */ addiu $v0, $zero, 0x1 /* 109484 802E7C04 E6020020 */ swc1 $f2, 0x20($s0) /* 109488 802E7C08 AFA20010 */ sw $v0, 0x10($sp) /* 10948C 802E7C0C 2402FFFF */ addiu $v0, $zero, -0x1 /* 109490 802E7C10 AFA20014 */ sw $v0, 0x14($sp) /* 109494 802E7C14 8E040010 */ lw $a0, 0x10($s0) /* 109498 802E7C18 8E050018 */ lw $a1, 0x18($s0) /* 10949C 802E7C1C 8E06001C */ lw $a2, 0x1C($s0) /* 1094A0 802E7C20 0C04C6A5 */ jal make_item_entity_nodelay /* 1094A4 802E7C24 8E070020 */ lw $a3, 0x20($s0) /* 1094A8 802E7C28 AE020014 */ sw $v0, 0x14($s0) .L802E7C2C: /* 1094AC 802E7C2C 96040000 */ lhu $a0, 0x0($s0) /* 1094B0 802E7C30 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16) /* 1094B4 802E7C34 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF) /* 1094B8 802E7C38 0044102A */ slt $v0, $v0, $a0 /* 1094BC 802E7C3C 14400003 */ bnez $v0, .L802E7C4C /* 1094C0 802E7C40 3C0207BF */ lui $v0, (0x7BFA480 >> 16) /* 1094C4 802E7C44 3442A480 */ ori $v0, $v0, (0x7BFA480 & 0xFFFF) /* 1094C8 802E7C48 00822021 */ addu $a0, $a0, $v0 .L802E7C4C: /* 1094CC 802E7C4C 0C051514 */ jal set_global_flag /* 1094D0 802E7C50 00000000 */ nop /* 1094D4 802E7C54 8FBF0020 */ lw $ra, 0x20($sp) /* 1094D8 802E7C58 8FB1001C */ lw $s1, 0x1C($sp) /* 1094DC 802E7C5C 8FB00018 */ lw $s0, 0x18($sp) /* 1094E0 802E7C60 D7B60030 */ ldc1 $f22, 0x30($sp) /* 1094E4 802E7C64 D7B40028 */ ldc1 $f20, 0x28($sp) /* 1094E8 802E7C68 03E00008 */ jr $ra /* 1094EC 802E7C6C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void entity_GiantChest_give_equipment(Entity* entity) { ChestData* data = entity->dataBuf.chest; f32 angle; s32 flagIndex; switch (data->itemID) { case ITEM_BOOTS: gPlayerData.bootsLevel = 0; break; case ITEM_SUPER_BOOTS: gPlayerData.bootsLevel = 1; break; case ITEM_ULTRA_BOOTS: gPlayerData.bootsLevel = 2; break; case ITEM_HAMMER: gPlayerData.hammerLevel = 0; break; case ITEM_SUPER_HAMMER: gPlayerData.hammerLevel = 1; break; case ITEM_ULTRA_HAMMER: gPlayerData.hammerLevel = 2; break; } if (data->itemID != 0) { angle = DEG_TO_RAD(entity->rotation.y); data->itemEntityPos.x = entity->position.x + (sin_rad(angle) * 10.0f); data->itemEntityPos.y = entity->position.y; data->itemEntityPos.z = entity->position.z + (cos_rad(angle) * 10.0f); data->itemEntityIndex = make_item_entity_nodelay(data->itemID, data->itemEntityPos.x, data->itemEntityPos.y, data->itemEntityPos.z, ITEM_SPAWN_MODE_DECORATION, -1); } flagIndex = data->gameFlagIndex; if (flagIndex <= EVT_GAME_FLAG_CUTOFF) { flagIndex = EVT_INDEX_OF_GAME_FLAG(flagIndex); } set_global_flag(flagIndex); }
### RAW ASSEMBLY INSTRUCTIONS: glabel star_spirits_energy_main /* 40C5A0 E0122000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 40C5A4 E0122004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 40C5A8 E0122008 4485A000 */ mtc1 $a1, $f20 /* 40C5AC E012200C F7B60040 */ sdc1 $f22, 0x40($sp) /* 40C5B0 E0122010 4486B000 */ mtc1 $a2, $f22 /* 40C5B4 E0122014 AFB00028 */ sw $s0, 0x28($sp) /* 40C5B8 E0122018 0080802D */ daddu $s0, $a0, $zero /* 40C5BC E012201C F7B80048 */ sdc1 $f24, 0x48($sp) /* 40C5C0 E0122020 4487C000 */ mtc1 $a3, $f24 /* 40C5C4 E0122024 27A40010 */ addiu $a0, $sp, 0x10 /* 40C5C8 E0122028 AFB20030 */ sw $s2, 0x30($sp) /* 40C5CC E012202C 8FB20064 */ lw $s2, 0x64($sp) /* 40C5D0 E0122030 3C02E012 */ lui $v0, %hi(star_spirits_energy_init) /* 40C5D4 E0122034 24422174 */ addiu $v0, $v0, %lo(star_spirits_energy_init) /* 40C5D8 E0122038 AFA20018 */ sw $v0, 0x18($sp) /* 40C5DC E012203C 3C02E012 */ lui $v0, %hi(star_spirits_energy_update) /* 40C5E0 E0122040 2442217C */ addiu $v0, $v0, %lo(star_spirits_energy_update) /* 40C5E4 E0122044 AFA2001C */ sw $v0, 0x1C($sp) /* 40C5E8 E0122048 3C02E012 */ lui $v0, %hi(star_spirits_energy_render) /* 40C5EC E012204C 244226C4 */ addiu $v0, $v0, %lo(star_spirits_energy_render) /* 40C5F0 E0122050 AFA20020 */ sw $v0, 0x20($sp) /* 40C5F4 E0122054 24020083 */ addiu $v0, $zero, 0x83 /* 40C5F8 E0122058 AFBF0034 */ sw $ra, 0x34($sp) /* 40C5FC E012205C AFB1002C */ sw $s1, 0x2C($sp) /* 40C600 E0122060 AFA00010 */ sw $zero, 0x10($sp) /* 40C604 E0122064 AFA00024 */ sw $zero, 0x24($sp) /* 40C608 E0122068 0C080124 */ jal shim_create_effect_instance /* 40C60C E012206C AFA20014 */ sw $v0, 0x14($sp) /* 40C610 E0122070 24040078 */ addiu $a0, $zero, 0x78 /* 40C614 E0122074 24030001 */ addiu $v1, $zero, 0x1 /* 40C618 E0122078 0040882D */ daddu $s1, $v0, $zero /* 40C61C E012207C 0C08012C */ jal shim_general_heap_malloc /* 40C620 E0122080 AE230008 */ sw $v1, 0x8($s1) /* 40C624 E0122084 0040182D */ daddu $v1, $v0, $zero /* 40C628 E0122088 14600003 */ bnez $v1, .LE0122098 /* 40C62C E012208C AE22000C */ sw $v0, 0xC($s1) .LE0122090: /* 40C630 E0122090 08048824 */ j .LE0122090 /* 40C634 E0122094 00000000 */ nop .LE0122098: /* 40C638 E0122098 3202FF00 */ andi $v0, $s0, 0xFF00 /* 40C63C E012209C 321000FF */ andi $s0, $s0, 0xFF /* 40C640 E01220A0 AC620000 */ sw $v0, 0x0($v1) /* 40C644 E01220A4 AC700004 */ sw $s0, 0x4($v1) /* 40C648 E01220A8 1E400004 */ bgtz $s2, .LE01220BC /* 40C64C E01220AC AC600018 */ sw $zero, 0x18($v1) /* 40C650 E01220B0 240203E8 */ addiu $v0, $zero, 0x3E8 /* 40C654 E01220B4 08048830 */ j .LE01220C0 /* 40C658 E01220B8 AC620014 */ sw $v0, 0x14($v1) .LE01220BC: /* 40C65C E01220BC AC720014 */ sw $s2, 0x14($v1) .LE01220C0: /* 40C660 E01220C0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 40C664 E01220C4 44811000 */ mtc1 $at, $f2 /* 40C668 E01220C8 240200FF */ addiu $v0, $zero, 0xFF /* 40C66C E01220CC AC620028 */ sw $v0, 0x28($v1) /* 40C670 E01220D0 E4740008 */ swc1 $f20, 0x8($v1) /* 40C674 E01220D4 E476000C */ swc1 $f22, 0xC($v1) /* 40C678 E01220D8 E4780010 */ swc1 $f24, 0x10($v1) /* 40C67C E01220DC C7A00060 */ lwc1 $f0, 0x60($sp) /* 40C680 E01220E0 AC62001C */ sw $v0, 0x1C($v1) /* 40C684 E01220E4 AC620020 */ sw $v0, 0x20($v1) /* 40C688 E01220E8 AC620024 */ sw $v0, 0x24($v1) /* 40C68C E01220EC AC62002C */ sw $v0, 0x2C($v1) /* 40C690 E01220F0 AC620030 */ sw $v0, 0x30($v1) /* 40C694 E01220F4 AC620034 */ sw $v0, 0x34($v1) /* 40C698 E01220F8 AC620038 */ sw $v0, 0x38($v1) /* 40C69C E01220FC AC620050 */ sw $v0, 0x50($v1) /* 40C6A0 E0122100 24020003 */ addiu $v0, $zero, 0x3 /* 40C6A4 E0122104 AC600060 */ sw $zero, 0x60($v1) /* 40C6A8 E0122108 AC600064 */ sw $zero, 0x64($v1) /* 40C6AC E012210C AC600068 */ sw $zero, 0x68($v1) /* 40C6B0 E0122110 AC60006C */ sw $zero, 0x6C($v1) /* 40C6B4 E0122114 AC600044 */ sw $zero, 0x44($v1) /* 40C6B8 E0122118 AC600048 */ sw $zero, 0x48($v1) /* 40C6BC E012211C AC60004C */ sw $zero, 0x4C($v1) /* 40C6C0 E0122120 AC600054 */ sw $zero, 0x54($v1) /* 40C6C4 E0122124 AC600058 */ sw $zero, 0x58($v1) /* 40C6C8 E0122128 AC60005C */ sw $zero, 0x5C($v1) /* 40C6CC E012212C E460003C */ swc1 $f0, 0x3C($v1) /* 40C6D0 E0122130 16020004 */ bne $s0, $v0, .LE0122144 /* 40C6D4 E0122134 E4620040 */ swc1 $f2, 0x40($v1) /* 40C6D8 E0122138 24020001 */ addiu $v0, $zero, 0x1 /* 40C6DC E012213C 08048852 */ j .LE0122148 /* 40C6E0 E0122140 AC620070 */ sw $v0, 0x70($v1) .LE0122144: /* 40C6E4 E0122144 AC600070 */ sw $zero, 0x70($v1) .LE0122148: /* 40C6E8 E0122148 0220102D */ daddu $v0, $s1, $zero /* 40C6EC E012214C AC600074 */ sw $zero, 0x74($v1) /* 40C6F0 E0122150 8FBF0034 */ lw $ra, 0x34($sp) /* 40C6F4 E0122154 8FB20030 */ lw $s2, 0x30($sp) /* 40C6F8 E0122158 8FB1002C */ lw $s1, 0x2C($sp) /* 40C6FC E012215C 8FB00028 */ lw $s0, 0x28($sp) /* 40C700 E0122160 D7B80048 */ ldc1 $f24, 0x48($sp) /* 40C704 E0122164 D7B60040 */ ldc1 $f22, 0x40($sp) /* 40C708 E0122168 D7B40038 */ ldc1 $f20, 0x38($sp) /* 40C70C E012216C 03E00008 */ jr $ra /* 40C710 E0122170 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: EffectInstance* star_spirits_energy_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectInstance* effect; StarSpiritsEnergyFXData* data; s32 numParts = 1; bp.init = star_spirits_energy_init; bp.update = star_spirits_energy_update; bp.renderWorld = star_spirits_energy_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_STAR_SPIRITS_ENERGY; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.starSpiritsEnergy = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.starSpiritsEnergy != NULL); data->unk_00 = arg0 & 0xFF00; arg0 &= 0xFF; data->unk_04 = arg0; data->unk_18 = 0; if (arg5 <= 0) { data->unk_14 = 1000; } else { data->unk_14 = arg5; } data->unk_28 = 255; data->unk_08 = arg1; data->unk_0C = arg2; data->unk_10 = arg3; data->unk_3C = arg4; data->unk_1C = 255; data->unk_20 = 255; data->unk_24 = 255; data->unk_2C = 255; data->unk_30 = 255; data->unk_34 = 255; data->unk_38 = 255; data->unk_60 = 0; data->unk_64 = 0; data->unk_68 = 0; data->unk_6C = 0; data->unk_40[0] = 1.0f; data->unk_40[1] = 0; data->unk_40[2] = 0; data->unk_40[3] = 0; data->unk_50[0] = 255; data->unk_50[1] = 0; data->unk_50[2] = 0; data->unk_50[3] = 0; if (arg0 == 3) { data->unk_70 = 1; } else { data->unk_70 = 0; } data->unk_74 = 0; return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80248A80 /* 1692E0 80248A80 27BDFFD8 */ addiu $sp, $sp, -0x28 .L80248A84: /* 1692E4 80248A84 AFB3001C */ sw $s3, 0x1C($sp) .L80248A88: /* 1692E8 80248A88 0080982D */ daddu $s3, $a0, $zero /* 1692EC 80248A8C AFB00010 */ sw $s0, 0x10($sp) /* 1692F0 80248A90 0000802D */ daddu $s0, $zero, $zero /* 1692F4 80248A94 AFB20018 */ sw $s2, 0x18($sp) D_80248A98: /* 1692F8 80248A98 3C128025 */ lui $s2, %hi(D_8024C100_C09980) .L80248A9C: /* 1692FC 80248A9C 2652C100 */ addiu $s2, $s2, %lo(D_8024C100_C09980) D_80248AA0: /* 169300 80248AA0 AFB10014 */ sw $s1, 0x14($sp) glabel func_80248AA4 /* 169304 80248AA4 3C118025 */ lui $s1, %hi(D_8024A180) /* 169308 80248AA8 2631A180 */ addiu $s1, $s1, %lo(D_8024A180) /* 16930C 80248AAC AFBF0020 */ sw $ra, 0x20($sp) .L80248AB0: /* 169310 80248AB0 8E240000 */ lw $a0, 0x0($s1) /* 169314 80248AB4 26310004 */ addiu $s1, $s1, 0x4 /* 169318 80248AB8 0C050529 */ jal hud_element_create /* 16931C 80248ABC 26100001 */ addiu $s0, $s0, 0x1 D_80248AC0: /* 169320 80248AC0 0040202D */ daddu $a0, $v0, $zero /* 169324 80248AC4 24050080 */ addiu $a1, $zero, 0x80 /* 169328 80248AC8 0C051280 */ jal hud_element_set_flags D_80248ACC: /* 16932C 80248ACC AE440000 */ sw $a0, 0x0($s2) /* 169330 80248AD0 2A020003 */ slti $v0, $s0, 0x3 D_80248AD4: /* 169334 80248AD4 1440FFF6 */ bnez $v0, .L80248AB0 .L80248AD8: /* 169338 80248AD8 26520004 */ addiu $s2, $s2, 0x4 /* 16933C 80248ADC 24100001 */ addiu $s0, $zero, 0x1 /* 169340 80248AE0 3C028025 */ lui $v0, %hi(D_8024A1B4) D_80248AE4: /* 169344 80248AE4 2442A1B4 */ addiu $v0, $v0, %lo(D_8024A1B4) .L80248AE8: /* 169348 80248AE8 AC530010 */ sw $s3, 0x10($v0) /* 16934C 80248AEC 2610FFFF */ addiu $s0, $s0, -0x1 .L80248AF0: /* 169350 80248AF0 0601FFFD */ bgez $s0, .L80248AE8 .L80248AF4: /* 169354 80248AF4 2442FFDC */ addiu $v0, $v0, -0x24 D_80248AF8: /* 169358 80248AF8 3C048025 */ lui $a0, %hi(D_8024A190) .L80248AFC: /* 16935C 80248AFC 2484A190 */ addiu $a0, $a0, %lo(D_8024A190) /* 169360 80248B00 0C051FCC */ jal setup_pause_menu_tab /* 169364 80248B04 24050002 */ addiu $a1, $zero, 0x2 glabel func_80248B08 /* 169368 80248B08 3C048016 */ lui $a0, %hi(gWindows) /* 16936C 80248B0C 24849D50 */ addiu $a0, $a0, %lo(gWindows) D_80248B10: /* 169370 80248B10 94820610 */ lhu $v0, 0x610($a0) /* 169374 80248B14 00021400 */ sll $v0, $v0, 16 D_80248B18: /* 169378 80248B18 00021C03 */ sra $v1, $v0, 16 /* 16937C 80248B1C 000217C2 */ srl $v0, $v0, 31 /* 169380 80248B20 00621821 */ addu $v1, $v1, $v0 D_80248B24: /* 169384 80248B24 00032843 */ sra $a1, $v1, 1 /* 169388 80248B28 80830603 */ lb $v1, 0x603($a0) /* 16938C 80248B2C 2402FFFF */ addiu $v0, $zero, -0x1 /* 169390 80248B30 1062000B */ beq $v1, $v0, .L80248B60 /* 169394 80248B34 2486060C */ addiu $a2, $a0, 0x60C /* 169398 80248B38 00031140 */ sll $v0, $v1, 5 /* 16939C 80248B3C 00441021 */ addu $v0, $v0, $a0 /* 1693A0 80248B40 94420010 */ lhu $v0, 0x10($v0) D_80248B44: /* 1693A4 80248B44 00021400 */ sll $v0, $v0, 16 /* 1693A8 80248B48 00021C03 */ sra $v1, $v0, 16 /* 1693AC 80248B4C 000217C2 */ srl $v0, $v0, 31 D_80248B50: /* 1693B0 80248B50 00621821 */ addu $v1, $v1, $v0 glabel .L80248B54 /* 1693B4 80248B54 00031843 */ sra $v1, $v1, 1 /* 1693B8 80248B58 080922DC */ j .L80248B70 /* 1693BC 80248B5C 00651023 */ subu $v0, $v1, $a1 .L80248B60: /* 1693C0 80248B60 240200A0 */ addiu $v0, $zero, 0xA0 /* 1693C4 80248B64 00451023 */ subu $v0, $v0, $a1 /* 1693C8 80248B68 3C048016 */ lui $a0, %hi(gWindows) /* 1693CC 80248B6C 24849D50 */ addiu $a0, $a0, %lo(gWindows) .L80248B70: /* 1693D0 80248B70 A4C20000 */ sh $v0, 0x0($a2) /* 1693D4 80248B74 94820630 */ lhu $v0, 0x630($a0) /* 1693D8 80248B78 00021400 */ sll $v0, $v0, 16 D_80248B7C: /* 1693DC 80248B7C 00021C03 */ sra $v1, $v0, 16 /* 1693E0 80248B80 000217C2 */ srl $v0, $v0, 31 /* 1693E4 80248B84 00621821 */ addu $v1, $v1, $v0 /* 1693E8 80248B88 00032843 */ sra $a1, $v1, 1 /* 1693EC 80248B8C 80830623 */ lb $v1, 0x623($a0) .L80248B90: /* 1693F0 80248B90 2402FFFF */ addiu $v0, $zero, -0x1 .L80248B94: /* 1693F4 80248B94 1062000B */ beq $v1, $v0, .L80248BC4 .L80248B98: /* 1693F8 80248B98 2486062C */ addiu $a2, $a0, 0x62C D_80248B9C: /* 1693FC 80248B9C 00031140 */ sll $v0, $v1, 5 D_80248BA0: /* 169400 80248BA0 00441021 */ addu $v0, $v0, $a0 glabel .L80248BA4 /* 169404 80248BA4 94420010 */ lhu $v0, 0x10($v0) D_80248BA8: /* 169408 80248BA8 00021400 */ sll $v0, $v0, 16 /* 16940C 80248BAC 00021C03 */ sra $v1, $v0, 16 /* 169410 80248BB0 000217C2 */ srl $v0, $v0, 31 /* 169414 80248BB4 00621821 */ addu $v1, $v1, $v0 /* 169418 80248BB8 00031843 */ sra $v1, $v1, 1 /* 16941C 80248BBC 080922F3 */ j .L80248BCC /* 169420 80248BC0 00651023 */ subu $v0, $v1, $a1 .L80248BC4: /* 169424 80248BC4 240200A0 */ addiu $v0, $zero, 0xA0 .L80248BC8: /* 169428 80248BC8 00451023 */ subu $v0, $v0, $a1 .L80248BCC: /* 16942C 80248BCC A4C20000 */ sh $v0, 0x0($a2) /* 169430 80248BD0 24020001 */ addiu $v0, $zero, 0x1 D_80248BD4: /* 169434 80248BD4 A2620000 */ sb $v0, 0x0($s3) D_80248BD8: /* 169438 80248BD8 8FBF0020 */ lw $ra, 0x20($sp) .L80248BDC: /* 16943C 80248BDC 8FB3001C */ lw $s3, 0x1C($sp) /* 169440 80248BE0 8FB20018 */ lw $s2, 0x18($sp) .L80248BE4: /* 169444 80248BE4 8FB10014 */ lw $s1, 0x14($sp) /* 169448 80248BE8 8FB00010 */ lw $s0, 0x10($sp) /* 16944C 80248BEC 03E00008 */ jr $ra /* 169450 80248BF0 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void filemenu_choose_name_init(MenuPanel* menu) { s32 i; for (i = 0; i < ARRAY_COUNT(filemenu_createfile_hudElemScripts); i++) { filemenu_createfile_hudElems[i] = hud_element_create(filemenu_createfile_hudElemScripts[i]); hud_element_set_flags(filemenu_createfile_hudElems[i], HUD_ELEMENT_FLAG_80); } for (i = 0; i < ARRAY_COUNT(filemenu_createfile_windowBPs); i++) { filemenu_createfile_windowBPs[i].tab = menu; } setup_pause_menu_tab(filemenu_createfile_windowBPs, ARRAY_COUNT(filemenu_createfile_windowBPs)); gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].pos.x = ((gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].parent != -1) ? (gWindows[gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].parent].width / 2) : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_CREATEFILE_HEADER].width / 2; gWindows[WINDOW_ID_FILEMENU_KEYBOARD].pos.x = ((gWindows[WINDOW_ID_FILEMENU_KEYBOARD].parent != -1) ? (gWindows[gWindows[WINDOW_ID_FILEMENU_KEYBOARD].parent].width / 2) : SCREEN_WIDTH / 2) - gWindows[WINDOW_ID_FILEMENU_KEYBOARD].width / 2; menu->initialized = TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025CEC8 /* 18B7A8 8025CEC8 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 18B7AC 8025CECC AFB10014 */ sw $s1, 0x14($sp) /* 18B7B0 8025CED0 0080882D */ daddu $s1, $a0, $zero /* 18B7B4 8025CED4 AFBF0020 */ sw $ra, 0x20($sp) /* 18B7B8 8025CED8 AFB3001C */ sw $s3, 0x1C($sp) /* 18B7BC 8025CEDC AFB20018 */ sw $s2, 0x18($sp) /* 18B7C0 8025CEE0 AFB00010 */ sw $s0, 0x10($sp) /* 18B7C4 8025CEE4 8E220000 */ lw $v0, 0x0($s1) /* 18B7C8 8025CEE8 30420002 */ andi $v0, $v0, 0x2 /* 18B7CC 8025CEEC 1440004C */ bnez $v0, .L8025D020 /* 18B7D0 8025CEF0 0000802D */ daddu $s0, $zero, $zero /* 18B7D4 8025CEF4 8E3200C0 */ lw $s2, 0xC0($s1) /* 18B7D8 8025CEF8 3C13802A */ lui $s3, %hi(D_8029D488) /* 18B7DC 8025CEFC 2673D488 */ addiu $s3, $s3, %lo(D_8029D488) /* 18B7E0 8025CF00 02501021 */ addu $v0, $s2, $s0 .L8025CF04: /* 18B7E4 8025CF04 804308B8 */ lb $v1, 0x8B8($v0) /* 18B7E8 8025CF08 2C62000C */ sltiu $v0, $v1, 0xC /* 18B7EC 8025CF0C 50400041 */ beql $v0, $zero, .L8025D014 /* 18B7F0 8025CF10 26100001 */ addiu $s0, $s0, 0x1 /* 18B7F4 8025CF14 00031080 */ sll $v0, $v1, 2 /* 18B7F8 8025CF18 00531021 */ addu $v0, $v0, $s3 /* 18B7FC 8025CF1C 8C420000 */ lw $v0, 0x0($v0) /* 18B800 8025CF20 00400008 */ jr $v0 /* 18B804 8025CF24 00000000 */ nop /* 18B808 8025CF28 0220202D */ daddu $a0, $s1, $zero /* 18B80C 8025CF2C 0C097454 */ jal func_8025D150 /* 18B810 8025CF30 0200282D */ daddu $a1, $s0, $zero /* 18B814 8025CF34 08097405 */ j .L8025D014 /* 18B818 8025CF38 26100001 */ addiu $s0, $s0, 0x1 /* 18B81C 8025CF3C 0220202D */ daddu $a0, $s1, $zero /* 18B820 8025CF40 0C097458 */ jal func_8025D160 /* 18B824 8025CF44 0200282D */ daddu $a1, $s0, $zero /* 18B828 8025CF48 08097405 */ j .L8025D014 /* 18B82C 8025CF4C 26100001 */ addiu $s0, $s0, 0x1 /* 18B830 8025CF50 0220202D */ daddu $a0, $s1, $zero /* 18B834 8025CF54 0C0974AC */ jal func_8025D2B0 /* 18B838 8025CF58 0200282D */ daddu $a1, $s0, $zero /* 18B83C 8025CF5C 08097405 */ j .L8025D014 /* 18B840 8025CF60 26100001 */ addiu $s0, $s0, 0x1 /* 18B844 8025CF64 0220202D */ daddu $a0, $s1, $zero /* 18B848 8025CF68 0C0974F3 */ jal func_8025D3CC /* 18B84C 8025CF6C 0200282D */ daddu $a1, $s0, $zero /* 18B850 8025CF70 08097405 */ j .L8025D014 /* 18B854 8025CF74 26100001 */ addiu $s0, $s0, 0x1 /* 18B858 8025CF78 0220202D */ daddu $a0, $s1, $zero /* 18B85C 8025CF7C 0C097532 */ jal func_8025D4C8 /* 18B860 8025CF80 0200282D */ daddu $a1, $s0, $zero /* 18B864 8025CF84 08097405 */ j .L8025D014 /* 18B868 8025CF88 26100001 */ addiu $s0, $s0, 0x1 /* 18B86C 8025CF8C 0220202D */ daddu $a0, $s1, $zero /* 18B870 8025CF90 0C097590 */ jal func_8025D640 /* 18B874 8025CF94 0200282D */ daddu $a1, $s0, $zero /* 18B878 8025CF98 08097405 */ j .L8025D014 /* 18B87C 8025CF9C 26100001 */ addiu $s0, $s0, 0x1 /* 18B880 8025CFA0 0220202D */ daddu $a0, $s1, $zero /* 18B884 8025CFA4 0C0975C7 */ jal func_8025D71C /* 18B888 8025CFA8 0200282D */ daddu $a1, $s0, $zero /* 18B88C 8025CFAC 08097405 */ j .L8025D014 /* 18B890 8025CFB0 26100001 */ addiu $s0, $s0, 0x1 /* 18B894 8025CFB4 0220202D */ daddu $a0, $s1, $zero /* 18B898 8025CFB8 0C09760C */ jal func_8025D830 /* 18B89C 8025CFBC 0200282D */ daddu $a1, $s0, $zero /* 18B8A0 8025CFC0 08097405 */ j .L8025D014 /* 18B8A4 8025CFC4 26100001 */ addiu $s0, $s0, 0x1 /* 18B8A8 8025CFC8 0220202D */ daddu $a0, $s1, $zero /* 18B8AC 8025CFCC 0C097643 */ jal func_8025D90C /* 18B8B0 8025CFD0 0200282D */ daddu $a1, $s0, $zero /* 18B8B4 8025CFD4 08097405 */ j .L8025D014 /* 18B8B8 8025CFD8 26100001 */ addiu $s0, $s0, 0x1 /* 18B8BC 8025CFDC 0220202D */ daddu $a0, $s1, $zero /* 18B8C0 8025CFE0 0C09769A */ jal func_8025DA68 /* 18B8C4 8025CFE4 0200282D */ daddu $a1, $s0, $zero /* 18B8C8 8025CFE8 08097405 */ j .L8025D014 /* 18B8CC 8025CFEC 26100001 */ addiu $s0, $s0, 0x1 /* 18B8D0 8025CFF0 0220202D */ daddu $a0, $s1, $zero /* 18B8D4 8025CFF4 0C0976F4 */ jal func_8025DBD0 /* 18B8D8 8025CFF8 0200282D */ daddu $a1, $s0, $zero /* 18B8DC 8025CFFC 08097405 */ j .L8025D014 /* 18B8E0 8025D000 26100001 */ addiu $s0, $s0, 0x1 /* 18B8E4 8025D004 0220202D */ daddu $a0, $s1, $zero /* 18B8E8 8025D008 0C097758 */ jal func_8025DD60 /* 18B8EC 8025D00C 0200282D */ daddu $a1, $s0, $zero /* 18B8F0 8025D010 26100001 */ addiu $s0, $s0, 0x1 .L8025D014: /* 18B8F4 8025D014 2A020002 */ slti $v0, $s0, 0x2 /* 18B8F8 8025D018 1440FFBA */ bnez $v0, .L8025CF04 /* 18B8FC 8025D01C 02501021 */ addu $v0, $s2, $s0 .L8025D020: /* 18B900 8025D020 8FBF0020 */ lw $ra, 0x20($sp) /* 18B904 8025D024 8FB3001C */ lw $s3, 0x1C($sp) /* 18B908 8025D028 8FB20018 */ lw $s2, 0x18($sp) /* 18B90C 8025D02C 8FB10014 */ lw $s1, 0x14($sp) /* 18B910 8025D030 8FB00010 */ lw $s0, 0x10($sp) /* 18B914 8025D034 03E00008 */ jr $ra /* 18B918 8025D038 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void _add_part_decoration(ActorPart* actorPart) { DecorationTable* decorationTable; s32 i; if (!(actorPart->flags & 2)) { decorationTable = actorPart->decorationTable; for (i = 0; i < ARRAY_COUNT(decorationTable->type); i++) { switch (decorationTable->type[i]) { case ACTOR_DECORATION_NONE: func_8025D150(actorPart, i); break; case ACTOR_DECORATION_GOLDEN_FLAMES: func_8025D160(actorPart, i); break; case ACTOR_DECORATION_SWEAT: func_8025D2B0(actorPart, i); break; case ACTOR_DECORATION_SEEING_STARS: func_8025D3CC(actorPart, i); break; case ACTOR_DECORATION_RED_FLAMES: func_8025D4C8(actorPart, i); break; case ACTOR_DECORATION_GREY_SMOKE_TRAIL: func_8025D640(actorPart, i); break; case ACTOR_DECORATION_FIRE_SMOKE_TRAIL: func_8025D71C(actorPart, i); break; case ACTOR_DECORATION_WHIRLWIND: func_8025D830(actorPart, i); break; case ACTOR_DECORATION_STEAM_EMITTER: func_8025D90C(actorPart, i); break; case ACTOR_DECORATION_9: func_8025DA68(actorPart, i); break; case ACTOR_DECORATION_A: func_8025DBD0(actorPart, i); break; case ACTOR_DECORATION_RADIAL_STAR_EMITTER: func_8025DD60(actorPart, i); break; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_init_sprites /* 1009E8 802DD8F8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 1009EC 802DD8FC AFB10014 */ sw $s1, 0x14($sp) /* 1009F0 802DD900 0080882D */ daddu $s1, $a0, $zero /* 1009F4 802DD904 3C048035 */ lui $a0, %hi(heap_spriteHead) /* 1009F8 802DD908 2484F800 */ addiu $a0, $a0, %lo(heap_spriteHead) /* 1009FC 802DD90C AFBF0018 */ sw $ra, 0x18($sp) /* 100A00 802DD910 AFB00010 */ sw $s0, 0x10($sp) /* 100A04 802DD914 3C01802E */ lui $at, %hi(spr_allocateBtlComponentsOnWorldHeap) /* 100A08 802DD918 AC20F524 */ sw $zero, %lo(spr_allocateBtlComponentsOnWorldHeap)($at) /* 100A0C 802DD91C 0C00A40C */ jal _heap_create /* 100A10 802DD920 3C050004 */ lui $a1, (0x40000 >> 16) /* 100A14 802DD924 0C04E8DF */ jal imgfx_init /* 100A18 802DD928 2410000C */ addiu $s0, $zero, 0xC /* 100A1C 802DD92C 3C02802E */ lui $v0, %hi(D_802DF578) /* 100A20 802DD930 2442F578 */ addiu $v0, $v0, %lo(D_802DF578) .L802DD934: /* 100A24 802DD934 AC400000 */ sw $zero, 0x0($v0) /* 100A28 802DD938 2610FFFF */ addiu $s0, $s0, -0x1 /* 100A2C 802DD93C 0601FFFD */ bgez $s0, .L802DD934 /* 100A30 802DD940 2442FFFC */ addiu $v0, $v0, -0x4 /* 100A34 802DD944 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* 100A38 802DD948 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* 100A3C 802DD94C 3C01802E */ lui $at, %hi(spr_playerMaxComponents) /* 100A40 802DD950 AC20F580 */ sw $zero, %lo(spr_playerMaxComponents)($at) /* 100A44 802DD954 9042007E */ lbu $v0, 0x7E($v0) /* 100A48 802DD958 30420001 */ andi $v0, $v0, 0x1 /* 100A4C 802DD95C 54400001 */ bnel $v0, $zero, .L802DD964 /* 100A50 802DD960 24110004 */ addiu $s1, $zero, 0x4 .L802DD964: /* 100A54 802DD964 24100001 */ addiu $s0, $zero, 0x1 /* 100A58 802DD968 3C03802E */ lui $v1, %hi(spr_playerSpriteSets) /* 100A5C 802DD96C 2463F4C4 */ addiu $v1, $v1, %lo(spr_playerSpriteSets) /* 100A60 802DD970 02111004 */ sllv $v0, $s1, $s0 /* 100A64 802DD974 00511021 */ addu $v0, $v0, $s1 /* 100A68 802DD978 00021080 */ sll $v0, $v0, 2 /* 100A6C 802DD97C 00431021 */ addu $v0, $v0, $v1 /* 100A70 802DD980 8C440000 */ lw $a0, 0x0($v0) /* 100A74 802DD984 8C450004 */ lw $a1, 0x4($v0) /* 100A78 802DD988 0C0B7B58 */ jal spr_init_player_raster_cache /* 100A7C 802DD98C 8C510008 */ lw $s1, 0x8($v0) /* 100A80 802DD990 02111007 */ srav $v0, $s1, $s0 .L802DD994: /* 100A84 802DD994 30420001 */ andi $v0, $v0, 0x1 /* 100A88 802DD998 50400004 */ beql $v0, $zero, .L802DD9AC /* 100A8C 802DD99C 26100001 */ addiu $s0, $s0, 0x1 /* 100A90 802DD9A0 0C0B7627 */ jal spr_load_player_sprite /* 100A94 802DD9A4 0200202D */ daddu $a0, $s0, $zero /* 100A98 802DD9A8 26100001 */ addiu $s0, $s0, 0x1 .L802DD9AC: /* 100A9C 802DD9AC 2A02000E */ slti $v0, $s0, 0xE /* 100AA0 802DD9B0 1440FFF8 */ bnez $v0, .L802DD994 /* 100AA4 802DD9B4 02111007 */ srav $v0, $s1, $s0 /* 100AA8 802DD9B8 0000802D */ daddu $s0, $zero, $zero /* 100AAC 802DD9BC 2404FFFF */ addiu $a0, $zero, -0x1 /* 100AB0 802DD9C0 3C03802E */ lui $v1, %hi(spr_playerCurrentAnimInfo) /* 100AB4 802DD9C4 2463F588 */ addiu $v1, $v1, %lo(spr_playerCurrentAnimInfo) .L802DD9C8: /* 100AB8 802DD9C8 AC600000 */ sw $zero, 0x0($v1) /* 100ABC 802DD9CC AC640004 */ sw $a0, 0x4($v1) /* 100AC0 802DD9D0 26100001 */ addiu $s0, $s0, 0x1 /* 100AC4 802DD9D4 2A020003 */ slti $v0, $s0, 0x3 /* 100AC8 802DD9D8 1440FFFB */ bnez $v0, .L802DD9C8 /* 100ACC 802DD9DC 2463000C */ addiu $v1, $v1, 0xC /* 100AD0 802DD9E0 0000802D */ daddu $s0, $zero, $zero /* 100AD4 802DD9E4 3C04802E */ lui $a0, %hi(NpcSpriteInstanceCount) /* 100AD8 802DD9E8 2484F958 */ addiu $a0, $a0, %lo(NpcSpriteInstanceCount) /* 100ADC 802DD9EC 3C03802E */ lui $v1, %hi(NpcSpriteData) /* 100AE0 802DD9F0 2463F5B0 */ addiu $v1, $v1, %lo(NpcSpriteData) .L802DD9F4: /* 100AE4 802DD9F4 AC600000 */ sw $zero, 0x0($v1) /* 100AE8 802DD9F8 02041021 */ addu $v0, $s0, $a0 /* 100AEC 802DD9FC 26100001 */ addiu $s0, $s0, 0x1 /* 100AF0 802DDA00 A0400000 */ sb $zero, 0x0($v0) /* 100AF4 802DDA04 2A0200EA */ slti $v0, $s0, 0xEA /* 100AF8 802DDA08 1440FFFA */ bnez $v0, .L802DD9F4 /* 100AFC 802DDA0C 24630004 */ addiu $v1, $v1, 0x4 /* 100B00 802DDA10 0000802D */ daddu $s0, $zero, $zero /* 100B04 802DDA14 2404FFFF */ addiu $a0, $zero, -0x1 /* 100B08 802DDA18 3C03802E */ lui $v1, %hi(SpriteInstances) /* 100B0C 802DDA1C 2463FA48 */ addiu $v1, $v1, %lo(SpriteInstances) .L802DDA20: /* 100B10 802DDA20 AC600000 */ sw $zero, 0x0($v1) /* 100B14 802DDA24 AC600004 */ sw $zero, 0x4($v1) /* 100B18 802DDA28 AC600008 */ sw $zero, 0x8($v1) /* 100B1C 802DDA2C AC64000C */ sw $a0, 0xC($v1) /* 100B20 802DDA30 AC600010 */ sw $zero, 0x10($v1) /* 100B24 802DDA34 26100001 */ addiu $s0, $s0, 0x1 /* 100B28 802DDA38 2A020033 */ slti $v0, $s0, 0x33 /* 100B2C 802DDA3C 1440FFF8 */ bnez $v0, .L802DDA20 /* 100B30 802DDA40 24630014 */ addiu $v1, $v1, 0x14 /* 100B34 802DDA44 0C0B6F50 */ jal spr_init_quad_cache /* 100B38 802DDA48 00000000 */ nop /* 100B3C 802DDA4C 8FBF0018 */ lw $ra, 0x18($sp) /* 100B40 802DDA50 8FB10014 */ lw $s1, 0x14($sp) /* 100B44 802DDA54 8FB00010 */ lw $s0, 0x10($sp) /* 100B48 802DDA58 03E00008 */ jr $ra /* 100B4C 802DDA5C 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void spr_init_sprites(s32 playerSpriteSet) { s32 loadedFlags; s32 i; spr_allocateBtlComponentsOnWorldHeap = FALSE; _heap_create(&heap_spriteHead, 0x40000); imgfx_init(); for (i = 0; i < ARRAY_COUNT(spr_playerSprites); i++) { SpriteAnimData** playerSprites = spr_playerSprites; playerSprites[i] = 0; } spr_playerMaxComponents = 0; if (gGameStatusPtr->peachFlags & PEACH_STATUS_FLAG_IS_PEACH) { playerSpriteSet = PLAYER_SPRITES_PEACH_WORLD; } loadedFlags = (&spr_playerSpriteSets[playerSpriteSet])->initiallyLoaded; spr_init_player_raster_cache((&spr_playerSpriteSets[playerSpriteSet])->cacheSize, (&spr_playerSpriteSets[playerSpriteSet])->rasterSize); for (i = 1; i <= SPR_Peach3; i++) { if ((loadedFlags >> i) & 1) { spr_load_player_sprite(i); } } for (i = 0; i < ARRAY_COUNT(spr_playerCurrentAnimInfo); i++) { spr_playerCurrentAnimInfo[i].componentList = NULL; spr_playerCurrentAnimInfo[i].animID = -1; } for (i = 0; i < ARRAY_COUNT(NpcSpriteData); i++) { NpcSpriteData[i] = NULL; NpcSpriteInstanceCount[i] = 0; } for (i = 0; i < ARRAY_COUNT(SpriteInstances); i++) { SpriteInstances[i].spriteIndex = 0; SpriteInstances[i].componentList = NULL; SpriteInstances[i].spriteData = NULL; SpriteInstances[i].currentAnimID = -1; SpriteInstances[i].notifyValue = 0; } spr_init_quad_cache(); }
### RAW ASSEMBLY INSTRUCTIONS: glabel gather_energy_pink_main /* 33B180 E0026000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 33B184 E0026004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 33B188 E0026008 4485A000 */ mtc1 $a1, $f20 /* 33B18C E002600C F7B60040 */ sdc1 $f22, 0x40($sp) /* 33B190 E0026010 4486B000 */ mtc1 $a2, $f22 /* 33B194 E0026014 AFB1002C */ sw $s1, 0x2C($sp) /* 33B198 E0026018 0080882D */ daddu $s1, $a0, $zero /* 33B19C E002601C F7B80048 */ sdc1 $f24, 0x48($sp) /* 33B1A0 E0026020 4487C000 */ mtc1 $a3, $f24 /* 33B1A4 E0026024 27A40010 */ addiu $a0, $sp, 0x10 /* 33B1A8 E0026028 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 33B1AC E002602C C7BA0068 */ lwc1 $f26, 0x68($sp) /* 33B1B0 E0026030 3C02E002 */ lui $v0, %hi(gather_energy_pink_init) /* 33B1B4 E0026034 24426184 */ addiu $v0, $v0, %lo(gather_energy_pink_init) /* 33B1B8 E0026038 AFA20018 */ sw $v0, 0x18($sp) /* 33B1BC E002603C 3C02E002 */ lui $v0, %hi(gather_energy_pink_update) /* 33B1C0 E0026040 2442618C */ addiu $v0, $v0, %lo(gather_energy_pink_update) /* 33B1C4 E0026044 AFA2001C */ sw $v0, 0x1C($sp) /* 33B1C8 E0026048 3C02E002 */ lui $v0, %hi(gather_energy_pink_render) /* 33B1CC E002604C 244264B0 */ addiu $v0, $v0, %lo(gather_energy_pink_render) /* 33B1D0 E0026050 AFA20020 */ sw $v0, 0x20($sp) /* 33B1D4 E0026054 24020013 */ addiu $v0, $zero, 0x13 /* 33B1D8 E0026058 AFBF0030 */ sw $ra, 0x30($sp) /* 33B1DC E002605C AFB00028 */ sw $s0, 0x28($sp) /* 33B1E0 E0026060 AFA00010 */ sw $zero, 0x10($sp) /* 33B1E4 E0026064 AFA00024 */ sw $zero, 0x24($sp) /* 33B1E8 E0026068 0C080124 */ jal shim_create_effect_instance /* 33B1EC E002606C AFA20014 */ sw $v0, 0x14($sp) /* 33B1F0 E0026070 24040060 */ addiu $a0, $zero, 0x60 /* 33B1F4 E0026074 24030001 */ addiu $v1, $zero, 0x1 /* 33B1F8 E0026078 0040802D */ daddu $s0, $v0, $zero /* 33B1FC E002607C 0C08012C */ jal shim_general_heap_malloc /* 33B200 E0026080 AE030008 */ sw $v1, 0x8($s0) /* 33B204 E0026084 AE02000C */ sw $v0, 0xC($s0) /* 33B208 E0026088 0040802D */ daddu $s0, $v0, $zero /* 33B20C E002608C 56000003 */ bnel $s0, $zero, .LE002609C /* 33B210 E0026090 AE110000 */ sw $s1, 0x0($s0) .LE0026094: /* 33B214 E0026094 08009825 */ j .LE0026094 /* 33B218 E0026098 00000000 */ nop .LE002609C: /* 33B21C E002609C 3C014120 */ lui $at, (0x41200000 >> 16) /* 33B220 E00260A0 44810000 */ mtc1 $at, $f0 /* 33B224 E00260A4 8FA2006C */ lw $v0, 0x6C($sp) /* 33B228 E00260A8 24040168 */ addiu $a0, $zero, 0x168 /* 33B22C E00260AC AE00002C */ sw $zero, 0x2C($s0) /* 33B230 E00260B0 AE000024 */ sw $zero, 0x24($s0) /* 33B234 E00260B4 E6140010 */ swc1 $f20, 0x10($s0) /* 33B238 E00260B8 E6160014 */ swc1 $f22, 0x14($s0) /* 33B23C E00260BC E6180018 */ swc1 $f24, 0x18($s0) /* 33B240 E00260C0 AE000044 */ sw $zero, 0x44($s0) /* 33B244 E00260C4 AE000040 */ sw $zero, 0x40($s0) /* 33B248 E00260C8 AE00004C */ sw $zero, 0x4C($s0) /* 33B24C E00260CC AE000048 */ sw $zero, 0x48($s0) /* 33B250 E00260D0 AE000034 */ sw $zero, 0x34($s0) /* 33B254 E00260D4 AE000030 */ sw $zero, 0x30($s0) /* 33B258 E00260D8 AE00003C */ sw $zero, 0x3C($s0) /* 33B25C E00260DC AE000038 */ sw $zero, 0x38($s0) /* 33B260 E00260E0 E6140004 */ swc1 $f20, 0x4($s0) /* 33B264 E00260E4 E6160008 */ swc1 $f22, 0x8($s0) /* 33B268 E00260E8 E618000C */ swc1 $f24, 0xC($s0) /* 33B26C E00260EC AE020028 */ sw $v0, 0x28($s0) /* 33B270 E00260F0 0C080000 */ jal effect_rand_int /* 33B274 E00260F4 E600001C */ swc1 $f0, 0x1C($s0) /* 33B278 E00260F8 44820000 */ mtc1 $v0, $f0 /* 33B27C E00260FC 00000000 */ nop /* 33B280 E0026100 46800020 */ cvt.s.w $f0, $f0 /* 33B284 E0026104 3C014080 */ lui $at, (0x40800000 >> 16) /* 33B288 E0026108 44811000 */ mtc1 $at, $f2 /* 33B28C E002610C 24020001 */ addiu $v0, $zero, 0x1 /* 33B290 E0026110 E6000058 */ swc1 $f0, 0x58($s0) /* 33B294 E0026114 AE000050 */ sw $zero, 0x50($s0) /* 33B298 E0026118 AE000054 */ sw $zero, 0x54($s0) /* 33B29C E002611C 16220005 */ bne $s1, $v0, .LE0026134 /* 33B2A0 E0026120 E602005C */ swc1 $f2, 0x5C($s0) /* 33B2A4 E0026124 24020060 */ addiu $v0, $zero, 0x60 /* 33B2A8 E0026128 AE02003C */ sw $v0, 0x3C($s0) /* 33B2AC E002612C 08009858 */ j .LE0026160 /* 33B2B0 E0026130 E61A0020 */ swc1 $f26, 0x20($s0) .LE0026134: /* 33B2B4 E0026134 3C01E002 */ lui $at, (0xE0026A20 >> 16) /* 33B2B8 E0026138 D4226A20 */ ldc1 $f2, (0xE0026A20 & 0xFFFF)($at) /* 33B2BC E002613C 4600D021 */ cvt.d.s $f0, $f26 /* 33B2C0 E0026140 46220002 */ mul.d $f0, $f0, $f2 /* 33B2C4 E0026144 00000000 */ nop /* 33B2C8 E0026148 2402FFFE */ addiu $v0, $zero, -0x2 /* 33B2CC E002614C AE020044 */ sw $v0, 0x44($s0) /* 33B2D0 E0026150 2402FFFC */ addiu $v0, $zero, -0x4 /* 33B2D4 E0026154 AE02004C */ sw $v0, 0x4C($s0) /* 33B2D8 E0026158 46200020 */ cvt.s.d $f0, $f0 /* 33B2DC E002615C E6000020 */ swc1 $f0, 0x20($s0) .LE0026160: /* 33B2E0 E0026160 8FBF0030 */ lw $ra, 0x30($sp) /* 33B2E4 E0026164 8FB1002C */ lw $s1, 0x2C($sp) /* 33B2E8 E0026168 8FB00028 */ lw $s0, 0x28($sp) /* 33B2EC E002616C D7BA0050 */ ldc1 $f26, 0x50($sp) /* 33B2F0 E0026170 D7B80048 */ ldc1 $f24, 0x48($sp) /* 33B2F4 E0026174 D7B60040 */ ldc1 $f22, 0x40($sp) /* 33B2F8 E0026178 D7B40038 */ ldc1 $f20, 0x38($sp) /* 33B2FC E002617C 03E00008 */ jr $ra /* 33B300 E0026180 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void gather_energy_pink_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 scale, s32 duration) { EffectBlueprint bp; EffectInstance* effect; GatherEnergyPinkFXData* data; s32 numParts = 1; bp.unk_00 = 0; bp.init = gather_energy_pink_init; bp.update = gather_energy_pink_update; bp.renderWorld = gather_energy_pink_render; bp.renderUI = NULL; bp.effectID = EFFECT_GATHER_ENERGY_PINK; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.gatherEnergyPink = shim_general_heap_malloc(sizeof(*data)); ASSERT (data != NULL); data->unk_00 = type; data->unk_28 = duration; data->unk_2C = 0; data->unk_24 = 0; data->posB.x = posX; data->posB.y = posY; data->posB.z = posZ; data->unk_44 = 0; data->unk_40 = 0; data->unk_4C = 0; data->unk_48 = 0; data->unk_34 = 0; data->unk_30 = 0; data->unk_3C = 0; data->unk_38 = 0; data->posA.x = posX; data->posA.y = posY; data->posA.z = posZ; data->unk_1C = 10.0f; data->unk_58 = effect_rand_int(360); data->unk_5C = 4.0f; data->unk_50 = 0; data->unk_54 = 0; if (type == 1) { data->unk_3C = 96; data->unk_20 = scale; } else { data->unk_44 = -2; data->unk_4C = -4; data->unk_20 = scale * 0.2; } return; }
### RAW ASSEMBLY INSTRUCTIONS: glabel osContInit /* 3CF80 80061B80 3C028009 */ lui $v0, %hi(D_80093DB0) /* 3CF84 80061B84 8C423DB0 */ lw $v0, %lo(D_80093DB0)($v0) /* 3CF88 80061B88 27BDFF80 */ addiu $sp, $sp, -0x80 /* 3CF8C 80061B8C AFB40070 */ sw $s4, 0x70($sp) /* 3CF90 80061B90 0080A021 */ addu $s4, $a0, $zero /* 3CF94 80061B94 AFB50074 */ sw $s5, 0x74($sp) /* 3CF98 80061B98 00A0A821 */ addu $s5, $a1, $zero /* 3CF9C 80061B9C AFB60078 */ sw $s6, 0x78($sp) /* 3CFA0 80061BA0 00C0B021 */ addu $s6, $a2, $zero /* 3CFA4 80061BA4 AFBF007C */ sw $ra, 0x7C($sp) /* 3CFA8 80061BA8 AFB3006C */ sw $s3, 0x6C($sp) /* 3CFAC 80061BAC AFB20068 */ sw $s2, 0x68($sp) /* 3CFB0 80061BB0 AFB10064 */ sw $s1, 0x64($sp) /* 3CFB4 80061BB4 10400003 */ beqz $v0, .L80061BC4 /* 3CFB8 80061BB8 AFB00060 */ sw $s0, 0x60($sp) /* 3CFBC 80061BBC 0801873D */ j .L80061CF4 /* 3CFC0 80061BC0 00001021 */ addu $v0, $zero, $zero .L80061BC4: /* 3CFC4 80061BC4 24020001 */ addiu $v0, $zero, 0x1 /* 3CFC8 80061BC8 3C018009 */ lui $at, %hi(D_80093DB0) /* 3CFCC 80061BCC 0C0198A8 */ jal osGetTime /* 3CFD0 80061BD0 AC223DB0 */ sw $v0, %lo(D_80093DB0)($at) /* 3CFD4 80061BD4 00409021 */ addu $s2, $v0, $zero /* 3CFD8 80061BD8 00609821 */ addu $s3, $v1, $zero /* 3CFDC 80061BDC 56400022 */ bnel $s2, $zero, .L80061C68 /* 3CFE0 80061BE0 24020004 */ addiu $v0, $zero, 0x4 /* 3CFE4 80061BE4 16400007 */ bnez $s2, .L80061C04 /* 3CFE8 80061BE8 27B10040 */ addiu $s1, $sp, 0x40 /* 3CFEC 80061BEC 3C020165 */ lui $v0, (0x165A0BB >> 16) /* 3CFF0 80061BF0 3442A0BB */ ori $v0, $v0, (0x165A0BB & 0xFFFF) /* 3CFF4 80061BF4 0053102B */ sltu $v0, $v0, $s3 /* 3CFF8 80061BF8 1440001B */ bnez $v0, .L80061C68 /* 3CFFC 80061BFC 24020004 */ addiu $v0, $zero, 0x4 /* 3D000 80061C00 27B10040 */ addiu $s1, $sp, 0x40 .L80061C04: /* 3D004 80061C04 02202021 */ addu $a0, $s1, $zero /* 3D008 80061C08 27B00058 */ addiu $s0, $sp, 0x58 /* 3D00C 80061C0C 02002821 */ addu $a1, $s0, $zero /* 3D010 80061C10 0C019560 */ jal osCreateMesgQueue /* 3D014 80061C14 24060001 */ addiu $a2, $zero, 0x1 /* 3D018 80061C18 00004021 */ addu $t0, $zero, $zero /* 3D01C 80061C1C 00004821 */ addu $t1, $zero, $zero /* 3D020 80061C20 27A40020 */ addiu $a0, $sp, 0x20 /* 3D024 80061C24 24060000 */ addiu $a2, $zero, 0x0 /* 3D028 80061C28 3C070165 */ lui $a3, (0x165A0BC >> 16) /* 3D02C 80061C2C 34E7A0BC */ ori $a3, $a3, (0x165A0BC & 0xFFFF) /* 3D030 80061C30 00F3102B */ sltu $v0, $a3, $s3 /* 3D034 80061C34 00F33823 */ subu $a3, $a3, $s3 /* 3D038 80061C38 00D23023 */ subu $a2, $a2, $s2 /* 3D03C 80061C3C 00C23023 */ subu $a2, $a2, $v0 /* 3D040 80061C40 AFA80010 */ sw $t0, 0x10($sp) /* 3D044 80061C44 AFA90014 */ sw $t1, 0x14($sp) /* 3D048 80061C48 AFB10018 */ sw $s1, 0x18($sp) /* 3D04C 80061C4C 0C0198D4 */ jal osSetTimer /* 3D050 80061C50 AFB0001C */ sw $s0, 0x1C($sp) /* 3D054 80061C54 02202021 */ addu $a0, $s1, $zero /* 3D058 80061C58 02002821 */ addu $a1, $s0, $zero /* 3D05C 80061C5C 0C0195BC */ jal osRecvMesg /* 3D060 80061C60 24060001 */ addiu $a2, $zero, 0x1 /* 3D064 80061C64 24020004 */ addiu $v0, $zero, 0x4 .L80061C68: /* 3D068 80061C68 3C01800A */ lui $at, %hi(__osMaxControllers) /* 3D06C 80061C6C A022A606 */ sb $v0, %lo(__osMaxControllers)($at) /* 3D070 80061C70 0C018774 */ jal osPackRequestData /* 3D074 80061C74 00002021 */ addu $a0, $zero, $zero /* 3D078 80061C78 24040001 */ addiu $a0, $zero, 0x1 /* 3D07C 80061C7C 3C11800B */ lui $s1, %hi(__osContPifRam) /* 3D080 80061C80 26310ED0 */ addiu $s1, $s1, %lo(__osContPifRam) /* 3D084 80061C84 0C019730 */ jal __osSiRawStartDma /* 3D088 80061C88 02202821 */ addu $a1, $s1, $zero /* 3D08C 80061C8C 02802021 */ addu $a0, $s4, $zero /* 3D090 80061C90 27B00058 */ addiu $s0, $sp, 0x58 /* 3D094 80061C94 02002821 */ addu $a1, $s0, $zero /* 3D098 80061C98 0C0195BC */ jal osRecvMesg /* 3D09C 80061C9C 24060001 */ addiu $a2, $zero, 0x1 /* 3D0A0 80061CA0 00002021 */ addu $a0, $zero, $zero /* 3D0A4 80061CA4 0C019730 */ jal __osSiRawStartDma /* 3D0A8 80061CA8 02202821 */ addu $a1, $s1, $zero /* 3D0AC 80061CAC 02802021 */ addu $a0, $s4, $zero /* 3D0B0 80061CB0 02002821 */ addu $a1, $s0, $zero /* 3D0B4 80061CB4 24060001 */ addiu $a2, $zero, 0x1 /* 3D0B8 80061CB8 0C0195BC */ jal osRecvMesg /* 3D0BC 80061CBC 00408021 */ addu $s0, $v0, $zero /* 3D0C0 80061CC0 02A02021 */ addu $a0, $s5, $zero /* 3D0C4 80061CC4 0C018747 */ jal osContGetInitData /* 3D0C8 80061CC8 02C02821 */ addu $a1, $s6, $zero /* 3D0CC 80061CCC 3C01800A */ lui $at, %hi(__osContLastCmd) /* 3D0D0 80061CD0 0C01975C */ jal __osSiCreateAccessQueue /* 3D0D4 80061CD4 A020A61C */ sb $zero, %lo(__osContLastCmd)($at) /* 3D0D8 80061CD8 3C04800E */ lui $a0, %hi(D_800DAAC0) /* 3D0DC 80061CDC 2484AAC0 */ addiu $a0, $a0, %lo(D_800DAAC0) /* 3D0E0 80061CE0 3C05800A */ lui $a1, %hi(D_8009A620) /* 3D0E4 80061CE4 24A5A620 */ addiu $a1, $a1, %lo(D_8009A620) /* 3D0E8 80061CE8 0C019560 */ jal osCreateMesgQueue /* 3D0EC 80061CEC 24060001 */ addiu $a2, $zero, 0x1 /* 3D0F0 80061CF0 02001021 */ addu $v0, $s0, $zero .L80061CF4: /* 3D0F4 80061CF4 8FBF007C */ lw $ra, 0x7C($sp) /* 3D0F8 80061CF8 8FB60078 */ lw $s6, 0x78($sp) /* 3D0FC 80061CFC 8FB50074 */ lw $s5, 0x74($sp) /* 3D100 80061D00 8FB40070 */ lw $s4, 0x70($sp) /* 3D104 80061D04 8FB3006C */ lw $s3, 0x6C($sp) /* 3D108 80061D08 8FB20068 */ lw $s2, 0x68($sp) /* 3D10C 80061D0C 8FB10064 */ lw $s1, 0x64($sp) /* 3D110 80061D10 8FB00060 */ lw $s0, 0x60($sp) /* 3D114 80061D14 03E00008 */ jr $ra /* 3D118 80061D18 27BD0080 */ addiu $sp, $sp, 0x80 ### DECOMPILED C INSTRUCTIONS: s32 osContInit(OSMesgQueue* mq, u8* bitpattern, OSContStatus* data) { OSMesg dummy; s32 ret = 0; OSTime t; OSTimer mytimer; OSMesgQueue timerMesgQueue; if (__osContinitialized != 0) { return 0; } __osContinitialized = 1; t = osGetTime(); if (t < OS_USEC_TO_CYCLES(500000)) { osCreateMesgQueue(&timerMesgQueue, &dummy, 1); osSetTimer(&mytimer, OS_USEC_TO_CYCLES(500000) - t, 0, &timerMesgQueue, &dummy); osRecvMesg(&timerMesgQueue, &dummy, OS_MESG_BLOCK); } __osMaxControllers = 4; __osPackRequestData(CONT_CMD_REQUEST_STATUS); ret = __osSiRawStartDma(OS_WRITE, __osContPifRam.ramarray); osRecvMesg(mq, &dummy, OS_MESG_BLOCK); ret = __osSiRawStartDma(OS_READ, __osContPifRam.ramarray); osRecvMesg(mq, &dummy, OS_MESG_BLOCK); __osContGetInitData(bitpattern, data); __osContLastCmd = CONT_CMD_REQUEST_STATUS; __osSiCreateAccessQueue(); osCreateMesgQueue(&__osEepromTimerQ, &__osEepromTimerMsg, 1); return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel ice_pillar_main /* 409990 E011E000 27BDFF88 */ addiu $sp, $sp, -0x78 /* 409994 E011E004 F7B60060 */ sdc1 $f22, 0x60($sp) /* 409998 E011E008 4485B000 */ mtc1 $a1, $f22 /* 40999C E011E00C F7BA0070 */ sdc1 $f26, 0x70($sp) /* 4099A0 E011E010 4486D000 */ mtc1 $a2, $f26 /* 4099A4 E011E014 F7B80068 */ sdc1 $f24, 0x68($sp) /* 4099A8 E011E018 4487C000 */ mtc1 $a3, $f24 /* 4099AC E011E01C AFB3004C */ sw $s3, 0x4C($sp) /* 4099B0 E011E020 0080982D */ daddu $s3, $a0, $zero /* 4099B4 E011E024 F7B40058 */ sdc1 $f20, 0x58($sp) /* 4099B8 E011E028 C7B40088 */ lwc1 $f20, 0x88($sp) /* 4099BC E011E02C 27A40028 */ addiu $a0, $sp, 0x28 /* 4099C0 E011E030 AFB20048 */ sw $s2, 0x48($sp) /* 4099C4 E011E034 8FB2008C */ lw $s2, 0x8C($sp) /* 4099C8 E011E038 3C02E012 */ lui $v0, %hi(ice_pillar_init) /* 4099CC E011E03C 2442E18C */ addiu $v0, $v0, %lo(ice_pillar_init) /* 4099D0 E011E040 AFA20030 */ sw $v0, 0x30($sp) /* 4099D4 E011E044 3C02E012 */ lui $v0, %hi(ice_pillar_update) /* 4099D8 E011E048 2442E194 */ addiu $v0, $v0, %lo(ice_pillar_update) /* 4099DC E011E04C AFA20034 */ sw $v0, 0x34($sp) /* 4099E0 E011E050 3C02E012 */ lui $v0, %hi(ice_pillar_render) /* 4099E4 E011E054 2442E530 */ addiu $v0, $v0, %lo(ice_pillar_render) /* 4099E8 E011E058 AFA20038 */ sw $v0, 0x38($sp) /* 4099EC E011E05C 24020081 */ addiu $v0, $zero, 0x81 /* 4099F0 E011E060 AFBF0050 */ sw $ra, 0x50($sp) /* 4099F4 E011E064 AFB10044 */ sw $s1, 0x44($sp) /* 4099F8 E011E068 AFB00040 */ sw $s0, 0x40($sp) /* 4099FC E011E06C AFA00028 */ sw $zero, 0x28($sp) /* 409A00 E011E070 AFA0003C */ sw $zero, 0x3C($sp) /* 409A04 E011E074 0C080124 */ jal shim_create_effect_instance /* 409A08 E011E078 AFA2002C */ sw $v0, 0x2C($sp) /* 409A0C E011E07C 2404002C */ addiu $a0, $zero, 0x2C /* 409A10 E011E080 24030001 */ addiu $v1, $zero, 0x1 /* 409A14 E011E084 0040882D */ daddu $s1, $v0, $zero /* 409A18 E011E088 0C08012C */ jal shim_general_heap_malloc /* 409A1C E011E08C AE230008 */ sw $v1, 0x8($s1) /* 409A20 E011E090 0040802D */ daddu $s0, $v0, $zero /* 409A24 E011E094 16000003 */ bnez $s0, .LE011E0A4 /* 409A28 E011E098 AE22000C */ sw $v0, 0xC($s1) .LE011E09C: /* 409A2C E011E09C 08047827 */ j .LE011E09C /* 409A30 E011E0A0 00000000 */ nop .LE011E0A4: /* 409A34 E011E0A4 AE130000 */ sw $s3, 0x0($s0) /* 409A38 E011E0A8 1E400004 */ bgtz $s2, .LE011E0BC /* 409A3C E011E0AC AE000014 */ sw $zero, 0x14($s0) /* 409A40 E011E0B0 240203E8 */ addiu $v0, $zero, 0x3E8 /* 409A44 E011E0B4 08047830 */ j .LE011E0C0 /* 409A48 E011E0B8 AE020010 */ sw $v0, 0x10($s0) .LE011E0BC: /* 409A4C E011E0BC AE120010 */ sw $s2, 0x10($s0) .LE011E0C0: /* 409A50 E011E0C0 24040072 */ addiu $a0, $zero, 0x72 /* 409A54 E011E0C4 240300FF */ addiu $v1, $zero, 0xFF /* 409A58 E011E0C8 240200F0 */ addiu $v0, $zero, 0xF0 /* 409A5C E011E0CC A203001B */ sb $v1, 0x1B($s0) /* 409A60 E011E0D0 E6160004 */ swc1 $f22, 0x4($s0) /* 409A64 E011E0D4 E61A0008 */ swc1 $f26, 0x8($s0) /* 409A68 E011E0D8 E618000C */ swc1 $f24, 0xC($s0) /* 409A6C E011E0DC E6140020 */ swc1 $f20, 0x20($s0) /* 409A70 E011E0E0 A2030018 */ sb $v1, 0x18($s0) /* 409A74 E011E0E4 A2030019 */ sb $v1, 0x19($s0) /* 409A78 E011E0E8 A203001A */ sb $v1, 0x1A($s0) /* 409A7C E011E0EC A202001C */ sb $v0, 0x1C($s0) /* 409A80 E011E0F0 A203001D */ sb $v1, 0x1D($s0) /* 409A84 E011E0F4 A203001E */ sb $v1, 0x1E($s0) /* 409A88 E011E0F8 A203001F */ sb $v1, 0x1F($s0) /* 409A8C E011E0FC A2000025 */ sb $zero, 0x25($s0) /* 409A90 E011E100 0C080150 */ jal shim_load_effect /* 409A94 E011E104 A2000024 */ sb $zero, 0x24($s0) /* 409A98 E011E108 24040001 */ addiu $a0, $zero, 0x1 /* 409A9C E011E10C 3C014120 */ lui $at, (0x41200000 >> 16) /* 409AA0 E011E110 44810000 */ mtc1 $at, $f0 /* 409AA4 E011E114 3C014200 */ lui $at, (0x42000000 >> 16) /* 409AA8 E011E118 44811000 */ mtc1 $at, $f2 /* 409AAC E011E11C 3C0141F0 */ lui $at, (0x41F00000 >> 16) /* 409AB0 E011E120 44812000 */ mtc1 $at, $f4 /* 409AB4 E011E124 4600D680 */ add.s $f26, $f26, $f0 /* 409AB8 E011E128 4405B000 */ mfc1 $a1, $f22 /* 409ABC E011E12C 4407C000 */ mfc1 $a3, $f24 /* 409AC0 E011E130 4406D000 */ mfc1 $a2, $f26 /* 409AC4 E011E134 24020004 */ addiu $v0, $zero, 0x4 /* 409AC8 E011E138 E7B40018 */ swc1 $f20, 0x18($sp) /* 409ACC E011E13C AFA2001C */ sw $v0, 0x1C($sp) /* 409AD0 E011E140 AFA00020 */ sw $zero, 0x20($sp) /* 409AD4 E011E144 E7A20010 */ swc1 $f2, 0x10($sp) /* 409AD8 E011E148 0C039000 */ jal misc_particles_main /* 409ADC E011E14C E7A40014 */ swc1 $f4, 0x14($sp) /* 409AE0 E011E150 2404006F */ addiu $a0, $zero, 0x6F /* 409AE4 E011E154 0C080150 */ jal shim_load_effect /* 409AE8 E011E158 AE020028 */ sw $v0, 0x28($s0) /* 409AEC E011E15C 0220102D */ daddu $v0, $s1, $zero /* 409AF0 E011E160 8FBF0050 */ lw $ra, 0x50($sp) /* 409AF4 E011E164 8FB3004C */ lw $s3, 0x4C($sp) /* 409AF8 E011E168 8FB20048 */ lw $s2, 0x48($sp) /* 409AFC E011E16C 8FB10044 */ lw $s1, 0x44($sp) /* 409B00 E011E170 8FB00040 */ lw $s0, 0x40($sp) /* 409B04 E011E174 D7BA0070 */ ldc1 $f26, 0x70($sp) /* 409B08 E011E178 D7B80068 */ ldc1 $f24, 0x68($sp) /* 409B0C E011E17C D7B60060 */ ldc1 $f22, 0x60($sp) /* 409B10 E011E180 D7B40058 */ ldc1 $f20, 0x58($sp) /* 409B14 E011E184 03E00008 */ jr $ra /* 409B18 E011E188 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: EffectInstance* ice_pillar_main(s32 arg0, f32 x, f32 y, f32 z, f32 scale, s32 arg5) { EffectBlueprint effectBp; EffectInstance* effect; IcePillarFXData* data; s32 numParts = 1; effectBp.init = ice_pillar_init; effectBp.update = ice_pillar_update; effectBp.renderWorld = ice_pillar_render; effectBp.unk_00 = 0; effectBp.renderUI = NULL; effectBp.effectID = EFFECT_ICE_PILLAR; effect = shim_create_effect_instance(&effectBp); effect->numParts = numParts; data = effect->data.icePillar = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(data != NULL); data->unk_00 = arg0; data->lifeTime = 0; if (arg5 <= 0) { data->timeLeft = 1000; } else { data->timeLeft = arg5; } data->prim.a = 255; data->pos.x = x; data->pos.y = y; data->pos.z = z; data->scale = scale; data->prim.r = 255; data->prim.g = 255; data->prim.b = 255; data->env.r = 240; data->env.g = 255; data->env.b = 255; data->env.a = 255; data->unk_24 = data->unk_25 = 0; shim_load_effect(EFFECT_MISC_PARTICLES); data->miscParticles = misc_particles_main(1, x, y + 10.0f, z, 32.0f, 30.0f, scale, 4, 0); shim_load_effect(EFFECT_COLD_BREATH); return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel try_inflict_status /* 195458 80266B78 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 19545C 80266B7C AFB20018 */ sw $s2, 0x18($sp) /* 195460 80266B80 0080902D */ daddu $s2, $a0, $zero /* 195464 80266B84 AFB40020 */ sw $s4, 0x20($sp) /* 195468 80266B88 00A0A02D */ daddu $s4, $a1, $zero /* 19546C 80266B8C AFB50024 */ sw $s5, 0x24($sp) /* 195470 80266B90 AFB3001C */ sw $s3, 0x1C($sp) /* 195474 80266B94 3C13800E */ lui $s3, %hi(gBattleStatus) /* 195478 80266B98 2673C070 */ addiu $s3, $s3, %lo(gBattleStatus) /* 19547C 80266B9C AFBF0028 */ sw $ra, 0x28($sp) /* 195480 80266BA0 AFB10014 */ sw $s1, 0x14($sp) /* 195484 80266BA4 AFB00010 */ sw $s0, 0x10($sp) /* 195488 80266BA8 92630194 */ lbu $v1, 0x194($s3) /* 19548C 80266BAC 240200FE */ addiu $v0, $zero, 0xFE /* 195490 80266BB0 1462000C */ bne $v1, $v0, .L80266BE4 /* 195494 80266BB4 00C0A82D */ daddu $s5, $a2, $zero /* 195498 80266BB8 8E44020C */ lw $a0, 0x20C($s2) /* 19549C 80266BBC 82710195 */ lb $s1, 0x195($s3) /* 1954A0 80266BC0 0C0997BB */ jal lookup_status_duration_mod /* 1954A4 80266BC4 02A0282D */ daddu $a1, $s5, $zero /* 1954A8 80266BC8 0240202D */ daddu $a0, $s2, $zero /* 1954AC 80266BCC 0280282D */ daddu $a1, $s4, $zero /* 1954B0 80266BD0 02A0302D */ daddu $a2, $s5, $zero /* 1954B4 80266BD4 0C099B3C */ jal inflict_status_set_duration /* 1954B8 80266BD8 02223821 */ addu $a3, $s1, $v0 /* 1954BC 80266BDC 08099B33 */ j .L80266CCC /* 1954C0 80266BE0 00000000 */ nop .L80266BE4: /* 1954C4 80266BE4 8E44020C */ lw $a0, 0x20C($s2) /* 1954C8 80266BE8 10800026 */ beqz $a0, .L80266C84 /* 1954CC 80266BEC 0000882D */ daddu $s1, $zero, $zero /* 1954D0 80266BF0 8E620190 */ lw $v0, 0x190($s3) /* 1954D4 80266BF4 3C034000 */ lui $v1, (0x40000000 >> 16) /* 1954D8 80266BF8 00431024 */ and $v0, $v0, $v1 /* 1954DC 80266BFC 14400005 */ bnez $v0, .L80266C14 /* 1954E0 80266C00 00000000 */ nop /* 1954E4 80266C04 0C0997A6 */ jal lookup_status_chance /* 1954E8 80266C08 0280282D */ daddu $a1, $s4, $zero /* 1954EC 80266C0C 08099B09 */ j .L80266C24 /* 1954F0 80266C10 0040802D */ daddu $s0, $v0, $zero .L80266C14: /* 1954F4 80266C14 0C0997A6 */ jal lookup_status_chance /* 1954F8 80266C18 0280282D */ daddu $a1, $s4, $zero /* 1954FC 80266C1C 1040001A */ beqz $v0, .L80266C88 /* 195500 80266C20 24100064 */ addiu $s0, $zero, 0x64 .L80266C24: /* 195504 80266C24 1A000018 */ blez $s0, .L80266C88 /* 195508 80266C28 3C0351EB */ lui $v1, (0x51EB851F >> 16) /* 19550C 80266C2C 92620194 */ lbu $v0, 0x194($s3) /* 195510 80266C30 02020018 */ mult $s0, $v0 /* 195514 80266C34 00001012 */ mflo $v0 /* 195518 80266C38 3463851F */ ori $v1, $v1, (0x51EB851F & 0xFFFF) /* 19551C 80266C3C 00000000 */ nop /* 195520 80266C40 00430018 */ mult $v0, $v1 /* 195524 80266C44 000217C3 */ sra $v0, $v0, 31 /* 195528 80266C48 00001810 */ mfhi $v1 /* 19552C 80266C4C 00031943 */ sra $v1, $v1, 5 /* 195530 80266C50 00628023 */ subu $s0, $v1, $v0 /* 195534 80266C54 1A00000C */ blez $s0, .L80266C88 /* 195538 80266C58 00000000 */ nop /* 19553C 80266C5C 0C00A67F */ jal rand_int /* 195540 80266C60 24040064 */ addiu $a0, $zero, 0x64 /* 195544 80266C64 0202102A */ slt $v0, $s0, $v0 /* 195548 80266C68 14400007 */ bnez $v0, .L80266C88 /* 19554C 80266C6C 00000000 */ nop /* 195550 80266C70 8E44020C */ lw $a0, 0x20C($s2) /* 195554 80266C74 0C0997BB */ jal lookup_status_duration_mod /* 195558 80266C78 02A0282D */ daddu $a1, $s5, $zero /* 19555C 80266C7C 08099B22 */ j .L80266C88 /* 195560 80266C80 24510003 */ addiu $s1, $v0, 0x3 .L80266C84: /* 195564 80266C84 24110003 */ addiu $s1, $zero, 0x3 .L80266C88: /* 195568 80266C88 5A20000F */ blezl $s1, .L80266CC8 /* 19556C 80266C8C 0000882D */ daddu $s1, $zero, $zero /* 195570 80266C90 8E620190 */ lw $v0, 0x190($s3) /* 195574 80266C94 04410007 */ bgez $v0, .L80266CB4 /* 195578 80266C98 0240202D */ daddu $a0, $s2, $zero /* 19557C 80266C9C 8E44020C */ lw $a0, 0x20C($s2) /* 195580 80266CA0 82710195 */ lb $s1, 0x195($s3) /* 195584 80266CA4 0C0997BB */ jal lookup_status_duration_mod /* 195588 80266CA8 02A0282D */ daddu $a1, $s5, $zero /* 19558C 80266CAC 02228821 */ addu $s1, $s1, $v0 /* 195590 80266CB0 0240202D */ daddu $a0, $s2, $zero .L80266CB4: /* 195594 80266CB4 0280282D */ daddu $a1, $s4, $zero /* 195598 80266CB8 0C0997D0 */ jal inflict_status /* 19559C 80266CBC 0220302D */ daddu $a2, $s1, $zero /* 1955A0 80266CC0 08099B33 */ j .L80266CCC /* 1955A4 80266CC4 0220102D */ daddu $v0, $s1, $zero .L80266CC8: /* 1955A8 80266CC8 0220102D */ daddu $v0, $s1, $zero .L80266CCC: /* 1955AC 80266CCC 8FBF0028 */ lw $ra, 0x28($sp) /* 1955B0 80266CD0 8FB50024 */ lw $s5, 0x24($sp) /* 1955B4 80266CD4 8FB40020 */ lw $s4, 0x20($sp) /* 1955B8 80266CD8 8FB3001C */ lw $s3, 0x1C($sp) /* 1955BC 80266CDC 8FB20018 */ lw $s2, 0x18($sp) /* 1955C0 80266CE0 8FB10014 */ lw $s1, 0x14($sp) /* 1955C4 80266CE4 8FB00010 */ lw $s0, 0x10($sp) /* 1955C8 80266CE8 03E00008 */ jr $ra /* 1955CC 80266CEC 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: s32 try_inflict_status(Actor* actor, s32 statusTypeKey, s32 statusKey) { BattleStatus* battleStatus = &gBattleStatus; s32 chance; s32 duration; if (battleStatus->statusChance == STATUS_KEY_IGNORE_RES) { duration = battleStatus->statusDuration; duration += lookup_status_duration_mod(actor->statusTable, statusKey); return inflict_status_set_duration(actor, statusTypeKey, statusKey, duration); } duration = 0; if (actor->statusTable != NULL) { if (!(battleStatus->currentAttackStatus & STATUS_FLAG_RIGHT_ON)) { chance = lookup_status_chance(actor->statusTable, statusTypeKey); } else { if (lookup_status_chance(actor->statusTable, statusTypeKey) != 0) { chance = 100; } else { goto meow; } } if (chance > 0) { chance = (chance * battleStatus->statusChance) / 100; if (chance > 0 && chance >= rand_int(100)) { duration = 3; duration += lookup_status_duration_mod(actor->statusTable, statusKey); } } } else { duration = 3; } meow: if (duration > 0) { if (battleStatus->currentAttackStatus < 0) { duration = battleStatus->statusDuration; duration += lookup_status_duration_mod(actor->statusTable, statusKey); inflict_status(actor, statusTypeKey, duration); } else { inflict_status(actor, statusTypeKey, duration); } } else { duration = 0; } return duration; }
### RAW ASSEMBLY INSTRUCTIONS: glabel show_coin_counter /* 829C8 800E9518 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 829CC 800E951C AFB00028 */ sw $s0, 0x28($sp) /* 829D0 800E9520 3C108011 */ lui $s0, %hi(D_8010CD10) /* 829D4 800E9524 2610CD10 */ addiu $s0, $s0, %lo(D_8010CD10) /* 829D8 800E9528 AFBF0030 */ sw $ra, 0x30($sp) /* 829DC 800E952C AFB1002C */ sw $s1, 0x2C($sp) /* 829E0 800E9530 86020000 */ lh $v0, 0x0($s0) /* 829E4 800E9534 3C118011 */ lui $s1, %hi(gUIStatus) /* 829E8 800E9538 2631EF58 */ addiu $s1, $s1, %lo(gUIStatus) /* 829EC 800E953C 14400005 */ bnez $v0, .L800E9554 /* 829F0 800E9540 24040014 */ addiu $a0, $zero, 0x14 /* 829F4 800E9544 3C028011 */ lui $v0, %hi(D_8010CD12) /* 829F8 800E9548 8442CD12 */ lh $v0, %lo(D_8010CD12)($v0) /* 829FC 800E954C 10400012 */ beqz $v0, .L800E9598 /* 82A00 800E9550 00000000 */ nop .L800E9554: /* 82A04 800E9554 0C051F9F */ jal set_window_update /* 82A08 800E9558 24050002 */ addiu $a1, $zero, 0x2 /* 82A0C 800E955C 8E220064 */ lw $v0, 0x64($s1) /* 82A10 800E9560 04420009 */ bltzl $v0, .L800E9588 /* 82A14 800E9564 A220006C */ sb $zero, 0x6C($s1) /* 82A18 800E9568 8E24005C */ lw $a0, 0x5C($s1) /* 82A1C 800E956C 0C05123D */ jal hud_element_free /* 82A20 800E9570 00000000 */ nop /* 82A24 800E9574 0C05123D */ jal hud_element_free /* 82A28 800E9578 8E240060 */ lw $a0, 0x60($s1) /* 82A2C 800E957C 2402FFFF */ addiu $v0, $zero, -0x1 /* 82A30 800E9580 AE220064 */ sw $v0, 0x64($s1) /* 82A34 800E9584 A220006C */ sb $zero, 0x6C($s1) .L800E9588: /* 82A38 800E9588 A220006D */ sb $zero, 0x6D($s1) /* 82A3C 800E958C A6000000 */ sh $zero, 0x0($s0) /* 82A40 800E9590 3C018011 */ lui $at, %hi(D_8010CD12) /* 82A44 800E9594 A420CD12 */ sh $zero, %lo(D_8010CD12)($at) .L800E9598: /* 82A48 800E9598 8222006C */ lb $v0, 0x6C($s1) /* 82A4C 800E959C 14400039 */ bnez $v0, .L800E9684 /* 82A50 800E95A0 24040014 */ addiu $a0, $zero, 0x14 /* 82A54 800E95A4 24050020 */ addiu $a1, $zero, 0x20 /* 82A58 800E95A8 240600A4 */ addiu $a2, $zero, 0xA4 /* 82A5C 800E95AC 24070040 */ addiu $a3, $zero, 0x40 /* 82A60 800E95B0 0080102D */ daddu $v0, $a0, $zero /* 82A64 800E95B4 AFA20010 */ sw $v0, 0x10($sp) /* 82A68 800E95B8 24020015 */ addiu $v0, $zero, 0x15 /* 82A6C 800E95BC AFA20014 */ sw $v0, 0x14($sp) /* 82A70 800E95C0 3C02800F */ lui $v0, %hi(coin_counter_draw_content) /* 82A74 800E95C4 244292D8 */ addiu $v0, $v0, %lo(coin_counter_draw_content) /* 82A78 800E95C8 AFA20018 */ sw $v0, 0x18($sp) /* 82A7C 800E95CC 2402FFFF */ addiu $v0, $zero, -0x1 /* 82A80 800E95D0 AFA0001C */ sw $zero, 0x1C($sp) /* 82A84 800E95D4 0C051F32 */ jal set_window_properties /* 82A88 800E95D8 AFA20020 */ sw $v0, 0x20($sp) /* 82A8C 800E95DC 3C058014 */ lui $a1, %hi(basic_window_update) /* 82A90 800E95E0 24A57474 */ addiu $a1, $a1, %lo(basic_window_update) /* 82A94 800E95E4 0C051F9F */ jal set_window_update /* 82A98 800E95E8 24040014 */ addiu $a0, $zero, 0x14 /* 82A9C 800E95EC 3C048011 */ lui $a0, %hi(HES_MenuTimes) /* 82AA0 800E95F0 24849270 */ addiu $a0, $a0, %lo(HES_MenuTimes) /* 82AA4 800E95F4 0C050529 */ jal hud_element_create /* 82AA8 800E95F8 00000000 */ nop /* 82AAC 800E95FC 0040802D */ daddu $s0, $v0, $zero /* 82AB0 800E9600 0200202D */ daddu $a0, $s0, $zero /* 82AB4 800E9604 24050080 */ addiu $a1, $zero, 0x80 /* 82AB8 800E9608 0C051280 */ jal hud_element_set_flags /* 82ABC 800E960C AE30005C */ sw $s0, 0x5C($s1) /* 82AC0 800E9610 0200202D */ daddu $a0, $s0, $zero /* 82AC4 800E9614 240500FF */ addiu $a1, $zero, 0xFF /* 82AC8 800E9618 00A0302D */ daddu $a2, $a1, $zero /* 82ACC 800E961C 0C0513BF */ jal hud_element_set_tint /* 82AD0 800E9620 00A0382D */ daddu $a3, $a1, $zero /* 82AD4 800E9624 3C048011 */ lui $a0, %hi(HES_StatusCoin) /* 82AD8 800E9628 24848558 */ addiu $a0, $a0, %lo(HES_StatusCoin) /* 82ADC 800E962C 0C050529 */ jal hud_element_create /* 82AE0 800E9630 00000000 */ nop /* 82AE4 800E9634 0040802D */ daddu $s0, $v0, $zero /* 82AE8 800E9638 0200202D */ daddu $a0, $s0, $zero /* 82AEC 800E963C 24050080 */ addiu $a1, $zero, 0x80 /* 82AF0 800E9640 0C051280 */ jal hud_element_set_flags /* 82AF4 800E9644 AE300060 */ sw $s0, 0x60($s1) /* 82AF8 800E9648 0200202D */ daddu $a0, $s0, $zero /* 82AFC 800E964C 240500FF */ addiu $a1, $zero, 0xFF /* 82B00 800E9650 00A0302D */ daddu $a2, $a1, $zero /* 82B04 800E9654 0C0513BF */ jal hud_element_set_tint /* 82B08 800E9658 00A0382D */ daddu $a3, $a1, $zero /* 82B0C 800E965C 8222006E */ lb $v0, 0x6E($s1) /* 82B10 800E9660 04410003 */ bgez $v0, .L800E9670 /* 82B14 800E9664 A220006C */ sb $zero, 0x6C($s1) /* 82B18 800E9668 92220044 */ lbu $v0, 0x44($s1) /* 82B1C 800E966C A222006E */ sb $v0, 0x6E($s1) .L800E9670: /* 82B20 800E9670 24020001 */ addiu $v0, $zero, 0x1 /* 82B24 800E9674 A2220044 */ sb $v0, 0x44($s1) /* 82B28 800E9678 24020001 */ addiu $v0, $zero, 0x1 /* 82B2C 800E967C 3C018011 */ lui $at, %hi(D_8010CD10) /* 82B30 800E9680 A422CD10 */ sh $v0, %lo(D_8010CD10)($at) .L800E9684: /* 82B34 800E9684 8FBF0030 */ lw $ra, 0x30($sp) /* 82B38 800E9688 8FB1002C */ lw $s1, 0x2C($sp) /* 82B3C 800E968C 8FB00028 */ lw $s0, 0x28($sp) /* 82B40 800E9690 03E00008 */ jr $ra /* 82B44 800E9694 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void show_coin_counter(void) { UiStatus* uiStatus = &gUIStatus; s32 index; if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) { set_window_update(WINDOW_ID_CURRENCY_COUNTER, WINDOW_UPDATE_HIDE); if (uiStatus->iconIndex12 > -1) { hud_element_free(uiStatus->iconIndex10); hud_element_free(uiStatus->iconIndex11); uiStatus->iconIndex12 = -1; } uiStatus->unk_6C[0] = 0; uiStatus->unk_6C[1] = 0; D_8010CD10 = 0; D_8010CD12 = 0; } if (uiStatus->unk_6C[0] == 0) { set_window_properties(WINDOW_ID_CURRENCY_COUNTER, 32, 164, 64, 20, WINDOW_PRIORITY_21, coin_counter_draw_content, 0, -1); set_window_update(WINDOW_ID_CURRENCY_COUNTER, (s32)basic_window_update); index = hud_element_create(&HES_MenuTimes); uiStatus->iconIndex10 = index; hud_element_set_flags(index, HUD_ELEMENT_FLAG_80); hud_element_set_tint(index, 255, 255, 255); index = hud_element_create(&HES_StatusCoin); uiStatus->iconIndex11 = index; hud_element_set_flags(index, HUD_ELEMENT_FLAG_80); hud_element_set_tint(index, 255, 255, 255); uiStatus->unk_6C[0] = 0; if (uiStatus->unk_6C[2] < 0) { uiStatus->unk_6C[2] = uiStatus->ignoreChanges; } uiStatus->ignoreChanges = TRUE; D_8010CD10 = 1; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel evt_get_variable_index /* EC758 802C7DA8 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16) /* EC75C 802C7DAC 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF) /* EC760 802C7DB0 0045102A */ slt $v0, $v0, $a1 /* EC764 802C7DB4 14400003 */ bnez $v0, .L802C7DC4 /* EC768 802C7DB8 3C02F119 */ lui $v0, (0xF1194D80 >> 16) .L802C7DBC: /* EC76C 802C7DBC 03E00008 */ jr $ra /* EC770 802C7DC0 00A0102D */ daddu $v0, $a1, $zero .L802C7DC4: /* EC774 802C7DC4 34424D80 */ ori $v0, $v0, (0xF1194D80 & 0xFFFF) /* EC778 802C7DC8 0045102A */ slt $v0, $v0, $a1 /* EC77C 802C7DCC 1040FFFB */ beqz $v0, .L802C7DBC /* EC780 802C7DD0 3C02F2E3 */ lui $v0, (0xF2E31100 >> 16) /* EC784 802C7DD4 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) /* EC788 802C7DD8 0045102A */ slt $v0, $v0, $a1 /* EC78C 802C7DDC 1040FFF7 */ beqz $v0, .L802C7DBC /* EC790 802C7DE0 3C02F414 */ lui $v0, (0xF4143E00 >> 16) /* EC794 802C7DE4 34423E00 */ ori $v0, $v0, (0xF4143E00 & 0xFFFF) /* EC798 802C7DE8 0045102A */ slt $v0, $v0, $a1 /* EC79C 802C7DEC 54400005 */ bnel $v0, $zero, .L802C7E04 /* EC7A0 802C7DF0 3C02F545 */ lui $v0, (0xF5456B00 >> 16) /* EC7A4 802C7DF4 3C020C84 */ lui $v0, (0xC845880 >> 16) /* EC7A8 802C7DF8 34425880 */ ori $v0, $v0, (0xC845880 & 0xFFFF) /* EC7AC 802C7DFC 03E00008 */ jr $ra /* EC7B0 802C7E00 00A21021 */ addu $v0, $a1, $v0 .L802C7E04: /* EC7B4 802C7E04 34426B00 */ ori $v0, $v0, (0xF5456B00 & 0xFFFF) /* EC7B8 802C7E08 0045102A */ slt $v0, $v0, $a1 /* EC7BC 802C7E0C 54400005 */ bnel $v0, $zero, .L802C7E24 /* EC7C0 802C7E10 3C02F676 */ lui $v0, (0xF6769800 >> 16) /* EC7C4 802C7E14 3C020B53 */ lui $v0, (0xB532B80 >> 16) /* EC7C8 802C7E18 34422B80 */ ori $v0, $v0, (0xB532B80 & 0xFFFF) /* EC7CC 802C7E1C 03E00008 */ jr $ra /* EC7D0 802C7E20 00A21021 */ addu $v0, $a1, $v0 .L802C7E24: /* EC7D4 802C7E24 34429800 */ ori $v0, $v0, (0xF6769800 & 0xFFFF) /* EC7D8 802C7E28 0045102A */ slt $v0, $v0, $a1 /* EC7DC 802C7E2C 54400005 */ bnel $v0, $zero, .L802C7E44 /* EC7E0 802C7E30 3C02F7A7 */ lui $v0, (0xF7A7C500 >> 16) /* EC7E4 802C7E34 3C020A21 */ lui $v0, (0xA21FE80 >> 16) /* EC7E8 802C7E38 3442FE80 */ ori $v0, $v0, (0xA21FE80 & 0xFFFF) /* EC7EC 802C7E3C 03E00008 */ jr $ra /* EC7F0 802C7E40 00A21021 */ addu $v0, $a1, $v0 .L802C7E44: /* EC7F4 802C7E44 3442C500 */ ori $v0, $v0, (0xF7A7C500 & 0xFFFF) /* EC7F8 802C7E48 0045102A */ slt $v0, $v0, $a1 /* EC7FC 802C7E4C 54400005 */ bnel $v0, $zero, .L802C7E64 /* EC800 802C7E50 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16) /* EC804 802C7E54 3C0208F0 */ lui $v0, (0x8F0D180 >> 16) /* EC808 802C7E58 3442D180 */ ori $v0, $v0, (0x8F0D180 & 0xFFFF) /* EC80C 802C7E5C 03E00008 */ jr $ra /* EC810 802C7E60 00A21021 */ addu $v0, $a1, $v0 .L802C7E64: /* EC814 802C7E64 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF) /* EC818 802C7E68 0045102A */ slt $v0, $v0, $a1 /* EC81C 802C7E6C 54400005 */ bnel $v0, $zero, .L802C7E84 /* EC820 802C7E70 3C02FA0A */ lui $v0, (0xFA0A1F00 >> 16) /* EC824 802C7E74 3C0207BF */ lui $v0, (0x7BFA480 >> 16) /* EC828 802C7E78 3442A480 */ ori $v0, $v0, (0x7BFA480 & 0xFFFF) /* EC82C 802C7E7C 03E00008 */ jr $ra /* EC830 802C7E80 00A21021 */ addu $v0, $a1, $v0 .L802C7E84: /* EC834 802C7E84 34421F00 */ ori $v0, $v0, (0xFA0A1F00 & 0xFFFF) /* EC838 802C7E88 0045102A */ slt $v0, $v0, $a1 /* EC83C 802C7E8C 54400005 */ bnel $v0, $zero, .L802C7EA4 /* EC840 802C7E90 3C02FB3B */ lui $v0, (0xFB3B4C00 >> 16) /* EC844 802C7E94 3C02068E */ lui $v0, (0x68E7780 >> 16) /* EC848 802C7E98 34427780 */ ori $v0, $v0, (0x68E7780 & 0xFFFF) /* EC84C 802C7E9C 03E00008 */ jr $ra /* EC850 802C7EA0 00A21021 */ addu $v0, $a1, $v0 .L802C7EA4: /* EC854 802C7EA4 34424C00 */ ori $v0, $v0, (0xFB3B4C00 & 0xFFFF) /* EC858 802C7EA8 0045102A */ slt $v0, $v0, $a1 /* EC85C 802C7EAC 54400005 */ bnel $v0, $zero, .L802C7EC4 /* EC860 802C7EB0 3C02FC6C */ lui $v0, (0xFC6C7900 >> 16) /* EC864 802C7EB4 3C02055D */ lui $v0, (0x55D4A80 >> 16) /* EC868 802C7EB8 34424A80 */ ori $v0, $v0, (0x55D4A80 & 0xFFFF) /* EC86C 802C7EBC 03E00008 */ jr $ra /* EC870 802C7EC0 00A21021 */ addu $v0, $a1, $v0 .L802C7EC4: /* EC874 802C7EC4 34427900 */ ori $v0, $v0, (0xFC6C7900 & 0xFFFF) /* EC878 802C7EC8 0045102A */ slt $v0, $v0, $a1 /* EC87C 802C7ECC 54400005 */ bnel $v0, $zero, .L802C7EE4 /* EC880 802C7ED0 3C02FD9D */ lui $v0, (0xFD9DA600 >> 16) /* EC884 802C7ED4 3C02042C */ lui $v0, (0x42C1D80 >> 16) /* EC888 802C7ED8 34421D80 */ ori $v0, $v0, (0x42C1D80 & 0xFFFF) /* EC88C 802C7EDC 03E00008 */ jr $ra /* EC890 802C7EE0 00A21021 */ addu $v0, $a1, $v0 .L802C7EE4: /* EC894 802C7EE4 3442A600 */ ori $v0, $v0, (0xFD9DA600 & 0xFFFF) /* EC898 802C7EE8 0045102A */ slt $v0, $v0, $a1 /* EC89C 802C7EEC 54400005 */ bnel $v0, $zero, .L802C7F04 /* EC8A0 802C7EF0 3C02FECE */ lui $v0, (0xFECED300 >> 16) /* EC8A4 802C7EF4 3C0202FA */ lui $v0, (0x2FAF080 >> 16) /* EC8A8 802C7EF8 3442F080 */ ori $v0, $v0, (0x2FAF080 & 0xFFFF) /* EC8AC 802C7EFC 03E00008 */ jr $ra /* EC8B0 802C7F00 00A21021 */ addu $v0, $a1, $v0 .L802C7F04: /* EC8B4 802C7F04 3442D300 */ ori $v0, $v0, (0xFECED300 & 0xFFFF) /* EC8B8 802C7F08 0045102A */ slt $v0, $v0, $a1 /* EC8BC 802C7F0C 1440FFAB */ bnez $v0, .L802C7DBC /* EC8C0 802C7F10 3C0201C9 */ lui $v0, (0x1C9C380 >> 16) /* EC8C4 802C7F14 3442C380 */ ori $v0, $v0, (0x1C9C380 & 0xFFFF) /* EC8C8 802C7F18 03E00008 */ jr $ra /* EC8CC 802C7F1C 00A21021 */ addu $v0, $a1, $v0 ### DECOMPILED C INSTRUCTIONS: s32 evt_get_variable_index(Evt* script, s32 var) { if (EVT_LIMIT >= var) { return var; } if (EVT_IGNORE_ARG >= var) { return var; } if (EVT_FIXED_CUTOFF >= var) { return var; } if (EVT_ARRAY_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_ARRAY_FLAG(var); } if (EVT_ARRAY_VAR_CUTOFF >= var) { return EVT_INDEX_OF_ARRAY_VAR(var); } if (EVT_GAME_BYTE_CUTOFF >= var) { return EVT_INDEX_OF_GAME_BYTE(var); } if (EVT_AREA_BYTE_CUTOFF >= var) { return EVT_INDEX_OF_AREA_BYTE(var); } if (EVT_GAME_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_GAME_FLAG(var); } if (EVT_AREA_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_AREA_FLAG(var); } if (EVT_MAP_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_MAP_FLAG(var); } if (EVT_LOCAL_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_LOCAL_FLAG(var); } if (EVT_MAP_VAR_CUTOFF >= var) { return EVT_INDEX_OF_MAP_VAR(var); } if (EVT_LOCAL_VAR_CUTOFF >= var) { return EVT_INDEX_OF_LOCAL_VAR(var); } return var; }
### RAW ASSEMBLY INSTRUCTIONS: glabel evt_get_variable_index_alt /* EC8D0 802C7F20 3C02EFE8 */ lui $v0, (0xEFE82080 >> 16) /* EC8D4 802C7F24 34422080 */ ori $v0, $v0, (0xEFE82080 & 0xFFFF) /* EC8D8 802C7F28 0044102A */ slt $v0, $v0, $a0 /* EC8DC 802C7F2C 14400003 */ bnez $v0, .L802C7F3C /* EC8E0 802C7F30 3C02F119 */ lui $v0, (0xF1194D80 >> 16) .L802C7F34: /* EC8E4 802C7F34 03E00008 */ jr $ra /* EC8E8 802C7F38 0080102D */ daddu $v0, $a0, $zero .L802C7F3C: /* EC8EC 802C7F3C 34424D80 */ ori $v0, $v0, (0xF1194D80 & 0xFFFF) /* EC8F0 802C7F40 0044102A */ slt $v0, $v0, $a0 /* EC8F4 802C7F44 1040FFFB */ beqz $v0, .L802C7F34 /* EC8F8 802C7F48 3C02F2E3 */ lui $v0, (0xF2E31100 >> 16) /* EC8FC 802C7F4C 34421100 */ ori $v0, $v0, (0xF2E31100 & 0xFFFF) /* EC900 802C7F50 0044102A */ slt $v0, $v0, $a0 /* EC904 802C7F54 1040FFF7 */ beqz $v0, .L802C7F34 /* EC908 802C7F58 3C02F414 */ lui $v0, (0xF4143E00 >> 16) /* EC90C 802C7F5C 34423E00 */ ori $v0, $v0, (0xF4143E00 & 0xFFFF) /* EC910 802C7F60 0044102A */ slt $v0, $v0, $a0 /* EC914 802C7F64 54400005 */ bnel $v0, $zero, .L802C7F7C /* EC918 802C7F68 3C02F545 */ lui $v0, (0xF5456B00 >> 16) /* EC91C 802C7F6C 3C020C84 */ lui $v0, (0xC845880 >> 16) /* EC920 802C7F70 34425880 */ ori $v0, $v0, (0xC845880 & 0xFFFF) /* EC924 802C7F74 03E00008 */ jr $ra /* EC928 802C7F78 00821021 */ addu $v0, $a0, $v0 .L802C7F7C: /* EC92C 802C7F7C 34426B00 */ ori $v0, $v0, (0xF5456B00 & 0xFFFF) /* EC930 802C7F80 0044102A */ slt $v0, $v0, $a0 /* EC934 802C7F84 54400005 */ bnel $v0, $zero, .L802C7F9C /* EC938 802C7F88 3C02F676 */ lui $v0, (0xF6769800 >> 16) /* EC93C 802C7F8C 3C020B53 */ lui $v0, (0xB532B80 >> 16) /* EC940 802C7F90 34422B80 */ ori $v0, $v0, (0xB532B80 & 0xFFFF) /* EC944 802C7F94 03E00008 */ jr $ra /* EC948 802C7F98 00821021 */ addu $v0, $a0, $v0 .L802C7F9C: /* EC94C 802C7F9C 34429800 */ ori $v0, $v0, (0xF6769800 & 0xFFFF) /* EC950 802C7FA0 0044102A */ slt $v0, $v0, $a0 /* EC954 802C7FA4 54400005 */ bnel $v0, $zero, .L802C7FBC /* EC958 802C7FA8 3C02F7A7 */ lui $v0, (0xF7A7C500 >> 16) /* EC95C 802C7FAC 3C020A21 */ lui $v0, (0xA21FE80 >> 16) /* EC960 802C7FB0 3442FE80 */ ori $v0, $v0, (0xA21FE80 & 0xFFFF) /* EC964 802C7FB4 03E00008 */ jr $ra /* EC968 802C7FB8 00821021 */ addu $v0, $a0, $v0 .L802C7FBC: /* EC96C 802C7FBC 3442C500 */ ori $v0, $v0, (0xF7A7C500 & 0xFFFF) /* EC970 802C7FC0 0044102A */ slt $v0, $v0, $a0 /* EC974 802C7FC4 54400005 */ bnel $v0, $zero, .L802C7FDC /* EC978 802C7FC8 3C02F8D8 */ lui $v0, (0xF8D8F200 >> 16) /* EC97C 802C7FCC 3C0208F0 */ lui $v0, (0x8F0D180 >> 16) /* EC980 802C7FD0 3442D180 */ ori $v0, $v0, (0x8F0D180 & 0xFFFF) /* EC984 802C7FD4 03E00008 */ jr $ra /* EC988 802C7FD8 00821021 */ addu $v0, $a0, $v0 .L802C7FDC: /* EC98C 802C7FDC 3442F200 */ ori $v0, $v0, (0xF8D8F200 & 0xFFFF) /* EC990 802C7FE0 0044102A */ slt $v0, $v0, $a0 /* EC994 802C7FE4 54400005 */ bnel $v0, $zero, .L802C7FFC /* EC998 802C7FE8 3C02FA0A */ lui $v0, (0xFA0A1F00 >> 16) /* EC99C 802C7FEC 3C0207BF */ lui $v0, (0x7BFA480 >> 16) /* EC9A0 802C7FF0 3442A480 */ ori $v0, $v0, (0x7BFA480 & 0xFFFF) /* EC9A4 802C7FF4 03E00008 */ jr $ra /* EC9A8 802C7FF8 00821021 */ addu $v0, $a0, $v0 .L802C7FFC: /* EC9AC 802C7FFC 34421F00 */ ori $v0, $v0, (0xFA0A1F00 & 0xFFFF) /* EC9B0 802C8000 0044102A */ slt $v0, $v0, $a0 /* EC9B4 802C8004 54400005 */ bnel $v0, $zero, .L802C801C /* EC9B8 802C8008 3C02FB3B */ lui $v0, (0xFB3B4C00 >> 16) /* EC9BC 802C800C 3C02068E */ lui $v0, (0x68E7780 >> 16) /* EC9C0 802C8010 34427780 */ ori $v0, $v0, (0x68E7780 & 0xFFFF) /* EC9C4 802C8014 03E00008 */ jr $ra /* EC9C8 802C8018 00821021 */ addu $v0, $a0, $v0 .L802C801C: /* EC9CC 802C801C 34424C00 */ ori $v0, $v0, (0xFB3B4C00 & 0xFFFF) /* EC9D0 802C8020 0044102A */ slt $v0, $v0, $a0 /* EC9D4 802C8024 54400005 */ bnel $v0, $zero, .L802C803C /* EC9D8 802C8028 3C02FC6C */ lui $v0, (0xFC6C7900 >> 16) /* EC9DC 802C802C 3C02055D */ lui $v0, (0x55D4A80 >> 16) /* EC9E0 802C8030 34424A80 */ ori $v0, $v0, (0x55D4A80 & 0xFFFF) /* EC9E4 802C8034 03E00008 */ jr $ra /* EC9E8 802C8038 00821021 */ addu $v0, $a0, $v0 .L802C803C: /* EC9EC 802C803C 34427900 */ ori $v0, $v0, (0xFC6C7900 & 0xFFFF) /* EC9F0 802C8040 0044102A */ slt $v0, $v0, $a0 /* EC9F4 802C8044 54400005 */ bnel $v0, $zero, .L802C805C /* EC9F8 802C8048 3C02FD9D */ lui $v0, (0xFD9DA600 >> 16) /* EC9FC 802C804C 3C02042C */ lui $v0, (0x42C1D80 >> 16) /* ECA00 802C8050 34421D80 */ ori $v0, $v0, (0x42C1D80 & 0xFFFF) /* ECA04 802C8054 03E00008 */ jr $ra /* ECA08 802C8058 00821021 */ addu $v0, $a0, $v0 .L802C805C: /* ECA0C 802C805C 3442A600 */ ori $v0, $v0, (0xFD9DA600 & 0xFFFF) /* ECA10 802C8060 0044102A */ slt $v0, $v0, $a0 /* ECA14 802C8064 54400005 */ bnel $v0, $zero, .L802C807C /* ECA18 802C8068 3C02FECE */ lui $v0, (0xFECED300 >> 16) /* ECA1C 802C806C 3C0202FA */ lui $v0, (0x2FAF080 >> 16) /* ECA20 802C8070 3442F080 */ ori $v0, $v0, (0x2FAF080 & 0xFFFF) /* ECA24 802C8074 03E00008 */ jr $ra /* ECA28 802C8078 00821021 */ addu $v0, $a0, $v0 .L802C807C: /* ECA2C 802C807C 3442D300 */ ori $v0, $v0, (0xFECED300 & 0xFFFF) /* ECA30 802C8080 0044102A */ slt $v0, $v0, $a0 /* ECA34 802C8084 1440FFAB */ bnez $v0, .L802C7F34 /* ECA38 802C8088 3C0201C9 */ lui $v0, (0x1C9C380 >> 16) /* ECA3C 802C808C 3442C380 */ ori $v0, $v0, (0x1C9C380 & 0xFFFF) /* ECA40 802C8090 03E00008 */ jr $ra /* ECA44 802C8094 00821021 */ addu $v0, $a0, $v0 ### DECOMPILED C INSTRUCTIONS: s32 evt_get_variable_index_alt(s32 var) { if (EVT_LIMIT >= var) { return var; } if (EVT_IGNORE_ARG >= var) { return var; } if (EVT_FIXED_CUTOFF >= var) { return var; } if (EVT_ARRAY_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_ARRAY_FLAG(var); } if (EVT_ARRAY_VAR_CUTOFF >= var) { return EVT_INDEX_OF_ARRAY_VAR(var); } if (EVT_GAME_BYTE_CUTOFF >= var) { return EVT_INDEX_OF_GAME_BYTE(var); } if (EVT_AREA_BYTE_CUTOFF >= var) { return EVT_INDEX_OF_AREA_BYTE(var); } if (EVT_GAME_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_GAME_FLAG(var); } if (EVT_AREA_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_AREA_FLAG(var); } if (EVT_MAP_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_MAP_FLAG(var); } if (EVT_LOCAL_FLAG_CUTOFF >= var) { return EVT_INDEX_OF_LOCAL_FLAG(var); } if (EVT_MAP_VAR_CUTOFF >= var) { return EVT_INDEX_OF_MAP_VAR(var); } if (EVT_LOCAL_VAR_CUTOFF >= var) { return EVT_INDEX_OF_LOCAL_VAR(var); } return var; }
### RAW ASSEMBLY INSTRUCTIONS: glabel status_bar_draw_number /* 81154 800E7CA4 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 81158 800E7CA8 AFB1001C */ sw $s1, 0x1C($sp) /* 8115C 800E7CAC 00A0882D */ daddu $s1, $a1, $zero /* 81160 800E7CB0 3C05800F */ lui $a1, %hi(TimesHudScript) /* 81164 800E7CB4 8CA57FA8 */ lw $a1, %lo(TimesHudScript)($a1) /* 81168 800E7CB8 AFB40028 */ sw $s4, 0x28($sp) /* 8116C 800E7CBC 0080A02D */ daddu $s4, $a0, $zero /* 81170 800E7CC0 AFB00018 */ sw $s0, 0x18($sp) /* 81174 800E7CC4 00C0802D */ daddu $s0, $a2, $zero /* 81178 800E7CC8 AFB30024 */ sw $s3, 0x24($sp) /* 8117C 800E7CCC 00E0982D */ daddu $s3, $a3, $zero /* 81180 800E7CD0 AFB5002C */ sw $s5, 0x2C($sp) /* 81184 800E7CD4 8FB50050 */ lw $s5, 0x50($sp) /* 81188 800E7CD8 AFB20020 */ sw $s2, 0x20($sp) /* 8118C 800E7CDC 0000902D */ daddu $s2, $zero, $zero /* 81190 800E7CE0 AFBF003C */ sw $ra, 0x3C($sp) /* 81194 800E7CE4 AFBE0038 */ sw $fp, 0x38($sp) /* 81198 800E7CE8 AFB70034 */ sw $s7, 0x34($sp) /* 8119C 800E7CEC 0C0511FF */ jal hud_element_set_script /* 811A0 800E7CF0 AFB60030 */ sw $s6, 0x30($sp) /* 811A4 800E7CF4 26310008 */ addiu $s1, $s1, 0x8 /* 811A8 800E7CF8 0280202D */ daddu $a0, $s4, $zero /* 811AC 800E7CFC 0220282D */ daddu $a1, $s1, $zero /* 811B0 800E7D00 26060007 */ addiu $a2, $s0, 0x7 /* 811B4 800E7D04 0C051261 */ jal hud_element_set_render_pos /* 811B8 800E7D08 261E0008 */ addiu $fp, $s0, 0x8 /* 811BC 800E7D0C 0280202D */ daddu $a0, $s4, $zero /* 811C0 800E7D10 0C05128B */ jal hud_element_clear_flags /* 811C4 800E7D14 24050002 */ addiu $a1, $zero, 0x2 /* 811C8 800E7D18 0C0511F1 */ jal hud_element_draw_next /* 811CC 800E7D1C 0280202D */ daddu $a0, $s4, $zero /* 811D0 800E7D20 5AA00016 */ blezl $s5, .L800E7D7C /* 811D4 800E7D24 2631000D */ addiu $s1, $s1, 0xD /* 811D8 800E7D28 3C066666 */ lui $a2, (0x66666667 >> 16) /* 811DC 800E7D2C 34C66667 */ ori $a2, $a2, (0x66666667 & 0xFFFF) /* 811E0 800E7D30 27A50010 */ addiu $a1, $sp, 0x10 .L800E7D34: /* 811E4 800E7D34 02660018 */ mult $s3, $a2 /* 811E8 800E7D38 02B22023 */ subu $a0, $s5, $s2 /* 811EC 800E7D3C 26520001 */ addiu $s2, $s2, 0x1 /* 811F0 800E7D40 001317C3 */ sra $v0, $s3, 31 /* 811F4 800E7D44 00852021 */ addu $a0, $a0, $a1 /* 811F8 800E7D48 00004010 */ mfhi $t0 /* 811FC 800E7D4C 00081883 */ sra $v1, $t0, 2 /* 81200 800E7D50 00621023 */ subu $v0, $v1, $v0 /* 81204 800E7D54 0040182D */ daddu $v1, $v0, $zero /* 81208 800E7D58 00031080 */ sll $v0, $v1, 2 /* 8120C 800E7D5C 00431021 */ addu $v0, $v0, $v1 /* 81210 800E7D60 00021040 */ sll $v0, $v0, 1 /* 81214 800E7D64 02621023 */ subu $v0, $s3, $v0 /* 81218 800E7D68 A082FFFF */ sb $v0, -0x1($a0) /* 8121C 800E7D6C 0255102A */ slt $v0, $s2, $s5 /* 81220 800E7D70 1440FFF0 */ bnez $v0, .L800E7D34 /* 81224 800E7D74 0060982D */ daddu $s3, $v1, $zero /* 81228 800E7D78 2631000D */ addiu $s1, $s1, 0xD .L800E7D7C: /* 8122C 800E7D7C 0000982D */ daddu $s3, $zero, $zero /* 81230 800E7D80 1AA00020 */ blez $s5, .L800E7E04 /* 81234 800E7D84 0260902D */ daddu $s2, $s3, $zero /* 81238 800E7D88 27B60010 */ addiu $s6, $sp, 0x10 /* 8123C 800E7D8C 26B0FFFF */ addiu $s0, $s5, -0x1 /* 81240 800E7D90 3C17800F */ lui $s7, %hi(DigitHudScripts) /* 81244 800E7D94 26F77F80 */ addiu $s7, $s7, %lo(DigitHudScripts) .L800E7D98: /* 81248 800E7D98 02D21021 */ addu $v0, $s6, $s2 /* 8124C 800E7D9C 80420000 */ lb $v0, 0x0($v0) /* 81250 800E7DA0 54400006 */ bnel $v0, $zero, .L800E7DBC /* 81254 800E7DA4 24130001 */ addiu $s3, $zero, 0x1 /* 81258 800E7DA8 56600004 */ bnel $s3, $zero, .L800E7DBC /* 8125C 800E7DAC 24130001 */ addiu $s3, $zero, 0x1 /* 81260 800E7DB0 56500011 */ bnel $s2, $s0, .L800E7DF8 /* 81264 800E7DB4 26520001 */ addiu $s2, $s2, 0x1 /* 81268 800E7DB8 24130001 */ addiu $s3, $zero, 0x1 .L800E7DBC: /* 8126C 800E7DBC 00021080 */ sll $v0, $v0, 2 /* 81270 800E7DC0 00571021 */ addu $v0, $v0, $s7 /* 81274 800E7DC4 8C450000 */ lw $a1, 0x0($v0) /* 81278 800E7DC8 0C0511FF */ jal hud_element_set_script /* 8127C 800E7DCC 0280202D */ daddu $a0, $s4, $zero /* 81280 800E7DD0 0280202D */ daddu $a0, $s4, $zero /* 81284 800E7DD4 0220282D */ daddu $a1, $s1, $zero /* 81288 800E7DD8 0C051261 */ jal hud_element_set_render_pos /* 8128C 800E7DDC 03C0302D */ daddu $a2, $fp, $zero /* 81290 800E7DE0 0280202D */ daddu $a0, $s4, $zero /* 81294 800E7DE4 0C05128B */ jal hud_element_clear_flags /* 81298 800E7DE8 24050002 */ addiu $a1, $zero, 0x2 /* 8129C 800E7DEC 0C0511F1 */ jal hud_element_draw_next /* 812A0 800E7DF0 0280202D */ daddu $a0, $s4, $zero /* 812A4 800E7DF4 26520001 */ addiu $s2, $s2, 0x1 .L800E7DF8: /* 812A8 800E7DF8 0255102A */ slt $v0, $s2, $s5 /* 812AC 800E7DFC 1440FFE6 */ bnez $v0, .L800E7D98 /* 812B0 800E7E00 26310008 */ addiu $s1, $s1, 0x8 .L800E7E04: /* 812B4 800E7E04 8FBF003C */ lw $ra, 0x3C($sp) /* 812B8 800E7E08 8FBE0038 */ lw $fp, 0x38($sp) /* 812BC 800E7E0C 8FB70034 */ lw $s7, 0x34($sp) /* 812C0 800E7E10 8FB60030 */ lw $s6, 0x30($sp) /* 812C4 800E7E14 8FB5002C */ lw $s5, 0x2C($sp) /* 812C8 800E7E18 8FB40028 */ lw $s4, 0x28($sp) /* 812CC 800E7E1C 8FB30024 */ lw $s3, 0x24($sp) /* 812D0 800E7E20 8FB20020 */ lw $s2, 0x20($sp) /* 812D4 800E7E24 8FB1001C */ lw $s1, 0x1C($sp) /* 812D8 800E7E28 8FB00018 */ lw $s0, 0x18($sp) /* 812DC 800E7E2C 03E00008 */ jr $ra /* 812E0 800E7E30 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void status_bar_draw_number(s32 iconID, s32 x, s32 y, s32 value, s32 numDigits) { s8 digits[4]; s32 i; s32 x2, y2; s32 keepDrawing; s32 digit; hud_element_set_script(iconID, TimesHudScript); x2 = x + 8; y2 = y + 8; hud_element_set_render_pos(iconID, x2, y2 - 1); hud_element_clear_flags(iconID, HUD_ELEMENT_FLAG_DISABLED); hud_element_draw_next(iconID); // Write each digit of the input number into the digits array for (i = 0; i < numDigits; i++) { digit = value % 10; digits[(numDigits - i) - 1] = digit; value /= 10; } x2 += 13; keepDrawing = FALSE; for (i = 0; i < numDigits; i++, x2 += 8) { digit = digits[i]; // Once we have encountered our first non-zero digit, we need to keep drawing the remaining digits if (digit != 0 || keepDrawing || (i == numDigits - 1)) { keepDrawing = TRUE; hud_element_set_script(iconID, DigitHudScripts[digit]); hud_element_set_render_pos(iconID, x2, y2); hud_element_clear_flags(iconID, HUD_ELEMENT_FLAG_DISABLED); hud_element_draw_next(iconID); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel contRmbRetrace /* 3AF10 8005FB10 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 3AF14 8005FB14 AFB10014 */ sw $s1, 0x14($sp) /* 3AF18 8005FB18 0000882D */ daddu $s1, $zero, $zero /* 3AF1C 8005FB1C AFB40020 */ sw $s4, 0x20($sp) /* 3AF20 8005FB20 24140002 */ addiu $s4, $zero, 0x2 /* 3AF24 8005FB24 AFB50024 */ sw $s5, 0x24($sp) /* 3AF28 8005FB28 24150001 */ addiu $s5, $zero, 0x1 /* 3AF2C 8005FB2C AFB3001C */ sw $s3, 0x1C($sp) /* 3AF30 8005FB30 0220982D */ daddu $s3, $s1, $zero /* 3AF34 8005FB34 AFB20018 */ sw $s2, 0x18($sp) /* 3AF38 8005FB38 0220902D */ daddu $s2, $s1, $zero /* 3AF3C 8005FB3C AFBF0028 */ sw $ra, 0x28($sp) /* 3AF40 8005FB40 AFB00010 */ sw $s0, 0x10($sp) .L8005FB44: /* 3AF44 8005FB44 3C02800B */ lui $v0, %hi(nuContRmbCtl) /* 3AF48 8005FB48 24421D40 */ addiu $v0, $v0, %lo(nuContRmbCtl) /* 3AF4C 8005FB4C 02428021 */ addu $s0, $s2, $v0 /* 3AF50 8005FB50 92030007 */ lbu $v1, 0x7($s0) /* 3AF54 8005FB54 10740015 */ beq $v1, $s4, .L8005FBAC /* 3AF58 8005FB58 28620003 */ slti $v0, $v1, 0x3 /* 3AF5C 8005FB5C 50400007 */ beql $v0, $zero, .L8005FB7C /* 3AF60 8005FB60 28620083 */ slti $v0, $v1, 0x83 /* 3AF64 8005FB64 5060003B */ beql $v1, $zero, .L8005FC54 /* 3AF68 8005FB68 26730068 */ addiu $s3, $s3, 0x68 /* 3AF6C 8005FB6C 10750009 */ beq $v1, $s5, .L8005FB94 /* 3AF70 8005FB70 0200202D */ daddu $a0, $s0, $zero /* 3AF74 8005FB74 08017F15 */ j .L8005FC54 /* 3AF78 8005FB78 26730068 */ addiu $s3, $s3, 0x68 .L8005FB7C: /* 3AF7C 8005FB7C 10400034 */ beqz $v0, .L8005FC50 /* 3AF80 8005FB80 28620081 */ slti $v0, $v1, 0x81 /* 3AF84 8005FB84 54400033 */ bnel $v0, $zero, .L8005FC54 /* 3AF88 8005FB88 26730068 */ addiu $s3, $s3, 0x68 /* 3AF8C 8005FB8C 08017F0E */ j .L8005FC38 /* 3AF90 8005FB90 00000000 */ nop .L8005FB94: /* 3AF94 8005FB94 0C017E48 */ jal contRmbControl /* 3AF98 8005FB98 0220282D */ daddu $a1, $s1, $zero /* 3AF9C 8005FB9C 5440002C */ bnel $v0, $zero, .L8005FC50 /* 3AFA0 8005FBA0 A2000007 */ sb $zero, 0x7($s0) /* 3AFA4 8005FBA4 08017F15 */ j .L8005FC54 /* 3AFA8 8005FBA8 26730068 */ addiu $s3, $s3, 0x68 .L8005FBAC: /* 3AFAC 8005FBAC 92020008 */ lbu $v0, 0x8($s0) /* 3AFB0 8005FBB0 14400019 */ bnez $v0, .L8005FC18 /* 3AFB4 8005FBB4 0200202D */ daddu $a0, $s0, $zero /* 3AFB8 8005FBB8 96030004 */ lhu $v1, 0x4($s0) /* 3AFBC 8005FBBC 3C028009 */ lui $v0, %hi(nuContRmbSearchTime) /* 3AFC0 8005FBC0 8C423CE0 */ lw $v0, %lo(nuContRmbSearchTime)($v0) /* 3AFC4 8005FBC4 14400002 */ bnez $v0, .L8005FBD0 /* 3AFC8 8005FBC8 0062001B */ divu $zero, $v1, $v0 /* 3AFCC 8005FBCC 0007000D */ break 7 .L8005FBD0: /* 3AFD0 8005FBD0 00001010 */ mfhi $v0 /* 3AFD4 8005FBD4 1440000C */ bnez $v0, .L8005FC08 /* 3AFD8 8005FBD8 00000000 */ nop /* 3AFDC 8005FBDC 3C04800E */ lui $a0, %hi(nuSiMesgQ) /* 3AFE0 8005FBE0 2484AC78 */ addiu $a0, $a0, %lo(nuSiMesgQ) /* 3AFE4 8005FBE4 3C05800E */ lui $a1, %hi(nuContPfs) /* 3AFE8 8005FBE8 24A5AAD8 */ addiu $a1, $a1, %lo(nuContPfs) /* 3AFEC 8005FBEC 02652821 */ addu $a1, $s3, $a1 /* 3AFF0 8005FBF0 0C019FD1 */ jal osMotorInit /* 3AFF4 8005FBF4 0220302D */ daddu $a2, $s1, $zero /* 3AFF8 8005FBF8 14400003 */ bnez $v0, .L8005FC08 /* 3AFFC 8005FBFC 00000000 */ nop /* 3B000 8005FC00 A2150008 */ sb $s5, 0x8($s0) /* 3B004 8005FC04 A2140009 */ sb $s4, 0x9($s0) .L8005FC08: /* 3B008 8005FC08 96020004 */ lhu $v0, 0x4($s0) /* 3B00C 8005FC0C 24420001 */ addiu $v0, $v0, 0x1 /* 3B010 8005FC10 08017F14 */ j .L8005FC50 /* 3B014 8005FC14 A6020004 */ sh $v0, 0x4($s0) .L8005FC18: /* 3B018 8005FC18 0C017E48 */ jal contRmbControl /* 3B01C 8005FC1C 0220282D */ daddu $a1, $s1, $zero /* 3B020 8005FC20 5040000C */ beql $v0, $zero, .L8005FC54 /* 3B024 8005FC24 26730068 */ addiu $s3, $s3, 0x68 /* 3B028 8005FC28 A6110004 */ sh $s1, 0x4($s0) /* 3B02C 8005FC2C A2000008 */ sb $zero, 0x8($s0) /* 3B030 8005FC30 08017F14 */ j .L8005FC50 /* 3B034 8005FC34 A2000009 */ sb $zero, 0x9($s0) .L8005FC38: /* 3B038 8005FC38 92020009 */ lbu $v0, 0x9($s0) /* 3B03C 8005FC3C 54540005 */ bnel $v0, $s4, .L8005FC54 /* 3B040 8005FC40 26730068 */ addiu $s3, $s3, 0x68 /* 3B044 8005FC44 0200202D */ daddu $a0, $s0, $zero /* 3B048 8005FC48 0C017E48 */ jal contRmbControl /* 3B04C 8005FC4C 0220282D */ daddu $a1, $s1, $zero .L8005FC50: /* 3B050 8005FC50 26730068 */ addiu $s3, $s3, 0x68 .L8005FC54: /* 3B054 8005FC54 26310001 */ addiu $s1, $s1, 0x1 /* 3B058 8005FC58 2E220004 */ sltiu $v0, $s1, 0x4 /* 3B05C 8005FC5C 1440FFB9 */ bnez $v0, .L8005FB44 /* 3B060 8005FC60 2652000A */ addiu $s2, $s2, 0xA /* 3B064 8005FC64 8FBF0028 */ lw $ra, 0x28($sp) /* 3B068 8005FC68 8FB50024 */ lw $s5, 0x24($sp) /* 3B06C 8005FC6C 8FB40020 */ lw $s4, 0x20($sp) /* 3B070 8005FC70 8FB3001C */ lw $s3, 0x1C($sp) /* 3B074 8005FC74 8FB20018 */ lw $s2, 0x18($sp) /* 3B078 8005FC78 8FB10014 */ lw $s1, 0x14($sp) /* 3B07C 8005FC7C 8FB00010 */ lw $s0, 0x10($sp) /* 3B080 8005FC80 0000102D */ daddu $v0, $zero, $zero /* 3B084 8005FC84 03E00008 */ jr $ra /* 3B088 8005FC88 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: s32 contRmbRetrace(NUSiCommonMesg* mesg) { u32 i; NUContRmbCtl* cont; for (i = 0; i < NU_CONT_MAXCONTROLLERS; i++) { cont = &nuContRmbCtl[i]; switch (cont->mode) { case NU_CONT_RMB_MODE_DISABLE: break; case NU_CONT_RMB_MODE_ENABLE: if (contRmbControl(cont, i)) { cont->mode = NU_CONT_RMB_MODE_DISABLE; } break; case NU_CONT_RMB_MODE_AUTORUN: if (cont->autorun == NU_CONT_RMB_AUTO_SEARCH) { if ((cont->counter % nuContRmbSearchTime) == 0) { if (osMotorInit(&nuSiMesgQ, &nuContPfs[i], i) == 0) { cont->autorun = NU_CONT_RMB_AUTO_FIND; cont->type = NU_CONT_PAK_TYPE_RUMBLE; } } cont->counter++; } else { if (contRmbControl(cont, i)) { cont->counter = i; cont->autorun = NU_CONT_RMB_AUTO_SEARCH; cont->type = NU_CONT_PAK_TYPE_NONE; } } break; case (NU_CONT_RMB_MODE_ENABLE | NU_CONT_RMB_MODE_PAUSE): case (NU_CONT_RMB_MODE_AUTORUN | NU_CONT_RMB_MODE_PAUSE): if (cont->type == NU_CONT_PAK_TYPE_RUMBLE) { contRmbControl(cont, i); } } } return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel chapter_change_main /* 3EB80C E010E32C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3EB810 E010E330 F7B40040 */ sdc1 $f20, 0x40($sp) /* 3EB814 E010E334 4485A000 */ mtc1 $a1, $f20 /* 3EB818 E010E338 F7B60048 */ sdc1 $f22, 0x48($sp) /* 3EB81C E010E33C 4486B000 */ mtc1 $a2, $f22 /* 3EB820 E010E340 AFB20030 */ sw $s2, 0x30($sp) /* 3EB824 E010E344 0080902D */ daddu $s2, $a0, $zero /* 3EB828 E010E348 F7B80050 */ sdc1 $f24, 0x50($sp) /* 3EB82C E010E34C 4487C000 */ mtc1 $a3, $f24 /* 3EB830 E010E350 27A40010 */ addiu $a0, $sp, 0x10 /* 3EB834 E010E354 AFB30034 */ sw $s3, 0x34($sp) /* 3EB838 E010E358 8FB3006C */ lw $s3, 0x6C($sp) /* 3EB83C E010E35C 3C02E011 */ lui $v0, %hi(chapter_change_init) /* 3EB840 E010E360 2442E4A0 */ addiu $v0, $v0, %lo(chapter_change_init) /* 3EB844 E010E364 AFA20018 */ sw $v0, 0x18($sp) /* 3EB848 E010E368 3C02E011 */ lui $v0, %hi(chapter_change_update) /* 3EB84C E010E36C 2442E4A8 */ addiu $v0, $v0, %lo(chapter_change_update) /* 3EB850 E010E370 AFA2001C */ sw $v0, 0x1C($sp) /* 3EB854 E010E374 3C02E011 */ lui $v0, %hi(chapter_change_render) /* 3EB858 E010E378 2442E510 */ addiu $v0, $v0, %lo(chapter_change_render) /* 3EB85C E010E37C AFA20020 */ sw $v0, 0x20($sp) /* 3EB860 E010E380 24020079 */ addiu $v0, $zero, 0x79 /* 3EB864 E010E384 AFBF0038 */ sw $ra, 0x38($sp) /* 3EB868 E010E388 AFB1002C */ sw $s1, 0x2C($sp) /* 3EB86C E010E38C AFB00028 */ sw $s0, 0x28($sp) /* 3EB870 E010E390 AFA00010 */ sw $zero, 0x10($sp) /* 3EB874 E010E394 AFA00024 */ sw $zero, 0x24($sp) /* 3EB878 E010E398 0C080124 */ jal shim_create_effect_instance /* 3EB87C E010E39C AFA20014 */ sw $v0, 0x14($sp) /* 3EB880 E010E3A0 24040058 */ addiu $a0, $zero, 0x58 /* 3EB884 E010E3A4 24030001 */ addiu $v1, $zero, 0x1 /* 3EB888 E010E3A8 0040882D */ daddu $s1, $v0, $zero /* 3EB88C E010E3AC 0C08012C */ jal shim_general_heap_malloc /* 3EB890 E010E3B0 AE230008 */ sw $v1, 0x8($s1) /* 3EB894 E010E3B4 0040802D */ daddu $s0, $v0, $zero /* 3EB898 E010E3B8 16000003 */ bnez $s0, .LE010E3C8 /* 3EB89C E010E3BC AE22000C */ sw $v0, 0xC($s1) .LE010E3C0: /* 3EB8A0 E010E3C0 080438F0 */ j .LE010E3C0 /* 3EB8A4 E010E3C4 00000000 */ nop .LE010E3C8: /* 3EB8A8 E010E3C8 AE120000 */ sw $s2, 0x0($s0) /* 3EB8AC E010E3CC 1E600004 */ bgtz $s3, .LE010E3E0 /* 3EB8B0 E010E3D0 AE00001C */ sw $zero, 0x1C($s0) /* 3EB8B4 E010E3D4 240203E8 */ addiu $v0, $zero, 0x3E8 /* 3EB8B8 E010E3D8 080438F9 */ j .LE010E3E4 /* 3EB8BC E010E3DC AE020018 */ sw $v0, 0x18($s0) .LE010E3E0: /* 3EB8C0 E010E3E0 AE130018 */ sw $s3, 0x18($s0) .LE010E3E4: /* 3EB8C4 E010E3E4 E6140010 */ swc1 $f20, 0x10($s0) /* 3EB8C8 E010E3E8 E6140004 */ swc1 $f20, 0x4($s0) /* 3EB8CC E010E3EC E6160014 */ swc1 $f22, 0x14($s0) /* 3EB8D0 E010E3F0 E6160008 */ swc1 $f22, 0x8($s0) /* 3EB8D4 E010E3F4 E618000C */ swc1 $f24, 0xC($s0) /* 3EB8D8 E010E3F8 C7A00068 */ lwc1 $f0, 0x68($sp) /* 3EB8DC E010E3FC 240300FF */ addiu $v1, $zero, 0xFF /* 3EB8E0 E010E400 AE030020 */ sw $v1, 0x20($s0) /* 3EB8E4 E010E404 AE030024 */ sw $v1, 0x24($s0) /* 3EB8E8 E010E408 AE030028 */ sw $v1, 0x28($s0) /* 3EB8EC E010E40C AE03002C */ sw $v1, 0x2C($s0) /* 3EB8F0 E010E410 AE000030 */ sw $zero, 0x30($s0) /* 3EB8F4 E010E414 AE000034 */ sw $zero, 0x34($s0) /* 3EB8F8 E010E418 AE000038 */ sw $zero, 0x38($s0) /* 3EB8FC E010E41C 12400005 */ beqz $s2, .LE010E434 /* 3EB900 E010E420 E6000050 */ swc1 $f0, 0x50($s0) /* 3EB904 E010E424 2642FFF6 */ addiu $v0, $s2, -0xA /* 3EB908 E010E428 2C420009 */ sltiu $v0, $v0, 0x9 /* 3EB90C E010E42C 50400002 */ beql $v0, $zero, .LE010E438 /* 3EB910 E010E430 AE03003C */ sw $v1, 0x3C($s0) .LE010E434: /* 3EB914 E010E434 AE00003C */ sw $zero, 0x3C($s0) .LE010E438: /* 3EB918 E010E438 00121080 */ sll $v0, $s2, 2 /* 3EB91C E010E43C 3C01E011 */ lui $at, (0xE0110000 >> 16) /* 3EB920 E010E440 00220821 */ addu $at, $at, $v0 /* 3EB924 E010E444 8C22E750 */ lw $v0, -0x18B0($at) /* 3EB928 E010E448 0440000A */ bltz $v0, .LE010E474 /* 3EB92C E010E44C AE020054 */ sw $v0, 0x54($s0) /* 3EB930 E010E450 0040202D */ daddu $a0, $v0, $zero /* 3EB934 E010E454 240200A0 */ addiu $v0, $zero, 0xA0 /* 3EB938 E010E458 0000282D */ daddu $a1, $zero, $zero /* 3EB93C E010E45C AE020040 */ sw $v0, 0x40($s0) /* 3EB940 E010E460 0C080198 */ jal shim_get_msg_width /* 3EB944 E010E464 AE020044 */ sw $v0, 0x44($s0) /* 3EB948 E010E468 AE020048 */ sw $v0, 0x48($s0) /* 3EB94C E010E46C 24020018 */ addiu $v0, $zero, 0x18 /* 3EB950 E010E470 AE02004C */ sw $v0, 0x4C($s0) .LE010E474: /* 3EB954 E010E474 0220102D */ daddu $v0, $s1, $zero /* 3EB958 E010E478 8FBF0038 */ lw $ra, 0x38($sp) /* 3EB95C E010E47C 8FB30034 */ lw $s3, 0x34($sp) /* 3EB960 E010E480 8FB20030 */ lw $s2, 0x30($sp) /* 3EB964 E010E484 8FB1002C */ lw $s1, 0x2C($sp) /* 3EB968 E010E488 8FB00028 */ lw $s0, 0x28($sp) /* 3EB96C E010E48C D7B80050 */ ldc1 $f24, 0x50($sp) /* 3EB970 E010E490 D7B60048 */ ldc1 $f22, 0x48($sp) /* 3EB974 E010E494 D7B40040 */ ldc1 $f20, 0x40($sp) /* 3EB978 E010E498 03E00008 */ jr $ra /* 3EB97C E010E49C 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* chapter_change_main(s32 arg0, f32 posX, f32 posY, f32 arg3, f32 arg4, s32 duration) { EffectBlueprint bp; ChapterChangeFXData* data; EffectInstance* effect; s32 numParts = 1; bp.init = chapter_change_init; bp.update = chapter_change_update; bp.renderWorld = chapter_change_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_CHAPTER_CHANGE; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.chapterChange = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.chapterChange != NULL); data->unk_00 = arg0; data->lifetime = 0; if (duration <= 0) { data->timeLeft = 1000; } else { data->timeLeft = duration; } data->chapterPos.x = data->endOfPos.x = posX; data->chapterPos.y = data->endOfPos.y = posY; data->unk_0C = arg3; data->unk_50 = arg4; data->unk_20 = 255; data->unk_24 = 255; data->unk_28 = 255; data->unk_2C = 255; data->unk_30 = 0; data->unk_34 = 0; data->unk_38 = 0; if (arg0 == 0 || (arg0 >= 10 && arg0 <= 18)) { data->unk_3C = 0; } else { data->unk_3C = 255; } data->unk_54 = D_E010E750[arg0]; if (data->unk_54 >= 0) { data->unk_40 = 160; data->unk_44 = 160; data->unk_48 = shim_get_msg_width(data->unk_54, 0); data->unk_4C = 24; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel AddPartDispOffset /* 19A668 8026BD88 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 19A66C 8026BD8C AFB20018 */ sw $s2, 0x18($sp) /* 19A670 8026BD90 0080902D */ daddu $s2, $a0, $zero /* 19A674 8026BD94 AFBF0020 */ sw $ra, 0x20($sp) /* 19A678 8026BD98 AFB3001C */ sw $s3, 0x1C($sp) /* 19A67C 8026BD9C AFB10014 */ sw $s1, 0x14($sp) /* 19A680 8026BDA0 AFB00010 */ sw $s0, 0x10($sp) /* 19A684 8026BDA4 F7B80038 */ sdc1 $f24, 0x38($sp) /* 19A688 8026BDA8 F7B60030 */ sdc1 $f22, 0x30($sp) /* 19A68C 8026BDAC F7B40028 */ sdc1 $f20, 0x28($sp) /* 19A690 8026BDB0 8E51000C */ lw $s1, 0xC($s2) /* 19A694 8026BDB4 8E250000 */ lw $a1, 0x0($s1) /* 19A698 8026BDB8 0C0B1EAF */ jal evt_get_variable /* 19A69C 8026BDBC 26310004 */ addiu $s1, $s1, 0x4 /* 19A6A0 8026BDC0 0040982D */ daddu $s3, $v0, $zero /* 19A6A4 8026BDC4 2402FF81 */ addiu $v0, $zero, -0x7F /* 19A6A8 8026BDC8 16620002 */ bne $s3, $v0, .L8026BDD4 /* 19A6AC 8026BDCC 00000000 */ nop /* 19A6B0 8026BDD0 8E530148 */ lw $s3, 0x148($s2) .L8026BDD4: /* 19A6B4 8026BDD4 8E250000 */ lw $a1, 0x0($s1) /* 19A6B8 8026BDD8 26310004 */ addiu $s1, $s1, 0x4 /* 19A6BC 8026BDDC 0C0B1EAF */ jal evt_get_variable /* 19A6C0 8026BDE0 0240202D */ daddu $a0, $s2, $zero /* 19A6C4 8026BDE4 8E250000 */ lw $a1, 0x0($s1) /* 19A6C8 8026BDE8 26310004 */ addiu $s1, $s1, 0x4 /* 19A6CC 8026BDEC 0240202D */ daddu $a0, $s2, $zero /* 19A6D0 8026BDF0 0C0B210B */ jal evt_get_float_variable /* 19A6D4 8026BDF4 0040802D */ daddu $s0, $v0, $zero /* 19A6D8 8026BDF8 8E250000 */ lw $a1, 0x0($s1) /* 19A6DC 8026BDFC 26310004 */ addiu $s1, $s1, 0x4 /* 19A6E0 8026BE00 0240202D */ daddu $a0, $s2, $zero /* 19A6E4 8026BE04 0C0B210B */ jal evt_get_float_variable /* 19A6E8 8026BE08 46000506 */ mov.s $f20, $f0 /* 19A6EC 8026BE0C 0240202D */ daddu $a0, $s2, $zero /* 19A6F0 8026BE10 8E250000 */ lw $a1, 0x0($s1) /* 19A6F4 8026BE14 0C0B210B */ jal evt_get_float_variable /* 19A6F8 8026BE18 46000586 */ mov.s $f22, $f0 /* 19A6FC 8026BE1C 0260202D */ daddu $a0, $s3, $zero /* 19A700 8026BE20 0C09A75B */ jal get_actor /* 19A704 8026BE24 46000606 */ mov.s $f24, $f0 /* 19A708 8026BE28 0040202D */ daddu $a0, $v0, $zero /* 19A70C 8026BE2C 0C099117 */ jal get_actor_part pause_spirits_bg_pal: /* 19A710 8026BE30 0200282D */ daddu $a1, $s0, $zero /* 19A714 8026BE34 0040202D */ daddu $a0, $v0, $zero /* 19A718 8026BE38 8C820000 */ lw $v0, 0x0($a0) /* 19A71C 8026BE3C 3C030010 */ lui $v1, (0x100000 >> 16) /* 19A720 8026BE40 00431024 */ and $v0, $v0, $v1 /* 19A724 8026BE44 1440001B */ bnez $v0, .L8026BEB4 /* 19A728 8026BE48 00000000 */ nop /* 19A72C 8026BE4C 84820014 */ lh $v0, 0x14($a0) /* 19A730 8026BE50 44820000 */ mtc1 $v0, $f0 /* 19A734 8026BE54 00000000 */ nop /* 19A738 8026BE58 46800020 */ cvt.s.w $f0, $f0 /* 19A73C 8026BE5C 46140000 */ add.s $f0, $f0, $f20 /* 19A740 8026BE60 84820016 */ lh $v0, 0x16($a0) /* 19A744 8026BE64 44821000 */ mtc1 $v0, $f2 /* 19A748 8026BE68 00000000 */ nop /* 19A74C 8026BE6C 468010A0 */ cvt.s.w $f2, $f2 /* 19A750 8026BE70 46161080 */ add.s $f2, $f2, $f22 /* 19A754 8026BE74 84820018 */ lh $v0, 0x18($a0) /* 19A758 8026BE78 4600010D */ trunc.w.s $f4, $f0 /* 19A75C 8026BE7C 44032000 */ mfc1 $v1, $f4 /* 19A760 8026BE80 44820000 */ mtc1 $v0, $f0 /* 19A764 8026BE84 00000000 */ nop /* 19A768 8026BE88 46800020 */ cvt.s.w $f0, $f0 /* 19A76C 8026BE8C 46180000 */ add.s $f0, $f0, $f24 /* 19A770 8026BE90 A4830014 */ sh $v1, 0x14($a0) /* 19A774 8026BE94 4600110D */ trunc.w.s $f4, $f2 /* 19A778 8026BE98 44022000 */ mfc1 $v0, $f4 /* 19A77C 8026BE9C 00000000 */ nop /* 19A780 8026BEA0 A4820016 */ sh $v0, 0x16($a0) /* 19A784 8026BEA4 4600010D */ trunc.w.s $f4, $f0 /* 19A788 8026BEA8 44022000 */ mfc1 $v0, $f4 /* 19A78C 8026BEAC 0809AFC7 */ j .L8026BF1C /* 19A790 8026BEB0 A4820018 */ sh $v0, 0x18($a0) .L8026BEB4: /* 19A794 8026BEB4 8482001A */ lh $v0, 0x1A($a0) /* 19A798 8026BEB8 44820000 */ mtc1 $v0, $f0 /* 19A79C 8026BEBC 00000000 */ nop /* 19A7A0 8026BEC0 46800020 */ cvt.s.w $f0, $f0 /* 19A7A4 8026BEC4 46140000 */ add.s $f0, $f0, $f20 /* 19A7A8 8026BEC8 8482001C */ lh $v0, 0x1C($a0) /* 19A7AC 8026BECC 44821000 */ mtc1 $v0, $f2 /* 19A7B0 8026BED0 00000000 */ nop /* 19A7B4 8026BED4 468010A0 */ cvt.s.w $f2, $f2 /* 19A7B8 8026BED8 46161080 */ add.s $f2, $f2, $f22 /* 19A7BC 8026BEDC 8482001E */ lh $v0, 0x1E($a0) /* 19A7C0 8026BEE0 4600010D */ trunc.w.s $f4, $f0 /* 19A7C4 8026BEE4 44032000 */ mfc1 $v1, $f4 /* 19A7C8 8026BEE8 44820000 */ mtc1 $v0, $f0 /* 19A7CC 8026BEEC 00000000 */ nop /* 19A7D0 8026BEF0 46800020 */ cvt.s.w $f0, $f0 /* 19A7D4 8026BEF4 46180000 */ add.s $f0, $f0, $f24 /* 19A7D8 8026BEF8 A483001A */ sh $v1, 0x1A($a0) /* 19A7DC 8026BEFC 4600110D */ trunc.w.s $f4, $f2 /* 19A7E0 8026BF00 44022000 */ mfc1 $v0, $f4 /* 19A7E4 8026BF04 00000000 */ nop /* 19A7E8 8026BF08 A482001C */ sh $v0, 0x1C($a0) /* 19A7EC 8026BF0C 4600010D */ trunc.w.s $f4, $f0 /* 19A7F0 8026BF10 44022000 */ mfc1 $v0, $f4 /* 19A7F4 8026BF14 00000000 */ nop /* 19A7F8 8026BF18 A482001E */ sh $v0, 0x1E($a0) .L8026BF1C: /* 19A7FC 8026BF1C 8FBF0020 */ lw $ra, 0x20($sp) /* 19A800 8026BF20 8FB3001C */ lw $s3, 0x1C($sp) /* 19A804 8026BF24 8FB20018 */ lw $s2, 0x18($sp) /* 19A808 8026BF28 8FB10014 */ lw $s1, 0x14($sp) /* 19A80C 8026BF2C 8FB00010 */ lw $s0, 0x10($sp) /* 19A810 8026BF30 D7B80038 */ ldc1 $f24, 0x38($sp) /* 19A814 8026BF34 D7B60030 */ ldc1 $f22, 0x30($sp) /* 19A818 8026BF38 D7B40028 */ ldc1 $f20, 0x28($sp) /* 19A81C 8026BF3C 24020002 */ addiu $v0, $zero, 0x2 /* 19A820 8026BF40 03E00008 */ jr $ra /* 19A824 8026BF44 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: ApiStatus AddPartDispOffset(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 actorID = evt_get_variable(script, *args++); ActorPart* actorPart; s32 partID; f32 x, y, z; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } partID = evt_get_variable(script, *args++); x = evt_get_float_variable(script, *args++); y = evt_get_float_variable(script, *args++); z = evt_get_float_variable(script, *args++); actorPart = get_actor_part(get_actor(actorID), partID); if (!(actorPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { actorPart->partOffset.x += x; actorPart->partOffset.y += y; actorPart->partOffset.z += z; } else { actorPart->visualOffset.x += x; actorPart->visualOffset.y += y; actorPart->visualOffset.z += z; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802BB0A0_E2D9D0 /* E2D9D0 802BB0A0 27BDFFE0 */ addiu $sp, $sp, -0x20 /* E2D9D4 802BB0A4 AFB10014 */ sw $s1, 0x14($sp) /* E2D9D8 802BB0A8 0080882D */ daddu $s1, $a0, $zero /* E2D9DC 802BB0AC AFBF001C */ sw $ra, 0x1C($sp) /* E2D9E0 802BB0B0 AFB20018 */ sw $s2, 0x18($sp) .L802BB0B4: /* E2D9E4 802BB0B4 AFB00010 */ sw $s0, 0x10($sp) /* E2D9E8 802BB0B8 0C0AEC00 */ jal func_802BB000_E2D930 .L802BB0BC: /* E2D9EC 802BB0BC 8E300040 */ lw $s0, 0x40($s1) /* E2D9F0 802BB0C0 82030002 */ lb $v1, 0x2($s0) /* E2D9F4 802BB0C4 3C128011 */ lui $s2, %hi(gPlayerStatus) /* E2D9F8 802BB0C8 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* E2D9FC 802BB0CC 10600005 */ beqz $v1, .L802BB0E4 /* E2DA00 802BB0D0 24020001 */ addiu $v0, $zero, 0x1 /* E2DA04 802BB0D4 1062000A */ beq $v1, $v0, .L802BB100 /* E2DA08 802BB0D8 00000000 */ nop /* E2DA0C 802BB0DC 080AEC67 */ j .L802BB19C /* E2DA10 802BB0E0 00000000 */ nop .L802BB0E4: /* E2DA14 802BB0E4 24020001 */ addiu $v0, $zero, 0x1 /* E2DA18 802BB0E8 AE000018 */ sw $zero, 0x18($s0) /* E2DA1C 802BB0EC A6000000 */ sh $zero, 0x0($s0) /* E2DA20 802BB0F0 A2020002 */ sb $v0, 0x2($s0) .L802BB0F4: /* E2DA24 802BB0F4 AE000004 */ sw $zero, 0x4($s0) /* E2DA28 802BB0F8 080AEC67 */ j .L802BB19C /* E2DA2C 802BB0FC AE00000C */ sw $zero, 0xC($s0) .L802BB100: /* E2DA30 802BB100 92220006 */ lbu $v0, 0x6($s1) /* E2DA34 802BB104 30420001 */ andi $v0, $v0, 0x1 glabel func_802BB108_E2FA58 /* E2DA38 802BB108 14400017 */ bnez $v0, .L802BB168 /* E2DA3C 802BB10C 00000000 */ nop /* E2DA40 802BB110 C6000014 */ lwc1 $f0, 0x14($s0) /* E2DA44 802BB114 3C01802C */ lui $at, %hi(D_802BCDC0_E2F6F0) /* E2DA48 802BB118 D422CDC0 */ ldc1 $f2, %lo(D_802BCDC0_E2F6F0)($at) /* E2DA4C 802BB11C 46000021 */ cvt.d.s $f0, $f0 /* E2DA50 802BB120 46220000 */ add.d $f0, $f0, $f2 /* E2DA54 802BB124 3C014000 */ lui $at, (0x40000000 >> 16) /* E2DA58 802BB128 44812800 */ mtc1 $at, $f5 /* E2DA5C 802BB12C 44802000 */ mtc1 $zero, $f4 /* E2DA60 802BB130 46200020 */ cvt.s.d $f0, $f0 /* E2DA64 802BB134 460000A1 */ cvt.d.s $f2, $f0 /* E2DA68 802BB138 4622203C */ c.lt.d $f4, $f2 /* E2DA6C 802BB13C 00000000 */ nop .L802BB140: /* E2DA70 802BB140 45000016 */ bc1f .L802BB19C /* E2DA74 802BB144 E6000014 */ swc1 $f0, 0x14($s0) /* E2DA78 802BB148 45000014 */ bc1f .L802BB19C /* E2DA7C 802BB14C 00000000 */ nop /* E2DA80 802BB150 3C01802C */ lui $at, %hi(D_802BCDC8_E2F6F8) /* E2DA84 802BB154 D420CDC8 */ ldc1 $f0, %lo(D_802BCDC8_E2F6F8)($at) /* E2DA88 802BB158 46201001 */ sub.d $f0, $f2, $f0 /* E2DA8C 802BB15C 46200020 */ cvt.s.d $f0, $f0 /* E2DA90 802BB160 080AEC67 */ j .L802BB19C /* E2DA94 802BB164 E6000014 */ swc1 $f0, 0x14($s0) .L802BB168: /* E2DA98 802BB168 C6000014 */ lwc1 $f0, 0x14($s0) /* E2DA9C 802BB16C 3C01802C */ lui $at, %hi(D_802BCDD0_E2F700) /* E2DAA0 802BB170 D422CDD0 */ ldc1 $f2, %lo(D_802BCDD0_E2F700)($at) /* E2DAA4 802BB174 46000021 */ cvt.d.s $f0, $f0 /* E2DAA8 802BB178 46220000 */ add.d $f0, $f0, $f2 /* E2DAAC 802BB17C 3C014160 */ lui $at, (0x41600000 >> 16) /* E2DAB0 802BB180 44811000 */ mtc1 $at, $f2 /* E2DAB4 802BB184 46200020 */ cvt.s.d $f0, $f0 /* E2DAB8 802BB188 4600103C */ c.lt.s $f2, $f0 /* E2DABC 802BB18C 00000000 */ nop /* E2DAC0 802BB190 45000002 */ bc1f .L802BB19C /* E2DAC4 802BB194 E6000014 */ swc1 $f0, 0x14($s0) /* E2DAC8 802BB198 E6020014 */ swc1 $f2, 0x14($s0) .L802BB19C: /* E2DACC 802BB19C C6000008 */ lwc1 $f0, 0x8($s0) /* E2DAD0 802BB1A0 C60C0014 */ lwc1 $f12, 0x14($s0) /* E2DAD4 802BB1A4 0C00A6C9 */ jal clamp_angle /* E2DAD8 802BB1A8 460C0300 */ add.s $f12, $f0, $f12 /* E2DADC 802BB1AC E6000008 */ swc1 $f0, 0x8($s0) /* E2DAE0 802BB1B0 92220006 */ lbu $v0, 0x6($s1) /* E2DAE4 802BB1B4 30420001 */ andi $v0, $v0, 0x1 /* E2DAE8 802BB1B8 14400015 */ bnez $v0, .L802BB210 /* E2DAEC 802BB1BC 3C030001 */ lui $v1, (0x10000 >> 16) /* E2DAF0 802BB1C0 8E420004 */ lw $v0, 0x4($s2) .L802BB1C4: /* E2DAF4 802BB1C4 00431024 */ and $v0, $v0, $v1 /* E2DAF8 802BB1C8 10400011 */ beqz $v0, .L802BB210 /* E2DAFC 802BB1CC 00000000 */ nop /* E2DB00 802BB1D0 C62C0048 */ lwc1 $f12, 0x48($s1) /* E2DB04 802BB1D4 C62E0050 */ lwc1 $f14, 0x50($s1) /* E2DB08 802BB1D8 8E460028 */ lw $a2, 0x28($s2) /* E2DB0C 802BB1DC 0C00A7B5 */ jal dist2D /* E2DB10 802BB1E0 8E470030 */ lw $a3, 0x30($s2) /* E2DB14 802BB1E4 46000021 */ cvt.d.s $f0, $f0 glabel func_802BB1E8_E2B918 /* E2DB18 802BB1E8 3C01404E */ lui $at, (0x404E0000 >> 16) /* E2DB1C 802BB1EC 44811800 */ mtc1 $at, $f3 /* E2DB20 802BB1F0 44801000 */ mtc1 $zero, $f2 /* E2DB24 802BB1F4 46200005 */ abs.d $f0, $f0 /* E2DB28 802BB1F8 4622003C */ c.lt.d $f0, $f2 /* E2DB2C 802BB1FC 00000000 */ nop /* E2DB30 802BB200 45000003 */ bc1f .L802BB210 /* E2DB34 802BB204 00000000 */ nop /* E2DB38 802BB208 0C043F5A */ jal exec_entity_commandlist /* E2DB3C 802BB20C 0220202D */ daddu $a0, $s1, $zero .L802BB210: /* E2DB40 802BB210 8FBF001C */ lw $ra, 0x1C($sp) /* E2DB44 802BB214 8FB20018 */ lw $s2, 0x18($sp) /* E2DB48 802BB218 8FB10014 */ lw $s1, 0x14($sp) /* E2DB4C 802BB21C 8FB00010 */ lw $s0, 0x10($sp) /* E2DB50 802BB220 03E00008 */ jr $ra glabel .L802BB224 /* E2DB54 802BB224 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void func_802BB0A0_E2D9D0(Entity* entity) { SpinningFlowerData* data = entity->dataBuf.spinningFlower; PlayerStatus* playerStatus = &gPlayerStatus; func_802BB000_E2D930(entity); switch (data->state) { case 0: data->unk_18 = 0; data->unk_00 = 0; data->state = 1; data->rotation.x = 0.0f; data->rotation.z = 0.0f; break; case 1: if (!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR)) { data->spinSpeed += 0.02; if (data->spinSpeed > 2.0) { if (data->spinSpeed > 2.0) { data->spinSpeed -= 0.4; } } } else { data->spinSpeed += 0.8; if (data->spinSpeed > 14.0f) { data->spinSpeed = 14.0f; } } break; } data->rotation.y = clamp_angle(data->rotation.y + data->spinSpeed); if (!(entity->collisionFlags & ENTITY_COLLISION_PLAYER_TOUCH_FLOOR) && (playerStatus->animFlags & PA_FLAG_SPINNING) && fabs(dist2D(entity->position.x, entity->position.z, playerStatus->position.x, playerStatus->position.z)) < 60.0) { exec_entity_commandlist(entity); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_shadows /* A67CC 801100CC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* A67D0 801100D0 AFB10014 */ sw $s1, 0x14($sp) /* A67D4 801100D4 0000882D */ daddu $s1, $zero, $zero /* A67D8 801100D8 AFB3001C */ sw $s3, 0x1C($sp) /* A67DC 801100DC 3C131000 */ lui $s3, (0x10000000 >> 16) /* A67E0 801100E0 AFB20018 */ sw $s2, 0x18($sp) /* A67E4 801100E4 3C122000 */ lui $s2, (0x20000000 >> 16) /* A67E8 801100E8 AFBF0020 */ sw $ra, 0x20($sp) /* A67EC 801100EC AFB00010 */ sw $s0, 0x10($sp) .L801100F0: /* A67F0 801100F0 0C044181 */ jal get_shadow_by_index /* A67F4 801100F4 0220202D */ daddu $a0, $s1, $zero /* A67F8 801100F8 0040802D */ daddu $s0, $v0, $zero /* A67FC 801100FC 52000041 */ beql $s0, $zero, .L80110204 /* A6800 80110100 26310001 */ addiu $s1, $s1, 0x1 /* A6804 80110104 8E030000 */ lw $v1, 0x0($s0) /* A6808 80110108 30620001 */ andi $v0, $v1, 0x1 /* A680C 8011010C 1040000E */ beqz $v0, .L80110148 /* A6810 80110110 00731024 */ and $v0, $v1, $s3 /* A6814 80110114 5040003B */ beql $v0, $zero, .L80110204 /* A6818 80110118 26310001 */ addiu $s1, $s1, 0x1 /* A681C 8011011C 92020005 */ lbu $v0, 0x5($s0) /* A6820 80110120 2442FFEC */ addiu $v0, $v0, -0x14 /* A6824 80110124 A2020005 */ sb $v0, 0x5($s0) /* A6828 80110128 304200FF */ andi $v0, $v0, 0xFF /* A682C 8011012C 2C420015 */ sltiu $v0, $v0, 0x15 /* A6830 80110130 50400034 */ beql $v0, $zero, .L80110204 /* A6834 80110134 26310001 */ addiu $s1, $s1, 0x1 /* A6838 80110138 0060102D */ daddu $v0, $v1, $zero /* A683C 8011013C 00521025 */ or $v0, $v0, $s2 /* A6840 80110140 08044080 */ j .L80110200 /* A6844 80110144 AE020000 */ sw $v0, 0x0($s0) .L80110148: /* A6848 80110148 30620008 */ andi $v0, $v1, 0x8 /* A684C 8011014C 1040000F */ beqz $v0, .L8011018C /* A6850 80110150 00731024 */ and $v0, $v1, $s3 /* A6854 80110154 8E07000C */ lw $a3, 0xC($s0) /* A6858 80110158 14E00006 */ bnez $a3, .L80110174 /* A685C 8011015C 00000000 */ nop /* A6860 80110160 86040008 */ lh $a0, 0x8($s0) /* A6864 80110164 0C047CC1 */ jal render_animated_model /* A6868 80110168 26050038 */ addiu $a1, $s0, 0x38 /* A686C 8011016C 08044081 */ j .L80110204 /* A6870 80110170 26310001 */ addiu $s1, $s1, 0x1 .L80110174: /* A6874 80110174 86040008 */ lh $a0, 0x8($s0) /* A6878 80110178 8606000A */ lh $a2, 0xA($s0) /* A687C 8011017C 0C047CFA */ jal render_animated_model_with_vertices /* A6880 80110180 26050038 */ addiu $a1, $s0, 0x38 /* A6884 80110184 08044081 */ j .L80110204 /* A6888 80110188 26310001 */ addiu $s1, $s1, 0x1 .L8011018C: /* A688C 8011018C 1040000B */ beqz $v0, .L801101BC /* A6890 80110190 00000000 */ nop /* A6894 80110194 92020005 */ lbu $v0, 0x5($s0) /* A6898 80110198 2442FFEC */ addiu $v0, $v0, -0x14 /* A689C 8011019C A2020005 */ sb $v0, 0x5($s0) /* A68A0 801101A0 304200FF */ andi $v0, $v0, 0xFF /* A68A4 801101A4 2C420015 */ sltiu $v0, $v0, 0x15 /* A68A8 801101A8 10400004 */ beqz $v0, .L801101BC /* A68AC 801101AC 00000000 */ nop /* A68B0 801101B0 8E020000 */ lw $v0, 0x0($s0) /* A68B4 801101B4 00521025 */ or $v0, $v0, $s2 /* A68B8 801101B8 AE020000 */ sw $v0, 0x0($s0) .L801101BC: /* A68BC 801101BC 86040008 */ lh $a0, 0x8($s0) /* A68C0 801101C0 92050005 */ lbu $a1, 0x5($s0) /* A68C4 801101C4 3C068011 */ lui $a2, %hi(entity_model_set_shadow_color) /* A68C8 801101C8 0C048BD9 */ jal bind_entity_model_setupGfx /* A68CC 801101CC 24C6FE68 */ addiu $a2, $a2, %lo(entity_model_set_shadow_color) /* A68D0 801101D0 8E07000C */ lw $a3, 0xC($s0) /* A68D4 801101D4 14E00006 */ bnez $a3, .L801101F0 /* A68D8 801101D8 00000000 */ nop /* A68DC 801101DC 86040008 */ lh $a0, 0x8($s0) /* A68E0 801101E0 0C04873A */ jal draw_entity_model_A /* A68E4 801101E4 26050038 */ addiu $a1, $s0, 0x38 /* A68E8 801101E8 08044081 */ j .L80110204 /* A68EC 801101EC 26310001 */ addiu $s1, $s1, 0x1 .L801101F0: /* A68F0 801101F0 86040008 */ lh $a0, 0x8($s0) /* A68F4 801101F4 8606000A */ lh $a2, 0xA($s0) /* A68F8 801101F8 0C0487AE */ jal draw_entity_model_B /* A68FC 801101FC 26050038 */ addiu $a1, $s0, 0x38 .L80110200: /* A6900 80110200 26310001 */ addiu $s1, $s1, 0x1 .L80110204: /* A6904 80110204 2A22003C */ slti $v0, $s1, 0x3C /* A6908 80110208 1440FFB9 */ bnez $v0, .L801100F0 /* A690C 8011020C 00000000 */ nop /* A6910 80110210 8FBF0020 */ lw $ra, 0x20($sp) /* A6914 80110214 8FB3001C */ lw $s3, 0x1C($sp) /* A6918 80110218 8FB20018 */ lw $s2, 0x18($sp) /* A691C 8011021C 8FB10014 */ lw $s1, 0x14($sp) /* A6920 80110220 8FB00010 */ lw $s0, 0x10($sp) /* A6924 80110224 03E00008 */ jr $ra /* A6928 80110228 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void render_shadows(void) { s32 i; for (i = 0; i < MAX_SHADOWS; i++) { Shadow* shadow = get_shadow_by_index(i); if (shadow != NULL) { if (shadow->flags & ENTITY_FLAG_HIDDEN) { if (shadow->flags & ENTITY_FLAG_FADING_AWAY) { shadow->alpha -= 20; if (shadow->alpha <= 20) { shadow->flags |= ENTITY_FLAG_PENDING_INSTANCE_DELETE; } } } else if (shadow->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { if (shadow->vertexArray == NULL) { render_animated_model(shadow->entityModelID, &shadow->transformMatrix); } else { render_animated_model_with_vertices(shadow->entityModelID, &shadow->transformMatrix, shadow->vertexSegment, shadow->vertexArray); } } else { if (shadow->flags & ENTITY_FLAG_FADING_AWAY) { shadow->alpha -= 20; if (shadow->alpha <= 20) { shadow->flags |= ENTITY_FLAG_PENDING_INSTANCE_DELETE; } } bind_entity_model_setupGfx(shadow->entityModelID, (void*)(u32)shadow->alpha, entity_model_set_shadow_color); if (shadow->vertexArray == NULL) { draw_entity_model_A(shadow->entityModelID, &shadow->transformMatrix); } else { draw_entity_model_B(shadow->entityModelID, &shadow->transformMatrix, shadow->vertexSegment, shadow->vertexArray); } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel snowfall_update /* 38CB2C E008A53C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 38CB30 E008A540 0080282D */ daddu $a1, $a0, $zero /* 38CB34 E008A544 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 38CB38 E008A548 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 38CB3C E008A54C 3C04800B */ lui $a0, %hi(gCameras) /* 38CB40 E008A550 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 38CB44 E008A554 AFBF002C */ sw $ra, 0x2C($sp) /* 38CB48 E008A558 AFB60028 */ sw $s6, 0x28($sp) /* 38CB4C E008A55C AFB50024 */ sw $s5, 0x24($sp) /* 38CB50 E008A560 AFB40020 */ sw $s4, 0x20($sp) /* 38CB54 E008A564 AFB3001C */ sw $s3, 0x1C($sp) /* 38CB58 E008A568 AFB20018 */ sw $s2, 0x18($sp) /* 38CB5C E008A56C AFB10014 */ sw $s1, 0x14($sp) /* 38CB60 E008A570 AFB00010 */ sw $s0, 0x10($sp) /* 38CB64 E008A574 8CB1000C */ lw $s1, 0xC($a1) /* 38CB68 E008A578 00031080 */ sll $v0, $v1, 2 /* 38CB6C E008A57C 00431021 */ addu $v0, $v0, $v1 /* 38CB70 E008A580 00021080 */ sll $v0, $v0, 2 /* 38CB74 E008A584 00431023 */ subu $v0, $v0, $v1 /* 38CB78 E008A588 000218C0 */ sll $v1, $v0, 3 /* 38CB7C E008A58C 00431021 */ addu $v0, $v0, $v1 /* 38CB80 E008A590 000210C0 */ sll $v0, $v0, 3 /* 38CB84 E008A594 8E230020 */ lw $v1, 0x20($s1) /* 38CB88 E008A598 00442021 */ addu $a0, $v0, $a0 /* 38CB8C E008A59C 28620064 */ slti $v0, $v1, 0x64 /* 38CB90 E008A5A0 10400002 */ beqz $v0, .LE008A5AC /* 38CB94 E008A5A4 2462FFFF */ addiu $v0, $v1, -0x1 /* 38CB98 E008A5A8 AE220020 */ sw $v0, 0x20($s1) .LE008A5AC: /* 38CB9C E008A5AC 8E220020 */ lw $v0, 0x20($s1) /* 38CBA0 E008A5B0 04410005 */ bgez $v0, .LE008A5C8 /* 38CBA4 E008A5B4 00000000 */ nop /* 38CBA8 E008A5B8 0C080128 */ jal shim_remove_effect /* 38CBAC E008A5BC 00A0202D */ daddu $a0, $a1, $zero /* 38CBB0 E008A5C0 080229AF */ j .LE008A6BC /* 38CBB4 E008A5C4 00000000 */ nop .LE008A5C8: /* 38CBB8 E008A5C8 8E220024 */ lw $v0, 0x24($s1) /* 38CBBC E008A5CC 8E330020 */ lw $s3, 0x20($s1) /* 38CBC0 E008A5D0 8E35002C */ lw $s5, 0x2C($s1) /* 38CBC4 E008A5D4 24420001 */ addiu $v0, $v0, 0x1 /* 38CBC8 E008A5D8 AE220024 */ sw $v0, 0x24($s1) /* 38CBCC E008A5DC 2A62000A */ slti $v0, $s3, 0xA /* 38CBD0 E008A5E0 10400005 */ beqz $v0, .LE008A5F8 /* 38CBD4 E008A5E4 00131040 */ sll $v0, $s3, 1 /* 38CBD8 E008A5E8 00531021 */ addu $v0, $v0, $s3 /* 38CBDC E008A5EC 000210C0 */ sll $v0, $v0, 3 /* 38CBE0 E008A5F0 00531021 */ addu $v0, $v0, $s3 /* 38CBE4 E008A5F4 AE220028 */ sw $v0, 0x28($s1) .LE008A5F8: /* 38CBE8 E008A5F8 C4800078 */ lwc1 $f0, 0x78($a0) /* 38CBEC E008A5FC 3C01E009 */ lui $at, (0xE0090000 >> 16) /* 38CBF0 E008A600 D422AA78 */ ldc1 $f2, -0x5588($at) /* 38CBF4 E008A604 4600020D */ trunc.w.s $f8, $f0 /* 38CBF8 E008A608 44144000 */ mfc1 $s4, $f8 /* 38CBFC E008A60C 00000000 */ nop /* 38CC00 E008A610 44940000 */ mtc1 $s4, $f0 /* 38CC04 E008A614 00000000 */ nop /* 38CC08 E008A618 46800021 */ cvt.d.w $f0, $f0 /* 38CC0C E008A61C 46220002 */ mul.d $f0, $f0, $f2 /* 38CC10 E008A620 00000000 */ nop /* 38CC14 E008A624 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* 38CC18 E008A628 44811800 */ mtc1 $at, $f3 /* 38CC1C E008A62C 44801000 */ mtc1 $zero, $f2 /* 38CC20 E008A630 00000000 */ nop /* 38CC24 E008A634 46220000 */ add.d $f0, $f0, $f2 /* 38CC28 E008A638 26310034 */ addiu $s1, $s1, 0x34 /* 38CC2C E008A63C 4620020D */ trunc.w.d $f8, $f0 /* 38CC30 E008A640 44164000 */ mfc1 $s6, $f8 /* 38CC34 E008A644 1AA0001D */ blez $s5, .LE008A6BC /* 38CC38 E008A648 0000902D */ daddu $s2, $zero, $zero /* 38CC3C E008A64C 26300010 */ addiu $s0, $s1, 0x10 .LE008A650: /* 38CC40 E008A650 8E020020 */ lw $v0, 0x20($s0) /* 38CC44 E008A654 18400003 */ blez $v0, .LE008A664 /* 38CC48 E008A658 2442FFFF */ addiu $v0, $v0, -0x1 /* 38CC4C E008A65C 1C400012 */ bgtz $v0, .LE008A6A8 /* 38CC50 E008A660 AE020020 */ sw $v0, 0x20($s0) .LE008A664: /* 38CC54 E008A664 0220202D */ daddu $a0, $s1, $zero /* 38CC58 E008A668 0280282D */ daddu $a1, $s4, $zero /* 38CC5C E008A66C 02C0302D */ daddu $a2, $s6, $zero /* 38CC60 E008A670 C606FFF8 */ lwc1 $f6, -0x8($s0) /* 38CC64 E008A674 C6000004 */ lwc1 $f0, 0x4($s0) /* 38CC68 E008A678 C604FFFC */ lwc1 $f4, -0x4($s0) /* 38CC6C E008A67C 46003180 */ add.s $f6, $f6, $f0 /* 38CC70 E008A680 C6000008 */ lwc1 $f0, 0x8($s0) /* 38CC74 E008A684 C602000C */ lwc1 $f2, 0xC($s0) /* 38CC78 E008A688 46002100 */ add.s $f4, $f4, $f0 /* 38CC7C E008A68C C6000000 */ lwc1 $f0, 0x0($s0) /* 38CC80 E008A690 0260382D */ daddu $a3, $s3, $zero /* 38CC84 E008A694 46020000 */ add.s $f0, $f0, $f2 /* 38CC88 E008A698 E606FFF8 */ swc1 $f6, -0x8($s0) /* 38CC8C E008A69C E604FFFC */ swc1 $f4, -0x4($s0) /* 38CC90 E008A6A0 0C0228A4 */ jal func_E008A290 /* 38CC94 E008A6A4 E6000000 */ swc1 $f0, 0x0($s0) .LE008A6A8: /* 38CC98 E008A6A8 26520001 */ addiu $s2, $s2, 0x1 /* 38CC9C E008A6AC 26100034 */ addiu $s0, $s0, 0x34 /* 38CCA0 E008A6B0 0255102A */ slt $v0, $s2, $s5 /* 38CCA4 E008A6B4 1440FFE6 */ bnez $v0, .LE008A650 /* 38CCA8 E008A6B8 26310034 */ addiu $s1, $s1, 0x34 .LE008A6BC: /* 38CCAC E008A6BC 8FBF002C */ lw $ra, 0x2C($sp) /* 38CCB0 E008A6C0 8FB60028 */ lw $s6, 0x28($sp) /* 38CCB4 E008A6C4 8FB50024 */ lw $s5, 0x24($sp) /* 38CCB8 E008A6C8 8FB40020 */ lw $s4, 0x20($sp) /* 38CCBC E008A6CC 8FB3001C */ lw $s3, 0x1C($sp) /* 38CCC0 E008A6D0 8FB20018 */ lw $s2, 0x18($sp) /* 38CCC4 E008A6D4 8FB10014 */ lw $s1, 0x14($sp) /* 38CCC8 E008A6D8 8FB00010 */ lw $s0, 0x10($sp) /* 38CCCC E008A6DC 03E00008 */ jr $ra /* 38CCD0 E008A6E0 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void snowfall_update(EffectInstance* effect) { Camera* camera = &gCameras[gCurrentCameraID]; SnowfallFXData* data = effect->data.snowfall; s32 timeLeft; s32 boomLength; s32 temp_s5; s32 temp_s6; s32 i; if (data->timeLeft < 100) { data->timeLeft--; } if (data->timeLeft < 0) { shim_remove_effect(effect); return; } data->lifeTime++; timeLeft = data->timeLeft; temp_s5 = data->unk_2C; if (timeLeft < 10) { data->unk_28 = timeLeft * 25; } boomLength = camera->currentBoomLength; temp_s6 = (boomLength * 0.3) + 1.0; data++; for (i = 0; i < temp_s5; i++, data++) { if (data->unk_30 <= 0 || --data->unk_30 <= 0) { data->unk_08 += data->unk_14; data->unk_0C += data->unk_18; data->unk_10 += data->unk_1C; func_E008A290(data, boomLength, temp_s6, timeLeft); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel fio_fetch_saved_file_info /* 6554 8002B154 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 6558 8002B158 AFB20018 */ sw $s2, 0x18($sp) /* 655C 8002B15C 3C12800A */ lui $s2, %hi(D_8009A6B0) /* 6560 8002B160 2652A6B0 */ addiu $s2, $s2, %lo(D_8009A6B0) /* 6564 8002B164 AFB40020 */ sw $s4, 0x20($sp) /* 6568 8002B168 0240A02D */ daddu $s4, $s2, $zero /* 656C 8002B16C AFB00010 */ sw $s0, 0x10($sp) /* 6570 8002B170 0000802D */ daddu $s0, $zero, $zero /* 6574 8002B174 2404FFFF */ addiu $a0, $zero, -0x1 /* 6578 8002B178 3C03800A */ lui $v1, %hi(logicalSaveInfo) /* 657C 8002B17C 2463BA30 */ addiu $v1, $v1, %lo(logicalSaveInfo) /* 6580 8002B180 AFBF0024 */ sw $ra, 0x24($sp) /* 6584 8002B184 AFB3001C */ sw $s3, 0x1C($sp) /* 6588 8002B188 AFB10014 */ sw $s1, 0x14($sp) .L8002B18C: /* 658C 8002B18C AC640000 */ sw $a0, 0x0($v1) /* 6590 8002B190 AC640004 */ sw $a0, 0x4($v1) /* 6594 8002B194 26100001 */ addiu $s0, $s0, 0x1 /* 6598 8002B198 2A020004 */ slti $v0, $s0, 0x4 /* 659C 8002B19C 1440FFFB */ bnez $v0, .L8002B18C /* 65A0 8002B1A0 24630008 */ addiu $v1, $v1, 0x8 /* 65A4 8002B1A4 0000802D */ daddu $s0, $zero, $zero /* 65A8 8002B1A8 3C13800A */ lui $s3, %hi(logicalSaveInfo) /* 65AC 8002B1AC 2673BA30 */ addiu $s3, $s3, %lo(logicalSaveInfo) /* 65B0 8002B1B0 3C11800A */ lui $s1, %hi(physicalSaveInfo) /* 65B4 8002B1B4 2631BA50 */ addiu $s1, $s1, %lo(physicalSaveInfo) .L8002B1B8: /* 65B8 8002B1B8 0200202D */ daddu $a0, $s0, $zero /* 65BC 8002B1BC 0280282D */ daddu $a1, $s4, $zero /* 65C0 8002B1C0 0C00AE1A */ jal fio_read_flash glabel func_8002B1C4 /* 65C4 8002B1C4 24061380 */ addiu $a2, $zero, 0x1380 /* 65C8 8002B1C8 0C00AC3E */ jal fio_validate_file_checksum /* 65CC 8002B1CC 0280202D */ daddu $a0, $s4, $zero /* 65D0 8002B1D0 50400014 */ beql $v0, $zero, .L8002B224 /* 65D4 8002B1D4 26100001 */ addiu $s0, $s0, 0x1 /* 65D8 8002B1D8 8E420038 */ lw $v0, 0x38($s2) /* 65DC 8002B1DC AE220000 */ sw $v0, 0x0($s1) /* 65E0 8002B1E0 8E42003C */ lw $v0, 0x3C($s2) /* 65E4 8002B1E4 AE220004 */ sw $v0, 0x4($s1) /* 65E8 8002B1E8 8E420038 */ lw $v0, 0x38($s2) /* 65EC 8002B1EC 8E43003C */ lw $v1, 0x3C($s2) /* 65F0 8002B1F0 000210C0 */ sll $v0, $v0, 3 /* 65F4 8002B1F4 00532021 */ addu $a0, $v0, $s3 /* 65F8 8002B1F8 8C820004 */ lw $v0, 0x4($a0) /* 65FC 8002B1FC 0043102A */ slt $v0, $v0, $v1 /* 6600 8002B200 50400008 */ beql $v0, $zero, .L8002B224 /* 6604 8002B204 26100001 */ addiu $s0, $s0, 0x1 /* 6608 8002B208 AC900000 */ sw $s0, 0x0($a0) /* 660C 8002B20C 8E420038 */ lw $v0, 0x38($s2) /* 6610 8002B210 8E43003C */ lw $v1, 0x3C($s2) /* 6614 8002B214 000210C0 */ sll $v0, $v0, 3 /* 6618 8002B218 00531021 */ addu $v0, $v0, $s3 glabel func_8002B21C /* 661C 8002B21C AC430004 */ sw $v1, 0x4($v0) /* 6620 8002B220 26100001 */ addiu $s0, $s0, 0x1 .L8002B224: /* 6624 8002B224 2A020006 */ slti $v0, $s0, 0x6 /* 6628 8002B228 1440FFE3 */ bnez $v0, .L8002B1B8 /* 662C 8002B22C 26310008 */ addiu $s1, $s1, 0x8 /* 6630 8002B230 3C067FFF */ lui $a2, (0x7FFFFFFF >> 16) /* 6634 8002B234 34C6FFFF */ ori $a2, $a2, (0x7FFFFFFF & 0xFFFF) /* 6638 8002B238 0000202D */ daddu $a0, $zero, $zero /* 663C 8002B23C 3C09800A */ lui $t1, %hi(logicalSaveInfo) /* 6640 8002B240 2529BA30 */ addiu $t1, $t1, %lo(logicalSaveInfo) /* 6644 8002B244 24080004 */ addiu $t0, $zero, 0x4 /* 6648 8002B248 3C07800A */ lui $a3, %hi(nextAvailableSavePage) /* 664C 8002B24C 24E7BA80 */ addiu $a3, $a3, %lo(nextAvailableSavePage) /* 6650 8002B250 3C05800A */ lui $a1, %hi(physicalSaveInfo) /* 6654 8002B254 24A5BA50 */ addiu $a1, $a1, %lo(physicalSaveInfo) .L8002B258: /* 6658 8002B258 0000802D */ daddu $s0, $zero, $zero /* 665C 8002B25C 0120182D */ daddu $v1, $t1, $zero .L8002B260: /* 6660 8002B260 8C620000 */ lw $v0, 0x0($v1) /* 6664 8002B264 10820005 */ beq $a0, $v0, .L8002B27C /* 6668 8002B268 00000000 */ nop /* 666C 8002B26C 26100001 */ addiu $s0, $s0, 0x1 /* 6670 8002B270 2A020004 */ slti $v0, $s0, 0x4 /* 6674 8002B274 1440FFFA */ bnez $v0, .L8002B260 /* 6678 8002B278 24630008 */ addiu $v1, $v1, 0x8 .L8002B27C: /* 667C 8002B27C 56080008 */ bnel $s0, $t0, .L8002B2A0 /* 6680 8002B280 24840001 */ addiu $a0, $a0, 0x1 /* 6684 8002B284 8CA30004 */ lw $v1, 0x4($a1) /* 6688 8002B288 0066102A */ slt $v0, $v1, $a2 glabel func_8002B28C /* 668C 8002B28C 50400004 */ beql $v0, $zero, .L8002B2A0 /* 6690 8002B290 24840001 */ addiu $a0, $a0, 0x1 /* 6694 8002B294 0060302D */ daddu $a2, $v1, $zero /* 6698 8002B298 ACE40000 */ sw $a0, 0x0($a3) /* 669C 8002B29C 24840001 */ addiu $a0, $a0, 0x1 .L8002B2A0: /* 66A0 8002B2A0 28820006 */ slti $v0, $a0, 0x6 /* 66A4 8002B2A4 1440FFEC */ bnez $v0, .L8002B258 /* 66A8 8002B2A8 24A50008 */ addiu $a1, $a1, 0x8 /* 66AC 8002B2AC 8FBF0024 */ lw $ra, 0x24($sp) /* 66B0 8002B2B0 8FB40020 */ lw $s4, 0x20($sp) /* 66B4 8002B2B4 8FB3001C */ lw $s3, 0x1C($sp) /* 66B8 8002B2B8 8FB20018 */ lw $s2, 0x18($sp) /* 66BC 8002B2BC 8FB10014 */ lw $s1, 0x14($sp) /* 66C0 8002B2C0 8FB00010 */ lw $s0, 0x10($sp) /* 66C4 8002B2C4 24020001 */ addiu $v0, $zero, 0x1 /* 66C8 8002B2C8 03E00008 */ jr $ra /* 66CC 8002B2CC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 fio_fetch_saved_file_info(void) { SaveData* buffer = &D_8009A6B0; // temps required to match SaveData* buffer2 = buffer; s32 i, j, savePage; for (i = 0; i < ARRAY_COUNT(logicalSaveInfo); i++) { logicalSaveInfo[i][0] = -1; logicalSaveInfo[i][1] = -1; } for (i = 0; i < ARRAY_COUNT(physicalSaveInfo); i++) { fio_read_flash(i, buffer, sizeof(SaveData)); if (fio_validate_file_checksum(buffer)) { physicalSaveInfo[i][0] = buffer2->saveSlot; physicalSaveInfo[i][1] = buffer2->saveCount; if (logicalSaveInfo[buffer2->saveSlot][1] < buffer2->saveCount) { logicalSaveInfo[buffer2->saveSlot][0] = i; logicalSaveInfo[buffer2->saveSlot][1] = buffer2->saveCount; } } } savePage = 0x7FFFFFFF; for (j = 0; j < ARRAY_COUNT(physicalSaveInfo); j++) { for (i = 0; i < ARRAY_COUNT(logicalSaveInfo); i++) { if (j == logicalSaveInfo[i][0]) { break; } } if (i == ARRAY_COUNT(logicalSaveInfo)) { if (physicalSaveInfo[j][1] < savePage) { savePage = physicalSaveInfo[j][1]; nextAvailableSavePage = j; } } } return TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80117D00 /* AE400 80117D00 27BDFF20 */ addiu $sp, $sp, -0xE0 /* AE404 80117D04 AFBF00DC */ sw $ra, 0xDC($sp) /* AE408 80117D08 AFB600D8 */ sw $s6, 0xD8($sp) /* AE40C 80117D0C AFB500D4 */ sw $s5, 0xD4($sp) /* AE410 80117D10 AFB400D0 */ sw $s4, 0xD0($sp) /* AE414 80117D14 AFB300CC */ sw $s3, 0xCC($sp) /* AE418 80117D18 AFB200C8 */ sw $s2, 0xC8($sp) /* AE41C 80117D1C AFB100C4 */ sw $s1, 0xC4($sp) /* AE420 80117D20 AFB000C0 */ sw $s0, 0xC0($sp) /* AE424 80117D24 8C930008 */ lw $s3, 0x8($a0) /* AE428 80117D28 8E630000 */ lw $v1, 0x0($s3) /* AE42C 80117D2C 24020002 */ addiu $v0, $zero, 0x2 /* AE430 80117D30 10620044 */ beq $v1, $v0, .L80117E44 /* AE434 80117D34 0080802D */ daddu $s0, $a0, $zero /* AE438 80117D38 8E620010 */ lw $v0, 0x10($s3) /* AE43C 80117D3C 10400043 */ beqz $v0, .L80117E4C /* AE440 80117D40 00000000 */ nop /* AE444 80117D44 8C52000C */ lw $s2, 0xC($v0) /* AE448 80117D48 12400040 */ beqz $s2, .L80117E4C /* AE44C 80117D4C 00000000 */ nop /* AE450 80117D50 1A40003E */ blez $s2, .L80117E4C /* AE454 80117D54 0000882D */ daddu $s1, $zero, $zero /* AE458 80117D58 249500B0 */ addiu $s5, $a0, 0xB0 /* AE45C 80117D5C 24160002 */ addiu $s6, $zero, 0x2 /* AE460 80117D60 3C148015 */ lui $s4, %hi(mdl_treeIterPos) /* AE464 80117D64 26943224 */ addiu $s4, $s4, %lo(mdl_treeIterPos) /* AE468 80117D68 27A30010 */ addiu $v1, $sp, 0x10 .L80117D6C: /* AE46C 80117D6C 0200102D */ daddu $v0, $s0, $zero .L80117D70: /* AE470 80117D70 8C460000 */ lw $a2, 0x0($v0) /* AE474 80117D74 8C470004 */ lw $a3, 0x4($v0) /* AE478 80117D78 8C480008 */ lw $t0, 0x8($v0) /* AE47C 80117D7C 8C49000C */ lw $t1, 0xC($v0) /* AE480 80117D80 AC660000 */ sw $a2, 0x0($v1) /* AE484 80117D84 AC670004 */ sw $a3, 0x4($v1) /* AE488 80117D88 AC680008 */ sw $t0, 0x8($v1) /* AE48C 80117D8C AC69000C */ sw $t1, 0xC($v1) /* AE490 80117D90 24420010 */ addiu $v0, $v0, 0x10 /* AE494 80117D94 1455FFF6 */ bne $v0, $s5, .L80117D70 /* AE498 80117D98 24630010 */ addiu $v1, $v1, 0x10 /* AE49C 80117D9C 96020000 */ lhu $v0, 0x0($s0) /* AE4A0 80117DA0 A7A20010 */ sh $v0, 0x10($sp) /* AE4A4 80117DA4 8E020010 */ lw $v0, 0x10($s0) /* AE4A8 80117DA8 AFA20020 */ sw $v0, 0x20($sp) /* AE4AC 80117DAC 8E620010 */ lw $v0, 0x10($s3) /* AE4B0 80117DB0 8C430010 */ lw $v1, 0x10($v0) /* AE4B4 80117DB4 00111080 */ sll $v0, $s1, 2 /* AE4B8 80117DB8 00431021 */ addu $v0, $v0, $v1 /* AE4BC 80117DBC 8C440000 */ lw $a0, 0x0($v0) /* AE4C0 80117DC0 AFA40018 */ sw $a0, 0x18($sp) /* AE4C4 80117DC4 920200A4 */ lbu $v0, 0xA4($s0) /* AE4C8 80117DC8 A3A200B4 */ sb $v0, 0xB4($sp) /* AE4CC 80117DCC 920200A5 */ lbu $v0, 0xA5($s0) /* AE4D0 80117DD0 A3A200B5 */ sb $v0, 0xB5($sp) /* AE4D4 80117DD4 8C820000 */ lw $v0, 0x0($a0) /* AE4D8 80117DD8 14560003 */ bne $v0, $s6, .L80117DE8 /* AE4DC 80117DDC 0000102D */ daddu $v0, $zero, $zero /* AE4E0 80117DE0 0C0456C3 */ jal get_model_property /* AE4E4 80117DE4 2405005C */ addiu $a1, $zero, 0x5C .L80117DE8: /* AE4E8 80117DE8 50400003 */ beql $v0, $zero, .L80117DF8 /* AE4EC 80117DEC A3A000B6 */ sb $zero, 0xB6($sp) /* AE4F0 80117DF0 9042000B */ lbu $v0, 0xB($v0) /* AE4F4 80117DF4 A3A200B6 */ sb $v0, 0xB6($sp) .L80117DF8: /* AE4F8 80117DF8 8E820000 */ lw $v0, 0x0($s4) /* AE4FC 80117DFC 3C03800A */ lui $v1, %hi(mdl_currentModelTreeNodeInfo) /* AE500 80117E00 8C63A5F4 */ lw $v1, %lo(mdl_currentModelTreeNodeInfo)($v1) /* AE504 80117E04 00021080 */ sll $v0, $v0, 2 /* AE508 80117E08 00431021 */ addu $v0, $v0, $v1 /* AE50C 80117E0C 90420002 */ lbu $v0, 0x2($v0) /* AE510 80117E10 27A40010 */ addiu $a0, $sp, 0x10 /* AE514 80117E14 A3A000B9 */ sb $zero, 0xB9($sp) /* AE518 80117E18 0C045F40 */ jal func_80117D00 /* AE51C 80117E1C A3A200B8 */ sb $v0, 0xB8($sp) /* AE520 80117E20 8E820000 */ lw $v0, 0x0($s4) /* AE524 80117E24 26310001 */ addiu $s1, $s1, 0x1 /* AE528 80117E28 24420001 */ addiu $v0, $v0, 0x1 /* AE52C 80117E2C AE820000 */ sw $v0, 0x0($s4) /* AE530 80117E30 0232102A */ slt $v0, $s1, $s2 /* AE534 80117E34 1440FFCD */ bnez $v0, .L80117D6C /* AE538 80117E38 27A30010 */ addiu $v1, $sp, 0x10 /* AE53C 80117E3C 08045F93 */ j .L80117E4C /* AE540 80117E40 00000000 */ nop .L80117E44: /* AE544 80117E44 0C044C24 */ jal appendGfx_model /* AE548 80117E48 0200202D */ daddu $a0, $s0, $zero .L80117E4C: /* AE54C 80117E4C 8FBF00DC */ lw $ra, 0xDC($sp) /* AE550 80117E50 8FB600D8 */ lw $s6, 0xD8($sp) /* AE554 80117E54 8FB500D4 */ lw $s5, 0xD4($sp) /* AE558 80117E58 8FB400D0 */ lw $s4, 0xD0($sp) /* AE55C 80117E5C 8FB300CC */ lw $s3, 0xCC($sp) /* AE560 80117E60 8FB200C8 */ lw $s2, 0xC8($sp) /* AE564 80117E64 8FB100C4 */ lw $s1, 0xC4($sp) /* AE568 80117E68 8FB000C0 */ lw $s0, 0xC0($sp) /* AE56C 80117E6C 03E00008 */ jr $ra /* AE570 80117E70 27BD00E0 */ addiu $sp, $sp, 0xE0 ### DECOMPILED C INSTRUCTIONS: void func_80117D00(Model* model) { Model* mdl = model; // temps needed to match ModelNode* modelNode = mdl->modelNode; if (model->modelNode->type != SHAPE_TYPE_MODEL) { if (modelNode->groupData != NULL) { s32 numChildren = modelNode->groupData->numChildren; if (numChildren != 0) { s32 i; for (i = 0; i < numChildren; i++, mdl_treeIterPos++) { Model newModel = *mdl; ModelNodeProperty* prop; newModel.flags = mdl->flags; newModel.currentSpecialMatrix = mdl->currentSpecialMatrix; newModel.modelNode = modelNode->groupData->childList[i]; newModel.texPannerID = mdl->texPannerID; newModel.customGfxIndex = mdl->customGfxIndex; if (newModel.modelNode->type == SHAPE_TYPE_MODEL) { prop = get_model_property(newModel.modelNode, MODEL_PROP_KEY_RENDER_MODE); } else { prop = NULL; } if (prop != NULL) { newModel.renderMode = prop->data.s; } else { newModel.renderMode = 0; } newModel.textureID = (*mdl_currentModelTreeNodeInfo)[mdl_treeIterPos].textureID; newModel.textureVariation = 0; func_80117D00(&newModel); } } } } else { appendGfx_model(mdl); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel shape_spell_main /* 339250 E0024000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 339254 E0024004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 339258 E0024008 4485A000 */ mtc1 $a1, $f20 /* 33925C E002400C F7B60040 */ sdc1 $f22, 0x40($sp) /* 339260 E0024010 4486B000 */ mtc1 $a2, $f22 /* 339264 E0024014 AFB1002C */ sw $s1, 0x2C($sp) /* 339268 E0024018 0080882D */ daddu $s1, $a0, $zero /* 33926C E002401C F7B80048 */ sdc1 $f24, 0x48($sp) /* 339270 E0024020 4487C000 */ mtc1 $a3, $f24 /* 339274 E0024024 27A40010 */ addiu $a0, $sp, 0x10 /* 339278 E0024028 AFB20030 */ sw $s2, 0x30($sp) /* 33927C E002402C 8FB2006C */ lw $s2, 0x6C($sp) /* 339280 E0024030 3C02E002 */ lui $v0, %hi(shape_spell_init) /* 339284 E0024034 24424180 */ addiu $v0, $v0, %lo(shape_spell_init) /* 339288 E0024038 AFA20018 */ sw $v0, 0x18($sp) /* 33928C E002403C 3C02E002 */ lui $v0, %hi(shape_spell_update) /* 339290 E0024040 24424188 */ addiu $v0, $v0, %lo(shape_spell_update) /* 339294 E0024044 AFA2001C */ sw $v0, 0x1C($sp) /* 339298 E0024048 3C02E002 */ lui $v0, %hi(shape_spell_render) /* 33929C E002404C 244242E0 */ addiu $v0, $v0, %lo(shape_spell_render) /* 3392A0 E0024050 AFA20020 */ sw $v0, 0x20($sp) /* 3392A4 E0024054 24020012 */ addiu $v0, $zero, 0x12 /* 3392A8 E0024058 AFBF0034 */ sw $ra, 0x34($sp) /* 3392AC E002405C AFB00028 */ sw $s0, 0x28($sp) /* 3392B0 E0024060 AFA00010 */ sw $zero, 0x10($sp) /* 3392B4 E0024064 AFA00024 */ sw $zero, 0x24($sp) /* 3392B8 E0024068 0C080124 */ jal shim_create_effect_instance /* 3392BC E002406C AFA20014 */ sw $v0, 0x14($sp) /* 3392C0 E0024070 24040038 */ addiu $a0, $zero, 0x38 /* 3392C4 E0024074 24030001 */ addiu $v1, $zero, 0x1 /* 3392C8 E0024078 0040802D */ daddu $s0, $v0, $zero /* 3392CC E002407C 0C08012C */ jal shim_general_heap_malloc /* 3392D0 E0024080 AE030008 */ sw $v1, 0x8($s0) /* 3392D4 E0024084 0040182D */ daddu $v1, $v0, $zero /* 3392D8 E0024088 14600003 */ bnez $v1, .LE0024098 /* 3392DC E002408C AE02000C */ sw $v0, 0xC($s0) .LE0024090: /* 3392E0 E0024090 08009024 */ j .LE0024090 /* 3392E4 E0024094 00000000 */ nop .LE0024098: /* 3392E8 E0024098 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3392EC E002409C 44810000 */ mtc1 $at, $f0 /* 3392F0 E00240A0 240200FF */ addiu $v0, $zero, 0xFF /* 3392F4 E00240A4 AC60002C */ sw $zero, 0x2C($v1) /* 3392F8 E00240A8 AC710000 */ sw $s1, 0x0($v1) /* 3392FC E00240AC AC620034 */ sw $v0, 0x34($v1) /* 339300 E00240B0 E4740004 */ swc1 $f20, 0x4($v1) /* 339304 E00240B4 E4760008 */ swc1 $f22, 0x8($v1) /* 339308 E00240B8 E478000C */ swc1 $f24, 0xC($v1) /* 33930C E00240BC 16200019 */ bnez $s1, .LE0024124 /* 339310 E00240C0 E4600028 */ swc1 $f0, 0x28($v1) /* 339314 E00240C4 C7A60060 */ lwc1 $f6, 0x60($sp) /* 339318 E00240C8 46143181 */ sub.s $f6, $f6, $f20 /* 33931C E00240CC 44921000 */ mtc1 $s2, $f2 /* 339320 E00240D0 00000000 */ nop /* 339324 E00240D4 468010A0 */ cvt.s.w $f2, $f2 /* 339328 E00240D8 46020083 */ div.s $f2, $f0, $f2 /* 33932C E00240DC 46023182 */ mul.s $f6, $f6, $f2 /* 339330 E00240E0 00000000 */ nop /* 339334 E00240E4 C7A40064 */ lwc1 $f4, 0x64($sp) /* 339338 E00240E8 46162101 */ sub.s $f4, $f4, $f22 /* 33933C E00240EC 46022102 */ mul.s $f4, $f4, $f2 /* 339340 E00240F0 00000000 */ nop /* 339344 E00240F4 C7A00068 */ lwc1 $f0, 0x68($sp) /* 339348 E00240F8 46180001 */ sub.s $f0, $f0, $f24 /* 33934C E00240FC AC600010 */ sw $zero, 0x10($v1) /* 339350 E0024100 AC600014 */ sw $zero, 0x14($v1) /* 339354 E0024104 46020002 */ mul.s $f0, $f0, $f2 /* 339358 E0024108 00000000 */ nop /* 33935C E002410C AC600018 */ sw $zero, 0x18($v1) /* 339360 E0024110 AC720030 */ sw $s2, 0x30($v1) /* 339364 E0024114 E466001C */ swc1 $f6, 0x1C($v1) /* 339368 E0024118 E4640020 */ swc1 $f4, 0x20($v1) /* 33936C E002411C 08009056 */ j .LE0024158 /* 339370 E0024120 E4600024 */ swc1 $f0, 0x24($v1) .LE0024124: /* 339374 E0024124 3C0141E8 */ lui $at, (0x41E80000 >> 16) /* 339378 E0024128 44810000 */ mtc1 $at, $f0 /* 33937C E002412C 3C0140C6 */ lui $at, (0x40C66666 >> 16) /* 339380 E0024130 34216666 */ ori $at, $at, (0x40C66666 & 0xFFFF) /* 339384 E0024134 44811000 */ mtc1 $at, $f2 /* 339388 E0024138 24020018 */ addiu $v0, $zero, 0x18 /* 33938C E002413C AC600014 */ sw $zero, 0x14($v1) /* 339390 E0024140 AC600018 */ sw $zero, 0x18($v1) /* 339394 E0024144 AC600020 */ sw $zero, 0x20($v1) /* 339398 E0024148 AC600024 */ sw $zero, 0x24($v1) /* 33939C E002414C AC620030 */ sw $v0, 0x30($v1) /* 3393A0 E0024150 E4600010 */ swc1 $f0, 0x10($v1) /* 3393A4 E0024154 E462001C */ swc1 $f2, 0x1C($v1) .LE0024158: /* 3393A8 E0024158 0200102D */ daddu $v0, $s0, $zero /* 3393AC E002415C 8FBF0034 */ lw $ra, 0x34($sp) /* 3393B0 E0024160 8FB20030 */ lw $s2, 0x30($sp) /* 3393B4 E0024164 8FB1002C */ lw $s1, 0x2C($sp) /* 3393B8 E0024168 8FB00028 */ lw $s0, 0x28($sp) /* 3393BC E002416C D7B80048 */ ldc1 $f24, 0x48($sp) /* 3393C0 E0024170 D7B60040 */ ldc1 $f22, 0x40($sp) /* 3393C4 E0024174 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3393C8 E0024178 03E00008 */ jr $ra /* 3393CC E002417C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: EffectInstance* shape_spell_main(s32 isChild, f32 x, f32 y, f32 z, f32 arg4, f32 arg5, f32 arg6, s32 arg7) { EffectBlueprint bp; EffectBlueprint* bpPtr = &bp; EffectInstance* effect; ShapeSpellFXData* part; s32 numParts = 1; bp.init = shape_spell_init; bp.update = shape_spell_update; bp.renderWorld = shape_spell_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_SHAPE_SPELL; effect = shim_create_effect_instance(bpPtr); effect->numParts = numParts; part = effect->data.shapeSpell = shim_general_heap_malloc(numParts * sizeof(*part)); ASSERT(effect->data.shapeSpell != NULL); part->unk_2C = 0; part->isChild = isChild; part->unk_34 = 255; part->pos.x = x; part->pos.y = y; part->pos.z = z; part->unk_28 = 1.0f; if (!isChild) { part->unk_10 = 0; part->unk_14 = 0.0f; part->unk_18 = 0.0f; part->timeLeft = arg7; part->unk_1C = (arg4 - x) * (1.0f / arg7); part->unk_20 = (arg5 - y) * (1.0f / arg7); part->unk_24 = (arg6 - z) * (1.0f / arg7); } else { part->unk_10 = 29.f; part->unk_14 = 0.0f; part->unk_18 = 0.0f; part->unk_1C = 6.2f; part->unk_20 = 0.0f; part->unk_24 = 0.0f; part->timeLeft = 24; } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E00D8630 /* 3D6DF0 E00D8630 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 3D6DF4 E00D8634 3C07DB06 */ lui $a3, (0xDB060024 >> 16) /* 3D6DF8 E00D8638 3C06800A */ lui $a2, %hi(gMainGfxPos) /* 3D6DFC E00D863C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* 3D6E00 E00D8640 34E70024 */ ori $a3, $a3, (0xDB060024 & 0xFFFF) /* 3D6E04 E00D8644 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D6E08 E00D8648 AFBF0050 */ sw $ra, 0x50($sp) /* 3D6E0C E00D864C 8CC50000 */ lw $a1, 0x0($a2) /* 3D6E10 E00D8650 8C88000C */ lw $t0, 0xC($a0) /* 3D6E14 E00D8654 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3D6E18 E00D8658 44810000 */ mtc1 $at, $f0 /* 3D6E1C E00D865C 00A0182D */ daddu $v1, $a1, $zero /* 3D6E20 E00D8660 24A50008 */ addiu $a1, $a1, 0x8 /* 3D6E24 E00D8664 AC620000 */ sw $v0, 0x0($v1) /* 3D6E28 E00D8668 AC600004 */ sw $zero, 0x4($v1) /* 3D6E2C E00D866C ACA70000 */ sw $a3, 0x0($a1) /* 3D6E30 E00D8670 8C820010 */ lw $v0, 0x10($a0) /* 3D6E34 E00D8674 24040001 */ addiu $a0, $zero, 0x1 /* 3D6E38 E00D8678 ACC50000 */ sw $a1, 0x0($a2) /* 3D6E3C E00D867C 8C42001C */ lw $v0, 0x1C($v0) /* 3D6E40 E00D8680 3C038000 */ lui $v1, (0x80000000 >> 16) /* 3D6E44 E00D8684 00431021 */ addu $v0, $v0, $v1 /* 3D6E48 E00D8688 ACA20004 */ sw $v0, 0x4($a1) /* 3D6E4C E00D868C C502001C */ lwc1 $f2, 0x1C($t0) /* 3D6E50 E00D8690 24A50008 */ addiu $a1, $a1, 0x8 /* 3D6E54 E00D8694 46001032 */ c.eq.s $f2, $f0 /* 3D6E58 E00D8698 00000000 */ nop /* 3D6E5C E00D869C 45000012 */ bc1f .LE00D86E8 /* 3D6E60 E00D86A0 ACC50000 */ sw $a1, 0x0($a2) /* 3D6E64 E00D86A4 C5000020 */ lwc1 $f0, 0x20($t0) /* 3D6E68 E00D86A8 44801000 */ mtc1 $zero, $f2 /* 3D6E6C E00D86AC 00000000 */ nop /* 3D6E70 E00D86B0 46020032 */ c.eq.s $f0, $f2 /* 3D6E74 E00D86B4 00000000 */ nop /* 3D6E78 E00D86B8 4500000B */ bc1f .LE00D86E8 /* 3D6E7C E00D86BC 00000000 */ nop /* 3D6E80 E00D86C0 C5000024 */ lwc1 $f0, 0x24($t0) /* 3D6E84 E00D86C4 46020032 */ c.eq.s $f0, $f2 /* 3D6E88 E00D86C8 00000000 */ nop /* 3D6E8C E00D86CC 45000006 */ bc1f .LE00D86E8 /* 3D6E90 E00D86D0 00000000 */ nop /* 3D6E94 E00D86D4 C5000028 */ lwc1 $f0, 0x28($t0) /* 3D6E98 E00D86D8 46020032 */ c.eq.s $f0, $f2 /* 3D6E9C E00D86DC 00000000 */ nop /* 3D6EA0 E00D86E0 45030001 */ bc1tl .LE00D86E8 /* 3D6EA4 E00D86E4 0000202D */ daddu $a0, $zero, $zero .LE00D86E8: /* 3D6EA8 E00D86E8 C5040004 */ lwc1 $f4, 0x4($t0) /* 3D6EAC E00D86EC C508002C */ lwc1 $f8, 0x2C($t0) /* 3D6EB0 E00D86F0 C5020008 */ lwc1 $f2, 0x8($t0) /* 3D6EB4 E00D86F4 C50A0030 */ lwc1 $f10, 0x30($t0) /* 3D6EB8 E00D86F8 C500000C */ lwc1 $f0, 0xC($t0) /* 3D6EBC E00D86FC 24020096 */ addiu $v0, $zero, 0x96 /* 3D6EC0 E00D8700 AFA20014 */ sw $v0, 0x14($sp) /* 3D6EC4 E00D8704 2402006B */ addiu $v0, $zero, 0x6B /* 3D6EC8 E00D8708 AFA20018 */ sw $v0, 0x18($sp) /* 3D6ECC E00D870C 240200FF */ addiu $v0, $zero, 0xFF /* 3D6ED0 E00D8710 AFA2001C */ sw $v0, 0x1C($sp) /* 3D6ED4 E00D8714 AFA00020 */ sw $zero, 0x20($sp) /* 3D6ED8 E00D8718 4600030D */ trunc.w.s $f12, $f0 /* 3D6EDC E00D871C E7AC0010 */ swc1 $f12, 0x10($sp) /* 3D6EE0 E00D8720 C500001C */ lwc1 $f0, 0x1C($t0) /* 3D6EE4 E00D8724 E7A00024 */ swc1 $f0, 0x24($sp) /* 3D6EE8 E00D8728 C500001C */ lwc1 $f0, 0x1C($t0) /* 3D6EEC E00D872C 3C02E00E */ lui $v0, %hi(func_E00D8334) /* 3D6EF0 E00D8730 24428334 */ addiu $v0, $v0, %lo(func_E00D8334) /* 3D6EF4 E00D8734 E7A00028 */ swc1 $f0, 0x28($sp) /* 3D6EF8 E00D8738 C5000020 */ lwc1 $f0, 0x20($t0) /* 3D6EFC E00D873C 3C05E00E */ lui $a1, %hi(D_E00D87E0) /* 3D6F00 E00D8740 24A587E0 */ addiu $a1, $a1, %lo(D_E00D87E0) /* 3D6F04 E00D8744 E7A0002C */ swc1 $f0, 0x2C($sp) /* 3D6F08 E00D8748 C5000024 */ lwc1 $f0, 0x24($t0) /* 3D6F0C E00D874C 46082100 */ add.s $f4, $f4, $f8 /* 3D6F10 E00D8750 E7A00030 */ swc1 $f0, 0x30($sp) /* 3D6F14 E00D8754 C5060028 */ lwc1 $f6, 0x28($t0) /* 3D6F18 E00D8758 3C014296 */ lui $at, (0x42960000 >> 16) /* 3D6F1C E00D875C 44810000 */ mtc1 $at, $f0 /* 3D6F20 E00D8760 460A1080 */ add.s $f2, $f2, $f10 /* 3D6F24 E00D8764 AFA20038 */ sw $v0, 0x38($sp) /* 3D6F28 E00D8768 24020140 */ addiu $v0, $zero, 0x140 /* 3D6F2C E00D876C AFA20044 */ sw $v0, 0x44($sp) /* 3D6F30 E00D8770 46002101 */ sub.s $f4, $f4, $f0 /* 3D6F34 E00D8774 3C014254 */ lui $at, (0x42540000 >> 16) /* 3D6F38 E00D8778 44810000 */ mtc1 $at, $f0 /* 3D6F3C E00D877C 240200F0 */ addiu $v0, $zero, 0xF0 /* 3D6F40 E00D8780 AFA8003C */ sw $t0, 0x3C($sp) /* 3D6F44 E00D8784 AFA00040 */ sw $zero, 0x40($sp) /* 3D6F48 E00D8788 AFA20048 */ sw $v0, 0x48($sp) /* 3D6F4C E00D878C AFA0004C */ sw $zero, 0x4C($sp) /* 3D6F50 E00D8790 46001081 */ sub.s $f2, $f2, $f0 /* 3D6F54 E00D8794 4600230D */ trunc.w.s $f12, $f4 /* 3D6F58 E00D8798 44066000 */ mfc1 $a2, $f12 /* 3D6F5C E00D879C 4600130D */ trunc.w.s $f12, $f2 /* 3D6F60 E00D87A0 44076000 */ mfc1 $a3, $f12 /* 3D6F64 E00D87A4 0C080190 */ jal shim_draw_box /* 3D6F68 E00D87A8 E7A60034 */ swc1 $f6, 0x34($sp) /* 3D6F6C E00D87AC 3C03800A */ lui $v1, %hi(gMainGfxPos) /* 3D6F70 E00D87B0 2463A66C */ addiu $v1, $v1, %lo(gMainGfxPos) /* 3D6F74 E00D87B4 8C620000 */ lw $v0, 0x0($v1) /* 3D6F78 E00D87B8 0040202D */ daddu $a0, $v0, $zero /* 3D6F7C E00D87BC 24420008 */ addiu $v0, $v0, 0x8 /* 3D6F80 E00D87C0 AC620000 */ sw $v0, 0x0($v1) /* 3D6F84 E00D87C4 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* 3D6F88 E00D87C8 AC820000 */ sw $v0, 0x0($a0) /* 3D6F8C E00D87CC AC800004 */ sw $zero, 0x4($a0) /* 3D6F90 E00D87D0 8FBF0050 */ lw $ra, 0x50($sp) /* 3D6F94 E00D87D4 03E00008 */ jr $ra /* 3D6F98 E00D87D8 27BD0058 */ addiu $sp, $sp, 0x58 /* 3D6F9C E00D87DC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_E00D8630(EffectInstance* effect) { TattleWindowFXData* data = effect->data.tattleWindow; s32 flags; gDPPipeSync(gMainGfxPos++); gSPSegment(gMainGfxPos++, 0x09, VIRTUAL_TO_PHYSICAL(((EffectInstance*)effect)->graphics->data)); if (data->scale == 1.0f && data->rot.x == 0.0f && data->rot.y == 0.0f && data->rot.z == 0.0f) { flags = 0; } else { flags = 1; } shim_draw_box( flags, &D_E00D87E0, (data->pos.x + data->offset.x) - 75.0f, (data->pos.y + data->offset.y) - 53.0f, data->pos.z, 150, 107, 255, 0, data->scale, data->scale, data->rot.x, data->rot.y, data->rot.z, (void (*)(void*)) func_E00D8334, data, NULL, SCREEN_WIDTH, SCREEN_HEIGHT, NULL); gDPPipeSync(gMainGfxPos++); }
### RAW ASSEMBLY INSTRUCTIONS: glabel stars_spread_update /* 3604BC E005A1FC 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 3604C0 E005A200 AFBF0010 */ sw $ra, 0x10($sp) /* 3604C4 E005A204 8C85000C */ lw $a1, 0xC($a0) /* 3604C8 E005A208 8CA20028 */ lw $v0, 0x28($a1) /* 3604CC E005A20C 8CA30024 */ lw $v1, 0x24($a1) /* 3604D0 E005A210 24420001 */ addiu $v0, $v0, 0x1 /* 3604D4 E005A214 2463FFFF */ addiu $v1, $v1, -0x1 /* 3604D8 E005A218 ACA20028 */ sw $v0, 0x28($a1) /* 3604DC E005A21C 04610005 */ bgez $v1, .LE005A234 /* 3604E0 E005A220 ACA30024 */ sw $v1, 0x24($a1) /* 3604E4 E005A224 0C080128 */ jal shim_remove_effect /* 3604E8 E005A228 00000000 */ nop /* 3604EC E005A22C 080168E9 */ j .LE005A3A4 /* 3604F0 E005A230 00000000 */ nop .LE005A234: /* 3604F4 E005A234 8CA7002C */ lw $a3, 0x2C($a1) /* 3604F8 E005A238 8C820008 */ lw $v0, 0x8($a0) /* 3604FC E005A23C 24060001 */ addiu $a2, $zero, 0x1 /* 360500 E005A240 00C2102A */ slt $v0, $a2, $v0 /* 360504 E005A244 10400057 */ beqz $v0, .LE005A3A4 /* 360508 E005A248 24A50034 */ addiu $a1, $a1, 0x34 /* 36050C E005A24C 28690006 */ slti $t1, $v1, 0x6 /* 360510 E005A250 28680005 */ slti $t0, $v1, 0x5 /* 360514 E005A254 00C31004 */ sllv $v0, $v1, $a2 /* 360518 E005A258 0047382A */ slt $a3, $v0, $a3 /* 36051C E005A25C 24A3001C */ addiu $v1, $a1, 0x1C /* 360520 E005A260 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 360524 E005A264 D428A750 */ ldc1 $f8, -0x58B0($at) /* 360528 E005A268 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 36052C E005A26C D42AA758 */ ldc1 $f10, -0x58A8($at) /* 360530 E005A270 3C01E006 */ lui $at, (0xE0060000 >> 16) /* 360534 E005A274 D42CA760 */ ldc1 $f12, -0x58A0($at) .LE005A278: /* 360538 E005A278 15200013 */ bnez $t1, .LE005A2C8 /* 36053C E005A27C 00000000 */ nop /* 360540 E005A280 C464FFF4 */ lwc1 $f4, -0xC($v1) /* 360544 E005A284 46002121 */ cvt.d.s $f4, $f4 /* 360548 E005A288 46282102 */ mul.d $f4, $f4, $f8 /* 36054C E005A28C 00000000 */ nop /* 360550 E005A290 C462FFF8 */ lwc1 $f2, -0x8($v1) /* 360554 E005A294 460010A1 */ cvt.d.s $f2, $f2 /* 360558 E005A298 46281082 */ mul.d $f2, $f2, $f8 /* 36055C E005A29C 00000000 */ nop /* 360560 E005A2A0 C460FFFC */ lwc1 $f0, -0x4($v1) /* 360564 E005A2A4 46000021 */ cvt.d.s $f0, $f0 /* 360568 E005A2A8 46280002 */ mul.d $f0, $f0, $f8 /* 36056C E005A2AC 00000000 */ nop /* 360570 E005A2B0 46202120 */ cvt.s.d $f4, $f4 /* 360574 E005A2B4 462010A0 */ cvt.s.d $f2, $f2 /* 360578 E005A2B8 46200020 */ cvt.s.d $f0, $f0 /* 36057C E005A2BC E464FFF4 */ swc1 $f4, -0xC($v1) /* 360580 E005A2C0 E462FFF8 */ swc1 $f2, -0x8($v1) /* 360584 E005A2C4 E460FFFC */ swc1 $f0, -0x4($v1) .LE005A2C8: /* 360588 E005A2C8 11000019 */ beqz $t0, .LE005A330 /* 36058C E005A2CC 00000000 */ nop /* 360590 E005A2D0 C4660004 */ lwc1 $f6, 0x4($v1) /* 360594 E005A2D4 460031A1 */ cvt.d.s $f6, $f6 /* 360598 E005A2D8 46283182 */ mul.d $f6, $f6, $f8 /* 36059C E005A2DC 00000000 */ nop /* 3605A0 E005A2E0 C464FFF4 */ lwc1 $f4, -0xC($v1) /* 3605A4 E005A2E4 46002121 */ cvt.d.s $f4, $f4 /* 3605A8 E005A2E8 462A2102 */ mul.d $f4, $f4, $f10 /* 3605AC E005A2EC 00000000 */ nop /* 3605B0 E005A2F0 C462FFF8 */ lwc1 $f2, -0x8($v1) /* 3605B4 E005A2F4 460010A1 */ cvt.d.s $f2, $f2 /* 3605B8 E005A2F8 462A1082 */ mul.d $f2, $f2, $f10 /* 3605BC E005A2FC 00000000 */ nop /* 3605C0 E005A300 C460FFFC */ lwc1 $f0, -0x4($v1) /* 3605C4 E005A304 46000021 */ cvt.d.s $f0, $f0 /* 3605C8 E005A308 462A0002 */ mul.d $f0, $f0, $f10 /* 3605CC E005A30C 00000000 */ nop /* 3605D0 E005A310 462031A0 */ cvt.s.d $f6, $f6 /* 3605D4 E005A314 46202120 */ cvt.s.d $f4, $f4 /* 3605D8 E005A318 462010A0 */ cvt.s.d $f2, $f2 /* 3605DC E005A31C 46200020 */ cvt.s.d $f0, $f0 /* 3605E0 E005A320 E4660004 */ swc1 $f6, 0x4($v1) /* 3605E4 E005A324 E464FFF4 */ swc1 $f4, -0xC($v1) /* 3605E8 E005A328 E462FFF8 */ swc1 $f2, -0x8($v1) /* 3605EC E005A32C E460FFFC */ swc1 $f0, -0x4($v1) .LE005A330: /* 3605F0 E005A330 10E0000A */ beqz $a3, .LE005A35C /* 3605F4 E005A334 00000000 */ nop /* 3605F8 E005A338 C4600014 */ lwc1 $f0, 0x14($v1) /* 3605FC E005A33C 46000087 */ neg.s $f2, $f0 /* 360600 E005A340 460010A1 */ cvt.d.s $f2, $f2 /* 360604 E005A344 462C1082 */ mul.d $f2, $f2, $f12 /* 360608 E005A348 00000000 */ nop /* 36060C E005A34C 46000021 */ cvt.d.s $f0, $f0 /* 360610 E005A350 46220000 */ add.d $f0, $f0, $f2 /* 360614 E005A354 46200020 */ cvt.s.d $f0, $f0 /* 360618 E005A358 E4600014 */ swc1 $f0, 0x14($v1) .LE005A35C: /* 36061C E005A35C C466FFE8 */ lwc1 $f6, -0x18($v1) /* 360620 E005A360 C460FFF4 */ lwc1 $f0, -0xC($v1) /* 360624 E005A364 C462FFEC */ lwc1 $f2, -0x14($v1) /* 360628 E005A368 46003180 */ add.s $f6, $f6, $f0 /* 36062C E005A36C C460FFF8 */ lwc1 $f0, -0x8($v1) /* 360630 E005A370 C4640004 */ lwc1 $f4, 0x4($v1) /* 360634 E005A374 46001080 */ add.s $f2, $f2, $f0 /* 360638 E005A378 C4600000 */ lwc1 $f0, 0x0($v1) /* 36063C E005A37C 24C60001 */ addiu $a2, $a2, 0x1 /* 360640 E005A380 AC60FFF0 */ sw $zero, -0x10($v1) /* 360644 E005A384 46040000 */ add.s $f0, $f0, $f4 /* 360648 E005A388 E466FFE8 */ swc1 $f6, -0x18($v1) /* 36064C E005A38C E462FFEC */ swc1 $f2, -0x14($v1) /* 360650 E005A390 E4600000 */ swc1 $f0, 0x0($v1) /* 360654 E005A394 8C820008 */ lw $v0, 0x8($a0) /* 360658 E005A398 00C2102A */ slt $v0, $a2, $v0 /* 36065C E005A39C 1440FFB6 */ bnez $v0, .LE005A278 /* 360660 E005A3A0 24630034 */ addiu $v1, $v1, 0x34 .LE005A3A4: /* 360664 E005A3A4 8FBF0010 */ lw $ra, 0x10($sp) /* 360668 E005A3A8 03E00008 */ jr $ra /* 36066C E005A3AC 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void stars_spread_update(EffectInstance* effect) { StarsSpreadFXData* part = effect->data.starsSpread; s32 unk_24; s32 unk_2C; s32 i; part->unk_28++; part->unk_24--; if (part->unk_24 < 0) { shim_remove_effect(effect); return; } unk_24 = part->unk_24; unk_2C = part->unk_2C; part++; for (i = 1; i < effect->numParts; i++, part++) { if (unk_24 >= 6) { part->unk_10 *= 0.8; part->unk_14 *= 0.8; part->unk_18 *= 0.8; } if (unk_24 < 5) { part->unk_20 *= 0.8; part->unk_10 *= 0.7; part->unk_14 *= 0.7; part->unk_18 *= 0.7; } if (unk_24 * 2 < unk_2C) { part->unk_30 += -part->unk_30 * 0.2; } part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; part->unk_0C = 0; part->unk_1C += part->unk_20; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel virtual_entity_appendGfx_quad /* F76E0 802D2D30 27BDFFF8 */ addiu $sp, $sp, -0x8 /* F76E4 802D2D34 0080602D */ daddu $t4, $a0, $zero /* F76E8 802D2D38 00A0682D */ daddu $t5, $a1, $zero /* F76EC 802D2D3C 00E0582D */ daddu $t3, $a3, $zero /* F76F0 802D2D40 3C08800A */ lui $t0, %hi(gMainGfxPos) /* F76F4 802D2D44 2508A66C */ addiu $t0, $t0, %lo(gMainGfxPos) /* F76F8 802D2D48 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* F76FC 802D2D4C AFB00000 */ sw $s0, 0x0($sp) /* F7700 802D2D50 8D070000 */ lw $a3, 0x0($t0) /* F7704 802D2D54 97B9001A */ lhu $t9, 0x1A($sp) /* F7708 802D2D58 97B0001E */ lhu $s0, 0x1E($sp) /* F770C 802D2D5C 97AF0022 */ lhu $t7, 0x22($sp) /* F7710 802D2D60 97B80026 */ lhu $t8, 0x26($sp) /* F7714 802D2D64 00E0182D */ daddu $v1, $a3, $zero /* F7718 802D2D68 24E70008 */ addiu $a3, $a3, 0x8 /* F771C 802D2D6C AD070000 */ sw $a3, 0x0($t0) /* F7720 802D2D70 AC620000 */ sw $v0, 0x0($v1) /* F7724 802D2D74 AC600004 */ sw $zero, 0x4($v1) /* F7728 802D2D78 316300FF */ andi $v1, $t3, 0xFF /* F772C 802D2D7C 240200FF */ addiu $v0, $zero, 0xFF /* F7730 802D2D80 1462000A */ bne $v1, $v0, .L802D2DAC /* F7734 802D2D84 00C0702D */ daddu $t6, $a2, $zero /* F7738 802D2D88 3C04FCFF */ lui $a0, (0xFCFFFFFF >> 16) /* F773C 802D2D8C 3484FFFF */ ori $a0, $a0, (0xFCFFFFFF & 0xFFFF) /* F7740 802D2D90 3C03FFFD */ lui $v1, (0xFFFDFCFE >> 16) /* F7744 802D2D94 3463FCFE */ ori $v1, $v1, (0xFFFDFCFE & 0xFFFF) /* F7748 802D2D98 24E20008 */ addiu $v0, $a3, 0x8 /* F774C 802D2D9C AD020000 */ sw $v0, 0x0($t0) /* F7750 802D2DA0 ACE40000 */ sw $a0, 0x0($a3) /* F7754 802D2DA4 080B4B7B */ j .L802D2DEC /* F7758 802D2DA8 ACE30004 */ sw $v1, 0x4($a3) .L802D2DAC: /* F775C 802D2DAC 3C05E200 */ lui $a1, (0xE200001C >> 16) /* F7760 802D2DB0 34A5001C */ ori $a1, $a1, (0xE200001C & 0xFFFF) /* F7764 802D2DB4 3C030050 */ lui $v1, (0x504240 >> 16) /* F7768 802D2DB8 34634240 */ ori $v1, $v1, (0x504240 & 0xFFFF) /* F776C 802D2DBC 3C06FCFF */ lui $a2, (0xFCFFFFFF >> 16) /* F7770 802D2DC0 34C6FFFF */ ori $a2, $a2, (0xFCFFFFFF & 0xFFFF) /* F7774 802D2DC4 3C04FFFD */ lui $a0, (0xFFFDF6FB >> 16) /* F7778 802D2DC8 3484F6FB */ ori $a0, $a0, (0xFFFDF6FB & 0xFFFF) /* F777C 802D2DCC 24E20008 */ addiu $v0, $a3, 0x8 /* F7780 802D2DD0 AD020000 */ sw $v0, 0x0($t0) /* F7784 802D2DD4 24E20010 */ addiu $v0, $a3, 0x10 /* F7788 802D2DD8 ACE50000 */ sw $a1, 0x0($a3) /* F778C 802D2DDC ACE30004 */ sw $v1, 0x4($a3) /* F7790 802D2DE0 AD020000 */ sw $v0, 0x0($t0) /* F7794 802D2DE4 ACE60008 */ sw $a2, 0x8($a3) /* F7798 802D2DE8 ACE4000C */ sw $a0, 0xC($a3) .L802D2DEC: /* F779C 802D2DEC 3C09E200 */ lui $t1, (0xE200001C >> 16) /* F77A0 802D2DF0 3529001C */ ori $t1, $t1, (0xE200001C & 0xFFFF) /* F77A4 802D2DF4 3C070F0A */ lui $a3, (0xF0A7008 >> 16) /* F77A8 802D2DF8 34E77008 */ ori $a3, $a3, (0xF0A7008 & 0xFFFF) /* F77AC 802D2DFC 3C0AFCFF */ lui $t2, (0xFCFFFFFF >> 16) /* F77B0 802D2E00 354AFFFF */ ori $t2, $t2, (0xFCFFFFFF & 0xFFFF) /* F77B4 802D2E04 3C08FFFC */ lui $t0, (0xFFFCF279 >> 16) /* F77B8 802D2E08 3C06800A */ lui $a2, %hi(gMainGfxPos) /* F77BC 802D2E0C 24C6A66C */ addiu $a2, $a2, %lo(gMainGfxPos) /* F77C0 802D2E10 3508F279 */ ori $t0, $t0, (0xFFFCF279 & 0xFFFF) /* F77C4 802D2E14 3C02FA00 */ lui $v0, (0xFA000000 >> 16) /* F77C8 802D2E18 8CC50000 */ lw $a1, 0x0($a2) /* F77CC 802D2E1C 000C1E00 */ sll $v1, $t4, 24 /* F77D0 802D2E20 00A0202D */ daddu $a0, $a1, $zero /* F77D4 802D2E24 24A50008 */ addiu $a1, $a1, 0x8 /* F77D8 802D2E28 ACC50000 */ sw $a1, 0x0($a2) /* F77DC 802D2E2C AC820000 */ sw $v0, 0x0($a0) /* F77E0 802D2E30 31A200FF */ andi $v0, $t5, 0xFF /* F77E4 802D2E34 00021400 */ sll $v0, $v0, 16 /* F77E8 802D2E38 00621825 */ or $v1, $v1, $v0 /* F77EC 802D2E3C 31C200FF */ andi $v0, $t6, 0xFF /* F77F0 802D2E40 00021200 */ sll $v0, $v0, 8 /* F77F4 802D2E44 00621825 */ or $v1, $v1, $v0 /* F77F8 802D2E48 316200FF */ andi $v0, $t3, 0xFF /* F77FC 802D2E4C 00621825 */ or $v1, $v1, $v0 /* F7800 802D2E50 24A20008 */ addiu $v0, $a1, 0x8 /* F7804 802D2E54 AC830004 */ sw $v1, 0x4($a0) /* F7808 802D2E58 31E403FF */ andi $a0, $t7, 0x3FF /* F780C 802D2E5C 00042380 */ sll $a0, $a0, 14 /* F7810 802D2E60 ACC20000 */ sw $v0, 0x0($a2) /* F7814 802D2E64 330203FF */ andi $v0, $t8, 0x3FF /* F7818 802D2E68 00021080 */ sll $v0, $v0, 2 /* F781C 802D2E6C 3C03F600 */ lui $v1, (0xF6000000 >> 16) /* F7820 802D2E70 00431025 */ or $v0, $v0, $v1 /* F7824 802D2E74 00822025 */ or $a0, $a0, $v0 /* F7828 802D2E78 332303FF */ andi $v1, $t9, 0x3FF /* F782C 802D2E7C 00031B80 */ sll $v1, $v1, 14 /* F7830 802D2E80 320203FF */ andi $v0, $s0, 0x3FF /* F7834 802D2E84 00021080 */ sll $v0, $v0, 2 /* F7838 802D2E88 00621825 */ or $v1, $v1, $v0 /* F783C 802D2E8C 24A20010 */ addiu $v0, $a1, 0x10 /* F7840 802D2E90 ACA40000 */ sw $a0, 0x0($a1) /* F7844 802D2E94 ACA30004 */ sw $v1, 0x4($a1) /* F7848 802D2E98 ACC20000 */ sw $v0, 0x0($a2) /* F784C 802D2E9C 3C02E700 */ lui $v0, (0xE7000000 >> 16) /* F7850 802D2EA0 ACA20008 */ sw $v0, 0x8($a1) /* F7854 802D2EA4 24A20018 */ addiu $v0, $a1, 0x18 /* F7858 802D2EA8 ACA0000C */ sw $zero, 0xC($a1) /* F785C 802D2EAC ACC20000 */ sw $v0, 0x0($a2) /* F7860 802D2EB0 24A20020 */ addiu $v0, $a1, 0x20 /* F7864 802D2EB4 ACA90010 */ sw $t1, 0x10($a1) /* F7868 802D2EB8 ACA70014 */ sw $a3, 0x14($a1) /* F786C 802D2EBC ACC20000 */ sw $v0, 0x0($a2) /* F7870 802D2EC0 ACAA0018 */ sw $t2, 0x18($a1) /* F7874 802D2EC4 ACA8001C */ sw $t0, 0x1C($a1) /* F7878 802D2EC8 8FB00000 */ lw $s0, 0x0($sp) /* F787C 802D2ECC 03E00008 */ jr $ra /* F7880 802D2ED0 27BD0008 */ addiu $sp, $sp, 0x8 ### DECOMPILED C INSTRUCTIONS: void virtual_entity_appendGfx_quad(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) { gDPPipeSync(gMainGfxPos++); if (a == 0xFF) { 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++, left, top, right, bottom); gDPPipeSync(gMainGfxPos++); gDPSetRenderMode(gMainGfxPos++, G_RM_TEX_EDGE, G_RM_TEX_EDGE2); gDPSetCombineMode(gMainGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_Chest_close /* 108CAC 802E742C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 108CB0 802E7430 AFBF0014 */ sw $ra, 0x14($sp) /* 108CB4 802E7434 AFB00010 */ sw $s0, 0x10($sp) /* 108CB8 802E7438 8C900040 */ lw $s0, 0x40($a0) /* 108CBC 802E743C 92030004 */ lbu $v1, 0x4($s0) /* 108CC0 802E7440 2C620005 */ sltiu $v0, $v1, 0x5 /* 108CC4 802E7444 1040005A */ beqz $v0, .L802E75B0 /* 108CC8 802E7448 00031080 */ sll $v0, $v1, 2 /* 108CCC 802E744C 3C01802F */ lui $at, %hi(jtbl_802EB308) /* 108CD0 802E7450 00220821 */ addu $at, $at, $v0 /* 108CD4 802E7454 8C22B308 */ lw $v0, %lo(jtbl_802EB308)($at) /* 108CD8 802E7458 00400008 */ jr $v0 /* 108CDC 802E745C 00000000 */ nop glabel .L802E7460 /* 108CE0 802E7460 92020004 */ lbu $v0, 0x4($s0) /* 108CE4 802E7464 AE00000C */ sw $zero, 0xC($s0) /* 108CE8 802E7468 24420001 */ addiu $v0, $v0, 0x1 /* 108CEC 802E746C A2020004 */ sb $v0, 0x4($s0) glabel .L802E7470 /* 108CF0 802E7470 C600000C */ lwc1 $f0, 0xC($s0) /* 108CF4 802E7474 3C0140A0 */ lui $at, (0x40A00000 >> 16) /* 108CF8 802E7478 44811000 */ mtc1 $at, $f2 /* 108CFC 802E747C 00000000 */ nop /* 108D00 802E7480 46020000 */ add.s $f0, $f0, $f2 /* 108D04 802E7484 3C014334 */ lui $at, (0x43340000 >> 16) /* 108D08 802E7488 44811000 */ mtc1 $at, $f2 /* 108D0C 802E748C 00000000 */ nop /* 108D10 802E7490 4600103E */ c.le.s $f2, $f0 /* 108D14 802E7494 00000000 */ nop /* 108D18 802E7498 45000005 */ bc1f .L802E74B0 /* 108D1C 802E749C E600000C */ swc1 $f0, 0xC($s0) /* 108D20 802E74A0 92020004 */ lbu $v0, 0x4($s0) /* 108D24 802E74A4 E602000C */ swc1 $f2, 0xC($s0) /* 108D28 802E74A8 24420001 */ addiu $v0, $v0, 0x1 /* 108D2C 802E74AC A2020004 */ sb $v0, 0x4($s0) .L802E74B0: /* 108D30 802E74B0 C60C000C */ lwc1 $f12, 0xC($s0) /* 108D34 802E74B4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 108D38 802E74B8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 108D3C 802E74BC 44810000 */ mtc1 $at, $f0 /* 108D40 802E74C0 00000000 */ nop /* 108D44 802E74C4 46006302 */ mul.s $f12, $f12, $f0 /* 108D48 802E74C8 00000000 */ nop /* 108D4C 802E74CC 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 108D50 802E74D0 44810000 */ mtc1 $at, $f0 /* 108D54 802E74D4 0C00A85B */ jal sin_rad /* 108D58 802E74D8 46006303 */ div.s $f12, $f12, $f0 /* 108D5C 802E74DC 3C014026 */ lui $at, (0x40266666 >> 16) /* 108D60 802E74E0 34216666 */ ori $at, $at, (0x40266666 & 0xFFFF) /* 108D64 802E74E4 44811000 */ mtc1 $at, $f2 /* 108D68 802E74E8 00000000 */ nop /* 108D6C 802E74EC 46020082 */ mul.s $f2, $f0, $f2 /* 108D70 802E74F0 080B9D5C */ j .L802E7570 /* 108D74 802E74F4 00000000 */ nop glabel .L802E74F8 /* 108D78 802E74F8 C600000C */ lwc1 $f0, 0xC($s0) /* 108D7C 802E74FC 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 108D80 802E7500 44811000 */ mtc1 $at, $f2 /* 108D84 802E7504 00000000 */ nop /* 108D88 802E7508 46020000 */ add.s $f0, $f0, $f2 /* 108D8C 802E750C 3C014339 */ lui $at, (0x43390000 >> 16) /* 108D90 802E7510 44811000 */ mtc1 $at, $f2 /* 108D94 802E7514 00000000 */ nop /* 108D98 802E7518 4600103E */ c.le.s $f2, $f0 /* 108D9C 802E751C 00000000 */ nop /* 108DA0 802E7520 45000007 */ bc1f .L802E7540 /* 108DA4 802E7524 E600000C */ swc1 $f0, 0xC($s0) /* 108DA8 802E7528 92020004 */ lbu $v0, 0x4($s0) /* 108DAC 802E752C 2403000A */ addiu $v1, $zero, 0xA /* 108DB0 802E7530 E602000C */ swc1 $f2, 0xC($s0) /* 108DB4 802E7534 A2030006 */ sb $v1, 0x6($s0) /* 108DB8 802E7538 24420001 */ addiu $v0, $v0, 0x1 /* 108DBC 802E753C A2020004 */ sb $v0, 0x4($s0) .L802E7540: /* 108DC0 802E7540 C60C000C */ lwc1 $f12, 0xC($s0) /* 108DC4 802E7544 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 108DC8 802E7548 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 108DCC 802E754C 44810000 */ mtc1 $at, $f0 /* 108DD0 802E7550 00000000 */ nop /* 108DD4 802E7554 46006302 */ mul.s $f12, $f12, $f0 /* 108DD8 802E7558 00000000 */ nop /* 108DDC 802E755C 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 108DE0 802E7560 44810000 */ mtc1 $at, $f0 /* 108DE4 802E7564 0C00A85B */ jal sin_rad /* 108DE8 802E7568 46006303 */ div.s $f12, $f12, $f0 /* 108DEC 802E756C 46000080 */ add.s $f2, $f0, $f0 .L802E7570: /* 108DF0 802E7570 C6000008 */ lwc1 $f0, 0x8($s0) /* 108DF4 802E7574 46020000 */ add.s $f0, $f0, $f2 /* 108DF8 802E7578 080B9D6C */ j .L802E75B0 /* 108DFC 802E757C E6000008 */ swc1 $f0, 0x8($s0) glabel .L802E7580 /* 108E00 802E7580 92020006 */ lbu $v0, 0x6($s0) /* 108E04 802E7584 2442FFFF */ addiu $v0, $v0, -0x1 /* 108E08 802E7588 A2020006 */ sb $v0, 0x6($s0) /* 108E0C 802E758C 00021600 */ sll $v0, $v0, 24 /* 108E10 802E7590 14400007 */ bnez $v0, .L802E75B0 /* 108E14 802E7594 00000000 */ nop /* 108E18 802E7598 92020004 */ lbu $v0, 0x4($s0) /* 108E1C 802E759C 24420001 */ addiu $v0, $v0, 0x1 /* 108E20 802E75A0 A2020004 */ sb $v0, 0x4($s0) /* 108E24 802E75A4 8C820000 */ lw $v0, 0x0($a0) /* 108E28 802E75A8 34424000 */ ori $v0, $v0, 0x4000 /* 108E2C 802E75AC AC820000 */ sw $v0, 0x0($a0) glabel .L802E75B0 /* 108E30 802E75B0 8FBF0014 */ lw $ra, 0x14($sp) /* 108E34 802E75B4 8FB00010 */ lw $s0, 0x10($sp) /* 108E38 802E75B8 03E00008 */ jr $ra /* 108E3C 802E75BC 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void entity_Chest_close(Entity* entity) { ChestData* data = entity->dataBuf.chest; f32 delta; switch (data->state) { case 0: data->lidAnimInterpPhase = 0.0f; data->state++; // fallthrough case 1: data->lidAnimInterpPhase += 5.0f; if (data->lidAnimInterpPhase >= 180.0f) { data->lidAnimInterpPhase = 180.0f; data->state++; } delta = 2.6f * sin_rad(DEG_TO_RAD(data->lidAnimInterpPhase)); data->lidAngle += delta; break; case 2: data->lidAnimInterpPhase += 1.0f; if (data->lidAnimInterpPhase >= 185.0f) { data->lidAnimInterpPhase = 185.0f; data->postLidAnimDelay = 10; data->state++; } delta = 2.0f * sin_rad(DEG_TO_RAD(data->lidAnimInterpPhase)); data->lidAngle += delta; break; case 3: data->postLidAnimDelay--; if (data->postLidAnimDelay == 0) { data->state++; entity->flags |= ENTITY_FLAG_4000; } break; case 4: break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel action_update_peach_step_down_land /* E24D6C 802B644C 27BDFFD8 */ addiu $sp, $sp, -0x28 .L802B6450: /* E24D70 802B6450 3C058016 */ lui $a1, %hi(gCollisionStatus) .L802B6454: /* E24D74 802B6454 24A5A550 */ addiu $a1, $a1, %lo(gCollisionStatus) /* E24D78 802B6458 AFB00018 */ sw $s0, 0x18($sp) /* E24D7C 802B645C 3C108011 */ lui $s0, %hi(gPlayerStatus) .L802B6460: /* E24D80 802B6460 2610EFC8 */ addiu $s0, $s0, %lo(gPlayerStatus) .L802B6464: /* E24D84 802B6464 AFBF0020 */ sw $ra, 0x20($sp) /* E24D88 802B6468 AFB1001C */ sw $s1, 0x1C($sp) glabel .L802B646C /* E24D8C 802B646C 8E020000 */ lw $v0, 0x0($s0) /* E24D90 802B6470 04410016 */ bgez $v0, .L802B64CC /* E24D94 802B6474 00A0882D */ daddu $s1, $a1, $zero glabel action_update_raise_arms /* E24D98 802B6478 3C037FFF */ lui $v1, (0x7FFFFFFF >> 16) glabel action_update_peach_falling /* E24D9C 802B647C 3463FFFF */ ori $v1, $v1, (0x7FFFFFFF & 0xFFFF) /* E24DA0 802B6480 00431824 */ and $v1, $v0, $v1 /* E24DA4 802B6484 C6000028 */ lwc1 $f0, 0x28($s0) /* E24DA8 802B6488 C6020030 */ lwc1 $f2, 0x30($s0) .L802B648C: /* E24DAC 802B648C 2404FFF1 */ addiu $a0, $zero, -0xF .L802B6490: /* E24DB0 802B6490 AE030000 */ sw $v1, 0x0($s0) .L802B6494: /* E24DB4 802B6494 A20000B6 */ sb $zero, 0xB6($s0) /* E24DB8 802B6498 A60000C0 */ sh $zero, 0xC0($s0) /* E24DBC 802B649C A60000C2 */ sh $zero, 0xC2($s0) .L802B64A0: /* E24DC0 802B64A0 94A20002 */ lhu $v0, 0x2($a1) /* E24DC4 802B64A4 00641824 */ and $v1, $v1, $a0 glabel .L802B64A8 /* E24DC8 802B64A8 AE030000 */ sw $v1, 0x0($s0) .L802B64AC: /* E24DCC 802B64AC 30424000 */ andi $v0, $v0, 0x4000 /* E24DD0 802B64B0 E6000044 */ swc1 $f0, 0x44($s0) .L802B64B4: /* E24DD4 802B64B4 14400003 */ bnez $v0, .L802B64C4 /* E24DD8 802B64B8 E6020048 */ swc1 $f2, 0x48($s0) /* E24DDC 802B64BC 0C03954C */ jal phys_adjust_cam_on_landing /* E24DE0 802B64C0 00000000 */ nop .L802B64C4: /* E24DE4 802B64C4 2402FFFF */ addiu $v0, $zero, -0x1 /* E24DE8 802B64C8 A6220004 */ sh $v0, 0x4($s1) .L802B64CC: /* E24DEC 802B64CC C6020054 */ lwc1 $f2, 0x54($s0) .L802B64D0: /* E24DF0 802B64D0 3C013F19 */ lui $at, (0x3F19999A >> 16) .L802B64D4: /* E24DF4 802B64D4 3421999A */ ori $at, $at, (0x3F19999A & 0xFFFF) .L802B64D8: /* E24DF8 802B64D8 44810000 */ mtc1 $at, $f0 glabel .L802B64DC /* E24DFC 802B64DC 27A40010 */ addiu $a0, $sp, 0x10 glabel .L802B64E0 /* E24E00 802B64E0 46001082 */ mul.s $f2, $f2, $f0 /* E24E04 802B64E4 00000000 */ nop /* E24E08 802B64E8 920200B6 */ lbu $v0, 0xB6($s0) .L802B64EC: /* E24E0C 802B64EC 27A50014 */ addiu $a1, $sp, 0x14 glabel .L802B64F0 /* E24E10 802B64F0 24420001 */ addiu $v0, $v0, 0x1 /* E24E14 802B64F4 A20200B6 */ sb $v0, 0xB6($s0) .L802B64F8: /* E24E18 802B64F8 0C0388C1 */ jal player_input_to_move_vector /* E24E1C 802B64FC E6020054 */ swc1 $f2, 0x54($s0) /* E24E20 802B6500 C7A20014 */ lwc1 $f2, 0x14($sp) /* E24E24 802B6504 44800000 */ mtc1 $zero, $f0 glabel action_update_pushing_block /* E24E28 802B6508 00000000 */ nop .L802B650C: /* E24E2C 802B650C 46001032 */ c.eq.s $f2, $f0 glabel .L802B6510 /* E24E30 802B6510 00000000 */ nop /* E24E34 802B6514 45010003 */ bc1t .L802B6524 /* E24E38 802B6518 00000000 */ nop .L802B651C: /* E24E3C 802B651C C7A00010 */ lwc1 $f0, 0x10($sp) .L802B6520: /* E24E40 802B6520 E6000080 */ swc1 $f0, 0x80($s0) .L802B6524: /* E24E44 802B6524 8E0200E8 */ lw $v0, 0xE8($s0) /* E24E48 802B6528 00420018 */ mult $v0, $v0 /* E24E4C 802B652C 00001812 */ mflo $v1 .L802B6530: /* E24E50 802B6530 8E0200EC */ lw $v0, 0xEC($s0) .L802B6534: /* E24E54 802B6534 00000000 */ nop /* E24E58 802B6538 00420018 */ mult $v0, $v0 /* E24E5C 802B653C 00003812 */ mflo $a3 /* E24E60 802B6540 00671021 */ addu $v0, $v1, $a3 glabel .L802B6544 /* E24E64 802B6544 44826000 */ mtc1 $v0, $f12 glabel .L802B6548 /* E24E68 802B6548 00000000 */ nop /* E24E6C 802B654C 46806320 */ cvt.s.w $f12, $f12 glabel func_802B6550 /* E24E70 802B6550 46006084 */ sqrt.s $f2, $f12 .L802B6554: /* E24E74 802B6554 46021032 */ c.eq.s $f2, $f2 /* E24E78 802B6558 00000000 */ nop /* E24E7C 802B655C 45010004 */ bc1t .L802B6570 /* E24E80 802B6560 00000000 */ nop /* E24E84 802B6564 0C0187BC */ jal sqrtf glabel .L802B6568 /* E24E88 802B6568 00000000 */ nop .L802B656C: /* E24E8C 802B656C 46000086 */ mov.s $f2, $f0 .L802B6570: /* E24E90 802B6570 3C01425C */ lui $at, (0x425C0000 >> 16) .L802B6574: /* E24E94 802B6574 44810000 */ mtc1 $at, $f0 /* E24E98 802B6578 00000000 */ nop /* E24E9C 802B657C 4602003C */ c.lt.s $f0, $f2 .L802B6580: /* E24EA0 802B6580 00000000 */ nop /* E24EA4 802B6584 45000002 */ bc1f .L802B6590 /* E24EA8 802B6588 24040001 */ addiu $a0, $zero, 0x1 glabel .L802B658C /* E24EAC 802B658C 24040002 */ addiu $a0, $zero, 0x2 .L802B6590: /* E24EB0 802B6590 0C039769 */ jal set_action_state glabel .L802B6594 /* E24EB4 802B6594 00000000 */ nop .L802B6598: /* E24EB8 802B6598 8FBF0020 */ lw $ra, 0x20($sp) .L802B659C: /* E24EBC 802B659C 8FB1001C */ lw $s1, 0x1C($sp) /* E24EC0 802B65A0 8FB00018 */ lw $s0, 0x18($sp) glabel .L802B65A4 /* E24EC4 802B65A4 03E00008 */ jr $ra .L802B65A8: /* E24EC8 802B65A8 27BD0028 */ addiu $sp, $sp, 0x28 /* E24ECC 802B65AC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void action_update_peach_step_down_land(void) { CollisionStatus* collisionStatus = &gCollisionStatus; PlayerStatus* playerStatus = &gPlayerStatus; f32 inputMoveMagnitude; f32 inputMoveAngle; if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~PS_FLAG_ACTION_STATE_CHANGED; playerStatus->actionSubstate = SUBSTATE_INIT; playerStatus->timeInAir = 0; playerStatus->peakJumpTime = 0; playerStatus->flags &= ~PS_FLAG_AIRBORNE; playerStatus->landPos.x = playerStatus->position.x; playerStatus->landPos.z = playerStatus->position.z; if (!(collisionStatus->currentFloor & COLLISION_WITH_ENTITY_BIT)) { phys_adjust_cam_on_landing(); } collisionStatus->lastTouchedFloor = -1; } playerStatus->actionSubstate++; // SUBSTATE_DONE playerStatus->currentSpeed *= 0.6f; player_input_to_move_vector(&inputMoveAngle, &inputMoveMagnitude); if (inputMoveMagnitude != 0.0f) { playerStatus->targetYaw = inputMoveAngle; } if (sqrtf(SQ(playerStatus->stickAxis[0]) + SQ(playerStatus->stickAxis[1])) > 55.0f) { set_action_state(ACTION_STATE_RUN); } else { set_action_state(ACTION_STATE_WALK); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel guPerspectiveF /* 3EF90 80063B90 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 3EF94 80063B94 F7BA0038 */ sdc1 $f26, 0x38($sp) /* 3EF98 80063B98 C7BA0060 */ lwc1 $f26, 0x60($sp) /* 3EF9C 80063B9C F7BC0040 */ sdc1 $f28, 0x40($sp) /* 3EFA0 80063BA0 C7BC0064 */ lwc1 $f28, 0x64($sp) /* 3EFA4 80063BA4 F7BE0048 */ sdc1 $f30, 0x48($sp) /* 3EFA8 80063BA8 C7BE0068 */ lwc1 $f30, 0x68($sp) /* 3EFAC 80063BAC F7B80030 */ sdc1 $f24, 0x30($sp) /* 3EFB0 80063BB0 4486C000 */ mtc1 $a2, $f24 /* 3EFB4 80063BB4 AFB00010 */ sw $s0, 0x10($sp) /* 3EFB8 80063BB8 00808021 */ addu $s0, $a0, $zero /* 3EFBC 80063BBC AFB10014 */ sw $s1, 0x14($sp) /* 3EFC0 80063BC0 F7B60028 */ sdc1 $f22, 0x28($sp) /* 3EFC4 80063BC4 4487B000 */ mtc1 $a3, $f22 /* 3EFC8 80063BC8 AFBF0018 */ sw $ra, 0x18($sp) /* 3EFCC 80063BCC F7B40020 */ sdc1 $f20, 0x20($sp) /* 3EFD0 80063BD0 0C019D28 */ jal guMtxIdentF /* 3EFD4 80063BD4 00A08821 */ addu $s1, $a1, $zero /* 3EFD8 80063BD8 3C01800A */ lui $at, %hi(D_80099BB0) /* 3EFDC 80063BDC D4229BB0 */ ldc1 $f2, %lo(D_80099BB0)($at) /* 3EFE0 80063BE0 4600C021 */ cvt.d.s $f0, $f24 /* 3EFE4 80063BE4 46220002 */ mul.d $f0, $f0, $f2 /* 3EFE8 80063BE8 3C014000 */ lui $at, (0x40000000 >> 16) /* 3EFEC 80063BEC 4481A000 */ mtc1 $at, $f20 /* 3EFF0 80063BF0 46200620 */ cvt.s.d $f24, $f0 /* 3EFF4 80063BF4 4614C503 */ div.s $f20, $f24, $f20 /* 3EFF8 80063BF8 0C00A874 */ jal cos_rad /* 3EFFC 80063BFC 4600A306 */ mov.s $f12, $f20 /* 3F000 80063C00 4600A306 */ mov.s $f12, $f20 /* 3F004 80063C04 0C00A85B */ jal sin_rad /* 3F008 80063C08 46000506 */ mov.s $f20, $f0 /* 3F00C 80063C0C 4600A503 */ div.s $f20, $f20, $f0 /* 3F010 80063C10 461CD100 */ add.s $f4, $f26, $f28 /* 3F014 80063C14 461CD081 */ sub.s $f2, $f26, $f28 /* 3F018 80063C18 46022103 */ div.s $f4, $f4, $f2 /* 3F01C 80063C1C 461AD000 */ add.s $f0, $f26, $f26 /* 3F020 80063C20 461C0002 */ mul.s $f0, $f0, $f28 /* 3F024 80063C24 46020003 */ div.s $f0, $f0, $f2 /* 3F028 80063C28 4616A583 */ div.s $f22, $f20, $f22 /* 3F02C 80063C2C 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 3F030 80063C30 44811000 */ mtc1 $at, $f2 /* 3F034 80063C34 00002821 */ addu $a1, $zero, $zero /* 3F038 80063C38 AE00003C */ sw $zero, 0x3C($s0) /* 3F03C 80063C3C E602002C */ swc1 $f2, 0x2C($s0) /* 3F040 80063C40 E6140014 */ swc1 $f20, 0x14($s0) /* 3F044 80063C44 E6040028 */ swc1 $f4, 0x28($s0) /* 3F048 80063C48 E6000038 */ swc1 $f0, 0x38($s0) /* 3F04C 80063C4C E6160000 */ swc1 $f22, 0x0($s0) .L80063C50: /* 3F050 80063C50 00002021 */ addu $a0, $zero, $zero /* 3F054 80063C54 02001821 */ addu $v1, $s0, $zero .L80063C58: /* 3F058 80063C58 C4600000 */ lwc1 $f0, 0x0($v1) /* 3F05C 80063C5C 461E0002 */ mul.s $f0, $f0, $f30 /* 3F060 80063C60 24840001 */ addiu $a0, $a0, 0x1 /* 3F064 80063C64 28820004 */ slti $v0, $a0, 0x4 /* 3F068 80063C68 E4600000 */ swc1 $f0, 0x0($v1) /* 3F06C 80063C6C 1440FFFA */ bnez $v0, .L80063C58 /* 3F070 80063C70 24630004 */ addiu $v1, $v1, 0x4 /* 3F074 80063C74 24A50001 */ addiu $a1, $a1, 0x1 /* 3F078 80063C78 28A20004 */ slti $v0, $a1, 0x4 /* 3F07C 80063C7C 1440FFF4 */ bnez $v0, .L80063C50 /* 3F080 80063C80 26100010 */ addiu $s0, $s0, 0x10 /* 3F084 80063C84 12200023 */ beqz $s1, .L80063D14 /* 3F088 80063C88 00000000 */ nop /* 3F08C 80063C8C 461CD080 */ add.s $f2, $f26, $f28 /* 3F090 80063C90 3C01800A */ lui $at, %hi(D_80099BB8) /* 3F094 80063C94 D4209BB8 */ ldc1 $f0, %lo(D_80099BB8)($at) /* 3F098 80063C98 460010A1 */ cvt.d.s $f2, $f2 /* 3F09C 80063C9C 4620103E */ c.le.d $f2, $f0 /* 3F0A0 80063CA0 00000000 */ nop /* 3F0A4 80063CA4 00000000 */ nop /* 3F0A8 80063CA8 45010019 */ bc1t .L80063D10 /* 3F0AC 80063CAC 3402FFFF */ ori $v0, $zero, 0xFFFF /* 3F0B0 80063CB0 3C01800A */ lui $at, %hi(D_80099BC0) /* 3F0B4 80063CB4 D4209BC0 */ ldc1 $f0, %lo(D_80099BC0)($at) /* 3F0B8 80063CB8 46220083 */ div.d $f2, $f0, $f2 /* 3F0BC 80063CBC 3C01800A */ lui $at, %hi(D_80099BC8) /* 3F0C0 80063CC0 D4209BC8 */ ldc1 $f0, %lo(D_80099BC8)($at) /* 3F0C4 80063CC4 4622003E */ c.le.d $f0, $f2 /* 3F0C8 80063CC8 00000000 */ nop /* 3F0CC 80063CCC 00000000 */ nop /* 3F0D0 80063CD0 45030006 */ bc1tl .L80063CEC /* 3F0D4 80063CD4 46201001 */ sub.d $f0, $f2, $f0 /* 3F0D8 80063CD8 4620100D */ trunc.w.d $f0, $f2 /* 3F0DC 80063CDC 44030000 */ mfc1 $v1, $f0 /* 3F0E0 80063CE0 00000000 */ nop /* 3F0E4 80063CE4 08018F40 */ j .L80063D00 /* 3F0E8 80063CE8 00601021 */ addu $v0, $v1, $zero .L80063CEC: /* 3F0EC 80063CEC 4620008D */ trunc.w.d $f2, $f0 /* 3F0F0 80063CF0 44031000 */ mfc1 $v1, $f2 /* 3F0F4 80063CF4 3C028000 */ lui $v0, (0x80000000 >> 16) /* 3F0F8 80063CF8 00621825 */ or $v1, $v1, $v0 /* 3F0FC 80063CFC 00601021 */ addu $v0, $v1, $zero .L80063D00: /* 3F100 80063D00 A6220000 */ sh $v0, 0x0($s1) /* 3F104 80063D04 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3F108 80063D08 14400002 */ bnez $v0, .L80063D14 /* 3F10C 80063D0C 24020001 */ addiu $v0, $zero, 0x1 .L80063D10: /* 3F110 80063D10 A6220000 */ sh $v0, 0x0($s1) .L80063D14: /* 3F114 80063D14 8FBF0018 */ lw $ra, 0x18($sp) /* 3F118 80063D18 8FB10014 */ lw $s1, 0x14($sp) /* 3F11C 80063D1C 8FB00010 */ lw $s0, 0x10($sp) /* 3F120 80063D20 D7BE0048 */ ldc1 $f30, 0x48($sp) /* 3F124 80063D24 D7BC0040 */ ldc1 $f28, 0x40($sp) /* 3F128 80063D28 D7BA0038 */ ldc1 $f26, 0x38($sp) /* 3F12C 80063D2C D7B80030 */ ldc1 $f24, 0x30($sp) /* 3F130 80063D30 D7B60028 */ ldc1 $f22, 0x28($sp) /* 3F134 80063D34 D7B40020 */ ldc1 $f20, 0x20($sp) /* 3F138 80063D38 03E00008 */ jr $ra /* 3F13C 80063D3C 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void guPerspectiveF(f32 mf[4][4], u16 *perspNorm, f32 fovy, f32 aspect, f32 near, f32 far, f32 scale) { f32 cot; s32 i, j; guMtxIdentF(mf); fovy *= 3.1415926 / 180.0; cot = cos_rad(fovy/2) / sin_rad(fovy/2); mf[0][0] = cot / aspect; mf[1][1] = cot; mf[2][2] = (near + far) / (near - far); mf[2][3] = -1; mf[3][2] = (2 * near * far) / (near - far); mf[3][3] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { mf[i][j] *= scale; } } if (perspNorm != (u16 *) NULL) { if (near + far <= 2.0) { *perspNorm = (u16) 0xFFFF; } else { *perspNorm = (u16) ((2.0 * 65536.0) / (near + far)); if (*perspNorm <= 0) { *perspNorm = (u16) 0x0001; } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel state_init_file_select /* 10458 80035058 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1045C 8003505C AFBF001C */ sw $ra, 0x1C($sp) /* 10460 80035060 AFB00018 */ sw $s0, 0x18($sp) /* 10464 80035064 F7B40020 */ sdc1 $f20, 0x20($sp) /* 10468 80035068 3C01800A */ lui $at, %hi(D_800A0931) /* 1046C 8003506C A0200931 */ sb $zero, %lo(D_800A0931)($at) /* 10470 80035070 3C01800A */ lui $at, %hi(D_800A0932) /* 10474 80035074 A4200932 */ sh $zero, %lo(D_800A0932)($at) /* 10478 80035078 0C03805E */ jal disable_player_input /* 1047C 8003507C 00000000 */ nop /* 10480 80035080 0C009C22 */ jal set_time_freeze_mode /* 10484 80035084 24040002 */ addiu $a0, $zero, 0x2 /* 10488 80035088 0C00AB00 */ jal general_heap_create /* 1048C 8003508C 00000000 */ nop /* 10490 80035090 0000202D */ daddu $a0, $zero, $zero /* 10494 80035094 0C0514BA */ jal hud_element_set_aux_cache /* 10498 80035098 0080282D */ daddu $a1, $a0, $zero /* 1049C 8003509C 0C050440 */ jal hud_element_clear_cache /* 104A0 800350A0 00000000 */ nop /* 104A4 800350A4 0000202D */ daddu $a0, $zero, $zero /* 104A8 800350A8 0080282D */ daddu $a1, $a0, $zero /* 104AC 800350AC 0C045709 */ jal load_model_textures /* 104B0 800350B0 0080302D */ daddu $a2, $a0, $zero /* 104B4 800350B4 0000202D */ daddu $a0, $zero, $zero /* 104B8 800350B8 2405000C */ addiu $a1, $zero, 0xC /* 104BC 800350BC 2406001C */ addiu $a2, $zero, 0x1C /* 104C0 800350C0 3C10800B */ lui $s0, %hi(gCameras) /* 104C4 800350C4 26101D80 */ addiu $s0, $s0, %lo(gCameras) /* 104C8 800350C8 24020006 */ addiu $v0, $zero, 0x6 /* 104CC 800350CC A6020004 */ sh $v0, 0x4($s0) /* 104D0 800350D0 24020001 */ addiu $v0, $zero, 0x1 /* 104D4 800350D4 A6020006 */ sh $v0, 0x6($s0) /* 104D8 800350D8 24020010 */ addiu $v0, $zero, 0x10 /* 104DC 800350DC A6020012 */ sh $v0, 0x12($s0) /* 104E0 800350E0 24021000 */ addiu $v0, $zero, 0x1000 /* 104E4 800350E4 A6020014 */ sh $v0, 0x14($s0) /* 104E8 800350E8 96020000 */ lhu $v0, 0x0($s0) /* 104EC 800350EC 240300B8 */ addiu $v1, $zero, 0xB8 /* 104F0 800350F0 AFA30010 */ sw $v1, 0x10($sp) /* 104F4 800350F4 96030AB0 */ lhu $v1, 0xAB0($s0) /* 104F8 800350F8 3C0141C8 */ lui $at, (0x41C80000 >> 16) /* 104FC 800350FC 4481A000 */ mtc1 $at, $f20 /* 10500 80035100 34420002 */ ori $v0, $v0, 0x2 /* 10504 80035104 A6020000 */ sh $v0, 0x0($s0) /* 10508 80035108 96020558 */ lhu $v0, 0x558($s0) /* 1050C 8003510C 24070128 */ addiu $a3, $zero, 0x128 /* 10510 80035110 3C018007 */ lui $at, %hi(gCurrentCameraID) /* 10514 80035114 AC207410 */ sw $zero, %lo(gCurrentCameraID)($at) /* 10518 80035118 34420002 */ ori $v0, $v0, 0x2 /* 1051C 8003511C A6020558 */ sh $v0, 0x558($s0) /* 10520 80035120 96021008 */ lhu $v0, 0x1008($s0) /* 10524 80035124 34630002 */ ori $v1, $v1, 0x2 /* 10528 80035128 A6030AB0 */ sh $v1, 0xAB0($s0) /* 1052C 8003512C E6140018 */ swc1 $f20, 0x18($s0) /* 10530 80035130 34420002 */ ori $v0, $v0, 0x2 /* 10534 80035134 0C00B8C5 */ jal set_cam_viewport /* 10538 80035138 A6021008 */ sh $v0, 0x1008($s0) /* 1053C 8003513C 24020028 */ addiu $v0, $zero, 0x28 /* 10540 80035140 A602001E */ sh $v0, 0x1E($s0) /* 10544 80035144 24020064 */ addiu $v0, $zero, 0x64 /* 10548 80035148 3C0143FA */ lui $at, (0x43FA0000 >> 16) /* 1054C 8003514C 44810000 */ mtc1 $at, $f0 /* 10550 80035150 3C01447A */ lui $at, (0x447A0000 >> 16) /* 10554 80035154 44811000 */ mtc1 $at, $f2 /* 10558 80035158 3C0144BB */ lui $at, (0x44BB8000 >> 16) /* 1055C 8003515C 34218000 */ ori $at, $at, (0x44BB8000 & 0xFFFF) /* 10560 80035160 44812000 */ mtc1 $at, $f4 /* 10564 80035164 3C014316 */ lui $at, (0x43160000 >> 16) /* 10568 80035168 44813000 */ mtc1 $at, $f6 /* 1056C 8003516C 3C04800A */ lui $a0, %hi(gOverrideFlags) /* 10570 80035170 2484A650 */ addiu $a0, $a0, %lo(gOverrideFlags) /* 10574 80035174 A600002C */ sh $zero, 0x2C($s0) /* 10578 80035178 A600002E */ sh $zero, 0x2E($s0) /* 1057C 8003517C A6000030 */ sh $zero, 0x30($s0) /* 10580 80035180 E6140054 */ swc1 $f20, 0x54($s0) /* 10584 80035184 E6140058 */ swc1 $f20, 0x58($s0) /* 10588 80035188 A600001C */ sh $zero, 0x1C($s0) /* 1058C 8003518C A6020020 */ sh $v0, 0x20($s0) /* 10590 80035190 A6000022 */ sh $zero, 0x22($s0) /* 10594 80035194 E600003C */ swc1 $f0, 0x3C($s0) /* 10598 80035198 E6020040 */ swc1 $f2, 0x40($s0) /* 1059C 8003519C E6040044 */ swc1 $f4, 0x44($s0) /* 105A0 800351A0 E606005C */ swc1 $f6, 0x5C($s0) /* 105A4 800351A4 8C820000 */ lw $v0, 0x0($a0) /* 105A8 800351A8 3C030001 */ lui $v1, (0x10000 >> 16) /* 105AC 800351AC 00431025 */ or $v0, $v0, $v1 /* 105B0 800351B0 AC820000 */ sw $v0, 0x0($a0) /* 105B4 800351B4 8FBF001C */ lw $ra, 0x1C($sp) /* 105B8 800351B8 8FB00018 */ lw $s0, 0x18($sp) /* 105BC 800351BC D7B40020 */ ldc1 $f20, 0x20($sp) /* 105C0 800351C0 03E00008 */ jr $ra /* 105C4 800351C4 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void state_init_file_select(void) { D_800A0931 = 0; D_800A0932[0] = 0; disable_player_input(); set_time_freeze_mode(TIME_FREEZE_FULL); general_heap_create(); hud_element_set_aux_cache(0, 0); hud_element_clear_cache(); load_model_textures(0, 0, 0); gCameras[CAM_DEFAULT].updateMode = CAM_UPDATE_MODE_6; gCameras[CAM_DEFAULT].needsInit = TRUE; gCameras[CAM_DEFAULT].nearClip = 16; gCameras[CAM_DEFAULT].farClip = 4096; gCameras[CAM_DEFAULT].flags |= CAMERA_FLAG_DISABLED; gCurrentCameraID = CAM_DEFAULT; gCameras[CAM_BATTLE].flags |= CAMERA_FLAG_DISABLED; gCameras[CAM_TATTLE].flags |= CAMERA_FLAG_DISABLED; gCameras[CAM_3].flags |= CAMERA_FLAG_DISABLED; gCameras[CAM_DEFAULT].vfov = 25.0f; set_cam_viewport(0, 12, 28, 296, 184); gCameras[CAM_DEFAULT].auxBoomLength = 40; gCameras[CAM_DEFAULT].lookAt_eye.x = 500.0f; gCameras[CAM_DEFAULT].lookAt_eye.y = 1000.0f; gCameras[CAM_DEFAULT].lookAt_eye.z = 1500.0f; gCameras[CAM_DEFAULT].lookAt_obj_target.z = 150.0f; gCameras[CAM_DEFAULT].bgColor[0] = 0; gCameras[CAM_DEFAULT].bgColor[1] = 0; gCameras[CAM_DEFAULT].bgColor[2] = 0; gCameras[CAM_DEFAULT].lookAt_obj_target.x = 25.0f; gCameras[CAM_DEFAULT].lookAt_obj_target.y = 25.0f; gCameras[CAM_DEFAULT].auxPitch = 0; gCameras[CAM_DEFAULT].lookAt_dist = 100; gCameras[CAM_DEFAULT].auxBoomPitch = 0; gOverrideFlags |= GLOBAL_OVERRIDES_WINDOWS_IN_FRONT_OF_CURTAINS; }
### RAW ASSEMBLY INSTRUCTIONS: glabel get_player_back_anim /* 7A49C 800E0FEC 00041403 */ sra $v0, $a0, 16 /* 7A4A0 800E0FF0 304300FF */ andi $v1, $v0, 0xFF /* 7A4A4 800E0FF4 24020001 */ addiu $v0, $zero, 0x1 /* 7A4A8 800E0FF8 10620009 */ beq $v1, $v0, .L800E1020 /* 7A4AC 800E0FFC 0000282D */ daddu $a1, $zero, $zero /* 7A4B0 800E1000 24020006 */ addiu $v0, $zero, 0x6 /* 7A4B4 800E1004 10620003 */ beq $v1, $v0, .L800E1014 /* 7A4B8 800E1008 2402000A */ addiu $v0, $zero, 0xA /* 7A4BC 800E100C 14620009 */ bne $v1, $v0, .L800E1034 /* 7A4C0 800E1010 00000000 */ nop .L800E1014: /* 7A4C4 800E1014 24020001 */ addiu $v0, $zero, 0x1 /* 7A4C8 800E1018 14620008 */ bne $v1, $v0, .L800E103C /* 7A4CC 800E101C 24020006 */ addiu $v0, $zero, 0x6 .L800E1020: /* 7A4D0 800E1020 3C020001 */ lui $v0, (0x1000C >> 16) /* 7A4D4 800E1024 3442000C */ ori $v0, $v0, (0x1000C & 0xFFFF) /* 7A4D8 800E1028 0044102A */ slt $v0, $v0, $a0 /* 7A4DC 800E102C 1040003C */ beqz $v0, .L800E1120 /* 7A4E0 800E1030 00000000 */ nop .L800E1034: /* 7A4E4 800E1034 03E00008 */ jr $ra /* 7A4E8 800E1038 0080102D */ daddu $v0, $a0, $zero .L800E103C: /* 7A4EC 800E103C 14620032 */ bne $v1, $v0, .L800E1108 /* 7A4F0 800E1040 2402000A */ addiu $v0, $zero, 0xA /* 7A4F4 800E1044 3C020006 */ lui $v0, (0x6000C >> 16) /* 7A4F8 800E1048 3442000C */ ori $v0, $v0, (0x6000C & 0xFFFF) /* 7A4FC 800E104C 14820004 */ bne $a0, $v0, .L800E1060 /* 7A500 800E1050 3C020006 */ lui $v0, (0x6000E >> 16) /* 7A504 800E1054 3C050006 */ lui $a1, (0x6000D >> 16) /* 7A508 800E1058 08038448 */ j .L800E1120 /* 7A50C 800E105C 34A5000D */ ori $a1, $a1, (0x6000D & 0xFFFF) .L800E1060: /* 7A510 800E1060 3442000E */ ori $v0, $v0, (0x6000E & 0xFFFF) /* 7A514 800E1064 14820004 */ bne $a0, $v0, .L800E1078 /* 7A518 800E1068 3C020006 */ lui $v0, (0x60010 >> 16) /* 7A51C 800E106C 3C050006 */ lui $a1, (0x6000F >> 16) /* 7A520 800E1070 08038448 */ j .L800E1120 /* 7A524 800E1074 34A5000F */ ori $a1, $a1, (0x6000F & 0xFFFF) .L800E1078: /* 7A528 800E1078 34420010 */ ori $v0, $v0, (0x60010 & 0xFFFF) /* 7A52C 800E107C 14820004 */ bne $a0, $v0, .L800E1090 /* 7A530 800E1080 3C020006 */ lui $v0, (0x60012 >> 16) /* 7A534 800E1084 3C050006 */ lui $a1, (0x60011 >> 16) /* 7A538 800E1088 08038448 */ j .L800E1120 /* 7A53C 800E108C 34A50011 */ ori $a1, $a1, (0x60011 & 0xFFFF) .L800E1090: /* 7A540 800E1090 34420012 */ ori $v0, $v0, (0x60012 & 0xFFFF) /* 7A544 800E1094 14820004 */ bne $a0, $v0, .L800E10A8 /* 7A548 800E1098 3C020006 */ lui $v0, (0x60014 >> 16) /* 7A54C 800E109C 3C050006 */ lui $a1, (0x60013 >> 16) /* 7A550 800E10A0 08038448 */ j .L800E1120 /* 7A554 800E10A4 34A50013 */ ori $a1, $a1, (0x60013 & 0xFFFF) .L800E10A8: /* 7A558 800E10A8 34420014 */ ori $v0, $v0, (0x60014 & 0xFFFF) /* 7A55C 800E10AC 14820004 */ bne $a0, $v0, .L800E10C0 /* 7A560 800E10B0 3C020006 */ lui $v0, (0x60016 >> 16) /* 7A564 800E10B4 3C050006 */ lui $a1, (0x60015 >> 16) /* 7A568 800E10B8 08038448 */ j .L800E1120 /* 7A56C 800E10BC 34A50015 */ ori $a1, $a1, (0x60015 & 0xFFFF) .L800E10C0: /* 7A570 800E10C0 34420016 */ ori $v0, $v0, (0x60016 & 0xFFFF) /* 7A574 800E10C4 14820004 */ bne $a0, $v0, .L800E10D8 /* 7A578 800E10C8 3C020006 */ lui $v0, (0x60018 >> 16) /* 7A57C 800E10CC 3C050006 */ lui $a1, (0x60017 >> 16) /* 7A580 800E10D0 08038448 */ j .L800E1120 /* 7A584 800E10D4 34A50017 */ ori $a1, $a1, (0x60017 & 0xFFFF) .L800E10D8: /* 7A588 800E10D8 34420018 */ ori $v0, $v0, (0x60018 & 0xFFFF) /* 7A58C 800E10DC 14820004 */ bne $a0, $v0, .L800E10F0 /* 7A590 800E10E0 3C020006 */ lui $v0, (0x6001A >> 16) /* 7A594 800E10E4 3C050006 */ lui $a1, (0x60019 >> 16) /* 7A598 800E10E8 08038448 */ j .L800E1120 /* 7A59C 800E10EC 34A50019 */ ori $a1, $a1, (0x60019 & 0xFFFF) .L800E10F0: /* 7A5A0 800E10F0 3442001A */ ori $v0, $v0, (0x6001A & 0xFFFF) /* 7A5A4 800E10F4 1482000A */ bne $a0, $v0, .L800E1120 /* 7A5A8 800E10F8 00000000 */ nop /* 7A5AC 800E10FC 3C050006 */ lui $a1, (0x6001B >> 16) /* 7A5B0 800E1100 08038448 */ j .L800E1120 /* 7A5B4 800E1104 34A5001B */ ori $a1, $a1, (0x6001B & 0xFFFF) .L800E1108: /* 7A5B8 800E1108 14620005 */ bne $v1, $v0, .L800E1120 /* 7A5BC 800E110C 3C02000A */ lui $v0, (0xA0006 >> 16) /* 7A5C0 800E1110 34420006 */ ori $v0, $v0, (0xA0006 & 0xFFFF) /* 7A5C4 800E1114 0044102A */ slt $v0, $v0, $a0 /* 7A5C8 800E1118 54400001 */ bnel $v0, $zero, .L800E1120 /* 7A5CC 800E111C 24850001 */ addiu $a1, $a0, 0x1 .L800E1120: /* 7A5D0 800E1120 14A00003 */ bnez $a1, .L800E1130 /* 7A5D4 800E1124 3C020100 */ lui $v0, (0x1000000 >> 16) /* 7A5D8 800E1128 03E00008 */ jr $ra /* 7A5DC 800E112C 00821025 */ or $v0, $a0, $v0 .L800E1130: /* 7A5E0 800E1130 03E00008 */ jr $ra /* 7A5E4 800E1134 00A0102D */ daddu $v0, $a1, $zero ### DECOMPILED C INSTRUCTIONS: s32 get_player_back_anim(s32 anim) { s32 sprIndex = (anim >> 16) & 0xff; s32 outAnim = 0; if (sprIndex != SPR_Mario1) { if (sprIndex != SPR_MarioW1 && sprIndex != SPR_Peach1) { return anim; } if (sprIndex == SPR_Mario1) { if (anim > ANIM_Mario1_SpinFall) { return anim; } } else if (sprIndex == SPR_MarioW1) { if (anim == ANIM_MarioW1_Lift) { outAnim = ANIM_MarioW1_Lift_Back; } else if (anim == ANIM_MarioW1_Toss) { outAnim = ANIM_MarioW1_Toss_Back; } else if (anim == ANIM_MarioW1_Smash1_Miss) { outAnim = ANIM_MarioW1_Smash1_Miss_Back; } else if (anim == ANIM_MarioW1_Smash1_Hit) { outAnim = ANIM_MarioW1_Smash1_Hit_Back; } else if (anim == ANIM_MarioW1_Smash2_Miss) { outAnim = ANIM_MarioW1_Smash2_Miss_Back; } else if (anim == ANIM_MarioW1_Smash2_Hit) { outAnim = ANIM_MarioW1_Smash2_Hit_Back; } else if (anim == ANIM_MarioW1_Smash3_Miss) { outAnim = ANIM_MarioW1_Smash3_Miss_Back; } else if (anim == ANIM_MarioW1_Smash3_Hit) { outAnim = ANIM_MarioW1_Smash3_Hit_Back; } } else if (sprIndex == SPR_Peach1) { if (anim > ANIM_Peach1_StepDown) { outAnim = anim + 1; } } } else if (anim > ANIM_Mario1_SpinFall) { return anim; } if (outAnim != 0) { return outAnim; } else { return anim | SPRITE_ID_BACK_FACING; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel init_model_data /* AC6E8 80115FE8 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* AC6EC 80115FEC 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* AC6F0 80115FF0 80420070 */ lb $v0, 0x70($v0) /* AC6F4 80115FF4 14400027 */ bnez $v0, .L80116094 /* AC6F8 80115FF8 00000000 */ nop /* AC6FC 80115FFC 3C028015 */ lui $v0, %hi(wModelList) /* AC700 80116000 24421770 */ addiu $v0, $v0, %lo(wModelList) /* AC704 80116004 3C018015 */ lui $at, %hi(gCurrentModels) /* AC708 80116008 AC2212CC */ sw $v0, %lo(gCurrentModels)($at) /* AC70C 8011600C 3C028015 */ lui $v0, %hi(wTransformGroups) /* AC710 80116010 24421F70 */ addiu $v0, $v0, %lo(wTransformGroups) /* AC714 80116014 3C018015 */ lui $at, %hi(gCurrentTransformGroups) /* AC718 80116018 AC2212E0 */ sw $v0, %lo(gCurrentTransformGroups)($at) /* AC71C 8011601C 3C028015 */ lui $v0, %hi(wModelSpecialDls) /* AC720 80116020 24421F90 */ addiu $v0, $v0, %lo(wModelSpecialDls) /* AC724 80116024 3C018015 */ lui $at, %hi(gCurrentCustomModelGfxPtr) /* AC728 80116028 AC2212E8 */ sw $v0, %lo(gCurrentCustomModelGfxPtr)($at) /* AC72C 8011602C 3C028015 */ lui $v0, %hi(wCustomModelGfxBuilders) /* AC730 80116030 24422090 */ addiu $v0, $v0, %lo(wCustomModelGfxBuilders) /* AC734 80116034 3C018015 */ lui $at, %hi(gCurrentCustomModelGfxBuildersPtr) /* AC738 80116038 AC2212B8 */ sw $v0, %lo(gCurrentCustomModelGfxBuildersPtr)($at) /* AC73C 8011603C 3C028015 */ lui $v0, %hi(D_80152214) /* AC740 80116040 24422214 */ addiu $v0, $v0, %lo(D_80152214) /* AC744 80116044 3C018015 */ lui $at, %hi(gCurrentModelTreeRoot) /* AC748 80116048 AC2212FC */ sw $v0, %lo(gCurrentModelTreeRoot)($at) /* AC74C 8011604C 3C028015 */ lui $v0, %hi(wModelLocalVtxBuffers) /* AC750 80116050 24422190 */ addiu $v0, $v0, %lo(wModelLocalVtxBuffers) /* AC754 80116054 3C018015 */ lui $at, %hi(gCurrentModelLocalVtxBuffers) /* AC758 80116058 AC222210 */ sw $v0, %lo(gCurrentModelLocalVtxBuffers)($at) /* AC75C 8011605C 3C028015 */ lui $v0, %hi(D_80152220) /* AC760 80116060 24422220 */ addiu $v0, $v0, %lo(D_80152220) /* AC764 80116064 3C01800A */ lui $at, %hi(mdl_currentModelTreeNodeInfo) /* AC768 80116068 AC22A5F4 */ sw $v0, %lo(mdl_currentModelTreeNodeInfo)($at) /* AC76C 8011606C 3C028015 */ lui $v0, %hi(wBackgroundFogMode) /* AC770 80116070 24423220 */ addiu $v0, $v0, %lo(wBackgroundFogMode) /* AC774 80116074 3C018015 */ lui $at, %hi(gBackgroundFogModePtr) /* AC778 80116078 AC2212F0 */ sw $v0, %lo(gBackgroundFogModePtr)($at) /* AC77C 8011607C 3C028015 */ lui $v0, %hi(wFogSettings) /* AC780 80116080 24423228 */ addiu $v0, $v0, %lo(wFogSettings) /* AC784 80116084 3C018015 */ lui $at, %hi(gCurrentFogSettings) /* AC788 80116088 AC223264 */ sw $v0, %lo(gCurrentFogSettings)($at) /* AC78C 8011608C 03E00008 */ jr $ra /* AC790 80116090 00000000 */ nop .L80116094: /* AC794 80116094 3C028015 */ lui $v0, %hi(bModelList) /* AC798 80116098 24421B70 */ addiu $v0, $v0, %lo(bModelList) /* AC79C 8011609C 3C018015 */ lui $at, %hi(gCurrentModels) /* AC7A0 801160A0 AC2212CC */ sw $v0, %lo(gCurrentModels)($at) /* AC7A4 801160A4 3C028015 */ lui $v0, %hi(bTransformGroups) /* AC7A8 801160A8 24421F80 */ addiu $v0, $v0, %lo(bTransformGroups) /* AC7AC 801160AC 3C018015 */ lui $at, %hi(gCurrentTransformGroups) /* AC7B0 801160B0 AC2212E0 */ sw $v0, %lo(gCurrentTransformGroups)($at) /* AC7B4 801160B4 3C028015 */ lui $v0, %hi(bModelSpecialDls) /* AC7B8 801160B8 24422010 */ addiu $v0, $v0, %lo(bModelSpecialDls) /* AC7BC 801160BC 3C018015 */ lui $at, %hi(gCurrentCustomModelGfxPtr) /* AC7C0 801160C0 AC2212E8 */ sw $v0, %lo(gCurrentCustomModelGfxPtr)($at) /* AC7C4 801160C4 3C028015 */ lui $v0, %hi(bCustomModelGfxBuilders) /* AC7C8 801160C8 24422110 */ addiu $v0, $v0, %lo(bCustomModelGfxBuilders) /* AC7CC 801160CC 3C018015 */ lui $at, %hi(gCurrentCustomModelGfxBuildersPtr) /* AC7D0 801160D0 AC2212B8 */ sw $v0, %lo(gCurrentCustomModelGfxBuildersPtr)($at) /* AC7D4 801160D4 3C028015 */ lui $v0, %hi(D_80152218) /* AC7D8 801160D8 24422218 */ addiu $v0, $v0, %lo(D_80152218) /* AC7DC 801160DC 3C018015 */ lui $at, %hi(gCurrentModelTreeRoot) /* AC7E0 801160E0 AC2212FC */ sw $v0, %lo(gCurrentModelTreeRoot)($at) /* AC7E4 801160E4 3C028015 */ lui $v0, %hi(bModelLocalVtxBuffers) /* AC7E8 801160E8 244221D0 */ addiu $v0, $v0, %lo(bModelLocalVtxBuffers) /* AC7EC 801160EC 3C018015 */ lui $at, %hi(gCurrentModelLocalVtxBuffers) /* AC7F0 801160F0 AC222210 */ sw $v0, %lo(gCurrentModelLocalVtxBuffers)($at) /* AC7F4 801160F4 3C028015 */ lui $v0, %hi(D_80152A20) /* AC7F8 801160F8 24422A20 */ addiu $v0, $v0, %lo(D_80152A20) /* AC7FC 801160FC 3C01800A */ lui $at, %hi(mdl_currentModelTreeNodeInfo) /* AC800 80116100 AC22A5F4 */ sw $v0, %lo(mdl_currentModelTreeNodeInfo)($at) /* AC804 80116104 3C028015 */ lui $v0, %hi(bBackgroundFogMode) /* AC808 80116108 24423221 */ addiu $v0, $v0, %lo(bBackgroundFogMode) /* AC80C 8011610C 3C018015 */ lui $at, %hi(gBackgroundFogModePtr) /* AC810 80116110 AC2212F0 */ sw $v0, %lo(gBackgroundFogModePtr)($at) /* AC814 80116114 3C028015 */ lui $v0, %hi(bFogSettings) /* AC818 80116118 24423248 */ addiu $v0, $v0, %lo(bFogSettings) /* AC81C 8011611C 3C018015 */ lui $at, %hi(gCurrentFogSettings) /* AC820 80116120 AC223264 */ sw $v0, %lo(gCurrentFogSettings)($at) /* AC824 80116124 03E00008 */ jr $ra /* AC828 80116128 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void init_model_data(void) { if (!gGameStatusPtr->isBattle) { gCurrentModels = &wModelList; gCurrentTransformGroups = &wTransformGroups; gCurrentCustomModelGfxPtr = &wModelSpecialDls; gCurrentCustomModelGfxBuildersPtr = &wCustomModelGfxBuilders; gCurrentModelTreeRoot = &D_80152214; gCurrentModelLocalVtxBuffers = &wModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152220; gBackgroundFogModePtr = &wBackgroundFogMode; gCurrentFogSettings = &wFogSettings; } else { gCurrentModels = &bModelList; gCurrentTransformGroups = &bTransformGroups; gCurrentCustomModelGfxPtr = &bModelSpecialDls; gCurrentCustomModelGfxBuildersPtr = &bCustomModelGfxBuilders; gCurrentModelTreeRoot = &D_80152218; gCurrentModelLocalVtxBuffers = &bModelLocalVtxBuffers; mdl_currentModelTreeNodeInfo = &D_80152A20; gBackgroundFogModePtr = &bBackgroundFogMode; gCurrentFogSettings = &bFogSettings; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_syn_set_fxmix /* 32DD8 800579D8 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 32DDC 800579DC AFB20018 */ sw $s2, 0x18($sp) /* 32DE0 800579E0 00A0902D */ daddu $s2, $a1, $zero /* 32DE4 800579E4 308400FF */ andi $a0, $a0, 0xFF /* 32DE8 800579E8 00041140 */ sll $v0, $a0, 5 /* 32DEC 800579EC 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 32DF0 800579F0 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 32DF4 800579F4 00441023 */ subu $v0, $v0, $a0 /* 32DF8 800579F8 AFBF001C */ sw $ra, 0x1C($sp) /* 32DFC 800579FC AFB10014 */ sw $s1, 0x14($sp) /* 32E00 80057A00 AFB00010 */ sw $s0, 0x10($sp) /* 32E04 80057A04 8C63001C */ lw $v1, 0x1C($v1) /* 32E08 80057A08 00021080 */ sll $v0, $v0, 2 /* 32E0C 80057A0C 00628021 */ addu $s0, $v1, $v0 /* 32E10 80057A10 8E050064 */ lw $a1, 0x64($s0) /* 32E14 80057A14 8E030068 */ lw $v1, 0x68($s0) /* 32E18 80057A18 00A3102A */ slt $v0, $a1, $v1 /* 32E1C 80057A1C 14400029 */ bnez $v0, .L80057AC4 /* 32E20 80057A20 26110048 */ addiu $s1, $s0, 0x48 /* 32E24 80057A24 3C028008 */ lui $v0, %hi(AuSynUseStereo) /* 32E28 80057A28 24428181 */ addiu $v0, $v0, %lo(AuSynUseStereo) /* 32E2C 80057A2C 90420000 */ lbu $v0, 0x0($v0) /* 32E30 80057A30 1440000E */ bnez $v0, .L80057A6C /* 32E34 80057A34 AE030064 */ sw $v1, 0x64($s0) /* 32E38 80057A38 3C048008 */ lui $a0, %hi(AlCosineBlend) /* 32E3C 80057A3C 24848E60 */ addiu $a0, $a0, %lo(AlCosineBlend) /* 32E40 80057A40 8603004E */ lh $v1, 0x4E($s0) /* 32E44 80057A44 84820080 */ lh $v0, 0x80($a0) /* 32E48 80057A48 00620018 */ mult $v1, $v0 /* 32E4C 80057A4C 00004012 */ mflo $t0 /* 32E50 80057A50 000813C3 */ sra $v0, $t0, 15 /* 32E54 80057A54 A6020050 */ sh $v0, 0x50($s0) /* 32E58 80057A58 84820080 */ lh $v0, 0x80($a0) /* 32E5C 80057A5C 00620018 */ mult $v1, $v0 /* 32E60 80057A60 00004012 */ mflo $t0 /* 32E64 80057A64 08015EBB */ j .L80057AEC /* 32E68 80057A68 000813C3 */ sra $v0, $t0, 15 .L80057A6C: /* 32E6C 80057A6C 8602004C */ lh $v0, 0x4C($s0) /* 32E70 80057A70 8603004E */ lh $v1, 0x4E($s0) /* 32E74 80057A74 00021040 */ sll $v0, $v0, 1 /* 32E78 80057A78 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32E7C 80057A7C 00220821 */ addu $at, $at, $v0 /* 32E80 80057A80 84228E60 */ lh $v0, %lo(AlCosineBlend)($at) /* 32E84 80057A84 00620018 */ mult $v1, $v0 /* 32E88 80057A88 8603004C */ lh $v1, 0x4C($s0) /* 32E8C 80057A8C 00004012 */ mflo $t0 /* 32E90 80057A90 000813C3 */ sra $v0, $t0, 15 /* 32E94 80057A94 A6020050 */ sh $v0, 0x50($s0) /* 32E98 80057A98 2402007F */ addiu $v0, $zero, 0x7F /* 32E9C 80057A9C 00431023 */ subu $v0, $v0, $v1 /* 32EA0 80057AA0 00021040 */ sll $v0, $v0, 1 /* 32EA4 80057AA4 8603004E */ lh $v1, 0x4E($s0) /* 32EA8 80057AA8 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32EAC 80057AAC 00220821 */ addu $at, $at, $v0 /* 32EB0 80057AB0 84228E60 */ lh $v0, %lo(AlCosineBlend)($at) /* 32EB4 80057AB4 00620018 */ mult $v1, $v0 /* 32EB8 80057AB8 00004012 */ mflo $t0 /* 32EBC 80057ABC 08015EBB */ j .L80057AEC /* 32EC0 80057AC0 000813C3 */ sra $v0, $t0, 15 .L80057AC4: /* 32EC4 80057AC4 86040050 */ lh $a0, 0x50($s0) /* 32EC8 80057AC8 8606005A */ lh $a2, 0x5A($s0) /* 32ECC 80057ACC 0C016001 */ jal func_80058004 /* 32ED0 80057AD0 96070058 */ lhu $a3, 0x58($s0) /* 32ED4 80057AD4 86040052 */ lh $a0, 0x52($s0) /* 32ED8 80057AD8 8E050064 */ lw $a1, 0x64($s0) /* 32EDC 80057ADC 86060060 */ lh $a2, 0x60($s0) /* 32EE0 80057AE0 9607005E */ lhu $a3, 0x5E($s0) /* 32EE4 80057AE4 0C016001 */ jal func_80058004 /* 32EE8 80057AE8 A6020050 */ sh $v0, 0x50($s0) .L80057AEC: /* 32EEC 80057AEC A6020052 */ sh $v0, 0x52($s0) /* 32EF0 80057AF0 86220008 */ lh $v0, 0x8($s1) /* 32EF4 80057AF4 14400002 */ bnez $v0, .L80057B00 /* 32EF8 80057AF8 24020001 */ addiu $v0, $zero, 0x1 /* 32EFC 80057AFC A6220008 */ sh $v0, 0x8($s1) .L80057B00: /* 32F00 80057B00 8622000A */ lh $v0, 0xA($s1) /* 32F04 80057B04 14400003 */ bnez $v0, .L80057B14 /* 32F08 80057B08 324300FF */ andi $v1, $s2, 0xFF /* 32F0C 80057B0C 24020001 */ addiu $v0, $zero, 0x1 /* 32F10 80057B10 A622000A */ sh $v0, 0xA($s1) .L80057B14: /* 32F14 80057B14 00031040 */ sll $v0, $v1, 1 /* 32F18 80057B18 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32F1C 80057B1C 00220821 */ addu $at, $at, $v0 /* 32F20 80057B20 94228E60 */ lhu $v0, %lo(AlCosineBlend)($at) /* 32F24 80057B24 A622000C */ sh $v0, 0xC($s1) /* 32F28 80057B28 2402007F */ addiu $v0, $zero, 0x7F /* 32F2C 80057B2C 00431023 */ subu $v0, $v0, $v1 /* 32F30 80057B30 00021040 */ sll $v0, $v0, 1 /* 32F34 80057B34 3C038008 */ lui $v1, %hi(AlCosineBlend) /* 32F38 80057B38 00621821 */ addu $v1, $v1, $v0 /* 32F3C 80057B3C 94638E60 */ lhu $v1, %lo(AlCosineBlend)($v1) /* 32F40 80057B40 24020001 */ addiu $v0, $zero, 0x1 /* 32F44 80057B44 AE220024 */ sw $v0, 0x24($s1) /* 32F48 80057B48 A623000E */ sh $v1, 0xE($s1) /* 32F4C 80057B4C 8FBF001C */ lw $ra, 0x1C($sp) /* 32F50 80057B50 8FB20018 */ lw $s2, 0x18($sp) /* 32F54 80057B54 8FB10014 */ lw $s1, 0x14($sp) /* 32F58 80057B58 8FB00010 */ lw $s0, 0x10($sp) /* 32F5C 80057B5C 03E00008 */ jr $ra /* 32F60 80057B60 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void au_syn_set_fxmix(u8 voiceIdx, u8 fxMix) { AuPVoice* pvoice = &gSynDriverPtr->pvoices[voiceIdx]; AuEnvMixer* envMixer = &pvoice->envMixer; if (envMixer->delta >= envMixer->segEnd) { envMixer->delta = envMixer->segEnd; if (!AuSynUseStereo) { envMixer->cvolL = (envMixer->volume * AuEqPower[AU_EQPOW_MID_IDX]) >> 0xF; envMixer->cvolR = (envMixer->volume * AuEqPower[AU_EQPOW_MID_IDX]) >> 0xF; } else { envMixer->cvolL = (envMixer->volume * AuEqPower[envMixer->pan]) >> 0xF; envMixer->cvolR = (envMixer->volume * AuEqPower[AU_EQPOW_MAX_IDX - envMixer->pan]) >> 0xF; } } else { envMixer->cvolL = _getVol(envMixer->cvolL, envMixer->delta, envMixer->lratm, envMixer->lratl); envMixer->cvolR = _getVol(envMixer->cvolR, envMixer->delta, envMixer->rratm, envMixer->rratl); } if (envMixer->cvolL == 0) { envMixer->cvolL = 1; } if (envMixer->cvolR == 0) { envMixer->cvolR = 1; } envMixer->dryamt = AuEqPower[fxMix]; envMixer->wetamt = AuEqPower[AU_EQPOW_MAX_IDX - fxMix]; envMixer->first = 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel SetPartPos /* 1997F8 8026AF18 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 1997FC 8026AF1C AFB10014 */ sw $s1, 0x14($sp) /* 199800 8026AF20 0080882D */ daddu $s1, $a0, $zero /* 199804 8026AF24 AFBF0020 */ sw $ra, 0x20($sp) /* 199808 8026AF28 AFB3001C */ sw $s3, 0x1C($sp) /* 19980C 8026AF2C AFB20018 */ sw $s2, 0x18($sp) /* 199810 8026AF30 AFB00010 */ sw $s0, 0x10($sp) /* 199814 8026AF34 F7B80038 */ sdc1 $f24, 0x38($sp) /* 199818 8026AF38 F7B60030 */ sdc1 $f22, 0x30($sp) /* 19981C 8026AF3C F7B40028 */ sdc1 $f20, 0x28($sp) /* 199820 8026AF40 8E30000C */ lw $s0, 0xC($s1) /* 199824 8026AF44 8E050000 */ lw $a1, 0x0($s0) /* 199828 8026AF48 0C0B1EAF */ jal evt_get_variable /* 19982C 8026AF4C 26100004 */ addiu $s0, $s0, 0x4 /* 199830 8026AF50 0040902D */ daddu $s2, $v0, $zero /* 199834 8026AF54 2402FF81 */ addiu $v0, $zero, -0x7F /* 199838 8026AF58 16420002 */ bne $s2, $v0, .L8026AF64 /* 19983C 8026AF5C 00000000 */ nop /* 199840 8026AF60 8E320148 */ lw $s2, 0x148($s1) .L8026AF64: /* 199844 8026AF64 8E050000 */ lw $a1, 0x0($s0) /* 199848 8026AF68 26100004 */ addiu $s0, $s0, 0x4 /* 19984C 8026AF6C 0C0B1EAF */ jal evt_get_variable /* 199850 8026AF70 0220202D */ daddu $a0, $s1, $zero /* 199854 8026AF74 8E050000 */ lw $a1, 0x0($s0) /* 199858 8026AF78 26100004 */ addiu $s0, $s0, 0x4 /* 19985C 8026AF7C 0220202D */ daddu $a0, $s1, $zero /* 199860 8026AF80 0C0B1EAF */ jal evt_get_variable /* 199864 8026AF84 0040982D */ daddu $s3, $v0, $zero /* 199868 8026AF88 8E050000 */ lw $a1, 0x0($s0) /* 19986C 8026AF8C 26100004 */ addiu $s0, $s0, 0x4 /* 199870 8026AF90 4482A000 */ mtc1 $v0, $f20 /* 199874 8026AF94 00000000 */ nop /* 199878 8026AF98 4680A520 */ cvt.s.w $f20, $f20 /* 19987C 8026AF9C 0C0B1EAF */ jal evt_get_variable /* 199880 8026AFA0 0220202D */ daddu $a0, $s1, $zero /* 199884 8026AFA4 8E050000 */ lw $a1, 0x0($s0) /* 199888 8026AFA8 4482B000 */ mtc1 $v0, $f22 /* 19988C 8026AFAC 00000000 */ nop /* 199890 8026AFB0 4680B5A0 */ cvt.s.w $f22, $f22 /* 199894 8026AFB4 0C0B1EAF */ jal evt_get_variable /* 199898 8026AFB8 0220202D */ daddu $a0, $s1, $zero /* 19989C 8026AFBC 4482C000 */ mtc1 $v0, $f24 /* 1998A0 8026AFC0 00000000 */ nop /* 1998A4 8026AFC4 4680C620 */ cvt.s.w $f24, $f24 /* 1998A8 8026AFC8 0C09A75B */ jal get_actor /* 1998AC 8026AFCC 0240202D */ daddu $a0, $s2, $zero /* 1998B0 8026AFD0 0040182D */ daddu $v1, $v0, $zero /* 1998B4 8026AFD4 32440700 */ andi $a0, $s2, 0x700 /* 1998B8 8026AFD8 24020100 */ addiu $v0, $zero, 0x100 /* 1998BC 8026AFDC 1082000E */ beq $a0, $v0, .L8026B018 /* 1998C0 8026AFE0 28820101 */ slti $v0, $a0, 0x101 /* 1998C4 8026AFE4 10400005 */ beqz $v0, .L8026AFFC /* 1998C8 8026AFE8 24020200 */ addiu $v0, $zero, 0x200 /* 1998CC 8026AFEC 50800007 */ beql $a0, $zero, .L8026B00C /* 1998D0 8026AFF0 E4740144 */ swc1 $f20, 0x144($v1) /* 1998D4 8026AFF4 0809AC1D */ j .L8026B074 /* 1998D8 8026AFF8 00000000 */ nop .L8026AFFC: /* 1998DC 8026AFFC 10820007 */ beq $a0, $v0, .L8026B01C /* 1998E0 8026B000 0060202D */ daddu $a0, $v1, $zero /* 1998E4 8026B004 0809AC1D */ j .L8026B074 /* 1998E8 8026B008 00000000 */ nop .L8026B00C: /* 1998EC 8026B00C E4760148 */ swc1 $f22, 0x148($v1) /* 1998F0 8026B010 0809AC1D */ j .L8026B074 /* 1998F4 8026B014 E478014C */ swc1 $f24, 0x14C($v1) .L8026B018: /* 1998F8 8026B018 0060202D */ daddu $a0, $v1, $zero .L8026B01C: /* 1998FC 8026B01C 0C099117 */ jal get_actor_part /* 199900 8026B020 0260282D */ daddu $a1, $s3, $zero /* 199904 8026B024 0040202D */ daddu $a0, $v0, $zero /* 199908 8026B028 8C820000 */ lw $v0, 0x0($a0) /* 19990C 8026B02C 3C030010 */ lui $v1, (0x100000 >> 16) /* 199910 8026B030 00431024 */ and $v0, $v0, $v1 /* 199914 8026B034 5440000D */ bnel $v0, $zero, .L8026B06C /* 199918 8026B038 E494002C */ swc1 $f20, 0x2C($a0) /* 19991C 8026B03C 4600A00D */ trunc.w.s $f0, $f20 /* 199920 8026B040 44020000 */ mfc1 $v0, $f0 /* 199924 8026B044 00000000 */ nop /* 199928 8026B048 A4820014 */ sh $v0, 0x14($a0) /* 19992C 8026B04C 4600B00D */ trunc.w.s $f0, $f22 /* 199930 8026B050 44020000 */ mfc1 $v0, $f0 /* 199934 8026B054 00000000 */ nop /* 199938 8026B058 A4820016 */ sh $v0, 0x16($a0) /* 19993C 8026B05C 4600C00D */ trunc.w.s $f0, $f24 /* 199940 8026B060 44020000 */ mfc1 $v0, $f0 /* 199944 8026B064 0809AC1D */ j .L8026B074 /* 199948 8026B068 A4820018 */ sh $v0, 0x18($a0) .L8026B06C: /* 19994C 8026B06C E4960030 */ swc1 $f22, 0x30($a0) /* 199950 8026B070 E4980034 */ swc1 $f24, 0x34($a0) .L8026B074: /* 199954 8026B074 8FBF0020 */ lw $ra, 0x20($sp) /* 199958 8026B078 8FB3001C */ lw $s3, 0x1C($sp) /* 19995C 8026B07C 8FB20018 */ lw $s2, 0x18($sp) /* 199960 8026B080 8FB10014 */ lw $s1, 0x14($sp) /* 199964 8026B084 8FB00010 */ lw $s0, 0x10($sp) /* 199968 8026B088 D7B80038 */ ldc1 $f24, 0x38($sp) /* 19996C 8026B08C D7B60030 */ ldc1 $f22, 0x30($sp) /* 199970 8026B090 D7B40028 */ ldc1 $f20, 0x28($sp) /* 199974 8026B094 24020002 */ addiu $v0, $zero, 0x2 /* 199978 8026B098 03E00008 */ jr $ra /* 19997C 8026B09C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: ApiStatus SetPartPos(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 actorID = evt_get_variable(script, *args++); Actor* actor; s32 partID; f32 x, y, z; ActorPart* actorPart; if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } partID = evt_get_variable(script, *args++); x = evt_get_variable(script, *args++); y = evt_get_variable(script, *args++); z = evt_get_variable(script, *args++); actor = get_actor(actorID); switch (actorID & ACTOR_CLASS_MASK) { case ACTOR_CLASS_PLAYER: actor->currentPos.x = x; actor->currentPos.y = y; actor->currentPos.z = z; break; case ACTOR_CLASS_PARTNER: case ACTOR_CLASS_ENEMY: actorPart = get_actor_part(actor, partID); if (!(actorPart->flags & ACTOR_PART_FLAG_USE_ABSOLUTE_POSITION)) { actorPart->partOffset.x = x; actorPart->partOffset.y = y; actorPart->partOffset.z = z; } else { actorPart->absolutePosition.x = x; actorPart->absolutePosition.y = y; actorPart->absolutePosition.z = z; } break; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel is_entity_data_loaded /* A785C 8011115C ACC00000 */ sw $zero, 0x0($a2) /* A7860 80111160 ACE00000 */ sw $zero, 0x0($a3) /* A7864 80111164 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A7868 80111168 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A786C 8011116C 80420070 */ lb $v0, 0x70($v0) /* A7870 80111170 3C098015 */ lui $t1, %hi(bEntityBlueprint) /* A7874 80111174 252916E8 */ addiu $t1, $t1, %lo(bEntityBlueprint) /* A7878 80111178 14400003 */ bnez $v0, .L80111188 /* A787C 8011117C 0000582D */ daddu $t3, $zero, $zero /* A7880 80111180 3C098015 */ lui $t1, %hi(wEntityBlueprint) /* A7884 80111184 25291668 */ addiu $t1, $t1, %lo(wEntityBlueprint) .L80111188: /* A7888 80111188 0000502D */ daddu $t2, $zero, $zero .L8011118C: /* A788C 8011118C 8D240000 */ lw $a0, 0x0($t1) /* A7890 80111190 1480000A */ bnez $a0, .L801111BC /* A7894 80111194 00000000 */ nop /* A7898 80111198 AD250000 */ sw $a1, 0x0($t1) /* A789C 8011119C AD200004 */ sw $zero, 0x4($t1) /* A78A0 801111A0 94A20000 */ lhu $v0, 0x0($a1) /* A78A4 801111A4 30420008 */ andi $v0, $v0, 0x8 /* A78A8 801111A8 1040003C */ beqz $v0, .L8011129C /* A78AC 801111AC 240B0001 */ addiu $t3, $zero, 0x1 /* A78B0 801111B0 8CA30018 */ lw $v1, 0x18($a1) /* A78B4 801111B4 08044481 */ j .L80111204 /* A78B8 801111B8 00000000 */ nop .L801111BC: /* A78BC 801111BC 8C880018 */ lw $t0, 0x18($a0) /* A78C0 801111C0 8CA30018 */ lw $v1, 0x18($a1) /* A78C4 801111C4 15030009 */ bne $t0, $v1, .L801111EC /* A78C8 801111C8 00000000 */ nop /* A78CC 801111CC 94A20000 */ lhu $v0, 0x0($a1) /* A78D0 801111D0 30420008 */ andi $v0, $v0, 0x8 /* A78D4 801111D4 10400031 */ beqz $v0, .L8011129C /* A78D8 801111D8 00000000 */ nop /* A78DC 801111DC 8D020004 */ lw $v0, 0x4($t0) /* A78E0 801111E0 8D030000 */ lw $v1, 0x0($t0) /* A78E4 801111E4 08044484 */ j .L80111210 /* A78E8 801111E8 00431023 */ subu $v0, $v0, $v1 .L801111EC: /* A78EC 801111EC 1485000D */ bne $a0, $a1, .L80111224 /* A78F0 801111F0 00000000 */ nop /* A78F4 801111F4 94820000 */ lhu $v0, 0x0($a0) /* A78F8 801111F8 30420008 */ andi $v0, $v0, 0x8 /* A78FC 801111FC 10400027 */ beqz $v0, .L8011129C /* A7900 80111200 00000000 */ nop .L80111204: /* A7904 80111204 8C620004 */ lw $v0, 0x4($v1) /* A7908 80111208 8C630000 */ lw $v1, 0x0($v1) /* A790C 8011120C 00431023 */ subu $v0, $v0, $v1 .L80111210: /* A7910 80111210 8CC30000 */ lw $v1, 0x0($a2) /* A7914 80111214 00021083 */ sra $v0, $v0, 2 /* A7918 80111218 00621821 */ addu $v1, $v1, $v0 /* A791C 8011121C 080444A7 */ j .L8011129C /* A7920 80111220 ACE30000 */ sw $v1, 0x0($a3) .L80111224: /* A7924 80111224 94820000 */ lhu $v0, 0x0($a0) /* A7928 80111228 30420008 */ andi $v0, $v0, 0x8 /* A792C 8011122C 10400011 */ beqz $v0, .L80111274 /* A7930 80111230 00000000 */ nop /* A7934 80111234 8D030004 */ lw $v1, 0x4($t0) /* A7938 80111238 8D020000 */ lw $v0, 0x0($t0) /* A793C 8011123C 00621823 */ subu $v1, $v1, $v0 /* A7940 80111240 8CC20000 */ lw $v0, 0x0($a2) /* A7944 80111244 00031883 */ sra $v1, $v1, 2 /* A7948 80111248 00431021 */ addu $v0, $v0, $v1 /* A794C 8011124C ACC20000 */ sw $v0, 0x0($a2) /* A7950 80111250 ACE20000 */ sw $v0, 0x0($a3) /* A7954 80111254 8D03000C */ lw $v1, 0xC($t0) /* A7958 80111258 8D020008 */ lw $v0, 0x8($t0) /* A795C 8011125C 00621823 */ subu $v1, $v1, $v0 /* A7960 80111260 8CC20000 */ lw $v0, 0x0($a2) /* A7964 80111264 00031883 */ sra $v1, $v1, 2 /* A7968 80111268 00431021 */ addu $v0, $v0, $v1 /* A796C 8011126C 080444A3 */ j .L8011128C /* A7970 80111270 ACC20000 */ sw $v0, 0x0($a2) .L80111274: /* A7974 80111274 8C82001C */ lw $v0, 0x1C($a0) /* A7978 80111278 8CC30000 */ lw $v1, 0x0($a2) /* A797C 8011127C 00481023 */ subu $v0, $v0, $t0 /* A7980 80111280 00021083 */ sra $v0, $v0, 2 /* A7984 80111284 00621821 */ addu $v1, $v1, $v0 /* A7988 80111288 ACC30000 */ sw $v1, 0x0($a2) .L8011128C: /* A798C 8011128C 254A0001 */ addiu $t2, $t2, 0x1 /* A7990 80111290 2942001E */ slti $v0, $t2, 0x1E /* A7994 80111294 1440FFBD */ bnez $v0, .L8011118C /* A7998 80111298 25290004 */ addiu $t1, $t1, 0x4 .L8011129C: /* A799C 8011129C 03E00008 */ jr $ra /* A79A0 801112A0 0160102D */ daddu $v0, $t3, $zero ### DECOMPILED C INSTRUCTIONS: s32 is_entity_data_loaded(Entity* entity, EntityBlueprint* blueprint, s32* loadedStart, s32* loadedEnd) { EntityBlueprint** blueprints; s32 i; s32 ret; s32 size; DmaEntry* entDmaList; *loadedStart = 0; *loadedEnd = 0; ret = FALSE; if (!gGameStatusPtr->isBattle) { blueprints = wEntityBlueprint; } else { blueprints = bEntityBlueprint; } for (i = 0; i < MAX_ENTITIES; i++, blueprints++) { EntityBlueprint* bp = *blueprints; if (bp == NULL) { blueprints[0] = blueprint; blueprints[1] = NULL; ret = TRUE; if (blueprint->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { s32 size; entDmaList = blueprint->dmaList; size = (entDmaList[0].end - entDmaList[0].start) >> 2; *loadedEnd = *loadedStart + size; } break; } else { DmaEntry* bpDmaList = bp->dmaList; do {} while (0); // TODO find better match entDmaList = blueprint->dmaList; if (bpDmaList == entDmaList) { if (blueprint->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { s32 size = (bpDmaList[0].end - bpDmaList[0].start) >> 2; *loadedEnd = *loadedStart + size; } break; } else if (bp == blueprint) { if (bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { s32 size = (entDmaList[0].end - entDmaList[0].start) >> 2; *loadedEnd = *loadedStart + size; } break; } else { if (bp->flags & ENTITY_FLAG_HAS_ANIMATED_MODEL) { s32 size = (bpDmaList[0].end - bpDmaList[0].start) >> 2; *loadedEnd = *loadedStart = *loadedStart + size; size = (bpDmaList[1].end - bpDmaList[1].start) >> 2; *loadedStart = *loadedStart + size; } else { *loadedStart += (bp->dma.end - bp->dma.start) >> 2; } } } } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_scripts /* E8724 802C3D74 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* E8728 802C3D78 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* E872C 802C3D7C 27BDFFC8 */ addiu $sp, $sp, -0x38 /* E8730 802C3D80 AFBF002C */ sw $ra, 0x2C($sp) /* E8734 802C3D84 AFB60028 */ sw $s6, 0x28($sp) /* E8738 802C3D88 AFB50024 */ sw $s5, 0x24($sp) /* E873C 802C3D8C AFB40020 */ sw $s4, 0x20($sp) /* E8740 802C3D90 AFB3001C */ sw $s3, 0x1C($sp) /* E8744 802C3D94 AFB20018 */ sw $s2, 0x18($sp) /* E8748 802C3D98 AFB10014 */ sw $s1, 0x14($sp) /* E874C 802C3D9C AFB00010 */ sw $s0, 0x10($sp) /* E8750 802C3DA0 F7B40030 */ sdc1 $f20, 0x30($sp) /* E8754 802C3DA4 80420078 */ lb $v0, 0x78($v0) /* E8758 802C3DA8 24030001 */ addiu $v1, $zero, 0x1 /* E875C 802C3DAC 10430042 */ beq $v0, $v1, .L802C3EB8 /* E8760 802C3DB0 00000000 */ nop /* E8764 802C3DB4 3C01802E */ lui $at, %hi(gIsUpdatingScripts) /* E8768 802C3DB8 AC239CA4 */ sw $v1, %lo(gIsUpdatingScripts)($at) /* E876C 802C3DBC 0C0B0C00 */ jal sort_scripts /* E8770 802C3DC0 0000902D */ daddu $s2, $zero, $zero /* E8774 802C3DC4 3C02802E */ lui $v0, %hi(gScriptListCount) /* E8778 802C3DC8 8C42AC98 */ lw $v0, %lo(gScriptListCount)($v0) /* E877C 802C3DCC 18400038 */ blez $v0, .L802C3EB0 /* E8780 802C3DD0 24160001 */ addiu $s6, $zero, 0x1 /* E8784 802C3DD4 3C013FF0 */ lui $at, (0x3FF00000 >> 16) /* E8788 802C3DD8 4481A800 */ mtc1 $at, $f21 /* E878C 802C3DDC 4480A000 */ mtc1 $zero, $f20 /* E8790 802C3DE0 2415FFFF */ addiu $s5, $zero, -0x1 /* E8794 802C3DE4 3C14802E */ lui $s4, %hi(gScriptIdList) /* E8798 802C3DE8 2694AA98 */ addiu $s4, $s4, %lo(gScriptIdList) /* E879C 802C3DEC 3C13802E */ lui $s3, %hi(gScriptIndexList) /* E87A0 802C3DF0 2673A898 */ addiu $s3, $s3, %lo(gScriptIndexList) .L802C3DF4: /* E87A4 802C3DF4 8E620000 */ lw $v0, 0x0($s3) /* E87A8 802C3DF8 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) /* E87AC 802C3DFC 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) /* E87B0 802C3E00 00021080 */ sll $v0, $v0, 2 /* E87B4 802C3E04 00431021 */ addu $v0, $v0, $v1 /* E87B8 802C3E08 8C500000 */ lw $s0, 0x0($v0) /* E87BC 802C3E0C 52000022 */ beql $s0, $zero, .L802C3E98 /* E87C0 802C3E10 26940004 */ addiu $s4, $s4, 0x4 /* E87C4 802C3E14 8E030144 */ lw $v1, 0x144($s0) /* E87C8 802C3E18 8E820000 */ lw $v0, 0x0($s4) /* E87CC 802C3E1C 5462001E */ bnel $v1, $v0, .L802C3E98 /* E87D0 802C3E20 26940004 */ addiu $s4, $s4, 0x4 /* E87D4 802C3E24 92020000 */ lbu $v0, 0x0($s0) /* E87D8 802C3E28 5040001B */ beql $v0, $zero, .L802C3E98 /* E87DC 802C3E2C 26940004 */ addiu $s4, $s4, 0x4 /* E87E0 802C3E30 30420092 */ andi $v0, $v0, 0x92 /* E87E4 802C3E34 54400018 */ bnel $v0, $zero, .L802C3E98 /* E87E8 802C3E38 26940004 */ addiu $s4, $s4, 0x4 /* E87EC 802C3E3C C6020154 */ lwc1 $f2, 0x154($s0) /* E87F0 802C3E40 C6000150 */ lwc1 $f0, 0x150($s0) /* E87F4 802C3E44 46001080 */ add.s $f2, $f2, $f0 /* E87F8 802C3E48 0000882D */ daddu $s1, $zero, $zero /* E87FC 802C3E4C E6020154 */ swc1 $f2, 0x154($s0) .L802C3E50: /* E8800 802C3E50 C6000154 */ lwc1 $f0, 0x154($s0) /* E8804 802C3E54 46000021 */ cvt.d.s $f0, $f0 /* E8808 802C3E58 4634003C */ c.lt.d $f0, $f20 /* E880C 802C3E5C 00000000 */ nop /* E8810 802C3E60 4501000B */ bc1t .L802C3E90 /* E8814 802C3E64 0200202D */ daddu $a0, $s0, $zero /* E8818 802C3E68 46340001 */ sub.d $f0, $f0, $f20 /* E881C 802C3E6C 46200020 */ cvt.s.d $f0, $f0 /* E8820 802C3E70 0C0B1D01 */ jal evt_execute_next_command /* E8824 802C3E74 E6000154 */ swc1 $f0, 0x154($s0) /* E8828 802C3E78 14560003 */ bne $v0, $s6, .L802C3E88 /* E882C 802C3E7C 00000000 */ nop /* E8830 802C3E80 080B0FA4 */ j .L802C3E90 /* E8834 802C3E84 24110001 */ addiu $s1, $zero, 0x1 .L802C3E88: /* E8838 802C3E88 1455FFF1 */ bne $v0, $s5, .L802C3E50 /* E883C 802C3E8C 00000000 */ nop .L802C3E90: /* E8840 802C3E90 16200007 */ bnez $s1, .L802C3EB0 /* E8844 802C3E94 26940004 */ addiu $s4, $s4, 0x4 .L802C3E98: /* E8848 802C3E98 3C02802E */ lui $v0, %hi(gScriptListCount) /* E884C 802C3E9C 8C42AC98 */ lw $v0, %lo(gScriptListCount)($v0) /* E8850 802C3EA0 26520001 */ addiu $s2, $s2, 0x1 /* E8854 802C3EA4 0242102A */ slt $v0, $s2, $v0 /* E8858 802C3EA8 1440FFD2 */ bnez $v0, .L802C3DF4 /* E885C 802C3EAC 26730004 */ addiu $s3, $s3, 0x4 .L802C3EB0: /* E8860 802C3EB0 3C01802E */ lui $at, %hi(gIsUpdatingScripts) /* E8864 802C3EB4 AC209CA4 */ sw $zero, %lo(gIsUpdatingScripts)($at) .L802C3EB8: /* E8868 802C3EB8 8FBF002C */ lw $ra, 0x2C($sp) /* E886C 802C3EBC 8FB60028 */ lw $s6, 0x28($sp) /* E8870 802C3EC0 8FB50024 */ lw $s5, 0x24($sp) /* E8874 802C3EC4 8FB40020 */ lw $s4, 0x20($sp) /* E8878 802C3EC8 8FB3001C */ lw $s3, 0x1C($sp) /* E887C 802C3ECC 8FB20018 */ lw $s2, 0x18($sp) /* E8880 802C3ED0 8FB10014 */ lw $s1, 0x14($sp) /* E8884 802C3ED4 8FB00010 */ lw $s0, 0x10($sp) /* E8888 802C3ED8 D7B40030 */ ldc1 $f20, 0x30($sp) /* E888C 802C3EDC 03E00008 */ jr $ra /* E8890 802C3EE0 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void update_scripts(void) { if (gGameStatusPtr->disableScripts != TRUE) { s32 i; gIsUpdatingScripts = TRUE; sort_scripts(); for (i = 0; i < gScriptListCount; i++) { Evt* script = (*gCurrentScriptListPtr)[gScriptIndexList[i]]; if (script != NULL && script->id == gScriptIdList[i] && script->stateFlags != 0 && !(script->stateFlags & (EVT_FLAG_SUSPENDED | EVT_FLAG_BLOCKED_BY_CHILD | EVT_FLAG_SUSPENDED_IN_GROUP))) { s32 stop = FALSE; s32 status; script->frameCounter += script->timeScale; do { if (script->frameCounter < 1.0) { // Continue to next script do {} while (0); // TODO required to match break; }; script->frameCounter -= 1.0; status = evt_execute_next_command(script); if (status == EVT_CMD_RESULT_ERROR) { stop = TRUE; break; } } while (status != EVT_CMD_RESULT_YIELD); if (stop) { break; } } } gIsUpdatingScripts = FALSE; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_load_song_files /* 2F0F8 80053CF8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 2F0FC 80053CFC AFB20028 */ sw $s2, 0x28($sp) /* 2F100 80053D00 3C12800A */ lui $s2, %hi(gSoundGlobals) /* 2F104 80053D04 8E52A5C0 */ lw $s2, %lo(gSoundGlobals)($s2) /* 2F108 80053D08 AFB60038 */ sw $s6, 0x38($sp) /* 2F10C 80053D0C 0080B02D */ daddu $s6, $a0, $zero /* 2F110 80053D10 AFB3002C */ sw $s3, 0x2C($sp) /* 2F114 80053D14 00C0982D */ daddu $s3, $a2, $zero /* 2F118 80053D18 AFBF0044 */ sw $ra, 0x44($sp) /* 2F11C 80053D1C AFBE0040 */ sw $fp, 0x40($sp) /* 2F120 80053D20 AFB7003C */ sw $s7, 0x3C($sp) /* 2F124 80053D24 AFB50034 */ sw $s5, 0x34($sp) /* 2F128 80053D28 AFB40030 */ sw $s4, 0x30($sp) /* 2F12C 80053D2C AFB10024 */ sw $s1, 0x24($sp) /* 2F130 80053D30 AFB00020 */ sw $s0, 0x20($sp) /* 2F134 80053D34 AFA5004C */ sw $a1, 0x4C($sp) /* 2F138 80053D38 8E420030 */ lw $v0, 0x30($s2) /* 2F13C 80053D3C 02C2102B */ sltu $v0, $s6, $v0 /* 2F140 80053D40 10400038 */ beqz $v0, .L80053E24 /* 2F144 80053D44 00A0B82D */ daddu $s7, $a1, $zero /* 2F148 80053D48 24050010 */ addiu $a1, $zero, 0x10 /* 2F14C 80053D4C 8E43002C */ lw $v1, 0x2C($s2) /* 2F150 80053D50 001610C0 */ sll $v0, $s6, 3 /* 2F154 80053D54 0062A021 */ addu $s4, $v1, $v0 /* 2F158 80053D58 96840000 */ lhu $a0, 0x0($s4) /* 2F15C 80053D5C 0C01511F */ jal au_fetch_SBN_file /* 2F160 80053D60 03A53021 */ addu $a2, $sp, $a1 /* 2F164 80053D64 14400030 */ bnez $v0, .L80053E28 /* 2F168 80053D68 00000000 */ nop /* 2F16C 80053D6C 0C0136CA */ jal func_8004DB28 /* 2F170 80053D70 0260202D */ daddu $a0, $s3, $zero /* 2F174 80053D74 1440002C */ bnez $v0, .L80053E28 /* 2F178 80053D78 240200C9 */ addiu $v0, $zero, 0xC9 /* 2F17C 80053D7C 3C0200FF */ lui $v0, (0xFFFFFF >> 16) /* 2F180 80053D80 3442FFFF */ ori $v0, $v0, (0xFFFFFF & 0xFFFF) /* 2F184 80053D84 02E0282D */ daddu $a1, $s7, $zero /* 2F188 80053D88 0000802D */ daddu $s0, $zero, $zero /* 2F18C 80053D8C 3C1500FF */ lui $s5, (0xFFFFFF >> 16) /* 2F190 80053D90 36B5FFFF */ ori $s5, $s5, (0xFFFFFF & 0xFFFF) /* 2F194 80053D94 241E0030 */ addiu $fp, $zero, 0x30 /* 2F198 80053D98 0280882D */ daddu $s1, $s4, $zero /* 2F19C 80053D9C 8FA60014 */ lw $a2, 0x14($sp) /* 2F1A0 80053DA0 8FA40010 */ lw $a0, 0x10($sp) /* 2F1A4 80053DA4 0C015380 */ jal au_read_rom /* 2F1A8 80053DA8 00C23024 */ and $a2, $a2, $v0 .L80053DAC: /* 2F1AC 80053DAC 96220002 */ lhu $v0, 0x2($s1) /* 2F1B0 80053DB0 50400012 */ beql $v0, $zero, .L80053DFC /* 2F1B4 80053DB4 26100001 */ addiu $s0, $s0, 0x1 /* 2F1B8 80053DB8 8E440020 */ lw $a0, 0x20($s2) /* 2F1BC 80053DBC 000210C0 */ sll $v0, $v0, 3 /* 2F1C0 80053DC0 00822021 */ addu $a0, $a0, $v0 /* 2F1C4 80053DC4 8C820000 */ lw $v0, 0x0($a0) /* 2F1C8 80053DC8 8E43001C */ lw $v1, 0x1C($s2) /* 2F1CC 80053DCC 00551024 */ and $v0, $v0, $s5 /* 2F1D0 80053DD0 00431821 */ addu $v1, $v0, $v1 /* 2F1D4 80053DD4 AFA30018 */ sw $v1, 0x18($sp) /* 2F1D8 80053DD8 8C820004 */ lw $v0, 0x4($a0) /* 2F1DC 80053DDC AFA2001C */ sw $v0, 0x1C($sp) /* 2F1E0 80053DE0 00021602 */ srl $v0, $v0, 24 /* 2F1E4 80053DE4 545E0005 */ bnel $v0, $fp, .L80053DFC /* 2F1E8 80053DE8 26100001 */ addiu $s0, $s0, 0x1 /* 2F1EC 80053DEC 0060202D */ daddu $a0, $v1, $zero /* 2F1F0 80053DF0 0C015313 */ jal snd_load_BK /* 2F1F4 80053DF4 0200282D */ daddu $a1, $s0, $zero /* 2F1F8 80053DF8 26100001 */ addiu $s0, $s0, 0x1 .L80053DFC: /* 2F1FC 80053DFC 2A020003 */ slti $v0, $s0, 0x3 /* 2F200 80053E00 1440FFEA */ bnez $v0, .L80053DAC /* 2F204 80053E04 26310002 */ addiu $s1, $s1, 0x2 /* 2F208 80053E08 96820000 */ lhu $v0, 0x0($s4) /* 2F20C 80053E0C AE760028 */ sw $s6, 0x28($s3) /* 2F210 80053E10 8FA7004C */ lw $a3, 0x4C($sp) /* 2F214 80053E14 AE670064 */ sw $a3, 0x64($s3) /* 2F218 80053E18 AE620024 */ sw $v0, 0x24($s3) /* 2F21C 80053E1C 08014F8A */ j .L80053E28 /* 2F220 80053E20 8EE20008 */ lw $v0, 0x8($s7) .L80053E24: /* 2F224 80053E24 24020097 */ addiu $v0, $zero, 0x97 .L80053E28: /* 2F228 80053E28 8FBF0044 */ lw $ra, 0x44($sp) /* 2F22C 80053E2C 8FBE0040 */ lw $fp, 0x40($sp) /* 2F230 80053E30 8FB7003C */ lw $s7, 0x3C($sp) /* 2F234 80053E34 8FB60038 */ lw $s6, 0x38($sp) /* 2F238 80053E38 8FB50034 */ lw $s5, 0x34($sp) /* 2F23C 80053E3C 8FB40030 */ lw $s4, 0x30($sp) /* 2F240 80053E40 8FB3002C */ lw $s3, 0x2C($sp) /* 2F244 80053E44 8FB20028 */ lw $s2, 0x28($sp) /* 2F248 80053E48 8FB10024 */ lw $s1, 0x24($sp) /* 2F24C 80053E4C 8FB00020 */ lw $s0, 0x20($sp) /* 2F250 80053E50 03E00008 */ jr $ra /* 2F254 80053E54 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: AuResult au_load_song_files(u32 songID, BGMHeader* bgmFile, BGMPlayer* player) { AuResult status; SBNFileEntry fileEntry; SBNFileEntry fileEntry2; SBNFileEntry* bkFileEntry; AuGlobals* soundData; InitSongEntry* songInfo; s32 i; u16 bkFileIndex; s32 bgmFileIndex; u32 data; u32 offset; BGMPlayer* arg2_copy ; BGMHeader* arg1_copy; s32 cond; soundData = gSoundGlobals; // needed to match cond = songID < soundData->songListLength; arg2_copy = player; arg1_copy = bgmFile; if (cond) { songInfo = &soundData->songList[songID]; status = au_fetch_SBN_file(songInfo->bgmFileIndex, AU_FMT_BGM, &fileEntry); if (status != AU_RESULT_OK) { return status; } if (func_8004DB28(arg2_copy)) { return AU_ERROR_201; } au_read_rom(fileEntry.offset, arg1_copy, fileEntry.data & 0xFFFFFF); for (i = 0; i < ARRAY_COUNT(songInfo->bkFileIndex); i++) { bkFileIndex = songInfo->bkFileIndex[i]; if (bkFileIndex != 0) { bkFileEntry = &soundData->sbnFileList[bkFileIndex]; offset = (bkFileEntry->offset & 0xFFFFFF) + soundData->baseRomOffset; fileEntry2.offset = offset; data = bkFileEntry->data; fileEntry2.data = data; if ((data >> 0x18) == AU_FMT_BK) { snd_load_BK(offset, i); } } } bgmFileIndex = songInfo->bgmFileIndex; arg2_copy->songID = songID; arg2_copy->bgmFile = bgmFile; arg2_copy->bgmFileIndex = bgmFileIndex; return arg1_copy->name; } else { return AU_ERROR_151; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel hud_element_create /* D7BA4 801414A4 3C038015 */ lui $v1, %hi(gHudElements) /* D7BA8 801414A8 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* D7BAC 801414AC 27BDFFE0 */ addiu $sp, $sp, -0x20 /* D7BB0 801414B0 AFB20018 */ sw $s2, 0x18($sp) /* D7BB4 801414B4 0080902D */ daddu $s2, $a0, $zero /* D7BB8 801414B8 AFB10014 */ sw $s1, 0x14($sp) /* D7BBC 801414BC 0000882D */ daddu $s1, $zero, $zero /* D7BC0 801414C0 AFBF001C */ sw $ra, 0x1C($sp) /* D7BC4 801414C4 AFB00010 */ sw $s0, 0x10($sp) .L801414C8: /* D7BC8 801414C8 8C620000 */ lw $v0, 0x0($v1) /* D7BCC 801414CC 10400006 */ beqz $v0, .L801414E8 /* D7BD0 801414D0 2A220140 */ slti $v0, $s1, 0x140 /* D7BD4 801414D4 26310001 */ addiu $s1, $s1, 0x1 /* D7BD8 801414D8 2A220140 */ slti $v0, $s1, 0x140 /* D7BDC 801414DC 1440FFFA */ bnez $v0, .L801414C8 /* D7BE0 801414E0 24630004 */ addiu $v1, $v1, 0x4 /* D7BE4 801414E4 2A220140 */ slti $v0, $s1, 0x140 .L801414E8: /* D7BE8 801414E8 14400003 */ bnez $v0, .L801414F8 /* D7BEC 801414EC 00000000 */ nop .L801414F0: /* D7BF0 801414F0 0805053C */ j .L801414F0 /* D7BF4 801414F4 00000000 */ nop .L801414F8: /* D7BF8 801414F8 0C00AB39 */ jal heap_malloc /* D7BFC 801414FC 24040054 */ addiu $a0, $zero, 0x54 /* D7C00 80141500 00112080 */ sll $a0, $s1, 2 /* D7C04 80141504 3C038015 */ lui $v1, %hi(gHudElements) /* D7C08 80141508 8C637960 */ lw $v1, %lo(gHudElements)($v1) /* D7C0C 8014150C 3C058015 */ lui $a1, %hi(gHudElementsNumber) /* D7C10 80141510 24A512B4 */ addiu $a1, $a1, %lo(gHudElementsNumber) /* D7C14 80141514 00832021 */ addu $a0, $a0, $v1 /* D7C18 80141518 8CA30000 */ lw $v1, 0x0($a1) /* D7C1C 8014151C 0040802D */ daddu $s0, $v0, $zero /* D7C20 80141520 AC900000 */ sw $s0, 0x0($a0) /* D7C24 80141524 24630001 */ addiu $v1, $v1, 0x1 /* D7C28 80141528 16000003 */ bnez $s0, .L80141538 /* D7C2C 8014152C ACA30000 */ sw $v1, 0x0($a1) .L80141530: /* D7C30 80141530 0805054C */ j .L80141530 /* D7C34 80141534 00000000 */ nop .L80141538: /* D7C38 80141538 24030001 */ addiu $v1, $zero, 0x1 /* D7C3C 8014153C AE030000 */ sw $v1, 0x0($s0) /* D7C40 80141540 16400004 */ bnez $s2, .L80141554 /* D7C44 80141544 AE120004 */ sw $s2, 0x4($s0) /* D7C48 80141548 3C028015 */ lui $v0, %hi(HES_Empty) /* D7C4C 8014154C 2442EFC8 */ addiu $v0, $v0, %lo(HES_Empty) /* D7C50 80141550 AE020004 */ sw $v0, 0x4($s0) .L80141554: /* D7C54 80141554 A2030047 */ sb $v1, 0x47($s0) /* D7C58 80141558 8E030004 */ lw $v1, 0x4($s0) /* D7C5C 8014155C 3C013F80 */ lui $at, (0x3F800000 >> 16) /* D7C60 80141560 44810000 */ mtc1 $at, $f0 /* D7C64 80141564 2402FFFF */ addiu $v0, $zero, -0x1 /* D7C68 80141568 A2020045 */ sb $v0, 0x45($s0) /* D7C6C 8014156C A2020046 */ sb $v0, 0x46($s0) /* D7C70 80141570 240200FF */ addiu $v0, $zero, 0xFF /* D7C74 80141574 A2000040 */ sb $zero, 0x40($s0) /* D7C78 80141578 A2000041 */ sb $zero, 0x41($s0) /* D7C7C 8014157C A2000042 */ sb $zero, 0x42($s0) /* D7C80 80141580 A2000043 */ sb $zero, 0x43($s0) /* D7C84 80141584 A2000044 */ sb $zero, 0x44($s0) /* D7C88 80141588 A202004A */ sb $v0, 0x4A($s0) /* D7C8C 8014158C A202004B */ sb $v0, 0x4B($s0) /* D7C90 80141590 A202004C */ sb $v0, 0x4C($s0) /* D7C94 80141594 A202004D */ sb $v0, 0x4D($s0) /* D7C98 80141598 3C048007 */ lui $a0, %hi(gGameStatusPtr) /* D7C9C 8014159C 8C84419C */ lw $a0, %lo(gGameStatusPtr)($a0) /* D7CA0 801415A0 24020400 */ addiu $v0, $zero, 0x400 /* D7CA4 801415A4 A600003C */ sh $zero, 0x3C($s0) /* D7CA8 801415A8 A600003E */ sh $zero, 0x3E($s0) /* D7CAC 801415AC AE12000C */ sw $s2, 0xC($s0) /* D7CB0 801415B0 AE020034 */ sw $v0, 0x34($s0) /* D7CB4 801415B4 AE020038 */ sw $v0, 0x38($s0) /* D7CB8 801415B8 AE030008 */ sw $v1, 0x8($s0) /* D7CBC 801415BC E6000030 */ swc1 $f0, 0x30($s0) /* D7CC0 801415C0 80820070 */ lb $v0, 0x70($a0) /* D7CC4 801415C4 10400005 */ beqz $v0, .L801415DC /* D7CC8 801415C8 00000000 */ nop /* D7CCC 801415CC 8E020000 */ lw $v0, 0x0($s0) /* D7CD0 801415D0 36310800 */ ori $s1, $s1, 0x800 /* D7CD4 801415D4 34420400 */ ori $v0, $v0, 0x400 /* D7CD8 801415D8 AE020000 */ sw $v0, 0x0($s0) .L801415DC: /* D7CDC 801415DC 8E050004 */ lw $a1, 0x4($s0) /* D7CE0 801415E0 0C04FCD4 */ jal hud_element_load_script /* D7CE4 801415E4 0200202D */ daddu $a0, $s0, $zero .L801415E8: /* D7CE8 801415E8 0C0505C1 */ jal hud_element_update /* D7CEC 801415EC 0200202D */ daddu $a0, $s0, $zero /* D7CF0 801415F0 1440FFFD */ bnez $v0, .L801415E8 /* D7CF4 801415F4 0220102D */ daddu $v0, $s1, $zero /* D7CF8 801415F8 8FBF001C */ lw $ra, 0x1C($sp) /* D7CFC 801415FC 8FB20018 */ lw $s2, 0x18($sp) /* D7D00 80141600 8FB10014 */ lw $s1, 0x14($sp) /* D7D04 80141604 8FB00010 */ lw $s0, 0x10($sp) /* D7D08 80141608 03E00008 */ jr $ra /* D7D0C 8014160C 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: s32 hud_element_create(HudScript* anim) { HudElement* hudElement; s32 id; for (id = 0; id < ARRAY_COUNT(*gHudElements); id++) { if ((*gHudElements)[id] == NULL) { break; } } ASSERT(id < ARRAY_COUNT(*gHudElements)); (*gHudElements)[id] = hudElement = heap_malloc(sizeof(*hudElement)); gHudElementsNumber += 1; ASSERT(hudElement != NULL); hudElement->flags = HUD_ELEMENT_FLAG_INITIALIZED; hudElement->readPos = anim; if (anim == NULL) { hudElement->readPos = &HES_Empty; } hudElement->updateTimer = 1; hudElement->drawSizePreset = -1; hudElement->tileSizePreset = -1; hudElement->renderPosX = 0; hudElement->renderPosY = 0; hudElement->loopStartPos = anim; hudElement->widthScale = X10(1.0f); hudElement->heightScale = X10(1.0f); hudElement->anim = hudElement->readPos; hudElement->uniformScale = 1.0f; hudElement->screenPosOffset.x = 0; hudElement->screenPosOffset.y = 0; hudElement->worldPosOffset.x = 0; hudElement->worldPosOffset.y = 0; hudElement->worldPosOffset.z = 0; hudElement->opacity = 255; hudElement->tint.r = 255; hudElement->tint.g = 255; hudElement->tint.b = 255; if (gGameStatusPtr->isBattle) { hudElement->flags |= HUD_ELEMENT_FLAG_BATTLE; id |= HUD_ELEMENT_BATTLE_ID_MASK; } hud_element_load_script(hudElement, hudElement->readPos); while (hud_element_update(hudElement) != 0); return id; }
### RAW ASSEMBLY INSTRUCTIONS: glabel lens_flare_update /* 344B20 E0034110 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 344B24 E0034114 AFBF0018 */ sw $ra, 0x18($sp) /* 344B28 E0034118 AFB10014 */ sw $s1, 0x14($sp) /* 344B2C E003411C AFB00010 */ sw $s0, 0x10($sp) /* 344B30 E0034120 8C90000C */ lw $s0, 0xC($a0) /* 344B34 E0034124 8E02002C */ lw $v0, 0x2C($s0) /* 344B38 E0034128 2442FFFF */ addiu $v0, $v0, -0x1 /* 344B3C E003412C AE02002C */ sw $v0, 0x2C($s0) /* 344B40 E0034130 8E020030 */ lw $v0, 0x30($s0) /* 344B44 E0034134 8E03002C */ lw $v1, 0x2C($s0) /* 344B48 E0034138 24420001 */ addiu $v0, $v0, 0x1 /* 344B4C E003413C 04610005 */ bgez $v1, .LE0034154 /* 344B50 E0034140 AE020030 */ sw $v0, 0x30($s0) /* 344B54 E0034144 0C080128 */ jal shim_remove_effect /* 344B58 E0034148 00000000 */ nop /* 344B5C E003414C 0800D0AD */ j .LE00342B4 /* 344B60 E0034150 00000000 */ nop .LE0034154: /* 344B64 E0034154 28420007 */ slti $v0, $v0, 0x7 /* 344B68 E0034158 10400011 */ beqz $v0, .LE00341A0 /* 344B6C E003415C 0060882D */ daddu $s1, $v1, $zero /* 344B70 E0034160 240200DA */ addiu $v0, $zero, 0xDA /* 344B74 E0034164 8E030024 */ lw $v1, 0x24($s0) /* 344B78 E0034168 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 344B7C E003416C 44810800 */ mtc1 $at, $f1 /* 344B80 E0034170 44800000 */ mtc1 $zero, $f0 /* 344B84 E0034174 00431023 */ subu $v0, $v0, $v1 /* 344B88 E0034178 44821000 */ mtc1 $v0, $f2 /* 344B8C E003417C 00000000 */ nop /* 344B90 E0034180 468010A1 */ cvt.d.w $f2, $f2 /* 344B94 E0034184 46201082 */ mul.d $f2, $f2, $f0 /* 344B98 E0034188 00000000 */ nop /* 344B9C E003418C 44830000 */ mtc1 $v1, $f0 /* 344BA0 E0034190 00000000 */ nop /* 344BA4 E0034194 46800021 */ cvt.d.w $f0, $f0 /* 344BA8 E0034198 0800D06E */ j .LE00341B8 /* 344BAC E003419C 46220000 */ add.d $f0, $f0, $f2 .LE00341A0: /* 344BB0 E00341A0 3C01E003 */ lui $at, (0xE00347B0 >> 16) /* 344BB4 E00341A4 D42247B0 */ ldc1 $f2, (0xE00347B0 & 0xFFFF)($at) /* 344BB8 E00341A8 C6000024 */ lwc1 $f0, 0x24($s0) /* 344BBC E00341AC 46800021 */ cvt.d.w $f0, $f0 /* 344BC0 E00341B0 46220002 */ mul.d $f0, $f0, $f2 /* 344BC4 E00341B4 00000000 */ nop .LE00341B8: /* 344BC8 E00341B8 4620028D */ trunc.w.d $f10, $f0 /* 344BCC E00341BC E60A0024 */ swc1 $f10, 0x24($s0) /* 344BD0 E00341C0 00111040 */ sll $v0, $s1, 1 /* 344BD4 E00341C4 00511021 */ addu $v0, $v0, $s1 /* 344BD8 E00341C8 C6040014 */ lwc1 $f4, 0x14($s0) /* 344BDC E00341CC 3C01E003 */ lui $at, (0xE00347B8 >> 16) /* 344BE0 E00341D0 D42247B8 */ ldc1 $f2, (0xE00347B8 & 0xFFFF)($at) /* 344BE4 E00341D4 46002121 */ cvt.d.s $f4, $f4 /* 344BE8 E00341D8 46222102 */ mul.d $f4, $f4, $f2 /* 344BEC E00341DC 00000000 */ nop /* 344BF0 E00341E0 000210C0 */ sll $v0, $v0, 3 /* 344BF4 E00341E4 00511021 */ addu $v0, $v0, $s1 /* 344BF8 E00341E8 00021040 */ sll $v0, $v0, 1 /* 344BFC E00341EC C600001C */ lwc1 $f0, 0x1C($s0) /* 344C00 E00341F0 C6060018 */ lwc1 $f6, 0x18($s0) /* 344C04 E00341F4 C602001C */ lwc1 $f2, 0x1C($s0) /* 344C08 E00341F8 C6080014 */ lwc1 $f8, 0x14($s0) /* 344C0C E00341FC 46023180 */ add.s $f6, $f6, $f2 /* 344C10 E0034200 3C01E003 */ lui $at, (0xE00347C0 >> 16) /* 344C14 E0034204 D42247C0 */ ldc1 $f2, (0xE00347C0 & 0xFFFF)($at) /* 344C18 E0034208 46000021 */ cvt.d.s $f0, $f0 /* 344C1C E003420C 46220000 */ add.d $f0, $f0, $f2 /* 344C20 E0034210 C6020010 */ lwc1 $f2, 0x10($s0) /* 344C24 E0034214 44826000 */ mtc1 $v0, $f12 /* 344C28 E0034218 00000000 */ nop /* 344C2C E003421C 46806320 */ cvt.s.w $f12, $f12 /* 344C30 E0034220 46081080 */ add.s $f2, $f2, $f8 /* 344C34 E0034224 E6060018 */ swc1 $f6, 0x18($s0) /* 344C38 E0034228 46200020 */ cvt.s.d $f0, $f0 /* 344C3C E003422C E600001C */ swc1 $f0, 0x1C($s0) /* 344C40 E0034230 E6020010 */ swc1 $f2, 0x10($s0) /* 344C44 E0034234 46202120 */ cvt.s.d $f4, $f4 /* 344C48 E0034238 0C080140 */ jal shim_sin_deg /* 344C4C E003423C E6040014 */ swc1 $f4, 0x14($s0) /* 344C50 E0034240 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 344C54 E0034244 44811800 */ mtc1 $at, $f3 /* 344C58 E0034248 44801000 */ mtc1 $zero, $f2 /* 344C5C E003424C 46000021 */ cvt.d.s $f0, $f0 /* 344C60 E0034250 46220002 */ mul.d $f0, $f0, $f2 /* 344C64 E0034254 00000000 */ nop /* 344C68 E0034258 00111080 */ sll $v0, $s1, 2 /* 344C6C E003425C 3C01E003 */ lui $at, (0xE00347C8 >> 16) /* 344C70 E0034260 D42247C8 */ ldc1 $f2, (0xE00347C8 & 0xFFFF)($at) /* 344C74 E0034264 00511021 */ addu $v0, $v0, $s1 /* 344C78 E0034268 46220000 */ add.d $f0, $f0, $f2 /* 344C7C E003426C 000210C0 */ sll $v0, $v0, 3 /* 344C80 E0034270 44826000 */ mtc1 $v0, $f12 /* 344C84 E0034274 00000000 */ nop /* 344C88 E0034278 46806320 */ cvt.s.w $f12, $f12 /* 344C8C E003427C 46200020 */ cvt.s.d $f0, $f0 /* 344C90 E0034280 0C080140 */ jal shim_sin_deg /* 344C94 E0034284 E6000020 */ swc1 $f0, 0x20($s0) /* 344C98 E0034288 3C014280 */ lui $at, (0x42800000 >> 16) /* 344C9C E003428C 44811000 */ mtc1 $at, $f2 /* 344CA0 E0034290 00000000 */ nop /* 344CA4 E0034294 46020002 */ mul.s $f0, $f0, $f2 /* 344CA8 E0034298 00000000 */ nop /* 344CAC E003429C 3C014310 */ lui $at, (0x43100000 >> 16) /* 344CB0 E00342A0 44811000 */ mtc1 $at, $f2 /* 344CB4 E00342A4 00000000 */ nop /* 344CB8 E00342A8 46020000 */ add.s $f0, $f0, $f2 /* 344CBC E00342AC 4600028D */ trunc.w.s $f10, $f0 /* 344CC0 E00342B0 E60A0028 */ swc1 $f10, 0x28($s0) .LE00342B4: /* 344CC4 E00342B4 8FBF0018 */ lw $ra, 0x18($sp) /* 344CC8 E00342B8 8FB10014 */ lw $s1, 0x14($sp) /* 344CCC E00342BC 8FB00010 */ lw $s0, 0x10($sp) /* 344CD0 E00342C0 03E00008 */ jr $ra /* 344CD4 E00342C4 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void lens_flare_update(EffectInstance* effect) { LensFlareFXData* data = effect->data.lensFlare; s32 time; data->timeLeft--; data->lifetime++; if (data->timeLeft < 0) { shim_remove_effect(effect); return; } time = data->timeLeft; if (data->lifetime < 7) { data->largeFlareAlpha += (218 - data->largeFlareAlpha) * 0.5; } else { data->largeFlareAlpha *= 0.78; } data->largeFlareScale += data->largeFlareScaleVel; data->largeFlareScaleVel += 0.29; data->largeFlareRot += data->largeFlareRotVel; data->largeFlareRotVel *= 0.93; data->smallFlareScale = shim_sin_deg(time * 50) * 0.5 + 0.9; data->smallFlareAlpha = shim_sin_deg(time * 40) * 64.0f + 144.0f; }
### RAW ASSEMBLY INSTRUCTIONS: glabel render_animated_models /* F14C8 802CCB18 27BDFDA8 */ addiu $sp, $sp, -0x258 /* F14CC 802CCB1C F7B60250 */ sdc1 $f22, 0x250($sp) /* F14D0 802CCB20 3C013F80 */ lui $at, (0x3F800000 >> 16) /* F14D4 802CCB24 4481B000 */ mtc1 $at, $f22 /* F14D8 802CCB28 AFB3022C */ sw $s3, 0x22C($sp) /* F14DC 802CCB2C 0000982D */ daddu $s3, $zero, $zero /* F14E0 802CCB30 F7B40248 */ sdc1 $f20, 0x248($sp) /* F14E4 802CCB34 4480A000 */ mtc1 $zero, $f20 /* F14E8 802CCB38 27A80058 */ addiu $t0, $sp, 0x58 /* F14EC 802CCB3C AFBE0240 */ sw $fp, 0x240($sp) /* F14F0 802CCB40 27BE0098 */ addiu $fp, $sp, 0x98 /* F14F4 802CCB44 AFB7023C */ sw $s7, 0x23C($sp) /* F14F8 802CCB48 27B700D8 */ addiu $s7, $sp, 0xD8 /* F14FC 802CCB4C AFB60238 */ sw $s6, 0x238($sp) /* F1500 802CCB50 27B601D8 */ addiu $s6, $sp, 0x1D8 /* F1504 802CCB54 AFB20228 */ sw $s2, 0x228($sp) /* F1508 802CCB58 27B20158 */ addiu $s2, $sp, 0x158 /* F150C 802CCB5C AFB50234 */ sw $s5, 0x234($sp) /* F1510 802CCB60 27B50118 */ addiu $s5, $sp, 0x118 /* F1514 802CCB64 AFB40230 */ sw $s4, 0x230($sp) /* F1518 802CCB68 27B40198 */ addiu $s4, $sp, 0x198 /* F151C 802CCB6C AFBF0244 */ sw $ra, 0x244($sp) /* F1520 802CCB70 AFB10224 */ sw $s1, 0x224($sp) /* F1524 802CCB74 AFB00220 */ sw $s0, 0x220($sp) /* F1528 802CCB78 AFA80218 */ sw $t0, 0x218($sp) .L802CCB7C: /* F152C 802CCB7C 3C02802E */ lui $v0, %hi(gCurrentMeshAnimationListPtr) /* F1530 802CCB80 8C42AE30 */ lw $v0, %lo(gCurrentMeshAnimationListPtr)($v0) /* F1534 802CCB84 00131880 */ sll $v1, $s3, 2 /* F1538 802CCB88 00621821 */ addu $v1, $v1, $v0 /* F153C 802CCB8C 8C710000 */ lw $s1, 0x0($v1) /* F1540 802CCB90 8E220000 */ lw $v0, 0x0($s1) /* F1544 802CCB94 04420035 */ bltzl $v0, .L802CCC6C /* F1548 802CCB98 26730001 */ addiu $s3, $s3, 0x1 /* F154C 802CCB9C 8E250004 */ lw $a1, 0x4($s1) /* F1550 802CCBA0 8E260008 */ lw $a2, 0x8($s1) /* F1554 802CCBA4 8E27000C */ lw $a3, 0xC($s1) /* F1558 802CCBA8 0C019E40 */ jal guTranslateF /* F155C 802CCBAC 27A40018 */ addiu $a0, $sp, 0x18 /* F1560 802CCBB0 E7B40010 */ swc1 $f20, 0x10($sp) /* F1564 802CCBB4 8E250010 */ lw $a1, 0x10($s1) /* F1568 802CCBB8 4406B000 */ mfc1 $a2, $f22 /* F156C 802CCBBC 4407A000 */ mfc1 $a3, $f20 /* F1570 802CCBC0 8FA40218 */ lw $a0, 0x218($sp) /* F1574 802CCBC4 0C019EC8 */ jal guRotateF /* F1578 802CCBC8 26300028 */ addiu $s0, $s1, 0x28 /* F157C 802CCBCC E7B40010 */ swc1 $f20, 0x10($sp) /* F1580 802CCBD0 8E250014 */ lw $a1, 0x14($s1) /* F1584 802CCBD4 4406A000 */ mfc1 $a2, $f20 /* F1588 802CCBD8 4407B000 */ mfc1 $a3, $f22 /* F158C 802CCBDC 0C019EC8 */ jal guRotateF /* F1590 802CCBE0 03C0202D */ daddu $a0, $fp, $zero /* F1594 802CCBE4 E7B60010 */ swc1 $f22, 0x10($sp) /* F1598 802CCBE8 8E250018 */ lw $a1, 0x18($s1) /* F159C 802CCBEC 4406A000 */ mfc1 $a2, $f20 /* F15A0 802CCBF0 4407A000 */ mfc1 $a3, $f20 /* F15A4 802CCBF4 0C019EC8 */ jal guRotateF /* F15A8 802CCBF8 02E0202D */ daddu $a0, $s7, $zero /* F15AC 802CCBFC 8E25001C */ lw $a1, 0x1C($s1) /* F15B0 802CCC00 8E260020 */ lw $a2, 0x20($s1) /* F15B4 802CCC04 8E270024 */ lw $a3, 0x24($s1) /* F15B8 802CCC08 0C019DF0 */ jal guScaleF /* F15BC 802CCC0C 02C0202D */ daddu $a0, $s6, $zero /* F15C0 802CCC10 02E0202D */ daddu $a0, $s7, $zero /* F15C4 802CCC14 8FA50218 */ lw $a1, 0x218($sp) /* F15C8 802CCC18 0C019D80 */ jal guMtxCatF /* F15CC 802CCC1C 0240302D */ daddu $a2, $s2, $zero /* F15D0 802CCC20 0240202D */ daddu $a0, $s2, $zero /* F15D4 802CCC24 03C0282D */ daddu $a1, $fp, $zero /* F15D8 802CCC28 0C019D80 */ jal guMtxCatF /* F15DC 802CCC2C 02A0302D */ daddu $a2, $s5, $zero /* F15E0 802CCC30 02C0202D */ daddu $a0, $s6, $zero /* F15E4 802CCC34 02A0282D */ daddu $a1, $s5, $zero /* F15E8 802CCC38 0C019D80 */ jal guMtxCatF /* F15EC 802CCC3C 0240302D */ daddu $a2, $s2, $zero /* F15F0 802CCC40 0240202D */ daddu $a0, $s2, $zero /* F15F4 802CCC44 27A50018 */ addiu $a1, $sp, 0x18 /* F15F8 802CCC48 0C019D80 */ jal guMtxCatF /* F15FC 802CCC4C 0280302D */ daddu $a2, $s4, $zero /* F1600 802CCC50 0280202D */ daddu $a0, $s4, $zero /* F1604 802CCC54 0C019D40 */ jal guMtxF2L /* F1608 802CCC58 0200282D */ daddu $a1, $s0, $zero /* F160C 802CCC5C 8E240000 */ lw $a0, 0x0($s1) /* F1610 802CCC60 0C047CC1 */ jal render_animated_model /* F1614 802CCC64 0200282D */ daddu $a1, $s0, $zero /* F1618 802CCC68 26730001 */ addiu $s3, $s3, 0x1 .L802CCC6C: /* F161C 802CCC6C 2A620010 */ slti $v0, $s3, 0x10 /* F1620 802CCC70 1440FFC2 */ bnez $v0, .L802CCB7C /* F1624 802CCC74 00000000 */ nop /* F1628 802CCC78 8FBF0244 */ lw $ra, 0x244($sp) /* F162C 802CCC7C 8FBE0240 */ lw $fp, 0x240($sp) /* F1630 802CCC80 8FB7023C */ lw $s7, 0x23C($sp) /* F1634 802CCC84 8FB60238 */ lw $s6, 0x238($sp) /* F1638 802CCC88 8FB50234 */ lw $s5, 0x234($sp) /* F163C 802CCC8C 8FB40230 */ lw $s4, 0x230($sp) /* F1640 802CCC90 8FB3022C */ lw $s3, 0x22C($sp) /* F1644 802CCC94 8FB20228 */ lw $s2, 0x228($sp) /* F1648 802CCC98 8FB10224 */ lw $s1, 0x224($sp) /* F164C 802CCC9C 8FB00220 */ lw $s0, 0x220($sp) /* F1650 802CCCA0 D7B60250 */ ldc1 $f22, 0x250($sp) /* F1654 802CCCA4 D7B40248 */ ldc1 $f20, 0x248($sp) /* F1658 802CCCA8 03E00008 */ jr $ra /* F165C 802CCCAC 27BD0258 */ addiu $sp, $sp, 0x258 ### DECOMPILED C INSTRUCTIONS: void render_animated_models(void) { Matrix4f sp18; Matrix4f sp58; Matrix4f sp98; Matrix4f spD8; Matrix4f sp118; Matrix4f sp158; Matrix4f sp198; Matrix4f sp1D8; s32 i = 0; Matrix4f* sp218 = &sp58; for (; i < MAX_ANIMATED_MODELS; i++) { AnimatedModel* model = (*gCurrentMeshAnimationListPtr)[i]; if (model->animModelID >= 0) { guTranslateF(sp18, model->pos.x, model->pos.y, model->pos.z); guRotateF(*sp218, model->rot.x, 1.0f, 0.0f, 0.0f); guRotateF(sp98, model->rot.y, 0.0f, 1.0f, 0.0f); guRotateF(spD8, model->rot.z, 0.0f, 0.0f, 1.0f); guScaleF(sp1D8, model->scale.x, model->scale.y, model->scale.z); guMtxCatF(spD8, *sp218, sp158); guMtxCatF(sp158, sp98, sp118); guMtxCatF(sp1D8, sp118, sp158); guMtxCatF(sp158, sp18, sp198); guMtxF2L(sp198, &model->mtx); render_animated_model(model->animModelID, &model->mtx); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E01166E8 /* 402D28 E01166E8 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 402D2C E01166EC AFB000A0 */ sw $s0, 0xA0($sp) /* 402D30 E01166F0 AFBF00AC */ sw $ra, 0xAC($sp) /* 402D34 E01166F4 AFB200A8 */ sw $s2, 0xA8($sp) /* 402D38 E01166F8 AFB100A4 */ sw $s1, 0xA4($sp) /* 402D3C E01166FC F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 402D40 E0116700 1480000F */ bnez $a0, .LE0116740 /* 402D44 E0116704 00A0802D */ daddu $s0, $a1, $zero /* 402D48 E0116708 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 402D4C E011670C 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 402D50 E0116710 00021880 */ sll $v1, $v0, 2 /* 402D54 E0116714 00621821 */ addu $v1, $v1, $v0 /* 402D58 E0116718 00031880 */ sll $v1, $v1, 2 /* 402D5C E011671C 00621823 */ subu $v1, $v1, $v0 /* 402D60 E0116720 000310C0 */ sll $v0, $v1, 3 /* 402D64 E0116724 00621821 */ addu $v1, $v1, $v0 /* 402D68 E0116728 000318C0 */ sll $v1, $v1, 3 /* 402D6C E011672C 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 402D70 E0116730 00230821 */ addu $at, $at, $v1 /* 402D74 E0116734 C4261DEC */ lwc1 $f6, %lo(gCameras + 0x6C)($at) /* 402D78 E0116738 080459D1 */ j .LE0116744 /* 402D7C E011673C 00000000 */ nop .LE0116740: /* 402D80 E0116740 44803000 */ mtc1 $zero, $f6 .LE0116744: /* 402D84 E0116744 C6000018 */ lwc1 $f0, 0x18($s0) /* 402D88 E0116748 C6040020 */ lwc1 $f4, 0x20($s0) /* 402D8C E011674C 3C014000 */ lui $at, (0x40000000 >> 16) /* 402D90 E0116750 44811000 */ mtc1 $at, $f2 /* 402D94 E0116754 E7A00010 */ swc1 $f0, 0x10($sp) /* 402D98 E0116758 C6000004 */ lwc1 $f0, 0x4($s0) /* 402D9C E011675C 4480A000 */ mtc1 $zero, $f20 /* 402DA0 E0116760 46020000 */ add.s $f0, $f0, $f2 /* 402DA4 E0116764 4405A000 */ mfc1 $a1, $f20 /* 402DA8 E0116768 27A40020 */ addiu $a0, $sp, 0x20 /* 402DAC E011676C E7A00014 */ swc1 $f0, 0x14($sp) /* 402DB0 E0116770 C6000008 */ lwc1 $f0, 0x8($s0) /* 402DB4 E0116774 46062101 */ sub.s $f4, $f4, $f6 /* 402DB8 E0116778 E7A00018 */ swc1 $f0, 0x18($sp) /* 402DBC E011677C C600000C */ lwc1 $f0, 0xC($s0) /* 402DC0 E0116780 4407A000 */ mfc1 $a3, $f20 /* 402DC4 E0116784 46020000 */ add.s $f0, $f0, $f2 /* 402DC8 E0116788 44062000 */ mfc1 $a2, $f4 /* 402DCC E011678C 3C120001 */ lui $s2, (0x11630 >> 16) /* 402DD0 E0116790 0C080180 */ jal shim_guPositionF /* 402DD4 E0116794 E7A0001C */ swc1 $f0, 0x1C($sp) /* 402DD8 E0116798 4406A000 */ mfc1 $a2, $f20 /* 402DDC E011679C 4407A000 */ mfc1 $a3, $f20 /* 402DE0 E01167A0 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 402DE4 E01167A4 44810000 */ mtc1 $at, $f0 /* 402DE8 E01167A8 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 402DEC E01167AC E7A00010 */ swc1 $f0, 0x10($sp) /* 402DF0 E01167B0 8E05001C */ lw $a1, 0x1C($s0) /* 402DF4 E01167B4 27B00060 */ addiu $s0, $sp, 0x60 /* 402DF8 E01167B8 0C080104 */ jal shim_guRotateF /* 402DFC E01167BC 0200202D */ daddu $a0, $s0, $zero /* 402E00 E01167C0 0200202D */ daddu $a0, $s0, $zero /* 402E04 E01167C4 27A50020 */ addiu $a1, $sp, 0x20 /* 402E08 E01167C8 0C080114 */ jal shim_guMtxCatF /* 402E0C E01167CC 00A0302D */ daddu $a2, $a1, $zero /* 402E10 E01167D0 0200202D */ daddu $a0, $s0, $zero /* 402E14 E01167D4 4405A000 */ mfc1 $a1, $f20 /* 402E18 E01167D8 3C07C000 */ lui $a3, (0xC0000000 >> 16) /* 402E1C E01167DC 0C080108 */ jal shim_guTranslateF /* 402E20 E01167E0 00A0302D */ daddu $a2, $a1, $zero /* 402E24 E01167E4 0200202D */ daddu $a0, $s0, $zero /* 402E28 E01167E8 27A50020 */ addiu $a1, $sp, 0x20 /* 402E2C E01167EC 0C080114 */ jal shim_guMtxCatF /* 402E30 E01167F0 00A0302D */ daddu $a2, $a1, $zero /* 402E34 E01167F4 27A40020 */ addiu $a0, $sp, 0x20 /* 402E38 E01167F8 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 402E3C E01167FC 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 402E40 E0116800 3C11800A */ lui $s1, %hi(gDisplayContext) /* 402E44 E0116804 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 402E48 E0116808 96050000 */ lhu $a1, 0x0($s0) /* 402E4C E011680C 8E220000 */ lw $v0, 0x0($s1) /* 402E50 E0116810 00052980 */ sll $a1, $a1, 6 /* 402E54 E0116814 00B22821 */ addu $a1, $a1, $s2 /* 402E58 E0116818 0C080118 */ jal shim_guMtxF2L /* 402E5C E011681C 00452821 */ addu $a1, $v0, $a1 /* 402E60 E0116820 3C05DA38 */ lui $a1, (0xDA380002 >> 16) /* 402E64 E0116824 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 402E68 E0116828 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 402E6C E011682C 34A50002 */ ori $a1, $a1, (0xDA380002 & 0xFFFF) /* 402E70 E0116830 8C830000 */ lw $v1, 0x0($a0) /* 402E74 E0116834 96020000 */ lhu $v0, 0x0($s0) /* 402E78 E0116838 0060302D */ daddu $a2, $v1, $zero /* 402E7C E011683C 24630008 */ addiu $v1, $v1, 0x8 /* 402E80 E0116840 AC830000 */ sw $v1, 0x0($a0) /* 402E84 E0116844 24430001 */ addiu $v1, $v0, 0x1 /* 402E88 E0116848 3042FFFF */ andi $v0, $v0, 0xFFFF /* 402E8C E011684C 00021180 */ sll $v0, $v0, 6 /* 402E90 E0116850 ACC50000 */ sw $a1, 0x0($a2) /* 402E94 E0116854 A6030000 */ sh $v1, 0x0($s0) /* 402E98 E0116858 8E230000 */ lw $v1, 0x0($s1) /* 402E9C E011685C 00521021 */ addu $v0, $v0, $s2 /* 402EA0 E0116860 00621821 */ addu $v1, $v1, $v0 /* 402EA4 E0116864 ACC30004 */ sw $v1, 0x4($a2) /* 402EA8 E0116868 8FBF00AC */ lw $ra, 0xAC($sp) /* 402EAC E011686C 8FB200A8 */ lw $s2, 0xA8($sp) /* 402EB0 E0116870 8FB100A4 */ lw $s1, 0xA4($sp) /* 402EB4 E0116874 8FB000A0 */ lw $s0, 0xA0($sp) /* 402EB8 E0116878 D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 402EBC E011687C 03E00008 */ jr $ra /* 402EC0 E0116880 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: void func_E01166E8(s32 arg0, SomethingRotatingFXData* part) { f32 temp; Matrix4f sp20; Matrix4f sp60; if (arg0 == 0) { temp = gCameras[gCurrentCameraID].currentYaw; } else { temp = 0.0f; } shim_guPositionF(sp20, 0.0f, part->unk_20 - temp, 0.0f, part->unk_18, part->pos.x + 2.0f, part->pos.y, part->pos.z + 2.0f ); shim_guRotateF(sp60, part->unk_1C, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guTranslateF(sp60, 0.0f, 0.0f, -2.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8024E604 /* 141944 8024E604 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 141948 8024E608 AFB3001C */ sw $s3, 0x1C($sp) glabel func_8024E60C /* 14194C 8024E60C 0080982D */ daddu $s3, $a0, $zero /* 141950 8024E610 AFB00010 */ sw $s0, 0x10($sp) /* 141954 8024E614 0000802D */ daddu $s0, $zero, $zero /* 141958 8024E618 AFB20018 */ sw $s2, 0x18($sp) glabel func_8024E61C /* 14195C 8024E61C 3C128027 */ lui $s2, %hi(gPauseMapIconIDs) /* 141960 8024E620 26520700 */ addiu $s2, $s2, %lo(gPauseMapIconIDs) /* 141964 8024E624 AFB10014 */ sw $s1, 0x14($sp) /* 141968 8024E628 3C118025 */ lui $s1, %hi(D_8024FA30) /* 14196C 8024E62C 2631FA30 */ addiu $s1, $s1, %lo(D_8024FA30) /* 141970 8024E630 AFBF0020 */ sw $ra, 0x20($sp) .L8024E634: /* 141974 8024E634 8E240000 */ lw $a0, 0x0($s1) /* 141978 8024E638 26310004 */ addiu $s1, $s1, 0x4 /* 14197C 8024E63C 0C050529 */ jal hud_element_create /* 141980 8024E640 26100001 */ addiu $s0, $s0, 0x1 /* 141984 8024E644 0040202D */ daddu $a0, $v0, $zero /* 141988 8024E648 24050080 */ addiu $a1, $zero, 0x80 /* 14198C 8024E64C 0C051280 */ jal hud_element_set_flags /* 141990 8024E650 AE440000 */ sw $a0, 0x0($s2) /* 141994 8024E654 1A00FFF7 */ blez $s0, .L8024E634 .L8024E658: /* 141998 8024E658 26520004 */ addiu $s2, $s2, 0x4 /* 14199C 8024E65C 24100006 */ addiu $s0, $zero, 0x6 /* 1419A0 8024E660 3C028025 */ lui $v0, %hi(D_80250668) glabel func_8024E664 /* 1419A4 8024E664 24420668 */ addiu $v0, $v0, %lo(D_80250668) .L8024E668: /* 1419A8 8024E668 AC530010 */ sw $s3, 0x10($v0) /* 1419AC 8024E66C 2610FFFF */ addiu $s0, $s0, -0x1 /* 1419B0 8024E670 0601FFFD */ bgez $s0, .L8024E668 /* 1419B4 8024E674 2442FFDC */ addiu $v0, $v0, -0x24 /* 1419B8 8024E678 3C048025 */ lui $a0, %hi(D_80250590) /* 1419BC 8024E67C 24840590 */ addiu $a0, $a0, %lo(D_80250590) /* 1419C0 8024E680 0C051FCC */ jal setup_pause_menu_tab /* 1419C4 8024E684 24050007 */ addiu $a1, $zero, 0x7 /* 1419C8 8024E688 0000202D */ daddu $a0, $zero, $zero /* 1419CC 8024E68C 3C05F5DE */ lui $a1, (0xF5DE0329 >> 16) /* 1419D0 8024E690 2402FFFF */ addiu $v0, $zero, -0x1 /* 1419D4 8024E694 3C018027 */ lui $at, %hi(gPauseMapCursorCurrentOption) /* 1419D8 8024E698 AC22071C */ sw $v0, %lo(gPauseMapCursorCurrentOption)($at) /* 1419DC 8024E69C 3C018027 */ lui $at, %hi(gPauseMapSpacesInSnapRange) D_8024E6A0_C0BF20: /* 1419E0 8024E6A0 AC200724 */ sw $zero, %lo(gPauseMapSpacesInSnapRange)($at) /* 1419E4 8024E6A4 3C018027 */ lui $at, %hi(gPauseMapCursorCurrentOptionCopy) .L8024E6A8: /* 1419E8 8024E6A8 AC220720 */ sw $v0, %lo(gPauseMapCursorCurrentOptionCopy)($at) /* 1419EC 8024E6AC 0C0B1EAF */ jal evt_get_variable /* 1419F0 8024E6B0 34A50329 */ ori $a1, $a1, (0xF5DE0329 & 0xFFFF) glabel func_8024E6B4 /* 1419F4 8024E6B4 0040202D */ daddu $a0, $v0, $zero /* 1419F8 8024E6B8 0000802D */ daddu $s0, $zero, $zero /* 1419FC 8024E6BC 3C058025 */ lui $a1, %hi(D_802502B8) /* 141A00 8024E6C0 24A502B8 */ addiu $a1, $a1, %lo(D_802502B8) /* 141A04 8024E6C4 00A0182D */ daddu $v1, $a1, $zero .L8024E6C8: /* 141A08 8024E6C8 8C620010 */ lw $v0, 0x10($v1) /* 141A0C 8024E6CC 10440006 */ beq $v0, $a0, .L8024E6E8 /* 141A10 8024E6D0 2A020022 */ slti $v0, $s0, 0x22 /* 141A14 8024E6D4 26100001 */ addiu $s0, $s0, 0x1 D_8024E6D8_C0BF58: /* 141A18 8024E6D8 2A020022 */ slti $v0, $s0, 0x22 /* 141A1C 8024E6DC 1440FFFA */ bnez $v0, .L8024E6C8 /* 141A20 8024E6E0 24630014 */ addiu $v1, $v1, 0x14 .L8024E6E4: /* 141A24 8024E6E4 2A020022 */ slti $v0, $s0, 0x22 .L8024E6E8: /* 141A28 8024E6E8 1040000C */ beqz $v0, .L8024E71C /* 141A2C 8024E6EC 00101080 */ sll $v0, $s0, 2 /* 141A30 8024E6F0 00501021 */ addu $v0, $v0, $s0 /* 141A34 8024E6F4 00021080 */ sll $v0, $v0, 2 D_8024E6F8: /* 141A38 8024E6F8 00451021 */ addu $v0, $v0, $a1 /* 141A3C 8024E6FC 84430000 */ lh $v1, 0x0($v0) .L8024E700: /* 141A40 8024E700 84420002 */ lh $v0, 0x2($v0) /* 141A44 8024E704 3C018027 */ lui $at, %hi(gPauseMapMarioX) /* 141A48 8024E708 AC23070C */ sw $v1, %lo(gPauseMapMarioX)($at) /* 141A4C 8024E70C 3C018027 */ lui $at, %hi(gPauseMapMarioY) /* 141A50 8024E710 AC220710 */ sw $v0, %lo(gPauseMapMarioY)($at) /* 141A54 8024E714 080939CB */ j .L8024E72C /* 141A58 8024E718 00000000 */ nop .L8024E71C: /* 141A5C 8024E71C 3C018027 */ lui $at, %hi(gPauseMapMarioX) .L8024E720: /* 141A60 8024E720 AC20070C */ sw $zero, %lo(gPauseMapMarioX)($at) /* 141A64 8024E724 3C018027 */ lui $at, %hi(gPauseMapMarioY) /* 141A68 8024E728 AC200710 */ sw $zero, %lo(gPauseMapMarioY)($at) .L8024E72C: /* 141A6C 8024E72C 3C018027 */ lui $at, %hi(gPauseMapMarioX) D_8024E730: /* 141A70 8024E730 C422070C */ lwc1 $f2, %lo(gPauseMapMarioX)($at) .L8024E734: /* 141A74 8024E734 468010A0 */ cvt.s.w $f2, $f2 ### DECOMPILED C INSTRUCTIONS: void pause_map_init(MenuPanel* tab) { s32 currentLocation; s32 i; for (i = 0; i < ARRAY_COUNT(gPauseMapIconScripts); i++) { gPauseMapIconIDs[i] = hud_element_create(gPauseMapIconScripts[i]); hud_element_set_flags(gPauseMapIconIDs[i], HUD_ELEMENT_FLAG_80); } for (i = 0; i < ARRAY_COUNT(gPauseMapWindowBPs); i++) { gPauseMapWindowBPs[i].tab = tab; } setup_pause_menu_tab(gPauseMapWindowBPs, ARRAY_COUNT(gPauseMapWindowBPs)); gPauseMapCursorCurrentOption = -1; gPauseMapSpacesInSnapRange = 0; gPauseMapCursorCurrentOptionCopy = -1; currentLocation = evt_get_variable(0, GB_WorldLocation); for (i = 0; i < ARRAY_COUNT(gPauseMapSpaces); i++) { if (gPauseMapSpaces[i].id == currentLocation) { break; } } if (i < ARRAY_COUNT(gPauseMapSpaces)) { gPauseMapMarioX = gPauseMapSpaces[i].pos.x; gPauseMapMarioY = gPauseMapSpaces[i].pos.y; } else { gPauseMapMarioX = 0; gPauseMapMarioY = 0; } gPauseMapTargetX = gPauseMapMarioX; gPauseMapTargetY = gPauseMapMarioY; gPauseMapCameraX = 0.0f; gPauseMapCameraY = 0.0f; gPauseMapCameraX -= (s32)(gPauseMapTargetX + gPauseMapCameraX - 117.0); gPauseMapCameraY -= (s32)(gPauseMapTargetY + gPauseMapCameraY - 55.0); if (gPauseMapCameraX > 0) { gPauseMapCameraX = 0; } if (gPauseMapCameraY > 0) { gPauseMapCameraY = 0; } if (gPauseMapCameraX <= -86.0f) { gPauseMapCameraX = -85.0f; } if (gPauseMapCameraY <= -210.0f) { gPauseMapCameraY = -209.0f; } tab->initialized = TRUE; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802CA988 /* EF338 802CA988 27BDFFD0 */ addiu $sp, $sp, -0x30 /* EF33C 802CA98C AFB20018 */ sw $s2, 0x18($sp) /* EF340 802CA990 0080902D */ daddu $s2, $a0, $zero /* EF344 802CA994 AFBF0028 */ sw $ra, 0x28($sp) /* EF348 802CA998 AFB50024 */ sw $s5, 0x24($sp) /* EF34C 802CA99C AFB40020 */ sw $s4, 0x20($sp) /* EF350 802CA9A0 AFB3001C */ sw $s3, 0x1C($sp) /* EF354 802CA9A4 AFB10014 */ sw $s1, 0x14($sp) /* EF358 802CA9A8 AFB00010 */ sw $s0, 0x10($sp) /* EF35C 802CA9AC 8E50000C */ lw $s0, 0xC($s2) /* EF360 802CA9B0 8E050000 */ lw $a1, 0x0($s0) /* EF364 802CA9B4 0C0B1EAF */ jal evt_get_variable /* EF368 802CA9B8 26100004 */ addiu $s0, $s0, 0x4 /* EF36C 802CA9BC 8E140000 */ lw $s4, 0x0($s0) /* EF370 802CA9C0 26100004 */ addiu $s0, $s0, 0x4 /* EF374 802CA9C4 8E150000 */ lw $s5, 0x0($s0) /* EF378 802CA9C8 26100004 */ addiu $s0, $s0, 0x4 /* EF37C 802CA9CC 3C04800B */ lui $a0, %hi(gCameras) /* EF380 802CA9D0 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* EF384 802CA9D4 00021880 */ sll $v1, $v0, 2 /* EF388 802CA9D8 00621821 */ addu $v1, $v1, $v0 /* EF38C 802CA9DC 00031880 */ sll $v1, $v1, 2 /* EF390 802CA9E0 00621823 */ subu $v1, $v1, $v0 /* EF394 802CA9E4 000310C0 */ sll $v0, $v1, 3 /* EF398 802CA9E8 00621821 */ addu $v1, $v1, $v0 /* EF39C 802CA9EC 000318C0 */ sll $v1, $v1, 3 /* EF3A0 802CA9F0 00648821 */ addu $s1, $v1, $a0 /* EF3A4 802CA9F4 C62C0094 */ lwc1 $f12, 0x94($s1) /* EF3A8 802CA9F8 8E130000 */ lw $s3, 0x0($s0) /* EF3AC 802CA9FC 8E100004 */ lw $s0, 0x4($s0) /* EF3B0 802CAA00 24020002 */ addiu $v0, $zero, 0x2 /* EF3B4 802CAA04 A6220004 */ sh $v0, 0x4($s1) /* EF3B8 802CAA08 0C00A6B1 */ jal round /* EF3BC 802CAA0C A6200006 */ sh $zero, 0x6($s1) /* EF3C0 802CAA10 C6220048 */ lwc1 $f2, 0x48($s1) /* EF3C4 802CAA14 C620003C */ lwc1 $f0, 0x3C($s1) /* EF3C8 802CAA18 46001081 */ sub.s $f2, $f2, $f0 /* EF3CC 802CAA1C 46021082 */ mul.s $f2, $f2, $f2 /* EF3D0 802CAA20 00000000 */ nop /* EF3D4 802CAA24 C624004C */ lwc1 $f4, 0x4C($s1) /* EF3D8 802CAA28 C6200040 */ lwc1 $f0, 0x40($s1) /* EF3DC 802CAA2C 46002101 */ sub.s $f4, $f4, $f0 /* EF3E0 802CAA30 46042102 */ mul.s $f4, $f4, $f4 /* EF3E4 802CAA34 00000000 */ nop /* EF3E8 802CAA38 C6260050 */ lwc1 $f6, 0x50($s1) /* EF3EC 802CAA3C C6200044 */ lwc1 $f0, 0x44($s1) /* EF3F0 802CAA40 46003181 */ sub.s $f6, $f6, $f0 /* EF3F4 802CAA44 46063182 */ mul.s $f6, $f6, $f6 /* EF3F8 802CAA48 00000000 */ nop /* EF3FC 802CAA4C C6200090 */ lwc1 $f0, 0x90($s1) /* EF400 802CAA50 46041080 */ add.s $f2, $f2, $f4 /* EF404 802CAA54 00021023 */ negu $v0, $v0 /* EF408 802CAA58 A622001C */ sh $v0, 0x1C($s1) /* EF40C 802CAA5C 46000007 */ neg.s $f0, $f0 /* EF410 802CAA60 46061300 */ add.s $f12, $f2, $f6 /* EF414 802CAA64 4600020D */ trunc.w.s $f8, $f0 /* EF418 802CAA68 44024000 */ mfc1 $v0, $f8 /* EF41C 802CAA6C 46006004 */ sqrt.s $f0, $f12 /* EF420 802CAA70 46000032 */ c.eq.s $f0, $f0 /* EF424 802CAA74 00000000 */ nop /* EF428 802CAA78 45010003 */ bc1t .L802CAA88 /* EF42C 802CAA7C A622001E */ sh $v0, 0x1E($s1) /* EF430 802CAA80 0C0187BC */ jal sqrtf /* EF434 802CAA84 00000000 */ nop .L802CAA88: /* EF438 802CAA88 0C00A6B1 */ jal round /* EF43C 802CAA8C 46000306 */ mov.s $f12, $f0 /* EF440 802CAA90 0240202D */ daddu $a0, $s2, $zero /* EF444 802CAA94 8626001C */ lh $a2, 0x1C($s1) /* EF448 802CAA98 C6200048 */ lwc1 $f0, 0x48($s1) /* EF44C 802CAA9C C622004C */ lwc1 $f2, 0x4C($s1) /* EF450 802CAAA0 C6240050 */ lwc1 $f4, 0x50($s1) /* EF454 802CAAA4 0280282D */ daddu $a1, $s4, $zero /* EF458 802CAAA8 A6220020 */ sh $v0, 0x20($s1) /* EF45C 802CAAAC A6200022 */ sh $zero, 0x22($s1) /* EF460 802CAAB0 E6200054 */ swc1 $f0, 0x54($s1) /* EF464 802CAAB4 E6220058 */ swc1 $f2, 0x58($s1) /* EF468 802CAAB8 0C0B2026 */ jal evt_set_variable /* EF46C 802CAABC E624005C */ swc1 $f4, 0x5C($s1) /* EF470 802CAAC0 0240202D */ daddu $a0, $s2, $zero /* EF474 802CAAC4 8626001E */ lh $a2, 0x1E($s1) /* EF478 802CAAC8 0C0B2026 */ jal evt_set_variable /* EF47C 802CAACC 02A0282D */ daddu $a1, $s5, $zero /* EF480 802CAAD0 0240202D */ daddu $a0, $s2, $zero /* EF484 802CAAD4 86260020 */ lh $a2, 0x20($s1) /* EF488 802CAAD8 0C0B2026 */ jal evt_set_variable /* EF48C 802CAADC 0260282D */ daddu $a1, $s3, $zero /* EF490 802CAAE0 0240202D */ daddu $a0, $s2, $zero /* EF494 802CAAE4 86260022 */ lh $a2, 0x22($s1) /* EF498 802CAAE8 0C0B2026 */ jal evt_set_variable /* EF49C 802CAAEC 0200282D */ daddu $a1, $s0, $zero /* EF4A0 802CAAF0 8FBF0028 */ lw $ra, 0x28($sp) /* EF4A4 802CAAF4 8FB50024 */ lw $s5, 0x24($sp) /* EF4A8 802CAAF8 8FB40020 */ lw $s4, 0x20($sp) /* EF4AC 802CAAFC 8FB3001C */ lw $s3, 0x1C($sp) /* EF4B0 802CAB00 8FB20018 */ lw $s2, 0x18($sp) /* EF4B4 802CAB04 8FB10014 */ lw $s1, 0x14($sp) /* EF4B8 802CAB08 8FB00010 */ lw $s0, 0x10($sp) /* EF4BC 802CAB0C 24020002 */ addiu $v0, $zero, 0x2 /* EF4C0 802CAB10 03E00008 */ jr $ra /* EF4C4 802CAB14 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: ApiStatus func_802CA988(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Bytecode id = evt_get_variable(script, *args++); Bytecode outVar1 = *args++; Bytecode outVar2 = *args++; Bytecode outVar3 = *args++; Bytecode outVar4 = *args++; f32 dx, dy, dz; gCameras[id].updateMode = CAM_UPDATE_MODE_2; gCameras[id].needsInit = FALSE; gCameras[id].auxPitch = -round(gCameras[id].currentPitch); gCameras[id].auxBoomLength = -gCameras[id].currentBlendedYawNegated; dx = gCameras[id].lookAt_obj.x - gCameras[id].lookAt_eye.x; dy = gCameras[id].lookAt_obj.y - gCameras[id].lookAt_eye.y; dz = gCameras[id].lookAt_obj.z - gCameras[id].lookAt_eye.z; gCameras[id].lookAt_dist = round(sqrtf(SQ(dx) + SQ(dy) + SQ(dz))); gCameras[id].auxBoomPitch = 0; gCameras[id].lookAt_obj_target.x = gCameras[id].lookAt_obj.x; gCameras[id].lookAt_obj_target.y = gCameras[id].lookAt_obj.y; gCameras[id].lookAt_obj_target.z = gCameras[id].lookAt_obj.z; evt_set_variable(script, outVar1, gCameras[id].auxPitch); evt_set_variable(script, outVar2, gCameras[id].auxBoomLength); evt_set_variable(script, outVar3, gCameras[id].lookAt_dist); evt_set_variable(script, outVar4, gCameras[id].auxBoomPitch); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_bgm_load_subsegment /* 29ED4 8004EAD4 0000402D */ daddu $t0, $zero, $zero /* 29ED8 8004EAD8 0100582D */ daddu $t3, $t0, $zero /* 29EDC 8004EADC 0100482D */ daddu $t1, $t0, $zero /* 29EE0 8004EAE0 240C0001 */ addiu $t4, $zero, 0x1 /* 29EE4 8004EAE4 240A025C */ addiu $t2, $zero, 0x25C /* 29EE8 8004EAE8 30A5FFFF */ andi $a1, $a1, 0xFFFF /* 29EEC 8004EAEC 8C82006C */ lw $v0, 0x6C($a0) /* 29EF0 8004EAF0 00052880 */ sll $a1, $a1, 2 /* 29EF4 8004EAF4 00A22821 */ addu $a1, $a1, $v0 /* 29EF8 8004EAF8 AC850070 */ sw $a1, 0x70($a0) .L8004EAFC: /* 29EFC 8004EAFC 8CA30000 */ lw $v1, 0x0($a1) /* 29F00 8004EB00 24A50004 */ addiu $a1, $a1, 0x4 /* 29F04 8004EB04 008A3021 */ addu $a2, $a0, $t2 /* 29F08 8004EB08 00031402 */ srl $v0, $v1, 16 /* 29F0C 8004EB0C 10400034 */ beqz $v0, .L8004EBE0 /* 29F10 8004EB10 ACC20000 */ sw $v0, 0x0($a2) /* 29F14 8004EB14 30620100 */ andi $v0, $v1, 0x100 /* 29F18 8004EB18 54400031 */ bnel $v0, $zero, .L8004EBE0 /* 29F1C 8004EB1C ACC00000 */ sw $zero, 0x0($a2) /* 29F20 8004EB20 3062E000 */ andi $v0, $v1, 0xE000 /* 29F24 8004EB24 00021342 */ srl $v0, $v0, 13 /* 29F28 8004EB28 A0C20054 */ sb $v0, 0x54($a2) /* 29F2C 8004EB2C 000311C2 */ srl $v0, $v1, 7 /* 29F30 8004EB30 30420001 */ andi $v0, $v0, 0x1 /* 29F34 8004EB34 A0C20058 */ sb $v0, 0x58($a2) /* 29F38 8004EB38 30621E00 */ andi $v0, $v1, 0x1E00 /* 29F3C 8004EB3C 00023A42 */ srl $a3, $v0, 9 /* 29F40 8004EB40 10E0001B */ beqz $a3, .L8004EBB0 /* 29F44 8004EB44 A0C00059 */ sb $zero, 0x59($a2) /* 29F48 8004EB48 00071040 */ sll $v0, $a3, 1 /* 29F4C 8004EB4C 00471021 */ addu $v0, $v0, $a3 /* 29F50 8004EB50 00021140 */ sll $v0, $v0, 5 /* 29F54 8004EB54 244201FC */ addiu $v0, $v0, 0x1FC /* 29F58 8004EB58 00821821 */ addu $v1, $a0, $v0 /* 29F5C 8004EB5C 24E2FFFF */ addiu $v0, $a3, -0x1 /* 29F60 8004EB60 0049102B */ sltu $v0, $v0, $t1 /* 29F64 8004EB64 5040001E */ beql $v0, $zero, .L8004EBE0 /* 29F68 8004EB68 ACC00000 */ sw $zero, 0x0($a2) /* 29F6C 8004EB6C 90620051 */ lbu $v0, 0x51($v1) /* 29F70 8004EB70 A0C20051 */ sb $v0, 0x51($a2) /* 29F74 8004EB74 90620052 */ lbu $v0, 0x52($v1) /* 29F78 8004EB78 A0C20052 */ sb $v0, 0x52($a2) /* 29F7C 8004EB7C 90620053 */ lbu $v0, 0x53($v1) /* 29F80 8004EB80 A0C20053 */ sb $v0, 0x53($a2) /* 29F84 8004EB84 8CC20000 */ lw $v0, 0x0($a2) /* 29F88 8004EB88 8C830070 */ lw $v1, 0x70($a0) glabel func_8004EB8C /* 29F8C 8004EB8C ACCC0028 */ sw $t4, 0x28($a2) /* 29F90 8004EB90 A0C70059 */ sb $a3, 0x59($a2) /* 29F94 8004EB94 00431021 */ addu $v0, $v0, $v1 /* 29F98 8004EB98 ACC20000 */ sw $v0, 0x0($a2) /* 29F9C 8004EB9C 90820233 */ lbu $v0, 0x233($a0) /* 29FA0 8004EBA0 54400001 */ bnel $v0, $zero, .L8004EBA8 /* 29FA4 8004EBA4 A0CC005A */ sb $t4, 0x5A($a2) .L8004EBA8: /* 29FA8 8004EBA8 08013AF8 */ j .L8004EBE0 /* 29FAC 8004EBAC 240B0001 */ addiu $t3, $zero, 0x1 .L8004EBB0: /* 29FB0 8004EBB0 90C20054 */ lbu $v0, 0x54($a2) /* 29FB4 8004EBB4 00821021 */ addu $v0, $a0, $v0 /* 29FB8 8004EBB8 9042022A */ lbu $v0, 0x22A($v0) /* 29FBC 8004EBBC A0C80052 */ sb $t0, 0x52($a2) /* 29FC0 8004EBC0 01024021 */ addu $t0, $t0, $v0 /* 29FC4 8004EBC4 A0C20051 */ sb $v0, 0x51($a2) /* 29FC8 8004EBC8 8CC20000 */ lw $v0, 0x0($a2) /* 29FCC 8004EBCC A0C80053 */ sb $t0, 0x53($a2) /* 29FD0 8004EBD0 8C830070 */ lw $v1, 0x70($a0) /* 29FD4 8004EBD4 ACCC0028 */ sw $t4, 0x28($a2) /* 29FD8 8004EBD8 00431021 */ addu $v0, $v0, $v1 /* 29FDC 8004EBDC ACC20000 */ sw $v0, 0x0($a2) .L8004EBE0: /* 29FE0 8004EBE0 25290001 */ addiu $t1, $t1, 0x1 /* 29FE4 8004EBE4 29220010 */ slti $v0, $t1, 0x10 /* 29FE8 8004EBE8 1440FFC4 */ bnez $v0, .L8004EAFC /* 29FEC 8004EBEC 254A0060 */ addiu $t2, $t2, 0x60 /* 29FF0 8004EBF0 11600002 */ beqz $t3, .L8004EBFC /* 29FF4 8004EBF4 A088021B */ sb $t0, 0x21B($a0) /* 29FF8 8004EBF8 A0800233 */ sb $zero, 0x233($a0) .L8004EBFC: /* 29FFC 8004EBFC 03E00008 */ jr $ra /* 2A000 8004EC00 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void au_bgm_load_subsegment(BGMPlayer* player, u32 cmd) { BGMPlayerTrack* track; u32 trackInfo; s32* trackList; u32 parentIdx; s32 count; s32 nextRelativePos; s32 bUsesPolyphony; s32 i; nextRelativePos = 0; bUsesPolyphony = FALSE; player->subSegmentStartPos = AU_FILE_RELATIVE(player->segmentStartPos, (cmd & 0xFFFF) << 2); trackList = player->subSegmentStartPos; for (i = 0; i < ARRAY_COUNT(player->tracks); i++) { track = &player->tracks[i]; trackInfo = *trackList++; track->bgmReadPos = (AuFilePos) (trackInfo >> 0x10); if (track->bgmReadPos != NULL) { if ((trackInfo & 0x100) == 0) { track->polyphonicIdx = (trackInfo & (0x7 << 0xD)) >> 0xD; track->isDrumTrack = (trackInfo >> 7) & 1; parentIdx = (trackInfo & (0xF << 9)) >> 9; track->parentTrackIdx = 0; if (parentIdx != 0) { BGMPlayerTrack* parentTrack = &player->tracks[parentIdx - 1]; if ((parentIdx - 1) < i) { track->unk_51 = parentTrack->unk_51; track->unk_52 = parentTrack->unk_52; track->unk_53 = parentTrack->unk_53; track->bgmReadPos = (track->bgmReadPos + (s32)player->subSegmentStartPos); track->delayTime = 1; track->parentTrackIdx = parentIdx; if (player->unk_233 != 0) { track->unk_5A = 1; } bUsesPolyphony = TRUE; } else { track->bgmReadPos = NULL; } } else { count = player->unk_22A[track->polyphonicIdx]; track->unk_51 = count; track->unk_52 = nextRelativePos; nextRelativePos += count; track->unk_53 = nextRelativePos; track->bgmReadPos = (track->bgmReadPos + (s32)player->subSegmentStartPos); track->delayTime = 1; } } else { track->bgmReadPos = NULL; } } } player->unk_21B = nextRelativePos; // last Voice? if (bUsesPolyphony) { player->unk_233 = 0; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80248024 /* 168884 80248024 3C028025 */ lui $v0, %hi(D_8024C084) /* 168888 80248028 8C42C084 */ lw $v0, %lo(D_8024C084)($v0) /* 16888C 8024802C 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 168890 80248030 AFBF0018 */ sw $ra, 0x18($sp) .L80248034: /* 168894 80248034 AFB10014 */ sw $s1, 0x14($sp) .L80248038: /* 168898 80248038 3042C000 */ andi $v0, $v0, 0xC000 D_8024803C: /* 16889C 8024803C 10400043 */ beqz $v0, .L8024814C .L80248040: /* 1688A0 80248040 AFB00010 */ sw $s0, 0x10($sp) /* 1688A4 80248044 3C118025 */ lui $s1, %hi(D_80249B84) .L80248048: /* 1688A8 80248048 8E319B84 */ lw $s1, %lo(D_80249B84)($s1) /* 1688AC 8024804C 3C018025 */ lui $at, %hi(D_8024C098_C09918) .L80248050: /* 1688B0 80248050 A020C098 */ sb $zero, %lo(D_8024C098_C09918)($at) D_80248054: /* 1688B4 80248054 82230004 */ lb $v1, 0x4($s1) /* 1688B8 80248058 24020002 */ addiu $v0, $zero, 0x2 /* 1688BC 8024805C 10620033 */ beq $v1, $v0, .L8024812C /* 1688C0 80248060 28620003 */ slti $v0, $v1, 0x3 .L80248064: /* 1688C4 80248064 10400005 */ beqz $v0, .L8024807C D_80248068: /* 1688C8 80248068 24020001 */ addiu $v0, $zero, 0x1 /* 1688CC 8024806C 10620008 */ beq $v1, $v0, D_80248090 D_80248070: /* 1688D0 80248070 2404002F */ addiu $a0, $zero, 0x2F D_80248074: /* 1688D4 80248074 08092051 */ j .L80248144 /* 1688D8 80248078 00000000 */ nop .L8024807C: /* 1688DC 8024807C 24020004 */ addiu $v0, $zero, 0x4 D_80248080: /* 1688E0 80248080 10620017 */ beq $v1, $v0, D_802480E0 .L80248084: /* 1688E4 80248084 2404002F */ addiu $a0, $zero, 0x2F D_80248088: /* 1688E8 80248088 08092051 */ j .L80248144 .L8024808C: /* 1688EC 8024808C 00000000 */ nop D_80248090: /* 1688F0 80248090 A2200004 */ sb $zero, 0x4($s1) /* 1688F4 80248094 3C058024 */ lui $a1, %hi(func_802433F4) /* 1688F8 80248098 24A533F4 */ addiu $a1, $a1, %lo(func_802433F4) /* 1688FC 8024809C 0C051F9F */ jal set_window_update /* 168900 802480A0 24040033 */ addiu $a0, $zero, 0x33 /* 168904 802480A4 3C058024 */ lui $a1, %hi(func_80243468) /* 168908 802480A8 24A53468 */ addiu $a1, $a1, %lo(func_80243468) D_802480AC: /* 16890C 802480AC 0C051F9F */ jal set_window_update /* 168910 802480B0 24040034 */ addiu $a0, $zero, 0x34 /* 168914 802480B4 24040035 */ addiu $a0, $zero, 0x35 /* 168918 802480B8 3C108024 */ lui $s0, %hi(D_802434DC) .L802480BC: /* 16891C 802480BC 261034DC */ addiu $s0, $s0, %lo(D_802434DC) D_802480C0: /* 168920 802480C0 0C051F9F */ jal set_window_update /* 168924 802480C4 0200282D */ daddu $a1, $s0, $zero .L802480C8: /* 168928 802480C8 24040037 */ addiu $a0, $zero, 0x37 /* 16892C 802480CC 0C051F9F */ jal set_window_update /* 168930 802480D0 0200282D */ daddu $a1, $s0, $zero /* 168934 802480D4 0220202D */ daddu $a0, $s1, $zero /* 168938 802480D8 0809204E */ j .L80248138 /* 16893C 802480DC 0000282D */ daddu $a1, $zero, $zero D_802480E0: /* 168940 802480E0 A2200004 */ sb $zero, 0x4($s1) /* 168944 802480E4 3C058024 */ lui $a1, %hi(func_802433F4) /* 168948 802480E8 24A533F4 */ addiu $a1, $a1, %lo(func_802433F4) D_802480EC: /* 16894C 802480EC 0C051F9F */ jal set_window_update glabel func_802480F0 /* 168950 802480F0 24040033 */ addiu $a0, $zero, 0x33 /* 168954 802480F4 3C058024 */ lui $a1, %hi(func_80243468) /* 168958 802480F8 24A53468 */ addiu $a1, $a1, %lo(func_80243468) /* 16895C 802480FC 0C051F9F */ jal set_window_update /* 168960 80248100 24040034 */ addiu $a0, $zero, 0x34 /* 168964 80248104 24040035 */ addiu $a0, $zero, 0x35 .L80248108: /* 168968 80248108 3C108024 */ lui $s0, %hi(D_802434DC) D_8024810C: /* 16896C 8024810C 261034DC */ addiu $s0, $s0, %lo(D_802434DC) /* 168970 80248110 0C051F9F */ jal set_window_update /* 168974 80248114 0200282D */ daddu $a1, $s0, $zero /* 168978 80248118 24040037 */ addiu $a0, $zero, 0x37 /* 16897C 8024811C 0C051F9F */ jal set_window_update /* 168980 80248120 0200282D */ daddu $a1, $s0, $zero .L80248124: /* 168984 80248124 0809204D */ j .L80248134 /* 168988 80248128 0220202D */ daddu $a0, $s1, $zero .L8024812C: /* 16898C 8024812C A2230004 */ sb $v1, 0x4($s1) /* 168990 80248130 0220202D */ daddu $a0, $s1, $zero .L80248134: /* 168994 80248134 24050001 */ addiu $a1, $zero, 0x1 .L80248138: /* 168998 80248138 0C090B65 */ jal func_80242D94 /* 16899C 8024813C 24060002 */ addiu $a2, $zero, 0x2 /* 1689A0 80248140 2404002F */ addiu $a0, $zero, 0x2F .L80248144: /* 1689A4 80248144 0C051F9F */ jal set_window_update .L80248148: /* 1689A8 80248148 24050002 */ addiu $a1, $zero, 0x2 .L8024814C: /* 1689AC 8024814C 8FBF0018 */ lw $ra, 0x18($sp) /* 1689B0 80248150 8FB10014 */ lw $s1, 0x14($sp) .L80248154: /* 1689B4 80248154 8FB00010 */ lw $s0, 0x10($sp) /* 1689B8 80248158 03E00008 */ jr $ra /* 1689BC 8024815C 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void filemenu_info_handle_input(MenuPanel* menu) { if (filemenu_pressedButtons & (BUTTON_A | BUTTON_B)) { MenuPanel* menu = filemenu_menus[0]; filemenu_currentMenu = 0; switch (menu->page) { case PAGE_1: menu->page = PAGE_0; set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); filemenu_set_selected(menu, 0, 2); break; case PAGE_4: menu->page = PAGE_0; set_window_update(WINDOW_ID_FILEMENU_STEREO, (s32)filemenu_update_show_options_left); set_window_update(WINDOW_ID_FILEMENU_MONO, (s32)filemenu_update_show_options_right); set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, (s32)filemenu_update_show_options_bottom); set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, (s32)filemenu_update_show_options_bottom); filemenu_set_selected(menu, 1, 2); break; #if !VERSION_PAL case PAGE_2: menu->page = 2; filemenu_set_selected(menu, 1, 2); break; #endif } set_window_update(WINDOW_ID_FILEMENU_INFO, WINDOW_UPDATE_HIDE); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_E0112330 /* 3FA180 E0112330 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 3FA184 E0112334 AFB000A0 */ sw $s0, 0xA0($sp) /* 3FA188 E0112338 AFBF00AC */ sw $ra, 0xAC($sp) /* 3FA18C E011233C AFB200A8 */ sw $s2, 0xA8($sp) /* 3FA190 E0112340 AFB100A4 */ sw $s1, 0xA4($sp) /* 3FA194 E0112344 F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 3FA198 E0112348 1480000F */ bnez $a0, .LE0112388 /* 3FA19C E011234C 00A0802D */ daddu $s0, $a1, $zero /* 3FA1A0 E0112350 3C028007 */ lui $v0, %hi(gCurrentCameraID) /* 3FA1A4 E0112354 8C427410 */ lw $v0, %lo(gCurrentCameraID)($v0) /* 3FA1A8 E0112358 00021880 */ sll $v1, $v0, 2 /* 3FA1AC E011235C 00621821 */ addu $v1, $v1, $v0 /* 3FA1B0 E0112360 00031880 */ sll $v1, $v1, 2 /* 3FA1B4 E0112364 00621823 */ subu $v1, $v1, $v0 /* 3FA1B8 E0112368 000310C0 */ sll $v0, $v1, 3 /* 3FA1BC E011236C 00621821 */ addu $v1, $v1, $v0 /* 3FA1C0 E0112370 000318C0 */ sll $v1, $v1, 3 /* 3FA1C4 E0112374 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 3FA1C8 E0112378 00230821 */ addu $at, $at, $v1 /* 3FA1CC E011237C C4261DEC */ lwc1 $f6, %lo(gCameras + 0x6C)($at) /* 3FA1D0 E0112380 080448E3 */ j .LE011238C /* 3FA1D4 E0112384 00000000 */ nop .LE0112388: /* 3FA1D8 E0112388 44803000 */ mtc1 $zero, $f6 .LE011238C: /* 3FA1DC E011238C C6000018 */ lwc1 $f0, 0x18($s0) /* 3FA1E0 E0112390 C6040024 */ lwc1 $f4, 0x24($s0) /* 3FA1E4 E0112394 3C014000 */ lui $at, (0x40000000 >> 16) /* 3FA1E8 E0112398 44811000 */ mtc1 $at, $f2 /* 3FA1EC E011239C E7A00010 */ swc1 $f0, 0x10($sp) /* 3FA1F0 E01123A0 C6000004 */ lwc1 $f0, 0x4($s0) /* 3FA1F4 E01123A4 4480A000 */ mtc1 $zero, $f20 /* 3FA1F8 E01123A8 46020000 */ add.s $f0, $f0, $f2 /* 3FA1FC E01123AC 4405A000 */ mfc1 $a1, $f20 /* 3FA200 E01123B0 27A40020 */ addiu $a0, $sp, 0x20 /* 3FA204 E01123B4 E7A00014 */ swc1 $f0, 0x14($sp) /* 3FA208 E01123B8 C6000008 */ lwc1 $f0, 0x8($s0) /* 3FA20C E01123BC 46062101 */ sub.s $f4, $f4, $f6 /* 3FA210 E01123C0 E7A00018 */ swc1 $f0, 0x18($sp) /* 3FA214 E01123C4 C600000C */ lwc1 $f0, 0xC($s0) /* 3FA218 E01123C8 4407A000 */ mfc1 $a3, $f20 /* 3FA21C E01123CC 46020000 */ add.s $f0, $f0, $f2 /* 3FA220 E01123D0 44062000 */ mfc1 $a2, $f4 /* 3FA224 E01123D4 3C120001 */ lui $s2, (0x11630 >> 16) /* 3FA228 E01123D8 0C080180 */ jal shim_guPositionF /* 3FA22C E01123DC E7A0001C */ swc1 $f0, 0x1C($sp) /* 3FA230 E01123E0 4406A000 */ mfc1 $a2, $f20 /* 3FA234 E01123E4 4407A000 */ mfc1 $a3, $f20 /* 3FA238 E01123E8 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 3FA23C E01123EC 44810000 */ mtc1 $at, $f0 /* 3FA240 E01123F0 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 3FA244 E01123F4 E7A00010 */ swc1 $f0, 0x10($sp) /* 3FA248 E01123F8 8E050020 */ lw $a1, 0x20($s0) /* 3FA24C E01123FC 27B00060 */ addiu $s0, $sp, 0x60 /* 3FA250 E0112400 0C080104 */ jal shim_guRotateF /* 3FA254 E0112404 0200202D */ daddu $a0, $s0, $zero /* 3FA258 E0112408 0200202D */ daddu $a0, $s0, $zero /* 3FA25C E011240C 27A50020 */ addiu $a1, $sp, 0x20 /* 3FA260 E0112410 0C080114 */ jal shim_guMtxCatF /* 3FA264 E0112414 00A0302D */ daddu $a2, $a1, $zero /* 3FA268 E0112418 0200202D */ daddu $a0, $s0, $zero /* 3FA26C E011241C 4405A000 */ mfc1 $a1, $f20 /* 3FA270 E0112420 3C07C000 */ lui $a3, (0xC0000000 >> 16) /* 3FA274 E0112424 0C080108 */ jal shim_guTranslateF /* 3FA278 E0112428 00A0302D */ daddu $a2, $a1, $zero /* 3FA27C E011242C 0200202D */ daddu $a0, $s0, $zero /* 3FA280 E0112430 27A50020 */ addiu $a1, $sp, 0x20 /* 3FA284 E0112434 0C080114 */ jal shim_guMtxCatF /* 3FA288 E0112438 00A0302D */ daddu $a2, $a1, $zero /* 3FA28C E011243C 27A40020 */ addiu $a0, $sp, 0x20 /* 3FA290 E0112440 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 3FA294 E0112444 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 3FA298 E0112448 3C11800A */ lui $s1, %hi(gDisplayContext) /* 3FA29C E011244C 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 3FA2A0 E0112450 96050000 */ lhu $a1, 0x0($s0) /* 3FA2A4 E0112454 8E220000 */ lw $v0, 0x0($s1) /* 3FA2A8 E0112458 00052980 */ sll $a1, $a1, 6 /* 3FA2AC E011245C 00B22821 */ addu $a1, $a1, $s2 /* 3FA2B0 E0112460 0C080118 */ jal shim_guMtxF2L /* 3FA2B4 E0112464 00452821 */ addu $a1, $v0, $a1 /* 3FA2B8 E0112468 3C05DA38 */ lui $a1, (0xDA380002 >> 16) /* 3FA2BC E011246C 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 3FA2C0 E0112470 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 3FA2C4 E0112474 34A50002 */ ori $a1, $a1, (0xDA380002 & 0xFFFF) /* 3FA2C8 E0112478 8C830000 */ lw $v1, 0x0($a0) /* 3FA2CC E011247C 96020000 */ lhu $v0, 0x0($s0) /* 3FA2D0 E0112480 0060302D */ daddu $a2, $v1, $zero /* 3FA2D4 E0112484 24630008 */ addiu $v1, $v1, 0x8 /* 3FA2D8 E0112488 AC830000 */ sw $v1, 0x0($a0) /* 3FA2DC E011248C 24430001 */ addiu $v1, $v0, 0x1 /* 3FA2E0 E0112490 3042FFFF */ andi $v0, $v0, 0xFFFF /* 3FA2E4 E0112494 00021180 */ sll $v0, $v0, 6 /* 3FA2E8 E0112498 ACC50000 */ sw $a1, 0x0($a2) /* 3FA2EC E011249C A6030000 */ sh $v1, 0x0($s0) /* 3FA2F0 E01124A0 8E230000 */ lw $v1, 0x0($s1) /* 3FA2F4 E01124A4 00521021 */ addu $v0, $v0, $s2 /* 3FA2F8 E01124A8 00621821 */ addu $v1, $v1, $v0 /* 3FA2FC E01124AC ACC30004 */ sw $v1, 0x4($a2) /* 3FA300 E01124B0 8FBF00AC */ lw $ra, 0xAC($sp) /* 3FA304 E01124B4 8FB200A8 */ lw $s2, 0xA8($sp) /* 3FA308 E01124B8 8FB100A4 */ lw $s1, 0xA4($sp) /* 3FA30C E01124BC 8FB000A0 */ lw $s0, 0xA0($sp) /* 3FA310 E01124C0 D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 3FA314 E01124C4 03E00008 */ jr $ra /* 3FA318 E01124C8 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: void func_E0112330(s32 arg0, SpiritCardFXData* data) { f32 temp; Matrix4f sp20; Matrix4f sp60; if (arg0 == 0) { temp = gCameras[gCurrentCameraID].currentYaw; } else { temp = 0.0f; } shim_guPositionF(sp20, 0.0f, data->yaw - temp, 0.0f, data->unk_18, data->pos.x + 2.0f, data->pos.y, data->pos.z + 2.0f); shim_guRotateF(sp60, data->unk_20, 0.0f, 0.0f, 1.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guTranslateF(sp60, 0.0f, 0.0f, -2.0f); shim_guMtxCatF(sp60, sp20, sp20); shim_guMtxF2L(sp20, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); }
### RAW ASSEMBLY INSTRUCTIONS: glabel kill_script /* E88EC 802C3F3C 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) /* E88F0 802C3F40 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) /* E88F4 802C3F44 27BDFFE0 */ addiu $sp, $sp, -0x20 /* E88F8 802C3F48 AFB20018 */ sw $s2, 0x18($sp) /* E88FC 802C3F4C 0080902D */ daddu $s2, $a0, $zero /* E8900 802C3F50 AFB00010 */ sw $s0, 0x10($sp) /* E8904 802C3F54 0000802D */ daddu $s0, $zero, $zero /* E8908 802C3F58 AFBF001C */ sw $ra, 0x1C($sp) /* E890C 802C3F5C AFB10014 */ sw $s1, 0x14($sp) .L802C3F60: /* E8910 802C3F60 8C620000 */ lw $v0, 0x0($v1) /* E8914 802C3F64 10520006 */ beq $v0, $s2, .L802C3F80 /* E8918 802C3F68 2A020080 */ slti $v0, $s0, 0x80 /* E891C 802C3F6C 26100001 */ addiu $s0, $s0, 0x1 /* E8920 802C3F70 2A020080 */ slti $v0, $s0, 0x80 /* E8924 802C3F74 1440FFFA */ bnez $v0, .L802C3F60 /* E8928 802C3F78 24630004 */ addiu $v1, $v1, 0x4 /* E892C 802C3F7C 2A020080 */ slti $v0, $s0, 0x80 .L802C3F80: /* E8930 802C3F80 10400044 */ beqz $v0, .L802C4094 /* E8934 802C3F84 00000000 */ nop /* E8938 802C3F88 8E440068 */ lw $a0, 0x68($s2) /* E893C 802C3F8C 10800003 */ beqz $a0, .L802C3F9C /* E8940 802C3F90 0000882D */ daddu $s1, $zero, $zero /* E8944 802C3F94 0C0B0FCF */ jal kill_script /* E8948 802C3F98 00000000 */ nop .L802C3F9C: /* E894C 802C3F9C 3C03802E */ lui $v1, %hi(gCurrentScriptListPtr) /* E8950 802C3FA0 8C63A890 */ lw $v1, %lo(gCurrentScriptListPtr)($v1) /* E8954 802C3FA4 00111080 */ sll $v0, $s1, 2 /* E8958 802C3FA8 00431021 */ addu $v0, $v0, $v1 /* E895C 802C3FAC 8C440000 */ lw $a0, 0x0($v0) /* E8960 802C3FB0 10800006 */ beqz $a0, .L802C3FCC /* E8964 802C3FB4 26310001 */ addiu $s1, $s1, 0x1 /* E8968 802C3FB8 8C82006C */ lw $v0, 0x6C($a0) /* E896C 802C3FBC 14520003 */ bne $v0, $s2, .L802C3FCC /* E8970 802C3FC0 00000000 */ nop /* E8974 802C3FC4 0C0B0FCF */ jal kill_script /* E8978 802C3FC8 00000000 */ nop .L802C3FCC: /* E897C 802C3FCC 2A220080 */ slti $v0, $s1, 0x80 /* E8980 802C3FD0 1440FFF2 */ bnez $v0, .L802C3F9C /* E8984 802C3FD4 00000000 */ nop /* E8988 802C3FD8 8E450064 */ lw $a1, 0x64($s2) /* E898C 802C3FDC 10A00018 */ beqz $a1, .L802C4040 /* E8990 802C3FE0 0000882D */ daddu $s1, $zero, $zero /* E8994 802C3FE4 0240202D */ daddu $a0, $s2, $zero /* E8998 802C3FE8 90A20000 */ lbu $v0, 0x0($a1) /* E899C 802C3FEC 00A0182D */ daddu $v1, $a1, $zero /* E89A0 802C3FF0 ACA00068 */ sw $zero, 0x68($a1) /* E89A4 802C3FF4 304200EF */ andi $v0, $v0, 0xEF /* E89A8 802C3FF8 A0A20000 */ sb $v0, 0x0($a1) .L802C3FFC: /* E89AC 802C3FFC 8C820084 */ lw $v0, 0x84($a0) /* E89B0 802C4000 24840004 */ addiu $a0, $a0, 0x4 /* E89B4 802C4004 26310001 */ addiu $s1, $s1, 0x1 /* E89B8 802C4008 AC620084 */ sw $v0, 0x84($v1) /* E89BC 802C400C 2A220010 */ slti $v0, $s1, 0x10 /* E89C0 802C4010 1440FFFA */ bnez $v0, .L802C3FFC /* E89C4 802C4014 24630004 */ addiu $v1, $v1, 0x4 /* E89C8 802C4018 0000882D */ daddu $s1, $zero, $zero /* E89CC 802C401C 0240202D */ daddu $a0, $s2, $zero /* E89D0 802C4020 00A0182D */ daddu $v1, $a1, $zero .L802C4024: /* E89D4 802C4024 8C8200C4 */ lw $v0, 0xC4($a0) /* E89D8 802C4028 24840004 */ addiu $a0, $a0, 0x4 /* E89DC 802C402C 26310001 */ addiu $s1, $s1, 0x1 /* E89E0 802C4030 AC6200C4 */ sw $v0, 0xC4($v1) /* E89E4 802C4034 2A220003 */ slti $v0, $s1, 0x3 /* E89E8 802C4038 1440FFFA */ bnez $v0, .L802C4024 /* E89EC 802C403C 24630004 */ addiu $v1, $v1, 0x4 .L802C4040: /* E89F0 802C4040 8E440060 */ lw $a0, 0x60($s2) /* E89F4 802C4044 10800004 */ beqz $a0, .L802C4058 /* E89F8 802C4048 00000000 */ nop /* E89FC 802C404C 0C00AB4B */ jal heap_free /* E8A00 802C4050 00000000 */ nop /* E8A04 802C4054 AE400060 */ sw $zero, 0x60($s2) .L802C4058: /* E8A08 802C4058 3C11802E */ lui $s1, %hi(gCurrentScriptListPtr) /* E8A0C 802C405C 2631A890 */ addiu $s1, $s1, %lo(gCurrentScriptListPtr) /* E8A10 802C4060 8E220000 */ lw $v0, 0x0($s1) /* E8A14 802C4064 00108080 */ sll $s0, $s0, 2 /* E8A18 802C4068 02021021 */ addu $v0, $s0, $v0 /* E8A1C 802C406C 0C00AB4B */ jal heap_free /* E8A20 802C4070 8C440000 */ lw $a0, 0x0($v0) /* E8A24 802C4074 3C04802E */ lui $a0, %hi(gNumScripts) /* E8A28 802C4078 2484A488 */ addiu $a0, $a0, %lo(gNumScripts) /* E8A2C 802C407C 8E230000 */ lw $v1, 0x0($s1) /* E8A30 802C4080 8C820000 */ lw $v0, 0x0($a0) /* E8A34 802C4084 02038021 */ addu $s0, $s0, $v1 /* E8A38 802C4088 2442FFFF */ addiu $v0, $v0, -0x1 /* E8A3C 802C408C AE000000 */ sw $zero, 0x0($s0) /* E8A40 802C4090 AC820000 */ sw $v0, 0x0($a0) .L802C4094: /* E8A44 802C4094 8FBF001C */ lw $ra, 0x1C($sp) /* E8A48 802C4098 8FB20018 */ lw $s2, 0x18($sp) /* E8A4C 802C409C 8FB10014 */ lw $s1, 0x14($sp) /* E8A50 802C40A0 8FB00010 */ lw $s0, 0x10($sp) /* E8A54 802C40A4 03E00008 */ jr $ra /* E8A58 802C40A8 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void kill_script(Evt* instanceToKill) { Evt* childScript; Evt* blockingParent; s32 j; s32 i; for (i = 0; i < MAX_SCRIPTS; i++) { if ((*gCurrentScriptListPtr)[i] == instanceToKill) { break; } } if (i >= MAX_SCRIPTS) { return; } childScript = instanceToKill->childScript; if (childScript != NULL) { kill_script(childScript); } for (j = 0; j < MAX_SCRIPTS; j++) { Evt* tempScriptInstance = (*gCurrentScriptListPtr)[j]; if (tempScriptInstance != NULL) { if (tempScriptInstance->parentScript == instanceToKill) { kill_script(tempScriptInstance); } } } blockingParent = instanceToKill->blockingParent; if (blockingParent != NULL) { blockingParent->childScript = NULL; blockingParent->stateFlags &= ~EVT_FLAG_BLOCKED_BY_CHILD; for (j = 0; j < ARRAY_COUNT(blockingParent->varTable); j++) { blockingParent->varTable[j] = instanceToKill->varTable[j]; } for (j = 0; j < ARRAY_COUNT(blockingParent->varFlags); j++) { blockingParent->varFlags[j] = instanceToKill->varFlags[j]; } } if (instanceToKill->userData != NULL) { heap_free(instanceToKill->userData); instanceToKill->userData = NULL; } heap_free((*gCurrentScriptListPtr)[i]); (*gCurrentScriptListPtr)[i] = NULL; gNumScripts--; }
### RAW ASSEMBLY INSTRUCTIONS: glabel au_syn_set_volume_delta /* 32AEC 800576EC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 32AF0 800576F0 AFB3001C */ sw $s3, 0x1C($sp) /* 32AF4 800576F4 00C0982D */ daddu $s3, $a2, $zero /* 32AF8 800576F8 AFB20018 */ sw $s2, 0x18($sp) /* 32AFC 800576FC 00A0902D */ daddu $s2, $a1, $zero /* 32B00 80057700 308400FF */ andi $a0, $a0, 0xFF /* 32B04 80057704 00041140 */ sll $v0, $a0, 5 /* 32B08 80057708 3C038008 */ lui $v1, %hi(gSynDriverPtr) /* 32B0C 8005770C 8C638E54 */ lw $v1, %lo(gSynDriverPtr)($v1) /* 32B10 80057710 00441023 */ subu $v0, $v0, $a0 /* 32B14 80057714 AFBF0020 */ sw $ra, 0x20($sp) /* 32B18 80057718 AFB10014 */ sw $s1, 0x14($sp) /* 32B1C 8005771C AFB00010 */ sw $s0, 0x10($sp) /* 32B20 80057720 8C63001C */ lw $v1, 0x1C($v1) /* 32B24 80057724 00021080 */ sll $v0, $v0, 2 /* 32B28 80057728 00628021 */ addu $s0, $v1, $v0 /* 32B2C 8005772C 8E050064 */ lw $a1, 0x64($s0) /* 32B30 80057730 8E030068 */ lw $v1, 0x68($s0) /* 32B34 80057734 00A3102A */ slt $v0, $a1, $v1 /* 32B38 80057738 14400029 */ bnez $v0, .L800577E0 /* 32B3C 8005773C 26110048 */ addiu $s1, $s0, 0x48 /* 32B40 80057740 3C028008 */ lui $v0, %hi(AuSynUseStereo) /* 32B44 80057744 24428181 */ addiu $v0, $v0, %lo(AuSynUseStereo) /* 32B48 80057748 90420000 */ lbu $v0, 0x0($v0) /* 32B4C 8005774C 1440000E */ bnez $v0, .L80057788 /* 32B50 80057750 AE030064 */ sw $v1, 0x64($s0) /* 32B54 80057754 3C048008 */ lui $a0, %hi(AlCosineBlend) /* 32B58 80057758 24848E60 */ addiu $a0, $a0, %lo(AlCosineBlend) /* 32B5C 8005775C 8603004E */ lh $v1, 0x4E($s0) /* 32B60 80057760 84820080 */ lh $v0, 0x80($a0) /* 32B64 80057764 00620018 */ mult $v1, $v0 /* 32B68 80057768 00004012 */ mflo $t0 /* 32B6C 8005776C 000813C3 */ sra $v0, $t0, 15 /* 32B70 80057770 A6020050 */ sh $v0, 0x50($s0) /* 32B74 80057774 84820080 */ lh $v0, 0x80($a0) /* 32B78 80057778 00620018 */ mult $v1, $v0 /* 32B7C 8005777C 00004012 */ mflo $t0 /* 32B80 80057780 08015E02 */ j .L80057808 /* 32B84 80057784 000813C3 */ sra $v0, $t0, 15 .L80057788: /* 32B88 80057788 8602004C */ lh $v0, 0x4C($s0) /* 32B8C 8005778C 8603004E */ lh $v1, 0x4E($s0) /* 32B90 80057790 00021040 */ sll $v0, $v0, 1 /* 32B94 80057794 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32B98 80057798 00220821 */ addu $at, $at, $v0 /* 32B9C 8005779C 84228E60 */ lh $v0, %lo(AlCosineBlend)($at) /* 32BA0 800577A0 00620018 */ mult $v1, $v0 /* 32BA4 800577A4 8603004C */ lh $v1, 0x4C($s0) /* 32BA8 800577A8 00004012 */ mflo $t0 /* 32BAC 800577AC 000813C3 */ sra $v0, $t0, 15 /* 32BB0 800577B0 A6020050 */ sh $v0, 0x50($s0) /* 32BB4 800577B4 2402007F */ addiu $v0, $zero, 0x7F /* 32BB8 800577B8 00431023 */ subu $v0, $v0, $v1 /* 32BBC 800577BC 00021040 */ sll $v0, $v0, 1 /* 32BC0 800577C0 8603004E */ lh $v1, 0x4E($s0) /* 32BC4 800577C4 3C018008 */ lui $at, %hi(AlCosineBlend) /* 32BC8 800577C8 00220821 */ addu $at, $at, $v0 /* 32BCC 800577CC 84228E60 */ lh $v0, %lo(AlCosineBlend)($at) /* 32BD0 800577D0 00620018 */ mult $v1, $v0 /* 32BD4 800577D4 00004012 */ mflo $t0 /* 32BD8 800577D8 08015E02 */ j .L80057808 /* 32BDC 800577DC 000813C3 */ sra $v0, $t0, 15 .L800577E0: /* 32BE0 800577E0 86040050 */ lh $a0, 0x50($s0) /* 32BE4 800577E4 8606005A */ lh $a2, 0x5A($s0) /* 32BE8 800577E8 0C016001 */ jal func_80058004 /* 32BEC 800577EC 96070058 */ lhu $a3, 0x58($s0) /* 32BF0 800577F0 86040052 */ lh $a0, 0x52($s0) /* 32BF4 800577F4 8E050064 */ lw $a1, 0x64($s0) /* 32BF8 800577F8 86060060 */ lh $a2, 0x60($s0) /* 32BFC 800577FC 9607005E */ lhu $a3, 0x5E($s0) /* 32C00 80057800 0C016001 */ jal func_80058004 /* 32C04 80057804 A6020050 */ sh $v0, 0x50($s0) .L80057808: /* 32C08 80057808 A6020052 */ sh $v0, 0x52($s0) /* 32C0C 8005780C 86220008 */ lh $v0, 0x8($s1) /* 32C10 80057810 14400002 */ bnez $v0, .L8005781C /* 32C14 80057814 24020001 */ addiu $v0, $zero, 0x1 /* 32C18 80057818 A6220008 */ sh $v0, 0x8($s1) .L8005781C: /* 32C1C 8005781C 8622000A */ lh $v0, 0xA($s1) /* 32C20 80057820 14400004 */ bnez $v0, .L80057834 /* 32C24 80057824 00121400 */ sll $v0, $s2, 16 /* 32C28 80057828 24020001 */ addiu $v0, $zero, 0x1 /* 32C2C 8005782C A622000A */ sh $v0, 0xA($s1) /* 32C30 80057830 00121400 */ sll $v0, $s2, 16 .L80057834: /* 32C34 80057834 00021403 */ sra $v0, $v0, 16 /* 32C38 80057838 00420018 */ mult $v0, $v0 /* 32C3C 8005783C 24020001 */ addiu $v0, $zero, 0x1 /* 32C40 80057840 AE20001C */ sw $zero, 0x1C($s1) /* 32C44 80057844 AE330020 */ sw $s3, 0x20($s1) /* 32C48 80057848 AE220024 */ sw $v0, 0x24($s1) /* 32C4C 8005784C 00004012 */ mflo $t0 /* 32C50 80057850 000813C3 */ sra $v0, $t0, 15 /* 32C54 80057854 A6220006 */ sh $v0, 0x6($s1) /* 32C58 80057858 8FBF0020 */ lw $ra, 0x20($sp) /* 32C5C 8005785C 8FB3001C */ lw $s3, 0x1C($sp) /* 32C60 80057860 8FB20018 */ lw $s2, 0x18($sp) /* 32C64 80057864 8FB10014 */ lw $s1, 0x14($sp) /* 32C68 80057868 8FB00010 */ lw $s0, 0x10($sp) /* 32C6C 8005786C 03E00008 */ jr $ra /* 32C70 80057870 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void au_syn_set_volume_delta(u8 voiceIdx, s16 vol, s32 delta) { AuPVoice* pvoice = &gSynDriverPtr->pvoices[voiceIdx]; AuEnvMixer* envMixer = &pvoice->envMixer; if (envMixer->delta >= envMixer->segEnd) { envMixer->delta = envMixer->segEnd; if (!AuSynUseStereo) { envMixer->cvolL = (envMixer->volume * AuEqPower[AU_EQPOW_MID_IDX]) >> 0xF; envMixer->cvolR = (envMixer->volume * AuEqPower[AU_EQPOW_MID_IDX]) >> 0xF; } else { envMixer->cvolL = (envMixer->volume * AuEqPower[envMixer->pan]) >> 0xF; envMixer->cvolR = (envMixer->volume * AuEqPower[AU_EQPOW_MAX_IDX - envMixer->pan]) >> 0xF; } } else { envMixer->cvolL = _getVol(envMixer->cvolL, envMixer->delta, envMixer->lratm, envMixer->lratl); envMixer->cvolR = _getVol(envMixer->cvolR, envMixer->delta, envMixer->rratm, envMixer->rratl); } if (envMixer->cvolL == 0) { envMixer->cvolL = 1; } if (envMixer->cvolR == 0) { envMixer->cvolR = 1; } envMixer->volume = SQ(vol) >> 0xF; envMixer->delta = 0; envMixer->segEnd = delta; envMixer->first = 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_80245808 /* 166068 80245808 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 16606C 8024580C AFB3001C */ sw $s3, 0x1C($sp) /* 166070 80245810 0080982D */ daddu $s3, $a0, $zero D_80245814: /* 166074 80245814 AFB00010 */ sw $s0, 0x10($sp) /* 166078 80245818 0000802D */ daddu $s0, $zero, $zero /* 16607C 8024581C AFB20018 */ sw $s2, 0x18($sp) /* 166080 80245820 3C128025 */ lui $s2, %hi(D_8024C0B0) /* 166084 80245824 2652C0B0 */ addiu $s2, $s2, %lo(D_8024C0B0) glabel .L80245828 /* 166088 80245828 AFB10014 */ sw $s1, 0x14($sp) /* 16608C 8024582C 3C118025 */ lui $s1, %hi(D_80249E20) D_80245830: /* 166090 80245830 26319E20 */ addiu $s1, $s1, %lo(D_80249E20) /* 166094 80245834 AFBF0020 */ sw $ra, 0x20($sp) D_80245838: /* 166098 80245838 8E240000 */ lw $a0, 0x0($s1) /* 16609C 8024583C 26310004 */ addiu $s1, $s1, 0x4 D_80245840: /* 1660A0 80245840 0C050529 */ jal hud_element_create .L80245844: /* 1660A4 80245844 26100001 */ addiu $s0, $s0, 0x1 D_80245848: /* 1660A8 80245848 0040202D */ daddu $a0, $v0, $zero /* 1660AC 8024584C 24050080 */ addiu $a1, $zero, 0x80 D_80245850: /* 1660B0 80245850 0C051280 */ jal hud_element_set_flags /* 1660B4 80245854 AE440000 */ sw $a0, 0x0($s2) D_80245858: /* 1660B8 80245858 2A020014 */ slti $v0, $s0, 0x14 /* 1660BC 8024585C 1440FFF6 */ bnez $v0, D_80245838 D_80245860: /* 1660C0 80245860 26520004 */ addiu $s2, $s2, 0x4 /* 1660C4 80245864 2410000D */ addiu $s0, $zero, 0xD D_80245868: /* 1660C8 80245868 3C028025 */ lui $v0, %hi(D_8024A074) .L8024586C: /* 1660CC 8024586C 2442A074 */ addiu $v0, $v0, %lo(D_8024A074) .L80245870: /* 1660D0 80245870 AC530010 */ sw $s3, 0x10($v0) /* 1660D4 80245874 2610FFFF */ addiu $s0, $s0, -0x1 /* 1660D8 80245878 0601FFFD */ bgez $s0, .L80245870 /* 1660DC 8024587C 2442FFDC */ addiu $v0, $v0, -0x24 /* 1660E0 80245880 3C048025 */ lui $a0, %hi(.L80249EA0) /* 1660E4 80245884 24849EA0 */ addiu $a0, $a0, %lo(.L80249EA0) /* 1660E8 80245888 0C051FCC */ jal setup_pause_menu_tab /* 1660EC 8024588C 2405000E */ addiu $a1, $zero, 0xE /* 1660F0 80245890 82620004 */ lb $v0, 0x4($s3) /* 1660F4 80245894 82630005 */ lb $v1, 0x5($s3) /* 1660F8 80245898 00430018 */ mult $v0, $v1 glabel .L8024589C /* 1660FC 8024589C 00003012 */ mflo $a2 /* 166100 802458A0 82620006 */ lb $v0, 0x6($s3) D_802458A4: /* 166104 802458A4 00000000 */ nop D_802458A8: /* 166108 802458A8 00C20018 */ mult $a2, $v0 D_802458AC: /* 16610C 802458AC 00002012 */ mflo $a0 jtbl_802458B0: /* 166110 802458B0 82620002 */ lb $v0, 0x2($s3) D_802458B4: /* 166114 802458B4 00000000 */ nop /* 166118 802458B8 00620018 */ mult $v1, $v0 /* 16611C 802458BC 00001812 */ mflo $v1 jtbl_802458C0: /* 166120 802458C0 00831821 */ addu $v1, $a0, $v1 /* 166124 802458C4 82640001 */ lb $a0, 0x1($s3) D_802458C8: /* 166128 802458C8 8E620008 */ lw $v0, 0x8($s3) /* 16612C 802458CC 00641821 */ addu $v1, $v1, $a0 /* 166130 802458D0 00431021 */ addu $v0, $v0, $v1 .L802458D4: /* 166134 802458D4 90420000 */ lbu $v0, 0x0($v0) .L802458D8: /* 166138 802458D8 82630004 */ lb $v1, 0x4($s3) /* 16613C 802458DC A2620003 */ sb $v0, 0x3($s3) /* 166140 802458E0 24020002 */ addiu $v0, $zero, 0x2 /* 166144 802458E4 14620006 */ bne $v1, $v0, .L80245900 .L802458E8: /* 166148 802458E8 24020001 */ addiu $v0, $zero, 0x1 /* 16614C 802458EC 3C038016 */ lui $v1, %hi(gWindows) D_802458F0: /* 166150 802458F0 24639D50 */ addiu $v1, $v1, %lo(gWindows) /* 166154 802458F4 A46205AE */ sh $v0, 0x5AE($v1) /* 166158 802458F8 08091644 */ j .L80245910 /* 16615C 802458FC 240200D3 */ addiu $v0, $zero, 0xD3 .L80245900: /* 166160 80245900 3C038016 */ lui $v1, %hi(gWindows) D_80245904: /* 166164 80245904 24639D50 */ addiu $v1, $v1, %lo(gWindows) /* 166168 80245908 A46205AE */ sh $v0, 0x5AE($v1) /* 16616C 8024590C 240200A2 */ addiu $v0, $zero, 0xA2 .L80245910: /* 166170 80245910 A46205B0 */ sh $v0, 0x5B0($v1) D_80245914: /* 166174 80245914 24020019 */ addiu $v0, $zero, 0x19 D_80245918: /* 166178 80245918 A46205B2 */ sh $v0, 0x5B2($v1) /* 16617C 8024591C 3C048016 */ lui $a0, %hi(gWindows) /* 166180 80245920 24849D50 */ addiu $a0, $a0, %lo(gWindows) .L80245924: /* 166184 80245924 948205B0 */ lhu $v0, 0x5B0($a0) D_80245928: /* 166188 80245928 00021400 */ sll $v0, $v0, 16 ### DECOMPILED C INSTRUCTIONS: void filemenu_main_init(MenuPanel* menu) { s32 halfWidth; s32 halfWidth2; s16* posXPtr; s32 x; s32 i; for (i = 0; i < ARRAY_COUNT(filemenu_hudElemIDs); i++) { filemenu_hudElemIDs[i] = hud_element_create(filemenu_main_hudElemScripts[i]); hud_element_set_flags(filemenu_hudElemIDs[i], HUD_ELEMENT_FLAG_80); } for (i = 0; i < ARRAY_COUNT(filemenu_main_windowBPs); i++) { filemenu_main_windowBPs[i].tab = menu; } setup_pause_menu_tab(filemenu_main_windowBPs, ARRAY_COUNT(filemenu_main_windowBPs)); menu->selected = MENU_PANEL_SELECTED_GRID_DATA(menu); if (menu->page == 2) { gWindows[WINDOW_ID_FILEMENU_TITLE].pos.y = 1; gWindows[WINDOW_ID_FILEMENU_TITLE].width = 211; gWindows[WINDOW_ID_FILEMENU_TITLE].height = 25; } else { gWindows[WINDOW_ID_FILEMENU_TITLE].pos.y = 1; gWindows[WINDOW_ID_FILEMENU_TITLE].width = 162; gWindows[WINDOW_ID_FILEMENU_TITLE].height = 25; } halfWidth = gWindows[WINDOW_ID_FILEMENU_TITLE].width / 2; posXPtr = &gWindows[WINDOW_ID_FILEMENU_TITLE].pos.x; if (gWindows[WINDOW_ID_FILEMENU_TITLE].parent != -1) { x = (gWindows[gWindows[WINDOW_ID_FILEMENU_TITLE].parent].width / 2) - halfWidth; } else { x = 160 - halfWidth; } *posXPtr = x; halfWidth2 = gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].width / 2; posXPtr = &gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].pos.x; if (gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].parent != -1) { x = (gWindows[gWindows[WINDOW_ID_FILEMENU_OPTION_CENTER].parent].width / 2) - halfWidth2; } else { x = 160 - halfWidth2; } *posXPtr = x; if (menu->page != 0) { set_window_update(WINDOW_ID_FILEMENU_OPTION_LEFT, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_FILEMENU_OPTION_RIGHT, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_FILEMENU_STEREO, WINDOW_UPDATE_HIDE); set_window_update(WINDOW_ID_FILEMENU_MONO, WINDOW_UPDATE_HIDE); } menu->initialized = 1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_HiddenPanel_setupGfx /* 107A30 802E61B0 27BDFF58 */ addiu $sp, $sp, -0xA8 /* 107A34 802E61B4 AFBF00A4 */ sw $ra, 0xA4($sp) /* 107A38 802E61B8 AFB400A0 */ sw $s4, 0xA0($sp) /* 107A3C 802E61BC AFB3009C */ sw $s3, 0x9C($sp) /* 107A40 802E61C0 AFB20098 */ sw $s2, 0x98($sp) /* 107A44 802E61C4 AFB10094 */ sw $s1, 0x94($sp) /* 107A48 802E61C8 0C04417A */ jal get_entity_by_index /* 107A4C 802E61CC AFB00090 */ sw $s0, 0x90($sp) /* 107A50 802E61D0 0040982D */ daddu $s3, $v0, $zero /* 107A54 802E61D4 8E740040 */ lw $s4, 0x40($s3) /* 107A58 802E61D8 C662004C */ lwc1 $f2, 0x4C($s3) /* 107A5C 802E61DC C6800024 */ lwc1 $f0, 0x24($s4) /* 107A60 802E61E0 46001032 */ c.eq.s $f2, $f0 /* 107A64 802E61E4 00000000 */ nop /* 107A68 802E61E8 45010041 */ bc1t .L802E62F0 /* 107A6C 802E61EC 00000000 */ nop /* 107A70 802E61F0 0C019D28 */ jal guMtxIdentF /* 107A74 802E61F4 27A40010 */ addiu $a0, $sp, 0x10 /* 107A78 802E61F8 27B00050 */ addiu $s0, $sp, 0x50 /* 107A7C 802E61FC 0200202D */ daddu $a0, $s0, $zero /* 107A80 802E6200 C6820024 */ lwc1 $f2, 0x24($s4) /* 107A84 802E6204 3C013F80 */ lui $at, (0x3F800000 >> 16) /* 107A88 802E6208 44810000 */ mtc1 $at, $f0 /* 107A8C 802E620C 3C120001 */ lui $s2, (0x11630 >> 16) /* 107A90 802E6210 46001080 */ add.s $f2, $f2, $f0 /* 107A94 802E6214 8E650048 */ lw $a1, 0x48($s3) /* 107A98 802E6218 8E670050 */ lw $a3, 0x50($s3) /* 107A9C 802E621C 44061000 */ mfc1 $a2, $f2 /* 107AA0 802E6220 0C019E40 */ jal guTranslateF /* 107AA4 802E6224 36521630 */ ori $s2, $s2, (0x11630 & 0xFFFF) /* 107AA8 802E6228 0200202D */ daddu $a0, $s0, $zero /* 107AAC 802E622C 27A50010 */ addiu $a1, $sp, 0x10 /* 107AB0 802E6230 0C019D80 */ jal guMtxCatF /* 107AB4 802E6234 0200302D */ daddu $a2, $s0, $zero /* 107AB8 802E6238 0200202D */ daddu $a0, $s0, $zero /* 107ABC 802E623C 3C108007 */ lui $s0, %hi(gMatrixListPos) /* 107AC0 802E6240 261041F0 */ addiu $s0, $s0, %lo(gMatrixListPos) /* 107AC4 802E6244 3C11800A */ lui $s1, %hi(gDisplayContext) /* 107AC8 802E6248 2631A674 */ addiu $s1, $s1, %lo(gDisplayContext) /* 107ACC 802E624C 96050000 */ lhu $a1, 0x0($s0) /* 107AD0 802E6250 8E220000 */ lw $v0, 0x0($s1) /* 107AD4 802E6254 00052980 */ sll $a1, $a1, 6 /* 107AD8 802E6258 00B22821 */ addu $a1, $a1, $s2 /* 107ADC 802E625C 0C019D40 */ jal guMtxF2L /* 107AE0 802E6260 00452821 */ addu $a1, $v0, $a1 /* 107AE4 802E6264 3C03DA38 */ lui $v1, (0xDA380002 >> 16) /* 107AE8 802E6268 34630002 */ ori $v1, $v1, (0xDA380002 & 0xFFFF) /* 107AEC 802E626C 3C07D838 */ lui $a3, (0xD8380002 >> 16) /* 107AF0 802E6270 3C05800A */ lui $a1, %hi(gMainGfxPos) /* 107AF4 802E6274 24A5A66C */ addiu $a1, $a1, %lo(gMainGfxPos) /* 107AF8 802E6278 34E70002 */ ori $a3, $a3, (0xD8380002 & 0xFFFF) /* 107AFC 802E627C 8CA40000 */ lw $a0, 0x0($a1) /* 107B00 802E6280 96020000 */ lhu $v0, 0x0($s0) /* 107B04 802E6284 0080302D */ daddu $a2, $a0, $zero /* 107B08 802E6288 24840008 */ addiu $a0, $a0, 0x8 /* 107B0C 802E628C ACA40000 */ sw $a0, 0x0($a1) /* 107B10 802E6290 ACC30000 */ sw $v1, 0x0($a2) /* 107B14 802E6294 24430001 */ addiu $v1, $v0, 0x1 /* 107B18 802E6298 3042FFFF */ andi $v0, $v0, 0xFFFF /* 107B1C 802E629C 00021180 */ sll $v0, $v0, 6 /* 107B20 802E62A0 A6030000 */ sh $v1, 0x0($s0) /* 107B24 802E62A4 8E230000 */ lw $v1, 0x0($s1) /* 107B28 802E62A8 00521021 */ addu $v0, $v0, $s2 /* 107B2C 802E62AC 00621821 */ addu $v1, $v1, $v0 /* 107B30 802E62B0 24820008 */ addiu $v0, $a0, 0x8 /* 107B34 802E62B4 ACC30004 */ sw $v1, 0x4($a2) /* 107B38 802E62B8 ACA20000 */ sw $v0, 0x0($a1) /* 107B3C 802E62BC 3C02DE00 */ lui $v0, (0xDE000000 >> 16) /* 107B40 802E62C0 AC820000 */ sw $v0, 0x0($a0) /* 107B44 802E62C4 8E630044 */ lw $v1, 0x44($s3) /* 107B48 802E62C8 24820010 */ addiu $v0, $a0, 0x10 /* 107B4C 802E62CC ACA20000 */ sw $v0, 0x0($a1) /* 107B50 802E62D0 24020040 */ addiu $v0, $zero, 0x40 /* 107B54 802E62D4 AC82000C */ sw $v0, 0xC($a0) /* 107B58 802E62D8 3C020A00 */ lui $v0, %hi(D_0A000230_E9D880) /* 107B5C 802E62DC 24420230 */ addiu $v0, $v0, %lo(D_0A000230_E9D880) /* 107B60 802E62E0 3042FFFF */ andi $v0, $v0, 0xFFFF /* 107B64 802E62E4 AC870008 */ sw $a3, 0x8($a0) /* 107B68 802E62E8 00621821 */ addu $v1, $v1, $v0 /* 107B6C 802E62EC AC830004 */ sw $v1, 0x4($a0) .L802E62F0: /* 107B70 802E62F0 96840074 */ lhu $a0, 0x74($s4) /* 107B74 802E62F4 8E850078 */ lw $a1, 0x78($s4) /* 107B78 802E62F8 8E670044 */ lw $a3, 0x44($s3) /* 107B7C 802E62FC 0C0470CB */ jal mdl_project_tex_coords /* 107B80 802E6300 26860034 */ addiu $a2, $s4, 0x34 /* 107B84 802E6304 96850074 */ lhu $a1, 0x74($s4) /* 107B88 802E6308 3C04800A */ lui $a0, %hi(gMainGfxPos) /* 107B8C 802E630C 2484A66C */ addiu $a0, $a0, %lo(gMainGfxPos) /* 107B90 802E6310 0C0475CB */ jal mdl_draw_hidden_panel_surface /* 107B94 802E6314 00000000 */ nop /* 107B98 802E6318 8FBF00A4 */ lw $ra, 0xA4($sp) /* 107B9C 802E631C 8FB400A0 */ lw $s4, 0xA0($sp) /* 107BA0 802E6320 8FB3009C */ lw $s3, 0x9C($sp) /* 107BA4 802E6324 8FB20098 */ lw $s2, 0x98($sp) /* 107BA8 802E6328 8FB10094 */ lw $s1, 0x94($sp) /* 107BAC 802E632C 8FB00090 */ lw $s0, 0x90($sp) /* 107BB0 802E6330 03E00008 */ jr $ra /* 107BB4 802E6334 27BD00A8 */ addiu $sp, $sp, 0xA8 ### DECOMPILED C INSTRUCTIONS: void entity_HiddenPanel_setupGfx(s32 entityIndex) { Entity* entity = get_entity_by_index(entityIndex); HiddenPanelData* data = entity->dataBuf.hiddenPanel; Matrix4f rotMtx; Matrix4f tempMtx; if (entity->position.y != data->initialY) { guMtxIdentF(rotMtx); guTranslateF(tempMtx, entity->position.x, data->initialY + 1.0f, entity->position.z); guMtxCatF(tempMtx, rotMtx, tempMtx); guMtxF2L(tempMtx, &gDisplayContext->matrixStack[gMatrixListPos]); gSPMatrix(gMainGfxPos++, &gDisplayContext->matrixStack[gMatrixListPos++], G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPDisplayList(gMainGfxPos++, ENTITY_ADDR(entity, Gfx*, Gfx_HiddenPanel_RenderHole)); gSPPopMatrix(gMainGfxPos++, G_MTX_MODELVIEW); } mdl_project_tex_coords(data->modelID, data->renderDList, data->entityMatrix, entity->gfxBaseAddr); mdl_draw_hidden_panel_surface(&gMainGfxPos, data->modelID); }
### RAW ASSEMBLY INSTRUCTIONS: dlabel D_8024ECB0_C0C530 /* 141FF0 8024ECB0 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 141FF4 8024ECB4 F7B40028 */ sdc1 $f20, 0x28($sp) /* 141FF8 8024ECB8 3C01461C */ lui $at, (0x461C4000 >> 16) /* 141FFC 8024ECBC 34214000 */ ori $at, $at, (0x461C4000 & 0xFFFF) /* 142000 8024ECC0 4481A000 */ mtc1 $at, $f20 /* 142004 8024ECC4 AFB10014 */ sw $s1, 0x14($sp) /* 142008 8024ECC8 3C118025 */ lui $s1, %hi(D_802502B8) /* 14200C 8024ECCC 263102B8 */ addiu $s1, $s1, %lo(D_802502B8) /* 142010 8024ECD0 AFB00010 */ sw $s0, 0x10($sp) /* 142014 8024ECD4 0000802D */ daddu $s0, $zero, $zero /* 142018 8024ECD8 AFB3001C */ sw $s3, 0x1C($sp) /* 14201C 8024ECDC 3C13F840 */ lui $s3, (0xF840632A >> 16) /* 142020 8024ECE0 F7B60030 */ sdc1 $f22, 0x30($sp) /* 142024 8024ECE4 3C01BF80 */ lui $at, (0xBF800000 >> 16) D_8024ECE8: /* 142028 8024ECE8 4481B000 */ mtc1 $at, $f22 .L8024ECEC: /* 14202C 8024ECEC 3673632A */ ori $s3, $s3, (0xF840632A & 0xFFFF) /* 142030 8024ECF0 F7BA0040 */ sdc1 $f26, 0x40($sp) /* 142034 8024ECF4 3C0143C8 */ lui $at, (0x43C80000 >> 16) glabel func_8024ECF8 /* 142038 8024ECF8 4481D000 */ mtc1 $at, $f26 /* 14203C 8024ECFC 3C028027 */ lui $v0, %hi(gPauseMapSpacesInSnapRange) /* 142040 8024ED00 24420724 */ addiu $v0, $v0, %lo(gPauseMapSpacesInSnapRange) /* 142044 8024ED04 AFB20018 */ sw $s2, 0x18($sp) /* 142048 8024ED08 0040902D */ daddu $s2, $v0, $zero /* 14204C 8024ED0C F7B80038 */ sdc1 $f24, 0x38($sp) /* 142050 8024ED10 3C014348 */ lui $at, (0x43480000 >> 16) /* 142054 8024ED14 4481C000 */ mtc1 $at, $f24 /* 142058 8024ED18 2402FFFF */ addiu $v0, $zero, -0x1 /* 14205C 8024ED1C AFBF0020 */ sw $ra, 0x20($sp) /* 142060 8024ED20 3C018027 */ lui $at, %hi(gPauseMapCursorCurrentOption) /* 142064 8024ED24 AC22071C */ sw $v0, %lo(gPauseMapCursorCurrentOption)($at) /* 142068 8024ED28 AE400000 */ sw $zero, 0x0($s2) .L8024ED2C: /* 14206C 8024ED2C 0000202D */ daddu $a0, $zero, $zero /* 142070 8024ED30 0C0B1EAF */ jal evt_get_variable /* 142074 8024ED34 02132821 */ addu $a1, $s0, $s3 /* 142078 8024ED38 50400028 */ beql $v0, $zero, .L8024EDDC /* 14207C 8024ED3C 26100001 */ addiu $s0, $s0, 0x1 /* 142080 8024ED40 86220000 */ lh $v0, 0x0($s1) /* 142084 8024ED44 3C018027 */ lui $at, %hi(gPauseMapTargetX) /* 142088 8024ED48 C4240714 */ lwc1 $f4, %lo(gPauseMapTargetX)($at) D_8024ED4C: /* 14208C 8024ED4C 44820000 */ mtc1 $v0, $f0 D_8024ED50: /* 142090 8024ED50 00000000 */ nop /* 142094 8024ED54 46800020 */ cvt.s.w $f0, $f0 /* 142098 8024ED58 46002101 */ sub.s $f4, $f4, $f0 /* 14209C 8024ED5C 46042102 */ mul.s $f4, $f4, $f4 /* 1420A0 8024ED60 00000000 */ nop .L8024ED64: /* 1420A4 8024ED64 86220002 */ lh $v0, 0x2($s1) /* 1420A8 8024ED68 3C018027 */ lui $at, %hi(gPauseMapTargetY) /* 1420AC 8024ED6C C4200718 */ lwc1 $f0, %lo(gPauseMapTargetY)($at) /* 1420B0 8024ED70 44821000 */ mtc1 $v0, $f2 /* 1420B4 8024ED74 00000000 */ nop glabel func_8024ED78 /* 1420B8 8024ED78 468010A0 */ cvt.s.w $f2, $f2 /* 1420BC 8024ED7C 46020001 */ sub.s $f0, $f0, $f2 /* 1420C0 8024ED80 46000002 */ mul.s $f0, $f0, $f0 /* 1420C4 8024ED84 00000000 */ nop /* 1420C8 8024ED88 46002100 */ add.s $f4, $f4, $f0 /* 1420CC 8024ED8C 461A203C */ c.lt.s $f4, $f26 /* 1420D0 8024ED90 00000000 */ nop /* 1420D4 8024ED94 45000004 */ bc1f .L8024EDA8 /* 1420D8 8024ED98 00000000 */ nop /* 1420DC 8024ED9C 8E420000 */ lw $v0, 0x0($s2) /* 1420E0 8024EDA0 24420001 */ addiu $v0, $v0, 0x1 glabel func_8024EDA4 /* 1420E4 8024EDA4 AE420000 */ sw $v0, 0x0($s2) .L8024EDA8: /* 1420E8 8024EDA8 4614203C */ c.lt.s $f4, $f20 /* 1420EC 8024EDAC 00000000 */ nop /* 1420F0 8024EDB0 4502000A */ bc1fl .L8024EDDC /* 1420F4 8024EDB4 26100001 */ addiu $s0, $s0, 0x1 /* 1420F8 8024EDB8 4618203C */ c.lt.s $f4, $f24 /* 1420FC 8024EDBC 00000000 */ nop glabel func_8024EDC0 /* 142100 8024EDC0 45020006 */ bc1fl .L8024EDDC /* 142104 8024EDC4 26100001 */ addiu $s0, $s0, 0x1 /* 142108 8024EDC8 46002506 */ mov.s $f20, $f4 .L8024EDCC: /* 14210C 8024EDCC 4490B000 */ mtc1 $s0, $f22 /* 142110 8024EDD0 00000000 */ nop /* 142114 8024EDD4 4680B5A0 */ cvt.s.w $f22, $f22 /* 142118 8024EDD8 26100001 */ addiu $s0, $s0, 0x1 .L8024EDDC: /* 14211C 8024EDDC 2A020022 */ slti $v0, $s0, 0x22 /* 142120 8024EDE0 1440FFD2 */ bnez $v0, .L8024ED2C /* 142124 8024EDE4 26310014 */ addiu $s1, $s1, 0x14 /* 142128 8024EDE8 4600B18D */ trunc.w.s $f6, $f22 glabel func_8024EDEC /* 14212C 8024EDEC 44023000 */ mfc1 $v0, $f6 /* 142130 8024EDF0 8FBF0020 */ lw $ra, 0x20($sp) /* 142134 8024EDF4 8FB3001C */ lw $s3, 0x1C($sp) /* 142138 8024EDF8 8FB20018 */ lw $s2, 0x18($sp) /* 14213C 8024EDFC 8FB10014 */ lw $s1, 0x14($sp) /* 142140 8024EE00 8FB00010 */ lw $s0, 0x10($sp) /* 142144 8024EE04 D7BA0040 */ ldc1 $f26, 0x40($sp) .L8024EE08: /* 142148 8024EE08 D7B80038 */ ldc1 $f24, 0x38($sp) /* 14214C 8024EE0C D7B60030 */ ldc1 $f22, 0x30($sp) /* 142150 8024EE10 D7B40028 */ ldc1 $f20, 0x28($sp) /* 142154 8024EE14 3C018027 */ lui $at, %hi(gPauseMapCursorCurrentOption) D_8024EE18_C0C698: /* 142158 8024EE18 AC22071C */ sw $v0, %lo(gPauseMapCursorCurrentOption)($at) /* 14215C 8024EE1C 3C018027 */ lui $at, %hi(gPauseMapCursorCurrentOptionCopy) /* 142160 8024EE20 AC220720 */ sw $v0, %lo(gPauseMapCursorCurrentOptionCopy)($at) .L8024EE24: /* 142164 8024EE24 03E00008 */ jr $ra /* 142168 8024EE28 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void pause_map_update(MenuPanel* tab) { PauseMapSpace* mapSpace = &gPauseMapSpaces[0]; f32 lowestSqSum = 10000.0f; f32 cursorOption = -1.0f; s32 i; gPauseMapCursorCurrentOption = -1; gPauseMapSpacesInSnapRange = 0; for (i = 0; i < ARRAY_COUNT(gPauseMapSpaces); i++, mapSpace++) { if (evt_get_variable(0, GF_MAP_ToadTown + i) != 0) { f32 deltaX = gPauseMapTargetX - mapSpace->pos.x; f32 deltaY = gPauseMapTargetY - mapSpace->pos.y; f32 sqSum = SQ(deltaX) + SQ(deltaY); if (sqSum < 400.0f) { gPauseMapSpacesInSnapRange++; } if (sqSum < lowestSqSum && sqSum < 200.0f) { lowestSqSum = sqSum; cursorOption = i; } } } gPauseMapCursorCurrentOption = cursorOption; gPauseMapCursorCurrentOptionCopy = cursorOption; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80244A4C /* 137D8C 80244A4C 27BDFFC8 */ addiu $sp, $sp, -0x38 D_80244A50: /* 137D90 80244A50 AFB60028 */ sw $s6, 0x28($sp) D_80244A54: /* 137D94 80244A54 0080B02D */ daddu $s6, $a0, $zero glabel .L80244A58 /* 137D98 80244A58 AFB7002C */ sw $s7, 0x2C($sp) /* 137D9C 80244A5C 00C0B82D */ daddu $s7, $a2, $zero D_80244A60: /* 137DA0 80244A60 28A20002 */ slti $v0, $a1, 0x2 /* 137DA4 80244A64 AFBF0030 */ sw $ra, 0x30($sp) D_80244A68: /* 137DA8 80244A68 AFB50024 */ sw $s5, 0x24($sp) D_80244A6C: /* 137DAC 80244A6C AFB40020 */ sw $s4, 0x20($sp) D_80244A70: /* 137DB0 80244A70 AFB3001C */ sw $s3, 0x1C($sp) D_80244A74: /* 137DB4 80244A74 AFB20018 */ sw $s2, 0x18($sp) D_80244A78: /* 137DB8 80244A78 AFB10014 */ sw $s1, 0x14($sp) .L80244A7C: /* 137DBC 80244A7C 14400038 */ bnez $v0, .L80244B60 /* 137DC0 80244A80 AFB00010 */ sw $s0, 0x10($sp) .L80244A84: /* 137DC4 80244A84 24020002 */ addiu $v0, $zero, 0x2 /* 137DC8 80244A88 14A2000A */ bne $a1, $v0, .L80244AB4 /* 137DCC 80244A8C 24140001 */ addiu $s4, $zero, 0x1 /* 137DD0 80244A90 02E0F809 */ jalr $s7 /* 137DD4 80244A94 02C22821 */ addu $a1, $s6, $v0 /* 137DD8 80244A98 18400031 */ blez $v0, .L80244B60 /* 137DDC 80244A9C 00000000 */ nop /* 137DE0 80244AA0 96C20002 */ lhu $v0, 0x2($s6) /* 137DE4 80244AA4 96C30000 */ lhu $v1, 0x0($s6) glabel .L80244AA8 /* 137DE8 80244AA8 A6C20000 */ sh $v0, 0x0($s6) .L80244AAC: /* 137DEC 80244AAC 080912D8 */ j .L80244B60 /* 137DF0 80244AB0 A6C30002 */ sh $v1, 0x2($s6) .L80244AB4: /* 137DF4 80244AB4 0285102B */ sltu $v0, $s4, $a1 D_80244AB8: /* 137DF8 80244AB8 50400007 */ beql $v0, $zero, .L80244AD8 D_80244ABC: /* 137DFC 80244ABC 0014A042 */ srl $s4, $s4, 1 /* 137E00 80244AC0 00141040 */ sll $v0, $s4, 1 glabel .L80244AC4 /* 137E04 80244AC4 24540001 */ addiu $s4, $v0, 0x1 /* 137E08 80244AC8 0285102B */ sltu $v0, $s4, $a1 /* 137E0C 80244ACC 1440FFFD */ bnez $v0, .L80244AC4 D_80244AD0: /* 137E10 80244AD0 00141040 */ sll $v0, $s4, 1 /* 137E14 80244AD4 0014A042 */ srl $s4, $s4, 1 .L80244AD8: /* 137E18 80244AD8 00051040 */ sll $v0, $a1, 1 D_80244ADC: /* 137E1C 80244ADC 12800020 */ beqz $s4, .L80244B60 /* 137E20 80244AE0 02C2A821 */ addu $s5, $s6, $v0 .L80244AE4: /* 137E24 80244AE4 00141840 */ sll $v1, $s4, 1 /* 137E28 80244AE8 02C39021 */ addu $s2, $s6, $v1 glabel .L80244AEC /* 137E2C 80244AEC 0255102B */ sltu $v0, $s2, $s5 /* 137E30 80244AF0 10400019 */ beqz $v0, .L80244B58 D_80244AF4: /* 137E34 80244AF4 00141042 */ srl $v0, $s4, 1 /* 137E38 80244AF8 0060982D */ daddu $s3, $v1, $zero /* 137E3C 80244AFC 02538023 */ subu $s0, $s2, $s3 glabel func_80244B00 /* 137E40 80244B00 080912CD */ j .L80244B34 /* 137E44 80244B04 0216102B */ sltu $v0, $s0, $s6 .L80244B08: /* 137E48 80244B08 02138821 */ addu $s1, $s0, $s3 /* 137E4C 80244B0C 02E0F809 */ jalr $s7 /* 137E50 80244B10 0220282D */ daddu $a1, $s1, $zero /* 137E54 80244B14 5840000C */ blezl $v0, D_80244B48 /* 137E58 80244B18 26520002 */ addiu $s2, $s2, 0x2 .L80244B1C: /* 137E5C 80244B1C 96220000 */ lhu $v0, 0x0($s1) D_80244B20: /* 137E60 80244B20 96030000 */ lhu $v1, 0x0($s0) /* 137E64 80244B24 A6020000 */ sh $v0, 0x0($s0) /* 137E68 80244B28 02138023 */ subu $s0, $s0, $s3 D_80244B2C: /* 137E6C 80244B2C 0216102B */ sltu $v0, $s0, $s6 D_80244B30: /* 137E70 80244B30 A6230000 */ sh $v1, 0x0($s1) .L80244B34: /* 137E74 80244B34 14400003 */ bnez $v0, .L80244B44 .L80244B38: /* 137E78 80244B38 0215102B */ sltu $v0, $s0, $s5 D_80244B3C: /* 137E7C 80244B3C 1440FFF2 */ bnez $v0, .L80244B08 D_80244B40: /* 137E80 80244B40 0200202D */ daddu $a0, $s0, $zero .L80244B44: /* 137E84 80244B44 26520002 */ addiu $s2, $s2, 0x2 D_80244B48: /* 137E88 80244B48 0255102B */ sltu $v0, $s2, $s5 /* 137E8C 80244B4C 5440FFEC */ bnel $v0, $zero, func_80244B00 D_80244B50: /* 137E90 80244B50 02538023 */ subu $s0, $s2, $s3 .L80244B54: /* 137E94 80244B54 00141042 */ srl $v0, $s4, 1 .L80244B58: /* 137E98 80244B58 1440FFE2 */ bnez $v0, .L80244AE4 .L80244B5C: /* 137E9C 80244B5C 0040A02D */ daddu $s4, $v0, $zero .L80244B60: /* 137EA0 80244B60 8FBF0030 */ lw $ra, 0x30($sp) .L80244B64: /* 137EA4 80244B64 8FB7002C */ lw $s7, 0x2C($sp) .L80244B68: /* 137EA8 80244B68 8FB60028 */ lw $s6, 0x28($sp) /* 137EAC 80244B6C 8FB50024 */ lw $s5, 0x24($sp) .L80244B70: /* 137EB0 80244B70 8FB40020 */ lw $s4, 0x20($sp) /* 137EB4 80244B74 8FB3001C */ lw $s3, 0x1C($sp) .L80244B78: /* 137EB8 80244B78 8FB20018 */ lw $s2, 0x18($sp) /* 137EBC 80244B7C 8FB10014 */ lw $s1, 0x14($sp) glabel .L80244B80 /* 137EC0 80244B80 8FB00010 */ lw $s0, 0x10($sp) .L80244B84: /* 137EC4 80244B84 03E00008 */ jr $ra D_80244B88: /* 137EC8 80244B88 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void pause_sort_item_list(s16* arr, s32 len, s32 (*compare)(s16*, s16 *)) { if (len < 2) { // Trivially sorted return; } else if (len == 2) { // Trivial 2-element sort if (compare(&arr[0], &arr[1]) > 0) { s16 temp = arr[0]; arr[0] = arr[1]; arr[1] = temp; } } else { // Nontrivial sort required, use shell sort u32 gap = 1; s16* end; while (gap < len) { gap = gap * 2 + 1; } end = &arr[len]; while ((gap /= 2) != 0) { s16* window_end; for (window_end = &arr[gap]; window_end < end; window_end++) { s16* cur_elem = window_end - gap; // This could be written simpler as a while loop, but the compiler figures out that it only needs to do // the "cur_elem < end" check on the first iteration in that case if (cur_elem >= arr && cur_elem < end) { do { s16* elem_a = cur_elem; s16* elem_b = cur_elem + gap; if (compare(elem_a, elem_b) > 0) { s16 temp = *elem_a; *elem_a = *elem_b; *elem_b = temp; cur_elem -= gap; } else { break; } } while (cur_elem >= arr && cur_elem < end); } } } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel underwater_main /* 3B8BD0 E00BA000 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 3B8BD4 E00BA004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 3B8BD8 E00BA008 4485A000 */ mtc1 $a1, $f20 /* 3B8BDC E00BA00C F7B60040 */ sdc1 $f22, 0x40($sp) /* 3B8BE0 E00BA010 4486B000 */ mtc1 $a2, $f22 /* 3B8BE4 E00BA014 AFB20030 */ sw $s2, 0x30($sp) /* 3B8BE8 E00BA018 0080902D */ daddu $s2, $a0, $zero /* 3B8BEC E00BA01C F7B80048 */ sdc1 $f24, 0x48($sp) /* 3B8BF0 E00BA020 4487C000 */ mtc1 $a3, $f24 /* 3B8BF4 E00BA024 27A40010 */ addiu $a0, $sp, 0x10 /* 3B8BF8 E00BA028 AFB1002C */ sw $s1, 0x2C($sp) /* 3B8BFC E00BA02C 8FB10064 */ lw $s1, 0x64($sp) /* 3B8C00 E00BA030 3C02E00C */ lui $v0, %hi(underwater_init) /* 3B8C04 E00BA034 2442A16C */ addiu $v0, $v0, %lo(underwater_init) /* 3B8C08 E00BA038 AFA20018 */ sw $v0, 0x18($sp) /* 3B8C0C E00BA03C 3C02E00C */ lui $v0, %hi(underwater_update) /* 3B8C10 E00BA040 2442A174 */ addiu $v0, $v0, %lo(underwater_update) /* 3B8C14 E00BA044 AFA2001C */ sw $v0, 0x1C($sp) /* 3B8C18 E00BA048 3C02E00C */ lui $v0, %hi(underwater_render) /* 3B8C1C E00BA04C 2442A5DC */ addiu $v0, $v0, %lo(underwater_render) /* 3B8C20 E00BA050 AFA20020 */ sw $v0, 0x20($sp) /* 3B8C24 E00BA054 2402005D */ addiu $v0, $zero, 0x5D /* 3B8C28 E00BA058 AFBF0034 */ sw $ra, 0x34($sp) /* 3B8C2C E00BA05C AFB00028 */ sw $s0, 0x28($sp) /* 3B8C30 E00BA060 AFA00010 */ sw $zero, 0x10($sp) /* 3B8C34 E00BA064 AFA00024 */ sw $zero, 0x24($sp) /* 3B8C38 E00BA068 0C080124 */ jal shim_create_effect_instance /* 3B8C3C E00BA06C AFA20014 */ sw $v0, 0x14($sp) /* 3B8C40 E00BA070 24040308 */ addiu $a0, $zero, 0x308 /* 3B8C44 E00BA074 24030001 */ addiu $v1, $zero, 0x1 /* 3B8C48 E00BA078 0040802D */ daddu $s0, $v0, $zero /* 3B8C4C E00BA07C 0C08012C */ jal shim_general_heap_malloc /* 3B8C50 E00BA080 AE030008 */ sw $v1, 0x8($s0) /* 3B8C54 E00BA084 0040302D */ daddu $a2, $v0, $zero /* 3B8C58 E00BA088 14C00003 */ bnez $a2, .LE00BA098 /* 3B8C5C E00BA08C AE02000C */ sw $v0, 0xC($s0) .LE00BA090: /* 3B8C60 E00BA090 0802E824 */ j .LE00BA090 /* 3B8C64 E00BA094 00000000 */ nop .LE00BA098: /* 3B8C68 E00BA098 ACD20000 */ sw $s2, 0x0($a2) /* 3B8C6C E00BA09C 1E200004 */ bgtz $s1, .LE00BA0B0 /* 3B8C70 E00BA0A0 ACC00014 */ sw $zero, 0x14($a2) /* 3B8C74 E00BA0A4 240203E8 */ addiu $v0, $zero, 0x3E8 /* 3B8C78 E00BA0A8 0802E82D */ j .LE00BA0B4 /* 3B8C7C E00BA0AC ACC20010 */ sw $v0, 0x10($a2) .LE00BA0B0: /* 3B8C80 E00BA0B0 ACD10010 */ sw $s1, 0x10($a2) .LE00BA0B4: /* 3B8C84 E00BA0B4 0000482D */ daddu $t1, $zero, $zero /* 3B8C88 E00BA0B8 0120402D */ daddu $t0, $t1, $zero /* 3B8C8C E00BA0BC 0120382D */ daddu $a3, $t1, $zero /* 3B8C90 E00BA0C0 A0C0001F */ sb $zero, 0x1F($a2) /* 3B8C94 E00BA0C4 E4D40004 */ swc1 $f20, 0x4($a2) /* 3B8C98 E00BA0C8 E4D60008 */ swc1 $f22, 0x8($a2) /* 3B8C9C E00BA0CC E4D8000C */ swc1 $f24, 0xC($a2) /* 3B8CA0 E00BA0D0 C7A00060 */ lwc1 $f0, 0x60($sp) /* 3B8CA4 E00BA0D4 2402000A */ addiu $v0, $zero, 0xA /* 3B8CA8 E00BA0D8 A0C2001C */ sb $v0, 0x1C($a2) /* 3B8CAC E00BA0DC 2402006E */ addiu $v0, $zero, 0x6E /* 3B8CB0 E00BA0E0 240300FF */ addiu $v1, $zero, 0xFF /* 3B8CB4 E00BA0E4 A0C2001D */ sb $v0, 0x1D($a2) /* 3B8CB8 E00BA0E8 240200BE */ addiu $v0, $zero, 0xBE /* 3B8CBC E00BA0EC A0C20020 */ sb $v0, 0x20($a2) /* 3B8CC0 E00BA0F0 240200DC */ addiu $v0, $zero, 0xDC /* 3B8CC4 E00BA0F4 A0C3001E */ sb $v1, 0x1E($a2) /* 3B8CC8 E00BA0F8 A0C20021 */ sb $v0, 0x21($a2) /* 3B8CCC E00BA0FC A0C30022 */ sb $v1, 0x22($a2) /* 3B8CD0 E00BA100 E4C00018 */ swc1 $f0, 0x18($a2) .LE00BA104: /* 3B8CD4 E00BA104 0000202D */ daddu $a0, $zero, $zero /* 3B8CD8 E00BA108 0100282D */ daddu $a1, $t0, $zero .LE00BA10C: /* 3B8CDC E00BA10C 00C51021 */ addu $v0, $a2, $a1 /* 3B8CE0 E00BA110 00871821 */ addu $v1, $a0, $a3 /* 3B8CE4 E00BA114 24840001 */ addiu $a0, $a0, 0x1 /* 3B8CE8 E00BA118 00C31821 */ addu $v1, $a2, $v1 /* 3B8CEC E00BA11C A0600023 */ sb $zero, 0x23($v1) /* 3B8CF0 E00BA120 A440011A */ sh $zero, 0x11A($v0) /* 3B8CF4 E00BA124 2882000D */ slti $v0, $a0, 0xD /* 3B8CF8 E00BA128 1440FFF8 */ bnez $v0, .LE00BA10C /* 3B8CFC E00BA12C 24A50002 */ addiu $a1, $a1, 0x2 /* 3B8D00 E00BA130 2508001A */ addiu $t0, $t0, 0x1A /* 3B8D04 E00BA134 25290001 */ addiu $t1, $t1, 0x1 /* 3B8D08 E00BA138 29220013 */ slti $v0, $t1, 0x13 /* 3B8D0C E00BA13C 1440FFF1 */ bnez $v0, .LE00BA104 /* 3B8D10 E00BA140 24E7000D */ addiu $a3, $a3, 0xD /* 3B8D14 E00BA144 0200102D */ daddu $v0, $s0, $zero /* 3B8D18 E00BA148 8FBF0034 */ lw $ra, 0x34($sp) /* 3B8D1C E00BA14C 8FB20030 */ lw $s2, 0x30($sp) /* 3B8D20 E00BA150 8FB1002C */ lw $s1, 0x2C($sp) /* 3B8D24 E00BA154 8FB00028 */ lw $s0, 0x28($sp) /* 3B8D28 E00BA158 D7B80048 */ ldc1 $f24, 0x48($sp) /* 3B8D2C E00BA15C D7B60040 */ ldc1 $f22, 0x40($sp) /* 3B8D30 E00BA160 D7B40038 */ ldc1 $f20, 0x38($sp) /* 3B8D34 E00BA164 03E00008 */ jr $ra /* 3B8D38 E00BA168 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: EffectInstance* underwater_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5) { EffectBlueprint bp; EffectInstance* effect; UnderwaterFXData* data; s32 numParts = 1; s32 i; s32 j; bp.init = underwater_init; bp.update = underwater_update; bp.renderWorld = underwater_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_UNDERWATER; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.underwater = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.underwater != NULL); data->unk_00 = arg0; data->lifeTime = 0; if (arg5 <= 0) { data->timeLeft = 1000; } else { data->timeLeft = arg5; } data->waterColor.a = 0; data->unk_04 = arg1; data->unk_08 = arg2; data->unk_0C = arg3; data->unk_18 = arg4; data->waterColor.r = 10; data->waterColor.g = 110; data->waterColor.b = 255; data->unk_20.r = 190; data->unk_20.g = 220; data->unk_20.b = 255; for (i = 0; i < ARRAY_COUNT(data->unk_23); i++) { for (j = 0; j < ARRAY_COUNT(data->unk_23[0]); j++) { data->unk_23[i][j] = 0; data->unk_11A[i][j] = 0; } } return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel osPfsIsPlug /* 48740 8006D340 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 48744 8006D344 AFB20040 */ sw $s2, 0x40($sp) /* 48748 8006D348 00809021 */ addu $s2, $a0, $zero /* 4874C 8006D34C AFB70054 */ sw $s7, 0x54($sp) /* 48750 8006D350 00A0B821 */ addu $s7, $a1, $zero /* 48754 8006D354 AFB30044 */ sw $s3, 0x44($sp) /* 48758 8006D358 00009821 */ addu $s3, $zero, $zero /* 4875C 8006D35C AFB00038 */ sw $s0, 0x38($sp) /* 48760 8006D360 24100003 */ addiu $s0, $zero, 0x3 /* 48764 8006D364 AFBF0058 */ sw $ra, 0x58($sp) /* 48768 8006D368 AFB60050 */ sw $s6, 0x50($sp) /* 4876C 8006D36C AFB5004C */ sw $s5, 0x4C($sp) /* 48770 8006D370 AFB40048 */ sw $s4, 0x48($sp) /* 48774 8006D374 0C019771 */ jal __osSiGetAccess /* 48778 8006D378 AFB1003C */ sw $s1, 0x3C($sp) /* 4877C 8006D37C 3C14800E */ lui $s4, %hi(__osPfsPifRam) /* 48780 8006D380 2694A000 */ addiu $s4, $s4, %lo(__osPfsPifRam) /* 48784 8006D384 27B10020 */ addiu $s1, $sp, 0x20 /* 48788 8006D388 27B50010 */ addiu $s5, $sp, 0x10 .L8006D38C: /* 4878C 8006D38C 0C01B52F */ jal osPfsRequestData /* 48790 8006D390 00002021 */ addu $a0, $zero, $zero /* 48794 8006D394 24040001 */ addiu $a0, $zero, 0x1 /* 48798 8006D398 0C019730 */ jal __osSiRawStartDma /* 4879C 8006D39C 02802821 */ addu $a1, $s4, $zero /* 487A0 8006D3A0 02402021 */ addu $a0, $s2, $zero /* 487A4 8006D3A4 02202821 */ addu $a1, $s1, $zero /* 487A8 8006D3A8 0C0195BC */ jal osRecvMesg /* 487AC 8006D3AC 24060001 */ addiu $a2, $zero, 0x1 /* 487B0 8006D3B0 00002021 */ addu $a0, $zero, $zero /* 487B4 8006D3B4 0C019730 */ jal __osSiRawStartDma /* 487B8 8006D3B8 02802821 */ addu $a1, $s4, $zero /* 487BC 8006D3BC 02402021 */ addu $a0, $s2, $zero /* 487C0 8006D3C0 02202821 */ addu $a1, $s1, $zero /* 487C4 8006D3C4 24060001 */ addiu $a2, $zero, 0x1 /* 487C8 8006D3C8 0C0195BC */ jal osRecvMesg /* 487CC 8006D3CC 0040B021 */ addu $s6, $v0, $zero /* 487D0 8006D3D0 27A40024 */ addiu $a0, $sp, 0x24 /* 487D4 8006D3D4 0C01B558 */ jal osPfsGetInitData /* 487D8 8006D3D8 27A50010 */ addiu $a1, $sp, 0x10 /* 487DC 8006D3DC 3C02800A */ lui $v0, %hi(__osMaxControllers) /* 487E0 8006D3E0 9042A606 */ lbu $v0, %lo(__osMaxControllers)($v0) /* 487E4 8006D3E4 1840000C */ blez $v0, .L8006D418 /* 487E8 8006D3E8 00002021 */ addu $a0, $zero, $zero /* 487EC 8006D3EC 00402821 */ addu $a1, $v0, $zero /* 487F0 8006D3F0 02A01821 */ addu $v1, $s5, $zero .L8006D3F4: /* 487F4 8006D3F4 90620002 */ lbu $v0, 0x2($v1) /* 487F8 8006D3F8 30420004 */ andi $v0, $v0, 0x4 /* 487FC 8006D3FC 54400003 */ bnel $v0, $zero, .L8006D40C /* 48800 8006D400 24840001 */ addiu $a0, $a0, 0x1 /* 48804 8006D404 0801B506 */ j .L8006D418 /* 48808 8006D408 2610FFFF */ addiu $s0, $s0, -0x1 .L8006D40C: /* 4880C 8006D40C 0085102A */ slt $v0, $a0, $a1 /* 48810 8006D410 1440FFF8 */ bnez $v0, .L8006D3F4 /* 48814 8006D414 24630004 */ addiu $v1, $v1, 0x4 .L8006D418: /* 48818 8006D418 3C03800A */ lui $v1, %hi(__osMaxControllers) /* 4881C 8006D41C 9063A606 */ lbu $v1, %lo(__osMaxControllers)($v1) /* 48820 8006D420 00831026 */ xor $v0, $a0, $v1 /* 48824 8006D424 0002102B */ sltu $v0, $zero, $v0 /* 48828 8006D428 00021023 */ negu $v0, $v0 /* 4882C 8006D42C 02028024 */ and $s0, $s0, $v0 /* 48830 8006D430 1E00FFD6 */ bgtz $s0, .L8006D38C /* 48834 8006D434 00000000 */ nop /* 48838 8006D438 10600011 */ beqz $v1, .L8006D480 /* 4883C 8006D43C 00002021 */ addu $a0, $zero, $zero /* 48840 8006D440 24060001 */ addiu $a2, $zero, 0x1 /* 48844 8006D444 00602821 */ addu $a1, $v1, $zero /* 48848 8006D448 27A30010 */ addiu $v1, $sp, 0x10 .L8006D44C: /* 4884C 8006D44C 90620003 */ lbu $v0, 0x3($v1) /* 48850 8006D450 54400008 */ bnel $v0, $zero, .L8006D474 /* 48854 8006D454 24840001 */ addiu $a0, $a0, 0x1 /* 48858 8006D458 90620002 */ lbu $v0, 0x2($v1) /* 4885C 8006D45C 30420001 */ andi $v0, $v0, 0x1 /* 48860 8006D460 50400004 */ beql $v0, $zero, .L8006D474 /* 48864 8006D464 24840001 */ addiu $a0, $a0, 0x1 /* 48868 8006D468 00861004 */ sllv $v0, $a2, $a0 /* 4886C 8006D46C 02629825 */ or $s3, $s3, $v0 /* 48870 8006D470 24840001 */ addiu $a0, $a0, 0x1 .L8006D474: /* 48874 8006D474 0085102A */ slt $v0, $a0, $a1 /* 48878 8006D478 1440FFF4 */ bnez $v0, .L8006D44C /* 4887C 8006D47C 24630004 */ addiu $v1, $v1, 0x4 .L8006D480: /* 48880 8006D480 0C01978C */ jal __osSiRelAccess /* 48884 8006D484 00000000 */ nop /* 48888 8006D488 A2F30000 */ sb $s3, 0x0($s7) /* 4888C 8006D48C 02C01021 */ addu $v0, $s6, $zero /* 48890 8006D490 8FBF0058 */ lw $ra, 0x58($sp) /* 48894 8006D494 8FB70054 */ lw $s7, 0x54($sp) /* 48898 8006D498 8FB60050 */ lw $s6, 0x50($sp) /* 4889C 8006D49C 8FB5004C */ lw $s5, 0x4C($sp) /* 488A0 8006D4A0 8FB40048 */ lw $s4, 0x48($sp) /* 488A4 8006D4A4 8FB30044 */ lw $s3, 0x44($sp) /* 488A8 8006D4A8 8FB20040 */ lw $s2, 0x40($sp) /* 488AC 8006D4AC 8FB1003C */ lw $s1, 0x3C($sp) /* 488B0 8006D4B0 8FB00038 */ lw $s0, 0x38($sp) /* 488B4 8006D4B4 03E00008 */ jr $ra /* 488B8 8006D4B8 27BD0060 */ addiu $sp, $sp, 0x60 ### DECOMPILED C INSTRUCTIONS: s32 osPfsIsPlug(OSMesgQueue* mq, u8* pattern) { s32 ret = 0; OSMesg msg; u8 bitpattern; OSContStatus contData[MAXCONTROLLERS]; s32 channel; u8 bits = 0; s32 crcErrorCount = 3; __osSiGetAccess(); do { __osPfsRequestData(CONT_CMD_REQUEST_STATUS); ret = __osSiRawStartDma(OS_WRITE, &__osPfsPifRam); osRecvMesg(mq, &msg, OS_MESG_BLOCK); ret = __osSiRawStartDma(OS_READ, &__osPfsPifRam); osRecvMesg(mq, &msg, OS_MESG_BLOCK); __osPfsGetInitData(&bitpattern, &contData[0]); for (channel = 0; channel < __osMaxControllers; channel++) { if ((contData[channel].status & CONT_ADDR_CRC_ER) == 0) { crcErrorCount--; break; } } if (channel == __osMaxControllers) { crcErrorCount = 0; } } while (crcErrorCount > 0); for (channel = 0; channel < __osMaxControllers; channel++) { if ((contData[channel].errno == 0) && ((contData[channel].status & CONT_CARD_ON) != 0)) { bits |= (1 << channel); } } __osSiRelAccess(); *pattern = bits; return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel pink_sparkles_update /* 412A34 E0124304 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 412A38 E0124308 0000302D */ daddu $a2, $zero, $zero /* 412A3C E012430C AFBF0010 */ sw $ra, 0x10($sp) /* 412A40 E0124310 8C85000C */ lw $a1, 0xC($a0) /* 412A44 E0124314 00C0402D */ daddu $t0, $a2, $zero /* 412A48 E0124318 8CA20020 */ lw $v0, 0x20($a1) /* 412A4C E012431C 8CA3001C */ lw $v1, 0x1C($a1) /* 412A50 E0124320 24420001 */ addiu $v0, $v0, 0x1 /* 412A54 E0124324 0040382D */ daddu $a3, $v0, $zero /* 412A58 E0124328 2463FFFF */ addiu $v1, $v1, -0x1 /* 412A5C E012432C ACA3001C */ sw $v1, 0x1C($a1) /* 412A60 E0124330 ACA70020 */ sw $a3, 0x20($a1) /* 412A64 E0124334 8C820008 */ lw $v0, 0x8($a0) /* 412A68 E0124338 2442FFFF */ addiu $v0, $v0, -0x1 /* 412A6C E012433C 1840004E */ blez $v0, .LE0124478 /* 412A70 E0124340 24A5002C */ addiu $a1, $a1, 0x2C /* 412A74 E0124344 240AFFFF */ addiu $t2, $zero, -0x1 /* 412A78 E0124348 3C09E012 */ lui $t1, %hi(D_E0124BE4) /* 412A7C E012434C 25294BE4 */ addiu $t1, $t1, %lo(D_E0124BE4) /* 412A80 E0124350 24A3000C */ addiu $v1, $a1, 0xC /* 412A84 E0124354 3C01E012 */ lui $at, (0xE0124C18 >> 16) /* 412A88 E0124358 D42E4C18 */ ldc1 $f14, (0xE0124C18 & 0xFFFF)($at) /* 412A8C E012435C 3C01E012 */ lui $at, (0xE0124C20 >> 16) /* 412A90 E0124360 D42C4C20 */ ldc1 $f12, (0xE0124C20 & 0xFFFF)($at) /* 412A94 E0124364 3C01E012 */ lui $at, (0xE0124C28 >> 16) /* 412A98 E0124368 D42A4C28 */ ldc1 $f10, (0xE0124C28 & 0xFFFF)($at) .LE012436C: /* 412A9C E012436C 00E61021 */ addu $v0, $a3, $a2 /* 412AA0 E0124370 00461021 */ addu $v0, $v0, $a2 /* 412AA4 E0124374 8C650010 */ lw $a1, 0x10($v1) /* 412AA8 E0124378 30420007 */ andi $v0, $v0, 0x7 /* 412AAC E012437C 04A10002 */ bgez $a1, .LE0124388 /* 412AB0 E0124380 AC62001C */ sw $v0, 0x1C($v1) /* 412AB4 E0124384 25080001 */ addiu $t0, $t0, 0x1 .LE0124388: /* 412AB8 E0124388 24A2FFFF */ addiu $v0, $a1, -0x1 /* 412ABC E012438C AC620010 */ sw $v0, 0x10($v1) /* 412AC0 E0124390 2C42001F */ sltiu $v0, $v0, 0x1F /* 412AC4 E0124394 14400003 */ bnez $v0, .LE01243A4 /* 412AC8 E0124398 00000000 */ nop /* 412ACC E012439C 08049113 */ j .LE012444C /* 412AD0 E01243A0 AC6A001C */ sw $t2, 0x1C($v1) .LE01243A4: /* 412AD4 E01243A4 8C650014 */ lw $a1, 0x14($v1) /* 412AD8 E01243A8 24A20001 */ addiu $v0, $a1, 0x1 /* 412ADC E01243AC 0040382D */ daddu $a3, $v0, $zero /* 412AE0 E01243B0 28A20019 */ slti $v0, $a1, 0x19 /* 412AE4 E01243B4 1040000D */ beqz $v0, .LE01243EC /* 412AE8 E01243B8 AC670014 */ sw $a3, 0x14($v1) /* 412AEC E01243BC 00A91021 */ addu $v0, $a1, $t1 /* 412AF0 E01243C0 90420000 */ lbu $v0, 0x0($v0) /* 412AF4 E01243C4 44820000 */ mtc1 $v0, $f0 /* 412AF8 E01243C8 00000000 */ nop /* 412AFC E01243CC 46800020 */ cvt.s.w $f0, $f0 /* 412B00 E01243D0 46000021 */ cvt.d.s $f0, $f0 /* 412B04 E01243D4 462E0002 */ mul.d $f0, $f0, $f14 /* 412B08 E01243D8 00000000 */ nop /* 412B0C E01243DC 462C0002 */ mul.d $f0, $f0, $f12 /* 412B10 E01243E0 00000000 */ nop /* 412B14 E01243E4 08049102 */ j .LE0124408 /* 412B18 E01243E8 46200020 */ cvt.s.d $f0, $f0 .LE01243EC: /* 412B1C E01243EC C4600018 */ lwc1 $f0, 0x18($v1) /* 412B20 E01243F0 46000021 */ cvt.d.s $f0, $f0 /* 412B24 E01243F4 46205081 */ sub.d $f2, $f10, $f0 /* 412B28 E01243F8 462A1082 */ mul.d $f2, $f2, $f10 /* 412B2C E01243FC 00000000 */ nop /* 412B30 E0124400 46220000 */ add.d $f0, $f0, $f2 /* 412B34 E0124404 46200020 */ cvt.s.d $f0, $f0 .LE0124408: /* 412B38 E0124408 E4600018 */ swc1 $f0, 0x18($v1) /* 412B3C E012440C C468FFF8 */ lwc1 $f8, -0x8($v1) /* 412B40 E0124410 C4600004 */ lwc1 $f0, 0x4($v1) /* 412B44 E0124414 46004200 */ add.s $f8, $f8, $f0 /* 412B48 E0124418 C4600008 */ lwc1 $f0, 0x8($v1) /* 412B4C E012441C C466FFFC */ lwc1 $f6, -0x4($v1) /* 412B50 E0124420 46000106 */ mov.s $f4, $f0 /* 412B54 E0124424 46003180 */ add.s $f6, $f6, $f0 /* 412B58 E0124428 C460000C */ lwc1 $f0, 0xC($v1) /* 412B5C E012442C C4620004 */ lwc1 $f2, 0x4($v1) /* 412B60 E0124430 46002100 */ add.s $f4, $f4, $f0 /* 412B64 E0124434 C4600000 */ lwc1 $f0, 0x0($v1) /* 412B68 E0124438 E468FFF8 */ swc1 $f8, -0x8($v1) /* 412B6C E012443C 46020000 */ add.s $f0, $f0, $f2 /* 412B70 E0124440 E466FFFC */ swc1 $f6, -0x4($v1) /* 412B74 E0124444 E4640008 */ swc1 $f4, 0x8($v1) /* 412B78 E0124448 E4600000 */ swc1 $f0, 0x0($v1) .LE012444C: /* 412B7C E012444C 24C60001 */ addiu $a2, $a2, 0x1 /* 412B80 E0124450 8C820008 */ lw $v0, 0x8($a0) /* 412B84 E0124454 2442FFFF */ addiu $v0, $v0, -0x1 /* 412B88 E0124458 00C2102A */ slt $v0, $a2, $v0 /* 412B8C E012445C 1440FFC3 */ bnez $v0, .LE012436C /* 412B90 E0124460 2463002C */ addiu $v1, $v1, 0x2C /* 412B94 E0124464 8C820008 */ lw $v0, 0x8($a0) /* 412B98 E0124468 2442FFFF */ addiu $v0, $v0, -0x1 /* 412B9C E012446C 0102102A */ slt $v0, $t0, $v0 /* 412BA0 E0124470 14400003 */ bnez $v0, .LE0124480 /* 412BA4 E0124474 00000000 */ nop .LE0124478: /* 412BA8 E0124478 0C080128 */ jal shim_remove_effect /* 412BAC E012447C 00000000 */ nop .LE0124480: /* 412BB0 E0124480 8FBF0010 */ lw $ra, 0x10($sp) /* 412BB4 E0124484 03E00008 */ jr $ra /* 412BB8 E0124488 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void pink_sparkles_update(EffectInstance* effect) { PinkSparklesFXData* part = effect->data.pinkSparkles; s32 unk_20; s32 count = 0; s32 i; part->unk_1C--; part->unk_20++; unk_20 = part->unk_20; part++; for (i = 0; i < effect->numParts - 1; i++, part++) { part->unk_28 = (unk_20 + i + i) & 7; if (part->unk_1C < 0) { count += 1; } part->unk_1C--; if (part->unk_1C < 0 || part->unk_1C >= 31) { part->unk_28 = -1; } else { part->unk_20++; unk_20 = part->unk_20; if (unk_20 - 1 < 25) { part->unk_24 = (f32) D_E0124BE4[unk_20 - 1] * 0.01 * 0.4; } else { part->unk_24 += (0.1 - part->unk_24) * 0.1; } part->unk_04 += part->unk_10; part->unk_08 += part->unk_14; part->unk_14 += part->unk_18; part->unk_0C += part->unk_10; } } if (count >= effect->numParts - 1) { shim_remove_effect(effect); } }
### RAW ASSEMBLY INSTRUCTIONS: glabel spr_free_sprite /* 1016D8 802DE5E8 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1016DC 802DE5EC AFB20018 */ sw $s2, 0x18($sp) /* 1016E0 802DE5F0 0080902D */ daddu $s2, $a0, $zero /* 1016E4 802DE5F4 3C03802E */ lui $v1, %hi(SpriteInstances) /* 1016E8 802DE5F8 2463FA48 */ addiu $v1, $v1, %lo(SpriteInstances) /* 1016EC 802DE5FC 00121080 */ sll $v0, $s2, 2 /* 1016F0 802DE600 00521021 */ addu $v0, $v0, $s2 /* 1016F4 802DE604 00021080 */ sll $v0, $v0, 2 /* 1016F8 802DE608 00432821 */ addu $a1, $v0, $v1 /* 1016FC 802DE60C AFBF0024 */ sw $ra, 0x24($sp) /* 101700 802DE610 AFB40020 */ sw $s4, 0x20($sp) /* 101704 802DE614 AFB3001C */ sw $s3, 0x1C($sp) /* 101708 802DE618 AFB10014 */ sw $s1, 0x14($sp) /* 10170C 802DE61C AFB00010 */ sw $s0, 0x10($sp) /* 101710 802DE620 8CB10000 */ lw $s1, 0x0($a1) /* 101714 802DE624 12200003 */ beqz $s1, .L802DE634 /* 101718 802DE628 2A2200EA */ slti $v0, $s1, 0xEA /* 10171C 802DE62C 14400003 */ bnez $v0, .L802DE63C /* 101720 802DE630 00000000 */ nop .L802DE634: /* 101724 802DE634 080B79CA */ j .L802DE728 /* 101728 802DE638 0240102D */ daddu $v0, $s2, $zero .L802DE63C: /* 10172C 802DE63C 3C03802E */ lui $v1, %hi(NpcSpriteInstanceCount) /* 101730 802DE640 2463F958 */ addiu $v1, $v1, %lo(NpcSpriteInstanceCount) /* 101734 802DE644 02231821 */ addu $v1, $s1, $v1 /* 101738 802DE648 90620000 */ lbu $v0, 0x0($v1) /* 10173C 802DE64C 2442FFFF */ addiu $v0, $v0, -0x1 /* 101740 802DE650 A0620000 */ sb $v0, 0x0($v1) /* 101744 802DE654 8CB00004 */ lw $s0, 0x4($a1) /* 101748 802DE658 2403FFFF */ addiu $v1, $zero, -0x1 /* 10174C 802DE65C 8E020000 */ lw $v0, 0x0($s0) /* 101750 802DE660 8CB40008 */ lw $s4, 0x8($a1) /* 101754 802DE664 10430009 */ beq $v0, $v1, .L802DE68C /* 101758 802DE668 00121080 */ sll $v0, $s2, 2 /* 10175C 802DE66C 0060982D */ daddu $s3, $v1, $zero .L802DE670: /* 101760 802DE670 8E020000 */ lw $v0, 0x0($s0) /* 101764 802DE674 9044004F */ lbu $a0, 0x4F($v0) /* 101768 802DE678 0C04EA15 */ jal imgfx_release_instance /* 10176C 802DE67C 26100004 */ addiu $s0, $s0, 0x4 /* 101770 802DE680 8E020000 */ lw $v0, 0x0($s0) /* 101774 802DE684 1453FFFA */ bne $v0, $s3, .L802DE670 /* 101778 802DE688 00121080 */ sll $v0, $s2, 2 .L802DE68C: /* 10177C 802DE68C 00521021 */ addu $v0, $v0, $s2 /* 101780 802DE690 00021080 */ sll $v0, $v0, 2 /* 101784 802DE694 3C03802E */ lui $v1, %hi(NpcSpriteInstanceCount) /* 101788 802DE698 00711821 */ addu $v1, $v1, $s1 /* 10178C 802DE69C 9063F958 */ lbu $v1, %lo(NpcSpriteInstanceCount)($v1) /* 101790 802DE6A0 3C10802E */ lui $s0, %hi(D_802DFA4C) /* 101794 802DE6A4 02028021 */ addu $s0, $s0, $v0 /* 101798 802DE6A8 8E10FA4C */ lw $s0, %lo(D_802DFA4C)($s0) /* 10179C 802DE6AC 14600008 */ bnez $v1, .L802DE6D0 /* 1017A0 802DE6B0 00111080 */ sll $v0, $s1, 2 /* 1017A4 802DE6B4 3C01802E */ lui $at, %hi(NpcSpriteData) /* 1017A8 802DE6B8 00220821 */ addu $at, $at, $v0 /* 1017AC 802DE6BC AC20F5B0 */ sw $zero, %lo(NpcSpriteData)($at) /* 1017B0 802DE6C0 3C048035 */ lui $a0, %hi(heap_spriteHead) /* 1017B4 802DE6C4 2484F800 */ addiu $a0, $a0, %lo(heap_spriteHead) /* 1017B8 802DE6C8 0C00A487 */ jal _heap_free /* 1017BC 802DE6CC 0280282D */ daddu $a1, $s4, $zero .L802DE6D0: /* 1017C0 802DE6D0 3C02802E */ lui $v0, %hi(spr_allocateBtlComponentsOnWorldHeap) /* 1017C4 802DE6D4 8C42F524 */ lw $v0, %lo(spr_allocateBtlComponentsOnWorldHeap)($v0) /* 1017C8 802DE6D8 3C048035 */ lui $a0, %hi(heap_spriteHead) /* 1017CC 802DE6DC 2484F800 */ addiu $a0, $a0, %lo(heap_spriteHead) /* 1017D0 802DE6E0 10400003 */ beqz $v0, .L802DE6F0 /* 1017D4 802DE6E4 00000000 */ nop /* 1017D8 802DE6E8 3C048030 */ lui $a0, %hi(heap_generalHead) /* 1017DC 802DE6EC 2484B800 */ addiu $a0, $a0, %lo(heap_generalHead) .L802DE6F0: /* 1017E0 802DE6F0 0C00A487 */ jal _heap_free /* 1017E4 802DE6F4 0200282D */ daddu $a1, $s0, $zero /* 1017E8 802DE6F8 0000102D */ daddu $v0, $zero, $zero /* 1017EC 802DE6FC 3C03802E */ lui $v1, %hi(SpriteInstances) /* 1017F0 802DE700 2463FA48 */ addiu $v1, $v1, %lo(SpriteInstances) /* 1017F4 802DE704 00122080 */ sll $a0, $s2, 2 /* 1017F8 802DE708 00922021 */ addu $a0, $a0, $s2 /* 1017FC 802DE70C 00042080 */ sll $a0, $a0, 2 /* 101800 802DE710 00832021 */ addu $a0, $a0, $v1 /* 101804 802DE714 2403FFFF */ addiu $v1, $zero, -0x1 /* 101808 802DE718 AC800000 */ sw $zero, 0x0($a0) /* 10180C 802DE71C AC800004 */ sw $zero, 0x4($a0) /* 101810 802DE720 AC800008 */ sw $zero, 0x8($a0) /* 101814 802DE724 AC83000C */ sw $v1, 0xC($a0) .L802DE728: /* 101818 802DE728 8FBF0024 */ lw $ra, 0x24($sp) /* 10181C 802DE72C 8FB40020 */ lw $s4, 0x20($sp) /* 101820 802DE730 8FB3001C */ lw $s3, 0x1C($sp) /* 101824 802DE734 8FB20018 */ lw $s2, 0x18($sp) /* 101828 802DE738 8FB10014 */ lw $s1, 0x14($sp) /* 10182C 802DE73C 8FB00010 */ lw $s0, 0x10($sp) /* 101830 802DE740 03E00008 */ jr $ra /* 101834 802DE744 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: s32 spr_free_sprite(s32 spriteInstanceID) { SpriteInstance* sprite = &SpriteInstances[spriteInstanceID]; SpriteAnimData* spriteData; SpriteComponent** compList; s32 spriteIndex = sprite->spriteIndex; if (spriteIndex == 0 || spriteIndex >= ARRAY_COUNT(NpcSpriteData)) { return spriteInstanceID; } NpcSpriteInstanceCount[spriteIndex]--; spriteData = sprite->spriteData; compList = sprite->componentList; while (*compList != PTR_LIST_END) { SpriteComponent* comp = *compList; imgfx_release_instance(comp->imgfxIdx & 0xFF); compList++; } compList = SpriteInstances[spriteInstanceID].componentList; if (NpcSpriteInstanceCount[spriteIndex] == 0) { NpcSpriteData[spriteIndex] = NULL; _heap_free(&heap_spriteHead, spriteData); } if (spr_allocateBtlComponentsOnWorldHeap) { _heap_free(&heap_generalHead, compList); } else { _heap_free(&heap_spriteHead, compList); } SpriteInstances[spriteInstanceID].spriteIndex = 0; SpriteInstances[spriteInstanceID].componentList = NULL; SpriteInstances[spriteInstanceID].spriteData = NULL; SpriteInstances[spriteInstanceID].currentAnimID = -1; return 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel shattering_stones_update /* 3400BC E002C23C 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 3400C0 E002C240 AFBF0010 */ sw $ra, 0x10($sp) /* 3400C4 E002C244 8C85000C */ lw $a1, 0xC($a0) /* 3400C8 E002C248 8CA20024 */ lw $v0, 0x24($a1) /* 3400CC E002C24C 1440001A */ bnez $v0, .LE002C2B8 /* 3400D0 E002C250 00000000 */ nop /* 3400D4 E002C254 C4A00014 */ lwc1 $f0, 0x14($a1) /* 3400D8 E002C258 3C01E003 */ lui $at, (0xE0030000 >> 16) /* 3400DC E002C25C D422C9D8 */ ldc1 $f2, -0x3628($at) /* 3400E0 E002C260 C4A6002C */ lwc1 $f6, 0x2C($a1) /* 3400E4 E002C264 46000021 */ cvt.d.s $f0, $f0 /* 3400E8 E002C268 46220000 */ add.d $f0, $f0, $f2 /* 3400EC E002C26C C4A40038 */ lwc1 $f4, 0x38($a1) /* 3400F0 E002C270 C4A8000C */ lwc1 $f8, 0xC($a1) /* 3400F4 E002C274 46043180 */ add.s $f6, $f6, $f4 /* 3400F8 E002C278 C4A20004 */ lwc1 $f2, 0x4($a1) /* 3400FC E002C27C 46200020 */ cvt.s.d $f0, $f0 /* 340100 E002C280 46001080 */ add.s $f2, $f2, $f0 /* 340104 E002C284 C4A4003C */ lwc1 $f4, 0x3C($a1) /* 340108 E002C288 E4A20004 */ swc1 $f2, 0x4($a1) /* 34010C E002C28C C4A20030 */ lwc1 $f2, 0x30($a1) /* 340110 E002C290 C4AA0004 */ lwc1 $f10, 0x4($a1) /* 340114 E002C294 46041080 */ add.s $f2, $f2, $f4 /* 340118 E002C298 E4A00014 */ swc1 $f0, 0x14($a1) /* 34011C E002C29C E4A6002C */ swc1 $f6, 0x2C($a1) /* 340120 E002C2A0 4608503E */ c.le.s $f10, $f8 /* 340124 E002C2A4 00000000 */ nop /* 340128 E002C2A8 45000003 */ bc1f .LE002C2B8 /* 34012C E002C2AC E4A20030 */ swc1 $f2, 0x30($a1) /* 340130 E002C2B0 24020001 */ addiu $v0, $zero, 0x1 /* 340134 E002C2B4 ACA20024 */ sw $v0, 0x24($a1) .LE002C2B8: /* 340138 E002C2B8 8CA30024 */ lw $v1, 0x24($a1) /* 34013C E002C2BC 24020001 */ addiu $v0, $zero, 0x1 /* 340140 E002C2C0 14620040 */ bne $v1, $v0, .LE002C3C4 /* 340144 E002C2C4 00000000 */ nop /* 340148 E002C2C8 8CA20020 */ lw $v0, 0x20($a1) /* 34014C E002C2CC 2442FFFF */ addiu $v0, $v0, -0x1 /* 340150 E002C2D0 04410005 */ bgez $v0, .LE002C2E8 /* 340154 E002C2D4 ACA20020 */ sw $v0, 0x20($a1) /* 340158 E002C2D8 0C080128 */ jal shim_remove_effect /* 34015C E002C2DC 00000000 */ nop /* 340160 E002C2E0 0800B0F1 */ j .LE002C3C4 /* 340164 E002C2E4 00000000 */ nop .LE002C2E8: /* 340168 E002C2E8 2842000A */ slti $v0, $v0, 0xA /* 34016C E002C2EC 10400009 */ beqz $v0, .LE002C314 /* 340170 E002C2F0 00000000 */ nop /* 340174 E002C2F4 3C01E003 */ lui $at, (0xE0030000 >> 16) /* 340178 E002C2F8 D422C9E0 */ ldc1 $f2, -0x3620($at) /* 34017C E002C2FC C4A00028 */ lwc1 $f0, 0x28($a1) /* 340180 E002C300 46800021 */ cvt.d.w $f0, $f0 /* 340184 E002C304 46220002 */ mul.d $f0, $f0, $f2 /* 340188 E002C308 00000000 */ nop /* 34018C E002C30C 4620038D */ trunc.w.d $f14, $f0 /* 340190 E002C310 E4AE0028 */ swc1 $f14, 0x28($a1) .LE002C314: /* 340194 E002C314 8C820008 */ lw $v0, 0x8($a0) /* 340198 E002C318 24060001 */ addiu $a2, $zero, 0x1 /* 34019C E002C31C 00C2102A */ slt $v0, $a2, $v0 /* 3401A0 E002C320 10400028 */ beqz $v0, .LE002C3C4 /* 3401A4 E002C324 24A50040 */ addiu $a1, $a1, 0x40 /* 3401A8 E002C328 24A30034 */ addiu $v1, $a1, 0x34 /* 3401AC E002C32C 3C01E003 */ lui $at, (0xE0030000 >> 16) /* 3401B0 E002C330 D428C9E8 */ ldc1 $f8, -0x3618($at) /* 3401B4 E002C334 3C01E003 */ lui $at, (0xE0030000 >> 16) /* 3401B8 E002C338 D426C9F0 */ ldc1 $f6, -0x3610($at) /* 3401BC E002C33C 3C014120 */ lui $at, (0x41200000 >> 16) /* 3401C0 E002C340 44816000 */ mtc1 $at, $f12 /* 3401C4 E002C344 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 3401C8 E002C348 44815000 */ mtc1 $at, $f10 .LE002C34C: /* 3401CC E002C34C C462FFDC */ lwc1 $f2, -0x24($v1) /* 3401D0 E002C350 460010A1 */ cvt.d.s $f2, $f2 /* 3401D4 E002C354 46261082 */ mul.d $f2, $f2, $f6 /* 3401D8 E002C358 00000000 */ nop /* 3401DC E002C35C C460FFE0 */ lwc1 $f0, -0x20($v1) /* 3401E0 E002C360 46000021 */ cvt.d.s $f0, $f0 /* 3401E4 E002C364 46280000 */ add.d $f0, $f0, $f8 /* 3401E8 E002C368 46200020 */ cvt.s.d $f0, $f0 /* 3401EC E002C36C E460FFE0 */ swc1 $f0, -0x20($v1) /* 3401F0 E002C370 462010A0 */ cvt.s.d $f2, $f2 /* 3401F4 E002C374 E462FFDC */ swc1 $f2, -0x24($v1) /* 3401F8 E002C378 C4A00000 */ lwc1 $f0, 0x0($a1) /* 3401FC E002C37C 46020000 */ add.s $f0, $f0, $f2 /* 340200 E002C380 E4A00000 */ swc1 $f0, 0x0($a1) /* 340204 E002C384 C464FFD0 */ lwc1 $f4, -0x30($v1) /* 340208 E002C388 C460FFE0 */ lwc1 $f0, -0x20($v1) /* 34020C E002C38C 46002100 */ add.s $f4, $f4, $f0 /* 340210 E002C390 C462FFF8 */ lwc1 $f2, -0x8($v1) /* 340214 E002C394 24C60001 */ addiu $a2, $a2, 0x1 /* 340218 E002C398 460C1080 */ add.s $f2, $f2, $f12 /* 34021C E002C39C C4600000 */ lwc1 $f0, 0x0($v1) /* 340220 E002C3A0 24A50040 */ addiu $a1, $a1, 0x40 /* 340224 E002C3A4 460A0000 */ add.s $f0, $f0, $f10 /* 340228 E002C3A8 E464FFD0 */ swc1 $f4, -0x30($v1) /* 34022C E002C3AC E462FFF8 */ swc1 $f2, -0x8($v1) /* 340230 E002C3B0 E4600000 */ swc1 $f0, 0x0($v1) /* 340234 E002C3B4 8C820008 */ lw $v0, 0x8($a0) /* 340238 E002C3B8 00C2102A */ slt $v0, $a2, $v0 /* 34023C E002C3BC 1440FFE3 */ bnez $v0, .LE002C34C /* 340240 E002C3C0 24630040 */ addiu $v1, $v1, 0x40 .LE002C3C4: /* 340244 E002C3C4 8FBF0010 */ lw $ra, 0x10($sp) /* 340248 E002C3C8 03E00008 */ jr $ra /* 34024C E002C3CC 27BD0018 */ addiu $sp, $sp, 0x18 ### DECOMPILED C INSTRUCTIONS: void shattering_stones_update(EffectInstance* effect) { ShatteringStonesFXData* part = effect->data.shatteringStones; s32 i; if (part->unk_24 == 0) { part->unk_14 += -0.1; part->unk_04 += part->unk_14; part->unk_2C += part->unk_38; part->unk_30 += part->unk_3C; if (part->unk_04 <= part->unk_0C) { part->unk_24 = 1; } } if (part->unk_24 == 1) { part->unk_20--; if (part->unk_20 < 0) { shim_remove_effect(effect); return; } if (part->unk_20 < 10) { part->unk_28 *= 0.8; } part++; for (i = 1; i < effect->numParts; i++, part++) { part->unk_14 += -0.2; part->unk_10 *= 0.9; part->unk_00 += part->unk_10; part->unk_04 += part->unk_14; part->unk_2C += 10.0f; part->unk_34 += 20.0f; } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel crash_screen_draw_glyph /* 7454 8002C054 3C026666 */ lui $v0, (0x66666667 >> 16) /* 7458 8002C058 34426667 */ ori $v0, $v0, (0x66666667 & 0xFFFF) /* 745C 8002C05C 00C20018 */ mult $a2, $v0 /* 7460 8002C060 0080382D */ daddu $a3, $a0, $zero /* 7464 8002C064 000617C3 */ sra $v0, $a2, 31 /* 7468 8002C068 3C048007 */ lui $a0, %hi(gCrashScreenFont) /* 746C 8002C06C 24847290 */ addiu $a0, $a0, %lo(gCrashScreenFont) /* 7470 8002C070 00007010 */ mfhi $t6 /* 7474 8002C074 000E1843 */ sra $v1, $t6, 1 /* 7478 8002C078 00621823 */ subu $v1, $v1, $v0 /* 747C 8002C07C 000310C0 */ sll $v0, $v1, 3 /* 7480 8002C080 00431023 */ subu $v0, $v0, $v1 /* 7484 8002C084 00021080 */ sll $v0, $v0, 2 /* 7488 8002C088 00445021 */ addu $t2, $v0, $a0 /* 748C 8002C08C 00031080 */ sll $v0, $v1, 2 /* 7490 8002C090 00431021 */ addu $v0, $v0, $v1 /* 7494 8002C094 00C23023 */ subu $a2, $a2, $v0 /* 7498 8002C098 00061040 */ sll $v0, $a2, 1 /* 749C 8002C09C 00461021 */ addu $v0, $v0, $a2 /* 74A0 8002C0A0 00026040 */ sll $t4, $v0, 1 /* 74A4 8002C0A4 3C04800A */ lui $a0, %hi(gCrashScreen) /* 74A8 8002C0A8 2484BB30 */ addiu $a0, $a0, %lo(gCrashScreen) /* 74AC 8002C0AC 948309D0 */ lhu $v1, 0x9D0($a0) /* 74B0 8002C0B0 24020140 */ addiu $v0, $zero, 0x140 /* 74B4 8002C0B4 14620024 */ bne $v1, $v0, .L8002C148 /* 74B8 8002C0B8 24020280 */ addiu $v0, $zero, 0x280 /* 74BC 8002C0BC 0060102D */ daddu $v0, $v1, $zero /* 74C0 8002C0C0 00450018 */ mult $v0, $a1 /* 74C4 8002C0C4 0000482D */ daddu $t1, $zero, $zero /* 74C8 8002C0C8 3C0D8000 */ lui $t5, (0x80000000 >> 16) /* 74CC 8002C0CC 0080582D */ daddu $t3, $a0, $zero /* 74D0 8002C0D0 8D6209CC */ lw $v0, 0x9CC($t3) /* 74D4 8002C0D4 00007012 */ mflo $t6 /* 74D8 8002C0D8 000E1840 */ sll $v1, $t6, 1 /* 74DC 8002C0DC 00431021 */ addu $v0, $v0, $v1 /* 74E0 8002C0E0 00071840 */ sll $v1, $a3, 1 /* 74E4 8002C0E4 00432821 */ addu $a1, $v0, $v1 /* 74E8 8002C0E8 018D2006 */ srlv $a0, $t5, $t4 .L8002C0EC: /* 74EC 8002C0EC 8D480000 */ lw $t0, 0x0($t2) /* 74F0 8002C0F0 254A0004 */ addiu $t2, $t2, 0x4 /* 74F4 8002C0F4 24060005 */ addiu $a2, $zero, 0x5 .L8002C0F8: /* 74F8 8002C0F8 00A0382D */ daddu $a3, $a1, $zero /* 74FC 8002C0FC 24A50002 */ addiu $a1, $a1, 0x2 /* 7500 8002C100 00881024 */ and $v0, $a0, $t0 /* 7504 8002C104 10400002 */ beqz $v0, .L8002C110 /* 7508 8002C108 24030001 */ addiu $v1, $zero, 0x1 /* 750C 8002C10C 3403FFFF */ ori $v1, $zero, 0xFFFF .L8002C110: /* 7510 8002C110 A4E30000 */ sh $v1, 0x0($a3) /* 7514 8002C114 24C6FFFF */ addiu $a2, $a2, -0x1 /* 7518 8002C118 04C1FFF7 */ bgez $a2, .L8002C0F8 /* 751C 8002C11C 00042042 */ srl $a0, $a0, 1 /* 7520 8002C120 956209D0 */ lhu $v0, 0x9D0($t3) /* 7524 8002C124 25290001 */ addiu $t1, $t1, 0x1 /* 7528 8002C128 00021040 */ sll $v0, $v0, 1 /* 752C 8002C12C 2442FFF4 */ addiu $v0, $v0, -0xC /* 7530 8002C130 00A22821 */ addu $a1, $a1, $v0 /* 7534 8002C134 29220007 */ slti $v0, $t1, 0x7 /* 7538 8002C138 1440FFEC */ bnez $v0, .L8002C0EC /* 753C 8002C13C 018D2006 */ srlv $a0, $t5, $t4 .L8002C140: /* 7540 8002C140 03E00008 */ jr $ra /* 7544 8002C144 00000000 */ nop .L8002C148: /* 7548 8002C148 1462FFFD */ bne $v1, $v0, .L8002C140 /* 754C 8002C14C 0000482D */ daddu $t1, $zero, $zero /* 7550 8002C150 3C0B8000 */ lui $t3, (0x80000000 >> 16) /* 7554 8002C154 00051080 */ sll $v0, $a1, 2 /* 7558 8002C158 00451021 */ addu $v0, $v0, $a1 /* 755C 8002C15C 8C8309CC */ lw $v1, 0x9CC($a0) /* 7560 8002C160 00021240 */ sll $v0, $v0, 9 /* 7564 8002C164 00621821 */ addu $v1, $v1, $v0 /* 7568 8002C168 00071080 */ sll $v0, $a3, 2 /* 756C 8002C16C 00621821 */ addu $v1, $v1, $v0 .L8002C170: /* 7570 8002C170 018B3806 */ srlv $a3, $t3, $t4 /* 7574 8002C174 8D480000 */ lw $t0, 0x0($t2) /* 7578 8002C178 254A0004 */ addiu $t2, $t2, 0x4 /* 757C 8002C17C 0000302D */ daddu $a2, $zero, $zero /* 7580 8002C180 24650502 */ addiu $a1, $v1, 0x502 .L8002C184: /* 7584 8002C184 00E81024 */ and $v0, $a3, $t0 /* 7588 8002C188 10400002 */ beqz $v0, .L8002C194 /* 758C 8002C18C 24040001 */ addiu $a0, $zero, 0x1 /* 7590 8002C190 3404FFFF */ ori $a0, $zero, 0xFFFF .L8002C194: /* 7594 8002C194 A4640000 */ sh $a0, 0x0($v1) /* 7598 8002C198 A4A4FB00 */ sh $a0, -0x500($a1) /* 759C 8002C19C A4A4FFFE */ sh $a0, -0x2($a1) /* 75A0 8002C1A0 A4A40000 */ sh $a0, 0x0($a1) /* 75A4 8002C1A4 24A50004 */ addiu $a1, $a1, 0x4 /* 75A8 8002C1A8 24630004 */ addiu $v1, $v1, 0x4 /* 75AC 8002C1AC 24C60001 */ addiu $a2, $a2, 0x1 /* 75B0 8002C1B0 28C20006 */ slti $v0, $a2, 0x6 /* 75B4 8002C1B4 1440FFF3 */ bnez $v0, .L8002C184 /* 75B8 8002C1B8 00073842 */ srl $a3, $a3, 1 /* 75BC 8002C1BC 25290001 */ addiu $t1, $t1, 0x1 /* 75C0 8002C1C0 29220007 */ slti $v0, $t1, 0x7 /* 75C4 8002C1C4 1440FFEA */ bnez $v0, .L8002C170 /* 75C8 8002C1C8 246309E8 */ addiu $v1, $v1, 0x9E8 /* 75CC 8002C1CC 03E00008 */ jr $ra /* 75D0 8002C1D0 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void crash_screen_draw_glyph(s32 x, s32 y, s32 glyph) { s32 shift = ((glyph % 5) * 6); u16 width = gCrashScreen.width; const u32* data = &gCrashScreenFont[glyph / 5 * 7]; s32 i; s32 j; if (width == SCREEN_WIDTH) { u16* ptr = gCrashScreen.frameBuf + (gCrashScreen.width) * y + x; for (i = 0; i < 7; i++) { u32 bit = 0x80000000U >> shift; u32 rowMask = *data++; for (j = 0; j < 6; j++) { *ptr++ = (bit & rowMask) ? 0xFFFF : 1; bit >>= 1; } ptr += gCrashScreen.width - 6; } } else if (width == (SCREEN_WIDTH * 2)) { u16* ptr = gCrashScreen.frameBuf + (y * 0x500) + (x * 2); for (i = 0; i < 7; i++) { u32 bit = 0x80000000U >> shift; u32 rowMask = *data++; for (j = 0; j < 6; j++) { u16 temp = (bit & rowMask) ? 0xFFFF : 1; ptr[0] = temp; ptr[1] = temp; ptr[(SCREEN_WIDTH * 2)] = temp; ptr[(SCREEN_WIDTH * 2) + 1] = temp; ptr += 2; bit >>= 1; } ptr += (0x9E8 / 2); } } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_802A2684_7AA024 /* 417414 802A2684 3C03802B */ lui $v1, %hi(D_802AD4A8) /* 417418 802A2688 2463D4A8 */ addiu $v1, $v1, %lo(D_802AD4A8) /* 41741C 802A268C 3C05802B */ lui $a1, %hi(BattleMenu_Moves_OptionCount) /* 417420 802A2690 24A5D4A4 */ addiu $a1, $a1, %lo(BattleMenu_Moves_OptionCount) /* 417424 802A2694 8C620000 */ lw $v0, 0x0($v1) /* 417428 802A2698 8CA70000 */ lw $a3, 0x0($a1) /* 41742C 802A269C 0047102A */ slt $v0, $v0, $a3 /* 417430 802A26A0 14400002 */ bnez $v0, .L802A26AC_7AA04C /* 417434 802A26A4 24E2FFFF */ addiu $v0, $a3, -0x1 D_802A26A8_7AA048: /* 417438 802A26A8 AC620000 */ sw $v0, 0x0($v1) .L802A26AC_7AA04C: /* 41743C 802A26AC 3C01802B */ lui $at, %hi(battle_menu_moveState) D_802A26B0_7AA050: /* 417440 802A26B0 A020D108 */ sb $zero, %lo(battle_menu_moveState)($at) /* 417444 802A26B4 90640003 */ lbu $a0, 0x3($v1) /* 417448 802A26B8 3C03802B */ lui $v1, %hi(battle_menu_moveScrollLine) D_802A26BC_7AA05C: /* 41744C 802A26BC 2463D10C */ addiu $v1, $v1, %lo(battle_menu_moveScrollLine) /* 417450 802A26C0 A0600000 */ sb $zero, 0x0($v1) /* 417454 802A26C4 3C01802B */ lui $at, %hi(battle_menu_moveCursorPos) /* 417458 802A26C8 A024D109 */ sb $a0, %lo(battle_menu_moveCursorPos)($at) /* 41745C 802A26CC 3C01802B */ lui $at, %hi(D_802AD10A) D_802A26D0_7AA070: /* 417460 802A26D0 A024D10A */ sb $a0, %lo(D_802AD10A)($at) /* 417464 802A26D4 90A60003 */ lbu $a2, 0x3($a1) /* 417468 802A26D8 3C09802B */ lui $t1, %hi(D_802AD10E) /* 41746C 802A26DC 2529D10E */ addiu $t1, $t1, %lo(D_802AD10E) D_802A26E0_7AA080: /* 417470 802A26E0 00061600 */ sll $v0, $a2, 24 /* 417474 802A26E4 00021603 */ sra $v0, $v0, 24 /* 417478 802A26E8 28420007 */ slti $v0, $v0, 0x7 /* 41747C 802A26EC 14400003 */ bnez $v0, .L802A26FC_7AA09C /* 417480 802A26F0 A1260000 */ sb $a2, 0x0($t1) /* 417484 802A26F4 24020006 */ addiu $v0, $zero, 0x6 /* 417488 802A26F8 A1220000 */ sb $v0, 0x0($t1) .L802A26FC_7AA09C: /* 41748C 802A26FC 3C08802B */ lui $t0, %hi(D_802AD10D) /* 417490 802A2700 2508D10D */ addiu $t0, $t0, %lo(D_802AD10D) /* 417494 802A2704 24020006 */ addiu $v0, $zero, 0x6 /* 417498 802A2708 A1020000 */ sb $v0, 0x0($t0) /* 41749C 802A270C 28E20006 */ slti $v0, $a3, 0x6 /* 4174A0 802A2710 54400001 */ bnel $v0, $zero, .L802A2718_7AA0B8 /* 4174A4 802A2714 A1060000 */ sb $a2, 0x0($t0) .L802A2718_7AA0B8: /* 4174A8 802A2718 240200FF */ addiu $v0, $zero, 0xFF /* 4174AC 802A271C 3C01802B */ lui $at, %hi(BattleMenu_Moves_TextAlpha) D_802A2720_7AA0C0: /* 4174B0 802A2720 A422D116 */ sh $v0, %lo(BattleMenu_Moves_TextAlpha)($at) /* 4174B4 802A2724 24020001 */ addiu $v0, $zero, 0x1 /* 4174B8 802A2728 3C01802B */ lui $at, %hi(D_802AD10F) /* 4174BC 802A272C A022D10F */ sb $v0, %lo(D_802AD10F)($at) D_802A2730_7AA0D0: /* 4174C0 802A2730 00041600 */ sll $v0, $a0, 24 D_802A2734_7AA0D4: /* 4174C4 802A2734 00022E03 */ sra $a1, $v0, 24 /* 4174C8 802A2738 04A20001 */ bltzl $a1, .L802A2740_7AA0E0 /* 4174CC 802A273C A0640000 */ sb $a0, 0x0($v1) .L802A2740_7AA0E0: /* 4174D0 802A2740 81020000 */ lb $v0, 0x0($t0) /* 4174D4 802A2744 00A2102A */ slt $v0, $a1, $v0 /* 4174D8 802A2748 14400005 */ bnez $v0, .L802A2760_7AA100 /* 4174DC 802A274C 00000000 */ nop /* 4174E0 802A2750 91220000 */ lbu $v0, 0x0($t1) /* 4174E4 802A2754 2442FFFF */ addiu $v0, $v0, -0x1 /* 4174E8 802A2758 00821023 */ subu $v0, $a0, $v0 /* 4174EC 802A275C A0620000 */ sb $v0, 0x0($v1) .L802A2760_7AA100: /* 4174F0 802A2760 90630000 */ lbu $v1, 0x0($v1) /* 4174F4 802A2764 24620006 */ addiu $v0, $v1, 0x6 /* 4174F8 802A2768 A1020000 */ sb $v0, 0x0($t0) /* 4174FC 802A276C 00021600 */ sll $v0, $v0, 24 /* 417500 802A2770 00021603 */ sra $v0, $v0, 24 /* 417504 802A2774 00E2102A */ slt $v0, $a3, $v0 /* 417508 802A2778 54400001 */ bnel $v0, $zero, .L802A2780_7AA120 /* 41750C 802A277C A1060000 */ sb $a2, 0x0($t0) .L802A2780_7AA120: /* 417510 802A2780 00031E00 */ sll $v1, $v1, 24 /* 417514 802A2784 00031E03 */ sra $v1, $v1, 24 /* 417518 802A2788 00032023 */ negu $a0, $v1 /* 41751C 802A278C 00041040 */ sll $v0, $a0, 1 /* 417520 802A2790 00441021 */ addu $v0, $v0, $a0 /* 417524 802A2794 00021080 */ sll $v0, $v0, 2 /* 417528 802A2798 00441021 */ addu $v0, $v0, $a0 /* 41752C 802A279C 00A31823 */ subu $v1, $a1, $v1 /* 417530 802A27A0 3C01802B */ lui $at, %hi(battle_menu_moveScrollOffset) /* 417534 802A27A4 A422D110 */ sh $v0, %lo(battle_menu_moveScrollOffset)($at) D_802A27A8_7AA148: /* 417538 802A27A8 00031040 */ sll $v0, $v1, 1 /* 41753C 802A27AC 00431021 */ addu $v0, $v0, $v1 D_802A27B0_7AA150: /* 417540 802A27B0 00021080 */ sll $v0, $v0, 2 /* 417544 802A27B4 00431021 */ addu $v0, $v0, $v1 /* 417548 802A27B8 3C01802B */ lui $at, %hi(D_802AD112) /* 41754C 802A27BC A422D112 */ sh $v0, %lo(D_802AD112)($at) /* 417550 802A27C0 3C01802B */ lui $at, %hi(battle_menu_moveOptionActive) /* 417554 802A27C4 AC20D600 */ sw $zero, %lo(battle_menu_moveOptionActive)($at) /* 417558 802A27C8 03E00008 */ jr $ra /* 41755C 802A27CC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void func_802A2684(void) { if (D_802AD4A8 >= BattleMenu_Moves_OptionCount) { D_802AD4A8 = BattleMenu_Moves_OptionCount - 1; } battle_menu_moveState = BTL_SUBMENU_MOVES_STATE_UNK_0; battle_menu_moveScrollLine = 0; battle_menu_moveCursorPos = D_802AD4A8; D_802AD10A = D_802AD4A8; D_802AD10E = BattleMenu_Moves_OptionCount; if (D_802AD10E > 6) { D_802AD10E = 6; } D_802AD10D = 6; if (BattleMenu_Moves_OptionCount < 6) { D_802AD10D = BattleMenu_Moves_OptionCount; } BattleMenu_Moves_TextAlpha = 255; D_802AD10F = 1; if (D_802AD10A < 0) { battle_menu_moveScrollLine = D_802AD10A; } if (D_802AD10A >= D_802AD10D) { battle_menu_moveScrollLine = D_802AD10A + 1 - D_802AD10E; } D_802AD10D = battle_menu_moveScrollLine + 6; if (D_802AD10D > BattleMenu_Moves_OptionCount) { D_802AD10D = BattleMenu_Moves_OptionCount; } battle_menu_moveScrollOffset = -battle_menu_moveScrollLine * 13; D_802AD112 = (D_802AD10A - battle_menu_moveScrollLine) * 13; battle_menu_moveOptionActive = 0; }
### RAW ASSEMBLY INSTRUCTIONS: glabel msg_get_print_char_width /* BC384 80125C84 288200F0 */ slti $v0, $a0, 0xF0 /* BC388 80125C88 44871000 */ mtc1 $a3, $f2 /* BC38C 80125C8C 8FA70010 */ lw $a3, 0x10($sp) /* BC390 80125C90 93A30017 */ lbu $v1, 0x17($sp) /* BC394 80125C94 14400004 */ bnez $v0, .L80125CA8 /* BC398 80125C98 2482FF09 */ addiu $v0, $a0, -0xF7 /* BC39C 80125C9C 2C420003 */ sltiu $v0, $v0, 0x3 /* BC3A0 80125CA0 10400036 */ beqz $v0, .L80125D7C /* BC3A4 80125CA4 0000102D */ daddu $v0, $zero, $zero .L80125CA8: /* BC3A8 80125CA8 10E00005 */ beqz $a3, .L80125CC0 /* BC3AC 80125CAC 240200F7 */ addiu $v0, $zero, 0xF7 /* BC3B0 80125CB0 44870000 */ mtc1 $a3, $f0 /* BC3B4 80125CB4 00000000 */ nop /* BC3B8 80125CB8 08049754 */ j .L80125D50 /* BC3BC 80125CBC 46800020 */ cvt.s.w $f0, $f0 .L80125CC0: /* BC3C0 80125CC0 10600015 */ beqz $v1, .L80125D18 /* BC3C4 80125CC4 00051880 */ sll $v1, $a1, 2 /* BC3C8 80125CC8 00061040 */ sll $v0, $a2, 1 /* BC3CC 80125CCC 3C01802F */ lui $at, %hi(gMsgCharsets) /* BC3D0 80125CD0 00230821 */ addu $at, $at, $v1 /* BC3D4 80125CD4 8C23B5A8 */ lw $v1, %lo(gMsgCharsets)($at) /* BC3D8 80125CD8 00461021 */ addu $v0, $v0, $a2 /* BC3DC 80125CDC 8C630008 */ lw $v1, 0x8($v1) /* BC3E0 80125CE0 00021080 */ sll $v0, $v0, 2 /* BC3E4 80125CE4 00431021 */ addu $v0, $v0, $v1 /* BC3E8 80125CE8 8C430004 */ lw $v1, 0x4($v0) /* BC3EC 80125CEC 1060000A */ beqz $v1, .L80125D18 /* BC3F0 80125CF0 240200F7 */ addiu $v0, $zero, 0xF7 /* BC3F4 80125CF4 10820008 */ beq $a0, $v0, .L80125D18 /* BC3F8 80125CF8 240200F8 */ addiu $v0, $zero, 0xF8 /* BC3FC 80125CFC 10820006 */ beq $a0, $v0, .L80125D18 /* BC400 80125D00 240200F9 */ addiu $v0, $zero, 0xF9 /* BC404 80125D04 10820004 */ beq $a0, $v0, .L80125D18 /* BC408 80125D08 00641021 */ addu $v0, $v1, $a0 /* BC40C 80125D0C 90420000 */ lbu $v0, 0x0($v0) /* BC410 80125D10 08049750 */ j .L80125D40 /* BC414 80125D14 00000000 */ nop .L80125D18: /* BC418 80125D18 00051880 */ sll $v1, $a1, 2 /* BC41C 80125D1C 00061040 */ sll $v0, $a2, 1 /* BC420 80125D20 3C01802F */ lui $at, %hi(gMsgCharsets) /* BC424 80125D24 00230821 */ addu $at, $at, $v1 /* BC428 80125D28 8C23B5A8 */ lw $v1, %lo(gMsgCharsets)($at) /* BC42C 80125D2C 00461021 */ addu $v0, $v0, $a2 /* BC430 80125D30 8C630008 */ lw $v1, 0x8($v1) /* BC434 80125D34 00021080 */ sll $v0, $v0, 2 /* BC438 80125D38 00431021 */ addu $v0, $v0, $v1 /* BC43C 80125D3C 90420008 */ lbu $v0, 0x8($v0) .L80125D40: /* BC440 80125D40 44820000 */ mtc1 $v0, $f0 /* BC444 80125D44 00000000 */ nop /* BC448 80125D48 46800020 */ cvt.s.w $f0, $f0 /* BC44C 80125D4C 240200F7 */ addiu $v0, $zero, 0xF7 .L80125D50: /* BC450 80125D50 1482000C */ bne $a0, $v0, .L80125D84 /* BC454 80125D54 240200F8 */ addiu $v0, $zero, 0xF8 /* BC458 80125D58 46020002 */ mul.s $f0, $f0, $f2 /* BC45C 80125D5C 00000000 */ nop /* BC460 80125D60 3C018015 */ lui $at, %hi(D_80150578) /* BC464 80125D64 D4220578 */ ldc1 $f2, %lo(D_80150578)($at) /* BC468 80125D68 46000021 */ cvt.d.s $f0, $f0 .L80125D6C: /* BC46C 80125D6C 46220002 */ mul.d $f0, $f0, $f2 /* BC470 80125D70 00000000 */ nop /* BC474 80125D74 4620010D */ trunc.w.d $f4, $f0 /* BC478 80125D78 44022000 */ mfc1 $v0, $f4 .L80125D7C: /* BC47C 80125D7C 03E00008 */ jr $ra /* BC480 80125D80 00000000 */ nop .L80125D84: /* BC484 80125D84 14820008 */ bne $a0, $v0, .L80125DA8 /* BC488 80125D88 240200F9 */ addiu $v0, $zero, 0xF9 /* BC48C 80125D8C 46020002 */ mul.s $f0, $f0, $f2 /* BC490 80125D90 00000000 */ nop /* BC494 80125D94 46000021 */ cvt.d.s $f0, $f0 /* BC498 80125D98 4620010D */ trunc.w.d $f4, $f0 /* BC49C 80125D9C 44022000 */ mfc1 $v0, $f4 /* BC4A0 80125DA0 03E00008 */ jr $ra /* BC4A4 80125DA4 00000000 */ nop .L80125DA8: /* BC4A8 80125DA8 14820008 */ bne $a0, $v0, .L80125DCC /* BC4AC 80125DAC 288200F0 */ slti $v0, $a0, 0xF0 /* BC4B0 80125DB0 46020002 */ mul.s $f0, $f0, $f2 /* BC4B4 80125DB4 00000000 */ nop /* BC4B8 80125DB8 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* BC4BC 80125DBC 44811800 */ mtc1 $at, $f3 /* BC4C0 80125DC0 44801000 */ mtc1 $zero, $f2 /* BC4C4 80125DC4 0804975B */ j .L80125D6C /* BC4C8 80125DC8 46000021 */ cvt.d.s $f0, $f0 .L80125DCC: /* BC4CC 80125DCC 10400007 */ beqz $v0, .L80125DEC /* BC4D0 80125DD0 00000000 */ nop /* BC4D4 80125DD4 46020002 */ mul.s $f0, $f0, $f2 /* BC4D8 80125DD8 00000000 */ nop /* BC4DC 80125DDC 4600010D */ trunc.w.s $f4, $f0 /* BC4E0 80125DE0 44022000 */ mfc1 $v0, $f4 /* BC4E4 80125DE4 03E00008 */ jr $ra /* BC4E8 80125DE8 00000000 */ nop .L80125DEC: /* BC4EC 80125DEC 03E00008 */ jr $ra /* BC4F0 80125DF0 0000102D */ daddu $v0, $zero, $zero ### DECOMPILED C INSTRUCTIONS: s32 msg_get_print_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u8 flags) { f32 charWidth; if (character >= MSG_CONTROL_CHAR && (character != MSG_CHAR_READ_SPACE && character != MSG_CHAR_READ_FULL_SPACE && character != MSG_CHAR_READ_HALF_SPACE)) { return 0; } #if VERSION_IQUE if (character >= 0x5F && character<=0x8F) { charWidth = 16.0; return charWidth * msgScale; } #endif if (overrideCharWidth != 0) { charWidth = overrideCharWidth; } else if (flags != 0) { u8* charWidthTable = gMsgCharsets[charset]->rasters[variation].charWidthTable; if (charWidthTable != NULL && character != MSG_CHAR_READ_SPACE && character != MSG_CHAR_READ_FULL_SPACE && character != MSG_CHAR_READ_HALF_SPACE) { charWidth = charWidthTable[character]; } else { charWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth; } } else { charWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth; } if (character == MSG_CHAR_READ_SPACE) { return charWidth * msgScale * 0.6; } if (character == MSG_CHAR_READ_FULL_SPACE) { f64 retWidth = charWidth * msgScale; return retWidth; } if (character == MSG_CHAR_READ_HALF_SPACE) { return charWidth * msgScale * 0.5; } if (character >= MSG_CONTROL_CHAR) { return 0; } return charWidth * msgScale; }
### RAW ASSEMBLY INSTRUCTIONS: glabel PlayerLandJump /* 1A23E4 80273B04 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1A23E8 80273B08 AFB00018 */ sw $s0, 0x18($sp) /* 1A23EC 80273B0C 3C10800E */ lui $s0, %hi(gBattleStatus + 0xD8) /* 1A23F0 80273B10 8E10C148 */ lw $s0, %lo(gBattleStatus + 0xD8)($s0) /* 1A23F4 80273B14 AFBF0020 */ sw $ra, 0x20($sp) /* 1A23F8 80273B18 AFB1001C */ sw $s1, 0x1C($sp) /* 1A23FC 80273B1C 10A00002 */ beqz $a1, .L80273B28 /* 1A2400 80273B20 2611000C */ addiu $s1, $s0, 0xC /* 1A2404 80273B24 AC800070 */ sw $zero, 0x70($a0) .L80273B28: /* 1A2408 80273B28 8C820070 */ lw $v0, 0x70($a0) /* 1A240C 80273B2C 14400008 */ bnez $v0, .L80273B50 /* 1A2410 80273B30 24020001 */ addiu $v0, $zero, 0x1 /* 1A2414 80273B34 C6000144 */ lwc1 $f0, 0x144($s0) /* 1A2418 80273B38 C6020148 */ lwc1 $f2, 0x148($s0) /* 1A241C 80273B3C C604014C */ lwc1 $f4, 0x14C($s0) /* 1A2420 80273B40 E600000C */ swc1 $f0, 0xC($s0) /* 1A2424 80273B44 E6020010 */ swc1 $f2, 0x10($s0) /* 1A2428 80273B48 E6040014 */ swc1 $f4, 0x14($s0) /* 1A242C 80273B4C AC820070 */ sw $v0, 0x70($a0) .L80273B50: /* 1A2430 80273B50 C6020050 */ lwc1 $f2, 0x50($s0) /* 1A2434 80273B54 44800000 */ mtc1 $zero, $f0 /* 1A2438 80273B58 00000000 */ nop /* 1A243C 80273B5C 4602003C */ c.lt.s $f0, $f2 /* 1A2440 80273B60 00000000 */ nop /* 1A2444 80273B64 45000006 */ bc1f .L80273B80 /* 1A2448 80273B68 00000000 */ nop /* 1A244C 80273B6C 8E060064 */ lw $a2, 0x64($s0) /* 1A2450 80273B70 10C00003 */ beqz $a2, .L80273B80 /* 1A2454 80273B74 0000202D */ daddu $a0, $zero, $zero /* 1A2458 80273B78 0C098F3F */ jal set_animation /* 1A245C 80273B7C 0080282D */ daddu $a1, $a0, $zero .L80273B80: /* 1A2460 80273B80 C6220044 */ lwc1 $f2, 0x44($s1) /* 1A2464 80273B84 44800000 */ mtc1 $zero, $f0 /* 1A2468 80273B88 00000000 */ nop /* 1A246C 80273B8C 4600103C */ c.lt.s $f2, $f0 /* 1A2470 80273B90 00000000 */ nop /* 1A2474 80273B94 45000006 */ bc1f .L80273BB0 /* 1A2478 80273B98 00000000 */ nop /* 1A247C 80273B9C 8E26005C */ lw $a2, 0x5C($s1) /* 1A2480 80273BA0 10C00003 */ beqz $a2, .L80273BB0 /* 1A2484 80273BA4 0000202D */ daddu $a0, $zero, $zero /* 1A2488 80273BA8 0C098F3F */ jal set_animation /* 1A248C 80273BAC 0080282D */ daddu $a1, $a0, $zero .L80273BB0: /* 1A2490 80273BB0 C6240004 */ lwc1 $f4, 0x4($s1) /* 1A2494 80273BB4 C6200044 */ lwc1 $f0, 0x44($s1) /* 1A2498 80273BB8 8E250040 */ lw $a1, 0x40($s1) /* 1A249C 80273BBC 46002100 */ add.s $f4, $f4, $f0 /* 1A24A0 80273BC0 C622003C */ lwc1 $f2, 0x3C($s1) /* 1A24A4 80273BC4 8E260048 */ lw $a2, 0x48($s1) /* 1A24A8 80273BC8 46020001 */ sub.s $f0, $f0, $f2 /* 1A24AC 80273BCC 0220202D */ daddu $a0, $s1, $zero /* 1A24B0 80273BD0 E6240004 */ swc1 $f4, 0x4($s1) /* 1A24B4 80273BD4 0C09904A */ jal add_xz_vec3f /* 1A24B8 80273BD8 E6200044 */ swc1 $f0, 0x44($s1) /* 1A24BC 80273BDC C6200000 */ lwc1 $f0, 0x0($s1) /* 1A24C0 80273BE0 44802000 */ mtc1 $zero, $f4 /* 1A24C4 80273BE4 E6000144 */ swc1 $f0, 0x144($s0) /* 1A24C8 80273BE8 C6200004 */ lwc1 $f0, 0x4($s1) /* 1A24CC 80273BEC E6000148 */ swc1 $f0, 0x148($s0) /* 1A24D0 80273BF0 46000086 */ mov.s $f2, $f0 /* 1A24D4 80273BF4 C6200008 */ lwc1 $f0, 0x8($s1) /* 1A24D8 80273BF8 4604103C */ c.lt.s $f2, $f4 /* 1A24DC 80273BFC 00000000 */ nop /* 1A24E0 80273C00 45010003 */ bc1t .L80273C10 /* 1A24E4 80273C04 E600014C */ swc1 $f0, 0x14C($s0) /* 1A24E8 80273C08 0809CF14 */ j .L80273C50 /* 1A24EC 80273C0C 0000102D */ daddu $v0, $zero, $zero .L80273C10: /* 1A24F0 80273C10 C600018C */ lwc1 $f0, 0x18C($s0) /* 1A24F4 80273C14 E6040148 */ swc1 $f4, 0x148($s0) /* 1A24F8 80273C18 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A24FC 80273C1C 8E050144 */ lw $a1, 0x144($s0) /* 1A2500 80273C20 8E060148 */ lw $a2, 0x148($s0) /* 1A2504 80273C24 8E07014C */ lw $a3, 0x14C($s0) /* 1A2508 80273C28 0C0990BC */ jal play_movement_dust_effects /* 1A250C 80273C2C 24040002 */ addiu $a0, $zero, 0x2 /* 1A2510 80273C30 C600014C */ lwc1 $f0, 0x14C($s0) /* 1A2514 80273C34 24040148 */ addiu $a0, $zero, 0x148 /* 1A2518 80273C38 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A251C 80273C3C 8E060144 */ lw $a2, 0x144($s0) /* 1A2520 80273C40 8E070148 */ lw $a3, 0x148($s0) /* 1A2524 80273C44 0C052757 */ jal sfx_play_sound_at_position /* 1A2528 80273C48 0000282D */ daddu $a1, $zero, $zero /* 1A252C 80273C4C 24020001 */ addiu $v0, $zero, 0x1 .L80273C50: /* 1A2530 80273C50 8FBF0020 */ lw $ra, 0x20($sp) /* 1A2534 80273C54 8FB1001C */ lw $s1, 0x1C($sp) /* 1A2538 80273C58 8FB00018 */ lw $s0, 0x18($sp) /* 1A253C 80273C5C 03E00008 */ jr $ra /* 1A2540 80273C60 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus PlayerLandJump(Evt* script, s32 isInitialCall) { Actor* player = gBattleStatus.playerActor; ActorState* walkMovement = &player->state; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { walkMovement->currentPos.x = player->currentPos.x; walkMovement->currentPos.y = player->currentPos.y; walkMovement->currentPos.z = player->currentPos.z; script->functionTemp[0] = 1; } if (walkMovement->velocity > 0.0f) { if (walkMovement->animJumpRise != 0) { set_animation(0, 0, walkMovement->animJumpRise); } } if (walkMovement->velocity < 0.0f) { if (walkMovement->animJumpFall != 0) { set_animation(0, 0, walkMovement->animJumpFall); } } walkMovement->currentPos.y += walkMovement->velocity; walkMovement->velocity -= walkMovement->acceleration; add_xz_vec3f(&walkMovement->currentPos, walkMovement->speed, walkMovement->angle); player->currentPos.x = walkMovement->currentPos.x; player->currentPos.y = walkMovement->currentPos.y; player->currentPos.z = walkMovement->currentPos.z; if (player->currentPos.y < 0.0f) { player->currentPos.y = 0.0f; play_movement_dust_effects(2, player->currentPos.x, player->currentPos.y, player->currentPos.z, player->yaw); sfx_play_sound_at_position(SOUND_SOFT_LAND, SOUND_SPACE_MODE_0, player->currentPos.x, player->currentPos.y, player->currentPos.z); return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025DBD0 /* 18C4B0 8025DBD0 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 18C4B4 8025DBD4 AFB1001C */ sw $s1, 0x1C($sp) /* 18C4B8 8025DBD8 0080882D */ daddu $s1, $a0, $zero /* 18C4BC 8025DBDC AFBF0028 */ sw $ra, 0x28($sp) /* 18C4C0 8025DBE0 AFB30024 */ sw $s3, 0x24($sp) /* 18C4C4 8025DBE4 AFB20020 */ sw $s2, 0x20($sp) /* 18C4C8 8025DBE8 AFB00018 */ sw $s0, 0x18($sp) /* 18C4CC 8025DBEC 8E3000C0 */ lw $s0, 0xC0($s1) /* 18C4D0 8025DBF0 00A0982D */ daddu $s3, $a1, $zero /* 18C4D4 8025DBF4 02139021 */ addu $s2, $s0, $s3 /* 18C4D8 8025DBF8 824308BC */ lb $v1, 0x8BC($s2) /* 18C4DC 8025DBFC 10600005 */ beqz $v1, .L8025DC14 /* 18C4E0 8025DC00 24020001 */ addiu $v0, $zero, 0x1 /* 18C4E4 8025DC04 1062001B */ beq $v1, $v0, .L8025DC74 /* 18C4E8 8025DC08 00131080 */ sll $v0, $s3, 2 /* 18C4EC 8025DC0C 08097749 */ j .L8025DD24 /* 18C4F0 8025DC10 00000000 */ nop .L8025DC14: /* 18C4F4 8025DC14 00131080 */ sll $v0, $s3, 2 /* 18C4F8 8025DC18 244208B0 */ addiu $v0, $v0, 0x8B0 /* 18C4FC 8025DC1C 3C013F99 */ lui $at, (0x3F99999A >> 16) /* 18C500 8025DC20 3421999A */ ori $at, $at, (0x3F99999A & 0xFFFF) /* 18C504 8025DC24 44810000 */ mtc1 $at, $f0 /* 18C508 8025DC28 02021021 */ addu $v0, $s0, $v0 /* 18C50C 8025DC2C AFA20014 */ sw $v0, 0x14($sp) /* 18C510 8025DC30 E7A00010 */ swc1 $f0, 0x10($sp) /* 18C514 8025DC34 8E250058 */ lw $a1, 0x58($s1) /* 18C518 8025DC38 8E26005C */ lw $a2, 0x5C($s1) /* 18C51C 8025DC3C 8E270060 */ lw $a3, 0x60($s1) /* 18C520 8025DC40 0C01C3AC */ jal fx_aura /* 18C524 8025DC44 24040002 */ addiu $a0, $zero, 0x2 /* 18C528 8025DC48 24020001 */ addiu $v0, $zero, 0x1 /* 18C52C 8025DC4C A24208BC */ sb $v0, 0x8BC($s2) /* 18C530 8025DC50 00131100 */ sll $v0, $s3, 4 /* 18C534 8025DC54 02021021 */ addu $v0, $s0, $v0 /* 18C538 8025DC58 24030096 */ addiu $v1, $zero, 0x96 /* 18C53C 8025DC5C A44308C6 */ sh $v1, 0x8C6($v0) /* 18C540 8025DC60 A44308C8 */ sh $v1, 0x8C8($v0) /* 18C544 8025DC64 240300FF */ addiu $v1, $zero, 0xFF /* 18C548 8025DC68 A44308CA */ sh $v1, 0x8CA($v0) /* 18C54C 8025DC6C A44008CC */ sh $zero, 0x8CC($v0) /* 18C550 8025DC70 00131080 */ sll $v0, $s3, 2 .L8025DC74: /* 18C554 8025DC74 02021021 */ addu $v0, $s0, $v0 /* 18C558 8025DC78 8C4508B0 */ lw $a1, 0x8B0($v0) /* 18C55C 8025DC7C C6200058 */ lwc1 $f0, 0x58($s1) /* 18C560 8025DC80 8CA3000C */ lw $v1, 0xC($a1) /* 18C564 8025DC84 00132100 */ sll $a0, $s3, 4 /* 18C568 8025DC88 E4600004 */ swc1 $f0, 0x4($v1) /* 18C56C 8025DC8C C620005C */ lwc1 $f0, 0x5C($s1) /* 18C570 8025DC90 02042021 */ addu $a0, $s0, $a0 /* 18C574 8025DC94 E4600008 */ swc1 $f0, 0x8($v1) /* 18C578 8025DC98 848208CC */ lh $v0, 0x8CC($a0) /* 18C57C 8025DC9C C6200060 */ lwc1 $f0, 0x60($s1) /* 18C580 8025DCA0 44821000 */ mtc1 $v0, $f2 /* 18C584 8025DCA4 00000000 */ nop /* 18C588 8025DCA8 468010A0 */ cvt.s.w $f2, $f2 /* 18C58C 8025DCAC 46020000 */ add.s $f0, $f0, $f2 /* 18C590 8025DCB0 E460000C */ swc1 $f0, 0xC($v1) /* 18C594 8025DCB4 848208C6 */ lh $v0, 0x8C6($a0) /* 18C598 8025DCB8 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 18C59C 8025DCBC 44810000 */ mtc1 $at, $f0 /* 18C5A0 8025DCC0 44822000 */ mtc1 $v0, $f4 /* 18C5A4 8025DCC4 00000000 */ nop /* 18C5A8 8025DCC8 46802120 */ cvt.s.w $f4, $f4 /* 18C5AC 8025DCCC 8CA2000C */ lw $v0, 0xC($a1) /* 18C5B0 8025DCD0 46002103 */ div.s $f4, $f4, $f0 /* 18C5B4 8025DCD4 E444001C */ swc1 $f4, 0x1C($v0) /* 18C5B8 8025DCD8 848208C8 */ lh $v0, 0x8C8($a0) /* 18C5BC 8025DCDC 3C01802A */ lui $at, %hi(D_8029D4E8) /* 18C5C0 8025DCE0 D422D4E8 */ ldc1 $f2, %lo(D_8029D4E8)($at) /* 18C5C4 8025DCE4 44822000 */ mtc1 $v0, $f4 /* 18C5C8 8025DCE8 00000000 */ nop /* 18C5CC 8025DCEC 46802120 */ cvt.s.w $f4, $f4 /* 18C5D0 8025DCF0 46002103 */ div.s $f4, $f4, $f0 /* 18C5D4 8025DCF4 46002021 */ cvt.d.s $f0, $f4 /* 18C5D8 8025DCF8 46220002 */ mul.d $f0, $f0, $f2 /* 18C5DC 8025DCFC 00000000 */ nop /* 18C5E0 8025DD00 8CA2000C */ lw $v0, 0xC($a1) /* 18C5E4 8025DD04 46200020 */ cvt.s.d $f0, $f0 /* 18C5E8 8025DD08 E4400020 */ swc1 $f0, 0x20($v0) /* 18C5EC 8025DD0C 8CA3000C */ lw $v1, 0xC($a1) /* 18C5F0 8025DD10 848208CA */ lh $v0, 0x8CA($a0) /* 18C5F4 8025DD14 AC620028 */ sw $v0, 0x28($v1) /* 18C5F8 8025DD18 8CA2000C */ lw $v0, 0xC($a1) /* 18C5FC 8025DD1C C6200064 */ lwc1 $f0, 0x64($s1) /* 18C600 8025DD20 E4400064 */ swc1 $f0, 0x64($v0) .L8025DD24: /* 18C604 8025DD24 8FBF0028 */ lw $ra, 0x28($sp) /* 18C608 8025DD28 8FB30024 */ lw $s3, 0x24($sp) /* 18C60C 8025DD2C 8FB20020 */ lw $s2, 0x20($sp) /* 18C610 8025DD30 8FB1001C */ lw $s1, 0x1C($sp) /* 18C614 8025DD34 8FB00018 */ lw $s0, 0x18($sp) /* 18C618 8025DD38 03E00008 */ jr $ra /* 18C61C 8025DD3C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void func_8025DBD0(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; EffectInstance* effect; AuraFXData* data; f32 scale; switch (decor->state[decorationIndex]) { case 0: fx_aura(2, part->currentPos.x, part->currentPos.y, part->currentPos.z, 1.2f, &decor->effect[decorationIndex]); decor->state[decorationIndex] = 1; decor->unk_8C6[decorationIndex].unk00 = 150; decor->unk_8C6[decorationIndex].unk02 = 150; decor->unk_8C6[decorationIndex].unk04 = 255; decor->unk_8C6[decorationIndex].unk06 = 0; // fallthrough case 1: effect = decor->effect[decorationIndex]; data = effect->data.aura; data->posA.x = part->currentPos.x; data->posA.y = part->currentPos.y; data->posA.z = part->currentPos.z + decor->unk_8C6[decorationIndex].unk06; scale = decor->unk_8C6[decorationIndex].unk00; scale /= 100.0f; effect->data.aura->scale.x = scale; scale = decor->unk_8C6[decorationIndex].unk02; scale /= 100.0f; effect->data.aura->scale.y = scale * (0.8 - 1e-16); // epsilon? effect->data.aura->primA = decor->unk_8C6[decorationIndex].unk04; effect->data.aura->renderYaw = part->yaw; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel smoke_burst_main /* 35B9D0 E004E000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 35B9D4 E004E004 F7B40040 */ sdc1 $f20, 0x40($sp) /* 35B9D8 E004E008 4485A000 */ mtc1 $a1, $f20 /* 35B9DC E004E00C F7B60048 */ sdc1 $f22, 0x48($sp) /* 35B9E0 E004E010 4486B000 */ mtc1 $a2, $f22 /* 35B9E4 E004E014 AFB20030 */ sw $s2, 0x30($sp) /* 35B9E8 E004E018 0080902D */ daddu $s2, $a0, $zero /* 35B9EC E004E01C F7B80050 */ sdc1 $f24, 0x50($sp) /* 35B9F0 E004E020 4487C000 */ mtc1 $a3, $f24 /* 35B9F4 E004E024 27A40010 */ addiu $a0, $sp, 0x10 /* 35B9F8 E004E028 AFB30034 */ sw $s3, 0x34($sp) /* 35B9FC E004E02C 8FB3006C */ lw $s3, 0x6C($sp) /* 35BA00 E004E030 3C02E005 */ lui $v0, %hi(smoke_burst_init) /* 35BA04 E004E034 2442E15C */ addiu $v0, $v0, %lo(smoke_burst_init) /* 35BA08 E004E038 AFA20018 */ sw $v0, 0x18($sp) /* 35BA0C E004E03C 3C02E005 */ lui $v0, %hi(smoke_burst_update) /* 35BA10 E004E040 2442E164 */ addiu $v0, $v0, %lo(smoke_burst_update) /* 35BA14 E004E044 AFA2001C */ sw $v0, 0x1C($sp) /* 35BA18 E004E048 3C02E005 */ lui $v0, %hi(smoke_burst_render) /* 35BA1C E004E04C 2442E1D0 */ addiu $v0, $v0, %lo(smoke_burst_render) /* 35BA20 E004E050 AFA20020 */ sw $v0, 0x20($sp) /* 35BA24 E004E054 24020027 */ addiu $v0, $zero, 0x27 /* 35BA28 E004E058 AFBF0038 */ sw $ra, 0x38($sp) /* 35BA2C E004E05C AFB1002C */ sw $s1, 0x2C($sp) /* 35BA30 E004E060 AFB00028 */ sw $s0, 0x28($sp) /* 35BA34 E004E064 AFA00010 */ sw $zero, 0x10($sp) /* 35BA38 E004E068 AFA00024 */ sw $zero, 0x24($sp) /* 35BA3C E004E06C 0C080124 */ jal shim_create_effect_instance /* 35BA40 E004E070 AFA20014 */ sw $v0, 0x14($sp) /* 35BA44 E004E074 24040028 */ addiu $a0, $zero, 0x28 /* 35BA48 E004E078 24110001 */ addiu $s1, $zero, 0x1 /* 35BA4C E004E07C 0040802D */ daddu $s0, $v0, $zero /* 35BA50 E004E080 0C08012C */ jal shim_general_heap_malloc /* 35BA54 E004E084 AE110008 */ sw $s1, 0x8($s0) /* 35BA58 E004E088 AE02000C */ sw $v0, 0xC($s0) /* 35BA5C E004E08C 0040802D */ daddu $s0, $v0, $zero /* 35BA60 E004E090 16000003 */ bnez $s0, .LE004E0A0 /* 35BA64 E004E094 0200202D */ daddu $a0, $s0, $zero .LE004E098: /* 35BA68 E004E098 08013826 */ j .LE004E098 /* 35BA6C E004E09C 00000000 */ nop .LE004E0A0: /* 35BA70 E004E0A0 00112880 */ sll $a1, $s1, 2 /* 35BA74 E004E0A4 00B12821 */ addu $a1, $a1, $s1 /* 35BA78 E004E0A8 0C080130 */ jal shim_mem_clear /* 35BA7C E004E0AC 000528C0 */ sll $a1, $a1, 3 /* 35BA80 E004E0B0 AE130014 */ sw $s3, 0x14($s0) /* 35BA84 E004E0B4 AE000018 */ sw $zero, 0x18($s0) /* 35BA88 E004E0B8 AE13001C */ sw $s3, 0x1C($s0) /* 35BA8C E004E0BC AE000020 */ sw $zero, 0x20($s0) /* 35BA90 E004E0C0 A6120000 */ sh $s2, 0x0($s0) /* 35BA94 E004E0C4 E6140004 */ swc1 $f20, 0x4($s0) /* 35BA98 E004E0C8 E6160008 */ swc1 $f22, 0x8($s0) /* 35BA9C E004E0CC E618000C */ swc1 $f24, 0xC($s0) /* 35BAA0 E004E0D0 C7A00068 */ lwc1 $f0, 0x68($sp) /* 35BAA4 E004E0D4 12400006 */ beqz $s2, .LE004E0F0 /* 35BAA8 E004E0D8 E6000010 */ swc1 $f0, 0x10($s0) /* 35BAAC E004E0DC 24020001 */ addiu $v0, $zero, 0x1 /* 35BAB0 E004E0E0 12420008 */ beq $s2, $v0, .LE004E104 /* 35BAB4 E004E0E4 240200E1 */ addiu $v0, $zero, 0xE1 /* 35BAB8 E004E0E8 08013847 */ j .LE004E11C /* 35BABC E004E0EC A2020024 */ sb $v0, 0x24($s0) .LE004E0F0: /* 35BAC0 E004E0F0 24020082 */ addiu $v0, $zero, 0x82 /* 35BAC4 E004E0F4 A2000026 */ sb $zero, 0x26($s0) /* 35BAC8 E004E0F8 A2000025 */ sb $zero, 0x25($s0) /* 35BACC E004E0FC 0801384C */ j .LE004E130 /* 35BAD0 E004E100 A2000024 */ sb $zero, 0x24($s0) .LE004E104: /* 35BAD4 E004E104 240200FF */ addiu $v0, $zero, 0xFF /* 35BAD8 E004E108 A2020024 */ sb $v0, 0x24($s0) /* 35BADC E004E10C 24020082 */ addiu $v0, $zero, 0x82 /* 35BAE0 E004E110 A2000026 */ sb $zero, 0x26($s0) /* 35BAE4 E004E114 0801384C */ j .LE004E130 /* 35BAE8 E004E118 A2000025 */ sb $zero, 0x25($s0) .LE004E11C: /* 35BAEC E004E11C 240200D7 */ addiu $v0, $zero, 0xD7 /* 35BAF0 E004E120 A2020025 */ sb $v0, 0x25($s0) /* 35BAF4 E004E124 240200FF */ addiu $v0, $zero, 0xFF /* 35BAF8 E004E128 A2020026 */ sb $v0, 0x26($s0) /* 35BAFC E004E12C 240200B4 */ addiu $v0, $zero, 0xB4 .LE004E130: /* 35BB00 E004E130 A2020027 */ sb $v0, 0x27($s0) /* 35BB04 E004E134 8FBF0038 */ lw $ra, 0x38($sp) /* 35BB08 E004E138 8FB30034 */ lw $s3, 0x34($sp) /* 35BB0C E004E13C 8FB20030 */ lw $s2, 0x30($sp) /* 35BB10 E004E140 8FB1002C */ lw $s1, 0x2C($sp) /* 35BB14 E004E144 8FB00028 */ lw $s0, 0x28($sp) /* 35BB18 E004E148 D7B80050 */ ldc1 $f24, 0x50($sp) /* 35BB1C E004E14C D7B60048 */ ldc1 $f22, 0x48($sp) /* 35BB20 E004E150 D7B40040 */ ldc1 $f20, 0x40($sp) /* 35BB24 E004E154 03E00008 */ jr $ra /* 35BB28 E004E158 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: void smoke_burst_main(s32 arg0, f32 posX, f32 posY, f32 posZ, f32 arg4, s32 timeLeft) { EffectBlueprint effectBp; EffectInstance* effect; SmokeBurstFXData* data; s32 numParts = 1; effectBp.init = smoke_burst_init; effectBp.update = smoke_burst_update; effectBp.renderWorld = smoke_burst_render; effectBp.unk_00 = 0; effectBp.renderUI = NULL; effectBp.effectID = EFFECT_SMOKE_BURST; effect = shim_create_effect_instance(&effectBp); effect->numParts = numParts; data = effect->data.smokeBurst = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(data != NULL); shim_mem_clear(data, numParts * sizeof(*data)); data->timeLeft = timeLeft; data->lifeTime = 0; data->unk_1C = timeLeft; data->unk_20 = 0; data->unk_00 = arg0; data->pos.x = posX; data->pos.y = posY; data->pos.z = posZ; data->unk_10 = arg4; switch (arg0) { case 0: data->rgba.b = 0; data->rgba.g = 0; data->rgba.r = 0; data->rgba.a = 130; break; case 1: data->rgba.r = 255; data->rgba.b = 0; data->rgba.g = 0; data->rgba.a = 130; break; default: data->rgba.r = 225; data->rgba.g = 215; data->rgba.b = 255; data->rgba.a = 180; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_shattering_block_init /* 104730 802E2EB0 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 104734 802E2EB4 AFB1001C */ sw $s1, 0x1C($sp) /* 104738 802E2EB8 0080882D */ daddu $s1, $a0, $zero /* 10473C 802E2EBC AFBF0024 */ sw $ra, 0x24($sp) /* 104740 802E2EC0 AFB20020 */ sw $s2, 0x20($sp) /* 104744 802E2EC4 AFB00018 */ sw $s0, 0x18($sp) /* 104748 802E2EC8 8E220040 */ lw $v0, 0x40($s1) /* 10474C 802E2ECC C620004C */ lwc1 $f0, 0x4C($s1) /* 104750 802E2ED0 0000802D */ daddu $s0, $zero, $zero /* 104754 802E2ED4 E4400038 */ swc1 $f0, 0x38($v0) /* 104758 802E2ED8 92240004 */ lbu $a0, 0x4($s1) /* 10475C 802E2EDC 0C0441A9 */ jal get_entity_type /* 104760 802E2EE0 0200902D */ daddu $s2, $s0, $zero /* 104764 802E2EE4 0040182D */ daddu $v1, $v0, $zero /* 104768 802E2EE8 2462FFE8 */ addiu $v0, $v1, -0x18 /* 10476C 802E2EEC 2C420003 */ sltiu $v0, $v0, 0x3 /* 104770 802E2EF0 10400007 */ beqz $v0, .L802E2F10 /* 104774 802E2EF4 2463FFF3 */ addiu $v1, $v1, -0xD /* 104778 802E2EF8 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 10477C 802E2EFC 44810000 */ mtc1 $at, $f0 /* 104780 802E2F00 00000000 */ nop /* 104784 802E2F04 E6200054 */ swc1 $f0, 0x54($s1) /* 104788 802E2F08 E6200058 */ swc1 $f0, 0x58($s1) /* 10478C 802E2F0C E620005C */ swc1 $f0, 0x5C($s1) .L802E2F10: /* 104790 802E2F10 2C62000E */ sltiu $v0, $v1, 0xE /* 104794 802E2F14 10400023 */ beqz $v0, .L802E2FA4 /* 104798 802E2F18 00031080 */ sll $v0, $v1, 2 /* 10479C 802E2F1C 3C01802F */ lui $at, %hi(jtbl_802EB160) /* 1047A0 802E2F20 00220821 */ addu $at, $at, $v0 /* 1047A4 802E2F24 8C22B160 */ lw $v0, %lo(jtbl_802EB160)($at) /* 1047A8 802E2F28 00400008 */ jr $v0 /* 1047AC 802E2F2C 00000000 */ nop glabel .L802E2F30 /* 1047B0 802E2F30 3C120A00 */ lui $s2, %hi(D_0A0031E0_E94A70) /* 1047B4 802E2F34 265231E0 */ addiu $s2, $s2, %lo(D_0A0031E0_E94A70) /* 1047B8 802E2F38 3C100A00 */ lui $s0, %hi(D_0A001508_E9EB58) /* 1047BC 802E2F3C 26101508 */ addiu $s0, $s0, %lo(D_0A001508_E9EB58) /* 1047C0 802E2F40 080B8BE9 */ j .L802E2FA4 /* 1047C4 802E2F44 00000000 */ nop glabel .L802E2F48 /* 1047C8 802E2F48 3C120A00 */ lui $s2, %hi(D_0A0031B0_E94A40) /* 1047CC 802E2F4C 265231B0 */ addiu $s2, $s2, %lo(D_0A0031B0_E94A40) /* 1047D0 802E2F50 3C100A00 */ lui $s0, %hi(D_0A0014D8_E9EB28) /* 1047D4 802E2F54 261014D8 */ addiu $s0, $s0, %lo(D_0A0014D8_E9EB28) /* 1047D8 802E2F58 080B8BE9 */ j .L802E2FA4 /* 1047DC 802E2F5C 00000000 */ nop glabel .L802E2F60 /* 1047E0 802E2F60 3C120A00 */ lui $s2, %hi(D_0A002F78_E94808) /* 1047E4 802E2F64 26522F78 */ addiu $s2, $s2, %lo(D_0A002F78_E94808) /* 1047E8 802E2F68 3C100A00 */ lui $s0, %hi(D_0A001218_E9E868) /* 1047EC 802E2F6C 26101218 */ addiu $s0, $s0, %lo(D_0A001218_E9E868) /* 1047F0 802E2F70 080B8BE9 */ j .L802E2FA4 /* 1047F4 802E2F74 00000000 */ nop glabel .L802E2F78 /* 1047F8 802E2F78 24040158 */ addiu $a0, $zero, 0x158 /* 1047FC 802E2F7C C6200050 */ lwc1 $f0, 0x50($s1) /* 104800 802E2F80 3C120A00 */ lui $s2, %hi(D_0A003F70_E95800) /* 104804 802E2F84 26523F70 */ addiu $s2, $s2, %lo(D_0A003F70_E95800) /* 104808 802E2F88 E7A00010 */ swc1 $f0, 0x10($sp) /* 10480C 802E2F8C 8E260048 */ lw $a2, 0x48($s1) /* 104810 802E2F90 8E27004C */ lw $a3, 0x4C($s1) /* 104814 802E2F94 3C100A00 */ lui $s0, %hi(D_0A002318_E93BA8) /* 104818 802E2F98 26102318 */ addiu $s0, $s0, %lo(D_0A002318_E93BA8) /* 10481C 802E2F9C 0C052757 */ jal sfx_play_sound_at_position /* 104820 802E2FA0 0000282D */ daddu $a1, $zero, $zero glabel .L802E2FA4 /* 104824 802E2FA4 12000004 */ beqz $s0, .L802E2FB8 /* 104828 802E2FA8 0220202D */ daddu $a0, $s1, $zero /* 10482C 802E2FAC 0240282D */ daddu $a1, $s2, $zero /* 104830 802E2FB0 0C0B891B */ jal entity_shattering_init_pieces /* 104834 802E2FB4 0200302D */ daddu $a2, $s0, $zero .L802E2FB8: /* 104838 802E2FB8 8FBF0024 */ lw $ra, 0x24($sp) /* 10483C 802E2FBC 8FB20020 */ lw $s2, 0x20($sp) /* 104840 802E2FC0 8FB1001C */ lw $s1, 0x1C($sp) /* 104844 802E2FC4 8FB00018 */ lw $s0, 0x18($sp) /* 104848 802E2FC8 03E00008 */ jr $ra /* 10484C 802E2FCC 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void entity_shattering_block_init(Entity* entity) { u32 type; Mtx* fragmentMatrices = NULL; Gfx** fragmentDisplayLists = NULL; entity->dataBuf.shatteringBlock->originalPosY = entity->position.y; type = get_entity_type(entity->listIndex); if (type == ENTITY_TYPE_HAMMER1_BLOCK_TINY || type == ENTITY_TYPE_HAMMER2_BLOCK_TINY || type == ENTITY_TYPE_HAMMER3_BLOCK_TINY) { entity->scale.x = 0.5f; entity->scale.y = 0.5f; entity->scale.z = 0.5f; } switch (type) { case ENTITY_TYPE_HAMMER1_BLOCK: case ENTITY_TYPE_HAMMER1_BLOCK_TINY: fragmentDisplayLists = Entity_ShatteringHammer1Block_FragmentsRender; fragmentMatrices = Entity_ShatteringHammer1Block_FragmentsMatrices; break; case ENTITY_TYPE_HAMMER2_BLOCK: case ENTITY_TYPE_HAMMER2_BLOCK_TINY: fragmentDisplayLists = Entity_ShatteringHammer2Block_FragmentsRender; fragmentMatrices = Entity_ShatteringHammer2Block_FragmentsMatrices; break; case ENTITY_TYPE_HAMMER3_BLOCK: case ENTITY_TYPE_HAMMER3_BLOCK_TINY: fragmentDisplayLists = Entity_ShatteringHammer3Block_FragmentsRender; fragmentMatrices = Entity_ShatteringHammer3Block_FragmentsMatrices; break; case ENTITY_TYPE_BRICK_BLOCK: sfx_play_sound_at_position(SOUND_158, SOUND_SPACE_MODE_0, entity->position.x, entity->position.y, entity->position.z); fragmentDisplayLists = Entity_ShatteringBrickBlock_FragmentsRender; fragmentMatrices = Entity_ShatteringBrickBlock_FragmentsMatrices; break; case ENTITY_TYPE_MULTI_COIN_BRICK: case ENTITY_TYPE_YELLOW_BLOCK: case ENTITY_TYPE_SINGLE_TRIGGER_BLOCK: case ENTITY_TYPE_HIDDEN_YELLOW_BLOCK: case ENTITY_TYPE_HIDDEN_RED_BLOCK: case ENTITY_TYPE_INACTIVE_BLOCK: break; } if (fragmentMatrices == NULL) { return; } entity_shattering_init_pieces(entity, fragmentDisplayLists, fragmentMatrices); }
### RAW ASSEMBLY INSTRUCTIONS: glabel msg_get_draw_char_width /* BC4F4 80125DF4 288200F0 */ slti $v0, $a0, 0xF0 /* BC4F8 80125DF8 44871000 */ mtc1 $a3, $f2 /* BC4FC 80125DFC 8FA70010 */ lw $a3, 0x10($sp) /* BC500 80125E00 97A30016 */ lhu $v1, 0x16($sp) /* BC504 80125E04 14400004 */ bnez $v0, .L80125E18 /* BC508 80125E08 2482FF0B */ addiu $v0, $a0, -0xF5 /* BC50C 80125E0C 2C420003 */ sltiu $v0, $v0, 0x3 /* BC510 80125E10 10400037 */ beqz $v0, .L80125EF0 /* BC514 80125E14 0000102D */ daddu $v0, $zero, $zero .L80125E18: /* BC518 80125E18 10E00005 */ beqz $a3, .L80125E30 /* BC51C 80125E1C 240200F5 */ addiu $v0, $zero, 0xF5 /* BC520 80125E20 44870000 */ mtc1 $a3, $f0 /* BC524 80125E24 00000000 */ nop /* BC528 80125E28 080497B1 */ j .L80125EC4 /* BC52C 80125E2C 46800020 */ cvt.s.w $f0, $f0 .L80125E30: /* BC530 80125E30 30620100 */ andi $v0, $v1, 0x100 /* BC534 80125E34 10400015 */ beqz $v0, .L80125E8C /* BC538 80125E38 00051880 */ sll $v1, $a1, 2 /* BC53C 80125E3C 00061040 */ sll $v0, $a2, 1 /* BC540 80125E40 3C01802F */ lui $at, %hi(gMsgCharsets) /* BC544 80125E44 00230821 */ addu $at, $at, $v1 /* BC548 80125E48 8C23B5A8 */ lw $v1, %lo(gMsgCharsets)($at) /* BC54C 80125E4C 00461021 */ addu $v0, $v0, $a2 /* BC550 80125E50 8C630008 */ lw $v1, 0x8($v1) /* BC554 80125E54 00021080 */ sll $v0, $v0, 2 /* BC558 80125E58 00431021 */ addu $v0, $v0, $v1 /* BC55C 80125E5C 8C430004 */ lw $v1, 0x4($v0) /* BC560 80125E60 1060000A */ beqz $v1, .L80125E8C /* BC564 80125E64 240200F5 */ addiu $v0, $zero, 0xF5 /* BC568 80125E68 10820008 */ beq $a0, $v0, .L80125E8C /* BC56C 80125E6C 240200F6 */ addiu $v0, $zero, 0xF6 /* BC570 80125E70 10820006 */ beq $a0, $v0, .L80125E8C /* BC574 80125E74 240200F7 */ addiu $v0, $zero, 0xF7 /* BC578 80125E78 10820004 */ beq $a0, $v0, .L80125E8C /* BC57C 80125E7C 00641021 */ addu $v0, $v1, $a0 /* BC580 80125E80 90420000 */ lbu $v0, 0x0($v0) /* BC584 80125E84 080497AD */ j .L80125EB4 /* BC588 80125E88 00000000 */ nop .L80125E8C: /* BC58C 80125E8C 00051880 */ sll $v1, $a1, 2 /* BC590 80125E90 00061040 */ sll $v0, $a2, 1 /* BC594 80125E94 3C01802F */ lui $at, %hi(gMsgCharsets) /* BC598 80125E98 00230821 */ addu $at, $at, $v1 /* BC59C 80125E9C 8C23B5A8 */ lw $v1, %lo(gMsgCharsets)($at) /* BC5A0 80125EA0 00461021 */ addu $v0, $v0, $a2 /* BC5A4 80125EA4 8C630008 */ lw $v1, 0x8($v1) /* BC5A8 80125EA8 00021080 */ sll $v0, $v0, 2 /* BC5AC 80125EAC 00431021 */ addu $v0, $v0, $v1 /* BC5B0 80125EB0 90420008 */ lbu $v0, 0x8($v0) .L80125EB4: /* BC5B4 80125EB4 44820000 */ mtc1 $v0, $f0 /* BC5B8 80125EB8 00000000 */ nop /* BC5BC 80125EBC 46800020 */ cvt.s.w $f0, $f0 /* BC5C0 80125EC0 240200F5 */ addiu $v0, $zero, 0xF5 .L80125EC4: /* BC5C4 80125EC4 1482000C */ bne $a0, $v0, .L80125EF8 /* BC5C8 80125EC8 240200F6 */ addiu $v0, $zero, 0xF6 /* BC5CC 80125ECC 46020002 */ mul.s $f0, $f0, $f2 /* BC5D0 80125ED0 00000000 */ nop /* BC5D4 80125ED4 3C018015 */ lui $at, %hi(D_80150580) /* BC5D8 80125ED8 D4220580 */ ldc1 $f2, %lo(D_80150580)($at) /* BC5DC 80125EDC 46000021 */ cvt.d.s $f0, $f0 .L80125EE0: /* BC5E0 80125EE0 46220002 */ mul.d $f0, $f0, $f2 /* BC5E4 80125EE4 00000000 */ nop /* BC5E8 80125EE8 4620010D */ trunc.w.d $f4, $f0 /* BC5EC 80125EEC 44022000 */ mfc1 $v0, $f4 .L80125EF0: /* BC5F0 80125EF0 03E00008 */ jr $ra /* BC5F4 80125EF4 00000000 */ nop .L80125EF8: /* BC5F8 80125EF8 14820008 */ bne $a0, $v0, .L80125F1C /* BC5FC 80125EFC 240200F7 */ addiu $v0, $zero, 0xF7 /* BC600 80125F00 46020002 */ mul.s $f0, $f0, $f2 /* BC604 80125F04 00000000 */ nop /* BC608 80125F08 46000021 */ cvt.d.s $f0, $f0 /* BC60C 80125F0C 4620010D */ trunc.w.d $f4, $f0 /* BC610 80125F10 44022000 */ mfc1 $v0, $f4 /* BC614 80125F14 03E00008 */ jr $ra /* BC618 80125F18 00000000 */ nop .L80125F1C: /* BC61C 80125F1C 14820008 */ bne $a0, $v0, .L80125F40 /* BC620 80125F20 288200F0 */ slti $v0, $a0, 0xF0 /* BC624 80125F24 46020002 */ mul.s $f0, $f0, $f2 /* BC628 80125F28 00000000 */ nop /* BC62C 80125F2C 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* BC630 80125F30 44811800 */ mtc1 $at, $f3 /* BC634 80125F34 44801000 */ mtc1 $zero, $f2 /* BC638 80125F38 080497B8 */ j .L80125EE0 /* BC63C 80125F3C 46000021 */ cvt.d.s $f0, $f0 .L80125F40: /* BC640 80125F40 10400007 */ beqz $v0, .L80125F60 /* BC644 80125F44 00000000 */ nop /* BC648 80125F48 46020002 */ mul.s $f0, $f0, $f2 /* BC64C 80125F4C 00000000 */ nop /* BC650 80125F50 4600010D */ trunc.w.s $f4, $f0 /* BC654 80125F54 44022000 */ mfc1 $v0, $f4 /* BC658 80125F58 03E00008 */ jr $ra /* BC65C 80125F5C 00000000 */ nop .L80125F60: /* BC660 80125F60 03E00008 */ jr $ra /* BC664 80125F64 0000102D */ daddu $v0, $zero, $zero ### DECOMPILED C INSTRUCTIONS: s32 msg_get_draw_char_width(s32 character, s32 charset, s32 variation, f32 msgScale, s32 overrideCharWidth, u16 flags) { f32 baseWidth; if (character >= MSG_CONTROL_CHAR && (character != MSG_CHAR_PRINT_SPACE && character != MSG_CHAR_PRINT_FULL_SPACE && character != MSG_CHAR_PRINT_HALF_SPACE)) { return 0; } if (overrideCharWidth != 0) { baseWidth = overrideCharWidth; } else if (flags & MSG_PRINT_FLAG_100) { u8* charWidthTable = gMsgCharsets[charset]->rasters[variation].charWidthTable; if (charWidthTable != NULL && character != MSG_CHAR_PRINT_SPACE && character != MSG_CHAR_PRINT_FULL_SPACE && character != MSG_CHAR_PRINT_HALF_SPACE) { baseWidth = charWidthTable[character]; } else { baseWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth; } } else { baseWidth = gMsgCharsets[charset]->rasters[variation].monospaceWidth; } if (character == MSG_CHAR_PRINT_SPACE) { return baseWidth * msgScale * 0.6; } if (character == MSG_CHAR_PRINT_FULL_SPACE) { f64 charWidth = baseWidth * msgScale; return charWidth; } if (character == MSG_CHAR_PRINT_HALF_SPACE) { return baseWidth * msgScale * 0.5; } if (character >= MSG_CONTROL_CHAR) { return 0; } return baseWidth * msgScale; }
### RAW ASSEMBLY INSTRUCTIONS: glabel osViSetSpecialFeatures /* 42260 80066E60 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 42264 80066E64 AFB00010 */ sw $s0, 0x10($sp) /* 42268 80066E68 AFBF0014 */ sw $ra, 0x14($sp) /* 4226C 80066E6C 0C01ACD8 */ jal __osDisableInt /* 42270 80066E70 00808021 */ addu $s0, $a0, $zero /* 42274 80066E74 00403021 */ addu $a2, $v0, $zero /* 42278 80066E78 32020001 */ andi $v0, $s0, 0x1 /* 4227C 80066E7C 10400007 */ beqz $v0, .L80066E9C /* 42280 80066E80 32020002 */ andi $v0, $s0, 0x2 /* 42284 80066E84 3C038009 */ lui $v1, %hi(D_800959D4) /* 42288 80066E88 8C6359D4 */ lw $v1, %lo(D_800959D4)($v1) /* 4228C 80066E8C 8C62000C */ lw $v0, 0xC($v1) /* 42290 80066E90 34420008 */ ori $v0, $v0, 0x8 /* 42294 80066E94 AC62000C */ sw $v0, 0xC($v1) /* 42298 80066E98 32020002 */ andi $v0, $s0, 0x2 .L80066E9C: /* 4229C 80066E9C 10400006 */ beqz $v0, .L80066EB8 /* 422A0 80066EA0 2404FFF7 */ addiu $a0, $zero, -0x9 /* 422A4 80066EA4 3C028009 */ lui $v0, %hi(D_800959D4) /* 422A8 80066EA8 8C4259D4 */ lw $v0, %lo(D_800959D4)($v0) /* 422AC 80066EAC 8C43000C */ lw $v1, 0xC($v0) /* 422B0 80066EB0 00641824 */ and $v1, $v1, $a0 /* 422B4 80066EB4 AC43000C */ sw $v1, 0xC($v0) .L80066EB8: /* 422B8 80066EB8 32020004 */ andi $v0, $s0, 0x4 /* 422BC 80066EBC 10400007 */ beqz $v0, .L80066EDC /* 422C0 80066EC0 32020008 */ andi $v0, $s0, 0x8 /* 422C4 80066EC4 3C038009 */ lui $v1, %hi(D_800959D4) /* 422C8 80066EC8 8C6359D4 */ lw $v1, %lo(D_800959D4)($v1) /* 422CC 80066ECC 8C62000C */ lw $v0, 0xC($v1) /* 422D0 80066ED0 34420004 */ ori $v0, $v0, 0x4 /* 422D4 80066ED4 AC62000C */ sw $v0, 0xC($v1) /* 422D8 80066ED8 32020008 */ andi $v0, $s0, 0x8 .L80066EDC: /* 422DC 80066EDC 10400006 */ beqz $v0, .L80066EF8 /* 422E0 80066EE0 2404FFFB */ addiu $a0, $zero, -0x5 /* 422E4 80066EE4 3C028009 */ lui $v0, %hi(D_800959D4) /* 422E8 80066EE8 8C4259D4 */ lw $v0, %lo(D_800959D4)($v0) /* 422EC 80066EEC 8C43000C */ lw $v1, 0xC($v0) /* 422F0 80066EF0 00641824 */ and $v1, $v1, $a0 /* 422F4 80066EF4 AC43000C */ sw $v1, 0xC($v0) .L80066EF8: /* 422F8 80066EF8 32020010 */ andi $v0, $s0, 0x10 /* 422FC 80066EFC 10400007 */ beqz $v0, .L80066F1C /* 42300 80066F00 32020020 */ andi $v0, $s0, 0x20 /* 42304 80066F04 3C038009 */ lui $v1, %hi(D_800959D4) /* 42308 80066F08 8C6359D4 */ lw $v1, %lo(D_800959D4)($v1) /* 4230C 80066F0C 8C62000C */ lw $v0, 0xC($v1) /* 42310 80066F10 34420010 */ ori $v0, $v0, 0x10 /* 42314 80066F14 AC62000C */ sw $v0, 0xC($v1) /* 42318 80066F18 32020020 */ andi $v0, $s0, 0x20 .L80066F1C: /* 4231C 80066F1C 10400006 */ beqz $v0, .L80066F38 /* 42320 80066F20 2404FFEF */ addiu $a0, $zero, -0x11 /* 42324 80066F24 3C028009 */ lui $v0, %hi(D_800959D4) /* 42328 80066F28 8C4259D4 */ lw $v0, %lo(D_800959D4)($v0) /* 4232C 80066F2C 8C43000C */ lw $v1, 0xC($v0) /* 42330 80066F30 00641824 */ and $v1, $v1, $a0 /* 42334 80066F34 AC43000C */ sw $v1, 0xC($v0) .L80066F38: /* 42338 80066F38 32020040 */ andi $v0, $s0, 0x40 /* 4233C 80066F3C 10400008 */ beqz $v0, .L80066F60 /* 42340 80066F40 3C030001 */ lui $v1, (0x10000 >> 16) /* 42344 80066F44 3C048009 */ lui $a0, %hi(D_800959D4) /* 42348 80066F48 8C8459D4 */ lw $a0, %lo(D_800959D4)($a0) /* 4234C 80066F4C 8C82000C */ lw $v0, 0xC($a0) /* 42350 80066F50 00431025 */ or $v0, $v0, $v1 /* 42354 80066F54 2403FCFF */ addiu $v1, $zero, -0x301 /* 42358 80066F58 00431024 */ and $v0, $v0, $v1 /* 4235C 80066F5C AC82000C */ sw $v0, 0xC($a0) .L80066F60: /* 42360 80066F60 32020080 */ andi $v0, $s0, 0x80 /* 42364 80066F64 1040000C */ beqz $v0, .L80066F98 /* 42368 80066F68 3C02FFFE */ lui $v0, (0xFFFEFFFF >> 16) /* 4236C 80066F6C 3C048009 */ lui $a0, %hi(D_800959D4) /* 42370 80066F70 8C8459D4 */ lw $a0, %lo(D_800959D4)($a0) /* 42374 80066F74 8C83000C */ lw $v1, 0xC($a0) /* 42378 80066F78 8C850008 */ lw $a1, 0x8($a0) /* 4237C 80066F7C 3442FFFF */ ori $v0, $v0, (0xFFFEFFFF & 0xFFFF) /* 42380 80066F80 00621824 */ and $v1, $v1, $v0 /* 42384 80066F84 AC83000C */ sw $v1, 0xC($a0) /* 42388 80066F88 8CA20004 */ lw $v0, 0x4($a1) /* 4238C 80066F8C 30420300 */ andi $v0, $v0, 0x300 /* 42390 80066F90 00621825 */ or $v1, $v1, $v0 /* 42394 80066F94 AC83000C */ sw $v1, 0xC($a0) .L80066F98: /* 42398 80066F98 3C038009 */ lui $v1, %hi(D_800959D4) /* 4239C 80066F9C 8C6359D4 */ lw $v1, %lo(D_800959D4)($v1) /* 423A0 80066FA0 94620000 */ lhu $v0, 0x0($v1) /* 423A4 80066FA4 00C02021 */ addu $a0, $a2, $zero /* 423A8 80066FA8 34420008 */ ori $v0, $v0, 0x8 /* 423AC 80066FAC 0C01ACF4 */ jal __osRestoreInt /* 423B0 80066FB0 A4620000 */ sh $v0, 0x0($v1) /* 423B4 80066FB4 8FBF0014 */ lw $ra, 0x14($sp) /* 423B8 80066FB8 8FB00010 */ lw $s0, 0x10($sp) /* 423BC 80066FBC 03E00008 */ jr $ra /* 423C0 80066FC0 27BD0018 */ addiu $sp, $sp, 0x18 /* 423C4 80066FC4 00000000 */ nop /* 423C8 80066FC8 00000000 */ nop /* 423CC 80066FCC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: void osViSetSpecialFeatures(u32 func) { register u32 saveMask = __osDisableInt(); if ((func & OS_VI_GAMMA_ON) != 0) { __osViNext->control |= VI_CTRL_GAMMA_ON; } if ((func & OS_VI_GAMMA_OFF) != 0) { __osViNext->control &= ~VI_CTRL_GAMMA_ON; } if ((func & OS_VI_GAMMA_DITHER_ON) != 0) { __osViNext->control |= VI_CTRL_GAMMA_DITHER_ON; } if ((func & OS_VI_GAMMA_DITHER_OFF) != 0) { __osViNext->control &= ~VI_CTRL_GAMMA_DITHER_ON; } if ((func & OS_VI_DIVOT_ON) != 0) { __osViNext->control |= VI_CTRL_DIVOT_ON; } if ((func & OS_VI_DIVOT_OFF) != 0) { __osViNext->control &= ~VI_CTRL_DIVOT_ON; } if ((func & OS_VI_DITHER_FILTER_ON) != 0) { __osViNext->control |= VI_CTRL_DITHER_FILTER_ON; __osViNext->control &= ~VI_CTRL_ANTIALIAS_MASK; } if ((func & OS_VI_DITHER_FILTER_OFF) != 0) { __osViNext->control &= ~VI_CTRL_DITHER_FILTER_ON; __osViNext->control |= __osViNext->modep->comRegs.ctrl & VI_CTRL_ANTIALIAS_MASK; } __osViNext->state |= VI_STATE_CTRL_UPDATED; __osRestoreInt(saveMask); }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_model_animator_node /* B6934 80120234 27BDFFB8 */ addiu $sp, $sp, -0x48 /* B6938 80120238 AFB00030 */ sw $s0, 0x30($sp) /* B693C 8012023C 0080802D */ daddu $s0, $a0, $zero /* B6940 80120240 AFB10034 */ sw $s1, 0x34($sp) /* B6944 80120244 00A0882D */ daddu $s1, $a1, $zero /* B6948 80120248 AFB3003C */ sw $s3, 0x3C($sp) /* B694C 8012024C 00C0982D */ daddu $s3, $a2, $zero /* B6950 80120250 AFB20038 */ sw $s2, 0x38($sp) /* B6954 80120254 00E0902D */ daddu $s2, $a3, $zero /* B6958 80120258 27A60010 */ addiu $a2, $sp, 0x10 /* B695C 8012025C 1200004C */ beqz $s0, .L80120390 /* B6960 80120260 AFBF0040 */ sw $ra, 0x40($sp) /* B6964 80120264 8E020000 */ lw $v0, 0x0($s0) /* B6968 80120268 AFA00014 */ sw $zero, 0x14($sp) /* B696C 8012026C AFA00018 */ sw $zero, 0x18($sp) /* B6970 80120270 AFA0001C */ sw $zero, 0x1C($sp) /* B6974 80120274 AFA20010 */ sw $v0, 0x10($sp) /* B6978 80120278 86020004 */ lh $v0, 0x4($s0) /* B697C 8012027C 3C018015 */ lui $at, %hi(D_80150010) /* B6980 80120280 D4220010 */ ldc1 $f2, %lo(D_80150010)($at) /* B6984 80120284 44820000 */ mtc1 $v0, $f0 /* B6988 80120288 00000000 */ nop /* B698C 8012028C 46800020 */ cvt.s.w $f0, $f0 /* B6990 80120290 46000021 */ cvt.d.s $f0, $f0 /* B6994 80120294 46220002 */ mul.d $f0, $f0, $f2 /* B6998 80120298 00000000 */ nop /* B699C 8012029C 3C018015 */ lui $at, %hi(D_80150018) /* B69A0 801202A0 D4240018 */ ldc1 $f4, %lo(D_80150018)($at) /* B69A4 801202A4 46240003 */ div.d $f0, $f0, $f4 /* B69A8 801202A8 46200020 */ cvt.s.d $f0, $f0 /* B69AC 801202AC E7A00020 */ swc1 $f0, 0x20($sp) /* B69B0 801202B0 86020006 */ lh $v0, 0x6($s0) /* B69B4 801202B4 44820000 */ mtc1 $v0, $f0 /* B69B8 801202B8 00000000 */ nop /* B69BC 801202BC 46800020 */ cvt.s.w $f0, $f0 /* B69C0 801202C0 46000021 */ cvt.d.s $f0, $f0 /* B69C4 801202C4 46220002 */ mul.d $f0, $f0, $f2 /* B69C8 801202C8 00000000 */ nop /* B69CC 801202CC 46240003 */ div.d $f0, $f0, $f4 /* B69D0 801202D0 46200020 */ cvt.s.d $f0, $f0 /* B69D4 801202D4 E7A00024 */ swc1 $f0, 0x24($sp) /* B69D8 801202D8 86020008 */ lh $v0, 0x8($s0) /* B69DC 801202DC 44820000 */ mtc1 $v0, $f0 /* B69E0 801202E0 00000000 */ nop /* B69E4 801202E4 46800020 */ cvt.s.w $f0, $f0 /* B69E8 801202E8 46000021 */ cvt.d.s $f0, $f0 /* B69EC 801202EC 46220002 */ mul.d $f0, $f0, $f2 /* B69F0 801202F0 00000000 */ nop /* B69F4 801202F4 0220202D */ daddu $a0, $s1, $zero /* B69F8 801202F8 0260282D */ daddu $a1, $s3, $zero /* B69FC 801202FC 46240003 */ div.d $f0, $f0, $f4 /* B6A00 80120300 46200020 */ cvt.s.d $f0, $f0 /* B6A04 80120304 0C0479C6 */ jal add_anim_node /* B6A08 80120308 E7A00028 */ swc1 $f0, 0x28($sp) /* B6A0C 8012030C 86030028 */ lh $v1, 0x28($s0) /* B6A10 80120310 10600006 */ beqz $v1, .L8012032C /* B6A14 80120314 0040302D */ daddu $a2, $v0, $zero /* B6A18 80120318 94C200F4 */ lhu $v0, 0xF4($a2) /* B6A1C 8012031C 2463FFFF */ addiu $v1, $v1, -0x1 /* B6A20 80120320 ACC300FC */ sw $v1, 0xFC($a2) /* B6A24 80120324 34421000 */ ori $v0, $v0, 0x1000 /* B6A28 80120328 A4C200F4 */ sh $v0, 0xF4($a2) .L8012032C: /* B6A2C 8012032C 3C038015 */ lui $v1, %hi(gAnimTreeRoot) /* B6A30 80120330 8C633B68 */ lw $v1, %lo(gAnimTreeRoot)($v1) /* B6A34 80120334 8C620000 */ lw $v0, 0x0($v1) /* B6A38 80120338 10500005 */ beq $v0, $s0, .L80120350 /* B6A3C 8012033C 0000202D */ daddu $a0, $zero, $zero .L80120340: /* B6A40 80120340 24630004 */ addiu $v1, $v1, 0x4 /* B6A44 80120344 8C620000 */ lw $v0, 0x0($v1) /* B6A48 80120348 1450FFFD */ bne $v0, $s0, .L80120340 /* B6A4C 8012034C 24840001 */ addiu $a0, $a0, 0x1 .L80120350: /* B6A50 80120350 00041080 */ sll $v0, $a0, 2 /* B6A54 80120354 84C300F6 */ lh $v1, 0xF6($a2) /* B6A58 80120358 00521021 */ addu $v0, $v0, $s2 /* B6A5C 8012035C AC430000 */ sw $v1, 0x0($v0) /* B6A60 80120360 8E04001C */ lw $a0, 0x1C($s0) /* B6A64 80120364 10800004 */ beqz $a0, .L80120378 /* B6A68 80120368 0220282D */ daddu $a1, $s1, $zero /* B6A6C 8012036C 84C600F6 */ lh $a2, 0xF6($a2) /* B6A70 80120370 0C04808D */ jal load_model_animator_node /* B6A74 80120374 0240382D */ daddu $a3, $s2, $zero .L80120378: /* B6A78 80120378 8E040018 */ lw $a0, 0x18($s0) /* B6A7C 8012037C 10800004 */ beqz $a0, .L80120390 /* B6A80 80120380 0220282D */ daddu $a1, $s1, $zero /* B6A84 80120384 0260302D */ daddu $a2, $s3, $zero /* B6A88 80120388 0C04808D */ jal load_model_animator_node /* B6A8C 8012038C 0240382D */ daddu $a3, $s2, $zero .L80120390: /* B6A90 80120390 8FBF0040 */ lw $ra, 0x40($sp) /* B6A94 80120394 8FB3003C */ lw $s3, 0x3C($sp) /* B6A98 80120398 8FB20038 */ lw $s2, 0x38($sp) /* B6A9C 8012039C 8FB10034 */ lw $s1, 0x34($sp) /* B6AA0 801203A0 8FB00030 */ lw $s0, 0x30($sp) /* B6AA4 801203A4 03E00008 */ jr $ra /* B6AA8 801203A8 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: void load_model_animator_node(StaticAnimatorNode* node, ModelAnimator* animator, s32 parentNodeID, s32* treeIndexToNodeIDs) { AnimatorNodeBlueprint bp; AnimatorNodeBlueprint* bpPtr = &bp; AnimatorNode* newNode; s32 i; if (node != NULL) { bpPtr->displayList = node->displayList; bpPtr->basePos.x = 0.0f; bpPtr->basePos.y = 0.0f; bpPtr->basePos.z = 0.0f; bpPtr->rotation.x = ((f32) node->rot.x * 180.0) / 32767.0; bpPtr->rotation.y = ((f32) node->rot.y * 180.0) / 32767.0; bpPtr->rotation.z = ((f32) node->rot.z * 180.0) / 32767.0; newNode = add_anim_node(animator, parentNodeID, bpPtr); if (node->modelID != 0) { newNode->fcData.modelID = node->modelID - 1; newNode->flags |= MODEL_ANIMATOR_FLAG_HAS_MODEL; } i = 0; while (gAnimTreeRoot[i] != node) { i++; } treeIndexToNodeIDs[i] = newNode->uniqueIndex; if (node->child != NULL) { load_model_animator_node(node->child, animator, newNode->uniqueIndex, treeIndexToNodeIDs); } if (node->sibling != NULL) { load_model_animator_node(node->sibling, animator, parentNodeID, treeIndexToNodeIDs); } } }
### RAW ASSEMBLY INSTRUCTIONS: glabel UseSettingsFrom /* F0210 802CB860 27BDFF88 */ addiu $sp, $sp, -0x78 /* F0214 802CB864 AFB1005C */ sw $s1, 0x5C($sp) /* F0218 802CB868 0080882D */ daddu $s1, $a0, $zero /* F021C 802CB86C AFBF0064 */ sw $ra, 0x64($sp) /* F0220 802CB870 AFB20060 */ sw $s2, 0x60($sp) /* F0224 802CB874 AFB00058 */ sw $s0, 0x58($sp) /* F0228 802CB878 F7B60070 */ sdc1 $f22, 0x70($sp) /* F022C 802CB87C F7B40068 */ sdc1 $f20, 0x68($sp) /* F0230 802CB880 8E30000C */ lw $s0, 0xC($s1) /* F0234 802CB884 8E050000 */ lw $a1, 0x0($s0) /* F0238 802CB888 0C0B1EAF */ jal evt_get_variable /* F023C 802CB88C 26100004 */ addiu $s0, $s0, 0x4 /* F0240 802CB890 8E050000 */ lw $a1, 0x0($s0) /* F0244 802CB894 26100004 */ addiu $s0, $s0, 0x4 /* F0248 802CB898 0220202D */ daddu $a0, $s1, $zero /* F024C 802CB89C 3C06800B */ lui $a2, %hi(gCameras) /* F0250 802CB8A0 24C61D80 */ addiu $a2, $a2, %lo(gCameras) /* F0254 802CB8A4 00021880 */ sll $v1, $v0, 2 /* F0258 802CB8A8 00621821 */ addu $v1, $v1, $v0 /* F025C 802CB8AC 00031880 */ sll $v1, $v1, 2 /* F0260 802CB8B0 00621823 */ subu $v1, $v1, $v0 /* F0264 802CB8B4 000310C0 */ sll $v0, $v1, 3 /* F0268 802CB8B8 00621821 */ addu $v1, $v1, $v0 /* F026C 802CB8BC 000318C0 */ sll $v1, $v1, 3 /* F0270 802CB8C0 0C0B210B */ jal evt_get_float_variable /* F0274 802CB8C4 00669021 */ addu $s2, $v1, $a2 /* F0278 802CB8C8 8E050000 */ lw $a1, 0x0($s0) /* F027C 802CB8CC 26100004 */ addiu $s0, $s0, 0x4 /* F0280 802CB8D0 0220202D */ daddu $a0, $s1, $zero /* F0284 802CB8D4 0C0B210B */ jal evt_get_float_variable /* F0288 802CB8D8 46000586 */ mov.s $f22, $f0 /* F028C 802CB8DC 0220202D */ daddu $a0, $s1, $zero /* F0290 802CB8E0 8E050000 */ lw $a1, 0x0($s0) /* F0294 802CB8E4 0C0B210B */ jal evt_get_float_variable /* F0298 802CB8E8 46000506 */ mov.s $f20, $f0 /* F029C 802CB8EC 27A20038 */ addiu $v0, $sp, 0x38 /* F02A0 802CB8F0 3C0146FF */ lui $at, (0x46FFFE00 >> 16) /* F02A4 802CB8F4 3421FE00 */ ori $at, $at, (0x46FFFE00 & 0xFFFF) /* F02A8 802CB8F8 44812000 */ mtc1 $at, $f4 /* F02AC 802CB8FC 44803000 */ mtc1 $zero, $f6 /* F02B0 802CB900 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* F02B4 802CB904 44811000 */ mtc1 $at, $f2 /* F02B8 802CB908 3C014120 */ lui $at, (0x41200000 >> 16) /* F02BC 802CB90C 44817000 */ mtc1 $at, $f14 /* F02C0 802CB910 44060000 */ mfc1 $a2, $f0 /* F02C4 802CB914 4600B306 */ mov.s $f12, $f22 /* F02C8 802CB918 E7A40044 */ swc1 $f4, 0x44($sp) /* F02CC 802CB91C AFA20018 */ sw $v0, 0x18($sp) /* F02D0 802CB920 27A2003C */ addiu $v0, $sp, 0x3C /* F02D4 802CB924 AFA2001C */ sw $v0, 0x1C($sp) /* F02D8 802CB928 27A20040 */ addiu $v0, $sp, 0x40 /* F02DC 802CB92C AFA20020 */ sw $v0, 0x20($sp) /* F02E0 802CB930 27A20044 */ addiu $v0, $sp, 0x44 /* F02E4 802CB934 AFA20024 */ sw $v0, 0x24($sp) /* F02E8 802CB938 27A20048 */ addiu $v0, $sp, 0x48 /* F02EC 802CB93C AFA20028 */ sw $v0, 0x28($sp) /* F02F0 802CB940 27A2004C */ addiu $v0, $sp, 0x4C /* F02F4 802CB944 AFA2002C */ sw $v0, 0x2C($sp) /* F02F8 802CB948 27A20050 */ addiu $v0, $sp, 0x50 /* F02FC 802CB94C 44073000 */ mfc1 $a3, $f6 /* F0300 802CB950 460EA380 */ add.s $f14, $f20, $f14 /* F0304 802CB954 E7A20010 */ swc1 $f2, 0x10($sp) /* F0308 802CB958 E7A60014 */ swc1 $f6, 0x14($sp) /* F030C 802CB95C 0C017449 */ jal test_ray_zones /* F0310 802CB960 AFA20030 */ sw $v0, 0x30($sp) /* F0314 802CB964 0040182D */ daddu $v1, $v0, $zero /* F0318 802CB968 0460001A */ bltz $v1, .L802CB9D4 /* F031C 802CB96C 000310C0 */ sll $v0, $v1, 3 /* F0320 802CB970 00431023 */ subu $v0, $v0, $v1 /* F0324 802CB974 3C03800E */ lui $v1, %hi(D_800D91D4) /* F0328 802CB978 8C6391D4 */ lw $v1, %lo(D_800D91D4)($v1) /* F032C 802CB97C 00021080 */ sll $v0, $v0, 2 /* F0330 802CB980 00431021 */ addu $v0, $v0, $v1 /* F0334 802CB984 8C420010 */ lw $v0, 0x10($v0) /* F0338 802CB988 264304D8 */ addiu $v1, $s2, 0x4D8 /* F033C 802CB98C 24440020 */ addiu $a0, $v0, 0x20 .L802CB990: /* F0340 802CB990 8C480000 */ lw $t0, 0x0($v0) /* F0344 802CB994 8C490004 */ lw $t1, 0x4($v0) /* F0348 802CB998 8C4A0008 */ lw $t2, 0x8($v0) /* F034C 802CB99C 8C4B000C */ lw $t3, 0xC($v0) /* F0350 802CB9A0 AC680000 */ sw $t0, 0x0($v1) /* F0354 802CB9A4 AC690004 */ sw $t1, 0x4($v1) /* F0358 802CB9A8 AC6A0008 */ sw $t2, 0x8($v1) /* F035C 802CB9AC AC6B000C */ sw $t3, 0xC($v1) /* F0360 802CB9B0 24420010 */ addiu $v0, $v0, 0x10 /* F0364 802CB9B4 1444FFF6 */ bne $v0, $a0, .L802CB990 /* F0368 802CB9B8 24630010 */ addiu $v1, $v1, 0x10 /* F036C 802CB9BC 8C480000 */ lw $t0, 0x0($v0) /* F0370 802CB9C0 8C490004 */ lw $t1, 0x4($v0) /* F0374 802CB9C4 8C4A0008 */ lw $t2, 0x8($v0) /* F0378 802CB9C8 AC680000 */ sw $t0, 0x0($v1) /* F037C 802CB9CC AC690004 */ sw $t1, 0x4($v1) /* F0380 802CB9D0 AC6A0008 */ sw $t2, 0x8($v1) .L802CB9D4: /* F0384 802CB9D4 8FBF0064 */ lw $ra, 0x64($sp) /* F0388 802CB9D8 8FB20060 */ lw $s2, 0x60($sp) /* F038C 802CB9DC 8FB1005C */ lw $s1, 0x5C($sp) /* F0390 802CB9E0 8FB00058 */ lw $s0, 0x58($sp) /* F0394 802CB9E4 D7B60070 */ ldc1 $f22, 0x70($sp) /* F0398 802CB9E8 D7B40068 */ ldc1 $f20, 0x68($sp) /* F039C 802CB9EC 24020002 */ addiu $v0, $zero, 0x2 /* F03A0 802CB9F0 03E00008 */ jr $ra /* F03A4 802CB9F4 27BD0078 */ addiu $sp, $sp, 0x78 ### DECOMPILED C INSTRUCTIONS: ApiStatus UseSettingsFrom(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; s32 id = evt_get_variable(script, *args++); Camera* camera = &gCameras[id]; f32 startX = evt_get_float_variable(script, *args++); f32 startY = evt_get_float_variable(script, *args++); f32 startZ = evt_get_float_variable(script, *args++); f32 hitX, hitY, hitZ; f32 hitDepth = 32767.0f; f32 nx, ny, nz; s32 hitID = test_ray_zones(startX, startY + 10.0f, startZ, 0.0f, -1.0f, 0.0f, &hitX, &hitY, &hitZ, &hitDepth, &nx, &ny, &nz); if (hitID >= 0) { camera->controlSettings = *gZoneCollisionData.colliderList[hitID].camSettings; } return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel peach_disguise_check_overlaps /* 7FB74 800E66C4 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 7FB78 800E66C8 AFB20040 */ sw $s2, 0x40($sp) /* 7FB7C 800E66CC 3C128011 */ lui $s2, %hi(gPlayerStatus) /* 7FB80 800E66D0 2652EFC8 */ addiu $s2, $s2, %lo(gPlayerStatus) /* 7FB84 800E66D4 3C04800B */ lui $a0, %hi(gCameras) /* 7FB88 800E66D8 24841D80 */ addiu $a0, $a0, %lo(gCameras) /* 7FB8C 800E66DC AFBF0048 */ sw $ra, 0x48($sp) /* 7FB90 800E66E0 AFB30044 */ sw $s3, 0x44($sp) /* 7FB94 800E66E4 AFB1003C */ sw $s1, 0x3C($sp) /* 7FB98 800E66E8 AFB00038 */ sw $s0, 0x38($sp) /* 7FB9C 800E66EC F7B60058 */ sdc1 $f22, 0x58($sp) /* 7FBA0 800E66F0 F7B40050 */ sdc1 $f20, 0x50($sp) /* 7FBA4 800E66F4 C64400A8 */ lwc1 $f4, 0xA8($s2) /* 7FBA8 800E66F8 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 7FBAC 800E66FC 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 7FBB0 800E6700 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7FBB4 800E6704 44810000 */ mtc1 $at, $f0 /* 7FBB8 800E6708 00031080 */ sll $v0, $v1, 2 /* 7FBBC 800E670C 00431021 */ addu $v0, $v0, $v1 /* 7FBC0 800E6710 00021080 */ sll $v0, $v0, 2 /* 7FBC4 800E6714 00431023 */ subu $v0, $v0, $v1 /* 7FBC8 800E6718 000218C0 */ sll $v1, $v0, 3 /* 7FBCC 800E671C 00431021 */ addu $v0, $v0, $v1 /* 7FBD0 800E6720 000210C0 */ sll $v0, $v0, 3 /* 7FBD4 800E6724 4604003E */ c.le.s $f0, $f4 /* 7FBD8 800E6728 00000000 */ nop /* 7FBDC 800E672C 4500000B */ bc1f .L800E675C /* 7FBE0 800E6730 00441021 */ addu $v0, $v0, $a0 /* 7FBE4 800E6734 3C014387 */ lui $at, (0x43870000 >> 16) /* 7FBE8 800E6738 44811000 */ mtc1 $at, $f2 /* 7FBEC 800E673C 00000000 */ nop /* 7FBF0 800E6740 4602203C */ c.lt.s $f4, $f2 /* 7FBF4 800E6744 00000000 */ nop /* 7FBF8 800E6748 45000004 */ bc1f .L800E675C /* 7FBFC 800E674C 00000000 */ nop /* 7FC00 800E6750 C440006C */ lwc1 $f0, 0x6C($v0) /* 7FC04 800E6754 080399DC */ j .L800E6770 /* 7FC08 800E6758 46020501 */ sub.s $f20, $f0, $f2 .L800E675C: /* 7FC0C 800E675C C442006C */ lwc1 $f2, 0x6C($v0) /* 7FC10 800E6760 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7FC14 800E6764 44810000 */ mtc1 $at, $f0 /* 7FC18 800E6768 00000000 */ nop /* 7FC1C 800E676C 46001501 */ sub.s $f20, $f2, $f0 .L800E6770: /* 7FC20 800E6770 0C00A6C9 */ jal clamp_angle /* 7FC24 800E6774 4600A306 */ mov.s $f12, $f20 /* 7FC28 800E6778 27A50020 */ addiu $a1, $sp, 0x20 /* 7FC2C 800E677C 27A60024 */ addiu $a2, $sp, 0x24 /* 7FC30 800E6780 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 7FC34 800E6784 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 7FC38 800E6788 44811000 */ mtc1 $at, $f2 /* 7FC3C 800E678C 24110002 */ addiu $s1, $zero, 0x2 /* 7FC40 800E6790 46020002 */ mul.s $f0, $f0, $f2 /* 7FC44 800E6794 00000000 */ nop /* 7FC48 800E6798 0220802D */ daddu $s0, $s1, $zero /* 7FC4C 800E679C 27B30030 */ addiu $s3, $sp, 0x30 /* 7FC50 800E67A0 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 7FC54 800E67A4 44816000 */ mtc1 $at, $f12 /* 7FC58 800E67A8 3C014080 */ lui $at, (0x40800000 >> 16) /* 7FC5C 800E67AC 4481B000 */ mtc1 $at, $f22 /* 7FC60 800E67B0 0C00A82D */ jal sin_cos_rad /* 7FC64 800E67B4 460C0303 */ div.s $f12, $f0, $f12 .L800E67B8: /* 7FC68 800E67B8 C7A00020 */ lwc1 $f0, 0x20($sp) /* 7FC6C 800E67BC 44911000 */ mtc1 $s1, $f2 /* 7FC70 800E67C0 00000000 */ nop /* 7FC74 800E67C4 468010A0 */ cvt.s.w $f2, $f2 /* 7FC78 800E67C8 46020002 */ mul.s $f0, $f0, $f2 /* 7FC7C 800E67CC 00000000 */ nop /* 7FC80 800E67D0 C7A40024 */ lwc1 $f4, 0x24($sp) /* 7FC84 800E67D4 46022102 */ mul.s $f4, $f4, $f2 /* 7FC88 800E67D8 00000000 */ nop /* 7FC8C 800E67DC 0240282D */ daddu $a1, $s2, $zero /* 7FC90 800E67E0 C642002C */ lwc1 $f2, 0x2C($s2) /* 7FC94 800E67E4 27A60028 */ addiu $a2, $sp, 0x28 /* 7FC98 800E67E8 46161080 */ add.s $f2, $f2, $f22 /* 7FC9C 800E67EC C6460028 */ lwc1 $f6, 0x28($s2) /* 7FCA0 800E67F0 24040003 */ addiu $a0, $zero, 0x3 /* 7FCA4 800E67F4 46003180 */ add.s $f6, $f6, $f0 /* 7FCA8 800E67F8 C6400030 */ lwc1 $f0, 0x30($s2) /* 7FCAC 800E67FC 27A7002C */ addiu $a3, $sp, 0x2C /* 7FCB0 800E6800 46040001 */ sub.s $f0, $f0, $f4 /* 7FCB4 800E6804 E7A2002C */ swc1 $f2, 0x2C($sp) /* 7FCB8 800E6808 E7A60028 */ swc1 $f6, 0x28($sp) /* 7FCBC 800E680C E7A00030 */ swc1 $f0, 0x30($sp) /* 7FCC0 800E6810 AFB30010 */ sw $s3, 0x10($sp) /* 7FCC4 800E6814 E7B60014 */ swc1 $f22, 0x14($sp) /* 7FCC8 800E6818 0C037B01 */ jal player_test_lateral_overlap /* 7FCCC 800E681C E7B40018 */ swc1 $f20, 0x18($sp) /* 7FCD0 800E6820 04410003 */ bgez $v0, .L800E6830 /* 7FCD4 800E6824 2610FFFF */ addiu $s0, $s0, -0x1 /* 7FCD8 800E6828 1E00FFE3 */ bgtz $s0, .L800E67B8 /* 7FCDC 800E682C 26310012 */ addiu $s1, $s1, 0x12 .L800E6830: /* 7FCE0 800E6830 8FBF0048 */ lw $ra, 0x48($sp) /* 7FCE4 800E6834 8FB30044 */ lw $s3, 0x44($sp) /* 7FCE8 800E6838 8FB20040 */ lw $s2, 0x40($sp) /* 7FCEC 800E683C 8FB1003C */ lw $s1, 0x3C($sp) /* 7FCF0 800E6840 8FB00038 */ lw $s0, 0x38($sp) /* 7FCF4 800E6844 D7B60058 */ ldc1 $f22, 0x58($sp) /* 7FCF8 800E6848 D7B40050 */ ldc1 $f20, 0x50($sp) /* 7FCFC 800E684C 03E00008 */ jr $ra /* 7FD00 800E6850 27BD0060 */ addiu $sp, $sp, 0x60 /* 7FD04 800E6854 00000000 */ nop /* 7FD08 800E6858 00000000 */ nop /* 7FD0C 800E685C 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: s32 peach_disguise_check_overlaps(void) { PlayerStatus* playerStatus = &gPlayerStatus; Camera* camera = &gCameras[gCurrentCameraID]; f32 yaw, dx, dy; s32 radius; s32 hitID; s32 i; if (playerStatus->spriteFacingAngle >= 90.0f && playerStatus->spriteFacingAngle < 270.0f) { yaw = camera->currentYaw - 270.0f; } else { yaw = camera->currentYaw - 90.0f; } sin_cos_rad(DEG_TO_RAD(clamp_angle(yaw)), &dx, &dy); for (radius = 2, i = 2; i > 0; radius += 18, i--) { f32 x = playerStatus->position.x + (dx * radius); f32 y = playerStatus->position.y + 4.0f; f32 z = playerStatus->position.z - (dy * radius); hitID = player_test_lateral_overlap(3, playerStatus, &x, &y, &z, 4.0f, yaw); if (hitID >= 0) { break; } } return hitID; }
### RAW ASSEMBLY INSTRUCTIONS: glabel test_item_entity_position /* CA6C8 80133FC8 27BDFFB8 */ addiu $sp, $sp, -0x48 /* CA6CC 80133FCC F7B80038 */ sdc1 $f24, 0x38($sp) /* CA6D0 80133FD0 4486C000 */ mtc1 $a2, $f24 /* CA6D4 80133FD4 F7BA0040 */ sdc1 $f26, 0x40($sp) /* CA6D8 80133FD8 4487D000 */ mtc1 $a3, $f26 /* CA6DC 80133FDC F7B40028 */ sdc1 $f20, 0x28($sp) /* CA6E0 80133FE0 46006506 */ mov.s $f20, $f12 /* CA6E4 80133FE4 F7B60030 */ sdc1 $f22, 0x30($sp) /* CA6E8 80133FE8 46007586 */ mov.s $f22, $f14 /* CA6EC 80133FEC AFBF0020 */ sw $ra, 0x20($sp) /* CA6F0 80133FF0 AFB3001C */ sw $s3, 0x1C($sp) /* CA6F4 80133FF4 AFB20018 */ sw $s2, 0x18($sp) /* CA6F8 80133FF8 AFB10014 */ sw $s1, 0x14($sp) /* CA6FC 80133FFC 0C011052 */ jal is_starting_conversation /* CA700 80134000 AFB00010 */ sw $s0, 0x10($sp) /* CA704 80134004 14400045 */ bnez $v0, .L8013411C /* CA708 80134008 2402FFFF */ addiu $v0, $zero, -0x1 /* CA70C 8013400C 3C028015 */ lui $v0, %hi(isPickingUpItem) /* CA710 80134010 844265A4 */ lh $v0, %lo(isPickingUpItem)($v0) /* CA714 80134014 14400041 */ bnez $v0, .L8013411C /* CA718 80134018 2402FFFF */ addiu $v0, $zero, -0x1 /* CA71C 8013401C 0C009C64 */ jal get_time_freeze_mode /* CA720 80134020 00000000 */ nop /* CA724 80134024 1440003D */ bnez $v0, .L8013411C /* CA728 80134028 2402FFFF */ addiu $v0, $zero, -0x1 /* CA72C 8013402C 3C02800A */ lui $v0, %hi(gOverrideFlags) /* CA730 80134030 8C42A650 */ lw $v0, %lo(gOverrideFlags)($v0) /* CA734 80134034 3C030020 */ lui $v1, (0x200000 >> 16) /* CA738 80134038 00431024 */ and $v0, $v0, $v1 /* CA73C 8013403C 14400037 */ bnez $v0, .L8013411C /* CA740 80134040 2402FFFF */ addiu $v0, $zero, -0x1 /* CA744 80134044 0000802D */ daddu $s0, $zero, $zero /* CA748 80134048 24130001 */ addiu $s3, $zero, 0x1 /* CA74C 8013404C 24120002 */ addiu $s2, $zero, 0x2 /* CA750 80134050 3C110020 */ lui $s1, (0x200000 >> 16) .L80134054: /* CA754 80134054 3C038015 */ lui $v1, %hi(gCurrentItemEntities) /* CA758 80134058 8C6365A0 */ lw $v1, %lo(gCurrentItemEntities)($v1) /* CA75C 8013405C 00101080 */ sll $v0, $s0, 2 /* CA760 80134060 00431021 */ addu $v0, $v0, $v1 /* CA764 80134064 8C440000 */ lw $a0, 0x0($v0) /* CA768 80134068 50800029 */ beql $a0, $zero, .L80134110 /* CA76C 8013406C 26100001 */ addiu $s0, $s0, 0x1 /* CA770 80134070 8C830000 */ lw $v1, 0x0($a0) /* CA774 80134074 50600026 */ beql $v1, $zero, .L80134110 /* CA778 80134078 26100001 */ addiu $s0, $s0, 0x1 /* CA77C 8013407C 8082001B */ lb $v0, 0x1B($a0) /* CA780 80134080 50530023 */ beql $v0, $s3, .L80134110 /* CA784 80134084 26100001 */ addiu $s0, $s0, 0x1 /* CA788 80134088 50520021 */ beql $v0, $s2, .L80134110 /* CA78C 8013408C 26100001 */ addiu $s0, $s0, 0x1 /* CA790 80134090 30620040 */ andi $v0, $v1, 0x40 /* CA794 80134094 5440001E */ bnel $v0, $zero, .L80134110 /* CA798 80134098 26100001 */ addiu $s0, $s0, 0x1 /* CA79C 8013409C 00711024 */ and $v0, $v1, $s1 /* CA7A0 801340A0 5440001B */ bnel $v0, $zero, .L80134110 /* CA7A4 801340A4 26100001 */ addiu $s0, $s0, 0x1 /* CA7A8 801340A8 C4800008 */ lwc1 $f0, 0x8($a0) /* CA7AC 801340AC 46140001 */ sub.s $f0, $f0, $f20 /* CA7B0 801340B0 46000002 */ mul.s $f0, $f0, $f0 /* CA7B4 801340B4 00000000 */ nop /* CA7B8 801340B8 C484000C */ lwc1 $f4, 0xC($a0) /* CA7BC 801340BC 46162101 */ sub.s $f4, $f4, $f22 /* CA7C0 801340C0 46042102 */ mul.s $f4, $f4, $f4 /* CA7C4 801340C4 00000000 */ nop /* CA7C8 801340C8 C4820010 */ lwc1 $f2, 0x10($a0) /* CA7CC 801340CC 46181081 */ sub.s $f2, $f2, $f24 /* CA7D0 801340D0 46021082 */ mul.s $f2, $f2, $f2 /* CA7D4 801340D4 00000000 */ nop /* CA7D8 801340D8 46040000 */ add.s $f0, $f0, $f4 /* CA7DC 801340DC 46020300 */ add.s $f12, $f0, $f2 /* CA7E0 801340E0 46006004 */ sqrt.s $f0, $f12 /* CA7E4 801340E4 46000032 */ c.eq.s $f0, $f0 /* CA7E8 801340E8 00000000 */ nop /* CA7EC 801340EC 45010003 */ bc1t .L801340FC /* CA7F0 801340F0 00000000 */ nop /* CA7F4 801340F4 0C0187BC */ jal sqrtf /* CA7F8 801340F8 00000000 */ nop .L801340FC: /* CA7FC 801340FC 461A003C */ c.lt.s $f0, $f26 /* CA800 80134100 00000000 */ nop /* CA804 80134104 45010005 */ bc1t .L8013411C /* CA808 80134108 0200102D */ daddu $v0, $s0, $zero /* CA80C 8013410C 26100001 */ addiu $s0, $s0, 0x1 .L80134110: /* CA810 80134110 2A020100 */ slti $v0, $s0, 0x100 /* CA814 80134114 1440FFCF */ bnez $v0, .L80134054 /* CA818 80134118 2402FFFF */ addiu $v0, $zero, -0x1 .L8013411C: /* CA81C 8013411C 8FBF0020 */ lw $ra, 0x20($sp) /* CA820 80134120 8FB3001C */ lw $s3, 0x1C($sp) /* CA824 80134124 8FB20018 */ lw $s2, 0x18($sp) /* CA828 80134128 8FB10014 */ lw $s1, 0x14($sp) /* CA82C 8013412C 8FB00010 */ lw $s0, 0x10($sp) /* CA830 80134130 D7BA0040 */ ldc1 $f26, 0x40($sp) /* CA834 80134134 D7B80038 */ ldc1 $f24, 0x38($sp) /* CA838 80134138 D7B60030 */ ldc1 $f22, 0x30($sp) /* CA83C 8013413C D7B40028 */ ldc1 $f20, 0x28($sp) /* CA840 80134140 03E00008 */ jr $ra /* CA844 80134144 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 test_item_entity_position(f32 x, f32 y, f32 z, f32 dist) { ItemEntity* item; f32 dx, dy, dz; s32 i; if (is_starting_conversation() || isPickingUpItem || get_time_freeze_mode() != 0 || gOverrideFlags & GLOBAL_OVERRIDES_CANT_PICK_UP_ITEMS) { return -1; } for (i = 0; i < MAX_ITEM_ENTITIES; i++){ item = gCurrentItemEntities[i]; if (item == NULL) { continue; } if (item->flags == 0) { continue; } if (item->spawnType == ITEM_SPAWN_MODE_DECORATION) { continue; } if (item->spawnType == ITEM_SPAWN_MODE_INVISIBLE) { continue; } if (item->flags & ITEM_ENTITY_FLAG_HIDDEN) { continue; } if (item->flags & ITEM_ENTITY_FLAG_CANT_COLLECT) { continue; } dx = item->position.x - x; dz = item->position.y - y; dy = item->position.z - z; if (sqrtf(SQ(dx) + SQ(dz) + SQ(dy)) < dist) { return i; } } return -1; }
### RAW ASSEMBLY INSTRUCTIONS: glabel floating_rock_main /* 395BB0 E0098000 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 395BB4 E0098004 F7B40038 */ sdc1 $f20, 0x38($sp) /* 395BB8 E0098008 4485A000 */ mtc1 $a1, $f20 /* 395BBC E009800C F7B60040 */ sdc1 $f22, 0x40($sp) /* 395BC0 E0098010 4486B000 */ mtc1 $a2, $f22 /* 395BC4 E0098014 AFB20030 */ sw $s2, 0x30($sp) /* 395BC8 E0098018 0080902D */ daddu $s2, $a0, $zero /* 395BCC E009801C F7B80048 */ sdc1 $f24, 0x48($sp) /* 395BD0 E0098020 4487C000 */ mtc1 $a3, $f24 /* 395BD4 E0098024 27A40010 */ addiu $a0, $sp, 0x10 /* 395BD8 E0098028 F7BA0050 */ sdc1 $f26, 0x50($sp) /* 395BDC E009802C C7BA0074 */ lwc1 $f26, 0x74($sp) /* 395BE0 E0098030 3C02E00A */ lui $v0, %hi(floating_rock_init) /* 395BE4 E0098034 24428168 */ addiu $v0, $v0, %lo(floating_rock_init) /* 395BE8 E0098038 AFA20018 */ sw $v0, 0x18($sp) /* 395BEC E009803C 3C02E00A */ lui $v0, %hi(floating_rock_update) /* 395BF0 E0098040 24428170 */ addiu $v0, $v0, %lo(floating_rock_update) /* 395BF4 E0098044 AFA2001C */ sw $v0, 0x1C($sp) /* 395BF8 E0098048 3C02E00A */ lui $v0, %hi(floating_rock_render) /* 395BFC E009804C 2442829C */ addiu $v0, $v0, %lo(floating_rock_render) /* 395C00 E0098050 AFA20020 */ sw $v0, 0x20($sp) /* 395C04 E0098054 2402004C */ addiu $v0, $zero, 0x4C /* 395C08 E0098058 AFBF0034 */ sw $ra, 0x34($sp) /* 395C0C E009805C AFB1002C */ sw $s1, 0x2C($sp) /* 395C10 E0098060 AFB00028 */ sw $s0, 0x28($sp) /* 395C14 E0098064 AFA00010 */ sw $zero, 0x10($sp) /* 395C18 E0098068 AFA00024 */ sw $zero, 0x24($sp) /* 395C1C E009806C 0C080124 */ jal shim_create_effect_instance /* 395C20 E0098070 AFA20014 */ sw $v0, 0x14($sp) /* 395C24 E0098074 24040050 */ addiu $a0, $zero, 0x50 /* 395C28 E0098078 24030001 */ addiu $v1, $zero, 0x1 /* 395C2C E009807C 0040882D */ daddu $s1, $v0, $zero /* 395C30 E0098080 0C08012C */ jal shim_general_heap_malloc /* 395C34 E0098084 AE230008 */ sw $v1, 0x8($s1) /* 395C38 E0098088 0040802D */ daddu $s0, $v0, $zero /* 395C3C E009808C 16000003 */ bnez $s0, .LE009809C /* 395C40 E0098090 AE22000C */ sw $v0, 0xC($s1) .LE0098094: /* 395C44 E0098094 08026025 */ j .LE0098094 /* 395C48 E0098098 00000000 */ nop .LE009809C: /* 395C4C E009809C AE120000 */ sw $s2, 0x0($s0) /* 395C50 E00980A0 E6140004 */ swc1 $f20, 0x4($s0) /* 395C54 E00980A4 E6160008 */ swc1 $f22, 0x8($s0) /* 395C58 E00980A8 E618000C */ swc1 $f24, 0xC($s0) /* 395C5C E00980AC C7A00068 */ lwc1 $f0, 0x68($sp) /* 395C60 E00980B0 E6000010 */ swc1 $f0, 0x10($s0) /* 395C64 E00980B4 C7A0006C */ lwc1 $f0, 0x6C($sp) /* 395C68 E00980B8 E6000018 */ swc1 $f0, 0x18($s0) /* 395C6C E00980BC C7A00070 */ lwc1 $f0, 0x70($sp) /* 395C70 E00980C0 E6000020 */ swc1 $f0, 0x20($s0) /* 395C74 E00980C4 8FA20078 */ lw $v0, 0x78($sp) /* 395C78 E00980C8 24040168 */ addiu $a0, $zero, 0x168 /* 395C7C E00980CC AE00004C */ sw $zero, 0x4C($s0) /* 395C80 E00980D0 AE000014 */ sw $zero, 0x14($s0) /* 395C84 E00980D4 AE00001C */ sw $zero, 0x1C($s0) /* 395C88 E00980D8 AE000024 */ sw $zero, 0x24($s0) /* 395C8C E00980DC 0C080138 */ jal shim_rand_int /* 395C90 E00980E0 AE020048 */ sw $v0, 0x48($s0) /* 395C94 E00980E4 24040168 */ addiu $a0, $zero, 0x168 /* 395C98 E00980E8 44820000 */ mtc1 $v0, $f0 /* 395C9C E00980EC 00000000 */ nop /* 395CA0 E00980F0 46800020 */ cvt.s.w $f0, $f0 /* 395CA4 E00980F4 0C080138 */ jal shim_rand_int /* 395CA8 E00980F8 E6000028 */ swc1 $f0, 0x28($s0) /* 395CAC E00980FC 44820000 */ mtc1 $v0, $f0 /* 395CB0 E0098100 00000000 */ nop /* 395CB4 E0098104 46800020 */ cvt.s.w $f0, $f0 /* 395CB8 E0098108 0220102D */ daddu $v0, $s1, $zero /* 395CBC E009810C 240300FF */ addiu $v1, $zero, 0xFF /* 395CC0 E0098110 E600002C */ swc1 $f0, 0x2C($s0) /* 395CC4 E0098114 3C0141A0 */ lui $at, (0x41A00000 >> 16) /* 395CC8 E0098118 44810000 */ mtc1 $at, $f0 /* 395CCC E009811C 3C01C1A0 */ lui $at, (0xC1A00000 >> 16) /* 395CD0 E0098120 44811000 */ mtc1 $at, $f2 /* 395CD4 E0098124 461AD100 */ add.s $f4, $f26, $f26 /* 395CD8 E0098128 AE000030 */ sw $zero, 0x30($s0) /* 395CDC E009812C AE030044 */ sw $v1, 0x44($s0) /* 395CE0 E0098130 AE000040 */ sw $zero, 0x40($s0) /* 395CE4 E0098134 E6000038 */ swc1 $f0, 0x38($s0) /* 395CE8 E0098138 E6020034 */ swc1 $f2, 0x34($s0) /* 395CEC E009813C E604003C */ swc1 $f4, 0x3C($s0) /* 395CF0 E0098140 8FBF0034 */ lw $ra, 0x34($sp) /* 395CF4 E0098144 8FB20030 */ lw $s2, 0x30($sp) /* 395CF8 E0098148 8FB1002C */ lw $s1, 0x2C($sp) /* 395CFC E009814C 8FB00028 */ lw $s0, 0x28($sp) /* 395D00 E0098150 D7BA0050 */ ldc1 $f26, 0x50($sp) /* 395D04 E0098154 D7B80048 */ ldc1 $f24, 0x48($sp) /* 395D08 E0098158 D7B60040 */ ldc1 $f22, 0x40($sp) /* 395D0C E009815C D7B40038 */ ldc1 $f20, 0x38($sp) /* 395D10 E0098160 03E00008 */ jr $ra /* 395D14 E0098164 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: EffectInstance* floating_rock_main(s32 type, f32 posX, f32 posY, f32 posZ, f32 floorY, f32 fallVelocity, f32 fallAccel, f32 scale, s32 duration) { EffectBlueprint bp; EffectInstance* effect; FloatingRockFXData* data; s32 numParts = 1; bp.init = floating_rock_init; bp.update = floating_rock_update; bp.renderWorld = floating_rock_render; bp.unk_00 = 0; bp.renderUI = NULL; bp.effectID = EFFECT_FLOATING_ROCK; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = effect->data.floatingRock = shim_general_heap_malloc(numParts * sizeof(*data)); ASSERT(effect->data.floatingRock != NULL); data->type = type; data->pos.x = posX; data->pos.y = posY; data->pos.z = posZ; data->floorY = floorY; data->vel.y = fallVelocity; data->fallAccel = fallAccel; data->timeLeft = duration; data->lifetime = 0; data->vel.x = 0; data->vel.z = 0; data->rot.x = 0; data->rot.y = shim_rand_int(360); data->rot.z = shim_rand_int(360); data->rotVel.x = 0.0f; data->rotVel.z = 20.0f; data->rotVel.y = -20.0f; data->scale = 2.0f * scale; data->alpha = 255; data->unk_40 = 0; return effect; }
### RAW ASSEMBLY INSTRUCTIONS: glabel LandJumpPart /* 1A943C 8027AB5C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 1A9440 8027AB60 AFB20020 */ sw $s2, 0x20($sp) /* 1A9444 8027AB64 0080902D */ daddu $s2, $a0, $zero /* 1A9448 8027AB68 AFBF0024 */ sw $ra, 0x24($sp) /* 1A944C 8027AB6C AFB1001C */ sw $s1, 0x1C($sp) /* 1A9450 8027AB70 AFB00018 */ sw $s0, 0x18($sp) /* 1A9454 8027AB74 8E51000C */ lw $s1, 0xC($s2) /* 1A9458 8027AB78 54A00001 */ bnel $a1, $zero, .L8027AB80 /* 1A945C 8027AB7C AE400070 */ sw $zero, 0x70($s2) .L8027AB80: /* 1A9460 8027AB80 8E420070 */ lw $v0, 0x70($s2) /* 1A9464 8027AB84 14400020 */ bnez $v0, .L8027AC08 /* 1A9468 8027AB88 00000000 */ nop /* 1A946C 8027AB8C 8E250000 */ lw $a1, 0x0($s1) /* 1A9470 8027AB90 26310004 */ addiu $s1, $s1, 0x4 /* 1A9474 8027AB94 0C0B1EAF */ jal evt_get_variable /* 1A9478 8027AB98 0240202D */ daddu $a0, $s2, $zero /* 1A947C 8027AB9C 0040802D */ daddu $s0, $v0, $zero /* 1A9480 8027ABA0 8E250000 */ lw $a1, 0x0($s1) /* 1A9484 8027ABA4 0C0B1EAF */ jal evt_get_variable /* 1A9488 8027ABA8 0240202D */ daddu $a0, $s2, $zero /* 1A948C 8027ABAC 0040882D */ daddu $s1, $v0, $zero /* 1A9490 8027ABB0 2402FF81 */ addiu $v0, $zero, -0x7F /* 1A9494 8027ABB4 16020002 */ bne $s0, $v0, .L8027ABC0 /* 1A9498 8027ABB8 00000000 */ nop /* 1A949C 8027ABBC 8E500148 */ lw $s0, 0x148($s2) .L8027ABC0: /* 1A94A0 8027ABC0 0C09A75B */ jal get_actor /* 1A94A4 8027ABC4 0200202D */ daddu $a0, $s0, $zero /* 1A94A8 8027ABC8 0040802D */ daddu $s0, $v0, $zero /* 1A94AC 8027ABCC 0200202D */ daddu $a0, $s0, $zero /* 1A94B0 8027ABD0 0C099117 */ jal get_actor_part /* 1A94B4 8027ABD4 0220282D */ daddu $a1, $s1, $zero /* 1A94B8 8027ABD8 0040882D */ daddu $s1, $v0, $zero /* 1A94BC 8027ABDC AE500074 */ sw $s0, 0x74($s2) /* 1A94C0 8027ABE0 AE510078 */ sw $s1, 0x78($s2) /* 1A94C4 8027ABE4 8E300010 */ lw $s0, 0x10($s1) /* 1A94C8 8027ABE8 C620002C */ lwc1 $f0, 0x2C($s1) /* 1A94CC 8027ABEC E6000000 */ swc1 $f0, 0x0($s0) /* 1A94D0 8027ABF0 C6200030 */ lwc1 $f0, 0x30($s1) /* 1A94D4 8027ABF4 E6000004 */ swc1 $f0, 0x4($s0) /* 1A94D8 8027ABF8 C6200034 */ lwc1 $f0, 0x34($s1) /* 1A94DC 8027ABFC 24020001 */ addiu $v0, $zero, 0x1 /* 1A94E0 8027AC00 E6000008 */ swc1 $f0, 0x8($s0) /* 1A94E4 8027AC04 AE420070 */ sw $v0, 0x70($s2) .L8027AC08: /* 1A94E8 8027AC08 8E510078 */ lw $s1, 0x78($s2) /* 1A94EC 8027AC0C 8E300010 */ lw $s0, 0x10($s1) /* 1A94F0 8027AC10 C6040004 */ lwc1 $f4, 0x4($s0) /* 1A94F4 8027AC14 C600002C */ lwc1 $f0, 0x2C($s0) /* 1A94F8 8027AC18 8E050028 */ lw $a1, 0x28($s0) /* 1A94FC 8027AC1C 46002100 */ add.s $f4, $f4, $f0 /* 1A9500 8027AC20 C6020024 */ lwc1 $f2, 0x24($s0) /* 1A9504 8027AC24 8E060030 */ lw $a2, 0x30($s0) /* 1A9508 8027AC28 46020001 */ sub.s $f0, $f0, $f2 /* 1A950C 8027AC2C 0200202D */ daddu $a0, $s0, $zero /* 1A9510 8027AC30 E6040004 */ swc1 $f4, 0x4($s0) /* 1A9514 8027AC34 0C099070 */ jal add_xz_vec3f_copy1 /* 1A9518 8027AC38 E600002C */ swc1 $f0, 0x2C($s0) /* 1A951C 8027AC3C C6000000 */ lwc1 $f0, 0x0($s0) /* 1A9520 8027AC40 44802000 */ mtc1 $zero, $f4 /* 1A9524 8027AC44 E620002C */ swc1 $f0, 0x2C($s1) /* 1A9528 8027AC48 C6000004 */ lwc1 $f0, 0x4($s0) /* 1A952C 8027AC4C E6200030 */ swc1 $f0, 0x30($s1) /* 1A9530 8027AC50 C6220030 */ lwc1 $f2, 0x30($s1) /* 1A9534 8027AC54 C6000008 */ lwc1 $f0, 0x8($s0) /* 1A9538 8027AC58 4604103C */ c.lt.s $f2, $f4 /* 1A953C 8027AC5C 00000000 */ nop /* 1A9540 8027AC60 45010003 */ bc1t .L8027AC70 /* 1A9544 8027AC64 E6200034 */ swc1 $f0, 0x34($s1) /* 1A9548 8027AC68 0809EB25 */ j .L8027AC94 /* 1A954C 8027AC6C 0000102D */ daddu $v0, $zero, $zero .L8027AC70: /* 1A9550 8027AC70 C6200064 */ lwc1 $f0, 0x64($s1) /* 1A9554 8027AC74 E6240030 */ swc1 $f4, 0x30($s1) /* 1A9558 8027AC78 E7A00010 */ swc1 $f0, 0x10($sp) /* 1A955C 8027AC7C 8E25002C */ lw $a1, 0x2C($s1) /* 1A9560 8027AC80 8E260030 */ lw $a2, 0x30($s1) /* 1A9564 8027AC84 8E270034 */ lw $a3, 0x34($s1) /* 1A9568 8027AC88 0C0990BC */ jal play_movement_dust_effects /* 1A956C 8027AC8C 24040002 */ addiu $a0, $zero, 0x2 /* 1A9570 8027AC90 24020001 */ addiu $v0, $zero, 0x1 .L8027AC94: /* 1A9574 8027AC94 8FBF0024 */ lw $ra, 0x24($sp) /* 1A9578 8027AC98 8FB20020 */ lw $s2, 0x20($sp) /* 1A957C 8027AC9C 8FB1001C */ lw $s1, 0x1C($sp) /* 1A9580 8027ACA0 8FB00018 */ lw $s0, 0x18($sp) /* 1A9584 8027ACA4 03E00008 */ jr $ra /* 1A9588 8027ACA8 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: ApiStatus LandJumpPart(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; Actor* actor; ActorPart* part; ActorPartMovement* movement; if (isInitialCall) { script->functionTemp[0] = 0; } if (script->functionTemp[0] == 0) { s32 actorID = evt_get_variable(script, *args++); s32 partID = evt_get_variable(script, *args++); if (actorID == ACTOR_SELF) { actorID = script->owner1.actorID; } actor = get_actor(actorID); part = get_actor_part(actor, partID); script->functionTempPtr[1] = actor; script->functionTempPtr[2] = part; movement = part->movement; movement->absolutePosition.x = part->absolutePosition.x; movement->absolutePosition.y = part->absolutePosition.y; movement->absolutePosition.z = part->absolutePosition.z; script->functionTemp[0] = 1; } part = script->functionTempPtr[2]; movement = part->movement; movement->absolutePosition.y += movement->unk_2C; movement->unk_2C -= movement->jumpScale; add_xz_vec3f_copy1(&movement->absolutePosition, movement->moveSpeed, movement->angle); part->absolutePosition.x = movement->absolutePosition.x; part->absolutePosition.y = movement->absolutePosition.y; part->absolutePosition.z = movement->absolutePosition.z; if (part->absolutePosition.y < 0.0f) { part->absolutePosition.y = 0.0f; play_movement_dust_effects(2, part->absolutePosition.x, part->absolutePosition.y, part->absolutePosition.z, part->yaw); return ApiStatus_DONE1; } return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel walking_dust_main /* 32C110 E000E000 27BDFF98 */ addiu $sp, $sp, -0x68 /* 32C114 E000E004 F7B60048 */ sdc1 $f22, 0x48($sp) /* 32C118 E000E008 4485B000 */ mtc1 $a1, $f22 /* 32C11C E000E00C F7B80050 */ sdc1 $f24, 0x50($sp) /* 32C120 E000E010 4486C000 */ mtc1 $a2, $f24 /* 32C124 E000E014 F7BA0058 */ sdc1 $f26, 0x58($sp) /* 32C128 E000E018 4487D000 */ mtc1 $a3, $f26 /* 32C12C E000E01C AFB30034 */ sw $s3, 0x34($sp) /* 32C130 E000E020 0080982D */ daddu $s3, $a0, $zero /* 32C134 E000E024 F7BC0060 */ sdc1 $f28, 0x60($sp) /* 32C138 E000E028 C7BC0078 */ lwc1 $f28, 0x78($sp) /* 32C13C E000E02C 27A40010 */ addiu $a0, $sp, 0x10 /* 32C140 E000E030 F7B40040 */ sdc1 $f20, 0x40($sp) /* 32C144 E000E034 C7B4007C */ lwc1 $f20, 0x7C($sp) /* 32C148 E000E038 3C02E001 */ lui $v0, %hi(walking_dust_init) /* 32C14C E000E03C 2442E16C */ addiu $v0, $v0, %lo(walking_dust_init) /* 32C150 E000E040 AFA20018 */ sw $v0, 0x18($sp) /* 32C154 E000E044 3C02E001 */ lui $v0, %hi(walking_dust_update) /* 32C158 E000E048 2442E174 */ addiu $v0, $v0, %lo(walking_dust_update) /* 32C15C E000E04C AFA2001C */ sw $v0, 0x1C($sp) /* 32C160 E000E050 3C02E001 */ lui $v0, %hi(walking_dust_render) /* 32C164 E000E054 2442E244 */ addiu $v0, $v0, %lo(walking_dust_render) /* 32C168 E000E058 AFA20020 */ sw $v0, 0x20($sp) /* 32C16C E000E05C 24020007 */ addiu $v0, $zero, 0x7 /* 32C170 E000E060 AFBF0038 */ sw $ra, 0x38($sp) /* 32C174 E000E064 AFB20030 */ sw $s2, 0x30($sp) /* 32C178 E000E068 AFB1002C */ sw $s1, 0x2C($sp) /* 32C17C E000E06C AFB00028 */ sw $s0, 0x28($sp) /* 32C180 E000E070 AFA00010 */ sw $zero, 0x10($sp) /* 32C184 E000E074 AFA00024 */ sw $zero, 0x24($sp) /* 32C188 E000E078 0C080124 */ jal shim_create_effect_instance /* 32C18C E000E07C AFA20014 */ sw $v0, 0x14($sp) /* 32C190 E000E080 24040078 */ addiu $a0, $zero, 0x78 /* 32C194 E000E084 24120001 */ addiu $s2, $zero, 0x1 /* 32C198 E000E088 0040802D */ daddu $s0, $v0, $zero /* 32C19C E000E08C 0C08012C */ jal shim_general_heap_malloc /* 32C1A0 E000E090 AE120008 */ sw $s2, 0x8($s0) /* 32C1A4 E000E094 0040882D */ daddu $s1, $v0, $zero /* 32C1A8 E000E098 16200003 */ bnez $s1, .LE000E0A8 /* 32C1AC E000E09C AE11000C */ sw $s1, 0xC($s0) .LE000E0A0: /* 32C1B0 E000E0A0 08003828 */ j .LE000E0A0 /* 32C1B4 E000E0A4 00000000 */ nop .LE000E0A8: /* 32C1B8 E000E0A8 0220202D */ daddu $a0, $s1, $zero /* 32C1BC E000E0AC 00122900 */ sll $a1, $s2, 4 /* 32C1C0 E000E0B0 00B22823 */ subu $a1, $a1, $s2 /* 32C1C4 E000E0B4 0C080130 */ jal shim_mem_clear /* 32C1C8 E000E0B8 000528C0 */ sll $a1, $a1, 3 /* 32C1CC E000E0BC 0000202D */ daddu $a0, $zero, $zero /* 32C1D0 E000E0C0 3A620002 */ xori $v0, $s3, 0x2 /* 32C1D4 E000E0C4 2C420001 */ sltiu $v0, $v0, 0x1 /* 32C1D8 E000E0C8 AE22006C */ sw $v0, 0x6C($s1) /* 32C1DC E000E0CC 0092102A */ slt $v0, $a0, $s2 /* 32C1E0 E000E0D0 AE200070 */ sw $zero, 0x70($s1) /* 32C1E4 E000E0D4 10400019 */ beqz $v0, .LE000E13C /* 32C1E8 E000E0D8 A6330004 */ sh $s3, 0x4($s1) /* 32C1EC E000E0DC 24050001 */ addiu $a1, $zero, 0x1 /* 32C1F0 E000E0E0 26230060 */ addiu $v1, $s1, 0x60 /* 32C1F4 E000E0E4 3C013EAA */ lui $at, (0x3EAAAAAB >> 16) /* 32C1F8 E000E0E8 3421AAAB */ ori $at, $at, (0x3EAAAAAB & 0xFFFF) /* 32C1FC E000E0EC 44812000 */ mtc1 $at, $f4 /* 32C200 E000E0F0 3C013FE0 */ lui $at, (0x3FE00000 >> 16) /* 32C204 E000E0F4 44811000 */ mtc1 $at, $f2 /* 32C208 E000E0F8 3C01BE23 */ lui $at, (0xBE23D70A >> 16) /* 32C20C E000E0FC 3421D70A */ ori $at, $at, (0xBE23D70A & 0xFFFF) /* 32C210 E000E100 44810000 */ mtc1 $at, $f0 .LE000E104: /* 32C214 E000E104 24840001 */ addiu $a0, $a0, 0x1 /* 32C218 E000E108 AE250000 */ sw $a1, 0x0($s1) /* 32C21C E000E10C E47C0004 */ swc1 $f28, 0x4($v1) /* 32C220 E000E110 E4740008 */ swc1 $f20, 0x8($v1) /* 32C224 E000E114 E476FFA8 */ swc1 $f22, -0x58($v1) /* 32C228 E000E118 E478FFAC */ swc1 $f24, -0x54($v1) /* 32C22C E000E11C E47AFFB0 */ swc1 $f26, -0x50($v1) /* 32C230 E000E120 E464FFF8 */ swc1 $f4, -0x8($v1) /* 32C234 E000E124 E462FFFC */ swc1 $f2, -0x4($v1) /* 32C238 E000E128 E4600000 */ swc1 $f0, 0x0($v1) /* 32C23C E000E12C 24630078 */ addiu $v1, $v1, 0x78 /* 32C240 E000E130 0092102A */ slt $v0, $a0, $s2 /* 32C244 E000E134 1440FFF3 */ bnez $v0, .LE000E104 /* 32C248 E000E138 26310078 */ addiu $s1, $s1, 0x78 .LE000E13C: /* 32C24C E000E13C 8FBF0038 */ lw $ra, 0x38($sp) /* 32C250 E000E140 8FB30034 */ lw $s3, 0x34($sp) /* 32C254 E000E144 8FB20030 */ lw $s2, 0x30($sp) /* 32C258 E000E148 8FB1002C */ lw $s1, 0x2C($sp) /* 32C25C E000E14C 8FB00028 */ lw $s0, 0x28($sp) /* 32C260 E000E150 D7BC0060 */ ldc1 $f28, 0x60($sp) /* 32C264 E000E154 D7BA0058 */ ldc1 $f26, 0x58($sp) /* 32C268 E000E158 D7B80050 */ ldc1 $f24, 0x50($sp) /* 32C26C E000E15C D7B60048 */ ldc1 $f22, 0x48($sp) /* 32C270 E000E160 D7B40040 */ ldc1 $f20, 0x40($sp) /* 32C274 E000E164 03E00008 */ jr $ra /* 32C278 E000E168 27BD0068 */ addiu $sp, $sp, 0x68 ### DECOMPILED C INSTRUCTIONS: void walking_dust_main(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { EffectBlueprint bp; EffectInstance* effect; WalkingDustFXData* data; s32 numParts = 1; s32 i; bp.unk_00 = 0; bp.init = walking_dust_init; bp.update = walking_dust_update; bp.renderWorld = walking_dust_render; bp.renderUI = NULL; bp.effectID = EFFECT_WALKING_DUST; effect = shim_create_effect_instance(&bp); effect->numParts = numParts; data = shim_general_heap_malloc(numParts * sizeof(*data)); effect->data.walkingDust = data; ASSERT(effect->data.walkingDust != NULL); shim_mem_clear(data, numParts * sizeof(*data)); data->unk_6C = arg0 == 2; data->unk_70 = 0; data->unk_04 = arg0; for (i = 0; i < numParts; i++, data++) { data->unk_00 = 1; data->unk_64 = arg4; data->unk_68 = arg5; data->unk_08 = arg1; data->unk_0C = arg2; data->unk_10 = arg3; data->unk_58 = 0.33333334f; data->unk_5C = 1.75f; data->unk_60 = -0.16f; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_8021848C /* 660BDC 8021848C 27BDFFE0 */ addiu $sp, $sp, -0x20 glabel func_80218490_557870 /* 660BE0 80218490 AFB20018 */ sw $s2, 0x18($sp) D_80218494: /* 660BE4 80218494 0080902D */ daddu $s2, $a0, $zero /* 660BE8 80218498 AFBF001C */ sw $ra, 0x1C($sp) glabel func_8021849C_6DC23C /* 660BEC 8021849C AFB10014 */ sw $s1, 0x14($sp) glabel b_area_jan2_white_magikoopa_StartRumbleWithParams /* 660BF0 802184A0 AFB00010 */ sw $s0, 0x10($sp) .L802184A4: /* 660BF4 802184A4 8E50000C */ lw $s0, 0xC($s2) .L802184A8: /* 660BF8 802184A8 8E050000 */ lw $a1, 0x0($s0) D_802184AC: /* 660BFC 802184AC 0C0B1EAF */ jal evt_get_variable D_802184B0: /* 660C00 802184B0 26100004 */ addiu $s0, $s0, 0x4 D_802184B4: /* 660C04 802184B4 8E050000 */ lw $a1, 0x0($s0) .L802184B8_59EB98: /* 660C08 802184B8 26100004 */ addiu $s0, $s0, 0x4 /* 660C0C 802184BC 0240202D */ daddu $a0, $s2, $zero func_802184C0_47F570: /* 660C10 802184C0 0C0B1EAF */ jal evt_get_variable glabel func_802184C4 /* 660C14 802184C4 0040882D */ daddu $s1, $v0, $zero /* 660C18 802184C8 44820000 */ mtc1 $v0, $f0 glabel b_area_isk_part_1_ChompChainUpdate /* 660C1C 802184CC 00000000 */ nop .L802184D0_59EBB0: /* 660C20 802184D0 46800020 */ cvt.s.w $f0, $f0 glabel b_area_sam2_monstar_StartRumbleWithParams /* 660C24 802184D4 E6200000 */ swc1 $f0, 0x0($s1) .L802184D8: /* 660C28 802184D8 8E050000 */ lw $a1, 0x0($s0) glabel func_802184DC /* 660C2C 802184DC 26100004 */ addiu $s0, $s0, 0x4 glabel func_802184E0 /* 660C30 802184E0 0C0B1EAF */ jal evt_get_variable glabel dup_b_area_tik2_SpitInk /* 660C34 802184E4 0240202D */ daddu $a0, $s2, $zero glabel b_area_kpa_GetSelectedMoveID /* 660C38 802184E8 44820000 */ mtc1 $v0, $f0 D_802184EC: /* 660C3C 802184EC 00000000 */ nop glabel func_802184F0 /* 660C40 802184F0 46800020 */ cvt.s.w $f0, $f0 .L802184F4: /* 660C44 802184F4 E6200004 */ swc1 $f0, 0x4($s1) glabel b_area_jan2_white_magikoopa_UnkFunc52 /* 660C48 802184F8 8E050000 */ lw $a1, 0x0($s0) D_802184FC: /* 660C4C 802184FC 26100004 */ addiu $s0, $s0, 0x4 glabel func_80218500 /* 660C50 80218500 0C0B1EAF */ jal evt_get_variable .L80218504: /* 660C54 80218504 0240202D */ daddu $a0, $s2, $zero /* 660C58 80218508 24040014 */ addiu $a0, $zero, 0x14 .L8021850C: /* 660C5C 8021850C 44820000 */ mtc1 $v0, $f0 b_area_trd_part_2_green_ninja_koopa_GetKoopaBrosWithState: /* 660C60 80218510 00000000 */ nop glabel dup2_b_area_kpa_SetAbsoluteStatusOffsets /* 660C64 80218514 46800020 */ cvt.s.w $f0, $f0 .L80218518_59EBF8: /* 660C68 80218518 0C00A67F */ jal rand_int glabel b_area_kzn_medi_guy_MediGuySpriteRotationFunc /* 660C6C 8021851C E6200008 */ swc1 $f0, 0x8($s1) /* 660C70 80218520 24040028 */ addiu $a0, $zero, 0x28 .L80218524: /* 660C74 80218524 00021023 */ negu $v0, $v0 D_80218528: /* 660C78 80218528 44820000 */ mtc1 $v0, $f0 glabel func_8021852C /* 660C7C 8021852C 00000000 */ nop glabel b_area_kpa4_StartRumbleWithParams /* 660C80 80218530 46800020 */ cvt.s.w $f0, $f0 b_area_sbk_pokey_init_80218534: /* 660C84 80218534 0C00A67F */ jal rand_int b_area_trd_part_1_Formation_03: /* 660C88 80218538 E620000C */ swc1 $f0, 0xC($s1) D_8021853C: /* 660C8C 8021853C 24420028 */ addiu $v0, $v0, 0x28 .L80218540: /* 660C90 80218540 44820000 */ mtc1 $v0, $f0 .L80218544: /* 660C94 80218544 00000000 */ nop D_80218548: /* 660C98 80218548 46800020 */ cvt.s.w $f0, $f0 /* 660C9C 8021854C E6200010 */ swc1 $f0, 0x10($s1) glabel b_area_kkj_SetLightningBoltPurple /* 660CA0 80218550 AE200014 */ sw $zero, 0x14($s1) /* 660CA4 80218554 8E050000 */ lw $a1, 0x0($s0) glabel func_80218558 /* 660CA8 80218558 26100004 */ addiu $s0, $s0, 0x4 glabel func_8021855C /* 660CAC 8021855C 0C0B1EAF */ jal evt_get_variable glabel b_area_flo_ShrinkActor /* 660CB0 80218560 0240202D */ daddu $a0, $s2, $zero D_80218564: /* 660CB4 80218564 44820000 */ mtc1 $v0, $f0 /* 660CB8 80218568 00000000 */ nop .L8021856C: /* 660CBC 8021856C 46800020 */ cvt.s.w $f0, $f0 D_80218570: /* 660CC0 80218570 E6200018 */ swc1 $f0, 0x18($s1) D_80218574: /* 660CC4 80218574 8E050000 */ lw $a1, 0x0($s0) /* 660CC8 80218578 26100004 */ addiu $s0, $s0, 0x4 .L8021857C: /* 660CCC 8021857C 0C0B1EAF */ jal evt_get_variable glabel b_area_dig_GetModelPos /* 660CD0 80218580 0240202D */ daddu $a0, $s2, $zero b_area_mim_forest_fuzzy_handleEvent_80218584: /* 660CD4 80218584 44820000 */ mtc1 $v0, $f0 glabel b_area_kpa4_UnkFunc52 /* 660CD8 80218588 00000000 */ nop b_area_omo2_general_guy_init: /* 660CDC 8021858C 46800020 */ cvt.s.w $f0, $f0 .L80218590: /* 660CE0 80218590 E620001C */ swc1 $f0, 0x1C($s1) .L80218594: /* 660CE4 80218594 8E050000 */ lw $a1, 0x0($s0) /* 660CE8 80218598 0C0B1EAF */ jal evt_get_variable .L8021859C: /* 660CEC 8021859C 0240202D */ daddu $a0, $s2, $zero .L802185A0: /* 660CF0 802185A0 44820000 */ mtc1 $v0, $f0 /* 660CF4 802185A4 00000000 */ nop glabel b_area_pra_UnkFunc52 /* 660CF8 802185A8 46800020 */ cvt.s.w $f0, $f0 glabel b_area_omo_medi_guy_MediGuySpriteRotationFunc /* 660CFC 802185AC E6200020 */ swc1 $f0, 0x20($s1) glabel func_802185B0 /* 660D00 802185B0 8FBF001C */ lw $ra, 0x1C($sp) .L802185B4: /* 660D04 802185B4 8FB20018 */ lw $s2, 0x18($sp) D_802185B8: /* 660D08 802185B8 8FB10014 */ lw $s1, 0x14($sp) glabel b_area_jan2_white_magikoopa_GetBootsHammerLevel /* 660D0C 802185BC 8FB00010 */ lw $s0, 0x10($sp) D_802185C0: /* 660D10 802185C0 24020002 */ addiu $v0, $zero, 0x2 D_802185C4: /* 660D14 802185C4 03E00008 */ jr $ra .L802185C8: /* 660D18 802185C8 27BD0020 */ addiu $sp, $sp, 0x20 /* 660D1C 802185CC 00000000 */ nop ### DECOMPILED C INSTRUCTIONS: API_CALLABLE(func_8021848C_660BDC) { Bytecode* args = script->ptrReadPos; Vec3f* path = (Vec3f*)evt_get_variable(script, *args++); path[0].x = evt_get_variable(script, *args++); path[0].y = evt_get_variable(script, *args++); path[0].z = evt_get_variable(script, *args++); path[1].x = -rand_int(20); path[1].y = rand_int(40) + 40; path[1].z = 0; path[2].x = evt_get_variable(script, *args++); path[2].y = evt_get_variable(script, *args++); path[2].z = evt_get_variable(script, *args++); return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel load_simple_entity_data /* A79A4 801112A4 27BDFFD8 */ addiu $sp, $sp, -0x28 /* A79A8 801112A8 AFB20020 */ sw $s2, 0x20($sp) /* A79AC 801112AC 0080902D */ daddu $s2, $a0, $zero /* A79B0 801112B0 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A79B4 801112B4 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A79B8 801112B8 2403000A */ addiu $v1, $zero, 0xA /* A79BC 801112BC AFBF0024 */ sw $ra, 0x24($sp) /* A79C0 801112C0 AFB1001C */ sw $s1, 0x1C($sp) /* A79C4 801112C4 AFB00018 */ sw $s0, 0x18($sp) /* A79C8 801112C8 A6430012 */ sh $v1, 0x12($s2) /* A79CC 801112CC 80420070 */ lb $v0, 0x70($v0) /* A79D0 801112D0 14400005 */ bnez $v0, .L801112E8 /* A79D4 801112D4 00A0882D */ daddu $s1, $a1, $zero /* A79D8 801112D8 3C108015 */ lui $s0, %hi(wEntityBlueprintSize) /* A79DC 801112DC 8E10165C */ lw $s0, %lo(wEntityBlueprintSize)($s0) /* A79E0 801112E0 080444BD */ j .L801112F4 /* A79E4 801112E4 0240202D */ daddu $a0, $s2, $zero .L801112E8: /* A79E8 801112E8 3C108015 */ lui $s0, %hi(bEntityBlueprintSize) /* A79EC 801112EC 8E101660 */ lw $s0, %lo(bEntityBlueprintSize)($s0) /* A79F0 801112F0 0240202D */ daddu $a0, $s2, $zero .L801112F4: /* A79F4 801112F4 0220282D */ daddu $a1, $s1, $zero /* A79F8 801112F8 27A60010 */ addiu $a2, $sp, 0x10 /* A79FC 801112FC 0C044457 */ jal is_entity_data_loaded /* A7A00 80111300 27A70014 */ addiu $a3, $sp, 0x14 /* A7A04 80111304 10400020 */ beqz $v0, .L80111388 /* A7A08 80111308 00000000 */ nop /* A7A0C 8011130C 8E22001C */ lw $v0, 0x1C($s1) /* A7A10 80111310 8E230018 */ lw $v1, 0x18($s1) /* A7A14 80111314 00431023 */ subu $v0, $v0, $v1 /* A7A18 80111318 00021083 */ sra $v0, $v0, 2 /* A7A1C 8011131C 02021021 */ addu $v0, $s0, $v0 /* A7A20 80111320 2C425FFD */ sltiu $v0, $v0, 0x5FFD /* A7A24 80111324 14400007 */ bnez $v0, .L80111344 /* A7A28 80111328 00000000 */ nop /* A7A2C 8011132C 0C0441A9 */ jal get_entity_type /* A7A30 80111330 92440004 */ lbu $a0, 0x4($s2) /* A7A34 80111334 0C0441A9 */ jal get_entity_type /* A7A38 80111338 92440004 */ lbu $a0, 0x4($s2) .L8011133C: /* A7A3C 8011133C 080444CF */ j .L8011133C /* A7A40 80111340 00000000 */ nop .L80111344: /* A7A44 80111344 8E22001C */ lw $v0, 0x1C($s1) /* A7A48 80111348 3C068015 */ lui $a2, %hi(gEntityHeapBase) /* A7A4C 8011134C 8CC612C4 */ lw $a2, %lo(gEntityHeapBase)($a2) /* A7A50 80111350 00431023 */ subu $v0, $v0, $v1 /* A7A54 80111354 00022883 */ sra $a1, $v0, 2 /* A7A58 80111358 00101080 */ sll $v0, $s0, 2 /* A7A5C 8011135C 00C23023 */ subu $a2, $a2, $v0 /* A7A60 80111360 00051080 */ sll $v0, $a1, 2 /* A7A64 80111364 00C23023 */ subu $a2, $a2, $v0 /* A7A68 80111368 AE460044 */ sw $a2, 0x44($s2) /* A7A6C 8011136C 8E240018 */ lw $a0, 0x18($s1) /* A7A70 80111370 0C00A5CF */ jal dma_copy /* A7A74 80111374 8E25001C */ lw $a1, 0x1C($s1) /* A7A78 80111378 00021082 */ srl $v0, $v0, 2 /* A7A7C 8011137C 92440004 */ lbu $a0, 0x4($s2) /* A7A80 80111380 080444EF */ j .L801113BC /* A7A84 80111384 02028021 */ addu $s0, $s0, $v0 .L80111388: /* A7A88 80111388 8E22001C */ lw $v0, 0x1C($s1) /* A7A8C 8011138C 8E230018 */ lw $v1, 0x18($s1) /* A7A90 80111390 92440004 */ lbu $a0, 0x4($s2) /* A7A94 80111394 00431023 */ subu $v0, $v0, $v1 /* A7A98 80111398 00022883 */ sra $a1, $v0, 2 /* A7A9C 8011139C 8FA20010 */ lw $v0, 0x10($sp) /* A7AA0 801113A0 3C038015 */ lui $v1, %hi(gEntityHeapBase) /* A7AA4 801113A4 8C6312C4 */ lw $v1, %lo(gEntityHeapBase)($v1) /* A7AA8 801113A8 00021080 */ sll $v0, $v0, 2 /* A7AAC 801113AC 00621823 */ subu $v1, $v1, $v0 /* A7AB0 801113B0 00051080 */ sll $v0, $a1, 2 /* A7AB4 801113B4 00621823 */ subu $v1, $v1, $v0 /* A7AB8 801113B8 AE430044 */ sw $v1, 0x44($s2) .L801113BC: /* A7ABC 801113BC 0C0441A9 */ jal get_entity_type /* A7AC0 801113C0 00000000 */ nop /* A7AC4 801113C4 3C028007 */ lui $v0, %hi(gGameStatusPtr) /* A7AC8 801113C8 8C42419C */ lw $v0, %lo(gGameStatusPtr)($v0) /* A7ACC 801113CC 80420070 */ lb $v0, 0x70($v0) /* A7AD0 801113D0 14400005 */ bnez $v0, .L801113E8 /* A7AD4 801113D4 00000000 */ nop /* A7AD8 801113D8 3C018015 */ lui $at, %hi(wEntityBlueprintSize) /* A7ADC 801113DC AC30165C */ sw $s0, %lo(wEntityBlueprintSize)($at) /* A7AE0 801113E0 080444FC */ j .L801113F0 /* A7AE4 801113E4 00000000 */ nop .L801113E8: /* A7AE8 801113E8 3C018015 */ lui $at, %hi(bEntityBlueprintSize) /* A7AEC 801113EC AC301660 */ sw $s0, %lo(bEntityBlueprintSize)($at) .L801113F0: /* A7AF0 801113F0 8FBF0024 */ lw $ra, 0x24($sp) /* A7AF4 801113F4 8FB20020 */ lw $s2, 0x20($sp) /* A7AF8 801113F8 8FB1001C */ lw $s1, 0x1C($sp) /* A7AFC 801113FC 8FB00018 */ lw $s0, 0x18($sp) /* A7B00 80111400 03E00008 */ jr $ra /* A7B04 80111404 27BD0028 */ addiu $sp, $sp, 0x28 ### DECOMPILED C INSTRUCTIONS: void load_simple_entity_data(Entity* entity, EntityBlueprint* bp, s32 listIndex) { s32 loadedStart; s32 loadedEnd; s32 entitySize; u32 temp; s32 totalSize; entity->vertexSegment = 0xA; if (!gGameStatusPtr->isBattle) { totalSize = wEntityDataLoadedSize; } else { totalSize = bEntityDataLoadedSize; } if (is_entity_data_loaded(entity, bp, &loadedStart, &loadedEnd)) { if (totalSize + ((bp->dma.end - bp->dma.start) >> 2) > 0x5FFCU) { get_entity_type(entity->listIndex); get_entity_type(entity->listIndex); PANIC(); } entitySize = (bp->dma.end - bp->dma.start) >> 2; entity->gfxBaseAddr = (void*)(gEntityHeapBase - totalSize * 4 - entitySize * 4); totalSize += dma_copy(bp->dma.start, bp->dma.end, entity->gfxBaseAddr) >> 2; get_entity_type(entity->listIndex); } else { entitySize = (bp->dma.end - bp->dma.start) >> 2; entity->gfxBaseAddr = (void*)(gEntityHeapBase - loadedStart * 4 - entitySize * 4); get_entity_type(entity->listIndex); } if (!gGameStatusPtr->isBattle) { wEntityDataLoadedSize = totalSize; } else { bEntityDataLoadedSize = totalSize; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel atan2 /* 5080 80029C80 44863000 */ mtc1 $a2, $f6 /* 5084 80029C84 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 5088 80029C88 F7BA0030 */ sdc1 $f26, 0x30($sp) /* 508C 80029C8C 460C3681 */ sub.s $f26, $f6, $f12 /* 5090 80029C90 44873000 */ mtc1 $a3, $f6 /* 5094 80029C94 AFBF0010 */ sw $ra, 0x10($sp) /* 5098 80029C98 F7B80028 */ sdc1 $f24, 0x28($sp) /* 509C 80029C9C 460E3601 */ sub.s $f24, $f6, $f14 /* 50A0 80029CA0 F7B60020 */ sdc1 $f22, 0x20($sp) /* 50A4 80029CA4 F7B40018 */ sdc1 $f20, 0x18($sp) /* 50A8 80029CA8 4600D105 */ abs.s $f4, $f26 /* 50AC 80029CAC 4600C005 */ abs.s $f0, $f24 /* 50B0 80029CB0 4604003C */ c.lt.s $f0, $f4 /* 50B4 80029CB4 00000000 */ nop /* 50B8 80029CB8 45000029 */ bc1f .L80029D60 /* 50BC 80029CBC 00000000 */ nop /* 50C0 80029CC0 3C014234 */ lui $at, (0x42340000 >> 16) /* 50C4 80029CC4 44811000 */ mtc1 $at, $f2 /* 50C8 80029CC8 46040003 */ div.s $f0, $f0, $f4 /* 50CC 80029CCC 46020502 */ mul.s $f20, $f0, $f2 /* 50D0 80029CD0 00000000 */ nop /* 50D4 80029CD4 0C00A6B1 */ jal round /* 50D8 80029CD8 4614A300 */ add.s $f12, $f20, $f20 /* 50DC 80029CDC 00021080 */ sll $v0, $v0, 2 /* 50E0 80029CE0 3C018007 */ lui $at, %hi(D_80074414) /* 50E4 80029CE4 00220821 */ addu $at, $at, $v0 /* 50E8 80029CE8 C4204414 */ lwc1 $f0, %lo(D_80074414)($at) /* 50EC 80029CEC 4600A502 */ mul.s $f20, $f20, $f0 /* 50F0 80029CF0 00000000 */ nop /* 50F4 80029CF4 44800000 */ mtc1 $zero, $f0 /* 50F8 80029CF8 00000000 */ nop /* 50FC 80029CFC 461A003E */ c.le.s $f0, $f26 /* 5100 80029D00 00000000 */ nop /* 5104 80029D04 4500000D */ bc1f .L80029D3C /* 5108 80029D08 00000000 */ nop /* 510C 80029D0C 4618003E */ c.le.s $f0, $f24 /* 5110 80029D10 00000000 */ nop /* 5114 80029D14 45000005 */ bc1f .L80029D2C /* 5118 80029D18 00000000 */ nop /* 511C 80029D1C 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 5120 80029D20 44810000 */ mtc1 $at, $f0 /* 5124 80029D24 0800A781 */ j .L80029E04 /* 5128 80029D28 4600A000 */ add.s $f0, $f20, $f0 .L80029D2C: /* 512C 80029D2C 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 5130 80029D30 44810000 */ mtc1 $at, $f0 /* 5134 80029D34 0800A781 */ j .L80029E04 /* 5138 80029D38 46140001 */ sub.s $f0, $f0, $f20 .L80029D3C: /* 513C 80029D3C 4618003E */ c.le.s $f0, $f24 /* 5140 80029D40 3C014387 */ lui $at, (0x43870000 >> 16) /* 5144 80029D44 44810000 */ mtc1 $at, $f0 /* 5148 80029D48 4503002E */ bc1tl .L80029E04 /* 514C 80029D4C 46140001 */ sub.s $f0, $f0, $f20 /* 5150 80029D50 3C014387 */ lui $at, (0x43870000 >> 16) /* 5154 80029D54 44810000 */ mtc1 $at, $f0 /* 5158 80029D58 0800A781 */ j .L80029E04 /* 515C 80029D5C 4600A000 */ add.s $f0, $f20, $f0 .L80029D60: /* 5160 80029D60 4480B000 */ mtc1 $zero, $f22 /* 5164 80029D64 00000000 */ nop /* 5168 80029D68 46160032 */ c.eq.s $f0, $f22 /* 516C 80029D6C 00000000 */ nop /* 5170 80029D70 45020003 */ bc1fl .L80029D80 /* 5174 80029D74 46002003 */ div.s $f0, $f4, $f0 /* 5178 80029D78 0800A781 */ j .L80029E04 /* 517C 80029D7C 4600B006 */ mov.s $f0, $f22 .L80029D80: /* 5180 80029D80 3C014234 */ lui $at, (0x42340000 >> 16) /* 5184 80029D84 44811000 */ mtc1 $at, $f2 /* 5188 80029D88 00000000 */ nop /* 518C 80029D8C 46020502 */ mul.s $f20, $f0, $f2 /* 5190 80029D90 00000000 */ nop /* 5194 80029D94 0C00A6B1 */ jal round /* 5198 80029D98 4614A300 */ add.s $f12, $f20, $f20 /* 519C 80029D9C 00021080 */ sll $v0, $v0, 2 /* 51A0 80029DA0 3C018007 */ lui $at, %hi(D_80074414) /* 51A4 80029DA4 00220821 */ addu $at, $at, $v0 /* 51A8 80029DA8 C4204414 */ lwc1 $f0, %lo(D_80074414)($at) /* 51AC 80029DAC 4618B03E */ c.le.s $f22, $f24 /* 51B0 80029DB0 4600A502 */ mul.s $f20, $f20, $f0 /* 51B4 80029DB4 00000000 */ nop /* 51B8 80029DB8 4500000A */ bc1f .L80029DE4 /* 51BC 80029DBC 00000000 */ nop /* 51C0 80029DC0 461AB03E */ c.le.s $f22, $f26 /* 51C4 80029DC4 3C014334 */ lui $at, (0x43340000 >> 16) /* 51C8 80029DC8 44810000 */ mtc1 $at, $f0 /* 51CC 80029DCC 4503000D */ bc1tl .L80029E04 /* 51D0 80029DD0 46140001 */ sub.s $f0, $f0, $f20 /* 51D4 80029DD4 3C014334 */ lui $at, (0x43340000 >> 16) /* 51D8 80029DD8 44810000 */ mtc1 $at, $f0 /* 51DC 80029DDC 0800A781 */ j .L80029E04 /* 51E0 80029DE0 4600A000 */ add.s $f0, $f20, $f0 .L80029DE4: /* 51E4 80029DE4 461AB03E */ c.le.s $f22, $f26 /* 51E8 80029DE8 00000000 */ nop /* 51EC 80029DEC 45010005 */ bc1t .L80029E04 /* 51F0 80029DF0 4600A006 */ mov.s $f0, $f20 /* 51F4 80029DF4 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 51F8 80029DF8 44810000 */ mtc1 $at, $f0 /* 51FC 80029DFC 00000000 */ nop /* 5200 80029E00 46140001 */ sub.s $f0, $f0, $f20 .L80029E04: /* 5204 80029E04 8FBF0010 */ lw $ra, 0x10($sp) /* 5208 80029E08 D7BA0030 */ ldc1 $f26, 0x30($sp) /* 520C 80029E0C D7B80028 */ ldc1 $f24, 0x28($sp) /* 5210 80029E10 D7B60020 */ ldc1 $f22, 0x20($sp) /* 5214 80029E14 D7B40018 */ ldc1 $f20, 0x18($sp) /* 5218 80029E18 03E00008 */ jr $ra /* 521C 80029E1C 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: f32 atan2(f32 startX, f32 startZ, f32 endX, f32 endZ) { f32 xDiff = endX - startX; f32 zDiff = endZ - startZ; f32 absXDiff = fabsf(xDiff); f32 absZDiff = fabsf(zDiff); f32 ret; if (absZDiff < absXDiff) { ret = (absZDiff / absXDiff) * 45.0f; ret *= sAtanFactors[round(2.0f * ret)]; if (xDiff >= 0.0f) { if (zDiff >= 0.0f) { return ret + 90.0f; } else { return 90.0f - ret; } } if (zDiff >= 0.0f) { return 270.0f - ret; } else { return ret + 270.0f; } } else { if (absZDiff == 0.0f) { return 0.0f; } ret = (absXDiff / absZDiff) * 45.0f; ret *= sAtanFactors[round(2.0f * ret)]; if (zDiff >= 0.0f) { if (xDiff >= 0.0f) { return 180.0f - ret; } else { return ret + 180.0f; } } else if (!(xDiff >= 0.0f)) { return 360.0f - ret; } } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel phys_check_interactable_collision /* 7E624 800E5174 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 7E628 800E5178 2404FFFF */ addiu $a0, $zero, -0x1 /* 7E62C 800E517C 3C038011 */ lui $v1, %hi(gPlayerStatus) /* 7E630 800E5180 2463EFC8 */ addiu $v1, $v1, %lo(gPlayerStatus) /* 7E634 800E5184 AFBF0038 */ sw $ra, 0x38($sp) /* 7E638 800E5188 AFB30034 */ sw $s3, 0x34($sp) /* 7E63C 800E518C AFB20030 */ sw $s2, 0x30($sp) /* 7E640 800E5190 AFB1002C */ sw $s1, 0x2C($sp) /* 7E644 800E5194 AFB00028 */ sw $s0, 0x28($sp) /* 7E648 800E5198 F7B40040 */ sdc1 $f20, 0x40($sp) /* 7E64C 800E519C 8C620000 */ lw $v0, 0x0($v1) /* 7E650 800E51A0 30422000 */ andi $v0, $v0, 0x2000 /* 7E654 800E51A4 1440004B */ bnez $v0, .L800E52D4 /* 7E658 800E51A8 0060802D */ daddu $s0, $v1, $zero /* 7E65C 800E51AC 8E0200E0 */ lw $v0, 0xE0($s0) /* 7E660 800E51B0 30428000 */ andi $v0, $v0, 0x8000 /* 7E664 800E51B4 10400047 */ beqz $v0, .L800E52D4 /* 7E668 800E51B8 27B20018 */ addiu $s2, $sp, 0x18 /* 7E66C 800E51BC 0200202D */ daddu $a0, $s0, $zero /* 7E670 800E51C0 0240282D */ daddu $a1, $s2, $zero /* 7E674 800E51C4 27B1001C */ addiu $s1, $sp, 0x1C /* 7E678 800E51C8 0220302D */ daddu $a2, $s1, $zero /* 7E67C 800E51CC 27B30020 */ addiu $s3, $sp, 0x20 /* 7E680 800E51D0 0260382D */ daddu $a3, $s3, $zero /* 7E684 800E51D4 860200B2 */ lh $v0, 0xB2($s0) /* 7E688 800E51D8 C6080080 */ lwc1 $f8, 0x80($s0) /* 7E68C 800E51DC C6040028 */ lwc1 $f4, 0x28($s0) /* 7E690 800E51E0 C606002C */ lwc1 $f6, 0x2C($s0) /* 7E694 800E51E4 3C013F00 */ lui $at, (0x3F000000 >> 16) /* 7E698 800E51E8 4481A000 */ mtc1 $at, $f20 /* 7E69C 800E51EC C6020030 */ lwc1 $f2, 0x30($s0) /* 7E6A0 800E51F0 44820000 */ mtc1 $v0, $f0 /* 7E6A4 800E51F4 00000000 */ nop /* 7E6A8 800E51F8 46800020 */ cvt.s.w $f0, $f0 /* 7E6AC 800E51FC 46140002 */ mul.s $f0, $f0, $f20 /* 7E6B0 800E5200 00000000 */ nop /* 7E6B4 800E5204 E7A40018 */ swc1 $f4, 0x18($sp) /* 7E6B8 800E5208 E7A6001C */ swc1 $f6, 0x1C($sp) /* 7E6BC 800E520C E7A20020 */ swc1 $f2, 0x20($sp) /* 7E6C0 800E5210 E7A80014 */ swc1 $f8, 0x14($sp) /* 7E6C4 800E5214 0C037D18 */ jal player_test_move_with_slipping /* 7E6C8 800E5218 E7A00010 */ swc1 $f0, 0x10($sp) /* 7E6CC 800E521C 0040202D */ daddu $a0, $v0, $zero /* 7E6D0 800E5220 0481002D */ bgez $a0, .L800E52D8 /* 7E6D4 800E5224 0080102D */ daddu $v0, $a0, $zero /* 7E6D8 800E5228 C6020054 */ lwc1 $f2, 0x54($s0) /* 7E6DC 800E522C 44800000 */ mtc1 $zero, $f0 /* 7E6E0 800E5230 00000000 */ nop /* 7E6E4 800E5234 46001032 */ c.eq.s $f2, $f0 /* 7E6E8 800E5238 00000000 */ nop /* 7E6EC 800E523C 45000026 */ bc1f .L800E52D8 /* 7E6F0 800E5240 0240282D */ daddu $a1, $s2, $zero /* 7E6F4 800E5244 0200202D */ daddu $a0, $s0, $zero /* 7E6F8 800E5248 0220302D */ daddu $a2, $s1, $zero /* 7E6FC 800E524C 0260382D */ daddu $a3, $s3, $zero /* 7E700 800E5250 3C038007 */ lui $v1, %hi(gCurrentCameraID) /* 7E704 800E5254 8C637410 */ lw $v1, %lo(gCurrentCameraID)($v1) /* 7E708 800E5258 C4800028 */ lwc1 $f0, 0x28($a0) /* 7E70C 800E525C C482002C */ lwc1 $f2, 0x2C($a0) /* 7E710 800E5260 00031080 */ sll $v0, $v1, 2 /* 7E714 800E5264 00431021 */ addu $v0, $v0, $v1 /* 7E718 800E5268 00021080 */ sll $v0, $v0, 2 /* 7E71C 800E526C 00431023 */ subu $v0, $v0, $v1 /* 7E720 800E5270 E7A00018 */ swc1 $f0, 0x18($sp) /* 7E724 800E5274 E7A2001C */ swc1 $f2, 0x1C($sp) /* 7E728 800E5278 848300B2 */ lh $v1, 0xB2($a0) /* 7E72C 800E527C 000240C0 */ sll $t0, $v0, 3 /* 7E730 800E5280 44833000 */ mtc1 $v1, $f6 /* 7E734 800E5284 00000000 */ nop /* 7E738 800E5288 468031A0 */ cvt.s.w $f6, $f6 /* 7E73C 800E528C 46143182 */ mul.s $f6, $f6, $f20 /* 7E740 800E5290 00000000 */ nop /* 7E744 800E5294 00481021 */ addu $v0, $v0, $t0 /* 7E748 800E5298 C48000A8 */ lwc1 $f0, 0xA8($a0) /* 7E74C 800E529C 3C0142B4 */ lui $at, (0x42B40000 >> 16) /* 7E750 800E52A0 44811000 */ mtc1 $at, $f2 /* 7E754 800E52A4 000210C0 */ sll $v0, $v0, 3 /* 7E758 800E52A8 46020001 */ sub.s $f0, $f0, $f2 /* 7E75C 800E52AC 3C01800B */ lui $at, %hi(gCameras + 0x6C) /* 7E760 800E52B0 00220821 */ addu $at, $at, $v0 /* 7E764 800E52B4 C4221DEC */ lwc1 $f2, %lo(gCameras + 0x6C)($at) /* 7E768 800E52B8 C4840030 */ lwc1 $f4, 0x30($a0) /* 7E76C 800E52BC 46020200 */ add.s $f8, $f0, $f2 /* 7E770 800E52C0 E7A40020 */ swc1 $f4, 0x20($sp) /* 7E774 800E52C4 E7A60010 */ swc1 $f6, 0x10($sp) /* 7E778 800E52C8 0C037D18 */ jal player_test_move_with_slipping /* 7E77C 800E52CC E7A80014 */ swc1 $f8, 0x14($sp) /* 7E780 800E52D0 0040202D */ daddu $a0, $v0, $zero .L800E52D4: /* 7E784 800E52D4 0080102D */ daddu $v0, $a0, $zero .L800E52D8: /* 7E788 800E52D8 8FBF0038 */ lw $ra, 0x38($sp) /* 7E78C 800E52DC 8FB30034 */ lw $s3, 0x34($sp) /* 7E790 800E52E0 8FB20030 */ lw $s2, 0x30($sp) /* 7E794 800E52E4 8FB1002C */ lw $s1, 0x2C($sp) /* 7E798 800E52E8 8FB00028 */ lw $s0, 0x28($sp) /* 7E79C 800E52EC D7B40040 */ ldc1 $f20, 0x40($sp) /* 7E7A0 800E52F0 03E00008 */ jr $ra /* 7E7A4 800E52F4 27BD0048 */ addiu $sp, $sp, 0x48 ### DECOMPILED C INSTRUCTIONS: s32 phys_check_interactable_collision(void) { PlayerStatus* playerStatus = &gPlayerStatus; f32 x, y, z, yaw; s32 ret = -1; if (playerStatus->flags & PS_FLAG_INPUT_DISABLED) { return ret; } if (playerStatus->pressedButtons & BUTTON_A) { yaw = playerStatus->targetYaw; x = playerStatus->position.x; y = playerStatus->position.y; z = playerStatus->position.z; ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw); if (ret < 0 && playerStatus->currentSpeed == 0.0f) { yaw = playerStatus->spriteFacingAngle - 90.0f + gCameras[gCurrentCameraID].currentYaw; x = playerStatus->position.x; y = playerStatus->position.y; z = playerStatus->position.z; ret = player_test_move_with_slipping(playerStatus, &x, &y, &z, playerStatus->colliderDiameter * 0.5f, yaw); } } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel test_ray_collider_horizontal /* 386DC 8005D2DC 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 386E0 8005D2E0 F7B80040 */ sdc1 $f24, 0x40($sp) /* 386E4 8005D2E4 4486C000 */ mtc1 $a2, $f24 /* 386E8 8005D2E8 F7BA0048 */ sdc1 $f26, 0x48($sp) /* 386EC 8005D2EC 4487D000 */ mtc1 $a3, $f26 /* 386F0 8005D2F0 C7AC0070 */ lwc1 $f12, 0x70($sp) /* 386F4 8005D2F4 3C0140C9 */ lui $at, (0x40C90FD0 >> 16) /* 386F8 8005D2F8 34210FD0 */ ori $at, $at, (0x40C90FD0 & 0xFFFF) /* 386FC 8005D2FC 44810000 */ mtc1 $at, $f0 /* 38700 8005D300 F7BC0050 */ sdc1 $f28, 0x50($sp) /* 38704 8005D304 3C01BF80 */ lui $at, (0xBF800000 >> 16) /* 38708 8005D308 4481E000 */ mtc1 $at, $f28 /* 3870C 8005D30C AFB1001C */ sw $s1, 0x1C($sp) /* 38710 8005D310 0080882D */ daddu $s1, $a0, $zero /* 38714 8005D314 AFB00018 */ sw $s0, 0x18($sp) /* 38718 8005D318 00A0802D */ daddu $s0, $a1, $zero /* 3871C 8005D31C F7B40030 */ sdc1 $f20, 0x30($sp) /* 38720 8005D320 C7B40068 */ lwc1 $f20, 0x68($sp) /* 38724 8005D324 27A50010 */ addiu $a1, $sp, 0x10 /* 38728 8005D328 F7B60038 */ sdc1 $f22, 0x38($sp) /* 3872C 8005D32C C7B6006C */ lwc1 $f22, 0x6C($sp) /* 38730 8005D330 46006302 */ mul.s $f12, $f12, $f0 /* 38734 8005D334 00000000 */ nop /* 38738 8005D338 3C0143B4 */ lui $at, (0x43B40000 >> 16) /* 3873C 8005D33C 44810000 */ mtc1 $at, $f0 /* 38740 8005D340 27A60014 */ addiu $a2, $sp, 0x14 /* 38744 8005D344 AFBF0028 */ sw $ra, 0x28($sp) /* 38748 8005D348 AFB30024 */ sw $s3, 0x24($sp) /* 3874C 8005D34C AFB20020 */ sw $s2, 0x20($sp) /* 38750 8005D350 0C00A82D */ jal sin_cos_rad /* 38754 8005D354 46006303 */ div.s $f12, $f12, $f0 /* 38758 8005D358 3C13800B */ lui $s3, %hi(gCollisionData) /* 3875C 8005D35C 267342E0 */ addiu $s3, $s3, %lo(gCollisionData) /* 38760 8005D360 001010C0 */ sll $v0, $s0, 3 /* 38764 8005D364 00501023 */ subu $v0, $v0, $s0 /* 38768 8005D368 00021080 */ sll $v0, $v0, 2 /* 3876C 8005D36C 8E630004 */ lw $v1, 0x4($s3) /* 38770 8005D370 C7A00010 */ lwc1 $f0, 0x10($sp) /* 38774 8005D374 00629021 */ addu $s2, $v1, $v0 /* 38778 8005D378 8E420000 */ lw $v0, 0x0($s2) /* 3877C 8005D37C 3C01800A */ lui $at, %hi(gCollisionRayDirY) /* 38780 8005D380 AC204240 */ sw $zero, %lo(gCollisionRayDirY)($at) /* 38784 8005D384 3C01800A */ lui $at, %hi(gCollisionRayStartX) /* 38788 8005D388 E4384230 */ swc1 $f24, %lo(gCollisionRayStartX)($at) /* 3878C 8005D38C 3C01800A */ lui $at, %hi(gCollisionRayStartY) /* 38790 8005D390 E43A4234 */ swc1 $f26, %lo(gCollisionRayStartY)($at) /* 38794 8005D394 3C01800A */ lui $at, %hi(gCollisionRayStartZ) /* 38798 8005D398 E4344238 */ swc1 $f20, %lo(gCollisionRayStartZ)($at) /* 3879C 8005D39C 3C01800A */ lui $at, %hi(gCollisionRayLength) /* 387A0 8005D3A0 E4364254 */ swc1 $f22, %lo(gCollisionRayLength)($at) /* 387A4 8005D3A4 3C01800A */ lui $at, %hi(gCollisionRayDirX) /* 387A8 8005D3A8 E420423C */ swc1 $f0, %lo(gCollisionRayDirX)($at) /* 387AC 8005D3AC C7A00014 */ lwc1 $f0, 0x14($sp) /* 387B0 8005D3B0 00511024 */ and $v0, $v0, $s1 /* 387B4 8005D3B4 46000007 */ neg.s $f0, $f0 /* 387B8 8005D3B8 3C01800A */ lui $at, %hi(gCollisionRayDirZ) /* 387BC 8005D3BC E4204244 */ swc1 $f0, %lo(gCollisionRayDirZ)($at) /* 387C0 8005D3C0 14400015 */ bnez $v0, .L8005D418 /* 387C4 8005D3C4 4600E006 */ mov.s $f0, $f28 /* 387C8 8005D3C8 8642000A */ lh $v0, 0xA($s2) /* 387CC 8005D3CC 10400012 */ beqz $v0, .L8005D418 /* 387D0 8005D3D0 00000000 */ nop /* 387D4 8005D3D4 8E51000C */ lw $s1, 0xC($s2) /* 387D8 8005D3D8 1840000F */ blez $v0, .L8005D418 /* 387DC 8005D3DC 0000802D */ daddu $s0, $zero, $zero /* 387E0 8005D3E0 0220202D */ daddu $a0, $s1, $zero .L8005D3E4: /* 387E4 8005D3E4 8E650000 */ lw $a1, 0x0($s3) /* 387E8 8005D3E8 0C0171E9 */ jal test_ray_triangle_horizontal /* 387EC 8005D3EC 26310040 */ addiu $s1, $s1, 0x40 /* 387F0 8005D3F0 10400003 */ beqz $v0, .L8005D400 /* 387F4 8005D3F4 00000000 */ nop /* 387F8 8005D3F8 3C01800A */ lui $at, %hi(gCollisionRayLength) /* 387FC 8005D3FC C43C4254 */ lwc1 $f28, %lo(gCollisionRayLength)($at) .L8005D400: /* 38800 8005D400 8642000A */ lh $v0, 0xA($s2) /* 38804 8005D404 26100001 */ addiu $s0, $s0, 0x1 /* 38808 8005D408 0202102A */ slt $v0, $s0, $v0 /* 3880C 8005D40C 1440FFF5 */ bnez $v0, .L8005D3E4 /* 38810 8005D410 0220202D */ daddu $a0, $s1, $zero /* 38814 8005D414 4600E006 */ mov.s $f0, $f28 .L8005D418: /* 38818 8005D418 8FBF0028 */ lw $ra, 0x28($sp) /* 3881C 8005D41C 8FB30024 */ lw $s3, 0x24($sp) /* 38820 8005D420 8FB20020 */ lw $s2, 0x20($sp) /* 38824 8005D424 8FB1001C */ lw $s1, 0x1C($sp) /* 38828 8005D428 8FB00018 */ lw $s0, 0x18($sp) /* 3882C 8005D42C D7BC0050 */ ldc1 $f28, 0x50($sp) /* 38830 8005D430 D7BA0048 */ ldc1 $f26, 0x48($sp) /* 38834 8005D434 D7B80040 */ ldc1 $f24, 0x40($sp) /* 38838 8005D438 D7B60038 */ ldc1 $f22, 0x38($sp) /* 3883C 8005D43C D7B40030 */ ldc1 $f20, 0x30($sp) /* 38840 8005D440 03E00008 */ jr $ra /* 38844 8005D444 27BD0058 */ addiu $sp, $sp, 0x58 ### DECOMPILED C INSTRUCTIONS: f32 test_ray_collider_horizontal(s32 ignoreFlags, s32 colliderID, f32 x, f32 y, f32 z, f32 length, f32 yaw) { CollisionData* collisionData = &gCollisionData; f32 cosTheta; f32 sinTheta; Collider* collider; ColliderTriangle* triangleTable; s32 i; f32 ret; sin_cos_rad(DEG_TO_RAD(yaw), &sinTheta, &cosTheta); collider = &collisionData->colliderList[colliderID]; gCollisionRayDirY = 0; gCollisionRayStartX = x; gCollisionRayStartY = y; gCollisionRayStartZ = z; gCollisionRayLength = length; gCollisionRayDirX = sinTheta; gCollisionRayDirZ = -cosTheta; ret = -1.0f; if (!(collider->flags & ignoreFlags) && collider->numTriangles != 0) { triangleTable = collider->triangleTable; for (i = 0; i < collider->numTriangles; i++) if (test_ray_triangle_horizontal(triangleTable++, collisionData->vertices)) ret = gCollisionRayLength; } return ret; }
### RAW ASSEMBLY INSTRUCTIONS: glabel entity_WoodenCrate_init_fragments /* 109660 802E7DE0 27BDFF48 */ addiu $sp, $sp, -0xB8 /* 109664 802E7DE4 AFB3009C */ sw $s3, 0x9C($sp) /* 109668 802E7DE8 0080982D */ daddu $s3, $a0, $zero /* 10966C 802E7DEC AFB400A0 */ sw $s4, 0xA0($sp) /* 109670 802E7DF0 00C0A02D */ daddu $s4, $a2, $zero /* 109674 802E7DF4 27A40050 */ addiu $a0, $sp, 0x50 /* 109678 802E7DF8 AFB20098 */ sw $s2, 0x98($sp) /* 10967C 802E7DFC 0000902D */ daddu $s2, $zero, $zero /* 109680 802E7E00 AFB600A8 */ sw $s6, 0xA8($sp) /* 109684 802E7E04 24160014 */ addiu $s6, $zero, 0x14 /* 109688 802E7E08 AFB500A4 */ sw $s5, 0xA4($sp) /* 10968C 802E7E0C 2415FFF6 */ addiu $s5, $zero, -0xA /* 109690 802E7E10 AFBF00AC */ sw $ra, 0xAC($sp) /* 109694 802E7E14 AFB10094 */ sw $s1, 0x94($sp) /* 109698 802E7E18 AFB00090 */ sw $s0, 0x90($sp) /* 10969C 802E7E1C F7B400B0 */ sdc1 $f20, 0xB0($sp) /* 1096A0 802E7E20 8E620040 */ lw $v0, 0x40($s3) /* 1096A4 802E7E24 30A5FFFF */ andi $a1, $a1, 0xFFFF /* 1096A8 802E7E28 0040802D */ daddu $s0, $v0, $zero /* 1096AC 802E7E2C 8E620044 */ lw $v0, 0x44($s3) /* 1096B0 802E7E30 3C014120 */ lui $at, (0x41200000 >> 16) /* 1096B4 802E7E34 4481A000 */ mtc1 $at, $f20 /* 1096B8 802E7E38 00451021 */ addu $v0, $v0, $a1 /* 1096BC 802E7E3C AE020008 */ sw $v0, 0x8($s0) /* 1096C0 802E7E40 3C02802F */ lui $v0, %hi(entity_WoodenCrate_setupGfx) /* 1096C4 802E7E44 2442854C */ addiu $v0, $v0, %lo(entity_WoodenCrate_setupGfx) /* 1096C8 802E7E48 AE62003C */ sw $v0, 0x3C($s3) /* 1096CC 802E7E4C 240200FF */ addiu $v0, $zero, 0xFF /* 1096D0 802E7E50 A262000B */ sb $v0, 0xB($s3) /* 1096D4 802E7E54 C600000C */ lwc1 $f0, 0xC($s0) /* 1096D8 802E7E58 8E650048 */ lw $a1, 0x48($s3) /* 1096DC 802E7E5C 8E670050 */ lw $a3, 0x50($s3) /* 1096E0 802E7E60 44060000 */ mfc1 $a2, $f0 /* 1096E4 802E7E64 0200882D */ daddu $s1, $s0, $zero /* 1096E8 802E7E68 0C019E40 */ jal guTranslateF /* 1096EC 802E7E6C AE66004C */ sw $a2, 0x4C($s3) .L802E7E70: /* 1096F0 802E7E70 3282FFFF */ andi $v0, $s4, 0xFFFF /* 1096F4 802E7E74 26940040 */ addiu $s4, $s4, 0x40 /* 1096F8 802E7E78 8E650044 */ lw $a1, 0x44($s3) /* 1096FC 802E7E7C 27A40010 */ addiu $a0, $sp, 0x10 /* 109700 802E7E80 0C019D60 */ jal guMtxL2F /* 109704 802E7E84 00A22821 */ addu $a1, $a1, $v0 /* 109708 802E7E88 27A40050 */ addiu $a0, $sp, 0x50 /* 10970C 802E7E8C 27A50010 */ addiu $a1, $sp, 0x10 /* 109710 802E7E90 0C019D80 */ jal guMtxCatF /* 109714 802E7E94 00A0302D */ daddu $a2, $a1, $zero /* 109718 802E7E98 C7A00040 */ lwc1 $f0, 0x40($sp) /* 10971C 802E7E9C E6000154 */ swc1 $f0, 0x154($s0) /* 109720 802E7EA0 C7A00044 */ lwc1 $f0, 0x44($sp) /* 109724 802E7EA4 E60001E4 */ swc1 $f0, 0x1E4($s0) /* 109728 802E7EA8 C7A00048 */ lwc1 $f0, 0x48($sp) /* 10972C 802E7EAC 240400FF */ addiu $a0, $zero, 0xFF /* 109730 802E7EB0 0C00A67F */ jal rand_int /* 109734 802E7EB4 E6000274 */ swc1 $f0, 0x274($s0) /* 109738 802E7EB8 24040005 */ addiu $a0, $zero, 0x5 /* 10973C 802E7EBC 00021023 */ negu $v0, $v0 /* 109740 802E7EC0 A2220034 */ sb $v0, 0x34($s1) /* 109744 802E7EC4 0C00A67F */ jal rand_int /* 109748 802E7EC8 A23600A0 */ sb $s6, 0xA0($s1) /* 10974C 802E7ECC 0040182D */ daddu $v1, $v0, $zero /* 109750 802E7ED0 32420001 */ andi $v0, $s2, 0x1 /* 109754 802E7ED4 14400002 */ bnez $v0, .L802E7EE0 /* 109758 802E7ED8 2462000A */ addiu $v0, $v1, 0xA /* 10975C 802E7EDC 02A31023 */ subu $v0, $s5, $v1 .L802E7EE0: /* 109760 802E7EE0 44820000 */ mtc1 $v0, $f0 /* 109764 802E7EE4 00000000 */ nop /* 109768 802E7EE8 46800020 */ cvt.s.w $f0, $f0 /* 10976C 802E7EEC E60000C4 */ swc1 $f0, 0xC4($s0) /* 109770 802E7EF0 E6140304 */ swc1 $f20, 0x304($s0) /* 109774 802E7EF4 A2200010 */ sb $zero, 0x10($s1) /* 109778 802E7EF8 A2200058 */ sb $zero, 0x58($s1) /* 10977C 802E7EFC A220007C */ sb $zero, 0x7C($s1) /* 109780 802E7F00 26310001 */ addiu $s1, $s1, 0x1 /* 109784 802E7F04 26520001 */ addiu $s2, $s2, 0x1 /* 109788 802E7F08 2A420023 */ slti $v0, $s2, 0x23 /* 10978C 802E7F0C 1440FFD8 */ bnez $v0, .L802E7E70 /* 109790 802E7F10 26100004 */ addiu $s0, $s0, 0x4 /* 109794 802E7F14 8FBF00AC */ lw $ra, 0xAC($sp) /* 109798 802E7F18 8FB600A8 */ lw $s6, 0xA8($sp) /* 10979C 802E7F1C 8FB500A4 */ lw $s5, 0xA4($sp) /* 1097A0 802E7F20 8FB400A0 */ lw $s4, 0xA0($sp) /* 1097A4 802E7F24 8FB3009C */ lw $s3, 0x9C($sp) /* 1097A8 802E7F28 8FB20098 */ lw $s2, 0x98($sp) /* 1097AC 802E7F2C 8FB10094 */ lw $s1, 0x94($sp) /* 1097B0 802E7F30 8FB00090 */ lw $s0, 0x90($sp) /* 1097B4 802E7F34 D7B400B0 */ ldc1 $f20, 0xB0($sp) /* 1097B8 802E7F38 03E00008 */ jr $ra /* 1097BC 802E7F3C 27BD00B8 */ addiu $sp, $sp, 0xB8 ### DECOMPILED C INSTRUCTIONS: void entity_WoodenCrate_init_fragments(Entity* entity, Gfx** dlists, Mtx* matrices) { WoodenCrateData* data = entity->dataBuf.crate; Matrix4f mtxFragment; Matrix4f mtxTrans; s32 i; s32 rotationSpeed; data->fragmentsGfx = ENTITY_ADDR(entity, Gfx**, dlists); entity->renderSetupFunc = entity_WoodenCrate_setupGfx; entity->alpha = 255; entity->position.y = data->basePosY; guTranslateF(mtxTrans, entity->position.x, entity->position.y, entity->position.z); for (i = 0; i < 35; 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); data->fragmentLateralSpeed[i] = 20; rotationSpeed = rand_int(5); if (i % 2 != 0) { data->fragmentRotationSpeed[i] = rotationSpeed + 10; } else { data->fragmentRotationSpeed[i] = -10 - rotationSpeed; } data->fragmentFallSpeed[i] = 10.0f; data->fragmentRebounds[i] = 0; data->fragmentRotX[i] = 0; data->fragmentRotY[i] = 0; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel MakeEntity /* A8438 80111D38 27BDFFB0 */ addiu $sp, $sp, -0x50 /* A843C 80111D3C AFB20030 */ sw $s2, 0x30($sp) /* A8440 80111D40 0080902D */ daddu $s2, $a0, $zero /* A8444 80111D44 24020001 */ addiu $v0, $zero, 0x1 /* A8448 80111D48 AFBF004C */ sw $ra, 0x4C($sp) /* A844C 80111D4C AFBE0048 */ sw $fp, 0x48($sp) /* A8450 80111D50 AFB70044 */ sw $s7, 0x44($sp) /* A8454 80111D54 AFB60040 */ sw $s6, 0x40($sp) /* A8458 80111D58 AFB5003C */ sw $s5, 0x3C($sp) /* A845C 80111D5C AFB40038 */ sw $s4, 0x38($sp) /* A8460 80111D60 AFB30034 */ sw $s3, 0x34($sp) /* A8464 80111D64 AFB1002C */ sw $s1, 0x2C($sp) /* A8468 80111D68 AFB00028 */ sw $s0, 0x28($sp) /* A846C 80111D6C 8E50000C */ lw $s0, 0xC($s2) /* A8470 80111D70 14A2003E */ bne $a1, $v0, .L80111E6C /* A8474 80111D74 24020002 */ addiu $v0, $zero, 0x2 /* A8478 80111D78 8E050000 */ lw $a1, 0x0($s0) /* A847C 80111D7C 26100004 */ addiu $s0, $s0, 0x4 /* A8480 80111D80 0240202D */ daddu $a0, $s2, $zero /* A8484 80111D84 3C118016 */ lui $s1, %hi(CreateEntityVarArgBuffer2) /* A8488 80111D88 2631C7D8 */ addiu $s1, $s1, %lo(CreateEntityVarArgBuffer2) /* A848C 80111D8C 0C0B1EAF */ jal evt_get_variable /* A8490 80111D90 3C148000 */ lui $s4, (0x80000000 >> 16) /* A8494 80111D94 8E050000 */ lw $a1, 0x0($s0) /* A8498 80111D98 26100004 */ addiu $s0, $s0, 0x4 /* A849C 80111D9C 0240202D */ daddu $a0, $s2, $zero /* A84A0 80111DA0 0C0B1EAF */ jal evt_get_variable /* A84A4 80111DA4 0040F02D */ daddu $fp, $v0, $zero /* A84A8 80111DA8 8E050000 */ lw $a1, 0x0($s0) /* A84AC 80111DAC 26100004 */ addiu $s0, $s0, 0x4 /* A84B0 80111DB0 0240202D */ daddu $a0, $s2, $zero /* A84B4 80111DB4 0C0B1EAF */ jal evt_get_variable /* A84B8 80111DB8 0040B02D */ daddu $s6, $v0, $zero /* A84BC 80111DBC 8E050000 */ lw $a1, 0x0($s0) /* A84C0 80111DC0 26100004 */ addiu $s0, $s0, 0x4 /* A84C4 80111DC4 0240202D */ daddu $a0, $s2, $zero /* A84C8 80111DC8 0C0B1EAF */ jal evt_get_variable /* A84CC 80111DCC 0040B82D */ daddu $s7, $v0, $zero /* A84D0 80111DD0 8E050000 */ lw $a1, 0x0($s0) /* A84D4 80111DD4 26100004 */ addiu $s0, $s0, 0x4 /* A84D8 80111DD8 0240202D */ daddu $a0, $s2, $zero /* A84DC 80111DDC 0C0B1EAF */ jal evt_get_variable /* A84E0 80111DE0 0040A82D */ daddu $s5, $v0, $zero /* A84E4 80111DE4 0040982D */ daddu $s3, $v0, $zero /* A84E8 80111DE8 AE200000 */ sw $zero, 0x0($s1) /* A84EC 80111DEC 2631FFFC */ addiu $s1, $s1, -0x4 /* A84F0 80111DF0 AE200000 */ sw $zero, 0x0($s1) /* A84F4 80111DF4 2631FFFC */ addiu $s1, $s1, -0x4 /* A84F8 80111DF8 AE200000 */ sw $zero, 0x0($s1) .L80111DFC: /* A84FC 80111DFC 8E050000 */ lw $a1, 0x0($s0) /* A8500 80111E00 26100004 */ addiu $s0, $s0, 0x4 /* A8504 80111E04 0C0B1EAF */ jal evt_get_variable /* A8508 80111E08 0240202D */ daddu $a0, $s2, $zero /* A850C 80111E0C 10540004 */ beq $v0, $s4, .L80111E20 /* A8510 80111E10 03C0202D */ daddu $a0, $fp, $zero /* A8514 80111E14 AE220000 */ sw $v0, 0x0($s1) /* A8518 80111E18 0804477F */ j .L80111DFC /* A851C 80111E1C 26310004 */ addiu $s1, $s1, 0x4 .L80111E20: /* A8520 80111E20 3C028016 */ lui $v0, %hi(CreateEntityVarArgBuffer) /* A8524 80111E24 2442C7D0 */ addiu $v0, $v0, %lo(CreateEntityVarArgBuffer) /* A8528 80111E28 02C0282D */ daddu $a1, $s6, $zero /* A852C 80111E2C 8C430000 */ lw $v1, 0x0($v0) /* A8530 80111E30 8C460004 */ lw $a2, 0x4($v0) /* A8534 80111E34 8C420008 */ lw $v0, 0x8($v0) /* A8538 80111E38 02A0382D */ daddu $a3, $s5, $zero /* A853C 80111E3C AFB30010 */ sw $s3, 0x10($sp) /* A8540 80111E40 AFB40020 */ sw $s4, 0x20($sp) /* A8544 80111E44 AFA60018 */ sw $a2, 0x18($sp) /* A8548 80111E48 02E0302D */ daddu $a2, $s7, $zero /* A854C 80111E4C AFA30014 */ sw $v1, 0x14($sp) /* A8550 80111E50 0C044631 */ jal create_entity /* A8554 80111E54 AFA2001C */ sw $v0, 0x1C($sp) /* A8558 80111E58 0040182D */ daddu $v1, $v0, $zero /* A855C 80111E5C 24020002 */ addiu $v0, $zero, 0x2 /* A8560 80111E60 3C018015 */ lui $at, %hi(gLastCreatedEntityIndex) /* A8564 80111E64 AC2312EC */ sw $v1, %lo(gLastCreatedEntityIndex)($at) /* A8568 80111E68 AE430084 */ sw $v1, 0x84($s2) .L80111E6C: /* A856C 80111E6C 8FBF004C */ lw $ra, 0x4C($sp) /* A8570 80111E70 8FBE0048 */ lw $fp, 0x48($sp) /* A8574 80111E74 8FB70044 */ lw $s7, 0x44($sp) /* A8578 80111E78 8FB60040 */ lw $s6, 0x40($sp) /* A857C 80111E7C 8FB5003C */ lw $s5, 0x3C($sp) /* A8580 80111E80 8FB40038 */ lw $s4, 0x38($sp) /* A8584 80111E84 8FB30034 */ lw $s3, 0x34($sp) /* A8588 80111E88 8FB20030 */ lw $s2, 0x30($sp) /* A858C 80111E8C 8FB1002C */ lw $s1, 0x2C($sp) /* A8590 80111E90 8FB00028 */ lw $s0, 0x28($sp) /* A8594 80111E94 03E00008 */ jr $ra /* A8598 80111E98 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: s32 MakeEntity(Evt* script, s32 isInitialCall) { Bytecode* args = script->ptrReadPos; EntityBlueprint* entityData; s32 x, y, z; s32 flags; s32 nextArg; s32 entityIndex; s32 endOfArgs; s32* varArgBufPos; if (isInitialCall != TRUE) { return ApiStatus_DONE2; } entityData = (EntityBlueprint*)evt_get_variable(script, *args++); varArgBufPos = &CreateEntityVarArgBuffer[2]; endOfArgs = MAKE_ENTITY_END; x = evt_get_variable(script, *args++); y = evt_get_variable(script, *args++); z = evt_get_variable(script, *args++); flags = evt_get_variable(script, *args++); *varArgBufPos-- = 0; *varArgBufPos-- = 0; *varArgBufPos = 0; do { nextArg = evt_get_variable(script, *args++); if (nextArg != endOfArgs) { *varArgBufPos++ = nextArg; } } while (nextArg != endOfArgs); entityIndex = create_entity(entityData, x, y, z, flags, CreateEntityVarArgBuffer[0], CreateEntityVarArgBuffer[1], CreateEntityVarArgBuffer[2], endOfArgs); gLastCreatedEntityIndex = entityIndex; script->varTable[0] = entityIndex; return ApiStatus_DONE2; }
### RAW ASSEMBLY INSTRUCTIONS: glabel update_encounters_conversation /* 1E49C 8004309C 3C03800A */ lui $v1, %hi(gEncounterSubState) /* 1E4A0 800430A0 8C63A5D0 */ lw $v1, %lo(gEncounterSubState)($v1) /* 1E4A4 800430A4 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 1E4A8 800430A8 AFB10014 */ sw $s1, 0x14($sp) /* 1E4AC 800430AC 3C11800B */ lui $s1, %hi(gCurrentEncounter) /* 1E4B0 800430B0 26310F10 */ addiu $s1, $s1, %lo(gCurrentEncounter) /* 1E4B4 800430B4 AFBF0018 */ sw $ra, 0x18($sp) /* 1E4B8 800430B8 10600006 */ beqz $v1, .L800430D4 /* 1E4BC 800430BC AFB00010 */ sw $s0, 0x10($sp) /* 1E4C0 800430C0 24020001 */ addiu $v0, $zero, 0x1 /* 1E4C4 800430C4 1062001B */ beq $v1, $v0, .L80043134 /* 1E4C8 800430C8 00000000 */ nop /* 1E4CC 800430CC 08010C70 */ j .L800431C0 /* 1E4D0 800430D0 00000000 */ nop .L800430D4: /* 1E4D4 800430D4 8E30008C */ lw $s0, 0x8C($s1) /* 1E4D8 800430D8 8E020038 */ lw $v0, 0x38($s0) /* 1E4DC 800430DC 10400007 */ beqz $v0, .L800430FC /* 1E4E0 800430E0 0000882D */ daddu $s1, $zero, $zero /* 1E4E4 800430E4 8E040050 */ lw $a0, 0x50($s0) /* 1E4E8 800430E8 0C0B1059 */ jal does_script_exist /* 1E4EC 800430EC 00000000 */ nop /* 1E4F0 800430F0 50400002 */ beql $v0, $zero, .L800430FC /* 1E4F4 800430F4 AE000038 */ sw $zero, 0x38($s0) /* 1E4F8 800430F8 24110001 */ addiu $s1, $zero, 0x1 .L800430FC: /* 1E4FC 800430FC 8E020040 */ lw $v0, 0x40($s0) /* 1E500 80043100 10400006 */ beqz $v0, .L8004311C /* 1E504 80043104 00000000 */ nop /* 1E508 80043108 0C0B1059 */ jal does_script_exist /* 1E50C 8004310C 8E040058 */ lw $a0, 0x58($s0) /* 1E510 80043110 50400002 */ beql $v0, $zero, .L8004311C /* 1E514 80043114 AE000040 */ sw $zero, 0x40($s0) /* 1E518 80043118 24110001 */ addiu $s1, $zero, 0x1 .L8004311C: /* 1E51C 8004311C 16200028 */ bnez $s1, .L800431C0 /* 1E520 80043120 24020001 */ addiu $v0, $zero, 0x1 /* 1E524 80043124 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1E528 80043128 AC22A5D0 */ sw $v0, %lo(gEncounterSubState)($at) /* 1E52C 8004312C 08010C70 */ j .L800431C0 /* 1E530 80043130 00000000 */ nop .L80043134: /* 1E534 80043134 0C0B1192 */ jal resume_all_group /* 1E538 80043138 24040001 */ addiu $a0, $zero, 0x1 /* 1E53C 8004313C 8E30008C */ lw $s0, 0x8C($s1) /* 1E540 80043140 12000006 */ beqz $s0, .L8004315C /* 1E544 80043144 00000000 */ nop /* 1E548 80043148 8E02003C */ lw $v0, 0x3C($s0) /* 1E54C 8004314C 10400003 */ beqz $v0, .L8004315C /* 1E550 80043150 00000000 */ nop /* 1E554 80043154 0C0B1123 */ jal resume_all_script /* 1E558 80043158 8E040054 */ lw $a0, 0x54($s0) .L8004315C: /* 1E55C 8004315C 0C038069 */ jal enable_player_input /* 1E560 80043160 00000000 */ nop /* 1E564 80043164 0C03BD80 */ jal partner_enable_input /* 1E568 80043168 00000000 */ nop /* 1E56C 8004316C 3C028011 */ lui $v0, %hi(gPlayerStatus) /* 1E570 80043170 2442EFC8 */ addiu $v0, $v0, %lo(gPlayerStatus) /* 1E574 80043174 804300B4 */ lb $v1, 0xB4($v0) /* 1E578 80043178 2402000C */ addiu $v0, $zero, 0xC /* 1E57C 8004317C 14620003 */ bne $v1, $v0, .L8004318C /* 1E580 80043180 00000000 */ nop /* 1E584 80043184 0C039769 */ jal set_action_state /* 1E588 80043188 0000202D */ daddu $a0, $zero, $zero .L8004318C: /* 1E58C 8004318C 0C03BCF5 */ jal func_800EF3D4 /* 1E590 80043190 0000202D */ daddu $a0, $zero, $zero /* 1E594 80043194 24040010 */ addiu $a0, $zero, 0x10 /* 1E598 80043198 0C0B1192 */ jal resume_all_group /* 1E59C 8004319C A2200005 */ sb $zero, 0x5($s1) /* 1E5A0 800431A0 24020002 */ addiu $v0, $zero, 0x2 /* 1E5A4 800431A4 3C01800A */ lui $at, %hi(gEncounterState) /* 1E5A8 800431A8 AC22A600 */ sw $v0, %lo(gEncounterState)($at) /* 1E5AC 800431AC 24020001 */ addiu $v0, $zero, 0x1 /* 1E5B0 800431B0 3C01800A */ lui $at, %hi(D_8009A678) /* 1E5B4 800431B4 AC22A678 */ sw $v0, %lo(D_8009A678)($at) /* 1E5B8 800431B8 3C01800A */ lui $at, %hi(gEncounterSubState) /* 1E5BC 800431BC AC20A5D0 */ sw $zero, %lo(gEncounterSubState)($at) .L800431C0: /* 1E5C0 800431C0 8FBF0018 */ lw $ra, 0x18($sp) /* 1E5C4 800431C4 8FB10014 */ lw $s1, 0x14($sp) /* 1E5C8 800431C8 8FB00010 */ lw $s0, 0x10($sp) /* 1E5CC 800431CC 03E00008 */ jr $ra /* 1E5D0 800431D0 27BD0020 */ addiu $sp, $sp, 0x20 ### DECOMPILED C INSTRUCTIONS: void update_encounters_conversation(void) { EncounterStatus* encounter = &gCurrentEncounter; PlayerStatus* playerStatus = &gPlayerStatus; Enemy* currentEnemy; s32 flag; switch (gEncounterSubState) { case ENCOUNTER_SUBSTATE_CONVERSATION_INIT: currentEnemy = encounter->currentEnemy; flag = FALSE; if (currentEnemy->interactScript != NULL) { if (does_script_exist(currentEnemy->interactScriptID)) { flag = TRUE; } else { currentEnemy->interactScript = NULL; } } if (currentEnemy->hitScript != NULL) { if (does_script_exist(currentEnemy->hitScriptID)) { flag = TRUE; } else { currentEnemy->hitScript = NULL; } } if (!flag) { gEncounterSubState = ENCOUNTER_SUBSTATE_CONVERSATION_END; } break; case ENCOUNTER_SUBSTATE_CONVERSATION_END: resume_all_group(EVT_GROUP_01); currentEnemy = encounter->currentEnemy; if (currentEnemy != NULL && currentEnemy->aiScript != NULL) { resume_all_script(currentEnemy->aiScriptID); } enable_player_input(); partner_enable_input(); if (playerStatus->actionState == ACTION_STATE_TALK) { set_action_state(ACTION_STATE_IDLE); } func_800EF3D4(0); encounter->hitType = 0; resume_all_group(EVT_GROUP_10); gEncounterState = ENCOUNTER_STATE_NEUTRAL; D_8009A678 = 1; gEncounterSubState = ENCOUNTER_SUBSTATE_NEUTRAL; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel func_802B6348 /* E24388 802B6348 27BDFFB0 */ addiu $sp, $sp, -0x50 /* E2438C 802B634C 3C058011 */ lui $a1, %hi(gPlayerStatus) PlayerTweesterPhysicsPtr: /* E24390 802B6350 24A5EFC8 */ addiu $a1, $a1, %lo(gPlayerStatus) glabel .L802B6354 /* E24394 802B6354 AFBF004C */ sw $ra, 0x4C($sp) /* E24398 802B6358 AFB00048 */ sw $s0, 0x48($sp) .L802B635C: /* E2439C 802B635C 8CA20004 */ lw $v0, 0x4($a1) D_802B6360: /* E243A0 802B6360 30421000 */ andi $v0, $v0, 0x1000 .L802B6364: /* E243A4 802B6364 10400005 */ beqz $v0, .L802B637C /* E243A8 802B6368 00A0802D */ daddu $s0, $a1, $zero .L802B636C: /* E243AC 802B636C 0C0AD942 */ jal action_update_pushing_block glabel .L802B6370 /* E243B0 802B6370 00000000 */ nop .L802B6374: /* E243B4 802B6374 080AD91B */ j .L802B646C /* E243B8 802B6378 00000000 */ nop glabel .L802B637C /* E243BC 802B637C 8CA30000 */ lw $v1, 0x0($a1) /* E243C0 802B6380 0461000A */ bgez $v1, .L802B63AC /* E243C4 802B6384 3C027FFF */ lui $v0, (0x7FFFFFF5 >> 16) /* E243C8 802B6388 3442FFF5 */ ori $v0, $v0, (0x7FFFFFF5 & 0xFFFF) /* E243CC 802B638C 00621024 */ and $v0, $v1, $v0 /* E243D0 802B6390 3C04800B */ lui $a0, %hi(gCameras) glabel .L802B6394 /* E243D4 802B6394 24841D80 */ addiu $a0, $a0, %lo(gCameras) .L802B6398: /* E243D8 802B6398 94830002 */ lhu $v1, 0x2($a0) .L802B639C: /* E243DC 802B639C 34420004 */ ori $v0, $v0, 0x4 /* E243E0 802B63A0 ACA20000 */ sw $v0, 0x0($a1) /* E243E4 802B63A4 34630001 */ ori $v1, $v1, 0x1 .L802B63A8: /* E243E8 802B63A8 A4830002 */ sh $v1, 0x2($a0) .L802B63AC: /* E243EC 802B63AC 960200C0 */ lhu $v0, 0xC0($s0) glabel .L802B63B0 /* E243F0 802B63B0 24420001 */ addiu $v0, $v0, 0x1 /* E243F4 802B63B4 0C039454 */ jal phys_update_interact_collider /* E243F8 802B63B8 A60200C0 */ sh $v0, 0xC0($s0) /* E243FC 802B63BC 0200202D */ daddu $a0, $s0, $zero .L802B63C0: /* E24400 802B63C0 27A50028 */ addiu $a1, $sp, 0x28 .L802B63C4: /* E24404 802B63C4 27A6002C */ addiu $a2, $sp, 0x2C .L802B63C8: /* E24408 802B63C8 C6000028 */ lwc1 $f0, 0x28($s0) .L802B63CC: /* E2440C 802B63CC C602002C */ lwc1 $f2, 0x2C($s0) .L802B63D0: /* E24410 802B63D0 C6040030 */ lwc1 $f4, 0x30($s0) glabel action_update_first_strike /* E24414 802B63D4 860200B0 */ lh $v0, 0xB0($s0) .L802B63D8: /* E24418 802B63D8 27A70030 */ addiu $a3, $sp, 0x30 glabel .L802B63DC /* E2441C 802B63DC E7A00028 */ swc1 $f0, 0x28($sp) .L802B63E0: /* E24420 802B63E0 44820000 */ mtc1 $v0, $f0 .L802B63E4: /* E24424 802B63E4 00000000 */ nop /* E24428 802B63E8 46800020 */ cvt.s.w $f0, $f0 /* E2442C 802B63EC 27A20034 */ addiu $v0, $sp, 0x34 .L802B63F0: /* E24430 802B63F0 E7A2002C */ swc1 $f2, 0x2C($sp) .L802B63F4: /* E24434 802B63F4 E7A40030 */ swc1 $f4, 0x30($sp) /* E24438 802B63F8 E7A00034 */ swc1 $f0, 0x34($sp) /* E2443C 802B63FC AFA20010 */ sw $v0, 0x10($sp) .L802B6400: /* E24440 802B6400 27A20038 */ addiu $v0, $sp, 0x38 /* E24444 802B6404 AFA20014 */ sw $v0, 0x14($sp) /* E24448 802B6408 27A2003C */ addiu $v0, $sp, 0x3C .L802B640C: /* E2444C 802B640C AFA20018 */ sw $v0, 0x18($sp) /* E24450 802B6410 27A20040 */ addiu $v0, $sp, 0x40 .L802B6414: /* E24454 802B6414 AFA2001C */ sw $v0, 0x1C($sp) .L802B6418: /* E24458 802B6418 27A20044 */ addiu $v0, $sp, 0x44 /* E2445C 802B641C 0C03791B */ jal player_raycast_below_cam_relative .L802B6420: /* E24460 802B6420 AFA20020 */ sw $v0, 0x20($sp) .L802B6424: /* E24464 802B6424 0C016F6A */ jal get_collider_flags .L802B6428: /* E24468 802B6428 0040202D */ daddu $a0, $v0, $zero .L802B642C: /* E2446C 802B642C 304200FF */ andi $v0, $v0, 0xFF D_802B6430: /* E24470 802B6430 2442FFFE */ addiu $v0, $v0, -0x2 /* E24474 802B6434 2C420002 */ sltiu $v0, $v0, 0x2 /* E24478 802B6438 1440000C */ bnez $v0, .L802B646C /* E2447C 802B643C 00000000 */ nop /* E24480 802B6440 0C039858 */ jal check_input_jump /* E24484 802B6444 00000000 */ nop .L802B6448: /* E24488 802B6448 10400008 */ beqz $v0, .L802B646C glabel action_update_peach_step_down_land /* E2448C 802B644C 00000000 */ nop .L802B6450: /* E24490 802B6450 0C039769 */ jal set_action_state .L802B6454: /* E24494 802B6454 24040003 */ addiu $a0, $zero, 0x3 /* E24498 802B6458 8E020000 */ lw $v0, 0x0($s0) /* E2449C 802B645C 2403FFF1 */ addiu $v1, $zero, -0xF .L802B6460: /* E244A0 802B6460 00431024 */ and $v0, $v0, $v1 .L802B6464: /* E244A4 802B6464 0C0AD82D */ jal action_update_jump /* E244A8 802B6468 AE020000 */ sw $v0, 0x0($s0) glabel .L802B646C /* E244AC 802B646C 8FBF004C */ lw $ra, 0x4C($sp) /* E244B0 802B6470 8FB00048 */ lw $s0, 0x48($sp) /* E244B4 802B6474 03E00008 */ jr $ra glabel action_update_raise_arms /* E244B8 802B6478 27BD0050 */ addiu $sp, $sp, 0x50 ### DECOMPILED C INSTRUCTIONS: void action_update_step_down(void) { PlayerStatus* playerStatus = &gPlayerStatus; s32 colliderID; s32 surfaceType; f32 posX, posY, posZ; f32 hitRx, hitRz; f32 hitDirX, hitDirZ; f32 height; if (playerStatus->animFlags & PA_FLAG_USING_PEACH_PHYSICS) { action_update_peach_step_down(); return; } if (playerStatus->flags & PS_FLAG_ACTION_STATE_CHANGED) { playerStatus->flags &= ~(PS_FLAG_ACTION_STATE_CHANGED | PS_FLAG_JUMPING | PS_FLAG_FLYING); playerStatus->flags |= PS_FLAG_FALLING; gCameras[CAM_DEFAULT].moveFlags |= CAMERA_MOVE_IGNORE_PLAYER_Y; } playerStatus->timeInAir++; phys_update_interact_collider(); posX = playerStatus->position.x; posY = playerStatus->position.y; posZ = playerStatus->position.z; height = playerStatus->colliderHeight; colliderID = player_raycast_below_cam_relative(playerStatus, &posX, &posY, &posZ, &height, &hitRx, &hitRz, &hitDirX, &hitDirZ); surfaceType = get_collider_flags(colliderID) & COLLIDER_FLAGS_SURFACE_TYPE_MASK; if (!(surfaceType == SURFACE_TYPE_SPIKES || surfaceType == SURFACE_TYPE_LAVA) && check_input_jump()) { set_action_state(ACTION_STATE_JUMP); playerStatus->flags &= ~PS_FLAG_AIRBORNE; action_update_jump(); } }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_80253D10 /* 1825F0 80253D10 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 1825F4 80253D14 AFB40020 */ sw $s4, 0x20($sp) /* 1825F8 80253D18 0080A02D */ daddu $s4, $a0, $zero /* 1825FC 80253D1C AFB7002C */ sw $s7, 0x2C($sp) /* 182600 80253D20 3C17800E */ lui $s7, %hi(gBattleStatus) /* 182604 80253D24 26F7C070 */ addiu $s7, $s7, %lo(gBattleStatus) /* 182608 80253D28 240600FF */ addiu $a2, $zero, 0xFF /* 18260C 80253D2C AFB60028 */ sw $s6, 0x28($sp) /* 182610 80253D30 24160001 */ addiu $s6, $zero, 0x1 /* 182614 80253D34 3C058028 */ lui $a1, %hi(D_80284044) /* 182618 80253D38 24A54044 */ addiu $a1, $a1, %lo(D_80284044) /* 18261C 80253D3C AFBF0030 */ sw $ra, 0x30($sp) /* 182620 80253D40 AFB50024 */ sw $s5, 0x24($sp) /* 182624 80253D44 AFB3001C */ sw $s3, 0x1C($sp) /* 182628 80253D48 AFB20018 */ sw $s2, 0x18($sp) /* 18262C 80253D4C AFB10014 */ sw $s1, 0x14($sp) /* 182630 80253D50 AFB00010 */ sw $s0, 0x10($sp) .L80253D54: /* 182634 80253D54 8CA40000 */ lw $a0, 0x0($a1) /* 182638 80253D58 10800029 */ beqz $a0, .L80253E00 /* 18263C 80253D5C 00000000 */ nop /* 182640 80253D60 90820000 */ lbu $v0, 0x0($a0) /* 182644 80253D64 10460024 */ beq $v0, $a2, .L80253DF8 /* 182648 80253D68 0080182D */ daddu $v1, $a0, $zero .L80253D6C: /* 18264C 80253D6C 90620000 */ lbu $v0, 0x0($v1) /* 182650 80253D70 5682001E */ bnel $s4, $v0, .L80253DEC /* 182654 80253D74 24630001 */ addiu $v1, $v1, 0x1 /* 182658 80253D78 90820000 */ lbu $v0, 0x0($a0) /* 18265C 80253D7C 10460033 */ beq $v0, $a2, .L80253E4C /* 182660 80253D80 241500FF */ addiu $s5, $zero, 0xFF /* 182664 80253D84 0080982D */ daddu $s3, $a0, $zero .L80253D88: /* 182668 80253D88 92740000 */ lbu $s4, 0x0($s3) /* 18266C 80253D8C 06810002 */ bgez $s4, .L80253D98 /* 182670 80253D90 0280802D */ daddu $s0, $s4, $zero /* 182674 80253D94 26900007 */ addiu $s0, $s4, 0x7 .L80253D98: /* 182678 80253D98 001080C3 */ sra $s0, $s0, 3 /* 18267C 80253D9C 2611016D */ addiu $s1, $s0, 0x16D /* 182680 80253DA0 0C05154E */ jal get_global_byte /* 182684 80253DA4 0220202D */ daddu $a0, $s1, $zero /* 182688 80253DA8 001018C0 */ sll $v1, $s0, 3 /* 18268C 80253DAC 02831823 */ subu $v1, $s4, $v1 /* 182690 80253DB0 00761804 */ sllv $v1, $s6, $v1 /* 182694 80253DB4 00439025 */ or $s2, $v0, $v1 /* 182698 80253DB8 0220202D */ daddu $a0, $s1, $zero /* 18269C 80253DBC 0C051548 */ jal set_global_byte /* 1826A0 80253DC0 0240282D */ daddu $a1, $s2, $zero /* 1826A4 80253DC4 02F08021 */ addu $s0, $s7, $s0 /* 1826A8 80253DC8 92020440 */ lbu $v0, 0x440($s0) /* 1826AC 80253DCC 26730001 */ addiu $s3, $s3, 0x1 /* 1826B0 80253DD0 00521025 */ or $v0, $v0, $s2 /* 1826B4 80253DD4 A2020440 */ sb $v0, 0x440($s0) /* 1826B8 80253DD8 92620000 */ lbu $v0, 0x0($s3) /* 1826BC 80253DDC 1055001B */ beq $v0, $s5, .L80253E4C /* 1826C0 80253DE0 00000000 */ nop /* 1826C4 80253DE4 08094F62 */ j .L80253D88 /* 1826C8 80253DE8 00000000 */ nop .L80253DEC: /* 1826CC 80253DEC 90620000 */ lbu $v0, 0x0($v1) /* 1826D0 80253DF0 1446FFDE */ bne $v0, $a2, .L80253D6C /* 1826D4 80253DF4 00000000 */ nop .L80253DF8: /* 1826D8 80253DF8 08094F55 */ j .L80253D54 /* 1826DC 80253DFC 24A50004 */ addiu $a1, $a1, 0x4 .L80253E00: /* 1826E0 80253E00 06810002 */ bgez $s4, .L80253E0C /* 1826E4 80253E04 0280202D */ daddu $a0, $s4, $zero /* 1826E8 80253E08 26840007 */ addiu $a0, $s4, 0x7 .L80253E0C: /* 1826EC 80253E0C 000488C3 */ sra $s1, $a0, 3 /* 1826F0 80253E10 2630016D */ addiu $s0, $s1, 0x16D /* 1826F4 80253E14 0C05154E */ jal get_global_byte /* 1826F8 80253E18 0200202D */ daddu $a0, $s0, $zero /* 1826FC 80253E1C 001120C0 */ sll $a0, $s1, 3 /* 182700 80253E20 02842023 */ subu $a0, $s4, $a0 /* 182704 80253E24 24030001 */ addiu $v1, $zero, 0x1 /* 182708 80253E28 00831804 */ sllv $v1, $v1, $a0 /* 18270C 80253E2C 00439025 */ or $s2, $v0, $v1 /* 182710 80253E30 0200202D */ daddu $a0, $s0, $zero /* 182714 80253E34 0C051548 */ jal set_global_byte /* 182718 80253E38 0240282D */ daddu $a1, $s2, $zero /* 18271C 80253E3C 02F11821 */ addu $v1, $s7, $s1 /* 182720 80253E40 90620440 */ lbu $v0, 0x440($v1) /* 182724 80253E44 00521025 */ or $v0, $v0, $s2 /* 182728 80253E48 A0620440 */ sb $v0, 0x440($v1) .L80253E4C: /* 18272C 80253E4C 8FBF0030 */ lw $ra, 0x30($sp) /* 182730 80253E50 8FB7002C */ lw $s7, 0x2C($sp) /* 182734 80253E54 8FB60028 */ lw $s6, 0x28($sp) /* 182738 80253E58 8FB50024 */ lw $s5, 0x24($sp) /* 18273C 80253E5C 8FB40020 */ lw $s4, 0x20($sp) /* 182740 80253E60 8FB3001C */ lw $s3, 0x1C($sp) /* 182744 80253E64 8FB20018 */ lw $s2, 0x18($sp) /* 182748 80253E68 8FB10014 */ lw $s1, 0x14($sp) /* 18274C 80253E6C 8FB00010 */ lw $s0, 0x10($sp) /* 182750 80253E70 03E00008 */ jr $ra /* 182754 80253E74 27BD0038 */ addiu $sp, $sp, 0x38 ### DECOMPILED C INSTRUCTIONS: void save_tattle_flags(s32 actorType) { BattleStatus* battleStatus = &gBattleStatus; u8* types; s32 gb; s32 i = 0; s32 j; s32 k; while (TRUE) { types = ActorTypesLists[i]; if (types == NULL) { break; } for (j = 0; types[j] != ACTOR_TYPE_LIST_END; j++) { if (actorType == types[j]) { for (k = 0; types[k] != ACTOR_TYPE_LIST_END; k++) { actorType = types[k]; gb = get_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8); gb |= 1 << (actorType % 8); set_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8, gb); battleStatus->tattleFlags[actorType / 8] |= gb; } return; } } i++; } gb = get_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8); gb |= 1 << (actorType % 8); set_global_byte(EVT_INDEX_OF_GAME_BYTE(GB_Tattles_00) + actorType / 8, gb); battleStatus->tattleFlags[actorType / 8] |= gb; }
### RAW ASSEMBLY INSTRUCTIONS: dlabel func_8025D4C8 /* 18BDA8 8025D4C8 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 18BDAC 8025D4CC AFB1001C */ sw $s1, 0x1C($sp) /* 18BDB0 8025D4D0 0080882D */ daddu $s1, $a0, $zero /* 18BDB4 8025D4D4 AFBF0028 */ sw $ra, 0x28($sp) /* 18BDB8 8025D4D8 AFB30024 */ sw $s3, 0x24($sp) /* 18BDBC 8025D4DC AFB20020 */ sw $s2, 0x20($sp) /* 18BDC0 8025D4E0 AFB00018 */ sw $s0, 0x18($sp) /* 18BDC4 8025D4E4 8E3000C0 */ lw $s0, 0xC0($s1) /* 18BDC8 8025D4E8 00A0982D */ daddu $s3, $a1, $zero /* 18BDCC 8025D4EC 02139021 */ addu $s2, $s0, $s3 /* 18BDD0 8025D4F0 824308BC */ lb $v1, 0x8BC($s2) /* 18BDD4 8025D4F4 10600005 */ beqz $v1, .L8025D50C /* 18BDD8 8025D4F8 24020001 */ addiu $v0, $zero, 0x1 /* 18BDDC 8025D4FC 1062001E */ beq $v1, $v0, .L8025D578 /* 18BDE0 8025D500 00131080 */ sll $v0, $s3, 2 /* 18BDE4 8025D504 08097581 */ j .L8025D604 /* 18BDE8 8025D508 00000000 */ nop .L8025D50C: /* 18BDEC 8025D50C 00131080 */ sll $v0, $s3, 2 /* 18BDF0 8025D510 244208B0 */ addiu $v0, $v0, 0x8B0 /* 18BDF4 8025D514 3C013ECC */ lui $at, (0x3ECCCCCD >> 16) /* 18BDF8 8025D518 3421CCCD */ ori $at, $at, (0x3ECCCCCD & 0xFFFF) /* 18BDFC 8025D51C 44810000 */ mtc1 $at, $f0 /* 18BE00 8025D520 02021021 */ addu $v0, $s0, $v0 /* 18BE04 8025D524 AFA20014 */ sw $v0, 0x14($sp) /* 18BE08 8025D528 E7A00010 */ swc1 $f0, 0x10($sp) /* 18BE0C 8025D52C 8E250058 */ lw $a1, 0x58($s1) /* 18BE10 8025D530 8E26005C */ lw $a2, 0x5C($s1) /* 18BE14 8025D534 8E270060 */ lw $a3, 0x60($s1) /* 18BE18 8025D538 0C01C3AC */ jal fx_aura /* 18BE1C 8025D53C 24040001 */ addiu $a0, $zero, 0x1 /* 18BE20 8025D540 24020001 */ addiu $v0, $zero, 0x1 /* 18BE24 8025D544 A24208BC */ sb $v0, 0x8BC($s2) /* 18BE28 8025D548 00131100 */ sll $v0, $s3, 4 /* 18BE2C 8025D54C 02021021 */ addu $v0, $s0, $v0 /* 18BE30 8025D550 24030028 */ addiu $v1, $zero, 0x28 /* 18BE34 8025D554 A44308C6 */ sh $v1, 0x8C6($v0) /* 18BE38 8025D558 A44308C8 */ sh $v1, 0x8C8($v0) /* 18BE3C 8025D55C 240300FF */ addiu $v1, $zero, 0xFF /* 18BE40 8025D560 A44308CA */ sh $v1, 0x8CA($v0) /* 18BE44 8025D564 A44008CC */ sh $zero, 0x8CC($v0) /* 18BE48 8025D568 A44308CE */ sh $v1, 0x8CE($v0) /* 18BE4C 8025D56C A44008D0 */ sh $zero, 0x8D0($v0) /* 18BE50 8025D570 A44008D2 */ sh $zero, 0x8D2($v0) /* 18BE54 8025D574 00131080 */ sll $v0, $s3, 2 .L8025D578: /* 18BE58 8025D578 02021021 */ addu $v0, $s0, $v0 /* 18BE5C 8025D57C 8C4508B0 */ lw $a1, 0x8B0($v0) /* 18BE60 8025D580 C6200058 */ lwc1 $f0, 0x58($s1) /* 18BE64 8025D584 8CA3000C */ lw $v1, 0xC($a1) /* 18BE68 8025D588 00132100 */ sll $a0, $s3, 4 /* 18BE6C 8025D58C E4600004 */ swc1 $f0, 0x4($v1) /* 18BE70 8025D590 C620005C */ lwc1 $f0, 0x5C($s1) /* 18BE74 8025D594 02042021 */ addu $a0, $s0, $a0 /* 18BE78 8025D598 E4600008 */ swc1 $f0, 0x8($v1) /* 18BE7C 8025D59C 848208CC */ lh $v0, 0x8CC($a0) /* 18BE80 8025D5A0 C6200060 */ lwc1 $f0, 0x60($s1) /* 18BE84 8025D5A4 44821000 */ mtc1 $v0, $f2 /* 18BE88 8025D5A8 00000000 */ nop /* 18BE8C 8025D5AC 468010A0 */ cvt.s.w $f2, $f2 /* 18BE90 8025D5B0 46020000 */ add.s $f0, $f0, $f2 /* 18BE94 8025D5B4 E460000C */ swc1 $f0, 0xC($v1) /* 18BE98 8025D5B8 848208C6 */ lh $v0, 0x8C6($a0) /* 18BE9C 8025D5BC 3C0142C8 */ lui $at, (0x42C80000 >> 16) /* 18BEA0 8025D5C0 44810000 */ mtc1 $at, $f0 /* 18BEA4 8025D5C4 44821000 */ mtc1 $v0, $f2 /* 18BEA8 8025D5C8 00000000 */ nop /* 18BEAC 8025D5CC 468010A0 */ cvt.s.w $f2, $f2 /* 18BEB0 8025D5D0 8CA2000C */ lw $v0, 0xC($a1) /* 18BEB4 8025D5D4 46001083 */ div.s $f2, $f2, $f0 /* 18BEB8 8025D5D8 E442001C */ swc1 $f2, 0x1C($v0) /* 18BEBC 8025D5DC 848208C8 */ lh $v0, 0x8C8($a0) /* 18BEC0 8025D5E0 44821000 */ mtc1 $v0, $f2 /* 18BEC4 8025D5E4 00000000 */ nop /* 18BEC8 8025D5E8 468010A0 */ cvt.s.w $f2, $f2 /* 18BECC 8025D5EC 8CA2000C */ lw $v0, 0xC($a1) /* 18BED0 8025D5F0 46001083 */ div.s $f2, $f2, $f0 /* 18BED4 8025D5F4 E4420020 */ swc1 $f2, 0x20($v0) /* 18BED8 8025D5F8 8CA3000C */ lw $v1, 0xC($a1) /* 18BEDC 8025D5FC 848208CA */ lh $v0, 0x8CA($a0) /* 18BEE0 8025D600 AC620028 */ sw $v0, 0x28($v1) .L8025D604: /* 18BEE4 8025D604 8FBF0028 */ lw $ra, 0x28($sp) /* 18BEE8 8025D608 8FB30024 */ lw $s3, 0x24($sp) /* 18BEEC 8025D60C 8FB20020 */ lw $s2, 0x20($sp) /* 18BEF0 8025D610 8FB1001C */ lw $s1, 0x1C($sp) /* 18BEF4 8025D614 8FB00018 */ lw $s0, 0x18($sp) /* 18BEF8 8025D618 03E00008 */ jr $ra /* 18BEFC 8025D61C 27BD0030 */ addiu $sp, $sp, 0x30 ### DECOMPILED C INSTRUCTIONS: void func_8025D4C8(ActorPart* part, s32 decorationIndex) { DecorationTable* decor = part->decorationTable; EffectInstance* effect; AuraFXData* data; f32 scale; switch (decor->state[decorationIndex]) { case 0: fx_aura(1, part->currentPos.x, part->currentPos.y, part->currentPos.z, 0.4f, &decor->effect[decorationIndex]); decor->state[decorationIndex] = 1; decor->unk_8C6[decorationIndex].unk00 = 40; decor->unk_8C6[decorationIndex].unk02 = 40; decor->unk_8C6[decorationIndex].unk04 = 255; decor->unk_8C6[decorationIndex].unk06 = 0; decor->unk_8C6[decorationIndex].unk08 = 255; decor->unk_8C6[decorationIndex].unk0A = 0; decor->unk_8C6[decorationIndex].unk0C = 0; // fallthrough case 1: effect = decor->effect[decorationIndex]; data = effect->data.aura; data->posA.x = part->currentPos.x; data->posA.y = part->currentPos.y; data->posA.z = part->currentPos.z + decor->unk_8C6[decorationIndex].unk06; scale = decor->unk_8C6[decorationIndex].unk00; scale /= 100.0f; effect->data.aura->scale.x = scale; scale = decor->unk_8C6[decorationIndex].unk02; scale /= 100.0f; effect->data.aura->scale.y = scale; effect->data.aura->primA = decor->unk_8C6[decorationIndex].unk04; break; } }
### RAW ASSEMBLY INSTRUCTIONS: glabel PollMusicEvents /* FA4C0 802D5B10 27BDFFC0 */ addiu $sp, $sp, -0x40 /* FA4C4 802D5B14 27A40010 */ addiu $a0, $sp, 0x10 /* FA4C8 802D5B18 27A50014 */ addiu $a1, $sp, 0x14 /* FA4CC 802D5B1C AFBF0038 */ sw $ra, 0x38($sp) /* FA4D0 802D5B20 AFB70034 */ sw $s7, 0x34($sp) /* FA4D4 802D5B24 AFB60030 */ sw $s6, 0x30($sp) /* FA4D8 802D5B28 AFB5002C */ sw $s5, 0x2C($sp) /* FA4DC 802D5B2C AFB40028 */ sw $s4, 0x28($sp) /* FA4E0 802D5B30 AFB30024 */ sw $s3, 0x24($sp) /* FA4E4 802D5B34 AFB20020 */ sw $s2, 0x20($sp) /* FA4E8 802D5B38 AFB1001C */ sw $s1, 0x1C($sp) /* FA4EC 802D5B3C 0C015823 */ jal bgm_poll_music_events /* FA4F0 802D5B40 AFB00018 */ sw $s0, 0x18($sp) /* FA4F4 802D5B44 8FA20014 */ lw $v0, 0x14($sp) /* FA4F8 802D5B48 10400036 */ beqz $v0, .L802D5C24 /* FA4FC 802D5B4C 0000982D */ daddu $s3, $zero, $zero /* FA500 802D5B50 3C1700FF */ lui $s7, (0xFF0000 >> 16) /* FA504 802D5B54 2416FFFF */ addiu $s6, $zero, -0x1 /* FA508 802D5B58 3C15802E */ lui $s5, %hi(RunningMusicEvents) /* FA50C 802D5B5C 26B5B7D8 */ addiu $s5, $s5, %lo(RunningMusicEvents) /* FA510 802D5B60 3C14802E */ lui $s4, %hi(RunningMusicEventIDs) /* FA514 802D5B64 2694B800 */ addiu $s4, $s4, %lo(RunningMusicEventIDs) .L802D5B68: /* FA518 802D5B68 8FA20010 */ lw $v0, 0x10($sp) /* FA51C 802D5B6C 8C430000 */ lw $v1, 0x0($v0) /* FA520 802D5B70 3C04802E */ lui $a0, %hi(MusicEventList) /* FA524 802D5B74 8C84B7D0 */ lw $a0, %lo(MusicEventList)($a0) /* FA528 802D5B78 00771024 */ and $v0, $v1, $s7 /* FA52C 802D5B7C 00022C02 */ srl $a1, $v0, 16 /* FA530 802D5B80 8C820000 */ lw $v0, 0x0($a0) /* FA534 802D5B84 10560009 */ beq $v0, $s6, .L802D5BAC /* FA538 802D5B88 306300FF */ andi $v1, $v1, 0xFF /* FA53C 802D5B8C 2406FFFF */ addiu $a2, $zero, -0x1 /* FA540 802D5B90 8C820000 */ lw $v0, 0x0($a0) .L802D5B94: /* FA544 802D5B94 10450005 */ beq $v0, $a1, .L802D5BAC /* FA548 802D5B98 00000000 */ nop /* FA54C 802D5B9C 24840014 */ addiu $a0, $a0, 0x14 /* FA550 802D5BA0 8C820000 */ lw $v0, 0x0($a0) /* FA554 802D5BA4 1446FFFB */ bne $v0, $a2, .L802D5B94 /* FA558 802D5BA8 00000000 */ nop .L802D5BAC: /* FA55C 802D5BAC 50800017 */ beql $a0, $zero, .L802D5C0C /* FA560 802D5BB0 26730001 */ addiu $s3, $s3, 0x1 /* FA564 802D5BB4 00031080 */ sll $v0, $v1, 2 /* FA568 802D5BB8 00821021 */ addu $v0, $a0, $v0 /* FA56C 802D5BBC 00058880 */ sll $s1, $a1, 2 /* FA570 802D5BC0 02359021 */ addu $s2, $s1, $s5 /* FA574 802D5BC4 8E430000 */ lw $v1, 0x0($s2) /* FA578 802D5BC8 8C500004 */ lw $s0, 0x4($v0) /* FA57C 802D5BCC 10600004 */ beqz $v1, .L802D5BE0 /* FA580 802D5BD0 02341021 */ addu $v0, $s1, $s4 /* FA584 802D5BD4 8C440000 */ lw $a0, 0x0($v0) /* FA588 802D5BD8 0C0B102B */ jal kill_script_by_ID /* FA58C 802D5BDC 00000000 */ nop .L802D5BE0: /* FA590 802D5BE0 5200000A */ beql $s0, $zero, .L802D5C0C /* FA594 802D5BE4 26730001 */ addiu $s3, $s3, 0x1 /* FA598 802D5BE8 0200202D */ daddu $a0, $s0, $zero /* FA59C 802D5BEC 24050001 */ addiu $a1, $zero, 0x1 /* FA5A0 802D5BF0 0C0B0CF8 */ jal start_script /* FA5A4 802D5BF4 0000302D */ daddu $a2, $zero, $zero /* FA5A8 802D5BF8 AE420000 */ sw $v0, 0x0($s2) /* FA5AC 802D5BFC 8C430144 */ lw $v1, 0x144($v0) /* FA5B0 802D5C00 02341021 */ addu $v0, $s1, $s4 /* FA5B4 802D5C04 AC430000 */ sw $v1, 0x0($v0) /* FA5B8 802D5C08 26730001 */ addiu $s3, $s3, 0x1 .L802D5C0C: /* FA5BC 802D5C0C 8FA20010 */ lw $v0, 0x10($sp) /* FA5C0 802D5C10 8FA30014 */ lw $v1, 0x14($sp) /* FA5C4 802D5C14 24420004 */ addiu $v0, $v0, 0x4 /* FA5C8 802D5C18 0263182B */ sltu $v1, $s3, $v1 /* FA5CC 802D5C1C 1460FFD2 */ bnez $v1, .L802D5B68 /* FA5D0 802D5C20 AFA20010 */ sw $v0, 0x10($sp) .L802D5C24: /* FA5D4 802D5C24 0C01582A */ jal bgm_flush_music_events /* FA5D8 802D5C28 00000000 */ nop /* FA5DC 802D5C2C 3C04802E */ lui $a0, %hi(D_802D9D30) /* FA5E0 802D5C30 24849D30 */ addiu $a0, $a0, %lo(D_802D9D30) /* FA5E4 802D5C34 8C830000 */ lw $v1, 0x0($a0) /* FA5E8 802D5C38 24630001 */ addiu $v1, $v1, 0x1 /* FA5EC 802D5C3C AC830000 */ sw $v1, 0x0($a0) /* FA5F0 802D5C40 8FBF0038 */ lw $ra, 0x38($sp) /* FA5F4 802D5C44 8FB70034 */ lw $s7, 0x34($sp) /* FA5F8 802D5C48 8FB60030 */ lw $s6, 0x30($sp) /* FA5FC 802D5C4C 8FB5002C */ lw $s5, 0x2C($sp) /* FA600 802D5C50 8FB40028 */ lw $s4, 0x28($sp) /* FA604 802D5C54 8FB30024 */ lw $s3, 0x24($sp) /* FA608 802D5C58 8FB20020 */ lw $s2, 0x20($sp) /* FA60C 802D5C5C 8FB1001C */ lw $s1, 0x1C($sp) /* FA610 802D5C60 8FB00018 */ lw $s0, 0x18($sp) /* FA614 802D5C64 0000102D */ daddu $v0, $zero, $zero /* FA618 802D5C68 03E00008 */ jr $ra /* FA61C 802D5C6C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: ApiStatus PollMusicEvents(Evt* script, s32 isInitialCall) { MusicEventTrigger* list; s32 musicEventID, scriptSelector; u32 count; s32 i; bgm_poll_music_events(&list, &count); for (i = 0; i < count; i++, list++) { MusicEvent* cur = MusicEventList; musicEventID = (*list & 0xFF0000) >> 0x10; scriptSelector = *list & 0xFF; while (cur->musicEventID != -1) { if (cur->musicEventID == musicEventID) { break; } cur++; } // @bug? can cur ever be NULL here? // condition should probably be if (cur->musicEventID != -1) if (cur != NULL) { EvtScript* newSource = cur->scripts[scriptSelector]; if (RunningMusicEvents[musicEventID] != NULL) { kill_script_by_ID(RunningMusicEventIDs[musicEventID]); } if (newSource != NULL) { Evt* newEvt = start_script(newSource, EVT_PRIORITY_1, 0); RunningMusicEvents[musicEventID] = newEvt; RunningMusicEventIDs[musicEventID] = newEvt->id; } } } bgm_flush_music_events(); MusicEventPollCount++; return ApiStatus_BLOCK; }
### RAW ASSEMBLY INSTRUCTIONS: glabel general_heap_create_obfuscated /* 316D90 802AE000 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 316D94 802AE004 AFB40028 */ sw $s4, 0x28($sp) /* 316D98 802AE008 3C1433F5 */ lui $s4, (0x33F50000 >> 16) /* 316D9C 802AE00C AFB30024 */ sw $s3, 0x24($sp) /* 316DA0 802AE010 3C137013 */ lui $s3, %hi(D_7012ACA1) /* 316DA4 802AE014 2673ACA1 */ addiu $s3, $s3, %lo(D_7012ACA1) /* 316DA8 802AE018 AFB00018 */ sw $s0, 0x18($sp) /* 316DAC 802AE01C 0000802D */ daddu $s0, $zero, $zero /* 316DB0 802AE020 3C05B000 */ lui $a1, (0xB0000800 >> 16) /* 316DB4 802AE024 34A50800 */ ori $a1, $a1, (0xB0000800 & 0xFFFF) /* 316DB8 802AE028 3C04800A */ lui $a0, %hi(nuPiCartHandle) /* 316DBC 802AE02C 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0) /* 316DC0 802AE030 27A60010 */ addiu $a2, $sp, 0x10 /* 316DC4 802AE034 AFB20020 */ sw $s2, 0x20($sp) /* 316DC8 802AE038 0200902D */ daddu $s2, $s0, $zero /* 316DCC 802AE03C AFB5002C */ sw $s5, 0x2C($sp) /* 316DD0 802AE040 3C158006 */ lui $s5, %hi(osEPiReadIo) /* 316DD4 802AE044 26B50DC0 */ addiu $s5, $s5, %lo(osEPiReadIo) /* 316DD8 802AE048 AFBF003C */ sw $ra, 0x3C($sp) /* 316DDC 802AE04C AFBE0038 */ sw $fp, 0x38($sp) /* 316DE0 802AE050 AFB70034 */ sw $s7, 0x34($sp) /* 316DE4 802AE054 AFB60030 */ sw $s6, 0x30($sp) /* 316DE8 802AE058 02A0F809 */ jalr $s5 /* 316DEC 802AE05C AFB1001C */ sw $s1, 0x1C($sp) /* 316DF0 802AE060 3C110031 */ lui $s1, %hi(D_316C00) /* 316DF4 802AE064 26316C00 */ addiu $s1, $s1, %lo(D_316C00) /* 316DF8 802AE068 8FA20010 */ lw $v0, 0x10($sp) /* 316DFC 802AE06C 3C030031 */ lui $v1, %hi(D_316D90) /* 316E00 802AE070 24636D90 */ addiu $v1, $v1, %lo(D_316D90) /* 316E04 802AE074 0282A023 */ subu $s4, $s4, $v0 /* 316E08 802AE078 0223102B */ sltu $v0, $s1, $v1 /* 316E0C 802AE07C 1040002B */ beqz $v0, .L802AE12C /* 316E10 802AE080 241E0023 */ addiu $fp, $zero, 0x23 /* 316E14 802AE084 24170003 */ addiu $s7, $zero, 0x3 /* 316E18 802AE088 0060B02D */ daddu $s6, $v1, $zero .L802AE08C: /* 316E1C 802AE08C 0220282D */ daddu $a1, $s1, $zero .L802AE090: /* 316E20 802AE090 3C04800A */ lui $a0, %hi(nuPiCartHandle) /* 316E24 802AE094 8C84A638 */ lw $a0, %lo(nuPiCartHandle)($a0) /* 316E28 802AE098 02A0F809 */ jalr $s5 /* 316E2C 802AE09C 27A60010 */ addiu $a2, $sp, 0x10 /* 316E30 802AE0A0 8FA30010 */ lw $v1, 0x10($sp) /* 316E34 802AE0A4 2407000F */ addiu $a3, $zero, 0xF /* 316E38 802AE0A8 3065FFFF */ andi $a1, $v1, 0xFFFF /* 316E3C 802AE0AC 00032402 */ srl $a0, $v1, 16 /* 316E40 802AE0B0 00A41021 */ addu $v0, $a1, $a0 /* 316E44 802AE0B4 02028021 */ addu $s0, $s0, $v0 /* 316E48 802AE0B8 00121682 */ srl $v0, $s2, 26 /* 316E4C 802AE0BC 1447000F */ bne $v0, $a3, .L802AE0FC /* 316E50 802AE0C0 00031682 */ srl $v0, $v1, 26 /* 316E54 802AE0C4 24070009 */ addiu $a3, $zero, 0x9 /* 316E58 802AE0C8 50470003 */ beql $v0, $a3, .L802AE0D8 /* 316E5C 802AE0CC 00031542 */ srl $v0, $v1, 21 /* 316E60 802AE0D0 145E000A */ bne $v0, $fp, .L802AE0FC /* 316E64 802AE0D4 00031542 */ srl $v0, $v1, 21 .L802AE0D8: /* 316E68 802AE0D8 3043001F */ andi $v1, $v0, 0x1F .L802AE0DC: /* 316E6C 802AE0DC 00121402 */ srl $v0, $s2, 16 /* 316E70 802AE0E0 3042001F */ andi $v0, $v0, 0x1F /* 316E74 802AE0E4 14620005 */ bne $v1, $v0, .L802AE0FC /* 316E78 802AE0E8 3082001F */ andi $v0, $a0, 0x1F /* 316E7C 802AE0EC 14620003 */ bne $v1, $v0, .L802AE0FC /* 316E80 802AE0F0 3242FFFF */ andi $v0, $s2, 0xFFFF /* 316E84 802AE0F4 02058023 */ subu $s0, $s0, $a1 /* 316E88 802AE0F8 02028023 */ subu $s0, $s0, $v0 .L802AE0FC: /* 316E8C 802AE0FC 8FA40010 */ lw $a0, 0x10($sp) .L802AE100: /* 316E90 802AE100 00041682 */ srl $v0, $a0, 26 /* 316E94 802AE104 14570006 */ bne $v0, $s7, .L802AE120 /* 316E98 802AE108 26310004 */ addiu $s1, $s1, 0x4 /* 316E9C 802AE10C 3083FFFF */ andi $v1, $a0, 0xFFFF /* 316EA0 802AE110 00041402 */ srl $v0, $a0, 16 /* 316EA4 802AE114 3042FC00 */ andi $v0, $v0, 0xFC00 /* 316EA8 802AE118 00621821 */ addu $v1, $v1, $v0 /* 316EAC 802AE11C 02038023 */ subu $s0, $s0, $v1 .L802AE120: /* 316EB0 802AE120 0236102B */ sltu $v0, $s1, $s6 .L802AE124: /* 316EB4 802AE124 1440FFD9 */ bnez $v0, .L802AE08C /* 316EB8 802AE128 0080902D */ daddu $s2, $a0, $zero .L802AE12C: /* 316EBC 802AE12C 3C02FFD6 */ lui $v0, (0xFFD6E66D >> 16) .L802AE130: /* 316EC0 802AE130 3442E66D */ ori $v0, $v0, (0xFFD6E66D & 0xFFFF) /* 316EC4 802AE134 02021021 */ addu $v0, $s0, $v0 /* 316EC8 802AE138 02821023 */ subu $v0, $s4, $v0 /* 316ECC 802AE13C 02629821 */ addu $s3, $s3, $v0 /* 316ED0 802AE140 00131F02 */ srl $v1, $s3, 28 /* 316ED4 802AE144 24020008 */ addiu $v0, $zero, 0x8 /* 316ED8 802AE148 14620005 */ bne $v1, $v0, .L802AE160 /* 316EDC 802AE14C 00000000 */ nop /* 316EE0 802AE150 0260F809 */ jalr $s3 /* 316EE4 802AE154 00000000 */ nop /* 316EE8 802AE158 080AB85C */ j .L802AE170 .L802AE15C: /* 316EEC 802AE15C 00000000 */ nop .L802AE160: /* 316EF0 802AE160 3C04803E */ lui $a0, %hi(gFrameBuf2) /* 316EF4 802AE164 2484A800 */ addiu $a0, $a0, %lo(gFrameBuf2) /* 316EF8 802AE168 0C00A40C */ jal _heap_create /* 316EFC 802AE16C 3C050001 */ lui $a1, (0x10000 >> 16) .L802AE170: /* 316F00 802AE170 8FBF003C */ lw $ra, 0x3C($sp) /* 316F04 802AE174 8FBE0038 */ lw $fp, 0x38($sp) /* 316F08 802AE178 8FB70034 */ lw $s7, 0x34($sp) /* 316F0C 802AE17C 8FB60030 */ lw $s6, 0x30($sp) /* 316F10 802AE180 8FB5002C */ lw $s5, 0x2C($sp) /* 316F14 802AE184 8FB40028 */ lw $s4, 0x28($sp) /* 316F18 802AE188 8FB30024 */ lw $s3, 0x24($sp) /* 316F1C 802AE18C 8FB20020 */ lw $s2, 0x20($sp) /* 316F20 802AE190 8FB1001C */ lw $s1, 0x1C($sp) /* 316F24 802AE194 8FB00018 */ lw $s0, 0x18($sp) /* 316F28 802AE198 03E00008 */ jr $ra /* 316F2C 802AE19C 27BD0040 */ addiu $sp, $sp, 0x40 ### DECOMPILED C INSTRUCTIONS: void battle_heap_create_obfuscated(void) { battle_heap_create(); }