Difference between revisions of "Store movement stuff into scratch pad"

From Final Fantasy Hacktics Wiki
Jump to navigation Jump to search
Line 96: Line 96:
 
  001745a4: 34020001 ori r2,r0,0x0001
 
  001745a4: 34020001 ori r2,r0,0x0001
 
  001745a8: a2620014 sb r2,0x0014(r19)
 
  001745a8: a2620014 sb r2,0x0014(r19)
  001745ac: 93a30012 lbu r3,0x0012(r29)
+
  001745ac: 93a30012 lbu r3,0x0012(r29)                 Load RSM 5
 
  001745b0: 00000000 nop
 
  001745b0: 00000000 nop
  001745b4: 30620008 andi r2,r3,0x0008
+
  001745b4: 30620008 andi r2,r3,0x0008                 Float (ability)
  001745b8: 1040000a beq r2,r0,0x001745e4
+
  001745b8: 1040000a beq r2,r0,0x001745e4               Branch if not float
 
  001745bc: 00000000 nop
 
  001745bc: 00000000 nop
 
  001745c0: 9262001b lbu r2,0x001b(r19)
 
  001745c0: 9262001b lbu r2,0x001b(r19)
Line 105: Line 105:
 
  001745c8: 24420002 addiu r2,r2,0x0002
 
  001745c8: 24420002 addiu r2,r2,0x0002
 
  001745cc: a262001b sb r2,0x001b(r19)
 
  001745cc: a262001b sb r2,0x001b(r19)
  001745d0: 93a20012 lbu r2,0x0012(r29)
+
  001745d0: 93a20012 lbu r2,0x0012(r29)               Load RSM 5
 
  001745d4: 00000000 nop
 
  001745d4: 00000000 nop
  001745d8: 34420080 ori r2,r2,0x0080
+
  001745d8: 34420080 ori r2,r2,0x0080        
 
  001745dc: 0805d17a j 0x001745e8
 
  001745dc: 0805d17a j 0x001745e8
 
  001745e0: a262001c sb r2,0x001c(r19)
 
  001745e0: a262001c sb r2,0x001c(r19)
Line 114: Line 114:
 
  001745ec: 10400005 beq r2,r0,0x00174604
 
  001745ec: 10400005 beq r2,r0,0x00174604
 
  001745f0: 00000000 nop
 
  001745f0: 00000000 nop
  001745f4: 93a20012 lbu r2,0x0012(r29)
+
  001745f4: 93a20012 lbu r2,0x0012(r29)               Load RSM 5
 
  001745f8: 00000000 nop
 
  001745f8: 00000000 nop
 
  001745fc: 34420008 ori r2,r2,0x0008
 
  001745fc: 34420008 ori r2,r2,0x0008
 
  00174600: a3a20012 sb r2,0x0012(r29)
 
  00174600: a3a20012 sb r2,0x0012(r29)
  00174604: 93a20011 lbu r2,0x0011(r29)                load RSM
+
  00174604: 93a20011 lbu r2,0x0011(r29)                load RSM 4
 
  00174608: 00000000 nop
 
  00174608: 00000000 nop
 
  0017460c: 30420010 andi r2,r2,0x0010
 
  0017460c: 30420010 andi r2,r2,0x0010
Line 149: Line 149:
 
  00174678: 0805d1c0 j 0x00174700
 
  00174678: 0805d1c0 j 0x00174700
 
  0017467c: a2630024 sb r3,0x0024(r19)
 
  0017467c: a2630024 sb r3,0x0024(r19)
  00174680: 30620008 andi r2,r3,0x0008                
+
  00174680: 30620008 andi r2,r3,0x0008                              
 
  00174684: 10400003 beq r2,r0,0x00174694
 
  00174684: 10400003 beq r2,r0,0x00174694
 
  00174688: 34020002 ori r2,r0,0x0002
 
  00174688: 34020002 ori r2,r0,0x0002
Line 193: Line 193:
 
  00174728: 00000000 nop
 
  00174728: 00000000 nop
 
  0017472c: a2600012 sb r0,0x0012(r19)
 
  0017472c: a2600012 sb r0,0x0012(r19)
  00174730: 93a20012 lbu r2,0x0012(r29)
+
  00174730: 93a20012 lbu r2,0x0012(r29)                 Load RSM 5
 
  00174734: 00000000 nop
 
  00174734: 00000000 nop
  00174738: 3042008c andi r2,r2,0x008c
+
  00174738: 3042008c andi r2,r2,0x008c                 Walk on water, Float, Fly       
  0017473c: 14400007 bne r2,r0,0x0017475c
+
  0017473c: 14400007 bne r2,r0,0x0017475c               Branch if unit has one of the above^
 
  00174740: 00000000 nop
 
  00174740: 00000000 nop
 
  00174744: 93a20011 lbu r2,0x0011(r29)                Load RSM4
 
  00174744: 93a20011 lbu r2,0x0011(r29)                Load RSM4

Revision as of 04:52, 15 October 2016

00174430: 27bdffb0 addiu r29,r29,0xffb0
00174434: afbe0048 sw r30,0x0048(r29)
00174438: 0080f021 addu r30,r4,r0				acting unit
0017443c: afb30034 sw r19,0x0034(r29)
00174440: 3c138019 lui r19,0x8019
00174444: 8e73f4e0 lw r19,-0x0b20(r19)			load scratch pad address
00174448: 27a40018 addiu r4,r29,0x0018
0017444c: afb40038 sw r20,0x0038(r29)
00174450: 3c148019 lui r20,0x8019
00174454: 8e94f4e8 lw r20,-0x0b18(r20)			0x1f800000
00174458: 03c02821 addu r5,r30,r0
0017445c: afbf004c sw r31,0x004c(r29)
00174460: afb70044 sw r23,0x0044(r29)
00174464: afb60040 sw r22,0x0040(r29)
00174468: afb5003c sw r21,0x003c(r29)
0017446c: afb20030 sw r18,0x0030(r29)
00174470: afb1002c sw r17,0x002c(r29)
00174474: 0c05f056 jal 0x0017c158				Calculate height data
00174478: afb00028 sw r16,0x0028(r29)
0017447c: 001e10c0 sll r2,r30,0x03
00174480: 005e1023 subu r2,r2,r30
00174484: 00021180 sll r2,r2,0x06
00174488: 3c038019 lui r3,0x8019
0017448c: 246308cc addiu r3,r3,0x08cc
00174490: 00438821 addu r17,r2,r3				r17 = unit data
00174494: 00009021 addu r18,r0,r0
00174498: 27a30010 addiu r3,r29,0x0010
0017449c: 02321021 addu r2,r17,r18
001744a0: 90420093 lbu r2,0x0093(r2)			load active movement R/S/M
001744a4: 26520001 addiu r18,r18,0x0001			counter++
001744a8: a0620000 sb r2,0x0000(r3)				store active Movement R/S/M
001744ac: 2a420003 slti r2,r18,0x0003
001744b0: 1440fffa bne r2,r0,0x0017449c
001744b4: 24630001 addiu r3,r3,0x0001
001744b8: a27e000d sb r30,0x000d(r19)			store active unit ID
001744bc: 92220047 lbu r2,0x0047(r17)			load X coordinate
001744c0: 00000000 nop
001744c4: a2620007 sb r2,0x0007(r19)
001744c8: 92220048 lbu r2,0x0048(r17)			load Y
001744cc: 00000000 nop
001744d0: a2620008 sb r2,0x0008(r19)
001744d4: 96220048 lhu r2,0x0048(r17)			load Map Level
001744d8: 00000000 nop
001744dc: 000213c2 srl r2,r2,0x0f
001744e0: a2620009 sb r2,0x0009(r19)			store map level
001744e4: 3c02800e lui r2,0x800e
001744e8: 90424e9c lbu r2,0x4e9c(r2)			load max
001744ec: 00000000 nop
001744f0: a2620018 sb r2,0x0018(r19)			store
001744f4: 3c02800e lui r2,0x800e
001744f8: 90424ea0 lbu r2,0x4ea0(r2)			load max yy
001744fc: 34030001 ori r3,r0,0x0001				
00174500: a2600011 sb r0,0x0011(r19)
00174504: a2600014 sb r0,0x0014(r19)
00174508: a2630012 sb r3,0x0012(r19)
0017450c: a2630013 sb r3,0x0013(r19)
00174510: a260001d sb r0,0x001d(r19)
00174514: a2620019 sb r2,0x0019(r19)			store max y
00174518: 96220048 lhu r2,0x0048(r17)
0017451c: 00000000 nop
00174520: 00021382 srl r2,r2,0x0e
00174524: 30420001 andi r2,r2,0x0001			load map level
00174528: a2620022 sb r2,0x0022(r19)			store
0017452c: 93a20012 lbu r2,0x0012(r29)
00174530: 00000000 nop
00174534: 30420028 andi r2,r2,0x0028
00174538: 10400003 beq r2,r0,0x00174548
0017453c: 00000000 nop
00174540: 0805d153 j 0x0017454c
00174544: a2630025 sb r3,0x0025(r19)
00174548: a2600025 sb r0,0x0025(r19)
0017454c: 9230005a lbu r16,0x005a(r17)			load status
00174550: 00000000 nop
00174554: 32020006 andi r2,r16,0x0006			
00174558: 10400008 beq r2,r0,0x0017457c			branch if not chicken or frog
0017455c: 34020006 ori r2,r0,0x0006
00174560: 93a20011 lbu r2,0x0011(r29)
00174564: 93a30012 lbu r3,0x0012(r29)
00174568: 304200f3 andi r2,r2,0x00f3			remove flag
0017456c: 306300fb andi r3,r3,0x00fb			remove flag
00174570: a3a20011 sb r2,0x0011(r29)
00174574: 34020004 ori r2,r0,0x0004
00174578: a3a30012 sb r3,0x0012(r29)
0017457c: a262001b sb r2,0x001b(r19)			0x02 is the frog/chicken flag
00174580: 93a20012 lbu r2,0x0012(r29)
00174584: 00000000 nop
00174588: 30420088 andi r2,r2,0x0088
0017458c: 14400007 bne r2,r0,0x001745ac
00174590: 00000000 nop
00174594: 93a20011 lbu r2,0x0011(r29)                    load RSM
00174598: 00000000 nop
0017459c: 30420010 andi r2,r2,0x0010
001745a0: 10400002 beq r2,r0,0x001745ac                  branch if not cannot enter water
001745a4: 34020001 ori r2,r0,0x0001
001745a8: a2620014 sb r2,0x0014(r19)
001745ac: 93a30012 lbu r3,0x0012(r29)                 Load RSM 5
001745b0: 00000000 nop
001745b4: 30620008 andi r2,r3,0x0008                  Float (ability)
001745b8: 1040000a beq r2,r0,0x001745e4               Branch if not float
001745bc: 00000000 nop
001745c0: 9262001b lbu r2,0x001b(r19)
001745c4: 00000000 nop
001745c8: 24420002 addiu r2,r2,0x0002
001745cc: a262001b sb r2,0x001b(r19)
001745d0: 93a20012 lbu r2,0x0012(r29)                Load RSM 5
001745d4: 00000000 nop
001745d8: 34420080 ori r2,r2,0x0080         
001745dc: 0805d17a j 0x001745e8
001745e0: a262001c sb r2,0x001c(r19)
001745e4: a263001c sb r3,0x001c(r19)
001745e8: 32020040 andi r2,r16,0x0040
001745ec: 10400005 beq r2,r0,0x00174604
001745f0: 00000000 nop
001745f4: 93a20012 lbu r2,0x0012(r29)                Load RSM 5
001745f8: 00000000 nop
001745fc: 34420008 ori r2,r2,0x0008
00174600: a3a20012 sb r2,0x0012(r29)
00174604: 93a20011 lbu r2,0x0011(r29)                load RSM 4
00174608: 00000000 nop
0017460c: 30420010 andi r2,r2,0x0010
00174610: 10400005 beq r2,r0,0x00174628               branch if not cannot enter water
00174614: 00000000 nop
00174618: 93a20012 lbu r2,0x0012(r29)                 load RSM 5?
0017461c: 00000000 nop
00174620: 304200af andi r2,r2,0x00af                  mask walk on water, move in water
00174624: a3a20012 sb r2,0x0012(r29)
00174628: 0c05d0dc jal 0x00174370				??? next to chocobo check
0017462c: 00000000 nop
00174630: 93a30012 lbu r3,0x0012(r29)
00174634: 00403021 addu r6,r2,r0
00174638: 30620004 andi r2,r3,0x0004                  fly check? 
0017463c: 10400005 beq r2,r0,0x00174654
00174640: 34020001 ori r2,r0,0x0001
00174644: a262000f sb r2,0x000f(r19)
00174648: a260000e sb r0,0x000e(r19)
0017464c: 0805d1c0 j 0x00174700
00174650: a262001d sb r2,0x001d(r19)
00174654: 93a20011 lbu r2,0x0011(r29)                 load RSM 4
00174658: 00000000 nop
0017465c: 3042000c andi r2,r2,0x000c                  teleport checks
00174660: 10400007 beq r2,r0,0x00174680
00174664: 34020001 ori r2,r0,0x0001
00174668: a262000f sb r2,0x000f(r19)
0017466c: 93a30011 lbu r3,0x0011(r29)                  load RSM 4
00174670: a262000e sb r2,0x000e(r19)
00174674: a262001d sb r2,0x001d(r19)
00174678: 0805d1c0 j 0x00174700
0017467c: a2630024 sb r3,0x0024(r19)
00174680: 30620008 andi r2,r3,0x0008                               
00174684: 10400003 beq r2,r0,0x00174694
00174688: 34020002 ori r2,r0,0x0002
0017468c: 0805d1bf j 0x001746fc
00174690: a262000f sb r2,0x000f(r19)
00174694: 30620020 andi r2,r3,0x0020
00174698: 10400004 beq r2,r0,0x001746ac
0017469c: 34020005 ori r2,r0,0x0005
001746a0: a262000f sb r2,0x000f(r19)
001746a4: 0805d1bf j 0x001746fc
001746a8: 34020003 ori r2,r0,0x0003
001746ac: 30620080 andi r2,r3,0x0080
001746b0: 10400004 beq r2,r0,0x001746c4
001746b4: 34020003 ori r2,r0,0x0003
001746b8: a262000f sb r2,0x000f(r19)
001746bc: 0805d1bf j 0x001746fc
001746c0: 34020004 ori r2,r0,0x0004
001746c4: 30620040 andi r2,r3,0x0040
001746c8: 10400004 beq r2,r0,0x001746dc
001746cc: 34020003 ori r2,r0,0x0003
001746d0: a262000f sb r2,0x000f(r19)
001746d4: 0805d1bf j 0x001746fc
001746d8: 34020005 ori r2,r0,0x0005
001746dc: 30620010 andi r2,r3,0x0010
001746e0: 10400004 beq r2,r0,0x001746f4
001746e4: 34020004 ori r2,r0,0x0004
001746e8: a262000f sb r2,0x000f(r19)
001746ec: 0805d1bf j 0x001746fc
001746f0: 34020006 ori r2,r0,0x0006
001746f4: 34020007 ori r2,r0,0x0007
001746f8: a260000f sb r0,0x000f(r19)
001746fc: a262000e sb r2,0x000e(r19)
00174700: 9262001c lbu r2,0x001c(r19)
00174704: 00000000 nop
00174708: 304200c0 andi r2,r2,0x00c0
0017470c: 10400002 beq r2,r0,0x00174718
00174710: 00000000 nop
00174714: a2600013 sb r0,0x0013(r19)
00174718: 9262001c lbu r2,0x001c(r19)
0017471c: 00000000 nop
00174720: 304200d0 andi r2,r2,0x00d0
00174724: 10400002 beq r2,r0,0x00174730
00174728: 00000000 nop
0017472c: a2600012 sb r0,0x0012(r19)
00174730: 93a20012 lbu r2,0x0012(r29)                 Load RSM 5
00174734: 00000000 nop
00174738: 3042008c andi r2,r2,0x008c                  Walk on water, Float, Fly        
0017473c: 14400007 bne r2,r0,0x0017475c               Branch if unit has one of the above^
00174740: 00000000 nop
00174744: 93a20011 lbu r2,0x0011(r29)                 Load RSM4
00174748: 00000000 nop
0017474c: 30420010 andi r2,r2,0x0010                  Cannot enter water
00174750: 10400002 beq r2,r0,0x0017475c
00174754: 34020001 ori r2,r0,0x0001
00174758: a2620011 sb r2,0x0011(r19)
0017475c: 93a20012 lbu r2,0x0012(r29)
00174760: 00000000 nop
00174764: a2620010 sb r2,0x0010(r19)
00174768: 93a30011 lbu r3,0x0011(r29)                  load RSM4
0017476c: 00000000 nop
00174770: 30620002 andi r2,r3,0x0002
00174774: 10400002 beq r2,r0,0x00174780                any weather check
00174778: 30650001 andi r5,r3,0x0001                   r5 = any ground check
0017477c: 34060001 ori r6,r0,0x0001
00174780: 00009021 addu r18,r0,r0
00174784: 340700ff ori r7,r0,0x00ff
00174788: 9262000f lbu r2,0x000f(r19)
0017478c: 3c038006 lui r3,0x8006
00174790: 2463ea50 addiu r3,r3,0xea50			default movement cost table
00174794: 00021180 sll r2,r2,0x06
00174798: 00432021 addu r4,r2,r3
<Store movement cost for all tiles>
0017479c: 90830000 lbu r3,0x0000(r4)			load cost
001747a0: 00000000 nop
001747a4: 306200ff andi r2,r3,0x00ff
001747a8: 14400003 bne r2,r0,0x001747b8			branch if there is a cost
001747ac: 00000000 nop
001747b0: 0805d1f3 j 0x001747cc
001747b4: 00c01821 addu r3,r6,r0				return 1 if no cost
001747b8: 10a00004 beq r5,r0,0x001747cc			branch if not any ground
001747bc: 00000000 nop
001747c0: 10470002 beq r2,r7,0x001747cc			branch if ??
001747c4: 00000000 nop
001747c8: 34030001 ori r3,r0,0x0001
001747cc: 3c028019 lui r2,0x8019
001747d0: 8c42f4ec lw r2,-0x0b14(r2)			load 0x1f800100
001747d4: 00000000 nop
001747d8: 00521021 addu r2,r2,r18
001747dc: 26520001 addiu r18,r18,0x0001
001747e0: a0430000 sb r3,0x0000(r2)				store movement cost in scratch pad
001747e4: 2a420040 slti r2,r18,0x0040
001747e8: 1440ffec bne r2,r0,0x0017479c
001747ec: 24840001 addiu r4,r4,0x0001
001747f0: 9230003b lbu r16,0x003b(r17)			load units jump
001747f4: 00000000 nop
001747f8: 2e020008 sltiu r2,r16,0x0008
001747fc: 14400003 bne r2,r0,0x0017480c			branch if < 8
00174800: 320200ff andi r2,r16,0x00ff
00174804: 34100007 ori r16,r0,0x0007			hardcode to 7
00174808: 320200ff andi r2,r16,0x00ff
0017480c: 9263000e lbu r3,0x000e(r19)			load ??
00174810: 00021042 srl r2,r2,0x01				jump / 2
00174814: 10600006 beq r3,r0,0x00174830			??
00174818: a2620005 sb r2,0x0005(r19)			store jump/2?
0017481c: 93a20010 lbu r2,0x0010(r29)			Load RSM3
00174820: 00000000 nop
00174824: 30420002 andi r2,r2,0x0002                   Ignore Height check
00174828: 10400003 beq r2,r0,0x00174838                Branch if not ignore height
0017482c: 02202021 addu r4,r17,r0
00174830: 3410001f ori r16,r0,0x001f
00174834: 02202021 addu r4,r17,r0
00174838: 320200ff andi r2,r16,0x00ff
0017483c: 00021040 sll r2,r2,0x01
00174840: a2620002 sb r2,0x0002(r19)
00174844: 0c05d0f2 jal 0x001743c8				chocobo check
00174848: a2700004 sb r16,0x0004(r19)
0017484c: 10400003 beq r2,r0,0x0017485c			branch if not chocobo
00174850: 34020001 ori r2,r0,0x0001
00174854: 0805d218 j 0x00174860
00174858: a2620015 sb r2,0x0015(r19)			chocobo/move in water?
0017485c: a2600015 sb r0,0x0015(r19)
00174860: 9230003a lbu r16,0x003a(r17)			load move
00174864: 00000000 nop
00174868: 2e02007d sltiu r2,r16,0x007d			set if less than 7d
0017486c: 14400002 bne r2,r0,0x00174878			branch if so
00174870: 00000000 nop
00174874: 3410007c ori r16,r0,0x007c			hardcode to 7c
00174878: a2700006 sb r16,0x0006(r19)			store move
0017487c: 92220006 lbu r2,0x0006(r17)			load gender
00174880: 00000000 nop
00174884: 304200c0 andi r2,r2,0x00c0
00174888: 1040000d beq r2,r0,0x001748c0			branch if not human
0017488c: 00000000 nop
00174890: 9222005a lbu r2,0x005a(r17)			load 5a status
00174894: 00000000 nop
00174898: 30420006 andi r2,r2,0x0006
0017489c: 14400008 bne r2,r0,0x001748c0			branch if frog or chicken
001748a0: 00000000 nop
001748a4: 9222005c lbu r2,0x005c(r17)			charm
001748a8: 00000000 nop
001748ac: 30420020 andi r2,r2,0x0020
001748b0: 14400003 bne r2,r0,0x001748c0			branch if charm
001748b4: 34020001 ori r2,r0,0x0001
001748b8: 0805d231 j 0x001748c4
001748bc: a2620016 sb r2,0x0016(r19)			store charm?
001748c0: a2600016 sb r0,0x0016(r19)
001748c4: 340400ff ori r4,r0,0x00ff
001748c8: 3412000f ori r18,r0,0x000f
001748cc: 923101ba lbu r17,0x01ba(r17)			load modified ENTD
001748d0: 3c028019 lui r2,0x8019
001748d4: 9042f4fc lbu r2,-0x0b04(r2)			load scratch pad
001748d8: 26830069 addiu r3,r20,0x0069
001748dc: a3b10020 sb r17,0x0020(r29)			store modified ENTD
001748e0: a262001a sb r2,0x001a(r19)			
<initialize panel data = FF> - 16 panels
001748e4: a0640003 sb r4,0x0003(r3)
001748e8: 2652ffff addiu r18,r18,0xffff
001748ec: 0641fffd bgez r18,0x001748e4
001748f0: 2463fff9 addiu r3,r3,0xfff9
001748f4: 0000b821 addu r23,r0,r0
001748f8: 00009021 addu r18,r0,r0
001748fc: 0000b021 addu r22,r0,r0
00174900: 2ae20010 slti r2,r23,0x0010			do 20 times
00174904: 10400094 beq r2,r0,0x00174b58
00174908: 00000000 nop
0017490c: 3c028019 lui r2,0x8019
00174910: 244208cc addiu r2,r2,0x08cc			
00174914: 02c28821 addu r17,r22,r2				get unit data
00174918: 92230001 lbu r3,0x0001(r17)			
0017491c: 340200ff ori r2,r0,0x00ff
00174920: 10620089 beq r3,r2,0x00174b48			branch if unit doesn't exist
00174924: 00000000 nop
00174928: 92220058 lbu r2,0x0058(r17)
0017492c: 00000000 nop
00174930: 30420064 andi r2,r2,0x0064
00174934: 14400084 bne r2,r0,0x00174b48			branch if dead/crystal/jump
00174938: 00000000 nop
0017493c: 92220059 lbu r2,0x0059(r17)
00174940: 00000000 nop
00174944: 30420001 andi r2,r2,0x0001
00174948: 1440007f bne r2,r0,0x00174b48			branch if treasure
0017494c: 00000000 nop
00174950: 125e007d beq r18,r30,0x00174b48		branch if active unit
00174954: 00000000 nop
00174958: 92240182 lbu r4,0x0182(r17)
0017495c: 00000000 nop
00174960: 30820080 andi r2,r4,0x0080
00174964: 1040000a beq r2,r0,0x00174990			branch if not riding a unit
00174968: 3082001f andi r2,r4,0x001f
0017496c: 9263000d lbu r3,0x000d(r19)
00174970: 00000000 nop
00174974: 14430007 bne r2,r3,0x00174994
00174978: 02408021 addu r16,r18,r0
0017497c: 9262001b lbu r2,0x001b(r19)
00174980: 00000000 nop
00174984: 24420002 addiu r2,r2,0x0002
00174988: 0805d2d2 j 0x00174b48
0017498c: a262001b sb r2,0x001b(r19)
00174990: 02408021 addu r16,r18,r0
00174994: 0c05d0f2 jal 0x001743c8				chocobo check
00174998: 02202021 addu r4,r17,r0
0017499c: 34030001 ori r3,r0,0x0001
001749a0: 10430007 beq r2,r3,0x001749c0			branch if chocobo?
001749a4: 00000000 nop
001749a8: 9262000d lbu r2,0x000d(r19)			load active unit ID
001749ac: 92230182 lbu r3,0x0182(r17)
001749b0: 34420040 ori r2,r2,0x0040
001749b4: 10620002 beq r3,r2,0x001749c0			branch if being ridden by active unit?
001749b8: 00000000 nop
001749bc: 36500020 ori r16,r18,0x0020			add 20 flag
001749c0: 92230005 lbu r3,0x0005(r17)			load team flags
001749c4: 93a80020 lbu r8,0x0020(r29)			load team flags
001749c8: 00000000 nop
001749cc: 01031026 xor r2,r8,r3					
001749d0: 30420030 andi r2,r2,0x0030
001749d4: 10400002 beq r2,r0,0x001749e0			branch if on same team
001749d8: 0280a821 addu r21,r20,r0
001749dc: 36100040 ori r16,r16,0x0040			add unwalkable flag
001749e0: a2900003 sb r16,0x0003(r20)			store walkability
001749e4: 92220047 lbu r2,0x0047(r17)			load x
001749e8: 92830002 lbu r3,0x0002(r20)			load ?
001749ec: a2820000 sb r2,0x0000(r20)			
001749f0: 92220048 lbu r2,0x0048(r17)			load Y
001749f4: 00000000 nop
001749f8: a2820001 sb r2,0x0001(r20)			store Y
001749fc: 96220048 lhu r2,0x0048(r17)
00174a00: 30630080 andi r3,r3,0x0080
00174a04: 000213c2 srl r2,r2,0x0f
00174a08: 00621825 or r3,r3,r2
00174a0c: a2830002 sb r3,0x0002(r20)			store map level/Y?
00174a10: 96220048 lhu r2,0x0048(r17)
00174a14: 3063007f andi r3,r3,0x007f
00174a18: 000211c2 srl r2,r2,0x07
00174a1c: 30420080 andi r2,r2,0x0080
00174a20: 00621825 or r3,r3,r2
00174a24: a2830002 sb r3,0x0002(r20)			store map level?
00174a28: 9230005a lbu r16,0x005a(r17)
00174a2c: 00000000 nop
00174a30: 32020006 andi r2,r16,0x0006
00174a34: 10400006 beq r2,r0,0x00174a50			branch if not chicken/frog?
00174a38: 34020004 ori r2,r0,0x0004
00174a3c: 92830002 lbu r3,0x0002(r20)
00174a40: a2820004 sb r2,0x0004(r20)			store ??
00174a44: 3063007f andi r3,r3,0x007f			remove 80 flag
00174a48: 0805d296 j 0x00174a58
00174a4c: a2830002 sb r3,0x0002(r20)
00174a50: 34020006 ori r2,r0,0x0006
00174a54: a2820004 sb r2,0x0004(r20)
00174a58: 92300182 lbu r16,0x0182(r17)
00174a5c: 00000000 nop
00174a60: 32020040 andi r2,r16,0x0040
00174a64: 10400009 beq r2,r0,0x00174a8c
00174a68: 3202001f andi r2,r16,0x001f
00174a6c: 9263000d lbu r3,0x000d(r19)
00174a70: 00000000 nop
00174a74: 10430005 beq r2,r3,0x00174a8c
00174a78: 00000000 nop
00174a7c: 92a20004 lbu r2,0x0004(r21)
00174a80: 00000000 nop
00174a84: 24420002 addiu r2,r2,0x0002
00174a88: a2a20004 sb r2,0x0004(r21)
00174a8c: 92300095 lbu r16,0x0095(r17)
00174a90: 0c060428 jal 0x001810a0
00174a94: 02202021 addu r4,r17,r0
00174a98: 000210c0 sll r2,r2,0x03
00174a9c: 3c038019 lui r3,0x8019
00174aa0: 2463f8cc addiu r3,r3,0xf8cc
00174aa4: 00431021 addu r2,r2,r3
00174aa8: 90440002 lbu r4,0x0002(r2)		load height
00174aac: 90430003 lbu r3,0x0003(r2)		load halves/depth
00174ab0: 90420003 lbu r2,0x0003(r2)		load halves/depth
00174ab4: 00042040 sll r4,r4,0x01			height*2
00174ab8: 3063001f andi r3,r3,0x001f		r3 = height (halves)
00174abc: 00832021 addu r4,r4,r3			height*2 + halves
00174ac0: 00022942 srl r5,r2,0x05			depth
00174ac4: 10a00014 beq r5,r0,0x00174b18		branch if depth = 0
00174ac8: 00801821 addu r3,r4,r0			r3 = total height
00174acc: 9222005a lbu r2,0x005a(r17)
00174ad0: 00000000 nop
00174ad4: 30420040 andi r2,r2,0x0040			load float flag
00174ad8: 10400004 beq r2,r0,0x00174aec
00174adc: 00051040 sll r2,r5,0x01			depth*2
00174ae0: 24420002 addiu r2,r2,0x0002		depth*2+2
00174ae4: 0805d2cc j 0x00174b30				
00174ae8: 00821821 addu r3,r4,r2			r3 = total height + depth*2 + 2
00174aec: 32020080 andi r2,r16,0x0080		riding check
00174af0: 10400003 beq r2,r0,0x00174b00		branch if not riding
00174af4: 00051040 sll r2,r5,0x01
00174af8: 0805d2cc j 0x00174b30
00174afc: 00821821 addu r3,r4,r2
00174b00: 32020040 andi r2,r16,0x0040		
00174b04: 1040000a beq r2,r0,0x00174b30		branch if not being ridden
00174b08: 00051040 sll r2,r5,0x01
00174b0c: 2442fffe addiu r2,r2,0xfffe
00174b10: 0805d2cc j 0x00174b30
00174b14: 00821821 addu r3,r4,r2
00174b18: 9222005a lbu r2,0x005a(r17)
00174b1c: 00000000 nop
00174b20: 30420040 andi r2,r2,0x0040
00174b24: 10400002 beq r2,r0,0x00174b30		branch if not floating
00174b28: 00000000 nop
00174b2c: 24830002 addiu r3,r4,0x0002		total height + 2
00174b30: 26940007 addiu r20,r20,0x0007		go to next panel
00174b34: 92a20004 lbu r2,0x0004(r21)		load ?? movement cost?
00174b38: 26f70001 addiu r23,r23,0x0001
00174b3c: a2a30005 sb r3,0x0005(r21)		store height
00174b40: 00621021 addu r2,r3,r2			?? + height
00174b44: a2a20006 sb r2,0x0006(r21)		store ?? + height
00174b48: 26520001 addiu r18,r18,0x0001
00174b4c: 2a420015 slti r2,r18,0x0015
00174b50: 1440ff6b bne r2,r0,0x00174900		do 21 times (for each unit)
00174b54: 26d601c0 addiu r22,r22,0x01c0
00174b58: 8fbf004c lw r31,0x004c(r29)
00174b5c: 8fbe0048 lw r30,0x0048(r29)
00174b60: 8fb70044 lw r23,0x0044(r29)
00174b64: 8fb60040 lw r22,0x0040(r29)
00174b68: 8fb5003c lw r21,0x003c(r29)
00174b6c: 8fb40038 lw r20,0x0038(r29)
00174b70: 8fb30034 lw r19,0x0034(r29)
00174b74: 8fb20030 lw r18,0x0030(r29)
00174b78: 8fb1002c lw r17,0x002c(r29)
00174b7c: 8fb00028 lw r16,0x0028(r29)
00174b80: 27bd0050 addiu r29,r29,0x0050
00174b84: 03e00008 jr r31
00174b88: 00000000 nop