[jak3] Drawable header decomp (#3347)

This commit is contained in:
water111
2024-01-28 14:23:41 -05:00
committed by GitHub
parent bfe0a72ae7
commit ba8d4c2903
32 changed files with 6257 additions and 533 deletions
File diff suppressed because it is too large Load Diff
+122
View File
@@ -5,5 +5,127 @@
;; name in dgo: traffic-h
;; dgos: GAME
(declare-type traffic-manager process)
(declare-type vehicle-manager process)
(declare-type nav-mesh basic)
(declare-type nav-branch structure)
;; +++traffic-h:traffic-spawn-flags
(defenum traffic-spawn-flags
:type uint32
:bitfield #t
)
;; ---traffic-h:traffic-spawn-flags
;; +++traffic-h:traffic-type
(defenum traffic-type
:type uint8
(tt17 17)
(tt18 18)
(tt19 19)
(tt20 20)
(tt21 21)
(tt22 22)
(tt23 23)
(tt25 25)
(tt27 27)
(tt28 28)
(invalid #xffffffff)
)
;; ---traffic-h:traffic-type
;; DECOMP BEGINS
(define *traffic-manager* (the-as traffic-manager #f))
(define *vehicle-manager* (the-as vehicle-manager #f))
(deftype traffic-danger-info (structure)
((sphere sphere :inline)
(velocity vector :inline)
(handle handle)
(notify-radius float)
(danger-level float)
(decay-rate float)
(flags uint8)
(danger-type uint8)
)
)
(deftype traffic-suppression-params (structure)
((bbox bounding-box :inline)
(duration time-frame)
(id int8)
)
(:methods
(try-creating-new-suppression-box (_type_) symbol)
(create-or-update-suppression-box (_type_) symbol)
(has-valid-id? (_type_) symbol)
(kill-suppression-box (_type_) none)
)
)
(defmethod has-valid-id? ((this traffic-suppression-params))
(!= (-> this id) -1)
)
(deftype traffic-object-spawn-params (structure)
((object-type uint8)
(behavior uint64)
(id uint32)
(nav-mesh nav-mesh)
(nav-branch nav-branch)
(position vector :inline)
(rotation quaternion :inline)
(velocity vector :inline)
(handle handle)
(handle-parent uint64)
(guard-type uint8)
(user-data uint32)
(entity basic)
(flags traffic-spawn-flags)
(proc process)
)
)
(deftype traffic-info (structure)
((ctywide-level basic)
(vehicle-level basic)
(race-vehicle-level basic)
(traffic-object-levels level 29)
(vehicle-levels level 44)
(traffic-object-type-from-vehicle-type traffic-type 44)
(restore-speech-callback basic)
)
)
(define *traffic-info* (new 'static 'traffic-info
:ctywide-level #f
:vehicle-level #f
:race-vehicle-level #f
:restore-speech-callback #f
)
)
(let ((v1-5 *traffic-info*))
(dotimes (a0-9 29)
(set! (-> v1-5 traffic-object-levels a0-9) #f)
)
(dotimes (a0-12 44)
(set! (-> v1-5 vehicle-levels a0-12) #f)
(set! (-> v1-5 traffic-object-type-from-vehicle-type a0-12) (traffic-type invalid))
)
(set! (-> v1-5 traffic-object-type-from-vehicle-type 0) (traffic-type tt17))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 1) (traffic-type tt18))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 2) (traffic-type tt19))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 3) (traffic-type tt20))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 4) (traffic-type tt21))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 5) (traffic-type tt22))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 6) (traffic-type tt28))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 7) (traffic-type tt25))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 11) (traffic-type tt27))
)
+80
View File
@@ -7,3 +7,83 @@
;; DECOMP BEGINS
(deftype joint (basic)
"A joint from an animated skeleton. This defines the graph of the skeleton, and also the bind pose
used for the mesh data. The joints are shared between all instances of the same model."
((name basic)
(number int32)
(parent joint)
(bind-pose matrix :inline)
)
)
(deftype bone-cache (structure)
"Unused type. Existed in Jak 1, but wasn't used there."
((bone-matrix uint32)
(parent-matrix uint32)
(dummy uint32)
(frame uint32)
)
)
(deftype bone (structure)
"The location and scale of a bone in an animated skeleton. Each instance of a skeleton
has its own copy of the bones. This data is used for collision checking or other gameplay math,
but, despite the name, isn't directly used in rendering."
((transform matrix :inline)
(position vector :inline :overlay-at (-> transform data 12))
(scale vector :inline)
)
)
(deftype skeleton (inline-array-class)
"Skeleton is made of bones."
((bones bone :inline :dynamic)
)
)
(set! (-> skeleton heap-base) (the-as uint 80))
(deftype cspace (structure)
"A cspace describes how to control a bone. It contains a reference to the joint, bone, and a callback function.
The callback function is used to take the joint transforms out of the joint animation, then update the bone."
((parent cspace)
(joint joint)
(joint-num int16)
(geo drawable)
(bone bone)
(param0 (function cspace transformq none))
(param1 basic)
(param2 basic)
)
(:methods
(new (symbol type drawable) _type_)
(reset-and-assign-geo! (_type_ drawable) _type_)
)
)
(deftype cspace-array (inline-array-class)
((data cspace :dynamic)
)
)
(set! (-> cspace-array heap-base) (the-as uint 32))
(defmethod print ((this cspace))
(format
#t
"#<cspace ~S @ #x~X>"
(if (-> this joint)
(-> this joint name)
"nojoint"
)
this
)
this
)
@@ -7,3 +7,106 @@
;; DECOMP BEGINS
(deftype cloth-pt (structure)
((pt vector :inline)
(u float)
(v float)
)
)
(deftype anchor-transform (structure)
((offset vector :inline)
(joint-name basic)
(joint int16)
(constraint-index int16)
)
)
(deftype sphere-transform (structure)
((offset vector :inline)
(joint-name basic)
(radius float)
(joint int16)
)
)
(deftype disc-transform (structure)
((offset vector :inline)
(normal vector :inline)
(joint-name basic)
(radius float)
(joint int16)
(start-particle-index int16)
(end-particle-index int16)
)
)
(deftype anchor-transform-array (inline-array-class)
((data anchor-transform :inline :dynamic)
)
)
(set! (-> anchor-transform-array heap-base) (the-as uint 32))
(deftype sphere-transform-array (inline-array-class)
((data sphere-transform :inline :dynamic)
)
)
(set! (-> sphere-transform-array heap-base) (the-as uint 32))
(deftype disc-transform-array (inline-array-class)
((data disc-transform :inline :dynamic)
)
)
(set! (-> disc-transform-array heap-base) (the-as uint 48))
(deftype cloth-thickness-array (inline-array-class)
((data uint8 :dynamic)
)
)
(set! (-> cloth-thickness-array heap-base) (the-as uint 1))
(deftype cloth-params (structure)
((mesh int16)
(gravity-constant float)
(wind-constant float)
(cloth-width uint16)
(num-sphere-constraints uint16)
(num-disc-constraints uint16)
(num-anchor-points uint16)
(flags uint64)
(tex-name basic)
(tex-name2 basic)
(tex-name3 basic)
(alt-tex-name basic)
(alt-tex-name2 basic)
(alt-tex-name3 basic)
(cloth-thickness float)
(initial-xform int16)
(drag float)
(ball-collision-radius float)
(num-iterations int8)
(timestep-frequency int8)
(secret-disable uint64)
)
)
(deftype cloth-base (basic)
()
(:methods
(cloth-base-method-9 () none)
(cloth-base-method-10 () none)
)
)
+374
View File
@@ -5,5 +5,379 @@
;; name in dgo: art-h
;; dgos: GAME
(defenum draw-control-status
:type uint16
:bitfield #t
(close-to-screen 0)
(no-draw 1)
(no-draw-temp)
(on-screen)
(uninited)
(no-draw-bounds)
(no-closest-distance)
(math-skel)
(force-vu1)
(no-draw-bounds2)
(force-fade)
(warp-cross-fade)
(lod-set)
(disable-fog)
(hud)
(no-bounds-check)
)
(defenum draw-control-data-format
:type uint8
:bitfield #f
(pris 0)
(merc 1)
)
(defenum draw-control-global-effect
:type uint8
:bitfield #t
(bit-0)
(bit-1)
(title-light)
(disable-envmap)
(rim-lights)
(rim-lights2)
(rim-lights3)
(no-textures)
)
(declare-type merc-eye-anim-block structure)
(declare-type merc-ctrl structure)
(declare-type process-drawable process)
(declare-type ripple-control basic)
(declare-type shadow-geo structure)
(declare-type shadow-control structure)
;; DECOMP BEGINS
(deftype joint-anim (basic)
"Base class for all joint animations. These are animations that store joint transforms."
((name string)
(number int16)
(length int16)
)
)
(deftype joint-anim-matrix (joint-anim)
"Joint animation which stores matrices directly. Not used."
((data matrix :inline :dynamic :offset 16)
)
)
(deftype joint-anim-transformq (joint-anim)
"Joint animation which stores transformq's directly. Not used."
((data transformq :inline :dynamic)
)
)
(deftype joint-anim-drawable (joint-anim)
"Mysterious unused joint animation type."
((data drawable :dynamic)
)
)
(deftype joint-anim-frame (structure)
"Frame containing all joint transforms. Note that there are two special frames: align and prejoint.
The 'align' frame is used for the complicated animation alignment system, which allows the animation to move
a character, among other things. The prejoint is just the root of the skeleton.
The remaining transformq's are the joint transforms you'd expect."
((matrices matrix 2 :inline)
(data transformq :inline :dynamic)
)
(:methods
(new (symbol type int) _type_)
)
)
;; WARN: Return type mismatch structure vs joint-anim-frame.
(defmethod new joint-anim-frame ((allocation symbol) (type-to-make type) (arg0 int))
(let ((v1-1 (max 0 (+ arg0 -2))))
(the-as
joint-anim-frame
(new-dynamic-structure allocation type-to-make (the-as int (+ (-> type-to-make size) (* 48 v1-1))))
)
)
)
(deftype joint-anim-compressed-hdr (structure)
"Header for the compressed joint animation format."
((control-bits uint32 14)
(num-joints uint32)
(matrix-bits uint32)
)
)
(deftype joint-anim-compressed-fixed (structure)
((hdr joint-anim-compressed-hdr :inline)
(offset-64 uint32)
(offset-32 uint32)
(offset-16 uint32)
(reserved uint32)
(data vector 133 :inline)
)
)
(deftype joint-anim-compressed-frame (structure)
((offset-64 uint32)
(offset-32 uint32)
(offset-16 uint32)
(reserved uint32)
(data vector 133 :inline)
)
)
(deftype joint-anim-compressed-control (structure)
((num-frames uint16)
(flags uint16)
(fixed-qwc uint32)
(frame-qwc uint32)
(fixed joint-anim-compressed-fixed)
(data joint-anim-compressed-frame :dynamic)
)
)
(deftype art (basic)
"Base class for anything considered `art`. This is typically foreground model data.
This can be either an art container containing more arts, or an actual art thing (art-element)."
((name string :offset 8)
(length int32)
(extra res-lump)
)
(:methods
(art-method-9 () none)
(art-method-10 () none)
(art-method-11 () none)
(art-method-12 () none)
(art-method-13 () none)
)
)
(deftype art-element (art)
"Base class Art which is not a container of more art."
((master-art-group-name basic)
(master-art-group-index int32)
(pad uint8 20)
)
)
(deftype art-mesh-anim (art-element)
"An unused mesh animation."
()
)
(deftype art-joint-anim (art-element)
"Art for a joint animation. Also contains the eye animation."
((eye-anim merc-eye-anim-block :overlay-at (-> pad 0))
(blend-shape-anim (pointer int8) :overlay-at (-> pad 4))
(frames joint-anim-compressed-control :overlay-at (-> pad 8))
(speed float :offset 48)
(artist-base float)
(artist-step float)
)
)
(deftype art-group (art)
"Art which is a list of more art. The -ag files are an art group with all the art needed for a
actor, like the mesh, animations, shadow mesh, skeleton, etc."
((info file-info :offset 4)
(data art-element :dynamic :offset 32)
)
(:methods
(unknown-0 () none)
(unknown-1 () none)
)
)
(deftype art-mesh-geo (art-element)
"Unused art format for a mesh. This might have been for the renderer that came before merc."
()
)
(deftype art-joint-geo (art-element)
"Collection of joints for an actor."
()
)
(deftype art-cloth-geo (art-element)
((anchor-transforms basic)
(sphere-transforms basic)
(disc-transforms basic)
(cloth-thickness basic)
(thickness-scalar float)
(num-points int32 :overlay-at length)
(mesh object :dynamic :offset 80)
)
)
(defmethod relocate ((this art-cloth-geo) (arg0 int))
this
)
(deftype art-joint-anim-manager-slot (structure)
"Record for an animation which is additionally compressed with LZO compression over the entire animation.
This is used for short, commonly used animations that always remain in RAM."
((anim art-joint-anim)
(comp-data uint32)
(time-stamp uint64)
)
)
(deftype art-joint-anim-manager (basic)
"Cache for LZO decompression of animations."
((heap kheap :inline)
(free-index int32)
(slot art-joint-anim-manager-slot 64 :inline)
)
(:methods
(new (symbol type int) _type_)
(art-joint-anim-manager-method-9 () none)
(art-joint-anim-manager-method-10 () none)
(art-joint-anim-manager-method-11 () none)
(art-joint-anim-manager-method-12 () none)
(art-joint-anim-manager-method-13 () none)
)
)
(defmethod new art-joint-anim-manager ((allocation symbol) (type-to-make type) (arg0 int))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(let ((s4-0 (-> gp-0 heap)))
(set! (-> s4-0 base) (kmalloc (the-as kheap (-> allocation value)) arg0 (kmalloc-flags) "heap"))
(set! (-> s4-0 current) (-> s4-0 base))
(set! (-> s4-0 top-base) (&+ (-> s4-0 base) arg0))
(set! (-> s4-0 top) (-> s4-0 top-base))
)
(dotimes (v1-6 64)
(set! (-> gp-0 slot v1-6 anim) #f)
)
(set! (-> gp-0 free-index) 0)
gp-0
)
)
(deftype skeleton-group (art-group)
"Unlike other art types, the skeleton-groups are defined in GOAL code.
This stores settings like the name of the art-group, shadow/level-of-detail settings, etc."
((art-group-name string)
(jgeo int16)
(janim int16)
(bounds vector :inline)
(radius meters :overlay-at (-> bounds data 3))
(mgeo int16 6)
(max-lod int32)
(lod-dist float 6)
(longest-edge meters)
(texture-level int8)
(version int8)
(shadow int16)
(shadow-joint-index int8)
(origin-joint-index int8)
(sort int8)
(light-index uint8)
(clothing basic)
(global-effects uint8)
)
(:methods
(skeleton-group-method-16 () none)
)
)
(deftype lod-group (structure)
"A single level of detail mesh."
((geo merc-ctrl)
(dist meters)
)
:pack-me
)
(deftype lod-set (structure)
"All the different level-of-detail meshes for an actor."
((lod lod-group 6 :inline)
(max-lod int8)
)
(:methods
(lod-set-method-9 () none)
)
)
(deftype draw-control (basic)
"The draw-control is a collection of all the stuff that the foreground rendering system needs to draw something.
Each process-drawable has a draw-control."
((process process-drawable)
(status draw-control-status)
(data-format draw-control-data-format)
(global-effect draw-control-global-effect)
(art-group art-group)
(jgeo art-joint-geo)
(mgeo merc-ctrl)
(dma-add-func (function process-drawable draw-control symbol object none))
(skeleton skeleton)
(lod-set lod-set :inline)
(max-lod int8 :overlay-at (-> lod-set max-lod))
(force-lod int8)
(cur-lod int8)
(desired-lod int8)
(ripple ripple-control)
(longest-edge meters)
(longest-edge? uint32 :overlay-at longest-edge)
(light-index uint8)
(shadow-mask uint8)
(level-index uint8)
(death-draw-overlap uint8)
(death-timer uint8)
(death-timer-org uint8)
(death-vertex-skip uint16)
(death-effect uint32)
(shadow shadow-geo)
(shadow-ctrl shadow-control)
(distance meters)
(origin vector :inline)
(bounds vector :inline)
(radius meters :overlay-at (-> bounds data 3))
(color-mult rgbaf :inline)
(color-emissive rgbaf :inline)
(effect-mask uint64)
(seg-mask uint64)
(origin-joint-index uint8)
(shadow-joint-index uint8)
(force-fade uint8)
(default-texture-page uint8)
(shadow-values uint32)
(cloth-instances basic)
)
(:methods
(new (symbol type) _type_)
(get-skeleton-origin (_type_) vector)
(draw-control-method-10 () none)
(draw-control-method-11 () none)
(draw-control-method-12 () none)
(draw-control-method-13 () none)
(draw-control-method-14 () none)
(draw-control-method-15 () none)
)
)
(defmethod get-skeleton-origin ((this draw-control))
(-> this skeleton bones 0 transform trans)
)
+32
View File
@@ -7,3 +7,35 @@
;; DECOMP BEGINS
(deftype draw-node (drawable)
"Node in a bounding volume heirarchy. This is a base class, and there are no children.
The child is a pointer to the start of inline array of drawables (note: not a drawable-inline-array, literally a bunch of plain drawables)
The size of this array is child-count. The type is either more draw-nodes, or, some other drawable like tfragment, depending on the flags.
Different renderers have different restrictions on the tree structure, like max child count, or if all children have the same depth.
Generally, tfrag/collide use a very rigid equal depth, max 8 children rule, but with shrub, anything goes.
This is a very awkward data structure to traverse, but it is designed for fast view frustum culling.
Note that there can be multiple ways to reach drawables in here in some cases - for example you can follow
this tree, or check one of the depth arrays found in tfrag.
"
((child-count uint8 :offset 6)
(flags uint8 :offset 7)
(child drawable :offset 8)
(distance float :offset 12)
)
)
(deftype drawable-inline-array-node (drawable-inline-array)
"Top level container for a BVH made of draw-nodes."
((data draw-node 1 :inline)
(pad uint32)
)
)
(deftype draw-node-dma (structure)
"DMA buffer layout for draw node culling routine, which copies draw-nodes directly to scratchpad in bulk.
This would not work with the memory layout of shrub."
((banka draw-node 32 :inline)
(bankb draw-node 32 :inline)
)
)
@@ -7,3 +7,28 @@
;; DECOMP BEGINS
(deftype drawable-actor (drawable)
"Wrapper around an entity-actor to put it in the drawable system.
Note that this is never used to actually draw actors - it is just used as a list of all entity-actors
for the entity/birth system."
((actor entity-actor :offset 8)
)
)
(deftype drawable-tree-actor (drawable-tree)
"Adapater for putting the actors in the tree-array."
()
)
(deftype drawable-inline-array-actor (drawable-inline-array)
"Array of drawable-actors."
((data drawable-actor 1 :inline)
(pad uint8 4)
)
)
(defmethod draw ((this drawable-tree-actor) (arg0 drawable-tree-actor) (arg1 display-frame))
0
(none)
)
@@ -7,3 +7,13 @@
;; DECOMP BEGINS
(deftype drawable-group (drawable)
"Base class for an array of references to other drawables.
These are typically used for very high-level organization of drawable."
((length int16 :offset 6)
(data drawable :dynamic)
)
(:methods
(new (symbol type int) _type_)
)
)
+28
View File
@@ -7,3 +7,31 @@
;; DECOMP BEGINS
(deftype drawable (basic)
"Base class for `drawable` scene graph system.
This base class is really abused in many ways, and the meaning of the various methods differ depending
on the exact type. Not even the ID and bsphere here are always populated.
This is used for very high level organization of different rendering data types, and also very low-level
culling/rendering optimizations. It supports both array-of-references and inline-array containers with precise
control over memory layout for use with DMA."
((id int16)
(bsphere vector :inline)
)
(:methods
(drawable-method-9 () none)
(draw (_type_ _type_ display-frame) none)
(drawable-method-11 () none)
(drawable-method-12 () none)
(drawable-method-13 () none)
(drawable-method-14 () none)
(drawable-method-15 () none)
(drawable-method-16 () none)
)
)
(deftype drawable-error (drawable)
"A drawable which just represents an error. When drawn, it simply displays a sphere with an error message."
((name string)
)
)
@@ -7,3 +7,7 @@
;; DECOMP BEGINS
(deftype drawable-inline-array (drawable)
((length int16 :offset 6)
)
)
@@ -7,3 +7,15 @@
;; DECOMP BEGINS
(deftype drawable-tree (drawable-group)
"A drawable tree is a container of drawables of a specific rendering type.
Instead of having a single large tree of mixed types, there will be a tree of tfrags, a tree of ties, etc.
The top-level tfrag tree will have a type that's a child of drawable-tree.
Generally, the object passed to a large renderer is a drawable-tree."
()
)
(deftype drawable-tree-array (drawable-group)
"Collection of drawable trees. This might have a tfrag tree, tie tree, etc."
()
)
+438
View File
@@ -5,5 +5,443 @@
;; name in dgo: main-h
;; dgos: GAME
(declare-type debug-menu-context basic)
;; +++main-h:collide-spec
(defenum collide-spec
:bitfield #t
:type uint32
(cs0 0)
(cs1 1)
(cs2 2)
(cs3 3)
(cs4 4)
(cs5 5)
(cs6 6)
(cs7 7)
(cs8 8)
(cs9 9)
(cs10 10)
(cs11 11)
)
;; ---main-h:collide-spec
;; +++main-h:strip-lines-controls
(defenum strip-lines-controls
:type int64
(none 0)
; (strippable 1)
; (convertible 2)
; (good 3)
; (edgeable 4)
; (ordinary 8)
; (color-mismatch 16)
; (shader-mismatch 32)
; (uv-mismatch 64)
; (too-big 128)
; (bad 240)
; (all-edges 255)
; (strips 256)
; (frags 512)
)
;; ---main-h:strip-lines-controls
;; +++main-h:scene-controls
(defenum scene-controls
:type int64
:bitfield #t
; (channel)
; (anim-name)
; (dma-size)
; (bounds-spheres)
; (actors)
; (actor-marks)
; (special-fma-spheres)
; (scene-controls-7)
; (scene-controls-8)
; (display-controls)
)
;; ---main-h:scene-controls
;; +++main-h:bot-marks-controls
(defenum bot-marks-controls
:type int64
; (all-off 0)
; (course-spots 1)
; (task-spots 2)
; (all-on 3)
; (bmc04 4)
; (bmc05 5)
; (bmc06 6)
; (bmc07 7)
; (bmc08 8)
; (bmc09 9)
; (bmc10 10)
; (bmc11 11)
; (bmc12 12)
; (bmc13 13)
; (bmc14 14)
; (bmc15 15)
; (bmc16 16)
)
;; ---main-h:bot-marks-controls
;; +++main-h:race-marks-controls
(defenum race-marks-controls
:type int64
; (all-off 0)
; (path0-red 1)
; (path1-green 2)
; (path2-blue 4)
; (path3-yellow 8)
; (path4-cyan 16)
; (path5-violet 32)
; (path6-orange 64)
; (path7-black 128)
; (all-paths-on 255)
; (rmc2040 2040)
)
;; ---main-h:race-marks-controls
;; +++main-h:race-selection
(defenum race-selection
:type int64
; (kiera-class3 0)
; (kiera-class2 1)
; (kiera-class1 2)
; (errol 3)
; (bush-class3 4)
; (bush-class2 5)
; (bush-class1 6)
; (bush-errol 7)
; (bush-port 8)
; (bush-class3-reverse 9)
; (bush-class2-reverse 10)
; (bush-class1-reverse 11)
)
;; ---main-h:race-selection
;; +++main-h:subdivide-setting
(defenum subdivide-setting
:type int64
(textured 0)
(outline 1)
(gouraud 2)
(hack 3))
;; ---main-h:subdivide-setting
;; +++main-h:ocean-height-hack
(defenum ocean-height-hack
:type int64
; (zero 1)
; (far-below 2)
; (sewer-start 3)
; (sewer-hi 4)
; (sewer-med 5)
; (sewer-lo 6)
)
;; ---main-h:ocean-height-hack
;; DECOMP BEGINS
(define *stats-poly* #f)
(define *stats-memory* #f)
(define *stats-memory-short* #f)
(define *stats-memory-level-index* 0)
(define *stats-collide* #f)
(define *stats-bsp* #f)
(define *stats-buffer* #f)
(define *stats-target* #f)
(define *stats-profile-bars* #f)
(define *stats-perf* #f)
(define *artist-all-visible* #f)
(define *artist-flip-visible* #f)
(define *artist-fix-visible* #f)
(define *artist-fix-frustum* #f)
(define *artist-error-spheres* #f)
(define *artist-use-menu-subdiv* #f)
(define *display-profile* #t)
(define *display-sidekick-stats* #f)
(define *display-quad-stats* #f)
(define *display-tri-stats* #f)
(define *display-ground-stats* #f)
(define *display-collision-marks* #f)
(define *display-collide-cache* #f)
(define *display-render-collision* #f)
(define *display-hipri-collision-marks* #f)
(define *display-edge-collision-marks* #f)
(define *display-geo-marks* #f)
(define *display-target-marks* #f)
(define *target-rc-board-controls* #f)
(define *display-collide-history* 0)
(define *amy-cam* #f)
(define *display-xyz-axes* #f)
(define *display-cam-collide-history* #f)
(define *record-cam-collide-history* #f)
(define *display-cam-master-marks* #f)
(define *display-cam-other* #f)
(define *display-camera-marks* #f)
(define *camera-no-mip-correction* #f)
(define *camera-turbo-free* #f)
(define *display-cam-los-info* #f)
(define *display-cam-los-debug* #f)
(define *display-cam-los-marks* #f)
(define *display-cam-coll-marks* #f)
(define *display-camera-info* #f)
(define *display-camera-old-stats* #f)
(define *display-camera-last-attacker* #f)
(define *display-file-info* #f)
(define *display-actor-marks* #f)
(define *display-sprite-info* #f)
(define *display-sprite-marks* #f)
(define *display-sprite-spheres* #f)
(define *display-entity-errors* #t)
(define *display-capture-mode* #f)
(define *display-instance-info* #f)
(define *display-deci-count* #f)
(define *sync-dma* #f)
(define *display-strip-lines* (the-as strip-lines-controls 0))
(define *display-battle-marks* #f)
(define *display-joint-axes* #f)
(define *display-nav-marks* #f)
(define *display-nav-network* #f)
(define *display-path-marks* #f)
(define *display-vol-marks* #f)
(define *display-water-marks* #f)
(define *display-nav-mesh* #f)
(define *display-race-mesh* #f)
(define *display-actor-pointer* #f)
(define *display-actor-vis* #f)
(define *display-actor-graph* #f)
(define *display-traffic-height-map* #f)
(define *display-trail-graph* #f)
(define *display-color-bars* #f)
(define *display-bug-report* #f)
(define *display-level-border* #f)
(define *display-memcard-info* #f)
(define *display-split-boxes* #f)
(define *display-split-box-info* #f)
(define *display-texture-distances* #f)
(define *display-texture-download* #f)
(define *display-art-control* #f)
(define *display-gui-control* #f)
(define *display-level-spheres* #f)
(define *time-of-day-fast* #f)
(define *display-iop-info* #f)
(define *ambient-sound-class* #t)
(define *slow-frame-rate* #f)
(define *display-region-marks* #f)
(define *execute-regions* #t)
(define *debug-pause* #f)
(define *debug-view-anims* #f)
(define *debug-unkillable* #f)
(define *debug-player-vehicle-unkillable* #f)
(define *debug-actor* (the-as object #f))
(define *gun-marks* #f)
(define *bug-report-output-mode* (if *debug-segment*
'file-stream
'*stdcon*
)
)
(define *display-scene-control* (the-as scene-controls 0))
(define *display-bot-marks* (the-as bot-marks-controls 0))
(define *display-race-marks* (the-as race-marks-controls 0))
(define *race-record-path* #f)
(define *select-race* (the-as race-selection 0))
(define *select-race-path* 0)
(define *bot-record-path* -1)
(define *subdivide-draw-mode* (the-as subdivide-setting 0))
(define *subdivide-scissor-draw-mode* (the-as subdivide-setting 0))
(define *subdivide-foreground-draw-mode* (the-as subdivide-setting 0))
(define *subdivide-ocean-draw-mode* (the-as subdivide-setting 0))
(define *ocean-height-hack* (the-as ocean-height-hack 0))
(define-perm *dproc* process #f)
(define *run* #f)
(define *teleport* #f)
(define *teleport-count* 0)
(define *draw-hook* nothing)
(define *debug-hook* '())
(define *menu-hook* (the-as (function debug-menu-context) nothing))
(define *progress-hook* nothing)
(define *dma-timeout-hook* nothing)
(deftype frame-stats (structure)
((field-time time-frame 2)
(field int32)
)
)
(define *frame-stats* (new 'static 'frame-stats))
(deftype screen-filter (basic)
((draw? symbol)
(bucket int32)
(depth int32)
(ztest uint64)
(color vector :inline)
(color-src vector :inline)
(color-dest vector :inline)
(extra vector :inline)
(speed float :overlay-at (-> extra data 0))
(current-interp float :overlay-at (-> extra data 1))
(lock-vsync? basic)
)
(:methods
(draw (_type_) none)
(setup (_type_ vector vector float bucket-id) none)
(disable (_type_) none)
)
)
(deftype col-rend (basic)
((draw? symbol)
(outline? symbol)
(show-back-faces? symbol)
(show-normals? symbol)
(ghost-hidden? symbol)
(show-only uint32)
(cspec collide-spec)
(track uint8)
(bbox-radius float)
(bbox-center vector :inline)
(camera-to-bbox-dist float)
)
(:methods
(col-rend-method-9 () none)
)
)
(define *col-rend* (new 'static 'col-rend
:draw? #f
:outline? #t
:show-back-faces? #t
:show-normals? #f
:ghost-hidden? #t
:cspec (collide-spec cs3 cs4 cs5)
:track #x1
:bbox-radius 24576.0
:camera-to-bbox-dist 65536.0
)
)
(defun-debug debug-actor? ((arg0 object))
(= arg0 *debug-actor*)
)
@@ -7,3 +7,197 @@
;; DECOMP BEGINS
(deftype generic-tie-instance (structure)
((matrix-tag dma-packet :inline)
(matrix-data vector 6 :inline)
(index-tag dma-packet :inline)
(indices uint8 224)
(end-tag dma-packet :inline)
)
)
(deftype generic-tie-input (structure)
((palette-tag dma-packet :inline)
(palette rgba 128)
(model-tag dma-packet :inline)
(model vector 146 :inline)
(matrix-tag dma-packet :inline)
(matrix-data vector 6 :inline)
(index-tag dma-packet :inline)
(indices uint8 224)
(end-tag dma-packet :inline)
)
)
(deftype generic-tie-run-control (structure)
((skip-bp2 uint8)
(skip-ips uint8)
(gifbuf-skip uint8)
(strips uint8)
(target-bp1 uint8)
(target-bp2 uint8)
(target-ip1 uint8)
(target-ip2 uint8)
(target-bps uint8)
(target-ips uint8)
(is-generic uint8)
(reserved uint8)
)
)
(deftype generic-tie-base-point (structure)
((data uint16 8)
(quad uint128 :overlay-at (-> data 0))
(x int16 :overlay-at (-> data 0))
(y int16 :overlay-at (-> data 1))
(z int16 :overlay-at (-> data 2))
(d0 int16 :overlay-at (-> data 3))
(vtx uint64 :overlay-at (-> data 0))
(u int16 :overlay-at (-> data 4))
(v int16 :overlay-at (-> data 5))
(tex uint32 :overlay-at (-> data 4))
(w int16 :overlay-at (-> data 6))
(d1 int16 :overlay-at (-> data 7))
)
)
(deftype generic-tie-bps (structure)
((bp generic-tie-base-point 4 :inline)
)
)
(deftype generic-tie-interp-point (structure)
((data uint16 12)
(x int16 :overlay-at (-> data 0))
(y int16 :overlay-at (-> data 1))
(z int16 :overlay-at (-> data 2))
(d0 int16 :overlay-at (-> data 3))
(vtx0 uint64 :overlay-at (-> data 0))
(dx int16 :overlay-at (-> data 4))
(dy int16 :overlay-at (-> data 5))
(dz int16 :overlay-at (-> data 6))
(unused int16 :overlay-at (-> data 7))
(vtx1 uint64 :overlay-at (-> data 4))
(u int16 :overlay-at (-> data 8))
(v int16 :overlay-at (-> data 9))
(tex uint32 :overlay-at (-> data 8))
(w int16 :overlay-at (-> data 10))
(d1 int16 :overlay-at (-> data 11))
)
:pack-me
)
;; ERROR: failed type prop at 19: Could not figure out load: (set! a2 (l.q gp))
(deftype generic-tie-ips (structure)
((ip generic-tie-interp-point 2 :inline)
)
)
(deftype generic-tie-header (structure)
((effect uint8)
(interp-table-size uint8)
(num-bps uint8)
(num-ips uint8)
(tint-color uint32)
(index-table-offset uint16)
(kick-table-offset uint16)
(normal-table-offset uint16)
(interp-table-offset uint16)
(gsf-header gsf-header :inline)
)
)
(deftype generic-tie-matrix (structure)
((matrix matrix :inline)
(morph vector :inline)
(fog qword :inline)
)
)
(deftype generic-tie-normal (structure)
((x int8)
(y int8)
(z int8)
(dummy int8)
)
)
(deftype generic-tie-control (structure)
((ptr-palette uint32)
(ptr-shaders uint32)
(ptr-runctrl generic-tie-run-control)
(ptr-verts uint32)
(ptr-generic generic-tie-header)
(ptr-dps uint32)
(ptr-kicks uint32)
(ptr-normals uint32)
(ptr-interp uint32)
(ptr-mtxs generic-tie-matrix)
(ptr-cinds uint32)
(next-instance uint32)
(next-model uint32)
(next-is-model uint32)
(tie-type uint32)
)
)
(deftype generic-tie-stats (structure)
((num-bps uint32)
(num-ips uint32)
(num-dps uint32)
(num-shaders uint32)
(num-models uint32)
(num-instances uint32)
(num-waits uint32)
(num-qwc uint32)
(max-qwc uint32)
)
)
(deftype generic-tie-calls (structure)
((generic-prepare-dma-double basic)
(generic-envmap-dproc basic)
(generic-interp-dproc basic)
(generic-no-light-dproc basic)
)
:pack-me
)
(deftype generic-tie-shadow (structure)
((out-buf gsf-buffer)
(cur-buf uint32)
(tie-type int32)
(ptr-inst uint32)
(ptr-buf uint32)
(inst-xor int32)
(end-of-chain uint32)
(write-limit uint32)
(calls generic-tie-calls :inline)
)
:pack-me
)
(deftype generic-tie-work (structure)
((control generic-tie-control :inline)
(interp-job generic-interp-job :inline)
(shadow generic-tie-shadow :inline)
(input-a generic-tie-input :inline)
(input-b generic-tie-input :inline)
(inst-buf generic-tie-instance :inline)
(palette-buf rgba 128)
)
)
@@ -7,3 +7,202 @@
;; DECOMP BEGINS
(deftype gsf-vertex (structure)
"Vertex used by generic. GSF = generic stripped fragment?"
((data uint32 8)
(byte uint8 32 :overlay-at (-> data 0))
(quad uint128 2 :overlay-at (-> data 0))
(vt qword :inline :overlay-at (-> data 0))
(pos vector3s :inline :overlay-at (-> data 0))
(tex vector2uh :inline :overlay-at (-> data 3))
(nrm vector3s :inline :overlay-at (-> data 4))
(nc qword :inline :overlay-at (-> data 4))
(clr vector4ub :inline :overlay-at (-> data 7))
(dtex vector2uh :inline :overlay-at (-> data 4))
(dclr vector4ub :inline :overlay-at (-> data 5))
)
)
(deftype gsf-vertex-array (structure)
((vtx gsf-vertex :dynamic)
)
)
(deftype gsf-fx-vertex (structure)
"Color/texture data only. Possibly used to share with a gsf-vertex with
the same position/normal."
((clr vector4ub :inline)
(tex vector2uh :inline)
)
)
(deftype gsf-fx-vertex-array (structure)
((data gsf-fx-vertex :dynamic)
)
)
(deftype gsf-header (structure)
"Header for generic data."
((num-strips uint8)
(num-new-vtxs uint8)
(num-dps uint16)
(num-vtxs uint16)
(strip-table uint8 10)
)
)
(deftype gsf-ik (structure)
((index uint8)
(no-kick uint8)
)
)
(deftype gsf-info (structure)
((ptr-iks uint32)
(ptr-verts uint32)
(ptr-fx uint32)
(dummy2 uint32)
)
)
(deftype gsf-buffer (structure)
((data uint8 8192)
(info gsf-info :inline :overlay-at (-> data 0))
(header gsf-header :inline :overlay-at (-> data 16))
(work-area uint8 :dynamic :overlay-at (-> data 32))
)
)
(deftype generic-frag (structure)
((start-pos uint16)
(end-pos uint16)
)
)
(deftype generic-strip (structure)
((pos uint16)
(len uint16)
)
)
(deftype generic-envmap-saves (structure)
((index-mask vector4w :inline)
(verts uint128 12)
(kicks uint128 4)
)
)
(deftype generic-interp-job (structure)
((job-type uint16)
(num uint16)
(first uint16)
(pad uint16)
(ptr-data uint32)
(morph-z uint16)
(morph-w uint16)
)
:pack-me
)
(deftype generic-saves (structure)
((ptr-dma uint32)
(ptr-vtxs uint32)
(ptr-clrs uint32)
(ptr-texs uint32)
(ptr-env-clrs uint32)
(ptr-env-texs uint32)
(cur-outbuf uint32)
(ptr-fx-buf uint32)
(xor-outbufs uint32)
(num-dps uint32)
(qwc uint32)
(gsf-buf gsf-buffer)
(ptr-shaders uint32)
(ptr-env-shader uint32)
(is-envmap uint16)
(is-translucent uint16)
(basep uint32)
(ptr-interp-job generic-interp-job)
(gifbuf-adr uint32)
(inbuf-adr uint32)
(fade-val uint32)
(time-of-day-color rgba)
(to-vu0-waits uint32)
(to-spr-waits uint32)
(from-spr-waits uint32)
(envmap generic-envmap-saves :inline)
)
)
(deftype generic-gif-tag (structure)
((data uint32 4)
(qword qword :inline :overlay-at (-> data 0))
(fan-prim gif-tag-prim :overlay-at (-> data 0))
(str-prim gif-tag-prim :overlay-at (-> data 1))
(regs gif-tag-regs-32 :overlay-at (-> data 2))
(num-strips uint32 :overlay-at (-> data 3))
)
)
(deftype generic-envmap-consts (structure)
((consts vector :inline)
(strgif generic-gif-tag :inline)
(colors vector4w :inline)
(shader adgif-shader :inline)
)
)
(deftype generic-consts (structure)
((dma-header dma-packet :inline)
(vif-header uint32 4)
(dma-ref-vtxs dma-packet :inline)
(dma-cnt-call dma-packet :inline)
(matrix matrix :inline)
(base-strgif generic-gif-tag :inline)
(alpha-opaque gs-adcmd :inline)
(alpha-translucent gs-adcmd :inline)
(ztest-normal gs-adcmd :inline)
(ztest-opaque gs-adcmd :inline)
(adcmd-offsets uint8 16)
(stcycle-tag uint32)
(unpack-vtx-tag uint32)
(unpack-clr-tag uint32)
(unpack-tex-tag uint32)
(mscal-tag uint32)
(flush-tag uint32)
(reset-cycle-tag uint32)
(dummy0 uint32)
(dma-tag-cnt uint64)
(envmap generic-envmap-consts :inline)
(light-consts vector :inline)
(texture-offset uint16 8)
)
)
(deftype generic-storage (structure)
((data uint128 16)
)
)
(kmemopen global "gsf-buffer")
(define *gsf-buffer* (the-as object (kmalloc global 9216 (kmalloc-flags align-64) "malloc")))
(kmemclose)
@@ -7,3 +7,72 @@
;; DECOMP BEGINS
(deftype pris-mtx (structure)
"Matrix for merc rendering. Named after the earlier 'pris' renderer.
Contains a transformation matrix for vertices, one for normals, and a scale.
This matrix is likely not used by generic VU1, but is used by the merc -> generic converter."
((data float 32)
(vector vector 8 :overlay-at (-> data 0))
(t-mtx matrix :inline :overlay-at (-> data 0))
(n-mtx matrix3 :inline :overlay-at (-> data 16))
(scale vector :inline :overlay-at (-> data 28))
)
)
(deftype generic-pris-mtx-save (structure)
((loc-mtx pris-mtx :inline)
(par-mtx pris-mtx :inline)
(dif-mtx pris-mtx :inline)
)
)
(deftype generic-constants (structure)
"Constant data sent to VU1 for generic rendering."
((fog vector :inline)
(adgif gs-gif-tag :inline)
(hvdf-offset vector :inline)
(hmge-scale vector :inline)
(invh-scale vector :inline)
(guard vector :inline)
(flush qword :inline)
(stores qword :inline)
)
)
(deftype generic-shrub-constants (structure)
((shrub-giftag generic-gif-tag :inline)
(shrub-adnop qword :inline)
)
)
(deftype gcf-shader (structure)
((adgif uint128 5)
(shader adgif-shader :inline :overlay-at (-> adgif 0))
(pos uint32 :offset 12)
(num uint32 :offset 28)
)
)
(deftype gcf-control (structure)
((matrix matrix :inline)
(giftag generic-gif-tag :inline)
(adnops gs-adcmd 2 :inline)
(num-strips uint32 :overlay-at (-> giftag data 3))
(num-dps uint32 :overlay-at (-> adnops 0 word 3))
(kick-offset uint32 :offset 108)
(shader gcf-shader :dynamic)
)
)
(deftype gcf-vertex (structure)
((tex vector4w :inline)
(clr gs-packed-rgba :inline)
(pos gs-packed-xyzw :inline)
)
)
+106
View File
@@ -5,5 +5,111 @@
;; name in dgo: region-h
;; dgos: GAME
(declare-type region-prim-area structure)
;; DECOMP BEGINS
(deftype region (structure)
"A region is a closed volume that you can, enter, exit, and be inside.
This stores a unique, and script functions for a single region.
These are stored separately from the actual geometry to allow the geometry to be smaller
and fit in scratchpad/cache better."
((id uint32)
(on-enter pair)
(on-inside pair)
(on-exit pair)
)
(:methods
(point-in-region-debug! (_type_ vector) symbol)
)
)
(deftype region-array (inline-array-class)
"Array of region."
((data region :inline :dynamic)
)
)
(set! (-> region-array heap-base) (the-as uint 16))
(deftype drawable-region-prim (drawable)
"Base class for a region + geometry.
Note that all child classes of this must be 32-bytes."
((region region :offset 8)
)
(:methods
(debug-draw-region (_type_ int) none)
(track-region (_type_ region-prim-area) symbol)
(within-area? (_type_ region-prim-area) symbol)
)
)
(deftype drawable-tree-region-prim (drawable-tree)
"Top-level container for all regions of a level."
((name basic :offset 8)
(data2 drawable-inline-array :dynamic :offset 32)
)
(:methods
(drawable-tree-region-prim-method-17 (_type_ vector) symbol)
(debug-print (_type_ vector object) none)
)
)
(deftype drawable-inline-array-region-prim (drawable-inline-array)
"Inline array of drawable-region-prim. This actually stores child classes, but they are
exactly the same size as the parent, so it's okay."
((data drawable-region-prim 1 :inline)
(pad uint8 4)
)
)
(deftype drawable-region-sphere (drawable-region-prim)
"Region where the bsphere of the drawable is the volume."
()
)
(deftype region-face-data (structure)
"Data to store a single planar face, as a normal and list of vertices."
((normal vector :inline)
(normal-offset float :overlay-at (-> normal data 3))
(num-points uint32)
(points vector :inline :dynamic)
)
)
(deftype drawable-region-face (drawable-region-prim)
"A drawable-region which is just a face. Unclear if `on-inside` is used."
((data region-face-data :offset 12)
)
)
(deftype region-face-array (inline-array-class)
"An array of faces that hopefully make a closed volume."
((data drawable-region-face :inline :dynamic :offset 16)
(pad uint32)
)
)
(set! (-> region-face-array heap-base) (the-as uint 32))
(deftype drawable-region-volume (drawable-region-prim)
"A drawable-region which is a bunch of faces that represent a closed volume."
((faces region-face-array :offset 12)
)
)
(deftype region-prim-list (structure)
"A list of drawable-region-prim. This is the return type of queries like `which regions contain this point?`"
((num-items int32)
(items drawable-region-prim 320)
)
)
+189
View File
@@ -0,0 +1,189 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *traffic-manager*, type traffic-manager
(define *traffic-manager* (the-as traffic-manager #f))
;; definition for symbol *vehicle-manager*, type vehicle-manager
(define *vehicle-manager* (the-as vehicle-manager #f))
;; definition of type traffic-danger-info
(deftype traffic-danger-info (structure)
((sphere sphere :inline)
(velocity vector :inline)
(handle handle)
(notify-radius float)
(danger-level float)
(decay-rate float)
(flags uint8)
(danger-type uint8)
)
)
;; definition for method 3 of type traffic-danger-info
(defmethod inspect ((this traffic-danger-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'traffic-danger-info)
(format #t "~1Tsphere: #<sphere @ #x~X>~%" (-> this sphere))
(format #t "~1Tvelocity: #<vector @ #x~X>~%" (-> this velocity))
(format #t "~1Thandle: ~D~%" (-> this handle))
(format #t "~1Tnotify-radius: ~f~%" (-> this notify-radius))
(format #t "~1Tdanger-level: ~f~%" (-> this danger-level))
(format #t "~1Tdecay-rate: ~f~%" (-> this decay-rate))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tdanger-type: ~D~%" (-> this danger-type))
(label cfg-4)
this
)
;; definition of type traffic-suppression-params
(deftype traffic-suppression-params (structure)
((bbox bounding-box :inline)
(duration time-frame)
(id int8)
)
(:methods
(try-creating-new-suppression-box (_type_) symbol)
(create-or-update-suppression-box (_type_) symbol)
(has-valid-id? (_type_) symbol)
(kill-suppression-box (_type_) none)
)
)
;; definition for method 3 of type traffic-suppression-params
(defmethod inspect ((this traffic-suppression-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'traffic-suppression-params)
(format #t "~1Tbbox: #<bounding-box @ #x~X>~%" (-> this bbox))
(format #t "~1Tduration: ~D~%" (-> this duration))
(format #t "~1Tid: ~D~%" (-> this id))
(label cfg-4)
this
)
;; definition for method 11 of type traffic-suppression-params
(defmethod has-valid-id? ((this traffic-suppression-params))
(!= (-> this id) -1)
)
;; definition of type traffic-object-spawn-params
(deftype traffic-object-spawn-params (structure)
((object-type uint8)
(behavior uint64)
(id uint32)
(nav-mesh nav-mesh)
(nav-branch nav-branch)
(position vector :inline)
(rotation quaternion :inline)
(velocity vector :inline)
(handle handle)
(handle-parent uint64)
(guard-type uint8)
(user-data uint32)
(entity basic)
(flags traffic-spawn-flags)
(proc process)
)
)
;; definition for method 3 of type traffic-object-spawn-params
(defmethod inspect ((this traffic-object-spawn-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'traffic-object-spawn-params)
(format #t "~1Tobject-type: ~D~%" (-> this object-type))
(format #t "~1Tbehavior: ~D~%" (-> this behavior))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tnav-mesh: ~A~%" (-> this nav-mesh))
(format #t "~1Tnav-branch: ~A~%" (-> this nav-branch))
(format #t "~1Tposition: #<vector @ #x~X>~%" (-> this position))
(format #t "~1Trotation: #<quaternion @ #x~X>~%" (-> this rotation))
(format #t "~1Tvelocity: #<vector @ #x~X>~%" (-> this velocity))
(format #t "~1Thandle: ~D~%" (-> this handle))
(format #t "~1Thandle-parent: ~D~%" (-> this handle-parent))
(format #t "~1Tguard-type: ~D~%" (-> this guard-type))
(format #t "~1Tuser-data: ~D~%" (-> this user-data))
(format #t "~1Tentity: ~A~%" (-> this entity))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tproc: ~A~%" (-> this proc))
(label cfg-4)
this
)
;; definition of type traffic-info
(deftype traffic-info (structure)
((ctywide-level basic)
(vehicle-level basic)
(race-vehicle-level basic)
(traffic-object-levels level 29)
(vehicle-levels level 44)
(traffic-object-type-from-vehicle-type traffic-type 44)
(restore-speech-callback basic)
)
)
;; definition for method 3 of type traffic-info
(defmethod inspect ((this traffic-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'traffic-info)
(format #t "~1Tctywide-level: ~A~%" (-> this ctywide-level))
(format #t "~1Tvehicle-level: ~A~%" (-> this vehicle-level))
(format #t "~1Trace-vehicle-level: ~A~%" (-> this race-vehicle-level))
(format #t "~1Ttraffic-object-levels[29] @ #x~X~%" (-> this traffic-object-levels))
(format #t "~1Tvehicle-levels[44] @ #x~X~%" (-> this vehicle-levels))
(format
#t
"~1Ttraffic-object-type-from-vehicle-type[44] @ #x~X~%"
(-> this traffic-object-type-from-vehicle-type)
)
(format #t "~1Trestore-speech-callback: ~A~%" (-> this restore-speech-callback))
(label cfg-4)
this
)
;; definition for symbol *traffic-info*, type traffic-info
(define *traffic-info* (new 'static 'traffic-info
:ctywide-level #f
:vehicle-level #f
:race-vehicle-level #f
:restore-speech-callback #f
)
)
;; failed to figure out what this is:
(let ((v1-5 *traffic-info*))
(dotimes (a0-9 29)
(set! (-> v1-5 traffic-object-levels a0-9) #f)
)
(dotimes (a0-12 44)
(set! (-> v1-5 vehicle-levels a0-12) #f)
(set! (-> v1-5 traffic-object-type-from-vehicle-type a0-12) (traffic-type invalid))
)
(set! (-> v1-5 traffic-object-type-from-vehicle-type 0) (traffic-type tt17))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 1) (traffic-type tt18))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 2) (traffic-type tt19))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 3) (traffic-type tt20))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 4) (traffic-type tt21))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 5) (traffic-type tt22))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 6) (traffic-type tt28))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 7) (traffic-type tt25))
(set! (-> v1-5 traffic-object-type-from-vehicle-type 11) (traffic-type tt27))
)
;; failed to figure out what this is:
0
+185
View File
@@ -0,0 +1,185 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type joint
(deftype joint (basic)
"A joint from an animated skeleton. This defines the graph of the skeleton, and also the bind pose
used for the mesh data. The joints are shared between all instances of the same model."
((name basic)
(number int32)
(parent joint)
(bind-pose matrix :inline)
)
)
;; definition for method 3 of type joint
(defmethod inspect ((this joint))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tnumber: ~D~%" (-> this number))
(format #t "~1Tparent: ~A~%" (-> this parent))
(format #t "~1Tbind-pose: #<matrix @ #x~X>~%" (-> this bind-pose))
(label cfg-4)
this
)
;; definition of type bone-cache
(deftype bone-cache (structure)
"Unused type. Existed in Jak 1, but wasn't used there."
((bone-matrix uint32)
(parent-matrix uint32)
(dummy uint32)
(frame uint32)
)
)
;; definition for method 3 of type bone-cache
(defmethod inspect ((this bone-cache))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone-cache)
(format #t "~1Tbone-matrix: ~D~%" (-> this bone-matrix))
(format #t "~1Tparent-matrix: ~D~%" (-> this parent-matrix))
(format #t "~1Tdummy: ~D~%" (-> this dummy))
(format #t "~1Tframe: ~D~%" (-> this frame))
(label cfg-4)
this
)
;; definition of type bone
(deftype bone (structure)
"The location and scale of a bone in an animated skeleton. Each instance of a skeleton
has its own copy of the bones. This data is used for collision checking or other gameplay math,
but, despite the name, isn't directly used in rendering."
((transform matrix :inline)
(position vector :inline :overlay-at (-> transform data 12))
(scale vector :inline)
)
)
;; definition for method 3 of type bone
(defmethod inspect ((this bone))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'bone)
(format #t "~1Ttransform: #<matrix @ #x~X>~%" (-> this transform))
(format #t "~1Tposition: #<vector @ #x~X>~%" (-> this transform trans))
(format #t "~1Tscale: #<vector @ #x~X>~%" (-> this scale))
(label cfg-4)
this
)
;; definition of type skeleton
(deftype skeleton (inline-array-class)
"Skeleton is an array of bones for the entire character. The bones are stored in an inline array so they can be
easily dma'd to the scratchpad later."
((bones bone :inline :dynamic)
)
)
;; definition for method 3 of type skeleton
(defmethod inspect ((this skeleton))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this bones))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> skeleton heap-base) (the-as uint 80))
;; definition of type cspace
(deftype cspace (structure)
"A cspace describes how to control a bone. It contains a reference to the joint, bone, and a callback function.
The callback function is used to take the joint transforms out of the joint animation, then update the bone."
((parent cspace)
(joint joint)
(joint-num int16)
(geo drawable)
(bone bone)
(param0 (function cspace transformq none))
(param1 basic)
(param2 basic)
)
(:methods
(new (symbol type drawable) _type_)
(reset-and-assign-geo! (_type_ drawable) _type_)
)
)
;; definition for method 3 of type cspace
(defmethod inspect ((this cspace))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'cspace)
(format #t "~1Tparent: #<cspace @ #x~X>~%" (-> this parent))
(format #t "~1Tjoint: ~A~%" (-> this joint))
(format #t "~1Tjoint-num: ~D~%" (-> this joint-num))
(format #t "~1Tgeo: ~A~%" (-> this geo))
(format #t "~1Tbone: #<bone @ #x~X>~%" (-> this bone))
(format #t "~1Tparam0: ~A~%" (-> this param0))
(format #t "~1Tparam1: ~A~%" (-> this param1))
(format #t "~1Tparam2: ~A~%" (-> this param2))
(label cfg-4)
this
)
;; definition of type cspace-array
(deftype cspace-array (inline-array-class)
((data cspace :dynamic)
)
)
;; definition for method 3 of type cspace-array
(defmethod inspect ((this cspace-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> cspace-array heap-base) (the-as uint 32))
;; definition for method 2 of type cspace
(defmethod print ((this cspace))
(format
#t
"#<cspace ~S @ #x~X>"
(if (-> this joint)
(-> this joint name)
"nojoint"
)
this
)
this
)
;; failed to figure out what this is:
0
+279
View File
@@ -0,0 +1,279 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type cloth-pt
(deftype cloth-pt (structure)
((pt vector :inline)
(u float)
(v float)
)
)
;; definition for method 3 of type cloth-pt
(defmethod inspect ((this cloth-pt))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'cloth-pt)
(format #t "~1Tpt: #<vector @ #x~X>~%" (-> this pt))
(format #t "~1Tu: ~f~%" (-> this u))
(format #t "~1Tv: ~f~%" (-> this v))
(label cfg-4)
this
)
;; definition of type anchor-transform
(deftype anchor-transform (structure)
((offset vector :inline)
(joint-name basic)
(joint int16)
(constraint-index int16)
)
)
;; definition for method 3 of type anchor-transform
(defmethod inspect ((this anchor-transform))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'anchor-transform)
(format #t "~1Toffset: #<vector @ #x~X>~%" (-> this offset))
(format #t "~1Tjoint-name: ~A~%" (-> this joint-name))
(format #t "~1Tjoint: ~D~%" (-> this joint))
(format #t "~1Tconstraint-index: ~D~%" (-> this constraint-index))
(label cfg-4)
this
)
;; definition of type sphere-transform
(deftype sphere-transform (structure)
((offset vector :inline)
(joint-name basic)
(radius float)
(joint int16)
)
)
;; definition for method 3 of type sphere-transform
(defmethod inspect ((this sphere-transform))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'sphere-transform)
(format #t "~1Toffset: #<vector @ #x~X>~%" (-> this offset))
(format #t "~1Tjoint-name: ~A~%" (-> this joint-name))
(format #t "~1Tradius: ~f~%" (-> this radius))
(format #t "~1Tjoint: ~D~%" (-> this joint))
(label cfg-4)
this
)
;; definition of type disc-transform
(deftype disc-transform (structure)
((offset vector :inline)
(normal vector :inline)
(joint-name basic)
(radius float)
(joint int16)
(start-particle-index int16)
(end-particle-index int16)
)
)
;; definition for method 3 of type disc-transform
(defmethod inspect ((this disc-transform))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'disc-transform)
(format #t "~1Toffset: #<vector @ #x~X>~%" (-> this offset))
(format #t "~1Tnormal: #<vector @ #x~X>~%" (-> this normal))
(format #t "~1Tjoint-name: ~A~%" (-> this joint-name))
(format #t "~1Tradius: ~f~%" (-> this radius))
(format #t "~1Tjoint: ~D~%" (-> this joint))
(format #t "~1Tstart-particle-index: ~D~%" (-> this start-particle-index))
(format #t "~1Tend-particle-index: ~D~%" (-> this end-particle-index))
(label cfg-4)
this
)
;; definition of type anchor-transform-array
(deftype anchor-transform-array (inline-array-class)
((data anchor-transform :inline :dynamic)
)
)
;; definition for method 3 of type anchor-transform-array
(defmethod inspect ((this anchor-transform-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> anchor-transform-array heap-base) (the-as uint 32))
;; definition of type sphere-transform-array
(deftype sphere-transform-array (inline-array-class)
((data sphere-transform :inline :dynamic)
)
)
;; definition for method 3 of type sphere-transform-array
(defmethod inspect ((this sphere-transform-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> sphere-transform-array heap-base) (the-as uint 32))
;; definition of type disc-transform-array
(deftype disc-transform-array (inline-array-class)
((data disc-transform :inline :dynamic)
)
)
;; definition for method 3 of type disc-transform-array
(defmethod inspect ((this disc-transform-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> disc-transform-array heap-base) (the-as uint 48))
;; definition of type cloth-thickness-array
(deftype cloth-thickness-array (inline-array-class)
((data uint8 :dynamic)
)
)
;; definition for method 3 of type cloth-thickness-array
(defmethod inspect ((this cloth-thickness-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> cloth-thickness-array heap-base) (the-as uint 1))
;; definition of type cloth-params
(deftype cloth-params (structure)
((mesh int16)
(gravity-constant float)
(wind-constant float)
(cloth-width uint16)
(num-sphere-constraints uint16)
(num-disc-constraints uint16)
(num-anchor-points uint16)
(flags uint64)
(tex-name basic)
(tex-name2 basic)
(tex-name3 basic)
(alt-tex-name basic)
(alt-tex-name2 basic)
(alt-tex-name3 basic)
(cloth-thickness float)
(initial-xform int16)
(drag float)
(ball-collision-radius float)
(num-iterations int8)
(timestep-frequency int8)
(secret-disable uint64)
)
)
;; definition for method 3 of type cloth-params
(defmethod inspect ((this cloth-params))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'cloth-params)
(format #t "~1Tmesh: ~D~%" (-> this mesh))
(format #t "~1Tgravity-constant: ~f~%" (-> this gravity-constant))
(format #t "~1Twind-constant: ~f~%" (-> this wind-constant))
(format #t "~1Tcloth-width: ~D~%" (-> this cloth-width))
(format #t "~1Tnum-sphere-constraints: ~D~%" (-> this num-sphere-constraints))
(format #t "~1Tnum-disc-constraints: ~D~%" (-> this num-disc-constraints))
(format #t "~1Tnum-anchor-points: ~D~%" (-> this num-anchor-points))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Ttex-name: ~A~%" (-> this tex-name))
(format #t "~1Ttex-name2: ~A~%" (-> this tex-name2))
(format #t "~1Ttex-name3: ~A~%" (-> this tex-name3))
(format #t "~1Talt-tex-name: ~A~%" (-> this alt-tex-name))
(format #t "~1Talt-tex-name2: ~A~%" (-> this alt-tex-name2))
(format #t "~1Talt-tex-name3: ~A~%" (-> this alt-tex-name3))
(format #t "~1Tcloth-thickness: ~f~%" (-> this cloth-thickness))
(format #t "~1Tinitial-xform: ~D~%" (-> this initial-xform))
(format #t "~1Tdrag: ~f~%" (-> this drag))
(format #t "~1Tball-collision-radius: ~f~%" (-> this ball-collision-radius))
(format #t "~1Tnum-iterations: ~D~%" (-> this num-iterations))
(format #t "~1Ttimestep-frequency: ~D~%" (-> this timestep-frequency))
(format #t "~1Tsecret-disable: ~D~%" (-> this secret-disable))
(label cfg-4)
this
)
;; definition of type cloth-base
(deftype cloth-base (basic)
()
(:methods
(cloth-base-method-9 () none)
(cloth-base-method-10 () none)
)
)
;; definition for method 3 of type cloth-base
(defmethod inspect ((this cloth-base))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+785
View File
@@ -0,0 +1,785 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type joint-anim
(deftype joint-anim (basic)
"Base class for all joint animations. These are animations that store joint transforms."
((name string)
(number int16)
(length int16)
)
)
;; definition for method 3 of type joint-anim
(defmethod inspect ((this joint-anim))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tnumber: ~D~%" (-> this number))
(format #t "~1Tlength: ~D~%" (-> this length))
(label cfg-4)
this
)
;; definition of type joint-anim-matrix
(deftype joint-anim-matrix (joint-anim)
"Joint animation which stores matrices directly. Not used."
((data matrix :inline :dynamic :offset 16)
)
)
;; definition of type joint-anim-transformq
(deftype joint-anim-transformq (joint-anim)
"Joint animation which stores transformq's directly. Not used."
((data transformq :inline :dynamic)
)
)
;; definition for method 3 of type joint-anim-transformq
(defmethod inspect ((this joint-anim-transformq))
(when (not this)
(set! this this)
(goto cfg-7)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tnumber: ~D~%" (-> this number))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(dotimes (s5-0 (-> this length))
(format #t "~T [~D]~1Tdata: ~`transformq`P~%" s5-0 (-> this data s5-0))
)
(label cfg-7)
this
)
;; definition of type joint-anim-drawable
(deftype joint-anim-drawable (joint-anim)
"Mysterious unused joint animation type."
((data drawable :dynamic)
)
)
;; definition for method 3 of type joint-anim-drawable
(defmethod inspect ((this joint-anim-drawable))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tname: ~A~%" (-> this name))
(format #t "~1Tnumber: ~D~%" (-> this number))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type joint-anim-frame
(deftype joint-anim-frame (structure)
"Frame containing all joint transforms. Note that there are two special frames: align and prejoint.
The 'align' frame is used for the complicated animation alignment system, which allows the animation to move
a character, among other things. The prejoint is just the root of the skeleton.
The remaining transformq's are the joint transforms you'd expect."
((matrices matrix 2 :inline)
(data transformq :inline :dynamic)
)
(:methods
(new (symbol type int) _type_)
)
)
;; definition for method 3 of type joint-anim-frame
(defmethod inspect ((this joint-anim-frame))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'joint-anim-frame)
(format #t "~1Tmatrices[2] @ #x~X~%" (-> this matrices))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition for method 0 of type joint-anim-frame
;; WARN: Return type mismatch structure vs joint-anim-frame.
(defmethod new joint-anim-frame ((allocation symbol) (type-to-make type) (arg0 int))
(let ((v1-1 (max 0 (+ arg0 -2))))
(the-as
joint-anim-frame
(new-dynamic-structure allocation type-to-make (the-as int (+ (-> type-to-make size) (* 48 v1-1))))
)
)
)
;; definition of type joint-anim-compressed-hdr
(deftype joint-anim-compressed-hdr (structure)
"Header for the compressed joint animation format."
((control-bits uint32 14)
(num-joints uint32)
(matrix-bits uint32)
)
)
;; definition for method 3 of type joint-anim-compressed-hdr
(defmethod inspect ((this joint-anim-compressed-hdr))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'joint-anim-compressed-hdr)
(format #t "~1Tcontrol-bits[14] @ #x~X~%" (-> this control-bits))
(format #t "~1Tnum-joints: ~D~%" (-> this num-joints))
(format #t "~1Tmatrix-bits: ~D~%" (-> this matrix-bits))
(label cfg-4)
this
)
;; definition of type joint-anim-compressed-fixed
(deftype joint-anim-compressed-fixed (structure)
((hdr joint-anim-compressed-hdr :inline)
(offset-64 uint32)
(offset-32 uint32)
(offset-16 uint32)
(reserved uint32)
(data vector 133 :inline)
)
)
;; definition for method 3 of type joint-anim-compressed-fixed
(defmethod inspect ((this joint-anim-compressed-fixed))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'joint-anim-compressed-fixed)
(format #t "~1Thdr: #<joint-anim-compressed-hdr @ #x~X>~%" (-> this hdr))
(format #t "~1Toffset-64: ~D~%" (-> this offset-64))
(format #t "~1Toffset-32: ~D~%" (-> this offset-32))
(format #t "~1Toffset-16: ~D~%" (-> this offset-16))
(format #t "~1Treserved: ~D~%" (-> this reserved))
(format #t "~1Tdata[133] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type joint-anim-compressed-frame
(deftype joint-anim-compressed-frame (structure)
((offset-64 uint32)
(offset-32 uint32)
(offset-16 uint32)
(reserved uint32)
(data vector 133 :inline)
)
)
;; definition for method 3 of type joint-anim-compressed-frame
(defmethod inspect ((this joint-anim-compressed-frame))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'joint-anim-compressed-frame)
(format #t "~1Toffset-64: ~D~%" (-> this offset-64))
(format #t "~1Toffset-32: ~D~%" (-> this offset-32))
(format #t "~1Toffset-16: ~D~%" (-> this offset-16))
(format #t "~1Treserved: ~D~%" (-> this reserved))
(format #t "~1Tdata[133] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type joint-anim-compressed-control
(deftype joint-anim-compressed-control (structure)
((num-frames uint16)
(flags uint16)
(fixed-qwc uint32)
(frame-qwc uint32)
(fixed joint-anim-compressed-fixed)
(data joint-anim-compressed-frame :dynamic)
)
)
;; definition for method 3 of type joint-anim-compressed-control
(defmethod inspect ((this joint-anim-compressed-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'joint-anim-compressed-control)
(format #t "~1Tnum-frames: ~D~%" (-> this num-frames))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tfixed-qwc: ~D~%" (-> this fixed-qwc))
(format #t "~1Tframe-qwc: ~D~%" (-> this frame-qwc))
(format #t "~1Tfixed: #<joint-anim-compressed-fixed @ #x~X>~%" (-> this fixed))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type art
(deftype art (basic)
"Base class for anything considered `art`. This is typically foreground model data.
This can be either an art container containing more arts, or an actual art thing (art-element)."
((name string :offset 8)
(length int32)
(extra res-lump)
)
(:methods
(art-method-9 () none)
(art-method-10 () none)
(art-method-11 () none)
(art-method-12 () none)
(art-method-13 () none)
)
)
;; definition for method 3 of type art
(defmethod inspect ((this art))
(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))
(label cfg-4)
this
)
;; definition of type art-element
(deftype art-element (art)
"Base class Art which is not a container of more art."
((master-art-group-name basic)
(master-art-group-index int32)
(pad uint8 20)
)
)
;; definition for method 3 of type art-element
(defmethod inspect ((this art-element))
(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 "~1Tmaster-art-group-name: ~A~%" (-> this master-art-group-name))
(format #t "~1Tmaster-art-group-index: ~D~%" (-> this master-art-group-index))
(label cfg-4)
this
)
;; definition of type art-mesh-anim
(deftype art-mesh-anim (art-element)
"An unused mesh animation."
()
)
;; definition of type art-joint-anim
(deftype art-joint-anim (art-element)
"Art for a joint animation. Also contains the eye animation."
((eye-anim merc-eye-anim-block :overlay-at (-> pad 0))
(blend-shape-anim (pointer int8) :overlay-at (-> pad 4))
(frames joint-anim-compressed-control :overlay-at (-> pad 8))
(speed float :offset 48)
(artist-base float)
(artist-step float)
)
)
;; definition for method 3 of type art-joint-anim
(defmethod inspect ((this art-joint-anim))
(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 "~1Tmaster-art-group-name: ~A~%" (-> this master-art-group-name))
(format #t "~1Tmaster-art-group-index: ~D~%" (-> this master-art-group-index))
(format #t "~1Teye-anim: ~`merc-eye-anim-block`P~%" (-> this eye-anim))
(format #t "~1Tblend-shape-anim: ~A~%" (-> this blend-shape-anim))
(format #t "~1Tframes: #<joint-anim-compressed-control @ #x~X>~%" (-> this frames))
(format #t "~1Tspeed: ~f~%" (-> this speed))
(format #t "~1Tartist-base: ~f~%" (-> this artist-base))
(format #t "~1Tartist-step: ~f~%" (-> this artist-step))
(label cfg-4)
this
)
;; definition of type art-group
(deftype art-group (art)
"Art which is a list of more art. The -ag files are an art group with all the art needed for a
actor, like the mesh, animations, shadow mesh, skeleton, etc."
((info file-info :offset 4)
(data art-element :dynamic :offset 32)
)
(:methods
(unknown-0 () none)
(unknown-1 () none)
)
)
;; definition of type art-mesh-geo
(deftype art-mesh-geo (art-element)
"Unused art format for a mesh. This might have been for the renderer that came before merc."
()
)
;; definition of type art-joint-geo
(deftype art-joint-geo (art-element)
"Collection of joints for an actor."
()
)
;; definition of type art-cloth-geo
(deftype art-cloth-geo (art-element)
((anchor-transforms basic)
(sphere-transforms basic)
(disc-transforms basic)
(cloth-thickness basic)
(thickness-scalar float)
(num-points int32 :overlay-at length)
(mesh object :dynamic :offset 80)
)
)
;; definition for method 3 of type art-cloth-geo
(defmethod inspect ((this art-cloth-geo))
(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 "~1Tmaster-art-group-name: ~A~%" (-> this master-art-group-name))
(format #t "~1Tmaster-art-group-index: ~D~%" (-> this master-art-group-index))
(format #t "~1Tanchor-transforms: ~A~%" (-> this anchor-transforms))
(format #t "~1Tsphere-transforms: ~A~%" (-> this sphere-transforms))
(format #t "~1Tdisc-transforms: ~A~%" (-> this disc-transforms))
(format #t "~1Tcloth-thickness: ~A~%" (-> this cloth-thickness))
(format #t "~1Tthickness-scalar: ~f~%" (-> this thickness-scalar))
(format #t "~1Tnum-points: ~D~%" (-> this length))
(format #t "~1Tmesh[0] @ #x~X~%" (-> this mesh))
(label cfg-4)
this
)
;; definition for method 7 of type art-cloth-geo
(defmethod relocate ((this art-cloth-geo) (arg0 int))
this
)
;; definition of type art-joint-anim-manager-slot
(deftype art-joint-anim-manager-slot (structure)
"Record for an animation which is additionally compressed with LZO compression over the entire animation.
This is used for short, commonly used animations that always remain in RAM."
((anim art-joint-anim)
(comp-data uint32)
(time-stamp uint64)
)
)
;; definition for method 3 of type art-joint-anim-manager-slot
(defmethod inspect ((this art-joint-anim-manager-slot))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'art-joint-anim-manager-slot)
(format #t "~1Tanim: ~A~%" (-> this anim))
(format #t "~1Tcomp-data: #x~X~%" (-> this comp-data))
(format #t "~1Ttime-stamp: ~D~%" (-> this time-stamp))
(label cfg-4)
this
)
;; definition of type art-joint-anim-manager
(deftype art-joint-anim-manager (basic)
"Cache for LZO decompression of animations."
((heap kheap :inline)
(free-index int32)
(slot art-joint-anim-manager-slot 64 :inline)
)
(:methods
(new (symbol type int) _type_)
(art-joint-anim-manager-method-9 () none)
(art-joint-anim-manager-method-10 () none)
(art-joint-anim-manager-method-11 () none)
(art-joint-anim-manager-method-12 () none)
(art-joint-anim-manager-method-13 () none)
)
)
;; definition for method 3 of type art-joint-anim-manager
(defmethod inspect ((this art-joint-anim-manager))
(when (not this)
(set! this this)
(goto cfg-7)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Theap: #<kheap @ #x~X>~%" (-> this heap))
(format #t "~1Tfree-index: ~D~%" (-> this free-index))
(format #t "~1Tslot[64] @ #x~X~%" (-> this slot))
(dotimes (s5-0 64)
(format #t "~T [~D]~1Tslot: ~`art-joint-anim-manager-slot`P~%" s5-0 (-> this slot s5-0))
)
(label cfg-7)
this
)
;; definition for method 0 of type art-joint-anim-manager
(defmethod new art-joint-anim-manager ((allocation symbol) (type-to-make type) (arg0 int))
(let ((gp-0 (object-new allocation type-to-make (the-as int (-> type-to-make size)))))
(let ((s4-0 (-> gp-0 heap)))
(set! (-> s4-0 base) (kmalloc (the-as kheap (-> allocation value)) arg0 (kmalloc-flags) "heap"))
(set! (-> s4-0 current) (-> s4-0 base))
(set! (-> s4-0 top-base) (&+ (-> s4-0 base) arg0))
(set! (-> s4-0 top) (-> s4-0 top-base))
)
(dotimes (v1-6 64)
(set! (-> gp-0 slot v1-6 anim) #f)
)
(set! (-> gp-0 free-index) 0)
gp-0
)
)
;; definition of type skeleton-group
(deftype skeleton-group (art-group)
"Unlike other art types, the skeleton-groups are defined in GOAL code.
This stores settings like the name of the art-group, shadow/level-of-detail settings, etc."
((art-group-name string)
(jgeo int16)
(janim int16)
(bounds vector :inline)
(radius meters :overlay-at (-> bounds data 3))
(mgeo int16 6)
(max-lod int32)
(lod-dist float 6)
(longest-edge meters)
(texture-level int8)
(version int8)
(shadow int16)
(shadow-joint-index int8)
(origin-joint-index int8)
(sort int8)
(light-index uint8)
(clothing basic)
(global-effects uint8)
)
(:methods
(skeleton-group-method-16 () none)
)
)
;; definition for method 3 of type skeleton-group
(defmethod inspect ((this skeleton-group))
(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 art-group-name))
(format #t "~1Tart-group-name: ~A~%" (-> this art-group-name))
(format #t "~1Tjgeo: ~D~%" (-> this jgeo))
(format #t "~1Tjanim: ~D~%" (-> this janim))
(format #t "~1Tbounds: ~`vector`P~%" (-> this bounds))
(format #t "~1Tradius: (meters ~m)~%" (-> this bounds w))
(format #t "~1Tmgeo[6] @ #x~X~%" (-> this mgeo))
(format #t "~1Tmax-lod: ~D~%" (-> this max-lod))
(format #t "~1Tlod-dist[6] @ #x~X~%" (-> this lod-dist))
(format #t "~1Tlongest-edge: (meters ~m)~%" (-> this longest-edge))
(format #t "~1Ttexture-level: ~D~%" (-> this texture-level))
(format #t "~1Tversion: ~D~%" (-> this version))
(format #t "~1Tshadow: ~D~%" (-> this shadow))
(format #t "~1Tshadow-joint-index: ~D~%" (-> this shadow-joint-index))
(format #t "~1Torigin-joint-index: ~D~%" (-> this origin-joint-index))
(format #t "~1Tsort: ~D~%" (-> this sort))
(format #t "~1Tlight-index: ~D~%" (-> this light-index))
(format #t "~1Tclothing: ~A~%" (-> this clothing))
(format #t "~1Tglobal-effects: ~D~%" (-> this global-effects))
(label cfg-4)
this
)
;; definition of type lod-group
(deftype lod-group (structure)
"A single level of detail mesh."
((geo merc-ctrl)
(dist meters)
)
:pack-me
)
;; definition for method 3 of type lod-group
(defmethod inspect ((this lod-group))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'lod-group)
(format #t "~1Tgeo: ~A~%" (-> this geo))
(format #t "~1Tdist: (meters ~m)~%" (-> this dist))
(label cfg-4)
this
)
;; definition of type lod-set
(deftype lod-set (structure)
"All the different level-of-detail meshes for an actor."
((lod lod-group 6 :inline)
(max-lod int8)
)
(:methods
(lod-set-method-9 () none)
)
)
;; definition for method 3 of type lod-set
(defmethod inspect ((this lod-set))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'lod-set)
(format #t "~1Tlod[6] @ #x~X~%" (-> this lod))
(format #t "~1Tmax-lod: ~D~%" (-> this max-lod))
(label cfg-4)
this
)
;; definition of type draw-control
(deftype draw-control (basic)
"The draw-control is a collection of all the stuff that the foreground rendering system needs to draw something.
Each process-drawable has a draw-control."
((process process-drawable)
(status draw-control-status)
(data-format draw-control-data-format)
(global-effect draw-control-global-effect)
(art-group art-group)
(jgeo art-joint-geo)
(mgeo merc-ctrl)
(dma-add-func (function process-drawable draw-control symbol object none))
(skeleton skeleton)
(lod-set lod-set :inline)
(max-lod int8 :overlay-at (-> lod-set max-lod))
(force-lod int8)
(cur-lod int8)
(desired-lod int8)
(ripple ripple-control)
(longest-edge meters)
(longest-edge? uint32 :overlay-at longest-edge)
(light-index uint8)
(shadow-mask uint8)
(level-index uint8)
(death-draw-overlap uint8)
(death-timer uint8)
(death-timer-org uint8)
(death-vertex-skip uint16)
(death-effect uint32)
(shadow shadow-geo)
(shadow-ctrl shadow-control)
(distance meters)
(origin vector :inline)
(bounds vector :inline)
(radius meters :overlay-at (-> bounds data 3))
(color-mult rgbaf :inline)
(color-emissive rgbaf :inline)
(effect-mask uint64)
(seg-mask uint64)
(origin-joint-index uint8)
(shadow-joint-index uint8)
(force-fade uint8)
(default-texture-page uint8)
(shadow-values uint32)
(cloth-instances basic)
)
(:methods
(new (symbol type) _type_)
(get-skeleton-origin (_type_) vector)
(draw-control-method-10 () none)
(draw-control-method-11 () none)
(draw-control-method-12 () none)
(draw-control-method-13 () none)
(draw-control-method-14 () none)
(draw-control-method-15 () none)
)
)
;; definition for method 3 of type draw-control
(defmethod inspect ((this draw-control))
(when (not this)
(set! this this)
(goto cfg-57)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tprocess: ~A~%" (-> this process))
(format #t "~1Tstatus: #x~X : (draw-control-status " (-> this status))
(let ((s5-0 (-> this status)))
(if (= (logand s5-0 (draw-control-status no-draw-temp)) (draw-control-status no-draw-temp))
(format #t "no-draw-temp ")
)
(if (= (logand s5-0 (draw-control-status lod-set)) (draw-control-status lod-set))
(format #t "lod-set ")
)
(if (= (logand s5-0 (draw-control-status no-draw-bounds2)) (draw-control-status no-draw-bounds2))
(format #t "no-draw-bounds2 ")
)
(if (= (logand s5-0 (draw-control-status math-skel)) (draw-control-status math-skel))
(format #t "math-skel ")
)
(if (= (logand s5-0 (draw-control-status force-vu1)) (draw-control-status force-vu1))
(format #t "force-vu1 ")
)
(if (= (logand s5-0 (draw-control-status warp-cross-fade)) (draw-control-status warp-cross-fade))
(format #t "warp-cross-fade ")
)
(if (= (logand s5-0 (draw-control-status disable-fog)) (draw-control-status disable-fog))
(format #t "disable-fog ")
)
(if (= (logand s5-0 (draw-control-status no-bounds-check)) (draw-control-status no-bounds-check))
(format #t "no-bounds-check ")
)
(if (= (logand s5-0 (draw-control-status no-closest-distance)) (draw-control-status no-closest-distance))
(format #t "no-closest-distance ")
)
(if (= (logand s5-0 (draw-control-status hud)) (draw-control-status hud))
(format #t "hud ")
)
(if (= (logand s5-0 (draw-control-status no-draw)) (draw-control-status no-draw))
(format #t "no-draw ")
)
(if (= (logand s5-0 (draw-control-status on-screen)) (draw-control-status on-screen))
(format #t "on-screen ")
)
(if (= (logand s5-0 (draw-control-status close-to-screen)) (draw-control-status close-to-screen))
(format #t "close-to-screen ")
)
(if (= (logand s5-0 (draw-control-status force-fade)) (draw-control-status force-fade))
(format #t "force-fade ")
)
(if (= (logand s5-0 (draw-control-status no-draw-bounds)) (draw-control-status no-draw-bounds))
(format #t "no-draw-bounds ")
)
(if (= (logand s5-0 (draw-control-status uninited)) (draw-control-status uninited))
(format #t "uninited ")
)
)
(format #t ")~%")
(let ((t9-20 format)
(a0-37 #t)
(a1-20 "~1Tdata-format: #x~X : ~S~%")
(a2-3 (-> this data-format))
(v1-50 (-> this data-format))
)
(t9-20 a0-37 a1-20 a2-3 (cond
((= v1-50 (draw-control-data-format merc))
"merc"
)
((= v1-50 (draw-control-data-format pris))
"pris"
)
(else
"*unknown*"
)
)
)
)
(format #t "~1Tglobal-effect: #x~X : (draw-control-global-effect " (-> this global-effect))
(let ((s5-1 (-> this global-effect)))
(if (= (logand s5-1 (draw-control-global-effect title-light)) (draw-control-global-effect title-light))
(format #t "title-light ")
)
(if (= (logand s5-1 (draw-control-global-effect bit-1)) (draw-control-global-effect bit-1))
(format #t "bit-1 ")
)
(if (= (logand s5-1 (draw-control-global-effect rim-lights3)) (draw-control-global-effect rim-lights3))
(format #t "rim-lights3 ")
)
(if (= (logand s5-1 (draw-control-global-effect disable-envmap)) (draw-control-global-effect disable-envmap))
(format #t "disable-envmap ")
)
(if (= (logand s5-1 (draw-control-global-effect rim-lights2)) (draw-control-global-effect rim-lights2))
(format #t "rim-lights2 ")
)
(if (= (logand s5-1 (draw-control-global-effect no-textures)) (draw-control-global-effect no-textures))
(format #t "no-textures ")
)
(if (= (logand s5-1 (draw-control-global-effect bit-0)) (draw-control-global-effect bit-0))
(format #t "bit-0 ")
)
(if (= (logand s5-1 (draw-control-global-effect rim-lights)) (draw-control-global-effect rim-lights))
(format #t "rim-lights ")
)
)
(format #t ")~%")
(format #t "~1Tart-group: ~A~%" (-> this art-group))
(format #t "~1Tjgeo: ~A~%" (-> this jgeo))
(format #t "~1Tmgeo: ~A~%" (-> this mgeo))
(format #t "~1Tdma-add-func: ~A~%" (-> this dma-add-func))
(format #t "~1Tskeleton: ~A~%" (-> this skeleton))
(format #t "~1Tlod-set: #<lod-set @ #x~X>~%" (-> this lod-set))
(format #t "~1Tlod[6] @ #x~X~%" (-> this lod-set))
(format #t "~1Tmax-lod: ~D~%" (-> this lod-set max-lod))
(format #t "~1Tforce-lod: ~D~%" (-> this force-lod))
(format #t "~1Tcur-lod: ~D~%" (-> this cur-lod))
(format #t "~1Tdesired-lod: ~D~%" (-> this desired-lod))
(format #t "~1Tripple: ~A~%" (-> this ripple))
(format #t "~1Tlongest-edge: (meters ~m)~%" (-> this longest-edge))
(format #t "~1Tlongest-edge?: ~D~%" (-> this longest-edge))
(format #t "~1Tlight-index: ~D~%" (-> this light-index))
(format #t "~1Tshadow-mask: ~D~%" (-> this shadow-mask))
(format #t "~1Tlevel-index: ~D~%" (-> this level-index))
(format #t "~1Tdeath-draw-overlap: ~D~%" (-> this death-draw-overlap))
(format #t "~1Tdeath-timer: ~D~%" (-> this death-timer))
(format #t "~1Tdeath-timer-org: ~D~%" (-> this death-timer-org))
(format #t "~1Tdeath-vertex-skip: ~D~%" (-> this death-vertex-skip))
(format #t "~1Tdeath-effect: ~D~%" (-> this death-effect))
(format #t "~1Tshadow: ~A~%" (-> this shadow))
(format #t "~1Tshadow-ctrl: ~A~%" (-> this shadow-ctrl))
(format #t "~1Tdistance: (meters ~m)~%" (-> this distance))
(format #t "~1Torigin: ~`vector`P~%" (-> this origin))
(format #t "~1Tbounds: ~`vector`P~%" (-> this bounds))
(format #t "~1Tradius: (meters ~m)~%" (-> this bounds w))
(format #t "~1Tcolor-mult: #<rgbaf @ #x~X>~%" (-> this color-mult))
(format #t "~1Tcolor-emissive: #<rgbaf @ #x~X>~%" (-> this color-emissive))
(format #t "~1Teffect-mask: #x~X~%" (-> this effect-mask))
(format #t "~1Tseg-mask: #x~X~%" (-> this seg-mask))
(format #t "~1Torigin-joint-index: ~D~%" (-> this origin-joint-index))
(format #t "~1Tshadow-joint-index: ~D~%" (-> this shadow-joint-index))
(format #t "~1Tforce-fade: ~D~%" (-> this force-fade))
(format #t "~1Tdefault-texture-page: ~D~%" (-> this default-texture-page))
(format #t "~1Tshadow-values: ~D~%" (-> this shadow-values))
(format #t "~1Tcloth-instances: ~A~%" (-> this cloth-instances))
(label cfg-57)
this
)
;; definition for method 9 of type draw-control
(defmethod get-skeleton-origin ((this draw-control))
(-> this skeleton bones 0 transform trans)
)
;; failed to figure out what this is:
0
+74
View File
@@ -0,0 +1,74 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type draw-node
(deftype draw-node (drawable)
"Node in a bounding volume heirarchy. This is a base class, and there are no children.
The child is a pointer to the start of inline array of drawables (note: not a drawable-inline-array, literally a bunch of plain drawables)
The size of this array is child-count. The type is either more draw-nodes, or, some other drawable like tfragment, depending on the flags.
Different renderers have different restrictions on the tree structure, like max child count, or if all children have the same depth.
Generally, tfrag/collide use a very rigid equal depth, max 8 children rule, but with shrub, anything goes.
This is a very awkward data structure to traverse, but it is designed for fast view frustum culling.
Note that there can be multiple ways to reach drawables in here in some cases - for example you can follow
this tree, or check one of the depth arrays found in tfrag.
"
((child-count uint8 :offset 6)
(flags uint8 :offset 7)
(child drawable :offset 8)
(distance float :offset 12)
)
)
;; definition for method 3 of type draw-node
(defmethod inspect ((this draw-node))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tchild-count: ~D~%" (-> this child-count))
(format #t "~1Tflags: ~D~%" (-> this flags))
(format #t "~1Tchild: #x~X~%" (-> this child))
(format #t "~1Tdistance: #x~X~%" (-> this distance))
(label cfg-4)
this
)
;; definition of type drawable-inline-array-node
(deftype drawable-inline-array-node (drawable-inline-array)
"Top level container for a BVH made of draw-nodes."
((data draw-node 1 :inline)
(pad uint32)
)
)
;; definition of type draw-node-dma
(deftype draw-node-dma (structure)
"DMA buffer layout for draw node culling routine, which copies draw-nodes directly to scratchpad in bulk.
This would not work with the memory layout of shrub."
((banka draw-node 32 :inline)
(bankb draw-node 32 :inline)
)
)
;; definition for method 3 of type draw-node-dma
(defmethod inspect ((this draw-node-dma))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'draw-node-dma)
(format #t "~1Tbanka[32] @ #x~X~%" (-> this banka))
(format #t "~1Tbankb[32] @ #x~X~%" (-> this bankb))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+50
View File
@@ -0,0 +1,50 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type drawable-actor
(deftype drawable-actor (drawable)
"Wrapper around an entity-actor to put it in the drawable system.
Note that this is never used to actually draw actors - it is just used as a list of all entity-actors
for the entity/birth system."
((actor entity-actor :offset 8)
)
)
;; definition for method 3 of type drawable-actor
(defmethod inspect ((this drawable-actor))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tactor: ~A~%" (-> this actor))
(label cfg-4)
this
)
;; definition of type drawable-tree-actor
(deftype drawable-tree-actor (drawable-tree)
"Adapater for putting the actors in the tree-array."
()
)
;; definition of type drawable-inline-array-actor
(deftype drawable-inline-array-actor (drawable-inline-array)
"Array of drawable-actors."
((data drawable-actor 1 :inline)
(pad uint8 4)
)
)
;; definition for method 10 of type drawable-tree-actor
;; WARN: Return type mismatch int vs none.
(defmethod draw ((this drawable-tree-actor) (arg0 drawable-tree-actor) (arg1 display-frame))
0
(none)
)
+39
View File
@@ -0,0 +1,39 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type drawable-group
(deftype drawable-group (drawable)
"Base class for an array of references to other drawables.
These are typically used for very high-level organization of drawable."
((length int16 :offset 6)
(data drawable :dynamic)
)
(:methods
(new (symbol type int) _type_)
)
)
;; definition for method 3 of type drawable-group
(defmethod inspect ((this drawable-group))
(when (not this)
(set! this this)
(goto cfg-7)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(dotimes (s5-0 (-> this length))
(format #t "~T [~D]~1Tdata: ~A~%" s5-0 (-> this data s5-0))
)
(label cfg-7)
this
)
;; failed to figure out what this is:
0
+66
View File
@@ -0,0 +1,66 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type drawable
(deftype drawable (basic)
"Base class for `drawable` scene graph system.
This base class is really abused in many ways, and the meaning of the various methods differ depending
on the exact type. Not even the ID and bsphere here are always populated.
This is used for very high level organization of different rendering data types, and also very low-level
culling/rendering optimizations. It supports both array-of-references and inline-array containers with precise
control over memory layout for use with DMA."
((id int16)
(bsphere vector :inline)
)
(:methods
(drawable-method-9 () none)
(draw (_type_ _type_ display-frame) none)
(drawable-method-11 () none)
(drawable-method-12 () none)
(drawable-method-13 () none)
(drawable-method-14 () none)
(drawable-method-15 () none)
(drawable-method-16 () none)
)
)
;; definition for method 3 of type drawable
(defmethod inspect ((this drawable))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(label cfg-4)
this
)
;; definition of type drawable-error
(deftype drawable-error (drawable)
"A drawable which just represents an error. When drawn, it simply displays a sphere with an error message."
((name string)
)
)
;; definition for method 3 of type drawable-error
(defmethod inspect ((this drawable-error))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tname: ~A~%" (-> this name))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
@@ -0,0 +1,29 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type drawable-inline-array
(deftype drawable-inline-array (drawable)
((length int16 :offset 6)
)
)
;; definition for method 3 of type drawable-inline-array
(defmethod inspect ((this drawable-inline-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tlength: ~D~%" (-> this length))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+24
View File
@@ -0,0 +1,24 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type drawable-tree
(deftype drawable-tree (drawable-group)
"A drawable tree is a container of drawables of a specific rendering type.
Instead of having a single large tree of mixed types, there will be a tree of tfrags, a tree of ties, etc.
The top-level tfrag tree will have a type that's a child of drawable-tree.
Generally, the object passed to a large renderer is a drawable-tree."
()
)
;; definition of type drawable-tree-array
(deftype drawable-tree-array (drawable-group)
"Collection of drawable trees. This might have a tfrag tree, tie tree, etc."
()
)
;; failed to figure out what this is:
0
+487
View File
@@ -0,0 +1,487 @@
;;-*-Lisp-*-
(in-package goal)
;; definition for symbol *stats-poly*, type symbol
(define *stats-poly* #f)
;; definition for symbol *stats-memory*, type symbol
(define *stats-memory* #f)
;; definition for symbol *stats-memory-short*, type symbol
(define *stats-memory-short* #f)
;; definition for symbol *stats-memory-level-index*, type int
(define *stats-memory-level-index* 0)
;; definition for symbol *stats-collide*, type symbol
(define *stats-collide* #f)
;; definition for symbol *stats-bsp*, type symbol
(define *stats-bsp* #f)
;; definition for symbol *stats-buffer*, type symbol
(define *stats-buffer* #f)
;; definition for symbol *stats-target*, type symbol
(define *stats-target* #f)
;; definition for symbol *stats-profile-bars*, type symbol
(define *stats-profile-bars* #f)
;; definition for symbol *stats-perf*, type symbol
(define *stats-perf* #f)
;; definition for symbol *artist-all-visible*, type symbol
(define *artist-all-visible* #f)
;; definition for symbol *artist-flip-visible*, type symbol
(define *artist-flip-visible* #f)
;; definition for symbol *artist-fix-visible*, type symbol
(define *artist-fix-visible* #f)
;; definition for symbol *artist-fix-frustum*, type symbol
(define *artist-fix-frustum* #f)
;; definition for symbol *artist-error-spheres*, type symbol
(define *artist-error-spheres* #f)
;; definition for symbol *artist-use-menu-subdiv*, type symbol
(define *artist-use-menu-subdiv* #f)
;; definition for symbol *display-profile*, type symbol
(define *display-profile* #t)
;; definition for symbol *display-sidekick-stats*, type symbol
(define *display-sidekick-stats* #f)
;; definition for symbol *display-quad-stats*, type symbol
(define *display-quad-stats* #f)
;; definition for symbol *display-tri-stats*, type symbol
(define *display-tri-stats* #f)
;; definition for symbol *display-ground-stats*, type symbol
(define *display-ground-stats* #f)
;; definition for symbol *display-collision-marks*, type symbol
(define *display-collision-marks* #f)
;; definition for symbol *display-collide-cache*, type symbol
(define *display-collide-cache* #f)
;; definition for symbol *display-render-collision*, type symbol
(define *display-render-collision* #f)
;; definition for symbol *display-hipri-collision-marks*, type symbol
(define *display-hipri-collision-marks* #f)
;; definition for symbol *display-edge-collision-marks*, type symbol
(define *display-edge-collision-marks* #f)
;; definition for symbol *display-geo-marks*, type symbol
(define *display-geo-marks* #f)
;; definition for symbol *display-target-marks*, type symbol
(define *display-target-marks* #f)
;; definition for symbol *target-rc-board-controls*, type symbol
(define *target-rc-board-controls* #f)
;; definition for symbol *display-collide-history*, type int
(define *display-collide-history* 0)
;; definition for symbol *amy-cam*, type symbol
(define *amy-cam* #f)
;; definition for symbol *display-xyz-axes*, type symbol
(define *display-xyz-axes* #f)
;; definition for symbol *display-cam-collide-history*, type symbol
(define *display-cam-collide-history* #f)
;; definition for symbol *record-cam-collide-history*, type symbol
(define *record-cam-collide-history* #f)
;; definition for symbol *display-cam-master-marks*, type symbol
(define *display-cam-master-marks* #f)
;; definition for symbol *display-cam-other*, type symbol
(define *display-cam-other* #f)
;; definition for symbol *display-camera-marks*, type symbol
(define *display-camera-marks* #f)
;; definition for symbol *camera-no-mip-correction*, type symbol
(define *camera-no-mip-correction* #f)
;; definition for symbol *camera-turbo-free*, type symbol
(define *camera-turbo-free* #f)
;; definition for symbol *display-cam-los-info*, type symbol
(define *display-cam-los-info* #f)
;; definition for symbol *display-cam-los-debug*, type symbol
(define *display-cam-los-debug* #f)
;; definition for symbol *display-cam-los-marks*, type symbol
(define *display-cam-los-marks* #f)
;; definition for symbol *display-cam-coll-marks*, type symbol
(define *display-cam-coll-marks* #f)
;; definition for symbol *display-camera-info*, type symbol
(define *display-camera-info* #f)
;; definition for symbol *display-camera-old-stats*, type symbol
(define *display-camera-old-stats* #f)
;; definition for symbol *display-camera-last-attacker*, type symbol
(define *display-camera-last-attacker* #f)
;; definition for symbol *display-file-info*, type symbol
(define *display-file-info* #f)
;; definition for symbol *display-actor-marks*, type symbol
(define *display-actor-marks* #f)
;; definition for symbol *display-sprite-info*, type symbol
(define *display-sprite-info* #f)
;; definition for symbol *display-sprite-marks*, type symbol
(define *display-sprite-marks* #f)
;; definition for symbol *display-sprite-spheres*, type symbol
(define *display-sprite-spheres* #f)
;; definition for symbol *display-entity-errors*, type symbol
(define *display-entity-errors* #t)
;; definition for symbol *display-capture-mode*, type symbol
(define *display-capture-mode* #f)
;; definition for symbol *display-instance-info*, type symbol
(define *display-instance-info* #f)
;; definition for symbol *display-deci-count*, type symbol
(define *display-deci-count* #f)
;; definition for symbol *sync-dma*, type symbol
(define *sync-dma* #f)
;; definition for symbol *display-strip-lines*, type strip-lines-controls
(define *display-strip-lines* (the-as strip-lines-controls 0))
;; definition for symbol *display-battle-marks*, type symbol
(define *display-battle-marks* #f)
;; definition for symbol *display-joint-axes*, type symbol
(define *display-joint-axes* #f)
;; definition for symbol *display-nav-marks*, type symbol
(define *display-nav-marks* #f)
;; definition for symbol *display-nav-network*, type symbol
(define *display-nav-network* #f)
;; definition for symbol *display-path-marks*, type symbol
(define *display-path-marks* #f)
;; definition for symbol *display-vol-marks*, type symbol
(define *display-vol-marks* #f)
;; definition for symbol *display-water-marks*, type symbol
(define *display-water-marks* #f)
;; definition for symbol *display-nav-mesh*, type symbol
(define *display-nav-mesh* #f)
;; definition for symbol *display-race-mesh*, type symbol
(define *display-race-mesh* #f)
;; definition for symbol *display-actor-pointer*, type symbol
(define *display-actor-pointer* #f)
;; definition for symbol *display-actor-vis*, type symbol
(define *display-actor-vis* #f)
;; definition for symbol *display-actor-graph*, type symbol
(define *display-actor-graph* #f)
;; definition for symbol *display-traffic-height-map*, type symbol
(define *display-traffic-height-map* #f)
;; definition for symbol *display-trail-graph*, type symbol
(define *display-trail-graph* #f)
;; definition for symbol *display-color-bars*, type symbol
(define *display-color-bars* #f)
;; definition for symbol *display-bug-report*, type symbol
(define *display-bug-report* #f)
;; definition for symbol *display-level-border*, type symbol
(define *display-level-border* #f)
;; definition for symbol *display-memcard-info*, type symbol
(define *display-memcard-info* #f)
;; definition for symbol *display-split-boxes*, type symbol
(define *display-split-boxes* #f)
;; definition for symbol *display-split-box-info*, type symbol
(define *display-split-box-info* #f)
;; definition for symbol *display-texture-distances*, type symbol
(define *display-texture-distances* #f)
;; definition for symbol *display-texture-download*, type symbol
(define *display-texture-download* #f)
;; definition for symbol *display-art-control*, type symbol
(define *display-art-control* #f)
;; definition for symbol *display-gui-control*, type symbol
(define *display-gui-control* #f)
;; definition for symbol *display-level-spheres*, type symbol
(define *display-level-spheres* #f)
;; definition for symbol *time-of-day-fast*, type symbol
(define *time-of-day-fast* #f)
;; definition for symbol *display-iop-info*, type symbol
(define *display-iop-info* #f)
;; definition for symbol *ambient-sound-class*, type symbol
(define *ambient-sound-class* #t)
;; definition for symbol *slow-frame-rate*, type symbol
(define *slow-frame-rate* #f)
;; definition for symbol *display-region-marks*, type symbol
(define *display-region-marks* #f)
;; definition for symbol *execute-regions*, type symbol
(define *execute-regions* #t)
;; definition for symbol *debug-pause*, type symbol
(define *debug-pause* #f)
;; definition for symbol *debug-view-anims*, type symbol
(define *debug-view-anims* #f)
;; definition for symbol *debug-unkillable*, type symbol
(define *debug-unkillable* #f)
;; definition for symbol *debug-player-vehicle-unkillable*, type symbol
(define *debug-player-vehicle-unkillable* #f)
;; definition for symbol *debug-actor*, type object
(define *debug-actor* (the-as object #f))
;; definition for symbol *gun-marks*, type symbol
(define *gun-marks* #f)
;; definition for symbol *bug-report-output-mode*, type symbol
(define *bug-report-output-mode* (if *debug-segment*
'file-stream
'*stdcon*
)
)
;; definition for symbol *display-scene-control*, type scene-controls
(define *display-scene-control* (the-as scene-controls 0))
;; definition for symbol *display-bot-marks*, type bot-marks-controls
(define *display-bot-marks* (the-as bot-marks-controls 0))
;; definition for symbol *display-race-marks*, type race-marks-controls
(define *display-race-marks* (the-as race-marks-controls 0))
;; definition for symbol *race-record-path*, type symbol
(define *race-record-path* #f)
;; definition for symbol *select-race*, type race-selection
(define *select-race* (the-as race-selection 0))
;; definition for symbol *select-race-path*, type int
(define *select-race-path* 0)
;; definition for symbol *bot-record-path*, type int
(define *bot-record-path* -1)
;; definition for symbol *subdivide-draw-mode*, type subdivide-setting
(define *subdivide-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *subdivide-scissor-draw-mode*, type subdivide-setting
(define *subdivide-scissor-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *subdivide-foreground-draw-mode*, type subdivide-setting
(define *subdivide-foreground-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *subdivide-ocean-draw-mode*, type subdivide-setting
(define *subdivide-ocean-draw-mode* (the-as subdivide-setting 0))
;; definition for symbol *ocean-height-hack*, type ocean-height-hack
(define *ocean-height-hack* (the-as ocean-height-hack 0))
;; definition (perm) for symbol *dproc*, type process
(define-perm *dproc* process #f)
;; definition for symbol *run*, type symbol
(define *run* #f)
;; definition for symbol *teleport*, type symbol
(define *teleport* #f)
;; definition for symbol *teleport-count*, type int
(define *teleport-count* 0)
;; definition for symbol *draw-hook*, type (function none)
(define *draw-hook* nothing)
;; definition for symbol *debug-hook*, type pair
(define *debug-hook* '())
;; definition for symbol *menu-hook*, type (function debug-menu-context)
(define *menu-hook* (the-as (function debug-menu-context) nothing))
;; definition for symbol *progress-hook*, type (function none)
(define *progress-hook* nothing)
;; definition for symbol *dma-timeout-hook*, type (function none)
(define *dma-timeout-hook* nothing)
;; definition of type frame-stats
(deftype frame-stats (structure)
((field-time time-frame 2)
(field int32)
)
)
;; definition for method 3 of type frame-stats
(defmethod inspect ((this frame-stats))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'frame-stats)
(format #t "~1Tfield-time[2] @ #x~X~%" (-> this field-time))
(format #t "~1Tfield: ~D~%" (-> this field))
(label cfg-4)
this
)
;; definition for symbol *frame-stats*, type frame-stats
(define *frame-stats* (new 'static 'frame-stats))
;; definition of type screen-filter
(deftype screen-filter (basic)
((draw? symbol)
(bucket int32)
(depth int32)
(ztest uint64)
(color vector :inline)
(color-src vector :inline)
(color-dest vector :inline)
(extra vector :inline)
(speed float :overlay-at (-> extra data 0))
(current-interp float :overlay-at (-> extra data 1))
(lock-vsync? basic)
)
(:methods
(draw (_type_) none)
(setup (_type_ vector vector float bucket-id) none)
(disable (_type_) none)
)
)
;; definition for method 3 of type screen-filter
(defmethod inspect ((this screen-filter))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tdraw?: ~A~%" (-> this draw?))
(format #t "~1Tbucket: ~D~%" (-> this bucket))
(format #t "~1Tdepth: #x~X~%" (-> this depth))
(format #t "~1Tztest: #x~X~%" (-> this ztest))
(format #t "~1Tcolor: #<vector @ #x~X>~%" (-> this color))
(format #t "~1Tcolor-src: #<vector @ #x~X>~%" (-> this color-src))
(format #t "~1Tcolor-dest: #<vector @ #x~X>~%" (-> this color-dest))
(format #t "~1Textra: #<vector @ #x~X>~%" (-> this extra))
(format #t "~1Tspeed: ~f~%" (-> this extra x))
(format #t "~1Tcurrent-interp: ~f~%" (-> this extra y))
(format #t "~1Tlock-vsync?: ~A~%" (-> this lock-vsync?))
(label cfg-4)
this
)
;; definition of type col-rend
(deftype col-rend (basic)
((draw? symbol)
(outline? symbol)
(show-back-faces? symbol)
(show-normals? symbol)
(ghost-hidden? symbol)
(show-only uint32)
(cspec collide-spec)
(track uint8)
(bbox-radius float)
(bbox-center vector :inline)
(camera-to-bbox-dist float)
)
(:methods
(col-rend-method-9 () none)
)
)
;; definition for method 3 of type col-rend
(defmethod inspect ((this col-rend))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tdraw?: ~A~%" (-> this draw?))
(format #t "~1Toutline?: ~A~%" (-> this outline?))
(format #t "~1Tshow-back-faces?: ~A~%" (-> this show-back-faces?))
(format #t "~1Tshow-normals?: ~A~%" (-> this show-normals?))
(format #t "~1Tghost-hidden?: ~A~%" (-> this ghost-hidden?))
(format #t "~1Tshow-only: ~D~%" (-> this show-only))
(format #t "~1Tcspec: ~D~%" (-> this cspec))
(format #t "~1Ttrack: ~D~%" (-> this track))
(format #t "~1Tbbox-radius: ~f~%" (-> this bbox-radius))
(format #t "~1Tbbox-center: #<vector @ #x~X>~%" (-> this bbox-center))
(format #t "~1Tcamera-to-bbox-dist: ~f~%" (-> this camera-to-bbox-dist))
(label cfg-4)
this
)
;; definition for symbol *col-rend*, type col-rend
(define *col-rend* (new 'static 'col-rend
:draw? #f
:outline? #t
:show-back-faces? #t
:show-normals? #f
:ghost-hidden? #t
:cspec (collide-spec cs3 cs4 cs5)
:track #x1
:bbox-radius 24576.0
:camera-to-bbox-dist 65536.0
)
)
;; definition (debug) for function debug-actor?
(defun-debug debug-actor? ((arg0 object))
(= arg0 *debug-actor*)
)
;; failed to figure out what this is:
0
+501
View File
@@ -0,0 +1,501 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type gsf-vertex
(deftype gsf-vertex (structure)
"Vertex used by generic. GSF = generic stripped fragment?"
((data uint32 8)
(byte uint8 32 :overlay-at (-> data 0))
(quad uint128 2 :overlay-at (-> data 0))
(vt qword :inline :overlay-at (-> data 0))
(pos vector3s :inline :overlay-at (-> data 0))
(tex vector2uh :inline :overlay-at (-> data 3))
(nrm vector3s :inline :overlay-at (-> data 4))
(nc qword :inline :overlay-at (-> data 4))
(clr vector4ub :inline :overlay-at (-> data 7))
(dtex vector2uh :inline :overlay-at (-> data 4))
(dclr vector4ub :inline :overlay-at (-> data 5))
)
)
;; definition for method 3 of type gsf-vertex
(defmethod inspect ((this gsf-vertex))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-vertex)
(format #t "~1Tdata[8] @ #x~X~%" (-> this data))
(format #t "~1Tbyte[32] @ #x~X~%" (-> this data))
(format #t "~1Tquad[2] @ #x~X~%" (-> this data))
(format #t "~1Tvt: #<qword @ #x~X>~%" (-> this data))
(format #t "~1Tpos: #<vector3s @ #x~X>~%" (-> this data))
(format #t "~1Ttex: #<vector2uh @ #x~X>~%" (&-> this vt vector4w w))
(format #t "~1Tnrm: #<vector3s @ #x~X>~%" (-> this nrm))
(format #t "~1Tnc: #<qword @ #x~X>~%" (-> this nrm))
(format #t "~1Tclr: #<vector4ub @ #x~X>~%" (&-> this nc vector4w w))
(format #t "~1Tdtex: #<vector2uh @ #x~X>~%" (-> this nrm))
(format #t "~1Tdclr: #<vector4ub @ #x~X>~%" (&-> this nrm y))
(label cfg-4)
this
)
;; definition of type gsf-vertex-array
(deftype gsf-vertex-array (structure)
((vtx gsf-vertex :dynamic)
)
)
;; definition for method 3 of type gsf-vertex-array
(defmethod inspect ((this gsf-vertex-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-vertex-array)
(format #t "~1Tvtx[0] @ #x~X~%" (-> this vtx))
(label cfg-4)
this
)
;; definition of type gsf-fx-vertex
(deftype gsf-fx-vertex (structure)
"Color/texture data only. Possibly used to share with a gsf-vertex with
the same position/normal."
((clr vector4ub :inline)
(tex vector2uh :inline)
)
)
;; definition for method 3 of type gsf-fx-vertex
(defmethod inspect ((this gsf-fx-vertex))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-fx-vertex)
(format #t "~1Tclr: #<vector4ub @ #x~X>~%" (-> this clr))
(format #t "~1Ttex: #<vector2uh @ #x~X>~%" (-> this tex))
(label cfg-4)
this
)
;; definition of type gsf-fx-vertex-array
(deftype gsf-fx-vertex-array (structure)
((data gsf-fx-vertex :dynamic)
)
)
;; definition for method 3 of type gsf-fx-vertex-array
(defmethod inspect ((this gsf-fx-vertex-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-fx-vertex-array)
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; definition of type gsf-header
(deftype gsf-header (structure)
"Header for generic data."
((num-strips uint8)
(num-new-vtxs uint8)
(num-dps uint16)
(num-vtxs uint16)
(strip-table uint8 10)
)
)
;; definition for method 3 of type gsf-header
(defmethod inspect ((this gsf-header))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-header)
(format #t "~1Tnum-strips: ~D~%" (-> this num-strips))
(format #t "~1Tnum-new-vtxs: ~D~%" (-> this num-new-vtxs))
(format #t "~1Tnum-dps: ~D~%" (-> this num-dps))
(format #t "~1Tnum-vtxs: ~D~%" (-> this num-vtxs))
(format #t "~1Tstrip-table[10] @ #x~X~%" (-> this strip-table))
(label cfg-4)
this
)
;; definition of type gsf-ik
(deftype gsf-ik (structure)
((index uint8)
(no-kick uint8)
)
)
;; definition for method 3 of type gsf-ik
(defmethod inspect ((this gsf-ik))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-ik)
(format #t "~1Tindex: ~D~%" (-> this index))
(format #t "~1Tno-kick: ~D~%" (-> this no-kick))
(label cfg-4)
this
)
;; definition of type gsf-info
(deftype gsf-info (structure)
((ptr-iks uint32)
(ptr-verts uint32)
(ptr-fx uint32)
(dummy2 uint32)
)
)
;; definition for method 3 of type gsf-info
(defmethod inspect ((this gsf-info))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-info)
(format #t "~1Tptr-iks: #x~X~%" (-> this ptr-iks))
(format #t "~1Tptr-verts: #x~X~%" (-> this ptr-verts))
(format #t "~1Tptr-fx: #x~X~%" (-> this ptr-fx))
(format #t "~1Tdummy2: ~D~%" (-> this dummy2))
(label cfg-4)
this
)
;; definition of type gsf-buffer
(deftype gsf-buffer (structure)
((data uint8 8192)
(info gsf-info :inline :overlay-at (-> data 0))
(header gsf-header :inline :overlay-at (-> data 16))
(work-area uint8 :dynamic :overlay-at (-> data 32))
)
)
;; definition for method 3 of type gsf-buffer
(defmethod inspect ((this gsf-buffer))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gsf-buffer)
(format #t "~1Tdata[8192] @ #x~X~%" (-> this data))
(format #t "~1Tinfo: #<gsf-info @ #x~X>~%" (-> this data))
(format #t "~1Theader: #<gsf-header @ #x~X>~%" (-> this header))
(format #t "~1Twork-area[0] @ #x~X~%" (-> this work-area))
(label cfg-4)
this
)
;; definition of type generic-frag
(deftype generic-frag (structure)
((start-pos uint16)
(end-pos uint16)
)
)
;; definition for method 3 of type generic-frag
(defmethod inspect ((this generic-frag))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-frag)
(format #t "~1Tstart-pos: ~D~%" (-> this start-pos))
(format #t "~1Tend-pos: ~D~%" (-> this end-pos))
(label cfg-4)
this
)
;; definition of type generic-strip
(deftype generic-strip (structure)
((pos uint16)
(len uint16)
)
)
;; definition for method 3 of type generic-strip
(defmethod inspect ((this generic-strip))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-strip)
(format #t "~1Tpos: ~D~%" (-> this pos))
(format #t "~1Tlen: ~D~%" (-> this len))
(label cfg-4)
this
)
;; definition of type generic-envmap-saves
(deftype generic-envmap-saves (structure)
((index-mask vector4w :inline)
(verts uint128 12)
(kicks uint128 4)
)
)
;; definition for method 3 of type generic-envmap-saves
(defmethod inspect ((this generic-envmap-saves))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-envmap-saves)
(format #t "~1Tindex-mask: #<vector4w @ #x~X>~%" (-> this index-mask))
(format #t "~1Tverts[12] @ #x~X~%" (-> this verts))
(format #t "~1Tkicks[4] @ #x~X~%" (-> this kicks))
(label cfg-4)
this
)
;; definition of type generic-interp-job
(deftype generic-interp-job (structure)
((job-type uint16)
(num uint16)
(first uint16)
(pad uint16)
(ptr-data uint32)
(morph-z uint16)
(morph-w uint16)
)
:pack-me
)
;; definition for method 3 of type generic-interp-job
(defmethod inspect ((this generic-interp-job))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-interp-job)
(format #t "~1Tjob-type: ~D~%" (-> this job-type))
(format #t "~1Tnum: ~D~%" (-> this num))
(format #t "~1Tfirst: ~D~%" (-> this first))
(format #t "~1Tpad: ~D~%" (-> this pad))
(format #t "~1Tptr-data: #x~X~%" (-> this ptr-data))
(format #t "~1Tmorph-z: ~D~%" (-> this morph-z))
(format #t "~1Tmorph-w: ~D~%" (-> this morph-w))
(label cfg-4)
this
)
;; definition of type generic-saves
(deftype generic-saves (structure)
((ptr-dma uint32)
(ptr-vtxs uint32)
(ptr-clrs uint32)
(ptr-texs uint32)
(ptr-env-clrs uint32)
(ptr-env-texs uint32)
(cur-outbuf uint32)
(ptr-fx-buf uint32)
(xor-outbufs uint32)
(num-dps uint32)
(qwc uint32)
(gsf-buf gsf-buffer)
(ptr-shaders uint32)
(ptr-env-shader uint32)
(is-envmap uint16)
(is-translucent uint16)
(basep uint32)
(ptr-interp-job generic-interp-job)
(gifbuf-adr uint32)
(inbuf-adr uint32)
(fade-val uint32)
(time-of-day-color rgba)
(to-vu0-waits uint32)
(to-spr-waits uint32)
(from-spr-waits uint32)
(envmap generic-envmap-saves :inline)
)
)
;; definition for method 3 of type generic-saves
(defmethod inspect ((this generic-saves))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-saves)
(format #t "~1Tptr-dma: #x~X~%" (-> this ptr-dma))
(format #t "~1Tptr-vtxs: #x~X~%" (-> this ptr-vtxs))
(format #t "~1Tptr-clrs: #x~X~%" (-> this ptr-clrs))
(format #t "~1Tptr-texs: #x~X~%" (-> this ptr-texs))
(format #t "~1Tptr-env-clrs: #x~X~%" (-> this ptr-env-clrs))
(format #t "~1Tptr-env-texs: #x~X~%" (-> this ptr-env-texs))
(format #t "~1Tcur-outbuf: #x~X~%" (-> this cur-outbuf))
(format #t "~1Tptr-fx-buf: ~D~%" (-> this ptr-fx-buf))
(format #t "~1Txor-outbufs: ~D~%" (-> this xor-outbufs))
(format #t "~1Tnum-dps: ~D~%" (-> this num-dps))
(format #t "~1Tqwc: ~D~%" (-> this qwc))
(format #t "~1Tgsf-buf: #<gsf-buffer @ #x~X>~%" (-> this gsf-buf))
(format #t "~1Tptr-shaders: #x~X~%" (-> this ptr-shaders))
(format #t "~1Tptr-env-shader: ~D~%" (-> this ptr-env-shader))
(format #t "~1Tis-envmap: ~D~%" (-> this is-envmap))
(format #t "~1Tis-translucent: ~D~%" (-> this is-translucent))
(format #t "~1Tbasep: #x~X~%" (-> this basep))
(format #t "~1Tptr-interp-job: #<generic-interp-job @ #x~X>~%" (-> this ptr-interp-job))
(format #t "~1Tgifbuf-adr: ~D~%" (-> this gifbuf-adr))
(format #t "~1Tinbuf-adr: ~D~%" (-> this inbuf-adr))
(format #t "~1Tfade-val: ~D~%" (-> this fade-val))
(format #t "~1Ttime-of-day-color: ~D~%" (-> this time-of-day-color))
(format #t "~1Tto-vu0-waits: ~D~%" (-> this to-vu0-waits))
(format #t "~1Tto-spr-waits: ~D~%" (-> this to-spr-waits))
(format #t "~1Tfrom-spr-waits: ~D~%" (-> this from-spr-waits))
(format #t "~1Tenvmap: #<generic-envmap-saves @ #x~X>~%" (-> this envmap))
(label cfg-4)
this
)
;; definition of type generic-gif-tag
(deftype generic-gif-tag (structure)
((data uint32 4)
(qword qword :inline :overlay-at (-> data 0))
(fan-prim gif-tag-prim :overlay-at (-> data 0))
(str-prim gif-tag-prim :overlay-at (-> data 1))
(regs gif-tag-regs-32 :overlay-at (-> data 2))
(num-strips uint32 :overlay-at (-> data 3))
)
)
;; definition for method 3 of type generic-gif-tag
(defmethod inspect ((this generic-gif-tag))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-gif-tag)
(format #t "~1Tdata[4] @ #x~X~%" (-> this data))
(format #t "~1Tqword: #<qword @ #x~X>~%" (-> this data))
(format #t "~1Tfan-prim: ~D~%" (-> this fan-prim))
(format #t "~1Tstr-prim: ~D~%" (-> this str-prim))
(format #t "~1Tregs: ~D~%" (-> this regs))
(format #t "~1Tnum-strips: ~D~%" (-> this num-strips))
(label cfg-4)
this
)
;; definition of type generic-envmap-consts
(deftype generic-envmap-consts (structure)
((consts vector :inline)
(strgif generic-gif-tag :inline)
(colors vector4w :inline)
(shader adgif-shader :inline)
)
)
;; definition for method 3 of type generic-envmap-consts
(defmethod inspect ((this generic-envmap-consts))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-envmap-consts)
(format #t "~1Tconsts: #<vector @ #x~X>~%" (-> this consts))
(format #t "~1Tstrgif: #<generic-gif-tag @ #x~X>~%" (-> this strgif))
(format #t "~1Tcolors: #<vector4w @ #x~X>~%" (-> this colors))
(format #t "~1Tshader: #<adgif-shader @ #x~X>~%" (-> this shader))
(label cfg-4)
this
)
;; definition of type generic-consts
(deftype generic-consts (structure)
((dma-header dma-packet :inline)
(vif-header uint32 4)
(dma-ref-vtxs dma-packet :inline)
(dma-cnt-call dma-packet :inline)
(matrix matrix :inline)
(base-strgif generic-gif-tag :inline)
(alpha-opaque gs-adcmd :inline)
(alpha-translucent gs-adcmd :inline)
(ztest-normal gs-adcmd :inline)
(ztest-opaque gs-adcmd :inline)
(adcmd-offsets uint8 16)
(stcycle-tag uint32)
(unpack-vtx-tag uint32)
(unpack-clr-tag uint32)
(unpack-tex-tag uint32)
(mscal-tag uint32)
(flush-tag uint32)
(reset-cycle-tag uint32)
(dummy0 uint32)
(dma-tag-cnt uint64)
(envmap generic-envmap-consts :inline)
(light-consts vector :inline)
(texture-offset uint16 8)
)
)
;; definition for method 3 of type generic-consts
(defmethod inspect ((this generic-consts))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-consts)
(format #t "~1Tdma-header: #<dma-packet @ #x~X>~%" (-> this dma-header))
(format #t "~1Tvif-header[4] @ #x~X~%" (-> this vif-header))
(format #t "~1Tdma-ref-vtxs: #<dma-packet @ #x~X>~%" (-> this dma-ref-vtxs))
(format #t "~1Tdma-cnt-call: #<dma-packet @ #x~X>~%" (-> this dma-cnt-call))
(format #t "~1Tmatrix: #<matrix @ #x~X>~%" (-> this matrix))
(format #t "~1Tbase-strgif: #<generic-gif-tag @ #x~X>~%" (-> this base-strgif))
(format #t "~1Talpha-opaque: #<gs-adcmd @ #x~X>~%" (-> this alpha-opaque))
(format #t "~1Talpha-translucent: #<gs-adcmd @ #x~X>~%" (-> this alpha-translucent))
(format #t "~1Tztest-normal: #<gs-adcmd @ #x~X>~%" (-> this ztest-normal))
(format #t "~1Tztest-opaque: #<gs-adcmd @ #x~X>~%" (-> this ztest-opaque))
(format #t "~1Tadcmd-offsets[16] @ #x~X~%" (-> this adcmd-offsets))
(format #t "~1Tadcmds[4] @ #x~X~%" (-> this alpha-opaque))
(format #t "~1Tstcycle-tag: ~D~%" (-> this stcycle-tag))
(format #t "~1Tunpack-vtx-tag: ~D~%" (-> this unpack-vtx-tag))
(format #t "~1Tunpack-clr-tag: ~D~%" (-> this unpack-clr-tag))
(format #t "~1Tunpack-tex-tag: ~D~%" (-> this unpack-tex-tag))
(format #t "~1Tmscal-tag: ~D~%" (-> this mscal-tag))
(format #t "~1Tflush-tag: ~D~%" (-> this flush-tag))
(format #t "~1Treset-cycle-tag: ~D~%" (-> this reset-cycle-tag))
(format #t "~1Tdummy0: ~D~%" (-> this dummy0))
(format #t "~1Tdma-tag-cnt: ~D~%" (-> this dma-tag-cnt))
(format #t "~1Tenvmap: #<generic-envmap-consts @ #x~X>~%" (-> this envmap))
(format #t "~1Tlight-consts: #<vector @ #x~X>~%" (-> this light-consts))
(format #t "~1Ttexture-offset[8] @ #x~X~%" (-> this texture-offset))
(label cfg-4)
this
)
;; definition of type generic-storage
(deftype generic-storage (structure)
((data uint128 16)
)
)
;; definition for method 3 of type generic-storage
(defmethod inspect ((this generic-storage))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-storage)
(format #t "~1Tdata[16] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(kmemopen global "gsf-buffer")
;; definition for symbol *gsf-buffer*, type object
(define *gsf-buffer* (the-as object (kmalloc global 9216 (kmalloc-flags align-64) "malloc")))
;; failed to figure out what this is:
(kmemclose)
+189
View File
@@ -0,0 +1,189 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type pris-mtx
(deftype pris-mtx (structure)
"Matrix for merc rendering. Named after the earlier 'pris' renderer.
Contains a transformation matrix for vertices, one for normals, and a scale.
This matrix is likely not used by generic VU1, but is used by the merc -> generic converter."
((data float 32)
(vector vector 8 :overlay-at (-> data 0))
(t-mtx matrix :inline :overlay-at (-> data 0))
(n-mtx matrix3 :inline :overlay-at (-> data 16))
(scale vector :inline :overlay-at (-> data 28))
)
)
;; definition for method 3 of type pris-mtx
(defmethod inspect ((this pris-mtx))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'pris-mtx)
(format #t "~1Tdata[32] @ #x~X~%" (-> this data))
(format #t "~1Tvector[8] @ #x~X~%" (-> this data))
(format #t "~1Tt-mtx: #<matrix @ #x~X>~%" (-> this data))
(format #t "~1Tn-mtx: #<matrix3 @ #x~X>~%" (-> this n-mtx))
(format #t "~1Tscale: #<vector @ #x~X>~%" (-> this scale))
(label cfg-4)
this
)
;; definition of type generic-pris-mtx-save
(deftype generic-pris-mtx-save (structure)
((loc-mtx pris-mtx :inline)
(par-mtx pris-mtx :inline)
(dif-mtx pris-mtx :inline)
)
)
;; definition for method 3 of type generic-pris-mtx-save
(defmethod inspect ((this generic-pris-mtx-save))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-pris-mtx-save)
(format #t "~1Tloc-mtx: #<pris-mtx @ #x~X>~%" (-> this loc-mtx))
(format #t "~1Tpar-mtx: #<pris-mtx @ #x~X>~%" (-> this par-mtx))
(format #t "~1Tdif-mtx: #<pris-mtx @ #x~X>~%" (-> this dif-mtx))
(label cfg-4)
this
)
;; definition of type generic-constants
(deftype generic-constants (structure)
"Constant data sent to VU1 for generic rendering."
((fog vector :inline)
(adgif gs-gif-tag :inline)
(hvdf-offset vector :inline)
(hmge-scale vector :inline)
(invh-scale vector :inline)
(guard vector :inline)
(flush qword :inline)
(stores qword :inline)
)
)
;; definition for method 3 of type generic-constants
(defmethod inspect ((this generic-constants))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-constants)
(format #t "~1Tfog: #<vector @ #x~X>~%" (-> this fog))
(format #t "~1Tadgif: #<qword @ #x~X>~%" (-> this adgif))
(format #t "~1Thvdf-offset: #<vector @ #x~X>~%" (-> this hvdf-offset))
(format #t "~1Thmge-scale: #<vector @ #x~X>~%" (-> this hmge-scale))
(format #t "~1Tinvh-scale: #<vector @ #x~X>~%" (-> this invh-scale))
(format #t "~1Tguard: #<vector @ #x~X>~%" (-> this guard))
(format #t "~1Tflush: #<qword @ #x~X>~%" (-> this flush))
(format #t "~1Tstores: #<qword @ #x~X>~%" (-> this stores))
(label cfg-4)
this
)
;; definition of type generic-shrub-constants
(deftype generic-shrub-constants (structure)
((shrub-giftag generic-gif-tag :inline)
(shrub-adnop qword :inline)
)
)
;; definition for method 3 of type generic-shrub-constants
(defmethod inspect ((this generic-shrub-constants))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-shrub-constants)
(format #t "~1Tshrub-giftag: #<generic-gif-tag @ #x~X>~%" (-> this shrub-giftag))
(format #t "~1Tshrub-adnop: #<qword @ #x~X>~%" (-> this shrub-adnop))
(label cfg-4)
this
)
;; definition of type gcf-shader
(deftype gcf-shader (structure)
((adgif uint128 5)
(shader adgif-shader :inline :overlay-at (-> adgif 0))
(pos uint32 :offset 12)
(num uint32 :offset 28)
)
)
;; definition for method 3 of type gcf-shader
(defmethod inspect ((this gcf-shader))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gcf-shader)
(format #t "~1Tadgif[5] @ #x~X~%" (-> this adgif))
(format #t "~1Tshader: #<adgif-shader @ #x~X>~%" (-> this adgif))
(format #t "~1Tpos: ~D~%" (-> this pos))
(format #t "~1Tnum: ~D~%" (-> this num))
(label cfg-4)
this
)
;; definition of type gcf-control
(deftype gcf-control (structure)
((matrix matrix :inline)
(giftag generic-gif-tag :inline)
(adnops gs-adcmd 2 :inline)
(num-strips uint32 :overlay-at (-> giftag data 3))
(num-dps uint32 :overlay-at (-> adnops 0 word 3))
(kick-offset uint32 :offset 108)
(shader gcf-shader :dynamic)
)
)
;; definition for method 3 of type gcf-control
(defmethod inspect ((this gcf-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gcf-control)
(format #t "~1Tmatrix: #<matrix @ #x~X>~%" (-> this matrix))
(format #t "~1Tgiftag: #<generic-gif-tag @ #x~X>~%" (-> this giftag))
(format #t "~1Tadnops[2] @ #x~X~%" (-> this adnops))
(format #t "~1Tnum-strips: ~D~%" (-> this giftag num-strips))
(format #t "~1Tnum-dps: ~D~%" (-> this num-dps))
(format #t "~1Tkick-offset: ~D~%" (-> this kick-offset))
(format #t "~1Tshader[0] @ #x~X~%" (-> this shader))
(label cfg-4)
this
)
;; definition of type gcf-vertex
(deftype gcf-vertex (structure)
((tex vector4w :inline)
(clr gs-packed-rgba :inline)
(pos gs-packed-xyzw :inline)
)
)
;; definition for method 3 of type gcf-vertex
(defmethod inspect ((this gcf-vertex))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'gcf-vertex)
(format #t "~1Ttex: #<vector4w @ #x~X>~%" (-> this tex))
(format #t "~1Tclr: #<gs-packed-rgba @ #x~X>~%" (-> this clr))
(format #t "~1Tpos: #<gs-packed-xyzw @ #x~X>~%" (-> this pos))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+657
View File
@@ -0,0 +1,657 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type generic-tie-instance
(deftype generic-tie-instance (structure)
((matrix-tag dma-packet :inline)
(matrix-data vector 6 :inline)
(index-tag dma-packet :inline)
(indices uint8 224)
(end-tag dma-packet :inline)
)
)
;; definition for method 3 of type generic-tie-instance
(defmethod inspect ((this generic-tie-instance))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-instance)
(format #t "~1Tmatrix-tag: #<dma-packet @ #x~X>~%" (-> this matrix-tag))
(format #t "~1Tmatrix-data[6] @ #x~X~%" (-> this matrix-data))
(format #t "~1Tindex-tag: #<dma-packet @ #x~X>~%" (-> this index-tag))
(format #t "~1Tindices[224] @ #x~X~%" (-> this indices))
(format #t "~1Tend-tag: #<dma-packet @ #x~X>~%" (-> this end-tag))
(label cfg-4)
this
)
;; definition of type generic-tie-input
(deftype generic-tie-input (structure)
((palette-tag dma-packet :inline)
(palette rgba 128)
(model-tag dma-packet :inline)
(model vector 146 :inline)
(matrix-tag dma-packet :inline)
(matrix-data vector 6 :inline)
(index-tag dma-packet :inline)
(indices uint8 224)
(end-tag dma-packet :inline)
)
)
;; definition for method 3 of type generic-tie-input
(defmethod inspect ((this generic-tie-input))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-input)
(format #t "~1Tpalette-tag: #<dma-packet @ #x~X>~%" (-> this palette-tag))
(format #t "~1Tpalette[128] @ #x~X~%" (-> this palette))
(format #t "~1Tmodel-tag: #<dma-packet @ #x~X>~%" (-> this model-tag))
(format #t "~1Tmodel[146] @ #x~X~%" (-> this model))
(format #t "~1Tmatrix-tag: #<dma-packet @ #x~X>~%" (-> this matrix-tag))
(format #t "~1Tmatrix-data[6] @ #x~X~%" (-> this matrix-data))
(format #t "~1Tindex-tag: #<dma-packet @ #x~X>~%" (-> this index-tag))
(format #t "~1Tindices[224] @ #x~X~%" (-> this indices))
(format #t "~1Tend-tag: #<dma-packet @ #x~X>~%" (-> this end-tag))
(label cfg-4)
this
)
;; definition of type generic-tie-run-control
(deftype generic-tie-run-control (structure)
((skip-bp2 uint8)
(skip-ips uint8)
(gifbuf-skip uint8)
(strips uint8)
(target-bp1 uint8)
(target-bp2 uint8)
(target-ip1 uint8)
(target-ip2 uint8)
(target-bps uint8)
(target-ips uint8)
(is-generic uint8)
(reserved uint8)
)
)
;; definition for method 3 of type generic-tie-run-control
(defmethod inspect ((this generic-tie-run-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-run-control)
(format #t "~1Tskip-bp2: ~D~%" (-> this skip-bp2))
(format #t "~1Tskip-ips: ~D~%" (-> this skip-ips))
(format #t "~1Tgifbuf-skip: ~D~%" (-> this gifbuf-skip))
(format #t "~1Tstrips: ~D~%" (-> this strips))
(format #t "~1Ttarget-bp1: ~D~%" (-> this target-bp1))
(format #t "~1Ttarget-bp2: ~D~%" (-> this target-bp2))
(format #t "~1Ttarget-ip1: ~D~%" (-> this target-ip1))
(format #t "~1Ttarget-ip2: ~D~%" (-> this target-ip2))
(format #t "~1Ttarget-bps: ~D~%" (-> this target-bps))
(format #t "~1Ttarget-ips: ~D~%" (-> this target-ips))
(format #t "~1Tis-generic: ~D~%" (-> this is-generic))
(format #t "~1Treserved: ~D~%" (-> this reserved))
(label cfg-4)
this
)
;; definition of type generic-tie-base-point
(deftype generic-tie-base-point (structure)
((data uint16 8)
(quad uint128 :overlay-at (-> data 0))
(x int16 :overlay-at (-> data 0))
(y int16 :overlay-at (-> data 1))
(z int16 :overlay-at (-> data 2))
(d0 int16 :overlay-at (-> data 3))
(vtx uint64 :overlay-at (-> data 0))
(u int16 :overlay-at (-> data 4))
(v int16 :overlay-at (-> data 5))
(tex uint32 :overlay-at (-> data 4))
(w int16 :overlay-at (-> data 6))
(d1 int16 :overlay-at (-> data 7))
)
)
;; definition for method 3 of type generic-tie-base-point
;; INFO: Used lq/sq
(defmethod inspect ((this generic-tie-base-point))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-base-point)
(format #t "~1Tdata[8] @ #x~X~%" (-> this data))
(format #t "~1Tquad: ~D~%" (-> this quad))
(format #t "~1Tx: ~D~%" (-> this x))
(format #t "~1Ty: ~D~%" (-> this y))
(format #t "~1Tz: ~D~%" (-> this z))
(format #t "~1Td0: ~D~%" (-> this d0))
(format #t "~1Tvtx: ~D~%" (-> this vtx))
(format #t "~1Tu: ~D~%" (-> this u))
(format #t "~1Tv: ~D~%" (-> this v))
(format #t "~1Ttex: ~D~%" (-> this tex))
(format #t "~1Tw: ~D~%" (-> this w))
(format #t "~1Td1: ~D~%" (-> this d1))
(label cfg-4)
this
)
;; definition of type generic-tie-bps
(deftype generic-tie-bps (structure)
((bp generic-tie-base-point 4 :inline)
)
)
;; definition for method 3 of type generic-tie-bps
(defmethod inspect ((this generic-tie-bps))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-bps)
(format #t "~1Tbp[4] @ #x~X~%" (-> this bp))
(label cfg-4)
this
)
;; definition of type generic-tie-interp-point
(deftype generic-tie-interp-point (structure)
((data uint16 12)
(x int16 :overlay-at (-> data 0))
(y int16 :overlay-at (-> data 1))
(z int16 :overlay-at (-> data 2))
(d0 int16 :overlay-at (-> data 3))
(vtx0 uint64 :overlay-at (-> data 0))
(dx int16 :overlay-at (-> data 4))
(dy int16 :overlay-at (-> data 5))
(dz int16 :overlay-at (-> data 6))
(unused int16 :overlay-at (-> data 7))
(vtx1 uint64 :overlay-at (-> data 4))
(u int16 :overlay-at (-> data 8))
(v int16 :overlay-at (-> data 9))
(tex uint32 :overlay-at (-> data 8))
(w int16 :overlay-at (-> data 10))
(d1 int16 :overlay-at (-> data 11))
)
:pack-me
)
;; definition for method 3 of type generic-tie-interp-point
;; INFO: Used lq/sq
;; ERROR: failed type prop at 19: Could not figure out load: (set! a2 (l.q gp))
(defmethod inspect ((a0-0 generic-tie-interp-point))
(local-vars
(v0-0 object)
(v0-1 object)
(v0-2 none)
(v0-3 none)
(v0-4 none)
(v0-5 none)
(v0-6 none)
(v0-7 none)
(v0-8 none)
(v0-9 none)
(v0-10 none)
(v0-11 none)
(v0-12 none)
(v0-13 none)
(v0-14 none)
(v0-15 none)
(v0-16 none)
(v0-17 none)
(v0-18 generic-tie-interp-point)
(a0-1 symbol)
(a0-2 symbol)
(a0-3 symbol)
(a0-4 none)
(a0-5 none)
(a0-6 none)
(a0-7 none)
(a0-8 none)
(a0-9 none)
(a0-10 none)
(a0-11 none)
(a0-12 none)
(a0-13 none)
(a0-14 none)
(a0-15 none)
(a0-16 none)
(a0-17 none)
(a0-18 none)
(a1-0 string)
(a1-1 string)
(a1-2 string)
(a1-3 none)
(a1-4 none)
(a1-5 none)
(a1-6 none)
(a1-7 none)
(a1-8 none)
(a1-9 none)
(a1-10 none)
(a1-11 none)
(a1-12 none)
(a1-13 none)
(a1-14 none)
(a1-15 none)
(a1-16 none)
(a1-17 none)
(a2-0 generic-tie-interp-point)
(a2-1 (pointer uint16))
(a2-2 none)
(a2-3 none)
(a2-4 none)
(a2-5 none)
(a2-6 none)
(a2-7 none)
(a2-8 none)
(a2-9 none)
(a2-10 none)
(a2-11 none)
(a2-12 none)
(a2-13 none)
(a2-14 none)
(a2-15 none)
(a2-16 none)
(a2-17 none)
(a3-0 symbol)
(t9-0 (function _varargs_ object))
(t9-1 (function _varargs_ object))
(t9-2 (function _varargs_ object))
(t9-3 none)
(t9-4 none)
(t9-5 none)
(t9-6 none)
(t9-7 none)
(t9-8 none)
(t9-9 none)
(t9-10 none)
(t9-11 none)
(t9-12 none)
(t9-13 none)
(t9-14 none)
(t9-15 none)
(t9-16 none)
(t9-17 none)
)
(if (begin (not a0-0))
(begin (set! a0-0 a0-0) (goto cfg-4))
)
(set! t9-0 format)
(set! a0-1 #t)
(set! a1-0 L144)
(set! a2-0 a0-0)
(set! a3-0 'generic-tie-interp-point)
(call! a0-1 a1-0 a2-0 a3-0)
(set! t9-1 format)
(set! a0-2 #t)
(set! a1-1 L109)
(set! a2-1 (-> a0-0 data))
(call! a0-2 a1-1 a2-1)
(set! t9-2 format)
(set! a0-3 #t)
(set! a1-2 L121)
(set! a2-2 (the-as none (l.q a0-0)))
(call!)
(set! t9-3 (the-as none format))
(set! a0-4 (the-as none #t))
(set! a1-3 (the-as none L120))
(set! a2-3 (the-as none (-> a0-0 x)))
(call!)
(set! t9-4 (the-as none format))
(set! a0-5 (the-as none #t))
(set! a1-4 (the-as none L119))
(set! a2-4 (the-as none (-> a0-0 y)))
(call!)
(set! t9-5 (the-as none format))
(set! a0-6 (the-as none #t))
(set! a1-5 (the-as none L118))
(set! a2-5 (the-as none (-> a0-0 z)))
(call!)
(set! t9-6 (the-as none format))
(set! a0-7 (the-as none #t))
(set! a1-6 (the-as none L117))
(set! a2-6 (the-as none (-> a0-0 d0)))
(call!)
(set! t9-7 (the-as none format))
(set! a0-8 (the-as none #t))
(set! a1-7 (the-as none L108))
(set! a2-7 (the-as none (-> a0-0 vtx0)))
(call!)
(set! t9-8 (the-as none format))
(set! a0-9 (the-as none #t))
(set! a1-8 (the-as none L107))
(set! a2-8 (the-as none (-> a0-0 dx)))
(call!)
(set! t9-9 (the-as none format))
(set! a0-10 (the-as none #t))
(set! a1-9 (the-as none L106))
(set! a2-9 (the-as none (-> a0-0 dy)))
(call!)
(set! t9-10 (the-as none format))
(set! a0-11 (the-as none #t))
(set! a1-10 (the-as none L105))
(set! a2-10 (the-as none (-> a0-0 dz)))
(call!)
(set! t9-11 (the-as none format))
(set! a0-12 (the-as none #t))
(set! a1-11 (the-as none L104))
(set! a2-11 (the-as none (-> a0-0 unused)))
(call!)
(set! t9-12 (the-as none format))
(set! a0-13 (the-as none #t))
(set! a1-12 (the-as none L103))
(set! a2-12 (the-as none (-> a0-0 vtx1)))
(call!)
(set! t9-13 (the-as none format))
(set! a0-14 (the-as none #t))
(set! a1-13 (the-as none L115))
(set! a2-13 (the-as none (-> a0-0 u)))
(call!)
(set! t9-14 (the-as none format))
(set! a0-15 (the-as none #t))
(set! a1-14 (the-as none L114))
(set! a2-14 (the-as none (-> a0-0 v)))
(call!)
(set! t9-15 (the-as none format))
(set! a0-16 (the-as none #t))
(set! a1-15 (the-as none L113))
(set! a2-15 (the-as none (-> a0-0 tex)))
(call!)
(set! t9-16 (the-as none format))
(set! a0-17 (the-as none #t))
(set! a1-16 (the-as none L112))
(set! a2-16 (the-as none (-> a0-0 w)))
(call!)
(set! t9-17 (the-as none format))
(set! a0-18 (the-as none #t))
(set! a1-17 (the-as none L111))
(set! a2-17 (the-as none (-> a0-0 d1)))
(call!)
(label cfg-4)
(set! v0-18 a0-0)
(ret-value v0-18)
)
;; definition of type generic-tie-ips
(deftype generic-tie-ips (structure)
((ip generic-tie-interp-point 2 :inline)
)
)
;; definition for method 3 of type generic-tie-ips
(defmethod inspect ((this generic-tie-ips))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-ips)
(format #t "~1Tip[2] @ #x~X~%" (-> this ip))
(label cfg-4)
this
)
;; definition of type generic-tie-header
(deftype generic-tie-header (structure)
((effect uint8)
(interp-table-size uint8)
(num-bps uint8)
(num-ips uint8)
(tint-color uint32)
(index-table-offset uint16)
(kick-table-offset uint16)
(normal-table-offset uint16)
(interp-table-offset uint16)
(gsf-header gsf-header :inline)
)
)
;; definition for method 3 of type generic-tie-header
(defmethod inspect ((this generic-tie-header))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-header)
(format #t "~1Teffect: ~D~%" (-> this effect))
(format #t "~1Tinterp-table-size: ~D~%" (-> this interp-table-size))
(format #t "~1Tnum-bps: ~D~%" (-> this num-bps))
(format #t "~1Tnum-ips: ~D~%" (-> this num-ips))
(format #t "~1Ttint-color: ~D~%" (-> this tint-color))
(format #t "~1Tindex-table-offset: ~D~%" (-> this index-table-offset))
(format #t "~1Tkick-table-offset: ~D~%" (-> this kick-table-offset))
(format #t "~1Tnormal-table-offset: ~D~%" (-> this normal-table-offset))
(format #t "~1Tinterp-table-offset: ~D~%" (-> this interp-table-offset))
(format #t "~1Tgsf-header: #<gsf-header @ #x~X>~%" (-> this gsf-header))
(label cfg-4)
this
)
;; definition of type generic-tie-matrix
(deftype generic-tie-matrix (structure)
((matrix matrix :inline)
(morph vector :inline)
(fog qword :inline)
)
)
;; definition for method 3 of type generic-tie-matrix
(defmethod inspect ((this generic-tie-matrix))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-matrix)
(format #t "~1Tmatrix: #<matrix @ #x~X>~%" (-> this matrix))
(format #t "~1Tmorph: #<vector @ #x~X>~%" (-> this morph))
(format #t "~1Tfog: #<qword @ #x~X>~%" (-> this fog))
(label cfg-4)
this
)
;; definition of type generic-tie-normal
(deftype generic-tie-normal (structure)
((x int8)
(y int8)
(z int8)
(dummy int8)
)
)
;; definition for method 3 of type generic-tie-normal
(defmethod inspect ((this generic-tie-normal))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-normal)
(format #t "~1Tx: ~D~%" (-> this x))
(format #t "~1Ty: ~D~%" (-> this y))
(format #t "~1Tz: ~D~%" (-> this z))
(format #t "~1Tdummy: ~D~%" (-> this dummy))
(label cfg-4)
this
)
;; definition of type generic-tie-control
(deftype generic-tie-control (structure)
((ptr-palette uint32)
(ptr-shaders uint32)
(ptr-runctrl generic-tie-run-control)
(ptr-verts uint32)
(ptr-generic generic-tie-header)
(ptr-dps uint32)
(ptr-kicks uint32)
(ptr-normals uint32)
(ptr-interp uint32)
(ptr-mtxs generic-tie-matrix)
(ptr-cinds uint32)
(next-instance uint32)
(next-model uint32)
(next-is-model uint32)
(tie-type uint32)
)
)
;; definition for method 3 of type generic-tie-control
(defmethod inspect ((this generic-tie-control))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-control)
(format #t "~1Tptr-palette: #x~X~%" (-> this ptr-palette))
(format #t "~1Tptr-shaders: #x~X~%" (-> this ptr-shaders))
(format #t "~1Tptr-runctrl: #<generic-tie-run-control @ #x~X>~%" (-> this ptr-runctrl))
(format #t "~1Tptr-verts: #x~X~%" (-> this ptr-verts))
(format #t "~1Tptr-generic: #<generic-tie-header @ #x~X>~%" (-> this ptr-generic))
(format #t "~1Tptr-dps: #x~X~%" (-> this ptr-dps))
(format #t "~1Tptr-kicks: #x~X~%" (-> this ptr-kicks))
(format #t "~1Tptr-normals: #x~X~%" (-> this ptr-normals))
(format #t "~1Tptr-interp: #x~X~%" (-> this ptr-interp))
(format #t "~1Tptr-mtxs: #<generic-tie-matrix @ #x~X>~%" (-> this ptr-mtxs))
(format #t "~1Tptr-cinds: #x~X~%" (-> this ptr-cinds))
(format #t "~1Tnext-instance: #x~X~%" (-> this next-instance))
(format #t "~1Tnext-model: #x~X~%" (-> this next-model))
(format #t "~1Tnext-is-model: ~D~%" (-> this next-is-model))
(format #t "~1Ttie-type: ~D~%" (-> this tie-type))
(label cfg-4)
this
)
;; definition of type generic-tie-stats
(deftype generic-tie-stats (structure)
((num-bps uint32)
(num-ips uint32)
(num-dps uint32)
(num-shaders uint32)
(num-models uint32)
(num-instances uint32)
(num-waits uint32)
(num-qwc uint32)
(max-qwc uint32)
)
)
;; definition for method 3 of type generic-tie-stats
(defmethod inspect ((this generic-tie-stats))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-stats)
(format #t "~1Tnum-bps: ~D~%" (-> this num-bps))
(format #t "~1Tnum-ips: ~D~%" (-> this num-ips))
(format #t "~1Tnum-dps: ~D~%" (-> this num-dps))
(format #t "~1Tnum-shaders: ~D~%" (-> this num-shaders))
(format #t "~1Tnum-models: ~D~%" (-> this num-models))
(format #t "~1Tnum-instances: ~D~%" (-> this num-instances))
(format #t "~1Tnum-waits: ~D~%" (-> this num-waits))
(format #t "~1Tnum-qwc: ~D~%" (-> this num-qwc))
(format #t "~1Tmax-qwc: ~D~%" (-> this max-qwc))
(label cfg-4)
this
)
;; definition of type generic-tie-calls
(deftype generic-tie-calls (structure)
((generic-prepare-dma-double basic)
(generic-envmap-dproc basic)
(generic-interp-dproc basic)
(generic-no-light-dproc basic)
)
:pack-me
)
;; definition for method 3 of type generic-tie-calls
(defmethod inspect ((this generic-tie-calls))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-calls)
(format #t "~1Tgeneric-prepare-dma-double: ~A~%" (-> this generic-prepare-dma-double))
(format #t "~1Tgeneric-envmap-dproc: ~A~%" (-> this generic-envmap-dproc))
(format #t "~1Tgeneric-interp-dproc: ~A~%" (-> this generic-interp-dproc))
(format #t "~1Tgeneric-no-light-dproc: ~A~%" (-> this generic-no-light-dproc))
(label cfg-4)
this
)
;; definition of type generic-tie-shadow
(deftype generic-tie-shadow (structure)
((out-buf gsf-buffer)
(cur-buf uint32)
(tie-type int32)
(ptr-inst uint32)
(ptr-buf uint32)
(inst-xor int32)
(end-of-chain uint32)
(write-limit uint32)
(calls generic-tie-calls :inline)
)
:pack-me
)
;; definition for method 3 of type generic-tie-shadow
(defmethod inspect ((this generic-tie-shadow))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-shadow)
(format #t "~1Tout-buf: #<gsf-buffer @ #x~X>~%" (-> this out-buf))
(format #t "~1Tcur-buf: #x~X~%" (-> this cur-buf))
(format #t "~1Ttie-type: ~D~%" (-> this tie-type))
(format #t "~1Tptr-inst: #x~X~%" (-> this ptr-inst))
(format #t "~1Tptr-buf: #x~X~%" (-> this ptr-buf))
(format #t "~1Tinst-xor: ~D~%" (-> this inst-xor))
(format #t "~1Tend-of-chain: ~D~%" (-> this end-of-chain))
(format #t "~1Twrite-limit: ~D~%" (-> this write-limit))
(format #t "~1Tcalls: #<generic-tie-calls @ #x~X>~%" (-> this calls))
(label cfg-4)
this
)
;; definition of type generic-tie-work
(deftype generic-tie-work (structure)
((control generic-tie-control :inline)
(interp-job generic-interp-job :inline)
(shadow generic-tie-shadow :inline)
(input-a generic-tie-input :inline)
(input-b generic-tie-input :inline)
(inst-buf generic-tie-instance :inline)
(palette-buf rgba 128)
)
)
;; definition for method 3 of type generic-tie-work
(defmethod inspect ((this generic-tie-work))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'generic-tie-work)
(format #t "~1Tcontrol: #<generic-tie-control @ #x~X>~%" (-> this control))
(format #t "~1Tinterp-job: #<generic-interp-job @ #x~X>~%" (-> this interp-job))
(format #t "~1Tshadow: #<generic-tie-shadow @ #x~X>~%" (-> this shadow))
(format #t "~1Tinput-a: #<generic-tie-input @ #x~X>~%" (-> this input-a))
(format #t "~1Tinput-b: #<generic-tie-input @ #x~X>~%" (-> this input-b))
(format #t "~1Tinst-buf: #<generic-tie-instance @ #x~X>~%" (-> this inst-buf))
(format #t "~1Tpalette-buf[128] @ #x~X~%" (-> this palette-buf))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+266
View File
@@ -0,0 +1,266 @@
;;-*-Lisp-*-
(in-package goal)
;; definition of type region
(deftype region (structure)
"A region is a closed volume that you can, enter, exit, and be inside.
This stores a unique, and script functions for a single region.
These are stored separately from the actual geometry to allow the geometry to be smaller
and fit in scratchpad/cache better."
((id uint32)
(on-enter pair)
(on-inside pair)
(on-exit pair)
)
(:methods
(point-in-region-debug! (_type_ vector) symbol)
)
)
;; definition for method 3 of type region
(defmethod inspect ((this region))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'region)
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Ton-enter: ~A~%" (-> this on-enter))
(format #t "~1Ton-inside: ~A~%" (-> this on-inside))
(format #t "~1Ton-exit: ~A~%" (-> this on-exit))
(label cfg-4)
this
)
;; definition of type region-array
(deftype region-array (inline-array-class)
"Array of region."
((data region :inline :dynamic)
)
)
;; definition for method 3 of type region-array
(defmethod inspect ((this region-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> region-array heap-base) (the-as uint 16))
;; definition of type drawable-region-prim
(deftype drawable-region-prim (drawable)
"Base class for a region + geometry.
Note that all child classes of this must be 32-bytes."
((region region :offset 8)
)
(:methods
(debug-draw-region (_type_ int) none)
(track-region (_type_ region-prim-area) symbol)
(within-area? (_type_ region-prim-area) symbol)
)
)
;; definition for method 3 of type drawable-region-prim
(defmethod inspect ((this drawable-region-prim))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tregion: #<region @ #x~X>~%" (-> this region))
(label cfg-4)
this
)
;; definition of type drawable-tree-region-prim
(deftype drawable-tree-region-prim (drawable-tree)
"Top-level container for all regions of a level."
((name basic :offset 8)
(data2 drawable-inline-array :dynamic :offset 32)
)
(:methods
(drawable-tree-region-prim-method-17 (_type_ vector) symbol)
(debug-print (_type_ vector object) none)
)
)
;; definition for method 3 of type drawable-tree-region-prim
(defmethod inspect ((this drawable-tree-region-prim))
(when (not this)
(set! this this)
(goto cfg-7)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data2))
(dotimes (s5-0 (-> this length))
(format #t "~T [~D]~1Tdata: ~A~%" s5-0 (-> this data2 s5-0))
)
(format #t "~1Tname: ~A~%" (-> this name))
(label cfg-7)
this
)
;; definition of type drawable-inline-array-region-prim
(deftype drawable-inline-array-region-prim (drawable-inline-array)
"Inline array of drawable-region-prim. This actually stores child classes, but they are
exactly the same size as the parent, so it's okay."
((data drawable-region-prim 1 :inline)
(pad uint8 4)
)
)
;; definition of type drawable-region-sphere
(deftype drawable-region-sphere (drawable-region-prim)
"Region where the bsphere of the drawable is the volume."
()
)
;; definition for method 3 of type drawable-region-sphere
(defmethod inspect ((this drawable-region-sphere))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tregion: #<region @ #x~X>~%" (-> this region))
(label cfg-4)
this
)
;; definition of type region-face-data
(deftype region-face-data (structure)
"Data to store a single planar face, as a normal and list of vertices."
((normal vector :inline)
(normal-offset float :overlay-at (-> normal data 3))
(num-points uint32)
(points vector :inline :dynamic)
)
)
;; definition for method 3 of type region-face-data
(defmethod inspect ((this region-face-data))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'region-face-data)
(format #t "~1Tnormal: #<vector @ #x~X>~%" (-> this normal))
(format #t "~1Tnormal-offset: ~f~%" (-> this normal w))
(format #t "~1Tnum-points: ~D~%" (-> this num-points))
(format #t "~1Tpoints[0] @ #x~X~%" (-> this points))
(label cfg-4)
this
)
;; definition of type drawable-region-face
(deftype drawable-region-face (drawable-region-prim)
"A drawable-region which is just a face. Unclear if `on-inside` is used."
((data region-face-data :offset 12)
)
)
;; definition for method 3 of type drawable-region-face
(defmethod inspect ((this drawable-region-face))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tregion: #<region @ #x~X>~%" (-> this region))
(format #t "~1Tdata: #<region-face-data @ #x~X>~%" (-> this data))
(label cfg-4)
this
)
;; definition of type region-face-array
(deftype region-face-array (inline-array-class)
"An array of faces that hopefully make a closed volume."
((data drawable-region-face :inline :dynamic :offset 16)
(pad uint32)
)
)
;; definition for method 3 of type region-face-array
(defmethod inspect ((this region-face-array))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tlength: ~D~%" (-> this length))
(format #t "~1Tallocated-length: ~D~%" (-> this allocated-length))
(format #t "~1Tdata[0] @ #x~X~%" (-> this data))
(label cfg-4)
this
)
;; failed to figure out what this is:
(set! (-> region-face-array heap-base) (the-as uint 32))
;; definition of type drawable-region-volume
(deftype drawable-region-volume (drawable-region-prim)
"A drawable-region which is a bunch of faces that represent a closed volume."
((faces region-face-array :offset 12)
)
)
;; definition for method 3 of type drawable-region-volume
(defmethod inspect ((this drawable-region-volume))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this (-> this type))
(format #t "~1Tid: ~D~%" (-> this id))
(format #t "~1Tbsphere: ~`vector`P~%" (-> this bsphere))
(format #t "~1Tregion: #<region @ #x~X>~%" (-> this region))
(format #t "~1Tfaces: ~A~%" (-> this faces))
(label cfg-4)
this
)
;; definition of type region-prim-list
(deftype region-prim-list (structure)
"A list of drawable-region-prim. This is the return type of queries like `which regions contain this point?`"
((num-items int32)
(items drawable-region-prim 320)
)
)
;; definition for method 3 of type region-prim-list
(defmethod inspect ((this region-prim-list))
(when (not this)
(set! this this)
(goto cfg-4)
)
(format #t "[~8x] ~A~%" this 'region-prim-list)
(format #t "~1Tnum-items: ~D~%" (-> this num-items))
(format #t "~1Titems[320] @ #x~X~%" (-> this items))
(label cfg-4)
this
)
;; failed to figure out what this is:
0
+2 -1
View File
@@ -55,7 +55,8 @@
// sky (multiple definition)
"(method 3 sky-vertex)",
// texture
"(method 9 texture-page-dir)", "set-dirty-mask!"
"(method 9 texture-page-dir)", "set-dirty-mask!",
"(method 3 generic-tie-interp-point)"
],
"skip_compile_states": {}