80 if (data == archive) {
89 while ((c = *src) != 0) {
93 for (k = 0; k < n; k++) {
99 for (k = 0; k < n; k++) {
#define RLEN_MAGIC
The first word of "RLEN" data, which its unpacked size follows.
FileCache FILE_CACHE
The file cache.
Heap HEAP
The functions that return what a call left in v0 (allocMemHigh, findTask) and the ones that take othe...
#define MEM_MODE
the current mode's: freed by main whenever the mode task ends
void *(* getArchiveEntry)(s32 index, void *archive)
void *(* alloc)(s32 size, s32 tag)
void(* zero)(void *ptr, s32 size)
u32 size
in bytes, this header included
Uploads TIM images to VRAM (initTimLoader); acts on TIM_LOADER.
s32 bufferSize
for the RLE-compressed images
void(* setClutPos)()
(x, y)
void(* setImagePos)()
(x, y)
void(* setBufferSize)()
(size)
u16 w
size of the last image
void(* loadArchive)()
(archive): each image 64 halfwords to the right
void bindTimLoader(TimLoader *obj)
Makes obj the TIM loader the methods work on.
void timLoaderSetImagePos(s32 x, s32 y)
TIM loader method: where in VRAM the next image goes.
static TimLoader * TIM_LOADER
Small variables, addressed through $gp (see the Makefile)
void timLoaderSetClutPos(s32 x, s32 y)
TIM loader method: where in VRAM the next CLUT goes.
void timLoaderLoad(void *tim)
TIM loader method: sends a TIM's CLUT (4 and 8-bit images) and image to VRAM.
void initTimLoader(TimLoader *obj)
Clears a TIM loader, gives it its methods and binds it.
void timLoaderLoadArchive(void *archive)
TIM loader method: loads every TIM of an archive side by side, 0x40 halfwords apart,...
void timLoaderSetBufferSize(s32 size)
TIM loader method: the buffer that RLEN TIMs are unpacked to.
Where timLoaderLoad is in a TIM: its words, then its blocks, which their sizes in bytes take it past.