mirror of
https://github.com/open-goal/jak-project
synced 2026-07-10 07:07:04 -04:00
[decomp] minimap (#2118)
This commit is contained in:
@@ -6465,7 +6465,7 @@
|
||||
(define-extern vblank-handler (function int))
|
||||
(define-extern set-display-gs-state (function dma-buffer int int int int int dma-buffer))
|
||||
(define-extern set-display-gs-state-offset (function dma-buffer int int int int int int int dma-buffer))
|
||||
(define-extern reset-display-gs-state (function display dma-buffer int display))
|
||||
(define-extern reset-display-gs-state (function display dma-buffer display))
|
||||
(define-extern *vu0-dma-list* dma-buffer)
|
||||
(define-extern *display* display)
|
||||
|
||||
@@ -7056,6 +7056,14 @@
|
||||
;; trail-h ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defenum trail-node-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(tnf0 0) ;; unused??
|
||||
(tnf1 1)
|
||||
)
|
||||
(declare-type trail-graph basic)
|
||||
|
||||
(deftype trail-node (structure)
|
||||
((next-id int16 :offset-assert 0)
|
||||
(prev-id int16 :offset-assert 2)
|
||||
@@ -7065,16 +7073,17 @@
|
||||
(first-conn uint16 :offset-assert 10)
|
||||
(cost-from-start uint16 :offset-assert 12)
|
||||
(cost-to-goal uint16 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(flags trail-node-flag :offset-assert 16)
|
||||
(conn-count uint8 :offset-assert 17)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 12
|
||||
:size-assert #x12
|
||||
:flag-assert #xc00000012
|
||||
(:methods
|
||||
(trail-node-method-9 () none 9)
|
||||
(trail-node-method-10 () none 10)
|
||||
(trail-node-method-11 () none 11)
|
||||
(get-dist-score (_type_ vector) uint 9)
|
||||
(debug-draw (_type_ int) none 10)
|
||||
(get-position "Unpack the position to a vector" (_type_ vector) vector 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7088,19 +7097,28 @@
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
(defenum conn-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(cf0 0)
|
||||
(cf1 1)
|
||||
(cf2 2)
|
||||
(cf3 3)
|
||||
)
|
||||
|
||||
(deftype trail-conn (structure)
|
||||
((head-id uint16 :offset-assert 0)
|
||||
(tail-id uint16 :offset-assert 2)
|
||||
(flags uint8 :offset-assert 4)
|
||||
(flags conn-flag :offset-assert 4)
|
||||
(visgroup-id uint8 :offset-assert 5)
|
||||
(cost uint16 :offset-assert 6)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(trail-conn-method-9 () none 9)
|
||||
(debug-draw (_type_ trail-graph int) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7109,6 +7127,7 @@
|
||||
(conn-count uint8 :offset-assert 2)
|
||||
(pad uint8 :offset-assert 3)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
@@ -7136,8 +7155,8 @@
|
||||
(deftype trail-conn-hash (basic)
|
||||
((cell-width meters :offset-assert 4)
|
||||
(origin vector :inline :offset-assert 16)
|
||||
(cell uint32 :offset-assert 32)
|
||||
(conn-ids uint32 :offset-assert 36)
|
||||
(cell (inline-array trail-conn-hash-cell) :offset-assert 32)
|
||||
(conn-ids (pointer uint16) :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
@@ -7165,12 +7184,12 @@
|
||||
(node-count uint16 :offset-assert 18)
|
||||
(conn-count uint16 :offset-assert 20)
|
||||
(conn-mask uint8 :offset-assert 22)
|
||||
(node uint32 :offset-assert 24)
|
||||
(conn uint32 :offset-assert 28)
|
||||
(conn-ids uint32 :offset-assert 32)
|
||||
(visgroup uint32 :offset-assert 36)
|
||||
(visnode-ids uint32 :offset-assert 40)
|
||||
(conn-hash basic :offset-assert 44)
|
||||
(node (inline-array trail-node) :offset-assert 24)
|
||||
(conn (inline-array trail-conn) :offset-assert 28)
|
||||
(conn-ids (pointer uint16) :offset-assert 32)
|
||||
(visgroup (inline-array trail-conn-hash-cell) :offset-assert 36)
|
||||
(visnode-ids (pointer uint16) :offset-assert 40)
|
||||
(conn-hash trail-conn-hash :offset-assert 44)
|
||||
(orig-start-pos vector :inline :offset-assert 48)
|
||||
(orig-goal-pos vector :inline :offset-assert 64)
|
||||
(conn-start-pos vector :inline :offset-assert 80)
|
||||
@@ -7184,26 +7203,26 @@
|
||||
:size-assert #x130
|
||||
:flag-assert #x1d00000130
|
||||
(:methods
|
||||
(trail-graph-method-9 () none 9)
|
||||
(trail-graph-method-10 () none 10)
|
||||
(trail-graph-method-11 () none 11)
|
||||
(trail-graph-method-12 () none 12)
|
||||
(trail-graph-method-13 () none 13)
|
||||
(trail-graph-method-14 () none 14)
|
||||
(trail-graph-method-15 () none 15)
|
||||
(trail-graph-method-9 (_type_ int) none 9)
|
||||
(trail-graph-method-10 (_type_ int) none 10)
|
||||
(trail-graph-method-11 (_type_ int int) trail-node 11)
|
||||
(debug-draw (_type_) none 12)
|
||||
(debug-draw-cell (_type_ int) none 13)
|
||||
(debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol 14)
|
||||
(do-path (_type_ vector vector) int 15)
|
||||
(trail-graph-method-16 () none 16)
|
||||
(trail-graph-method-17 () none 17)
|
||||
(trail-graph-method-18 () none 18)
|
||||
(trail-graph-method-19 () none 19)
|
||||
(trail-graph-method-20 () none 20)
|
||||
(trail-graph-method-21 () none 21)
|
||||
(trail-graph-method-22 () none 22)
|
||||
(trail-graph-method-23 () none 23)
|
||||
(trail-graph-method-24 () none 24)
|
||||
(trail-graph-method-25 () none 25)
|
||||
(trail-graph-method-26 () none 26)
|
||||
(trail-graph-method-27 () none 27)
|
||||
(trail-graph-method-28 () none 28)
|
||||
(get-node-location-by-id "Get the location of the node with the given ID" (_type_ uint vector) vector 17)
|
||||
(get-path-to-root "Get the path from goal to root, following parent-id" (_type_ (pointer uint16) int (pointer int32) (pointer float)) int 18)
|
||||
(trail-graph-method-19 (_type_ int int) symbol 19)
|
||||
(try-initialize "Init and verify that constants are good." (_type_) symbol 20)
|
||||
(update-node-flags-for-conn "Set arg1, clear arg2" (_type_ int trail-node-flag trail-node-flag) none 21)
|
||||
(trail-graph-method-22 (_type_ int) none 22)
|
||||
(reset-search-state "Reset the search/goal." (_type_) none 23)
|
||||
(get-next-to-explore (_type_) int 24)
|
||||
(trail-graph-method-25 (_type_ trail-conn-search int int) none 25)
|
||||
(do-search! (_type_ vector vector trail-cached-search-info) none 26)
|
||||
(do-some-work (_type_) int 27)
|
||||
(run-until-done-or-timeout (_type_ int) none 28)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -7320,6 +7339,7 @@
|
||||
(scale float :offset-assert 28)
|
||||
(color rgba :offset-assert 32)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
@@ -7329,7 +7349,7 @@
|
||||
|
||||
(deftype connection-minimap (connection-pers)
|
||||
((handle handle :offset 8 :score 50) ;; override
|
||||
(position vector :offset 16)
|
||||
(position object :offset 16)
|
||||
(alpha float :offset 20)
|
||||
(class minimap-class-node :offset 24)
|
||||
(flags minimap-flag :offset 28)
|
||||
@@ -7369,19 +7389,19 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #xb000000d0
|
||||
(:methods
|
||||
(minimap-trail-method-9 (_type_ vector vector) float 9)
|
||||
(minimap-trail-method-10 () none 10)
|
||||
(get-distance-with-path "Assuming we go from a to b, using this path in the middle, how long is it?" (_type_ vector vector) float 9)
|
||||
(reset (_type_) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
(deftype minimap-draw-work (structure)
|
||||
((buf basic :offset-assert 0)
|
||||
(justify-right basic :offset-assert 4)
|
||||
((buf dma-buffer :offset-assert 0)
|
||||
(justify-right symbol :offset-assert 4)
|
||||
(draw-pos vector4w :inline :offset-assert 16)
|
||||
(mat matrix :inline :offset-assert 32)
|
||||
(corner vector4w 4 :inline :offset-assert 96)
|
||||
(corner vector 4 :inline :offset-assert 96)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xa0
|
||||
@@ -7398,20 +7418,20 @@
|
||||
(color vector4w :inline :offset-assert 192)
|
||||
(offset vector :inline :offset-assert 208)
|
||||
(minimap-corner vector :inline :offset-assert 224)
|
||||
(last-name basic :offset-assert 240)
|
||||
(last-name string :offset-assert 240)
|
||||
(last-tex basic :offset-assert 244)
|
||||
(target-inv-scale float :offset-assert 248)
|
||||
(map-bits uint64 :offset-assert 256)
|
||||
(level basic :offset-assert 264)
|
||||
(ctywide basic :offset-assert 268)
|
||||
(level level :offset-assert 264)
|
||||
(ctywide level :offset-assert 268)
|
||||
(inv-scale float :offset 212)
|
||||
(fade float :offset 220)
|
||||
(engine engine-minimap :offset-assert 272)
|
||||
(engine-key uint32 :offset-assert 276)
|
||||
(trail minimap-trail 6 :inline :offset-assert 288)
|
||||
(race-tex basic :offset-assert 1536)
|
||||
(race-tex texture :offset-assert 1536)
|
||||
(race-scale float :offset-assert 1540)
|
||||
(race-level basic :offset-assert 1544)
|
||||
(race-level level :offset-assert 1544)
|
||||
(sprite2-tmpl dma-gif-packet :inline :offset-assert 1552)
|
||||
(race-corner vector :inline :offset-assert 1584)
|
||||
(goal-time float :offset-assert 1600)
|
||||
@@ -7421,25 +7441,26 @@
|
||||
:size-assert #x648
|
||||
:flag-assert #x1c00000648
|
||||
(:methods
|
||||
(minimap-method-9 () none 9)
|
||||
(minimap-method-10 (_type_ connection-minimap minimap-trail) minimap-trail 10)
|
||||
(minimap-method-11 () none 11)
|
||||
(minimap-method-12 (_type_ process uint int vector int) connection-minimap 12)
|
||||
(minimap-method-13 () none 13)
|
||||
(minimap-method-14 () none 14)
|
||||
(minimap-method-15 (_type_ dma-buffer vector4w symbol) none 15) ;; hud sprite 1 draw
|
||||
(minimap-method-16 () none 16)
|
||||
(minimap-method-17 () none 17)
|
||||
(minimap-method-18 () none 18)
|
||||
(minimap-method-19 () none 19)
|
||||
(minimap-method-20 (_type_) symbol 20)
|
||||
(minimap-method-21 () none 21)
|
||||
(minimap-method-22 () none 22)
|
||||
(minimap-method-23 () none 23)
|
||||
(minimap-method-24 (_type_ dma-buffer vector4w symbol) none 24) ;; hud sprite 2 draw
|
||||
(minimap-method-25 (_type_ texture float) none 25)
|
||||
(minimap-method-26 () none 26)
|
||||
(minimap-method-27 (_type_ float float) none 27)
|
||||
(debug-draw (_type_) none 9)
|
||||
(get-trail-for-connection "Get a trail for connection. If arg1 is set, allow allocating a new one." (_type_ connection-minimap symbol) minimap-trail 10)
|
||||
(get-icon-draw-pos "Follow the path from the start until it reaches the border of the map, then get this position."
|
||||
(_type_ connection-minimap minimap-trail vector float vector) symbol 11)
|
||||
(add-icon! "Add an icon to the map!" (_type_ process uint int vector int) connection-minimap 12)
|
||||
(free-trail-by-connection "Free the trail associated with this connection." (_type_ connection-minimap) none 13)
|
||||
(update-trails "Main function to do trail search per-frame" (_type_) none 14)
|
||||
(draw-1 (_type_ dma-buffer vector4w symbol) none 15) ;; hud sprite 1 draw
|
||||
(draw-connection (_type_ minimap-draw-work connection-minimap) none 16)
|
||||
(draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none 17)
|
||||
(draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none 18)
|
||||
(sub-draw-1-2 (_type_ minimap-draw-work) none 19)
|
||||
(update! (_type_) symbol 20)
|
||||
(sub-draw-1-1 (_type_ minimap-draw-work) none 21)
|
||||
(set-color (_type_ vector) none 22)
|
||||
(draw-racer-2 (_type_ minimap-draw-work connection-minimap) none 23) ;; not done
|
||||
(draw-sprite2 (_type_ dma-buffer vector4w symbol) none 24) ;; hud sprite 2 draw
|
||||
(set-race-texture (_type_ texture float level) none 25)
|
||||
(draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none 26)
|
||||
(set-race-corner (_type_ float float) none 27)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -30714,7 +30735,7 @@
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(deftype minimap-texture-name-array (structure)
|
||||
((data object 35 :offset-assert 0)
|
||||
((data string 35 :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8c
|
||||
@@ -30722,7 +30743,7 @@
|
||||
)
|
||||
|
||||
(deftype minimap-corner-array (structure)
|
||||
((data uint128 35 :offset-assert 0)
|
||||
((data vector 35 :inline :offset-assert 0)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x230
|
||||
@@ -30733,7 +30754,7 @@
|
||||
(define-extern *minimap-corner-array* minimap-corner-array)
|
||||
(define-extern *minimap* minimap)
|
||||
(define-extern *minimap-class-list* (inline-array minimap-class-node))
|
||||
;; (define-extern lookup-minimap-texture-by-name function)
|
||||
(define-extern lookup-minimap-texture-by-name (function string string (pointer texture-page) texture))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; bigmap-data ;;
|
||||
@@ -50894,20 +50915,18 @@
|
||||
;; trail ;;
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
#|
|
||||
(deftype trail-vis-work (structure)
|
||||
((best-count uint32 :offset-assert 0)
|
||||
(best-dist float :offset-assert 4)
|
||||
(start-conn-id uint32 :offset-assert 8)
|
||||
(p0 vector :inline :offset-assert 16)
|
||||
(p1 vector :inline :offset-assert 32)
|
||||
(best-node-id UNKNOWN 64 :offset-assert 48)
|
||||
(best-node-id uint16 64 :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xb0
|
||||
:flag-assert #x9000000b0
|
||||
)
|
||||
|#
|
||||
|
||||
;; (define-extern *trail-graph* object)
|
||||
|
||||
|
||||
@@ -54,9 +54,6 @@
|
||||
"(method 9 bot-speech-list)",
|
||||
"(method 9 bot-speech-list-shuffle)",
|
||||
"(anon-function 10 sig-recorder)",
|
||||
"(method 14 trail-graph)",
|
||||
"(method 12 trail-graph)",
|
||||
"(method 11 trail-graph)",
|
||||
// actual asm
|
||||
"quad-copy!",
|
||||
"return-from-thread",
|
||||
|
||||
@@ -938,5 +938,6 @@
|
||||
["L135", "attack-info"]
|
||||
],
|
||||
"dig-obs": [["L111", "(inline-array vector)", 2]],
|
||||
"dig1-obs": [["L91", "(inline-array vector)", 8]]
|
||||
"dig1-obs": [["L91", "(inline-array vector)", 8]],
|
||||
"minimap": [["L250", "(inline-array minimap-class-node)", 71]]
|
||||
}
|
||||
|
||||
@@ -1431,5 +1431,18 @@
|
||||
[368, "vector"],
|
||||
[400, "vector"],
|
||||
[416, "vector"]
|
||||
]
|
||||
],
|
||||
"(method 24 minimap)": [[16, "minimap-draw-work"]],
|
||||
"(method 15 minimap)": [[16, "minimap-draw-work"]],
|
||||
"(method 11 minimap)": [[16, ["inline-array", "vector", 4]]],
|
||||
"(method 26 minimap)": [[32, "vector"], [64, "matrix"], [48, "vector"]],
|
||||
"(method 23 minimap)": [[32, "vector"], [48, "vector"], [64, "matrix"], [80, "matrix"], [144, "matrix"]],
|
||||
"(method 17 minimap)": [[32, "vector"], [48, "vector"], [64, "matrix"], [80, "matrix"], [144, "matrix"], [240, "vector"], [256, "vector"]],
|
||||
"(method 18 minimap)": [[32, "vector"], [48, "vector"], [64, "matrix"], [80, "matrix"], [144, "matrix"], [240, "vector"], [256, "vector"]],
|
||||
"(method 19 minimap)": [[16, "vector"], [32, "matrix"]],
|
||||
"(method 12 trail-graph)": [[16, ["inline-array", "vector", 2]]],
|
||||
"(method 14 trail-graph)": [[16, ["inline-array", "vector", 2]]],
|
||||
"(method 13 trail-graph)": [[16, ["inline-array", "vector", 2]]],
|
||||
"(method 19 trail-graph)": [[16, "trail-vis-work"]],
|
||||
"(method 15 trail-graph)": [[16, "trail-conn-search"]]
|
||||
}
|
||||
|
||||
@@ -6533,5 +6533,192 @@
|
||||
"(post idle fish-manager)": [
|
||||
[517, "v1", "process-drawable"],
|
||||
[522, "v1", "process-drawable"]
|
||||
],
|
||||
"(method 14 minimap)": [
|
||||
[84, "v1", "process-drawable"],
|
||||
[99, "v1", "entity-actor"],
|
||||
[108, "v1", "process-drawable"],
|
||||
[112, "s2", "entity-actor"],
|
||||
[93, "s2", "basic"]
|
||||
],
|
||||
"(method 3 engine-minimap)": [
|
||||
[7, "t9", "(function engine-minimap engine-minimap)"]
|
||||
],
|
||||
"(method 24 minimap)":[
|
||||
[189, "s2", "connection-minimap"],
|
||||
[194, "s2", "connection-minimap"],
|
||||
[18, "v1", "(pointer uint128)"],
|
||||
[74, "v1", "(pointer uint128)"],
|
||||
[81, "v1", "(inline-array vector)"],
|
||||
[91, "v1", "(inline-array vector4w)"],
|
||||
[96, "v1", "(inline-array vector)"],
|
||||
[108, "v1", "(inline-array vector4w)"],
|
||||
[114, "v1", "(inline-array vector)"],
|
||||
[124, "v1", "(inline-array vector4w)"],
|
||||
[129, "v1", "(inline-array vector)"],
|
||||
[141, "v1", "(inline-array vector4w)"],
|
||||
[161, "s2", "(pointer uint128)"]
|
||||
],
|
||||
"(method 15 minimap)": [
|
||||
[48, "s2", "(pointer uint128)"]
|
||||
],
|
||||
"(method 16 minimap)": [
|
||||
[[30, 35], "v1", "process-drawable"],
|
||||
[56, "v1", "entity-actor"],
|
||||
[66, "a0", "process-drawable"],
|
||||
[77, "a0", "entity-actor"],
|
||||
[88, "a0", "vector"],
|
||||
[50, "v1", "basic"],
|
||||
[516, "v1", "(pointer uint128)"],
|
||||
[517, "v1", "(inline-array vector4w)"],
|
||||
[529, "v1", "(inline-array vector4w)"],
|
||||
[534, "v1", "(inline-array vector4w)"],
|
||||
[550, "v1", "(inline-array vector4w)"],
|
||||
[555, "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 14 engine-minimap)": [
|
||||
[150, "a0", "entity-actor"],
|
||||
[[3, 180], "s3", "connection-minimap"],
|
||||
[143, "v1", "basic"]
|
||||
],
|
||||
"(method 10 engine-minimap)": [
|
||||
[6, "s5", "connection-minimap"]
|
||||
],
|
||||
"(method 26 minimap)": [
|
||||
[34, "a0", "process-drawable"],
|
||||
[49, "v1", "process-drawable"],
|
||||
[64, "a0", "process-drawable"],
|
||||
[303, "a1", "(pointer uint128)"],
|
||||
[305, "a0", "(inline-array vector4w)"],
|
||||
[318, "v1", "(inline-array vector)"],
|
||||
[329, "v1", "(inline-array vector4w)"],
|
||||
[346, "v1", "(inline-array vector)"],
|
||||
[358, "v1", "(inline-array vector4w)"],
|
||||
[375, "v1", "(inline-array vector)"],
|
||||
[387, "v1", "(inline-array vector4w)"],
|
||||
[404, "v1", "(inline-array vector)"],
|
||||
[417, "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 21 minimap)": [
|
||||
[16, "s3", "(pointer uint128)"],
|
||||
[[32, 39], "a0", "dma-packet"],
|
||||
[[41, 48], "a0", "gs-gif-tag"],
|
||||
[51, "a0", "(pointer gs-clamp)"],
|
||||
[53, "a0", "(pointer gs-reg64)"],
|
||||
[55, "a0", "(pointer gs-test)"],
|
||||
[57, "a0", "(pointer gs-reg64)"],
|
||||
[60, "a0", "(pointer gs-texa)"],
|
||||
[62, "a0", "(pointer gs-reg64)"],
|
||||
[71, "s3", "(pointer uint128)"],
|
||||
[215, "s3", "(inline-array vector4w)"],
|
||||
[224, "s3", "(inline-array vector)"],
|
||||
[235, "s3", "(inline-array vector4w)"],
|
||||
[241, "s3", "(inline-array vector)"],
|
||||
[252, "s3", "(inline-array vector4w)"],
|
||||
[259, "s3", "(inline-array vector)"],
|
||||
[270, "s3", "(inline-array vector4w)"],
|
||||
[277, "s3", "(inline-array vector)"],
|
||||
[288, "s3", "(inline-array vector4w)"],
|
||||
[[322, 329], "a0", "dma-packet"],
|
||||
[[331, 338], "a0", "gs-gif-tag"],
|
||||
[342, "a0", "(pointer gs-xy-offset)"],
|
||||
[344, "a0", "(pointer gs-reg64)"],
|
||||
[355, "a2", "connection-minimap"],
|
||||
[379, "s2", "(pointer uint128)"],
|
||||
[400, "a2", "connection-minimap"],
|
||||
[424, "s3", "(pointer uint128)"],
|
||||
[438, "a2", "connection-minimap"],
|
||||
[[453, 460], "a0", "dma-packet"],
|
||||
[[462, 469], "a0", "gs-gif-tag"],
|
||||
[478, "a0", "(pointer gs-frame)"],
|
||||
[480, "a0", "(pointer gs-reg64)"],
|
||||
[482, "a0", "(pointer gs-alpha)"],
|
||||
[484, "a0", "(pointer gs-reg64)"],
|
||||
[485, "a0", "(pointer gs-xy-offset)"],
|
||||
[487, "a0", "(pointer gs-reg64)"],
|
||||
[[494, 508], "s3", "(pointer uint128)"],
|
||||
[508, "s3", "(inline-array vector4w)"],
|
||||
[517, "s3", "(inline-array vector4w)"],
|
||||
[522, "s3", "(inline-array vector4w)"],
|
||||
[528, "s3", "(inline-array vector4w)"],
|
||||
[535, "s3", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 23 minimap)": [
|
||||
[28, "a0", "process-drawable"],
|
||||
[62, "v1", "process-drawable"],
|
||||
[81, "a0", "process-drawable"],
|
||||
[305, "a1", "(pointer uint128)"],
|
||||
[307, "a0", "(inline-array vector4w)"],
|
||||
[320, "v1", "(inline-array vector)"],
|
||||
[331, "v1", "(inline-array vector4w)"],
|
||||
[348, "v1", "(inline-array vector)"],
|
||||
[360, "v1", "(inline-array vector4w)"],
|
||||
[377, "v1", "(inline-array vector)"],
|
||||
[389, "v1", "(inline-array vector4w)"],
|
||||
[406, "v1", "(inline-array vector)"],
|
||||
[419, "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 17 minimap)": [
|
||||
[28, "a0", "process-drawable"],
|
||||
[68, "v1", "process-drawable"],
|
||||
[87, "a0", "process-drawable"],
|
||||
[357, "a0", "(pointer uint128)"],
|
||||
[365, "a0", "(pointer uint128)"],
|
||||
[368, "a0", "(pointer uint128)"],
|
||||
[370, "v1", "(inline-array vector4w)"],
|
||||
[383, "v1", "(inline-array vector)"],
|
||||
[394, "v1", "(inline-array vector4w)"],
|
||||
[410, "v1", "(inline-array vector)"],
|
||||
[422, "v1", "(inline-array vector4w)"],
|
||||
[438, "v1", "(inline-array vector)"],
|
||||
[450, "v1", "(inline-array vector4w)"],
|
||||
[466, "v1", "(inline-array vector)"],
|
||||
[479, "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 18 minimap)": [
|
||||
[28, "a0", "process-drawable"],
|
||||
[68, "v1", "process-drawable"],
|
||||
[87, "a0", "process-drawable"],
|
||||
[323, "t1", "(pointer uint128)"],
|
||||
[325, "t0", "(inline-array vector4w)"],
|
||||
[338, "a3", "(inline-array vector4w)"],
|
||||
[344, "a3", "(inline-array vector4w)"],
|
||||
[360, "a3", "(inline-array vector4w)"],
|
||||
[366, "a2", "(inline-array vector4w)"],
|
||||
[382, "a2", "(inline-array vector4w)"],
|
||||
[388, "a1", "(inline-array vector4w)"],
|
||||
[404, "a1", "(inline-array vector4w)"],
|
||||
[410, "v1", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 19 minimap)": [
|
||||
[[8, 15], "a0", "dma-packet"],
|
||||
[[17, 24], "a0", "gs-gif-tag"],
|
||||
[28, "s2", "(pointer gs-test)"],
|
||||
[30, "s2", "(pointer gs-reg64)"],
|
||||
[32, "s2", "(pointer gs-alpha)"],
|
||||
[34, "s2", "(pointer gs-reg64)"],
|
||||
[53, "s2", "(pointer gs-tex0)"],
|
||||
[55, "s2", "(pointer gs-reg64)"],
|
||||
[57, "s2", "(pointer gs-tex1)"],
|
||||
[59, "s2", "(pointer gs-reg64)"],
|
||||
[61, "s2", "(pointer gs-clamp)"],
|
||||
[63, "s2", "(pointer gs-reg64)"],
|
||||
[64, "s2", "(pointer uint64)"],
|
||||
[66, "s2", "(pointer gs-reg64)"],
|
||||
[109, "v1", "(pointer uint128)"],
|
||||
[[116, 157], "v1", "(inline-array vector4w)"],
|
||||
[[165, 172], "a0", "dma-packet"],
|
||||
[[174, 181], "a0", "gs-gif-tag"],
|
||||
[185, "a0", "(pointer gs-test)"],
|
||||
[187, "a0", "(pointer gs-reg64)"],
|
||||
[[505, 514], "s3", "(pointer uint128)"],
|
||||
[[514, 596], "s3", "(inline-array vector4w)"]
|
||||
],
|
||||
"(method 21 trail-graph)": [
|
||||
[4, "a3", "trail-conn"],
|
||||
[[11, 17], "a3", "trail-conn-hash-cell"],
|
||||
[20, "a0", "(pointer uint16)"],
|
||||
[33, "a3", "trail-conn"],
|
||||
[37, "a3", "trail-conn"]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -519,7 +519,7 @@ goos::Object decomp_ref_to_inline_array_guess_size(
|
||||
auto& word = all_words.at(my_seg).at(pad_byte_idx / 4);
|
||||
switch (word.kind()) {
|
||||
case LinkedWord::PLAIN_DATA:
|
||||
ASSERT(word.get_byte(pad_byte_idx) == 0);
|
||||
ASSERT(word.get_byte(pad_byte_idx % 4) == 0);
|
||||
break;
|
||||
case LinkedWord::TYPE_PTR:
|
||||
break;
|
||||
@@ -831,6 +831,21 @@ const std::unordered_map<
|
||||
{"nav-mesh",
|
||||
{{"poly-array", ArrayFieldDecompMeta(TypeSpec("nav-poly"), 64)},
|
||||
{"nav-control-array", ArrayFieldDecompMeta(TypeSpec("nav-control"), 288)}}},
|
||||
{"trail-conn-hash",
|
||||
{{"cell", ArrayFieldDecompMeta(TypeSpec("trail-conn-hash-cell"), 4)},
|
||||
{"conn-ids", ArrayFieldDecompMeta(TypeSpec("uint16"),
|
||||
2,
|
||||
ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}},
|
||||
{"trail-graph",
|
||||
{{"node", ArrayFieldDecompMeta(TypeSpec("trail-node"), 18)},
|
||||
{"conn", ArrayFieldDecompMeta(TypeSpec("trail-conn"), 8)},
|
||||
{"conn-ids", ArrayFieldDecompMeta(TypeSpec("uint16"),
|
||||
2,
|
||||
ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)},
|
||||
{"visgroup", ArrayFieldDecompMeta(TypeSpec("trail-conn-hash-cell"), 4)},
|
||||
{"visnode-ids", ArrayFieldDecompMeta(TypeSpec("uint16"),
|
||||
2,
|
||||
ArrayFieldDecompMeta::Kind::REF_TO_INTEGER_ARR)}}},
|
||||
{"predator-graph",
|
||||
{{"node", ArrayFieldDecompMeta(TypeSpec("predator-node"), 48)},
|
||||
{"edge", ArrayFieldDecompMeta(TypeSpec("predator-edge"), 4)}}}}}};
|
||||
@@ -902,6 +917,7 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
}
|
||||
|
||||
int word_count = (type_info->get_size_in_memory() + 3) / 4;
|
||||
int byte_count = type_info->get_size_in_memory();
|
||||
|
||||
// check alignment
|
||||
if (offset_location % 8) {
|
||||
@@ -935,24 +951,17 @@ goos::Object decompile_structure(const TypeSpec& type,
|
||||
// status of each byte.
|
||||
enum ByteStatus : u8 { ZERO_UNREAD, HAS_DATA_UNREAD, ZERO_READ, HAS_DATA_READ };
|
||||
std::vector<int> field_status_per_byte;
|
||||
for (int i = 0; i < word_count; i++) {
|
||||
auto& w = obj_words.at(i);
|
||||
for (int i = 0; i < byte_count; i++) {
|
||||
auto& w = obj_words.at(i / 4);
|
||||
switch (w.kind()) {
|
||||
case LinkedWord::TYPE_PTR:
|
||||
case LinkedWord::PTR:
|
||||
case LinkedWord::SYM_PTR:
|
||||
case LinkedWord::EMPTY_PTR:
|
||||
field_status_per_byte.push_back(HAS_DATA_UNREAD);
|
||||
field_status_per_byte.push_back(HAS_DATA_UNREAD);
|
||||
field_status_per_byte.push_back(HAS_DATA_UNREAD);
|
||||
field_status_per_byte.push_back(HAS_DATA_UNREAD);
|
||||
break;
|
||||
case LinkedWord::PLAIN_DATA: {
|
||||
u8 bytes[4];
|
||||
memcpy(bytes, &w.data, 4);
|
||||
for (auto b : bytes) {
|
||||
field_status_per_byte.push_back(b ? HAS_DATA_UNREAD : ZERO_UNREAD);
|
||||
}
|
||||
field_status_per_byte.push_back(w.get_byte(i % 4) ? HAS_DATA_UNREAD : ZERO_UNREAD);
|
||||
} break;
|
||||
default:
|
||||
throw std::runtime_error("Unsupported word in static data");
|
||||
|
||||
@@ -109,9 +109,9 @@
|
||||
(if (and (not (handle->process (-> obj hud-dist))) *target*)
|
||||
(set! (-> obj hud-dist) (ppointer->handle (process-spawn hud-progress :init hud-init-by-other :to *target*)))
|
||||
)
|
||||
(let ((s5-1 (minimap-method-10 *minimap* (-> obj minimap) (the-as minimap-trail #f))))
|
||||
(let ((s5-1 (get-trail-for-connection *minimap* (-> obj minimap) #f)))
|
||||
(if (and s5-1 (nonzero? (-> s5-1 last-updated)))
|
||||
(set! (-> obj dist) (minimap-trail-method-9 s5-1 (target-pos 0) (-> obj pos)))
|
||||
(set! (-> obj dist) (get-distance-with-path s5-1 (target-pos 0) (-> obj pos)))
|
||||
)
|
||||
)
|
||||
(if (= (-> obj max-dist) 0.0)
|
||||
@@ -147,9 +147,7 @@
|
||||
((< (* f0-15 f0-15) (vector-vector-xz-distance-squared (-> obj pos) (-> obj root trans)))
|
||||
(kill-callback (-> *minimap* engine) (-> obj minimap))
|
||||
(set! (-> obj root trans quad) (-> obj pos quad))
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (-> obj map-icon) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (-> obj map-icon) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj root trans quad) (-> obj pos quad))
|
||||
@@ -228,7 +226,7 @@
|
||||
(kill-callback (-> *minimap* engine) (-> self minimap))
|
||||
(let ((a2-1 (-> event param 0)))
|
||||
(set! (-> self map-icon) a2-1)
|
||||
(set! v0-2 (minimap-method-12 *minimap* self a2-1 (the-as int #f) (the-as vector #t) 0))
|
||||
(set! v0-2 (add-icon! *minimap* self a2-1 (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(set! (-> self minimap) (the-as connection-minimap v0-2))
|
||||
v0-2
|
||||
@@ -286,9 +284,7 @@
|
||||
(set! (-> self max-dist) 0.0)
|
||||
(set! (-> self theta) 0.0)
|
||||
(set! (-> self phi) 0.0)
|
||||
(set! (-> self minimap)
|
||||
(minimap-method-12 *minimap* self (-> arg0 map-icon) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> self minimap) (add-icon! *minimap* self (-> arg0 map-icon) (the-as int #f) (the-as vector #t) 0))
|
||||
(cond
|
||||
((not (logtest? (-> self flags) (task-arrow-flags task-arrow-flag-02)))
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 78) self))
|
||||
|
||||
@@ -85,19 +85,18 @@
|
||||
0
|
||||
)
|
||||
)
|
||||
;; TODO minimap
|
||||
;; (let ((s5-0 (the-as connection-pers (-> *minimap* engine alive-list-override))))
|
||||
;; (while s5-0
|
||||
;; (let ((s4-0 (the-as connection-minimap s5-0)))
|
||||
;; (if (and (logtest? (-> s4-0 flags) (minimap-flag task-graph))
|
||||
;; (not (open? (-> *game-info* sub-task-list (-> s4-0 node))))
|
||||
;; )
|
||||
;; (logior! (-> s4-0 flags) (minimap-flag fade-out))
|
||||
;; )
|
||||
;; )
|
||||
;; (set! s5-0 (-> s5-0 next))
|
||||
;; )
|
||||
;; )
|
||||
(let ((s5-0 (the-as connection-pers (-> *minimap* engine alive-list-override))))
|
||||
(while s5-0
|
||||
(let ((s4-0 (the-as connection-minimap s5-0)))
|
||||
(if (and (logtest? (-> s4-0 flags) (minimap-flag task-graph))
|
||||
(not (open? (-> *game-info* sub-task-list (-> s4-0 node))))
|
||||
)
|
||||
(logior! (-> s4-0 flags) (minimap-flag fade-out))
|
||||
)
|
||||
)
|
||||
(set! s5-0 (-> s5-0 next))
|
||||
)
|
||||
)
|
||||
(let ((borrow-eval (lambda ((arg0 pair))
|
||||
(let ((a0-1 (car arg0)))
|
||||
(while (not (null? arg0))
|
||||
@@ -157,20 +156,20 @@
|
||||
(let ((node-open-ev (-> node when-open node-ev-i)))
|
||||
(case (-> node-open-ev actor)
|
||||
(((game-task-actor minimap))
|
||||
;; (let ((v1-67 (minimap-method-12
|
||||
;; *minimap*
|
||||
;; *dproc*
|
||||
;; (-> node-open-ev icon)
|
||||
;; (the-as int (-> node-open-ev icon))
|
||||
;; (the-as vector #f)
|
||||
;; i
|
||||
;; )
|
||||
;; )
|
||||
;; )
|
||||
;; (if v1-67
|
||||
;; (logior! (-> v1-67 flags) (minimap-flag task-graph))
|
||||
;; )
|
||||
;; )
|
||||
(let ((v1-67 (add-icon!
|
||||
*minimap*
|
||||
*dproc*
|
||||
(-> node-open-ev icon)
|
||||
(the-as int (-> node-open-ev icon))
|
||||
(the-as vector #f)
|
||||
i
|
||||
)
|
||||
)
|
||||
)
|
||||
(if v1-67
|
||||
(logior! (-> v1-67 flags) (minimap-flag task-graph))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -607,7 +607,7 @@
|
||||
arg0
|
||||
)
|
||||
|
||||
(defun reset-display-gs-state ((arg0 display) (arg1 dma-buffer) (arg2 int))
|
||||
(defun reset-display-gs-state ((arg0 display) (arg1 dma-buffer))
|
||||
(let* ((v1-0 arg1)
|
||||
(a2-1 (the-as object (-> v1-0 base)))
|
||||
)
|
||||
|
||||
@@ -198,15 +198,13 @@
|
||||
(+! s3-1 3072)
|
||||
(ocean-texture-add-call-rest obj arg0)
|
||||
)
|
||||
(let ((a2-5 s3-1))
|
||||
(ocean-texture-add-verts-last obj arg0 a2-5 (+ arg1 0))
|
||||
(ocean-texture-add-call-rest obj arg0)
|
||||
(ocean-texture-add-call-done obj arg0)
|
||||
(ocean-method-81 obj arg0)
|
||||
(reset-display-gs-state *display* arg0 a2-5)
|
||||
)
|
||||
(ocean-texture-add-verts-last obj arg0 s3-1 (+ arg1 0))
|
||||
)
|
||||
)
|
||||
(ocean-texture-add-call-rest obj arg0)
|
||||
(ocean-texture-add-call-done obj arg0)
|
||||
(ocean-method-81 obj arg0)
|
||||
(reset-display-gs-state *display* arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -407,22 +405,16 @@
|
||||
(set! (-> v1-69 6 quad) (-> obj xy88 quad))
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((t9-15 set-display-gs-state)
|
||||
(a0-71 arg0)
|
||||
(a1-31 66)
|
||||
(a2-5 8)
|
||||
)
|
||||
(t9-15 a0-71 a1-31 a2-5 8 0 0)
|
||||
(let ((v1-72 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-72 0 quad) (-> obj erase-tmpl dma-vif quad))
|
||||
(set! (-> v1-72 1 quad) (-> obj erase-tmpl quad 1))
|
||||
(set! (-> v1-72 2 quad) (-> obj color80808000 quad))
|
||||
(set! (-> v1-72 3 quad) (-> obj xy00 quad))
|
||||
(set! (-> v1-72 4 quad) (-> obj xy88 quad))
|
||||
)
|
||||
(set! (-> arg0 base) (the-as pointer (-> (the-as (inline-array vector4w) (-> arg0 base)) 5)))
|
||||
(reset-display-gs-state *display* arg0 a2-5)
|
||||
(set-display-gs-state arg0 66 8 8 0 0)
|
||||
(let ((v1-72 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-72 0 quad) (-> obj erase-tmpl dma-vif quad))
|
||||
(set! (-> v1-72 1 quad) (-> obj erase-tmpl quad 1))
|
||||
(set! (-> v1-72 2 quad) (-> obj color80808000 quad))
|
||||
(set! (-> v1-72 3 quad) (-> obj xy00 quad))
|
||||
(set! (-> v1-72 4 quad) (-> obj xy88 quad))
|
||||
)
|
||||
(set! (-> arg0 base) (the-as pointer (-> (the-as (inline-array vector4w) (-> arg0 base)) 5)))
|
||||
(reset-display-gs-state *display* arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1526,95 +1518,89 @@
|
||||
(ocean-method-85 obj arg0)
|
||||
(ocean-method-88 obj arg0)
|
||||
(set-display-gs-state arg0 (the-as int (-> *ocean-envmap-texture-base* vram-page)) 64 64 0 0)
|
||||
(let ((a0-43 obj)
|
||||
(t9-13 (method-of-type ocean ocean-method-83))
|
||||
(a1-43 arg0)
|
||||
(a2-5 32768.0)
|
||||
)
|
||||
(t9-13 a0-43 a1-43 a2-5)
|
||||
(let* ((v1-44 arg0)
|
||||
(a0-44 (the-as object (-> v1-44 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-44) dma) (new 'static 'dma-tag :qwc #x7 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-44) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-44) vif1) (new 'static 'vif-tag :imm #x7 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-44 base) (&+ (the-as pointer a0-44) 16))
|
||||
)
|
||||
(let* ((v1-45 arg0)
|
||||
(a0-46 (the-as object (-> v1-45 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-46) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x6))
|
||||
(set! (-> (the-as gs-gif-tag a0-46) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-45 base) (&+ (the-as pointer a0-46) 16))
|
||||
)
|
||||
(let* ((s4-4 arg0)
|
||||
(s3-2 (-> s4-4 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-alpha) s3-2) 0) (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 1) (gs-reg64 alpha-1))
|
||||
(set! (-> (the-as (pointer gs-tex0) s3-2) 2)
|
||||
(new 'static 'gs-tex0
|
||||
:tbw #x1
|
||||
:tcc #x1
|
||||
:th (log2 32)
|
||||
:tw (log2 64)
|
||||
:tbp0 (-> *ocean-envmap-texture-base* vram-block)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 3) (gs-reg64 tex0-1))
|
||||
(set! (-> (the-as (pointer gs-tex1) s3-2) 4) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 5) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer gs-clamp) s3-2) 6)
|
||||
(new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 7) (gs-reg64 clamp-1))
|
||||
(set! (-> (the-as (pointer gs-rgbaq) s3-2) 8) (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 9) (gs-reg64 rgbaq))
|
||||
(set! (-> (the-as (pointer uint64) s3-2) 10) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 11) (gs-reg64 texflush))
|
||||
(set! (-> s4-4 base) (&+ s3-2 96))
|
||||
)
|
||||
(let* ((v1-63 arg0)
|
||||
(a0-54 (the-as object (-> v1-63 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-54) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-54) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-54) vif1) (new 'static 'vif-tag :imm #x3 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-63 base) (&+ (the-as pointer a0-54) 16))
|
||||
)
|
||||
(let* ((v1-64 arg0)
|
||||
(a0-56 (the-as object (-> v1-64 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-56) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x2))
|
||||
(set! (-> (the-as gs-gif-tag a0-56) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-64 base) (&+ (the-as pointer a0-56) 16))
|
||||
)
|
||||
(let* ((v1-65 arg0)
|
||||
(a0-58 (-> v1-65 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-tex1) a0-58) 0) (new 'static 'gs-tex1))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 1) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer uint64) a0-58) 2) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 3) (gs-reg64 texflush))
|
||||
(set! (-> v1-65 base) (&+ a0-58 32))
|
||||
)
|
||||
(let ((v1-66 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-66 0 quad) (-> obj sprite-tmpl dma-vif quad))
|
||||
(set! (-> v1-66 1 quad) (-> obj sprite-tmpl quad 1))
|
||||
(set-vector! (-> v1-66 2) 128 128 128 128)
|
||||
(set-vector! (-> v1-66 3) 8 520 0 0)
|
||||
(set-vector! (-> v1-66 4) 0 512 #xffffff 0)
|
||||
(set-vector! (-> v1-66 5) 1032 8 0 0)
|
||||
(let ((v1-67 (the-as object (-> v1-66 6))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) y) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) z) #xffffff)
|
||||
(set! (-> (the-as vector4w v1-67) w) 0)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(reset-display-gs-state *display* arg0 (the-as int a2-5))
|
||||
(ocean-method-83 obj arg0 32768.0)
|
||||
(let* ((v1-44 arg0)
|
||||
(a0-44 (the-as object (-> v1-44 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-44) dma) (new 'static 'dma-tag :qwc #x7 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-44) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-44) vif1) (new 'static 'vif-tag :imm #x7 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-44 base) (&+ (the-as pointer a0-44) 16))
|
||||
)
|
||||
(let* ((v1-45 arg0)
|
||||
(a0-46 (the-as object (-> v1-45 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-46) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x6))
|
||||
(set! (-> (the-as gs-gif-tag a0-46) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-45 base) (&+ (the-as pointer a0-46) 16))
|
||||
)
|
||||
(let* ((s4-4 arg0)
|
||||
(s3-2 (-> s4-4 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-alpha) s3-2) 0) (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 1) (gs-reg64 alpha-1))
|
||||
(set! (-> (the-as (pointer gs-tex0) s3-2) 2)
|
||||
(new 'static 'gs-tex0
|
||||
:tbw #x1
|
||||
:tcc #x1
|
||||
:th (log2 32)
|
||||
:tw (log2 64)
|
||||
:tbp0 (-> *ocean-envmap-texture-base* vram-block)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 3) (gs-reg64 tex0-1))
|
||||
(set! (-> (the-as (pointer gs-tex1) s3-2) 4) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 5) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer gs-clamp) s3-2) 6)
|
||||
(new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 7) (gs-reg64 clamp-1))
|
||||
(set! (-> (the-as (pointer gs-rgbaq) s3-2) 8) (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 9) (gs-reg64 rgbaq))
|
||||
(set! (-> (the-as (pointer uint64) s3-2) 10) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 11) (gs-reg64 texflush))
|
||||
(set! (-> s4-4 base) (&+ s3-2 96))
|
||||
)
|
||||
(let* ((v1-63 arg0)
|
||||
(a0-54 (the-as object (-> v1-63 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-54) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-54) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-54) vif1) (new 'static 'vif-tag :imm #x3 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-63 base) (&+ (the-as pointer a0-54) 16))
|
||||
)
|
||||
(let* ((v1-64 arg0)
|
||||
(a0-56 (the-as object (-> v1-64 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-56) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x2))
|
||||
(set! (-> (the-as gs-gif-tag a0-56) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-64 base) (&+ (the-as pointer a0-56) 16))
|
||||
)
|
||||
(let* ((v1-65 arg0)
|
||||
(a0-58 (-> v1-65 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-tex1) a0-58) 0) (new 'static 'gs-tex1))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 1) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer uint64) a0-58) 2) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 3) (gs-reg64 texflush))
|
||||
(set! (-> v1-65 base) (&+ a0-58 32))
|
||||
)
|
||||
(let ((v1-66 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-66 0 quad) (-> obj sprite-tmpl dma-vif quad))
|
||||
(set! (-> v1-66 1 quad) (-> obj sprite-tmpl quad 1))
|
||||
(set-vector! (-> v1-66 2) 128 128 128 128)
|
||||
(set-vector! (-> v1-66 3) 8 520 0 0)
|
||||
(set-vector! (-> v1-66 4) 0 512 #xffffff 0)
|
||||
(set-vector! (-> v1-66 5) 1032 8 0 0)
|
||||
(let ((v1-67 (the-as object (-> v1-66 6))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) y) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) z) #xffffff)
|
||||
(set! (-> (the-as vector4w v1-67) w) 0)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(reset-display-gs-state *display* arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defglobalconstant SKIP_MINIMAP_DRAW #t)
|
||||
|
||||
;; WARN: Failed store: (s.w! (+ v1-35 8) 0) at op 135
|
||||
;; WARN: Failed store: (s.w! (+ v1-35 12) 0) at op 136
|
||||
;; WARN: Failed store: (s.w! (+ v1-61 8) 0) at op 213
|
||||
@@ -25,14 +27,12 @@
|
||||
(set! (-> obj sprites 0 color w)
|
||||
(the int (+ 70.0 (* 70.0 (sin (* 182.04445 (the float (-> obj values 1 current)))))))
|
||||
)
|
||||
(when (nonzero? *minimap*) ;; added check
|
||||
(set! (-> *minimap* color y)
|
||||
(the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> obj values 1 current)))))))
|
||||
)
|
||||
(set! (-> *minimap* color z)
|
||||
(the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> obj values 1 current)))))))
|
||||
)
|
||||
)
|
||||
(set! (-> *minimap* color y)
|
||||
(the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> obj values 1 current)))))))
|
||||
)
|
||||
(set! (-> *minimap* color z)
|
||||
(the int (- 96.0 (* 32.0 (sin (* 182.04445 (the float (-> obj values 1 current)))))))
|
||||
)
|
||||
(set! (-> obj sprites 0 scale-x) 1.0)
|
||||
(set! (-> obj sprites 0 scale-y) 1.0)
|
||||
(when (>= (-> *setting-control* user-current race-minimap) 0)
|
||||
@@ -44,29 +44,33 @@
|
||||
(let ((t9-5 (method-of-type hud draw)))
|
||||
(t9-5 obj)
|
||||
)
|
||||
(#when SKIP_MINIMAP_DRAW
|
||||
(return #f)
|
||||
)
|
||||
(cond
|
||||
((< (-> *setting-control* user-current race-minimap) 0)
|
||||
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id progress)
|
||||
)
|
||||
(set-as-offset-from! (-> obj sprites 2) (the-as vector4w (-> obj sprites 1)) 2 -3)
|
||||
(minimap-method-15 *minimap* s4-0 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
(draw-1 *minimap* s4-0 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
)
|
||||
)
|
||||
((zero? (-> *setting-control* user-current race-minimap))
|
||||
(let ((s5-1 (level-get *level* 'stadiumb)))
|
||||
(when (and s5-1 (= (-> s5-1 status) 'active))
|
||||
(minimap-method-25
|
||||
(set-race-texture
|
||||
*minimap*
|
||||
(lookup-texture-by-id (new 'static 'texture-id :index #x10 :page #xc25))
|
||||
16837.018
|
||||
s5-1
|
||||
)
|
||||
(minimap-method-27 *minimap* -1609044.0 -2978676.8)
|
||||
(set-race-corner *minimap* -1609044.0 -2978676.8)
|
||||
(with-dma-buffer-add-bucket ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id progress)
|
||||
)
|
||||
(set-as-offset-from! (-> obj sprites 2) (the-as vector4w (-> obj sprites 1)) 10 -15)
|
||||
(minimap-method-24 *minimap* s4-2 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
(draw-sprite2 *minimap* s4-2 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -74,17 +78,18 @@
|
||||
((= (-> *setting-control* user-current race-minimap) 1)
|
||||
(let ((s5-3 (level-get *level* 'stadiumc)))
|
||||
(when (and s5-3 (= (-> s5-3 status) 'active))
|
||||
(minimap-method-27 *minimap* -951910.4 -3694182.5)
|
||||
(minimap-method-25
|
||||
(set-race-corner *minimap* -951910.4 -3694182.5)
|
||||
(set-race-texture
|
||||
*minimap*
|
||||
(lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xd17))
|
||||
13907.148
|
||||
s5-3
|
||||
)
|
||||
(with-dma-buffer-add-bucket ((s4-4 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id progress)
|
||||
)
|
||||
(set-as-offset-from! (-> obj sprites 2) (the-as vector4w (-> obj sprites 1)) 20 -8)
|
||||
(minimap-method-24 *minimap* s4-4 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
(draw-sprite2 *minimap* s4-4 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -92,17 +97,18 @@
|
||||
((= (-> *setting-control* user-current race-minimap) 2)
|
||||
(let ((s5-5 (level-get *level* 'stadiumd)))
|
||||
(when (and s5-5 (= (-> s5-5 status) 'active))
|
||||
(minimap-method-27 *minimap* -1862860.8 -3283353.5)
|
||||
(minimap-method-25
|
||||
(set-race-corner *minimap* -1862860.8 -3283353.5)
|
||||
(set-race-texture
|
||||
*minimap*
|
||||
(lookup-texture-by-id (new 'static 'texture-id :index #x1 :page #xd18))
|
||||
18255.871
|
||||
s5-5
|
||||
)
|
||||
(with-dma-buffer-add-bucket ((s4-6 (-> *display* frames (-> *display* on-screen) global-buf))
|
||||
(bucket-id progress)
|
||||
)
|
||||
(set-as-offset-from! (-> obj sprites 2) (the-as vector4w (-> obj sprites 1)) 10 -8)
|
||||
(minimap-method-24 *minimap* s4-6 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
(draw-sprite2 *minimap* s4-6 (the-as vector4w (-> obj sprites 2)) #t)
|
||||
)
|
||||
)
|
||||
)
|
||||
@@ -117,7 +123,7 @@
|
||||
|
||||
(defmethod update-values hud-map ((obj hud-map))
|
||||
(cond
|
||||
((minimap-method-20 *minimap*)
|
||||
((update! *minimap*)
|
||||
(logior! (-> obj flags) (hud-flags show))
|
||||
(let ((t9-1 (method-of-type hud update-values)))
|
||||
(t9-1 obj)
|
||||
@@ -156,7 +162,7 @@
|
||||
(set! (-> obj sprites 1 flags) (the-as uint 4))
|
||||
(set! (-> obj sprites 1 pos z) #xffff00)
|
||||
(set! (-> obj values 0 current) 0)
|
||||
(minimap-method-20 *minimap*)
|
||||
(update! *minimap*)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -117,6 +117,7 @@
|
||||
(scale float :offset-assert 28)
|
||||
(color rgba :offset-assert 32)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
@@ -125,7 +126,7 @@
|
||||
|
||||
(deftype connection-minimap (connection-pers)
|
||||
((handle handle :offset 8)
|
||||
(position vector :offset 16)
|
||||
(position object :offset 16)
|
||||
(alpha float :offset 20)
|
||||
(class minimap-class-node :offset 24)
|
||||
(flags minimap-flag :offset 28)
|
||||
@@ -164,18 +165,18 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #xb000000d0
|
||||
(:methods
|
||||
(minimap-trail-method-9 (_type_ vector vector) float 9)
|
||||
(minimap-trail-method-10 () none 10)
|
||||
(get-distance-with-path (_type_ vector vector) float 9)
|
||||
(reset (_type_) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype minimap-draw-work (structure)
|
||||
((buf basic :offset-assert 0)
|
||||
(justify-right basic :offset-assert 4)
|
||||
(draw-pos vector4w :inline :offset-assert 16)
|
||||
(mat matrix :inline :offset-assert 32)
|
||||
(corner vector4w 4 :inline :offset-assert 96)
|
||||
((buf dma-buffer :offset-assert 0)
|
||||
(justify-right symbol :offset-assert 4)
|
||||
(draw-pos vector4w :inline :offset-assert 16)
|
||||
(mat matrix :inline :offset-assert 32)
|
||||
(corner vector 4 :inline :offset-assert 96)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xa0
|
||||
@@ -193,20 +194,20 @@
|
||||
(color vector4w :inline :offset-assert 192)
|
||||
(offset vector :inline :offset-assert 208)
|
||||
(minimap-corner vector :inline :offset-assert 224)
|
||||
(last-name basic :offset-assert 240)
|
||||
(last-name string :offset-assert 240)
|
||||
(last-tex basic :offset-assert 244)
|
||||
(target-inv-scale float :offset-assert 248)
|
||||
(map-bits uint64 :offset-assert 256)
|
||||
(level basic :offset-assert 264)
|
||||
(ctywide basic :offset-assert 268)
|
||||
(level level :offset-assert 264)
|
||||
(ctywide level :offset-assert 268)
|
||||
(inv-scale float :offset 212)
|
||||
(fade float :offset 220)
|
||||
(engine engine-minimap :offset-assert 272)
|
||||
(engine-key uint32 :offset-assert 276)
|
||||
(trail minimap-trail 6 :inline :offset-assert 288)
|
||||
(race-tex basic :offset-assert 1536)
|
||||
(race-tex texture :offset-assert 1536)
|
||||
(race-scale float :offset-assert 1540)
|
||||
(race-level basic :offset-assert 1544)
|
||||
(race-level level :offset-assert 1544)
|
||||
(sprite2-tmpl dma-gif-packet :inline :offset-assert 1552)
|
||||
(race-corner vector :inline :offset-assert 1584)
|
||||
(goal-time float :offset-assert 1600)
|
||||
@@ -216,24 +217,24 @@
|
||||
:size-assert #x648
|
||||
:flag-assert #x1c00000648
|
||||
(:methods
|
||||
(minimap-method-9 () none 9)
|
||||
(minimap-method-10 (_type_ connection-minimap minimap-trail) minimap-trail 10)
|
||||
(minimap-method-11 () none 11)
|
||||
(minimap-method-12 (_type_ process uint int vector int) connection-minimap 12)
|
||||
(minimap-method-13 () none 13)
|
||||
(minimap-method-14 () none 14)
|
||||
(minimap-method-15 (_type_ dma-buffer vector4w symbol) none 15)
|
||||
(minimap-method-16 () none 16)
|
||||
(minimap-method-17 () none 17)
|
||||
(minimap-method-18 () none 18)
|
||||
(minimap-method-19 () none 19)
|
||||
(minimap-method-20 (_type_) symbol 20)
|
||||
(minimap-method-21 () none 21)
|
||||
(minimap-method-22 () none 22)
|
||||
(minimap-method-23 () none 23)
|
||||
(minimap-method-24 (_type_ dma-buffer vector4w symbol) none 24)
|
||||
(minimap-method-25 (_type_ texture float) none 25)
|
||||
(minimap-method-26 () none 26)
|
||||
(minimap-method-27 (_type_ float float) none 27)
|
||||
(debug-draw (_type_) none 9)
|
||||
(get-trail-for-connection (_type_ connection-minimap symbol) minimap-trail 10)
|
||||
(get-icon-draw-pos (_type_ connection-minimap minimap-trail vector float vector) symbol 11)
|
||||
(add-icon! (_type_ process uint int vector int) connection-minimap 12)
|
||||
(free-trail-by-connection (_type_ connection-minimap) none 13)
|
||||
(update-trails (_type_) none 14)
|
||||
(draw-1 (_type_ dma-buffer vector4w symbol) none 15)
|
||||
(draw-connection (_type_ minimap-draw-work connection-minimap) none 16)
|
||||
(draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none 17)
|
||||
(draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none 18)
|
||||
(sub-draw-1-2 (_type_ minimap-draw-work) none 19)
|
||||
(update! (_type_) symbol 20)
|
||||
(sub-draw-1-1 (_type_ minimap-draw-work) none 21)
|
||||
(set-color (_type_ vector) none 22)
|
||||
(draw-racer-2 (_type_ minimap-draw-work connection-minimap) none 23)
|
||||
(draw-sprite2 (_type_ dma-buffer vector4w symbol) none 24)
|
||||
(set-race-texture (_type_ texture float level) none 25)
|
||||
(draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none 26)
|
||||
(set-race-corner (_type_ float float) none 27)
|
||||
)
|
||||
)
|
||||
|
||||
+2780
-45
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -5,27 +5,46 @@
|
||||
;; name in dgo: trail-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(defenum trail-node-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(tnf0 0) ;; unused??
|
||||
(tnf1 1)
|
||||
)
|
||||
|
||||
(defenum conn-flag
|
||||
:type uint8
|
||||
:bitfield #t
|
||||
(cf0 0)
|
||||
(cf1 1)
|
||||
(cf2 2)
|
||||
(cf3 3)
|
||||
)
|
||||
|
||||
(declare-type trail-graph basic)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype trail-node (structure)
|
||||
((next-id int16 :offset-assert 0)
|
||||
(prev-id int16 :offset-assert 2)
|
||||
(parent-id int16 :offset-assert 4)
|
||||
(x int16 :offset-assert 6)
|
||||
(z int16 :offset-assert 8)
|
||||
(first-conn uint16 :offset-assert 10)
|
||||
(cost-from-start uint16 :offset-assert 12)
|
||||
(cost-to-goal uint16 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(conn-count uint8 :offset-assert 17)
|
||||
((next-id int16 :offset-assert 0)
|
||||
(prev-id int16 :offset-assert 2)
|
||||
(parent-id int16 :offset-assert 4)
|
||||
(x int16 :offset-assert 6)
|
||||
(z int16 :offset-assert 8)
|
||||
(first-conn uint16 :offset-assert 10)
|
||||
(cost-from-start uint16 :offset-assert 12)
|
||||
(cost-to-goal uint16 :offset-assert 14)
|
||||
(flags trail-node-flag :offset-assert 16)
|
||||
(conn-count uint8 :offset-assert 17)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 12
|
||||
:size-assert #x12
|
||||
:flag-assert #xc00000012
|
||||
(:methods
|
||||
(trail-node-method-9 () none 9)
|
||||
(trail-node-method-10 () none 10)
|
||||
(trail-node-method-11 () none 11)
|
||||
(get-dist-score (_type_ vector) uint 9)
|
||||
(debug-draw (_type_ int) none 10)
|
||||
(get-position (_type_ vector) vector 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -42,30 +61,34 @@
|
||||
|
||||
|
||||
(deftype trail-conn (structure)
|
||||
((head-id uint16 :offset-assert 0)
|
||||
(tail-id uint16 :offset-assert 2)
|
||||
(flags uint8 :offset-assert 4)
|
||||
(visgroup-id uint8 :offset-assert 5)
|
||||
(cost uint16 :offset-assert 6)
|
||||
((head-id uint16 :offset-assert 0)
|
||||
(tail-id uint16 :offset-assert 2)
|
||||
(flags conn-flag :offset-assert 4)
|
||||
(visgroup-id uint8 :offset-assert 5)
|
||||
(cost uint16 :offset-assert 6)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(trail-conn-method-9 () none 9)
|
||||
(debug-draw (_type_ trail-graph int) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype trail-conn-hash-cell (structure)
|
||||
((first-conn uint16 :offset-assert 0)
|
||||
(conn-count uint8 :offset-assert 2)
|
||||
(pad uint8 :offset-assert 3)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
|
||||
(deftype trail-conn-search (structure)
|
||||
((best-conn-id int32 :offset-assert 0)
|
||||
(best-dist float :offset-assert 4)
|
||||
@@ -83,17 +106,19 @@
|
||||
:flag-assert #x9000000d0
|
||||
)
|
||||
|
||||
|
||||
(deftype trail-conn-hash (basic)
|
||||
((cell-width meters :offset-assert 4)
|
||||
(origin vector :inline :offset-assert 16)
|
||||
(cell uint32 :offset-assert 32)
|
||||
(conn-ids uint32 :offset-assert 36)
|
||||
((cell-width meters :offset-assert 4)
|
||||
(origin vector :inline :offset-assert 16)
|
||||
(cell (inline-array trail-conn-hash-cell) :offset-assert 32)
|
||||
(conn-ids (pointer uint16) :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
)
|
||||
|
||||
|
||||
(deftype trail-cached-search-info (structure)
|
||||
((goal-conn-id int16 :offset-assert 0)
|
||||
(orig-goal-pos vector :inline :offset-assert 16)
|
||||
@@ -104,57 +129,55 @@
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
|
||||
(deftype trail-graph (basic)
|
||||
((mode uint8 :offset-assert 4)
|
||||
(search-id uint32 :offset-assert 8)
|
||||
(open-head-id int16 :offset-assert 12)
|
||||
(goal-conn-id int16 :offset-assert 14)
|
||||
(goal-node-id int16 :offset-assert 16)
|
||||
(node-count uint16 :offset-assert 18)
|
||||
(conn-count uint16 :offset-assert 20)
|
||||
(conn-mask uint8 :offset-assert 22)
|
||||
(node uint32 :offset-assert 24)
|
||||
(conn uint32 :offset-assert 28)
|
||||
(conn-ids uint32 :offset-assert 32)
|
||||
(visgroup uint32 :offset-assert 36)
|
||||
(visnode-ids uint32 :offset-assert 40)
|
||||
(conn-hash basic :offset-assert 44)
|
||||
(orig-start-pos vector :inline :offset-assert 48)
|
||||
(orig-goal-pos vector :inline :offset-assert 64)
|
||||
(conn-start-pos vector :inline :offset-assert 80)
|
||||
(conn-goal-pos vector :inline :offset-assert 96)
|
||||
(open-quads qword 6 :inline :offset-assert 112)
|
||||
(closed-quads qword 6 :inline :offset-assert 208)
|
||||
((mode uint8 :offset-assert 4)
|
||||
(search-id uint32 :offset-assert 8)
|
||||
(open-head-id int16 :offset-assert 12)
|
||||
(goal-conn-id int16 :offset-assert 14)
|
||||
(goal-node-id int16 :offset-assert 16)
|
||||
(node-count uint16 :offset-assert 18)
|
||||
(conn-count uint16 :offset-assert 20)
|
||||
(conn-mask uint8 :offset-assert 22)
|
||||
(node (inline-array trail-node) :offset-assert 24)
|
||||
(conn (inline-array trail-conn) :offset-assert 28)
|
||||
(conn-ids (pointer uint16) :offset-assert 32)
|
||||
(visgroup (inline-array trail-conn-hash-cell) :offset-assert 36)
|
||||
(visnode-ids (pointer uint16) :offset-assert 40)
|
||||
(conn-hash trail-conn-hash :offset-assert 44)
|
||||
(orig-start-pos vector :inline :offset-assert 48)
|
||||
(orig-goal-pos vector :inline :offset-assert 64)
|
||||
(conn-start-pos vector :inline :offset-assert 80)
|
||||
(conn-goal-pos vector :inline :offset-assert 96)
|
||||
(open-quads qword 6 :inline :offset-assert 112)
|
||||
(closed-quads qword 6 :inline :offset-assert 208)
|
||||
)
|
||||
:method-count-assert 29
|
||||
:size-assert #x130
|
||||
:flag-assert #x1d00000130
|
||||
(:methods
|
||||
(trail-graph-method-9 () none 9)
|
||||
(trail-graph-method-10 () none 10)
|
||||
(trail-graph-method-11 () none 11)
|
||||
(trail-graph-method-12 () none 12)
|
||||
(trail-graph-method-13 () none 13)
|
||||
(trail-graph-method-14 () none 14)
|
||||
(trail-graph-method-15 () none 15)
|
||||
(trail-graph-method-9 (_type_ int) none 9)
|
||||
(trail-graph-method-10 (_type_ int) none 10)
|
||||
(trail-graph-method-11 (_type_ int int) trail-node 11)
|
||||
(debug-draw (_type_) none 12)
|
||||
(debug-draw-cell (_type_ int) none 13)
|
||||
(debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol 14)
|
||||
(do-path (_type_ vector vector) int 15)
|
||||
(trail-graph-method-16 () none 16)
|
||||
(trail-graph-method-17 () none 17)
|
||||
(trail-graph-method-18 () none 18)
|
||||
(trail-graph-method-19 () none 19)
|
||||
(trail-graph-method-20 () none 20)
|
||||
(trail-graph-method-21 () none 21)
|
||||
(trail-graph-method-22 () none 22)
|
||||
(trail-graph-method-23 () none 23)
|
||||
(trail-graph-method-24 () none 24)
|
||||
(trail-graph-method-25 () none 25)
|
||||
(trail-graph-method-26 () none 26)
|
||||
(trail-graph-method-27 () none 27)
|
||||
(trail-graph-method-28 () none 28)
|
||||
(get-node-location-by-id (_type_ uint vector) vector 17)
|
||||
(get-path-to-root (_type_ (pointer uint16) int (pointer int32) (pointer float)) int 18)
|
||||
(trail-graph-method-19 (_type_ int int) symbol 19)
|
||||
(try-initialize (_type_) symbol 20)
|
||||
(update-node-flags-for-conn (_type_ int trail-node-flag trail-node-flag) none 21)
|
||||
(trail-graph-method-22 (_type_ int) none 22)
|
||||
(reset-search-state (_type_) none 23)
|
||||
(get-next-to-explore (_type_) int 24)
|
||||
(trail-graph-method-25 (_type_ trail-conn-search int int) none 25)
|
||||
(do-search! (_type_ vector vector trail-cached-search-info) none 26)
|
||||
(do-some-work (_type_) int 27)
|
||||
(run-until-done-or-timeout (_type_ int) none 28)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(define *trail-graph* (the-as trail-graph #f))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -7,3 +7,899 @@
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw trail-conn ((obj trail-conn) (arg0 trail-graph) (arg1 int))
|
||||
(let ((a2-3 (-> arg0 node (-> obj head-id)))
|
||||
(v1-2 (-> arg0 node (-> obj tail-id)))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set-vector! s4-0 (* 4096.0 (the float (-> a2-3 x))) 53248.0 (* 4096.0 (the float (-> a2-3 z))) 1.0)
|
||||
(set-vector! s3-0 (* 4096.0 (the float (-> v1-2 x))) 53248.0 (* 4096.0 (the float (-> v1-2 z))) 1.0)
|
||||
(vector-lerp! s5-0 s4-0 s3-0 0.5)
|
||||
(let* ((s2-0 (math-camera-pos))
|
||||
(f0-12 (vector-vector-distance-squared s4-0 s2-0))
|
||||
(f1-8 819200.0)
|
||||
)
|
||||
(when (or (< f0-12 (* f1-8 f1-8))
|
||||
(let ((f0-13 (vector-vector-distance-squared s3-0 s2-0))
|
||||
(f1-11 819200.0)
|
||||
)
|
||||
(< f0-13 (* f1-11 f1-11))
|
||||
)
|
||||
(let ((f0-14 (vector-vector-distance-squared s5-0 s2-0))
|
||||
(f1-14 819200.0)
|
||||
)
|
||||
(< f0-14 (* f1-14 f1-14))
|
||||
)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug2) s4-0 s3-0 *color-orange* #f (the-as rgba -1))
|
||||
(let ((s4-1 add-debug-text-3d)
|
||||
(s3-1 #t)
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg1)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow-#f3f300) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw trail-node ((obj trail-node) (arg0 int))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'sphere))
|
||||
)
|
||||
(set-vector! s5-0 (* 4096.0 (the float (-> obj x))) 53248.0 (* 4096.0 (the float (-> obj z))) 1.0)
|
||||
(set! (-> s4-0 quad) (-> s5-0 quad))
|
||||
(set! (-> s4-0 r) 4096.0)
|
||||
(let ((f0-7 (vector-vector-distance-squared s5-0 (math-camera-pos)))
|
||||
(f1-4 819200.0)
|
||||
)
|
||||
(when (and (< f0-7 (* f1-4 f1-4)) (sphere-in-view-frustum? s4-0))
|
||||
(add-debug-x #t (bucket-id debug2) s5-0 *color-red*)
|
||||
(let ((s4-1 add-debug-text-3d)
|
||||
(s3-1 #t)
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg0)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan-#00fefe) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw-cell trail-graph ((obj trail-graph) (arg0 int))
|
||||
(local-vars (sv-80 int) (sv-96 (function _varargs_ object)))
|
||||
(let* ((s5-0 (-> obj conn-hash))
|
||||
(s4-0 (-> s5-0 cell arg0))
|
||||
(s3-0 (new 'stack-no-clear 'inline-array 'vector 2))
|
||||
)
|
||||
(set-vector!
|
||||
(-> s3-0 0)
|
||||
(+ (* (-> s5-0 cell-width) (the float (logand arg0 15))) (-> s5-0 origin x))
|
||||
53248.0
|
||||
(+ (* (-> s5-0 cell-width) (the float (/ arg0 16))) (-> s5-0 origin z))
|
||||
1.0
|
||||
)
|
||||
(set! (-> s3-0 1 quad) (-> s3-0 0 quad))
|
||||
(+! (-> s3-0 1 x) (-> s5-0 cell-width))
|
||||
(set! (-> s3-0 2 quad) (-> s3-0 1 quad))
|
||||
(+! (-> s3-0 2 z) (-> s5-0 cell-width))
|
||||
(set! (-> s3-0 3 quad) (-> s3-0 2 quad))
|
||||
(set! (-> s3-0 3 x) (- (-> s3-0 3 x) (-> s5-0 cell-width)))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 1) (-> s3-0 2) *color-white* #f (the-as rgba -1))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 2) (-> s3-0 3) *color-white* #f (the-as rgba -1))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 3) (-> s3-0 0) *color-white* #f (the-as rgba -1))
|
||||
(set-vector!
|
||||
(-> s3-0 3)
|
||||
(* 0.5 (+ (-> s3-0 0 x) (-> s3-0 2 x)))
|
||||
(-> s3-0 0 y)
|
||||
(* 0.5 (+ (-> s3-0 0 z) (-> s3-0 2 z)))
|
||||
1.0
|
||||
)
|
||||
(let ((s1-0 add-debug-text-3d)
|
||||
(s0-0 #t)
|
||||
)
|
||||
(set! sv-80 324)
|
||||
(set! sv-96 format)
|
||||
(let ((a0-20 (clear *temp-string*))
|
||||
(a1-5 "cell ~D (~D,~D)")
|
||||
(a2-4 arg0)
|
||||
(a3-4 (logand arg0 15))
|
||||
(t0-4 (/ arg0 16))
|
||||
)
|
||||
(sv-96 a0-20 a1-5 a2-4 a3-4 t0-4)
|
||||
)
|
||||
(let ((a2-5 *temp-string*)
|
||||
(a3-5 (-> s3-0 3))
|
||||
(t0-5 1)
|
||||
(t1-4 #f)
|
||||
)
|
||||
(s1-0 s0-0 (the-as bucket-id sv-80) a2-5 a3-5 (the-as font-color t0-5) (the-as vector2h t1-4))
|
||||
)
|
||||
)
|
||||
(countdown (s2-1 (-> s4-0 conn-count))
|
||||
(let ((s1-1 (-> obj conn (-> s5-0 conn-ids (+ s2-1 (-> s4-0 first-conn))))))
|
||||
(get-position (-> obj node (-> s1-1 head-id)) (-> s3-0 0))
|
||||
(set! (-> s3-0 0 y) 53248.0)
|
||||
(set! (-> s3-0 0 x) (+ -2048.0 (-> s3-0 0 x)))
|
||||
(set! (-> s3-0 0 z) (+ -2048.0 (-> s3-0 0 z)))
|
||||
(get-position (-> obj node (-> s1-1 tail-id)) (-> s3-0 1))
|
||||
)
|
||||
(set! (-> s3-0 1 y) 53248.0)
|
||||
(set! (-> s3-0 1 x) (+ -2048.0 (-> s3-0 1 x)))
|
||||
(set! (-> s3-0 1 z) (+ -2048.0 (-> s3-0 1 z)))
|
||||
(add-debug-line #t (bucket-id debug2) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod debug-draw-path trail-graph ((obj trail-graph) (arg0 int) (arg1 (pointer uint16)) (arg2 vector) (arg3 vector) (arg4 rgba) (arg5 float))
|
||||
(local-vars (sv-48 int))
|
||||
(let ((s0-0 (new 'stack-no-clear 'inline-array 'vector 2)))
|
||||
(set-vector! (-> s0-0 1) (+ (-> arg2 x) arg5) 53248.0 (+ (-> arg2 z) arg5) 1.0)
|
||||
(set! sv-48 0)
|
||||
(until #f
|
||||
(set! (-> s0-0 0 quad) (-> s0-0 1 quad))
|
||||
(cond
|
||||
((< sv-48 arg0)
|
||||
(let ((a0-7 (-> obj node (-> arg1 sv-48))))
|
||||
(set-vector!
|
||||
(-> s0-0 1)
|
||||
(+ (* 4096.0 (the float (-> a0-7 x))) arg5)
|
||||
53248.0
|
||||
(+ (* 4096.0 (the float (-> a0-7 z))) arg5)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= sv-48 arg0)
|
||||
(set-vector! (-> s0-0 1) (+ (-> arg3 x) arg5) 53248.0 (+ (-> arg3 z) arg5) 1.0)
|
||||
)
|
||||
(else
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug2) (-> s0-0 0) (-> s0-0 1) arg4 #f (the-as rgba -1))
|
||||
(set! sv-48 (+ sv-48 1))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod debug-draw trail-graph ((obj trail-graph))
|
||||
(when (= (-> obj mode) 3)
|
||||
(let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 2)))
|
||||
(set! (-> s5-0 1 quad) (-> obj orig-goal-pos quad))
|
||||
(set! (-> s5-0 1 y) 53248.0)
|
||||
(let ((v1-4 (-> obj goal-node-id)))
|
||||
(until #f
|
||||
(set! (-> s5-0 0 quad) (-> s5-0 1 quad))
|
||||
(cond
|
||||
((>= v1-4 0)
|
||||
(let ((s4-0 (-> obj node v1-4)))
|
||||
(set-vector!
|
||||
(-> s5-0 1)
|
||||
(+ 2048.0 (* 4096.0 (the float (-> s4-0 x))))
|
||||
53248.0
|
||||
(+ 2048.0 (* 4096.0 (the float (-> s4-0 z))))
|
||||
1.0
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug2) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1))
|
||||
(set! v1-4 (-> s4-0 parent-id))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> s5-0 1 quad) (-> obj orig-start-pos quad))
|
||||
(set! (-> s5-0 1 y) 53248.0)
|
||||
(add-debug-line #t (bucket-id debug2) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1))
|
||||
(goto cfg-7)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(label cfg-7)
|
||||
(case (-> obj mode)
|
||||
((1 2 3)
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj orig-start-pos)
|
||||
(meters 1)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(set! (-> s5-1 quad) (-> obj conn-start-pos quad))
|
||||
(set! (-> s5-1 y) 53248.0)
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :r #xff :a #x80))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj orig-goal-pos)
|
||||
(meters 1)
|
||||
(new 'static 'rgba :g #xff :a #x80)
|
||||
)
|
||||
(set! (-> s5-1 quad) (-> obj conn-goal-pos quad))
|
||||
(set! (-> s5-1 y) 53248.0)
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :g #xff :a #x80))
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-2 (the-as int (-> obj conn-count)))
|
||||
(debug-draw (-> obj conn s5-2) obj s5-2)
|
||||
)
|
||||
(dotimes (s5-3 (the-as int (-> obj node-count)))
|
||||
(debug-draw (-> obj node s5-3) s5-3)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-position trail-node ((obj trail-node) (arg0 vector))
|
||||
"Unpack the position to a vector"
|
||||
(let ((v0-0 arg0))
|
||||
(set! (-> v0-0 x) (* 4096.0 (the float (-> obj x))))
|
||||
(set! (-> v0-0 y) 0.0)
|
||||
(set! (-> v0-0 z) (* 4096.0 (the float (-> obj z))))
|
||||
(set! (-> v0-0 w) 1.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod get-node-location-by-id trail-graph ((obj trail-graph) (arg0 uint) (arg1 vector))
|
||||
"Get the location of the node with the given ID"
|
||||
(get-position (-> obj node (the-as int arg0)) arg1)
|
||||
)
|
||||
|
||||
(defmethod get-path-to-root trail-graph ((obj trail-graph) (arg0 (pointer uint16)) (arg1 int) (arg2 (pointer int32)) (arg3 (pointer float)))
|
||||
"Get the path from goal to root, following parent-id"
|
||||
(set! (-> arg3 0) 0.0)
|
||||
(set! (-> arg2 0) (-> obj goal-node-id))
|
||||
(let ((v0-0 -1))
|
||||
(when (= (-> obj mode) 3)
|
||||
(let ((v1-3 (-> obj node))
|
||||
(a3-2 0)
|
||||
)
|
||||
(let ((t1-0 (-> obj goal-node-id)))
|
||||
(while (>= t1-0 0)
|
||||
(+! a3-2 1)
|
||||
(set! t1-0 (-> v1-3 t1-0 parent-id))
|
||||
)
|
||||
)
|
||||
(let ((t1-4 (-> obj goal-node-id)))
|
||||
(let ((t2-1 (- a3-2 arg1)))
|
||||
(cond
|
||||
((> t2-1 0)
|
||||
(while (> t2-1 0)
|
||||
(set! t1-4 (-> v1-3 t1-4 parent-id))
|
||||
(+! t2-1 -1)
|
||||
)
|
||||
(set! v0-0 arg1)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 a3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(countdown (a2-3 v0-0)
|
||||
(set! (-> arg0 a2-3) (the-as uint t1-4))
|
||||
(set! t1-4 (-> v1-3 t1-4 parent-id))
|
||||
)
|
||||
)
|
||||
(when (> a3-2 0)
|
||||
(let ((a0-3 (-> v1-3 (-> obj goal-node-id)))
|
||||
(v1-4 (-> v1-3 (-> arg0 0)))
|
||||
)
|
||||
(set! (-> arg3 0)
|
||||
(- (* 512.0 (the float (-> a0-3 cost-from-start))) (* 512.0 (the float (-> v1-4 cost-from-start))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod try-initialize trail-graph ((obj trail-graph))
|
||||
"Init and verify that constants are good."
|
||||
(let ((a3-0 (shr (+ (-> obj node-count) 127) 7)))
|
||||
(when (!= a3-0 6)
|
||||
(format 0 "ERROR: <SW> TRAIL_NODE_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 6 a3-0)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(let ((a3-1 (shr (+ (-> obj conn-count) 127) 7)))
|
||||
(when (!= a3-1 7)
|
||||
(format 0 "ERROR: <SW> TRAIL_CONN_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 7 a3-1)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(set! (-> obj mode) (the-as uint 0))
|
||||
(set! (-> obj goal-conn-id) -1)
|
||||
(set! (-> obj goal-node-id) -1)
|
||||
(set! (-> obj open-head-id) -1)
|
||||
#t
|
||||
)
|
||||
|
||||
(defmethod reset-search-state trail-graph ((obj trail-graph))
|
||||
"Reset the search/goal."
|
||||
(when (nonzero? (-> obj mode))
|
||||
(set! (-> obj goal-node-id) -1)
|
||||
(let ((a1-0 (-> obj goal-conn-id)))
|
||||
(when (>= a1-0 0)
|
||||
(update-node-flags-for-conn obj a1-0 (trail-node-flag) (trail-node-flag tnf0))
|
||||
(set! (-> obj goal-conn-id) -1)
|
||||
)
|
||||
)
|
||||
(set! (-> obj open-head-id) -1)
|
||||
(let ((v1-7 (-> obj open-quads)))
|
||||
(set! (-> v1-7 0 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 1 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 2 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 3 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 4 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 5 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(let ((v1-9 (-> obj closed-quads)))
|
||||
(set! (-> v1-9 0 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 1 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 2 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 3 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 4 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 5 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(set! (-> obj mode) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch trail-node-flag vs none.
|
||||
(defmethod update-node-flags-for-conn trail-graph ((obj trail-graph) (arg0 int) (arg1 trail-node-flag) (arg2 trail-node-flag))
|
||||
"Set arg1, clear arg2"
|
||||
(let* ((v1-0 (lognot arg2))
|
||||
(a3-2 (-> obj conn arg0))
|
||||
(t0-0 (-> a3-2 visgroup-id))
|
||||
(a1-2 (-> obj node))
|
||||
)
|
||||
(cond
|
||||
((> t0-0 0)
|
||||
(let* ((a3-4 (-> obj visgroup (+ t0-0 -1)))
|
||||
(a0-2 (&-> (-> obj visnode-ids) (-> a3-4 first-conn)))
|
||||
)
|
||||
(countdown (a3-5 (-> a3-4 conn-count))
|
||||
(let ((t0-8 (-> a1-2 (-> a0-2 0))))
|
||||
(set! (-> t0-8 flags) (logior (logand (-> t0-8 flags) v1-0) arg1))
|
||||
)
|
||||
(set! a0-2 (&-> a0-2 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a0-5 (-> a1-2 (-> a3-2 head-id)))
|
||||
(a1-3 (-> a1-2 (-> a3-2 tail-id)))
|
||||
)
|
||||
(set! (-> a0-5 flags) (logior (logand (-> a0-5 flags) v1-0) arg1))
|
||||
(set! (-> a1-3 flags) (logior (logand (-> a1-3 flags) v1-0) arg1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod trail-graph-method-25 trail-graph ((obj trail-graph) (arg0 trail-conn-search) (arg1 int) (arg2 int))
|
||||
(let* ((v1-1 (+ (* arg2 16) arg1))
|
||||
(a0-1 (/ v1-1 8))
|
||||
(a1-2 (ash 1 (logand v1-1 7)))
|
||||
(a2-4 (-> arg0 cell-quads 0 byte a0-1))
|
||||
)
|
||||
(when (not (logtest? a2-4 a1-2))
|
||||
(set! (-> arg0 cell-quads 0 byte a0-1) (logior a2-4 a1-2))
|
||||
(let* ((v1-3 (-> obj conn-hash cell v1-1))
|
||||
(s4-0 (&-> (-> obj conn-hash conn-ids) (-> v1-3 first-conn)))
|
||||
)
|
||||
(countdown (s3-0 (-> v1-3 conn-count))
|
||||
(let* ((s2-0 (-> s4-0 0))
|
||||
(v1-4 (shr s2-0 3))
|
||||
(a1-7 (ash 1 (logand s2-0 7)))
|
||||
(a2-5 (-> arg0 conn-quads 0 byte v1-4))
|
||||
)
|
||||
(when (not (logtest? a2-5 a1-7))
|
||||
(set! (-> arg0 conn-quads 0 byte v1-4) (logior a2-5 a1-7))
|
||||
(let* ((v1-7 (-> obj conn s2-0))
|
||||
(a0-14 (-> v1-7 flags))
|
||||
)
|
||||
(when (= (logand (the-as conn-flag (-> obj conn-mask)) a0-14) a0-14)
|
||||
(let ((a3-2 (-> obj node (-> v1-7 head-id)))
|
||||
(v1-10 (-> obj node (-> v1-7 tail-id)))
|
||||
(a1-14 (new 'stack-no-clear 'vector))
|
||||
(a2-7 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set-vector!
|
||||
a1-14
|
||||
(* 4096.0 (the float (-> a3-2 x)))
|
||||
(-> arg0 src-pos y)
|
||||
(* 4096.0 (the float (-> a3-2 z)))
|
||||
1.0
|
||||
)
|
||||
(set-vector!
|
||||
a2-7
|
||||
(* 4096.0 (the float (-> v1-10 x)))
|
||||
(-> arg0 src-pos y)
|
||||
(* 4096.0 (the float (-> v1-10 z)))
|
||||
1.0
|
||||
)
|
||||
(let ((f0-12 (vector-segment-distance-point! (-> arg0 src-pos) a1-14 a2-7 s1-0)))
|
||||
(when (or (< (-> arg0 best-conn-id) 0) (< f0-12 (-> arg0 best-dist)))
|
||||
(set! (-> arg0 best-dist) f0-12)
|
||||
(set! (-> arg0 best-conn-id) (the-as int s2-0))
|
||||
(set! (-> arg0 conn-pos quad) (-> s1-0 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s4-0 (&-> s4-0 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod do-path trail-graph ((obj trail-graph) (arg0 vector) (arg1 vector))
|
||||
(let ((v1-0 (-> obj conn-hash))
|
||||
(s5-0 (new 'stack-no-clear 'trail-conn-search))
|
||||
)
|
||||
(set! (-> s5-0 src-pos) arg0)
|
||||
(set! (-> s5-0 conn-pos) arg1)
|
||||
(set! (-> s5-0 best-conn-id) -1)
|
||||
(let ((a0-2 (-> s5-0 conn-quads)))
|
||||
(set! (-> a0-2 0 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 1 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 2 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 3 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 4 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 5 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 6 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(let ((a0-4 (-> s5-0 cell-quads)))
|
||||
(set! (-> a0-4 0 quad) (the-as uint128 0))
|
||||
(set! (-> a0-4 1 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(let* ((f0-0 (-> v1-0 cell-width))
|
||||
(f1-1 (* 0.5 f0-0))
|
||||
)
|
||||
(let ((f3-0 (- (-> arg0 x) f1-1))
|
||||
(f2-2 (- (-> arg0 z) f1-1))
|
||||
)
|
||||
(set! (-> s5-0 bounds min x) (max 0 (min 15 (the int (/ (- f3-0 (-> v1-0 origin x)) f0-0)))))
|
||||
(set! (-> s5-0 bounds min z) (max 0 (min 15 (the int (/ (- f2-2 (-> v1-0 origin z)) f0-0)))))
|
||||
)
|
||||
(let ((f2-7 (+ (-> arg0 x) f1-1))
|
||||
(f1-2 (+ (-> arg0 z) f1-1))
|
||||
)
|
||||
(set! (-> s5-0 bounds max x) (max 0 (min 15 (the int (/ (- f2-7 (-> v1-0 origin x)) f0-0)))))
|
||||
(set! (-> s5-0 bounds max z) (max 0 (min 15 (the int (/ (- f1-2 (-> v1-0 origin z)) f0-0)))))
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (-> s5-0 bounds min z)))
|
||||
(until (< (-> s5-0 bounds max z) s3-0)
|
||||
(let ((s2-0 (-> s5-0 bounds min x)))
|
||||
(until (< (-> s5-0 bounds max x) s2-0)
|
||||
(trail-graph-method-25 obj s5-0 s2-0 s3-0)
|
||||
(+! s2-0 1)
|
||||
)
|
||||
)
|
||||
(+! s3-0 1)
|
||||
)
|
||||
)
|
||||
(while (< (-> s5-0 best-conn-id) 0)
|
||||
(let ((v1-8 15))
|
||||
(set! (-> s5-0 bounds min x) (max 0 (+ (-> s5-0 bounds min x) -1)))
|
||||
(set! (-> s5-0 bounds min z) (max 0 (+ (-> s5-0 bounds min z) -1)))
|
||||
(set! (-> s5-0 bounds max x) (min (+ (-> s5-0 bounds max x) 1) v1-8))
|
||||
(set! (-> s5-0 bounds max z) (min (+ (-> s5-0 bounds max z) 1) v1-8))
|
||||
)
|
||||
(let ((s3-1 (-> s5-0 bounds min x)))
|
||||
(until (< (-> s5-0 bounds max x) s3-1)
|
||||
(trail-graph-method-25 obj s5-0 s3-1 (-> s5-0 bounds min z))
|
||||
(trail-graph-method-25 obj s5-0 s3-1 (-> s5-0 bounds max z))
|
||||
(+! s3-1 1)
|
||||
)
|
||||
)
|
||||
(let ((s3-2 (-> s5-0 bounds min z)))
|
||||
(until (< (-> s5-0 bounds max z) s3-2)
|
||||
(trail-graph-method-25 obj s5-0 (-> s5-0 bounds min x) s3-2)
|
||||
(trail-graph-method-25 obj s5-0 (-> s5-0 bounds max x) s3-2)
|
||||
(+! s3-2 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 y) 0.0)
|
||||
(-> s5-0 best-conn-id)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod trail-graph-method-9 trail-graph ((obj trail-graph) (arg0 int))
|
||||
(let ((s4-0 (-> obj node arg0)))
|
||||
(set! (-> s4-0 cost-from-start) (get-dist-score s4-0 (-> obj orig-start-pos)))
|
||||
(set! (-> s4-0 cost-to-goal) (get-dist-score s4-0 (-> obj orig-goal-pos)))
|
||||
)
|
||||
(trail-graph-method-11 obj arg0 -1)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod trail-graph-method-10 trail-graph ((obj trail-graph) (arg0 int))
|
||||
(let* ((s5-0 (-> obj conn arg0))
|
||||
(v1-1 (-> s5-0 visgroup-id))
|
||||
)
|
||||
(cond
|
||||
((> v1-1 0)
|
||||
(let* ((v1-4 (-> obj visgroup (+ v1-1 -1)))
|
||||
(s5-1 (&-> (-> obj visnode-ids) (-> v1-4 first-conn)))
|
||||
(s4-0 (-> v1-4 conn-count))
|
||||
)
|
||||
(-> obj visnode-ids)
|
||||
(while (nonzero? s4-0)
|
||||
(+! s4-0 -1)
|
||||
(trail-graph-method-9 obj (the-as int (-> s5-1 0)))
|
||||
(set! s5-1 (&-> s5-1 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(trail-graph-method-9 obj (the-as int (-> s5-0 head-id)))
|
||||
(trail-graph-method-9 obj (the-as int (-> s5-0 tail-id)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod trail-graph-method-11 trail-graph ((obj trail-graph) (arg0 int) (arg1 int))
|
||||
(let ((v1-0 (/ arg0 8))
|
||||
(a3-1 (ash 1 (logand arg0 7)))
|
||||
)
|
||||
(logior! (-> obj open-quads 0 byte v1-0) a3-1)
|
||||
)
|
||||
(let* ((v1-2 (-> obj node))
|
||||
(v0-0 (-> v1-2 arg0))
|
||||
)
|
||||
(set! (-> v0-0 parent-id) arg1)
|
||||
(let ((a3-6 (+ (-> v0-0 cost-from-start) (-> v0-0 cost-to-goal)))
|
||||
(t0-4 (-> obj open-head-id))
|
||||
(a2-2 -1)
|
||||
)
|
||||
(until #f
|
||||
(when (< t0-4 0)
|
||||
(set! (-> v0-0 next-id) -1)
|
||||
(set! (-> v0-0 prev-id) a2-2)
|
||||
(if (>= a2-2 0)
|
||||
(set! (-> v1-2 a2-2 next-id) arg0)
|
||||
(set! (-> obj open-head-id) arg0)
|
||||
)
|
||||
(return v0-0)
|
||||
)
|
||||
(let ((t1-4 (-> v1-2 t0-4)))
|
||||
(when (>= (+ (-> t1-4 cost-from-start) (-> t1-4 cost-to-goal)) a3-6)
|
||||
(set! (-> v0-0 next-id) t0-4)
|
||||
(set! (-> v0-0 prev-id) a2-2)
|
||||
(set! (-> t1-4 prev-id) arg0)
|
||||
(if (>= a2-2 0)
|
||||
(set! (-> v1-2 a2-2 next-id) arg0)
|
||||
(set! (-> obj open-head-id) arg0)
|
||||
)
|
||||
(return v0-0)
|
||||
)
|
||||
(set! a2-2 t0-4)
|
||||
(set! t0-4 (-> t1-4 next-id))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod trail-graph-method-22 trail-graph ((obj trail-graph) (arg0 int))
|
||||
(let ((v1-0 (/ arg0 8))
|
||||
(a2-1 (ash 1 (logand arg0 7)))
|
||||
)
|
||||
(logior! (-> obj open-quads 0 byte v1-0) a2-1)
|
||||
)
|
||||
(let* ((v1-2 (-> obj node))
|
||||
(a2-4 (-> v1-2 arg0))
|
||||
(a1-2 (-> a2-4 prev-id))
|
||||
(a2-5 (-> a2-4 next-id))
|
||||
)
|
||||
(cond
|
||||
((>= a1-2 0)
|
||||
(set! (-> v1-2 a1-2 next-id) a2-5)
|
||||
(if (>= a2-5 0)
|
||||
(set! (-> v1-2 a2-5 prev-id) a1-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj open-head-id) a2-5)
|
||||
(if (>= a2-5 0)
|
||||
(set! (-> v1-2 a2-5 prev-id) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod get-next-to-explore trail-graph ((obj trail-graph))
|
||||
(let ((v0-0 (-> obj open-head-id)))
|
||||
(when (>= v0-0 0)
|
||||
(let* ((v1-1 (-> obj node))
|
||||
(a2-0 (-> v1-1 v0-0 next-id))
|
||||
)
|
||||
(set! (-> obj open-head-id) a2-0)
|
||||
(if (>= a2-0 0)
|
||||
(set! (-> v1-1 a2-0 prev-id) -1)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (/ v0-0 8))
|
||||
(a1-6 (ash 1 (logand v0-0 7)))
|
||||
)
|
||||
(logior! (-> obj closed-quads 0 byte v1-3) a1-6)
|
||||
(logxor! (-> obj open-quads 0 byte v1-3) (the-as uint a1-6))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs uint.
|
||||
(defmethod get-dist-score trail-node ((obj trail-node) (arg0 vector))
|
||||
(let* ((f0-1 (- (-> arg0 x) (* 4096.0 (the float (-> obj x)))))
|
||||
(f1-3 (- (-> arg0 z) (* 4096.0 (the float (-> obj z)))))
|
||||
(f0-4 (sqrtf (+ (* f0-1 f0-1) (* f1-3 f1-3))))
|
||||
)
|
||||
(the uint (fmin 65535.0 (* 0.00024414062 (* 8.0 f0-4))))
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod do-some-work trail-graph ((obj trail-graph))
|
||||
(let ((s5-0 (get-next-to-explore obj)))
|
||||
(if (< s5-0 0)
|
||||
(return 2)
|
||||
)
|
||||
(let ((s4-0 (-> obj node s5-0)))
|
||||
(when (logtest? (-> s4-0 flags) (trail-node-flag tnf0))
|
||||
(set! (-> obj goal-node-id) s5-0)
|
||||
(return 3)
|
||||
)
|
||||
(let ((s3-0 (&-> (-> obj conn-ids) (-> s4-0 first-conn))))
|
||||
(countdown (s2-0 (-> s4-0 conn-count))
|
||||
(let* ((a0-7 (-> obj conn (-> s3-0 0)))
|
||||
(v1-12 (-> a0-7 flags))
|
||||
)
|
||||
(when (= (logand (the-as conn-flag (-> obj conn-mask)) v1-12) v1-12)
|
||||
(let ((s1-0 (-> a0-7 tail-id)))
|
||||
(if (= s1-0 s5-0)
|
||||
(set! s1-0 (-> a0-7 head-id))
|
||||
)
|
||||
(let ((s0-0 (-> obj node s1-0))
|
||||
(v1-17 (min #xffff (the-as int (+ (-> a0-7 cost) (-> s4-0 cost-from-start)))))
|
||||
(a0-10 (shr s1-0 3))
|
||||
(a1-7 (ash 1 (logand s1-0 7)))
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> obj open-quads 0 byte a0-10) a1-7)
|
||||
(when (< (the-as uint v1-17) (-> s0-0 cost-from-start))
|
||||
(set! (-> s0-0 cost-from-start) (the-as uint v1-17))
|
||||
(trail-graph-method-22 obj (the-as int s1-0))
|
||||
(trail-graph-method-11 obj (the-as int s1-0) s5-0)
|
||||
)
|
||||
)
|
||||
((not (logtest? (-> obj closed-quads 0 byte a0-10) a1-7))
|
||||
(set! (-> s0-0 cost-from-start) (the-as uint v1-17))
|
||||
(set! (-> s0-0 cost-to-goal) (get-dist-score s0-0 (-> obj orig-goal-pos)))
|
||||
(trail-graph-method-11 obj (the-as int s1-0) s5-0)
|
||||
)
|
||||
((< (the-as uint v1-17) (-> s0-0 cost-from-start))
|
||||
(set! (-> s0-0 cost-from-start) (the-as uint v1-17))
|
||||
(trail-graph-method-11 obj (the-as int s1-0) s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s3-0 (&-> s3-0 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
1
|
||||
)
|
||||
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
(defmethod run-until-done-or-timeout trail-graph ((obj trail-graph) (arg0 int))
|
||||
(local-vars (v1-1 int))
|
||||
(let ((v0-0 (the-as int (-> obj mode))))
|
||||
0
|
||||
(.mfc0 v1-1 Count)
|
||||
(while (and (= v0-0 1) (< (the-as uint v1-1) (the-as uint arg0)))
|
||||
(set! v0-0 (do-some-work obj))
|
||||
(.mfc0 v1-1 Count)
|
||||
)
|
||||
(set! (-> obj mode) (the-as uint v0-0))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(deftype trail-vis-work (structure)
|
||||
((best-count uint32 :offset-assert 0)
|
||||
(best-dist float :offset-assert 4)
|
||||
(start-conn-id uint32 :offset-assert 8)
|
||||
(p0 vector :inline :offset-assert 16)
|
||||
(p1 vector :inline :offset-assert 32)
|
||||
(best-node-id uint16 64 :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xb0
|
||||
:flag-assert #x9000000b0
|
||||
)
|
||||
|
||||
|
||||
(defmethod trail-graph-method-19 trail-graph ((obj trail-graph) (arg0 int) (arg1 int))
|
||||
(local-vars (s4-1 symbol))
|
||||
(let* ((s4-0 (-> obj node))
|
||||
(v1-2 (-> s4-0 arg1))
|
||||
(s5-0 (new 'stack-no-clear 'trail-vis-work))
|
||||
)
|
||||
(set! (-> s5-0 start-conn-id) (the-as uint arg0))
|
||||
(set-vector!
|
||||
(-> s5-0 p0)
|
||||
(* 4096.0 (the float (-> v1-2 x)))
|
||||
(-> obj orig-goal-pos y)
|
||||
(* 4096.0 (the float (-> v1-2 z)))
|
||||
1.0
|
||||
)
|
||||
(set! (-> s5-0 p1 quad) (-> s5-0 p0 quad))
|
||||
(set! (-> s5-0 best-count) (the-as uint 0))
|
||||
(set! (-> s5-0 best-dist) -1.0)
|
||||
(let ((s2-0 (&-> (-> obj conn-ids) (-> v1-2 first-conn))))
|
||||
(countdown (s1-0 (-> v1-2 conn-count))
|
||||
(let* ((v1-4 (-> obj conn (-> s2-0 0)))
|
||||
(s0-0 (-> v1-4 tail-id))
|
||||
)
|
||||
(if (= s0-0 arg1)
|
||||
(set! s0-0 (-> v1-4 head-id))
|
||||
)
|
||||
(let ((v1-8 (-> s4-0 s0-0)))
|
||||
(set! (-> s5-0 p1 x) (* 4096.0 (the float (-> v1-8 x))))
|
||||
(set! (-> s5-0 p1 z) (* 4096.0 (the float (-> v1-8 z))))
|
||||
)
|
||||
(let ((f0-11 (vector-segment-distance-point! (-> obj orig-goal-pos) (-> s5-0 p0) (-> s5-0 p1) (the-as vector #f)))
|
||||
(f1-8 (-> s5-0 best-dist))
|
||||
)
|
||||
(cond
|
||||
((or (< f1-8 0.0) (< f0-11 f1-8))
|
||||
(set! (-> s5-0 best-dist) f0-11)
|
||||
(set! (-> s5-0 best-count) (the-as uint 1))
|
||||
(set! (-> s5-0 best-node-id 0) s0-0)
|
||||
)
|
||||
((= f0-11 f1-8)
|
||||
(let ((v1-15 (-> s5-0 best-count)))
|
||||
(when (< v1-15 (the-as uint 64))
|
||||
(set! (-> s5-0 best-node-id v1-15) s0-0)
|
||||
(set! (-> s5-0 best-count) (+ v1-15 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s2-0 (&-> s2-0 1))
|
||||
)
|
||||
)
|
||||
(update-node-flags-for-conn obj (the-as int (-> s5-0 start-conn-id)) (trail-node-flag tnf1) (trail-node-flag))
|
||||
(countdown (v1-20 (-> s5-0 best-count))
|
||||
(let ((a1-14 (-> s4-0 (-> s5-0 best-node-id v1-20))))
|
||||
(when (= (logand (-> a1-14 flags) (trail-node-flag tnf0 tnf1)) (trail-node-flag tnf0 tnf1))
|
||||
(set! s4-1 #t)
|
||||
(goto cfg-22)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s4-1 #f)
|
||||
(label cfg-22)
|
||||
(update-node-flags-for-conn obj (the-as int (-> s5-0 start-conn-id)) (trail-node-flag) (trail-node-flag tnf1))
|
||||
)
|
||||
s4-1
|
||||
)
|
||||
|
||||
(defmethod do-search! trail-graph ((obj trail-graph) (arg0 vector) (arg1 vector) (arg2 trail-cached-search-info))
|
||||
(reset-search-state obj)
|
||||
(+! (-> obj search-id) 1)
|
||||
(set! (-> obj orig-start-pos quad) (-> arg0 quad))
|
||||
(let ((a1-1 -1))
|
||||
(when arg2
|
||||
(let ((v1-6 (-> arg2 goal-conn-id)))
|
||||
(when (and (>= v1-6 0)
|
||||
(= (-> arg2 orig-goal-pos x) (-> arg1 x))
|
||||
(= (-> arg2 orig-goal-pos y) (-> arg1 y))
|
||||
(= (-> arg2 orig-goal-pos z) (-> arg1 z))
|
||||
)
|
||||
(set! a1-1 v1-6)
|
||||
(set! (-> obj conn-goal-pos quad) (-> arg2 conn-goal-pos quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj orig-goal-pos quad) (-> arg1 quad))
|
||||
(when (< a1-1 0)
|
||||
(set! a1-1 (do-path obj (-> obj orig-goal-pos) (-> obj conn-goal-pos)))
|
||||
(when arg2
|
||||
(set! (-> arg2 goal-conn-id) a1-1)
|
||||
(set! (-> arg2 orig-goal-pos quad) (-> obj orig-goal-pos quad))
|
||||
(set! (-> arg2 conn-goal-pos quad) (-> obj conn-goal-pos quad))
|
||||
)
|
||||
)
|
||||
(set! (-> obj goal-conn-id) a1-1)
|
||||
(update-node-flags-for-conn obj a1-1 (trail-node-flag tnf0) (trail-node-flag))
|
||||
)
|
||||
(let ((v1-17 -1))
|
||||
(let ((a0-16 (-> *game-info* features)))
|
||||
(if (not (logtest? (game-feature pass-red) a0-16))
|
||||
(set! v1-17 (logand -2 v1-17))
|
||||
)
|
||||
(if (not (logtest? (game-feature pass-green) a0-16))
|
||||
(set! v1-17 (logand -3 v1-17))
|
||||
)
|
||||
(if (not (logtest? (game-feature pass-yellow) a0-16))
|
||||
(set! v1-17 (logand -5 v1-17))
|
||||
)
|
||||
(if (not (logtest? (game-feature pass-blue) a0-16))
|
||||
(set! v1-17 (logand -9 v1-17))
|
||||
)
|
||||
)
|
||||
(set! (-> obj conn-mask) (the-as uint v1-17))
|
||||
)
|
||||
(let ((s5-1 (do-path obj (-> obj orig-start-pos) (-> obj conn-start-pos))))
|
||||
(trail-graph-method-10 obj s5-1)
|
||||
(let ((a2-5 (-> obj open-head-id)))
|
||||
(if (and (logtest? (-> obj node a2-5 flags) (trail-node-flag tnf0)) (trail-graph-method-19 obj s5-1 a2-5))
|
||||
(set! (-> obj mode) (the-as uint 3))
|
||||
(set! (-> obj mode) (the-as uint 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
(if (not (try-initialize *trail-graph*))
|
||||
(set! *trail-graph* #f)
|
||||
)
|
||||
|
||||
@@ -992,9 +992,7 @@
|
||||
(set! (-> v1-39 nav-cull-radius) 61440.0)
|
||||
)
|
||||
0
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -1445,7 +1445,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -1589,9 +1589,7 @@
|
||||
318
|
||||
(new 'static 'vector :x -1433.6 :y 2785.28 :z -1761.28 :w 163840.0)
|
||||
)
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -741,7 +741,7 @@
|
||||
(set! (-> obj draw light-index) (the-as uint 1))
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 1142) obj))
|
||||
(set! (-> obj b) #f)
|
||||
(set! (-> obj conn) (minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(set! (-> obj conn) (add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
|
||||
(go (method-of-object obj broken))
|
||||
(go (method-of-object obj idle))
|
||||
@@ -786,7 +786,7 @@
|
||||
(set! (-> obj draw light-index) (the-as uint 1))
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 1142) obj))
|
||||
(set! (-> obj b) (the-as basic #t))
|
||||
(set! (-> obj conn) (minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(set! (-> obj conn) (add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
|
||||
(go (method-of-object obj broken))
|
||||
(go (method-of-object obj idle))
|
||||
|
||||
@@ -687,7 +687,7 @@
|
||||
(countdown (s4-2 (-> s5-2 length))
|
||||
(let ((s3-1 (-> s5-2 data s4-2 actor)))
|
||||
(when s3-1
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector s3-1) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector s3-1) 0)
|
||||
(+! (-> obj total-buttons) 1)
|
||||
(if (logtest? (-> s3-1 extra perm status) (entity-perm-status subtask-complete))
|
||||
(+! (-> obj pressed-count) 1)
|
||||
|
||||
@@ -1462,7 +1462,7 @@
|
||||
(dotimes (gp-0 (the-as int (-> self actor-group 0 0)))
|
||||
(let ((t0-1 (-> (&+ (-> self actor-group 0) (* gp-0 8)) 3)))
|
||||
(if t0-1
|
||||
(minimap-method-12 *minimap* self (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
(add-icon! *minimap* self (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1503,7 +1503,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj enemy-flags) (logior (enemy-flag trackable-backup enable-on-hostile) (-> obj enemy-flags)))
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1629,7 +1629,7 @@
|
||||
(dotimes (s5-0 (length (-> obj actor-group 0)))
|
||||
(let ((t0-1 (-> obj actor-group 0 data s5-0 actor)))
|
||||
(if t0-1
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -1355,7 +1355,7 @@
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 78) obj))
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
+5
-9
@@ -137,9 +137,9 @@
|
||||
(if (and (not (handle->process (-> obj hud-dist))) *target*)
|
||||
(set! (-> obj hud-dist) (ppointer->handle (process-spawn hud-progress :init hud-init-by-other :to *target*)))
|
||||
)
|
||||
(let ((s5-1 (minimap-method-10 *minimap* (-> obj minimap) (the-as minimap-trail #f))))
|
||||
(let ((s5-1 (get-trail-for-connection *minimap* (-> obj minimap) #f)))
|
||||
(if (and s5-1 (nonzero? (-> s5-1 last-updated)))
|
||||
(set! (-> obj dist) (minimap-trail-method-9 s5-1 (target-pos 0) (-> obj pos)))
|
||||
(set! (-> obj dist) (get-distance-with-path s5-1 (target-pos 0) (-> obj pos)))
|
||||
)
|
||||
)
|
||||
(if (= (-> obj max-dist) 0.0)
|
||||
@@ -175,9 +175,7 @@
|
||||
((< (* f0-15 f0-15) (vector-vector-xz-distance-squared (-> obj pos) (-> obj root trans)))
|
||||
(kill-callback (-> *minimap* engine) (-> obj minimap))
|
||||
(set! (-> obj root trans quad) (-> obj pos quad))
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (-> obj map-icon) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (-> obj map-icon) (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(else
|
||||
(set! (-> obj root trans quad) (-> obj pos quad))
|
||||
@@ -257,7 +255,7 @@
|
||||
(kill-callback (-> *minimap* engine) (-> self minimap))
|
||||
(let ((a2-1 (-> event param 0)))
|
||||
(set! (-> self map-icon) a2-1)
|
||||
(set! v0-2 (minimap-method-12 *minimap* self a2-1 (the-as int #f) (the-as vector #t) 0))
|
||||
(set! v0-2 (add-icon! *minimap* self a2-1 (the-as int #f) (the-as vector #t) 0))
|
||||
)
|
||||
(set! (-> self minimap) (the-as connection-minimap v0-2))
|
||||
v0-2
|
||||
@@ -319,9 +317,7 @@
|
||||
(set! (-> self max-dist) 0.0)
|
||||
(set! (-> self theta) 0.0)
|
||||
(set! (-> self phi) 0.0)
|
||||
(set! (-> self minimap)
|
||||
(minimap-method-12 *minimap* self (-> arg0 map-icon) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> self minimap) (add-icon! *minimap* self (-> arg0 map-icon) (the-as int #f) (the-as vector #t) 0))
|
||||
(cond
|
||||
((not (logtest? (-> self flags) (task-arrow-flags task-arrow-flag-02)))
|
||||
(set! (-> self part) (create-launch-control (-> *part-group-id-table* 78) self))
|
||||
|
||||
+3
-9
@@ -159,15 +159,9 @@
|
||||
(let ((node-open-ev (-> node when-open node-ev-i)))
|
||||
(case (-> node-open-ev actor)
|
||||
(((game-task-actor minimap))
|
||||
(let ((v1-67 (minimap-method-12
|
||||
*minimap*
|
||||
*dproc*
|
||||
(-> node-open-ev icon)
|
||||
(the-as int (-> node-open-ev icon))
|
||||
(the-as vector #f)
|
||||
i
|
||||
)
|
||||
)
|
||||
(let ((v1-67
|
||||
(add-icon! *minimap* *dproc* (-> node-open-ev icon) (the-as int (-> node-open-ev icon)) (the-as vector #f) i)
|
||||
)
|
||||
)
|
||||
(if v1-67
|
||||
(logior! (-> v1-67 flags) (minimap-flag task-graph))
|
||||
|
||||
+10
-10
@@ -392,21 +392,21 @@
|
||||
)
|
||||
|
||||
;; definition for function reset-display-gs-state
|
||||
(defun reset-display-gs-state ((arg0 display) (arg1 dma-buffer) (arg2 int))
|
||||
(defun reset-display-gs-state ((arg0 display) (arg1 dma-buffer))
|
||||
(let* ((v1-0 arg1)
|
||||
(a2-1 (the-as object (-> v1-0 base)))
|
||||
(a2-0 (the-as object (-> v1-0 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a2-1) dma) (new 'static 'dma-tag :qwc #x8 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a2-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1))
|
||||
(set! (-> (the-as dma-packet a2-1) vif1) (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-0 base) (&+ (the-as pointer a2-1) 16))
|
||||
(set! (-> (the-as dma-packet a2-0) dma) (new 'static 'dma-tag :qwc #x8 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a2-0) vif0) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1))
|
||||
(set! (-> (the-as dma-packet a2-0) vif1) (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-0 base) (&+ (the-as pointer a2-0) 16))
|
||||
)
|
||||
(let* ((v1-1 arg1)
|
||||
(a2-3 (the-as object (-> v1-1 base)))
|
||||
(a2-2 (the-as object (-> v1-1 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a2-3) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x7))
|
||||
(set! (-> (the-as gs-gif-tag a2-3) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-1 base) (&+ (the-as pointer a2-3) 16))
|
||||
(set! (-> (the-as gs-gif-tag a2-2) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x7))
|
||||
(set! (-> (the-as gs-gif-tag a2-2) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-1 base) (&+ (the-as pointer a2-2) 16))
|
||||
)
|
||||
(let* ((v1-2 arg1)
|
||||
(a1-1 (-> v1-2 base))
|
||||
|
||||
+96
-110
@@ -212,15 +212,13 @@
|
||||
(+! s3-1 3072)
|
||||
(ocean-texture-add-call-rest obj arg0)
|
||||
)
|
||||
(let ((a2-5 s3-1))
|
||||
(ocean-texture-add-verts-last obj arg0 a2-5 (+ arg1 0))
|
||||
(ocean-texture-add-call-rest obj arg0)
|
||||
(ocean-texture-add-call-done obj arg0)
|
||||
(ocean-method-81 obj arg0)
|
||||
(reset-display-gs-state *display* arg0 a2-5)
|
||||
)
|
||||
(ocean-texture-add-verts-last obj arg0 s3-1 (+ arg1 0))
|
||||
)
|
||||
)
|
||||
(ocean-texture-add-call-rest obj arg0)
|
||||
(ocean-texture-add-call-done obj arg0)
|
||||
(ocean-method-81 obj arg0)
|
||||
(reset-display-gs-state *display* arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -424,22 +422,16 @@
|
||||
(set! (-> v1-69 6 quad) (-> obj xy88 quad))
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(let ((t9-15 set-display-gs-state)
|
||||
(a0-71 arg0)
|
||||
(a1-31 66)
|
||||
(a2-5 8)
|
||||
)
|
||||
(t9-15 a0-71 a1-31 a2-5 8 0 0)
|
||||
(let ((v1-72 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-72 0 quad) (-> obj erase-tmpl dma-vif quad))
|
||||
(set! (-> v1-72 1 quad) (-> obj erase-tmpl quad 1))
|
||||
(set! (-> v1-72 2 quad) (-> obj color80808000 quad))
|
||||
(set! (-> v1-72 3 quad) (-> obj xy00 quad))
|
||||
(set! (-> v1-72 4 quad) (-> obj xy88 quad))
|
||||
)
|
||||
(set! (-> arg0 base) (the-as pointer (-> (the-as (inline-array vector4w) (-> arg0 base)) 5)))
|
||||
(reset-display-gs-state *display* arg0 a2-5)
|
||||
(set-display-gs-state arg0 66 8 8 0 0)
|
||||
(let ((v1-72 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-72 0 quad) (-> obj erase-tmpl dma-vif quad))
|
||||
(set! (-> v1-72 1 quad) (-> obj erase-tmpl quad 1))
|
||||
(set! (-> v1-72 2 quad) (-> obj color80808000 quad))
|
||||
(set! (-> v1-72 3 quad) (-> obj xy00 quad))
|
||||
(set! (-> v1-72 4 quad) (-> obj xy88 quad))
|
||||
)
|
||||
(set! (-> arg0 base) (the-as pointer (-> (the-as (inline-array vector4w) (-> arg0 base)) 5)))
|
||||
(reset-display-gs-state *display* arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1573,95 +1565,89 @@
|
||||
(ocean-method-85 obj arg0)
|
||||
(ocean-method-88 obj arg0)
|
||||
(set-display-gs-state arg0 (the-as int (-> *ocean-envmap-texture-base* vram-page)) 64 64 0 0)
|
||||
(let ((a0-43 obj)
|
||||
(t9-13 (method-of-type ocean ocean-method-83))
|
||||
(a1-43 arg0)
|
||||
(a2-5 32768.0)
|
||||
)
|
||||
(t9-13 a0-43 a1-43 a2-5)
|
||||
(let* ((v1-44 arg0)
|
||||
(a0-44 (the-as object (-> v1-44 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-44) dma) (new 'static 'dma-tag :qwc #x7 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-44) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-44) vif1) (new 'static 'vif-tag :imm #x7 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-44 base) (&+ (the-as pointer a0-44) 16))
|
||||
)
|
||||
(let* ((v1-45 arg0)
|
||||
(a0-46 (the-as object (-> v1-45 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-46) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x6))
|
||||
(set! (-> (the-as gs-gif-tag a0-46) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-45 base) (&+ (the-as pointer a0-46) 16))
|
||||
)
|
||||
(let* ((s4-4 arg0)
|
||||
(s3-2 (-> s4-4 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-alpha) s3-2) 0) (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 1) (gs-reg64 alpha-1))
|
||||
(set! (-> (the-as (pointer gs-tex0) s3-2) 2)
|
||||
(new 'static 'gs-tex0
|
||||
:tbw #x1
|
||||
:tcc #x1
|
||||
:th (log2 32)
|
||||
:tw (log2 64)
|
||||
:tbp0 (-> *ocean-envmap-texture-base* vram-block)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 3) (gs-reg64 tex0-1))
|
||||
(set! (-> (the-as (pointer gs-tex1) s3-2) 4) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 5) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer gs-clamp) s3-2) 6)
|
||||
(new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 7) (gs-reg64 clamp-1))
|
||||
(set! (-> (the-as (pointer gs-rgbaq) s3-2) 8) (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 9) (gs-reg64 rgbaq))
|
||||
(set! (-> (the-as (pointer uint64) s3-2) 10) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 11) (gs-reg64 texflush))
|
||||
(set! (-> s4-4 base) (&+ s3-2 96))
|
||||
)
|
||||
(let* ((v1-63 arg0)
|
||||
(a0-54 (the-as object (-> v1-63 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-54) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-54) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-54) vif1) (new 'static 'vif-tag :imm #x3 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-63 base) (&+ (the-as pointer a0-54) 16))
|
||||
)
|
||||
(let* ((v1-64 arg0)
|
||||
(a0-56 (the-as object (-> v1-64 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-56) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x2))
|
||||
(set! (-> (the-as gs-gif-tag a0-56) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-64 base) (&+ (the-as pointer a0-56) 16))
|
||||
)
|
||||
(let* ((v1-65 arg0)
|
||||
(a0-58 (-> v1-65 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-tex1) a0-58) 0) (new 'static 'gs-tex1))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 1) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer uint64) a0-58) 2) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 3) (gs-reg64 texflush))
|
||||
(set! (-> v1-65 base) (&+ a0-58 32))
|
||||
)
|
||||
(let ((v1-66 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-66 0 quad) (-> obj sprite-tmpl dma-vif quad))
|
||||
(set! (-> v1-66 1 quad) (-> obj sprite-tmpl quad 1))
|
||||
(set-vector! (-> v1-66 2) 128 128 128 128)
|
||||
(set-vector! (-> v1-66 3) 8 520 0 0)
|
||||
(set-vector! (-> v1-66 4) 0 512 #xffffff 0)
|
||||
(set-vector! (-> v1-66 5) 1032 8 0 0)
|
||||
(let ((v1-67 (the-as object (-> v1-66 6))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) y) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) z) #xffffff)
|
||||
(set! (-> (the-as vector4w v1-67) w) 0)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(reset-display-gs-state *display* arg0 (the-as int a2-5))
|
||||
(ocean-method-83 obj arg0 32768.0)
|
||||
(let* ((v1-44 arg0)
|
||||
(a0-44 (the-as object (-> v1-44 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-44) dma) (new 'static 'dma-tag :qwc #x7 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-44) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-44) vif1) (new 'static 'vif-tag :imm #x7 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-44 base) (&+ (the-as pointer a0-44) 16))
|
||||
)
|
||||
(let* ((v1-45 arg0)
|
||||
(a0-46 (the-as object (-> v1-45 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-46) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x6))
|
||||
(set! (-> (the-as gs-gif-tag a0-46) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-45 base) (&+ (the-as pointer a0-46) 16))
|
||||
)
|
||||
(let* ((s4-4 arg0)
|
||||
(s3-2 (-> s4-4 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-alpha) s3-2) 0) (new 'static 'gs-alpha :b #x1 :d #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 1) (gs-reg64 alpha-1))
|
||||
(set! (-> (the-as (pointer gs-tex0) s3-2) 2)
|
||||
(new 'static 'gs-tex0
|
||||
:tbw #x1
|
||||
:tcc #x1
|
||||
:th (log2 32)
|
||||
:tw (log2 64)
|
||||
:tbp0 (-> *ocean-envmap-texture-base* vram-block)
|
||||
)
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 3) (gs-reg64 tex0-1))
|
||||
(set! (-> (the-as (pointer gs-tex1) s3-2) 4) (new 'static 'gs-tex1 :mmag #x1 :mmin #x1))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 5) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer gs-clamp) s3-2) 6)
|
||||
(new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 7) (gs-reg64 clamp-1))
|
||||
(set! (-> (the-as (pointer gs-rgbaq) s3-2) 8) (new 'static 'gs-rgbaq :r #x80 :g #x80 :b #x80 :a #x80 :q 1.0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 9) (gs-reg64 rgbaq))
|
||||
(set! (-> (the-as (pointer uint64) s3-2) 10) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) s3-2) 11) (gs-reg64 texflush))
|
||||
(set! (-> s4-4 base) (&+ s3-2 96))
|
||||
)
|
||||
(let* ((v1-63 arg0)
|
||||
(a0-54 (the-as object (-> v1-63 base)))
|
||||
)
|
||||
(set! (-> (the-as dma-packet a0-54) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id cnt)))
|
||||
(set! (-> (the-as dma-packet a0-54) vif0) (new 'static 'vif-tag))
|
||||
(set! (-> (the-as dma-packet a0-54) vif1) (new 'static 'vif-tag :imm #x3 :cmd (vif-cmd direct) :msk #x1))
|
||||
(set! (-> v1-63 base) (&+ (the-as pointer a0-54) 16))
|
||||
)
|
||||
(let* ((v1-64 arg0)
|
||||
(a0-56 (the-as object (-> v1-64 base)))
|
||||
)
|
||||
(set! (-> (the-as gs-gif-tag a0-56) tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x2))
|
||||
(set! (-> (the-as gs-gif-tag a0-56) regs) GIF_REGS_ALL_AD)
|
||||
(set! (-> v1-64 base) (&+ (the-as pointer a0-56) 16))
|
||||
)
|
||||
(let* ((v1-65 arg0)
|
||||
(a0-58 (-> v1-65 base))
|
||||
)
|
||||
(set! (-> (the-as (pointer gs-tex1) a0-58) 0) (new 'static 'gs-tex1))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 1) (gs-reg64 tex1-1))
|
||||
(set! (-> (the-as (pointer uint64) a0-58) 2) (the-as uint 0))
|
||||
(set! (-> (the-as (pointer gs-reg64) a0-58) 3) (gs-reg64 texflush))
|
||||
(set! (-> v1-65 base) (&+ a0-58 32))
|
||||
)
|
||||
(let ((v1-66 (the-as (inline-array vector4w) (-> arg0 base))))
|
||||
(set! (-> v1-66 0 quad) (-> obj sprite-tmpl dma-vif quad))
|
||||
(set! (-> v1-66 1 quad) (-> obj sprite-tmpl quad 1))
|
||||
(set-vector! (-> v1-66 2) 128 128 128 128)
|
||||
(set-vector! (-> v1-66 3) 8 520 0 0)
|
||||
(set-vector! (-> v1-66 4) 0 512 #xffffff 0)
|
||||
(set-vector! (-> v1-66 5) 1032 8 0 0)
|
||||
(let ((v1-67 (the-as object (-> v1-66 6))))
|
||||
(set! (-> (the-as (inline-array vector4w) v1-67) 0 x) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) y) 1024)
|
||||
(set! (-> (the-as vector4w v1-67) z) #xffffff)
|
||||
(set! (-> (the-as vector4w v1-67) w) 0)
|
||||
)
|
||||
)
|
||||
(&+! (-> arg0 base) 112)
|
||||
(reset-display-gs-state *display* arg0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+33
-32
@@ -11,6 +11,7 @@
|
||||
(scale float :offset-assert 28)
|
||||
(color rgba :offset-assert 32)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
@@ -313,7 +314,7 @@
|
||||
;; definition of type connection-minimap
|
||||
(deftype connection-minimap (connection-pers)
|
||||
((handle handle :offset 8)
|
||||
(position vector :offset 16)
|
||||
(position object :offset 16)
|
||||
(alpha float :offset 20)
|
||||
(class minimap-class-node :offset 24)
|
||||
(flags minimap-flag :offset 28)
|
||||
@@ -463,8 +464,8 @@
|
||||
:size-assert #xd0
|
||||
:flag-assert #xb000000d0
|
||||
(:methods
|
||||
(minimap-trail-method-9 (_type_ vector vector) float 9)
|
||||
(minimap-trail-method-10 () none 10)
|
||||
(get-distance-with-path (_type_ vector vector) float 9)
|
||||
(reset (_type_) none 10)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -489,11 +490,11 @@
|
||||
|
||||
;; definition of type minimap-draw-work
|
||||
(deftype minimap-draw-work (structure)
|
||||
((buf basic :offset-assert 0)
|
||||
(justify-right basic :offset-assert 4)
|
||||
(draw-pos vector4w :inline :offset-assert 16)
|
||||
(mat matrix :inline :offset-assert 32)
|
||||
(corner vector4w 4 :inline :offset-assert 96)
|
||||
((buf dma-buffer :offset-assert 0)
|
||||
(justify-right symbol :offset-assert 4)
|
||||
(draw-pos vector4w :inline :offset-assert 16)
|
||||
(mat matrix :inline :offset-assert 32)
|
||||
(corner vector 4 :inline :offset-assert 96)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xa0
|
||||
@@ -527,20 +528,20 @@
|
||||
(color vector4w :inline :offset-assert 192)
|
||||
(offset vector :inline :offset-assert 208)
|
||||
(minimap-corner vector :inline :offset-assert 224)
|
||||
(last-name basic :offset-assert 240)
|
||||
(last-name string :offset-assert 240)
|
||||
(last-tex basic :offset-assert 244)
|
||||
(target-inv-scale float :offset-assert 248)
|
||||
(map-bits uint64 :offset-assert 256)
|
||||
(level basic :offset-assert 264)
|
||||
(ctywide basic :offset-assert 268)
|
||||
(level level :offset-assert 264)
|
||||
(ctywide level :offset-assert 268)
|
||||
(inv-scale float :offset 212)
|
||||
(fade float :offset 220)
|
||||
(engine engine-minimap :offset-assert 272)
|
||||
(engine-key uint32 :offset-assert 276)
|
||||
(trail minimap-trail 6 :inline :offset-assert 288)
|
||||
(race-tex basic :offset-assert 1536)
|
||||
(race-tex texture :offset-assert 1536)
|
||||
(race-scale float :offset-assert 1540)
|
||||
(race-level basic :offset-assert 1544)
|
||||
(race-level level :offset-assert 1544)
|
||||
(sprite2-tmpl dma-gif-packet :inline :offset-assert 1552)
|
||||
(race-corner vector :inline :offset-assert 1584)
|
||||
(goal-time float :offset-assert 1600)
|
||||
@@ -550,25 +551,25 @@
|
||||
:size-assert #x648
|
||||
:flag-assert #x1c00000648
|
||||
(:methods
|
||||
(minimap-method-9 () none 9)
|
||||
(minimap-method-10 (_type_ connection-minimap minimap-trail) minimap-trail 10)
|
||||
(minimap-method-11 () none 11)
|
||||
(minimap-method-12 (_type_ process uint int vector int) connection-minimap 12)
|
||||
(minimap-method-13 () none 13)
|
||||
(minimap-method-14 () none 14)
|
||||
(minimap-method-15 (_type_ dma-buffer vector4w symbol) none 15)
|
||||
(minimap-method-16 () none 16)
|
||||
(minimap-method-17 () none 17)
|
||||
(minimap-method-18 () none 18)
|
||||
(minimap-method-19 () none 19)
|
||||
(minimap-method-20 (_type_) symbol 20)
|
||||
(minimap-method-21 () none 21)
|
||||
(minimap-method-22 () none 22)
|
||||
(minimap-method-23 () none 23)
|
||||
(minimap-method-24 (_type_ dma-buffer vector4w symbol) none 24)
|
||||
(minimap-method-25 (_type_ texture float) none 25)
|
||||
(minimap-method-26 () none 26)
|
||||
(minimap-method-27 (_type_ float float) none 27)
|
||||
(debug-draw (_type_) none 9)
|
||||
(get-trail-for-connection (_type_ connection-minimap symbol) minimap-trail 10)
|
||||
(get-icon-draw-pos (_type_ connection-minimap minimap-trail vector float vector) symbol 11)
|
||||
(add-icon! (_type_ process uint int vector int) connection-minimap 12)
|
||||
(free-trail-by-connection (_type_ connection-minimap) none 13)
|
||||
(update-trails (_type_) none 14)
|
||||
(draw-1 (_type_ dma-buffer vector4w symbol) none 15)
|
||||
(draw-connection (_type_ minimap-draw-work connection-minimap) none 16)
|
||||
(draw-frustum-1 (_type_ minimap-draw-work connection-minimap) none 17)
|
||||
(draw-frustum-2 (_type_ minimap-draw-work connection-minimap) none 18)
|
||||
(sub-draw-1-2 (_type_ minimap-draw-work) none 19)
|
||||
(update! (_type_) symbol 20)
|
||||
(sub-draw-1-1 (_type_ minimap-draw-work) none 21)
|
||||
(set-color (_type_ vector) none 22)
|
||||
(draw-racer-2 (_type_ minimap-draw-work connection-minimap) none 23)
|
||||
(draw-sprite2 (_type_ dma-buffer vector4w symbol) none 24)
|
||||
(set-race-texture (_type_ texture float level) none 25)
|
||||
(draw-racer-1 (_type_ minimap-draw-work connection-minimap float float float) none 26)
|
||||
(set-race-corner (_type_ float float) none 27)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
+2896
File diff suppressed because it is too large
Load Diff
+5223
File diff suppressed because it is too large
Load Diff
+65
-66
@@ -3,24 +3,25 @@
|
||||
|
||||
;; definition of type trail-node
|
||||
(deftype trail-node (structure)
|
||||
((next-id int16 :offset-assert 0)
|
||||
(prev-id int16 :offset-assert 2)
|
||||
(parent-id int16 :offset-assert 4)
|
||||
(x int16 :offset-assert 6)
|
||||
(z int16 :offset-assert 8)
|
||||
(first-conn uint16 :offset-assert 10)
|
||||
(cost-from-start uint16 :offset-assert 12)
|
||||
(cost-to-goal uint16 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(conn-count uint8 :offset-assert 17)
|
||||
((next-id int16 :offset-assert 0)
|
||||
(prev-id int16 :offset-assert 2)
|
||||
(parent-id int16 :offset-assert 4)
|
||||
(x int16 :offset-assert 6)
|
||||
(z int16 :offset-assert 8)
|
||||
(first-conn uint16 :offset-assert 10)
|
||||
(cost-from-start uint16 :offset-assert 12)
|
||||
(cost-to-goal uint16 :offset-assert 14)
|
||||
(flags trail-node-flag :offset-assert 16)
|
||||
(conn-count uint8 :offset-assert 17)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 12
|
||||
:size-assert #x12
|
||||
:flag-assert #xc00000012
|
||||
(:methods
|
||||
(trail-node-method-9 () none 9)
|
||||
(trail-node-method-10 () none 10)
|
||||
(trail-node-method-11 () none 11)
|
||||
(get-dist-score (_type_ vector) uint 9)
|
||||
(debug-draw (_type_ int) none 10)
|
||||
(get-position (_type_ vector) vector 11)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -72,17 +73,18 @@
|
||||
|
||||
;; definition of type trail-conn
|
||||
(deftype trail-conn (structure)
|
||||
((head-id uint16 :offset-assert 0)
|
||||
(tail-id uint16 :offset-assert 2)
|
||||
(flags uint8 :offset-assert 4)
|
||||
(visgroup-id uint8 :offset-assert 5)
|
||||
(cost uint16 :offset-assert 6)
|
||||
((head-id uint16 :offset-assert 0)
|
||||
(tail-id uint16 :offset-assert 2)
|
||||
(flags conn-flag :offset-assert 4)
|
||||
(visgroup-id uint8 :offset-assert 5)
|
||||
(cost uint16 :offset-assert 6)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(trail-conn-method-9 () none 9)
|
||||
(debug-draw (_type_ trail-graph int) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -108,6 +110,7 @@
|
||||
(conn-count uint8 :offset-assert 2)
|
||||
(pad uint8 :offset-assert 3)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
@@ -169,10 +172,10 @@
|
||||
|
||||
;; definition of type trail-conn-hash
|
||||
(deftype trail-conn-hash (basic)
|
||||
((cell-width meters :offset-assert 4)
|
||||
(origin vector :inline :offset-assert 16)
|
||||
(cell uint32 :offset-assert 32)
|
||||
(conn-ids uint32 :offset-assert 36)
|
||||
((cell-width meters :offset-assert 4)
|
||||
(origin vector :inline :offset-assert 16)
|
||||
(cell (inline-array trail-conn-hash-cell) :offset-assert 32)
|
||||
(conn-ids (pointer uint16) :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
@@ -221,51 +224,51 @@
|
||||
|
||||
;; definition of type trail-graph
|
||||
(deftype trail-graph (basic)
|
||||
((mode uint8 :offset-assert 4)
|
||||
(search-id uint32 :offset-assert 8)
|
||||
(open-head-id int16 :offset-assert 12)
|
||||
(goal-conn-id int16 :offset-assert 14)
|
||||
(goal-node-id int16 :offset-assert 16)
|
||||
(node-count uint16 :offset-assert 18)
|
||||
(conn-count uint16 :offset-assert 20)
|
||||
(conn-mask uint8 :offset-assert 22)
|
||||
(node uint32 :offset-assert 24)
|
||||
(conn uint32 :offset-assert 28)
|
||||
(conn-ids uint32 :offset-assert 32)
|
||||
(visgroup uint32 :offset-assert 36)
|
||||
(visnode-ids uint32 :offset-assert 40)
|
||||
(conn-hash basic :offset-assert 44)
|
||||
(orig-start-pos vector :inline :offset-assert 48)
|
||||
(orig-goal-pos vector :inline :offset-assert 64)
|
||||
(conn-start-pos vector :inline :offset-assert 80)
|
||||
(conn-goal-pos vector :inline :offset-assert 96)
|
||||
(open-quads qword 6 :inline :offset-assert 112)
|
||||
(closed-quads qword 6 :inline :offset-assert 208)
|
||||
((mode uint8 :offset-assert 4)
|
||||
(search-id uint32 :offset-assert 8)
|
||||
(open-head-id int16 :offset-assert 12)
|
||||
(goal-conn-id int16 :offset-assert 14)
|
||||
(goal-node-id int16 :offset-assert 16)
|
||||
(node-count uint16 :offset-assert 18)
|
||||
(conn-count uint16 :offset-assert 20)
|
||||
(conn-mask uint8 :offset-assert 22)
|
||||
(node (inline-array trail-node) :offset-assert 24)
|
||||
(conn (inline-array trail-conn) :offset-assert 28)
|
||||
(conn-ids (pointer uint16) :offset-assert 32)
|
||||
(visgroup (inline-array trail-conn-hash-cell) :offset-assert 36)
|
||||
(visnode-ids (pointer uint16) :offset-assert 40)
|
||||
(conn-hash trail-conn-hash :offset-assert 44)
|
||||
(orig-start-pos vector :inline :offset-assert 48)
|
||||
(orig-goal-pos vector :inline :offset-assert 64)
|
||||
(conn-start-pos vector :inline :offset-assert 80)
|
||||
(conn-goal-pos vector :inline :offset-assert 96)
|
||||
(open-quads qword 6 :inline :offset-assert 112)
|
||||
(closed-quads qword 6 :inline :offset-assert 208)
|
||||
)
|
||||
:method-count-assert 29
|
||||
:size-assert #x130
|
||||
:flag-assert #x1d00000130
|
||||
(:methods
|
||||
(trail-graph-method-9 () none 9)
|
||||
(trail-graph-method-10 () none 10)
|
||||
(trail-graph-method-11 () none 11)
|
||||
(trail-graph-method-12 () none 12)
|
||||
(trail-graph-method-13 () none 13)
|
||||
(trail-graph-method-14 () none 14)
|
||||
(trail-graph-method-15 () none 15)
|
||||
(trail-graph-method-9 (_type_ int) none 9)
|
||||
(trail-graph-method-10 (_type_ int) none 10)
|
||||
(trail-graph-method-11 (_type_ int int) trail-node 11)
|
||||
(debug-draw (_type_) none 12)
|
||||
(debug-draw-cell (_type_ int) none 13)
|
||||
(debug-draw-path (_type_ int (pointer uint16) vector vector rgba float) symbol 14)
|
||||
(do-path (_type_ vector vector) int 15)
|
||||
(trail-graph-method-16 () none 16)
|
||||
(trail-graph-method-17 () none 17)
|
||||
(trail-graph-method-18 () none 18)
|
||||
(trail-graph-method-19 () none 19)
|
||||
(trail-graph-method-20 () none 20)
|
||||
(trail-graph-method-21 () none 21)
|
||||
(trail-graph-method-22 () none 22)
|
||||
(trail-graph-method-23 () none 23)
|
||||
(trail-graph-method-24 () none 24)
|
||||
(trail-graph-method-25 () none 25)
|
||||
(trail-graph-method-26 () none 26)
|
||||
(trail-graph-method-27 () none 27)
|
||||
(trail-graph-method-28 () none 28)
|
||||
(get-node-location-by-id (_type_ uint vector) vector 17)
|
||||
(get-path-to-root (_type_ (pointer uint16) int (pointer int32) (pointer float)) int 18)
|
||||
(trail-graph-method-19 (_type_ int int) symbol 19)
|
||||
(try-initialize (_type_) symbol 20)
|
||||
(update-node-flags-for-conn (_type_ int trail-node-flag trail-node-flag) none 21)
|
||||
(trail-graph-method-22 (_type_ int) none 22)
|
||||
(reset-search-state (_type_) none 23)
|
||||
(get-next-to-explore (_type_) int 24)
|
||||
(trail-graph-method-25 (_type_ trail-conn-search int int) none 25)
|
||||
(do-search! (_type_ vector vector trail-cached-search-info) none 26)
|
||||
(do-some-work (_type_) int 27)
|
||||
(run-until-done-or-timeout (_type_ int) none 28)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -304,7 +307,3 @@
|
||||
|
||||
;; definition for symbol *trail-graph*, type trail-graph
|
||||
(define *trail-graph* (the-as trail-graph #f))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+955
@@ -0,0 +1,955 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition for method 9 of type trail-conn
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw trail-conn ((obj trail-conn) (arg0 trail-graph) (arg1 int))
|
||||
(let ((a2-3 (-> arg0 node (-> obj head-id)))
|
||||
(v1-2 (-> arg0 node (-> obj tail-id)))
|
||||
(s4-0 (new 'stack-no-clear 'vector))
|
||||
(s3-0 (new 'stack-no-clear 'vector))
|
||||
(s5-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set-vector! s4-0 (* 4096.0 (the float (-> a2-3 x))) 53248.0 (* 4096.0 (the float (-> a2-3 z))) 1.0)
|
||||
(set-vector! s3-0 (* 4096.0 (the float (-> v1-2 x))) 53248.0 (* 4096.0 (the float (-> v1-2 z))) 1.0)
|
||||
(vector-lerp! s5-0 s4-0 s3-0 0.5)
|
||||
(let* ((s2-0 (math-camera-pos))
|
||||
(f0-12 (vector-vector-distance-squared s4-0 s2-0))
|
||||
(f1-8 819200.0)
|
||||
)
|
||||
(when (or (< f0-12 (* f1-8 f1-8))
|
||||
(let ((f0-13 (vector-vector-distance-squared s3-0 s2-0))
|
||||
(f1-11 819200.0)
|
||||
)
|
||||
(< f0-13 (* f1-11 f1-11))
|
||||
)
|
||||
(let ((f0-14 (vector-vector-distance-squared s5-0 s2-0))
|
||||
(f1-14 819200.0)
|
||||
)
|
||||
(< f0-14 (* f1-14 f1-14))
|
||||
)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug2) s4-0 s3-0 *color-orange* #f (the-as rgba -1))
|
||||
(let ((s4-1 add-debug-text-3d)
|
||||
(s3-1 #t)
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg1)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color yellow-#f3f300) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type trail-node
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw trail-node ((obj trail-node) (arg0 int))
|
||||
(let ((s5-0 (new 'stack-no-clear 'vector))
|
||||
(s4-0 (new 'stack-no-clear 'sphere))
|
||||
)
|
||||
(set-vector! s5-0 (* 4096.0 (the float (-> obj x))) 53248.0 (* 4096.0 (the float (-> obj z))) 1.0)
|
||||
(set! (-> s4-0 quad) (-> s5-0 quad))
|
||||
(set! (-> s4-0 r) 4096.0)
|
||||
(let ((f0-7 (vector-vector-distance-squared s5-0 (math-camera-pos)))
|
||||
(f1-4 819200.0)
|
||||
)
|
||||
(when (and (< f0-7 (* f1-4 f1-4)) (sphere-in-view-frustum? s4-0))
|
||||
(add-debug-x #t (bucket-id debug2) s5-0 *color-red*)
|
||||
(let ((s4-1 add-debug-text-3d)
|
||||
(s3-1 #t)
|
||||
(s2-1 324)
|
||||
)
|
||||
(format (clear *temp-string*) "~D" arg0)
|
||||
(s4-1 s3-1 (the-as bucket-id s2-1) *temp-string* s5-0 (font-color cyan-#00fefe) (the-as vector2h #f))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 13 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod debug-draw-cell trail-graph ((obj trail-graph) (arg0 int))
|
||||
(local-vars (sv-80 int) (sv-96 (function _varargs_ object)))
|
||||
(let* ((s5-0 (-> obj conn-hash))
|
||||
(s4-0 (-> s5-0 cell arg0))
|
||||
(s3-0 (new 'stack-no-clear 'inline-array 'vector 2))
|
||||
)
|
||||
(set-vector!
|
||||
(-> s3-0 0)
|
||||
(+ (* (-> s5-0 cell-width) (the float (logand arg0 15))) (-> s5-0 origin x))
|
||||
53248.0
|
||||
(+ (* (-> s5-0 cell-width) (the float (/ arg0 16))) (-> s5-0 origin z))
|
||||
1.0
|
||||
)
|
||||
(set! (-> s3-0 1 quad) (-> s3-0 0 quad))
|
||||
(+! (-> s3-0 1 x) (-> s5-0 cell-width))
|
||||
(set! (-> s3-0 2 quad) (-> s3-0 1 quad))
|
||||
(+! (-> s3-0 2 z) (-> s5-0 cell-width))
|
||||
(set! (-> s3-0 3 quad) (-> s3-0 2 quad))
|
||||
(set! (-> s3-0 3 x) (- (-> s3-0 3 x) (-> s5-0 cell-width)))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 1) (-> s3-0 2) *color-white* #f (the-as rgba -1))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 2) (-> s3-0 3) *color-white* #f (the-as rgba -1))
|
||||
(add-debug-line #t (bucket-id debug-no-zbuf1) (-> s3-0 3) (-> s3-0 0) *color-white* #f (the-as rgba -1))
|
||||
(set-vector!
|
||||
(-> s3-0 3)
|
||||
(* 0.5 (+ (-> s3-0 0 x) (-> s3-0 2 x)))
|
||||
(-> s3-0 0 y)
|
||||
(* 0.5 (+ (-> s3-0 0 z) (-> s3-0 2 z)))
|
||||
1.0
|
||||
)
|
||||
(let ((s1-0 add-debug-text-3d)
|
||||
(s0-0 #t)
|
||||
)
|
||||
(set! sv-80 324)
|
||||
(set! sv-96 format)
|
||||
(let ((a0-20 (clear *temp-string*))
|
||||
(a1-5 "cell ~D (~D,~D)")
|
||||
(a2-4 arg0)
|
||||
(a3-4 (logand arg0 15))
|
||||
(t0-4 (/ arg0 16))
|
||||
)
|
||||
(sv-96 a0-20 a1-5 a2-4 a3-4 t0-4)
|
||||
)
|
||||
(let ((a2-5 *temp-string*)
|
||||
(a3-5 (-> s3-0 3))
|
||||
(t0-5 1)
|
||||
(t1-4 #f)
|
||||
)
|
||||
(s1-0 s0-0 (the-as bucket-id sv-80) a2-5 a3-5 (the-as font-color t0-5) (the-as vector2h t1-4))
|
||||
)
|
||||
)
|
||||
(countdown (s2-1 (-> s4-0 conn-count))
|
||||
(let ((s1-1 (-> obj conn (-> s5-0 conn-ids (+ s2-1 (-> s4-0 first-conn))))))
|
||||
(get-position (-> obj node (-> s1-1 head-id)) (-> s3-0 0))
|
||||
(set! (-> s3-0 0 y) 53248.0)
|
||||
(set! (-> s3-0 0 x) (+ -2048.0 (-> s3-0 0 x)))
|
||||
(set! (-> s3-0 0 z) (+ -2048.0 (-> s3-0 0 z)))
|
||||
(get-position (-> obj node (-> s1-1 tail-id)) (-> s3-0 1))
|
||||
)
|
||||
(set! (-> s3-0 1 y) 53248.0)
|
||||
(set! (-> s3-0 1 x) (+ -2048.0 (-> s3-0 1 x)))
|
||||
(set! (-> s3-0 1 z) (+ -2048.0 (-> s3-0 1 z)))
|
||||
(add-debug-line #t (bucket-id debug2) (-> s3-0 0) (-> s3-0 1) *color-white* #f (the-as rgba -1))
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 14 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod debug-draw-path trail-graph ((obj trail-graph) (arg0 int) (arg1 (pointer uint16)) (arg2 vector) (arg3 vector) (arg4 rgba) (arg5 float))
|
||||
(local-vars (sv-48 int))
|
||||
(let ((s0-0 (new 'stack-no-clear 'inline-array 'vector 2)))
|
||||
(set-vector! (-> s0-0 1) (+ (-> arg2 x) arg5) 53248.0 (+ (-> arg2 z) arg5) 1.0)
|
||||
(set! sv-48 0)
|
||||
(until #f
|
||||
(set! (-> s0-0 0 quad) (-> s0-0 1 quad))
|
||||
(cond
|
||||
((< sv-48 arg0)
|
||||
(let ((a0-7 (-> obj node (-> arg1 sv-48))))
|
||||
(set-vector!
|
||||
(-> s0-0 1)
|
||||
(+ (* 4096.0 (the float (-> a0-7 x))) arg5)
|
||||
53248.0
|
||||
(+ (* 4096.0 (the float (-> a0-7 z))) arg5)
|
||||
1.0
|
||||
)
|
||||
)
|
||||
)
|
||||
((= sv-48 arg0)
|
||||
(set-vector! (-> s0-0 1) (+ (-> arg3 x) arg5) 53248.0 (+ (-> arg3 z) arg5) 1.0)
|
||||
)
|
||||
(else
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug2) (-> s0-0 0) (-> s0-0 1) arg4 #f (the-as rgba -1))
|
||||
(set! sv-48 (+ sv-48 1))
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
|
||||
;; definition for method 12 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod debug-draw trail-graph ((obj trail-graph))
|
||||
(when (= (-> obj mode) 3)
|
||||
(let ((s5-0 (new 'stack-no-clear 'inline-array 'vector 2)))
|
||||
(set! (-> s5-0 1 quad) (-> obj orig-goal-pos quad))
|
||||
(set! (-> s5-0 1 y) 53248.0)
|
||||
(let ((v1-4 (-> obj goal-node-id)))
|
||||
(until #f
|
||||
(set! (-> s5-0 0 quad) (-> s5-0 1 quad))
|
||||
(cond
|
||||
((>= v1-4 0)
|
||||
(let ((s4-0 (-> obj node v1-4)))
|
||||
(set-vector!
|
||||
(-> s5-0 1)
|
||||
(+ 2048.0 (* 4096.0 (the float (-> s4-0 x))))
|
||||
53248.0
|
||||
(+ 2048.0 (* 4096.0 (the float (-> s4-0 z))))
|
||||
1.0
|
||||
)
|
||||
(add-debug-line #t (bucket-id debug2) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1))
|
||||
(set! v1-4 (-> s4-0 parent-id))
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> s5-0 1 quad) (-> obj orig-start-pos quad))
|
||||
(set! (-> s5-0 1 y) 53248.0)
|
||||
(add-debug-line #t (bucket-id debug2) (-> s5-0 0) (-> s5-0 1) *color-green* #f (the-as rgba -1))
|
||||
(goto cfg-7)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
)
|
||||
(label cfg-7)
|
||||
(case (-> obj mode)
|
||||
((1 2 3)
|
||||
(let ((s5-1 (new 'stack-no-clear 'vector)))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj orig-start-pos)
|
||||
(meters 1)
|
||||
(new 'static 'rgba :r #xff :a #x80)
|
||||
)
|
||||
(set! (-> s5-1 quad) (-> obj conn-start-pos quad))
|
||||
(set! (-> s5-1 y) 53248.0)
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :r #xff :a #x80))
|
||||
(add-debug-sphere
|
||||
#t
|
||||
(bucket-id debug-no-zbuf1)
|
||||
(-> obj orig-goal-pos)
|
||||
(meters 1)
|
||||
(new 'static 'rgba :g #xff :a #x80)
|
||||
)
|
||||
(set! (-> s5-1 quad) (-> obj conn-goal-pos quad))
|
||||
(set! (-> s5-1 y) 53248.0)
|
||||
(add-debug-sphere #t (bucket-id debug-no-zbuf1) s5-1 (meters 0.25) (new 'static 'rgba :g #xff :a #x80))
|
||||
)
|
||||
)
|
||||
)
|
||||
(dotimes (s5-2 (the-as int (-> obj conn-count)))
|
||||
(debug-draw (-> obj conn s5-2) obj s5-2)
|
||||
)
|
||||
(dotimes (s5-3 (the-as int (-> obj node-count)))
|
||||
(debug-draw (-> obj node s5-3) s5-3)
|
||||
)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type trail-node
|
||||
(defmethod get-position trail-node ((obj trail-node) (arg0 vector))
|
||||
"Unpack the position to a vector"
|
||||
(let ((v0-0 arg0))
|
||||
(set! (-> v0-0 x) (* 4096.0 (the float (-> obj x))))
|
||||
(set! (-> v0-0 y) 0.0)
|
||||
(set! (-> v0-0 z) (* 4096.0 (the float (-> obj z))))
|
||||
(set! (-> v0-0 w) 1.0)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 17 of type trail-graph
|
||||
(defmethod get-node-location-by-id trail-graph ((obj trail-graph) (arg0 uint) (arg1 vector))
|
||||
"Get the location of the node with the given ID"
|
||||
(get-position (-> obj node (the-as int arg0)) arg1)
|
||||
)
|
||||
|
||||
;; definition for method 18 of type trail-graph
|
||||
(defmethod get-path-to-root trail-graph ((obj trail-graph) (arg0 (pointer uint16)) (arg1 int) (arg2 (pointer int32)) (arg3 (pointer float)))
|
||||
"Get the path from goal to root, following parent-id"
|
||||
(set! (-> arg3 0) 0.0)
|
||||
(set! (-> arg2 0) (-> obj goal-node-id))
|
||||
(let ((v0-0 -1))
|
||||
(when (= (-> obj mode) 3)
|
||||
(let ((v1-3 (-> obj node))
|
||||
(a3-2 0)
|
||||
)
|
||||
(let ((t1-0 (-> obj goal-node-id)))
|
||||
(while (>= t1-0 0)
|
||||
(+! a3-2 1)
|
||||
(set! t1-0 (-> v1-3 t1-0 parent-id))
|
||||
)
|
||||
)
|
||||
(let ((t1-4 (-> obj goal-node-id)))
|
||||
(let ((t2-1 (- a3-2 arg1)))
|
||||
(cond
|
||||
((> t2-1 0)
|
||||
(while (> t2-1 0)
|
||||
(set! t1-4 (-> v1-3 t1-4 parent-id))
|
||||
(+! t2-1 -1)
|
||||
)
|
||||
(set! v0-0 arg1)
|
||||
)
|
||||
(else
|
||||
(set! v0-0 a3-2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(countdown (a2-3 v0-0)
|
||||
(set! (-> arg0 a2-3) (the-as uint t1-4))
|
||||
(set! t1-4 (-> v1-3 t1-4 parent-id))
|
||||
)
|
||||
)
|
||||
(when (> a3-2 0)
|
||||
(let ((a0-3 (-> v1-3 (-> obj goal-node-id)))
|
||||
(v1-4 (-> v1-3 (-> arg0 0)))
|
||||
)
|
||||
(set! (-> arg3 0)
|
||||
(- (* 512.0 (the float (-> a0-3 cost-from-start))) (* 512.0 (the float (-> v1-4 cost-from-start))))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 20 of type trail-graph
|
||||
(defmethod try-initialize trail-graph ((obj trail-graph))
|
||||
"Init and verify that constants are good."
|
||||
(let ((a3-0 (shr (+ (-> obj node-count) 127) 7)))
|
||||
(when (!= a3-0 6)
|
||||
(format 0 "ERROR: <SW> TRAIL_NODE_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 6 a3-0)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(let ((a3-1 (shr (+ (-> obj conn-count) 127) 7)))
|
||||
(when (!= a3-1 7)
|
||||
(format 0 "ERROR: <SW> TRAIL_CONN_BIT_ARRAY_QUAD_COUNT is ~d, but should be ~d! Please change it!~%" 7 a3-1)
|
||||
(return #f)
|
||||
)
|
||||
)
|
||||
(set! (-> obj mode) (the-as uint 0))
|
||||
(set! (-> obj goal-conn-id) -1)
|
||||
(set! (-> obj goal-node-id) -1)
|
||||
(set! (-> obj open-head-id) -1)
|
||||
#t
|
||||
)
|
||||
|
||||
;; definition for method 23 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod reset-search-state trail-graph ((obj trail-graph))
|
||||
"Reset the search/goal."
|
||||
(when (nonzero? (-> obj mode))
|
||||
(set! (-> obj goal-node-id) -1)
|
||||
(let ((a1-0 (-> obj goal-conn-id)))
|
||||
(when (>= a1-0 0)
|
||||
(update-node-flags-for-conn obj a1-0 (trail-node-flag) (trail-node-flag tnf0))
|
||||
(set! (-> obj goal-conn-id) -1)
|
||||
)
|
||||
)
|
||||
(set! (-> obj open-head-id) -1)
|
||||
(let ((v1-7 (-> obj open-quads)))
|
||||
(set! (-> v1-7 0 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 1 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 2 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 3 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 4 quad) (the-as uint128 0))
|
||||
(set! (-> v1-7 5 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(let ((v1-9 (-> obj closed-quads)))
|
||||
(set! (-> v1-9 0 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 1 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 2 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 3 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 4 quad) (the-as uint128 0))
|
||||
(set! (-> v1-9 5 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(set! (-> obj mode) (the-as uint 0))
|
||||
0
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 21 of type trail-graph
|
||||
;; WARN: Return type mismatch trail-node-flag vs none.
|
||||
(defmethod update-node-flags-for-conn trail-graph ((obj trail-graph) (arg0 int) (arg1 trail-node-flag) (arg2 trail-node-flag))
|
||||
"Set arg1, clear arg2"
|
||||
(let* ((v1-0 (lognot arg2))
|
||||
(a3-2 (-> obj conn arg0))
|
||||
(t0-0 (-> a3-2 visgroup-id))
|
||||
(a1-2 (-> obj node))
|
||||
)
|
||||
(cond
|
||||
((> t0-0 0)
|
||||
(let* ((a3-4 (-> obj visgroup (+ t0-0 -1)))
|
||||
(a0-2 (&-> (-> obj visnode-ids) (-> a3-4 first-conn)))
|
||||
)
|
||||
(countdown (a3-5 (-> a3-4 conn-count))
|
||||
(let ((t0-8 (-> a1-2 (-> a0-2 0))))
|
||||
(set! (-> t0-8 flags) (logior (logand (-> t0-8 flags) v1-0) arg1))
|
||||
)
|
||||
(set! a0-2 (&-> a0-2 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(let ((a0-5 (-> a1-2 (-> a3-2 head-id)))
|
||||
(a1-3 (-> a1-2 (-> a3-2 tail-id)))
|
||||
)
|
||||
(set! (-> a0-5 flags) (logior (logand (-> a0-5 flags) v1-0) arg1))
|
||||
(set! (-> a1-3 flags) (logior (logand (-> a1-3 flags) v1-0) arg1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 25 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch symbol vs none.
|
||||
(defmethod trail-graph-method-25 trail-graph ((obj trail-graph) (arg0 trail-conn-search) (arg1 int) (arg2 int))
|
||||
(let* ((v1-1 (+ (* arg2 16) arg1))
|
||||
(a0-1 (/ v1-1 8))
|
||||
(a1-2 (ash 1 (logand v1-1 7)))
|
||||
(a2-4 (-> arg0 cell-quads 0 byte a0-1))
|
||||
)
|
||||
(when (not (logtest? a2-4 a1-2))
|
||||
(set! (-> arg0 cell-quads 0 byte a0-1) (logior a2-4 a1-2))
|
||||
(let* ((v1-3 (-> obj conn-hash cell v1-1))
|
||||
(s4-0 (&-> (-> obj conn-hash conn-ids) (-> v1-3 first-conn)))
|
||||
)
|
||||
(countdown (s3-0 (-> v1-3 conn-count))
|
||||
(let* ((s2-0 (-> s4-0 0))
|
||||
(v1-4 (shr s2-0 3))
|
||||
(a1-7 (ash 1 (logand s2-0 7)))
|
||||
(a2-5 (-> arg0 conn-quads 0 byte v1-4))
|
||||
)
|
||||
(when (not (logtest? a2-5 a1-7))
|
||||
(set! (-> arg0 conn-quads 0 byte v1-4) (logior a2-5 a1-7))
|
||||
(let* ((v1-7 (-> obj conn s2-0))
|
||||
(a0-14 (-> v1-7 flags))
|
||||
)
|
||||
(when (= (logand (the-as conn-flag (-> obj conn-mask)) a0-14) a0-14)
|
||||
(let ((a3-2 (-> obj node (-> v1-7 head-id)))
|
||||
(v1-10 (-> obj node (-> v1-7 tail-id)))
|
||||
(a1-14 (new 'stack-no-clear 'vector))
|
||||
(a2-7 (new 'stack-no-clear 'vector))
|
||||
(s1-0 (new 'stack-no-clear 'vector))
|
||||
)
|
||||
(set-vector!
|
||||
a1-14
|
||||
(* 4096.0 (the float (-> a3-2 x)))
|
||||
(-> arg0 src-pos y)
|
||||
(* 4096.0 (the float (-> a3-2 z)))
|
||||
1.0
|
||||
)
|
||||
(set-vector!
|
||||
a2-7
|
||||
(* 4096.0 (the float (-> v1-10 x)))
|
||||
(-> arg0 src-pos y)
|
||||
(* 4096.0 (the float (-> v1-10 z)))
|
||||
1.0
|
||||
)
|
||||
(let ((f0-12 (vector-segment-distance-point! (-> arg0 src-pos) a1-14 a2-7 s1-0)))
|
||||
(when (or (< (-> arg0 best-conn-id) 0) (< f0-12 (-> arg0 best-dist)))
|
||||
(set! (-> arg0 best-dist) f0-12)
|
||||
(set! (-> arg0 best-conn-id) (the-as int s2-0))
|
||||
(set! (-> arg0 conn-pos quad) (-> s1-0 quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s4-0 (&-> s4-0 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 15 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod do-path trail-graph ((obj trail-graph) (arg0 vector) (arg1 vector))
|
||||
(let ((v1-0 (-> obj conn-hash))
|
||||
(s5-0 (new 'stack-no-clear 'trail-conn-search))
|
||||
)
|
||||
(set! (-> s5-0 src-pos) arg0)
|
||||
(set! (-> s5-0 conn-pos) arg1)
|
||||
(set! (-> s5-0 best-conn-id) -1)
|
||||
(let ((a0-2 (-> s5-0 conn-quads)))
|
||||
(set! (-> a0-2 0 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 1 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 2 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 3 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 4 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 5 quad) (the-as uint128 0))
|
||||
(set! (-> a0-2 6 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(let ((a0-4 (-> s5-0 cell-quads)))
|
||||
(set! (-> a0-4 0 quad) (the-as uint128 0))
|
||||
(set! (-> a0-4 1 quad) (the-as uint128 0))
|
||||
)
|
||||
0
|
||||
(let* ((f0-0 (-> v1-0 cell-width))
|
||||
(f1-1 (* 0.5 f0-0))
|
||||
)
|
||||
(let ((f3-0 (- (-> arg0 x) f1-1))
|
||||
(f2-2 (- (-> arg0 z) f1-1))
|
||||
)
|
||||
(set! (-> s5-0 bounds min x) (max 0 (min 15 (the int (/ (- f3-0 (-> v1-0 origin x)) f0-0)))))
|
||||
(set! (-> s5-0 bounds min z) (max 0 (min 15 (the int (/ (- f2-2 (-> v1-0 origin z)) f0-0)))))
|
||||
)
|
||||
(let ((f2-7 (+ (-> arg0 x) f1-1))
|
||||
(f1-2 (+ (-> arg0 z) f1-1))
|
||||
)
|
||||
(set! (-> s5-0 bounds max x) (max 0 (min 15 (the int (/ (- f2-7 (-> v1-0 origin x)) f0-0)))))
|
||||
(set! (-> s5-0 bounds max z) (max 0 (min 15 (the int (/ (- f1-2 (-> v1-0 origin z)) f0-0)))))
|
||||
)
|
||||
)
|
||||
(let ((s3-0 (-> s5-0 bounds min z)))
|
||||
(until (< (-> s5-0 bounds max z) s3-0)
|
||||
(let ((s2-0 (-> s5-0 bounds min x)))
|
||||
(until (< (-> s5-0 bounds max x) s2-0)
|
||||
(trail-graph-method-25 obj s5-0 s2-0 s3-0)
|
||||
(+! s2-0 1)
|
||||
)
|
||||
)
|
||||
(+! s3-0 1)
|
||||
)
|
||||
)
|
||||
(while (< (-> s5-0 best-conn-id) 0)
|
||||
(let ((v1-8 15))
|
||||
(set! (-> s5-0 bounds min x) (max 0 (+ (-> s5-0 bounds min x) -1)))
|
||||
(set! (-> s5-0 bounds min z) (max 0 (+ (-> s5-0 bounds min z) -1)))
|
||||
(set! (-> s5-0 bounds max x) (min (+ (-> s5-0 bounds max x) 1) v1-8))
|
||||
(set! (-> s5-0 bounds max z) (min (+ (-> s5-0 bounds max z) 1) v1-8))
|
||||
)
|
||||
(let ((s3-1 (-> s5-0 bounds min x)))
|
||||
(until (< (-> s5-0 bounds max x) s3-1)
|
||||
(trail-graph-method-25 obj s5-0 s3-1 (-> s5-0 bounds min z))
|
||||
(trail-graph-method-25 obj s5-0 s3-1 (-> s5-0 bounds max z))
|
||||
(+! s3-1 1)
|
||||
)
|
||||
)
|
||||
(let ((s3-2 (-> s5-0 bounds min z)))
|
||||
(until (< (-> s5-0 bounds max z) s3-2)
|
||||
(trail-graph-method-25 obj s5-0 (-> s5-0 bounds min x) s3-2)
|
||||
(trail-graph-method-25 obj s5-0 (-> s5-0 bounds max x) s3-2)
|
||||
(+! s3-2 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> arg1 y) 0.0)
|
||||
(-> s5-0 best-conn-id)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type trail-graph
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod trail-graph-method-9 trail-graph ((obj trail-graph) (arg0 int))
|
||||
(let ((s4-0 (-> obj node arg0)))
|
||||
(set! (-> s4-0 cost-from-start) (get-dist-score s4-0 (-> obj orig-start-pos)))
|
||||
(set! (-> s4-0 cost-to-goal) (get-dist-score s4-0 (-> obj orig-goal-pos)))
|
||||
)
|
||||
(trail-graph-method-11 obj arg0 -1)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 10 of type trail-graph
|
||||
(defmethod trail-graph-method-10 trail-graph ((obj trail-graph) (arg0 int))
|
||||
(let* ((s5-0 (-> obj conn arg0))
|
||||
(v1-1 (-> s5-0 visgroup-id))
|
||||
)
|
||||
(cond
|
||||
((> v1-1 0)
|
||||
(let* ((v1-4 (-> obj visgroup (+ v1-1 -1)))
|
||||
(s5-1 (&-> (-> obj visnode-ids) (-> v1-4 first-conn)))
|
||||
(s4-0 (-> v1-4 conn-count))
|
||||
)
|
||||
(-> obj visnode-ids)
|
||||
(while (nonzero? s4-0)
|
||||
(+! s4-0 -1)
|
||||
(trail-graph-method-9 obj (the-as int (-> s5-1 0)))
|
||||
(set! s5-1 (&-> s5-1 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(trail-graph-method-9 obj (the-as int (-> s5-0 head-id)))
|
||||
(trail-graph-method-9 obj (the-as int (-> s5-0 tail-id)))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 11 of type trail-graph
|
||||
;; WARN: new jak 2 until loop case, check carefully
|
||||
(defmethod trail-graph-method-11 trail-graph ((obj trail-graph) (arg0 int) (arg1 int))
|
||||
(let ((v1-0 (/ arg0 8))
|
||||
(a3-1 (ash 1 (logand arg0 7)))
|
||||
)
|
||||
(logior! (-> obj open-quads 0 byte v1-0) a3-1)
|
||||
)
|
||||
(let* ((v1-2 (-> obj node))
|
||||
(v0-0 (-> v1-2 arg0))
|
||||
)
|
||||
(set! (-> v0-0 parent-id) arg1)
|
||||
(let ((a3-6 (+ (-> v0-0 cost-from-start) (-> v0-0 cost-to-goal)))
|
||||
(t0-4 (-> obj open-head-id))
|
||||
(a2-2 -1)
|
||||
)
|
||||
(until #f
|
||||
(when (< t0-4 0)
|
||||
(set! (-> v0-0 next-id) -1)
|
||||
(set! (-> v0-0 prev-id) a2-2)
|
||||
(if (>= a2-2 0)
|
||||
(set! (-> v1-2 a2-2 next-id) arg0)
|
||||
(set! (-> obj open-head-id) arg0)
|
||||
)
|
||||
(return v0-0)
|
||||
)
|
||||
(let ((t1-4 (-> v1-2 t0-4)))
|
||||
(when (>= (+ (-> t1-4 cost-from-start) (-> t1-4 cost-to-goal)) a3-6)
|
||||
(set! (-> v0-0 next-id) t0-4)
|
||||
(set! (-> v0-0 prev-id) a2-2)
|
||||
(set! (-> t1-4 prev-id) arg0)
|
||||
(if (>= a2-2 0)
|
||||
(set! (-> v1-2 a2-2 next-id) arg0)
|
||||
(set! (-> obj open-head-id) arg0)
|
||||
)
|
||||
(return v0-0)
|
||||
)
|
||||
(set! a2-2 t0-4)
|
||||
(set! t0-4 (-> t1-4 next-id))
|
||||
)
|
||||
)
|
||||
)
|
||||
#f
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 22 of type trail-graph
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod trail-graph-method-22 trail-graph ((obj trail-graph) (arg0 int))
|
||||
(let ((v1-0 (/ arg0 8))
|
||||
(a2-1 (ash 1 (logand arg0 7)))
|
||||
)
|
||||
(logior! (-> obj open-quads 0 byte v1-0) a2-1)
|
||||
)
|
||||
(let* ((v1-2 (-> obj node))
|
||||
(a2-4 (-> v1-2 arg0))
|
||||
(a1-2 (-> a2-4 prev-id))
|
||||
(a2-5 (-> a2-4 next-id))
|
||||
)
|
||||
(cond
|
||||
((>= a1-2 0)
|
||||
(set! (-> v1-2 a1-2 next-id) a2-5)
|
||||
(if (>= a2-5 0)
|
||||
(set! (-> v1-2 a2-5 prev-id) a1-2)
|
||||
)
|
||||
)
|
||||
(else
|
||||
(set! (-> obj open-head-id) a2-5)
|
||||
(if (>= a2-5 0)
|
||||
(set! (-> v1-2 a2-5 prev-id) -1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition for method 24 of type trail-graph
|
||||
(defmethod get-next-to-explore trail-graph ((obj trail-graph))
|
||||
(let ((v0-0 (-> obj open-head-id)))
|
||||
(when (>= v0-0 0)
|
||||
(let* ((v1-1 (-> obj node))
|
||||
(a2-0 (-> v1-1 v0-0 next-id))
|
||||
)
|
||||
(set! (-> obj open-head-id) a2-0)
|
||||
(if (>= a2-0 0)
|
||||
(set! (-> v1-1 a2-0 prev-id) -1)
|
||||
)
|
||||
)
|
||||
(let ((v1-3 (/ v0-0 8))
|
||||
(a1-6 (ash 1 (logand v0-0 7)))
|
||||
)
|
||||
(logior! (-> obj closed-quads 0 byte v1-3) a1-6)
|
||||
(logxor! (-> obj open-quads 0 byte v1-3) (the-as uint a1-6))
|
||||
)
|
||||
)
|
||||
v0-0
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 9 of type trail-node
|
||||
;; WARN: Return type mismatch int vs uint.
|
||||
(defmethod get-dist-score trail-node ((obj trail-node) (arg0 vector))
|
||||
(let* ((f0-1 (- (-> arg0 x) (* 4096.0 (the float (-> obj x)))))
|
||||
(f1-3 (- (-> arg0 z) (* 4096.0 (the float (-> obj z)))))
|
||||
(f0-4 (sqrtf (+ (* f0-1 f0-1) (* f1-3 f1-3))))
|
||||
)
|
||||
(the uint (fmin 65535.0 (* 0.00024414062 (* 8.0 f0-4))))
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 27 of type trail-graph
|
||||
(defmethod do-some-work trail-graph ((obj trail-graph))
|
||||
(let ((s5-0 (get-next-to-explore obj)))
|
||||
(if (< s5-0 0)
|
||||
(return 2)
|
||||
)
|
||||
(let ((s4-0 (-> obj node s5-0)))
|
||||
(when (logtest? (-> s4-0 flags) (trail-node-flag tnf0))
|
||||
(set! (-> obj goal-node-id) s5-0)
|
||||
(return 3)
|
||||
)
|
||||
(let ((s3-0 (&-> (-> obj conn-ids) (-> s4-0 first-conn))))
|
||||
(countdown (s2-0 (-> s4-0 conn-count))
|
||||
(let* ((a0-7 (-> obj conn (-> s3-0 0)))
|
||||
(v1-12 (-> a0-7 flags))
|
||||
)
|
||||
(when (= (logand (the-as conn-flag (-> obj conn-mask)) v1-12) v1-12)
|
||||
(let ((s1-0 (-> a0-7 tail-id)))
|
||||
(if (= s1-0 s5-0)
|
||||
(set! s1-0 (-> a0-7 head-id))
|
||||
)
|
||||
(let ((s0-0 (-> obj node s1-0))
|
||||
(v1-17 (min #xffff (the-as int (+ (-> a0-7 cost) (-> s4-0 cost-from-start)))))
|
||||
(a0-10 (shr s1-0 3))
|
||||
(a1-7 (ash 1 (logand s1-0 7)))
|
||||
)
|
||||
(cond
|
||||
((logtest? (-> obj open-quads 0 byte a0-10) a1-7)
|
||||
(when (< (the-as uint v1-17) (-> s0-0 cost-from-start))
|
||||
(set! (-> s0-0 cost-from-start) (the-as uint v1-17))
|
||||
(trail-graph-method-22 obj (the-as int s1-0))
|
||||
(trail-graph-method-11 obj (the-as int s1-0) s5-0)
|
||||
)
|
||||
)
|
||||
((not (logtest? (-> obj closed-quads 0 byte a0-10) a1-7))
|
||||
(set! (-> s0-0 cost-from-start) (the-as uint v1-17))
|
||||
(set! (-> s0-0 cost-to-goal) (get-dist-score s0-0 (-> obj orig-goal-pos)))
|
||||
(trail-graph-method-11 obj (the-as int s1-0) s5-0)
|
||||
)
|
||||
((< (the-as uint v1-17) (-> s0-0 cost-from-start))
|
||||
(set! (-> s0-0 cost-from-start) (the-as uint v1-17))
|
||||
(trail-graph-method-11 obj (the-as int s1-0) s5-0)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s3-0 (&-> s3-0 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
1
|
||||
)
|
||||
|
||||
;; definition for method 28 of type trail-graph
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
;; ERROR: Unsupported inline assembly instruction kind - [mfc0 v1, Count]
|
||||
(defmethod run-until-done-or-timeout trail-graph ((obj trail-graph) (arg0 int))
|
||||
(local-vars (v1-1 int))
|
||||
(let ((v0-0 (the-as int (-> obj mode))))
|
||||
0
|
||||
(.mfc0 v1-1 Count)
|
||||
(while (and (= v0-0 1) (< (the-as uint v1-1) (the-as uint arg0)))
|
||||
(set! v0-0 (do-some-work obj))
|
||||
(.mfc0 v1-1 Count)
|
||||
)
|
||||
(set! (-> obj mode) (the-as uint v0-0))
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; definition of type trail-vis-work
|
||||
(deftype trail-vis-work (structure)
|
||||
((best-count uint32 :offset-assert 0)
|
||||
(best-dist float :offset-assert 4)
|
||||
(start-conn-id uint32 :offset-assert 8)
|
||||
(p0 vector :inline :offset-assert 16)
|
||||
(p1 vector :inline :offset-assert 32)
|
||||
(best-node-id uint16 64 :offset-assert 48)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xb0
|
||||
:flag-assert #x9000000b0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-vis-work
|
||||
(defmethod inspect trail-vis-work ((obj trail-vis-work))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-vis-work)
|
||||
(format #t "~1Tbest-count: ~D~%" (-> obj best-count))
|
||||
(format #t "~1Tbest-dist: ~f~%" (-> obj best-dist))
|
||||
(format #t "~1Tstart-conn-id: ~D~%" (-> obj start-conn-id))
|
||||
(format #t "~1Tp0: #<vector @ #x~X>~%" (-> obj p0))
|
||||
(format #t "~1Tp1: #<vector @ #x~X>~%" (-> obj p1))
|
||||
(format #t "~1Tbest-node-id[64] @ #x~X~%" (-> obj best-node-id))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for method 19 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
(defmethod trail-graph-method-19 trail-graph ((obj trail-graph) (arg0 int) (arg1 int))
|
||||
(local-vars (s4-1 symbol))
|
||||
(let* ((s4-0 (-> obj node))
|
||||
(v1-2 (-> s4-0 arg1))
|
||||
(s5-0 (new 'stack-no-clear 'trail-vis-work))
|
||||
)
|
||||
(set! (-> s5-0 start-conn-id) (the-as uint arg0))
|
||||
(set-vector!
|
||||
(-> s5-0 p0)
|
||||
(* 4096.0 (the float (-> v1-2 x)))
|
||||
(-> obj orig-goal-pos y)
|
||||
(* 4096.0 (the float (-> v1-2 z)))
|
||||
1.0
|
||||
)
|
||||
(set! (-> s5-0 p1 quad) (-> s5-0 p0 quad))
|
||||
(set! (-> s5-0 best-count) (the-as uint 0))
|
||||
(set! (-> s5-0 best-dist) -1.0)
|
||||
(let ((s2-0 (&-> (-> obj conn-ids) (-> v1-2 first-conn))))
|
||||
(countdown (s1-0 (-> v1-2 conn-count))
|
||||
(let* ((v1-4 (-> obj conn (-> s2-0 0)))
|
||||
(s0-0 (-> v1-4 tail-id))
|
||||
)
|
||||
(if (= s0-0 arg1)
|
||||
(set! s0-0 (-> v1-4 head-id))
|
||||
)
|
||||
(let ((v1-8 (-> s4-0 s0-0)))
|
||||
(set! (-> s5-0 p1 x) (* 4096.0 (the float (-> v1-8 x))))
|
||||
(set! (-> s5-0 p1 z) (* 4096.0 (the float (-> v1-8 z))))
|
||||
)
|
||||
(let ((f0-11 (vector-segment-distance-point! (-> obj orig-goal-pos) (-> s5-0 p0) (-> s5-0 p1) (the-as vector #f)))
|
||||
(f1-8 (-> s5-0 best-dist))
|
||||
)
|
||||
(cond
|
||||
((or (< f1-8 0.0) (< f0-11 f1-8))
|
||||
(set! (-> s5-0 best-dist) f0-11)
|
||||
(set! (-> s5-0 best-count) (the-as uint 1))
|
||||
(set! (-> s5-0 best-node-id 0) s0-0)
|
||||
)
|
||||
((= f0-11 f1-8)
|
||||
(let ((v1-15 (-> s5-0 best-count)))
|
||||
(when (< v1-15 (the-as uint 64))
|
||||
(set! (-> s5-0 best-node-id v1-15) s0-0)
|
||||
(set! (-> s5-0 best-count) (+ v1-15 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s2-0 (&-> s2-0 1))
|
||||
)
|
||||
)
|
||||
(update-node-flags-for-conn obj (the-as int (-> s5-0 start-conn-id)) (trail-node-flag tnf1) (trail-node-flag))
|
||||
(countdown (v1-20 (-> s5-0 best-count))
|
||||
(let ((a1-14 (-> s4-0 (-> s5-0 best-node-id v1-20))))
|
||||
(when (= (logand (-> a1-14 flags) (trail-node-flag tnf0 tnf1)) (trail-node-flag tnf0 tnf1))
|
||||
(set! s4-1 #t)
|
||||
(goto cfg-22)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! s4-1 #f)
|
||||
(label cfg-22)
|
||||
(update-node-flags-for-conn obj (the-as int (-> s5-0 start-conn-id)) (trail-node-flag) (trail-node-flag tnf1))
|
||||
)
|
||||
s4-1
|
||||
)
|
||||
|
||||
;; definition for method 26 of type trail-graph
|
||||
;; INFO: Used lq/sq
|
||||
;; WARN: Return type mismatch int vs none.
|
||||
(defmethod do-search! trail-graph ((obj trail-graph) (arg0 vector) (arg1 vector) (arg2 trail-cached-search-info))
|
||||
(reset-search-state obj)
|
||||
(+! (-> obj search-id) 1)
|
||||
(set! (-> obj orig-start-pos quad) (-> arg0 quad))
|
||||
(let ((a1-1 -1))
|
||||
(when arg2
|
||||
(let ((v1-6 (-> arg2 goal-conn-id)))
|
||||
(when (and (>= v1-6 0)
|
||||
(= (-> arg2 orig-goal-pos x) (-> arg1 x))
|
||||
(= (-> arg2 orig-goal-pos y) (-> arg1 y))
|
||||
(= (-> arg2 orig-goal-pos z) (-> arg1 z))
|
||||
)
|
||||
(set! a1-1 v1-6)
|
||||
(set! (-> obj conn-goal-pos quad) (-> arg2 conn-goal-pos quad))
|
||||
)
|
||||
)
|
||||
)
|
||||
(set! (-> obj orig-goal-pos quad) (-> arg1 quad))
|
||||
(when (< a1-1 0)
|
||||
(set! a1-1 (do-path obj (-> obj orig-goal-pos) (-> obj conn-goal-pos)))
|
||||
(when arg2
|
||||
(set! (-> arg2 goal-conn-id) a1-1)
|
||||
(set! (-> arg2 orig-goal-pos quad) (-> obj orig-goal-pos quad))
|
||||
(set! (-> arg2 conn-goal-pos quad) (-> obj conn-goal-pos quad))
|
||||
)
|
||||
)
|
||||
(set! (-> obj goal-conn-id) a1-1)
|
||||
(update-node-flags-for-conn obj a1-1 (trail-node-flag tnf0) (trail-node-flag))
|
||||
)
|
||||
(let ((v1-17 -1))
|
||||
(let ((a0-16 (-> *game-info* features)))
|
||||
(if (not (logtest? (game-feature pass-red) a0-16))
|
||||
(set! v1-17 (logand -2 v1-17))
|
||||
)
|
||||
(if (not (logtest? (game-feature pass-green) a0-16))
|
||||
(set! v1-17 (logand -3 v1-17))
|
||||
)
|
||||
(if (not (logtest? (game-feature pass-yellow) a0-16))
|
||||
(set! v1-17 (logand -5 v1-17))
|
||||
)
|
||||
(if (not (logtest? (game-feature pass-blue) a0-16))
|
||||
(set! v1-17 (logand -9 v1-17))
|
||||
)
|
||||
)
|
||||
(set! (-> obj conn-mask) (the-as uint v1-17))
|
||||
)
|
||||
(let ((s5-1 (do-path obj (-> obj orig-start-pos) (-> obj conn-start-pos))))
|
||||
(trail-graph-method-10 obj s5-1)
|
||||
(let ((a2-5 (-> obj open-head-id)))
|
||||
(if (and (logtest? (-> obj node a2-5 flags) (trail-node-flag tnf0)) (trail-graph-method-19 obj s5-1 a2-5))
|
||||
(set! (-> obj mode) (the-as uint 3))
|
||||
(set! (-> obj mode) (the-as uint 1))
|
||||
)
|
||||
)
|
||||
)
|
||||
(none)
|
||||
)
|
||||
|
||||
;; failed to figure out what this is:
|
||||
(if (not (try-initialize *trail-graph*))
|
||||
(set! *trail-graph* #f)
|
||||
)
|
||||
-310
@@ -1,310 +0,0 @@
|
||||
;;-*-Lisp-*-
|
||||
(in-package goal)
|
||||
|
||||
;; definition of type trail-node
|
||||
(deftype trail-node (structure)
|
||||
((next-id int16 :offset-assert 0)
|
||||
(prev-id int16 :offset-assert 2)
|
||||
(parent-id int16 :offset-assert 4)
|
||||
(x int16 :offset-assert 6)
|
||||
(z int16 :offset-assert 8)
|
||||
(first-conn uint16 :offset-assert 10)
|
||||
(cost-from-start uint16 :offset-assert 12)
|
||||
(cost-to-goal uint16 :offset-assert 14)
|
||||
(flags uint8 :offset-assert 16)
|
||||
(conn-count uint8 :offset-assert 17)
|
||||
)
|
||||
:method-count-assert 12
|
||||
:size-assert #x12
|
||||
:flag-assert #xc00000012
|
||||
(:methods
|
||||
(trail-node-method-9 () none 9)
|
||||
(trail-node-method-10 () none 10)
|
||||
(trail-node-method-11 () none 11)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-node
|
||||
(defmethod inspect trail-node ((obj trail-node))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-node)
|
||||
(format #t "~1Tnext-id: ~D~%" (-> obj next-id))
|
||||
(format #t "~1Tprev-id: ~D~%" (-> obj prev-id))
|
||||
(format #t "~1Tparent-id: ~D~%" (-> obj parent-id))
|
||||
(format #t "~1Tx: ~D~%" (-> obj x))
|
||||
(format #t "~1Tz: ~D~%" (-> obj z))
|
||||
(format #t "~1Tfirst-conn: ~D~%" (-> obj first-conn))
|
||||
(format #t "~1Tcost-from-start: ~D~%" (-> obj cost-from-start))
|
||||
(format #t "~1Tcost-to-goal: ~D~%" (-> obj cost-to-goal))
|
||||
(format #t "~1Tflags: ~D~%" (-> obj flags))
|
||||
(format #t "~1Tconn-count: ~D~%" (-> obj conn-count))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-visgroup
|
||||
(deftype trail-visgroup (structure)
|
||||
((first-node uint16 :offset-assert 0)
|
||||
(node-count uint8 :offset-assert 2)
|
||||
(pad uint8 :offset-assert 3)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-visgroup
|
||||
(defmethod inspect trail-visgroup ((obj trail-visgroup))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-visgroup)
|
||||
(format #t "~1Tfirst-node: ~D~%" (-> obj first-node))
|
||||
(format #t "~1Tnode-count: ~D~%" (-> obj node-count))
|
||||
(format #t "~1Tpad: ~D~%" (-> obj pad))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-conn
|
||||
(deftype trail-conn (structure)
|
||||
((head-id uint16 :offset-assert 0)
|
||||
(tail-id uint16 :offset-assert 2)
|
||||
(flags uint8 :offset-assert 4)
|
||||
(visgroup-id uint8 :offset-assert 5)
|
||||
(cost uint16 :offset-assert 6)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8
|
||||
:flag-assert #xa00000008
|
||||
(:methods
|
||||
(trail-conn-method-9 () none 9)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-conn
|
||||
(defmethod inspect trail-conn ((obj trail-conn))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-conn)
|
||||
(format #t "~1Thead-id: ~D~%" (-> obj head-id))
|
||||
(format #t "~1Ttail-id: ~D~%" (-> obj tail-id))
|
||||
(format #t "~1Tflags: ~D~%" (-> obj flags))
|
||||
(format #t "~1Tvisgroup-id: ~D~%" (-> obj visgroup-id))
|
||||
(format #t "~1Tcost: ~D~%" (-> obj cost))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-conn-hash-cell
|
||||
(deftype trail-conn-hash-cell (structure)
|
||||
((first-conn uint16 :offset-assert 0)
|
||||
(conn-count uint8 :offset-assert 2)
|
||||
(pad uint8 :offset-assert 3)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x4
|
||||
:flag-assert #x900000004
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-conn-hash-cell
|
||||
(defmethod inspect trail-conn-hash-cell ((obj trail-conn-hash-cell))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-conn-hash-cell)
|
||||
(format #t "~1Tfirst-conn: ~D~%" (-> obj first-conn))
|
||||
(format #t "~1Tconn-count: ~D~%" (-> obj conn-count))
|
||||
(format #t "~1Tpad: ~D~%" (-> obj pad))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-conn-search
|
||||
(deftype trail-conn-search (structure)
|
||||
((best-conn-id int32 :offset-assert 0)
|
||||
(best-dist float :offset-assert 4)
|
||||
(src-pos vector :offset-assert 8)
|
||||
(conn-pos vector :offset-assert 12)
|
||||
(debug-cells-searched int32 :offset-assert 16)
|
||||
(debug-conns-searched int32 :offset-assert 20)
|
||||
(bounds bounding-box4w :inline :offset-assert 32)
|
||||
(cell-quads qword 2 :inline :offset-assert 64)
|
||||
(conn-quads qword 7 :inline :offset-assert 96)
|
||||
(cell-bits vector16ub 2 :inline :offset 64)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xd0
|
||||
:flag-assert #x9000000d0
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-conn-search
|
||||
(defmethod inspect trail-conn-search ((obj trail-conn-search))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-conn-search)
|
||||
(format #t "~1Tbest-conn-id: ~D~%" (-> obj best-conn-id))
|
||||
(format #t "~1Tbest-dist: ~f~%" (-> obj best-dist))
|
||||
(format #t "~1Tsrc-pos: #<vector @ #x~X>~%" (-> obj src-pos))
|
||||
(format #t "~1Tconn-pos: #<vector @ #x~X>~%" (-> obj conn-pos))
|
||||
(format #t "~1Tdebug-cells-searched: ~D~%" (-> obj debug-cells-searched))
|
||||
(format #t "~1Tdebug-conns-searched: ~D~%" (-> obj debug-conns-searched))
|
||||
(format #t "~1Tbounds: #<bounding-box4w @ #x~X>~%" (-> obj bounds))
|
||||
(format #t "~1Tcell-quads[2] @ #x~X~%" (-> obj cell-quads))
|
||||
(format #t "~1Tconn-quads[7] @ #x~X~%" (-> obj conn-quads))
|
||||
(format #t "~1Tcell-bits[2] @ #x~X~%" (-> obj cell-quads))
|
||||
(format #t "~1Tconn-bits[2] @ #x~X~%" (-> obj conn-quads))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-conn-hash
|
||||
(deftype trail-conn-hash (basic)
|
||||
((cell-width meters :offset-assert 4)
|
||||
(origin vector :inline :offset-assert 16)
|
||||
(cell uint32 :offset-assert 32)
|
||||
(conn-ids uint32 :offset-assert 36)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-conn-hash
|
||||
(defmethod inspect trail-conn-hash ((obj trail-conn-hash))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tcell-width: (meters ~m)~%" (-> obj cell-width))
|
||||
(format #t "~1Torigin: #<vector @ #x~X>~%" (-> obj origin))
|
||||
(format #t "~1Tcell: #x~X~%" (-> obj cell))
|
||||
(format #t "~1Tconn-ids: #x~X~%" (-> obj conn-ids))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-cached-search-info
|
||||
(deftype trail-cached-search-info (structure)
|
||||
((goal-conn-id int16 :offset-assert 0)
|
||||
(orig-goal-pos vector :inline :offset-assert 16)
|
||||
(conn-goal-pos vector :inline :offset-assert 32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x30
|
||||
:flag-assert #x900000030
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-cached-search-info
|
||||
(defmethod inspect trail-cached-search-info ((obj trail-cached-search-info))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj 'trail-cached-search-info)
|
||||
(format #t "~1Tgoal-conn-id: ~D~%" (-> obj goal-conn-id))
|
||||
(format #t "~1Torig-goal-pos: #<vector @ #x~X>~%" (-> obj orig-goal-pos))
|
||||
(format #t "~1Tconn-goal-pos: #<vector @ #x~X>~%" (-> obj conn-goal-pos))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition of type trail-graph
|
||||
(deftype trail-graph (basic)
|
||||
((mode uint8 :offset-assert 4)
|
||||
(search-id uint32 :offset-assert 8)
|
||||
(open-head-id int16 :offset-assert 12)
|
||||
(goal-conn-id int16 :offset-assert 14)
|
||||
(goal-node-id int16 :offset-assert 16)
|
||||
(node-count uint16 :offset-assert 18)
|
||||
(conn-count uint16 :offset-assert 20)
|
||||
(conn-mask uint8 :offset-assert 22)
|
||||
(node uint32 :offset-assert 24)
|
||||
(conn uint32 :offset-assert 28)
|
||||
(conn-ids uint32 :offset-assert 32)
|
||||
(visgroup uint32 :offset-assert 36)
|
||||
(visnode-ids uint32 :offset-assert 40)
|
||||
(conn-hash basic :offset-assert 44)
|
||||
(orig-start-pos vector :inline :offset-assert 48)
|
||||
(orig-goal-pos vector :inline :offset-assert 64)
|
||||
(conn-start-pos vector :inline :offset-assert 80)
|
||||
(conn-goal-pos vector :inline :offset-assert 96)
|
||||
(open-quads qword 6 :inline :offset-assert 112)
|
||||
(closed-quads qword 6 :inline :offset-assert 208)
|
||||
)
|
||||
:method-count-assert 29
|
||||
:size-assert #x130
|
||||
:flag-assert #x1d00000130
|
||||
(:methods
|
||||
(trail-graph-method-9 () none 9)
|
||||
(trail-graph-method-10 () none 10)
|
||||
(trail-graph-method-11 () none 11)
|
||||
(trail-graph-method-12 () none 12)
|
||||
(trail-graph-method-13 () none 13)
|
||||
(trail-graph-method-14 () none 14)
|
||||
(trail-graph-method-15 () none 15)
|
||||
(trail-graph-method-16 () none 16)
|
||||
(trail-graph-method-17 () none 17)
|
||||
(trail-graph-method-18 () none 18)
|
||||
(trail-graph-method-19 () none 19)
|
||||
(trail-graph-method-20 () none 20)
|
||||
(trail-graph-method-21 () none 21)
|
||||
(trail-graph-method-22 () none 22)
|
||||
(trail-graph-method-23 () none 23)
|
||||
(trail-graph-method-24 () none 24)
|
||||
(trail-graph-method-25 () none 25)
|
||||
(trail-graph-method-26 () none 26)
|
||||
(trail-graph-method-27 () none 27)
|
||||
(trail-graph-method-28 () none 28)
|
||||
)
|
||||
)
|
||||
|
||||
;; definition for method 3 of type trail-graph
|
||||
(defmethod inspect trail-graph ((obj trail-graph))
|
||||
(when (not obj)
|
||||
(set! obj obj)
|
||||
(goto cfg-4)
|
||||
)
|
||||
(format #t "[~8x] ~A~%" obj (-> obj type))
|
||||
(format #t "~1Tmode: ~D~%" (-> obj mode))
|
||||
(format #t "~1Tsearch-id: ~D~%" (-> obj search-id))
|
||||
(format #t "~1Topen-head-id: ~D~%" (-> obj open-head-id))
|
||||
(format #t "~1Tgoal-conn-id: ~D~%" (-> obj goal-conn-id))
|
||||
(format #t "~1Tgoal-node-id: ~D~%" (-> obj goal-node-id))
|
||||
(format #t "~1Tnode-count: ~D~%" (-> obj node-count))
|
||||
(format #t "~1Tconn-count: ~D~%" (-> obj conn-count))
|
||||
(format #t "~1Tconn-mask: ~D~%" (-> obj conn-mask))
|
||||
(format #t "~1Tnode: #x~X~%" (-> obj node))
|
||||
(format #t "~1Tconn: #x~X~%" (-> obj conn))
|
||||
(format #t "~1Tconn-ids: #x~X~%" (-> obj conn-ids))
|
||||
(format #t "~1Tvisgroup: #x~X~%" (-> obj visgroup))
|
||||
(format #t "~1Tvisnode-ids: #x~X~%" (-> obj visnode-ids))
|
||||
(format #t "~1Tconn-hash: ~A~%" (-> obj conn-hash))
|
||||
(format #t "~1Torig-start-pos: #<vector @ #x~X>~%" (-> obj orig-start-pos))
|
||||
(format #t "~1Torig-goal-pos: #<vector @ #x~X>~%" (-> obj orig-goal-pos))
|
||||
(format #t "~1Tconn-start-pos: #<vector @ #x~X>~%" (-> obj conn-start-pos))
|
||||
(format #t "~1Tconn-goal-pos: #<vector @ #x~X>~%" (-> obj conn-goal-pos))
|
||||
(format #t "~1Topen-quads[6] @ #x~X~%" (-> obj open-quads))
|
||||
(format #t "~1Tclosed-quads[6] @ #x~X~%" (-> obj closed-quads))
|
||||
(format #t "~1Topen-bits[2] @ #x~X~%" (-> obj open-quads))
|
||||
(format #t "~1Tclosed-bits[2] @ #x~X~%" (-> obj closed-quads))
|
||||
(label cfg-4)
|
||||
obj
|
||||
)
|
||||
|
||||
;; definition for symbol *trail-graph*, type trail-graph
|
||||
(define *trail-graph* (the-as trail-graph #f))
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-3
@@ -938,9 +938,7 @@
|
||||
(set! (-> v1-39 nav-cull-radius) 61440.0)
|
||||
)
|
||||
0
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+1
-3
@@ -1504,8 +1504,6 @@
|
||||
(the-as float s5-2)
|
||||
)
|
||||
)
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0))
|
||||
(none)
|
||||
)
|
||||
|
||||
+1
-3
@@ -1675,9 +1675,7 @@
|
||||
318
|
||||
(new 'static 'vector :x -1433.6 :y 2785.28 :z -1761.28 :w 163840.0)
|
||||
)
|
||||
(set! (-> obj minimap)
|
||||
(minimap-method-12 *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0)
|
||||
)
|
||||
(set! (-> obj minimap) (add-icon! *minimap* obj (the-as uint 70) (the-as int #f) (the-as vector #t) 0))
|
||||
0
|
||||
(none)
|
||||
)
|
||||
|
||||
+2
-2
@@ -798,7 +798,7 @@
|
||||
(set! (-> obj draw light-index) (the-as uint 1))
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 1142) obj))
|
||||
(set! (-> obj b) #f)
|
||||
(set! (-> obj conn) (minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(set! (-> obj conn) (add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
|
||||
(go (method-of-object obj broken))
|
||||
(go (method-of-object obj idle))
|
||||
@@ -857,7 +857,7 @@
|
||||
(set! (-> obj draw light-index) (the-as uint 1))
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 1142) obj))
|
||||
(set! (-> obj b) (the-as basic #t))
|
||||
(set! (-> obj conn) (minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(set! (-> obj conn) (add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0))
|
||||
(if (and (-> obj entity) (logtest? (-> obj entity extra perm status) (entity-perm-status subtask-complete)))
|
||||
(go (method-of-object obj broken))
|
||||
(go (method-of-object obj idle))
|
||||
|
||||
+1
-1
@@ -766,7 +766,7 @@
|
||||
(countdown (s4-2 (-> s5-2 length))
|
||||
(let ((s3-1 (-> s5-2 data s4-2 actor)))
|
||||
(when s3-1
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector s3-1) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector s3-1) 0)
|
||||
(+! (-> obj total-buttons) 1)
|
||||
(if (logtest? (-> s3-1 extra perm status) (entity-perm-status subtask-complete))
|
||||
(+! (-> obj pressed-count) 1)
|
||||
|
||||
+1
-1
@@ -1542,7 +1542,7 @@
|
||||
(dotimes (gp-0 (the-as int (-> self actor-group 0 0)))
|
||||
(let ((t0-1 (-> (&+ (-> self actor-group 0) (* gp-0 8)) 3)))
|
||||
(if t0-1
|
||||
(minimap-method-12 *minimap* self (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
(add-icon! *minimap* self (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+2
-2
@@ -1596,7 +1596,7 @@
|
||||
)
|
||||
)
|
||||
(set! (-> obj enemy-flags) (logior (enemy-flag trackable-backup enable-on-hostile) (-> obj enemy-flags)))
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
0
|
||||
(none)
|
||||
)
|
||||
@@ -1751,7 +1751,7 @@
|
||||
(dotimes (s5-0 (length (-> obj actor-group 0)))
|
||||
(let ((t0-1 (-> obj actor-group 0 data s5-0 actor)))
|
||||
(if t0-1
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector t0-1) 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
+1
-1
@@ -1388,7 +1388,7 @@
|
||||
(the-as pair 0)
|
||||
)
|
||||
(set! (-> obj part) (create-launch-control (-> *part-group-id-table* 78) obj))
|
||||
(minimap-method-12 *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
(add-icon! *minimap* obj (the-as uint 16) (the-as int #f) (the-as vector #t) 0)
|
||||
(go (method-of-object obj idle))
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -269,6 +269,8 @@
|
||||
"(method 3 rhino)",
|
||||
"(method 202 crimson-guard-level)", // vector-dot
|
||||
"(method 10 idle-control)", // re-assigns `self`
|
||||
"(method 18 minimap)",
|
||||
"(method 16 minimap)",
|
||||
"(method 60 fort-turret)", // they defined the same method twice in the same file, identical impl, just returns #f
|
||||
"(method 23 dig-tether)" // working around annoying decomp array output
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user