mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
decomp: finalize rigid-body
This commit is contained in:
parent
ef81529855
commit
4f331b5f79
|
@ -654,9 +654,9 @@ void SimpleExpressionElement::update_from_stack_float_2(const Env& env,
|
|||
} else {
|
||||
auto type0 = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(0).var().reg());
|
||||
auto type1 = env.get_types_before_op(m_my_idx).get(m_expr.get_arg(1).var().reg());
|
||||
throw std::runtime_error(
|
||||
fmt::format("[OP: {}] - Floating point math attempted on invalid types: {} and {} in op {}.",
|
||||
m_my_idx, type0.print(), type1.print(), to_string(env)));
|
||||
throw std::runtime_error(fmt::format(
|
||||
"[OP: {}] - Floating point math attempted on invalid types: {} and {} in op {}.", m_my_idx,
|
||||
type0.print(), type1.print(), to_string(env)));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -988,7 +988,7 @@
|
|||
|
||||
(define-extern process-tree type) ; deftype provided by C Kernel
|
||||
(declare-type process basic)
|
||||
|
||||
(declare-type res-lump basic)
|
||||
(deftype process-tree (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(mask process-mask :offset-assert 8)
|
||||
|
@ -1002,7 +1002,7 @@
|
|||
(new (symbol type basic) _type_ 0)
|
||||
(activate (_type_ process-tree basic pointer) process-tree 9)
|
||||
(deactivate (_type_) none 10)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(copy-defaults (_type_ res-lump) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
|
@ -1245,11 +1245,6 @@
|
|||
)
|
||||
(:methods
|
||||
(new (symbol type basic int) _type_ 0)
|
||||
(activate (_type_ process-tree basic pointer) process-tree 9)
|
||||
(deactivate (process) none 10)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(run-logic? (process) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
:size-assert #x70
|
||||
:method-count-assert 14
|
||||
|
@ -10687,12 +10682,13 @@
|
|||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
(declare-type collide-shape-prim basic)
|
||||
(deftype collide-shape-intersect (basic)
|
||||
((move-vec vector :inline :offset-assert 16)
|
||||
(best-u float :offset-assert 32)
|
||||
(best-tri collide-tri-result :inline :offset-assert 48)
|
||||
(best-from-prim basic :offset-assert 132)
|
||||
(best-to-prim basic :offset-assert 136)
|
||||
(best-from-prim collide-shape-prim :offset-assert 132)
|
||||
(best-to-prim collide-shape-prim :offset-assert 136)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8c
|
||||
|
@ -10702,10 +10698,11 @@
|
|||
)
|
||||
)
|
||||
|
||||
(declare-type collide-shape-prim basic)
|
||||
(deftype collide-overlap-result (structure)
|
||||
((best-dist float :offset-assert 0)
|
||||
(best-from-prim basic :offset-assert 4)
|
||||
(best-to-prim basic :offset-assert 8)
|
||||
(best-from-prim collide-shape-prim :offset-assert 4)
|
||||
(best-to-prim collide-shape-prim :offset-assert 8)
|
||||
(best-from-tri collide-tri-result :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 10
|
||||
|
@ -17583,7 +17580,7 @@
|
|||
|
||||
(define-extern target-attack-up function)
|
||||
(define-extern find-ground-point function)
|
||||
(define-extern default-collision-reaction function)
|
||||
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none)) ;; TODO - not completely confirmed
|
||||
(define-extern simple-collision-reaction function)
|
||||
(define-extern collide-shape-draw-debug-marks (function none))
|
||||
(define-extern debug-report-col-stats function)
|
||||
|
@ -22055,7 +22052,7 @@
|
|||
;; - Functions
|
||||
|
||||
(define-extern matrix-3x3-triple-transpose-product (function matrix matrix matrix matrix))
|
||||
(define-extern rigid-body-platform-event-handler (function process int symbol event-message-block object :behavior rigid-body-platform))
|
||||
(define-extern rigid-body-platform-event-handler (function process int symbol event-message-block vector :behavior rigid-body-platform))
|
||||
(define-extern rigid-body-platform-post (function int :behavior rigid-body-platform))
|
||||
|
||||
;; - Unknowns
|
||||
|
@ -31448,7 +31445,6 @@
|
|||
:size-assert #x17c
|
||||
:flag-assert #x350110017c
|
||||
(:methods
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(dummy-31 (_type_) none 31)
|
||||
(dummy-32 (_type_ symbol) spool-anim 32)
|
||||
(dummy-41 (_type_) none 41)
|
||||
|
|
|
@ -1414,6 +1414,13 @@
|
|||
],
|
||||
|
||||
"rigid-body": [
|
||||
["L8", "_lambda_", true],
|
||||
["L10", "_lambda_", true],
|
||||
["L13", "_lambda_", true],
|
||||
["L15", "_lambda_", true],
|
||||
["L89", "rigid-body-platform-constants", true],
|
||||
["L90", "state", true],
|
||||
["L91", "state", true],
|
||||
["L106", "float", true]
|
||||
],
|
||||
|
||||
|
|
|
@ -873,5 +873,12 @@
|
|||
[16, "event-message-block"]
|
||||
],
|
||||
|
||||
"default-collision-reaction": [
|
||||
[16, "vector"],
|
||||
[32, "vector"],
|
||||
[48, "vector"],
|
||||
[96, "vector"]
|
||||
],
|
||||
|
||||
"placeholder-do-not-add-below!": []
|
||||
}
|
||||
|
|
|
@ -1823,12 +1823,14 @@
|
|||
|
||||
"rigid-body-platform-event-handler": [
|
||||
[28, "v1", "process-drawable"],
|
||||
[34, "v1", "float"],
|
||||
[83, "v1", "process-drawable"],
|
||||
[119, "v1", "process-drawable"],
|
||||
[125, "v1", "process-drawable"],
|
||||
[158, "v1", "vector"],
|
||||
[170, "v1", "vector"],
|
||||
[184, "v1", "symbol"]
|
||||
[184, "v1", "(pointer handle)"],
|
||||
[213, "v1", "process-drawable"]
|
||||
],
|
||||
|
||||
"(anon-function 9 plat-eco)": [
|
||||
|
@ -1841,5 +1843,13 @@
|
|||
[14, "t9", "(function process-drawable int process-drawable)"]
|
||||
],
|
||||
|
||||
"(method 10 rigid-body)": [
|
||||
[50, "v1", "vector"]
|
||||
],
|
||||
|
||||
"(method 11 rigid-body-platform)": [
|
||||
[5, "v1", "process-mask"]
|
||||
],
|
||||
|
||||
"placeholder-do-not-add-below": []
|
||||
}
|
||||
|
|
|
@ -62,33 +62,35 @@
|
|||
:flag-assert #x900000020
|
||||
)
|
||||
|
||||
(declare-type collide-shape-prim basic)
|
||||
(deftype collide-shape-intersect (basic)
|
||||
((move-vec vector :inline :offset-assert 16)
|
||||
(best-u float :offset-assert 32)
|
||||
(best-tri collide-tri-result :inline :offset-assert 48)
|
||||
(best-from-prim basic :offset-assert 132)
|
||||
(best-to-prim basic :offset-assert 136)
|
||||
(best-from-prim collide-shape-prim :offset-assert 132)
|
||||
(best-to-prim collide-shape-prim :offset-assert 136)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8c
|
||||
:flag-assert #xa0000008c
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
)
|
||||
(dummy-9 () none 9)
|
||||
)
|
||||
)
|
||||
|
||||
(declare-type collide-shape-prim basic)
|
||||
(deftype collide-overlap-result (structure)
|
||||
((best-dist float :offset-assert 0)
|
||||
(best-from-prim basic :offset-assert 4)
|
||||
(best-to-prim basic :offset-assert 8)
|
||||
(best-from-prim collide-shape-prim :offset-assert 4)
|
||||
(best-to-prim collide-shape-prim :offset-assert 8)
|
||||
(best-from-tri collide-tri-result :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x64
|
||||
:flag-assert #xa00000064
|
||||
(:methods
|
||||
(reset! (_type_) none 9)
|
||||
)
|
||||
(reset! (_type_) none 9)
|
||||
)
|
||||
)
|
||||
|
||||
(defmethod reset! collide-overlap-result ((obj collide-overlap-result))
|
||||
|
|
|
@ -5,3 +5,5 @@
|
|||
;; name in dgo: collide-shape
|
||||
;; dgos: GAME, ENGINE
|
||||
|
||||
;; TODO - for rigid-body
|
||||
(define-extern default-collision-reaction (function collide-shape-moving collide-shape-intersect vector vector none)) ;; TODO - not completely confirmed
|
||||
|
|
|
@ -7,3 +7,6 @@
|
|||
|
||||
;; TODO - for water-anim
|
||||
(define-extern ja-post (function int))
|
||||
;; TODO - for rigid-body
|
||||
(define-extern rider-post (function int))
|
||||
(define-extern transform-post (function int))
|
||||
|
|
|
@ -117,3 +117,6 @@
|
|||
)
|
||||
(the-as entity-actor #f)
|
||||
)
|
||||
|
||||
;; TODO - for rigid-body
|
||||
(define-extern process-drawable-from-entity! (function process-drawable object none))
|
||||
|
|
|
@ -7,3 +7,5 @@
|
|||
|
||||
;; TODO - for ocean-transition
|
||||
(define-extern *ocean-map* ocean-map)
|
||||
;; TODO - for rigid-body
|
||||
(define-extern ocean-get-height (function vector float))
|
||||
|
|
|
@ -228,7 +228,7 @@
|
|||
)
|
||||
|
||||
(declare-type process basic)
|
||||
|
||||
(declare-type res-lump basic)
|
||||
(deftype process-tree (basic)
|
||||
((name basic :offset-assert 4)
|
||||
(mask process-mask :offset-assert 8)
|
||||
|
@ -243,7 +243,7 @@
|
|||
(new (symbol type basic) _type_ 0)
|
||||
(activate (_type_ process-tree basic pointer) process-tree 9)
|
||||
(deactivate (_type_) none 10)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(copy-defaults (_type_ res-lump) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
|
|
|
@ -212,7 +212,7 @@
|
|||
(new (symbol type basic) _type_ 0)
|
||||
(activate (_type_ process-tree basic pointer) process-tree 9)
|
||||
(deactivate (_type_) none 10)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(copy-defaults (_type_ res-lump) none 11)
|
||||
(run-logic? (_type_) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
|
@ -246,16 +246,9 @@
|
|||
(connection-list connectable :inline :offset-assert #x60)
|
||||
(stack uint8 :dynamic :offset-assert #x70)
|
||||
)
|
||||
|
||||
(:methods
|
||||
(new (symbol type basic int) _type_ 0)
|
||||
(activate (_type_ process-tree basic pointer) process-tree 9)
|
||||
(deactivate (process) none 10)
|
||||
(dummy-method-11 (_type_ object) none 11)
|
||||
(run-logic? (process) symbol 12)
|
||||
(dummy-method () none 13)
|
||||
)
|
||||
|
||||
)
|
||||
:size-assert #x70
|
||||
:method-count-assert 14
|
||||
:no-runtime-type ;; already defined by kscheme. Don't do it again.
|
||||
|
@ -593,4 +586,4 @@
|
|||
(defmacro scratchpad-object (type &key (offset 0))
|
||||
"Access an object on the scratchpad."
|
||||
`(the-as ,type (&+ *fake-scratchpad-data* ,offset))
|
||||
)
|
||||
)
|
||||
|
|
|
@ -31,20 +31,20 @@
|
|||
:size-assert #x1a8
|
||||
:flag-assert #x17000001a8
|
||||
(:methods
|
||||
(dummy-9 () none 9)
|
||||
(dummy-10 () none 10)
|
||||
(dummy-11 () none 11)
|
||||
(dummy-12 () none 12)
|
||||
(dummy-13 () none 13)
|
||||
(dummy-14 () none 14)
|
||||
(dummy-15 () none 15)
|
||||
(dummy-16 () none 16)
|
||||
(dummy-17 () none 17)
|
||||
(dummy-18 () none 18)
|
||||
(dummy-19 () none 19)
|
||||
(dummy-20 () none 20)
|
||||
(dummy-21 () none 21)
|
||||
(dummy-22 () none 22)
|
||||
(TODO-RENAME-9 (_type_ float float float float) none 9)
|
||||
(dummy-10 (_type_ float) none 10)
|
||||
(clear-force-torque! (_type_) none 11)
|
||||
(clear-momentum! (_type_) none 12)
|
||||
(TODO-RENAME-13 (_type_ vector vector) none 13)
|
||||
(TODO-RENAME-14 (_type_ vector vector) none 14)
|
||||
(TODO-RENAME-15 (_type_ vector) none 15)
|
||||
(TODO-RENAME-16 (_type_ vector vector float) none 16)
|
||||
(TODO-RENAME-17 (_type_ vector vector) vector 17)
|
||||
(TODO-RENAME-18 (_type_ vector) vector 18)
|
||||
(dummy-19 (_type_) none 19)
|
||||
(dummy-20 (_type_) none 20)
|
||||
(TODO-RENAME-21 (_type_) none 21)
|
||||
(TODO-RENAME-22 (_type_ vector quaternion float float) none 22)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -94,8 +94,8 @@
|
|||
((move-vec vector :inline :offset-assert 16)
|
||||
(best-u float :offset-assert 32)
|
||||
(best-tri collide-tri-result :inline :offset-assert 48)
|
||||
(best-from-prim basic :offset-assert 132)
|
||||
(best-to-prim basic :offset-assert 136)
|
||||
(best-from-prim collide-shape-prim :offset-assert 132)
|
||||
(best-to-prim collide-shape-prim :offset-assert 136)
|
||||
)
|
||||
:method-count-assert 10
|
||||
:size-assert #x8c
|
||||
|
@ -119,8 +119,8 @@
|
|||
;; definition of type collide-overlap-result
|
||||
(deftype collide-overlap-result (structure)
|
||||
((best-dist float :offset-assert 0)
|
||||
(best-from-prim basic :offset-assert 4)
|
||||
(best-to-prim basic :offset-assert 8)
|
||||
(best-from-prim collide-shape-prim :offset-assert 4)
|
||||
(best-to-prim collide-shape-prim :offset-assert 8)
|
||||
(best-from-tri collide-tri-result :inline :offset-assert 16)
|
||||
)
|
||||
:method-count-assert 10
|
||||
|
|
1261
test/decompiler/reference/levels/common/rigid-body_REF.gc
Normal file
1261
test/decompiler/reference/levels/common/rigid-body_REF.gc
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue