jak-project/goal_src/jak1/levels/beach/mayor.gc

722 lines
25 KiB
Common Lisp
Raw Normal View History

;;-*-Lisp-*-
2020-09-04 14:44:23 -04:00
(in-package goal)
;; name: mayor.gc
;; name in dgo: mayor
;; dgos: BEA, L1
decomp: Continuing full pass of gameplay code (#839) * decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)` * decomp: almost finish `process-taskable` * blocked: mistycannon / pelican * decomp: finish `babak-with-cannon` write a script to fix gsrc * decomp: finish `process-taskable` * decomp: finish `flutflut` and `yakow` * decomp: finish `fishermans-boat` * blocked: state decomp `training-obs` * decomp: finish `muse` * decomp: finish `bonelurker` * blocked: state decomp in `quicksandlurker`| `balloonlurker` * decomp: finish `assistant-village2` * scripts: script to help updating goal_src * starting to update goal_src * tests: update ref tests * src: more src updating * src: waiting on `process-taskable` and `muse` * blocked: `citb-plat` state decomp * decomp: finish `square-platform` * blocked: `orbit-plat` due to overlays + static data * decomp: finish `qbert-plat` * blocked: almost finish `misty-conveyor`, sparticle-callback * blocked: jungle-mirrors * blocked: state decomp in `swamp-blimp` * decomp: finish `swamp-bat` * decomp: finish `swamp-rat` * decomp: finish `swamp-rat-nest` * blocked: state decomp `kermit` * decomp: finish `cavecrystal-light` * decomp: finish `spiderwebs` * blocked: state decomp `dark-crystal` * decomp: finish `baby-spider` * decomp: finish `mother-spider-h` * decomp: finish `mother-spider-proj` * blocked: state decomp in `gnawer` * blocked: state decomp in `driller-lurker` * blocked: `sun-exit-chamber` breaks when adding handle cast * decomp: finish `sunken-water` * blocked: `target-tube` ShortCircuitElement::push_to_stack * decomp: finish `sunken-fish` * blocked: `minecart` decomp crash when adding stack cast * decomp: finish `assistant-village3` * decomp: finish `sage-village3` * blocked: `cave-trap` done but ran into `go` issue * blocked: `spider-egg` state decomp * decomp: finish `target-snowball` * blocked/stuck: `target-ice` decomp issue around cpad * pausing: ice-cube has some weird collide-shape-prim handling * blocked: `snow-ball` state decomp * blocked: `snow-bumper` state decomp * decomp: finish `snow-ram-h` * decomp: finish `yeti` * decomp: finish `assistant-lavatube` * re-enable the float cast log * decomp: updating to new sparticle definitions * decomp: address feedback up to `swamp-rat-nest` * address remaining feedback * all-types: move the `pointer` def * add back temporary `hud-hidden?`
2021-09-28 20:42:00 -04:00
;; DECOMP BEGINS
(deftype mayor (process-taskable)
decomp: Continuing full pass of gameplay code (#839) * decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)` * decomp: almost finish `process-taskable` * blocked: mistycannon / pelican * decomp: finish `babak-with-cannon` write a script to fix gsrc * decomp: finish `process-taskable` * decomp: finish `flutflut` and `yakow` * decomp: finish `fishermans-boat` * blocked: state decomp `training-obs` * decomp: finish `muse` * decomp: finish `bonelurker` * blocked: state decomp in `quicksandlurker`| `balloonlurker` * decomp: finish `assistant-village2` * scripts: script to help updating goal_src * starting to update goal_src * tests: update ref tests * src: more src updating * src: waiting on `process-taskable` and `muse` * blocked: `citb-plat` state decomp * decomp: finish `square-platform` * blocked: `orbit-plat` due to overlays + static data * decomp: finish `qbert-plat` * blocked: almost finish `misty-conveyor`, sparticle-callback * blocked: jungle-mirrors * blocked: state decomp in `swamp-blimp` * decomp: finish `swamp-bat` * decomp: finish `swamp-rat` * decomp: finish `swamp-rat-nest` * blocked: state decomp `kermit` * decomp: finish `cavecrystal-light` * decomp: finish `spiderwebs` * blocked: state decomp `dark-crystal` * decomp: finish `baby-spider` * decomp: finish `mother-spider-h` * decomp: finish `mother-spider-proj` * blocked: state decomp in `gnawer` * blocked: state decomp in `driller-lurker` * blocked: `sun-exit-chamber` breaks when adding handle cast * decomp: finish `sunken-water` * blocked: `target-tube` ShortCircuitElement::push_to_stack * decomp: finish `sunken-fish` * blocked: `minecart` decomp crash when adding stack cast * decomp: finish `assistant-village3` * decomp: finish `sage-village3` * blocked: `cave-trap` done but ran into `go` issue * blocked: `spider-egg` state decomp * decomp: finish `target-snowball` * blocked/stuck: `target-ice` decomp issue around cpad * pausing: ice-cube has some weird collide-shape-prim handling * blocked: `snow-ball` state decomp * blocked: `snow-bumper` state decomp * decomp: finish `snow-ram-h` * decomp: finish `yeti` * decomp: finish `assistant-lavatube` * re-enable the float cast log * decomp: updating to new sparticle definitions * decomp: address feedback up to `swamp-rat-nest` * address remaining feedback * all-types: move the `pointer` def * add back temporary `hud-hidden?`
2021-09-28 20:42:00 -04:00
()
)
decomp: Continuing full pass of gameplay code (#839) * decomp: finish `babak` - :code is called in `(code nav-enemy-patrol babak)` * decomp: almost finish `process-taskable` * blocked: mistycannon / pelican * decomp: finish `babak-with-cannon` write a script to fix gsrc * decomp: finish `process-taskable` * decomp: finish `flutflut` and `yakow` * decomp: finish `fishermans-boat` * blocked: state decomp `training-obs` * decomp: finish `muse` * decomp: finish `bonelurker` * blocked: state decomp in `quicksandlurker`| `balloonlurker` * decomp: finish `assistant-village2` * scripts: script to help updating goal_src * starting to update goal_src * tests: update ref tests * src: more src updating * src: waiting on `process-taskable` and `muse` * blocked: `citb-plat` state decomp * decomp: finish `square-platform` * blocked: `orbit-plat` due to overlays + static data * decomp: finish `qbert-plat` * blocked: almost finish `misty-conveyor`, sparticle-callback * blocked: jungle-mirrors * blocked: state decomp in `swamp-blimp` * decomp: finish `swamp-bat` * decomp: finish `swamp-rat` * decomp: finish `swamp-rat-nest` * blocked: state decomp `kermit` * decomp: finish `cavecrystal-light` * decomp: finish `spiderwebs` * blocked: state decomp `dark-crystal` * decomp: finish `baby-spider` * decomp: finish `mother-spider-h` * decomp: finish `mother-spider-proj` * blocked: state decomp in `gnawer` * blocked: state decomp in `driller-lurker` * blocked: `sun-exit-chamber` breaks when adding handle cast * decomp: finish `sunken-water` * blocked: `target-tube` ShortCircuitElement::push_to_stack * decomp: finish `sunken-fish` * blocked: `minecart` decomp crash when adding stack cast * decomp: finish `assistant-village3` * decomp: finish `sage-village3` * blocked: `cave-trap` done but ran into `go` issue * blocked: `spider-egg` state decomp * decomp: finish `target-snowball` * blocked/stuck: `target-ice` decomp issue around cpad * pausing: ice-cube has some weird collide-shape-prim handling * blocked: `snow-ball` state decomp * blocked: `snow-bumper` state decomp * decomp: finish `snow-ram-h` * decomp: finish `yeti` * decomp: finish `assistant-lavatube` * re-enable the float cast log * decomp: updating to new sparticle definitions * decomp: address feedback up to `swamp-rat-nest` * address remaining feedback * all-types: move the `pointer` def * add back temporary `hud-hidden?`
2021-09-28 20:42:00 -04:00
(defskelgroup *mayor-sg* mayor mayor-lod0-jg mayor-idle-ja
((mayor-lod0-mg (meters 999999)))
:bounds (static-spherem 0 0 0 2.5)
:shadow mayor-shadow-mg
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod process-taskable-method-52 ((this mayor))
(let ((v1-1 (-> this draw shadow-ctrl)))
(when v1-1
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(let ((f0-0 (-> this root trans y)))
(let ((a0-2 v1-1))
(set! (-> a0-2 settings bot-plane w) (- (+ -2048.0 f0-0)))
)
0
(set! (-> v1-1 settings top-plane w) (- (+ 2048.0 f0-0)))
)
0
)
)
(none)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod draw-npc-shadow ((this mayor))
(-> this draw shadow-ctrl)
(cond
((and (-> this draw shadow)
(zero? (-> this draw cur-lod))
(logtest? (-> this draw status) (draw-status was-drawn))
)
(let ((v1-9 (-> this draw shadow-ctrl)))
(logclear! (-> v1-9 settings flags) (shadow-flags disable-draw))
)
0
(update-direction-from-time-of-day (-> this draw shadow-ctrl))
)
(else
(let ((v1-14 (-> this draw shadow-ctrl)))
(set! (-> v1-14 settings flags) (the-as shadow-flags (logior (the-as int (-> v1-14 settings flags)) 32)))
)
0
)
)
(none)
)
(defun mayor-lurkerm-reward-speech ((arg0 mayor) (arg1 symbol))
(when arg1
(set! (-> arg0 cell-for-task) (game-task jungle-lurkerm))
(close-specific-task! (game-task jungle-lurkerm) (task-status need-reward-speech))
(first-any (-> arg0 tasks) #t)
)
;; og:preserve-this PAL patch here
(new 'static 'spool-anim
:name "mayor-resolution-beams"
:index 7
:parts 6
:command-list '((0 setting-unset ambient-volume))
)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod play-anim! ((this mayor) (arg0 symbol))
(set! (-> this talk-message) (text-id press-to-talk))
(case (current-status (-> this tasks))
(((task-status need-hint) (task-status need-introduction))
(when arg0
(close-specific-task! (game-task jungle-lurkerm) (task-status need-introduction))
(close-specific-task! (game-task village1-mayor-money) (task-status need-introduction))
)
(cond
((closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder))
(mayor-lurkerm-reward-speech this arg0)
)
(else
(new 'static 'spool-anim :name "mayor-introduction" :index 4 :parts 16 :command-list '())
(new 'static 'spool-anim
:name "mayor-introduction"
:index 4
:parts 16
:command-list '((0 kill "villagea-part-65")
(0 kill "villagea-part-70")
(0 kill "med-res-level-2")
(0 kill "med-res-level-3")
(0 kill "med-res-level-4")
(0 kill "med-res-level-6")
(0 kill "med-res-level-7")
(0 kill "med-res-level-8")
(0 kill "med-res-level-11")
(0 kill "med-res-level-14")
(0 kill "fishermans-boat-2")
(0 kill "windspinner-9")
(0 kill "sagesail-6")
(0 kill "sharkey-12")
(0 kill "windmill-sail-4")
(0 kill "water-vol-7")
(0 kill "windspinner-8")
(0 kill "villagea-part-32")
(0 kill "water-vol-10")
(0 kill "ropebridge-4")
(0 kill "ropebridge-5")
(0 kill "reflector-end-1")
(0 kill "eco-10")
(0 kill "eco-11")
(0 kill "warp-gate-switch-3")
(0 kill "reflector-middle-2")
(0 kill "evilplant-2")
(0 kill "crate-3147")
(0 kill "villagea-water-2")
(0 kill "med-res-level-22")
(0 kill "med-res-level-23")
(0 kill "villagea-part-50")
(0 kill "water-vol-9")
(0 kill "crate-3144")
(0 kill "orb-cache-top-4")
(0 kill "village-cam-2")
(0 kill "villagea-part-18")
(0 kill "villagea-part-24")
(0 kill "money-2676")
(0 kill "villagea-part-64")
(0 kill "villagea-part-13")
(0 kill "villagea-part-17")
(0 kill "money-2689")
(0 kill "money-2690")
(0 kill "farmer-3")
(0 kill "villagea-part-26")
(0 kill "money-2692")
(0 kill "villagea-part-37")
(0 kill "villagea-part-38")
(0 kill "villagea-part-64")
(0 kill "crate-3142")
(0 kill "crate-3143")
(0 kill "money-2688")
(0 kill "villagea-part-14")
(0 kill "money-2691")
(0 kill "villagea-part-62")
(0 kill "villagea-part-63")
(0 kill "sharkey-1")
(0 kill "eco-82")
(0 kill "eco-83")
(0 kill "crate-2470")
(0 kill "villagea-part-3")
(0 kill "villagea-part-15")
(0 kill "villagea-part-22")
(0 kill "villagea-part-28")
(0 kill "explorer-4")
(0 kill "oracle-1")
(0 kill "crate-3141")
(0 kill "crate-3145")
(0 kill "water-vol-8")
(0 kill "water-vol-63")
(0 kill "lrocklrg-1")
(0 kill "crate-2469")
(0 kill "villagea-part-69")
(0 display-level beach special)
(565 joint "cameraB")
(850 joint "camera")
(915 joint "cameraB")
)
)
)
)
)
(((task-status need-reminder-a) (task-status need-reminder))
(set! (-> this skippable) #t)
(cond
((closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reward-speech))
(new 'static 'spool-anim
:name "mayor-reminder-donation"
:index 6
:parts 3
:command-list '((0 kill "villagea-part-65")
(0 kill "villagea-part-70")
(0 kill "med-res-level-2")
(0 kill "med-res-level-3")
(0 kill "med-res-level-4")
(0 kill "med-res-level-6")
(0 kill "med-res-level-7")
(0 kill "med-res-level-8")
(0 kill "med-res-level-11")
(0 kill "med-res-level-14")
(0 kill "fishermans-boat-2")
(0 kill "windspinner-9")
(0 kill "sagesail-6")
(0 kill "sharkey-12")
(0 kill "windmill-sail-4")
(0 kill "water-vol-7")
(0 kill "windspinner-8")
(0 kill "villagea-part-32")
(0 kill "water-vol-10")
(0 kill "ropebridge-4")
(0 kill "ropebridge-5")
(0 kill "reflector-end-1")
(0 kill "eco-10")
(0 kill "eco-11")
(0 kill "warp-gate-switch-3")
(0 kill "reflector-middle-2")
(0 kill "evilplant-2")
(0 kill "crate-3147")
(0 kill "villagea-water-2")
(0 kill "med-res-level-22")
(0 kill "med-res-level-23")
(0 kill "villagea-part-50")
(0 kill "water-vol-9")
(0 kill "crate-3144")
(0 kill "orb-cache-top-4")
(0 kill "village-cam-2")
(0 kill "villagea-part-18")
(0 kill "villagea-part-24")
(0 kill "money-2676")
(0 kill "villagea-part-64")
(0 kill "villagea-part-13")
(0 kill "villagea-part-17")
(0 kill "money-2689")
(0 kill "money-2690")
(0 kill "farmer-3")
(0 kill "villagea-part-26")
(0 kill "money-2692")
(0 kill "villagea-part-37")
(0 kill "villagea-part-38")
(0 kill "villagea-part-64")
(0 kill "crate-3142")
(0 kill "crate-3143")
(0 kill "money-2688")
(0 kill "villagea-part-14")
(0 kill "money-2691")
(0 kill "villagea-part-62")
(0 kill "villagea-part-63")
(0 kill "sharkey-1")
(0 kill "eco-82")
(0 kill "eco-83")
(0 kill "crate-2470")
(0 kill "villagea-part-3")
(0 kill "villagea-part-15")
(0 kill "villagea-part-22")
(0 kill "villagea-part-28")
(0 kill "explorer-4")
(0 kill "oracle-1")
(0 kill "crate-3141")
(0 kill "crate-3145")
(0 kill "water-vol-8")
(0 kill "water-vol-63")
(0 kill "lrocklrg-1")
(0 kill "crate-2469")
(0 kill "villagea-part-69")
(0 display-level beach special)
)
)
)
((closed? (-> this tasks) (game-task village1-mayor-money) (task-status need-reward-speech))
(new 'static 'spool-anim
:name "mayor-reminder-beams"
:index 5
:parts 3
:command-list '((0 kill "villagea-part-65")
(0 kill "villagea-part-70")
(0 kill "med-res-level-2")
(0 kill "med-res-level-3")
(0 kill "med-res-level-4")
(0 kill "med-res-level-6")
(0 kill "med-res-level-7")
(0 kill "med-res-level-8")
(0 kill "med-res-level-11")
(0 kill "med-res-level-14")
(0 kill "fishermans-boat-2")
(0 kill "windspinner-9")
(0 kill "sagesail-6")
(0 kill "sharkey-12")
(0 kill "windmill-sail-4")
(0 kill "water-vol-7")
(0 kill "windspinner-8")
(0 kill "villagea-part-32")
(0 kill "water-vol-10")
(0 kill "ropebridge-4")
(0 kill "ropebridge-5")
(0 kill "reflector-end-1")
(0 kill "eco-10")
(0 kill "eco-11")
(0 kill "warp-gate-switch-3")
(0 kill "reflector-middle-2")
(0 kill "evilplant-2")
(0 kill "crate-3147")
(0 kill "villagea-water-2")
(0 kill "med-res-level-22")
(0 kill "med-res-level-23")
(0 kill "villagea-part-50")
(0 kill "water-vol-9")
(0 kill "crate-3144")
(0 kill "orb-cache-top-4")
(0 kill "village-cam-2")
(0 kill "villagea-part-18")
(0 kill "villagea-part-24")
(0 kill "money-2676")
(0 kill "villagea-part-64")
(0 kill "villagea-part-13")
(0 kill "villagea-part-17")
(0 kill "money-2689")
(0 kill "money-2690")
(0 kill "farmer-3")
(0 kill "villagea-part-26")
(0 kill "money-2692")
(0 kill "villagea-part-37")
(0 kill "villagea-part-38")
(0 kill "villagea-part-64")
(0 kill "crate-3142")
(0 kill "crate-3143")
(0 kill "money-2688")
(0 kill "villagea-part-14")
(0 kill "money-2691")
(0 kill "villagea-part-62")
(0 kill "villagea-part-63")
(0 kill "sharkey-1")
(0 kill "eco-82")
(0 kill "eco-83")
(0 kill "crate-2470")
(0 kill "villagea-part-3")
(0 kill "villagea-part-15")
(0 kill "villagea-part-22")
(0 kill "villagea-part-28")
(0 kill "explorer-4")
(0 kill "oracle-1")
(0 kill "crate-3141")
(0 kill "crate-3145")
(0 kill "water-vol-8")
(0 kill "water-vol-63")
(0 kill "lrocklrg-1")
(0 kill "crate-2469")
(0 kill "villagea-part-69")
(0 display-level beach special)
)
)
)
((zero? (get-reminder (-> this tasks) 0))
(if arg0
(save-reminder (-> this tasks) 1 0)
)
(new 'static 'spool-anim
:name "mayor-reminder-beams"
:index 5
:parts 3
:command-list '((0 kill "villagea-part-65")
(0 kill "villagea-part-70")
(0 kill "med-res-level-2")
(0 kill "med-res-level-3")
(0 kill "med-res-level-4")
(0 kill "med-res-level-6")
(0 kill "med-res-level-7")
(0 kill "med-res-level-8")
(0 kill "med-res-level-11")
(0 kill "med-res-level-14")
(0 kill "fishermans-boat-2")
(0 kill "windspinner-9")
(0 kill "sagesail-6")
(0 kill "sharkey-12")
(0 kill "windmill-sail-4")
(0 kill "water-vol-7")
(0 kill "windspinner-8")
(0 kill "villagea-part-32")
(0 kill "water-vol-10")
(0 kill "ropebridge-4")
(0 kill "ropebridge-5")
(0 kill "reflector-end-1")
(0 kill "eco-10")
(0 kill "eco-11")
(0 kill "warp-gate-switch-3")
(0 kill "reflector-middle-2")
(0 kill "evilplant-2")
(0 kill "crate-3147")
(0 kill "villagea-water-2")
(0 kill "med-res-level-22")
(0 kill "med-res-level-23")
(0 kill "villagea-part-50")
(0 kill "water-vol-9")
(0 kill "crate-3144")
(0 kill "orb-cache-top-4")
(0 kill "village-cam-2")
(0 kill "villagea-part-18")
(0 kill "villagea-part-24")
(0 kill "money-2676")
(0 kill "villagea-part-64")
(0 kill "villagea-part-13")
(0 kill "villagea-part-17")
(0 kill "money-2689")
(0 kill "money-2690")
(0 kill "farmer-3")
(0 kill "villagea-part-26")
(0 kill "money-2692")
(0 kill "villagea-part-37")
(0 kill "villagea-part-38")
(0 kill "villagea-part-64")
(0 kill "crate-3142")
(0 kill "crate-3143")
(0 kill "money-2688")
(0 kill "villagea-part-14")
(0 kill "money-2691")
(0 kill "villagea-part-62")
(0 kill "villagea-part-63")
(0 kill "sharkey-1")
(0 kill "eco-82")
(0 kill "eco-83")
(0 kill "crate-2470")
(0 kill "villagea-part-3")
(0 kill "villagea-part-15")
(0 kill "villagea-part-22")
(0 kill "villagea-part-28")
(0 kill "explorer-4")
(0 kill "oracle-1")
(0 kill "crate-3141")
(0 kill "crate-3145")
(0 kill "water-vol-8")
(0 kill "water-vol-63")
(0 kill "lrocklrg-1")
(0 kill "crate-2469")
(0 kill "villagea-part-69")
(0 display-level beach special)
)
)
)
(else
(if arg0
(save-reminder (-> this tasks) 0 0)
)
(new 'static 'spool-anim
:name "mayor-reminder-donation"
:index 6
:parts 3
:command-list '((0 kill "villagea-part-65")
(0 kill "villagea-part-70")
(0 kill "med-res-level-2")
(0 kill "med-res-level-3")
(0 kill "med-res-level-4")
(0 kill "med-res-level-6")
(0 kill "med-res-level-7")
(0 kill "med-res-level-8")
(0 kill "med-res-level-11")
(0 kill "med-res-level-14")
(0 kill "fishermans-boat-2")
(0 kill "windspinner-9")
(0 kill "sagesail-6")
(0 kill "sharkey-12")
(0 kill "windmill-sail-4")
(0 kill "water-vol-7")
(0 kill "windspinner-8")
(0 kill "villagea-part-32")
(0 kill "water-vol-10")
(0 kill "ropebridge-4")
(0 kill "ropebridge-5")
(0 kill "reflector-end-1")
(0 kill "eco-10")
(0 kill "eco-11")
(0 kill "warp-gate-switch-3")
(0 kill "reflector-middle-2")
(0 kill "evilplant-2")
(0 kill "crate-3147")
(0 kill "villagea-water-2")
(0 kill "med-res-level-22")
(0 kill "med-res-level-23")
(0 kill "villagea-part-50")
(0 kill "water-vol-9")
(0 kill "crate-3144")
(0 kill "orb-cache-top-4")
(0 kill "village-cam-2")
(0 kill "villagea-part-18")
(0 kill "villagea-part-24")
(0 kill "money-2676")
(0 kill "villagea-part-64")
(0 kill "villagea-part-13")
(0 kill "villagea-part-17")
(0 kill "money-2689")
(0 kill "money-2690")
(0 kill "farmer-3")
(0 kill "villagea-part-26")
(0 kill "money-2692")
(0 kill "villagea-part-37")
(0 kill "villagea-part-38")
(0 kill "villagea-part-64")
(0 kill "crate-3142")
(0 kill "crate-3143")
(0 kill "money-2688")
(0 kill "villagea-part-14")
(0 kill "money-2691")
(0 kill "villagea-part-62")
(0 kill "villagea-part-63")
(0 kill "sharkey-1")
(0 kill "eco-82")
(0 kill "eco-83")
(0 kill "crate-2470")
(0 kill "villagea-part-3")
(0 kill "villagea-part-15")
(0 kill "villagea-part-22")
(0 kill "villagea-part-28")
(0 kill "explorer-4")
(0 kill "oracle-1")
(0 kill "crate-3141")
(0 kill "crate-3145")
(0 kill "water-vol-8")
(0 kill "water-vol-63")
(0 kill "lrocklrg-1")
(0 kill "crate-2469")
(0 kill "villagea-part-69")
(0 display-level beach special)
)
)
)
)
)
(((task-status need-reward-speech))
(if (not arg0)
(set! (-> this will-talk) #t)
)
(case (current-task (-> this tasks))
(((game-task jungle-lurkerm))
(mayor-lurkerm-reward-speech this arg0)
)
(else
(cond
(arg0
(set! (-> this cell-for-task) (current-task (-> this tasks)))
(close-current! (-> this tasks))
(send-event *target* 'get-pickup 5 (- (-> *GAME-bank* money-task-inc)))
)
(else
(set! (-> this talk-message) (text-id press-to-trade-money))
)
)
(new 'static 'spool-anim
:name "mayor-resolution-donation"
:index 8
:parts 5
:command-list '((0 kill "villagea-part-65")
(0 kill "villagea-part-70")
(0 kill "med-res-level-2")
(0 kill "med-res-level-3")
(0 kill "med-res-level-4")
(0 kill "med-res-level-6")
(0 kill "med-res-level-7")
(0 kill "med-res-level-8")
(0 kill "med-res-level-11")
(0 kill "med-res-level-14")
(0 kill "fishermans-boat-2")
(0 kill "windspinner-9")
(0 kill "sagesail-6")
(0 kill "sharkey-12")
(0 kill "windmill-sail-4")
(0 kill "water-vol-7")
(0 kill "windspinner-8")
(0 kill "villagea-part-32")
(0 kill "water-vol-10")
(0 kill "ropebridge-4")
(0 kill "ropebridge-5")
(0 kill "reflector-end-1")
(0 kill "eco-10")
(0 kill "eco-11")
(0 kill "warp-gate-switch-3")
(0 kill "reflector-middle-2")
(0 kill "evilplant-2")
(0 kill "crate-3147")
(0 kill "villagea-water-2")
(0 kill "med-res-level-22")
(0 kill "med-res-level-23")
(0 kill "villagea-part-50")
(0 kill "water-vol-9")
(0 kill "crate-3144")
(0 kill "orb-cache-top-4")
(0 kill "village-cam-2")
(0 kill "villagea-part-18")
(0 kill "villagea-part-24")
(0 kill "money-2676")
(0 kill "villagea-part-64")
(0 kill "villagea-part-13")
(0 kill "villagea-part-17")
(0 kill "money-2689")
(0 kill "money-2690")
(0 kill "farmer-3")
(0 kill "villagea-part-26")
(0 kill "money-2692")
(0 kill "villagea-part-37")
(0 kill "villagea-part-38")
(0 kill "villagea-part-64")
(0 kill "crate-3142")
(0 kill "crate-3143")
(0 kill "money-2688")
(0 kill "villagea-part-14")
(0 kill "money-2691")
(0 kill "villagea-part-62")
(0 kill "villagea-part-63")
(0 kill "sharkey-1")
(0 kill "eco-82")
(0 kill "eco-83")
(0 kill "crate-2470")
(0 kill "villagea-part-3")
(0 kill "villagea-part-15")
(0 kill "villagea-part-22")
(0 kill "villagea-part-28")
(0 kill "explorer-4")
(0 kill "oracle-1")
(0 kill "crate-3141")
(0 kill "crate-3145")
(0 kill "water-vol-8")
(0 kill "water-vol-63")
(0 kill "lrocklrg-1")
(0 kill "crate-2469")
(0 kill "villagea-part-69")
(0 display-level beach special)
)
)
)
)
)
(else
(if arg0
(format
0
"ERROR: <GMJ>: ~S playing anim for task status ~S~%"
(-> this name)
(task-status->string (current-status (-> this tasks)))
)
)
(-> this draw art-group data 3)
)
)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod get-art-elem ((this mayor))
(-> this draw art-group data 3)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod should-display? ((this mayor))
(if *target*
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(< (- (-> (target-pos 0) z) (-> this root trans z)) 57344.0)
(< (- (-> (camera-pos) z) (-> this root trans z)) 57344.0)
)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod process-taskable-method-43 ((this mayor))
(when (ambient-control-method-10 (-> this ambient) (new 'stack-no-clear 'vector) (seconds 30) 122880.0 this)
(let ((f0-2 (rand-float-gen)))
(cond
((< 0.8888889 f0-2)
(if (not (closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-LO01" #f (-> this root trans))
)
)
((< 0.7777778 f0-2)
(if (not (closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-LO02" #f (-> this root trans))
)
)
((< 0.6666667 f0-2)
(if (not (closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM07" #f (-> this root trans))
)
)
((< 0.5555556 f0-2)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM06" #f (-> this root trans))
)
((< 0.44444445 f0-2)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM05" #f (-> this root trans))
)
((< 0.33333334 f0-2)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM04" #f (-> this root trans))
)
((< 0.22222222 f0-2)
(if (not (closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM03" #f (-> this root trans))
)
)
((< 0.11111111 f0-2)
(if (not (closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM02" #f (-> this root trans))
)
)
(else
(if (not (closed? (-> this tasks) (game-task jungle-lurkerm) (task-status need-reminder)))
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(play-ambient (-> this ambient) "CHI-AM01" #f (-> this root trans))
)
)
)
)
)
)
(defstate idle (mayor)
:virtual #t
:trans (behavior ()
(if (not (should-display? self))
(go-virtual hidden)
)
((-> (method-of-type process-taskable idle) trans))
)
:post (behavior ()
(let ((t9-0 (-> (method-of-type process-taskable idle) post)))
(if t9-0
((the-as (function none) t9-0))
)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(do-push-aways! (-> self root))
)
)
`deftype` and `defmethod` syntax major changes (#3094) Major change to how `deftype` shows up in our code: - the decompiler will no longer emit the `offset-assert`, `method-count-assert`, `size-assert` and `flag-assert` parameters. There are extremely few cases where having this in the decompiled code is helpful, as the types there come from `all-types` which already has those parameters. This also doesn't break type consistency because: - the asserts aren't compared. - the first step of the test uses `all-types`, which has the asserts, which will throw an error if they're bad. - the decompiler won't emit the `heap-base` parameter unless necessary now. - the decompiler will try its hardest to turn a fixed-offset field into an `overlay-at` field. It falls back to the old offset if all else fails. - `overlay-at` now supports field "dereferencing" to specify the offset that's within a field that's a structure, e.g.: ```lisp (deftype foobar (structure) ((vec vector :inline) (flags int32 :overlay-at (-> vec w)) ) ) ``` in this structure, the offset of `flags` will be 12 because that is the final offset of `vec`'s `w` field within this structure. - **removed ID from all method declarations.** IDs are only ever automatically assigned now. Fixes #3068. - added an `:overlay` parameter to method declarations, in order to declare a new method that goes on top of a previously-defined method. Syntax is `:overlay <method-name>`. Please do not ever use this. - added `state-methods` list parameter. This lets you quickly specify a list of states to be put in the method table. Same syntax as the `states` list parameter. The decompiler will try to put as many states in this as it can without messing with the method ID order. Also changes `defmethod` to make the first type definition (before the arguments) optional. The type can now be inferred from the first argument. Fixes #3093. --------- Co-authored-by: Hat Kid <6624576+Hat-Kid@users.noreply.github.com>
2023-10-29 23:20:02 -04:00
(defmethod init-from-entity! ((this mayor) (arg0 entity-actor))
(process-taskable-method-40 this arg0 *mayor-sg* 3 51 (new 'static 'vector :y 4096.0 :w 4096.0) 5)
(set! (-> this bounce-away) #f)
(set! (-> this tasks) (get-task-control (game-task jungle-lurkerm)))
(set! (-> this sound-flava) (music-flava mayor))
(set! (-> this draw light-index) (the-as uint 2))
(process-taskable-method-42 this)
(none)
)