Skip to main content

sprite-distort

source

Types


sprite-distorter-sine-tables

sprite-distorter-sine-tables: basicsource
Fields
type: type
aspx: float
aspy: float
entry: vector
ientry: qword
giftag: gs-gif-tag
color: qword

Functions


sprite-distorter-generate-tables

sprite-distorter-generate-tables() => nonesource

Regenerate sprite-distorter tables. This should be done whenever the aspect ratio changes

sprite-draw-distorters

sprite-draw-distorters(arg0: dma-buffer) => nonesource

Set up DMA for the sprite-distorter renderer

sprite-init-distorter

sprite-init-distorter(dma-buff: dma-buffer, frame-base-pointer: uint) => nonesource

Set up DMA for setting up the sprite-distorter renderer

Variables


*sprite-distorter-sine-tables*

*sprite-distorter-sine-tables*: sprite-distorter-sine-tablessource

sprite-distort-vu1-block

const sprite-distort-vu1-block: vu-functionsource

sprite-h

source

Types


sprite-array-2d

sprite-array-2d: basicsource
Fields
type: type
num-sprites: int32
num-valid: int32
vec-data: pointer
adgif-data: inline-array
pad: uint128
data: uint128

sprite-array-3d

sprite-array-3d: basicsource
Fields
type: type
num-sprites: int32
num-valid: int32
vec-data: pointer
adgif-data: inline-array
data: uint128

sprite-vec-data-2d

sprite-vec-data-2d: structuresource
Fields
x-y-z-sx: vector
flag-rot-sy: vector
r-g-b-a: vector
x: float
y: float
z: float
sx: float
sy: float
rot: float
flag: int32
matrix: int32
warp-turns: int32
r: float
g: float
b: float
a: float
trans: vector3s
color: rgbaf
data: uint128
data64: uint64

sprite-vec-data-3d

sprite-vec-data-3d: structuresource
Fields
x-y-z-sx: vector
qx-qy-qz-sy: vector
r-g-b-a: vector
x: float
y: float
z: float
sx: float
sy: float
qx: float
qy: float
qz: float
r: float
g: float
b: float
a: float
trans: vector3s
rot: vector3s
color: rgbaf
data: uint128

Variables


SPRITE_MAX_AMOUNT_MULT

SPRITE_MAX_AMOUNT_MULT: unknownsource

sprite

source

Types


sprite-aux-list

sprite-aux-list: basicsource
Fields
type: type
num-entries: int32
entry: int32
data: sprite-vec-data-2d

sprite-frame-data

sprite-frame-data: structuresource
Fields
cdata: vector
hmge-scale: vector
consts: vector
pfog0: float
deg-to-rad: float
min-scale: float
inv-area: float
adgif-giftag: gs-gif-tag
sprite-2d-giftag: gs-gif-tag
sprite-2d-giftag-2: gs-gif-tag
sincos-01: vector
sincos-23: vector
sincos-45: vector
sincos-67: vector
sincos-89: vector
basis-x: vector
basis-y: vector
sprite-3d-giftag: gs-gif-tag
screen-shader: adgif-shader
clipped-giftag: gs-gif-tag
inv-hmge-scale: vector
stq-offset: vector
stq-scale: vector
rgba-plain: qword
warp-giftag: gs-gif-tag
fog-clamp: vector
fog-min: float
fog-max: float
max-scale: float

sprite-header

sprite-header: structuresource
Fields
header: qword
num-sprites: int32

sprite-hvdf-control

sprite-hvdf-control: structuresource
Fields
alloc: int8

sprite-hvdf-data

sprite-hvdf-data: structuresource
Fields
data: qword

Functions


add-to-sprite-aux-list

add-to-sprite-aux-list(arg0: sparticle-system, arg1: sparticle-cpuinfo, arg2: sprite-vec-data-3d) => nonesource

clear-sprite-aux-list

clear-sprite-aux-list() => nonesource

Remove everything from the sprite aux list

sprite-add-2d-all

sprite-add-2d-all(sprites: sprite-array-2d, dma-buff: dma-buffer, group-idx: int) => nonesource

Builds a DMA list for sprites

sprite-add-2d-chunk

sprite-add-2d-chunk(sprites: sprite-array-2d, start-sprite-idx: int, num-sprites: int, dma-buff: dma-buffer, mscal-addr: int) => nonesource

Upload sprite data from elements in the array.

sprite-add-3d-all

sprite-add-3d-all(sprites: sprite-array-3d, dma-buff: dma-buffer, group-idx: int) => nonesource

Set up DMA for all 3d sprites

sprite-add-3d-chunk

sprite-add-3d-chunk(sprites: sprite-array-3d, start-sprite-idx: int, num-sprites: int, dma-buff: dma-buffer) => nonesource

Add DMA list data for up to 48 sprites. This is very similar to the 2D one, see that for more documentation

sprite-add-frame-data

sprite-add-frame-data(dma-buff: dma-buffer, tbp-offset: uint) => nonesource

sprite-add-matrix-data

sprite-add-matrix-data(dma-buff: dma-buffer, matrix-mode: uint) => nonesource

Add matrix data to a dma-buffer.
Mode 0 = send (-> math-camera camera-temp)
Mode 1 = screen sprites, like the HUD

sprite-add-shadow-all

sprite-add-shadow-all(shadow-buff: fake-shadow-buffer, dma-buff: dma-buffer) => nonesource

Set up DMA to add all shadows in the shadow buffer

sprite-add-shadow-chunk

sprite-add-shadow-chunk(shadow-buff: fake-shadow-buffer, start-idx: int, num-sprites: int, dma-buff: dma-buffer) => nonesource

Add shadow sprites

sprite-allocate-user-hvdf

sprite-allocate-user-hvdf() => intsource

Allocate an HVDF entry. Returns the index. Or 0 if it fails

sprite-draw

sprite-draw(disp: display) => nonesource

Main sprite draw function.

sprite-get-3d-quaternion!

sprite-get-3d-quaternion!(arg0: quaternion, arg1: sprite-vec-data-3d) => quaternionsource

Get a quaternion. It's stored with only 3 components, so qw is
recalculated.

sprite-get-user-hvdf

sprite-get-user-hvdf(arg0: int) => vectorsource

Get an HVDF entry by index

sprite-release-user-hvdf

sprite-release-user-hvdf(arg0: int) => nonesource

Free an HVDF

sprite-set-3d-quaternion!

sprite-set-3d-quaternion!(arg0: sprite-vec-data-3d, arg1: quaternion) => quaternionsource

Set the quaternion for a 3d sprite.
NOTE: the w component of the quaternion is not stored and
the original w value is preserved.

sprite-setup-frame-data

sprite-setup-frame-data(data: sprite-frame-data, tbp-offset: int) => nonesource

Build the sprite-frame-data. This should be done once per frame

sprite-setup-header

sprite-setup-header(hdr: sprite-header, num-sprites: int) => nonesource

Setup a sprite-header for the given number of sprites

Variables


*sprite-array-2d*

*sprite-array-2d*: sprite-array-2dsource

*sprite-array-3d*

*sprite-array-3d*: sprite-array-3dsource

*sprite-aux-list*

*sprite-aux-list*: sprite-aux-listsource

*sprite-hvdf-control*

*sprite-hvdf-control*: sprite-hvdf-controlsource

*sprite-hvdf-data*

*sprite-hvdf-data*: sprite-hvdf-datasource

SPRITE_CHUNK_COUNT

SPRITE_CHUNK_COUNT: unknownsource

sprite-vu1-block

const sprite-vu1-block: vu-functionsource