.set noat # allow manual use of $at .set noreorder # don't insert nops after branches glabel step_game_loop /* 001B40 80026740 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 001B44 80026744 AFBF0018 */ sw $ra, 0x18($sp) /* 001B48 80026748 AFB10014 */ sw $s1, 0x14($sp) /* 001B4C 8002674C 0C00A21D */ jal update_input /* 001B50 80026750 AFB00010 */ sw $s0, 0x10($sp) /* 001B54 80026754 3C038007 */ lui $v1, 0x8007 /* 001B58 80026758 8C63419C */ lw $v1, 0x419c($v1) /* 001B5C 8002675C 3C040CDF */ lui $a0, 0xcdf /* 001B60 80026760 94620134 */ lhu $v0, 0x134($v1) /* 001B64 80026764 3C108011 */ lui $s0, 0x8011 /* 001B68 80026768 2610F290 */ addiu $s0, $s0, -0xd70 /* 001B6C 8002676C 24420001 */ addiu $v0, $v0, 1 /* 001B70 80026770 A4620134 */ sh $v0, 0x134($v1) /* 001B74 80026774 8E0202BC */ lw $v0, 0x2bc($s0) /* 001B78 80026778 3484E5FF */ ori $a0, $a0, 0xe5ff /* 001B7C 8002677C 24420002 */ addiu $v0, $v0, 2 /* 001B80 80026780 AE0202BC */ sw $v0, 0x2bc($s0) /* 001B84 80026784 0082102B */ sltu $v0, $a0, $v0 /* 001B88 80026788 54400001 */ bnel $v0, $zero, .L80026790 /* 001B8C 8002678C AE0402BC */ sw $a0, 0x2bc($s0) .L80026790: /* 001B90 80026790 0C00A3E3 */ jal func_80028F8C /* 001B94 80026794 00000000 */ nop /* 001B98 80026798 3C048007 */ lui $a0, 0x8007 /* 001B9C 8002679C 24844021 */ addiu $a0, $a0, 0x4021 /* 001BA0 800267A0 80820000 */ lb $v0, ($a0) /* 001BA4 800267A4 90830000 */ lbu $v1, ($a0) /* 001BA8 800267A8 10400008 */ beqz $v0, .L800267CC /* 001BAC 800267AC 2462FFFF */ addiu $v0, $v1, -1 /* 001BB0 800267B0 A0820000 */ sb $v0, ($a0) /* 001BB4 800267B4 00021600 */ sll $v0, $v0, 0x18 /* 001BB8 800267B8 14400087 */ bnez $v0, .L800269D8 /* 001BBC 800267BC 00000000 */ nop /* 001BC0 800267C0 3C028007 */ lui $v0, 0x8007 /* 001BC4 800267C4 90424020 */ lbu $v0, 0x4020($v0) /* 001BC8 800267C8 A0820000 */ sb $v0, ($a0) .L800267CC: /* 001BCC 800267CC 0C046EBA */ jal func_8011BAE8 /* 001BD0 800267D0 00000000 */ nop /* 001BD4 800267D4 0C00E15F */ jal func_8003857C /* 001BD8 800267D8 00000000 */ nop /* 001BDC 800267DC 0C048D01 */ jal func_80123404 /* 001BE0 800267E0 00000000 */ nop /* 001BE4 800267E4 0C051618 */ jal update_triggers /* 001BE8 800267E8 00000000 */ nop /* 001BEC 800267EC 0C0B0F5D */ jal update_scripts /* 001BF0 800267F0 00000000 */ nop /* 001BF4 800267F4 0C048DF6 */ jal update_messages /* 001BF8 800267F8 00000000 */ nop /* 001BFC 800267FC 0C050584 */ jal update_menu_icons /* 001C00 80026800 00000000 */ nop /* 001C04 80026804 0C044B9E */ jal step_current_game_mode /* 001C08 80026808 00000000 */ nop /* 001C0C 8002680C 0C043DB4 */ jal update_entities /* 001C10 80026810 00000000 */ nop /* 001C14 80026814 0C04E066 */ jal func_80138198 /* 001C18 80026818 00000000 */ nop /* 001C1C 8002681C 0C052952 */ jal func_8014A548 /* 001C20 80026820 00000000 */ nop /* 001C24 80026824 0C051C99 */ jal UpdateMusicPlayers /* 001C28 80026828 00000000 */ nop /* 001C2C 8002682C 0C0525CD */ jal func_80149734 /* 001C30 80026830 00000000 */ nop /* 001C34 80026834 0C051D05 */ jal func_80147414 /* 001C38 80026838 00000000 */ nop /* 001C3C 8002683C 0C00AE9E */ jal func_8002BA78 /* 001C40 80026840 00000000 */ nop /* 001C44 80026844 3C10800A */ lui $s0, 0x800a /* 001C48 80026848 2610A650 */ addiu $s0, $s0, -0x59b0 /* 001C4C 8002684C 8E040000 */ lw $a0, ($s0) /* 001C50 80026850 30820020 */ andi $v0, $a0, 0x20 /* 001C54 80026854 10400035 */ beqz $v0, .L8002692C /* 001C58 80026858 00000000 */ nop /* 001C5C 8002685C 3C118007 */ lui $s1, 0x8007 /* 001C60 80026860 263141A2 */ addiu $s1, $s1, 0x41a2 /* 001C64 80026864 86230000 */ lh $v1, ($s1) /* 001C68 80026868 10600005 */ beqz $v1, .L80026880 /* 001C6C 8002686C 24020001 */ addiu $v0, $zero, 1 /* 001C70 80026870 1062001C */ beq $v1, $v0, .L800268E4 /* 001C74 80026874 34840008 */ ori $a0, $a0, 8 /* 001C78 80026878 08009A4F */ j .L8002693C /* 001C7C 8002687C 00000000 */ nop .L80026880: /* 001C80 80026880 34820200 */ ori $v0, $a0, 0x200 /* 001C84 80026884 0C03805E */ jal func_800E0178 /* 001C88 80026888 AE020000 */ sw $v0, ($s0) /* 001C8C 8002688C 3C048007 */ lui $a0, 0x8007 /* 001C90 80026890 248441A0 */ addiu $a0, $a0, 0x41a0 /* 001C94 80026894 240500FF */ addiu $a1, $zero, 0xff /* 001C98 80026898 84820000 */ lh $v0, ($a0) /* 001C9C 8002689C 94830000 */ lhu $v1, ($a0) /* 001CA0 800268A0 14450008 */ bne $v0, $a1, .L800268C4 /* 001CA4 800268A4 2462000A */ addiu $v0, $v1, 0xa /* 001CA8 800268A8 24020001 */ addiu $v0, $zero, 1 /* 001CAC 800268AC A6220000 */ sh $v0, ($s1) /* 001CB0 800268B0 24020003 */ addiu $v0, $zero, 3 /* 001CB4 800268B4 3C01800A */ lui $at, 0x800a /* 001CB8 800268B8 A422A690 */ sh $v0, -0x5970($at) /* 001CBC 800268BC 08009A4F */ j .L8002693C /* 001CC0 800268C0 00000000 */ nop .L800268C4: /* 001CC4 800268C4 A4820000 */ sh $v0, ($a0) /* 001CC8 800268C8 00021400 */ sll $v0, $v0, 0x10 /* 001CCC 800268CC 00021403 */ sra $v0, $v0, 0x10 /* 001CD0 800268D0 28420100 */ slti $v0, $v0, 0x100 /* 001CD4 800268D4 50400019 */ beql $v0, $zero, .L8002693C /* 001CD8 800268D8 A4850000 */ sh $a1, ($a0) /* 001CDC 800268DC 08009A4F */ j .L8002693C /* 001CE0 800268E0 00000000 */ nop .L800268E4: /* 001CE4 800268E4 3C02800A */ lui $v0, 0x800a /* 001CE8 800268E8 2442A690 */ addiu $v0, $v0, -0x5970 /* 001CEC 800268EC 94430000 */ lhu $v1, ($v0) /* 001CF0 800268F0 AE040000 */ sw $a0, ($s0) /* 001CF4 800268F4 2463FFFF */ addiu $v1, $v1, -1 /* 001CF8 800268F8 A4430000 */ sh $v1, ($v0) /* 001CFC 800268FC 00031C00 */ sll $v1, $v1, 0x10 /* 001D00 80026900 1460000E */ bnez $v1, .L8002693C /* 001D04 80026904 00000000 */ nop /* 001D08 80026908 0C05260E */ jal func_80149838 /* 001D0C 8002690C 00000000 */ nop /* 001D10 80026910 0C00CD3C */ jal set_game_mode /* 001D14 80026914 0000202D */ daddu $a0, $zero, $zero /* 001D18 80026918 8E020000 */ lw $v0, ($s0) /* 001D1C 8002691C 2403FFDF */ addiu $v1, $zero, -0x21 /* 001D20 80026920 00431024 */ and $v0, $v0, $v1 /* 001D24 80026924 08009A4F */ j .L8002693C /* 001D28 80026928 AE020000 */ sw $v0, ($s0) .L8002692C: /* 001D2C 8002692C 3C018007 */ lui $at, 0x8007 /* 001D30 80026930 A42041A0 */ sh $zero, 0x41a0($at) /* 001D34 80026934 3C018007 */ lui $at, 0x8007 /* 001D38 80026938 A42041A2 */ sh $zero, 0x41a2($at) .L8002693C: /* 001D3C 8002693C 3C04800A */ lui $a0, 0x800a /* 001D40 80026940 2484A650 */ addiu $a0, $a0, -0x59b0 /* 001D44 80026944 8C830000 */ lw $v1, ($a0) /* 001D48 80026948 30620100 */ andi $v0, $v1, 0x100 /* 001D4C 8002694C 14400003 */ bnez $v0, .L8002695C /* 001D50 80026950 34621000 */ ori $v0, $v1, 0x1000 /* 001D54 80026954 2402EFFF */ addiu $v0, $zero, -0x1001 /* 001D58 80026958 00621024 */ and $v0, $v1, $v0 .L8002695C: /* 001D5C 8002695C AC820000 */ sw $v0, ($a0) /* 001D60 80026960 3C04800A */ lui $a0, 0x800a /* 001D64 80026964 2484A650 */ addiu $a0, $a0, -0x59b0 /* 001D68 80026968 8C830000 */ lw $v1, ($a0) /* 001D6C 8002696C 30620200 */ andi $v0, $v1, 0x200 /* 001D70 80026970 14400003 */ bnez $v0, .L80026980 /* 001D74 80026974 34622000 */ ori $v0, $v1, 0x2000 /* 001D78 80026978 2402DFFF */ addiu $v0, $zero, -0x2001 /* 001D7C 8002697C 00621024 */ and $v0, $v1, $v0 .L80026980: /* 001D80 80026980 AC820000 */ sw $v0, ($a0) /* 001D84 80026984 3C04800A */ lui $a0, 0x800a /* 001D88 80026988 2484A650 */ addiu $a0, $a0, -0x59b0 /* 001D8C 8002698C 8C830000 */ lw $v1, ($a0) /* 001D90 80026990 30620400 */ andi $v0, $v1, 0x400 /* 001D94 80026994 14400003 */ bnez $v0, .L800269A4 /* 001D98 80026998 34624000 */ ori $v0, $v1, 0x4000 /* 001D9C 8002699C 2402BFFF */ addiu $v0, $zero, -0x4001 /* 001DA0 800269A0 00621024 */ and $v0, $v1, $v0 .L800269A4: /* 001DA4 800269A4 AC820000 */ sw $v0, ($a0) /* 001DA8 800269A8 3C04800A */ lui $a0, 0x800a /* 001DAC 800269AC 2484A650 */ addiu $a0, $a0, -0x59b0 /* 001DB0 800269B0 8C830000 */ lw $v1, ($a0) /* 001DB4 800269B4 30620800 */ andi $v0, $v1, 0x800 /* 001DB8 800269B8 14400004 */ bnez $v0, .L800269CC /* 001DBC 800269BC 34628000 */ ori $v0, $v1, 0x8000 /* 001DC0 800269C0 3C02FFFF */ lui $v0, 0xffff /* 001DC4 800269C4 34427FFF */ ori $v0, $v0, 0x7fff /* 001DC8 800269C8 00621024 */ and $v0, $v1, $v0 .L800269CC: /* 001DCC 800269CC AC820000 */ sw $v0, ($a0) /* 001DD0 800269D0 0C00A67F */ jal rand_int /* 001DD4 800269D4 24040001 */ addiu $a0, $zero, 1 .L800269D8: /* 001DD8 800269D8 8FBF0018 */ lw $ra, 0x18($sp) /* 001DDC 800269DC 8FB10014 */ lw $s1, 0x14($sp) /* 001DE0 800269E0 8FB00010 */ lw $s0, 0x10($sp) /* 001DE4 800269E4 03E00008 */ jr $ra /* 001DE8 800269E8 27BD0020 */ addiu $sp, $sp, 0x20