Check if unit is on panel

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search

0007a2b8: 27bdffb0 addiu r29,r29,0xffb0
0007a2bc: 3c03800a lui r3,0x800a
0007a2c0: 8c638a54 lw r3,-0x75ac(r3)			load last units misc data
0007a2c4: 00000000 nop
0007a2c8: 10600023 beq r3,r0,0x0007a358
0007a2cc: 00003821 addu r7,r0,r0
0007a2d0: 340900ff ori r9,r0,0x00ff
0007a2d4: 03a04021 addu r8,r29,r0
0007a2d8: 9062007c lbu r2,0x007c(r3)			load units X coordinate to move to?
0007a2dc: 00000000 nop
0007a2e0: 14440019 bne r2,r4,0x0007a348		
0007a2e4: 00000000 nop
0007a2e8: 9062007d lbu r2,0x007d(r3)			load units Y coordinate to move to?
0007a2ec: 00000000 nop
0007a2f0: 14450015 bne r2,r5,0x0007a348			
0007a2f4: 00000000 nop
0007a2f8: 9062007e lbu r2,0x007e(r3)			load units map level to move to
0007a2fc: 00000000 nop
0007a300: 14460011 bne r2,r6,0x0007a348
0007a304: 00000000 nop
0007a308: 8c620134 lw r2,0x0134(r3)				load unit data
0007a30c: 00000000 nop
0007a310: 1040000d beq r2,r0,0x0007a348
0007a314: 00000000 nop
0007a318: 90420001 lbu r2,0x0001(r2)			
0007a31c: 00000000 nop
0007a320: 10490009 beq r2,r9,0x0007a348			unit exists check
0007a324: 00000000 nop
0007a328: 8c620144 lw r2,0x0144(r3)				load status flags
0007a32c: 00000000 nop
0007a330: 30420049 andi r2,r2,0x0049
0007a334: 14400004 bne r2,r0,0x0007a348			branch if jumping/treasure/crystal
0007a338: 00000000 nop
0007a33c: ad030000 sw r3,0x0000(r8)				store units misc. data to stack
0007a340: 25080004 addiu r8,r8,0x0004
0007a344: 24e70001 addiu r7,r7,0x0001
0007a348: 8c630000 lw r3,0x0000(r3)				load previous units data
0007a34c: 00000000 nop
0007a350: 1460ffe1 bne r3,r0,0x0007a2d8			branch if not first unit?
0007a354: 00000000 nop
0007a358: 10e00023 beq r7,r0,0x0007a3e8
0007a35c: 34020001 ori r2,r0,0x0001
0007a360: 10e2001c beq r7,r2,0x0007a3d4
0007a364: 00000000 nop
0007a368: 18e0000d blez r7,0x0007a3a0
0007a36c: 00001821 addu r3,r0,r0
0007a370: 3c068009 lui r6,0x8009
0007a374: 8cc66118 lw r6,0x6118(r6)				load misc ID
0007a378: 03a02821 addu r5,r29,r0
0007a37c: 8ca40000 lw r4,0x0000(r5)				load ??
0007a380: 00000000 nop
0007a384: 90820004 lbu r2,0x0004(r4)			load misc ID?
0007a388: 00000000 nop
0007a38c: 10460014 beq r2,r6,0x0007a3e0			branch if ID's are equal
0007a390: 24630001 addiu r3,r3,0x0001
0007a394: 0067102a slt r2,r3,r7
0007a398: 1440fff8 bne r2,r0,0x0007a37c
0007a39c: 24a50004 addiu r5,r5,0x0004
0007a3a0: 18e0000c blez r7,0x0007a3d4
0007a3a4: 00001821 addu r3,r0,r0
0007a3a8: 34060001 ori r6,r0,0x0001
0007a3ac: 03a02821 addu r5,r29,r0
0007a3b0: 8ca40000 lw r4,0x0000(r5)
0007a3b4: 00000000 nop
0007a3b8: 90820130 lbu r2,0x0130(r4)
0007a3bc: 00000000 nop
0007a3c0: 10460007 beq r2,r6,0x0007a3e0
0007a3c4: 24630001 addiu r3,r3,0x0001
0007a3c8: 0067102a slt r2,r3,r7
0007a3cc: 1440fff8 bne r2,r0,0x0007a3b0
0007a3d0: 24a50004 addiu r5,r5,0x0004
0007a3d4: 8fa20000 lw r2,0x0000(r29)
0007a3d8: 0801e8fb j 0x0007a3ec
0007a3dc: 00000000 nop
0007a3e0: 0801e8fb j 0x0007a3ec
0007a3e4: 00801021 addu r2,r4,r0
0007a3e8: 00001021 addu r2,r0,r0
0007a3ec: 27bd0050 addiu r29,r29,0x0050
0007a3f0: 03e00008 jr r31
0007a3f4: 00000000 nop