deftype and defmethod syntax major changes (#3094)

Major change to how `deftype` shows up in our code:
- the decompiler will no longer emit the `offset-assert`,
`method-count-assert`, `size-assert` and `flag-assert` parameters. There
are extremely few cases where having this in the decompiled code is
helpful, as the types there come from `all-types` which already has
those parameters. This also doesn't break type consistency because:
  - the asserts aren't compared.
- the first step of the test uses `all-types`, which has the asserts,
which will throw an error if they're bad.
- the decompiler won't emit the `heap-base` parameter unless necessary
now.
- the decompiler will try its hardest to turn a fixed-offset field into
an `overlay-at` field. It falls back to the old offset if all else
fails.
- `overlay-at` now supports field "dereferencing" to specify the offset
that's within a field that's a structure, e.g.:
```lisp
(deftype foobar (structure)
  ((vec    vector  :inline)
   (flags  int32   :overlay-at (-> vec w))
   )
  )
```
in this structure, the offset of `flags` will be 12 because that is the
final offset of `vec`'s `w` field within this structure.
- **removed ID from all method declarations.** IDs are only ever
automatically assigned now. Fixes #3068.
- added an `:overlay` parameter to method declarations, in order to
declare a new method that goes on top of a previously-defined method.
Syntax is `:overlay <method-name>`. Please do not ever use this.
- added `state-methods` list parameter. This lets you quickly specify a
list of states to be put in the method table. Same syntax as the
`states` list parameter. The decompiler will try to put as many states
in this as it can without messing with the method ID order.

Also changes `defmethod` to make the first type definition (before the
arguments) optional. The type can now be inferred from the first
argument. Fixes #3093.

---------

Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
This commit is contained in:
ManDude
2023-10-30 03:20:02 +00:00
committed by GitHub
parent 09536c68ac
commit cd68cb671e
2079 changed files with 94384 additions and 117066 deletions
@@ -627,12 +627,12 @@
(the-as pointer 0)
)
(defmethod draw-option menu-option ((this menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
0
(none)
)
(defmethod draw-option menu-on-off-option ((this menu-on-off-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-on-off-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-8 string) (sv-16 string))
(let ((s3-0 (if arg3
(&-> *progress-state* on-off-choice)
@@ -696,7 +696,7 @@
(none)
)
(defmethod draw-option menu-yes-no-option ((this menu-yes-no-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-yes-no-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-8 string))
(let ((s3-0 (&-> *progress-state* yes-no-choice)))
(set! a0-8
@@ -742,7 +742,7 @@
(none)
)
(defmethod draw-option menu-video-mode-option ((this menu-video-mode-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-video-mode-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(let ((s3-0 (&-> *progress-state* video-mode-choice))
(f28-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
(f30-0 (-> arg1 origin y))
@@ -852,7 +852,7 @@
(none)
)
(defmethod draw-option menu-unlocked-menu-option ((this menu-unlocked-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-unlocked-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(let ((s5-0 (memcard-unlocked-secrets? #t))
(f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
)
@@ -1033,7 +1033,7 @@
(none)
)
(defmethod draw-option menu-main-menu-option ((this menu-main-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-main-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(-> arg1 flags)
(when (and (= (-> arg0 menu-transition) 0.0) (and (= (-> arg0 ring-angle) (-> arg0 ring-want-angle))
(nonzero? (-> this name))
@@ -1949,7 +1949,7 @@
)
)
(defmethod draw-option menu-memcard-slot-option ((this menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-memcard-slot-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars
(v0-74 pointer)
(sv-16 float)
@@ -2385,7 +2385,7 @@
(none)
)
(defmethod draw-option menu-loading-option ((this menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((v1-3 arg1))
@@ -2440,7 +2440,7 @@
(none)
)
(defmethod draw-option menu-insufficient-space-option ((this menu-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(when (!= (-> arg0 current) 'none)
(let ((v1-3 arg1))
@@ -2531,7 +2531,7 @@
(none)
)
(defmethod draw-option menu-secrets-insufficient-space-option ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((v1-1 arg1))
(set! (-> v1-1 scale) 0.5)
@@ -2576,7 +2576,7 @@
(none)
)
(defmethod draw-option menu-insert-card-option ((this menu-insert-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-insert-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((v1-1 arg1))
(set! (-> v1-1 scale) 0.5)
@@ -2622,7 +2622,7 @@
(none)
)
(defmethod draw-option menu-error-loading-option ((this menu-error-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-error-loading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((v1-1 arg1))
(set! (-> v1-1 scale) 0.5)
@@ -2689,7 +2689,7 @@
(none)
)
(defmethod draw-option menu-error-auto-saving-option ((this menu-error-auto-saving-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-error-auto-saving-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((v1-1 arg1))
(set! (-> v1-1 scale) 0.5)
@@ -2764,7 +2764,7 @@
(none)
)
(defmethod draw-option menu-card-removed-option ((this menu-card-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-card-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((v1-1 arg1))
(set! (-> v1-1 scale) 0.5)
@@ -2825,7 +2825,7 @@
(none)
)
(defmethod draw-option menu-error-disc-removed-option ((this menu-error-disc-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-error-disc-removed-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((a0-1 arg1))
(set! (-> a0-1 color) (font-color progress))
@@ -2883,7 +2883,7 @@
(none)
)
(defmethod draw-option menu-error-reading-option ((this menu-error-reading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-error-reading-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((a0-1 arg1))
(set! (-> a0-1 color) (font-color progress))
@@ -2939,7 +2939,7 @@
(none)
)
(defmethod draw-option menu-icon-info-option ((this menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-icon-info-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(let ((a0-1 arg1))
(set! (-> a0-1 color) (font-color progress))
@@ -3013,7 +3013,7 @@
(none)
)
(defmethod draw-option menu-format-card-option ((this menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-format-card-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.5)
@@ -3056,7 +3056,7 @@
(none)
)
(defmethod draw-option menu-already-exists-option ((this menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-already-exists-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.5)
@@ -3093,7 +3093,7 @@
(none)
)
(defmethod draw-option menu-create-game-option ((this menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-create-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.5)
@@ -3127,7 +3127,7 @@
(none)
)
(defmethod draw-option menu-video-mode-warning-option ((this menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-video-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.5)
@@ -3182,7 +3182,7 @@
(none)
)
(defmethod draw-option menu-video-mode-ok-option ((this menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-video-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.5)
@@ -3219,7 +3219,7 @@
(none)
)
(defmethod draw-option menu-progressive-mode-warning-option ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.5)
@@ -3274,7 +3274,7 @@
(none)
)
(defmethod draw-option menu-progressive-mode-ok-option ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.55)
@@ -3311,7 +3311,7 @@
(none)
)
(defmethod draw-option menu-quit-option ((this menu-quit-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-quit-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(set! (-> arg1 alpha) (- 1.0 (-> arg0 menu-transition)))
(set-color! arg1 (font-color progress))
(set-scale! arg1 0.55)
@@ -3341,7 +3341,7 @@
(defglobalconstant COMPACT_SELECT_START #f)
;; WARN: disable def twice: 147. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod draw-option menu-select-start-option ((this menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-select-start-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars
(sv-48 int)
(sv-64 int)
@@ -3483,7 +3483,7 @@
(none)
)
(defmethod draw-option menu-select-scene-option ((this menu-select-scene-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-select-scene-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (sv-48 int))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
(s4-0 (-> this task-index))
@@ -3580,7 +3580,7 @@
(none)
)
(defmethod draw-option menu-bigmap-option ((this menu-bigmap-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-bigmap-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
0
(none)
)
@@ -3721,7 +3721,7 @@
)
)
(defmethod draw-option menu-missions-option ((this menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-missions-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars
(f0-50 float)
(sv-16 float)
@@ -4116,7 +4116,7 @@
(none)
)
(defmethod draw-option menu-secret-option ((this menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-secret-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars
(sv-16 float)
(sv-20 symbol)
@@ -4341,15 +4341,15 @@
)
(deftype print-highscore-obj (basic)
((self menu-highscores-option :offset-assert 4)
(index int32 :offset-assert 8)
(previous symbol :offset-assert 12) ; guess
(place int32 :offset-assert 16)
(score float :offset-assert 20)
(game-score symbol :offset-assert 24)
(context font-context :offset-assert 28)
(local-scale float :offset-assert 32)
(interp float :offset-assert 36)
((self menu-highscores-option)
(index int32)
(previous symbol) ; guess
(place int32)
(score float)
(game-score symbol)
(context font-context)
(local-scale float)
(interp float)
)
:method-count-assert 9
:size-assert #x28
@@ -5153,7 +5153,7 @@
)
)
(defmethod draw-option menu-highscores-option ((this menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-highscores-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars
(sv-96 float)
(sv-100 float)
@@ -5456,7 +5456,7 @@
(none)
)
(defmethod draw-option menu-on-off-game-vibrations-option ((this menu-on-off-game-vibrations-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-on-off-game-vibrations-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-10 string))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f30-0 0.0)
@@ -5544,7 +5544,7 @@
(none)
)
(defmethod draw-option menu-on-off-game-subtitles-option ((this menu-on-off-game-subtitles-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-on-off-game-subtitles-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-11 string))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f30-0 0.0)
@@ -5632,7 +5632,7 @@
(none)
)
(defmethod draw-option menu-subtitle-language-game-option ((this menu-subtitle-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-subtitle-language-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(with-pp
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(let ((v1-2 arg1))
@@ -5765,12 +5765,12 @@
)
)
(defmethod draw-option menu-language-game-option ((this menu-language-game-option)
(progress progress)
(font-ctx font-context)
(option-index int)
(selected symbol)
)
(defmethod draw-option ((this menu-language-game-option)
(progress progress)
(font-ctx font-context)
(option-index int)
(selected symbol)
)
(with-pp
(let ((alpha (* 2.0 (- 0.5 (-> progress menu-transition)))))
(let ((font-ctx-1 font-ctx))
@@ -5917,7 +5917,7 @@
)
)
(defmethod draw-option menu-sub-menu-game-option ((this menu-sub-menu-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-sub-menu-game-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(let ((f0-1 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
395.0
(-> arg1 origin y)
@@ -5938,7 +5938,7 @@
(none)
)
(defmethod draw-option menu-aspect-ratio-option ((this menu-aspect-ratio-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-aspect-ratio-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-12 string))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f30-0 0.0)
@@ -6043,12 +6043,12 @@
(none)
)
(defmethod draw-option menu-on-off-progressive-scan-graphic-option ((this menu-on-off-progressive-scan-graphic-option)
(arg0 progress)
(arg1 font-context)
(arg2 int)
(arg3 symbol)
)
(defmethod draw-option ((this menu-on-off-progressive-scan-graphic-option)
(arg0 progress)
(arg1 font-context)
(arg2 int)
(arg3 symbol)
)
(local-vars (a0-11 string))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f30-0 0.0)
@@ -6149,7 +6149,7 @@
(none)
)
(defmethod draw-option menu-center-screen-graphic-option ((this menu-center-screen-graphic-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-center-screen-graphic-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f30-0 0.0)
(set! f30-0 0.0)
@@ -6254,7 +6254,7 @@
(none)
)
(defmethod draw-option menu-restart-mission-qr-option ((this menu-restart-mission-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-restart-mission-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-11 string))
(let ((f0-1 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f0-1 0.0)
@@ -6317,7 +6317,7 @@
(none)
)
(defmethod draw-option menu-quit-qr-option ((this menu-quit-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-quit-qr-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (a0-12 string))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(if (< f30-0 0.0)
@@ -6391,7 +6391,7 @@
(none)
)
(defmethod draw-option menu-slider-option ((this menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-slider-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars
(v0-42 pointer)
(sv-16 progress)
@@ -6767,7 +6767,7 @@
(none)
)
(defmethod draw-option menu-stereo-mode-sound-option ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (s5-0 int))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition)))))
(let ((v1-2 arg1))
@@ -6876,7 +6876,7 @@
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 361]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 417]
;; WARN: rewrite_to_get_var got a none typed variable. Is there unreachable code? [OP: 435]
(defmethod draw-option menu-sub-menu-option ((this menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(defmethod draw-option ((this menu-sub-menu-option) (arg0 progress) (arg1 font-context) (arg2 int) (arg3 symbol))
(local-vars (sv-16 dma-buffer))
(let ((f30-0 (* 2.0 (- 0.5 (-> arg0 menu-transition))))
(s2-0 (the int (+ -1.0 (-> arg1 origin y))))
+112 -276
View File
@@ -24,555 +24,391 @@
;; DECOMP BEGINS
(deftype progress (process-drawable)
((current-options menu-option-list :offset-assert 200)
(menu-transition float :offset-assert 204)
(option-index int32 :offset-assert 208)
(want-option-index int32 :offset-assert 212)
(next-option-index int32 :offset-assert 216)
(graphic-index int32 :offset-assert 220)
(selected-option symbol :offset-assert 224)
(current symbol :offset-assert 228)
(next symbol :offset-assert 232)
(ring-angle float :offset-assert 236)
(ring-want-angle float :offset-assert 240)
(init-quat quaternion :inline :offset-assert 256)
(pos-transition float :offset-assert 272)
(anim-frame float :offset-assert 276)
(swing float :offset-assert 280)
(main-menu symbol :offset-assert 284)
(state-stack symbol 5 :offset-assert 288)
(option-index-stack int32 5 :offset-assert 308)
(state-pos int32 :offset-assert 328)
(secret-buying basic :offset-assert 332)
(secret-buy-choice basic :offset-assert 336)
(sliding float :offset-assert 340)
(sliding-off float :offset-assert 344)
(scanlines-alpha float :offset-assert 348)
(sliding-height float :offset-assert 352)
((current-options menu-option-list)
(menu-transition float)
(option-index int32)
(want-option-index int32)
(next-option-index int32)
(graphic-index int32)
(selected-option symbol)
(current symbol)
(next symbol)
(ring-angle float)
(ring-want-angle float)
(init-quat quaternion :inline)
(pos-transition float)
(anim-frame float)
(swing float)
(main-menu symbol)
(state-stack symbol 5)
(option-index-stack int32 5)
(state-pos int32)
(secret-buying basic)
(secret-buy-choice basic)
(sliding float)
(sliding-off float)
(scanlines-alpha float)
(sliding-height float)
)
:heap-base #xf0
:method-count-assert 33
:size-assert #x164
:flag-assert #x2100f00164
(:state-methods
come-in
idle
go-away
gone
)
(:methods
(come-in () _type_ :state 20)
(idle () _type_ :state 21)
(go-away () _type_ :state 22)
(gone () _type_ :state 23)
(init-defaults (_type_) object 24)
(respond-to-cpad (_type_) none 25)
(gone? (_type_) object 26)
(can-go-back? (_type_) symbol 27)
(get-state-check-card (_type_ symbol) symbol 28)
(push-state (_type_) int 29)
(pop-state (_type_) int 30)
(set-next-state (_type_ symbol int) int 31)
(set-menu-options (_type_ symbol) int 32)
(init-defaults (_type_) object)
(respond-to-cpad (_type_) none)
(gone? (_type_) object)
(can-go-back? (_type_) symbol)
(get-state-check-card (_type_ symbol) symbol)
(push-state (_type_) int)
(pop-state (_type_) int)
(set-next-state (_type_ symbol int) int)
(set-menu-options (_type_ symbol) int)
)
)
(deftype menu-option (basic)
((name text-id :offset-assert 4)
(scale symbol :offset-assert 8)
(unknown function :offset-assert 12)
(box hud-box 1 :inline :offset-assert 16)
(options menu-option 8 :offset 16)
((name text-id)
(scale symbol)
(unknown function)
(box hud-box 1 :inline)
(options menu-option 8 :overlay-at box)
)
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
(:methods
(respond-progress (_type_ progress symbol) int :behavior progress 9)
(draw-option (_type_ progress font-context int symbol) none 10)
(menu-option-method-11 () none 11)
(respond-progress (_type_ progress symbol) int :behavior progress)
(draw-option (_type_ progress font-context int symbol) none)
(menu-option-method-11 () none)
)
)
(deftype menu-on-off-option (menu-option)
((value-to-modify (pointer symbol) :offset-assert 48)
((value-to-modify (pointer symbol))
)
:method-count-assert 12
:size-assert #x34
:flag-assert #xc00000034
)
(deftype menu-yes-no-option (menu-option)
((value-to-modify pointer :offset-assert 48)
((value-to-modify pointer)
)
:method-count-assert 12
:size-assert #x34
:flag-assert #xc00000034
)
(deftype menu-language-option (menu-option)
((language-selection language-enum :offset-assert 48)
(language-direction symbol :offset-assert 56)
(language-transition basic :offset-assert 60)
(language-x-offset int32 :offset-assert 64)
((language-selection language-enum)
(language-direction symbol)
(language-transition basic)
(language-x-offset int32)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-quit-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-slider-option (menu-option)
((value-to-modify pointer :offset-assert 48)
(sprites hud-sprite 5 :inline :offset 64)
((value-to-modify pointer)
(sprites hud-sprite 5 :inline :offset 64)
)
:method-count-assert 12
:size-assert #x180
:flag-assert #xc00000180
)
(deftype menu-sub-menu-option (menu-option)
((next-state symbol :offset-assert 48)
(pad uint8 44 :offset-assert 52)
((next-state symbol)
(pad uint8 44)
)
:method-count-assert 12
:size-assert #x60
:flag-assert #xc00000060
)
(deftype menu-sub-menu-sound-option (menu-option)
((next-state symbol :offset-assert 48)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x34
:flag-assert #xc00000034
)
(deftype menu-stereo-mode-sound-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-sub-menu-graphic-option (menu-option)
((next-state symbol :offset-assert 48)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x34
:flag-assert #xc00000034
)
(deftype menu-unlocked-menu-option (menu-sub-menu-option)
()
:method-count-assert 12
:size-assert #x60
:flag-assert #xc00000060
)
(deftype menu-main-menu-option (menu-option)
((next-state symbol :offset-assert 48)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x34
:flag-assert #xc00000034
)
(deftype menu-memcard-slot-option (menu-option)
((sprites hud-sprite 5 :inline :offset 48)
(pad uint8 32 :offset-assert 368)
((sprites hud-sprite 5 :inline :offset 48)
(pad uint8 32)
)
:method-count-assert 12
:size-assert #x190
:flag-assert #xc00000190
)
(deftype menu-loading-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-insufficient-space-option (menu-option)
((last-move time-frame :offset-assert 48)
((last-move time-frame)
)
:method-count-assert 12
:size-assert #x38
:flag-assert #xc00000038
)
(deftype menu-secrets-insufficient-space-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-insert-card-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-error-loading-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-error-auto-saving-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-card-removed-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-error-disc-removed-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-error-reading-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-icon-info-option (menu-option)
((sprites hud-sprite 2 :inline :offset 48)
((sprites hud-sprite 2 :inline :offset 48)
)
:method-count-assert 12
:size-assert #xb0
:flag-assert #xc000000b0
)
(deftype menu-format-card-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-already-exists-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-create-game-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-video-mode-warning-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-video-mode-ok-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-progressive-mode-warning-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-progressive-mode-ok-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype menu-select-start-option (menu-option)
((task-index int32 :offset-assert 48)
(real-task-index int32 :offset-assert 52)
(last-move time-frame :offset-assert 56)
((task-index int32)
(real-task-index int32)
(last-move time-frame)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-select-scene-option (menu-option)
((task-index int32 :offset-assert 48)
(last-move time-frame :offset-assert 56)
((task-index int32)
(last-move time-frame)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-bigmap-option (menu-option)
()
:method-count-assert 12
:size-assert #x30
:flag-assert #xc00000030
)
(deftype paged-menu-option (menu-option)
((page-index int32 :offset-assert 48)
(prev-page-index int32 :offset-assert 52)
(num-pages int32 :offset-assert 56)
(slide-dir float :offset-assert 60)
((page-index int32)
(prev-page-index int32)
(num-pages int32)
(slide-dir float)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-missions-option (paged-menu-option)
((task-line-index int32 :offset-assert 64)
(last-move time-frame :offset-assert 72)
((task-line-index int32)
(last-move time-frame)
)
:method-count-assert 12
:size-assert #x50
:flag-assert #xc00000050
)
(deftype menu-highscores-option (paged-menu-option)
((last-move time-frame :offset-assert 64)
(sprites hud-sprite 2 :inline :offset 80)
((last-move time-frame)
(sprites hud-sprite 2 :inline :offset 80)
)
:method-count-assert 12
:size-assert #xd0
:flag-assert #xc000000d0
)
(deftype secret-item-option (menu-option)
((cost int32 :offset-assert 48)
(can-toggle symbol :offset-assert 52)
(flag game-secrets :offset-assert 56)
(avail-after game-task-node :offset-assert 60)
((cost int32)
(can-toggle symbol)
(flag game-secrets)
(avail-after game-task-node)
)
:method-count-assert 12
:size-assert #x3e
:flag-assert #xc0000003e
)
(deftype menu-secret-option (menu-option)
((item-index int32 :offset-assert 48)
(prev-item-index int32 :offset-assert 52)
(num-items int32 :offset-assert 56)
(num-hero-items int32 :offset-assert 60)
(secret-items (array secret-item-option) :offset-assert 64)
(last-move time-frame :offset-assert 72)
(sprites hud-sprite 2 :inline :offset 80)
((item-index int32)
(prev-item-index int32)
(num-items int32)
(num-hero-items int32)
(secret-items (array secret-item-option))
(last-move time-frame)
(sprites hud-sprite 2 :inline :offset 80)
)
:method-count-assert 12
:size-assert #xd0
:flag-assert #xc000000d0
)
(deftype menu-option-list (basic)
((y-center int32 :offset-assert 4)
(y-space int32 :offset-assert 8)
(scale float :offset-assert 12)
(options (array menu-option) :offset-assert 16)
((y-center int32)
(y-space int32)
(scale float)
(options (array menu-option))
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
(deftype menu-qr-option (menu-option)
((last-move time-frame :offset-assert 48)
(value-to-modify function :offset 60)
((last-move time-frame)
(value-to-modify function :offset 60)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-restart-mission-qr-option (menu-qr-option)
((next-state symbol :offset-assert 64)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-quit-qr-option (menu-qr-option)
((next-state symbol :offset-assert 64)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-sub-menu-qr-option (menu-qr-option)
((next-state symbol :offset-assert 64)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-graphic-option (menu-option)
((last-move time-frame :offset-assert 48)
(value-to-modify pointer :offset 60)
((last-move time-frame)
(value-to-modify pointer :offset 60)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-on-off-progressive-scan-graphic-option (menu-graphic-option)
()
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-aspect-ratio-option (menu-graphic-option)
()
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-center-screen-graphic-option (menu-graphic-option)
((next-state symbol :offset-assert 64)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-video-mode-option (menu-graphic-option)
()
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-game-option (menu-option)
((last-move time-frame :offset-assert 48)
(value-to-modify pointer :offset 60)
((last-move time-frame)
(value-to-modify pointer :offset 60)
)
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-on-off-game-vibrations-option (menu-game-option)
()
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-on-off-game-subtitles-option (menu-game-option)
()
:method-count-assert 12
:size-assert #x40
:flag-assert #xc00000040
)
(deftype menu-sub-menu-game-option (menu-game-option)
((next-state symbol :offset-assert 64)
((next-state symbol)
)
:method-count-assert 12
:size-assert #x44
:flag-assert #xc00000044
)
(deftype menu-language-game-option (menu-game-option)
((language-selection uint64 :offset-assert 64)
(language-direction basic :offset-assert 72)
(language-transition basic :offset-assert 76)
(language-x-offset int32 :offset-assert 80)
((language-selection uint64)
(language-direction basic)
(language-transition basic)
(language-x-offset int32)
)
:method-count-assert 12
:size-assert #x54
:flag-assert #xc00000054
)
(deftype menu-subtitle-language-game-option (menu-game-option)
((language-selection uint64 :offset-assert 64)
(language-direction basic :offset-assert 72)
(language-transition basic :offset-assert 76)
(language-x-offset int32 :offset-assert 80)
((language-selection uint64)
(language-direction basic)
(language-transition basic)
(language-x-offset int32)
)
:method-count-assert 12
:size-assert #x54
:flag-assert #xc00000054
)
@@ -838,16 +838,13 @@
)
(deftype hud-scene-info (basic)
((name string :offset-assert 4)
(continue string :offset-assert 8)
(info object :offset-assert 12)
(info-str string :offset 12)
(info-list pair :offset 12)
(text text-id :offset-assert 16)
((name string)
(continue string)
(info object)
(info-str string :overlay-at info)
(info-list pair :overlay-at info)
(text text-id)
)
:method-count-assert 9
:size-assert #x14
:flag-assert #x900000014
)
+97 -104
View File
@@ -8,57 +8,54 @@
;; DECOMP BEGINS
(deftype progress-global-state (basic)
((aspect-ratio-choice symbol :offset-assert 4)
(video-mode-choice symbol :offset-assert 8)
(yes-no-choice symbol :offset-assert 12)
(on-off-choice symbol :offset-assert 16)
(which-slot int32 :offset-assert 20)
(starting-state symbol :offset-assert 24)
(last-slot-saved int32 :offset-assert 28)
(slider-backup float :offset-assert 32)
(language-backup language-enum :offset-assert 40)
(center-x-backup int32 :offset-assert 48)
(center-y-backup int32 :offset-assert 52)
(aspect-ratio-backup symbol :offset-assert 56)
(last-slider-sound time-frame :offset-assert 64)
(video-mode-timeout time-frame :offset-assert 72)
(progressive-mode-timeout time-frame :offset-assert 80)
(current-task-index int32 :offset-assert 88)
(current-line-index int32 :offset-assert 92)
(first-closed-line-index int32 :offset-assert 96)
(extra-text-state int32 :offset-assert 100)
(current-task uint8 :offset-assert 104)
(num-open-tasks-found int32 :offset-assert 108)
(num-closed-tasks-found int32 :offset-assert 112)
(color-flash-counter int32 :offset-assert 116)
(num-unlocked-secrets int32 :offset-assert 120)
(game-options-item-selected int32 :offset-assert 124)
(game-options-item-picked basic :offset-assert 128)
(game-options-last-move time-frame :offset-assert 136)
(game-options-vibrations symbol :offset-assert 144)
(game-options-subtitles symbol :offset-assert 148)
(game-options-language-index int32 :offset-assert 152)
(game-options-subtitle-language-index int32 :offset-assert 156)
(graphic-options-item-selected int32 :offset-assert 160)
(graphic-options-item-picked symbol :offset-assert 164)
(graphic-options-last-move time-frame :offset-assert 168)
(graphic-options-aspect-ratio symbol :offset-assert 176)
(graphic-options-progressive-scan symbol :offset-assert 180)
(qr-options-item-selected int32 :offset-assert 184)
(qr-options-item-picked basic :offset-assert 188)
(qr-options-last-move time-frame :offset-assert 192)
(qr-options-restart basic :offset-assert 200)
(qr-options-quit basic :offset-assert 204)
(total-num-tasks int32 :offset-assert 208)
(scene-player-act int32 :offset-assert 212)
(stereo-mode-backup int32 :offset-assert 216)
(secrets-unlocked symbol :offset-assert 220)
(missions-total-spacing float :offset-assert 224)
(clear-screen symbol :offset-assert 228)
((aspect-ratio-choice symbol)
(video-mode-choice symbol)
(yes-no-choice symbol)
(on-off-choice symbol)
(which-slot int32)
(starting-state symbol)
(last-slot-saved int32)
(slider-backup float)
(language-backup language-enum)
(center-x-backup int32)
(center-y-backup int32)
(aspect-ratio-backup symbol)
(last-slider-sound time-frame)
(video-mode-timeout time-frame)
(progressive-mode-timeout time-frame)
(current-task-index int32)
(current-line-index int32)
(first-closed-line-index int32)
(extra-text-state int32)
(current-task uint8)
(num-open-tasks-found int32)
(num-closed-tasks-found int32)
(color-flash-counter int32)
(num-unlocked-secrets int32)
(game-options-item-selected int32)
(game-options-item-picked basic)
(game-options-last-move time-frame)
(game-options-vibrations symbol)
(game-options-subtitles symbol)
(game-options-language-index int32)
(game-options-subtitle-language-index int32)
(graphic-options-item-selected int32)
(graphic-options-item-picked symbol)
(graphic-options-last-move time-frame)
(graphic-options-aspect-ratio symbol)
(graphic-options-progressive-scan symbol)
(qr-options-item-selected int32)
(qr-options-item-picked basic)
(qr-options-last-move time-frame)
(qr-options-restart basic)
(qr-options-quit basic)
(total-num-tasks int32)
(scene-player-act int32)
(stereo-mode-backup int32)
(secrets-unlocked symbol)
(missions-total-spacing float)
(clear-screen symbol)
)
:method-count-assert 9
:size-assert #xe8
:flag-assert #x9000000e8
)
@@ -103,7 +100,7 @@
(set-master-mode 'game)
0)
(defmethod init-defaults progress ((this progress))
(defmethod init-defaults ((this progress))
"Initialize default menu settings."
(set! (-> *progress-state* aspect-ratio-choice) (get-aspect-ratio))
(set! (-> *progress-state* video-mode-choice) (get-video-mode))
@@ -174,16 +171,12 @@
(deftype hud-ring-cell (process-drawable)
((parent (pointer progress) :override)
(joint-idx int32 :offset-assert 200)
(init-angle degrees :offset-assert 204)
(graphic-index int32 :offset-assert 208)
(joint-idx int32)
(init-angle degrees)
(graphic-index int32)
)
:heap-base #x60
:method-count-assert 21
:size-assert #xd4
:flag-assert #x15006000d4
(:methods
(idle () _type_ :state 20)
(:state-methods
idle
)
)
@@ -462,7 +455,7 @@
(none)
)
(defmethod deactivate progress ((this progress))
(defmethod deactivate ((this progress))
(remove-setting-by-arg0 *setting-control* 'extra-bank)
(disable-drawing *bigmap*)
(set! (-> *blit-displays-work* menu-mode) #f)
@@ -490,7 +483,7 @@
(none)
)
(defmethod gone? progress ((this progress))
(defmethod gone? ((this progress))
(and *progress-process*
(-> *progress-process* 0 next-state)
(= (-> *progress-process* 0 next-state name) 'gone)
@@ -522,7 +515,7 @@
)
)
(defmethod can-go-back? progress ((this progress))
(defmethod can-go-back? ((this progress))
(and (= (-> this menu-transition) 0.0)
(not (-> this selected-option))
(!= (-> this current) 'loading)
@@ -580,7 +573,7 @@
(none)
)
(defmethod get-state-check-card progress ((this progress) (arg0 symbol))
(defmethod get-state-check-card ((this progress) (arg0 symbol))
(let ((v1-0 *progress-save-info*)
(v0-0 arg0)
)
@@ -677,7 +670,7 @@
)
)
(defmethod push-state progress ((this progress))
(defmethod push-state ((this progress))
(let ((v1-0 (-> this state-pos)))
(cond
((< v1-0 5)
@@ -693,7 +686,7 @@
0
)
(defmethod pop-state progress ((this progress))
(defmethod pop-state ((this progress))
(let ((v1-0 (-> this state-pos)))
(cond
((> v1-0 0)
@@ -716,7 +709,7 @@
0
)
(defmethod set-next-state progress ((this progress) (arg0 symbol) (arg1 int))
(defmethod set-next-state ((this progress) (arg0 symbol) (arg1 int))
"Set the next menu state specified by arg0 at the index specified by arg1."
(set! (-> *progress-state* clear-screen) #f)
(when (!= arg0 (-> this current))
@@ -762,7 +755,7 @@
0
)
(defmethod set-menu-options progress ((this progress) (arg0 symbol))
(defmethod set-menu-options ((this progress) (arg0 symbol))
"Set the menu options for the menu state specified by arg0."
(set! (-> this current-options) #f)
(case arg0
@@ -969,7 +962,7 @@
0
)
(defmethod respond-to-cpad progress ((this progress))
(defmethod respond-to-cpad ((this progress))
(mc-get-slot-info 0 *progress-save-info*)
(when (-> this current-options)
(let ((option-array (-> this current-options options)))
@@ -1715,12 +1708,12 @@
)
)
(defmethod respond-progress menu-option ((this menu-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
0
)
(defmethod respond-progress menu-on-off-option ((this menu-on-off-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-on-off-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* on-off-choice))
(gp-0 #f)
@@ -1770,7 +1763,7 @@
0
)
(defmethod respond-progress menu-yes-no-option ((this menu-yes-no-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-yes-no-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* yes-no-choice))
(gp-0 #f)
@@ -1811,7 +1804,7 @@
0
)
(defmethod respond-progress menu-slider-option ((this menu-slider-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-slider-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (-> *bigmap* progress-minimap)
(let ((gp-0 (-> this value-to-modify))
@@ -1893,7 +1886,7 @@
0
)
(defmethod respond-progress menu-stereo-mode-sound-option ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-stereo-mode-sound-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (-> *bigmap* progress-minimap)
(let ((a0-1 (-> *setting-control* user-default stereo-mode))
@@ -1931,7 +1924,7 @@
0
)
(defmethod respond-progress menu-main-menu-option ((this menu-main-menu-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-main-menu-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(cond
((cpad-pressed? 0 start)
@@ -2026,7 +2019,7 @@
0
)
(defmethod respond-progress menu-sub-menu-option ((this menu-sub-menu-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-sub-menu-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (and (-> *progress-state* secrets-unlocked)
(not (memcard-unlocked-secrets? #f))
@@ -2086,7 +2079,7 @@
0
)
(defmethod respond-progress menu-unlocked-menu-option ((this menu-unlocked-menu-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-unlocked-menu-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((s4-0 (memcard-unlocked-secrets? #t)))
(logclear! (-> *game-info* purchase-secrets) (game-secrets hero-mode))
@@ -2223,7 +2216,7 @@
0
)
(defmethod respond-progress menu-memcard-slot-option ((this menu-memcard-slot-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-memcard-slot-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(memcard-unlocked-secrets? #t)
(let ((a1-2 (get-state-check-card arg0 (-> arg0 current))))
@@ -2268,7 +2261,7 @@
0
)
(defmethod respond-progress menu-already-exists-option ((this menu-already-exists-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-already-exists-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((s4-0 (&-> *progress-state* yes-no-choice))
(a1-2 (get-state-check-card arg0 'select-save))
@@ -2310,7 +2303,7 @@
0
)
(defmethod respond-progress menu-create-game-option ((this menu-create-game-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-create-game-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((s4-0 (&-> *progress-state* yes-no-choice))
(gp-0 #f)
@@ -2355,7 +2348,7 @@
0
)
(defmethod respond-progress menu-insufficient-space-option ((this menu-insufficient-space-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-insufficient-space-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((s5-0 (&-> *progress-state* yes-no-choice))
(s3-0 (get-state-check-card arg0 'select-save))
@@ -2450,7 +2443,7 @@
0
)
(defmethod respond-progress menu-secrets-insufficient-space-option ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-secrets-insufficient-space-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(&-> *progress-state* yes-no-choice)
(cond
@@ -2468,7 +2461,7 @@
0
)
(defmethod respond-progress menu-video-mode-warning-option ((this menu-video-mode-warning-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-video-mode-warning-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* yes-no-choice))
(gp-0 #f)
@@ -2506,7 +2499,7 @@
0
)
(defmethod respond-progress menu-video-mode-ok-option ((this menu-video-mode-ok-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-video-mode-ok-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* yes-no-choice))
(s5-0 #f)
@@ -2552,7 +2545,7 @@
0
)
(defmethod respond-progress menu-progressive-mode-warning-option ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-progressive-mode-warning-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* yes-no-choice))
(gp-0 #f)
@@ -2597,7 +2590,7 @@
0
)
(defmethod respond-progress menu-progressive-mode-ok-option ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-progressive-mode-ok-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* yes-no-choice))
(s5-0 #f)
@@ -2645,7 +2638,7 @@
0
)
(defmethod respond-progress menu-card-removed-option ((this menu-card-removed-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-card-removed-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (cpad-pressed? 0 confirm)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -2656,7 +2649,7 @@
0
)
(defmethod respond-progress menu-insert-card-option ((this menu-insert-card-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-insert-card-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
*progress-save-info*
(cond
@@ -2673,7 +2666,7 @@
0
)
(defmethod respond-progress menu-error-loading-option ((this menu-error-loading-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-error-loading-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (cpad-pressed? 0 confirm)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -2684,7 +2677,7 @@
0
)
(defmethod respond-progress menu-error-auto-saving-option ((this menu-error-auto-saving-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-error-auto-saving-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (cpad-pressed? 0 confirm)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -2695,7 +2688,7 @@
0
)
(defmethod respond-progress menu-error-disc-removed-option ((this menu-error-disc-removed-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-error-disc-removed-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (cpad-pressed? 0 confirm)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -2708,7 +2701,7 @@
0
)
(defmethod respond-progress menu-error-reading-option ((this menu-error-reading-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-error-reading-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (cpad-pressed? 0 confirm)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -2719,7 +2712,7 @@
0
)
(defmethod respond-progress menu-icon-info-option ((this menu-icon-info-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-icon-info-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(when (cpad-pressed? 0 confirm)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -2730,7 +2723,7 @@
0
)
(defmethod respond-progress menu-quit-option ((this menu-quit-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-quit-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((v1-1 (&-> *progress-state* yes-no-choice))
(gp-0 #f)
@@ -2774,7 +2767,7 @@
0
)
(defmethod respond-progress menu-format-card-option ((this menu-format-card-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-format-card-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let ((s4-0 (&-> *progress-state* yes-no-choice))
(gp-0 #f)
@@ -2819,7 +2812,7 @@
)
;; WARN: disable def twice: 110. This may happen when a cond (no else) is nested inside of another conditional, but it should be rare.
(defmethod respond-progress menu-select-start-option ((this menu-select-start-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-select-start-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(set! (-> arg0 sliding-height) (seek-ease
(-> arg0 sliding-height)
@@ -2950,7 +2943,7 @@
0
)
(defmethod respond-progress menu-select-scene-option ((this menu-select-scene-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-select-scene-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(set! (-> arg0 sliding-height) (seek-ease
(-> arg0 sliding-height)
@@ -3025,7 +3018,7 @@
0
)
(defmethod respond-progress menu-bigmap-option ((this menu-bigmap-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-bigmap-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(handle-cpad-inputs *bigmap*)
(logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons confirm))
@@ -3033,7 +3026,7 @@
0
)
(defmethod respond-progress menu-missions-option ((this menu-missions-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-missions-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(set! (-> arg0 sliding-height) (seek-ease
(-> arg0 sliding-height)
@@ -3082,7 +3075,7 @@
0
)
(defmethod respond-progress menu-highscores-option ((this menu-highscores-option) (progress progress) (selected? symbol))
(defmethod respond-progress ((this menu-highscores-option) (progress progress) (selected? symbol))
"Handle progress menu navigation logic."
(set! (-> progress sliding) (seek-ease
(-> progress sliding)
@@ -3149,7 +3142,7 @@
0
)
(defmethod respond-progress menu-secret-option ((this menu-secret-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-secret-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(let* ((s5-1 (logtest? (-> *game-info* secrets) (game-secrets hero-mode)))
(s3-0 (if (not s5-1)
@@ -3267,7 +3260,7 @@
0
)
(defmethod respond-progress menu-game-option ((this menu-game-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-game-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(-> *progress-state* game-options-vibrations)
(-> *progress-state* game-options-subtitles)
@@ -3488,7 +3481,7 @@
0
)
(defmethod respond-progress menu-graphic-option ((this menu-graphic-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-graphic-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(-> *progress-state* graphic-options-aspect-ratio)
(-> *progress-state* graphic-options-progressive-scan)
@@ -3700,7 +3693,7 @@
0
)
(defmethod respond-progress menu-qr-option ((this menu-qr-option) (arg0 progress) (arg1 symbol))
(defmethod respond-progress ((this menu-qr-option) (arg0 progress) (arg1 symbol))
"Handle progress menu navigation logic."
(-> *progress-state* qr-options-restart)
(-> *progress-state* qr-options-quit)