1#ifndef COASTLINE_PARTICLE_COMMANDS_H
2#define COASTLINE_PARTICLE_COMMANDS_H
18#define LoadParticleTextureImage() \
19 gDPSetTextureImage(gDisplayListPtr++, G_IM_FMT_I, G_IM_SIZ_16b, 1, g_aParticleTexture); \
20 gDPSetTile(gDisplayListPtr++, \
33 gDPLoadSync(gDisplayListPtr++); \
34 gDPLoadBlock(gDisplayListPtr++, G_TX_LOADTILE, 0, 0, PARTICLE_LOAD_TEXELS, PARTICLE_LOAD_DXT); \
35 gDPPipeSync(gDisplayListPtr++); \
36 gDPSetTile(gDisplayListPtr++, \
49 gDPSetTileSize(gDisplayListPtr++, G_TX_RENDERTILE, 0, 0, 63 << 2, 63 << 2); \
50 gDPSetTextureLUT(gDisplayListPtr++, G_TT_NONE); \
51 gDPSetTexturePersp(gDisplayListPtr++, G_TP_NONE)
55static inline void WriteParticleCombineMode(
void) {
78 WriteParticleCombineMode();
90 WriteParticleCombineMode();
100#define ConfigureParticleTexture() \
101 gDPPipeSync(gDisplayListPtr++); \
102 gDPSetCycleType(gDisplayListPtr++, G_CYC_1CYCLE); \
103 gSPTexture(gDisplayListPtr++, 0xFFFF, 0xFFFF, 0, G_TX_RENDERTILE, G_ON); \
104 gDPSetTextureFilter(gDisplayListPtr++, g_dwTextureFilterMode); \
105 gDPSetCombineLERP(gDisplayListPtr++, \
122 LoadParticleTextureImage()
124#define ConfigureExhaustParticleTexture() ConfigureParticleTexture()
129#define RestoreParticleModes() \
130 gDPPipeSync(gDisplayListPtr++); \
131 gDPSetTexturePersp(gDisplayListPtr++, G_TP_PERSP); \
132 gDPSetDepthSource(gDisplayListPtr++, G_ZS_PIXEL); \
133 gDPSetColorDither(gDisplayListPtr++, g_dwColorDitherMode); \
134 gDPSetAlphaDither(gDisplayListPtr++, g_dwAlphaDitherMode); \
135 gDPSetAlphaCompare(gDisplayListPtr++, G_AC_THRESHOLD)
void PackCombineMode(GbiCommand *pCommand, int nColorA0, int nColorB0, int nColorC0, int nColorD0, int nAlphaA0, int nAlphaB0, int nAlphaC0, int nAlphaD0, int nColorA1, int nColorB1, int nColorC1, int nColorD1, int nAlphaA1, int nAlphaB1, int nAlphaC1, int nAlphaD1)
Build the command that sets the combine mode of two cycles from the inputs of the colour combiner,...
u32 g_dwTextureFilterMode
The texture filter of the other modes.
Gfx * gDisplayListPtr
The next command of the display list.
#define G_CCMUX_PRIMITIVE
Definition gbi.h:308
#define gDisplayListWords(pkt, c0, c1)
Write a command of two words at pkt, which is evaluated once.
Definition gbi.h:459
#define G_ON
Definition gbi.h:359
#define gDPSetCycleType(pkt, type)
Set the G_CYC_* cycle type.
Definition gbi.h:607
#define G_ACMUX_TEXEL0
Definition gbi.h:321
#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_RM_XLU_SURF
The translucent surface without antialiasing, for the first cycle.
Definition gbi.h:296
#define gDPPipeSync(pkt)
Wait for the RDP pipeline to drain before a mode changes.
Definition gbi.h:603
#define gDPSetRenderMode(pkt, c0, c1)
Set the render mode from the modes of the first and second cycles.
Definition gbi.h:659
#define G_RM_XLU_SURF2
The translucent surface without antialiasing, for the second cycle.
Definition gbi.h:300
#define gDPSetTextureFilter(pkt, type)
Set the G_TF_* texture filter.
Definition gbi.h:610
#define G_TX_RENDERTILE
Definition gbi.h:353
#define G_ACMUX_PRIMITIVE
Definition gbi.h:323
#define G_CYC_1CYCLE
Definition gbi.h:222
@ GBI_OP_BIND_TEXTURE_ENTRY
Definition gbicommand.h:63
#define LoadParticleTextureImage()
Load the particle image and configure its rendering tile.
Definition particlecommands.h:18
#define ConfigureParticleTexture()
Configure the particle texture for primitive-colour rectangles.
Definition particlecommands.h:100
#define ConfigureExhaustParticleTexture()
Reuse the particle texture setup for exhaust particles.
Definition particlecommands.h:124
#define g_dwHudOverlayHalfTextureId
Definition renderbackend.h:326
#define g_dwParticleTextureId
Definition renderbackend.h:328
The display, DMA and decompression state of the system file of the N64 releases.
unsigned int u32
Definition ultratypes.h:20
The weather of a race and the flags the renderer tests.