Difference between revisions of "Update & Animate Unit/WEP/EFF"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
(I'm tired of this today, I just finished another routine and now I'm doing this because I want to animate weapon swings, christ someone shoot me)
Line 1: Line 1:
 
<font face='Courier New'>
 
<font face='Courier New'>
   
+
  Unit and Weapon Graphic loading master routine - I dunno how to move or rename pages /shrug.
 +
it's possible to freeze units by unchecking the 'is using ability' and they glide around, it's quite funny.
 +
skipping this routine prevents damage numbers, unit sprites, and weapon/effect sprites updating. It's possible 'is using ability' is actually 'update battle sprites?'
 +
 
 
  00085c0c: 27bdff58 addiu r29,r29,0xff58
 
  00085c0c: 27bdff58 addiu r29,r29,0xff58
 
  00085c10: afb20090 sw r18,0x0090(r29)
 
  00085c10: afb20090 sw r18,0x0090(r29)
  00085c14: 00809021 addu r18,r4,r0
+
  00085c14: 00809021 addu r18,r4,r0 r18 = misc unit data
 
  00085c18: afbf00a4 sw r31,0x00a4(r29)
 
  00085c18: afbf00a4 sw r31,0x00a4(r29)
 
  00085c1c: afb600a0 sw r22,0x00a0(r29)
 
  00085c1c: afb600a0 sw r22,0x00a0(r29)
Line 12: Line 15:
 
  00085c30: afb00088 sw r16,0x0088(r29)
 
  00085c30: afb00088 sw r16,0x0088(r29)
 
  00085c34: 3c058007 lui r5,0x8007
 
  00085c34: 3c058007 lui r5,0x8007
  00085c38: 24a580dc addiu r5,r5,0x80dc
+
  00085c38: 24a580dc addiu r5,r5,0x80dc wherever this data is, it's undocumented.
  00085c3c: 88a20003 lwl r2,0x0003(r5)
+
  00085c3c: 88a20003 lwl r2,0x0003(r5) this is basically just lw, but backwards
  00085c40: 98a20000 lwr r2,0x0000(r5)
+
  00085c40: 98a20000 lwr r2,0x0000(r5)
  00085c44: 88a30007 lwl r3,0x0007(r5)
+
  00085c44: 88a30007 lwl r3,0x0007(r5)
  00085c48: 98a30004 lwr r3,0x0004(r5)
+
  00085c48: 98a30004 lwr r3,0x0004(r5)
  00085c4c: aba2001b swl r2,0x001b(r29)
+
  00085c4c: aba2001b swl r2,0x001b(r29)
  00085c50: bba20018 swr r2,0x0018(r29)
+
  00085c50: bba20018 swr r2,0x0018(r29)
  00085c54: aba3001f swl r3,0x001f(r29)
+
  00085c54: aba3001f swl r3,0x001f(r29)
  00085c58: bba3001c swr r3,0x001c(r29)
+
  00085c58: bba3001c swr r3,0x001c(r29)
 
  00085c5c: 3c058007 lui r5,0x8007
 
  00085c5c: 3c058007 lui r5,0x8007
 
  00085c60: 24a580e4 addiu r5,r5,0x80e4
 
  00085c60: 24a580e4 addiu r5,r5,0x80e4
Line 67: Line 70:
 
  00085d0c: 3c058007 lui r5,0x8007
 
  00085d0c: 3c058007 lui r5,0x8007
 
  00085d10: 24a5810c addiu r5,r5,0x810c
 
  00085d10: 24a5810c addiu r5,r5,0x810c
  00085d14: 88a20003 lwl r2,0x0003(r5)
+
  00085d14: 88a20003 lwl r2,0x0003(r5) A lot of these double ups are the compiler being a fucking idiot.
 
  00085d18: 98a20000 lwr r2,0x0000(r5)
 
  00085d18: 98a20000 lwr r2,0x0000(r5)
 
  00085d1c: 88a30007 lwl r3,0x0007(r5)
 
  00085d1c: 88a30007 lwl r3,0x0007(r5)
Line 99: Line 102:
 
  00085d8c: aba30067 swl r3,0x0067(r29)
 
  00085d8c: aba30067 swl r3,0x0067(r29)
 
  00085d90: bba30064 swr r3,0x0064(r29)
 
  00085d90: bba30064 swr r3,0x0064(r29)
  00085d94: 9642000a lhu r2,0x000a(r18)
+
  00085d94: 9642000a lhu r2,0x000a(r18) load 'is using ability?' I feel like this is actually a sprite refresh thing.
 
  00085d98: 00000000 nop
 
  00085d98: 00000000 nop
  00085d9c: 104001f6 beq r2,r0,0x00086578
+
  00085d9c: 104001f6 beq r2,r0,0x00086578 branch if not updating sprites.
 
  00085da0: 00000000 nop
 
  00085da0: 00000000 nop
  00085da4: 8e4202e8 lw r2,0x02e8(r18)
+
  00085da4: 8e4202e8 lw r2,0x02e8(r18) yeah this is probably always 0.
 
  00085da8: 00000000 nop
 
  00085da8: 00000000 nop
  00085dac: 10400003 beq r2,r0,0x00085dbc
+
  00085dac: 10400003 beq r2,r0,0x00085dbc Branch if pointer empty
 
  00085db0: 00000000 nop
 
  00085db0: 00000000 nop
  00085db4: 0c01fd00 jal 0x0007f400
+
  00085db4: 0c01fd00 jal 0x0007f400 doesn't seem to do anything?
  00085db8: 02402021 addu r4,r18,r0
+
  00085db8: 02402021 addu r4,r18,r0 r4 = Misc unit data
 
  00085dbc: 3c02800a lui r2,0x800a
 
  00085dbc: 3c02800a lui r2,0x800a
  00085dc0: 84427786 lh r2,0x7786(r2)
+
  00085dc0: 84427786 lh r2,0x7786(r2) Load Map rotation
  00085dc4: 86430070 lh r3,0x0070(r18)
+
  00085dc4: 86430070 lh r3,0x0070(r18) load Current unit facing
 
  00085dc8: 00000000 nop
 
  00085dc8: 00000000 nop
  00085dcc: 00431021 addu r2,r2,r3
+
  00085dcc: 00431021 addu r2,r2,r3 Add Map rotation & current facing
  00085dd0: 30420fff andi r2,r2,0x0fff
+
  00085dd0: 30420fff andi r2,r2,0x0fff make sure there's only map rotation & current facing
  00085dd4: 04410002 bgez r2,0x00085de0
+
  00085dd4: 04410002 bgez r2,0x00085de0 Branch if there wasn't some blaring error in the code
  00085dd8: 00401821 addu r3,r2,r0
+
  00085dd8: 00401821 addu r3,r2,r0 r3 = r2
 
  00085ddc: 244303ff addiu r3,r2,0x03ff
 
  00085ddc: 244303ff addiu r3,r2,0x03ff
  00085de0: 00033283 sra r6,r3,0x0a
+
  00085de0: 00033283 sra r6,r3,0x0a r6 = current facing (0, 1, 2, and 3)
 
  00085de4: 04410002 bgez r2,0x00085df0
 
  00085de4: 04410002 bgez r2,0x00085df0
  00085de8: 00c09821 addu r19,r6,r0
+
  00085de8: 00c09821 addu r19,r6,r0 r19 = current facing
  00085dec: 244200ff addiu r2,r2,0x00ff
+
  00085dec: 244200ff addiu r2,r2,0x00ff subtract 1 from map rotation, and add 1 to current facing
 
  00085df0: 00022a03 sra r5,r2,0x08
 
  00085df0: 00022a03 sra r5,r2,0x08
  00085df4: 9644000c lhu r4,0x000c(r18)
+
  00085df4: 9644000c lhu r4,0x000c(r18) Load change of animation
 
  00085df8: 00000000 nop
 
  00085df8: 00000000 nop
  00085dfc: 10800142 beq r4,r0,0x00086308
+
  00085dfc: 10800142 beq r4,r0,0x00086308 branch if 0
  00085e00: 00a0a821 addu r21,r5,r0
+
  00085e00: 00a0a821 addu r21,r5,r0 r21 = r5
 
  00085e04: 2483ffff addiu r3,r4,0xffff
 
  00085e04: 2483ffff addiu r3,r4,0xffff
 
  00085e08: 34020002 ori r2,r0,0x0002
 
  00085e08: 34020002 ori r2,r0,0x0002
Line 448: Line 451:
 
  00086300: 08021931 j 0x000864c4
 
  00086300: 08021931 j 0x000864c4
 
  00086304: a640000c sh r0,0x000c(r18)
 
  00086304: a640000c sh r0,0x000c(r18)
  00086308: 8e420080 lw r2,0x0080(r18)
+
  00086308: 8e420080 lw r2,0x0080(r18) Load unit's Coordinates (lower halfword) map level and movement flags (Upper halfword)
  0008630c: 3c030100 lui r3,0x0100
+
  0008630c: 3c030100 lui r3,0x0100 r3 = 0x01000000
  00086310: 00431024 and r2,r2,r3
+
  00086310: 00431024 and r2,r2,r3 Check for float movement flag
  00086314: 1440004a bne r2,r0,0x00086440
+
  00086314: 1440004a bne r2,r0,0x00086440 Branch if floating
  00086318: 00a01821 addu r3,r5,r0
+
  00086318: 00a01821 addu r3,r5,r0 r3 = r5
  0008631c: 8642006e lh r2,0x006e(r18)
+
  0008631c: 8642006e lh r2,0x006e(r18) load vector thing? (or animation thing?)
 
  00086320: 00000000 nop
 
  00086320: 00000000 nop
  00086324: 10620023 beq r3,r2,0x000863b4
+
  00086324: 10620023 beq r3,r2,0x000863b4 branch if vectory/animation thing equals r5
 
  00086328: 00000000 nop
 
  00086328: 00000000 nop
  0008632c: 964501dc lhu r5,0x01dc(r18)
+
  0008632c: 964501dc lhu r5,0x01dc(r18) Load current animation?
 
  00086330: 00000000 nop
 
  00086330: 00000000 nop
  00086334: 2ca20006 sltiu r2,r5,0x0006
+
  00086334: 2ca20006 sltiu r2,r5,0x0006 r2 = 1 if animation < 6
  00086338: 1040000a beq r2,r0,0x00086364
+
  00086338: 1040000a beq r2,r0,0x00086364 branch if animation >= 6
  0008633c: 00031840 sll r3,r3,0x01
+
  0008633c: 00031840 sll r3,r3,0x01 r3 = r3 * 2
  00086340: 27a20010 addiu r2,r29,0x0010
+
  00086340: 27a20010 addiu r2,r29,0x0010 r2 = stack pointer + 0x10
  00086344: 00621821 addu r3,r3,r2
+
  00086344: 00621821 addu r3,r3,r2 load animation pointer...?
  00086348: 94620038 lhu r2,0x0038(r3)
+
  00086348: 94620038 lhu r2,0x0038(r3) Load animation from the stack
 
  0008634c: 00000000 nop
 
  0008634c: 00000000 nop
  00086350: a64201dc sh r2,0x01dc(r18)
+
  00086350: a64201dc sh r2,0x01dc(r18) Save current animation
  00086354: 96420012 lhu r2,0x0012(r18)
+
  00086354: 96420012 lhu r2,0x0012(r18) Load ?? from Misc unit data
  00086358: 94630018 lhu r3,0x0018(r3)
+
  00086358: 94630018 lhu r3,0x0018(r3) Load ?? from stack?
  0008635c: 080218e3 j 0x0008638c
+
  0008635c: 080218e3 j 0x0008638c @Jump ahead
  00086360: 3042fff9 andi r2,r2,0xfff9
+
  00086360: 3042fff9 andi r2,r2,0xfff9 ???
  00086364: 00061840 sll r3,r6,0x01
+
  00086364: 00061840 sll r3,r6,0x01 r3 = current facing * 2
  00086368: 27a20010 addiu r2,r29,0x0010
+
  00086368: 27a20010 addiu r2,r29,0x0010 r2 = stack pointer + 0x10
  0008636c: 00621821 addu r3,r3,r2
+
  0008636c: 00621821 addu r3,r3,r2 stack pointer + facing direction
  00086370: 94640010 lhu r4,0x0010(r3)
+
  00086370: 94640010 lhu r4,0x0010(r3) load... the thing
  00086374: 30a2fffe andi r2,r5,0xfffe
+
  00086374: 30a2fffe andi r2,r5,0xfffe ...?
  00086378: 00441021 addu r2,r2,r4
+
  00086378: 00441021 addu r2,r2,r4 add that to the thing
  0008637c: a64201dc sh r2,0x01dc(r18)
+
  0008637c: a64201dc sh r2,0x01dc(r18) save current animation
  00086380: 96420012 lhu r2,0x0012(r18)
+
  00086380: 96420012 lhu r2,0x0012(r18) Load transparency sprite colour change? (could also do vampier? maybe? dark/evil looking?)
  00086384: 94630008 lhu r3,0x0008(r3)
+
  00086384: 94630008 lhu r3,0x0008(r3) load another... thing
  00086388: 3042fff9 andi r2,r2,0xfff9
+
  00086388: 3042fff9 andi r2,r2,0xfff9 gets rid of bit flags 0x2, and 0x4.
  0008638c: 00431025 or r2,r2,r3
+
  0008638c: 00431025 or r2,r2,r3 @combine the two bitflag sets?
  00086390: a6420012 sh r2,0x0012(r18)
+
  00086390: a6420012 sh r2,0x0012(r18) save to transparency sprite colour change?
  00086394: 02402021 addu r4,r18,r0
+
  00086394: 02402021 addu r4,r18,r0 r4 = Unit Misc data
  00086398: 264501d8 addiu r5,r18,0x01d8
+
  00086398: 264501d8 addiu r5,r18,0x01d8 r5 = Unit Misc data + 0x01d8
 
  0008639c: 00003021 addu r6,r0,r0 r6 = 0
 
  0008639c: 00003021 addu r6,r0,r0 r6 = 0
  000863a0: a653006c sh r19,0x006c(r18) ??
+
  000863a0: a653006c sh r19,0x006c(r18) save Current facing (vectory thing? 0, 1, 2, or 3)
 
  000863a4: 0c021206 jal 0x00084818 --> [[00084818 - 00085230]] animate party units? Load party unit graphics?
 
  000863a4: 0c021206 jal 0x00084818 --> [[00084818 - 00085230]] animate party units? Load party unit graphics?
 
  000863a8: a655006e sh r21,0x006e(r18) ??
 
  000863a8: a655006e sh r21,0x006e(r18) ??

Revision as of 10:56, 29 June 2021

Unit and Weapon Graphic loading master routine - I dunno how to move or rename pages /shrug.
it's possible to freeze units by unchecking the 'is using ability' and they glide around, it's quite funny.
skipping this routine prevents damage numbers, unit sprites, and weapon/effect sprites updating. It's possible 'is using ability' is actually 'update battle sprites?'
00085c0c: 27bdff58 addiu r29,r29,0xff58
00085c10: afb20090 sw r18,0x0090(r29)
00085c14: 00809021 addu r18,r4,r0			r18 = misc unit data
00085c18: afbf00a4 sw r31,0x00a4(r29)
00085c1c: afb600a0 sw r22,0x00a0(r29)
00085c20: afb5009c sw r21,0x009c(r29)
00085c24: afb40098 sw r20,0x0098(r29)
00085c28: afb30094 sw r19,0x0094(r29)
00085c2c: afb1008c sw r17,0x008c(r29)
00085c30: afb00088 sw r16,0x0088(r29)
00085c34: 3c058007 lui r5,0x8007
00085c38: 24a580dc addiu r5,r5,0x80dc			wherever this data is, it's undocumented.
00085c3c: 88a20003 lwl r2,0x0003(r5)			this is basically just lw, but backwards
00085c40: 98a20000 lwr r2,0x0000(r5)			
00085c44: 88a30007 lwl r3,0x0007(r5)			
00085c48: 98a30004 lwr r3,0x0004(r5)			
00085c4c: aba2001b swl r2,0x001b(r29)			
00085c50: bba20018 swr r2,0x0018(r29)			
00085c54: aba3001f swl r3,0x001f(r29)			
00085c58: bba3001c swr r3,0x001c(r29)			
00085c5c: 3c058007 lui r5,0x8007
00085c60: 24a580e4 addiu r5,r5,0x80e4
00085c64: 88a20003 lwl r2,0x0003(r5)
00085c68: 98a20000 lwr r2,0x0000(r5)
00085c6c: 88a30007 lwl r3,0x0007(r5)
00085c70: 98a30004 lwr r3,0x0004(r5)
00085c74: aba20023 swl r2,0x0023(r29)
00085c78: bba20020 swr r2,0x0020(r29)
00085c7c: aba30027 swl r3,0x0027(r29)
00085c80: bba30024 swr r3,0x0024(r29)
00085c84: 3c058007 lui r5,0x8007
00085c88: 24a580ec addiu r5,r5,0x80ec
00085c8c: 88a20003 lwl r2,0x0003(r5)
00085c90: 98a20000 lwr r2,0x0000(r5)
00085c94: 88a30007 lwl r3,0x0007(r5)
00085c98: 98a30004 lwr r3,0x0004(r5)
00085c9c: 88a4000b lwl r4,0x000b(r5)
00085ca0: 98a40008 lwr r4,0x0008(r5)
00085ca4: aba2002b swl r2,0x002b(r29)
00085ca8: bba20028 swr r2,0x0028(r29)
00085cac: aba3002f swl r3,0x002f(r29)
00085cb0: bba3002c swr r3,0x002c(r29)
00085cb4: aba40033 swl r4,0x0033(r29)
00085cb8: bba40030 swr r4,0x0030(r29)
00085cbc: 88a2000f lwl r2,0x000f(r5)
00085cc0: 98a2000c lwr r2,0x000c(r5)
00085cc4: 88a30013 lwl r3,0x0013(r5)
00085cc8: 98a30010 lwr r3,0x0010(r5)
00085ccc: 88a40017 lwl r4,0x0017(r5)
00085cd0: 98a40014 lwr r4,0x0014(r5)
00085cd4: aba20037 swl r2,0x0037(r29)
00085cd8: bba20034 swr r2,0x0034(r29)
00085cdc: aba3003b swl r3,0x003b(r29)
00085ce0: bba30038 swr r3,0x0038(r29)
00085ce4: aba4003f swl r4,0x003f(r29)
00085ce8: bba4003c swr r4,0x003c(r29)
00085cec: 88a2001b lwl r2,0x001b(r5)
00085cf0: 98a20018 lwr r2,0x0018(r5)
00085cf4: 88a3001f lwl r3,0x001f(r5)
00085cf8: 98a3001c lwr r3,0x001c(r5)
00085cfc: aba20043 swl r2,0x0043(r29)
00085d00: bba20040 swr r2,0x0040(r29)
00085d04: aba30047 swl r3,0x0047(r29)
00085d08: bba30044 swr r3,0x0044(r29)
00085d0c: 3c058007 lui r5,0x8007
00085d10: 24a5810c addiu r5,r5,0x810c
00085d14: 88a20003 lwl r2,0x0003(r5)			A lot of these double ups are the compiler being a fucking idiot.
00085d18: 98a20000 lwr r2,0x0000(r5)
00085d1c: 88a30007 lwl r3,0x0007(r5)
00085d20: 98a30004 lwr r3,0x0004(r5)
00085d24: 88a4000b lwl r4,0x000b(r5)
00085d28: 98a40008 lwr r4,0x0008(r5)
00085d2c: aba2004b swl r2,0x004b(r29)
00085d30: bba20048 swr r2,0x0048(r29)
00085d34: aba3004f swl r3,0x004f(r29)
00085d38: bba3004c swr r3,0x004c(r29)
00085d3c: aba40053 swl r4,0x0053(r29)
00085d40: bba40050 swr r4,0x0050(r29)
00085d44: 88a2000f lwl r2,0x000f(r5)
00085d48: 98a2000c lwr r2,0x000c(r5)
00085d4c: 88a30013 lwl r3,0x0013(r5)
00085d50: 98a30010 lwr r3,0x0010(r5)
00085d54: 88a40017 lwl r4,0x0017(r5)
00085d58: 98a40014 lwr r4,0x0014(r5)
00085d5c: aba20057 swl r2,0x0057(r29)
00085d60: bba20054 swr r2,0x0054(r29)
00085d64: aba3005b swl r3,0x005b(r29)
00085d68: bba30058 swr r3,0x0058(r29)
00085d6c: aba4005f swl r4,0x005f(r29)
00085d70: bba4005c swr r4,0x005c(r29)
00085d74: 88a2001b lwl r2,0x001b(r5)
00085d78: 98a20018 lwr r2,0x0018(r5)
00085d7c: 88a3001f lwl r3,0x001f(r5)
00085d80: 98a3001c lwr r3,0x001c(r5)
00085d84: aba20063 swl r2,0x0063(r29)
00085d88: bba20060 swr r2,0x0060(r29)
00085d8c: aba30067 swl r3,0x0067(r29)
00085d90: bba30064 swr r3,0x0064(r29)
00085d94: 9642000a lhu r2,0x000a(r18)			load 'is using ability?' I feel like this is actually a sprite refresh thing.
00085d98: 00000000 nop
00085d9c: 104001f6 beq r2,r0,0x00086578		branch if not updating sprites.
00085da0: 00000000 nop
00085da4: 8e4202e8 lw r2,0x02e8(r18)			yeah this is probably always 0.
00085da8: 00000000 nop
00085dac: 10400003 beq r2,r0,0x00085dbc		Branch if pointer empty
00085db0: 00000000 nop
00085db4: 0c01fd00 jal 0x0007f400			doesn't seem to do anything?
00085db8: 02402021 addu r4,r18,r0			r4 = Misc unit data
00085dbc: 3c02800a lui r2,0x800a
00085dc0: 84427786 lh r2,0x7786(r2)			Load Map rotation
00085dc4: 86430070 lh r3,0x0070(r18)			load Current unit facing
00085dc8: 00000000 nop
00085dcc: 00431021 addu r2,r2,r3			Add Map rotation & current facing
00085dd0: 30420fff andi r2,r2,0x0fff			make sure there's only map rotation & current facing
00085dd4: 04410002 bgez r2,0x00085de0			Branch if there wasn't some blaring error in the code
00085dd8: 00401821 addu r3,r2,r0			r3 = r2
00085ddc: 244303ff addiu r3,r2,0x03ff
00085de0: 00033283 sra r6,r3,0x0a			r6 = current facing (0, 1, 2, and 3)
00085de4: 04410002 bgez r2,0x00085df0
00085de8: 00c09821 addu r19,r6,r0			r19 = current facing
00085dec: 244200ff addiu r2,r2,0x00ff			subtract 1 from map rotation, and add 1 to current facing
00085df0: 00022a03 sra r5,r2,0x08
00085df4: 9644000c lhu r4,0x000c(r18)			Load change of animation
00085df8: 00000000 nop
00085dfc: 10800142 beq r4,r0,0x00086308		branch if 0
00085e00: 00a0a821 addu r21,r5,r0			r21 = r5
00085e04: 2483ffff addiu r3,r4,0xffff
00085e08: 34020002 ori r2,r0,0x0002
00085e0c: 1462002d bne r3,r2,0x00085ec4
00085e10: 34100002 ori r16,r0,0x0002
00085e14: 26420060 addiu r2,r18,0x0060
00085e18: a4400208 sh r0,0x0208(r2)
00085e1c: 2610ffff addiu r16,r16,0xffff
00085e20: 0601fffd bgez r16,0x00085e18
00085e24: 2442ffd0 addiu r2,r2,0xffd0
00085e28: 02402021 addu r4,r18,r0
00085e2c: 00151840 sll r3,r21,0x01
00085e30: 27a20010 addiu r2,r29,0x0010
00085e34: 00621821 addu r3,r3,r2
00085e38: 94620038 lhu r2,0x0038(r3)
00085e3c: 264501d8 addiu r5,r18,0x01d8
00085e40: a64201dc sh r2,0x01dc(r18)
00085e44: 96420012 lhu r2,0x0012(r18)
00085e48: 94630018 lhu r3,0x0018(r3)
00085e4c: 34060001 ori r6,r0,0x0001
00085e50: a653006c sh r19,0x006c(r18)
00085e54: a655006e sh r21,0x006e(r18)
00085e58: a64001de sh r0,0x01de(r18)
00085e5c: a64001e2 sh r0,0x01e2(r18)
00085e60: a64001e4 sh r0,0x01e4(r18)
00085e64: a6400054 sh r0,0x0054(r18)
00085e68: a6400052 sh r0,0x0052(r18)
00085e6c: a6400050 sh r0,0x0050(r18)
00085e70: a640005c sh r0,0x005c(r18)
00085e74: a640005a sh r0,0x005a(r18)
00085e78: a6400058 sh r0,0x0058(r18)
00085e7c: a64001ea sh r0,0x01ea(r18)
00085e80: a64001ec sh r0,0x01ec(r18)
00085e84: a64001ee sh r0,0x01ee(r18)
00085e88: a64001f0 sh r0,0x01f0(r18)
00085e8c: 3042fff9 andi r2,r2,0xfff9
00085e90: 00431025 or r2,r2,r3
00085e94: 0c021206 jal 0x00084818
00085e98: a6420012 sh r2,0x0012(r18)
00085e9c: 02402021 addu r4,r18,r0
00085ea0: 0c0216e8 jal 0x00085ba0
00085ea4: a640000c sh r0,0x000c(r18)
00085ea8: 08021932 j 0x000864c8
00085eac: 00008021 addu r16,r0,r0
00085eb0: 02402021 addu r4,r18,r0
00085eb4: 0c021686 jal 0x00085a18
00085eb8: 02803021 addu r6,r20,r0
00085ebc: 08021817 j 0x0008605c
00085ec0: 34020002 ori r2,r0,0x0002
00085ec4: 2c82000c sltiu r2,r4,0x000c
00085ec8: 10400013 beq r2,r0,0x00085f18
00085ecc: 00131840 sll r3,r19,0x01
00085ed0: 3c038004 lui r3,0x8004
00085ed4: 8c635994 lw r3,0x5994(r3)
00085ed8: 92420004 lbu r2,0x0004(r18)
00085edc: 00602021 addu r4,r3,r0
00085ee0: 04610002 bgez r3,0x00085eec
00085ee4: 30450003 andi r5,r2,0x0003
00085ee8: 24640003 addiu r4,r3,0x0003
00085eec: 00041083 sra r2,r4,0x02
00085ef0: 00021080 sll r2,r2,0x02
00085ef4: 00621023 subu r2,r3,r2
00085ef8: 10a20006 beq r5,r2,0x00085f14
00085efc: 3c032000 lui r3,0x2000
00085f00: 8e420080 lw r2,0x0080(r18)
00085f04: 00000000 nop
00085f08: 00431024 and r2,r2,r3
00085f0c: 1040016e beq r2,r0,0x000864c8
00085f10: 00008021 addu r16,r0,r0
00085f14: 00131840 sll r3,r19,0x01
00085f18: 03a31821 addu r3,r29,r3
00085f1c: 9642000c lhu r2,0x000c(r18)
00085f20: 84630020 lh r3,0x0020(r3)
00085f24: 964401dc lhu r4,0x01dc(r18)
00085f28: 2442ffff addiu r2,r2,0xffff
00085f2c: 00021040 sll r2,r2,0x01
00085f30: 00431021 addu r2,r2,r3
00085f34: 1444000a bne r2,r4,0x00085f60
00085f38: 34110001 ori r17,r0,0x0001
00085f3c: 964201e2 lhu r2,0x01e2(r18)
00085f40: 00000000 nop
00085f44: 10400006 beq r2,r0,0x00085f60
00085f48: 3c032000 lui r3,0x2000
00085f4c: 8e420080 lw r2,0x0080(r18)
00085f50: 00000000 nop
00085f54: 00431024 and r2,r2,r3
00085f58: 104000e9 beq r2,r0,0x00086300
00085f5c: 00000000 nop
00085f60: 9642000c lhu r2,0x000c(r18)
00085f64: 00000000 nop
00085f68: 2444ffff addiu r4,r2,0xffff
00085f6c: 288201f4 slti r2,r4,0x01f4
00085f70: 1040007c beq r2,r0,0x00086164
00085f74: 00131040 sll r2,r19,0x01
00085f78: 00042040 sll r4,r4,0x01
00085f7c: 03a21021 addu r2,r29,r2
00085f80: 8e4501f8 lw r5,0x01f8(r18)
00085f84: 84430020 lh r3,0x0020(r2)
00085f88: 8ca20004 lw r2,0x0004(r5)
00085f8c: 00832021 addu r4,r4,r3
00085f90: 0082102b sltu r2,r4,r2
00085f94: 10400073 beq r2,r0,0x00086164
00085f98: 00000000 nop
00085f9c: 8ca20000 lw r2,0x0000(r5)
00085fa0: 00000000 nop
00085fa4: 0082102b sltu r2,r4,r2
00085fa8: 1440006c bne r2,r0,0x0008615c
00085fac: 00008021 addu r16,r0,r0
00085fb0: 92440004 lbu r4,0x0004(r18)
00085fb4: 00001821 addu r3,r0,r0
00085fb8: 3c01800a lui r1,0x800a
00085fbc: 00230821 addu r1,r1,r3
00085fc0: 8c2277c4 lw r2,0x77c4(r1)
00085fc4: 00000000 nop
00085fc8: 3042001f andi r2,r2,0x001f
00085fcc: 10440006 beq r2,r4,0x00085fe8
00085fd0: 34020002 ori r2,r0,0x0002
00085fd4: 26100001 addiu r16,r16,0x0001
00085fd8: 2a020002 slti r2,r16,0x0002
00085fdc: 1440fff6 bne r2,r0,0x00085fb8
00085fe0: 24637564 addiu r3,r3,0x7564
00085fe4: 34020002 ori r2,r0,0x0002
00085fe8: 1602005e bne r16,r2,0x00086164
00085fec: 00008021 addu r16,r0,r0
00085ff0: 340400ff ori r4,r0,0x00ff
00085ff4: 00001821 addu r3,r0,r0
00085ff8: 3c01800a lui r1,0x800a
00085ffc: 00230821 addu r1,r1,r3
00086000: 8c2277c4 lw r2,0x77c4(r1)
00086004: 00000000 nop
00086008: 1444000f bne r2,r4,0x00086048
0008600c: 00000000 nop
00086010: 0000a021 addu r20,r0,r0
00086014: 00001821 addu r3,r0,r0
00086018: 3c01800a lui r1,0x800a
0008601c: 00230821 addu r1,r1,r3
00086020: 8c2277c8 lw r2,0x77c8(r1)
00086024: 00000000 nop
00086028: 1040ffa1 beq r2,r0,0x00085eb0
0008602c: 02002821 addu r5,r16,r0
00086030: 26940001 addiu r20,r20,0x0001
00086034: 2a820002 slti r2,r20,0x0002
00086038: 1440fff7 bne r2,r0,0x00086018
0008603c: 24637564 addiu r3,r3,0x7564
00086040: 08021817 j 0x0008605c
00086044: 34020002 ori r2,r0,0x0002
00086048: 26100001 addiu r16,r16,0x0001
0008604c: 2a020002 slti r2,r16,0x0002
00086050: 1440ffe9 bne r2,r0,0x00085ff8
00086054: 24637564 addiu r3,r3,0x7564
00086058: 34020002 ori r2,r0,0x0002
0008605c: 16020002 bne r16,r2,0x00086068
00086060: 00000000 nop
00086064: 00008821 addu r17,r0,r0
00086068: 16820002 bne r20,r2,0x00086074
0008606c: 00000000 nop
00086070: 00008821 addu r17,r0,r0
00086074: 1620003d bne r17,r0,0x0008616c
00086078: 34100002 ori r16,r0,0x0002
0008607c: 3c04800b lui r4,0x800b
00086080: 2484ed28 addiu r4,r4,0xed28
00086084: 8c820000 lw r2,0x0000(r4)
00086088: 00000000 nop
0008608c: 2442ff02 addiu r2,r2,0xff02
00086090: 2c420002 sltiu r2,r2,0x0002
00086094: 14400033 bne r2,r0,0x00086164
00086098: 00000000 nop
0008609c: 94840000 lhu r4,0x0000(r4)
000860a0: 0c01e9b9 jal 0x0007a6e4
000860a4: 3084001f andi r4,r4,0x001f
000860a8: 00402021 addu r4,r2,r0
000860ac: 1080002d beq r4,r0,0x00086164
000860b0: 00000000 nop
000860b4: 948201dc lhu r2,0x01dc(r4)
000860b8: 00000000 nop
000860bc: 30420001 andi r2,r2,0x0001
000860c0: 1040000c beq r2,r0,0x000860f4
000860c4: 00000000 nop
000860c8: 90820006 lbu r2,0x0006(r4)
000860cc: 00000000 nop
000860d0: 00021080 sll r2,r2,0x02
000860d4: 3c018009 lui r1,0x8009
000860d8: 00220821 addu r1,r1,r2
000860dc: 90224748 lbu r2,0x4748(r1)
000860e0: 3c018009 lui r1,0x8009
000860e4: 00220821 addu r1,r1,r2
000860e8: 902249d0 lbu r2,0x49d0(r1)
000860ec: 08021848 j 0x00086120
000860f0: a48201e0 sh r2,0x01e0(r4)
000860f4: 90820006 lbu r2,0x0006(r4)
000860f8: 00000000 nop
000860fc: 00021080 sll r2,r2,0x02
00086100: 3c018009 lui r1,0x8009
00086104: 00220821 addu r1,r1,r2
00086108: 90224748 lbu r2,0x4748(r1)
0008610c: 3c018009 lui r1,0x8009
00086110: 00220821 addu r1,r1,r2
00086114: 902249c4 lbu r2,0x49c4(r1)
00086118: 00000000 nop
0008611c: a48201e0 sh r2,0x01e0(r4)
00086120: 248501d8 addiu r5,r4,0x01d8
00086124: 948601e0 lhu r6,0x01e0(r4)
00086128: 948701dc lhu r7,0x01dc(r4)
0008612c: 34110001 ori r17,r0,0x0001
00086130: a4800054 sh r0,0x0054(r4)
00086134: a4800052 sh r0,0x0052(r4)
00086138: 0c021085 jal 0x00084214
0008613c: a4800050 sh r0,0x0050(r4)
00086140: 02402021 addu r4,r18,r0
00086144: 34050001 ori r5,r0,0x0001
00086148: 34060001 ori r6,r0,0x0001
0008614c: 0c021686 jal 0x00085a18
00086150: a64001e2 sh r0,0x01e2(r18)
00086154: 08021859 j 0x00086164
00086158: 00000000 nop
0008615c: 0c0216e8 jal 0x00085ba0
00086160: 02402021 addu r4,r18,r0
00086164: 12200045 beq r17,r0,0x0008627c
00086168: 34100002 ori r16,r0,0x0002
0008616c: 26420060 addiu r2,r18,0x0060
00086170: a4400208 sh r0,0x0208(r2)
00086174: 2610ffff addiu r16,r16,0xffff
00086178: 0601fffd bgez r16,0x00086170
0008617c: 2442ffd0 addiu r2,r2,0xffd0
00086180: 9642000c lhu r2,0x000c(r18)
00086184: 00000000 nop
00086188: 2444ffff addiu r4,r2,0xffff
0008618c: 288201f4 slti r2,r4,0x01f4
00086190: 14400004 bne r2,r0,0x000861a4
00086194: 00000000 nop
00086198: 9642000c lhu r2,0x000c(r18)
0008619c: 0802186e j 0x000861b8
000861a0: 2442ffff addiu r2,r2,0xffff
000861a4: 00131040 sll r2,r19,0x01
000861a8: 03a21021 addu r2,r29,r2
000861ac: 94430020 lhu r3,0x0020(r2)
000861b0: 00041040 sll r2,r4,0x01
000861b4: 00431021 addu r2,r2,r3
000861b8: a64201dc sh r2,0x01dc(r18)
000861bc: 02402021 addu r4,r18,r0
000861c0: 264501d8 addiu r5,r18,0x01d8
000861c4: 00131040 sll r2,r19,0x01
000861c8: 03a21021 addu r2,r29,r2
000861cc: 96430012 lhu r3,0x0012(r18)
000861d0: 94420018 lhu r2,0x0018(r2)
000861d4: 34060001 ori r6,r0,0x0001
000861d8: a653006c sh r19,0x006c(r18)
000861dc: a655006e sh r21,0x006e(r18)
000861e0: a64001de sh r0,0x01de(r18)
000861e4: a64001e2 sh r0,0x01e2(r18)
000861e8: a64001e4 sh r0,0x01e4(r18)
000861ec: a6400054 sh r0,0x0054(r18)
000861f0: a6400052 sh r0,0x0052(r18)
000861f4: a6400050 sh r0,0x0050(r18)
000861f8: a640005c sh r0,0x005c(r18)
000861fc: a640005a sh r0,0x005a(r18)
00086200: a6400058 sh r0,0x0058(r18)
00086204: a64001ea sh r0,0x01ea(r18)
00086208: a64001ec sh r0,0x01ec(r18)
0008620c: a64001ee sh r0,0x01ee(r18)
00086210: a64001f0 sh r0,0x01f0(r18)
00086214: 3063fff9 andi r3,r3,0xfff9
00086218: 00621825 or r3,r3,r2
0008621c: 0c021206 jal 0x00084818
00086220: a6430012 sh r3,0x0012(r18)
00086224: 3c03dfff lui r3,0xdfff
00086228: 8e420080 lw r2,0x0080(r18)
0008622c: 3463ffff ori r3,r3,0xffff
00086230: 00431024 and r2,r2,r3
00086234: 92430130 lbu r3,0x0130(r18)
00086238: a640000c sh r0,0x000c(r18)
0008623c: ae420080 sw r2,0x0080(r18)
00086240: 34020002 ori r2,r0,0x0002
00086244: 146200a0 bne r3,r2,0x000864c8
00086248: 00008021 addu r16,r0,r0
0008624c: 92440131 lbu r4,0x0131(r18)
00086250: 0c01e9b9 jal 0x0007a6e4
00086254: 00000000 nop
00086258: 00402021 addu r4,r2,r0
0008625c: 1080009a beq r4,r0,0x000864c8
00086260: 248501d8 addiu r5,r4,0x01d8
00086264: 34060001 ori r6,r0,0x0001
00086268: a48001de sh r0,0x01de(r4)
0008626c: 0c021206 jal 0x00084818
00086270: a48001e2 sh r0,0x01e2(r4)
00086274: 08021932 j 0x000864c8
00086278: 00008021 addu r16,r0,r0
0008627c: 964201e2 lhu r2,0x01e2(r18)
00086280: 00000000 nop
00086284: 1040008f beq r2,r0,0x000864c4
00086288: 00000000 nop
0008628c: 3c028004 lui r2,0x8004
00086290: 8c425980 lw r2,0x5980(r2)
00086294: 00000000 nop
00086298: 1840008a blez r2,0x000864c4
0008629c: 00008021 addu r16,r0,r0
000862a0: 3411ffff ori r17,r0,0xffff
000862a4: 964201e2 lhu r2,0x01e2(r18)
000862a8: 00000000 nop
000862ac: 1040000c beq r2,r0,0x000862e0
000862b0: 26100001 addiu r16,r16,0x0001
000862b4: 964201e2 lhu r2,0x01e2(r18)
000862b8: 00000000 nop
000862bc: 00511021 addu r2,r2,r17
000862c0: a64201e2 sh r2,0x01e2(r18)
000862c4: 964201e2 lhu r2,0x01e2(r18)
000862c8: 00000000 nop
000862cc: 14400004 bne r2,r0,0x000862e0
000862d0: 02402021 addu r4,r18,r0
000862d4: 264501d8 addiu r5,r18,0x01d8
000862d8: 0c021206 jal 0x00084818
000862dc: 34060001 ori r6,r0,0x0001
000862e0: 3c028004 lui r2,0x8004
000862e4: 8c425980 lw r2,0x5980(r2)
000862e8: 00000000 nop
000862ec: 0202102a slt r2,r16,r2
000862f0: 1440ffec bne r2,r0,0x000862a4
000862f4: 00000000 nop
000862f8: 08021932 j 0x000864c8
000862fc: 00008021 addu r16,r0,r0
00086300: 08021931 j 0x000864c4
00086304: a640000c sh r0,0x000c(r18)
00086308: 8e420080 lw r2,0x0080(r18)			Load unit's Coordinates (lower halfword) map level and movement flags (Upper halfword)
0008630c: 3c030100 lui r3,0x0100			r3 = 0x01000000
00086310: 00431024 and r2,r2,r3			Check for float movement flag
00086314: 1440004a bne r2,r0,0x00086440		Branch if floating
00086318: 00a01821 addu r3,r5,r0			r3 = r5
0008631c: 8642006e lh r2,0x006e(r18)			load vector thing? (or animation thing?)
00086320: 00000000 nop
00086324: 10620023 beq r3,r2,0x000863b4		branch if vectory/animation thing equals r5
00086328: 00000000 nop
0008632c: 964501dc lhu r5,0x01dc(r18)			Load current animation?
00086330: 00000000 nop
00086334: 2ca20006 sltiu r2,r5,0x0006			r2 = 1 if animation < 6
00086338: 1040000a beq r2,r0,0x00086364		branch if animation >= 6
0008633c: 00031840 sll r3,r3,0x01			r3 = r3 * 2
00086340: 27a20010 addiu r2,r29,0x0010			r2 = stack pointer + 0x10
00086344: 00621821 addu r3,r3,r2			load animation pointer...?
00086348: 94620038 lhu r2,0x0038(r3)			Load animation from the stack
0008634c: 00000000 nop
00086350: a64201dc sh r2,0x01dc(r18)			Save current animation
00086354: 96420012 lhu r2,0x0012(r18)			Load ?? from Misc unit data
00086358: 94630018 lhu r3,0x0018(r3)			Load ?? from stack?
0008635c: 080218e3 j 0x0008638c			@Jump ahead
00086360: 3042fff9 andi r2,r2,0xfff9			???
00086364: 00061840 sll r3,r6,0x01			r3 = current facing * 2
00086368: 27a20010 addiu r2,r29,0x0010			r2 = stack pointer + 0x10
0008636c: 00621821 addu r3,r3,r2			stack pointer + facing direction
00086370: 94640010 lhu r4,0x0010(r3)			load... the thing
00086374: 30a2fffe andi r2,r5,0xfffe			...?
00086378: 00441021 addu r2,r2,r4			add that to the thing
0008637c: a64201dc sh r2,0x01dc(r18)			save current animation
00086380: 96420012 lhu r2,0x0012(r18)			Load transparency sprite colour change? (could also do vampier? maybe? dark/evil looking?)
00086384: 94630008 lhu r3,0x0008(r3)			load another... thing
00086388: 3042fff9 andi r2,r2,0xfff9			gets rid of bit flags 0x2, and 0x4.
0008638c: 00431025 or r2,r2,r3				@combine the two bitflag sets?
00086390: a6420012 sh r2,0x0012(r18)			save to transparency sprite colour change?
00086394: 02402021 addu r4,r18,r0			r4 = Unit Misc data
00086398: 264501d8 addiu r5,r18,0x01d8			r5 = Unit Misc data + 0x01d8
0008639c: 00003021 addu r6,r0,r0			r6 = 0
000863a0: a653006c sh r19,0x006c(r18)			save Current facing (vectory thing? 0, 1, 2, or 3)
000863a4: 0c021206 jal 0x00084818			--> 00084818 - 00085230 animate party units? Load party unit graphics?
000863a8: a655006e sh r21,0x006e(r18)			??
000863ac: 08021932 j 0x000864c8			@Jump ahead
000863b0: 00008021 addu r16,r0,r0			r16 = 0
000863b4: 964201e2 lhu r2,0x01e2(r18)			Loads 2nd halfword of current frame displayed for animation
000863b8: 00000000 nop
000863bc: 10400041 beq r2,r0,0x000864c4		$Branch if r2 = 0
000863c0: 00000000 nop						|
000863c4: 3c028004 lui r2,0x8004				|
000863c8: 8c425980 lw r2,0x5980(r2)				|Load EXP/JP/Targeting/Attacking
000863cc: 00000000 nop						|
000863d0: 1840003c blez r2,0x000864c4				$Branch if r2 <= 0
000863d4: 00008021 addu r16,r0,r0					|r16 = 0
000863d8: 3411ffff ori r17,r0,0xffff					|R17 = -1
000863dc: 964201e2 lhu r2,0x01e2(r18)					ΔLoads 2nd halfword of current frame displayed for animation
000863e0: 00000000 nop							|
000863e4: 1040000c beq r2,r0,0x00086418				#branch if r2 = 0
000863e8: 26100001 addiu r16,r16,0x0001					|r16 + 1
000863ec: 964201e2 lhu r2,0x01e2(r18)						|Loads 2nd halfword of current frame displayed for animation
000863f0: 00000000 nop								|
000863f4: 00511021 addu r2,r2,r17						|r2 - 1
000863f8: a64201e2 sh r2,0x01e2(r18)						|Saves 2nd halfword of current frame displayed for animation
000863fc: 964201e2 lhu r2,0x01e2(r18)						|Loads 2nd halfword of current frame displayed for animation
00086400: 00000000 nop								|
00086404: 14400004 bne r2,r0,0x00086418					|#Branch if r2 != 0
00086408: 02402021 addu r4,r18,r0							|r4 = Unit Misc data
0008640c: 264501d8 addiu r5,r18,0x01d8							|r5 = Unit Misc data + 0x01d8
00086410: 0c021206 jal 0x00084818							|--> 00084818 - 00085230 animate party units? Load party unit graphics?
00086414: 34060001 ori r6,r0,0x0001							|r6 = 0x1
00086418: 0c022c8d jal 0x0008b234					#--> 0008b234 - 0008b288
0008641c: 02402021 addu r4,r18,r0					|r4 = Misc unit data pointer
00086420: 3c028004 lui r2,0x8004					|
00086424: 8c425980 lw r2,0x5980(r2)					|Load EXP/JP/Targeting/Attacking
00086428: 00000000 nop							|
0008642c: 0202102a slt r2,r16,r2					|Set if r16 < r2
00086430: 1440ffea bne r2,r0,0x000863dc				ΔBranch if so
00086434: 00000000 nop							|
00086438: 08021932 j 0x000864c8					@jump ahead (load weapon graphic, but not unit graphic)
0008643c: 00008021 addu r16,r0,r0					|r16 = 0
00086440: 964201e2 lhu r2,0x01e2(r18)					|Loads 2nd halfword of current frame displayed for animation
00086444: 00000000 nop							|
00086448: 1040001e beq r2,r0,0x000864c4				$Branch if this is 0
0008644c: 00000000 nop								|
00086450: 3c028004 lui r2,0x8004						|
00086454: 8c425980 lw r2,0x5980(r2)						|Load EXP/JP/Targeting/Attacking
00086458: 00000000 nop								|
0008645c: 18400019 blez r2,0x000864c4						$Branch if r2 <= 0
00086460: 00008021 addu r16,r0,r0							|r16 = 0
00086464: 3411ffff ori r17,r0,0xffff							|r17 = -1
00086468: 964201e2 lhu r2,0x01e2(r18)							*Loads 2nd halfword of current frame displayed for animation
0008646c: 00000000 nop									|
00086470: 1040000c beq r2,r0,0x000864a4						#branch if r2 = 0
00086474: 26100001 addiu r16,r16,0x0001							|r16 + 1
00086478: 964201e2 lhu r2,0x01e2(r18)								|loads 2nd halfword of current frame displayed for animation
0008647c: 00000000 nop										|
00086480: 00511021 addu r2,r2,r17								|subtracts 1 from ^
00086484: a64201e2 sh r2,0x01e2(r18)								|saves ^
00086488: 964201e2 lhu r2,0x01e2(r18)								|Loads ^
0008648c: 00000000 nop										|
00086490: 14400004 bne r2,r0,0x000864a4							#Branch r2 != 0
00086494: 02402021 addu r4,r18,r0									|r4 = Misc unit data pointer
00086498: 264501d8 addiu r5,r18,0x01d8									|r5 = Misc unit data pointer + 0x01d8 
0008649c: 0c021206 jal 0x00084818									|--> 00084818 - 00085230 animate party units? Load party unit graphics?
000864a0: 34060001 ori r6,r0,0x0001									|r6 = 1
000864a4: 0c022c8d jal 0x0008b234							#--> 0008b234 - 0008b288
000864a8: 02402021 addu r4,r18,r0							|r4 = Misc unit data pointer
000864ac: 3c028004 lui r2,0x8004							|
000864b0: 8c425980 lw r2,0x5980(r2)							|Load EXP/JP/Targeting/Attacking
000864b4: 00000000 nop									|
000864b8: 0202102a slt r2,r16,r2							|set r2 = 1 if r16 < r2
000864bc: 1440ffea bne r2,r0,0x00086468						*Branch if so
000864c0: 00000000 nop									|
000864c4: 00008021 addu r16,r0,r0			$r16 = 0
000864c8: 34160208 ori r22,r0,0x0208			@r22 = 0x208
000864cc: 02409821 addu r19,r18,r0			|r19 = Misc unit data pointer
000864d0: 96620208 lhu r2,0x0208(r19)			&???
000864d4: 00000000 nop					|
000864d8: 10400022 beq r2,r0,0x00086564		$Branch if not 0
000864dc: 00000000 nop						|
000864e0: 96620212 lhu r2,0x0212(r19)				|load frame + frame delay + Frame command value
000864e4: 00000000 nop						|
000864e8: 1040001e beq r2,r0,0x00086564			$branch if 0
000864ec: 00000000 nop						|
000864f0: 3c028004 lui r2,0x8004				|
000864f4: 8c425980 lw r2,0x5980(r2)				|Load EXP/JP/Targeting/Attacking
000864f8: 00000000 nop						|
000864fc: 18400019 blez r2,0x00086564				$Branch if above is less than or equal to 0
00086500: 0000a021 addu r20,r0,r0					|r20 = 0
00086504: 02608821 addu r17,r19,r0					|r17 = Misc Unit Data pointer
00086508: 02c0a821 addu r21,r22,r0					|r21 = 0x208
0008650c: 96220212 lhu r2,0x0212(r17)					%load frame + frame delay + Frame command value
00086510: 00000000 nop							|
00086514: 1040000d beq r2,r0,0x0008654c				#Branch if above is 0
00086518: 26940001 addiu r20,r20,0x0001					|increase counter (number of times to trigger graphic loading?)
0008651c: 96220212 lhu r2,0x0212(r17)						|load frame + frame delay + Frame command value
00086520: 00000000 nop								|
00086524: 2442ffff addiu r2,r2,0xffff						|subtract 1
00086528: a6220212 sh r2,0x0212(r17)						|save new value
0008652c: 96220212 lhu r2,0x0212(r17)						|load frame + frame delay + Frame command value
00086530: 00000000 nop								|
00086534: 14400005 bne r2,r0,0x0008654c					#branch if above is not 0
00086538: 02402021 addu r4,r18,r0							|r4 = Misc Unit data pointer
0008653c: 02552821 addu r5,r18,r21							|r5 = WEP Sprite data pointer
00086540: 02003021 addu r6,r16,r0							|r6 = Sprite Palette ID
00086544: 0c02149b jal 0x0008526c							| --> Load WEP graphic from WEP1 Sheet -- Also processes various frame commands, and effect graphic loading
00086548: 34070001 ori r7,r0,0x0001							|r7 = 1
0008654c: 3c028004 lui r2,0x8004					#
00086550: 8c425980 lw r2,0x5980(r2)					|Load EXP/JP/Targeting/Attacking (number of times to jump to Load WEP graphic from WEP1 Sheet?)
00086554: 00000000 nop							|
00086558: 0282102a slt r2,r20,r2					|Set if less than 0 (error check? probably acts weird with negatives anyway. subtracts 1 from frame delay each time?)
0008655c: 1440ffeb bne r2,r0,0x0008650c				%branch if less than 0
00086560: 00000000 nop							|continue if EXP/JP/Tar/Att = 0
00086564: 26d60030 addiu r22,r22,0x0030		$r22 + 0x30
00086568: 26100001 addiu r16,r16,0x0001		r16 + 1
0008656c: 2a020003 slti r2,r16,0x0003			r2 = 1 if r16 < 3
00086570: 1440ffd7 bne r2,r0,0x000864d0		&branch if this process has not been repeated Twice (Weapon - Effect?).
00086574: 26730030 addiu r19,r19,0x0030		r19 + 0x30 (difference between Weapon data & Effect data?)
00086578: 8fbf00a4 lw r31,0x00a4(r29)
0008657c: 8fb600a0 lw r22,0x00a0(r29)
00086580: 8fb5009c lw r21,0x009c(r29)
00086584: 8fb40098 lw r20,0x0098(r29)
00086588: 8fb30094 lw r19,0x0094(r29)
0008658c: 8fb20090 lw r18,0x0090(r29)
00086590: 8fb1008c lw r17,0x008c(r29)
00086594: 8fb00088 lw r16,0x0088(r29)
00086598: 27bd00a8 addiu r29,r29,0x00a8
0008659c: 03e00008 jr r31
000865a0: 00000000 nop