Calculate WalkTo Pathing
Jump to navigation
Jump to search
# ROUTINE: Calculate WalkTo pathing? # Parameters: # r4 = ElevationAddend (256 or 0) # r5 = p2 (= 3?) # r6 = Start X # r7 = Start Y # *(sp + 0x10) = Start Higher Elevation # *(sp + 0x14) = Destination X # *(sp + 0x18) = Destination Y # *(sp + 0x1c) = Destination Higher Elevation 801780ec: 27bdffc0 addiu r29,r29,-0x0040 801780f0: 8fa30050 lw r3,0x0050(r29) # Start Higher Elevation 801780f4: 8fa80054 lw r8,0x0054(r29) # Destination X 801780f8: 8fa90058 lw r9,0x0058(r29) # Destination Y 801780fc: 8faa005c lw r10,0x005c(r29) # Destination Higher Elevation 80178100: 34020001 ori r2,r0,0x0001 # 1 80178104: afa20020 sw r2,0x0020(r29) # 1 80178108: 27a20030 addiu r2,r29,0x0030 # pathResult 8017810c: afbf0038 sw r31,0x0038(r29) 80178110: afa20024 sw r2,0x0024(r29) # pathResult 80178114: afa00028 sw r0,0x0028(r29) # 0 80178118: afa30010 sw r3,0x0010(r29) # Start Higher Elevation 8017811c: afa80014 sw r8,0x0014(r29) # Destination X 80178120: afa90018 sw r9,0x0018(r29) # Destination Y 80178124: 0c05e04f jal 0x8017813c # return Calculate Pathing (ElevationAddend, p2, Start X, Start Y, Start Higher Elevation, # Destination X, Destination Y, Destination Higher Elevation, 1, pathResult, 0); 80178128: afaa001c sw r10,0x001c(r29) # Destination Higher Elevation 8017812c: 8fbf0038 lw r31,0x0038(r29) 80178130: 27bd0040 addiu r29,r29,0x0040 80178134: 03e00008 jr r31 80178138: 00000000 nop