coastline 0.0.4
Loading...
Searching...
No Matches
modeldisplaylist.h
Go to the documentation of this file.
1#ifndef COASTLINE_MODEL_DISPLAY_LIST_H
2#define COASTLINE_MODEL_DISPLAY_LIST_H
3
5#include "common/render.h"
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
12#define SetModelTiles() \
13 { \
14 gDPSetTile(gDisplayListPtr++, \
15 G_IM_FMT_RGBA, \
16 G_IM_SIZ_16b, \
17 0, \
18 0, \
19 G_TX_LOADTILE, \
20 0, \
21 0, \
22 0, \
23 0, \
24 0, \
25 0, \
26 0); \
27 gDPSetTile( \
28 gDisplayListPtr++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x1F0, 6, 0, 0, 0, 0, 0, 0, 0); \
29 gDPSetTile( \
30 gDisplayListPtr++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x100, 5, 0, 0, 0, 0, 0, 0, 0); \
31 }
32
34#if TGR_PLATFORM == TGR_PLATFORM_N64
35#define SetModelTextures() \
36 { \
37 gSPTexture(gDisplayListPtr++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); \
38 gSPClearGeometryMode(gDisplayListPtr++, G_TEXTURE_GEN | G_TEXTURE_GEN_LINEAR); \
39 gDPTileSync(gDisplayListPtr++); \
40 SetModelTiles(); \
41 }
42#else
43static inline void SetModelTextures(void) {
44 gSPTexture(gDisplayListPtr++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON);
48}
49#endif
50
52static inline void DrawModelDisplayList(DisplayListCommand *displayList) {
53 if (displayList != NULL) {
54 gSPDisplayList(gDisplayListPtr++, displayList);
55 }
56}
57
59static inline void SetVehicleLightColors(u32 dir, u32 ambient) {
62}
63
64#ifdef __cplusplus
65}
66#endif
67
68#endif /* COASTLINE_MODEL_DISPLAY_LIST_H */
The state the renderer shares between the parts of a frame.
Gfx DisplayListCommand
A display-list command in the Nintendo 64 renderer.
Definition displaylistops.h:21
Gfx * gDisplayListPtr
The next command of the display list.
#define gSPClearGeometryMode(pkt, word)
Clear the geometry mode bits of word.
Definition gbi.h:520
#define G_ON
Definition gbi.h:359
#define gSPDisplayList(pkt, dl)
Call display list dl.
Definition gbi.h:489
#define gSPTexture(pkt, s, t, level, tile, on)
Set the texture scale s and t, the levels of detail, the tile, and whether texturing is on.
Definition gbi.h:522
#define G_TEXTURE_GEN_LINEAR
Definition gbi.h:202
#define LIGHT_1
Definition gbi.h:398
#define G_TEXTURE_GEN
Definition gbi.h:201
#define gSPLightColor(pkt, n, col)
Set the colour of light n, from 1, as its two copies.
Definition gbi.h:541
#define LIGHT_2
Definition gbi.h:399
#define gDPTileSync(pkt)
Wait for the tile descriptors to settle before a tile changes.
Definition gbi.h:605
#define G_TX_RENDERTILE
Definition gbi.h:353
#define SetModelTextures()
Turn the textures on at full scale and set up the tiles.
Definition modeldisplaylist.h:35
static void DrawModelDisplayList(DisplayListCommand *displayList)
Draw a display list of the current model when it has one.
Definition modeldisplaylist.h:52
#define SetModelTiles()
Set up the tiles of the textures of a model: the load tile and the two render tiles.
Definition modeldisplaylist.h:12
static void SetVehicleLightColors(u32 dir, u32 ambient)
Set the colours of the light of the sun and of the ambient light.
Definition modeldisplaylist.h:59
#define NULL
Definition ultratypes.h:49
unsigned int u32
Definition ultratypes.h:20