mirror of
https://github.com/open-goal/jak-project
synced 2026-08-19 06:02:15 -04:00
jak1/speedruns: Some final touches for speedrunning in jak 1 (#1830)
* jak1: put common speedrunning code into it's own file * jak1: enforce `60` fps while in speedrunning mode * jak1: when speedrunning, display the version until you get the first powercell * jak1: add an explicit option for skipping cutscenes * jak1: extend `game-option` to allow any menu option to be disabled * tests/jak1: allow whitelisting types to be redefined to satisfy typeconsistency checks * jak1: add file headers * jak1: cleanup bool checking * test: delete the es substitle file * test: add it back * jak1: missed one cleanup spot related to bool comparisons
This commit is contained in:
@@ -436,7 +436,9 @@
|
||||
;; save a sort of timestamp just so we know whether it took at least 1 frame
|
||||
(#when PC_PORT
|
||||
(define *play-anim-time* (current-time)))
|
||||
(if (#if PC_PORT #t (and *debug-segment* *cheat-mode*))
|
||||
(if (#if PC_PORT
|
||||
(= (-> *pc-settings* cutscene-skips?) #t)
|
||||
(and *debug-segment* *cheat-mode*))
|
||||
(ja-play-spooled-anim
|
||||
(the-as spool-anim arg1)
|
||||
arg0
|
||||
|
||||
@@ -4721,6 +4721,7 @@
|
||||
(flag "br-portuguese" 13 dm-text-language)
|
||||
)
|
||||
(flag "Discord RPC" #t ,(dm-lambda-boolean-flag (-> *pc-settings* discord-rpc?)))
|
||||
(flag "Cutscene Skips" #t ,(dm-lambda-boolean-flag (-> *pc-settings* cutscene-skips?)))
|
||||
(flag "Speedrunner Mode" #t ,(dm-lambda-boolean-flag (-> *pc-settings* speedrunner-mode?)))
|
||||
(menu "PS2 settings"
|
||||
;(flag "PS2 Load speed" #f ,(dm-lambda-boolean-flag (-> *pc-settings* ps2-read-speed?)))
|
||||
|
||||
@@ -695,9 +695,13 @@
|
||||
|
||||
(with-profiler "menu"
|
||||
(with-pc
|
||||
(if (and (-> *pc-settings* display-sha) *debug-segment*)
|
||||
(draw-build-revision)))
|
||||
|
||||
(cond ((and (= (-> *pc-settings* speedrunner-mode?) #t)
|
||||
(< (-> *autosplit-info-jak1* num-power-cells) 1))
|
||||
;; display the revision before you collect your first powercell
|
||||
(draw-build-revision))
|
||||
((and (-> *pc-settings* display-sha) *debug-segment*)
|
||||
;; otherwise, only draw if we are in debug mode and the setting isn't enabled
|
||||
(draw-build-revision))))
|
||||
(*menu-hook*)
|
||||
(add-ee-profile-frame 'draw :g #x40)
|
||||
|
||||
|
||||
@@ -227,10 +227,11 @@
|
||||
(param2 float :offset-assert 28)
|
||||
(param3 game-option-menu :offset-assert 32)
|
||||
(value-to-modify pointer :offset-assert 36)
|
||||
(option-disabled-func (function symbol) :offset-assert 40) ;; added in pc port
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
:size-assert #x2C
|
||||
:flag-assert #x90000002C
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -1727,18 +1727,10 @@
|
||||
(let ((gp-1 (-> *setting-control* default auto-save)))
|
||||
(sound-volume-off)
|
||||
(set! (-> *game-info* mode) 'play)
|
||||
;; Start a new game differently if speedrunning mode is active
|
||||
(cond
|
||||
;; Start a new game differently if speedrunning mode is active
|
||||
((= (-> *pc-settings* speedrunner-mode?) #t)
|
||||
(update-autosplit-jak1-new-game)
|
||||
;; spawn at the warp gate
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "game-start")
|
||||
;; disable hints (this seems to be overriden by your slot 1 save though)
|
||||
(set! (-> *setting-control* default play-hints) #f)
|
||||
;; skip intro cutscene
|
||||
(close-specific-task! (game-task intro) (task-status need-resolution))
|
||||
;; enable auto saving by default
|
||||
(set! (-> *setting-control* default auto-save) #t))
|
||||
(speedrun-start-run))
|
||||
;; start the game normally
|
||||
(else
|
||||
(initialize! *game-info* 'game (the-as game-save #f) "intro-start")
|
||||
|
||||
@@ -759,6 +759,7 @@
|
||||
(hint-0 #x1300)
|
||||
(hint-511 #x14ff)
|
||||
(speedrunner-mode #x1500)
|
||||
(cutscene-skips #x1501)
|
||||
;; GAME-TEXT-ID ENUM ENDS
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user