Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

SOFTDRV.H File Reference

#include "DCommon.h"
#include "ddraw.h"

Go to the source code of this file.

Compounds

struct  CPUInfoTag
struct  VidEnumInfoTag
struct  VidModeListTag

Typedefs

typedef VidModeListTag VidModeList
typedef VidEnumInfoTag VidEnumInfo
typedef CPUInfoTag CPUInfo

Enumerations

enum  VidSurfFlags {
  SYSTEM = 1, VIDEO = 2, HARDWARE = 4, DMABLT = 8,
  FASTBLT = 16, SAFEBLT = 32, FLIP = 64, DMAPAGELOCKREQUIRED = 128,
  DMAASYNCH = 256, STRETCHMODE = 512, MODEXMODE = 1024
}

Functions

BOOL DRIVERCC DrvShutdown (void)
void DRIVERCC ErrorBox (char *Str)
void SetLastDrvError (S32 Error, char *ErrorStr)
void ErrorPrintf (char *text,...)
void DumpErrorLogToFile (char *fname)

Variables

DRV_Window ClientWindow
DRV_Driver SOFTDRV
DRV_CacheInfo CacheInfo


Typedef Documentation

typedef struct CPUInfoTag CPUInfo
 

typedef struct VidEnumInfoTag VidEnumInfo
 

typedef struct VidModeListTag VidModeList
 


Enumeration Type Documentation

enum VidSurfFlags
 

Enumeration values:
SYSTEM 
VIDEO 
HARDWARE 
DMABLT 
FASTBLT 
SAFEBLT 
FLIP 
DMAPAGELOCKREQUIRED 
DMAASYNCH 
STRETCHMODE 
MODEXMODE 

Definition at line 37 of file SOFTDRV.H.

00038 {
00039         SYSTEM                          =1,     //store buffer in system
00040         VIDEO                           =2,     //or video ram
00041         HARDWARE                        =4,     //refresh choices
00042         DMABLT                          =8,
00043         FASTBLT                         =16,
00044         SAFEBLT                         =32,
00045         FLIP                            =64,
00046         DMAPAGELOCKREQUIRED     =128,//pagelock for dma req
00047         DMAASYNCH                       =256,//can do asynch dma
00048         STRETCHMODE                     =512,//stretch to fit
00049         MODEXMODE                       =1024
00050 };


Function Documentation

BOOL DRIVERCC DrvShutdown void   ) 
 

Definition at line 58 of file GlideDrv.c.

00059 {
00060         GMain_Shutdown();
00061 
00062         return TRUE;
00063 }

void DumpErrorLogToFile char *  fname  ) 
 

Definition at line 821 of file softdrv.c.

References buffer.

Referenced by BeginScene(), DrvInit(), DrvShutdown(), and ErrorBox().

00822 {
00823         FILE            *f;
00824         SYSTEMTIME      Time;
00825 
00826         f       =fopen(fname, "a+t");
00827 
00828         if(f)
00829         {
00830                 GetSystemTime(&Time);
00831 
00832                 fprintf(f,"=================================================================\n");
00833                 fprintf(f,"Time: %2i:%2i:%2i\n", Time.wHour, Time.wMinute, Time.wSecond);
00834                 fprintf(f,"Date: %2i-%2i-%4i\n", Time.wMonth, Time.wDay, Time.wYear);
00835 
00836                 fwrite(buffer, 1, strlen(buffer), f);
00837                 fclose(f);
00838         }
00839 }

void DRIVERCC ErrorBox char *  Str  ) 
 

Definition at line 230 of file softdrv.c.

00231 {
00232         DrvShutdown();
00233         DumpErrorLogToFile("softdrv.log");
00234 }

void ErrorPrintf char *  text,
... 
 

Definition at line 810 of file softdrv.c.

References buf3, and buffer.

Referenced by DDrawBlitDecal(), DDrawBlitDecalToFront(), DDrawDriverEnumCallbackEx(), DoDDrawInit(), DoEnumeration(), DoModeEnumeration(), DrvSetActive(), GetCPUInfo(), LockDDrawBackBuffer(), RefreshDDraw(), RestoreAll(), and UnlockDDrawBackBuffer().

00811 {
00812         va_list argptr;
00813 
00814         va_start(argptr,text);
00815         vsprintf(buf3, text,argptr);
00816         va_end(argptr);
00817 
00818         strcat(buffer, buf3);
00819 }

void SetLastDrvError S32  Error,
char *  ErrorStr
 

Definition at line 343 of file softdrv.c.

References Error, DRV_Driver::LastError, LastError, DRV_Driver::LastErrorStr, LastErrorStr, and SOFTDRV.

00344 {
00345         LastError = Error;
00346         
00347         if (ErrorStr)
00348         {
00349                 strcpy(LastErrorStr, ErrorStr);
00350         }
00351         else
00352                 LastErrorStr[0] = 0;
00353 
00354         SOFTDRV.LastErrorStr = LastErrorStr;
00355         SOFTDRV.LastError = LastError;
00356 }


Variable Documentation

DRV_CacheInfo CacheInfo
 

Definition at line 35 of file SOFTDRV.H.

DRV_Window ClientWindow
 

Definition at line 31 of file SOFTDRV.H.

DRV_Driver SOFTDRV
 

Definition at line 34 of file SOFTDRV.H.


Generated on Tue Sep 30 12:38:07 2003 for GTestAndEngine by doxygen 1.3.2