Skip to content

Commit

Permalink
decomp: collide-frag (#618)
Browse files Browse the repository at this point in the history
* decomp: Good portion of `collide-frag`

* decomp: Remove redundant method declarations for drawable types

* decomp: Finish `collide-frag`

Co-authored-by: water111 <48171810+water111@users.noreply.github.com>
  • Loading branch information
xTVaser and water111 authored Jun 22, 2021
1 parent a123f02 commit fc105e1
Show file tree
Hide file tree
Showing 11 changed files with 472 additions and 213 deletions.
181 changes: 5 additions & 176 deletions decompiler/config/all-types.gc
Original file line number Diff line number Diff line change
Expand Up @@ -5473,10 +5473,10 @@
:flag-assert #x1200000020
(:methods
(dummy-9 (_type_) _type_ 9) ;; probably login or init.
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-10 (_type_ drawable display-frame) int 10) ;; display-frame is from the method inspect tool
(dummy-11 (_type_ int) none 11) ; int - length
(dummy-12 (_type_ int) none 12) ; int - length
(dummy-13 (_type_ int) none 13) ; int - length
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
Expand All @@ -5490,16 +5490,6 @@
:method-count-assert 18
:size-assert #x24
:flag-assert #x1200000024
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)


Expand Down Expand Up @@ -5537,16 +5527,6 @@
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)


Expand All @@ -5568,16 +5548,6 @@
:size-assert #x20
:flag-assert #x1200000020
;; field distance is a float printed as hex?
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)

; (deftype drawable-inline-array-node (drawable-inline-array)
Expand Down Expand Up @@ -5642,16 +5612,6 @@
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)

(deftype drawable-tree-actor (drawable-tree)
Expand Down Expand Up @@ -5681,14 +5641,6 @@
:size-assert #x20
:flag-assert #x1300000020
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
(dummy-18 () none 18)
)
)
Expand Down Expand Up @@ -8730,16 +8682,6 @@
:method-count-assert 18
:size-assert #x40
:flag-assert #x1200000040
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)


Expand Down Expand Up @@ -11012,14 +10954,6 @@
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype drawable-inline-array-collide-fragment (drawable-inline-array)
Expand All @@ -11029,14 +10963,6 @@
:method-count-assert 18
:size-assert #x44
:flag-assert #x1200000044
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype drawable-tree-collide-fragment (drawable-tree)
Expand Down Expand Up @@ -11614,16 +11540,6 @@
:method-count-assert 18
:size-assert #x70
:flag-assert #x1200000070
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)

(deftype shrub-view-data (structure)
Expand Down Expand Up @@ -11660,16 +11576,6 @@
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)

(deftype instance-shrubbery (instance)
Expand All @@ -11680,16 +11586,6 @@
:method-count-assert 18
:size-assert #x50
:flag-assert #x1200000050
(:methods
(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)

(deftype drawable-inline-array-instance-shrub (drawable-inline-array)
Expand Down Expand Up @@ -11723,17 +11619,6 @@
:method-count-assert 18
:size-assert #x20
:flag-assert #x1200000020
(:methods

(dummy-10 (_type_) int 10)
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-16 (_type_ object object) object 16)
(dummy-17 () none 17)
)
)

(deftype prototype-shrubbery (drawable-inline-array)
Expand Down Expand Up @@ -11902,14 +11787,6 @@
:method-count-assert 18
:size-assert #x40
:flag-assert #x1200000040
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype instance-tie (instance)
Expand All @@ -11921,14 +11798,6 @@
:method-count-assert 18
:size-assert #x40
:flag-assert #x1200000040
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype drawable-inline-array-instance-tie (drawable-inline-array)
Expand All @@ -11938,14 +11807,6 @@
:method-count-assert 18
:size-assert #x64
:flag-assert #x1200000064
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype drawable-tree-instance-tie (drawable-tree)
Expand All @@ -11954,14 +11815,6 @@
:method-count-assert 18
:size-assert #x24
:flag-assert #x1200000024
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype prototype-tie (drawable-inline-array)
Expand All @@ -11971,14 +11824,6 @@
:method-count-assert 18
:size-assert #x64
:flag-assert #x1200000064
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype tie-matrix (structure)
Expand Down Expand Up @@ -12161,14 +12006,6 @@
:method-count-assert 18
:size-assert #x40
:flag-assert #x1200000040
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype drawable-inline-array-tfrag (drawable-inline-array)
Expand All @@ -12177,14 +12014,6 @@
:method-count-assert 18
:size-assert #x64
:flag-assert #x1200000064
(:methods
(dummy-11 () none 11)
(dummy-12 () none 12)
(dummy-13 () none 13)
(dummy-14 () none 14)
(dummy-15 () none 15)
(dummy-17 () none 17)
)
)

(deftype drawable-inline-array-trans-tfrag (drawable-inline-array-tfrag)
Expand Down Expand Up @@ -17173,7 +17002,7 @@

;; - Functions

(define-extern sphere-cull function)
(define-extern sphere-cull (function vector symbol))


;; ----------------------
Expand Down
30 changes: 17 additions & 13 deletions decompiler/config/jak1_ntsc_black_label/type_casts.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@
[22, "f0", "float"],
[28, "f0", "float"]
],

"joint-anim-inspect-elt": [
[9, "gp", "joint-anim-matrix"],
[26, "gp", "joint-anim-transformq"]
Expand All @@ -633,9 +633,7 @@
[77, "a0", "entity-links"]
],

"(method 0 nav-control)": [
[17, "t9", "(function string none)"]
],
"(method 0 nav-control)": [[17, "t9", "(function string none)"]],

"add-debug-point": [
[125, "a3", "pointer"],
Expand Down Expand Up @@ -675,17 +673,23 @@
[92, "a1", "pointer"],
[[112, 117], "v1", "dma-packet"]
],
"debug-percent-bar": [
[[32, 43], "v1", "dma-packet"]
],
"debug-pad-display": [
[[70, 75], "v1", "dma-packet"]
"debug-percent-bar": [[[32, 43], "v1", "dma-packet"]],
"debug-pad-display": [[[70, 75], "v1", "dma-packet"]],
"internal-draw-debug-text-3d": [[[54, 59], "v1", "dma-packet"]],
"drawable-frag-count": [[[14, 20], "s5", "drawable-group"]],
"generic-init-buffers": [[[39, 44], "v1", "dma-packet"]],

"(method 13 drawable-inline-array-collide-fragment)": [
[[1, 5], "v1", "collide-fragment"]
],
"internal-draw-debug-text-3d": [
[[54, 59], "v1", "dma-packet"]

"(method 12 drawable-inline-array-collide-fragment)": [
[[1, 5], "v1", "collide-fragment"]
],
"drawable-frag-count": [
[[14, 20], "s5", "drawable-group"]


"(method 11 drawable-inline-array-collide-fragment)": [
[[1, 5], "v1", "collide-fragment"]
],

"generic-init-buffers": [
Expand Down
3 changes: 3 additions & 0 deletions goal_src/engine/collide/collide-frag-h.gc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
;; name in dgo: collide-frag-h
;; dgos: GAME, ENGINE

; TODO - defined in drawable, but needed in collide-frag
(define-extern sphere-cull (function vector symbol))

;; definition of type collide-frag-vertex
(deftype collide-frag-vertex (vector)
()
Expand Down
Loading

0 comments on commit fc105e1

Please sign in to comment.