mElite  1.0
An Elite clone based on TextElite by Jan-Philipp Kappmeier and Melanie Schmidt.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Public Attributes | Friends | List of all members
App Class Reference

The main class of mElite, which is an extension of the general OpenGLApplication class. More...

#include <App.h>

Inheritance diagram for App:
OpenGLApplication

Public Member Functions

bool initialize (void)
 Initializing of the application.
 
void deinitialize (void)
 De-initialises this object and frees any resources it is using.
 
void update (DWORD milliseconds)
 Updates the game status if there is time and nothing else to do.
 
void draw (void)
 Draws the scene.
 
GLUquadricObj * getQuadricObject ()
 
void loadAllNeededTextures ()
 Loads all needed textures into the textureslots, exclusive planets.
 
void loadSystemTextures ()
 Loads textures for the current system.
 
FrustumgetFrustum (void)
 Gets the frustum.
 
void printInfoLine (const char *text,...)
 Prints a text.
 

Public Attributes

MouseHandlermouse
 
PlayerObjectplayer
 
CameraObjectcameraSystemView
 
BitmapFontbf
 
TextureFonttf
 
TextureFonttf2
 
TextInputti
 
Consolecon
 
Frustumfrustum
 

Friends

class OpenGLApplication
 

Additional Inherited Members

- Private Member Functions inherited from OpenGLApplication
virtual ~OpenGLApplication (void)
 
 OpenGLApplication (const char *className)
 Constructs an OpenGLApplication with a given name.
 
OpenGLWindowgetWindow (void)
 Return the window that belongs tho this application instance.
 
void fastMode ()
 Disables face culling, lighting and the depth testing.
 
void fullMode ()
 Enables face culling, lighting and the depth testing.
 
void terminate ()
 This function is called if the application quits by sending the appropriate window message and stopping the main program loop.
 
void toggleFullscreen ()
 Switches between fullscreen and windowed displaymode.
 
void resizeDraw (bool enable)
 Enable or disable resizing while changing window size.
 
void setFrameLimit (unsigned int framesPerSecond)
 Sets frame limit. If the computer is faster than the frame limit, it is supposed not to render again.
 
unsigned int getFrameLimit ()
 Gets frame limit.
 
FrameCountergetFrameCounter ()
 Gets frame counter.
 
- Static Private Member Functions inherited from OpenGLApplication
static OpenGLApplicationcreate (const char *class_name)
 Create the derived application class and return a pointer to the OpenGLApplication base class.
 

Detailed Description

The main class of mElite, which is an extension of the general OpenGLApplication class.

Contains as members all elements that are contained in the game, such as world objects and and GUI objects. Has functions to show and update them.

Author
Jan-Philipp Kappmeier, Melanie Schmidt
Date
06/12/2006

Definition at line 37 of file App.h.

Member Function Documentation

void App::deinitialize ( void  )
virtual

De-initialises this object and frees any resources it is using.

Implements OpenGLApplication.

Definition at line 129 of file App.cpp.

void App::draw ( void  )
virtual

Draws the scene.

If the player is dead, the end screen is shown except developer mode is active. In this case, the came continues. Mainly the function is a long switch statement for the different game modes. Then appropriate methods are called.

Implements OpenGLApplication.

Definition at line 153 of file App.cpp.

Frustum * App::getFrustum ( void  )

Gets the frustum.

Returns
The frustum.

Definition at line 2533 of file App.cpp.

GLUquadricObj* App::getQuadricObject ( )
inline

Definition at line 75 of file App.h.

bool App::initialize ( void  )
virtual

Initializing of the application.

Mainly the OpenGL-System is initialized. Objects, textures are loaded and some needed objects, e.g. for printing, are initialized. This happens everytime the window is created, that means it happens also if the application toggles between fullscreen and windowed mode.

Returns
true if it succeeds, false if it fails.

Implements OpenGLApplication.

Definition at line 1575 of file App.cpp.

void App::loadAllNeededTextures ( )

Loads all needed textures into the textureslots, exclusive planets.

Planets are loaded in loadSystemTextures. If special color mode is active, the colors are swapped.

Definition at line 2292 of file App.cpp.

void App::loadSystemTextures ( )

Loads textures for the current system.

Called whenever a hyperjump has been performed. In developer mode, detailed information on the loaded files is given, otherwise only a percent information.

Definition at line 2203 of file App.cpp.

void App::printInfoLine ( const char *  inputstring,
  ... 
)

Prints a text.

Parameters
inputstringThe string to be printed.

Definition at line 2350 of file App.cpp.

void App::update ( DWORD  deltaTime)
virtual

Updates the game status if there is time and nothing else to do.

Parameters
deltaTimethe time in milliseconds that has passed since the last call

Implements OpenGLApplication.

Definition at line 1739 of file App.cpp.

Friends And Related Function Documentation

friend class OpenGLApplication
friend

Definition at line 82 of file App.h.

Member Data Documentation

BitmapFont* App::bf

Definition at line 101 of file App.h.

CameraObject* App::cameraSystemView

Definition at line 100 of file App.h.

Console* App::con

Definition at line 105 of file App.h.

Frustum* App::frustum

Definition at line 106 of file App.h.

MouseHandler* App::mouse

Definition at line 98 of file App.h.

PlayerObject* App::player

Definition at line 99 of file App.h.

TextureFont* App::tf

Definition at line 102 of file App.h.

TextureFont* App::tf2

Definition at line 103 of file App.h.

TextInput* App::ti

Definition at line 104 of file App.h.


The documentation for this class was generated from the following files: