mirror of
https://github.com/open-goal/jak-project
synced 2026-09-12 12:55:22 -04:00
cd68cb671e
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>
185 lines
5.0 KiB
Common Lisp
Vendored
Generated
185 lines
5.0 KiB
Common Lisp
Vendored
Generated
;;-*-Lisp-*-
|
|
(in-package goal)
|
|
|
|
;; definition of type robocave-part
|
|
(deftype robocave-part (part-spawner)
|
|
()
|
|
)
|
|
|
|
;; definition for method 3 of type robocave-part
|
|
(defmethod inspect ((this robocave-part))
|
|
(let ((t9-0 (method-of-type part-spawner inspect)))
|
|
(t9-0 this)
|
|
)
|
|
this
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpartgroup group-part-robocave-torch
|
|
:id 506
|
|
:bounds (static-bspherem 0 3 0 4)
|
|
:parts ((sp-item 729 :fade-after (meters 150) :falloff-to (meters 180))
|
|
(sp-item 730 :fade-after (meters 100) :falloff-to (meters 100))
|
|
(sp-item 731 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 2) :length (seconds 0.3))
|
|
(sp-item 732 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 1.23) :length (seconds 0.23))
|
|
(sp-item 733 :fade-after (meters 40) :falloff-to (meters 40) :period (seconds 2.367) :length (seconds 0.17))
|
|
(sp-item 734 :fade-after (meters 30) :falloff-to (meters 30))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 734
|
|
:init-specs ((:num 0.3)
|
|
(:x (meters 0.2))
|
|
(:y (meters 1) (meters 1))
|
|
(:rot-x 5)
|
|
(:r 4096.0)
|
|
(:g 2867.2)
|
|
(:b 3276.8)
|
|
(:vel-x (meters 0) (meters 0.006666667))
|
|
(:vel-y (meters 0.026666667))
|
|
(:timer (seconds 0.6))
|
|
(:flags (aux-list))
|
|
(:next-time (seconds 0.4))
|
|
(:next-launcher 735)
|
|
(:rotate-y (degrees 0) (degrees 360))
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 735
|
|
:init-specs ((:fade-b -6.826667))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 729
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
(:num 1.4 1 0.5)
|
|
(:x (meters -0.35) (meters 0.7))
|
|
(:z (meters -0.35) (meters 0.7))
|
|
(:scale-x (meters 0.6) (meters 0.3))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0 128.0)
|
|
(:g 0.0 60.0)
|
|
(:a 0.0)
|
|
(:vel-y (meters 0.016666668) (meters 0.013333334))
|
|
(:rotvel-z (degrees -0.1) (degrees 0.2))
|
|
(:fade-a 13.066667)
|
|
(:accel-y (meters -0.0002))
|
|
(:timer (seconds 0.25))
|
|
(:flags (bit2 bit3))
|
|
(:next-time (seconds 0.05))
|
|
(:next-launcher 736)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 736
|
|
:init-specs ((:fade-a -1.3333334))
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 731
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
(:num 1.5)
|
|
(:x (meters -0.4) (meters 0.8))
|
|
(:y (meters 1))
|
|
(:z (meters -0.4) (meters 0.8))
|
|
(:scale-x (meters 0.6) (meters 0.3))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0 128.0)
|
|
(:g 0.0 60.0)
|
|
(:a 0.0)
|
|
(:vel-y (meters 0.02) (meters 0.006666667))
|
|
(:rotvel-z (degrees -0.1) (degrees 0.2))
|
|
(:fade-a 13.066667)
|
|
(:accel-y (meters -0.0002))
|
|
(:timer (seconds 0.35))
|
|
(:flags (bit2 bit3))
|
|
(:next-time (seconds 0.05))
|
|
(:next-launcher 736)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 732
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
(:num 1.5)
|
|
(:x (meters -0.2) (meters 0.6))
|
|
(:y (meters 0.5))
|
|
(:z (meters 0) (meters 0.4))
|
|
(:scale-x (meters 0.6) (meters 0.3))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0 128.0)
|
|
(:g 0.0 60.0)
|
|
(:a 0.0)
|
|
(:vel-y (meters 0.018333333) (meters 0.0033333334))
|
|
(:rotvel-z (degrees -0.1) (degrees 0.2))
|
|
(:fade-a 13.066667)
|
|
(:accel-y (meters -0.0002))
|
|
(:timer (seconds 0.35))
|
|
(:flags (bit2 bit3))
|
|
(:next-time (seconds 0.05))
|
|
(:next-launcher 736)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 733
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
(:num 2.0)
|
|
(:x (meters 0) (meters 0.2))
|
|
(:y (meters 0.6))
|
|
(:z (meters -0.6) (meters 0.6))
|
|
(:scale-x (meters 0.7) (meters 0.4))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0 128.0)
|
|
(:g 0.0 60.0)
|
|
(:a 0.0)
|
|
(:vel-y (meters 0.018333333) (meters 0.005))
|
|
(:rotvel-z (degrees -0.1) (degrees 0.2))
|
|
(:fade-a 13.066667)
|
|
(:accel-y (meters -0.0002))
|
|
(:timer (seconds 0.35))
|
|
(:flags (bit2 bit3))
|
|
(:next-time (seconds 0.05))
|
|
(:next-launcher 736)
|
|
)
|
|
)
|
|
|
|
;; failed to figure out what this is:
|
|
(defpart 730
|
|
:init-specs ((:texture (new 'static 'texture-id :page #x2))
|
|
(:num 0.4)
|
|
(:x (meters -0.5) (meters 1))
|
|
(:y (meters 0.3))
|
|
(:z (meters -0.5) (meters 1))
|
|
(:scale-x (meters 1) (meters 0.5))
|
|
(:rot-z (degrees 0) (degrees 360))
|
|
(:scale-y :copy scale-x)
|
|
(:r 128.0)
|
|
(:g 96.0)
|
|
(:b 96.0)
|
|
(:a 16.0 32.0)
|
|
(:vel-y (meters 0.01))
|
|
(:scalevel-x (meters 0.0005))
|
|
(:rotvel-z (degrees -0.26666668) 1 (degrees 0.53333336))
|
|
(:scalevel-y :copy scalevel-x)
|
|
(:fade-r -0.10666667)
|
|
(:fade-g -0.053333335)
|
|
(:fade-b -0.053333335)
|
|
(:fade-a -0.08)
|
|
(:accel-x (meters 0.00006666667))
|
|
(:accel-y (meters 0.000033333334))
|
|
(:friction 0.9975)
|
|
(:timer (seconds 2))
|
|
(:flags (bit2))
|
|
(:conerot-x (degrees 0) (degrees 5))
|
|
(:conerot-y (degrees 0) (degrees 360))
|
|
)
|
|
)
|