- GBPSLib compiles now with the final filestrutcure of G3D
[genesis3d.git] / G3D / Drivers / SoftDrv / REGISTER.H
1 /****************************************************************************************/\r
2 /*  register.h                                                                          */\r
3 /*                                                                                      */\r
4 /*  Author:       John Pollard, Ken Baird                                               */\r
5 /*  Description:  Texture Handle code header file                                       */\r
6 /*                                                                                      */\r
7 /*  The contents of this file are subject to the Genesis3D Public License               */\r
8 /*  Version 1.01 (the "License"); you may not use this file except in                   */\r
9 /*  compliance with the License. You may obtain a copy of the License at                */\r
10 /*  http://www.genesis3d.com                                                            */\r
11 /*                                                                                      */\r
12 /*  Software distributed under the License is distributed on an "AS IS"                 */\r
13 /*  basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.  See                */\r
14 /*  the License for the specific language governing rights and limitations              */\r
15 /*  under the License.                                                                  */\r
16 /*                                                                                      */\r
17 /*  The Original Code is Genesis3D, released March 25, 1999.                            */\r
18 /*  Genesis3D Version 1.1 released November 15, 1999                                 */\r
19 /*  Copyright (C) 1999 WildTangent, Inc. All Rights Reserved           */\r
20 /*                                                                                      */\r
21 /****************************************************************************************/\r
22 #ifndef REGISTER_H\r
23 #define REGISTER_H\r
24 \r
25 #include <Windows.h>\r
26 \r
27 #include "ddraw.h"\r
28 \r
29 #include "DCommon.h"\r
30 \r
31 #define MAX_TEXTURE_HANDLES             15000\r
32 \r
33 // THandle flags\r
34 #define THANDLE_UPDATE          (1<<0)          // Force a thandle to be uploaded to the card\r
35 #define THANDLE_TRANS           (1<<2)          // Texture has transparency\r
36 #define THANDLE_LOCKED          (1<<3)          // THandle is currently locked (invalid for rendering etc)\r
37 \r
38 typedef struct geRDriver_THandle\r
39 {\r
40         int32                                           Active, Width, Height, MipLevels;\r
41         geRDriver_PixelFormat   PixelFormat;\r
42         uint16                                          *BitPtr[16];//8 or 16\r
43         geRDriver_THandle               *PalHandle;\r
44         geRDriver_THandle               *AlphaHandle;\r
45 \r
46         uint32                                          Flags;\r
47 } geRDriver_THandle;\r
48 \r
49 extern  geRDriver_THandle       TextureHandles[MAX_TEXTURE_HANDLES];\r
50 \r
51 geBoolean                       DRIVERCC        DrvResetAll(void);\r
52 geRDriver_THandle       *DRIVERCC       CreateTexture(int32 Width, int32 Height, int32 NumMipLevels, const geRDriver_PixelFormat *PixelFormat);\r
53 geBoolean                       DRIVERCC        DestroyTexture(geRDriver_THandle *THandle);\r
54 \r
55 geBoolean                       DRIVERCC        LockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel, void **Data);\r
56 geBoolean                       DRIVERCC        UnLockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel);\r
57 geBoolean                       DRIVERCC        THandle_GetInfo(geRDriver_THandle *THandle, int32 MipLevel, geRDriver_THandleInfo *Info);\r
58 \r
59 geBoolean                       DRIVERCC        SetPalette(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);\r
60 geRDriver_THandle       *DRIVERCC       GetPalette(geRDriver_THandle *THandle);\r
61 geBoolean                       DRIVERCC        SetAlpha(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);\r
62 geRDriver_THandle       *DRIVERCC       GetAlpha(geRDriver_THandle *THandle);\r
63 \r
64 #endif