finalizing

This commit is contained in:
Tyler Wilding
2021-08-13 21:14:05 -04:00
parent 7878167cd9
commit eaee7e1451
13 changed files with 245 additions and 323 deletions
+5 -1
View File
@@ -56,4 +56,8 @@ tasks:
ignore_error: true
- python ./scripts/update_decomp_reference.py ./failures ./test/decompiler/reference/
- task: offline-tests
find-label-types:
cmds:
- python ./scripts/next-decomp-file.py --file "{{.FILE}}"
- task: decomp
- python ./scripts/find-label-types.py --file "{{.FILE}}"
+7 -7
View File
@@ -9701,7 +9701,7 @@
:flag-assert #xc00000028
(:methods
(new (symbol type process pickup-type float) _type_ 0)
(dummy-9 () none 9)
(dummy-9 () uint 9) ;; See nav-enemy::process-drawable-death-event-handler
(reset! (_type_ symbol) none 10)
(dummy-11 (_type_) float 11)
)
@@ -22100,11 +22100,11 @@
(define-extern nav-enemy-execute-jump (function none :behavior nav-enemy))
(define-extern nav-enemy-jump-land-anim (function none :behavior nav-enemy)) ;; TODO
(define-extern nav-enemy-rnd-float-range (function float float float :behavior nav-enemy))
(define-extern nav-enemy-common-post (function none)) ;; TODO not confirmed
(define-extern nav-enemy-common-post (function none :behavior nav-enemy)) ;; TODO not confirmed
(define-extern nav-enemy-execute-custom-jump (function int float float none :behavior nav-enemy))
(define-extern nav-enemy-initialize-custom-jump (function vector symbol float float float none :behavior nav-enemy))
(define-extern nav-enemy-simple-post (function none)) ;; TODO not confirmed
(define-extern nav-enemy-fall-and-play-death-anim (function art-joint-anim int float none)) ;; second arg is whatever is passed to align-control::11
(define-extern nav-enemy-simple-post (function none :behavior nav-enemy)) ;; TODO not confirmed
(define-extern nav-enemy-fall-and-play-death-anim (function art-joint-anim int float none :behavior nav-enemy)) ;; second arg is whatever is passed to align-control::11
(define-extern nav-enemy-neck-control-inactive (function none :behavior nav-enemy))
(define-extern nav-enemy-frustrated? (function symbol :behavior nav-enemy))
(define-extern nav-enemy-player-at-frustration-point? (function symbol :behavior nav-enemy))
@@ -22112,7 +22112,7 @@
(define-extern nav-enemy-rnd-go-idle? (function float symbol))
(define-extern nav-enemy-notice-player? (function symbol :behavior nav-enemy))
(define-extern nav-enemy-turn-to-face-dir (function vector float none :behavior nav-enemy))
(define-extern nav-enemy-facing-direction? (function vector float symbol))
(define-extern nav-enemy-facing-direction? (function vector float symbol :behavior nav-enemy))
(define-extern nav-enemy-test-point-near-nav-mesh? (function vector symbol :behavior nav-enemy))
(define-extern nav-enemy-travel-post (function none :behavior nav-enemy))
(define-extern nav-enemy-get-new-patrol-point (function int :behavior nav-enemy))
@@ -22123,7 +22123,7 @@
(define-extern nav-enemy-rnd-percent? (function float symbol))
(define-extern nav-enemy-default-event-handler (function process int symbol event-message-block object :behavior nav-enemy)) ;; TODO - last arg is definitely a vector...but also not?
(define-extern nav-enemy-jump-event-handler (function process int symbol event-message-block object :behavior nav-enemy))
(define-extern process-drawable-death-event-handler (function process int symbol event-message-block object :behavior process-drawable)) ;; First two args are unused
(define-extern process-drawable-death-event-handler (function process int symbol event-message-block uint :behavior process-drawable)) ;; First two args are unused
(define-extern nav-enemy-patrol-post (function none :behavior nav-enemy))
(define-extern nav-enemy-chase-post (function none :behavior nav-enemy))
(define-extern nav-enemy-flee-post (function none :behavior nav-enemy))
@@ -22134,7 +22134,7 @@
(define-extern nav-enemy-facing-player? (function float symbol))
(define-extern nav-enemy-test-nav-mesh-intersection-xz? (function vector symbol :behavior nav-enemy)) ;; TODO - vector is a guess, check nav-control::16
(define-extern nav-enemy-test-point-in-nav-mesh? (function vector symbol :behavior nav-enemy)) ;; TODO - vector is a guess, check nav-control::16
(define-extern nav-enemy-set-base-collide-sphere-collide-with (function uint none)) ;; unused
(define-extern nav-enemy-set-base-collide-sphere-collide-with (function uint none :behavior nav-enemy)) ;; unused
(define-extern ja-group-index? (function int symbol :behavior nav-enemy))
(define-extern nav-enemy-jump-post (function none :behavior nav-enemy))
(define-extern nav-enemy-jump-land-post (function none :behavior nav-enemy))
@@ -585,7 +585,7 @@
],
"nav-enemy": [
[8, "(function none)"], // TODO - NECK!
[8, "(function none :behavior nav-enemy)"],
[9, "(function none)"], // stubbed
[10, "(function uint :behavior nav-enemy)"],
[11, "(function object :behavior nav-enemy)"],
@@ -600,7 +600,7 @@
[21, "(function none :behavior nav-enemy)"],
[29, "(function symbol :behavior nav-enemy)"],
[30, "(function object :behavior nav-enemy)"],
[31, "(function object :behavior nav-enemy)"], // TODO - art-element confusion
[31, "(function object :behavior nav-enemy)"],
[32, "(function vector :behavior nav-enemy)"],
[33, "(function object :behavior nav-enemy)"],
[34, "(function object :behavior nav-enemy)"],
@@ -1414,6 +1414,68 @@
],
"nav-enemy": [
["L16", "_lambda_", true],
["L18", "_lambda_", true],
["L19", "_lambda_", true],
["L20", "_lambda_", true],
["L24", "_lambda_", true],
["L29", "_lambda_", true],
["L31", "_lambda_", true],
["L32", "_lambda_", true],
["L33", "_lambda_", true],
["L36", "_lambda_", true],
["L41", "_lambda_", true],
["L44", "_lambda_", true],
["L45", "_lambda_", true],
// ["L76", "_lambda_", true],
["L82", "_lambda_", true],
["L86", "_lambda_", true],
["L88", "_lambda_", true],
["L90", "_lambda_", true],
["L91", "_lambda_", true],
["L92", "_lambda_", true],
["L93", "_lambda_", true],
["L95", "_lambda_", true],
["L96", "_lambda_", true],
["L97", "_lambda_", true],
["L109", "_lambda_", true],
["L110", "_lambda_", true],
["L111", "_lambda_", true],
["L113", "_lambda_", true],
["L120", "_lambda_", true],
["L122", "_lambda_", true],
["L124", "_lambda_", true],
["L135", "_lambda_", true],
["L142", "_lambda_", true],
["L146", "_lambda_", true],
["L150", "_lambda_", true],
["L153", "_lambda_", true],
["L155", "_lambda_", true],
["L157", "_lambda_", true],
["L165", "_lambda_", true],
["L175", "_lambda_", true],
["L176", "_lambda_", true],
["L177", "_lambda_", true],
["L179", "_lambda_", true],
["L183", "_lambda_", true],
["L331", "shadow-control", true],
["L332", "state", true],
["L333", "state", true],
["L334", "state", true],
["L335", "state", true],
["L336", "state", true],
["L337", "state", true],
["L338", "state", true],
["L339", "state", true],
["L340", "state", true],
["L341", "state", true],
["L342", "state", true],
["L343", "state", true],
["L344", "state", true],
["L345", "state", true],
["L346", "state", true],
["L347", "state", true],
["L348", "state", true],
["L349", "attack-info", true],
["L353", "float", true],
["L354", "float", true],
@@ -1444,7 +1506,9 @@
["L386", "float", true],
["L387", "float", true],
["L391", "float", true],
["L389", "float", true]
["L389", "float", true],
["L392", "rgba", true],
["L393", "rgba", true]
],
// please do not add things after this entry! git is dumb.
@@ -1801,6 +1801,7 @@
"nav-enemy-set-base-collide-sphere-collide-with": [
[[0, 999], "s6", "nav-enemy"],
[19, "v1", "collide-shape-prim-group"],
[32, "v1", "collide-shape-prim-sphere"],
[33, "s5", "collide-shape-prim-group"],
[37, "v1", "collide-shape-prim-sphere"],
@@ -1810,334 +1811,127 @@
[50, "s4", "collide-shape-prim-group"]
],
"nav-enemy-turn-to-face-dir": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-facing-direction?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-facing-point?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-test-nav-mesh-intersection-xz?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-test-point-in-nav-mesh?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-turn-to-face-point": [
[[0, 999], "s6", "nav-enemy"]
],
"ja-group-index?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-reset-frustration": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-player-at-frustration-point?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-frustrated?": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-jump-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-initialize-custom-jump": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-initialize-jump": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-execute-custom-jump": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-execute-jump": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-jump-land-anim": [
[[0, 999], "s6", "nav-enemy"],
[39, "v1", "art-joint-anim"]
],
"nav-enemy-jump-land-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-travel-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-patrol-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-falling-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-death-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-chase-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-flee-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-face-player-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-notice-player?": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 8 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[42, 46], "t9", "(function object)"]
],
"(anon-function 10 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 12 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 14 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 17 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 20 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 30 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 31 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[27, "v1", "art-joint-anim"],
[[70, 74], "t9", "(function object)"]
],
"(anon-function 32 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 36 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 39 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 40 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 41 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 51 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[39, 43], "t9", "(function object)"]
],
"(anon-function 54 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[27, "v1", "art-joint-anim"],
[[80, 84], "t9", "(function object)"]
],
"(anon-function 55 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[9, 13], "t9", "(function object)"]
],
"(anon-function 56 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[23, "v1", "art-joint-anim"],
[105, "v1", "art-joint-anim"],
[167, "v1", "art-joint-anim"],
[249, "v1", "art-joint-anim"]
],
"(anon-function 58 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 59 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 60 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 61 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[35, 39], "t9", "(function object)"]
],
"(anon-function 57 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[47, 51], "t9", "(function object)"],
[[89, 93], "t9", "(function object)"],
[[98, 102], "t9", "(function object)"]
],
"(anon-function 42 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[10, 14], "t9", "(function object)"],
[[31, 35], "t9", "(function object)"],
[[67, 71], "t9", "(function object)"]
],
"(anon-function 43 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[33, 37], "t9", "(function object)"]
],
"(anon-function 44 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 46 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 50 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[27, "v1", "art-joint-anim"],
[91, "v1", "art-joint-anim"]
],
"(anon-function 45 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[5, 9], "t9", "(function object)"],
[[14, 18], "t9", "(function object)"],
[[75, 79], "t9", "(function object)"],
[[91, 95], "t9", "(function object)"]
],
"(anon-function 37 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[1, 5], "t9", "(function object)"]
],
"(anon-function 38 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[10, 14], "t9", "(function object)"],
[[38, 42], "t9", "(function object)"],
[[94, 98], "t9", "(function object)"],
[[124, 128], "t9", "(function object)"]
],
"(anon-function 33 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[1, 5], "t9", "(function object)"]
],
"(anon-function 34 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[1, 5], "t9", "(function object)"]
],
"(anon-function 35 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[15, 20], "t9", "(function object)"]
],
"(anon-function 29 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[36, 40], "t9", "(function object)"]
],
"(anon-function 62 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"]
],
"(anon-function 21 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[15, 19], "t9", "(function object)"]
],
"(anon-function 19 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[19, 23], "t9", "(function object)"]
],
"(anon-function 16 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[15, 19], "t9", "(function object object)"]
[[15, 19], "t9", "(function object)"]
],
"(anon-function 15 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[3, 6], "t9", "(function object)"]
],
"(anon-function 13 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[6, 9], "t9", "(function object object)"]
[[6, 9], "t9", "(function object)"]
],
"(anon-function 11 nav-enemy)": [
[[0, 999], "s6", "nav-enemy"],
[[80, 84], "t9", "(function object object object object)"]
],
"nav-enemy-init-by-other": [
[[0, 999], "s6", "nav-enemy"],
[[54, 58], "t9", "(function object object object object)"]
],
"nav-enemy-set-hit-from-direction": [
[[0, 999], "s6", "nav-enemy"],
[19, "v1", "process-drawable"]
],
"(method 59 nav-enemy)": [
[[1, 5], "t9", "(function object object)"]
[[1, 5], "t9", "(function object)"]
],
"(method 73 nav-enemy)": [
[[19, 23], "t9", "(function object object)"]
[[19, 23], "t9", "(function object)"]
],
"(method 43 nav-enemy)": [
[[22, 26], "t9", "(function object object)"]
],
"nav-enemy-send-attack": [
[[0, 999], "s6", "nav-enemy"]
[[22, 26], "t9", "(function object)"]
],
"nav-enemy-default-event-handler": [
[[0, 999], "s6", "nav-enemy"],
[62, "a0", "vector"],
[82, "a0", "vector"],
[[49, 53], "t9", "(function object object)"],
[[70, 74], "t9", "(function object object)"],
[[92, 96], "t9", "(function object object)"],
[[100, 104], "t9", "(function object object)"],
[[108, 112], "t9", "(function object object)"]
],
"nav-enemy-jump-event-handler": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-common-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-simple-post": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-neck-control-look-at": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-neck-control-inactive": [
[[0, 999], "s6", "nav-enemy"]
],
"nav-enemy-fall-and-play-death-anim": [
[[0, 999], "s6", "nav-enemy"]
],
"process-drawable-death-event-handler": [
[[0, 999], "s6", "process-drawable"]
[[49, 53], "t9", "(function object)"],
[[70, 74], "t9", "(function object)"],
[[92, 96], "t9", "(function object)"],
[[100, 104], "t9", "(function object)"],
[[108, 112], "t9", "(function object)"]
],
"(method 7 nav-enemy)": [
+55
View File
@@ -0,0 +1,55 @@
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--file")
args = parser.parse_args()
import re
labels_with_no_type = []
file_path = "decompiler_out/jak1/{}_disasm.gc".format(args.file)
with open(file_path) as f:
# Find all
content = f.readlines()
for line in content:
labels_with_no_type = labels_with_no_type + re.findall(r'L\d+', line)
# dedup list
labels_with_no_type = list(dict.fromkeys(labels_with_no_type))
# let's go try to identify the types from the IR2 file if we can
label_lines = []
file_path = "decompiler_out/jak1/{}_ir2.asm".format(args.file)
with open(file_path) as f:
# Find all
content = f.readlines()
prev_line = ""
for i, line in enumerate(content):
if line.startswith("L"):
for label in labels_with_no_type:
if line.startswith("{}:".format(label)):
# Check if the previous line has a `.type`
prev_line = content[i-1]
if ".type" in prev_line:
the_type = prev_line.split(".type ")[1].strip()
label_lines.append("[\"{}\", \"{}\", true]".format(label, the_type))
labels_with_no_type.remove(label)
break
# Otherwise, lets see if it's a lambda, check the last 10 lines (hopefully this is enough)
found_it = False
for j in range(20):
temp_line = content[i-j]
if "anon-function" in temp_line:
label_lines.append("[\"{}\", \"_lambda_\", true]".format(label))
labels_with_no_type.remove(label)
found_it = True
break
if found_it:
break
# Print out the labels
print("Here are the labels I couldn't find a type for:")
for label in labels_with_no_type:
print("- {}".format(label))
print("And here are the ones I could:")
print(",\n".join(label_lines))
@@ -314,10 +314,10 @@
;; definition of type collide-shape-prim-mesh
(deftype collide-shape-prim-mesh (collide-shape-prim)
((mesh basic :offset-assert 72)
(mesh-id int32 :offset-assert 76)
(mesh-cache-id uint64 :offset-assert 80)
(mesh-cache-tris uint32 :offset-assert 88)
((mesh collide-mesh :offset-assert 72)
(mesh-id int32 :offset-assert 76)
(mesh-cache-id uint64 :offset-assert 80)
(mesh-cache-tris uint32 :offset-assert 88)
)
:method-count-assert 29
:size-assert #x5c
@@ -389,17 +389,17 @@
;; definition of type collide-shape
(deftype collide-shape (trsqv)
((process process :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags uint8 :offset-assert 145)
(pad-byte uint8 2 :offset-assert 146)
(pat-ignore-mask pat-surface :offset-assert 148)
(event-self basic :offset-assert 152)
(event-other basic :offset-assert 156)
(root-prim collide-shape-prim :offset-assert 160)
(riders basic :offset-assert 164)
(backup-collide-as uint64 :offset-assert 168)
(backup-collide-with uint64 :offset-assert 176)
((process process :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags uint8 :offset-assert 145)
(pad-byte uint8 2 :offset-assert 146)
(pat-ignore-mask pat-surface :offset-assert 148)
(event-self basic :offset-assert 152)
(event-other basic :offset-assert 156)
(root-prim collide-shape-prim :offset-assert 160)
(riders collide-sticky-rider-group :offset-assert 164)
(backup-collide-as uint64 :offset-assert 168)
(backup-collide-with uint64 :offset-assert 176)
)
:method-count-assert 56
:size-assert #xb8
@@ -3,8 +3,8 @@
;; definition of type touching-prim
(deftype touching-prim (structure)
((cprim basic :offset-assert 0)
(has-tri? basic :offset-assert 4)
((cprim collide-shape-prim :offset-assert 0)
(has-tri? symbol :offset-assert 4)
(tri collide-tri-result :inline :offset-assert 16)
)
:method-count-assert 9
@@ -25,7 +25,7 @@
(deftype touching-prims-entry (structure)
((next touching-prims-entry :offset-assert 0)
(prev touching-prims-entry :offset-assert 4)
(allocated? basic :offset-assert 8)
(allocated? symbol :offset-assert 8)
(u float :offset-assert 12)
(prim1 touching-prim :inline :offset-assert 16)
(prim2 touching-prim :inline :offset-assert 128)
@@ -120,8 +120,8 @@
;; definition of type touching-shapes-entry
(deftype touching-shapes-entry (structure)
((cshape1 basic :offset-assert 0)
(cshape2 basic :offset-assert 4)
((cshape1 collide-shape :offset-assert 0)
(cshape2 collide-shape :offset-assert 4)
(resolve-u int8 :offset-assert 8)
(head touching-prims-entry :offset-assert 12)
)
@@ -132,7 +132,7 @@
(dummy-9 () none 9)
(dummy-10 () none 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(prims-touching? (_type_ collide-shape-moving uint) touching-prims-entry 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
@@ -119,7 +119,7 @@
:flag-assert #xc00000028
(:methods
(new (symbol type process pickup-type float) _type_ 0)
(dummy-9 () none 9)
(dummy-9 () uint 9)
(reset! (_type_ symbol) none 10)
(dummy-11 (_type_) float 11)
)
@@ -386,7 +386,7 @@
(dummy-13 () none 13)
(dummy-14 () none 14)
(set-target-pos! (_type_ vector) none 15)
(dummy-16 () none 16)
(dummy-16 (_type_ vector) symbol 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
(dummy-19 () none 19)
@@ -395,7 +395,7 @@
(dummy-22 () none 22)
(dummy-23 () none 23)
(dummy-24 () none 24)
(dummy-25 () none 25)
(dummy-25 (_type_ vector float) symbol 25)
(dummy-26 () none 26)
(dummy-27 () none 27)
(dummy-28 () none 28)
@@ -591,7 +591,7 @@
(defmethod should-display? nav-control ((obj nav-control))
(and
*display-nav-marks*
(nonzero? (logand (-> obj flags) (nav-control-flags display-marks)))
(nonzero? (logand (-> obj flags) (nav-control-flags display-marks bit0)))
)
)
@@ -2,6 +2,7 @@
(in-package goal)
;; definition for method 9 of type trajectory
;; INFO: this function exists in multiple non-identical object files
;; Used lq/sq
(defmethod
eval-position!
@@ -136,7 +137,3 @@
0
(none)
)
@@ -139,30 +139,32 @@
;; definition of type nav-enemy
(deftype nav-enemy (process-drawable)
((hit-from-dir vector :inline :offset-assert 176)
(event-param-point vector :inline :offset-assert 192)
(frustration-point vector :inline :offset-assert 208)
(jump-dest vector :inline :offset-assert 224)
(jump-trajectory trajectory :inline :offset-assert 240)
(jump-time uint64 :offset-assert 280)
(nav-info nav-enemy-info :offset-assert 288)
(target-speed float :offset-assert 292)
(momentum-speed float :offset-assert 296)
(acceleration float :offset-assert 300)
(rotate-speed float :offset-assert 304)
(turn-time uint64 :offset-assert 312)
(frustration-time uint64 :offset-assert 320)
(speed-scale float :offset-assert 328)
(neck basic :offset-assert 332)
(reaction-time uint64 :offset-assert 336)
(notice-time uint64 :offset-assert 344)
(state-timeout uint64 :offset-assert 352)
(free-time uint64 :offset-assert 360)
(touch-time uint64 :offset-assert 368)
(nav-enemy-flags uint32 :offset-assert 376)
(incomming-attack-id uint64 :offset-assert 384)
(jump-return-state basic :offset-assert 392)
(rand-gen basic :offset-assert 396)
((collide-info collide-shape-moving :offset 112)
(enemy-info fact-info-enemy :offset 144)
(hit-from-dir vector :inline :offset-assert 176)
(event-param-point vector :inline :offset-assert 192)
(frustration-point vector :inline :offset-assert 208)
(jump-dest vector :inline :offset-assert 224)
(jump-trajectory trajectory :inline :offset-assert 240)
(jump-time uint64 :offset-assert 280)
(nav-info nav-enemy-info :offset-assert 288)
(target-speed float :offset-assert 292)
(momentum-speed float :offset-assert 296)
(acceleration float :offset-assert 300)
(rotate-speed float :offset-assert 304)
(turn-time uint64 :offset-assert 312)
(frustration-time uint64 :offset-assert 320)
(speed-scale float :offset-assert 328)
(neck joint-mod :offset-assert 332)
(reaction-time uint64 :offset-assert 336)
(notice-time uint64 :offset-assert 344)
(state-timeout uint64 :offset-assert 352)
(free-time uint64 :offset-assert 360)
(touch-time uint64 :offset-assert 368)
(nav-enemy-flags uint32 :offset-assert 376)
(incomming-attack-id uint64 :offset-assert 384)
(jump-return-state basic :offset-assert 392)
(rand-gen random-generator :offset-assert 396)
)
:heap-base #x120
:method-count-assert 76
@@ -183,48 +185,48 @@
(nav-enemy-stare () none 31)
(nav-enemy-stop-chase () none 32)
(nav-enemy-victory () none 33)
(dummy-34 () none 34)
(dummy-35 () none 35)
(dummy-36 () none 36)
(dummy-37 () none 37)
(dummy-38 () none 38)
(dummy-39 () none 39)
(dummy-40 () none 40)
(dummy-41 () none 41)
(dummy-42 () none 42)
(dummy-43 () none 43)
(dummy-44 () none 44)
(dummy-45 () none 45)
(dummy-46 () none 46)
(dummy-47 () none 47)
(dummy-48 () none 48)
(dummy-49 () none 49)
(dummy-50 () none 50)
(dummy-51 () none 51)
(dummy-52 () none 52)
(dummy-53 () none 53)
(dummy-54 () none 54)
(dummy-55 () none 55)
(dummy-56 () none 56)
(dummy-57 () none 57)
(dummy-58 () none 58)
(dummy-59 () none 59)
(dummy-60 () none 60)
(dummy-61 () none 61)
(dummy-62 () none 62)
(dummy-63 () none 63)
(dummy-64 () none 64)
(dummy-65 () none 65)
(dummy-66 () none 66)
(dummy-67 () none 67)
(dummy-68 () none 68)
(dummy-69 () none 69)
(dummy-70 () none 70)
(dummy-71 () none 71)
(dummy-72 () none 72)
(dummy-73 () none 73)
(dummy-74 () none 74)
(dummy-75 () none 75)
(dummy-34 (_type_) none 34)
(dummy-35 (_type_) none 35)
(dummy-36 (_type_) none 36)
(TODO-RENAME-37 (_type_) none 37)
(TODO-RENAME-38 (_type_) none 38)
(TODO-RENAME-39 (_type_) none 39)
(dummy-40 (_type_) none 40)
(dummy-41 (_type_) none 41)
(TODO-RENAME-42 (_type_) int 42)
(dummy-43 (_type_ process event-message-block) object 43)
(dummy-44 (_type_ process event-message-block) object 44)
(TODO-RENAME-45 (_type_ nav-enemy-info) none 45)
(TODO-RENAME-46 (_type_ float) basic 46)
(TODO-RENAME-47 (_type_) none 47)
(TODO-RENAME-48 (_type_) none 48)
(TODO-RENAME-49 (_type_ nav-enemy-info) float 49)
(TODO-RENAME-50 (_type_ vector) symbol 50)
(dummy-51 (_type_) none 51)
(dummy-52 (_type_) none 52)
(dummy-53 (_type_) none 53)
(dummy-54 (_type_) none 54)
(dummy-55 (_type_) none 55)
(dummy-56 (_type_) none 56)
(dummy-57 (_type_) none 57)
(dummy-58 (_type_) none 58)
(TODO-RENAME-59 (_type_) none 59)
(dummy-60 (_type_) none 60)
(dummy-61 (_type_) none 61)
(dummy-62 (_type_) none 62)
(dummy-63 (_type_) none 63)
(dummy-64 (_type_) none 64)
(dummy-65 (_type_) none 65)
(dummy-66 (_type_) none 66)
(dummy-67 (_type_) symbol 67)
(dummy-68 (_type_) none 68)
(dummy-69 (_type_) none 69)
(dummy-70 (_type_) none 70)
(dummy-71 (_type_) none 71)
(dummy-72 (_type_ process event-message-block) object 72)
(TODO-RENAME-73 (_type_ process) symbol 73)
(dummy-74 (_type_) none 74)
(dummy-75 (_type_) none 75)
)
)
+6
View File
@@ -85,6 +85,9 @@ const std::unordered_set<std::string> g_functions_expected_to_reject = {
"update-mood-lava", // asm
"update-mood-lightning", // asm
// nav-enemy
"(anon-function 28 nav-enemy)", // asm
"debug-menu-item-var-render" // asm
};
@@ -168,6 +171,9 @@ const std::unordered_set<std::string> g_functions_to_skip_compiling = {
// camera
"slave-set-rotation!", "v-slrp2!", "v-slrp3!", // vector-dot involving the stack
// nav-enemy
"(anon-function 28 nav-enemy)", // asm
// loader - decompiler bug with detecting handle macros
"(method 10 external-art-buffer)"};