#ifndef BSPFILE_H #define BSPFILE_H #pragma once #ifndef MATHLIB_H #include "mathlib.h" #endif #include "vector4d.h" #include "datamap.h" #include "bumpvects.h" #include "compressed_light_cube.h" #define IDBSPHEADER (('P'<<24)+('S'<<16)+('B'<<8)+'V') #define MINBSPVERSION 19 #define BSPVERSION 21 #define MAX_BRUSH_LIGHTMAP_DIM_WITHOUT_BORDER 32 #define MAX_BRUSH_LIGHTMAP_DIM_INCLUDING_BORDER 35 #define MAX_DISP_LIGHTMAP_DIM_WITHOUT_BORDER 125 #define MAX_DISP_LIGHTMAP_DIM_INCLUDING_BORDER 128 #define MAX_LIGHTMAP_DIM_WITHOUT_BORDER MAX_DISP_LIGHTMAP_DIM_WITHOUT_BORDER #define MAX_LIGHTMAP_DIM_INCLUDING_BORDER MAX_DISP_LIGHTMAP_DIM_INCLUDING_BORDER #define MAX_LIGHTSTYLES 64 #define MIN_MAP_DISP_POWER 2 #define MAX_MAP_DISP_POWER 4 #define MAX_DISP_CORNER_NEIGHBORS 4 #define NUM_DISP_POWER_VERTS(power) ( ((1 << (power)) + 1) * ((1 << (power)) + 1) ) #define NUM_DISP_POWER_TRIS(power) ( (1 << (power)) * (1 << (power)) * 2 ) #if !defined( BSP_USE_LESS_MEMORY ) #define MAX_MAP_MODELS 1024 #define MAX_MAP_BRUSHES 8192 #define MAX_MAP_ENTITIES 16384 #define MAX_MAP_TEXINFO 12288 #define MAX_MAP_TEXDATA 2048 #define MAX_MAP_DISPINFO 2048 #define MAX_MAP_DISP_VERTS ( MAX_MAP_DISPINFO * ((1<> (16 - OVERLAY_RENDER_ORDER_NUM_BITS)); } struct doverlayfade_t { DECLARE_BYTESWAP_DATADESC(); float flFadeDistMinSq; float flFadeDistMaxSq; }; struct doverlaysystemlevel_t { DECLARE_BYTESWAP_DATADESC(); unsigned char nMinCPULevel; unsigned char nMaxCPULevel; unsigned char nMinGPULevel; unsigned char nMaxGPULevel; }; #define WATEROVERLAY_BSP_FACE_COUNT 256 #define WATEROVERLAY_RENDER_ORDER_NUM_BITS 2 #define WATEROVERLAY_NUM_RENDER_ORDERS (1<> (16 - WATEROVERLAY_RENDER_ORDER_NUM_BITS)); } #ifndef _DEF_BYTE_ #define _DEF_BYTE_ typedef unsigned char byte; typedef unsigned short word; #endif #define ANGLE_UP -1 #define ANGLE_DOWN -2 struct epair_t { epair_t* next; char* key; char* value; }; #define MAX_LIGHTMAPPAGE_WIDTH 256 #define MAX_LIGHTMAPPAGE_HEIGHT 128 typedef struct nameForDatadesc_dlightmappage_t { DECLARE_BYTESWAP_DATADESC(); byte data[MAX_LIGHTMAPPAGE_WIDTH * MAX_LIGHTMAPPAGE_HEIGHT]; byte palette[256 * 4]; } dlightmappage_t; typedef struct nameForDatadesc_dlightmappageinfo_t { DECLARE_BYTESWAP_DATADESC(); byte page; byte offset[2]; byte pad; ColorRGBExp32 avgColor; } dlightmappageinfo_t; #endif