- file renaming and includes done
[genesis3d.git] / G3D / Drivers / SoftDrv / SOFTDRV.H
1 /****************************************************************************************/\r
2 /*  softdrv.h                                                                           */\r
3 /*                                                                                      */\r
4 /*  Author:       John Pollard, Ken Baird                                               */\r
5 /*  Description:  header for softdrv                                                    */\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 SOFTDRV_H\r
23 #define SOFTDRV_H\r
24 \r
25 #include "DCommon.h"\r
26 #include "ddraw.h"\r
27 \r
28 #ifdef __cplusplus\r
29 extern "C" DRV_Window           ClientWindow;\r
30 #else\r
31 extern DRV_Window               ClientWindow;\r
32 #endif\r
33 \r
34 extern DRV_Driver                       SOFTDRV;\r
35 extern DRV_CacheInfo            CacheInfo;\r
36 \r
37 enum    VidSurfFlags\r
38 {\r
39         SYSTEM                          =1,     //store buffer in system\r
40         VIDEO                           =2,     //or video ram\r
41         HARDWARE                        =4,     //refresh choices\r
42         DMABLT                          =8,\r
43         FASTBLT                         =16,\r
44         SAFEBLT                         =32,\r
45         FLIP                            =64,\r
46         DMAPAGELOCKREQUIRED     =128,//pagelock for dma req\r
47         DMAASYNCH                       =256,//can do asynch dma\r
48         STRETCHMODE                     =512,//stretch to fit\r
49         MODEXMODE                       =1024\r
50 };\r
51 \r
52 typedef struct VidModeListTag\r
53 {\r
54         uint32  width;\r
55         uint32  height;\r
56         uint32  pitch;\r
57         uint32  flags;                          //capabilities\r
58         uint32  current;                        //caps in use\r
59         uint32  bpp;\r
60 }       VidModeList;\r
61 \r
62 typedef struct VidEnumInfoTag\r
63 {\r
64         DDDEVICEIDENTIFIER      DeviceInfo;\r
65         DDDEVICEIDENTIFIER      DeviceInfoHost;\r
66         GUID                            *DeviceGuid;\r
67         VidModeList                     VidModes[128];  //let's be safe\r
68         int                                     NumVidModes;\r
69         int                                     CurrentVidMode;\r
70         uint32                                  bpp;                    //bytes per pixel\r
71 }       VidEnumInfo;\r
72 \r
73 typedef struct  CPUInfoTag\r
74 {\r
75         uint32          MaxCPUIDVal;\r
76         char    VendorString[16];\r
77         char    ProcName[48];\r
78         uint32          ProcType;\r
79         uint32          ProcFamily;\r
80         uint32          ProcModel;\r
81         uint32          ProcStepping;\r
82         uint32          ProcSpeed;\r
83         BOOL    HasRDTSC;\r
84         BOOL    HasMMX;\r
85         BOOL    Has3DNow;\r
86         BOOL    HasFCMOV;\r
87 }       CPUInfo;\r
88 \r
89 BOOL DRIVERCC DrvShutdown(void);\r
90 void DRIVERCC ErrorBox(char *Str);\r
91 void SetLastDrvError(S32 Error, char *ErrorStr);\r
92 \r
93 #ifdef __cplusplus\r
94 extern "C" {\r
95 #endif\r
96 \r
97 void    ErrorPrintf(char *text, ...);\r
98 void    DumpErrorLogToFile(char *fname);\r
99 \r
100 #ifdef __cplusplus\r
101 }\r
102 #endif\r
103 \r
104 #endif