Types
anim-tester: process-drawablesource
Fields
type: type
name: string
mask: process-mask
clock: clock
parent: pointer
brother: pointer
child: pointer
ppointer: pointer
self: process-tree
pool: dead-pool
status: symbol
pid: int32
main-thread: cpu-thread
top-thread: cpu-thread
entity: entity-actor
level: level
state: state
next-state: state
trans-hook: function
post-hook: function
event-hook: function
allocated-length: int32
pad-unknown-0: uint32
heap-base: pointer
heap-top: pointer
heap-cur: pointer
stack-frame-top: stack-frame
connection-list: connectable
stack: uint8
root: trsqv
node-list: cspace-array
draw: draw-control
skel: joint-control
nav: nav-control
align: align-control
path: path-control
vol: vol-control
fact: fact-info
link: actor-link-info
part: sparticle-launch-control
water: water-control
sound: ambient-sound
carry: carry-info
rbody: rigid-body-control
state-flags: state-flags
state-time: time-frame
flags: anim-tester-flags
debug-flags: anim-tester-debug-flags
obj-list: glst-list
current-obj: string
speed: int32
list-con: list-control
pick-con: list-control
item-field: int64
inc-delay: int32
inc-timer: int32
edit-mode: int32
old-mode: int32
anim-speed: float
anim-gspeed: float
anim-first: float
anim-last: float
States
anim-tester-process: TODO
list-control: structuresource
Fields
listfunc: function
list-owner: uint32
top: int32
left: int32
list: glst-list
the-node: glst-node
top-index: int32
the-index: int32
the-disp-line: int32
highlight-index: int32
current-index: int32
numlines: int32
lines-to-disp: int32
charswide: int32
highlight-disp-line: int32
field-id: int32
xpos: int32
ypos: int32
user-info: int32
user-info-u: uint32
return-int: int32
Types
debug-vertex-stats: basicsource
Variables
Types
hud-money: hudsource
Fields
type: type
name: string
mask: process-mask
clock: clock
parent: pointer
brother: pointer
child: pointer
ppointer: pointer
self: process-tree
pool: dead-pool
status: symbol
pid: int32
main-thread: cpu-thread
top-thread: cpu-thread
entity: entity-actor
level: level
state: state
next-state: state
trans-hook: function
post-hook: function
event-hook: function
allocated-length: int32
pad-unknown-0: uint32
heap-base: pointer
heap-top: pointer
heap-cur: pointer
stack-frame-top: stack-frame
connection-list: connectable
stack: uint8
trigger-time: time-frame
last-hide-time: time-frame
offset: float
flags: hud-flags
values: hud-value
strings: hud-string
sprites: hud-sprite
icons: hud-icon
gui-id: sound-id
Expand description
Functions for drawing wireframe spheres made up of debug lines.
Do not call these functions unless debug-segment is set.
Functions
add-debug-sphere-from-table(bucket: bucket-id, position: vector, radius: meters, color: rgba, table-idx: int) => nonesource
Adds a debug sphere to a bucket.
The table-idx specifies the resolution of the sphere and must be >= 0 and <= 9, where 9 would specify
the highest resolution available and 0 would draw nothing.
make-debug-sphere-table(points: vector-array, h-lines: float, v-lines: float) => vector-arraysource
Fills points with positions that make a wireframe sphere made of the given number of horizontal and vertical lines.
The points array is expected to have a capacity of at least (h-lines * v-lines * 3).
Both h-lines and v-lines should be whole numbers.
Variables
*debug-sphere-table*: arraysource
Expand description
This file contains functions for debug drawing.
In general, the 3d functions draw using the camera and the 2d functions draw in screen coordinates.
Most functions take a boolean as their first argument. If the boolean is set to #f, it will skip drawing the point.
Types
debug-line: structuresource
debug-text-3d: structuresource
Functions
add-boundary-shader(tex-id: texture-id, buf: dma-buffer) => nonesource
Generate adgif shader data (including GIF tag, but not VIF/DMA) for the given
texture, and write to the given dma-buffer.
add-debug-arc(enable: symbol, bucket: bucket-id, position: vector, start-angle: float, end-angle: float, radius: float, color: rgba, orientation: matrix) => symbolsource
add-debug-bound(buf: bucket-id, pts: inline-array, c0: int, c1: rgba, flash: rgba, arg5: int) => nonesource
Draw a debug boundary polygon.
add-debug-bound-internal(buf: dma-buffer, pts: inline-array, num-pts: int, color0: rgba, color1: rgba, flip-tex: int) => nonesource
Draw a boundary polygon using the boundary renderer. This renderer reuses components of the sky render
to properly clip (and subdivide) very large polgons.
This is intended to be called by add-debug-bound, after it has set up dma buffers for the boundary rendering.
add-debug-box(enable: symbol, bucket: bucket-id, c1: vector, c2: vector, color: rgba) => symbolsource
add-debug-box-with-transform(enable: symbol, bucket: bucket-id, box: bounding-box, trans: matrix, color: rgba) => symbolsource
add-debug-circle(enable: symbol, bucket: bucket-id, position: vector, radius: float, color: rgba, orientation: matrix) => symbolsource
add-debug-cross(enable: symbol, bucket: bucket-id, position: vector, radius: float) => symbolsource
add-debug-cspace(enable: symbol, bucket: bucket-id, csp: cspace) => cspacesource
add-debug-cursor(enable: symbol, bucket: bucket-id, x: int, y: int, arg4: int) => nonesource
add-debug-curve(enable: symbol, bucket: bucket-id, cverts: inline-array, num-cverts: int, knots: pointer, num-knots: int, color: rgba) => symbolsource
add-debug-curve2(enable: symbol, bucket: bucket-id, curve: curve, color: rgba, arg4: symbol) => symbolsource
add-debug-flat-triangle(enable: symbol, bucket: bucket-id, p0: vector, p1: vector, p2: vector, color: rgba) => symbolsource
add-debug-light(enable: symbol, bucket: bucket-id, light: light, position: vector, text: string) => symbolsource
add-debug-lights(enable: symbol, bucket: bucket-id, lights: inline-array, position: vector) => symbolsource
add-debug-line(enable: symbol, bucket: bucket-id, start: vector, end: vector, start-color: rgba, mode: symbol, end-color: rgba) => symbolsource
add-debug-line-sphere(enable: symbol, bucket: bucket-id, position: vector, forward: vector, arg4: float, color: rgba) => nonesource
add-debug-line2d(enable: symbol, bucket: bucket-id, start: vector4w, end: vector4w, color: vector4w) => symbolsource
add-debug-matrix(enable: symbol, bucket: bucket-id, mat: matrix, line-length: meters) => matrixsource
add-debug-outline-triangle(enable: symbol, bucket: bucket-id, p0: vector, p1: vector, p2: vector, color: rgba) => symbolsource
add-debug-point(enable-draw: symbol, bucket: bucket-id, pt: vector) => symbolsource
add-debug-points(enable: symbol, bucket: bucket-id, points: inline-array, num-points: int, color: rgba, y-override: float, highlight: int) => symbolsource
add-debug-quaternion(enable: symbol, bucket: bucket-id, position: vector, quat: quaternion) => nonesource
add-debug-rot-matrix(enable: symbol, bucket: bucket-id, mat: matrix, position: vector) => matrixsource
add-debug-sphere(enable: symbol, bucket: bucket-id, position: vector, radius: meters, color: rgba) => symbolsource
add-debug-sphere-with-transform(enable: symbol, bucket: bucket-id, position: vector, radius: meters, trans: matrix, color: rgba) => symbolsource
add-debug-spheres(enable: symbol, bucket: bucket-id, origins: inline-array, count: int, color: rgba) => symbolsource
add-debug-text-3d(enable: symbol, bucket: bucket-id, text: string, position: vector, color: font-color, screen-offset: vector2h) => symbolsource
add-debug-text-sphere(enable: symbol, bucket: bucket-id, position: vector, radius: meters, text: string, color: rgba) => symbolsource
add-debug-triangle-normal(enable: symbol, bucket: bucket-id, p0: vector, p1: vector, p2: vector, color: rgba) => symbolsource
add-debug-vector(enable: symbol, bucket: bucket-id, position: vector, direction: vector, length: meters, color: rgba) => symbolsource
add-debug-x(enable: symbol, bucket: bucket-id, position: vector, color: rgba) => symbolsource
add-debug-yrot-vector(enable: symbol, bucket: bucket-id, position: vector, angle: float, line-length: float, color: rgba) => symbolsource
debug-draw-buffers() => symbolsource
debug-pad-display(pad: cpad-info) => symbolsource
debug-percent-bar(enable: symbol, bucket: bucket-id, x: int, y: int, percentage: float, color: rgba, width: int, height: int) => symbolsource
debug-reset-buffers() => symbolsource
display-file-info() => intsource
drawable-frag-count(drbl: drawable) => intsource
history-draw-and-update(history: pos-history, draw: symbol, pos: vector) => symbolsource
history-init(history: pos-history, num-points: int) => pos-historysource
internal-draw-debug-line(bucket: bucket-id, start: vector, end: vector, start-color: rgba, mode: symbol, end-color: rgba) => pointersource
internal-draw-debug-text-3d(bucket: bucket-id, text: string, position: vector, color: font-color, screen-offset: vector2h) => pointersource
transform-float-point(in: vector, out: vector4w) => vector4wsource
Transform point in and store the result in out.
This uses the cached vf register transformation matrix
Note that the input/output order of the arguments is swapped from usual