Poach/Morbol Transformation

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
0008346c: 27bdffe8 addiu r29,r29,0xffe8
00083470: afb00010 sw r16,0x0010(r29)
00083474: 00808021 addu r16,r4,r0                      #Transfer r4 to r16 (Misc unit data pointer?)
00083478: afbf0014 sw r31,0x0014(r29)                  #
0008347c: 8e030144 lw r3,0x0144(r16)                   #Load status flag 5 (and 6? it's a LW..)
00083480: 00000000 nop                                 #
00083484: 30620180 andi r2,r3,0x0180                   #Check for Poached/Morbol virus'd
00083488: 10400034 beq r2,r0,0x0008355c                #Branch if not Poached/Morbol virus'd
0008348c: 30620080 andi r2,r3,0x0080                       #Check if only Poached
00083490: 10400007 beq r2,r0,0x000834b0                    #Branch if not Poached
00083494: 2402ff7f addiu r2,r0,0xff7f                          #Remove Poached flag?
00083498: 92040004 lbu r4,0x0004(r16)                          #Load Unit Misc ID
0008349c: 00621024 and r2,r3,r2                                #
000834a0: 0c02254a jal 0x00089528                              #00089528 - 00089550
000834a4: ae020144 sw r2,0x0144(r16)                           #Save new status flag 5 (and 6?)
000834a8: 08020d57 j 0x0008355c                                #Jump to END
000834ac: 00000000 nop                                         #
000834b0: 30620100 andi r2,r3,0x0100                       #Check if only Morbol virus'd
000834b4: 10400029 beq r2,r0,0x0008355c                    #Branch to END if not Morbol virus'd (redundant?)
000834b8: 34040092 ori r4,r0,0x0092                            #r4 = 0x92
000834bc: 2402feff addiu r2,r0,0xfeff                          #Remove Morbol virus flag?
000834c0: 00621024 and r2,r3,r2                                #
000834c4: ae020144 sw r2,0x0144(r16)                           #Save new status flag 5 (and 6?)
000834c8: 34020092 ori r2,r0,0x0092                            #r2 = 0x92
000834cc: a600007a sh r0,0x007a(r16)                           #Clear "chicken/frog/crystal/treasure graphic Y offset"?
000834d0: 0c020718 jal 0x00081c60                              #Set Marlboro Spritesheet Change
000834d4: a2020006 sb r2,0x0006(r16)                           #Save Spritesheet ID = 0x92 (Malboro)
000834d8: 34040092 ori r4,r0,0x0092                            #r4 = 0x92
000834dc: 0c02066a jal 0x000819a8                              #Get some Spritesheet data address
000834e0: a2020005 sb r2,0x0005(r16)                           #Save result of previous jal as Spritesheet VRAM slot
000834e4: 34040092 ori r4,r0,0x0092                            #r4 = 0x92
000834e8: 0c020682 jal 0x00081a08                              #00081a08 - 00081a54
000834ec: ae0201f4 sw r2,0x01f4(r16)                           #Set new SHP Data Pointer
000834f0: 9204007c lbu r4,0x007c(r16)                          #r4 = Unit's X Coordinate
000834f4: 9205007d lbu r5,0x007d(r16)                          #r5 = Unit's Y Coordinate
000834f8: 9206007e lbu r6,0x007e(r16)                          #r6 = Unit's Map Level
000834fc: 92030005 lbu r3,0x0005(r16)                          #r3 = Spritesheet VRAM slot (just overwritten?)
00083500: ae0201f8 sw r2,0x01f8(r16)                           #Save result of previous jal as SEQ Data Pointer
00083504: a2000007 sb r0,0x0007(r16)                           #Clear Stored Palette?
00083508: 24630014 addiu r3,r3,0x0014                          #r3 = Spritesheet VRAM slot + 0x14
0008350c: 0c060fed jal 0x00183fb4                              #Get Tile Data Pointer
00083510: a603000e sh r3,0x000e(r16)                           #Save adjusted r3 into VRAM Spritesheet ID?
00083514: 02002021 addu r4,r16,r0                              #Transfer r16 to r4 (Misc unit data pointer)
00083518: 90450006 lbu r5,0x0006(r2)                           #Load tile Selectability and other data?
0008351c: 34060001 ori r6,r0,0x0001                            #r6 = 0x01
00083520: 00052882 srl r5,r5,0x02                              #Remove "Cannot stop on" and Shadow tile data?
00083524: 0c02091a jal 0x00082468                              #00082300 - 000829e4
00083528: 30a50003 andi r5,r5,0x0003                           #Isolate Selectability data
0008352c: 34040003 ori r4,r0,0x0003                            #r4 = 0x03
00083530: 86050070 lh r5,0x0070(r16)                           #r5 = Current Facing
00083534: 0c020662 jal 0x00081988                              #Store unit animation/facing/someothervalue
00083538: 02003021 addu r6,r16,r0                              #r6 = Misc unit data pointer
0008353c: 8e040134 lw r4,0x0134(r16)                           #r4 = Pointer to Unit's Data
00083540: 0c0631d6 jal 0x0018c758                              #Some kind of ENTD/Unit manipulation (mount stuff?)
00083544: 00000000 nop                                         #
00083548: 8e020134 lw r2,0x0134(r16)                           #r2 = Pointer to Unit's Data
0008354c: 00000000 nop                                         #
00083550: 9044018a lbu r4,0x018a(r2)                           #Unit ID (without "Unit Exists" check)
00083554: 0c0667b2 jal 0x00199ec8                              #Usable Ability Setting/ENTD AI Calculations
00083558: 00000000 nop                                         #

End:
0008355c: 8fbf0014 lw r31,0x0014(r29)
00083560: 8fb00010 lw r16,0x0010(r29)
00083564: 27bd0018 addiu r29,r29,0x0018
00083568: 03e00008 jr r31
0008356c: 00000000 nop