diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index f39c674719..cf80166879 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -1158,7 +1158,7 @@ (trans (function object) :offset-assert 20) (post function :offset-assert 24) (enter (function object object object object object object object) :offset-assert 28) - (event (function basic int basic event-message-block object) :offset-assert 32) + (event (function process int symbol event-message-block object) :offset-assert 32) ) (:methods (new (symbol type basic function @@ -21901,8 +21901,8 @@ (dummy-40 (_type_) none 40) (dummy-41 (_type_) none 41) (TODO-RENAME-42 (_type_) int 42) - (dummy-43 (_type_ process) none 43) - (dummy-44 (_type_ process) none 44) + (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) ;; - Stubbed @@ -21930,7 +21930,7 @@ (dummy-69 (_type_) none 69) (dummy-70 (_type_) none 70) (dummy-71 (_type_) none 71) - (dummy-72 (_type_ process) none 72) ;; TODO - args unknown, 3rd arg contains a touching-shapes-entry offset 16/20 + (dummy-72 (_type_ process event-message-block) object 72) ;; TODO - args unknown, 3rd arg contains a touching-shapes-entry offset 16/20 (TODO-RENAME-73 (_type_ process) symbol 73) (dummy-74 (_type_) none 74) (dummy-75 (_type_) none 75) @@ -21971,13 +21971,13 @@ (define-extern nav-enemy-travel-post (function none :behavior nav-enemy)) (define-extern nav-enemy-get-new-patrol-point (function int :behavior nav-enemy)) (define-extern nav-enemy-set-hit-from-direction (function process none :behavior nav-enemy)) -(define-extern nav-enemy-send-attack (function process touching-shapes-entry symbol symbol :behavior nav-enemy)) +(define-extern nav-enemy-send-attack (function process touching-shapes-entry symbol object :behavior nav-enemy)) (define-extern nav-enemy-rnd-int-count (function int int)) (define-extern nav-enemy-rnd-float (function float)) (define-extern nav-enemy-rnd-percent? (function float symbol)) -(define-extern nav-enemy-default-event-handler (function process int symbol vector none :behavior nav-enemy)) ;; TODO - last arg is definitely a vector...but also not? -(define-extern nav-enemy-jump-event-handler (function process int symbol vector none :behavior nav-enemy)) -(define-extern process-drawable-death-event-handler (function process int symbol none :behavior process-drawable)) ;; First two args are unused +(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 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)) diff --git a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc index 095f7b819b..69197caf99 100644 --- a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc @@ -604,13 +604,13 @@ [43, "(function uint :behavior nav-enemy)"], [44, "(function none :behavior nav-enemy)"], [45, "(function object :behavior nav-enemy)"], - [46, "(function object :behavior nav-enemy)"], // TODO - neck! - [50, "(function object :behavior nav-enemy)"], // TODO - art element + [46, "(function none :behavior nav-enemy)"], + [50, "(function none :behavior nav-enemy)"], [51, "(function object :behavior nav-enemy)"], [52, "(function uint :behavior nav-enemy)"], - [54, "(function uint :behavior nav-enemy)"], // TODO - art element - [55, "(function uint :behavior nav-enemy)"], // TODO - art element - [56, "(function uint :behavior nav-enemy)"], // TODO - art element + [54, "(function object :behavior nav-enemy)"], + [55, "(function uint :behavior nav-enemy)"], + [56, "(function none :behavior nav-enemy)"], [57, "(function object :behavior nav-enemy)"], [58, "(function uint :behavior nav-enemy)"], [59, "(function uint :behavior nav-enemy)"], diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index edcf3c5afe..4ea9366a5c 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -1177,6 +1177,7 @@ "nav-enemy": [ ["L353", "float", true], ["L354", "float", true], + ["L355", "float", true], ["L356", "float", true], ["L357", "float", true], ["L358", "float", true], diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index a7b8aafedf..47ed1a3135 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -1167,7 +1167,8 @@ ], "nav-enemy-set-base-collide-sphere-collide-with": [ - [[0, 999], "s6", "nav-enemy"] + [[0, 999], "s6", "nav-enemy"], + [50, "s4", "collide-shape-prim-group"] ], "nav-enemy-turn-to-face-dir": [ @@ -1231,7 +1232,8 @@ ], "nav-enemy-jump-land-anim": [ - [[0, 999], "s6", "nav-enemy"] + [[0, 999], "s6", "nav-enemy"], + [39, "v1", "art-joint-anim"] ], "nav-enemy-jump-land-post": [ @@ -1293,7 +1295,9 @@ [[0, 999], "s6", "nav-enemy"] ], "(anon-function 31 nav-enemy)": [ - [[0, 999], "s6", "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"] @@ -1315,14 +1319,20 @@ [[39, 43], "t9", "(function object)"] ], "(anon-function 54 nav-enemy)": [ - [[0, 999], "s6", "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"] + [[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"] @@ -1360,7 +1370,9 @@ [[0, 999], "s6", "nav-enemy"] ], "(anon-function 50 nav-enemy)": [ - [[0, 999], "s6", "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"], @@ -1451,7 +1463,14 @@ ], "nav-enemy-default-event-handler": [ - [[0, 999], "s6", "nav-enemy"] + [[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": [