Files
Hat Kid 122de4ecf5 jak1: clean up control-info names and other misc cleanup (#4295)
After spending the last month staring at and comparing Jak 3 and Jak 1
versions of a bunch of `target` code for my jetboard mod, I figured this
would be a good opportunity to revive this ancient PR #1714 along with
some other small misc fixes/improvements.

Instead of directly replacing the old fields, I decided to opt for using
overlay fields to maintain backwards compatibility with existing manual
patches, files without ref tests and mods that might use these fields.
2026-05-31 15:08:41 +02:00

77 lines
2.7 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type mud
(deftype mud (water-anim)
()
)
;; definition for method 3 of type mud
(defmethod inspect ((this mud))
(let ((t9-0 (method-of-type water-anim inspect)))
(t9-0 this)
)
this
)
;; definition for symbol ripple-for-mud, type ripple-wave-set
(define ripple-for-mud (new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave (new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 40.0 :xdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 40.0 :xdiv -1 :zdiv 1 :speed 1.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for symbol ripple-for-small-mud, type ripple-wave-set
(define ripple-for-small-mud (new 'static 'ripple-wave-set
:count 3
:converted #f
:normal-scale 1.0
:wave (new 'static 'inline-array ripple-wave 4
(new 'static 'ripple-wave :scale 20.0 :xdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv -2 :zdiv 2 :speed 0.5)
(new 'static 'ripple-wave :scale 20.0 :xdiv 5 :zdiv 3 :speed 0.75)
(new 'static 'ripple-wave)
)
)
)
;; definition for method 22 of type mud
;; INFO: Return type mismatch ripple-wave-set vs none.
(defmethod water-vol-method-22 ((this mud))
(let ((t9-0 (method-of-type water-anim water-vol-method-22)))
(t9-0 this)
)
(logclear! (-> this flag) (water-flag part-water))
(logior! (-> this flag) (water-flag mud))
(let ((gp-0 (new 'process 'ripple-control)))
(set! (-> this draw ripple) gp-0)
(set! (-> gp-0 global-scale) 3072.0)
(set! (-> gp-0 waveform) ripple-for-mud)
(let ((v1-9 (res-lump-data (-> this entity) 'water-anim-fade-dist (pointer float))))
(when v1-9
(set! (-> gp-0 close-fade-dist) (-> v1-9 0))
(set! (-> gp-0 far-fade-dist) (-> v1-9 1))
)
)
(case (-> this look)
((21 25 29)
(set! (-> gp-0 close-fade-dist) 4096000000.0)
(set! (-> gp-0 far-fade-dist) 8192000000.0)
)
)
(case (-> this look)
((22 25 24 27 26 31)
(set! (-> gp-0 waveform) ripple-for-small-mud)
)
)
)
(none)
)