1 /* 2 This file is part of Warzone 2100. 3 Copyright (C) 1999-2004 Eidos Interactive 4 Copyright (C) 2005-2020 Warzone 2100 Project 5 6 Warzone 2100 is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2 of the License, or 9 (at your option) any later version. 10 11 Warzone 2100 is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with Warzone 2100; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 19 */ 20 /***************************************************************************/ 21 /* 22 * pieTypes.h 23 * 24 * type defines for simple pies. 25 * 26 */ 27 /***************************************************************************/ 28 29 #ifndef _pieTypes_h 30 #define _pieTypes_h 31 32 #include "lib/framework/frame.h" 33 #include "lib/framework/vector.h" 34 35 /***************************************************************************/ 36 /* 37 * Global Definitions (CONSTANTS) 38 */ 39 /***************************************************************************/ 40 #define LONG_WAY (1<<15) 41 #define BUTTON_DEPTH 2000 // will be stretched to 16000 42 43 #define OLD_TEXTURE_SIZE_FIX 256.0f 44 45 //Render style flags for all pie draw functions 46 #define pie_ECM 0x1 47 #define pie_TRANSLUCENT 0x2 48 #define pie_ADDITIVE 0x4 49 #define pie_FORCE_FOG 0x8 50 #define pie_HEIGHT_SCALED 0x10 51 #define pie_RAISE 0x20 52 #define pie_BUTTON 0x40 53 #define pie_SHADOW 0x80 54 #define pie_STATIC_SHADOW 0x100 55 #define pie_PREMULTIPLIED 0x200 56 57 #define pie_RAISE_SCALE 256 58 59 enum LIGHTING_TYPE 60 { 61 LIGHT_EMISSIVE, 62 LIGHT_AMBIENT, 63 LIGHT_DIFFUSE, 64 LIGHT_SPECULAR, 65 LIGHT_MAX 66 }; 67 68 enum REND_MODE 69 { 70 REND_ALPHA, 71 REND_ADDITIVE, 72 REND_OPAQUE, 73 REND_MULTIPLICATIVE, 74 REND_PREMULTIPLIED, 75 REND_TEXT, 76 }; 77 78 enum DEPTH_MODE 79 { 80 DEPTH_CMP_LEQ_WRT_ON, 81 DEPTH_CMP_LEQ_WRT_OFF, 82 DEPTH_CMP_ALWAYS_WRT_ON, 83 DEPTH_CMP_ALWAYS_WRT_OFF 84 }; 85 86 enum TEXPAGE_TYPE 87 { 88 TEXPAGE_NONE = -1, 89 TEXPAGE_EXTERN = -2 90 }; 91 92 enum SHADER_MODE 93 { 94 SHADER_NONE, 95 SHADER_COMPONENT, 96 SHADER_BUTTON, 97 SHADER_NOLIGHT, 98 SHADER_TERRAIN, 99 SHADER_TERRAIN_DEPTH, 100 SHADER_DECALS, 101 SHADER_WATER, 102 SHADER_RECT, 103 SHADER_TEXRECT, 104 SHADER_GFX_COLOUR, 105 SHADER_GFX_TEXT, 106 SHADER_GENERIC_COLOR, 107 SHADER_LINE, 108 SHADER_TEXT, 109 SHADER_MAX 110 }; 111 112 //************************************************************************* 113 // 114 // Simple derived types 115 // 116 //************************************************************************* 117 118 struct iV_Image 119 { 120 unsigned int width, height, depth; 121 unsigned char *bmp; 122 }; 123 124 struct PIELIGHTBYTES 125 { 126 uint8_t r, g, b, a; 127 }; 128 129 /** Our basic colour type. Use whenever you want to define a colour. 130 * Set bytes separetely, and do not assume a byte order between the components. */ 131 union PIELIGHT 132 { 133 PIELIGHTBYTES byte; 134 UDWORD rgba; 135 UBYTE vector[4]; 136 }; 137 138 #endif // _pieTypes_h 139