Display Projected Action Effect
Jump to navigation
Jump to search
# ROUTINE: DISPLAY PROJECTED ACTION EFFECT # Parameters: # r4 = ? # r5 = ? # r6 = ? # r7 = ? # Returns: # r2 = [Text image data ID] of text image to display (Index into status/text image data table at 0x8014cf68) 00134a74: 27bdffb8 addiu r29,r29,-0x0048 00134a78: afb20028 sw r18,0x0028(r29) 00134a7c: 00809021 addu r18,r4,r0 00134a80: afb7003c sw r23,0x003c(r29) 00134a84: 00a0b821 addu r23,r5,r0 00134a88: afbe0040 sw r30,0x0040(r29) 00134a8c: 00c0f021 addu r30,r6,r0 00134a90: afb50034 sw r21,0x0034(r29) 00134a94: 00e0a821 addu r21,r7,r0 00134a98: afb60038 sw r22,0x0038(r29) 00134a9c: 0000b021 addu r22,r0,r0 # r22 = 0 00134aa0: afb40030 sw r20,0x0030(r29) 00134aa4: 3c148017 lui r20,0x8017 00134aa8: 269487a0 addiu r20,r20,-0x7860 # 0x801687a0 00134aac: 3402000f ori r2,r0,0x000f 00134ab0: afbf0044 sw r31,0x0044(r29) 00134ab4: afb3002c sw r19,0x002c(r29) 00134ab8: afb10024 sw r17,0x0024(r29) 00134abc: afb00020 sw r16,0x0020(r29) 00134ac0: afa00010 sw r0,0x0010(r29) # showTextImageDataIDZero = false 00134ac4: a6820000 sh r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] = 15 00134ac8: 34020001 ori r2,r0,0x0001 00134acc: 3c018017 lui r1,0x8017 00134ad0: a42287aa sh r2,-0x7856(r1) # RAM_HALFWORD[0x801687aa] = 1 00134ad4: 34020803 ori r2,r0,0x0803 00134ad8: 3c018017 lui r1,0x8017 00134adc: a42287a8 sh r2,-0x7858(r1) # RAM_HALFWORD[0x801687a8] = 0x803 00134ae0: 34020032 ori r2,r0,0x0032 00134ae4: 3c138017 lui r19,0x8017 00134ae8: 26738474 addiu r19,r19,-0x7b8c # 0x80168474 00134aec: 3c018017 lui r1,0x8017 00134af0: a42087a2 sh r0,-0x785e(r1) # RAM_HALFWORD[0x801687a2] = 0 00134af4: a682000c sh r2,0x000c(r20) # RAM_HALFWORD[0x801687ac] = 50 00134af8: 3c028017 lui r2,0x8017 00134afc: 944284b0 lhu r2,-0x7b50(r2) # RAM_HALFWORD[0x801684b0] 00134b00: 3c038017 lui r3,0x8017 00134b04: 946384bc lhu r3,-0x7b44(r3) # RAM_HALFWORD[0x801684bc] 00134b08: 3c048017 lui r4,0x8017 00134b0c: 8c842258 lw r4,0x2258(r4) # Target current action pointer 00134b10: 00008821 addu r17,r0,r0 # [Text image data ID] = 0 (Index into array at 0x8014cf68) 00134b14: 3c018017 lui r1,0x8017 00134b18: a42087b6 sh r0,-0x784a(r1) # RAM_HALFWORD[0x801687b6] = 0 00134b1c: a6620000 sh r2,0x0000(r19) # RAM_HALFWORD[0x80168474] = 0 00134b20: a663000c sh r3,0x000c(r19) # RAM_HALFWORD[0x80168480] = RAM_HALFWORD[0x801684bc] 00134b24: 9482002a lhu r2,0x002a(r4) # Load [Hit %] of current action 00134b28: 3c038015 lui r3,0x8015 00134b2c: 9063d09a lbu r3,-0x2f66(r3) # RAM_BYTE[0x8014d09a] 00134b30: 3c018015 lui r1,0x8015 00134b34: a422d058 sh r2,-0x2fa8(r1) # RAM_HALFWORD[0x8014d058] = [Hit %] 00134b38: 340200ff ori r2,r0,0x00ff 00134b3c: 10620003 beq r3,r2,0x00134b4c # (RAM_BYTE[0x8014d09a] == 0xff) 00134b40: 2685000c addiu r5,r20,0x000c # 0x801687ac 00134b44: 14800008 bne r4,r0,0x00134b68 # if ((RAM_BYTE[0x8014d09a] != 0xff) && ([Target] == 0 (null))) { 00134b48: 00000000 nop 00134b4c: 34020002 ori r2,r0,0x0002 00134b50: 3c018017 lui r1,0x8017 00134b54: a42287aa sh r2,-0x7856(r1) # RAM_HALFWORD[0x801687aa] = 2 00134b58: 3c018017 lui r1,0x8017 00134b5c: a42287b6 sh r2,-0x784a(r1) # RAM_HALFWORD[0x801687b6] = 2 00134b60: 0804d4a2 j 0x00135288 # Return (exit the routine) 00134b64: 00000000 nop # } 00134b68: 90820025 lbu r2,0x0025(r4) # Action display type 00134b6c: 00000000 nop 00134b70: 14400003 bne r2,r0,0x00134b80 # If (Action display type == 0) { 00134b74: 34020002 ori r2,r0,0x0002 00134b78: 3c018017 lui r1,0x8017 00134b7c: a42287aa sh r2,-0x7856(r1) # RAM_HALFWORD[0x801687aa] = 2 # } 00134b80: 90830025 lbu r3,0x0025(r4) # Action display type 00134b84: 00000000 nop # isDamage = false # isHealing = false 00134b88: 30620080 andi r2,r3,0x0080 # Check if [HP Damage] is flagged on [Display type] 00134b8c: 10400004 beq r2,r0,0x00134ba0 # if ([Display type] includes [HP Damage] flag) { 00134b90: 30620040 andi r2,r3,0x0040 00134b94: 84900004 lh r16,0x0004(r4) # [Display Number] = [HP Damage] 00134b98: 0804d404 j 0x00135010 # isDamage = true 00134b9c: 34110025 ori r17,r0,0x0025 # [Text image data ID] = 0x25 ("HP") # } 00134ba0: 10400004 beq r2,r0,0x00134bb4 # else if ([Display type] includes [HP Healing] flag) { 00134ba4: 30620020 andi r2,r3,0x0020 00134ba8: 84900006 lh r16,0x0006(r4) # [Display Number] = [HP Healing] 00134bac: 0804d2f6 j 0x00134bd8 # isHealing = true 00134bb0: 34110025 ori r17,r0,0x0025 # [Text image data ID] = 0x25 ("HP") # } 00134bb4: 10400004 beq r2,r0,0x00134bc8 # else if ([Display type] includes [MP Damage] flag) { 00134bb8: 30620010 andi r2,r3,0x0010 00134bbc: 84900008 lh r16,0x0008(r4) # [Display Number] = [MP Damage] 00134bc0: 0804d404 j 0x00135010 # isDamage = true 00134bc4: 34110026 ori r17,r0,0x0026 # [Text image data ID] = 0x26 ("MP") # } 00134bc8: 10400008 beq r2,r0,0x00134bec # else if ([Display type] includes [MP Healing] flag) { 00134bcc: 00000000 nop 00134bd0: 34110026 ori r17,r0,0x0026 # [Text image data ID] = 0x26 ("MP") 00134bd4: 8490000a lh r16,0x000a(r4) # [Display Number] = [MP Healing] # isHealing = true # } # if (isHealing) { 00134bd8: 34020403 ori r2,r0,0x0403 00134bdc: 3c018017 lui r1,0x8017 00134be0: a42287a8 sh r2,-0x7858(r1) # RAM_HALFWORD[0x801687a8] = 0x403 00134be4: 0804d404 j 0x00135010 00134be8: 00000000 nop # # } else if (!isDamage) { // (Not damage or healing; ! = not) 00134bec: 8484000c lh r4,0x000c(r4) # Gil lost 00134bf0: 00000000 nop 00134bf4: 1080001a beq r4,r0,0x00134c60 # if (([Gil lost] != 0) 00134bf8: 30620001 andi r2,r3,0x0001 00134bfc: 10400018 beq r2,r0,0x00134c60 # and ([Display type] includes [Display Status] (0x01) flag)) { 00134c00: 00000000 nop 00134c04: 00808021 addu r16,r4,r0 # [Display Number] = [Gil lost] 00134c08: 06000003 bltz r16,0x00134c18 # 00134c0c: 3411002e ori r17,r0,0x002e # [Text image data ID] = 0x2e ("GIL") # if ([Display Number] >= 0) { 00134c10: 0804d308 j 0x00134c20 00134c14: 34020404 ori r2,r0,0x0404 [Value to save] = 0x404 # } else { 00134c18: 00108023 subu r16,r0,r16 # [Display Number] = -[Display Number] 00134c1c: 34020804 ori r2,r0,0x0804 # [Value to save] = 0x804 # } 00134c20: 3c018017 lui r1,0x8017 00134c24: a42287a8 sh r2,-0x7858(r1) # RAM_HALFWORD[0x801687a8] = [Value to save] 00134c28: a680000a sh r0,0x000a(r20) # RAM_HALFWORD[0x801687aa] = 0 00134c2c: 96620000 lhu r2,0x0000(r19) # RAM_HALFWORD[0x80168474] 00134c30: 96830000 lhu r3,0x0000(r20) # RAM_HALFWORD[0x801687a0] 00134c34: 2442fffc addiu r2,r2,-0x0004 # RAM_HALFWORD[0x80168474] - 4 00134c38: a6620000 sh r2,0x0000(r19) # RAM_HALFWORD[0x80168474] = RAM_HALFWORD[0x80168474] - 4 00134c3c: 96820002 lhu r2,0x0002(r20) # RAM_HALFWORD[0x801687a2] 00134c40: 2463fff6 addiu r3,r3,-0x000a # RAM_HALFWORD[0x801687a0] - 10 00134c44: a6830000 sh r3,0x0000(r20) # RAM_HALFWORD[0x801687a0] = RAM_HALFWORD[0x801687a0] - 10 00134c48: 94a30000 lhu r3,0x0000(r5) # RAM_HALFWORD[0x801687ac] 00134c4c: 24420004 addiu r2,r2,0x0004 # RAM_HALFWORD[0x801687a2] + 4 00134c50: 24630002 addiu r3,r3,0x0002 # RAM_HALFWORD[0x801687ac] + 2 00134c54: a6820002 sh r2,0x0002(r20) # RAM_HALFWORD[0x801687a2] = RAM_HALFWORD[0x801687a2] + 4 00134c58: 0804d404 j 0x00135010 00134c5c: a4a30000 sh r3,0x0000(r5) # RAM_HALFWORD[0x801687ac] = RAM_HALFWORD[0x801687ac] + 2 # } else { 00134c60: 3c028017 lui r2,0x8017 00134c64: 8c422258 lw r2,0x2258(r2) # Target current action pointer 00134c68: 00000000 nop 00134c6c: 90430028 lbu r3,0x0028(r2) # Stolen exp 00134c70: 00000000 nop 00134c74: 10600015 beq r3,r0,0x00134ccc # if ([Stolen exp] != 0) { 00134c78: 00000000 nop 00134c7c: 90420025 lbu r2,0x0025(r2) # Display type 00134c80: 00000000 nop 00134c84: 30420001 andi r2,r2,0x0001 00134c88: 10400010 beq r2,r0,0x00134ccc # if ([Display type] includes [Display Status] (0x01) flag)) { 00134c8c: 30620080 andi r2,r3,0x0080 00134c90: 00608021 addu r16,r3,r0 # [Display Number] = [Stolen exp] 00134c94: 10400004 beq r2,r0,0x00134ca8 00134c98: 3411002f ori r17,r0,0x002f # [Text image data ID] = 0x2f ("Exp.") # if ([Stolen exp] is negative) { 00134c9c: 3210007f andi r16,r16,0x007f # [Stolen exp] = [Stolen exp] & 0x7f (Cut off sign bit to make it positive) 00134ca0: 0804d32b j 0x00134cac 00134ca4: 34020403 ori r2,r0,0x0403 # [Value to save] = 0x403 # } else { 00134ca8: 34020803 ori r2,r0,0x0803 # [Value to save] = 0x803 # } 00134cac: a6820008 sh r2,0x0008(r20) # RAM_HALFWORD[0x801687a8] = [Value to save] 00134cb0: 96820000 lhu r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] 00134cb4: 96630000 lhu r3,0x0000(r19) # RAM_HALFWORD[0x80168474] 00134cb8: 2442fff8 addiu r2,r2,-0x0008 # RAM_HALFWORD[0x801687a0] - 8 00134cbc: 2463fff8 addiu r3,r3,-0x0008 # RAM_HALFWORD[0x80168474] - 8 00134cc0: a6820000 sh r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] = RAM_HALFWORD[0x801687a0] - 8 00134cc4: 0804d404 j 0x00135010 # RAM_HALFWORD[0x80168474] = RAM_HALFWORD[0x80168474] - 8 00134cc8: a6630000 sh r3,0x0000(r19) # } # } else { 00134ccc: 3c038017 lui r3,0x8017 00134cd0: 8c632258 lw r3,0x2258(r3) # Target current action pointer 00134cd4: 00000000 nop 00134cd8: 94640010 lhu r4,0x0010(r3) # Current action's [Special Flags 2] and [Special Flags 1] 00134cdc: 00000000 nop 00134ce0: 30820180 andi r2,r4,0x0180 # Check for [-1 Level] or [+1 Level] flags 00134ce4: 10400012 beq r2,r0,0x00134d30 # if (Either [-1 Level] or [+1 Level] flag is set) { 00134ce8: 00000000 nop 00134cec: 90620025 lbu r2,0x0025(r3) # Action's [Display type] 00134cf0: 00000000 nop 00134cf4: 30420001 andi r2,r2,0x0001 00134cf8: 1040002f beq r2,r0,0x00134db8 00134cfc: 30820080 andi r2,r4,0x0080 # if ([Display type] includes [Display Status] (0x01) flag)) { 00134d00: 3411002d ori r17,r0,0x002d # [Text image data ID] = 0x2d ("Lv.") 00134d04: 10400003 beq r2,r0,0x00134d14 # 00134d08: 34100001 ori r16,r0,0x0001 # [Display Number] = 1 # if ([+1 Level] flag is set]) { 00134d0c: 0804d346 j 0x00134d18 00134d10: 34020401 ori r2,r0,0x0401 # [Value to save] = 0x401 # } else { 00134d14: 34020801 ori r2,r0,0x0801 # [Value to save] = 0x801 # } 00134d18: a6820008 sh r2,0x0008(r20) # RAM_HALFWORD[0x801687a8] = [Value to save] 00134d1c: 96820000 lhu r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] 00134d20: 00000000 nop 00134d24: 2442000c addiu r2,r2,0x000c # RAM_HALFWORD[0x801687a0] + 12 00134d28: 0804d404 j 0x00135010 00134d2c: a6820000 sh r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] = RAM_HALFWORD[0x801687a0] + 12 # } # } else { 00134d30: 90620025 lbu r2,0x0025(r3) # Action [Display type] 00134d34: 00000000 nop # runStatusSection = true 00134d38: 30420001 andi r2,r2,0x0001 00134d3c: 1040001e beq r2,r0,0x00134db8 # if ([Display type] includes [Display Status] (0x01) flag)) { 00134d40: 340200ff ori r2,r0,0x00ff 00134d44: 90630013 lbu r3,0x0013(r3) # Action [CT change] 00134d48: 00000000 nop 00134d4c: 14620006 bne r3,r2,0x00134d68 00134d50: 30820010 andi r2,r4,0x0010 # if ([CT change] == 0xff) { 00134d54: 34110024 ori r17,r0,0x0024 # [Text image data ID] = 0x24 ("Quick") 00134d58: 3c028015 lui r2,0x8015 00134d5c: 9042cffa lbu r2,-0x3006(r2) # Image Width for "Quick" text 00134d60: 0804d367 j 0x00134d9c # runStatusSection = false 00134d64: 00008021 addu r16,r0,r0 # [Display Number] = 0 00134d68: 10400006 beq r2,r0,0x00134d84 00134d6c: 30820004 andi r2,r4,0x0004 # } else if (Special flags contain [Steal Item]) { 00134d70: 3411001c ori r17,r0,0x001c # [Text image data ID] = 0x1c ("Stolen") 00134d74: 3c028015 lui r2,0x8015 00134d78: 9042cfda lbu r2,-0x3026(r2) # Image Width for "Stolen" text 00134d7c: 0804d367 j 0x00134d9c # runStatusSection = false 00134d80: 00008021 addu r16,r0,r0 # [Display Number] = 0 00134d84: 1040000c beq r2,r0,0x00134db8 # } else if (Special flags contain [Break Item]) { 00134d88: 00000000 nop 00134d8c: 3411001d ori r17,r0,0x001d # [Text image data ID] = 0x1d ("Broken") 00134d90: 00008021 addu r16,r0,r0 # [Display Number] = 0 00134d94: 3c028015 lui r2,0x8015 00134d98: 9042cfde lbu r2,-0x3022(r2) # Image Width for "Broken" text # runStatusSection = false # } # # if (!runStatusSection) { // runStatusSection == false 00134d9c: 96630000 lhu r3,0x0000(r19) # RAM_HALFWORD[0x80168474] 00134da0: 34040002 ori r4,r0,0x0002 00134da4: a684000a sh r4,0x000a(r20) # RAM_HALFWORD[0x801687aa] = 2 00134da8: 00621823 subu r3,r3,r2 # RAM_HALFWORD[0x80168474] - [Image Width] 00134dac: 24630008 addiu r3,r3,0x0008 # RAM_HALFWORD[0x80168474] - [Image Width] + 8 00134db0: 0804d404 j 0x00135010 00134db4: a6630000 sh r3,0x0000(r19) # RAM_HALFWORD[0x80168474] = RAM_HALFWORD[0x80168474] - [Image Width] + 8 # } # } # if (runStatusSection) { 00134db8: 3c048017 lui r4,0x8017 00134dbc: 8c842258 lw r4,0x2258(r4) # Target current action pointer 00134dc0: 00000000 nop 00134dc4: 90830025 lbu r3,0x0025(r4) # [Display type] 00134dc8: 00000000 nop 00134dcc: 30620008 andi r2,r3,0x0008 00134dd0: 1040002e beq r2,r0,0x00134e8c # if ([Display type] includes [Inflict/Remove status] (0x08) flag) { 00134dd4: 30620001 andi r2,r3,0x0001 00134dd8: 3c028006 lui r2,0x8006 00134ddc: 2442e4e8 addiu r2,r2,-0x1b18 # 0x8005e4e8 (Pointer to Find Action Highest Order Status Effect routine) 00134de0: 3c018017 lui r1,0x8017 00134de4: ac223ca8 sw r2,0x3ca8(r1) # (Pseudo)-Parameter: Routine to call = Find Action Highest Order Status Effect 00134de8: 0c0533ad jal 0x0014ceb4 # ROUTINE: [Find Result] = Call Inner Subroutine 00134dec: 00000000 nop 00134df0: 00408821 addu r17,r2,r0 # [Find Result] 00134df4: 1a200022 blez r17,0x00134e80 # if ([Find Result] > 0) { 00134df8: 32220080 andi r2,r17,0x0080 # 00134dfc: 10400003 beq r2,r0,0x00134e0c # if ([Status is being removed]) { 00134e00: 32230180 andi r3,r17,0x0180 00134e04: 0804d387 j 0x00134e1c 00134e08: 3416001f ori r22,r0,0x001f # r22 = 0x1f # } else if (([Status is being removed]) and (Status effect's Checks 2 0x08 flag was set)) { 00134e0c: 34020180 ori r2,r0,0x0180 # // (Unreachable code? If status was being removed, we would have hit the above block, and skipped this one...) 00134e10: 14620002 bne r3,r2,0x00134e1c 00134e14: 00000000 nop 00134e18: 3416001e ori r22,r0,0x001e r22 = 0x1e # } 00134e1c: 3231007f andi r17,r17,0x007f # [Status index] of [Find result] 00134e20: 3c018016 lui r1,0x8016 00134e24: 00310821 addu r1,r1,r17 00134e28: 9031791f lbu r17,0x791f(r1) # [Text image data ID] for this [Status index] 00134e2c: 00000000 nop 00134e30: 16200003 bne r17,r0,0x00134e40 # if ([Text image data ID] == 0) { 00134e34: 34020002 ori r2,r0,0x0002 00134e38: 34080001 ori r8,r0,0x0001 00134e3c: afa80010 sw r8,0x0010(r29) # showTextImageDataIDZero = true # } 00134e40: a682000a sh r2,0x000a(r20) # RAM_HALFWORD[0x801687aa] = 2 00134e44: 00111080 sll r2,r17,0x02 00134e48: 3c018015 lui r1,0x8015 00134e4c: 00220821 addu r1,r1,r2 00134e50: 9023cf6a lbu r3,-0x3096(r1) # Image Width for this [Text image data ID] 00134e54: 96620000 lhu r2,0x0000(r19) # RAM_HALFWORD[0x80168474] 00134e58: 00008021 addu r16,r0,r0 # [Display Number] = 0 00134e5c: 00431823 subu r3,r2,r3 # RAM_HALFWORD[0x80168474] - [Image Width] 00134e60: 24620008 addiu r2,r3,0x0008 # RAM_HALFWORD[0x80168474] - [Image Width] + 8 00134e64: 12c0006a beq r22,r0,0x00135010 00134e68: a6620000 sh r2,0x0000(r19) # RAM_HALFWORD[0x80168474] = RAM_HALFWORD[0x80168474] - [Image Width] + 8 # if (r22 != 0) { 00134e6c: 2462ffee addiu r2,r3,-0x0012 # RAM_HALFWORD[0x80168474] - [Image Width] - 12 00134e70: 3c018017 lui r1,0x8017 00134e74: a4228480 sh r2,-0x7b80(r1) # RAM_HALFWORD[0x80168480] = RAM_HALFWORD[0x80168474] - [Image Width] - 12 # } 00134e78: 0804d404 j 0x00135010 00134e7c: 00000000 nop # } 00134e80: 34020002 ori r2,r0,0x0002 00134e84: 0804d404 j 0x00135010 00134e88: a682000a sh r2,0x000a(r20) # RAM_HALFWORD[0x801687aa] = 2 # } 00134e8c: 10400060 beq r2,r0,0x00135010 # else if ([Display type] includes (0x01) flag) { 00134e90: 00000000 nop 00134e94: 90830012 lbu r3,0x0012(r4) # (Action [SP Change]) 00134e98: 00000000 nop 00134e9c: 10600006 beq r3,r0,0x00134eb8 00134ea0: 341100ff ori r17,r0,0x00ff # [Text image data ID] = 0xff (Invalid?) # [Value to save] = 0 # if ([SP Change] != 0) { 00134ea4: 34110028 ori r17,r0,0x0028 # [Text image data ID] = 0x28 ("Speed") 00134ea8: 96620000 lhu r2,0x0000(r19) 00134eac: 00608021 addu r16,r3,r0 # [Display Number] = [SP Change] 00134eb0: 0804d3d9 j 0x00134f64 00134eb4: 2442ffda addiu r2,r2,-0x0026 [Value to save] = RAM_HALFWORD[0x80168474] - 0x26 # } 00134eb8: 90830013 lbu r3,0x0013(r4) # (Action [CT Change]) 00134ebc: 00000000 nop 00134ec0: 10600006 beq r3,r0,0x00134edc # else if ([CT Change] != 0) { 00134ec4: 00000000 nop 00134ec8: 34110027 ori r17,r0,0x0027 # [Text image data ID] = 0x27 ("CT") 00134ecc: 96620000 lhu r2,0x0000(r19) 00134ed0: 00608021 addu r16,r3,r0 # [Display Number] = [CT Change] 00134ed4: 0804d3d9 j 0x00134f64 00134ed8: 2442ffe2 addiu r2,r2,-0x001e # [Value to save] = RAM_HALFWORD[0x80168474] - 0x1e # } 00134edc: 90830014 lbu r3,0x0014(r4) # (Action [PA Change]) 00134ee0: 00000000 nop 00134ee4: 10600006 beq r3,r0,0x00134f00 # else if ([PA Change] != 0) { 00134ee8: 00000000 nop 00134eec: 3411002b ori r17,r0,0x002b # [Text image data ID] = 0x2b (Sword Icon (PA)) 00134ef0: 96620000 lhu r2,0x0000(r19) 00134ef4: 00608021 addu r16,r3,r0 # [Display Number = [PA Change] 00134ef8: 0804d3d9 j 0x00134f64 00134efc: 2442ffec addiu r2,r2,-0x0014 # [Value to save] = RAM_HALFWORD[0x80168474] - 0x14 # } 00134f00: 90830015 lbu r3,0x0015(r4) # Action [MA Change] 00134f04: 00000000 nop 00134f08: 10600006 beq r3,r0,0x00134f24 # else if ([MA Change] != 0) { 00134f0c: 00000000 nop 00134f10: 3411002c ori r17,r0,0x002c # [Text image data ID] = 0x2c (Rod Icon (MA)) 00134f14: 96620000 lhu r2,0x0000(r19) 00134f18: 00608021 addu r16,r3,r0 # [Display Number = [MA Change] 00134f1c: 0804d3d9 j 0x00134f64 00134f20: 2442ffec addiu r2,r2,-0x0014 # [Value to save] = RAM_HALFWORD[0x80168474] - 0x14 # } 00134f24: 90830016 lbu r3,0x0016(r4) # Action [Brave Change] 00134f28: 00000000 nop 00134f2c: 10600005 beq r3,r0,0x00134f44 # else if ([Brave Change] != 0) { 00134f30: 00000000 nop 00134f34: 34110029 ori r17,r0,0x0029 # [Text image data ID] = 0x29 ("Brave") 00134f38: 96620000 lhu r2,0x0000(r19) 00134f3c: 0804d3d8 j 0x00134f60 # ([Value to save] = RAM_HALFWORD[0x80168474] - 0x24) 00134f40: 00608021 addu r16,r3,r0 # [Display Number] = [Brave Change] # } 00134f44: 90840017 lbu r4,0x0017(r4) # Action [Faith Change] 00134f48: 00000000 nop 00134f4c: 10800007 beq r4,r0,0x00134f6c # else if ([Faith Change] != 0) { 00134f50: 2622ffd9 addiu r2,r17,-0x0027 00134f54: 3411002a ori r17,r0,0x002a # [Text image data ID] = 0x2a ("Faith") 00134f58: 96620000 lhu r2,0x0000(r19) 00134f5c: 00808021 addu r16,r4,r0 # [Display Number] = [Faith Change] 00134f60: 2442ffdc addiu r2,r2,-0x0024 # [Value to save] = RAM_HALFWORD[0x80168474] - 0x24 # } # if ([Value to save] != 0) { 00134f64: a6620000 sh r2,0x0000(r19) # RAM_HALFWORD[0x80168474] = [Value to save] 00134f68: 2622ffd9 addiu r2,r17,-0x0027 # } 00134f6c: 2c420006 sltiu r2,r2,0x0006 00134f70: 10400025 beq r2,r0,0x00135008 # if (([Text image data ID] - 0x27) < 6) { // Values between 0x27 and 0x2c - Stat change (checked above) 00134f74: 34020002 ori r2,r0,0x0002 00134f78: 96820000 lhu r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] 00134f7c: 00000000 nop 00134f80: 24420010 addiu r2,r2,0x0010 # RAM_HALFWORD[0x801687a0] + 0x10 00134f84: a6820000 sh r2,0x0000(r20) # RAM_HALFWORD[0x801687a0] = RAM_HALFWORD[0x801687a0] + 0x10 00134f88: 32020080 andi r2,r16,0x0080 00134f8c: 10400010 beq r2,r0,0x00134fd0 # if (Stat change is negative) { 00134f90: 34020402 ori r2,r0,0x0402 00134f94: a6820008 sh r2,0x0008(r20) # RAM_HALFWORD[0x801687a8] = 0x402 00134f98: 34020027 ori r2,r0,0x0027 00134f9c: 16220018 bne r17,r2,0x00135000 # if (([Text image data ID] == 0x27 ("CT")) 00134fa0: 340200ff ori r2,r0,0x00ff 00134fa4: 1602001a bne r16,r2,0x00135010 # and ([Display Number] == 0xff)) { 00134fa8: 3210007f andi r16,r16,0x007f 00134fac: 34100064 ori r16,r0,0x0064 # [Display Number] = 100 00134fb0: 96640000 lhu r4,0x0000(r19) # RAM_HALFWORD[0x80168474] 00134fb4: 96830000 lhu r3,0x0000(r20) # RAM_HALFWORD[0x801687a0] 00134fb8: 34020003 ori r2,r0,0x0003 00134fbc: a6820008 sh r2,0x0008(r20) # RAM_HALFWORD[0x801687a8] = 3 00134fc0: 2463fff8 addiu r3,r3,-0x0008 # RAM_HALFWORD[0x801687a0] - 8 00134fc4: a6640000 sh r4,0x0000(r19) # RAM_HALFWORD[0x80168474] = RAM_HALFWORD[0x80168474] // Marvelous! 00134fc8: 0804d400 j 0x00135000 00134fcc: a6830000 sh r3,0x0000(r20) # RAM_HALFWORD[0x801687a0] = RAM_HALFWORD[0x801687a0] - 8 # } # } else { 00134fd0: 34020802 ori r2,r0,0x0802 00134fd4: a6820008 sh r2,0x0008(r20) # RAM_HALFWORD[0x801687a8] = 0x802 00134fd8: 34020027 ori r2,r0,0x0027 00134fdc: 16220008 bne r17,r2,0x00135000 # if (([Text image data ID] == 0x27 ("CT")) 00134fe0: 3402007f ori r2,r0,0x007f 00134fe4: 16020006 bne r16,r2,0x00135000 # and ([Display Number] == 0x7f)) { 00134fe8: 34030002 ori r3,r0,0x0002 00134fec: 00008021 addu r16,r0,r0 # [Display Number] = 0 00134ff0: 96620000 lhu r2,0x0000(r19) # RAM_HALFWORD[0x80168474] 00134ff4: a6830008 sh r3,0x0008(r20) # RAM_HALFWORD[0x801687a8] = 2 00134ff8: 24420008 addiu r2,r2,0x0008 # RAM_HALFWORD[0x80168474] + 8 00134ffc: a6620000 sh r2,0x0000(r19) # RAM_HALFWORD[0x80168474] = RAM_HALFWORD[0x80168474] + 8 # } # } 00135000: 0804d404 j 0x00135010 00135004: 3210007f andi r16,r16,0x007f # [Display Number] = [Display Number] & 0x7f // (Cut off sign bit) # } else { 00135008: 0804d4a2 j 0x00135288 0013500c: a682000a sh r2,0x000a(r20) # RAM_HALFWORD[0x801687aa] = 2 # Return 2 (Exit the routine with return value 2) # } # } # } # } # } # } # } 00135010: 3c018015 lui r1,0x8015 00135014: a430d056 sh r16,-0x2faa(r1) # RAM_HALFWORD[0x8014d056] = [Display Number] 00135018: 340200ff ori r2,r0,0x00ff 0013501c: 12220018 beq r17,r2,0x00135080 # if ([Text image data ID] != 0xff) { 00135020: 34047d7c ori r4,r0,0x7d7c 00135024: 16200005 bne r17,r0,0x0013503c 00135028: 00111880 sll r3,r17,0x02 # [Text image data ID] * 4 # if (([Text image data ID] != 0) 0013502c: 8fa80010 lw r8,0x0010(r29) 00135030: 00000000 nop 00135034: 11000013 beq r8,r0,0x00135084 # or (showTextImageDataIDZero)) 00135038: 2622ffdb addiu r2,r17,-0x0025 # { 0013503c: 3c028015 lui r2,0x8015 00135040: 2442cf68 addiu r2,r2,-0x3098 # Base pointer for Status image data array 00135044: 00621821 addu r3,r3,r2 # Status image data entry for [Text image data ID] 00135048: 90620000 lbu r2,0x0000(r3) # [X Load Location] 0013504c: 02402021 addu r4,r18,r0 # Routine call parameter 1: (Parameter 1) 00135050: a6a20000 sh r2,0x0000(r21) # RAM_HALFWORD[(Parameter 4)] = [X Load Location] 00135054: 90620001 lbu r2,0x0001(r3) # [Y Load Location] 00135058: 02e02821 addu r5,r23,r0 # Routine call parameter 2: (Parameter 2) 0013505c: a6a20002 sh r2,0x0002(r21) # RAM_HALFWORD[(Parameter 4) + 2] = [Y Load Location] 00135060: 90620002 lbu r2,0x0002(r3) # [Image Width] 00135064: 03c03021 addu r6,r30,r0 # Routine call parameter 3: (Parameter 3) 00135068: a6a20004 sh r2,0x0004(r21) # RAM_HALFWORD[(Parameter 4) + 4) = [Image Width] 0013506c: 90620003 lbu r2,0x0003(r3) # [Image Height] 00135070: 02a03821 addu r7,r21,r0 # Routine call parameter 4: (Parameter 4) 00135074: 0c052a0d jal 0x0014a834 # ROUTINE: Image loading setup? (0x14a834) ((Parameter 1), (Parameter 2), (Parameter 3), (Parameter 4)) 00135078: a6a20006 sh r2,0x0006(r21) # RAM_HALFWORD[(Parameter 4) + 6) = [Image Height] 0013507c: 34047d7c ori r4,r0,0x7d7c # } # } 00135080: 2622ffdb addiu r2,r17,-0x0025 # [Text image data ID] - 0x25 00135084: 2c42000b sltiu r2,r2,0x000b # Check if [Text image data ID] is between 0x25 and 0x2f ("HP" through "Exp.") (([Text image data ID] - 0x25) < 11) 00135088: 10400003 beq r2,r0,0x00135098 0013508c: a644000e sh r4,0x000e(r18) # RAM_HALFWORD[(Parameter 1) + 14] = 0x7d7c # if ([Text image data ID] is between 0x25 and 0x2f ("HP" through "Exp.")) { 00135090: 34027cbc ori r2,r0,0x7cbc # // These ones need to have a number before them in the projected display, e.g. - 10 HP 00135094: a642000e sh r2,0x000e(r18) # RAM_HALFWORD[(Parameter 1) + 14] = 0x7cbc # } 00135098: 2622ffd5 addiu r2,r17,-0x002b 0013509c: 2c420002 sltiu r2,r2,0x0002 001350a0: 10400002 beq r2,r0,0x001350ac # if ([Text image data ID] is between 0x2b and 0x2c (Sword Icon (PA) or Rod Icon (MA))) { 001350a4: 00000000 nop 001350a8: a644000e sh r4,0x000e(r18) # RAM_HALFWORD[(Parameter 1) + 14] = 0x7d7c # } 001350ac: 12c00016 beq r22,r0,0x00135108 # if (r22 != 0) { 001350b0: 00161880 sll r3,r22,0x02 # r22 * 4 001350b4: 26520028 addiu r18,r18,0x0028 # (Parameter 1) + 40 001350b8: 26b5000c addiu r21,r21,0x000c # (Parameter 4) + 12 001350bc: 3c028015 lui r2,0x8015 001350c0: 2442cf68 addiu r2,r2,-0x3098 # Base pointer for Status image data array 001350c4: 00621821 addu r3,r3,r2 # Status image data entry for r22 001350c8: a644000e sh r4,0x000e(r18) # RAM_HALFWORD[(Parameter 1) + 54] = 0x7d7c 001350cc: 90620000 lbu r2,0x0000(r3) # [X Load Location] 001350d0: 02402021 addu r4,r18,r0 # Routine call parameter 1: (Parameter 1) + 40 001350d4: a6a20000 sh r2,0x0000(r21) # RAM_HALFWORD[(Parameter 4) + 12] = [X Load Location] 001350d8: 90620001 lbu r2,0x0001(r3) # [Y Load Location] 001350dc: 02e02821 addu r5,r23,r0 # Routine call parameter 2: (Parameter 2) 001350e0: a6a20002 sh r2,0x0002(r21) # RAM_HALFWORD[(Parameter 4) + 14] = [Y Load Location] 001350e4: 90620002 lbu r2,0x0002(r3) # [Image Width] 001350e8: 03c03021 addu r6,r30,r0 # Routine call parameter 3: (Parameter 3) 001350ec: a6a20004 sh r2,0x0004(r21) # RAM_HALFWORD[(Parameter 4) + 16] = [Image Width] 001350f0: 90620003 lbu r2,0x0003(r3) # [Image Height] 001350f4: 02a03821 addu r7,r21,r0 # Routine call parameter 4: (Parameter 4) + 12 001350f8: 0c052a0d jal 0x0014a834 # ROUTINE: Image loading setup? (0x14a834) ((Parameter 1) + 40, (Parameter 2), (Parameter 3), (Parameter 4) + 12) 001350fc: a4e20006 sh r2,0x0006(r7) # RAM_HALFWORD[(Parameter 4) + 18] = [Image Height] 00135100: 0804d4a2 j 0x00135288 # RETURN [Text image data ID] 00135104: 02201021 addu r2,r17,r0 # } 00135108: 3c048017 lui r4,0x8017 0013510c: 8c842258 lw r4,0x2258(r4) # Target current action pointer 00135110: 00000000 nop 00135114: 90820025 lbu r2,0x0025(r4) # Action [Display type] 00135118: 00000000 nop 0013511c: 30420008 andi r2,r2,0x0008 # Check if [Display type] 0x08 flag is set 00135120: 10400058 beq r2,r0,0x00135284 # if ([Display type] 0x08 flag is not set), RETURN [Text image data ID] 00135124: 34020008 ori r2,r0,0x0008 00135128: 90830025 lbu r3,0x0025(r4) # Action [Display type] 0013512c: 00000000 nop 00135130: 10620054 beq r3,r2,0x00135284 # if ([Display type] 0x08 flag is the only one set), RETURN [Text image data ID] 00135134: 26520028 addiu r18,r18,0x0028 # (Parameter 1) + 40 00135138: 3c028006 lui r2,0x8006 0013513c: 2442e4e8 addiu r2,r2,-0x1b18 # 0x8005e4e8 (Pointer to Find Action Highest Order Status Effect routine) 00135140: 3c018017 lui r1,0x8017 00135144: ac223ca8 sw r2,0x3ca8(r1) # (Pseudo)-Parameter: Routine to call = Find Action Highest Order Status Effect 00135148: 0c0533ad jal 0x0014ceb4 # ROUTINE: [Find Result] = Call Inner Subroutine 0013514c: 26b5000c addiu r21,r21,0x000c # (Parameter 4) + 12 00135150: 00408821 addu r17,r2,r0 # [Find Result] 00135154: 1a20004b blez r17,0x00135284 # if ([Find Result] <= 0), RETURN [Find Result] // Return 0 if the find result was 0 (no status found) 00135158: 32220080 andi r2,r17,0x0080 0013515c: 10400006 beq r2,r0,0x00135178 00135160: 34020030 ori r2,r0,0x0030 # if ([Status is being removed]) { 00135164: a2420004 sb r2,0x0004(r18) # Save red value = 48 (RAM Location: (Parameter 1) + 44) 00135168: 3402008c ori r2,r0,0x008c 0013516c: a2420005 sb r2,0x0005(r18) # Save green value = 140 (RAM Location: (Parameter 1) + 45) 00135170: 0804d463 j 0x0013518c 00135174: 340200dc ori r2,r0,0x00dc # [Blue value to save] = 220 # } else { 00135178: 340200be ori r2,r0,0x00be 0013517c: a2420004 sb r2,0x0004(r18) # Save red value = 206 (RAM Location: (Parameter 1) + 44) 00135180: 34020028 ori r2,r0,0x0028 00135184: a2420005 sb r2,0x0005(r18) # Save green value = 40 (RAM Location: (Parameter 1) + 45) 00135188: 3402000a ori r2,r0,0x000a # [Blue value to save] = 10 # } 0013518c: a2420006 sb r2,0x0006(r18) # Save blue value = [Blue value to save] (RAM Location: (Parameter 1) + 46) 00135190: 3231007f andi r17,r17,0x007f # [Status index] of [Find result] 00135194: 3c018016 lui r1,0x8016 00135198: 00310821 addu r1,r1,r17 0013519c: 9031791f lbu r17,0x791f(r1) # [Text image data index] = Lookup [Text image data index] in table for [Status index] 001351a0: 340200ff ori r2,r0,0x00ff 001351a4: 12220037 beq r17,r2,0x00135284 # if ([Text image data index] == 0xff), RETURN 0xff 001351a8: 34020003 ori r2,r0,0x0003 001351ac: 12220035 beq r17,r2,0x00135284 # if ([Text image data index] == 3), RETURN 3 001351b0: 00111880 sll r3,r17,0x02 001351b4: 3c028015 lui r2,0x8015 001351b8: 2442cf68 addiu r2,r2,-0x3098 # Base pointer for Status image data array 001351bc: 00621821 addu r3,r3,r2 # Status image data entry for [Text image data ID] 001351c0: 90620000 lbu r2,0x0000(r3) # [X Load Location] 001351c4: 02402021 addu r4,r18,r0 # Routine call parameter 1: (Parameter 1) + 40 001351c8: a6a20000 sh r2,0x0000(r21) # RAM_HALFWORD[(Parameter 4) + 12] = [X Load Location] 001351cc: 90620001 lbu r2,0x0001(r3) # [Y Load Location] 001351d0: 02e02821 addu r5,r23,r0 # Routine call parameter 2: (Parameter 2) 001351d4: a6a20002 sh r2,0x0002(r21) # RAM_HALFWORD[(Parameter 4) + 14] = [Y Load Location] 001351d8: 90620002 lbu r2,0x0002(r3) # [Image Width] 001351dc: 03c03021 addu r6,r30,r0 # Routine call parameter 3: (Parameter 3) 001351e0: a6a20004 sh r2,0x0004(r21) # RAM_HALFWORD[(Parameter 4) + 16] = [Image Width] 001351e4: 90620003 lbu r2,0x0003(r3) # [Image Height] 001351e8: 02a03821 addu r7,r21,r0 # Routine call parameter 4: (Parameter 4) + 12 001351ec: 0c052a0d jal 0x0014a834 # ROUTINE: Image loading setup? (0x14a834) ((Parameter 1) + 40, (Parameter 2), (Parameter 3), (Parameter 4) + 12) 001351f0: a4e20006 sh r2,0x0006(r7) # RAM_HALFWORD[(Parameter 4) + 18] = [Image Height] 001351f4: 86420010 lh r2,0x0010(r18) # RAM_HALFWORD[(Parameter 1) + 56] 001351f8: 86430008 lh r3,0x0008(r18) # RAM_HALFWORD[(Parameter 1) + 48] 001351fc: 00000000 nop 00135200: 00438023 subu r16,r2,r3 # difference = RAM_HALFWORD[(Parameter 1) + 56] - RAM_HALFWORD[(Parameter 1) + 48] 00135204: 2a020018 slti r2,r16,0x0018 00135208: 1440001d bne r2,r0,0x00135280 0013520c: 34027d7c ori r2,r0,0x7d7c # if (difference >= 24) { 00135210: 24620018 addiu r2,r3,0x0018 # (Calc) RAM_HALFWORD[(Parameter 1) + 48] + 24 00135214: 96430010 lhu r3,0x0010(r18) # (Load) RAM_HALFWORD[(Parameter 1) + 56] 00135218: 96440018 lhu r4,0x0018(r18) # (Load) RAM_HALFWORD[(Parameter 1) + 64] 0013521c: 00501023 subu r2,r2,r16 # (Calc) RAM_HALFWORD[(Parameter 1) + 48] + 24 - difference 00135220: a6420008 sh r2,0x0008(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 48] = RAM_HALFWORD[(Parameter 1) + 48] + 24 - difference 00135224: 96420020 lhu r2,0x0020(r18) # (Load) RAM_HALFWORD([Parameter 1) + 72] 00135228: 24630018 addiu r3,r3,0x0018 # (Calc) RAM_HALFWORD[(Parameter 1) + 56] + 24 0013522c: 00701823 subu r3,r3,r16 # (Calc) RAM_HALFWORD[(Parameter 1) + 56] + 24 - difference 00135230: 24420018 addiu r2,r2,0x0018 # (Calc) RAM_HALFWORD[(Parameter 1) + 72] + 24 00135234: 00501023 subu r2,r2,r16 # (Calc) RAM_HALFWORD[(Parameter 1) + 72] + 24 - difference 00135238: a6420020 sh r2,0x0020(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 72] = RAM_HALFWORD[(Parameter 1) + 72] + 24 - difference 0013523c: 9642000a lhu r2,0x000a(r18) # (Load) RAM_HALFWORD[(Parameter 1) + 50] 00135240: 24840018 addiu r4,r4,0x0018 # (Calc) RAM_HALFWORD[(Parameter 1) + 64] + 24 00135244: a6430010 sh r3,0x0010(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 56] = RAM_HALFWORD[(Parameter 1) + 56] + 24 - difference 00135248: 96430012 lhu r3,0x0012(r18) # (Load) RAM_HALFWORD[(Parameter 1) + 58] 0013524c: 00902023 subu r4,r4,r16 # (Calc) RAM_HALFWORD[(Parameter 1) + 64] + 24 - difference 00135250: a6440018 sh r4,0x0018(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 64] = RAM_HALFWORD[(Parameter 1) + 64] + 24 - difference 00135254: 2442fff7 addiu r2,r2,-0x0009 # (Calc) RAM_HALFWORD[(Parameter 1) + 50] - 9 00135258: a642000a sh r2,0x000a(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 50] = RAM_HALFWORD[(Parameter 1) + 50] - 9 0013525c: 9642001a lhu r2,0x001a(r18) # (Load) RAM_HALFWORD([Parameter 1) + 66] 00135260: 2463fff7 addiu r3,r3,-0x0009 # (Calc) RAM_HALFWORD[(Parameter 1) + 58] - 9 00135264: a6430012 sh r3,0x0012(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 58] = RAM_HALFWORD[(Parameter 1) + 58] - 9 00135268: 96430022 lhu r3,0x0022(r18) # (Load) RAM_HALFWORD[(Parameter 1) + 74] 0013526c: 2442fff7 addiu r2,r2,-0x0009 # (Calc) RAM_HALFWORD[(Parameter 1) + 66] - 9 00135270: 2463fff7 addiu r3,r3,-0x0009 # (Calc) RAM_HALFWORD[(Parameter 1) + 74] - 9 00135274: a642001a sh r2,0x001a(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 66] = RAM_HALFWORD([Parameter 1) + 66] - 9 00135278: a6430022 sh r3,0x0022(r18) # (Save) RAM_HALFWORD[(Parameter 1) + 74] = RAM_HALFWORD([Parameter 1) + 74] - 9 0013527c: 34027d7c ori r2,r0,0x7d7c # } 00135280: a642000e sh r2,0x000e(r18) # RAM_HALFWORD[(Parameter 1) + 54] = 0x7d7c 00135284: 02201021 addu r2,r17,r0 # RETURN [Text image data index] 00135288: 8fbf0044 lw r31,0x0044(r29) 0013528c: 8fbe0040 lw r30,0x0040(r29) 00135290: 8fb7003c lw r23,0x003c(r29) 00135294: 8fb60038 lw r22,0x0038(r29) 00135298: 8fb50034 lw r21,0x0034(r29) 0013529c: 8fb40030 lw r20,0x0030(r29) 001352a0: 8fb3002c lw r19,0x002c(r29) 001352a4: 8fb20028 lw r18,0x0028(r29) 001352a8: 8fb10024 lw r17,0x0024(r29) 001352ac: 8fb00020 lw r16,0x0020(r29) 001352b0: 27bd0048 addiu r29,r29,0x0048 001352b4: 03e00008 jr r31 001352b8: 00000000 nop