mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-21 07:37:45 -04:00
b75a64fc29
* decomp: Use a macro for loading VF0 (maybe should be in goal-lib.gc?) * update references * lint: format * delete now unused file
83 lines
2.1 KiB
Common Lisp
83 lines
2.1 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: wind.gc
|
|
;; name in dgo: wind
|
|
;; dgos: GAME, ENGINE
|
|
|
|
;; definition for symbol *wind-work*, type wind-work
|
|
(define *wind-work* (new 'global 'wind-work))
|
|
|
|
;; definition for function update-wind
|
|
;; INFO: Return type mismatch int vs none.
|
|
(defun update-wind ((arg0 wind-work) (arg1 (array uint8)))
|
|
(rlet ((vf0 :class vf)
|
|
(vf1 :class vf)
|
|
(vf2 :class vf)
|
|
)
|
|
(init-vf0-vector)
|
|
(let*
|
|
((f0-1 (+ (-> arg0 wind-normal w) (rand-vu-float-range -1024.0 1024.0)))
|
|
(f30-1 (- f0-1 (* (the float (the int (/ f0-1 65536.0))) 65536.0)))
|
|
)
|
|
(set! (-> arg0 wind-normal w) f30-1)
|
|
(set! (-> arg0 wind-normal x) (cos f30-1))
|
|
(set! (-> arg0 wind-normal z) (sin f30-1))
|
|
)
|
|
(set! (-> arg0 wind-time) (+ (-> arg0 wind-time) 1))
|
|
(let* ((s4-0 (logand (-> arg0 wind-time) 63))
|
|
(f0-4 (rand-vu-float-range 0.0 100.0))
|
|
(v1-5 (/ (-> arg0 wind-time) (the-as uint 120)))
|
|
(f1-6
|
|
(*
|
|
0.008333334
|
|
(the float (mod (-> arg0 wind-time) (the-as uint 120)))
|
|
)
|
|
)
|
|
(f2-4
|
|
(*
|
|
0.0625
|
|
(the float (-> arg1 (mod (the-as int v1-5) (-> arg1 length))))
|
|
)
|
|
)
|
|
(f0-5
|
|
(*
|
|
(+
|
|
(*
|
|
(-
|
|
(*
|
|
0.0625
|
|
(the
|
|
float
|
|
(-> arg1 (mod (the-as int (+ v1-5 1)) (-> arg1 length)))
|
|
)
|
|
)
|
|
f2-4
|
|
)
|
|
f1-6
|
|
)
|
|
f2-4
|
|
)
|
|
f0-4
|
|
)
|
|
)
|
|
)
|
|
(set! (-> *wind-work* wind-force s4-0) f0-5)
|
|
(let ((v1-14 (-> *wind-work* wind-array s4-0)))
|
|
(let ((a0-15 (-> arg0 wind-normal)))
|
|
(.lvf vf1 (&-> a0-15 quad))
|
|
)
|
|
(let ((a0-16 f0-5))
|
|
(.mov vf2 a0-16)
|
|
)
|
|
(.add.x.vf vf1 vf0 vf0 :mask #b1000)
|
|
(.mul.x.vf vf1 vf1 vf2 :mask #b111)
|
|
(.svf (&-> v1-14 quad) vf1)
|
|
)
|
|
)
|
|
(let ((v0-4 0))
|
|
)
|
|
(none)
|
|
)
|
|
)
|