#ifndef GFTEV_H #define GFTEV_H #include "dolphin/gx/GXEnum.h" #include "dolphin/gx/GXStruct.h" #define BP_TEV_COLOR(d, c, b, a, bias, op, clamp, scale, out, id) \ ( \ (u32)(d) << 0 | \ (u32)(c) << 4 | \ (u32)(b) << 8 | \ (u32)(a) << 12 | \ (u32)(bias) << 16 | \ (u32)(op) << 18 | \ (u32)(clamp) << 19 | \ (u32)(scale) << 20 | \ (u32)(out) << 22 | \ (u32)(id) << 24 \ ) #define BP_TEV_ALPHA(ras_sel, tex_sel, d, c, b, a, bias, op, clamp, scale, out, id) \ ( \ (u32)(ras_sel) << 0 | \ (u32)(tex_sel) << 2 | \ (u32)(d) << 4 | \ (u32)(c) << 7 | \ (u32)(b) << 10 | \ (u32)(a) << 13 | \ (u32)(bias) << 16 | \ (u32)(op) << 18 | \ (u32)(clamp) << 19 | \ (u32)(scale) << 20 | \ (u32)(out) << 22 | \ (u32)(id) << 24 \ ) #define BP_TEV_COLOR_REG_RA(r, a, reg, id) \ ( \ (u32)(r) << 0 | \ (u32)(a) << 12 | \ (u32)(reg) << 23 | \ (u32)(id) << 24 \ ) #define BP_TEV_COLOR_REG_BG(b, g, reg, id) \ ( \ (u32)(b) << 0 | \ (u32)(g) << 12 | \ (u32)(reg) << 23 | \ (u32)(id) << 24 \ ) #define BP_TEV_KSEL(rb, ga, kcsel0, kasel0, kcsel1, kasel1, id) \ ( \ (u32)(rb) << 0 | \ (u32)(ga) << 2 | \ (u32)(kcsel0) << 4 | \ (u32)(kasel0) << 9 | \ (u32)(kcsel1) << 14 | \ (u32)(kasel1) << 19 | \ (u32)(id) << 24 \ ) #define BP_ALPHA_COMPARE(ref0, ref1, comp0, comp1, op, id) \ ( \ (u32)(ref0) << 0 | \ (u32)(ref1) << 8 | \ (u32)(comp0) << 16 | \ (u32)(comp1) << 19 | \ (u32)(op) << 22 | \ (u32)(id) << 24 \ ) #define BP_ZTEX_PARAMS_0(bias, id) \ ( \ (u32)(bias) << 0 | \ (u32)(id) << 24 \ ) #define BP_ZTEX_PARAMS_1(zfmt, op, id) \ ( \ (u32)(zfmt) << 0 | \ (u32)(op) << 2 | \ (u32)(id) << 24 \ ) #define BP_TEV_ORDER(map0, coord0, enable0, color0, map1, coord1, enable1, color1, id) \ ( \ (u32)(map0) << 0 | \ (u32)(coord0) << 3 | \ (u32)(enable0) << 6 | \ (u32)(color0) << 7 | \ (u32)(map1) << 12 | \ (u32)(coord1) << 15 | \ (u32)(enable1) << 18 | \ (u32)(color1) << 19 | \ (u32)(id) << 24 \ ) void GFSetTevColor(GXTevRegID, GXColor); void GFSetTevColorS10(GXTevRegID, GXColorS10); void GFSetAlphaCompare(GXCompare, u8, GXAlphaOp, GXCompare, u8); #endif /* GFTEV_H */