#include <MainCamera.h>

Public Member Functions | |
| GLCamera & | getCamera () |
| TargetCamera & | getTarget () |
| bool | getCameraSelected () |
| bool | getShowArena () |
| virtual void | simulate (const unsigned state, float frameTime) |
| virtual void | draw (const unsigned state) |
| virtual void | mouseWheel (const unsigned state, int x, int y, int z, bool &skipRest) |
| virtual void | mouseDown (const unsigned state, GameState::MouseButton button, int x, int y, bool &skipRest) |
| virtual void | mouseUp (const unsigned state, GameState::MouseButton button, int x, int y, bool &skipRest) |
| virtual void | mouseDrag (const unsigned state, GameState::MouseButton button, int mx, int my, int x, int y, bool &skipRest) |
| virtual void | keyboardCheck (const unsigned state, float frameTime, char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest) |
| virtual bool | getEnabled (const char *menuName) |
| virtual void | menuSelection (const char *menuName, const int position, GLMenuItem &item) |
| virtual bool | getMenuItems (const char *menuName, std::list< GLMenuItem > &result) |
Static Public Member Functions | |
| static MainCamera * | instance () |
Public Attributes | |
| MainCamera::SaveScreen | saveScreen_ |
| MainCamera::Precipitation | precipitation_ |
Protected Member Functions | |
| void | setQuick (int key) |
| void | useQuick (int key) |
Protected Attributes | |
| bool | mouseDown_ |
| bool | keyDown_ |
| bool | scrolling_ |
| bool | showArena_ |
| TargetCamera | targetCam_ |
| std::map< int, std::pair< Vector, Vector > > | quickKeys_ |
Static Protected Attributes | |
| static MainCamera * | instance_ = 0 |
Private Member Functions | |
| MainCamera () | |
| virtual | ~MainCamera () |
Classes | |
| class | Precipitation |
| class | SaveScreen |
Definition at line 30 of file MainCamera.h.
| MainCamera::MainCamera | ( | ) | [private] |
Definition at line 58 of file MainCamera.cpp.
References GLMenu::addMenu(), DIALOG_ASSERT, Image::getBits(), S3D::getDataFile(), MainMenuDialog::instance(), LANG_RESOURCE, and ImageFactory::loadImage().
| MainCamera::~MainCamera | ( | ) | [private, virtual] |
Definition at line 74 of file MainCamera.cpp.
| MainCamera * MainCamera::instance | ( | ) | [static] |
Definition at line 48 of file MainCamera.cpp.
References instance_.
Referenced by Landscape::actualDrawLandShader(), Landscape::actualDrawLandTextured(), ClientNewGameHandler::actualProcessMessage(), ClientState::addStandardComponents(), TankKeyboardControlUtil::autoAim(), ClientMain::clientEventLoop(), createScorchedWindow(), MainCamera::Precipitation::draw(), GLWTankModel::draw(), AnimatedBackdropDialog::drawBackground(), GLWPlanView::drawCameraPointer(), GLWWindView::drawDisplay(), LandVisibilityPatch::drawLODLevel(), Landscape::drawShadows(), HelpButtonDialog::PerformanceMenu::getMenuToolTip(), Landscape::getShadowMap(), Explosion::init(), GLWWindView::mouseDown(), GLWTankModel::mouseDown(), GLWPlanView::mouseDown(), ClientStartGameHandler::processMessage(), ClientOperationHandler::processMessage(), Landscape::reset(), ScorchedClient::ScorchedClient(), Sun::setLightPosition(), LandscapeSoundPositionWater::setPosition(), LandscapeSoundPositionGroup::setPosition(), ClientState::setupGameState(), and AnimatedBackdropDialog::simulate().
| GLCamera& MainCamera::getCamera | ( | ) | [inline] |
Definition at line 35 of file MainCamera.h.
References TargetCamera::getCamera(), and targetCam_.
Referenced by TankKeyboardControlUtil::autoAim(), ClientMain::clientEventLoop(), createScorchedWindow(), GLWTankModel::draw(), GLWPlanView::drawCameraPointer(), GLWWindView::drawDisplay(), Landscape::drawShadows(), Explosion::init(), GLWPlanView::mouseDown(), LandscapeSoundPositionWater::setPosition(), LandscapeSoundPositionGroup::setPosition(), and AnimatedBackdropDialog::simulate().
| TargetCamera& MainCamera::getTarget | ( | ) | [inline] |
Definition at line 36 of file MainCamera.h.
References targetCam_.
Referenced by ClientNewGameHandler::actualProcessMessage(), MainCamera::Precipitation::draw(), HelpButtonDialog::PerformanceMenu::getMenuToolTip(), GLWWindView::mouseDown(), GLWTankModel::mouseDown(), GLWPlanView::mouseDown(), ClientStartGameHandler::processMessage(), Landscape::reset(), Sun::setLightPosition(), and AnimatedBackdropDialog::simulate().
| bool MainCamera::getCameraSelected | ( | ) | [inline] |
Definition at line 38 of file MainCamera.h.
References keyDown_, mouseDown_, and scrolling_.
Referenced by Landscape::actualDrawLandShader(), and Landscape::actualDrawLandTextured().
| bool MainCamera::getShowArena | ( | ) | [inline] |
Definition at line 39 of file MainCamera.h.
References showArena_.
Referenced by Landscape::actualDrawLandShader(), and Landscape::actualDrawLandTextured().
| void MainCamera::simulate | ( | const unsigned | state, | |
| float | frameTime | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 121 of file MainCamera.cpp.
References TargetCamera::CamFree, GLCamera::eScrollDown, GLCamera::eScrollLeft, GLCamera::eScrollRight, GLCamera::eScrollUp, fixed::fromFloat(), Tank::getCamera(), TargetCamera::getCamera(), TargetCamera::getCameraType(), ScorchedClient::getContext(), GLCamera::getCurrentPos(), TankContainer::getCurrentTank(), Sound::getDefaultListener(), ScorchedContext::getGameState(), GLViewPort::getHeight(), ScorchedContext::getLandscapeMaps(), GLCamera::getLookAt(), GameState::getMouseX(), GameState::getMouseY(), getNumberOfPlayers(), GLCamera::getRotationXY(), GLCamera::getRotationYZ(), ScorchedContext::getTankContainer(), GLCamera::getVelocity(), ScorchedContext::getViewPoints(), Main2DCamera::getViewPort(), GLViewPort::getWidth(), GLCamera::getZoom(), ClientParams::instance(), Sound::instance(), Keyboard::instance(), Main2DCamera::instance(), ScorchedClient::instance(), OptionsDisplay::instance(), GLCamera::movePositionDelta(), GLCamera::scroll(), scrolling_, TankCamera::setCameraLookAt(), TankCamera::setCameraRotation(), TankCamera::setCameraType(), TargetCamera::setCameraType(), SoundListener::setOrientation(), SoundListener::setPosition(), SoundListener::setVelocity(), TargetCamera::simulate(), ViewPoints::simulate(), ClientState::StateOptions, ClientState::StatePlaying, and targetCam_.
Referenced by AnimatedBackdropDialog::simulate().
| void MainCamera::draw | ( | const unsigned | state | ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 256 of file MainCamera.cpp.
References TargetCamera::draw(), and targetCam_.
Referenced by AnimatedBackdropDialog::drawBackground().
| void MainCamera::mouseWheel | ( | const unsigned | state, | |
| int | x, | |||
| int | y, | |||
| int | z, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 268 of file MainCamera.cpp.
References TargetCamera::mouseWheel(), and targetCam_.
| void MainCamera::mouseDown | ( | const unsigned | state, | |
| GameState::MouseButton | button, | |||
| int | x, | |||
| int | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 273 of file MainCamera.cpp.
References GameState::MouseButtonLeft, TargetCamera::mouseDown(), mouseDown_, and targetCam_.
| void MainCamera::mouseUp | ( | const unsigned | state, | |
| GameState::MouseButton | button, | |||
| int | x, | |||
| int | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 283 of file MainCamera.cpp.
References GameState::MouseButtonLeft, mouseDown_, TargetCamera::mouseUp(), and targetCam_.
| void MainCamera::mouseDrag | ( | const unsigned | state, | |
| GameState::MouseButton | button, | |||
| int | mx, | |||
| int | my, | |||
| int | x, | |||
| int | y, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 261 of file MainCamera.cpp.
References TargetCamera::mouseDrag(), and targetCam_.
| void MainCamera::keyboardCheck | ( | const unsigned | state, | |
| float | frameTime, | |||
| char * | buffer, | |||
| unsigned int | keyState, | |||
| KeyboardHistory::HistoryElement * | history, | |||
| int | hisCount, | |||
| bool & | skipRest | |||
| ) | [virtual] |
Reimplemented from GameStateI.
Definition at line 293 of file MainCamera.cpp.
References TargetCamera::CamFree, GLCamera::eScrollDown, GLCamera::eScrollLeft, GLCamera::eScrollRight, GLCamera::eScrollUp, TargetCamera::getCamera(), ScorchedContext::getLandscapeMaps(), Main2DCamera::instance(), ScorchedClient::instance(), TargetCamera::keyboardCheck(), KEYBOARDKEY, keyDown_, MainCamera::SaveScreen::saveScreen_, saveScreen_, GLCamera::scroll(), TargetCamera::setCameraType(), Main2DCamera::setHide(), setQuick(), showArena_, targetCam_, and useQuick().
| bool MainCamera::getEnabled | ( | const char * | menuName | ) | [virtual] |
Reimplemented from GLMenuI.
Definition at line 79 of file MainCamera.cpp.
References ScorchedContext::getGameState(), GameState::getState(), ScorchedClient::instance(), and ClientState::StateWait.
| void MainCamera::menuSelection | ( | const char * | menuName, | |
| const int | position, | |||
| GLMenuItem & | item | |||
| ) | [virtual] |
Reimplemented from GLMenuI.
Definition at line 99 of file MainCamera.cpp.
References TargetCamera::setCameraType(), and targetCam_.
| bool MainCamera::getMenuItems | ( | const char * | menuName, | |
| std::list< GLMenuItem > & | result | |||
| ) | [virtual] |
Reimplemented from GLMenuI.
Definition at line 85 of file MainCamera.cpp.
References TargetCamera::getCameraNames(), TargetCamera::getCameraToolTips(), TargetCamera::getCameraType(), TargetCamera::getNoCameraNames(), LANG_RESOURCE, and targetCam_.
| void MainCamera::setQuick | ( | int | key | ) | [protected] |
Definition at line 397 of file MainCamera.cpp.
References S3D::formatStringBuffer(), TargetCamera::getCamera(), GLCamera::getLookAt(), GLCamera::getRotationXY(), GLCamera::getRotationYZ(), GLCamera::getZoom(), Logger::log(), quickKeys_, and targetCam_.
Referenced by keyboardCheck().
| void MainCamera::useQuick | ( | int | key | ) | [protected] |
Definition at line 408 of file MainCamera.cpp.
References TargetCamera::CamFree, S3D::formatStringBuffer(), TargetCamera::getCamera(), Logger::log(), GLCamera::movePosition(), quickKeys_, TargetCamera::setCameraType(), GLCamera::setLookAt(), and targetCam_.
Referenced by keyboardCheck().
Referenced by keyboardCheck(), and ClientOperationHandler::processMessage().
MainCamera * MainCamera::instance_ = 0 [static, protected] |
bool MainCamera::mouseDown_ [protected] |
Definition at line 87 of file MainCamera.h.
Referenced by getCameraSelected(), mouseDown(), and mouseUp().
bool MainCamera::keyDown_ [protected] |
bool MainCamera::scrolling_ [protected] |
bool MainCamera::showArena_ [protected] |
TargetCamera MainCamera::targetCam_ [protected] |
Definition at line 88 of file MainCamera.h.
Referenced by draw(), getCamera(), getMenuItems(), getTarget(), keyboardCheck(), menuSelection(), mouseDown(), mouseDrag(), mouseUp(), mouseWheel(), setQuick(), simulate(), and useQuick().
std::map<int, std::pair<Vector, Vector> > MainCamera::quickKeys_ [protected] |
1.5.3