Torque2D Reference
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
DefaultGame Class Reference

#include <defaultGame.h>

+ Inheritance diagram for DefaultGame:

Public Member Functions

virtual bool mainInitialize (int argc, const char **argv)
 
virtual void mainLoop (void)
 
virtual void mainShutdown (void)
 
virtual void gameDeactivate (const bool noRender)
 
virtual void gameReactivate (void)
 
virtual void textureKill (void)
 
virtual void textureResurrect (void)
 
virtual void refreshWindow (void)
 
virtual void processTick (void)
 
virtual void interpolateTick (F32 delta)
 
virtual void advanceTime (F32 timeDelta)
 
void processQuitEvent ()
 
void processTimeEvent (TimeEvent *event)
 
void processInputEvent (InputEvent *event)
 
void processMouseMoveEvent (MouseMoveEvent *event)
 
void processScreenTouchEvent (ScreenTouchEvent *event)
 
void processConsoleEvent (ConsoleEvent *event)
 
void processPacketReceiveEvent (PacketReceiveEvent *event)
 
void processConnectedAcceptEvent (ConnectedAcceptEvent *event)
 
void processConnectedReceiveEvent (ConnectedReceiveEvent *event)
 
void processConnectedNotifyEvent (ConnectedNotifyEvent *event)
 
- Public Member Functions inherited from GameInterface
 GameInterface ()
 
virtual void postEvent (Event &event)
 Place an event in Game's event queue. More...
 
virtual void processEvents ()
 Process all the events in Game's event queue. Only the main thread should call this. More...
 
virtual void processEvent (Event *event)
 
void setRunning (const bool running)
 
bool isRunning (void) const
 
void setRestart (const bool restart)
 
bool requiresRestart (void) const
 
void journalProcess ()
 
void loadJournal (const char *fileName)
 Start loading journal data from the specified file. More...
 
void saveJournal (const char *fileName)
 Start saving journal data to the specified file (must be able to write it). More...
 
void playJournal (const char *fileName, bool journalBreak=false)
 
JournalMode getJournalMode ()
 
bool isJournalReading (void) const
 Are we reading back from the journal? More...
 
bool isJournalWriting (void) const
 Are we writing to the journal? More...
 
void journalRead (U32 *val)
 Read a U32 from the journal. More...
 
void journalWrite (U32 val)
 Write a U32 to the journal. More...
 
void journalRead (U32 size, void *buffer)
 Read a block of data from the journal. More...
 
void journalWrite (U32 size, const void *buffer)
 Write a block of data to the journal. More...
 
FileStreamgetJournalStream (void)
 
- Public Member Functions inherited from Tickable
 Tickable ()
 
virtual ~Tickable ()
 
virtual bool isProcessingTicks () const
 
virtual void setProcessTicks (bool tick=true)
 

Additional Inherited Members

- Static Public Member Functions inherited from Tickable
static bool advanceTime (U32 timeDelta)
 
- Static Public Attributes inherited from Tickable
static const U32 smTickShift = 4
 Shift value to control how often Ticks occur. More...
 
static const U32 smTickMs = ( 1 << smTickShift )
 Number of milliseconds per tick, 32 in this case. More...
 
static const F32 smTickSec = ( F32( Tickable::smTickMs ) / 1000.f )
 Fraction of a second per tick. More...
 
static const U32 smTickMask = ( smTickMs - 1 )
 

Member Function Documentation

void advanceTime ( F32  timeDelta)
virtual

This method is called once every frame regardless of the return value of isProcessingTicks and informs the object of the passage of time

Implements Tickable.

void gameDeactivate ( const bool  noRender)
virtual

Implements GameInterface.

void gameReactivate ( void  )
virtual

Implements GameInterface.

virtual void interpolateTick ( F32  delta)
inlinevirtual

This method is called every frame and lets the control interpolate between ticks so you can smooth things as long as isProcessingTicks returns true when it is called on the object

Implements Tickable.

bool mainInitialize ( int  argc,
const char **  argv 
)
virtual

Implements GameInterface.

void mainLoop ( void  )
virtual

Implements GameInterface.

void mainShutdown ( void  )
virtual

Implements GameInterface.

void processConnectedAcceptEvent ( ConnectedAcceptEvent event)
virtual

Implements GameInterface.

void processConnectedNotifyEvent ( ConnectedNotifyEvent event)
virtual

Implements GameInterface.

void processConnectedReceiveEvent ( ConnectedReceiveEvent event)
virtual

Implements GameInterface.

void processConsoleEvent ( ConsoleEvent event)
virtual

Implements GameInterface.

void processInputEvent ( InputEvent event)
virtual

Implements GameInterface.

void processMouseMoveEvent ( MouseMoveEvent event)
virtual

Implements GameInterface.

void processPacketReceiveEvent ( PacketReceiveEvent event)
virtual

Implements GameInterface.

void processQuitEvent ( )
virtual

Implements GameInterface.

void processScreenTouchEvent ( ScreenTouchEvent event)
virtual

Implements GameInterface.

void processTick ( void  )
virtual

This method is called once every 32ms if isProcessingTicks returns true when called on the object

Implements Tickable.

void processTimeEvent ( TimeEvent event)
virtual

Implements GameInterface.

void refreshWindow ( void  )
virtual

Implements GameInterface.

void textureKill ( void  )
virtual

Implements GameInterface.

void textureResurrect ( void  )
virtual

Implements GameInterface.


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