Files
jak-project/test/decompiler/reference/jak2/engine/scene/scene-h_REF.gc
T
Hat Kid fc43870d85 decompiler: obj -> this, set-time! and time-elapsed? macros (#3026)
This renames the method object in `defmethod`s to `this` and adds
detection for the `set-time!` and `time-elapsed?` macros.

Definitely my biggest PR yet...
2023-09-26 15:17:00 +01:00

220 lines
9.7 KiB
Common Lisp
Vendored
Generated

;;-*-Lisp-*-
(in-package goal)
;; definition of type scene-actor
(deftype scene-actor (basic)
((name string :offset-assert 4)
(level symbol :offset-assert 8)
(art-group string :offset-assert 12)
(prefix string :offset-assert 16)
(draw-frames pair :offset-assert 20)
(scissor-frames pair :offset-assert 24)
(camera int16 :offset-assert 28)
(light-index uint8 :offset-assert 30)
(shadow-mask uint8 :offset-assert 31)
(shadow-values uint32 :offset-assert 32)
(flags uint32 :offset-assert 36)
(command-list basic :offset-assert 40)
(shadow-flags int32 :offset-assert 44)
(shadow-volume-joint basic :offset-assert 48)
(draw-seg uint64 :offset-assert 56)
(no-draw-seg uint64 :offset-assert 64)
(process handle :offset-assert 72)
)
:method-count-assert 10
:size-assert #x50
:flag-assert #xa00000050
(:methods
(scene-actor-method-9 (_type_ scene-player) (pointer process) 9)
)
)
;; definition for method 3 of type scene-actor
(defmethod inspect scene-actor ((this scene-actor))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tlevel: ~A~%" (-> this level))
(format #t "~1Tart-group: ~A~%" (-> this art-group))
(format #t "~1Tprefix: ~A~%" (-> this prefix))
(format #t "~1Tdraw-frames: ~A~%" (-> this draw-frames))
(format #t "~1Tscissor-frames: ~A~%" (-> this scissor-frames))
(format #t "~1Tcamera: ~D~%" (-> this camera))
(format #t "~1Tlight-index: ~D~%" (-> this light-index))
(format #t "~1Tshadow-mask: ~D~%" (-> this shadow-mask))
(format #t "~1Tshadow-values: ~D~%" (-> this shadow-values))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tcommand-list: ~A~%" (-> this command-list))
(format #t "~1Tshadow-flags: ~D~%" (-> this shadow-flags))
(format #t "~1Tshadow-volume-joint: ~A~%" (-> this shadow-volume-joint))
(format #t "~1Tdraw-seg: ~D~%" (-> this draw-seg))
(format #t "~1Tno-draw-seg: ~D~%" (-> this no-draw-seg))
(format #t "~1Tprocess: ~D~%" (-> this process))
(label cfg-4)
this
)
;; definition of type scene
(deftype scene (art-group)
((mask-to-clear process-mask :offset-assert 32)
(entity string :offset-assert 36)
(art-group string :offset-assert 40)
(anim string :offset-assert 44)
(parts int32 :offset-assert 48)
(command-list pair :offset-assert 52)
(cut-list pair :offset-assert 56)
(wait-max-time time-frame :offset-assert 64)
(wait-air-time time-frame :offset-assert 72)
(wait-ground-time time-frame :offset-assert 80)
(draw-target symbol :offset-assert 88)
(abort symbol :offset-assert 92)
(actor (array scene-actor) :offset-assert 96)
(load-point-obj object :offset-assert 100)
(load-point continue-point :offset 100)
(load-point-name string :offset 100)
(end-point-obj object :offset-assert 104)
(end-point continue-point :offset 104)
(end-point-name string :offset 104)
(borrow pair :offset-assert 108)
(sfx-volume float :offset-assert 112)
(ambient-volume float :offset-assert 116)
(music-volume float :offset-assert 120)
(blackout-end symbol :offset-assert 124)
(peaceful symbol :offset-assert 128)
(music-delay float :offset-assert 132)
(save symbol :offset-assert 136)
(scene-task uint16 :offset-assert 140)
)
:method-count-assert 17
:size-assert #x8e
:flag-assert #x110000008e
(:methods
(scene-method-15 (_type_ spool-anim) none 15)
(scene-method-16 (_type_) _type_ 16)
)
)
;; definition for method 3 of type scene
(defmethod inspect scene ((this scene))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Textra: ~A~%" (-> this extra))
(format #t "~1Tinfo: ~A~%" (-> this info))
(format #t "~1Tdata[0] @ #x~X~%" (&-> this mask-to-clear))
(format #t "~1Tmask-to-clear: ~D~%" (-> this mask-to-clear))
(format #t "~1Tentity: ~A~%" (-> this entity))
(format #t "~1Tart-group: ~A~%" (-> this art-group))
(format #t "~1Tanim: ~A~%" (-> this anim))
(format #t "~1Tparts: ~D~%" (-> this parts))
(format #t "~1Tcommand-list: ~A~%" (-> this command-list))
(format #t "~1Tcut-list: ~A~%" (-> this cut-list))
(format #t "~1Twait-max-time: ~D~%" (-> this wait-max-time))
(format #t "~1Twait-air-time: ~D~%" (-> this wait-air-time))
(format #t "~1Twait-ground-time: ~D~%" (-> this wait-ground-time))
(format #t "~1Tdraw-target: ~A~%" (-> this draw-target))
(format #t "~1Tabort: ~A~%" (-> this abort))
(format #t "~1Tactor: ~A~%" (-> this actor))
(format #t "~1Tload-point: ~A~%" (-> this load-point-obj))
(format #t "~1Tend-point: ~A~%" (-> this end-point-obj))
(format #t "~1Tborrow: ~A~%" (-> this borrow))
(format #t "~1Tsfx-volume: ~f~%" (-> this sfx-volume))
(format #t "~1Tambient-volume: ~f~%" (-> this ambient-volume))
(format #t "~1Tmusic-volume: ~f~%" (-> this music-volume))
(format #t "~1Tblackout-end: ~A~%" (-> this blackout-end))
(format #t "~1Tpeaceful: ~A~%" (-> this peaceful))
(format #t "~1Tmusic-delay: ~f~%" (-> this music-delay))
(format #t "~1Tsave: ~A~%" (-> this save))
(format #t "~1Tscene-task: ~D~%" (-> this scene-task))
(label cfg-4)
this
)
;; definition of type scene-player
(deftype scene-player (process-drawable)
((scene-list (array scene) :offset-assert 200)
(scene scene :offset-assert 204)
(scene-index int32 :offset-assert 208)
(anim spool-anim :offset-assert 212)
(next-anim spool-anim :offset-assert 216)
(camera handle :offset-assert 224)
(main-entity entity-actor :offset-assert 232)
(wait symbol :offset-assert 236)
(old-target-pos transformq :inline :offset-assert 240)
(pre-cut-frame basic :offset-assert 288)
(preload-continue string :offset-assert 292)
(dma-max uint32 :offset-assert 296)
(gui-id sound-id :offset-assert 300)
(aborted? symbol :offset-assert 304)
(scene-start-time time-frame :offset-assert 312)
(targ-speed float :offset-assert 320)
(cur-speed float :offset-assert 324)
(speed-change-time time-frame :offset-assert 328)
(speed-press-time time-frame :offset-assert 336)
(speed-change-speed float :offset-assert 344)
(unknown-time time-frame :offset 344)
(subtitle-change-time time-frame :offset-assert 352)
(user-sound sound-id 4 :offset-assert 360)
)
:heap-base #x100
:method-count-assert 26
:size-assert #x178
:flag-assert #x1a01000178
(:methods
(wait (symbol) _type_ :state 20)
(release () _type_ :state 21)
(play-anim () _type_ :state 22)
(scene-player-method-23 (_type_ string symbol) none 23)
(scene-player-method-24 (_type_ basic symbol) scene 24)
(scene-player-method-25 (_type_ float) none 25)
)
)
;; definition for method 3 of type scene-player
(defmethod inspect scene-player ((this scene-player))
(when (not this)
(set! this this)
(goto cfg-4)
)
(let ((t9-0 (method-of-type process-drawable inspect)))
(t9-0 this)
)
(format #t "~2Tscene-list: ~A~%" (-> this scene-list))
(format #t "~2Tscene: ~A~%" (-> this scene))
(format #t "~2Tscene-index: ~D~%" (-> this scene-index))
(format #t "~2Tanim: ~A~%" (-> this anim))
(format #t "~2Tnext-anim: ~A~%" (-> this next-anim))
(format #t "~2Tcamera: ~D~%" (-> this camera))
(format #t "~2Tmain-entity: ~A~%" (-> this main-entity))
(format #t "~2Twait: ~A~%" (-> this wait))
(format #t "~2Told-target-pos: #<transformq @ #x~X>~%" (-> this old-target-pos))
(format #t "~2Tpre-cut-frame: ~A~%" (-> this pre-cut-frame))
(format #t "~2Tpreload-continue: ~A~%" (-> this preload-continue))
(format #t "~2Tdma-max: ~D~%" (-> this dma-max))
(format #t "~2Tgui-id: ~D~%" (-> this gui-id))
(format #t "~2Taborted?: ~A~%" (-> this aborted?))
(format #t "~2Tscene-start-time: ~D~%" (-> this scene-start-time))
(format #t "~2Ttarg-speed: ~f~%" (-> this targ-speed))
(format #t "~2Tcur-speed: ~f~%" (-> this cur-speed))
(format #t "~2Tspeed-change-time: ~D~%" (-> this speed-change-time))
(format #t "~2Tspeed-press-time: ~D~%" (-> this speed-press-time))
(format #t "~2Tspeed-change-speed: ~f~%" (-> this speed-change-speed))
(format #t "~2Tsubtitle-change-time: ~D~%" (-> this subtitle-change-time))
(format #t "~2Tuser-sound[4] @ #x~X~%" (-> this user-sound))
(label cfg-4)
this
)
;; definition for symbol *scene-player*, type (pointer scene-player)
(define *scene-player* (the-as (pointer scene-player) #f))
;; failed to figure out what this is:
0