mirror of
https://github.com/open-goal/jak-project
synced 2026-06-20 08:13:33 -04:00
05b7b571c8
Lots of manual fixes to make the text and other UI elements in the progress fit within the small 4x3 view.         I've also changed the select start menus to not have that giant space in each option. It's behind a toggle in the code right now.  Additionally: - fixed city billboard particles - fix stadium crash from original game - fix an accidental regression
1696 lines
70 KiB
Common Lisp
1696 lines
70 KiB
Common Lisp
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
#|
|
|
|
|
Additional PC port specific file for overriding/expanding the progress menu
|
|
This gives us more freedom to write code how we want.
|
|
|
|
|#
|
|
|
|
|
|
|
|
(defun draw-previous-next ((arg0 menu-highscores-option) (arg1 font-context) (arg2 symbol))
|
|
(local-vars (sv-16 string) (sv-32 int))
|
|
(let ((s3-0 370))
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(set! (-> arg1 origin x) 73.0)
|
|
(set! (-> arg1 origin y) 308.0)
|
|
(set! (-> arg1 width) 359.0)
|
|
(set! (-> arg1 height) 185.0)
|
|
)
|
|
(('aspect16x9)
|
|
(set! (-> arg1 origin x) 82.0)
|
|
(set! (-> arg1 origin y) 328.0)
|
|
(set! (-> arg1 width) 355.0)
|
|
(set! (-> arg1 height) 185.0)
|
|
(set! s3-0 350)
|
|
)
|
|
)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0)))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
)
|
|
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(set-color! arg1 (progress-selected 200))
|
|
(set-scale! arg1 0.6)
|
|
(when (or (> (-> arg0 page-index) 0) arg2)
|
|
(print-game-text (string-format "~C~S" 163 (lookup-text! *common-text* (text-id progress-next) #f)) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(set! arg2 (or (!= (-> arg0 page-index) (+ (-> arg0 num-pages) -1)) arg2))
|
|
(when arg2
|
|
(set-flags! arg1 (font-flags kerning right large))
|
|
(+! (-> arg1 origin x) (the float s3-0))
|
|
(print-game-text (string-format "~S~C" (lookup-text! *common-text* (text-id progress-next) #f) 161) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|
|
(defun get-highscore-icon-xoffset ((arg0 int))
|
|
(cond
|
|
((not (-> *pc-settings* use-vis?))
|
|
(adjust-game-x 435.0)
|
|
)
|
|
((= (get-aspect-ratio) 'aspect4x3)
|
|
435)
|
|
(else
|
|
410)
|
|
)
|
|
)
|
|
|
|
(deftype highscore-cup-draw-params (structure)
|
|
((cup-scale float)
|
|
(cup-y int16)
|
|
(cup-x int16)
|
|
(font-scale float)
|
|
)
|
|
)
|
|
|
|
(define *highscore-cup-draw-params* (new 'static 'inline-array highscore-cup-draw-params 8
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.25 :cup-y 174 :cup-x 112 :font-scale -1.0)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.22 :cup-y 197 :cup-x 111 :font-scale 0.5)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.20 :cup-y 217 :cup-x 110 :font-scale 0.4)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 232 :cup-x 109 :font-scale 0.3)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 244 :cup-x 109 :font-scale -1.0)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 256 :cup-x 109 :font-scale -1.0)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 268 :cup-x 109 :font-scale -1.0)
|
|
(new 'static 'highscore-cup-draw-params :cup-scale 0.15 :cup-y 280 :cup-x 109 :font-scale -1.0)
|
|
))
|
|
|
|
(defun print-highscore ((arg0 print-highscore-obj))
|
|
(local-vars (sv-16 font-context) (sv-20 float) (sv-24 int) (sv-32 int))
|
|
(set! sv-16 (-> arg0 context))
|
|
(set! sv-20 (-> arg0 interp))
|
|
(set! sv-24 50)
|
|
(set! sv-32 (if (= (get-aspect-ratio) 'aspect4x3)
|
|
320
|
|
300
|
|
)
|
|
)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! sv-32 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-32)))
|
|
(set! sv-24 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-24)))
|
|
)
|
|
(set-flags! sv-16 (font-flags kerning large))
|
|
(+! (-> sv-16 origin x) (the float sv-24))
|
|
|
|
(let* ((draw-params (-> *highscore-cup-draw-params* (-> arg0 place)))
|
|
(cup-x (-> draw-params cup-x)))
|
|
;; correct cup x
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! cup-x (adjust-game-x (the float cup-x))))
|
|
;; set font scale
|
|
(if (> (-> draw-params font-scale) 0)
|
|
(set-scale! sv-16 (-> draw-params font-scale)))
|
|
;; move font down
|
|
(when (< 0 (-> arg0 place))
|
|
(+! (-> sv-16 origin y) (the float (- (-> draw-params cup-y) (-> *highscore-cup-draw-params* (1- (-> arg0 place)) cup-y)))))
|
|
;; print highscore text
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (-> (new 'static 'boxed-array :type text-id (text-id progress-highscores-1st)
|
|
(text-id progress-highscores-2nd)
|
|
(text-id progress-highscores-3rd)
|
|
(text-id progress-highscores-4th)
|
|
(text-id progress-highscores-5th)
|
|
(text-id progress-highscores-6th)
|
|
(text-id progress-highscores-7th)
|
|
(text-id progress-highscores-8th))
|
|
(-> arg0 place)) #f)) sv-16 #f 44 (bucket-id progress))
|
|
;; draw cup icon if we're not the previous page
|
|
(if (not (-> arg0 previous))
|
|
(draw-highscore-cup (-> arg0 self) (eval-highscore arg0) (+ (the int sv-20) cup-x) (-> draw-params cup-y) (-> draw-params cup-scale) (-> arg0 local-scale)))
|
|
)
|
|
|
|
(+! (-> sv-16 origin x) (the float sv-32))
|
|
(set-flags! sv-16 (font-flags kerning right large))
|
|
(cond
|
|
((-> arg0 game-score)
|
|
(print-game-text (string-format "~D" (the int (-> arg0 score))) sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
(else
|
|
(print-game-text (str-print-time (-> arg0 score)) sv-16 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
|
|
(set-flags! sv-16 (font-flags kerning large))
|
|
(set! (-> sv-16 origin x) (- (-> sv-16 origin x) (the float (+ sv-24 sv-32))))
|
|
)
|
|
|
|
|
|
(defmethod draw-option menu-highscores-option ((obj menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(sv-96 float)
|
|
(sv-100 float)
|
|
(sv-104 float)
|
|
(sv-108 float)
|
|
(sv-112 hud-box)
|
|
(sv-116 print-highscore-obj)
|
|
(sv-120 float)
|
|
(sv-124 float)
|
|
)
|
|
(let ((padding 20.0))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(*! padding (-> *pc-settings* aspect-ratio-reciprocal)))
|
|
(set! sv-96 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(set! sv-100 0.22)
|
|
(set! sv-104 395.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(*! sv-104 (-> *pc-settings* aspect-ratio-reciprocal)))
|
|
(set! sv-108 (-> arg1 origin x))
|
|
(set! sv-112 (new 'stack-no-clear 'hud-box))
|
|
(set! sv-116 (new 'stack 'print-highscore-obj))
|
|
(set! sv-120 (* (-> arg0 sliding) sv-104))
|
|
(set! sv-124 (* (-> arg0 sliding-off) (-> obj slide-dir) sv-104))
|
|
(if (< sv-96 0.0)
|
|
(set! sv-96 0.0)
|
|
)
|
|
(cond
|
|
((not (-> *bigmap* progress-minimap))
|
|
(draw-busy-loading arg1)
|
|
)
|
|
(else
|
|
;; initial font parameters
|
|
(set! (-> arg1 alpha) sv-96)
|
|
(set-scale! arg1 1.0)
|
|
(set-flags! arg1 (font-flags kerning middle large))
|
|
(set-color! arg1 (font-color progress))
|
|
;; set up for decoration text
|
|
(set! (-> arg1 origin x) 59.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
|
(set! (-> arg1 origin y) 78.0)
|
|
(set! (-> arg1 width) sv-104)
|
|
(set! (-> arg1 height) 215.0)
|
|
|
|
;; set the scissor region
|
|
(begin-scissor sv-112 arg0)
|
|
|
|
;; set up for highscore icon
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #xc93)))
|
|
(set! (-> obj sprites 0 flags) (the-as uint 4))
|
|
(set! (-> obj sprites 0 scale-x) sv-100)
|
|
(set! (-> obj sprites 0 scale-y) sv-100)
|
|
(let ((v1-33 (-> obj sprites 0 color2)))
|
|
(set! (-> v1-33 0) 128)
|
|
(set! (-> v1-33 1) 128)
|
|
(set! (-> v1-33 2) 128)
|
|
(set! (-> v1-33 3) (the int (* 128.0 sv-96)))
|
|
)
|
|
(set! (-> obj sprites 0 pos z) #xfffff0)
|
|
(set! (-> obj sprites 0 pos w) 0)
|
|
|
|
;; draw decoration text
|
|
(if (= (-> *setting-control* user-default language) (language-enum spanish))
|
|
(draw-decoration obj arg1 sv-96 (text-id progress-root-highscores) #t 0.8)
|
|
(draw-decoration obj arg1 sv-96 (text-id progress-root-highscores) #t 0.95)
|
|
)
|
|
|
|
;; draw highscore title (e.g 'Gun Course')
|
|
(set-scale! arg1 0.6)
|
|
(set! (-> arg1 height) 185.0)
|
|
(+! (-> arg1 origin y) 46.0)
|
|
(set! (-> arg1 origin x) 65.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
|
(set-width! arg1 367)
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(set-color! arg1 (font-color progress-force-selected))
|
|
(set! (-> arg1 origin x) (+ padding sv-120 (-> arg1 origin x)))
|
|
(set-scale! arg1 0.75)
|
|
(when (= (-> *setting-control* user-default language) (language-enum german))
|
|
(set-scale! arg1 0.69)
|
|
)
|
|
(when (= (-> *setting-control* user-default language) (language-enum french))
|
|
(set-scale! arg1 0.72)
|
|
)
|
|
(when (= (-> *setting-control* user-default language) (language-enum spanish))
|
|
(set-scale! arg1 0.65)
|
|
)
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> obj page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
|
|
|
;; now draw highscore subtitle (e.g 'Scatter Gun')
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(set-scale! arg1 0.6)
|
|
(when (or (= (-> *setting-control* user-default language) (language-enum french))
|
|
(= (-> *setting-control* user-default language) (language-enum spanish))
|
|
)
|
|
(set-scale! arg1 0.58)
|
|
)
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> obj page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
|
|
|
;; draw highscore icon
|
|
(set! (-> arg1 origin x) (- (-> arg1 origin x) (+ padding sv-120)))
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(draw-highscore-icon
|
|
obj
|
|
(get-highscore-icon (-> obj page-index))
|
|
(the int (+ (the float (get-highscore-icon-xoffset (-> obj page-index))) sv-120))
|
|
(get-highscore-icon-yoffset (-> obj page-index))
|
|
(get-highscore-icon-scale (-> obj page-index))
|
|
)
|
|
|
|
;; print the 8 scores now.
|
|
(set! sv-108 (-> arg1 origin x))
|
|
(set-color! arg1 (font-color progress))
|
|
(+! (-> arg1 origin x) sv-120)
|
|
(set-scale! arg1 0.6)
|
|
(let ((gp-5 (get-game-score-ref *game-info* (get-highscore-score (-> obj page-index)))))
|
|
(set! (-> sv-116 index) (-> obj page-index))
|
|
(set! (-> sv-116 previous) #f)
|
|
(set! (-> sv-116 self) obj)
|
|
(case (get-highscore-type (-> obj page-index))
|
|
(('game)
|
|
(set! (-> sv-116 game-score) #t)
|
|
)
|
|
(('race)
|
|
(set! (-> sv-116 game-score) #f)
|
|
)
|
|
)
|
|
(set! (-> sv-116 context) arg1)
|
|
(set! (-> sv-116 local-scale) sv-96)
|
|
(set! (-> sv-116 interp) sv-120)
|
|
(dotimes (s5-5 8)
|
|
(set! (-> sv-116 place) s5-5)
|
|
(set! (-> sv-116 score) (-> gp-5 s5-5))
|
|
(print-highscore sv-116)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin x) sv-108)
|
|
|
|
;; draw the previous highscore that was seen
|
|
;; note that we only need to know what the last one was
|
|
;; since the screen only needs to draw 2 highscores at any given time anyway
|
|
;; reset font parameters
|
|
(set-scale! arg1 0.6)
|
|
(set! (-> arg1 origin x) 59.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
|
(set! (-> arg1 origin y) 78.0)
|
|
(set! (-> arg1 width) sv-104)
|
|
(set! (-> arg1 height) 215.0)
|
|
(set-scale! arg1 0.5)
|
|
(set! (-> arg1 height) 185.0)
|
|
(+! (-> arg1 origin y) 46.0)
|
|
(set! (-> arg1 origin x) 80.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
|
(set! (-> obj sprites 0 pos z) #xffffff)
|
|
(set! (-> arg1 width) sv-104)
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(set-color! arg1 (font-color progress-force-selected))
|
|
(set! (-> arg1 origin x) (+ padding sv-124 (-> arg1 origin x)))
|
|
(set-scale! arg1 0.75)
|
|
(when (= (-> *setting-control* user-default language) (language-enum german))
|
|
(set-scale! arg1 0.69)
|
|
)
|
|
(when (= (-> *setting-control* user-default language) (language-enum french))
|
|
(set-scale! arg1 0.72)
|
|
)
|
|
(when (= (-> *setting-control* user-default language) (language-enum spanish))
|
|
(set-scale! arg1 0.65)
|
|
)
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text (-> obj prev-page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(set-scale! arg1 0.6)
|
|
(when (or (= (-> *setting-control* user-default language) (language-enum french))
|
|
(= (-> *setting-control* user-default language) (language-enum spanish))
|
|
)
|
|
(set-scale! arg1 0.58)
|
|
)
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (get-highscore-text-sub (-> obj prev-page-index)) #f)) arg1 #f 44 (bucket-id progress))
|
|
(set! (-> arg1 origin x) (- (-> arg1 origin x) (+ padding sv-124)))
|
|
(+! (-> arg1 origin y) 25.0)
|
|
(draw-highscore-icon
|
|
obj
|
|
(get-highscore-icon (-> obj prev-page-index))
|
|
(the int (+ (the float (get-highscore-icon-xoffset (-> obj page-index))) sv-124))
|
|
(get-highscore-icon-yoffset (-> obj page-index))
|
|
(get-highscore-icon-scale (-> obj page-index))
|
|
)
|
|
(set! sv-108 (-> arg1 origin x))
|
|
(set-color! arg1 (font-color progress))
|
|
(+! (-> arg1 origin x) sv-124)
|
|
(set-scale! arg1 0.6)
|
|
(when (< 1 (get-num-highscores))
|
|
(let ((gp-11 (get-game-score-ref *game-info* (get-highscore-score (-> obj prev-page-index)))))
|
|
(set! (-> sv-116 index) (-> obj prev-page-index))
|
|
(set! (-> sv-116 previous) #t)
|
|
(set! (-> sv-116 self) obj)
|
|
(case (get-highscore-type (-> obj prev-page-index))
|
|
(('game)
|
|
(set! (-> sv-116 game-score) #t)
|
|
)
|
|
(('race)
|
|
(set! (-> sv-116 game-score) #f)
|
|
)
|
|
)
|
|
(set! (-> sv-116 context) arg1)
|
|
(set! (-> sv-116 local-scale) sv-96)
|
|
(set! (-> sv-116 interp) sv-120)
|
|
(dotimes (s5-10 8)
|
|
(set! (-> sv-116 place) s5-10)
|
|
(set! (-> sv-116 score) (-> gp-11 s5-10))
|
|
(print-highscore sv-116)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin x) sv-108)
|
|
(set-scale! arg1 0.6)
|
|
)
|
|
(if (< 1 (get-num-highscores))
|
|
(draw-previous-next obj arg1 #t)
|
|
)
|
|
(end-scissor sv-112 1.0)
|
|
)
|
|
))
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|
|
(defmethod draw-option menu-slider-option ((obj menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(sv-48 int)
|
|
(sv-64 int)
|
|
(sv-80 int)
|
|
(sv-96 int)
|
|
(sv-112 int)
|
|
(sv-128 pointer)
|
|
(sv-160 rgba)
|
|
(sv-176 dma-buffer)
|
|
(sv-208 pointer)
|
|
(sv-240 rgba)
|
|
(sv-256 dma-buffer)
|
|
)
|
|
(let ((s5-0 arg1)
|
|
(gp-0 arg2)
|
|
(bar-width 230.0)
|
|
(bar-width-max 240)
|
|
(icon-right-offset 242)
|
|
)
|
|
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
|
|
(set! sv-48 128)
|
|
(let ((s1-0 sv-48)
|
|
(s0-0 9)
|
|
(s2-0 157)
|
|
(f28-0 2.0)
|
|
(s3-0 252)
|
|
)
|
|
(set! sv-64 20)
|
|
(set! sv-80 0)
|
|
(set! sv-96 112)
|
|
(set! sv-112 127)
|
|
(if (< f30-0 0.0)
|
|
(set! f30-0 0.0)
|
|
)
|
|
(set! (-> s5-0 alpha) f30-0)
|
|
(cond
|
|
((not (-> *bigmap* progress-minimap))
|
|
(draw-busy-loading s5-0)
|
|
(return 0)
|
|
)
|
|
(else
|
|
(set-scale! s5-0 0.6)
|
|
(+! (-> s5-0 origin y) 20.0)
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(set! s2-0 157)
|
|
(let ((v1-17 gp-0))
|
|
(cond
|
|
((zero? v1-17)
|
|
(+! (-> s5-0 origin y) -24.0)
|
|
(+! s2-0 -9)
|
|
)
|
|
((= v1-17 1)
|
|
(+! (-> s5-0 origin y) -9.0)
|
|
(+! s2-0 43)
|
|
)
|
|
((= v1-17 2)
|
|
(+! (-> s5-0 origin y) 6.0)
|
|
(+! s2-0 96)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(('aspect16x9)
|
|
(set! s2-0 172)
|
|
(set! f28-0 2.62)
|
|
(set! s0-0 5)
|
|
(set! s3-0 250)
|
|
(let ((v1-28 gp-0))
|
|
(cond
|
|
((zero? v1-28)
|
|
(+! (-> s5-0 origin y) -20.0)
|
|
(+! s2-0 -20)
|
|
)
|
|
((= v1-28 1)
|
|
(+! (-> s5-0 origin y) 2.0)
|
|
(+! s2-0 40)
|
|
)
|
|
((= v1-28 2)
|
|
(+! (-> s5-0 origin y) 30.0)
|
|
(+! s2-0 105)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! sv-48 (adjust-game-x (the float sv-48)))
|
|
(set! s1-0 (adjust-game-x (the float s1-0)))
|
|
(*! bar-width (-> *pc-settings* aspect-ratio-reciprocal))
|
|
(set! bar-width-max (the int (* (-> *pc-settings* aspect-ratio-reciprocal) bar-width-max)))
|
|
(set! icon-right-offset (the int (* (-> *pc-settings* aspect-ratio-reciprocal) icon-right-offset)))
|
|
(set! sv-64 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-64)))
|
|
(set! s0-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s0-0)))
|
|
(set! s3-0 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-0)))
|
|
)
|
|
(set-flags! s5-0 (font-flags kerning large))
|
|
(set! (-> s5-0 origin x) (the float sv-48))
|
|
(cond
|
|
(arg3
|
|
(set! sv-128 (-> obj value-to-modify))
|
|
(+! (-> s5-0 origin y) -8.0)
|
|
(set-color! s5-0 (font-color progress-force-selected))
|
|
(draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 52 f30-0)
|
|
(print-game-text (lookup-text! *common-text* (-> obj name) #f) s5-0 #f 44 (bucket-id progress))
|
|
(set! sv-160 (new 'static 'rgba :r (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128))))
|
|
:g (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128))))
|
|
:b (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-128))))
|
|
:a (the int (* 128.0 f30-0))))
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xb :page #xc93)))
|
|
(set! (-> obj sprites 0 scale-x) f28-0)
|
|
(set! (-> obj sprites 0 scale-y) 0.7)
|
|
(let ((v1-57 (-> obj sprites 0 color2)))
|
|
(set! (-> v1-57 0) 128)
|
|
(set! (-> v1-57 1) 128)
|
|
(set! (-> v1-57 2) 128)
|
|
(set! (-> v1-57 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 0 pos z) #x3fffff)
|
|
(set! (-> obj sprites 0 pos w) 0)
|
|
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #xc93)))
|
|
(set! (-> obj sprites 1 scale-x) 0.2)
|
|
(set! (-> obj sprites 1 scale-y) 1.33)
|
|
(let ((v1-62 (-> obj sprites 1 color2)))
|
|
(set! (-> v1-62 0) 128)
|
|
(set! (-> v1-62 1) 128)
|
|
(set! (-> v1-62 2) 128)
|
|
(set! (-> v1-62 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 1 pos z) #x3fffff)
|
|
(set! (-> obj sprites 1 pos w) 0)
|
|
(set! (-> obj sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3e :page #xc93)))
|
|
(set! (-> obj sprites 2 scale-x) 1.0)
|
|
(set! (-> obj sprites 2 scale-y) 1.0)
|
|
(let ((v1-67 (-> obj sprites 2 color2)))
|
|
(set! (-> v1-67 0) sv-80)
|
|
(set! (-> v1-67 1) sv-96)
|
|
(set! (-> v1-67 2) sv-112)
|
|
(set! (-> v1-67 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 2 pos z) #xffffff)
|
|
(set! (-> obj sprites 2 pos w) 0)
|
|
(set! (-> obj sprites 3 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3f :page #xc93)))
|
|
(set! (-> obj sprites 3 scale-x) 1.0)
|
|
(set! (-> obj sprites 3 scale-y) 1.0)
|
|
(let ((v1-72 (-> obj sprites 3 color2)))
|
|
(set! (-> v1-72 0) sv-80)
|
|
(set! (-> v1-72 1) sv-96)
|
|
(set! (-> v1-72 2) sv-112)
|
|
(set! (-> v1-72 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 3 pos z) #xffffff)
|
|
(set! (-> obj sprites 3 pos w) 0)
|
|
(set-hud-piece-position! (-> obj sprites 0) s1-0 s2-0)
|
|
(set-hud-piece-position!
|
|
(-> obj sprites 1)
|
|
(+ s1-0 (the int (* bar-width (-> (the-as (pointer float) sv-128)))))
|
|
(+ s2-0 -4)
|
|
)
|
|
(set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4))
|
|
(set-hud-piece-position! (-> obj sprites 3) (+ sv-64 icon-right-offset s1-0) (+ s2-0 -4))
|
|
(with-dma-buffer-add-bucket ((sv-176 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress))
|
|
(draw (-> obj sprites 0) sv-176 (-> *level* default-level))
|
|
(draw-sprite2d-xy
|
|
sv-176
|
|
(+ s1-0 s0-0 (the int (* bar-width (-> (the-as (pointer float) sv-128)))))
|
|
(+ s2-0 7)
|
|
(- bar-width-max (the int (* bar-width (-> (the-as (pointer float) sv-128)))))
|
|
9
|
|
sv-160
|
|
)
|
|
(draw (-> obj sprites 1) sv-176 (-> *level* default-level))
|
|
(draw (-> obj sprites 2) sv-176 (-> *level* default-level))
|
|
(draw (-> obj sprites 3) sv-176 (-> *level* default-level))
|
|
)
|
|
(+! (-> s5-0 origin x) (the float s3-0))
|
|
(set-flags! s5-0 (font-flags kerning right large))
|
|
(print-game-text (string-format "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-128))))) s5-0 #f 44 (bucket-id progress))
|
|
(set-flags! s5-0 (font-flags kerning large))
|
|
)
|
|
(else
|
|
(set! sv-208 (-> obj value-to-modify))
|
|
(+! (-> s5-0 origin y) -8.0)
|
|
(when (or (= (-> *setting-control* user-default language) (language-enum german))
|
|
(= (-> *setting-control* user-default language) (language-enum french))
|
|
)
|
|
(set-scale! s5-0 0.56)
|
|
)
|
|
(if (= (-> arg0 option-index) gp-0)
|
|
(draw-highlight (the int (+ -2.0 (-> s5-0 origin y))) 24 f30-0)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> obj name) #f) s5-0 #f 44 (bucket-id progress))
|
|
(set! sv-240 (new 'static 'rgba :r (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208))))
|
|
:g (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208))))
|
|
:b (the int (* 0.0 f30-0 (-> (the-as (pointer float) sv-208))))
|
|
:a (the int (* 128.0 f30-0))))
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xb :page #xc93)))
|
|
(set! (-> obj sprites 0 scale-x) f28-0)
|
|
(set! (-> obj sprites 0 scale-y) 0.7)
|
|
(let ((v1-140 (-> obj sprites 0 color2)))
|
|
(set! (-> v1-140 0) 128)
|
|
(set! (-> v1-140 1) 128)
|
|
(set! (-> v1-140 2) 128)
|
|
(set! (-> v1-140 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 0 pos z) #x3fffff)
|
|
(set! (-> obj sprites 0 pos w) 0)
|
|
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (new 'static 'texture-id :index #xc :page #xc93)))
|
|
(set! (-> obj sprites 1 scale-x) 0.2)
|
|
(set! (-> obj sprites 1 scale-y) 1.33)
|
|
(let ((v1-145 (-> obj sprites 1 color2)))
|
|
(set! (-> v1-145 0) 128)
|
|
(set! (-> v1-145 1) 128)
|
|
(set! (-> v1-145 2) 128)
|
|
(set! (-> v1-145 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 1 pos z) #x3fffff)
|
|
(set! (-> obj sprites 1 pos w) 0)
|
|
(set! (-> obj sprites 2 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3e :page #xc93)))
|
|
(set! (-> obj sprites 2 scale-x) 1.0)
|
|
(set! (-> obj sprites 2 scale-y) 1.0)
|
|
(let ((v1-150 (-> obj sprites 2 color2)))
|
|
(set! (-> v1-150 0) sv-80)
|
|
(set! (-> v1-150 1) sv-96)
|
|
(set! (-> v1-150 2) sv-112)
|
|
(set! (-> v1-150 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 2 pos z) #xffffff)
|
|
(set! (-> obj sprites 2 pos w) 0)
|
|
(set! (-> obj sprites 3 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x3f :page #xc93)))
|
|
(set! (-> obj sprites 3 scale-x) 1.0)
|
|
(set! (-> obj sprites 3 scale-y) 1.0)
|
|
(let ((v1-155 (-> obj sprites 3 color2)))
|
|
(set! (-> v1-155 0) sv-80)
|
|
(set! (-> v1-155 1) sv-96)
|
|
(set! (-> v1-155 2) sv-112)
|
|
(set! (-> v1-155 3) (the int (* 128.0 f30-0)))
|
|
)
|
|
(set! (-> obj sprites 3 pos z) #xffffff)
|
|
(set! (-> obj sprites 3 pos w) 0)
|
|
(set-hud-piece-position! (-> obj sprites 0) s1-0 s2-0)
|
|
(set-hud-piece-position!
|
|
(-> obj sprites 1)
|
|
(+ s1-0 (the int (* bar-width (-> (the-as (pointer float) sv-208)))))
|
|
(+ s2-0 -4)
|
|
)
|
|
(set-hud-piece-position! (-> obj sprites 2) (- s1-0 sv-64) (+ s2-0 -4))
|
|
(set-hud-piece-position! (-> obj sprites 3) (+ sv-64 icon-right-offset s1-0) (+ s2-0 -4))
|
|
(with-dma-buffer-add-bucket ((sv-256 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress))
|
|
(draw (-> obj sprites 0) sv-256 (-> *level* default-level))
|
|
(draw-sprite2d-xy
|
|
sv-256
|
|
(+ s1-0 s0-0 (the int (* bar-width (-> (the-as (pointer float) sv-208)))))
|
|
(+ s2-0 7)
|
|
(- bar-width-max (the int (* bar-width (-> (the-as (pointer float) sv-208)))))
|
|
9
|
|
sv-240
|
|
)
|
|
(draw (-> obj sprites 1) sv-256 (-> *level* default-level))
|
|
(draw (-> obj sprites 2) sv-256 (-> *level* default-level))
|
|
(draw (-> obj sprites 3) sv-256 (-> *level* default-level))
|
|
)
|
|
(+! (-> s5-0 origin x) (the float s3-0))
|
|
(set-flags! s5-0 (font-flags kerning right large))
|
|
(print-game-text (string-format "~D%" (the int (* 100.0 (-> (the-as (pointer float) sv-208))))) s5-0 #f 44 (bucket-id progress))
|
|
(set-flags! s5-0 (font-flags kerning large))
|
|
)
|
|
)
|
|
(if (zero? gp-0)
|
|
(draw-sound-options-decoration obj s5-0 f30-0 (text-id progress-root-sound-options) #f)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|
|
|
|
(defmethod draw-option menu-missions-option ((obj menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(f0-50 float)
|
|
(sv-16 float)
|
|
(sv-20 int)
|
|
(sv-24 int)
|
|
(sv-32 int)
|
|
(sv-40 int)
|
|
(sv-48 int)
|
|
(sv-56 int)
|
|
(sv-256 float)
|
|
(sv-260 float)
|
|
(sv-264 game-task-node-info)
|
|
(sv-268 game-task-node-info)
|
|
(sv-272 symbol)
|
|
(sv-276 hud-box)
|
|
(sv-280 float)
|
|
(sv-284 float)
|
|
)
|
|
(set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(set! sv-20 1)
|
|
(set! sv-24 0)
|
|
(set! sv-32 0)
|
|
(set! sv-40 0)
|
|
(set! sv-48 0)
|
|
(set! sv-56 95)
|
|
(set! sv-256 (* 395.0 (-> arg0 sliding)))
|
|
(set! sv-260 (* 44.0 (-> arg0 sliding-height)))
|
|
(set! sv-264 (new 'stack 'game-task-node-info))
|
|
(set! sv-268 (new 'stack 'game-task-node-info))
|
|
(set! sv-272 #t)
|
|
(set! sv-276 (new 'stack-no-clear 'hud-box))
|
|
(set! sv-280 (-> arg1 origin y))
|
|
(set! sv-284 (-> arg1 scale))
|
|
(set! (-> *progress-state* current-task-index) (length (-> *game-info* sub-task-list)))
|
|
(set! (-> *progress-state* current-line-index) -1)
|
|
(set! (-> *progress-state* current-task) (the-as uint -1))
|
|
(set! (-> *progress-state* first-closed-line-index) -1)
|
|
(set! (-> *progress-state* extra-text-state) -1)
|
|
(set! (-> *progress-state* num-open-tasks-found) 0)
|
|
(set! (-> *progress-state* num-closed-tasks-found) 0)
|
|
(if (< sv-16 0.0)
|
|
(set! sv-16 (the-as float 0.0))
|
|
)
|
|
(set! (-> arg1 alpha) sv-16)
|
|
(set! (-> *game-info* mission-list 0) sv-264)
|
|
(set! (-> sv-264 description) (text-id progress-missions-in-progress))
|
|
(set! (-> sv-268 description) (text-id progress-missions-completed))
|
|
(while (< sv-24 (length (-> *game-info* sub-task-list)))
|
|
(let ((v1-26 (find-mission-text-at-index sv-24))
|
|
(a0-15 (-> *game-info* mission-list))
|
|
)
|
|
(when (!= v1-26 #f)
|
|
(when (and (logtest? (-> v1-26 flags) (game-task-node-flag closed)) sv-272)
|
|
(set! sv-272 (the-as symbol #f))
|
|
(set! (-> a0-15 sv-20) sv-268)
|
|
(set! sv-20 (+ sv-20 1))
|
|
)
|
|
(set! (-> a0-15 sv-20) v1-26)
|
|
(set! sv-20 (+ sv-20 1))
|
|
)
|
|
)
|
|
(set! sv-24 (+ sv-24 1))
|
|
)
|
|
(set! sv-48 sv-20)
|
|
(set! (-> *progress-state* total-num-tasks) sv-20)
|
|
(sort-task-node-result sv-48)
|
|
(set! (-> arg1 width) 395.0)
|
|
(set! (-> arg1 origin x) 60.0)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(set-color! arg1 (font-color progress))
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
;; added to fix widescreen
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
)
|
|
(let ((v1-40 (-> obj page-index)))
|
|
(cond
|
|
((zero? v1-40)
|
|
(draw-missions-decoration obj arg1 sv-16 (text-id progress-root-missions))
|
|
)
|
|
((= v1-40 1)
|
|
(draw-missions-decoration obj arg1 sv-16 (text-id progress-root-missions))
|
|
)
|
|
)
|
|
)
|
|
(begin-scissor-missions sv-276)
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(if (-> *pc-settings* use-vis?)
|
|
(+! (-> arg1 origin x) 20.0)
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 20.0)))
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
)
|
|
(('aspect4x3)
|
|
(set! (-> arg1 origin y) (the float sv-56))
|
|
)
|
|
)
|
|
(set-scale! arg1 sv-284)
|
|
(when (zero? (-> obj page-index))
|
|
(set! sv-24 (-> obj task-line-index))
|
|
(set! sv-20 0)
|
|
(let ((v1-57 (+ sv-56 44)))
|
|
(set! sv-56 v1-57)
|
|
(set! (-> arg1 origin y) (the float (+ v1-57 (the int sv-260))))
|
|
)
|
|
(set! (-> arg1 width) 340.0)
|
|
(set! (-> arg1 height) 44.0)
|
|
(when (!= sv-260 0.0)
|
|
(set! (-> *progress-state* missions-total-spacing) 0.0)
|
|
(dotimes (s4-1 sv-24)
|
|
(let* ((s3-1 (-> *game-info* mission-list s4-1))
|
|
(a1-19
|
|
(if (and (logtest? (-> s3-1 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s3-1 task)))
|
|
(-> *game-info* play-list (-> s3-1 task) text-name)
|
|
(-> s3-1 description)
|
|
)
|
|
)
|
|
(s3-2 (lookup-text! *common-text* a1-19 #f))
|
|
(f30-0 3.0)
|
|
(s2-0 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s3-2)
|
|
(set! (-> *progress-state* missions-total-spacing)
|
|
(+ f30-0 (s2-0 *temp-string* arg1 #t 44 (bucket-id progress)) (-> *progress-state* missions-total-spacing))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! sv-56 (- sv-56 (the int (-> *progress-state* missions-total-spacing))))
|
|
(cond
|
|
((< (-> arg0 sliding-height) 0.0)
|
|
(let* ((s4-2 (-> *game-info* mission-list sv-24))
|
|
(a1-23
|
|
(if (and (logtest? (-> s4-2 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-2 task)))
|
|
(-> *game-info* play-list (-> s4-2 task) text-name)
|
|
(-> s4-2 description)
|
|
)
|
|
)
|
|
(s4-3 (lookup-text! *common-text* a1-23 #f))
|
|
)
|
|
0.0
|
|
(let ((f30-1 3.0)
|
|
(s3-3 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s4-3)
|
|
(let ((f0-36 (+ f30-1 (s3-3 *temp-string* arg1 #t 44 (bucket-id progress)))))
|
|
(set! sv-260 (* (-> arg0 sliding-height) f0-36))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(let* ((s4-4 (-> *game-info* mission-list (+ sv-24 -1)))
|
|
(a1-27
|
|
(if (and (logtest? (-> s4-4 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-4 task)))
|
|
(-> *game-info* play-list (-> s4-4 task) text-name)
|
|
(-> s4-4 description)
|
|
)
|
|
)
|
|
(s4-5 (lookup-text! *common-text* a1-27 #f))
|
|
)
|
|
0.0
|
|
(let ((f30-2 3.0)
|
|
(s3-4 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s4-5)
|
|
(let ((f0-40 (+ f30-2 (s3-4 *temp-string* arg1 #t 44 (bucket-id progress)))))
|
|
(set! sv-260 (* (-> arg0 sliding-height) f0-40))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin y) (the float (+ sv-56 (the int sv-260))))
|
|
(while (and (< sv-20 sv-48) (< sv-20 (+ sv-24 10)))
|
|
(let* ((s4-6 (-> *game-info* mission-list sv-20))
|
|
(s3-5
|
|
(if (and (logtest? (-> s4-6 flags) (game-task-node-flag closed)) (task-complete? *game-info* (-> s4-6 task)))
|
|
(-> *game-info* play-list (-> s4-6 task) text-name)
|
|
(-> s4-6 description)
|
|
)
|
|
)
|
|
(s5-1 (lookup-text! *common-text* s3-5 #f))
|
|
)
|
|
0.0
|
|
(set! f0-50
|
|
(cond
|
|
((>= sv-20 (+ sv-24 -1))
|
|
(when (and (!= s3-5 381) (!= s3-5 380))
|
|
(let ((s3-6 print-game-text))
|
|
(format (clear *temp-string*) "~S" (lookup-text!
|
|
*common-text*
|
|
(if (logtest? (-> s4-6 flags) (game-task-node-flag closed))
|
|
(text-id progress-missions-icon-completed)
|
|
(text-id progress-missions-icon-todo)
|
|
)
|
|
#f
|
|
)
|
|
)
|
|
(s3-6 *temp-string* arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(if (-> *pc-settings* use-vis?)
|
|
(+! (-> arg1 origin x) 20.0)
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 20.0)))
|
|
(let ((f30-3 3.0)
|
|
(s4-7 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s5-1)
|
|
(set! f0-50 (+ f30-3 (s4-7 *temp-string* arg1 #f 44 (bucket-id progress))))
|
|
)
|
|
(if (-> *pc-settings* use-vis?)
|
|
(+! (-> arg1 origin x) -20.0)
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -20.0)))
|
|
f0-50
|
|
)
|
|
(else
|
|
(let ((f30-4 3.0)
|
|
(s4-8 print-game-text)
|
|
)
|
|
(format (clear *temp-string*) "~S" s5-1)
|
|
(+ f30-4 (s4-8 *temp-string* arg1 #t 44 (bucket-id progress)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(let ((v1-142 (+ sv-56 (the int f0-50))))
|
|
(set! sv-56 v1-142)
|
|
(set! (-> arg1 origin y) (the float (+ v1-142 (the int sv-260))))
|
|
)
|
|
(set! sv-20 (+ sv-20 1))
|
|
)
|
|
(if (zero? (-> *progress-state* total-num-tasks))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-missions-none) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
(end-scissor-missions sv-276 1.0)
|
|
(draw-missions-up-down arg1)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|
|
(defun draw-secret-list ((arg0 secret-item-option) (arg1 progress) (arg2 font-context) (arg3 int) (arg4 symbol) (arg5 float))
|
|
(let ((s4-0 (and arg4 (= arg3 1))))
|
|
380.0
|
|
270.0
|
|
(set! (-> arg2 origin x) 100.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg2 origin x) (the float (adjust-game-x (-> arg2 origin x)))))
|
|
(cond
|
|
((= s4-0 #t)
|
|
(cond
|
|
((= (-> arg0 can-toggle) 'auto)
|
|
)
|
|
((not (-> arg0 can-toggle))
|
|
(case (get-aspect-ratio)
|
|
(('aspect4x3)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -25.0))
|
|
(+! (-> arg2 origin x) -25.0))
|
|
)
|
|
(('aspect16x9)
|
|
(+! (-> arg2 origin x) -10.0)
|
|
)
|
|
)
|
|
(when (= (-> *setting-control* user-default language) (language-enum german))
|
|
(set-scale! arg2 0.43)
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-secrets-go-to-title-screen) #f)
|
|
arg2
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
((and (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag)))
|
|
(set! (-> arg1 selected-option) #f)
|
|
(logclear! (-> *game-info* secrets) (-> arg0 flag))
|
|
)
|
|
((and (= (-> arg0 can-toggle) #t) (not (logtest? (-> *game-info* secrets) (-> arg0 flag))))
|
|
(logior! (-> *game-info* secrets) (-> arg0 flag))
|
|
(set! (-> arg1 selected-option) #f)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(set-color! arg2 (if (= arg3 1)
|
|
(progress-selected 0)
|
|
(font-color progress)))
|
|
(set! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
75
|
|
90
|
|
)
|
|
)
|
|
)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg2 origin x) (the float (adjust-game-x (-> arg2 origin x)))))
|
|
(cond
|
|
((logtest? (-> *game-info* sub-task-list (-> arg0 avail-after) flags) (game-task-node-flag closed))
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (-> arg0 name) #f)) arg2 #f 44 (bucket-id progress))
|
|
)
|
|
(else
|
|
(print-game-text (string-format "????????") arg2 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
(set! (-> arg2 origin x) 360.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg2 origin x) (the float (adjust-game-x (-> arg2 origin x)))))
|
|
(set-color! arg2 (font-color progress))
|
|
)
|
|
)
|
|
(cond
|
|
((and (not s4-0) (not (logtest? (-> *game-info* purchase-secrets) (-> arg0 flag))))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 50))
|
|
(+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
50
|
|
45
|
|
))))
|
|
(print-game-text (string-format "~D" (-> arg0 cost)) arg2 #f 44 (bucket-id progress))
|
|
)
|
|
((and (not s4-0) (= (-> arg0 can-toggle) #t) (logtest? (-> *game-info* secrets) (-> arg0 flag)))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 50))
|
|
(+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
50
|
|
45
|
|
))))
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (text-id progress-on) #f)) arg2 #f 44 (bucket-id progress))
|
|
)
|
|
((and (not s4-0) (= (-> arg0 can-toggle) #t) (not (logtest? (-> *game-info* secrets) (-> arg0 flag))))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 50))
|
|
(+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
50
|
|
45
|
|
))))
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (text-id progress-off) #f)) arg2 #f 44 (bucket-id progress))
|
|
)
|
|
((and (not s4-0) (!= (-> arg0 can-toggle) #t))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg2 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 80))
|
|
(+! (-> arg2 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
80
|
|
70
|
|
))))
|
|
(set-flags! arg2 (font-flags kerning right large))
|
|
(print-game-text (string-format "~S" (lookup-text! *common-text* (text-id progress-secrets-unlocked) #f)) arg2 #f 44 (bucket-id progress))
|
|
(set-flags! arg2 (font-flags kerning large))
|
|
)
|
|
)
|
|
)
|
|
(none)
|
|
)
|
|
|
|
|
|
(defmacro adjust-x-if-needed (x)
|
|
"adjust an x screen coord if ps2 vis is disabled"
|
|
`(if (not (-> *pc-settings* use-vis?)) (adjust-game-x (the float ,x)) ,x))
|
|
|
|
|
|
(defmethod draw-option menu-memcard-slot-option ((obj menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(local-vars
|
|
(sv-16 float)
|
|
(sv-20 int)
|
|
(sv-24 float)
|
|
(sv-28 float)
|
|
(sv-32 float)
|
|
(sv-36 float)
|
|
(sv-40 int)
|
|
(sv-48 int)
|
|
(sv-56 int)
|
|
(sv-64 int)
|
|
(sv-72 int)
|
|
(sv-80 int)
|
|
(sv-88 int)
|
|
(sv-96 string)
|
|
(sv-112 int)
|
|
)
|
|
(set! sv-16 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(set! sv-20 (-> arg0 option-index))
|
|
(set! sv-24 (-> arg1 origin x))
|
|
(set! sv-28 (-> arg1 origin y))
|
|
(set! sv-32 (-> arg1 width))
|
|
(set! sv-36 (-> arg1 height))
|
|
(set! sv-40 (if (= (get-aspect-ratio) 'aspect4x3)
|
|
300
|
|
305
|
|
)
|
|
)
|
|
(set! sv-48 (if (= (get-aspect-ratio) 'aspect4x3)
|
|
140
|
|
140
|
|
)
|
|
)
|
|
(set! sv-56 (if (= (get-aspect-ratio) 'aspect4x3)
|
|
64
|
|
48
|
|
)
|
|
)
|
|
(set! sv-64 69)
|
|
(set! sv-72 110)
|
|
(set! sv-80 176)
|
|
(set! sv-88 54)
|
|
(if (< sv-16 0.0)
|
|
(set! sv-16 (the-as float 0.0))
|
|
)
|
|
(set! (-> arg1 alpha) sv-16)
|
|
(cond
|
|
((not (-> *bigmap* progress-minimap))
|
|
(draw-busy-loading arg1)
|
|
(return 0)
|
|
)
|
|
(else
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! sv-40 (the int (adjust-game-x (the float sv-40))))
|
|
(set! sv-56 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-56)))
|
|
)
|
|
(let ((s2-3 arg1))
|
|
(set! (-> s2-3 color) (if (= arg2 sv-20)
|
|
(the-as font-color (the-as int (progress-selected 0)))
|
|
(font-color progress)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((= *save-options-title* (-> arg0 current-options))
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(set! (-> arg1 height) 52.0)
|
|
(+! (-> arg1 origin y) (the float (* 42 (+ arg2 1))))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -100.0))
|
|
(+! (-> arg1 origin x) -100.0))
|
|
)
|
|
(else
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! (-> arg1 origin y) 74.0)
|
|
(set! (-> arg1 height) 42.0)
|
|
(+! (-> arg1 origin y) (the float (* 60 (+ arg2 1))))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -90.0))
|
|
(+! (-> arg1 origin x) -90.0))
|
|
)
|
|
(('aspect4x3)
|
|
(set! (-> arg1 origin y) 74.0)
|
|
(set! (-> arg1 height) 42.0)
|
|
(+! (-> arg1 origin y) (the float (* 54 (+ arg2 1))))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -90.0))
|
|
(+! (-> arg1 origin x) -90.0))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(set-vector! (-> obj box 0 color) 64 128 128 (the int (* 128.0 sv-16)))
|
|
(when (= arg2 sv-20)
|
|
(cond
|
|
((!= *save-options-title* (-> arg0 current-options))
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! sv-64 79)
|
|
(set! sv-72 110)
|
|
(set! sv-80 166)
|
|
(set! sv-88 62)
|
|
)
|
|
)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! sv-64 (the int (adjust-game-x (the float sv-64))))
|
|
(set! sv-80 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-80)))
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float sv-64)
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
)
|
|
(when (!= arg2 3)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float sv-64)
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
(the float (+ (* sv-88 4) 2 sv-72))
|
|
)
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float sv-72)
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s1-0
|
|
sv-64
|
|
(+ sv-72 (* sv-88 arg2))
|
|
sv-80
|
|
sv-88
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 sv-16)))
|
|
)
|
|
)
|
|
)
|
|
((= *save-options-title* (-> arg0 current-options))
|
|
(set! sv-88 42)
|
|
(let ((v0-13 (get-aspect-ratio)))
|
|
(when (= v0-13 'aspect16x9)
|
|
(set! sv-64 79)
|
|
(set! sv-72 110)
|
|
(set! sv-80 166)
|
|
(set! sv-88 42)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
(the float (+ sv-72 (* 6 sv-88)))
|
|
)
|
|
)
|
|
)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! sv-64 (the int (adjust-game-x (the float sv-64))))
|
|
(set! sv-80 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) sv-80)))
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float sv-64)
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
)
|
|
(when (!= arg2 4)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float sv-64)
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-72 sv-88 (* sv-88 arg2)))
|
|
(the float (+ (* 5 sv-88) 2 sv-72))
|
|
)
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float (+ sv-64 sv-80))
|
|
(the float (+ sv-64 sv-80))
|
|
(the float sv-72)
|
|
(the float (+ sv-72 (* sv-88 arg2)))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s1-1
|
|
sv-64
|
|
(+ sv-72 (* sv-88 arg2))
|
|
sv-80
|
|
sv-88
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 sv-16)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((and *progress-save-info*
|
|
(= (-> *progress-save-info* formatted) 1)
|
|
(= (-> *progress-save-info* inited) 1)
|
|
(= (-> *progress-save-info* file arg2 present) 1)
|
|
)
|
|
(cond
|
|
((= arg2 sv-20)
|
|
(set-scale! arg1 0.8)
|
|
)
|
|
(else
|
|
(set-scale! arg1 0.6)
|
|
)
|
|
)
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 100))
|
|
(+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
100
|
|
105
|
|
))))
|
|
(print-game-text (string-format "~S ~D" (lookup-text! *common-text* (text-id progress-unknown-game) #f) (+ arg2 1))
|
|
arg1 #f 44 (bucket-id progress))
|
|
(set-color! arg1 (font-color progress))
|
|
(set! (-> arg1 origin x) 250.0)
|
|
(set! (-> arg1 origin y) 110.0)
|
|
(set! (-> arg1 width) 170.0)
|
|
(set! (-> arg1 height) 190.0)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
|
(let ((s2-8 (-> *progress-save-info* file arg2 level-index)))
|
|
(when (= arg2 sv-20)
|
|
(let ((v1-199 (-> obj sprites 0 color2)))
|
|
(set! (-> v1-199 0) 128)
|
|
(set! (-> v1-199 1) 128)
|
|
(set! (-> v1-199 2) 128)
|
|
(set! (-> v1-199 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(let ((v1-200 (-> obj sprites 1 color2)))
|
|
(set! (-> v1-200 0) 128)
|
|
(set! (-> v1-200 1) 128)
|
|
(set! (-> v1-200 2) 128)
|
|
(set! (-> v1-200 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> obj sprites 1 pos z) #xffffff)
|
|
(set! (-> obj sprites 1 pos w) 1)
|
|
(set! (-> obj sprites 1 tex) (lookup-texture-by-id (get-level-icon-id-01 s2-8)))
|
|
(set! (-> obj sprites 1 scale-x) 1.0)
|
|
(set! (-> obj sprites 1 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> obj sprites 1) sv-40 sv-48)
|
|
(let ((v1-205 (-> obj sprites 2 color2)))
|
|
(set! (-> v1-205 0) 128)
|
|
(set! (-> v1-205 1) 128)
|
|
(set! (-> v1-205 2) 128)
|
|
(set! (-> v1-205 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> obj sprites 2 pos z) #xffffff)
|
|
(set! (-> obj sprites 2 pos w) 1)
|
|
(set! (-> obj sprites 2 tex) (lookup-texture-by-id (get-level-icon-id-02 s2-8)))
|
|
(set! (-> obj sprites 2 scale-x) 1.0)
|
|
(set! (-> obj sprites 2 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> obj sprites 2) (+ sv-40 sv-56) sv-48)
|
|
(let ((v1-211 (-> obj sprites 3 color2)))
|
|
(set! (-> v1-211 0) 128)
|
|
(set! (-> v1-211 1) 128)
|
|
(set! (-> v1-211 2) 128)
|
|
(set! (-> v1-211 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> obj sprites 3 pos z) #xffffff)
|
|
(set! (-> obj sprites 3 pos w) 1)
|
|
(set! (-> obj sprites 3 tex) (lookup-texture-by-id (get-level-icon-id-03 s2-8)))
|
|
(set! (-> obj sprites 3 scale-x) 1.0)
|
|
(set! (-> obj sprites 3 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> obj sprites 3) sv-40 (+ sv-48 64))
|
|
(let ((v1-217 (-> obj sprites 4 color2)))
|
|
(set! (-> v1-217 0) 128)
|
|
(set! (-> v1-217 1) 128)
|
|
(set! (-> v1-217 2) 128)
|
|
(set! (-> v1-217 3) (the int (* 128.0 sv-16)))
|
|
)
|
|
(set! (-> obj sprites 4 pos z) #xffffff)
|
|
(set! (-> obj sprites 4 pos w) 1)
|
|
(set! (-> obj sprites 4 tex) (lookup-texture-by-id (get-level-icon-id-04 s2-8)))
|
|
(set! (-> obj sprites 4 scale-x) 1.0)
|
|
(set! (-> obj sprites 4 scale-y) 1.0)
|
|
(set-hud-piece-position! (-> obj sprites 4) (+ sv-40 sv-56) (+ sv-48 64))
|
|
(with-dma-buffer-add-bucket ((s1-7 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> obj sprites 1) s1-7 (-> *level* default-level))
|
|
(draw (-> obj sprites 2) s1-7 (-> *level* default-level))
|
|
(draw (-> obj sprites 3) s1-7 (-> *level* default-level))
|
|
(draw (-> obj sprites 4) s1-7 (-> *level* default-level))
|
|
)
|
|
(set-scale! arg1 0.6)
|
|
(set! (-> arg1 origin x) 265.0)
|
|
(set! (-> arg1 origin y) 263.0)
|
|
(set! (-> arg1 width) 170.0)
|
|
(set! (-> arg1 height) 52.0)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x)))))
|
|
(set! (-> obj sprites 0 scale-x) 0.7)
|
|
(set! (-> obj sprites 0 scale-y) 0.7)
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x4 :page #xc93)))
|
|
(set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 265) 263)
|
|
(with-dma-buffer-add-bucket ((s1-8 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> obj sprites 0) s1-8 (-> *level* default-level))
|
|
)
|
|
(+! (-> arg1 origin y) 1.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 28))
|
|
(+! (-> arg1 origin x) 28.0))
|
|
(let* ((v1-272 (-> *progress-save-info* file arg2 game-time0))
|
|
(v1-273 (logior (shl (-> *progress-save-info* file arg2 game-time1) 32) v1-272))
|
|
(s2-11 (/ (the-as int v1-273) #x107ac0))
|
|
)
|
|
(set! sv-112 (/ (mod (the-as int v1-273) #x107ac0) #x4650))
|
|
(print-game-text (string-format "~2,'0D:~2,'0D" s2-11 sv-112) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x6 :page #xc93)))
|
|
(set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 368) 263)
|
|
(with-dma-buffer-add-bucket ((s1-10 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> obj sprites 0) s1-10 (-> *level* default-level))
|
|
)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 100))
|
|
(+! (-> arg1 origin x) 100.0))
|
|
(print-game-text (string-format "~D%" (the int (-> *progress-save-info* file arg2 completion-percentage))) arg1 #f 44 (bucket-id progress))
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x5 :page #xc93)))
|
|
(set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 368) 289)
|
|
(with-dma-buffer-add-bucket ((s1-12 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> obj sprites 0) s1-12 (-> *level* default-level))
|
|
)
|
|
(+! (-> arg1 origin y) 28.0)
|
|
(print-game-text (string-format "~D" (the int (-> *progress-save-info* file arg2 skill-count))) arg1 #f 44 (bucket-id progress))
|
|
(set! (-> obj sprites 0 scale-x) 0.6)
|
|
(set! (-> obj sprites 0 scale-y) 0.6)
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x82 :page #xc93)))
|
|
(set-hud-piece-position! (-> obj sprites 0) (adjust-x-if-needed 253) 290)
|
|
(with-dma-buffer-add-bucket ((s1-14 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> obj sprites 0) s1-14 (-> *level* default-level))
|
|
)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -100))
|
|
(+! (-> arg1 origin x) -100.0))
|
|
(print-game-text (string-format "~D" (the int (-> *progress-save-info* file arg2 gem-count))) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
((and *progress-save-info*
|
|
(= (-> *progress-save-info* formatted) 1)
|
|
(= (-> *progress-save-info* inited) 1)
|
|
(zero? (-> *progress-save-info* file arg2 present))
|
|
)
|
|
(cond
|
|
((= arg2 sv-20)
|
|
(set-scale! arg1 0.8)
|
|
)
|
|
(else
|
|
(set-scale! arg1 0.6)
|
|
)
|
|
)
|
|
(set-flags! arg1 (font-flags kerning large))
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 100))
|
|
(+! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
100
|
|
105
|
|
))))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-slot-empty) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 origin x) sv-24)
|
|
(set! (-> arg1 origin y) sv-28)
|
|
(set! (-> arg1 width) sv-32)
|
|
(set! (-> arg1 height) sv-36)
|
|
(if (zero? arg2)
|
|
(draw-decoration-load-save obj arg1 sv-16 (if (= (-> arg0 current) 'select-load)
|
|
(text-id progress-select-file-to-load)
|
|
(text-id progress-select-file-to-save)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|
|
(defmethod draw-option menu-sub-menu-option ((obj menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
|
|
(s2-0 (the int (+ -1.0 (-> arg1 origin y))))
|
|
(s1-0 22)
|
|
)
|
|
(if (< f30-0 0.0)
|
|
(set! f30-0 0.0)
|
|
)
|
|
(set! (-> arg1 alpha) f30-0)
|
|
(set-scale! arg1 0.6)
|
|
(cond
|
|
((= *title* (-> arg0 current-options))
|
|
(set-scale! arg1 0.85)
|
|
(set! (-> arg1 height) 40.0)
|
|
(set! s1-0 36)
|
|
(+! s2-0 -8)
|
|
(when (memcard-unlocked-secrets? #f)
|
|
(+! (-> arg1 origin y) -35.0)
|
|
(set! s1-0 36)
|
|
(+! s2-0 -34)
|
|
)
|
|
)
|
|
((= *options* (-> arg0 current-options))
|
|
(+! (-> arg1 origin y) -20.0)
|
|
(set-scale! arg1 0.85)
|
|
(set! (-> arg1 height) 40.0)
|
|
(set! s1-0 37)
|
|
(+! s2-0 -28)
|
|
)
|
|
)
|
|
(when (nonzero? (-> obj name))
|
|
(let ((s0-0 arg1))
|
|
(set! (-> s0-0 color) (if (= arg2 (-> arg0 option-index))
|
|
(the-as font-color (the-as int (progress-selected 0)))
|
|
(font-color progress)
|
|
)
|
|
)
|
|
)
|
|
(cond
|
|
((= arg2 (-> arg0 option-index))
|
|
(set-color! arg1 (progress-selected 0))
|
|
)
|
|
(else
|
|
(set-color! arg1 (font-color progress))
|
|
)
|
|
)
|
|
(if (and (and (= arg2 (-> arg0 option-index)) (!= 298 (-> obj name)))
|
|
(not (and (= (-> obj name) (text-id progress-root-secrets))
|
|
(= *title* (-> arg0 current-options))
|
|
(not (memcard-unlocked-secrets? #f))
|
|
(= (-> arg0 option-index) 3)
|
|
)
|
|
)
|
|
)
|
|
(draw-highlight s2-0 s1-0 f30-0)
|
|
)
|
|
(cond
|
|
((= *save-options-title* (-> arg0 current-options))
|
|
(cond
|
|
((= (-> obj name) (text-id progress-continue-without-saving))
|
|
(cond
|
|
((= arg2 (-> arg0 option-index))
|
|
(set-scale! arg1 0.5)
|
|
)
|
|
(else
|
|
(set-scale! arg1 0.45)
|
|
)
|
|
)
|
|
(+! (-> arg1 origin y) -120.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(-! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) 10))
|
|
(-! (-> arg1 origin x) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
10
|
|
5
|
|
))))
|
|
(set! (-> arg1 width) (the float (if (= (get-aspect-ratio) 'aspect4x3)
|
|
180
|
|
170
|
|
)
|
|
)
|
|
)
|
|
(set! (-> arg1 height) 260.0)
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal)))
|
|
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
|
(when (= arg2 (-> arg0 option-index))
|
|
(let ((s4-1 69)
|
|
(s2-4 110)
|
|
(s3-1 176)
|
|
(s1-1 42)
|
|
)
|
|
(case (get-aspect-ratio)
|
|
(('aspect16x9)
|
|
(set! s4-1 79)
|
|
(set! s2-4 110)
|
|
(set! s3-1 166)
|
|
(set! s1-1 42)
|
|
(with-dma-buffer-add-bucket ((sv-16 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw-sprite2d-xy
|
|
sv-16
|
|
s4-1
|
|
(+ (* s1-1 arg2) 8 s1-1 s2-4)
|
|
s3-1
|
|
(+ s1-1 -8)
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 f30-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! s4-1 (adjust-game-x (the float s4-1)))
|
|
(set! s3-1 (the int (* (-> *pc-settings* aspect-ratio-reciprocal) s3-1)))
|
|
)
|
|
(set-vector! (-> obj box 0 color) 64 128 128 (the int (* 128.0 f30-0)))
|
|
(draw-savegame-box
|
|
obj
|
|
(the float s4-1)
|
|
(the float (+ s4-1 s3-1))
|
|
(the float (+ s2-4 (* s1-1 arg2)))
|
|
(the float (+ s2-4 (* s1-1 arg2)))
|
|
)
|
|
(draw-savegame-box
|
|
obj
|
|
(the float (+ s4-1 s3-1))
|
|
(the float (+ s4-1 s3-1))
|
|
(the float s2-4)
|
|
(the float (+ s2-4 (* s1-1 arg2)))
|
|
)
|
|
(with-dma-buffer-add-bucket ((s0-3 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id particles)
|
|
)
|
|
(draw-sprite2d-xy
|
|
s0-3
|
|
s4-1
|
|
(+ s2-4 (* s1-1 arg2))
|
|
s3-1
|
|
(+ s1-1 8)
|
|
(new 'static 'rgba :r #x40 :g #x40 :b #x40 :a (the int (* 64.0 f30-0)))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(else
|
|
(if (not (-> *pc-settings* use-vis?))
|
|
(+! (-> arg1 origin x) (* (-> *pc-settings* aspect-ratio-reciprocal) -100.0))
|
|
(+! (-> arg1 origin x) -100.0))
|
|
(set! (-> arg1 origin y) (+ -35.0 (-> arg1 origin y)))
|
|
)
|
|
)
|
|
)
|
|
((= *load-save-options* (-> arg0 current-options))
|
|
(+! (-> arg1 origin x) -100.0)
|
|
(+! (-> arg1 origin y) -25.0)
|
|
(print-menu-text (lookup-text! *common-text* (-> obj name) #f) (-> obj scale) arg1 arg0)
|
|
)
|
|
((and (= *title* (-> arg0 current-options))
|
|
(= (text-id progress-root-secrets) (-> obj name))
|
|
(memcard-unlocked-secrets? #f)
|
|
)
|
|
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
((!= (-> obj name) (text-id progress-root-secrets))
|
|
(print-game-text (lookup-text! *common-text* (-> obj name) #f) arg1 #f 44 (bucket-id progress))
|
|
)
|
|
)
|
|
)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|
|
|
|
(defmethod draw-option menu-icon-info-option ((obj menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
|
|
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
|
|
(set-color! arg1 (font-color progress))
|
|
(set-scale! arg1 0.5)
|
|
(set! (-> *bigmap* auto-save-icon-flag) #t)
|
|
(set! (-> obj sprites 0 tex) (lookup-texture-by-id (new 'static 'texture-id :index #x48 :page #x67a)))
|
|
(set! (-> obj sprites 0 scale-x) 1.0)
|
|
(set! (-> obj sprites 0 scale-y) 1.0)
|
|
(let ((v1-6 (-> obj sprites 0 color2)))
|
|
(set! (-> v1-6 0) 128)
|
|
(set! (-> v1-6 1) 128)
|
|
(set! (-> v1-6 2) 128)
|
|
(set! (-> v1-6 3) (the int (* 128.0 (- 1.0 (-> arg0 menu-transition)))))
|
|
)
|
|
(set! (-> obj sprites 0 pos z) #xffffff)
|
|
(set! (-> obj sprites 0 pos w) 0)
|
|
(set-hud-piece-position! (the-as hud-sprite (-> obj sprites)) (adjust-x-if-needed 240) 160)
|
|
(with-dma-buffer-add-bucket ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf))
|
|
(bucket-id progress)
|
|
)
|
|
(draw (-> obj sprites 0) s3-0 (-> *level* default-level))
|
|
)
|
|
(set-flags! arg1 (font-flags kerning middle left large))
|
|
(set! (-> arg1 origin x) 90.0)
|
|
(set! (-> arg1 origin y) 80.0)
|
|
(set-width! arg1 330)
|
|
(set-height! arg1 85)
|
|
(when (not (-> *pc-settings* use-vis?))
|
|
(set! (-> arg1 origin x) (the float (adjust-game-x (-> arg1 origin x))))
|
|
(*! (-> arg1 width) (-> *pc-settings* aspect-ratio-reciprocal))
|
|
)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-explanation) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 115.0)
|
|
(set-height! arg1 95)
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-autosave-dont-remove) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
(+! (-> arg1 origin y) 90.0)
|
|
(set-height! arg1 50)
|
|
(set-color! arg1 (progress-selected 0))
|
|
(draw-highlight (the int (+ 12.0 (-> arg1 origin y))) 24 (-> arg1 alpha))
|
|
(print-game-text
|
|
(lookup-text! *common-text* (text-id progress-unknown-continue) #f)
|
|
arg1
|
|
#f
|
|
44
|
|
(bucket-id progress)
|
|
)
|
|
0
|
|
(none)
|
|
)
|
|
|
|
|