jak-project/goal_src/jak3/levels/gungame/gungame-texture.gc
Hat Kid bdded9ad8c
jak3: add missing texture animations (#3577)
This refactors some of the texture animation code a bit to better
support multiple games and adds most of the missing texture animations
for Jak 3 with a couple of exceptions/bugs:

- `hanga-sprite`: Despite `move_to_pool` being set for this anim, it's
not showing up in-game, but it does display properly in the ImGUI debug
window.

![image](https://github.com/open-goal/jak-project/assets/6624576/29df8e17-8831-412b-b9b7-7704d6bd7813)
- `factoryc-alpha`: Some conveyors do not have the animation for some
reason.

![image](https://github.com/open-goal/jak-project/assets/6624576/209ef073-2a81-4e2c-b020-dc2ae0b01196)
- This spot in Spargus seems to use texture animations, but it looks
like it maps to the `fora-water-dest` texture/slot, which comes from
`foresta-water`. Because the texture is not initialized, the texture
shows up black on first load, but it does show up after loading
`foresta`.

![image](https://github.com/open-goal/jak-project/assets/6624576/1e54bab2-f97c-47d5-a92a-a98a52c30178)

![image](https://github.com/open-goal/jak-project/assets/6624576/240b0137-1e9e-4e65-8446-0f78df9802dd)
- `hfrag` texture anim is not handled yet. Probably needs some special
casing.
2024-07-15 02:25:18 +02:00

158 lines
9 KiB
Common Lisp

;;-*-Lisp-*-
(in-package goal)
;; name: gungame-texture.gc
;; name in dgo: gungame-texture
;; dgos: GGA
;; DECOMP BEGINS
(define *lgunnorm-water-texture-anim-array*
(the-as (texture-anim-array texture-anim)
(new 'static 'texture-anim-array :type texture-anim
(new 'static 'texture-anim
:num-layers #x6
:func #f
:init-func-id 'texture-anim-overide-size-init
:tex #f
:tex-name "kg-target-c-forcefield-01-dest"
:extra (new 'static 'vector :x 64.0 :y 64.0 :z 1.0)
:color (new 'static 'rgba :a #x80)
:frame-delta 240.0
:frame-mod 150.0
:test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x1 :d #x1)
:data (new 'static 'array texture-anim-layer 6
(new 'static 'texture-anim-layer
:func-id 'default-texture-anim-layer-func
:init-func #f
:tex #f
:end-time 75.0
:tex-name "kg-target-c-forcefield-01"
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.1)
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.333)
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
)
(new 'static 'texture-anim-layer
:func-id 'default-texture-anim-layer-func
:init-func #f
:tex #f
:end-time 75.0
:tex-name "kg-target-c-forcefield-01"
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.1)
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.333)
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
)
(new 'static 'texture-anim-layer
:func-id 'default-texture-anim-layer-func
:init-func #f
:tex #f
:end-time 75.0
:tex-name "kg-target-c-forcefield-01"
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.1)
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.333)
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.0))
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
)
(new 'static 'texture-anim-layer
:func-id 'default-texture-anim-layer-func
:init-func #f
:tex #f
:start-time 75.0
:end-time 150.0
:tex-name "kg-target-c-forcefield-01"
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.33)
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.1)
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
)
(new 'static 'texture-anim-layer
:func-id 'default-texture-anim-layer-func
:init-func #f
:tex #f
:start-time 75.0
:end-time 150.0
:tex-name "kg-target-c-forcefield-01"
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.33)
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.1)
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
)
(new 'static 'texture-anim-layer
:func-id 'default-texture-anim-layer-func
:init-func #f
:tex #f
:start-time 75.0
:end-time 150.0
:tex-name "kg-target-c-forcefield-01"
:test (new 'static 'gs-test :ate #x1 :afail #x3 :zte #x1 :ztst (gs-ztest always))
:alpha (new 'static 'gs-alpha :b #x2 :d #x1)
:start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.33)
:start-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:start-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:start-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 1.0))
:start-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
:end-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 0.1)
:end-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-st-scale (new 'static 'vector2 :data (new 'static 'array float 2 1.0 1.0))
:end-st-offset (new 'static 'vector2 :data (new 'static 'array float 2 0.5 0.5))
:end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)
)
)
)
)
)
)