mirror of
https://github.com/open-goal/jak-project
synced 2026-08-14 12:34:36 -04:00
d/jak2: finish cty-guard-turret-button | race-h | height-map-h and a lot of rigid-body (#1957)
Also cleaned up `data_decompiler.cpp` to make it a lot less verbose to add a special case for an array field.
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
;; name in dgo: enemy-h
|
||||
;; dgos: GAME, COMMON
|
||||
|
||||
(define-extern get-penetrate-using-from-attack-event (function process-drawable event-message-block penetrate))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(defenum enemy-flag
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
(declare-type collide-shape-moving collide-shape)
|
||||
(declare-type touching-list structure)
|
||||
(declare-type collide-query structure)
|
||||
(declare-type control-info basic)
|
||||
|
||||
(defenum penetrate
|
||||
:bitfield #t
|
||||
@@ -248,6 +249,8 @@
|
||||
)
|
||||
;; ---nav-flags
|
||||
|
||||
(define-extern cshape-reaction-default (function control-info collide-query vector vector cshape-moving-flags))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype collide-rider (structure)
|
||||
@@ -480,38 +483,38 @@
|
||||
(collide-shape-method-51 () none 51)
|
||||
(collide-shape-method-52 () none 52)
|
||||
(collide-shape-method-53 () none 53)
|
||||
(collide-shape-method-54 () none 54)
|
||||
(collide-shape-method-54 (_type_) none 54)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype collide-shape-moving (collide-shape)
|
||||
((rider-time time-frame :offset-assert 200)
|
||||
(rider-last-move vector :inline :offset-assert 208)
|
||||
(trans-old vector :inline :offset-assert 224)
|
||||
(poly-pat pat-surface :offset 272)
|
||||
(cur-pat pat-surface :offset-assert 276)
|
||||
(ground-pat pat-surface :offset-assert 280)
|
||||
(status cshape-moving-flags :offset-assert 288)
|
||||
(old-status cshape-moving-flags :offset-assert 296)
|
||||
(prev-status cshape-moving-flags :offset-assert 304)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 312)
|
||||
(reaction function :offset-assert 316)
|
||||
(no-reaction function :offset-assert 320)
|
||||
(local-normal vector :inline :offset-assert 336)
|
||||
(surface-normal vector :inline :offset-assert 352)
|
||||
(poly-normal vector :inline :offset-assert 368)
|
||||
(ground-poly-normal vector :inline :offset-assert 384)
|
||||
(gspot-pos vector :inline :offset-assert 400)
|
||||
(gspot-normal vector :inline :offset-assert 416)
|
||||
(grount-touch-point vector :inline :offset-assert 432)
|
||||
(ground-impact-vel meters :offset-assert 448)
|
||||
(surface-angle float :offset-assert 452)
|
||||
(poly-angle float :offset-assert 456)
|
||||
(touch-angle float :offset-assert 460)
|
||||
(coverage float :offset-assert 464)
|
||||
(dynam dynamics :offset-assert 468)
|
||||
(surf surface :offset-assert 472)
|
||||
((rider-time time-frame :offset-assert 200)
|
||||
(rider-last-move vector :inline :offset-assert 208)
|
||||
(trans-old vector :inline :offset-assert 224)
|
||||
(poly-pat pat-surface :offset 272)
|
||||
(cur-pat pat-surface :offset-assert 276)
|
||||
(ground-pat pat-surface :offset-assert 280)
|
||||
(status cshape-moving-flags :offset-assert 288)
|
||||
(old-status cshape-moving-flags :offset-assert 296)
|
||||
(prev-status cshape-moving-flags :offset-assert 304)
|
||||
(reaction-flag cshape-reaction-flags :offset-assert 312)
|
||||
(reaction (function control-info collide-query vector vector cshape-moving-flags) :offset-assert 316)
|
||||
(no-reaction function :offset-assert 320)
|
||||
(local-normal vector :inline :offset-assert 336)
|
||||
(surface-normal vector :inline :offset-assert 352)
|
||||
(poly-normal vector :inline :offset-assert 368)
|
||||
(ground-poly-normal vector :inline :offset-assert 384)
|
||||
(gspot-pos vector :inline :offset-assert 400)
|
||||
(gspot-normal vector :inline :offset-assert 416)
|
||||
(grount-touch-point vector :inline :offset-assert 432)
|
||||
(ground-impact-vel meters :offset-assert 448)
|
||||
(surface-angle float :offset-assert 452)
|
||||
(poly-angle float :offset-assert 456)
|
||||
(touch-angle float :offset-assert 460)
|
||||
(coverage float :offset-assert 464)
|
||||
(dynam dynamics :offset-assert 468)
|
||||
(surf surface :offset-assert 472)
|
||||
)
|
||||
:method-count-assert 68
|
||||
:size-assert #x1dc
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
;; name in dgo: collide-touch-h
|
||||
;; dgos: ENGINE, GAME
|
||||
|
||||
(declare-type touching-shapes-entry structure)
|
||||
(declare-type touching-prims-entry structure)
|
||||
(define-extern get-intersect-point (function vector touching-prims-entry collide-shape touching-shapes-entry vector))
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype touching-prim (structure)
|
||||
@@ -30,9 +34,9 @@
|
||||
:size-assert #xe8
|
||||
:flag-assert #xc000000e8
|
||||
(:methods
|
||||
(touching-prims-entry-method-9 () none 9)
|
||||
(touching-prims-entry-method-10 () none 10)
|
||||
(touching-prims-entry-method-11 () none 11)
|
||||
(touching-prims-entry-method-9 (_type_ vector) vector 9)
|
||||
(touching-prims-entry-method-10 (_type_ collide-shape touching-shapes-entry) collide-shape-prim 10)
|
||||
(touching-prims-entry-method-11 (_type_ collide-shape touching-shapes-entry) collide-tri-result 11)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@
|
||||
(set! (-> collision-shape total-prims) (the-as uint 1))
|
||||
(set! (-> collision-shape root-prim) collision-mesh)
|
||||
)
|
||||
((method-of-object collision-shape collide-shape-method-54))
|
||||
(collide-shape-method-54 collision-shape)
|
||||
(set! (-> collision-shape nav-radius) (* 0.75 (-> collision-shape root-prim local-sphere w)))
|
||||
(let ((prim (-> collision-shape root-prim)))
|
||||
(set! (-> collision-shape backup-collide-as) (-> prim prim-core collide-as))
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
(set! (-> collision-shape total-prims) (the-as uint 1))
|
||||
(set! (-> collision-shape root-prim) collision-mesh)
|
||||
)
|
||||
((method-of-object collision-shape collide-shape-method-54))
|
||||
(collide-shape-method-54 collision-shape)
|
||||
(set! (-> collision-shape nav-radius) (* 0.75 (-> collision-shape root-prim local-sphere w)))
|
||||
(let ((prim (-> collision-shape root-prim)))
|
||||
(set! (-> collision-shape backup-collide-as) (-> prim prim-core collide-as))
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
(declare-type water-control basic)
|
||||
(declare-type align-control basic)
|
||||
(declare-type fact-info basic)
|
||||
(declare-type rigid-body-control basic)
|
||||
|
||||
(define-extern vector<-cspace! (function vector cspace vector))
|
||||
|
||||
@@ -96,7 +97,7 @@
|
||||
(water water-control :offset-assert 172)
|
||||
(sound ambient-sound :offset-assert 176)
|
||||
(carry basic :offset-assert 180)
|
||||
(rbody basic :offset-assert 184)
|
||||
(rbody rigid-body-control :offset-assert 184)
|
||||
(state-flags state-flags :offset-assert 188)
|
||||
(state-time time-frame :offset-assert 192)
|
||||
)
|
||||
@@ -343,10 +344,3 @@
|
||||
:size-assert #x24
|
||||
:flag-assert #x900000024
|
||||
)
|
||||
|
||||
|
||||
0
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -69,6 +69,9 @@
|
||||
)
|
||||
;; ---rigid-body-object-flag
|
||||
|
||||
(declare-type rigid-body-work structure)
|
||||
(declare-type rigid-body-object process-focusable)
|
||||
|
||||
;; DECOMP BEGINS
|
||||
|
||||
(deftype rigid-body-info (structure)
|
||||
@@ -113,6 +116,7 @@
|
||||
(cm-joint-x meters :offset 32)
|
||||
(cm-joint-y meters :offset 36)
|
||||
(cm-joint-z meters :offset 40)
|
||||
(cm-joint-w float :offset 44)
|
||||
(linear-damping float :offset 8)
|
||||
(angular-damping float :offset 12)
|
||||
(bounce-factor float :offset 16)
|
||||
@@ -125,7 +129,7 @@
|
||||
(gravity meters :offset 192)
|
||||
(idle-distance meters :offset 196)
|
||||
(attack-force-scale float :offset 200)
|
||||
(name basic :offset-assert 204)
|
||||
(name symbol :offset-assert 204)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #xd0
|
||||
@@ -149,32 +153,32 @@
|
||||
|
||||
|
||||
(deftype rigid-body (structure)
|
||||
((work basic :offset-assert 0)
|
||||
(info rigid-body-info :offset-assert 4)
|
||||
(flags rigid-body-flag :offset-assert 8)
|
||||
(force-callback basic :offset-assert 12)
|
||||
(blocked-by basic :offset-assert 16)
|
||||
(time-remaining float :offset-assert 20)
|
||||
(step-count int16 :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rot vector :inline :offset-assert 48)
|
||||
(rotation quaternion :inline :offset 48)
|
||||
(lin-momentum vector :inline :offset-assert 64)
|
||||
(ang-momentum vector :inline :offset-assert 80)
|
||||
(force vector :inline :offset-assert 96)
|
||||
(torque vector :inline :offset-assert 112)
|
||||
(lin-velocity vector :inline :offset-assert 128)
|
||||
(ang-velocity vector :inline :offset-assert 144)
|
||||
(matrix matrix :inline :offset-assert 160)
|
||||
(inv-i-world matrix :inline :offset-assert 224)
|
||||
((work rigid-body-work :offset-assert 0)
|
||||
(info rigid-body-info :offset-assert 4)
|
||||
(flags rigid-body-flag :offset-assert 8)
|
||||
(force-callback (function object float none) :offset-assert 12)
|
||||
(blocked-by basic :offset-assert 16)
|
||||
(time-remaining float :offset-assert 20)
|
||||
(step-count int16 :offset-assert 24)
|
||||
(position vector :inline :offset-assert 32)
|
||||
(rot vector :inline :offset-assert 48)
|
||||
(rotation quaternion :inline :offset 48)
|
||||
(lin-momentum vector :inline :offset-assert 64)
|
||||
(ang-momentum vector :inline :offset-assert 80)
|
||||
(force vector :inline :offset-assert 96)
|
||||
(torque vector :inline :offset-assert 112)
|
||||
(lin-velocity vector :inline :offset-assert 128)
|
||||
(ang-velocity vector :inline :offset-assert 144)
|
||||
(matrix matrix :inline :offset-assert 160)
|
||||
(inv-i-world matrix :inline :offset-assert 224)
|
||||
)
|
||||
:method-count-assert 32
|
||||
:size-assert #x120
|
||||
:flag-assert #x2000000120
|
||||
(:methods
|
||||
(rigid-body-method-9 (_type_) none 9)
|
||||
(rigid-body-method-9 (_type_ collide-shape-moving float) none 9)
|
||||
(rigid-body-method-10 (_type_) none 10)
|
||||
(rigid-body-method-11 (_type_) none 11)
|
||||
(rigid-body-method-11 (_type_ collide-shape-moving) none 11)
|
||||
(rigid-body-method-12 (_type_ float) none 12)
|
||||
(rigid-body-method-13 (_type_) none 13)
|
||||
(rigid-body-method-14 (_type_ float) none 14)
|
||||
@@ -188,7 +192,7 @@
|
||||
(rigid-body-method-22 (_type_ vector vector) vector 22)
|
||||
(rigid-body-method-23 (_type_ vector) vector 23)
|
||||
(rigid-body-method-24 (_type_) none 24)
|
||||
(rigid-body-method-25 (_type_ rigid-body-info vector quaternion basic) none 25)
|
||||
(rigid-body-method-25 (_type_ rigid-body-info vector quaternion function) none 25)
|
||||
(rigid-body-method-26 (_type_ vector quaternion) none 26)
|
||||
(print-physics (_type_ object) none 27)
|
||||
(print-force-torque (_type_ object) none 28)
|
||||
@@ -225,9 +229,10 @@
|
||||
:size-assert #x130
|
||||
:flag-assert #x1a00000130
|
||||
(:methods
|
||||
(rigid-body-control-method-9 (_type_) none 9)
|
||||
(rigid-body-control-method-10 (_type_) none 10)
|
||||
(rigid-body-control-method-11 (_type_) none 11)
|
||||
(new (symbol type process) _type_ 0)
|
||||
(rigid-body-control-method-9 (_type_ collide-shape-moving float) none 9)
|
||||
(rigid-body-control-method-10 (_type_ rigid-body-object float float) object 10)
|
||||
(rigid-body-control-method-11 (_type_ collide-shape-moving) none 11)
|
||||
(rigid-body-control-method-12 (_type_ float) none 12)
|
||||
(rigid-body-control-method-13 (_type_) none 13)
|
||||
(rigid-body-control-method-14 (_type_ float) none 14)
|
||||
@@ -246,18 +251,18 @@
|
||||
)
|
||||
|
||||
|
||||
(defmethod rigid-body-control-method-9 rigid-body-control ((obj rigid-body-control))
|
||||
(rigid-body-method-9 (-> obj state))
|
||||
(defmethod rigid-body-control-method-9 rigid-body-control ((obj rigid-body-control) (arg0 collide-shape-moving) (arg1 float))
|
||||
(rigid-body-method-9 (-> obj state) arg0 arg1)
|
||||
(none)
|
||||
)
|
||||
|
||||
(defmethod rigid-body-control-method-10 rigid-body-control ((obj rigid-body-control))
|
||||
(rigid-body-method-10 (-> obj state))
|
||||
(none)
|
||||
;; WARN: Return type mismatch none vs object.
|
||||
(defmethod rigid-body-control-method-10 rigid-body-control ((obj rigid-body-control) (arg0 rigid-body-object) (arg1 float) (arg2 float))
|
||||
(the-as object (rigid-body-method-10 (-> obj state)))
|
||||
)
|
||||
|
||||
(defmethod rigid-body-control-method-11 rigid-body-control ((obj rigid-body-control))
|
||||
(rigid-body-method-11 (-> obj state))
|
||||
(defmethod rigid-body-control-method-11 rigid-body-control ((obj rigid-body-control) (arg0 collide-shape-moving))
|
||||
(rigid-body-method-11 (-> obj state) arg0)
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -320,7 +325,7 @@
|
||||
)
|
||||
|
||||
(defmethod rigid-body-control-method-24 rigid-body-control ((obj rigid-body-control) (arg0 rigid-body-info) (arg1 vector) (arg2 quaternion) (arg3 basic))
|
||||
(rigid-body-method-25 (-> obj state) arg0 arg1 arg2 arg3)
|
||||
(rigid-body-method-25 (-> obj state) arg0 arg1 arg2 (the-as function arg3))
|
||||
(none)
|
||||
)
|
||||
|
||||
@@ -330,7 +335,8 @@
|
||||
)
|
||||
|
||||
(deftype rigid-body-object (process-focusable)
|
||||
((info rigid-body-object-constants :offset-assert 204)
|
||||
((root-override collide-shape-moving :offset 128)
|
||||
(info rigid-body-object-constants :offset-assert 204)
|
||||
(flags rigid-body-object-flag :offset-assert 208)
|
||||
(max-time-step float :offset-assert 216)
|
||||
(incoming-attack-id uint32 :offset-assert 220)
|
||||
@@ -344,32 +350,32 @@
|
||||
:size-assert #x110
|
||||
:flag-assert #x3500900110
|
||||
(:methods
|
||||
(rigid-body-object-method-27 () none 27)
|
||||
(rigid-body-object-method-28 () none 28)
|
||||
(rigid-body-object-method-29 () none 29)
|
||||
(rigid-body-object-method-30 () none 30)
|
||||
(rigid-body-object-method-31 () none 31)
|
||||
(rigid-body-object-method-32 () none 32)
|
||||
(rigid-body-object-method-33 () none 33)
|
||||
(rigid-body-object-method-34 () none 34)
|
||||
(rigid-body-object-method-35 () none 35)
|
||||
(idle () _type_ :state 27)
|
||||
(active () _type_ :state 28)
|
||||
(rigid-body-object-method-29 (_type_) none 29)
|
||||
(rigid-body-object-method-30 (_type_) none 30)
|
||||
(rigid-body-object-method-31 (_type_ rigid-body-object-constants) none 31)
|
||||
(rigid-body-object-method-32 (_type_) none 32)
|
||||
(rigid-body-object-method-33 (_type_) none 33)
|
||||
(rigid-body-object-method-34 (_type_) none 34)
|
||||
(rigid-body-object-method-35 (_type_) none 35)
|
||||
(rigid-body-object-method-36 () none 36)
|
||||
(rigid-body-object-method-37 () none 37)
|
||||
(rigid-body-object-method-38 () none 38)
|
||||
(rigid-body-object-method-39 () none 39)
|
||||
(rigid-body-object-method-40 () none 40)
|
||||
(rigid-body-object-method-41 () none 41)
|
||||
(rigid-body-object-method-42 () none 42)
|
||||
(rigid-body-object-method-43 () none 43)
|
||||
(rigid-body-object-method-44 () none 44)
|
||||
(rigid-body-object-method-37 (_type_) none 37)
|
||||
(rigid-body-object-method-38 (_type_) none 38)
|
||||
(rigid-body-object-method-39 (_type_) none 39)
|
||||
(rigid-body-object-method-40 (_type_) none 40)
|
||||
(rigid-body-object-method-41 (_type_) none 41)
|
||||
(rigid-body-object-method-42 (_type_) none :behavior rigid-body-object 42)
|
||||
(rigid-body-object-method-43 (_type_) none 43)
|
||||
(rigid-body-object-method-44 (_type_ float) none 44)
|
||||
(rigid-body-object-method-45 () none 45)
|
||||
(rigid-body-object-method-46 () none 46)
|
||||
(rigid-body-object-method-47 () none 47)
|
||||
(rigid-body-object-method-48 () none 48)
|
||||
(rigid-body-object-method-49 () none 49)
|
||||
(rigid-body-object-method-50 () none 50)
|
||||
(rigid-body-object-method-51 () none 51)
|
||||
(rigid-body-object-method-52 () none 52)
|
||||
(rigid-body-object-method-46 (_type_ process-drawable int symbol event-message-block) none :behavior rigid-body-object 46)
|
||||
(rigid-body-object-method-47 (_type_ process-drawable attack-info object penetrate) symbol 47)
|
||||
(rigid-body-object-method-48 (_type_ object object) none 48)
|
||||
(rigid-body-object-method-49 (_type_ matrix touching-shapes-entry) none 49)
|
||||
(rigid-body-object-method-50 (_type_ float) none 50)
|
||||
(rigid-body-object-method-51 (_type_) none 51)
|
||||
(rigid-body-object-method-52 (_type_) none 52)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -382,13 +388,13 @@
|
||||
:size-assert #x408
|
||||
:flag-assert #x1100000408
|
||||
(:methods
|
||||
(rigid-body-queue-method-9 () none 9)
|
||||
(rigid-body-queue-method-10 () none 10)
|
||||
(rigid-body-queue-method-11 () none 11)
|
||||
(rigid-body-queue-method-12 () none 12)
|
||||
(rigid-body-queue-method-13 () none 13)
|
||||
(rigid-body-queue-method-14 () none 14)
|
||||
(rigid-body-queue-method-15 () none 15)
|
||||
(rigid-body-queue-method-16 () none 16)
|
||||
(rigid-body-queue-method-9 (_type_) none 9)
|
||||
(rigid-body-queue-method-10 (_type_) none 10)
|
||||
(rigid-body-queue-method-11 (_type_) none 11)
|
||||
(rigid-body-queue-method-12 (_type_ int int) none 12)
|
||||
(rigid-body-queue-method-13 (_type_) none 13)
|
||||
(rigid-body-queue-method-14 (_type_ int) none 14)
|
||||
(rigid-body-queue-method-15 (_type_) none 15)
|
||||
(validate (_type_) symbol 16)
|
||||
)
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,7 @@
|
||||
(process-focusable-method-23 (_type_) none 23)
|
||||
(process-focusable-method-24 (_type_) float 24)
|
||||
(process-focusable-method-25 (_type_) time-frame 25)
|
||||
(process-focusable-method-26 (_type_) none 26)
|
||||
(process-focusable-method-26 (_type_) float 26)
|
||||
)
|
||||
)
|
||||
|
||||
@@ -103,8 +103,7 @@
|
||||
)
|
||||
|
||||
(defmethod process-focusable-method-26 process-focusable ((obj process-focusable))
|
||||
0
|
||||
(none)
|
||||
0.0
|
||||
)
|
||||
|
||||
;; WARN: Return type mismatch int vs time-frame.
|
||||
|
||||
@@ -33,13 +33,14 @@
|
||||
(max-delay uint16 :offset-assert 8)
|
||||
(delay uint16 :offset-assert 10)
|
||||
(play-index int16 :offset-assert 12)
|
||||
(list basic :offset-assert 16)
|
||||
(list (array string) :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x14
|
||||
:flag-assert #x900000014
|
||||
)
|
||||
|
||||
|
||||
(deftype speech-request (structure)
|
||||
((handle uint64 :offset-assert 0)
|
||||
(time time-frame :offset-assert 8)
|
||||
@@ -52,6 +53,7 @@
|
||||
:flag-assert #x900000015
|
||||
)
|
||||
|
||||
|
||||
(deftype speech-channel (structure)
|
||||
((flags speech-channel-flag :offset-assert 0)
|
||||
(gui-channel gui-channel :offset-assert 1)
|
||||
@@ -77,16 +79,17 @@
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
(deftype speech-control (structure)
|
||||
((channel-array speech-channel 2 :inline :offset-assert 0)
|
||||
(speech-table uint32 57 :offset-assert 224)
|
||||
((channel-array speech-channel 2 :inline :offset-assert 0)
|
||||
(speech-table speech-type-info 57 :offset-assert 224)
|
||||
)
|
||||
:method-count-assert 17
|
||||
:size-assert #x1c4
|
||||
:flag-assert #x11000001c4
|
||||
(:methods
|
||||
(speech-control-method-9 () none 9)
|
||||
(speech-control-method-10 () none 10)
|
||||
(speech-control-method-10 (_type_ int speech-type-info) none 10)
|
||||
(speech-control-method-11 (_type_) none 11)
|
||||
(speech-control-method-12 () none 12)
|
||||
(speech-control-method-13 () none 13)
|
||||
|
||||
Reference in New Issue
Block a user