00001 /****************************************************************************************/ 00002 /* WBitmap.h */ 00003 /* */ 00004 /* Author: John Pollard */ 00005 /* Description: Creates geBitmaps from the data in the BSP, that are used to render */ 00006 /* */ 00007 /* The contents of this file are subject to the Genesis3D Public License */ 00008 /* Version 1.01 (the "License"); you may not use this file except in */ 00009 /* compliance with the License. You may obtain a copy of the License at */ 00010 /* http://www.genesis3d.com */ 00011 /* */ 00012 /* Software distributed under the License is distributed on an "AS IS" */ 00013 /* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See */ 00014 /* the License for the specific language governing rights and limitations */ 00015 /* under the License. */ 00016 /* */ 00017 /* The Original Code is Genesis3D, released March 25, 1999. */ 00018 /* Genesis3D Version 1.1 released November 15, 1999 */ 00019 /* Copyright (C) 1999 WildTangent, Inc. All Rights Reserved */ 00020 /* */ 00021 /****************************************************************************************/ 00022 #ifndef WBITMAP_H 00023 #define WBITMAP_H 00024 00025 #include <Assert.h> 00026 00027 #include "BaseType.h" 00028 #include "GBSPFile.h" 00029 #include "Bitmap.h" 00030 00031 #ifdef __cplusplus 00032 extern "C" { 00033 #endif 00034 00035 //== 00036 // This stuff should really go in GBSPFile.h... 00037 #define TEXTURE_SKYBOX (1<<0) // This is a skybox texture 00038 00039 // TexInfo Flags (Global shared info about each surface) 00040 #define TEXINFO_MIRROR (1<<0) 00041 #define TEXINFO_FULLBRIGHT (1<<1) // No lightmap/fullbright 00042 #define TEXINFO_SKY (1<<2) // Sky face 00043 #define TEXINFO_LIGHT (1<<3) // Face produces light 00044 #define TEXINFO_TRANS (1<<4) // Face has transparency 00045 #define TEXINFO_GOURAUD (1<<5) 00046 #define TEXINFO_FLAT (1<<6) 00047 #define TEXINFO_NO_LIGHTMAP (1<<15) 00048 //== 00049 00050 //================================================================================ 00051 // #defs 00052 //================================================================================ 00053 #define WBITMAP_SKYBOX (1<<0) // This is a skybox wbitmap 00054 00055 //================================================================================ 00056 // Structure defines 00057 //================================================================================ 00058 typedef struct geWBitmap geWBitmap; 00059 typedef struct geWBitmap_Pool geWBitmap_Pool; 00060 00061 //================================================================================ 00062 // Function defines 00063 //================================================================================ 00064 geWBitmap_Pool *geWBitmap_Pool_Create(GBSP_BSPData *BSPData); 00065 void geWBitmap_Pool_Destroy(geWBitmap_Pool *Pool); 00066 int32 geWBitmap_Pool_GetWBitmapCount(geWBitmap_Pool *Pool); 00067 geWBitmap *geWBitmap_Pool_GetWBitmapByBitmap(geWBitmap_Pool *Pool, const geBitmap *Bitmap); 00068 geWBitmap *geWBitmap_Pool_GetWBitmapByIndex(geWBitmap_Pool *Pool, int32 Index); 00069 geBitmap *geWBitmap_Pool_GetBitmapByIndex(geWBitmap_Pool *Pool, int32 Index); 00070 geBitmap *geWBitmap_Pool_GetBitmapByName(geWBitmap_Pool *Pool, const char *BitmapName); 00071 geBoolean geWBitmap_Pool_CreateAllWBitmaps(geWBitmap_Pool *Pool, GBSP_BSPData *BSPData); 00072 void geWBitmap_Pool_DestroyAllWBitmaps(geWBitmap_Pool *Pool); 00073 uint32 geWBitmap_GetFlags(geWBitmap *WBitmap); 00074 geBitmap *geWBitmap_GetBitmap(geWBitmap *WBitmap); 00075 int32 geWBitmap_GetVisFrame(geWBitmap *WBitmap); 00076 geBoolean geWBitmap_SetVisFrame(geWBitmap *WBitmap, int32 VisFrame); 00077 00078 // changed texture name 00079 char *geWBitmap_Pool_GetWNameByBitmap(geWBitmap_Pool *Pool, const geBitmap *Bitmap); 00080 // end change texture name 00081 00082 #ifdef __cplusplus 00083 } 00084 #endif 00085 00086 #endif
1.3.2