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

main.cpp File Reference

#include "config.h"
#include "PlayerSelect.h"
#include "SDL_video.h"
#include "sge_tt_text.h"
#include "sge_bm_text.h"
#include "sge_surface.h"
#include "SDL.h"
#include "SDL_image.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <string>
#include "common.h"
#include "gfx.h"
#include "Audio.h"
#include "RlePack.h"
#include "Backend.h"
#include "State.h"
#include "FighterStats.h"
#include "MortalNetwork.h"

Defines

#define IS_GAME_MODE

Functions

void Complain (const char *a_pcError)
_sge_TTFont * LoadTTF (const char *a_pcFilename, int a_iSize)
sge_bmpFont * LoadBMPFont (const char *a_pcFilename)
int init ()
int init2 ()
int DrawMainScreen ()
int InitJoystick ()
void GameLoop ()
 The game loop consists of the following events:.
void ChatLoop ()
 The chat loop consists of:.
int main (int argc, char *argv[])

Variables

_sge_TTFont * inkFont
_sge_TTFont * impactFont
_sge_TTFont * titleFont
_sge_TTFont * chatFont
sge_bmpFont * fastFont
sge_bmpFont * creditsFont
sge_bmpFont * storyFont
bool bDebug = false
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
SDL_Color Colors []

Define Documentation

#define IS_GAME_MODE
 

Value:


Function Documentation

void ChatLoop  ) 
 

The chat loop consists of:.

  • DoOnlineChat
  • GameLoop (if a game was started
The loop ends if DoOnlineChat returns with a quit or disconnect (not IN_NETWORK mode).

void Complain const char *  a_pcError  ) 
 

int DrawMainScreen  ) 
 

void GameLoop  ) 
 

The game loop consists of the following events:.

  • Player selection
  • DoGame
  • GameOver and FighterStatsDemo (not in network mode)
The loop ends if the game mode changes to a non-game mode (e.g. IN_DEMO or IN_CHAT)

int init  ) 
 

int init2  ) 
 

int InitJoystick  ) 
 

sge_bmpFont* LoadBMPFont const char *  a_pcFilename  ) 
 

_sge_TTFont* LoadTTF const char *  a_pcFilename,
int  a_iSize
 

int main int  argc,
char *  argv[]
 


Variable Documentation

bool bDebug = false
 

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
 

_sge_TTFont* chatFont
 

SDL_Color Colors[]
 

Initial value:

{
   { 0,  0,  0,  0 },   { 0,  0,  42, 0 },   { 0,  42, 0,  0 },   { 0,  42, 42, 0 },
   { 42, 0,  0,  0 },   { 42, 0,  42, 0 },   { 63, 42, 0,  0 },   { 42, 42, 42, 0 },
   { 21, 21, 21, 0 },   { 21, 21, 63, 0 },   { 21, 63, 21, 0 },   { 21, 63, 63, 0 },
   { 63, 21, 21, 0 },   { 63, 21, 63, 0 },   { 63, 63, 21, 0 },   { 63, 63, 63, 0 }
}

sge_bmpFont* creditsFont
 

sge_bmpFont* fastFont
 

_sge_TTFont* impactFont
 

_sge_TTFont* inkFont
 

sge_bmpFont* storyFont
 

_sge_TTFont* titleFont