diff --git a/game/graphics/opengl_renderer/TextureAnimator.cpp b/game/graphics/opengl_renderer/TextureAnimator.cpp index 4160d635d9..a027523623 100644 --- a/game/graphics/opengl_renderer/TextureAnimator.cpp +++ b/game/graphics/opengl_renderer/TextureAnimator.cpp @@ -9,8 +9,8 @@ #include "third-party/imgui/imgui.h" -//#define dprintf(...) printf(__VA_ARGS__) -//#define dfmt(...) fmt::print(__VA_ARGS__) +// #define dprintf(...) printf(__VA_ARGS__) +// #define dfmt(...) fmt::print(__VA_ARGS__) #define dprintf(...) #define dfmt(...) @@ -358,6 +358,12 @@ TextureAnimator::TextureAnimator(ShaderLibrary& shaders, const tfrag3::Level* co m_psm32_to_psm8_64_64(64, 64, 64, 64), m_sky_blend_texture(kFinalSkyTextureSize, kFinalSkyTextureSize, GL_UNSIGNED_INT_8_8_8_8_REV), m_sky_final_texture(kFinalSkyTextureSize, kFinalSkyTextureSize, GL_UNSIGNED_INT_8_8_8_8_REV), + m_sky_hires_blend_texture(kFinalSkyHiresTextureSize, + kFinalSkyHiresTextureSize, + GL_UNSIGNED_INT_8_8_8_8_REV), + m_sky_hires_final_texture(kFinalSkyHiresTextureSize, + kFinalSkyHiresTextureSize, + GL_UNSIGNED_INT_8_8_8_8_REV), m_slime_blend_texture(kFinalSlimeTextureSize, kFinalSlimeTextureSize, GL_UNSIGNED_INT_8_8_8_8_REV), @@ -513,7 +519,7 @@ void TextureAnimator::draw_debug_window() { ImGui::Text("Sky:"); ImGui::Text("Fog Height: %f", m_debug_sky_input.fog_height); ImGui::Text("Cloud minmax: %f %f", m_debug_sky_input.cloud_min, m_debug_sky_input.cloud_max); - for (int i = 0; i < 9; i++) { + for (int i = 0; i < 11; i++) { ImGui::Text("Time[%d]: %f", i, m_debug_sky_input.times[i]); } ImGui::Text("Dest %d", m_debug_sky_input.cloud_dest); @@ -521,6 +527,16 @@ void TextureAnimator::draw_debug_window() { imgui_show_tex(m_sky_blend_texture.texture()); imgui_show_tex(m_sky_final_texture.texture()); + imgui_show_tex(m_sky_hires_blend_texture.texture()); + imgui_show_tex(m_sky_hires_final_texture.texture()); + + for (int i = 0; i < kNumSkyHiresNoiseLayers; ++i) { + ImGui::Text("Noise Hires %d", i); + imgui_show_tex(m_sky_hires_noise_textures[i].old_tex); + ImGui::SameLine(); + imgui_show_tex(m_sky_hires_noise_textures[i].new_tex); + } + auto& slots = jak2_animated_texture_slots(); for (size_t i = 0; i < slots.size(); i++) { ImGui::Text("Slot %d %s (%d)", (int)i, slots[i].c_str(), (int)m_private_output_slots[i]); @@ -612,6 +628,7 @@ enum PcTextureAnimCodes { KREW_HOLO = 40, CLOUDS_AND_FOG = 41, SLIME = 42, + CLOUDS_HIRES = 43, }; // metadata for an upload from GOAL memory @@ -767,9 +784,10 @@ void TextureAnimator::handle_texture_anim_data(DmaFollower& dma, auto p = scoped_prof("krew-holo"); run_fixed_animation_array(m_krew_holo_anim_array_idx, tf, texture_pool); } break; - case CLOUDS_AND_FOG: { + case CLOUDS_AND_FOG: + case CLOUDS_HIRES: { auto p = scoped_prof("clouds-and-fog"); - handle_clouds_and_fog(tf, texture_pool); + handle_clouds_and_fog(tf, texture_pool, vif0.immediate == CLOUDS_HIRES); } break; case SLIME: { auto p = scoped_prof("slime"); @@ -982,24 +1000,27 @@ void TextureAnimator::run_clut_blender_group(DmaTransfer& tf, int idx, u64 frame } } -void TextureAnimator::handle_clouds_and_fog(const DmaTransfer& tf, TexturePool* texture_pool) { +void TextureAnimator::handle_clouds_and_fog(const DmaTransfer& tf, + TexturePool* texture_pool, + bool hires) { ASSERT(tf.size_bytes >= sizeof(SkyInput)); SkyInput input; memcpy(&input, tf.data, sizeof(SkyInput)); - auto tex = run_clouds(input); + auto tex = run_clouds(input, hires); + auto& gpu_tex = hires ? m_sky_hires_pool_gpu_tex : m_sky_pool_gpu_tex; - if (m_sky_pool_gpu_tex) { - texture_pool->move_existing_to_vram(m_sky_pool_gpu_tex, input.cloud_dest); + if (gpu_tex) { + texture_pool->move_existing_to_vram(gpu_tex, input.cloud_dest); ASSERT((int)texture_pool->lookup(input.cloud_dest).value() == tex); } else { TextureInput in; in.gpu_texture = tex; - in.w = kFinalSkyTextureSize; - in.h = kFinalSkyTextureSize; + in.w = hires ? kFinalSkyHiresTextureSize : kFinalSkyTextureSize; + in.h = hires ? kFinalSkyHiresTextureSize : kFinalSkyTextureSize; in.debug_page_name = "PC-ANIM"; - in.debug_name = "clouds"; + in.debug_name = hires ? "clouds-hires" : "clouds"; in.id = get_id_for_tbp(texture_pool, input.cloud_dest, 777); - m_sky_pool_gpu_tex = texture_pool->give_texture_and_load_to_vram(in, input.cloud_dest); + gpu_tex = texture_pool->give_texture_and_load_to_vram(in, input.cloud_dest); } } @@ -1018,8 +1039,8 @@ void TextureAnimator::handle_slime(const DmaTransfer& tf, TexturePool* texture_p } else { TextureInput in; in.gpu_texture = no_scroll_tex; - in.w = kFinalSkyTextureSize; - in.h = kFinalSkyTextureSize; + in.w = kFinalSlimeTextureSize; + in.h = kFinalSlimeTextureSize; in.debug_page_name = "PC-ANIM"; in.debug_name = "slime"; in.id = get_id_for_tbp(texture_pool, input.dest, 778); @@ -1036,8 +1057,8 @@ void TextureAnimator::handle_slime(const DmaTransfer& tf, TexturePool* texture_p } else { TextureInput in; in.gpu_texture = tex; - in.w = kFinalSkyTextureSize; - in.h = kFinalSkyTextureSize; + in.w = kFinalSlimeTextureSize; + in.h = kFinalSlimeTextureSize; in.debug_page_name = "PC-ANIM"; in.debug_name = "slime-scroll"; in.id = get_id_for_tbp(texture_pool, input.dest, 779); @@ -2550,14 +2571,24 @@ void TextureAnimator::setup_sky() { } { - const float max_times[4] = {4800.f, 2400.f, 1200.f, 600.f}; - const float scales[4] = {0.5, 0.2, 0.15, 0.0075f}; for (int i = 0, dim = kFinalSkyTextureSize >> (kNumSkyNoiseLayers - 1); i < kNumSkyNoiseLayers; i++, dim *= 2) { auto& tex = m_sky_noise_textures[i]; tex.temp_data.resize(dim * dim); - tex.max_time = max_times[i]; - tex.scale = scales[i]; + tex.dim = dim; + glGenTextures(1, &tex.new_tex); + m_random_index = update_opengl_noise_texture(tex.new_tex, tex.temp_data.data(), + m_random_table, dim, m_random_index); + glGenTextures(1, &tex.old_tex); + m_random_index = update_opengl_noise_texture(tex.old_tex, tex.temp_data.data(), + m_random_table, dim, m_random_index); + } + } + { + for (int i = 0, dim = kFinalSkyHiresTextureSize >> (kNumSkyHiresNoiseLayers - 1); + i < kNumSkyHiresNoiseLayers; i++, dim *= 2) { + auto& tex = m_sky_hires_noise_textures[i]; + tex.temp_data.resize(dim * dim); tex.dim = dim; glGenTextures(1, &tex.new_tex); m_random_index = update_opengl_noise_texture(tex.new_tex, tex.temp_data.data(), @@ -2591,7 +2622,7 @@ void TextureAnimator::setup_sky() { } } -GLint TextureAnimator::run_clouds(const SkyInput& input) { +GLint TextureAnimator::run_clouds(const SkyInput& input, bool hires) { m_debug_sky_input = input; // anim 0 creates a clut with rgba = 128, 128, 128, i, at tbp = (24 * 32) @@ -2609,6 +2640,11 @@ GLint TextureAnimator::run_clouds(const SkyInput& input) { // [(CSource - 0) * Asource] >> 7 + CDest // in the PS2, CSource is 128, so the >> 7 cancels entirely. + // note that in hires mode (this is new to opengoal), the max size is upped to 256 and different + // textures get used + auto& blend_tex = hires ? m_sky_hires_blend_texture : m_sky_blend_texture; + auto& final_tex = hires ? m_sky_hires_final_texture : m_sky_final_texture; + int times_idx = 0; // Anim 0: // this create a 16x16 CLUT with RGB = 128, 128, 128 and alpha = i @@ -2616,7 +2652,7 @@ GLint TextureAnimator::run_clouds(const SkyInput& input) { // it's uploaded 24 * 32 = 768. (texture-anim-alpha-ramp-clut-upload) times_idx++; { - FramebufferTexturePairContext ctxt(m_sky_blend_texture); + FramebufferTexturePairContext ctxt(blend_tex); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glUniform1i(m_uniforms.tcc, 1); @@ -2641,9 +2677,14 @@ GLint TextureAnimator::run_clouds(const SkyInput& input) { // Anim 1: // noise (16x16) // while (noise_layer_idx) { - for (int noise_layer_idx = 0; noise_layer_idx < kNumSkyNoiseLayers; noise_layer_idx++) { + NoiseTexturePair* noise_textures = hires ? m_sky_hires_noise_textures : m_sky_noise_textures; + int noise_layer_amt = hires ? kNumSkyHiresNoiseLayers : kNumSkyNoiseLayers; + for (int noise_layer_idx = 0; noise_layer_idx < noise_layer_amt; noise_layer_idx++) { const float new_time = input.times[times_idx]; - auto& ntp = m_sky_noise_textures[noise_layer_idx]; + auto& ntp = noise_textures[noise_layer_idx]; + + ntp.max_time = input.max_times[noise_layer_idx]; + ntp.scale = input.scales[noise_layer_idx]; if (new_time < ntp.last_time) { std::swap(ntp.new_tex, ntp.old_tex); @@ -2666,21 +2707,21 @@ GLint TextureAnimator::run_clouds(const SkyInput& input) { } } - FramebufferTexturePairContext ctxt(m_sky_final_texture); + FramebufferTexturePairContext ctxt(final_tex); glClearColor(0.0, 0.0, 0.0, 0.0); glClear(GL_COLOR_BUFFER_BIT); glUniform1i(m_uniforms.enable_tex, 2); - glBindTexture(GL_TEXTURE_2D, m_sky_blend_texture.texture()); + glBindTexture(GL_TEXTURE_2D, blend_tex.texture()); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glUniform1f(m_uniforms.minimum, input.cloud_min); glUniform1f(m_uniforms.maximum, input.cloud_max); glDisable(GL_BLEND); glDrawArrays(GL_TRIANGLE_FAN, 0, 4); - glBindTexture(GL_TEXTURE_2D, m_sky_final_texture.texture()); + glBindTexture(GL_TEXTURE_2D, final_tex.texture()); glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); - return m_sky_final_texture.texture(); + return final_tex.texture(); } void TextureAnimator::run_slime(const SlimeInput& input) { @@ -2774,4 +2815,4 @@ void TextureAnimator::run_slime(const SlimeInput& input) { glBindTexture(GL_TEXTURE_2D, m_slime_final_scroll_texture.texture()); glGenerateMipmap(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, 0); -} \ No newline at end of file +} diff --git a/game/graphics/opengl_renderer/TextureAnimator.h b/game/graphics/opengl_renderer/TextureAnimator.h index 0ec472c6b7..b32d9c6315 100644 --- a/game/graphics/opengl_renderer/TextureAnimator.h +++ b/game/graphics/opengl_renderer/TextureAnimator.h @@ -217,7 +217,9 @@ struct SkyInput { float fog_height; float cloud_min; float cloud_max; - float times[9]; + float times[11]; + float max_times[6]; + float scales[6]; int32_t cloud_dest; }; @@ -261,7 +263,7 @@ class TextureAnimator { void setup_sky(); void handle_upload_clut_16_16(const DmaTransfer& tf, const u8* ee_mem); void handle_generic_upload(const DmaTransfer& tf, const u8* ee_mem); - void handle_clouds_and_fog(const DmaTransfer& tf, TexturePool* texture_pool); + void handle_clouds_and_fog(const DmaTransfer& tf, TexturePool* texture_pool, bool hires); void handle_slime(const DmaTransfer& tf, TexturePool* texture_pool); void handle_erase_dest(DmaFollower& dma); void handle_set_shader(DmaFollower& dma); @@ -383,7 +385,7 @@ class TextureAnimator { const std::string& suffix1, const std::optional& dgo); void run_clut_blender_group(DmaTransfer& tf, int idx, u64 frame_idx); - GLint run_clouds(const SkyInput& input); + GLint run_clouds(const SkyInput& input, bool hires); void run_slime(const SlimeInput& input); Psm32ToPsm8Scrambler m_psm32_to_psm8_8_8, m_psm32_to_psm8_16_16, m_psm32_to_psm8_32_32, @@ -417,10 +419,12 @@ class TextureAnimator { // must be power of 2 - dimensions of the final clouds textures static constexpr int kFinalSkyTextureSize = 128; + static constexpr int kFinalSkyHiresTextureSize = 512; static constexpr int kFinalSlimeTextureSize = 128; // number of small sub-textures. Must be less than log2(kFinalTextureSize). static constexpr int kNumSkyNoiseLayers = 4; + static constexpr int kNumSkyHiresNoiseLayers = 6; static constexpr int kNumSlimeNoiseLayers = 4; private: @@ -432,9 +436,13 @@ class TextureAnimator { FramebufferTexturePair m_sky_blend_texture; FramebufferTexturePair m_sky_final_texture; GpuTexture* m_sky_pool_gpu_tex = nullptr; + NoiseTexturePair m_sky_hires_noise_textures[kNumSkyHiresNoiseLayers]; + FramebufferTexturePair m_sky_hires_blend_texture; + FramebufferTexturePair m_sky_hires_final_texture; + GpuTexture* m_sky_hires_pool_gpu_tex = nullptr; SlimeInput m_debug_slime_input; - NoiseTexturePair m_slime_noise_textures[kNumSkyNoiseLayers]; + NoiseTexturePair m_slime_noise_textures[kNumSlimeNoiseLayers]; FramebufferTexturePair m_slime_blend_texture; FramebufferTexturePair m_slime_final_texture, m_slime_final_scroll_texture; GpuTexture* m_slime_pool_gpu_tex = nullptr; diff --git a/goal_src/jak2/engine/debug/menu.gc b/goal_src/jak2/engine/debug/menu.gc index 728f515fb4..838818c8f7 100644 --- a/goal_src/jak2/engine/debug/menu.gc +++ b/goal_src/jak2/engine/debug/menu.gc @@ -1460,17 +1460,14 @@ (debug-menu-context-select-new-item arg0 1) ) ((cpad-pressed? (-> arg0 joypad-number) left) - (debug-menu-context-select-new-item arg0 -5) + (debug-menu-context-select-new-item arg0 (#if PC_PORT + (if (cpad-hold? (-> arg0 joypad-number) l3) -20 -5) + -5)) ) ((cpad-pressed? (-> arg0 joypad-number) right) - (debug-menu-context-select-new-item arg0 5) - ) - ;; pc port note : added these two - ((cpad-pressed? (-> arg0 joypad-number) l1) - (debug-menu-context-select-new-item arg0 -20) - ) - ((cpad-pressed? (-> arg0 joypad-number) r1) - (debug-menu-context-select-new-item arg0 20) + (debug-menu-context-select-new-item arg0 (#if PC_PORT + (if (cpad-hold? (-> arg0 joypad-number) l3) 20 5) + 5)) ) ) arg0 diff --git a/goal_src/jak2/engine/gfx/mood/time-of-day.gc b/goal_src/jak2/engine/gfx/mood/time-of-day.gc index 4347f5049d..3ed04234c3 100644 --- a/goal_src/jak2/engine/gfx/mood/time-of-day.gc +++ b/goal_src/jak2/engine/gfx/mood/time-of-day.gc @@ -479,7 +479,8 @@ (set-fog-height! f0-16) ) (if (-> arg0 sky) - (set! (-> (&-> *level* default-level texture-anim-array 9) 0) *sky-texture-anim-array*) + (set! (-> (&-> *level* default-level texture-anim-array 9) 0) (#if PC_PORT (if *hires-sky* *sky-hires-texture-anim-array* *sky-texture-anim-array*) + *sky-texture-anim-array*)) (set! (-> (&-> *level* default-level texture-anim-array 9) 0) #f) ) (let ((s5-2 (level-get-target-inside *level*))) diff --git a/goal_src/jak2/engine/gfx/sky/sky-tng.gc b/goal_src/jak2/engine/gfx/sky/sky-tng.gc index 19c7bea989..c11b9237be 100644 --- a/goal_src/jak2/engine/gfx/sky/sky-tng.gc +++ b/goal_src/jak2/engine/gfx/sky/sky-tng.gc @@ -37,8 +37,6 @@ vf30: cam 1 (premultiplied by hmge) vf31: cam 0 (premultiplied by hmge) |# -;; TODO: cloud drawing is disabled. - ;; DECOMP BEGINS ;; set the xy component of vf24 (texture offset for large poly renderer) to values / 65,536 @@ -825,13 +823,9 @@ vf31: cam 0 (premultiplied by hmge) (green-sun-dma (the-as sky-work s4-0) s3-0) (moon-dma (the-as sky-work s4-0) s3-0) (draw-haze (the-as sky-work s4-0) s3-0) - (when (nonzero? *sky-texture-anim-array*) ;; added check - (draw-clouds (the-as sky-work s4-0) s3-0) ;; DISABLED! - ) + (draw-clouds (the-as sky-work s4-0) s3-0) (draw-base (the-as sky-work s4-0) s3-0) - (when (nonzero? *sky-texture-anim-array*) ;; added check - (draw-fog (the-as sky-work s4-0) s3-0) - ) + (draw-fog (the-as sky-work s4-0) s3-0) ) ) (let ((v1-52 *dma-mem-usage*)) diff --git a/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc b/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc index 463e46948c..260b497bfe 100644 --- a/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc +++ b/goal_src/jak2/engine/gfx/sprite/particles/sparticle.gc @@ -749,9 +749,10 @@ (.mfc0 v1-53 Count) (- v1-53 gp-0) (when *display-sprite-info* - (if (movie?) - (format *stdcon* "~%~%~%") - ) + ;; pc port note : this is unnecessary + ;; (if (movie?) + ;; (format *stdcon* "~%~%~%") + ;; ) (format *stdcon* "2d: ~4d~100h3d: ~4d~200hwarp/glow: ~3D~350hhud:~3D~%" diff --git a/goal_src/jak2/engine/gfx/texture/texture-anim-h.gc b/goal_src/jak2/engine/gfx/texture/texture-anim-h.gc index 3c06d86d2c..d6a586f907 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-anim-h.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-anim-h.gc @@ -179,6 +179,20 @@ ) +(#when PC_PORT +(deftype noise256x256 (structure) + ((image uint8 65536 :offset-assert 0) + ) + ) + + +(deftype noise512x512 (structure) + ((image uint8 262144 :offset-assert 0) + ) + ) +) + + (deftype fog8x256 (structure) ((image uint8 256 :offset-assert 0) ) diff --git a/goal_src/jak2/engine/gfx/texture/texture-anim-tables.gc b/goal_src/jak2/engine/gfx/texture/texture-anim-tables.gc index 6b192fae6e..eb653f608c 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-anim-tables.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-anim-tables.gc @@ -419,9 +419,612 @@ ) ) +(#when PC_PORT +(define *sky-hires-texture-anim-array* + (the-as (texture-anim-array texture-anim) + (new 'static 'texture-anim-array :type texture-anim + (new 'static 'texture-anim + :func-id 'texture-anim-alpha-ramp-clut-upload + :init-func-id 'texture-anim-alpha-ramp-clut-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 24.0) + :color (new 'static 'rgba :a #x80) + :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 0) + ) + (new 'static 'texture-anim + :num-layers #x2 + :func-id 'cloud-texture-anim-func + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 16.0 :y 4.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 9600.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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 16.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 9600.0 + :tex-name #f + :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 1.0) + :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) + :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 + :extra (new 'static 'vector :x 16.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 9600.0 + :tex-name #f + :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) + :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 1.0) + :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 + :num-layers #x2 + :func-id 'cloud-texture-anim-func + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 32.0 :y 5.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 4800.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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 32.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 4800.0 + :tex-name #f + :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 1.0) + :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) + :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 + :extra (new 'static 'vector :x 32.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 4800.0 + :tex-name #f + :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) + :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 1.0) + :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 + :num-layers #x2 + :func-id 'cloud-texture-anim-func + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 64.0 :y 6.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 2400.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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 64.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 2400.0 + :tex-name #f + :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 1.0) + :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) + :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 + :extra (new 'static 'vector :x 64.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 2400.0 + :tex-name #f + :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) + :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 1.0) + :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 + :num-layers #x2 + :func-id 'cloud-texture-anim-func + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 128.0 :y 8.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 1200.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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 128.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 1200.0 + :tex-name #f + :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 1.0) + :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) + :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 + :extra (new 'static 'vector :x 128.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 1200.0 + :tex-name #f + :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) + :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 1.0) + :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 + :num-layers #x2 + :func-id 'cloud-texture-anim-func + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 256.0 :y 8.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 600.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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 256.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 600.0 + :tex-name #f + :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 1.0) + :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) + :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 + :extra (new 'static 'vector :x 256.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 600.0 + :tex-name #f + :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) + :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 1.0) + :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 + :num-layers #x2 + :func-id 'cloud-texture-anim-func + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 512.0 :y 8.0) + :color (new 'static 'rgba :a #x80) + :frame-delta 300.0 + :frame-mod 450.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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 512.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 450.0 + :tex-name #f + :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 1.0) + :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) + :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 + :extra (new 'static 'vector :x 512.0 :y 16.0 :z 24.0) + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init + :tex #f + :end-time 450.0 + :tex-name #f + :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) + :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 1.0) + :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 + :num-layers 6 + :func #f + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 512.0 :y 16.0) + :color (new 'static 'rgba :a #x80) + :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 + :extra (new 'static 'vector :x 16.0 :y 4.0) + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :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.49) + :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 1.0) + :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 + :extra (new 'static 'vector :x 32.0 :y 5.0) + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :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.19) + :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 1.0) + :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 + :extra (new 'static 'vector :x 64.0 :y 6.0) + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :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.145) + :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 1.0) + :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 + :extra (new 'static 'vector :x 128.0 :y 8.0) + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :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.015) + :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 1.0) + :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 + :extra (new 'static 'vector :x 256.0 :y 8.0) + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :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.01) + :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 1.0) + :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 + :extra (new 'static 'vector :x 512.0 :y 8.0) + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :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.0075) + :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 1.0) + :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 + :num-layers #x1 + :func #f + :init-func-id 'dest-texture-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 512.0 :y 8.0) + :color (new 'static 'rgba :a #x80) + :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 2 + (new 'static 'texture-anim-layer + :extra (new 'static 'vector :x 512.0 :y 16.0) + :func-id 'move-rg-to-ba-texture-anim-layer-func + :init-func-id 'src-texture-init + :tex #f + :end-time 300.0 + :tex-name #f + :test (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest always)) + :alpha (new 'static 'gs-alpha :b #x1 :d #x1) + :start-color (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) + :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 1.0) + :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 + :func-id 'texture-anim-cloud-clut-upload + :init-func-id 'texture-anim-cloud-clut-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 24.0 :y 0.5 :z 1.0) + :color (new 'static 'rgba :a #x80) + :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 2) + ) + (new 'static 'texture-anim + :func-id 'fog-texture-anim-func + :init-func-id 'fog-texture-anim-init + :tex #f + :tex-name #f + :extra (new 'static 'vector :x 4.0 :y 6.0 :z 122880.0) + :color (new 'static 'rgba :a #x80) + :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 2) + ) + ) + ) + ) + +(defun set-layer-scale! ((n int) (val float)) + "set the scale of noise layer `n` in the hires sky anim" + (set! (-> *sky-hires-texture-anim-array* array-data 7 data n start-color w) val) + ) +(defun set-layer-update-time! ((n int) (val float)) + "set the update time of noise layer `n` in the hires sky anim" + (set! (-> *sky-hires-texture-anim-array* array-data (1+ n) frame-mod) val) + (set! (-> *sky-hires-texture-anim-array* array-data (1+ n) data 0 end-time) val) + (set! (-> *sky-hires-texture-anim-array* array-data (1+ n) data 1 end-time) val) + ) + +(set-layer-scale! 0 0.49) +(set-layer-scale! 1 0.19) +(set-layer-scale! 2 0.145) +(set-layer-scale! 3 0.015) +(set-layer-scale! 4 0.01) +(set-layer-scale! 5 0.0075) +(set-layer-update-time! 0 (fsec 16)) +(set-layer-update-time! 1 (fsec 8)) +(set-layer-update-time! 2 (fsec 6)) +(set-layer-update-time! 3 (fsec 4)) +(set-layer-update-time! 4 (fsec 3)) +(set-layer-update-time! 5 (fsec 2)) + +) + ;; WARN: Return type mismatch float vs none. (defun set-fog-height! ((arg0 float)) (set! (-> (the-as (array texture-anim) *sky-texture-anim-array*) 8 extra z) arg0) + (#when PC_PORT + (set! (-> (the-as (array texture-anim) *sky-hires-texture-anim-array*) 10 extra z) arg0)) (none) ) @@ -429,6 +1032,9 @@ (defun set-cloud-minmax! ((arg0 float) (arg1 float)) (set! (-> *sky-texture-anim-array* array-data 7 extra y) arg0) (set! (-> *sky-texture-anim-array* array-data 7 extra z) arg1) + (#when PC_PORT + (set! (-> *sky-hires-texture-anim-array* array-data 9 extra y) arg0) + (set! (-> *sky-hires-texture-anim-array* array-data 9 extra z) arg1)) (none) ) diff --git a/goal_src/jak2/engine/gfx/texture/texture-anim.gc b/goal_src/jak2/engine/gfx/texture/texture-anim.gc index 3ae175df5b..9454bc178a 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-anim.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-anim.gc @@ -198,6 +198,7 @@ (krew-holo 40) (clouds-and-fog 41) (slime 42) + (clouds-hires 43) ) (deftype texture-anim-pc-upload (structure) @@ -597,6 +598,8 @@ ) (define-extern *sky-texture-anim-array* (texture-anim-array texture-anim)) +(#when PC_PORT + (define-extern *sky-hires-texture-anim-array* (texture-anim-array texture-anim))) (define-extern *darkjak-texture-anim-array* (texture-anim-array texture-anim)) (define-extern *jakb-prison-texture-anim-array* (texture-anim-array texture-anim)) (define-extern *darkjak-hires-texture-anim-array* (texture-anim-array texture-anim)) @@ -693,11 +696,13 @@ ) (deftype sky-input (structure) - ((fog-height float) - (cloud-min float) - (cloud-max float) - (times float 9) - (cloud-dest int32) + ((fog-height float) + (cloud-min float) + (cloud-max float) + (times float 11) + (max-times float 6) + (scales float 6) + (cloud-dest int32) ) ) @@ -706,6 +711,10 @@ (set! (-> si cloud-min) (-> *sky-texture-anim-array* array-data 7 extra y)) (set! (-> si cloud-max) (-> *sky-texture-anim-array* array-data 7 extra z)) (set! (-> si cloud-dest) (the int (-> *sky-texture-anim-array* array-data 6 tex dest 0))) + (dotimes (i (-> *sky-texture-anim-array* array-data 5 num-layers)) + (set! (-> si scales i) (-> *sky-texture-anim-array* array-data 5 data i start-color w)) + (set! (-> si max-times i) (-> *sky-texture-anim-array* array-data (1+ i) frame-mod)) + ) (dotimes (i 9) (set! (-> si times i) (-> *sky-texture-anim-array* array-data i frame-time) @@ -713,6 +722,22 @@ ) ) +(defun make-sky-hires-input ((si sky-input)) + (set! (-> si fog-height) (-> (the-as (array texture-anim) *sky-hires-texture-anim-array*) 10 extra z)) + (set! (-> si cloud-min) (-> *sky-hires-texture-anim-array* array-data 9 extra y)) + (set! (-> si cloud-max) (-> *sky-hires-texture-anim-array* array-data 9 extra z)) + (set! (-> si cloud-dest) (the int (-> *sky-hires-texture-anim-array* array-data 8 tex dest 0))) + (dotimes (i (-> *sky-hires-texture-anim-array* array-data 7 num-layers)) + (set! (-> si scales i) (-> *sky-hires-texture-anim-array* array-data 7 data i start-color w)) + (set! (-> si max-times i) (-> *sky-hires-texture-anim-array* array-data (1+ i) frame-mod)) + ) + (dotimes (i 11) + (set! (-> si times i) + (-> *sky-hires-texture-anim-array* array-data i frame-time) + ) + ) + ) + #| struct SlimeInput { float alphas[4]; @@ -774,11 +799,11 @@ struct SlimeInput { bucket ) (pc-texture-anim-flag start-anim-array dma-buf) - (pc-texture-anim-flag clouds-and-fog dma-buf :qwc 4) + (pc-texture-anim-flag clouds-and-fog dma-buf :qwc (/ (psize-of sky-input) 16)) (make-sky-input (the sky-input (-> dma-buf base))) - (&+! (-> dma-buf base) 64) + (&+! (-> dma-buf base) (psize-of sky-input)) (pc-texture-anim-flag finish-anim-array dma-buf) - (dotimes (i 8) ;; intentially skipping fog here!! + (dotimes (i 9) ;; intentially skipping fog here!! (pc-update-anim-frame-time (-> *sky-texture-anim-array* array-data i)) ) ) @@ -786,6 +811,29 @@ struct SlimeInput { (set! anim-idx 8) ;; fog ;(return #f) ) + ((= anim-array *sky-hires-texture-anim-array*) + (when (= bucket (bucket-id tex-lcom-sky-post)) + ;; skip. I believe this is only used to generate the envmap texture for the ocean. + ;; it generates the exact same thing, so if we want this on PC one day, we can just + ;; steal if from the beginning of the frame. + (return #f) + ) + (with-dma-buffer-add-bucket ((dma-buf (-> *display* frames (-> *display* on-screen) global-buf)) + bucket + ) + (pc-texture-anim-flag start-anim-array dma-buf) + (pc-texture-anim-flag clouds-hires dma-buf :qwc (/ (psize-of sky-input) 16)) + (make-sky-hires-input (the sky-input (-> dma-buf base))) + (&+! (-> dma-buf base) (psize-of sky-input)) + (pc-texture-anim-flag finish-anim-array dma-buf) + (dotimes (i 11) ;; intentially skipping fog here!! + (pc-update-anim-frame-time (-> *sky-hires-texture-anim-array* array-data i)) + ) + ) + ;; falling through on purpose + (set! anim-idx 10) ;; fog + ;(return #f) + ) ((= anim-array *skull-gem-texture-anim-array*) (pc-update-fixed-anim bucket (texture-anim-pc skull-gem) anim-array) (return #f) @@ -1645,6 +1693,13 @@ struct SlimeInput { ((128) (set! s4-0 (new 'loading-level 'noise128x128)) ) + ;; pc port note : added these two cases + ((256) + (set! s4-0 (new 'loading-level 'noise256x256)) + ) + ((512) + (set! s4-0 (new 'loading-level 'noise512x512)) + ) ) (when s4-0 (let ((v1-14 (new 'loading-level 'texture))) diff --git a/goal_src/jak2/engine/gfx/texture/texture-finish.gc b/goal_src/jak2/engine/gfx/texture/texture-finish.gc index 3af3bcaace..6d051b5800 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-finish.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-finish.gc @@ -19,16 +19,10 @@ ) ) -;; failed to figure out what this is: (init! *sky-texture-anim-array*) - -;; failed to figure out what this is: +(init! *sky-hires-texture-anim-array*) (init! *darkjak-texture-anim-array*) - -;; failed to figure out what this is: (init! *skull-gem-texture-anim-array*) - -;; failed to figure out what this is: (init! *bomb-texture-anim-array*) (kmemclose) diff --git a/goal_src/jak2/pc/debug/default-menu-pc.gc b/goal_src/jak2/pc/debug/default-menu-pc.gc index 7b0d5e4359..d4d7dd17f4 100644 --- a/goal_src/jak2/pc/debug/default-menu-pc.gc +++ b/goal_src/jak2/pc/debug/default-menu-pc.gc @@ -858,6 +858,7 @@ ;(flag "PS2 Music" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-music?))) ;(flag "PS2 Sound effects" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-se?))) ;(flag "PS2 Hints" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-hints?))) + (flag "Highres Clouds" #f ,(dm-lambda-boolean-flag (-> *pc-settings* hires-clouds?))) (flag "Faster airlocks" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-airlock?))) (flag "Faster elevators" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-elevator?))) (flag "Faster progress" #f ,(dm-lambda-boolean-flag (-> *pc-settings* fast-progress?))) diff --git a/goal_src/jak2/pc/pckernel-impl.gc b/goal_src/jak2/pc/pckernel-impl.gc index 953836585e..c8bed17c3c 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -11,8 +11,8 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; version: 0.1.3.2 -(defconstant PC_KERNEL_VERSION (static-pckernel-version 0 1 3 2)) + ;; version: 0.1.4.2 +(defconstant PC_KERNEL_VERSION (static-pckernel-version 0 1 4 2)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; types and enums @@ -87,7 +87,9 @@ (fast-elevator? symbol) (fast-progress? symbol) + ;; gfx (smooth-minimap? symbol) + (hires-clouds? symbol) (text-language pc-language) ;; language for game text @@ -135,6 +137,7 @@ (set! (-> obj fast-elevator?) #t) (set! (-> obj fast-progress?) #f) (set! (-> obj smooth-minimap?) #t) + (set! (-> obj hires-clouds?) #t) 0) (defmethod reset-extra pc-settings-jak2 ((obj pc-settings-jak2) (call-handlers symbol)) @@ -157,6 +160,9 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(define *hires-sky* #t) + + (defun get-video-params () *video-params*) diff --git a/goal_src/jak2/pc/pckernel.gc b/goal_src/jak2/pc/pckernel.gc index 187e09fc7f..b3f9dce905 100644 --- a/goal_src/jak2/pc/pckernel.gc +++ b/goal_src/jak2/pc/pckernel.gc @@ -125,6 +125,15 @@ ) +(defmethod update pc-settings-jak2 ((obj pc-settings-jak2)) + "Set the default misc settings" + + ((method-of-type pc-settings update) obj) + + (set! *hires-sky* (-> obj hires-clouds?)) + (none)) + + (defun real-movie? () "are we in an actual cutscene and should letterbox the view?" (and (!= #f *scene-player*) (nonzero? movie?) (movie?))) @@ -310,6 +319,7 @@ (("fast-elevator?") (set! (-> obj fast-elevator?) (file-stream-read-symbol file))) (("fast-progress?") (set! (-> obj fast-progress?) (file-stream-read-symbol file))) (("smooth-minimap?") (set! (-> obj smooth-minimap?) (file-stream-read-symbol file))) + (("hires-clouds?") (set! (-> obj hires-clouds?) (file-stream-read-symbol file))) (("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file)))) (("cheats") (set! (-> obj cheats) (the-as pc-cheats (file-stream-read-int file)))) (("cheats-revealed") (set! (-> obj cheats-revealed) (the-as pc-cheats (file-stream-read-int file)))) @@ -336,6 +346,7 @@ (format file " (fast-elevator? ~A)~%" (-> obj fast-elevator?)) (format file " (fast-progress? ~A)~%" (-> obj fast-progress?)) (format file " (smooth-minimap? ~A)~%" (-> obj smooth-minimap?)) + (format file " (hires-clouds? ~A)~%" (-> obj hires-clouds?)) (format file " (text-language ~D)~%" (-> obj text-language)) (format file " (cheats #x~x)~%" (-> obj cheats)) (format file " (cheats-revealed #x~x)~%" (-> obj cheats-revealed))