[game] pc port progress menu (#1281)

* fix typo

* more typo

* shorten discord rpc text

* allow expanding enums after the fact (untested)

* make `game_text` work similar to subtitles

* update progress decomp

* update some types + `do-not-decompile` in bitfield

* fixes and fall back to original progress code

* update `progress` decomp with new enums

* update config files

* fix enums and debug menu

* always allocate (but not use) a lot of particles

* small rework to display mode options

* revert resolution/aspect-ratio symbol mess

* begin the override stuff

* make `progress-draw` more readable

* more fixes

* codacy good boy points

* first step overriding code

* finish progress overrides, game options menu fully functional!

* minor fixes

* Update game.gp

* Update sparticle-launcher.gc

* clang

* change camera controls text

* oops

* some cleanup

* derp

* nice job

* implement menu scrolling lol

* make scrollable menus less cramped, fix arrows

* make some carousell things i guess

* add msaa carousell to test

* oops

* Update progress-pc.gc

* make `pc-get-screen-size` (untested)

* resolution menu

* input fixes

* return when selecting resolution

* scroll fixes

* Update progress-pc.gc

* add "fit to screen" button

* bug

* complete resolutions menu

* aspect ratio menu

* subtitles language

* subtitle speaker

* final adjustments

* ref test

* fix tests

* fix ref!

* reduce redundancy a bit

* fix mem leaks?

* save settings on progress exit

* fix init reorder

* remove unused code

* rename goal project-like files to the project extension

* sha display toggle

* aspect ratio settings fixes

* dont store text db's in compiler

* properly save+load native aspect stuff
This commit is contained in:
ManDude
2022-04-11 23:38:54 +01:00
committed by GitHub
parent b408c78698
commit a7eee4fdc9
185 changed files with 6172 additions and 11465 deletions
+3 -3
View File
@@ -185,15 +185,15 @@
(debug-draw (_type_) none 9)
(fill-and-probe-using-line-sphere (_type_ vector vector float collide-kind process collide-tri-result int) float 10)
(fill-and-probe-using-spheres (_type_ collide-using-spheres-params) symbol 11)
(fill-and-probe-using-y-probe (_type_ vector float collide-kind process collide-tri-result uint) float 12)
(fill-and-probe-using-y-probe (_type_ vector float collide-kind process-drawable collide-tri-result pat-surface) float 12)
(fill-using-bounding-box (_type_ bounding-box collide-kind process-drawable pat-surface) none 13)
(fill-using-line-sphere (_type_ vector vector float collide-kind process-drawable int) none 14)
(fill-using-spheres (_type_ collide-using-spheres-params) none 15)
(fill-using-y-probe (_type_ vector float collide-kind process-drawable uint) none 16)
(fill-using-y-probe (_type_ vector float collide-kind process-drawable pat-surface) none 16)
(initialize (_type_) none 17)
(probe-using-line-sphere (_type_ vector vector float collide-kind collide-tri-result int) float 18)
(probe-using-spheres (_type_ collide-using-spheres-params) symbol 19)
(probe-using-y-probe (_type_ vector float collide-kind collide-tri-result uint) float 20)
(probe-using-y-probe (_type_ vector float collide-kind collide-tri-result pat-surface) float 20)
(fill-from-background (_type_ (function bsp-header int collide-list none) (function collide-cache object none)) none 21)
(fill-from-foreground-using-box (_type_) none 22)
(fill-from-foreground-using-line-sphere (_type_) none 23)
+4 -4
View File
@@ -377,7 +377,7 @@
(deftype collide-shape (trsqv)
((process process-drawable :offset-assert 140)
(max-iteration-count uint8 :offset-assert 144)
(nav-flags uint8 :offset-assert 145)
(nav-flags nav-flags :offset-assert 145)
(pad-byte uint8 2 :offset-assert 146)
(pat-ignore-mask pat-surface :offset-assert 148)
(event-self basic :offset-assert 152)
@@ -638,17 +638,17 @@
(let ((obj (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(set! (-> obj process) proc)
(set! (-> obj max-iteration-count) (the-as uint 1))
(set! (-> obj nav-flags) (the-as uint 1))
(set! (-> obj nav-flags) (nav-flags navf0))
(set! (-> obj event-self) #f)
(set! (-> obj event-other) #f)
(set! (-> obj riders) #f)
(set! (-> obj root-prim) #f)
(case (-> proc type symbol)
(('camera)
(set! (-> obj pat-ignore-mask) (new 'static 'pat-surface :skip #x2 :nocamera #x1))
(set! (-> obj pat-ignore-mask) (new 'static 'pat-surface :nocamera #x1))
)
(else
(set! (-> obj pat-ignore-mask) (new 'static 'pat-surface :skip #x1 :noentity #x1))
(set! (-> obj pat-ignore-mask) (new 'static 'pat-surface :noentity #x1))
)
)
(set! (-> obj trans w) 1.0)
+1 -1
View File
@@ -1629,7 +1629,7 @@
)
(toggle-pause)
)
(when (or (not *progress-process*) (dummy-32 (-> *progress-process* 0)))
(when (or (not *progress-process*) (can-go-back? (-> *progress-process* 0)))
(if (or (cpad-pressed? 0 select r3 start)
(and (logtest? (-> *cpad-list* cpads 0 valid) 128)
(= *master-mode* 'game)
+2 -2
View File
@@ -3003,9 +3003,9 @@
s2-1
(the-as float 81920.0)
(collide-kind background)
(the-as process #f)
(the-as process-drawable #f)
s1-1
(the-as uint 1)
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
+4 -4
View File
@@ -219,7 +219,7 @@
(((game-save-elt buzzer-total))
"buzzer-total"
)
(((game-save-elt moeny-per-level))
(((game-save-elt money-per-level))
"money-per-level"
)
(((game-save-elt money-total))
@@ -312,7 +312,7 @@
)
(when detail
(case (-> tag elt-type)
(((game-save-elt moeny-per-level) (game-save-elt deaths-per-level))
(((game-save-elt money-per-level) (game-save-elt deaths-per-level))
(dotimes (prog-lev-idx (-> tag elt-count))
(let ((lev-name (progress-level-index->string prog-lev-idx)))
(if lev-name
@@ -510,7 +510,7 @@
)
(let ((v1-56 (&+ v1-55 16)))
(let ((a0-30 (the-as game-save-tag (&+ v1-56 0))))
(set! (-> a0-30 elt-type) (game-save-elt moeny-per-level))
(set! (-> a0-30 elt-type) (game-save-elt money-per-level))
(set! (-> a0-30 elt-count) 32)
(set! (-> a0-30 elt-size) (the-as uint 1))
)
@@ -944,7 +944,7 @@
(((game-save-elt money-total))
(set! (-> obj money-total) (-> data user-float0))
)
(((game-save-elt moeny-per-level))
(((game-save-elt money-per-level))
(let ((v1-34 (min 32 (-> data elt-count))))
(dotimes (a0-76 v1-34)
(set! (-> obj money-per-level a0-76) (-> (the-as (pointer uint8) (&+ (the-as pointer data) 16)) a0-76))
+1 -1
View File
@@ -1099,7 +1099,7 @@
(-> obj root-override shadow-pos)
8192.0
(collide-kind background)
(the-as process #f)
(the-as process-drawable #f)
12288.0
81920.0
)
+19 -2
View File
@@ -115,14 +115,31 @@
;; definition for function find-ground-and-draw-shadow
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun find-ground-and-draw-shadow ((arg0 vector) (arg1 vector) (arg2 float) (arg3 collide-kind) (arg4 process) (arg5 float) (arg6 float))
(defun find-ground-and-draw-shadow ((arg0 vector)
(arg1 vector)
(arg2 float)
(arg3 collide-kind)
(arg4 process-drawable)
(arg5 float)
(arg6 float)
)
(let ((s2-0 (new 'stack-no-clear 'vector)))
(set! (-> s2-0 quad) (-> arg0 quad))
(new 'stack-no-clear 'vector)
(+! (-> s2-0 y) arg5)
(let ((s4-0 (new 'stack-no-clear 'collide-tri-result)))
(cond
((>= (fill-and-probe-using-y-probe *collide-cache* s2-0 arg6 arg3 arg4 s4-0 (the-as uint 1)) 0.0)
((>= (fill-and-probe-using-y-probe
*collide-cache*
s2-0
arg6
arg3
arg4
s4-0
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
(if (!= arg2 0.0)
(compute-and-draw-shadow s2-0 (-> s4-0 intersect) (-> s4-0 normal) (the-as vector arg2) arg6 (the-as float 0))
)
+1 -1
View File
@@ -499,7 +499,7 @@
(goto cfg-4)
)
(set! (-> obj max-spheres) sphere-count)
(set! (-> obj flags) (nav-control-flags bit8 bit13))
(set! (-> obj flags) (nav-control-flags navcf8 navcf13))
(set! (-> obj mesh) (nav-mesh-connect (-> shape process) shape obj))
(let ((ent (-> shape process entity)))
(set! (-> obj nearest-y-threshold)
+31 -31
View File
@@ -1271,14 +1271,14 @@
(let ((v1-1 (find-poly-fast obj arg0 arg1)))
(when v1-1
(if arg2
(set! (-> arg2 0) (logior (nav-control-flags bit20) (-> arg2 0)))
(set! (-> arg2 0) (logior (nav-control-flags navcf20) (-> arg2 0)))
)
(set! s3-1 v1-1)
(goto cfg-14)
)
)
(if arg2
(logclear! (-> arg2 0) (nav-control-flags bit20))
(logclear! (-> arg2 0) (nav-control-flags navcf20))
)
(let ((s2-0 (new 'stack-no-clear 'inline-array 'nav-vertex 3)))
(set! s3-1 (the-as nav-poly #f))
@@ -1750,7 +1750,7 @@
(when #t
(set! (-> s5-0 debug-time) (the-as uint (-> *display* actual-frame-counter)))
(add-debug-sphere
(logtest? (-> obj flags) (nav-control-flags bit1))
(logtest? (-> obj flags) (nav-control-flags navcf1))
(bucket-id debug-draw0)
(-> s5-0 bounds)
(-> s5-0 bounds w)
@@ -1758,7 +1758,7 @@
)
(add-debug-vector #t (bucket-id debug-draw1) (-> s5-0 origin) *x-vector* (meters 1.0) *color-red*)
(add-debug-vector #t (bucket-id debug-draw1) (-> s5-0 origin) *z-vector* (meters 1.0) *color-blue*)
(when (logtest? (-> obj flags) (nav-control-flags bit2))
(when (logtest? (-> obj flags) (nav-control-flags navcf2))
(dotimes (s3-0 (-> s5-0 vertex-count))
(add-debug-x
#t
@@ -1813,7 +1813,7 @@
)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit3))
(when (logtest? (-> obj flags) (nav-control-flags navcf3))
(dotimes (s3-2 (-> s5-0 poly-count))
(let ((s2-1 (-> s5-0 poly s3-2)))
(debug-draw-poly s5-0 s2-1 (the-as rgba (cond
@@ -1838,7 +1838,7 @@
)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit4))
(when (logtest? (-> obj flags) (nav-control-flags navcf4))
(let ((s1-1 add-debug-text-3d)
(s0-1 #t)
)
@@ -1862,7 +1862,7 @@
)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit5))
(when (logtest? (-> obj flags) (nav-control-flags navcf5))
(if (-> obj next-poly)
(debug-draw-poly s5-0 (-> obj next-poly) *color-cyan*)
)
@@ -1873,7 +1873,7 @@
(debug-draw-poly s5-0 (-> obj current-poly) *color-red*)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit7))
(when (logtest? (-> obj flags) (nav-control-flags navcf7))
(dotimes (s3-3 (the-as int (-> s5-0 static-sphere-count)))
(let ((s2-2 (-> s5-0 static-sphere s3-3)))
(add-debug-sphere #t (bucket-id debug-draw0) (the-as vector s2-2) (-> s2-2 trans w) *color-blue*)
@@ -1906,7 +1906,7 @@
)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit6))
(when (logtest? (-> obj flags) (nav-control-flags navcf6))
(when (and (-> obj portal 0) (-> obj portal 1))
(let ((v1-80 (-> s5-0 origin))
(a2-22 (new 'stack-no-clear 'vector))
@@ -1946,7 +1946,7 @@
(new 'static 'rgba :r #xff :g #xff :b #xff :a #x80)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit7))
(when (logtest? (-> obj flags) (nav-control-flags navcf7))
(add-debug-sphere
#t
(bucket-id debug-draw1)
@@ -2012,7 +2012,7 @@
;; INFO: Return type mismatch int vs none.
(defmethod set-current-poly! nav-control ((obj nav-control) (arg0 nav-poly))
(set! (-> obj current-poly) arg0)
(logior! (-> obj flags) (nav-control-flags bit9))
(logior! (-> obj flags) (nav-control-flags navcf9))
0
(none)
)
@@ -2066,7 +2066,7 @@
;; INFO: Return type mismatch int vs none.
;; Used lq/sq
(defun add-collide-shape-spheres ((arg0 nav-control) (arg1 collide-shape) (arg2 vector))
(when (logtest? (-> arg1 nav-flags) 1)
(when (logtest? (-> arg1 nav-flags) (nav-flags navf0))
(set! (-> arg2 quad) (-> arg1 root-prim prim-core world-sphere quad))
(set! (-> arg2 w) (-> arg1 nav-radius))
(let ((s4-0 arg0)
@@ -2088,7 +2088,7 @@
)
0
)
(when (logtest? (-> arg1 nav-flags) 2)
(when (logtest? (-> arg1 nav-flags) (nav-flags navf1))
(let ((s5-1 (-> arg1 process nav extra-nav-sphere)))
(when (< (-> arg0 num-spheres) (-> arg0 max-spheres))
(let* ((s4-1 (-> arg0 sphere (-> arg0 num-spheres)))
@@ -2127,13 +2127,13 @@
(s3-0 (new 'stack-no-clear 'vector))
)
(when (and *target*
(or (logtest? (-> obj flags) (nav-control-flags bit11)) (logtest? (-> *target* state-flags) #x80f8))
(or (logtest? (-> obj flags) (nav-control-flags navcf11)) (logtest? (-> *target* state-flags) #x80f8))
)
(let ((s2-0 obj)
(s1-0 (-> *target* control))
)
(let ((s0-0 s3-0))
(when (logtest? (-> s1-0 nav-flags) 1)
(when (logtest? (-> s1-0 nav-flags) (nav-flags navf0))
(set! (-> s0-0 quad) (-> s1-0 root-prim prim-core world-sphere quad))
(set! (-> s0-0 w) (-> s1-0 nav-radius))
(set! sv-32 s2-0)
@@ -2153,7 +2153,7 @@
0
)
)
(when (logtest? (-> s1-0 nav-flags) 2)
(when (logtest? (-> s1-0 nav-flags) (nav-flags navf1))
(let ((s1-1 (-> s1-0 process nav extra-nav-sphere)))
(when (< (-> s2-0 num-spheres) (-> s2-0 max-spheres))
(let* ((s0-1 (-> s2-0 sphere (-> s2-0 num-spheres)))
@@ -2173,7 +2173,7 @@
)
)
)
(when (logtest? (-> obj flags) (nav-control-flags bit13))
(when (logtest? (-> obj flags) (nav-control-flags navcf13))
(countdown (s2-1 (-> obj mesh static-sphere-count))
(let ((s1-2 obj)
(s0-2 (-> obj mesh static-sphere s2-1))
@@ -2203,7 +2203,7 @@
(when (not (or (= s0-3 (-> obj shape)) (zero? (logand arg0 (-> s0-3 root-prim prim-core collide-as)))))
(let ((s1-3 obj))
(set! sv-112 s3-0)
(when (logtest? (-> s0-3 nav-flags) 1)
(when (logtest? (-> s0-3 nav-flags) (nav-flags navf0))
(set! (-> sv-112 quad) (-> s0-3 root-prim prim-core world-sphere quad))
(set! (-> sv-112 w) (-> s0-3 nav-radius))
(set! sv-80 s1-3)
@@ -2226,7 +2226,7 @@
)
0
)
(when (logtest? (-> s0-3 nav-flags) 2)
(when (logtest? (-> s0-3 nav-flags) (nav-flags navf1))
(let ((s0-4 (-> s0-3 process nav extra-nav-sphere)))
(when (< (-> s1-3 num-spheres) (-> s1-3 max-spheres))
(set! sv-128 (-> s1-3 sphere (-> s1-3 num-spheres)))
@@ -2662,7 +2662,7 @@
(set! (-> obj blocked-travel quad) (-> obj travel quad))
(let ((f0-0 (vector-xz-length (-> obj travel))))
(when (and (>= f30-0 f0-0) (< f0-0 204.8))
(set! (-> obj flags) (logior (nav-control-flags bit17) (-> obj flags)))
(set! (-> obj flags) (logior (nav-control-flags navcf17) (-> obj flags)))
(set! (-> obj block-time) (-> *display* base-frame-counter))
(set! (-> obj block-count) (+ 1.0 (-> obj block-count)))
(if (-> obj block-event)
@@ -2709,21 +2709,21 @@
)
(cond
((or (vector= arg2 (-> obj target-pos)) (< (fabs f28-0) 364.0889))
(set! (-> obj flags) (logior (nav-control-flags bit21) (-> obj flags)))
(set! (-> obj flags) (logior (nav-control-flags navcf21) (-> obj flags)))
(set! (-> arg0 quad) (-> arg2 quad))
)
(else
(let ((s2-1 (vector-z-quaternion! (new 'stack-no-clear 'vector) (-> arg1 quat))))
(vector-rotate-y! s2-1 s2-1 (fmax (fmin f28-0 f30-0) (- f30-0)))
(vector-normalize! s2-1 819.2)
(logclear! (-> obj flags) (nav-control-flags bit21))
(logclear! (-> obj flags) (nav-control-flags navcf21))
(vector+! arg0 (-> arg1 trans) s2-1)
)
(when (or (not (dummy-16 obj arg0))
(logtest? (nav-control-flags bit17) (-> obj flags))
(zero? (logand (-> obj flags) (nav-control-flags bit10)))
(logtest? (nav-control-flags navcf17) (-> obj flags))
(zero? (logand (-> obj flags) (nav-control-flags navcf10)))
)
(set! (-> obj flags) (logior (nav-control-flags bit21) (-> obj flags)))
(set! (-> obj flags) (logior (nav-control-flags navcf21) (-> obj flags)))
(vector-! (-> obj travel) arg2 (-> arg1 trans))
(set! (-> arg0 quad) (-> arg2 quad))
)
@@ -2938,7 +2938,7 @@
v1-0
(-> obj current-poly)
(-> obj travel)
(zero? (logand (-> obj flags) (nav-control-flags bit12)))
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
arg0
arg1
)
@@ -3149,7 +3149,7 @@
sv-84
sv-88
(-> obj travel)
(zero? (logand (-> obj flags) (nav-control-flags bit12)))
(zero? (logand (-> obj flags) (nav-control-flags navcf12)))
204.8
s5-1
)
@@ -3254,9 +3254,9 @@
(set! (-> obj old-travel quad) (-> obj travel quad))
(-> obj block-count)
(set! (-> obj block-count) (seek (-> obj block-count) 0.0 0.016666668))
(logclear! (-> obj flags) (nav-control-flags bit9 bit17 bit18 bit19))
(logclear! (-> obj flags) (nav-control-flags navcf9 navcf17 navcf18 navcf19))
(TODO-RENAME-27 obj)
(if (logtest? (-> obj flags) (nav-control-flags bit8))
(if (logtest? (-> obj flags) (nav-control-flags navcf8))
(TODO-RENAME-28 obj (collide-kind
background
cak-1
@@ -3331,7 +3331,7 @@
(let ((s5-1 (new 'stack-no-clear 'nav-gap-info)))
(when (< (vector-xz-length (-> obj travel)) 204.8)
(cond
((logtest? (nav-control-flags bit17) (-> obj flags))
((logtest? (nav-control-flags navcf17) (-> obj flags))
)
((-> obj next-poly)
(cond
@@ -3349,7 +3349,7 @@
)
)
(else
(set! (-> obj flags) (logior (nav-control-flags bit19) (-> obj flags)))
(set! (-> obj flags) (logior (nav-control-flags navcf19) (-> obj flags)))
)
)
)
+1 -1
View File
@@ -1185,7 +1185,7 @@
(clear-pending-settings-from-process *setting-control* self 'process-mask)
(clear-pending-settings-from-process *setting-control* self 'allow-progress)
(restore-collide-with-as (-> self control))
(set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :skip #x1 :noentity #x1))
(set! (-> self control pat-ignore-mask) (new 'static 'pat-surface :noentity #x1))
(set! (-> self control dynam gravity-max) (-> self control unknown-dynamics00 gravity-max))
(set! (-> self control dynam gravity-length) (-> self control unknown-dynamics00 gravity-length))
(none)
+1 -1
View File
@@ -43,7 +43,7 @@
(collide-kind background cak-1 cak-2 cak-3 water powerup crate enemy wall-object ground-object mother-spider)
s5-0
s3-0
(the-as uint 1)
(new 'static 'pat-surface :noentity #x1)
)
0.0
)
+20 -20
View File
@@ -84,13 +84,13 @@
;; definition of type game-option
(deftype game-option (basic)
((option-type uint64 :offset-assert 8)
(name game-text-id :offset-assert 16)
(scale basic :offset-assert 20)
(param1 float :offset-assert 24)
(param2 float :offset-assert 28)
(param3 int32 :offset-assert 32)
(value-to-modify pointer :offset-assert 36)
((option-type game-option-type :offset-assert 8)
(name game-text-id :offset-assert 16)
(scale symbol :offset-assert 20)
(param1 float :offset-assert 24)
(param2 float :offset-assert 28)
(param3 game-option-menu :offset-assert 32)
(value-to-modify pointer :offset-assert 36)
)
:method-count-assert 9
:size-assert #x28
@@ -130,8 +130,8 @@
(force-transition basic :offset-assert 180)
(stat-transition basic :offset-assert 184)
(level-transition int32 :offset-assert 188)
(language-selection uint64 :offset-assert 192)
(language-direction basic :offset-assert 200)
(language-selection language-enum :offset-assert 192)
(language-direction symbol :offset-assert 200)
(language-transition basic :offset-assert 204)
(language-x-offset int32 :offset-assert 208)
(sides-x-scale float :offset-assert 212)
@@ -172,12 +172,12 @@
:size-assert #x2dc
:flag-assert #x3b027002dc
(:methods
(dummy-14 (_type_) none 14)
(dummy-15 (_type_) none 15)
(dummy-16 (_type_) none 16)
(progress-dummy-14 (_type_) none 14)
(progress-dummy-15 (_type_) none 15)
(progress-dummy-16 (_type_) none 16)
(draw-progress (_type_) none 17)
(dummy-18 () none 18)
(dummy-19 (_type_) symbol 19)
(progress-dummy-18 () none 18)
(visible? (_type_) symbol 19)
(hidden? (_type_) symbol 20)
(adjust-sprites (_type_) none 21)
(adjust-icons (_type_) none 22)
@@ -187,10 +187,10 @@
(draw-buzzer-screen (_type_ int) none 26)
(draw-notice-screen (_type_) none 27)
(draw-options (_type_ int int float) none 28)
(dummy-29 (_type_) none 29)
(respond-common (_type_) none 29)
(respond-progress (_type_) none 30)
(dummy-31 (_type_) none 31)
(dummy-32 (_type_) symbol 32)
(respond-memcard (_type_) none 31)
(can-go-back? (_type_) symbol 32)
(initialize-icons (_type_) none 33)
(initialize-particles (_type_) none 34)
(draw-memcard-storage-error (_type_ font-context) none 35)
@@ -202,16 +202,16 @@
(draw-memcard-auto-save-error (_type_ font-context) none 41)
(draw-memcard-removed (_type_ font-context) none 42)
(draw-memcard-error (_type_ font-context) none 43)
(dummy-44 (_type_) none 44)
(progress-dummy-44 (_type_) none 44)
(push! (_type_) none 45)
(pop! (_type_) none 46)
(dummy-47 (_type_) none 47)
(progress-dummy-47 (_type_) none 47)
(enter! (_type_ progress-screen int) none 48)
(draw-memcard-format (_type_ font-context) none 49)
(draw-auto-save (_type_ font-context) none 50)
(set-transition-progress! (_type_ int) none 51)
(set-transition-speed! (_type_) none 52)
(dummy-53 (_type_ progress-screen) progress-screen 53)
(set-memcard-screen (_type_ progress-screen) progress-screen 53)
(draw-pal-change-to-60hz (_type_ font-context) none 54)
(draw-pal-now-60hz (_type_ font-context) none 55)
(draw-no-disc (_type_ font-context) none 56)
+210 -210
View File
@@ -1579,7 +1579,7 @@
(sv-464 int)
(sv-480 int)
(sv-496 int)
(sv-512 uint)
(sv-512 int)
(sv-528 (function _varargs_ object))
(sv-544 string)
(sv-560 string)
@@ -1629,7 +1629,7 @@
(set! sv-144 s2-1)
(let ((v1-18 (-> s3-0 s0-0 option-type)))
(cond
((= v1-18 7)
((= v1-18 (game-option-type yes-no))
(cond
((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
(set! sv-160 format)
@@ -1655,7 +1655,7 @@
)
)
)
((or (= v1-18 6) (= v1-18 8))
((or (= v1-18 (game-option-type menu)) (= v1-18 (game-option-type button)))
(cond
((nonzero? (-> s3-0 s0-0 name))
(set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
@@ -1673,7 +1673,7 @@
)
(set! (-> sv-112 origin x) (the float (- sv-128 (-> obj left-x-offset))))
(case (-> s3-0 s0-0 option-type)
((3)
(((game-option-type center-screen))
(set! (-> sv-112 origin y) (the float (+ s2-1 -20)))
)
(else
@@ -1693,7 +1693,7 @@
(sv-288 a0-23 a1-11 a2-10 a3-4 t0-1)
)
(case (-> s3-0 s0-0 option-type)
((3)
(((game-option-type center-screen))
(set! sv-144 (+ s2-1 3))
sv-144
)
@@ -1702,243 +1702,243 @@
sv-144
)
)
(let ((v1-81 (-> s3-0 s0-0 option-type)))
(cond
((zero? v1-81)
(let* ((v1-82 (the-as uint #x8000ffff))
(f0-12 (* 0.01 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
(a0-34 (logior (logand v1-82 -256) (shr (shl (the int (+ 64.0 (* 191.0 f0-12))) 56) 56)))
(a3-5 (logior (logand a0-34 -65281) (shr (shl (shr (shl a0-34 56) 56) 56) 48)))
)
(draw-percent-bar (- 75 (-> obj left-x-offset)) (+ s2-1 8) f0-12 (the-as int a3-5))
)
(set! sv-304 format)
(let ((a0-42 (clear *temp-string*))
(a1-13 "~D")
(a2-12 (the int (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
)
(sv-304 a0-42 a1-13 a2-12)
)
(set! sv-912 *temp-string*)
(set! sv-128 (+ (the int (* 2.5 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) -100))
sv-128
)
((= v1-81 2)
(cond
((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
(set! sv-320 format)
(set! sv-336 (clear *temp-string*))
(set! sv-352 "~30L~S~0L ~S")
(set! sv-368 (lookup-text! *common-text* (game-text-id on) #f))
(let ((a3-6 (lookup-text! *common-text* (game-text-id off) #f)))
(sv-320 sv-336 sv-352 sv-368 a3-6)
(case (-> s3-0 s0-0 option-type)
(((game-option-type slider))
(let* ((v1-82 (the-as uint #x8000ffff))
(f0-12 (* 0.01 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
(a0-34 (logior (logand v1-82 -256) (shr (shl (the int (+ 64.0 (* 191.0 f0-12))) 56) 56)))
(a3-5 (logior (logand a0-34 -65281) (shr (shl (shr (shl a0-34 56) 56) 56) 48)))
)
(set! sv-912 *temp-string*)
sv-912
)
(else
(set! sv-384 format)
(set! sv-400 (clear *temp-string*))
(set! sv-416 "~0L~S ~30L~S~1L")
(set! sv-432 (lookup-text! *common-text* (game-text-id on) #f))
(let ((a3-7 (lookup-text! *common-text* (game-text-id off) #f)))
(sv-384 sv-400 sv-416 sv-432 a3-7)
)
(set! sv-912 *temp-string*)
sv-912
(draw-percent-bar (- 75 (-> obj left-x-offset)) (+ s2-1 8) f0-12 (the-as int a3-5))
)
(set! sv-304 format)
(let ((a0-42 (clear *temp-string*))
(a1-13 "~D")
(a2-12 (the int (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify)))))
)
(sv-304 a0-42 a1-13 a2-12)
)
(set! sv-912 *temp-string*)
(set! sv-128 (+ (the int (* 2.5 (-> (the-as (pointer float) (-> s3-0 s0-0 value-to-modify))))) -100))
sv-128
)
(((game-option-type on-off))
(cond
((-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
(set! sv-320 format)
(set! sv-336 (clear *temp-string*))
(set! sv-352 "~30L~S~0L ~S")
(set! sv-368 (lookup-text! *common-text* (game-text-id on) #f))
(let ((a3-6 (lookup-text! *common-text* (game-text-id off) #f)))
(sv-320 sv-336 sv-352 sv-368 a3-6)
)
(set! sv-912 *temp-string*)
sv-912
)
(else
(set! sv-384 format)
(set! sv-400 (clear *temp-string*))
(set! sv-416 "~0L~S ~30L~S~1L")
(set! sv-432 (lookup-text! *common-text* (game-text-id on) #f))
(let ((a3-7 (lookup-text! *common-text* (game-text-id off) #f)))
(sv-384 sv-400 sv-416 sv-432 a3-7)
)
(set! sv-912 *temp-string*)
sv-912
)
)
((= v1-81 1)
(set! sv-512 (-> obj language-selection))
(set! sv-448 (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))))
(if (and (zero? (scf-get-territory))
(not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2)))
)
(set! sv-464 5)
(set! sv-464 6)
)
(if (-> obj language-transition)
(set! (-> obj language-x-offset)
(seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
)
)
(when (>= (-> obj language-x-offset) 100)
(set! (-> obj language-selection) sv-448)
(set! sv-512 sv-448)
(set! (-> obj language-transition) #f)
(set! (-> obj language-x-offset) 0)
0
)
(((game-option-type language))
(set! sv-512 (the-as int (-> obj language-selection)))
(set! sv-448 (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))))
(if (and (zero? (scf-get-territory))
(not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2)))
)
(set! sv-464 5)
(set! sv-464 6)
)
(set! (-> sv-112 origin y) (the float (+ s2-1 3)))
(let ((a0-62 sv-112))
(set! (-> a0-62 color) (font-color lighter-lighter-blue))
(if (-> obj language-transition)
(set! (-> obj language-x-offset)
(seekl (-> obj language-x-offset) 200 (the int (* 10.0 (-> *display* time-adjust-ratio))))
)
)
(when (>= (-> obj language-x-offset) 100)
(set! (-> obj language-selection) (the-as language-enum sv-448))
(set! sv-512 (the-as int sv-448))
(set! (-> obj language-transition) #f)
(set! (-> obj language-x-offset) 0)
0
(set! sv-480 (mod (the-as int (+ sv-512 1)) sv-464))
(let ((a0-66 (mod (+ sv-464 -1 sv-512) sv-464))
(v1-153 (mod (the-as int (+ sv-512 2)) sv-464))
)
(set! sv-496 (mod (+ sv-464 -2 sv-512) sv-464))
(cond
((-> obj language-direction)
(let ((a2-22 (- 200 (+ (-> obj language-x-offset) 100))))
(print-language-name a0-66 sv-112 a2-22 #f)
)
(let ((a2-23 (+ (-> obj language-x-offset) 100)))
(cond
((< a2-23 150)
(let ((t9-27 print-language-name)
(a1-30 sv-112)
(a3-9 #t)
)
(t9-27 sv-480 a1-30 a2-23 a3-9)
)
)
(set! (-> sv-112 origin y) (the float (+ s2-1 3)))
(let ((a0-62 sv-112))
(set! (-> a0-62 color) (font-color lighter-lighter-blue))
)
0
(set! sv-480 (mod (+ sv-512 1) sv-464))
(let ((a0-66 (mod (+ sv-464 -1 sv-512) sv-464))
(v1-153 (mod (+ sv-512 2) sv-464))
)
(set! sv-496 (mod (+ sv-464 -2 sv-512) sv-464))
(cond
((-> obj language-direction)
(let ((a2-22 (- 200 (+ (-> obj language-x-offset) 100))))
(print-language-name a0-66 sv-112 a2-22 #f)
)
(let ((a2-23 (+ (-> obj language-x-offset) 100)))
(cond
((< a2-23 150)
(let ((t9-27 print-language-name)
(a1-30 sv-112)
(a3-9 #t)
)
(t9-27 sv-480 a1-30 a2-23 a3-9)
)
(else
(let ((a2-24 (- 200 (-> obj language-x-offset)))
(t9-28 print-language-name)
(a1-31 sv-112)
(a3-10 #f)
)
(t9-28 sv-496 a1-31 a2-24 a3-10)
)
)
(else
(let ((a2-24 (- 200 (-> obj language-x-offset)))
(t9-28 print-language-name)
(a1-31 sv-112)
(a3-10 #f)
)
(t9-28 sv-496 a1-31 a2-24 a3-10)
)
)
)
)
(else
(let ((a2-25 (+ (-> obj language-x-offset) 100)))
(cond
((< a2-25 150)
(print-language-name a0-66 sv-112 a2-25 #f)
)
(else
(let ((a2-26 (- 200 (-> obj language-x-offset))))
(print-language-name v1-153 sv-112 a2-26 #t)
)
)
(else
(let ((a2-25 (+ (-> obj language-x-offset) 100)))
(cond
((< a2-25 150)
(print-language-name a0-66 sv-112 a2-25 #f)
)
(else
(let ((a2-26 (- 200 (-> obj language-x-offset))))
(print-language-name v1-153 sv-112 a2-26 #t)
)
)
)
(let ((a2-27 (- 200 (+ (-> obj language-x-offset) 100))))
(print-language-name sv-480 sv-112 a2-27 #t)
)
)
(let ((a2-27 (- 200 (+ (-> obj language-x-offset) 100))))
(print-language-name sv-480 sv-112 a2-27 #t)
)
)
)
(when (not (-> obj language-transition))
(let ((a0-75 sv-112))
(set! (-> a0-75 color) (font-color yellow-green-2))
)
(when (not (-> obj language-transition))
(let ((a0-75 sv-112))
(set! (-> a0-75 color) (font-color yellow-green-2))
)
)
(let ((t9-32 print-language-name)
(a1-37 sv-112)
(a2-28 (-> obj language-x-offset))
(a3-14 (-> obj language-direction))
)
)
(let ((t9-32 print-language-name)
(a1-37 sv-112)
(a2-28 (-> obj language-x-offset))
(a3-14 (-> obj language-direction))
)
(t9-32 (the-as int sv-512) a1-37 a2-28 (the-as symbol a3-14))
)
(t9-32 sv-512 a1-37 a2-28 a3-14)
)
((= v1-81 3)
(set! sv-912 (lookup-text! *common-text* (game-text-id move-dpad) #f))
sv-912
)
((= v1-81 4)
(cond
((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'aspect4x3)
(set! sv-528 format)
(set! sv-544 (clear *temp-string*))
(set! sv-560 "~30L~S~0L ~S")
(set! sv-576 (lookup-text! *common-text* (game-text-id 4x3) #f))
(let ((a3-15 (lookup-text! *common-text* (game-text-id 16x9) #f)))
(sv-528 sv-544 sv-560 sv-576 a3-15)
)
(set! sv-912 *temp-string*)
sv-912
)
(((game-option-type center-screen))
(set! sv-912 (lookup-text! *common-text* (game-text-id move-dpad) #f))
sv-912
)
(((game-option-type aspect-ratio))
(cond
((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'aspect4x3)
(set! sv-528 format)
(set! sv-544 (clear *temp-string*))
(set! sv-560 "~30L~S~0L ~S")
(set! sv-576 (lookup-text! *common-text* (game-text-id 4x3) #f))
(let ((a3-15 (lookup-text! *common-text* (game-text-id 16x9) #f)))
(sv-528 sv-544 sv-560 sv-576 a3-15)
)
(else
(set! sv-592 format)
(set! sv-608 (clear *temp-string*))
(set! sv-624 "~0L~S ~30L~S~1L")
(set! sv-640 (lookup-text! *common-text* (game-text-id 4x3) #f))
(let ((a3-16 (lookup-text! *common-text* (game-text-id 16x9) #f)))
(sv-592 sv-608 sv-624 sv-640 a3-16)
)
(set! sv-912 *temp-string*)
sv-912
(set! sv-912 *temp-string*)
sv-912
)
(else
(set! sv-592 format)
(set! sv-608 (clear *temp-string*))
(set! sv-624 "~0L~S ~30L~S~1L")
(set! sv-640 (lookup-text! *common-text* (game-text-id 4x3) #f))
(let ((a3-16 (lookup-text! *common-text* (game-text-id 16x9) #f)))
(sv-592 sv-608 sv-624 sv-640 a3-16)
)
(set! sv-912 *temp-string*)
sv-912
)
)
((= v1-81 5)
(cond
((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'ntsc)
(set! sv-656 format)
(set! sv-672 (clear *temp-string*))
(set! sv-688 "~0L~S ~30L~S~1L")
(set! sv-704 (lookup-text! *common-text* (game-text-id 50hz) #f))
(let ((a3-17 (lookup-text! *common-text* (game-text-id 60hz) #f)))
(sv-656 sv-672 sv-688 sv-704 a3-17)
)
(set! sv-912 *temp-string*)
sv-912
)
(((game-option-type video-mode))
(cond
((= (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify))) 'ntsc)
(set! sv-656 format)
(set! sv-672 (clear *temp-string*))
(set! sv-688 "~0L~S ~30L~S~1L")
(set! sv-704 (lookup-text! *common-text* (game-text-id 50hz) #f))
(let ((a3-17 (lookup-text! *common-text* (game-text-id 60hz) #f)))
(sv-656 sv-672 sv-688 sv-704 a3-17)
)
(else
(set! sv-720 format)
(set! sv-736 (clear *temp-string*))
(set! sv-752 "~30L~S~0L ~S")
(set! sv-768 (lookup-text! *common-text* (game-text-id 50hz) #f))
(let ((a3-18 (lookup-text! *common-text* (game-text-id 60hz) #f)))
(sv-720 sv-736 sv-752 sv-768 a3-18)
)
(set! sv-912 *temp-string*)
sv-912
(set! sv-912 *temp-string*)
sv-912
)
(else
(set! sv-720 format)
(set! sv-736 (clear *temp-string*))
(set! sv-752 "~30L~S~0L ~S")
(set! sv-768 (lookup-text! *common-text* (game-text-id 50hz) #f))
(let ((a3-18 (lookup-text! *common-text* (game-text-id 60hz) #f)))
(sv-720 sv-736 sv-752 sv-768 a3-18)
)
(set! sv-912 *temp-string*)
sv-912
)
)
)
)
)
)
(else
(let ((v1-195 (-> s3-0 s0-0 option-type)))
(cond
((or (zero? v1-195) (= v1-195 3) (= v1-195 4) (= v1-195 5))
(set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
sv-912
)
((= v1-195 2)
(set! sv-784 format)
(set! sv-800 (clear *temp-string*))
(set! sv-816 "~S: ~S")
(set! sv-832 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
(let ((a3-19 (if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
(lookup-text! *common-text* (game-text-id on) #f)
(lookup-text! *common-text* (game-text-id off) #f)
)
)
)
(sv-784 sv-800 sv-816 sv-832 a3-19)
)
(set! sv-912 *temp-string*)
sv-912
)
((= v1-195 1)
(set! sv-848 format)
(set! sv-864 (clear *temp-string*))
(set! sv-880 "~S: ~S")
(set! sv-896 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
(let ((a3-20 (lookup-text!
*common-text*
(-> *language-name-remap* (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))))
#f
)
)
)
(sv-848 sv-864 sv-880 sv-896 a3-20)
)
(set! sv-912 *temp-string*)
sv-912
)
(case (-> s3-0 s0-0 option-type)
(((game-option-type slider)
(game-option-type center-screen)
(game-option-type aspect-ratio)
(game-option-type video-mode)
)
(set! sv-912 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
sv-912
)
(((game-option-type on-off))
(set! sv-784 format)
(set! sv-800 (clear *temp-string*))
(set! sv-816 "~S: ~S")
(set! sv-832 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
(let ((a3-19 (if (-> (the-as (pointer uint32) (-> s3-0 s0-0 value-to-modify)))
(lookup-text! *common-text* (game-text-id on) #f)
(lookup-text! *common-text* (game-text-id off) #f)
)
)
)
(sv-784 sv-800 sv-816 sv-832 a3-19)
)
(set! sv-912 *temp-string*)
sv-912
)
(((game-option-type language))
(set! sv-848 format)
(set! sv-864 (clear *temp-string*))
(set! sv-880 "~S: ~S")
(set! sv-896 (lookup-text! *common-text* (-> s3-0 s0-0 name) #f))
(let ((a3-20 (lookup-text!
*common-text*
(-> *language-name-remap* (-> (the-as (pointer uint64) (-> s3-0 s0-0 value-to-modify))))
#f
)
)
)
(sv-848 sv-864 sv-880 sv-896 a3-20)
)
(set! sv-912 *temp-string*)
sv-912
)
)
)
)
File diff suppressed because it is too large Load Diff
+134 -144
View File
@@ -10,7 +10,7 @@
(starting-state progress-screen :offset-assert 24)
(last-slot-saved int32 :offset-assert 32)
(slider-backup float :offset-assert 36)
(language-backup int64 :offset-assert 40)
(language-backup language-enum :offset-assert 40)
(on-off-backup symbol :offset-assert 48)
(center-x-backup int32 :offset-assert 52)
(center-y-backup int32 :offset-assert 56)
@@ -1065,7 +1065,7 @@
)
;; definition for method 32 of type progress
(defmethod dummy-32 progress ((obj progress))
(defmethod can-go-back? progress ((obj progress))
(let ((v1-2 (-> *progress-process* 0 display-state))
(a1-1 (-> *progress-state* starting-state))
)
@@ -1095,7 +1095,7 @@
;; definition for method 19 of type progress
;; INFO: Return type mismatch object vs symbol.
(defmethod dummy-19 progress ((obj progress))
(defmethod visible? progress ((obj progress))
(the-as symbol (and *progress-process* (zero? (-> *progress-process* 0 in-out-position))))
)
@@ -1147,7 +1147,7 @@
)
;; definition for method 53 of type progress
(defmethod dummy-53 progress ((obj progress) (arg0 progress-screen))
(defmethod set-memcard-screen progress ((obj progress) (arg0 progress-screen))
(let ((s4-0 (-> obj card-info))
(gp-0 arg0)
)
@@ -1250,7 +1250,7 @@
;; definition for method 31 of type progress
;; INFO: Return type mismatch int vs none.
(defmethod dummy-31 progress ((obj progress))
(defmethod respond-memcard progress ((obj progress))
(let ((s5-0 (-> obj card-info)))
(when (and s5-0 (not (-> obj in-transition)))
(when (or (cpad-pressed? 0 x) (cpad-pressed? 0 circle))
@@ -1307,14 +1307,12 @@
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(set! (-> obj next-display-state) (progress-screen memcard-saving))
)
((begin
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(= (-> obj display-state-stack 0) (progress-screen title))
)
(set! (-> obj next-display-state) (progress-screen save-game-title))
)
(else
(set! (-> obj next-display-state) (progress-screen save-game))
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(if (= (-> obj display-state-stack 0) (progress-screen title))
(set! (-> obj next-display-state) (progress-screen save-game-title))
(set! (-> obj next-display-state) (progress-screen save-game))
)
)
)
)
@@ -1443,7 +1441,7 @@
;; definition for method 29 of type progress
;; INFO: Return type mismatch int vs none.
(defmethod dummy-29 progress ((obj progress))
(defmethod respond-common progress ((obj progress))
(mc-get-slot-info 0 *progress-save-info*)
(set! (-> obj card-info) *progress-save-info*)
(let ((s5-0 (-> *options-remap* (-> obj display-state))))
@@ -1467,7 +1465,7 @@
(when (-> obj selected-option)
(let ((v1-34 #f))
(case (-> s5-0 (-> obj option-index) option-type)
((3)
(((game-option-type center-screen))
(when (< -48 (-> *setting-control* current screeny))
(set! v1-34 #t)
(+! (-> *setting-control* default screeny) -1)
@@ -1508,7 +1506,7 @@
(when (-> obj selected-option)
(let ((v1-69 #f))
(case (-> s5-0 (-> obj option-index) option-type)
((3)
(((game-option-type center-screen))
(when (< (-> *setting-control* current screeny) 48)
(set! v1-69 #t)
(+! (-> *setting-control* default screeny) 1)
@@ -1529,10 +1527,10 @@
((cpad-hold? 0 left)
(cond
((cpad-pressed? 0 left)
(when (or (-> obj selected-option) (= (-> s5-0 (-> obj option-index) option-type) 7))
(when (or (-> obj selected-option) (= (-> s5-0 (-> obj option-index) option-type) (game-option-type yes-no)))
(let ((s4-5 #f))
(case (-> s5-0 (-> obj option-index) option-type)
((2 7)
(((game-option-type on-off) (game-option-type yes-no))
(when (not (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
(set! s4-5 #t)
(if (= (-> s5-0 (-> obj option-index) value-to-modify) (&-> *setting-control* current vibration))
@@ -1541,15 +1539,15 @@
)
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) #t)
)
((4)
(((game-option-type aspect-ratio))
(set! s4-5 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'aspect16x9))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'aspect4x3)
)
((5)
(((game-option-type video-mode))
(set! s4-5 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'ntsc))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'pal)
)
((1)
(((game-option-type language))
(if (> (the-as int (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify)))) 0)
(+! (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify))) -1)
(set! (-> (the-as (pointer int64) (-> s5-0 (-> obj option-index) value-to-modify)))
@@ -1575,35 +1573,33 @@
(else
(when (-> obj selected-option)
(let ((v1-157 #f))
(let ((a0-101 (-> s5-0 (-> obj option-index) option-type)))
(cond
((zero? a0-101)
(cond
((>= (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(+ 1.0 (-> s5-0 (-> obj option-index) param1))
(case (-> s5-0 (-> obj option-index) option-type)
(((game-option-type slider))
(cond
((>= (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(+ 1.0 (-> s5-0 (-> obj option-index) param1))
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(+ -1.0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))))
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(+ -1.0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))))
)
(set! v1-157 #t)
)
((< (-> s5-0 (-> obj option-index) param1)
(-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> s5-0 (-> obj option-index) param1)
)
(set! v1-157 #t)
)
)
(set! v1-157 #t)
)
((< (-> s5-0 (-> obj option-index) param1)
(-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> s5-0 (-> obj option-index) param1)
)
(set! v1-157 #t)
)
)
((= a0-101 3)
(when (< -96 (-> *setting-control* default screenx))
(set! v1-157 #t)
(+! (-> *setting-control* default screenx) -1)
)
)
(((game-option-type center-screen))
(when (< -96 (-> *setting-control* default screenx))
(set! v1-157 #t)
(+! (-> *setting-control* default screenx) -1)
)
)
)
)
(when v1-157
(let ((f30-0 100.0))
@@ -1626,22 +1622,22 @@
((cpad-hold? 0 right)
(cond
((cpad-pressed? 0 right)
(when (or (-> obj selected-option) (= (-> s5-0 (-> obj option-index) option-type) 7))
(when (or (-> obj selected-option) (= (-> s5-0 (-> obj option-index) option-type) (game-option-type yes-no)))
(let ((v1-217 (the-as object #f)))
(case (-> s5-0 (-> obj option-index) option-type)
((2 7)
(((game-option-type on-off) (game-option-type yes-no))
(set! v1-217 (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) #f)
)
((4)
(((game-option-type aspect-ratio))
(set! v1-217 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'aspect4x3))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'aspect16x9)
)
((5)
(((game-option-type video-mode))
(set! v1-217 (= (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'pal))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0) 'ntsc)
)
((1)
(((game-option-type language))
(let ((v1-243 (if (and (zero? (scf-get-territory))
(not (and (= *progress-cheat* 'language) (cpad-hold? 0 l2) (cpad-hold? 0 r2)))
)
@@ -1674,35 +1670,33 @@
(else
(when (-> obj selected-option)
(let ((v1-263 #f))
(let ((a0-177 (-> s5-0 (-> obj option-index) option-type)))
(cond
((zero? a0-177)
(cond
((>= (+ -1.0 (-> s5-0 (-> obj option-index) param2))
(-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(case (-> s5-0 (-> obj option-index) option-type)
(((game-option-type slider))
(cond
((>= (+ -1.0 (-> s5-0 (-> obj option-index) param2))
(-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(+ 1.0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))))
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(+ 1.0 (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify))))
)
(set! v1-263 #t)
)
((< (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> s5-0 (-> obj option-index) param2)
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> s5-0 (-> obj option-index) param2)
)
(set! v1-263 #t)
)
)
(set! v1-263 #t)
)
((< (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> s5-0 (-> obj option-index) param2)
)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> s5-0 (-> obj option-index) param2)
)
(set! v1-263 #t)
)
)
((= a0-177 3)
(when (< (-> *setting-control* default screenx) 96)
(set! v1-263 #t)
(+! (-> *setting-control* default screenx) 1)
)
)
(((game-option-type center-screen))
(when (< (-> *setting-control* default screenx) 96)
(set! v1-263 #t)
(+! (-> *setting-control* default screenx) 1)
)
)
)
)
(when v1-263
(let ((f30-1 100.0))
@@ -1725,38 +1719,36 @@
((or (cpad-pressed? 0 square) (cpad-pressed? 0 triangle))
(cond
((-> obj selected-option)
(let ((v1-319 (-> s5-0 (-> obj option-index) option-type)))
(cond
((zero? v1-319)
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> *progress-state* slider-backup)
)
)
((= v1-319 1)
(set! (-> (the-as (pointer int64) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> *progress-state* language-backup)
)
)
((= v1-319 2)
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0)
(-> *progress-state* on-off-backup)
)
)
((= v1-319 3)
(set! (-> *setting-control* default screenx) (-> *progress-state* center-x-backup))
(set! (-> *setting-control* default screeny) (-> *progress-state* center-y-backup))
)
((or (= v1-319 4) (= v1-319 5))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0)
(-> *progress-state* aspect-ratio-backup)
)
)
)
(case (-> s5-0 (-> obj option-index) option-type)
(((game-option-type slider))
(set! (-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
(-> *progress-state* slider-backup)
)
)
(((game-option-type language))
(set! (-> (the-as (pointer language-enum) (-> s5-0 (-> obj option-index) value-to-modify)) 0)
(-> *progress-state* language-backup)
)
)
(((game-option-type on-off))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0)
(-> *progress-state* on-off-backup)
)
)
(((game-option-type center-screen))
(set! (-> *setting-control* default screenx) (-> *progress-state* center-x-backup))
(set! (-> *setting-control* default screeny) (-> *progress-state* center-y-backup))
)
(((game-option-type aspect-ratio) (game-option-type video-mode))
(set! (-> (the-as (pointer symbol) (-> s5-0 (-> obj option-index) value-to-modify)) 0)
(-> *progress-state* aspect-ratio-backup)
)
)
)
(sound-play-by-name (static-sound-name "cursor-options") (new-sound-id) 1024 0 0 1 #t)
(set! (-> obj selected-option) #f)
)
((or (dummy-32 obj)
((or (can-go-back? obj)
(= (-> obj display-state) (progress-screen load-game))
(= (-> obj display-state) (progress-screen save-game))
(= (-> obj display-state) (progress-screen save-game-title))
@@ -1778,7 +1770,7 @@
(cond
((not (-> obj selected-option))
(cond
((= (-> s5-0 (-> obj option-index) option-type) 6)
((= (-> s5-0 (-> obj option-index) option-type) (game-option-type menu))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x))
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle))
@@ -1788,11 +1780,11 @@
(set! (-> obj next-display-state) (the-as progress-screen (-> s5-0 (-> obj option-index) param3)))
(case (-> obj next-display-state)
(((progress-screen load-game) (progress-screen save-game) (progress-screen save-game-title))
(set! (-> obj next-display-state) (dummy-53 obj (-> obj next-display-state)))
(set! (-> obj next-display-state) (set-memcard-screen obj (-> obj next-display-state)))
)
)
)
((= (-> s5-0 (-> obj option-index) option-type) 8)
((= (-> s5-0 (-> obj option-index) option-type) (game-option-type button))
(cond
((= (-> s5-0 (-> obj option-index) name) (game-text-id exit-demo))
(set! *master-exit* 'force)
@@ -1808,34 +1800,32 @@
)
)
)
((!= (-> s5-0 (-> obj option-index) option-type) 7)
(let ((v1-427 (-> s5-0 (-> obj option-index) option-type)))
(cond
((zero? v1-427)
(set! (-> *progress-state* slider-backup)
(-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
)
)
((= v1-427 1)
(set! (-> *progress-state* language-backup)
(the-as int (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
((= v1-427 2)
(set! (-> *progress-state* on-off-backup)
(the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
((= v1-427 3)
(set! (-> *progress-state* center-x-backup) (-> *setting-control* default screenx))
(set! (-> *progress-state* center-y-backup) (-> *setting-control* default screeny))
)
((or (= v1-427 4) (= v1-427 5))
(set! (-> *progress-state* aspect-ratio-backup)
(the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
)
((!= (-> s5-0 (-> obj option-index) option-type) (game-option-type yes-no))
(case (-> s5-0 (-> obj option-index) option-type)
(((game-option-type slider))
(set! (-> *progress-state* slider-backup)
(-> (the-as (pointer float) (-> s5-0 (-> obj option-index) value-to-modify)))
)
)
(((game-option-type language))
(set! (-> *progress-state* language-backup)
(the-as language-enum (-> (the-as (pointer uint64) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
(((game-option-type on-off))
(set! (-> *progress-state* on-off-backup)
(the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
(((game-option-type center-screen))
(set! (-> *progress-state* center-x-backup) (-> *setting-control* default screenx))
(set! (-> *progress-state* center-y-backup) (-> *setting-control* default screeny))
)
(((game-option-type aspect-ratio) (game-option-type video-mode))
(set! (-> *progress-state* aspect-ratio-backup)
(the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
)
(sound-play-by-name (static-sound-name "select-option") (new-sound-id) 1024 0 0 1 #t)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons x))
@@ -1843,8 +1833,8 @@
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons circle))
(logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle))
(set! (-> obj selected-option) #t)
(when (= (-> s5-0 (-> obj option-index) option-type) 1)
(set! (-> obj language-selection) (the-as uint (-> *setting-control* current language)))
(when (= (-> s5-0 (-> obj option-index) option-type) (game-option-type language))
(set! (-> obj language-selection) (-> *setting-control* current language))
(set! (-> obj language-direction) #t)
(set! (-> obj language-transition) #f)
(set! (-> obj language-x-offset) 0)
@@ -1857,12 +1847,12 @@
(sound-play-by-name (static-sound-name "start-options") (new-sound-id) 1024 0 0 1 #t)
(set! (-> obj selected-option) #f)
(case (-> s5-0 (-> obj option-index) option-type)
((4)
(((game-option-type aspect-ratio))
(set! (-> *setting-control* default aspect-ratio)
(the-as symbol (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify))))
)
)
((5)
(((game-option-type video-mode))
(case (-> (the-as (pointer uint32) (-> s5-0 (-> obj option-index) value-to-modify)))
(('pal)
(set! (-> *setting-control* default video-mode)
@@ -1875,7 +1865,7 @@
)
)
)
((1)
(((game-option-type language))
(if (not (-> obj language-transition))
(load-level-text-files (-> obj display-level-index))
)
@@ -2238,8 +2228,8 @@
)
)
)
(dummy-29 self)
(set! (-> self next-display-state) (dummy-53 self (-> self next-display-state)))
(respond-common self)
(set! (-> self next-display-state) (set-memcard-screen self (-> self next-display-state)))
(let ((v1-74 (-> self display-state)))
(cond
((or (= v1-74 (progress-screen fuel-cell))
@@ -2270,7 +2260,7 @@
(= v1-74 (progress-screen bad-disc))
(= v1-74 (progress-screen quit))
)
(dummy-31 self)
(respond-memcard self)
)
)
)