mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
58a5440c8a
Makes a bunch of missions mostly playable, including: - `arena-training-1` - `arena-fight-1` - `wascity-chase` - `arena-fight-2` - `arena-fight-3` - `volcano-darkeco` - `desert-hover` - `nest-eggs` - `temple-climb` - `temple-oracle` - `temple-tests` - `desert-beast-battle` - `desert-turtle-training` - `desert-course-race` - `desert-artifact-race1` - `wascity-leaper-race` - `wascity-pre-game` - `sewer-met-hum` - `forest-kill-plants` - `forest-ring-chase` - `temple-defend` - `tower-destroy` - `desert-glide` --- Files: - `ripple` - `waswide-mood` - `sig-rider` - `nst-tasks` - `nst-part` - `nst-gas` - `nst-eggs-h` - `nst-obs` - `nst-mood` - `egg-spider` - `wasdoors-init` - `wasall-tasks` - `wvehicle-race` - `wcar-marauder` - `wcar-marauder-b` - `turret-control` - `was-squad-control` - `turtle-training` - `kleever-rider` - `course-race` - `artifact-race` - `desert-hover` - `desbeast-path-h` - `des-beast` - `desertg-obs` - `desertf-obs` - `desertd-obs` - `desert-dust-storm` - `des-cactus` - `race-hud` - `race-info` - `race-manager` - `tizard` - `flyingsaw` - `hover-training` - `temple-mood` - `temple-obs` - `temple-obs2` - `temple-part` - `temple-scenes` - `templex-mood` - `templex-obs` - `templex-part` - `tomb-baby-spider` - `target-turret-shot` - `target-turret` - `beast-battle-path` - `des-beast-2` - `mh-flyer` - `scorpion-gun` - `hover-enemy-h` - `hover-enemy` - `hover-formation-h` - `hover-formation` - `hover-nav-control-h` - `hover-nav-control` - `flamer-hover` - `hover-nav-templea` - `robo-hover` - `hover-nav-sewb` - `hover-nav-sewg` - `hover-nav-sewj` - `hover-nav-sewl` - `hover-nav-sewo` - `hover-nav-towera` - `tower-mood` - `tower-obs` - `tower-scenes` - `tower-part` - `eco-green-collider` - `forest-bridges` - `forest-kill-plants` - `forest-mood` - `forest-ring-chase` - `forest-tasks` - `forest-part` - `foresta-obs` - `hover-nav-foresta` - `mh-plant` - `dp-bipedal-part` - `dp-bipedal-shot` - `dp-bipedal` - `neo-spawner` - `for-turret` - `for-turret-shot` - `neo-wasp` - `neo-wasp-part` - `volcanox-scenes` - `volcanox-mood` - `volcano-scenes` - `volcano-mood` - `volcano-obs` - `volcano-obs2` - `chain-physics` - `rigid-body-plat` - `volcano-part` - `flamer-lava` - `flitter` - `spiky-frog` - `flut-wild` - `target-indax` - `target-indax-hang` - `mantis` - `volcanox-obs` - `spyder` - `wcar-faccar` - `mhcity-obs2` - `mhcity-part` - `mhcity-obs` - `dm-mine-spider` - `rapid-gunner` - `stadium-mood` - `stadium-scenes` - `stadiuma-mood` - `stadiuma-part` - `kanga-lizard` - `marauder` - `arena-scenes` - `wasstada-mood` - `wasstada-obs` - `wasstada-part` - `wasstadb-obs` - `wasstadc-obs` - `dm-flyer` - `maker-part` - `maker-projectile` - `skeet-part` - `wascity-turret` - `wasgun-h` - `wasgun-hud` - `wasgun-manager` - `nav-graph-h` - `traffic-engine-h` - `waswide-init` - `cty-borrow-manager-h` - `cty-borrow-manager` - `desert-part` - `height-map-h` - `height-map` - `traffic-height-map` - `vehicle-control` - `hvehicle-h` - `hvehicle` - `hvehicle-effects` - `hvehicle-physics` - `hvehicle-util` - `glider-h` - `glider-hud` - `glider-manager` - `glider-ring` - `glider-ring-part` - `h-glider` - `hanga-init` - `was-pre-game` - `was-leaper-race` - `flut-racer` - `desert-scenes` - `desert-lizard-h` - `desert-lizard-task` - `desert-lizard` - `throne-scenes` - `waspal-mood` - `waspala-obs` - `waspala-part` - `deswalk-obs` - `deswalk-part` - `terraformer-drone` - `terraformer-head` - `terraformer-part` - `terraformer-setup`
1346 lines
47 KiB
Common Lisp
1346 lines
47 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: ocean.gc
|
|
;; name in dgo: ocean
|
|
;; dgos: GAME
|
|
|
|
;; PC Port hack
|
|
(define *ocean-generate-verts-vector* (new 'global 'vector))
|
|
|
|
(set-vector! *ocean-generate-verts-vector*
|
|
(the-as float #x43000000) ;; in jak1, this component was different!
|
|
(the-as float #x43000000)
|
|
(the-as float #x43000000)
|
|
(the-as float #x43000000)
|
|
)
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
(defmethod set-corners! ((this ocean) (arg0 float) (arg1 float))
|
|
(let* ((f2-0 (* 0.00008138021 arg0))
|
|
(f3-0 (* 0.00008138021 arg1))
|
|
(f0-2 f2-0)
|
|
(f0-4 (- f0-2 (the float (the int f0-2))))
|
|
(f1-6 f3-0)
|
|
(f1-8 (- f1-6 (the float (the int f1-6))))
|
|
(a1-1 (logand (the int f2-0) 31))
|
|
(a3-0 (logand (the int f3-0) 31))
|
|
(v1-9 (logand (+ a1-1 1) 31))
|
|
(a2-2 (logand (+ a3-0 1) 31))
|
|
(f2-3 (-> this heights data (+ (* a3-0 32) a1-1)))
|
|
(f3-1 (-> this heights data (+ (* a3-0 32) v1-9)))
|
|
(f4-4 (-> this heights data (+ (* a2-2 32) a1-1)))
|
|
(f5-0 (-> this heights data (+ (* a2-2 32) v1-9)))
|
|
(f6-1 (+ (* f3-1 f0-4) (* f2-3 (- 1.0 f0-4))))
|
|
(f0-9 (+ (* (+ (* f5-0 f0-4) (* f4-4 (- 1.0 f0-4))) f1-8) (* f6-1 (- 1.0 f1-8))))
|
|
)
|
|
(set! (-> this corner00) f2-3)
|
|
(set! (-> this corner01) f3-1)
|
|
(set! (-> this corner10) f4-4)
|
|
(set! (-> this corner11) f5-0)
|
|
f0-9
|
|
)
|
|
)
|
|
|
|
(defmethod get-height ((this ocean) (arg0 vector) (arg1 symbol))
|
|
(local-vars (v1-12 int))
|
|
(cond
|
|
((and (-> this heights) *ocean-map*)
|
|
(let* ((f30-0 (- (-> arg0 x) (-> this start-corner x)))
|
|
(f28-0 (- (-> arg0 z) (-> this start-corner z)))
|
|
(v1-3 (the int (* 0.0000025431316 f30-0)))
|
|
(a0-2 (the int (* 0.0000025431316 f28-0)))
|
|
(v1-7 (-> this ocean-trans-indices data (+ (* 48 a0-2) v1-3)))
|
|
)
|
|
(cond
|
|
((= (-> v1-7 parent) -1)
|
|
(if arg1
|
|
(-> this start-corner y)
|
|
4095996000.0
|
|
)
|
|
)
|
|
((begin
|
|
(let ((a0-8 (logand (the int (* 0.000010172526 f30-0)) 3))
|
|
(a3-4 (logand (the int (* 0.000010172526 f28-0)) 3))
|
|
(v1-10 (-> this ocean-near-indices data (-> v1-7 child)))
|
|
)
|
|
(set! v1-12 (-> (the-as (pointer int16) (+ (* (+ (* a3-4 4) a0-8) 2) (the-as int v1-10)))))
|
|
)
|
|
(= v1-12 -1)
|
|
)
|
|
(if arg1
|
|
(-> this start-corner y)
|
|
4095996000.0
|
|
)
|
|
)
|
|
(else
|
|
(let ((a0-14 (logand (the int (* 0.00008138021 f30-0)) 7)))
|
|
(cond
|
|
((not (logtest? (-> this ocean-mid-masks data v1-12 mask (logand (the int (* 0.00008138021 f28-0)) 7))
|
|
(ash 1 a0-14)
|
|
)
|
|
)
|
|
(let* ((f1-2 (vector-vector-distance arg0 (math-camera-pos)))
|
|
(f26-0 (- 1.0 (fmin 1.0 (* 0.000010172526 f1-2))))
|
|
)
|
|
(if (-> this ocean-near-translucent?)
|
|
(+ (* f26-0 (set-corners! this f30-0 f28-0)) (-> this start-corner y))
|
|
(-> this start-corner y)
|
|
)
|
|
)
|
|
)
|
|
(arg1
|
|
(-> this start-corner y)
|
|
)
|
|
(else
|
|
4095996000.0
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(arg1
|
|
0.0
|
|
)
|
|
(else
|
|
4095996000.0
|
|
)
|
|
)
|
|
)
|
|
|
|
(def-mips2c init-ocean-far-regs (function none))
|
|
|
|
(def-mips2c draw-large-polygon-ocean (function none))
|
|
|
|
(def-mips2c render-ocean-quad (function (inline-array ocean-vertex) dma-buffer symbol))
|
|
|
|
(defmethod add-colors! ((this ocean) (arg0 vector) (arg1 ocean-vertex))
|
|
(let ((s3-0 (new 'stack-no-clear 'vector))
|
|
(s4-0 (-> this haze-lights))
|
|
)
|
|
(set! (-> s3-0 quad) (-> arg1 pos quad))
|
|
(set! (-> s3-0 y) 0.0)
|
|
(vector-normalize! s3-0 1.0)
|
|
(+! (-> s3-0 y) 0.1)
|
|
(vector-normalize! s3-0 1.0)
|
|
(let ((s5-0 (new 'stack-no-clear 'vector4)))
|
|
(let* ((f0-4 (vector-dot (-> s4-0 sun0-normal) s3-0))
|
|
(f1-2 (vector-dot (-> s4-0 sun1-normal) s3-0))
|
|
(f2-1 (vector-dot (-> s4-0 moon-normal) s3-0))
|
|
(f0-5 (fmax 0.0 f0-4))
|
|
(f30-0 (fmax 0.0 f1-2))
|
|
(f28-0 (fmax 0.0 f2-1))
|
|
)
|
|
(set! (-> s5-0 quad) (-> s4-0 ambi-color quad))
|
|
(vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 sun0-color)) f0-5)
|
|
(vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 sun1-color)) f30-0)
|
|
(vector4-madd! s5-0 s5-0 (the-as vector4 (-> s4-0 moon-color)) f28-0)
|
|
)
|
|
(vector4-scale! s5-0 s5-0 128.0)
|
|
(set! (-> arg0 x) (fmax 0.0 (fmin 255.0 (-> s5-0 x))))
|
|
(set! (-> arg0 y) (fmax 0.0 (fmin 255.0 (-> s5-0 y))))
|
|
(set! (-> arg0 z) (fmax 0.0 (fmin 255.0 (-> s5-0 z))))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-60 ((this ocean) (arg0 dma-buffer))
|
|
(local-vars (sv-48 float) (sv-52 vector) (sv-56 vector))
|
|
;; og:preserve-this
|
|
(let ((s4-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let ((f0-0 (-> this start-corner z)))
|
|
(let ((f1-1 (+ -5898240.0 f0-0)))
|
|
(set! (-> s4-0 0 pos z) f1-1)
|
|
(set! (-> s4-0 1 pos z) f1-1)
|
|
)
|
|
(set! (-> s4-0 2 pos z) f0-0)
|
|
(set! (-> s4-0 3 pos z) f0-0)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 0.5)
|
|
(set! (-> s4-0 1 pos w) 0.5)
|
|
(set! (-> s4-0 2 pos w) 1.0)
|
|
(set! (-> s4-0 3 pos w) 1.0)
|
|
(set! sv-48 (-> this start-corner x))
|
|
(set! sv-52 (new 'stack-no-clear 'vector))
|
|
(set! sv-56 (new 'stack-no-clear 'vector))
|
|
(let ((s3-0 (-> this ocean-colors)))
|
|
(let ((s2-0 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-0 colors)))
|
|
(dotimes (s1-0 48)
|
|
(let ((f0-8 (+ (* 393216.0 (the float s1-0)) sv-48)))
|
|
(let ((f1-6 (+ 393216.0 f0-8)))
|
|
(set! (-> s4-0 0 pos x) f0-8)
|
|
(set! (-> s4-0 1 pos x) f1-6)
|
|
(set! (-> s4-0 2 pos x) f1-6)
|
|
)
|
|
(set! (-> s4-0 3 pos x) f0-8)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ s1-0 1) 4))))
|
|
(set! (-> s4-0 0 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 1 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 2 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 3 col quad) (-> sv-52 quad))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-0 #t)
|
|
)
|
|
(else
|
|
(if s2-0
|
|
(goto cfg-9)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-9)
|
|
(let ((f0-10 (+ -5898240.0 (-> this start-corner z))))
|
|
(let ((f1-9 (+ -5898240.0 f0-10)))
|
|
(set! (-> s4-0 0 pos z) f1-9)
|
|
(set! (-> s4-0 1 pos z) f1-9)
|
|
)
|
|
(set! (-> s4-0 2 pos z) f0-10)
|
|
(set! (-> s4-0 3 pos z) f0-10)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 0.0)
|
|
(set! (-> s4-0 1 pos w) 0.0)
|
|
(set! (-> s4-0 2 pos w) 0.5)
|
|
(set! (-> s4-0 3 pos w) 0.5)
|
|
(let ((s3-1 (-> this ocean-colors)))
|
|
(let ((s2-1 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-1 colors)))
|
|
(dotimes (s1-1 48)
|
|
(let ((f0-17 (+ (* 393216.0 (the float s1-1)) sv-48)))
|
|
(let ((f1-14 (+ 393216.0 f0-17)))
|
|
(set! (-> s4-0 0 pos x) f0-17)
|
|
(set! (-> s4-0 1 pos x) f1-14)
|
|
(set! (-> s4-0 2 pos x) f1-14)
|
|
)
|
|
(set! (-> s4-0 3 pos x) f0-17)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ s1-1 1) 4))))
|
|
(add-colors! this (-> s4-0 0 col) (-> s4-0 0))
|
|
(add-colors! this (-> s4-0 1 col) (-> s4-0 1))
|
|
(set! (-> s4-0 2 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 3 col quad) (-> sv-52 quad))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-1 #t)
|
|
)
|
|
(else
|
|
(if s2-1
|
|
(goto cfg-18)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-18)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-61 ((this ocean) (arg0 dma-buffer))
|
|
(local-vars (sv-48 float) (sv-52 vector) (sv-56 vector))
|
|
;; og:preserve-this
|
|
(let ((s4-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let* ((f0-1 (+ 18874368.0 (-> this start-corner z)))
|
|
(f1-2 (+ 5898240.0 f0-1))
|
|
)
|
|
(set! (-> s4-0 0 pos z) f0-1)
|
|
(set! (-> s4-0 1 pos z) f0-1)
|
|
(set! (-> s4-0 2 pos z) f1-2)
|
|
(set! (-> s4-0 3 pos z) f1-2)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 1.0)
|
|
(set! (-> s4-0 1 pos w) 1.0)
|
|
(set! (-> s4-0 2 pos w) 0.5)
|
|
(set! (-> s4-0 3 pos w) 0.5)
|
|
(set! sv-48 (-> this start-corner x))
|
|
(set! sv-52 (new 'stack-no-clear 'vector))
|
|
(set! sv-56 (new 'stack-no-clear 'vector))
|
|
(let ((s3-0 (-> this ocean-colors)))
|
|
(let ((s2-0 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-0 colors 2444)))
|
|
(dotimes (s1-0 48)
|
|
(let ((f0-9 (+ (* 393216.0 (the float s1-0)) sv-48)))
|
|
(let ((f1-7 (+ 393216.0 f0-9)))
|
|
(set! (-> s4-0 0 pos x) f0-9)
|
|
(set! (-> s4-0 1 pos x) f1-7)
|
|
(set! (-> s4-0 2 pos x) f1-7)
|
|
)
|
|
(set! (-> s4-0 3 pos x) f0-9)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ s1-0 2445) 4))))
|
|
(set! (-> s4-0 0 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 1 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 2 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 3 col quad) (-> sv-52 quad))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-0 #t)
|
|
)
|
|
(else
|
|
(if s2-0
|
|
(goto cfg-9)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-9)
|
|
(let* ((f0-11 (+ 24772608.0 (-> this start-corner z)))
|
|
(f1-10 (+ 5898240.0 f0-11))
|
|
)
|
|
(set! (-> s4-0 0 pos z) f0-11)
|
|
(set! (-> s4-0 1 pos z) f0-11)
|
|
(set! (-> s4-0 2 pos z) f1-10)
|
|
(set! (-> s4-0 3 pos z) f1-10)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 0.5)
|
|
(set! (-> s4-0 1 pos w) 0.5)
|
|
(set! (-> s4-0 2 pos w) 0.0)
|
|
(set! (-> s4-0 3 pos w) 0.0)
|
|
(let ((s3-1 (-> this ocean-colors)))
|
|
(let ((s2-1 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-1 colors 2444)))
|
|
(dotimes (s1-1 48)
|
|
(let ((f0-18 (+ (* 393216.0 (the float s1-1)) sv-48)))
|
|
(let ((f1-15 (+ 393216.0 f0-18)))
|
|
(set! (-> s4-0 0 pos x) f0-18)
|
|
(set! (-> s4-0 1 pos x) f1-15)
|
|
(set! (-> s4-0 2 pos x) f1-15)
|
|
)
|
|
(set! (-> s4-0 3 pos x) f0-18)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ s1-1 2445) 4))))
|
|
(set! (-> s4-0 0 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 1 col quad) (-> sv-56 quad))
|
|
(add-colors! this (-> s4-0 2 col) (-> s4-0 2))
|
|
(add-colors! this (-> s4-0 3 col) (-> s4-0 3))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-1 #t)
|
|
)
|
|
(else
|
|
(if s2-1
|
|
(goto cfg-18)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-18)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-62 ((this ocean) (arg0 dma-buffer))
|
|
(local-vars (sv-48 float) (sv-52 vector) (sv-56 vector))
|
|
;; og:preserve-this
|
|
(let ((s4-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let* ((f0-0 (-> this start-corner x))
|
|
(f1-1 (+ -5898240.0 f0-0))
|
|
)
|
|
(set! (-> s4-0 0 pos x) f1-1)
|
|
(set! (-> s4-0 1 pos x) f0-0)
|
|
(set! (-> s4-0 2 pos x) f0-0)
|
|
(set! (-> s4-0 3 pos x) f1-1)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 0.5)
|
|
(set! (-> s4-0 1 pos w) 1.0)
|
|
(set! (-> s4-0 2 pos w) 1.0)
|
|
(set! (-> s4-0 3 pos w) 0.5)
|
|
(set! sv-48 (-> this start-corner z))
|
|
(set! sv-52 (new 'stack-no-clear 'vector))
|
|
(set! sv-56 (new 'stack-no-clear 'vector))
|
|
(let ((s3-0 (-> this ocean-colors)))
|
|
(let ((s2-0 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-0 colors)))
|
|
(dotimes (s1-0 48)
|
|
(let* ((f0-8 (+ (* 393216.0 (the float s1-0)) sv-48))
|
|
(f1-6 (+ 393216.0 f0-8))
|
|
)
|
|
(set! (-> s4-0 0 pos z) f0-8)
|
|
(set! (-> s4-0 1 pos z) f0-8)
|
|
(set! (-> s4-0 2 pos z) f1-6)
|
|
(set! (-> s4-0 3 pos z) f1-6)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* 208 (+ s1-0 1)))))
|
|
(set! (-> s4-0 0 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 1 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 2 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 3 col quad) (-> sv-56 quad))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-0 #t)
|
|
)
|
|
(else
|
|
(if s2-0
|
|
(goto cfg-9)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-9)
|
|
(let* ((f0-10 (+ -5898240.0 (-> this start-corner x)))
|
|
(f1-9 (+ -5898240.0 f0-10))
|
|
)
|
|
(set! (-> s4-0 0 pos x) f1-9)
|
|
(set! (-> s4-0 1 pos x) f0-10)
|
|
(set! (-> s4-0 2 pos x) f0-10)
|
|
(set! (-> s4-0 3 pos x) f1-9)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 0.0)
|
|
(set! (-> s4-0 1 pos w) 0.5)
|
|
(set! (-> s4-0 2 pos w) 0.5)
|
|
(set! (-> s4-0 3 pos w) 0.0)
|
|
(let ((s3-1 (-> this ocean-colors)))
|
|
(let ((s2-1 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (-> s3-1 colors)))
|
|
(dotimes (s1-1 48)
|
|
(let* ((f0-17 (+ (* 393216.0 (the float s1-1)) sv-48))
|
|
(f1-14 (+ 393216.0 f0-17))
|
|
)
|
|
(set! (-> s4-0 0 pos z) f0-17)
|
|
(set! (-> s4-0 1 pos z) f0-17)
|
|
(set! (-> s4-0 2 pos z) f1-14)
|
|
(set! (-> s4-0 3 pos z) f1-14)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* 208 (+ s1-1 1)))))
|
|
(add-colors! this (-> s4-0 0 col) (-> s4-0 0))
|
|
(set! (-> s4-0 1 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 2 col quad) (-> sv-56 quad))
|
|
(add-colors! this (-> s4-0 3 col) (-> s4-0 3))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-1 #t)
|
|
)
|
|
(else
|
|
(if s2-1
|
|
(goto cfg-18)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-18)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-63 ((this ocean) (arg0 dma-buffer))
|
|
(local-vars (sv-48 float) (sv-52 vector) (sv-56 vector))
|
|
;; og:preserve-this
|
|
(let ((s4-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let ((f0-1 (+ 18874368.0 (-> this start-corner x))))
|
|
(let ((f1-2 (+ 5898240.0 f0-1)))
|
|
(set! (-> s4-0 0 pos x) f0-1)
|
|
(set! (-> s4-0 1 pos x) f1-2)
|
|
(set! (-> s4-0 2 pos x) f1-2)
|
|
)
|
|
(set! (-> s4-0 3 pos x) f0-1)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 1.0)
|
|
(set! (-> s4-0 1 pos w) 0.5)
|
|
(set! (-> s4-0 2 pos w) 0.5)
|
|
(set! (-> s4-0 3 pos w) 1.0)
|
|
(set! sv-48 (-> this start-corner z))
|
|
(set! sv-52 (new 'stack-no-clear 'vector))
|
|
(set! sv-56 (new 'stack-no-clear 'vector))
|
|
(let ((s3-0 (-> this ocean-colors)))
|
|
(let ((s2-0 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-0 colors 47)))
|
|
(dotimes (s1-0 48)
|
|
(let* ((f0-9 (+ (* 393216.0 (the float s1-0)) sv-48))
|
|
(f1-7 (+ 393216.0 f0-9))
|
|
)
|
|
(set! (-> s4-0 0 pos z) f0-9)
|
|
(set! (-> s4-0 1 pos z) f0-9)
|
|
(set! (-> s4-0 2 pos z) f1-7)
|
|
(set! (-> s4-0 3 pos z) f1-7)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-0 colors) (* (+ (* 52 (+ s1-0 1)) 47) 4))))
|
|
(set! (-> s4-0 0 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 1 col quad) (-> sv-52 quad))
|
|
(set! (-> s4-0 2 col quad) (-> sv-56 quad))
|
|
(set! (-> s4-0 3 col quad) (-> sv-56 quad))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-0 #t)
|
|
)
|
|
(else
|
|
(if s2-0
|
|
(goto cfg-9)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-9)
|
|
(let ((f0-11 (+ 24772608.0 (-> this start-corner x))))
|
|
(let ((f1-10 (+ 5898240.0 f0-11)))
|
|
(set! (-> s4-0 0 pos x) f0-11)
|
|
(set! (-> s4-0 1 pos x) f1-10)
|
|
(set! (-> s4-0 2 pos x) f1-10)
|
|
)
|
|
(set! (-> s4-0 3 pos x) f0-11)
|
|
)
|
|
(set! (-> s4-0 0 pos w) 0.5)
|
|
(set! (-> s4-0 1 pos w) 0.0)
|
|
(set! (-> s4-0 2 pos w) 0.0)
|
|
(set! (-> s4-0 3 pos w) 0.5)
|
|
(let ((s3-1 (-> this ocean-colors)))
|
|
(let ((s2-1 #f))
|
|
(rgba-to-vector! this sv-52 (the-as (pointer int32) (&-> s3-1 colors 47)))
|
|
(dotimes (s1-1 48)
|
|
(let* ((f0-18 (+ (* 393216.0 (the float s1-1)) sv-48))
|
|
(f1-15 (+ 393216.0 f0-18))
|
|
)
|
|
(set! (-> s4-0 0 pos z) f0-18)
|
|
(set! (-> s4-0 1 pos z) f0-18)
|
|
(set! (-> s4-0 2 pos z) f1-15)
|
|
(set! (-> s4-0 3 pos z) f1-15)
|
|
)
|
|
(rgba-to-vector! this sv-56 (the-as (pointer int32) (&+ (-> s3-1 colors) (* (+ (* 52 (+ s1-1 1)) 47) 4))))
|
|
(set! (-> s4-0 0 col quad) (-> sv-52 quad))
|
|
(add-colors! this (-> s4-0 1 col) (-> s4-0 1))
|
|
(add-colors! this (-> s4-0 2 col) (-> s4-0 2))
|
|
(set! (-> s4-0 3 col quad) (-> sv-56 quad))
|
|
(set! (-> sv-52 quad) (-> sv-56 quad))
|
|
(cond
|
|
((render-ocean-quad s4-0 arg0)
|
|
(set! s2-1 #t)
|
|
)
|
|
(else
|
|
(if s2-1
|
|
(goto cfg-18)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-18)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-64 ((this ocean) (arg0 dma-buffer))
|
|
;; og:preserve-this
|
|
(let ((gp-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let* ((v1-0 (-> this ocean-colors))
|
|
(f30-0 (-> this start-corner x))
|
|
(f28-0 (-> this start-corner z))
|
|
(f26-0 (+ -5898240.0 f30-0))
|
|
(f24-0 (+ -5898240.0 f28-0))
|
|
(s4-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(rgba-to-vector! this s4-0 (the-as (pointer int32) (-> v1-0 colors)))
|
|
(set! (-> gp-0 0 pos x) f26-0)
|
|
(set! (-> gp-0 1 pos x) f30-0)
|
|
(set! (-> gp-0 2 pos x) f30-0)
|
|
(set! (-> gp-0 3 pos x) f26-0)
|
|
(set! (-> gp-0 0 pos z) f24-0)
|
|
(set! (-> gp-0 1 pos z) f24-0)
|
|
(set! (-> gp-0 2 pos z) f28-0)
|
|
(set! (-> gp-0 3 pos z) f28-0)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 1.0)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(set! (-> gp-0 0 col quad) (-> s4-0 quad))
|
|
(set! (-> gp-0 1 col quad) (-> s4-0 quad))
|
|
(set! (-> gp-0 2 col quad) (-> s4-0 quad))
|
|
(set! (-> gp-0 3 col quad) (-> s4-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let ((f0-7 (+ -5898240.0 (-> this start-corner x)))
|
|
(f1-1 (-> this start-corner z))
|
|
)
|
|
(let ((f2-1 (+ -5898240.0 f0-7))
|
|
(f3-1 (+ -5898240.0 f1-1))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f2-1)
|
|
(set! (-> gp-0 1 pos x) f0-7)
|
|
(set! (-> gp-0 2 pos x) f0-7)
|
|
(set! (-> gp-0 3 pos x) f2-1)
|
|
(set! (-> gp-0 0 pos z) f3-1)
|
|
(set! (-> gp-0 1 pos z) f3-1)
|
|
)
|
|
(set! (-> gp-0 2 pos z) f1-1)
|
|
(set! (-> gp-0 3 pos z) f1-1)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(set! (-> gp-0 1 col quad) (-> s4-0 quad))
|
|
(set! (-> gp-0 2 col quad) (-> s4-0 quad))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let ((f0-13 (+ -5898240.0 (-> this start-corner x)))
|
|
(f1-4 (+ -5898240.0 (-> this start-corner z)))
|
|
)
|
|
(let ((f2-4 (+ -5898240.0 f0-13))
|
|
(f3-3 (+ -5898240.0 f1-4))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f2-4)
|
|
(set! (-> gp-0 1 pos x) f0-13)
|
|
(set! (-> gp-0 2 pos x) f0-13)
|
|
(set! (-> gp-0 3 pos x) f2-4)
|
|
(set! (-> gp-0 0 pos z) f3-3)
|
|
(set! (-> gp-0 1 pos z) f3-3)
|
|
)
|
|
(set! (-> gp-0 2 pos z) f1-4)
|
|
(set! (-> gp-0 3 pos z) f1-4)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 1))
|
|
(set! (-> gp-0 2 col quad) (-> s4-0 quad))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let ((f0-18 (-> this start-corner x))
|
|
(f1-6 (+ -5898240.0 (-> this start-corner z)))
|
|
)
|
|
(let ((f2-7 (+ -5898240.0 f0-18))
|
|
(f3-5 (+ -5898240.0 f1-6))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f2-7)
|
|
(set! (-> gp-0 1 pos x) f0-18)
|
|
(set! (-> gp-0 2 pos x) f0-18)
|
|
(set! (-> gp-0 3 pos x) f2-7)
|
|
(set! (-> gp-0 0 pos z) f3-5)
|
|
(set! (-> gp-0 1 pos z) f3-5)
|
|
)
|
|
(set! (-> gp-0 2 pos z) f1-6)
|
|
(set! (-> gp-0 3 pos z) f1-6)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 2))
|
|
(set! (-> gp-0 2 col quad) (-> s4-0 quad))
|
|
(set! (-> gp-0 3 col quad) (-> s4-0 quad))
|
|
)
|
|
(render-ocean-quad gp-0 arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-65 ((this ocean) (arg0 dma-buffer))
|
|
;; og:preserve-this
|
|
(let ((gp-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let* ((v1-0 (-> this ocean-colors))
|
|
(f30-0 (+ 18874368.0 (-> this start-corner x)))
|
|
(f28-0 (-> this start-corner z))
|
|
(f26-0 (+ 5898240.0 f30-0))
|
|
(f24-0 (+ -5898240.0 f28-0))
|
|
(s3-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 47)))
|
|
(set! (-> gp-0 0 pos x) f30-0)
|
|
(set! (-> gp-0 1 pos x) f26-0)
|
|
(set! (-> gp-0 2 pos x) f26-0)
|
|
(set! (-> gp-0 3 pos x) f30-0)
|
|
(set! (-> gp-0 0 pos z) f24-0)
|
|
(set! (-> gp-0 1 pos z) f24-0)
|
|
(set! (-> gp-0 2 pos z) f28-0)
|
|
(set! (-> gp-0 3 pos z) f28-0)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 1.0)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 2 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let ((f0-8 (+ 24772608.0 (-> this start-corner x)))
|
|
(f1-2 (-> this start-corner z))
|
|
)
|
|
(let ((f2-1 (+ 5898240.0 f0-8))
|
|
(f3-1 (+ -5898240.0 f1-2))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f0-8)
|
|
(set! (-> gp-0 1 pos x) f2-1)
|
|
(set! (-> gp-0 2 pos x) f2-1)
|
|
(set! (-> gp-0 3 pos x) f0-8)
|
|
(set! (-> gp-0 0 pos z) f3-1)
|
|
(set! (-> gp-0 1 pos z) f3-1)
|
|
)
|
|
(set! (-> gp-0 2 pos z) f1-2)
|
|
(set! (-> gp-0 3 pos z) f1-2)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 1))
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let ((f0-14 (+ 18874368.0 (-> this start-corner x)))
|
|
(f1-5 (+ -5898240.0 (-> this start-corner z)))
|
|
)
|
|
(let ((f2-4 (+ 5898240.0 f0-14))
|
|
(f3-3 (+ -5898240.0 f1-5))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f0-14)
|
|
(set! (-> gp-0 1 pos x) f2-4)
|
|
(set! (-> gp-0 2 pos x) f2-4)
|
|
(set! (-> gp-0 3 pos x) f0-14)
|
|
(set! (-> gp-0 0 pos z) f3-3)
|
|
(set! (-> gp-0 1 pos z) f3-3)
|
|
)
|
|
(set! (-> gp-0 2 pos z) f1-5)
|
|
(set! (-> gp-0 3 pos z) f1-5)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 1))
|
|
(set! (-> gp-0 2 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let ((f0-20 (+ 24772608.0 (-> this start-corner x)))
|
|
(f1-8 (+ -5898240.0 (-> this start-corner z)))
|
|
)
|
|
(let ((f2-7 (+ 5898240.0 f0-20))
|
|
(f3-5 (+ -5898240.0 f1-8))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f0-20)
|
|
(set! (-> gp-0 1 pos x) f2-7)
|
|
(set! (-> gp-0 2 pos x) f2-7)
|
|
(set! (-> gp-0 3 pos x) f0-20)
|
|
(set! (-> gp-0 0 pos z) f3-5)
|
|
(set! (-> gp-0 1 pos z) f3-5)
|
|
)
|
|
(set! (-> gp-0 2 pos z) f1-8)
|
|
(set! (-> gp-0 3 pos z) f1-8)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 1))
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
)
|
|
(render-ocean-quad gp-0 arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-66 ((this ocean) (arg0 dma-buffer))
|
|
;; og:preserve-this
|
|
(let ((gp-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let* ((v1-0 (-> this ocean-colors))
|
|
(f30-0 (-> this start-corner x))
|
|
(f28-0 (+ 18874368.0 (-> this start-corner z)))
|
|
(f26-0 (+ -5898240.0 f30-0))
|
|
(f24-0 (+ 5898240.0 f28-0))
|
|
(s3-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 2444)))
|
|
(set! (-> gp-0 0 pos x) f26-0)
|
|
(set! (-> gp-0 1 pos x) f30-0)
|
|
(set! (-> gp-0 2 pos x) f30-0)
|
|
(set! (-> gp-0 3 pos x) f26-0)
|
|
(set! (-> gp-0 0 pos z) f28-0)
|
|
(set! (-> gp-0 1 pos z) f28-0)
|
|
(set! (-> gp-0 2 pos z) f24-0)
|
|
(set! (-> gp-0 3 pos z) f24-0)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 1.0)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 2 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let* ((f0-8 (+ -5898240.0 (-> this start-corner x)))
|
|
(f1-3 (+ 18874368.0 (-> this start-corner z)))
|
|
(f2-2 (+ -5898240.0 f0-8))
|
|
(f3-1 (+ 5898240.0 f1-3))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f2-2)
|
|
(set! (-> gp-0 1 pos x) f0-8)
|
|
(set! (-> gp-0 2 pos x) f0-8)
|
|
(set! (-> gp-0 3 pos x) f2-2)
|
|
(set! (-> gp-0 0 pos z) f1-3)
|
|
(set! (-> gp-0 1 pos z) f1-3)
|
|
(set! (-> gp-0 2 pos z) f3-1)
|
|
(set! (-> gp-0 3 pos z) f3-1)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 2 col quad) (-> s3-0 quad))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let* ((f0-14 (+ -5898240.0 (-> this start-corner x)))
|
|
(f1-6 (+ 24772608.0 (-> this start-corner z)))
|
|
(f2-5 (+ -5898240.0 f0-14))
|
|
(f3-3 (+ 5898240.0 f1-6))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f2-5)
|
|
(set! (-> gp-0 1 pos x) f0-14)
|
|
(set! (-> gp-0 2 pos x) f0-14)
|
|
(set! (-> gp-0 3 pos x) f2-5)
|
|
(set! (-> gp-0 0 pos z) f1-6)
|
|
(set! (-> gp-0 1 pos z) f1-6)
|
|
(set! (-> gp-0 2 pos z) f3-3)
|
|
(set! (-> gp-0 3 pos z) f3-3)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.0)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(add-colors! this (-> gp-0 0 col) (-> gp-0 0))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let* ((f0-19 (-> this start-corner x))
|
|
(f1-8 (+ 24772608.0 (-> this start-corner z)))
|
|
(f2-8 (+ -5898240.0 f0-19))
|
|
(f3-5 (+ 5898240.0 f1-8))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f2-8)
|
|
(set! (-> gp-0 1 pos x) f0-19)
|
|
(set! (-> gp-0 2 pos x) f0-19)
|
|
(set! (-> gp-0 3 pos x) f2-8)
|
|
(set! (-> gp-0 0 pos z) f1-8)
|
|
(set! (-> gp-0 1 pos z) f1-8)
|
|
(set! (-> gp-0 2 pos z) f3-5)
|
|
(set! (-> gp-0 3 pos z) f3-5)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
)
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod ocean-method-67 ((this ocean) (arg0 dma-buffer))
|
|
;; og:preserve-this
|
|
(let ((gp-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let* ((v1-0 (-> this ocean-colors))
|
|
(f30-0 (+ 18874368.0 (-> this start-corner x)))
|
|
(f28-0 (+ 18874368.0 (-> this start-corner z)))
|
|
(f26-0 (+ 5898240.0 f30-0))
|
|
(f24-0 (+ 5898240.0 f28-0))
|
|
(s3-0 (new 'stack-no-clear 'vector))
|
|
)
|
|
(rgba-to-vector! this s3-0 (the-as (pointer int32) (&-> v1-0 colors 2491)))
|
|
(set! (-> gp-0 0 pos x) f30-0)
|
|
(set! (-> gp-0 1 pos x) f26-0)
|
|
(set! (-> gp-0 2 pos x) f26-0)
|
|
(set! (-> gp-0 3 pos x) f30-0)
|
|
(set! (-> gp-0 0 pos z) f28-0)
|
|
(set! (-> gp-0 1 pos z) f28-0)
|
|
(set! (-> gp-0 2 pos z) f24-0)
|
|
(set! (-> gp-0 3 pos z) f24-0)
|
|
(set! (-> gp-0 0 pos w) 1.0)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.5)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 2 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let* ((f0-9 (+ 24772608.0 (-> this start-corner x)))
|
|
(f1-4 (+ 18874368.0 (-> this start-corner z)))
|
|
(f2-2 (+ 5898240.0 f0-9))
|
|
(f3-1 (+ 5898240.0 f1-4))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f0-9)
|
|
(set! (-> gp-0 1 pos x) f2-2)
|
|
(set! (-> gp-0 2 pos x) f2-2)
|
|
(set! (-> gp-0 3 pos x) f0-9)
|
|
(set! (-> gp-0 0 pos z) f1-4)
|
|
(set! (-> gp-0 1 pos z) f1-4)
|
|
(set! (-> gp-0 2 pos z) f3-1)
|
|
(set! (-> gp-0 3 pos z) f3-1)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.5)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 1))
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(set! (-> gp-0 3 col quad) (-> s3-0 quad))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let* ((f0-15 (+ 18874368.0 (-> this start-corner x)))
|
|
(f1-7 (+ 24772608.0 (-> this start-corner z)))
|
|
(f2-5 (+ 5898240.0 f0-15))
|
|
(f3-3 (+ 5898240.0 f1-7))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f0-15)
|
|
(set! (-> gp-0 1 pos x) f2-5)
|
|
(set! (-> gp-0 2 pos x) f2-5)
|
|
(set! (-> gp-0 3 pos x) f0-15)
|
|
(set! (-> gp-0 0 pos z) f1-7)
|
|
(set! (-> gp-0 1 pos z) f1-7)
|
|
(set! (-> gp-0 2 pos z) f3-3)
|
|
(set! (-> gp-0 3 pos z) f3-3)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.5)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
(set! (-> gp-0 1 col quad) (-> s3-0 quad))
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
(let* ((f0-21 (+ 24772608.0 (-> this start-corner x)))
|
|
(f1-10 (+ 24772608.0 (-> this start-corner z)))
|
|
(f2-8 (+ 5898240.0 f0-21))
|
|
(f3-5 (+ 5898240.0 f1-10))
|
|
)
|
|
(set! (-> gp-0 0 pos x) f0-21)
|
|
(set! (-> gp-0 1 pos x) f2-8)
|
|
(set! (-> gp-0 2 pos x) f2-8)
|
|
(set! (-> gp-0 3 pos x) f0-21)
|
|
(set! (-> gp-0 0 pos z) f1-10)
|
|
(set! (-> gp-0 1 pos z) f1-10)
|
|
(set! (-> gp-0 2 pos z) f3-5)
|
|
(set! (-> gp-0 3 pos z) f3-5)
|
|
)
|
|
(set! (-> gp-0 0 pos w) 0.5)
|
|
(set! (-> gp-0 1 pos w) 0.0)
|
|
(set! (-> gp-0 2 pos w) 0.0)
|
|
(set! (-> gp-0 3 pos w) 0.0)
|
|
(set! (-> gp-0 0 col quad) (-> s3-0 quad))
|
|
)
|
|
(add-colors! this (-> gp-0 1 col) (-> gp-0 1))
|
|
(add-colors! this (-> gp-0 2 col) (-> gp-0 2))
|
|
(add-colors! this (-> gp-0 3 col) (-> gp-0 3))
|
|
(render-ocean-quad gp-0 arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod render-ocean-far ((this ocean) (arg0 dma-buffer) (arg1 int))
|
|
;; og:preserve-this
|
|
(let ((s3-0 (scratchpad-object (inline-array ocean-vertex))))
|
|
(let ((f0-0 (-> this start-corner y)))
|
|
(set! (-> s3-0 0 pos y) f0-0)
|
|
(set! (-> s3-0 1 pos y) f0-0)
|
|
(set! (-> s3-0 2 pos y) f0-0)
|
|
(set! (-> s3-0 3 pos y) f0-0)
|
|
)
|
|
(set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 1 stq) 1.0 0.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 2 stq) 1.0 15.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 3 stq) 0.0 15.0 1.0 1.0)
|
|
(if (not (logtest? arg1 2))
|
|
(ocean-method-60 this arg0)
|
|
)
|
|
(if (not (logtest? arg1 4))
|
|
(ocean-method-61 this arg0)
|
|
)
|
|
(set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 1 stq) 15.0 0.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 2 stq) 15.0 1.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 3 stq) 0.0 1.0 1.0 1.0)
|
|
(if (not (logtest? arg1 16))
|
|
(ocean-method-62 this arg0)
|
|
)
|
|
(if (not (logtest? arg1 8))
|
|
(ocean-method-63 this arg0)
|
|
)
|
|
(set-vector! (-> s3-0 0 stq) 0.0 0.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 1 stq) 15.0 0.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 2 stq) 15.0 15.0 1.0 1.0)
|
|
(set-vector! (-> s3-0 3 stq) 0.0 15.0 1.0 1.0)
|
|
)
|
|
(if (not (or (logtest? arg1 2) (logtest? arg1 16)))
|
|
(ocean-method-64 this arg0)
|
|
)
|
|
(if (not (or (logtest? arg1 2) (logtest? arg1 8)))
|
|
(ocean-method-65 this arg0)
|
|
)
|
|
(if (not (or (logtest? arg1 4) (logtest? arg1 16)))
|
|
(ocean-method-66 this arg0)
|
|
)
|
|
(if (not (or (logtest? arg1 4) (logtest? arg1 8)))
|
|
(ocean-method-67 this arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch uint vs none.
|
|
(defmethod draw-ocean-far ((this ocean) (arg0 dma-buffer))
|
|
(init-ocean-far-regs)
|
|
(let ((gp-0 (the-as object (-> arg0 base))))
|
|
(&+! (-> arg0 base) 16)
|
|
(let ((s3-0 (camera-pos))
|
|
(v1-3 (new 'stack 'bounding-box2))
|
|
)
|
|
(let ((a0-2 v1-3))
|
|
(set! (-> a0-2 min x) (-> this start-corner x))
|
|
(set! (-> a0-2 min y) (-> this start-corner z))
|
|
(set! (-> a0-2 max x) (+ 18874368.0 (-> this start-corner x)))
|
|
(set! (-> a0-2 max y) (+ 18874368.0 (-> this start-corner z)))
|
|
)
|
|
(cond
|
|
((or (< (-> s3-0 x) (-> v1-3 min x))
|
|
(< (-> v1-3 max x) (-> s3-0 x))
|
|
(< (-> s3-0 z) (-> v1-3 min y))
|
|
(< (-> v1-3 max y) (-> s3-0 z))
|
|
)
|
|
(render-ocean-far this arg0 1)
|
|
)
|
|
(else
|
|
(let ((v1-7 (-> this ocean-facing)))
|
|
(cond
|
|
((zero? v1-7)
|
|
(render-ocean-far this arg0 4)
|
|
)
|
|
((= v1-7 1)
|
|
(render-ocean-far this arg0 2)
|
|
)
|
|
((= v1-7 3)
|
|
(render-ocean-far this arg0 8)
|
|
)
|
|
((= v1-7 2)
|
|
(render-ocean-far this arg0 16)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(close-sky-buffer arg0)
|
|
(let ((v1-20 (/ (the-as int (+ (- -16 (the-as int gp-0)) (the-as int (-> arg0 base)))) 16)))
|
|
(set! (-> (the-as dma-packet gp-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc v1-20))
|
|
(set! (-> (the-as dma-packet gp-0) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet gp-0) vif1) (new 'static 'vif-tag :cmd (vif-cmd direct) :msk #x1 :imm v1-20))
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch pointer vs none.
|
|
(defmethod init-buffer! ((this ocean) (arg0 dma-buffer))
|
|
(dma-buffer-add-gs-set arg0
|
|
(test-1 (new 'static 'gs-test :ate #x1 :atst (gs-atest always) :zte #x1 :ztst (gs-ztest always)))
|
|
(alpha-1 (new 'static 'gs-alpha :b #x1 :d #x1))
|
|
(tex0-1 (new 'static 'gs-tex0 :tbp0 #x2a0 :tbw #x2 :th (log2 128) :tw (log2 128)))
|
|
(tex1-1 (-> this tex1))
|
|
(texa (new 'static 'gs-texa :ta0 #x80 :ta1 #x80))
|
|
(miptbp1-1 (new 'static 'gs-miptbp :tbp1 #x6a0 :tbw1 #x1 :tbp2 #x7a0 :tbp3 #x7e0))
|
|
(miptbp2-1 (new 'static 'gs-miptbp :tbp1 #x800 :tbp2 #x820 :tbp3 #x840))
|
|
(clamp-1 (new 'static 'gs-clamp))
|
|
(fogcol *fog-color*)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defmethod end-buffer! ((this ocean) (arg0 dma-buffer))
|
|
(dma-buffer-add-gs-set arg0 (texa (new 'static 'gs-texa :ta1 #x80)))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod set-height! ((this ocean-map) (arg0 float))
|
|
(if this
|
|
(set! (-> this start-corner y) arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod get-base-height ((this ocean-map))
|
|
(if this
|
|
(-> this start-corner y)
|
|
0.0
|
|
)
|
|
)
|
|
|
|
(defmethod rgba-to-vector! ((this ocean) (arg0 vector) (arg1 (pointer int32)))
|
|
(local-vars (v1-1 uint128) (v1-2 uint128))
|
|
(rlet ((vf1 :class vf))
|
|
(let ((v1-0 (the-as uint128 (-> arg1 0))))
|
|
(.pextlb v1-1 0 v1-0)
|
|
)
|
|
(.pextlh v1-2 0 v1-1)
|
|
(.mov vf1 v1-2)
|
|
(.itof.vf vf1 vf1)
|
|
(.svf (&-> arg0 quad) vf1)
|
|
0
|
|
(none)
|
|
)
|
|
)
|
|
|
|
(defmethod update-map ((this ocean))
|
|
(set! (-> this heights) #f)
|
|
(set! (-> this verts) #f)
|
|
(let* ((s5-0 *mood-control*)
|
|
(s4-0 s5-0)
|
|
)
|
|
(set! (-> this constant w)
|
|
(if (and (-> s4-0 overide-weather-flag) (not (movie?)) (= (-> s4-0 current-special-interp) 0.0))
|
|
(-> s5-0 overide cloud)
|
|
(-> s5-0 current-interp cloud)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> this constant w) (fmin 1.0 (* 2.0 (-> this constant w))))
|
|
(let ((f0-6 1.0)
|
|
(f30-0 1.0)
|
|
)
|
|
(set! (-> this frame-speed) (* (+ 4.0 (-> *setting-control* user-current rain)) f0-6))
|
|
(set! (-> this frame-speed2) (* (+ 5.0 (-> *setting-control* user-current rain)) f0-6))
|
|
(when (not (paused?))
|
|
(let ((f0-9 (+ (-> this frame-num) (* (-> this frame-speed) (seconds-per-frame)))))
|
|
(set! (-> this frame-num) (- f0-9 (* (the float (the int (/ f0-9 64.0))) 64.0)))
|
|
)
|
|
(let ((f0-12 (+ (-> this frame-num2) (* (-> this frame-speed2) (seconds-per-frame)))))
|
|
(set! (-> this frame-num2) (- f0-12 (* (the float (the int (/ f0-12 64.0))) 64.0)))
|
|
)
|
|
)
|
|
(let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf)))
|
|
(set! (-> this heights) (the-as ocean-height-array (-> s5-1 base)))
|
|
(interp-wave
|
|
this
|
|
(the-as ocean-wave-info (-> this heights))
|
|
(the-as uint (-> this frame-num))
|
|
(* 0.08325 f30-0)
|
|
)
|
|
(&+! (-> s5-1 base) 4096)
|
|
(set! (-> this heights2) (the-as ocean-height-array (-> s5-1 base)))
|
|
(interp-wave
|
|
this
|
|
(the-as ocean-wave-info (-> this heights2))
|
|
(the-as uint (-> this frame-num2))
|
|
(* 0.01665 f30-0)
|
|
)
|
|
(&+! (-> s5-1 base) 4096)
|
|
(ocean-method-15 this (the-as matrix (-> this heights)) (the-as matrix (-> this heights2)))
|
|
(set! (-> this verts) (the-as ocean-vert-array (-> s5-1 base)))
|
|
(&+! (-> s5-1 base) #x8000)
|
|
)
|
|
)
|
|
(when (not (or (-> this off) (get-menu-mode *blit-displays-work*)))
|
|
(when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask rn4))
|
|
(mem-copy! (the-as pointer (-> this cloud-lights)) (the-as pointer (-> *sky-work* cloud-lights)) 156)
|
|
(mem-copy! (the-as pointer (-> this haze-lights)) (the-as pointer (-> *sky-work* haze-lights)) 124)
|
|
(vector4-scale!
|
|
(the-as vector4 (-> this sky-color))
|
|
(the-as vector4 (-> *time-of-day-context* current-sky-color))
|
|
0.0078125
|
|
)
|
|
(generate-verts this (-> this verts) (-> this heights))
|
|
(let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(s5-2 (-> s4-1 base))
|
|
)
|
|
;; og:preserve-this not-yet-implemented
|
|
; (if (-> *time-of-day-context* sky)
|
|
; (ocean-method-88 this s4-1)
|
|
; )
|
|
(draw-ocean-texture this s4-1 (the-as int (-> this verts)))
|
|
; (ocean-method-89 this s4-1)
|
|
(init-buffer! this s4-1)
|
|
(if (-> this far-on)
|
|
(draw-ocean-far this s4-1)
|
|
)
|
|
(if (not (-> this mid-off))
|
|
(draw-ocean-mid this s4-1)
|
|
)
|
|
(end-buffer! this s4-1)
|
|
(set-dirty-mask! (-> *level* level-default) 9 #xc0000 #x2a000)
|
|
(let ((a3-3 (-> s4-1 base)))
|
|
(when (!= s5-2 a3-3)
|
|
(let ((v1-83 (the-as object (-> s4-1 base))))
|
|
(set! (-> (the-as dma-packet v1-83) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-83) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-83) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-1 base) (&+ (the-as pointer v1-83) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) bucket-group)
|
|
(bucket-id bucket6)
|
|
s5-2
|
|
(the-as (pointer dma-tag) a3-3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (not (or (-> this near-off)
|
|
(-> this mid-off)
|
|
(< 196608.0 (fabs (- (-> this start-corner y) (-> *math-camera* trans y))))
|
|
)
|
|
)
|
|
(let* ((s4-2 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(s5-3 (-> s4-2 base))
|
|
)
|
|
(draw-ocean-texture this s4-2 (the-as int (-> this verts)))
|
|
(draw-ocean-near this s4-2)
|
|
(end-buffer! this s4-2)
|
|
(set-dirty-mask! (-> *level* level-default) 7 #xc0000 #x2a000)
|
|
(let ((a3-5 (-> s4-2 base)))
|
|
(when (!= s5-3 a3-5)
|
|
(let ((v1-110 (the-as object (-> s4-2 base))))
|
|
(set! (-> (the-as dma-packet v1-110) dma) (new 'static 'dma-tag :id (dma-tag-id next)))
|
|
(set! (-> (the-as dma-packet v1-110) vif0) (new 'static 'vif-tag))
|
|
(set! (-> (the-as dma-packet v1-110) vif1) (new 'static 'vif-tag))
|
|
(set! (-> s4-2 base) (&+ (the-as pointer v1-110) 16))
|
|
)
|
|
(dma-bucket-insert-tag
|
|
(-> *display* frames (-> *display* on-screen) bucket-group)
|
|
(bucket-id bucket462)
|
|
s5-3
|
|
(the-as (pointer dma-tag) a3-5)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (not (paused?))
|
|
(set! (-> this off) #f)
|
|
(set! (-> this mid-off) #f)
|
|
(set! (-> this all-on) #f)
|
|
(set! (-> this near-off) (if this
|
|
(not (-> this ocean-near-translucent?))
|
|
#f
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw! ((this ocean))
|
|
(do-tex-scroll! this)
|
|
(set! *ocean-map* #f)
|
|
(set! (-> this far-on) #f)
|
|
(dotimes (v1-2 (-> *level* draw-level-count))
|
|
(let ((s5-0 (-> *level* draw-level v1-2)))
|
|
(when (and s5-0 (= (-> s5-0 status) 'active))
|
|
(when (= (-> s5-0 display?) 'display)
|
|
(if (logtest? (-> s5-0 info level-flags) (level-flags lf13))
|
|
(set! (-> this far-on) #t)
|
|
)
|
|
(let ((a0-13 (-> s5-0 info ocean)))
|
|
(cond
|
|
((= a0-13 'none)
|
|
(when (-> s5-0 meta-inside?)
|
|
(set! *ocean-map* #f)
|
|
(goto cfg-24)
|
|
)
|
|
)
|
|
((and a0-13 (nonzero? (-> a0-13 value)))
|
|
(set! *ocean-map* (the-as ocean-map (-> a0-13 value)))
|
|
(set-height! *ocean-map* (-> s5-0 info ocean-height))
|
|
(if (logtest? (level-flags lf20) (-> s5-0 info level-flags))
|
|
(set! (-> this all-on) #t)
|
|
)
|
|
(set! (-> this ocean-near-translucent?) (logtest? (-> s5-0 info level-flags) (level-flags lf12)))
|
|
(goto cfg-24)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(label cfg-24)
|
|
(if *ocean-map*
|
|
(mem-copy! (the-as pointer this) (the-as pointer *ocean-map*) 52)
|
|
)
|
|
(let ((v1-20 (new 'stack-no-clear 'vector)))
|
|
(if (-> *time-of-day-context* use-camera-other)
|
|
(set! (-> v1-20 quad) (-> *math-camera* inv-camera-rot-other fvec quad))
|
|
(set! (-> v1-20 quad) (-> *math-camera* inv-camera-rot fvec quad))
|
|
)
|
|
(cond
|
|
((< (fabs (-> v1-20 z)) (fabs (-> v1-20 x)))
|
|
(if (< (-> v1-20 x) 0.0)
|
|
(set! (-> this ocean-facing) (the-as uint 3))
|
|
(set! (-> this ocean-facing) (the-as uint 2))
|
|
)
|
|
)
|
|
((< (-> v1-20 z) 0.0)
|
|
(set! (-> this ocean-facing) (the-as uint 0))
|
|
0
|
|
)
|
|
(else
|
|
(set! (-> this ocean-facing) (the-as uint 1))
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|
|
|
|
;; ERROR: function was not converted to expressions. Cannot decompile.
|