jak-project/goal_src/engine/gfx/mood-h.gc
water111 f6d5952498
[decompiler] handle nested conditionals and gotos better (#693)
* diff check

* try that again

* more small fixes
2021-07-11 21:59:27 -04:00

148 lines
4.5 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: mood-h.gc
;; name in dgo: mood-h
;; dgos: GAME, ENGINE
(deftype mood-fog (structure)
((fog-color vector :inline :offset-assert 0)
(fog-dists vector :inline :offset-assert 16)
(fog-start meters :offset 16)
(fog-end meters :offset 20)
(fog-max float :offset 24)
(fog-min float :offset 28)
(erase-color vector :inline :offset-assert 32)
)
:method-count-assert 9
:size-assert #x30
:flag-assert #x900000030
)
(deftype mood-fog-table (structure)
((data mood-fog 8 :inline :offset-assert 0)
)
:method-count-assert 9
:size-assert #x180
:flag-assert #x900000180
)
(deftype mood-lights (structure)
((direction vector :inline :offset-assert 0)
(lgt-color vector :inline :offset-assert 16)
(prt-color vector :inline :offset-assert 32)
(amb-color vector :inline :offset-assert 48)
(shadow vector :inline :offset-assert 64)
)
:method-count-assert 9
:size-assert #x50
:flag-assert #x900000050
)
(deftype mood-lights-table (structure)
((data mood-lights 8 :inline :offset-assert 0)
)
:method-count-assert 9
:size-assert #x280
:flag-assert #x900000280
)
(deftype mood-sun (structure)
((sun-color vector :inline :offset-assert 0)
(env-color vector :inline :offset-assert 16)
)
:method-count-assert 9
:size-assert #x20
:flag-assert #x900000020
)
(deftype mood-sun-table (structure)
((data mood-sun 8 :inline :offset-assert 0)
)
:method-count-assert 9
:size-assert #x100
:flag-assert #x900000100
)
(deftype mood-context (basic)
((mood-fog-table mood-fog-table :offset-assert 4)
(mood-lights-table mood-lights-table :offset-assert 8)
(mood-sun-table mood-sun-table :offset-assert 12)
(fog-interp sky-color-day :offset-assert 16)
(palette-interp sky-color-day :offset-assert 20)
(sky-texture-interp sky-color-day :offset-assert 24)
(current-fog mood-fog :inline :offset-assert 32)
(current-sun mood-sun :inline :offset-assert 80)
(current-prt-color vector :inline :offset-assert 112)
(current-shadow vector :inline :offset-assert 128)
(current-shadow-color vector :inline :offset-assert 144)
(light-group light-group 8 :inline :offset-assert 160)
(times vector 8 :inline :offset-assert 1696)
(sky-times float 8 :offset-assert 1824)
(itimes vector4w 4 :inline :offset-assert 1856)
(state uint8 16 :offset-assert 1920)
(num-stars float :offset-assert 1936)
)
(:methods
(new (symbol type) _type_ 0)
)
:method-count-assert 9
:size-assert #x794
:flag-assert #x900000794
)
(defmethod new mood-context ((allocation symbol) (type-to-make type))
(let ((v0-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(let ((v1-2 (-> v0-0 times)))
(set! (-> v1-2 0 x) 1.0)
(set! (-> v1-2 0 y) 1.0)
(set! (-> v1-2 0 z) 1.0)
(set! (-> v1-2 0 w) 0.0)
)
(let ((v1-3 (-> v0-0 times 1)))
(set! (-> v1-3 x) 1.0)
(set! (-> v1-3 y) 1.0)
(set! (-> v1-3 z) 1.0)
(set! (-> v1-3 w) 0.0)
)
(let ((v1-4 (-> v0-0 times 2)))
(set! (-> v1-4 x) 1.0)
(set! (-> v1-4 y) 1.0)
(set! (-> v1-4 z) 1.0)
(set! (-> v1-4 w) 0.0)
)
(let ((v1-5 (-> v0-0 times 3)))
(set! (-> v1-5 x) 1.0)
(set! (-> v1-5 y) 1.0)
(set! (-> v1-5 z) 1.0)
(set! (-> v1-5 w) 0.0)
)
(let ((v1-6 (-> v0-0 times 4)))
(set! (-> v1-6 x) 1.0)
(set! (-> v1-6 y) 1.0)
(set! (-> v1-6 z) 1.0)
(set! (-> v1-6 w) 0.0)
)
(let ((v1-7 (-> v0-0 times 5)))
(set! (-> v1-7 x) 1.0)
(set! (-> v1-7 y) 1.0)
(set! (-> v1-7 z) 1.0)
(set! (-> v1-7 w) 0.0)
)
(let ((v1-8 (-> v0-0 times 6)))
(set! (-> v1-8 x) 1.0)
(set! (-> v1-8 y) 1.0)
(set! (-> v1-8 z) 1.0)
(set! (-> v1-8 w) 0.0)
)
(let ((v1-9 (-> v0-0 times 7)))
(set! (-> v1-9 x) 1.0)
(set! (-> v1-9 y) 1.0)
(set! (-> v1-9 z) 1.0)
(set! (-> v1-9 w) 0.0)
)
v0-0
)
)