Tactics: Western Philosophers Vs. Musicians  0.12
A turn-based tactical game combining rules and gameplay elements inspired by Final Fantasy Tactics and the Mayfair Exponential Game System. Unlike most games of this type, motion is in full, grid-less 3D.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
Tactics3D::App Class Reference

#include <Tactics3DApp.h>

Inheritance diagram for Tactics3D::App:
OpenSkyNet::Graphics::UI OpenSkyNet::Graphics::OgreApp

Public Types

enum  WARRIOR_SETUP_STAGE {
  WARRIOR_SETUP_DESC, WARRIOR_SETUP_DEX, WARRIOR_SETUP_STR, WARRIOR_SETUP_END,
  WARRIOR_SETUP_FIGHTING_STYLE, WARRIOR_SETUP_INV, WARRIOR_SETUP_READY, WARRIOR_SETUP_DONE
}
 
enum  WARRIOR_TYPE { WARRIOR_TYPE_NPC, WARRIOR_TYPE_PC, WARRIOR_TYPE_REMOTE_PC }
 

Public Member Functions

 App ()
 
virtual void go ()
 
OpenSkyNet::Utils::uint getGameStage ()
 
OpenSkyNet::Utils::uint incrementGameStage ()
 
virtual void moveCamera ()
 
virtual ~App ()
 
Setup Operations
virtual bool setup (bool restoreOgreConfig_, bool isSmokeTest_)
 
void loadTactics3DObjectsXML (const char *tactics3DObjectsXML_, bool loadWarriorsImages_)
 
void loadWarriorXML (OpenSkyNet::Utils::uint index_)
 
void loadWarriorsXMLs ()
 
void loadWarriorGUI (const Warrior *warrior_, const std::string &warriorWindowPrefix_)
 
void loadWarriorsGUIs ()
 
void setupDieRollCameras ()
 
void setupGame ()
 
virtual void setupEventHandlers ()
 
virtual void createCamera ()
 
virtual void createViewports ()
 
WARRIOR_SETUP_STAGE getWarriorSetupStage (int warriorIndex_) const
 
void setWarriorSetupStage (int warriorIndex_, WARRIOR_SETUP_STAGE stage_)
 
bool areWarriorsSetup () const
 
Input/Frame Event Handlers
virtual bool processUnbufferedMouseInput (const Ogre::FrameEvent &evt)
 
virtual bool frameStarted (const Ogre::FrameEvent &evt)
 
virtual bool frameEnded (const Ogre::FrameEvent &evt)
 
Set/Get input types
virtual void switchMouseMode ()
 
Debug Operations
void pFDebugDraw (Warrior *warrior_)
 
void rayTraceDebugDraw ()
 
Hardware Occlusion Queries
virtual void notifyRenderSingleObject (Ogre::Renderable *rend, const Ogre::Pass *pass, const Ogre::AutoParamDataSource *source, const Ogre::LightList *pLightList, bool suppressRenderStateChanges)
 
Networking Operations
bool isOnlineGame () const
 
bool isServer () const
 
bool isClient () const
 
Utils
OpenSkyNet::Utils::uint getNumWarriors () const
 
WarriorgetWarrior (OpenSkyNet::Utils::uint warriorIndex_) const
 
CEGUI::Window * getWarriorWindow (const Warrior *warrior_) const
 
WarriorgetPickedWarrior () const
 
void shouldFocusOnPickedWarrior (bool shouldFocus_)
 
void focusOnWarrior (const Warrior *warrior_)
 
WarriorpickClosestEnemyAlive (const Warrior *warrior_)
 
WarriorpickNextEnemyAlive ()
 
WarriorpickPrevEnemyAlive ()
 
void updateSpecialMoveWindow (bool reset)
 
void updateSuperPowerWindow (bool reset)
 
bool canAddWarriorAction (const Warrior *warrior_, const Action *action_, CEGUI::Window *&warriorWindow_, CEGUI::Listbox *&actionsListbox_)
 
void addWarriorAction (Warrior *warrior_, CEGUI::Listbox *actionsListbox_, Action *action_, bool updateContinuous_, bool insertInFront_=false)
 
void addWarriorActions (Warrior *warrior_, bool updateContinuous_)
 
void setTeamThatWon (Warrior::TEAM team_)
 
Warrior::TEAM getTeamThatWon () const
 
Serialization
void saveGame ()
 
void serializeTactics3DObjects (const char *tactics3DObjectsXML_)
 
bool serializePCs (const char *inputXML_, const char *outputXML_)
 
Shutdown Operations
void destroyAllObjects (bool doDestroyPersistentData_)
 
- Public Member Functions inherited from OpenSkyNet::Graphics::UI
 UI (InputListener *inputListener_=0)
 
void setCanTranslateCam (bool val_)
 
void setCanRotateCam (bool val_)
 
void showDebugOverlay (bool show_)
 
void quit ()
 
virtual ~UI ()
 
void setTopNodeForMousePicking (Ogre::SceneNode *n_=0)
 
UIScreengetTopScreen () const
 
virtual void pushScreen (UIScreen *screen_)
 
virtual void popScreen (bool doUnload_=true)
 
void popAndUnloadScreenNextUpdate ()
 
virtual bool processUnbufferedKeyInput (const Ogre::FrameEvent &evt)
 
virtual void windowResized (Ogre::RenderWindow *rw)
 
virtual void windowClosed (Ogre::RenderWindow *rw)
 
virtual void switchKeyMode ()
 
InputListenergetInputListener ()
 
- Public Member Functions inherited from OpenSkyNet::Graphics::OgreApp
 OgreApp ()
 
virtual ~OgreApp ()
 
Ogre::SceneNode * getSceneNode (const char *name_) const
 
Ogre::SceneManager * getSceneManager () const
 
const Ogre::Camera * getCam () const
 
Ogre::RenderWindow * getWindow () const
 
const std::vector
< Ogre::SceneNode * > & 
getNonPersistentNodes () const
 
virtual void createScene (const char *sceneGraphXML_)
 
Ogre::SceneNode * createSceneNode (const char *name_, bool isPersistent_, Ogre::SceneNode *parent_)
 
void serializeSceneGraph (const char *sceneGraphXML_)
 

Protected Member Functions

virtual bool configure (bool restoreOgreConfig_)
 
- Protected Member Functions inherited from OpenSkyNet::Graphics::OgreApp
virtual void setupResources ()
 
virtual void chooseSceneManager ()
 
virtual void createResourceListener ()
 
virtual void loadResources ()
 
void processSceneGraphXML (TiXmlElement *element_, Ogre::SceneNode *parentSceneNode_)
 
void serialize (TiXmlElement *element_, Ogre::SceneNode *parentSceneNode_)
 

Friends

class Tactics3D::InputListener
 
class Tactics3D::IntroScreen
 
class Tactics3D::LobbyScreen
 
class Tactics3D::MainScreen
 
class Tactics3D::WarriorsSetupScreen
 
class Tactics3D::WarriorsWrapupScreen
 
voidgameLoop (void *arg)
 
voidserverAccept (void *arg)
 
voidrecvPCAttributes (void *arg)
 

Custom Event Handlers

bool handleWarriorsSetupWindows (const CEGUI::EventArgs &e)
 
void handleWarriorsSetupDone ()
 
bool handleActionDoneButton (const CEGUI::EventArgs &e)
 
bool handleActionCancelButton (const CEGUI::EventArgs &e)
 
bool handleActionsCombobox (const CEGUI::EventArgs &e)
 
bool handleActionsListbox (const CEGUI::EventArgs &e)
 
bool handleSpecialMoveCombobox (const CEGUI::EventArgs &e)
 
bool handleSpecialMoveSpinner (const CEGUI::EventArgs &e)
 
bool handleSpecialMoveChooseOpponentButton (const CEGUI::EventArgs &e)
 
bool handleSuperPowerCombobox (const CEGUI::EventArgs &e)
 
bool handleSuperPowerChooseButton (const CEGUI::EventArgs &e)
 
virtual void onCurrCamJustBecameWarriorPOV (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onBeginRound (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onInitiativeRolled (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onAllInitiativesRolled (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onPreGetWarriorActions (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onGetWarriorActions (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onPostGetWarriorActions (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onPostGetAllWarriorsActions (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onPreWarriorPerform (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onPostWarriorPerform (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onPostWarriorPerformAll (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onWarriorAttacked (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onWarriorDead (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onRecvPCAttributes (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onLockCore (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
virtual void onUnlockCore (std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onCurrCamJustBecameWarriorPOVWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onBeginRoundWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onInitiativeRolledWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onAllInitiativesRolledWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onPreGetWarriorActionsWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onGetWarriorActionsWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onPostGetWarriorActionsWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onPostGetAllWarriorsActionsWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onPreWarriorPerformWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onPostWarriorPerformWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onPostWarriorPerformAllWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onWarriorAttackedWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onWarriorDeadWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onRecvPCAttributesWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onLockCoreWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 
static void onUnlockCoreWrapper (void *instance_, std::vector< OpenSkyNet::Utils::TaggedUnion > params_)
 

Additional Inherited Members

- Static Public Member Functions inherited from OpenSkyNet::Graphics::UI
static CEGUI::MouseButton convertOISMouseButtonToCegui (OIS::MouseButtonID buttonID_)
 
static bool doesHitAABB (const Ogre::AxisAlignedBox &AABB_, const Ogre::Vector3 &origin_, const Ogre::Vector3 &direction_)
 
- Protected Attributes inherited from OpenSkyNet::Graphics::UI
CEGUI::OgreRenderer * _gUIRenderer
 
CEGUI::System * _gUISystem
 
std::stack< UIScreen * > _screens
 
bool _useBufferedInputKeys
 
bool _useBufferedInputMouse
 
Ogre::Real _moveSpeed
 
Ogre::Real _rotateSpeed
 
float _moveScale
 
float _rotScale
 
bool _statsOn
 
Utils::uint _numScreenShots
 
Ogre::Real _timeUntilNextToggle
 
int _sceneDetailIndex
 
Ogre::Vector3 _translateVector
 
int _aniso
 
Ogre::TextureFilterOptions _filtering
 
float _rotX
 
float _rotY
 
bool _canTranslateCam
 
bool _canRotateCam
 
OIS::InputManager * _inputManager
 
OIS::Mouse * _mouse
 
OIS::Keyboard * _keyboard
 
InputListener_inputListener
 
OgreBites::SdkTrayManager * _trayManager
 
volatile bool _quit
 
Ogre::Vector3 _trans
 
Ogre::DisplayString _debugText
 
- Protected Attributes inherited from OpenSkyNet::Graphics::OgreApp
Ogre::Root * _root
 
Ogre::Camera * _camera
 
Ogre::SceneManager * _sceneMgr
 
Ogre::RenderWindow * _window
 
std::map< std::string,
Ogre::SceneNode * > 
_namesToSerializableNodes
 
std::vector< Ogre::SceneNode * > _nonPersistentNodes
 
std::map< std::string,
Ogre::Light * > 
_namesToSerializableLights
 
std::vector< Ogre::Light * > _nonPersistentLights
 

Detailed Description

This program uses: Ogre 1.8.1 (http://www.ogre3d.org/), Crazy Eddie's GUI System 0.7.7 (http://www.cegui.org.uk/), OIS 1.3 (http://sourceforge.net/projects/wgois/), and TinyXML 2.5.3 (http://www.grinninglizard.com/tinyxml/)

Member Enumeration Documentation

Enumerator
WARRIOR_SETUP_DESC 
WARRIOR_SETUP_DEX 
WARRIOR_SETUP_STR 
WARRIOR_SETUP_END 
WARRIOR_SETUP_FIGHTING_STYLE 
WARRIOR_SETUP_INV 
WARRIOR_SETUP_READY 
WARRIOR_SETUP_DONE 
Enumerator
WARRIOR_TYPE_NPC 
WARRIOR_TYPE_PC 
WARRIOR_TYPE_REMOTE_PC 

Constructor & Destructor Documentation

App::App ( )
App::~App ( )
virtual

Member Function Documentation

void App::addWarriorAction ( Warrior warrior_,
CEGUI::Listbox *  actionsListbox_,
Action action_,
bool  updateContinuous_,
bool  insertInFront_ = false 
)
Parameters
updateContinuous_if the action is continuous, then this flag allows the warrior to update it before adding
insertInFront_if true, inserts the action at the beginning of the list
void App::addWarriorActions ( Warrior warrior_,
bool  updateContinuous_ 
)
Parameters
updateContinuous_if an action is continuous, then this flag allows the warrior to update it before adding.
bool App::areWarriorsSetup ( ) const
bool App::canAddWarriorAction ( const Warrior warrior_,
const Action action_,
CEGUI::Window *&  warriorWindow_,
CEGUI::Listbox *&  actionsListbox_ 
)

Returns true if the warrior can add an action.

Parameters
warriorWindow_an OUT param set to the warrior's window
actionsListbox_an OUT param set to the listbox holding the warrior's actions
bool App::configure ( bool  restoreOgreConfig_)
protectedvirtual

Configures the application - returns false if the user chooses to abandon configuration.

Reimplemented from OpenSkyNet::Graphics::OgreApp.

virtual void Tactics3D::App::createCamera ( )
inlinevirtual

Overloaded to stop the OgreApp implementation (we use the Core::Cinematographer class for cameras).

Reimplemented from OpenSkyNet::Graphics::OgreApp.

virtual void Tactics3D::App::createViewports ( )
inlinevirtual

Overloaded to stop the OgreApp implementation (we use the Core::Cinematographer class for cameras).

Reimplemented from OpenSkyNet::Graphics::OgreApp.

void App::destroyAllObjects ( bool  doDestroyPersistentData_)
void App::focusOnWarrior ( const Warrior warrior_)

Focus camera on and show HUD elements for a warrior

bool App::frameEnded ( const Ogre::FrameEvent &  evt)
virtual

Reimplemented from OpenSkyNet::Graphics::UI.

bool App::frameStarted ( const Ogre::FrameEvent &  evt)
virtual

Critical section note: all core logic is locked while computing a frame.

Critical section note: all core logic is locked while computing a frame.

Critical section note: all core logic is locked while computing a frame.

Todo:
This is inefficient as _movementLeftInAction may not change each frame.
Todo:
shouldn't check this every frame
Todo:
notify all players; probably need PCs to wait in onEvocation()
Todo:
should verify this happens for all clients in networked games
Todo:
should remove from warrior

Reimplemented from OpenSkyNet::Graphics::UI.

OpenSkyNet::Utils::uint Tactics3D::App::getGameStage ( )
inline
OpenSkyNet::Utils::uint Tactics3D::App::getNumWarriors ( ) const
inline
Warrior* Tactics3D::App::getPickedWarrior ( ) const
inline
Warrior::TEAM Tactics3D::App::getTeamThatWon ( ) const
inline
Warrior* Tactics3D::App::getWarrior ( OpenSkyNet::Utils::uint  warriorIndex_) const
inline
WARRIOR_SETUP_STAGE Tactics3D::App::getWarriorSetupStage ( int  warriorIndex_) const
inline

Allow a UIScreen to access the setup state.

CEGUI::Window* Tactics3D::App::getWarriorWindow ( const Warrior warrior_) const
inline
void App::go ( )
virtual

Start the app.

Reimplemented from OpenSkyNet::Graphics::OgreApp.

bool App::handleActionCancelButton ( const CEGUI::EventArgs &  e)
bool App::handleActionDoneButton ( const CEGUI::EventArgs &  e)

Critical section note: Can't hide action window here. PC may not have called waitForPerformEvent() yet, so setPerformEvent() would have no effect.

Critical section note: Can't hide action window here. PC may not have called waitForPerformEvent() yet, so setPerformEvent() would have no effect.

Critical section note: Can't hide action window here. PC may not have called waitForPerformEvent() yet, so setPerformEvent() would have no effect.

bool App::handleActionsCombobox ( const CEGUI::EventArgs &  e)
bool App::handleActionsListbox ( const CEGUI::EventArgs &  e)
Todo:
static_cast here is dangerous, but CEGUI does not seem to have RTTI enabled for Win32 when packaged with the Ogre SDK.
bool App::handleSpecialMoveChooseOpponentButton ( const CEGUI::EventArgs &  e)

Critical section note: None of the data in this method SHOULD be written by the combat thread, so no lock is needed. If any deadlocking issues occur, look here first.

bool App::handleSpecialMoveCombobox ( const CEGUI::EventArgs &  e)
bool App::handleSpecialMoveSpinner ( const CEGUI::EventArgs &  e)
bool App::handleSuperPowerChooseButton ( const CEGUI::EventArgs &  e)

Critical section note: None of the data in this method SHOULD be written by the combat thread, so no lock is needed. If any deadlocking issues occur, look here first.

bool App::handleSuperPowerCombobox ( const CEGUI::EventArgs &  e)
void App::handleWarriorsSetupDone ( )
bool App::handleWarriorsSetupWindows ( const CEGUI::EventArgs &  e)
Todo:
Allow save games for multi-player?
OpenSkyNet::Utils::uint Tactics3D::App::incrementGameStage ( )
inline
bool Tactics3D::App::isClient ( ) const
inline
bool Tactics3D::App::isOnlineGame ( ) const
inline
bool Tactics3D::App::isServer ( ) const
inline
void App::loadTactics3DObjectsXML ( const char *  tactics3DObjectsXML_,
bool  loadWarriorsImages_ 
)

Load basic info about the warriors without initializing them.

Todo:
Don't force teams based on whether server or client
void App::loadWarriorGUI ( const Warrior warrior_,
const std::string &  warriorWindowPrefix_ 
)

Loads GUI info for one warrior.

void App::loadWarriorsGUIs ( )

Loads GUI info for all warriors.

void App::loadWarriorsXMLs ( )

Loads XML info for all warriors.

void App::loadWarriorXML ( OpenSkyNet::Utils::uint  index_)

Loads XML info for one warrior.

Todo:
collectible refactoring
void App::moveCamera ( )
virtual

Make all the changes to the camera. Note that YAW direction is around a fixed axis (freelook style) rather than a natural YAW (e.g., airplane).

Reimplemented from OpenSkyNet::Graphics::UI.

void App::notifyRenderSingleObject ( Ogre::Renderable *  rend,
const Ogre::Pass *  pass,
const Ogre::AutoParamDataSource *  source,
const Ogre::LightList *  pLightList,
bool  suppressRenderStateChanges 
)
virtual
Todo:
Follow the Ogre lighting sample in 1.8.1
void App::onAllInitiativesRolled ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI and other graphical data from the core thread.

Critical section note: this section writes or reads GUI and other graphical data from the core thread.

void App::onAllInitiativesRolledWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onBeginRound ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI and other graphical data from the core thread. Also, this section reads and writes AI data.

void App::onBeginRoundWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onCurrCamJustBecameWarriorPOV ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: no lock is needed here as this method is only callable from the core thread OR onPreWarriorPerform.

void App::onCurrCamJustBecameWarriorPOVWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onGetWarriorActions ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: NPCs MAY write or read data from the core thread, but PCs and RemotePCs need the GUI thread running.

void App::onGetWarriorActionsWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onInitiativeRolled ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI and other graphical data from the core thread.

void App::onInitiativeRolledWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onLockCore ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual
void App::onLockCoreWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onPostGetAllWarriorsActions ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI data from the core thread.

void App::onPostGetAllWarriorsActionsWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onPostGetWarriorActions ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI data from the core thread.

Critical section note: this section writes or reads GUI data from the core thread.

Critical section note: these bools are volatile, so do not need to be in a critical section.

Critical section note: _currWarriorGettingActions and its core-related members are only accessible from the core thread when they are not writable by the combat thread. This is enforced not by locks, but by the volatile bool _canAcceptPCActionsInput AND event _gotActionsEvent. Although onCurrCamJustBecameWarriorPOV accesses _currWarriorGettingActions, it does so after this combat event.

void App::onPostGetWarriorActionsWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onPostWarriorPerform ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: _currAction is read by the core thread in frameStarted(). Also, this section writes or reads GUI and other graphical data from the core thread.

void App::onPostWarriorPerformAll ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads data from the core thread.

void App::onPostWarriorPerformAllWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onPostWarriorPerformWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onPreGetWarriorActions ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: _currWarriorGettingActions and its core-related members are only accessible from the core thread when they are not writable by the combat thread. This is enforced not by locks, but by the volatile bool _canAcceptPCActionsInput AND event _gotActionsEvent. Although onCurrCamJustBecameWarriorPOV accesses _currWarriorGettingActions, it does so after this combat event.

Critical section note: this section writes or reads GUI and other graphical data from the core thread.

void App::onPreGetWarriorActionsWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onPreWarriorPerform ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: _currAction is read by the core thread in frameStarted(). Also, this section writes or reads GUI and other graphical data from the core thread.

void App::onPreWarriorPerformWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onRecvPCAttributes ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI and other graphical data from the core thread.

Critical section note: this section writes or reads GUI and other graphical data from the core thread.

void App::onRecvPCAttributesWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onUnlockCore ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual
void App::onUnlockCoreWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onWarriorAttacked ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads graphical data from the core thread.

void App::onWarriorAttackedWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::onWarriorDead ( std::vector< OpenSkyNet::Utils::TaggedUnion params_)
virtual

Critical section note: this section writes or reads GUI data from the core thread.

void App::onWarriorDeadWrapper ( void instance_,
std::vector< OpenSkyNet::Utils::TaggedUnion params_ 
)
static
void App::pFDebugDraw ( Warrior warrior_)
Warrior * App::pickClosestEnemyAlive ( const Warrior warrior_)
Warrior * App::pickNextEnemyAlive ( )
Warrior * App::pickPrevEnemyAlive ( )
bool App::processUnbufferedMouseInput ( const Ogre::FrameEvent &  evt)
virtual
Todo:
Don't make this hardcoded; the HUD display image is set to this and does not scale

Reimplemented from OpenSkyNet::Graphics::UI.

void App::rayTraceDebugDraw ( )
void App::saveGame ( )
bool App::serializePCs ( const char *  inputXML_,
const char *  outputXML_ 
)

Loads the input XML, changes only the attributes of PCs, then saves to the output file

void App::serializeTactics3DObjects ( const char *  tactics3DObjectsXML_)

Saves the current state of all warriors to an XML file.

Parameters
tactics3DObjectsXML_the filename to save to
void Tactics3D::App::setTeamThatWon ( Warrior::TEAM  team_)
inline
bool App::setup ( bool  restoreOgreConfig_,
bool  isSmokeTest_ 
)
virtual

Setup keyboard/mouse input and basic event handling needed for Ogre app.

void App::setupDieRollCameras ( )

Creates cameras that show die rolls for all warriors.

void App::setupEventHandlers ( )
virtual

Called from setup() and overloaded to include Tactics3D events.

Reimplemented from OpenSkyNet::Graphics::UI.

void App::setupGame ( )

Setup everything else needed to run the game.

void Tactics3D::App::setWarriorSetupStage ( int  warriorIndex_,
WARRIOR_SETUP_STAGE  stage_ 
)
inline

Allow a UIScreen to modify the setup state.

void Tactics3D::App::shouldFocusOnPickedWarrior ( bool  shouldFocus_)
inline
void App::switchMouseMode ( )
virtual

Reimplemented from OpenSkyNet::Graphics::UI.

void App::updateSpecialMoveWindow ( bool  reset)
void App::updateSuperPowerWindow ( bool  reset)

Friends And Related Function Documentation

void* gameLoop ( void arg)
friend

This function will be threaded from the app for game-specific logic.

void* recvPCAttributes ( void arg)
friend

This function will be threaded from a client or server to wait for PC data.

Todo:
Don't hardcode the number of expected PCs
void* serverAccept ( void arg)
friend

This function will be threaded from the server for accepting a client connection.

friend class Tactics3D::InputListener
friend
friend class Tactics3D::IntroScreen
friend
friend class Tactics3D::LobbyScreen
friend
friend class Tactics3D::MainScreen
friend
friend class Tactics3D::WarriorsSetupScreen
friend
friend class Tactics3D::WarriorsWrapupScreen
friend

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