d/jak2: progress updated

This commit is contained in:
Tyler Wilding
2022-09-27 22:42:35 -04:00
parent 593b35c6ab
commit 930d56deb0
25 changed files with 2823 additions and 4730 deletions
File diff suppressed because it is too large Load Diff
@@ -15,7 +15,7 @@
(define-extern *progress-process* (pointer progress))
(define-extern activate-progress (function process symbol none))
(define-extern memcard-unlocked-secrets? (function symbol symbol))
(define-extern memcard-unlocked-secrets? "TODO - returns a bitfield" (function symbol int))
(define-extern progress-selected (function int int :behavior progress))
(define-extern get-num-highscores (function int))
(define-extern get-next-highscore (function int int))
@@ -60,7 +60,7 @@
(go-away () _type_ :state 22)
(gone () _type_ :state 23)
(init-defaults (_type_) connection 24)
(progress-method-25 (_type_ object object symbol) none 25)
(progress-method-25 (_type_) none 25)
(progress-method-26 (_type_) object 26)
(can-go-back? (_type_) symbol 27)
(progress-method-28 (_type_ symbol) symbol 28)
@@ -73,11 +73,11 @@
(deftype menu-option (basic)
((name game-text-id :offset-assert 4)
(scale float :offset-assert 8)
(unknown function :offset-assert 12)
(box menu-option 1 :offset-assert 16)
(unknown-options menu-option 7 :offset-assert 20)
((name game-text-id :offset-assert 4)
(scale float :offset-assert 8)
(unknown function :offset-assert 12)
(box hud-box 1 :inline :offset-assert 16)
(options menu-option 8 :offset 16)
)
:method-count-assert 12
:size-assert #x30
+279 -135
View File
@@ -7,8 +7,6 @@
(set! *progress-process* #f)
;; og:ignore-form:progress-trans
;; DECOMP BEGINS
(deftype progress-global-state (basic)
@@ -132,96 +130,72 @@
(set! (-> obj sliding-height) 0.0)
(set! (-> obj sliding-off) 1.0)
(set! (-> obj scanlines-alpha) 0.0)
(set! (-> (the-as
menu-on-off-game-vibrations-option
(-> (the-as menu-on-off-game-vibrations-option (-> *game-options* options 0)) box 0)
)
(set! (-> (the-as menu-on-off-game-vibrations-option (-> (the-as (array menu-option) (-> *game-options* options 0)) 0))
value-to-modify
)
(&-> *setting-control* user-default vibration)
)
(set! (-> (the-as
menu-on-off-game-subtitles-option
(-> (the-as menu-on-off-game-subtitles-option (-> *game-options* options 0)) unknown-options 0)
)
(set! (-> (the-as menu-on-off-game-subtitles-option (-> (the-as (array menu-option) (-> *game-options* options 0)) 1))
value-to-modify
)
(&-> *setting-control* user-default subtitle)
)
(set! (-> (the-as
menu-language-option
(-> (the-as menu-language-option (-> *game-options* options 0)) unknown-options 1)
)
(set! (-> (the-as menu-language-option (-> (the-as (array menu-option) (-> *game-options* options 0)) 2))
language-selection
)
(-> *setting-control* user-current language)
)
(set! (-> (the-as
menu-language-option
(-> (the-as menu-language-option (-> *game-options* options 0)) unknown-options 1)
)
(set! (-> (the-as menu-language-option (-> (the-as (array menu-option) (-> *game-options* options 0)) 2))
language-direction
)
#t
)
(set! (-> (the-as
menu-language-option
(-> (the-as menu-language-option (-> *game-options* options 0)) unknown-options 1)
)
(set! (-> (the-as menu-language-option (-> (the-as (array menu-option) (-> *game-options* options 0)) 2))
language-transition
)
#f
)
(set! (-> (the-as
menu-language-option
(-> (the-as menu-language-option (-> *game-options* options 0)) unknown-options 1)
)
(set! (-> (the-as menu-language-option (-> (the-as (array menu-option) (-> *game-options* options 0)) 2))
language-x-offset
)
0
)
(set! (-> (the-as menu-on-off-option (-> (the-as menu-on-off-option (-> *game-options-japan* options 0)) box 0))
(set! (-> (the-as menu-on-off-option (-> (the-as (array menu-option) (-> *game-options-japan* options 0)) 0))
value-to-modify
)
(&-> *setting-control* user-default vibration)
)
(set! (-> (the-as menu-on-off-option (-> (the-as menu-on-off-option (-> *game-options-demo* options 0)) box 0))
(set! (-> (the-as menu-on-off-option (-> (the-as (array menu-option) (-> *game-options-demo* options 0)) 0))
value-to-modify
)
(&-> *setting-control* user-default vibration)
)
(set! (-> (the-as
menu-on-off-option
(-> (the-as menu-on-off-option (-> *graphic-options* options 0)) unknown-options 1)
)
(set! (-> (the-as menu-on-off-option (-> (the-as (array menu-option) (-> *graphic-options* options 0)) 2))
value-to-modify
)
(&-> *setting-control* user-default use-progressive-scan)
)
(set! (-> (the-as
menu-on-off-option
(-> (the-as menu-on-off-option (-> *graphic-title-options-pal* options 0)) unknown-options 1)
)
(set! (-> (the-as menu-on-off-option (-> (the-as (array menu-option) (-> *graphic-title-options-pal* options 0)) 2))
value-to-modify
)
(&-> *setting-control* user-default use-progressive-scan)
)
(set! (-> (the-as menu-slider-option (-> (the-as menu-slider-option (-> *sound-options* options 0)) box 0))
(set! (-> (the-as menu-slider-option (-> (the-as (array menu-option) (-> *sound-options* options 0)) 0))
value-to-modify
)
(&-> *setting-control* user-default sfx-volume)
)
(set! (-> (the-as menu-slider-option (-> (the-as menu-slider-option (-> *sound-options* options 0)) unknown-options 0))
(set! (-> (the-as menu-slider-option (-> (the-as (array menu-option) (-> *sound-options* options 0)) 1))
value-to-modify
)
(&-> *setting-control* user-default music-volume)
)
(set! (-> (the-as menu-slider-option (-> (the-as menu-slider-option (-> *sound-options* options 0)) unknown-options 1))
(set! (-> (the-as menu-slider-option (-> (the-as (array menu-option) (-> *sound-options* options 0)) 2))
value-to-modify
)
(&-> *setting-control* user-default dialog-volume)
)
(set! (-> (the-as menu-missions-option (-> (the-as menu-missions-option (-> *missions-options* options 0)) box 0))
(set! (-> (the-as menu-missions-option (-> (the-as (array menu-option) (-> *missions-options* options 0)) 0))
task-line-index
)
0
@@ -781,7 +755,7 @@
(('loading)
(set! (-> *progress-state* last-slot-saved) (-> *progress-state* which-slot))
(auto-save-command 'restore 0 (-> *progress-state* which-slot) obj #f)
(set! (-> (the-as menu-missions-option (-> (the-as menu-missions-option (-> *missions-options* options 0)) box 0))
(set! (-> (the-as menu-missions-option (-> (the-as (array menu-option) (-> *missions-options* options 0)) 0))
task-line-index
)
0
@@ -933,10 +907,7 @@
)
(('select-start 'select-pre-start 'select-kiosk-start)
(set! (-> obj current-options) *select-start-options*)
(set! (-> (the-as
menu-select-start-option
(-> (the-as menu-select-start-option (-> *select-start-options* options 0)) box 0)
)
(set! (-> (the-as menu-select-start-option (-> (the-as (array menu-option) (-> *select-start-options* options 0)) 0))
task-index
)
0
@@ -945,10 +916,7 @@
)
(('select-scene)
(set! (-> obj current-options) *select-scene-options*)
(set! (-> (the-as
menu-select-scene-option
(-> (the-as menu-select-scene-option (-> *select-scene-options* options 0)) box 0)
)
(set! (-> (the-as menu-select-scene-option (-> (the-as (array menu-option) (-> *select-scene-options* options 0)) 0))
task-index
)
0
@@ -982,7 +950,7 @@
)
(('missions)
(set! (-> *progress-state* missions-total-spacing) 0.0)
(set! (-> (the-as menu-missions-option (-> (the-as menu-missions-option (-> *missions-options* options 0)) box 0))
(set! (-> (the-as menu-missions-option (-> (the-as (array menu-option) (-> *missions-options* options 0)) 0))
task-line-index
)
0
@@ -990,12 +958,12 @@
(set! (-> obj current-options) *missions-options*)
)
(('highscores)
(set! (-> (the-as menu-highscores-option (-> (the-as menu-highscores-option (-> *highscores-options* options 0)) box 0))
(set! (-> (the-as menu-highscores-option (-> (the-as (array menu-option) (-> *highscores-options* options 0)) 0))
page-index
)
0
)
(set! (-> (the-as menu-highscores-option (-> (the-as menu-highscores-option (-> *highscores-options* options 0)) box 0))
(set! (-> (the-as menu-highscores-option (-> (the-as (array menu-option) (-> *highscores-options* options 0)) 0))
prev-page-index
)
0
@@ -1020,13 +988,13 @@
0
)
(defmethod progress-method-25 progress ((obj progress) (arg0 object) (arg1 object) (arg2 symbol))
(defmethod progress-method-25 progress ((obj progress))
(mc-get-slot-info 0 *progress-save-info*)
(when (-> obj current-options)
(let ((s5-0 (-> obj current-options options 0)))
(when (and s5-0 (= (-> obj menu-transition) 0.0))
(respond-progress
(-> (the-as menu-option (+ (* (-> obj option-index) 4) (the-as int s5-0))) box 0)
(the-as menu-option (-> s5-0 options (-> obj option-index)))
obj
(and (= (-> obj menu-transition) 0.0) (-> obj selected-option))
)
@@ -1115,7 +1083,188 @@
(none)
)
;; ERROR: failed type prop at 0: Could not figure out load: (set! v1 (l.wu (+ s6 228)))
(defbehavior progress-trans progress ()
(cond
((and (= (-> self next) 'none)
(or (= (-> *progress-state* starting-state) 'main) (= (-> self anim-frame) 1.0))
)
(set! (-> self menu-transition)
(seek-ease
(-> self menu-transition)
0.0
(* 0.1 (-> self clock time-adjust-ratio))
0.4
(* 0.01 (-> self clock time-adjust-ratio))
)
)
)
(else
(seek! (-> self menu-transition) 1.0 (* 0.1 (-> self clock time-adjust-ratio)))
(when (and (= (-> self menu-transition) 1.0)
(or (and (nonzero? (-> self state-pos)) (= (-> self anim-frame) 1.0))
(or (and (zero? (-> self state-pos)) (= (-> self anim-frame) 0.0))
(and (!= (-> *progress-state* starting-state) 'main) (!= (-> self next) 'none))
)
)
)
(set! (-> self current) (-> self next))
(set! (-> self next) 'none)
(set! (-> self option-index) (-> self next-option-index))
(set! (-> self want-option-index) 0)
(set-menu-options self (-> self current))
(set! (-> self scanlines-alpha) 0.0)
)
)
)
(set! (-> self main-menu)
(and (zero? (-> self state-pos)) (and (= (-> self menu-transition) 0.0)
(= (-> self next) 'none)
(or (= (-> self state-stack 0) 'main) (= (-> self current) 'main))
)
)
)
(when *cheat-mode*
(when (zero? (-> self state-pos))
(cond
((and (cpad-hold? 0 l2) (cpad-hold? 0 r1))
(if (= (-> self current-options) *main-options*)
(set! (-> self current-options) *main-options-debug*)
)
)
((= (-> self current-options) *main-options-debug*)
(set! (-> self current-options) *main-options*)
)
)
)
)
(if (= (-> self ring-angle) (-> self ring-want-angle))
(progress-method-25 self)
)
(let ((f30-0 (* 0.005 (-> self clock time-adjust-ratio))))
(cond
((= (-> self menu-transition) 1.0)
(if (and (zero? (-> self state-pos)) (= (-> *progress-state* starting-state) 'main))
(seek! (-> self anim-frame) 0.0 (* 0.02 (-> self clock time-adjust-ratio)))
(seek! (-> self anim-frame) 1.0 (* 0.02 (-> self clock time-adjust-ratio)))
)
(let ((f0-27 (if (and (zero? (-> self state-pos)) (!= (-> *progress-state* starting-state) 'title))
0.0
0.2
)
)
)
(when (= (-> self next) 'bigmap)
(set! f0-27 0.4)
(set! f30-0 (* 0.008 (-> self clock time-adjust-ratio)))
)
(seek! (-> self pos-transition) f0-27 f30-0)
)
)
((zero? (-> self state-pos))
(if (= (-> self current) 'bigmap)
(set! f30-0 (* 0.05 (-> self clock time-adjust-ratio)))
)
(if (!= (-> *progress-state* starting-state) 'title)
(seek! (-> self pos-transition) 0.0 f30-0)
)
)
)
)
(if (!= (-> *progress-state* starting-state) 'main)
(set! (-> self pos-transition) 0.2)
)
(set-ring-position self)
(when (= (-> self ring-angle) (-> self ring-want-angle))
(cond
((< (-> self want-option-index) 0)
(cond
((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk))
(if (> (-> self option-index) 0)
(+! (-> self option-index) -1)
)
)
(else
(set! (-> self option-index)
(min-max-wrap-around (+ (-> self option-index) -1) 0 (+ (length (-> self current-options options 0)) -1))
)
)
)
(set! (-> self graphic-index) (-> self option-index))
(+! (-> self want-option-index) 1)
)
((> (-> self want-option-index) 0)
(cond
((and (= *cheat-mode* #f) (= *kernel-boot-message* 'kiosk))
(if (< (-> self option-index) (+ (length (-> self current-options options 0)) -1))
(+! (-> self option-index) 1)
)
)
(else
(set! (-> self option-index)
(min-max-wrap-around (+ (-> self option-index) 1) 0 (+ (length (-> self current-options options 0)) -1))
)
)
)
(+! (-> self want-option-index) -1)
)
)
)
(if (= (-> self anim-frame) 0.0)
(set! (-> self swing) (seek-ease
(-> self swing)
4.0
(* 0.05 (-> self clock time-adjust-ratio))
0.5
(* 0.005 (-> self clock time-adjust-ratio))
)
)
(set! (-> self swing) (seek-ease
(-> self swing)
0.0
(* 0.07 (-> self clock time-adjust-ratio))
0.5
(* 0.007 (-> self clock time-adjust-ratio))
)
)
)
(when (-> self main-menu)
(set! (-> self ring-want-angle) (ceil (* 182.04445 (* 36.0 (the float (-> self option-index))))))
(if (and (= (-> self ring-want-angle) 0.0) (< 32768.0 (-> self ring-angle)))
(set! (-> self ring-want-angle) 65536.0)
)
(let ((f0-54 (- (-> self ring-want-angle) (-> self ring-angle))))
(when (< 32768.0 (fabs f0-54))
(if (< 0.0 f0-54)
(set! (-> self ring-angle) (+ 65536.0 (-> self ring-angle)))
(set! (-> self ring-angle) (+ -65536.0 (-> self ring-angle)))
)
)
)
(seek! (-> self ring-angle) (-> self ring-want-angle) (* 455.1111 (-> self clock time-adjust-ratio)))
)
(let ((gp-4 (quaternion-vector-angle!
(new 'stack-no-clear 'quaternion)
*x-vector*
(* 182.04445 (* (-> self swing) (sin (the float (* 40 (-> self clock frame-counter))))))
)
)
(s5-4 (quaternion-vector-angle!
(new 'stack-no-clear 'quaternion)
*y-vector*
(* 182.04445 (* (-> self swing) (sin (the float (* 0 (-> self clock frame-counter))))))
)
)
)
(quaternion*! (-> self root quat) (-> self init-quat) gp-4)
(quaternion*! (-> self root quat) (-> self root quat) s5-4)
)
(quaternion-normalize! (-> self root quat))
(if (= (-> self ring-angle) (-> self ring-want-angle))
(set! (-> self graphic-index) (-> self option-index))
)
0
(none)
)
(defun begin-scan ((arg0 hud-box) (arg1 progress))
(cond
@@ -1241,7 +1390,7 @@
)
)
(menu-option-method-10
(-> gp-0 box s4-1)
(-> gp-0 options s4-1)
self
sv-144
s4-1
@@ -1268,13 +1417,7 @@
(when (and (< 0.8 (-> self anim-frame)) (or (= (-> self current) 'bigmap) (= (-> self next) 'bigmap)))
(cond
((>= (-> self pos-transition) 0.38)
(let ((t9-8 (method-of-object *bigmap* bigmap-method-11)))
1792
1840
2304
2256
(t9-8)
)
(bigmap-method-11 *bigmap* 1792 1840 2304 2256)
)
(else
(let ((s4-2 (vector<-cspace! (new 'stack-no-clear 'vector) (-> self node-list data 21)))
@@ -1284,15 +1427,15 @@
(set! (-> gp-1 quad) (the-as uint128 0))
(let ((s5-1 (new 'stack-no-clear 'vector4w)))
(set! (-> s5-1 quad) (the-as uint128 0))
(when (and (transform-point-qword! gp-1 s4-2) (transform-point-qword! s5-1 s3-1))
(let ((t9-13 (method-of-object *bigmap* bigmap-method-11)))
(/ (the-as int (-> s5-1 x)) 16)
(/ (the-as int (-> s5-1 y)) 16)
(/ (the-as int (-> gp-1 x)) 16)
(/ (the-as int (-> gp-1 y)) 16)
(t9-13)
(if (and (transform-point-qword! gp-1 s4-2) (transform-point-qword! s5-1 s3-1))
(bigmap-method-11
*bigmap*
(the-as int (/ (the-as int (-> s5-1 x)) 16))
(the-as int (/ (the-as int (-> s5-1 y)) 16))
(the-as int (/ (the-as int (-> gp-1 x)) 16))
(the-as int (/ (the-as int (-> gp-1 y)) 16))
)
)
)
)
)
)
@@ -1359,64 +1502,64 @@
(let ((t9-0 format)
(a0-3 #t)
(a1-1 "DONE NOTIFY: ~S ~S~%")
(v1-3 (-> arg3 param 1))
(v1-3 (the-as mc-status-code (-> arg3 param 1)))
)
(t9-0
a0-3
a1-1
(cond
((= v1-3 15)
((= v1-3 (mc-status-code bad-version))
"bad-version"
)
((= v1-3 13)
((= v1-3 (mc-status-code no-save))
"no-save"
)
((= v1-3 10)
((= v1-3 (mc-status-code no-last))
"no-last"
)
((= v1-3 14)
((= v1-3 (mc-status-code no-space))
"no-space"
)
((= v1-3 4)
((= v1-3 (mc-status-code internal-error))
"internal-error"
)
((= v1-3 8)
((= v1-3 (mc-status-code no-memory))
"no-memory"
)
((= v1-3 2)
((= v1-3 (mc-status-code bad-handle))
"bad-handle"
)
((zero? v1-3)
((= v1-3 (mc-status-code busy))
"busy"
)
((= v1-3 5)
((= v1-3 (mc-status-code write-error))
"write-error"
)
((= v1-3 6)
((= v1-3 (mc-status-code read-error))
"read-error"
)
((= v1-3 9)
((= v1-3 (mc-status-code no-card))
"no-card"
)
((= v1-3 11)
((= v1-3 (mc-status-code no-format))
"no-format"
)
((= v1-3 1)
((= v1-3 (mc-status-code ok))
"ok"
)
((= v1-3 16)
((= v1-3 (mc-status-code no-process))
"no-process"
)
((= v1-3 17)
((= v1-3 (mc-status-code no-auto-save))
"no-auto-save"
)
((= v1-3 12)
((= v1-3 (mc-status-code no-file))
"no-file"
)
((= v1-3 3)
((= v1-3 (mc-status-code format-failed))
"format-failed"
)
((= v1-3 7)
((= v1-3 (mc-status-code new-game))
"new-game"
)
(else
@@ -1458,64 +1601,64 @@
(let ((t9-7 format)
(a0-18 #t)
(a1-5 "ERROR NOTIFY: ~S ~S ~S~%")
(v1-19 (-> arg3 param 1))
(v1-19 (the-as mc-status-code (-> arg3 param 1)))
)
(t9-7
a0-18
a1-5
(cond
((= v1-19 15)
((= v1-19 (mc-status-code bad-version))
"bad-version"
)
((= v1-19 13)
((= v1-19 (mc-status-code no-save))
"no-save"
)
((= v1-19 10)
((= v1-19 (mc-status-code no-last))
"no-last"
)
((= v1-19 14)
((= v1-19 (mc-status-code no-space))
"no-space"
)
((= v1-19 4)
((= v1-19 (mc-status-code internal-error))
"internal-error"
)
((= v1-19 8)
((= v1-19 (mc-status-code no-memory))
"no-memory"
)
((= v1-19 2)
((= v1-19 (mc-status-code bad-handle))
"bad-handle"
)
((zero? v1-19)
((= v1-19 (mc-status-code busy))
"busy"
)
((= v1-19 5)
((= v1-19 (mc-status-code write-error))
"write-error"
)
((= v1-19 6)
((= v1-19 (mc-status-code read-error))
"read-error"
)
((= v1-19 9)
((= v1-19 (mc-status-code no-card))
"no-card"
)
((= v1-19 11)
((= v1-19 (mc-status-code no-format))
"no-format"
)
((= v1-19 1)
((= v1-19 (mc-status-code ok))
"ok"
)
((= v1-19 16)
((= v1-19 (mc-status-code no-process))
"no-process"
)
((= v1-19 17)
((= v1-19 (mc-status-code no-auto-save))
"no-auto-save"
)
((= v1-19 12)
((= v1-19 (mc-status-code no-file))
"no-file"
)
((= v1-19 3)
((= v1-19 (mc-status-code format-failed))
"format-failed"
)
((= v1-19 7)
((= v1-19 (mc-status-code new-game))
"new-game"
)
(else
@@ -1557,9 +1700,7 @@
(set! (-> self menu-transition) 1.0)
(none)
)
:trans (the-as (function none :behavior progress)
;; TODO call to progress-trans!
0)
:trans progress-trans
:code (behavior ()
(until #f
(ja :num-func num-func-identity :frame-num (* 12.0 (-> self anim-frame)))
@@ -1705,13 +1846,13 @@
)
((logtest? (pad-buttons pb24) (-> *cpad-list* cpads 0 button0-rel 0))
(cond
((and (-> v1-1 0) (= (-> obj name) 366))
((and (-> v1-1 0) (= (-> obj name) (game-text-id progress-root-restart-mission)))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons pb24))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons pb24))
(restart-mission)
(set-next-state arg0 'go-away 0)
)
((and (-> v1-1 0) (= (-> obj name) 307))
((and (-> v1-1 0) (= (-> obj name) (game-text-id progress-quit)))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons pb24))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons pb24))
(initialize! *game-info* 'game (the-as game-save #f) "title-restart")
@@ -1786,7 +1927,7 @@
(when s4-0
(let ((f30-0 1.0))
(case (-> obj name)
((264 265)
(((game-text-id progress-sound-music-volume) (game-text-id progress-sound-speech-volume))
(set! f30-0 (-> (the-as (pointer float) gp-0)))
)
)
@@ -1859,7 +2000,7 @@
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons triangle))
(when (and (= (-> arg0 ring-angle) (-> arg0 ring-want-angle)) #t)
(cond
((= (-> obj name) 291)
((= (-> obj name) (game-text-id progress-demo-exit))
(case *kernel-boot-message*
(('demo-shared)
(set! *master-exit* 'force)
@@ -1871,12 +2012,15 @@
)
)
)
((or (= (-> obj name) 346) (= (-> obj name) 347) (= (-> obj name) 348))
((or (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1))
(= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2))
(= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3))
)
(case (-> obj name)
((347)
(((game-text-id progress-main-secrets-sceneplayer-2))
(set! (-> *progress-state* scene-player-act) 2)
)
((348)
(((game-text-id progress-main-secrets-sceneplayer-3))
(set! (-> *progress-state* scene-player-act) 3)
)
(else
@@ -1954,12 +2098,12 @@
(set! (-> arg0 state-pos) 0)
(set-next-state arg0 'secrets-insufficient-space 0)
)
(when (= (-> obj name) 298)
(when (= (-> obj name) (game-text-id progress-continue-without-saving))
(let ((a1-3 (progress-method-28 arg0 (-> arg0 current))))
(set-next-state arg0 a1-3 0)
)
)
(when (and (= (-> obj name) 339)
(when (and (= (-> obj name) (game-text-id progress-root-secrets))
(= *title* (-> arg0 current-options))
(not (memcard-unlocked-secrets? #f))
(= (-> arg0 option-index) 3)
@@ -1971,7 +2115,7 @@
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons pb24))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons pb24))
(cond
((= (-> obj name) 291)
((= (-> obj name) (game-text-id progress-demo-exit))
(case *kernel-boot-message*
(('demo-shared)
(set! *master-exit* 'force)
@@ -1983,7 +2127,7 @@
)
)
)
((= (-> obj name) 298)
((= (-> obj name) (game-text-id progress-continue-without-saving))
(progress-intro-start (logtest? (-> *game-info* purchase-secrets) #x8000))
)
((= (-> obj next-state) 'back)
@@ -2014,7 +2158,7 @@
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons pb24))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons pb24))
(cond
((and (= (-> obj name) 349) (logtest? (the-as int s4-0) 512))
((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook)) (logtest? s4-0 512))
(sound-play "generic-beep")
(cond
((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 1)
@@ -2028,7 +2172,7 @@
)
)
)
((and (= (-> obj name) 350) (logtest? (the-as int s4-0) 1024))
((and (= (-> obj name) (game-text-id progress-main-secrets-mega-scrapbook)) (logtest? s4-0 1024))
(sound-play "generic-beep")
(cond
((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 2)
@@ -2042,7 +2186,7 @@
)
)
)
((and (= (-> obj name) 351) (logtest? (the-as int s4-0) 2048))
((and (= (-> obj name) (game-text-id progress-main-secrets-scrapbook-3)) (logtest? s4-0 2048))
(sound-play "generic-beep")
(cond
((send-event (handle->process (-> *game-info* controller 0)) 'scrap-book 3)
@@ -2056,30 +2200,30 @@
)
)
)
((and (= (-> obj name) 346) (logtest? (the-as int s4-0) 32))
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-1)) (logtest? s4-0 32))
(set! (-> *progress-state* scene-player-act) 1)
(sound-play "generic-beep")
(progress-method-29 arg0)
(set-next-state arg0 'select-scene 0)
)
((and (= (-> obj name) 347) (logtest? (the-as int s4-0) 64))
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-2)) (logtest? s4-0 64))
(set! (-> *progress-state* scene-player-act) 2)
(sound-play "generic-beep")
(progress-method-29 arg0)
(set-next-state arg0 'select-scene 0)
)
((and (= (-> obj name) 348) (logtest? (the-as int s4-0) 128))
((and (= (-> obj name) (game-text-id progress-main-secrets-sceneplayer-3)) (logtest? s4-0 128))
(set! (-> *progress-state* scene-player-act) 3)
(sound-play "generic-beep")
(progress-method-29 arg0)
(set-next-state arg0 'select-scene 0)
)
((and (= (-> obj name) 345) (logtest? (the-as int s4-0) #x8000))
((and (= (-> obj name) (game-text-id progress-main-secrets-hero-mode)) (logtest? s4-0 #x8000))
(sound-play "generic-beep")
(progress-method-29 arg0)
(set-next-state arg0 'select-save-title-hero 0)
)
((and (= (-> obj name) 352) (logtest? (the-as int s4-0) 256))
((and (= (-> obj name) (game-text-id progress-main-secrets-levelselect)) (logtest? s4-0 256))
(sound-play "generic-beep")
(progress-method-29 arg0)
(set-next-state arg0 'select-start 0)
@@ -2150,12 +2294,12 @@
)
((= (-> *progress-save-info* file (-> *progress-state* which-slot) present) 1)
(set! s5-0 #t)
(menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0)))
(menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0 min x)))
(set-next-state arg0 'already-exists 0)
)
(else
(set! s5-0 #t)
(menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0)))
(menu-update-purchase-secrets (the-as menu-secret-option (-> *secret-options* options 0 box 0 min x)))
(set-next-state arg0 'saving 0)
)
)
@@ -3602,13 +3746,13 @@
)
((logtest? (pad-buttons pb24) (-> *cpad-list* cpads 0 button0-rel 0))
(cond
((and (-> v1-1 0) (= (-> arg0 name) 366))
((and (-> v1-1 0) (= (-> arg0 name) (game-text-id progress-root-restart-mission)))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons pb24))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons pb24))
(restart-mission)
(set-next-state arg1 'go-away 0)
)
((and (-> v1-1 0) (= (-> arg0 name) 307))
((and (-> v1-1 0) (= (-> arg0 name) (game-text-id progress-quit)))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons pb24))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons pb24))
(initialize! *game-info* 'game (the-as game-save #f) "title-restart")