From e2c84d7635e8553a4bd178c610f2090febe7e955 Mon Sep 17 00:00:00 2001 From: ManDude <7569514+ManDude@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:26:44 +0100 Subject: [PATCH] revamp controller LED in jak 1 + reorganize some pc-settings things + fix some jak 2 decomp (#2719) --- decompiler/config/jak1/all-types.gc | 1 + decompiler/config/jak2/all-types.gc | 45 ++- .../config/jak2/ntsc_v1/type_casts.jsonc | 11 +- decompiler/util/data_decompile.cpp | 7 +- .../jak1/text/game_custom_text_en-US.json | 7 +- game/kernel/common/klisten.cpp | 19 +- game/kernel/common/kprint.h | 4 +- game/kernel/jak2/kprint.cpp | 8 +- goal_src/jak1/engine/game/game-info.gc | 2 - goal_src/jak1/engine/game/powerups.gc | 1 - goal_src/jak1/engine/target/target-death.gc | 2 - goal_src/jak1/engine/ui/text-h.gc | 1 + .../levels/racer_common/target-racer-h.gc | 9 +- goal_src/jak1/pc/debug/default-menu-pc.gc | 173 +++++------ goal_src/jak1/pc/features/speedruns.gc | 2 +- goal_src/jak1/pc/pckernel-common.gc | 240 +++++---------- goal_src/jak1/pc/pckernel-h.gc | 279 ++++++------------ goal_src/jak1/pc/pckernel-impl.gc | 84 ++++-- goal_src/jak1/pc/pckernel.gc | 219 ++++++++++++++ goal_src/jak1/pc/progress-pc.gc | 44 ++- .../baron_errol_metalkor/metalkor-texture.gc | 12 +- goal_src/jak2/engine/camera/cam-update.gc | 2 +- goal_src/jak2/engine/debug/default-menu.gc | 2 +- .../jak2/engine/gfx/background/background.gc | 2 +- goal_src/jak2/engine/gfx/foreground/eye.gc | 38 +-- .../jak2/engine/gfx/texture/texture-anim-h.gc | 102 +++---- .../engine/gfx/texture/texture-anim-tables.gc | 134 ++++----- .../jak2/engine/gfx/texture/texture-anim.gc | 133 +++++++++ goal_src/jak2/engine/level/bsp-h.gc | 7 +- goal_src/jak2/engine/level/level-info.gc | 5 + goal_src/jak2/engine/level/level.gc | 43 +-- goal_src/jak2/engine/target/target-death.gc | 3 +- goal_src/jak2/kernel/gcommon.gc | 2 + .../levels/castle/boss/casboss-texture.gc | 12 +- .../levels/city/common/ctywide-texture.gc | 10 +- .../jak2/levels/city/oracle/oracle-texture.gc | 36 +-- .../jak2/levels/consite/consite-texture.gc | 24 +- goal_src/jak2/levels/dig/dig-texture.gc | 8 +- .../fortress/ammo_dump/fordumpa-texture.gc | 53 ++-- .../levels/fortress/prison/intro-texture.gc | 42 +-- .../jak2/levels/landing_pad/castle-texture.gc | 100 +++---- .../jak2/levels/nest/boss/nest-texture.gc | 36 +-- .../levels/palace/roof/palboss-texture.gc | 10 +- .../jak2/levels/stadium/stadiumb-texture.gc | 4 +- goal_src/jak2/pc/debug/default-menu-pc.gc | 88 +++--- goal_src/jak2/pc/pckernel-impl.gc | 14 +- .../metalkor-texture_REF.gc | 12 +- .../jak2/engine/camera/cam-update_REF.gc | 2 +- .../engine/gfx/texture/texture-anim-h_REF.gc | 106 +++---- .../gfx/texture/texture-anim-tables_REF.gc | 134 ++++----- .../reference/jak2/engine/level/bsp-h_REF.gc | 3 +- .../reference/jak2/engine/level/level_REF.gc | 7 +- .../levels/castle/boss/casboss-texture_REF.gc | 12 +- .../levels/city/common/ctywide-texture_REF.gc | 10 +- .../levels/city/oracle/oracle-texture_REF.gc | 36 +-- .../levels/consite/consite-texture_REF.gc | 24 +- .../jak2/levels/dig/dig-texture_REF.gc | 8 +- .../ammo_dump/fordumpa-texture_REF.gc | 6 +- .../fortress/prison/intro-texture_REF.gc | 42 +-- .../levels/landing_pad/castle-texture_REF.gc | 100 +++---- .../jak2/levels/nest/boss/nest-texture_REF.gc | 36 +-- .../levels/palace/roof/palboss-texture_REF.gc | 10 +- .../levels/stadium/stadiumb-texture_REF.gc | 4 +- 63 files changed, 1406 insertions(+), 1226 deletions(-) diff --git a/decompiler/config/jak1/all-types.gc b/decompiler/config/jak1/all-types.gc index a55d3d3301..e57b4f38b4 100644 --- a/decompiler/config/jak1/all-types.gc +++ b/decompiler/config/jak1/all-types.gc @@ -1674,6 +1674,7 @@ (input-opts-binds-unset #x1614) (input-opts-binds-unknown #x1615) (progress-no-other-resolution-options #x1616) + (input-opts-controller-led-reflect-heat #x1617) ;; GAME-TEXT-ID ENUM ENDS ) diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index 494041afaa..77c9be959f 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -5150,14 +5150,14 @@ (deftype texture-anim-layer (structure) ((extra vector :inline :offset 240) - (func symbol :offset 256) - (func-id basic :offset 256) - (init-func symbol :offset 260) - (init-func-id basic :offset 260) - (tex texture :offset 264) + (func (function texture-anim-layer int) :offset 256) + (func-id symbol :offset 256) + (init-func (function texture-anim-layer int) :offset 260) + (init-func-id symbol :offset 260) + (tex texture :offset 264) (start-time float :offset 268) (end-time float :offset 272) - (tex-name basic :offset 276) + (tex-name string :offset 276) (test gs-test :offset 280) (alpha gs-alpha :offset 288) (clamp gs-clamp :offset 296) @@ -5182,19 +5182,19 @@ :size-assert #x130 :flag-assert #xb00000130 (:methods - (texture-anim-layer-method-9 () none 9) - (texture-anim-layer-method-10 () none 10) + (texture-anim-layer-method-9 (_type_) _type_ 9) + (texture-anim-layer-method-10 (_type_) _type_ 10) ) ) (deftype texture-anim (structure) ((num-layers uint32 :offset-assert 0) - (func symbol :offset-assert 4) - (func-id basic :offset 4) - (init-func symbol :offset-assert 8) - (init-func-id basic :offset 8) + (func (function texture-anim int) :offset-assert 4) + (func-id symbol :offset 4) + (init-func (function texture-anim int) :offset-assert 8) + (init-func-id symbol :offset 8) (tex texture :offset-assert 12) - (tex-name string :offset-assert 16) + (tex-name string :offset-assert 16) (extra vector :inline :offset-assert 32) (color rgba :offset-assert 48) (frame-time float :offset-assert 52) @@ -5209,8 +5209,8 @@ :size-assert #x58 :flag-assert #xb00000058 (:methods - (texture-anim-method-9 () none 9) - (texture-anim-method-10 () none 10) + (texture-anim-method-9 (_type_) _type_ 9) + (texture-anim-method-10 (_type_) _type_ 10) ) ) @@ -5221,8 +5221,8 @@ :size-assert #x10 :flag-assert #xb00000010 (:methods - (texture-anim-array-method-9 (_type_) none 9) - (texture-anim-array-method-10 () none 10) + (texture-anim-array-method-9 (_type_) _type_ 9) + (texture-anim-array-method-10 (_type_) _type_ 10) ) ) @@ -5237,7 +5237,7 @@ (corner2 vector :inline :offset-assert 192) (corner3 vector :inline :offset-assert 208) (const vector :inline :offset-assert 224) - (random vector 8 :inline :offset-assert 240) + (random vector4w 8 :inline :offset-assert 240) (random-index uint8 :offset-assert 368) ) :method-count-assert 9 @@ -18917,10 +18917,12 @@ (region-array region-array :offset-assert 192) (collide-hash collide-hash :offset-assert 196) ;; 200 is some array + (wind-array uint32 :offset 200) ;; 204 is maybe that array's length (wind-array-length int32 :offset 204) (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) + (vis-spheres-length uint32 :offset 248) (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset-assert 256) @@ -18942,11 +18944,6 @@ (bsp-scale vector :inline :offset-assert 288) (bsp-offset vector :inline :offset-assert 304) - - - - (unk-data uint32 18 :offset 180) - (end uint8 :offset 399) ) :method-count-assert 19 @@ -24875,7 +24872,7 @@ ;; texture-anim ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; (define-extern *texture-anim-work* object) +(define-extern *texture-anim-work* texture-anim-work) ;; (define-extern texture-anim-layer-interp function) ;; (define-extern texture-anim-layer-add-shader function) ;; (define-extern texture-anim-layer-add-clut-shader function) diff --git a/decompiler/config/jak2/ntsc_v1/type_casts.jsonc b/decompiler/config/jak2/ntsc_v1/type_casts.jsonc index 502dc22cb0..62f3e3c2b1 100644 --- a/decompiler/config/jak2/ntsc_v1/type_casts.jsonc +++ b/decompiler/config/jak2/ntsc_v1/type_casts.jsonc @@ -10374,5 +10374,14 @@ [[188, 246], "gp", "shadow-dcache"], [93, "v1", "shadow-dcache"] ], - "(method 40 battle)": [[26, "v0", "enemy-option"]] + "(method 40 battle)": [[26, "v0", "enemy-option"]], + "(method 9 texture-anim)": [ + [5, "v1", "symbol"], + [11, "v1", "symbol"], + ["_stack_", 16, "texture-page"] + ], + "(method 9 texture-anim-layer)": [ + [5, "v1", "symbol"], + [11, "v1", "symbol"] + ] } diff --git a/decompiler/util/data_decompile.cpp b/decompiler/util/data_decompile.cpp index f86bb6bd9f..ea612c859c 100644 --- a/decompiler/util/data_decompile.cpp +++ b/decompiler/util/data_decompile.cpp @@ -1428,7 +1428,12 @@ goos::Object decompile_structure(const TypeSpec& type, // do nothing, the default is zero? field_defs_out.emplace_back(field.name(), pretty_print::to_symbol("0")); } else if (word.kind() == LinkedWord::SYM_PTR) { - if (word.symbol_name() == "#f" || word.symbol_name() == "#t") { + if (word.symbol_name() == "#f") { + field_defs_out.emplace_back( + field.name(), pretty_print::to_symbol(fmt::format("{}", word.symbol_name()))); + } else if (!ts.tc(field.type(), TypeSpec("symbol"))) { + continue; + } else if (word.symbol_name() == "#t") { field_defs_out.emplace_back( field.name(), pretty_print::to_symbol(fmt::format("{}", word.symbol_name()))); } else { diff --git a/game/assets/jak1/text/game_custom_text_en-US.json b/game/assets/jak1/text/game_custom_text_en-US.json index 93e67292be..108896ed90 100644 --- a/game/assets/jak1/text/game_custom_text_en-US.json +++ b/game/assets/jak1/text/game_custom_text_en-US.json @@ -202,8 +202,8 @@ "1601": "SELECT CONTROLLER", "1602": "ANALOG DEADZONE", "1603": "IGNORE IF WINDOW UNFOCUSED", - "1604": "LED REFLECT HP", - "1605": "LED REFLECT ECO", + "1604": "CONTROLLER LED FOR HP", + "1605": "CONTROLLER LED FOR ECO", "1606": "TRACK CAMERA", "1607": "HORIZONTAL SENSITIVITY", "1608": "VERTICAL SENSITIVITY", @@ -220,5 +220,6 @@ "1613": "AUTO HIDE CURSOR", "1614": "UNSET", "1615": "UNKNOWN", - "1616": "NO OTHER OPTIONS FOR ASPECT RATIO" + "1616": "NO OTHER OPTIONS FOR ASPECT RATIO", + "1617": "CONTROLLER LED FOR HEAT" } diff --git a/game/kernel/common/klisten.cpp b/game/kernel/common/klisten.cpp index 83c5b34986..b9bde4a61a 100644 --- a/game/kernel/common/klisten.cpp +++ b/game/kernel/common/klisten.cpp @@ -23,7 +23,7 @@ void klisten_init_globals() { */ void ClearPending() { if (!MasterDebug || !ListenerStatus) { - // if we aren't debugging print the print buffer to stdout. + // if we aren't debugging or connected print the print buffer to stdout. if (PrintPending.offset != 0) { auto size = strlen(PrintBufArea.cast().c() + sizeof(ListenerMessageHeader)); if (size > 0) { @@ -34,10 +34,19 @@ void ClearPending() { } else { if (ListenerStatus) { if (OutputPending.offset != 0) { - Ptr msg = OutputBufArea.cast() + sizeof(ListenerMessageHeader); - auto size = strlen(msg.c()); - // note - if size is ever greater than 2^16 this will cause an issue. - SendFromBuffer(msg.c(), size); + // note - same 64 kB patch as prints done here + char* msg = OutputBufArea.cast().c() + sizeof(ListenerMessageHeader); + auto size = strlen(msg); + while (size > 0) { + // sends larger than 64 kB are broken by the GoalProtoBuffer thing, so they are split + auto send_size = size; + if (send_size > 64000) { + send_size = 64000; + } + SendFromBuffer(msg, send_size); + size -= send_size; + msg += send_size; + } clear_output(); } diff --git a/game/kernel/common/kprint.h b/game/kernel/common/kprint.h index e5610a7161..765497efcf 100644 --- a/game/kernel/common/kprint.h +++ b/game/kernel/common/kprint.h @@ -19,7 +19,7 @@ extern Ptr PrintBufArea; constexpr u32 DEBUG_MESSAGE_BUFFER_SIZE = 0x80000; constexpr u32 DEBUG_OUTPUT_BUFFER_SIZE = 0x80000; constexpr u32 DEBUG_PRINT_BUFFER_SIZE = 0x200000; -constexpr u32 PRINT_BUFFER_SIZE = 0x2000; +constexpr u32 PRINT_BUFFER_SIZE = 0x8000; // upped from 0x2000 on PS2 because we ran out of memory struct format_struct { char data[0x40]; @@ -141,4 +141,4 @@ char* kitoa(char* buffer, s64 value, u64 base, s32 length, char pad, u32 flag); * The format function does have the ability to call it, but it always passes a zero because * getting a 128-bit integer in PS2 gcc's varargs doesn't work. */ -void kqtoa(); \ No newline at end of file +void kqtoa(); diff --git a/game/kernel/jak2/kprint.cpp b/game/kernel/jak2/kprint.cpp index 2db8ffcd18..d03712848e 100644 --- a/game/kernel/jak2/kprint.cpp +++ b/game/kernel/jak2/kprint.cpp @@ -17,7 +17,7 @@ namespace jak2 { void output_sql_query(char* query_name) { - if (MasterDebug != 0) { + if (MasterDebug) { sprintf(strend(OutputBufArea.cast().c() + sizeof(ListenerMessageHeader)), "sql-query \""); char* buffer_ptr = strend(OutputBufArea.cast().c() + sizeof(ListenerMessageHeader)); @@ -539,12 +539,14 @@ s32 format_impl_jak2(uint64_t* args) { // we'd get these eventually in ClearPending, but for some reason they flush these here. // This is nicer because we may crash in between here and flushing the print buffer. if (DiskBoot) { - // It's actually really annoying when debugging though so we disable it then - if (!MasterDebug) { + // however, we are going to disable it anyway because it spams the console and is annoying + if (false) { printf("%s", PrintPendingLocal3); fflush(stdout); } PrintPending = make_ptr(PrintPendingLocal2).cast(); + // if we don't comment this line, our output gets cleared + // *PrintPendingLocal3 = 0; } return 0; diff --git a/goal_src/jak1/engine/game/game-info.gc b/goal_src/jak1/engine/game/game-info.gc index 81593327f3..e2b9440a93 100644 --- a/goal_src/jak1/engine/game/game-info.gc +++ b/goal_src/jak1/engine/game/game-info.gc @@ -547,7 +547,6 @@ (set! (-> obj health-pickup-time) (-> *display* base-frame-counter)) ;; increase the health! (seek! (-> obj health) (-> obj health-max) amount) - (with-pc (set-reactive-controller-led! (-> obj health) (-> obj eco-level) (the-as int (-> obj eco-type)))) ) (else ;; negative health. Subtract. @@ -771,7 +770,6 @@ ) ) ) - (with-pc (set-reactive-controller-led! (-> obj health) (-> obj eco-level) (the-as int (-> obj eco-type)))) (-> obj eco-level) ) (else diff --git a/goal_src/jak1/engine/game/powerups.gc b/goal_src/jak1/engine/game/powerups.gc index f3098d3fdc..1a2960eb23 100644 --- a/goal_src/jak1/engine/game/powerups.gc +++ b/goal_src/jak1/engine/game/powerups.gc @@ -599,7 +599,6 @@ ) (set! (-> self fact-info-target eco-level) 0.0) (set! (-> self fact-info-target eco-timeout) 0) - (with-pc (set-reactive-controller-led! (-> self fact-info-target health) (-> self fact-info-target eco-level) (the-as int (-> self fact-info-target eco-type)))) (logclear! (-> self state-flags) (state-flags invuln-powerup)) (send-event self 'reset-collide) (stop! (-> self sound)) diff --git a/goal_src/jak1/engine/target/target-death.gc b/goal_src/jak1/engine/target/target-death.gc index ae3271a1f4..8e598060cc 100644 --- a/goal_src/jak1/engine/target/target-death.gc +++ b/goal_src/jak1/engine/target/target-death.gc @@ -60,7 +60,6 @@ (none) ) :code (behavior ((arg0 continue-point)) - (with-pc (set-reactive-controller-led! (-> self fact-info-target health) (-> self fact-info-target eco-level) (the-as int (-> self fact-info-target eco-type)))) (set! (-> self state-time) (-> *display* base-frame-counter)) (if (-> *art-control* reserve-buffer) (reserve-free *art-control* (-> *art-control* reserve-buffer heap)) @@ -966,7 +965,6 @@ (target-hit-setup-anim gp-0) (target-hit-move gp-0 (target-hit-orient gp-0 s5-0) target-falling-anim-trans (the-as float 1.0)) ) - (with-pc (set-reactive-controller-led! (-> self fact-info-target health) (-> self fact-info-target eco-level) (the-as int (-> self fact-info-target eco-type)))) (if (and (= (-> self game mode) 'play) (>= 0.0 (-> self fact-info-target health))) (go target-death (-> gp-0 mode)) ) diff --git a/goal_src/jak1/engine/ui/text-h.gc b/goal_src/jak1/engine/ui/text-h.gc index f0748757d5..f87228d90a 100644 --- a/goal_src/jak1/engine/ui/text-h.gc +++ b/goal_src/jak1/engine/ui/text-h.gc @@ -823,6 +823,7 @@ (input-opts-binds-unset #x1614) (input-opts-binds-unknown #x1615) (progress-no-other-resolution-options #x1616) + (input-opts-controller-led-reflect-heat #x1617) ;; GAME-TEXT-ID ENUM ENDS ) diff --git a/goal_src/jak1/levels/racer_common/target-racer-h.gc b/goal_src/jak1/levels/racer_common/target-racer-h.gc index 00e336d0a3..9995de0301 100644 --- a/goal_src/jak1/levels/racer_common/target-racer-h.gc +++ b/goal_src/jak1/levels/racer_common/target-racer-h.gc @@ -167,6 +167,11 @@ :bounds (static-spherem 0 0.3 0 6.3) ) - - +;; added for convenience +(#when PC_PORT +(defun zoomer-get-heat () + (-> *target* racer heat)) +(defun zoomer-get-heat-max () + (-> *RACER-bank* heat-max)) +) diff --git a/goal_src/jak1/pc/debug/default-menu-pc.gc b/goal_src/jak1/pc/debug/default-menu-pc.gc index 3bee30e93c..3f1f994dca 100644 --- a/goal_src/jak1/pc/debug/default-menu-pc.gc +++ b/goal_src/jak1/pc/debug/default-menu-pc.gc @@ -590,6 +590,26 @@ ) ) +(defun dm-frame-rate-pick-func ((bfps int) (msg debug-menu-msg)) + (let ((fps (/ bfps 8))) + (when (= msg (debug-menu-msg press)) + (set-frame-rate! *pc-settings* fps #t)) + (= (-> *pc-settings* target-fps) fps))) + +(defun dm-msaa-pick-func ((bmsaa int) (msg debug-menu-msg)) + (let ((msaa (/ bmsaa 8))) + (when (= msg (debug-menu-msg press)) + (set! (-> *pc-settings* gfx-msaa) msaa)) + (= (-> *pc-settings* gfx-msaa) msaa))) + +(defun dm-pc-cheats-pick-func ((bcheat int) (msg debug-menu-msg)) + (let ((cheat (the pc-cheats (/ bcheat 8)))) + (when (= msg (debug-menu-msg press)) + (logxor! (-> *pc-settings* cheats) cheat) + (cheats-sound-play (logtest? (-> *pc-settings* cheats) cheat)) + ) + (logtest? (-> *pc-settings* cheats) cheat))) + (when (-> *debug-menu-context* root-menu) (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-load-menu *debug-menu-context*)) (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-part-menu *debug-menu-context*)) @@ -627,64 +647,40 @@ (function "Custom" #f ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y)))) ) (menu "Fullscreen" - (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed))) - (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen))) - (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless))) + (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed #t))) + (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen #t))) + (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless #t))) ) (menu "Sizes" - (function "640 x 480" #f ,(lambda () (set-size! *pc-settings* 640 480))) - (function "640 x 360" #f ,(lambda () (set-size! *pc-settings* 640 360))) - (function "720 x 540" #f ,(lambda () (set-size! *pc-settings* 720 540))) - (function "960 x 540" #f ,(lambda () (set-size! *pc-settings* 960 540))) - (function "800 x 600" #f ,(lambda () (set-size! *pc-settings* 800 600))) - (function "960 x 720" #f ,(lambda () (set-size! *pc-settings* 960 720))) - (function "1280 x 720" #f ,(lambda () (set-size! *pc-settings* 1280 720))) - (function "1024 x 768" #f ,(lambda () (set-size! *pc-settings* 1024 768))) - (function "1366 x 768" #f ,(lambda () (set-size! *pc-settings* 1366 768))) - (function "1280 x 960" #f ,(lambda () (set-size! *pc-settings* 1280 960))) - (function "1440 x 1080" #f ,(lambda () (set-size! *pc-settings* 1440 1080))) - (function "1920 x 1080" #f ,(lambda () (set-size! *pc-settings* 1920 1080))) - (function "1920 x 1440" #f ,(lambda () (set-size! *pc-settings* 1920 1440))) - (function "2560 x 1440" #f ,(lambda () (set-size! *pc-settings* 2560 1440))) - (function "2880 x 2160" #f ,(lambda () (set-size! *pc-settings* 2880 2160))) - (function "3840 x 2160" #f ,(lambda () (set-size! *pc-settings* 3840 2160))) - (function "512 x 224" #f ,(lambda () (set-size! *pc-settings* 512 224))) - (function "512 x 256" #f ,(lambda () (set-size! *pc-settings* 512 256))) - (function "512 x 448" #f ,(lambda () (set-size! *pc-settings* 512 448))) - (function "512 x 512" #f ,(lambda () (set-size! *pc-settings* 512 512))) + (function "640 x 480" #f ,(lambda () (set-size! *pc-settings* 640 480 #t))) + (function "640 x 360" #f ,(lambda () (set-size! *pc-settings* 640 360 #t))) + (function "720 x 540" #f ,(lambda () (set-size! *pc-settings* 720 540 #t))) + (function "960 x 540" #f ,(lambda () (set-size! *pc-settings* 960 540 #t))) + (function "800 x 600" #f ,(lambda () (set-size! *pc-settings* 800 600 #t))) + (function "960 x 720" #f ,(lambda () (set-size! *pc-settings* 960 720 #t))) + (function "1280 x 720" #f ,(lambda () (set-size! *pc-settings* 1280 720 #t))) + (function "1024 x 768" #f ,(lambda () (set-size! *pc-settings* 1024 768 #t))) + (function "1366 x 768" #f ,(lambda () (set-size! *pc-settings* 1366 768 #t))) + (function "1280 x 960" #f ,(lambda () (set-size! *pc-settings* 1280 960 #t))) + (function "1440 x 1080" #f ,(lambda () (set-size! *pc-settings* 1440 1080 #t))) + (function "1920 x 1080" #f ,(lambda () (set-size! *pc-settings* 1920 1080 #t))) + (function "1920 x 1440" #f ,(lambda () (set-size! *pc-settings* 1920 1440 #t))) + (function "2560 x 1440" #f ,(lambda () (set-size! *pc-settings* 2560 1440 #t))) + (function "2880 x 2160" #f ,(lambda () (set-size! *pc-settings* 2880 2160 #t))) + (function "3840 x 2160" #f ,(lambda () (set-size! *pc-settings* 3840 2160 #t))) + (function "512 x 224" #f ,(lambda () (set-size! *pc-settings* 512 224 #t))) + (function "512 x 256" #f ,(lambda () (set-size! *pc-settings* 512 256 #t))) + (function "512 x 448" #f ,(lambda () (set-size! *pc-settings* 512 448 #t))) + (function "512 x 512" #f ,(lambda () (set-size! *pc-settings* 512 512 #t))) ) (menu "Secrets" (menu "PC cheats" - (flag "Big head jak" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-head) - ) - (pc-cheats? (-> *pc-settings* cheats) big-head))) - (flag "Small head jak" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) small-head) - ) - (pc-cheats? (-> *pc-settings* cheats) small-head))) - (flag "Big fist jak" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-fist) - ) - (pc-cheats? (-> *pc-settings* cheats) big-fist))) - (flag "Big head npcs" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) big-head-npc) - ) - (pc-cheats? (-> *pc-settings* cheats) big-head-npc))) - (flag "Huge head jak" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) huge-head) - ) - (pc-cheats? (-> *pc-settings* cheats) huge-head))) - (flag "Mirrored mode" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) mirror) - ) - (pc-cheats? (-> *pc-settings* cheats) mirror))) + (flag "Big head jak" (the binteger (pc-cheats big-head)) dm-pc-cheats-pick-func) + (flag "Small head jak" (the binteger (pc-cheats small-head)) dm-pc-cheats-pick-func) + (flag "Big fist jak" (the binteger (pc-cheats big-fist)) dm-pc-cheats-pick-func) + (flag "Big head npcs" (the binteger (pc-cheats big-head-npc)) dm-pc-cheats-pick-func) + (flag "Huge head jak" (the binteger (pc-cheats huge-head)) dm-pc-cheats-pick-func) + (flag "Mirrored mode" (the binteger (pc-cheats mirror)) dm-pc-cheats-pick-func) (flag "Blue eco" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (logclear! (-> *pc-settings* cheats) (pc-cheats eco-red eco-yellow eco-green)) @@ -715,36 +711,12 @@ (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) invinc) ) (pc-cheats? (-> *pc-settings* cheats) invinc))) - (flag "Blue sidekick" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) sidekick-blue) - ) - (pc-cheats? (-> *pc-settings* cheats) sidekick-blue))) - (flag "All flavas" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) tunes) - ) - (pc-cheats? (-> *pc-settings* cheats) tunes))) - (flag "Real time tod" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) sky) - ) - (pc-cheats? (-> *pc-settings* cheats) sky))) - (flag "No textures" #f ,(lambda (arg (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) - (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) no-tex) - ) - (pc-cheats? (-> *pc-settings* cheats) no-tex))) -;; (flag "Hard rats" #f ,(lambda (arg (msg debug-menu-msg)) -;; (when (= msg (debug-menu-msg press)) -;; (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) hard-rats) -;; ) -;; (pc-cheats? (-> *pc-settings* cheats) hard-rats))) -;; (flag "Hero mode" #f ,(lambda (arg (msg debug-menu-msg)) -;; (when (= msg (debug-menu-msg press)) -;; (pc-cheat-toggle-and-tune (-> *pc-settings* cheats) hero-mode) -;; ) -;; (pc-cheats? (-> *pc-settings* cheats) hero-mode))) + (flag "Blue sidekick" (the binteger (pc-cheats sidekick-blue)) dm-pc-cheats-pick-func) + (flag "All flavas" (the binteger (pc-cheats tunes)) dm-pc-cheats-pick-func) + (flag "Real time tod" (the binteger (pc-cheats sky)) dm-pc-cheats-pick-func) + (flag "No textures" (the binteger (pc-cheats no-tex)) dm-pc-cheats-pick-func) + ;(flag "Hero mode" (the binteger (pc-cheats hero-mode)) dm-pc-cheats-pick-func) + ;(flag "Hard rats" (the binteger (pc-cheats hard-rats)) dm-pc-cheats-pick-func) ) ) (flag "Letterbox" #f ,(dm-lambda-boolean-flag (-> *pc-settings* letterbox?))) @@ -805,25 +777,22 @@ (set! (-> *pc-settings* lod-force-actor) 3) )) ) - (menu "Framerate" - (flag "60" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 60)) - (= (-> *pc-settings* target-fps) 60))) - (flag "100" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 100)) - (= (-> *pc-settings* target-fps) 100))) - (flag "150" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 150)) - (= (-> *pc-settings* target-fps) 150))) + (menu "Framerate" + (flag "60" 60 dm-frame-rate-pick-func) + (flag "100" 100 dm-frame-rate-pick-func) + (flag "150" 150 dm-frame-rate-pick-func) ) - (menu "MSAA" - (flag "Off" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 1)) - (= (-> *pc-settings* gfx-msaa) 1))) - (flag "x2" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 2)) - (= (-> *pc-settings* gfx-msaa) 2))) - (flag "x4" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 4)) - (= (-> *pc-settings* gfx-msaa) 4))) - (flag "x8" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 8)) - (= (-> *pc-settings* gfx-msaa) 8))) - (flag "x16" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) 16)) - (= (-> *pc-settings* gfx-msaa) 16))) + (menu "MSAA" + (flag "Off" 1 dm-msaa-pick-func) + (flag "x2" 2 dm-msaa-pick-func) + (flag "x4" 4 dm-msaa-pick-func) + (flag "x8" 8 dm-msaa-pick-func) + (flag "x16" 16 dm-msaa-pick-func) + ) + (menu "LED" + (flag "hp" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-hp-led?))) + (flag "eco" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-eco-led?))) + (flag "heat" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-heat-led?))) ) (flag "V-sync" #f ,(dm-lambda-boolean-flag (-> *pc-settings* vsync?))) (flag "All actors" #f ,(dm-lambda-boolean-flag (-> *pc-settings* force-actors?))) @@ -832,7 +801,7 @@ (flag "Extra hud elements" #f ,(dm-lambda-boolean-flag (-> *pc-settings* extra-hud?))) (flag "Music fadein" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadein?))) (flag "Music fadeout" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadeout?))) - (function "Reset" #f ,(lambda () (reset *pc-settings*))) + (function "Reset" #f ,(lambda () (reset *pc-settings* #t))) (function "Save" #f ,(lambda () (commit-to-file *pc-settings*))) (function "Load" #f ,(lambda () (load-settings *pc-settings*))) ) diff --git a/goal_src/jak1/pc/features/speedruns.gc b/goal_src/jak1/pc/features/speedruns.gc index 446e3611f8..c8bd152b3e 100644 --- a/goal_src/jak1/pc/features/speedruns.gc +++ b/goal_src/jak1/pc/features/speedruns.gc @@ -235,7 +235,7 @@ ;; ensure `force actors` is not enabled (set! (-> *pc-settings* force-actors?) #f) ;; force FPS to `60` - (set-frame-rate! *pc-settings* 60) + (set-frame-rate! *pc-settings* 60 #t) ;; enable auto saving by default (set! (-> *setting-control* default auto-save) #t) (none) diff --git a/goal_src/jak1/pc/pckernel-common.gc b/goal_src/jak1/pc/pckernel-common.gc index 9fbecc4bff..7a1b6a8c32 100644 --- a/goal_src/jak1/pc/pckernel-common.gc +++ b/goal_src/jak1/pc/pckernel-common.gc @@ -25,6 +25,10 @@ (format 0 "pckernel version: ~D.~D~%" PC_KERNEL_VER_MAJOR PC_KERNEL_VER_MINOR) +(defun get-pckernel-version () + "return the current pckernel version" + PC_KERNEL_VERSION) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; global variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -51,28 +55,31 @@ ;;;; updates ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defmethod set-display-mode! pc-settings ((obj pc-settings) (mode symbol)) +(defmethod set-display-mode! pc-settings ((obj pc-settings) (mode symbol) (call-handlers symbol)) "sets the game's display mode" ;; no-op if the display mode hasn't actually changed (when (!= mode (-> obj display-mode)) ;; change the display mode. (set! (-> obj display-mode) mode) - ;; set fullscreen to what we want - (pc-set-display-mode (-> obj display-mode)) - ;; if windowed mode, set the size properly - (when (= (-> obj display-mode) 'windowed) - ;; TODO - this means the user can never have a window smaller than MIN_WIDTH/HEIGHT - (pc-set-window-size (max PC_MIN_WIDTH (-> obj win-width)) (max PC_MIN_HEIGHT (-> obj win-height))))) + + (when call-handlers + ;; set fullscreen to what we want + (pc-set-display-mode (-> obj display-mode)) + ;; if windowed mode, set the size properly + (when (= (-> obj display-mode) 'windowed) + ;; TODO - this means the user can never have a window smaller than MIN_WIDTH/HEIGHT + (pc-set-window-size (max PC_MIN_WIDTH (-> obj win-width)) (max PC_MIN_HEIGHT (-> obj win-height)))))) 0) -(defmethod set-size! pc-settings ((obj pc-settings) (width int) (height int)) +(defmethod set-size! pc-settings ((obj pc-settings) (width int) (height int) (call-handlers symbol)) "sets the size of the display window" (format 0 "Setting ~A size to ~D x ~D~%" (-> obj display-mode) width height) (cond ((= 'windowed (-> obj display-mode)) (set! (-> obj win-width) width) (set! (-> obj win-height) height) - (pc-set-window-size (max PC_MIN_WIDTH (-> obj win-width)) (max PC_MIN_HEIGHT (-> obj win-height))) + (if call-handlers + (pc-set-window-size (max PC_MIN_WIDTH (-> obj win-width)) (max PC_MIN_HEIGHT (-> obj win-height)))) ) (else (set! (-> obj width) width) @@ -99,23 +106,22 @@ (set! (-> obj aspect-ratio-reciprocal) (/ ASPECT_4X3 aspect)) (none)) -(defmethod set-frame-rate! pc-settings ((obj pc-settings) (rate int)) +(defmethod set-frame-rate! pc-settings ((obj pc-settings) (rate int) (call-handlers symbol)) "set the target framerate." - (pc-set-frame-rate rate) + (if call-handlers + (pc-set-frame-rate rate)) (if (and (!= 'fullscreen (-> obj display-mode)) (!= (pc-get-active-display-refresh-rate) rate)) (set! (-> obj vsync?) #f)) + (set! (-> obj target-fps) rate) (case rate ((50) - (set! (-> obj target-fps) rate) (set-game-setting! obj 'video-mode 'pal) ) ((60) - (set! (-> obj target-fps) rate) (set-game-setting! obj 'video-mode 'ntsc) ) (else - (set! (-> obj target-fps) rate) (set-game-setting! obj 'video-mode 'custom) ) ) @@ -145,7 +151,6 @@ (defmethod update-from-os pc-settings ((obj pc-settings)) "Update settings from the C kernel to GOAL." - (set! (-> obj os) (pc-get-os)) (pc-get-window-size (&-> obj real-width) (&-> obj real-height)) (pc-get-window-scale (&-> obj dpi-x) (&-> obj dpi-y)) @@ -199,11 +204,12 @@ ) ) - (pc-set-vsync (-> obj vsync?)) + (pc-set-vsync (and (-> obj vsync?) + (or (= 'fullscreen (-> obj display-mode)) + (>= (pc-get-active-display-refresh-rate) (-> obj target-fps))))) + (when (!= 'fullscreen (-> obj display-mode)) - (if (< (pc-get-active-display-refresh-rate) (-> obj target-fps)) - (pc-set-vsync #f)) - (pc-set-frame-rate (-> obj target-fps))) + (pc-set-frame-rate (-> obj target-fps))) ;; do game resolution (if (= (-> obj display-mode) 'windowed) @@ -217,10 +223,9 @@ (true! valid?)) ) - (if (not valid?) (set! (-> obj gfx-msaa) 2)) + (if (not valid?) (set! (-> obj gfx-msaa) PC_DEFAULT_MSAA)) (pc-set-msaa (-> obj gfx-msaa)) ) - ;; -- end TODO (pc-discord-rpc-set (if (-> obj discord-rpc?) 1 0)) @@ -243,6 +248,20 @@ (pc-sound-set-fade-hack fade-hack) ) + (when (led-enabled? obj) + (update-led obj) + ;(format *stdcon* "led: ~,,2f ~,,2f ~,,2f (~,,2f%)~%" (-> obj controller-led-color r) (-> obj controller-led-color g) (-> obj controller-led-color b) (* 100.0 (-> obj controller-led-color a))) + ;; use alpha as the brightness modifier + (vector-float*! (-> obj controller-led-color) (-> obj controller-led-color) (-> obj controller-led-color a)) + ;; now multiply by the brightness setting + (vector-float*! (-> obj controller-led-color) (-> obj controller-led-color) (-> obj controller-led-brightness)) + ;; now use it as the controller led color + (pc-set-controller-led! 0 + (the int (lerp-scale 0.0 255.0 (-> obj controller-led-color r) 0.0 1.0)) + (the int (lerp-scale 0.0 255.0 (-> obj controller-led-color g) 0.0 1.0)) + (the int (lerp-scale 0.0 255.0 (-> obj controller-led-color b) 0.0 1.0))) + ) + (none)) ;; where we store the input progress for the cheat codes. make sure there's enough space for all cheats. @@ -253,10 +272,7 @@ `(begin (cpad-clear! 0 r1) (logxor! ,cheats-var (pc-cheats ,cheat)) - (if (-> *pc-settings* speedrunner-mode?) - (sound-play "cursor-options") - (cheats-sound-play (logtest? ,cheats-var (pc-cheats ,cheat))) - ) + (cheats-sound-play (logtest? ,cheats-var (pc-cheats ,cheat))) ) ) @@ -306,35 +322,21 @@ "run cheats." 0) - -(defmethod add-to-music-log pc-settings ((obj pc-settings) (music symbol) (flava int)) - "add music and flava information to the music log. - if music already exists, adds flava. if flava already exists, nothing happens." - - ;; go through our music log - (dotimes (i PC_MUSIC_LOG_LENGTH) - (cond - ;; an empty log entry! place the currently playing music there, and fill flava. - ((not (-> obj secrets music i name)) - (set! (-> obj secrets music i name) music) - (set! (-> obj secrets music i flava-mask) (ash 1 flava)) - (return 0) - ) - ;; an existing log entry for the current music. fill flava. - ((= music (-> obj secrets music i name)) - (logior! (-> obj secrets music i flava-mask) (ash 1 flava)) - (return 0) - ) - ;; something else. maybe the wrong entry, in which case nothing to do. - ) - ) - - 0) - (defmethod update-music-log pc-settings ((obj pc-settings)) "update music log settings." 0) +(defmethod update-led pc-settings ((obj pc-settings)) + "set the controller led color by modifying the controller-led-color vector" + ;; random colors for fun lol + (set-vector! (-> obj controller-led-color) (rand-vu) (rand-vu) (rand-vu) 1.0) + ;(set-vector! (-> obj controller-led-color) 0.0 0.0 1.0 1.0) + #t) + +(defmethod led-enabled? pc-settings ((obj pc-settings)) + "should the controller led be set?" + #f) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -389,30 +391,6 @@ ) -(defun find-music-log ((music symbol)) - "return #t if the given music is logged into the *pc-settings*, #f otherwise." - (dotimes (i PC_MUSIC_LOG_LENGTH) - (if (= music (-> *pc-settings* secrets music i name)) - (return #t))) - #f) - -(defun find-flava-log ((music symbol) (flava-idx int)) - "return #t if the given music's flava is logged into the *pc-settings*, #f otherwise." - (dotimes (i PC_MUSIC_LOG_LENGTH) - (if (= music (-> *pc-settings* secrets music i name)) - (return (logtest? (-> *pc-settings* secrets music i flava-mask) (ash 1 flava-idx))))) - #f) - -(defun-debug print-music-log ((out object)) - "prints the *pc-settings* music log." - - (dotimes (i PC_MUSIC_LOG_LENGTH) - (if (-> *pc-settings* secrets music i name) - (format out "music log ~D: ~A (f #x~x)~%" i (-> *pc-settings* secrets music i name) (-> *pc-settings* secrets music i flava-mask))) - ) - - 0) - (defmethod set-ignore-controller-in-bg! pc-settings ((obj pc-settings) (val symbol)) "sets whether or not to ignore controller inputs if the window is in the background" (set! (-> obj ignore-controller-win-unfocused?) val) @@ -650,7 +628,7 @@ "handle the text parsing input for the 'settings' group" (case-str *pc-temp-string* - (("fps") (set-frame-rate! obj (file-stream-read-int file))) + (("fps") (set-frame-rate! obj (file-stream-read-int file) #t)) (("window-size") (set! (-> obj win-width) (file-stream-read-int file)) (set! (-> obj win-height) (file-stream-read-int file)) @@ -673,7 +651,11 @@ (set-aspect! obj (-> obj aspect-custom-x) (-> obj aspect-custom-y)) ) ) - (("display-mode") (set-display-mode! obj (file-stream-read-symbol file))) + (("display-mode") + ;; force a display mode update + (set! (-> obj display-mode) #f) + (set-display-mode! obj (file-stream-read-symbol file) #t) + ) (("monitor") (set-monitor! obj (file-stream-read-int file))) (("letterbox") (set! (-> obj letterbox?) (file-stream-read-symbol file))) (("vsync") (set! (-> obj vsync?) (file-stream-read-symbol file))) @@ -697,6 +679,7 @@ (("ignore-controller-win-unfocused?") (set-ignore-controller-in-bg! obj (file-stream-read-symbol file))) (("controller-hp-led?") (set! (-> obj controller-hp-led?) (file-stream-read-symbol file))) (("controller-eco-led?") (set! (-> obj controller-eco-led?) (file-stream-read-symbol file))) + (("controller-heat-led?") (set! (-> obj controller-heat-led?) (file-stream-read-symbol file))) (("stick-deadzone") (set! (-> obj stick-deadzone) (file-stream-read-float file))) (("keyboard-enabled?") (set-enable-keyboard! obj (file-stream-read-symbol file))) (("mouse-enabled?") (set! (-> obj mouse-enabled?) (file-stream-read-symbol file))) @@ -726,45 +709,13 @@ (("third-camera-v-inverted?") (set! (-> obj third-camera-v-inverted?) (file-stream-read-symbol file))) (("music-fadein?") (set! (-> obj music-fadein?) (file-stream-read-symbol file))) (("music-fadeout?") (set! (-> obj music-fadeout?) (file-stream-read-symbol file))) - (("scenes-seen") - (dotimes (i PC_SPOOL_LOG_LENGTH) - (set! (-> obj scenes-seen i) (file-stream-read-int file)) - ) - ) - (("secrets") - (dosettings (file) - (case-str *pc-temp-string* - (("hard-rats?") (set! (-> obj secrets hard-rats?) (file-stream-read-symbol file))) - (("hero-mode?") (set! (-> obj secrets hero-mode?) (file-stream-read-symbol file))) - (("hud-map?") (set! (-> obj secrets hud-map?) (file-stream-read-symbol file))) - (("hud-counters?") (set! (-> obj secrets hud-counters?) (file-stream-read-symbol file))) - (("hud-watch?") (set! (-> obj secrets hud-watch?) (file-stream-read-symbol file))) - (("watch-12hr?") (set! (-> obj secrets watch-12hr?) (file-stream-read-symbol file))) - (("art") (set! (-> obj secrets art) (the-as pc-jak1-concept-art (file-stream-read-int file)))) - (("hard-fish-hiscore") (set! (-> obj secrets hard-fish-hiscore) (file-stream-read-int file))) - (("hard-rats-hiscore") (set! (-> obj secrets hard-rats-hiscore) (file-stream-read-int file))) - (("hard-rats-hiwave") (set! (-> obj secrets hard-rats-hiwave) (file-stream-read-int file))) - (("cheats") - (set! (-> obj cheats-known) (the pc-cheats (file-stream-read-int file))) - (set! (-> obj cheats) (logand (-> obj cheats-known) (file-stream-read-int file))) - ) - (("music") - (dotimes (i PC_MUSIC_LOG_LENGTH) - (when (!= #x29 (file-stream-get-next-char-ret file)) - (with-settings-scope (file) - (set! (-> obj secrets music i name) (file-stream-read-symbol file)) - (set! (-> obj secrets music i flava-mask) (file-stream-read-int file)) - ) - ) - ) - ) - ) - ) - ) + (("controller-led-brightness") (set! (-> obj controller-led-brightness) (file-stream-read-float file))) + (("controller-led-min-brightness") (set! (-> obj controller-led-min-brightness) (file-stream-read-float file))) + (("controller-led-max-brightness") (set! (-> obj controller-led-max-brightness) (file-stream-read-float file))) (("panic") (when (file-stream-read-symbol file) - (reset obj) - (set-display-mode! obj #f) + (reset obj #t) + (set-display-mode! obj #f #t) (return #f) ) ) @@ -785,18 +736,18 @@ (format file " (monitor ~D)~%" (-> obj monitor)) (format file " (letterbox ~A)~%" (-> obj letterbox?)) (format file " (vsync ~A)~%" (-> obj vsync?)) - (format file " (font-scale ~f)~%" (-> obj font-scale)) + ;(format file " (font-scale ~f)~%" (-> obj font-scale)) - (format file " (audio-latency-ms ~D)~%" (-> obj audio-latency-ms)) - (format file " (audio-pan-override ~f)~%" (-> obj audio-pan-override)) - (format file " (audio-volume-override ~f)~%" (-> obj audio-volume-override)) - (format file " (audio-channel-nb ~D)~%" (-> obj audio-channel-nb)) + ;(format file " (audio-latency-ms ~D)~%" (-> obj audio-latency-ms)) + ;(format file " (audio-pan-override ~f)~%" (-> obj audio-pan-override)) + ;(format file " (audio-volume-override ~f)~%" (-> obj audio-volume-override)) + ;(format file " (audio-channel-nb ~D)~%" (-> obj audio-channel-nb)) - (format file " (gfx-renderer ~D)~%" (-> obj gfx-renderer)) - (format file " (gfx-resolution ~f)~%" (-> obj gfx-resolution)) - (format file " (gfx-anisotropy ~f)~%" (-> obj gfx-anisotropy)) - (format file " (shrub-dist-mod ~f)~%" (-> obj shrub-dist-mod)) - (format file " (lod-dist-mod ~f)~%" (-> obj lod-dist-mod)) + ;(format file " (gfx-renderer ~D)~%" (-> obj gfx-renderer)) + ;(format file " (gfx-resolution ~f)~%" (-> obj gfx-resolution)) + ;(format file " (gfx-anisotropy ~f)~%" (-> obj gfx-anisotropy)) + ;(format file " (shrub-dist-mod ~f)~%" (-> obj shrub-dist-mod)) + ;(format file " (lod-dist-mod ~f)~%" (-> obj lod-dist-mod)) (format file " (lod-force-tfrag ~D)~%" (-> obj lod-force-tfrag)) (format file " (lod-force-tie ~D)~%" (-> obj lod-force-tie)) (format file " (lod-force-ocean ~D)~%" (-> obj lod-force-ocean)) @@ -805,6 +756,10 @@ (format file " (ignore-controller-win-unfocused? ~A)~%" (-> obj ignore-controller-win-unfocused?)) (format file " (controller-hp-led? ~A)~%" (-> obj controller-hp-led?)) (format file " (controller-eco-led? ~A)~%" (-> obj controller-eco-led?)) + (format file " (controller-heat-led? ~A)~%" (-> obj controller-heat-led?)) + (format file " (controller-led-brightness ~f)~%" (-> obj controller-led-brightness)) + (format file " (controller-led-min-brightness ~f)~%" (-> obj controller-led-min-brightness)) + (format file " (controller-led-max-brightness ~f)~%" (-> obj controller-led-max-brightness)) (format file " (stick-deadzone ~f)~%" (-> obj stick-deadzone)) (format file " (keyboard-enabled? ~A)~%" (-> obj keyboard-enabled?)) (format file " (mouse-enabled? ~A)~%" (-> obj mouse-enabled?)) @@ -834,41 +789,6 @@ (format file " (hinttitles? ~A)~%" (-> obj hinttitles?)) (format file " (game-language ~D)~%" (get-game-language obj)) (format file " (subtitle-speaker ~A)~%" (-> obj subtitle-speaker?)) - - #| - (format file " (scenes-seen") - (dotimes (i PC_SPOOL_LOG_LENGTH) - (if (zero? (mod i 16)) - (format file "~% ") - ) - (format file " ~D" (-> obj scenes-seen i)) - ) - (format file "~% )~%") - |# - - (format file " (secrets~%") - #| - (format file " (art #x~X)~%" (-> obj secrets art)) - (format file " (hard-rats? ~A)~%" (-> obj secrets hard-rats?)) - (format file " (hero-mode? ~A)~%" (-> obj secrets hero-mode?)) - (format file " (hud-map? ~A)~%" (-> obj secrets hud-map?)) - (format file " (hud-counters? ~A)~%" (-> obj secrets hud-counters?)) - (format file " (hard-fish-hiscore ~D)~%" (-> obj secrets hard-fish-hiscore)) - (format file " (hard-rats-hiscore ~D)~%" (-> obj secrets hard-rats-hiscore)) - (format file " (hard-rats-hiwave ~D)~%" (-> obj secrets hard-rats-hiwave)) - |# - (format file " (cheats #x~x #x~x)~%" (-> obj cheats-known) (-> obj cheats)) - - (format file " (music~%") - (dotimes (i PC_MUSIC_LOG_LENGTH) - (if (-> obj secrets music i name) - (format file " (~A #x~X)~%" (-> obj secrets music i name) (-> obj secrets music i flava-mask)) - ) - ) - - (format file " )~%") - - (format file " )~%") 0) (defmethod write-to-file pc-settings ((obj pc-settings) (filename string)) @@ -902,7 +822,7 @@ (format 0 "[PC] PC Settings found at '~S'...loading!~%" *pc-temp-string-1*) (unless (read-from-file obj *pc-temp-string-1*) (format 0 "[PC] PC Settings found at '~S' but could not be loaded, using defaults!~%" *pc-temp-string-1*) - (reset obj))) + (reset obj #t))) (format 0 "[PC] PC Settings not found at '~S'...initializing with defaults!~%" *pc-temp-string-1*)) 0) @@ -910,7 +830,7 @@ "make a new pc-settings" (let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size))))) ;; load defaults not covered by the file - (set-defaults! obj) + (reset obj #f) ;; if saved settings are corrupted or not found, the object will be fully reset to use all defaults (load-settings obj) ;; any post-operations that need to be done after loading diff --git a/goal_src/jak1/pc/pckernel-h.gc b/goal_src/jak1/pc/pckernel-h.gc index d8e3888941..553691501f 100644 --- a/goal_src/jak1/pc/pckernel-h.gc +++ b/goal_src/jak1/pc/pckernel-h.gc @@ -46,6 +46,8 @@ (defconstant PC_KERNEL_VER_REVISION (-> PC_KERNEL_VERSION revision)) (defconstant PC_KERNEL_VER_BUILD (-> PC_KERNEL_VERSION build)) +(defun-extern get-pckernel-version pckernel-version) + (defconstant PS2_VOICE_AMOUNT 48) (defconstant PC_VOICE_AMOUNT 256) @@ -57,6 +59,7 @@ (defconstant PC_BASE_HEIGHT 480) (defconstant PC_MIN_WIDTH 320) (defconstant PC_MIN_HEIGHT 240) +(defconstant PC_DEFAULT_MSAA 2) ;; how many entries the music log has. the game only has 21 tracks but let's have more space for no reason. @@ -82,13 +85,6 @@ -;; concept arts -(defenum pc-jak1-concept-art - :bitfield #t - :type uint64 - (test) - ) - ;; cheats (defconstant PC_CHEAT_MAX 18) ;; number of cheats (defenum pc-cheats @@ -125,23 +121,6 @@ :pack-me ) -;; secrets and goodies -(deftype pc-game-secrets (structure) - ((art pc-jak1-concept-art) ;; concept art unlocked - (music pc-music-log-entry PC_MUSIC_LOG_LENGTH :inline) - (hard-fish-hiscore int32) - (hard-rats? symbol) ;; enable this crap - (hard-rats-hiscore int32) - (hard-rats-hiwave int32) - (hero-mode? symbol) ;; unsure how this should work - (hud-map? symbol) ;; enable map in HUD/progress? - (hud-counters? symbol) ;; enable level orb counter/global buzzer counter? - (hud-watch? symbol) ;; a watch that tells the time of day! - (watch-12hr? symbol) ;; 12-hour clock toggle - ) - :pack-me - ) - ;; bingo integration. placeholder for now. (deftype pc-bingo-info (structure) () @@ -149,14 +128,6 @@ ) -;; a 64-byte C-string. not sure if we need this. -(deftype pc-cstring-64 (structure) - ((chars uint8 64) - (last uint8 :offset 63) - ) - ) - - ;; All of the configuration for the PC port in GOAL. Access things from here! ;; Includes some methods to change parameters. (deftype pc-settings (basic) @@ -198,8 +169,13 @@ ;; device settings (ignore-controller-win-unfocused? symbol) - (controller-hp-led? symbol) - (controller-eco-led? symbol) + (controller-hp-led? symbol) + (controller-eco-led? symbol) + (controller-heat-led? symbol) + (controller-led-brightness float) + (controller-led-min-brightness float) + (controller-led-max-brightness float) + (controller-led-color rgbaf :inline) (stick-deadzone float) ;; analog stick deadzone. 0-1 (keyboard-enabled? symbol) (mouse-enabled? symbol) @@ -252,10 +228,6 @@ (bingo pc-bingo-info :inline) ;; bingo integration. does nothing for now. - (secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets! - - (scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?) - (discord-rpc? symbol) ;; enable discord rich presence integration (speedrunner-mode? symbol) ;; enable speedrunner mode @@ -269,32 +241,28 @@ (:methods (new (symbol type) _type_) - (set-defaults! (_type_) none) - (set-defaults-input! (_type_) none) - (set-defaults-controller! (_type_) none) - (set-defaults-mouse! (_type_) none) (update (_type_) none) (update-from-os (_type_) none) (update-to-os (_type_) none) (update-discord-rpc (_type_) none) (update-speedrun (_type_) none) (update-video-hacks (_type_) object) - (reset (_type_) none) - (reset-audio (_type_) none) - (reset-input (_type_ symbol) none) - (reset-gfx (_type_) none) - (reset-ps2 (_type_) none) - (reset-misc (_type_) none) - (reset-original-camera (_type_) none) - (reset-extra (_type_) none) + (reset (_type_ symbol) int) + (reset-audio (_type_ symbol) int) + (reset-input (_type_ symbol symbol) int) + (reset-gfx (_type_ symbol) int) + (reset-ps2 (_type_ symbol) int) + (reset-misc (_type_ symbol) int) + (reset-camera (_type_ symbol) int) + (reset-extra (_type_ symbol) int) (print-debug-misc (_type_) object) (draw (_type_ dma-buffer) object) (draw-memory (_type_ dma-buffer) symbol) - (set-display-mode! (_type_ symbol) int) - (set-size! (_type_ int int) none) + (set-display-mode! (_type_ symbol symbol) int) + (set-size! (_type_ int int symbol) none) (set-aspect! (_type_ int int) none) (set-aspect-ratio! (_type_ float) none) - (set-frame-rate! (_type_ int) int) + (set-frame-rate! (_type_ int symbol) int) (set-monitor! (_type_ int) none) (set-game-setting! (_type_ symbol symbol) object) (get-game-setting (_type_ symbol) symbol) @@ -306,6 +274,8 @@ (write-to-file (_type_ string) symbol) (handle-input-settings (_type_ file-stream) object) (handle-output-settings (_type_ file-stream) object) + (led-enabled? (_type_) symbol) + (update-led (_type_) symbol) (update-cheats (_type_) int) (update-music-log (_type_) int) (add-to-music-log (_type_ symbol int) int) @@ -317,7 +287,7 @@ ) ) -(defconstant PC_TEMP_STRING_LEN 512) +(defconstant PC_TEMP_STRING_LEN 1024) (define *pc-temp-string* (new 'global 'string PC_TEMP_STRING_LEN (the string #f))) (define *pc-temp-string-1* (new 'global 'string 2048 (the string #f))) @@ -339,83 +309,20 @@ ;;;; resets ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defmethod set-defaults-input! pc-settings ((obj pc-settings)) - "Set default general input settings" - (set! (-> obj keyboard-enabled?) #t) - (set! (-> obj mouse-enabled?) #f) - (set! (-> obj auto-hide-cursor?) #t) - (none)) -(defmethod set-defaults-controller! pc-settings ((obj pc-settings)) - "Set default controller settings" - (set! (-> obj ignore-controller-win-unfocused?) #f) - (set! (-> obj controller-hp-led?) #f) - (set! (-> obj controller-eco-led?) #f) - (set! (-> obj stick-deadzone) 0.3) - (none)) - -(defmethod set-defaults-mouse! pc-settings ((obj pc-settings)) - "Set default mouse settings" - (set! (-> obj mouse-camera?) #f) - (set! (-> obj mouse-xsens) -15.0) - (set! (-> obj mouse-ysens) 10.0) - (set! (-> obj mouse-movement?) #f) - (none)) - -(defmethod set-defaults! pc-settings ((obj pc-settings)) - "Set default settings for the object that aren't handled by the file reading, - this is intended to be called upon object creation. - - This is to avoid propagating events to the runtime informing it needs to make changes on startup - when there really is no changes to be made. ie. changing the window size multiple times when ultimately - the true value is within the file that we are about to read. - - TODO - it would probably be a lot cleaner to have one struct for the file, and another for settings that - are manipulated at runtime so there is a clear separation of responsibilities" - ;; top level settings - (set! (-> obj user) #f) - (set! (-> obj debug?) #f) - (set! (-> obj movie?) #f) - (set! (-> obj font-scale) 1.0) - (set! (-> obj aspect-custom-x) 4) - (set! (-> obj aspect-custom-y) 3) - (set! (-> obj discord-rpc?) #t) - (set! (-> obj speedrunner-mode?) #f) - ;; graphics - (set! (-> obj target-fps) 60) - (set! (-> obj aspect-ratio-auto?) #t) - (set! (-> obj win-width) PC_BASE_WIDTH) - (set! (-> obj win-height) PC_BASE_HEIGHT) - ;; audio - ;; input - (set-defaults-input! obj) - (set-defaults-controller! obj) - (set-defaults-mouse! obj) - ;; ps2 - ;; misc - ;; extra - (dotimes (i PC_SPOOL_LOG_LENGTH) (set! (-> obj scenes-seen i) 0)) - (set! (-> obj secrets art) (pc-jak1-concept-art)) - (set! (-> obj secrets hard-fish-hiscore) 0) - (set! (-> obj secrets hard-rats-hiscore) 0) - (set! (-> obj secrets hard-rats-hiwave) 0) - (set! (-> obj secrets hard-rats?) #f) - (set! (-> obj secrets hero-mode?) #f) - (set! (-> obj secrets hud-map?) #t) - (set! (-> obj secrets hud-counters?) #t) - (set! (-> obj secrets hud-watch?) #f) - (set! (-> obj secrets watch-12hr?) #f) - (none) -) - - -(defmethod reset pc-settings ((obj pc-settings)) - "Reset back to default settings" +(defmethod reset pc-settings ((obj pc-settings) (call-handlers symbol)) + "Reset everything back to default settings + + If call-handlers = #t then events will be sent to the runtime kernel to update OS settings + such as window size, etc. + If you just want to set the settings and handle the fields yourself later, set call-handlers to #f + such as if you're setting the initial values right before reading the settings file that changes them." (format 0 "pc settings reset~%") - (set! (-> obj version) PC_KERNEL_VERSION) + (set! (-> obj version) (get-pckernel-version)) + (set! (-> obj os) (pc-get-os)) (set! (-> obj user) #f) (set! (-> obj debug?) #f) (set! (-> obj movie?) #f) @@ -425,40 +332,39 @@ (set! (-> obj discord-rpc?) #t) (set! (-> obj speedrunner-mode?) #f) - (reset-gfx obj) - (reset-audio obj) - (reset-input obj 'all) - (reset-ps2 obj) - (reset-misc obj) - (reset-extra obj) + (reset-gfx obj call-handlers) + (reset-audio obj call-handlers) + (reset-input obj 'all call-handlers) + (reset-ps2 obj call-handlers) + (reset-misc obj call-handlers) + (reset-extra obj call-handlers) - (none)) + 0) -(defmethod reset-gfx pc-settings ((obj pc-settings)) +(defmethod reset-gfx pc-settings ((obj pc-settings) (call-handlers symbol)) "Set the default graphics settings" - (set-frame-rate! obj 60) + ;; temporarily "set" to windowed so we can change window size + ;; we set our actual target display mode later. + (set! (-> obj display-mode) 'windowed) + (set-size! obj PC_BASE_WIDTH PC_BASE_HEIGHT #f) + (set-aspect! obj 4 3) - (set-display-mode! obj 'windowed) - (set-size! obj PC_BASE_WIDTH PC_BASE_HEIGHT) + (set-frame-rate! obj 60 call-handlers) (set! (-> obj use-vis?) #f) (set! (-> obj aspect-ratio-auto?) #t) (set! (-> obj vsync?) #t) (set! (-> obj letterbox?) #t) - ;; TODO - why do we change the windowed mode twice - ;; - apparently done to simplify changing the resolution, consider simplifying this so - ;; the code is more obvious / easier to understand at first glance - ;; (also reduces flickering of changing between modes) + ;; get screen size and set to borderless at screen res (pc-get-active-display-size (&-> obj width) (&-> obj height)) - (set-display-mode! obj 'borderless) - (set! (-> obj gfx-msaa) 2) ;; 2x msaa + (set-display-mode! obj 'borderless call-handlers) + (set! (-> obj gfx-msaa) PC_DEFAULT_MSAA) ;; default msaa + 0) - (none)) - -(defmethod reset-audio pc-settings ((obj pc-settings)) +(defmethod reset-audio pc-settings ((obj pc-settings) (call-handlers symbol)) "Set the default audio settings" (set! (-> obj audio-latency-ms) 80) @@ -468,17 +374,37 @@ (set! (-> obj music-fadeout?) #t) (set! (-> obj music-fadein?) #t) + 0) - (none)) - -(defmethod reset-input pc-settings ((obj pc-settings) (device symbol)) +(defmethod reset-input pc-settings ((obj pc-settings) (device symbol) (call-handlers symbol)) "Set the default input settings" - (set! (-> obj controller-hp-led?) #f) - (set! (-> obj controller-eco-led?) #f) - (set! (-> obj stick-deadzone) 0.3) - (none)) -(defmethod reset-ps2 pc-settings ((obj pc-settings)) + (when (or (= device 'all) (= device 'controller)) + (set! (-> obj ignore-controller-win-unfocused?) #f) + (set! (-> obj controller-hp-led?) #t) + (set! (-> obj controller-eco-led?) #t) + (set! (-> obj controller-heat-led?) #t) + (set! (-> obj stick-deadzone) 0.3) + (set! (-> obj controller-led-brightness) 1.0) + (set! (-> obj controller-led-min-brightness) 0.25) + (set! (-> obj controller-led-max-brightness) 1.0) + ) + + (when (or (= device 'all) (= device 'input)) + (set! (-> obj keyboard-enabled?) #t) + (set! (-> obj mouse-enabled?) #f) + (set! (-> obj auto-hide-cursor?) #t) + ) + + (when (or (= device 'all) (= device 'mouse)) + (set! (-> obj mouse-camera?) #f) + (set! (-> obj mouse-xsens) -15.0) + (set! (-> obj mouse-ysens) 10.0) + (set! (-> obj mouse-movement?) #f) + ) + 0) + +(defmethod reset-ps2 pc-settings ((obj pc-settings) (call-handlers symbol)) "Set the default ps2 settings" (set! (-> obj ps2-read-speed?) #f) @@ -495,51 +421,32 @@ (set! (-> obj lod-force-tie) 0) (set! (-> obj lod-force-ocean) 0) (set! (-> obj lod-force-actor) 0) - (none)) + 0) -(defmethod reset-misc pc-settings ((obj pc-settings)) +(defmethod reset-misc pc-settings ((obj pc-settings) (call-handlers symbol)) "Set the default misc settings" (set! (-> obj force-actors?) #f) (set! (-> obj hinttitles?) #t) (set! (-> obj subtitle-speaker?) 'auto) - (reset-original-camera obj) - (none)) + (reset-camera obj call-handlers) + 0) -(defmethod reset-original-camera pc-settings ((obj pc-settings)) +(defmethod reset-camera pc-settings ((obj pc-settings) (call-handlers symbol)) "Set the original game's camera controls" (set! (-> obj first-camera-h-inverted?) #f) ;; first-person horizontal is NOT inverted in original game (set! (-> obj first-camera-v-inverted?) #t) ;; first-person vertical IS inverted in original game (set! (-> obj third-camera-h-inverted?) #t) ;; third person horizontal IS inverted in original game (set! (-> obj third-camera-v-inverted?) #t) ;; third-person vertical IS inverted in original game - (none)) + 0) -(defmethod reset-extra pc-settings ((obj pc-settings)) +(defmethod reset-extra pc-settings ((obj pc-settings) (call-handlers symbol)) "Set the default goodies settings" - (dotimes (i PC_SPOOL_LOG_LENGTH) - (set! (-> obj scenes-seen i) 0) - ) - (dotimes (i PC_MUSIC_LOG_LENGTH) - (set! (-> obj secrets music i name) #f) - (set! (-> obj secrets music i flava-mask) 0) - ) - - (set! (-> obj secrets art) (pc-jak1-concept-art)) - (set! (-> obj secrets hard-fish-hiscore) 0) - (set! (-> obj secrets hard-rats-hiscore) 0) - (set! (-> obj secrets hard-rats-hiwave) 0) - (set! (-> obj secrets hard-rats?) #f) - (set! (-> obj secrets hero-mode?) #f) - (set! (-> obj secrets hud-map?) #t) - (set! (-> obj secrets hud-counters?) #t) - (set! (-> obj secrets hud-watch?) #f) - (set! (-> obj secrets watch-12hr?) #f) - (set! (-> obj cheats) (pc-cheats)) (set! (-> obj cheats-known) (pc-cheats)) - (none)) + 0) (defmacro with-pc (&rest body) "encapsulates the code around PC-specific checks" @@ -611,7 +518,15 @@ ,(if (< i (- (length buttons) 1)) `(1+! ,cheat-var) - `(begin ,@body (set! ,cheat-var 0)) + `(begin + (cond + ((-> *pc-settings* speedrunner-mode?) + (sound-play "cursor-options")) + (else + ,@body) + ) + (set! ,cheat-var 0) + ) ) (set! ,cheat-var 0) diff --git a/goal_src/jak1/pc/pckernel-impl.gc b/goal_src/jak1/pc/pckernel-impl.gc index e33ffec99d..1689cf4a5d 100644 --- a/goal_src/jak1/pc/pckernel-impl.gc +++ b/goal_src/jak1/pc/pckernel-impl.gc @@ -46,6 +46,30 @@ (custom 999) ;; temp ) +;; concept arts +(defenum pc-jak1-concept-art + :bitfield #t + :type uint64 + (test) + ) + +;; secrets and goodies +(deftype pc-game-secrets (structure) + ((art pc-jak1-concept-art) ;; concept art unlocked + (music pc-music-log-entry PC_MUSIC_LOG_LENGTH :inline) + (hard-fish-hiscore int32) + (hard-rats? symbol) ;; enable this crap + (hard-rats-hiscore int32) + (hard-rats-hiwave int32) + (hero-mode? symbol) ;; unsure how this should work + (hud-map? symbol) ;; enable map in HUD/progress? + (hud-counters? symbol) ;; enable level orb counter/global buzzer counter? + (hud-watch? symbol) ;; a watch that tells the time of day! + (watch-12hr? symbol) ;; 12-hour clock toggle + ) + :pack-me + ) + ;; The Jak 1 version of the pc-settings object. (deftype pc-settings-jak1 (pc-settings) ( @@ -55,6 +79,10 @@ (subtitle-language pc-language) ;; language for subtitles (money-starburst? symbol) ;; add a starburst to the money (extra-hud? symbol) ;; extra hud elements. + + (secrets pc-game-secrets :inline) ;; hidden goodies and additional secrets! + + (scenes-seen uint8 PC_SPOOL_LOG_LENGTH) ;; cutscenes that have been seen, by spool-anim (maybe use 8-char name or bits instead?) ) ) @@ -96,10 +124,10 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defmethod reset-misc pc-settings-jak1 ((obj pc-settings-jak1)) +(defmethod reset-misc pc-settings-jak1 ((obj pc-settings-jak1) (call-handlers symbol)) "Set the default misc settings" - ((method-of-type pc-settings reset-misc) obj) + ((method-of-type pc-settings reset-misc) obj call-handlers) (set! (-> obj text-language) (the pc-language (scf-get-language))) (set! (-> obj subtitle-language) (the pc-language (scf-get-language))) (set! (-> obj skip-movies?) #t) @@ -117,7 +145,32 @@ )) (set! (-> obj money-starburst?) #f) (set! (-> obj extra-hud?) #f) - (none)) + 0) + +(defmethod reset-extra pc-settings-jak1 ((obj pc-settings-jak1) (call-handlers symbol)) + "Set the default goodies settings" + + ((method-of-type pc-settings reset-extra) obj call-handlers) + + (dotimes (i PC_SPOOL_LOG_LENGTH) + (set! (-> obj scenes-seen i) 0) + ) + (dotimes (i PC_MUSIC_LOG_LENGTH) + (set! (-> obj secrets music i name) #f) + (set! (-> obj secrets music i flava-mask) 0) + ) + + (set! (-> obj secrets art) (pc-jak1-concept-art)) + (set! (-> obj secrets hard-fish-hiscore) 0) + (set! (-> obj secrets hard-rats-hiscore) 0) + (set! (-> obj secrets hard-rats-hiwave) 0) + (set! (-> obj secrets hard-rats?) #f) + (set! (-> obj secrets hero-mode?) #f) + (set! (-> obj secrets hud-map?) #t) + (set! (-> obj secrets hud-counters?) #t) + (set! (-> obj secrets hud-watch?) #f) + (set! (-> obj secrets watch-12hr?) #f) + 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; other @@ -126,28 +179,3 @@ (defun get-video-params () *video-parms*) -(defun set-reactive-controller-led! ((current-hp float) (eco-level float) (eco-kind int)) - ;; Apply LED color based on HP if enabled and if eco is not active - (when (and (= eco-level 0.0) (-> *pc-settings* controller-hp-led?)) - (case current-hp - ((0.0) - (pc-set-controller-led! 0 255 0 0)) - ((1.0) - (pc-set-controller-led! 0 255 127 0)) - ((2.0) - (pc-set-controller-led! 0 255 255 0)) - ((3.0) - (pc-set-controller-led! 0 0 255 0)))) - ;; Otherwise apply LED color based on eco if enabled - (when (and (!= eco-level 0.0) (-> *pc-settings* controller-eco-led?)) - (case eco-kind - ((2) - (pc-set-controller-led! 0 255 0 0)) - ((3) - (pc-set-controller-led! 0 0 0 255)) - ((1) - (pc-set-controller-led! 0 255 255 0)) - ((4) - (pc-set-controller-led! 0 0 255 0)))) - (none) -) diff --git a/goal_src/jak1/pc/pckernel.gc b/goal_src/jak1/pc/pckernel.gc index e30f47c7ef..124c893167 100644 --- a/goal_src/jak1/pc/pckernel.gc +++ b/goal_src/jak1/pc/pckernel.gc @@ -321,6 +321,155 @@ ) ) +(defmethod led-enabled? pc-settings-jak1 ((obj pc-settings-jak1)) + "should the controller led be set?" + (or (-> obj controller-hp-led?) + (-> obj controller-eco-led?) + (-> obj controller-heat-led?))) + +(defmethod update-led pc-settings-jak1 ((obj pc-settings-jak1)) + "set the controller led color by modifying the controller-led-color vector" + + ;; default color is just blue. + (set! (-> obj controller-led-color r) 0.0) + (set! (-> obj controller-led-color g) 0.0) + (set! (-> obj controller-led-color b) 1.0) + + (when *target* + (let ((set-no-eco-color? #t)) + (when (-> obj controller-hp-led?) + ;; flicker led according to hp. lower hp = faster and more intense flicker + (cond + ((= (-> *target* fact-info-target health) 0.0) + ;; dead. just set to minimum brightness. + (set! (-> obj controller-led-color a) (-> obj controller-led-min-brightness)) + ) + (else + (let ((flicker-speed (lerp-scale 2.0 0.0 + (-> *target* fact-info-target health) + 1.0 (-> *FACT-bank* health-max-default))) + (flicker-amp (lerp-scale (- 1.0 (-> obj controller-led-min-brightness)) (- 1.0 (-> obj controller-led-max-brightness)) + (-> *target* fact-info-target health) + 1.0 (-> *FACT-bank* health-max-default))) + ) + (set! (-> obj controller-led-color a) (- 1.0 (* flicker-amp (/ (+ 1.0 (sin (* flicker-speed (degrees (-> *display* game-frame-counter))))) 2.0)))) + ) + ) + ) + ) + + (when (and (-> obj controller-heat-led?) + (nonzero? (-> *target* racer)) + (logtest? (-> *target* control root-prim prim-core action) (collide-action ca-9)) + (or (= (-> *target* current-level name) 'lavatube) + (= (-> *target* current-level name) 'firecanyon) + (= (-> *target* current-level name) 'citadel))) + (defun-extern zoomer-heat-slice-color matrix float none) + (defun-extern zoomer-get-heat float) + (defun-extern zoomer-get-heat-max float) + (let ((temp-mtx (new-stack-matrix0)) + (heat (/ (zoomer-get-heat) (zoomer-get-heat-max)))) + (zoomer-heat-slice-color temp-mtx heat) + (when (< 0.0 heat) + (set! (-> obj controller-led-color r) (/ (-> temp-mtx vector 2 x) 128.0)) + (set! (-> obj controller-led-color g) (/ (-> temp-mtx vector 2 y) 128.0)) + (set! (-> obj controller-led-color b) (/ (-> temp-mtx vector 2 z) 128.0)) + (false! set-no-eco-color?)) + ) + ) + + (when (-> obj controller-eco-led?) + ;; get remaining eco as a number from 0.0 to 1.0 + (let ((eco-remain-fac (/ (the float (- (-> *target* fact-info-target eco-timeout) (- (-> *display* game-frame-counter) (-> *target* fact-info-target eco-pickup-time)))) + (the float (-> *FACT-bank* eco-full-timeout))))) + (when set-no-eco-color? + (set! (-> obj controller-led-color r) 1.0) + (set! (-> obj controller-led-color g) 1.0) + (set! (-> obj controller-led-color b) 1.0)) + ;; dont set eco color if we don't have eco. + (when (< 0.0 eco-remain-fac) + ;; set color according to eco type. matches the color in the meter! + (case (-> *target* fact-info-target eco-type) + (((pickup-type eco-blue)) + (set! (-> obj controller-led-color r) 0.0) + (set! (-> obj controller-led-color g) 0.5) + (set! (-> obj controller-led-color b) 1.0) + ) + (((pickup-type eco-yellow)) + (set! (-> obj controller-led-color r) 1.0) + (set! (-> obj controller-led-color g) 0.75) + (set! (-> obj controller-led-color b) 0.0) + ) + (((pickup-type eco-red)) + (set! (-> obj controller-led-color r) 1.0) + (set! (-> obj controller-led-color g) 0.25) + (set! (-> obj controller-led-color b) 0.0) + ) + (((pickup-type eco-green)) + (set! (-> obj controller-led-color r) 0.0) + (set! (-> obj controller-led-color g) 1.0) + (set! (-> obj controller-led-color b) 0.25) + ) + ) + ;; less than 20% eco remaining, so we flash. same as eco meter. + (when (and (< eco-remain-fac 0.2) + (zero? (logand (the int (* DISPLAY_FPS_RATIO (-> *display* integral-frame-counter))) 4))) + (*! (-> obj controller-led-color g) 2.0) + ) + ) + )) + )) + #t) + + +(defun find-music-log ((music symbol)) + "return #t if the given music is logged into the *pc-settings*, #f otherwise." + (dotimes (i PC_MUSIC_LOG_LENGTH) + (if (= music (-> *pc-settings* secrets music i name)) + (return #t))) + #f) + +(defun find-flava-log ((music symbol) (flava-idx int)) + "return #t if the given music's flava is logged into the *pc-settings*, #f otherwise." + (dotimes (i PC_MUSIC_LOG_LENGTH) + (if (= music (-> *pc-settings* secrets music i name)) + (return (logtest? (-> *pc-settings* secrets music i flava-mask) (ash 1 flava-idx))))) + #f) + +(defun-debug print-music-log ((out object)) + "prints the *pc-settings* music log." + + (dotimes (i PC_MUSIC_LOG_LENGTH) + (if (-> *pc-settings* secrets music i name) + (format out "music log ~D: ~A (f #x~x)~%" i (-> *pc-settings* secrets music i name) (-> *pc-settings* secrets music i flava-mask))) + ) + + 0) + +(defmethod add-to-music-log pc-settings-jak1 ((obj pc-settings-jak1) (music symbol) (flava int)) + "add music and flava information to the music log. + if music already exists, adds flava. if flava already exists, nothing happens." + + ;; go through our music log + (dotimes (i PC_MUSIC_LOG_LENGTH) + (cond + ;; an empty log entry! place the currently playing music there, and fill flava. + ((not (-> obj secrets music i name)) + (set! (-> obj secrets music i name) music) + (set! (-> obj secrets music i flava-mask) (ash 1 flava)) + (return 0) + ) + ;; an existing log entry for the current music. fill flava. + ((= music (-> obj secrets music i name)) + (logior! (-> obj secrets music i flava-mask) (ash 1 flava)) + (return 0) + ) + ;; something else. maybe the wrong entry, in which case nothing to do. + ) + ) + + 0) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -339,6 +488,41 @@ (("subtitles?") (set! (-> obj subtitles?) (file-stream-read-symbol file))) (("subtitle-language") (set! (-> obj subtitle-language) (the-as pc-language (file-stream-read-int file)))) (("text-language") (set! (-> obj text-language) (the-as pc-language (file-stream-read-int file)))) + (("scenes-seen") + (dotimes (i PC_SPOOL_LOG_LENGTH) + (set! (-> obj scenes-seen i) (file-stream-read-int file)) + ) + ) + (("secrets") + (dosettings (file) + (case-str *pc-temp-string* + (("hard-rats?") (set! (-> obj secrets hard-rats?) (file-stream-read-symbol file))) + (("hero-mode?") (set! (-> obj secrets hero-mode?) (file-stream-read-symbol file))) + (("hud-map?") (set! (-> obj secrets hud-map?) (file-stream-read-symbol file))) + (("hud-counters?") (set! (-> obj secrets hud-counters?) (file-stream-read-symbol file))) + (("hud-watch?") (set! (-> obj secrets hud-watch?) (file-stream-read-symbol file))) + (("watch-12hr?") (set! (-> obj secrets watch-12hr?) (file-stream-read-symbol file))) + (("art") (set! (-> obj secrets art) (the-as pc-jak1-concept-art (file-stream-read-int file)))) + (("hard-fish-hiscore") (set! (-> obj secrets hard-fish-hiscore) (file-stream-read-int file))) + (("hard-rats-hiscore") (set! (-> obj secrets hard-rats-hiscore) (file-stream-read-int file))) + (("hard-rats-hiwave") (set! (-> obj secrets hard-rats-hiwave) (file-stream-read-int file))) + (("cheats") + (set! (-> obj cheats-known) (the pc-cheats (file-stream-read-int file))) + (set! (-> obj cheats) (logand (-> obj cheats-known) (file-stream-read-int file))) + ) + (("music") + (dotimes (i PC_MUSIC_LOG_LENGTH) + (when (!= #x29 (file-stream-get-next-char-ret file)) + (with-settings-scope (file) + (set! (-> obj secrets music i name) (file-stream-read-symbol file)) + (set! (-> obj secrets music i flava-mask) (file-stream-read-int file)) + ) + ) + ) + ) + ) + ) + ) ) 0) @@ -352,6 +536,41 @@ (format file " (subtitles? ~A)~%" (-> obj subtitles?)) (format file " (subtitle-language ~D)~%" (-> obj subtitle-language)) (format file " (text-language ~D)~%" (-> obj text-language)) + + #| + (format file " (scenes-seen") + (dotimes (i PC_SPOOL_LOG_LENGTH) + (if (zero? (mod i 16)) + (format file "~% ") + ) + (format file " ~D" (-> obj scenes-seen i)) + ) + (format file "~% )~%") + |# + + (format file " (secrets~%") + #| + (format file " (art #x~X)~%" (-> obj secrets art)) + (format file " (hard-rats? ~A)~%" (-> obj secrets hard-rats?)) + (format file " (hero-mode? ~A)~%" (-> obj secrets hero-mode?)) + (format file " (hud-map? ~A)~%" (-> obj secrets hud-map?)) + (format file " (hud-counters? ~A)~%" (-> obj secrets hud-counters?)) + (format file " (hard-fish-hiscore ~D)~%" (-> obj secrets hard-fish-hiscore)) + (format file " (hard-rats-hiscore ~D)~%" (-> obj secrets hard-rats-hiscore)) + (format file " (hard-rats-hiwave ~D)~%" (-> obj secrets hard-rats-hiwave)) + |# + (format file " (cheats #x~x #x~x)~%" (-> obj cheats-known) (-> obj cheats)) + + (format file " (music~%") + (dotimes (i PC_MUSIC_LOG_LENGTH) + (if (-> obj secrets music i name) + (format file " (~A #x~X)~%" (-> obj secrets music i name) (-> obj secrets music i flava-mask)) + ) + ) + + (format file " )~%") + + (format file " )~%") 0) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/goal_src/jak1/pc/progress-pc.gc b/goal_src/jak1/pc/progress-pc.gc index 151b8767cb..b5d57a434b 100644 --- a/goal_src/jak1/pc/progress-pc.gc +++ b/goal_src/jak1/pc/progress-pc.gc @@ -183,7 +183,7 @@ (new 'static 'game-option :option-type (game-option-type normal-inverted) :name (text-id camera-controls-third-horz) :scale #t) (new 'static 'game-option :option-type (game-option-type normal-inverted) :name (text-id camera-controls-third-vert) :scale #t) (new 'static 'game-option :option-type (game-option-type confirmation) :name (text-id restore-defaults) :scale #t - :on-confirm (lambda () (reset-original-camera *pc-settings*) (none))) + :on-confirm (lambda () (reset-camera *pc-settings* #t) (none))) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t))) (define *controller-options* (new 'static 'boxed-array :type game-option @@ -200,9 +200,11 @@ :option-disabled-func (lambda () (not (pc-current-controller-has-led?)))) (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id input-opts-controller-led-reflect-eco) :scale #t :option-disabled-func (lambda () (not (pc-current-controller-has-led?)))) + (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id input-opts-controller-led-reflect-heat) :scale #t + :option-disabled-func (lambda () (not (pc-current-controller-has-led?)))) (new 'static 'game-option :option-type (game-option-type confirmation) :name (text-id restore-defaults) :scale #t :on-confirm (lambda () - (set-defaults-controller! *pc-settings*) + (reset-input *pc-settings* 'controller #t) (set-ignore-controller-in-bg! *pc-settings* (-> *pc-settings* ignore-controller-win-unfocused?)) (none))) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t))) @@ -234,7 +236,7 @@ (none)))) (new 'static 'game-option :option-type (game-option-type confirmation) :name (text-id restore-defaults) :scale #t :on-confirm (lambda () - (set-defaults-mouse! *pc-settings*) + (reset-input *pc-settings* 'mouse #t) (update-mouse-controls! *pc-settings*) (none))) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t))) @@ -274,7 +276,7 @@ (new 'static 'game-option :option-type (game-option-type menu) :name (text-id input-opts-reassign-binds) :scale #t :param3 (game-option-menu reassign-binds-options)) (new 'static 'game-option :option-type (game-option-type confirmation) :name (text-id restore-defaults) :scale #t :on-confirm (lambda () - (set-defaults-input! *pc-settings*) + (reset-input *pc-settings* 'input #t) (set-enable-keyboard! *pc-settings* (-> *pc-settings* keyboard-enabled?)) (update-mouse-controls! *pc-settings*) (none))) @@ -289,17 +291,12 @@ ) ) -;; TODO - this menu isn't used anywhere right now, should probably be removed -(define *accessibility-options* (new 'static 'boxed-array :type game-option - (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id money-starburst) :scale #t) - (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t))) - (define *gfx-ps2-options* (new 'static 'boxed-array :type game-option (new 'static 'game-option :option-type (game-option-type lod-bg) :name (text-id lod-bg) :scale #t) (new 'static 'game-option :option-type (game-option-type lod-fg) :name (text-id lod-fg) :scale #t) (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id ps2-parts) :scale #t) (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id force-envmap) :scale #t) - ;(new 'static 'game-option :option-type (game-option-type on-off) :name (text-id force-actors) :scale #t) + (new 'static 'game-option :option-type (game-option-type on-off) :name (text-id force-actors) :scale #t) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t) ) ) @@ -923,12 +920,11 @@ (set! (-> *options-remap* (progress-screen mouse-options)) *mouse-options*) (set! (-> *options-remap* (progress-screen reassign-binds-options)) *reassign-binds-options*) (set! (-> *options-remap* (progress-screen select-controller)) *temp-options*) - (set! (-> *options-remap* (progress-screen controller-binds)) *temp-options*) - (set! (-> *options-remap* (progress-screen keyboard-binds)) *temp-options*) - (set! (-> *options-remap* (progress-screen mouse-binds)) *temp-options*) + (set! (-> *options-remap* (progress-screen controller-binds)) *temp-options*) + (set! (-> *options-remap* (progress-screen keyboard-binds)) *temp-options*) + (set! (-> *options-remap* (progress-screen mouse-binds)) *temp-options*) (set! (-> *options-remap* (progress-screen misc-options)) *misc-options*) - (set! (-> *options-remap* (progress-screen accessibility-options)) *accessibility-options*) (set! (-> *options-remap* (progress-screen gfx-ps2-options)) *gfx-ps2-options*) (set! (-> *options-remap* (progress-screen resolution)) *temp-options*) (set! (-> *options-remap* (progress-screen aspect-ratio)) *aspect-ratio-options*) @@ -1001,6 +997,7 @@ (set! (-> *controller-options* 3 value-to-modify) (&-> *pc-settings* ignore-controller-win-unfocused?)) (set! (-> *controller-options* 4 value-to-modify) (&-> *pc-settings* controller-hp-led?)) (set! (-> *controller-options* 5 value-to-modify) (&-> *pc-settings* controller-eco-led?)) + (set! (-> *controller-options* 6 value-to-modify) (&-> *pc-settings* controller-heat-led?)) (set! (-> *mouse-options* 0 value-to-modify) (&-> *pc-settings* mouse-camera?)) (set! (-> *mouse-options* 1 value-to-modify) (&-> *pc-settings* mouse-xsens)) @@ -1011,13 +1008,11 @@ (set! (-> *input-options* 3 value-to-modify) (&-> *pc-settings* mouse-enabled?)) (set! (-> *input-options* 5 value-to-modify) (&-> *pc-settings* auto-hide-cursor?)) - (set! (-> *accessibility-options* 0 value-to-modify) (&-> *pc-settings* money-starburst?)) - (set! (-> *gfx-ps2-options* 0 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *gfx-ps2-options* 1 value-to-modify) (&-> *progress-carousell* int-backup)) (set! (-> *gfx-ps2-options* 2 value-to-modify) (&-> *pc-settings* ps2-parts?)) (set! (-> *gfx-ps2-options* 3 value-to-modify) (&-> *pc-settings* force-envmap?)) - ;(set! (-> *gfx-ps2-options* 3 value-to-modify) (&-> *pc-settings* force-actors?)) + (set! (-> *gfx-ps2-options* 4 value-to-modify) (&-> *pc-settings* force-actors?)) (set! (-> *sound-options-pc* 0 value-to-modify) (&-> *setting-control* default sfx-volume)) (set! (-> *sound-options-pc* 1 value-to-modify) (&-> *setting-control* default music-volume)) @@ -1613,7 +1608,7 @@ ;; resolution button. change resolution! (let ((newx (the int (-> options (-> obj option-index) param1))) (newy (the int (-> options (-> obj option-index) param2)))) - (set-size! *pc-settings* newx newy)) + (set-size! *pc-settings* newx newy #t)) (cpad-clear! 0 x) (cpad-clear! 0 circle) (sound-play "cursor-options") @@ -1833,9 +1828,9 @@ (((game-option-type display-mode)) ;; same thing. (case (-> *progress-carousell* int-backup) - ((0) (set-display-mode! *pc-settings* 'windowed)) - ((1) (set-display-mode! *pc-settings* 'fullscreen)) - ((2) (set-display-mode! *pc-settings* 'borderless)) + ((0) (set-display-mode! *pc-settings* 'windowed #t)) + ((1) (set-display-mode! *pc-settings* 'fullscreen #t)) + ((2) (set-display-mode! *pc-settings* 'borderless #t)) ) ) (((game-option-type msaa)) @@ -1882,9 +1877,9 @@ ) (((game-option-type frame-rate)) (case (-> *progress-carousell* int-backup) - ((0) (set-frame-rate! *pc-settings* 60)) - ((1) (set-frame-rate! *pc-settings* 100)) - ((2) (set-frame-rate! *pc-settings* 150)) + ((0) (set-frame-rate! *pc-settings* 60 #t)) + ((1) (set-frame-rate! *pc-settings* 100 #t)) + ((2) (set-frame-rate! *pc-settings* 150 #t)) ) (set-video-mode (-> *setting-control* default video-mode)) ) @@ -2762,7 +2757,6 @@ (progress-screen settings-title) (progress-screen title) (progress-screen sound-settings) - (progress-screen accessibility-options) (progress-screen game-ps2-options) (progress-screen resolution) (progress-screen aspect-ratio) diff --git a/goal_src/jak2/characters/baron_errol_metalkor/metalkor-texture.gc b/goal_src/jak2/characters/baron_errol_metalkor/metalkor-texture.gc index b208ae4875..62c9f20f6b 100644 --- a/goal_src/jak2/characters/baron_errol_metalkor/metalkor-texture.gc +++ b/goal_src/jak2/characters/baron_errol_metalkor/metalkor-texture.gc @@ -12,7 +12,7 @@ (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim :num-layers #x5 - :func 'metkor-texture-anim-func + :func-id 'metkor-texture-anim-func :init-func #f :tex #f :tex-name "squid-env-rim-dest" @@ -24,7 +24,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -46,7 +46,7 @@ :end-st-rot (degrees 3932160.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -67,7 +67,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -89,7 +89,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -111,7 +111,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 diff --git a/goal_src/jak2/engine/camera/cam-update.gc b/goal_src/jak2/engine/camera/cam-update.gc index 3b348c98d6..ffbf1a91dd 100644 --- a/goal_src/jak2/engine/camera/cam-update.gc +++ b/goal_src/jak2/engine/camera/cam-update.gc @@ -199,7 +199,7 @@ (let ((s4-1 (-> s5-2 bsp current-leaf-idx)) (s3-0 (-> s5-2 bsp vis-spheres)) ) - (-> s5-2 bsp unk-data 17) + (-> s5-2 bsp vis-spheres-length) (when (nonzero? s3-0) (dotimes (s2-0 (-> s3-0 length)) (let* ((v1-93 (the int (-> s3-0 data s2-0 w))) diff --git a/goal_src/jak2/engine/debug/default-menu.gc b/goal_src/jak2/engine/debug/default-menu.gc index 21d0a3a9a9..2a9c125ffc 100644 --- a/goal_src/jak2/engine/debug/default-menu.gc +++ b/goal_src/jak2/engine/debug/default-menu.gc @@ -5568,7 +5568,7 @@ (flag "Sound channels" *display-iop-info* dm-boolean-toggle-pick-func) (function "Reload Banks" #f sound-bank-reload) (function "List Sounds" #f ,(lambda () (list-sounds) (none))) - (function "IOP Info" #f ,(lambda () (loader-test-command (sound-command iop-mem) (the-as uint 0)) (none))) + ;(function "IOP Info" #f ,(lambda () (loader-test-command (sound-command iop-mem) (the-as uint 0)) (none))) ) ) ) diff --git a/goal_src/jak2/engine/gfx/background/background.gc b/goal_src/jak2/engine/gfx/background/background.gc index e64808d842..b0069db3f2 100644 --- a/goal_src/jak2/engine/gfx/background/background.gc +++ b/goal_src/jak2/engine/gfx/background/background.gc @@ -298,7 +298,7 @@ (dotimes (gp-1 (-> *level* length)) (let ((v1-28 (-> *level* level gp-1))) (when (= (-> v1-28 status) 'active) - (-> v1-28 bsp unk-data 5) + (-> v1-28 bsp wind-array-length) (if (nonzero? (-> v1-28 bsp wind-array-length)) (when (nonzero? level-update-wind) (level-update-wind *wind-work*)) ;; added nonzero check ) diff --git a/goal_src/jak2/engine/gfx/foreground/eye.gc b/goal_src/jak2/engine/gfx/foreground/eye.gc index 78ba1ca077..35c727d9bc 100644 --- a/goal_src/jak2/engine/gfx/foreground/eye.gc +++ b/goal_src/jak2/engine/gfx/foreground/eye.gc @@ -1204,34 +1204,26 @@ ) (cond ((and (-> arg0 skel override) (!= (-> arg0 skel override 41) 0.0)) - (let ((v1-7 (the-as object (+ (+ (* 96 (mod (-> v1-2 eye-slot) 20)) 28 (* 1552 (/ (-> v1-2 eye-slot) 20))) - (the-as int *eye-control-arrays*) - ) - ) - ) + (let ((v1-7 (-> *eye-control-arrays* data (/ (-> v1-2 eye-slot) 20) data (mod (-> v1-2 eye-slot) 20))) (a0-26 (-> arg0 skel override)) ) - (set! (-> (the-as eye-control v1-7) left x) (-> a0-26 42)) - (set! (-> (the-as eye-control v1-7) left y) (-> a0-26 43)) - (set! (-> (the-as eye-control v1-7) left lid) (-> a0-26 44)) - (set! (-> (the-as eye-control v1-7) left iris-scale) (-> a0-26 45)) - (set! (-> (the-as eye-control v1-7) left pupil-scale) (-> a0-26 46)) - (set! (-> (the-as eye-control v1-7) left lid-scale) (-> a0-26 47)) - (set! (-> (the-as eye-control v1-7) right x) (-> a0-26 48)) - (set! (-> (the-as eye-control v1-7) right y) (-> a0-26 49)) - (set! (-> (the-as eye-control v1-7) right lid) (-> a0-26 50)) - (set! (-> (the-as eye-control v1-7) right iris-scale) (-> a0-26 51)) - (set! (-> (the-as eye-control v1-7) right pupil-scale) (-> a0-26 52)) - (set! (-> (the-as eye-control v1-7) right lid-scale) (-> a0-26 53)) + (set! (-> v1-7 left x) (-> a0-26 42)) + (set! (-> v1-7 left y) (-> a0-26 43)) + (set! (-> v1-7 left lid) (-> a0-26 44)) + (set! (-> v1-7 left iris-scale) (-> a0-26 45)) + (set! (-> v1-7 left pupil-scale) (-> a0-26 46)) + (set! (-> v1-7 left lid-scale) (-> a0-26 47)) + (set! (-> v1-7 right x) (-> a0-26 48)) + (set! (-> v1-7 right y) (-> a0-26 49)) + (set! (-> v1-7 right lid) (-> a0-26 50)) + (set! (-> v1-7 right iris-scale) (-> a0-26 51)) + (set! (-> v1-7 right pupil-scale) (-> a0-26 52)) + (set! (-> v1-7 right lid-scale) (-> a0-26 53)) ) (logior! (-> arg0 skel status) (joint-control-status eye-anim-valid)) ) (else - (let* ((s4-0 (the-as eye-control (+ (+ (* 96 (mod (-> v1-2 eye-slot) 20)) 28 (* 1552 (/ (-> v1-2 eye-slot) 20))) - (the-as int *eye-control-arrays*) - ) - ) - ) + (let* ((s4-0 (-> *eye-control-arrays* data (/ (-> v1-2 eye-slot) 20) data (mod (-> v1-2 eye-slot) 20))) (f0-13 (-> s3-0 frame-num)) (f30-0 (- f0-13 (* (the float (the int (/ f0-13 1.0))) 1.0))) ) @@ -1321,7 +1313,7 @@ ) (defun set-eye-draw-flag ((arg0 symbol) (arg1 int) (arg2 int)) - (let ((s5-0 (the-as object (+ (+ (* 96 (mod arg1 20)) 28 (* 1552 (/ arg1 20))) (the-as int *eye-control-arrays*)))) + (let ((s5-0 (-> *eye-control-arrays* data (/ arg1 20) data (mod arg1 20))) ) (format 0 "flag: ~a eye-slot: ~d ~%" arg0 arg1) (set! (-> (the-as eye-control s5-0) draw-flag) arg0) 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 f9b8cddb23..3dd9c6ba15 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-anim-h.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-anim-h.gc @@ -13,69 +13,69 @@ ;; DECOMP BEGINS (deftype texture-anim-layer (structure) - ((extra vector :inline :offset 240) - (func symbol :offset 256) - (func-id basic :offset 256) - (init-func symbol :offset 260) - (init-func-id basic :offset 260) - (tex texture :offset 264) - (start-time float :offset 268) - (end-time float :offset 272) - (tex-name basic :offset 276) - (test gs-test :offset 280) - (alpha gs-alpha :offset 288) - (clamp gs-clamp :offset 296) - (start-color vector :inline :offset 80) - (start-scale vector2 :inline :offset 96) - (start-offset vector2 :inline :offset 104) - (start-st-scale vector2 :inline :offset 112) - (start-st-offset vector2 :inline :offset 120) - (start-qs vector :inline :offset 128) - (start-rot degrees :offset 144) - (start-st-rot degrees :offset 148) - (end-color vector :inline :offset 160) - (end-scale vector2 :inline :offset 176) - (end-offset vector2 :inline :offset 184) - (end-st-scale vector2 :inline :offset 192) - (end-st-offset vector2 :inline :offset 200) - (end-qs vector :inline :offset 208) - (end-rot degrees :offset 224) - (end-st-rot degrees :offset 228) + ((extra vector :inline :offset 240) + (func (function texture-anim-layer int) :offset 256) + (func-id symbol :offset 256) + (init-func (function texture-anim-layer int) :offset 260) + (init-func-id symbol :offset 260) + (tex texture :offset 264) + (start-time float :offset 268) + (end-time float :offset 272) + (tex-name string :offset 276) + (test gs-test :offset 280) + (alpha gs-alpha :offset 288) + (clamp gs-clamp :offset 296) + (start-color vector :inline :offset 80) + (start-scale vector2 :inline :offset 96) + (start-offset vector2 :inline :offset 104) + (start-st-scale vector2 :inline :offset 112) + (start-st-offset vector2 :inline :offset 120) + (start-qs vector :inline :offset 128) + (start-rot degrees :offset 144) + (start-st-rot degrees :offset 148) + (end-color vector :inline :offset 160) + (end-scale vector2 :inline :offset 176) + (end-offset vector2 :inline :offset 184) + (end-st-scale vector2 :inline :offset 192) + (end-st-offset vector2 :inline :offset 200) + (end-qs vector :inline :offset 208) + (end-rot degrees :offset 224) + (end-st-rot degrees :offset 228) ) :method-count-assert 11 :size-assert #x130 :flag-assert #xb00000130 (:methods - (texture-anim-layer-method-9 () none 9) - (texture-anim-layer-method-10 () none 10) + (texture-anim-layer-method-9 (_type_) _type_ 9) + (texture-anim-layer-method-10 (_type_) _type_ 10) ) ) (deftype texture-anim (structure) - ((num-layers uint32 :offset-assert 0) - (func symbol :offset-assert 4) - (func-id basic :offset 4) - (init-func symbol :offset-assert 8) - (init-func-id basic :offset 8) - (tex texture :offset-assert 12) - (tex-name string :offset-assert 16) - (extra vector :inline :offset-assert 32) - (color rgba :offset-assert 48) - (frame-time float :offset-assert 52) - (frame-delta float :offset-assert 56) - (frame-mod float :offset-assert 60) - (test gs-test :offset-assert 64) - (alpha gs-alpha :offset-assert 72) - (clamp gs-clamp :offset-assert 80) - (data texture-anim-layer :dynamic :offset-assert 88) + ((num-layers uint32 :offset-assert 0) + (func (function texture-anim int) :offset-assert 4) + (func-id symbol :offset 4) + (init-func (function texture-anim int) :offset-assert 8) + (init-func-id symbol :offset 8) + (tex texture :offset-assert 12) + (tex-name string :offset-assert 16) + (extra vector :inline :offset-assert 32) + (color rgba :offset-assert 48) + (frame-time float :offset-assert 52) + (frame-delta float :offset-assert 56) + (frame-mod float :offset-assert 60) + (test gs-test :offset-assert 64) + (alpha gs-alpha :offset-assert 72) + (clamp gs-clamp :offset-assert 80) + (data texture-anim-layer :dynamic :offset-assert 88) ) :method-count-assert 11 :size-assert #x58 :flag-assert #xb00000058 (:methods - (texture-anim-method-9 () none 9) - (texture-anim-method-10 () none 10) + (texture-anim-method-9 (_type_) _type_ 9) + (texture-anim-method-10 (_type_) _type_ 10) ) ) @@ -87,8 +87,8 @@ :size-assert #x10 :flag-assert #xb00000010 (:methods - (texture-anim-array-method-9 (_type_) none 9) - (texture-anim-array-method-10 () none 10) + (texture-anim-array-method-9 (_type_) _type_ 9) + (texture-anim-array-method-10 (_type_) _type_ 10) ) ) @@ -104,7 +104,7 @@ (corner2 vector :inline :offset-assert 192) (corner3 vector :inline :offset-assert 208) (const vector :inline :offset-assert 224) - (random vector 8 :inline :offset-assert 240) + (random vector4w 8 :inline :offset-assert 240) (random-index uint8 :offset-assert 368) ) :method-count-assert 9 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 5899b2766c..6b192fae6e 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-anim-tables.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-anim-tables.gc @@ -11,8 +11,8 @@ (the-as (texture-anim-array texture-anim) (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim - :func 'texture-anim-alpha-ramp-clut-upload - :init-func 'texture-anim-alpha-ramp-clut-init + :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) @@ -23,8 +23,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -36,8 +36,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 4800.0 :tex-name #f @@ -58,8 +58,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 4800.0 :tex-name #f @@ -82,8 +82,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -95,8 +95,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 2400.0 :tex-name #f @@ -117,8 +117,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 2400.0 :tex-name #f @@ -141,8 +141,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -154,8 +154,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 1200.0 :tex-name #f @@ -176,8 +176,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 1200.0 :tex-name #f @@ -200,8 +200,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -213,8 +213,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -235,8 +235,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -260,7 +260,7 @@ (new 'static 'texture-anim :num-layers #x4 :func #f - :init-func 'dest-texture-init + :init-func-id 'dest-texture-init :tex #f :tex-name #f :extra (new 'static 'vector :x 128.0 :y 16.0) @@ -270,8 +270,8 @@ :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 4.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -292,8 +292,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 5.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -314,8 +314,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 6.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -336,8 +336,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 8.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -361,7 +361,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'dest-texture-init + :init-func-id 'dest-texture-init :tex #f :tex-name #f :extra (new 'static 'vector :x 128.0 :y 8.0) @@ -371,8 +371,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 16.0) - :func 'move-rg-to-ba-texture-anim-layer-func - :init-func 'src-texture-init + :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 @@ -394,8 +394,8 @@ ) ) (new 'static 'texture-anim - :func 'texture-anim-cloud-clut-upload - :init-func 'texture-anim-cloud-clut-init + :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) @@ -405,8 +405,8 @@ :data (new 'static 'array texture-anim-layer 2) ) (new 'static 'texture-anim - :func 'fog-texture-anim-func - :init-func 'fog-texture-anim-init + :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) @@ -447,7 +447,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -468,7 +468,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -489,7 +489,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -523,7 +523,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -544,7 +544,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -565,7 +565,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -599,7 +599,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -620,7 +620,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -641,7 +641,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -675,7 +675,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -696,7 +696,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -717,7 +717,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -769,7 +769,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -790,7 +790,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -810,7 +810,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -852,7 +852,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -874,7 +874,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -896,7 +896,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -918,7 +918,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -962,7 +962,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -984,7 +984,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -1006,7 +1006,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -1028,7 +1028,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -1072,7 +1072,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -1093,7 +1093,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 diff --git a/goal_src/jak2/engine/gfx/texture/texture-anim.gc b/goal_src/jak2/engine/gfx/texture/texture-anim.gc index a43785f561..347cae833f 100644 --- a/goal_src/jak2/engine/gfx/texture/texture-anim.gc +++ b/goal_src/jak2/engine/gfx/texture/texture-anim.gc @@ -11,3 +11,136 @@ (none) ) + + +;; definition for method 9 of type texture-anim-array +(defmethod texture-anim-array-method-9 texture-anim-array ((obj texture-anim-array)) + (dotimes (s5-0 (-> obj length)) + (texture-anim-method-9 (-> obj array-data s5-0)) + ) + obj + ) + +;; definition for method 10 of type texture-anim-array +(defmethod texture-anim-array-method-10 texture-anim-array ((obj texture-anim-array)) + (dotimes (s5-0 (-> obj length)) + (texture-anim-method-10 (-> obj array-data s5-0)) + ) + obj + ) + +;; definition for method 9 of type texture-anim +;; INFO: Used lq/sq +(defmethod texture-anim-method-9 texture-anim ((obj texture-anim)) + (local-vars (a3-3 uint128) (sv-16 texture-page)) + (if (logtest? (the-as int (-> obj func)) 1) + (set! (-> obj func) (the-as (function texture-anim int) (-> (the-as symbol (-> obj func)) value))) + ) + (when (logtest? (the-as int (-> obj init-func)) 1) + (set! (-> obj init-func) (the-as (function texture-anim int) (-> (the-as symbol (-> obj init-func)) value))) + (if (-> obj init-func) + ((-> obj init-func) obj) + ) + ) + (when (-> obj tex-name) + (set! sv-16 (the-as texture-page #f)) + (let ((a0-3 (lookup-level-texture-by-name (-> obj tex-name) (-> *level* loading-level) (& sv-16)))) + (set! (-> obj tex) a0-3) + (when (and a0-3 sv-16) + 0 + (cond + ((= (-> a0-3 psm) (gs-psm mt8)) + (let ((v1-20 (-> a0-3 clutdest))) + (when (!= v1-20 (* (/ (the-as int v1-20) 32) 32)) + (let* ((v1-22 (-> sv-16 segment 2)) + (a1-5 (+ (-> v1-22 dest) (-> v1-22 size))) + (a0-7 2048) + ) + (set! (-> obj tex clutdest) (* (shr (+ a1-5 2047) 11) 32)) + (+! (-> sv-16 size) a0-7) + (+! (-> v1-22 size) a0-7) + ) + ) + ) + ) + ((= (-> a0-3 psm) (gs-psm ct32)) + (let ((v1-24 (-> a0-3 dest 0))) + (when (!= v1-24 (* (/ (the-as int v1-24) 32) 32)) + (let* ((v1-26 (-> sv-16 segment 2)) + (a1-19 (+ (-> v1-26 dest) (-> v1-26 size))) + (a0-12 (shl (sar (+ (* (-> a0-3 w) (-> a0-3 h)) 2047) 11) 11)) + ) + (set! (-> obj tex dest 0) (* (shr (+ a1-19 2047) 11) 32)) + (+! (-> sv-16 size) a0-12) + (+! (-> v1-26 size) a0-12) + ) + ) + ) + ) + ) + ) + ) + ) + (dotimes (s5-0 (the-as int (-> obj num-layers))) + (texture-anim-layer-method-9 (-> obj data s5-0)) + ) + (let ((v1-34 (-> obj tex))) + (when v1-34 + (dotimes (a0-15 3) + (set! (-> v1-34 masks data a0-15 mask quad) (the-as uint128 0)) + ) + (dotimes (a0-18 (the-as int (-> obj num-layers))) + (let ((a1-33 (-> obj data a0-18 tex))) + (when a1-33 + (dotimes (a2-8 3) + (let ((a3-2 (-> v1-34 masks data a2-8 mask quad)) + (t0-2 (-> a1-33 masks data a2-8 mask quad)) + ) + (.por a3-3 a3-2 t0-2) + ) + (set! (-> v1-34 masks data a2-8 mask quad) a3-3) + ) + ) + ) + ) + ) + ) + obj + ) + +;; definition for method 10 of type texture-anim +(defmethod texture-anim-method-10 texture-anim ((obj texture-anim)) + (set! (-> obj tex) #f) + (dotimes (s5-0 (the-as int (-> obj num-layers))) + (texture-anim-layer-method-10 (-> obj data s5-0)) + ) + obj + ) + +;; definition for method 9 of type texture-anim-layer +(defmethod texture-anim-layer-method-9 texture-anim-layer ((obj texture-anim-layer)) + (if (logtest? (the-as int (-> obj func)) 1) + (set! (-> obj func) (the-as (function texture-anim-layer int) (-> (the-as symbol (-> obj func)) value))) + ) + (when (logtest? (the-as int (-> obj init-func)) 1) + (set! (-> obj init-func) + (the-as (function texture-anim-layer int) (-> (the-as symbol (-> obj init-func)) value)) + ) + (if (-> obj init-func) + ((-> obj init-func) obj) + ) + ) + (if (-> obj tex-name) + (set! (-> obj tex) + (lookup-level-texture-by-name (-> obj tex-name) (-> *level* loading-level) (the-as (pointer texture-page) #f)) + ) + ) + obj + ) + +;; definition for method 10 of type texture-anim-layer +(defmethod texture-anim-layer-method-10 texture-anim-layer ((obj texture-anim-layer)) + (set! (-> obj tex) #f) + obj + ) + diff --git a/goal_src/jak2/engine/level/bsp-h.gc b/goal_src/jak2/engine/level/bsp-h.gc index 94dd1751b0..002df7d97b 100644 --- a/goal_src/jak2/engine/level/bsp-h.gc +++ b/goal_src/jak2/engine/level/bsp-h.gc @@ -85,11 +85,13 @@ the bsp-node class seems broken - it has int16's that get used a pointers. (region-array region-array :offset-assert 192) (collide-hash collide-hash :offset-assert 196) ;; 200 is some array - (wind-array-length int32 :offset 204) + (wind-array uint32 :offset 200) + (wind-array-length int32 :offset 204) (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) + (vis-spheres-length uint32 :offset 248) (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset-assert 256) @@ -111,9 +113,6 @@ the bsp-node class seems broken - it has int16's that get used a pointers. (bsp-scale vector :inline :offset-assert 288) (bsp-offset vector :inline :offset-assert 304) - - (unk-data uint32 18 :offset 180) - (end uint8 :offset 399) ) :method-count-assert 19 diff --git a/goal_src/jak2/engine/level/level-info.gc b/goal_src/jak2/engine/level/level-info.gc index 9250dd515a..d3d0f6f116 100644 --- a/goal_src/jak2/engine/level/level-info.gc +++ b/goal_src/jak2/engine/level/level-info.gc @@ -14638,6 +14638,11 @@ 0 ) +(#when DEMO_HACK + (set! (-> ctywide memory-mode) (load-buffer-mode small-center)) + (set! (-> demo memory-mode) (load-buffer-mode small-edge)) + ) + (define *level-load-list* '(default-level intro demo diff --git a/goal_src/jak2/engine/level/level.gc b/goal_src/jak2/engine/level/level.gc index 150379a620..09a937e750 100644 --- a/goal_src/jak2/engine/level/level.gc +++ b/goal_src/jak2/engine/level/level.gc @@ -790,26 +790,7 @@ into 7 sections, which might explain the weird sizes in the center. ;; couldn't find it, die. (format 0 "ERROR: level ~A could not find free ~S bank in the level-group heap~%" (-> obj name) - (cond - ((= mem-mode (load-buffer-mode large)) - "large" - ) - ((= mem-mode (load-buffer-mode borrow)) - "borrow" - ) - ((= mem-mode (load-buffer-mode small-center)) - "small-center" - ) - ((= mem-mode (load-buffer-mode medium)) - "medium" - ) - ((= mem-mode (load-buffer-mode small-edge)) - "small-edge" - ) - (else - "*unknown*" - ) - ) + (enum->string load-buffer-mode mem-mode) ) (break!) 0 @@ -1093,15 +1074,10 @@ into 7 sections, which might explain the weird sizes in the center. (dotimes (s4-0 10) (let ((a0-8 (-> obj info texture-anim s4-0))) (when a0-8 - (format 0 "SKIP: texture-anim-array in login-begin~%") - (format #t "SKIP: texture-anim-array in login-begin~%") - - #|(set! (-> obj texture-anim-array s4-0) - (the-as - texture-anim-array - ((method-of-object (the-as texture-anim-array (-> a0-8 value)) texture-anim-array-method-9)) - ) - )|# + (set! (-> obj info texture-anim s4-0) #f) + #|(set! (-> obj texture-anim-array s4-0) + (texture-anim-array-method-9 (the-as texture-anim-array (-> a0-8 value))) + )|# ) ) ) @@ -1500,7 +1476,7 @@ into 7 sections, which might explain the weird sizes in the center. ) ) ) - (if (and (!= (-> obj bsp unk-data 7) 0) *traffic-manager*) + (if (and (!= (-> obj bsp city-level-info) 0) *traffic-manager*) (send-event *traffic-manager* 'level-loaded obj) ) (when (-> obj info activate-func) @@ -1529,7 +1505,7 @@ into 7 sections, which might explain the weird sizes in the center. (format 0 "----------- kill ~A (status ~A)~%" obj (-> obj status)) ;; send event to traffic manager. - (if (and (!= (-> obj bsp unk-data 7) 0) *traffic-manager*) + (if (and (!= (-> obj bsp city-level-info) 0) *traffic-manager*) (send-event *traffic-manager* 'level-killed obj) ) @@ -1660,10 +1636,7 @@ into 7 sections, which might explain the weird sizes in the center. (let ((a0-37 (-> obj info texture-anim s5-3))) (if a0-37 (set! (-> obj texture-anim-array s5-3) - (the-as - texture-anim-array - ((method-of-object (the-as texture-anim-array (-> a0-37 value)) texture-anim-array-method-10)) - ) + (texture-anim-array-method-10 (the-as texture-anim-array (-> a0-37 value))) ) ) ) diff --git a/goal_src/jak2/engine/target/target-death.gc b/goal_src/jak2/engine/target/target-death.gc index dedc9368b9..e12b714be1 100644 --- a/goal_src/jak2/engine/target/target-death.gc +++ b/goal_src/jak2/engine/target/target-death.gc @@ -123,7 +123,8 @@ (reserve-free *art-control* (-> *art-control* reserve-buffer heap)) ) (when (logtest? (-> arg0 flags) (continue-flags demo demo-movie)) - (set! (-> ctywide memory-mode) (load-buffer-mode small-edge)) + (#unless DEMO_HACK + (set! (-> ctywide memory-mode) (load-buffer-mode small-edge))) 0 ) (kill-persister *setting-control* (the-as engine-pers 'fail) 'bg-a) diff --git a/goal_src/jak2/kernel/gcommon.gc b/goal_src/jak2/kernel/gcommon.gc index 372f0b64ca..509a07b838 100644 --- a/goal_src/jak2/kernel/gcommon.gc +++ b/goal_src/jak2/kernel/gcommon.gc @@ -13,6 +13,8 @@ ;; disable PS2 only code and enable PC-specific code (defglobalconstant PC_PORT #t) +;; removes level loading d3mo mode changes when enabled +(defglobalconstant DEMO_HACK #f) ;; whether we're allowed to use more memory than the original game or not (defglobalconstant BIG_MEMORY #t) diff --git a/goal_src/jak2/levels/castle/boss/casboss-texture.gc b/goal_src/jak2/levels/castle/boss/casboss-texture.gc index 1472f4849b..1750eb7794 100644 --- a/goal_src/jak2/levels/castle/boss/casboss-texture.gc +++ b/goal_src/jak2/levels/castle/boss/casboss-texture.gc @@ -12,7 +12,7 @@ (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim :num-layers #x5 - :func 'krew-texture-anim-func + :func-id 'krew-texture-anim-func :init-func #f :tex #f :tex-name "krew-holo-dest" @@ -24,7 +24,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -46,7 +46,7 @@ :end-st-rot (degrees 3932160.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -67,7 +67,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -89,7 +89,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -111,7 +111,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 diff --git a/goal_src/jak2/levels/city/common/ctywide-texture.gc b/goal_src/jak2/levels/city/common/ctywide-texture.gc index 89e66cae18..726859448b 100644 --- a/goal_src/jak2/levels/city/common/ctywide-texture.gc +++ b/goal_src/jak2/levels/city/common/ctywide-texture.gc @@ -24,7 +24,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 4800.0 @@ -45,7 +45,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 4800.0 @@ -79,7 +79,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 4800.0 @@ -100,7 +100,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 600.0 @@ -121,7 +121,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 600.0 diff --git a/goal_src/jak2/levels/city/oracle/oracle-texture.gc b/goal_src/jak2/levels/city/oracle/oracle-texture.gc index 1330387b8a..97ee869c3f 100644 --- a/goal_src/jak2/levels/city/oracle/oracle-texture.gc +++ b/goal_src/jak2/levels/city/oracle/oracle-texture.gc @@ -22,7 +22,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -43,7 +43,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -64,7 +64,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -98,7 +98,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -119,7 +119,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -140,7 +140,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -174,7 +174,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -195,7 +195,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -216,7 +216,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -250,7 +250,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -271,7 +271,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -292,7 +292,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -326,7 +326,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -347,7 +347,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -368,7 +368,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -402,7 +402,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -423,7 +423,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -444,7 +444,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/goal_src/jak2/levels/consite/consite-texture.gc b/goal_src/jak2/levels/consite/consite-texture.gc index 90380d7f64..9d051785d4 100644 --- a/goal_src/jak2/levels/consite/consite-texture.gc +++ b/goal_src/jak2/levels/consite/consite-texture.gc @@ -22,7 +22,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -43,7 +43,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -77,7 +77,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -98,7 +98,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -132,7 +132,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -153,7 +153,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -187,7 +187,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -208,7 +208,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -242,7 +242,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -263,7 +263,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -297,7 +297,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -318,7 +318,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/goal_src/jak2/levels/dig/dig-texture.gc b/goal_src/jak2/levels/dig/dig-texture.gc index cf0543281a..1f13d68902 100644 --- a/goal_src/jak2/levels/dig/dig-texture.gc +++ b/goal_src/jak2/levels/dig/dig-texture.gc @@ -24,7 +24,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 @@ -45,7 +45,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 @@ -88,7 +88,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 @@ -109,7 +109,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 diff --git a/goal_src/jak2/levels/fortress/ammo_dump/fordumpa-texture.gc b/goal_src/jak2/levels/fortress/ammo_dump/fordumpa-texture.gc index 988ddd20dc..4c6246fb89 100644 --- a/goal_src/jak2/levels/fortress/ammo_dump/fordumpa-texture.gc +++ b/goal_src/jak2/levels/fortress/ammo_dump/fordumpa-texture.gc @@ -22,7 +22,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -56,7 +56,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -98,7 +98,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -125,29 +125,28 @@ ) (defun set-roboscreen-alpha! ((arg0 float)) - (format 0 "TODO - roboscreen disabled!~%") - ;; (set! (-> *blit-displays-work* line-color) - ;; (logior (logand (-> *blit-displays-work* line-color) (the-as uint #xffffffff00ffffff)) - ;; (shr (shl (the int (* 16.0 arg0)) 56) 32) - ;; ) - ;; ) - ;; (let ((v1-5 (the int (* 128.0 arg0)))) - ;; (dotimes (a1-6 15) - ;; (set! (-> *blit-displays-work* scan-colors a1-6 w) v1-5) - ;; ) - ;; ) - ;; (let ((v1-9 (-> *fortress-warp-texture-anim-array* array-data 0))) - ;; (dotimes (a1-7 (the-as int (-> v1-9 num-layers))) - ;; (set! (-> v1-9 data a1-7 start-color w) arg0) - ;; (set! (-> v1-9 data a1-7 end-color w) arg0) - ;; ) - ;; ) - ;; (let ((a1-8 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)) - ;; (a2-9 (new 'static 'vector :x 0.666 :y 1.25 :z 0.666 :w 1.0)) - ;; (v1-13 (-> *time-of-day-context* filter-color)) - ;; ) - ;; (vector4-lerp! v1-13 a1-8 a2-9 arg0) - ;; ) - ;; 0 + (set! (-> *blit-displays-work* line-color) + (logior (logand (-> *blit-displays-work* line-color) (the-as uint #xffffffff00ffffff)) + (shr (shl (the int (* 16.0 arg0)) 56) 32) + ) + ) + (let ((v1-5 (the int (* 128.0 arg0)))) + (dotimes (a1-6 15) + (set! (-> *blit-displays-work* scan-colors a1-6 w) v1-5) + ) + ) + (let ((v1-9 (-> *fortress-warp-texture-anim-array* array-data 0))) + (dotimes (a1-7 (the-as int (-> v1-9 num-layers))) + (set! (-> v1-9 data a1-7 start-color w) arg0) + (set! (-> v1-9 data a1-7 end-color w) arg0) + ) + ) + (let ((a1-8 (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0)) + (a2-9 (new 'static 'vector :x 0.666 :y 1.25 :z 0.666 :w 1.0)) + (v1-13 (-> *time-of-day-context* filter-color)) + ) + (vector4-lerp! v1-13 a1-8 a2-9 arg0) + ) + 0 (none) ) diff --git a/goal_src/jak2/levels/fortress/prison/intro-texture.gc b/goal_src/jak2/levels/fortress/prison/intro-texture.gc index fa0ac81415..e9281b4709 100644 --- a/goal_src/jak2/levels/fortress/prison/intro-texture.gc +++ b/goal_src/jak2/levels/fortress/prison/intro-texture.gc @@ -22,7 +22,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -43,7 +43,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -64,7 +64,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -98,7 +98,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -119,7 +119,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -140,7 +140,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -174,7 +174,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -195,7 +195,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -216,7 +216,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -250,7 +250,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -271,7 +271,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -292,7 +292,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -326,7 +326,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -347,7 +347,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -368,7 +368,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -402,7 +402,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -423,7 +423,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -444,7 +444,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -478,7 +478,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -499,7 +499,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -520,7 +520,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/goal_src/jak2/levels/landing_pad/castle-texture.gc b/goal_src/jak2/levels/landing_pad/castle-texture.gc index aa4d70e520..c90a97f96f 100644 --- a/goal_src/jak2/levels/landing_pad/castle-texture.gc +++ b/goal_src/jak2/levels/landing_pad/castle-texture.gc @@ -272,8 +272,8 @@ (the-as (texture-anim-array texture-anim) (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim - :func 'texture-anim-alpha-ramp-clut-upload - :init-func 'texture-anim-alpha-ramp-clut-init + :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 28.0) @@ -284,8 +284,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 8.0) @@ -297,8 +297,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -319,8 +319,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -343,8 +343,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 9.0) @@ -356,8 +356,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -378,8 +378,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -402,8 +402,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 10.0) @@ -416,8 +416,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 150.0 :tex-name #f @@ -438,8 +438,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 150.0 :tex-name #f @@ -462,8 +462,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 12.0) @@ -476,8 +476,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 75.0 :tex-name #f @@ -498,8 +498,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 75.0 :tex-name #f @@ -523,7 +523,7 @@ (new 'static 'texture-anim :num-layers #x4 :func #f - :init-func 'dest-texture-init + :init-func-id 'dest-texture-init :tex #f :tex-name #f :extra (new 'static 'vector :x 128.0 :y 20.0) @@ -533,8 +533,8 @@ :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 8.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -555,8 +555,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 9.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -577,8 +577,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 10.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -599,8 +599,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 12.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -624,7 +624,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-change-mt8h-init + :init-func-id 'texture-anim-change-mt8h-init :tex #f :tex-name "cas-toxic-slime-dest" :extra (new 'static 'vector :x 28.0 :y 12.0 :z 128.0 :w 128.0) @@ -634,8 +634,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 20.0) - :func 'move-rg-to-ba-texture-anim-layer-func - :init-func 'src-texture-init + :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 @@ -657,8 +657,8 @@ ) ) (new 'static 'texture-anim - :func 'texture-anim-slime-clut-upload - :init-func 'texture-anim-slime-clut-init + :func-id 'texture-anim-slime-clut-upload + :init-func-id 'texture-anim-slime-clut-init :tex #f :tex-name #f :extra (new 'static 'vector :x 28.0) @@ -670,7 +670,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-toxic-slime-scroll-dest" :extra (new 'static 'vector :x 64.0 :y 64.0) @@ -681,7 +681,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -749,7 +749,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -761,7 +761,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -786,7 +786,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest-01" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -798,7 +798,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -823,7 +823,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest-02" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -835,7 +835,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -860,7 +860,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest-03" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -872,7 +872,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 diff --git a/goal_src/jak2/levels/nest/boss/nest-texture.gc b/goal_src/jak2/levels/nest/boss/nest-texture.gc index 9722ef9480..ee6940a8a9 100644 --- a/goal_src/jak2/levels/nest/boss/nest-texture.gc +++ b/goal_src/jak2/levels/nest/boss/nest-texture.gc @@ -22,7 +22,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -43,7 +43,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -64,7 +64,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -98,7 +98,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -119,7 +119,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -140,7 +140,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -174,7 +174,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -195,7 +195,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -216,7 +216,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -250,7 +250,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -271,7 +271,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -292,7 +292,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -326,7 +326,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -347,7 +347,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -368,7 +368,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -402,7 +402,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -423,7 +423,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -444,7 +444,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/goal_src/jak2/levels/palace/roof/palboss-texture.gc b/goal_src/jak2/levels/palace/roof/palboss-texture.gc index 2d8166b761..2e4a939b1c 100644 --- a/goal_src/jak2/levels/palace/roof/palboss-texture.gc +++ b/goal_src/jak2/levels/palace/roof/palboss-texture.gc @@ -24,7 +24,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -45,7 +45,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -66,7 +66,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -86,7 +86,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -108,7 +108,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 diff --git a/goal_src/jak2/levels/stadium/stadiumb-texture.gc b/goal_src/jak2/levels/stadium/stadiumb-texture.gc index b810ea8a8d..6c6cfdefd2 100644 --- a/goal_src/jak2/levels/stadium/stadiumb-texture.gc +++ b/goal_src/jak2/levels/stadium/stadiumb-texture.gc @@ -23,7 +23,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -44,7 +44,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 diff --git a/goal_src/jak2/pc/debug/default-menu-pc.gc b/goal_src/jak2/pc/debug/default-menu-pc.gc index 81a995748d..66a5ee921b 100644 --- a/goal_src/jak2/pc/debug/default-menu-pc.gc +++ b/goal_src/jak2/pc/debug/default-menu-pc.gc @@ -743,9 +743,17 @@ ) ) -(defun dm-set-msaa-pick-func ((msaa int) (msg debug-menu-msg)) - (when (= msg (debug-menu-msg press)) (set! (-> *pc-settings* gfx-msaa) (/ msaa 8))) - (= (-> *pc-settings* gfx-msaa) (/ msaa 8))) +(defun dm-frame-rate-pick-func ((bfps int) (msg debug-menu-msg)) + (let ((fps (/ bfps 8))) + (when (= msg (debug-menu-msg press)) + (set-frame-rate! *pc-settings* fps #t)) + (= (-> *pc-settings* target-fps) fps))) + +(defun dm-msaa-pick-func ((bmsaa int) (msg debug-menu-msg)) + (let ((msaa (/ bmsaa 8))) + (when (= msg (debug-menu-msg press)) + (set! (-> *pc-settings* gfx-msaa) msaa)) + (= (-> *pc-settings* gfx-msaa) msaa))) (when (-> *debug-menu-context* root-menu) ;; (debug-menu-append-item (-> *debug-menu-context* root-menu) (debug-menu-make-load-menu *debug-menu-context*)) @@ -785,29 +793,29 @@ (function "Custom" #f ,(lambda () (set-aspect! *pc-settings* (-> *pc-settings* aspect-custom-x) (-> *pc-settings* aspect-custom-y)))) ) (menu "Fullscreen" - (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed))) - (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen))) - (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless))) + (function "Windowed" #f ,(lambda () (set-display-mode! *pc-settings* 'windowed #t))) + (function "Fullscreen" #f ,(lambda () (set-display-mode! *pc-settings* 'fullscreen #t))) + (function "Borderless" #f ,(lambda () (set-display-mode! *pc-settings* 'borderless #t))) ) (menu "Sizes" - (function "640 x 480" #f ,(lambda () (set-size! *pc-settings* 640 480))) - (function "640 x 360" #f ,(lambda () (set-size! *pc-settings* 640 360))) - (function "720 x 540" #f ,(lambda () (set-size! *pc-settings* 720 540))) - (function "960 x 540" #f ,(lambda () (set-size! *pc-settings* 960 540))) - (function "800 x 600" #f ,(lambda () (set-size! *pc-settings* 800 600))) - (function "960 x 720" #f ,(lambda () (set-size! *pc-settings* 960 720))) - (function "1280 x 720" #f ,(lambda () (set-size! *pc-settings* 1280 720))) - (function "1024 x 768" #f ,(lambda () (set-size! *pc-settings* 1024 768))) - (function "1366 x 768" #f ,(lambda () (set-size! *pc-settings* 1366 768))) - (function "1280 x 960" #f ,(lambda () (set-size! *pc-settings* 1280 960))) - (function "1440 x 1080" #f ,(lambda () (set-size! *pc-settings* 1440 1080))) - (function "1920 x 1080" #f ,(lambda () (set-size! *pc-settings* 1920 1080))) - (function "1920 x 1440" #f ,(lambda () (set-size! *pc-settings* 1920 1440))) - (function "2560 x 1440" #f ,(lambda () (set-size! *pc-settings* 2560 1440))) - (function "2880 x 2160" #f ,(lambda () (set-size! *pc-settings* 2880 2160))) - (function "3840 x 2160" #f ,(lambda () (set-size! *pc-settings* 3840 2160))) - (function "512 x 416" #f ,(lambda () (set-size! *pc-settings* 512 416))) - (function "512 x 208" #f ,(lambda () (set-size! *pc-settings* 512 208))) + (function "640 x 480" #f ,(lambda () (set-size! *pc-settings* 640 480 #t))) + (function "640 x 360" #f ,(lambda () (set-size! *pc-settings* 640 360 #t))) + (function "720 x 540" #f ,(lambda () (set-size! *pc-settings* 720 540 #t))) + (function "960 x 540" #f ,(lambda () (set-size! *pc-settings* 960 540 #t))) + (function "800 x 600" #f ,(lambda () (set-size! *pc-settings* 800 600 #t))) + (function "960 x 720" #f ,(lambda () (set-size! *pc-settings* 960 720 #t))) + (function "1280 x 720" #f ,(lambda () (set-size! *pc-settings* 1280 720 #t))) + (function "1024 x 768" #f ,(lambda () (set-size! *pc-settings* 1024 768 #t))) + (function "1366 x 768" #f ,(lambda () (set-size! *pc-settings* 1366 768 #t))) + (function "1280 x 960" #f ,(lambda () (set-size! *pc-settings* 1280 960 #t))) + (function "1440 x 1080" #f ,(lambda () (set-size! *pc-settings* 1440 1080 #t))) + (function "1920 x 1080" #f ,(lambda () (set-size! *pc-settings* 1920 1080 #t))) + (function "1920 x 1440" #f ,(lambda () (set-size! *pc-settings* 1920 1440 #t))) + (function "2560 x 1440" #f ,(lambda () (set-size! *pc-settings* 2560 1440 #t))) + (function "2880 x 2160" #f ,(lambda () (set-size! *pc-settings* 2880 2160 #t))) + (function "3840 x 2160" #f ,(lambda () (set-size! *pc-settings* 3840 2160 #t))) + (function "512 x 416" #f ,(lambda () (set-size! *pc-settings* 512 416 #t))) + (function "512 x 208" #f ,(lambda () (set-size! *pc-settings* 512 208 #t))) ) (flag "Letterbox" #f ,(dm-lambda-boolean-flag (-> *pc-settings* letterbox?))) (flag "Hinttitles" #f ,(dm-lambda-boolean-flag (-> *pc-settings* hinttitles?))) @@ -858,21 +866,23 @@ (set! (-> *pc-settings* lod-force-actor) 3) )) ) - ;; (menu "Framerate" - ;; (flag "60" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 60)) - ;; (= (-> *pc-settings* target-fps) 60))) - ;; (flag "100" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 100)) - ;; (= (-> *pc-settings* target-fps) 100))) - ;; (flag "150" #f ,(lambda (arg (msg debug-menu-msg)) (when (= msg (debug-menu-msg press)) (set-frame-rate! *pc-settings* 150)) - ;; (= (-> *pc-settings* target-fps) 150))) - ;; ) + ;; (menu "Framerate" + ;; (flag "60" 60 dm-frame-rate-pick-func) + ;; (flag "100" 100 dm-frame-rate-pick-func) + ;; (flag "150" 150 dm-frame-rate-pick-func) + ;; ) (menu "MSAA" - (flag "Off" 1 dm-set-msaa-pick-func) - (flag "x2" 2 dm-set-msaa-pick-func) - (flag "x4" 4 dm-set-msaa-pick-func) - (flag "x8" 8 dm-set-msaa-pick-func) - (flag "x16" 16 dm-set-msaa-pick-func) - ) + (flag "Off" 1 dm-msaa-pick-func) + (flag "x2" 2 dm-msaa-pick-func) + (flag "x4" 4 dm-msaa-pick-func) + (flag "x8" 8 dm-msaa-pick-func) + (flag "x16" 16 dm-msaa-pick-func) + ) + (menu "LED" + (flag "hp" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-hp-led?))) + (flag "eco" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-eco-led?))) + (flag "heat" #f ,(dm-lambda-boolean-flag (-> *pc-settings* controller-heat-led?))) + ) (flag "V-sync" #f ,(dm-lambda-boolean-flag (-> *pc-settings* vsync?))) (flag "All actors" #f ,(dm-lambda-boolean-flag (-> *pc-settings* force-actors?))) (flag "Display actor counts" *display-actor-counts* dm-boolean-toggle-pick-func) @@ -880,7 +890,7 @@ (flag "Music fadein" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadein?))) (flag "Music fadeout" #f ,(dm-lambda-boolean-flag (-> *pc-settings* music-fadeout?))) (flag "Track skill" *debug-track-skill* dm-boolean-toggle-pick-func) - (function "Reset" #f ,(lambda () (reset *pc-settings*))) + (function "Reset" #f ,(lambda () (reset *pc-settings* #t))) (function "Save" #f ,(lambda () (commit-to-file *pc-settings*))) (function "Load" #f ,(lambda () (load-settings *pc-settings*))) ) diff --git a/goal_src/jak2/pc/pckernel-impl.gc b/goal_src/jak2/pc/pckernel-impl.gc index 9312d111c3..69d6378d64 100644 --- a/goal_src/jak2/pc/pckernel-impl.gc +++ b/goal_src/jak2/pc/pckernel-impl.gc @@ -85,22 +85,16 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(defmethod reset-ps2 pc-settings-jak2 ((obj pc-settings-jak2)) - "Set the default ps2 settings" - - ((method-of-type pc-settings reset-ps2) obj) - (set! (-> obj ps2-parts?) #t) - (none)) - -(defmethod reset-misc pc-settings-jak2 ((obj pc-settings-jak2)) +(defmethod reset-misc pc-settings-jak2 ((obj pc-settings-jak2) (call-handlers symbol)) "Set the default misc settings" - ((method-of-type pc-settings reset-misc) obj) + ((method-of-type pc-settings reset-misc) obj call-handlers) (set! (-> obj jetboard-trick-text?) #t) (set! (-> obj fast-airlock?) #t) (set! (-> obj fast-elevator?) #t) - (none)) + 0) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; other diff --git a/test/decompiler/reference/jak2/characters/baron_errol_metalkor/metalkor-texture_REF.gc b/test/decompiler/reference/jak2/characters/baron_errol_metalkor/metalkor-texture_REF.gc index df9779f363..e7f4faf618 100644 --- a/test/decompiler/reference/jak2/characters/baron_errol_metalkor/metalkor-texture_REF.gc +++ b/test/decompiler/reference/jak2/characters/baron_errol_metalkor/metalkor-texture_REF.gc @@ -7,7 +7,7 @@ (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim :num-layers #x5 - :func 'metkor-texture-anim-func + :func-id 'metkor-texture-anim-func :init-func #f :tex #f :tex-name "squid-env-rim-dest" @@ -19,7 +19,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -41,7 +41,7 @@ :end-st-rot (degrees 3932160.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -62,7 +62,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -84,7 +84,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -106,7 +106,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 diff --git a/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc b/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc index 3df9ba08d5..51a6f67dee 100644 --- a/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc +++ b/test/decompiler/reference/jak2/engine/camera/cam-update_REF.gc @@ -200,7 +200,7 @@ (let ((s4-1 (-> s5-2 bsp current-leaf-idx)) (s3-0 (-> s5-2 bsp vis-spheres)) ) - (-> s5-2 bsp unk-data 17) + (-> s5-2 bsp vis-spheres-length) (when (nonzero? s3-0) (dotimes (s2-0 (-> s3-0 length)) (let* ((v1-93 (the int (-> s3-0 data s2-0 w))) diff --git a/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-h_REF.gc b/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-h_REF.gc index 41f378c295..2edbd05cd1 100644 --- a/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-h_REF.gc @@ -3,41 +3,41 @@ ;; definition of type texture-anim-layer (deftype texture-anim-layer (structure) - ((extra vector :inline :offset 240) - (func symbol :offset 256) - (func-id basic :offset 256) - (init-func symbol :offset 260) - (init-func-id basic :offset 260) - (tex texture :offset 264) - (start-time float :offset 268) - (end-time float :offset 272) - (tex-name basic :offset 276) - (test gs-test :offset 280) - (alpha gs-alpha :offset 288) - (clamp gs-clamp :offset 296) - (start-color vector :inline :offset 80) - (start-scale vector2 :inline :offset 96) - (start-offset vector2 :inline :offset 104) - (start-st-scale vector2 :inline :offset 112) - (start-st-offset vector2 :inline :offset 120) - (start-qs vector :inline :offset 128) - (start-rot degrees :offset 144) - (start-st-rot degrees :offset 148) - (end-color vector :inline :offset 160) - (end-scale vector2 :inline :offset 176) - (end-offset vector2 :inline :offset 184) - (end-st-scale vector2 :inline :offset 192) - (end-st-offset vector2 :inline :offset 200) - (end-qs vector :inline :offset 208) - (end-rot degrees :offset 224) - (end-st-rot degrees :offset 228) + ((extra vector :inline :offset 240) + (func (function texture-anim-layer int) :offset 256) + (func-id symbol :offset 256) + (init-func (function texture-anim-layer int) :offset 260) + (init-func-id symbol :offset 260) + (tex texture :offset 264) + (start-time float :offset 268) + (end-time float :offset 272) + (tex-name string :offset 276) + (test gs-test :offset 280) + (alpha gs-alpha :offset 288) + (clamp gs-clamp :offset 296) + (start-color vector :inline :offset 80) + (start-scale vector2 :inline :offset 96) + (start-offset vector2 :inline :offset 104) + (start-st-scale vector2 :inline :offset 112) + (start-st-offset vector2 :inline :offset 120) + (start-qs vector :inline :offset 128) + (start-rot degrees :offset 144) + (start-st-rot degrees :offset 148) + (end-color vector :inline :offset 160) + (end-scale vector2 :inline :offset 176) + (end-offset vector2 :inline :offset 184) + (end-st-scale vector2 :inline :offset 192) + (end-st-offset vector2 :inline :offset 200) + (end-qs vector :inline :offset 208) + (end-rot degrees :offset 224) + (end-st-rot degrees :offset 228) ) :method-count-assert 11 :size-assert #x130 :flag-assert #xb00000130 (:methods - (texture-anim-layer-method-9 () none 9) - (texture-anim-layer-method-10 () none 10) + (texture-anim-layer-method-9 (_type_) _type_ 9) + (texture-anim-layer-method-10 (_type_) _type_ 10) ) ) @@ -82,29 +82,29 @@ ;; definition of type texture-anim (deftype texture-anim (structure) - ((num-layers uint32 :offset-assert 0) - (func symbol :offset-assert 4) - (func-id basic :offset 4) - (init-func symbol :offset-assert 8) - (init-func-id basic :offset 8) - (tex texture :offset-assert 12) - (tex-name string :offset-assert 16) - (extra vector :inline :offset-assert 32) - (color rgba :offset-assert 48) - (frame-time float :offset-assert 52) - (frame-delta float :offset-assert 56) - (frame-mod float :offset-assert 60) - (test gs-test :offset-assert 64) - (alpha gs-alpha :offset-assert 72) - (clamp gs-clamp :offset-assert 80) - (data texture-anim-layer :dynamic :offset-assert 88) + ((num-layers uint32 :offset-assert 0) + (func (function texture-anim int) :offset-assert 4) + (func-id symbol :offset 4) + (init-func (function texture-anim int) :offset-assert 8) + (init-func-id symbol :offset 8) + (tex texture :offset-assert 12) + (tex-name string :offset-assert 16) + (extra vector :inline :offset-assert 32) + (color rgba :offset-assert 48) + (frame-time float :offset-assert 52) + (frame-delta float :offset-assert 56) + (frame-mod float :offset-assert 60) + (test gs-test :offset-assert 64) + (alpha gs-alpha :offset-assert 72) + (clamp gs-clamp :offset-assert 80) + (data texture-anim-layer :dynamic :offset-assert 88) ) :method-count-assert 11 :size-assert #x58 :flag-assert #xb00000058 (:methods - (texture-anim-method-9 () none 9) - (texture-anim-method-10 () none 10) + (texture-anim-method-9 (_type_) _type_ 9) + (texture-anim-method-10 (_type_) _type_ 10) ) ) @@ -143,8 +143,8 @@ :size-assert #x10 :flag-assert #xb00000010 (:methods - (texture-anim-array-method-9 (_type_) none 9) - (texture-anim-array-method-10 () none 10) + (texture-anim-array-method-9 (_type_) _type_ 9) + (texture-anim-array-method-10 (_type_) _type_ 10) ) ) @@ -175,7 +175,7 @@ (corner2 vector :inline :offset-assert 192) (corner3 vector :inline :offset-assert 208) (const vector :inline :offset-assert 224) - (random vector 8 :inline :offset-assert 240) + (random vector4w 8 :inline :offset-assert 240) (random-index uint8 :offset-assert 368) ) :method-count-assert 9 @@ -465,3 +465,7 @@ ;; failed to figure out what this is: 0 + + + + diff --git a/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-tables_REF.gc b/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-tables_REF.gc index fd40e8bd53..1a38fca4be 100644 --- a/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-tables_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/texture/texture-anim-tables_REF.gc @@ -6,8 +6,8 @@ (the-as (texture-anim-array texture-anim) (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim - :func 'texture-anim-alpha-ramp-clut-upload - :init-func 'texture-anim-alpha-ramp-clut-init + :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) @@ -18,8 +18,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -31,8 +31,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 4800.0 :tex-name #f @@ -53,8 +53,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 4800.0 :tex-name #f @@ -77,8 +77,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -90,8 +90,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 2400.0 :tex-name #f @@ -112,8 +112,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 2400.0 :tex-name #f @@ -136,8 +136,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -149,8 +149,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 1200.0 :tex-name #f @@ -171,8 +171,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 1200.0 :tex-name #f @@ -195,8 +195,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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) @@ -208,8 +208,8 @@ :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 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -230,8 +230,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 16.0 :z 24.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -255,7 +255,7 @@ (new 'static 'texture-anim :num-layers #x4 :func #f - :init-func 'dest-texture-init + :init-func-id 'dest-texture-init :tex #f :tex-name #f :extra (new 'static 'vector :x 128.0 :y 16.0) @@ -265,8 +265,8 @@ :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 4.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -287,8 +287,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 5.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -309,8 +309,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 6.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -331,8 +331,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 8.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -356,7 +356,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'dest-texture-init + :init-func-id 'dest-texture-init :tex #f :tex-name #f :extra (new 'static 'vector :x 128.0 :y 8.0) @@ -366,8 +366,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 16.0) - :func 'move-rg-to-ba-texture-anim-layer-func - :init-func 'src-texture-init + :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 @@ -389,8 +389,8 @@ ) ) (new 'static 'texture-anim - :func 'texture-anim-cloud-clut-upload - :init-func 'texture-anim-cloud-clut-init + :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) @@ -400,8 +400,8 @@ :data (new 'static 'array texture-anim-layer 2) ) (new 'static 'texture-anim - :func 'fog-texture-anim-func - :init-func 'fog-texture-anim-init + :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) @@ -445,7 +445,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -466,7 +466,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -487,7 +487,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -521,7 +521,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -542,7 +542,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -563,7 +563,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -597,7 +597,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -618,7 +618,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -639,7 +639,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -673,7 +673,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -694,7 +694,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -715,7 +715,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -769,7 +769,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -790,7 +790,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -810,7 +810,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -853,7 +853,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -875,7 +875,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -897,7 +897,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -919,7 +919,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -964,7 +964,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -986,7 +986,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -1008,7 +1008,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -1030,7 +1030,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 450.0 @@ -1075,7 +1075,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -1096,7 +1096,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 diff --git a/test/decompiler/reference/jak2/engine/level/bsp-h_REF.gc b/test/decompiler/reference/jak2/engine/level/bsp-h_REF.gc index f8344cfbf1..39489d1eb7 100644 --- a/test/decompiler/reference/jak2/engine/level/bsp-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/bsp-h_REF.gc @@ -70,9 +70,11 @@ (region-trees (array drawable-tree-region-prim) :offset-assert 188) (region-array region-array :offset-assert 192) (collide-hash collide-hash :offset-assert 196) + (wind-array uint32 :offset 200) (wind-array-length int32 :offset 204) (city-level-info city-level-info :offset 208) (vis-spheres vector-array :offset 216) + (vis-spheres-length uint32 :offset 248) (region-tree drawable-tree-region-prim :offset 252) (tfrag-masks texture-masks-array :offset-assert 256) (tfrag-closest (pointer float) :offset-assert 260) @@ -88,7 +90,6 @@ (water-mask-count uint32 :offset 284) (bsp-scale vector :inline :offset-assert 288) (bsp-offset vector :inline :offset-assert 304) - (unk-data uint32 18 :offset 180) (end uint8 :offset 399) ) :method-count-assert 19 diff --git a/test/decompiler/reference/jak2/engine/level/level_REF.gc b/test/decompiler/reference/jak2/engine/level/level_REF.gc index 6e2b010e2c..c9e3db23b6 100644 --- a/test/decompiler/reference/jak2/engine/level/level_REF.gc +++ b/test/decompiler/reference/jak2/engine/level/level_REF.gc @@ -793,7 +793,7 @@ (let ((a0-8 (-> obj info texture-anim s4-0))) (if a0-8 (set! (-> obj texture-anim-array s4-0) - (the-as texture-anim-array (texture-anim-array-method-9 (the-as texture-anim-array (-> a0-8 value)))) + (texture-anim-array-method-9 (the-as texture-anim-array (-> a0-8 value))) ) ) ) @@ -1279,10 +1279,7 @@ (let ((a0-37 (-> obj info texture-anim s5-3))) (if a0-37 (set! (-> obj texture-anim-array s5-3) - (the-as - texture-anim-array - ((method-of-object (the-as texture-anim-array (-> a0-37 value)) texture-anim-array-method-10)) - ) + (texture-anim-array-method-10 (the-as texture-anim-array (-> a0-37 value))) ) ) ) diff --git a/test/decompiler/reference/jak2/levels/castle/boss/casboss-texture_REF.gc b/test/decompiler/reference/jak2/levels/castle/boss/casboss-texture_REF.gc index 15872efd96..b5deb2c538 100644 --- a/test/decompiler/reference/jak2/levels/castle/boss/casboss-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/castle/boss/casboss-texture_REF.gc @@ -7,7 +7,7 @@ (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim :num-layers #x5 - :func 'krew-texture-anim-func + :func-id 'krew-texture-anim-func :init-func #f :tex #f :tex-name "krew-holo-dest" @@ -19,7 +19,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -41,7 +41,7 @@ :end-st-rot (degrees 3932160.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -62,7 +62,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -84,7 +84,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -106,7 +106,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 diff --git a/test/decompiler/reference/jak2/levels/city/common/ctywide-texture_REF.gc b/test/decompiler/reference/jak2/levels/city/common/ctywide-texture_REF.gc index 72737cbc84..be7cfb437d 100644 --- a/test/decompiler/reference/jak2/levels/city/common/ctywide-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/common/ctywide-texture_REF.gc @@ -19,7 +19,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 4800.0 @@ -40,7 +40,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 4800.0 @@ -74,7 +74,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 4800.0 @@ -95,7 +95,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 600.0 @@ -116,7 +116,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 600.0 diff --git a/test/decompiler/reference/jak2/levels/city/oracle/oracle-texture_REF.gc b/test/decompiler/reference/jak2/levels/city/oracle/oracle-texture_REF.gc index 4c278a94ca..4496b9b2a0 100644 --- a/test/decompiler/reference/jak2/levels/city/oracle/oracle-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/city/oracle/oracle-texture_REF.gc @@ -17,7 +17,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -38,7 +38,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -59,7 +59,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -93,7 +93,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -114,7 +114,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -135,7 +135,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -169,7 +169,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -190,7 +190,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -211,7 +211,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -245,7 +245,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -266,7 +266,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -287,7 +287,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -321,7 +321,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -342,7 +342,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -363,7 +363,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -397,7 +397,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -418,7 +418,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -439,7 +439,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/test/decompiler/reference/jak2/levels/consite/consite-texture_REF.gc b/test/decompiler/reference/jak2/levels/consite/consite-texture_REF.gc index 6f70b8c031..41a41b0e9b 100644 --- a/test/decompiler/reference/jak2/levels/consite/consite-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/consite/consite-texture_REF.gc @@ -17,7 +17,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -38,7 +38,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -72,7 +72,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -93,7 +93,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -127,7 +127,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -148,7 +148,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -182,7 +182,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -203,7 +203,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -237,7 +237,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -258,7 +258,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -292,7 +292,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -313,7 +313,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/test/decompiler/reference/jak2/levels/dig/dig-texture_REF.gc b/test/decompiler/reference/jak2/levels/dig/dig-texture_REF.gc index 0cdea38dad..99c48bcb1f 100644 --- a/test/decompiler/reference/jak2/levels/dig/dig-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/dig/dig-texture_REF.gc @@ -19,7 +19,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 @@ -40,7 +40,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 @@ -84,7 +84,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 @@ -105,7 +105,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 3600.0 diff --git a/test/decompiler/reference/jak2/levels/fortress/ammo_dump/fordumpa-texture_REF.gc b/test/decompiler/reference/jak2/levels/fortress/ammo_dump/fordumpa-texture_REF.gc index 096e24daf1..4235869428 100644 --- a/test/decompiler/reference/jak2/levels/fortress/ammo_dump/fordumpa-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/ammo_dump/fordumpa-texture_REF.gc @@ -17,7 +17,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -51,7 +51,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -94,7 +94,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 diff --git a/test/decompiler/reference/jak2/levels/fortress/prison/intro-texture_REF.gc b/test/decompiler/reference/jak2/levels/fortress/prison/intro-texture_REF.gc index dda1a7bc6b..0481650af0 100644 --- a/test/decompiler/reference/jak2/levels/fortress/prison/intro-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/fortress/prison/intro-texture_REF.gc @@ -17,7 +17,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -38,7 +38,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -59,7 +59,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -93,7 +93,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -114,7 +114,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -135,7 +135,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -169,7 +169,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -190,7 +190,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -211,7 +211,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -245,7 +245,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -266,7 +266,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -287,7 +287,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -321,7 +321,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -342,7 +342,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -363,7 +363,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -397,7 +397,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -418,7 +418,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -439,7 +439,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -473,7 +473,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -494,7 +494,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -515,7 +515,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/test/decompiler/reference/jak2/levels/landing_pad/castle-texture_REF.gc b/test/decompiler/reference/jak2/levels/landing_pad/castle-texture_REF.gc index 8dd7b458de..5278050010 100644 --- a/test/decompiler/reference/jak2/levels/landing_pad/castle-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/landing_pad/castle-texture_REF.gc @@ -268,8 +268,8 @@ (the-as (texture-anim-array texture-anim) (new 'static 'texture-anim-array :type texture-anim (new 'static 'texture-anim - :func 'texture-anim-alpha-ramp-clut-upload - :init-func 'texture-anim-alpha-ramp-clut-init + :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 28.0) @@ -280,8 +280,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 8.0) @@ -293,8 +293,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -315,8 +315,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 600.0 :tex-name #f @@ -339,8 +339,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 9.0) @@ -352,8 +352,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -374,8 +374,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -398,8 +398,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 10.0) @@ -412,8 +412,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 150.0 :tex-name #f @@ -434,8 +434,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 150.0 :tex-name #f @@ -458,8 +458,8 @@ ) (new 'static 'texture-anim :num-layers #x2 - :func 'cloud-texture-anim-func - :init-func 'dest-texture-init + :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 12.0) @@ -472,8 +472,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 75.0 :tex-name #f @@ -494,8 +494,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 20.0 :z 28.0) - :func 'cloud-texture-anim-layer-func - :init-func 'noise-texture-init + :func-id 'cloud-texture-anim-layer-func + :init-func-id 'noise-texture-init :tex #f :end-time 75.0 :tex-name #f @@ -519,7 +519,7 @@ (new 'static 'texture-anim :num-layers #x4 :func #f - :init-func 'dest-texture-init + :init-func-id 'dest-texture-init :tex #f :tex-name #f :extra (new 'static 'vector :x 128.0 :y 20.0) @@ -529,8 +529,8 @@ :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 16.0 :y 8.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -551,8 +551,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 32.0 :y 9.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -573,8 +573,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 64.0 :y 10.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -595,8 +595,8 @@ ) (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 12.0) - :func 'default-texture-anim-layer-func - :init-func 'src-texture-init + :func-id 'default-texture-anim-layer-func + :init-func-id 'src-texture-init :tex #f :end-time 300.0 :tex-name #f @@ -620,7 +620,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-change-mt8h-init + :init-func-id 'texture-anim-change-mt8h-init :tex #f :tex-name "cas-toxic-slime-dest" :extra (new 'static 'vector :x 28.0 :y 12.0 :z 128.0 :w 128.0) @@ -630,8 +630,8 @@ :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer :extra (new 'static 'vector :x 128.0 :y 20.0) - :func 'move-rg-to-ba-texture-anim-layer-func - :init-func 'src-texture-init + :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 @@ -653,8 +653,8 @@ ) ) (new 'static 'texture-anim - :func 'texture-anim-slime-clut-upload - :init-func 'texture-anim-slime-clut-init + :func-id 'texture-anim-slime-clut-upload + :init-func-id 'texture-anim-slime-clut-init :tex #f :tex-name #f :extra (new 'static 'vector :x 28.0) @@ -666,7 +666,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-toxic-slime-scroll-dest" :extra (new 'static 'vector :x 64.0 :y 64.0) @@ -677,7 +677,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -749,7 +749,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -761,7 +761,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -786,7 +786,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest-01" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -798,7 +798,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -823,7 +823,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest-02" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -835,7 +835,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -860,7 +860,7 @@ (new 'static 'texture-anim :num-layers #x1 :func #f - :init-func 'texture-anim-overide-size-init + :init-func-id 'texture-anim-overide-size-init :tex #f :tex-name "cas-conveyor-dest-03" :extra (new 'static 'vector :x 64.0 :y 32.0) @@ -872,7 +872,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 diff --git a/test/decompiler/reference/jak2/levels/nest/boss/nest-texture_REF.gc b/test/decompiler/reference/jak2/levels/nest/boss/nest-texture_REF.gc index b7b100400f..82902ba9b7 100644 --- a/test/decompiler/reference/jak2/levels/nest/boss/nest-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/nest/boss/nest-texture_REF.gc @@ -17,7 +17,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -38,7 +38,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -59,7 +59,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -93,7 +93,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -114,7 +114,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -135,7 +135,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -169,7 +169,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -190,7 +190,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -211,7 +211,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -245,7 +245,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -266,7 +266,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -287,7 +287,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -321,7 +321,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -342,7 +342,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -363,7 +363,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'set-clut-alpha-texture-anim-layer-func + :func-id 'set-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -397,7 +397,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -418,7 +418,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'blend-clut-texture-anim-layer-func + :func-id 'blend-clut-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 @@ -439,7 +439,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'copy-clut-alpha-texture-anim-layer-func + :func-id 'copy-clut-alpha-texture-anim-layer-func :init-func #f :tex #f :end-time 1.0 diff --git a/test/decompiler/reference/jak2/levels/palace/roof/palboss-texture_REF.gc b/test/decompiler/reference/jak2/levels/palace/roof/palboss-texture_REF.gc index d6835384ee..538e8f6236 100644 --- a/test/decompiler/reference/jak2/levels/palace/roof/palboss-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/palace/roof/palboss-texture_REF.gc @@ -19,7 +19,7 @@ :clamp (new 'static 'gs-clamp :wms (gs-tex-wrap-mode clamp) :wmt (gs-tex-wrap-mode clamp)) :data (new 'static 'array texture-anim-layer 6 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -40,7 +40,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -61,7 +61,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -81,7 +81,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 @@ -103,7 +103,7 @@ :end-st-rot (degrees 65536.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 1200.0 diff --git a/test/decompiler/reference/jak2/levels/stadium/stadiumb-texture_REF.gc b/test/decompiler/reference/jak2/levels/stadium/stadiumb-texture_REF.gc index 474319d4ca..394257b040 100644 --- a/test/decompiler/reference/jak2/levels/stadium/stadiumb-texture_REF.gc +++ b/test/decompiler/reference/jak2/levels/stadium/stadiumb-texture_REF.gc @@ -18,7 +18,7 @@ :alpha (new 'static 'gs-alpha :b #x1 :d #x1) :data (new 'static 'array texture-anim-layer 2 (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0 @@ -39,7 +39,7 @@ :end-qs (new 'static 'vector :x 1.0 :y 1.0 :z 1.0 :w 1.0) ) (new 'static 'texture-anim-layer - :func 'default-texture-anim-layer-func + :func-id 'default-texture-anim-layer-func :init-func #f :tex #f :end-time 300.0