game/speedrunning: Add struct with relevant information to facilitate Auto Splitting (#1775)

* game: add auto-splitter structs

* game/jak1: wire up auto-splitter updating to game when in SR mode

* game/jak1: add info to split on picking up white eco

* game/jak1: add another two tasks for fish and finalboss

* game/jak1: autosplitting code entirely in GOAL
This commit is contained in:
Tyler Wilding
2022-08-22 18:55:08 -04:00
committed by GitHub
parent 06ef52cd25
commit 346a258902
14 changed files with 302 additions and 3 deletions
-1
View File
@@ -145,7 +145,6 @@ set(RUNTIME_SOURCE
graphics/pipelines/opengl.cpp
system/vm/dmac.cpp
system/vm/vm.cpp
tools/subtitles/subtitle_editor.h
tools/subtitles/subtitle_editor.cpp)
find_package(Git)
+4
View File
@@ -412,6 +412,10 @@ int get_monitor_count() {
return Gfx::get_monitor_count();
}
int get_unix_timestamp() {
return std::time(nullptr);
}
void mkdir_path(u32 filepath) {
auto filepath_str = std::string(Ptr<String>(filepath).c()->data());
file_util::create_dir_if_needed_for_file(filepath_str);
+1
View File
@@ -64,6 +64,7 @@ void get_screen_size(s64 vmode_idx, u32 w_ptr, u32 h_ptr);
s64 get_screen_rate(s64 vmode_idx);
s64 get_screen_vmode_count();
int get_monitor_count();
int get_unix_timestamp();
void mkdir_path(u32 filepath);
u64 filepath_exists(u32 filepath);
void prof_event(u32 name, u32 kind);
+1
View File
@@ -645,6 +645,7 @@ void InitMachine_PCPort() {
make_function_symbol_from_c("pc-set-window-lock", (void*)set_window_lock);
make_function_symbol_from_c("pc-set-game-resolution", (void*)set_game_resolution);
make_function_symbol_from_c("pc-set-msaa", (void*)set_msaa);
make_function_symbol_from_c("pc-get-unix-timestamp", (void*)get_unix_timestamp);
// graphics things
make_function_symbol_from_c("pc-set-letterbox", (void*)Gfx::set_letterbox);
+1 -1
View File
@@ -39,4 +39,4 @@ struct DiscordInfo {
u32 flutflut; // are we riding on flut flut?
u32 time_of_day;
};
} // namespace jak1
} // namespace jak1
+2
View File
@@ -197,6 +197,8 @@
("game-save.o" "game-save")
("settings.o" "settings")
("pc-anim-util.o" "pc-anim-util") ;; added
("autosplit-h.o" "autosplit-h") ;; added
("autosplit.o" "autosplit") ;; added
("pckernel.o" "pckernel") ;; added
("mood-tables.o" "mood-tables")
("mood.o" "mood")
+2
View File
@@ -193,6 +193,8 @@
("game-save.o" "game-save")
("settings.o" "settings")
("pc-anim-util.o" "pc-anim-util") ;; added
("autosplit-h.o" "autosplit-h") ;; added
("autosplit.o" "autosplit") ;; added
("pckernel.o" "pckernel") ;; added
("mood-tables.o" "mood-tables")
("mood.o" "mood")
@@ -1730,6 +1730,7 @@
;; Start a new game differently if speedrunning mode is active
(cond
((= (-> *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)
+3 -1
View File
@@ -2037,9 +2037,11 @@
)
;; Custom or Modified Code
(goal-src "pc/features/autosplit-h.gc")
(goal-src "pc/features/autosplit.gc" "autosplit-h" "task-control-h")
(goal-src "pc/pckernel-h.gc" "dma-buffer")
(goal-src "pc/util/pc-anim-util.gc" "target-h")
(goal-src "pc/pckernel.gc" "pc-anim-util" "settings" "video" "target-h")
(goal-src "pc/pckernel.gc" "pc-anim-util" "settings" "video" "target-h" "autosplit-h")
(goal-src "pc/subtitle.gc" "text" "pckernel" "hint-control" "loader-h" "gsound" "ambient")
(goal-src "pc/progress-pc.gc" "progress" "pckernel")
(goal-src "pc/util/anim-tester-x.gc" "pckernel" "gstring" "joint" "process-drawable" "art-h" "effect-control")
+2
View File
@@ -366,6 +366,8 @@
(define-extern pc-set-msaa (function int none))
(define-extern pc-set-gfx-hack (function pc-gfx-hack symbol none))
(define-extern pc-get-unix-timestamp (function int))
(defenum pc-prof-event
(begin 0)
(end 1)
+136
View File
@@ -0,0 +1,136 @@
;;-*-Lisp-*-
(in-package goal)
;; LiveSplit ASL requires all settings to initalized _before_ you connect the process
;; Therefore everything has to be laid out in a predictable fashion before hand
;; So this is a lot of hard-coding, but not too bad when just copied from the debug menu code
;;
;; DO NOT change the order, appending to the end is safe!
(deftype autosplit-info-jak1 (structure)
((marker uint8 20) ;; UnLiStEdStRaTs_JaK1 - DONT EVER CHANGE THIS
;; General stats
(num-power-cells uint32)
(num-orbs uint32)
(num-scout-flies uint32)
(padding-stats uint8 200) ;; padding for future growth
;; loading/cutscene/control related info
(game-hash uint32)
(in-cutscene? symbol)
(is-loading? symbol)
(padding-controls uint8 200) ;; padding for future growth
;; need-resolution tasks
(res-training-gimmie uint8)
(res-training-door uint8)
(res-training-climb uint8)
(res-training-buzzer uint8)
(res-jungle-eggtop uint8)
(res-jungle-lurkerm uint8)
(res-jungle-tower uint8)
(res-jungle-fishgame uint8)
(res-jungle-plant uint8)
(res-jungle-buzzer uint8)
(res-jungle-canyon-end uint8)
(res-jungle-temple-door uint8)
(res-village1-yakow uint8)
(res-village1-mayor-money uint8)
(res-village1-uncle-money uint8)
(res-village1-oracle-money1 uint8)
(res-village1-oracle-money2 uint8)
(res-village1-buzzer uint8)
(res-beach-ecorocks uint8)
(res-beach-pelican uint8)
(res-beach-flutflut uint8)
(res-beach-seagull uint8)
(res-beach-cannon uint8)
(res-beach-buzzer uint8)
(res-beach-gimmie uint8)
(res-beach-sentinel uint8)
(res-misty-muse uint8)
(res-misty-boat uint8)
(res-misty-warehouse uint8)
(res-misty-cannon uint8)
(res-misty-bike uint8)
(res-misty-buzzer uint8)
(res-misty-bike-jump uint8)
(res-misty-eco-challenge uint8)
(res-village2-gambler-money uint8)
(res-village2-geologist-money uint8)
(res-village2-warrior-money uint8)
(res-village2-oracle-money1 uint8)
(res-village2-oracle-money2 uint8)
(res-village2-buzzer uint8)
(res-swamp-billy uint8)
(res-swamp-flutflut uint8)
(res-swamp-battle uint8)
(res-swamp-tether-1 uint8)
(res-swamp-tether-2 uint8)
(res-swamp-tether-3 uint8)
(res-swamp-tether-4 uint8)
(res-swamp-buzzer uint8)
(res-swamp-arm uint8)
(res-sunken-platforms uint8)
(res-sunken-pipe uint8)
(res-sunken-slide uint8)
(res-sunken-room uint8)
(res-sunken-sharks uint8)
(res-sunken-buzzer uint8)
(res-sunken-top-of-helix uint8)
(res-sunken-spinning-room uint8)
(res-rolling-race uint8)
(res-rolling-robbers uint8)
(res-rolling-moles uint8)
(res-rolling-plants uint8)
(res-rolling-lake uint8)
(res-rolling-buzzer uint8)
(res-rolling-ring-chase-1 uint8)
(res-rolling-ring-chase-2 uint8)
(res-snow-eggtop uint8)
(res-snow-ram uint8)
(res-snow-fort uint8)
(res-snow-ball uint8)
(res-snow-bunnies uint8)
(res-snow-buzzer uint8)
(res-snow-bumpers uint8)
(res-snow-cage uint8)
(res-red-eggtop uint8)
(res-firecanyon-buzzer uint8)
(res-firecanyon-end uint8)
(res-citadel-sage-green uint8)
(res-citadel-sage-blue uint8)
(res-citadel-sage-red uint8)
(res-citadel-sage-yellow uint8)
(res-citadel-buzzer uint8)
(res-village3-extra1 uint8)
(res-village3-buzzer uint8)
(res-village3-miner-money1 uint8)
(res-village3-miner-money2 uint8)
(res-village3-miner-money3 uint8)
(res-village3-miner-money4 uint8)
(res-village3-oracle-money1 uint8)
(res-village3-oracle-money2 uint8)
(res-cave-gnawers uint8)
(res-cave-dark-crystals uint8)
(res-cave-dark-climb uint8)
(res-cave-robot-climb uint8)
(res-cave-swing-poles uint8)
(res-cave-spider-tunnel uint8)
(res-cave-platforms uint8)
(res-cave-buzzer uint8)
(res-ogre-boss uint8)
(res-ogre-end uint8)
(res-ogre-buzzer uint8)
(res-ogre-secret uint8)
(res-lavatube-end uint8)
(res-lavatube-buzzer uint8)
(res-lavatube-balls uint8)
(res-intro uint8)
;; misc other tasks
(int-finalboss-movies uint8)
(unk-finalboss-movies uint8)
(int-jungle-fishgame uint8)
;; end marker just to make things look nice in a memory view
(end-marker uint8 4)))
(define-extern *autosplit-info-jak1* autosplit-info-jak1)
(define-extern update-autosplit-info-jak1 (function none))
(define-extern update-autosplit-jak1-new-game (function none))
+141
View File
@@ -0,0 +1,141 @@
;;-*-Lisp-*-
(in-package goal)
(define *autosplit-info-jak1* (new 'static 'autosplit-info-jak1))
;; Setup markers
(charp<-string (-> *autosplit-info-jak1* marker) "UnLiStEdStRaTs_JaK1")
(charp<-string (-> *autosplit-info-jak1* end-marker) "end")
;; Setup Padding
(charp<-string (-> *autosplit-info-jak1* padding-stats) "padding-stats!")
(charp<-string (-> *autosplit-info-jak1* padding-controls) "padding-controls!")
(defun update-autosplit-info-jak1 ()
;; general statistics
(set! (-> *autosplit-info-jak1* num-power-cells) (the int (-> *game-info* fuel)))
(set! (-> *autosplit-info-jak1* num-orbs) (the int (-> *game-info* money-total)))
(set! (-> *autosplit-info-jak1* num-scout-flies) (the int (-> *game-info* buzzer-total)))
;; loading/cutscene related flags
(set! (-> *autosplit-info-jak1* in-cutscene?) (-> *pc-settings* movie?))
;; need resolution flags
;; TODO - a macro for this would be nice
(set! (-> *autosplit-info-jak1* res-training-gimmie) (if (task-closed? (game-task training-gimmie) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-training-door) (if (task-closed? (game-task training-door) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-training-climb) (if (task-closed? (game-task training-climb) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-training-buzzer) (if (task-closed? (game-task training-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-eggtop) (if (task-closed? (game-task jungle-eggtop) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-lurkerm) (if (task-closed? (game-task jungle-lurkerm) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-tower) (if (task-closed? (game-task jungle-tower) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-fishgame) (if (task-closed? (game-task jungle-fishgame) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-plant) (if (task-closed? (game-task jungle-plant) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-buzzer) (if (task-closed? (game-task jungle-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-canyon-end) (if (task-closed? (game-task jungle-canyon-end) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-jungle-temple-door) (if (task-closed? (game-task jungle-temple-door) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village1-yakow) (if (task-closed? (game-task village1-yakow) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village1-mayor-money) (if (task-closed? (game-task village1-mayor-money) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village1-uncle-money) (if (task-closed? (game-task village1-uncle-money) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village1-oracle-money1) (if (task-closed? (game-task village1-oracle-money1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village1-oracle-money2) (if (task-closed? (game-task village1-oracle-money2) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village1-buzzer) (if (task-closed? (game-task village1-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-ecorocks) (if (task-closed? (game-task beach-ecorocks) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-pelican) (if (task-closed? (game-task beach-pelican) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-flutflut) (if (task-closed? (game-task beach-flutflut) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-seagull) (if (task-closed? (game-task beach-seagull) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-cannon) (if (task-closed? (game-task beach-cannon) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-buzzer) (if (task-closed? (game-task beach-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-gimmie) (if (task-closed? (game-task beach-gimmie) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-beach-sentinel) (if (task-closed? (game-task beach-sentinel) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-muse) (if (task-closed? (game-task misty-muse) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-boat) (if (task-closed? (game-task misty-boat) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-warehouse) (if (task-closed? (game-task misty-warehouse) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-cannon) (if (task-closed? (game-task misty-cannon) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-bike) (if (task-closed? (game-task misty-bike) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-buzzer) (if (task-closed? (game-task misty-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-bike-jump) (if (task-closed? (game-task misty-bike-jump) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-misty-eco-challenge) (if (task-closed? (game-task misty-eco-challenge) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village2-gambler-money) (if (task-closed? (game-task village2-gambler-money) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village2-geologist-money) (if (task-closed? (game-task village2-geologist-money) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village2-warrior-money) (if (task-closed? (game-task village2-warrior-money) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village2-oracle-money1) (if (task-closed? (game-task village2-oracle-money1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village2-oracle-money2) (if (task-closed? (game-task village2-oracle-money2) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village2-buzzer) (if (task-closed? (game-task village2-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-billy) (if (task-closed? (game-task swamp-billy) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-flutflut) (if (task-closed? (game-task swamp-flutflut) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-battle) (if (task-closed? (game-task swamp-battle) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-tether-1) (if (task-closed? (game-task swamp-tether-1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-tether-2) (if (task-closed? (game-task swamp-tether-2) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-tether-3) (if (task-closed? (game-task swamp-tether-3) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-tether-4) (if (task-closed? (game-task swamp-tether-4) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-buzzer) (if (task-closed? (game-task swamp-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-swamp-arm) (if (task-closed? (game-task swamp-arm) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-platforms) (if (task-closed? (game-task sunken-platforms) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-pipe) (if (task-closed? (game-task sunken-pipe) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-slide) (if (task-closed? (game-task sunken-slide) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-room) (if (task-closed? (game-task sunken-room) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-sharks) (if (task-closed? (game-task sunken-sharks) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-buzzer) (if (task-closed? (game-task sunken-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-top-of-helix) (if (task-closed? (game-task sunken-top-of-helix) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-sunken-spinning-room) (if (task-closed? (game-task sunken-spinning-room) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-race) (if (task-closed? (game-task rolling-race) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-robbers) (if (task-closed? (game-task rolling-robbers) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-moles) (if (task-closed? (game-task rolling-moles) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-plants) (if (task-closed? (game-task rolling-plants) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-lake) (if (task-closed? (game-task rolling-lake) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-buzzer) (if (task-closed? (game-task rolling-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-ring-chase-1) (if (task-closed? (game-task rolling-ring-chase-1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-rolling-ring-chase-2) (if (task-closed? (game-task rolling-ring-chase-2) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-eggtop) (if (task-closed? (game-task snow-eggtop) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-ram) (if (task-closed? (game-task snow-ram) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-fort) (if (task-closed? (game-task snow-fort) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-ball) (if (task-closed? (game-task snow-ball) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-bunnies) (if (task-closed? (game-task snow-bunnies) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-buzzer) (if (task-closed? (game-task snow-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-bumpers) (if (task-closed? (game-task snow-bumpers) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-snow-cage) (if (task-closed? (game-task snow-cage) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-red-eggtop) (if (task-closed? (game-task red-eggtop) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-firecanyon-buzzer) (if (task-closed? (game-task firecanyon-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-firecanyon-end) (if (task-closed? (game-task firecanyon-end) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-citadel-sage-green) (if (task-closed? (game-task citadel-sage-green) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-citadel-sage-blue) (if (task-closed? (game-task citadel-sage-blue) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-citadel-sage-red) (if (task-closed? (game-task citadel-sage-red) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-citadel-sage-yellow) (if (task-closed? (game-task citadel-sage-yellow) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-citadel-buzzer) (if (task-closed? (game-task citadel-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-extra1) (if (task-closed? (game-task village3-extra1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-buzzer) (if (task-closed? (game-task village3-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-miner-money1) (if (task-closed? (game-task village3-miner-money1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-miner-money2) (if (task-closed? (game-task village3-miner-money2) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-miner-money3) (if (task-closed? (game-task village3-miner-money3) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-miner-money4) (if (task-closed? (game-task village3-miner-money4) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-oracle-money1) (if (task-closed? (game-task village3-oracle-money1) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-village3-oracle-money2) (if (task-closed? (game-task village3-oracle-money2) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-gnawers) (if (task-closed? (game-task cave-gnawers) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-dark-crystals) (if (task-closed? (game-task cave-dark-crystals) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-dark-climb) (if (task-closed? (game-task cave-dark-climb) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-robot-climb) (if (task-closed? (game-task cave-robot-climb) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-swing-poles) (if (task-closed? (game-task cave-swing-poles) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-spider-tunnel) (if (task-closed? (game-task cave-spider-tunnel) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-platforms) (if (task-closed? (game-task cave-platforms) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-cave-buzzer) (if (task-closed? (game-task cave-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-ogre-boss) (if (task-closed? (game-task ogre-boss) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-ogre-end) (if (task-closed? (game-task ogre-end) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-ogre-buzzer) (if (task-closed? (game-task ogre-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-ogre-secret) (if (task-closed? (game-task ogre-secret) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-lavatube-end) (if (task-closed? (game-task lavatube-end) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-lavatube-buzzer) (if (task-closed? (game-task lavatube-buzzer) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-lavatube-balls) (if (task-closed? (game-task lavatube-balls) (task-status need-resolution)) 1 0))
(set! (-> *autosplit-info-jak1* res-intro) (if (task-closed? (game-task intro) (task-status need-resolution)) 1 0))
;; other misc tasks
(set! (-> *autosplit-info-jak1* int-finalboss-movies) (if (task-closed? (game-task finalboss-movies) (task-status need-introduction)) 1 0))
(set! (-> *autosplit-info-jak1* unk-finalboss-movies) (if (task-closed? (game-task finalboss-movies) (task-status unknown)) 1 0))
(set! (-> *autosplit-info-jak1* int-jungle-fishgame) (if (task-closed? (game-task jungle-fishgame) (task-status need-introduction)) 1 0))
;; end
(none))
(defun update-autosplit-jak1-new-game ()
(set! (-> *autosplit-info-jak1* game-hash) (pc-get-unix-timestamp))
(none))
+5
View File
@@ -326,6 +326,11 @@
(with-profiler "discord-update" (pc-discord-rpc-update info))
)
;; update auto-splitter info
(when (-> *pc-settings* speedrunner-mode?)
(with-profiler "autosplit-update-jak1"
(update-autosplit-info-jak1)))
(when (not (-> obj use-vis?))
(set! (-> *video-parms* relative-x-scale) (-> obj aspect-ratio-reciprocal))
(set! (-> *video-parms* relative-x-scale-reciprical) (-> obj aspect-ratio-scale))
+3
View File
@@ -1536,6 +1536,7 @@
(set! (-> *game-info* mode) 'play)
;; Start a new game differently if speedrunning mode is active
(cond ((= (-> *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)
@@ -1562,6 +1563,7 @@
(set! (-> *game-info* mode) 'play)
;; Start a new game differently if speedrunning mode is active
(cond ((= (-> *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)
@@ -1658,6 +1660,7 @@
(set! (-> *game-info* mode) 'play)
;; Start a new game differently if speedrunning mode is active
(cond ((= (-> *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)