Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/src/pc/gfx/gfx_cc.h
7861 views
1
#ifndef GFX_CC_H
2
#define GFX_CC_H
3
4
#include <stdint.h>
5
#include <stdbool.h>
6
7
enum {
8
CC_0,
9
CC_TEXEL0,
10
CC_TEXEL1,
11
CC_PRIM,
12
CC_SHADE,
13
CC_ENV,
14
CC_TEXEL0A,
15
CC_LOD
16
};
17
18
enum {
19
SHADER_0,
20
SHADER_INPUT_1,
21
SHADER_INPUT_2,
22
SHADER_INPUT_3,
23
SHADER_INPUT_4,
24
SHADER_TEXEL0,
25
SHADER_TEXEL0A,
26
SHADER_TEXEL1
27
};
28
29
#define SHADER_OPT_ALPHA (1 << 24)
30
#define SHADER_OPT_FOG (1 << 25)
31
#define SHADER_OPT_TEXTURE_EDGE (1 << 26)
32
#define SHADER_OPT_NOISE (1 << 27)
33
34
struct CCFeatures {
35
uint8_t c[2][4];
36
bool opt_alpha;
37
bool opt_fog;
38
bool opt_texture_edge;
39
bool opt_noise;
40
bool used_textures[2];
41
int num_inputs;
42
bool do_single[2];
43
bool do_multiply[2];
44
bool do_mix[2];
45
bool color_alpha_same;
46
};
47
48
#ifdef __cplusplus
49
extern "C" {
50
#endif
51
52
void gfx_cc_get_features(uint32_t shader_id, struct CCFeatures *cc_features);
53
54
#ifdef __cplusplus
55
}
56
#endif
57
58
#endif
59
60