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

Go to the documentation of this file.
00001 /***************************************************************************
00002                           common.h  -  description
00003                              -------------------
00004     begin                : Fri Aug 24 2001
00005     copyright            : (C) 2001 by upi
00006     email                : upi@apocalypse.rulez.org
00007  ***************************************************************************/
00008 
00009 #ifndef __COMMON_H
00010 #define __COMMON_H
00011 
00012 
00013 #ifndef _SDL_types_h
00014 #include "SDL_types.h"
00015 #endif
00016 
00017 #define MAXPLAYERS 4
00018 
00019 
00020 void debug( const char* format, ... );
00021 #ifndef ABS
00022 #define ABS(A) ( (A>=0) ? (A) : -(A) )
00023 #endif
00024 #ifndef MAX
00025 #define MAX(A,B) ( (A) > (B) ? (A) : (B) )
00026 #endif
00027 #ifndef MIN
00028 #define MIN(A,B) ( (A) < (B) ? (A) : (B) )
00029 #endif
00030 
00031 // -----------------------------------------------------------------------
00032 // Main program methods
00033 // -----------------------------------------------------------------------
00034 
00035 void DoMenu();
00036 void GameOver( int a_iPlayerWon );
00037 void DoDemos();
00038 int  DoGame( char* replay, bool isReplay, bool bDebug );
00039 void DoOnlineChat();
00040 
00041 // -----------------------------------------------------------------------
00042 // Other subroutines
00043 // -----------------------------------------------------------------------
00044 
00045 bool Connect( const char* a_pcHostname );
00046 
00047 const char* Translate( const char* a_pcText );
00048 const char* TranslateUTF8( const char* a_pcText );
00049 
00050 // -----------------------------------------------------------------------
00051 // Global variables
00052 // -----------------------------------------------------------------------
00053 
00054 struct SDL_Surface;
00055 extern SDL_Surface* gamescreen;
00056 
00057 extern Uint32 C_BLACK;
00058 extern Uint32 C_BLUE;
00059 extern Uint32 C_GREEN;
00060 extern Uint32 C_CYAN;
00061 
00062 extern Uint32 C_RED;
00063 extern Uint32 C_MAGENTA;
00064 extern Uint32 C_ORANGE;
00065 extern Uint32 C_LIGHTGRAY;
00066 
00067 extern Uint32 C_DARKGRAY;
00068 extern Uint32 C_LIGHTBLUE;
00069 extern Uint32 C_LIGHTGREEN;
00070 extern Uint32 C_LIGHTCYAN;
00071 
00072 extern Uint32 C_LIGHTRED;
00073 extern Uint32 C_LIGHTMAGENTA;
00074 extern Uint32 C_YELLOW;
00075 extern Uint32 C_WHITE;
00076 
00077 
00078 #endif