jak3: sprite limit increase + add bsphere toggle for region faces (#3529)

This commit is contained in:
ManDude 2024-05-22 17:27:00 +02:00 committed by GitHub
parent 62ef9fe49d
commit 0db7be55e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 67 additions and 11 deletions

View File

@ -897,7 +897,16 @@
)
(add-debug-matrix *display-sprite-marks* (bucket-id debug) (-> this origin) (meters 2))
)
(sphere-in-view-frustum? (the-as sphere s5-1))
;; og:preserve-this
;; can we see it?
(#if (not PC_PORT)
(sphere-in-view-frustum? (the-as sphere s5-1))
(if (-> *pc-settings* ps2-parts?)
;; og:preserve-this launchers have larger bsphere if you have ps2 parts off
(sphere-in-view-frustum? (the-as sphere s5-1))
(sphere-in-view-frustum? (the-as sphere (begin (*! (-> s5-1 w) 4.0) s5-1)))
)
)
)
)
)
@ -1205,6 +1214,12 @@
(if (nonzero? (-> this matrix))
(set! f30-0 0.0)
)
;; og:preserve-this if we have ps2 particles off, say we're at the camera
(with-pc
(if (not (-> *pc-settings* ps2-parts?))
(set! f30-0 0.0)))
(let ((s2-1 (-> this length)))
(b! #t cfg-102 :delay (nop!))
(label cfg-26)

View File

@ -51,6 +51,11 @@
(arg3 pointer)
(arg4 (inline-array adgif-shader))
)
;; og:preserve-this
(#when PC_BIG_MEMORY
(*! arg0 SPRITE_MAX_AMOUNT_MULT)
; (*! arg1 SPRITE_MAX_AMOUNT_MULT)
)
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(let* ((v1-3 (/ (+ arg0 63) 64))
(a0-2 (/ (+ arg1 63) 64))

View File

@ -10,6 +10,8 @@
(define-extern sprite-glow-init-engine (function dma-buffer none))
(define-extern sprite-glow-draw (function dma-buffer none))
(#when PC_BIG_MEMORY (defconstant SPRITE_MAX_AMOUNT_MULT 12))
;; DECOMP BEGINS
(deftype sprite-vec-data-2d (structure)

View File

@ -80,6 +80,10 @@ The glow and distort renderers will pull sprites from here."
(defmethod new sprite-aux-list ((allocation symbol) (type-to-make type) (arg0 int))
;; og:preserve-this
(#when PC_BIG_MEMORY
(*! arg0 SPRITE_MAX_AMOUNT_MULT))
(let ((v0-0 (object-new allocation type-to-make (the-as int (+ (-> type-to-make size) (* arg0 16))))))
(set! (-> v0-0 num-entries) arg0)
(set! (-> v0-0 entry) 0)
@ -335,6 +339,12 @@ The glow and distort renderers will pull sprites from here."
(define sprite-vu1-block (new 'static 'vu-function #|:length #x37b :qlength #x1be|#))
(defmethod new sprite-array-2d ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int))
;; og:preserve-this
(#when PC_BIG_MEMORY
(*! arg0 SPRITE_MAX_AMOUNT_MULT)
; (*! arg1 SPRITE_MAX_AMOUNT_MULT)
)
(let* ((v1-0 (+ arg0 arg1))
(s4-0 (* 3 v1-0))
(a2-3 (* 5 v1-0))
@ -351,6 +361,12 @@ The glow and distort renderers will pull sprites from here."
)
(defmethod new sprite-array-3d ((allocation symbol) (type-to-make type) (arg0 int) (arg1 int))
;; og:preserve-this
(#when PC_BIG_MEMORY
(*! arg0 SPRITE_MAX_AMOUNT_MULT)
; (*! arg1 SPRITE_MAX_AMOUNT_MULT)
)
(let* ((v1-0 (+ arg0 arg1))
(s4-0 (* 3 v1-0))
(a2-3 (* 5 v1-0))

View File

@ -242,17 +242,35 @@
(t9-0 this arg0)
)
)
(let ((s5-0 (-> this bsphere)))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
s5-0
(-> this data normal)
(meters 2)
(new 'static 'rgba :r #xff :g #xff :a #x80)
(#cond
(PC_PORT
(when *debug-region-show-bsphere*
(let ((s5-0 (-> this bsphere)))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
s5-0
(-> this data normal)
(meters 2)
(new 'static 'rgba :r #xff :g #xff :a #x80)
)
(add-debug-sphere #t (bucket-id debug) s5-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x30))
)
)
)
(add-debug-sphere #t (bucket-id debug) s5-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x30))
)
(#t
(let ((s5-0 (-> this bsphere)))
(add-debug-vector
#t
(bucket-id debug-no-zbuf1)
s5-0
(-> this data normal)
(meters 2)
(new 'static 'rgba :r #xff :g #xff :a #x80)
)
(add-debug-sphere #t (bucket-id debug) s5-0 (-> this bsphere w) (new 'static 'rgba :r #xff :a #x30))
)
))
(add-debug-bound
(bucket-id debug)
(-> this data points)