Skip to content

Commit

Permalink
cloth spheres debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
Hat-Kid committed Dec 7, 2024
1 parent e5b9c64 commit c0aef6b
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 16 deletions.
22 changes: 13 additions & 9 deletions goal_src/jak3/engine/physics/cloth.gc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
;; name in dgo: cloth
;; dgos: GAME

(#when PC_PORT
(define *display-cloth-spheres* #f))

;; DECOMP BEGINS

(defmethod relocate ((this verlet-particle-system) (offset int))
Expand Down Expand Up @@ -300,14 +303,14 @@
(meters 0.02)
(static-rgba #x80 0 #x80 #x80)
)
; (s4-0
; s3-0
; (the-as bucket-id s2-0)
; *temp-string*
; (the-as vector (-> this particles data s5-0))
; (the-as font-color s1-0)
; (the-as vector2h #f)
; )
(s4-0
s3-0
(the-as bucket-id s2-0)
*temp-string*
(the-as vector (-> this particles data s5-0))
(the-as font-color s1-0)
(the-as vector2h #f)
)
)
)
0
Expand Down Expand Up @@ -637,7 +640,8 @@
(compute-verlet-step this (* 0.0033333334 (the float v1-4)))
)
)
;; (debug-draw this)
;; og:preserve-this
(if *display-cloth-spheres* (debug-draw this))
0
)
)
Expand Down
21 changes: 14 additions & 7 deletions goal_src/jak3/engine/process-drawable/process-drawable.gc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,12 @@
)
)
)
))
)

(defun-debug draw-cloth-spheres ((pd process-drawable))
"Added in PC port"
(if (-> pd draw cloth-instances)
(dotimes (i (length (-> pd draw cloth-instances))) (debug-draw-spheres (-> pd draw cloth-instances i))))))

;; DECOMP BEGINS

Expand Down Expand Up @@ -553,12 +558,14 @@
)
)
;; og:preserve-this
(#when PC_PORT (when *debug-segment*
(when *display-bones*
(draw-bone-lines (the-as process-drawable (-> this process))))
(if *display-joint-names*
(draw-joint-spheres (the-as process-drawable (-> this process))))
))
(#when PC_PORT
(when *debug-segment*
(when *display-bones*
(draw-bone-lines (the-as process-drawable (-> this process))))
(if *display-joint-names*
(draw-joint-spheres (the-as process-drawable (-> this process))))
(if *display-cloth-spheres*
(draw-cloth-spheres (the process-drawable (-> this process))))))
0
(none)
)
Expand Down
1 change: 1 addition & 0 deletions goal_src/jak3/pc/debug/default-menu-pc.gc
Original file line number Diff line number Diff line change
Expand Up @@ -988,6 +988,7 @@
(flag "Joint names" *display-joint-names* dm-boolean-toggle-pick-func)
(flag "Bone lines" *display-bones* dm-boolean-toggle-pick-func)
(flag "Entity Lights" *display-lights* dm-boolean-toggle-pick-func)
(flag "Cloth Spheres" *display-cloth-spheres* dm-boolean-toggle-pick-func)
(flag "Debug Font Auto-Scale" #f ,(dm-lambda-boolean-flag (-> *pc-settings* debug-font-scale-auto?)))
(float-var "Debug Font Scale" #f ,(dm-lambda-float-var (-> *pc-settings* debug-font-scale)) 2 (new 'static 'bfloat :data 0.01) #t (new 'static 'bfloat :data 0.1) 2 0)
)
Expand Down

0 comments on commit c0aef6b

Please sign in to comment.