![]() |
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.
|
#include <Tactics3DApp.h>
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 |
Warrior * | getWarrior (OpenSkyNet::Utils::uint warriorIndex_) const |
CEGUI::Window * | getWarriorWindow (const Warrior *warrior_) const |
Warrior * | getPickedWarrior () const |
void | shouldFocusOnPickedWarrior (bool shouldFocus_) |
void | focusOnWarrior (const Warrior *warrior_) |
Warrior * | pickClosestEnemyAlive (const Warrior *warrior_) |
Warrior * | pickNextEnemyAlive () |
Warrior * | pickPrevEnemyAlive () |
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_) |
![]() | |
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) |
UIScreen * | getTopScreen () 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 () |
InputListener * | getInputListener () |
![]() | |
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_) |
![]() | |
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 |
void * | gameLoop (void *arg) |
void * | serverAccept (void *arg) |
void * | recvPCAttributes (void *arg) |
Additional Inherited Members | |
![]() | |
static CEGUI::MouseButton | convertOISMouseButtonToCegui (OIS::MouseButtonID buttonID_) |
static bool | doesHitAABB (const Ogre::AxisAlignedBox &AABB_, const Ogre::Vector3 &origin_, const Ogre::Vector3 &direction_) |
![]() | |
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 |
![]() | |
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 |
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/)
App::App | ( | ) |
|
virtual |
void App::addWarriorAction | ( | Warrior * | warrior_, |
CEGUI::Listbox * | actionsListbox_, | ||
Action * | action_, | ||
bool | updateContinuous_, | ||
bool | insertInFront_ = false |
||
) |
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 |
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.
warriorWindow_ | an OUT param set to the warrior's window |
actionsListbox_ | an OUT param set to the listbox holding the warrior's actions |
|
protectedvirtual |
Configures the application - returns false if the user chooses to abandon configuration.
Reimplemented from OpenSkyNet::Graphics::OgreApp.
|
inlinevirtual |
Overloaded to stop the OgreApp implementation (we use the Core::Cinematographer class for cameras).
Reimplemented from OpenSkyNet::Graphics::OgreApp.
|
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_ | ) |
Focus camera on and show HUD elements for a warrior
|
virtual |
Reimplemented from OpenSkyNet::Graphics::UI.
|
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.
Reimplemented from OpenSkyNet::Graphics::UI.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Allow a UIScreen to access the setup state.
|
inline |
|
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 | ) |
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 | ) |
|
inline |
|
inline |
|
inline |
|
inline |
void App::loadTactics3DObjectsXML | ( | const char * | tactics3DObjectsXML_, |
bool | loadWarriorsImages_ | ||
) |
Load basic info about the warriors without initializing them.
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.
|
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.
|
virtual |
|
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.
|
static |
|
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.
|
static |
|
virtual |
Critical section note: no lock is needed here as this method is only callable from the core thread OR onPreWarriorPerform.
|
static |
|
virtual |
Critical section note: NPCs MAY write or read data from the core thread, but PCs and RemotePCs need the GUI thread running.
|
static |
|
virtual |
Critical section note: this section writes or reads GUI and other graphical data from the core thread.
|
static |
|
virtual |
|
static |
|
virtual |
Critical section note: this section writes or reads GUI data from the core thread.
|
static |
|
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.
|
static |
|
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.
|
virtual |
Critical section note: this section writes or reads data from the core thread.
|
static |
|
static |
|
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.
|
static |
|
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.
|
static |
|
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.
|
static |
|
virtual |
|
static |
|
virtual |
Critical section note: this section writes or reads graphical data from the core thread.
|
static |
|
virtual |
Critical section note: this section writes or reads GUI data from the core thread.
|
static |
Warrior * App::pickNextEnemyAlive | ( | ) |
Warrior * App::pickPrevEnemyAlive | ( | ) |
|
virtual |
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.
tactics3DObjectsXML_ | the filename to save to |
|
inline |
|
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.
|
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.
|
inline |
Allow a UIScreen to modify the setup state.
|
inline |
|
virtual |
Reimplemented from OpenSkyNet::Graphics::UI.
void App::updateSpecialMoveWindow | ( | bool | reset | ) |
void App::updateSuperPowerWindow | ( | bool | reset | ) |
This function will be threaded from the app for game-specific logic.
This function will be threaded from the server for accepting a client connection.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |