#include <Windows.h>#include "DCommon.h"#include "GlideDrv.h"#include "GMain.h"#include "Glide.h"#include "GTHandle.h"#include "Render.h"Go to the source code of this file.
Defines | |
| #define | ENABLE_WIREFRAME |
| #define | NUM_PIXEL_FORMATS (sizeof(PixelFormats)/sizeof(geRDriver_PixelFormat)) |
Functions | |
| geBoolean DRIVERCC | DrvInit (DRV_DriverHook *Hook) |
| geBoolean DRIVERCC | DrvShutdown (void) |
| geBoolean DRIVERCC | DrvResetAll (void) |
| geBoolean DRIVERCC | SetGamma (geFloat Gamma) |
| geBoolean DRIVERCC | GetGamma (geFloat *Gamma) |
| geBoolean DRIVERCC | EnumModes (int32 Driver, char *DriverName, DRV_ENUM_MODES_CB *Cb, void *Context) |
| geBoolean DRIVERCC | EnumSubDrivers (DRV_ENUM_DRV_CB *Cb, void *Context) |
| geBoolean DRIVERCC | EnumPixelFormats (DRV_ENUM_PFORMAT_CB *Cb, void *Context) |
| geBoolean DRIVERCC | DrvUpdateWindow (void) |
| geBoolean DRIVERCC | DrvSetActive (geBoolean Active) |
| DllExport geBoolean | DriverHook (DRV_Driver **Driver) |
| void | SetLastDrvError (int32 Error, char *ErrorStr) |
Variables | |
| int32 | LastError |
| char | LastErrorStr [255] |
| geFloat | CurrentGamma |
| DRV_EngineSettings | EngineSettings |
| geRDriver_PixelFormat | PixelFormats [] |
| DRV_Driver | GLIDEDRV |
|
|
Definition at line 37 of file GlideDrv.c. |
|
|
Definition at line 164 of file GlideDrv.c. |
|
|
Definition at line 261 of file GlideDrv.c. References DRV_EngineSettings::CanSupportFlags, DllExport, DRV_ERROR_NONE, DRV_SUPPORT_ALPHA, DRV_SUPPORT_COLORKEY, DRV_Driver::EngineSettings, EngineSettings, FALSE, geBoolean, GLIDEDRV, LastErrorStr, DRV_Driver::LastErrorStr, DRV_EngineSettings::PreferenceFlags, SetLastDrvError(), and TRUE.
00262 {
00263 GrHwConfiguration g;
00264 FxBool b;
00265
00266 EngineSettings.CanSupportFlags = (DRV_SUPPORT_ALPHA | DRV_SUPPORT_COLORKEY);
00267 EngineSettings.PreferenceFlags = 0;
00268
00269 GLIDEDRV.EngineSettings = &EngineSettings;
00270
00271 *Driver = &GLIDEDRV;
00272
00273 // Make sure the error string ptr is not null, or invalid!!!
00274 GLIDEDRV.LastErrorStr = LastErrorStr;
00275
00276 SetLastDrvError(DRV_ERROR_NONE, "GLIDE_DRV: No error.");
00277
00278 // query glide2x.dll for how many boards are installed
00279 b=grSstQueryBoards(&g);
00280
00281 return (b && g.num_sst)?TRUE:FALSE;
00282 }
|
|
|
Definition at line 41 of file GlideDrv.c. References DRIVERCC, geBoolean, GMain_Startup(), and uint32.
00042 {
00043 #ifdef ENABLE_WIREFRAME
00044 {
00045 // reset key states (compensate for windows bug)
00046 uint32 KeyState1, KeyState2;
00047 #pragma message("Glide : WireFrame enabled!")
00048 KeyState1 = GetAsyncKeyState(VK_CONTROL);
00049 KeyState2 = GetAsyncKeyState(VK_F8);
00050 }
00051 #endif
00052
00053 return GMain_Startup(Hook);
00054 }
|
|
|
Definition at line 67 of file GlideDrv.c. References DRIVERCC, geBoolean, and GMain_ResetAll().
00068 {
00069 return GMain_ResetAll();
00070 }
|
|
|
Definition at line 186 of file GlideDrv.c.
00187 {
00188 return GE_TRUE;
00189 }
|
|
|
Definition at line 58 of file GlideDrv.c.
00059 {
00060 GMain_Shutdown();
00061
00062 return TRUE;
00063 }
|
|
|
Definition at line 182 of file GlideDrv.c.
00183 {
00184 return GE_TRUE;
00185 }
|
|
||||||||||||||||||||
|
Definition at line 94 of file GlideDrv.c.
00095 {
00096 //if (!GMain_GetBoardInfo(&g_BoardInfo))
00097 // return GE_TRUE;
00098
00099 if (g_BoardInfo.MainRam == 0)
00100 return GE_TRUE; // No modes
00101
00102 if (g_BoardInfo.MainRam >= 1)
00103 {
00104 if (!Cb(0, "512x384", 512, 384, Context))
00105 return GE_TRUE;
00106 }
00107
00108 if (g_BoardInfo.MainRam >= 2)
00109 {
00110 if (!Cb(1, "640x480", 640, 480, Context))
00111 return GE_TRUE;
00112 }
00113
00114 if (g_BoardInfo.MainRam >= 4)
00115 {
00116 if (!Cb(2, "800x600", 800, 600, Context))
00117 return GE_TRUE;
00118 }
00119
00120 if (g_BoardInfo.MainRam > 4)
00121 {
00122 if (!Cb(3, "1024x768", 1024, 768, Context))
00123 return GE_TRUE;
00124 }
00125
00126 return GE_TRUE;
00127 }
|
|
||||||||||||
|
Definition at line 168 of file GlideDrv.c. References DRIVERCC, GE_TRUE, geBoolean, int32, NUM_PIXEL_FORMATS, and PixelFormats.
00169 {
00170 int32 i;
00171
00172 // Then hand them off to the caller
00173 for (i=0; i<NUM_PIXEL_FORMATS; i++)
00174 {
00175 if (!Cb(&PixelFormats[i], Context))
00176 return GE_TRUE;
00177 }
00178
00179 return GE_TRUE;
00180 }
|
|
||||||||||||
|
Definition at line 131 of file GlideDrv.c.
00132 {
00133 // Initialize the Glide library
00134 grGlideInit();
00135
00136 // Get the info about this board
00137 if (!GMain_GetBoardInfo(&g_BoardInfo))
00138 return GE_TRUE;
00139
00140 if (g_BoardInfo.MainRam == 0)
00141 return GE_TRUE; // No modes, so don't return any drivers
00142
00143 if (!Cb(0, "Glide Driver v"DRV_VMAJS"."DRV_VMINS".", Context))
00144 return GE_TRUE;
00145
00146 // Shutdown Glide library
00147 grGlideShutdown();
00148
00149 return GE_TRUE;
00150 }
|
|
|
Definition at line 84 of file GlideDrv.c. References DRIVERCC, geBoolean, and TRUE.
00085 {
00086 //*Gamma = CurrentGamma;
00087 *Gamma = 1.0f;
00088
00089 return TRUE;
00090 }
|
|
|
Definition at line 74 of file GlideDrv.c. References CurrentGamma, DRIVERCC, geBoolean, and TRUE.
00075 {
00076 CurrentGamma = Gamma;
00077
00078 //grGammaCorrectionValue(CurrentGamma);
00079 return TRUE;
00080 }
|
|
||||||||||||
|
Definition at line 286 of file GlideDrv.c. References Error, GLIDEDRV, DRV_Driver::LastError, LastError, DRV_Driver::LastErrorStr, and LastErrorStr.
00287 {
00288 LastError = Error;
00289
00290 if (ErrorStr)
00291 {
00292 strcpy(LastErrorStr, ErrorStr);
00293 }
00294 else
00295 LastErrorStr[0] = 0;
00296
00297 GLIDEDRV.LastErrorStr = LastErrorStr;
00298 GLIDEDRV.LastError = LastError;
00299 }
|
|
|
Definition at line 34 of file GlideDrv.c. Referenced by SetGamma(). |
|
|
Definition at line 36 of file GlideDrv.c. |
|
|
Definition at line 193 of file GlideDrv.c. Referenced by BeginScene(), BeginWorld(), DriverHook(), EndWorld(), Render_GouraudPoly(), Render_LinesPoly(), Render_WorldPoly(), and SetLastDrvError(). |
|
|
Definition at line 31 of file GlideDrv.c. |
|
|
Definition at line 32 of file GlideDrv.c. |
|
|
Initial value:
{
{GE_PIXELFORMAT_8BIT , RDRIVER_PF_3D | RDRIVER_PF_COMBINE_LIGHTMAP},
{GE_PIXELFORMAT_16BIT_4444_ARGB , RDRIVER_PF_3D | RDRIVER_PF_COMBINE_LIGHTMAP},
{GE_PIXELFORMAT_16BIT_565_RGB , RDRIVER_PF_3D | RDRIVER_PF_COMBINE_LIGHTMAP},
{GE_PIXELFORMAT_8BIT , RDRIVER_PF_3D},
{GE_PIXELFORMAT_16BIT_565_RGB , RDRIVER_PF_2D | RDRIVER_PF_CAN_DO_COLORKEY},
{GE_PIXELFORMAT_16BIT_565_RGB , RDRIVER_PF_LIGHTMAP},
{THANDLE_PALETTE_FORMAT , RDRIVER_PF_PALETTE},
{GE_PIXELFORMAT_16BIT_1555_ARGB , RDRIVER_PF_3D | RDRIVER_PF_COMBINE_LIGHTMAP},
}
Definition at line 152 of file GlideDrv.c. Referenced by EnumPixelFormats(), and Hack_FindPixelFormat(). |
1.3.2