diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index d18f99a9c..65f1f6397 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -13566,6 +13566,8 @@ ;; - Types +(declare-type sparticle-system basic) +(declare-type sparticle-cpuinfo structure) (deftype sp-field-init-spec (structure) ((field sp-field-id :offset-assert 0) (flags sp-flag :offset-assert 2) @@ -13762,7 +13764,7 @@ (next-time uint32 :offset-assert 116) (next-launcher basic :offset-assert 120) (cache-alpha float :offset-assert 124) - (valid basic :offset-assert 128) + (valid symbol :offset-assert 128) (key sparticle-launch-control :offset-assert 132) (binding sparticle-launch-state :offset-assert 136) (data uint32 1 :offset 12) @@ -14302,12 +14304,12 @@ (text-x int32 :offset-assert 164) (text-y int32 :offset-assert 168) (friend int32 :offset-assert 172) - (first-init basic :offset-assert 176) - (increment-on-event basic :offset-assert 180) + (first-init symbol :offset-assert 176) + (increment-on-event symbol :offset-assert 180) (skip-particle int32 :offset-assert 184) - (disable basic :offset-assert 188) - (force-on-screen basic :offset-assert 192) - (deactivate-when-hidden basic :offset-assert 196) + (disable symbol :offset-assert 188) + (force-on-screen symbol :offset-assert 192) + (deactivate-when-hidden symbol :offset-assert 196) (trigger-time uint64 :offset-assert 200) (last-hide-time uint64 :offset-assert 208) (nb-of-icons int32 :offset-assert 216) @@ -14322,19 +14324,19 @@ :flag-assert #x1b00b00118 ;; inherited inspect of process (:methods - (dummy-14 () none 14) - (dummy-15 () none 15) - (dummy-16 (_type_ int int) none 16) ;; first int seen as a fixed point from racer-info 'heat' - (dummy-17 () none 17) - (dummy-18 () none 18) + (dummy-14 (_type_) none 14) + (dummy-15 (_type_) none 15) + (TODO-RENAME-16 (_type_ int int) none 16) ;; first int seen as a fixed point from racer-info 'heat' + (dummy-17 (_type_) none 17) + (dummy-18 (_type_) none 18) (TODO-RENAME-19 (_type_) none 19) - (init-particles! (_type_) none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) - (dummy-23 () none 23) - (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) + (init-particles! (_type_ int) none 20) + (first-icon-x (_type_) int 21) + (first-icon-y (_type_) int 22) + (dummy-23 (_type_) none 23) + (animate! (_type_ symbol symbol) none 24) ;; not sure what the flags are / what the purpose is yet + (inc-value (_type_) float 25) + (dec-value (_type_) float 26) ) ) @@ -14358,6 +14360,7 @@ (bike-speed (pointer hud-bike-speed) :offset-assert 24) (bike-heat (pointer hud-bike-heat) :offset-assert 28) (money-all (pointer hud-money-all) :offset-assert 32) + (parts (pointer process) 9 :offset 0) ) :method-count-assert 9 :size-assert #x24 @@ -19181,9 +19184,9 @@ (define-extern manipy-init (function vector entity skeleton-group vector none :behavior manipy)) (define-extern part-tracker-notify function) (define-extern clone-anim-once (function handle int symbol string none :behavior process-drawable)) -(define-extern convert-to-hud-object function) (define-extern merc-eye-anim (function process-drawable none)) (define-extern clone-anim (function handle int symbol string none :behavior process-drawable)) +(define-extern convert-to-hud-object (function process-drawable hud none :behavior hud)) (define-extern command-get-camera function) (define-extern ja-anim-done? (function symbol)) ;; TODO - not confirmed (define-extern camera-anim function) @@ -19618,8 +19621,8 @@ (define-extern target-swim-tilt function) (define-extern projectile-init-by-other (function entity vector vector uint handle none :behavior projectile)) ;; 4th arg is `options`, 5th is `last-target` (define-extern first-person-hud-init-by-other function) -(define-extern disable-hud function) -(define-extern enable-hud function) +(define-extern disable-hud (function int none)) +(define-extern enable-hud (function none)) (define-extern part-first-person-hud-left-func function) (define-extern part-first-person-hud-right-func function) (define-extern part-first-person-hud-selector-func function) @@ -20344,8 +20347,8 @@ ;; - Types (deftype collectable (process-drawable) - ((root-override collide-shape-moving :score 100 :offset 112) - (pickup-type int32 :offset-assert 176) + ((root-override collide-shape-moving :score 100 :offset 112) + (pickup-type pickup-type :offset-assert 176) (pickup-amount float :offset-assert 180) (notify-parent basic :offset-assert 184) (old-base vector :inline :offset-assert 192) @@ -20359,12 +20362,11 @@ (bob-offset uint64 :offset-assert 288) (bob-amount float :offset-assert 296) (pickup-handle handle :offset-assert 304) ;; not sure it's a handle - (actor-pause basic :offset-assert 312) + (actor-pause symbol :offset-assert 312) ) - (:methods - (dummy-20 () none 20) - (dummy-21 () none 21) + (TODO-RENAME-20 (_type_) _type_ 20) + (dummy-21 (_type_ uint float) none 21) ;; TODO - weird math issue ) :heap-base #xd0 @@ -20374,12 +20376,12 @@ ) (deftype eco-collectable (collectable) - ((eco-effect basic :offset-assert 316) - (collect-effect basic :offset-assert 320) - (collect-effect2 basic :offset-assert 324) + ((eco-effect sparticle-launch-group :offset-assert 316) + (collect-effect sparticle-launch-group :offset-assert 320) + (collect-effect2 sparticle-launch-group :offset-assert 324) (collect-effect-time uint64 :offset-assert 328) (respawn-delay uint64 :offset-assert 336) - (sound-name basic :offset-assert 344) + (sound-name sound-spec :offset-assert 344) (target uint64 :offset-assert 352) (suck-time uint64 :offset-assert 360) (suck-y-offset float :offset-assert 368) @@ -20387,15 +20389,15 @@ (movie-pos-index int32 :offset-assert 400) ) (:methods - (wait () none 22) ;; state - (pickup () none 23) ;; state - (die () none 24) ;; state - (dummy-25 () none 25) - (notice-blue () none 26) ;; state - (dummy-27 () none 27) - (dummy-28 () none 28) - (dummy-29 () none 29) - (dummy-30 () none 30) + (wait () _type_ :state 22) ;; state + (pickup () _type_ :state 23) ;; state + (die () _type_ :state 24) ;; state + (jump () _type_ :state 25) + (notice-blue () _type_ :state 26) ;; state + (get-pickup-sound (_type_ pickup-type) ambient-sound 27) + (dummy-28 (_type_ basic pickup-type float) none 28) + (update-sound! (_type_) none 29) ;; something to do with particles too + (blocked () _type_ :state 30) ) :heap-base #x130 @@ -20461,8 +20463,8 @@ ) (deftype fuel-cell (eco-collectable) - ((victory-anim basic :offset-assert 404) - (state-object basic :offset-assert 408)) + ((victory-anim spool-anim :offset-assert 404) + (state-object symbol :offset-assert 408)) :heap-base #x130 :method-count-assert 31 :size-assert #x19c @@ -20470,7 +20472,7 @@ ) (deftype buzzer (eco-collectable) - ((victory-anim basic :offset-assert 404)) + ((victory-anim spool-anim :offset-assert 404)) :heap-base #x130 :method-count-assert 31 @@ -20481,7 +20483,7 @@ (deftype ecovalve (process-drawable) ((offset vector :inline :offset-assert 176) (offset-target vector :inline :offset-assert 192) - (block-func basic :offset-assert 208)) + (block-func function :offset-assert 208)) :heap-base #x70 :method-count-assert 20 :size-assert #xd4 @@ -20489,12 +20491,12 @@ ) (deftype vent (process-drawable) - ((show-particles basic :offset-assert 176) - (collect-effect basic :offset-assert 180) - (collect-effect2 basic :offset-assert 184) + ((show-particles symbol :offset-assert 176) + (collect-effect sparticle-launch-group :offset-assert 180) + (collect-effect2 sparticle-launch-group :offset-assert 184) (collect-effect-time uint64 :offset-assert 192) - (blocker basic :offset-assert 200) - (block-func basic :offset-assert 204) + (blocker entity-actor :offset-assert 200) + (block-func function :offset-assert 204) (pickup-handle handle :offset-assert 208)) ;; not sure handle (:methods @@ -20546,11 +20548,11 @@ (define-extern birth-pickup-at-point (function vector int float symbol process-drawable symbol (pointer process))) ;; TODO - unconfirmed - see beach-rocks (define-extern fuel-cell-pick-anim (function process-taskable none)) ;; TODO - unconfirmed - see process-taskable (define-extern othercam-init-by-other (function process-taskable symbol symbol symbol none :behavior othercam)) -(define-extern fuel-cell-animate function) -(define-extern add-blue-motion function) -(define-extern check-blue-suck function) -(define-extern initialize-eco-by-other function) -(define-extern add-blue-shake function) +(define-extern fuel-cell-animate (function none)) +(define-extern add-blue-motion (function symbol symbol symbol symbol none :behavior eco-blue)) +(define-extern check-blue-suck (function eco-blue uint :behavior eco-blue)) +(define-extern initialize-eco-by-other (function eco vector none :behavior eco)) +(define-extern add-blue-shake (function vector vector vector vector)) (define-extern money-init-by-other function) (define-extern money-init-by-other-no-bob function) (define-extern fuel-cell-init-by-other function) @@ -20762,8 +20764,8 @@ ;; - Functions -(define-extern send-hud-increment-event function) -(define-extern hud-init-by-other function) +(define-extern send-hud-increment-event (function hud object)) +(define-extern hud-init-by-other (function int none :behavior hud)) ;; - Symbols @@ -20772,9 +20774,9 @@ ;; - Unknowns (define-extern hud-hidden (state hud)) -(define-extern hud-leaving (state hud)) +(define-extern hud-leaving (state int hud)) (define-extern hud-in (state hud)) -(define-extern hud-collecting (state hud)) +(define-extern hud-collecting (state handle hud)) ;; TODO accepts a handle - CRASH in `hud` ;; ---------------------- @@ -20865,21 +20867,21 @@ ;; - Functions -(define-extern calculate-rotation-and-color-for-slice function) -(define-extern part-hud-health-01-func function) -(define-extern part-hud-health-02-func function) -(define-extern part-hud-health-03-func function) -(define-extern fuel-cell-hud-orbit-callback function) -(define-extern fuel-cell-hud-starburst-3-callback function) -(define-extern fuel-cell-hud-starburst-4-callback function) -(define-extern fuel-cell-hud-center-callback function) -(define-extern part-hud-buzzer-func function) -(define-extern part-hud-eco-timer-01-func function) -(define-extern part-hud-eco-timer-02-func function) -(define-extern part-hud-eco-timer-03-func function) -(define-extern part-hud-eco-timer-backing-func function) -(define-extern part-hud-eco-timer-func function) -(define-extern show-hud function) +(define-extern calculate-rotation-and-color-for-slice (function int float int int int hud-particle none)) +(define-extern part-hud-health-01-func (function basic basic hud-particle none)) ;; TODO - i figured this out on another branch...all these particle functions get called by the particle system with the same beginning types iirc +(define-extern part-hud-health-02-func (function basic basic hud-particle none)) +(define-extern part-hud-health-03-func (function basic basic hud-particle none)) +(define-extern fuel-cell-hud-orbit-callback (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-starburst-3-callback (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-starburst-4-callback (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern fuel-cell-hud-center-callback (function sparticle-system sparticle-cpuinfo matrix none)) +(define-extern part-hud-buzzer-func (function basic basic hud-particle none)) +(define-extern part-hud-eco-timer-01-func (function basic basic hud-particle none)) +(define-extern part-hud-eco-timer-02-func (function basic basic hud-particle none)) +(define-extern part-hud-eco-timer-03-func (function basic basic hud-particle none)) +(define-extern part-hud-eco-timer-backing-func (function basic basic hud-particle none)) +(define-extern part-hud-eco-timer-func (function basic basic hud-particle none)) +(define-extern show-hud (function none)) ;; - Unknowns diff --git a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc index 9ee9f17f0..22c6b0b27 100644 --- a/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/anonymous_function_types.jsonc @@ -8,7 +8,9 @@ [32, "(function process symbol)"] ], - "hud": [[15, "(function basic int basic event-message-block object)"]], + "hud": [ + [10, "(function none :behavior hud)"] + ], "main": [[4, "(function none :behavior process)"]], diff --git a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc index b2ff283d2..707ffef59 100644 --- a/decompiler/config/jak1_ntsc_black_label/label_types.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/label_types.jsonc @@ -777,6 +777,32 @@ ["L110", "uint64", true] ], + "hud-classes": [ + ["L279", "vector"], + ["L310", "vector"], + ["L318", "vector"] + ], + + "collectables": [ + ["L611", "(pointer float)", true, 1], + ["L649", "(pointer float)", true, 1], + ["L656", "(pointer float)", true, 1], + ["L657", "(pointer float)", true, 1], + ["L658", "(pointer float)", true, 1], + ["L660", "(pointer float)", true, 1], + ["L663", "(pointer float)", true, 1], + ["L585", "vector"], + ["L725", "float", true], + ["L726", "float", true], + ["L727", "float", true], + ["L728", "uint64", true], + ["L729", "uint64", true], + ["L730", "uint64", true], + ["L731", "uint64", true], + ["L732", "uint64", true], + ["L733", "uint64", true] + ], + // 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 5838dcaf1..9c7c9b261 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -2624,5 +2624,79 @@ [16, "vector"] ], + "(method 15 hud-money-all)": [ + [16, "font-context"] + ], + + "(method 20 hud-money-all)": [ + [16, "event-message-block"] + ], + + "(method 20 hud-money)": [ + [16, "event-message-block"] + ], + + "fuel-cell-hud-orbit-callback": [ + [16, "vector"], + [32, "vector"] + ], + + "(method 19 hud-fuel-cell)": [ + [16, "vector"] + ], + + "(method 20 hud-fuel-cell)": [ + [16, "event-message-block"], + [96, "quaternion"] + ], + + "hide-hud": [ + [16, "event-message-block"] + ], + + "hide-bottom-hud": [ + [16, "event-message-block"] + ], + + "disable-hud": [ + [16, "event-message-block"] + ], + + "enable-hud": [ + [16, "event-message-block"] + ], + + "hide-hud-quick": [ + [16, "event-message-block"] + ], + + "show-hud": [ + [16, "event-message-block"] + ], + + "convert-to-hud-object": [ + [16, "vector"] + ], + + "(method 16 hud)": [ + [16, "event-message-block"] + ], + + "(enter hud-hidden)": [ + [16, "event-message-block"] + ], + + "(enter hud-arriving)": [ + [16, "event-message-block"] + ], + + "send-hud-increment-event": [ + [16, "event-message-block"] + ], + + "(code hud-collecting)": [ + [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 5549049e9..3b87e2bcd 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -3767,5 +3767,103 @@ [7, "v1", "(inline-array joint-control-channel)"] ], + "(method 20 hud-money-all)": [ + [36, "a0", "process-drawable"], + [39, "v1", "process-drawable"], + [50, "v1", "process-drawable"], + [93, "v1", "process-drawable"] + ], + + "(method 20 hud-money)": [ + [35, "a0", "process-drawable"], + [38, "v1", "process-drawable"], + [49, "v1", "process-drawable"], + [92, "v1", "process-drawable"] + ], + + "(method 20 hud-fuel-cell)": [ + [100, "a0", "process-drawable"], + [103, "v1", "process-drawable"], + [114, "v1", "process-drawable"], + [157, "v1", "process-drawable"] + ], + + "part-hud-eco-timer-01-func": [ + [11, "v1", "uint"], + [15, "v1", "uint"] + ], + + "part-hud-eco-timer-02-func": [ + [11, "v1", "uint"], + [15, "v1", "uint"] + ], + + "part-hud-eco-timer-03-func": [ + [11, "v1", "uint"], + [15, "v1", "uint"] + ], + + "hide-bottom-hud": [ + [22, "v1", "(pointer hud)"] + ], + + "disable-hud": [ + [22, "a0", "(pointer hud)"], + [37, "v1", "(pointer hud)"], + [57, "v1", "(pointer hud)"] + ], + + "enable-hud": [ + [20, "v1", "(pointer hud)"] + ], + + "hide-hud-quick": [ + [20, "v1", "(pointer hud)"] + ], + + "set-hud-aspect-ratio": [ + [17, "v1", "(pointer hud)"] + ], + + "hud-hidden?": [ + [14, "v1", "(pointer hud)"] + ], + + "bottom-hud-hidden?": [ + [16, "v1", "(pointer hud)"] + ], + + "show-hud": [ + [31, "v1", "(pointer hud)"] + ], + + "fuel-cell-hud-orbit-callback": [ + [12, "s3", "hud-fuel-cell"], + [20, "s3", "hud-fuel-cell"] + ], + + "(method 15 hud-pickups)": [ + [51, "v1", "dma-packet"], + [52, "v1", "dma-packet"] + ], + + "(method 15 hud-fuel-cell)": [ + [51, "v1", "dma-packet"], + [52, "v1", "dma-packet"] + ], + + "(method 15 hud-money)": [ + [[50, 53], "v1", "dma-packet"] + ], + + "(method 15 hud-money-all)": [ + [[125, 128], "v1", "dma-packet"] + ], + + "(method 15 hud-buzzers)": [ + [58, "v1", "dma-packet"], + [59, "v1", "dma-packet"] + ], + "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 5135fecc0..e6de3e7f2 100644 --- a/decompiler/config/jak1_ntsc_black_label/var_names.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/var_names.jsonc @@ -3535,5 +3535,17 @@ "args":["obj", "art-name", "do-reload", "heap", "version"] }, + "(method 15 hud-money)": { + "vars": { + "v1-8": ["v1-8", "dma-packet"] + } + }, + + "(method 15 hud-money-all)": { + "vars": { + "v1-32": ["v1-32", "dma-packet"] + } + }, + "aaaaaaaaaaaaaaaaaaaaaaa": {} } diff --git a/goal_src/engine/game/collectables.gc b/goal_src/engine/game/collectables.gc index d7554afa8..9e39fc373 100644 --- a/goal_src/engine/game/collectables.gc +++ b/goal_src/engine/game/collectables.gc @@ -12,8 +12,8 @@ (define-extern *money-sg* skeleton-group) ;; unknown type ;; TODO - for entity and beach-rocks (deftype collectable (process-drawable) - ((root-override collide-shape-moving :score 100 :offset 112) - (pickup-type int32 :offset-assert 176) + ((root-override collide-shape-moving :score 100 :offset 112) + (pickup-type pickup-type :offset-assert 176) (pickup-amount float :offset-assert 180) (notify-parent basic :offset-assert 184) (old-base vector :inline :offset-assert 192) @@ -27,11 +27,11 @@ (bob-offset uint64 :offset-assert 288) (bob-amount float :offset-assert 296) (pickup-handle handle :offset-assert 304) ;; not sure it's a handle - (actor-pause basic :offset-assert 312) + (actor-pause symbol :offset-assert 312) ) (:methods - (dummy-20 () none 20) - (dummy-21 () none 21) + (TODO-RENAME-20 (_type_) _type_ 20) + (dummy-21 (_type_ uint float) none 21) ;; TODO - weird math issue ) :heap-base #xd0 @@ -40,12 +40,12 @@ :flag-assert #x1600d0013c ) (deftype eco-collectable (collectable) - ((eco-effect basic :offset-assert 316) - (collect-effect basic :offset-assert 320) - (collect-effect2 basic :offset-assert 324) + ((eco-effect sparticle-launch-group :offset-assert 316) + (collect-effect sparticle-launch-group :offset-assert 320) + (collect-effect2 sparticle-launch-group :offset-assert 324) (collect-effect-time uint64 :offset-assert 328) (respawn-delay uint64 :offset-assert 336) - (sound-name basic :offset-assert 344) + (sound-name sound-spec :offset-assert 344) (target uint64 :offset-assert 352) (suck-time uint64 :offset-assert 360) (suck-y-offset float :offset-assert 368) @@ -53,15 +53,15 @@ (movie-pos-index int32 :offset-assert 400) ) (:methods - (wait () none 22) ;; state - (pickup () none 23) ;; state - (die () none 24) ;; state - (dummy-25 () none 25) - (notice-blue () none 26) ;; state - (dummy-27 () none 27) - (dummy-28 () none 28) - (dummy-29 () none 29) - (dummy-30 () none 30) + (wait () _type_ :state 22) ;; state + (pickup () _type_ :state 23) ;; state + (die () _type_ :state 24) ;; state + (jump () _type_ :state 25) + (notice-blue () _type_ :state 26) ;; state + (get-pickup-sound (_type_ pickup-type) ambient-sound 27) + (dummy-28 (_type_ basic pickup-type float) none 28) + (update-sound! (_type_) none 29) ;; something to do with particles too + (blocked () _type_ :state 30) ) :heap-base #x130 :method-count-assert 31 @@ -69,8 +69,8 @@ :flag-assert #x1f01300194 ) (deftype fuel-cell (eco-collectable) - ((victory-anim basic :offset-assert 404) - (state-object basic :offset-assert 408)) + ((victory-anim spool-anim :offset-assert 404) + (state-object symbol :offset-assert 408)) :heap-base #x130 :method-count-assert 31 :size-assert #x19c diff --git a/goal_src/engine/sparticle/sparticle-h.gc b/goal_src/engine/sparticle/sparticle-h.gc index 8d41fb9a3..a37f98ce5 100644 --- a/goal_src/engine/sparticle/sparticle-h.gc +++ b/goal_src/engine/sparticle/sparticle-h.gc @@ -66,7 +66,7 @@ (next-time uint32 :offset-assert 116) (next-launcher basic :offset-assert 120) (cache-alpha float :offset-assert 124) - (valid basic :offset-assert 128) + (valid symbol :offset-assert 128) (key sparticle-launch-control :offset-assert 132) (binding sparticle-launch-state :offset-assert 136) (data uint32 1 :offset 12) diff --git a/goal_src/engine/ui/hud-classes.gc b/goal_src/engine/ui/hud-classes.gc index 7366f6901..a24c316b2 100644 --- a/goal_src/engine/ui/hud-classes.gc +++ b/goal_src/engine/ui/hud-classes.gc @@ -7,10 +7,2977 @@ (define-extern *fuelcell-naked-sg* skeleton-group) -;; TODO - for progress -(defun hud-hidden? () - #t +;; DECOMP BEGINS + +(set! + (-> *part-group-id-table* 75) + (new 'static 'sparticle-launch-group + :length 11 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-pickup" + :launcher + (new 'static 'inline-array sparticle-group-item 11 + (sp-item 303 :flags (launch-asap) :binding 304) + (sp-item 304 :flags (start-dead launch-asap) :binding 305) + (sp-item 305 :flags (start-dead launch-asap) :binding 306) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + ) + :bounds (new 'static 'sphere :w 8192.0) + ) ) -;; decomp begins +(set! + (-> *part-id-table* 303) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 10 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 32.0 92.0 1.0) + (sp-rnd-flt spt-g 128.0 128.0 1.0) + (sp-flt spt-a 0.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit3 bit9) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 304) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :page #x2)) + (sp-flt spt-num 1.0) + (sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0) + (sp-flt spt-z 122.88) + (sp-flt spt-scale-x (meters 2.5)) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 32.0 92.0 1.0) + (sp-rnd-flt spt-g 128.0 128.0 1.0) + (sp-flt spt-a 24.0) + (sp-rnd-flt spt-omega 0.0 65536.0 1.0) + (sp-rnd-flt spt-vel-x (meters 0.026666667) (meters 0.026666667) 1.0) + (sp-flt spt-vel-y (meters 0.0014814815)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-flt spt-rotvel-z (degrees 0.2)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit7 bit9) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 305) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :page #x2)) + (sp-flt spt-num 3.0) + (sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0) + (sp-flt spt-z 266.24) + (sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 32.0 92.0 1.0) + (sp-rnd-flt spt-g 128.0 128.0 1.0) + (sp-flt spt-a 24.0) + (sp-rnd-flt spt-omega 0.0 65536.0 1.0) + (sp-rnd-flt spt-vel-x (meters 0.017777778) (meters 0.017777778) 1.0) + (sp-flt spt-vel-y (meters 0.0)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-rnd-int-flt spt-rotvel-z (degrees -0.4) 1 145.63556) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit3 bit7 bit9) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 306) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 16 + (sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2)) + (sp-flt spt-num 1.0) + (sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0) + (sp-flt spt-z 491.52) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 255.0) + (sp-flt spt-a 24.0) + (sp-rnd-flt spt-omega 0.0 65536.0 1.0) + (sp-rnd-flt spt-vel-x (meters 0.053333335) (meters 0.053333335) 1.0) + (sp-flt spt-vel-y (meters 0.0)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3 bit7 bit9) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 307) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2)) + (sp-flt spt-num 0.25) + (sp-flt spt-scale-x (meters 0.35)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 255.0) + (sp-flt spt-g 255.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 96.0) + (sp-flt spt-scalevel-x (meters -0.0012500001)) + (sp-copy-from-other spt-scalevel-y -4) + (sp-flt spt-fade-r -2.125) + (sp-flt spt-accel-y -0.08192) + (sp-int-plain-rnd spt-timer 30 239 1) + (sp-cpuinfo-flags bit2 bit9) + (sp-int spt-next-time 120) + (sp-launcher-by-id spt-next-launcher 308) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 308) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 2 + (sp-flt spt-fade-r 0.0) + (sp-end) + ) + ) + ) + +(deftype hud-pickups (hud) + () + :heap-base #xb0 + :method-count-assert 27 + :size-assert #x118 + :flag-assert #x1b00b00118 + ) + + +(defmethod dummy-15 hud-pickups ((obj hud-pickups)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s4-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (-> obj value)) + (s4-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color bright-green) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-8 (the-as object (-> s5-0 base)))) + (set! (-> (the-as (pointer int64) v1-8)) #x20000000) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-pickups ((obj hud-pickups)) + (if *target* + (TODO-RENAME-16 + obj + (the int (+ 0.5 (-> *target* fact-info-target eco-pill))) + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-pickups ((obj hud-pickups) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 75) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 110.0) + (set! (-> obj particles s5-0 init-pos y) 55.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 118) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) -1) + (set! (-> obj friend) 3) + 0 + (none) + ) + +(set! + (-> *part-group-id-table* 76) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-health-1" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 309 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-group-id-table* 77) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-health-2" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 310 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-group-id-table* 78) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-health-3" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 311 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 309) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2d :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.7)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-health-01-func) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 310) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2e :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.7)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-health-03-func) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 311) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2f :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.7)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-health-02-func) + (sp-end) + ) + ) + ) + +(deftype hud-health (hud) + ((scale float :offset-assert 280) + ) + :heap-base #xb0 + :method-count-assert 27 + :size-assert #x11c + :flag-assert #x1b00b0011c + ) + + +(defun part-hud-health-01-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* health 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (cond + ((and *target* (< (-> *target* fact-info-target health) 1.0)) + (set! (-> arg2 prev-pos x) 32.0) + ) + (else + (let ((f0-3 128.0)) + (when (and *target* (= (-> *target* fact-info-target health) 1.0)) + (let ((v1-16 (logand (-> *display* integral-frame-counter) 7))) + (set! f0-3 (if (zero? (logand (-> *display* integral-frame-counter) 8)) + (+ 128.0 (* 18.142857 (the float v1-16))) + (- 255.0 (* 18.142857 (the float v1-16))) + ) + ) + ) + ) + (set! (-> arg2 pos y) f0-3) + (set! (-> arg2 pos z) f0-3) + (set! (-> arg2 pos w) f0-3) + ) + (set! (-> arg2 prev-pos x) 128.0) + ) + ) + 0 + (none) + ) + +(defun part-hud-health-02-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* health 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (if (and *target* (< (-> *target* fact-info-target health) 2.0)) + (set! (-> arg2 prev-pos x) 32.0) + (set! (-> arg2 prev-pos x) 128.0) + ) + 0 + (none) + ) + +(defun part-hud-health-03-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* health 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (if (and *target* (< (-> *target* fact-info-target health) 3.0)) + (set! (-> arg2 prev-pos x) 32.0) + (set! (-> arg2 prev-pos x) 128.0) + ) + 0 + (none) + ) + +(defmethod dummy-15 hud-health ((obj hud-health)) + ((method-of-type hud dummy-15) obj) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-health ((obj hud-health)) + (if *target* + (TODO-RENAME-16 + obj + (the int (-> *target* fact-info-target health)) + (the-as int (-> *target* fact-info-target health-pickup-time)) + ) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-health ((obj hud-health) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 76) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 61.0) + (set! (-> obj particles s5-0 init-pos y) 55.0) + (set! (-> obj particles s5-0 init-pos z) 5.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-1 part) + (create-launch-control (-> *part-group-id-table* 77) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 98.0) + (set! (-> obj particles s5-1 init-pos y) 55.0) + (set! (-> obj particles s5-1 init-pos z) 5.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-2 part) + (create-launch-control (-> *part-group-id-table* 78) obj) + ) + (set! (-> obj particles s5-2 init-pos x) 70.0) + (set! (-> obj particles s5-2 init-pos y) 76.0) + (set! (-> obj particles s5-2 init-pos z) 5.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) -1) + (set! (-> obj friend) 0) + 0 + (none) + ) + +(defmethod animate! hud-health ((obj hud-health) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj particles 0 init-pos x) 65.0) + (set! (-> obj particles 0 init-pos y) 55.0) + (set! (-> obj particles 1 init-pos x) 98.0) + (set! (-> obj particles 1 init-pos y) 55.0) + (set! (-> obj particles 2 init-pos x) 73.0) + (set! (-> obj particles 2 init-pos y) 80.0) + (set! (-> obj scale) 6144.0) + ) + (else + (set! (-> obj particles 0 init-pos x) 61.0) + (set! (-> obj particles 0 init-pos y) 55.0) + (set! (-> obj particles 1 init-pos x) 98.0) + (set! (-> obj particles 1 init-pos y) 55.0) + (set! (-> obj particles 2 init-pos x) 70.0) + (set! (-> obj particles 2 init-pos y) 76.0) + (set! (-> obj scale) 6963.2) + ) + ) + 0 + (none) + ) + +(set! + (-> *part-group-id-table* 705) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-orb-all" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 2964 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 2964) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-end) + ) + ) + ) + +(deftype hud-money-all (hud) + ((x-scale float :offset-assert 280) + (y-scale float :offset-assert 284) + (y-pos int32 :offset-assert 288) + (total-orbs int32 :offset-assert 292) + (level-index int32 :offset-assert 296) + (start-time uint64 :offset-assert 304) + ) + :heap-base #xd0 + :method-count-assert 27 + :size-assert #x138 + :flag-assert #x1b00d00138 + ) + + +(defmethod dummy-15 hud-money-all ((obj hud-money-all)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + 0 + (let ((s5-0 0)) + (when (>= (-> obj level-index) 0) + (let + ((s5-1 + (new + 'stack + 'font-context + *font-default-matrix* + (+ (* (-> obj x-sgn) (-> obj offset)) -60 (-> obj text-x)) + (+ + (/ + (* + (+ + (-> obj text-y) + (* (-> obj y-sgn) (-> obj offset)) + (-> obj y-offset) + ) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + -17 + ) + 0.0 + (font-color orange-red) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-12 s5-1)) + (set! (-> v1-12 width) (the float 228)) + ) + (let ((v1-13 s5-1)) + (set! (-> v1-13 height) (the float 45)) + ) + (let ((v1-14 s5-1)) + (set! (-> v1-14 scale) 0.6) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle left large)) + (print-game-text + (lookup-text! + *common-text* + (-> *level-task-data* (-> obj level-index) level-name-id) + #f + ) + s5-1 + #f + 128 + 18 + ) + ) + (set! s5-0 13) + ) + (let* ((s1-0 50) + (s3-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (s4-1 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~D/~D" + (-> obj total-orbs) + (-> obj total-orbs) + ) + (s2-0 + *temp-string* + s3-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset)) s1-0) + (+ + (/ + (* + (+ + (-> obj text-y) + (* (-> obj y-sgn) (-> obj offset)) + (-> obj y-offset) + ) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + s5-0 + ) + (font-color dark-yellow) + (font-flags shadow kerning middle large) + ) + ) + (let ((a3-12 (-> s3-0 base))) + (let ((v1-32 (the-as dma-packet (-> s3-0 base)))) + (set! (-> v1-32 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-32 vif0) (new 'static 'vif-tag)) + (set! (-> v1-32 vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-32) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-1 + (the-as (pointer dma-tag) a3-12) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-money-all ((obj hud-money-all)) + (when *target* + (hide-bottom-hud) + (when (!= *master-mode* 'pause) + (when (and (!= (-> obj icons 0) 0) (-> obj icons 0 icon)) + (set! (-> obj icons 0 scale-x) (-> obj x-scale)) + (set! (-> obj icons 0 scale-y) (-> obj y-scale)) + (set! + (-> obj icons 0 icon-y) + (* (-> obj y-pos) (the int (-> *video-parms* relative-y-scale))) + ) + (let ((a0-6 (-> obj icons 0 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-6 + (- (y-angle a0-6) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) + ) + ) + ) + ) + (if + (>= + (+ (-> *display* base-frame-counter) -1500) + (the-as int (-> obj start-time)) + ) + (set! (-> obj deactivate-when-hidden) #t) + (TODO-RENAME-16 obj (-> *display* base-frame-counter) 0) + ) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-money-all ((obj hud-money-all) (arg0 int)) + (with-pp + (when (< (-> obj nb-of-icons) 6) + (let ((s4-0 (-> obj nb-of-icons))) + (set! (-> obj icons s4-0) (new 'static 'hud-icon)) + (let* ((s2-0 (get-process *default-dead-pool* manipy #x4000)) + (s3-0 (when s2-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s2-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s2-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s2-0 ppointer) + ) + ) + ) + (when s3-0 + (set! + (-> (the-as process-drawable (-> s3-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (when #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'trans-hook) + (set! (-> a1-4 param 0) (the-as uint #f)) + (send-event-function (ppointer->process s3-0) a1-4) + ) + ) + ) + (set! (-> obj icons s4-0 icon) (the-as (pointer manipy) s3-0)) + (when s3-0 + (logior! (-> s3-0 0 mask) (process-mask pause)) + (logclear! (-> s3-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s3-0 0)) root trans z) 1024.0) + (set! (-> obj icons s4-0 icon-x) 170) + (set! (-> obj icons s4-0 icon-y) 0) + (set! (-> obj icons s4-0 icon-z) 0) + (set! (-> obj icons s4-0 scale-x) 0.0095) + (set! (-> obj icons s4-0 scale-y) -0.011) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s4-1 (-> obj nb-of-particles))) + (set! (-> obj particles s4-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s4-1 part) + (create-launch-control (-> *part-group-id-table* 705) obj) + ) + (set! (-> obj particles s4-1 init-pos x) 172.0) + (set! (-> obj particles s4-1 init-pos y) 330.0) + (set! (-> obj particles s4-1 init-pos z) 2.0) + (set! (-> obj particles s4-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (dotimes (s4-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s4-3 part matrix) -1) + (set! (-> obj particles s4-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 251) + (set! (-> obj text-y) 305) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) 1) + (hide-bottom-hud) + (let ((s4-4 0) + (s3-2 0) + (s2-2 0) + ) + (dotimes (s1-0 (length *level-task-data*)) + (let ((v1-83 (-> *level-task-data* s1-0))) + (when (!= v1-83 #f) + (when + (or + (= *kernel-boot-message* 'play) + (= (-> v1-83 level-name-id) (game-text-id misty-level-name)) + ) + (if (= s1-0 arg0) + (set! s2-2 (the-as int (-> *game-info* money-per-level s1-0))) + ) + (+! s3-2 (-> *game-info* money-per-level s1-0)) + (+! s4-4 (-> (get-game-count s1-0) money-count)) + ) + ) + ) + ) + (cond + ((= s3-2 s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj level-index) -1) + ) + ((begin + (set! (-> obj total-orbs) s2-2) + (< arg0 (length *level-task-data*)) + ) + (set! (-> obj level-index) arg0) + ) + (else + (set! (-> obj level-index) -1) + ) + ) + ) + (set! (-> obj start-time) (the-as uint (-> *display* base-frame-counter))) + (sound-play-by-name + (static-sound-name "get-all-orbs") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + 0 + (none) + ) + ) + +(defmethod + animate! + hud-money-all + ((obj hud-money-all) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj x-scale) 0.01845) + (set! (-> obj y-scale) -0.02175) + (set! (-> obj y-pos) (if arg1 + 374 + 373 + ) + ) + ) + (else + (set! (-> obj x-scale) 0.013499999) + (set! (-> obj y-scale) -0.01575) + (set! (-> obj y-pos) 361) + ) + ) + (when arg1 + (set! (-> obj x-scale) (* 1.02 (-> obj x-scale))) + (set! (-> obj y-scale) (* 1.2 (-> obj y-scale))) + (set! (-> obj y-pos) (the int (* 1.21 (the float (-> obj y-pos))))) + ) + 0 + (none) + ) + +(set! + (-> *part-group-id-table* 79) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-orb" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 312 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 312) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.6)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-end) + ) + ) + ) + +(deftype hud-money (hud) + ((x-scale float :offset-assert 280) + (y-scale float :offset-assert 284) + (y-pos int32 :offset-assert 288) + ) + :heap-base #xc0 + :method-count-assert 27 + :size-assert #x124 + :flag-assert #x1b00c00124 + ) + + +(defmethod dummy-15 hud-money ((obj hud-money)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s4-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (-> obj value)) + (s4-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color dark-yellow) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-8 (the-as dma-packet (-> s5-0 base)))) + (set! (-> v1-8 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-8 vif0) (new 'static 'vif-tag)) + (set! (-> v1-8 vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-money ((obj hud-money)) + (when *target* + (when (!= *master-mode* 'pause) + (when (and (!= (-> obj icons 0) 0) (-> obj icons 0 icon)) + (set! (-> obj icons 0 scale-x) (-> obj x-scale)) + (set! (-> obj icons 0 scale-y) (-> obj y-scale)) + (set! + (-> obj icons 0 icon-y) + (* (-> obj y-pos) (the int (-> *video-parms* relative-y-scale))) + ) + (let ((a0-6 (-> obj icons 0 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-6 + (- (y-angle a0-6) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) + ) + ) + ) + ) + (TODO-RENAME-16 obj (the int (+ 0.5 (-> *target* game money))) 0) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-money ((obj hud-money) (arg0 int)) + (with-pp + (when (< (-> obj nb-of-icons) 6) + (let ((s5-0 (-> obj nb-of-icons))) + (set! (-> obj icons s5-0) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (when #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'trans-hook) + (set! (-> a1-4 param 0) (the-as uint #f)) + (send-event-function (ppointer->process s4-0) a1-4) + ) + ) + ) + (set! (-> obj icons s5-0 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 1024.0) + (set! (-> obj icons s5-0 icon-x) 399) + (set! (-> obj icons s5-0 icon-y) 79) + (set! (-> obj icons s5-0 icon-z) 0) + (set! (-> obj icons s5-0 scale-x) 0.0095) + (set! (-> obj icons s5-0 scale-y) -0.011) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-1 part) + (create-launch-control (-> *part-group-id-table* 79) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 400.0) + (set! (-> obj particles s5-1 init-pos y) 58.0) + (set! (-> obj particles s5-1 init-pos z) 2.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 420) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + 0 + (none) + ) + ) + +(defmethod animate! hud-money ((obj hud-money) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj x-scale) 0.0123) + (set! (-> obj y-scale) -0.0145) + (set! (-> obj y-pos) 86) + ) + (else + (set! (-> obj x-scale) 0.0095) + (set! (-> obj y-scale) -0.011) + (set! (-> obj y-pos) 79) + ) + ) + (when arg1 + (set! (-> obj x-scale) (* 1.1 (-> obj x-scale))) + (set! (-> obj y-scale) (* 1.2 (-> obj y-scale))) + (set! (-> obj y-pos) (the int (* (the float (-> obj y-pos)) (if arg0 + 0.95 + 0.9 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod first-icon-x hud-money ((obj hud-money)) + (-> obj icons 0 icon-x) + ) + +(defmethod first-icon-y hud-money ((obj hud-money)) + (-> obj icons 0 icon-y) + ) + +(defmethod inc-value hud-money ((obj hud-money)) + 0.01 + ) + +(defmethod dec-value hud-money ((obj hud-money)) + -0.011 + ) + +(let + ((v1-24 + (new 'static 'skeleton-group + :art-group-name "fuelcell-naked" + :bounds + (new 'static 'vector :y 4096.0 :w 6553.6) + :texture-level 2 + :version #x6 + ) + ) + ) + (set! (-> v1-24 jgeo) 0) + (set! (-> v1-24 janim) 2) + (set! (-> v1-24 mgeo 0) (the-as uint 1)) + (set! (-> v1-24 lod-dist 0) 4095996000.0) + (set! *fuelcell-naked-sg* v1-24) + ) + +(set! + (-> *part-id-table* 313) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 4.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 314) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 5.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 315) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 6.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 316) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 7.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 317) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 9.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 318) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'fuel-cell-hud-center-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-group-id-table* 80) + (new 'static 'sparticle-launch-group + :length 10 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name "group-part-hud-power-cell-whole" + :launcher + (new 'static 'inline-array sparticle-group-item 10 + (sp-item 318 :flags (launch-asap)) + (sp-item 319 :fade-after (meters 35.0)) + (sp-item 320 :fade-after (meters 20.0)) + (sp-item 321 :flags (launch-asap) :period 3600 :length 5) + (sp-item 322 :flags (launch-asap) :period 3600 :length 5) + (sp-item 317 :flags (launch-asap)) + (sp-item 313 :flags (launch-asap)) + (sp-item 314 :flags (launch-asap)) + (sp-item 315 :flags (launch-asap)) + (sp-item 316 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 323) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 2 + (sp-flt spt-fade-a -0.53333336) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 319) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 20 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) + (sp-flt spt-num 0.5) + (sp-flt spt-z 92160.0) + (sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.5) 1.0) + (sp-int spt-rot-x 4) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-rnd-flt spt-scale-y (meters 0.1) (meters 0.8) 1.0) + (sp-rnd-int spt-r 0 1 255.0) + (sp-rnd-int spt-g 0 1 255.0) + (sp-rnd-int spt-b 0 1 255.0) + (sp-flt spt-a 0.0) + (sp-flt spt-scalevel-x (meters 0.009765625)) + (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) + (sp-flt spt-scalevel-y (meters 0.009765625)) + (sp-flt spt-fade-a 0.35555556) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-int spt-next-time 90) + (sp-launcher-by-id spt-next-launcher 232) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 320) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 19 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) + (sp-flt spt-num 0.06) + (sp-flt spt-z 92160.0) + (sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.5) 1.0) + (sp-int spt-rot-x 4) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-flt spt-scale-y (meters 0.2)) + (sp-rnd-int spt-r 0 1 255.0) + (sp-rnd-int spt-g 0 1 255.0) + (sp-rnd-int spt-b 0 1 255.0) + (sp-flt spt-a 0.0) + (sp-flt spt-scalevel-x (meters 0.009765625)) + (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) + (sp-flt spt-fade-a 0.32) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-int spt-next-time 75) + (sp-launcher-by-id spt-next-launcher 232) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 321) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-z 92160.0) + (sp-flt spt-scale-x (meters 3.3)) + (sp-flt spt-rot-z (degrees 0.0)) + (sp-flt spt-scale-y (meters 2.8)) + (sp-flt spt-r 192.0) + (sp-flt spt-g 192.0) + (sp-rnd-flt spt-b 0.0 128.0 1.0) + (sp-flt spt-a 64.0) + (sp-flt spt-rotvel-z (degrees -0.4)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-func spt-func 'fuel-cell-hud-starburst-3-callback) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 322) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-z 92160.0) + (sp-flt spt-scale-x (meters 3.8)) + (sp-flt spt-rot-z (degrees 0.0)) + (sp-flt spt-scale-y (meters 3.3)) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 64.0) + (sp-flt spt-rotvel-z (degrees 0.3)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-func spt-func 'fuel-cell-hud-starburst-4-callback) + (sp-end) + ) + ) + ) + +(deftype hud-fuel-cell (hud) + ((scale-starburst-3-x float :offset-assert 280) + (scale-starburst-3-y float :offset-assert 284) + (scale-starburst-4-x float :offset-assert 288) + (scale-starburst-4-y float :offset-assert 292) + (scale-icon float :offset-assert 296) + (scale-center float :offset-assert 300) + (icon-pos-y int32 :offset-assert 304) + ) + :heap-base #xd0 + :method-count-assert 27 + :size-assert #x134 + :flag-assert #x1b00d00134 + ) + + +(defmethod dummy-15 hud-fuel-cell ((obj hud-fuel-cell)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s4-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (-> obj value)) + (s4-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color dark-yellow) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-8 (the-as object (-> s5-0 base)))) + (set! (-> (the-as (pointer int64) v1-8)) #x20000000) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +(defun + fuel-cell-hud-orbit-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((s3-0 (-> arg1 key proc)) + (v1-1 (the int (-> arg1 user-float))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! + s5-0 + (-> (the-as hud-fuel-cell s3-0) icons 0 icon 0 node-list data v1-1) + ) + (vector<-cspace! + s4-0 + (-> (the-as hud-fuel-cell s3-0) icons 0 icon 0 node-list data 3) + ) + (vector-! s5-0 s5-0 s4-0) + ) + (set! (-> arg2 vector 0 x) (* 60.0 (-> s5-0 x))) + (set! (-> arg2 vector 0 y) (* 60.0 (-> s5-0 y))) + (set! (-> arg2 vector 0 z) (* 1024.0 (-> s5-0 z))) + ) + 0 + (none) + ) + +(defun + fuel-cell-hud-starburst-3-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 vector 0 w) (-> *hud-parts* fuel-cell 0 scale-starburst-3-x)) + (set! (-> arg2 vector 1 w) (-> *hud-parts* fuel-cell 0 scale-starburst-3-y)) + 0 + (none) + ) + +(defun + fuel-cell-hud-starburst-4-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 vector 0 w) (-> *hud-parts* fuel-cell 0 scale-starburst-4-x)) + (set! (-> arg2 vector 1 w) (-> *hud-parts* fuel-cell 0 scale-starburst-4-y)) + 0 + (none) + ) + +(defun + fuel-cell-hud-center-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((f0-0 (-> *hud-parts* fuel-cell 0 scale-icon)) + (f1-0 (-> *hud-parts* fuel-cell 0 scale-center)) + ) + (set-vector! + (-> *hud-parts* fuel-cell 0 icons 0 icon 0 root scale) + f0-0 + f0-0 + f0-0 + 1.0 + ) + (set! (-> arg2 vector 0 w) f1-0) + (set! (-> arg2 vector 1 w) f1-0) + ) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-fuel-cell ((obj hud-fuel-cell)) + (when *target* + (when (!= *master-mode* 'pause) + (let ((a0-2 (-> obj icons 0 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-2 + (+ (y-angle a0-2) (* 182.04445 (* 0.5 (-> *display* time-adjust-ratio)))) + ) + ) + ) + (set! (-> obj icons 0 icon-y) (-> obj icon-pos-y)) + (TODO-RENAME-16 obj (the int (+ 0.5 (-> *target* game fuel))) 0) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector<-cspace! s5-1 (-> obj icons 0 icon 0 node-list data 3)) + (set! (-> obj particles 0 pos x) (-> s5-1 x)) + (set! (-> obj particles 0 pos y) (* 0.5 (-> s5-1 y))) + (set! (-> obj particles 0 pos z) (+ 2.0 (* 0.05 (+ -2048.0 (-> s5-1 z))))) + ) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-fuel-cell ((obj hud-fuel-cell) (arg0 int)) + (with-pp + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 80) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 256.0) + (set! (-> obj particles s5-0 init-pos y) 224.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (when (< (-> obj nb-of-icons) 6) + (let ((s5-2 (-> obj nb-of-icons))) + (set! (-> obj icons s5-2) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-3 (method-of-type manipy activate))) + (t9-3 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *fuelcell-naked-sg* + #f + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.009 + 0.009 + 0.009 + 1.0 + ) + (when #f + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) pp) + (set! (-> a1-5 num-params) 1) + (set! (-> a1-5 message) 'trans-hook) + (set! (-> a1-5 param 0) (the-as uint #f)) + (send-event-function (ppointer->process s4-0) a1-5) + ) + ) + ) + (set! (-> obj icons s5-2 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 2048.0) + (set! (-> obj icons s5-2 icon-x) 256) + (set! (-> obj icons s5-2 icon-y) 62) + (set! (-> obj icons s5-2 icon-z) 0) + (set! (-> obj icons s5-2 scale-x) 0.009) + (set! (-> obj icons s5-2 scale-y) 0.009) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (set! (-> obj text-x) 276) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + (set! (-> obj skip-particle) -2) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (let ((s5-4 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! s5-4 0.0 1.0 0.0 16384.0) + (quaternion*! + (-> obj icons 0 icon 0 root quat) + s5-4 + (-> obj icons 0 icon 0 root quat) + ) + ) + 0 + (none) + ) + ) + +(defmethod + animate! + hud-fuel-cell + ((obj hud-fuel-cell) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj scale-starburst-3-x) 10240.0) + (set! (-> obj scale-starburst-3-y) 9420.8) + (set! (-> obj scale-starburst-4-x) 9420.8) + (set! (-> obj scale-starburst-4-y) 8192.0) + (set! (-> obj scale-icon) 0.007) + (set! (-> obj scale-center) 6144.0) + (set! (-> obj icon-pos-y) 62) + ) + (else + (set! (-> obj scale-starburst-3-x) 12288.0) + (set! (-> obj scale-starburst-3-y) 10240.0) + (set! (-> obj scale-starburst-4-x) 12288.0) + (set! (-> obj scale-starburst-4-y) 10240.0) + (set! (-> obj scale-icon) 0.009) + (set! (-> obj scale-center) 7372.8) + (set! (-> obj icon-pos-y) 62) + ) + ) + (if arg1 + (set! (-> obj icon-pos-y) (the int (* (the float (-> obj icon-pos-y)) (if arg0 + 1.1 + 1.14 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(set! + (-> *part-group-id-table* 81) + (new 'static 'sparticle-launch-group + :length 2 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-buzzer" + :launcher + (new 'static 'inline-array sparticle-group-item 2 + (sp-item 324 :flags (launch-asap) :binding 325) + (sp-item 325 :flags (start-dead launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 324) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 0.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 325) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-x (meters 0.0)) + (sp-flt spt-y (meters 1.3333334)) + (sp-flt spt-z 409.6) + (sp-flt spt-scale-x (meters 1.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-flt spt-omega 0.0) + (sp-flt spt-vel-x (meters 0.053333335)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit7 bit9) + (sp-func spt-func 'part-hud-buzzer-func) + (sp-end) + ) + ) + ) + +(deftype hud-buzzers (hud) + ((scale float :offset-assert 280) + (text-y-offset int32 :offset-assert 284) + ) + :heap-base #xb0 + :method-count-assert 27 + :size-assert #x120 + :flag-assert #x1b00b00120 + ) + + +(defun part-hud-buzzer-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* buzzers 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (none) + ) + +(defmethod dummy-15 hud-buzzers ((obj hud-buzzers)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (set! (-> obj text-y) (+ (if (nonzero? (-> obj next-y-offset)) + (-> obj text-y-offset) + 0 + ) + 362 + ) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s3-0 draw-string-xy)) + (format (clear *temp-string*) "~2,' D" (-> obj value)) + (s3-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color dark-yellow) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-11 (the-as object (-> s5-0 base)))) + (set! (-> (the-as (pointer int64) v1-11)) #x20000000) + (set! (-> (the-as dma-packet v1-11) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-11) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-11) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-buzzers ((obj hud-buzzers)) + (if *target* + (TODO-RENAME-16 + obj + (the int (+ 0.5 (-> *target* fact-info-target buzzer))) + 0 + ) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-buzzers ((obj hud-buzzers) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 81) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 60.0) + (set! (-> obj particles s5-0 init-pos y) 380.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (set! (-> obj text-x) 85) + (set! (-> obj text-y) 362) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) 1) + (set! (-> obj text-y-offset) 0) + (set! (-> obj increment-on-event) #t) + 0 + (none) + ) + +(defmethod first-icon-x hud-buzzers ((obj hud-buzzers)) + (-> obj text-x) + ) + +(defmethod first-icon-y hud-buzzers ((obj hud-buzzers)) + (+ (if (= (-> *setting-control* current video-mode) 'pal) + (+ (-> obj text-y) 120) + (+ (-> obj text-y) 50) + ) + (-> obj next-y-offset) + ) + ) + +(defmethod inc-value hud-buzzers ((obj hud-buzzers)) + 0.008 + ) + +(defmethod dec-value hud-buzzers ((obj hud-buzzers)) + -0.008 + ) + +(defmethod animate! hud-buzzers ((obj hud-buzzers) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj scale) 6553.6) + (set! (-> obj text-y-offset) -40) + ) + (else + (set! (-> obj scale) 7372.8) + (set! (-> obj text-y-offset) 0) + 0 + ) + ) + 0 + (none) + ) + +(set! + (-> *part-group-id-table* 82) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-eco-timer" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 327 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-group-id-table* 83) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-eco-timer-backing" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 328 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 327) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2b :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 3.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-func) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 328) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 100.0) + (sp-flt spt-b 63.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-backing-func) + (sp-end) + ) + ) + ) + +(set! + (-> *part-group-id-table* 84) + (new 'static 'sparticle-launch-group + :length 3 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name "group-part-hud-timer-blue" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (sp-item 329 :flags (launch-asap)) + (sp-item 330 :flags (launch-asap)) + (sp-item 331 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +(set! + (-> *part-id-table* 329) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 0.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-01-func) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 330) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 0.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-02-func) + (sp-end) + ) + ) + ) + +(set! + (-> *part-id-table* 331) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 0.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-03-func) + (sp-end) + ) + ) + ) + +(deftype hud-power (hud) + ((scale-timer float :offset-assert 280) + (scale-backing float :offset-assert 284) + (scale-blue float :offset-assert 288) + ) + :heap-base #xc0 + :method-count-assert 27 + :size-assert #x124 + :flag-assert #x1b00c00124 + ) + + +(defun + calculate-rotation-and-color-for-slice + ((arg0 int) (arg1 float) (arg2 int) (arg3 int) (arg4 int) (arg5 hud-particle)) + (cond + ((>= 0.0 arg1) + (set! (-> arg5 init-pos w) -16566.045) + ) + (else + (let ((v1-1 arg0)) + (cond + ((zero? v1-1) + (if (< 1.0 arg1) + (set! (-> arg5 init-pos w) 910.2222) + (set! (-> arg5 init-pos w) (* 182.04445 (+ 5.0 (* 263.0 (- 1.0 arg1))))) + ) + ) + ((= v1-1 1) + (if (< 0.6666667 arg1) + (set! (-> arg5 init-pos w) 17294.223) + (set! + (-> arg5 init-pos w) + (* 182.04445 (+ 95.0 (* 173.0 (- 1.0 (* 1.5 arg1))))) + ) + ) + ) + ((= v1-1 2) + (if (< 0.33333334 arg1) + (set! (-> arg5 init-pos w) 33678.223) + (set! + (-> arg5 init-pos w) + (* 182.04445 (+ 185.0 (* 83.0 (- 1.0 (* 3.0 arg1))))) + ) + ) + ) + ) + ) + ) + ) + (if + (and + (< 0.0 arg1) + (and (< arg1 0.2) (zero? (logand (-> *display* integral-frame-counter) 4))) + ) + (set! arg3 (* arg3 2)) + ) + (set! (-> arg5 pos y) (the float arg2)) + (set! (-> arg5 pos z) (the float arg3)) + (set! (-> arg5 pos w) (the float arg4)) + 0 + (none) + ) + +(defun part-hud-eco-timer-01-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let + ((f0-2 + (/ + (the + float + (the-as + uint + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + ) + (the float (the-as uint (-> *FACT-bank* eco-full-timeout))) + ) + ) + (a2-1 0) + (a3-0 64) + (t0-0 128) + ) + (case (-> *target* fact-info-target eco-type) + ((1) + (set! a2-1 128) + (set! a3-0 96) + (set! t0-0 0) + ) + ((2) + (set! a2-1 128) + (set! a3-0 32) + (set! t0-0 0) + ) + ((4) + (set! a2-1 0) + (set! a3-0 128) + (set! t0-0 32) + ) + ) + (calculate-rotation-and-color-for-slice 0 f0-2 a2-1 a3-0 t0-0 arg2) + ) + (let ((f0-3 (-> *hud-parts* power 0 scale-blue))) + (set! (-> arg2 init-pos x) f0-3) + (set! (-> arg2 pos x) f0-3) + ) + 0 + (none) + ) + +(defun part-hud-eco-timer-02-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let + ((f0-2 + (/ + (the + float + (the-as + uint + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + ) + (the float (the-as uint (-> *FACT-bank* eco-full-timeout))) + ) + ) + (a2-1 0) + (a3-0 64) + (t0-0 128) + ) + (case (-> *target* fact-info-target eco-type) + ((1) + (set! a2-1 128) + (set! a3-0 96) + (set! t0-0 0) + ) + ((2) + (set! a2-1 128) + (set! a3-0 32) + (set! t0-0 0) + ) + ((4) + (set! a2-1 0) + (set! a3-0 128) + (set! t0-0 32) + ) + ) + (calculate-rotation-and-color-for-slice 1 f0-2 a2-1 a3-0 t0-0 arg2) + ) + (let ((f0-3 (-> *hud-parts* power 0 scale-blue))) + (set! (-> arg2 init-pos x) f0-3) + (set! (-> arg2 pos x) f0-3) + ) + 0 + (none) + ) + +(defun part-hud-eco-timer-03-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let + ((f0-2 + (/ + (the + float + (the-as + uint + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + ) + (the float (the-as uint (-> *FACT-bank* eco-full-timeout))) + ) + ) + (a2-1 0) + (a3-0 64) + (t0-0 128) + ) + (case (-> *target* fact-info-target eco-type) + ((1) + (set! a2-1 128) + (set! a3-0 96) + (set! t0-0 0) + ) + ((2) + (set! a2-1 128) + (set! a3-0 32) + (set! t0-0 0) + ) + ((4) + (set! a2-1 0) + (set! a3-0 128) + (set! t0-0 32) + ) + ) + (calculate-rotation-and-color-for-slice 2 f0-2 a2-1 a3-0 t0-0 arg2) + ) + (let ((f0-3 (-> *hud-parts* power 0 scale-blue))) + (set! (-> arg2 init-pos x) f0-3) + (set! (-> arg2 pos x) f0-3) + ) + 0 + (none) + ) + +(defun + part-hud-eco-timer-backing-func + ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* power 0 scale-backing))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + 0 + (none) + ) + +(defun part-hud-eco-timer-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* power 0 scale-timer))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + 0 + (none) + ) + +(defmethod TODO-RENAME-19 hud-power ((obj hud-power)) + (if *target* + (TODO-RENAME-16 + obj + (max + 0 + (min + (the-as + int + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + (the-as int (-> *target* fact-info-target eco-timeout)) + ) + ) + (the-as int (-> *target* fact-info-target eco-timeout)) + ) + ) + 0 + (none) + ) + +(defmethod init-particles! hud-power ((obj hud-power) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 83) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 435.0) + (set! (-> obj particles s5-0 init-pos y) 370.0) + (set! (-> obj particles s5-0 init-pos z) 10.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-1 part) + (create-launch-control (-> *part-group-id-table* 84) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 432.0) + (set! (-> obj particles s5-1 init-pos y) 368.0) + (set! (-> obj particles s5-1 init-pos z) 3.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-2 part) + (create-launch-control (-> *part-group-id-table* 82) obj) + ) + (set! (-> obj particles s5-2 init-pos x) 435.0) + (set! (-> obj particles s5-2 init-pos y) 370.0) + (set! (-> obj particles s5-2 init-pos z) 2.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) 1) + 0 + (none) + ) + +(defmethod animate! hud-power ((obj hud-power) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj scale-blue) 7168.0) + (set! (-> obj scale-timer) 11468.8) + (set! (-> obj scale-backing) 8960.0) + ) + (else + (set! (-> obj scale-blue) 8192.0) + (set! (-> obj scale-timer) 13107.2) + (set! (-> obj scale-backing) 10240.0) + ) + ) + 0 + (none) + ) + +(defun activate-hud ((arg0 process)) + (let ((s5-0 (get-process *default-dead-pool* hud-pickups #x4000))) + (set! (-> *hud-parts* pickups) (the-as (pointer hud-pickups) (when s5-0 + (let + ((t9-1 + (method-of-type + hud-pickups + activate + ) + ) + ) + (t9-1 + (the-as + hud-pickups + s5-0 + ) + arg0 + 'hud-pickups + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-0 + hud-init-by-other + 0 + ) + (-> + s5-0 + ppointer + ) + ) + ) + ) + ) + (let ((s5-1 (get-process *default-dead-pool* hud-money #x4000))) + (set! (-> *hud-parts* money) (the-as (pointer hud-money) (when s5-1 + (let + ((t9-4 + (method-of-type + hud-money + activate + ) + ) + ) + (t9-4 + (the-as + hud-money + s5-1 + ) + arg0 + 'hud-money + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-1 + hud-init-by-other + 0 + ) + (-> s5-1 ppointer) + ) + ) + ) + ) + (let ((s5-2 (get-process *default-dead-pool* hud-fuel-cell #x4000))) + (set! (-> *hud-parts* fuel-cell) (the-as (pointer hud-fuel-cell) (when s5-2 + (let + ((t9-7 + (method-of-type + hud-fuel-cell + activate + ) + ) + ) + (t9-7 + (the-as + hud-fuel-cell + s5-2 + ) + arg0 + 'hud-fuel-cell + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-2 + hud-init-by-other + 0 + ) + (-> + s5-2 + ppointer + ) + ) + ) + ) + ) + (let ((s5-3 (get-process *default-dead-pool* hud-health #x4000))) + (set! (-> *hud-parts* health) (the-as (pointer hud-health) (when s5-3 + (let + ((t9-10 + (method-of-type + hud-health + activate + ) + ) + ) + (t9-10 + (the-as + hud-health + s5-3 + ) + arg0 + 'hud-health + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-3 + hud-init-by-other + 0 + ) + (-> + s5-3 + ppointer + ) + ) + ) + ) + ) + (let ((s5-4 (get-process *default-dead-pool* hud-buzzers #x4000))) + (set! (-> *hud-parts* buzzers) (the-as (pointer hud-buzzers) (when s5-4 + (let + ((t9-13 + (method-of-type + hud-buzzers + activate + ) + ) + ) + (t9-13 + (the-as + hud-buzzers + s5-4 + ) + arg0 + 'hud-buzzers + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-4 + hud-init-by-other + 0 + ) + (-> + s5-4 + ppointer + ) + ) + ) + ) + ) + (let ((s5-5 (get-process *default-dead-pool* hud-power #x4000))) + (set! (-> *hud-parts* power) (the-as (pointer hud-power) (when s5-5 + (let + ((t9-16 + (method-of-type + hud-power + activate + ) + ) + ) + (t9-16 + (the-as + hud-power + s5-5 + ) + arg0 + 'hud-power + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-5 + hud-init-by-other + 0 + ) + (-> s5-5 ppointer) + ) + ) + ) + ) + (set! (-> *hud-parts* bike-speed) (the-as (pointer hud-bike-speed) #f)) + (set! (-> *hud-parts* bike-heat) (the-as (pointer hud-bike-heat) #f)) + (set! (-> *hud-parts* money-all) (the-as (pointer hud-money-all) #f)) + 0 + (none) + ) + +(defun hide-hud () + (with-pp + (when *target* + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'hide) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun hide-bottom-hud () + (with-pp + (when *target* + (dotimes (gp-0 4) + (when (-> *hud-parts* parts (+ gp-0 4)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'hide) + (send-event-function + (ppointer->process (-> *hud-parts* parts (+ gp-0 4))) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun disable-hud ((arg0 int)) + (with-pp + (when *target* + (dotimes (s5-0 9) + (when (-> *hud-parts* parts s5-0) + (when + (or + (!= (-> *hud-parts* parts s5-0) arg0) + (zero? (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0 value)) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) pp) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'hide) + (send-event-function + (ppointer->process (-> *hud-parts* parts s5-0)) + a1-1 + ) + ) + ) + (when (!= (-> *hud-parts* parts s5-0) arg0) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) pp) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'disable) + (send-event-function + (ppointer->process (-> *hud-parts* parts s5-0)) + a1-2 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun enable-hud () + (with-pp + (when *target* + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'enable) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun hide-hud-quick () + (with-pp + (when *target* + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'hide-quick) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun show-hud () + (with-pp + (when + (and + *target* + (or (not *progress-process*) (hidden? (-> *progress-process* 0))) + ) + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'show) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +(defun set-hud-aspect-ratio ((arg0 symbol) (arg1 symbol)) + (let ((gp-0 (= arg0 'aspect16x9)) + (s5-0 (= arg1 'pal)) + ) + (when *target* + (dotimes (s4-0 9) + (if (-> *hud-parts* parts s4-0) + (animate! + (-> (the-as (pointer hud) (-> *hud-parts* parts s4-0)) 0) + gp-0 + s5-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defun hud-hidden? () + (local-vars (gp-0 symbol)) + (cond + (*target* + (set! gp-0 #t) + (dotimes (s5-0 9) + (when (-> *hud-parts* parts s5-0) + (if + (not + (dummy-14 (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0)) + ) + (set! gp-0 #f) + ) + ) + ) + ) + (else + (set! gp-0 #t) + ) + ) + gp-0 + ) + +(defun bottom-hud-hidden? () + (local-vars (gp-0 symbol)) + (cond + (*target* + (set! gp-0 #t) + (dotimes (s5-0 4) + (when (-> *hud-parts* parts (+ s5-0 4)) + (if + (not + (dummy-14 + (-> (the-as (pointer hud) (-> *hud-parts* parts (+ s5-0 4))) 0) + ) + ) + (set! gp-0 #f) + ) + ) + ) + ) + (else + (set! gp-0 #t) + ) + ) + gp-0 + ) + +(defun activate-orb-all ((arg0 int)) + (when (not (-> *hud-parts* money-all)) + (let ((s5-0 (get-process *default-dead-pool* hud-money-all #x4000))) + (set! (-> *hud-parts* money-all) (the-as (pointer hud-money-all) (when s5-0 + (let + ((t9-1 + (method-of-type + hud-money-all + activate + ) + ) + ) + (t9-1 + (the-as + hud-money-all + s5-0 + ) + *target* + 'hud-money-all + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-0 + hud-init-by-other + arg0 + ) + (-> + s5-0 + ppointer + ) + ) + ) + ) + ) + ) + 0 + ) + +(defbehavior convert-to-hud-object hud ((arg0 process-drawable) (arg1 hud)) + (when arg1 + (logclear! (-> arg0 mask) (process-mask actor-pause)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (transform-point-vector-scale! s4-0 (-> arg0 root trans)) + (set! (-> arg0 root trans x) (+ -2048.0 (-> s4-0 x))) + (set! (-> arg0 root trans y) (* 2.0 (+ -2048.0 (-> s4-0 y)))) + ) + (set! (-> arg0 root trans z) 9999999.0) + (set! (-> arg0 root trans w) 1.0) + (set-vector! + (-> arg0 root scale) + (inc-value arg1) + (dec-value arg1) + (inc-value arg1) + 1.0 + ) + (set! (-> arg0 draw dma-add-func) dma-add-process-drawable-hud) + (go hud-collecting (process->handle arg1)) + ) + 0 + (none) + ) + + + diff --git a/goal_src/engine/ui/hud-h.gc b/goal_src/engine/ui/hud-h.gc index c171542e1..f9d70cd91 100644 --- a/goal_src/engine/ui/hud-h.gc +++ b/goal_src/engine/ui/hud-h.gc @@ -12,10 +12,10 @@ ;; TODO - for process-taskable (define-extern hud-hidden? (function symbol)) -(defun-extern activate-hud process none) -(defun-extern activate-orb-all int int) -(defun-extern hide-bottom-hud none) -(defun-extern bottom-hud-hidden? symbol) +(define-extern activate-hud (function process none)) +(define-extern activate-orb-all (function int int)) +(define-extern hide-bottom-hud (function none)) +(define-extern bottom-hud-hidden? (function symbol)) (declare-type hud process) (declare-type hud-pickups hud) @@ -70,12 +70,12 @@ (text-x int32 :offset-assert 164) (text-y int32 :offset-assert 168) (friend int32 :offset-assert 172) - (first-init basic :offset-assert 176) - (increment-on-event basic :offset-assert 180) + (first-init symbol :offset-assert 176) + (increment-on-event symbol :offset-assert 180) (skip-particle int32 :offset-assert 184) - (disable basic :offset-assert 188) - (force-on-screen basic :offset-assert 192) - (deactivate-when-hidden basic :offset-assert 196) + (disable symbol :offset-assert 188) + (force-on-screen symbol :offset-assert 192) + (deactivate-when-hidden symbol :offset-assert 196) (trigger-time uint64 :offset-assert 200) (last-hide-time uint64 :offset-assert 208) (nb-of-icons int32 :offset-assert 216) @@ -89,33 +89,34 @@ :size-assert #x118 :flag-assert #x1b00b00118 (:methods - (dummy-14 () none 14) - (dummy-15 () none 15) - (dummy-16 (_type_ int int) none 16) - (dummy-17 () none 17) - (dummy-18 () none 18) + (dummy-14 (_type_) none 14) + (dummy-15 (_type_) none 15) + (TODO-RENAME-16 (_type_ int int) none 16) + (dummy-17 (_type_) none 17) + (dummy-18 (_type_) none 18) (TODO-RENAME-19 (_type_) none 19) - (init-particles! (_type_) none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) - (dummy-23 () none 23) - (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) + (init-particles! (_type_ int) none 20) + (first-icon-x (_type_) int 21) + (first-icon-y (_type_) int 22) + (dummy-23 (_type_) none 23) + (animate! (_type_ symbol symbol) none 24) + (inc-value (_type_) float 25) + (dec-value (_type_) float 26) ) ) (deftype hud-parts (structure) - ((pickups (pointer hud-pickups) :offset-assert 0) - (money (pointer hud-money) :offset-assert 4) - (fuel-cell (pointer hud-fuel-cell) :offset-assert 8) - (health (pointer hud-health) :offset-assert 12) - (buzzers (pointer hud-buzzers) :offset-assert 16) - (power (pointer hud-power) :offset-assert 20) - (bike-speed (pointer hud-bike-speed) :offset-assert 24) - (bike-heat (pointer hud-bike-heat) :offset-assert 28) - (money-all (pointer hud-money-all) :offset-assert 32) + ((pickups (pointer hud-pickups) :offset-assert 0) + (money (pointer hud-money) :offset-assert 4) + (fuel-cell (pointer hud-fuel-cell) :offset-assert 8) + (health (pointer hud-health) :offset-assert 12) + (buzzers (pointer hud-buzzers) :offset-assert 16) + (power (pointer hud-power) :offset-assert 20) + (bike-speed (pointer hud-bike-speed) :offset-assert 24) + (bike-heat (pointer hud-bike-heat) :offset-assert 28) + (money-all (pointer hud-money-all) :offset-assert 32) + (parts (pointer process) 9 :offset 0) ) :method-count-assert 9 :size-assert #x24 diff --git a/goal_src/engine/ui/hud.gc b/goal_src/engine/ui/hud.gc index 7716a8456..3ed04ff7f 100644 --- a/goal_src/engine/ui/hud.gc +++ b/goal_src/engine/ui/hud.gc @@ -5,3 +5,9 @@ ;; name in dgo: hud ;; dgos: GAME, ENGINE +;; TODO - for hud-classes +(define-extern hud-init-by-other (function int none :behavior hud)) + +(define-extern hud-collecting (state handle hud)) + +;; decomp begins diff --git a/goal_src/levels/racer_common/racer-part.gc b/goal_src/levels/racer_common/racer-part.gc index a8236afc4..f56673535 100644 --- a/goal_src/levels/racer_common/racer-part.gc +++ b/goal_src/levels/racer_common/racer-part.gc @@ -7,7 +7,6 @@ ;; DECOMP BEGINS -;; definition for function part-hud-racer-speed-func (defun part-hud-racer-speed-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -78,7 +77,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 108) (new 'static 'sparticle-launch-group @@ -95,7 +93,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 109) (new 'static 'sparticle-launch-group @@ -112,7 +109,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 110) (new 'static 'sparticle-launch-group @@ -129,7 +125,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 741) (new 'static 'sparticle-launcher @@ -151,7 +146,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 740) (new 'static 'sparticle-launcher @@ -175,7 +169,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 1999) (new 'static 'sparticle-launcher @@ -197,7 +190,6 @@ ) ) -;; definition for function part-hud-racer-heat-func (defun part-hud-racer-heat-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -224,7 +216,6 @@ ) ) -;; definition for function zoomer-heat-slice-color (defun zoomer-heat-slice-color ((arg0 matrix) (arg1 float)) (cond ((< arg1 0.6) @@ -262,7 +253,6 @@ ) ) -;; definition for function part-hud-zoomer-heat-slice-01-func (defun part-hud-zoomer-heat-slice-01-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -272,7 +262,6 @@ ) ) -;; definition for function part-hud-zoomer-heat-slice-02-func (defun part-hud-zoomer-heat-slice-02-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -285,7 +274,6 @@ ) ) -;; definition for function part-hud-zoomer-heat-slice-03-func (defun part-hud-zoomer-heat-slice-03-func ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) @@ -298,7 +286,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 111) (new 'static 'sparticle-launch-group @@ -315,7 +302,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 112) (new 'static 'sparticle-launch-group @@ -332,7 +318,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 113) (new 'static 'sparticle-launch-group @@ -349,7 +334,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 114) (new 'static 'sparticle-launch-group @@ -369,7 +353,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 739) (new 'static 'sparticle-launcher @@ -391,7 +374,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 737) (new 'static 'sparticle-launcher @@ -413,7 +395,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 738) (new 'static 'sparticle-launcher @@ -436,7 +417,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2010) (new 'static 'sparticle-launcher @@ -458,7 +438,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2011) (new 'static 'sparticle-launcher @@ -480,7 +459,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2012) (new 'static 'sparticle-launcher @@ -502,7 +480,6 @@ ) ) -;; definition of type hud-bike-heat (deftype hud-bike-heat (hud) () :heap-base #xb0 @@ -511,27 +488,16 @@ :flag-assert #x1b00b00118 ) -;; definition for method 3 of type hud-bike-heat -(defmethod inspect hud-bike-heat ((obj hud-bike-heat)) - (let ((t9-0 (method-of-type hud inspect))) - (t9-0 obj) - ) - obj - ) -;; definition for method 19 of type hud-bike-heat -;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-19 hud-bike-heat ((obj hud-bike-heat)) (if *target* - (dummy-16 obj (the int (-> *target* racer heat)) 0) + (TODO-RENAME-16 obj (the int (-> *target* racer heat)) 0) ) 0 (none) ) -;; definition for method 20 of type hud-bike-heat -;; INFO: Return type mismatch int vs none. -(defmethod init-particles! hud-bike-heat ((obj hud-bike-heat)) +(defmethod init-particles! hud-bike-heat ((obj hud-bike-heat) (arg0 int)) (with-pp (push-setting! *setting-control* @@ -610,7 +576,6 @@ ) ) -;; definition of type hud-bike-speed (deftype hud-bike-speed (hud) () :heap-base #xb0 @@ -619,27 +584,16 @@ :flag-assert #x1b00b00118 ) -;; definition for method 3 of type hud-bike-speed -(defmethod inspect hud-bike-speed ((obj hud-bike-speed)) - (let ((t9-0 (method-of-type hud inspect))) - (t9-0 obj) - ) - obj - ) -;; definition for method 19 of type hud-bike-speed -;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-19 hud-bike-speed ((obj hud-bike-speed)) (if *target* - (dummy-16 obj (the int (-> *target* control unknown-float01)) 0) + (TODO-RENAME-16 obj (the int (-> *target* control unknown-float01)) 0) ) 0 (none) ) -;; definition for method 20 of type hud-bike-speed -;; INFO: Return type mismatch int vs none. -(defmethod init-particles! hud-bike-speed ((obj hud-bike-speed)) +(defmethod init-particles! hud-bike-speed ((obj hud-bike-speed) (arg0 int)) (with-pp (push-setting! *setting-control* @@ -704,7 +658,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 115) (new 'static 'sparticle-launch-group @@ -722,7 +675,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 742) (new 'static 'sparticle-launcher @@ -744,7 +696,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 743) (new 'static 'sparticle-launcher @@ -767,7 +718,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 744) (new 'static 'sparticle-launcher @@ -797,7 +747,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2211) (new 'static 'sparticle-launcher @@ -826,7 +775,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2207) (new 'static 'sparticle-launcher @@ -857,7 +805,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2221) (new 'static 'sparticle-launcher @@ -886,7 +833,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2208) (new 'static 'sparticle-launcher @@ -917,7 +863,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2218) (new 'static 'sparticle-launcher @@ -947,7 +892,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2215) (new 'static 'sparticle-launcher @@ -978,7 +922,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2216) (new 'static 'sparticle-launcher @@ -1009,7 +952,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2831) (new 'static 'sparticle-launcher @@ -1040,7 +982,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2214) (new 'static 'sparticle-launcher @@ -1071,7 +1012,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2220) (new 'static 'sparticle-launcher @@ -1101,7 +1041,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2213) (new 'static 'sparticle-launcher @@ -1132,7 +1071,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2275) (new 'static 'sparticle-launcher @@ -1163,7 +1101,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2276) (new 'static 'sparticle-launcher @@ -1192,7 +1129,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2212) (new 'static 'sparticle-launcher @@ -1218,7 +1154,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2225) (new 'static 'sparticle-launcher @@ -1254,7 +1189,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2226) (new 'static 'sparticle-launcher @@ -1290,7 +1224,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2227) (new 'static 'sparticle-launcher @@ -1320,7 +1253,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2277) (new 'static 'sparticle-launcher @@ -1337,7 +1269,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2278) (new 'static 'sparticle-launcher @@ -1352,7 +1283,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-group-id-table* 116) (new 'static 'sparticle-launch-group @@ -1372,7 +1302,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2280) (new 'static 'sparticle-launcher @@ -1406,7 +1335,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2283) (new 'static 'sparticle-launcher @@ -1421,7 +1349,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2282) (new 'static 'sparticle-launcher @@ -1448,7 +1375,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2279) (new 'static 'sparticle-launcher @@ -1471,7 +1397,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2281) (new 'static 'sparticle-launcher @@ -1506,7 +1431,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2284) (new 'static 'sparticle-launcher @@ -1522,7 +1446,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2285) (new 'static 'sparticle-launcher @@ -1539,7 +1462,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2286) (new 'static 'sparticle-launcher @@ -1553,7 +1475,6 @@ ) ) -;; failed to figure out what this is: (set! (-> *part-id-table* 2229) (new 'static 'sparticle-launcher diff --git a/test/decompiler/reference/engine/gfx/sparticle/sparticle-h_REF.gc b/test/decompiler/reference/engine/gfx/sparticle/sparticle-h_REF.gc index 780a37b6f..2a92cd7cc 100644 --- a/test/decompiler/reference/engine/gfx/sparticle/sparticle-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/sparticle/sparticle-h_REF.gc @@ -43,7 +43,7 @@ (next-time uint32 :offset-assert 116) (next-launcher basic :offset-assert 120) (cache-alpha float :offset-assert 124) - (valid basic :offset-assert 128) + (valid symbol :offset-assert 128) (key sparticle-launch-control :offset-assert 132) (binding sparticle-launch-state :offset-assert 136) (data uint32 1 :offset 12) diff --git a/test/decompiler/reference/engine/ui/hud-classes_REF.gc b/test/decompiler/reference/engine/ui/hud-classes_REF.gc new file mode 100644 index 000000000..9efe1f7f6 --- /dev/null +++ b/test/decompiler/reference/engine/ui/hud-classes_REF.gc @@ -0,0 +1,3199 @@ +;;-*-Lisp-*- +(in-package goal) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 75) + (new 'static 'sparticle-launch-group + :length 11 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-pickup" + :launcher + (new 'static 'inline-array sparticle-group-item 11 + (sp-item 303 :flags (launch-asap) :binding 304) + (sp-item 304 :flags (start-dead launch-asap) :binding 305) + (sp-item 305 :flags (start-dead launch-asap) :binding 306) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 306 :flags (start-dead launch-asap) :binding 307) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + (sp-item 307 :fade-after (meters 40.0) :flags (start-dead)) + ) + :bounds (new 'static 'sphere :w 8192.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 303) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 10 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 32.0 92.0 1.0) + (sp-rnd-flt spt-g 128.0 128.0 1.0) + (sp-flt spt-a 0.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit3 bit9) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 304) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :page #x2)) + (sp-flt spt-num 1.0) + (sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0) + (sp-flt spt-z 122.88) + (sp-flt spt-scale-x (meters 2.5)) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 32.0 92.0 1.0) + (sp-rnd-flt spt-g 128.0 128.0 1.0) + (sp-flt spt-a 24.0) + (sp-rnd-flt spt-omega 0.0 65536.0 1.0) + (sp-rnd-flt spt-vel-x (meters 0.026666667) (meters 0.026666667) 1.0) + (sp-flt spt-vel-y (meters 0.0014814815)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-flt spt-rotvel-z (degrees 0.2)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit7 bit9) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 305) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :page #x2)) + (sp-flt spt-num 3.0) + (sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0) + (sp-flt spt-z 266.24) + (sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.4) 1.0) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-copy-from-other spt-scale-y -4) + (sp-rnd-flt spt-r 32.0 92.0 1.0) + (sp-rnd-flt spt-g 128.0 128.0 1.0) + (sp-flt spt-a 24.0) + (sp-rnd-flt spt-omega 0.0 65536.0 1.0) + (sp-rnd-flt spt-vel-x (meters 0.017777778) (meters 0.017777778) 1.0) + (sp-flt spt-vel-y (meters 0.0)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-rnd-int-flt spt-rotvel-z (degrees -0.4) 1 145.63556) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit3 bit7 bit9) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 306) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 16 + (sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2)) + (sp-flt spt-num 1.0) + (sp-rnd-flt spt-y (meters 0.0) (meters 16.0) 1.0) + (sp-flt spt-z 491.52) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 255.0) + (sp-flt spt-a 24.0) + (sp-rnd-flt spt-omega 0.0 65536.0 1.0) + (sp-rnd-flt spt-vel-x (meters 0.053333335) (meters 0.053333335) 1.0) + (sp-flt spt-vel-y (meters 0.0)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3 bit7 bit9) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 307) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 17 + (sp-tex spt-texture (new 'static 'texture-id :index #xf :page #x2)) + (sp-flt spt-num 0.25) + (sp-flt spt-scale-x (meters 0.35)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 255.0) + (sp-flt spt-g 255.0) + (sp-flt spt-b 0.0) + (sp-flt spt-a 96.0) + (sp-flt spt-scalevel-x (meters -0.0012500001)) + (sp-copy-from-other spt-scalevel-y -4) + (sp-flt spt-fade-r -2.125) + (sp-flt spt-accel-y -0.08192) + (sp-int-plain-rnd spt-timer 30 239 1) + (sp-cpuinfo-flags bit2 bit9) + (sp-int spt-next-time 120) + (sp-launcher-by-id spt-next-launcher 308) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 308) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 2 + (sp-flt spt-fade-r 0.0) + (sp-end) + ) + ) + ) + +;; definition of type hud-pickups +(deftype hud-pickups (hud) + () + :heap-base #xb0 + :method-count-assert 27 + :size-assert #x118 + :flag-assert #x1b00b00118 + ) + +;; definition for method 3 of type hud-pickups +(defmethod inspect hud-pickups ((obj hud-pickups)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + obj + ) + +;; definition for method 15 of type hud-pickups +;; INFO: Return type mismatch int vs none. +(defmethod dummy-15 hud-pickups ((obj hud-pickups)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s4-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (-> obj value)) + (s4-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color bright-green) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-8 (the-as object (-> s5-0 base)))) + (set! (-> (the-as (pointer int64) v1-8)) #x20000000) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type hud-pickups +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-pickups ((obj hud-pickups)) + (if *target* + (TODO-RENAME-16 + obj + (the int (+ 0.5 (-> *target* fact-info-target eco-pill))) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-pickups +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-pickups ((obj hud-pickups) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 75) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 110.0) + (set! (-> obj particles s5-0 init-pos y) 55.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 118) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) -1) + (set! (-> obj friend) 3) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 76) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-health-1" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 309 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 77) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-health-2" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 310 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 78) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-health-3" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 311 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 309) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2d :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.7)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-health-01-func) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 310) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2e :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.7)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-health-03-func) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 311) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2f :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.7)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-health-02-func) + (sp-end) + ) + ) + ) + +;; definition of type hud-health +(deftype hud-health (hud) + ((scale float :offset-assert 280) + ) + :heap-base #xb0 + :method-count-assert 27 + :size-assert #x11c + :flag-assert #x1b00b0011c + ) + +;; definition for method 3 of type hud-health +(defmethod inspect hud-health ((obj hud-health)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + (format #t "~T~Tscale: ~f~%" (-> obj scale)) + obj + ) + +;; definition for function part-hud-health-01-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-health-01-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* health 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (cond + ((and *target* (< (-> *target* fact-info-target health) 1.0)) + (set! (-> arg2 prev-pos x) 32.0) + ) + (else + (let ((f0-3 128.0)) + (when (and *target* (= (-> *target* fact-info-target health) 1.0)) + (let ((v1-16 (logand (-> *display* integral-frame-counter) 7))) + (set! f0-3 (if (zero? (logand (-> *display* integral-frame-counter) 8)) + (+ 128.0 (* 18.142857 (the float v1-16))) + (- 255.0 (* 18.142857 (the float v1-16))) + ) + ) + ) + ) + (set! (-> arg2 pos y) f0-3) + (set! (-> arg2 pos z) f0-3) + (set! (-> arg2 pos w) f0-3) + ) + (set! (-> arg2 prev-pos x) 128.0) + ) + ) + 0 + (none) + ) + +;; definition for function part-hud-health-02-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-health-02-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* health 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (if (and *target* (< (-> *target* fact-info-target health) 2.0)) + (set! (-> arg2 prev-pos x) 32.0) + (set! (-> arg2 prev-pos x) 128.0) + ) + 0 + (none) + ) + +;; definition for function part-hud-health-03-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-health-03-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* health 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (if (and *target* (< (-> *target* fact-info-target health) 3.0)) + (set! (-> arg2 prev-pos x) 32.0) + (set! (-> arg2 prev-pos x) 128.0) + ) + 0 + (none) + ) + +;; definition for method 15 of type hud-health +;; INFO: Return type mismatch int vs none. +(defmethod dummy-15 hud-health ((obj hud-health)) + ((method-of-type hud dummy-15) obj) + 0 + (none) + ) + +;; definition for method 19 of type hud-health +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-health ((obj hud-health)) + (if *target* + (TODO-RENAME-16 + obj + (the int (-> *target* fact-info-target health)) + (the-as int (-> *target* fact-info-target health-pickup-time)) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-health +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-health ((obj hud-health) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 76) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 61.0) + (set! (-> obj particles s5-0 init-pos y) 55.0) + (set! (-> obj particles s5-0 init-pos z) 5.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-1 part) + (create-launch-control (-> *part-group-id-table* 77) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 98.0) + (set! (-> obj particles s5-1 init-pos y) 55.0) + (set! (-> obj particles s5-1 init-pos z) 5.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-2 part) + (create-launch-control (-> *part-group-id-table* 78) obj) + ) + (set! (-> obj particles s5-2 init-pos x) 70.0) + (set! (-> obj particles s5-2 init-pos y) 76.0) + (set! (-> obj particles s5-2 init-pos z) 5.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) -1) + (set! (-> obj friend) 0) + 0 + (none) + ) + +;; definition for method 24 of type hud-health +;; INFO: Return type mismatch int vs none. +(defmethod animate! hud-health ((obj hud-health) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj particles 0 init-pos x) 65.0) + (set! (-> obj particles 0 init-pos y) 55.0) + (set! (-> obj particles 1 init-pos x) 98.0) + (set! (-> obj particles 1 init-pos y) 55.0) + (set! (-> obj particles 2 init-pos x) 73.0) + (set! (-> obj particles 2 init-pos y) 80.0) + (set! (-> obj scale) 6144.0) + ) + (else + (set! (-> obj particles 0 init-pos x) 61.0) + (set! (-> obj particles 0 init-pos y) 55.0) + (set! (-> obj particles 1 init-pos x) 98.0) + (set! (-> obj particles 1 init-pos y) 55.0) + (set! (-> obj particles 2 init-pos x) 70.0) + (set! (-> obj particles 2 init-pos y) 76.0) + (set! (-> obj scale) 6963.2) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 705) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-orb-all" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 2964 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 2964) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-end) + ) + ) + ) + +;; definition of type hud-money-all +(deftype hud-money-all (hud) + ((x-scale float :offset-assert 280) + (y-scale float :offset-assert 284) + (y-pos int32 :offset-assert 288) + (total-orbs int32 :offset-assert 292) + (level-index int32 :offset-assert 296) + (start-time uint64 :offset-assert 304) + ) + :heap-base #xd0 + :method-count-assert 27 + :size-assert #x138 + :flag-assert #x1b00d00138 + ) + +;; definition for method 3 of type hud-money-all +(defmethod inspect hud-money-all ((obj hud-money-all)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + (format #t "~T~Tx-scale: ~f~%" (-> obj x-scale)) + (format #t "~T~Ty-scale: ~f~%" (-> obj y-scale)) + (format #t "~T~Ty-pos: ~D~%" (-> obj y-pos)) + (format #t "~T~Ttotal-orbs: ~D~%" (-> obj total-orbs)) + (format #t "~T~Tlevel-index: ~D~%" (-> obj level-index)) + (format #t "~T~Tstart-time: ~D~%" (-> obj start-time)) + obj + ) + +;; definition for method 15 of type hud-money-all +;; INFO: Return type mismatch int vs none. +(defmethod dummy-15 hud-money-all ((obj hud-money-all)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + 0 + (let ((s5-0 0)) + (when (>= (-> obj level-index) 0) + (let + ((s5-1 + (new + 'stack + 'font-context + *font-default-matrix* + (+ (* (-> obj x-sgn) (-> obj offset)) -60 (-> obj text-x)) + (+ + (/ + (* + (+ + (-> obj text-y) + (* (-> obj y-sgn) (-> obj offset)) + (-> obj y-offset) + ) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + -17 + ) + 0.0 + (font-color orange-red) + (font-flags shadow kerning) + ) + ) + ) + (let ((v1-12 s5-1)) + (set! (-> v1-12 width) (the float 228)) + ) + (let ((v1-13 s5-1)) + (set! (-> v1-13 height) (the float 45)) + ) + (let ((v1-14 s5-1)) + (set! (-> v1-14 scale) 0.6) + ) + (set! (-> s5-1 flags) (font-flags shadow kerning middle left large)) + (print-game-text + (lookup-text! + *common-text* + (-> *level-task-data* (-> obj level-index) level-name-id) + #f + ) + s5-1 + #f + 128 + 18 + ) + ) + (set! s5-0 13) + ) + (let* ((s1-0 50) + (s3-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (s4-1 (-> s3-0 base)) + ) + (let ((s2-0 draw-string-xy)) + (format + (clear *temp-string*) + "~D/~D" + (-> obj total-orbs) + (-> obj total-orbs) + ) + (s2-0 + *temp-string* + s3-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset)) s1-0) + (+ + (/ + (* + (+ + (-> obj text-y) + (* (-> obj y-sgn) (-> obj offset)) + (-> obj y-offset) + ) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + s5-0 + ) + (font-color dark-yellow) + (font-flags shadow kerning middle large) + ) + ) + (let ((a3-12 (-> s3-0 base))) + (let ((v1-32 (the-as dma-packet (-> s3-0 base)))) + (set! (-> v1-32 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-32 vif0) (new 'static 'vif-tag)) + (set! (-> v1-32 vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-32) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + s4-1 + (the-as (pointer dma-tag) a3-12) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type hud-money-all +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-money-all ((obj hud-money-all)) + (when *target* + (hide-bottom-hud) + (when (!= *master-mode* 'pause) + (when (and (!= (-> obj icons 0) 0) (-> obj icons 0 icon)) + (set! (-> obj icons 0 scale-x) (-> obj x-scale)) + (set! (-> obj icons 0 scale-y) (-> obj y-scale)) + (set! + (-> obj icons 0 icon-y) + (* (-> obj y-pos) (the int (-> *video-parms* relative-y-scale))) + ) + (let ((a0-6 (-> obj icons 0 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-6 + (- (y-angle a0-6) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) + ) + ) + ) + ) + (if + (>= + (+ (-> *display* base-frame-counter) -1500) + (the-as int (-> obj start-time)) + ) + (set! (-> obj deactivate-when-hidden) #t) + (TODO-RENAME-16 obj (-> *display* base-frame-counter) 0) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-money-all +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-money-all ((obj hud-money-all) (arg0 int)) + (with-pp + (when (< (-> obj nb-of-icons) 6) + (let ((s4-0 (-> obj nb-of-icons))) + (set! (-> obj icons s4-0) (new 'static 'hud-icon)) + (let* ((s2-0 (get-process *default-dead-pool* manipy #x4000)) + (s3-0 (when s2-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s2-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s2-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s2-0 ppointer) + ) + ) + ) + (when s3-0 + (set! + (-> (the-as process-drawable (-> s3-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s3-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (when #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'trans-hook) + (set! (-> a1-4 param 0) (the-as uint #f)) + (send-event-function (ppointer->process s3-0) a1-4) + ) + ) + ) + (set! (-> obj icons s4-0 icon) (the-as (pointer manipy) s3-0)) + (when s3-0 + (logior! (-> s3-0 0 mask) (process-mask pause)) + (logclear! (-> s3-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s3-0 0)) root trans z) 1024.0) + (set! (-> obj icons s4-0 icon-x) 170) + (set! (-> obj icons s4-0 icon-y) 0) + (set! (-> obj icons s4-0 icon-z) 0) + (set! (-> obj icons s4-0 scale-x) 0.0095) + (set! (-> obj icons s4-0 scale-y) -0.011) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s4-1 (-> obj nb-of-particles))) + (set! (-> obj particles s4-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s4-1 part) + (create-launch-control (-> *part-group-id-table* 705) obj) + ) + (set! (-> obj particles s4-1 init-pos x) 172.0) + (set! (-> obj particles s4-1 init-pos y) 330.0) + (set! (-> obj particles s4-1 init-pos z) 2.0) + (set! (-> obj particles s4-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (dotimes (s4-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s4-3 part matrix) -1) + (set! (-> obj particles s4-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 251) + (set! (-> obj text-y) 305) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) 1) + (hide-bottom-hud) + (let ((s4-4 0) + (s3-2 0) + (s2-2 0) + ) + (dotimes (s1-0 (length *level-task-data*)) + (let ((v1-83 (-> *level-task-data* s1-0))) + (when (!= v1-83 #f) + (when + (or + (= *kernel-boot-message* 'play) + (= (-> v1-83 level-name-id) (game-text-id misty-level-name)) + ) + (if (= s1-0 arg0) + (set! s2-2 (the-as int (-> *game-info* money-per-level s1-0))) + ) + (+! s3-2 (-> *game-info* money-per-level s1-0)) + (+! s4-4 (-> (get-game-count s1-0) money-count)) + ) + ) + ) + ) + (cond + ((= s3-2 s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj total-orbs) s4-4) + (set! (-> obj level-index) -1) + ) + ((begin + (set! (-> obj total-orbs) s2-2) + (< arg0 (length *level-task-data*)) + ) + (set! (-> obj level-index) arg0) + ) + (else + (set! (-> obj level-index) -1) + ) + ) + ) + (set! (-> obj start-time) (the-as uint (-> *display* base-frame-counter))) + (sound-play-by-name + (static-sound-name "get-all-orbs") + (new-sound-id) + 1024 + 0 + 0 + (the-as uint 1) + (the-as vector #t) + ) + 0 + (none) + ) + ) + +;; definition for method 24 of type hud-money-all +;; INFO: Return type mismatch int vs none. +(defmethod + animate! + hud-money-all + ((obj hud-money-all) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj x-scale) 0.01845) + (set! (-> obj y-scale) -0.02175) + (set! (-> obj y-pos) (if arg1 + 374 + 373 + ) + ) + ) + (else + (set! (-> obj x-scale) 0.013499999) + (set! (-> obj y-scale) -0.01575) + (set! (-> obj y-pos) 361) + ) + ) + (when arg1 + (set! (-> obj x-scale) (* 1.02 (-> obj x-scale))) + (set! (-> obj y-scale) (* 1.2 (-> obj y-scale))) + (set! (-> obj y-pos) (the int (* 1.21 (the float (-> obj y-pos))))) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 79) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-orb" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 312 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 312) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2c :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.6)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-end) + ) + ) + ) + +;; definition of type hud-money +(deftype hud-money (hud) + ((x-scale float :offset-assert 280) + (y-scale float :offset-assert 284) + (y-pos int32 :offset-assert 288) + ) + :heap-base #xc0 + :method-count-assert 27 + :size-assert #x124 + :flag-assert #x1b00c00124 + ) + +;; definition for method 3 of type hud-money +(defmethod inspect hud-money ((obj hud-money)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + (format #t "~T~Tx-scale: ~f~%" (-> obj x-scale)) + (format #t "~T~Ty-scale: ~f~%" (-> obj y-scale)) + (format #t "~T~Ty-pos: ~D~%" (-> obj y-pos)) + obj + ) + +;; definition for method 15 of type hud-money +;; INFO: Return type mismatch int vs none. +(defmethod dummy-15 hud-money ((obj hud-money)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s4-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (-> obj value)) + (s4-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color dark-yellow) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-8 (the-as dma-packet (-> s5-0 base)))) + (set! (-> v1-8 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-8 vif0) (new 'static 'vif-tag)) + (set! (-> v1-8 vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type hud-money +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-money ((obj hud-money)) + (when *target* + (when (!= *master-mode* 'pause) + (when (and (!= (-> obj icons 0) 0) (-> obj icons 0 icon)) + (set! (-> obj icons 0 scale-x) (-> obj x-scale)) + (set! (-> obj icons 0 scale-y) (-> obj y-scale)) + (set! + (-> obj icons 0 icon-y) + (* (-> obj y-pos) (the int (-> *video-parms* relative-y-scale))) + ) + (let ((a0-6 (-> obj icons 0 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-6 + (- (y-angle a0-6) (* 182.04445 (* 4.0 (-> *display* time-adjust-ratio)))) + ) + ) + ) + ) + (TODO-RENAME-16 obj (the int (+ 0.5 (-> *target* game money))) 0) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-money +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-money ((obj hud-money) (arg0 int)) + (with-pp + (when (< (-> obj nb-of-icons) 6) + (let ((s5-0 (-> obj nb-of-icons))) + (set! (-> obj icons s5-0) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-1 (method-of-type manipy activate))) + (t9-1 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *money-sg* + #f + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.0095 + -0.011 + 0.0095 + 1.0 + ) + (when #f + (let ((a1-4 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-4 from) pp) + (set! (-> a1-4 num-params) 1) + (set! (-> a1-4 message) 'trans-hook) + (set! (-> a1-4 param 0) (the-as uint #f)) + (send-event-function (ppointer->process s4-0) a1-4) + ) + ) + ) + (set! (-> obj icons s5-0 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 1024.0) + (set! (-> obj icons s5-0 icon-x) 399) + (set! (-> obj icons s5-0 icon-y) 79) + (set! (-> obj icons s5-0 icon-z) 0) + (set! (-> obj icons s5-0 scale-x) 0.0095) + (set! (-> obj icons s5-0 scale-y) -0.011) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-1 part) + (create-launch-control (-> *part-group-id-table* 79) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 400.0) + (set! (-> obj particles s5-1 init-pos y) 58.0) + (set! (-> obj particles s5-1 init-pos z) 2.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (set! (-> obj text-x) 420) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + 0 + (none) + ) + ) + +;; definition for method 24 of type hud-money +;; INFO: Return type mismatch int vs none. +(defmethod animate! hud-money ((obj hud-money) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj x-scale) 0.0123) + (set! (-> obj y-scale) -0.0145) + (set! (-> obj y-pos) 86) + ) + (else + (set! (-> obj x-scale) 0.0095) + (set! (-> obj y-scale) -0.011) + (set! (-> obj y-pos) 79) + ) + ) + (when arg1 + (set! (-> obj x-scale) (* 1.1 (-> obj x-scale))) + (set! (-> obj y-scale) (* 1.2 (-> obj y-scale))) + (set! (-> obj y-pos) (the int (* (the float (-> obj y-pos)) (if arg0 + 0.95 + 0.9 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 21 of type hud-money +(defmethod first-icon-x hud-money ((obj hud-money)) + (-> obj icons 0 icon-x) + ) + +;; definition for method 22 of type hud-money +(defmethod first-icon-y hud-money ((obj hud-money)) + (-> obj icons 0 icon-y) + ) + +;; definition for method 25 of type hud-money +(defmethod inc-value hud-money ((obj hud-money)) + 0.01 + ) + +;; definition for method 26 of type hud-money +(defmethod dec-value hud-money ((obj hud-money)) + -0.011 + ) + +;; failed to figure out what this is: +(let + ((v1-24 + (new 'static 'skeleton-group + :art-group-name "fuelcell-naked" + :bounds + (new 'static 'vector :y 4096.0 :w 6553.6) + :texture-level 2 + :version #x6 + ) + ) + ) + (set! (-> v1-24 jgeo) 0) + (set! (-> v1-24 janim) 2) + (set! (-> v1-24 mgeo 0) (the-as uint 1)) + (set! (-> v1-24 lod-dist 0) 4095996000.0) + (set! *fuelcell-naked-sg* v1-24) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 313) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 4.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 314) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 5.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 315) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 6.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 316) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.4)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 7.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 317) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 13 + (sp-tex spt-texture (new 'static 'texture-id :index #x31 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 0.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-flt spt-userdata 9.0) + (sp-func spt-func 'fuel-cell-hud-orbit-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 318) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x30 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 1.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'fuel-cell-hud-center-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 80) + (new 'static 'sparticle-launch-group + :length 10 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name "group-part-hud-power-cell-whole" + :launcher + (new 'static 'inline-array sparticle-group-item 10 + (sp-item 318 :flags (launch-asap)) + (sp-item 319 :fade-after (meters 35.0)) + (sp-item 320 :fade-after (meters 20.0)) + (sp-item 321 :flags (launch-asap) :period 3600 :length 5) + (sp-item 322 :flags (launch-asap) :period 3600 :length 5) + (sp-item 317 :flags (launch-asap)) + (sp-item 313 :flags (launch-asap)) + (sp-item 314 :flags (launch-asap)) + (sp-item 315 :flags (launch-asap)) + (sp-item 316 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 323) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 2 + (sp-flt spt-fade-a -0.53333336) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 319) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 20 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) + (sp-flt spt-num 0.5) + (sp-flt spt-z 92160.0) + (sp-rnd-flt spt-scale-x (meters 0.3) (meters 0.5) 1.0) + (sp-int spt-rot-x 4) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-rnd-flt spt-scale-y (meters 0.1) (meters 0.8) 1.0) + (sp-rnd-int spt-r 0 1 255.0) + (sp-rnd-int spt-g 0 1 255.0) + (sp-rnd-int spt-b 0 1 255.0) + (sp-flt spt-a 0.0) + (sp-flt spt-scalevel-x (meters 0.009765625)) + (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) + (sp-flt spt-scalevel-y (meters 0.009765625)) + (sp-flt spt-fade-a 0.35555556) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-int spt-next-time 90) + (sp-launcher-by-id spt-next-launcher 232) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 320) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 19 + (sp-tex spt-texture (new 'static 'texture-id :index #x2 :page #x2)) + (sp-flt spt-num 0.06) + (sp-flt spt-z 92160.0) + (sp-rnd-flt spt-scale-x (meters 1.5) (meters 0.5) 1.0) + (sp-int spt-rot-x 4) + (sp-rnd-flt spt-rot-z (degrees 0.0) (degrees 360.0) 1.0) + (sp-flt spt-scale-y (meters 0.2)) + (sp-rnd-int spt-r 0 1 255.0) + (sp-rnd-int spt-g 0 1 255.0) + (sp-rnd-int spt-b 0 1 255.0) + (sp-flt spt-a 0.0) + (sp-flt spt-scalevel-x (meters 0.009765625)) + (sp-rnd-flt spt-rotvel-z (degrees -0.15) (degrees 0.3) 1.0) + (sp-flt spt-fade-a 0.32) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-int spt-next-time 75) + (sp-launcher-by-id spt-next-launcher 232) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 321) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-z 92160.0) + (sp-flt spt-scale-x (meters 3.3)) + (sp-flt spt-rot-z (degrees 0.0)) + (sp-flt spt-scale-y (meters 2.8)) + (sp-flt spt-r 192.0) + (sp-flt spt-g 192.0) + (sp-rnd-flt spt-b 0.0 128.0 1.0) + (sp-flt spt-a 64.0) + (sp-flt spt-rotvel-z (degrees -0.4)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-func spt-func 'fuel-cell-hud-starburst-3-callback) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 322) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 15 + (sp-tex spt-texture (new 'static 'texture-id :index #x12 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-z 92160.0) + (sp-flt spt-scale-x (meters 3.8)) + (sp-flt spt-rot-z (degrees 0.0)) + (sp-flt spt-scale-y (meters 3.3)) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 64.0) + (sp-flt spt-rotvel-z (degrees 0.3)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit3) + (sp-func spt-func 'fuel-cell-hud-starburst-4-callback) + (sp-end) + ) + ) + ) + +;; definition of type hud-fuel-cell +(deftype hud-fuel-cell (hud) + ((scale-starburst-3-x float :offset-assert 280) + (scale-starburst-3-y float :offset-assert 284) + (scale-starburst-4-x float :offset-assert 288) + (scale-starburst-4-y float :offset-assert 292) + (scale-icon float :offset-assert 296) + (scale-center float :offset-assert 300) + (icon-pos-y int32 :offset-assert 304) + ) + :heap-base #xd0 + :method-count-assert 27 + :size-assert #x134 + :flag-assert #x1b00d00134 + ) + +;; definition for method 3 of type hud-fuel-cell +(defmethod inspect hud-fuel-cell ((obj hud-fuel-cell)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + (format #t "~T~Tscale-starburst-3-x: ~f~%" (-> obj scale-starburst-3-x)) + (format #t "~T~Tscale-starburst-3-y: ~f~%" (-> obj scale-starburst-3-y)) + (format #t "~T~Tscale-starburst-4-x: ~f~%" (-> obj scale-starburst-4-x)) + (format #t "~T~Tscale-starburst-4-y: ~f~%" (-> obj scale-starburst-4-y)) + (format #t "~T~Tscale-icon: ~f~%" (-> obj scale-icon)) + (format #t "~T~Tscale-center: ~f~%" (-> obj scale-center)) + (format #t "~T~Ticon-pos-y: ~D~%" (-> obj icon-pos-y)) + obj + ) + +;; definition for method 15 of type hud-fuel-cell +;; INFO: Return type mismatch int vs none. +(defmethod dummy-15 hud-fuel-cell ((obj hud-fuel-cell)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s4-0 draw-string-xy)) + (format (clear *temp-string*) "~D" (-> obj value)) + (s4-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color dark-yellow) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-8 (the-as object (-> s5-0 base)))) + (set! (-> (the-as (pointer int64) v1-8)) #x20000000) + (set! (-> (the-as dma-packet v1-8) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-8) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-8) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +;; definition for function fuel-cell-hud-orbit-callback +;; INFO: Return type mismatch int vs none. +(defun + fuel-cell-hud-orbit-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((s3-0 (-> arg1 key proc)) + (v1-1 (the int (-> arg1 user-float))) + (s5-0 (new 'stack-no-clear 'vector)) + ) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (vector<-cspace! + s5-0 + (-> (the-as hud-fuel-cell s3-0) icons 0 icon 0 node-list data v1-1) + ) + (vector<-cspace! + s4-0 + (-> (the-as hud-fuel-cell s3-0) icons 0 icon 0 node-list data 3) + ) + (vector-! s5-0 s5-0 s4-0) + ) + (set! (-> arg2 vector 0 x) (* 60.0 (-> s5-0 x))) + (set! (-> arg2 vector 0 y) (* 60.0 (-> s5-0 y))) + (set! (-> arg2 vector 0 z) (* 1024.0 (-> s5-0 z))) + ) + 0 + (none) + ) + +;; definition for function fuel-cell-hud-starburst-3-callback +;; INFO: Return type mismatch int vs none. +(defun + fuel-cell-hud-starburst-3-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 vector 0 w) (-> *hud-parts* fuel-cell 0 scale-starburst-3-x)) + (set! (-> arg2 vector 1 w) (-> *hud-parts* fuel-cell 0 scale-starburst-3-y)) + 0 + (none) + ) + +;; definition for function fuel-cell-hud-starburst-4-callback +;; INFO: Return type mismatch int vs none. +(defun + fuel-cell-hud-starburst-4-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (set! (-> arg2 vector 0 w) (-> *hud-parts* fuel-cell 0 scale-starburst-4-x)) + (set! (-> arg2 vector 1 w) (-> *hud-parts* fuel-cell 0 scale-starburst-4-y)) + 0 + (none) + ) + +;; definition for function fuel-cell-hud-center-callback +;; INFO: Return type mismatch int vs none. +(defun + fuel-cell-hud-center-callback + ((arg0 sparticle-system) (arg1 sparticle-cpuinfo) (arg2 matrix)) + (let ((f0-0 (-> *hud-parts* fuel-cell 0 scale-icon)) + (f1-0 (-> *hud-parts* fuel-cell 0 scale-center)) + ) + (set-vector! + (-> *hud-parts* fuel-cell 0 icons 0 icon 0 root scale) + f0-0 + f0-0 + f0-0 + 1.0 + ) + (set! (-> arg2 vector 0 w) f1-0) + (set! (-> arg2 vector 1 w) f1-0) + ) + 0 + (none) + ) + +;; definition for method 19 of type hud-fuel-cell +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-fuel-cell ((obj hud-fuel-cell)) + (when *target* + (when (!= *master-mode* 'pause) + (let ((a0-2 (-> obj icons 0 icon 0 root))) + (set-yaw-angle-clear-roll-pitch! + a0-2 + (+ (y-angle a0-2) (* 182.04445 (* 0.5 (-> *display* time-adjust-ratio)))) + ) + ) + ) + (set! (-> obj icons 0 icon-y) (-> obj icon-pos-y)) + (TODO-RENAME-16 obj (the int (+ 0.5 (-> *target* game fuel))) 0) + (let ((s5-1 (new 'stack-no-clear 'vector))) + (vector<-cspace! s5-1 (-> obj icons 0 icon 0 node-list data 3)) + (set! (-> obj particles 0 pos x) (-> s5-1 x)) + (set! (-> obj particles 0 pos y) (* 0.5 (-> s5-1 y))) + (set! (-> obj particles 0 pos z) (+ 2.0 (* 0.05 (+ -2048.0 (-> s5-1 z))))) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-fuel-cell +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-fuel-cell ((obj hud-fuel-cell) (arg0 int)) + (with-pp + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 80) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 256.0) + (set! (-> obj particles s5-0 init-pos y) 224.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (when (< (-> obj nb-of-icons) 6) + (let ((s5-2 (-> obj nb-of-icons))) + (set! (-> obj icons s5-2) (new 'static 'hud-icon)) + (let* ((s3-0 (get-process *default-dead-pool* manipy #x4000)) + (s4-0 (when s3-0 + (let ((t9-3 (method-of-type manipy activate))) + (t9-3 + (the-as manipy s3-0) + obj + 'manipy + (the-as pointer #x70004000) + ) + ) + (run-now-in-process + s3-0 + manipy-init + (new 'static 'vector :w 1.0) + #f + *fuelcell-naked-sg* + #f + ) + (-> s3-0 ppointer) + ) + ) + ) + (when s4-0 + (set! + (-> (the-as process-drawable (-> s4-0 0)) draw dma-add-func) + dma-add-process-drawable-hud + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root trans) + 0.0 + 0.0 + 0.0 + 1.0 + ) + (set-vector! + (-> (the-as process-drawable (-> s4-0 0)) root scale) + 0.009 + 0.009 + 0.009 + 1.0 + ) + (when #f + (let ((a1-5 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-5 from) pp) + (set! (-> a1-5 num-params) 1) + (set! (-> a1-5 message) 'trans-hook) + (set! (-> a1-5 param 0) (the-as uint #f)) + (send-event-function (ppointer->process s4-0) a1-5) + ) + ) + ) + (set! (-> obj icons s5-2 icon) (the-as (pointer manipy) s4-0)) + (when s4-0 + (logior! (-> s4-0 0 mask) (process-mask pause)) + (logclear! (-> s4-0 0 mask) (process-mask menu progress)) + (set! (-> (the-as process-drawable (-> s4-0 0)) root trans z) 2048.0) + (set! (-> obj icons s5-2 icon-x) 256) + (set! (-> obj icons s5-2 icon-y) 62) + (set! (-> obj icons s5-2 icon-z) 0) + (set! (-> obj icons s5-2 scale-x) 0.009) + (set! (-> obj icons s5-2 scale-y) 0.009) + ) + ) + ) + (+! (-> obj nb-of-icons) 1) + ) + (set! (-> obj text-x) 276) + (set! (-> obj text-y) 45) + (set! (-> obj x-sgn) 0) + (set! (-> obj y-sgn) -1) + (set! (-> obj increment-on-event) #t) + (set! (-> obj skip-particle) -2) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (let ((s5-4 (new 'stack-no-clear 'quaternion))) + (quaternion-axis-angle! s5-4 0.0 1.0 0.0 16384.0) + (quaternion*! + (-> obj icons 0 icon 0 root quat) + s5-4 + (-> obj icons 0 icon 0 root quat) + ) + ) + 0 + (none) + ) + ) + +;; definition for method 24 of type hud-fuel-cell +;; INFO: Return type mismatch int vs none. +(defmethod + animate! + hud-fuel-cell + ((obj hud-fuel-cell) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj scale-starburst-3-x) 10240.0) + (set! (-> obj scale-starburst-3-y) 9420.8) + (set! (-> obj scale-starburst-4-x) 9420.8) + (set! (-> obj scale-starburst-4-y) 8192.0) + (set! (-> obj scale-icon) 0.007) + (set! (-> obj scale-center) 6144.0) + (set! (-> obj icon-pos-y) 62) + ) + (else + (set! (-> obj scale-starburst-3-x) 12288.0) + (set! (-> obj scale-starburst-3-y) 10240.0) + (set! (-> obj scale-starburst-4-x) 12288.0) + (set! (-> obj scale-starburst-4-y) 10240.0) + (set! (-> obj scale-icon) 0.009) + (set! (-> obj scale-center) 7372.8) + (set! (-> obj icon-pos-y) 62) + ) + ) + (if arg1 + (set! (-> obj icon-pos-y) (the int (* (the float (-> obj icon-pos-y)) (if arg0 + 1.1 + 1.14 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 81) + (new 'static 'sparticle-launch-group + :length 2 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-buzzer" + :launcher + (new 'static 'inline-array sparticle-group-item 2 + (sp-item 324 :flags (launch-asap) :binding 325) + (sp-item 325 :flags (start-dead launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 324) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 11 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 0.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit9) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 325) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 18 + (sp-tex spt-texture (new 'static 'texture-id :index #x2a :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-x (meters 0.0)) + (sp-flt spt-y (meters 1.3333334)) + (sp-flt spt-z 409.6) + (sp-flt spt-scale-x (meters 1.8)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-flt spt-omega 0.0) + (sp-flt spt-vel-x (meters 0.053333335)) + (sp-flt spt-vel-z (meters 0.0)) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit7 bit9) + (sp-func spt-func 'part-hud-buzzer-func) + (sp-end) + ) + ) + ) + +;; definition of type hud-buzzers +(deftype hud-buzzers (hud) + ((scale float :offset-assert 280) + (text-y-offset int32 :offset-assert 284) + ) + :heap-base #xb0 + :method-count-assert 27 + :size-assert #x120 + :flag-assert #x1b00b00120 + ) + +;; definition for method 3 of type hud-buzzers +(defmethod inspect hud-buzzers ((obj hud-buzzers)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + (format #t "~T~Tscale: ~f~%" (-> obj scale)) + (format #t "~T~Ttext-y-offset: ~D~%" (-> obj text-y-offset)) + obj + ) + +;; definition for function part-hud-buzzer-func +;; INFO: Return type mismatch float vs none. +(defun part-hud-buzzer-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* buzzers 0 scale))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + (none) + ) + +;; definition for method 15 of type hud-buzzers +;; INFO: Return type mismatch int vs none. +(defmethod dummy-15 hud-buzzers ((obj hud-buzzers)) + (let ((t9-0 (method-of-type hud dummy-15))) + (t9-0 obj) + ) + (set! (-> obj text-y) (+ (if (nonzero? (-> obj next-y-offset)) + (-> obj text-y-offset) + 0 + ) + 362 + ) + ) + (let* ((s5-0 (-> *display* frames (-> *display* on-screen) frame global-buf)) + (gp-0 (-> s5-0 base)) + ) + (let ((s3-0 draw-string-xy)) + (format (clear *temp-string*) "~2,' D" (-> obj value)) + (s3-0 + *temp-string* + s5-0 + (+ (-> obj text-x) (* (-> obj x-sgn) (-> obj offset))) + (/ + (* + (+ (-> obj text-y) (* (-> obj y-sgn) (-> obj offset)) (-> obj y-offset)) + (the int (-> *video-parms* relative-y-scale)) + ) + 2 + ) + (font-color dark-yellow) + (font-flags shadow kerning large) + ) + ) + (let ((a3-7 (-> s5-0 base))) + (let ((v1-11 (the-as object (-> s5-0 base)))) + (set! (-> (the-as (pointer int64) v1-11)) #x20000000) + (set! (-> (the-as dma-packet v1-11) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-11) vif1) (new 'static 'vif-tag)) + (set! (-> s5-0 base) (&+ (the-as pointer v1-11) 16)) + ) + (dma-bucket-insert-tag + (-> *display* frames (-> *display* on-screen) frame bucket-group) + (bucket-id debug-draw0) + gp-0 + (the-as (pointer dma-tag) a3-7) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 19 of type hud-buzzers +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-buzzers ((obj hud-buzzers)) + (if *target* + (TODO-RENAME-16 + obj + (the int (+ 0.5 (-> *target* fact-info-target buzzer))) + 0 + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-buzzers +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-buzzers ((obj hud-buzzers) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 81) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 60.0) + (set! (-> obj particles s5-0 init-pos y) 380.0) + (set! (-> obj particles s5-0 init-pos z) 1.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-1 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-1 part matrix) -1) + (set! (-> obj particles s5-1 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (set! (-> obj text-x) 85) + (set! (-> obj text-y) 362) + (set! (-> obj x-sgn) -1) + (set! (-> obj y-sgn) 1) + (set! (-> obj text-y-offset) 0) + (set! (-> obj increment-on-event) #t) + 0 + (none) + ) + +;; definition for method 21 of type hud-buzzers +(defmethod first-icon-x hud-buzzers ((obj hud-buzzers)) + (-> obj text-x) + ) + +;; definition for method 22 of type hud-buzzers +(defmethod first-icon-y hud-buzzers ((obj hud-buzzers)) + (+ (if (= (-> *setting-control* current video-mode) 'pal) + (+ (-> obj text-y) 120) + (+ (-> obj text-y) 50) + ) + (-> obj next-y-offset) + ) + ) + +;; definition for method 25 of type hud-buzzers +(defmethod inc-value hud-buzzers ((obj hud-buzzers)) + 0.008 + ) + +;; definition for method 26 of type hud-buzzers +(defmethod dec-value hud-buzzers ((obj hud-buzzers)) + -0.008 + ) + +;; definition for method 24 of type hud-buzzers +;; INFO: Return type mismatch int vs none. +(defmethod animate! hud-buzzers ((obj hud-buzzers) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj scale) 6553.6) + (set! (-> obj text-y-offset) -40) + ) + (else + (set! (-> obj scale) 7372.8) + (set! (-> obj text-y-offset) 0) + 0 + ) + ) + 0 + (none) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 82) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-eco-timer" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 327 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 83) + (new 'static 'sparticle-launch-group + :length 1 + :duration #xbb8 + :linger-duration #x5dc + :flags (sp-group-flag screen-space) + :name "group-part-hud-eco-timer-backing" + :launcher + (new 'static 'inline-array sparticle-group-item 1 + (sp-item 328 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 327) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x2b :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 3.2)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 128.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-func) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 328) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x3 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.5)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 128.0) + (sp-flt spt-g 100.0) + (sp-flt spt-b 63.0) + (sp-flt spt-a 64.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-backing-func) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-group-id-table* 84) + (new 'static 'sparticle-launch-group + :length 3 + :duration #xbb8 + :linger-duration #x5dc + :flags + (sp-group-flag use-local-clock screen-space) + :name "group-part-hud-timer-blue" + :launcher + (new 'static 'inline-array sparticle-group-item 3 + (sp-item 329 :flags (launch-asap)) + (sp-item 330 :flags (launch-asap)) + (sp-item 331 :flags (launch-asap)) + ) + :bounds (new 'static 'sphere :w 409600.0) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 329) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 0.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-01-func) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 330) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 0.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-02-func) + (sp-end) + ) + ) + ) + +;; failed to figure out what this is: +(set! + (-> *part-id-table* 331) + (new 'static 'sparticle-launcher + :init-specs + (new 'static 'inline-array sp-field-init-spec 12 + (sp-tex spt-texture (new 'static 'texture-id :index #x32 :page #x2)) + (sp-flt spt-num 1.0) + (sp-flt spt-scale-x (meters 2.0)) + (sp-copy-from-other spt-scale-y -4) + (sp-flt spt-r 0.0) + (sp-flt spt-g 32.0) + (sp-flt spt-b 128.0) + (sp-flt spt-a 128.0) + (sp-int spt-timer -1) + (sp-cpuinfo-flags bit2 bit9) + (sp-func spt-func 'part-hud-eco-timer-03-func) + (sp-end) + ) + ) + ) + +;; definition of type hud-power +(deftype hud-power (hud) + ((scale-timer float :offset-assert 280) + (scale-backing float :offset-assert 284) + (scale-blue float :offset-assert 288) + ) + :heap-base #xc0 + :method-count-assert 27 + :size-assert #x124 + :flag-assert #x1b00c00124 + ) + +;; definition for method 3 of type hud-power +(defmethod inspect hud-power ((obj hud-power)) + (let ((t9-0 (method-of-type hud inspect))) + (t9-0 obj) + ) + (format #t "~T~Tscale-timer: ~f~%" (-> obj scale-timer)) + (format #t "~T~Tscale-backing: ~f~%" (-> obj scale-backing)) + (format #t "~T~Tscale-blue: ~f~%" (-> obj scale-blue)) + obj + ) + +;; definition for function calculate-rotation-and-color-for-slice +;; INFO: Return type mismatch int vs none. +(defun + calculate-rotation-and-color-for-slice + ((arg0 int) (arg1 float) (arg2 int) (arg3 int) (arg4 int) (arg5 hud-particle)) + (cond + ((>= 0.0 arg1) + (set! (-> arg5 init-pos w) -16566.045) + ) + (else + (let ((v1-1 arg0)) + (cond + ((zero? v1-1) + (if (< 1.0 arg1) + (set! (-> arg5 init-pos w) 910.2222) + (set! (-> arg5 init-pos w) (* 182.04445 (+ 5.0 (* 263.0 (- 1.0 arg1))))) + ) + ) + ((= v1-1 1) + (if (< 0.6666667 arg1) + (set! (-> arg5 init-pos w) 17294.223) + (set! + (-> arg5 init-pos w) + (* 182.04445 (+ 95.0 (* 173.0 (- 1.0 (* 1.5 arg1))))) + ) + ) + ) + ((= v1-1 2) + (if (< 0.33333334 arg1) + (set! (-> arg5 init-pos w) 33678.223) + (set! + (-> arg5 init-pos w) + (* 182.04445 (+ 185.0 (* 83.0 (- 1.0 (* 3.0 arg1))))) + ) + ) + ) + ) + ) + ) + ) + (if + (and + (< 0.0 arg1) + (and (< arg1 0.2) (zero? (logand (-> *display* integral-frame-counter) 4))) + ) + (set! arg3 (* arg3 2)) + ) + (set! (-> arg5 pos y) (the float arg2)) + (set! (-> arg5 pos z) (the float arg3)) + (set! (-> arg5 pos w) (the float arg4)) + 0 + (none) + ) + +;; definition for function part-hud-eco-timer-01-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-eco-timer-01-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let + ((f0-2 + (/ + (the + float + (the-as + uint + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + ) + (the float (the-as uint (-> *FACT-bank* eco-full-timeout))) + ) + ) + (a2-1 0) + (a3-0 64) + (t0-0 128) + ) + (case (-> *target* fact-info-target eco-type) + ((1) + (set! a2-1 128) + (set! a3-0 96) + (set! t0-0 0) + ) + ((2) + (set! a2-1 128) + (set! a3-0 32) + (set! t0-0 0) + ) + ((4) + (set! a2-1 0) + (set! a3-0 128) + (set! t0-0 32) + ) + ) + (calculate-rotation-and-color-for-slice 0 f0-2 a2-1 a3-0 t0-0 arg2) + ) + (let ((f0-3 (-> *hud-parts* power 0 scale-blue))) + (set! (-> arg2 init-pos x) f0-3) + (set! (-> arg2 pos x) f0-3) + ) + 0 + (none) + ) + +;; definition for function part-hud-eco-timer-02-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-eco-timer-02-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let + ((f0-2 + (/ + (the + float + (the-as + uint + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + ) + (the float (the-as uint (-> *FACT-bank* eco-full-timeout))) + ) + ) + (a2-1 0) + (a3-0 64) + (t0-0 128) + ) + (case (-> *target* fact-info-target eco-type) + ((1) + (set! a2-1 128) + (set! a3-0 96) + (set! t0-0 0) + ) + ((2) + (set! a2-1 128) + (set! a3-0 32) + (set! t0-0 0) + ) + ((4) + (set! a2-1 0) + (set! a3-0 128) + (set! t0-0 32) + ) + ) + (calculate-rotation-and-color-for-slice 1 f0-2 a2-1 a3-0 t0-0 arg2) + ) + (let ((f0-3 (-> *hud-parts* power 0 scale-blue))) + (set! (-> arg2 init-pos x) f0-3) + (set! (-> arg2 pos x) f0-3) + ) + 0 + (none) + ) + +;; definition for function part-hud-eco-timer-03-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-eco-timer-03-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let + ((f0-2 + (/ + (the + float + (the-as + uint + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + ) + (the float (the-as uint (-> *FACT-bank* eco-full-timeout))) + ) + ) + (a2-1 0) + (a3-0 64) + (t0-0 128) + ) + (case (-> *target* fact-info-target eco-type) + ((1) + (set! a2-1 128) + (set! a3-0 96) + (set! t0-0 0) + ) + ((2) + (set! a2-1 128) + (set! a3-0 32) + (set! t0-0 0) + ) + ((4) + (set! a2-1 0) + (set! a3-0 128) + (set! t0-0 32) + ) + ) + (calculate-rotation-and-color-for-slice 2 f0-2 a2-1 a3-0 t0-0 arg2) + ) + (let ((f0-3 (-> *hud-parts* power 0 scale-blue))) + (set! (-> arg2 init-pos x) f0-3) + (set! (-> arg2 pos x) f0-3) + ) + 0 + (none) + ) + +;; definition for function part-hud-eco-timer-backing-func +;; INFO: Return type mismatch int vs none. +(defun + part-hud-eco-timer-backing-func + ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* power 0 scale-backing))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + 0 + (none) + ) + +;; definition for function part-hud-eco-timer-func +;; INFO: Return type mismatch int vs none. +(defun part-hud-eco-timer-func ((arg0 basic) (arg1 basic) (arg2 hud-particle)) + (let ((f0-0 (-> *hud-parts* power 0 scale-timer))) + (set! (-> arg2 init-pos x) f0-0) + (set! (-> arg2 pos x) f0-0) + ) + 0 + (none) + ) + +;; definition for method 19 of type hud-power +;; INFO: Return type mismatch int vs none. +(defmethod TODO-RENAME-19 hud-power ((obj hud-power)) + (if *target* + (TODO-RENAME-16 + obj + (max + 0 + (min + (the-as + int + (- + (-> *target* fact-info-target eco-timeout) + (the-as + uint + (- + (-> *display* game-frame-counter) + (the-as int (-> *target* fact-info-target eco-pickup-time)) + ) + ) + ) + ) + (the-as int (-> *target* fact-info-target eco-timeout)) + ) + ) + (the-as int (-> *target* fact-info-target eco-timeout)) + ) + ) + 0 + (none) + ) + +;; definition for method 20 of type hud-power +;; INFO: Return type mismatch int vs none. +(defmethod init-particles! hud-power ((obj hud-power) (arg0 int)) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-0 (-> obj nb-of-particles))) + (set! (-> obj particles s5-0) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-0 part) + (create-launch-control (-> *part-group-id-table* 83) obj) + ) + (set! (-> obj particles s5-0 init-pos x) 435.0) + (set! (-> obj particles s5-0 init-pos y) 370.0) + (set! (-> obj particles s5-0 init-pos z) 10.0) + (set! (-> obj particles s5-0 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-1 (-> obj nb-of-particles))) + (set! (-> obj particles s5-1) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-1 part) + (create-launch-control (-> *part-group-id-table* 84) obj) + ) + (set! (-> obj particles s5-1 init-pos x) 432.0) + (set! (-> obj particles s5-1 init-pos y) 368.0) + (set! (-> obj particles s5-1 init-pos z) 3.0) + (set! (-> obj particles s5-1 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (when (< (-> obj nb-of-particles) (-> obj max-nb-of-particles)) + (let ((s5-2 (-> obj nb-of-particles))) + (set! (-> obj particles s5-2) (new 'static 'hud-particle)) + (set! + (-> obj particles s5-2 part) + (create-launch-control (-> *part-group-id-table* 82) obj) + ) + (set! (-> obj particles s5-2 init-pos x) 435.0) + (set! (-> obj particles s5-2 init-pos y) 370.0) + (set! (-> obj particles s5-2 init-pos z) 2.0) + (set! (-> obj particles s5-2 part matrix) -1) + ) + (+! (-> obj nb-of-particles) 1) + ) + (dotimes (s5-3 (-> obj nb-of-particles)) + (if (= (-> obj particles s5-3 part matrix) -1) + (set! (-> obj particles s5-3 part matrix) (sprite-allocate-user-hvdf)) + ) + ) + (animate! obj (= (get-aspect-ratio) 'aspect16x9) (= (get-video-mode) 'pal)) + (set! (-> obj x-sgn) 1) + (set! (-> obj y-sgn) 1) + 0 + (none) + ) + +;; definition for method 24 of type hud-power +;; INFO: Return type mismatch int vs none. +(defmethod animate! hud-power ((obj hud-power) (arg0 symbol) (arg1 symbol)) + (cond + (arg0 + (set! (-> obj scale-blue) 7168.0) + (set! (-> obj scale-timer) 11468.8) + (set! (-> obj scale-backing) 8960.0) + ) + (else + (set! (-> obj scale-blue) 8192.0) + (set! (-> obj scale-timer) 13107.2) + (set! (-> obj scale-backing) 10240.0) + ) + ) + 0 + (none) + ) + +;; definition for function activate-hud +;; INFO: Return type mismatch int vs none. +(defun activate-hud ((arg0 process)) + (let ((s5-0 (get-process *default-dead-pool* hud-pickups #x4000))) + (set! (-> *hud-parts* pickups) (the-as (pointer hud-pickups) (when s5-0 + (let + ((t9-1 + (method-of-type + hud-pickups + activate + ) + ) + ) + (t9-1 + (the-as + hud-pickups + s5-0 + ) + arg0 + 'hud-pickups + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-0 + hud-init-by-other + 0 + ) + (-> + s5-0 + ppointer + ) + ) + ) + ) + ) + (let ((s5-1 (get-process *default-dead-pool* hud-money #x4000))) + (set! (-> *hud-parts* money) (the-as (pointer hud-money) (when s5-1 + (let + ((t9-4 + (method-of-type + hud-money + activate + ) + ) + ) + (t9-4 + (the-as + hud-money + s5-1 + ) + arg0 + 'hud-money + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-1 + hud-init-by-other + 0 + ) + (-> s5-1 ppointer) + ) + ) + ) + ) + (let ((s5-2 (get-process *default-dead-pool* hud-fuel-cell #x4000))) + (set! (-> *hud-parts* fuel-cell) (the-as (pointer hud-fuel-cell) (when s5-2 + (let + ((t9-7 + (method-of-type + hud-fuel-cell + activate + ) + ) + ) + (t9-7 + (the-as + hud-fuel-cell + s5-2 + ) + arg0 + 'hud-fuel-cell + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-2 + hud-init-by-other + 0 + ) + (-> + s5-2 + ppointer + ) + ) + ) + ) + ) + (let ((s5-3 (get-process *default-dead-pool* hud-health #x4000))) + (set! (-> *hud-parts* health) (the-as (pointer hud-health) (when s5-3 + (let + ((t9-10 + (method-of-type + hud-health + activate + ) + ) + ) + (t9-10 + (the-as + hud-health + s5-3 + ) + arg0 + 'hud-health + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-3 + hud-init-by-other + 0 + ) + (-> + s5-3 + ppointer + ) + ) + ) + ) + ) + (let ((s5-4 (get-process *default-dead-pool* hud-buzzers #x4000))) + (set! (-> *hud-parts* buzzers) (the-as (pointer hud-buzzers) (when s5-4 + (let + ((t9-13 + (method-of-type + hud-buzzers + activate + ) + ) + ) + (t9-13 + (the-as + hud-buzzers + s5-4 + ) + arg0 + 'hud-buzzers + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-4 + hud-init-by-other + 0 + ) + (-> + s5-4 + ppointer + ) + ) + ) + ) + ) + (let ((s5-5 (get-process *default-dead-pool* hud-power #x4000))) + (set! (-> *hud-parts* power) (the-as (pointer hud-power) (when s5-5 + (let + ((t9-16 + (method-of-type + hud-power + activate + ) + ) + ) + (t9-16 + (the-as + hud-power + s5-5 + ) + arg0 + 'hud-power + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-5 + hud-init-by-other + 0 + ) + (-> s5-5 ppointer) + ) + ) + ) + ) + (set! (-> *hud-parts* bike-speed) (the-as (pointer hud-bike-speed) #f)) + (set! (-> *hud-parts* bike-heat) (the-as (pointer hud-bike-heat) #f)) + (set! (-> *hud-parts* money-all) (the-as (pointer hud-money-all) #f)) + 0 + (none) + ) + +;; definition for function hide-hud +;; INFO: Return type mismatch int vs none. +(defun hide-hud () + (with-pp + (when *target* + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'hide) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function hide-bottom-hud +;; INFO: Return type mismatch int vs none. +(defun hide-bottom-hud () + (with-pp + (when *target* + (dotimes (gp-0 4) + (when (-> *hud-parts* parts (+ gp-0 4)) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'hide) + (send-event-function + (ppointer->process (-> *hud-parts* parts (+ gp-0 4))) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function disable-hud +;; INFO: Return type mismatch int vs none. +(defun disable-hud ((arg0 int)) + (with-pp + (when *target* + (dotimes (s5-0 9) + (when (-> *hud-parts* parts s5-0) + (when + (or + (!= (-> *hud-parts* parts s5-0) arg0) + (zero? (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0 value)) + ) + (let ((a1-1 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-1 from) pp) + (set! (-> a1-1 num-params) 0) + (set! (-> a1-1 message) 'hide) + (send-event-function + (ppointer->process (-> *hud-parts* parts s5-0)) + a1-1 + ) + ) + ) + (when (!= (-> *hud-parts* parts s5-0) arg0) + (let ((a1-2 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-2 from) pp) + (set! (-> a1-2 num-params) 0) + (set! (-> a1-2 message) 'disable) + (send-event-function + (ppointer->process (-> *hud-parts* parts s5-0)) + a1-2 + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function enable-hud +;; INFO: Return type mismatch int vs none. +(defun enable-hud () + (with-pp + (when *target* + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'enable) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function hide-hud-quick +;; INFO: Return type mismatch int vs none. +(defun hide-hud-quick () + (with-pp + (when *target* + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'hide-quick) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function show-hud +;; INFO: Return type mismatch int vs none. +(defun show-hud () + (with-pp + (when + (and + *target* + (or (not *progress-process*) (hidden? (-> *progress-process* 0))) + ) + (dotimes (gp-0 9) + (when (-> *hud-parts* parts gp-0) + (let ((a1-0 (new 'stack-no-clear 'event-message-block))) + (set! (-> a1-0 from) pp) + (set! (-> a1-0 num-params) 0) + (set! (-> a1-0 message) 'show) + (send-event-function + (ppointer->process (-> *hud-parts* parts gp-0)) + a1-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + ) + +;; definition for function set-hud-aspect-ratio +;; INFO: Return type mismatch int vs none. +(defun set-hud-aspect-ratio ((arg0 symbol) (arg1 symbol)) + (let ((gp-0 (= arg0 'aspect16x9)) + (s5-0 (= arg1 'pal)) + ) + (when *target* + (dotimes (s4-0 9) + (if (-> *hud-parts* parts s4-0) + (animate! + (-> (the-as (pointer hud) (-> *hud-parts* parts s4-0)) 0) + gp-0 + s5-0 + ) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for function hud-hidden? +(defun hud-hidden? () + (local-vars (gp-0 symbol)) + (cond + (*target* + (set! gp-0 #t) + (dotimes (s5-0 9) + (when (-> *hud-parts* parts s5-0) + (if + (not + (dummy-14 (-> (the-as (pointer hud) (-> *hud-parts* parts s5-0)) 0)) + ) + (set! gp-0 #f) + ) + ) + ) + ) + (else + (set! gp-0 #t) + ) + ) + gp-0 + ) + +;; definition for function bottom-hud-hidden? +(defun bottom-hud-hidden? () + (local-vars (gp-0 symbol)) + (cond + (*target* + (set! gp-0 #t) + (dotimes (s5-0 4) + (when (-> *hud-parts* parts (+ s5-0 4)) + (if + (not + (dummy-14 + (-> (the-as (pointer hud) (-> *hud-parts* parts (+ s5-0 4))) 0) + ) + ) + (set! gp-0 #f) + ) + ) + ) + ) + (else + (set! gp-0 #t) + ) + ) + gp-0 + ) + +;; definition for function activate-orb-all +(defun activate-orb-all ((arg0 int)) + (when (not (-> *hud-parts* money-all)) + (let ((s5-0 (get-process *default-dead-pool* hud-money-all #x4000))) + (set! (-> *hud-parts* money-all) (the-as (pointer hud-money-all) (when s5-0 + (let + ((t9-1 + (method-of-type + hud-money-all + activate + ) + ) + ) + (t9-1 + (the-as + hud-money-all + s5-0 + ) + *target* + 'hud-money-all + (the-as + pointer + #x70004000 + ) + ) + ) + (run-now-in-process + s5-0 + hud-init-by-other + arg0 + ) + (-> + s5-0 + ppointer + ) + ) + ) + ) + ) + ) + 0 + ) + +;; definition for function convert-to-hud-object +;; INFO: Return type mismatch int vs none. +(defbehavior convert-to-hud-object hud ((arg0 process-drawable) (arg1 hud)) + (when arg1 + (logclear! (-> arg0 mask) (process-mask actor-pause)) + (let ((s4-0 (new 'stack-no-clear 'vector))) + (transform-point-vector-scale! s4-0 (-> arg0 root trans)) + (set! (-> arg0 root trans x) (+ -2048.0 (-> s4-0 x))) + (set! (-> arg0 root trans y) (* 2.0 (+ -2048.0 (-> s4-0 y)))) + ) + (set! (-> arg0 root trans z) 9999999.0) + (set! (-> arg0 root trans w) 1.0) + (set-vector! + (-> arg0 root scale) + (inc-value arg1) + (dec-value arg1) + (inc-value arg1) + 1.0 + ) + (set! (-> arg0 draw dma-add-func) dma-add-process-drawable-hud) + (go hud-collecting (process->handle arg1)) + ) + 0 + (none) + ) diff --git a/test/decompiler/reference/engine/ui/hud-h_REF.gc b/test/decompiler/reference/engine/ui/hud-h_REF.gc index af1b80085..82db2ce61 100644 --- a/test/decompiler/reference/engine/ui/hud-h_REF.gc +++ b/test/decompiler/reference/engine/ui/hud-h_REF.gc @@ -64,12 +64,12 @@ (text-x int32 :offset-assert 164) (text-y int32 :offset-assert 168) (friend int32 :offset-assert 172) - (first-init basic :offset-assert 176) - (increment-on-event basic :offset-assert 180) + (first-init symbol :offset-assert 176) + (increment-on-event symbol :offset-assert 180) (skip-particle int32 :offset-assert 184) - (disable basic :offset-assert 188) - (force-on-screen basic :offset-assert 192) - (deactivate-when-hidden basic :offset-assert 196) + (disable symbol :offset-assert 188) + (force-on-screen symbol :offset-assert 192) + (deactivate-when-hidden symbol :offset-assert 196) (trigger-time uint64 :offset-assert 200) (last-hide-time uint64 :offset-assert 208) (nb-of-icons int32 :offset-assert 216) @@ -83,19 +83,19 @@ :size-assert #x118 :flag-assert #x1b00b00118 (:methods - (dummy-14 () none 14) - (dummy-15 () none 15) - (dummy-16 (_type_ int int) none 16) - (dummy-17 () none 17) - (dummy-18 () none 18) + (dummy-14 (_type_) none 14) + (dummy-15 (_type_) none 15) + (TODO-RENAME-16 (_type_ int int) none 16) + (dummy-17 (_type_) none 17) + (dummy-18 (_type_) none 18) (TODO-RENAME-19 (_type_) none 19) - (init-particles! (_type_) none 20) - (dummy-21 () none 21) - (dummy-22 () none 22) - (dummy-23 () none 23) - (dummy-24 () none 24) - (dummy-25 () none 25) - (dummy-26 () none 26) + (init-particles! (_type_ int) none 20) + (first-icon-x (_type_) int 21) + (first-icon-y (_type_) int 22) + (dummy-23 (_type_) none 23) + (animate! (_type_ symbol symbol) none 24) + (inc-value (_type_) float 25) + (dec-value (_type_) float 26) ) ) @@ -135,15 +135,16 @@ ;; definition of type hud-parts (deftype hud-parts (structure) - ((pickups (pointer hud-pickups) :offset-assert 0) - (money (pointer hud-money) :offset-assert 4) - (fuel-cell (pointer hud-fuel-cell) :offset-assert 8) - (health (pointer hud-health) :offset-assert 12) - (buzzers (pointer hud-buzzers) :offset-assert 16) - (power (pointer hud-power) :offset-assert 20) - (bike-speed (pointer hud-bike-speed) :offset-assert 24) - (bike-heat (pointer hud-bike-heat) :offset-assert 28) - (money-all (pointer hud-money-all) :offset-assert 32) + ((pickups (pointer hud-pickups) :offset-assert 0) + (money (pointer hud-money) :offset-assert 4) + (fuel-cell (pointer hud-fuel-cell) :offset-assert 8) + (health (pointer hud-health) :offset-assert 12) + (buzzers (pointer hud-buzzers) :offset-assert 16) + (power (pointer hud-power) :offset-assert 20) + (bike-speed (pointer hud-bike-speed) :offset-assert 24) + (bike-heat (pointer hud-bike-heat) :offset-assert 28) + (money-all (pointer hud-money-all) :offset-assert 32) + (parts (pointer process) 9 :offset 0) ) :method-count-assert 9 :size-assert #x24 diff --git a/test/decompiler/reference/levels/racer_common/racer-part_REF.gc b/test/decompiler/reference/levels/racer_common/racer-part_REF.gc index 88aa6c5c3..6a226dae6 100644 --- a/test/decompiler/reference/levels/racer_common/racer-part_REF.gc +++ b/test/decompiler/reference/levels/racer_common/racer-part_REF.gc @@ -517,7 +517,7 @@ ;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-19 hud-bike-heat ((obj hud-bike-heat)) (if *target* - (dummy-16 obj (the int (-> *target* racer heat)) 0) + (TODO-RENAME-16 obj (the int (-> *target* racer heat)) 0) ) 0 (none) @@ -525,7 +525,7 @@ ;; definition for method 20 of type hud-bike-heat ;; INFO: Return type mismatch int vs none. -(defmethod init-particles! hud-bike-heat ((obj hud-bike-heat)) +(defmethod init-particles! hud-bike-heat ((obj hud-bike-heat) (arg0 int)) (with-pp (push-setting! *setting-control* @@ -625,7 +625,7 @@ ;; INFO: Return type mismatch int vs none. (defmethod TODO-RENAME-19 hud-bike-speed ((obj hud-bike-speed)) (if *target* - (dummy-16 obj (the int (-> *target* control unknown-float01)) 0) + (TODO-RENAME-16 obj (the int (-> *target* control unknown-float01)) 0) ) 0 (none) @@ -633,7 +633,7 @@ ;; definition for method 20 of type hud-bike-speed ;; INFO: Return type mismatch int vs none. -(defmethod init-particles! hud-bike-speed ((obj hud-bike-speed)) +(defmethod init-particles! hud-bike-speed ((obj hud-bike-speed) (arg0 int)) (with-pp (push-setting! *setting-control*