Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
GDTev.h
Go to the documentation of this file.
1#ifndef _DOLPHIN_GD_TEV_H
2#define _DOLPHIN_GD_TEV_H
3
4#ifdef __REVOLUTION_SDK__
6#else
7#include <dolphin/gx/GXEnum.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14#define BP_TEV_COLOR(d, c, b, a, bias, op, clamp, scale, out, id) \
15 ( \
16 (u32)(d) << 0 | \
17 (u32)(c) << 4 | \
18 (u32)(b) << 8 | \
19 (u32)(a) << 12 | \
20 (u32)(bias) << 16 | \
21 (u32)(op) << 18 | \
22 (u32)(clamp) << 19 | \
23 (u32)(scale) << 20 | \
24 (u32)(out) << 22 | \
25 (u32)(id) << 24 \
26 )
27
28#define BP_TEV_ALPHA(ras_sel, tex_sel, d, c, b, a, bias, op, clamp, scale, out, id) \
29 ( \
30 (u32)(ras_sel) << 0 | \
31 (u32)(tex_sel) << 2 | \
32 (u32)(d) << 4 | \
33 (u32)(c) << 7 | \
34 (u32)(b) << 10 | \
35 (u32)(a) << 13 | \
36 (u32)(bias) << 16 | \
37 (u32)(op) << 18 | \
38 (u32)(clamp) << 19 | \
39 (u32)(scale) << 20 | \
40 (u32)(out) << 22 | \
41 (u32)(id) << 24 \
42 )
43
44#define BP_TEV_COLOR_REG_RA(r, a, reg, id) \
45 ( \
46 (u32)(r) << 0 | \
47 (u32)(a) << 12 | \
48 (u32)(reg) << 23 | \
49 (u32)(id) << 24 \
50 )
51
52#define BP_TEV_COLOR_REG_BG(b, g, reg, id) \
53 ( \
54 (u32)(b) << 0 | \
55 (u32)(g) << 12 | \
56 (u32)(reg) << 23 | \
57 (u32)(id) << 24 \
58 )
59
60#define BP_TEV_KSEL(rb, ga, kcsel0, kasel0, kcsel1, kasel1, id) \
61 ( \
62 (u32)(rb) << 0 | \
63 (u32)(ga) << 2 | \
64 (u32)(kcsel0) << 4 | \
65 (u32)(kasel0) << 9 | \
66 (u32)(kcsel1) << 14 | \
67 (u32)(kasel1) << 19 | \
68 (u32)(id) << 24 \
69 )
70
71#define BP_ALPHA_COMPARE(ref0, ref1, comp0, comp1, op, id) \
72 ( \
73 (u32)(ref0) << 0 | \
74 (u32)(ref1) << 8 | \
75 (u32)(comp0) << 16 | \
76 (u32)(comp1) << 19 | \
77 (u32)(op) << 22 | \
78 (u32)(id) << 24 \
79 )
80
81#define BP_ZTEX_PARAMS_0(bias, id) \
82 ( \
83 (u32)(bias) << 0 | \
84 (u32)(id) << 24 \
85 )
86
87#define BP_ZTEX_PARAMS_1(zfmt, op, id) \
88 ( \
89 (u32)(zfmt) << 0 | \
90 (u32)(op) << 2 | \
91 (u32)(id) << 24 \
92 )
93
94#define BP_TEV_ORDER(map0, coord0, enable0, color0, map1, coord1, enable1, color1, id) \
95 ( \
96 (u32)(map0) << 0 | \
97 (u32)(coord0) << 3 | \
98 (u32)(enable0) << 6 | \
99 (u32)(color0) << 7 | \
100 (u32)(map1) << 12 | \
101 (u32)(coord1) << 15 | \
102 (u32)(enable1) << 18 | \
103 (u32)(color1) << 19 | \
104 (u32)(id) << 24 \
105 )
106
111 GXTevRegID out_reg);
114 GXTevOp op, GXTevBias bias, GXTevScale scale,
115 u8 clamp, GXTevRegID out_reg,
116 GXTevSwapSel ras_sel, GXTevSwapSel tex_sel);
120void GDSetTevKonstantSel(GXTevStageID evenStage, GXTevKColorSel kcsel0,
121 GXTevKAlphaSel kasel0, GXTevKColorSel kcsel1,
122 GXTevKAlphaSel kasel1);
124 GXTevColorChan green, GXTevColorChan blue,
125 GXTevColorChan alpha);
126void GDSetAlphaCompare(GXCompare comp0, u8 ref0, GXAlphaOp op, GXCompare comp1, u8 ref1);
127void GDSetZTexture(GXZTexOp op, GXTexFmt fmt, u32 bias);
128void GDSetTevOrder(GXTevStageID evenStage, GXTexCoordID coord0, GXTexMapID map0,
129 GXChannelID color0, GXTexCoordID coord1, GXTexMapID map1,
130 GXChannelID color1);
131
132#ifdef __cplusplus
133}
134#endif
135
136#endif
137#endif
Ordon Goat.
static char * table[19]
Definition d_a_door_shutter.cpp:1527
static GXColor color
Definition d_a_obj_crope.cpp:39
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 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
unsigned long u32
Definition types.h:12
unsigned char u8
Definition types.h:8
a
Definition k_cos.c:89
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
Definition GXStruct.h:34
Definition GXStruct.h:30