mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
[jak3] Add roboskip autosplit, allow heromode secret selection (#4257)
addresses a couple issues from https://github.com/open-goal/jak-project/issues/4214 https://github.com/user-attachments/assets/cc34aa77-3c5e-4b50-9d8b-4a1bf9f58353 https://github.com/user-attachments/assets/91edb7eb-5aab-497a-bdb5-8f6ffc00cbfd
This commit is contained in:
@@ -358,6 +358,9 @@
|
||||
)
|
||||
)
|
||||
(remove-setting! 'point-of-interest)
|
||||
;; og:preserve-this
|
||||
(#when PC_PORT
|
||||
(set! (-> *autosplit-info-jak3* prebot-dead?) 1))
|
||||
)
|
||||
:exit (behavior ()
|
||||
(ja-channel-push! 1 (seconds 0.1))
|
||||
|
||||
@@ -16,7 +16,8 @@
|
||||
(num-skullgems uint32)
|
||||
(errol-dead? uint8)
|
||||
(all-collectables-acquired? uint8)
|
||||
(padding-stats uint8 198) ;; padding for future growth
|
||||
(prebot-dead? uint8)
|
||||
(padding-stats uint8 197) ;; padding for future growth
|
||||
;; loading/cutscene/control related info
|
||||
(game-hash uint32)
|
||||
(in-cutscene? uint8)
|
||||
|
||||
@@ -250,11 +250,13 @@
|
||||
|
||||
(defmethod reset! ((this autosplit-info))
|
||||
(set! (-> this game-hash) (pc-get-unix-timestamp))
|
||||
(set! (-> this errol-dead?) 0))
|
||||
(set! (-> this errol-dead?) 0)
|
||||
(set! (-> this prebot-dead?) 0))
|
||||
|
||||
(defmethod debug-draw ((this autosplit-info))
|
||||
(format (clear *temp-string*) "errol-dead?: ~D~%" (-> this errol-dead?))
|
||||
(format *temp-string* "all-collectables-acquired?: ~D~%" (-> this all-collectables-acquired?))
|
||||
(format *temp-string* "prebot-dead?: ~D~%" (-> this prebot-dead?))
|
||||
(with-dma-buffer-add-bucket ((buf (-> (current-frame) global-buf)) (bucket-id debug-no-zbuf1))
|
||||
;; reset bucket settings prior to drawing - font won't do this for us, and
|
||||
;; draw-raw-image can sometimes mess them up. (intro sequence)
|
||||
|
||||
@@ -143,6 +143,10 @@
|
||||
lighteco
|
||||
darkeco))
|
||||
|
||||
(defun reset-speedrunner-mode-hm-secrets! ((obj pc-settings-jak3))
|
||||
(set! (-> obj speedrunner-mode-hm-secrets) (the-as uint64 HERO_MODE_SECRETS))
|
||||
(none))
|
||||
|
||||
(define-extern reset-arena-trainer-globals (function none))
|
||||
(defmethod start-run! ((this speedrun-info))
|
||||
;; turn on speedrun verification display
|
||||
@@ -175,9 +179,11 @@
|
||||
(play-task (game-task arena-training-1) 'debug #f)
|
||||
(until (and *target* (!= (-> *target* next-state name) 'target-continue))
|
||||
(suspend))
|
||||
(mark-played! (-> *talker-speech* 138)) ;; prevent 600 orbs popup
|
||||
(send-event *target* 'get-pickup (pickup-type skill) 1000.0)
|
||||
(send-event *target* 'get-pickup (pickup-type gem) 1000.0)
|
||||
(set! (-> *game-info* secrets) HERO_MODE_SECRETS)
|
||||
(set! (-> *game-info* purchase-secrets) HERO_MODE_SECRETS)
|
||||
(set! (-> *game-info* secrets) (the-as game-secrets (-> *pc-settings* speedrunner-mode-hm-secrets)))
|
||||
(set! (-> *game-info* purchase-secrets) (the-as game-secrets (-> *pc-settings* speedrunner-mode-hm-secrets)))
|
||||
(set! (-> *game-info* features) HERO_MODE_FEATURES))))
|
||||
(((speedrun-category all-cheats-allowed))
|
||||
(process-spawn-function process
|
||||
@@ -395,6 +401,26 @@
|
||||
:is-toggled?
|
||||
(lambda ()
|
||||
(= (-> *speedrun-info* category) (speedrun-category all-cheats-allowed))))))
|
||||
(new 'static
|
||||
'popup-menu-dynamic-submenu
|
||||
:label "Select Hero Mode secrets"
|
||||
:get-length
|
||||
(lambda ()
|
||||
58)
|
||||
:get-entry-label
|
||||
(lambda ((index int) (str-dest string))
|
||||
(copy-string<-string str-dest (bitfield->string game-secrets index)))
|
||||
:on-entry-confirm
|
||||
(lambda ((index int))
|
||||
(logxor! (-> *pc-settings* speedrunner-mode-hm-secrets) (shl 1 index))
|
||||
(pc-settings-save))
|
||||
:entry-selected?
|
||||
(lambda ((index int))
|
||||
(logtest? (-> *pc-settings* speedrunner-mode-hm-secrets) (shl 1 index)))
|
||||
:on-reset
|
||||
(lambda ()
|
||||
(reset-speedrunner-mode-hm-secrets! *pc-settings*)
|
||||
(pc-settings-save)))
|
||||
(new 'static
|
||||
'popup-menu-dynamic-submenu
|
||||
:label "Custom Category Select"
|
||||
|
||||
@@ -111,6 +111,7 @@
|
||||
(controller-swap-r1-r2? symbol)
|
||||
(pacman-dpad? symbol)
|
||||
(speedrunner-mode-custom-bind uint32)
|
||||
(speedrunner-mode-hm-secrets uint64)
|
||||
|
||||
(memcard-subtitles? symbol)
|
||||
|
||||
@@ -199,6 +200,7 @@
|
||||
(set! (-> obj hinttitles?) #t)
|
||||
0)
|
||||
|
||||
(define-extern reset-speedrunner-mode-hm-secrets! (function pc-settings-jak3 none))
|
||||
(defmethod reset-extra ((obj pc-settings-jak3) (call-handlers symbol))
|
||||
"Set the default goodies settings"
|
||||
|
||||
@@ -214,6 +216,8 @@
|
||||
(dotimes (i 6)
|
||||
(set! (-> obj flava-unlocked i) #f))
|
||||
|
||||
(reset-speedrunner-mode-hm-secrets! obj)
|
||||
|
||||
;(set! (-> obj stats) *statistics*)
|
||||
0)
|
||||
|
||||
|
||||
@@ -676,6 +676,8 @@
|
||||
(set! (-> obj flava-unlocked i) (file-stream-read-symbol file))
|
||||
)
|
||||
)
|
||||
(("speedrunner-mode-hm-secrets") (set! (-> obj speedrunner-mode-hm-secrets) (file-stream-read-int file)))
|
||||
|
||||
;; (("stats")
|
||||
;; (dosettings (file)
|
||||
;; (case-str *pc-temp-string*
|
||||
@@ -728,6 +730,8 @@
|
||||
)
|
||||
(format file ")~%")
|
||||
|
||||
(format file " (speedrunner-mode-hm-secrets #x~x)~%" (-> obj speedrunner-mode-hm-secrets))
|
||||
|
||||
;; (format file " (stats~%")
|
||||
;; (format file " (kill-stats~%")
|
||||
;; (dotimes (i KILL_STATS_MAX_ENEMY_TYPES)
|
||||
|
||||
Reference in New Issue
Block a user