|
Digimon World 3 decomp
The European version, SLES_039.36
|
Go to the source code of this file.
Functions | |
| Layer * | getLayer (s32 id) |
The layer with id id, or NULL. | |
| s32 | findLayerSlot (s32 id) |
| The slot of the layer with this id; id 0 finds a free slot. | |
| void | removeLayerSlot (s32 index) |
| Closes the gap of a removed layer in the draw order. | |
| void | insertLayerSlot (s32 index, Layer *layer, s32 id) |
Puts a layer at position index of the draw order, moving the later ones back. | |
| Layer * | createLayer (RECT *rect, s32 otShift, s32 id) |
A new layer drawing to rect, with an OT of OT_LENGTHS[otShift - 1] entries; NULL when all are in use. | |
| s32 | destroyLayer (s32 id) |
Frees the layer with id id; 0 if there is none. | |
| void | moveLayer (s32 id, s32 targetId, s32 delta) |
| Moves a layer to the position of another one (plus delta) in the draw order. | |
| void | layerClearOt (Layer *layer) |
| Layer method: clears the OT of the buffer being drawn. | |
| void | layerSkipEmptyOt (Layer *layer) |
| Links every run of empty OT entries past itself, so the GPU skips it. | |
| void | layerDraw (Layer *layer) |
| Layer method: sends the OT of the finished buffer, after its DRAWENV with the layer's offset. | |
| u_long * | layerGetOtEntry (Layer *layer, s32 depth) |
Layer method: the OT entry at depth in the buffer being drawn. | |
| u_long * | layerGetOtEntryZ (Layer *layer, s32 z) |
| Layer method: the OT entry for a 16-bit Z, scaled to the OT's length. | |
| u_long * | layerGetOt (Layer *layer) |
| Layer method: the OT of the buffer being drawn. | |
| s32 | layerGetOtShift (LayerView *layer) |
| Layer method: the OT size it was created with. | |
| void | layerSetBgColor (LayerView *layer, u8 r, u8 g, u8 b) |
| Layer method: the color the layer's area is cleared to (black: not cleared). | |
| void | layerSetOffset (LayerView *layer, s16 x, s16 y) |
| Layer method: the drawing offset. | |
| void | layerGetScroll (LayerView *layer, Vec2 *out) |
| Layer method: the scroll position, in pixels. | |
| void | layerSetScroll (LayerView *layer, s32 x, s32 y) |
| Layer method: sets the scroll position (8.8 fixed point) | |
| void | layerAddScroll (LayerView *layer, s32 dx, s32 dy) |
| Layer method: scrolls by (dx, dy) (8.8 fixed point) | |
| void | layerSetClipPos (LayerView *layer, s16 x, s16 y) |
| Layer method: moves the clip rectangle. | |
| void | layerSetClipSize (LayerView *layer, s16 w, s16 h) |
| Layer method: resizes the clip rectangle. | |
| void | layerGetViewRect (LayerView *layer, Rect16 *rect) |
| Layer method: the part of the scrolled world the clip rectangle shows. | |
| void | layerFree (Layer *layer) |
| Layer method: frees its OTs and draw callbacks, once the GPU is done with them. | |
| void | layerResetCallbacks (Layer *layer) |
| Layer method: empties the draw callbacks, but for the head entry, which sorts first. | |
| void | layerAllocCallbacks (Layer *layer, s32 count) |
Layer method: room for count draw callbacks. | |
| void | layerAddSortedCallback (Layer *layer, void(*func)(s32, void *, s32), s32 arg, s32 priority, s32 param) |
| Layer method: adds a draw callback in order of priority, highest first. | |
| void | layerAddCallback (Layer *layer, void(*func)(s32, void *, s32), s32 arg) |
| Layer method: adds a draw callback at the end of the list. | |
| void | layerRunCallbacks (Layer *layer) |
| Layer method: runs the draw callbacks in order, then empties the list. | |
| void | layerSetKeepView (Layer *layer, s32 enable, s32 projection) |
| Layer method: keeps the current world-screen matrix and projection for this buffer's drawing. | |
| void | layerLoadView (Layer *layer) |
| Layer method: restores the view that setKeepView kept. | |
| void | layerSetKeepLightMatrix (Layer *layer, s32 enable) |
| Layer method: keeps the current light matrix for this buffer's drawing. | |
| void | layerLoadLightMatrix (Layer *layer) |
| Layer method: restores the light matrix that setKeepLightMatrix kept. | |
| Layer * | newLayer (DRAWENV *env, s32 otShift) |
| Allocates a layer with its two OTs and methods. | |
Variables | |
| s16 | OT_LENGTHS [] |
| A layer's ordering table length, by its otShift - 1. | |
The slot of the layer with this id; id 0 finds a free slot.
Definition at line 19 of file layer.c.
Referenced by createLayer(), destroyLayer(), and moveLayer().
| void removeLayerSlot | ( | s32 | index | ) |
Closes the gap of a removed layer in the draw order.
Definition at line 35 of file layer.c.
Referenced by destroyLayer(), and moveLayer().
Puts a layer at position index of the draw order, moving the later ones back.
Definition at line 43 of file layer.c.
Referenced by moveLayer().
| void layerClearOt | ( | Layer * | layer | ) |
Layer method: clears the OT of the buffer being drawn.
Definition at line 106 of file layer.c.
Referenced by newLayer().
| void layerSkipEmptyOt | ( | Layer * | layer | ) |
Links every run of empty OT entries past itself, so the GPU skips it.
Definition at line 111 of file layer.c.
Referenced by layerDraw().
| void layerDraw | ( | Layer * | layer | ) |
Layer method: sends the OT of the finished buffer, after its DRAWENV with the layer's offset.
Definition at line 130 of file layer.c.
Referenced by newLayer().
Layer method: the OT entry at depth in the buffer being drawn.
Definition at line 154 of file layer.c.
Referenced by newLayer().
Layer method: the OT entry for a 16-bit Z, scaled to the OT's length.
Definition at line 159 of file layer.c.
Referenced by newLayer().
| u_long * layerGetOt | ( | Layer * | layer | ) |
Layer method: the OT of the buffer being drawn.
Definition at line 166 of file layer.c.
Referenced by newLayer().
Layer method: the OT size it was created with.
Definition at line 171 of file layer.c.
Referenced by newLayer().
Layer method: the color the layer's area is cleared to (black: not cleared).
An old-style definition, as Layer.setBgColor's unprototyped callers suit: they pass ints, which it takes as bytes.
Definition at line 180 of file layer.c.
Referenced by newLayer().
Layer method: the drawing offset.
Old-style, as layerSetBgColor
Definition at line 197 of file layer.c.
Referenced by newLayer().
Layer method: the scroll position, in pixels.
Definition at line 207 of file layer.c.
Referenced by newLayer().
Layer method: sets the scroll position (8.8 fixed point)
Definition at line 213 of file layer.c.
Referenced by newLayer().
Layer method: scrolls by (dx, dy) (8.8 fixed point)
Definition at line 219 of file layer.c.
Referenced by newLayer().
Layer method: moves the clip rectangle.
Old-style, as layerSetBgColor
Definition at line 225 of file layer.c.
Referenced by newLayer().
Layer method: resizes the clip rectangle.
Old-style, as layerSetBgColor
Definition at line 235 of file layer.c.
Referenced by newLayer().
Layer method: the part of the scrolled world the clip rectangle shows.
Definition at line 245 of file layer.c.
Referenced by newLayer().
| void layerFree | ( | Layer * | layer | ) |
Layer method: frees its OTs and draw callbacks, once the GPU is done with them.
Definition at line 253 of file layer.c.
Referenced by newLayer().
| void layerResetCallbacks | ( | Layer * | layer | ) |
Layer method: empties the draw callbacks, but for the head entry, which sorts first.
Definition at line 263 of file layer.c.
Referenced by layerAllocCallbacks(), and layerRunCallbacks().
Layer method: room for count draw callbacks.
< the current mode's: freed by main whenever the mode task ends
Definition at line 273 of file layer.c.
Referenced by newLayer().
| void layerAddSortedCallback | ( | Layer * | layer, |
| void(*)(s32, void *, s32) | func, | ||
| s32 | arg, | ||
| s32 | priority, | ||
| s32 | param | ||
| ) |
Layer method: adds a draw callback in order of priority, highest first.
Definition at line 280 of file layer.c.
Referenced by newLayer().
Layer method: adds a draw callback at the end of the list.
Definition at line 323 of file layer.c.
Referenced by newLayer().
| void layerRunCallbacks | ( | Layer * | layer | ) |
Layer method: runs the draw callbacks in order, then empties the list.
Definition at line 341 of file layer.c.
Referenced by newLayer().
Layer method: keeps the current world-screen matrix and projection for this buffer's drawing.
Definition at line 357 of file layer.c.
Referenced by newLayer().
| void layerLoadView | ( | Layer * | layer | ) |
Layer method: restores the view that setKeepView kept.
Definition at line 366 of file layer.c.
Referenced by newLayer().
Layer method: keeps the current light matrix for this buffer's drawing.
Definition at line 372 of file layer.c.
Referenced by newLayer().
| void layerLoadLightMatrix | ( | Layer * | layer | ) |
Layer method: restores the light matrix that setKeepLightMatrix kept.
Definition at line 380 of file layer.c.
Referenced by newLayer().
Allocates a layer with its two OTs and methods.
< the current mode's: freed by main whenever the mode task ends
< the current mode's: freed by main whenever the mode task ends
< the current mode's: freed by main whenever the mode task ends
Definition at line 385 of file layer.c.
Referenced by createLayer().
| s16 OT_LENGTHS[] |
A layer's ordering table length, by its otShift - 1.
Definition at line 422 of file layer.c.
Referenced by newLayer().