Types
adgif-shader: structuresource
Fields
quad: qword
prims: gs-reg64
tex0: gs-tex0
tex1: gs-tex1
miptbp1: gs-miptbp
clamp: gs-clamp
clamp-reg: gs-reg64
alpha: gs-alpha
alpha-as-miptb2: gs-miptbp
link-test: link-test-flags
texture-id: texture-id
next: shader-ptr
adgif-shader-array: inline-array-classsource
shader-ptr: uint32source
texture: basicsource
Fields
type: type
w: int16
wu: uint16
h: int16
hu: uint16
num-mips: uint8
tex1-control: uint8
psm: gs-psm
mip-shift: uint8
clutpsm: uint16
dest: uint16
clutdest: uint16
width: uint8
name: string
size: uint32
uv-dist: float
masks: uint32
texture-id: uint32source
texture-link: structuresource
Fields
next: shader-ptr
texture-page: basicsource
Fields
type: type
info: file-info
name: basic
id: uint32
length: int32
mip0-size: uint32
size: uint32
segment: texture-page-segment
pad: uint32
data: texture
Methods
relocate(obj: texture-page, arg0: kheap, arg1: pointer) => nonesource
Add to VRAM and allocate links.
This method is called by the GOAL linker when it loads a texture page.
remove-from-heap(obj: texture-page, seg: kheap) => _type_source
Remove the texture data from the heap. This can only safely be called immediately after
the texture-page is loaded. This is used for textures that always live in VRAM.
get-leftover-block-count(obj: texture-page, segment-count: int, additional-size: int) => intsource
This returns how many blocks are used in the last pool page.
It uses pool-pages, which are 64 blocks or 16 kB.
unused-11: unknown
relocate-dests!(obj: texture-page, new-dest: int, seg-id: int) => nonesource
Update a texture-page so all the textures point to a new location
add-to-dma-buffer(obj: texture-page, dma-buff: dma-buffer, mode: int) => intsource
Helper for upload-now! to upload texture-page to VRAM
upload-now!(obj: texture-page, arg0: int) => nonesource
Immediately upload the texture-page to the given buffer, using arg0 mode.
texture-page-dir: basicsource
Fields
type: type
length: int32
entries: texture-page-dir-entry
Methods
relocate(obj: texture-page-dir, arg0: kheap, arg1: pointer) => nonesource
Load a texture-page-dir
unlink-textures-in-heap!(obj: texture-page-dir, heap: kheap) => intsource
Remove adgif shaders that are in the given heap
texture-page-dir-entry: structuresource
texture-pool: basicsource
Fields
type: type
top: int32
cur: int32
allocate-func: function
font-palette: int32
segment-near: texture-pool-segment
segment-common: texture-pool-segment
segment: texture-pool-segment
common-page: texture-page
common-page-mask: int32
ids: uint32
Methods
initialize!(obj: texture-pool) => _type_source
Initialize (or maybe reinitialize) a texture pool.
print-usage(obj: texture-pool) => _type_source
Print out VRAM usage.
setup-font-texture!(obj: texture-pool) => nonesource
Move the font textures to the upper 8-bits of the depth buffer.
allocate-defaults!(obj: texture-pool) => nonesource
Allocate default segments
login-level-textures(obj: texture-pool, level: level, max-page-kind: int, id-array: pointer) => nonesource
Login textures in a level. Only does up to max-page-kind. Set this to water (4) to do all of them.
Also checks sizes.
This is called from level.gc as part of level loading.
add-tex-to-dma!(obj: texture-pool, level: level, tex-page-kind: int) => nonesource
For the given tpage-kind, upload as needed for the level
allocate-vram-words!(obj: texture-pool, word-count: int) => intsource
Allocate words in vram. Returns the index of the first word.
allocate-segment!(obj: texture-pool, segment: texture-pool-segment, size: int) => texture-pool-segmentsource
Allocate a segment of the given size. The segment is an output here, containing size/dest.
unused-17: unknown
unused-18: unknown
unused-19: unknown
unload!(obj: texture-pool, arg0: texture-page) => intsource
Unload the texture from the directory
upload-one-common!(obj: texture-pool, lev: level) => symbolsource
Upload the first common texture page that's in in the common-page-mask.
lookup-boot-common-id(obj: texture-pool, arg0: int) => intsource
Map these special textures to a number betwen 0 and 19. For other textures, return -1.
NOTE: hud means start menu + zoomer, not the usual health HUD.
texture-relocate-later: basicsource
Fields
type: type
memcpy: symbol
dest: uint32
source: uint32
move: uint32
entry: texture-page-dir-entry
page: texture-page
Functions
texture-mip->segment(arg0: int, arg1: int) => intsource
Convert a mip level to the segment that it is stored in.
Variables
Variables
Functions
adgif-shader-login(shader: adgif-shader) => texturesource
If not logged in already, link us and update from texture.
adgif-shader-login-fast(shader: adgif-shader) => texturesource
Like adgif-shader-login, but assumes you've already logged in the texture
adgif-shader-login-no-remap(arg0: adgif-shader) => texturesource
Same as adgif-shader-login, but don't remap our texture id
adgif-shader-login-no-remap-fast(arg0: adgif-shader) => texturesource
Like adgif-shader-login-fast, but no level remap
adgif-shader-update!(arg0: adgif-shader, arg1: texture) => nonesource
Update tex1
adgif-shader<-texture!(arg0: adgif-shader, arg1: texture) => adgif-shadersource
Set up an ADGIF shader from a texture.