Skip to main content

depth-cue-h

source

Types


depth-cue-data

depth-cue-data: structuresource
Fields
data: vector
sharpness: float
alpha: float
distance: float
w: float

depth-cue-work

depth-cue-work: structuresource
Fields
texture-strip-tmpl: dma-gif-packet
temp-strip-tmpl: dma-gif-packet
stencil-tmpl: dma-gif-packet
clear-color: vector4w
set-color: vector4w
draw-color: vector4w
depth: depth-cue-data
front: depth-cue-data

depth-cue

source

Functions


depth-cue

depth-cue(disp: display) => pointersource

depth-cue-calc-z

depth-cue-calc-z(arg0: float) => floatsource

depth-cue-draw-depth

depth-cue-draw-depth(arg0: dma-buffer, arg1: int, arg2: float, arg3: float, arg4: int, arg5: int) => symbolsource

depth-cue-draw-front

depth-cue-draw-front(dma-buff: dma-buffer, depth: int, sharpness: float, alpha: float, on-screen-fbp: uint, oddeven: int) => symbolsource

depth-cue-set-stencil

depth-cue-set-stencil(arg0: dma-buffer, arg1: int, arg2: int, arg3: int, arg4: dma-gif-packet) => vector4wsource

Variables


*depth-cue-work*

*depth-cue-work*: depth-cue-worksource

font-h

source

Types


char-color

char-color: structuresource
Fields
color: rgba

char-verts

char-verts: structuresource
Fields
pos: vector
color: vector
tex-st: vector

font-context

font-context: basicsource
Fields
type: type
origin: vector
strip-gif: vector
width: float
height: float
projection: float
context-vec: vector
color: font-color
color-s32: int32
flags: font-flags
flags-signed: int32
mat: matrix
start-line: uint32
scale: float
Methods
set-mat!(obj: font-context, mat: matrix) => font-contextsource
set-origin!(obj: font-context, x: int, y: int) => font-contextsource
set-depth!(obj: font-context, z: int) => font-contextsource
set-w!(obj: font-context, w: float) => font-contextsource
set-width!(obj: font-context, width: int) => font-contextsource
set-height!(obj: font-context, height: int) => font-contextsource
set-projection!(obj: font-context, proj: float) => font-contextsource
set-color!(obj: font-context, color: font-color) => font-contextsource
set-flags!(obj: font-context, flags: font-flags) => font-contextsource
set-start-line!(obj: font-context, start-line: uint) => font-contextsource
set-scale!(obj: font-context, scale: float) => font-contextsource

font-work

font-work: structuresource
Fields
font-tmpl: dma-gif-packet
char-tmpl: dma-gif-packet
tex1-tmpl: uint64
small-font-lo-tmpl: uint64
small-font-lo-tmpl-qw: uint128
small-font-hi-tmpl: uint64
small-font-hi-tmpl-qw: uint128
large-font-lo-tmpl: uint64
large-font-lo-tmpl-qw: uint128
large-font-hi-tmpl: uint64
large-font-hi-tmpl-qw: uint128
size1-small: vector
size2-small: vector
size3-small: vector
size1-large: vector
size2-large: vector
size3-large: vector
size-st1: vector
size-st2: vector
size-st3: vector
save: vector
save-color: vector
current-verts: char-verts
src-verts: char-verts
dest-verts: char-verts
justify: vector
color-shadow: vector4w
color-table: char-color
last-color: font-color
last-color-32: int32
save-last-color: font-color
save-last-color-32: int32
buf: basic
str-ptr: uint32
str-ptr-signed: pointer
flags: font-flags
flags-signed: int32
reg-save: uint32

Functions


font-set-tex0

font-set-tex0(ptr-tex0: pointer, tex: texture, tex-addr: uint, psm: uint, clut-addr: uint) => nonesource
Write the TEX0 parameters for a font

Variables


*font-default-matrix*

*font-default-matrix*: matrixsource

*font-work*

*font-work*: font-worksource

Functions


draw-string

draw-string(str-in: string, context: dma-buffer, arg2: font-context) => floatsource
Draw a string. Writes dma to the given buffer.

draw-string-adv

draw-string-adv(str: string, buf: dma-buffer, ctxt: font-context) => nonesource
Draw a string and advance the position of the context.

draw-string-xy

draw-string-xy(str: string, buf: dma-buffer, x: int, y: int, color: font-color, flags: font-flags) => floatsource
Draw a string at the given xy location.

draw-string-xy-scaled

draw-string-xy-scaled(str: string, buf: dma-buffer, x: int, y: int, color: font-color, flags: font-flags, scale: float) => nonesource
Draw a string at the given xy location, with the given scale.

get-string-length

get-string-length(arg0: string, arg1: font-context) => floatsource

Variables


*font12-table*

*font12-table*: inline-arraysource

*font24-table*

*font24-table*: inline-arraysource

draw-string

draw-string: functionsource

lights-h

source

Types


light

light: structuresource
Fields
direction: vector
color: rgbaf
levels: vector
level: float
sort-level: float

light-array

light-array: arraysource
Fields
type: type
length: int32
allocated-length: int32
content-type: type
data: uint8

light-ellipse

light-ellipse: structuresource
Fields
matrix: matrix
color: rgbaf
name: basic
decay-start: float
ambient-point-ratio: float
level: float
func-symbol: basic
func: basic

light-group

light-group: structuresource
Fields
dir0: light
dir1: light
dir2: light
ambi: light
lights: light

light-volume

light-volume: basicsource
Fields
type: type
light-array: light-array

light-volume-array

light-volume-array: arraysource
Fields
type: type
length: int32
allocated-length: int32
content-type: type
data: uint8

light-volume-planes

light-volume-planes: light-volumesource
Fields
type: type
light-array: light-array
planes: vertical-planes

light-volume-sphere

light-volume-sphere: light-volumesource
Fields
type: type
light-array: light-array
bsphere: sphere

vu-lights

vu-lights: structuresource
Fields
direction: vector
color: vector
ambient: vector

lights

source

Functions


light-group-process!

light-group-process!(arg0: vu-lights, arg1: light-group, arg2: vector, arg3: vector) => nonesource
unused.

light-group-slerp

light-group-slerp(out: light-group, a: light-group, b: light-group, alpha: float) => light-groupsource
Linearly interpolate between each of the 4 vectors of two light-groups.
Alpha is clamped between 0 - 1.

light-slerp

light-slerp(out: light, a: light, b: light, alpha: float) => lightsource
Linearly interpolate between two light's vectors. Alpha is clamped between 0 - 1.

vu-lights-default!

vu-lights-default!(lights: vu-lights) => vu-lightssource
Initialize a lights object with default values

Variables


*default-lights*

*default-lights*: vu-lightssource

math-camera-h

source

Types


cull-info

cull-info: structuresource
Fields
x-fact: float
y-fact: float
z-fact: float
cam-radius: float
cam-x: float
cam-y: float
xz-dir-ax: float
xz-dir-az: float
xz-dir-bx: float
xz-dir-bz: float
xz-cross-ab: float
yz-dir-ay: float
yz-dir-az: float
yz-dir-by: float
yz-dir-bz: float
yz-cross-ab: float

math-camera

math-camera: basicsource
Fields
type: type
d: meters
f: meters
fov: degrees
x-ratio: float
y-ratio: float
x-pix: float
x-clip: float
x-clip-ratio-in: float
x-clip-ratio-over: float
y-pix: float
y-clip: float
y-clip-ratio-in: float
y-clip-ratio-over: float
cull-info: cull-info
fog-start: meters
fog-end: meters
fog-max: float
fog-min: float
reset: int32
smooth-step: float
smooth-t: float
perspective: matrix
isometric: matrix
sprite-2d: matrix
sprite-2d-hvdf: vector
camera-rot: matrix
inv-camera-rot: matrix
inv-camera-rot-smooth: matrix
inv-camera-rot-smooth-from: quaternion
camera-temp: matrix
prev-camera-temp: matrix
hmge-scale: vector
inv-hmge-scale: vector
hvdf-off: vector
guard: vector
vis-gifs: vis-gif-tag
vis-gifs-quads: uint128
giftex: vis-gif-tag
gifgr: vis-gif-tag
giftex-trans: vis-gif-tag
gifgr-trans: vis-gif-tag
pfog0: float
pfog1: float
trans: vector
plane: plane
guard-plane: plane
shrub-mat: matrix
fov-correction-factor: float

vis-gif-tag

vis-gif-tag: structuresource
Fields
fog0: uint32
strip: uint32
regs: uint32
fan: uint32

math-camera

source

Types


fog-corrector

fog-corrector: structuresource
Fields
fog-end: float
fog-start: float

Functions


fog-corrector-setup

fog-corrector-setup(corrector: fog-corrector, math-cam: math-camera) => nonesource
Set the fog corrector based on the supplied math-camera

init-for-transform

init-for-transform(arg0: matrix) => nonesource
Sets up VU0 registers with camera info.
This is probably a very old function and it's only used by jungle mirrors.
It stashes some data in vector float registers that must be there before calling transform-float-point.

math-cam-start-smoothing

math-cam-start-smoothing(arg0: float, arg1: float) => quaternionsource
Unused camera smoothing

move-target-from-pad

move-target-from-pad(trans: transform, pad-idx: int) => transformsource
Unused function to adjust trans based on inputs from the pad.
This function must be extremely old because it takes a non-quaternion transform,
and all target stuff uses quaternions.

transform-point-qword!

transform-point-qword!(arg0: vector4w, arg1: vector) => symbolsource
Apply camera transformation to point, returning fixed point 28.4 position
that can be given to the GS directly.

transform-point-vector!

transform-point-vector!(arg0: vector, arg1: vector) => symbolsource
Apply camera transformation to a point. Return true if it is visible or not.
This returns the point in GS coords, but as float instead of int, so it's
not really useful. See transform-point-qword! for more details

transform-point-vector-scale!

transform-point-vector-scale!(arg0: vector, arg1: vector) => floatsource
Similar to transform-point-qword! but returns the scale factor instead.

update-math-camera

update-math-camera(math-cam: math-camera, video-mode: symbol, aspect: symbol) => math-camerasource
Compute some one-time camera constants. These should only change when changing aspect ratio.

Variables


*math-camera-fog-correction*

*math-camera-fog-correction*: fog-correctorsource

*math-camera*

*math-camera*: math-camerasource

vu1-user-h

source

Types


dma-foreground-sink

dma-foreground-sink: basicsource
Fields
type: type
bucket: bucket-id
foreground-texture-page: int8
foreground-texture-level: int8
foreground-output-bucket: int8

dma-foreground-sink-group

dma-foreground-sink-group: basicsource
Fields
type: type
sink: dma-foreground-sink
merc-sink: dma-foreground-sink
generic-sink: generic-dma-foreground-sink
level: level

generic-bucket-state

generic-bucket-state: structuresource
Fields
gifbuf-adr: uint32
inbuf-adr: uint32

generic-dma-foreground-sink

generic-dma-foreground-sink: dma-foreground-sinksource
Fields
type: type
bucket: bucket-id
foreground-texture-page: int8
foreground-texture-level: int8
foreground-output-bucket: int8
state: generic-bucket-state

Variables


*vu1-enable-user-menu*

*vu1-enable-user-menu*: vu1-renderer-masksource

*vu1-enable-user*

*vu1-enable-user*: vu1-renderer-masksource