Files
jak-project/goal_src/jakx/engine/draw/draw-node.gc
T
Tyler Wilding 9c86c86c74 d/jx: More files (#4360)
Breaks the 300 file milestone, also includes the majority of mips2c
functions carried forward. Some functions need some fixes in the c++
code to mips2c properly, and a small handful of the mips2c functions
require manual patching -- all spots were marked with `TODO - fix` that
had to be commented out to get things compiling.
2026-09-04 09:27:06 -04:00

47 lines
1.4 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: draw-node.gc
;; name in dgo: draw-node
;; dgos: ENGINE, GAME
;; DECOMP BEGINS
(defmethod collect-regions ((this draw-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Fill the region-prim-list with regions that intersect the sphere."
(dotimes (s2-0 arg1)
(if (spheres-overlap? arg0 (the-as sphere (-> this bsphere)))
(collect-regions (-> this child) arg0 (the-as int (-> this child-count)) arg2)
)
(&+! this 32)
)
0
(none)
)
(defmethod mem-usage ((this drawable-inline-array-node) (usage memory-usage-block) (flags int))
(set! (-> usage length) (max 64 (-> usage length)))
(set! (-> usage data 63 name) "draw-node")
(+! (-> usage data 63 count) (-> this length))
(let ((v1-6 (asize-of this)))
(+! (-> usage data 63 used) v1-6)
(+! (-> usage data 63 total) (logand -16 (+ v1-6 15)))
)
this
)
;; WARN: Return type mismatch uint vs int.
(defmethod asize-of ((this drawable-inline-array-node))
(the-as int (+ (-> drawable-inline-array-node size) (* (+ (-> this length) -1) 32)))
)
(defmethod collect-regions ((this drawable-inline-array-node) (arg0 sphere) (arg1 int) (arg2 region-prim-list))
"Fill the region-prim-list with regions that intersect the sphere."
(collect-regions (the-as draw-node (-> this data)) arg0 (-> this length) arg2)
0
(none)
)
;; ERROR: function was not converted to expressions. Cannot decompile.