mirror of
https://github.com/open-goal/jak-project
synced 2026-09-03 10:21:36 -04:00
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:
+23
-23
@@ -12,7 +12,7 @@
|
||||
;; definition for method 24 of type progress
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-fuel-cell-screen progress ((this progress) (arg0 int))
|
||||
(defmethod draw-fuel-cell-screen ((this progress) (arg0 int))
|
||||
(local-vars
|
||||
(sv-112 int)
|
||||
(sv-128 int)
|
||||
@@ -190,7 +190,7 @@
|
||||
|
||||
;; definition for method 25 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-money-screen progress ((this progress) (arg0 int))
|
||||
(defmethod draw-money-screen ((this progress) (arg0 int))
|
||||
(hide-progress-icons)
|
||||
(let* ((v1-1 (/ (-> this transition-offset) 16))
|
||||
(s4-0 (if (= (-> this level-transition) 1)
|
||||
@@ -275,7 +275,7 @@
|
||||
|
||||
;; definition for method 26 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-buzzer-screen progress ((this progress) (arg0 int))
|
||||
(defmethod draw-buzzer-screen ((this progress) (arg0 int))
|
||||
(hide-progress-icons)
|
||||
(let* ((v1-2 (-> *level-task-data* arg0))
|
||||
(a0-3 (/ (-> this transition-offset) 16))
|
||||
@@ -355,7 +355,7 @@
|
||||
|
||||
;; definition for method 35 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-storage-error progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-storage-error ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.55)
|
||||
)
|
||||
@@ -425,7 +425,7 @@
|
||||
|
||||
;; definition for method 49 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-format progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-format ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin y) 35.0)
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.55)
|
||||
@@ -474,7 +474,7 @@
|
||||
|
||||
;; definition for method 36 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-data-exists progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-data-exists ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.65)
|
||||
)
|
||||
@@ -512,7 +512,7 @@
|
||||
|
||||
;; definition for method 37 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-no-data progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-no-data ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.65)
|
||||
)
|
||||
@@ -548,7 +548,7 @@
|
||||
|
||||
;; definition for method 38 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-accessing progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-accessing ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 1.0)
|
||||
)
|
||||
@@ -599,7 +599,7 @@
|
||||
|
||||
;; definition for method 39 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-insert progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-insert ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.65)
|
||||
)
|
||||
@@ -636,7 +636,7 @@
|
||||
;; definition for method 40 of type progress
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-file-select progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-file-select ((this progress) (arg0 font-context))
|
||||
(local-vars
|
||||
(sv-16 (function _varargs_ object))
|
||||
(sv-32 (function _varargs_ object))
|
||||
@@ -921,7 +921,7 @@
|
||||
|
||||
;; definition for method 41 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-auto-save-error progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-auto-save-error ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.6)
|
||||
)
|
||||
@@ -997,7 +997,7 @@
|
||||
|
||||
;; definition for method 42 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-removed progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-removed ((this progress) (arg0 font-context))
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.6)
|
||||
)
|
||||
@@ -1060,7 +1060,7 @@
|
||||
|
||||
;; definition for method 43 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-memcard-error progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-memcard-error ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin y) 15.0)
|
||||
(let ((v1-0 arg0))
|
||||
(set! (-> v1-0 scale) 0.7)
|
||||
@@ -1120,7 +1120,7 @@
|
||||
|
||||
;; definition for method 50 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-auto-save progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-auto-save ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin x) (the float (- 35 (-> this left-x-offset))))
|
||||
(set! (-> arg0 origin y) 18.0)
|
||||
(let ((v1-2 arg0))
|
||||
@@ -1188,7 +1188,7 @@
|
||||
|
||||
;; definition for method 54 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-pal-change-to-60hz progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-pal-change-to-60hz ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin x) (the float (- 50 (-> this left-x-offset))))
|
||||
(set! (-> arg0 origin y) 20.0)
|
||||
(let ((v1-2 arg0))
|
||||
@@ -1250,7 +1250,7 @@
|
||||
|
||||
;; definition for method 56 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-no-disc progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-no-disc ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin x) (the float (- 50 (-> this left-x-offset))))
|
||||
(set! (-> arg0 origin y) 50.0)
|
||||
(let ((v1-2 arg0))
|
||||
@@ -1304,7 +1304,7 @@
|
||||
|
||||
;; definition for method 57 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-bad-disc progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-bad-disc ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin x) (the float (- 50 (-> this left-x-offset))))
|
||||
(set! (-> arg0 origin y) 50.0)
|
||||
(let ((v1-2 arg0))
|
||||
@@ -1356,7 +1356,7 @@
|
||||
|
||||
;; definition for method 58 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-quit progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-quit ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin x) (the float (- 50 (-> this left-x-offset))))
|
||||
(set! (-> arg0 origin y) 70.0)
|
||||
(let ((v1-2 arg0))
|
||||
@@ -1381,7 +1381,7 @@
|
||||
|
||||
;; definition for method 55 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-pal-now-60hz progress ((this progress) (arg0 font-context))
|
||||
(defmethod draw-pal-now-60hz ((this progress) (arg0 font-context))
|
||||
(set! (-> arg0 origin x) (the float (- 50 (-> this left-x-offset))))
|
||||
(set! (-> arg0 origin y) 45.0)
|
||||
(let ((v1-2 arg0))
|
||||
@@ -1416,7 +1416,7 @@
|
||||
|
||||
;; definition for method 27 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-notice-screen progress ((this progress))
|
||||
(defmethod draw-notice-screen ((this progress))
|
||||
(hide-progress-icons)
|
||||
(when *common-text*
|
||||
(let ((a1-1 (new
|
||||
@@ -1551,7 +1551,7 @@
|
||||
;; definition for method 28 of type progress
|
||||
;; INFO: Used lq/sq
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-options progress ((this progress) (arg0 int) (arg1 int) (arg2 float))
|
||||
(defmethod draw-options ((this progress) (arg0 int) (arg1 int) (arg2 float))
|
||||
(local-vars
|
||||
(sv-112 font-context)
|
||||
(sv-128 int)
|
||||
@@ -1983,7 +1983,7 @@
|
||||
|
||||
;; definition for method 17 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod draw-progress progress ((this progress))
|
||||
(defmethod draw-progress ((this progress))
|
||||
(let ((f30-0 (+ -409.0 (-> this particles 2 init-pos x) (* 0.8 (the float (-> this left-x-offset)))))
|
||||
(s5-0 (if (or (-> this stat-transition) (nonzero? (-> this level-transition)))
|
||||
0
|
||||
@@ -2023,7 +2023,7 @@
|
||||
)
|
||||
)
|
||||
(let ((s2-2 draw-string-xy))
|
||||
(format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* fact-info-target buzzer))))
|
||||
(format (clear *temp-string*) "~D" (the int (+ 0.5 (-> *target* fact buzzer))))
|
||||
(s2-2
|
||||
*temp-string*
|
||||
s3-0
|
||||
|
||||
+124
-143
@@ -3,17 +3,14 @@
|
||||
|
||||
;; definition of type count-info
|
||||
(deftype count-info (structure)
|
||||
((money-count int32 :offset-assert 0)
|
||||
(buzzer-count int32 :offset-assert 4)
|
||||
((money-count int32)
|
||||
(buzzer-count int32)
|
||||
)
|
||||
:pack-me
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
;; definition for method 3 of type count-info
|
||||
(defmethod inspect count-info ((this count-info))
|
||||
(defmethod inspect ((this count-info))
|
||||
(format #t "[~8x] ~A~%" this 'count-info)
|
||||
(format #t "~Tmoney-count: ~D~%" (-> this money-count))
|
||||
(format #t "~Tbuzzer-count: ~D~%" (-> this buzzer-count))
|
||||
@@ -22,16 +19,13 @@
|
||||
|
||||
;; definition of type game-count-info
|
||||
(deftype game-count-info (basic)
|
||||
((length int32 :offset-assert 4)
|
||||
(data count-info :inline :dynamic :offset-assert 8)
|
||||
((length int32)
|
||||
(data count-info :inline :dynamic)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x8
|
||||
:flag-assert #x900000008
|
||||
)
|
||||
|
||||
;; definition for method 3 of type game-count-info
|
||||
(defmethod inspect game-count-info ((this game-count-info))
|
||||
(defmethod inspect ((this game-count-info))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tlength: ~D~%" (-> this length))
|
||||
(format #t "~Tdata[0] @ #x~X~%" (-> this data))
|
||||
@@ -40,17 +34,14 @@
|
||||
|
||||
;; definition of type task-info-data
|
||||
(deftype task-info-data (basic)
|
||||
((task-id game-task :offset-assert 4)
|
||||
(task-name text-id 4 :offset-assert 8)
|
||||
(text-index-when-resolved int32 :offset-assert 24)
|
||||
((task-id game-task)
|
||||
(task-name text-id 4)
|
||||
(text-index-when-resolved int32)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x1c
|
||||
:flag-assert #x90000001c
|
||||
)
|
||||
|
||||
;; definition for method 3 of type task-info-data
|
||||
(defmethod inspect task-info-data ((this task-info-data))
|
||||
(defmethod inspect ((this task-info-data))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Ttask-id: ~D~%" (-> this task-id))
|
||||
(format #t "~Ttask-name[4] @ #x~X~%" (-> this task-name))
|
||||
@@ -60,19 +51,16 @@
|
||||
|
||||
;; definition of type level-tasks-info
|
||||
(deftype level-tasks-info (basic)
|
||||
((level-name-id text-id :offset-assert 4)
|
||||
(text-group-index int32 :offset-assert 8)
|
||||
(nb-of-tasks int32 :offset-assert 12)
|
||||
(buzzer-task-index int32 :offset-assert 16)
|
||||
(task-info task-info-data 8 :offset-assert 20)
|
||||
((level-name-id text-id)
|
||||
(text-group-index int32)
|
||||
(nb-of-tasks int32)
|
||||
(buzzer-task-index int32)
|
||||
(task-info task-info-data 8)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x34
|
||||
:flag-assert #x900000034
|
||||
)
|
||||
|
||||
;; definition for method 3 of type level-tasks-info
|
||||
(defmethod inspect level-tasks-info ((this level-tasks-info))
|
||||
(defmethod inspect ((this level-tasks-info))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Tlevel-name-id: ~D~%" (-> this level-name-id))
|
||||
(format #t "~Ttext-group-index: ~D~%" (-> this text-group-index))
|
||||
@@ -84,21 +72,18 @@
|
||||
|
||||
;; definition of type game-option
|
||||
(deftype game-option (basic)
|
||||
((option-type game-option-type :offset-assert 8)
|
||||
(name 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)
|
||||
((option-type game-option-type)
|
||||
(name text-id)
|
||||
(scale symbol)
|
||||
(param1 float)
|
||||
(param2 float)
|
||||
(param3 game-option-menu)
|
||||
(value-to-modify pointer)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x28
|
||||
:flag-assert #x900000028
|
||||
)
|
||||
|
||||
;; definition for method 3 of type game-option
|
||||
(defmethod inspect game-option ((this game-option))
|
||||
(defmethod inspect ((this game-option))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Toption-type: ~D~%" (-> this option-type))
|
||||
(format #t "~Tname: ~D~%" (-> this name))
|
||||
@@ -112,111 +97,107 @@
|
||||
|
||||
;; definition of type progress
|
||||
(deftype progress (process)
|
||||
((current-debug-string int32 :offset-assert 112)
|
||||
(current-debug-language int32 :offset-assert 116)
|
||||
(current-debug-group int32 :offset-assert 120)
|
||||
(in-out-position int32 :offset-assert 124)
|
||||
(display-state progress-screen :offset-assert 128)
|
||||
(next-display-state progress-screen :offset-assert 136)
|
||||
(option-index int32 :offset-assert 144)
|
||||
(selected-option basic :offset-assert 148)
|
||||
(completion-percentage float :offset-assert 152)
|
||||
(ready-to-run basic :offset-assert 156)
|
||||
(display-level-index int32 :offset-assert 160)
|
||||
(next-level-index int32 :offset-assert 164)
|
||||
(task-index int32 :offset-assert 168)
|
||||
(in-transition basic :offset-assert 172)
|
||||
(last-in-transition basic :offset-assert 176)
|
||||
(force-transition basic :offset-assert 180)
|
||||
(stat-transition basic :offset-assert 184)
|
||||
(level-transition int32 :offset-assert 188)
|
||||
(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)
|
||||
(sides-y-scale float :offset-assert 216)
|
||||
(left-x-offset int32 :offset-assert 220)
|
||||
(right-x-offset int32 :offset-assert 224)
|
||||
(button-scale float :offset-assert 228)
|
||||
(slot-scale float :offset-assert 232)
|
||||
(left-side-x-scale float :offset-assert 236)
|
||||
(left-side-y-scale float :offset-assert 240)
|
||||
(right-side-x-scale float :offset-assert 244)
|
||||
(right-side-y-scale float :offset-assert 248)
|
||||
(small-orb-y-offset int32 :offset-assert 252)
|
||||
(big-orb-y-offset int32 :offset-assert 256)
|
||||
(transition-offset int32 :offset-assert 260)
|
||||
(transition-offset-invert int32 :offset-assert 264)
|
||||
(transition-percentage float :offset-assert 268)
|
||||
(transition-percentage-invert float :offset-assert 272)
|
||||
(transition-speed float :offset-assert 276)
|
||||
(total-nb-of-power-cells int32 :offset-assert 280)
|
||||
(total-nb-of-orbs int32 :offset-assert 284)
|
||||
(total-nb-of-buzzers int32 :offset-assert 288)
|
||||
(card-info mc-slot-info :offset-assert 292)
|
||||
(last-option-index-change time-frame :offset-assert 296)
|
||||
(video-mode-timeout time-frame :offset-assert 304)
|
||||
(display-state-stack progress-screen 5 :offset-assert 312)
|
||||
(option-index-stack int32 5 :offset-assert 352)
|
||||
(display-state-pos int32 :offset-assert 372)
|
||||
(nb-of-icons int32 :offset-assert 376)
|
||||
(icons hud-icon 6 :offset-assert 380)
|
||||
(max-nb-of-particles int32 :offset-assert 404)
|
||||
(nb-of-particles int32 :offset-assert 408)
|
||||
(particles hud-particle 40 :offset-assert 412)
|
||||
(particle-state int32 40 :offset-assert 572)
|
||||
((current-debug-string int32)
|
||||
(current-debug-language int32)
|
||||
(current-debug-group int32)
|
||||
(in-out-position int32)
|
||||
(display-state progress-screen)
|
||||
(next-display-state progress-screen)
|
||||
(option-index int32)
|
||||
(selected-option basic)
|
||||
(completion-percentage float)
|
||||
(ready-to-run basic)
|
||||
(display-level-index int32)
|
||||
(next-level-index int32)
|
||||
(task-index int32)
|
||||
(in-transition basic)
|
||||
(last-in-transition basic)
|
||||
(force-transition basic)
|
||||
(stat-transition basic)
|
||||
(level-transition int32)
|
||||
(language-selection language-enum)
|
||||
(language-direction symbol)
|
||||
(language-transition basic)
|
||||
(language-x-offset int32)
|
||||
(sides-x-scale float)
|
||||
(sides-y-scale float)
|
||||
(left-x-offset int32)
|
||||
(right-x-offset int32)
|
||||
(button-scale float)
|
||||
(slot-scale float)
|
||||
(left-side-x-scale float)
|
||||
(left-side-y-scale float)
|
||||
(right-side-x-scale float)
|
||||
(right-side-y-scale float)
|
||||
(small-orb-y-offset int32)
|
||||
(big-orb-y-offset int32)
|
||||
(transition-offset int32)
|
||||
(transition-offset-invert int32)
|
||||
(transition-percentage float)
|
||||
(transition-percentage-invert float)
|
||||
(transition-speed float)
|
||||
(total-nb-of-power-cells int32)
|
||||
(total-nb-of-orbs int32)
|
||||
(total-nb-of-buzzers int32)
|
||||
(card-info mc-slot-info)
|
||||
(last-option-index-change time-frame)
|
||||
(video-mode-timeout time-frame)
|
||||
(display-state-stack progress-screen 5)
|
||||
(option-index-stack int32 5)
|
||||
(display-state-pos int32)
|
||||
(nb-of-icons int32)
|
||||
(icons hud-icon 6)
|
||||
(max-nb-of-particles int32)
|
||||
(nb-of-particles int32)
|
||||
(particles hud-particle 40)
|
||||
(particle-state int32 40)
|
||||
)
|
||||
:heap-base #x270
|
||||
:method-count-assert 59
|
||||
:size-assert #x2dc
|
||||
:flag-assert #x3b027002dc
|
||||
(:methods
|
||||
(progress-method-14 (_type_) none 14)
|
||||
(progress-method-15 (_type_) none 15)
|
||||
(progress-method-16 (_type_) none 16)
|
||||
(draw-progress (_type_) none 17)
|
||||
(progress-method-18 () none 18)
|
||||
(visible? (_type_) symbol 19)
|
||||
(hidden? (_type_) symbol 20)
|
||||
(adjust-sprites (_type_) none 21)
|
||||
(adjust-icons (_type_) none 22)
|
||||
(adjust-ratios (_type_ symbol symbol) none 23)
|
||||
(draw-fuel-cell-screen (_type_ int) none 24)
|
||||
(draw-money-screen (_type_ int) none 25)
|
||||
(draw-buzzer-screen (_type_ int) none 26)
|
||||
(draw-notice-screen (_type_) none 27)
|
||||
(draw-options (_type_ int int float) none 28)
|
||||
(respond-common (_type_) none 29)
|
||||
(respond-progress (_type_) none 30)
|
||||
(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)
|
||||
(draw-memcard-data-exists (_type_ font-context) none 36)
|
||||
(draw-memcard-no-data (_type_ font-context) none 37)
|
||||
(draw-memcard-accessing (_type_ font-context) none 38)
|
||||
(draw-memcard-insert (_type_ font-context) none 39)
|
||||
(draw-memcard-file-select (_type_ font-context) none 40)
|
||||
(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)
|
||||
(progress-method-44 (_type_) none 44)
|
||||
(push! (_type_) none 45)
|
||||
(pop! (_type_) none 46)
|
||||
(progress-method-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)
|
||||
(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)
|
||||
(draw-bad-disc (_type_ font-context) none 57)
|
||||
(draw-quit (_type_ font-context) none 58)
|
||||
(progress-method-14 (_type_) none)
|
||||
(progress-method-15 (_type_) none)
|
||||
(progress-method-16 (_type_) none)
|
||||
(draw-progress (_type_) none)
|
||||
(progress-method-18 () none)
|
||||
(visible? (_type_) symbol)
|
||||
(hidden? (_type_) symbol)
|
||||
(adjust-sprites (_type_) none)
|
||||
(adjust-icons (_type_) none)
|
||||
(adjust-ratios (_type_ symbol symbol) none)
|
||||
(draw-fuel-cell-screen (_type_ int) none)
|
||||
(draw-money-screen (_type_ int) none)
|
||||
(draw-buzzer-screen (_type_ int) none)
|
||||
(draw-notice-screen (_type_) none)
|
||||
(draw-options (_type_ int int float) none)
|
||||
(respond-common (_type_) none)
|
||||
(respond-progress (_type_) none)
|
||||
(respond-memcard (_type_) none)
|
||||
(can-go-back? (_type_) symbol)
|
||||
(initialize-icons (_type_) none)
|
||||
(initialize-particles (_type_) none)
|
||||
(draw-memcard-storage-error (_type_ font-context) none)
|
||||
(draw-memcard-data-exists (_type_ font-context) none)
|
||||
(draw-memcard-no-data (_type_ font-context) none)
|
||||
(draw-memcard-accessing (_type_ font-context) none)
|
||||
(draw-memcard-insert (_type_ font-context) none)
|
||||
(draw-memcard-file-select (_type_ font-context) none)
|
||||
(draw-memcard-auto-save-error (_type_ font-context) none)
|
||||
(draw-memcard-removed (_type_ font-context) none)
|
||||
(draw-memcard-error (_type_ font-context) none)
|
||||
(progress-method-44 (_type_) none)
|
||||
(push! (_type_) none)
|
||||
(pop! (_type_) none)
|
||||
(progress-method-47 (_type_) none)
|
||||
(enter! (_type_ progress-screen int) none)
|
||||
(draw-memcard-format (_type_ font-context) none)
|
||||
(draw-auto-save (_type_ font-context) none)
|
||||
(set-transition-progress! (_type_ int) none)
|
||||
(set-transition-speed! (_type_) none)
|
||||
(set-memcard-screen (_type_ progress-screen) progress-screen)
|
||||
(draw-pal-change-to-60hz (_type_ font-context) none)
|
||||
(draw-pal-now-60hz (_type_ font-context) none)
|
||||
(draw-no-disc (_type_ font-context) none)
|
||||
(draw-bad-disc (_type_ font-context) none)
|
||||
(draw-quit (_type_ font-context) none)
|
||||
)
|
||||
(:states
|
||||
progress-coming-in
|
||||
@@ -229,7 +210,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 3 of type progress
|
||||
(defmethod inspect progress ((this progress))
|
||||
(defmethod inspect ((this progress))
|
||||
(let ((t9-0 (method-of-type process inspect)))
|
||||
(t9-0 this)
|
||||
)
|
||||
|
||||
+1
-1
@@ -958,7 +958,7 @@
|
||||
|
||||
;; definition for method 34 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod initialize-particles progress ((this progress))
|
||||
(defmethod initialize-particles ((this progress))
|
||||
(when (< (-> this nb-of-particles) (-> this max-nb-of-particles))
|
||||
(let ((s5-0 (-> this nb-of-particles)))
|
||||
(set! (-> this particles s5-0) (new 'static 'hud-particle))
|
||||
|
||||
+32
-35
@@ -3,27 +3,24 @@
|
||||
|
||||
;; definition of type progress-global-state
|
||||
(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)
|
||||
(which int32 :offset-assert 16)
|
||||
(starting-state progress-screen :offset-assert 24)
|
||||
(last-slot-saved int32 :offset-assert 32)
|
||||
(slider-backup float :offset-assert 36)
|
||||
(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)
|
||||
(aspect-ratio-backup symbol :offset-assert 60)
|
||||
(last-slider-sound time-frame :offset-assert 64)
|
||||
((aspect-ratio-choice symbol)
|
||||
(video-mode-choice symbol)
|
||||
(yes-no-choice symbol)
|
||||
(which int32)
|
||||
(starting-state progress-screen)
|
||||
(last-slot-saved int32)
|
||||
(slider-backup float)
|
||||
(language-backup language-enum)
|
||||
(on-off-backup symbol)
|
||||
(center-x-backup int32)
|
||||
(center-y-backup int32)
|
||||
(aspect-ratio-backup symbol)
|
||||
(last-slider-sound time-frame)
|
||||
)
|
||||
:method-count-assert 9
|
||||
:size-assert #x48
|
||||
:flag-assert #x900000048
|
||||
)
|
||||
|
||||
;; definition for method 3 of type progress-global-state
|
||||
(defmethod inspect progress-global-state ((this progress-global-state))
|
||||
(defmethod inspect ((this progress-global-state))
|
||||
(format #t "[~8x] ~A~%" this (-> this type))
|
||||
(format #t "~Taspect-ratio-choice: ~A~%" (-> this aspect-ratio-choice))
|
||||
(format #t "~Tvideo-mode-choice: ~A~%" (-> this video-mode-choice))
|
||||
@@ -342,7 +339,7 @@
|
||||
|
||||
;; definition for method 33 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod initialize-icons progress ((this progress))
|
||||
(defmethod initialize-icons ((this progress))
|
||||
(when (< (-> this nb-of-icons) 6)
|
||||
(let ((s5-0 (-> this nb-of-icons)))
|
||||
(set! (-> this icons s5-0) (new 'static 'hud-icon))
|
||||
@@ -610,7 +607,7 @@
|
||||
|
||||
;; definition for method 48 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod enter! progress ((this progress) (screen progress-screen) (option int))
|
||||
(defmethod enter! ((this progress) (screen progress-screen) (option int))
|
||||
(when (!= (-> this display-state) screen)
|
||||
(set! (-> *progress-state* yes-no-choice) #f)
|
||||
(set! (-> this selected-option) #f)
|
||||
@@ -650,7 +647,7 @@
|
||||
|
||||
;; definition for method 45 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod push! progress ((this progress))
|
||||
(defmethod push! ((this progress))
|
||||
(let ((v1-0 (-> this display-state-pos)))
|
||||
(cond
|
||||
((< v1-0 5)
|
||||
@@ -669,7 +666,7 @@
|
||||
|
||||
;; definition for method 46 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod pop! progress ((this progress))
|
||||
(defmethod pop! ((this progress))
|
||||
(let ((v1-0 (-> this display-state-pos)))
|
||||
(cond
|
||||
((> v1-0 0)
|
||||
@@ -689,7 +686,7 @@
|
||||
|
||||
;; definition for method 51 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod set-transition-progress! progress ((this progress) (arg0 int))
|
||||
(defmethod set-transition-progress! ((this progress) (arg0 int))
|
||||
(set! (-> this transition-offset) arg0)
|
||||
(set! (-> this transition-offset-invert) (- 512 arg0))
|
||||
(set! (-> this transition-percentage) (* 0.001953125 (the float arg0)))
|
||||
@@ -700,7 +697,7 @@
|
||||
|
||||
;; definition for method 52 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod set-transition-speed! progress ((this progress))
|
||||
(defmethod set-transition-speed! ((this progress))
|
||||
(case (-> this display-state)
|
||||
(((progress-screen fuel-cell)
|
||||
(progress-screen money)
|
||||
@@ -912,14 +909,14 @@
|
||||
)
|
||||
|
||||
;; definition for method 7 of type game-count-info
|
||||
(defmethod relocate game-count-info ((this game-count-info) (arg0 int))
|
||||
(defmethod relocate ((this game-count-info) (arg0 int))
|
||||
(set! *game-counts* this)
|
||||
this
|
||||
)
|
||||
|
||||
;; definition for method 7 of type progress
|
||||
;; INFO: Return type mismatch process vs progress.
|
||||
(defmethod relocate progress ((this progress) (arg0 int))
|
||||
(defmethod relocate ((this progress) (arg0 int))
|
||||
(dotimes (v1-0 (-> this nb-of-particles))
|
||||
(when (-> this particles v1-0 part)
|
||||
(if (nonzero? (-> this particles v1-0 part))
|
||||
@@ -934,7 +931,7 @@
|
||||
|
||||
;; definition for method 21 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod adjust-sprites progress ((this progress))
|
||||
(defmethod adjust-sprites ((this progress))
|
||||
(let ((f0-1 (* 0.00024414062 (the float (-> this in-out-position)))))
|
||||
(set! (-> this particles 2 init-pos x) (the float (+ (-> this right-x-offset) 409 (the int (* 301.5 f0-1)))))
|
||||
(set! (-> this particles 1 init-pos x) (the float (+ (-> this left-x-offset) 59)))
|
||||
@@ -969,7 +966,7 @@
|
||||
|
||||
;; definition for method 22 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod adjust-icons progress ((this progress))
|
||||
(defmethod adjust-icons ((this progress))
|
||||
(dotimes (v1-0 (-> this nb-of-icons))
|
||||
(when (>= v1-0 4)
|
||||
(set-vector!
|
||||
@@ -995,7 +992,7 @@
|
||||
|
||||
;; definition for method 23 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod adjust-ratios progress ((this progress) (aspect symbol) (video-mode symbol))
|
||||
(defmethod adjust-ratios ((this progress) (aspect symbol) (video-mode symbol))
|
||||
(case aspect
|
||||
(('aspect4x3)
|
||||
(set! (-> this sides-x-scale) 1.0)
|
||||
@@ -1047,7 +1044,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 32 of type progress
|
||||
(defmethod can-go-back? progress ((this progress))
|
||||
(defmethod can-go-back? ((this progress))
|
||||
(let ((v1-2 (-> *progress-process* 0 display-state))
|
||||
(a1-1 (-> *progress-state* starting-state))
|
||||
)
|
||||
@@ -1077,12 +1074,12 @@
|
||||
|
||||
;; definition for method 19 of type progress
|
||||
;; INFO: Return type mismatch object vs symbol.
|
||||
(defmethod visible? progress ((this progress))
|
||||
(defmethod visible? ((this progress))
|
||||
(the-as symbol (and *progress-process* (zero? (-> *progress-process* 0 in-out-position))))
|
||||
)
|
||||
|
||||
;; definition for method 20 of type progress
|
||||
(defmethod hidden? progress ((this progress))
|
||||
(defmethod hidden? ((this progress))
|
||||
(or (not *progress-process*) (= (-> *progress-process* 0 in-out-position) 4096))
|
||||
)
|
||||
|
||||
@@ -1124,7 +1121,7 @@
|
||||
)
|
||||
|
||||
;; definition for method 53 of type progress
|
||||
(defmethod set-memcard-screen progress ((this progress) (arg0 progress-screen))
|
||||
(defmethod set-memcard-screen ((this progress) (arg0 progress-screen))
|
||||
(let ((s4-0 (-> this card-info))
|
||||
(gp-0 arg0)
|
||||
)
|
||||
@@ -1227,7 +1224,7 @@
|
||||
|
||||
;; definition for method 31 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod respond-memcard progress ((this progress))
|
||||
(defmethod respond-memcard ((this progress))
|
||||
(let ((s5-0 (-> this card-info)))
|
||||
(when (and s5-0 (not (-> this in-transition)))
|
||||
(when (or (cpad-pressed? 0 x) (cpad-pressed? 0 circle))
|
||||
@@ -1418,7 +1415,7 @@
|
||||
|
||||
;; definition for method 29 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod respond-common progress ((this progress))
|
||||
(defmethod respond-common ((this progress))
|
||||
(mc-get-slot-info 0 *progress-save-info*)
|
||||
(set! (-> this card-info) *progress-save-info*)
|
||||
(let ((s5-0 (-> *options-remap* (-> this display-state))))
|
||||
@@ -1856,7 +1853,7 @@
|
||||
|
||||
;; definition for method 30 of type progress
|
||||
;; INFO: Return type mismatch int vs none.
|
||||
(defmethod respond-progress progress ((this progress))
|
||||
(defmethod respond-progress ((this progress))
|
||||
(when (not (-> this in-transition))
|
||||
(cond
|
||||
((cpad-pressed? 0 up)
|
||||
|
||||
Reference in New Issue
Block a user