Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
GDTev.h
Go to the documentation of this file.
1#ifndef _DOLPHIN_GD_TEV_H
2#define _DOLPHIN_GD_TEV_H
3
4#include <dolphin/gx/GXEnum.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11#define BP_TEV_COLOR(d, c, b, a, bias, op, clamp, scale, out, id) \
12 ( \
13 (u32)(d) << 0 | \
14 (u32)(c) << 4 | \
15 (u32)(b) << 8 | \
16 (u32)(a) << 12 | \
17 (u32)(bias) << 16 | \
18 (u32)(op) << 18 | \
19 (u32)(clamp) << 19 | \
20 (u32)(scale) << 20 | \
21 (u32)(out) << 22 | \
22 (u32)(id) << 24 \
23 )
24
25#define BP_TEV_ALPHA(ras_sel, tex_sel, d, c, b, a, bias, op, clamp, scale, out, id) \
26 ( \
27 (u32)(ras_sel) << 0 | \
28 (u32)(tex_sel) << 2 | \
29 (u32)(d) << 4 | \
30 (u32)(c) << 7 | \
31 (u32)(b) << 10 | \
32 (u32)(a) << 13 | \
33 (u32)(bias) << 16 | \
34 (u32)(op) << 18 | \
35 (u32)(clamp) << 19 | \
36 (u32)(scale) << 20 | \
37 (u32)(out) << 22 | \
38 (u32)(id) << 24 \
39 )
40
41#define BP_TEV_COLOR_REG_RA(r, a, reg, id) \
42 ( \
43 (u32)(r) << 0 | \
44 (u32)(a) << 12 | \
45 (u32)(reg) << 23 | \
46 (u32)(id) << 24 \
47 )
48
49#define BP_TEV_COLOR_REG_BG(b, g, reg, id) \
50 ( \
51 (u32)(b) << 0 | \
52 (u32)(g) << 12 | \
53 (u32)(reg) << 23 | \
54 (u32)(id) << 24 \
55 )
56
57#define BP_TEV_KSEL(rb, ga, kcsel0, kasel0, kcsel1, kasel1, id) \
58 ( \
59 (u32)(rb) << 0 | \
60 (u32)(ga) << 2 | \
61 (u32)(kcsel0) << 4 | \
62 (u32)(kasel0) << 9 | \
63 (u32)(kcsel1) << 14 | \
64 (u32)(kasel1) << 19 | \
65 (u32)(id) << 24 \
66 )
67
68#define BP_ALPHA_COMPARE(ref0, ref1, comp0, comp1, op, id) \
69 ( \
70 (u32)(ref0) << 0 | \
71 (u32)(ref1) << 8 | \
72 (u32)(comp0) << 16 | \
73 (u32)(comp1) << 19 | \
74 (u32)(op) << 22 | \
75 (u32)(id) << 24 \
76 )
77
78#define BP_ZTEX_PARAMS_0(bias, id) \
79 ( \
80 (u32)(bias) << 0 | \
81 (u32)(id) << 24 \
82 )
83
84#define BP_ZTEX_PARAMS_1(zfmt, op, id) \
85 ( \
86 (u32)(zfmt) << 0 | \
87 (u32)(op) << 2 | \
88 (u32)(id) << 24 \
89 )
90
91#define BP_TEV_ORDER(map0, coord0, enable0, color0, map1, coord1, enable1, color1, id) \
92 ( \
93 (u32)(map0) << 0 | \
94 (u32)(coord0) << 3 | \
95 (u32)(enable0) << 6 | \
96 (u32)(color0) << 7 | \
97 (u32)(map1) << 12 | \
98 (u32)(coord1) << 15 | \
99 (u32)(enable1) << 18 | \
100 (u32)(color1) << 19 | \
101 (u32)(id) << 24 \
102 )
103
108 GXTevRegID out_reg);
111 GXTevOp op, GXTevBias bias, GXTevScale scale,
112 u8 clamp, GXTevRegID out_reg,
113 GXTevSwapSel ras_sel, GXTevSwapSel tex_sel);
117void GDSetTevKonstantSel(GXTevStageID evenStage, GXTevKColorSel kcsel0,
118 GXTevKAlphaSel kasel0, GXTevKColorSel kcsel1,
119 GXTevKAlphaSel kasel1);
121 GXTevColorChan green, GXTevColorChan blue,
122 GXTevColorChan alpha);
123void GDSetAlphaCompare(GXCompare comp0, u8 ref0, GXAlphaOp op, GXCompare comp1, u8 ref1);
124void GDSetZTexture(GXZTexOp op, GXTexFmt fmt, u32 bias);
125void GDSetTevOrder(GXTevStageID evenStage, GXTexCoordID coord0, GXTexMapID map0,
126 GXChannelID color0, GXTexCoordID coord1, GXTexMapID map1,
127 GXChannelID color1);
128
129#ifdef __cplusplus
130}
131#endif
132
133#endif
void GDSetAlphaCompare(GXCompare comp0, u8 ref0, GXAlphaOp op, GXCompare comp1, u8 ref1)
Definition GDTev.c:117
void GDSetTevColorS10(GXTevRegID reg, GXColorS10 color)
Definition GDTev.c:76
void GDSetZTexture(GXZTexOp op, GXTexFmt fmt, u32 bias)
Definition GDTev.c:121
void GDSetTevKonstantSel(GXTevStageID evenStage, GXTevKColorSel kcsel0, GXTevKAlphaSel kasel0, GXTevKColorSel kcsel1, GXTevKAlphaSel kasel1)
Definition GDTev.c:100
void GDSetTevKColor(GXTevKColorID reg, GXColor color)
Definition GDTev.c:89
void GDSetTevOrder(GXTevStageID evenStage, GXTexCoordID coord0, GXTexMapID map0, GXChannelID color0, GXTexCoordID coord1, GXTexMapID map1, GXChannelID color1)
Definition GDTev.c:144
void GDSetTevSwapModeTable(GXTevSwapSel table, GXTevColorChan red, GXTevColorChan green, GXTevColorChan blue, GXTevColorChan alpha)
Definition GDTev.c:107
void GDSetTevOp(GXTevStageID stage, GXTevMode mode)
Definition GDTev.c:4
void GDSetTevColorCalc(GXTevStageID stage, GXTevColorArg a, GXTevColorArg b, GXTevColorArg c, GXTevColorArg d, GXTevOp op, GXTevBias bias, GXTevScale scale, u8 clamp, GXTevRegID out_reg)
Definition GDTev.c:40
void GDSetTevAlphaCalcAndSwap(GXTevStageID stage, GXTevAlphaArg a, GXTevAlphaArg b, GXTevAlphaArg c, GXTevAlphaArg d, GXTevOp op, GXTevBias bias, GXTevScale scale, u8 clamp, GXTevRegID out_reg, GXTevSwapSel ras_sel, GXTevSwapSel tex_sel)
Definition GDTev.c:51
void GDSetTevColor(GXTevRegID reg, GXColor color)
Definition GDTev.c:63
enum _GXTevKColorID GXTevKColorID
enum _GXTevColorArg GXTevColorArg
enum _GXTevScale GXTevScale
enum _GXTexCoordID GXTexCoordID
enum _GXTevMode GXTevMode
enum _GXTexFmt GXTexFmt
enum _GXTexMapID GXTexMapID
enum _GXAlphaOp GXAlphaOp
enum _GXTevColorChan GXTevColorChan
enum _GXTevKAlphaSel GXTevKAlphaSel
enum _GXChannelID GXChannelID
enum _GXTevSwapSel GXTevSwapSel
enum _GXTevBias GXTevBias
enum _GXTevAlphaArg GXTevAlphaArg
enum _GXTevKColorSel GXTevKColorSel
enum _GXZTexOp GXZTexOp
enum _GXTevRegID GXTevRegID
enum _GXTevStageID GXTevStageID
enum _GXCompare GXCompare
enum _GXTevOp GXTevOp
u32 mode
Definition GXTev.c:56
u32 clamp
Definition GXTev.c:10
u32 bias
Definition GXTev.c:12
Ordon Goat.
static char * table[19]
Definition d_a_door_shutter.cpp:1599
static SECTION_DATA u8 color[4]
Definition d_a_obj_crope.cpp:225
a
Definition k_cos.c:89
Definition GXStruct.h:31
Definition d_menu_dmap_map.cpp:90
unsigned long u32
Definition types.h:9
unsigned char u8
Definition types.h:5