Skip to main content

draw-node-h

source

Types


draw-node

draw-node: drawablesource
Fields
type: type
id: int16
bsphere: vector
child-count: uint8
flags: uint8
child: drawable
distance: float

draw-node-dma

draw-node-dma: structuresource
Fields
banka: draw-node
bankb: draw-node

drawable-inline-array-node

drawable-inline-array-node: drawable-inline-arraysource
Fields
type: type
id: int16
bsphere: vector
length: int16
data: draw-node
pad: uint32

drawable-actor-h

source

Types


drawable-actor

drawable-actor: drawablesource
Fields
type: type
id: int16
bsphere: vector
actor: entity-actor

drawable-inline-array-actor

drawable-inline-array-actor: drawable-inline-arraysource
Fields
type: type
id: int16
bsphere: vector
length: int16
data: drawable-actor
pad: uint8

drawable-tree-actor

drawable-tree-actor: drawable-treesource
Fields
type: type
id: int16
bsphere: vector
length: int16
data: drawable

drawable-group-h

source

Types


drawable-group

drawable-group: drawablesource
Fields
type: type
id: int16
bsphere: vector
length: int16
data: drawable

drawable-h

source

Types


drawable

drawable: basicsource
Fields
type: type
id: int16
bsphere: vector
Methods
login(obj: drawable-tree-collide-fragment) => _type_source
draw(obj: drawable-tree-collide-fragment, arg0: drawable-tree-collide-fragment, arg1: display-frame) => nonesource
fill-collide-list-from-box(obj: drawable, arg0: int, arg1: collide-list, arg2: collide-query) => intsource

Collect a list of collision meshes contained in the box.

fill-collide-list-from-line-sphere(obj: drawable, arg0: int, arg1: collide-list, arg2: collide-query) => intsource

Collect a list of collision meshes contained in 'line-sphere'.

collect-stats(obj: drawable-group) => nonesource
debug-draw(obj: drawable-group, arg0: drawable, arg1: display-frame) => nonesource
unpack-vis(obj: drawable-tree-collide-fragment, arg0: pointer, arg1: pointer) => pointersource
collect-regions(obj: draw-node, arg0: sphere, arg1: int, arg2: region-prim-list) => nonesource

drawable-error

drawable-error: drawablesource
Fields
type: type
id: int16
bsphere: vector
name: string

drawable-inline-array-h

source

Types


drawable-inline-array

drawable-inline-array: drawablesource
Fields
type: type
id: int16
bsphere: vector
length: int16

drawable-tree-h

source

Types


drawable-tree

drawable-tree: drawable-groupsource
Fields
type: type
id: int16
bsphere: vector
length: int16
data: drawable

drawable-tree-array

drawable-tree-array: drawable-groupsource
Fields
type: type
id: int16
bsphere: vector
length: int16
data: drawable
trees: drawable-tree

drawable

source

Functions


add-process-drawable

add-process-drawable(arg0: process-drawable, arg1: draw-control, arg2: symbol, arg3: dma-buffer) => nonesource

Call the dma-add-func callback on a draw-control to draw it.

default-end-buffer

default-end-buffer(arg0: bucket-id, arg1: gs-zbuf, arg2: gs-test) => nonesource

default-init-buffer

default-init-buffer(arg0: bucket-id, arg1: gs-zbuf, arg2: gs-test) => nonesource

determine-pause-mode

determine-pause-mode() => intsource

display-frame-finish

display-frame-finish(arg0: display) => displaysource

Do final DMA setup after drawing.
Note that this runs after rendering, while VU1/GS are not doing anything.
so it's best to keep this code as simple as possible.

display-frame-start

display-frame-start(arg0: display, arg1: int, arg2: float) => nonesource

Advance clocks, poll pads/mouse, set up buckets.

display-sync

display-sync(arg0: display) => nonesource

Determine frame timing, possibly vsync, and kick off next DMA.
This also calls sync-path, but this appears redundant because the display loop did this already.

dma-add-process-drawable

dma-add-process-drawable(pd: process-drawable, dc: draw-control, flag: symbol, dma-buf: dma-buffer) => nonesource

Draw a normal process-drawable. Set up lighting/shadow settings, then pass on to foreground renderer.

dma-add-process-drawable-hud

dma-add-process-drawable-hud(arg0: process-drawable, arg1: draw-control, arg2: float, arg3: dma-buffer) => nonesource

Generate DMA for a foreground-hud process-drawable.

draw-instance-info

draw-instance-info(arg0: string) => nonesource

error-sphere

error-sphere(arg0: drawable-error, arg1: string) => nonesource

Draw a sphere with an error message around this drawable-error.

find-instance-by-index

find-instance-by-index(arg0: type, arg1: int, arg2: bsp-header) => prototype-bucketsource

find-instance-by-name

find-instance-by-name(arg0: string) => prototype-bucketsource

Look in all levels for prototypes with the given name.
Will find both tie and shrub.
Despite the name, returns the prototype, not the instance (the instances aren't named).

find-instance-by-name-level

find-instance-by-name-level(arg0: string, arg1: level) => prototype-bucketsource

Look in the given level for prototypes with the given name.
Will find both tie and shrub.
Despite the name, returns the prototype, not the instance (the instances aren't named).

foreground-engine-execute

foreground-engine-execute(arg0: engine, arg1: display-frame) => nonesource

Run the foreground drawing engine.

foreground-execute-cpu-vu0-engines

foreground-execute-cpu-vu0-engines() => nonesource

Run the CPU/VU0 part of foreground. Happens after the foreground-engine-execute is done (first pass dma done).
Generates bone matrices for VU1 renderers and does leftover stuff that depends on bones.

foreground-initialize-engines

foreground-initialize-engines() => nonesource

Called before dispatching foreground engine to set up.

get-shadow-by-name

get-shadow-by-name(arg0: string) => nonesource

guard-band-cull

guard-band-cull(arg0: vector) => symbolsource

Is the given sphere within the guard band, and possibly needs clipping?

line-in-view-frustum?

line-in-view-frustum?(arg0: vector, arg1: vector) => symbolsource

Is the line segment at least partially in the view frustum?
Safe to use anywhere, uses planes in math-camera.

main-debug-hook

main-debug-hook() => nonesource

Execute the debug engine, collision renderer, and draw-instance-info.

main-draw-hook

main-draw-hook() => nonesource

pc-maybe-vsync

pc-maybe-vsync() => floatsource

PC Port implementation of the block of code in display-sync that computes frame-time-ratio and maybe vsyncs.

print-prototype-list() => nonesource

prototype-bucket-recalc-fields

prototype-bucket-recalc-fields(arg0: prototype-bucket) => prototype-bucketsource

prototype-bucket-type

prototype-bucket-type(arg0: prototype-bucket) => typesource

prototypes-game-visible-set!

prototypes-game-visible-set!(arg0: pair, arg1: symbol) => intsource

Set the visibility of the given prototypes, to hide stuff in levels that shouldn't appear.
Also disables collision.

real-main-draw-hook

real-main-draw-hook() => nonesource

Main function to run the drawable system, called from the display-loop in main.gc

screen-shot

screen-shot() => nonesource

screen-shot-scale

screen-shot-scale(arg0: int, arg1: string) => nonesource

set-shadow-by-name

set-shadow-by-name(arg0: string, arg1: int, arg2: int) => nonesource

sphere-cull

sphere-cull(arg0: vector) => symbolsource

Is the given sphere in the view frustum?
Uses the planes in vf16-vf19.

sphere-in-view-frustum?

sphere-in-view-frustum?(arg0: sphere) => symbolsource

Is the given sphere in the view frustum?
Safe to use anywhere, uses planes from math-camera.
Unlike sphere-cull, which assumes that the register are setup.

swap-display

swap-display(arg0: display) => nonesource

teleport-camera-by-name

teleport-camera-by-name(arg0: string) => nonesource

vis-cull

vis-cull(id: int) => symbolsource

Is this thing visible in the precomputed visiblity data? By draw-node id.
Assumes the scratchpad has the vis-list loaded.

vis-cull-debug

vis-cull-debug(a0-0: work-area, id: int) => symbolsource

Variables


*add-sphere*

*add-sphere*: symbolsource

*debug-hook*

*debug-hook*: pairsource

*draw-hook*

*draw-hook*: functionsource

*edit-instance*

*edit-instance*: stringsource

*generic-effect-mode*

*generic-effect-mode*: intsource

*hud-lights*

*hud-lights*: vu-lightssource

*instance-mem-usage*

*instance-mem-usage*: memory-usage-blocksource