diff --git a/decompiler/config/jak1/all-types.gc b/decompiler/config/jak1/all-types.gc index 8667f7a575..63039b8856 100644 --- a/decompiler/config/jak1/all-types.gc +++ b/decompiler/config/jak1/all-types.gc @@ -1032,7 +1032,7 @@ (sidekick-hint-rounddoor #x23c) (sidekick-hint-lurkerm #x23d) (sidekick-hint-tower #x23e) - + (sidekick-reminder-fish #x240) (firecanyon-need-cells #x24f) @@ -1653,6 +1653,7 @@ (speedrun-hub2-100 #x1522) (speedrun-hub3-100 #x1523) (speedrun-all-cutscenes #x1524) + (speedrun-low-collect #x1525) ;; input options (input-options #x1600) 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 df67846696..6cad4cba2a 100644 --- a/game/assets/jak1/text/game_custom_text_en-US.json +++ b/game/assets/jak1/text/game_custom_text_en-US.json @@ -200,6 +200,7 @@ "1522": "HUB 2 100%", "1523": "HUB 3 100%", "1524": "ALL CUTSCENES", + "1525": "LOW COLLECT PRAC", "1600": "INPUT OPTIONS", "1601": "SELECT CONTROLLER", "1602": "ANALOG DEADZONE", diff --git a/goal_src/jak1/engine/ui/text-h.gc b/goal_src/jak1/engine/ui/text-h.gc index 777bfae6be..83d39bfe14 100644 --- a/goal_src/jak1/engine/ui/text-h.gc +++ b/goal_src/jak1/engine/ui/text-h.gc @@ -801,6 +801,7 @@ (speedrun-hub2-100 #x1522) (speedrun-hub3-100 #x1523) (speedrun-all-cutscenes #x1524) + (speedrun-low-collect #x1525) ;; input options (input-options #x1600) diff --git a/goal_src/jak1/game.gp b/goal_src/jak1/game.gp index 0817caae2e..85c0a5e1ae 100644 --- a/goal_src/jak1/game.gp +++ b/goal_src/jak1/game.gp @@ -472,6 +472,7 @@ :deps ;; no idea what these depend on, make it depend on the whole engine ("$OUT/obj/ticky.o") + "village_common/villagep-obs.gc" "village_common/oracle.gc" @@ -1727,7 +1728,7 @@ :deps ("$OUT/obj/display.o" "$OUT/obj/decomp-h.o") - + "engine/connect.gc" "ui/text-h.gc" "game/settings-h.gc" diff --git a/goal_src/jak1/levels/racer_common/racer.gc b/goal_src/jak1/levels/racer_common/racer.gc index 928a6a4ae1..a5a1dff7b3 100644 --- a/goal_src/jak1/levels/racer_common/racer.gc +++ b/goal_src/jak1/levels/racer_common/racer.gc @@ -6,7 +6,7 @@ ;; dgos: L1, FIC, LAV, MIS, OGR, RACERP, ROL (define-extern *allow-zoomer-anywhere* symbol) - +(define-extern *speedrun-info* speedrun-info-jak1) (define-extern blocking-plane-destroy (function none)) (define-extern blocking-plane-spawn (function curve-control none :behavior process)) @@ -242,15 +242,32 @@ (set! (-> v1-25 height) (the float 80)) ) (set! (-> gp-0 flags) (font-flags shadow kerning large)) - (print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22) - ) - (if *allow-zoomer-anywhere* ;; if "self" is passed instead of #f, deloading level/zoomer will crash - (if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing #f)) - (go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return))) + + (cond + ((and (= (-> *speedrun-info* category) (speedrun-category low-collect-prac)) + (= (-> (level-get-target-inside *level*) name) 'firecanyon) + (!= (-> *game-info* current-continue) (get-continue-by-name *game-info* "firecanyon-end")) + ) + ;; skip FCS for low-collect-prac + (print-game-text (lookup-text! *common-text* (text-id press-to-warp) #f) gp-0 #f 128 22) + (if (cpad-pressed? 0 circle) + (send-event *target* 'continue (get-continue-by-name *game-info* "firecanyon-end")) + ) ) - (if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing self)) - (go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return))) + (*allow-zoomer-anywhere* ;; if "self" is passed instead of #f, deloading level/zoomer will crash + (print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22) + (if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing #f)) + (go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return))) + ) + ) + (else + ;; vanilla + (print-game-text (lookup-text! *common-text* (text-id press-to-use) #f) gp-0 #f 128 22) + (if (and (or (cpad-pressed? 0 circle) (= (-> self condition) 4)) (send-event *target* 'change-mode 'racing self)) + (go-virtual pickup (the-as (state collectable) (method-of-object self wait-for-return))) + ) ) + ) ) ) ) diff --git a/goal_src/jak1/pc/features/speedruns-h.gc b/goal_src/jak1/pc/features/speedruns-h.gc index 97d167d783..ac96b9efb4 100644 --- a/goal_src/jak1/pc/features/speedruns-h.gc +++ b/goal_src/jak1/pc/features/speedruns-h.gc @@ -36,6 +36,7 @@ (hub2-100 118) ;; Hub 2 100% (all of Hub 1 completed) (hub3-100 119) ;; Hub 3 100% (all of Hub 1+2 completed) (all-cutscenes 120) ;; All Cutscenes + (low-collect-prac 121) ;; Low collectables Practice ) (deftype speedrun-info-jak1 (structure) diff --git a/goal_src/jak1/pc/features/speedruns.gc b/goal_src/jak1/pc/features/speedruns.gc index 0b7268c530..80c9a381a0 100644 --- a/goal_src/jak1/pc/features/speedruns.gc +++ b/goal_src/jak1/pc/features/speedruns.gc @@ -233,6 +233,11 @@ ;; spawn at the geyser warp gate checkpoint (initialize! *game-info* 'game (the-as game-save #f) "intro-start") ) + (((speedrun-category low-collect-prac)) + ;; spawn at the geyser warp gate checkpoint + + (initialize! *game-info* 'game (the-as game-save #f) "game-start") + ) (else (format 0 "start-speedrun: unrecognized category ~S~%" (enum->string speedrun-category (-> *speedrun-info* category))) ) @@ -409,6 +414,10 @@ (((speedrun-category all-cutscenes)) ;; no post-blackout actions needed ) + (((speedrun-category low-collect-prac)) + ;; skip keira intro cutscene a + (close-specific-task! (game-task firecanyon-assistant) (task-status need-reward-speech)) + ) (else (format 0 "setup-speedrun-post-blackout: unrecognized category ~S~%" (enum->string speedrun-category (-> *speedrun-info* category))) ) @@ -759,7 +768,7 @@ (when (-> *tmp-continue-point* level) (set! *practice-spawn-post-init* custom-reset-multi-post-init) ;; fully reset game if r2 held too - (if (cpad-hold? 0 r2) + (if (cpad-hold? 0 r2) (initialize! *game-info* 'game (the-as game-save #f) "default") ) ;; store last real checkpoint to restore later diff --git a/goal_src/jak1/pc/progress-pc.gc b/goal_src/jak1/pc/progress-pc.gc index 33fc9e9381..d3f506a942 100644 --- a/goal_src/jak1/pc/progress-pc.gc +++ b/goal_src/jak1/pc/progress-pc.gc @@ -484,6 +484,7 @@ (new 'static 'game-option :option-type (game-option-type button) :name (text-id speedrun-hub2-100) :scale #t) (new 'static 'game-option :option-type (game-option-type button) :name (text-id speedrun-hub3-100) :scale #t) (new 'static 'game-option :option-type (game-option-type button) :name (text-id speedrun-all-cutscenes) :scale #t) + (new 'static 'game-option :option-type (game-option-type button) :name (text-id speedrun-low-collect) :scale #t) (new 'static 'game-option :option-type (game-option-type button) :name (text-id back) :scale #t) ) ) @@ -1798,6 +1799,9 @@ (((text-id speedrun-all-cutscenes)) (progress-fast-save-and-start-speedrun (speedrun-category all-cutscenes)) ) + (((text-id speedrun-low-collect)) + (progress-fast-save-and-start-speedrun (speedrun-category low-collect-prac)) + ) ) (commit-to-file *pc-settings*) ;; other behaviors are hardcoded elsewhere because screw you.