Files
jak-project/test/decompiler/reference/jak2/levels/consite/consite-part_REF.gc
T
ManDude cd68cb671e 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-30 03:20:02 +00:00

432 lines
11 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type consite-part
(deftype consite-part (part-spawner)
()
)
;; definition for method 3 of type consite-part
(defmethod inspect ((this consite-part))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type part-spawner inspect)))
(t9-0 this)
)
(label cfg-4)
this
)
;; failed to figure out what this is:
(defpartgroup group-consite-spotlight
:id 1167
:flags (unk-4 unk-6)
:bounds (static-bspherem 0 0 0 5)
:rotate ((degrees 90) (degrees 0) (degrees 0))
:parts ((sp-item 5071 :flags (bit6 bit7) :hour-mask #b111111111110000000)
(sp-item 5072 :flags (bit6 bit7) :hour-mask #b111111111110000000)
)
)
;; failed to figure out what this is:
(defpart 5071
:init-specs ((:texture (new 'static 'texture-id :index #xbb :page #xc))
(:num 1.0)
(:z (meters 0.3))
(:scale-x (meters 4) (meters 0.1))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 117.0)
(:g 80.0)
(:b 54.0)
(:a 64.0)
(:omega (degrees 9015.75))
(:timer (seconds 0.017))
(:flags (glow))
(:userdata 2048.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5072
:init-specs ((:texture (new 'static 'texture-id :index #xbb :page #xc))
(:num 1.0)
(:z (meters 0.3))
(:scale-x (meters 12) (meters 0.1))
(:rot-x (degrees 4.5))
(:rot-z (degrees -17))
(:scale-y :copy scale-x)
(:r 128.0)
(:g 96.0)
(:b 62.0)
(:a 36.0)
(:omega (degrees 9015.75))
(:timer (seconds 0.017))
(:flags (glow))
(:userdata 2048.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpartgroup group-consite-tower-red-light
:id 1168
:bounds (static-bspherem 0 0 0 2)
:parts ((sp-item 5073))
)
;; failed to figure out what this is:
(defpart 5073
:init-specs ((:texture (new 'static 'texture-id :index #xbb :page #xc))
(:num 1.0)
(:scale-x (meters 3))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 0.0)
(:b 0.0)
(:a 32.0)
(:omega (degrees 11265.75))
(:timer (seconds 0.017))
(:flags (glow))
(:userdata 1024.0)
)
)
;; failed to figure out what this is:
(defpartgroup group-consite-arch-light :id 1169 :bounds (static-bspherem 0 0 0 2) :parts ((sp-item 5074)))
;; failed to figure out what this is:
(defpart 5074
:init-specs ((:texture (new 'static 'texture-id :index #xbb :page #xc))
(:num 1.0)
(:scale-x (meters 3))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 0.0)
(:b 0.0)
(:a 32.0)
(:omega (degrees 11265.75))
(:timer (seconds 0.017))
(:flags (glow))
(:userdata 1024.0)
)
)
;; failed to figure out what this is:
(defpartgroup group-consite-crane-fx :id 1170 :bounds (static-bspherem 0 0 0 2) :parts ((sp-item 5075)))
;; failed to figure out what this is:
(defpart 5075
:init-specs ((:texture (new 'static 'texture-id :index #xbb :page #xc))
(:num 1.0)
(:scale-x (meters 3))
(:rot-x (degrees 2.25))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 0.0)
(:b 0.0)
(:a 32.0)
(:omega (degrees 11265.75))
(:timer (seconds 0.017))
(:flags (glow))
(:userdata 1024.0)
)
)
;; failed to figure out what this is:
(defpartgroup group-consite-orange-skybox
:id 1171
:flags (unk-4)
:bounds (static-bspherem 0 0 0 10)
:parts ((sp-item 5076 :fade-after (meters 200) :flags (bit6 bit7))
(sp-item 5077 :fade-after (meters 200) :flags (bit6 bit7))
(sp-item 5078 :fade-after (meters 200) :flags (bit6 bit7))
)
)
;; failed to figure out what this is:
(defpartgroup group-consite-orange-skybox-corner
:id 1172
:flags (unk-4)
:bounds (static-bspherem 0 0 0 10)
:parts ((sp-item 5079 :fade-after (meters 200) :flags (bit6 bit7))
(sp-item 5080 :fade-after (meters 200) :flags (bit6 bit7))
(sp-item 5081 :fade-after (meters 200) :flags (bit6 bit7))
)
)
;; failed to figure out what this is:
(defpart 5076
:init-specs ((:texture (new 'static 'texture-id :index #xca :page #xc))
(:num 1.0)
(:x (meters -5))
(:scale-x (meters 12))
(:rot-x (degrees 11.25))
(:rot-z (degrees -17) (degrees 2))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 128.0 64.0)
(:b 0.0 32.0)
(:a 20.0 2.0)
(:omega (degrees 9015.75))
(:scalevel-x (meters -0.0016666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 4096.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5077
:init-specs ((:texture (new 'static 'texture-id :index #xca :page #xc))
(:num 1.0)
(:x (meters 0))
(:scale-x (meters 14))
(:rot-x (degrees 11.25))
(:rot-z (degrees -17) (degrees 2))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 128.0 64.0)
(:b 0.0 32.0)
(:a 20.0 2.0)
(:omega (degrees 9015.75))
(:scalevel-x (meters -0.0016666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 4096.0)
)
)
;; failed to figure out what this is:
(defpart 5078
:init-specs ((:texture (new 'static 'texture-id :index #xca :page #xc))
(:num 1.0)
(:x (meters 5))
(:scale-x (meters 14))
(:rot-x (degrees 11.25))
(:rot-z (degrees -17) (degrees 2))
(:scale-y (meters 14))
(:r 255.0)
(:g 128.0 64.0)
(:b 0.0 32.0)
(:a 20.0 2.0)
(:omega (degrees 9015.75))
(:scalevel-x (meters -0.0016666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 4096.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5079
:init-specs ((:texture (new 'static 'texture-id :index #xca :page #xc))
(:num 1.0)
(:x (meters -4))
(:z (meters -1.75))
(:scale-x (meters 12))
(:rot-x (degrees 11.25))
(:rot-z (degrees -17) (degrees 2))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 128.0 64.0)
(:b 0.0 32.0)
(:a 20.0 2.0)
(:omega (degrees 9015.75))
(:scalevel-x (meters -0.0016666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 4096.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5080
:init-specs ((:texture (new 'static 'texture-id :index #xca :page #xc))
(:num 1.0)
(:x (meters 0))
(:scale-x (meters 14))
(:rot-x (degrees 11.25))
(:rot-z (degrees -17) (degrees 2))
(:scale-y :copy scale-x)
(:r 255.0)
(:g 128.0 64.0)
(:b 0.0 32.0)
(:a 20.0 2.0)
(:omega (degrees 9015.75))
(:scalevel-x (meters -0.0016666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 4096.0)
)
)
;; failed to figure out what this is:
(defpart 5081
:init-specs ((:texture (new 'static 'texture-id :index #xca :page #xc))
(:num 1.0)
(:x (meters 4))
(:z (meters -1.75))
(:scale-x (meters 14))
(:rot-x (degrees 11.25))
(:rot-z (degrees -17) (degrees 2))
(:scale-y (meters 14))
(:r 255.0)
(:g 128.0 64.0)
(:b 0.0 32.0)
(:a 20.0 2.0)
(:omega (degrees 9015.75))
(:scalevel-x (meters -0.0016666667))
(:scalevel-y :copy scalevel-x)
(:timer (seconds 0.017))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 glow))
(:userdata 4096.0)
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpartgroup group-consite-small-pipe-steam
:id 1173
:flags (unk-4)
:bounds (static-bspherem 0 0 0 6)
:parts ((sp-item 5082 :fade-after (meters 60) :falloff-to (meters 60) :flags (bit7))
(sp-item 5083 :fade-after (meters 100) :falloff-to (meters 140) :flags (bit7))
)
)
;; failed to figure out what this is:
(defpart 5082
:init-specs ((:texture (new 'static 'texture-id :index #x92 :page #xc))
(:num 0.0 5.0)
(:scale-x (meters 0.1))
(:rot-x 4)
(:scale-y :copy scale-x)
(:r 128.0)
(:g :copy r)
(:b :copy g)
(:a 64.0 32.0)
(:omega (degrees 0.0225))
(:vel-z (meters 0.083333336) (meters 0.033333335))
(:fade-a -0.64 -0.64)
(:friction 0.93 0.025)
(:timer (seconds 0.5))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
(:func 'sparticle-motion-blur)
(:launchrot-x (degrees -7.5) (degrees 15))
(:launchrot-y (degrees -7.5) (degrees 15))
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5083
:init-specs ((:texture (new 'static 'texture-id :page #xc))
(:num 1.0 3.0)
(:scale-x (meters 0.5) (meters 0.25))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 64.0 128.0)
(:g :copy r)
(:b :copy g)
(:a 0.0)
(:vel-z (meters 0.083333336) (meters 0.033333335))
(:scalevel-x (meters 0.01) (meters 0.016666668))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:fade-a 0.96)
(:friction 0.93 0.025)
(:timer (seconds 0.5))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12))
(:next-time (seconds 0.085) (seconds 0.08))
(:next-launcher 5084)
(:launchrot-x (degrees -5) (degrees 10))
(:launchrot-y (degrees -5) (degrees 10))
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5084
:init-specs ((:fade-a -0.48 -0.48))
)
;; failed to figure out what this is:
(defpartgroup group-consite-large-pipe-steam
:id 1174
:flags (unk-4)
:bounds (static-bspherem 0 0 0 6)
:parts ((sp-item 5085 :fade-after (meters 60) :falloff-to (meters 60) :flags (bit7))
(sp-item 5086 :fade-after (meters 100) :falloff-to (meters 140) :flags (bit7))
)
)
;; failed to figure out what this is:
(defpart 5085
:init-specs ((:texture (new 'static 'texture-id :index #x92 :page #xc))
(:num 0.0 5.0)
(:scale-x (meters 0.1))
(:rot-x 4)
(:scale-y :copy scale-x)
(:r 128.0)
(:g :copy r)
(:b :copy g)
(:a 64.0 32.0)
(:omega (degrees 0.0225))
(:vel-z (meters 0.083333336) (meters 0.033333335))
(:fade-a -0.64 -0.64)
(:friction 0.93 0.025)
(:timer (seconds 0.5))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-12))
(:func 'sparticle-motion-blur)
(:launchrot-x (degrees -7.5) (degrees 15))
(:launchrot-y (degrees -7.5) (degrees 15))
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5086
:init-specs ((:texture (new 'static 'texture-id :page #xc))
(:num 1.0 3.0)
(:scale-x (meters 0.5) (meters 0.25))
(:rot-z (degrees 0) (degrees 360))
(:scale-y :copy scale-x)
(:r 64.0 128.0)
(:g :copy r)
(:b :copy g)
(:a 0.0)
(:vel-z (meters 0.083333336) (meters 0.033333335))
(:scalevel-x (meters 0.01) (meters 0.016666668))
(:rotvel-z (degrees -1.2) (degrees 2.4))
(:scalevel-y :copy scalevel-x)
(:fade-a 0.96)
(:friction 0.93 0.025)
(:timer (seconds 0.5))
(:flags (sp-cpuinfo-flag-2 sp-cpuinfo-flag-3 sp-cpuinfo-flag-12))
(:next-time (seconds 0.085) (seconds 0.08))
(:next-launcher 5087)
(:launchrot-x (degrees -5) (degrees 10))
(:launchrot-y (degrees -5) (degrees 10))
(:rotate-y (degrees 0))
)
)
;; failed to figure out what this is:
(defpart 5087
:init-specs ((:fade-a -0.48 -0.48))
)