mirror of
https://github.com/open-goal/jak-project
synced 2026-05-26 07:39:12 -04:00
349919f788
Adds the opengoal cheats to the secrets menu. Only cheats that are fully functional and unlockable are there right now, which is eight cheats. This update will reset most Jak 2 settings. Also fixes #3274 .
6943 lines
238 KiB
Common Lisp
6943 lines
238 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; name: progress-draw.gc
|
|
;; name in dgo: progress-draw
|
|
;; dgos: ENGINE, GAME
|
|
|
|
;; DECOMP BEGINS
|
|
|
|
;; WARN: Return type mismatch int vs font-color.
|
|
(defbehavior progress-selected progress ((arg0 int))
|
|
(let ((color (font-color progress-selected)))
|
|
(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
|
|
(the-as font-color color)
|
|
0
|
|
(new 'static 'rgba :r #x40)
|
|
(new 'static 'rgba :r #x80)
|
|
(new 'static 'rgba :r #x80)
|
|
)
|
|
(set-font-color
|
|
(the-as font-color color)
|
|
1
|
|
(new 'static 'rgba :r #x40)
|
|
(new 'static 'rgba :r #x80)
|
|
(new 'static 'rgba :r #x80)
|
|
)
|
|
)
|
|
(else
|
|
(set-font-color
|
|
(the-as font-color color)
|
|
0
|
|
(new 'static 'rgba :r #xff)
|
|
(new 'static 'rgba :r #xff)
|
|
(new 'static 'rgba :r #xff)
|
|
)
|
|
(set-font-color
|
|
(the-as font-color color)
|
|
1
|
|
(new 'static 'rgba :r #xff)
|
|
(new 'static 'rgba :r #xff)
|
|
(new 'static 'rgba :r #xff)
|
|
)
|
|
)
|
|
)
|
|
(the-as font-color color)
|
|
)
|
|
)
|
|
|
|
(defun draw-percent-bar ((arg0 int) (arg1 int) (arg2 float) (arg3 rgba))
|
|
(with-dma-buffer-add-bucket ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(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)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defun draw-highlight ((y-pos int) (height int) (alpha float))
|
|
(let ((x-pos (if (= (get-aspect-ratio) 'aspect4x3)
|
|
70
|
|
79
|
|
)
|
|
)
|
|
(width (if (= (get-aspect-ratio) 'aspect4x3)
|
|
374
|
|
355
|
|
)
|
|
)
|
|
)
|
|
;; og:preserve-this
|
|
(#when PC_PORT
|
|
;; added for better widescreen handling
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! x-pos (the int (adjust-game-x (the float x-pos))))
|
|
(set! width (the int (* (-> *pc-settings* aspect-ratio-reciprocal) width)))
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw-sprite2d-xy
|
|
buffer
|
|
x-pos
|
|
y-pos
|
|
width
|
|
height
|
|
(new 'static 'rgba :r #x40 :g #x80 :b #x80 :a (the int (* 64.0 alpha)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(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 (current-time) 300) 210)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-loading-data) #f)
|
|
arg0
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
|
|
(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) (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* (text-id progress-next) #f)))
|
|
(s1-0 s0-0 sv-16 sv-32 a3-0)
|
|
)
|
|
)
|
|
(s2-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(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* (text-id progress-next) #f) 161)
|
|
(s5-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
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)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! s3-0 (adjust-game-x (the float s3-0)))
|
|
))
|
|
(set! (-> arg0 origin x) (the float s3-0))
|
|
(set! (-> arg0 origin y) (the float s5-0))
|
|
(let ((s2-0 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 160)
|
|
(s2-0 *temp-string* arg0 #f 44 (bucket-id progress))
|
|
)
|
|
(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 (bucket-id progress))
|
|
)
|
|
(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 ((font-ctx font-context))
|
|
(let ((new-x-pos 250)
|
|
(new-y-pos-up 116)
|
|
(new-y-pos-down 191)
|
|
(old-x-pos (-> font-ctx origin x))
|
|
(old-y-pos (-> font-ctx origin y))
|
|
)
|
|
(set! (-> font-ctx origin x) (the float new-x-pos))
|
|
(set! (-> font-ctx origin y) (the float new-y-pos-up))
|
|
(let ((print-text-fn print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 160)
|
|
(print-text-fn *temp-string* font-ctx #f 44 (bucket-id progress))
|
|
)
|
|
(set! (-> font-ctx origin x) (the float new-x-pos))
|
|
(set! (-> font-ctx origin y) (the float (+ new-y-pos-up new-y-pos-down)))
|
|
(let ((print-text-fn-1 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 162)
|
|
(print-text-fn-1 *temp-string* font-ctx #f 44 (bucket-id progress))
|
|
)
|
|
(set! (-> font-ctx origin x) old-x-pos)
|
|
(set! (-> font-ctx origin y) old-y-pos)
|
|
)
|
|
(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)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! s3-0 (adjust-game-x (the float s3-0)))
|
|
))
|
|
(set! (-> arg0 origin x) (the float s3-0))
|
|
(set! (-> arg0 origin y) (the float s5-0))
|
|
(let ((s2-0 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 160)
|
|
(s2-0 *temp-string* arg0 #f 44 (bucket-id progress))
|
|
)
|
|
(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 (bucket-id progress))
|
|
)
|
|
(set! (-> arg0 origin x) f30-0)
|
|
(set! (-> arg0 origin y) f28-0)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defun begin-scissor ((arg0 hud-box) (arg1 progress))
|
|
(cond
|
|
((or (= (-> arg1 current) 'bigmap) (= (-> arg1 next) 'bigmap))
|
|
(set! (-> arg0 min x) 0.0)
|
|
(set! (-> arg0 min y) 0.0)
|
|
(set! (-> arg0 max x) 512.0)
|
|
(set! (-> arg0 max y) 416.0)
|
|
)
|
|
((= (get-aspect-ratio) 'aspect16x9)
|
|
(set! (-> arg0 min x) 79.0)
|
|
(set! (-> arg0 min y) 38.0)
|
|
(set! (-> arg0 max x) 434.0)
|
|
(set! (-> arg0 max y) 362.0)
|
|
)
|
|
(else
|
|
(set! (-> arg0 min x) 70.0)
|
|
(set! (-> arg0 min y) 70.0)
|
|
(set! (-> arg0 max x) 444.0)
|
|
(set! (-> arg0 max y) 329.0)
|
|
(#when PC_PORT
|
|
(set! (-> arg0 min x) (the float (the int (adjust-game-x (-> arg0 min x)))))
|
|
(set! (-> arg0 max x) (the float (the int (adjust-game-x (-> arg0 max x)))))
|
|
)
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(setup-scissor arg0 s4-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun end-scissor ((arg0 hud-box) (arg1 float))
|
|
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(restore-scissor arg0 s5-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun begin-scissor-secret ((arg0 hud-box) (arg1 progress))
|
|
(cond
|
|
((= (get-aspect-ratio) 'aspect16x9)
|
|
(set! (-> arg0 min x) 79.0)
|
|
(set! (-> arg0 min y) 190.0)
|
|
(set! (-> arg0 max x) 434.0)
|
|
(set! (-> arg0 max y) 315.0)
|
|
)
|
|
(else
|
|
(set! (-> arg0 min x) 70.0)
|
|
(set! (-> arg0 min y) 173.0)
|
|
(set! (-> arg0 max x) 444.0)
|
|
(set! (-> arg0 max y) 304.0)
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(setup-scissor arg0 s4-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun end-scissor-secret ((arg0 hud-box) (arg1 float))
|
|
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(restore-scissor arg0 s5-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun begin-scissor-missions ((hud-bounds hud-box))
|
|
(cond
|
|
((= (get-aspect-ratio) 'aspect16x9)
|
|
(set! (-> hud-bounds min x) 79.0)
|
|
(set! (-> hud-bounds min y) 130.0)
|
|
(set! (-> hud-bounds max x) 434.0)
|
|
(set! (-> hud-bounds max y) 305.0)
|
|
)
|
|
(else
|
|
(set! (-> hud-bounds min x) 70.0)
|
|
(set! (-> hud-bounds min y) 130.0)
|
|
(set! (-> hud-bounds max x) 444.0)
|
|
(set! (-> hud-bounds max y) 305.0)
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(setup-scissor hud-bounds buffer)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun end-scissor-missions ((hud-bounds hud-box) (arg1 float))
|
|
(with-dma-buffer-add-bucket ((buffer (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(restore-scissor hud-bounds buffer)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun begin-scissor-scene ((arg0 hud-box))
|
|
(cond
|
|
((= (get-aspect-ratio) 'aspect16x9)
|
|
(set! (-> arg0 min x) 79.0)
|
|
(set! (-> arg0 min y) 118.0)
|
|
(set! (-> arg0 max x) 434.0)
|
|
(set! (-> arg0 max y) 294.0)
|
|
)
|
|
(else
|
|
(set! (-> arg0 min x) 70.0)
|
|
(set! (-> arg0 min y) 116.0)
|
|
(set! (-> arg0 max x) 444.0)
|
|
(set! (-> arg0 max y) 295.0)
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(setup-scissor arg0 s4-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun end-scissor-scene ((arg0 hud-box) (arg1 float))
|
|
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(restore-scissor arg0 s5-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun begin-scissor-level ((arg0 hud-box))
|
|
(cond
|
|
((= (get-aspect-ratio) 'aspect16x9)
|
|
(set! (-> arg0 min x) 79.0)
|
|
(set! (-> arg0 min y) 118.0)
|
|
(set! (-> arg0 max x) 434.0)
|
|
(set! (-> arg0 max y) 294.0)
|
|
)
|
|
(else
|
|
(set! (-> arg0 min x) 70.0)
|
|
(set! (-> arg0 min y) 116.0)
|
|
(set! (-> arg0 max x) 444.0)
|
|
(set! (-> arg0 max y) 295.0)
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(setup-scissor arg0 s4-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun end-scissor-level ((arg0 hud-box) (arg1 float))
|
|
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(restore-scissor arg0 s5-0)
|
|
)
|
|
0
|
|
)
|
|
|
|
(defun print-language-name ((arg0 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
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin x) (- (-> arg1 origin x) (the float s5-0)))
|
|
)
|
|
(set! (-> arg1 color) (font-color progress))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defun unlocked-secret-menu? ((arg0 game-secrets))
|
|
(or (logtest? arg0 (game-secrets scene-player-1))
|
|
(logtest? arg0 (game-secrets scene-player-2))
|
|
(logtest? arg0 (game-secrets scene-player-3))
|
|
(logtest? arg0 (game-secrets level-select))
|
|
(logtest? arg0 (game-secrets scrap-book-1))
|
|
(logtest? arg0 (game-secrets scrap-book-2))
|
|
(logtest? arg0 (game-secrets scrap-book-3))
|
|
(logtest? arg0 (game-secrets hero-mode))
|
|
)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs game-secrets.
|
|
(defun memcard-unlocked-secrets? ((arg0 symbol))
|
|
(let ((v1-0 *progress-save-info*)
|
|
(s5-0 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 s5-0 (-> v1-0 file a1-5 secrets)))
|
|
)
|
|
)
|
|
)
|
|
(if (unlocked-secret-menu? (the-as game-secrets s5-0))
|
|
(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 s5-0 #x8fe0))
|
|
)
|
|
(the-as game-secrets (cond
|
|
(arg0
|
|
(empty)
|
|
s5-0
|
|
)
|
|
(else
|
|
(the-as int (unlocked-secret-menu? (the-as game-secrets s5-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun num-unlocked-secret? ((arg0 game-secrets))
|
|
"@returns The number of secrets currently unlocked"
|
|
(let ((v0-0 0))
|
|
(if (logtest? arg0 (game-secrets scene-player-1))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets scene-player-2))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets scene-player-3))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets level-select))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets scrap-book-1))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets scrap-book-2))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets scrap-book-3))
|
|
(+! v0-0 1)
|
|
)
|
|
(if (logtest? arg0 (game-secrets hero-mode))
|
|
(+! v0-0 1)
|
|
)
|
|
v0-0
|
|
)
|
|
)
|
|
|
|
(defun print-menu-text ((arg0 string) (arg1 symbol) (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 arg0 arg2 #f 44 (bucket-id progress))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs pointer.
|
|
(defun draw-yes-no ((arg0 progress) (arg1 font-context))
|
|
(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* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #f)
|
|
)
|
|
(set! a0-5 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~32L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #f)
|
|
)
|
|
(set! a0-5 *temp-string*)
|
|
)
|
|
)
|
|
(print-game-text a0-5 arg1 #f 44 (bucket-id progress))
|
|
(the-as pointer 0)
|
|
)
|
|
|
|
;; WARN: Return type mismatch int vs pointer.
|
|
(defun draw-continue-retry ((arg0 progress) (arg1 font-context))
|
|
(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* (text-id progress-memcard-continue?) #f)
|
|
(lookup-text! *common-text* (text-id progress-unknown-retry?) #f)
|
|
)
|
|
(set! a0-5 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~32L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-memcard-continue?) #f)
|
|
(lookup-text! *common-text* (text-id progress-unknown-retry?) #f)
|
|
)
|
|
(set! a0-5 *temp-string*)
|
|
)
|
|
)
|
|
(print-game-text a0-5 arg1 #f 44 (bucket-id progress))
|
|
(the-as pointer 0)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(-> this value-to-modify)
|
|
)
|
|
)
|
|
)
|
|
(set! a0-8
|
|
(cond
|
|
(arg3
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-1 arg1))
|
|
(set! (-> a0-1 color) (font-color progress-force-selected))
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
((-> s3-0 0)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S~32L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-8 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~32L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #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* (-> this name) #f))
|
|
(let ((a3-4 (if (-> s3-0 0)
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
)
|
|
)
|
|
(s2-3 s1-2 s0-2 sv-16 a3-4)
|
|
)
|
|
)
|
|
*temp-string*
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(print-menu-text a0-8 (-> this scale) arg1 arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-1 arg1))
|
|
(set! (-> a0-1 color) (font-color progress-force-selected))
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
((-> s3-0 0)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S~32L ~S"
|
|
(lookup-text! *common-text* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #f)
|
|
)
|
|
(set! a0-8 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~32L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #f)
|
|
)
|
|
(set! a0-8 *temp-string*)
|
|
)
|
|
)
|
|
a0-8
|
|
)
|
|
(else
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f))
|
|
*temp-string*
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(print-menu-text a0-8 (-> this scale) arg1 arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(+! (-> arg1 origin y) 43.0)
|
|
)
|
|
(('aspect16x9)
|
|
(+! (-> arg1 origin y) 52.0)
|
|
)
|
|
)
|
|
(cond
|
|
((and (= (-> *progress-state* graphic-options-item-selected) 3)
|
|
(-> *progress-state* graphic-options-item-picked)
|
|
)
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-6 arg1))
|
|
(set! (-> a0-6 color) (font-color progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 44 f28-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 20.0)
|
|
(cond
|
|
((= (-> s3-0 0) 'pal)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S ~35L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-refresh-50hz) #f)
|
|
(lookup-text! *common-text* (text-id progress-refresh-60hz) #f)
|
|
)
|
|
(set! s2-0 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S~33L ~S"
|
|
(lookup-text! *common-text* (text-id progress-refresh-50hz) #f)
|
|
(lookup-text! *common-text* (text-id progress-refresh-60hz) #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) (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 progress))
|
|
)
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 20.0)
|
|
(cond
|
|
((= (-> s3-0 0) 'pal)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~1L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-refresh-50hz) #f)
|
|
(lookup-text! *common-text* (text-id progress-refresh-60hz) #f)
|
|
)
|
|
(set! s2-0 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~1L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-refresh-50hz) #f)
|
|
(lookup-text! *common-text* (text-id progress-refresh-60hz) #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 s2-0 (-> this scale) arg1 arg0)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin y) f30-0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-unlocked-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(let ((secrets (memcard-unlocked-secrets? #t))
|
|
(alpha (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
)
|
|
(if (< alpha 0.0)
|
|
(set! alpha 0.0)
|
|
)
|
|
(set-scale! arg1 0.6)
|
|
(when (nonzero? (-> this name))
|
|
(cond
|
|
((= arg2 (-> arg0 option-index))
|
|
(progress-selected 0)
|
|
(draw-highlight (the int (+ 8.0 (-> arg1 origin y))) 24 alpha)
|
|
)
|
|
(else
|
|
(font-color progress)
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) 8.0)
|
|
(cond
|
|
((= (-> this name) (text-id progress-main-secrets-scrapbook))
|
|
(if (logtest? secrets (game-secrets scrap-book-1))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-scrapbook) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-mega-scrapbook))
|
|
(if (logtest? secrets (game-secrets scrap-book-2))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-mega-scrapbook) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-scrapbook-3))
|
|
(if (logtest? secrets (game-secrets scrap-book-3))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-scrapbook-3) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-sceneplayer-1))
|
|
(if (logtest? secrets (game-secrets scene-player-1))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-sceneplayer-1) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-sceneplayer-2))
|
|
(if (logtest? secrets (game-secrets scene-player-2))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-sceneplayer-2) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-sceneplayer-3))
|
|
(if (logtest? secrets (game-secrets scene-player-3))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-sceneplayer-3) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-hero-mode))
|
|
(if (logtest? secrets (game-secrets hero-mode))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-hero-mode) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
((= (-> this name) (text-id progress-main-secrets-levelselect))
|
|
(if (logtest? secrets (game-secrets level-select))
|
|
(print-game-text (lookup-text! *common-text* (text-id progress-main-secrets-levelselect) #f) arg1 #f 44 (bucket-id progress))
|
|
(print-game-text (string-format "?????????") arg1 #f 44 (bucket-id progress)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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? (-> this name))
|
|
(= arg2 (-> arg0 option-index))
|
|
)
|
|
)
|
|
(set-scale! arg1 0.75)
|
|
(set-color! arg1 (font-color progress))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-flags! arg1 (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
|
|
)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(cond
|
|
((= (-> this name) (text-id progress-root-show-map))
|
|
;; og:preserve-this changed to text language check
|
|
(when (text-language? french)
|
|
(set-scale! arg1 0.7)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(set! (-> arg1 origin y) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
210
|
|
200
|
|
)
|
|
)
|
|
)
|
|
(set-scale! arg1 0.6)
|
|
(let ((v1-23 (-> *bigmap* bigmap-index)))
|
|
(cond
|
|
((zero? v1-23)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-pumping-station) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 1)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-landing-pad) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 2)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-weapons-factory) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 3)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-dig) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 4)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-dig) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 5)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-drill-platform) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 6)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-haven-forest) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 7)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-fortress) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 8)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-mountain-temple) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 9)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-nest) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 11)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-palace-roof) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 12)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-palace) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 13)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-dead-town) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 14)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-sewer) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 15)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-sewer) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 16)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-sewer) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 17)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-strip-mine) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 18)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-mars-tomb) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 19)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-underport) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((= v1-23 20)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-locations-haven-city) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defun draw-savegame-box ((arg0 menu-option) (arg1 float) (arg2 float) (arg3 float) (arg4 float))
|
|
(set! (-> arg0 box 0 min x) arg1)
|
|
(set! (-> arg0 box 0 max x) arg2)
|
|
(set! (-> arg0 box 0 min y) arg3)
|
|
(set! (-> arg0 box 0 max y) arg4)
|
|
(with-dma-buffer-add-bucket ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-box draw-box-prim-only) (the-as hud-box (-> arg0 box)) s5-0)
|
|
)
|
|
)
|
|
|
|
;; WARN: Return type mismatch uint vs texture-id.
|
|
(defun get-level-icon-id-01 ((arg0 int))
|
|
"TODO - Icon id enum perhaps?"
|
|
(let ((tex (new 'static 'texture-id :index #x36 :page #xc93)))
|
|
(cond
|
|
((zero? arg0)
|
|
(set! tex (new 'static 'texture-id :index #x48 :page #xc93))
|
|
)
|
|
((= arg0 1)
|
|
(set! tex (new 'static 'texture-id :index #x40 :page #xc93))
|
|
)
|
|
((= arg0 2)
|
|
(set! tex (new 'static 'texture-id :index #x70 :page #xc93))
|
|
)
|
|
((= arg0 3)
|
|
(set! tex (new 'static 'texture-id :index #x58 :page #xc93))
|
|
)
|
|
((= arg0 4)
|
|
(set! tex (new 'static 'texture-id :index #x68 :page #xc93))
|
|
)
|
|
((= arg0 5)
|
|
(set! tex (new 'static 'texture-id :index #x74 :page #xc93))
|
|
)
|
|
((= arg0 6)
|
|
(set! tex (new 'static 'texture-id :index #x36 :page #xc93))
|
|
)
|
|
((= arg0 7)
|
|
(set! tex (new 'static 'texture-id :index #x6c :page #xc93))
|
|
)
|
|
((= arg0 8)
|
|
(set! tex (new 'static 'texture-id :index #x5c :page #xc93))
|
|
)
|
|
((= arg0 9)
|
|
(set! tex (new 'static 'texture-id :index #x54 :page #xc93))
|
|
)
|
|
((= arg0 10)
|
|
(set! tex (new 'static 'texture-id :index #x50 :page #xc93))
|
|
)
|
|
((= arg0 11)
|
|
(set! tex (new 'static 'texture-id :index #x64 :page #xc93))
|
|
)
|
|
((= arg0 12)
|
|
(set! tex (new 'static 'texture-id :index #x78 :page #xc93))
|
|
)
|
|
((= arg0 13)
|
|
(set! tex (new 'static 'texture-id :index #x4c :page #xc93))
|
|
)
|
|
((= arg0 14)
|
|
(set! tex (new 'static 'texture-id :index #x3a :page #xc93))
|
|
)
|
|
((= arg0 15)
|
|
(set! tex (new 'static 'texture-id :index #x7c :page #xc93))
|
|
)
|
|
((= arg0 16)
|
|
(set! tex (new 'static 'texture-id :index #x44 :page #xc93))
|
|
)
|
|
((= arg0 17)
|
|
(set! tex (new 'static 'texture-id :index #x60 :page #xc93))
|
|
)
|
|
)
|
|
(the-as texture-id tex)
|
|
)
|
|
)
|
|
|
|
;; WARN: Return type mismatch uint vs texture-id.
|
|
(defun get-level-icon-id-02 ((arg0 int))
|
|
"TODO - Icon id enum perhaps?"
|
|
(let ((tex (new 'static 'texture-id :index #x37 :page #xc93)))
|
|
(cond
|
|
((zero? arg0)
|
|
(set! tex (new 'static 'texture-id :index #x49 :page #xc93))
|
|
)
|
|
((= arg0 1)
|
|
(set! tex (new 'static 'texture-id :index #x41 :page #xc93))
|
|
)
|
|
((= arg0 2)
|
|
(set! tex (new 'static 'texture-id :index #x71 :page #xc93))
|
|
)
|
|
((= arg0 3)
|
|
(set! tex (new 'static 'texture-id :index #x59 :page #xc93))
|
|
)
|
|
((= arg0 4)
|
|
(set! tex (new 'static 'texture-id :index #x69 :page #xc93))
|
|
)
|
|
((= arg0 5)
|
|
(set! tex (new 'static 'texture-id :index #x75 :page #xc93))
|
|
)
|
|
((= arg0 6)
|
|
(set! tex (new 'static 'texture-id :index #x37 :page #xc93))
|
|
)
|
|
((= arg0 7)
|
|
(set! tex (new 'static 'texture-id :index #x6d :page #xc93))
|
|
)
|
|
((= arg0 8)
|
|
(set! tex (new 'static 'texture-id :index #x5d :page #xc93))
|
|
)
|
|
((= arg0 9)
|
|
(set! tex (new 'static 'texture-id :index #x55 :page #xc93))
|
|
)
|
|
((= arg0 10)
|
|
(set! tex (new 'static 'texture-id :index #x51 :page #xc93))
|
|
)
|
|
((= arg0 11)
|
|
(set! tex (new 'static 'texture-id :index #x65 :page #xc93))
|
|
)
|
|
((= arg0 12)
|
|
(set! tex (new 'static 'texture-id :index #x79 :page #xc93))
|
|
)
|
|
((= arg0 13)
|
|
(set! tex (new 'static 'texture-id :index #x4d :page #xc93))
|
|
)
|
|
((= arg0 14)
|
|
(set! tex (new 'static 'texture-id :index #x3b :page #xc93))
|
|
)
|
|
((= arg0 15)
|
|
(set! tex (new 'static 'texture-id :index #x7d :page #xc93))
|
|
)
|
|
((= arg0 16)
|
|
(set! tex (new 'static 'texture-id :index #x45 :page #xc93))
|
|
)
|
|
((= arg0 17)
|
|
(set! tex (new 'static 'texture-id :index #x61 :page #xc93))
|
|
)
|
|
)
|
|
(the-as texture-id tex)
|
|
)
|
|
)
|
|
|
|
;; WARN: Return type mismatch uint vs texture-id.
|
|
(defun get-level-icon-id-03 ((arg0 int))
|
|
"TODO - Icon id enum perhaps?"
|
|
(let ((tex (new 'static 'texture-id :index #x38 :page #xc93)))
|
|
(cond
|
|
((zero? arg0)
|
|
(set! tex (new 'static 'texture-id :index #x4a :page #xc93))
|
|
)
|
|
((= arg0 1)
|
|
(set! tex (new 'static 'texture-id :index #x42 :page #xc93))
|
|
)
|
|
((= arg0 2)
|
|
(set! tex (new 'static 'texture-id :index #x72 :page #xc93))
|
|
)
|
|
((= arg0 3)
|
|
(set! tex (new 'static 'texture-id :index #x5a :page #xc93))
|
|
)
|
|
((= arg0 4)
|
|
(set! tex (new 'static 'texture-id :index #x6a :page #xc93))
|
|
)
|
|
((= arg0 5)
|
|
(set! tex (new 'static 'texture-id :index #x76 :page #xc93))
|
|
)
|
|
((= arg0 6)
|
|
(set! tex (new 'static 'texture-id :index #x38 :page #xc93))
|
|
)
|
|
((= arg0 7)
|
|
(set! tex (new 'static 'texture-id :index #x6e :page #xc93))
|
|
)
|
|
((= arg0 8)
|
|
(set! tex (new 'static 'texture-id :index #x5e :page #xc93))
|
|
)
|
|
((= arg0 9)
|
|
(set! tex (new 'static 'texture-id :index #x56 :page #xc93))
|
|
)
|
|
((= arg0 10)
|
|
(set! tex (new 'static 'texture-id :index #x52 :page #xc93))
|
|
)
|
|
((= arg0 11)
|
|
(set! tex (new 'static 'texture-id :index #x66 :page #xc93))
|
|
)
|
|
((= arg0 12)
|
|
(set! tex (new 'static 'texture-id :index #x7a :page #xc93))
|
|
)
|
|
((= arg0 13)
|
|
(set! tex (new 'static 'texture-id :index #x4e :page #xc93))
|
|
)
|
|
((= arg0 14)
|
|
(set! tex (new 'static 'texture-id :index #x3c :page #xc93))
|
|
)
|
|
((= arg0 15)
|
|
(set! tex (new 'static 'texture-id :index #x7e :page #xc93))
|
|
)
|
|
((= arg0 16)
|
|
(set! tex (new 'static 'texture-id :index #x46 :page #xc93))
|
|
)
|
|
((= arg0 17)
|
|
(set! tex (new 'static 'texture-id :index #x62 :page #xc93))
|
|
)
|
|
)
|
|
(the-as texture-id tex)
|
|
)
|
|
)
|
|
|
|
;; WARN: Return type mismatch uint vs texture-id.
|
|
(defun get-level-icon-id-04 ((arg0 int))
|
|
"TODO - Icon id enum perhaps?"
|
|
(let ((tex (new 'static 'texture-id :index #x39 :page #xc93)))
|
|
(cond
|
|
((zero? arg0)
|
|
(set! tex (new 'static 'texture-id :index #x4b :page #xc93))
|
|
)
|
|
((= arg0 1)
|
|
(set! tex (new 'static 'texture-id :index #x43 :page #xc93))
|
|
)
|
|
((= arg0 2)
|
|
(set! tex (new 'static 'texture-id :index #x73 :page #xc93))
|
|
)
|
|
((= arg0 3)
|
|
(set! tex (new 'static 'texture-id :index #x5b :page #xc93))
|
|
)
|
|
((= arg0 4)
|
|
(set! tex (new 'static 'texture-id :index #x6b :page #xc93))
|
|
)
|
|
((= arg0 5)
|
|
(set! tex (new 'static 'texture-id :index #x77 :page #xc93))
|
|
)
|
|
((= arg0 6)
|
|
(set! tex (new 'static 'texture-id :index #x39 :page #xc93))
|
|
)
|
|
((= arg0 7)
|
|
(set! tex (new 'static 'texture-id :index #x6f :page #xc93))
|
|
)
|
|
((= arg0 8)
|
|
(set! tex (new 'static 'texture-id :index #x5f :page #xc93))
|
|
)
|
|
((= arg0 9)
|
|
(set! tex (new 'static 'texture-id :index #x57 :page #xc93))
|
|
)
|
|
((= arg0 10)
|
|
(set! tex (new 'static 'texture-id :index #x53 :page #xc93))
|
|
)
|
|
((= arg0 11)
|
|
(set! tex (new 'static 'texture-id :index #x67 :page #xc93))
|
|
)
|
|
((= arg0 12)
|
|
(set! tex (new 'static 'texture-id :index #x7b :page #xc93))
|
|
)
|
|
((= arg0 13)
|
|
(set! tex (new 'static 'texture-id :index #x4f :page #xc93))
|
|
)
|
|
((= arg0 14)
|
|
(set! tex (new 'static 'texture-id :index #x3d :page #xc93))
|
|
)
|
|
((= arg0 15)
|
|
(set! tex (new 'static 'texture-id :index #x7f :page #xc93))
|
|
)
|
|
((= arg0 16)
|
|
(set! tex (new 'static 'texture-id :index #x47 :page #xc93))
|
|
)
|
|
((= arg0 17)
|
|
(set! tex (new 'static 'texture-id :index #x63 :page #xc93))
|
|
)
|
|
)
|
|
(the-as texture-id tex)
|
|
)
|
|
)
|
|
|
|
(defun draw-decoration ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id) (arg4 symbol) (arg5 float))
|
|
(let ((gp-0 70)
|
|
(s5-0 120)
|
|
(sv-48 87)
|
|
(s3-0 375)
|
|
(s2-0 210)
|
|
(sv-64 0)
|
|
)
|
|
(cond
|
|
((not arg4)
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(set! gp-0 69)
|
|
(set! s5-0 118)
|
|
(set! sv-48 80)
|
|
(set! s3-0 375)
|
|
(set! s2-0 210)
|
|
)
|
|
(('aspect16x9)
|
|
(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)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
;; added for better widescreen handling
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! gp-0 (the int (adjust-game-x (the float gp-0))))
|
|
(set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0)))
|
|
)
|
|
)
|
|
(set-scale! arg1 arg5)
|
|
(set! (-> arg1 origin y) (the float sv-48))
|
|
(set! (-> arg1 height) 50.0)
|
|
(set-color! arg1 (font-color progress))
|
|
(set-flags! arg1 (font-flags kerning middle large))
|
|
(print-game-text (lookup-text! *common-text* arg3 #f) arg1 #f 44 (bucket-id progress))
|
|
(set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 arg2)))
|
|
(draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s3-0)) (the float s5-0) (the float s5-0))
|
|
(when arg4
|
|
(+! (-> arg1 origin y) (the float sv-64))
|
|
(draw-savegame-box
|
|
arg0
|
|
(the float gp-0)
|
|
(the float (+ gp-0 s3-0))
|
|
(the float (+ s5-0 s2-0))
|
|
(the float (+ s5-0 s2-0))
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-1
|
|
gp-0
|
|
s5-0
|
|
s3-0
|
|
s2-0
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 arg2)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun draw-missions-decoration ((arg0 menu-missions-option) (arg1 font-context) (arg2 float) (arg3 text-id))
|
|
(local-vars
|
|
(sv-16 int)
|
|
(sv-32 (function string font-context symbol int bucket-id 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)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
;; added for better widescreen handling
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! gp-0 (the int (adjust-game-x (the float gp-0))))
|
|
(set! s4-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s4-0)))
|
|
)
|
|
)
|
|
(set-scale! sv-48 0.95)
|
|
(set! (-> sv-48 height) 50.0)
|
|
(set! (-> sv-48 origin y) (the float sv-16))
|
|
(set-color! sv-48 (font-color progress))
|
|
(print-game-text (lookup-text! *common-text* s0-0 #f) sv-48 #f 44 (bucket-id progress))
|
|
(set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s2-0)))
|
|
(draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s4-0)) (the float s5-0) (the float s5-0))
|
|
(draw-savegame-box
|
|
arg0
|
|
(the float gp-0)
|
|
(the float (+ gp-0 s4-0))
|
|
(the float (+ s5-0 s3-0))
|
|
(the float (+ s5-0 s3-0))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-1
|
|
gp-0
|
|
s5-0
|
|
s4-0
|
|
s3-0
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun draw-sound-options-decoration ((arg0 menu-slider-option) (arg1 font-context) (arg2 float) (arg3 text-id) (arg4 symbol))
|
|
(local-vars
|
|
(sv-16 font-context)
|
|
(sv-32 int)
|
|
(sv-48 (function string font-context symbol int bucket-id float))
|
|
(sv-64 text-id)
|
|
)
|
|
(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)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
;; added for better widescreen handling
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! gp-0 (the int (adjust-game-x (the float gp-0))))
|
|
(set! s4-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s4-0)))
|
|
)
|
|
)
|
|
(set-scale! sv-16 0.95)
|
|
(set! (-> sv-16 origin y) (the float sv-32))
|
|
(set! (-> sv-16 height) 50.0)
|
|
(set-color! sv-16 (font-color progress))
|
|
(set! (-> sv-16 origin x) 80.0)
|
|
(#when PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> sv-16 origin x) (the float (adjust-game-x (-> sv-16 origin x))))))
|
|
(set-flags! sv-16 (font-flags kerning middle large))
|
|
(print-game-text (lookup-text! *common-text* sv-64 #f) sv-16 #f 44 (bucket-id progress))
|
|
(set! (-> sv-16 origin x) (the float (+ gp-0 65)))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> sv-16 origin x) (the float (+ gp-0 (* (-> *pc-settings* aspect-ratio-reciprocal) 65)))))
|
|
(set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s2-0)))
|
|
(draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s4-0)) (the float s5-0) (the float s5-0))
|
|
(if s0-0
|
|
(draw-savegame-box
|
|
arg0
|
|
(the float gp-0)
|
|
(the float (+ gp-0 s4-0))
|
|
(the float (+ s5-0 s3-0))
|
|
(the float (+ s5-0 s3-0))
|
|
)
|
|
)
|
|
(with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-1
|
|
gp-0
|
|
s5-0
|
|
s4-0
|
|
s3-0
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun draw-decoration-secrets ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id))
|
|
(local-vars
|
|
(sv-16 int)
|
|
(sv-32 (function string font-context symbol int bucket-id 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)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
;; added for better widescreen handling
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! gp-0 (the int (adjust-game-x (the float gp-0))))
|
|
(set! s4-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s4-0)))
|
|
)
|
|
)
|
|
(let ((v1-11 sv-48))
|
|
(set! (-> v1-11 scale) 0.95)
|
|
)
|
|
(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 progress))
|
|
)
|
|
(set! sv-32 print-game-text)
|
|
(let ((a0-4 (lookup-text! *common-text* s0-0 #f))
|
|
(a2-2 #f)
|
|
(a3-1 44)
|
|
(t0-0 (bucket-id progress))
|
|
)
|
|
(sv-32 a0-4 sv-48 a2-2 a3-1 (the-as bucket-id t0-0))
|
|
)
|
|
(set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s2-0)))
|
|
(draw-savegame-box arg0 (the float gp-0) (the float (+ gp-0 s4-0)) (the float s5-0) (the float s5-0))
|
|
(draw-savegame-box
|
|
arg0
|
|
(the float gp-0)
|
|
(the float (+ gp-0 s4-0))
|
|
(the float (+ s5-0 s3-0))
|
|
(the float (+ s5-0 s3-0))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-1
|
|
gp-0
|
|
s5-0
|
|
s4-0
|
|
s3-0
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s2-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun draw-decoration-load-save ((arg0 menu-option) (arg1 font-context) (arg2 float) (arg3 text-id))
|
|
(local-vars
|
|
(sv-16 int)
|
|
(sv-32 int)
|
|
(sv-48 (function string font-context symbol int bucket-id float))
|
|
(sv-64 text-id)
|
|
(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)
|
|
)
|
|
)
|
|
(#when PC_PORT
|
|
;; added for better widescreen handling
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! gp-0 (the int (adjust-game-x (the float gp-0))))
|
|
(set! s0-0 (the int (adjust-game-x (the float s0-0))))
|
|
(set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0)))
|
|
(set! sv-32 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-32)))
|
|
)
|
|
)
|
|
(set-scale! sv-80 0.65)
|
|
(when (text-language? french spanish italian) ;; og:preserve-this text-language patch
|
|
(set-scale! sv-80 0.5)
|
|
)
|
|
(set! (-> sv-80 origin y) (the float sv-16))
|
|
(set! (-> sv-80 origin x) (the float s0-0))
|
|
(set-flags! sv-80 (font-flags kerning middle large))
|
|
(set-color! sv-80 (font-color progress))
|
|
(print-game-text (lookup-text! *common-text* sv-64 #f) sv-80 #f 44 (bucket-id progress))
|
|
(set-vector! (-> arg0 box 0 color) 64 128 128 (the int (* 128.0 s4-0)))
|
|
(draw-savegame-box arg0 (the float s0-0) (the float (+ s0-0 sv-32)) (the float s5-0) (the float s5-0))
|
|
(with-dma-buffer-add-bucket ((s0-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-1
|
|
gp-0
|
|
s5-0
|
|
s3-0
|
|
s2-0
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 s4-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(v0-74 pointer)
|
|
(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 (the-as int (progress-selected 0)))
|
|
(font-color progress)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((= *save-options-title* (-> arg0 current-options))
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(set! (-> arg1 height) 52.0)
|
|
(+! (-> arg1 origin y) (the float (* 42 (+ arg2 1))))
|
|
(+! (-> arg1 origin x) -100.0)
|
|
)
|
|
(else
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! (-> arg1 origin y) 74.0)
|
|
(set! (-> arg1 height) 42.0)
|
|
(+! (-> arg1 origin y) (the float (* 60 (+ arg2 1))))
|
|
(+! (-> arg1 origin x) -90.0)
|
|
)
|
|
(('aspect4x3)
|
|
(set! (-> arg1 origin y) 74.0)
|
|
(set! (-> arg1 height) 42.0)
|
|
(+! (-> arg1 origin y) (the float (* 54 (+ arg2 1))))
|
|
(+! (-> arg1 origin x) -90.0)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set-vector! (-> this box 0 color) 64 128 128 (the int (* 128.0 sv-16)))
|
|
(when (= arg2 sv-20)
|
|
(cond
|
|
((!= *save-options-title* (-> arg0 current-options))
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! sv-64 79)
|
|
(set! sv-72 110)
|
|
(set! sv-80 166)
|
|
(set! sv-88 62)
|
|
)
|
|
)
|
|
(draw-savegame-box
|
|
this
|
|
(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
|
|
this
|
|
(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
|
|
this
|
|
(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
|
|
this
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float sv-72)
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s1-0
|
|
sv-64
|
|
(+ sv-72 (* sv-88 arg2))
|
|
sv-80
|
|
sv-88
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 sv-16)))
|
|
)
|
|
)
|
|
)
|
|
((= *save-options-title* (-> arg0 current-options))
|
|
(set! sv-88 42)
|
|
(let ((v0-13 (get-aspect-ratio)))
|
|
(when (= v0-13 'aspect16x9)
|
|
(set! sv-64 79)
|
|
(set! sv-72 110)
|
|
(set! sv-80 166)
|
|
(set! sv-88 42)
|
|
(draw-savegame-box
|
|
this
|
|
(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
|
|
this
|
|
(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
|
|
this
|
|
(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
|
|
this
|
|
(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
|
|
this
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float sv-72)
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s1-1
|
|
sv-64
|
|
(+ sv-72 (* sv-88 arg2))
|
|
sv-80
|
|
sv-88
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 sv-16)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and *progress-save-info*
|
|
(= (-> *progress-save-info* formatted) 1)
|
|
(= (-> *progress-save-info* inited) 1)
|
|
(= (-> *progress-save-info* file arg2 present) 1)
|
|
)
|
|
(cond
|
|
((= arg2 sv-20)
|
|
(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* (text-id progress-unknown-game) #f))
|
|
(a3-33 (+ arg2 1))
|
|
)
|
|
(s1-2 s0-0 sv-96 a2-28 a3-33)
|
|
)
|
|
)
|
|
(s2-7 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(let ((a0-45 arg1))
|
|
(set! (-> a0-45 color) (font-color progress))
|
|
)
|
|
(set! (-> arg1 origin x) 250.0)
|
|
(set! (-> arg1 origin y) 110.0)
|
|
(set! (-> arg1 width) 170.0)
|
|
(set! (-> arg1 height) 190.0)
|
|
(let ((s2-8 (-> *progress-save-info* file arg2 level-index)))
|
|
(when (= arg2 sv-20)
|
|
(let ((v1-199 (-> this sprites 0 color2)))
|
|
(set! (-> v1-199 0) 128)
|
|
(set! (-> v1-199 1) 128)
|
|
(set! (-> v1-199 2) 128)
|
|
(set! (-> v1-199 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(let ((v1-200 (-> this sprites 1 color2)))
|
|
(set! (-> v1-200 0) 128)
|
|
(set! (-> v1-200 1) 128)
|
|
(set! (-> v1-200 2) 128)
|
|
(set! (-> v1-200 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> this sprites 1 pos z) #xffffff)
|
|
(set! (-> this sprites 1 pos w) 1)
|
|
(set! (-> this sprites 1 tex) (lookup-texture-by-id (get-level-icon-id-01 s2-8)))
|
|
(set! (-> this sprites 1 scale-x) 1.0)
|
|
(set! (-> this sprites 1 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> this sprites 1) sv-40 sv-48)
|
|
(let ((v1-205 (-> this sprites 2 color2)))
|
|
(set! (-> v1-205 0) 128)
|
|
(set! (-> v1-205 1) 128)
|
|
(set! (-> v1-205 2) 128)
|
|
(set! (-> v1-205 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> this sprites 2 pos z) #xffffff)
|
|
(set! (-> this sprites 2 pos w) 1)
|
|
(set! (-> this sprites 2 tex) (lookup-texture-by-id (get-level-icon-id-02 s2-8)))
|
|
(set! (-> this sprites 2 scale-x) 1.0)
|
|
(set! (-> this sprites 2 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> this sprites 2) (+ sv-40 sv-56) sv-48)
|
|
(let ((v1-211 (-> this sprites 3 color2)))
|
|
(set! (-> v1-211 0) 128)
|
|
(set! (-> v1-211 1) 128)
|
|
(set! (-> v1-211 2) 128)
|
|
(set! (-> v1-211 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> this sprites 3 pos z) #xffffff)
|
|
(set! (-> this sprites 3 pos w) 1)
|
|
(set! (-> this sprites 3 tex) (lookup-texture-by-id (get-level-icon-id-03 s2-8)))
|
|
(set! (-> this sprites 3 scale-x) 1.0)
|
|
(set! (-> this sprites 3 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> this sprites 3) sv-40 (+ sv-48 64))
|
|
(let ((v1-217 (-> this sprites 4 color2)))
|
|
(set! (-> v1-217 0) 128)
|
|
(set! (-> v1-217 1) 128)
|
|
(set! (-> v1-217 2) 128)
|
|
(set! (-> v1-217 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> this sprites 4 pos z) #xffffff)
|
|
(set! (-> this sprites 4 pos w) 1)
|
|
(set! (-> this sprites 4 tex) (lookup-texture-by-id (get-level-icon-id-04 s2-8)))
|
|
(set! (-> this sprites 4 scale-x) 1.0)
|
|
(set! (-> this sprites 4 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> this sprites 4) (+ sv-40 sv-56) (+ sv-48 64))
|
|
(with-dma-buffer-add-bucket ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> this sprites 1) s1-7 (-> *level* default-level))
|
|
(draw (-> this sprites 2) s1-7 (-> *level* default-level))
|
|
(draw (-> this sprites 3) s1-7 (-> *level* default-level))
|
|
(draw (-> this sprites 4) s1-7 (-> *level* default-level))
|
|
)
|
|
(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! (-> this sprites 0 scale-x) 0.7)
|
|
(set! (-> this sprites 0 scale-y) 0.7)
|
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93)))
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 265 263)
|
|
(with-dma-buffer-add-bucket ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-8 (-> *level* default-level))
|
|
)
|
|
(+! (-> arg1 origin y) 1.0)
|
|
(+! (-> arg1 origin x) 28.0)
|
|
(let* ((v1-272 (-> *progress-save-info* file arg2 game-time0))
|
|
(v1-273 (logior (shl (-> *progress-save-info* file arg2 game-time1) 32) v1-272))
|
|
(s2-11 (/ (the-as int v1-273) #x107ac0))
|
|
)
|
|
(set! sv-112 (/ (mod (the-as int v1-273) #x107ac0) #x4650))
|
|
(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 (bucket-id progress))
|
|
)
|
|
)
|
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93)))
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 368 263)
|
|
(with-dma-buffer-add-bucket ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-10 (-> *level* default-level))
|
|
)
|
|
(+! (-> arg1 origin x) 100.0)
|
|
(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 (bucket-id progress))
|
|
)
|
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93)))
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 368 289)
|
|
(with-dma-buffer-add-bucket ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-12 (-> *level* default-level))
|
|
)
|
|
(+! (-> arg1 origin y) 28.0)
|
|
(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 (bucket-id progress))
|
|
)
|
|
(set! (-> this sprites 0 scale-x) 0.6)
|
|
(set! (-> this sprites 0 scale-y) 0.6)
|
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93)))
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 253 290)
|
|
(with-dma-buffer-add-bucket ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s1-14 (-> *level* default-level))
|
|
)
|
|
(+! (-> arg1 origin x) -100.0)
|
|
(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 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
((and *progress-save-info*
|
|
(= (-> *progress-save-info* formatted) 1)
|
|
(= (-> *progress-save-info* inited) 1)
|
|
(zero? (-> *progress-save-info* file arg2 present))
|
|
)
|
|
(cond
|
|
((= arg2 sv-20)
|
|
(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* (text-id progress-slot-empty) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin x) sv-24)
|
|
(set! (-> arg1 origin y) sv-28)
|
|
(set! (-> arg1 width) sv-32)
|
|
(set! (-> arg1 height) sv-36)
|
|
(if (zero? arg2)
|
|
(draw-decoration-load-save this arg1 sv-16 (if (= (-> arg0 current) 'select-load)
|
|
(text-id progress-select-file-to-load)
|
|
(text-id progress-select-file-to-save)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(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) (progress-selected 0))
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 120.0)
|
|
(set! (-> arg1 origin y) 110.0)
|
|
(let ((v1-8 arg1))
|
|
(set! (-> v1-8 width) (the float 270))
|
|
)
|
|
(let ((v1-9 arg1))
|
|
(set! (-> v1-9 height) (the float 35))
|
|
)
|
|
(if (< f30-0 0.0)
|
|
0.0
|
|
)
|
|
)
|
|
(when (or (< (mod (current-time) 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 text-id a1-1) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) 45.0)
|
|
(let ((v1-25 arg1))
|
|
(set! (-> v1-25 height) (the float 160))
|
|
)
|
|
(let ((a0-16 arg1))
|
|
(set! (-> a0-16 color) (font-color progress))
|
|
)
|
|
(let ((s5-2 print-game-text))
|
|
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-dont-remove) #f) 1)
|
|
(s5-2 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((a0-4 arg1))
|
|
(set! (-> a0-4 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 75.0)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(let ((v1-8 arg1))
|
|
(set! (-> v1-8 width) (the float 360))
|
|
)
|
|
(let ((v1-9 arg1))
|
|
(set! (-> v1-9 height) (the float 80))
|
|
)
|
|
(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 text-id s4-0) #f) 1)
|
|
(s3-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) 80.0)
|
|
(let ((v1-17 arg1))
|
|
(set! (-> v1-17 height) (the float 50))
|
|
)
|
|
(let ((s4-1 print-game-text))
|
|
(format
|
|
(clear *temp-string*)
|
|
(lookup-text! *common-text* (text-id progress-memcard-space-requirement) #f)
|
|
(if *progress-save-info*
|
|
(-> *progress-save-info* mem-required)
|
|
0
|
|
)
|
|
)
|
|
(s4-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 55.0)
|
|
(let ((v1-22 arg1))
|
|
(set! (-> v1-22 height) (the float 90))
|
|
)
|
|
(cond
|
|
((and (!= (-> *progress-state* starting-state) 'insufficient-space)
|
|
(!= (-> *progress-state* starting-state) 'no-memory-card)
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-insert-card-with-space-to-save) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 60.0)
|
|
(let ((s5-2 arg1))
|
|
(set! (-> s5-2 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s4-2 arg1))
|
|
(set! (-> s4-2 color) (progress-selected 0))
|
|
)
|
|
(+! (-> arg1 origin y) 20.0)
|
|
(draw-highlight (the int (+ 30.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(draw-continue-retry arg0 arg1)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 130.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 330))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 60))
|
|
)
|
|
(let ((s5-0 409))
|
|
(get-state-check-card arg0 'select-save)
|
|
(let ((s4-0 print-game-text))
|
|
(format (clear *temp-string*) (lookup-text! *common-text* (the-as text-id s5-0) #f) 1)
|
|
(s4-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) 140.0)
|
|
(let ((v1-13 arg1))
|
|
(set! (-> v1-13 height) (the float 30))
|
|
)
|
|
(let ((s5-1 arg1))
|
|
(set! (-> s5-1 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 130.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 330))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 95))
|
|
)
|
|
(let ((s5-0 print-game-text))
|
|
(format
|
|
(clear *temp-string*)
|
|
(lookup-text! *common-text* (text-id progress-memcard-insert-card-with-jak2) #f)
|
|
1
|
|
)
|
|
(s5-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 115.0)
|
|
(let ((v1-10 arg1))
|
|
(set! (-> v1-10 height) (the float 60))
|
|
)
|
|
(let ((s5-1 arg1))
|
|
(set! (-> s5-1 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-go-back?) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 100.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 330))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 45))
|
|
)
|
|
(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 text-id s5-0) #f) 1)
|
|
(s4-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) 50.0)
|
|
(let ((v1-16 arg1))
|
|
(set! (-> v1-16 height) (the float 105))
|
|
)
|
|
(let ((s5-1 print-game-text))
|
|
(format
|
|
(clear *temp-string*)
|
|
(lookup-text! *common-text* (text-id progress-memcard-check-and-try-again) #f)
|
|
1
|
|
)
|
|
(s5-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 115.0)
|
|
(let ((v1-19 arg1))
|
|
(set! (-> v1-19 height) (the float 45))
|
|
)
|
|
(let ((s5-2 arg1))
|
|
(set! (-> s5-2 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 9.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 77.0)
|
|
(set! (-> arg1 origin y) 85.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 360))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 25))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-error-while-saving) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(let ((v1-10 arg1))
|
|
(set! (-> v1-10 height) (the float 60))
|
|
)
|
|
(let ((s5-1 print-game-text))
|
|
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-check) #f) 1)
|
|
(s5-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 60.0)
|
|
(let ((v1-13 arg1))
|
|
(set! (-> v1-13 height) (the float 45))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-disabled) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 45.0)
|
|
(let ((v1-16 arg1))
|
|
(set! (-> v1-16 height) (the float 95))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-reenabling-info) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 90.0)
|
|
(let ((v1-19 arg1))
|
|
(set! (-> v1-19 height) (the float 25))
|
|
)
|
|
(let ((s5-4 arg1))
|
|
(set! (-> s5-4 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (-> arg1 origin y)) 22 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 360))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 70))
|
|
)
|
|
(let ((s5-0 print-game-text))
|
|
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-was-removed) #f) 1)
|
|
(s5-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 65.0)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-disabled) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 65.0)
|
|
(let ((v1-12 arg1))
|
|
(set! (-> v1-12 height) (the float 90))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-reenabling-info) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 85.0)
|
|
(let ((v1-15 arg1))
|
|
(set! (-> v1-15 height) (the float 35))
|
|
)
|
|
(let ((s5-3 arg1))
|
|
(set! (-> s5-3 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 5.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((v1-2 arg1))
|
|
(set! (-> v1-2 scale) 0.5)
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 120.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 360))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 35))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-disc-removed-notice) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 45.0)
|
|
(let ((v1-10 arg1))
|
|
(set! (-> v1-10 height) (the float 85))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-disc-removed-prompt) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(when (is-cd-in?)
|
|
(+! (-> arg1 origin y) 95.0)
|
|
(let ((v1-14 arg1))
|
|
(set! (-> v1-14 height) (the float 50))
|
|
)
|
|
(let ((s5-2 arg1))
|
|
(set! (-> s5-2 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((v1-2 arg1))
|
|
(set! (-> v1-2 scale) 0.5)
|
|
)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 120.0)
|
|
(let ((v1-6 arg1))
|
|
(set! (-> v1-6 width) (the float 330))
|
|
)
|
|
(let ((v1-7 arg1))
|
|
(set! (-> v1-7 height) (the float 35))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-disc-read-error) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 55.0)
|
|
(let ((v1-10 arg1))
|
|
(set! (-> v1-10 height) (the float 85))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-disc-read-error-prompt) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 105.0)
|
|
(let ((v1-13 arg1))
|
|
(set! (-> v1-13 height) (the float 50))
|
|
)
|
|
(let ((s5-2 arg1))
|
|
(set! (-> s5-2 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress))
|
|
)
|
|
(let ((v1-2 arg1))
|
|
(set! (-> v1-2 scale) 0.5)
|
|
)
|
|
(set! (-> *bigmap* auto-save-icon-flag) #t)
|
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x48 :page #x67a)))
|
|
(set! (-> this sprites 0 scale-x) 1.0)
|
|
(set! (-> this sprites 0 scale-y) 1.0)
|
|
(let ((v1-6 (-> this sprites 0 color2)))
|
|
(set! (-> v1-6 0) 128)
|
|
(set! (-> v1-6 1) 128)
|
|
(set! (-> v1-6 2) 128)
|
|
(set! (-> v1-6 3) (the int (* 128.0 (- 1.0 (-> arg0 menu-transition)))))
|
|
)
|
|
(set! (-> this sprites 0 pos z) #xffffff)
|
|
(set! (-> this sprites 0 pos w) 0)
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) 240 160)
|
|
(with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) s3-0 (-> *level* default-level))
|
|
)
|
|
(let ((a0-16 arg1))
|
|
(set! (-> a0-16 flags) (font-flags kerning middle middle-vert large))
|
|
)
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(let ((v1-27 arg1))
|
|
(set! (-> v1-27 width) (the float 330))
|
|
)
|
|
(let ((v1-28 arg1))
|
|
(set! (-> v1-28 height) (the float 85))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-explanation) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 115.0)
|
|
(let ((v1-31 arg1))
|
|
(set! (-> v1-31 height) (the float 95))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-dont-remove) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 90.0)
|
|
(let ((v1-34 arg1))
|
|
(set! (-> v1-34 height) (the float 50))
|
|
)
|
|
(let ((s5-3 arg1))
|
|
(set! (-> s5-3 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 85)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(let ((s4-0 print-game-text))
|
|
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-unformatted) #f) 1)
|
|
(s4-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 95.0)
|
|
(set-height! arg1 85)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-formatting-required-notice) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 95.0)
|
|
(set-height! arg1 25)
|
|
(draw-highlight (the int (-> arg1 origin y)) 44 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-format-prompt) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 120.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 85)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-overwrite-warning) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 105.0)
|
|
(set-height! arg1 45)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-overwrite-confirm) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 45.0)
|
|
(draw-highlight (the int (+ 8.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 110.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 90)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(let ((s4-0 print-game-text))
|
|
(format (clear *temp-string*) (lookup-text! *common-text* (text-id progress-memcard-no-jak2-found) #f) 1)
|
|
(s4-0 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 95.0)
|
|
(set-height! arg1 60)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-create-jak2-file?) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 70.0)
|
|
(draw-highlight (the int (+ 18.0 (-> arg1 origin y))) 22 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 85.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 45)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-60hz-change-notice) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 50.0)
|
|
(set-height! arg1 95)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-1) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 85.0)
|
|
(set-height! arg1 55)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-2) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 60.0)
|
|
(set-height! arg1 30)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-continue?) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 20.0)
|
|
(draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 130.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 50)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-60hz-change-complete) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 70.0)
|
|
(set-height! arg1 50)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-mode-revert?) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 50.0)
|
|
(draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 75.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 50)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-progressivescan-change-notice) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 50.0)
|
|
(set-height! arg1 90)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-1) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 85.0)
|
|
(set-height! arg1 75)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-progressivescan-warning-2) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 70.0)
|
|
(set-height! arg1 30)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-memcard-continue?) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(draw-highlight (the int (-> arg1 origin y)) 24 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.55)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(set! (-> arg1 origin y) 90.0)
|
|
(set-width! arg1 360)
|
|
(set-height! arg1 80)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-progressivescan-change-complete) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 100.0)
|
|
(set-height! arg1 75)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-graphics-mode-revert?) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 70.0)
|
|
(draw-highlight (the int (+ 20.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-quit-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.55)
|
|
(set-flags! arg1 (font-flags kerning middle middle-vert large))
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 160.0)
|
|
(set-width! arg1 330)
|
|
(set-height! arg1 70)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-quit-game-confirm) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 60.0)
|
|
(draw-highlight (the int (+ 17.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(draw-yes-no arg0 arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defglobalconstant COMPACT_SELECT_START #f)
|
|
;; WARN: disable def twice: 147. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
|
|
(defmethod draw-option ((this 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 bucket-id float))
|
|
(sv-128 hud-box)
|
|
)
|
|
(let* ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(s3-0 (-> this task-index))
|
|
(s2-0 0)
|
|
(s1-0 (#if COMPACT_SELECT_START 25 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)
|
|
(set-scale! arg1 0.45)
|
|
(set-flags! arg1 (font-flags kerning middle large))
|
|
(set-color! arg1 (font-color progress))
|
|
(set! (-> arg1 origin y) 100.0)
|
|
(set-width! arg1 345)
|
|
(set-height! arg1 210)
|
|
(#when PC_PORT
|
|
(#when COMPACT_SELECT_START (-! (-> arg1 origin y) 25.0))
|
|
;(-! s0-0 25)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))))
|
|
(let* ((v1-11 (-> arg0 current))
|
|
(a3-1 (cond
|
|
((= v1-11 'select-pre-start)
|
|
(text-id progress-select-pre-start)
|
|
)
|
|
((= v1-11 'select-kiosk-start)
|
|
(text-id progress-select-kiosk-start)
|
|
)
|
|
(else
|
|
(text-id progress-main-secrets-levelselect)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (text-language? french spanish) ;; og:preserve-this text-language patch
|
|
(draw-decoration this arg1 f30-0 (the-as text-id a3-1) #t 0.7)
|
|
(draw-decoration this arg1 f30-0 (the-as text-id a3-1) #t 0.95)
|
|
)
|
|
)
|
|
(begin-scissor-level sv-128)
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(#when PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))))
|
|
(set-scale! arg1 0.5)
|
|
(when (text-language? japanese korean) ;; og:preserve-this text-language patch
|
|
(set-scale! arg1 0.6)
|
|
)
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(when (>= (+ s3-0 -1) 0)
|
|
(+! s3-0 -1)
|
|
(set! s2-0 -1)
|
|
(draw-highlight (+ s0-0 (#if COMPACT_SELECT_START 22 47)) (#if COMPACT_SELECT_START 25 50) f30-0)
|
|
(set! s0-0 (- s0-0 s1-0))
|
|
)
|
|
(while (< s2-0 (#if COMPACT_SELECT_START 16 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* (-> 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! (-> this real-task-index) sv-64)
|
|
(set! sv-96 arg1)
|
|
(set! (-> sv-96 color) (progress-selected 0))
|
|
;; og:preserve-this added this check here so we dont double-draw the highlight
|
|
(when (< (+ s3-0 -1) 0)
|
|
(draw-highlight (+ s0-0 (#if COMPACT_SELECT_START 22 47)) (#if COMPACT_SELECT_START 25 50) f30-0))
|
|
)
|
|
(else
|
|
(set-color! arg1 (font-color progress))
|
|
)
|
|
)
|
|
(cond
|
|
;; og:preserve-this text-language patch
|
|
((and (text-language? german) (= (text-id progress-missions-stadium-board1) (-> sv-80 text-name)))
|
|
(set-scale! arg1 0.45)
|
|
)
|
|
;; og:preserve-this text-language patch
|
|
((and (text-language? german) (!= (text-id progress-missions-stadium-board1) (-> sv-80 text-name)))
|
|
(set-scale! arg1 0.5)
|
|
)
|
|
)
|
|
(set-height! arg1 s1-0)
|
|
(+! s0-0 s1-0)
|
|
(set! (-> arg1 origin y) (the float (+ s0-0 (the int f28-0))))
|
|
(print-game-text (lookup-text! *common-text* (-> sv-80 text-name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(+! s3-0 1)
|
|
(+! s2-0 1)
|
|
)
|
|
)
|
|
(end-scissor-level sv-128 1.0)
|
|
(draw-scene-up-down arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-select-scene-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars (sv-48 int))
|
|
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(s4-0 (-> this 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 'hud-box))
|
|
)
|
|
(let ((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)
|
|
(set-flags! arg1 (font-flags kerning middle large))
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 100.0)
|
|
(set-width! arg1 335)
|
|
(set-height! arg1 210)
|
|
(#when PC_PORT
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
))
|
|
(set-color! arg1 (font-color progress))
|
|
(if (text-language? french spanish) ;; og:preserve-this text-language patch
|
|
(draw-decoration this arg1 f30-0 (text-id progress-select-scene) #t 0.7)
|
|
(draw-decoration this arg1 f30-0 (text-id progress-select-scene) #t 0.95)
|
|
)
|
|
(begin-scissor-scene s1-0)
|
|
(set-scale! arg1 0.5)
|
|
(set! sv-48 0)
|
|
(while (< sv-48 s4-0)
|
|
(+! f28-0 (print-game-text (lookup-text! *common-text* (-> s2-0 sv-48 text) #f) arg1 #t 44 (bucket-id progress)))
|
|
(set! sv-48 (+ sv-48 1))
|
|
)
|
|
(let ((s0-1 (- s0-0 (the int f28-0)))
|
|
(f28-1 (cond
|
|
((< (-> arg0 sliding-height) 0.0)
|
|
(* (-> arg0 sliding-height) (print-game-text (string-format "~S" (lookup-text! *common-text* (-> s2-0 s4-0 text) #f)) arg1 #t 44 (bucket-id progress)))
|
|
)
|
|
(else
|
|
(* (-> arg0 sliding-height) (print-game-text (string-format "~S" (lookup-text! *common-text* (-> s2-0 (+ s4-0 -1) text) #f)) arg1 #t 44 (bucket-id progress)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1))))
|
|
(while (< s3-0 (length s2-0))
|
|
(let ((f26-0 (print-game-text (lookup-text! *common-text* (-> s2-0 s3-0 text) #f) arg1 #t 44 (bucket-id progress))))
|
|
(set! (-> arg1 flags) (font-flags kerning large))
|
|
(cond
|
|
((and (< s3-0 s4-0) (!= (-> arg0 sliding-height) 0.0))
|
|
(set-color! arg1 (progress-selected 0))
|
|
(draw-highlight (+ (the int f26-0) -2 s0-1) (the int f26-0) f30-0)
|
|
)
|
|
((or (and (= s3-0 s4-0) (= (fabs (-> arg0 sliding-height)) 0.0)) (zero? s3-0))
|
|
(set-color! arg1 (progress-selected 0))
|
|
(draw-highlight (+ s0-1 -2) (the int f26-0) f30-0)
|
|
)
|
|
(else
|
|
(set-color! arg1 (font-color progress))
|
|
)
|
|
)
|
|
)
|
|
(+! s0-1 (the int (print-game-text (lookup-text! *common-text* (-> s2-0 s3-0 text) #f) arg1 #f 44 (bucket-id progress))))
|
|
(set! (-> arg1 origin y) (the float (+ s0-1 (the int f28-1))))
|
|
(+! s3-0 1)
|
|
)
|
|
)
|
|
)
|
|
(end-scissor-scene s1-0 1.0)
|
|
)
|
|
)
|
|
(draw-scene-up-down arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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))
|
|
"Sorts the [[*game-info*]]'s `mission-list` by if they are closed and their `closed-time`. Just bubble-sort and therefore O(n^2)"
|
|
(let ((game-task-info-array (-> *game-info* mission-list))
|
|
(i (max 0 (+ arg0 -1)))
|
|
)
|
|
(let ((j 0))
|
|
(while (> i 0)
|
|
(while (< j i)
|
|
(when (and (logtest? (-> game-task-info-array j flags) (game-task-node-flag closed))
|
|
(logtest? (-> game-task-info-array (+ j 1) flags) (game-task-node-flag closed))
|
|
(< (-> game-task-info-array j close-time) (-> game-task-info-array (+ j 1) close-time))
|
|
)
|
|
(let ((task-info (-> game-task-info-array j)))
|
|
(set! (-> game-task-info-array j) (-> game-task-info-array (+ j 1)))
|
|
(set! (-> game-task-info-array (+ j 1)) task-info)
|
|
)
|
|
)
|
|
(+! j 1)
|
|
)
|
|
(+! i -1)
|
|
(set! j 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)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(f0-50 float)
|
|
(sv-16 float)
|
|
(sv-20 int)
|
|
(sv-24 int)
|
|
(sv-32 int)
|
|
(sv-40 int)
|
|
(sv-48 int)
|
|
(sv-56 int)
|
|
(sv-256 float)
|
|
(sv-260 float)
|
|
(sv-264 game-task-node-info)
|
|
(sv-268 game-task-node-info)
|
|
(sv-272 symbol)
|
|
(sv-276 hud-box)
|
|
(sv-280 float)
|
|
(sv-284 float)
|
|
)
|
|
(set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(set! sv-20 1)
|
|
(set! sv-24 0)
|
|
(set! sv-32 0)
|
|
(set! sv-40 0)
|
|
(set! sv-48 0)
|
|
(set! sv-56 95)
|
|
(set! sv-256 (* 395.0 (-> arg0 sliding)))
|
|
(set! sv-260 (* 44.0 (-> arg0 sliding-height)))
|
|
(set! sv-264 (new 'stack 'game-task-node-info))
|
|
(set! sv-268 (new 'stack 'game-task-node-info))
|
|
(set! sv-272 #t)
|
|
(set! sv-276 (new 'stack-no-clear 'hud-box))
|
|
(set! sv-280 (-> arg1 origin y))
|
|
(set! sv-284 (-> arg1 scale))
|
|
(set! (-> *progress-state* current-task-index) (length (-> *game-info* sub-task-list)))
|
|
(set! (-> *progress-state* current-line-index) -1)
|
|
(set! (-> *progress-state* current-task) (the-as uint -1))
|
|
(set! (-> *progress-state* first-closed-line-index) -1)
|
|
(set! (-> *progress-state* extra-text-state) -1)
|
|
(set! (-> *progress-state* num-open-tasks-found) 0)
|
|
(set! (-> *progress-state* num-closed-tasks-found) 0)
|
|
(if (< sv-16 0.0)
|
|
(set! sv-16 (the-as float 0.0))
|
|
)
|
|
(set! (-> arg1 alpha) sv-16)
|
|
(set! (-> *game-info* mission-list 0) sv-264)
|
|
(set! (-> sv-264 description) (text-id progress-missions-in-progress))
|
|
(set! (-> sv-268 description) (text-id progress-missions-completed))
|
|
(while (< sv-24 (length (-> *game-info* sub-task-list)))
|
|
(let ((v1-26 (find-mission-text-at-index sv-24))
|
|
(a0-15 (-> *game-info* mission-list))
|
|
)
|
|
(when (!= v1-26 #f)
|
|
(when (and (logtest? (-> v1-26 flags) (game-task-node-flag closed)) sv-272)
|
|
(set! sv-272 (the-as symbol #f))
|
|
(set! (-> a0-15 sv-20) sv-268)
|
|
(set! sv-20 (+ sv-20 1))
|
|
)
|
|
(set! (-> a0-15 sv-20) v1-26)
|
|
(set! sv-20 (+ sv-20 1))
|
|
)
|
|
)
|
|
(set! sv-24 (+ sv-24 1))
|
|
)
|
|
(set! sv-48 sv-20)
|
|
(set! (-> *progress-state* total-num-tasks) sv-20)
|
|
(sort-task-node-result sv-48)
|
|
(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 progress))
|
|
)
|
|
(let ((v1-40 (-> this page-index)))
|
|
(cond
|
|
((zero? v1-40)
|
|
(draw-missions-decoration this arg1 sv-16 (text-id progress-root-missions))
|
|
)
|
|
((= v1-40 1)
|
|
(draw-missions-decoration this arg1 sv-16 (text-id progress-root-missions))
|
|
)
|
|
)
|
|
)
|
|
(begin-scissor-missions sv-276)
|
|
(let ((a0-27 arg1))
|
|
(set! (-> a0-27 flags) (font-flags kerning large))
|
|
)
|
|
(+! (-> arg1 origin x) 20.0)
|
|
(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? (-> this page-index))
|
|
(set! sv-24 (-> this task-line-index))
|
|
(set! sv-20 0)
|
|
(let ((v1-57 (+ sv-56 44)))
|
|
(set! sv-56 v1-57)
|
|
(set! (-> arg1 origin y) (the float (+ v1-57 (the int sv-260))))
|
|
)
|
|
(set! (-> arg1 width) 340.0)
|
|
(set! (-> arg1 height) 44.0)
|
|
(when (!= sv-260 0.0)
|
|
(set! (-> *progress-state* missions-total-spacing) 0.0)
|
|
(dotimes (s4-1 sv-24)
|
|
(let* ((s3-1 (-> *game-info* mission-list s4-1))
|
|
(a1-19
|
|
(if (and (logtest? (-> s3-1 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s3-1 task)))
|
|
(-> *game-info* play-list (-> s3-1 task) text-name)
|
|
(-> s3-1 description)
|
|
)
|
|
)
|
|
(s3-2 (lookup-text! *common-text* a1-19 #f))
|
|
(f30-0 3.0)
|
|
(s2-0 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s3-2)
|
|
(set! (-> *progress-state* missions-total-spacing)
|
|
(+ f30-0 (s2-0 *temp-string* arg1 #t 44 (bucket-id progress)) (-> *progress-state* missions-total-spacing))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! sv-56 (- sv-56 (the int (-> *progress-state* missions-total-spacing))))
|
|
(cond
|
|
((< (-> arg0 sliding-height) 0.0)
|
|
(let* ((s4-2 (-> *game-info* mission-list sv-24))
|
|
(a1-23
|
|
(if (and (logtest? (-> s4-2 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-2 task)))
|
|
(-> *game-info* play-list (-> s4-2 task) text-name)
|
|
(-> s4-2 description)
|
|
)
|
|
)
|
|
(s4-3 (lookup-text! *common-text* a1-23 #f))
|
|
)
|
|
0.0
|
|
(let ((f30-1 3.0)
|
|
(s3-3 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s4-3)
|
|
(let ((f0-36 (+ f30-1 (s3-3 *temp-string* arg1 #t 44 (bucket-id progress)))))
|
|
(set! sv-260 (* (-> arg0 sliding-height) f0-36))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let* ((s4-4 (-> *game-info* mission-list (+ sv-24 -1)))
|
|
(a1-27
|
|
(if (and (logtest? (-> s4-4 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-4 task)))
|
|
(-> *game-info* play-list (-> s4-4 task) text-name)
|
|
(-> s4-4 description)
|
|
)
|
|
)
|
|
(s4-5 (lookup-text! *common-text* a1-27 #f))
|
|
)
|
|
0.0
|
|
(let ((f30-2 3.0)
|
|
(s3-4 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s4-5)
|
|
(let ((f0-40 (+ f30-2 (s3-4 *temp-string* arg1 #t 44 (bucket-id progress)))))
|
|
(set! sv-260 (* (-> arg0 sliding-height) f0-40))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin y) (the float (+ sv-56 (the int sv-260))))
|
|
(while (and (< sv-20 sv-48) (< sv-20 (+ sv-24 10)))
|
|
(let* ((s4-6 (-> *game-info* mission-list sv-20))
|
|
(s3-5
|
|
(if (and (logtest? (-> s4-6 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-6 task)))
|
|
(-> *game-info* play-list (-> s4-6 task) text-name)
|
|
(-> s4-6 description)
|
|
)
|
|
)
|
|
(s5-1 (lookup-text! *common-text* s3-5 #f))
|
|
)
|
|
0.0
|
|
(set! f0-50
|
|
(cond
|
|
((>= sv-20 (+ sv-24 -1))
|
|
(when (and (!= s3-5 381) (!= s3-5 380))
|
|
(let ((s3-6 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text!
|
|
*common-text*
|
|
(if (logtest? (-> s4-6 flags) (game-task-node-flag closed))
|
|
(text-id progress-missions-icon-completed)
|
|
(text-id progress-missions-icon-todo)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
(s3-6 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(+! (-> arg1 origin x) 20.0)
|
|
(let ((f30-3 3.0)
|
|
(s4-7 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s5-1)
|
|
(set! f0-50 (+ f30-3 (s4-7 *temp-string* arg1 #f 44 (bucket-id progress))))
|
|
)
|
|
(+! (-> arg1 origin x) -20.0)
|
|
f0-50
|
|
)
|
|
(else
|
|
(let ((f30-4 3.0)
|
|
(s4-8 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s5-1)
|
|
(+ f30-4 (s4-8 *temp-string* arg1 #t 44 (bucket-id progress)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-142 (+ sv-56 (the int f0-50))))
|
|
(set! sv-56 v1-142)
|
|
(set! (-> arg1 origin y) (the float (+ v1-142 (the int sv-260))))
|
|
)
|
|
(set! sv-20 (+ sv-20 1))
|
|
)
|
|
(if (zero? (-> *progress-state* total-num-tasks))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-missions-none) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
(end-scissor-missions sv-276 1.0)
|
|
(draw-missions-up-down arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
;; 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)
|
|
(+! (-> arg2 origin x) -25.0)
|
|
)
|
|
(('aspect16x9)
|
|
(+! (-> arg2 origin x) -10.0)
|
|
)
|
|
)
|
|
(when (text-language? german) ;; og:preserve-this text-language patch
|
|
(let ((v1-19 arg2))
|
|
(set! (-> v1-19 scale) 0.43)
|
|
)
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-secrets-go-to-title-screen) #f)
|
|
arg2
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((and (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag)))
|
|
(set! (-> arg1 selected-option) #f)
|
|
(logclear! (-> *game-info* secrets) (-> arg0 flag))
|
|
)
|
|
((and (= (-> arg0 can-toggle) #t) (not (logtest? (-> *game-info* secrets) (-> arg0 flag))))
|
|
(logior! (-> *game-info* secrets) (-> arg0 flag))
|
|
(set! (-> arg1 selected-option) #f)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let ((s3-1 arg2))
|
|
(set! (-> s3-1 color) (if (= arg3 1)
|
|
(the-as font-color (the-as int (progress-selected 0)))
|
|
(font-color progress)
|
|
)
|
|
)
|
|
)
|
|
(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 (bucket-id progress))
|
|
)
|
|
)
|
|
(else
|
|
(let ((s3-4 print-game-text))
|
|
(format (clear *temp-string*) "????????")
|
|
(s3-4 *temp-string* arg2 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg2 origin x) 360.0)
|
|
(let ((a0-35 arg2))
|
|
(set! (-> a0-35 color) (font-color progress))
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and (not s4-0) (not (logtest? (-> *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 (bucket-id progress))
|
|
)
|
|
)
|
|
((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* (text-id progress-on) #f))
|
|
(s5-2 *temp-string* arg2 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
((and (not s4-0) (= (-> arg0 can-toggle) #t) (not (logtest? (-> *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* (text-id progress-off) #f))
|
|
(s5-4 *temp-string* arg2 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
((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* (text-id progress-secrets-unlocked) #f))
|
|
(s5-6 *temp-string* arg2 #f 44 (bucket-id progress))
|
|
)
|
|
(let ((v0-32 arg2))
|
|
(set! (-> v0-32 flags) (font-flags kerning large))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(min-item int)
|
|
(max-item int)
|
|
(sv-108 float)
|
|
(item int)
|
|
(prev int)
|
|
(sv-120 hud-box)
|
|
(sv-128 int)
|
|
)
|
|
(set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(set! sv-20 (logtest? (-> *game-info* secrets) (game-secrets hero-mode)))
|
|
(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! min-item (if (not sv-20)
|
|
0
|
|
(-> this num-items)
|
|
)
|
|
)
|
|
(set! max-item (if (not sv-20)
|
|
(-> this num-items)
|
|
(+ (-> this num-items) (-> this num-hero-items))
|
|
)
|
|
)
|
|
(set! sv-108 (* (-> sv-48 sliding) sv-36))
|
|
(set! item (-> this item-index))
|
|
(set! prev (-> this prev-item-index))
|
|
(set! sv-120 (new 'stack-no-clear 'hud-box))
|
|
(set! sv-128 205)
|
|
(if (< sv-16 0.0)
|
|
(set! sv-16 (the-as float 0.0))
|
|
)
|
|
(cond
|
|
((or (not (-> *bigmap* progress-minimap)) (< (-> this item-index) min-item) (< max-item (-> this item-index)))
|
|
(draw-busy-loading arg1)
|
|
)
|
|
(else
|
|
(#when PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(*! sv-32 (-> *pc-settings* aspect-ratio-reciprocal))))
|
|
(set! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93)))
|
|
(set! (-> this sprites 0 flags) (the-as uint 4))
|
|
(set! (-> this sprites 0 scale-x) 0.64)
|
|
(set! (-> this sprites 0 scale-y) 0.64)
|
|
(let ((v1-32 (-> this sprites 0 color2)))
|
|
(set! (-> v1-32 0) 128)
|
|
(set! (-> v1-32 1) 128)
|
|
(set! (-> v1-32 2) 128)
|
|
(set! (-> v1-32 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> this sprites 0 pos z) #xffffff)
|
|
(set! (-> this sprites 0 pos w) 0)
|
|
(#cond
|
|
(PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set-hud-piece-position! (-> this sprites 0) (adjust-game-x 100.0) 128)
|
|
(set-hud-piece-position! (-> this sprites 0) 100 128)))
|
|
(#t
|
|
(set-hud-piece-position! (-> this sprites 0) 100 128))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> this sprites 0) s3-0 (-> *level* default-level))
|
|
)
|
|
(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 progress))
|
|
)
|
|
(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)
|
|
(#when PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))))
|
|
(draw-decoration-secrets this arg1 sv-16 (text-id progress-root-secrets))
|
|
(let ((v1-58 arg1))
|
|
(set! (-> v1-58 scale) 0.45)
|
|
)
|
|
(when (text-language? japanese korean) ;; og:preserve-this text-language patch
|
|
(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 185))
|
|
)
|
|
(set! (-> arg1 origin y) 133.0)
|
|
)
|
|
(('aspect16x9)
|
|
(let ((v1-72 arg1))
|
|
(set! (-> v1-72 height) (the float 185))
|
|
)
|
|
(set! (-> arg1 origin y) 133.0)
|
|
)
|
|
)
|
|
(let ((a0-34 arg1))
|
|
(set! (-> a0-34 flags) (font-flags kerning large))
|
|
)
|
|
(set! (-> arg1 origin x) 100.0)
|
|
(#when PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))))
|
|
(let ((s4-1 print-game-text))
|
|
(format
|
|
(clear *temp-string*)
|
|
"x~D ~S"
|
|
sv-24
|
|
(lookup-text! *common-text* (text-id progress-secrets-orb-label) #f)
|
|
)
|
|
(s4-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(set! (-> arg1 origin x) 100.0)
|
|
(#when PC_PORT
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))))
|
|
(begin-scissor-secret sv-120 sv-48)
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! sv-128 195)
|
|
)
|
|
)
|
|
(cond
|
|
(sv-40
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128)))
|
|
(draw-secret-list (-> this secret-items item) sv-48 arg1 1 sv-40 sv-108)
|
|
)
|
|
((>= (- item prev) 0)
|
|
(when (>= (+ item -3) min-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) -50 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item -3)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(when (>= (+ item -2) min-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) -25 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item -2)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(set! (-> arg1 origin y) (the float (+ sv-128 (the int sv-108))))
|
|
(when (>= (+ item -1) min-item)
|
|
(draw-highlight (+ sv-128 22) 22 sv-16)
|
|
(draw-secret-list (-> this secret-items (+ item -1)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 25 sv-128)))
|
|
;; og:preserve-this added check so we don't double-draw the highlight
|
|
(when (< (+ item -1) min-item)
|
|
(draw-highlight (+ sv-128 22) 22 sv-16))
|
|
(draw-secret-list (-> this secret-items item) sv-48 arg1 1 sv-40 sv-108)
|
|
(when (< (+ item 1) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 50 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 1)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(when (< (+ item 2) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 75 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 2)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(when (< (+ item 3) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 100 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 3)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
)
|
|
(else
|
|
(when (>= (+ item -2) min-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) -25 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item -2)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(set! (-> arg1 origin y) (the float (+ sv-128 (the int sv-108))))
|
|
(if (>= (+ item -1) min-item)
|
|
(draw-secret-list (-> this secret-items (+ item -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 (-> this secret-items item) sv-48 arg1 1 sv-40 sv-108)
|
|
(when (< (+ item 1) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 50 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 1)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(when (< (+ item 2) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 75 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 2)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(when (< (+ item 3) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 100 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 3)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
(when (< (+ item 4) max-item)
|
|
(set! (-> arg1 origin y) (the float (+ (the int sv-108) 125 sv-128)))
|
|
(draw-secret-list (-> this secret-items (+ item 4)) sv-48 arg1 0 sv-40 sv-108)
|
|
)
|
|
)
|
|
)
|
|
(end-scissor-secret sv-120 1.0)
|
|
(draw-up-down arg1)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(deftype print-highscore-obj (basic)
|
|
((self menu-highscores-option)
|
|
(index int32)
|
|
(previous symbol) ; guess
|
|
(place int32)
|
|
(score float)
|
|
(game-score symbol)
|
|
(context font-context)
|
|
(local-scale float)
|
|
(interp float)
|
|
)
|
|
:method-count-assert 9
|
|
:size-assert #x28
|
|
:flag-assert #x900000028
|
|
)
|
|
|
|
|
|
(defun draw-highscore-icon ((arg0 menu-highscores-option) (arg1 texture-id) (arg2 int) (arg3 int) (arg4 float))
|
|
(set! (-> arg0 sprites 0 tex) (lookup-texture-by-id arg1))
|
|
(set! (-> arg0 sprites 0 scale-x) arg4)
|
|
(set! (-> arg0 sprites 0 scale-y) arg4)
|
|
(set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3)
|
|
(with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> arg0 sprites)) s4-1 (-> *level* default-level))
|
|
)
|
|
)
|
|
|
|
(defun draw-highscore-cup ((arg0 menu-highscores-option) (arg1 int) (arg2 int) (arg3 int) (arg4 float) (arg5 float))
|
|
"First int is an enum"
|
|
(let ((a0-1 (the-as uint #xc9300300)))
|
|
(case arg1
|
|
((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 sprites 0 flags) (the-as uint 4))
|
|
(let ((v1-10 (-> arg0 sprites 0 color2)))
|
|
(set! (-> v1-10 0) 128)
|
|
(set! (-> v1-10 1) 128)
|
|
(set! (-> v1-10 2) 128)
|
|
(set! (-> v1-10 3) (the int (* 128.0 arg5)))
|
|
)
|
|
(set! (-> arg0 sprites 0 pos z) #xffffff)
|
|
(set! (-> arg0 sprites 0 pos w) 0)
|
|
(set! (-> arg0 sprites 0 tex) (lookup-texture-by-id (the-as texture-id a0-1)))
|
|
(set! (-> arg0 sprites 0 scale-x) arg4)
|
|
(set! (-> arg0 sprites 0 scale-y) arg4)
|
|
(set-hud-piece-position! (the-as hud-sprite (-> arg0 sprites)) arg2 arg3)
|
|
(with-dma-buffer-add-bucket ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> arg0 sprites)) s4-1 (-> *level* default-level))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-score ((highscore-index int))
|
|
(let ((score-array-index 11))
|
|
(let ((index highscore-index))
|
|
(cond
|
|
((zero? index)
|
|
(set! score-array-index 4)
|
|
)
|
|
((= index 1)
|
|
(set! score-array-index 5)
|
|
)
|
|
((= index 2)
|
|
(set! score-array-index 6)
|
|
)
|
|
((= index 3)
|
|
(set! score-array-index 7)
|
|
)
|
|
((= index 4)
|
|
(set! score-array-index 10)
|
|
)
|
|
((= index 5)
|
|
(set! score-array-index 13)
|
|
)
|
|
((= index 6)
|
|
(set! score-array-index 12)
|
|
)
|
|
((= index 7)
|
|
(set! score-array-index 11)
|
|
)
|
|
((= index 8)
|
|
(set! score-array-index 14)
|
|
)
|
|
((= index 9)
|
|
(set! score-array-index 15)
|
|
)
|
|
((= index 10)
|
|
(set! score-array-index 18)
|
|
)
|
|
((= index 11)
|
|
(set! score-array-index 17)
|
|
)
|
|
((= index 12)
|
|
(set! score-array-index 16)
|
|
)
|
|
((= index 13)
|
|
(set! score-array-index 8)
|
|
)
|
|
((= index 14)
|
|
(set! score-array-index 9)
|
|
)
|
|
)
|
|
)
|
|
score-array-index
|
|
)
|
|
)
|
|
|
|
(defun eval-highscore ((print-highscore-info print-highscore-obj))
|
|
(get-rank
|
|
(-> *highscore-info-array* (get-highscore-score (-> print-highscore-info index)))
|
|
(-> print-highscore-info score)
|
|
)
|
|
)
|
|
|
|
(defun str-print-time ((time float))
|
|
0
|
|
0
|
|
0
|
|
(let* ((minutes (the int (* 0.016666668 time)))
|
|
(remainder-minutes (- time (* 60.0 (the float minutes))))
|
|
(seconds (the int remainder-minutes))
|
|
(remainder-seconds (- remainder-minutes (the float seconds)))
|
|
(milliseconds (the int (* 1000.0 remainder-seconds)))
|
|
)
|
|
(format (clear *temp-string*) "~d:~2,'0,d:~3,'0,d" minutes seconds milliseconds)
|
|
)
|
|
*temp-string*
|
|
)
|
|
|
|
(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* (text-id progress-highscores-1st) #f))
|
|
(gp-1 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(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)
|
|
)
|
|
(+! (-> sv-16 origin y) 23.0)
|
|
(let ((gp-3 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-2nd) #f))
|
|
(gp-3 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(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)
|
|
)
|
|
(+! (-> sv-16 origin y) 20.0)
|
|
(let ((gp-5 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-3rd) #f))
|
|
(gp-5 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(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)
|
|
)
|
|
(+! (-> sv-16 origin y) 15.0)
|
|
(let ((gp-7 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-4th) #f))
|
|
(gp-7 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(eval-highscore sv-40)
|
|
(+ (the int sv-20) 109)
|
|
232
|
|
0.15
|
|
(-> sv-40 local-scale)
|
|
)
|
|
)
|
|
)
|
|
((= v1-8 4)
|
|
(+! (-> sv-16 origin y) 12.0)
|
|
(let ((gp-9 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-5th) #f))
|
|
(gp-9 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(eval-highscore sv-40)
|
|
(+ (the int sv-20) 109)
|
|
244
|
|
0.15
|
|
(-> sv-40 local-scale)
|
|
)
|
|
)
|
|
)
|
|
((= v1-8 5)
|
|
(+! (-> sv-16 origin y) 12.0)
|
|
(let ((gp-11 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-6th) #f))
|
|
(gp-11 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(eval-highscore sv-40)
|
|
(+ (the int sv-20) 109)
|
|
256
|
|
0.15
|
|
(-> sv-40 local-scale)
|
|
)
|
|
)
|
|
)
|
|
((= v1-8 6)
|
|
(+! (-> sv-16 origin y) 12.0)
|
|
(let ((gp-13 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-7th) #f))
|
|
(gp-13 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(eval-highscore sv-40)
|
|
(+ (the int sv-20) 109)
|
|
268
|
|
0.15
|
|
(-> sv-40 local-scale)
|
|
)
|
|
)
|
|
)
|
|
((= v1-8 7)
|
|
(+! (-> sv-16 origin y) 12.0)
|
|
(let ((gp-15 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (text-id progress-highscores-8th) #f))
|
|
(gp-15 *temp-string* sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(if (not (-> sv-40 previous))
|
|
(draw-highscore-cup
|
|
(-> sv-40 self)
|
|
(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)
|
|
(print-game-text (string-format "~D" (the int (-> sv-40 score))) sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(else
|
|
(print-game-text (str-print-time (-> sv-40 score)) sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(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))))
|
|
)
|
|
|
|
(defun get-highscore-text ((highscore-index int))
|
|
(let ((text-id 319))
|
|
(let ((index highscore-index))
|
|
(cond
|
|
((zero? index)
|
|
(set! text-id 323)
|
|
)
|
|
((= index 1)
|
|
(set! text-id 323)
|
|
)
|
|
((= index 2)
|
|
(set! text-id 323)
|
|
)
|
|
((= index 3)
|
|
(set! text-id 323)
|
|
)
|
|
((= index 4)
|
|
(set! text-id 330)
|
|
)
|
|
((= index 5)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 6)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 7)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 8)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 9)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 10)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 11)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 12)
|
|
(set! text-id 319)
|
|
)
|
|
((= index 13)
|
|
(set! text-id 328)
|
|
)
|
|
((= index 14)
|
|
(set! text-id 329)
|
|
)
|
|
)
|
|
)
|
|
(the-as text-id text-id)
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-text-sub ((highscore-index int))
|
|
(let ((id 320))
|
|
(let ((index highscore-index))
|
|
(cond
|
|
((zero? index)
|
|
(set! id 324)
|
|
)
|
|
((= index 1)
|
|
(set! id 325)
|
|
)
|
|
((= index 2)
|
|
(set! id 326)
|
|
)
|
|
((= index 3)
|
|
(set! id 327)
|
|
)
|
|
((= index 4)
|
|
(set! id 333)
|
|
)
|
|
((= index 5)
|
|
(set! id 322)
|
|
)
|
|
((= index 6)
|
|
(set! id 321)
|
|
)
|
|
((= index 7)
|
|
(set! id 320)
|
|
)
|
|
((= index 8)
|
|
(set! id 337)
|
|
)
|
|
((= index 9)
|
|
(set! id 338)
|
|
)
|
|
((= index 10)
|
|
(set! id 336)
|
|
)
|
|
((= index 11)
|
|
(set! id 335)
|
|
)
|
|
((= index 12)
|
|
(set! id 334)
|
|
)
|
|
((= index 13)
|
|
(set! id 331)
|
|
)
|
|
((= index 14)
|
|
(set! id 332)
|
|
)
|
|
)
|
|
)
|
|
(the-as text-id id)
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-icon ((highscore-index-arg int))
|
|
(let ((texture (new 'static 'texture-id :index #x10 :page #xc93)))
|
|
(let ((highscore-index highscore-index-arg))
|
|
(cond
|
|
((zero? highscore-index)
|
|
(set! texture (new 'static 'texture-id :index #x10 :page #xc93))
|
|
)
|
|
((= highscore-index 1)
|
|
(set! texture (new 'static 'texture-id :index #x12 :page #xc93))
|
|
)
|
|
((= highscore-index 2)
|
|
(set! texture (new 'static 'texture-id :index #x13 :page #xc93))
|
|
)
|
|
((= highscore-index 3)
|
|
(set! texture (new 'static 'texture-id :index #x11 :page #xc93))
|
|
)
|
|
((= highscore-index 4)
|
|
(set! texture (new 'static 'texture-id :index #xe :page #xc93))
|
|
)
|
|
((= highscore-index 5)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 6)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 7)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 8)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 9)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 10)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 11)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 12)
|
|
(set! texture (new 'static 'texture-id :index #x1 :page #xc93))
|
|
)
|
|
((= highscore-index 13)
|
|
(set! texture (new 'static 'texture-id :index #x16 :page #xc93))
|
|
)
|
|
((= highscore-index 14)
|
|
(set! texture (new 'static 'texture-id :index #x17 :page #xc93))
|
|
)
|
|
)
|
|
)
|
|
(the-as texture-id texture)
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-type ((highscore-index-arg int))
|
|
"Given a highscore index, return it's type as a symbol
|
|
@param highscore-index-arg something
|
|
@returns The type, as as symbol. Either `'game` or `'race`"
|
|
(let ((highscore-type 'game))
|
|
(let ((highscore-index highscore-index-arg))
|
|
(cond
|
|
((zero? highscore-index)
|
|
(set! highscore-type 'game)
|
|
)
|
|
((= highscore-index 5)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 6)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 7)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 8)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 9)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 10)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 11)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 12)
|
|
(set! highscore-type 'race)
|
|
)
|
|
((= highscore-index 13)
|
|
(set! highscore-type 'game)
|
|
)
|
|
)
|
|
)
|
|
highscore-type
|
|
)
|
|
)
|
|
|
|
(defun highscore-available? ((highscore-index int))
|
|
(let ((available? #f))
|
|
(let ((index highscore-index))
|
|
(cond
|
|
((zero? index)
|
|
(set! available? #t)
|
|
)
|
|
((= index 1)
|
|
(set! available?
|
|
(logtest? (-> *game-info* sub-task-list (game-task-node city-yellow-gun-training-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
((= index 2)
|
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets gungame-blue)))
|
|
)
|
|
((= index 3)
|
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets gungame-dark)))
|
|
)
|
|
((= index 4)
|
|
(set! available? (logtest? (-> *game-info* sub-task-list (game-task-node stadium-board1-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
((= index 5)
|
|
(set! available?
|
|
(logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class3-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
((= index 6)
|
|
(set! available?
|
|
(logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class2-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
((= index 7)
|
|
(set! available?
|
|
(logtest? (-> *game-info* sub-task-list (game-task-node stadium-race-class1-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
((= index 8)
|
|
(set! available?
|
|
(or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-port-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
(open? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-port-introduction)))
|
|
)
|
|
)
|
|
)
|
|
((= index 9)
|
|
(set! available?
|
|
(or (logtest? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-errol-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
(open? (-> *game-info* sub-task-list (game-task-node city-burning-bush-race-errol-introduction)))
|
|
)
|
|
)
|
|
)
|
|
((= index 10)
|
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
|
)
|
|
((= index 11)
|
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
|
)
|
|
((= index 12)
|
|
(set! available? (logtest? (-> *game-info* secrets) (game-secrets reverse-races)))
|
|
)
|
|
((= index 13)
|
|
(set! available?
|
|
(logtest? (-> *game-info* sub-task-list (game-task-node city-play-onin-game-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
((= index 14)
|
|
(set! available? (logtest? (-> *game-info* sub-task-list (game-task-node city-whack-introduction) flags)
|
|
(game-task-node-flag closed)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
available?
|
|
)
|
|
)
|
|
|
|
(defun get-num-highscores ()
|
|
(let ((count 0))
|
|
(dotimes (max-highscores 15)
|
|
(if (highscore-available? max-highscores)
|
|
(+! count 1)
|
|
)
|
|
)
|
|
count
|
|
)
|
|
)
|
|
|
|
(defun get-next-highscore ((current-highscore-index int))
|
|
(let ((max-highscores 15)
|
|
(index-change 1)
|
|
(selected-index -1)
|
|
)
|
|
(+ current-highscore-index index-change)
|
|
(while (and (= selected-index -1) (< index-change max-highscores))
|
|
(let ((s2-0 (+ current-highscore-index index-change)))
|
|
(+! index-change 1)
|
|
(if (highscore-available? (mod s2-0 max-highscores))
|
|
(set! selected-index (mod s2-0 max-highscores))
|
|
)
|
|
)
|
|
)
|
|
(if (= selected-index -1)
|
|
(set! selected-index current-highscore-index)
|
|
)
|
|
selected-index
|
|
)
|
|
)
|
|
|
|
(defun get-prev-highscore ((arg0 int))
|
|
(let ((max-highscores 15)
|
|
(index-change 1)
|
|
(selected-index -1)
|
|
)
|
|
(+ arg0 index-change)
|
|
(while (and (= selected-index -1) (< index-change max-highscores))
|
|
(let ((curr-index (- arg0 index-change)))
|
|
(+! index-change 1)
|
|
(if (< curr-index 0)
|
|
(set! curr-index (+ max-highscores curr-index))
|
|
)
|
|
(let ((highscore-available-fn highscore-available?)
|
|
(normalized-index (abs curr-index))
|
|
)
|
|
(if (highscore-available-fn normalized-index)
|
|
(set! selected-index (abs curr-index))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(if (= selected-index -1)
|
|
(set! selected-index arg0)
|
|
)
|
|
selected-index
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-icon-scale ((highscore-index int))
|
|
(let ((scale (if (= (get-aspect-ratio) 'aspect4x3)
|
|
1.0
|
|
1.0
|
|
)
|
|
)
|
|
)
|
|
(let ((guncourse-scale 0.6)
|
|
(race-scale 0.8)
|
|
)
|
|
(cond
|
|
((zero? highscore-index)
|
|
(set! scale guncourse-scale)
|
|
)
|
|
((= highscore-index 1)
|
|
(set! scale guncourse-scale)
|
|
)
|
|
((= highscore-index 2)
|
|
(set! scale guncourse-scale)
|
|
)
|
|
((= highscore-index 3)
|
|
(set! scale guncourse-scale)
|
|
)
|
|
((= highscore-index 4)
|
|
(set! scale 0.5)
|
|
)
|
|
((= highscore-index 5)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 6)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 7)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 8)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 9)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 10)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 11)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 12)
|
|
(set! scale race-scale)
|
|
)
|
|
((= highscore-index 13)
|
|
(set! scale 0.7)
|
|
)
|
|
((= highscore-index 14)
|
|
(set! scale 0.7)
|
|
)
|
|
)
|
|
)
|
|
scale
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-icon-xoffset ((highscore-index int))
|
|
(if (= (get-aspect-ratio) 'aspect4x3)
|
|
435
|
|
410
|
|
)
|
|
)
|
|
|
|
(defun get-highscore-icon-yoffset ((highscore-index int))
|
|
(let ((offset (if (= (get-aspect-ratio) 'aspect4x3)
|
|
130
|
|
120
|
|
)
|
|
)
|
|
)
|
|
(let ((guncourse-offset 130)
|
|
(race-offset 120)
|
|
)
|
|
(cond
|
|
((zero? highscore-index)
|
|
(set! offset guncourse-offset)
|
|
)
|
|
((= highscore-index 1)
|
|
(set! offset guncourse-offset)
|
|
)
|
|
((= highscore-index 2)
|
|
(set! offset guncourse-offset)
|
|
)
|
|
((= highscore-index 3)
|
|
(set! offset guncourse-offset)
|
|
)
|
|
((= highscore-index 5)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 6)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 7)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 8)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 9)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 10)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 11)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 12)
|
|
(set! offset race-offset)
|
|
)
|
|
((= highscore-index 13)
|
|
(set! offset 125)
|
|
)
|
|
((= highscore-index 14)
|
|
(set! offset 125)
|
|
)
|
|
)
|
|
)
|
|
offset
|
|
)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(sv-96 float)
|
|
(sv-100 float)
|
|
(sv-104 float)
|
|
(sv-108 float)
|
|
(sv-112 hud-box)
|
|
(sv-116 print-highscore-obj)
|
|
(sv-120 float)
|
|
(sv-124 float)
|
|
(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 'hud-box))
|
|
(set! sv-116 (new 'stack 'print-highscore-obj))
|
|
(set! sv-120 (* (-> arg0 sliding) sv-104))
|
|
(set! sv-124 (* (-> arg0 sliding-off) (-> this slide-dir) sv-104))
|
|
(set! sv-128 arg3)
|
|
(set! sv-132 arg2)
|
|
(set! sv-136 arg0)
|
|
(set! sv-140 arg1)
|
|
(set! sv-144 this)
|
|
(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 progress))
|
|
)
|
|
(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)
|
|
(let ((v1-33 (-> sv-144 sprites 0 color2)))
|
|
(set! (-> v1-33 0) 128)
|
|
(set! (-> v1-33 1) 128)
|
|
(set! (-> v1-33 2) 128)
|
|
(set! (-> v1-33 3) (the int (* 128.0 sv-96)))
|
|
)
|
|
(set! (-> sv-144 sprites 0 pos z) #xfffff0)
|
|
(set! (-> sv-144 sprites 0 pos w) 0)
|
|
(if (text-language? spanish) ;; og:preserve-this text-language patch
|
|
(draw-decoration sv-144 sv-140 sv-96 (text-id progress-root-highscores) #t 0.8)
|
|
(draw-decoration sv-144 sv-140 sv-96 (text-id progress-root-highscores) #t 0.95)
|
|
)
|
|
(let ((v1-39 sv-140))
|
|
(set! (-> v1-39 scale) 0.6)
|
|
)
|
|
(let ((v1-40 sv-140))
|
|
(set! (-> v1-40 height) 185.0)
|
|
)
|
|
(+! (-> sv-140 origin y) 46.0)
|
|
(set! (-> sv-140 origin x) 65.0)
|
|
(let ((v1-46 sv-140))
|
|
(set! (-> v1-46 width) (the float 367))
|
|
)
|
|
(let ((a0-23 sv-140))
|
|
(set! (-> a0-23 flags) (font-flags kerning large))
|
|
)
|
|
(let ((a0-24 sv-140))
|
|
(set! (-> a0-24 color) (font-color progress-force-selected))
|
|
)
|
|
(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 (text-language? german) ;; og:preserve-this text-language patch
|
|
(let ((v1-56 sv-140))
|
|
(set! (-> v1-56 scale) 0.69)
|
|
)
|
|
)
|
|
(when (text-language? french) ;; og:preserve-this text-language patch
|
|
(let ((v1-59 sv-140))
|
|
(set! (-> v1-59 scale) 0.72)
|
|
)
|
|
)
|
|
(when (text-language? spanish) ;; og:preserve-this text-language patch
|
|
(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 (bucket-id progress))
|
|
)
|
|
(+! (-> sv-140 origin y) 25.0)
|
|
(let ((v1-68 sv-140))
|
|
(set! (-> v1-68 scale) 0.6)
|
|
)
|
|
(when (text-language? french spanish) ;; og:preserve-this text-language patch
|
|
(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 (bucket-id progress))
|
|
)
|
|
(set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-120)))
|
|
(+! (-> sv-140 origin y) 25.0)
|
|
(draw-highscore-icon
|
|
sv-144
|
|
(get-highscore-icon (-> sv-144 page-index))
|
|
(the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) 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 progress))
|
|
)
|
|
(+! (-> 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) sv-144)
|
|
(case (get-highscore-type (-> sv-144 page-index))
|
|
(('game)
|
|
(set! (-> sv-116 game-score) #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)
|
|
)
|
|
(+! (-> sv-140 origin y) 46.0)
|
|
(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 progress-force-selected))
|
|
)
|
|
(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 (text-language? german) ;; og:preserve-this text-language patch
|
|
(let ((v1-145 sv-140))
|
|
(set! (-> v1-145 scale) 0.69)
|
|
)
|
|
)
|
|
(when (text-language? french) ;; og:preserve-this text-language patch
|
|
(let ((v1-148 sv-140))
|
|
(set! (-> v1-148 scale) 0.72)
|
|
)
|
|
)
|
|
(when (text-language? spanish) ;; og:preserve-this text-language patch
|
|
(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 (bucket-id progress))
|
|
)
|
|
(+! (-> sv-140 origin y) 25.0)
|
|
(let ((v1-157 sv-140))
|
|
(set! (-> v1-157 scale) 0.6)
|
|
)
|
|
(when (text-language? french spanish) ;; og:preserve-this text-language patch
|
|
(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 (bucket-id progress))
|
|
)
|
|
(set! (-> sv-140 origin x) (- (-> sv-140 origin x) (+ 20.0 sv-124)))
|
|
(+! (-> sv-140 origin y) 25.0)
|
|
(draw-highscore-icon
|
|
sv-144
|
|
(get-highscore-icon (-> sv-144 prev-page-index))
|
|
(the int (+ (the float (get-highscore-icon-xoffset (-> sv-144 page-index))) 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 progress))
|
|
)
|
|
(+! (-> 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) #t)
|
|
(set! (-> sv-116 self) sv-144)
|
|
(case (get-highscore-type (-> sv-144 prev-page-index))
|
|
(('game)
|
|
(set! (-> sv-116 game-score) #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)
|
|
)
|
|
(end-scissor sv-112 1.0)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
)
|
|
(+! (-> arg1 origin y) 15.0)
|
|
(let ((s3-0 (-> *progress-state* game-options-vibrations)))
|
|
(cond
|
|
((and (zero? (-> *progress-state* game-options-item-selected)) (-> *progress-state* game-options-item-picked))
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-2 arg1))
|
|
(set! (-> a0-2 color) (font-color progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
(s3-0
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-10 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-10 *temp-string*)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(cond
|
|
((zero? (-> *progress-state* game-options-item-selected))
|
|
(let ((s2-3 arg1))
|
|
(set! (-> s2-3 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 progress))
|
|
)
|
|
)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
(s3-0
|
|
(format
|
|
(clear *temp-string*)
|
|
"~1L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-10 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~1L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-10 *temp-string*)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(print-menu-text a0-10 (-> this scale) arg1 arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
)
|
|
(+! (-> arg1 origin y) 22.0)
|
|
(let ((s3-0 (-> *progress-state* game-options-subtitles)))
|
|
(cond
|
|
((and (= (-> *progress-state* game-options-item-selected) 1) (-> *progress-state* game-options-item-picked))
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 color) (font-color progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -1.0 (-> arg1 origin y))) 41 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
(s3-0
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(cond
|
|
((= (-> *progress-state* game-options-item-selected) 1)
|
|
(let ((s2-3 arg1))
|
|
(set! (-> s2-3 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 progress))
|
|
)
|
|
)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
(s3-0
|
|
(format
|
|
(clear *temp-string*)
|
|
"~1L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~1L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(print-menu-text a0-11 (-> this scale) arg1 arg0)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(+! (-> arg1 origin y) 20.0)
|
|
)
|
|
((3)
|
|
(+! (-> arg1 origin y) 32.0)
|
|
)
|
|
)
|
|
(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 progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (-> arg1 origin y)) 44 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 24.0)
|
|
(-> this language-selection)
|
|
(let ((s4-1 (-> s4-0 0)))
|
|
7
|
|
(if (-> this language-transition)
|
|
(seekl! (-> this language-x-offset) 150 (the int (* 10.0 (-> pp clock time-adjust-ratio))))
|
|
)
|
|
(when (>= (-> this language-x-offset) 75)
|
|
(set! (-> this language-selection) (the-as uint s4-1))
|
|
(set! (-> this language-transition) #f)
|
|
(set! (-> this language-x-offset) 0)
|
|
0
|
|
)
|
|
)
|
|
(let ((a0-12 arg1))
|
|
(set! (-> a0-12 color) (font-color progress))
|
|
)
|
|
(let ((v1-33 arg1))
|
|
(set! (-> v1-33 scale) 0.5)
|
|
)
|
|
(let ((a0-14 arg1))
|
|
(set! (-> a0-14 color) (font-color progress))
|
|
)
|
|
(+! (-> arg1 origin x) -70.0)
|
|
(let ((s5-1 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 163)
|
|
(s5-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin x) 70.0)
|
|
(+! (-> arg1 origin x) 70.0)
|
|
(let ((s5-2 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 161)
|
|
(s5-2 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin x) -70.0)
|
|
(let ((s5-3 arg1))
|
|
(set! (-> s5-3 color) (progress-selected 0))
|
|
)
|
|
(let ((v1-43 (if (and (= (scf-get-territory) GAME_TERRITORY_SCEE) (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
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(cond
|
|
((= (-> *progress-state* game-options-item-selected) 2)
|
|
(let ((s4-4 arg1))
|
|
(set! (-> s4-4 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 progress))
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-52 arg1))
|
|
(set! (-> v1-52 scale) 0.65)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(let ((v1-54 arg1))
|
|
(set! (-> v1-54 scale) 0.5)
|
|
)
|
|
(let ((a0-36 arg1))
|
|
(set! (-> a0-36 color) (font-color progress))
|
|
)
|
|
(+! (-> arg1 origin y) 24.0)
|
|
(let ((a0-37 arg1))
|
|
(set! (-> a0-37 flags) (font-flags kerning middle large))
|
|
)
|
|
(let ((v1-61 (if (and (= (scf-get-territory) GAME_TERRITORY_SCEE) (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
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-language-game-option)
|
|
(progress progress)
|
|
(font-ctx font-context)
|
|
(option-index int)
|
|
(selected symbol)
|
|
)
|
|
(with-pp
|
|
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition)))))
|
|
(let ((font-ctx-1 font-ctx))
|
|
(set! (-> font-ctx-1 scale) 0.65)
|
|
)
|
|
(case option-index
|
|
((2)
|
|
(+! (-> font-ctx origin y) 20.0)
|
|
)
|
|
((3)
|
|
(+! (-> font-ctx origin y) 32.0)
|
|
)
|
|
)
|
|
(if (< alpha 0.0)
|
|
(set! alpha 0.0)
|
|
)
|
|
(set! (-> font-ctx alpha) alpha)
|
|
(let ((font-ctx-2 font-ctx))
|
|
(set! (-> font-ctx-2 flags) (font-flags kerning middle large))
|
|
)
|
|
(let ((curr-language-ptr (&-> *setting-control* user-default language)))
|
|
(cond
|
|
((and (= (-> *progress-state* game-options-item-selected) 3) (-> *progress-state* game-options-item-picked))
|
|
(let ((font-ctx-3 font-ctx))
|
|
(set! (-> font-ctx-3 color) (font-color progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (-> font-ctx origin y)) 44 alpha)
|
|
(let ((print-game-text-fn-1 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f))
|
|
(print-game-text-fn-1 *temp-string* font-ctx #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> font-ctx origin y) 24.0)
|
|
(-> this language-selection)
|
|
(let ((curr-language (-> curr-language-ptr 0)))
|
|
7
|
|
(if (-> this language-transition)
|
|
(seekl! (-> this language-x-offset) 150 (the int (* 10.0 (-> pp clock time-adjust-ratio))))
|
|
)
|
|
(when (>= (-> this language-x-offset) 75)
|
|
(set! (-> this language-selection) (the-as uint curr-language))
|
|
(set! (-> this language-transition) #f)
|
|
(set! (-> this language-x-offset) 0)
|
|
0
|
|
)
|
|
)
|
|
(let ((font-ctx-4 font-ctx))
|
|
(set! (-> font-ctx-4 color) (font-color progress))
|
|
)
|
|
(let ((font-ctx-5 font-ctx))
|
|
(set! (-> font-ctx-5 scale) 0.5)
|
|
)
|
|
(let ((font-ctx-6 font-ctx))
|
|
(set! (-> font-ctx-6 color) (font-color progress))
|
|
)
|
|
(+! (-> font-ctx origin x) -70.0)
|
|
(let ((print-game-text-fn-2 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 163)
|
|
(print-game-text-fn-2 *temp-string* font-ctx #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> font-ctx origin x) 70.0)
|
|
(+! (-> font-ctx origin x) 70.0)
|
|
(let ((print-game-text-fn-3 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 161)
|
|
(print-game-text-fn-3 *temp-string* font-ctx #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> font-ctx origin x) -70.0)
|
|
(let ((font-ctx-7 font-ctx))
|
|
(set! (-> font-ctx-7 color) (progress-selected 0))
|
|
)
|
|
(let ((language-name-idx
|
|
(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* language-name-idx) #f)
|
|
font-ctx
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(cond
|
|
((= (-> *progress-state* game-options-item-selected) 3)
|
|
(let ((font-ctx-8 font-ctx))
|
|
(set! (-> font-ctx-8 color) (progress-selected 0))
|
|
)
|
|
(draw-highlight (the int (-> font-ctx origin y)) 24 alpha)
|
|
)
|
|
(else
|
|
(let ((font-ctx-9 font-ctx))
|
|
(set! (-> font-ctx-9 color) (font-color progress))
|
|
)
|
|
)
|
|
)
|
|
(let ((font-ctx-10 font-ctx))
|
|
(set! (-> font-ctx-10 scale) 0.65)
|
|
)
|
|
(let ((print-game-text-fn-4 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> this name) #f))
|
|
(print-game-text-fn-4 *temp-string* font-ctx #f 44 (bucket-id progress))
|
|
)
|
|
(let ((font-ctx-11 font-ctx))
|
|
(set! (-> font-ctx-11 scale) 0.5)
|
|
)
|
|
(let ((font-ctx-12 font-ctx))
|
|
(set! (-> font-ctx-12 color) (font-color progress))
|
|
)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~S"
|
|
(lookup-text! *common-text* (-> *language-name-remap* (-> curr-language-ptr 0)) #f)
|
|
)
|
|
*temp-string*
|
|
(+! (-> font-ctx origin y) 24.0)
|
|
(let ((font-ctx-13 font-ctx))
|
|
(set! (-> font-ctx-13 flags) (font-flags kerning middle large))
|
|
)
|
|
(let ((language-name-idx-2
|
|
(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* language-name-idx-2) #f)
|
|
font-ctx
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 (text-language? spanish) ;; og:preserve-this text-language patch
|
|
(draw-decoration this arg1 f0-1 (text-id progress-root-game-options) #f 0.85)
|
|
(draw-decoration this arg1 f0-1 (text-id progress-root-game-options) #f 0.95)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(+! (-> arg1 origin y) 20.0)
|
|
(let ((s3-0 (-> *progress-state* graphic-options-aspect-ratio)))
|
|
(cond
|
|
((and (= (-> *progress-state* graphic-options-item-selected) 1)
|
|
(-> *progress-state* graphic-options-item-picked)
|
|
)
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-4 arg1))
|
|
(set! (-> a0-4 color) (font-color progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 23.0)
|
|
(cond
|
|
((= s3-0 'aspect4x3)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-aspect-4x3) #f)
|
|
(lookup-text! *common-text* (text-id progress-aspect-16x9) #f)
|
|
)
|
|
(set! a0-12 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-aspect-4x3) #f)
|
|
(lookup-text! *common-text* (text-id progress-aspect-16x9) #f)
|
|
)
|
|
(set! a0-12 *temp-string*)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(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) (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 progress))
|
|
)
|
|
)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 23.0)
|
|
(cond
|
|
((= s3-0 'aspect4x3)
|
|
(format
|
|
(clear *temp-string*)
|
|
"~1L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-aspect-4x3) #f)
|
|
(lookup-text! *common-text* (text-id progress-aspect-16x9) #f)
|
|
)
|
|
(set! a0-12 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~1L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-aspect-4x3) #f)
|
|
(lookup-text! *common-text* (text-id progress-aspect-16x9) #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 a0-12 (-> this scale) arg1 arg0)
|
|
)
|
|
(draw-decoration this arg1 f30-0 (text-id progress-root-graphic-options) #f 0.95)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(+! (-> arg1 origin y) 35.0)
|
|
(let ((s3-0 (-> *progress-state* graphic-options-progressive-scan)))
|
|
(cond
|
|
((and (= (-> *progress-state* graphic-options-item-selected) 2)
|
|
(-> *progress-state* graphic-options-item-picked)
|
|
)
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(let ((a0-3 arg1))
|
|
(set! (-> a0-3 color) (font-color progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 42 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
(s3-0
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> arg1 origin y) -8.0)
|
|
(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) (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 progress))
|
|
)
|
|
)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 18.0)
|
|
(cond
|
|
(s3-0
|
|
(format
|
|
(clear *temp-string*)
|
|
"~1L~S~35L ~S"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~35L~S ~1L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-on) #f)
|
|
(lookup-text! *common-text* (text-id progress-off) #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 a0-11 (-> this scale) arg1 arg0)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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 progress-force-selected))
|
|
)
|
|
(set! (-> arg1 width) 350.0)
|
|
(set! (-> arg1 height) 60.0)
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(+! (-> arg1 origin y) 5.0)
|
|
)
|
|
(('aspect16x9)
|
|
(+! (-> arg1 origin y) 30.0)
|
|
)
|
|
)
|
|
(when (text-language? french) ;; og:preserve-this text-language patch
|
|
(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 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 21.0)
|
|
(let ((s5-2 print-game-text))
|
|
(format
|
|
(clear *temp-string*)
|
|
"~33L~C~34L~S~33L~C"
|
|
163
|
|
(lookup-text! *common-text* (text-id progress-move-dpad) #f)
|
|
161
|
|
)
|
|
(s5-2 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 21.0)
|
|
(let ((s5-3 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 162)
|
|
(s5-3 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y)
|
|
(the float (if (and (= (-> *progress-state* starting-state) 'title) (= (scf-get-territory) GAME_TERRITORY_SCEE))
|
|
100
|
|
80
|
|
)
|
|
)
|
|
)
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(+! (-> arg1 origin y) -3.0)
|
|
)
|
|
(('aspect16x9)
|
|
(+! (-> arg1 origin y) 10.0)
|
|
)
|
|
)
|
|
(let ((v1-37 arg1))
|
|
(set! (-> v1-37 scale) 0.5)
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-square-to-reset) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> arg1 origin y) 5.0)
|
|
(cond
|
|
((zero? (-> *progress-state* graphic-options-item-selected))
|
|
(let ((s4-3 arg1))
|
|
(set! (-> s4-3 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 progress))
|
|
)
|
|
)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(+! (-> arg1 origin y) 5.0)
|
|
(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 progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f0-1)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(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* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #f)
|
|
)
|
|
(set! a0-11 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~32L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #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* (-> this name) #f))
|
|
*temp-string*
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(print-game-text a0-11 arg1 #f 44 (bucket-id progress))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
)
|
|
(+! (-> arg1 origin y) 45.0)
|
|
(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 progress-force-selected))
|
|
)
|
|
(draw-highlight (the int (+ -2.0 (-> arg1 origin y))) 50 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(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* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #f)
|
|
)
|
|
(set! a0-12 *temp-string*)
|
|
)
|
|
(else
|
|
(format
|
|
(clear *temp-string*)
|
|
"~32L~S ~33L~S~1L"
|
|
(lookup-text! *common-text* (text-id progress-yes) #f)
|
|
(lookup-text! *common-text* (text-id progress-no) #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* (-> this name) #f))
|
|
*temp-string*
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(print-game-text a0-12 arg1 #f 44 (bucket-id progress))
|
|
(cond
|
|
((text-language? french) ;; og:preserve-this text-language patch
|
|
(draw-decoration this arg1 f30-0 (text-id progress-restart-quit) #f 0.8)
|
|
)
|
|
((text-language? german) ;; og:preserve-this text-language patch
|
|
(draw-decoration this arg1 f30-0 (text-id progress-restart-quit) #f 0.7)
|
|
)
|
|
(else
|
|
(draw-decoration this arg1 f30-0 (text-id progress-restart-quit) #f 0.95)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(v0-42 pointer)
|
|
(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 bucket-id float))
|
|
(sv-160 uint)
|
|
(sv-176 dma-buffer)
|
|
(sv-192 pointer)
|
|
(sv-208 pointer)
|
|
(sv-224 (function string font-context symbol int bucket-id 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)
|
|
)
|
|
(+! (-> s5-0 origin y) 20.0)
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(set! s2-0 157)
|
|
(let ((v1-17 gp-0))
|
|
(cond
|
|
((zero? v1-17)
|
|
(+! (-> s5-0 origin y) -24.0)
|
|
(+! s2-0 -9)
|
|
)
|
|
((= v1-17 1)
|
|
(+! (-> s5-0 origin y) -9.0)
|
|
(+! s2-0 43)
|
|
)
|
|
((= v1-17 2)
|
|
(+! (-> s5-0 origin y) 6.0)
|
|
(+! s2-0 96)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('aspect16x9)
|
|
(set! s2-0 172)
|
|
(set! f28-0 2.62)
|
|
(set! s0-0 5)
|
|
(set! s3-0 250)
|
|
(let ((v1-28 gp-0))
|
|
(cond
|
|
((zero? v1-28)
|
|
(+! (-> s5-0 origin y) -20.0)
|
|
(+! s2-0 -20)
|
|
)
|
|
((= v1-28 1)
|
|
(+! (-> s5-0 origin y) 2.0)
|
|
(+! s2-0 40)
|
|
)
|
|
((= v1-28 2)
|
|
(+! (-> s5-0 origin y) 30.0)
|
|
(+! s2-0 105)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(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 (-> this value-to-modify))
|
|
(+! (-> s5-0 origin y) -8.0)
|
|
(let ((a0-12 s5-0))
|
|
(set! (-> a0-12 color) (font-color progress-force-selected))
|
|
)
|
|
(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* (-> this 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 (the-as bucket-id 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! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xb :page #xc93)))
|
|
(set! (-> this sprites 0 scale-x) f28-0)
|
|
(set! (-> this sprites 0 scale-y) 0.7)
|
|
(let ((v1-57 (-> this sprites 0 color2)))
|
|
(set! (-> v1-57 0) 128)
|
|
(set! (-> v1-57 1) 128)
|
|
(set! (-> v1-57 2) 128)
|
|
(set! (-> v1-57 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 0 pos z) #x3fffff)
|
|
(set! (-> this sprites 0 pos w) 0)
|
|
(set! (-> this sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #xc93)))
|
|
(set! (-> this sprites 1 scale-x) 0.2)
|
|
(set! (-> this sprites 1 scale-y) 1.33)
|
|
(let ((v1-62 (-> this sprites 1 color2)))
|
|
(set! (-> v1-62 0) 128)
|
|
(set! (-> v1-62 1) 128)
|
|
(set! (-> v1-62 2) 128)
|
|
(set! (-> v1-62 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 1 pos z) #x3fffff)
|
|
(set! (-> this sprites 1 pos w) 0)
|
|
(set! (-> this sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3e :page #xc93)))
|
|
(set! (-> this sprites 2 scale-x) 1.0)
|
|
(set! (-> this sprites 2 scale-y) 1.0)
|
|
(let ((v1-67 (-> this sprites 2 color2)))
|
|
(set! (-> v1-67 0) sv-80)
|
|
(set! (-> v1-67 1) sv-96)
|
|
(set! (-> v1-67 2) sv-112)
|
|
(set! (-> v1-67 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 2 pos z) #xffffff)
|
|
(set! (-> this sprites 2 pos w) 0)
|
|
(set! (-> this sprites 3 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3f :page #xc93)))
|
|
(set! (-> this sprites 3 scale-x) 1.0)
|
|
(set! (-> this sprites 3 scale-y) 1.0)
|
|
(let ((v1-72 (-> this sprites 3 color2)))
|
|
(set! (-> v1-72 0) sv-80)
|
|
(set! (-> v1-72 1) sv-96)
|
|
(set! (-> v1-72 2) sv-112)
|
|
(set! (-> v1-72 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 3 pos z) #xffffff)
|
|
(set! (-> this sprites 3 pos w) 0)
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) s1-0 s2-0)
|
|
(set-hud-piece-position!
|
|
(-> this sprites 1)
|
|
(+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-128)))))
|
|
(+ s2-0 -4)
|
|
)
|
|
(set-hud-piece-position! (-> this sprites 2) (- s1-0 sv-64) (+ s2-0 -4))
|
|
(set-hud-piece-position! (-> this 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))
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) sv-176 (-> *level* default-level))
|
|
(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)
|
|
)
|
|
(draw (-> this sprites 1) sv-176 (-> *level* default-level))
|
|
(draw (-> this sprites 2) sv-176 (-> *level* default-level))
|
|
(draw (-> this sprites 3) sv-176 (-> *level* default-level))
|
|
(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 progress)
|
|
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 (bucket-id progress))
|
|
)
|
|
(let ((a0-75 s5-0))
|
|
(set! (-> a0-75 flags) (font-flags kerning large))
|
|
)
|
|
)
|
|
(else
|
|
(set! sv-208 (-> this value-to-modify))
|
|
(+! (-> s5-0 origin y) -8.0)
|
|
(when (text-language? german french) ;; og:preserve-this text-language patch
|
|
(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* (-> this 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 (the-as bucket-id 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! (-> this sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xb :page #xc93)))
|
|
(set! (-> this sprites 0 scale-x) f28-0)
|
|
(set! (-> this sprites 0 scale-y) 0.7)
|
|
(let ((v1-140 (-> this sprites 0 color2)))
|
|
(set! (-> v1-140 0) 128)
|
|
(set! (-> v1-140 1) 128)
|
|
(set! (-> v1-140 2) 128)
|
|
(set! (-> v1-140 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 0 pos z) #x3fffff)
|
|
(set! (-> this sprites 0 pos w) 0)
|
|
(set! (-> this sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #xc93)))
|
|
(set! (-> this sprites 1 scale-x) 0.2)
|
|
(set! (-> this sprites 1 scale-y) 1.33)
|
|
(let ((v1-145 (-> this sprites 1 color2)))
|
|
(set! (-> v1-145 0) 128)
|
|
(set! (-> v1-145 1) 128)
|
|
(set! (-> v1-145 2) 128)
|
|
(set! (-> v1-145 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 1 pos z) #x3fffff)
|
|
(set! (-> this sprites 1 pos w) 0)
|
|
(set! (-> this sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3e :page #xc93)))
|
|
(set! (-> this sprites 2 scale-x) 1.0)
|
|
(set! (-> this sprites 2 scale-y) 1.0)
|
|
(let ((v1-150 (-> this sprites 2 color2)))
|
|
(set! (-> v1-150 0) sv-80)
|
|
(set! (-> v1-150 1) sv-96)
|
|
(set! (-> v1-150 2) sv-112)
|
|
(set! (-> v1-150 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 2 pos z) #xffffff)
|
|
(set! (-> this sprites 2 pos w) 0)
|
|
(set! (-> this sprites 3 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3f :page #xc93)))
|
|
(set! (-> this sprites 3 scale-x) 1.0)
|
|
(set! (-> this sprites 3 scale-y) 1.0)
|
|
(let ((v1-155 (-> this sprites 3 color2)))
|
|
(set! (-> v1-155 0) sv-80)
|
|
(set! (-> v1-155 1) sv-96)
|
|
(set! (-> v1-155 2) sv-112)
|
|
(set! (-> v1-155 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> this sprites 3 pos z) #xffffff)
|
|
(set! (-> this sprites 3 pos w) 0)
|
|
(set-hud-piece-position! (the-as hud-sprite (-> this sprites)) s1-0 s2-0)
|
|
(set-hud-piece-position!
|
|
(-> this sprites 1)
|
|
(+ s1-0 (the int (* 230.0 (-> (the-as (pointer float) sv-208)))))
|
|
(+ s2-0 -4)
|
|
)
|
|
(set-hud-piece-position! (-> this sprites 2) (- s1-0 sv-64) (+ s2-0 -4))
|
|
(set-hud-piece-position! (-> this 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))
|
|
;; bar
|
|
((method-of-type hud-sprite draw) (the-as hud-sprite (-> this sprites)) sv-256 (-> *level* default-level))
|
|
;; bar background
|
|
(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)
|
|
)
|
|
;; notch
|
|
(draw (-> this sprites 1) sv-256 (-> *level* default-level))
|
|
;; left icon
|
|
(draw (-> this sprites 2) sv-256 (-> *level* default-level))
|
|
;; right icon
|
|
(draw (-> this sprites 3) sv-256 (-> *level* default-level))
|
|
(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 progress)
|
|
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 (bucket-id progress))
|
|
)
|
|
(let ((a0-141 s5-0))
|
|
(set! (-> a0-141 flags) (font-flags kerning large))
|
|
)
|
|
)
|
|
)
|
|
(if (zero? gp-0)
|
|
(draw-sound-options-decoration this s5-0 f30-0 (text-id progress-root-sound-options) #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
(defmethod draw-option ((this 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)
|
|
(+! (-> arg1 origin y) 32.0)
|
|
)
|
|
(('aspect16x9)
|
|
(+! (-> arg1 origin y) 60.0)
|
|
)
|
|
)
|
|
(set! s5-0 (-> *setting-control* user-default stereo-mode))
|
|
arg3
|
|
)
|
|
(let ((a0-7 arg1))
|
|
(set! (-> a0-7 color) (font-color progress-force-selected))
|
|
)
|
|
(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* (-> this name) #f))
|
|
(s3-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin y) 22.0)
|
|
(let ((a0-13 arg1))
|
|
(set! (-> a0-13 color) (font-color progress))
|
|
)
|
|
(let ((v1-22 arg1))
|
|
(set! (-> v1-22 scale) 0.5)
|
|
)
|
|
(let ((a0-15 arg1))
|
|
(set! (-> a0-15 color) (font-color progress))
|
|
)
|
|
(+! (-> arg1 origin x) -70.0)
|
|
(let ((s4-1 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 163)
|
|
(s4-1 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin x) 70.0)
|
|
(+! (-> arg1 origin x) 70.0)
|
|
(let ((s4-2 print-game-text))
|
|
(format (clear *temp-string*) "~33L~C" 161)
|
|
(s4-2 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(+! (-> arg1 origin x) -70.0)
|
|
(let ((s4-3 arg1))
|
|
(set! (-> s4-3 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
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
(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* (-> this name) #f))
|
|
(s3-4 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(let ((v1-39 arg1))
|
|
(set! (-> v1-39 scale) 0.5)
|
|
)
|
|
(let ((a0-33 arg1))
|
|
(set! (-> a0-33 color) (font-color progress))
|
|
)
|
|
(format (clear *temp-string*) "~S" (lookup-text! *common-text* (-> *stereo-mode-name-remap* s5-0) #f))
|
|
(let ((a0-37 *temp-string*))
|
|
(+! (-> arg1 origin y) 22.0)
|
|
(let ((a1-19 arg1))
|
|
(set! (-> a1-19 flags) (font-flags kerning middle large))
|
|
)
|
|
(print-game-text a0-37 arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
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 draw-option ((this 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)
|
|
(+! (-> arg1 origin y) -35.0)
|
|
(set! s1-0 36)
|
|
(+! s2-0 -34)
|
|
)
|
|
)
|
|
((= *options* (-> arg0 current-options))
|
|
(+! (-> arg1 origin y) -20.0)
|
|
(let ((v1-16 arg1))
|
|
(set! (-> v1-16 scale) 0.85)
|
|
)
|
|
(set! (-> arg1 height) 40.0)
|
|
(set! s1-0 37)
|
|
(+! s2-0 -28)
|
|
)
|
|
)
|
|
(when (nonzero? (-> this name))
|
|
(let ((s0-0 arg1))
|
|
(set! (-> s0-0 color) (if (= arg2 (-> arg0 option-index))
|
|
(the-as font-color (the-as int (progress-selected 0)))
|
|
(font-color progress)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((= arg2 (-> arg0 option-index))
|
|
(let ((s0-1 arg1))
|
|
(set! (-> s0-1 color) (progress-selected 0))
|
|
)
|
|
)
|
|
(else
|
|
(let ((a0-9 arg1))
|
|
(set! (-> a0-9 color) (font-color progress))
|
|
)
|
|
)
|
|
)
|
|
(if (and (and (= arg2 (-> arg0 option-index)) (!= 298 (-> this name)))
|
|
(not (and (= (-> this name) (text-id progress-root-secrets))
|
|
(= *title* (-> arg0 current-options))
|
|
(not (memcard-unlocked-secrets? #f))
|
|
(= (-> arg0 option-index) 3)
|
|
)
|
|
)
|
|
)
|
|
(draw-highlight s2-0 s1-0 f30-0)
|
|
)
|
|
(cond
|
|
((= *save-options-title* (-> arg0 current-options))
|
|
(cond
|
|
((= (-> this name) (text-id progress-continue-without-saving))
|
|
(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)
|
|
)
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) -120.0)
|
|
(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* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
(when (= arg2 (-> arg0 option-index))
|
|
(let ((s4-1 69)
|
|
(s2-4 110)
|
|
(s3-1 176)
|
|
(s1-1 42)
|
|
)
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! s4-1 79)
|
|
(set! s2-4 110)
|
|
(set! s3-1 166)
|
|
(set! s1-1 42)
|
|
(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 particles)
|
|
s0-2
|
|
(the-as (pointer dma-tag) a3-3)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set-vector! (-> this box 0 color) 64 128 128 (the int (* 128.0 f30-0)))
|
|
(draw-savegame-box
|
|
this
|
|
(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
|
|
this
|
|
(the float (+ s4-1 s3-1))
|
|
(the float (+ s4-1 s3-1))
|
|
(the float s2-4)
|
|
(the float (+ s2-4 (* s1-1 arg2)))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s0-3 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-3
|
|
s4-1
|
|
(+ s2-4 (* s1-1 arg2))
|
|
s3-1
|
|
(+ s1-1 8)
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 f30-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(+! (-> arg1 origin x) -100.0)
|
|
(set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y)))
|
|
)
|
|
)
|
|
)
|
|
((= *load-save-options* (-> arg0 current-options))
|
|
(+! (-> arg1 origin x) -100.0)
|
|
(+! (-> arg1 origin y) -25.0)
|
|
(print-menu-text (lookup-text! *common-text* (-> this name) #f) (-> this scale) arg1 arg0)
|
|
)
|
|
((and (= *title* (-> arg0 current-options))
|
|
(= (text-id progress-root-secrets) (-> this name))
|
|
(memcard-unlocked-secrets? #f)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
((!= (-> this name) (text-id progress-root-secrets))
|
|
(print-game-text (lookup-text! *common-text* (-> this name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|