Movement validation - float/fly

From Final Fantasy Hacktics Wiki
Revision as of 20:44, 13 December 2021 by Orkney (talk | contribs) (link)
Jump to navigation Jump to search

0008278c: 27bdffe0 addiu r29,r29,0xffe0
00082790: afb00010 sw r16,0x0010(r29)
00082794: 00808021 addu r16,r4,r0
00082798: 3c079249 lui r7,0x9249
0008279c: afbf0018 sw r31,0x0018(r29)
000827a0: afb10014 sw r17,0x0014(r29)
000827a4: 96020040 lhu r2,0x0040(r16)		load X mod
000827a8: 34e72493 ori r7,r7,0x2493
000827ac: 00021400 sll r2,r2,0x10
000827b0: 00022c03 sra r5,r2,0x10
000827b4: 00a70018 mult r5,r7
000827b8: 96030044 lhu r3,0x0044(r16)		load Y mod
000827bc: 00002010 mfhi r4
000827c0: 00031c00 sll r3,r3,0x10
000827c4: 00033403 sra r6,r3,0x10
000827c8: 00c70018 mult r6,r7
000827cc: 000217c3 sra r2,r2,0x1f
000827d0: 00031fc3 sra r3,r3,0x1f
000827d4: 00852021 addu r4,r4,r5
000827d8: 00042103 sra r4,r4,0x04
000827dc: 00822023 subu r4,r4,r2
000827e0: 00042400 sll r4,r4,0x10
000827e4: 00042403 sra r4,r4,0x10
000827e8: 00002810 mfhi r5
000827ec: 00a62821 addu r5,r5,r6
000827f0: 00052903 sra r5,r5,0x04
000827f4: 00a32823 subu r5,r5,r3
000827f8: 00052c00 sll r5,r5,0x10
000827fc: 9206007e lbu r6,0x007e(r16)
00082800: 0c060fed jal 0x00183fb4			get tile's data pointer
00082804: 00052c03 sra r5,r5,0x10
00082808: 8e040134 lw r4,0x0134(r16)		load unit data
0008280c: 00000000 nop
00082810: 10800015 beq r4,r0,0x00082868
00082814: 00408821 addu r17,r2,r0
00082818: 0c05fc08 jal 0x0017f020			Float/Float/Fly_movements
0008281c: 00000000 nop
00082820: 00401821 addu r3,r2,r0
00082824: 30620020 andi r2,r3,0x0020		
00082828: 14400012 bne r2,r0,0x00082874		branch if ???
0008282c: 00001021 addu r2,r0,r0			return 0
00082830: 8e040144 lw r4,0x0144(r16)		load status flags
00082834: 00000000 nop
00082838: 30820020 andi r2,r4,0x0020
0008283c: 1440000d bne r2,r0,0x00082874		branch if floating
00082840: 00001021 addu r2,r0,r0			return 0
00082844: 3082000e andi r2,r4,0x000e
00082848: 1440000a bne r2,r0,0x00082874		branch if chicken/frog/treasure/crystal?
0008284c: 34020001 ori r2,r0,0x0001			return 1
00082850: 30620010 andi r2,r3,0x0010
00082854: 14400007 bne r2,r0,0x00082874		branch if fly = true?
00082858: 34020001 ori r2,r0,0x0001			return 1
0008285c: 30820001 andi r2,r4,0x0001
00082860: 14400004 bne r2,r0,0x00082874		branch if crystal
00082864: 00001021 addu r2,r0,r0			return 0
00082868: 92220003 lbu r2,0x0003(r17)		load height
0008286c: 00000000 nop
00082870: 00021142 srl r2,r2,0x05			return height / 32 (0x20)
00082874: 8fbf0018 lw r31,0x0018(r29)
00082878: 8fb10014 lw r17,0x0014(r29)
0008287c: 8fb00010 lw r16,0x0010(r29)
00082880: 27bd0020 addiu r29,r29,0x0020
00082884: 03e00008 jr r31
00082888: 00000000 nop