diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index a6e6156d44..0b44ba95f6 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -6575,6 +6575,7 @@ ;; text-id-h ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; +++text-id-h:game-text-id (defenum game-text-id :type uint32 :bitfield #f @@ -6588,7 +6589,20 @@ (progress-video-j1n2 289) (progress-draw-yes-or-no-1-TODO 292) (progress-draw-yes-or-no-2-TODO 293) + (progress-1kj2n3kj1n23 296) + (progress-n2jk3n45234 298) (progress-1ikjhb231hjik2b31ihb231 303) + (progress-kj1n23123 308) + (progress-k1jnb231kjhnb23 311) + (progress-loj1n23 312) + (progress-2k3jn4234 313) + (progress-2kj3n24kn 314) + (progress-2kjn34 315) + (progress-2klj342n43 316) + (progress-l2jm342m34 317) + (progress-2m342kmj34 318) + (progress-kj1bn23kj1n23 339) + (progress-1l2jnm31lk2m3 340) (progress-unlocked-oj1n23jn1 345) (progress-unlocked-k1231kkj 346) (progress-unlocked-jn12j 347) @@ -6598,12 +6612,14 @@ (progress-unlocked-iwudnq 351) (progress-unlocked-n51i51n 352) (progress-1k2ijn1jkn3 360) + (progress-1kjn2jn31kj3 361) (progress-1kj2n31j23 367) (progress-iko1jn231kjhn23 368) (progress-1klj2n31j2n3 369) (progress-i1un23i12b341 370) (progress-2kj3n2kji3n42 377) (progress-draw-continue-retry-1-TODO 382) + (progress-1klj2n31j23 383) (progress-j1n23j1kn23kjn12 395) (progress-2j021j394j 396) (progress-kj6n324i63n 397) @@ -6658,6 +6674,7 @@ (progress-main-364jn6n 547) (progress-ikj123i1khb231 784) ) +;; ---text-id-h:game-text-id ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -12062,7 +12079,7 @@ (game-info-method-26 () none 26) (get-next-attack-id (_type_) uint 27) (game-info-method-28 () none 28) - (game-info-method-29 () none 29) + (get-game-score-ref (_type_ int) (pointer float) 29) (game-info-method-30 () none 30) ) ) @@ -20236,7 +20253,7 @@ ) (deftype menu-option (basic) - ((name uint32 :offset-assert 4) + ((name game-text-id :offset-assert 4) (scale float :offset-assert 8) (unknown function :offset-assert 12) ;; No idea what is going on here.... @@ -29227,7 +29244,7 @@ (define-extern *highscores-options* "List of [[menu-highscores-option]]" menu-option-list) (define-extern *secret-options* menu-option-list) (define-extern *language-name-remap* (array game-text-id)) -(define-extern *stereo-mode-name-remap* (array uint64)) +(define-extern *stereo-mode-name-remap* (array game-text-id)) (define-extern *hud-ring-graphic-remap* (array uint64)) ;; these are probably bitfields of some kind (define-extern *hud-ring-kiosk-graphic-remap* (array uint64)) (define-extern *hud-ring-demo-graphic-remap* (array uint64)) @@ -29333,13 +29350,13 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (deftype print-highscore-obj (basic) - ((self basic :offset-assert 4) + ((self texture-page :offset-assert 4) (index int32 :offset-assert 8) - (previous basic :offset-assert 12) + (previous texture-page :offset-assert 12) ; guess (place int32 :offset-assert 16) (score float :offset-assert 20) (game-score basic :offset-assert 24) - (context basic :offset-assert 28) + (context font-context :offset-assert 28) (local-scale float :offset-assert 32) (interp float :offset-assert 36) ) @@ -29351,12 +29368,12 @@ (define-extern progress-selected (function int int :behavior progress)) (define-extern draw-percent-bar (function int int float rgba none)) ;; (define-extern draw-highlight (function int int float pointer)) -(define-extern draw-busy-loading (function object float :behavior progress)) -(define-extern draw-previous-next (function object int int none)) -(define-extern draw-up-down (function object none)) -(define-extern draw-missions-up-down (function object none)) -(define-extern draw-scene-up-down (function object none)) -(define-extern begin-scissor (function vector none)) +(define-extern draw-busy-loading (function font-context float :behavior progress)) +(define-extern draw-previous-next (function menu-highscores-option font-context symbol none)) +(define-extern draw-up-down (function font-context none)) +(define-extern draw-missions-up-down (function font-context none)) +(define-extern draw-scene-up-down (function font-context none)) +(define-extern begin-scissor (function vector progress none)) (define-extern end-scissor (function none)) (define-extern begin-scissor-secret (function vector none)) (define-extern end-scissor-secret (function none)) @@ -29378,20 +29395,20 @@ (define-extern get-level-icon-id-02 "TODO - Icon id enum perhaps?" (function int uint)) (define-extern get-level-icon-id-03 "TODO - Icon id enum perhaps?" (function int uint)) (define-extern get-level-icon-id-04 "TODO - Icon id enum perhaps?" (function int uint)) -(define-extern draw-decoration (function none)) -(define-extern draw-missions-decoration (function none)) -(define-extern draw-sound-options-decoration (function menu-slider-option font-context int symbol none)) -(define-extern draw-decoration-secrets (function menu-secret-option font-context float none)) -(define-extern draw-decoration-load-save (function symbol font-context float int none)) -(define-extern sort-task-node-result (function object none)) +(define-extern draw-decoration (function menu-quit-qr-option font-context float int symbol float none)) +(define-extern draw-missions-decoration (function menu-missions-option font-context float game-text-id none)) +(define-extern draw-sound-options-decoration (function menu-slider-option font-context float symbol game-text-id none)) +(define-extern draw-decoration-secrets (function menu-secret-option font-context float game-text-id pointer)) +(define-extern draw-decoration-load-save (function menu-memcard-slot-option font-context float int none)) +(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 none)) -(define-extern draw-highscore-icon (function menu-highscores-option uint int int none)) -;; (define-extern draw-highscore-cup function) +(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 (function texture-page object int int float float pointer)) (define-extern get-highscore-score "TODO - takes and returns an enum?" (function int int)) -(define-extern eval-highscore (function object none)) +(define-extern eval-highscore (function print-highscore-obj none)) (define-extern str-print-time (function float string)) -(define-extern print-highscore (function print-highscore-obj none)) +(define-extern print-highscore (function print-highscore-obj float)) (define-extern get-highscore-text "TODO - takes an enum?" (function int game-text-id)) (define-extern get-highscore-text-sub "TODO - takes an enum?" (function int game-text-id)) (define-extern get-highscore-icon "TODO - Icon id enum perhaps?" (function int uint)) diff --git a/decompiler/config/jak2/type_casts.jsonc b/decompiler/config/jak2/type_casts.jsonc index 814abcb263..2056aaf127 100644 --- a/decompiler/config/jak2/type_casts.jsonc +++ b/decompiler/config/jak2/type_casts.jsonc @@ -13309,16 +13309,46 @@ ] ], "(method 13 sync-linear)": [ - ["_stack_", 16, "res-tag"], - [35, "v1", "(pointer float)"] + [ + "_stack_", + 16, + "res-tag" + ], + [ + 35, + "v1", + "(pointer float)" + ] ], "(method 13 sync-eased)": [ - ["_stack_", 16, "res-tag"], - [[31, 54], "v1", "(pointer float)"] + [ + "_stack_", + 16, + "res-tag" + ], + [ + [ + 31, + 54 + ], + "v1", + "(pointer float)" + ] ], "(method 13 sync-paused)": [ - ["_stack_", 16, "res-tag"], - [[29, 45], "v1", "(pointer float)"] + [ + "_stack_", + 16, + "res-tag" + ], + [ + [ + 29, + 45 + ], + "v1", + "(pointer float)" + ] ], "(method 25 progress)": [ [ @@ -13593,75 +13623,269 @@ "dma-packet" ] ], - "(method 10 menu-memcard-slot-option)": [ + "(method 10 menu-highscores-option)": [ [ - 162, - "a0", + 17, + "v1", "float" ], [ - 322, - "t1", + 51, + "f0", "float" ], [ - 541, - "t1", + 14, + "v1", "float" - ], + ] + ], + "draw-percent-bar": [ [ - 677, - "a0", - "float" - ], + [ + 38, + 41 + ], + "v1", + "dma-packet" + ] + ], + "draw-highscore-icon": [ [ - 691, - "a0", - "float" - ], + [ + 36, + 39 + ], + "v1", + "dma-packet" + ] + ], + "begin-scissor": [ [ - 728, - "a0", - "float" - ], + [ + 70, + 73 + ], + "v1", + "dma-packet" + ] + ], + "draw-savegame-box": [ [ - 767, - "a0", - "float" - ], + [ + 25, + 28 + ], + "v1", + "dma-packet" + ] + ], + "draw-decoration": [ [ - 805, - "a0", - "float" + [ + 176, + 179 + ], + "v1", + "dma-packet" + ] + ], + "draw-missions-decoration": [ + [ + [ + 137, + 140 + ], + "v1", + "dma-packet" + ] + ], + "draw-sound-options-decoration": [ + [ + [ + 151, + 154 + ], + "v1", + "dma-packet" + ] + ], + "draw-decoration-secrets": [ + [ + [ + 139, + 142 + ], + "v1", + "dma-packet" + ] + ], + "draw-decoration-load-save": [ + [ + [ + 173, + 176 + ], + "v1", + "dma-packet" ] ], "(method 10 menu-secret-option)": [ [ - 47, + 25, "v1", "float" ], [ - 106, - "a0", + 22, + "v1", + "float" + ], + [ + 63, + "f0", + "float" + ], + [ + [ + 137, + 140 + ], + "v1", + "dma-packet" + ] + ], + "(method 10 menu-memcard-slot-option)": [ + [ + [ + 333, + 336 + ], + "v1", + "dma-packet" + ], + [ + [ + 552, + 555 + ], + "v1", + "dma-packet" + ], + [ + [ + 874, + 877 + ], + "v1", + "dma-packet" + ], + [ + [ + 941, + 944 + ], + "v1", + "dma-packet" + ], + [ + [ + 1034, + 1037 + ], + "v1", + "dma-packet" + ], + [ + [ + 1107, + 1110 + ], + "v1", + "dma-packet" + ], + [ + [ + 1186, + 1189 + ], + "v1", + "dma-packet" + ], + [ + 59, + "f0", "float" ] ], - "(method 10 menu-highscores-option)": [ + "(method 10 menu-icon-info-option)": [ [ - 31, + [ + 71, + 74 + ], "v1", + "dma-packet" + ] + ], + "find-mission-text-at-index": [ + [ + 201, + "v1", + "symbol" // this is a lie, but it's needed to work around the useless`cmove-#f-zero` it's not a symbol + ] + ], + "(method 10 menu-missions-option)": [ + [ + 78, + "f0", "float" + ] + ], + "draw-highscore-cup": [ + [ + [ + 74, + 77 + ], + "v1", + "dma-packet" + ] + ], + "(method 10 menu-slider-option)": [ + [ + [ + 415, + 418 + ], + "v1", + "dma-packet" ], [ - 38, + [ + 768, + 771 + ], "v1", - "float" + "dma-packet" + ] + ], + "(method 10 menu-sub-menu-option)": [ + [ + [ + 237, + 240 + ], + "v1", + "dma-packet" ], [ - 122, - "a0", - "float" + [ + 334, + 337 + ], + "v1", + "dma-packet" ] ] } \ No newline at end of file diff --git a/goal_src/jak2/engine/game/game-info-h.gc b/goal_src/jak2/engine/game/game-info-h.gc index c2e00f46a1..97eca8b259 100644 --- a/goal_src/jak2/engine/game/game-info-h.gc +++ b/goal_src/jak2/engine/game/game-info-h.gc @@ -130,6 +130,10 @@ (define-extern bug-report-display (function none)) (define-extern trsq->continue-point (function trsq none)) +;; NOTE - for progress +(declare-type highscore-info structure) +(define-extern *highscore-info-array* (array highscore-info)) + ;; DECOMP BEGINS (local-vars (gp-0 game-info)) @@ -291,7 +295,7 @@ (last-continue continue-point :offset-assert 244) (play-list (array game-task-info) :offset-assert 248) (sub-task-list (array game-task-node-info) :offset-assert 252) - (unknown-pad5 array :offset-assert 256) + (mission-list (array game-task-node-info) :offset-assert 256) (task-counter uint32 :offset-assert 260) (unknown-pad6 uint32 :offset-assert 264) (level-opened uint8 32 :offset-assert 268) @@ -372,7 +376,7 @@ (game-info-method-26 () none 26) (get-next-attack-id (_type_) uint 27) (game-info-method-28 () none 28) - (game-info-method-29 () none 29) + (get-game-score-ref (_type_ int) (pointer float) 29) (game-info-method-30 () none 30) ) ) diff --git a/goal_src/jak2/engine/game/task/task-control-h.gc b/goal_src/jak2/engine/game/task/task-control-h.gc index b5ee995f1b..3611a5b106 100644 --- a/goal_src/jak2/engine/game/task/task-control-h.gc +++ b/goal_src/jak2/engine/game/task/task-control-h.gc @@ -1327,7 +1327,7 @@ (:methods (dummy-9 () none 9) (dummy-10 () none 10) - (dummy-11 () none 11) + (open? (_type_) symbol 11) (dummy-12 () none 12) (dummy-13 () none 13) ) diff --git a/goal_src/jak2/engine/ui/hud-h.gc b/goal_src/jak2/engine/ui/hud-h.gc index 71da0bbb14..956f36fe12 100644 --- a/goal_src/jak2/engine/ui/hud-h.gc +++ b/goal_src/jak2/engine/ui/hud-h.gc @@ -13,6 +13,7 @@ ;; NOTE - for progress (define-extern hide-hud (function symbol none)) (define-extern hud-hidden? (function symbol)) +(define-extern set-hud-piece-position! (function basic int int none)) ;; DECOMP BEGINS diff --git a/goal_src/jak2/engine/ui/progress/progress-draw.gc b/goal_src/jak2/engine/ui/progress/progress-draw.gc index 252ac8d2b3..14275bac33 100644 --- a/goal_src/jak2/engine/ui/progress/progress-draw.gc +++ b/goal_src/jak2/engine/ui/progress/progress-draw.gc @@ -7,3 +7,7838 @@ ;; DECOMP BEGINS +(defbehavior progress-selected progress ((arg0 int)) + (let ((gp-0 33)) + (cond + ((< 4 (the-as int (logand (-> self clock integral-frame-counter) 7))) + (set! (-> *progress-state* color-flash-counter) 1) + ) + ((< (the-as int (logand (-> self clock integral-frame-counter) 7)) 4) + (set! (-> *progress-state* color-flash-counter) 0) + 0 + ) + ) + (cond + ((zero? (-> *progress-state* color-flash-counter)) + (set-font-color gp-0 0 64 128 128) + (set-font-color gp-0 1 64 128 128) + ) + (else + (set-font-color gp-0 0 255 255 255) + (set-font-color gp-0 1 255 255 255) + ) + ) + gp-0 + ) + ) + +(defun draw-percent-bar ((arg0 int) (arg1 int) (arg2 float) (arg3 rgba)) + (let* ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s2-0 base)) + ) + (draw-sprite2d-xy s2-0 arg0 arg1 255 14 (new 'static 'rgba :a (-> arg3 a))) + (draw-sprite2d-xy s2-0 arg0 (+ arg1 2) (the int (* 255.0 arg2)) 10 arg3) + (let ((a3-3 (-> s2-0 base))) + (let ((v1-8 (the-as object (-> s2-0 base)))) + (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + gp-0 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + 0 + (none) + ) + +(defun draw-highlight ((arg0 int) (arg1 int) (arg2 float)) + (let* ((s3-0 (if (= (get-aspect-ratio) 'aspect4x3) + 70 + 79 + ) + ) + (a3-0 (if (= (get-aspect-ratio) 'aspect4x3) + 374 + 355 + ) + ) + (s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-2 (-> s2-0 base)) + ) + (draw-sprite2d-xy + s2-0 + s3-0 + arg0 + a3-0 + arg1 + (new 'static 'rgba :r #x40 :g #x80 :b #x80 :a (the int (* 64.0 arg2))) + ) + (let ((a3-1 (-> s2-0 base))) + (let ((v1-6 (the-as object (-> s2-0 base)))) + (set! (-> (the-as dma-packet v1-6) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (&+ (the-as pointer v1-6) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-2 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + ) + +(defbehavior draw-busy-loading progress ((arg0 font-context)) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 origin x) 82.0) + (set! (-> arg0 origin y) 180.0) + (set! (-> arg0 width) 359.0) + (set! (-> arg0 height) 40.0) + ) + (('aspect16x9) + (set! (-> arg0 origin x) 82.0) + (set! (-> arg0 origin y) 180.0) + (set! (-> arg0 width) 355.0) + (set! (-> arg0 height) 40.0) + ) + ) + (let ((v1-12 arg0)) + (set! (-> v1-12 scale) 0.6) + ) + (let ((a0-5 arg0)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (if (< (mod (-> self clock frame-counter) 300) 210) + (print-game-text (lookup-text! *common-text* (game-text-id progress-busy-loading-TODO) #f) arg0 #f 44 320) + ) + ) + +(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) + ) + ) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning large)) + ) + (let ((s2-0 arg1)) + (set! (-> s2-0 color) (the-as font-color (progress-selected 200))) + ) + (let ((v1-15 arg1)) + (set! (-> v1-15 scale) 0.6) + ) + (when (or (> (-> arg0 page-index) 0) arg2) + (let ((s2-1 print-game-text)) + (let ((s1-0 format) + (s0-0 (clear *temp-string*)) + ) + (set! sv-16 "~C~S") + (set! sv-32 163) + (let ((a3-0 (lookup-text! *common-text* (game-text-id progress-1kj2n3kj1n23) #f))) + (s1-0 s0-0 sv-16 sv-32 a3-0) + ) + ) + (s2-1 *temp-string* arg1 #f 44 320) + ) + ) + (set! arg2 (or (!= (-> arg0 page-index) (+ (-> arg0 num-pages) -1)) arg2)) + (when arg2 + (let ((a0-12 arg1)) + (set! (-> a0-12 flags) (font-flags kerning right large)) + ) + (+! (-> arg1 origin x) (the float s3-0)) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~S~C" (lookup-text! *common-text* (game-text-id progress-1kj2n3kj1n23) #f) 161) + (s5-1 *temp-string* arg1 #f 44 320) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun draw-up-down ((arg0 font-context)) + (let ((s3-0 250) + (s5-0 155) + (s4-0 155) + (f30-0 (-> arg0 origin x)) + (f28-0 (-> arg0 origin y)) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! s5-0 170) + ) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float s5-0)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s2-0 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float (+ s5-0 s4-0))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) f30-0) + (set! (-> arg0 origin y) f28-0) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun draw-missions-up-down ((arg0 font-context)) + (let ((s3-0 250) + (s5-0 116) + (s4-0 191) + (f30-0 (-> arg0 origin x)) + (f28-0 (-> arg0 origin y)) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float s5-0)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s2-0 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float (+ s5-0 s4-0))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) f30-0) + (set! (-> arg0 origin y) f28-0) + ) + (none) + ) + +;; WARN: Return type mismatch float vs none. +(defun draw-scene-up-down ((arg0 font-context)) + (let ((s3-0 250) + (s5-0 102) + (s4-0 194) + (f30-0 (-> arg0 origin x)) + (f28-0 (-> arg0 origin y)) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! s5-0 92) + (set! s4-0 204) + ) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float s5-0)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s2-0 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float (+ s5-0 s4-0))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) f30-0) + (set! (-> arg0 origin y) f28-0) + ) + (none) + ) + +(defun begin-scissor ((arg0 vector) (arg1 progress)) + (cond + ((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)) + (set! (-> arg0 x) 0.0) + (set! (-> arg0 y) 0.0) + (set! (-> arg0 z) 512.0) + (set! (-> arg0 w) 416.0) + ) + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 38.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 362.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 70.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 329.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-23 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-23) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-23) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-23) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-23) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun end-scissor () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun begin-scissor-secret ((arg0 vector)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 190.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 315.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 173.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 304.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun end-scissor-secret () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun begin-scissor-missions ((arg0 vector) (arg1 float)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 130.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 305.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 130.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 305.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun end-scissor-missions ((arg0 vector)) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun begin-scissor-scene ((arg0 vector)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 118.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 294.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 116.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 295.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun end-scissor-scene () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun begin-scissor-level ((arg0 vector)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 118.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 294.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 116.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 295.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun end-scissor-level () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +(defun print-language-name ((arg0 game-text-id) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s5-0 (if arg3 + arg2 + (- arg2) + ) + ) + ) + (+! (-> arg1 origin x) (the float s5-0)) + (let ((f30-0 (- 1.0 (* 0.0033333334 (the float arg2))))) + (set! (-> arg1 alpha) f30-0) + (print-game-text-scaled (lookup-text! *common-text* (-> *language-name-remap* arg0) #f) f30-0 arg1 320) + ) + (set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0))) + ) + (set! (-> arg1 color) (font-color #7efbfb)) + 0 + (none) + ) + +;; ERROR: Function may read a register that is not set: a0 +(defun unlocked-secret-menu? () + (local-vars (a0-0 none)) + (or (logtest? (the-as int a0-0) 32) + (logtest? (the-as int a0-0) 64) + (logtest? (the-as int a0-0) 128) + (logtest? (the-as int a0-0) 256) + (logtest? (the-as int a0-0) 512) + (logtest? (the-as int a0-0) 1024) + (logtest? (the-as int a0-0) 2048) + (logtest? (the-as int a0-0) #x8000) + ) + ) + +;; WARN: Return type mismatch object vs symbol. +(defun memcard-unlocked-secrets? ((arg0 symbol)) + "TODO - cleanup bitfields / arg passing" + (let ((v1-0 *progress-save-info*) + (s5-0 (the-as object 0)) + ) + (let ((a0-1 4)) + (when (and v1-0 (= (-> v1-0 formatted) 1) (= (-> v1-0 inited) 1)) + (dotimes (a1-5 a0-1) + (set! s5-0 (logior (the-as int s5-0) (the-as int (-> v1-0 file a1-5 secrets)))) + ) + ) + ) + (if (unlocked-secret-menu?) + (set! (-> *progress-state* secrets-unlocked) #t) + (set! (-> *progress-state* secrets-unlocked) #f) + ) + (when *cheat-mode* + (set! (-> *progress-state* secrets-unlocked) #t) + (set! s5-0 (logior (the-as int s5-0) #x8fe0)) + ) + (the-as symbol (cond + (arg0 + (empty) + s5-0 + ) + (else + (unlocked-secret-menu?) + ) + ) + ) + ) + ) + +(defun num-unlocked-secret? ((arg0 int)) + "@returns The number of secrets currently unlocked" + (let ((v0-0 0)) + (if (logtest? arg0 32) + (+! v0-0 1) + ) + (if (logtest? arg0 64) + (+! v0-0 1) + ) + (if (logtest? arg0 128) + (+! v0-0 1) + ) + (if (logtest? arg0 256) + (+! v0-0 1) + ) + (if (logtest? arg0 512) + (+! v0-0 1) + ) + (if (logtest? arg0 1024) + (+! v0-0 1) + ) + (if (logtest? arg0 2048) + (+! v0-0 1) + ) + (if (logtest? arg0 #x8000) + (+! v0-0 1) + ) + v0-0 + ) + ) + +(defun print-menu-text ((arg0 game-text-id) (arg1 float) (arg2 font-context) (arg3 progress)) + (let ((f0-1 (- 1.0 (-> arg3 menu-transition)))) + (let ((v1-1 arg2)) + (set! (-> v1-1 scale) 0.5) + ) + (set! (-> arg2 alpha) f0-1) + ) + (print-game-text (the-as string arg0) arg2 #f 44 320) + 0 + (none) + ) + +(defun draw-yes-no ((arg0 progress) (arg1 float)) + (local-vars (a0-5 string)) + (- 1.0 (-> arg0 menu-transition)) + (cond + ((-> *progress-state* yes-no-choice) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + ) + (print-game-text a0-5 (the-as font-context arg1) #f 44 320) + 0 + (none) + ) + +(defun draw-continue-retry ((arg0 progress) (arg1 float)) + (local-vars (a0-5 string)) + (- 1.0 (-> arg0 menu-transition)) + (cond + ((-> *progress-state* yes-no-choice) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-1-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-1-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + ) + (print-game-text a0-5 (the-as font-context arg1) #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-option ((obj menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-8 string) (sv-16 string)) + (let ((s3-0 (if arg3 + (&-> *progress-state* on-off-choice) + (-> obj value-to-modify) + ) + ) + ) + (set! a0-8 (cond + (arg3 + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #f9f9f9)) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + ((-> s3-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + ) + a0-8 + ) + (else + (let ((s2-3 format) + (s1-2 (clear *temp-string*)) + (s0-2 "~S: ~S") + ) + (set! sv-16 (lookup-text! *common-text* (-> obj name) #f)) + (let ((a3-4 (if (-> s3-0 0) + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + ) + ) + (s2-3 s1-2 s0-2 sv-16 a3-4) + ) + ) + *temp-string* + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-8) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-8 string)) + (let ((s3-0 (&-> *progress-state* yes-no-choice))) + (set! a0-8 (cond + (arg3 + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #f9f9f9)) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + ((-> s3-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + ) + a0-8 + ) + (else + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + *temp-string* + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-8) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-video-mode-option ((obj menu-video-mode-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s3-0 (&-> *progress-state* video-mode-choice)) + (f28-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (f30-0 (-> arg1 origin y)) + ) + (let ((s2-0 (the-as string #f))) + (if (< f28-0 0.0) + (set! f28-0 0.0) + ) + (set! (-> arg1 alpha) f28-0) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.7) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ 43.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 52.0 (-> arg1 origin y))) + ) + ) + (cond + ((and (= (-> *progress-state* graphic-options-item-selected) 3) + (-> *progress-state* graphic-options-item-picked) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-6 arg1)) + (set! (-> a0-6 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 44 f28-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (cond + ((= (-> s3-0 0) 'pal) + (format + (clear *temp-string*) + "~33L~S ~35L~S~1L" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S~33L ~S" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + ) + ) + (else + (when (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (cond + ((= (-> *progress-state* graphic-options-item-selected) 3) + (let ((s2-4 arg1)) + (set! (-> s2-4 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -9.0 (-> arg1 origin y))) 22 f28-0) + ) + (else + (let ((a0-23 arg1)) + (set! (-> a0-23 color) (font-color #7efbfb)) + ) + ) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (cond + ((= (-> s3-0 0) 'pal) + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + ) + ) + ) + ) + (if (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (print-menu-text (the-as game-text-id s2-0) (-> obj scale) arg1 arg0) + ) + ) + (set! (-> arg1 origin y) f30-0) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s5-0 (memcard-unlocked-secrets? #t)) + (f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.6) + ) + (when (nonzero? (-> obj name)) + (cond + ((= arg2 (-> arg0 option-index)) + (progress-selected 0) + (draw-highlight (the int (+ 8.0 (-> arg1 origin y))) 24 f30-0) + ) + (else + 32 + ) + ) + (set! (-> arg1 origin y) (+ 8.0 (-> arg1 origin y))) + (cond + ((= (-> obj name) (game-text-id progress-unlocked-1231h2bn)) + (cond + ((logtest? (the-as int s5-0) 512) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-1231h2bn) #f) arg1 #f 44 320) + ) + (else + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-2 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-akjisndaj)) + (cond + ((logtest? (the-as int s5-0) 1024) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-akjisndaj) #f) arg1 #f 44 320) + ) + (else + (let ((s5-4 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-4 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-iwudnq)) + (cond + ((logtest? (the-as int s5-0) 2048) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-iwudnq) #f) arg1 #f 44 320) + ) + (else + (let ((s5-6 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-6 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-k1231kkj)) + (cond + ((logtest? (the-as int s5-0) 32) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-k1231kkj) #f) arg1 #f 44 320) + ) + (else + (let ((s5-8 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-8 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-jn12j)) + (cond + ((logtest? (the-as int s5-0) 64) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-jn12j) #f) arg1 #f 44 320) + ) + (else + (let ((s5-10 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-10 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-m12312)) + (cond + ((logtest? (the-as int s5-0) 128) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-m12312) #f) arg1 #f 44 320) + ) + (else + (let ((s5-12 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-12 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-oj1n23jn1)) + (cond + ((logtest? (the-as int s5-0) #x8000) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-oj1n23jn1) #f) arg1 #f 44 320) + ) + (else + (let ((s5-14 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-14 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) (game-text-id progress-unlocked-n51i51n)) + (cond + ((logtest? (the-as int s5-0) 256) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-n51i51n) #f) arg1 #f 44 320) + ) + (else + (let ((s5-16 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-16 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (-> arg1 flags) + (when (and (= (-> arg0 menu-transition) 0.0) (and (= (-> arg0 ring-angle) (-> arg0 ring-want-angle)) + (nonzero? (-> obj name)) + (= arg2 (-> arg0 option-index)) + ) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 scale) 0.75) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle large)) + ) + (set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 235 + 175 + ) + ) + ) + (set! (-> arg1 height) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 80 + 80 + ) + ) + ) + (set! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 140 + 170 + ) + ) + ) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 180 + 175 + ) + ) + ) + (cond + ((= (-> obj name) (game-text-id progress-kj1n23123)) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-18 arg1)) + (set! (-> v1-18 scale) 0.7) + ) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 210 + 200 + ) + ) + ) + (let ((v1-21 arg1)) + (set! (-> v1-21 scale) 0.6) + ) + (let ((v1-23 (-> *bigmap* bigmap-index))) + (cond + ((zero? v1-23) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-k1j2n3n1) #f) arg1 #f 44 320) + ) + ((= v1-23 1) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-m123j1m) #f) arg1 #f 44 320) + ) + ((= v1-23 2) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63jk46n3) #f) arg1 #f 44 320) + ) + ((= v1-23 3) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-36j46jn) #f) arg1 #f 44 320) + ) + ((= v1-23 4) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-36j46jn) #f) arg1 #f 44 320) + ) + ((= v1-23 5) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-52jn35j2) #f) arg1 #f 44 320) + ) + ((= v1-23 6) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-52kj3n52) #f) arg1 #f 44 320) + ) + ((= v1-23 7) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63j46j3n4) #f) arg1 #f 44 320) + ) + ((= v1-23 8) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63j46n3j) #f) arg1 #f 44 320) + ) + ((= v1-23 9) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-364jn6n) #f) arg1 #f 44 320) + ) + ((= v1-23 11) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-634jn6) #f) arg1 #f 44 320) + ) + ((= v1-23 12) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-52o352nm) #f) arg1 #f 44 320) + ) + ((= v1-23 13) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-j324nm3) #f) arg1 #f 44 320) + ) + ((= v1-23 14) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-6mn346mn) #f) arg1 #f 44 320) + ) + ((= v1-23 15) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-6mn346mn) #f) arg1 #f 44 320) + ) + ((= v1-23 16) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-6mn346mn) #f) arg1 #f 44 320) + ) + ((= v1-23 17) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63jn463jn) #f) arg1 #f 44 320) + ) + ((= v1-23 18) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-3643m6m) #f) arg1 #f 44 320) + ) + ((= v1-23 19) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63mn46nm) #f) arg1 #f 44 320) + ) + ((= v1-23 20) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-23jn42) #f) arg1 #f 44 320) + ) + ) + ) + ) + (else + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + ) + ) + ) + 0 + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun draw-savegame-box ((arg0 menu-memcard-slot-option) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (set! (-> arg0 box 0) (the-as menu-option arg1)) + (set! (-> arg0 unknown-options 1) (the-as menu-option arg2)) + (set! (-> arg0 unknown-options 0) (the-as menu-option arg3)) + (set! (-> arg0 unknown-options 2) (the-as menu-option arg4)) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + (-> arg0 box) + ((method-of-type hud-box hud-box-method-9)) + (let ((a3-1 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (none) + ) + +(defun get-level-icon-id-01 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303600))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304800)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304000)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307000)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305800)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306800)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307400)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303600)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306c00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305c00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305400)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305000)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306400)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307800)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304c00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303a00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307c00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304400)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306000)) + ) + ) + v0-0 + ) + ) + +(defun get-level-icon-id-02 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303700))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304900)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304100)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307100)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305900)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306900)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307500)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303700)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306d00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305d00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305500)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305100)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306500)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307900)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304d00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303b00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307d00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304500)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306100)) + ) + ) + v0-0 + ) + ) + +(defun get-level-icon-id-03 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303800))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304a00)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304200)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307200)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305a00)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306a00)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307600)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303800)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306e00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305e00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305600)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305200)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306600)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307a00)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304e00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303c00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307e00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304600)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306200)) + ) + ) + v0-0 + ) + ) + +(defun get-level-icon-id-04 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303900))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304b00)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304300)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307300)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305b00)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306b00)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307700)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303900)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306f00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305f00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305700)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305300)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306700)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307b00)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304f00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303d00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307f00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304700)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306300)) + ) + ) + v0-0 + ) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun draw-decoration ((arg0 menu-quit-qr-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 int float)) + (sv-96 int) + ) + (set! sv-96 arg3) + (set! sv-16 arg4) + (set! sv-32 arg5) + (let ((gp-0 70) + (s5-0 120) + ) + (set! sv-48 87) + (let ((s3-0 375) + (s2-0 210) + ) + (set! sv-64 0) + (cond + ((not sv-16) + (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) + (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 + ) + ) + ) + ) + (let ((v1-20 arg1)) + (set! (-> v1-20 scale) sv-32) + ) + (set! (-> arg1 origin y) (the float sv-48)) + (set! (-> arg1 height) 50.0) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #7efbfb)) + ) + (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 game-text-id sv-96) a2-1)) + (a1-2 arg1) + (a2-2 #f) + (a3-1 44) + (t0-1 320) + ) + (sv-80 a0-4 a1-2 a2-2 a3-1 t0-1) + ) + (let ((v1-27 (&-> arg0 unknown-options 3))) + (set! (-> v1-27 0) (the-as menu-option 64)) + (set! (-> v1-27 1) (the-as menu-option 128)) + (set! (-> v1-27 2) (the-as menu-option 128)) + (set! (-> v1-27 3) (the-as menu-option (the int (* 128.0 arg2)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option 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 + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s3-0)) + (the float (+ s5-0 s2-0)) + (the float (+ s5-0 s2-0)) + ) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (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))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-41 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-41) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-41) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-41) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-41) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun draw-missions-decoration ((arg0 menu-missions-option) (arg1 font-context) (arg2 float) (arg3 game-text-id)) + (local-vars (sv-16 int) (sv-32 (function string font-context symbol int int float)) (sv-48 font-context)) + (set! sv-48 arg1) + (let ((s2-0 arg2) + (s0-0 arg3) + (gp-0 70) + (s5-0 120) + ) + (set! sv-16 87) + (let ((s4-0 375) + (s3-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 70) + (set! s5-0 130) + (set! sv-16 85) + (set! s4-0 375) + (set! s3-0 175) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 130) + (set! sv-16 68) + (set! s4-0 356) + (set! s3-0 175) + ) + ) + (let ((v1-9 sv-48)) + (set! (-> v1-9 scale) 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 #7efbfb)) + ) + (set! sv-32 print-game-text) + (let ((a0-4 (lookup-text! *common-text* s0-0 #f)) + (a2-2 #f) + (a3-1 44) + (t0-0 320) + ) + (sv-32 a0-4 sv-48 a2-2 a3-1 t0-0) + ) + (let ((v1-17 (&-> arg0 unknown-options 3))) + (set! (-> v1-17 0) (the-as menu-option 64)) + (set! (-> v1-17 1) (the-as menu-option 128)) + (set! (-> v1-17 2) (the-as menu-option 128)) + (set! (-> v1-17 3) (the-as menu-option (the int (* 128.0 s2-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float s5-0) + (the float s5-0) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float (+ s5-0 s3-0)) + (the float (+ s5-0 s3-0)) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s4-0 + s3-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-28 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-28) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-28) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-28) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-28) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 symbol) (arg4 game-text-id)) + (local-vars + (sv-16 font-context) + (sv-32 int) + (sv-48 (function string font-context symbol int int float)) + (sv-64 symbol) + ) + (set! sv-16 arg1) + (let ((s2-0 arg2)) + (set! sv-64 arg3) + (let ((s0-0 arg4) + (gp-0 70) + (s5-0 120) + ) + (set! sv-32 87) + (let ((s4-0 375) + (s3-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 70) + (set! s5-0 120) + (set! sv-32 83) + (set! s4-0 375) + (set! s3-0 208) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 118) + (set! sv-32 68) + (set! s4-0 356) + (set! s3-0 244) + ) + ) + (let ((v1-9 sv-16)) + (set! (-> v1-9 scale) 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 #7efbfb)) + ) + (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 game-text-id sv-64) a2-1)) + (a1-2 sv-16) + (a2-2 #f) + (a3-1 44) + (t0-1 320) + ) + (sv-48 a0-5 a1-2 a2-2 a3-1 t0-1) + ) + (set! (-> sv-16 origin x) (the float (+ gp-0 65))) + (let ((v1-22 (&-> arg0 unknown-options 3))) + (set! (-> v1-22 0) (the-as menu-option 64)) + (set! (-> v1-22 1) (the-as menu-option 128)) + (set! (-> v1-22 2) (the-as menu-option 128)) + (set! (-> v1-22 3) (the-as menu-option (the int (* 128.0 s2-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float s5-0) + (the float s5-0) + ) + (if s0-0 + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float (+ s5-0 s3-0)) + (the float (+ s5-0 s3-0)) + ) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s4-0 + s3-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-34 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-34) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-34) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-34) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-34) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + (none) + ) + +(defun draw-decoration-secrets ((arg0 menu-secret-option) (arg1 font-context) (arg2 float) (arg3 game-text-id)) + (local-vars (sv-16 int) (sv-32 (function string font-context symbol int int float)) (sv-48 font-context)) + (set! sv-48 arg1) + (let ((s2-0 arg2) + (s0-0 arg3) + (gp-0 70) + (s5-0 110) + ) + 120 + (set! sv-16 87) + (let ((s4-0 375) + (s3-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 69) + (set! s5-0 172) + (set! sv-16 87) + (set! s4-0 375) + (set! s3-0 132) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 188) + 188 + (set! sv-16 68) + (set! s4-0 356) + (set! s3-0 128) + ) + ) + (let ((v1-11 sv-48)) + (set! (-> v1-11 scale) 0.95) + ) + (set! (-> sv-48 origin y) (the float sv-16)) + (set! (-> sv-48 height) 50.0) + (let ((a0-2 sv-48)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (set! sv-32 print-game-text) + (let ((a0-4 (lookup-text! *common-text* s0-0 #f)) + (a2-2 #f) + (a3-1 44) + (t0-0 320) + ) + (sv-32 a0-4 sv-48 a2-2 a3-1 t0-0) + ) + (let ((v1-19 (&-> arg0 unknown-options 3))) + (set! (-> v1-19 0) (the-as menu-option 64)) + (set! (-> v1-19 1) (the-as menu-option 128)) + (set! (-> v1-19 2) (the-as menu-option 128)) + (set! (-> v1-19 3) (the-as menu-option (the int (* 128.0 s2-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float s5-0) + (the float s5-0) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float (+ s5-0 s3-0)) + (the float (+ s5-0 s3-0)) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s4-0 + s3-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-30 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-30) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-30) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-30) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-30) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + +;; WARN: Return type mismatch pointer vs none. +(defun draw-decoration-load-save ((arg0 menu-memcard-slot-option) (arg1 font-context) (arg2 float) (arg3 int)) + (local-vars + (sv-16 int) + (sv-32 int) + (sv-48 (function string font-context symbol int int float)) + (sv-64 int) + (sv-80 font-context) + ) + (set! sv-80 arg1) + (let ((s4-0 arg2)) + (set! sv-64 arg3) + (let ((s0-0 70) + (gp-0 120) + (s5-0 120) + ) + 120 + (set! sv-16 87) + (set! sv-32 375) + (let ((s3-0 200) + (s2-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! s0-0 69) + (set! gp-0 245) + (set! s5-0 110) + (set! sv-16 80) + (set! sv-32 375) + (set! s3-0 200) + (set! s2-0 218) + ) + (('aspect16x9) + (set! s0-0 79) + (set! gp-0 245) + (set! s5-0 110) + (set! sv-16 80) + (set! sv-32 355) + (set! s3-0 190) + (set! s2-0 248) + ) + ) + (let ((v1-13 sv-80)) + (set! (-> v1-13 scale) 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! (-> 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 #7efbfb)) + ) + (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 game-text-id sv-64) a2-1)) + (a2-2 #f) + (a3-1 44) + (t0-0 320) + ) + (sv-48 a0-9 sv-80 a2-2 a3-1 t0-0) + ) + (let ((v1-32 (&-> arg0 unknown-options 3))) + (set! (-> v1-32 0) (the-as menu-option 64)) + (set! (-> v1-32 1) (the-as menu-option 128)) + (set! (-> v1-32 2) (the-as menu-option 128)) + (set! (-> v1-32 3) (the-as menu-option (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) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (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 s4-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-45 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-45) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-45) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-45) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-45) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +(defmethod menu-option-method-10 menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (v0-74 none) + (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) + (set! v0-74 + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading arg1) + v0-74 + ) + (else + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (if (= arg2 sv-20) + (the-as font-color (progress-selected 0)) + (font-color #7efbfb) + ) + ) + ) + (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)))) + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + ) + (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)))) + (set! (-> arg1 origin x) (+ -90.0 (-> arg1 origin x))) + ) + (('aspect4x3) + (set! (-> arg1 origin y) 74.0) + (set! (-> arg1 height) 42.0) + (+! (-> arg1 origin y) (the float (* 54 (+ arg2 1)))) + (set! (-> arg1 origin x) (+ -90.0 (-> arg1 origin x))) + ) + ) + ) + ) + (let ((v1-41 (&-> obj unknown-options 3))) + (set! (-> v1-41 0) (the-as menu-option 64)) + (set! (-> v1-41 1) (the-as menu-option 128)) + (set! (-> v1-41 2) (the-as menu-option 128)) + (set! (-> v1-41 3) (the-as menu-option (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) + ) + ) + (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))) + ) + (let* ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-4 (-> s1-0 base)) + ) + (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))) + ) + (let ((a3-14 (-> s1-0 base))) + (let ((v1-95 (the-as object (-> s1-0 base)))) + (set! (-> (the-as dma-packet v1-95) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-95) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-95) vif1) (new 'static 'vif-tag)) + (set! (-> s1-0 base) (&+ (the-as pointer v1-95) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s2-4 + (the-as (pointer dma-tag) a3-14) + ) + ) + ) + ) + ((= *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))) + ) + ) + ) + (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))) + ) + (let* ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-5 (-> s1-1 base)) + ) + (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))) + ) + (let ((a3-32 (-> s1-1 base))) + (let ((v1-164 (the-as object (-> s1-1 base)))) + (set! (-> (the-as dma-packet v1-164) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-164) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-164) vif1) (new 'static 'vif-tag)) + (set! (-> s1-1 base) (&+ (the-as pointer v1-164) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s2-5 + (the-as (pointer dma-tag) a3-32) + ) + ) + ) + ) + ) + ) + (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) + (let ((v1-185 arg1)) + (set! (-> v1-185 scale) 0.8) + ) + ) + (else + (let ((v1-186 arg1)) + (set! (-> v1-186 scale) 0.6) + ) + ) + ) + (let ((a0-40 arg1)) + (set! (-> a0-40 flags) (font-flags kerning large)) + ) + (+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 100 + 105 + ) + ) + ) + (let ((s2-7 print-game-text)) + (let ((s1-2 format) + (s0-0 (clear *temp-string*)) + ) + (set! sv-96 "~S ~D") + (let ((a2-28 (lookup-text! *common-text* (game-text-id progress-i1un23i12b341) #f)) + (a3-33 (+ arg2 1)) + ) + (s1-2 s0-0 sv-96 a2-28 a3-33) + ) + ) + (s2-7 *temp-string* arg1 #f 44 320) + ) + (let ((a0-45 arg1)) + (set! (-> a0-45 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) 250.0) + (set! (-> arg1 origin y) 110.0) + (set! (-> arg1 width) 170.0) + (set! (-> arg1 height) 190.0) + (let ((s2-8 (-> *progress-save-info* file arg2 level-index))) + (when (= arg2 sv-20) + (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16))) + (set-vector! (-> obj sprites 1 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-01 (the-as int s2-8)))) + ) + (set! (-> obj sprites 1 scale-x) 1.0) + (set! (-> obj sprites 1 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (&-> obj something-hud-related)) sv-40 sv-48) + (set-vector! (-> obj sprites 2 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-02 (the-as int s2-8)))) + ) + (set! (-> obj sprites 2 scale-x) 1.0) + (set! (-> obj sprites 2 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (+ sv-40 sv-56) sv-48) + (set-vector! (-> obj sprites 3 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-03 (the-as int s2-8)))) + ) + (set! (-> obj sprites 3 scale-x) 1.0) + (set! (-> obj sprites 3 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (-> obj sprites 3)) sv-40 (+ sv-48 64)) + (set-vector! (-> obj sprites 4 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-04 (the-as int s2-8)))) + ) + (set! (-> obj sprites 4 scale-x) 1.0) + (set! (-> obj sprites 4 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (-> obj sprites 4)) (+ sv-40 sv-56) (+ sv-48 64)) + (let* ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-9 (-> s1-7 base)) + ) + (&-> obj something-hud-related) + (let ((t9-38 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-38) + ) + (-> obj sprites 2) + (let ((t9-39 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-39) + ) + (-> obj sprites 3) + (let ((t9-40 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-40) + ) + (-> obj sprites 4) + (let ((t9-41 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-41) + ) + (let ((a3-35 (-> s1-7 base))) + (let ((v1-237 (the-as object (-> s1-7 base)))) + (set! (-> (the-as dma-packet v1-237) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-237) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-237) vif1) (new 'static 'vif-tag)) + (set! (-> s1-7 base) (&+ (the-as pointer v1-237) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-9 + (the-as (pointer dma-tag) a3-35) + ) + ) + ) + (let ((v1-245 arg1)) + (set! (-> v1-245 scale) 0.6) + ) + (set! (-> arg1 origin x) 265.0) + (set! (-> arg1 origin y) 263.0) + (set! (-> arg1 width) 170.0) + (set! (-> arg1 height) 52.0) + (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! (the-as basic (-> obj sprites)) 265 263) + (let* ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-10 (-> s1-8 base)) + ) + (-> obj sprites) + (let ((t9-45 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-45) + ) + (let ((a3-36 (-> s1-8 base))) + (let ((v1-260 (the-as object (-> s1-8 base)))) + (set! (-> (the-as dma-packet v1-260) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-260) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-260) vif1) (new 'static 'vif-tag)) + (set! (-> s1-8 base) (&+ (the-as pointer v1-260) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-10 + (the-as (pointer dma-tag) a3-36) + ) + ) + ) + (set! (-> arg1 origin y) (+ 1.0 (-> arg1 origin y))) + (set! (-> arg1 origin x) (+ 28.0 (-> arg1 origin x))) + (let* ((v1-272 (-> *progress-save-info* file arg2 game-time0)) + (v1-273 (logior (shl (the-as int (-> *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)) + (let ((s1-9 print-game-text)) + (format (clear *temp-string*) "~2,'0D:~2,'0D" s2-11 sv-112) + (s1-9 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93))) + (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 263) + (let* ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-12 (-> s1-10 base)) + ) + (-> obj sprites) + (let ((t9-52 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-52) + ) + (let ((a3-39 (-> s1-10 base))) + (let ((v1-285 (the-as object (-> s1-10 base)))) + (set! (-> (the-as dma-packet v1-285) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-285) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-285) vif1) (new 'static 'vif-tag)) + (set! (-> s1-10 base) (&+ (the-as pointer v1-285) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-12 + (the-as (pointer dma-tag) a3-39) + ) + ) + ) + (set! (-> arg1 origin x) (+ 100.0 (-> arg1 origin x))) + (let ((s2-13 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (-> *progress-save-info* file arg2 completion-percentage))) + (s2-13 *temp-string* arg1 #f 44 320) + ) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) + (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 289) + (let* ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-14 (-> s1-12 base)) + ) + (-> obj sprites) + (let ((t9-59 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-59) + ) + (let ((a3-41 (-> s1-12 base))) + (let ((v1-304 (the-as object (-> s1-12 base)))) + (set! (-> (the-as dma-packet v1-304) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-304) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-304) vif1) (new 'static 'vif-tag)) + (set! (-> s1-12 base) (&+ (the-as pointer v1-304) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-14 + (the-as (pointer dma-tag) a3-41) + ) + ) + ) + (set! (-> arg1 origin y) (+ 28.0 (-> arg1 origin y))) + (let ((s2-15 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> *progress-save-info* file arg2 skill-count))) + (s2-15 *temp-string* arg1 #f 44 320) + ) + (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! (the-as basic (-> obj sprites)) 253 290) + (let* ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-16 (-> s1-14 base)) + ) + (-> obj sprites) + (let ((t9-66 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-66) + ) + (let ((a3-43 (-> s1-14 base))) + (let ((v1-325 (the-as object (-> s1-14 base)))) + (set! (-> (the-as dma-packet v1-325) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-325) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-325) vif1) (new 'static 'vif-tag)) + (set! (-> s1-14 base) (&+ (the-as pointer v1-325) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-16 + (the-as (pointer dma-tag) a3-43) + ) + ) + ) + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + (let ((s2-17 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> *progress-save-info* file arg2 gem-count))) + (s2-17 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((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) + (let ((v1-348 arg1)) + (set! (-> v1-348 scale) 0.8) + ) + ) + (else + (let ((v1-349 arg1)) + (set! (-> v1-349 scale) 0.6) + ) + ) + ) + (let ((a0-150 arg1)) + (set! (-> a0-150 flags) (font-flags kerning large)) + ) + (+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 100 + 105 + ) + ) + ) + (print-game-text + (lookup-text! *common-text* (game-text-id progress-1ikjhb231hjik2b31ihb231) #f) + arg1 + #f + 44 + 320 + ) + ) + ) + (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) + 300 + 299 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-loading-option ((obj menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (with-pp + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.55) + ) + (let ((s4-0 arg1)) + (set! (-> s4-0 color) (the-as font-color (progress-selected 0))) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 120.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (the float (the-as float #x10e))) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 height) (the float (the-as float #x23))) + ) + (if (< f30-0 0.0) + 0.0 + ) + ) + (when (or (< (mod (-> pp clock frame-counter) 300) 150) (!= (-> arg0 menu-transition) 0.0)) + (let ((a1-1 416)) + (case (-> arg0 current) + (('saving) + (set! a1-1 415) + ) + (('formatting) + (set! a1-1 417) + ) + (('creating) + (set! a1-1 418) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id a1-1) #f) arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (let ((v1-25 arg1)) + (set! (-> v1-25 height) (the float (the-as float #xa0))) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color #7efbfb)) + ) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-1jib12o3nj12j3) #f) 1) + (s5-2 *temp-string* arg1 #f 44 320) + ) + 0 + (none) + ) + ) + +(defmethod menu-option-method-10 menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (when (!= (-> arg0 current) 'none) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #7efbfb)) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 75.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (the float (the-as float #x168))) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 height) (the float (the-as float #x50))) + ) + (let ((s4-0 410)) + (case (-> arg0 current) + (('insufficient-space) + (set! s4-0 408) + ) + (('no-memory-card) + (set! s4-0 409) + ) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as game-text-id s4-0) #f) 1) + (s3-0 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 80.0 (-> arg1 origin y))) + (let ((v1-17 arg1)) + (set! (-> v1-17 height) (the float (the-as float #x32))) + ) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (game-text-id progress-1kj2b31k2b3) #f) + (if *progress-save-info* + (-> *progress-save-info* mem-required) + 0 + ) + ) + (s4-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 55.0 (-> arg1 origin y))) + (let ((v1-22 arg1)) + (set! (-> v1-22 height) (the float (the-as float #x5a))) + ) + (cond + ((and (!= (-> *progress-state* starting-state) 'insufficient-space) + (!= (-> *progress-state* starting-state) 'no-memory-card) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2bkoij1231) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + ) + (else + (let ((s4-2 arg1)) + (set! (-> s4-2 color) (the-as font-color (progress-selected 0))) + ) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-continue-retry arg0 (the-as float arg1)) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x3c))) + ) + (let ((s5-0 409)) + (progress-method-28 arg0 'select-save) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as game-text-id s5-0) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 140.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x1e))) + ) + (let ((s5-1 arg1)) + (set! (-> s5-1 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x5f))) + ) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-j1nb23kj1hbn2) #f) 1) + (s5-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 115.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x3c))) + ) + (let ((s5-1 arg1)) + (set! (-> s5-1 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj12k3j1n23n) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 100.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x2d))) + ) + (let ((s5-0 425)) + (case (-> arg0 current) + (('error-saving) + (set! s5-0 426) + ) + (('error-formatting) + (set! s5-0 427) + ) + (('error-creating) + (set! s5-0 428) + ) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as game-text-id s5-0) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x69))) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-k1jn23k1h23b) #f) 1) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 115.0 (-> arg1 origin y))) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float (the-as float #x2d))) + ) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 9.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 77.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x19))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2bn31kjhnb2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x3c))) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-jk1n23kj1n2) #f) 1) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x2d))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kjn231j2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x5f))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2n31kjn231) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 90.0 (-> arg1 origin y))) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float (the-as float #x19))) + ) + (let ((s5-4 arg1)) + (set! (-> s5-4 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 22 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (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 (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x46))) + ) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-k1jn23kj1n23) #f) 1) + (s5-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 65.0 (-> arg1 origin y))) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kjn231j2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 65.0 (-> arg1 origin y))) + (let ((v1-12 arg1)) + (set! (-> v1-12 height) (the float (the-as float #x5a))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2n31kjn231) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 85.0 (-> arg1 origin y))) + (let ((v1-15 arg1)) + (set! (-> v1-15 height) (the float (the-as float #x23))) + ) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 5.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-error-disc-removed-option ((obj menu-error-disc-removed-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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x23))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-l1jkn231jkn23) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj1n231kjn2) #f) arg1 #f 44 320) + (when (is-cd-in?) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-14 arg1)) + (set! (-> v1-14 height) (the float (the-as float #x32))) + ) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-error-reading-option ((obj menu-error-reading-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 #7efbfb)) + ) + (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! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x23))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1lkjn231jnk2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 55.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-n12n211n1n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 105.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x32))) + ) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 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))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #7efbfb)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (set! (-> *bigmap* auto-save-icon-flag) (the-as basic #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) + (set-vector! (-> obj sprites 0 color) 128 128 128 (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 basic (-> obj sprites)) 240 160) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-0 base)) + ) + (-> obj sprites) + (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-2) + ) + (let ((a3-1 (-> s3-0 base))) + (let ((v1-16 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-16) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-16) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-16) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-16) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s4-1 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-27 arg1)) + (set! (-> v1-27 width) (the float (the-as float #x14a))) + ) + (let ((v1-28 arg1)) + (set! (-> v1-28 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-jn12n3j1n2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 115.0 (-> arg1 origin y))) + (let ((v1-31 arg1)) + (set! (-> v1-31 height) (the float (the-as float #x5f))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-n12jin313) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 90.0 (-> arg1 origin y))) + (let ((v1-34 arg1)) + (set! (-> v1-34 height) (the float (the-as float #x32))) + ) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x55))) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-1kjn231kjn23) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1nmn1221n21n12n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x19))) + ) + (draw-highlight (the int (-> arg1 origin y)) 44 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1n23kjn12nk3j12) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1m23n1n23n21) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 105.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x2d))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1jk2n31jkn23n1j) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 8.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x5a))) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-1kj2n31jkn23) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x3c))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kjn2123919) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 18.0 (-> arg1 origin y))) 22 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x2d))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-j1n23j1kn23kjn12) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x5f))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj6n324i63n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 85.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x37))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-3iou4n3i45n3) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x1e))) + ) + (print-game-text + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + arg1 + #f + 44 + 320 + ) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x32))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-39u4n359n45) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x32))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-on2394234n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 75.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x32))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-2j021j394j) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x5a))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj6n324i63n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 85.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x4b))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-3iou4n3i45n3) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x1e))) + ) + (print-game-text + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + arg1 + #f + 44 + 320 + ) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 90.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x50))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-iun34593n45) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 100.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x4b))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-on2394234n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 20.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 160.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x46))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-2iu3bn4289u34n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; 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 menu-option-method-10 menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-48 int) + (sv-64 int) + (sv-80 game-task-info) + (sv-96 font-context) + (sv-112 (function string font-context symbol int int float)) + (sv-128 hud-box) + ) + (let* ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (s3-0 (-> obj task-index)) + (s2-0 0) + (s1-0 50) + (f28-0 (* (-> arg0 sliding-height) (the float s1-0))) + (s0-0 97) + ) + (set! sv-128 (new 'stack 'hud-box)) + (if (< f30-0 0.0) + (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 #7efbfb)) + ) + (set! (-> arg1 origin y) 100.0) + (let ((v1-9 arg1)) + (set! (-> v1-9 width) (the float (the-as float #x159))) + ) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #xd2))) + ) + (let* ((v1-11 (-> arg0 current)) + (a3-1 (cond + ((= v1-11 'select-pre-start) + 362 + ) + ((= v1-11 'select-kiosk-start) + 363 + ) + (else + 352 + ) + ) + ) + ) + (if (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 a3-1 #t 0.7) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 a3-1 #t 0.95) + ) + ) + (begin-scissor-level (the-as vector sv-128)) + (set! (-> arg1 origin x) 80.0) + (let ((v1-20 arg1)) + (set! (-> v1-20 scale) 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)) + ) + (when (>= (+ s3-0 -1) 0) + (+! s3-0 -1) + (set! s2-0 -1) + (draw-highlight (+ s0-0 47) 50 f30-0) + (set! s0-0 (- s0-0 s1-0)) + ) + (while (< s2-0 8) + (when (>= s3-0 0) + (set! sv-48 -1) + (set! sv-64 0) + (while (and (< sv-64 (-> *game-info* play-list length)) (!= sv-48 s3-0)) + (let* ((v1-39 (-> *game-info* play-list sv-64)) + (a0-22 (-> arg0 current)) + (a0-24 (cond + ((= a0-22 'select-pre-start) + (or (-> v1-39 play-continue) (-> v1-39 pre-play-continue)) + ) + ((= a0-22 'select-kiosk-start) + (-> v1-39 kiosk-play-continue) + ) + (else + (-> v1-39 play-continue) + ) + ) + ) + ) + (when (and a0-24 (lookup-text! *common-text* (the-as game-text-id (-> v1-39 text-name)) #t)) + (set! sv-48 (+ sv-48 1)) + sv-48 + ) + ) + (when (!= sv-48 s3-0) + (set! sv-64 (+ sv-64 1)) + sv-64 + ) + ) + (when (!= sv-64 (-> *game-info* play-list length)) + (set! sv-80 (-> *game-info* play-list sv-64)) + (cond + ((zero? s2-0) + (set! (-> obj real-task-index) sv-64) + (set! sv-96 arg1) + (set! (-> sv-96 color) (the-as font-color (progress-selected 0))) + (draw-highlight (+ s0-0 47) 50 f30-0) + ) + (else + (let ((a0-35 arg1)) + (set! (-> a0-35 color) (font-color #7efbfb)) + ) + ) + ) + (cond + ((and (= (-> *setting-control* user-default language) (language-enum german)) (= 454 (-> sv-80 text-name))) + (let ((v1-71 arg1)) + (set! (-> v1-71 scale) 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) + ) + ) + ) + (let ((v1-79 arg1)) + (set! (-> v1-79 height) (the float 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* (the-as game-text-id (-> sv-80 text-name)) #f)) + (a1-12 arg1) + (a2-7 #f) + (a3-2 44) + (t0-3 320) + ) + (sv-112 a0-46 a1-12 a2-7 a3-2 t0-3) + ) + ) + ) + (+! s3-0 1) + (+! s2-0 1) + ) + ) + (let ((t9-10 end-scissor-level)) + #x3f800000 + sv-128 + (t9-10) + ) + (draw-scene-up-down arg1) + 0 + (none) + ) + +(defmethod menu-option-method-10 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 int float)) + (sv-80 (function string font-context symbol int int float)) + (sv-96 (function _varargs_ object)) + (sv-112 string) + (sv-128 (function string font-context symbol int int float)) + (sv-144 (function _varargs_ object)) + (sv-160 string) + (sv-176 (function string font-context symbol int int float)) + (sv-192 font-context) + (sv-208 font-context) + (sv-224 (function string font-context symbol int int float)) + ) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (s4-0 (-> obj task-index)) + (s3-0 0) + (s2-0 *hud-select-scene-act1*) + ) + (let ((v1-2 44)) + (* (-> arg0 sliding-height) (the float v1-2)) + ) + (let ((s0-0 120) + (s1-0 (new 'stack-no-clear 'vector)) + (f28-0 0.0) + ) + 0.0 + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (case (-> *progress-state* scene-player-act) + ((1) + (set! s2-0 *hud-select-scene-act1*) + ) + ((2) + (set! s2-0 *hud-select-scene-act2*) + ) + ((3) + (set! s2-0 *hud-select-scene-act3*) + ) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a1-6 arg1)) + (set! (-> a1-6 flags) (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 (the-as float #x14f))) + ) + (let ((v1-15 arg1)) + (set! (-> v1-15 height) (the float (the-as float #xd2))) + ) + (let ((a1-9 arg1)) + (set! (-> a1-9 color) (font-color #7efbfb)) + ) + (if (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 364 #t 0.7) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 364 #t 0.95) + ) + (begin-scissor-scene s1-0) + (let ((v1-23 arg1)) + (set! (-> v1-23 scale) 0.5) + ) + (set! sv-48 0) + (while (< sv-48 s4-0) + (set! sv-64 print-game-text) + (let ((a0-4 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options sv-48 box 0)) #f)) + (a1-16 arg1) + (a2-4 #t) + (a3-3 44) + (t0-3 320) + ) + (+! f28-0 (sv-64 a0-4 a1-16 a2-4 a3-3 t0-3)) + ) + (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* (the-as game-text-id (-> s2-0 options s4-0 box 0)) #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 320) + (f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 t0-4)) + ) + (* (-> arg0 sliding-height) f0-16) + ) + ) + (else + (set! sv-160 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options (+ s4-0 -1) box 0)) #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 320) + (f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 t0-5)) + ) + (* (-> arg0 sliding-height) f0-18) + ) + ) + ) + ) + ) + (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* (the-as game-text-id (-> s2-0 options s3-0 box 0)) #f)) + (a1-24 arg1) + (a2-12 #t) + (a3-6 44) + (t0-6 320) + (f26-0 (sv-176 a0-14 a1-24 a2-12 a3-6 t0-6)) + ) + (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) (the-as font-color (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) (the-as font-color (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 #7efbfb)) + ) + ) + ) + ) + (set! sv-224 print-game-text) + (let ((a0-23 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s3-0 box 0)) #f)) + (a1-28 arg1) + (a2-16 #f) + (a3-7 44) + (t0-7 320) + ) + (+! s0-1 (the int (sv-224 a0-23 a1-28 a2-16 a3-7 t0-7))) + ) + (set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1)))) + (+! s3-0 1) + ) + ) + ) + ) + (let ((t9-22 end-scissor-scene)) + #x3f800000 + (t9-22) + ) + (draw-scene-up-down arg1) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +;; WARN: Return type mismatch symbol vs none. +(defun sort-task-node-result ((arg0 int)) + (let ((v1-1 (-> *game-info* mission-list)) + (a1-1 (max 0 (+ arg0 -1))) + ) + (let ((a0-3 0)) + (while (> a1-1 0) + (while (< a0-3 a1-1) + (when (and (logtest? (-> v1-1 a0-3 flags) (game-task-node-flag closed)) + (logtest? (-> v1-1 (+ a0-3 1) flags) (game-task-node-flag closed)) + (< (-> v1-1 a0-3 close-time) (-> v1-1 (+ a0-3 1) close-time)) + ) + (let ((a2-19 (-> v1-1 a0-3))) + (set! (-> v1-1 a0-3) (-> v1-1 (+ a0-3 1))) + (set! (-> v1-1 (+ a0-3 1)) a2-19) + ) + ) + (+! a0-3 1) + ) + (+! a1-1 -1) + (set! a0-3 0) + ) + ) + ) + (none) + ) + +(defun find-mission-text-at-index ((arg0 int)) + (local-vars (v1-99 symbol)) + (when (< arg0 (-> *progress-state* current-line-index)) + (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) + 0 + ) + (let ((s5-0 (-> *game-info* sub-task-list))) + 0 + (let ((s4-0 (the-as game-task-node-info #f))) + (while (and (> (-> *progress-state* current-task-index) 0) (!= (-> *progress-state* current-line-index) arg0)) + (cond + ((or (= (-> *progress-state* extra-text-state) -1) (= (-> *progress-state* extra-text-state) 3)) + (+! (-> *progress-state* current-task-index) -1) + (let ((s3-0 (-> s5-0 (-> *progress-state* current-task-index)))) + (when (and (!= (-> s3-0 task) (-> *progress-state* current-task)) (nonzero? (-> s3-0 description))) + (cond + ((and (>= (-> *progress-state* first-closed-line-index) 0) (open? s3-0)) + (set! (-> *progress-state* current-task) (the-as uint (-> s3-0 task))) + ) + ((or (and (>= (-> *progress-state* first-closed-line-index) 0) + (logtest? (-> s3-0 flags) (game-task-node-flag closed)) + ) + (and (< (-> *progress-state* first-closed-line-index) 0) (open? s3-0)) + ) + (set! (-> *progress-state* current-task) (the-as uint (-> s3-0 task))) + (set! s4-0 (-> s5-0 (-> *progress-state* current-task-index))) + (-> s5-0 (-> *progress-state* current-task-index) description) + (if (< (-> *progress-state* first-closed-line-index) 0) + (+! (-> *progress-state* num-open-tasks-found) 1) + (set! (-> *progress-state* num-closed-tasks-found) 1) + ) + (+! (-> *progress-state* current-line-index) 1) + ) + ) + ) + ) + (when (and (zero? (-> *progress-state* current-task-index)) (!= (-> *progress-state* current-line-index) arg0)) + (set! (-> *progress-state* current-task-index) (length (-> *game-info* sub-task-list))) + (cond + ((< (-> *progress-state* first-closed-line-index) 0) + (set! (-> *progress-state* first-closed-line-index) arg0) + (+! (-> *progress-state* extra-text-state) (if (nonzero? (-> *progress-state* num-open-tasks-found)) + 2 + 1 + ) + ) + ) + (else + (+! (-> *progress-state* extra-text-state) (if (nonzero? (-> *progress-state* num-closed-tasks-found)) + 2 + 1 + ) + ) + ) + ) + ) + ) + ((zero? (-> *progress-state* extra-text-state)) + 369 + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ((= (-> *progress-state* extra-text-state) 1) + 367 + #t + (let ((v1-98 (the-as symbol (-> *progress-state* num-open-tasks-found)))) + (set! v1-98 v1-98) + (cmove-#f-zero v1-99 v1-98 v1-98) + ) + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ((= (-> *progress-state* extra-text-state) 4) + 369 + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ((= (-> *progress-state* extra-text-state) 5) + 368 + (+! (-> *progress-state* extra-text-state) 2) + (+! (-> *progress-state* current-line-index) 1) + ) + (else + 0 + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ) + ) + (cond + ((= (-> *progress-state* current-line-index) arg0) + (empty) + s4-0 + ) + (else + (the-as game-task-node-info #f) + ) + ) + ) + ) + ) + +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +(defmethod menu-option-method-10 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 vector) + (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 'vector)) + (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) (the-as uint 381)) + (set! (-> sv-268 description) (the-as uint 380)) + (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) + (let ((v1-36 arg1)) + (set! (-> v1-36 width) 395.0) + ) + (set! (-> arg1 origin x) 60.0) + (set! (-> arg1 origin y) 80.0) + (let ((a0-21 arg1)) + (set! (-> a0-21 color) (font-color #7efbfb)) + ) + (let ((v1-40 (-> obj page-index))) + (cond + ((zero? v1-40) + (draw-missions-decoration obj arg1 sv-16 (game-text-id progress-1kjn2jn31kj3)) + ) + ((= v1-40 1) + (draw-missions-decoration obj arg1 sv-16 (game-text-id progress-1kjn2jn31kj3)) + ) + ) + ) + (begin-scissor-missions sv-276 (the-as float arg0)) + (let ((a0-27 arg1)) + (set! (-> a0-27 flags) (font-flags kerning large)) + ) + (set! (-> arg1 origin x) (+ 20.0 (-> arg1 origin x))) + (case (get-aspect-ratio) + (('aspect16x9) + (set! (-> arg1 origin y) 80.0) + ) + (('aspect4x3) + (set! (-> arg1 origin y) (the float sv-56)) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 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* (the-as game-text-id 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 320) (-> *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* (the-as game-text-id 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 320)))) + (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* (the-as game-text-id 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 320)))) + (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* (the-as game-text-id 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)) + (game-text-id progress-iko1jn231kjhn23) + (game-text-id progress-1kj2n31j23) + ) + #f + ) + ) + (s3-6 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin x) (+ 20.0 (-> arg1 origin x))) + (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 320))) + ) + (set! (-> arg1 origin x) (+ -20.0 (-> arg1 origin x))) + 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 320)) + ) + ) + ) + ) + ) + (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* (game-text-id progress-1klj2n31j2n3) #f) arg1 #f 44 320) + ) + ) + (let ((t9-39 end-scissor-missions) + (a0-93 sv-276) + ) + #x3f800000 + (t9-39 a0-93) + ) + (draw-missions-up-down arg1) + 0 + (none) + ) + +;; WARN: Return type mismatch object vs 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) + (cond + ((= s4-0 #t) + (cond + ((= (-> arg0 can-toggle) 'auto) + ) + ((not (-> arg0 can-toggle)) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg2 origin x) (+ -25.0 (-> arg2 origin x))) + ) + (('aspect16x9) + (set! (-> arg2 origin x) (+ -10.0 (-> arg2 origin x))) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-19 arg2)) + (set! (-> v1-19 scale) 0.43) + ) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1klj2n31j23) #f) arg2 #f 44 320) + ) + ((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) (zero? (logand (-> *game-info* secrets) (-> arg0 flag)))) + (logior! (-> *game-info* secrets) (-> arg0 flag)) + (set! (-> arg1 selected-option) #f) + ) + ) + ) + (else + (let ((s3-1 arg2)) + (set! (-> s3-1 color) (if (= arg3 1) + (the-as font-color (progress-selected 0)) + (font-color #7efbfb) + ) + ) + ) + (set! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 75 + 90 + ) + ) + ) + (cond + ((logtest? (-> *game-info* sub-task-list (-> arg0 avail-after) flags) (game-task-node-flag closed)) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> arg0 name) #f)) + (s3-3 *temp-string* arg2 #f 44 320) + ) + ) + (else + (let ((s3-4 print-game-text)) + (format (clear *temp-string*) "????????") + (s3-4 *temp-string* arg2 #f 44 320) + ) + ) + ) + (set! (-> arg2 origin x) 360.0) + (let ((a0-35 arg2)) + (set! (-> a0-35 color) (font-color #7efbfb)) + ) + ) + ) + (cond + ((and (not s4-0) (zero? (logand (-> *game-info* purchase-secrets) (-> arg0 flag)))) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + ) + ) + ) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) "~D" (-> arg0 cost)) + (s4-2 *temp-string* arg2 #f 44 320) + ) + ) + ((and (not s4-0) (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag))) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + ) + ) + ) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f)) + (s5-2 *temp-string* arg2 #f 44 320) + ) + ) + ((and (not s4-0) (= (-> arg0 can-toggle) #t) (zero? (logand (-> *game-info* secrets) (-> arg0 flag)))) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + ) + ) + ) + (let ((s5-4 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f)) + (s5-4 *temp-string* arg2 #f 44 320) + ) + ) + ((and (not s4-0) (!= (-> arg0 can-toggle) #t)) + (let ((s3-8 80) + (s5-5 70) + (f30-3 (-> arg2 origin x)) + ) + (set! s3-8 (cond + ((= (get-aspect-ratio) 'aspect4x3) + (empty) + s3-8 + ) + (else + s5-5 + ) + ) + ) + (set! (-> arg2 origin x) (+ f30-3 (the float s3-8))) + ) + (let ((a0-61 arg2)) + (set! (-> a0-61 flags) (font-flags kerning right large)) + ) + (let ((s5-6 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-1l2jnm31lk2m3) #f)) + (s5-6 *temp-string* arg2 #f 44 320) + ) + (let ((v0-32 arg2)) + (set! (-> v0-32 flags) (font-flags kerning large)) + ) + ) + ) + ) + (none) + ) + +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +(defmethod menu-option-method-10 menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 float) + (sv-20 symbol) + (sv-24 int) + (sv-32 float) + (sv-36 float) + (sv-40 symbol) + (sv-44 int) + (sv-48 progress) + (sv-96 int) + (sv-104 int) + (sv-108 float) + (sv-112 int) + (sv-116 int) + (sv-120 vector) + (sv-128 int) + ) + (set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-20 (logtest? (-> *game-info* secrets) (game-secrets big-head))) + (set! sv-24 (the int (-> *game-info* skill-total))) + (set! sv-32 395.0) + (set! sv-36 25.0) + (set! sv-40 arg3) + (set! sv-44 arg2) + (set! sv-48 arg0) + (set! sv-96 (if (not sv-20) + 0 + (-> obj num-items) + ) + ) + (set! sv-104 (if (not sv-20) + (-> obj num-items) + (+ (-> obj num-items) (-> obj num-hero-items)) + ) + ) + (set! sv-108 (* (-> sv-48 sliding) sv-36)) + (set! sv-112 (-> obj item-index)) + (set! sv-116 (-> obj prev-item-index)) + (set! sv-120 (new 'stack-no-clear 'vector)) + (set! sv-128 205) + (if (< sv-16 0.0) + (set! sv-16 (the-as float 0.0)) + ) + (cond + ((or (not (-> *bigmap* progress-minimap)) (< (-> obj item-index) sv-96) (< sv-104 (-> obj item-index))) + (draw-busy-loading arg1) + ) + (else + (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) + (set! (-> obj sprites 0 scale-y) 0.64) + (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16))) + (set! (-> obj sprites 0 pos z) #xffffff) + (set! (-> obj sprites 0 pos w) 0) + (set-hud-piece-position! (the-as basic (-> obj sprites)) 100 128) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-0 (-> s3-0 base)) + ) + (-> obj sprites) + (let ((t9-3 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-3) + ) + (let ((a3-1 (-> s3-0 base))) + (let ((v1-42 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-42) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-42) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-42) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-42) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s4-0 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (set! (-> arg1 alpha) sv-16) + (let ((a0-21 arg1)) + (set! (-> a0-21 flags) (font-flags kerning middle large)) + ) + (let ((a0-22 arg1)) + (set! (-> a0-22 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) 59.0) + (let ((v1-54 arg1)) + (set! (-> v1-54 width) sv-32) + ) + (let ((v1-55 arg1)) + (set! (-> v1-55 height) sv-36) + ) + (let ((v1-56 arg1)) + (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 game-text-id a3-2)) + ) + (let ((v1-58 arg1)) + (set! (-> v1-58 scale) 0.45) + ) + (when (or (= (-> *setting-control* user-default language) (language-enum japanese)) + (= (-> *setting-control* user-default language) (language-enum korean)) + ) + (let ((v1-66 arg1)) + (set! (-> v1-66 scale) 0.53) + ) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (let ((v1-68 arg1)) + (set! (-> v1-68 height) (the float (the-as float #xb9))) + ) + (set! (-> arg1 origin y) 133.0) + ) + (('aspect16x9) + (let ((v1-72 arg1)) + (set! (-> v1-72 height) (the float (the-as float #xb9))) + ) + (set! (-> arg1 origin y) 133.0) + ) + ) + (let ((a0-34 arg1)) + (set! (-> a0-34 flags) (font-flags kerning large)) + ) + (set! (-> arg1 origin x) 100.0) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + "x~D ~S" + sv-24 + (lookup-text! *common-text* (game-text-id progress-1k2ijn1jkn3) #f) + ) + (s4-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) 100.0) + (let ((t9-11 begin-scissor-secret) + (a0-39 sv-120) + ) + sv-48 + (t9-11 a0-39) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! sv-128 195) + ) + ) + (cond + (sv-40 + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) + (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) + ) + ((>= (- sv-112 sv-116) 0) + (when (>= (+ sv-112 -3) sv-96) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) -50 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 -3)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (>= (+ sv-112 -2) sv-96) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) -25 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 -2)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ sv-128 (the int sv-108)))) + (when (>= (+ sv-112 -1) sv-96) + (draw-highlight (+ sv-128 22) 22 sv-16) + (draw-secret-list (-> obj secret-items (+ sv-112 -1)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) + (draw-highlight (+ sv-128 22) 22 sv-16) + (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) + (when (< (+ sv-112 1) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 50 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 1)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 2) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 75 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 2)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 3) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 100 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 3)) sv-48 arg1 0 sv-40 sv-108) + ) + ) + (else + (when (>= (+ sv-112 -2) sv-96) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) -25 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 -2)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ sv-128 (the int sv-108)))) + (if (>= (+ sv-112 -1) sv-96) + (draw-secret-list (-> obj secret-items (+ sv-112 -1)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) + (draw-highlight (+ sv-128 22) 22 sv-16) + (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) + (when (< (+ sv-112 1) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 50 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 1)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 2) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 75 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 2)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 3) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 100 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 3)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 4) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 125 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 4)) sv-48 arg1 0 sv-40 sv-108) + ) + ) + ) + (let ((t9-31 end-scissor-secret)) + sv-120 + #x3f800000 + (t9-31) + ) + (draw-up-down arg1) + ) + ) + 0 + (none) + ) + +(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) + ) + :method-count-assert 9 + :size-assert #x28 + :flag-assert #x900000028 + ) + + +(defun draw-highscore-icon ((arg0 menu-highscores-option) (arg1 uint) (arg2 int) (arg3 int) (arg4 float)) + (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id arg1))) + (set! (-> arg0 sprites 0 scale-x) arg4) + (set! (-> arg0 sprites 0 scale-y) arg4) + (set-hud-piece-position! (the-as basic (-> arg0 sprites)) arg2 arg3) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-1 (-> s4-1 base)) + ) + (-> arg0 sprites) + (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-2) + ) + (let ((a3-1 (-> s4-1 base))) + (let ((v1-8 (the-as object (-> s4-1 base)))) + (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-1 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + ) + +(defun draw-highscore-cup ((arg0 texture-page) (arg1 object) (arg2 int) (arg3 int) (arg4 float) (arg5 float)) + (let ((a0-1 (the-as uint #xc9300300))) + (case arg1 + ((3) + (set! a0-1 (the-as uint #xc9300300)) + ) + ((2) + (set! a0-1 (the-as uint #xc9300a00)) + ) + ((1) + (set! a0-1 (the-as uint #xc9300d00)) + ) + ) + (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 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 basic (&-> arg0 pad 3)) arg2 arg3) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-1 base)) + ) + (&-> arg0 pad 3) + (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-2) + ) + (let ((a3-1 (-> s4-1 base))) + (let ((v1-20 (the-as object (-> s4-1 base)))) + (set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-20) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-20) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-20) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + ) + ) + ) + +(defun get-highscore-score ((arg0 int)) + "TODO - takes and returns an enum?" + (let ((v0-0 11)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 4) + ) + ((= v1-0 1) + (set! v0-0 5) + ) + ((= v1-0 2) + (set! v0-0 6) + ) + ((= v1-0 3) + (set! v0-0 7) + ) + ((= v1-0 4) + (set! v0-0 10) + ) + ((= v1-0 5) + (set! v0-0 13) + ) + ((= v1-0 6) + (set! v0-0 12) + ) + ((= v1-0 7) + (set! v0-0 11) + ) + ((= v1-0 8) + (set! v0-0 14) + ) + ((= v1-0 9) + (set! v0-0 15) + ) + ((= v1-0 10) + (set! v0-0 18) + ) + ((= v1-0 11) + (set! v0-0 17) + ) + ((= v1-0 12) + (set! v0-0 16) + ) + ((= v1-0 13) + (set! v0-0 8) + ) + ((= v1-0 14) + (set! v0-0 9) + ) + ) + ) + v0-0 + ) + ) + +(defun eval-highscore ((arg0 print-highscore-obj)) + (-> *highscore-info-array* (get-highscore-score (-> arg0 index))) + (let ((t9-1 (method-of-type highscore-info highscore-info-method-9))) + (-> arg0 score) + (t9-1) + ) + (none) + ) + +(defun str-print-time ((arg0 float)) + 0 + 0 + 0 + (let* ((gp-0 (the int (* 0.016666668 arg0))) + (v1-5 (- arg0 (* 60.0 (the float gp-0)))) + (s5-0 (the int v1-5)) + (v1-6 (- v1-5 (the float s5-0))) + (s3-0 (the int (* 1000.0 v1-6))) + ) + (format (clear *temp-string*) "~d:~2,'0,d:~3,'0,d" gp-0 s5-0 s3-0) + ) + *temp-string* + ) + +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +(defun print-highscore ((arg0 print-highscore-obj)) + (local-vars (sv-16 font-context) (sv-20 float) (sv-24 int) (sv-32 int) (sv-40 print-highscore-obj)) + (set! sv-16 (-> arg0 context)) + (set! sv-20 (-> arg0 interp)) + (set! sv-24 50) + (set! sv-32 (if (= (get-aspect-ratio) 'aspect4x3) + 320 + 300 + ) + ) + (set! sv-40 arg0) + (let ((a0-1 sv-16)) + (set! (-> a0-1 flags) (font-flags kerning large)) + ) + (+! (-> sv-16 origin x) (the float sv-24)) + (let ((v1-8 (-> sv-40 place))) + (cond + ((zero? v1-8) + (let ((gp-1 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-k1jnb231kjhnb23) #f)) + (gp-1 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 112) + 174 + 0.25 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 1) + (let ((v1-18 sv-16)) + (set! (-> v1-18 scale) 0.5) + ) + (set! (-> sv-16 origin y) (+ 23.0 (-> sv-16 origin y))) + (let ((gp-3 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-loj1n23) #f)) + (gp-3 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 111) + 197 + 0.22 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 2) + (let ((v1-31 sv-16)) + (set! (-> v1-31 scale) 0.4) + ) + (set! (-> sv-16 origin y) (+ 20.0 (-> sv-16 origin y))) + (let ((gp-5 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2k3jn4234) #f)) + (gp-5 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 110) + 217 + 0.2 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 3) + (let ((v1-44 sv-16)) + (set! (-> v1-44 scale) 0.3) + ) + (set! (-> sv-16 origin y) (+ 15.0 (-> sv-16 origin y))) + (let ((gp-7 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2kj3n24kn) #f)) + (gp-7 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 232 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 4) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-9 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2kjn34) #f)) + (gp-9 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 244 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 5) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-11 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2klj342n43) #f)) + (gp-11 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 256 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 6) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-13 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-l2jm342m34) #f)) + (gp-13 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 268 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 7) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-15 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2m342kmj34) #f)) + (gp-15 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 280 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ) + ) + (+! (-> sv-16 origin x) (the float sv-32)) + (let ((a0-67 sv-16)) + (set! (-> a0-67 flags) (font-flags kerning right large)) + ) + (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 320) + ) + ) + (else + (print-game-text (str-print-time (-> sv-40 score)) sv-16 #f 44 320) + ) + ) + (let ((a0-73 sv-16)) + (set! (-> a0-73 flags) (font-flags kerning large)) + ) + (set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32)))) + ) + +;; WARN: Return type mismatch int vs game-text-id. +(defun get-highscore-text ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-0 319)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 323) + ) + ((= v1-0 1) + (set! v0-0 323) + ) + ((= v1-0 2) + (set! v0-0 323) + ) + ((= v1-0 3) + (set! v0-0 323) + ) + ((= v1-0 4) + (set! v0-0 330) + ) + ((= v1-0 5) + (set! v0-0 319) + ) + ((= v1-0 6) + (set! v0-0 319) + ) + ((= v1-0 7) + (set! v0-0 319) + ) + ((= v1-0 8) + (set! v0-0 319) + ) + ((= v1-0 9) + (set! v0-0 319) + ) + ((= v1-0 10) + (set! v0-0 319) + ) + ((= v1-0 11) + (set! v0-0 319) + ) + ((= v1-0 12) + (set! v0-0 319) + ) + ((= v1-0 13) + (set! v0-0 328) + ) + ((= v1-0 14) + (set! v0-0 329) + ) + ) + ) + (the-as game-text-id v0-0) + ) + ) + +;; WARN: Return type mismatch int vs game-text-id. +(defun get-highscore-text-sub ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-0 320)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 324) + ) + ((= v1-0 1) + (set! v0-0 325) + ) + ((= v1-0 2) + (set! v0-0 326) + ) + ((= v1-0 3) + (set! v0-0 327) + ) + ((= v1-0 4) + (set! v0-0 333) + ) + ((= v1-0 5) + (set! v0-0 322) + ) + ((= v1-0 6) + (set! v0-0 321) + ) + ((= v1-0 7) + (set! v0-0 320) + ) + ((= v1-0 8) + (set! v0-0 337) + ) + ((= v1-0 9) + (set! v0-0 338) + ) + ((= v1-0 10) + (set! v0-0 336) + ) + ((= v1-0 11) + (set! v0-0 335) + ) + ((= v1-0 12) + (set! v0-0 334) + ) + ((= v1-0 13) + (set! v0-0 331) + ) + ((= v1-0 14) + (set! v0-0 332) + ) + ) + ) + (the-as game-text-id v0-0) + ) + ) + +(defun get-highscore-icon ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9301000))) + (let ((v1-1 arg0)) + (cond + ((zero? v1-1) + (set! v0-0 (the-as uint #xc9301000)) + ) + ((= v1-1 1) + (set! v0-0 (the-as uint #xc9301200)) + ) + ((= v1-1 2) + (set! v0-0 (the-as uint #xc9301300)) + ) + ((= v1-1 3) + (set! v0-0 (the-as uint #xc9301100)) + ) + ((= v1-1 4) + (set! v0-0 (the-as uint #xc9300e00)) + ) + ((= v1-1 5) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 6) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 7) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 8) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 9) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 10) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 11) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 12) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 13) + (set! v0-0 (the-as uint #xc9301600)) + ) + ((= v1-1 14) + (set! v0-0 (the-as uint #xc9301700)) + ) + ) + ) + v0-0 + ) + ) + +(defun get-highscore-type ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-0 'game)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 'game) + ) + ((= v1-0 5) + (set! v0-0 'race) + ) + ((= v1-0 6) + (set! v0-0 'race) + ) + ((= v1-0 7) + (set! v0-0 'race) + ) + ((= v1-0 8) + (set! v0-0 'race) + ) + ((= v1-0 9) + (set! v0-0 'race) + ) + ((= v1-0 10) + (set! v0-0 'race) + ) + ((= v1-0 11) + (set! v0-0 'race) + ) + ((= v1-0 12) + (set! v0-0 'race) + ) + ((= v1-0 13) + (set! v0-0 'game) + ) + ) + ) + v0-0 + ) + ) + +(defun highscore-available? ((arg0 int)) + (let ((v0-0 #f)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 #t) + ) + ((= v1-0 1) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 75 flags) (game-task-node-flag closed))) + ) + ((= v1-0 2) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets gungame-dark))) + ) + ((= v1-0 3) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets reverse-races))) + ) + ((= v1-0 4) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 63 flags) (game-task-node-flag closed))) + ) + ((= v1-0 5) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 135 flags) (game-task-node-flag closed))) + ) + ((= v1-0 6) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 181 flags) (game-task-node-flag closed))) + ) + ((= v1-0 7) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 209 flags) (game-task-node-flag closed))) + ) + ((= v1-0 8) + (set! v0-0 (or (logtest? (-> *game-info* sub-task-list 308 flags) (game-task-node-flag closed)) + (open? (-> *game-info* sub-task-list 308)) + ) + ) + ) + ((= v1-0 9) + (set! v0-0 (or (logtest? (-> *game-info* sub-task-list 306 flags) (game-task-node-flag closed)) + (open? (-> *game-info* sub-task-list 306)) + ) + ) + ) + ((= v1-0 10) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + ((= v1-0 11) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + ((= v1-0 12) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + ((= v1-0 13) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 149 flags) (game-task-node-flag closed))) + ) + ((= v1-0 14) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 224 flags) (game-task-node-flag closed))) + ) + ) + ) + v0-0 + ) + ) + +(defun get-num-highscores () + (let ((gp-0 0)) + (dotimes (s5-0 15) + (if (highscore-available? s5-0) + (+! gp-0 1) + ) + ) + gp-0 + ) + ) + +(defun get-next-highscore ((arg0 int)) + (let ((s4-0 15) + (s3-0 1) + (gp-0 -1) + ) + (+ arg0 s3-0) + (while (and (= gp-0 -1) (< s3-0 s4-0)) + (let ((s2-0 (+ arg0 s3-0))) + (+! s3-0 1) + (if (highscore-available? (mod s2-0 s4-0)) + (set! gp-0 (mod s2-0 s4-0)) + ) + ) + ) + (if (= gp-0 -1) + (set! gp-0 arg0) + ) + gp-0 + ) + ) + +(defun get-prev-highscore ((arg0 int)) + (let ((s4-0 15) + (s3-0 1) + (gp-0 -1) + ) + (+ arg0 s3-0) + (while (and (= gp-0 -1) (< s3-0 s4-0)) + (let ((s2-0 (- arg0 s3-0))) + (+! s3-0 1) + (if (< s2-0 0) + (set! s2-0 (+ s4-0 s2-0)) + ) + (let ((t9-0 highscore-available?) + (a0-1 (abs s2-0)) + ) + (if (t9-0 a0-1) + (set! gp-0 (abs s2-0)) + ) + ) + ) + ) + (if (= gp-0 -1) + (set! gp-0 arg0) + ) + gp-0 + ) + ) + +(defun get-highscore-icon-scale ((arg0 int)) + "TODO - takes an enum?" + (let ((f0-0 (if (= (get-aspect-ratio) 'aspect4x3) + 1.0 + 1.0 + ) + ) + ) + (let ((f2-0 0.6) + (f1-0 0.8) + ) + (cond + ((zero? arg0) + (set! f0-0 f2-0) + ) + ((= arg0 1) + (set! f0-0 f2-0) + ) + ((= arg0 2) + (set! f0-0 f2-0) + ) + ((= arg0 3) + (set! f0-0 f2-0) + ) + ((= arg0 4) + (set! f0-0 0.5) + ) + ((= arg0 5) + (set! f0-0 f1-0) + ) + ((= arg0 6) + (set! f0-0 f1-0) + ) + ((= arg0 7) + (set! f0-0 f1-0) + ) + ((= arg0 8) + (set! f0-0 f1-0) + ) + ((= arg0 9) + (set! f0-0 f1-0) + ) + ((= arg0 10) + (set! f0-0 f1-0) + ) + ((= arg0 11) + (set! f0-0 f1-0) + ) + ((= arg0 12) + (set! f0-0 f1-0) + ) + ((= arg0 13) + (set! f0-0 0.7) + ) + ((= arg0 14) + (set! f0-0 0.7) + ) + ) + ) + f0-0 + ) + ) + +(defun get-highscore-icon-xoffset () + (if (= (get-aspect-ratio) 'aspect4x3) + 435 + 410 + ) + ) + +(defun get-highscore-icon-yoffset ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-1 (if (= (get-aspect-ratio) 'aspect4x3) + 130 + 120 + ) + ) + ) + (let ((a0-1 130) + (v1-0 120) + ) + (cond + ((zero? arg0) + (set! v0-1 a0-1) + ) + ((= arg0 1) + (set! v0-1 a0-1) + ) + ((= arg0 2) + (set! v0-1 a0-1) + ) + ((= arg0 3) + (set! v0-1 a0-1) + ) + ((= arg0 5) + (set! v0-1 v1-0) + ) + ((= arg0 6) + (set! v0-1 v1-0) + ) + ((= arg0 7) + (set! v0-1 v1-0) + ) + ((= arg0 8) + (set! v0-1 v1-0) + ) + ((= arg0 9) + (set! v0-1 v1-0) + ) + ((= arg0 10) + (set! v0-1 v1-0) + ) + ((= arg0 11) + (set! v0-1 v1-0) + ) + ((= arg0 12) + (set! v0-1 v1-0) + ) + ((= arg0 13) + (set! v0-1 125) + ) + ((= arg0 14) + (set! v0-1 125) + ) + ) + ) + v0-1 + ) + ) + +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +(defmethod menu-option-method-10 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 vector) + (sv-116 print-highscore-obj) + (sv-120 float) + (sv-124 float) + (sv-128 symbol) + (sv-132 int) + (sv-136 progress) + (sv-140 font-context) + (sv-144 menu-highscores-option) + ) + (set! sv-96 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-100 0.22) + (set! sv-104 395.0) + (set! sv-108 (-> arg1 origin x)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (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)) + (set! sv-128 arg3) + (set! sv-132 arg2) + (set! sv-136 arg0) + (set! sv-140 arg1) + (set! sv-144 obj) + (if (< sv-96 0.0) + (set! sv-96 (the-as float 0.0)) + ) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading sv-140) + ) + (else + (set! (-> sv-140 alpha) sv-96) + (let ((v1-16 sv-140)) + (set! (-> v1-16 scale) 1.0) + ) + (let ((a0-4 sv-140)) + (set! (-> a0-4 flags) (font-flags kerning middle large)) + ) + (let ((a0-5 sv-140)) + (set! (-> a0-5 color) (font-color #7efbfb)) + ) + (set! (-> sv-140 origin x) 59.0) + (set! (-> sv-140 origin y) 78.0) + (let ((v1-23 sv-140)) + (set! (-> v1-23 width) sv-104) + ) + (let ((v1-24 sv-140)) + (set! (-> v1-24 height) 215.0) + ) + (begin-scissor sv-112 sv-136) + (set! (-> sv-144 sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc93))) + (set! (-> sv-144 sprites 0 flags) (the-as uint 4)) + (set! (-> sv-144 sprites 0 scale-x) sv-100) + (set! (-> sv-144 sprites 0 scale-y) sv-100) + (set-vector! (-> sv-144 sprites 0 color) 128 128 128 (the int (* 128.0 sv-96))) + (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 (the-as menu-quit-qr-option sv-144) sv-140 sv-96 310 #t 0.8) + (draw-decoration (the-as menu-quit-qr-option sv-144) sv-140 sv-96 310 #t 0.95) + ) + (let ((v1-39 sv-140)) + (set! (-> v1-39 scale) 0.6) + ) + (let ((v1-40 sv-140)) + (set! (-> v1-40 height) 185.0) + ) + (set! (-> sv-140 origin y) (+ 46.0 (-> sv-140 origin y))) + (set! (-> sv-140 origin x) 65.0) + (let ((v1-46 sv-140)) + (set! (-> v1-46 width) (the float (the-as float #x16f))) + ) + (let ((a0-23 sv-140)) + (set! (-> a0-23 flags) (font-flags kerning large)) + ) + (let ((a0-24 sv-140)) + (set! (-> a0-24 color) (font-color #f9f9f9)) + ) + (set! (-> sv-140 origin x) (+ 20.0 sv-120 (-> sv-140 origin x))) + (let ((v1-53 sv-140)) + (set! (-> v1-53 scale) 0.75) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-56 sv-140)) + (set! (-> v1-56 scale) 0.69) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-59 sv-140)) + (set! (-> v1-59 scale) 0.72) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum spanish)) + (let ((v1-62 sv-140)) + (set! (-> v1-62 scale) 0.65) + ) + ) + (let ((gp-1 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text (-> sv-144 page-index)) #f) + ) + (gp-1 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((v1-68 sv-140)) + (set! (-> v1-68 scale) 0.6) + ) + (when (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (let ((v1-76 sv-140)) + (set! (-> v1-76 scale) 0.58) + ) + ) + (let ((gp-2 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text-sub (-> sv-144 page-index)) #f) + ) + (gp-2 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-120))) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((gp-3 draw-highscore-icon) + (s5-3 sv-144) + (s4-3 (get-highscore-icon (-> sv-144 page-index))) + (t9-17 get-highscore-icon-xoffset) + ) + (-> sv-144 page-index) + (gp-3 + s5-3 + s4-3 + (the int (+ (the float (t9-17)) sv-120)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) + ) + ) + (set! sv-108 (-> sv-140 origin x)) + (let ((a0-54 sv-140)) + (set! (-> a0-54 color) (font-color #7efbfb)) + ) + (+! (-> sv-140 origin x) sv-120) + (let ((v1-96 sv-140)) + (set! (-> v1-96 scale) 0.6) + ) + (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)) + (case (get-highscore-type (-> sv-144 page-index)) + (('game) + (set! (-> sv-116 game-score) (the-as basic #t)) + ) + (('race) + (set! (-> sv-116 game-score) #f) + ) + ) + (set! (-> sv-116 context) sv-140) + (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! (-> sv-140 origin x) sv-108) + (let ((v1-120 sv-140)) + (set! (-> v1-120 scale) 0.6) + ) + (set! (-> sv-140 origin x) 59.0) + (set! (-> sv-140 origin y) 78.0) + (let ((v1-125 sv-140)) + (set! (-> v1-125 width) sv-104) + ) + (let ((v1-126 sv-140)) + (set! (-> v1-126 height) 215.0) + ) + (let ((v1-127 sv-140)) + (set! (-> v1-127 scale) 0.5) + ) + (let ((v1-128 sv-140)) + (set! (-> v1-128 height) 185.0) + ) + (set! (-> sv-140 origin y) (+ 46.0 (-> sv-140 origin y))) + (set! (-> sv-140 origin x) 80.0) + (set! (-> sv-144 sprites 0 pos z) #xffffff) + (let ((v1-135 sv-140)) + (set! (-> v1-135 width) sv-104) + ) + (let ((a0-74 sv-140)) + (set! (-> a0-74 flags) (font-flags kerning large)) + ) + (let ((a0-75 sv-140)) + (set! (-> a0-75 color) (font-color #f9f9f9)) + ) + (set! (-> sv-140 origin x) (+ 20.0 sv-124 (-> sv-140 origin x))) + (let ((v1-142 sv-140)) + (set! (-> v1-142 scale) 0.75) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-145 sv-140)) + (set! (-> v1-145 scale) 0.69) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-148 sv-140)) + (set! (-> v1-148 scale) 0.72) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum spanish)) + (let ((v1-151 sv-140)) + (set! (-> v1-151 scale) 0.65) + ) + ) + (let ((gp-6 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text (-> sv-144 prev-page-index)) #f) + ) + (gp-6 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((v1-157 sv-140)) + (set! (-> v1-157 scale) 0.6) + ) + (when (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (let ((v1-165 sv-140)) + (set! (-> v1-165 scale) 0.58) + ) + ) + (let ((gp-7 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text-sub (-> sv-144 prev-page-index)) #f) + ) + (gp-7 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-124))) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((gp-8 draw-highscore-icon) + (s5-8 sv-144) + (s4-6 (get-highscore-icon (-> sv-144 prev-page-index))) + (t9-36 get-highscore-icon-xoffset) + ) + (-> sv-144 page-index) + (gp-8 + s5-8 + s4-6 + (the int (+ (the float (t9-36)) sv-124)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) + ) + ) + (set! sv-108 (-> sv-140 origin x)) + (let ((a0-105 sv-140)) + (set! (-> a0-105 color) (font-color #7efbfb)) + ) + (+! (-> sv-140 origin x) sv-124) + (let ((v1-185 sv-140)) + (set! (-> v1-185 scale) 0.6) + ) + (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)) + (case (get-highscore-type (-> sv-144 prev-page-index)) + (('game) + (set! (-> sv-116 game-score) (the-as basic #t)) + ) + (('race) + (set! (-> sv-116 game-score) #f) + ) + ) + (set! (-> sv-116 context) sv-140) + (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! (-> sv-140 origin x) sv-108) + (let ((v1-210 sv-140)) + (set! (-> v1-210 scale) 0.6) + ) + ) + (if (< 1 (get-num-highscores)) + (draw-previous-next sv-144 sv-140 #t) + ) + (let ((t9-47 end-scissor)) + sv-112 + #x3f800000 + (t9-47) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-on-off-game-vibrations-option ((obj menu-on-off-game-vibrations-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-10 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.65) + ) + (set! (-> arg1 origin y) (+ 15.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* game-options-vibrations))) + (cond + ((and (zero? (-> *progress-state* game-options-item-selected)) (-> *progress-state* game-options-item-picked)) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (cond + ((zero? (-> *progress-state* game-options-item-selected)) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 22 f30-0) + ) + (else + (let ((a0-17 arg1)) + (set! (-> a0-17 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + ) + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-10) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-on-off-game-subtitles-option ((obj menu-on-off-game-subtitles-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-11 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.65) + ) + (set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* game-options-subtitles))) + (cond + ((and (= (-> *progress-state* game-options-item-selected) 1) (-> *progress-state* game-options-item-picked)) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (cond + ((= (-> *progress-state* game-options-item-selected) 1) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 22 f30-0) + ) + (else + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-11) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-subtitle-language-game-option ((obj menu-subtitle-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (with-pp + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (case arg2 + ((2) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + ) + ((3) + (set! (-> arg1 origin y) (+ 32.0 (-> arg1 origin y))) + ) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (let ((s4-0 (&-> *setting-control* user-default subtitle-language))) + (cond + ((and (= (-> *progress-state* game-options-item-selected) 2) (-> *progress-state* game-options-item-picked)) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (-> arg1 origin y)) 44 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (-> obj language-selection) + (let ((s4-1 (-> s4-0 0))) + 7 + (if (-> obj language-transition) + (seekl! (-> obj language-x-offset) 150 (the int (* 10.0 (-> pp clock time-adjust-ratio)))) + ) + (when (>= (-> obj language-x-offset) 75) + (set! (-> obj language-selection) (the-as uint s4-1)) + (set! (-> obj language-transition) #f) + (set! (-> obj language-x-offset) 0) + 0 + ) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color #7efbfb)) + ) + (let ((v1-33 arg1)) + (set! (-> v1-33 scale) 0.5) + ) + (let ((a0-14 arg1)) + (set! (-> a0-14 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s5-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (let ((v1-43 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-subtitle-language-index))) + 7 + (-> *progress-state* game-options-subtitle-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-43) #f) arg1 #f 44 320) + ) + ) + (else + (cond + ((= (-> *progress-state* game-options-item-selected) 2) + (let ((s4-4 arg1)) + (set! (-> s4-4 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 24 f30-0) + ) + (else + (let ((a0-31 arg1)) + (set! (-> a0-31 color) (font-color #7efbfb)) + ) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 0.65) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (let ((v1-54 arg1)) + (set! (-> v1-54 scale) 0.5) + ) + (let ((a0-36 arg1)) + (set! (-> a0-36 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (let ((a0-37 arg1)) + (set! (-> a0-37 flags) (font-flags kerning middle large)) + ) + (let ((v1-61 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-subtitle-language-index))) + 7 + (-> *progress-state* game-options-subtitle-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-61) #f) arg1 #f 44 320) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod menu-option-method-10 menu-language-game-option ((obj menu-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (with-pp + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (case arg2 + ((2) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + ) + ((3) + (set! (-> arg1 origin y) (+ 32.0 (-> arg1 origin y))) + ) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (let ((s4-0 (&-> *setting-control* user-default language))) + (cond + ((and (= (-> *progress-state* game-options-item-selected) 3) (-> *progress-state* game-options-item-picked)) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (-> arg1 origin y)) 44 f30-0) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + (s3-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (-> obj language-selection) + (let ((s4-1 (-> s4-0 0))) + 7 + (if (-> obj language-transition) + (seekl! (-> obj language-x-offset) 150 (the int (* 10.0 (-> pp clock time-adjust-ratio)))) + ) + (when (>= (-> obj language-x-offset) 75) + (set! (-> obj language-selection) (the-as uint s4-1)) + (set! (-> obj language-transition) #f) + (set! (-> obj language-x-offset) 0) + 0 + ) + ) + (let ((a0-14 arg1)) + (set! (-> a0-14 color) (font-color #7efbfb)) + ) + (let ((v1-33 arg1)) + (set! (-> v1-33 scale) 0.5) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s5-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (let ((v1-43 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-language-index))) + 7 + (-> *progress-state* game-options-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-43) #f) arg1 #f 44 320) + ) + ) + (else + (cond + ((= (-> *progress-state* game-options-item-selected) 3) + (let ((s3-1 arg1)) + (set! (-> s3-1 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 24 f30-0) + ) + (else + (let ((a0-33 arg1)) + (set! (-> a0-33 color) (font-color #7efbfb)) + ) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 0.65) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + (s3-2 *temp-string* arg1 #f 44 320) + ) + (let ((v1-54 arg1)) + (set! (-> v1-54 scale) 0.5) + ) + (let ((a0-40 arg1)) + (set! (-> a0-40 color) (font-color #7efbfb)) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *language-name-remap* (-> s4-0 0)) #f)) + *temp-string* + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (let ((a0-44 arg1)) + (set! (-> a0-44 flags) (font-flags kerning middle large)) + ) + (let ((v1-66 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-language-index))) + 7 + (-> *progress-state* game-options-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-66) #f) arg1 #f 44 320) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defmethod menu-option-method-10 menu-sub-menu-game-option ((obj menu-sub-menu-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f0-1 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + 395.0 + (-> arg1 origin y) + (-> arg1 scale) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (set! (-> arg1 alpha) f0-1) + (let ((a1-1 arg1)) + (set! (-> a1-1 flags) (font-flags kerning middle large)) + ) + (if (= (-> *setting-control* user-default language) (language-enum spanish)) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f0-1 283 #f 0.85) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f0-1 283 #f 0.95) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-aspect-ratio-option ((obj menu-aspect-ratio-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-12 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning middle large)) + ) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.75) + ) + (set! (-> arg1 height) 35.0) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* graphic-options-aspect-ratio))) + (cond + ((and (= (-> *progress-state* graphic-options-item-selected) 1) + (-> *progress-state* graphic-options-item-picked) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 23.0 (-> arg1 origin y))) + (cond + ((= s3-0 'aspect4x3) + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (when (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (cond + ((= (-> *progress-state* graphic-options-item-selected) 1) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 25 f30-0) + ) + (else + (let ((a0-21 arg1)) + (set! (-> a0-21 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 23.0 (-> arg1 origin y))) + (cond + ((= s3-0 'aspect4x3) + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + ) + ) + ) + ) + (if (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (print-menu-text (the-as game-text-id a0-12) (-> obj scale) arg1 arg0) + ) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 284 #f 0.95) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-on-off-progressive-scan-graphic-option ((obj menu-on-off-progressive-scan-graphic-option) + (arg0 progress) + (arg1 font-context) + (arg2 int) + (arg3 symbol) + ) + (local-vars (a0-11 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.75) + ) + (set! (-> arg1 height) 35.0) + (set! (-> arg1 origin y) (+ 35.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* graphic-options-progressive-scan))) + (cond + ((and (= (-> *progress-state* graphic-options-item-selected) 2) + (-> *progress-state* graphic-options-item-picked) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (when (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (cond + ((= (-> *progress-state* graphic-options-item-selected) 2) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 24 f30-0) + ) + (else + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + ) + ) + ) + (if (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (print-menu-text (the-as game-text-id a0-11) (-> obj scale) arg1 arg0) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-center-screen-graphic-option ((obj menu-center-screen-graphic-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (set! (-> arg1 height) 35.0) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.75) + ) + (cond + ((and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + (let ((v1-10 arg1)) + (set! (-> v1-10 scale) 0.6) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (set! (-> arg1 width) 350.0) + (set! (-> arg1 height) 60.0) + (set! (-> arg1 origin x) 80.0) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ 5.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 30.0 (-> arg1 origin y))) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-23 arg1)) + (set! (-> v1-23 scale) 0.55) + ) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 21.0 (-> arg1 origin y))) + (let ((s5-2 print-game-text)) + (format + (clear *temp-string*) + "~33L~C~34L~S~33L~C" + 163 + (lookup-text! *common-text* (game-text-id progress-1k2jn1kj2n3) #f) + 161 + ) + (s5-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 21.0 (-> arg1 origin y))) + (let ((s5-3 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-3 *temp-string* arg1 #f 44 320) + ) + (+! (-> arg1 origin y) + (the float (if (and (= (-> *progress-state* starting-state) 'title) (= (scf-get-territory) 1)) + 100 + 80 + ) + ) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ -3.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 10.0 (-> arg1 origin y))) + ) + ) + (let ((v1-37 arg1)) + (set! (-> v1-37 scale) 0.5) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-2kj3n2kji3n42) #f) arg1 #f 44 320) + ) + (else + (set! (-> arg1 origin y) (+ 5.0 (-> arg1 origin y))) + (cond + ((zero? (-> *progress-state* graphic-options-item-selected)) + (let ((s4-3 arg1)) + (set! (-> s4-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 25 f30-0) + ) + (else + (let ((a0-31 arg1)) + (set! (-> a0-31 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-restart-mission-qr-option ((obj menu-restart-mission-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-11 string)) + (let ((f0-1 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (set! (-> arg1 alpha) f0-1) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.75) + ) + (set! (-> arg1 height) 35.0) + (set! (-> arg1 origin y) (+ 5.0 (-> arg1 origin y))) + (let ((s4-0 (&-> *progress-state* yes-no-choice))) + (set! a0-11 + (cond + ((and (zero? (-> *progress-state* qr-options-item-selected)) (-> *progress-state* qr-options-item-picked)) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f0-1) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (let ((v1-17 arg1)) + (set! (-> v1-17 scale) 0.6) + ) + (cond + ((-> s4-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + a0-11 + ) + (else + (if (and (= (-> arg0 option-index) arg2) (zero? (-> *progress-state* qr-options-item-selected))) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 26 f0-1) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + *temp-string* + ) + ) + ) + ) + ) + (print-game-text a0-11 arg1 #f 44 320) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-quit-qr-option ((obj menu-quit-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-12 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.75) + ) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (set! (-> arg1 height) 35.0) + (let ((s4-0 (&-> *progress-state* yes-no-choice))) + (set! a0-12 + (cond + ((and (= (-> *progress-state* qr-options-item-selected) 1) (-> *progress-state* qr-options-item-picked)) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f30-0) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (let ((v1-18 arg1)) + (set! (-> v1-18 scale) 0.6) + ) + (cond + ((-> s4-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-12 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-12 *temp-string*) + ) + ) + a0-12 + ) + (else + (if (and (= (-> arg0 option-index) arg2) (= (-> *progress-state* qr-options-item-selected) 1)) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 26 f30-0) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + *temp-string* + ) + ) + ) + ) + (print-game-text a0-12 arg1 #f 44 320) + (cond + ((= (-> *setting-control* user-default language) (language-enum french)) + (draw-decoration obj arg1 f30-0 371 #f 0.8) + ) + ((= (-> *setting-control* user-default language) (language-enum german)) + (draw-decoration obj arg1 f30-0 371 #f 0.7) + ) + (else + (draw-decoration obj arg1 f30-0 371 #f 0.95) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (v0-42 none) + (sv-16 progress) + (sv-32 symbol) + (sv-48 int) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 pointer) + (sv-144 (function string font-context symbol int int float)) + (sv-160 uint) + (sv-176 dma-buffer) + (sv-192 pointer) + (sv-208 pointer) + (sv-224 (function string font-context symbol int int float)) + (sv-240 uint) + (sv-256 dma-buffer) + (sv-272 pointer) + ) + (set! sv-16 arg0) + (let ((s5-0 arg1) + (gp-0 arg2) + ) + (set! sv-32 arg3) + (let ((f30-0 (* 2.0 (- 0.5 (-> sv-16 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) + (set! v0-42 + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading s5-0) + v0-42 + ) + (else + (let ((v1-13 s5-0)) + (set! (-> v1-13 scale) 0.6) + ) + (set! (-> s5-0 origin y) (+ 20.0 (-> s5-0 origin y))) + (case (get-aspect-ratio) + (('aspect4x3) + (set! s2-0 157) + (let ((v1-17 gp-0)) + (cond + ((zero? v1-17) + (set! (-> s5-0 origin y) (+ -24.0 (-> s5-0 origin y))) + (+! s2-0 -9) + ) + ((= v1-17 1) + (set! (-> s5-0 origin y) (+ -9.0 (-> s5-0 origin y))) + (+! s2-0 43) + ) + ((= v1-17 2) + (set! (-> s5-0 origin y) (+ 6.0 (-> s5-0 origin y))) + (+! 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) + (set! (-> s5-0 origin y) (+ -20.0 (-> s5-0 origin y))) + (+! s2-0 -20) + ) + ((= v1-28 1) + (set! (-> s5-0 origin y) (+ 2.0 (-> s5-0 origin y))) + (+! s2-0 40) + ) + ((= v1-28 2) + (set! (-> s5-0 origin y) (+ 30.0 (-> s5-0 origin y))) + (+! s2-0 105) + ) + ) + ) + ) + ) + (let ((a0-11 s5-0)) + (set! (-> a0-11 flags) (font-flags kerning large)) + ) + (set! (-> s5-0 origin x) (the float sv-48)) + (cond + (sv-32 + (set! sv-128 (-> obj value-to-modify)) + (set! (-> s5-0 origin y) (+ -8.0 (-> s5-0 origin y))) + (let ((a0-12 s5-0)) + (set! (-> a0-12 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 52 f30-0) + (set! sv-144 print-game-text) + (let ((a0-15 (lookup-text! *common-text* (-> obj name) #f)) + (a1-3 s5-0) + (a2-3 #f) + (a3-1 44) + (t0-1 320) + ) + (sv-144 a0-15 a1-3 a2-3 a3-1 t0-1) + ) + (set! sv-160 + (logior (logand (logior (logand (logior (logand (logior (logand (the-as uint #x8000ffff) -256) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) 56) 56) + ) + -65281 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (the int (* 128.0 f30-0)) 56) 32) + ) + ) + (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) + (set-vector! (-> obj sprites 0 color) 128 128 128 (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) + (set-vector! (-> obj sprites 1 color) 128 128 128 (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) + (set-vector! (-> obj sprites 2 color) sv-80 sv-96 sv-112 (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) + (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 0) + (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! + (the-as basic (-> obj sprites 1)) + (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) + (+ s2-0 -4) + ) + (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set! sv-176 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-192 (-> sv-176 base)) + (-> obj sprites) + (let ((t9-13 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-13) + ) + (draw-sprite2d-xy + sv-176 + (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) + (+ s2-0 7) + (- 240 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) + 9 + (the-as rgba sv-160) + ) + (-> obj sprites 1) + (let ((t9-15 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-15) + ) + (-> obj sprites 2) + (let ((t9-16 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-16) + ) + (-> obj sprites 3) + (let ((t9-17 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-17) + ) + (let ((a3-6 (-> sv-176 base))) + (let ((v1-100 (the-as object (-> sv-176 base)))) + (set! (-> (the-as dma-packet v1-100) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-100) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-100) vif1) (new 'static 'vif-tag)) + (set! (-> sv-176 base) (&+ (the-as pointer v1-100) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + sv-192 + (the-as (pointer dma-tag) a3-6) + ) + ) + (+! (-> s5-0 origin x) (the float s3-0)) + (let ((a0-71 s5-0)) + (set! (-> a0-71 flags) (font-flags kerning right large)) + ) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-128))))) + (s3-1 *temp-string* s5-0 #f 44 320) + ) + (let ((a0-75 s5-0)) + (set! (-> a0-75 flags) (font-flags kerning large)) + ) + ) + (else + (set! sv-208 (-> obj value-to-modify)) + (set! (-> s5-0 origin y) (+ -8.0 (-> s5-0 origin y))) + (when (or (= (-> *setting-control* user-default language) (language-enum german)) + (= (-> *setting-control* user-default language) (language-enum french)) + ) + (let ((v1-121 s5-0)) + (set! (-> v1-121 scale) 0.56) + ) + ) + (if (= (-> sv-16 option-index) gp-0) + (draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 24 f30-0) + ) + (set! sv-224 print-game-text) + (let ((a0-81 (lookup-text! *common-text* (-> obj name) #f)) + (a1-21 s5-0) + (a2-18 #f) + (a3-8 44) + (t0-4 320) + ) + (sv-224 a0-81 a1-21 a2-18 a3-8 t0-4) + ) + (set! sv-240 + (logior (logand (logior (logand (logior (logand (logior (logand (the-as uint #x8000ffff) -256) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) 56) 56) + ) + -65281 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (the int (* 128.0 f30-0)) 56) 32) + ) + ) + (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) + (set-vector! (-> obj sprites 0 color) 128 128 128 (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) + (set-vector! (-> obj sprites 1 color) 128 128 128 (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) + (set-vector! (-> obj sprites 2 color) sv-80 sv-96 sv-112 (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) + (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 0) + (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! + (the-as basic (-> obj sprites 1)) + (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) + (+ s2-0 -4) + ) + (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set! sv-256 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-272 (-> sv-256 base)) + (-> obj sprites) + (let ((t9-33 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-33) + ) + (draw-sprite2d-xy + sv-256 + (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) + (+ s2-0 7) + (- 240 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) + 9 + (the-as rgba sv-240) + ) + (-> obj sprites 1) + (let ((t9-35 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-35) + ) + (-> obj sprites 2) + (let ((t9-36 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-36) + ) + (-> obj sprites 3) + (let ((t9-37 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-37) + ) + (let ((a3-13 (-> sv-256 base))) + (let ((v1-183 (the-as object (-> sv-256 base)))) + (set! (-> (the-as dma-packet v1-183) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-183) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-183) vif1) (new 'static 'vif-tag)) + (set! (-> sv-256 base) (&+ (the-as pointer v1-183) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + sv-272 + (the-as (pointer dma-tag) a3-13) + ) + ) + (+! (-> s5-0 origin x) (the float s3-0)) + (let ((a0-137 s5-0)) + (set! (-> a0-137 flags) (font-flags kerning right large)) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-208))))) + (s3-2 *temp-string* s5-0 #f 44 320) + ) + (let ((a0-141 s5-0)) + (set! (-> a0-141 flags) (font-flags kerning large)) + ) + ) + ) + (if (zero? gp-0) + (draw-sound-options-decoration obj s5-0 f30-0 (the-as symbol 285) (the-as game-text-id #f)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod menu-option-method-10 menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (s5-0 int)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading arg1) + ) + ((begin + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ 32.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + ) + ) + (set! s5-0 (-> *setting-control* user-default stereo-mode)) + arg3 + ) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 42 f30-0) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + (s3-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y))) + (let ((a0-13 arg1)) + (set! (-> a0-13 color) (font-color #7efbfb)) + ) + (let ((v1-22 arg1)) + (set! (-> v1-22 scale) 0.5) + ) + (let ((a0-15 arg1)) + (set! (-> a0-15 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s4-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s4-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s4-3 arg1)) + (set! (-> s4-3 color) (the-as font-color (progress-selected 0))) + ) + (let ((a0-23 arg1)) + (set! (-> a0-23 flags) (font-flags kerning middle large)) + ) + (print-game-text (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f) arg1 #f 44 320) + ) + (else + (if (= (-> arg0 option-index) arg2) + (draw-highlight (the int (-> arg1 origin y)) 21 f30-0) + ) + (let ((v1-37 arg1)) + (set! (-> v1-37 scale) 0.65) + ) + (let ((s3-4 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> obj name) #f)) + (s3-4 *temp-string* arg1 #f 44 320) + ) + (let ((v1-39 arg1)) + (set! (-> v1-39 scale) 0.5) + ) + (let ((a0-33 arg1)) + (set! (-> a0-33 color) (font-color #7efbfb)) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f)) + (let ((a0-37 *temp-string*)) + (set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y))) + (let ((a1-19 arg1)) + (set! (-> a1-19 flags) (font-flags kerning middle large)) + ) + (print-game-text a0-37 arg1 #f 44 320) + ) + ) + ) + ) + 0 + (none) + ) + +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 349] +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 361] +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 417] +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 435] +(defmethod menu-option-method-10 menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 dma-buffer)) + (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) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.6) + ) + (cond + ((= *title* (-> arg0 current-options)) + (let ((v1-8 arg1)) + (set! (-> v1-8 scale) 0.85) + ) + (set! (-> arg1 height) 40.0) + (set! s1-0 36) + (+! s2-0 -8) + (when (memcard-unlocked-secrets? #f) + (set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y))) + (set! s1-0 36) + (+! s2-0 -34) + ) + ) + ((= *options* (-> arg0 current-options)) + (set! (-> arg1 origin y) (+ -20.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 scale) 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 (progress-selected 0)) + (font-color #7efbfb) + ) + ) + ) + (cond + ((= arg2 (-> arg0 option-index)) + (let ((s0-1 arg1)) + (set! (-> s0-1 color) (the-as font-color (progress-selected 0))) + ) + ) + (else + (let ((a0-9 arg1)) + (set! (-> a0-9 color) (font-color #7efbfb)) + ) + ) + ) + (if (and (and (= arg2 (-> arg0 option-index)) (!= 298 (-> obj name))) + (not (and (= (-> obj name) (game-text-id progress-kj1bn23kj1n23)) + (= *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) (game-text-id progress-n2jk3n45234)) + (cond + ((= arg2 (-> arg0 option-index)) + (let ((v1-39 arg1)) + (set! (-> v1-39 scale) 0.5) + ) + ) + (else + (let ((v1-40 arg1)) + (set! (-> v1-40 scale) 0.45) + ) + ) + ) + (set! (-> arg1 origin y) (+ -120.0 (-> arg1 origin y))) + (set! (-> arg1 origin x) (- (-> 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) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + (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) + (set! sv-16 (-> *display* frames (-> *display* on-screen) global-buf)) + (let ((s0-2 (-> sv-16 base))) + (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))) + ) + (let ((a3-3 (-> sv-16 base))) + (let ((v1-62 (the-as object (-> sv-16 base)))) + (set! (-> (the-as dma-packet v1-62) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag)) + (set! (-> sv-16 base) (&+ (the-as pointer v1-62) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s0-2 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + ) + (let ((v1-70 (&-> obj unknown-options 3))) + (set! (-> v1-70 0) (the-as menu-option 64)) + (set! (-> v1-70 1) (the-as menu-option 128)) + (set! (-> v1-70 2) (the-as menu-option 128)) + (set! (-> v1-70 3) (the-as menu-option (the int (* 128.0 f30-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option 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 + (the-as menu-memcard-slot-option obj) + (the float (+ s4-1 s3-1)) + (the float (+ s4-1 s3-1)) + (the float s2-4) + (the float (+ s2-4 (* s1-1 arg2))) + ) + (let* ((s0-3 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-1 (-> s0-3 base)) + ) + (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))) + ) + (let ((a3-7 (-> s0-3 base))) + (let ((v1-87 (the-as object (-> s0-3 base)))) + (set! (-> (the-as dma-packet v1-87) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-87) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-87) vif1) (new 'static 'vif-tag)) + (set! (-> s0-3 base) (&+ (the-as pointer v1-87) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + gp-1 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + ) + ) + ) + (else + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + (set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y))) + ) + ) + ) + ((= *load-save-options* (-> arg0 current-options)) + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + (set! (-> arg1 origin y) (+ -25.0 (-> arg1 origin y))) + (print-menu-text (the-as game-text-id (lookup-text! *common-text* (-> obj name) #f)) (-> obj scale) arg1 arg0) + ) + ((and (= *title* (-> arg0 current-options)) (= 339 (-> obj name)) (memcard-unlocked-secrets? #f)) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + ) + ((!= (-> obj name) (game-text-id progress-kj1bn23kj1n23)) + (print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 320) + ) + ) + ) + ) + 0 + (none) + ) diff --git a/goal_src/jak2/engine/ui/progress/progress-h.gc b/goal_src/jak2/engine/ui/progress/progress-h.gc index 44f3913a5b..f0ac909a9f 100644 --- a/goal_src/jak2/engine/ui/progress/progress-h.gc +++ b/goal_src/jak2/engine/ui/progress/progress-h.gc @@ -16,7 +16,7 @@ (define-extern activate-progress (function process symbol none)) (define-extern memcard-unlocked-secrets? (function symbol symbol)) -(define-extern progress-selected (function int none :behavior progress)) +(define-extern progress-selected (function int int :behavior progress)) (define-extern get-num-highscores (function int)) (define-extern get-next-highscore (function int int)) (define-extern get-prev-highscore (function int int)) @@ -73,11 +73,11 @@ (deftype menu-option (basic) - ((name uint32 :offset-assert 4) - (scale basic :offset-assert 8) - (unknown function :offset-assert 12) - (box menu-option 1 :offset-assert 16) - (unknown-options menu-option 7 :offset-assert 20) + ((name game-text-id :offset-assert 4) + (scale float :offset-assert 8) + (unknown function :offset-assert 12) + (box menu-option 1 :offset-assert 16) + (unknown-options menu-option 7 :offset-assert 20) ) :method-count-assert 12 :size-assert #x30 @@ -192,8 +192,9 @@ (deftype menu-memcard-slot-option (menu-option) - ((sprites hud-sprite 5 :inline :offset-assert 48) - (pad uint8 32 :offset-assert 368) + ((sprites hud-sprite 5 :inline :offset-assert 48) + (something-hud-related basic :offset 112) + (pad uint8 32 :offset-assert 368) ) :method-count-assert 12 :size-assert #x190 @@ -576,4 +577,3 @@ :size-assert #x54 :flag-assert #xc00000054 ) - diff --git a/goal_src/jak2/engine/ui/progress/progress-static.gc b/goal_src/jak2/engine/ui/progress/progress-static.gc index 3af33c2c34..c52cff927f 100644 --- a/goal_src/jak2/engine/ui/progress/progress-static.gc +++ b/goal_src/jak2/engine/ui/progress/progress-static.gc @@ -144,7 +144,7 @@ ) (define *stereo-mode-name-remap* - (the-as (array uint64) (new 'static 'boxed-array :type uint32 #x104 #x105 #x106)) + (the-as (array game-text-id) (new 'static 'boxed-array :type uint32 #x104 #x105 #x106)) ) (define *hud-ring-graphic-remap* diff --git a/goal_src/jak2/engine/ui/progress/progress.gc b/goal_src/jak2/engine/ui/progress/progress.gc index 1c0057c923..028ac9a9e8 100644 --- a/goal_src/jak2/engine/ui/progress/progress.gc +++ b/goal_src/jak2/engine/ui/progress/progress.gc @@ -56,7 +56,7 @@ (total-num-tasks int32 :offset-assert 208) (scene-player-act int32 :offset-assert 212) (stereo-mode-backup int32 :offset-assert 216) - (secrets-unlocked basic :offset-assert 220) + (secrets-unlocked symbol :offset-assert 220) (missions-total-spacing float :offset-assert 224) (clear-screen basic :offset-assert 228) ) @@ -1189,7 +1189,6 @@ ;; WARN: Stack slot offset 148 signed mismatch ;; WARN: Stack slot offset 148 signed mismatch ;; WARN: Stack slot offset 148 signed mismatch -;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 111] (defbehavior progress-post progress () (local-vars (sv-144 font-context) (sv-148 int) (sv-152 hud-box) (sv-156 symbol)) (when (-> self current-options) diff --git a/goal_src/jak2/engine/ui/text-h.gc b/goal_src/jak2/engine/ui/text-h.gc index 37f19662c8..82b7be96a9 100644 --- a/goal_src/jak2/engine/ui/text-h.gc +++ b/goal_src/jak2/engine/ui/text-h.gc @@ -13,6 +13,8 @@ This function made more sense back when text files were split up, but in the end they put everything in a single text group and file." (function int none)) +(define-extern print-game-text-scaled "Print text, with a given scaling" (function string float font-context int none)) +(define-extern print-game-text "Print text." (function string font-context symbol int int float)) ;; DECOMP BEGINS diff --git a/goal_src/jak2/engine/ui/text-id-h.gc b/goal_src/jak2/engine/ui/text-id-h.gc index f4b5e2a09d..c2cb97eade 100644 --- a/goal_src/jak2/engine/ui/text-id-h.gc +++ b/goal_src/jak2/engine/ui/text-id-h.gc @@ -5,12 +5,105 @@ ;; name in dgo: text-id-h ;; dgos: ENGINE, GAME -;; DECOMP BEGINS - +;; +++game-text-id (defenum game-text-id :type uint32 :bitfield #f -;; GAME-TEXT-ID ENUM BEGINS (pause 257) -;; GAME-TEXT-ID ENUM ENDS + (progress-on-off-1TODO 270) + (progress-on-off-2TODO 271) + (progress-1k2jn1kj2n3 272) + (progress-kj1231nj23 286) + (progress-12434g343v 287) + (progress-video-asda 288) + (progress-video-j1n2 289) + (progress-draw-yes-or-no-1-TODO 292) + (progress-draw-yes-or-no-2-TODO 293) + (progress-1kj2n3kj1n23 296) + (progress-n2jk3n45234 298) + (progress-1ikjhb231hjik2b31ihb231 303) + (progress-kj1n23123 308) + (progress-k1jnb231kjhnb23 311) + (progress-loj1n23 312) + (progress-2k3jn4234 313) + (progress-2kj3n24kn 314) + (progress-2kjn34 315) + (progress-2klj342n43 316) + (progress-l2jm342m34 317) + (progress-2m342kmj34 318) + (progress-kj1bn23kj1n23 339) + (progress-1l2jnm31lk2m3 340) + (progress-unlocked-oj1n23jn1 345) + (progress-unlocked-k1231kkj 346) + (progress-unlocked-jn12j 347) + (progress-unlocked-m12312 348) + (progress-unlocked-1231h2bn 349) + (progress-unlocked-akjisndaj 350) + (progress-unlocked-iwudnq 351) + (progress-unlocked-n51i51n 352) + (progress-1k2ijn1jkn3 360) + (progress-1kjn2jn31kj3 361) + (progress-1kj2n31j23 367) + (progress-iko1jn231kjhn23 368) + (progress-1klj2n31j2n3 369) + (progress-i1un23i12b341 370) + (progress-2kj3n2kji3n42 377) + (progress-draw-continue-retry-1-TODO 382) + (progress-1klj2n31j23 383) + (progress-j1n23j1kn23kjn12 395) + (progress-2j021j394j 396) + (progress-kj6n324i63n 397) + (progress-3iou4n3i45n3 398) + (progress-39u4n359n45 399) + (progress-iun34593n45 400) + (progress-on2394234n 401) + (progress-l1jkn231jkn23 402) + (progress-kj1n231kjn2 403) + (progress-1lkjn231jnk2 404) + (progress-n12n211n1n 405) + (progress-2iu3bn4289u34n 406) + (progress-oj1n23kj1n23123 409) + (progress-1kjn231kjn23 410) + (progress-1kj2b31k2b3 411) + (progress-j1nb23kj1hbn2 412) + (progress-1kj2bkoij1231 413) + (progress-1nmn1221n21n12n 414) + (progress-busy-loading-TODO 416) + (progress-1jib12o3nj12j3 419) + (progress-1m23n1n23n21 420) + (progress-1jk2n31jkn23n1j 421) + (progress-1n23kjn12nk3j12 422) + (progress-draw-continue-retry-2-TODO 423) + (progress-kj12k3j1n23n 424) + (progress-1kj2bn31kjhnb2 426) + (progress-jk1n23kj1n2 429) + (progress-k1jn23k1h23b 430) + (progress-k1jn23kj1n23 431) + (progress-1kjn231j2 432) + (progress-1kj2n31kjn231 433) + (progress-1kj2n31jkn23 434) + (progress-1kjn2123919 435) + (progress-jn12n3j1n2 436) + (progress-n12jin313 437) + (progress-main-23jn42 531) + (progress-main-63j46j3n4 532) + (progress-main-m123j1m 533) + (progress-main-634jn6 534) + (progress-main-52o352nm 535) + (progress-main-63jk46n3 536) + (progress-main-j324nm3 537) + (progress-main-k1j2n3n1 538) + (progress-main-6mn346mn 539) + (progress-main-63jn463jn 540) + (progress-main-63j46n3j 541) + (progress-main-52kj3n52 542) + (progress-main-52jn35j2 543) + (progress-main-3643m6m 544) + (progress-main-36j46jn 545) + (progress-main-63mn46nm 546) + (progress-main-364jn6n 547) + (progress-ikj123i1khb231 784) ) +;; ---game-text-id + +;; DECOMP BEGINS diff --git a/test/decompiler/reference/jak2/engine/data/art-h_REF.gc b/test/decompiler/reference/jak2/engine/data/art-h_REF.gc index a507df7d02..73526e75d3 100644 --- a/test/decompiler/reference/jak2/engine/data/art-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/data/art-h_REF.gc @@ -611,7 +611,7 @@ (get-skeleton-origin (_type_) vector 9) (draw-control-method-10 () none 10) (draw-control-method-11 () none 11) - (draw-control-method-12 (_type_ int int) none 12) + (draw-control-method-12 (_type_ uint int) none 12) (draw-control-method-13 () none 13) (draw-control-method-14 (_type_ cspace-array joint-control) none 14) ) diff --git a/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc b/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc index 511b11744e..689eaef7a2 100644 --- a/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc +++ b/test/decompiler/reference/jak2/engine/game/game-info-h_REF.gc @@ -262,7 +262,7 @@ (last-continue continue-point :offset-assert 244) (play-list (array game-task-info) :offset-assert 248) (sub-task-list (array game-task-node-info) :offset-assert 252) - (unknown-pad5 array :offset-assert 256) + (mission-list (array game-task-node-info) :offset-assert 256) (task-counter uint32 :offset-assert 260) (unknown-pad6 uint32 :offset-assert 264) (level-opened uint8 32 :offset-assert 268) diff --git a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc index 83d7350cf9..a2ac5704fe 100644 --- a/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/jak2/engine/target/logic-target_REF.gc @@ -1899,11 +1899,11 @@ (when (!= (-> self beard?) v1-248) (cond (v1-248 - (draw-control-method-12 (-> self draw) 2 0) + (draw-control-method-12 (-> self draw) (the-as uint 2) 0) (set! (-> self beard?) #t) ) (else - (draw-control-method-12 (-> self draw) 0 2) + (draw-control-method-12 (-> self draw) (the-as uint 0) 2) (set! (-> self beard?) #f) ) ) 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 new file mode 100644 index 0000000000..7e6019e1e9 --- /dev/null +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-draw_REF.gc @@ -0,0 +1,8036 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function progress-selected +(defbehavior progress-selected progress ((arg0 int)) + (let ((gp-0 33)) + (cond + ((< 4 (the-as int (logand (-> self clock integral-frame-counter) 7))) + (set! (-> *progress-state* color-flash-counter) 1) + ) + ((< (the-as int (logand (-> self clock integral-frame-counter) 7)) 4) + (set! (-> *progress-state* color-flash-counter) 0) + 0 + ) + ) + (cond + ((zero? (-> *progress-state* color-flash-counter)) + (set-font-color gp-0 0 64 128 128) + (set-font-color gp-0 1 64 128 128) + ) + (else + (set-font-color gp-0 0 255 255 255) + (set-font-color gp-0 1 255 255 255) + ) + ) + gp-0 + ) + ) + +;; definition for function draw-percent-bar +;; WARN: Return type mismatch int vs none. +(defun draw-percent-bar ((arg0 int) (arg1 int) (arg2 float) (arg3 rgba)) + (let* ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s2-0 base)) + ) + (draw-sprite2d-xy s2-0 arg0 arg1 255 14 (new 'static 'rgba :a (-> arg3 a))) + (draw-sprite2d-xy s2-0 arg0 (+ arg1 2) (the int (* 255.0 arg2)) 10 arg3) + (let ((a3-3 (-> s2-0 base))) + (let ((v1-8 (the-as object (-> s2-0 base)))) + (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + gp-0 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + 0 + (none) + ) + +;; definition for function draw-highlight +(defun draw-highlight ((arg0 int) (arg1 int) (arg2 float)) + (let* ((s3-0 (if (= (get-aspect-ratio) 'aspect4x3) + 70 + 79 + ) + ) + (a3-0 (if (= (get-aspect-ratio) 'aspect4x3) + 374 + 355 + ) + ) + (s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-2 (-> s2-0 base)) + ) + (draw-sprite2d-xy + s2-0 + s3-0 + arg0 + a3-0 + arg1 + (new 'static 'rgba :r #x40 :g #x80 :b #x80 :a (the int (* 64.0 arg2))) + ) + (let ((a3-1 (-> s2-0 base))) + (let ((v1-6 (the-as object (-> s2-0 base)))) + (set! (-> (the-as dma-packet v1-6) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-6) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-6) vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (&+ (the-as pointer v1-6) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-2 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + ) + +;; definition for function draw-busy-loading +(defbehavior draw-busy-loading progress ((arg0 font-context)) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg0 origin x) 82.0) + (set! (-> arg0 origin y) 180.0) + (set! (-> arg0 width) 359.0) + (set! (-> arg0 height) 40.0) + ) + (('aspect16x9) + (set! (-> arg0 origin x) 82.0) + (set! (-> arg0 origin y) 180.0) + (set! (-> arg0 width) 355.0) + (set! (-> arg0 height) 40.0) + ) + ) + (let ((v1-12 arg0)) + (set! (-> v1-12 scale) 0.6) + ) + (let ((a0-5 arg0)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (if (< (mod (-> self clock frame-counter) 300) 210) + (print-game-text (lookup-text! *common-text* (game-text-id progress-busy-loading-TODO) #f) arg0 #f 44 320) + ) + ) + +;; definition for function draw-previous-next +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(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) + ) + ) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning large)) + ) + (let ((s2-0 arg1)) + (set! (-> s2-0 color) (the-as font-color (progress-selected 200))) + ) + (let ((v1-15 arg1)) + (set! (-> v1-15 scale) 0.6) + ) + (when (or (> (-> arg0 page-index) 0) arg2) + (let ((s2-1 print-game-text)) + (let ((s1-0 format) + (s0-0 (clear *temp-string*)) + ) + (set! sv-16 "~C~S") + (set! sv-32 163) + (let ((a3-0 (lookup-text! *common-text* (game-text-id progress-1kj2n3kj1n23) #f))) + (s1-0 s0-0 sv-16 sv-32 a3-0) + ) + ) + (s2-1 *temp-string* arg1 #f 44 320) + ) + ) + (set! arg2 (or (!= (-> arg0 page-index) (+ (-> arg0 num-pages) -1)) arg2)) + (when arg2 + (let ((a0-12 arg1)) + (set! (-> a0-12 flags) (font-flags kerning right large)) + ) + (+! (-> arg1 origin x) (the float s3-0)) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~S~C" (lookup-text! *common-text* (game-text-id progress-1kj2n3kj1n23) #f) 161) + (s5-1 *temp-string* arg1 #f 44 320) + ) + ) + ) + 0 + (none) + ) + +;; definition for function draw-up-down +;; WARN: Return type mismatch float vs none. +(defun draw-up-down ((arg0 font-context)) + (let ((s3-0 250) + (s5-0 155) + (s4-0 155) + (f30-0 (-> arg0 origin x)) + (f28-0 (-> arg0 origin y)) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! s5-0 170) + ) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float s5-0)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s2-0 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float (+ s5-0 s4-0))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) f30-0) + (set! (-> arg0 origin y) f28-0) + ) + (none) + ) + +;; definition for function draw-missions-up-down +;; WARN: Return type mismatch float vs none. +(defun draw-missions-up-down ((arg0 font-context)) + (let ((s3-0 250) + (s5-0 116) + (s4-0 191) + (f30-0 (-> arg0 origin x)) + (f28-0 (-> arg0 origin y)) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float s5-0)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s2-0 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float (+ s5-0 s4-0))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) f30-0) + (set! (-> arg0 origin y) f28-0) + ) + (none) + ) + +;; definition for function draw-scene-up-down +;; WARN: Return type mismatch float vs none. +(defun draw-scene-up-down ((arg0 font-context)) + (let ((s3-0 250) + (s5-0 102) + (s4-0 194) + (f30-0 (-> arg0 origin x)) + (f28-0 (-> arg0 origin y)) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! s5-0 92) + (set! s4-0 204) + ) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float s5-0)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s2-0 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) (the float s3-0)) + (set! (-> arg0 origin y) (the float (+ s5-0 s4-0))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-1 *temp-string* arg0 #f 44 320) + ) + (set! (-> arg0 origin x) f30-0) + (set! (-> arg0 origin y) f28-0) + ) + (none) + ) + +;; definition for function begin-scissor +;; WARN: Return type mismatch int vs none. +(defun begin-scissor ((arg0 vector) (arg1 progress)) + (cond + ((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap)) + (set! (-> arg0 x) 0.0) + (set! (-> arg0 y) 0.0) + (set! (-> arg0 z) 512.0) + (set! (-> arg0 w) 416.0) + ) + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 38.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 362.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 70.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 329.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-23 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-23) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-23) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-23) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-23) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function end-scissor +;; WARN: Return type mismatch int vs none. +(defun end-scissor () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function begin-scissor-secret +;; WARN: Return type mismatch int vs none. +(defun begin-scissor-secret ((arg0 vector)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 190.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 315.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 173.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 304.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function end-scissor-secret +;; WARN: Return type mismatch int vs none. +(defun end-scissor-secret () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function begin-scissor-missions +;; WARN: Return type mismatch int vs none. +(defun begin-scissor-missions ((arg0 vector) (arg1 float)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 130.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 305.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 130.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 305.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function end-scissor-missions +;; WARN: Return type mismatch int vs none. +(defun end-scissor-missions ((arg0 vector)) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function begin-scissor-scene +;; WARN: Return type mismatch int vs none. +(defun begin-scissor-scene ((arg0 vector)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 118.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 294.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 116.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 295.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function end-scissor-scene +;; WARN: Return type mismatch int vs none. +(defun end-scissor-scene () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function begin-scissor-level +;; WARN: Return type mismatch int vs none. +(defun begin-scissor-level ((arg0 vector)) + (cond + ((= (get-aspect-ratio) 'aspect16x9) + (set! (-> arg0 x) 79.0) + (set! (-> arg0 y) 118.0) + (set! (-> arg0 z) 434.0) + (set! (-> arg0 w) 294.0) + ) + (else + (set! (-> arg0 x) 70.0) + (set! (-> arg0 y) 116.0) + (set! (-> arg0 z) 444.0) + (set! (-> arg0 w) 295.0) + ) + ) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-0 base)) + ) + ((method-of-type hud-box hud-box-method-14)) + (let ((a3-0 (-> s4-0 base))) + (let ((v1-17 (the-as object (-> s4-0 base)))) + (set! (-> (the-as dma-packet v1-17) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-17) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-17) vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (&+ (the-as pointer v1-17) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function end-scissor-level +;; WARN: Return type mismatch int vs none. +(defun end-scissor-level () + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + ((method-of-type hud-box hud-box-method-15)) + (let ((a3-0 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function print-language-name +;; WARN: Return type mismatch int vs none. +(defun print-language-name ((arg0 game-text-id) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s5-0 (if arg3 + arg2 + (- arg2) + ) + ) + ) + (+! (-> arg1 origin x) (the float s5-0)) + (let ((f30-0 (- 1.0 (* 0.0033333334 (the float arg2))))) + (set! (-> arg1 alpha) f30-0) + (print-game-text-scaled (lookup-text! *common-text* (-> *language-name-remap* arg0) #f) f30-0 arg1 320) + ) + (set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0))) + ) + (set! (-> arg1 color) (font-color #7efbfb)) + 0 + (none) + ) + +;; definition for function unlocked-secret-menu? +;; ERROR: Function may read a register that is not set: a0 +(defun unlocked-secret-menu? () + (local-vars (a0-0 none)) + (or (logtest? (the-as int a0-0) 32) + (logtest? (the-as int a0-0) 64) + (logtest? (the-as int a0-0) 128) + (logtest? (the-as int a0-0) 256) + (logtest? (the-as int a0-0) 512) + (logtest? (the-as int a0-0) 1024) + (logtest? (the-as int a0-0) 2048) + (logtest? (the-as int a0-0) #x8000) + ) + ) + +;; definition for function memcard-unlocked-secrets? +;; WARN: Return type mismatch object vs symbol. +(defun memcard-unlocked-secrets? ((arg0 symbol)) + "TODO - cleanup bitfields / arg passing" + (let ((v1-0 *progress-save-info*) + (s5-0 (the-as object 0)) + ) + (let ((a0-1 4)) + (when (and v1-0 (= (-> v1-0 formatted) 1) (= (-> v1-0 inited) 1)) + (dotimes (a1-5 a0-1) + (set! s5-0 (logior (the-as int s5-0) (the-as int (-> v1-0 file a1-5 secrets)))) + ) + ) + ) + (if (unlocked-secret-menu?) + (set! (-> *progress-state* secrets-unlocked) #t) + (set! (-> *progress-state* secrets-unlocked) #f) + ) + (when *cheat-mode* + (set! (-> *progress-state* secrets-unlocked) #t) + (set! s5-0 (logior (the-as int s5-0) #x8fe0)) + ) + (the-as symbol (cond + (arg0 + (empty) + s5-0 + ) + (else + (unlocked-secret-menu?) + ) + ) + ) + ) + ) + +;; definition for function num-unlocked-secret? +(defun num-unlocked-secret? ((arg0 int)) + "@returns The number of secrets currently unlocked" + (let ((v0-0 0)) + (if (logtest? arg0 32) + (+! v0-0 1) + ) + (if (logtest? arg0 64) + (+! v0-0 1) + ) + (if (logtest? arg0 128) + (+! v0-0 1) + ) + (if (logtest? arg0 256) + (+! v0-0 1) + ) + (if (logtest? arg0 512) + (+! v0-0 1) + ) + (if (logtest? arg0 1024) + (+! v0-0 1) + ) + (if (logtest? arg0 2048) + (+! v0-0 1) + ) + (if (logtest? arg0 #x8000) + (+! v0-0 1) + ) + v0-0 + ) + ) + +;; definition for function print-menu-text +;; WARN: Return type mismatch int vs none. +(defun print-menu-text ((arg0 game-text-id) (arg1 float) (arg2 font-context) (arg3 progress)) + (let ((f0-1 (- 1.0 (-> arg3 menu-transition)))) + (let ((v1-1 arg2)) + (set! (-> v1-1 scale) 0.5) + ) + (set! (-> arg2 alpha) f0-1) + ) + (print-game-text (the-as string arg0) arg2 #f 44 320) + 0 + (none) + ) + +;; definition for function draw-yes-no +;; WARN: Return type mismatch int vs none. +(defun draw-yes-no ((arg0 progress) (arg1 float)) + (local-vars (a0-5 string)) + (- 1.0 (-> arg0 menu-transition)) + (cond + ((-> *progress-state* yes-no-choice) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + ) + (print-game-text a0-5 (the-as font-context arg1) #f 44 320) + 0 + (none) + ) + +;; definition for function draw-continue-retry +;; WARN: Return type mismatch int vs none. +(defun draw-continue-retry ((arg0 progress) (arg1 float)) + (local-vars (a0-5 string)) + (- 1.0 (-> arg0 menu-transition)) + (cond + ((-> *progress-state* yes-no-choice) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-1-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-1-TODO) #f) + ) + (set! a0-5 *temp-string*) + ) + ) + (print-game-text a0-5 (the-as font-context arg1) #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-option ((obj menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-on-off-option ((obj menu-on-off-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-8 string) (sv-16 string)) + (let ((s3-0 (if arg3 + (&-> *progress-state* on-off-choice) + (-> obj value-to-modify) + ) + ) + ) + (set! a0-8 + (cond + (arg3 + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #f9f9f9)) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + ((-> s3-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + ) + a0-8 + ) + (else + (let ((s2-3 format) + (s1-2 (clear *temp-string*)) + (s0-2 "~S: ~S") + ) + (set! sv-16 (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (let ((a3-4 (if (-> s3-0 0) + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + ) + ) + (s2-3 s1-2 s0-2 sv-16 a3-4) + ) + ) + *temp-string* + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-8) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-yes-no-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-yes-no-option ((obj menu-yes-no-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-8 string)) + (let ((s3-0 (&-> *progress-state* yes-no-choice))) + (set! a0-8 + (cond + (arg3 + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #f9f9f9)) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + ((-> s3-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-8 *temp-string*) + ) + ) + a0-8 + ) + (else + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + *temp-string* + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-8) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-video-mode-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-video-mode-option ((obj menu-video-mode-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s3-0 (&-> *progress-state* video-mode-choice)) + (f28-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (f30-0 (-> arg1 origin y)) + ) + (let ((s2-0 (the-as string #f))) + (if (< f28-0 0.0) + (set! f28-0 0.0) + ) + (set! (-> arg1 alpha) f28-0) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.7) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ 43.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 52.0 (-> arg1 origin y))) + ) + ) + (cond + ((and (= (-> *progress-state* graphic-options-item-selected) 3) + (-> *progress-state* graphic-options-item-picked) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-6 arg1)) + (set! (-> a0-6 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 44 f28-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (cond + ((= (-> s3-0 0) 'pal) + (format + (clear *temp-string*) + "~33L~S ~35L~S~1L" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S~33L ~S" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + ) + ) + (else + (when (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (cond + ((= (-> *progress-state* graphic-options-item-selected) 3) + (let ((s2-4 arg1)) + (set! (-> s2-4 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -9.0 (-> arg1 origin y))) 22 f28-0) + ) + (else + (let ((a0-23 arg1)) + (set! (-> a0-23 color) (font-color #7efbfb)) + ) + ) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (cond + ((= (-> s3-0 0) 'pal) + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-video-j1n2) #f) + (lookup-text! *common-text* (game-text-id progress-video-asda) #f) + ) + (set! s2-0 *temp-string*) + ) + ) + ) + ) + ) + (if (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (print-menu-text (the-as game-text-id s2-0) (-> obj scale) arg1 arg0) + ) + ) + (set! (-> arg1 origin y) f30-0) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-unlocked-menu-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-unlocked-menu-option ((obj menu-unlocked-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((s5-0 (memcard-unlocked-secrets? #t)) + (f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.6) + ) + (when (nonzero? (-> obj name)) + (cond + ((= arg2 (-> arg0 option-index)) + (progress-selected 0) + (draw-highlight (the int (+ 8.0 (-> arg1 origin y))) 24 f30-0) + ) + (else + 32 + ) + ) + (set! (-> arg1 origin y) (+ 8.0 (-> arg1 origin y))) + (cond + ((= (-> obj name) 349) + (cond + ((logtest? (the-as int s5-0) 512) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-1231h2bn) #f) arg1 #f 44 320) + ) + (else + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-2 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 350) + (cond + ((logtest? (the-as int s5-0) 1024) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-akjisndaj) #f) arg1 #f 44 320) + ) + (else + (let ((s5-4 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-4 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 351) + (cond + ((logtest? (the-as int s5-0) 2048) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-iwudnq) #f) arg1 #f 44 320) + ) + (else + (let ((s5-6 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-6 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 346) + (cond + ((logtest? (the-as int s5-0) 32) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-k1231kkj) #f) arg1 #f 44 320) + ) + (else + (let ((s5-8 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-8 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 347) + (cond + ((logtest? (the-as int s5-0) 64) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-jn12j) #f) arg1 #f 44 320) + ) + (else + (let ((s5-10 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-10 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 348) + (cond + ((logtest? (the-as int s5-0) 128) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-m12312) #f) arg1 #f 44 320) + ) + (else + (let ((s5-12 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-12 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 345) + (cond + ((logtest? (the-as int s5-0) #x8000) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-oj1n23jn1) #f) arg1 #f 44 320) + ) + (else + (let ((s5-14 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-14 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((= (-> obj name) 352) + (cond + ((logtest? (the-as int s5-0) 256) + (print-game-text (lookup-text! *common-text* (game-text-id progress-unlocked-n51i51n) #f) arg1 #f 44 320) + ) + (else + (let ((s5-16 print-game-text)) + (format (clear *temp-string*) "?????????") + (s5-16 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-main-menu-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-main-menu-option ((obj menu-main-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (-> arg1 flags) + (when (and (= (-> arg0 menu-transition) 0.0) (and (= (-> arg0 ring-angle) (-> arg0 ring-want-angle)) + (nonzero? (-> obj name)) + (= arg2 (-> arg0 option-index)) + ) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 scale) 0.75) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle large)) + ) + (set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 235 + 175 + ) + ) + ) + (set! (-> arg1 height) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 80 + 80 + ) + ) + ) + (set! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 140 + 170 + ) + ) + ) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 180 + 175 + ) + ) + ) + (cond + ((= (-> obj name) 308) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-18 arg1)) + (set! (-> v1-18 scale) 0.7) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 210 + 200 + ) + ) + ) + (let ((v1-21 arg1)) + (set! (-> v1-21 scale) 0.6) + ) + (let ((v1-23 (-> *bigmap* bigmap-index))) + (cond + ((zero? v1-23) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-k1j2n3n1) #f) arg1 #f 44 320) + ) + ((= v1-23 1) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-m123j1m) #f) arg1 #f 44 320) + ) + ((= v1-23 2) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63jk46n3) #f) arg1 #f 44 320) + ) + ((= v1-23 3) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-36j46jn) #f) arg1 #f 44 320) + ) + ((= v1-23 4) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-36j46jn) #f) arg1 #f 44 320) + ) + ((= v1-23 5) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-52jn35j2) #f) arg1 #f 44 320) + ) + ((= v1-23 6) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-52kj3n52) #f) arg1 #f 44 320) + ) + ((= v1-23 7) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63j46j3n4) #f) arg1 #f 44 320) + ) + ((= v1-23 8) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63j46n3j) #f) arg1 #f 44 320) + ) + ((= v1-23 9) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-364jn6n) #f) arg1 #f 44 320) + ) + ((= v1-23 11) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-634jn6) #f) arg1 #f 44 320) + ) + ((= v1-23 12) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-52o352nm) #f) arg1 #f 44 320) + ) + ((= v1-23 13) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-j324nm3) #f) arg1 #f 44 320) + ) + ((= v1-23 14) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-6mn346mn) #f) arg1 #f 44 320) + ) + ((= v1-23 15) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-6mn346mn) #f) arg1 #f 44 320) + ) + ((= v1-23 16) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-6mn346mn) #f) arg1 #f 44 320) + ) + ((= v1-23 17) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63jn463jn) #f) arg1 #f 44 320) + ) + ((= v1-23 18) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-3643m6m) #f) arg1 #f 44 320) + ) + ((= v1-23 19) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-63mn46nm) #f) arg1 #f 44 320) + ) + ((= v1-23 20) + (print-game-text (lookup-text! *common-text* (game-text-id progress-main-23jn42) #f) arg1 #f 44 320) + ) + ) + ) + ) + (else + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + ) + ) + ) + 0 + (none) + ) + +;; definition for function draw-savegame-box +;; WARN: Return type mismatch pointer vs none. +(defun draw-savegame-box ((arg0 menu-memcard-slot-option) (arg1 float) (arg2 float) (arg3 float) (arg4 float)) + (set! (-> arg0 box 0) (the-as menu-option arg1)) + (set! (-> arg0 unknown-options 1) (the-as menu-option arg2)) + (set! (-> arg0 unknown-options 0) (the-as menu-option arg3)) + (set! (-> arg0 unknown-options 2) (the-as menu-option arg4)) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-0 (-> s5-0 base)) + ) + (-> arg0 box) + ((method-of-type hud-box hud-box-method-9)) + (let ((a3-1 (-> s5-0 base))) + (let ((v1-7 (the-as object (-> s5-0 base)))) + (set! (-> (the-as dma-packet v1-7) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-7) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-7) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-7) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-0 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (none) + ) + +;; definition for function get-level-icon-id-01 +(defun get-level-icon-id-01 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303600))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304800)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304000)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307000)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305800)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306800)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307400)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303600)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306c00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305c00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305400)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305000)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306400)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307800)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304c00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303a00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307c00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304400)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306000)) + ) + ) + v0-0 + ) + ) + +;; definition for function get-level-icon-id-02 +(defun get-level-icon-id-02 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303700))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304900)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304100)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307100)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305900)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306900)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307500)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303700)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306d00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305d00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305500)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305100)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306500)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307900)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304d00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303b00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307d00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304500)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306100)) + ) + ) + v0-0 + ) + ) + +;; definition for function get-level-icon-id-03 +(defun get-level-icon-id-03 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303800))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304a00)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304200)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307200)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305a00)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306a00)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307600)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303800)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306e00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305e00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305600)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305200)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306600)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307a00)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304e00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303c00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307e00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304600)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306200)) + ) + ) + v0-0 + ) + ) + +;; definition for function get-level-icon-id-04 +(defun get-level-icon-id-04 ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9303900))) + (cond + ((zero? arg0) + (set! v0-0 (the-as uint #xc9304b00)) + ) + ((= arg0 1) + (set! v0-0 (the-as uint #xc9304300)) + ) + ((= arg0 2) + (set! v0-0 (the-as uint #xc9307300)) + ) + ((= arg0 3) + (set! v0-0 (the-as uint #xc9305b00)) + ) + ((= arg0 4) + (set! v0-0 (the-as uint #xc9306b00)) + ) + ((= arg0 5) + (set! v0-0 (the-as uint #xc9307700)) + ) + ((= arg0 6) + (set! v0-0 (the-as uint #xc9303900)) + ) + ((= arg0 7) + (set! v0-0 (the-as uint #xc9306f00)) + ) + ((= arg0 8) + (set! v0-0 (the-as uint #xc9305f00)) + ) + ((= arg0 9) + (set! v0-0 (the-as uint #xc9305700)) + ) + ((= arg0 10) + (set! v0-0 (the-as uint #xc9305300)) + ) + ((= arg0 11) + (set! v0-0 (the-as uint #xc9306700)) + ) + ((= arg0 12) + (set! v0-0 (the-as uint #xc9307b00)) + ) + ((= arg0 13) + (set! v0-0 (the-as uint #xc9304f00)) + ) + ((= arg0 14) + (set! v0-0 (the-as uint #xc9303d00)) + ) + ((= arg0 15) + (set! v0-0 (the-as uint #xc9307f00)) + ) + ((= arg0 16) + (set! v0-0 (the-as uint #xc9304700)) + ) + ((= arg0 17) + (set! v0-0 (the-as uint #xc9306300)) + ) + ) + v0-0 + ) + ) + +;; definition for function draw-decoration +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defun draw-decoration ((arg0 menu-quit-qr-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 int float)) + (sv-96 int) + ) + (set! sv-96 arg3) + (set! sv-16 arg4) + (set! sv-32 arg5) + (let ((gp-0 70) + (s5-0 120) + ) + (set! sv-48 87) + (let ((s3-0 375) + (s2-0 210) + ) + (set! sv-64 0) + (cond + ((not sv-16) + (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) + (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 + ) + ) + ) + ) + (let ((v1-20 arg1)) + (set! (-> v1-20 scale) sv-32) + ) + (set! (-> arg1 origin y) (the float sv-48)) + (set! (-> arg1 height) 50.0) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #7efbfb)) + ) + (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 game-text-id sv-96) a2-1)) + (a1-2 arg1) + (a2-2 #f) + (a3-1 44) + (t0-1 320) + ) + (sv-80 a0-4 a1-2 a2-2 a3-1 t0-1) + ) + (let ((v1-27 (&-> arg0 unknown-options 3))) + (set! (-> v1-27 0) (the-as menu-option 64)) + (set! (-> v1-27 1) (the-as menu-option 128)) + (set! (-> v1-27 2) (the-as menu-option 128)) + (set! (-> v1-27 3) (the-as menu-option (the int (* 128.0 arg2)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option 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 + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s3-0)) + (the float (+ s5-0 s2-0)) + (the float (+ s5-0 s2-0)) + ) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (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))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-41 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-41) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-41) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-41) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-41) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-missions-decoration +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defun draw-missions-decoration ((arg0 menu-missions-option) (arg1 font-context) (arg2 float) (arg3 game-text-id)) + (local-vars (sv-16 int) (sv-32 (function string font-context symbol int int float)) (sv-48 font-context)) + (set! sv-48 arg1) + (let ((s2-0 arg2) + (s0-0 arg3) + (gp-0 70) + (s5-0 120) + ) + (set! sv-16 87) + (let ((s4-0 375) + (s3-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 70) + (set! s5-0 130) + (set! sv-16 85) + (set! s4-0 375) + (set! s3-0 175) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 130) + (set! sv-16 68) + (set! s4-0 356) + (set! s3-0 175) + ) + ) + (let ((v1-9 sv-48)) + (set! (-> v1-9 scale) 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 #7efbfb)) + ) + (set! sv-32 print-game-text) + (let ((a0-4 (lookup-text! *common-text* s0-0 #f)) + (a2-2 #f) + (a3-1 44) + (t0-0 320) + ) + (sv-32 a0-4 sv-48 a2-2 a3-1 t0-0) + ) + (let ((v1-17 (&-> arg0 unknown-options 3))) + (set! (-> v1-17 0) (the-as menu-option 64)) + (set! (-> v1-17 1) (the-as menu-option 128)) + (set! (-> v1-17 2) (the-as menu-option 128)) + (set! (-> v1-17 3) (the-as menu-option (the int (* 128.0 s2-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float s5-0) + (the float s5-0) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float (+ s5-0 s3-0)) + (the float (+ s5-0 s3-0)) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s4-0 + s3-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-28 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-28) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-28) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-28) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-28) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-sound-options-decoration +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 symbol) (arg4 game-text-id)) + (local-vars + (sv-16 font-context) + (sv-32 int) + (sv-48 (function string font-context symbol int int float)) + (sv-64 symbol) + ) + (set! sv-16 arg1) + (let ((s2-0 arg2)) + (set! sv-64 arg3) + (let ((s0-0 arg4) + (gp-0 70) + (s5-0 120) + ) + (set! sv-32 87) + (let ((s4-0 375) + (s3-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 70) + (set! s5-0 120) + (set! sv-32 83) + (set! s4-0 375) + (set! s3-0 208) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 118) + (set! sv-32 68) + (set! s4-0 356) + (set! s3-0 244) + ) + ) + (let ((v1-9 sv-16)) + (set! (-> v1-9 scale) 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 #7efbfb)) + ) + (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 game-text-id sv-64) a2-1)) + (a1-2 sv-16) + (a2-2 #f) + (a3-1 44) + (t0-1 320) + ) + (sv-48 a0-5 a1-2 a2-2 a3-1 t0-1) + ) + (set! (-> sv-16 origin x) (the float (+ gp-0 65))) + (let ((v1-22 (&-> arg0 unknown-options 3))) + (set! (-> v1-22 0) (the-as menu-option 64)) + (set! (-> v1-22 1) (the-as menu-option 128)) + (set! (-> v1-22 2) (the-as menu-option 128)) + (set! (-> v1-22 3) (the-as menu-option (the int (* 128.0 s2-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float s5-0) + (the float s5-0) + ) + (if s0-0 + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float (+ s5-0 s3-0)) + (the float (+ s5-0 s3-0)) + ) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s4-0 + s3-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-34 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-34) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-34) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-34) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-34) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-decoration-secrets +;; INFO: Used lq/sq +(defun draw-decoration-secrets ((arg0 menu-secret-option) (arg1 font-context) (arg2 float) (arg3 game-text-id)) + (local-vars (sv-16 int) (sv-32 (function string font-context symbol int int float)) (sv-48 font-context)) + (set! sv-48 arg1) + (let ((s2-0 arg2) + (s0-0 arg3) + (gp-0 70) + (s5-0 110) + ) + 120 + (set! sv-16 87) + (let ((s4-0 375) + (s3-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! gp-0 69) + (set! s5-0 172) + (set! sv-16 87) + (set! s4-0 375) + (set! s3-0 132) + ) + (('aspect16x9) + (set! gp-0 79) + (set! s5-0 188) + 188 + (set! sv-16 68) + (set! s4-0 356) + (set! s3-0 128) + ) + ) + (let ((v1-11 sv-48)) + (set! (-> v1-11 scale) 0.95) + ) + (set! (-> sv-48 origin y) (the float sv-16)) + (set! (-> sv-48 height) 50.0) + (let ((a0-2 sv-48)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (set! sv-32 print-game-text) + (let ((a0-4 (lookup-text! *common-text* s0-0 #f)) + (a2-2 #f) + (a3-1 44) + (t0-0 320) + ) + (sv-32 a0-4 sv-48 a2-2 a3-1 t0-0) + ) + (let ((v1-19 (&-> arg0 unknown-options 3))) + (set! (-> v1-19 0) (the-as menu-option 64)) + (set! (-> v1-19 1) (the-as menu-option 128)) + (set! (-> v1-19 2) (the-as menu-option 128)) + (set! (-> v1-19 3) (the-as menu-option (the int (* 128.0 s2-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float s5-0) + (the float s5-0) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option arg0) + (the float gp-0) + (the float (+ gp-0 s4-0)) + (the float (+ s5-0 s3-0)) + (the float (+ s5-0 s3-0)) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (draw-sprite2d-xy + s0-1 + gp-0 + s5-0 + s4-0 + s3-0 + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-30 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-30) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-30) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-30) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-30) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + +;; definition for function draw-decoration-load-save +;; INFO: Used lq/sq +;; WARN: Return type mismatch pointer vs none. +(defun draw-decoration-load-save ((arg0 menu-memcard-slot-option) (arg1 font-context) (arg2 float) (arg3 int)) + (local-vars + (sv-16 int) + (sv-32 int) + (sv-48 (function string font-context symbol int int float)) + (sv-64 int) + (sv-80 font-context) + ) + (set! sv-80 arg1) + (let ((s4-0 arg2)) + (set! sv-64 arg3) + (let ((s0-0 70) + (gp-0 120) + (s5-0 120) + ) + 120 + (set! sv-16 87) + (set! sv-32 375) + (let ((s3-0 200) + (s2-0 210) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! s0-0 69) + (set! gp-0 245) + (set! s5-0 110) + (set! sv-16 80) + (set! sv-32 375) + (set! s3-0 200) + (set! s2-0 218) + ) + (('aspect16x9) + (set! s0-0 79) + (set! gp-0 245) + (set! s5-0 110) + (set! sv-16 80) + (set! sv-32 355) + (set! s3-0 190) + (set! s2-0 248) + ) + ) + (let ((v1-13 sv-80)) + (set! (-> v1-13 scale) 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! (-> 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 #7efbfb)) + ) + (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 game-text-id sv-64) a2-1)) + (a2-2 #f) + (a3-1 44) + (t0-0 320) + ) + (sv-48 a0-9 sv-80 a2-2 a3-1 t0-0) + ) + (let ((v1-32 (&-> arg0 unknown-options 3))) + (set! (-> v1-32 0) (the-as menu-option 64)) + (set! (-> v1-32 1) (the-as menu-option 128)) + (set! (-> v1-32 2) (the-as menu-option 128)) + (set! (-> v1-32 3) (the-as menu-option (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) + ) + (let* ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s1-1 (-> s0-1 base)) + ) + (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 s4-0))) + ) + (let ((a3-5 (-> s0-1 base))) + (let ((v1-45 (the-as object (-> s0-1 base)))) + (set! (-> (the-as dma-packet v1-45) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-45) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-45) vif1) (new 'static 'vif-tag)) + (set! (-> s0-1 base) (&+ (the-as pointer v1-45) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s1-1 + (the-as (pointer dma-tag) a3-5) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type menu-memcard-slot-option +;; INFO: Used lq/sq +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 24 signed mismatch +;; WARN: Stack slot offset 28 signed mismatch +;; WARN: Stack slot offset 32 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (v0-74 none) + (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) + (set! v0-74 + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading arg1) + v0-74 + ) + (else + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (if (= arg2 sv-20) + (the-as font-color (progress-selected 0)) + (font-color #7efbfb) + ) + ) + ) + (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)))) + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + ) + (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)))) + (set! (-> arg1 origin x) (+ -90.0 (-> arg1 origin x))) + ) + (('aspect4x3) + (set! (-> arg1 origin y) 74.0) + (set! (-> arg1 height) 42.0) + (+! (-> arg1 origin y) (the float (* 54 (+ arg2 1)))) + (set! (-> arg1 origin x) (+ -90.0 (-> arg1 origin x))) + ) + ) + ) + ) + (let ((v1-41 (&-> obj unknown-options 3))) + (set! (-> v1-41 0) (the-as menu-option 64)) + (set! (-> v1-41 1) (the-as menu-option 128)) + (set! (-> v1-41 2) (the-as menu-option 128)) + (set! (-> v1-41 3) (the-as menu-option (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) + ) + ) + (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))) + ) + (let* ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-4 (-> s1-0 base)) + ) + (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))) + ) + (let ((a3-14 (-> s1-0 base))) + (let ((v1-95 (the-as object (-> s1-0 base)))) + (set! (-> (the-as dma-packet v1-95) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-95) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-95) vif1) (new 'static 'vif-tag)) + (set! (-> s1-0 base) (&+ (the-as pointer v1-95) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s2-4 + (the-as (pointer dma-tag) a3-14) + ) + ) + ) + ) + ((= *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))) + ) + ) + ) + (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))) + ) + (let* ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-5 (-> s1-1 base)) + ) + (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))) + ) + (let ((a3-32 (-> s1-1 base))) + (let ((v1-164 (the-as object (-> s1-1 base)))) + (set! (-> (the-as dma-packet v1-164) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-164) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-164) vif1) (new 'static 'vif-tag)) + (set! (-> s1-1 base) (&+ (the-as pointer v1-164) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s2-5 + (the-as (pointer dma-tag) a3-32) + ) + ) + ) + ) + ) + ) + (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) + (let ((v1-185 arg1)) + (set! (-> v1-185 scale) 0.8) + ) + ) + (else + (let ((v1-186 arg1)) + (set! (-> v1-186 scale) 0.6) + ) + ) + ) + (let ((a0-40 arg1)) + (set! (-> a0-40 flags) (font-flags kerning large)) + ) + (+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 100 + 105 + ) + ) + ) + (let ((s2-7 print-game-text)) + (let ((s1-2 format) + (s0-0 (clear *temp-string*)) + ) + (set! sv-96 "~S ~D") + (let ((a2-28 (lookup-text! *common-text* (game-text-id progress-i1un23i12b341) #f)) + (a3-33 (+ arg2 1)) + ) + (s1-2 s0-0 sv-96 a2-28 a3-33) + ) + ) + (s2-7 *temp-string* arg1 #f 44 320) + ) + (let ((a0-45 arg1)) + (set! (-> a0-45 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) 250.0) + (set! (-> arg1 origin y) 110.0) + (set! (-> arg1 width) 170.0) + (set! (-> arg1 height) 190.0) + (let ((s2-8 (-> *progress-save-info* file arg2 level-index))) + (when (= arg2 sv-20) + (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16))) + (set-vector! (-> obj sprites 1 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-01 (the-as int s2-8)))) + ) + (set! (-> obj sprites 1 scale-x) 1.0) + (set! (-> obj sprites 1 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (&-> obj something-hud-related)) sv-40 sv-48) + (set-vector! (-> obj sprites 2 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-02 (the-as int s2-8)))) + ) + (set! (-> obj sprites 2 scale-x) 1.0) + (set! (-> obj sprites 2 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (+ sv-40 sv-56) sv-48) + (set-vector! (-> obj sprites 3 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-03 (the-as int s2-8)))) + ) + (set! (-> obj sprites 3 scale-x) 1.0) + (set! (-> obj sprites 3 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (-> obj sprites 3)) sv-40 (+ sv-48 64)) + (set-vector! (-> obj sprites 4 color) 128 128 128 (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 (the-as texture-id (get-level-icon-id-04 (the-as int s2-8)))) + ) + (set! (-> obj sprites 4 scale-x) 1.0) + (set! (-> obj sprites 4 scale-y) 1.0) + (set-hud-piece-position! (the-as basic (-> obj sprites 4)) (+ sv-40 sv-56) (+ sv-48 64)) + (let* ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-9 (-> s1-7 base)) + ) + (&-> obj something-hud-related) + (let ((t9-38 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-38) + ) + (-> obj sprites 2) + (let ((t9-39 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-39) + ) + (-> obj sprites 3) + (let ((t9-40 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-40) + ) + (-> obj sprites 4) + (let ((t9-41 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-41) + ) + (let ((a3-35 (-> s1-7 base))) + (let ((v1-237 (the-as object (-> s1-7 base)))) + (set! (-> (the-as dma-packet v1-237) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-237) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-237) vif1) (new 'static 'vif-tag)) + (set! (-> s1-7 base) (&+ (the-as pointer v1-237) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-9 + (the-as (pointer dma-tag) a3-35) + ) + ) + ) + (let ((v1-245 arg1)) + (set! (-> v1-245 scale) 0.6) + ) + (set! (-> arg1 origin x) 265.0) + (set! (-> arg1 origin y) 263.0) + (set! (-> arg1 width) 170.0) + (set! (-> arg1 height) 52.0) + (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! (the-as basic (-> obj sprites)) 265 263) + (let* ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-10 (-> s1-8 base)) + ) + (-> obj sprites) + (let ((t9-45 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-45) + ) + (let ((a3-36 (-> s1-8 base))) + (let ((v1-260 (the-as object (-> s1-8 base)))) + (set! (-> (the-as dma-packet v1-260) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-260) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-260) vif1) (new 'static 'vif-tag)) + (set! (-> s1-8 base) (&+ (the-as pointer v1-260) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-10 + (the-as (pointer dma-tag) a3-36) + ) + ) + ) + (set! (-> arg1 origin y) (+ 1.0 (-> arg1 origin y))) + (set! (-> arg1 origin x) (+ 28.0 (-> arg1 origin x))) + (let* ((v1-272 (-> *progress-save-info* file arg2 game-time0)) + (v1-273 (logior (shl (the-as int (-> *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)) + (let ((s1-9 print-game-text)) + (format (clear *temp-string*) "~2,'0D:~2,'0D" s2-11 sv-112) + (s1-9 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93))) + (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 263) + (let* ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-12 (-> s1-10 base)) + ) + (-> obj sprites) + (let ((t9-52 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-52) + ) + (let ((a3-39 (-> s1-10 base))) + (let ((v1-285 (the-as object (-> s1-10 base)))) + (set! (-> (the-as dma-packet v1-285) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-285) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-285) vif1) (new 'static 'vif-tag)) + (set! (-> s1-10 base) (&+ (the-as pointer v1-285) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-12 + (the-as (pointer dma-tag) a3-39) + ) + ) + ) + (set! (-> arg1 origin x) (+ 100.0 (-> arg1 origin x))) + (let ((s2-13 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (-> *progress-save-info* file arg2 completion-percentage))) + (s2-13 *temp-string* arg1 #f 44 320) + ) + (set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93))) + (set-hud-piece-position! (the-as basic (-> obj sprites)) 368 289) + (let* ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-14 (-> s1-12 base)) + ) + (-> obj sprites) + (let ((t9-59 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-59) + ) + (let ((a3-41 (-> s1-12 base))) + (let ((v1-304 (the-as object (-> s1-12 base)))) + (set! (-> (the-as dma-packet v1-304) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-304) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-304) vif1) (new 'static 'vif-tag)) + (set! (-> s1-12 base) (&+ (the-as pointer v1-304) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-14 + (the-as (pointer dma-tag) a3-41) + ) + ) + ) + (set! (-> arg1 origin y) (+ 28.0 (-> arg1 origin y))) + (let ((s2-15 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> *progress-save-info* file arg2 skill-count))) + (s2-15 *temp-string* arg1 #f 44 320) + ) + (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! (the-as basic (-> obj sprites)) 253 290) + (let* ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-16 (-> s1-14 base)) + ) + (-> obj sprites) + (let ((t9-66 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-66) + ) + (let ((a3-43 (-> s1-14 base))) + (let ((v1-325 (the-as object (-> s1-14 base)))) + (set! (-> (the-as dma-packet v1-325) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-325) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-325) vif1) (new 'static 'vif-tag)) + (set! (-> s1-14 base) (&+ (the-as pointer v1-325) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s2-16 + (the-as (pointer dma-tag) a3-43) + ) + ) + ) + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + (let ((s2-17 print-game-text)) + (format (clear *temp-string*) "~D" (the int (-> *progress-save-info* file arg2 gem-count))) + (s2-17 *temp-string* arg1 #f 44 320) + ) + ) + ) + ) + ((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) + (let ((v1-348 arg1)) + (set! (-> v1-348 scale) 0.8) + ) + ) + (else + (let ((v1-349 arg1)) + (set! (-> v1-349 scale) 0.6) + ) + ) + ) + (let ((a0-150 arg1)) + (set! (-> a0-150 flags) (font-flags kerning large)) + ) + (+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 100 + 105 + ) + ) + ) + (print-game-text + (lookup-text! *common-text* (game-text-id progress-1ikjhb231hjik2b31ihb231) #f) + arg1 + #f + 44 + 320 + ) + ) + ) + (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) + 300 + 299 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-loading-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-loading-option ((obj menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (with-pp + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.55) + ) + (let ((s4-0 arg1)) + (set! (-> s4-0 color) (the-as font-color (progress-selected 0))) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 120.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (the float (the-as float #x10e))) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 height) (the float (the-as float #x23))) + ) + (if (< f30-0 0.0) + 0.0 + ) + ) + (when (or (< (mod (-> pp clock frame-counter) 300) 150) (!= (-> arg0 menu-transition) 0.0)) + (let ((a1-1 416)) + (case (-> arg0 current) + (('saving) + (set! a1-1 415) + ) + (('formatting) + (set! a1-1 417) + ) + (('creating) + (set! a1-1 418) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id a1-1) #f) arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (let ((v1-25 arg1)) + (set! (-> v1-25 height) (the float (the-as float #xa0))) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color #7efbfb)) + ) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-1jib12o3nj12j3) #f) 1) + (s5-2 *temp-string* arg1 #f 44 320) + ) + 0 + (none) + ) + ) + +;; definition for method 10 of type menu-insufficient-space-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-insufficient-space-option ((obj menu-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (when (!= (-> arg0 current) 'none) + (let ((v1-3 arg1)) + (set! (-> v1-3 scale) 0.5) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #7efbfb)) + ) + (let ((a0-4 arg1)) + (set! (-> a0-4 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 75.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-8 arg1)) + (set! (-> v1-8 width) (the float (the-as float #x168))) + ) + (let ((v1-9 arg1)) + (set! (-> v1-9 height) (the float (the-as float #x50))) + ) + (let ((s4-0 410)) + (case (-> arg0 current) + (('insufficient-space) + (set! s4-0 408) + ) + (('no-memory-card) + (set! s4-0 409) + ) + ) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as game-text-id s4-0) #f) 1) + (s3-0 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 80.0 (-> arg1 origin y))) + (let ((v1-17 arg1)) + (set! (-> v1-17 height) (the float (the-as float #x32))) + ) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + (lookup-text! *common-text* (game-text-id progress-1kj2b31k2b3) #f) + (if *progress-save-info* + (-> *progress-save-info* mem-required) + 0 + ) + ) + (s4-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 55.0 (-> arg1 origin y))) + (let ((v1-22 arg1)) + (set! (-> v1-22 height) (the float (the-as float #x5a))) + ) + (cond + ((and (!= (-> *progress-state* starting-state) 'insufficient-space) + (!= (-> *progress-state* starting-state) 'no-memory-card) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2bkoij1231) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + ) + (else + (let ((s4-2 arg1)) + (set! (-> s4-2 color) (the-as font-color (progress-selected 0))) + ) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-continue-retry arg0 (the-as float arg1)) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-secrets-insufficient-space-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-secrets-insufficient-space-option ((obj menu-secrets-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x3c))) + ) + (let ((s5-0 409)) + (progress-method-28 arg0 'select-save) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as game-text-id s5-0) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 140.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x1e))) + ) + (let ((s5-1 arg1)) + (set! (-> s5-1 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-insert-card-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-insert-card-option ((obj menu-insert-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x5f))) + ) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-j1nb23kj1hbn2) #f) 1) + (s5-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 115.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x3c))) + ) + (let ((s5-1 arg1)) + (set! (-> s5-1 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj12k3j1n23n) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-loading-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-error-loading-option ((obj menu-error-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 100.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x2d))) + ) + (let ((s5-0 425)) + (case (-> arg0 current) + (('error-saving) + (set! s5-0 426) + ) + (('error-formatting) + (set! s5-0 427) + ) + (('error-creating) + (set! s5-0 428) + ) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (the-as game-text-id s5-0) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x69))) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-k1jn23k1h23b) #f) 1) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 115.0 (-> arg1 origin y))) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float (the-as float #x2d))) + ) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 9.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-auto-saving-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-error-auto-saving-option ((obj menu-error-auto-saving-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 77.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x19))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2bn31kjhnb2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x3c))) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-jk1n23kj1n2) #f) 1) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x2d))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kjn231j2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x5f))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2n31kjn231) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 90.0 (-> arg1 origin y))) + (let ((v1-19 arg1)) + (set! (-> v1-19 height) (the float (the-as float #x19))) + ) + (let ((s5-4 arg1)) + (set! (-> s5-4 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 22 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-card-removed-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-card-removed-option ((obj menu-card-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition))) + (let ((v1-1 arg1)) + (set! (-> v1-1 scale) 0.5) + ) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #7efbfb)) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 flags) (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 (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x46))) + ) + (let ((s5-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-k1jn23kj1n23) #f) 1) + (s5-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 65.0 (-> arg1 origin y))) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kjn231j2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 65.0 (-> arg1 origin y))) + (let ((v1-12 arg1)) + (set! (-> v1-12 height) (the float (the-as float #x5a))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kj2n31kjn231) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 85.0 (-> arg1 origin y))) + (let ((v1-15 arg1)) + (set! (-> v1-15 height) (the float (the-as float #x23))) + ) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 5.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-disc-removed-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-error-disc-removed-option ((obj menu-error-disc-removed-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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x23))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-l1jkn231jkn23) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj1n231kjn2) #f) arg1 #f 44 320) + (when (is-cd-in?) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-14 arg1)) + (set! (-> v1-14 height) (the float (the-as float #x32))) + ) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-error-reading-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-error-reading-option ((obj menu-error-reading-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 #7efbfb)) + ) + (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! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x23))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1lkjn231jnk2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 55.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-n12n211n1n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 105.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x32))) + ) + (let ((s5-2 arg1)) + (set! (-> s5-2 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-icon-info-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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))) + (let ((a0-1 arg1)) + (set! (-> a0-1 color) (font-color #7efbfb)) + ) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.5) + ) + (set! (-> *bigmap* auto-save-icon-flag) (the-as basic #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) + (set-vector! (-> obj sprites 0 color) 128 128 128 (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 basic (-> obj sprites)) 240 160) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-0 base)) + ) + (-> obj sprites) + (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-2) + ) + (let ((a3-1 (-> s3-0 base))) + (let ((v1-16 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-16) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-16) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-16) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-16) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s4-1 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 flags) (font-flags kerning middle left large)) + ) + (set! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-27 arg1)) + (set! (-> v1-27 width) (the float (the-as float #x14a))) + ) + (let ((v1-28 arg1)) + (set! (-> v1-28 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-jn12n3j1n2) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 115.0 (-> arg1 origin y))) + (let ((v1-31 arg1)) + (set! (-> v1-31 height) (the float (the-as float #x5f))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-n12jin313) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 90.0 (-> arg1 origin y))) + (let ((v1-34 arg1)) + (set! (-> v1-34 height) (the float (the-as float #x32))) + ) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-ikj123i1khb231) #f) arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-format-card-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 80.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x55))) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-1kjn231kjn23) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1nmn1221n21n12n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x19))) + ) + (draw-highlight (the int (-> arg1 origin y)) 44 (-> arg1 alpha)) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1n23kjn12nk3j12) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-already-exists-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 120.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x55))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1m23n1n23n21) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 105.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x2d))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1jk2n31jkn23n1j) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 8.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-create-game-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 110.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x5a))) + ) + (let ((s4-0 print-game-text)) + (format (clear *temp-string*) (lookup-text! *common-text* (game-text-id progress-1kj2n31jkn23) #f) 1) + (s4-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 95.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x3c))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1kjn2123919) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 18.0 (-> arg1 origin y))) 22 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-video-mode-warning-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 85.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x2d))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-j1n23j1kn23kjn12) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x5f))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj6n324i63n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 85.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x37))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-3iou4n3i45n3) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x1e))) + ) + (print-game-text + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + arg1 + #f + 44 + 320 + ) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-video-mode-ok-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 130.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x32))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-39u4n359n45) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x32))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-on2394234n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-progressive-mode-warning-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 75.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x32))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-2j021j394j) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 50.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x5a))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-kj6n324i63n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 85.0 (-> arg1 origin y))) + (let ((v1-13 arg1)) + (set! (-> v1-13 height) (the float (the-as float #x4b))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-3iou4n3i45n3) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 height) (the float (the-as float #x1e))) + ) + (print-game-text + (lookup-text! *common-text* (game-text-id progress-draw-continue-retry-2-TODO) #f) + arg1 + #f + 44 + 320 + ) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-progressive-mode-ok-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 80.0) + (set! (-> arg1 origin y) 90.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x168))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x50))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-iun34593n45) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 100.0 (-> arg1 origin y))) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #x4b))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-on2394234n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 70.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 20.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-quit-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 #7efbfb)) + ) + (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! (-> arg1 origin x) 90.0) + (set! (-> arg1 origin y) 160.0) + (let ((v1-6 arg1)) + (set! (-> v1-6 width) (the float (the-as float #x14a))) + ) + (let ((v1-7 arg1)) + (set! (-> v1-7 height) (the float (the-as float #x46))) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-2iu3bn4289u34n) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + (draw-highlight (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha)) + (draw-yes-no arg0 (the-as float arg1)) + 0 + (none) + ) + +;; definition for method 10 of type menu-select-start-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; 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 menu-option-method-10 menu-select-start-option ((obj menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-48 int) + (sv-64 int) + (sv-80 game-task-info) + (sv-96 font-context) + (sv-112 (function string font-context symbol int int float)) + (sv-128 hud-box) + ) + (let* ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (s3-0 (-> obj task-index)) + (s2-0 0) + (s1-0 50) + (f28-0 (* (-> arg0 sliding-height) (the float s1-0))) + (s0-0 97) + ) + (set! sv-128 (new 'stack 'hud-box)) + (if (< f30-0 0.0) + (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 #7efbfb)) + ) + (set! (-> arg1 origin y) 100.0) + (let ((v1-9 arg1)) + (set! (-> v1-9 width) (the float (the-as float #x159))) + ) + (let ((v1-10 arg1)) + (set! (-> v1-10 height) (the float (the-as float #xd2))) + ) + (let* ((v1-11 (-> arg0 current)) + (a3-1 (cond + ((= v1-11 'select-pre-start) + 362 + ) + ((= v1-11 'select-kiosk-start) + 363 + ) + (else + 352 + ) + ) + ) + ) + (if (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 a3-1 #t 0.7) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 a3-1 #t 0.95) + ) + ) + (begin-scissor-level (the-as vector sv-128)) + (set! (-> arg1 origin x) 80.0) + (let ((v1-20 arg1)) + (set! (-> v1-20 scale) 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)) + ) + (when (>= (+ s3-0 -1) 0) + (+! s3-0 -1) + (set! s2-0 -1) + (draw-highlight (+ s0-0 47) 50 f30-0) + (set! s0-0 (- s0-0 s1-0)) + ) + (while (< s2-0 8) + (when (>= s3-0 0) + (set! sv-48 -1) + (set! sv-64 0) + (while (and (< sv-64 (-> *game-info* play-list length)) (!= sv-48 s3-0)) + (let* ((v1-39 (-> *game-info* play-list sv-64)) + (a0-22 (-> arg0 current)) + (a0-24 (cond + ((= a0-22 'select-pre-start) + (or (-> v1-39 play-continue) (-> v1-39 pre-play-continue)) + ) + ((= a0-22 'select-kiosk-start) + (-> v1-39 kiosk-play-continue) + ) + (else + (-> v1-39 play-continue) + ) + ) + ) + ) + (when (and a0-24 (lookup-text! *common-text* (the-as game-text-id (-> v1-39 text-name)) #t)) + (set! sv-48 (+ sv-48 1)) + sv-48 + ) + ) + (when (!= sv-48 s3-0) + (set! sv-64 (+ sv-64 1)) + sv-64 + ) + ) + (when (!= sv-64 (-> *game-info* play-list length)) + (set! sv-80 (-> *game-info* play-list sv-64)) + (cond + ((zero? s2-0) + (set! (-> obj real-task-index) sv-64) + (set! sv-96 arg1) + (set! (-> sv-96 color) (the-as font-color (progress-selected 0))) + (draw-highlight (+ s0-0 47) 50 f30-0) + ) + (else + (let ((a0-35 arg1)) + (set! (-> a0-35 color) (font-color #7efbfb)) + ) + ) + ) + (cond + ((and (= (-> *setting-control* user-default language) (language-enum german)) (= 454 (-> sv-80 text-name))) + (let ((v1-71 arg1)) + (set! (-> v1-71 scale) 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) + ) + ) + ) + (let ((v1-79 arg1)) + (set! (-> v1-79 height) (the float 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* (the-as game-text-id (-> sv-80 text-name)) #f)) + (a1-12 arg1) + (a2-7 #f) + (a3-2 44) + (t0-3 320) + ) + (sv-112 a0-46 a1-12 a2-7 a3-2 t0-3) + ) + ) + ) + (+! s3-0 1) + (+! s2-0 1) + ) + ) + (let ((t9-10 end-scissor-level)) + #x3f800000 + sv-128 + (t9-10) + ) + (draw-scene-up-down arg1) + 0 + (none) + ) + +;; definition for method 10 of type menu-select-scene-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 int float)) + (sv-80 (function string font-context symbol int int float)) + (sv-96 (function _varargs_ object)) + (sv-112 string) + (sv-128 (function string font-context symbol int int float)) + (sv-144 (function _varargs_ object)) + (sv-160 string) + (sv-176 (function string font-context symbol int int float)) + (sv-192 font-context) + (sv-208 font-context) + (sv-224 (function string font-context symbol int int float)) + ) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (s4-0 (-> obj task-index)) + (s3-0 0) + (s2-0 *hud-select-scene-act1*) + ) + (let ((v1-2 44)) + (* (-> arg0 sliding-height) (the float v1-2)) + ) + (let ((s0-0 120) + (s1-0 (new 'stack-no-clear 'vector)) + (f28-0 0.0) + ) + 0.0 + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (case (-> *progress-state* scene-player-act) + ((1) + (set! s2-0 *hud-select-scene-act1*) + ) + ((2) + (set! s2-0 *hud-select-scene-act2*) + ) + ((3) + (set! s2-0 *hud-select-scene-act3*) + ) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a1-6 arg1)) + (set! (-> a1-6 flags) (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 (the-as float #x14f))) + ) + (let ((v1-15 arg1)) + (set! (-> v1-15 height) (the float (the-as float #xd2))) + ) + (let ((a1-9 arg1)) + (set! (-> a1-9 color) (font-color #7efbfb)) + ) + (if (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 364 #t 0.7) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 364 #t 0.95) + ) + (begin-scissor-scene s1-0) + (let ((v1-23 arg1)) + (set! (-> v1-23 scale) 0.5) + ) + (set! sv-48 0) + (while (< sv-48 s4-0) + (set! sv-64 print-game-text) + (let ((a0-4 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options sv-48 box 0)) #f)) + (a1-16 arg1) + (a2-4 #t) + (a3-3 44) + (t0-3 320) + ) + (+! f28-0 (sv-64 a0-4 a1-16 a2-4 a3-3 t0-3)) + ) + (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* (the-as game-text-id (-> s2-0 options s4-0 box 0)) #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 320) + (f0-16 (sv-80 a0-8 a1-19 a2-7 a3-4 t0-4)) + ) + (* (-> arg0 sliding-height) f0-16) + ) + ) + (else + (set! sv-160 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options (+ s4-0 -1) box 0)) #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 320) + (f0-18 (sv-128 a0-12 a1-22 a2-10 a3-5 t0-5)) + ) + (* (-> arg0 sliding-height) f0-18) + ) + ) + ) + ) + ) + (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* (the-as game-text-id (-> s2-0 options s3-0 box 0)) #f)) + (a1-24 arg1) + (a2-12 #t) + (a3-6 44) + (t0-6 320) + (f26-0 (sv-176 a0-14 a1-24 a2-12 a3-6 t0-6)) + ) + (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) (the-as font-color (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) (the-as font-color (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 #7efbfb)) + ) + ) + ) + ) + (set! sv-224 print-game-text) + (let ((a0-23 (lookup-text! *common-text* (the-as game-text-id (-> s2-0 options s3-0 box 0)) #f)) + (a1-28 arg1) + (a2-16 #f) + (a3-7 44) + (t0-7 320) + ) + (+! s0-1 (the int (sv-224 a0-23 a1-28 a2-16 a3-7 t0-7))) + ) + (set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1)))) + (+! s3-0 1) + ) + ) + ) + ) + (let ((t9-22 end-scissor-scene)) + #x3f800000 + (t9-22) + ) + (draw-scene-up-down arg1) + 0 + (none) + ) + +;; definition for method 10 of type menu-bigmap-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-bigmap-option ((obj menu-bigmap-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + 0 + (none) + ) + +;; definition for function sort-task-node-result +;; WARN: Return type mismatch symbol vs none. +(defun sort-task-node-result ((arg0 int)) + (let ((v1-1 (-> *game-info* mission-list)) + (a1-1 (max 0 (+ arg0 -1))) + ) + (let ((a0-3 0)) + (while (> a1-1 0) + (while (< a0-3 a1-1) + (when (and (logtest? (-> v1-1 a0-3 flags) (game-task-node-flag closed)) + (logtest? (-> v1-1 (+ a0-3 1) flags) (game-task-node-flag closed)) + (< (-> v1-1 a0-3 close-time) (-> v1-1 (+ a0-3 1) close-time)) + ) + (let ((a2-19 (-> v1-1 a0-3))) + (set! (-> v1-1 a0-3) (-> v1-1 (+ a0-3 1))) + (set! (-> v1-1 (+ a0-3 1)) a2-19) + ) + ) + (+! a0-3 1) + ) + (+! a1-1 -1) + (set! a0-3 0) + ) + ) + ) + (none) + ) + +;; definition for function find-mission-text-at-index +(defun find-mission-text-at-index ((arg0 int)) + (local-vars (v1-99 symbol)) + (when (< arg0 (-> *progress-state* current-line-index)) + (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) + 0 + ) + (let ((s5-0 (-> *game-info* sub-task-list))) + 0 + (let ((s4-0 (the-as game-task-node-info #f))) + (while (and (> (-> *progress-state* current-task-index) 0) (!= (-> *progress-state* current-line-index) arg0)) + (cond + ((or (= (-> *progress-state* extra-text-state) -1) (= (-> *progress-state* extra-text-state) 3)) + (+! (-> *progress-state* current-task-index) -1) + (let ((s3-0 (-> s5-0 (-> *progress-state* current-task-index)))) + (when (and (!= (-> s3-0 task) (-> *progress-state* current-task)) (nonzero? (-> s3-0 description))) + (cond + ((and (>= (-> *progress-state* first-closed-line-index) 0) (open? s3-0)) + (set! (-> *progress-state* current-task) (the-as uint (-> s3-0 task))) + ) + ((or (and (>= (-> *progress-state* first-closed-line-index) 0) + (logtest? (-> s3-0 flags) (game-task-node-flag closed)) + ) + (and (< (-> *progress-state* first-closed-line-index) 0) (open? s3-0)) + ) + (set! (-> *progress-state* current-task) (the-as uint (-> s3-0 task))) + (set! s4-0 (-> s5-0 (-> *progress-state* current-task-index))) + (-> s5-0 (-> *progress-state* current-task-index) description) + (if (< (-> *progress-state* first-closed-line-index) 0) + (+! (-> *progress-state* num-open-tasks-found) 1) + (set! (-> *progress-state* num-closed-tasks-found) 1) + ) + (+! (-> *progress-state* current-line-index) 1) + ) + ) + ) + ) + (when (and (zero? (-> *progress-state* current-task-index)) (!= (-> *progress-state* current-line-index) arg0)) + (set! (-> *progress-state* current-task-index) (length (-> *game-info* sub-task-list))) + (cond + ((< (-> *progress-state* first-closed-line-index) 0) + (set! (-> *progress-state* first-closed-line-index) arg0) + (+! (-> *progress-state* extra-text-state) (if (nonzero? (-> *progress-state* num-open-tasks-found)) + 2 + 1 + ) + ) + ) + (else + (+! (-> *progress-state* extra-text-state) (if (nonzero? (-> *progress-state* num-closed-tasks-found)) + 2 + 1 + ) + ) + ) + ) + ) + ) + ((zero? (-> *progress-state* extra-text-state)) + 369 + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ((= (-> *progress-state* extra-text-state) 1) + 367 + #t + (let ((v1-98 (the-as symbol (-> *progress-state* num-open-tasks-found)))) + (set! v1-98 v1-98) + (cmove-#f-zero v1-99 v1-98 v1-98) + ) + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ((= (-> *progress-state* extra-text-state) 4) + 369 + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ((= (-> *progress-state* extra-text-state) 5) + 368 + (+! (-> *progress-state* extra-text-state) 2) + (+! (-> *progress-state* current-line-index) 1) + ) + (else + 0 + (+! (-> *progress-state* extra-text-state) 1) + (+! (-> *progress-state* current-line-index) 1) + ) + ) + ) + (cond + ((= (-> *progress-state* current-line-index) arg0) + (empty) + s4-0 + ) + (else + (the-as game-task-node-info #f) + ) + ) + ) + ) + ) + +;; definition for method 10 of type menu-missions-option +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 260 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 vector) + (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 'vector)) + (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) (the-as uint 381)) + (set! (-> sv-268 description) (the-as uint 380)) + (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) + (let ((v1-36 arg1)) + (set! (-> v1-36 width) 395.0) + ) + (set! (-> arg1 origin x) 60.0) + (set! (-> arg1 origin y) 80.0) + (let ((a0-21 arg1)) + (set! (-> a0-21 color) (font-color #7efbfb)) + ) + (let ((v1-40 (-> obj page-index))) + (cond + ((zero? v1-40) + (draw-missions-decoration obj arg1 sv-16 (game-text-id progress-1kjn2jn31kj3)) + ) + ((= v1-40 1) + (draw-missions-decoration obj arg1 sv-16 (game-text-id progress-1kjn2jn31kj3)) + ) + ) + ) + (begin-scissor-missions sv-276 (the-as float arg0)) + (let ((a0-27 arg1)) + (set! (-> a0-27 flags) (font-flags kerning large)) + ) + (set! (-> arg1 origin x) (+ 20.0 (-> arg1 origin x))) + (case (get-aspect-ratio) + (('aspect16x9) + (set! (-> arg1 origin y) 80.0) + ) + (('aspect4x3) + (set! (-> arg1 origin y) (the float sv-56)) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 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* (the-as game-text-id 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 320) (-> *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* (the-as game-text-id 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 320)))) + (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* (the-as game-text-id 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 320)))) + (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* (the-as game-text-id 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)) + (game-text-id progress-iko1jn231kjhn23) + (game-text-id progress-1kj2n31j23) + ) + #f + ) + ) + (s3-6 *temp-string* arg1 #f 44 320) + ) + ) + (set! (-> arg1 origin x) (+ 20.0 (-> arg1 origin x))) + (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 320))) + ) + (set! (-> arg1 origin x) (+ -20.0 (-> arg1 origin x))) + 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 320)) + ) + ) + ) + ) + ) + (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* (game-text-id progress-1klj2n31j2n3) #f) arg1 #f 44 320) + ) + ) + (let ((t9-39 end-scissor-missions) + (a0-93 sv-276) + ) + #x3f800000 + (t9-39 a0-93) + ) + (draw-missions-up-down arg1) + 0 + (none) + ) + +;; definition for function draw-secret-list +;; WARN: Return type mismatch object vs 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) + (cond + ((= s4-0 #t) + (cond + ((= (-> arg0 can-toggle) 'auto) + ) + ((not (-> arg0 can-toggle)) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg2 origin x) (+ -25.0 (-> arg2 origin x))) + ) + (('aspect16x9) + (set! (-> arg2 origin x) (+ -10.0 (-> arg2 origin x))) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-19 arg2)) + (set! (-> v1-19 scale) 0.43) + ) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-1klj2n31j23) #f) arg2 #f 44 320) + ) + ((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) (zero? (logand (-> *game-info* secrets) (-> arg0 flag)))) + (logior! (-> *game-info* secrets) (-> arg0 flag)) + (set! (-> arg1 selected-option) #f) + ) + ) + ) + (else + (let ((s3-1 arg2)) + (set! (-> s3-1 color) (if (= arg3 1) + (the-as font-color (progress-selected 0)) + (font-color #7efbfb) + ) + ) + ) + (set! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 75 + 90 + ) + ) + ) + (cond + ((logtest? (-> *game-info* sub-task-list (-> arg0 avail-after) flags) (game-task-node-flag closed)) + (let ((s3-3 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> arg0 name)) #f)) + (s3-3 *temp-string* arg2 #f 44 320) + ) + ) + (else + (let ((s3-4 print-game-text)) + (format (clear *temp-string*) "????????") + (s3-4 *temp-string* arg2 #f 44 320) + ) + ) + ) + (set! (-> arg2 origin x) 360.0) + (let ((a0-35 arg2)) + (set! (-> a0-35 color) (font-color #7efbfb)) + ) + ) + ) + (cond + ((and (not s4-0) (zero? (logand (-> *game-info* purchase-secrets) (-> arg0 flag)))) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + ) + ) + ) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) "~D" (-> arg0 cost)) + (s4-2 *temp-string* arg2 #f 44 320) + ) + ) + ((and (not s4-0) (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag))) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + ) + ) + ) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f)) + (s5-2 *temp-string* arg2 #f 44 320) + ) + ) + ((and (not s4-0) (= (-> arg0 can-toggle) #t) (zero? (logand (-> *game-info* secrets) (-> arg0 flag)))) + (+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3) + 50 + 45 + ) + ) + ) + (let ((s5-4 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f)) + (s5-4 *temp-string* arg2 #f 44 320) + ) + ) + ((and (not s4-0) (!= (-> arg0 can-toggle) #t)) + (let ((s3-8 80) + (s5-5 70) + (f30-3 (-> arg2 origin x)) + ) + (set! s3-8 (cond + ((= (get-aspect-ratio) 'aspect4x3) + (empty) + s3-8 + ) + (else + s5-5 + ) + ) + ) + (set! (-> arg2 origin x) (+ f30-3 (the float s3-8))) + ) + (let ((a0-61 arg2)) + (set! (-> a0-61 flags) (font-flags kerning right large)) + ) + (let ((s5-6 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-1l2jnm31lk2m3) #f)) + (s5-6 *temp-string* arg2 #f 44 320) + ) + (let ((v0-32 arg2)) + (set! (-> v0-32 flags) (font-flags kerning large)) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type menu-secret-option +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 36 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 116 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 16 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 112 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-secret-option ((obj menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (sv-16 float) + (sv-20 symbol) + (sv-24 int) + (sv-32 float) + (sv-36 float) + (sv-40 symbol) + (sv-44 int) + (sv-48 progress) + (sv-96 int) + (sv-104 int) + (sv-108 float) + (sv-112 int) + (sv-116 int) + (sv-120 vector) + (sv-128 int) + ) + (set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-20 (logtest? (-> *game-info* secrets) (game-secrets big-head))) + (set! sv-24 (the int (-> *game-info* skill-total))) + (set! sv-32 395.0) + (set! sv-36 25.0) + (set! sv-40 arg3) + (set! sv-44 arg2) + (set! sv-48 arg0) + (set! sv-96 (if (not sv-20) + 0 + (-> obj num-items) + ) + ) + (set! sv-104 (if (not sv-20) + (-> obj num-items) + (+ (-> obj num-items) (-> obj num-hero-items)) + ) + ) + (set! sv-108 (* (-> sv-48 sliding) sv-36)) + (set! sv-112 (-> obj item-index)) + (set! sv-116 (-> obj prev-item-index)) + (set! sv-120 (new 'stack-no-clear 'vector)) + (set! sv-128 205) + (if (< sv-16 0.0) + (set! sv-16 (the-as float 0.0)) + ) + (cond + ((or (not (-> *bigmap* progress-minimap)) (< (-> obj item-index) sv-96) (< sv-104 (-> obj item-index))) + (draw-busy-loading arg1) + ) + (else + (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) + (set! (-> obj sprites 0 scale-y) 0.64) + (set-vector! (-> obj sprites 0 color) 128 128 128 (the int (* 128.0 sv-16))) + (set! (-> obj sprites 0 pos z) #xffffff) + (set! (-> obj sprites 0 pos w) 0) + (set-hud-piece-position! (the-as basic (-> obj sprites)) 100 128) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-0 (-> s3-0 base)) + ) + (-> obj sprites) + (let ((t9-3 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-3) + ) + (let ((a3-1 (-> s3-0 base))) + (let ((v1-42 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-42) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-42) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-42) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-42) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s4-0 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (set! (-> arg1 alpha) sv-16) + (let ((a0-21 arg1)) + (set! (-> a0-21 flags) (font-flags kerning middle large)) + ) + (let ((a0-22 arg1)) + (set! (-> a0-22 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) 59.0) + (let ((v1-54 arg1)) + (set! (-> v1-54 width) sv-32) + ) + (let ((v1-55 arg1)) + (set! (-> v1-55 height) sv-36) + ) + (let ((v1-56 arg1)) + (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 game-text-id a3-2)) + ) + (let ((v1-58 arg1)) + (set! (-> v1-58 scale) 0.45) + ) + (when (or (= (-> *setting-control* user-default language) (language-enum japanese)) + (= (-> *setting-control* user-default language) (language-enum korean)) + ) + (let ((v1-66 arg1)) + (set! (-> v1-66 scale) 0.53) + ) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (let ((v1-68 arg1)) + (set! (-> v1-68 height) (the float (the-as float #xb9))) + ) + (set! (-> arg1 origin y) 133.0) + ) + (('aspect16x9) + (let ((v1-72 arg1)) + (set! (-> v1-72 height) (the float (the-as float #xb9))) + ) + (set! (-> arg1 origin y) 133.0) + ) + ) + (let ((a0-34 arg1)) + (set! (-> a0-34 flags) (font-flags kerning large)) + ) + (set! (-> arg1 origin x) 100.0) + (let ((s4-1 print-game-text)) + (format + (clear *temp-string*) + "x~D ~S" + sv-24 + (lookup-text! *common-text* (game-text-id progress-1k2ijn1jkn3) #f) + ) + (s4-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) 100.0) + (let ((t9-11 begin-scissor-secret) + (a0-39 sv-120) + ) + sv-48 + (t9-11 a0-39) + ) + (case (get-aspect-ratio) + (('aspect16x9) + (set! sv-128 195) + ) + ) + (cond + (sv-40 + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) + (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) + ) + ((>= (- sv-112 sv-116) 0) + (when (>= (+ sv-112 -3) sv-96) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) -50 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 -3)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (>= (+ sv-112 -2) sv-96) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) -25 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 -2)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ sv-128 (the int sv-108)))) + (when (>= (+ sv-112 -1) sv-96) + (draw-highlight (+ sv-128 22) 22 sv-16) + (draw-secret-list (-> obj secret-items (+ sv-112 -1)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) + (draw-highlight (+ sv-128 22) 22 sv-16) + (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) + (when (< (+ sv-112 1) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 50 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 1)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 2) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 75 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 2)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 3) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 100 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 3)) sv-48 arg1 0 sv-40 sv-108) + ) + ) + (else + (when (>= (+ sv-112 -2) sv-96) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) -25 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 -2)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ sv-128 (the int sv-108)))) + (if (>= (+ sv-112 -1) sv-96) + (draw-secret-list (-> obj secret-items (+ sv-112 -1)) sv-48 arg1 0 sv-40 sv-108) + ) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128))) + (draw-highlight (+ sv-128 22) 22 sv-16) + (draw-secret-list (-> obj secret-items sv-112) sv-48 arg1 1 sv-40 sv-108) + (when (< (+ sv-112 1) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 50 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 1)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 2) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 75 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 2)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 3) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 100 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 3)) sv-48 arg1 0 sv-40 sv-108) + ) + (when (< (+ sv-112 4) sv-104) + (set! (-> arg1 origin y) (the float (+ (the int sv-108) 125 sv-128))) + (draw-secret-list (-> obj secret-items (+ sv-112 4)) sv-48 arg1 0 sv-40 sv-108) + ) + ) + ) + (let ((t9-31 end-scissor-secret)) + sv-120 + #x3f800000 + (t9-31) + ) + (draw-up-down arg1) + ) + ) + 0 + (none) + ) + +;; 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) + ) + :method-count-assert 9 + :size-assert #x28 + :flag-assert #x900000028 + ) + +;; definition for method 3 of type print-highscore-obj +(defmethod inspect print-highscore-obj ((obj print-highscore-obj)) + (when (not obj) + (set! obj obj) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~1Tself: ~A~%" (-> obj self)) + (format #t "~1Tindex: ~D~%" (-> obj index)) + (format #t "~1Tprevious: ~A~%" (-> obj previous)) + (format #t "~1Tplace: ~D~%" (-> obj place)) + (format #t "~1Tscore: ~f~%" (-> obj score)) + (format #t "~1Tgame-score: ~A~%" (-> obj game-score)) + (format #t "~1Tcontext: ~A~%" (-> obj context)) + (format #t "~1Tlocal-scale: ~f~%" (-> obj local-scale)) + (format #t "~1Tinterp: ~f~%" (-> obj interp)) + (label cfg-4) + obj + ) + +;; definition for function draw-highscore-icon +(defun draw-highscore-icon ((arg0 menu-highscores-option) (arg1 uint) (arg2 int) (arg3 int) (arg4 float)) + (set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id arg1))) + (set! (-> arg0 sprites 0 scale-x) arg4) + (set! (-> arg0 sprites 0 scale-y) arg4) + (set-hud-piece-position! (the-as basic (-> arg0 sprites)) arg2 arg3) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-1 (-> s4-1 base)) + ) + (-> arg0 sprites) + (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-2) + ) + (let ((a3-1 (-> s4-1 base))) + (let ((v1-8 (the-as object (-> s4-1 base)))) + (set! (-> (the-as dma-packet v1-8) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + gp-1 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + ) + +;; definition for function draw-highscore-cup +(defun draw-highscore-cup ((arg0 texture-page) (arg1 object) (arg2 int) (arg3 int) (arg4 float) (arg5 float)) + (let ((a0-1 (the-as uint #xc9300300))) + (case arg1 + ((3) + (set! a0-1 (the-as uint #xc9300300)) + ) + ((2) + (set! a0-1 (the-as uint #xc9300a00)) + ) + ((1) + (set! a0-1 (the-as uint #xc9300d00)) + ) + ) + (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 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 basic (&-> arg0 pad 3)) arg2 arg3) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-1 base)) + ) + (&-> arg0 pad 3) + (let ((t9-2 (method-of-type hud-sprite hud-sprite-method-9))) + (-> *level* default-level) + (t9-2) + ) + (let ((a3-1 (-> s4-1 base))) + (let ((v1-20 (the-as object (-> s4-1 base)))) + (set! (-> (the-as dma-packet v1-20) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-20) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-20) vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (&+ (the-as pointer v1-20) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + s5-1 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + ) + ) + ) + +;; definition for function get-highscore-score +(defun get-highscore-score ((arg0 int)) + "TODO - takes and returns an enum?" + (let ((v0-0 11)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 4) + ) + ((= v1-0 1) + (set! v0-0 5) + ) + ((= v1-0 2) + (set! v0-0 6) + ) + ((= v1-0 3) + (set! v0-0 7) + ) + ((= v1-0 4) + (set! v0-0 10) + ) + ((= v1-0 5) + (set! v0-0 13) + ) + ((= v1-0 6) + (set! v0-0 12) + ) + ((= v1-0 7) + (set! v0-0 11) + ) + ((= v1-0 8) + (set! v0-0 14) + ) + ((= v1-0 9) + (set! v0-0 15) + ) + ((= v1-0 10) + (set! v0-0 18) + ) + ((= v1-0 11) + (set! v0-0 17) + ) + ((= v1-0 12) + (set! v0-0 16) + ) + ((= v1-0 13) + (set! v0-0 8) + ) + ((= v1-0 14) + (set! v0-0 9) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function eval-highscore +(defun eval-highscore ((arg0 print-highscore-obj)) + (-> *highscore-info-array* (get-highscore-score (-> arg0 index))) + (let ((t9-1 (method-of-type highscore-info highscore-info-method-9))) + (-> arg0 score) + (t9-1) + ) + (none) + ) + +;; definition for function str-print-time +(defun str-print-time ((arg0 float)) + 0 + 0 + 0 + (let* ((gp-0 (the int (* 0.016666668 arg0))) + (v1-5 (- arg0 (* 60.0 (the float gp-0)))) + (s5-0 (the int v1-5)) + (v1-6 (- v1-5 (the float s5-0))) + (s3-0 (the int (* 1000.0 v1-6))) + ) + (format (clear *temp-string*) "~d:~2,'0,d:~3,'0,d" gp-0 s5-0 s3-0) + ) + *temp-string* + ) + +;; definition for function print-highscore +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +;; WARN: Stack slot offset 20 signed mismatch +(defun print-highscore ((arg0 print-highscore-obj)) + (local-vars (sv-16 font-context) (sv-20 float) (sv-24 int) (sv-32 int) (sv-40 print-highscore-obj)) + (set! sv-16 (-> arg0 context)) + (set! sv-20 (-> arg0 interp)) + (set! sv-24 50) + (set! sv-32 (if (= (get-aspect-ratio) 'aspect4x3) + 320 + 300 + ) + ) + (set! sv-40 arg0) + (let ((a0-1 sv-16)) + (set! (-> a0-1 flags) (font-flags kerning large)) + ) + (+! (-> sv-16 origin x) (the float sv-24)) + (let ((v1-8 (-> sv-40 place))) + (cond + ((zero? v1-8) + (let ((gp-1 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-k1jnb231kjhnb23) #f)) + (gp-1 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 112) + 174 + 0.25 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 1) + (let ((v1-18 sv-16)) + (set! (-> v1-18 scale) 0.5) + ) + (set! (-> sv-16 origin y) (+ 23.0 (-> sv-16 origin y))) + (let ((gp-3 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-loj1n23) #f)) + (gp-3 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 111) + 197 + 0.22 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 2) + (let ((v1-31 sv-16)) + (set! (-> v1-31 scale) 0.4) + ) + (set! (-> sv-16 origin y) (+ 20.0 (-> sv-16 origin y))) + (let ((gp-5 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2k3jn4234) #f)) + (gp-5 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 110) + 217 + 0.2 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 3) + (let ((v1-44 sv-16)) + (set! (-> v1-44 scale) 0.3) + ) + (set! (-> sv-16 origin y) (+ 15.0 (-> sv-16 origin y))) + (let ((gp-7 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2kj3n24kn) #f)) + (gp-7 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 232 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 4) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-9 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2kjn34) #f)) + (gp-9 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 244 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 5) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-11 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2klj342n43) #f)) + (gp-11 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 256 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 6) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-13 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-l2jm342m34) #f)) + (gp-13 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 268 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ((= v1-8 7) + (set! (-> sv-16 origin y) (+ 12.0 (-> sv-16 origin y))) + (let ((gp-15 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (game-text-id progress-2m342kmj34) #f)) + (gp-15 *temp-string* sv-16 #f 44 320) + ) + (if (not (-> sv-40 previous)) + (draw-highscore-cup + (-> sv-40 self) + (the-as object (eval-highscore sv-40)) + (+ (the int sv-20) 109) + 280 + 0.15 + (-> sv-40 local-scale) + ) + ) + ) + ) + ) + (+! (-> sv-16 origin x) (the float sv-32)) + (let ((a0-67 sv-16)) + (set! (-> a0-67 flags) (font-flags kerning right large)) + ) + (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 320) + ) + ) + (else + (print-game-text (str-print-time (-> sv-40 score)) sv-16 #f 44 320) + ) + ) + (let ((a0-73 sv-16)) + (set! (-> a0-73 flags) (font-flags kerning large)) + ) + (set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32)))) + ) + +;; definition for function get-highscore-text +;; WARN: Return type mismatch int vs game-text-id. +(defun get-highscore-text ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-0 319)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 323) + ) + ((= v1-0 1) + (set! v0-0 323) + ) + ((= v1-0 2) + (set! v0-0 323) + ) + ((= v1-0 3) + (set! v0-0 323) + ) + ((= v1-0 4) + (set! v0-0 330) + ) + ((= v1-0 5) + (set! v0-0 319) + ) + ((= v1-0 6) + (set! v0-0 319) + ) + ((= v1-0 7) + (set! v0-0 319) + ) + ((= v1-0 8) + (set! v0-0 319) + ) + ((= v1-0 9) + (set! v0-0 319) + ) + ((= v1-0 10) + (set! v0-0 319) + ) + ((= v1-0 11) + (set! v0-0 319) + ) + ((= v1-0 12) + (set! v0-0 319) + ) + ((= v1-0 13) + (set! v0-0 328) + ) + ((= v1-0 14) + (set! v0-0 329) + ) + ) + ) + (the-as game-text-id v0-0) + ) + ) + +;; definition for function get-highscore-text-sub +;; WARN: Return type mismatch int vs game-text-id. +(defun get-highscore-text-sub ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-0 320)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 324) + ) + ((= v1-0 1) + (set! v0-0 325) + ) + ((= v1-0 2) + (set! v0-0 326) + ) + ((= v1-0 3) + (set! v0-0 327) + ) + ((= v1-0 4) + (set! v0-0 333) + ) + ((= v1-0 5) + (set! v0-0 322) + ) + ((= v1-0 6) + (set! v0-0 321) + ) + ((= v1-0 7) + (set! v0-0 320) + ) + ((= v1-0 8) + (set! v0-0 337) + ) + ((= v1-0 9) + (set! v0-0 338) + ) + ((= v1-0 10) + (set! v0-0 336) + ) + ((= v1-0 11) + (set! v0-0 335) + ) + ((= v1-0 12) + (set! v0-0 334) + ) + ((= v1-0 13) + (set! v0-0 331) + ) + ((= v1-0 14) + (set! v0-0 332) + ) + ) + ) + (the-as game-text-id v0-0) + ) + ) + +;; definition for function get-highscore-icon +(defun get-highscore-icon ((arg0 int)) + "TODO - Icon id enum perhaps?" + (let ((v0-0 (the-as uint #xc9301000))) + (let ((v1-1 arg0)) + (cond + ((zero? v1-1) + (set! v0-0 (the-as uint #xc9301000)) + ) + ((= v1-1 1) + (set! v0-0 (the-as uint #xc9301200)) + ) + ((= v1-1 2) + (set! v0-0 (the-as uint #xc9301300)) + ) + ((= v1-1 3) + (set! v0-0 (the-as uint #xc9301100)) + ) + ((= v1-1 4) + (set! v0-0 (the-as uint #xc9300e00)) + ) + ((= v1-1 5) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 6) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 7) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 8) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 9) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 10) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 11) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 12) + (set! v0-0 (the-as uint #xc9300100)) + ) + ((= v1-1 13) + (set! v0-0 (the-as uint #xc9301600)) + ) + ((= v1-1 14) + (set! v0-0 (the-as uint #xc9301700)) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function get-highscore-type +(defun get-highscore-type ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-0 'game)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 'game) + ) + ((= v1-0 5) + (set! v0-0 'race) + ) + ((= v1-0 6) + (set! v0-0 'race) + ) + ((= v1-0 7) + (set! v0-0 'race) + ) + ((= v1-0 8) + (set! v0-0 'race) + ) + ((= v1-0 9) + (set! v0-0 'race) + ) + ((= v1-0 10) + (set! v0-0 'race) + ) + ((= v1-0 11) + (set! v0-0 'race) + ) + ((= v1-0 12) + (set! v0-0 'race) + ) + ((= v1-0 13) + (set! v0-0 'game) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function highscore-available? +(defun highscore-available? ((arg0 int)) + (let ((v0-0 #f)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + (set! v0-0 #t) + ) + ((= v1-0 1) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 75 flags) (game-task-node-flag closed))) + ) + ((= v1-0 2) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets gungame-dark))) + ) + ((= v1-0 3) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets reverse-races))) + ) + ((= v1-0 4) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 63 flags) (game-task-node-flag closed))) + ) + ((= v1-0 5) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 135 flags) (game-task-node-flag closed))) + ) + ((= v1-0 6) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 181 flags) (game-task-node-flag closed))) + ) + ((= v1-0 7) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 209 flags) (game-task-node-flag closed))) + ) + ((= v1-0 8) + (set! v0-0 (or (logtest? (-> *game-info* sub-task-list 308 flags) (game-task-node-flag closed)) + (open? (-> *game-info* sub-task-list 308)) + ) + ) + ) + ((= v1-0 9) + (set! v0-0 (or (logtest? (-> *game-info* sub-task-list 306 flags) (game-task-node-flag closed)) + (open? (-> *game-info* sub-task-list 306)) + ) + ) + ) + ((= v1-0 10) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + ((= v1-0 11) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + ((= v1-0 12) + (set! v0-0 (logtest? (-> *game-info* secrets) (game-secrets hero-mode))) + ) + ((= v1-0 13) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 149 flags) (game-task-node-flag closed))) + ) + ((= v1-0 14) + (set! v0-0 (logtest? (-> *game-info* sub-task-list 224 flags) (game-task-node-flag closed))) + ) + ) + ) + v0-0 + ) + ) + +;; definition for function get-num-highscores +(defun get-num-highscores () + (let ((gp-0 0)) + (dotimes (s5-0 15) + (if (highscore-available? s5-0) + (+! gp-0 1) + ) + ) + gp-0 + ) + ) + +;; definition for function get-next-highscore +(defun get-next-highscore ((arg0 int)) + (let ((s4-0 15) + (s3-0 1) + (gp-0 -1) + ) + (+ arg0 s3-0) + (while (and (= gp-0 -1) (< s3-0 s4-0)) + (let ((s2-0 (+ arg0 s3-0))) + (+! s3-0 1) + (if (highscore-available? (mod s2-0 s4-0)) + (set! gp-0 (mod s2-0 s4-0)) + ) + ) + ) + (if (= gp-0 -1) + (set! gp-0 arg0) + ) + gp-0 + ) + ) + +;; definition for function get-prev-highscore +(defun get-prev-highscore ((arg0 int)) + (let ((s4-0 15) + (s3-0 1) + (gp-0 -1) + ) + (+ arg0 s3-0) + (while (and (= gp-0 -1) (< s3-0 s4-0)) + (let ((s2-0 (- arg0 s3-0))) + (+! s3-0 1) + (if (< s2-0 0) + (set! s2-0 (+ s4-0 s2-0)) + ) + (let ((t9-0 highscore-available?) + (a0-1 (abs s2-0)) + ) + (if (t9-0 a0-1) + (set! gp-0 (abs s2-0)) + ) + ) + ) + ) + (if (= gp-0 -1) + (set! gp-0 arg0) + ) + gp-0 + ) + ) + +;; definition for function get-highscore-icon-scale +(defun get-highscore-icon-scale ((arg0 int)) + "TODO - takes an enum?" + (let ((f0-0 (if (= (get-aspect-ratio) 'aspect4x3) + 1.0 + 1.0 + ) + ) + ) + (let ((f2-0 0.6) + (f1-0 0.8) + ) + (cond + ((zero? arg0) + (set! f0-0 f2-0) + ) + ((= arg0 1) + (set! f0-0 f2-0) + ) + ((= arg0 2) + (set! f0-0 f2-0) + ) + ((= arg0 3) + (set! f0-0 f2-0) + ) + ((= arg0 4) + (set! f0-0 0.5) + ) + ((= arg0 5) + (set! f0-0 f1-0) + ) + ((= arg0 6) + (set! f0-0 f1-0) + ) + ((= arg0 7) + (set! f0-0 f1-0) + ) + ((= arg0 8) + (set! f0-0 f1-0) + ) + ((= arg0 9) + (set! f0-0 f1-0) + ) + ((= arg0 10) + (set! f0-0 f1-0) + ) + ((= arg0 11) + (set! f0-0 f1-0) + ) + ((= arg0 12) + (set! f0-0 f1-0) + ) + ((= arg0 13) + (set! f0-0 0.7) + ) + ((= arg0 14) + (set! f0-0 0.7) + ) + ) + ) + f0-0 + ) + ) + +;; definition for function get-highscore-icon-xoffset +(defun get-highscore-icon-xoffset () + (if (= (get-aspect-ratio) 'aspect4x3) + 435 + 410 + ) + ) + +;; definition for function get-highscore-icon-yoffset +(defun get-highscore-icon-yoffset ((arg0 int)) + "TODO - takes an enum?" + (let ((v0-1 (if (= (get-aspect-ratio) 'aspect4x3) + 130 + 120 + ) + ) + ) + (let ((a0-1 130) + (v1-0 120) + ) + (cond + ((zero? arg0) + (set! v0-1 a0-1) + ) + ((= arg0 1) + (set! v0-1 a0-1) + ) + ((= arg0 2) + (set! v0-1 a0-1) + ) + ((= arg0 3) + (set! v0-1 a0-1) + ) + ((= arg0 5) + (set! v0-1 v1-0) + ) + ((= arg0 6) + (set! v0-1 v1-0) + ) + ((= arg0 7) + (set! v0-1 v1-0) + ) + ((= arg0 8) + (set! v0-1 v1-0) + ) + ((= arg0 9) + (set! v0-1 v1-0) + ) + ((= arg0 10) + (set! v0-1 v1-0) + ) + ((= arg0 11) + (set! v0-1 v1-0) + ) + ((= arg0 12) + (set! v0-1 v1-0) + ) + ((= arg0 13) + (set! v0-1 125) + ) + ((= arg0 14) + (set! v0-1 125) + ) + ) + ) + v0-1 + ) + ) + +;; definition for method 10 of type menu-highscores-option +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 104 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 100 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 124 signed mismatch +;; WARN: Stack slot offset 96 signed mismatch +;; WARN: Stack slot offset 120 signed mismatch +;; WARN: Stack slot offset 108 signed mismatch +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 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 vector) + (sv-116 print-highscore-obj) + (sv-120 float) + (sv-124 float) + (sv-128 symbol) + (sv-132 int) + (sv-136 progress) + (sv-140 font-context) + (sv-144 menu-highscores-option) + ) + (set! sv-96 (* 2.0 (- 0.5 (-> arg0 menu-transition)))) + (set! sv-100 0.22) + (set! sv-104 395.0) + (set! sv-108 (-> arg1 origin x)) + (set! sv-112 (new 'stack-no-clear 'vector)) + (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)) + (set! sv-128 arg3) + (set! sv-132 arg2) + (set! sv-136 arg0) + (set! sv-140 arg1) + (set! sv-144 obj) + (if (< sv-96 0.0) + (set! sv-96 (the-as float 0.0)) + ) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading sv-140) + ) + (else + (set! (-> sv-140 alpha) sv-96) + (let ((v1-16 sv-140)) + (set! (-> v1-16 scale) 1.0) + ) + (let ((a0-4 sv-140)) + (set! (-> a0-4 flags) (font-flags kerning middle large)) + ) + (let ((a0-5 sv-140)) + (set! (-> a0-5 color) (font-color #7efbfb)) + ) + (set! (-> sv-140 origin x) 59.0) + (set! (-> sv-140 origin y) 78.0) + (let ((v1-23 sv-140)) + (set! (-> v1-23 width) sv-104) + ) + (let ((v1-24 sv-140)) + (set! (-> v1-24 height) 215.0) + ) + (begin-scissor sv-112 sv-136) + (set! (-> sv-144 sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc93))) + (set! (-> sv-144 sprites 0 flags) (the-as uint 4)) + (set! (-> sv-144 sprites 0 scale-x) sv-100) + (set! (-> sv-144 sprites 0 scale-y) sv-100) + (set-vector! (-> sv-144 sprites 0 color) 128 128 128 (the int (* 128.0 sv-96))) + (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 (the-as menu-quit-qr-option sv-144) sv-140 sv-96 310 #t 0.8) + (draw-decoration (the-as menu-quit-qr-option sv-144) sv-140 sv-96 310 #t 0.95) + ) + (let ((v1-39 sv-140)) + (set! (-> v1-39 scale) 0.6) + ) + (let ((v1-40 sv-140)) + (set! (-> v1-40 height) 185.0) + ) + (set! (-> sv-140 origin y) (+ 46.0 (-> sv-140 origin y))) + (set! (-> sv-140 origin x) 65.0) + (let ((v1-46 sv-140)) + (set! (-> v1-46 width) (the float (the-as float #x16f))) + ) + (let ((a0-23 sv-140)) + (set! (-> a0-23 flags) (font-flags kerning large)) + ) + (let ((a0-24 sv-140)) + (set! (-> a0-24 color) (font-color #f9f9f9)) + ) + (set! (-> sv-140 origin x) (+ 20.0 sv-120 (-> sv-140 origin x))) + (let ((v1-53 sv-140)) + (set! (-> v1-53 scale) 0.75) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-56 sv-140)) + (set! (-> v1-56 scale) 0.69) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-59 sv-140)) + (set! (-> v1-59 scale) 0.72) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum spanish)) + (let ((v1-62 sv-140)) + (set! (-> v1-62 scale) 0.65) + ) + ) + (let ((gp-1 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text (-> sv-144 page-index)) #f) + ) + (gp-1 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((v1-68 sv-140)) + (set! (-> v1-68 scale) 0.6) + ) + (when (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (let ((v1-76 sv-140)) + (set! (-> v1-76 scale) 0.58) + ) + ) + (let ((gp-2 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text-sub (-> sv-144 page-index)) #f) + ) + (gp-2 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-120))) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((gp-3 draw-highscore-icon) + (s5-3 sv-144) + (s4-3 (get-highscore-icon (-> sv-144 page-index))) + (t9-17 get-highscore-icon-xoffset) + ) + (-> sv-144 page-index) + (gp-3 + s5-3 + s4-3 + (the int (+ (the float (t9-17)) sv-120)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) + ) + ) + (set! sv-108 (-> sv-140 origin x)) + (let ((a0-54 sv-140)) + (set! (-> a0-54 color) (font-color #7efbfb)) + ) + (+! (-> sv-140 origin x) sv-120) + (let ((v1-96 sv-140)) + (set! (-> v1-96 scale) 0.6) + ) + (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)) + (case (get-highscore-type (-> sv-144 page-index)) + (('game) + (set! (-> sv-116 game-score) (the-as basic #t)) + ) + (('race) + (set! (-> sv-116 game-score) #f) + ) + ) + (set! (-> sv-116 context) sv-140) + (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! (-> sv-140 origin x) sv-108) + (let ((v1-120 sv-140)) + (set! (-> v1-120 scale) 0.6) + ) + (set! (-> sv-140 origin x) 59.0) + (set! (-> sv-140 origin y) 78.0) + (let ((v1-125 sv-140)) + (set! (-> v1-125 width) sv-104) + ) + (let ((v1-126 sv-140)) + (set! (-> v1-126 height) 215.0) + ) + (let ((v1-127 sv-140)) + (set! (-> v1-127 scale) 0.5) + ) + (let ((v1-128 sv-140)) + (set! (-> v1-128 height) 185.0) + ) + (set! (-> sv-140 origin y) (+ 46.0 (-> sv-140 origin y))) + (set! (-> sv-140 origin x) 80.0) + (set! (-> sv-144 sprites 0 pos z) #xffffff) + (let ((v1-135 sv-140)) + (set! (-> v1-135 width) sv-104) + ) + (let ((a0-74 sv-140)) + (set! (-> a0-74 flags) (font-flags kerning large)) + ) + (let ((a0-75 sv-140)) + (set! (-> a0-75 color) (font-color #f9f9f9)) + ) + (set! (-> sv-140 origin x) (+ 20.0 sv-124 (-> sv-140 origin x))) + (let ((v1-142 sv-140)) + (set! (-> v1-142 scale) 0.75) + ) + (when (= (-> *setting-control* user-default language) (language-enum german)) + (let ((v1-145 sv-140)) + (set! (-> v1-145 scale) 0.69) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-148 sv-140)) + (set! (-> v1-148 scale) 0.72) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum spanish)) + (let ((v1-151 sv-140)) + (set! (-> v1-151 scale) 0.65) + ) + ) + (let ((gp-6 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text (-> sv-144 prev-page-index)) #f) + ) + (gp-6 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((v1-157 sv-140)) + (set! (-> v1-157 scale) 0.6) + ) + (when (or (= (-> *setting-control* user-default language) (language-enum french)) + (= (-> *setting-control* user-default language) (language-enum spanish)) + ) + (let ((v1-165 sv-140)) + (set! (-> v1-165 scale) 0.58) + ) + ) + (let ((gp-7 print-game-text)) + (format + (clear *temp-string*) + "~S" + (lookup-text! *common-text* (get-highscore-text-sub (-> sv-144 prev-page-index)) #f) + ) + (gp-7 *temp-string* sv-140 #f 44 320) + ) + (set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-124))) + (set! (-> sv-140 origin y) (+ 25.0 (-> sv-140 origin y))) + (let ((gp-8 draw-highscore-icon) + (s5-8 sv-144) + (s4-6 (get-highscore-icon (-> sv-144 prev-page-index))) + (t9-36 get-highscore-icon-xoffset) + ) + (-> sv-144 page-index) + (gp-8 + s5-8 + s4-6 + (the int (+ (the float (t9-36)) sv-124)) + (get-highscore-icon-yoffset (-> sv-144 page-index)) + (get-highscore-icon-scale (-> sv-144 page-index)) + ) + ) + (set! sv-108 (-> sv-140 origin x)) + (let ((a0-105 sv-140)) + (set! (-> a0-105 color) (font-color #7efbfb)) + ) + (+! (-> sv-140 origin x) sv-124) + (let ((v1-185 sv-140)) + (set! (-> v1-185 scale) 0.6) + ) + (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)) + (case (get-highscore-type (-> sv-144 prev-page-index)) + (('game) + (set! (-> sv-116 game-score) (the-as basic #t)) + ) + (('race) + (set! (-> sv-116 game-score) #f) + ) + ) + (set! (-> sv-116 context) sv-140) + (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! (-> sv-140 origin x) sv-108) + (let ((v1-210 sv-140)) + (set! (-> v1-210 scale) 0.6) + ) + ) + (if (< 1 (get-num-highscores)) + (draw-previous-next sv-144 sv-140 #t) + ) + (let ((t9-47 end-scissor)) + sv-112 + #x3f800000 + (t9-47) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-game-vibrations-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-on-off-game-vibrations-option ((obj menu-on-off-game-vibrations-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-10 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.65) + ) + (set! (-> arg1 origin y) (+ 15.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* game-options-vibrations))) + (cond + ((and (zero? (-> *progress-state* game-options-item-selected)) (-> *progress-state* game-options-item-picked)) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (cond + ((zero? (-> *progress-state* game-options-item-selected)) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 22 f30-0) + ) + (else + (let ((a0-17 arg1)) + (set! (-> a0-17 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-10 *temp-string*) + ) + ) + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-10) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-game-subtitles-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-on-off-game-subtitles-option ((obj menu-on-off-game-subtitles-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-11 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.65) + ) + (set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* game-options-subtitles))) + (cond + ((and (= (-> *progress-state* game-options-item-selected) 1) (-> *progress-state* game-options-item-picked)) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (cond + ((= (-> *progress-state* game-options-item-selected) 1) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 22 f30-0) + ) + (else + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + ) + ) + ) + (print-menu-text (the-as game-text-id a0-11) (-> obj scale) arg1 arg0) + 0 + (none) + ) + +;; definition for method 10 of type menu-subtitle-language-game-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-subtitle-language-game-option ((obj menu-subtitle-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (with-pp + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (case arg2 + ((2) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + ) + ((3) + (set! (-> arg1 origin y) (+ 32.0 (-> arg1 origin y))) + ) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (let ((s4-0 (&-> *setting-control* user-default subtitle-language))) + (cond + ((and (= (-> *progress-state* game-options-item-selected) 2) (-> *progress-state* game-options-item-picked)) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (-> arg1 origin y)) 44 f30-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (-> obj language-selection) + (let ((s4-1 (-> s4-0 0))) + 7 + (if (-> obj language-transition) + (seekl! (-> obj language-x-offset) 150 (the int (* 10.0 (-> pp clock time-adjust-ratio)))) + ) + (when (>= (-> obj language-x-offset) 75) + (set! (-> obj language-selection) (the-as uint s4-1)) + (set! (-> obj language-transition) #f) + (set! (-> obj language-x-offset) 0) + 0 + ) + ) + (let ((a0-12 arg1)) + (set! (-> a0-12 color) (font-color #7efbfb)) + ) + (let ((v1-33 arg1)) + (set! (-> v1-33 scale) 0.5) + ) + (let ((a0-14 arg1)) + (set! (-> a0-14 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s5-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (let ((v1-43 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-subtitle-language-index))) + 7 + (-> *progress-state* game-options-subtitle-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-43) #f) arg1 #f 44 320) + ) + ) + (else + (cond + ((= (-> *progress-state* game-options-item-selected) 2) + (let ((s4-4 arg1)) + (set! (-> s4-4 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 24 f30-0) + ) + (else + (let ((a0-31 arg1)) + (set! (-> a0-31 color) (font-color #7efbfb)) + ) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 0.65) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (let ((v1-54 arg1)) + (set! (-> v1-54 scale) 0.5) + ) + (let ((a0-36 arg1)) + (set! (-> a0-36 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (let ((a0-37 arg1)) + (set! (-> a0-37 flags) (font-flags kerning middle large)) + ) + (let ((v1-61 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-subtitle-language-index))) + 7 + (-> *progress-state* game-options-subtitle-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-61) #f) arg1 #f 44 320) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 10 of type menu-language-game-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-language-game-option ((obj menu-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (with-pp + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (case arg2 + ((2) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + ) + ((3) + (set! (-> arg1 origin y) (+ 32.0 (-> arg1 origin y))) + ) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-5 arg1)) + (set! (-> a0-5 flags) (font-flags kerning middle large)) + ) + (let ((s4-0 (&-> *setting-control* user-default language))) + (cond + ((and (= (-> *progress-state* game-options-item-selected) 3) (-> *progress-state* game-options-item-picked)) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (-> arg1 origin y)) 44 f30-0) + (let ((s3-0 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (s3-0 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (-> obj language-selection) + (let ((s4-1 (-> s4-0 0))) + 7 + (if (-> obj language-transition) + (seekl! (-> obj language-x-offset) 150 (the int (* 10.0 (-> pp clock time-adjust-ratio)))) + ) + (when (>= (-> obj language-x-offset) 75) + (set! (-> obj language-selection) (the-as uint s4-1)) + (set! (-> obj language-transition) #f) + (set! (-> obj language-x-offset) 0) + 0 + ) + ) + (let ((a0-14 arg1)) + (set! (-> a0-14 color) (font-color #7efbfb)) + ) + (let ((v1-33 arg1)) + (set! (-> v1-33 scale) 0.5) + ) + (let ((a0-16 arg1)) + (set! (-> a0-16 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (let ((s5-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s5-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s5-3 arg1)) + (set! (-> s5-3 color) (the-as font-color (progress-selected 0))) + ) + (let ((v1-43 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-language-index))) + 7 + (-> *progress-state* game-options-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-43) #f) arg1 #f 44 320) + ) + ) + (else + (cond + ((= (-> *progress-state* game-options-item-selected) 3) + (let ((s3-1 arg1)) + (set! (-> s3-1 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (-> arg1 origin y)) 24 f30-0) + ) + (else + (let ((a0-33 arg1)) + (set! (-> a0-33 color) (font-color #7efbfb)) + ) + ) + ) + (let ((v1-52 arg1)) + (set! (-> v1-52 scale) 0.65) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (s3-2 *temp-string* arg1 #f 44 320) + ) + (let ((v1-54 arg1)) + (set! (-> v1-54 scale) 0.5) + ) + (let ((a0-40 arg1)) + (set! (-> a0-40 color) (font-color #7efbfb)) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *language-name-remap* (-> s4-0 0)) #f)) + *temp-string* + (set! (-> arg1 origin y) (+ 24.0 (-> arg1 origin y))) + (let ((a0-44 arg1)) + (set! (-> a0-44 flags) (font-flags kerning middle large)) + ) + (let ((v1-66 (if (and (= (scf-get-territory) 1) (zero? (-> *progress-state* game-options-language-index))) + 7 + (-> *progress-state* game-options-language-index) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (-> *language-name-remap* v1-66) #f) arg1 #f 44 320) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 10 of type menu-sub-menu-game-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-sub-menu-game-option ((obj menu-sub-menu-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f0-1 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + 395.0 + (-> arg1 origin y) + (-> arg1 scale) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (set! (-> arg1 alpha) f0-1) + (let ((a1-1 arg1)) + (set! (-> a1-1 flags) (font-flags kerning middle large)) + ) + (if (= (-> *setting-control* user-default language) (language-enum spanish)) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f0-1 283 #f 0.85) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f0-1 283 #f 0.95) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-aspect-ratio-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-aspect-ratio-option ((obj menu-aspect-ratio-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-12 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-1 arg1)) + (set! (-> a0-1 flags) (font-flags kerning middle large)) + ) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.75) + ) + (set! (-> arg1 height) 35.0) + (set! (-> arg1 origin y) (+ 20.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* graphic-options-aspect-ratio))) + (cond + ((and (= (-> *progress-state* graphic-options-item-selected) 1) + (-> *progress-state* graphic-options-item-picked) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-4 arg1)) + (set! (-> a0-4 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 23.0 (-> arg1 origin y))) + (cond + ((= s3-0 'aspect4x3) + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (when (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (cond + ((= (-> *progress-state* graphic-options-item-selected) 1) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 25 f30-0) + ) + (else + (let ((a0-21 arg1)) + (set! (-> a0-21 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 23.0 (-> arg1 origin y))) + (cond + ((= s3-0 'aspect4x3) + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-kj1231nj23) #f) + (lookup-text! *common-text* (game-text-id progress-12434g343v) #f) + ) + (set! a0-12 *temp-string*) + ) + ) + ) + ) + ) + (if (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (print-menu-text (the-as game-text-id a0-12) (-> obj scale) arg1 arg0) + ) + (draw-decoration (the-as menu-quit-qr-option obj) arg1 f30-0 284 #f 0.95) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-on-off-progressive-scan-graphic-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-on-off-progressive-scan-graphic-option ((obj menu-on-off-progressive-scan-graphic-option) + (arg0 progress) + (arg1 font-context) + (arg2 int) + (arg3 symbol) + ) + (local-vars (a0-11 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.75) + ) + (set! (-> arg1 height) 35.0) + (set! (-> arg1 origin y) (+ 35.0 (-> arg1 origin y))) + (let ((s3-0 (-> *progress-state* graphic-options-progressive-scan))) + (cond + ((and (= (-> *progress-state* graphic-options-item-selected) 2) + (-> *progress-state* graphic-options-item-picked) + ) + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~33L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + (else + (set! (-> arg1 origin y) (+ -8.0 (-> arg1 origin y))) + (when (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (cond + ((= (-> *progress-state* graphic-options-item-selected) 2) + (let ((s2-3 arg1)) + (set! (-> s2-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 24 f30-0) + ) + (else + (let ((a0-20 arg1)) + (set! (-> a0-20 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 18.0 (-> arg1 origin y))) + (cond + (s3-0 + (format + (clear *temp-string*) + "~1L~S~35L ~S" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~35L~S ~1L~S~1L" + (lookup-text! *common-text* (game-text-id progress-on-off-1TODO) #f) + (lookup-text! *common-text* (game-text-id progress-on-off-2TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + ) + ) + ) + ) + (if (not (and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + ) + (print-menu-text (the-as game-text-id a0-11) (-> obj scale) arg1 arg0) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-center-screen-graphic-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-center-screen-graphic-option ((obj menu-center-screen-graphic-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (set! (-> arg1 height) 35.0) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.75) + ) + (cond + ((and (zero? (-> *progress-state* graphic-options-item-selected)) + (-> *progress-state* graphic-options-item-picked) + ) + (let ((v1-10 arg1)) + (set! (-> v1-10 scale) 0.6) + ) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (set! (-> arg1 width) 350.0) + (set! (-> arg1 height) 60.0) + (set! (-> arg1 origin x) 80.0) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ 5.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 30.0 (-> arg1 origin y))) + ) + ) + (when (= (-> *setting-control* user-default language) (language-enum french)) + (let ((v1-23 arg1)) + (set! (-> v1-23 scale) 0.55) + ) + ) + (let ((s5-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 160) + (s5-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 21.0 (-> arg1 origin y))) + (let ((s5-2 print-game-text)) + (format + (clear *temp-string*) + "~33L~C~34L~S~33L~C" + 163 + (lookup-text! *common-text* (game-text-id progress-1k2jn1kj2n3) #f) + 161 + ) + (s5-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 21.0 (-> arg1 origin y))) + (let ((s5-3 print-game-text)) + (format (clear *temp-string*) "~33L~C" 162) + (s5-3 *temp-string* arg1 #f 44 320) + ) + (+! (-> arg1 origin y) + (the float (if (and (= (-> *progress-state* starting-state) 'title) (= (scf-get-territory) 1)) + 100 + 80 + ) + ) + ) + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ -3.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 10.0 (-> arg1 origin y))) + ) + ) + (let ((v1-37 arg1)) + (set! (-> v1-37 scale) 0.5) + ) + (print-game-text (lookup-text! *common-text* (game-text-id progress-2kj3n2kji3n42) #f) arg1 #f 44 320) + ) + (else + (set! (-> arg1 origin y) (+ 5.0 (-> arg1 origin y))) + (cond + ((zero? (-> *progress-state* graphic-options-item-selected)) + (let ((s4-3 arg1)) + (set! (-> s4-3 color) (the-as font-color (progress-selected 0))) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 25 f30-0) + ) + (else + (let ((a0-31 arg1)) + (set! (-> a0-31 color) (font-color #7efbfb)) + ) + ) + ) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-restart-mission-qr-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-restart-mission-qr-option ((obj menu-restart-mission-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-11 string)) + (let ((f0-1 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f0-1 0.0) + (set! f0-1 0.0) + ) + (set! (-> arg1 alpha) f0-1) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.75) + ) + (set! (-> arg1 height) 35.0) + (set! (-> arg1 origin y) (+ 5.0 (-> arg1 origin y))) + (let ((s4-0 (&-> *progress-state* yes-no-choice))) + (set! a0-11 + (cond + ((and (zero? (-> *progress-state* qr-options-item-selected)) (-> *progress-state* qr-options-item-picked)) + (let ((a0-2 arg1)) + (set! (-> a0-2 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f0-1) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (let ((v1-17 arg1)) + (set! (-> v1-17 scale) 0.6) + ) + (cond + ((-> s4-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-11 *temp-string*) + ) + ) + a0-11 + ) + (else + (if (and (= (-> arg0 option-index) arg2) (zero? (-> *progress-state* qr-options-item-selected))) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 26 f0-1) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + *temp-string* + ) + ) + ) + ) + ) + (print-game-text a0-11 arg1 #f 44 320) + 0 + (none) + ) + +;; definition for method 10 of type menu-quit-qr-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-quit-qr-option ((obj menu-quit-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (a0-12 string)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((v1-4 arg1)) + (set! (-> v1-4 scale) 0.75) + ) + (set! (-> arg1 origin y) (+ 45.0 (-> arg1 origin y))) + (set! (-> arg1 height) 35.0) + (let ((s4-0 (&-> *progress-state* yes-no-choice))) + (set! a0-12 + (cond + ((and (= (-> *progress-state* qr-options-item-selected) 1) (-> *progress-state* qr-options-item-picked)) + (let ((a0-3 arg1)) + (set! (-> a0-3 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f30-0) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (set! (-> arg1 origin y) (+ 25.0 (-> arg1 origin y))) + (let ((v1-18 arg1)) + (set! (-> v1-18 scale) 0.6) + ) + (cond + ((-> s4-0 0) + (format + (clear *temp-string*) + "~33L~S~32L ~S" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-12 *temp-string*) + ) + (else + (format + (clear *temp-string*) + "~32L~S ~33L~S~1L" + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-1-TODO) #f) + (lookup-text! *common-text* (game-text-id progress-draw-yes-or-no-2-TODO) #f) + ) + (set! a0-12 *temp-string*) + ) + ) + a0-12 + ) + (else + (if (and (= (-> arg0 option-index) arg2) (= (-> *progress-state* qr-options-item-selected) 1)) + (draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 26 f30-0) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + *temp-string* + ) + ) + ) + ) + (print-game-text a0-12 arg1 #f 44 320) + (cond + ((= (-> *setting-control* user-default language) (language-enum french)) + (draw-decoration obj arg1 f30-0 371 #f 0.8) + ) + ((= (-> *setting-control* user-default language) (language-enum german)) + (draw-decoration obj arg1 f30-0 371 #f 0.7) + ) + (else + (draw-decoration obj arg1 f30-0 371 #f 0.95) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-slider-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars + (v0-42 none) + (sv-16 progress) + (sv-32 symbol) + (sv-48 int) + (sv-64 int) + (sv-80 int) + (sv-96 int) + (sv-112 int) + (sv-128 pointer) + (sv-144 (function string font-context symbol int int float)) + (sv-160 uint) + (sv-176 dma-buffer) + (sv-192 pointer) + (sv-208 pointer) + (sv-224 (function string font-context symbol int int float)) + (sv-240 uint) + (sv-256 dma-buffer) + (sv-272 pointer) + ) + (set! sv-16 arg0) + (let ((s5-0 arg1) + (gp-0 arg2) + ) + (set! sv-32 arg3) + (let ((f30-0 (* 2.0 (- 0.5 (-> sv-16 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) + (set! v0-42 + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading s5-0) + v0-42 + ) + (else + (let ((v1-13 s5-0)) + (set! (-> v1-13 scale) 0.6) + ) + (set! (-> s5-0 origin y) (+ 20.0 (-> s5-0 origin y))) + (case (get-aspect-ratio) + (('aspect4x3) + (set! s2-0 157) + (let ((v1-17 gp-0)) + (cond + ((zero? v1-17) + (set! (-> s5-0 origin y) (+ -24.0 (-> s5-0 origin y))) + (+! s2-0 -9) + ) + ((= v1-17 1) + (set! (-> s5-0 origin y) (+ -9.0 (-> s5-0 origin y))) + (+! s2-0 43) + ) + ((= v1-17 2) + (set! (-> s5-0 origin y) (+ 6.0 (-> s5-0 origin y))) + (+! 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) + (set! (-> s5-0 origin y) (+ -20.0 (-> s5-0 origin y))) + (+! s2-0 -20) + ) + ((= v1-28 1) + (set! (-> s5-0 origin y) (+ 2.0 (-> s5-0 origin y))) + (+! s2-0 40) + ) + ((= v1-28 2) + (set! (-> s5-0 origin y) (+ 30.0 (-> s5-0 origin y))) + (+! s2-0 105) + ) + ) + ) + ) + ) + (let ((a0-11 s5-0)) + (set! (-> a0-11 flags) (font-flags kerning large)) + ) + (set! (-> s5-0 origin x) (the float sv-48)) + (cond + (sv-32 + (set! sv-128 (-> obj value-to-modify)) + (set! (-> s5-0 origin y) (+ -8.0 (-> s5-0 origin y))) + (let ((a0-12 s5-0)) + (set! (-> a0-12 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 52 f30-0) + (set! sv-144 print-game-text) + (let ((a0-15 (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (a1-3 s5-0) + (a2-3 #f) + (a3-1 44) + (t0-1 320) + ) + (sv-144 a0-15 a1-3 a2-3 a3-1 t0-1) + ) + (set! sv-160 + (logior (logand (logior (logand (logior (logand (logior (logand (the-as uint #x8000ffff) -256) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) 56) 56) + ) + -65281 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128)))) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (the int (* 128.0 f30-0)) 56) 32) + ) + ) + (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) + (set-vector! (-> obj sprites 0 color) 128 128 128 (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) + (set-vector! (-> obj sprites 1 color) 128 128 128 (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) + (set-vector! (-> obj sprites 2 color) sv-80 sv-96 sv-112 (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) + (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 0) + (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! + (the-as basic (-> obj sprites 1)) + (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) + (+ s2-0 -4) + ) + (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set! sv-176 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-192 (-> sv-176 base)) + (-> obj sprites) + (let ((t9-13 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-13) + ) + (draw-sprite2d-xy + sv-176 + (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) + (+ s2-0 7) + (- 240 (the int (* 230.0 (-> (the-as (pointer float) sv-128))))) + 9 + (the-as rgba sv-160) + ) + (-> obj sprites 1) + (let ((t9-15 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-15) + ) + (-> obj sprites 2) + (let ((t9-16 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-16) + ) + (-> obj sprites 3) + (let ((t9-17 (method-of-type hud-sprite hud-sprite-method-9))) + sv-176 + (-> *level* default-level) + (t9-17) + ) + (let ((a3-6 (-> sv-176 base))) + (let ((v1-100 (the-as object (-> sv-176 base)))) + (set! (-> (the-as dma-packet v1-100) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-100) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-100) vif1) (new 'static 'vif-tag)) + (set! (-> sv-176 base) (&+ (the-as pointer v1-100) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + sv-192 + (the-as (pointer dma-tag) a3-6) + ) + ) + (+! (-> s5-0 origin x) (the float s3-0)) + (let ((a0-71 s5-0)) + (set! (-> a0-71 flags) (font-flags kerning right large)) + ) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-128))))) + (s3-1 *temp-string* s5-0 #f 44 320) + ) + (let ((a0-75 s5-0)) + (set! (-> a0-75 flags) (font-flags kerning large)) + ) + ) + (else + (set! sv-208 (-> obj value-to-modify)) + (set! (-> s5-0 origin y) (+ -8.0 (-> s5-0 origin y))) + (when (or (= (-> *setting-control* user-default language) (language-enum german)) + (= (-> *setting-control* user-default language) (language-enum french)) + ) + (let ((v1-121 s5-0)) + (set! (-> v1-121 scale) 0.56) + ) + ) + (if (= (-> sv-16 option-index) gp-0) + (draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 24 f30-0) + ) + (set! sv-224 print-game-text) + (let ((a0-81 (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (a1-21 s5-0) + (a2-18 #f) + (a3-8 44) + (t0-4 320) + ) + (sv-224 a0-81 a1-21 a2-18 a3-8 t0-4) + ) + (set! sv-240 + (logior (logand (logior (logand (logior (logand (logior (logand (the-as uint #x8000ffff) -256) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) 56) 56) + ) + -65281 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) 56) 48) + ) + -16711681 + ) + (shr (shl (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208)))) 56) 40) + ) + (the-as uint #xffffffff00ffffff) + ) + (shr (shl (the int (* 128.0 f30-0)) 56) 32) + ) + ) + (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) + (set-vector! (-> obj sprites 0 color) 128 128 128 (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) + (set-vector! (-> obj sprites 1 color) 128 128 128 (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) + (set-vector! (-> obj sprites 2 color) sv-80 sv-96 sv-112 (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) + (set-vector! (-> obj sprites 3 color) sv-80 sv-96 sv-112 (the int (* 128.0 f30-0))) + (set! (-> obj sprites 3 pos z) #xffffff) + (set! (-> obj sprites 3 pos w) 0) + (set-hud-piece-position! (the-as basic (-> obj sprites)) s1-0 s2-0) + (set-hud-piece-position! + (the-as basic (-> obj sprites 1)) + (+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) + (+ s2-0 -4) + ) + (set-hud-piece-position! (the-as basic (-> obj sprites 2)) (- s1-0 sv-64) (+ s2-0 -4)) + (set-hud-piece-position! (the-as basic (-> obj sprites 3)) (+ sv-64 242 s1-0) (+ s2-0 -4)) + (set! sv-256 (-> *display* frames (-> *display* on-screen) global-buf)) + (set! sv-272 (-> sv-256 base)) + (-> obj sprites) + (let ((t9-33 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-33) + ) + (draw-sprite2d-xy + sv-256 + (+ s1-0 s0-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) + (+ s2-0 7) + (- 240 (the int (* 230.0 (-> (the-as (pointer float) sv-208))))) + 9 + (the-as rgba sv-240) + ) + (-> obj sprites 1) + (let ((t9-35 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-35) + ) + (-> obj sprites 2) + (let ((t9-36 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-36) + ) + (-> obj sprites 3) + (let ((t9-37 (method-of-type hud-sprite hud-sprite-method-9))) + sv-256 + (-> *level* default-level) + (t9-37) + ) + (let ((a3-13 (-> sv-256 base))) + (let ((v1-183 (the-as object (-> sv-256 base)))) + (set! (-> (the-as dma-packet v1-183) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-183) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-183) vif1) (new 'static 'vif-tag)) + (set! (-> sv-256 base) (&+ (the-as pointer v1-183) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-320) + sv-272 + (the-as (pointer dma-tag) a3-13) + ) + ) + (+! (-> s5-0 origin x) (the float s3-0)) + (let ((a0-137 s5-0)) + (set! (-> a0-137 flags) (font-flags kerning right large)) + ) + (let ((s3-2 print-game-text)) + (format (clear *temp-string*) "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-208))))) + (s3-2 *temp-string* s5-0 #f 44 320) + ) + (let ((a0-141 s5-0)) + (set! (-> a0-141 flags) (font-flags kerning large)) + ) + ) + ) + (if (zero? gp-0) + (draw-sound-options-decoration obj s5-0 f30-0 (the-as symbol 285) (the-as game-text-id #f)) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-stereo-mode-sound-option +;; WARN: Return type mismatch int vs none. +(defmethod menu-option-method-10 menu-stereo-mode-sound-option ((obj menu-stereo-mode-sound-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (s5-0 int)) + (let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))) + (let ((v1-2 arg1)) + (set! (-> v1-2 scale) 0.65) + ) + (if (< f30-0 0.0) + (set! f30-0 0.0) + ) + (set! (-> arg1 alpha) f30-0) + (let ((a0-2 arg1)) + (set! (-> a0-2 flags) (font-flags kerning middle large)) + ) + (cond + ((not (-> *bigmap* progress-minimap)) + (draw-busy-loading arg1) + ) + ((begin + (case (get-aspect-ratio) + (('aspect4x3) + (set! (-> arg1 origin y) (+ 32.0 (-> arg1 origin y))) + ) + (('aspect16x9) + (set! (-> arg1 origin y) (+ 60.0 (-> arg1 origin y))) + ) + ) + (set! s5-0 (-> *setting-control* user-default stereo-mode)) + arg3 + ) + (let ((a0-7 arg1)) + (set! (-> a0-7 color) (font-color #f9f9f9)) + ) + (draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 42 f30-0) + (let ((s3-1 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (s3-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y))) + (let ((a0-13 arg1)) + (set! (-> a0-13 color) (font-color #7efbfb)) + ) + (let ((v1-22 arg1)) + (set! (-> v1-22 scale) 0.5) + ) + (let ((a0-15 arg1)) + (set! (-> a0-15 color) (font-color #7efbfb)) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s4-1 print-game-text)) + (format (clear *temp-string*) "~33L~C" 163) + (s4-1 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (set! (-> arg1 origin x) (+ 70.0 (-> arg1 origin x))) + (let ((s4-2 print-game-text)) + (format (clear *temp-string*) "~33L~C" 161) + (s4-2 *temp-string* arg1 #f 44 320) + ) + (set! (-> arg1 origin x) (+ -70.0 (-> arg1 origin x))) + (let ((s4-3 arg1)) + (set! (-> s4-3 color) (the-as font-color (progress-selected 0))) + ) + (let ((a0-23 arg1)) + (set! (-> a0-23 flags) (font-flags kerning middle large)) + ) + (print-game-text (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f) arg1 #f 44 320) + ) + (else + (if (= (-> arg0 option-index) arg2) + (draw-highlight (the int (-> arg1 origin y)) 21 f30-0) + ) + (let ((v1-37 arg1)) + (set! (-> v1-37 scale) 0.65) + ) + (let ((s3-4 print-game-text)) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (s3-4 *temp-string* arg1 #f 44 320) + ) + (let ((v1-39 arg1)) + (set! (-> v1-39 scale) 0.5) + ) + (let ((a0-33 arg1)) + (set! (-> a0-33 color) (font-color #7efbfb)) + ) + (format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f)) + (let ((a0-37 *temp-string*)) + (set! (-> arg1 origin y) (+ 22.0 (-> arg1 origin y))) + (let ((a1-19 arg1)) + (set! (-> a1-19 flags) (font-flags kerning middle large)) + ) + (print-game-text a0-37 arg1 #f 44 320) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 10 of type menu-sub-menu-option +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 349] +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 361] +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 417] +;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 435] +(defmethod menu-option-method-10 menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol)) + (local-vars (sv-16 dma-buffer)) + (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) + (let ((v1-5 arg1)) + (set! (-> v1-5 scale) 0.6) + ) + (cond + ((= *title* (-> arg0 current-options)) + (let ((v1-8 arg1)) + (set! (-> v1-8 scale) 0.85) + ) + (set! (-> arg1 height) 40.0) + (set! s1-0 36) + (+! s2-0 -8) + (when (memcard-unlocked-secrets? #f) + (set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y))) + (set! s1-0 36) + (+! s2-0 -34) + ) + ) + ((= *options* (-> arg0 current-options)) + (set! (-> arg1 origin y) (+ -20.0 (-> arg1 origin y))) + (let ((v1-16 arg1)) + (set! (-> v1-16 scale) 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 (progress-selected 0)) + (font-color #7efbfb) + ) + ) + ) + (cond + ((= arg2 (-> arg0 option-index)) + (let ((s0-1 arg1)) + (set! (-> s0-1 color) (the-as font-color (progress-selected 0))) + ) + ) + (else + (let ((a0-9 arg1)) + (set! (-> a0-9 color) (font-color #7efbfb)) + ) + ) + ) + (if (and (and (= arg2 (-> arg0 option-index)) (!= 298 (-> obj name))) + (not (and (= (-> obj name) 339) + (= *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) 298) + (cond + ((= arg2 (-> arg0 option-index)) + (let ((v1-39 arg1)) + (set! (-> v1-39 scale) 0.5) + ) + ) + (else + (let ((v1-40 arg1)) + (set! (-> v1-40 scale) 0.45) + ) + ) + ) + (set! (-> arg1 origin y) (+ -120.0 (-> arg1 origin y))) + (set! (-> arg1 origin x) (- (-> 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) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + (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) + (set! sv-16 (-> *display* frames (-> *display* on-screen) global-buf)) + (let ((s0-2 (-> sv-16 base))) + (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))) + ) + (let ((a3-3 (-> sv-16 base))) + (let ((v1-62 (the-as object (-> sv-16 base)))) + (set! (-> (the-as dma-packet v1-62) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-62) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-62) vif1) (new 'static 'vif-tag)) + (set! (-> sv-16 base) (&+ (the-as pointer v1-62) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + s0-2 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + ) + (let ((v1-70 (&-> obj unknown-options 3))) + (set! (-> v1-70 0) (the-as menu-option 64)) + (set! (-> v1-70 1) (the-as menu-option 128)) + (set! (-> v1-70 2) (the-as menu-option 128)) + (set! (-> v1-70 3) (the-as menu-option (the int (* 128.0 f30-0)))) + ) + (draw-savegame-box + (the-as menu-memcard-slot-option 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 + (the-as menu-memcard-slot-option obj) + (the float (+ s4-1 s3-1)) + (the float (+ s4-1 s3-1)) + (the float s2-4) + (the float (+ s2-4 (* s1-1 arg2))) + ) + (let* ((s0-3 (-> *display* frames (-> *display* on-screen) global-buf)) + (gp-1 (-> s0-3 base)) + ) + (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))) + ) + (let ((a3-7 (-> s0-3 base))) + (let ((v1-87 (the-as object (-> s0-3 base)))) + (set! (-> (the-as dma-packet v1-87) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-87) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-87) vif1) (new 'static 'vif-tag)) + (set! (-> s0-3 base) (&+ (the-as pointer v1-87) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) bucket-group) + (bucket-id bucket-313) + gp-1 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + ) + ) + ) + (else + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + (set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y))) + ) + ) + ) + ((= *load-save-options* (-> arg0 current-options)) + (set! (-> arg1 origin x) (+ -100.0 (-> arg1 origin x))) + (set! (-> arg1 origin y) (+ -25.0 (-> arg1 origin y))) + (print-menu-text + (the-as game-text-id (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f)) + (-> obj scale) + arg1 + arg0 + ) + ) + ((and (= *title* (-> arg0 current-options)) (= 339 (-> obj name)) (memcard-unlocked-secrets? #f)) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + ) + ((!= (-> obj name) 339) + (print-game-text (lookup-text! *common-text* (the-as game-text-id (-> obj name)) #f) arg1 #f 44 320) + ) + ) + ) + ) + 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 5642754d38..2bfb7d5ae1 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 @@ -90,11 +90,11 @@ ;; definition of type menu-option (deftype menu-option (basic) - ((name uint32 :offset-assert 4) - (scale basic :offset-assert 8) - (unknown basic :offset-assert 12) - (box menu-option 1 :offset-assert 16) - (padding uint32 7 :offset-assert 20) + ((name uint32 :offset-assert 4) + (scale float :offset-assert 8) + (unknown function :offset-assert 12) + (box menu-option 1 :offset-assert 16) + (unknown-options menu-option 7 :offset-assert 20) ) :method-count-assert 12 :size-assert #x30 @@ -122,7 +122,7 @@ ;; definition of type menu-on-off-option (deftype menu-on-off-option (menu-option) - ((value-to-modify pointer :offset-assert 48) + ((value-to-modify (pointer symbol) :offset-assert 48) ) :method-count-assert 12 :size-assert #x34 @@ -170,10 +170,10 @@ ;; definition of type menu-language-option (deftype menu-language-option (menu-option) - ((language-selection uint64 :offset-assert 48) - (language-direction basic :offset-assert 56) - (language-transition basic :offset-assert 60) - (language-x-offset int32 :offset-assert 64) + ((language-selection language-enum :offset-assert 48) + (language-direction symbol :offset-assert 56) + (language-transition basic :offset-assert 60) + (language-x-offset int32 :offset-assert 64) ) :method-count-assert 12 :size-assert #x44 @@ -392,8 +392,9 @@ ;; definition of type menu-memcard-slot-option (deftype menu-memcard-slot-option (menu-option) - ((sprites hud-sprite 5 :inline :offset-assert 48) - (pad uint8 32 :offset-assert 368) + ((sprites hud-sprite 5 :inline :offset-assert 48) + (something-hud-related basic :offset 112) + (pad uint8 32 :offset-assert 368) ) :method-count-assert 12 :size-assert #x190 diff --git a/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc b/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc index f8f9e5ec26..41394a9c86 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress-static_REF.gc @@ -144,19 +144,31 @@ (define *quit-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) ;; definition for symbol *select-start-options*, type menu-option-list -(define *select-start-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *select-start-options* + "List of [[menu-select-start-option]]" + (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + ) ;; definition for symbol *select-scene-options*, type menu-option-list -(define *select-scene-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *select-scene-options* + "List of [[menu-select-scene-option]]" + (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + ) ;; definition for symbol *bigmap-options*, type menu-option-list (define *bigmap-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) ;; definition for symbol *missions-options*, type menu-option-list -(define *missions-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *missions-options* + "List of [[menu-missions-option]]" + (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + ) ;; definition for symbol *highscores-options*, type menu-option-list -(define *highscores-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) +(define *highscores-options* + "List of [[menu-highscores-option]]" + (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82) + ) ;; definition for symbol *secret-options*, type menu-option-list (define *secret-options* (new 'static 'menu-option-list :y-center #xc6 :y-space 30 :scale 0.82)) @@ -168,30 +180,24 @@ ) ) -;; definition for symbol *stereo-mode-name-remap*, type menu-option-list +;; definition for symbol *stereo-mode-name-remap*, type (array uint64) (define *stereo-mode-name-remap* - (the-as menu-option-list (new 'static 'boxed-array :type uint32 #x104 #x105 #x106)) + (the-as (array uint64) (new 'static 'boxed-array :type uint32 #x104 #x105 #x106)) ) -;; definition for symbol *hud-ring-graphic-remap*, type menu-option-list +;; definition for symbol *hud-ring-graphic-remap*, type (array uint64) (define *hud-ring-graphic-remap* - (the-as menu-option-list - (new 'static 'boxed-array :type uint64 #x80 #x40 #x10 #x4 #x8 #x400 #x20 #x100 #x200 #x2) - ) + (new 'static 'boxed-array :type uint64 #x80 #x40 #x10 #x4 #x8 #x400 #x20 #x100 #x200 #x2) ) -;; definition for symbol *hud-ring-kiosk-graphic-remap*, type menu-option-list +;; definition for symbol *hud-ring-kiosk-graphic-remap*, type (array uint64) (define *hud-ring-kiosk-graphic-remap* - (the-as menu-option-list - (new 'static 'boxed-array :type uint64 #x40 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200) - ) + (new 'static 'boxed-array :type uint64 #x40 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200) ) -;; definition for symbol *hud-ring-demo-graphic-remap*, type menu-option-list +;; definition for symbol *hud-ring-demo-graphic-remap*, type (array uint64) (define *hud-ring-demo-graphic-remap* - (the-as menu-option-list - (new 'static 'boxed-array :type uint64 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200 #x200) - ) + (new 'static 'boxed-array :type uint64 #x80 #x2 #x200 #x200 #x200 #x200 #x200 #x200 #x200 #x200) ) ;; definition of type hud-scene-info 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 1a1c1316dd..143ec8fc93 100644 --- a/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc +++ b/test/decompiler/reference/jak2/engine/ui/progress/progress_REF.gc @@ -47,7 +47,7 @@ (total-num-tasks int32 :offset-assert 208) (scene-player-act int32 :offset-assert 212) (stereo-mode-backup int32 :offset-assert 216) - (secrets-unlocked basic :offset-assert 220) + (secrets-unlocked symbol :offset-assert 220) (missions-total-spacing float :offset-assert 224) (clear-screen basic :offset-assert 228) ) @@ -2327,7 +2327,6 @@ ;; WARN: Stack slot offset 148 signed mismatch ;; WARN: Stack slot offset 148 signed mismatch ;; WARN: Return type mismatch int vs none. -;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 111] (defbehavior progress-post progress () (local-vars (sv-144 font-context) (sv-148 int) (sv-152 hud-box) (sv-156 symbol)) (when (-> self current-options)