00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef REGISTER_H
00023 #define REGISTER_H
00024
00025 #include <Windows.h>
00026
00027 #include "ddraw.h"
00028
00029 #include "DCommon.h"
00030
00031 #define MAX_TEXTURE_HANDLES 15000
00032
00033
00034 #define THANDLE_UPDATE (1<<0) // Force a thandle to be uploaded to the card
00035 #define THANDLE_TRANS (1<<2) // Texture has transparency
00036 #define THANDLE_LOCKED (1<<3) // THandle is currently locked (invalid for rendering etc)
00037
00038 typedef struct geRDriver_THandle
00039 {
00040 int32 Active, Width, Height, MipLevels;
00041 geRDriver_PixelFormat PixelFormat;
00042 uint16 *BitPtr[16];
00043 geRDriver_THandle *PalHandle;
00044 geRDriver_THandle *AlphaHandle;
00045
00046 uint32 Flags;
00047 } geRDriver_THandle;
00048
00049 extern geRDriver_THandle TextureHandles[MAX_TEXTURE_HANDLES];
00050
00051 geBoolean DRIVERCC DrvResetAll(void);
00052 geRDriver_THandle *DRIVERCC CreateTexture(int32 Width, int32 Height, int32 NumMipLevels, const geRDriver_PixelFormat *PixelFormat);
00053 geBoolean DRIVERCC DestroyTexture(geRDriver_THandle *THandle);
00054
00055 geBoolean DRIVERCC LockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel, void **Data);
00056 geBoolean DRIVERCC UnLockTextureHandle(geRDriver_THandle *THandle, int32 MipLevel);
00057 geBoolean DRIVERCC THandle_GetInfo(geRDriver_THandle *THandle, int32 MipLevel, geRDriver_THandleInfo *Info);
00058
00059 geBoolean DRIVERCC SetPalette(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);
00060 geRDriver_THandle *DRIVERCC GetPalette(geRDriver_THandle *THandle);
00061 geBoolean DRIVERCC SetAlpha(geRDriver_THandle *THandle, geRDriver_THandle *PalHandle);
00062 geRDriver_THandle *DRIVERCC GetAlpha(geRDriver_THandle *THandle);
00063
00064 #endif