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

VidMode.c File Reference

#include <assert.h>
#include "VidMode.h"

Go to the source code of this file.

Defines

#define WIDTH(V)   ((V)>>16)
#define HEIGHT(V)   ((V)&0xFFFF)
#define PACK(W, H)   (((W)<<16) + (H))

Functions

void VidMode_GetResolution (const VidMode V, int *Width, int *Height)
geBoolean VidMode_SetResolution (VidMode *V, int Width, int Height)


Define Documentation

#define HEIGHT V   )     ((V)&0xFFFF)
 

Definition at line 23 of file VidMode.c.

Referenced by VidMode_GetResolution(), and WriteBMP().

#define PACK W,
 )     (((W)<<16) + (H))
 

Definition at line 24 of file VidMode.c.

Referenced by VidMode_SetResolution().

#define WIDTH V   )     ((V)>>16)
 

Definition at line 22 of file VidMode.c.

Referenced by VidMode_GetResolution(), and WriteBMP().


Function Documentation

void VidMode_GetResolution const VidMode  V,
int *  Width,
int *  Height
 

Definition at line 26 of file VidMode.c.

References HEIGHT, NULL, V, and WIDTH.

Referenced by Client_CreateStatusBar(), GameMgr_SetWorld(), Host_Create(), PrintClientScores(), PrintCrossHair(), RenderWorld(), SetupConsole(), and WinMain().

00027 {
00028         int W,H;
00029         assert( Width  != NULL );
00030         assert( Height != NULL );
00031         W = WIDTH(V);
00032         H = HEIGHT(V);
00033         
00034         assert( W >= 320  );
00035         assert( W <  8000 );
00036         assert( H >= 200  );
00037         assert( H <  8000 ); 
00038 
00039         *Width = W;
00040         *Height = H;
00041 }

geBoolean VidMode_SetResolution VidMode V,
int  Width,
int  Height
 

Definition at line 43 of file VidMode.c.

References GE_FALSE, GE_TRUE, geBoolean, NULL, PACK, and V.

Referenced by GameMgr_SetDriverAndMode().

00044 {
00045         assert( V != NULL );
00046         
00047         if      (               ( Width  < 320  ) 
00048                         ||  ( Width  > 8000 ) 
00049                         ||  ( Height < 200  ) 
00050                         ||  ( Height > 8000 )
00051                 )
00052                 return GE_FALSE;
00053         
00054         *V = PACK(Width,Height);
00055         return GE_TRUE;
00056 }


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