diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 92f0782640..1b3e197a87 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -496,10 +496,11 @@ (defenum bucket-id :type int32 :bitfield #f - + (bucket-1 1) (bucket-2 2) (sky-draw 3) + (bucket-4 4) ;; ocean (tfrag-tex0 5) ;; merc0 10 ;; generic0 11 @@ -549,6 +550,7 @@ (water-tex1 60) (bucket-61 61) (bucket-62 62) + (bucket-63 63) ; ocean ;; merc1 61 ;; generic1 62 (depth-cue 64) @@ -7179,8 +7181,8 @@ (define-extern *ocean-off* symbol) (define-extern *ocean-mid-off* symbol) (define-extern *ocean-near-off* symbol) -(define-extern *ocean-heights* symbol) -(define-extern *ocean-verts* symbol) +(define-extern *ocean-heights* ocean-wave-info) ;; guess +(define-extern *ocean-verts* (pointer vector)) ;; ret from ocean-generate-verts ;; ---------------------- @@ -11302,10 +11304,10 @@ (unknown-smush00 smush-control :inline :offset 2288) ;; from (event target-fishing) (unknown-vector110 vector :inline :offset 2320) ;; from logic-target::flag-setup (unknown-vector111 vector :inline :offset 2336) ;; from logic-target::flag-setup - (unknown-int30 int32 :offset 2384) ;; from target-util::target-danger-set! + (unknown-symbol30 symbol :offset 2384) ;; from target-util::target-danger-set! (unknown-dword50 int64 :offset 2392) ;; from target-util::target-start-attack (unknown-dword51 int64 :offset 2400) ;; from target-util::target-start-attack - (unknown-symbol10 symbol :offset 2428) ;; from logic-target::post-flag-setup + (unknown-symbol40 symbol :offset 2428) ;; from logic-target::post-flag-setup (unknown-halfword00 int16 :offset 2488) ;; from logic-target::target-move-dist ;; these were determined from racer-collision-reaction. (history-length int16 :offset 2490) @@ -11315,7 +11317,9 @@ (unknown-dword70 int64 :offset 18888) ;; from logic-target::post-flag-setup (unknown-dword71 int64 :offset 18896) ;; from logic-target::post-flag-setup (unknown-dword72 int64 :offset 18912) ;; from logic-target::reset-target-state - (pad uint32 7) + (unknown-int50 uint32 :offset 18976) ;; from logic-target::print-target-stats + (unknown-soundid00 sound-id :offset 18980) ;; from powerups::target-powerup-process + (unknown-float130 float :offset 18984) ;; from powerups::target-powerup-process ) :size-assert #x4a2c :method-count-assert 65 @@ -16738,7 +16742,7 @@ (define-extern sp-adjust-launch (function sparticle-launchinfo sparticle-cpuinfo (inline-array sp-field-init-spec) none)) (define-extern sp-euler-convert (function sparticle-launchinfo sparticle-cpuinfo none)) (define-extern sp-rotate-system (function sparticle-launchinfo sparticle-cpuinfo transformq none)) -(define-extern sp-launch-particles-death (function sparticle-system sparticle-launcher sparticle-launchinfo none)) +(define-extern sp-launch-particles-death (function sparticle-system sparticle-launcher vector none)) (define-extern sp-clear-queue (function none)) (define-extern sp-relaunch-particle-2d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) (define-extern sp-relaunch-particle-3d (function object sparticle-launcher sparticle-cpuinfo sprite-vec-data-3d none)) @@ -18245,17 +18249,17 @@ ;; - Functions -(define-extern birth-func-death-sparks function) -(define-extern merc-death-spawn function) +(define-extern birth-func-death-sparks (function none)) ;; does absolutely nothing +(define-extern merc-death-spawn (function int vector vector none)) ;; i think the int is the id for the particle table ;; - Unknowns -;;(define-extern *merc-death-globals* object) ;; unknown type -;;(define-extern death-beach-puppy object) ;; unknown type -;;(define-extern death-jungle-snake object) ;; unknown type -;;(define-extern death-default object) ;; unknown type -;;(define-extern death-warp-in object) ;; unknown type -;;(define-extern death-warp-out object) ;; unknown type +(define-extern *merc-death-globals* vector) ;; unknown type +(define-extern death-beach-puppy death-info) ;; unknown type +(define-extern death-jungle-snake death-info) ;; unknown type +(define-extern death-default death-info) ;; unknown type +(define-extern death-warp-in death-info) ;; unknown type +(define-extern death-warp-out death-info) ;; unknown type ;; ---------------------- @@ -19383,7 +19387,7 @@ (define-extern cam-launcher-joystick function) (define-extern launcher-init-by-other function) (define-extern touch-tracker-init (function object object object none)) -(define-extern process-drawable-pair-random-point! function) +(define-extern process-drawable-pair-random-point! (function process-drawable process-drawable vector float vector)) (define-extern birth-func-set-quat function) (define-extern draw-eco-beam (function vector vector none)) @@ -19591,7 +19595,7 @@ (define-extern target-exit (function none)) (define-extern target-calc-camera-pos (function none :behavior target)) (define-extern do-target-shadow (function none :behavior target)) -(define-extern target-powerup-process (function none)) +(define-extern target-powerup-process (function none :behavior target)) (define-extern flag-setup (function none :behavior target)) (define-extern build-conversions (function vector vector :behavior target)) (define-extern do-rotations1 (function quaternion :behavior target)) @@ -19707,7 +19711,7 @@ (define-extern target-attacked (function symbol uint uint process (state target) object :behavior target)) ;; unconfirmed, target-tube::(event target-tube-start) (define-extern target-apply-tongue function) (define-extern get-intersect-point function) -(define-extern target-powerup-effect function) +(define-extern target-powerup-effect (function symbol none :behavior target)) (define-extern target-shoved function) (define-extern target-dangerous-event-handler function) (define-extern target-jump-event-handler function) @@ -20845,7 +20849,7 @@ ;; - Functions (define-extern eco-blue-glow (function collide-shape-prim none)) -(define-extern cloud-track (function none)) +(define-extern cloud-track (function process-tree process-tree (function vector none) int int int symbol)) ;; ---------------------- @@ -21263,18 +21267,18 @@ ;; - Functions -(define-extern ocean-interp-wave function) -(define-extern ocean-generate-verts function) -(define-extern draw-ocean-texture function) -(define-extern ocean-init-buffer (function dma-buffer none)) ; not confirmed -(define-extern draw-ocean-far (function dma-buffer none)) ; not confirmed +(define-extern ocean-interp-wave (function ocean-wave-info uint none)) ;; unconfirmed +(define-extern ocean-generate-verts (function (pointer vector) ocean-wave-info none)) ;; unconfirmed - pointer is *ocean-verts* +(define-extern draw-ocean-texture (function dma-buffer (pointer vector) symbol none)) ;; unconfirmed - pointer is *ocean-verts* +(define-extern ocean-init-buffer (function dma-buffer pointer)) +(define-extern draw-ocean-far (function dma-buffer profile-frame)) (define-extern draw-ocean-mid (function dma-buffer none)) ; not confirmed -(define-extern ocean-end-buffer (function dma-buffer none)) ; not confirmed -(define-extern draw-ocean-near function) -(define-extern init-ocean-far-regs function) -(define-extern render-ocean-far function) -(define-extern render-ocean-quad function) -(define-extern draw-large-polygon-ocean function) +(define-extern ocean-end-buffer (function dma-buffer pointer)) +(define-extern draw-ocean-near (function dma-buffer none)) ; not confirmed +(define-extern init-ocean-far-regs (function none)) +(define-extern render-ocean-far (function dma-buffer int none)) +(define-extern render-ocean-quad (function ocean-mid-upload2 none)) +(define-extern draw-large-polygon-ocean (function none)) (define-extern draw-ocean (function none)) (define-extern update-ocean (function none)) @@ -21284,7 +21288,7 @@ ;; - Unknowns -;;(define-extern *swamp-low-ocean-marker* object) ;; unknown type +(define-extern *swamp-low-ocean-marker* vector) ;; unknown type ;; ---------------------- @@ -21307,19 +21311,19 @@ ;; - Functions -(define-extern ocean-texture-add-constants function) -(define-extern ocean-texture-add-envmap function) -(define-extern ocean-texture-add-verts function) -(define-extern ocean-texture-add-call-start function) -(define-extern ocean-texture-add-call-rest function) -(define-extern ocean-texture-add-verts-last function) -(define-extern ocean-texture-add-call-done function) -(define-extern ocean-texture-setup-constants function) +(define-extern ocean-texture-add-constants (function dma-buffer pointer)) +(define-extern ocean-texture-add-envmap (function dma-buffer pointer)) +(define-extern ocean-texture-add-verts (function dma-buffer (pointer vector) pointer)) ;; pointer is *ocean-verts* +(define-extern ocean-texture-add-call-start (function dma-buffer none)) ;; unconfirmed +(define-extern ocean-texture-add-call-rest (function dma-buffer none)) ;; unconfirmed +(define-extern ocean-texture-add-verts-last (function dma-buffer (pointer vector) (pointer vector) pointer)) ;; pointer is *ocean-verts* and unconfirmed +(define-extern ocean-texture-add-call-done (function dma-buffer none)) ;; unconfirmed +(define-extern ocean-texture-setup-constants (function ocean-texture-constants none)) ;; - Unknowns (define-extern ocean-texture-vu1-block vu-function) -;;(define-extern *ocean-texture-work* object) ;; unknown type +(define-extern *ocean-texture-work* ocean-texture-work) ;; unknown type ;; ---------------------- diff --git a/decompiler/config/jak1_ntsc_black_label/hacks.jsonc b/decompiler/config/jak1_ntsc_black_label/hacks.jsonc index 447e2dbfd7..8ca9b6c584 100644 --- a/decompiler/config/jak1_ntsc_black_label/hacks.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/hacks.jsonc @@ -157,7 +157,7 @@ // generic-merc "generic-merc-execute-all", - "generic-merc-execute-asm", + "generic-merc-execute-asm", // CFG "high-speed-reject", "mercneric-convert", "mercneric-bittable-asm", @@ -331,10 +331,10 @@ "add-blue-motion", // ocean - "draw-large-polygon-ocean", + "draw-large-polygon-ocean", // CFG // ocean-vu0 - "ocean-generate-verts", + "ocean-generate-verts", // crash "ocean-interp-wave", // nav-enemy BUG diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index df8ed07d7f..203ac89995 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -968,8 +968,6 @@ ["L100", "vector"] ], - "part-tester": [["L32", "uint64", true]], - "anim-tester": [ ["L509", "(inline-array list-field)", 12], ["L523", "vector"], @@ -1150,6 +1148,11 @@ ["L32", "uint64", true] ], + "ocean-texture": [ + ["L14", "vu-function"], + ["L15", "ocean-texture-work"] + ], + // please do not add things after this entry! git is dumb. "object-file-that-doesnt-actually-exist-and-i-just-put-this-here-to-prevent-merge-conflicts-with-this-file": [] diff --git a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc index fe6bb5e48d..2c55299e26 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -2747,5 +2747,42 @@ [16, "event-message-block"] ], + "cloud-track": [ + [16, "vector"], + [32, "vector"] + ], + + "target-powerup-effect": [ + [16, "vector"] + ], + + "target-powerup-process": [ + [16, "vector"], + [32, "vector"], + [48, "vector"], + [64, "vector"], + [80, "event-message-block"], + [160, "vector"], + [176, "vector"], + [192, "touching-shapes-entry"], + [208, "vector"], + [224, "vector"], + [240, "vector"], + [256, "vector"], + [272, "vector"], + [288, "vector"], + [304, "vector"], + [320, "vector"] + ], + + "process-drawable-pair-random-point!": [ + [16, "vector"], + [32, "vector"] + ], + + "update-ocean": [ + [16, "vector"] + ], + "placeholder-do-not-add-below!": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index 518258f143..5cae99f3b6 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -4121,5 +4121,13 @@ [[8, 56], "v1", "cam-collision-record"] ], + "cloud-track": [ + [26, "s1", "handle"], + [39, "s2", "handle"], + [74, "s1", "handle"], + [76, "s2", "handle"], + [101, "s2", "handle"] + ], + "placeholder-do-not-add-below": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc index 00f9274401..7b05ea3481 100644 --- a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc @@ -3649,5 +3649,11 @@ } }, + "execute-math-engine": { + "vars": { + "a0-1": ["a0-1", "process-drawable"] + } + }, + "aaaaaaaaaaaaaaaaaaaaaaa": {} } diff --git a/goal_src/engine/ambient/ambient.gc b/goal_src/engine/ambient/ambient.gc index aeea9b4857..fa9248abbb 100644 --- a/goal_src/engine/ambient/ambient.gc +++ b/goal_src/engine/ambient/ambient.gc @@ -5,11 +5,17 @@ ;; name in dgo: ambient ;; dgos: GAME, ENGINE -;; decomp begins +(define-extern level-hint-init-by-other (function game-text-id string entity none :behavior level-hint)) +(define-extern ambient-hint-init-by-other (function string vector symbol none :behavior level-hint)) +(define-extern level-hint-sidekick (state string level-hint)) +(define-extern level-hint-normal (state level-hint)) +(define-extern level-hint-exit (state level-hint)) +(define-extern level-hint-error (state string string level-hint)) +(define-extern level-hint-ambient-sound (state string level-hint)) + +;; DECOMP BEGINS -;; definition for method 8 of type drawable-ambient -;; INFO: Return type mismatch int vs drawable-ambient. (defmethod mem-usage drawable-ambient @@ -25,8 +31,6 @@ (the-as drawable-ambient 0) ) -;; definition for method 8 of type drawable-inline-array-ambient -;; INFO: Return type mismatch int vs drawable-inline-array-ambient. (defmethod mem-usage drawable-inline-array-ambient @@ -44,10 +48,8 @@ (the-as drawable-inline-array-ambient 0) ) -;; definition for symbol *hint-semaphore*, type (pointer level-hint) (define *hint-semaphore* (the-as (pointer level-hint) #f)) -;; definition for function level-hint-process-cmd (defun level-hint-process-cmd ((arg0 (pointer int32)) (arg1 int) (arg2 int)) (let ((v1-2 (-> arg0 arg1)) (gp-0 (+ arg1 1)) @@ -210,8 +212,6 @@ ) ) -;; definition for function level-hint-task-process -;; Used lq/sq (defun level-hint-task-process ((arg0 entity) (arg1 uint128) (arg2 string)) (local-vars (sv-16 res-tag)) (let ((gp-0 (res-lump-value arg0 'text-id int :default arg1)) @@ -267,15 +267,12 @@ ) ) -;; definition for function level-hint-surpress! -;; INFO: Return type mismatch int vs none. (defun level-hint-surpress! () (set! (-> *game-info* hint-play-time) (-> *display* base-frame-counter)) 0 (none) ) -;; definition for function can-grab-display? (defun can-grab-display? ((arg0 process-taskable)) (let ((v1-2 (handle->process (-> *game-info* display-text-handle)))) (when @@ -317,9 +314,6 @@ ) ) -;; definition for function level-hint-spawn -;; INFO: Return type mismatch int vs none. -(define-extern level-hint-init-by-other (function game-text-id string entity none :behavior level-hint)) (defun level-hint-spawn ((arg0 game-text-id) @@ -354,9 +348,6 @@ (none) ) -;; definition for function ambient-hint-spawn -;; INFO: Return type mismatch (pointer process) vs object. -(define-extern ambient-hint-init-by-other (function string vector symbol none :behavior level-hint)) (defun ambient-hint-spawn ((arg0 string) (arg1 vector) (arg2 process-tree) (arg3 symbol)) @@ -387,35 +378,22 @@ ) ) -;; definition for function kill-current-level-hint -;; INFO: Return type mismatch int vs none. (defun kill-current-level-hint ((arg0 pair) (arg1 pair) (arg2 symbol)) - (with-pp - (when *hint-semaphore* - (let ((s4-0 (ppointer->process *hint-semaphore*))) - (when - (and - (or (null? arg0) (member (-> (the-as level-hint s4-0) mode) arg0)) - (not (member (-> (the-as level-hint s4-0) mode) arg1)) - ) - (let ((a1-4 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-4 from) pp) - (set! (-> a1-4 num-params) 0) - (set! (-> a1-4 message) arg2) - (send-event-function (the-as process s4-0) a1-4) - ) + (when *hint-semaphore* + (let ((s4-0 (ppointer->process *hint-semaphore*))) + (if + (and + (or (null? arg0) (member (-> (the-as level-hint s4-0) mode) arg0)) + (not (member (-> (the-as level-hint s4-0) mode) arg1)) ) + (send-event (the-as level-hint s4-0) arg2) ) ) - 0 - (none) ) + 0 + (none) ) -;; definition for function level-hint-init-by-other -;; INFO: Return type mismatch int vs none. -(define-extern level-hint-sidekick (state string level-hint)) -(define-extern level-hint-normal (state level-hint)) (defbehavior level-hint-init-by-other level-hint ((arg0 game-text-id) (arg1 string) (arg2 entity)) @@ -467,9 +445,6 @@ (none) ) -;; definition for function ambient-hint-init-by-other -;; INFO: Return type mismatch int vs none. -(define-extern level-hint-ambient-sound (state string level-hint)) (defbehavior ambient-hint-init-by-other level-hint ((arg0 string) (arg1 vector) (arg2 symbol)) @@ -482,7 +457,14 @@ (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) (set! (-> self mode) arg2) (if (or (= arg2 'camera) (= arg2 'ambient) (= arg2 'stinger)) - (push-setting! *setting-control* self 'ambient (process->ppointer self) 0.0 0) + (push-setting! + *setting-control* + self + 'ambient + (process->ppointer self) + 0.0 + 0 + ) ) (copy-settings-from-target! *setting-control*) (set! @@ -505,8 +487,6 @@ (none) ) -;; definition for method 14 of type level-hint -;; INFO: Return type mismatch int vs none. (defmethod print-text level-hint ((obj level-hint)) (when (!= *common-text* #f) (let @@ -543,7 +523,6 @@ (none) ) -;; definition for method 15 of type level-hint (defmethod dummy-15 level-hint ((obj level-hint)) (and (!= (-> obj next-state name) 'level-hint-sidekick) @@ -551,9 +530,6 @@ ) ) -;; failed to figure out what this is: -(define-extern level-hint-exit (state level-hint)) -(define-extern level-hint-error (state string string level-hint)) (defstate level-hint-normal (level-hint) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -623,7 +599,6 @@ ) ) -;; failed to figure out what this is: (defstate level-hint-sidekick (level-hint) :event (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) @@ -655,12 +630,7 @@ (if (= (ppointer->process *hint-semaphore*) self) (set! *hint-semaphore* (the-as (pointer level-hint) #f)) ) - (let ((a1-3 (new 'stack-no-clear 'event-message-block))) - (set! (-> a1-3 from) self) - (set! (-> a1-3 num-params) 0) - (set! (-> a1-3 message) 'die) - (send-event-function (handle->process (-> self voicebox)) a1-3) - ) + (send-event (handle->process (-> self voicebox)) 'die) (none) ) :code @@ -715,9 +685,30 @@ ) (cond ((= (current-str-id) s5-2) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) - (push-setting! *setting-control* self 'dialog-volume 'rel (-> *setting-control* current dialog-volume-hint) 0) + (push-setting! + *setting-control* + self + 'music-volume + 'rel + (-> *setting-control* current music-volume-movie) + 0 + ) + (push-setting! + *setting-control* + self + 'sfx-volume + 'rel + (-> *setting-control* current sfx-volume-movie) + 0 + ) + (push-setting! + *setting-control* + self + 'dialog-volume + 'rel + (-> *setting-control* current dialog-volume-hint) + 0 + ) (while (= (current-str-id) s5-2) (suspend) ) @@ -734,7 +725,6 @@ ) ) -;; failed to figure out what this is: (defstate level-hint-ambient-sound (level-hint) :event (-> level-hint-sidekick event) @@ -807,8 +797,22 @@ (cond ((= (current-str-id) (-> self sound-id)) (when (or (= (-> self mode) 'stinger) (= (-> self mode) 'camera)) - (push-setting! *setting-control* self 'music-volume 'rel (-> *setting-control* current music-volume-movie) 0) - (push-setting! *setting-control* self 'sfx-volume 'rel (-> *setting-control* current sfx-volume-movie) 0) + (push-setting! + *setting-control* + self + 'music-volume + 'rel + (-> *setting-control* current music-volume-movie) + 0 + ) + (push-setting! + *setting-control* + self + 'sfx-volume + 'rel + (-> *setting-control* current sfx-volume-movie) + 0 + ) ) (while (= (current-str-id) (-> self sound-id)) (suspend) @@ -823,7 +827,6 @@ ) ) -;; failed to figure out what this is: (defstate level-hint-error (level-hint) :event (-> level-hint-normal event) @@ -874,7 +877,6 @@ ) ) -;; failed to figure out what this is: (defstate level-hint-exit (level-hint) :code (behavior () @@ -885,8 +887,6 @@ ) ) -;; definition for function ambient-type-error -;; INFO: Return type mismatch int vs none. (defun ambient-type-error ((arg0 drawable-ambient) (arg1 vector)) (when *display-entity-errors* (let ((s2-0 (-> arg0 ambient))) @@ -912,15 +912,11 @@ (none) ) -;; definition for function ambient-type-poi -;; INFO: Return type mismatch int vs none. (defun ambient-type-poi ((arg0 drawable-ambient) (arg1 vector)) 0 (none) ) -;; definition for function ambient-type-hint -;; INFO: Return type mismatch int vs none. (defun ambient-type-hint ((arg0 drawable-ambient) (arg1 vector)) (with-pp (let @@ -996,9 +992,6 @@ ) ) -;; definition for function ambient-type-sound -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defun ambient-type-sound ((arg0 drawable-ambient) (arg1 vector)) (local-vars (sv-16 string) (sv-112 res-tag)) (let* ((s5-0 (-> arg0 ambient)) @@ -1093,9 +1086,6 @@ (none) ) -;; definition for function ambient-type-sound-loop -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defun ambient-type-sound-loop ((arg0 drawable-ambient) (arg1 vector)) (let* ((s5-0 (-> arg0 ambient)) (s2-0 @@ -1130,9 +1120,6 @@ (none) ) -;; definition for function ambient-type-light -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defun ambient-type-light ((arg0 drawable-ambient) (arg1 vector)) (when *target* (let ((s4-0 (-> arg0 ambient)) @@ -1196,9 +1183,6 @@ (none) ) -;; definition for function ambient-type-dark -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defun ambient-type-dark ((arg0 drawable-ambient) (arg1 vector)) (when *target* (let ((s4-0 (-> arg0 ambient)) @@ -1263,9 +1247,6 @@ (none) ) -;; definition for function ambient-type-weather-off -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defun ambient-type-weather-off ((arg0 drawable-ambient) (arg1 vector)) (when *target* (let ((s4-0 (-> arg0 ambient)) @@ -1330,37 +1311,32 @@ (none) ) -;; definition for function ambient-type-ocean-off -;; INFO: Return type mismatch int vs none. (defun ambient-type-ocean-off ((arg0 drawable-ambient) (arg1 vector)) (set! *ocean-off* #t) 0 (none) ) -;; definition for function ambient-type-ocean-near-off -;; INFO: Return type mismatch int vs none. (defun ambient-type-ocean-near-off ((arg0 drawable-ambient) (arg1 vector)) (set! *ocean-near-off* #t) 0 (none) ) -;; definition for function ambient-type-music -;; INFO: Return type mismatch int vs none. (defun ambient-type-music ((arg0 drawable-ambient) (arg1 vector)) (let ((gp-0 (-> arg0 ambient))) - (if (-> gp-0 ambient-data user-object 0) + (if (-> gp-0 ambient-data user-float 0) (set! (-> *setting-control* default music) - (the-as symbol (-> gp-0 ambient-data user-object 0)) + (the-as symbol (-> gp-0 ambient-data user-float 0)) ) ) - (when (nonzero? (-> gp-0 ambient-data user-int32 1)) + (when (nonzero? (-> gp-0 ambient-data user-float 1)) (let ((f0-0 (res-lump-float gp-0 'priority :default 10.0))) (when (>= f0-0 (-> *setting-control* default sound-flava-priority)) (set! (-> *setting-control* default sound-flava) + ;; TODO this following form has been manually modified to work (the-as uint (-> gp-0 ambient-data user-int32 1)) ) (set! (-> *setting-control* default sound-flava-priority) f0-0) @@ -1372,8 +1348,6 @@ (none) ) -;; definition for method 17 of type drawable-ambient -;; INFO: Return type mismatch int vs none. (defmethod collect-ambients drawable-ambient @@ -1389,8 +1363,6 @@ (none) ) -;; definition for method 17 of type drawable-inline-array-ambient -;; INFO: Return type mismatch int vs none. (defmethod collect-ambients drawable-inline-array-ambient @@ -1409,8 +1381,6 @@ (none) ) -;; definition for method 17 of type drawable-tree-ambient -;; INFO: Return type mismatch int vs none. (defmethod collect-ambients drawable-tree-ambient @@ -1420,9 +1390,6 @@ (none) ) -;; definition for method 28 of type entity-ambient -;; INFO: Return type mismatch entity-ambient vs none. -;; Used lq/sq (defmethod birth-ambient! entity-ambient ((obj entity-ambient)) (set! (-> obj ambient-data quad) (the-as uint128 0)) (set! (-> obj ambient-data function) ambient-type-error) @@ -1567,23 +1534,16 @@ (none) ) -;; definition for symbol *execute-ambients*, type symbol (define *execute-ambients* #t) -;; definition for method 18 of type drawable-ambient -;; INFO: Return type mismatch int vs none. (defmethod dummy-18 drawable-ambient ((obj drawable-ambient) (arg0 vector)) ((-> obj ambient ambient-data function) obj arg0) 0 (none) ) -;; definition (debug) for function ambient-inspect ;; ERROR: function was not converted to expressions. Cannot decompile. -;; definition for method 27 of type entity-ambient -;; INFO: Return type mismatch int vs none. -;; Used lq/sq (defmethod draw-debug entity-ambient ((obj entity-ambient)) (local-vars (sv-16 uint128)) (let ((gp-0 (-> obj trans)) diff --git a/goal_src/engine/collide/collide-target-h.gc b/goal_src/engine/collide/collide-target-h.gc index 2d9357af0b..15af0a5f4a 100644 --- a/goal_src/engine/collide/collide-target-h.gc +++ b/goal_src/engine/collide/collide-target-h.gc @@ -133,10 +133,10 @@ (unknown-smush00 smush-control :inline :offset 2288) ;; from (event target-fishing) (unknown-vector110 vector :inline :offset 2320) ;; from logic-target::flag-setup (unknown-vector111 vector :inline :offset 2336) ;; from logic-target::flag-setup - (unknown-int30 int32 :offset 2384) ;; from target-util::target-danger-set! + (unknown-symbol30 symbol :offset 2384) ;; from target-util::target-danger-set! (unknown-dword50 int64 :offset 2392) ;; from target-util::target-start-attack (unknown-dword51 int64 :offset 2400) ;; from target-util::target-start-attack - (unknown-symbol10 symbol :offset 2428) ;; from logic-target::post-flag-setup + (unknown-symbol40 symbol :offset 2428) ;; from logic-target::post-flag-setup (unknown-halfword00 int16 :offset 2488) ;; from logic-target::target-move-dist ;; these were determined from racer-collision-reaction. (history-length int16 :offset 2490) @@ -146,7 +146,9 @@ (unknown-dword70 int64 :offset 18888) ;; from logic-target::post-flag-setup (unknown-dword71 int64 :offset 18896) ;; from logic-target::post-flag-setup (unknown-dword72 int64 :offset 18912) ;; from logic-target::reset-target-state - (pad uint32 7) + (unknown-int50 uint32 :offset 18976) ;; from logic-target::print-target-stats + (unknown-soundid00 sound-id :offset 18980) ;; from powerups::target-powerup-process + (unknown-float130 float :offset 18984) ;; from powerups::target-powerup-process ) :size-assert #x4a2c :method-count-assert 65 diff --git a/goal_src/engine/dma/dma-h.gc b/goal_src/engine/dma/dma-h.gc index 73c75d3f92..78e755caaa 100644 --- a/goal_src/engine/dma/dma-h.gc +++ b/goal_src/engine/dma/dma-h.gc @@ -212,10 +212,11 @@ (defenum bucket-id :type int32 :bitfield #f - + (bucket-1 1) (bucket-2 2) (sky-draw 3) + (bucket-4 4) ;; ocean (tfrag-tex0 5) ;; merc0 10 ;; generic0 11 @@ -265,10 +266,11 @@ (water-tex1 60) (bucket-61 61) (bucket-62 62) + (bucket-63 63) ; ocean ;; merc1 61 ;; generic1 62 (depth-cue 64) - (pre-sprite-textures 65) ;; always common + (pre-sprite-textures 65) ;; common (sprite 66) ;; debug spheres? 67 (debug-draw0 67) diff --git a/goal_src/engine/gfx/merc/merc-death.gc b/goal_src/engine/gfx/merc/merc-death.gc index 51859d2191..6f435897de 100644 --- a/goal_src/engine/gfx/merc/merc-death.gc +++ b/goal_src/engine/gfx/merc/merc-death.gc @@ -5,15 +5,142 @@ ;; name in dgo: merc-death ;; dgos: GAME, ENGINE -;; TODO - for effect-control +;; DECOMP BEGINS + +(define *merc-death-globals* (new 'global 'vector)) + (deftype death-info (basic) - ((vertex-skip uint16 :offset-assert 4) - (timer uint8 :offset-assert 6) - (overlap uint8 :offset-assert 7) - (effect uint32 :offset-assert 8) - (sound basic :offset-assert 12) + ((vertex-skip uint16 :offset-assert 4) + (timer uint8 :offset-assert 6) + (overlap uint8 :offset-assert 7) + (effect uint32 :offset-assert 8) + (sound basic :offset-assert 12) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) + + +(defun birth-func-death-sparks () + 0 + (none) + ) + +(define + death-beach-puppy + (new 'static 'death-info + :vertex-skip #x82 + :timer #x4b + :overlap #x4 + :effect #x29 + :sound 'temp-enemy-die + ) + ) + +(define + death-jungle-snake + (new 'static 'death-info + :vertex-skip #xa + :timer #x4b + :overlap #x4 + :effect #x29 + :sound 'temp-enemy-die + ) + ) + +(define + death-default + (new 'static 'death-info + :vertex-skip #x50 + :timer #x4b + :overlap #x4 + :effect #x29 + :sound 'temp-enemy-die + ) + ) + +(define + death-warp-in + (new 'static 'death-info + :vertex-skip #x96 + :timer #x4b + :effect #x29 + :sound 'warpgate-tele + ) + ) + +(define + death-warp-out + (new 'static 'death-info + :vertex-skip #x96 + :timer #x96 + :effect #x29 + :sound 'warpgate-tele + ) + ) + +(set! + (-> *part-id-table* 41) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (sp-flt spt-scale-x (meters 0.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 64.0 32.0 1.0) + (sp-rnd-flt spt-g 16.0 32.0 1.0) + (sp-rnd-flt spt-b 48.0 32.0 1.0) + (sp-rnd-flt spt-a 48.0 48.0 1.0) + (sp-rnd-flt spt-vel-y (meters 0.0) (meters 0.006666667) 1.0) + (sp-flt spt-scalevel-x (meters -0.0016666667)) + (sp-flt spt-scalevel-y (meters 0.02)) + (sp-flt spt-accel-y -2.7306666) + (sp-int spt-timer 120) + (sp-cpuinfo-flags bit2 bit3 bit12) + (sp-int-plain-rnd spt-next-time 15 59 1) + (sp-launcher-by-id spt-next-launcher 42) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 42) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 5 + (sp-flt spt-fade-a -1.4222223) + (sp-int spt-timer 45) + (sp-int spt-next-time 42) + (sp-launcher-by-id spt-next-launcher 43) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 43) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 4 + (sp-flt spt-scalevel-x (meters 0.0)) + (sp-flt spt-fade-a -0.21333334) + (sp-int-plain-rnd spt-timer 0 296 1) + (sp-end) + ) + ) + ) + +(defun merc-death-spawn ((arg0 int) (arg1 vector) (arg2 vector)) + (let ((v1-2 (-> *part-id-table* arg0))) + (if (and (nonzero? v1-2) (= (-> v1-2 type) sparticle-launcher)) + (sp-launch-particles-death *sp-particle-system-2d* v1-2 arg1) + ) + ) + 0 + (none) + ) + + + + diff --git a/goal_src/engine/gfx/ocean/ocean-h.gc b/goal_src/engine/gfx/ocean/ocean-h.gc index c97482b486..3a9498c165 100644 --- a/goal_src/engine/gfx/ocean/ocean-h.gc +++ b/goal_src/engine/gfx/ocean/ocean-h.gc @@ -227,8 +227,8 @@ (define *ocean-off* #f) (define *ocean-mid-off* #f) (define *ocean-near-off* #f) -(define *ocean-heights* #f) -(define *ocean-verts* #f) +(define *ocean-heights* (new 'static 'ocean-wave-info)) +(define *ocean-verts* (the-as (pointer vector) #f)) (deftype ocean-vu0-work (structure) ((scales vector :inline :offset-assert 0) diff --git a/goal_src/engine/sparticle/sparticle-launcher.gc b/goal_src/engine/sparticle/sparticle-launcher.gc index 4ca29fed28..3c79997e24 100644 --- a/goal_src/engine/sparticle/sparticle-launcher.gc +++ b/goal_src/engine/sparticle/sparticle-launcher.gc @@ -439,7 +439,7 @@ (define *death-adgif* (the-as adgif-shader #f)) -(defun sp-launch-particles-death ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 sparticle-launchinfo)) +(defun sp-launch-particles-death ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 vector)) (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) @@ -451,7 +451,7 @@ (vf6 :class vf) ) (init-vf0-vector) - (.lvf vf30 (&-> arg2 launchrot quad)) + (.lvf vf30 (&-> arg2 quad)) (let ((v1-0 #x437f0000)) (.mov vf31 v1-0) ) @@ -1279,4 +1279,4 @@ (set! (-> arg1 next-time) (the-as uint (the int (rand-vu-float-range 0.0 (-> arg1 user-float))))) 0 (none) - ) \ No newline at end of file + ) diff --git a/goal_src/engine/target/logic-target.gc b/goal_src/engine/target/logic-target.gc index 67b428488a..33085be337 100644 --- a/goal_src/engine/target/logic-target.gc +++ b/goal_src/engine/target/logic-target.gc @@ -367,15 +367,22 @@ (let ((s4-2 format) (s3-2 arg1) (s2-2 "~0kwall:~6X mode:~-8S material:~-10S event:~S~%") - (s1-2 (-> arg0 control pad 4)) - (s0-2 (pat-mode->string (the-as pat-surface (-> arg0 control pad 4)))) + (s1-2 (-> arg0 control unknown-int50)) + (s0-2 + (pat-mode->string + (the-as pat-surface (-> arg0 control unknown-int50)) + ) + ) ) (set! sv-96 - (pat-material->string (the-as pat-surface (-> arg0 control pad 4))) + (pat-material->string (the-as pat-surface (-> arg0 control unknown-int50))) ) (let - ((t1-2 (pat-event->string (the-as pat-surface (-> arg0 control pad 4))))) + ((t1-2 + (pat-event->string (the-as pat-surface (-> arg0 control unknown-int50))) + ) + ) (s4-2 s3-2 s2-2 s1-2 s0-2 sv-96 t1-2) ) ) @@ -1628,7 +1635,7 @@ (target-timed-invulnerable-off self) ) ) - (set! (-> self control unknown-symbol10) #f) + (set! (-> self control unknown-symbol40) #f) 0 (none) ) @@ -2776,7 +2783,7 @@ (-> self sound) (new 'process 'ambient-sound 'none (-> self control trans)) ) - (set! (-> self control pad 5) (the-as uint (new-sound-id))) + (set! (-> self control unknown-soundid00) (new-sound-id)) (if *debug-segment* (add-connection *debug-engine* self target-print-stats self *stdcon0* #f) ) diff --git a/goal_src/engine/target/target-h.gc b/goal_src/engine/target/target-h.gc index 199f889a98..e8201ade81 100644 --- a/goal_src/engine/target/target-h.gc +++ b/goal_src/engine/target/target-h.gc @@ -17,7 +17,7 @@ ;; TODO - for logic-target - defined in shadow (define-extern do-target-shadow (function none :behavior target)) ;; TODO - for logic-target - defined in powerups -(define-extern target-powerup-process (function none)) +(define-extern target-powerup-process (function none :behavior target)) ;; TODO - for logic-target - defined in target-handler (define-extern target-exit (function none)) (define-extern target-generic-event-handler (function process int symbol event-message-block object)) @@ -36,25 +36,6 @@ (declare-type tube-info basic) (declare-type racer-info basic) -;; TODO - for mood -(define-extern target-joint-pos (function vector)) ;; TODO - unconfirmed - -;; TODO - for target-util -(define-extern target-falling (state symbol none)) -(define-extern target-slide-down (state none)) - -;; TODO - for logic-target - defined in shadow -(define-extern do-target-shadow (function none :behavior target)) -;; TODO - for logic-target - defined in powerups -(define-extern target-powerup-process (function none)) -;; TODO - for logic-target - defined in target-handler -(define-extern target-exit (function none)) -(define-extern target-generic-event-handler (function process int symbol event-message-block object)) -;; TODO - for logic-target - defined in sidekick -(define-extern init-sidekick (function none)) ;; TODO - not finished -;; TODO - for logic-target - defined in target-death -(define-extern target-continue (state continue-point none)) - ;; decomp begins ;; definition of type target @@ -127,4 +108,4 @@ ) (define-perm *sidekick* sidekick #f) -(define-extern target-attacked (function symbol uint uint process (state target) object :behavior target)) ;; unconfirmed, target-tube::(event target-tube-start) \ No newline at end of file +(define-extern target-attacked (function symbol uint uint process (state target) object :behavior target)) ;; unconfirmed, target-tube::(event target-tube-start) diff --git a/goal_src/engine/target/target-util.gc b/goal_src/engine/target/target-util.gc index 37f7701950..c662edf099 100644 --- a/goal_src/engine/target/target-util.gc +++ b/goal_src/engine/target/target-util.gc @@ -251,7 +251,7 @@ (-> *TARGET-bank* root-offset) (-> *TARGET-bank* root-radius) ) - (set! (-> self control unknown-int30) (the-as int arg0)) + (set! (-> self control unknown-symbol30) arg0) (set! (-> self state-flags) (logand -3 (-> self state-flags))) (set! (-> s4-0 transform-index) -2) (set! (-> s4-0 prim-core collide-as) (the-as uint 0)) @@ -270,7 +270,7 @@ (set! (-> gp-0 prim-core offense) 0) (case arg0 (('harmless #f) - (set! (-> self control unknown-int30) (the-as int #f)) + (set! (-> self control unknown-symbol30) #f) (target-collide-set! (-> self control unknown-symbol00) (-> self control unknown-float90) @@ -352,7 +352,7 @@ (-> *TARGET-bank* duck-spin-radius) ) (set! (-> s5-0 transform-index) 7) - (set! (-> self control unknown-int30) (the-as int 'roll)) + (set! (-> self control unknown-symbol30) 'roll) ) (('flip) (logior! (-> self state-flags) 2) @@ -374,7 +374,7 @@ (-> *TARGET-bank* duck-spin-radius) ) (set! (-> s5-0 transform-index) 7) - (set! (-> self control unknown-int30) (the-as int 'flip)) + (set! (-> self control unknown-symbol30) 'flip) ) (('punch) (sphere<-vector+r! @@ -442,7 +442,7 @@ (-> *TARGET-bank* flop-radius) ) (set! f30-0 1.0) - (set! (-> self control unknown-int30) (the-as int 'flop)) + (set! (-> self control unknown-symbol30) 'flop) ) (('flop-down) (logior! (-> self state-flags) 2) @@ -466,7 +466,7 @@ (if (!= f30-0 1.0) (set! f30-0 2.1) ) - (set! (-> self control unknown-int30) (the-as int 'flop)) + (set! (-> self control unknown-symbol30) 'flop) ) (('flut-attack) (sphere<-vector+r! @@ -1484,14 +1484,14 @@ (return (new 'static 'vector)) ) (let ((v1-0 *target*)) - (if v1-0 - (vector<-cspace! - (new 'static 'vector) - (-> v1-0 node-list data (-> v1-0 draw origin-joint-index)) - ) - (camera-pos) - ) + (if v1-0 + (vector<-cspace! + (new 'static 'vector) + (-> v1-0 node-list data (-> v1-0 draw origin-joint-index)) + ) + (camera-pos) ) + ) ) (defun target-rot () diff --git a/scripts/update-goal-src.py b/scripts/update-goal-src.py index 29eb1d892d..293df503cd 100644 --- a/scripts/update-goal-src.py +++ b/scripts/update-goal-src.py @@ -13,7 +13,24 @@ files = args.files.split(",") throw_error = False +# files in this list have manual modifications in in code block +# sometimes these modifications don't prevent a compiler error +# and are easy to commit +# +# if you know of / add such a modification, you should append to this +# list, it will remind you such a file was touched by making a root file +# that will be picked up by git to shame you +files_with_modifications = [ + "target-util", + "ambient" +] + for file in files: + if file in files_with_modifications: + file_name = "{}.manual_restore_reminder".format(file) + with open(file_name, 'w') as fp: + pass + disasm_path = "./decompiler_out/jak1/{}_disasm.gc".format(file) if not os.path.exists(disasm_path): print("{} doesn't exist!".format(disasm_path)) diff --git a/test/decompiler/reference/engine/ambient/ambient_REF.gc b/test/decompiler/reference/engine/ambient/ambient_REF.gc new file mode 100644 index 0000000000..cae07f938f --- /dev/null +++ b/test/decompiler/reference/engine/ambient/ambient_REF.gc @@ -0,0 +1,1762 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 8 of type drawable-ambient +;; INFO: Return type mismatch int vs drawable-ambient. +(defmethod + mem-usage + drawable-ambient + ((obj drawable-ambient) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 50 (-> arg0 length))) + (set! (-> arg0 data 49 name) "ambient") + (+! (-> arg0 data 49 count) 1) + (let ((v1-6 (asize-of obj))) + (+! (-> arg0 data 49 used) v1-6) + (+! (-> arg0 data 49 total) (logand -16 (+ v1-6 15))) + ) + (mem-usage (-> obj ambient) arg0 (logior arg1 128)) + (the-as drawable-ambient 0) + ) + +;; definition for method 8 of type drawable-inline-array-ambient +;; INFO: Return type mismatch int vs drawable-inline-array-ambient. +(defmethod + mem-usage + drawable-inline-array-ambient + ((obj drawable-inline-array-ambient) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + (the-as drawable-inline-array-ambient 0) + ) + +;; definition for symbol *hint-semaphore*, type (pointer level-hint) +(define *hint-semaphore* (the-as (pointer level-hint) #f)) + +;; definition for function level-hint-process-cmd +(defun level-hint-process-cmd ((arg0 (pointer int32)) (arg1 int) (arg2 int)) + (let ((v1-2 (-> arg0 arg1)) + (gp-0 (+ arg1 1)) + ) + (cond + ((< gp-0 arg2) + (let ((a0-2 (-> arg0 gp-0)) + (a1-2 v1-2) + ) + (cond + ((zero? a1-2) + (if (task-known? (the-as game-task a0-2)) + (set! gp-0 -1) + ) + ) + ((= a1-2 1) + (if (not (task-known? (the-as game-task a0-2))) + (set! gp-0 -1) + ) + ) + ((= a1-2 2) + (if (nonzero? (get-task-status (the-as game-task a0-2))) + (set! gp-0 -1) + ) + ) + ((= a1-2 3) + (if + (!= + (get-task-status (the-as game-task a0-2)) + (task-status need-introduction) + ) + (set! gp-0 -1) + ) + ) + ((= a1-2 4) + (if + (!= + (get-task-status (the-as game-task a0-2)) + (task-status need-reminder) + ) + (set! gp-0 -1) + ) + ) + ((= a1-2 5) + (if + (!= + (get-task-status (the-as game-task a0-2)) + (task-status need-reminder-a) + ) + (set! gp-0 -1) + ) + ) + ((= a1-2 13) + (let ((v1-15 (get-task-status (the-as game-task a0-2)))) + (if (or (< (the-as int v1-15) 2) (< 4 (the-as int v1-15))) + (set! gp-0 -1) + ) + ) + ) + ((= a1-2 6) + (if + (!= + (get-task-status (the-as game-task a0-2)) + (task-status need-reward-speech) + ) + (set! gp-0 -1) + ) + ) + ((= a1-2 7) + (close-specific-task! (the-as game-task a0-2) (task-status need-hint)) + ) + ((= a1-2 8) + (close-specific-task! + (the-as game-task a0-2) + (task-status need-introduction) + ) + ) + ((= a1-2 9) + (close-specific-task! + (the-as game-task a0-2) + (task-status need-reminder) + ) + ) + ((= a1-2 10) + (close-specific-task! + (the-as game-task a0-2) + (task-status need-reminder-a) + ) + ) + ((= a1-2 11) + (close-specific-task! + (the-as game-task a0-2) + (task-status need-reward-speech) + ) + ) + ((= a1-2 12) + (close-specific-task! + (the-as game-task a0-2) + (task-status need-resolution) + ) + ) + (else + (format #t "Unknown hint command ~D~%" v1-2) + ) + ) + ) + ) + (else + (format #t "Missing task ID for hint command ~S~%" (cond + ((= v1-2 13) + "if-at-most-need-reminder-a" + ) + ((= v1-2 12) + "close-need-resolution" + ) + ((= v1-2 11) + "close-need-reward-speech" + ) + ((= v1-2 10) + "close-need-reminder-a" + ) + ((= v1-2 9) + "close-need-reminder" + ) + ((= v1-2 8) + "close-need-introduction" + ) + ((= v1-2 7) + "close-need-hint" + ) + ((= v1-2 6) + "if-need-reward-speech" + ) + ((= v1-2 5) + "if-need-reminder-a" + ) + ((= v1-2 4) + "if-need-reminder" + ) + ((= v1-2 3) + "if-need-introduction" + ) + ((= v1-2 2) + "if-resolved" + ) + ((= v1-2 1) + "if-known" + ) + ((zero? v1-2) + "if-unknown" + ) + (else + "*unknown*" + ) + ) + ) + ) + ) + gp-0 + ) + ) + +;; definition for function level-hint-task-process +;; Used lq/sq +(defun level-hint-task-process ((arg0 entity) (arg1 uint128) (arg2 string)) + (local-vars (sv-16 res-tag)) + (let ((gp-0 (res-lump-value arg0 'text-id int :default arg1)) + (s5-0 0) + ) + (cond + ((can-hint-be-played? gp-0 arg0 arg2) + (set! sv-16 (new 'static 'res-tag)) + (let + ((s4-1 + ((method-of-type res-lump get-property-data) + arg0 + 'cmds + 'exact + -1000000000.0 + (the-as pointer #f) + (& sv-16) + *res-static-buf* + ) + ) + ) + (when s4-1 + (while (and (>= s5-0 0) (< s5-0 (the-as int (-> sv-16 elt-count)))) + (set! + s5-0 + (level-hint-process-cmd + (the-as (pointer int32) s4-1) + s5-0 + (the-as int (-> sv-16 elt-count)) + ) + ) + (if (>= s5-0 0) + (set! s5-0 (+ s5-0 1)) + ) + ) + ) + ) + 0 + ) + (else + (set! s5-0 -1) + ) + ) + (cond + ((>= s5-0 0) + (empty) + gp-0 + ) + (else + -1 + ) + ) + ) + ) + +;; definition for function level-hint-surpress! +;; INFO: Return type mismatch int vs none. +(defun level-hint-surpress! () + (set! (-> *game-info* hint-play-time) (-> *display* base-frame-counter)) + 0 + (none) + ) + +;; definition for function can-grab-display? +(defun can-grab-display? ((arg0 process-taskable)) + (let ((v1-2 (handle->process (-> *game-info* display-text-handle)))) + (when + (and + (or + (not v1-2) + (= v1-2 arg0) + (>= + (- (-> *display* base-frame-counter) (-> *game-info* display-text-time)) + 30 + ) + ) + (and + *target* + (!= (-> *target* next-state name) 'target-look-around) + (zero? (logand (-> *target* state-flags) #x8008)) + (= *master-mode* 'game) + ) + ) + (set! (-> *game-info* display-text-handle) (process->handle arg0)) + (set! (-> *game-info* display-text-time) (-> *display* base-frame-counter)) + #t + ) + ) + ) + +;; definition for function level-hint-displayed? +;; INFO: Return type mismatch basic vs symbol. +(defun level-hint-displayed? () + (let ((a0-0 (ppointer->process *hint-semaphore*))) + (the-as + symbol + (and + (the-as level-hint a0-0) + (and + (= (-> (the-as level-hint a0-0) next-state name) 'level-hint-normal) + (not (dummy-15 (the-as level-hint a0-0))) + ) + ) + ) + ) + ) + +;; definition for function level-hint-spawn +;; INFO: Return type mismatch int vs none. +(defun + level-hint-spawn + ((arg0 game-text-id) + (arg1 string) + (arg2 entity) + (arg3 process-tree) + (arg4 game-task) + ) + (if (< (the-as uint 1) (the-as uint arg4)) + (close-specific-task! arg4 (task-status need-hint)) + ) + (let ((s3-1 (level-hint-task-process arg2 (the-as uint128 arg0) arg1))) + (when (!= s3-1 -1) + (kill-current-level-hint '() '() 'exit) + (let ((s2-0 (get-process *default-dead-pool* level-hint #x4000))) + (when s2-0 + (let ((t9-4 (method-of-type level-hint activate))) + (t9-4 + (the-as level-hint s2-0) + arg3 + 'level-hint + (the-as pointer #x70004000) + ) + ) + (run-now-in-process s2-0 level-hint-init-by-other s3-1 arg1 arg2) + (-> s2-0 ppointer) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-hint-spawn +;; INFO: Return type mismatch (pointer process) vs object. +(defun + ambient-hint-spawn + ((arg0 string) (arg1 vector) (arg2 process-tree) (arg3 symbol)) + (case arg3 + (('camera) + (kill-current-level-hint '() '() 'exit) + ) + ) + (the-as + object + (and + (not *hint-semaphore*) + (let ((s2-0 (get-process *default-dead-pool* level-hint #x4000))) + (when s2-0 + (let ((t9-2 (method-of-type level-hint activate))) + (t9-2 + (the-as level-hint s2-0) + arg2 + 'level-hint + (the-as pointer #x70004000) + ) + ) + (run-now-in-process s2-0 ambient-hint-init-by-other arg0 arg1 arg3) + (-> s2-0 ppointer) + ) + ) + ) + ) + ) + +;; definition for function kill-current-level-hint +;; INFO: Return type mismatch int vs none. +(defun kill-current-level-hint ((arg0 pair) (arg1 pair) (arg2 symbol)) + (when *hint-semaphore* + (let ((s4-0 (ppointer->process *hint-semaphore*))) + (if + (and + (or (null? arg0) (member (-> (the-as level-hint s4-0) mode) arg0)) + (not (member (-> (the-as level-hint s4-0) mode) arg1)) + ) + (send-event (the-as level-hint s4-0) arg2) + ) + ) + ) + 0 + (none) + ) + +;; definition for function level-hint-init-by-other +;; INFO: Return type mismatch int vs none. +(defbehavior + level-hint-init-by-other level-hint + ((arg0 game-text-id) (arg1 string) (arg2 entity)) + (mark-text-as-seen *game-info* arg0) + (set! (-> self text-id-to-display) arg0) + (set! (-> self sound-to-play) arg1) + (set! (-> self total-time) 0) + (set! (-> self total-off-time) 0) + (set! (-> self last-time) (-> *display* base-frame-counter)) + (set! *hint-semaphore* (the-as (pointer level-hint) (process->ppointer self))) + (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) + (set! (-> self voicebox) (the-as handle #f)) + (let ((s5-1 (res-lump-struct arg2 'play-mode structure)) + (a0-6 + (the-as + string + ((method-of-type res-lump get-property-struct) + arg2 + 'sound-name + 'interp + -1000000000.0 + (-> self sound-to-play) + (the-as (pointer res-tag) #f) + *res-static-buf* + ) + ) + ) + ) + (if (and (not s5-1) a0-6) + (set! + s5-1 + (if + (or + (and (= (-> a0-6 data 0) 115) (= (-> a0-6 data 1) 97)) + (and (= (-> a0-6 data 0) 97) (= (-> a0-6 data 1) 115)) + ) + 'voicebox + 'sidekick + ) + ) + ) + (set! (-> self mode) (the-as symbol s5-1)) + (if (or (= s5-1 'sidekick) (= s5-1 'voicebox)) + (go level-hint-sidekick a0-6) + ) + ) + (go level-hint-normal) + 0 + (none) + ) + +;; definition for function ambient-hint-init-by-other +;; INFO: Return type mismatch int vs none. +(defbehavior + ambient-hint-init-by-other level-hint + ((arg0 string) (arg1 vector) (arg2 symbol)) + (set! (-> self sound-to-play) arg0) + (set! (-> self total-time) 0) + (set! (-> self total-off-time) 0) + (set! (-> self last-time) (-> *display* base-frame-counter)) + (set! (-> self trans) arg1) + (set! *hint-semaphore* (the-as (pointer level-hint) (process->ppointer self))) + (push-setting! *setting-control* self 'hint (process->ppointer self) 0.0 0) + (set! (-> self mode) arg2) + (if (or (= arg2 'camera) (= arg2 'ambient) (= arg2 'stinger)) + (push-setting! + *setting-control* + self + 'ambient + (process->ppointer self) + 0.0 + 0 + ) + ) + (copy-settings-from-target! *setting-control*) + (set! + (-> self event-hook) + (lambda :behavior level-hint + ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (when (or (= v1-0 'die) (= v1-0 'exit)) + (if (= (ppointer->process *hint-semaphore*) self) + (set! *hint-semaphore* (the-as (pointer level-hint) #f)) + ) + (deactivate self) + ) + ) + ) + ) + ) + (go level-hint-ambient-sound arg0) + 0 + (none) + ) + +;; definition for method 14 of type level-hint +;; INFO: Return type mismatch int vs none. +(defmethod print-text level-hint ((obj level-hint)) + (when (!= *common-text* #f) + (let + ((s5-0 + (new + 'stack + 'font-context + *font-default-matrix* + 56 + 160 + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-3 s5-0)) + (set! (-> v1-3 width) (the float 400)) + ) + (let ((v1-4 s5-0)) + (set! (-> v1-4 height) (the float 96)) + ) + (set! (-> s5-0 flags) (font-flags shadow kerning middle large)) + (print-game-text + (lookup-text! *common-text* (-> obj text-id-to-display) #f) + s5-0 + #f + 128 + 22 + ) + ) + ) + 0 + (none) + ) + +;; definition for method 15 of type level-hint +(defmethod dummy-15 level-hint ((obj level-hint)) + (and + (!= (-> obj next-state name) 'level-hint-sidekick) + (< 1500 (-> obj total-time)) + ) + ) + +;; failed to figure out what this is: +(defstate level-hint-normal (level-hint) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'exit) + (go level-hint-exit) + ) + ((= v1-0 'die) + (deactivate self) + ) + ) + ) + ) + ) + :exit + (behavior () + (if (= (ppointer->process *hint-semaphore*) self) + (set! *hint-semaphore* (the-as (pointer level-hint) #f)) + ) + (none) + ) + :code + (behavior () + (cond + ((= (-> self text-id-to-display) (game-text-id zero)) + (if *debug-segment* + (go level-hint-error "UNKNOWN TEXT ID" "") + ) + ) + (else + (while (>= 2400 (-> self total-time)) + (hide-bottom-hud) + (suspend) + (cond + ((and + (bottom-hud-hidden?) + (not (paused?)) + (not (movie?)) + (= *master-mode* 'game) + (or (not *target*) (!= (-> *target* cam-user-mode) 'look-around)) + (not (-> *hud-parts* money-all)) + ) + (print-text self) + (+! + (-> self total-time) + (- (-> *display* base-frame-counter) (-> self last-time)) + ) + (set! (-> self last-time) (-> *display* base-frame-counter)) + ) + (else + (+! + (-> self total-off-time) + (- (-> *display* base-frame-counter) (-> self last-time)) + ) + (if (or (< 1800 (-> self total-time)) (< 3000 (-> self total-off-time))) + (go level-hint-exit) + ) + ) + ) + (set! (-> self last-time) (-> *display* base-frame-counter)) + ) + ) + ) + (go level-hint-exit) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate level-hint-sidekick (level-hint) + :event + (behavior ((arg0 process) (arg1 int) (arg2 symbol) (arg3 event-message-block)) + (let ((v1-0 arg2)) + (the-as object (cond + ((= v1-0 'exit) + (when (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + (set! (-> self sound-id) (new 'static 'sound-id)) + 0 + ) + (go level-hint-exit) + ) + ((= v1-0 'die) + (deactivate self) + ) + ) + ) + ) + ) + :exit + (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (clear-pending-settings-from-process *setting-control* self 'music-volume) + (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (clear-pending-settings-from-process *setting-control* self 'dialog-volume) + (if (= (ppointer->process *hint-semaphore*) self) + (set! *hint-semaphore* (the-as (pointer level-hint) #f)) + ) + (send-event (handle->process (-> self voicebox)) 'die) + (none) + ) + :code + (behavior ((arg0 string)) + (when + (and + (-> *setting-control* current play-hints) + (< 0.0 (-> *setting-control* current dialog-volume)) + ) + (case (-> self mode) + (('voicebox) + (if *target* + (set! + (-> self voicebox) + (ppointer->handle (voicebox-spawn *target* (target-pos 0))) + ) + ) + ) + ) + (while (handle->process (-> *game-info* auto-save-proc)) + (suspend) + ) + (while (not *sound-player-enable*) + (suspend) + ) + (let ((s5-1 sound-play-by-name) + (s4-1 string->sound-name) + ) + (format (clear *temp-string*) "spool-~S" arg0) + (let + ((s5-2 + (s5-1 + (s4-1 *temp-string*) + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + ) + (set! (-> self sound-id) s5-2) + (let ((s4-3 (-> *display* base-frame-counter))) + (while + (and + (!= (current-str-id) s5-2) + (< (- (-> *display* base-frame-counter) s4-3) 1500) + ) + (suspend) + ) + ) + (cond + ((= (current-str-id) s5-2) + (push-setting! + *setting-control* + self + 'music-volume + 'rel + (-> *setting-control* current music-volume-movie) + 0 + ) + (push-setting! + *setting-control* + self + 'sfx-volume + 'rel + (-> *setting-control* current sfx-volume-movie) + 0 + ) + (push-setting! + *setting-control* + self + 'dialog-volume + 'rel + (-> *setting-control* current dialog-volume-hint) + 0 + ) + (while (= (current-str-id) s5-2) + (suspend) + ) + ) + (else + (go level-hint-error "NO SOUND " arg0) + ) + ) + ) + ) + ) + (go level-hint-exit) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate level-hint-ambient-sound (level-hint) + :event + (-> level-hint-sidekick event) + :exit + (behavior () + (if (nonzero? (-> self sound-id)) + (sound-stop (-> self sound-id)) + ) + (clear-pending-settings-from-process *setting-control* self 'music-volume) + (clear-pending-settings-from-process *setting-control* self 'sfx-volume) + (if (= (ppointer->process *hint-semaphore*) self) + (set! *hint-semaphore* (the-as (pointer level-hint) #f)) + ) + (none) + ) + :code + (behavior ((arg0 string)) + (while (not *sound-player-enable*) + (suspend) + ) + (cond + ((-> self trans) + (let ((s5-0 sound-play-by-name) + (s4-0 string->sound-name) + ) + (format (clear *temp-string*) "spool-~S" arg0) + (set! + (-> self sound-id) + (s5-0 + (s4-0 *temp-string*) + (new-sound-id) + 1024 + 1 + 0 + (the-as uint 1) + (-> self trans) + ) + ) + ) + ) + (else + (let ((s5-1 sound-play-by-name) + (s4-2 string->sound-name) + ) + (format (clear *temp-string*) "spool-~S" arg0) + (set! + (-> self sound-id) + (s5-1 + (s4-2 *temp-string*) + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + ) + ) + ) + (let ((s5-2 (-> *display* base-frame-counter))) + (while + (and + (!= (current-str-id) (-> self sound-id)) + (< (- (-> *display* base-frame-counter) s5-2) 1500) + ) + (suspend) + ) + ) + (cond + ((= (current-str-id) (-> self sound-id)) + (when (or (= (-> self mode) 'stinger) (= (-> self mode) 'camera)) + (push-setting! + *setting-control* + self + 'music-volume + 'rel + (-> *setting-control* current music-volume-movie) + 0 + ) + (push-setting! + *setting-control* + self + 'sfx-volume + 'rel + (-> *setting-control* current sfx-volume-movie) + 0 + ) + ) + (while (= (current-str-id) (-> self sound-id)) + (suspend) + ) + ) + (else + (go level-hint-error "NO SOUND " arg0) + ) + ) + (go level-hint-exit) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate level-hint-error (level-hint) + :event + (-> level-hint-normal event) + :code + (behavior ((arg0 string) (arg1 string)) + (clear-pending-settings-from-process *setting-control* self 'hint) + (let ((s4-0 (-> *display* base-frame-counter))) + (until (>= (- (-> *display* base-frame-counter) s4-0) 300) + (when + (and + *debug-segment* + (not (paused?)) + (not (str-is-playing?)) + (bottom-hud-hidden?) + ) + (let + ((s3-0 + (new + 'stack + 'font-context + *font-default-matrix* + 56 + 160 + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-7 s3-0)) + (set! (-> v1-7 width) (the float 400)) + ) + (let ((v1-8 s3-0)) + (set! (-> v1-8 height) (the float 96)) + ) + (set! (-> s3-0 flags) (font-flags shadow kerning middle)) + (let ((s2-0 print-game-text)) + (format (clear *temp-string*) "~S~S" arg0 arg1) + (s2-0 *temp-string* s3-0 #f 128 22) + ) + ) + ) + (suspend) + ) + ) + (go level-hint-exit) + (none) + ) + ) + +;; failed to figure out what this is: +(defstate level-hint-exit (level-hint) + :code + (behavior () + (if (= (ppointer->process *hint-semaphore*) self) + (set! *hint-semaphore* (the-as (pointer level-hint) #f)) + ) + (none) + ) + ) + +;; definition for function ambient-type-error +;; INFO: Return type mismatch int vs none. +(defun ambient-type-error ((arg0 drawable-ambient) (arg1 vector)) + (when *display-entity-errors* + (let ((s2-0 (-> arg0 ambient))) + (format + (clear *temp-string*) + "~2j~s art error for ~s ~s" + (res-lump-struct s2-0 'effect-name structure :time 0.0) + (res-lump-struct s2-0 'type structure) + (res-lump-struct s2-0 'name structure) + ) + ) + *temp-string* + (add-debug-text-3d + #t + (bucket-id debug-draw1) + *temp-string* + (-> arg0 bsphere) + (font-color orange-red) + (the-as vector2h #f) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-type-poi +;; INFO: Return type mismatch int vs none. +(defun ambient-type-poi ((arg0 drawable-ambient) (arg1 vector)) + 0 + (none) + ) + +;; definition for function ambient-type-hint +;; INFO: Return type mismatch int vs none. +(defun ambient-type-hint ((arg0 drawable-ambient) (arg1 vector)) + (with-pp + (let + ((s5-0 + (level-hint-task-process + (-> arg0 ambient) + (the-as uint128 0) + (the-as string #f) + ) + ) + ) + (cond + ((zero? s5-0) + (when + (and + *debug-segment* + (not (paused?)) + (not (str-is-playing?)) + (bottom-hud-hidden?) + ) + (let + ((a1-3 + (new + 'stack + 'font-context + *font-default-matrix* + 56 + 160 + 0.0 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-5 a1-3)) + (set! (-> v1-5 width) (the float 400)) + ) + (let ((v1-6 a1-3)) + (set! (-> v1-6 height) (the float 96)) + ) + (set! (-> a1-3 flags) (font-flags shadow kerning middle large)) + (print-game-text "AS: UNKNOWN ID" a1-3 #f 128 22) + ) + ) + ) + ((!= s5-0 -1) + (kill-current-level-hint '() '() 'exit) + (let ((s4-0 (get-process *default-dead-pool* level-hint #x4000))) + (when s4-0 + (let ((t9-8 (method-of-type level-hint activate))) + (t9-8 + (the-as level-hint s4-0) + pp + 'level-hint + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s4-0 + level-hint-init-by-other + s5-0 + #f + (-> arg0 ambient) + ) + (-> s4-0 ppointer) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function ambient-type-sound +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun ambient-type-sound ((arg0 drawable-ambient) (arg1 vector)) + (local-vars (sv-16 string) (sv-112 res-tag)) + (let* ((s5-0 (-> arg0 ambient)) + (s4-0 (-> s5-0 ambient-data user-uint64 0)) + ) + (when (>= (-> *display* base-frame-counter) (the-as int s4-0)) + (let ((v1-5 (res-lump-data s5-0 'cycle-speed pointer))) + (set! + (-> s5-0 ambient-data user-uint64 0) + (the-as + uint + (+ + (-> *display* base-frame-counter) + (the int (* 300.0 (-> (the-as (pointer float) v1-5) 0))) + (rand-vu-int-count + (the int (* 300.0 (-> (the-as (pointer float) v1-5) 1))) + ) + ) + ) + ) + ) + (when + (< + (the-as uint (- (-> *display* base-frame-counter) (the-as int s4-0))) + (the-as uint 300) + ) + (let + ((f30-0 + (the + float + (rand-vu-int-count (the-as int (-> s5-0 ambient-data user-float 2))) + ) + ) + ) + (set! + sv-16 + (symbol->string (res-lump-struct s5-0 'effect-name symbol :time f30-0)) + ) + (let ((s4-2 (new 'stack 'sound-spec))) + (set! (-> s4-2 sound-name) (string->sound-name sv-16)) + (logior! (-> s4-2 mask) 1) + (set! (-> s4-2 volume) 1024) + (logior! (-> s4-2 mask) 4) + (set! + (-> s4-2 bend) + (the int (* 327.66998 (rand-vu-float-range -100.0 100.0))) + ) + (set! sv-112 (new 'static 'res-tag)) + (let + ((a1-7 + ((method-of-type res-lump get-property-data) + s5-0 + 'effect-param + 'exact + f30-0 + (the-as pointer #f) + (& sv-112) + *res-static-buf* + ) + ) + ) + (if a1-7 + (effect-param->sound-spec + s4-2 + (the-as (pointer float) a1-7) + (the-as int (-> sv-112 elt-count)) + ) + ) + ) + (when *debug-effect-control* + (format + #t + "(~5D) effect sound ~A ~S " + (-> *display* base-frame-counter) + (res-lump-struct s5-0 'name structure) + sv-16 + ) + (format + #t + "volume: ~f pitch-mod: ~f~%" + (* 0.09765625 (the float (-> s4-2 volume))) + (* 0.000656168 (the float (-> s4-2 pitch-mod))) + ) + ) + (sound-play-by-spec s4-2 (new-sound-id) (-> arg0 bsphere)) + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-type-sound-loop +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun ambient-type-sound-loop ((arg0 drawable-ambient) (arg1 vector)) + (let* ((s5-0 (-> arg0 ambient)) + (s2-0 + (symbol->string (the-as symbol (-> s5-0 ambient-data user-float 2))) + ) + (s3-0 (the-as object (-> s5-0 ambient-data user-float 1))) + (s4-0 (new 'stack 'sound-spec)) + ) + (set! (-> s4-0 sound-name) (string->sound-name s2-0)) + (logior! (-> s4-0 mask) 1) + (set! (-> s4-0 volume) 1024) + (when (the-as (pointer res-tag) s3-0) + (let ((t9-2 effect-param->sound-spec) + (a0-5 s4-0) + (v1-8 (-> arg0 ambient)) + (a1-2 (-> (the-as (pointer res-tag) s3-0) 0)) + ) + (t9-2 + a0-5 + (the-as (pointer float) (&+ (-> v1-8 data-base) (-> a1-2 data-offset))) + (the-as int (-> (the-as (pointer res-tag) s3-0) 0 elt-count)) + ) + ) + ) + (sound-play-by-spec + s4-0 + (the-as sound-id (-> s5-0 ambient-data user-float 0)) + (-> arg0 bsphere) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-type-light +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun ambient-type-light ((arg0 drawable-ambient) (arg1 vector)) + (when *target* + (let ((s4-0 (-> arg0 ambient)) + (s5-0 #t) + ) + (let + ((s3-0 + (-> ((method-of-type res-lump lookup-tag-idx) s4-0 'vol 'exact 0.0) lo) + ) + ) + (when (>= (the-as int s3-0) 0) + (let ((s2-0 (the-as uint s3-0)) + (s1-0 (-> s4-0 tag s3-0)) + ) + 0 + (while (= (-> s1-0 name) (-> s4-0 tag s3-0 name)) + (let + ((v1-8 + (the-as + object + (make-property-data + s4-0 + 0.0 + (the-as res-tag-pair s2-0) + (the-as pointer #f) + ) + ) + ) + ) + (set! s5-0 #t) + (countdown (a0-6 (-> s1-0 elt-count)) + (when + (< + (-> arg1 w) + (- + (vector-dot arg1 (-> (the-as (inline-array vector) v1-8) a0-6)) + (-> (the-as (inline-array vector) v1-8) a0-6 w) + ) + ) + (set! s5-0 #f) + (goto cfg-9) + ) + ) + ) + (label cfg-9) + (if s5-0 + (goto cfg-15) + ) + (+! s2-0 1) + (set! s1-0 (-> s4-0 tag s2-0)) + ) + ) + ) + ) + (label cfg-15) + (when s5-0 + ) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-type-dark +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun ambient-type-dark ((arg0 drawable-ambient) (arg1 vector)) + (when *target* + (let ((s4-0 (-> arg0 ambient)) + (s5-0 #t) + ) + (let + ((s3-0 + (-> ((method-of-type res-lump lookup-tag-idx) s4-0 'vol 'exact 0.0) lo) + ) + ) + (when (>= (the-as int s3-0) 0) + (let ((s2-0 (the-as uint s3-0)) + (s1-0 (-> s4-0 tag s3-0)) + ) + 0 + (while (= (-> s1-0 name) (-> s4-0 tag s3-0 name)) + (let + ((v1-8 + (the-as + object + (make-property-data + s4-0 + 0.0 + (the-as res-tag-pair s2-0) + (the-as pointer #f) + ) + ) + ) + ) + (set! s5-0 #t) + (countdown (a0-6 (-> s1-0 elt-count)) + (when + (< + (-> arg1 w) + (- + (vector-dot arg1 (-> (the-as (inline-array vector) v1-8) a0-6)) + (-> (the-as (inline-array vector) v1-8) a0-6 w) + ) + ) + (set! s5-0 #f) + (goto cfg-9) + ) + ) + ) + (label cfg-9) + (if s5-0 + (goto cfg-15) + ) + (+! s2-0 1) + (set! s1-0 (-> s4-0 tag s2-0)) + ) + ) + ) + ) + (label cfg-15) + (if s5-0 + (set! (-> *target* draw secondary-interp) 1.0) + ) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-type-weather-off +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun ambient-type-weather-off ((arg0 drawable-ambient) (arg1 vector)) + (when *target* + (let ((s4-0 (-> arg0 ambient)) + (s5-0 #t) + ) + (let + ((s3-0 + (-> ((method-of-type res-lump lookup-tag-idx) s4-0 'vol 'exact 0.0) lo) + ) + ) + (when (>= (the-as int s3-0) 0) + (let ((s2-0 (the-as uint s3-0)) + (s1-0 (-> s4-0 tag s3-0)) + ) + 0 + (while (= (-> s1-0 name) (-> s4-0 tag s3-0 name)) + (let + ((v1-8 + (the-as + object + (make-property-data + s4-0 + 0.0 + (the-as res-tag-pair s2-0) + (the-as pointer #f) + ) + ) + ) + ) + (set! s5-0 #t) + (countdown (a0-6 (-> s1-0 elt-count)) + (when + (< + (-> arg1 w) + (- + (vector-dot arg1 (-> (the-as (inline-array vector) v1-8) a0-6)) + (-> (the-as (inline-array vector) v1-8) a0-6 w) + ) + ) + (set! s5-0 #f) + (goto cfg-9) + ) + ) + ) + (label cfg-9) + (if s5-0 + (goto cfg-15) + ) + (+! s2-0 1) + (set! s1-0 (-> s4-0 tag s2-0)) + ) + ) + ) + ) + (label cfg-15) + (if s5-0 + (set! *weather-off* #t) + ) + ) + ) + 0 + (none) + ) + +;; definition for function ambient-type-ocean-off +;; INFO: Return type mismatch int vs none. +(defun ambient-type-ocean-off ((arg0 drawable-ambient) (arg1 vector)) + (set! *ocean-off* #t) + 0 + (none) + ) + +;; definition for function ambient-type-ocean-near-off +;; INFO: Return type mismatch int vs none. +(defun ambient-type-ocean-near-off ((arg0 drawable-ambient) (arg1 vector)) + (set! *ocean-near-off* #t) + 0 + (none) + ) + +;; definition for function ambient-type-music +;; INFO: Return type mismatch int vs none. +(defun ambient-type-music ((arg0 drawable-ambient) (arg1 vector)) + (let ((gp-0 (-> arg0 ambient))) + (if (-> gp-0 ambient-data user-float 0) + (set! + (-> *setting-control* default music) + (the-as symbol (-> gp-0 ambient-data user-float 0)) + ) + ) + (when (nonzero? (-> gp-0 ambient-data user-float 1)) + (let ((f0-0 (res-lump-float gp-0 'priority :default 10.0))) + (when (>= f0-0 (-> *setting-control* default sound-flava-priority)) + (set! + (-> *setting-control* default sound-flava) + (the-as uint (-> gp-0 ambient-data user-float 1)) + ) + (set! (-> *setting-control* default sound-flava-priority) f0-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 17 of type drawable-ambient +;; INFO: Return type mismatch int vs none. +(defmethod + collect-ambients + drawable-ambient + ((obj drawable-ambient) (arg0 sphere) (arg1 int) (arg2 ambient-list)) + (dotimes (s2-0 arg1) + (when (spheres-overlap? arg0 (the-as sphere (-> obj bsphere))) + (set! (-> arg2 items (-> arg2 num-items)) obj) + (+! (-> arg2 num-items) 1) + ) + (&+! obj 32) + ) + 0 + (none) + ) + +;; definition for method 17 of type drawable-inline-array-ambient +;; INFO: Return type mismatch int vs none. +(defmethod + collect-ambients + drawable-inline-array-ambient + ((obj drawable-inline-array-ambient) + (arg0 sphere) + (arg1 int) + (arg2 ambient-list) + ) + (collect-ambients + (the-as drawable-ambient (-> obj data)) + arg0 + (-> obj length) + arg2 + ) + 0 + (none) + ) + +;; definition for method 17 of type drawable-tree-ambient +;; INFO: Return type mismatch int vs none. +(defmethod + collect-ambients + drawable-tree-ambient + ((obj drawable-tree-ambient) (arg0 sphere) (arg1 int) (arg2 ambient-list)) + (collect-ambients (-> obj data 0) arg0 (-> obj length) arg2) + 0 + (none) + ) + +;; definition for method 28 of type entity-ambient +;; INFO: Return type mismatch entity-ambient vs none. +;; Used lq/sq +(defmethod birth-ambient! entity-ambient ((obj entity-ambient)) + (set! (-> obj ambient-data quad) (the-as uint128 0)) + (set! (-> obj ambient-data function) ambient-type-error) + (case (res-lump-struct obj 'type structure) + (('sound) + (let ((s5-0 (res-lump-struct obj 'effect-name structure :time 0.0)) + (a0-7 (res-lump-data obj 'cycle-speed pointer)) + ) + (when (and s5-0 a0-7) + (cond + ((>= (-> (the-as (pointer float) a0-7)) 0.0) + (set! (-> obj ambient-data function) ambient-type-sound) + (set! (-> obj ambient-data user-float 2) (the-as float 0)) + (let + ((s5-1 + (-> + ((method-of-type res-lump lookup-tag-idx) + obj + 'effect-name + 'exact + 0.0 + ) + lo + ) + ) + ) + (when (>= (the-as int s5-1) 0) + (let ((s4-0 (the-as uint s5-1)) + (v1-14 (-> obj tag s5-1)) + ) + 0 + (while (= (-> v1-14 name) (-> obj tag s5-1 name)) + (make-property-data + obj + 0.0 + (the-as res-tag-pair s4-0) + (the-as pointer #f) + ) + (set! + (-> obj ambient-data user-float 2) + (the-as + float + (+ (the-as int (-> obj ambient-data user-float 2)) 1) + ) + ) + (+! s4-0 1) + (set! v1-14 (-> obj tag s4-0)) + ) + ) + ) + ) + ) + (else + (set! (-> obj ambient-data user-float 0) (the-as float (new-sound-id))) + (let + ((v1-28 + ((method-of-type res-lump lookup-tag-idx) + obj + 'effect-param + 'exact + 0.0 + ) + ) + ) + (set! + (-> obj ambient-data user-float 1) + (the-as float (if (< (the-as int v1-28) 0) + (the-as (pointer res-tag) #f) + (&-> (-> obj tag) (-> v1-28 lo)) + ) + ) + ) + ) + (set! (-> obj ambient-data user-float 2) (the-as float s5-0)) + (set! (-> obj ambient-data function) ambient-type-sound-loop) + ) + ) + ) + ) + ) + (('poi) + (let ((s5-2 (res-lump-struct obj 'effect-name structure :time 0.0))) + (when (res-lump-value obj 'loc-name-id uint128) + (set! (-> obj ambient-data user-float 2) (the-as float s5-2)) + (set! (-> obj ambient-data function) ambient-type-poi) + ) + ) + ) + (('hint) + (let ((s5-3 (res-lump-struct obj 'effect-name structure :time 0.0))) + (when (res-lump-value obj 'text-id uint128) + (set! (-> obj ambient-data user-float 2) (the-as float s5-3)) + (set! (-> obj ambient-data function) ambient-type-hint) + ) + ) + ) + (('light) + (set! + (-> obj ambient-data user-float 2) + (res-lump-struct obj 'effect-name float :time 0.0) + ) + (set! (-> obj ambient-data function) ambient-type-light) + ) + (('dark) + (set! + (-> obj ambient-data user-float 2) + (res-lump-struct obj 'effect-name float :time 0.0) + ) + (set! (-> obj ambient-data function) ambient-type-dark) + ) + (('weather-off) + (set! + (-> obj ambient-data user-float 2) + (res-lump-struct obj 'effect-name float :time 0.0) + ) + (set! (-> obj ambient-data function) ambient-type-weather-off) + ) + (('ocean-off) + (set! + (-> obj ambient-data user-float 2) + (res-lump-struct obj 'effect-name float :time 0.0) + ) + (set! (-> obj ambient-data function) ambient-type-ocean-off) + ) + (('ocean-near-off) + (set! + (-> obj ambient-data user-float 2) + (res-lump-struct obj 'effect-name float :time 0.0) + ) + (set! (-> obj ambient-data function) ambient-type-ocean-near-off) + ) + (('music) + (set! + (-> obj ambient-data user-float 2) + (res-lump-struct obj 'effect-name float :time 0.0) + ) + (set! (-> obj ambient-data user-float 0) (res-lump-struct obj 'music float)) + (set! (-> obj ambient-data user-float 1) (res-lump-value obj 'flava float)) + (set! (-> obj ambient-data function) ambient-type-music) + ) + ) + (none) + ) + +;; definition for symbol *execute-ambients*, type symbol +(define *execute-ambients* #t) + +;; definition for method 18 of type drawable-ambient +;; INFO: Return type mismatch int vs none. +(defmethod dummy-18 drawable-ambient ((obj drawable-ambient) (arg0 vector)) + ((-> obj ambient ambient-data function) obj arg0) + 0 + (none) + ) + +;; definition (debug) for function ambient-inspect +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for method 27 of type entity-ambient +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defmethod draw-debug entity-ambient ((obj entity-ambient)) + (local-vars (sv-16 uint128)) + (let ((gp-0 (-> obj trans)) + (s5-0 (res-lump-struct obj 'type symbol)) + (s3-0 #f) + ) + (cond + ((= s5-0 'sound) + (when *display-ambient-sound-marks* + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (the-as + string + (-> + (the-as + (pointer uint32) + (+ #xff38 (res-lump-struct obj 'effect-name int :time 0.0)) + ) + ) + ) + gp-0 + (font-color white) + (new 'static 'vector2h :y 24) + ) + (set! s3-0 #t) + ) + ) + ((= s5-0 'hint) + (when *display-ambient-hint-marks* + (set! sv-16 (res-lump-value obj 'text-id uint128)) + (let ((s3-2 add-debug-text-3d) + (s2-1 #t) + (s1-1 68) + ) + (format (clear *temp-string*) "TEXT ID #x~X" sv-16) + (s3-2 + s2-1 + (the-as bucket-id s1-1) + *temp-string* + gp-0 + (font-color white) + (new 'static 'vector2h :y 24) + ) + ) + (set! s3-0 #t) + ) + ) + ((= s5-0 'poi) + (when *display-ambient-poi-marks* + (let ((a1-7 (res-lump-value obj 'loc-name-id uint128))) + (when (and (nonzero? a1-7) *common-text*) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (lookup-text! *common-text* (the-as game-text-id a1-7) #f) + gp-0 + (font-color white) + (new 'static 'vector2h :y 24) + ) + (set! s3-0 #t) + ) + ) + ) + ) + ((= s5-0 'light) + (if *display-ambient-light-marks* + (set! s3-0 #t) + ) + ) + ((= s5-0 'dark) + (if *display-ambient-dark-marks* + (set! s3-0 #t) + ) + ) + ((= s5-0 'weather-off) + (if *display-ambient-weather-off-marks* + (set! s3-0 #t) + ) + ) + ((= s5-0 'ocean-off) + (if *display-ambient-ocean-off-marks* + (set! s3-0 #t) + ) + ) + ((= s5-0 'ocean-near-off) + (if *display-ambient-ocean-near-off-marks* + (set! s3-0 #t) + ) + ) + ((= s5-0 'music) + (if *display-ambient-music-marks* + (set! s3-0 #t) + ) + ) + ) + (when s3-0 + (let ((t9-10 add-debug-sphere) + (a0-11 #t) + (a1-9 67) + (a2-9 gp-0) + (a3-7 (-> gp-0 w)) + (v1-53 s5-0) + ) + (t9-10 a0-11 (the-as bucket-id a1-9) a2-9 a3-7 (the-as rgba (cond + ((= + v1-53 + 'sound + ) + (the-as + uint + #x8000ffff + ) + ) + ((= + v1-53 + 'poi + ) + (the-as + uint + #x80ff8000 + ) + ) + (else + (the-as + uint + #x800000ff + ) + ) + ) + ) + ) + ) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (res-lump-struct obj 'name string) + gp-0 + (font-color white) + (new 'static 'vector2h :y 8) + ) + (add-debug-text-3d + #t + (bucket-id debug-draw1) + (symbol->string s5-0) + gp-0 + (font-color white) + (new 'static 'vector2h :y 16) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/engine/collide/collide-target-h_REF.gc b/test/decompiler/reference/engine/collide/collide-target-h_REF.gc index 8134f32bc0..084a8799aa 100644 --- a/test/decompiler/reference/engine/collide/collide-target-h_REF.gc +++ b/test/decompiler/reference/engine/collide/collide-target-h_REF.gc @@ -140,10 +140,10 @@ (unknown-smush00 smush-control :inline :offset 2288) (unknown-vector110 vector :inline :offset 2320) (unknown-vector111 vector :inline :offset 2336) - (unknown-int30 int32 :offset 2384) + (unknown-symbol30 symbol :offset 2384) (unknown-dword50 int64 :offset 2392) (unknown-dword51 int64 :offset 2400) - (unknown-symbol10 symbol :offset 2428) + (unknown-symbol40 symbol :offset 2428) (unknown-halfword00 int16 :offset 2488) (history-length int16 :offset 2490) (history-data collide-history 128 :inline :offset-assert 2496) @@ -152,7 +152,9 @@ (unknown-dword70 int64 :offset 18888) (unknown-dword71 int64 :offset 18896) (unknown-dword72 int64 :offset 18912) - (pad uint32 7 :offset-assert 18960) + (unknown-int50 uint32 :offset 18976) + (unknown-soundid00 sound-id :offset 18980) + (unknown-float130 float :offset 18984) ) :method-count-assert 65 :size-assert #x4a2c diff --git a/test/decompiler/reference/engine/game/main_REF.gc b/test/decompiler/reference/engine/game/main_REF.gc new file mode 100644 index 0000000000..38e3a229c7 --- /dev/null +++ b/test/decompiler/reference/engine/game/main_REF.gc @@ -0,0 +1,1804 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function set-letterbox-frames +(defun set-letterbox-frames ((arg0 int)) + (let ((v0-0 (+ (-> *display* base-frame-counter) arg0))) + (set! (-> *game-info* letterbox-time) v0-0) + v0-0 + ) + ) + +;; definition for function letterbox +;; INFO: Return type mismatch pointer vs none. +(defun letterbox () + (let* + ((dma-buf (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> dma-buf base)) + ) + (draw-sprite2d-xy dma-buf 0 0 512 25 (new 'static 'rgba :a #x80)) + (draw-sprite2d-xy dma-buf 0 199 512 26 (new 'static 'rgba :a #x80)) + (let ((a3-2 (-> dma-buf base))) + (let ((pkt (the-as dma-packet (-> dma-buf base)))) + (set! (-> pkt dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> pkt vif0) (new 'static 'vif-tag)) + (set! (-> pkt vif1) (new 'static 'vif-tag)) + (set! (-> dma-buf base) (the-as pointer (&+ pkt 16))) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw1) + gp-0 + (the-as (pointer dma-tag) a3-2) + ) + ) + ) + (none) + ) + +;; definition for function set-blackout-frames +(defun set-blackout-frames ((arg0 int)) + (local-vars (v0-0 int)) + (cond + ((zero? arg0) + (set! v0-0 (-> *display* base-frame-counter)) + (set! (-> *game-info* blackout-time) v0-0) + ) + (else + (set! + v0-0 + (max + (-> *game-info* blackout-time) + (+ (-> *display* base-frame-counter) arg0) + ) + ) + (set! (-> *game-info* blackout-time) v0-0) + ) + ) + v0-0 + ) + +;; definition for function blackout +;; INFO: Return type mismatch pointer vs none. +(defun blackout () + (let* + ((dma-buf (-> *display* frames (-> *display* on-screen) frame global-buf)) + (sprite-dma-data (-> dma-buf base)) + ) + (draw-sprite2d-xy dma-buf 0 0 512 224 (new 'static 'rgba :a #x80)) + (let ((a3-1 (-> dma-buf base))) + (let ((pkt (the-as dma-packet (-> dma-buf base)))) + (set! (-> pkt dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> pkt vif0) (new 'static 'vif-tag)) + (set! (-> pkt vif1) (new 'static 'vif-tag)) + (set! (-> dma-buf base) (the-as pointer (&+ pkt 16))) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw1) + sprite-dma-data + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (none) + ) + +;; definition for function paused? +;; INFO: Return type mismatch object vs symbol. +(defun paused? () + (the-as + symbol + (or + (= *master-mode* 'pause) + (or + (and *progress-process* (not (hidden? (-> *progress-process* 0)))) + (= *master-mode* 'menu) + ) + ) + ) + ) + +;; definition for function movie? +(defun movie? () + (logtest? (-> *kernel-context* prevent-from-run) (process-mask movie)) + ) + +;; definition for function set-master-mode +;; INFO: Return type mismatch int vs none. +(defun set-master-mode ((new-mode symbol)) + (set! *master-mode* new-mode) + (if *debug-segment* + (menu-respond-to-pause) + ) + (case *master-mode* + (('pause) + (if (not *debug-pause*) + (logior! (-> *setting-control* default process-mask) (process-mask pause)) + ) + (logclear! (-> *setting-control* default process-mask) (process-mask menu)) + (set! *pause-lock* #f) + (sound-group-pause (the-as uint 255)) + (hide-progress-screen) + ) + (('menu) + (logior! (-> *setting-control* default process-mask) (process-mask menu)) + (logclear! + (-> *setting-control* default process-mask) + (process-mask pause progress) + ) + (set! *pause-lock* #f) + (hide-progress-screen) + ) + (('progress) + (logclear! (-> *setting-control* default process-mask) (process-mask menu)) + (when (not *progress-process*) + (activate-progress *dproc* (progress-screen fuel-cell)) + (if (not *progress-process*) + (set-master-mode 'game) + ) + ) + ) + (('game) + (logclear! + (-> *setting-control* default process-mask) + (process-mask pause menu) + ) + (sound-group-continue (the-as uint 255)) + (hide-progress-screen) + ) + ) + (copy-settings-from-target! *setting-control*) + 0 + (none) + ) + +;; definition for symbol *last-master-mode*, type symbol +(define *last-master-mode* 'game) + +;; definition for function toggle-pause +(defun toggle-pause () + (case *master-mode* + (('game) + (set! *last-master-mode* *master-mode*) + (set-master-mode (cond + ((and + (logtest? (-> *cpad-list* cpads 0 valid) 128) + *target* + ) + (if + (or + *progress-process* + (not (-> *setting-control* current allow-pause)) + ) + *master-mode* + 'pause + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons r3) + ) + (if *debug-segment* + 'menu + *master-mode* + ) + ) + ((and + (or + (logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons select) + ) + (logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons r2) + ) + ) + *debug-segment* + ) + 'pause + ) + ((and + (not *debug-segment*) + (zero? + (logand + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons start) + ) + ) + ) + *master-mode* + ) + ((not (progress-allowed?)) + (if (pause-allowed?) + 'pause + *master-mode* + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons start) + ) + (if *progress-process* + 'game + 'progress + ) + ) + (else + *master-mode* + ) + ) + ) + ) + (('menu) + (set-master-mode (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons r3) + ) + *last-master-mode* + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons select r2) + ) + (if *debug-segment* + 'pause + *master-mode* + ) + ) + ((and (not (movie?)) (not *progress-process*)) + (if (not *target*) + 'pause + 'progress + ) + ) + (else + 'game + ) + ) + ) + (set! + *pause-lock* + (and + *cheat-mode* + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r2)) + ) + ) + ) + (('pause) + (set! *last-master-mode* *master-mode*) + (set-master-mode (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons r3) + ) + (if *debug-segment* + 'menu + *master-mode* + ) + ) + ((and + *cheat-mode* + (logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons select r2) + ) + ) + 'game + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons start) + ) + 'game + ) + (else + *master-mode* + ) + ) + ) + (set! + *pause-lock* + (and + *cheat-mode* + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r2)) + ) + ) + ) + (('progress) + (set-master-mode (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons r3) + ) + (if *debug-segment* + 'menu + *master-mode* + ) + ) + ((logtest? + (-> *cpad-list* cpads 0 button0-abs 0) + (pad-buttons start) + ) + *last-master-mode* + ) + (else + *master-mode* + ) + ) + ) + (set! + *pause-lock* + (and + *cheat-mode* + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r2)) + ) + ) + ) + ) + 0 + ) + +;; definition for symbol *screen-filter*, type screen-filter +(define + *screen-filter* + (new 'static 'screen-filter + :draw? #f + :color + (new 'static 'rgba :g #x20 :b #x40 :a #x50) + ) + ) + +;; definition for method 9 of type screen-filter +;; INFO: Return type mismatch pointer vs none. +(defmethod draw screen-filter ((obj screen-filter)) + (let* ((buf (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> buf base)) + ) + (draw-sprite2d-xy + buf + -256 + (- (-> *video-parms* screen-hy)) + 512 + (-> *video-parms* screen-sy) + (-> obj color) + ) + (let ((a3-1 (-> buf base))) + (let ((v1-4 (the-as dma-packet (-> buf base)))) + (set! (-> v1-4 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-4 vif0) (new 'static 'vif-tag)) + (set! (-> v1-4 vif1) (new 'static 'vif-tag)) + (set! (-> buf base) (&+ (the-as pointer v1-4) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw1) + gp-0 + (the-as (pointer dma-tag) a3-1) + ) + ) + ) + (none) + ) + +;; definition for symbol *cheat-temp*, type (pointer int32) +(define *cheat-temp* (the-as (pointer int32) (malloc 'global 16))) + +;; definition for symbol *master-exit*, type symbol +(define *master-exit* #f) + +;; definition for symbol *progress-cheat*, type symbol +(define *progress-cheat* #f) + +;; definition for function main-cheats +(defun main-cheats () + (when + (and + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l3)) + (or *cheat-mode* (= *kernel-boot-message* 'play)) + ) + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((cheatmode-state (-> *cheat-temp* 0))) + (cond + ((zero? cheatmode-state) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 1) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 2) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 3) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 5) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 6) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 7) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 8) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 9) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 10) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 11) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 12) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (+! (-> *cheat-temp* 0) 1) + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ((= cheatmode-state 13) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *cheat-mode* (not *cheat-mode*)) + (if *cheat-mode* + (sound-play-by-name + (static-sound-name "select-menu") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + (sound-play-by-name + (static-sound-name "cursor-options") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (set! (-> *cheat-temp* 0) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 0) 0) + 0 + ) + ) + ) + ) + ) + ) + (when *cheat-mode* + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((cheatmode-debug-state (-> *cheat-temp* 1))) + (cond + ((zero? cheatmode-debug-state) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 1) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 2) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 3) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 5) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 6) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 7) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 8) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons right)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 9) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons left)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 10) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 11) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons down)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 12) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (+! (-> *cheat-temp* 1) 1) + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ((= cheatmode-debug-state 13) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons up)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *cheat-mode* (if (= *cheat-mode* 'debug) + #t + 'debug + ) + ) + (if *cheat-mode* + (sound-play-by-name + (static-sound-name "select-menu") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + (sound-play-by-name + (static-sound-name "cursor-options") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (set! (-> *cheat-temp* 1) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 1) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + (case (scf-get-territory) + ((2) + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((cheat-language-state (-> *cheat-temp* 2))) + (cond + ((zero? cheat-language-state) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l1)) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 1) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 2) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons l1)) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 3) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 4) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons triangle) + ) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 5) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons circle) + ) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 6) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 2) 1) + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ((= cheat-language-state 7) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons square) + ) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *progress-cheat* (if *progress-cheat* + #f + 'language + ) + ) + (if *progress-cheat* + (sound-play-by-name + (static-sound-name "select-menu") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + (sound-play-by-name + (static-sound-name "cursor-options") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (set! (-> *cheat-temp* 2) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 2) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + (when *debug-segment* + (when (nonzero? (-> *cpad-list* cpads 0 button0-rel 0)) + (let ((cheat-pal-state (-> *cheat-temp* 3))) + (cond + ((zero? cheat-pal-state) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 1) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 2) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons triangle) + ) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 3) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 4) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons x)) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 5) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons square)) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 6) + (cond + ((logtest? + (-> *cpad-list* cpads 0 button0-rel 0) + (pad-buttons triangle) + ) + (+! (-> *cheat-temp* 3) 1) + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ((= cheat-pal-state 7) + (cond + ((logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons circle)) + (logclear! (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logclear! (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r1)) + (set! *progress-cheat* (if *progress-cheat* + #f + 'pal + ) + ) + (if *progress-cheat* + (sound-play-by-name + (static-sound-name "select-menu") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + (sound-play-by-name + (static-sound-name "cursor-options") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + ) + (set! (-> *cheat-temp* 3) 0) + 0 + ) + (else + (set! (-> *cheat-temp* 3) 0) + 0 + ) + ) + ) + ) + ) + ) + ) + ) + (when (and (= *cheat-mode* 'debug) (not *debug-segment*)) + (when + (and + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l1)) + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons l2)) + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons r1)) + (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons r2)) + ) + (if *target* + (stop 'debug) + (start 'play (get-or-create-continue! *game-info*)) + ) + ) + (if + (and + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons left)) + (logtest? (-> *cpad-list* cpads 0 button0-abs 0) (pad-buttons up)) + (logtest? (-> *cpad-list* cpads 0 button0-rel 0) (pad-buttons select)) + ) + (initialize! *game-info* 'game (the-as game-save #f) "title-start") + ) + (if (logtest? (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons r3)) + (inspect global) + ) + (when (logtest? (-> *cpad-list* cpads 1 button0-abs 0) (pad-buttons r3)) + (let* ((dma-buff (if *debug-segment* + (-> + *display* + frames + (-> *display* on-screen) + frame + debug-buf + ) + (-> + *display* + frames + (-> *display* on-screen) + frame + global-buf + ) + ) + ) + (dma-start (-> dma-buff base)) + ) + (show-iop-memory dma-buff) + (let ((a3-9 (-> dma-buff base))) + (let ((dma-pkt (the-as dma-packet (-> dma-buff base)))) + (set! (-> dma-pkt dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> dma-pkt vif0) (new 'static 'vif-tag)) + (set! (-> dma-pkt vif1) (new 'static 'vif-tag)) + (set! (-> dma-buff base) (&+ (the-as pointer dma-pkt) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + dma-start + (the-as (pointer dma-tag) a3-9) + ) + ) + ) + ) + (if (logtest? (-> *cpad-list* cpads 1 button0-rel 0) (pad-buttons triangle)) + (set! *display-level-border* (not *display-level-border*)) + ) + ) + (when (!= *kernel-boot-message* 'play) + (let ((timeout (scf-get-timeout)) + (inactive-timeout (scf-get-inactive-timeout)) + ) + (when + (and + (or + (and + (nonzero? timeout) + (>= + (+ -300000 (-> *display* real-frame-counter)) + (the int (* 300.0 (the float timeout))) + ) + ) + (and + (nonzero? inactive-timeout) + (>= + (- + (-> *display* base-frame-counter) + (-> *cpad-list* cpads 0 change-time) + ) + (the int (* 300.0 (the float inactive-timeout))) + ) + ) + (= *master-exit* 'force) + ) + (progress-allowed?) + (!= *master-exit* #t) + ) + (let ((game-end-proc (get-process *default-dead-pool* process #x4000))) + (if (when game-end-proc + (let ((t9-28 (method-of-type process activate))) + (t9-28 + game-end-proc + *default-pool* + 'process + (the-as pointer #x70004000) + ) + ) + (run-next-time-in-process + game-end-proc + (lambda :behavior process + () + (set-blackout-frames #x7530) + (set! (-> *setting-control* default allow-pause) #f) + (set! (-> *setting-control* default allow-progress) #f) + (copy-settings-from-target! *setting-control*) + (set! (-> *setting-control* default sfx-volume) 0.0) + (set! (-> *setting-control* default music-volume) 0.0) + (set! (-> *setting-control* default dialog-volume) 0.0) + (set! (-> *setting-control* default ambient-volume) 0.0) + (let ((gp-0 (-> *display* base-frame-counter))) + (until (>= (- (-> *display* base-frame-counter) gp-0) 30) + (suspend) + ) + ) + (kernel-shutdown) + (none) + ) + ) + (-> game-end-proc ppointer) + ) + (set! *master-exit* #t) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for function display-loop +;; WARN: Unsupported inline assembly instruction kind - [mtc0 Perf, r0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mfpc a0, pcr0] +;; WARN: Unsupported inline assembly instruction kind - [mfpc a0, pcr1] +;; WARN: Unsupported inline assembly instruction kind - [mtc0 Perf, r0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mtpc pcr0, r0] +;; WARN: Unsupported inline assembly instruction kind - [mtpc pcr1, r0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mtc0 Perf, a0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mtc0 Perf, r0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mfpc a0, pcr0] +;; WARN: Unsupported inline assembly instruction kind - [mfpc a0, pcr1] +;; WARN: Unsupported inline assembly instruction kind - [mtc0 Perf, r0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mtpc pcr0, r0] +;; WARN: Unsupported inline assembly instruction kind - [mtpc pcr1, r0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +;; WARN: Unsupported inline assembly instruction kind - [mtc0 Perf, a0] +;; WARN: Unsupported inline assembly instruction kind - [sync.l] +;; WARN: Unsupported inline assembly instruction kind - [sync.p] +(defbehavior display-loop process () + (local-vars (r0-0 none) (a0-54 int) (a0-56 int) (a0-73 int) (a0-75 int)) + (stack-size-set! (-> self main-thread) 512) + (let ((disp *display*)) + (dma-send-to-spr + (the-as uint #x70000000) + (the-as uint *terrain-context*) + (the-as uint 0) + #t + ) + (set! *teleport* #t) + (update-per-frame-settings! *setting-control*) + (init-time-of-day-context *time-of-day-context*) + (display-sync disp) + (swap-display disp) + (dummy-14 *touching-list*) + (blerc-init) + (dma-send + (the-as dma-bank #x10008000) + (the-as uint (-> *collide-vif0-init* data)) + (the-as uint (/ (-> *collide-vif0-init* length) 4)) + ) + (suspend) + (while *run* + (blerc-execute) + (blerc-init) + (texscroll-execute) + (ripple-execute) + (set! *weather-off* #f) + (let ((v1-13 (-> *game-info* current-continue level))) + (dotimes (a0-8 (-> *level* length)) + (let ((a1-6 (-> *level* level a0-8))) + (when (= (-> a1-6 status) 'active) + (if (and (= (-> a1-6 name) v1-13) (-> *level* play?)) + (set! (-> *setting-control* default music) (-> a1-6 info music-bank)) + ) + ) + ) + ) + ) + (set! (-> *setting-control* default sound-flava) (the-as uint 49)) + (set! (-> *setting-control* default sound-flava-priority) 0.0) + (when (and *execute-ambients* (not (paused?))) + (if *target* + (set! (-> *target* draw secondary-interp) 0.0) + ) + (let ((s5-1 (sphere<-vector+r! (new 'stack 'sphere) (ear-trans) 0.0))) + (let ((v1-28 #x70000000)) + (s.w! (+ v1-28 16) 0) + ) + (dotimes (s4-1 (-> *level* length)) + (let ((v1-32 (-> *level* level s4-1))) + (if (= (-> v1-32 status) 'active) + (collect-ambients + (-> v1-32 bsp) + s5-1 + 0 + (the-as ambient-list (+ 16 #x70000000)) + ) + ) + ) + ) + ) + (countdown (s4-2 (-> (the-as (pointer int32) #x70000000) 4)) + (dummy-18 + (-> + (+ + (* s4-2 4) + (the-as int (the-as (pointer process-drawable) #x70000000)) + ) + 5 + ) + ) + ) + ) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + ) + (execute-math-engine) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :r #x80 :a #x80) + ) + ) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + ) + (*debug-hook*) + (main-cheats) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :r #x20 :g #x20 :a #x80) + ) + ) + (update-camera) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + ) + (*draw-hook*) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :g #x80 :a #x80) + ) + ) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :r #x40 :b #x40 :a #x80) + ) + ) + (*menu-hook*) + (if *debug-segment* + (add-frame + (-> *display* frames (-> *display* on-screen) frame profile-bar 0) + 'draw + (new 'static 'rgba :g #x40 :a #x80) + ) + ) + (make-current-level-available-to-progress) + (update-task-hints) + (load-level-text-files -1) + (if *debug-segment* + (add-frame + (-> disp frames (-> disp on-screen) frame profile-bar 0) + 'unknown-cpu-time + (new 'static 'rgba :a #x80) + ) + ) + (let ((v1-112 (-> *perf-stats* data))) + (b! (zero? (-> v1-112 0 ctrl)) cfg-46 :delay (nop!)) + (.mtc0 Perf r0-0) + (.sync.l) + (.sync.p) + (.mfpc a0-54 pcr0) + (+! (-> v1-112 0 accum0) a0-54) + (.mfpc a0-56 pcr1) + (+! (-> v1-112 0 accum1) a0-56) + ) + (label cfg-46) + 0 + (when (nonzero? (sync-path 0 0)) + (*dma-timeout-hook*) + (reset-vif1-path) + (if *debug-segment* + (format + 0 + "profile bar at ~D.~%" + (-> + *display* + frames + (-> *display* on-screen) + frame + profile-bar + 1 + profile-frame-count + ) + ) + ) + ) + (let* ((v1-123 (-> *perf-stats* data)) + (a0-60 (-> v1-123 0 ctrl)) + ) + (+! (-> v1-123 0 count) 1) + (b! (zero? a0-60) cfg-51 :delay (nop!)) + (.mtc0 Perf r0-0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 r0-0) + (.mtpc pcr1 r0-0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-60) + ) + (.sync.l) + (.sync.p) + (label cfg-51) + 0 + (if (not *progress-process*) + (depth-cue disp) + ) + (if (-> *screen-filter* draw?) + (draw *screen-filter*) + ) + (when + (or + (movie?) + (< (-> *display* base-frame-counter) (-> *game-info* letterbox-time)) + ) + (if (< (-> *game-info* letterbox-time) (-> *display* base-frame-counter)) + (set! (-> *game-info* letterbox-time) (-> *display* base-frame-counter)) + ) + (if (= (-> *setting-control* current aspect-ratio) 'aspect4x3) + (letterbox) + ) + ) + (if (< (-> *display* base-frame-counter) (-> *game-info* blackout-time)) + (set! (-> *setting-control* default bg-a-force) 1.0) + (set! (-> *setting-control* default bg-a-force) 0.0) + ) + (let ((v1-152 (-> *perf-stats* data))) + (b! (zero? (-> v1-152 0 ctrl)) cfg-68 :delay (nop!)) + (.mtc0 Perf r0-0) + (.sync.l) + (.sync.p) + (.mfpc a0-73 pcr0) + (+! (-> v1-152 0 accum0) a0-73) + (.mfpc a0-75 pcr1) + (+! (-> v1-152 0 accum1) a0-75) + ) + (label cfg-68) + 0 + (let ((debug-txt-buf (-> (if *debug-segment* + (-> + disp + frames + (-> disp on-screen) + frame + debug-buf + ) + (-> + disp + frames + (-> disp on-screen) + frame + global-buf + ) + ) + base + ) + ) + ) + (when *debug-segment* + (debug-draw-buffers) + (let* ((debug-buf (-> disp frames (-> disp on-screen) frame debug-buf)) + (s4-3 (-> debug-buf base)) + ) + (when *display-profile* + (let* ((v1-172 debug-buf) + (a0-77 (the-as object (-> v1-172 base))) + ) + (set! + (-> (the-as dma-packet a0-77) dma) + (new 'static 'dma-tag :qwc #xa :id (dma-tag-id cnt)) + ) + (set! (-> (the-as dma-packet a0-77) vif0) (new 'static 'vif-tag)) + (set! + (-> (the-as dma-packet a0-77) vif1) + (new 'static 'vif-tag :imm #xa :cmd (vif-cmd direct) :msk #x1) + ) + (set! (-> v1-172 base) (&+ (the-as pointer a0-77) 16)) + ) + (let* ((v1-173 debug-buf) + (a0-79 (the-as object (-> v1-173 base))) + ) + (set! + (-> (the-as gs-gif-tag a0-79) tag) + (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x9) + ) + (set! + (-> (the-as gs-gif-tag a0-79) regs) + (new 'static 'gif-tag-regs + :regs0 (gif-reg-id a+d) + :regs1 (gif-reg-id a+d) + :regs2 (gif-reg-id a+d) + :regs3 (gif-reg-id a+d) + :regs4 (gif-reg-id a+d) + :regs5 (gif-reg-id a+d) + :regs6 (gif-reg-id a+d) + :regs7 (gif-reg-id a+d) + :regs8 (gif-reg-id a+d) + :regs9 (gif-reg-id a+d) + :regs10 (gif-reg-id a+d) + :regs11 (gif-reg-id a+d) + :regs12 (gif-reg-id a+d) + :regs13 (gif-reg-id a+d) + :regs14 (gif-reg-id a+d) + :regs15 (gif-reg-id a+d) + ) + ) + (set! (-> v1-173 base) (&+ (the-as pointer a0-79) 16)) + ) + (let* ((v1-174 debug-buf) + (a0-81 (-> v1-174 base)) + ) + (set! + (-> (the-as (pointer gs-alpha) a0-81) 0) + (new 'static 'gs-alpha :b #x1 :d #x1) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 1) (gs-reg64 alpha-1)) + (set! + (-> (the-as (pointer gs-zbuf) a0-81) 2) + (new 'static 'gs-zbuf :zbp #x1c0 :psm (gs-psm ct24) :zmsk #x1) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 3) (gs-reg64 zbuf-1)) + (set! + (-> (the-as (pointer gs-test) a0-81) 4) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest always)) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 5) (gs-reg64 test-1)) + (set! (-> (the-as (pointer uint64) a0-81) 6) (the-as uint 0)) + (set! (-> (the-as (pointer gs-reg64) a0-81) 7) (gs-reg64 pabe)) + (set! + (-> (the-as (pointer gs-clamp) a0-81) 8) + (new 'static 'gs-clamp + :wms (gs-tex-wrap-mode clamp) + :wmt (gs-tex-wrap-mode clamp) + ) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 9) (gs-reg64 clamp-1)) + (set! + (-> (the-as (pointer gs-tex1) a0-81) 10) + (new 'static 'gs-tex1 :mmag #x1 :mmin #x1) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 11) (gs-reg64 tex1-1)) + (set! + (-> (the-as (pointer gs-texa) a0-81) 12) + (new 'static 'gs-texa :ta1 #x80) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 13) (gs-reg64 texa)) + (set! + (-> (the-as (pointer gs-texclut) a0-81) 14) + (new 'static 'gs-texclut :cbw #x4) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 15) (gs-reg64 texclut)) + (set! + (-> (the-as (pointer gs-fogcol) a0-81) 16) + (the-as gs-fogcol *fog-color*) + ) + (set! (-> (the-as (pointer gs-reg64) a0-81) 17) (gs-reg64 fogcol)) + (set! (-> v1-174 base) (&+ a0-81 144)) + ) + (dotimes (s2-0 2) + (let + ((s1-0 (-> disp frames (-> disp on-screen) frame profile-bar s2-0))) + (add-end-frame + s1-0 + 'end-draw + (new 'static 'rgba :r #x40 :g #x40 :b #x40 :a #x40) + ) + (draw s1-0 debug-buf (* 10 s2-0)) + ) + 0 + ) + ) + (when *display-deci-count* + (let ((s2-1 draw-string-xy)) + (format (clear *temp-string*) "~D" *deci-count*) + (s2-1 + *temp-string* + debug-buf + 448 + 210 + (font-color default) + (font-flags shadow kerning) + ) + ) + ) + (display-file-info) + (let ((a3-6 (-> debug-buf base))) + (let ((v1-188 (the-as object (-> debug-buf base)))) + (set! + (-> (the-as dma-packet v1-188) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-188) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-188) vif1) (new 'static 'vif-tag)) + (set! (-> debug-buf base) (&+ (the-as pointer v1-188) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw1) + s4-3 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + ) + (let* ((s3-1 (if *debug-segment* + (-> disp frames (-> disp on-screen) frame debug-buf) + (-> disp frames (-> disp on-screen) frame global-buf) + ) + ) + (s4-4 (-> s3-1 base)) + ) + (if (= *master-mode* 'pause) + (draw-string-xy + (lookup-text! *common-text* (game-text-id pause) #f) + s3-1 + 256 + 160 + (font-color orange-red) + (font-flags shadow kerning middle large) + ) + ) + (let ((a3-8 (the int (draw-string *stdcon0* s3-1 *font-context*)))) + (draw-string-xy + *stdcon1* + s3-1 + (the int (-> *font-context* origin x)) + a3-8 + (font-color default) + (font-flags shadow kerning) + ) + ) + (if *display-iop-info* + (show-iop-info s3-1) + ) + (if *display-memcard-info* + (show-mc-info s3-1) + ) + (let ((a3-9 (-> s3-1 base))) + (let ((v1-215 (the-as object (-> s3-1 base)))) + (set! + (-> (the-as dma-packet v1-215) dma) + (new 'static 'dma-tag :id (dma-tag-id next)) + ) + (set! (-> (the-as dma-packet v1-215) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-215) vif1) (new 'static 'vif-tag)) + (set! (-> s3-1 base) (&+ (the-as pointer v1-215) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-4 + (the-as (pointer dma-tag) a3-9) + ) + ) + ) + (let ((v1-220 *dma-mem-usage*)) + (when (nonzero? v1-220) + (set! (-> v1-220 length) (max 85 (-> v1-220 length))) + (set! (-> v1-220 data 84 name) "debug") + (+! (-> v1-220 data 84 count) 1) + (+! (-> v1-220 data 84 used) (&- (-> (if *debug-segment* + (-> + disp + frames + (-> disp on-screen) + frame + debug-buf + ) + (-> + disp + frames + (-> disp on-screen) + frame + global-buf + ) + ) + base + ) + (the-as uint debug-txt-buf) + ) + ) + (set! (-> v1-220 data 84 total) (-> v1-220 data 84 used)) + ) + ) + ) + (set! *stdcon* (clear *stdcon0*)) + (swap-display disp) + (set! (-> *time-of-day-context* title-updated) #f) + (set! *teleport* #f) + (when (nonzero? *teleport-count*) + (set! *teleport* #t) + (set! *teleport-count* (+ *teleport-count* -1)) + ) + (let* ((v1-228 (-> *perf-stats* data)) + (a0-112 (-> v1-228 0 ctrl)) + ) + (+! (-> v1-228 0 count) 1) + (b! (zero? a0-112) cfg-98 :delay (nop!)) + (.mtc0 Perf r0-0) + (.sync.l) + (.sync.p) + (.mtpc pcr0 r0-0) + (.mtpc pcr1 r0-0) + (.sync.l) + (.sync.p) + (.mtc0 Perf a0-112) + ) + (.sync.l) + (.sync.p) + (label cfg-98) + 0 + (process-particles) + (dma-send + (the-as dma-bank #x10008000) + (the-as uint (-> *collide-vif0-init* data)) + (the-as uint (/ (-> *collide-vif0-init* length) 4)) + ) + (swap-sound-buffers (ear-trans) (camera-pos) (camera-angle)) + (str-play-kick) + (level-update *level*) + (mc-run) + (auto-save-check) + (suspend) + ) + ) + (set! *dproc* #f) + (format 0 "display is off #<#x~X>.~%" self) + 0 + ) + +;; definition for function on +(defun on ((arg0 symbol)) + (when (not *dproc*) + (when (not arg0) + (if (= (-> *level* level0 status) 'inactive) + (bg 'halfpipe) + ) + ) + (set! *run* #t) + (let ((s5-0 (get-process *4k-dead-pool* process #x4000))) + (set! *dproc* (ppointer->process (when s5-0 + (let + ((t9-2 (method-of-type process activate)) + ) + (t9-2 + s5-0 + *display-pool* + 'display + (&-> *dram-stack* 14336) + ) + ) + ((the-as + (function cpu-thread function none) + set-to-run + ) + (-> s5-0 main-thread) + display-loop + ) + (-> s5-0 ppointer) + ) + ) + ) + ) + (cond + ((or + (level-get-with-status *level* 'loaded) + (level-get-with-status *level* 'alive) + (level-get-with-status *level* 'active) + ) + (activate-levels! *level*) + (when (not arg0) + (let ((gp-1 (entity-by-type camera-start))) + (if (and gp-1 (type-type? (-> gp-1 type) entity-actor)) + (camera-teleport-to-entity gp-1) + ) + ) + ) + ) + (else + (kill-by-name 'display *active-pool*) + (set! *dproc* #f) + ) + ) + *dproc* + ) + ) + +;; definition for function off +(defun off () + (stop 'debug) + (dotimes (gp-0 (-> *level* length)) + (let ((a0-2 (-> *level* level gp-0))) + (if (= (-> a0-2 status) 'active) + (deactivate a0-2) + ) + ) + ) + (set! *run* #f) + 0 + ) + + + + diff --git a/test/decompiler/reference/engine/gfx/font_REF.gc b/test/decompiler/reference/engine/gfx/font_REF.gc new file mode 100644 index 0000000000..6da59c700c --- /dev/null +++ b/test/decompiler/reference/engine/gfx/font_REF.gc @@ -0,0 +1,593 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *font12-table*, type (inline-array vector) +(define + *font12-table* + (new 'static 'inline-array vector 250 + (new 'static 'vector :x 0.0039 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.7539 :y 0.0019 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0644 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.1914 :y 0.0644 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.2851 :y 0.0644 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.0644 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0644 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.6601 :y 0.0644 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.7539 :y 0.0644 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.8476 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.1269 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.0976 :y 0.1269 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.1269 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.2851 :y 0.1269 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.3789 :y 0.1269 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.1269 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.1269 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.1269 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.7539 :y 0.1269 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.8476 :y 0.1269 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.1894 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.0976 :y 0.1894 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.1894 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.2851 :y 0.1894 :z 1.0 :w 11.25) + (new 'static 'vector :x 0.3789 :y 0.1894 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.4726 :y 0.1894 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.5664 :y 0.1894 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.6601 :y 0.1894 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.7539 :y 0.1894 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.8476 :y 0.1894 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0039 :y 0.2519 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.0976 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.2519 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.2851 :y 0.2519 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.3789 :y 0.2519 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.2519 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.5664 :y 0.2519 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.2519 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.7539 :y 0.2519 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.8476 :y 0.2519 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.0039 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.3144 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.1914 :y 0.3144 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.2851 :y 0.3144 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.3144 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.4726 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.3144 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.3144 :z 1.0 :w 7.5) + (new 'static 'vector :x 0.7539 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.3769 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.0976 :y 0.3769 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.1914 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.3769 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.3769 :z 1.0 :w 15.75) + (new 'static 'vector :x 0.6601 :y 0.3769 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.7539 :y 0.3769 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.4394 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.1914 :y 0.4394 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.2851 :y 0.4394 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.3789 :y 0.4394 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.4394 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.5664 :y 0.4394 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.4394 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.7539 :y 0.4394 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.8476 :y 0.4394 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.5019 :z 1.0 :w 6.0) + (new 'static 'vector :x 0.0976 :y 0.5019 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.1914 :y 0.5019 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.2851 :y 0.5019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.3789 :y 0.5019 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.5019 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.5664 :y 0.5019 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.6601 :y 0.5019 :z 1.0 :w 17.25) + (new 'static 'vector :x 0.7539 :y 0.5019 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.8476 :y 0.5019 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.0039 :y 0.5644 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0976 :y 0.5644 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.1914 :y 0.5644 :z 1.0 :w 9.75) + (new 'static 'vector :x 0.2851 :y 0.5644 :z 1.0 :w 18.5) + (new 'static 'vector :x 0.3789 :y 0.5644 :z 1.0 :w 14.25) + (new 'static 'vector :x 0.4726 :y 0.5644 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.5644 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.6601 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.5644 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.8476 :y 0.5644 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.0039 :y 0.6269 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0976 :y 0.6269 :z 1.0 :w 12.75) + (new 'static 'vector :x 0.1914 :y 0.6269 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.2851 :y 0.6269 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.3789 :y 0.6269 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.4726 :y 0.6269 :z 1.0 :w 16.5) + (new 'static 'vector :x 0.5664 :y 0.6269 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.6269 :z 1.0 :w 10.5) + (new 'static 'vector :x 0.7539 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.6269 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0039 :y 0.6894 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0976 :y 0.6894 :z 1.0 :w 13.5) + (new 'static 'vector :x 0.0039 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.7519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.2851 :y 0.7519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.3789 :y 0.7519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.7519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.5664 :y 0.7519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.6601 :y 0.7519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.1269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.2519 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.3144 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.3769 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.4394 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.5019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.5644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.2851 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.4726 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.7539 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.8476 :y 0.6269 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.6894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0976 :y 0.6894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.0039 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.7519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.8769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.8769 :z 1.0 :w 24.0) + ) + ) + +;; definition for symbol *font24-table*, type (inline-array vector) +(define + *font24-table* + (new 'static 'inline-array vector 289 + (new 'static 'vector :x 0.0039 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0976 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.1914 :y 0.0019 :z 1.0 :w 19.5) + (new 'static 'vector :x 0.2851 :y 0.0019 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.3789 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.4726 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.5664 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.6601 :y 0.0019 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.7539 :y 0.0019 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.8476 :y 0.0019 :z 1.0 :w 12.0) + (new 'static 'vector :x 0.0039 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.0644 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.3789 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.0644 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.5664 :y 0.0644 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.6601 :y 0.0644 :z 1.0 :w 8.0) + (new 'static 'vector :x 0.7539 :y 0.0644 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.8476 :y 0.0644 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.0039 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.1269 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.1914 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.1269 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.4726 :y 0.1269 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.5664 :y 0.1269 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.6601 :y 0.1269 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.7539 :y 0.1269 :z 1.0 :w 7.0) + (new 'static 'vector :x 0.8476 :y 0.1269 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.0039 :y 0.1894 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.0976 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.1914 :y 0.1894 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.2851 :y 0.1894 :z 1.0 :w 10.0) + (new 'static 'vector :x 0.3789 :y 0.1894 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.4726 :y 0.1894 :z 1.0 :w 15.0) + (new 'static 'vector :x 0.5664 :y 0.1894 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.6601 :y 0.1894 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.7539 :y 0.1894 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.8476 :y 0.1894 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0039 :y 0.2519 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0976 :y 0.2519 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.1914 :y 0.2519 :z 1.0 :w 8.0) + (new 'static 'vector :x 0.2851 :y 0.2519 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.3789 :y 0.2519 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.4726 :y 0.2519 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.5664 :y 0.2519 :z 1.0 :w 9.0) + (new 'static 'vector :x 0.6601 :y 0.2519 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.7539 :y 0.2519 :z 1.0 :w 22.5) + (new 'static 'vector :x 0.8476 :y 0.2519 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.0039 :y 0.3144 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.0976 :y 0.3144 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.1914 :y 0.3144 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.2851 :y 0.3144 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.3789 :y 0.3144 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.4726 :y 0.3144 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.5664 :y 0.3144 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.6601 :y 0.3144 :z 1.0 :w 11.0) + (new 'static 'vector :x 0.7539 :y 0.3144 :z 1.0 :w 16.0) + (new 'static 'vector :x 0.8476 :y 0.3144 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.0039 :y 0.3769 :z 1.0 :w 17.0) + (new 'static 'vector :x 0.0976 :y 0.3769 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.1914 :y 0.3769 :z 1.0 :w 18.0) + (new 'static 'vector :x 0.2851 :y 0.3769 :z 1.0 :w 21.0) + (new 'static 'vector :x 0.3789 :y 0.3769 :z 1.0 :w 19.0) + (new 'static 'vector :x 0.4726 :y 0.3769 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.5664 :y 0.3769 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.6601 :y 0.3769 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.7539 :y 0.3769 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.8476 :y 0.3769 :z 1.0 :w 22.0) + (new 'static 'vector :x 0.0039 :y 0.4394 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.0976 :y 0.4394 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.1914 :y 0.4394 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.2851 :y 0.4394 :z 1.0 :w 23.0) + (new 'static 'vector :x 0.3789 :y 0.4394 :z 1.0 :w 20.0) + (new 'static 'vector :x 0.4726 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.0019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.0644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.1269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.1894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.2519 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.3144 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.3769 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.4394 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.5019 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.5644 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.6269 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7505 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.6894 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0039 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.0976 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.1914 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.2851 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.3789 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.4726 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.5664 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.6601 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.7539 :y 0.7512 :z 1.0 :w 24.0) + (new 'static 'vector :x 0.8476 :y 0.7512 :z 1.0 :w 5.0) + ) + ) + +;; definition for function draw-string +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function get-string-length +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function draw-string-xy +;; INFO: Return type mismatch float vs none. +(defun + draw-string-xy + ((arg0 string) + (arg1 dma-buffer) + (arg2 int) + (arg3 int) + (arg4 font-color) + (arg5 font-flags) + ) + (let + ((a2-2 + (new 'stack 'font-context *font-default-matrix* arg2 arg3 0.0 arg4 arg5) + ) + ) + (draw-string arg0 arg1 a2-2) + ) + (none) + ) + +;; definition for function draw-string-adv +;; INFO: Return type mismatch float vs none. +(defun draw-string-adv ((arg0 string) (arg1 dma-buffer) (arg2 font-context)) + (+! (-> arg2 origin x) (draw-string arg0 arg1 arg2)) + (none) + ) + + + + diff --git a/test/decompiler/reference/engine/gfx/merc/merc-death_REF.gc b/test/decompiler/reference/engine/gfx/merc/merc-death_REF.gc new file mode 100644 index 0000000000..cf979484cd --- /dev/null +++ b/test/decompiler/reference/engine/gfx/merc/merc-death_REF.gc @@ -0,0 +1,160 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol *merc-death-globals*, type vector +(define *merc-death-globals* (new 'global 'vector)) + +;; definition of type death-info +(deftype death-info (basic) + ((vertex-skip uint16 :offset-assert 4) + (timer uint8 :offset-assert 6) + (overlap uint8 :offset-assert 7) + (effect uint32 :offset-assert 8) + (sound basic :offset-assert 12) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) + +;; definition for method 3 of type death-info +(defmethod inspect death-info ((obj death-info)) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tvertex-skip: ~D~%" (-> obj vertex-skip)) + (format #t "~Ttimer: ~D~%" (-> obj timer)) + (format #t "~Toverlap: ~D~%" (-> obj overlap)) + (format #t "~Teffect: ~D~%" (-> obj effect)) + (format #t "~Tsound: ~A~%" (-> obj sound)) + obj + ) + +;; definition for function birth-func-death-sparks +;; INFO: Return type mismatch int vs none. +(defun birth-func-death-sparks () + 0 + (none) + ) + +;; definition for symbol death-beach-puppy, type death-info +(define + death-beach-puppy + (new 'static 'death-info + :vertex-skip #x82 + :timer #x4b + :overlap #x4 + :effect #x29 + :sound 'temp-enemy-die + ) + ) + +;; definition for symbol death-jungle-snake, type death-info +(define + death-jungle-snake + (new 'static 'death-info + :vertex-skip #xa + :timer #x4b + :overlap #x4 + :effect #x29 + :sound 'temp-enemy-die + ) + ) + +;; definition for symbol death-default, type death-info +(define + death-default + (new 'static 'death-info + :vertex-skip #x50 + :timer #x4b + :overlap #x4 + :effect #x29 + :sound 'temp-enemy-die + ) + ) + +;; definition for symbol death-warp-in, type death-info +(define + death-warp-in + (new 'static 'death-info + :vertex-skip #x96 + :timer #x4b + :effect #x29 + :sound 'warpgate-tele + ) + ) + +;; definition for symbol death-warp-out, type death-info +(define + death-warp-out + (new 'static 'death-info + :vertex-skip #x96 + :timer #x96 + :effect #x29 + :sound 'warpgate-tele + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 41) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (sp-flt spt-scale-x (meters 0.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 64.0 32.0 1.0) + (sp-rnd-flt spt-g 16.0 32.0 1.0) + (sp-rnd-flt spt-b 48.0 32.0 1.0) + (sp-rnd-flt spt-a 48.0 48.0 1.0) + (sp-rnd-flt spt-vel-y (meters 0.0) (meters 0.006666667) 1.0) + (sp-flt spt-scalevel-x (meters -0.0016666667)) + (sp-flt spt-scalevel-y (meters 0.02)) + (sp-flt spt-accel-y -2.7306666) + (sp-int spt-timer 120) + (sp-cpuinfo-flags bit2 bit3 bit12) + (sp-int-plain-rnd spt-next-time 15 59 1) + (sp-launcher-by-id spt-next-launcher 42) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 42) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 5 + (sp-flt spt-fade-a -1.4222223) + (sp-int spt-timer 45) + (sp-int spt-next-time 42) + (sp-launcher-by-id spt-next-launcher 43) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 43) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 4 + (sp-flt spt-scalevel-x (meters 0.0)) + (sp-flt spt-fade-a -0.21333334) + (sp-int-plain-rnd spt-timer 0 296 1) + (sp-end) + ) + ) + ) + +;; definition for function merc-death-spawn +;; INFO: Return type mismatch int vs none. +(defun merc-death-spawn ((arg0 int) (arg1 vector) (arg2 vector)) + (let ((v1-2 (-> *part-id-table* arg0))) + (if (and (nonzero? v1-2) (= (-> v1-2 type) sparticle-launcher)) + (sp-launch-particles-death *sp-particle-system-2d* v1-2 arg1) + ) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc b/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc index de6c204e19..31304ca706 100644 --- a/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc @@ -444,11 +444,11 @@ ;; definition for symbol *ocean-near-off*, type symbol (define *ocean-near-off* #f) -;; definition for symbol *ocean-heights*, type symbol -(define *ocean-heights* #f) +;; definition for symbol *ocean-heights*, type ocean-wave-info +(define *ocean-heights* (the-as ocean-wave-info #f)) -;; definition for symbol *ocean-verts*, type symbol -(define *ocean-verts* #f) +;; definition for symbol *ocean-verts*, type (pointer vector) +(define *ocean-verts* (the-as (pointer vector) #f)) ;; definition of type ocean-vu0-work (deftype ocean-vu0-work (structure) diff --git a/test/decompiler/reference/engine/gfx/sparticle/sparticle-launcher_REF.gc b/test/decompiler/reference/engine/gfx/sparticle/sparticle-launcher_REF.gc index c5c383b9d4..83f1c6d937 100644 --- a/test/decompiler/reference/engine/gfx/sparticle/sparticle-launcher_REF.gc +++ b/test/decompiler/reference/engine/gfx/sparticle/sparticle-launcher_REF.gc @@ -661,10 +661,7 @@ ;; Used lq/sq (defun sp-launch-particles-death - ((arg0 sparticle-system) - (arg1 sparticle-launcher) - (arg2 sparticle-launchinfo) - ) + ((arg0 sparticle-system) (arg1 sparticle-launcher) (arg2 vector)) (local-vars (v1-25 float) (v1-27 float)) (rlet ((vf0 :class vf) (vf1 :class vf) @@ -677,7 +674,7 @@ (vf6 :class vf) ) (init-vf0-vector) - (.lvf vf30 (&-> arg2 launchrot quad)) + (.lvf vf30 (&-> arg2 quad)) (let ((v1-0 #x437f0000)) (.mov vf31 v1-0) ) diff --git a/test/decompiler/reference/engine/target/logic-target_REF.gc b/test/decompiler/reference/engine/target/logic-target_REF.gc index 9321d1836e..3a97acefd3 100644 --- a/test/decompiler/reference/engine/target/logic-target_REF.gc +++ b/test/decompiler/reference/engine/target/logic-target_REF.gc @@ -371,15 +371,22 @@ (let ((s4-2 format) (s3-2 arg1) (s2-2 "~0kwall:~6X mode:~-8S material:~-10S event:~S~%") - (s1-2 (-> arg0 control pad 4)) - (s0-2 (pat-mode->string (the-as pat-surface (-> arg0 control pad 4)))) + (s1-2 (-> arg0 control unknown-int50)) + (s0-2 + (pat-mode->string + (the-as pat-surface (-> arg0 control unknown-int50)) + ) + ) ) (set! sv-96 - (pat-material->string (the-as pat-surface (-> arg0 control pad 4))) + (pat-material->string (the-as pat-surface (-> arg0 control unknown-int50))) ) (let - ((t1-2 (pat-event->string (the-as pat-surface (-> arg0 control pad 4))))) + ((t1-2 + (pat-event->string (the-as pat-surface (-> arg0 control unknown-int50))) + ) + ) (s4-2 s3-2 s2-2 s1-2 s0-2 sv-96 t1-2) ) ) @@ -1662,7 +1669,7 @@ (target-timed-invulnerable-off self) ) ) - (set! (-> self control unknown-symbol10) #f) + (set! (-> self control unknown-symbol40) #f) 0 (none) ) @@ -2840,7 +2847,7 @@ (-> self sound) (new 'process 'ambient-sound 'none (-> self control trans)) ) - (set! (-> self control pad 5) (the-as uint (new-sound-id))) + (set! (-> self control unknown-soundid00) (new-sound-id)) (if *debug-segment* (add-connection *debug-engine* self target-print-stats self *stdcon0* #f) ) diff --git a/test/decompiler/reference/engine/target/target-util_REF.gc b/test/decompiler/reference/engine/target/target-util_REF.gc index 1cbc02e43b..620905d2c6 100644 --- a/test/decompiler/reference/engine/target/target-util_REF.gc +++ b/test/decompiler/reference/engine/target/target-util_REF.gc @@ -461,7 +461,7 @@ (-> *TARGET-bank* root-offset) (-> *TARGET-bank* root-radius) ) - (set! (-> self control unknown-int30) (the-as int arg0)) + (set! (-> self control unknown-symbol30) arg0) (set! (-> self state-flags) (logand -3 (-> self state-flags))) (set! (-> s4-0 transform-index) -2) (set! (-> s4-0 prim-core collide-as) (the-as uint 0)) @@ -480,7 +480,7 @@ (set! (-> gp-0 prim-core offense) 0) (case arg0 (('harmless #f) - (set! (-> self control unknown-int30) (the-as int #f)) + (set! (-> self control unknown-symbol30) #f) (target-collide-set! (-> self control unknown-symbol00) (-> self control unknown-float90) @@ -562,7 +562,7 @@ (-> *TARGET-bank* duck-spin-radius) ) (set! (-> s5-0 transform-index) 7) - (set! (-> self control unknown-int30) (the-as int 'roll)) + (set! (-> self control unknown-symbol30) 'roll) ) (('flip) (logior! (-> self state-flags) 2) @@ -584,7 +584,7 @@ (-> *TARGET-bank* duck-spin-radius) ) (set! (-> s5-0 transform-index) 7) - (set! (-> self control unknown-int30) (the-as int 'flip)) + (set! (-> self control unknown-symbol30) 'flip) ) (('punch) (sphere<-vector+r! @@ -652,7 +652,7 @@ (-> *TARGET-bank* flop-radius) ) (set! f30-0 1.0) - (set! (-> self control unknown-int30) (the-as int 'flop)) + (set! (-> self control unknown-symbol30) 'flop) ) (('flop-down) (logior! (-> self state-flags) 2) @@ -676,7 +676,7 @@ (if (!= f30-0 1.0) (set! f30-0 2.1) ) - (set! (-> self control unknown-int30) (the-as int 'flop)) + (set! (-> self control unknown-symbol30) 'flop) ) (('flut-attack) (sphere<-vector+r! diff --git a/test/offline/config.jsonc b/test/offline/config.jsonc index 48051b1a3f..56763f5b17 100644 --- a/test/offline/config.jsonc +++ b/test/offline/config.jsonc @@ -130,6 +130,14 @@ "all-texture-tweak-adjust", // dynamic-field access placeholder case TODO "debug-menu-make-instance-menu", // also disabled + + // ambient + "ambient-type-music", // IR_StoreConstOffset::do_codegen can't handle this (c {} sz {}) + + // main + "display-loop", + "on", + // sage-finalboss "(method 7 sage-finalboss)" // inline-array stuff ],