OpenMortal Apocalypse mirror
Sourceforge mirror
SourceForge.net Logo
      News | Info | Characters | Arenas | Screenshots | Forums | Download  
Developer: Making of | Character-HOWTO | AI Design | Submit a Character
Documentation: Main Page | Modules | Class Hierarchy | Class List | File List

common.h File Reference

#include "SDL_types.h"

Go to the source code of this file.

Defines

#define MAXPLAYERS   4
#define ABS(A)   ( (A>=0) ? (A) : -(A) )
#define MAX(A, B)   ( (A) > (B) ? (A) : (B) )
#define MIN(A, B)   ( (A) < (B) ? (A) : (B) )

Functions

void debug (const char *format,...)
void DoMenu ()
void GameOver (int a_iPlayerWon)
void DoDemos ()
int DoGame (char *replay, bool isReplay, bool bDebug)
 Public static function.
void DoOnlineChat ()
 Static global entry point for chatting.
bool Connect (const char *a_pcHostname)
const char * Translate (const char *a_pcText)
const char * TranslateUTF8 (const char *a_pcText)

Variables

SDL_Surface * gamescreen
Uint32 C_BLACK
Uint32 C_BLUE
Uint32 C_GREEN
Uint32 C_CYAN
Uint32 C_RED
Uint32 C_MAGENTA
Uint32 C_ORANGE
Uint32 C_LIGHTGRAY
Uint32 C_DARKGRAY
Uint32 C_LIGHTBLUE
Uint32 C_LIGHTGREEN
Uint32 C_LIGHTCYAN
Uint32 C_LIGHTRED
Uint32 C_LIGHTMAGENTA
Uint32 C_YELLOW
Uint32 C_WHITE


Define Documentation

#define ABS  )     ( (A>=0) ? (A) : -(A) )
 

#define MAX A,
 )     ( (A) > (B) ? (A) : (B) )
 

#define MAXPLAYERS   4
 

#define MIN A,
 )     ( (A) < (B) ? (A) : (B) )
 


Function Documentation

bool Connect const char *  a_pcHostname  ) 
 

void debug const char *  format,
  ...
 

void DoDemos  ) 
 

int DoGame char *  a_pcReplayFile,
bool  a_bIsReplay,
bool  a_bDebug
 

Public static function.

Other parts of OpenMortal need not include "Game.h" so long as they have the definition of this method (defined in "common.h"). The method runs a cycle of the game (either a normal game, or replay).

In replay mode, DoReplay() is called, and the replay file is required. In normal mode, Run() is called. The replay file is recorded, if it is not NULL.

void DoMenu  ) 
 

void DoOnlineChat  ) 
 

Static global entry point for chatting.

void GameOver int  a_iPlayerWon  ) 
 

const char* Translate const char *  a_pcText  ) 
 

const char* TranslateUTF8 const char *  a_pcText  ) 
 


Variable Documentation

Uint32 C_BLACK
 

Uint32 C_BLUE
 

Uint32 C_CYAN
 

Uint32 C_DARKGRAY
 

Uint32 C_GREEN
 

Uint32 C_LIGHTBLUE
 

Uint32 C_LIGHTCYAN
 

Uint32 C_LIGHTGRAY
 

Uint32 C_LIGHTGREEN
 

Uint32 C_LIGHTMAGENTA
 

Uint32 C_LIGHTRED
 

Uint32 C_MAGENTA
 

Uint32 C_ORANGE
 

Uint32 C_RED
 

Uint32 C_WHITE
 

Uint32 C_YELLOW
 

struct SDL_Surface* gamescreen