mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
d400ec3b2d
* decomp: Almost finished `mood`, but confused over the `mood-context` type! * only function that remains involves vftoi / ppach instructions * stash * decomp: fix inline array access issue * decomp: finalize `mood` * linting
114 lines
2.9 KiB
Common Lisp
114 lines
2.9 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: lights-h.gc
|
|
;; name in dgo: lights-h
|
|
;; dgos: GAME, ENGINE
|
|
|
|
;; It seems like some of these are unused.
|
|
;; The commonly used lights are vu-lights and light-group.
|
|
|
|
(deftype vu-lights (structure)
|
|
((direction vector 3 :inline :offset-assert 0)
|
|
(color vector 3 :inline :offset-assert 48)
|
|
(ambient vector :inline :offset-assert 96)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x70
|
|
:flag-assert #x900000070
|
|
)
|
|
|
|
(deftype light (structure)
|
|
((direction vector :inline :offset-assert 0)
|
|
(color rgbaf :inline :offset-assert 16)
|
|
(levels vector :inline :offset-assert 32)
|
|
(level float :offset 32)
|
|
(sort-level float :offset 36)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x30
|
|
:flag-assert #x900000030
|
|
)
|
|
|
|
(deftype light-ellipse (structure)
|
|
((matrix matrix :inline :offset-assert 0)
|
|
(color rgbaf :inline :offset-assert 64)
|
|
(name basic :offset 12)
|
|
(decay-start float :offset 28)
|
|
(ambient-point-ratio float :offset 44)
|
|
(level float :offset 60)
|
|
(func-symbol basic :offset 76)
|
|
(func basic :offset 76)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x50
|
|
:flag-assert #x900000050
|
|
)
|
|
|
|
;; This likely doesn't work correctly in both GOAL and OpenGOAL
|
|
(deftype light-array (array)
|
|
()
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
|
|
(deftype light-volume (basic)
|
|
((light-array light-array :offset-assert 4)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x8
|
|
:flag-assert #x900000008
|
|
)
|
|
|
|
(deftype light-volume-sphere (light-volume)
|
|
((bsphere sphere :inline :offset-assert 16)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x20
|
|
:flag-assert #x900000020
|
|
)
|
|
|
|
(deftype light-volume-planes (light-volume)
|
|
((planes vertical-planes :offset-assert 8)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #xc
|
|
:flag-assert #x90000000c
|
|
)
|
|
|
|
(deftype light-volume-array (array)
|
|
()
|
|
:method-count-assert 9
|
|
:size-assert #x10
|
|
:flag-assert #x900000010
|
|
)
|
|
|
|
(defmethod print light ((obj light))
|
|
(format #t "#<light [~F] ~F ~F ~F "
|
|
(-> obj levels data 0)
|
|
(-> obj direction data 0)
|
|
(-> obj direction data 1)
|
|
(-> obj direction data 2)
|
|
)
|
|
(format #t "~F ~F ~F @ #x~X>"
|
|
(-> obj color data 0)
|
|
(-> obj color data 1)
|
|
(-> obj color data 2)
|
|
obj
|
|
)
|
|
obj
|
|
)
|
|
|
|
(deftype light-group (structure)
|
|
((dir0 light :inline :offset-assert 0)
|
|
(dir1 light :inline :offset-assert 48)
|
|
(dir2 light :inline :offset-assert 96)
|
|
(ambi light :inline :offset-assert 144)
|
|
(lights light 4 :inline :offset 0)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #xc0
|
|
:flag-assert #x9000000c0
|
|
)
|