diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index 4fd2fb5af6..3bdef873a3 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -22142,18 +22142,18 @@ :size-assert #x164 :flag-assert #x2100f00164 (:methods - (come-in () _type_ :state 20) ;; (hidden? (_type_) symbol 20) - (idle () _type_ :state 21) ;; (adjust-sprites (_type_) none 21) - (go-away () _type_ :state 22) ;; (adjust-icons (_type_) none 22) - (gone () _type_ :state 23) ;; (adjust-ratios (_type_ symbol symbol) none 23) - (init-defaults "Initialize default menu settings." (_type_) connection 24) ;; (draw-fuel-cell-screen (_type_ int) none 24) - (progress-method-25 (_type_) none 25) ;; (draw-money-screen (_type_ int) none 25) - (is-gone (_type_) object 26) ;; (draw-buzzer-screen (_type_ int) none 26) - (can-go-back? (_type_) symbol 27) ;; (draw-notice-screen (_type_) none 27) - (progress-method-28 (_type_ symbol) symbol 28) ;; (draw-options (_type_ int int float) none 28) - (progress-method-29 (_type_) int 29) ;; (respond-common (_type_) none 29) - (progress-method-30 (_type_) int 30) ;; (respond-progress (_type_) none 30) - (set-next-state "Set the next menu state specified by arg0 at the index specified by arg1." (_type_ symbol int) int 31) ;; (respond-memcard (_type_) none 31) + (come-in () _type_ :state 20) + (idle () _type_ :state 21) + (go-away () _type_ :state 22) + (gone () _type_ :state 23) + (init-defaults "Initialize default menu settings." (_type_) connection 24) + (respond-to-cpad (_type_) none 25) + (gone? (_type_) object 26) + (can-go-back? (_type_) symbol 27) + (get-state-check-card (_type_ symbol) symbol 28) + (push-state (_type_) int 29) + (pop-state (_type_) int 30) + (set-next-state "Set the next menu state specified by arg0 at the index specified by arg1." (_type_ symbol int) int 31) (set-menu-options "Set the menu options for the menu state specified by arg0." (_type_ symbol) int 32) ) ) @@ -22173,7 +22173,7 @@ :size-assert #x30 :flag-assert #xc00000030 (:methods - (respond-progress "Handle progress menu navigation logic." (_type_ progress object) int :behavior progress 9) + (respond-progress "Handle progress menu navigation logic." (_type_ progress symbol) int :behavior progress 9) (draw-option (_type_ progress font-context int symbol) none 10) (menu-option-method-11 () none 11) ) @@ -31077,12 +31077,12 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (deftype print-highscore-obj (basic) - ((self texture-page :offset-assert 4) + ((self menu-highscores-option :offset-assert 4) (index int32 :offset-assert 8) - (previous texture-page :offset-assert 12) ; guess + (previous symbol :offset-assert 12) ; guess (place int32 :offset-assert 16) (score float :offset-assert 20) - (game-score basic :offset-assert 24) + (game-score symbol :offset-assert 24) (context font-context :offset-assert 28) (local-scale float :offset-assert 32) (interp float :offset-assert 36) @@ -31124,16 +31124,16 @@ (define-extern get-level-icon-id-02 "TODO - Icon id enum perhaps?" (function int texture-id)) (define-extern get-level-icon-id-03 "TODO - Icon id enum perhaps?" (function int texture-id)) (define-extern get-level-icon-id-04 "TODO - Icon id enum perhaps?" (function int texture-id)) -(define-extern draw-decoration (function menu-option font-context float int symbol float pointer)) +(define-extern draw-decoration (function menu-option font-context float text-id symbol float pointer)) (define-extern draw-missions-decoration (function menu-missions-option font-context float text-id pointer)) -(define-extern draw-sound-options-decoration (function menu-slider-option font-context float symbol text-id pointer)) +(define-extern draw-sound-options-decoration (function menu-slider-option font-context float text-id symbol pointer)) (define-extern draw-decoration-secrets (function menu-option font-context float text-id pointer)) -(define-extern draw-decoration-load-save (function menu-option font-context float int pointer)) +(define-extern draw-decoration-load-save (function menu-option font-context float text-id pointer)) (define-extern sort-task-node-result (function int none)) (define-extern find-mission-text-at-index (function int game-task-node-info)) (define-extern draw-secret-list (function secret-item-option progress font-context int symbol float none)) (define-extern draw-highscore-icon (function menu-highscores-option uint int int float pointer)) -(define-extern draw-highscore-cup "First int is an enum" (function texture-page int int int float float pointer)) +(define-extern draw-highscore-cup "First int is an enum" (function menu-highscores-option int int int float float pointer)) (define-extern get-highscore-score "TODO - takes and returns an enum?" (function int int)) (define-extern eval-highscore (function print-highscore-obj int)) (define-extern str-print-time (function float string)) diff --git a/decompiler/config/jak2/ntsc_v1/inputs.jsonc b/decompiler/config/jak2/ntsc_v1/inputs.jsonc index d58b66d2f3..166c82e0d3 100644 --- a/decompiler/config/jak2/ntsc_v1/inputs.jsonc +++ b/decompiler/config/jak2/ntsc_v1/inputs.jsonc @@ -184,9 +184,7 @@ // STR files containing a texture that should be used by // FR3 creation. - "str_texture_file_names" : [ - "STR/PRMINIMA.STR" - ], + "str_texture_file_names": ["STR/PRMINIMA.STR"], // some objects are part of STR files (streaming data). "str_file_names": [ diff --git a/decompiler/config/jak2/ntsc_v1/var_names.jsonc b/decompiler/config/jak2/ntsc_v1/var_names.jsonc index 944f12ce9a..840ea868d9 100644 --- a/decompiler/config/jak2/ntsc_v1/var_names.jsonc +++ b/decompiler/config/jak2/ntsc_v1/var_names.jsonc @@ -4341,5 +4341,25 @@ "vars": { "s2-0": ["s2-0", "pickup-type"] } + }, + "get-level-icon-id-01": { + "vars": { + "v0-0": ["tex", "texture-id"] + } + }, + "get-level-icon-id-02": { + "vars": { + "v0-0": ["tex", "texture-id"] + } + }, + "get-level-icon-id-03": { + "vars": { + "v0-0": ["tex", "texture-id"] + } + }, + "get-level-icon-id-04": { + "vars": { + "v0-0": ["tex", "texture-id"] + } } } diff --git a/goal_src/jak2/dgos/game.gd b/goal_src/jak2/dgos/game.gd index 0b6c718d40..50525bf603 100644 --- a/goal_src/jak2/dgos/game.gd +++ b/goal_src/jak2/dgos/game.gd @@ -359,6 +359,7 @@ "progress-static.o" "progress.o" "progress-draw.o" + "progress-draw-pc.o" ;; added "ocean.o" "ocean-vu0.o" "ocean-texture.o" diff --git a/goal_src/jak2/engine/game/settings-h.gc b/goal_src/jak2/engine/game/settings-h.gc index a5b0a0c9ae..1f5a33821c 100644 --- a/goal_src/jak2/engine/game/settings-h.gc +++ b/goal_src/jak2/engine/game/settings-h.gc @@ -339,3 +339,8 @@ s4-0 ) ) + +(defmacro language? (&rest langs) + "is the current language any of the ones specified?" + `(or ,(apply (lambda (x) `(= (-> *setting-control* user-default language) (language-enum ,x))) langs))) + diff --git a/goal_src/jak2/engine/game/task/game-task.gc b/goal_src/jak2/engine/game/task/game-task.gc index ca27e95a2c..00248eacfa 100644 --- a/goal_src/jak2/engine/game/task/game-task.gc +++ b/goal_src/jak2/engine/game/task/game-task.gc @@ -1063,6 +1063,9 @@ (throne 0 #f #f) (garage 0 #f #f) (stadium 0 #f #f) + (stadiumb 0 #f #f) ;; added + (stadiumc 0 #f #f) ;; added + (stadiumd 0 #f #f) ;; added (introcst 0 lintcstb #f) (onintent 0 ltentout display) ) @@ -5682,7 +5685,7 @@ :on-complete #f :on-fail #f ) - :borrow '((garage 0 lgarcsta #f) (stadium 0 lracelit special) (ctywide 0 lracebf special)) + :borrow '((garage 0 lgarcsta #f) (stadium 0 lracelit special) (stadiumb 0 lracebf special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (= (level-status *level* 'stadium) 'active)) :on-close #f :description (text-id progress-missions-stadium-race-class3) @@ -5715,7 +5718,7 @@ ) :on-open #f :info #f - :borrow '((garage 0 lashgrd #f) (stadium 0 lracelit special) (ctywide 0 lracebf special)) + :borrow '((garage 0 lashgrd #f) (stadium 0 lracelit special) (stadiumb 0 lracebf special)) ;; changed from ctywide :open? #f :on-close #f :description (text-id progress-missions-stadium-race-class3) @@ -7167,7 +7170,7 @@ :on-complete #f :on-fail #f ) - :borrow '((garage 0 lsamergd #f) (stadium 0 lracelit special) (ctywide 0 lracecf special)) + :borrow '((garage 0 lsamergd #f) (stadium 0 lracelit special) (stadiumc 0 lracecf special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (= (level-status *level* 'stadium) 'active)) :on-close #f :description (text-id progress-missions-stadium-race-class2) @@ -7200,7 +7203,7 @@ ) :on-open #f :info #f - :borrow '((garage 0 lashgrd #f) (stadium 0 lracelit special) (ctywide 0 lracecf special)) + :borrow '((garage 0 lashgrd #f) (stadium 0 lracelit special) (stadiumc 0 lracecf special)) ;; changed from ctywide :open? #f :on-close #f :description (text-id progress-missions-stadium-race-class2) @@ -8284,7 +8287,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracedf special)) + :borrow '((stadium 0 lracelit special) (stadiumd 0 lracedf special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (= (level-status *level* 'stadium) 'active)) :on-close #f :description (text-id progress-missions-stadium-race-class1) @@ -11929,7 +11932,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracebf special)) + :borrow '((stadium 0 lracelit special) (stadiumb 0 lracebf special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (let ((v1-1 (level-get-target-inside *level*))) (the-as symbol (and v1-1 (= (-> v1-1 info taskname) (-> arg0 level)))) ) @@ -12006,7 +12009,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracecf special)) + :borrow '((stadium 0 lracelit special) (stadiumc 0 lracecf special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (let ((v1-1 (level-get-target-inside *level*))) (the-as symbol (and v1-1 (= (-> v1-1 info taskname) (-> arg0 level)))) ) @@ -12083,7 +12086,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracedf special)) + :borrow '((stadium 0 lracelit special) (stadiumd 0 lracedf special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (let ((v1-1 (level-get-target-inside *level*))) (the-as symbol (and v1-1 (= (-> v1-1 info taskname) (-> arg0 level)))) ) @@ -12154,7 +12157,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracebb special)) + :borrow '((stadium 0 lracelit special) (stadiumb 0 lracebb special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (let ((v1-1 (level-get-target-inside *level*))) (the-as symbol (and v1-1 (= (-> v1-1 info taskname) (-> arg0 level)))) ) @@ -12225,7 +12228,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracecb special)) + :borrow '((stadium 0 lracelit special) (stadiumc 0 lracecb special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (let ((v1-1 (level-get-target-inside *level*))) (the-as symbol (and v1-1 (= (-> v1-1 info taskname) (-> arg0 level)))) ) @@ -12296,7 +12299,7 @@ :on-complete #f :on-fail #f ) - :borrow '((stadium 0 lracelit special) (ctywide 0 lracedb special)) + :borrow '((stadium 0 lracelit special) (stadiumd 0 lracedb special)) ;; changed from ctywide :open? (lambda ((arg0 game-task-node-info)) (let ((v1-1 (level-get-target-inside *level*))) (the-as symbol (and v1-1 (= (-> v1-1 info taskname) (-> arg0 level)))) ) diff --git a/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc b/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc index a51172784a..9396234aa8 100644 --- a/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc +++ b/goal_src/jak2/engine/gfx/sprite/particles/sparticle-launcher.gc @@ -1627,124 +1627,88 @@ (none) ) -;; TODO: vf1/vf2 get set from somewhere... (defun sparticle-texture-day-night ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) - (local-vars - (v1-9 uint128) - (v1-10 uint128) - (v1-13 uint128) - (v1-14 uint128) - (v1-23 uint128) - (v1-24 uint128) - (v1-27 uint128) - (v1-28 uint128) - (v1-33 float) - (a0-5 float) - (a0-11 float) - (t7-0 uint) ;; changed - (t7-3 uint) ;; changed - (s3-0 float) - (s4-0 float) - ) - (rlet ((vf1 :class vf) - (vf2 :class vf) - ) - (let ((s2-0 (the-as object (-> arg1 user-float)))) - (when (nonzero? (the-as float s2-0)) - (let* ((v1-1 *time-of-day*) - (s1-0 (if v1-1 - (-> v1-1 0 hours) - 0 - ) - ) - (f0-0 (rand-vu)) - ) - (.mov s4-0 vf1) - (.mov s3-0 vf2) - (cond - ((or (< s1-0 6) (< 18 s1-0)) - (let ((a1-1 (-> (the-as (array int32) s2-0) 7))) - (when (nonzero? a1-1) - (let ((v1-6 f0-0)) - (.mov vf2 v1-6) - ) - (let ((v1-8 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 9))))) - (.pextlb v1-9 0 v1-8) - ) - (.pextlb v1-10 0 v1-9) - (.mov vf1 v1-10) - (.itof.vf vf1 vf1) - (.mul.x.vf vf1 vf1 vf2) - (let ((v1-12 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 8))))) - (.pextlb v1-13 0 v1-12) - ) - (.pextlb v1-14 0 v1-13) - (.mov vf2 v1-14) - (.itof.vf vf2 vf2) - (.add.vf vf1 vf1 vf2) - (let ((v1-15 (-> arg1 flags-s32))) - (when (nonzero? (-> (the-as (array int32) s2-0) 10)) - (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) - (.mul.vf vf1 vf1 vf2) - (.mov a0-5 vf1) - ) - (let ((v1-16 (logand v1-15 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)))) - (.mov t7-0 vf1) - (let ((v1-17 (sar (the-as int v1-16) 14))) - (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-0 (the-as uint -2)) v1-17))) - ) - ) - ) - (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-1)) - ) - ) - ) - (else - (let ((a1-2 (-> (the-as (array int32) s2-0) 3))) - (when (nonzero? a1-2) - (let ((v1-20 f0-0)) - (.mov vf2 v1-20) - ) - (let ((v1-22 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 5))))) - (.pextlb v1-23 0 v1-22) - ) - (.pextlb v1-24 0 v1-23) - (.mov vf1 v1-24) - (.itof.vf vf1 vf1) - (.mul.x.vf vf1 vf1 vf2) - (let ((v1-26 (the-as uint128 (make-u128 0 (-> (the-as (array int32) s2-0) 4))))) - (.pextlb v1-27 0 v1-26) - ) - (.pextlb v1-28 0 v1-27) - (.mov vf2 v1-28) - (.itof.vf vf2 vf2) - (.add.vf vf1 vf1 vf2) - (let ((v1-29 (-> arg1 flags-s32))) - (when (nonzero? (-> (the-as (array int32) s2-0) 6)) - (.lvf vf2 (&-> *time-of-day-context* current-prt-color quad)) - (.mul.vf vf1 vf1 vf2) - (.mov a0-11 vf1) - ) - (let ((v1-30 (logand v1-29 (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)))) - (.mov t7-3 vf1) - (let ((v1-31 (sar (the-as int v1-30) 14))) - (set! (-> arg2 r-g-b-a quad) (the-as uint128 (logior (logand t7-3 (the-as uint -2)) v1-31))) + ;; this was rewritten from assembly! + (let ((s2-0 (the-as (array int32) (-> arg1 user-object)))) + (when (nonzero? s2-0) + (let* ((v1-1 *time-of-day*) + (s1-0 (if v1-1 + (-> v1-1 0 hours) + 0 ) - ) ) - (particle-adgif-callback (-> arg1 adgif) (the-as texture-id a1-2)) + (f0-0 (rand-vu)) + ) + (cond + ((or (< s1-0 6) (< 18 s1-0)) + (let ((night-tex (the texture-id (-> s2-0 7)))) + (when (nonzero? night-tex) + ;; they use two consecutive pextlb with zeros to expand each 8-bit value in the rgba + ;; to a 32-bit value with no sign extension (i believe) and then itof it. very fast! + ;; 8 -> 32 expand to vf1 + ;; multiply by f0-0 (in vf2) + ;; 8 -> 32 expand to vf2 + ;; to float + ;; vf1 += vf2 + (let ((rgba-rand (the rgba (-> s2-0 9))) + (rgba-base (the rgba (-> s2-0 8)))) + (set-vector! (-> arg2 r-g-b-a) + (* f0-0 (-> rgba-rand r)) + (* f0-0 (-> rgba-rand g)) + (* f0-0 (-> rgba-rand b)) + (* f0-0 (-> rgba-rand a))) + (+! (-> arg2 r-g-b-a x) (-> rgba-base r)) + (+! (-> arg2 r-g-b-a y) (-> rgba-base g)) + (+! (-> arg2 r-g-b-a z) (-> rgba-base b)) + (+! (-> arg2 r-g-b-a w) (-> rgba-base a)) ) + (when (nonzero? (-> s2-0 10)) + (*! (-> arg2 r-g-b-a x) (-> *time-of-day-context* current-prt-color x)) + (*! (-> arg2 r-g-b-a y) (-> *time-of-day-context* current-prt-color y)) + (*! (-> arg2 r-g-b-a z) (-> *time-of-day-context* current-prt-color z)) + (*! (-> arg2 r-g-b-a w) (-> *time-of-day-context* current-prt-color w)) + ) + ;; sneak in a flag here for... some reason + (if (logtest? (-> arg1 flags) (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)) + (set! (-> arg2 r-g-b-a x) (the-as float (logior 1 (the-as int (-> arg2 r-g-b-a x))))) + (set! (-> arg2 r-g-b-a x) (the-as float (logand (lognot 1) (the-as int (-> arg2 r-g-b-a x)))))) + (particle-adgif-callback (-> arg1 adgif) night-tex) + ) + ) + ) + (else + (let ((day-tex (the texture-id (-> s2-0 3)))) + (when (nonzero? day-tex) + (let ((rgba-rand (the rgba (-> s2-0 5))) + (rgba-base (the rgba (-> s2-0 4)))) + (set-vector! (-> arg2 r-g-b-a) + (* f0-0 (-> rgba-rand r)) + (* f0-0 (-> rgba-rand g)) + (* f0-0 (-> rgba-rand b)) + (* f0-0 (-> rgba-rand a))) + (+! (-> arg2 r-g-b-a x) (-> rgba-base r)) + (+! (-> arg2 r-g-b-a y) (-> rgba-base g)) + (+! (-> arg2 r-g-b-a z) (-> rgba-base b)) + (+! (-> arg2 r-g-b-a w) (-> rgba-base a)) + ) + (when (nonzero? (-> s2-0 6)) + (*! (-> arg2 r-g-b-a x) (-> *time-of-day-context* current-prt-color x)) + (*! (-> arg2 r-g-b-a y) (-> *time-of-day-context* current-prt-color y)) + (*! (-> arg2 r-g-b-a z) (-> *time-of-day-context* current-prt-color z)) + (*! (-> arg2 r-g-b-a w) (-> *time-of-day-context* current-prt-color w)) + ) + (if (logtest? (-> arg1 flags) (sp-cpuinfo-flag-s32 sp-cpuinfo-flag-14)) + (set! (-> arg2 r-g-b-a x) (the-as float (logior 1 (the-as int (-> arg2 r-g-b-a x))))) + (set! (-> arg2 r-g-b-a x) (the-as float (logand (lognot 1) (the-as int (-> arg2 r-g-b-a x)))))) + (particle-adgif-callback (-> arg1 adgif) day-tex) ) ) ) ) - (.mov vf1 s4-0) - (.mov vf2 s3-0) - (.mov v1-33 vf2) ) ) - (none) ) + (none) ) (defun sparticle-mode-animate ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 sprite-vec-data-2d)) diff --git a/goal_src/jak2/engine/level/level-info.gc b/goal_src/jak2/engine/level/level-info.gc index 5dbc3b337d..b40b1799ef 100644 --- a/goal_src/jak2/engine/level/level-info.gc +++ b/goal_src/jak2/engine/level/level-info.gc @@ -8865,6 +8865,7 @@ :activate-func 'race-level-activate :deactivate-func 'race-level-deactivate :kill-func #f + :borrow-size (new 'static 'array uint16 2 160 0) ;; added :borrow-level (new 'static 'array symbol 2 #f #f) :borrow-display? (new 'static 'array symbol 2 #f #f) :texture-anim-tfrag #f @@ -9064,6 +9065,7 @@ :activate-func 'race-level-activate :deactivate-func 'race-level-deactivate :kill-func #f + :borrow-size (new 'static 'array uint16 2 160 0) ;; added :borrow-level (new 'static 'array symbol 2 #f #f) :borrow-display? (new 'static 'array symbol 2 #f #f) :texture-anim-tfrag #f @@ -9239,6 +9241,7 @@ :activate-func 'race-level-activate :deactivate-func 'race-level-deactivate :kill-func #f + :borrow-size (new 'static 'array uint16 2 160 0) ;; added :borrow-level (new 'static 'array symbol 2 #f #f) :borrow-display? (new 'static 'array symbol 2 #f #f) :texture-anim-tfrag #f diff --git a/goal_src/jak2/engine/level/level.gc b/goal_src/jak2/engine/level/level.gc index fa54d5489f..9f2be79872 100644 --- a/goal_src/jak2/engine/level/level.gc +++ b/goal_src/jak2/engine/level/level.gc @@ -2428,14 +2428,17 @@ into 7 sections, which might explain the weird sizes in the center. ) ;; did we find one to unload? - ;; PC NOTE : added an extra check for DGO time. If you start a load and discard it on the next frame, + ;; PC NOTE : added an extra check for DGO time and name. If you start a load and discard it on the next frame, ;; you may attempt to start a new load right away before the ISO thread can properly stop the previous load ;; which will just crash the game. Sadly this means loads may sometimes be delayed by one frame. The horror. - (when ;(>= unload-idx 0) - (and (>= unload-idx 0) (< 1 (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) - (let ((lev-to-unload (-> *level* level unload-idx))) - (format 0 "Discarding level ~A~%" (-> lev-to-unload name)) - (level-status-update! lev-to-unload 'inactive) ;; kill it. + (when (>= unload-idx 0) + (format 0 " level loading : want to unload ~A. load-level is ~A~%" (-> *level* level unload-idx load-name) (-> *level* load-level)) + (when (or (!= (-> *level* level unload-idx load-name) (-> *level* load-level)) + (< 1 (- (-> *display* real-clock integral-frame-counter) *dgo-time*))) + (let ((lev-to-unload (-> *level* level unload-idx))) + (format 0 "Discarding level ~A~%" (-> lev-to-unload name)) + (level-status-update! lev-to-unload 'inactive) ;; kill it. + ) ) (set! discarded-level #t) ) diff --git a/goal_src/jak2/engine/ui/hud.gc b/goal_src/jak2/engine/ui/hud.gc index da1f818364..898ac4cd39 100644 --- a/goal_src/jak2/engine/ui/hud.gc +++ b/goal_src/jak2/engine/ui/hud.gc @@ -1108,7 +1108,7 @@ ) (defun show-hud ((arg0 object)) - (when (and *target* (or (not *progress-process*) (is-gone (-> *progress-process* 0)))) + (when (and *target* (or (not *progress-process*) (gone? (-> *progress-process* 0)))) (let ((v1-7 (-> *hud-engine* alive-list next0))) *hud-engine* (let ((s5-0 (-> v1-7 next0))) diff --git a/goal_src/jak2/engine/ui/progress/progress-draw.gc b/goal_src/jak2/engine/ui/progress/progress-draw.gc index 688bbf3f4d..ba22d13db4 100644 --- a/goal_src/jak2/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak2/engine/ui/progress/progress-draw.gc @@ -80,6 +80,13 @@ ) ) ) + (#when PC_PORT + ;; added for better widescreen handling + (when (not (-> *pc-settings* use-vis?)) + (set! s3-0 (the int (adjust-game-x (the float s3-0)))) + (set! a3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) a3-0))) + ) + ) (with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) @@ -197,6 +204,10 @@ (set! s5-0 170) ) ) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! s3-0 (adjust-game-x (the float s3-0))) + )) (set! (-> arg0 origin x) (the float s3-0)) (set! (-> arg0 origin y) (the float s5-0)) (let ((s2-0 print-game-text)) @@ -223,6 +234,10 @@ (f30-0 (-> arg0 origin x)) (f28-0 (-> arg0 origin y)) ) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! s3-0 (adjust-game-x (the float s3-0))) + )) (set! (-> arg0 origin x) (the float s3-0)) (set! (-> arg0 origin y) (the float s5-0)) (let ((s2-0 print-game-text)) @@ -255,6 +270,10 @@ (set! s4-0 204) ) ) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! s3-0 (adjust-game-x (the float s3-0))) + )) (set! (-> arg0 origin x) (the float s3-0)) (set! (-> arg0 origin y) (the float s5-0)) (let ((s2-0 print-game-text)) @@ -292,6 +311,10 @@ (set! (-> arg0 min y) 70.0) (set! (-> arg0 max x) 444.0) (set! (-> arg0 max y) 329.0) + (#when PC_PORT + (set! (-> arg0 min x) (the float (the int (adjust-game-x 70.0)))) + (set! (-> arg0 max x) (the float (the int (adjust-game-x 444.0)))) + ) ) ) (with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) @@ -1020,16 +1043,10 @@ (= arg2 (-> arg0 option-index)) ) ) - (let ((v1-7 arg1)) - (set! (-> v1-7 scale) 0.75) - ) - (let ((a0-2 arg1)) - (set! (-> a0-2 color) (font-color progress)) - ) + (set-scale! arg1 0.75) + (set-color! arg1 (font-color progress)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle large)) - ) + (set-flags! arg1 (font-flags kerning middle large)) (set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3) 235 175 @@ -1054,12 +1071,15 @@ ) ) ) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (cond ((= (-> obj name) (text-id progress-root-show-map)) (when (= (-> *setting-control* user-default language) (language-enum french)) - (let ((v1-18 arg1)) - (set! (-> v1-18 scale) 0.7) - ) + (set-scale! arg1 0.7) ) (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress)) (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) @@ -1068,9 +1088,7 @@ ) ) ) - (let ((v1-21 arg1)) - (set! (-> v1-21 scale) 0.6) - ) + (set-scale! arg1 0.6) (let ((v1-23 (-> *bigmap* bigmap-index))) (cond ((zero? v1-23) @@ -1280,365 +1298,341 @@ ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-01 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303600))) + (let ((tex (new 'static 'texture-id :index #x36 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304800)) + (set! tex (new 'static 'texture-id :index #x48 :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304000)) + (set! tex (new 'static 'texture-id :index #x40 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307000)) + (set! tex (new 'static 'texture-id :index #x70 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305800)) + (set! tex (new 'static 'texture-id :index #x58 :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306800)) + (set! tex (new 'static 'texture-id :index #x68 :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307400)) + (set! tex (new 'static 'texture-id :index #x74 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303600)) + (set! tex (new 'static 'texture-id :index #x36 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306c00)) + (set! tex (new 'static 'texture-id :index #x6c :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305c00)) + (set! tex (new 'static 'texture-id :index #x5c :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305400)) + (set! tex (new 'static 'texture-id :index #x54 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305000)) + (set! tex (new 'static 'texture-id :index #x50 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306400)) + (set! tex (new 'static 'texture-id :index #x64 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307800)) + (set! tex (new 'static 'texture-id :index #x78 :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304c00)) + (set! tex (new 'static 'texture-id :index #x4c :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303a00)) + (set! tex (new 'static 'texture-id :index #x3a :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307c00)) + (set! tex (new 'static 'texture-id :index #x7c :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304400)) + (set! tex (new 'static 'texture-id :index #x44 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306000)) + (set! tex (new 'static 'texture-id :index #x60 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-02 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303700))) + (let ((tex (new 'static 'texture-id :index #x37 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304900)) + (set! tex (new 'static 'texture-id :index #x49 :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304100)) + (set! tex (new 'static 'texture-id :index #x41 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307100)) + (set! tex (new 'static 'texture-id :index #x71 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305900)) + (set! tex (new 'static 'texture-id :index #x59 :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306900)) + (set! tex (new 'static 'texture-id :index #x69 :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307500)) + (set! tex (new 'static 'texture-id :index #x75 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303700)) + (set! tex (new 'static 'texture-id :index #x37 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306d00)) + (set! tex (new 'static 'texture-id :index #x6d :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305d00)) + (set! tex (new 'static 'texture-id :index #x5d :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305500)) + (set! tex (new 'static 'texture-id :index #x55 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305100)) + (set! tex (new 'static 'texture-id :index #x51 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306500)) + (set! tex (new 'static 'texture-id :index #x65 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307900)) + (set! tex (new 'static 'texture-id :index #x79 :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304d00)) + (set! tex (new 'static 'texture-id :index #x4d :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303b00)) + (set! tex (new 'static 'texture-id :index #x3b :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307d00)) + (set! tex (new 'static 'texture-id :index #x7d :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304500)) + (set! tex (new 'static 'texture-id :index #x45 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306100)) + (set! tex (new 'static 'texture-id :index #x61 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-03 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303800))) + (let ((tex (new 'static 'texture-id :index #x38 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304a00)) + (set! tex (new 'static 'texture-id :index #x4a :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304200)) + (set! tex (new 'static 'texture-id :index #x42 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307200)) + (set! tex (new 'static 'texture-id :index #x72 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305a00)) + (set! tex (new 'static 'texture-id :index #x5a :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306a00)) + (set! tex (new 'static 'texture-id :index #x6a :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307600)) + (set! tex (new 'static 'texture-id :index #x76 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303800)) + (set! tex (new 'static 'texture-id :index #x38 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306e00)) + (set! tex (new 'static 'texture-id :index #x6e :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305e00)) + (set! tex (new 'static 'texture-id :index #x5e :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305600)) + (set! tex (new 'static 'texture-id :index #x56 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305200)) + (set! tex (new 'static 'texture-id :index #x52 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306600)) + (set! tex (new 'static 'texture-id :index #x66 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307a00)) + (set! tex (new 'static 'texture-id :index #x7a :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304e00)) + (set! tex (new 'static 'texture-id :index #x4e :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303c00)) + (set! tex (new 'static 'texture-id :index #x3c :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307e00)) + (set! tex (new 'static 'texture-id :index #x7e :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304600)) + (set! tex (new 'static 'texture-id :index #x46 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306200)) + (set! tex (new 'static 'texture-id :index #x62 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-04 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303900))) + (let ((tex (new 'static 'texture-id :index #x39 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304b00)) + (set! tex (new 'static 'texture-id :index #x4b :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304300)) + (set! tex (new 'static 'texture-id :index #x43 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307300)) + (set! tex (new 'static 'texture-id :index #x73 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305b00)) + (set! tex (new 'static 'texture-id :index #x5b :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306b00)) + (set! tex (new 'static 'texture-id :index #x6b :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307700)) + (set! tex (new 'static 'texture-id :index #x77 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303900)) + (set! tex (new 'static 'texture-id :index #x39 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306f00)) + (set! tex (new 'static 'texture-id :index #x6f :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305f00)) + (set! tex (new 'static 'texture-id :index #x5f :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305700)) + (set! tex (new 'static 'texture-id :index #x57 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305300)) + (set! tex (new 'static 'texture-id :index #x53 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306700)) + (set! tex (new 'static 'texture-id :index #x67 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307b00)) + (set! tex (new 'static 'texture-id :index #x7b :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304f00)) + (set! tex (new 'static 'texture-id :index #x4f :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303d00)) + (set! tex (new 'static 'texture-id :index #x3d :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307f00)) + (set! tex (new 'static 'texture-id :index #x7f :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304700)) + (set! tex (new 'static 'texture-id :index #x47 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306300)) + (set! tex (new 'static 'texture-id :index #x63 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) -(defun draw-decoration ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 int) (arg4 symbol) (arg5 float)) - (local-vars - (sv-16 symbol) - (sv-32 float) - (sv-48 int) - (sv-64 int) - (sv-80 (function string font-context symbol int bucket-id float)) - (sv-96 int) - ) - (set! sv-96 arg3) - (set! sv-16 arg4) - (set! sv-32 arg5) +(defun draw-decoration ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id) (arg4 symbol) (arg5 float)) (let ((gp-0 70) (s5-0 120) + (sv-48 87) + (s3-0 375) + (s2-0 210) + (sv-64 0) ) - (set! sv-48 87) - (let ((s3-0 375) - (s2-0 210) - ) - (set! sv-64 0) - (cond - ((not sv-16) - (case (get-aspect-ratio) - (('aspect4x3) + (cond + ((not arg4) + (case (get-aspect-ratio) + (('aspect4x3) (set! gp-0 69) (set! s5-0 118) (set! sv-48 80) (set! s3-0 375) (set! s2-0 210) ) - (('aspect16x9) + (('aspect16x9) (set! gp-0 79) (set! s5-0 118) (set! sv-48 68) (set! s3-0 356) (set! s2-0 244) ) - ) - ) - (else - (case (get-aspect-ratio) - (('aspect4x3) - (set! gp-0 70) - (set! s5-0 116) - (set! sv-48 78) - (set! s3-0 375) - (set! s2-0 179) - ) - (('aspect16x9) - (set! gp-0 79) - (set! s5-0 108) - (set! sv-48 58) - (set! s3-0 356) - (set! s2-0 185) - (set! sv-64 20) - sv-64 - ) + ) + ) + (else + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 70) + (set! s5-0 116) + (set! sv-48 78) + (set! s3-0 375) + (set! s2-0 179) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 108) + (set! sv-48 58) + (set! s3-0 356) + (set! s2-0 185) + (set! sv-64 20) ) ) ) - (let ((v1-20 arg1)) - (set! (-> v1-20 scale) sv-32) + ) + (#when PC_PORT + ;; added for better widescreen handling + (when (not (-> *pc-settings* use-vis?)) + (set! gp-0 (the int (adjust-game-x (the float gp-0)))) + (set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0))) ) - (set! (-> arg1 origin y) (the float sv-48)) - (set! (-> arg1 height) 50.0) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) + ) + (set-scale! arg1 arg5) + (set! (-> arg1 origin y) (the float sv-48)) + (set! (-> arg1 height) 50.0) + (set-color! arg1 (font-color progress)) + (set-flags! arg1 (font-flags kerning middle large)) + (print-game-text (lookup-text! *common-text* arg3 #f) arg1 #f 44 (bucket-id progress)) + (set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 arg2))) + (draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s3-0)) (the float s5-0) (the float s5-0)) + (when arg4 + (+! (-> arg1 origin y) (the float sv-64)) + (draw-savegame-box + arg0 + (the float gp-0) + (the float (+ gp-0 s3-0)) + (the float (+ s5-0 s2-0)) + (the float (+ s5-0 s2-0)) ) - (let ((a0-2 arg1)) - (set! (-> a0-2 flags) (font-flags kerning middle large)) - ) - (set! sv-80 print-game-text) - (let* ((a0-3 *common-text*) - (t9-2 (method-of-object a0-3 lookup-text!)) - (a2-1 #f) - (a0-4 (t9-2 a0-3 (the-as text-id sv-96) a2-1)) - (a1-2 arg1) - (a2-2 #f) - (a3-1 44) - (t0-1 (bucket-id progress)) - ) - (sv-80 a0-4 a1-2 a2-2 a3-1 (the-as bucket-id t0-1)) - ) - (set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 arg2))) - (draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s3-0)) (the float s5-0) (the float s5-0)) - (when sv-16 - (+! (-> arg1 origin y) (the float sv-64)) - (draw-savegame-box - arg0 - (the float gp-0) - (the float (+ gp-0 s3-0)) - (the float (+ s5-0 s2-0)) - (the float (+ s5-0 s2-0)) - ) - ) - (with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) - (bucket-id particles) - ) - (draw-sprite2d-xy - s0-1 - gp-0 - s5-0 - s3-0 - s2-0 - (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 arg2))) - ) + ) + (with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s3-0 + s2-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 arg2))) ) ) ) @@ -1676,22 +1670,18 @@ (set! s3-0 175) ) ) - (let ((v1-9 sv-48)) - (set! (-> v1-9 scale) 0.95) + (#when PC_PORT + ;; added for better widescreen handling + (when (not (-> *pc-settings* use-vis?)) + (set! gp-0 (the int (adjust-game-x (the float gp-0)))) + (set! s4-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s4-0))) + ) ) + (set-scale! sv-48 0.95) (set! (-> sv-48 height) 50.0) (set! (-> sv-48 origin y) (the float sv-16)) - (let ((a0-2 sv-48)) - (set! (-> a0-2 color) (font-color progress)) - ) - (set! sv-32 print-game-text) - (let ((a0-4 (lookup-text! *common-text* s0-0 #f)) - (a2-2 #f) - (a3-1 44) - (t0-0 (bucket-id progress)) - ) - (sv-32 a0-4 sv-48 a2-2 a3-1 (the-as bucket-id t0-0)) - ) + (set-color! sv-48 (font-color progress)) + (print-game-text (lookup-text! *common-text* s0-0 #f) sv-48 #f 44 (bucket-id progress)) (set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s2-0))) (draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s4-0)) (the float s5-0) (the float s5-0)) (draw-savegame-box @@ -1717,12 +1707,12 @@ ) ) -(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 symbol) (arg4 text-id)) +(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 text-id) (arg4 symbol)) (local-vars (sv-16 font-context) (sv-32 int) (sv-48 (function string font-context symbol int bucket-id float)) - (sv-64 symbol) + (sv-64 text-id) ) (set! sv-16 arg1) (let ((s2-0 arg2)) @@ -1751,31 +1741,26 @@ (set! s3-0 244) ) ) - (let ((v1-9 sv-16)) - (set! (-> v1-9 scale) 0.95) + (#when PC_PORT + ;; added for better widescreen handling + (when (not (-> *pc-settings* use-vis?)) + (set! gp-0 (the int (adjust-game-x (the float gp-0)))) + (set! s4-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s4-0))) + ) ) + (set-scale! sv-16 0.95) (set! (-> sv-16 origin y) (the float sv-32)) (set! (-> sv-16 height) 50.0) - (let ((a0-2 sv-16)) - (set! (-> a0-2 color) (font-color progress)) - ) + (set-color! sv-16 (font-color progress)) (set! (-> sv-16 origin x) 80.0) - (let ((a0-3 sv-16)) - (set! (-> a0-3 flags) (font-flags kerning middle large)) - ) - (set! sv-48 print-game-text) - (let* ((a0-4 *common-text*) - (t9-1 (method-of-object a0-4 lookup-text!)) - (a2-1 #f) - (a0-5 (t9-1 a0-4 (the-as text-id sv-64) a2-1)) - (a1-2 sv-16) - (a2-2 #f) - (a3-1 44) - (t0-1 (bucket-id progress)) - ) - (sv-48 a0-5 a1-2 a2-2 a3-1 (the-as bucket-id t0-1)) - ) + (#when PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (set! (-> sv-16 origin x) (the float (adjust-game-x (-> sv-16 origin x)))))) + (set-flags! sv-16 (font-flags kerning middle large)) + (print-game-text (lookup-text! *common-text* sv-64 #f) sv-16 #f 44 (bucket-id progress)) (set! (-> sv-16 origin x) (the float (+ gp-0 65))) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> sv-16 origin x) (the float (+ gp-0 (* (-> *pc-settings* aspect-ratio-reciprocal) 65))))) (set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s2-0))) (draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s4-0)) (the float s5-0) (the float s5-0)) (if s0-0 @@ -1838,6 +1823,13 @@ (set! s3-0 128) ) ) + (#when PC_PORT + ;; added for better widescreen handling + (when (not (-> *pc-settings* use-vis?)) + (set! gp-0 (the int (adjust-game-x (the float gp-0)))) + (set! s4-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s4-0))) + ) + ) (let ((v1-11 sv-48)) (set! (-> v1-11 scale) 0.95) ) @@ -1879,12 +1871,12 @@ ) ) -(defun draw-decoration-load-save ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 int)) +(defun draw-decoration-load-save ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id)) (local-vars (sv-16 int) (sv-32 int) (sv-48 (function string font-context symbol int bucket-id float)) - (sv-64 int) + (sv-64 text-id) (sv-80 font-context) ) (set! sv-80 arg1) @@ -1920,45 +1912,29 @@ (set! s2-0 248) ) ) - (let ((v1-13 sv-80)) - (set! (-> v1-13 scale) 0.65) + (#when PC_PORT + ;; added for better widescreen handling + (when (not (-> *pc-settings* use-vis?)) + (set! gp-0 (the int (adjust-game-x (the float gp-0)))) + (set! s0-0 (the int (adjust-game-x (the float s0-0)))) + (set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0))) + (set! sv-32 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-32))) + ) ) + (set-scale! sv-80 0.65) (when (or (= (-> *setting-control* user-default language) (language-enum french)) (= (-> *setting-control* user-default language) (language-enum spanish)) (= (-> *setting-control* user-default language) (language-enum italian)) ) - (let ((v1-24 sv-80)) - (set! (-> v1-24 scale) 0.5) - ) + (set-scale! sv-80 0.5) ) (set! (-> sv-80 origin y) (the float sv-16)) (set! (-> sv-80 origin x) (the float s0-0)) - (let ((a0-6 sv-80)) - (set! (-> a0-6 flags) (font-flags kerning middle large)) - ) - (let ((a0-7 sv-80)) - (set! (-> a0-7 color) (font-color progress)) - ) - (set! sv-48 print-game-text) - (let* ((a0-8 *common-text*) - (t9-1 (method-of-object a0-8 lookup-text!)) - (a2-1 #f) - (a0-9 (t9-1 a0-8 (the-as text-id sv-64) a2-1)) - (a2-2 #f) - (a3-1 44) - (t0-0 (bucket-id progress)) - ) - (sv-48 a0-9 sv-80 a2-2 a3-1 (the-as bucket-id t0-0)) - ) + (set-flags! sv-80 (font-flags kerning middle large)) + (set-color! sv-80 (font-color progress)) + (print-game-text (lookup-text! *common-text* sv-64 #f) sv-80 #f 44 (bucket-id progress)) (set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s4-0))) (draw-savegame-box arg0 (the float s0-0) (the float (+ s0-0 sv-32)) (the float s5-0) (the float s5-0)) - (draw-savegame-box - arg0 - (the float (+ s0-0 sv-32)) - (the float (+ s0-0 sv-32)) - (the float s5-0) - (the float s5-0) - ) (with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id particles) ) @@ -2400,8 +2376,8 @@ (set! (-> arg1 height) sv-36) (if (zero? arg2) (draw-decoration-load-save obj arg1 sv-16 (if (= (-> arg0 current) 'select-load) - 300 - 299 + (text-id progress-select-file-to-load) + (text-id progress-select-file-to-save) ) ) ) @@ -2578,7 +2554,7 @@ (set! (-> v1-7 height) (the float 60)) ) (let ((s5-0 409)) - (progress-method-28 arg0 'select-save) + (get-state-check-card arg0 'select-save) (let ((s4-0 print-game-text)) (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f) 1) (s4-0 *temp-string* arg1 #f 44 (bucket-id progress)) @@ -3042,31 +3018,24 @@ (defmethod draw-option menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.5) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 80.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 85)) - ) + (set-width! arg1 360) + (set-height! arg1 85) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (let ((s4-0 print-game-text)) (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-unformatted) #f) 1) (s4-0 *temp-string* arg1 #f 44 (bucket-id progress)) ) (+! (-> arg1 origin y) 95.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 85)) - ) + (set-height! arg1 85) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-formatting-required-notice) #f) arg1 @@ -3075,9 +3044,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 95.0) - (let ((v1-13 arg1)) - (set! (-> v1-13 height) (the float 25)) - ) + (set-height! arg1 25) (draw-highlight (the int (-> arg1 origin y)) 44 (-> arg1 alpha)) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-format-prompt) #f) @@ -3094,23 +3061,18 @@ (defmethod draw-option menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.5) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 120.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 85)) - ) + (set-width! arg1 360) + (set-height! arg1 85) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-overwrite-warning) #f) arg1 @@ -3119,9 +3081,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 105.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 45)) - ) + (set-height! arg1 45) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-overwrite-confirm) #f) arg1 @@ -3138,31 +3098,24 @@ (defmethod draw-option menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.5) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 110.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 90)) - ) + (set-width! arg1 360) + (set-height! arg1 90) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (let ((s4-0 print-game-text)) (format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-no-jak2-found) #f) 1) (s4-0 *temp-string* arg1 #f 44 (bucket-id progress)) ) (+! (-> arg1 origin y) 95.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 60)) - ) + (set-height! arg1 60) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-create-jak2-file?) #f) arg1 @@ -3179,23 +3132,18 @@ (defmethod draw-option menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.5) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 85.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 45)) - ) + (set-width! arg1 360) + (set-height! arg1 45) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-60hz-change-notice) #f) arg1 @@ -3204,9 +3152,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 50.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 95)) - ) + (set-height! arg1 95) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-1) #f) arg1 @@ -3215,9 +3161,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 85.0) - (let ((v1-13 arg1)) - (set! (-> v1-13 height) (the float 55)) - ) + (set-height! arg1 55) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-2) #f) arg1 @@ -3226,9 +3170,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 60.0) - (let ((v1-16 arg1)) - (set! (-> v1-16 height) (the float 30)) - ) + (set-height! arg1 30) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-continue?) #f) arg1 @@ -3245,23 +3187,18 @@ (defmethod draw-option menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.5) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 130.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 50)) - ) + (set-width! arg1 360) + (set-height! arg1 50) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-60hz-change-complete) #f) arg1 @@ -3270,9 +3207,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 70.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 50)) - ) + (set-height! arg1 50) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-mode-revert?) #f) arg1 @@ -3289,23 +3224,18 @@ (defmethod draw-option menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.5) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 75.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 50)) - ) + (set-width! arg1 360) + (set-height! arg1 50) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-progressivescan-change-notice) #f) arg1 @@ -3314,9 +3244,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 50.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 90)) - ) + (set-height! arg1 90) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-1) #f) arg1 @@ -3325,9 +3253,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 85.0) - (let ((v1-13 arg1)) - (set! (-> v1-13 height) (the float 75)) - ) + (set-height! arg1 75) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-2) #f) arg1 @@ -3336,9 +3262,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 70.0) - (let ((v1-16 arg1)) - (set! (-> v1-16 height) (the float 30)) - ) + (set-height! arg1 30) (print-game-text (lookup-text! *common-text* (text-id progress-memcard-continue?) #f) arg1 @@ -3355,23 +3279,18 @@ (defmethod draw-option menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.55) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.55) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 80.0) (set! (-> arg1 origin y) 90.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 360)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 80)) - ) + (set-width! arg1 360) + (set-height! arg1 80) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-progressivescan-change-complete) #f) arg1 @@ -3380,9 +3299,7 @@ (bucket-id progress) ) (+! (-> arg1 origin y) 100.0) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 75)) - ) + (set-height! arg1 75) (print-game-text (lookup-text! *common-text* (text-id progress-graphics-mode-revert?) #f) arg1 @@ -3399,23 +3316,18 @@ (defmethod draw-option menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) - (let ((a0-1 arg1)) - (set! (-> a0-1 color) (font-color progress)) - ) - (let ((v1-2 arg1)) - (set! (-> v1-2 scale) 0.55) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle left large)) - ) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.55) + (set-flags! arg1 (font-flags kerning middle left large)) (set! (-> arg1 origin x) 90.0) (set! (-> arg1 origin y) 160.0) - (let ((v1-6 arg1)) - (set! (-> v1-6 width) (the float 330)) - ) - (let ((v1-7 arg1)) - (set! (-> v1-7 height) (the float 70)) - ) + (set-width! arg1 330) + (set-height! arg1 70) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) (print-game-text (lookup-text! *common-text* (text-id progress-quit-game-confirm) #f) arg1 @@ -3430,6 +3342,7 @@ (none) ) +(defglobalconstant COMPACT_SELECT_START #t) ;; WARN: disable def twice: 147. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. (defmethod draw-option menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) (local-vars @@ -3443,7 +3356,7 @@ (let* ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) (s3-0 (-> obj task-index)) (s2-0 0) - (s1-0 50) + (s1-0 (#if COMPACT_SELECT_START 25 50)) (f28-0 (* (-> arg0 sliding-height) (the float s1-0))) (s0-0 97) ) @@ -3452,32 +3365,27 @@ (set! f30-0 0.0) ) (set! (-> arg1 alpha) f30-0) - (let ((v1-5 arg1)) - (set! (-> v1-5 scale) 0.45) - ) - (let ((a0-3 arg1)) - (set! (-> a0-3 flags) (font-flags kerning middle large)) - ) - (let ((a0-4 arg1)) - (set! (-> a0-4 color) (font-color progress)) - ) + (set-scale! arg1 0.45) + (set-flags! arg1 (font-flags kerning middle large)) + (set-color! arg1 (font-color progress)) (set! (-> arg1 origin y) 100.0) - (let ((v1-9 arg1)) - (set! (-> v1-9 width) (the float 345)) - ) - (let ((v1-10 arg1)) - (set! (-> v1-10 height) (the float 210)) - ) + (set-width! arg1 345) + (set-height! arg1 210) + (#when PC_PORT + (#when COMPACT_SELECT_START (-! (-> arg1 origin y) 25.0)) + ;(-! s0-0 25) + (if (not (-> *pc-settings* use-vis?)) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)))) (let* ((v1-11 (-> arg0 current)) (a3-1 (cond ((= v1-11 'select-pre-start) - 362 + (text-id progress-select-pre-start) ) ((= v1-11 'select-kiosk-start) - 363 + (text-id progress-select-kiosk-start) ) (else - 352 + (text-id progress-main-secrets-levelselect) ) ) ) @@ -3485,32 +3393,29 @@ (if (or (= (-> *setting-control* user-default language) (language-enum french)) (= (-> *setting-control* user-default language) (language-enum spanish)) ) - (draw-decoration obj arg1 f30-0 a3-1 #t 0.7) - (draw-decoration obj arg1 f30-0 a3-1 #t 0.95) + (draw-decoration obj arg1 f30-0 (the-as text-id a3-1) #t 0.7) + (draw-decoration obj arg1 f30-0 (the-as text-id a3-1) #t 0.95) ) ) (begin-scissor-level sv-128) (set! (-> arg1 origin x) 80.0) - (let ((v1-20 arg1)) - (set! (-> v1-20 scale) 0.5) - ) + (#when PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))) + (set-scale! arg1 0.5) (when (or (= (-> *setting-control* user-default language) (language-enum japanese)) (= (-> *setting-control* user-default language) (language-enum korean)) ) - (let ((v1-28 arg1)) - (set! (-> v1-28 scale) 0.6) - ) - ) - (let ((a0-18 arg1)) - (set! (-> a0-18 flags) (font-flags kerning large)) + (set-scale! arg1 0.6) ) + (set-flags! arg1 (font-flags kerning large)) (when (>= (+ s3-0 -1) 0) (+! s3-0 -1) (set! s2-0 -1) - (draw-highlight (+ s0-0 47) 50 f30-0) + (draw-highlight (+ s0-0 (#if COMPACT_SELECT_START 22 47)) (#if COMPACT_SELECT_START 25 50) f30-0) (set! s0-0 (- s0-0 s1-0)) ) - (while (< s2-0 8) + (while (< s2-0 (#if COMPACT_SELECT_START 16 8)) (when (>= s3-0 0) (set! sv-48 -1) (set! sv-64 0) @@ -3549,73 +3454,40 @@ (set! (-> sv-96 color) (progress-selected 0)) ;; pc port note : added this check here so we dont double-draw the highlight (when (< (+ s3-0 -1) 0) - (draw-highlight (+ s0-0 47) 50 f30-0)) + (draw-highlight (+ s0-0 (#if COMPACT_SELECT_START 22 47)) (#if COMPACT_SELECT_START 25 50) f30-0)) ) (else - (let ((a0-35 arg1)) - (set! (-> a0-35 color) (font-color progress)) - ) + (set-color! arg1 (font-color progress)) ) ) (cond ((and (= (-> *setting-control* user-default language) (language-enum german)) (= (text-id progress-missions-stadium-board1) (-> sv-80 text-name)) ) - (let ((v1-71 arg1)) - (set! (-> v1-71 scale) 0.45) - ) + (set-scale! arg1 0.45) ) - ((and (= (-> *setting-control* user-default language) (language-enum german)) (!= 454 (-> sv-80 text-name))) - (let ((v1-78 arg1)) - (set! (-> v1-78 scale) 0.5) - ) + ((and (= (-> *setting-control* user-default language) (language-enum german)) (!= (text-id progress-missions-stadium-board1) (-> sv-80 text-name))) + (set-scale! arg1 0.5) ) ) - (let ((v1-79 arg1)) - (set! (-> v1-79 height) (the float s1-0)) - ) + (set-height! arg1 s1-0) (+! s0-0 s1-0) (set! (-> arg1 origin y) (the float (+ s0-0 (the int f28-0)))) - (set! sv-112 print-game-text) - (let ((a0-46 (lookup-text! *common-text* (-> sv-80 text-name) #f)) - (a1-12 arg1) - (a2-7 #f) - (a3-2 44) - (t0-3 (bucket-id progress)) - ) - (sv-112 a0-46 a1-12 a2-7 a3-2 (the-as bucket-id t0-3)) - ) + (print-game-text (lookup-text! *common-text* (-> sv-80 text-name) #f) arg1 #f 44 (bucket-id progress)) ) ) (+! s3-0 1) (+! s2-0 1) ) ) - (let ((t9-10 end-scissor-level) - (a1-13 1.0) - ) - (t9-10 sv-128 a1-13) - ) + (end-scissor-level sv-128 1.0) (draw-scene-up-down arg1) 0 (none) ) (defmethod draw-option menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) - (local-vars - (sv-48 int) - (sv-64 (function string font-context symbol int bucket-id float)) - (sv-80 (function string font-context symbol int bucket-id float)) - (sv-96 (function _varargs_ object)) - (sv-112 string) - (sv-128 (function string font-context symbol int bucket-id float)) - (sv-144 (function _varargs_ object)) - (sv-160 string) - (sv-176 (function string font-context symbol int bucket-id float)) - (sv-192 font-context) - (sv-208 font-context) - (sv-224 (function string font-context symbol int bucket-id float)) - ) + (local-vars (sv-48 int)) (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) (s4-0 (-> obj task-index)) (s3-0 0) @@ -3644,126 +3516,60 @@ ) ) (set! (-> arg1 alpha) f30-0) - (let ((a1-6 arg1)) - (set! (-> a1-6 flags) (font-flags kerning middle large)) - ) + (set-flags! arg1 (font-flags kerning middle large)) (set! (-> arg1 origin x) 90.0) (set! (-> arg1 origin y) 100.0) - (let ((v1-14 arg1)) - (set! (-> v1-14 width) (the float 335)) - ) - (let ((v1-15 arg1)) - (set! (-> v1-15 height) (the float 210)) - ) - (let ((a1-9 arg1)) - (set! (-> a1-9 color) (font-color progress)) - ) + (set-width! arg1 335) + (set-height! arg1 210) + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + )) + (set-color! arg1 (font-color progress)) (if (or (= (-> *setting-control* user-default language) (language-enum french)) (= (-> *setting-control* user-default language) (language-enum spanish)) ) - (draw-decoration obj arg1 f30-0 364 #t 0.7) - (draw-decoration obj arg1 f30-0 364 #t 0.95) + (draw-decoration obj arg1 f30-0 (text-id progress-select-scene) #t 0.7) + (draw-decoration obj arg1 f30-0 (text-id progress-select-scene) #t 0.95) ) (begin-scissor-scene s1-0) - (let ((v1-23 arg1)) - (set! (-> v1-23 scale) 0.5) - ) + (set-scale! arg1 0.5) (set! sv-48 0) (while (< sv-48 s4-0) - (set! sv-64 print-game-text) - (let ((a0-4 (lookup-text! *common-text* (-> s2-0 sv-48 text) #f)) - (a1-16 arg1) - (a2-4 #t) - (a3-3 44) - (t0-3 (bucket-id progress)) - ) - (+! f28-0 (sv-64 a0-4 a1-16 a2-4 a3-3 (the-as bucket-id t0-3))) - ) + (+! f28-0 (print-game-text (lookup-text! *common-text* (-> s2-0 sv-48 text) #f) arg1 #t 44 (bucket-id progress))) (set! sv-48 (+ sv-48 1)) ) (let ((s0-1 (- s0-0 (the int f28-0))) (f28-1 (cond ((< (-> arg0 sliding-height) 0.0) - (set! sv-112 (lookup-text! *common-text* (-> s2-0 s4-0 text) #f)) - 0.0 - (set! sv-80 print-game-text) - (set! sv-96 format) - (let ((a0-7 (clear *temp-string*)) - (a1-18 "~S") - ) - (sv-96 a0-7 a1-18 sv-112) - ) - (let* ((a0-8 *temp-string*) - (a1-19 arg1) - (a2-7 #t) - (a3-4 44) - (t0-4 (bucket-id progress)) - (f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 (the-as bucket-id t0-4))) - ) - (* (-> arg0 sliding-height) f0-16) - ) + (* (-> arg0 sliding-height) (print-game-text (string-format "~S" (lookup-text! *common-text* (-> s2-0 s4-0 text) #f)) arg1 #t 44 (bucket-id progress))) ) (else - (set! sv-160 (lookup-text! *common-text* (-> s2-0 (+ s4-0 -1) text) #f)) - 0.0 - (set! sv-128 print-game-text) - (set! sv-144 format) - (let ((a0-11 (clear *temp-string*)) - (a1-21 "~S") - ) - (sv-144 a0-11 a1-21 sv-160) - ) - (let* ((a0-12 *temp-string*) - (a1-22 arg1) - (a2-10 #t) - (a3-5 44) - (t0-5 (bucket-id progress)) - (f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 (the-as bucket-id t0-5))) - ) - (* (-> arg0 sliding-height) f0-18) - ) + (* (-> arg0 sliding-height) (print-game-text (string-format "~S" (lookup-text! *common-text* (-> s2-0 (+ s4-0 -1) text) #f)) arg1 #t 44 (bucket-id progress))) ) ) ) ) (set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1)))) (while (< s3-0 (length s2-0)) - (set! sv-176 print-game-text) - (let* ((a0-14 (lookup-text! *common-text* (-> s2-0 s3-0 text) #f)) - (a1-24 arg1) - (a2-12 #t) - (a3-6 44) - (t0-6 (bucket-id progress)) - (f26-0 (sv-176 a0-14 a1-24 a2-12 a3-6 (the-as bucket-id t0-6))) - ) + (let ((f26-0 (print-game-text (lookup-text! *common-text* (-> s2-0 s3-0 text) #f) arg1 #t 44 (bucket-id progress)))) (set! (-> arg1 flags) (font-flags kerning large)) (cond ((and (< s3-0 s4-0) (!= (-> arg0 sliding-height) 0.0)) - (set! sv-192 arg1) - (set! (-> sv-192 color) (progress-selected 0)) + (set-color! arg1 (progress-selected 0)) (draw-highlight (+ (the int f26-0) -2 s0-1) (the int f26-0) f30-0) ) ((or (and (= s3-0 s4-0) (= (fabs (-> arg0 sliding-height)) 0.0)) (zero? s3-0)) - (set! sv-208 arg1) - (set! (-> sv-208 color) (progress-selected 0)) + (set-color! arg1 (progress-selected 0)) (draw-highlight (+ s0-1 -2) (the int f26-0) f30-0) ) (else - (let ((a0-21 arg1)) - (set! (-> a0-21 color) (font-color progress)) - ) + (set-color! arg1 (font-color progress)) ) ) ) - (set! sv-224 print-game-text) - (let ((a0-23 (lookup-text! *common-text* (-> s2-0 s3-0 text) #f)) - (a1-28 arg1) - (a2-16 #f) - (a3-7 44) - (t0-7 (bucket-id progress)) - ) - (+! s0-1 (the int (sv-224 a0-23 a1-28 a2-16 a3-7 (the-as bucket-id t0-7)))) - ) + (+! s0-1 (the int (print-game-text (lookup-text! *common-text* (-> s2-0 s3-0 text) #f) arg1 #f 44 (bucket-id progress)))) (set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1)))) (+! s3-0 1) ) @@ -4361,6 +4167,9 @@ (draw-busy-loading arg1) ) (else + (#when PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (*! sv-32 (-> *pc-settings* aspect-ratio-reciprocal)))) (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) (set! (-> obj sprites 0 flags) (the-as uint 4)) (set! (-> obj sprites 0 scale-x) 0.64) @@ -4373,11 +4182,18 @@ ) (set! (-> obj sprites 0 pos z) #xffffff) (set! (-> obj sprites 0 pos w) 0) - (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) 100 128) + (#cond + (PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (set-hud-piece-position! (-> obj sprites 0) (adjust-game-x 100.0) 128) + (set-hud-piece-position! (-> obj sprites 0) 100 128))) + (#t + (set-hud-piece-position! (-> obj sprites 0) 100 128)) + ) (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (-> obj sprites)) s3-0 (-> *level* default-level)) + (draw (-> obj sprites 0) s3-0 (-> *level* default-level)) ) (set! (-> arg1 alpha) sv-16) (let ((a0-21 arg1)) @@ -4397,14 +4213,10 @@ (set! (-> v1-56 scale) 1.0) ) (set! (-> arg1 origin y) 82.0) - (let ((t9-5 draw-decoration-secrets) - (a0-24 obj) - (a1-4 arg1) - (a2-4 sv-16) - (a3-2 339) - ) - (t9-5 a0-24 a1-4 a2-4 (the-as text-id a3-2)) - ) + (#when PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))) + (draw-decoration-secrets obj arg1 sv-16 (text-id progress-root-secrets)) (let ((v1-58 arg1)) (set! (-> v1-58 scale) 0.45) ) @@ -4433,6 +4245,9 @@ (set! (-> a0-34 flags) (font-flags kerning large)) ) (set! (-> arg1 origin x) 100.0) + (#when PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))) (let ((s4-1 print-game-text)) (format (clear *temp-string*) @@ -4443,6 +4258,9 @@ (s4-1 *temp-string* arg1 #f 44 (bucket-id progress)) ) (set! (-> arg1 origin x) 100.0) + (#when PC_PORT + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))) (begin-scissor-secret sv-120 sv-48) (case (get-aspect-ratio) (('aspect16x9) @@ -4525,15 +4343,15 @@ ) (deftype print-highscore-obj (basic) - ((self texture-page :offset-assert 4) - (index int32 :offset-assert 8) - (previous texture-page :offset-assert 12) - (place int32 :offset-assert 16) - (score float :offset-assert 20) - (game-score basic :offset-assert 24) - (context font-context :offset-assert 28) - (local-scale float :offset-assert 32) - (interp float :offset-assert 36) + ((self menu-highscores-option :offset-assert 4) + (index int32 :offset-assert 8) + (previous symbol :offset-assert 12) ; guess + (place int32 :offset-assert 16) + (score float :offset-assert 20) + (game-score symbol :offset-assert 24) + (context font-context :offset-assert 28) + (local-scale float :offset-assert 32) + (interp float :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 @@ -4553,7 +4371,7 @@ ) ) -(defun draw-highscore-cup ((arg0 texture-page) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float)) +(defun draw-highscore-cup ((arg0 menu-highscores-option) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float)) "First int is an enum" (let ((a0-1 (the-as uint #xc9300300))) (case arg1 @@ -4568,23 +4386,23 @@ ) ) (when (nonzero? arg1) - (set! (-> arg0 pad 11) (the-as uint 4)) - (let ((v1-10 (&-> arg0 pad 7))) - (set! (-> v1-10 0) (the-as uint 128)) - (set! (-> v1-10 1) (the-as uint 128)) - (set! (-> v1-10 2) (the-as uint 128)) - (set! (-> v1-10 3) (the-as uint (the int (* 128.0 arg5)))) + (set! (-> arg0 sprites 0 flags) (the-as uint 4)) + (let ((v1-10 (-> arg0 sprites 0 color2))) + (set! (-> v1-10 0) 128) + (set! (-> v1-10 1) 128) + (set! (-> v1-10 2) 128) + (set! (-> v1-10 3) (the int (* 128.0 arg5))) ) - (set! (-> arg0 pad 5) (the-as uint #xffffff)) - (set! (-> arg0 pad 6) (the-as uint 0)) - (set! (-> arg0 data 0) (lookup-texture-by-id (the-as texture-id a0-1))) - (set! (-> arg0 pad 12) (the-as uint arg4)) - (set! (-> arg0 pad 13) (the-as uint arg4)) - (set-hud-piece-position! (the-as hud-sprite (&-> arg0 pad 3)) arg2 arg3) + (set! (-> arg0 sprites 0 pos z) #xffffff) + (set! (-> arg0 sprites 0 pos w) 0) + (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id a0-1))) + (set! (-> arg0 sprites 0 scale-x) arg4) + (set! (-> arg0 sprites 0 scale-y) arg4) + (set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3) (with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (&-> arg0 pad 3)) s4-1 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (the-as hud-sprite (-> arg0 sprites)) s4-1 (-> *level* default-level)) ) ) ) @@ -4834,10 +4652,7 @@ ) (cond ((-> sv-40 game-score) - (let ((gp-17 print-game-text)) - (format (clear *temp-string*) "~D" (the int (-> sv-40 score))) - (gp-17 *temp-string* sv-16 #f 44 (bucket-id progress)) - ) + (print-game-text (string-format "~D" (the int (-> sv-40 score))) sv-16 #f 44 (bucket-id progress)) ) (else (print-game-text (str-print-time (-> sv-40 score)) sv-16 #f 44 (bucket-id progress)) @@ -5408,8 +5223,8 @@ (set! (-> sv-144 sprites 0 pos z) #xfffff0) (set! (-> sv-144 sprites 0 pos w) 0) (if (= (-> *setting-control* user-default language) (language-enum spanish)) - (draw-decoration sv-144 sv-140 sv-96 310 #t 0.8) - (draw-decoration sv-144 sv-140 sv-96 310 #t 0.95) + (draw-decoration sv-144 sv-140 sv-96 (text-id progress-root-highscores) #t 0.8) + (draw-decoration sv-144 sv-140 sv-96 (text-id progress-root-highscores) #t 0.95) ) (let ((v1-39 sv-140)) (set! (-> v1-39 scale) 0.6) @@ -5494,10 +5309,10 @@ (let ((gp-5 (get-game-score-ref *game-info* (get-highscore-score (-> sv-144 page-index))))) (set! (-> sv-116 index) (-> sv-144 page-index)) (set! (-> sv-116 previous) #f) - (set! (-> sv-116 self) (the-as texture-page sv-144)) + (set! (-> sv-116 self) sv-144) (case (get-highscore-type (-> sv-144 page-index)) (('game) - (set! (-> sv-116 game-score) (the-as basic #t)) + (set! (-> sv-116 game-score) #t) ) (('race) (set! (-> sv-116 game-score) #f) @@ -5608,11 +5423,11 @@ (when (< 1 (get-num-highscores)) (let ((gp-11 (get-game-score-ref *game-info* (get-highscore-score (-> sv-144 prev-page-index))))) (set! (-> sv-116 index) (-> sv-144 prev-page-index)) - (set! (-> sv-116 previous) (the-as texture-page #t)) - (set! (-> sv-116 self) (the-as texture-page sv-144)) + (set! (-> sv-116 previous) #t) + (set! (-> sv-116 self) sv-144) (case (get-highscore-type (-> sv-144 prev-page-index)) (('game) - (set! (-> sv-116 game-score) (the-as basic #t)) + (set! (-> sv-116 game-score) #t) ) (('race) (set! (-> sv-116 game-score) #f) @@ -6105,8 +5920,8 @@ (set! (-> a1-1 flags) (font-flags kerning middle large)) ) (if (= (-> *setting-control* user-default language) (language-enum spanish)) - (draw-decoration obj arg1 f0-1 283 #f 0.85) - (draw-decoration obj arg1 f0-1 283 #f 0.95) + (draw-decoration obj arg1 f0-1 (text-id progress-root-game-options) #f 0.85) + (draw-decoration obj arg1 f0-1 (text-id progress-root-game-options) #f 0.95) ) ) 0 @@ -6212,7 +6027,7 @@ ) (print-menu-text a0-12 (-> obj scale) arg1 arg0) ) - (draw-decoration obj arg1 f30-0 284 #f 0.95) + (draw-decoration obj arg1 f30-0 (text-id progress-root-graphic-options) #f 0.95) ) 0 (none) @@ -6552,13 +6367,13 @@ (print-game-text a0-12 arg1 #f 44 (bucket-id progress)) (cond ((= (-> *setting-control* user-default language) (language-enum french)) - (draw-decoration obj arg1 f30-0 371 #f 0.8) + (draw-decoration obj arg1 f30-0 (text-id progress-restart-quit) #f 0.8) ) ((= (-> *setting-control* user-default language) (language-enum german)) - (draw-decoration obj arg1 f30-0 371 #f 0.7) + (draw-decoration obj arg1 f30-0 (text-id progress-restart-quit) #f 0.7) ) (else - (draw-decoration obj arg1 f30-0 371 #f 0.95) + (draw-decoration obj arg1 f30-0 (text-id progress-restart-quit) #f 0.95) ) ) ) @@ -6925,7 +6740,7 @@ ) ) (if (zero? gp-0) - (draw-sound-options-decoration obj s5-0 f30-0 (the-as symbol 285) (the-as text-id #f)) + (draw-sound-options-decoration obj s5-0 f30-0 (text-id progress-root-sound-options) #f) ) ) ) diff --git a/goal_src/jak2/engine/ui/progress/progress-h.gc b/goal_src/jak2/engine/ui/progress/progress-h.gc index 59ee89efbd..c681f1e9b0 100644 --- a/goal_src/jak2/engine/ui/progress/progress-h.gc +++ b/goal_src/jak2/engine/ui/progress/progress-h.gc @@ -60,12 +60,12 @@ (go-away () _type_ :state 22) (gone () _type_ :state 23) (init-defaults (_type_) connection 24) - (progress-method-25 (_type_) none 25) - (is-gone (_type_) object 26) + (respond-to-cpad (_type_) none 25) + (gone? (_type_) object 26) (can-go-back? (_type_) symbol 27) - (progress-method-28 (_type_ symbol) symbol 28) - (progress-method-29 (_type_) int 29) - (progress-method-30 (_type_) int 30) + (get-state-check-card (_type_ symbol) symbol 28) + (push-state (_type_) int 29) + (pop-state (_type_) int 30) (set-next-state (_type_ symbol int) int 31) (set-menu-options (_type_ symbol) int 32) ) @@ -83,7 +83,7 @@ :size-assert #x30 :flag-assert #xc00000030 (:methods - (respond-progress (_type_ progress object) int :behavior progress 9) + (respond-progress (_type_ progress symbol) int :behavior progress 9) (draw-option (_type_ progress font-context int symbol) none 10) (menu-option-method-11 () none 11) ) diff --git a/goal_src/jak2/engine/ui/progress/progress.gc b/goal_src/jak2/engine/ui/progress/progress.gc index b620c15045..bb54c204b6 100644 --- a/goal_src/jak2/engine/ui/progress/progress.gc +++ b/goal_src/jak2/engine/ui/progress/progress.gc @@ -5,8 +5,6 @@ ;; name in dgo: progress ;; dgos: ENGINE, GAME -(set! *progress-process* #f) - ;; DECOMP BEGINS (deftype progress-global-state (basic) @@ -487,7 +485,7 @@ (none) ) -(defmethod is-gone progress ((obj progress)) +(defmethod gone? progress ((obj progress)) (and *progress-process* (-> *progress-process* 0 next-state) (= (-> *progress-process* 0 next-state name) 'gone) @@ -577,7 +575,7 @@ (none) ) -(defmethod progress-method-28 progress ((obj progress) (arg0 symbol)) +(defmethod get-state-check-card progress ((obj progress) (arg0 symbol)) (let ((v1-0 *progress-save-info*) (v0-0 arg0) ) @@ -674,7 +672,7 @@ ) ) -(defmethod progress-method-29 progress ((obj progress)) +(defmethod push-state progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond ((< v1-0 5) @@ -690,7 +688,7 @@ 0 ) -(defmethod progress-method-30 progress ((obj progress)) +(defmethod pop-state progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond ((> v1-0 0) @@ -723,7 +721,7 @@ (set! (-> obj next) arg0) (case (-> obj next) (('select-load 'select-save 'select-save-title 'select-save-title-hero) - (set! (-> obj next) (progress-method-28 obj (-> obj next))) + (set! (-> obj next) (get-state-check-card obj (-> obj next))) ) ) (case (-> obj next) @@ -961,12 +959,12 @@ ) (when (= (-> obj current-options) #f) (format #t "Didn't find new menu settings!!~%") - (progress-method-30 obj) + (pop-state obj) ) 0 ) -(defmethod progress-method-25 progress ((obj progress)) +(defmethod respond-to-cpad progress ((obj progress)) (mc-get-slot-info 0 *progress-save-info*) (when (-> obj current-options) (let ((s5-0 (-> obj current-options options))) @@ -1048,7 +1046,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 obj) + (pop-state obj) ) ) ) @@ -1119,7 +1117,7 @@ ) ) (if (= (-> self ring-angle) (-> self ring-want-angle)) - (progress-method-25 self) + (respond-to-cpad self) ) (let ((f30-0 (* 0.005 (-> self clock time-adjust-ratio)))) (cond @@ -1315,12 +1313,8 @@ ) (set! (-> sv-144 origin x) 79.0) (set! (-> sv-144 origin y) (the float sv-148)) - (let ((v1-29 sv-144)) - (set! (-> v1-29 width) (the float 355)) - ) - (let ((v1-30 sv-144)) - (set! (-> v1-30 height) (the float 30)) - ) + (set-width! sv-144 355) + (set-height! sv-144 30) (set! (-> sv-144 flags) (if (= (-> *setting-control* user-default language) (language-enum japanese)) (font-flags middle left large) (font-flags kerning middle left large) @@ -1333,6 +1327,13 @@ ) ) ) + ;; added for proper aspect ratio-ing + (#when PC_PORT + (when (not (-> *pc-settings* use-vis?)) + (set! (-> sv-144 origin x) (the float (the int (adjust-game-x (-> sv-144 origin x))))) + (set! (-> sv-144 width) (the float (the int (* (-> sv-144 width) (-> *pc-settings* aspect-ratio-reciprocal))))) + ) + ) (draw-option (-> gp-0 s4-1) self @@ -1522,7 +1523,7 @@ ) ) (else - (progress-method-30 self) + (pop-state self) ) ) ) @@ -1719,12 +1720,12 @@ ) ) -(defmethod respond-progress menu-option ((obj menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-option ((obj menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." 0 ) -(defmethod respond-progress menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* on-off-choice)) (gp-0 #f) @@ -1751,7 +1752,7 @@ ((and (-> v1-1 0) (= (-> obj value-to-modify) (&-> *setting-control* user-default use-progressive-scan))) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'progressive-mode-warning 0) ) (else @@ -1774,7 +1775,7 @@ 0 ) -(defmethod respond-progress menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -1815,7 +1816,7 @@ 0 ) -(defmethod respond-progress menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) (let ((gp-0 (-> obj value-to-modify)) @@ -1897,7 +1898,7 @@ 0 ) -(defmethod respond-progress menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) (let ((a0-1 (-> *setting-control* user-default stereo-mode)) @@ -1935,7 +1936,7 @@ 0 ) -(defmethod respond-progress menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (cond ((cpad-pressed? 0 start) @@ -1975,20 +1976,20 @@ ) ) (sound-play "window-expand") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 (-> obj next-state) 0) ) ((= (-> obj next-state) 'back) - (progress-method-30 arg0) + (pop-state arg0) ) ((= (-> obj next-state) 'restart) (sound-volume-off) (restart-mission) - (progress-method-30 arg0) + (pop-state arg0) ) (else (sound-play "window-expand") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 (-> obj next-state) 0) ) ) @@ -2030,7 +2031,7 @@ 0 ) -(defmethod respond-progress menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (and (-> *progress-state* secrets-unlocked) (not (memcard-unlocked-secrets? #f)) @@ -2046,7 +2047,7 @@ (set-next-state arg0 'secrets-insufficient-space 0) ) (when (= (-> obj name) (text-id progress-continue-without-saving)) - (let ((a1-3 (progress-method-28 arg0 (-> arg0 current)))) + (let ((a1-3 (get-state-check-card arg0 (-> arg0 current)))) (set-next-state arg0 a1-3 0) ) ) @@ -2078,11 +2079,11 @@ (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) ((= (-> obj next-state) 'back) - (progress-method-30 arg0) + (pop-state arg0) ) (else (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 (-> obj next-state) 0) ) ) @@ -2090,7 +2091,7 @@ 0 ) -(defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (memcard-unlocked-secrets? #t))) (logclear! (-> *game-info* purchase-secrets) (game-secrets hero-mode)) @@ -2156,7 +2157,7 @@ ) (set! (-> *progress-state* scene-player-act) 1) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-scene 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-sceneplayer-2)) @@ -2164,7 +2165,7 @@ ) (set! (-> *progress-state* scene-player-act) 2) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-scene 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-sceneplayer-3)) @@ -2172,23 +2173,23 @@ ) (set! (-> *progress-state* scene-player-act) 3) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-scene 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-hero-mode)) (logtest? s4-0 (game-secrets hero-mode))) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-save-title-hero 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-levelselect)) (logtest? s4-0 (game-secrets level-select)) ) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-start 0) ) ((= (-> obj next-state) 'back) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2227,10 +2228,10 @@ 0 ) -(defmethod respond-progress menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (memcard-unlocked-secrets? #t) - (let ((a1-2 (progress-method-28 arg0 (-> arg0 current)))) + (let ((a1-2 (get-state-check-card arg0 (-> arg0 current)))) (set-next-state arg0 a1-2 0) ) (set! (-> arg0 selected-option) #f) @@ -2272,10 +2273,10 @@ 0 ) -(defmethod respond-progress menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) - (a1-2 (progress-method-28 arg0 'select-save)) + (a1-2 (get-state-check-card arg0 'select-save)) (gp-0 #f) ) (if (!= a1-2 'select-save) @@ -2314,12 +2315,12 @@ 0 ) -(defmethod respond-progress menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) (gp-0 #f) ) - (let ((a1-2 (progress-method-28 arg0 'select-save))) + (let ((a1-2 (get-state-check-card arg0 'select-save))) (if (!= a1-2 'select-save) (set-next-state arg0 a1-2 0) ) @@ -2347,7 +2348,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2359,10 +2360,10 @@ 0 ) -(defmethod respond-progress menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s5-0 (&-> *progress-state* yes-no-choice)) - (s3-0 (progress-method-28 arg0 'select-save)) + (s3-0 (get-state-check-card arg0 'select-save)) ) (cond ((or (= (-> *progress-state* starting-state) 'insufficient-space) @@ -2388,13 +2389,13 @@ (cond ((-> s5-0 0) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ((and (not (-> s5-0 0)) - (!= (progress-method-28 arg0 'select-save) 'insufficient-space) - (!= (progress-method-28 arg0 'select-save) 'no-memory-card) + (!= (get-state-check-card arg0 'select-save) 'insufficient-space) + (!= (get-state-check-card arg0 'select-save) 'no-memory-card) ) - (progress-method-30 arg0) + (pop-state arg0) ) (else (sound-play "generic-beep") @@ -2421,7 +2422,7 @@ (set! a1-9 'select-save-title) ) ) - (let ((a1-10 (progress-method-28 arg0 a1-9))) + (let ((a1-10 (get-state-check-card arg0 a1-9))) (set-next-state arg0 a1-10 0) ) ) @@ -2443,7 +2444,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2454,7 +2455,7 @@ 0 ) -(defmethod respond-progress menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (&-> *progress-state* yes-no-choice) (cond @@ -2472,7 +2473,7 @@ 0 ) -(defmethod respond-progress menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -2498,7 +2499,7 @@ ) (else (set! (-> *progress-state* video-mode-choice) 'pal) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2510,7 +2511,7 @@ 0 ) -(defmethod respond-progress menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (s5-0 #f) @@ -2538,7 +2539,7 @@ ) ) (set! (-> *progress-state* video-mode-timeout) 0) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -2551,12 +2552,12 @@ (set! (-> *progress-state* video-mode-timeout) 0) (set! (-> *progress-state* video-mode-choice) 'pal) (set! (-> *setting-control* user-default video-mode) (-> *progress-state* video-mode-choice)) - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -2589,7 +2590,7 @@ (set! (-> *progress-state* on-off-choice) #f) (set! (-> *progress-state* graphic-options-progressive-scan) #f) (set-progressive-scan #f) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2601,7 +2602,7 @@ 0 ) -(defmethod respond-progress menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (s5-0 #f) @@ -2630,7 +2631,7 @@ ) ) (set! (-> *progress-state* progressive-mode-timeout) 0) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -2644,97 +2645,97 @@ (set! (-> *setting-control* user-default use-progressive-scan) #f) (set! (-> *progress-state* graphic-options-progressive-scan) #f) (set-progressive-scan #f) - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." *progress-save-info* (cond - ((= (progress-method-28 arg0 'select-load) 'select-load) + ((= (get-state-check-card arg0 'select-load) 'select-load) (set-next-state arg0 'select-load 0) ) ((cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) 0 ) -(defmethod respond-progress menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (when (is-cd-in?) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) 0 ) -(defmethod respond-progress menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) -(defmethod respond-progress menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -2766,7 +2767,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2778,12 +2779,12 @@ 0 ) -(defmethod respond-progress menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) (gp-0 #f) ) - (let ((a1-2 (progress-method-28 arg0 (-> arg0 current)))) + (let ((a1-2 (get-state-check-card arg0 (-> arg0 current)))) (set-next-state arg0 a1-2 0) ) (cond @@ -2810,7 +2811,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2823,7 +2824,7 @@ ) ;; WARN: disable def twice: 110. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. -(defmethod respond-progress menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease (-> arg0 sliding-height) @@ -2918,7 +2919,7 @@ 0 ) -(defmethod respond-progress menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease (-> arg0 sliding-height) @@ -2993,7 +2994,7 @@ 0 ) -(defmethod respond-progress menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (bigmap-method-12 *bigmap*) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) @@ -3001,7 +3002,7 @@ 0 ) -(defmethod respond-progress menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease (-> arg0 sliding-height) @@ -3040,7 +3041,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -3050,7 +3051,7 @@ 0 ) -(defmethod respond-progress menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding) (seek-ease (-> arg0 sliding) @@ -3108,7 +3109,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -3119,7 +3120,7 @@ 0 ) -(defmethod respond-progress menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let* ((s5-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) (s3-0 (if (not s5-1) @@ -3221,7 +3222,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-2 @@ -3237,7 +3238,7 @@ 0 ) -(defmethod respond-progress menu-game-option ((obj menu-game-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-game-option ((obj menu-game-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (-> *progress-state* game-options-vibrations) (-> *progress-state* game-options-subtitles) @@ -3287,7 +3288,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -3458,7 +3459,7 @@ 0 ) -(defmethod respond-progress menu-graphic-option ((obj menu-graphic-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-graphic-option ((obj menu-graphic-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (-> *progress-state* graphic-options-aspect-ratio) (-> *progress-state* graphic-options-progressive-scan) @@ -3525,7 +3526,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -3610,7 +3611,7 @@ ) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'progressive-mode-warning 0) ) (when (and (= (-> *progress-state* graphic-options-item-selected) 3) @@ -3622,7 +3623,7 @@ (set! (-> *setting-control* user-default video-mode) a0-173) ) (('ntsc) - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'video-mode-warning 0) ) ) @@ -3676,7 +3677,7 @@ 0 ) -(defmethod respond-progress menu-qr-option ((obj menu-qr-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-qr-option ((obj menu-qr-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (-> *progress-state* qr-options-restart) (-> *progress-state* qr-options-quit) @@ -3740,7 +3741,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) diff --git a/goal_src/jak2/levels/common/battle.gc b/goal_src/jak2/levels/common/battle.gc index 20b6f05c30..acc6f53657 100644 --- a/goal_src/jak2/levels/common/battle.gc +++ b/goal_src/jak2/levels/common/battle.gc @@ -840,6 +840,11 @@ ) (dotimes (s5-1 (-> obj spawners length)) (let ((s4-1 (-> obj spawners data s5-1))) + (#when PC_PORT + ;; added. a battle may have enemies from an unloaded level in its ally list (e.g. atoll battle has atollext enemies). + (if (not (valid? (-> s4-1 entity) entity-actor "battle spawners" #f *stdcon*)) + (deactivate obj)) + ) (let ((a0-6 (-> s4-1 intro-path))) (if a0-6 (debug-draw a0-6) @@ -1416,6 +1421,12 @@ (let ((v1-0 (-> obj allies)) (gp-0 (-> obj allies length)) ) + (#when PC_PORT + ;; added. a battle may have enemies from an unloaded level in its ally list (e.g. atoll battle has atollext enemies). + (dotimes (i gp-0) + (if (not (valid? (-> v1-0 data i entity) entity-actor "battle allies" #f *stdcon*)) + (deactivate self))) + ) (when (> gp-0 0) (let* ((a1-4 (mod (the-as int (-> self clock integral-frame-counter)) gp-0)) (a3-0 (-> v1-0 data a1-4)) diff --git a/goal_src/jak2/levels/common/race/race-info.gc b/goal_src/jak2/levels/common/race/race-info.gc index 51d71623e2..51dcd71e28 100644 --- a/goal_src/jak2/levels/common/race/race-info.gc +++ b/goal_src/jak2/levels/common/race/race-info.gc @@ -61,7 +61,7 @@ ) :level 'stadiumb :borrow-level 'lracebf - :borrow '((ctywide 0 lracebf special) (stadium 0 lracelit display)) + :borrow '((stadiumb 0 lracebf special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-2" :countdown-scene #f @@ -121,7 +121,7 @@ ) :level 'stadiumc :borrow-level 'lracecf - :borrow '((ctywide 0 lracecf special) (stadium 0 lracelit display)) + :borrow '((stadiumc 0 lracecf special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-3" :countdown-scene #f @@ -187,7 +187,7 @@ ) :level 'stadiumd :borrow-level 'lracedf - :borrow '((ctywide 0 lracedf special) (stadium 0 lracelit display)) + :borrow '((stadiumd 0 lracedf special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-1" :countdown-scene "city-class-1-race-intro-b" @@ -277,7 +277,7 @@ ) :level 'stadiumb :borrow-level 'lracebf - :borrow '((ctywide 0 lracebf special) (stadium 0 lracelit display)) + :borrow '((stadiumb 0 lracebf special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-2" :countdown-scene #f @@ -337,7 +337,7 @@ ) :level 'stadiumc :borrow-level 'lracecf - :borrow '((ctywide 0 lracecf special) (stadium 0 lracelit display)) + :borrow '((stadiumc 0 lracecf special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-3" :countdown-scene #f @@ -403,7 +403,7 @@ ) :level 'stadiumd :borrow-level 'lracedf - :borrow '((ctywide 0 lracedf special) (stadium 0 lracelit display)) + :borrow '((stadiumd 0 lracedf special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-1" :countdown-scene #f @@ -521,7 +521,7 @@ ) :level 'stadiumb :borrow-level 'lracebb - :borrow '((ctywide 0 lracebb special) (stadium 0 lracelit display)) + :borrow '((stadiumb 0 lracebb special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-2" :countdown-scene #f @@ -580,7 +580,7 @@ ) :level 'stadiumc :borrow-level 'lracecb - :borrow '((ctywide 0 lracecb special) (stadium 0 lracelit display)) + :borrow '((stadiumc 0 lracecb special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-3" :countdown-scene #f @@ -643,7 +643,7 @@ ) :level 'stadiumd :borrow-level 'lracedb - :borrow '((ctywide 0 lracedb special) (stadium 0 lracelit display)) + :borrow '((stadiumd 0 lracedb special) (stadium 0 lracelit display)) ;; changed from ctywide :manager-handle-init-hack #f :hatch-actor-name "stdmb-race-hatch-1" :countdown-scene #f diff --git a/goal_src/jak2/levels/stadium/stadium-scenes.gc b/goal_src/jak2/levels/stadium/stadium-scenes.gc index dba52f292b..2a8d4a350e 100644 --- a/goal_src/jak2/levels/stadium/stadium-scenes.gc +++ b/goal_src/jak2/levels/stadium/stadium-scenes.gc @@ -2206,7 +2206,7 @@ ) :load-point-obj "stadiumd-start" :end-point-obj #f - :borrow '((ctywide 1 lwidesta special) (ctywide 0 lracedf special) (stadium 0 lracelit display)) + :borrow '((ctywide 1 lwidesta special) (stadiumd 0 lracedf special) (stadium 0 lracelit display)) ;; changed from ctywide :sfx-volume -1.0 :ambient-volume -1.0 :music-volume -1.0 @@ -2663,7 +2663,7 @@ ) :load-point-obj "stadiumd-start" :end-point-obj "stadium-class1-res-end-movie" - :borrow '((ctywide 1 lwidesta special) (ctywide 0 lracedf special) (stadium 0 lracelit display)) + :borrow '((ctywide 1 lwidesta special) (stadiumd 0 lracedf special) (stadium 0 lracelit display)) ;; changed from ctywide :sfx-volume -1.0 :ambient-volume -1.0 :music-volume -1.0 diff --git a/goal_src/jak2/pc/pckernel.gc b/goal_src/jak2/pc/pckernel.gc index c7a5727867..9477c8559e 100644 --- a/goal_src/jak2/pc/pckernel.gc +++ b/goal_src/jak2/pc/pckernel.gc @@ -4,7 +4,7 @@ #| This file runs the game-specific version of the pckernel. - See pckernel-common.gc for the bulk of the pckernel. + See pckernel-common.gc for the bulk of the pckernel. |# @@ -125,7 +125,7 @@ (defmethod handle-input-settings pc-settings-jak2 ((obj pc-settings-jak2) (file file-stream)) "handle the text parsing input for the 'settings' group" - ((method-of-type pc-settings handle-input-settings) obj file) + ((method-of-type pc-settings handle-input-settings) obj file) (case-str *pc-temp-string* (("jetboard-trick-text?") (set! (-> obj jetboard-trick-text?) (file-stream-read-symbol file))) (("fast-airlock?") (set! (-> obj fast-airlock?) (file-stream-read-symbol file))) @@ -138,7 +138,7 @@ (defmethod handle-output-settings pc-settings-jak2 ((obj pc-settings-jak2) (file file-stream)) "handle the text writing output for the 'settings' group" - ((method-of-type pc-settings handle-output-settings) obj file) + ((method-of-type pc-settings handle-output-settings) obj file) (format file " (jetboard-trick-text? ~A)~%" (-> obj jetboard-trick-text?)) (format file " (fast-airlock? ~A)~%" (-> obj fast-airlock?)) (format file " (fast-elevator? ~A)~%" (-> obj fast-elevator?)) @@ -167,6 +167,18 @@ (font-color flat-yellow) (font-flags right shadow kerning)))) + + +(defun print-level-types ((lev level)) + "print the level-type linked list for a level" + (format #t "print-level-types for ~A~%" (-> lev nickname)) + (let ((cur-type (-> lev level-type))) + (while (and cur-type (nonzero? cur-type) (= type (-> cur-type type))) + (format #t "~A~%" cur-type) + (set! cur-type (the type (-> cur-type method-table 8)))) + (format #t "~%")) + ) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;; process pools ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -175,3 +187,19 @@ ;; the actor pool for PC processes! it has space for 4 processes, with 16K of space. (define *pc-dead-pool* (new 'global 'dead-pool 4 (* 16 1024) "*pc-dead-pool*")) + + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;;; progress adjustments +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +(defconstant CENTER_X (/ 512 2)) + +(defun adjust-game-x-centered ((origin int) (x float)) + "given an x position ranging from [0, 512) adjust for aspect ratio towards the origin point specified + such that it does not get stretched away with the framebuffer" + (+ origin (* (- x origin) (-> *pc-settings* aspect-ratio-reciprocal)))) + +(defmacro adjust-game-x (x) + `(adjust-game-x-centered CENTER_X ,x)) + diff --git a/goal_src/jak2/pc/progress/progress-draw-pc.gc b/goal_src/jak2/pc/progress/progress-draw-pc.gc new file mode 100644 index 0000000000..71bb4fb8f3 --- /dev/null +++ b/goal_src/jak2/pc/progress/progress-draw-pc.gc @@ -0,0 +1,1695 @@ +;;-*-Lisp-*- +(in-package goal) + +#| + + Additional PC port specific file for overriding/expanding the progress menu + This gives us more freedom to write code how we want. + +|# + + + +(defun draw-previous-next ((arg0 menu-highscores-option) (arg1 font-context) (arg2 symbol)) + (local-vars (sv-16 string) (sv-32 int)) + (let ((s3-0 370)) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin x) 73.0) + (set! (-> arg1 origin y) 308.0) + (set! (-> arg1 width) 359.0) + (set! (-> arg1 height) 185.0) + ) + (('aspect16x9) + (set! (-> arg1 origin x) 82.0) + (set! (-> arg1 origin y) 328.0) + (set! (-> arg1 width) 355.0) + (set! (-> arg1 height) 185.0) + (set! s3-0 350) + ) + ) + (when (not (-> *pc-settings* use-vis?)) + (set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + ) + + (set-flags! arg1 (font-flags kerning large)) + (set-color! arg1 (progress-selected 200)) + (set-scale! arg1 0.6) + (when (or (> (-> arg0 page-index) 0) arg2) + (print-game-text (string-format "~C~S" 163 (lookup-text! *common-text* (text-id progress-next) #f)) arg1 #f 44 (bucket-id progress)) + ) + (set! arg2 (or (!= (-> arg0 page-index) (+ (-> arg0 num-pages) -1)) arg2)) + (when arg2 + (set-flags! arg1 (font-flags kerning right large)) + (+! (-> arg1 origin x) (the float s3-0)) + (print-game-text (string-format "~S~C" (lookup-text! *common-text* (text-id progress-next) #f) 161) arg1 #f 44 (bucket-id progress)) + ) + ) + 0 + (none) + ) + + +(defun get-highscore-icon-xoffset ((arg0 int)) + (cond + ((not (-> *pc-settings* use-vis?)) + (adjust-game-x 435.0) + ) + ((= (get-aspect-ratio) 'aspect4x3) + 435) + (else + 410) + ) + ) + +(deftype highscore-cup-draw-params (structure) + ((cup-scale float) + (cup-y int16) + (cup-x int16) + (font-scale float) + ) + ) + +(define *highscore-cup-draw-params* (new 'static 'inline-array highscore-cup-draw-params 8 + (new 'static 'highscore-cup-draw-params :cup-scale 0.25 :cup-y 174 :cup-x 112 :font-scale -1.0) + (new 'static 'highscore-cup-draw-params :cup-scale 0.22 :cup-y 197 :cup-x 111 :font-scale 0.5) + (new 'static 'highscore-cup-draw-params :cup-scale 0.20 :cup-y 217 :cup-x 110 :font-scale 0.4) + (new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 232 :cup-x 109 :font-scale 0.3) + (new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 244 :cup-x 109 :font-scale -1.0) + (new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 256 :cup-x 109 :font-scale -1.0) + (new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 268 :cup-x 109 :font-scale -1.0) + (new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 280 :cup-x 109 :font-scale -1.0) + )) + +(defun print-highscore ((arg0 print-highscore-obj)) + (local-vars (sv-16 font-context) (sv-20 float) (sv-24 int) (sv-32 int)) + (set! sv-16 (-> arg0 context)) + (set! sv-20 (-> arg0 interp)) + (set! sv-24 50) + (set! sv-32 (if (= (get-aspect-ratio) 'aspect4x3) + 320 + 300 + ) + ) + (when (not (-> *pc-settings* use-vis?)) + (set! sv-32 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-32))) + (set! sv-24 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-24))) + ) + (set-flags! sv-16 (font-flags kerning large)) + (+! (-> sv-16 origin x) (the float sv-24)) + + (let* ((draw-params (-> *highscore-cup-draw-params* (-> arg0 place))) + (cup-x (-> draw-params cup-x))) + ;; correct cup x + (when (not (-> *pc-settings* use-vis?)) + (set! cup-x (adjust-game-x (the float cup-x)))) + ;; set font scale + (if (> (-> draw-params font-scale) 0) + (set-scale! sv-16 (-> draw-params font-scale))) + ;; move font down + (when (< 0 (-> arg0 place)) + (+! (-> sv-16 origin y) (the float (- (-> draw-params cup-y) (-> *highscore-cup-draw-params* (1- (-> arg0 place)) cup-y))))) + ;; print highscore text + (print-game-text (string-format "~S" (lookup-text! *common-text* (-> (new 'static 'boxed-array :type text-id (text-id progress-highscores-1st) + (text-id progress-highscores-2nd) + (text-id progress-highscores-3rd) + (text-id progress-highscores-4th) + (text-id progress-highscores-5th) + (text-id progress-highscores-6th) + (text-id progress-highscores-7th) + (text-id progress-highscores-8th)) + (-> arg0 place)) #f)) sv-16 #f 44 (bucket-id progress)) + ;; draw cup icon if we're not the previous page + (if (not (-> arg0 previous)) + (draw-highscore-cup (-> arg0 self) (eval-highscore arg0) (+ (the int sv-20) cup-x) (-> draw-params cup-y) (-> draw-params cup-scale) (-> arg0 local-scale))) + ) + + (+! (-> sv-16 origin x) (the float sv-32)) + (set-flags! sv-16 (font-flags kerning right large)) + (cond + ((-> arg0 game-score) + (print-game-text (string-format "~D" (the int (-> arg0 score))) sv-16 #f 44 (bucket-id progress)) + ) + (else + (print-game-text (str-print-time (-> arg0 score)) sv-16 #f 44 (bucket-id progress)) + ) + ) + + (set-flags! sv-16 (font-flags kerning large)) + (set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32)))) + ) + + +(defmethod draw-option menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-96 float) + (sv-100 float) + (sv-104 float) + (sv-108 float) + (sv-112 hud-box) + (sv-116 print-highscore-obj) + (sv-120 float) + (sv-124 float) + ) + (let ((padding 20.0)) + (if (not (-> *pc-settings* use-vis?)) + (*! padding (-> *pc-settings* aspect-ratio-reciprocal))) + (set! sv-96 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-100 0.22) + (set! sv-104 395.0) + (if (not (-> *pc-settings* use-vis?)) + (*! sv-104 (-> *pc-settings* aspect-ratio-reciprocal))) + (set! sv-108 (-> arg1 origin x)) + (set! sv-112 (new 'stack-no-clear 'hud-box)) + (set! sv-116 (new 'stack 'print-highscore-obj)) + (set! sv-120 (* (-> arg0 sliding) sv-104)) + (set! sv-124 (* (-> arg0 sliding-off) (-> obj slide-dir) sv-104)) + (if (< sv-96 0.0) + (set! sv-96 0.0) + ) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading arg1) + ) + (else + ;; initial font parameters + (set! (-> arg1 alpha) sv-96) + (set-scale! arg1 1.0) + (set-flags! arg1 (font-flags kerning middle large)) + (set-color! arg1 (font-color progress)) + ;; set up for decoration text + (set! (-> arg1 origin x) 59.0) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))) + (set! (-> arg1 origin y) 78.0) + (set! (-> arg1 width) sv-104) + (set! (-> arg1 height) 215.0) + + ;; set the scissor region + (begin-scissor sv-112 arg0) + + ;; set up for highscore icon + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc93))) + (set! (-> obj sprites 0 flags) (the-as uint 4)) + (set! (-> obj sprites 0 scale-x) sv-100) + (set! (-> obj sprites 0 scale-y) sv-100) + (let ((v1-33 (-> obj sprites 0 color2))) + (set! (-> v1-33 0) 128) + (set! (-> v1-33 1) 128) + (set! (-> v1-33 2) 128) + (set! (-> v1-33 3) (the int (* 128.0 sv-96))) + ) + (set! (-> obj sprites 0 pos z) #xfffff0) + (set! (-> obj sprites 0 pos w) 0) + + ;; draw decoration text + (if (= (-> *setting-control* user-default language) (language-enum spanish)) + (draw-decoration obj arg1 sv-96 (text-id progress-root-highscores) #t 0.8) + (draw-decoration obj arg1 sv-96 (text-id progress-root-highscores) #t 0.95) + ) + + ;; draw highscore title (e.g 'Gun Course') + (set-scale! arg1 0.6) + (set! (-> arg1 height) 185.0) + (+! (-> arg1 origin y) 46.0) + (set! (-> arg1 origin x) 65.0) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))) + (set-width! arg1 367) + (set-flags! arg1 (font-flags kerning large)) + (set-color! arg1 (font-color progress-force-selected)) + (set! (-> arg1 origin x) (+ padding sv-120 (-> arg1 origin x))) + (set-scale! arg1 0.75) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (set-scale! arg1 0.69) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (set-scale! arg1 0.72) + ) + (when (= (-> *setting-control* user-default language) (language-enum spanish)) + (set-scale! arg1 0.65) + ) + (print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> obj page-index)) #f)) arg1 #f 44 (bucket-id progress)) + + ;; now draw highscore subtitle (e.g 'Scatter Gun') + (+! (-> arg1 origin y) 25.0) + (set-scale! arg1 0.6) + (when (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (set-scale! arg1 0.58) + ) + (print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> obj page-index)) #f)) arg1 #f 44 (bucket-id progress)) + + ;; draw highscore icon + (set! (-> arg1 origin x) (- (-> arg1 origin x) (+ padding sv-120))) + (+! (-> arg1 origin y) 25.0) + (draw-highscore-icon + obj + (get-highscore-icon (-> obj page-index)) + (the int (+ (the float (get-highscore-icon-xoffset (-> obj page-index))) sv-120)) + (get-highscore-icon-yoffset (-> obj page-index)) + (get-highscore-icon-scale (-> obj page-index)) + ) + + ;; print the 8 scores now. + (set! sv-108 (-> arg1 origin x)) + (set-color! arg1 (font-color progress)) + (+! (-> arg1 origin x) sv-120) + (set-scale! arg1 0.6) + (let ((gp-5 (get-game-score-ref *game-info* (get-highscore-score (-> obj page-index))))) + (set! (-> sv-116 index) (-> obj page-index)) + (set! (-> sv-116 previous) #f) + (set! (-> sv-116 self) obj) + (case (get-highscore-type (-> obj page-index)) + (('game) + (set! (-> sv-116 game-score) #t) + ) + (('race) + (set! (-> sv-116 game-score) #f) + ) + ) + (set! (-> sv-116 context) arg1) + (set! (-> sv-116 local-scale) sv-96) + (set! (-> sv-116 interp) sv-120) + (dotimes (s5-5 8) + (set! (-> sv-116 place) s5-5) + (set! (-> sv-116 score) (-> gp-5 s5-5)) + (print-highscore sv-116) + ) + ) + (set! (-> arg1 origin x) sv-108) + + ;; draw the previous highscore that was seen + ;; note that we only need to know what the last one was + ;; since the screen only needs to draw 2 highscores at any given time anyway + ;; reset font parameters + (set-scale! arg1 0.6) + (set! (-> arg1 origin x) 59.0) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))) + (set! (-> arg1 origin y) 78.0) + (set! (-> arg1 width) sv-104) + (set! (-> arg1 height) 215.0) + (set-scale! arg1 0.5) + (set! (-> arg1 height) 185.0) + (+! (-> arg1 origin y) 46.0) + (set! (-> arg1 origin x) 80.0) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))) + (set! (-> obj sprites 0 pos z) #xffffff) + (set! (-> arg1 width) sv-104) + (set-flags! arg1 (font-flags kerning large)) + (set-color! arg1 (font-color progress-force-selected)) + (set! (-> arg1 origin x) (+ padding sv-124 (-> arg1 origin x))) + (set-scale! arg1 0.75) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (set-scale! arg1 0.69) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (set-scale! arg1 0.72) + ) + (when (= (-> *setting-control* user-default language) (language-enum spanish)) + (set-scale! arg1 0.65) + ) + (print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> obj prev-page-index)) #f)) arg1 #f 44 (bucket-id progress)) + (+! (-> arg1 origin y) 25.0) + (set-scale! arg1 0.6) + (when (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (set-scale! arg1 0.58) + ) + (print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> obj prev-page-index)) #f)) arg1 #f 44 (bucket-id progress)) + (set! (-> arg1 origin x) (- (-> arg1 origin x) (+ padding sv-124))) + (+! (-> arg1 origin y) 25.0) + (draw-highscore-icon + obj + (get-highscore-icon (-> obj prev-page-index)) + (the int (+ (the float (get-highscore-icon-xoffset (-> obj page-index))) sv-124)) + (get-highscore-icon-yoffset (-> obj page-index)) + (get-highscore-icon-scale (-> obj page-index)) + ) + (set! sv-108 (-> arg1 origin x)) + (set-color! arg1 (font-color progress)) + (+! (-> arg1 origin x) sv-124) + (set-scale! arg1 0.6) + (when (< 1 (get-num-highscores)) + (let ((gp-11 (get-game-score-ref *game-info* (get-highscore-score (-> obj prev-page-index))))) + (set! (-> sv-116 index) (-> obj prev-page-index)) + (set! (-> sv-116 previous) #t) + (set! (-> sv-116 self) obj) + (case (get-highscore-type (-> obj prev-page-index)) + (('game) + (set! (-> sv-116 game-score) #t) + ) + (('race) + (set! (-> sv-116 game-score) #f) + ) + ) + (set! (-> sv-116 context) arg1) + (set! (-> sv-116 local-scale) sv-96) + (set! (-> sv-116 interp) sv-120) + (dotimes (s5-10 8) + (set! (-> sv-116 place) s5-10) + (set! (-> sv-116 score) (-> gp-11 s5-10)) + (print-highscore sv-116) + ) + ) + (set! (-> arg1 origin x) sv-108) + (set-scale! arg1 0.6) + ) + (if (< 1 (get-num-highscores)) + (draw-previous-next obj arg1 #t) + ) + (end-scissor sv-112 1.0) + ) + )) + 0 + (none) + ) + + +(defmethod draw-option menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-48 int) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 pointer) + (sv-160 rgba) + (sv-176 dma-buffer) + (sv-208 pointer) + (sv-240 rgba) + (sv-256 dma-buffer) + ) + (let ((s5-0 arg1) + (gp-0 arg2) + (bar-width 230.0) + (bar-width-max 240) + (icon-right-offset 242) + ) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! sv-48 128) + (let ((s1-0 sv-48) + (s0-0 9) + (s2-0 157) + (f28-0 2.0) + (s3-0 252) + ) + (set! sv-64 20) + (set! sv-80 0) + (set! sv-96 112) + (set! sv-112 127) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> s5-0 alpha) f30-0) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading s5-0) + (return 0) + ) + (else + (set-scale! s5-0 0.6) + (+! (-> s5-0 origin y) 20.0) + (case (get-aspect-ratio) + (('aspect4x3) + (set! s2-0 157) + (let ((v1-17 gp-0)) + (cond + ((zero? v1-17) + (+! (-> s5-0 origin y) -24.0) + (+! s2-0 -9) + ) + ((= v1-17 1) + (+! (-> s5-0 origin y) -9.0) + (+! s2-0 43) + ) + ((= v1-17 2) + (+! (-> s5-0 origin y) 6.0) + (+! s2-0 96) + ) + ) + ) + ) + (('aspect16x9) + (set! s2-0 172) + (set! f28-0 2.62) + (set! s0-0 5) + (set! s3-0 250) + (let ((v1-28 gp-0)) + (cond + ((zero? v1-28) + (+! (-> s5-0 origin y) -20.0) + (+! s2-0 -20) + ) + ((= v1-28 1) + (+! (-> s5-0 origin y) 2.0) + (+! s2-0 40) + ) + ((= v1-28 2) + (+! (-> s5-0 origin y) 30.0) + (+! s2-0 105) + ) + ) + ) + ) + ) + (when (not (-> *pc-settings* use-vis?)) + (set! sv-48 (adjust-game-x (the float sv-48))) + (set! s1-0 (adjust-game-x (the float s1-0))) + (*! bar-width (-> *pc-settings* aspect-ratio-reciprocal)) + (set! bar-width-max (the int (* (-> *pc-settings* aspect-ratio-reciprocal) bar-width-max))) + (set! icon-right-offset (the int (* (-> *pc-settings* aspect-ratio-reciprocal) icon-right-offset))) + (set! sv-64 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-64))) + (set! s0-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s0-0))) + (set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0))) + ) + (set-flags! s5-0 (font-flags kerning large)) + (set! (-> s5-0 origin x) (the float sv-48)) + (cond + (arg3 + (set! sv-128 (-> obj value-to-modify)) + (+! (-> s5-0 origin y) -8.0) + (set-color! s5-0 (font-color progress-force-selected)) + (draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 52 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) s5-0 #f 44 (bucket-id progress)) + (set! sv-160 (new 'static 'rgba :r (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) + :g (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) + :b (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) + :a (the int (* 128.0 f30-0)))) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xb :page #xc93))) + (set! (-> obj sprites 0 scale-x) f28-0) + (set! (-> obj sprites 0 scale-y) 0.7) + (let ((v1-57 (-> obj sprites 0 color2))) + (set! (-> v1-57 0) 128) + (set! (-> v1-57 1) 128) + (set! (-> v1-57 2) 128) + (set! (-> v1-57 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 0 pos z) #x3fffff) + (set! (-> obj sprites 0 pos w) 0) + (set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #xc93))) + (set! (-> obj sprites 1 scale-x) 0.2) + (set! (-> obj sprites 1 scale-y) 1.33) + (let ((v1-62 (-> obj sprites 1 color2))) + (set! (-> v1-62 0) 128) + (set! (-> v1-62 1) 128) + (set! (-> v1-62 2) 128) + (set! (-> v1-62 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 1 pos z) #x3fffff) + (set! (-> obj sprites 1 pos w) 0) + (set! (-> obj sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3e :page #xc93))) + (set! (-> obj sprites 2 scale-x) 1.0) + (set! (-> obj sprites 2 scale-y) 1.0) + (let ((v1-67 (-> obj sprites 2 color2))) + (set! (-> v1-67 0) sv-80) + (set! (-> v1-67 1) sv-96) + (set! (-> v1-67 2) sv-112) + (set! (-> v1-67 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 2 pos z) #xffffff) + (set! (-> obj sprites 2 pos w) 0) + (set! (-> obj sprites 3 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3f :page #xc93))) + (set! (-> obj sprites 3 scale-x) 1.0) + (set! (-> obj sprites 3 scale-y) 1.0) + (let ((v1-72 (-> obj sprites 3 color2))) + (set! (-> v1-72 0) sv-80) + (set! (-> v1-72 1) sv-96) + (set! (-> v1-72 2) sv-112) + (set! (-> v1-72 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 0) + (set-hud-piece-position! (-> obj sprites 0) s1-0 s2-0) + (set-hud-piece-position! + (-> obj sprites 1) + (+ s1-0 (the int (* bar-width (-> (the-as (pointer float) sv-128))))) + (+ s2-0 -4) + ) + (set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 3) (+ sv-64 icon-right-offset s1-0) (+ s2-0 -4)) + (with-dma-buffer-add-bucket ((sv-176 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress)) + (draw (-> obj sprites 0) sv-176 (-> *level* default-level)) + (draw-sprite2d-xy + sv-176 + (+ s1-0 s0-0 (the int (* bar-width (-> (the-as (pointer float) sv-128))))) + (+ s2-0 7) + (- bar-width-max (the int (* bar-width (-> (the-as (pointer float) sv-128))))) + 9 + sv-160 + ) + (draw (-> obj sprites 1) sv-176 (-> *level* default-level)) + (draw (-> obj sprites 2) sv-176 (-> *level* default-level)) + (draw (-> obj sprites 3) sv-176 (-> *level* default-level)) + ) + (+! (-> s5-0 origin x) (the float s3-0)) + (set-flags! s5-0 (font-flags kerning right large)) + (print-game-text (string-format "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-128))))) s5-0 #f 44 (bucket-id progress)) + (set-flags! s5-0 (font-flags kerning large)) + ) + (else + (set! sv-208 (-> obj value-to-modify)) + (+! (-> s5-0 origin y) -8.0) + (when (or (= (-> *setting-control* user-default language) (language-enum german)) + (= (-> *setting-control* user-default language) (language-enum french)) + ) + (set-scale! s5-0 0.56) + ) + (if (= (-> arg0 option-index) gp-0) + (draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 24 f30-0) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) s5-0 #f 44 (bucket-id progress)) + (set! sv-240 (new 'static 'rgba :r (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) + :g (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) + :b (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) + :a (the int (* 128.0 f30-0)))) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xb :page #xc93))) + (set! (-> obj sprites 0 scale-x) f28-0) + (set! (-> obj sprites 0 scale-y) 0.7) + (let ((v1-140 (-> obj sprites 0 color2))) + (set! (-> v1-140 0) 128) + (set! (-> v1-140 1) 128) + (set! (-> v1-140 2) 128) + (set! (-> v1-140 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 0 pos z) #x3fffff) + (set! (-> obj sprites 0 pos w) 0) + (set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #xc93))) + (set! (-> obj sprites 1 scale-x) 0.2) + (set! (-> obj sprites 1 scale-y) 1.33) + (let ((v1-145 (-> obj sprites 1 color2))) + (set! (-> v1-145 0) 128) + (set! (-> v1-145 1) 128) + (set! (-> v1-145 2) 128) + (set! (-> v1-145 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 1 pos z) #x3fffff) + (set! (-> obj sprites 1 pos w) 0) + (set! (-> obj sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3e :page #xc93))) + (set! (-> obj sprites 2 scale-x) 1.0) + (set! (-> obj sprites 2 scale-y) 1.0) + (let ((v1-150 (-> obj sprites 2 color2))) + (set! (-> v1-150 0) sv-80) + (set! (-> v1-150 1) sv-96) + (set! (-> v1-150 2) sv-112) + (set! (-> v1-150 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 2 pos z) #xffffff) + (set! (-> obj sprites 2 pos w) 0) + (set! (-> obj sprites 3 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3f :page #xc93))) + (set! (-> obj sprites 3 scale-x) 1.0) + (set! (-> obj sprites 3 scale-y) 1.0) + (let ((v1-155 (-> obj sprites 3 color2))) + (set! (-> v1-155 0) sv-80) + (set! (-> v1-155 1) sv-96) + (set! (-> v1-155 2) sv-112) + (set! (-> v1-155 3) (the int (* 128.0 f30-0))) + ) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 0) + (set-hud-piece-position! (-> obj sprites 0) s1-0 s2-0) + (set-hud-piece-position! + (-> obj sprites 1) + (+ s1-0 (the int (* bar-width (-> (the-as (pointer float) sv-208))))) + (+ s2-0 -4) + ) + (set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (-> obj sprites 3) (+ sv-64 icon-right-offset s1-0) (+ s2-0 -4)) + (with-dma-buffer-add-bucket ((sv-256 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress)) + (draw (-> obj sprites 0) sv-256 (-> *level* default-level)) + (draw-sprite2d-xy + sv-256 + (+ s1-0 s0-0 (the int (* bar-width (-> (the-as (pointer float) sv-208))))) + (+ s2-0 7) + (- bar-width-max (the int (* bar-width (-> (the-as (pointer float) sv-208))))) + 9 + sv-240 + ) + (draw (-> obj sprites 1) sv-256 (-> *level* default-level)) + (draw (-> obj sprites 2) sv-256 (-> *level* default-level)) + (draw (-> obj sprites 3) sv-256 (-> *level* default-level)) + ) + (+! (-> s5-0 origin x) (the float s3-0)) + (set-flags! s5-0 (font-flags kerning right large)) + (print-game-text (string-format "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-208))))) s5-0 #f 44 (bucket-id progress)) + (set-flags! s5-0 (font-flags kerning large)) + ) + ) + (if (zero? gp-0) + (draw-sound-options-decoration obj s5-0 f30-0 (text-id progress-root-sound-options) #f) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + + + +(defmethod draw-option menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (f0-50 float) + (sv-16 float) + (sv-20 int) + (sv-24 int) + (sv-32 int) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-256 float) + (sv-260 float) + (sv-264 game-task-node-info) + (sv-268 game-task-node-info) + (sv-272 symbol) + (sv-276 hud-box) + (sv-280 float) + (sv-284 float) + ) + (set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-20 1) + (set! sv-24 0) + (set! sv-32 0) + (set! sv-40 0) + (set! sv-48 0) + (set! sv-56 95) + (set! sv-256 (* 395.0 (-> arg0 sliding))) + (set! sv-260 (* 44.0 (-> arg0 sliding-height))) + (set! sv-264 (new 'stack 'game-task-node-info)) + (set! sv-268 (new 'stack 'game-task-node-info)) + (set! sv-272 #t) + (set! sv-276 (new 'stack-no-clear 'hud-box)) + (set! sv-280 (-> arg1 origin y)) + (set! sv-284 (-> arg1 scale)) + (set! (-> *progress-state* current-task-index) (length (-> *game-info* sub-task-list))) + (set! (-> *progress-state* current-line-index) -1) + (set! (-> *progress-state* current-task) (the-as uint -1)) + (set! (-> *progress-state* first-closed-line-index) -1) + (set! (-> *progress-state* extra-text-state) -1) + (set! (-> *progress-state* num-open-tasks-found) 0) + (set! (-> *progress-state* num-closed-tasks-found) 0) + (if (< sv-16 0.0) + (set! sv-16 (the-as float 0.0)) + ) + (set! (-> arg1 alpha) sv-16) + (set! (-> *game-info* mission-list 0) sv-264) + (set! (-> sv-264 description) (text-id progress-missions-in-progress)) + (set! (-> sv-268 description) (text-id progress-missions-completed)) + (while (< sv-24 (length (-> *game-info* sub-task-list))) + (let ((v1-26 (find-mission-text-at-index sv-24)) + (a0-15 (-> *game-info* mission-list)) + ) + (when (!= v1-26 #f) + (when (and (logtest? (-> v1-26 flags) (game-task-node-flag closed)) sv-272) + (set! sv-272 (the-as symbol #f)) + (set! (-> a0-15 sv-20) sv-268) + (set! sv-20 (+ sv-20 1)) + ) + (set! (-> a0-15 sv-20) v1-26) + (set! sv-20 (+ sv-20 1)) + ) + ) + (set! sv-24 (+ sv-24 1)) + ) + (set! sv-48 sv-20) + (set! (-> *progress-state* total-num-tasks) sv-20) + (sort-task-node-result sv-48) + (set! (-> arg1 width) 395.0) + (set! (-> arg1 origin x) 60.0) + (set! (-> arg1 origin y) 80.0) + (set-color! arg1 (font-color progress)) + (when (not (-> *pc-settings* use-vis?)) + ;; added to fix widescreen + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + ) + (let ((v1-40 (-> obj page-index))) + (cond + ((zero? v1-40) + (draw-missions-decoration obj arg1 sv-16 (text-id progress-root-missions)) + ) + ((= v1-40 1) + (draw-missions-decoration obj arg1 sv-16 (text-id progress-root-missions)) + ) + ) + ) + (begin-scissor-missions sv-276) + (set-flags! arg1 (font-flags kerning large)) + (if (-> *pc-settings* use-vis?) + (+! (-> arg1 origin x) 20.0) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 20.0))) + (case (get-aspect-ratio) + (('aspect16x9) + (set! (-> arg1 origin y) 80.0) + ) + (('aspect4x3) + (set! (-> arg1 origin y) (the float sv-56)) + ) + ) + (set-scale! arg1 sv-284) + (when (zero? (-> obj page-index)) + (set! sv-24 (-> obj task-line-index)) + (set! sv-20 0) + (let ((v1-57 (+ sv-56 44))) + (set! sv-56 v1-57) + (set! (-> arg1 origin y) (the float (+ v1-57 (the int sv-260)))) + ) + (set! (-> arg1 width) 340.0) + (set! (-> arg1 height) 44.0) + (when (!= sv-260 0.0) + (set! (-> *progress-state* missions-total-spacing) 0.0) + (dotimes (s4-1 sv-24) + (let* ((s3-1 (-> *game-info* mission-list s4-1)) + (a1-19 + (if (and (logtest? (-> s3-1 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s3-1 task))) + (-> *game-info* play-list (-> s3-1 task) text-name) + (-> s3-1 description) + ) + ) + (s3-2 (lookup-text! *common-text* a1-19 #f)) + (f30-0 3.0) + (s2-0 print-game-text) + ) + (format (clear *temp-string*) "~S" s3-2) + (set! (-> *progress-state* missions-total-spacing) + (+ f30-0 (s2-0 *temp-string* arg1 #t 44 (bucket-id progress)) (-> *progress-state* missions-total-spacing)) + ) + ) + ) + ) + (set! sv-56 (- sv-56 (the int (-> *progress-state* missions-total-spacing)))) + (cond + ((< (-> arg0 sliding-height) 0.0) + (let* ((s4-2 (-> *game-info* mission-list sv-24)) + (a1-23 + (if (and (logtest? (-> s4-2 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-2 task))) + (-> *game-info* play-list (-> s4-2 task) text-name) + (-> s4-2 description) + ) + ) + (s4-3 (lookup-text! *common-text* a1-23 #f)) + ) + 0.0 + (let ((f30-1 3.0) + (s3-3 print-game-text) + ) + (format (clear *temp-string*) "~S" s4-3) + (let ((f0-36 (+ f30-1 (s3-3 *temp-string* arg1 #t 44 (bucket-id progress))))) + (set! sv-260 (* (-> arg0 sliding-height) f0-36)) + ) + ) + ) + ) + (else + (let* ((s4-4 (-> *game-info* mission-list (+ sv-24 -1))) + (a1-27 + (if (and (logtest? (-> s4-4 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-4 task))) + (-> *game-info* play-list (-> s4-4 task) text-name) + (-> s4-4 description) + ) + ) + (s4-5 (lookup-text! *common-text* a1-27 #f)) + ) + 0.0 + (let ((f30-2 3.0) + (s3-4 print-game-text) + ) + (format (clear *temp-string*) "~S" s4-5) + (let ((f0-40 (+ f30-2 (s3-4 *temp-string* arg1 #t 44 (bucket-id progress))))) + (set! sv-260 (* (-> arg0 sliding-height) f0-40)) + ) + ) + ) + ) + ) + (set! (-> arg1 origin y) (the float (+ sv-56 (the int sv-260)))) + (while (and (< sv-20 sv-48) (< sv-20 (+ sv-24 10))) + (let* ((s4-6 (-> *game-info* mission-list sv-20)) + (s3-5 + (if (and (logtest? (-> s4-6 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-6 task))) + (-> *game-info* play-list (-> s4-6 task) text-name) + (-> s4-6 description) + ) + ) + (s5-1 (lookup-text! *common-text* s3-5 #f)) + ) + 0.0 + (set! f0-50 + (cond + ((>= sv-20 (+ sv-24 -1)) + (when (and (!= s3-5 381) (!= s3-5 380)) + (let ((s3-6 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! + *common-text* + (if (logtest? (-> s4-6 flags) (game-task-node-flag closed)) + (text-id progress-missions-icon-completed) + (text-id progress-missions-icon-todo) + ) + #f + ) + ) + (s3-6 *temp-string* arg1 #f 44 (bucket-id progress)) + ) + ) + (if (-> *pc-settings* use-vis?) + (+! (-> arg1 origin x) 20.0) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 20.0))) + (let ((f30-3 3.0) + (s4-7 print-game-text) + ) + (format (clear *temp-string*) "~S" s5-1) + (set! f0-50 (+ f30-3 (s4-7 *temp-string* arg1 #f 44 (bucket-id progress)))) + ) + (if (-> *pc-settings* use-vis?) + (+! (-> arg1 origin x) -20.0) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -20.0))) + f0-50 + ) + (else + (let ((f30-4 3.0) + (s4-8 print-game-text) + ) + (format (clear *temp-string*) "~S" s5-1) + (+ f30-4 (s4-8 *temp-string* arg1 #t 44 (bucket-id progress))) + ) + ) + ) + ) + ) + (let ((v1-142 (+ sv-56 (the int f0-50)))) + (set! sv-56 v1-142) + (set! (-> arg1 origin y) (the float (+ v1-142 (the int sv-260)))) + ) + (set! sv-20 (+ sv-20 1)) + ) + (if (zero? (-> *progress-state* total-num-tasks)) + (print-game-text + (lookup-text! *common-text* (text-id progress-missions-none) #f) + arg1 + #f + 44 + (bucket-id progress) + ) + ) + ) + (end-scissor-missions sv-276 1.0) + (draw-missions-up-down arg1) + 0 + (none) + ) + + +(defun draw-secret-list ((arg0 secret-item-option) (arg1 progress) (arg2 font-context) (arg3 int) (arg4 symbol) (arg5 float)) + (let ((s4-0 (and arg4 (= arg3 1)))) + 380.0 + 270.0 + (set! (-> arg2 origin x) 100.0) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg2 origin x) (the float (adjust-game-x (-> arg2 origin x))))) + (cond + ((= s4-0 #t) + (cond + ((= (-> arg0 can-toggle) 'auto) + ) + ((not (-> arg0 can-toggle)) + (case (get-aspect-ratio) + (('aspect4x3) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -25.0)) + (+! (-> arg2 origin x) -25.0)) + ) + (('aspect16x9) + (+! (-> arg2 origin x) -10.0) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (set-scale! arg2 0.43) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-secrets-go-to-title-screen) #f) + arg2 + #f + 44 + (bucket-id progress) + ) + ) + ((and (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag))) + (set! (-> arg1 selected-option) #f) + (logclear! (-> *game-info* secrets) (-> arg0 flag)) + ) + ((and (= (-> arg0 can-toggle) #t) (not (logtest? (-> *game-info* secrets) (-> arg0 flag)))) + (logior! (-> *game-info* secrets) (-> arg0 flag)) + (set! (-> arg1 selected-option) #f) + ) + ) + ) + (else + (set-color! arg2 (if (= arg3 1) + (progress-selected 0) + (font-color progress))) + (set! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 75 + 90 + ) + ) + ) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg2 origin x) (the float (adjust-game-x (-> arg2 origin x))))) + (cond + ((logtest? (-> *game-info* sub-task-list (-> arg0 avail-after) flags) (game-task-node-flag closed)) + (print-game-text (string-format "~S" (lookup-text! *common-text* (-> arg0 name) #f)) arg2 #f 44 (bucket-id progress)) + ) + (else + (print-game-text (string-format "????????") arg2 #f 44 (bucket-id progress)) + ) + ) + (set! (-> arg2 origin x) 360.0) + (if (not (-> *pc-settings* use-vis?)) + (set! (-> arg2 origin x) (the float (adjust-game-x (-> arg2 origin x))))) + (set-color! arg2 (font-color progress)) + ) + ) + (cond + ((and (not s4-0) (not (logtest? (-> *game-info* purchase-secrets) (-> arg0 flag)))) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 50)) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + )))) + (print-game-text (string-format "~D" (-> arg0 cost)) arg2 #f 44 (bucket-id progress)) + ) + ((and (not s4-0) (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag))) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 50)) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + )))) + (print-game-text (string-format "~S" (lookup-text! *common-text* (text-id progress-on) #f)) arg2 #f 44 (bucket-id progress)) + ) + ((and (not s4-0) (= (-> arg0 can-toggle) #t) (not (logtest? (-> *game-info* secrets) (-> arg0 flag)))) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 50)) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + )))) + (print-game-text (string-format "~S" (lookup-text! *common-text* (text-id progress-off) #f)) arg2 #f 44 (bucket-id progress)) + ) + ((and (not s4-0) (!= (-> arg0 can-toggle) #t)) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 80)) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 80 + 70 + )))) + (set-flags! arg2 (font-flags kerning right large)) + (print-game-text (string-format "~S" (lookup-text! *common-text* (text-id progress-secrets-unlocked) #f)) arg2 #f 44 (bucket-id progress)) + (set-flags! arg2 (font-flags kerning large)) + ) + ) + ) + (none) + ) + + +(defmacro adjust-x-if-needed (x) + "adjust an x screen coord if ps2 vis is disabled" + `(if (not (-> *pc-settings* use-vis?)) (adjust-game-x (the float ,x)) ,x)) + + +(defmethod draw-option menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 float) + (sv-20 int) + (sv-24 float) + (sv-28 float) + (sv-32 float) + (sv-36 float) + (sv-40 int) + (sv-48 int) + (sv-56 int) + (sv-64 int) + (sv-72 int) + (sv-80 int) + (sv-88 int) + (sv-96 string) + (sv-112 int) + ) + (set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-20 (-> arg0 option-index)) + (set! sv-24 (-> arg1 origin x)) + (set! sv-28 (-> arg1 origin y)) + (set! sv-32 (-> arg1 width)) + (set! sv-36 (-> arg1 height)) + (set! sv-40 (if (= (get-aspect-ratio) 'aspect4x3) + 300 + 305 + ) + ) + (set! sv-48 (if (= (get-aspect-ratio) 'aspect4x3) + 140 + 140 + ) + ) + (set! sv-56 (if (= (get-aspect-ratio) 'aspect4x3) + 64 + 48 + ) + ) + (set! sv-64 69) + (set! sv-72 110) + (set! sv-80 176) + (set! sv-88 54) + (if (< sv-16 0.0) + (set! sv-16 (the-as float 0.0)) + ) + (set! (-> arg1 alpha) sv-16) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading arg1) + (return 0) + ) + (else + (when (not (-> *pc-settings* use-vis?)) + (set! sv-40 (the int (adjust-game-x (the float sv-40)))) + (set! sv-56 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-56))) + ) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (if (= arg2 sv-20) + (the-as font-color (the-as int (progress-selected 0))) + (font-color progress) + ) + ) + ) + (cond + ((= *save-options-title* (-> arg0 current-options)) + (set! (-> arg1 origin y) 80.0) + (set! (-> arg1 height) 52.0) + (+! (-> arg1 origin y) (the float (* 42 (+ arg2 1)))) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -100.0)) + (+! (-> arg1 origin x) -100.0)) + ) + (else + (case (get-aspect-ratio) + (('aspect16x9) + (set! (-> arg1 origin y) 74.0) + (set! (-> arg1 height) 42.0) + (+! (-> arg1 origin y) (the float (* 60 (+ arg2 1)))) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -90.0)) + (+! (-> arg1 origin x) -90.0)) + ) + (('aspect4x3) + (set! (-> arg1 origin y) 74.0) + (set! (-> arg1 height) 42.0) + (+! (-> arg1 origin y) (the float (* 54 (+ arg2 1)))) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -90.0)) + (+! (-> arg1 origin x) -90.0)) + ) + ) + ) + ) + (set-vector! (-> obj box 0 color) 64 128 128 (the int (* 128.0 sv-16))) + (when (= arg2 sv-20) + (cond + ((!= *save-options-title* (-> arg0 current-options)) + (case (get-aspect-ratio) + (('aspect16x9) + (set! sv-64 79) + (set! sv-72 110) + (set! sv-80 166) + (set! sv-88 62) + ) + ) + (when (not (-> *pc-settings* use-vis?)) + (set! sv-64 (the int (adjust-game-x (the float sv-64)))) + (set! sv-80 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-80))) + ) + (draw-savegame-box + obj + (the float sv-64) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 (* sv-88 arg2))) + (the float (+ sv-72 (* sv-88 arg2))) + ) + (when (!= arg2 3) + (draw-savegame-box + obj + (the float sv-64) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + ) + (draw-savegame-box + obj + (the float (+ sv-64 sv-80)) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + (the float (+ (* sv-88 4) 2 sv-72)) + ) + ) + (draw-savegame-box + obj + (the float (+ sv-64 sv-80)) + (the float (+ sv-64 sv-80)) + (the float sv-72) + (the float (+ sv-72 (* sv-88 arg2))) + ) + (with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (draw-sprite2d-xy + s1-0 + sv-64 + (+ sv-72 (* sv-88 arg2)) + sv-80 + sv-88 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 sv-16))) + ) + ) + ) + ((= *save-options-title* (-> arg0 current-options)) + (set! sv-88 42) + (let ((v0-13 (get-aspect-ratio))) + (when (= v0-13 'aspect16x9) + (set! sv-64 79) + (set! sv-72 110) + (set! sv-80 166) + (set! sv-88 42) + (draw-savegame-box + obj + (the float (+ sv-64 sv-80)) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + (the float (+ sv-72 (* 6 sv-88))) + ) + ) + ) + (when (not (-> *pc-settings* use-vis?)) + (set! sv-64 (the int (adjust-game-x (the float sv-64)))) + (set! sv-80 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-80))) + ) + (draw-savegame-box + obj + (the float sv-64) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 (* sv-88 arg2))) + (the float (+ sv-72 (* sv-88 arg2))) + ) + (when (!= arg2 4) + (draw-savegame-box + obj + (the float sv-64) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + ) + (draw-savegame-box + obj + (the float (+ sv-64 sv-80)) + (the float (+ sv-64 sv-80)) + (the float (+ sv-72 sv-88 (* sv-88 arg2))) + (the float (+ (* 5 sv-88) 2 sv-72)) + ) + ) + (draw-savegame-box + obj + (the float (+ sv-64 sv-80)) + (the float (+ sv-64 sv-80)) + (the float sv-72) + (the float (+ sv-72 (* sv-88 arg2))) + ) + (with-dma-buffer-add-bucket ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (draw-sprite2d-xy + s1-1 + sv-64 + (+ sv-72 (* sv-88 arg2)) + sv-80 + sv-88 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 sv-16))) + ) + ) + ) + ) + ) + (cond + ((and *progress-save-info* + (= (-> *progress-save-info* formatted) 1) + (= (-> *progress-save-info* inited) 1) + (= (-> *progress-save-info* file arg2 present) 1) + ) + (cond + ((= arg2 sv-20) + (set-scale! arg1 0.8) + ) + (else + (set-scale! arg1 0.6) + ) + ) + (set-flags! arg1 (font-flags kerning large)) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 100)) + (+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 100 + 105 + )))) + (print-game-text (string-format "~S ~D" (lookup-text! *common-text* (text-id progress-unknown-game) #f) (+ arg2 1)) + arg1 #f 44 (bucket-id progress)) + (set-color! arg1 (font-color progress)) + (set! (-> arg1 origin x) 250.0) + (set! (-> arg1 origin y) 110.0) + (set! (-> arg1 width) 170.0) + (set! (-> arg1 height) 190.0) + (when (not (-> *pc-settings* use-vis?)) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))) + (let ((s2-8 (-> *progress-save-info* file arg2 level-index))) + (when (= arg2 sv-20) + (let ((v1-199 (-> obj sprites 0 color2))) + (set! (-> v1-199 0) 128) + (set! (-> v1-199 1) 128) + (set! (-> v1-199 2) 128) + (set! (-> v1-199 3) (the int (* 128.0 sv-16))) + ) + (let ((v1-200 (-> obj sprites 1 color2))) + (set! (-> v1-200 0) 128) + (set! (-> v1-200 1) 128) + (set! (-> v1-200 2) 128) + (set! (-> v1-200 3) (the int (* 128.0 sv-16))) + ) + (set! (-> obj sprites 1 pos z) #xffffff) + (set! (-> obj sprites 1 pos w) 1) + (set! (-> obj sprites 1 tex) (lookup-texture-by-id (get-level-icon-id-01 s2-8))) + (set! (-> obj sprites 1 scale-x) 1.0) + (set! (-> obj sprites 1 scale-y) 1.0) + (set-hud-piece-position! (-> obj sprites 1) sv-40 sv-48) + (let ((v1-205 (-> obj sprites 2 color2))) + (set! (-> v1-205 0) 128) + (set! (-> v1-205 1) 128) + (set! (-> v1-205 2) 128) + (set! (-> v1-205 3) (the int (* 128.0 sv-16))) + ) + (set! (-> obj sprites 2 pos z) #xffffff) + (set! (-> obj sprites 2 pos w) 1) + (set! (-> obj sprites 2 tex) (lookup-texture-by-id (get-level-icon-id-02 s2-8))) + (set! (-> obj sprites 2 scale-x) 1.0) + (set! (-> obj sprites 2 scale-y) 1.0) + (set-hud-piece-position! (-> obj sprites 2) (+ sv-40 sv-56) sv-48) + (let ((v1-211 (-> obj sprites 3 color2))) + (set! (-> v1-211 0) 128) + (set! (-> v1-211 1) 128) + (set! (-> v1-211 2) 128) + (set! (-> v1-211 3) (the int (* 128.0 sv-16))) + ) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 1) + (set! (-> obj sprites 3 tex) (lookup-texture-by-id (get-level-icon-id-03 s2-8))) + (set! (-> obj sprites 3 scale-x) 1.0) + (set! (-> obj sprites 3 scale-y) 1.0) + (set-hud-piece-position! (-> obj sprites 3) sv-40 (+ sv-48 64)) + (let ((v1-217 (-> obj sprites 4 color2))) + (set! (-> v1-217 0) 128) + (set! (-> v1-217 1) 128) + (set! (-> v1-217 2) 128) + (set! (-> v1-217 3) (the int (* 128.0 sv-16))) + ) + (set! (-> obj sprites 4 pos z) #xffffff) + (set! (-> obj sprites 4 pos w) 1) + (set! (-> obj sprites 4 tex) (lookup-texture-by-id (get-level-icon-id-04 s2-8))) + (set! (-> obj sprites 4 scale-x) 1.0) + (set! (-> obj sprites 4 scale-y) 1.0) + (set-hud-piece-position! (-> obj sprites 4) (+ sv-40 sv-56) (+ sv-48 64)) + (with-dma-buffer-add-bucket ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw (-> obj sprites 1) s1-7 (-> *level* default-level)) + (draw (-> obj sprites 2) s1-7 (-> *level* default-level)) + (draw (-> obj sprites 3) s1-7 (-> *level* default-level)) + (draw (-> obj sprites 4) s1-7 (-> *level* default-level)) + ) + (set-scale! arg1 0.6) + (set! (-> arg1 origin x) 265.0) + (set! (-> arg1 origin y) 263.0) + (set! (-> arg1 width) 170.0) + (set! (-> arg1 height) 52.0) + (when (not (-> *pc-settings* use-vis?)) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))) + (set! (-> obj sprites 0 scale-x) 0.7) + (set! (-> obj sprites 0 scale-y) 0.7) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93))) + (set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 265) 263) + (with-dma-buffer-add-bucket ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw (-> obj sprites 0) s1-8 (-> *level* default-level)) + ) + (+! (-> arg1 origin y) 1.0) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 28)) + (+! (-> arg1 origin x) 28.0)) + (let* ((v1-272 (-> *progress-save-info* file arg2 game-time0)) + (v1-273 (logior (shl (-> *progress-save-info* file arg2 game-time1) 32) v1-272)) + (s2-11 (/ (the-as int v1-273) #x107ac0)) + ) + (set! sv-112 (/ (mod (the-as int v1-273) #x107ac0) #x4650)) + (print-game-text (string-format "~2,'0D:~2,'0D" s2-11 sv-112) arg1 #f 44 (bucket-id progress)) + ) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93))) + (set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 368) 263) + (with-dma-buffer-add-bucket ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw (-> obj sprites 0) s1-10 (-> *level* default-level)) + ) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 100)) + (+! (-> arg1 origin x) 100.0)) + (print-game-text (string-format "~D%" (the int (-> *progress-save-info* file arg2 completion-percentage))) arg1 #f 44 (bucket-id progress)) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) + (set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 368) 289) + (with-dma-buffer-add-bucket ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw (-> obj sprites 0) s1-12 (-> *level* default-level)) + ) + (+! (-> arg1 origin y) 28.0) + (print-game-text (string-format "~D" (the int (-> *progress-save-info* file arg2 skill-count))) arg1 #f 44 (bucket-id progress)) + (set! (-> obj sprites 0 scale-x) 0.6) + (set! (-> obj sprites 0 scale-y) 0.6) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93))) + (set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 253) 290) + (with-dma-buffer-add-bucket ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw (-> obj sprites 0) s1-14 (-> *level* default-level)) + ) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -100)) + (+! (-> arg1 origin x) -100.0)) + (print-game-text (string-format "~D" (the int (-> *progress-save-info* file arg2 gem-count))) arg1 #f 44 (bucket-id progress)) + ) + ) + ) + ((and *progress-save-info* + (= (-> *progress-save-info* formatted) 1) + (= (-> *progress-save-info* inited) 1) + (zero? (-> *progress-save-info* file arg2 present)) + ) + (cond + ((= arg2 sv-20) + (set-scale! arg1 0.8) + ) + (else + (set-scale! arg1 0.6) + ) + ) + (set-flags! arg1 (font-flags kerning large)) + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 100)) + (+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 100 + 105 + )))) + (print-game-text + (lookup-text! *common-text* (text-id progress-slot-empty) #f) + arg1 + #f + 44 + (bucket-id progress) + ) + ) + ) + (set! (-> arg1 origin x) sv-24) + (set! (-> arg1 origin y) sv-28) + (set! (-> arg1 width) sv-32) + (set! (-> arg1 height) sv-36) + (if (zero? arg2) + (draw-decoration-load-save obj arg1 sv-16 (if (= (-> arg0 current) 'select-load) + (text-id progress-select-file-to-load) + (text-id progress-select-file-to-save) + ) + ) + ) + ) + ) + 0 + (none) + ) + + +(defmethod draw-option menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (s2-0 (the int (+ -1.0 (-> arg1 origin y)))) + (s1-0 22) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (set-scale! arg1 0.6) + (cond + ((= *title* (-> arg0 current-options)) + (set-scale! arg1 0.85) + (set! (-> arg1 height) 40.0) + (set! s1-0 36) + (+! s2-0 -8) + (when (memcard-unlocked-secrets? #f) + (+! (-> arg1 origin y) -35.0) + (set! s1-0 36) + (+! s2-0 -34) + ) + ) + ((= *options* (-> arg0 current-options)) + (+! (-> arg1 origin y) -20.0) + (set-scale! arg1 0.85) + (set! (-> arg1 height) 40.0) + (set! s1-0 37) + (+! s2-0 -28) + ) + ) + (when (nonzero? (-> obj name)) + (let ((s0-0 arg1)) + (set! (-> s0-0 color) (if (= arg2 (-> arg0 option-index)) + (the-as font-color (the-as int (progress-selected 0))) + (font-color progress) + ) + ) + ) + (cond + ((= arg2 (-> arg0 option-index)) + (set-color! arg1 (progress-selected 0)) + ) + (else + (set-color! arg1 (font-color progress)) + ) + ) + (if (and (and (= arg2 (-> arg0 option-index)) (!= 298 (-> obj name))) + (not (and (= (-> obj name) (text-id progress-root-secrets)) + (= *title* (-> arg0 current-options)) + (not (memcard-unlocked-secrets? #f)) + (= (-> arg0 option-index) 3) + ) + ) + ) + (draw-highlight s2-0 s1-0 f30-0) + ) + (cond + ((= *save-options-title* (-> arg0 current-options)) + (cond + ((= (-> obj name) (text-id progress-continue-without-saving)) + (cond + ((= arg2 (-> arg0 option-index)) + (set-scale! arg1 0.5) + ) + (else + (set-scale! arg1 0.45) + ) + ) + (+! (-> arg1 origin y) -120.0) + (if (not (-> *pc-settings* use-vis?)) + (-! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 10)) + (-! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 10 + 5 + )))) + (set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 180 + 170 + ) + ) + ) + (set! (-> arg1 height) 260.0) + (if (not (-> *pc-settings* use-vis?)) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress)) + (when (= arg2 (-> arg0 option-index)) + (let ((s4-1 69) + (s2-4 110) + (s3-1 176) + (s1-1 42) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! s4-1 79) + (set! s2-4 110) + (set! s3-1 166) + (set! s1-1 42) + (with-dma-buffer-add-bucket ((sv-16 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw-sprite2d-xy + sv-16 + s4-1 + (+ (* s1-1 arg2) 8 s1-1 s2-4) + s3-1 + (+ s1-1 -8) + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 f30-0))) + ) + ) + ) + ) + (when (not (-> *pc-settings* use-vis?)) + (set! s4-1 (adjust-game-x (the float s4-1))) + (set! s3-1 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-1))) + ) + (set-vector! (-> obj box 0 color) 64 128 128 (the int (* 128.0 f30-0))) + (draw-savegame-box + obj + (the float s4-1) + (the float (+ s4-1 s3-1)) + (the float (+ s2-4 (* s1-1 arg2))) + (the float (+ s2-4 (* s1-1 arg2))) + ) + (draw-savegame-box + obj + (the float (+ s4-1 s3-1)) + (the float (+ s4-1 s3-1)) + (the float s2-4) + (the float (+ s2-4 (* s1-1 arg2))) + ) + (with-dma-buffer-add-bucket ((s0-3 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id particles) + ) + (draw-sprite2d-xy + s0-3 + s4-1 + (+ s2-4 (* s1-1 arg2)) + s3-1 + (+ s1-1 8) + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 f30-0))) + ) + ) + ) + ) + ) + (else + (if (not (-> *pc-settings* use-vis?)) + (+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -100.0)) + (+! (-> arg1 origin x) -100.0)) + (set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y))) + ) + ) + ) + ((= *load-save-options* (-> arg0 current-options)) + (+! (-> arg1 origin x) -100.0) + (+! (-> arg1 origin y) -25.0) + (print-menu-text (lookup-text! *common-text* (-> obj name) #f) (-> obj scale) arg1 arg0) + ) + ((and (= *title* (-> arg0 current-options)) + (= (text-id progress-root-secrets) (-> obj name)) + (memcard-unlocked-secrets? #f) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress)) + ) + ((!= (-> obj name) (text-id progress-root-secrets)) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress)) + ) + ) + ) + ) + 0 + (none) + ) + + + +(defmethod draw-option menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (set-color! arg1 (font-color progress)) + (set-scale! arg1 0.5) + (set! (-> *bigmap* auto-save-icon-flag) #t) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x48 :page #x67a))) + (set! (-> obj sprites 0 scale-x) 1.0) + (set! (-> obj sprites 0 scale-y) 1.0) + (let ((v1-6 (-> obj sprites 0 color2))) + (set! (-> v1-6 0) 128) + (set! (-> v1-6 1) 128) + (set! (-> v1-6 2) 128) + (set! (-> v1-6 3) (the int (* 128.0 (- 1.0 (-> arg0 menu-transition))))) + ) + (set! (-> obj sprites 0 pos z) #xffffff) + (set! (-> obj sprites 0 pos w) 0) + (set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) (adjust-x-if-needed 240) 160) + (with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (bucket-id progress) + ) + (draw (-> obj sprites 0) s3-0 (-> *level* default-level)) + ) + (set-flags! arg1 (font-flags kerning middle left large)) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 80.0) + (set-width! arg1 330) + (set-height! arg1 85) + (when (not (-> *pc-settings* use-vis?)) + (set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))) + (*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)) + ) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-explanation) #f) + arg1 + #f + 44 + (bucket-id progress) + ) + (+! (-> arg1 origin y) 115.0) + (set-height! arg1 95) + (print-game-text + (lookup-text! *common-text* (text-id progress-autosave-dont-remove) #f) + arg1 + #f + 44 + (bucket-id progress) + ) + (+! (-> arg1 origin y) 90.0) + (set-height! arg1 50) + (set-color! arg1 (progress-selected 0)) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text + (lookup-text! *common-text* (text-id progress-unknown-continue) #f) + arg1 + #f + 44 + (bucket-id progress) + ) + 0 + (none) + ) + + diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc index fbb8392629..433ca27f54 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc @@ -1319,64 +1319,64 @@ ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-01 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303600))) + (let ((tex (new 'static 'texture-id :index #x36 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304800)) + (set! tex (new 'static 'texture-id :index #x48 :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304000)) + (set! tex (new 'static 'texture-id :index #x40 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307000)) + (set! tex (new 'static 'texture-id :index #x70 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305800)) + (set! tex (new 'static 'texture-id :index #x58 :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306800)) + (set! tex (new 'static 'texture-id :index #x68 :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307400)) + (set! tex (new 'static 'texture-id :index #x74 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303600)) + (set! tex (new 'static 'texture-id :index #x36 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306c00)) + (set! tex (new 'static 'texture-id :index #x6c :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305c00)) + (set! tex (new 'static 'texture-id :index #x5c :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305400)) + (set! tex (new 'static 'texture-id :index #x54 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305000)) + (set! tex (new 'static 'texture-id :index #x50 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306400)) + (set! tex (new 'static 'texture-id :index #x64 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307800)) + (set! tex (new 'static 'texture-id :index #x78 :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304c00)) + (set! tex (new 'static 'texture-id :index #x4c :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303a00)) + (set! tex (new 'static 'texture-id :index #x3a :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307c00)) + (set! tex (new 'static 'texture-id :index #x7c :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304400)) + (set! tex (new 'static 'texture-id :index #x44 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306000)) + (set! tex (new 'static 'texture-id :index #x60 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) @@ -1384,64 +1384,64 @@ ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-02 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303700))) + (let ((tex (new 'static 'texture-id :index #x37 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304900)) + (set! tex (new 'static 'texture-id :index #x49 :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304100)) + (set! tex (new 'static 'texture-id :index #x41 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307100)) + (set! tex (new 'static 'texture-id :index #x71 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305900)) + (set! tex (new 'static 'texture-id :index #x59 :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306900)) + (set! tex (new 'static 'texture-id :index #x69 :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307500)) + (set! tex (new 'static 'texture-id :index #x75 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303700)) + (set! tex (new 'static 'texture-id :index #x37 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306d00)) + (set! tex (new 'static 'texture-id :index #x6d :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305d00)) + (set! tex (new 'static 'texture-id :index #x5d :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305500)) + (set! tex (new 'static 'texture-id :index #x55 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305100)) + (set! tex (new 'static 'texture-id :index #x51 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306500)) + (set! tex (new 'static 'texture-id :index #x65 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307900)) + (set! tex (new 'static 'texture-id :index #x79 :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304d00)) + (set! tex (new 'static 'texture-id :index #x4d :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303b00)) + (set! tex (new 'static 'texture-id :index #x3b :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307d00)) + (set! tex (new 'static 'texture-id :index #x7d :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304500)) + (set! tex (new 'static 'texture-id :index #x45 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306100)) + (set! tex (new 'static 'texture-id :index #x61 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) @@ -1449,64 +1449,64 @@ ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-03 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303800))) + (let ((tex (new 'static 'texture-id :index #x38 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304a00)) + (set! tex (new 'static 'texture-id :index #x4a :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304200)) + (set! tex (new 'static 'texture-id :index #x42 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307200)) + (set! tex (new 'static 'texture-id :index #x72 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305a00)) + (set! tex (new 'static 'texture-id :index #x5a :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306a00)) + (set! tex (new 'static 'texture-id :index #x6a :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307600)) + (set! tex (new 'static 'texture-id :index #x76 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303800)) + (set! tex (new 'static 'texture-id :index #x38 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306e00)) + (set! tex (new 'static 'texture-id :index #x6e :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305e00)) + (set! tex (new 'static 'texture-id :index #x5e :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305600)) + (set! tex (new 'static 'texture-id :index #x56 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305200)) + (set! tex (new 'static 'texture-id :index #x52 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306600)) + (set! tex (new 'static 'texture-id :index #x66 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307a00)) + (set! tex (new 'static 'texture-id :index #x7a :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304e00)) + (set! tex (new 'static 'texture-id :index #x4e :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303c00)) + (set! tex (new 'static 'texture-id :index #x3c :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307e00)) + (set! tex (new 'static 'texture-id :index #x7e :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304600)) + (set! tex (new 'static 'texture-id :index #x46 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306200)) + (set! tex (new 'static 'texture-id :index #x62 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) @@ -1514,77 +1514,77 @@ ;; WARN: Return type mismatch uint vs texture-id. (defun get-level-icon-id-04 ((arg0 int)) "TODO - Icon id enum perhaps?" - (let ((v0-0 (the-as uint #xc9303900))) + (let ((tex (new 'static 'texture-id :index #x39 :page #xc93))) (cond ((zero? arg0) - (set! v0-0 (the-as uint #xc9304b00)) + (set! tex (new 'static 'texture-id :index #x4b :page #xc93)) ) ((= arg0 1) - (set! v0-0 (the-as uint #xc9304300)) + (set! tex (new 'static 'texture-id :index #x43 :page #xc93)) ) ((= arg0 2) - (set! v0-0 (the-as uint #xc9307300)) + (set! tex (new 'static 'texture-id :index #x73 :page #xc93)) ) ((= arg0 3) - (set! v0-0 (the-as uint #xc9305b00)) + (set! tex (new 'static 'texture-id :index #x5b :page #xc93)) ) ((= arg0 4) - (set! v0-0 (the-as uint #xc9306b00)) + (set! tex (new 'static 'texture-id :index #x6b :page #xc93)) ) ((= arg0 5) - (set! v0-0 (the-as uint #xc9307700)) + (set! tex (new 'static 'texture-id :index #x77 :page #xc93)) ) ((= arg0 6) - (set! v0-0 (the-as uint #xc9303900)) + (set! tex (new 'static 'texture-id :index #x39 :page #xc93)) ) ((= arg0 7) - (set! v0-0 (the-as uint #xc9306f00)) + (set! tex (new 'static 'texture-id :index #x6f :page #xc93)) ) ((= arg0 8) - (set! v0-0 (the-as uint #xc9305f00)) + (set! tex (new 'static 'texture-id :index #x5f :page #xc93)) ) ((= arg0 9) - (set! v0-0 (the-as uint #xc9305700)) + (set! tex (new 'static 'texture-id :index #x57 :page #xc93)) ) ((= arg0 10) - (set! v0-0 (the-as uint #xc9305300)) + (set! tex (new 'static 'texture-id :index #x53 :page #xc93)) ) ((= arg0 11) - (set! v0-0 (the-as uint #xc9306700)) + (set! tex (new 'static 'texture-id :index #x67 :page #xc93)) ) ((= arg0 12) - (set! v0-0 (the-as uint #xc9307b00)) + (set! tex (new 'static 'texture-id :index #x7b :page #xc93)) ) ((= arg0 13) - (set! v0-0 (the-as uint #xc9304f00)) + (set! tex (new 'static 'texture-id :index #x4f :page #xc93)) ) ((= arg0 14) - (set! v0-0 (the-as uint #xc9303d00)) + (set! tex (new 'static 'texture-id :index #x3d :page #xc93)) ) ((= arg0 15) - (set! v0-0 (the-as uint #xc9307f00)) + (set! tex (new 'static 'texture-id :index #x7f :page #xc93)) ) ((= arg0 16) - (set! v0-0 (the-as uint #xc9304700)) + (set! tex (new 'static 'texture-id :index #x47 :page #xc93)) ) ((= arg0 17) - (set! v0-0 (the-as uint #xc9306300)) + (set! tex (new 'static 'texture-id :index #x63 :page #xc93)) ) ) - (the-as texture-id v0-0) + (the-as texture-id tex) ) ) ;; definition for function draw-decoration ;; INFO: Used lq/sq -(defun draw-decoration ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 int) (arg4 symbol) (arg5 float)) +(defun draw-decoration ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id) (arg4 symbol) (arg5 float)) (local-vars (sv-16 symbol) (sv-32 float) (sv-48 int) (sv-64 int) (sv-80 (function string font-context symbol int bucket-id float)) - (sv-96 int) + (sv-96 text-id) ) (set! sv-96 arg3) (set! sv-16 arg4) @@ -1652,7 +1652,7 @@ (let* ((a0-3 *common-text*) (t9-2 (method-of-object a0-3 lookup-text!)) (a2-1 #f) - (a0-4 (t9-2 a0-3 (the-as text-id sv-96) a2-1)) + (a0-4 (t9-2 a0-3 sv-96 a2-1)) (a1-2 arg1) (a2-2 #f) (a3-1 44) @@ -1765,12 +1765,12 @@ ;; definition for function draw-sound-options-decoration ;; INFO: Used lq/sq -(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 symbol) (arg4 text-id)) +(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 text-id) (arg4 symbol)) (local-vars (sv-16 font-context) (sv-32 int) (sv-48 (function string font-context symbol int bucket-id float)) - (sv-64 symbol) + (sv-64 text-id) ) (set! sv-16 arg1) (let ((s2-0 arg2)) @@ -1815,7 +1815,7 @@ (let* ((a0-4 *common-text*) (t9-1 (method-of-object a0-4 lookup-text!)) (a2-1 #f) - (a0-5 (t9-1 a0-4 (the-as text-id sv-64) a2-1)) + (a0-5 (t9-1 a0-4 sv-64 a2-1)) (a1-2 sv-16) (a2-2 #f) (a3-1 44) @@ -1931,12 +1931,12 @@ ;; definition for function draw-decoration-load-save ;; INFO: Used lq/sq -(defun draw-decoration-load-save ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 int)) +(defun draw-decoration-load-save ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id)) (local-vars (sv-16 int) (sv-32 int) (sv-48 (function string font-context symbol int bucket-id float)) - (sv-64 int) + (sv-64 text-id) (sv-80 font-context) ) (set! sv-80 arg1) @@ -1995,7 +1995,7 @@ (let* ((a0-8 *common-text*) (t9-1 (method-of-object a0-8 lookup-text!)) (a2-1 #f) - (a0-9 (t9-1 a0-8 (the-as text-id sv-64) a2-1)) + (a0-9 (t9-1 a0-8 sv-64 a2-1)) (a2-2 #f) (a3-1 44) (t0-0 320) @@ -2545,8 +2545,8 @@ (set! (-> arg1 height) sv-36) (if (zero? arg2) (draw-decoration-load-save obj arg1 sv-16 (if (= (-> arg0 current) 'select-load) - 300 - 299 + (text-id progress-select-file-to-load) + (text-id progress-select-file-to-save) ) ) ) @@ -2729,7 +2729,7 @@ (set! (-> v1-7 height) (the float 60)) ) (let ((s5-0 409)) - (progress-method-28 arg0 'select-save) + (get-state-check-card arg0 'select-save) (let ((s4-0 print-game-text)) (format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f) 1) (s4-0 *temp-string* arg1 #f 44 (bucket-id progress)) @@ -3669,8 +3669,8 @@ (if (or (= (-> *setting-control* user-default language) (language-enum french)) (= (-> *setting-control* user-default language) (language-enum spanish)) ) - (draw-decoration obj arg1 f30-0 a3-1 #t 0.7) - (draw-decoration obj arg1 f30-0 a3-1 #t 0.95) + (draw-decoration obj arg1 f30-0 (the-as text-id a3-1) #t 0.7) + (draw-decoration obj arg1 f30-0 (the-as text-id a3-1) #t 0.95) ) ) (begin-scissor-level sv-128) @@ -3846,8 +3846,8 @@ (if (or (= (-> *setting-control* user-default language) (language-enum french)) (= (-> *setting-control* user-default language) (language-enum spanish)) ) - (draw-decoration obj arg1 f30-0 364 #t 0.7) - (draw-decoration obj arg1 f30-0 364 #t 0.95) + (draw-decoration obj arg1 f30-0 (text-id progress-select-scene) #t 0.7) + (draw-decoration obj arg1 f30-0 (text-id progress-select-scene) #t 0.95) ) (begin-scissor-scene s1-0) (let ((v1-23 arg1)) @@ -5093,15 +5093,15 @@ ;; definition of type print-highscore-obj (deftype print-highscore-obj (basic) - ((self texture-page :offset-assert 4) - (index int32 :offset-assert 8) - (previous texture-page :offset-assert 12) - (place int32 :offset-assert 16) - (score float :offset-assert 20) - (game-score basic :offset-assert 24) - (context font-context :offset-assert 28) - (local-scale float :offset-assert 32) - (interp float :offset-assert 36) + ((self menu-highscores-option :offset-assert 4) + (index int32 :offset-assert 8) + (previous symbol :offset-assert 12) + (place int32 :offset-assert 16) + (score float :offset-assert 20) + (game-score symbol :offset-assert 24) + (context font-context :offset-assert 28) + (local-scale float :offset-assert 32) + (interp float :offset-assert 36) ) :method-count-assert 9 :size-assert #x28 @@ -5142,7 +5142,7 @@ ) ;; definition for function draw-highscore-cup -(defun draw-highscore-cup ((arg0 texture-page) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float)) +(defun draw-highscore-cup ((arg0 menu-highscores-option) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float)) "First int is an enum" (let ((a0-1 (the-as uint #xc9300300))) (case arg1 @@ -5157,23 +5157,23 @@ ) ) (when (nonzero? arg1) - (set! (-> arg0 pad 11) (the-as uint 4)) - (let ((v1-10 (&-> arg0 pad 7))) - (set! (-> v1-10 0) (the-as uint 128)) - (set! (-> v1-10 1) (the-as uint 128)) - (set! (-> v1-10 2) (the-as uint 128)) - (set! (-> v1-10 3) (the-as uint (the int (* 128.0 arg5)))) + (set! (-> arg0 sprites 0 flags) (the-as uint 4)) + (let ((v1-10 (-> arg0 sprites 0 color2))) + (set! (-> v1-10 0) 128) + (set! (-> v1-10 1) 128) + (set! (-> v1-10 2) 128) + (set! (-> v1-10 3) (the int (* 128.0 arg5))) ) - (set! (-> arg0 pad 5) (the-as uint #xffffff)) - (set! (-> arg0 pad 6) (the-as uint 0)) - (set! (-> arg0 data 0) (lookup-texture-by-id (the-as texture-id a0-1))) - (set! (-> arg0 pad 12) (the-as uint arg4)) - (set! (-> arg0 pad 13) (the-as uint arg4)) - (set-hud-piece-position! (the-as hud-sprite (&-> arg0 pad 3)) arg2 arg3) + (set! (-> arg0 sprites 0 pos z) #xffffff) + (set! (-> arg0 sprites 0 pos w) 0) + (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id a0-1))) + (set! (-> arg0 sprites 0 scale-x) arg4) + (set! (-> arg0 sprites 0 scale-y) arg4) + (set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3) (with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) (bucket-id progress) ) - ((method-of-type hud-sprite draw) (the-as hud-sprite (&-> arg0 pad 3)) s4-1 (-> *level* default-level)) + ((method-of-type hud-sprite draw) (the-as hud-sprite (-> arg0 sprites)) s4-1 (-> *level* default-level)) ) ) ) @@ -6126,8 +6126,8 @@ (set! (-> sv-144 sprites 0 pos z) #xfffff0) (set! (-> sv-144 sprites 0 pos w) 0) (if (= (-> *setting-control* user-default language) (language-enum spanish)) - (draw-decoration sv-144 sv-140 sv-96 310 #t 0.8) - (draw-decoration sv-144 sv-140 sv-96 310 #t 0.95) + (draw-decoration sv-144 sv-140 sv-96 (text-id progress-root-highscores) #t 0.8) + (draw-decoration sv-144 sv-140 sv-96 (text-id progress-root-highscores) #t 0.95) ) (let ((v1-39 sv-140)) (set! (-> v1-39 scale) 0.6) @@ -6212,10 +6212,10 @@ (let ((gp-5 (get-game-score-ref *game-info* (get-highscore-score (-> sv-144 page-index))))) (set! (-> sv-116 index) (-> sv-144 page-index)) (set! (-> sv-116 previous) #f) - (set! (-> sv-116 self) (the-as texture-page sv-144)) + (set! (-> sv-116 self) sv-144) (case (get-highscore-type (-> sv-144 page-index)) (('game) - (set! (-> sv-116 game-score) (the-as basic #t)) + (set! (-> sv-116 game-score) #t) ) (('race) (set! (-> sv-116 game-score) #f) @@ -6326,11 +6326,11 @@ (when (< 1 (get-num-highscores)) (let ((gp-11 (get-game-score-ref *game-info* (get-highscore-score (-> sv-144 prev-page-index))))) (set! (-> sv-116 index) (-> sv-144 prev-page-index)) - (set! (-> sv-116 previous) (the-as texture-page #t)) - (set! (-> sv-116 self) (the-as texture-page sv-144)) + (set! (-> sv-116 previous) #t) + (set! (-> sv-116 self) sv-144) (case (get-highscore-type (-> sv-144 prev-page-index)) (('game) - (set! (-> sv-116 game-score) (the-as basic #t)) + (set! (-> sv-116 game-score) #t) ) (('race) (set! (-> sv-116 game-score) #f) @@ -6833,8 +6833,8 @@ (set! (-> a1-1 flags) (font-flags kerning middle large)) ) (if (= (-> *setting-control* user-default language) (language-enum spanish)) - (draw-decoration obj arg1 f0-1 283 #f 0.85) - (draw-decoration obj arg1 f0-1 283 #f 0.95) + (draw-decoration obj arg1 f0-1 (text-id progress-root-game-options) #f 0.85) + (draw-decoration obj arg1 f0-1 (text-id progress-root-game-options) #f 0.95) ) ) 0 @@ -6942,7 +6942,7 @@ ) (print-menu-text a0-12 (-> obj scale) arg1 arg0) ) - (draw-decoration obj arg1 f30-0 284 #f 0.95) + (draw-decoration obj arg1 f30-0 (text-id progress-root-graphic-options) #f 0.95) ) 0 (none) @@ -7290,13 +7290,13 @@ (print-game-text a0-12 arg1 #f 44 (bucket-id progress)) (cond ((= (-> *setting-control* user-default language) (language-enum french)) - (draw-decoration obj arg1 f30-0 371 #f 0.8) + (draw-decoration obj arg1 f30-0 (text-id progress-restart-quit) #f 0.8) ) ((= (-> *setting-control* user-default language) (language-enum german)) - (draw-decoration obj arg1 f30-0 371 #f 0.7) + (draw-decoration obj arg1 f30-0 (text-id progress-restart-quit) #f 0.7) ) (else - (draw-decoration obj arg1 f30-0 371 #f 0.95) + (draw-decoration obj arg1 f30-0 (text-id progress-restart-quit) #f 0.95) ) ) ) @@ -7666,7 +7666,7 @@ ) ) (if (zero? gp-0) - (draw-sound-options-decoration obj s5-0 f30-0 (the-as symbol 285) (the-as text-id #f)) + (draw-sound-options-decoration obj s5-0 f30-0 (text-id progress-root-sound-options) #f) ) ) ) @@ -7986,3 +7986,7 @@ 0 (none) ) + + + + diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc index e866657162..cd31d460f4 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-h_REF.gc @@ -39,12 +39,12 @@ (go-away () _type_ :state 22) (gone () _type_ :state 23) (init-defaults (_type_) connection 24) - (progress-method-25 (_type_) none 25) - (is-gone (_type_) object 26) + (respond-to-cpad (_type_) none 25) + (gone? (_type_) object 26) (can-go-back? (_type_) symbol 27) - (progress-method-28 (_type_ symbol) symbol 28) - (progress-method-29 (_type_) int 29) - (progress-method-30 (_type_) int 30) + (get-state-check-card (_type_ symbol) symbol 28) + (push-state (_type_) int 29) + (pop-state (_type_) int 30) (set-next-state (_type_ symbol int) int 31) (set-menu-options (_type_ symbol) int 32) ) @@ -100,7 +100,7 @@ :size-assert #x30 :flag-assert #xc00000030 (:methods - (respond-progress (_type_ progress object) int :behavior progress 9) + (respond-progress (_type_ progress symbol) int :behavior progress 9) (draw-option (_type_ progress font-context int symbol) none 10) (menu-option-method-11 () none 11) ) diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc index fff489cf2e..eaefaad44f 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc @@ -576,7 +576,7 @@ ) ;; definition for method 26 of type progress -(defmethod is-gone progress ((obj progress)) +(defmethod gone? progress ((obj progress)) (and *progress-process* (-> *progress-process* 0 next-state) (= (-> *progress-process* 0 next-state name) 'gone) @@ -670,7 +670,7 @@ ) ;; definition for method 28 of type progress -(defmethod progress-method-28 progress ((obj progress) (arg0 symbol)) +(defmethod get-state-check-card progress ((obj progress) (arg0 symbol)) (let ((v1-0 *progress-save-info*) (v0-0 arg0) ) @@ -768,7 +768,7 @@ ) ;; definition for method 29 of type progress -(defmethod progress-method-29 progress ((obj progress)) +(defmethod push-state progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond ((< v1-0 5) @@ -785,7 +785,7 @@ ) ;; definition for method 30 of type progress -(defmethod progress-method-30 progress ((obj progress)) +(defmethod pop-state progress ((obj progress)) (let ((v1-0 (-> obj state-pos))) (cond ((> v1-0 0) @@ -819,7 +819,7 @@ (set! (-> obj next) arg0) (case (-> obj next) (('select-load 'select-save 'select-save-title 'select-save-title-hero) - (set! (-> obj next) (progress-method-28 obj (-> obj next))) + (set! (-> obj next) (get-state-check-card obj (-> obj next))) ) ) (case (-> obj next) @@ -1058,14 +1058,14 @@ ) (when (= (-> obj current-options) #f) (format #t "Didn't find new menu settings!!~%") - (progress-method-30 obj) + (pop-state obj) ) 0 ) ;; definition for method 25 of type progress ;; WARN: Return type mismatch int vs none. -(defmethod progress-method-25 progress ((obj progress)) +(defmethod respond-to-cpad progress ((obj progress)) (mc-get-slot-info 0 *progress-save-info*) (when (-> obj current-options) (let ((s5-0 (-> obj current-options options))) @@ -1147,7 +1147,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 obj) + (pop-state obj) ) ) ) @@ -1217,7 +1217,7 @@ ) ) (if (= (-> self ring-angle) (-> self ring-want-angle)) - (progress-method-25 self) + (respond-to-cpad self) ) (let ((f30-0 (* 0.005 (-> self clock time-adjust-ratio)))) (cond @@ -1640,7 +1640,7 @@ ) ) (else - (progress-method-30 self) + (pop-state self) ) ) ) @@ -1833,13 +1833,13 @@ ) ;; definition for method 9 of type menu-option -(defmethod respond-progress menu-option ((obj menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-option ((obj menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." 0 ) ;; definition for method 9 of type menu-on-off-option -(defmethod respond-progress menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* on-off-choice)) (gp-0 #f) @@ -1866,7 +1866,7 @@ ((and (-> v1-1 0) (= (-> obj value-to-modify) (&-> *setting-control* user-default use-progressive-scan))) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'progressive-mode-warning 0) ) (else @@ -1890,7 +1890,7 @@ ) ;; definition for method 9 of type menu-yes-no-option -(defmethod respond-progress menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -1932,7 +1932,7 @@ ) ;; definition for method 9 of type menu-slider-option -(defmethod respond-progress menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) (let ((gp-0 (-> obj value-to-modify)) @@ -2015,7 +2015,7 @@ ) ;; definition for method 9 of type menu-stereo-mode-sound-option -(defmethod respond-progress menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (-> *bigmap* progress-minimap) (let ((a0-1 (-> *setting-control* user-default stereo-mode)) @@ -2054,7 +2054,7 @@ ) ;; definition for method 9 of type menu-main-menu-option -(defmethod respond-progress menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (cond ((cpad-pressed? 0 start) @@ -2094,20 +2094,20 @@ ) ) (sound-play "window-expand") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 (-> obj next-state) 0) ) ((= (-> obj next-state) 'back) - (progress-method-30 arg0) + (pop-state arg0) ) ((= (-> obj next-state) 'restart) (sound-volume-off) (restart-mission) - (progress-method-30 arg0) + (pop-state arg0) ) (else (sound-play "window-expand") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 (-> obj next-state) 0) ) ) @@ -2150,7 +2150,7 @@ ) ;; definition for method 9 of type menu-sub-menu-option -(defmethod respond-progress menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (and (-> *progress-state* secrets-unlocked) (not (memcard-unlocked-secrets? #f)) @@ -2166,7 +2166,7 @@ (set-next-state arg0 'secrets-insufficient-space 0) ) (when (= (-> obj name) (text-id progress-continue-without-saving)) - (let ((a1-3 (progress-method-28 arg0 (-> arg0 current)))) + (let ((a1-3 (get-state-check-card arg0 (-> arg0 current)))) (set-next-state arg0 a1-3 0) ) ) @@ -2198,11 +2198,11 @@ (progress-intro-start (logtest? (-> *game-info* purchase-secrets) (game-secrets hero-mode))) ) ((= (-> obj next-state) 'back) - (progress-method-30 arg0) + (pop-state arg0) ) (else (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 (-> obj next-state) 0) ) ) @@ -2211,7 +2211,7 @@ ) ;; definition for method 9 of type menu-unlocked-menu-option -(defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (memcard-unlocked-secrets? #t))) (logclear! (-> *game-info* purchase-secrets) (game-secrets hero-mode)) @@ -2277,7 +2277,7 @@ ) (set! (-> *progress-state* scene-player-act) 1) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-scene 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-sceneplayer-2)) @@ -2285,7 +2285,7 @@ ) (set! (-> *progress-state* scene-player-act) 2) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-scene 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-sceneplayer-3)) @@ -2293,23 +2293,23 @@ ) (set! (-> *progress-state* scene-player-act) 3) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-scene 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-hero-mode)) (logtest? s4-0 (game-secrets hero-mode))) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-save-title-hero 0) ) ((and (= (-> obj name) (text-id progress-main-secrets-levelselect)) (logtest? s4-0 (game-secrets level-select)) ) (sound-play "generic-beep") - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'select-start 0) ) ((= (-> obj next-state) 'back) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2349,10 +2349,10 @@ ) ;; definition for method 9 of type menu-memcard-slot-option -(defmethod respond-progress menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (memcard-unlocked-secrets? #t) - (let ((a1-2 (progress-method-28 arg0 (-> arg0 current)))) + (let ((a1-2 (get-state-check-card arg0 (-> arg0 current)))) (set-next-state arg0 a1-2 0) ) (set! (-> arg0 selected-option) #f) @@ -2395,10 +2395,10 @@ ) ;; definition for method 9 of type menu-already-exists-option -(defmethod respond-progress menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-already-exists-option ((obj menu-already-exists-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) - (a1-2 (progress-method-28 arg0 'select-save)) + (a1-2 (get-state-check-card arg0 'select-save)) (gp-0 #f) ) (if (!= a1-2 'select-save) @@ -2438,12 +2438,12 @@ ) ;; definition for method 9 of type menu-create-game-option -(defmethod respond-progress menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-create-game-option ((obj menu-create-game-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) (gp-0 #f) ) - (let ((a1-2 (progress-method-28 arg0 'select-save))) + (let ((a1-2 (get-state-check-card arg0 'select-save))) (if (!= a1-2 'select-save) (set-next-state arg0 a1-2 0) ) @@ -2471,7 +2471,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2484,10 +2484,10 @@ ) ;; definition for method 9 of type menu-insufficient-space-option -(defmethod respond-progress menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s5-0 (&-> *progress-state* yes-no-choice)) - (s3-0 (progress-method-28 arg0 'select-save)) + (s3-0 (get-state-check-card arg0 'select-save)) ) (cond ((or (= (-> *progress-state* starting-state) 'insufficient-space) @@ -2513,13 +2513,13 @@ (cond ((-> s5-0 0) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ((and (not (-> s5-0 0)) - (!= (progress-method-28 arg0 'select-save) 'insufficient-space) - (!= (progress-method-28 arg0 'select-save) 'no-memory-card) + (!= (get-state-check-card arg0 'select-save) 'insufficient-space) + (!= (get-state-check-card arg0 'select-save) 'no-memory-card) ) - (progress-method-30 arg0) + (pop-state arg0) ) (else (sound-play "generic-beep") @@ -2546,7 +2546,7 @@ (set! a1-9 'select-save-title) ) ) - (let ((a1-10 (progress-method-28 arg0 a1-9))) + (let ((a1-10 (get-state-check-card arg0 a1-9))) (set-next-state arg0 a1-10 0) ) ) @@ -2568,7 +2568,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2580,7 +2580,7 @@ ) ;; definition for method 9 of type menu-secrets-insufficient-space-option -(defmethod respond-progress menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (&-> *progress-state* yes-no-choice) (cond @@ -2599,7 +2599,7 @@ ) ;; definition for method 9 of type menu-video-mode-warning-option -(defmethod respond-progress menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-video-mode-warning-option ((obj menu-video-mode-warning-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -2625,7 +2625,7 @@ ) (else (set! (-> *progress-state* video-mode-choice) 'pal) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2638,7 +2638,7 @@ ) ;; definition for method 9 of type menu-video-mode-ok-option -(defmethod respond-progress menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-video-mode-ok-option ((obj menu-video-mode-ok-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (s5-0 #f) @@ -2666,7 +2666,7 @@ ) ) (set! (-> *progress-state* video-mode-timeout) 0) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -2679,13 +2679,13 @@ (set! (-> *progress-state* video-mode-timeout) 0) (set! (-> *progress-state* video-mode-choice) 'pal) (set! (-> *setting-control* user-default video-mode) (-> *progress-state* video-mode-choice)) - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-progressive-mode-warning-option -(defmethod respond-progress menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-progressive-mode-warning-option ((obj menu-progressive-mode-warning-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -2718,7 +2718,7 @@ (set! (-> *progress-state* on-off-choice) #f) (set! (-> *progress-state* graphic-options-progressive-scan) #f) (set-progressive-scan #f) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2731,7 +2731,7 @@ ) ;; definition for method 9 of type menu-progressive-mode-ok-option -(defmethod respond-progress menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-progressive-mode-ok-option ((obj menu-progressive-mode-ok-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (s5-0 #f) @@ -2760,7 +2760,7 @@ ) ) (set! (-> *progress-state* progressive-mode-timeout) 0) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -2774,105 +2774,105 @@ (set! (-> *setting-control* user-default use-progressive-scan) #f) (set! (-> *progress-state* graphic-options-progressive-scan) #f) (set-progressive-scan #f) - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-card-removed-option -(defmethod respond-progress menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-insert-card-option -(defmethod respond-progress menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." *progress-save-info* (cond - ((= (progress-method-28 arg0 'select-load) 'select-load) + ((= (get-state-check-card arg0 'select-load) 'select-load) (set-next-state arg0 'select-load 0) ) ((cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) 0 ) ;; definition for method 9 of type menu-error-loading-option -(defmethod respond-progress menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-error-auto-saving-option -(defmethod respond-progress menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-error-disc-removed-option -(defmethod respond-progress menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-disc-removed-option ((obj menu-error-disc-removed-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (when (is-cd-in?) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) 0 ) ;; definition for method 9 of type menu-error-reading-option -(defmethod respond-progress menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-error-reading-option ((obj menu-error-reading-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-icon-info-option -(defmethod respond-progress menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (when (cpad-pressed? 0 confirm) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) 0 ) ;; definition for method 9 of type menu-quit-option -(defmethod respond-progress menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-quit-option ((obj menu-quit-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((v1-1 (&-> *progress-state* yes-no-choice)) (gp-0 #f) @@ -2904,7 +2904,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2917,12 +2917,12 @@ ) ;; definition for method 9 of type menu-format-card-option -(defmethod respond-progress menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-format-card-option ((obj menu-format-card-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let ((s4-0 (&-> *progress-state* yes-no-choice)) (gp-0 #f) ) - (let ((a1-2 (progress-method-28 arg0 (-> arg0 current)))) + (let ((a1-2 (get-state-check-card arg0 (-> arg0 current)))) (set-next-state arg0 a1-2 0) ) (cond @@ -2949,7 +2949,7 @@ ) (else (sound-play "generic-beep") - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -2963,7 +2963,7 @@ ;; definition for method 9 of type menu-select-start-option ;; WARN: disable def twice: 110. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare. -(defmethod respond-progress menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease (-> arg0 sliding-height) @@ -3059,7 +3059,7 @@ ) ;; definition for method 9 of type menu-select-scene-option -(defmethod respond-progress menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-select-scene-option ((obj menu-select-scene-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease (-> arg0 sliding-height) @@ -3135,7 +3135,7 @@ ) ;; definition for method 9 of type menu-bigmap-option -(defmethod respond-progress menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (bigmap-method-12 *bigmap*) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) @@ -3144,7 +3144,7 @@ ) ;; definition for method 9 of type menu-missions-option -(defmethod respond-progress menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding-height) (seek-ease (-> arg0 sliding-height) @@ -3183,7 +3183,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -3194,7 +3194,7 @@ ) ;; definition for method 9 of type menu-highscores-option -(defmethod respond-progress menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (set! (-> arg0 sliding) (seek-ease (-> arg0 sliding) @@ -3252,7 +3252,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-0 @@ -3264,7 +3264,7 @@ ) ;; definition for method 9 of type menu-secret-option -(defmethod respond-progress menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (let* ((s5-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) (s3-0 (if (not s5-1) @@ -3366,7 +3366,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) (if s5-2 @@ -3383,7 +3383,7 @@ ) ;; definition for method 9 of type menu-game-option -(defmethod respond-progress menu-game-option ((obj menu-game-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-game-option ((obj menu-game-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (-> *progress-state* game-options-vibrations) (-> *progress-state* game-options-subtitles) @@ -3433,7 +3433,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -3606,7 +3606,7 @@ ) ;; definition for method 9 of type menu-graphic-option -(defmethod respond-progress menu-graphic-option ((obj menu-graphic-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-graphic-option ((obj menu-graphic-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (-> *progress-state* graphic-options-aspect-ratio) (-> *progress-state* graphic-options-progressive-scan) @@ -3673,7 +3673,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) ) @@ -3758,7 +3758,7 @@ ) (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm)) (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons confirm)) - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'progressive-mode-warning 0) ) (when (and (= (-> *progress-state* graphic-options-item-selected) 3) @@ -3770,7 +3770,7 @@ (set! (-> *setting-control* user-default video-mode) a0-173) ) (('ntsc) - (progress-method-29 arg0) + (push-state arg0) (set-next-state arg0 'video-mode-warning 0) ) ) @@ -3826,7 +3826,7 @@ ) ;; definition for method 9 of type menu-qr-option -(defmethod respond-progress menu-qr-option ((obj menu-qr-option) (arg0 progress) (arg1 object)) +(defmethod respond-progress menu-qr-option ((obj menu-qr-option) (arg0 progress) (arg1 symbol)) "Handle progress menu navigation logic." (-> *progress-state* qr-options-restart) (-> *progress-state* qr-options-quit) @@ -3890,7 +3890,7 @@ (sound-play "window-contract") (sound-play "generic-beep") ) - (progress-method-30 arg0) + (pop-state arg0) ) ) )