FS2_Open
Open source remastering of the Freespace 2 engine
grinternal.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) Volition, Inc. 1999. All rights reserved.
3  *
4  * All source code herein is the property of Volition, Inc. You may not sell
5  * or otherwise commercially exploit the source or things you created based on the
6  * source.
7  *
8 */
9 
10 
11 #ifndef _GRINTERNAL_H
12 #define _GRINTERNAL_H
13 
14 #include "globalincs/globals.h" // just in case pstypes.h messed up
15 #include "globalincs/pstypes.h" // IAM_64BIT
16 #include "graphics/2d.h"
17 #include "graphics/font.h"
18 
19 extern int Gr_cursor;
20 extern int Gr_cursor_size;
21 
22 extern ubyte Gr_original_palette[768]; // The palette
23 extern ubyte Gr_current_palette[768];
24 
25 extern char Gr_current_palette_name[128];
26 
27 typedef struct color_gun {
28  int bits;
29  int shift;
30  int scale;
31  int mask;
32 } color_gun;
33 
34 // screen format
36 
37 // texture format
39 
40 // alpha texture format
42 
43 // CURRENT FORMAT - note - this is what bmpman uses when fiddling with pixels/colors. so be sure its properly set to one
44 // of the above values
46 
47 extern float Gr_gamma;
48 extern int Gr_gamma_int;
49 
50 #define TCACHE_TYPE_AABITMAP 0 // HUD bitmap. All Alpha.
51 #define TCACHE_TYPE_NORMAL 1 // Normal bitmap. Alpha = 0.
52 #define TCACHE_TYPE_XPARENT 2 // Bitmap with 0,255,0 = transparent. Alpha=0 if transparent, 1 if not.
53 #define TCACHE_TYPE_INTERFACE 3 // for graphics that are using in the interface (for special filtering or sizing)
54 #define TCACHE_TYPE_COMPRESSED 4 // Compressed bitmap type (DXT1, DXT3, DXT5)
55 #define TCACHE_TYPE_CUBEMAP 5
56 
57 #define NEBULA_COLORS 20
58 
59 typedef enum gr_texture_source {
65 
66 typedef enum gr_alpha_blend {
67  ALPHA_BLEND_NONE, // 1*SrcPixel + 0*DestPixel
68  ALPHA_BLEND_ADDITIVE, // 1*SrcPixel + 1*DestPixel
69  ALPHA_BLEND_ALPHA_ADDITIVE, // Alpha*SrcPixel + 1*DestPixel
70  ALPHA_BLEND_ALPHA_BLEND_ALPHA, // Alpha*SrcPixel + (1-Alpha)*DestPixel
71  ALPHA_BLEND_ALPHA_BLEND_SRC_COLOR, // Alpha*SrcPixel + (1-SrcPixel)*DestPixel
72  ALPHA_BLEND_PREMULTIPLIED // 1*SrcPixel + (1-Alpha)*DestPixel
74 
75 typedef enum gr_zbuffer_type {
82 
83 typedef enum gr_stencil_type {
88 
89 #endif
int bits
Definition: grinternal.h:28
color_gun Gr_t_blue
Definition: 2d.cpp:49
float Gr_gamma
Definition: 2d.cpp:67
gr_texture_source
Definition: grinternal.h:59
color_gun Gr_ta_red
Definition: 2d.cpp:50
int shift
Definition: grinternal.h:29
gr_stencil_type
Definition: grinternal.h:83
gr_alpha_blend
Definition: grinternal.h:66
int Gr_gamma_int
Definition: 2d.cpp:68
char Gr_current_palette_name[128]
Definition: 2d.cpp:56
color_gun Gr_alpha
Definition: 2d.cpp:48
color_gun Gr_ta_alpha
Definition: 2d.cpp:50
color_gun Gr_t_alpha
Definition: 2d.cpp:49
int Gr_cursor_size
Definition: 2d.cpp:61
int Gr_cursor
Definition: 2d.cpp:59
color_gun Gr_t_red
Definition: 2d.cpp:49
int mask
Definition: grinternal.h:31
color_gun Gr_green
Definition: 2d.cpp:48
color_gun * Gr_current_blue
Definition: 2d.cpp:51
gr_zbuffer_type
Definition: grinternal.h:75
int scale
Definition: grinternal.h:30
unsigned char ubyte
Definition: pstypes.h:62
color_gun Gr_blue
Definition: 2d.cpp:48
color_gun * Gr_current_alpha
Definition: 2d.cpp:51
struct color_gun color_gun
color_gun * Gr_current_green
Definition: 2d.cpp:51
color_gun Gr_ta_blue
Definition: 2d.cpp:50
color_gun * Gr_current_red
Definition: 2d.cpp:51
color_gun Gr_red
Definition: 2d.cpp:48
ubyte Gr_original_palette[768]
Definition: 2d.cpp:54
color_gun Gr_t_green
Definition: 2d.cpp:49
ubyte Gr_current_palette[768]
Definition: 2d.cpp:55
color_gun Gr_ta_green
Definition: 2d.cpp:50