#include <TankKeyboardControlUtil.h>
Static Public Member Functions | |
| static void | keyboardCheck (Tank *tank, const unsigned state, float frameTime, char *buffer, unsigned int keyState) |
| static void | endPlayMove (Tank *tank) |
| static void | fireShot (Tank *tank) |
| static void | skipShot (Tank *tank) |
| static void | resign (Tank *tank) |
| static void | parachutesUpDown (Tank *tank, unsigned int paraId=0) |
| static void | shieldsUpDown (Tank *tank, unsigned int shieldId=0) |
| static void | useBattery (Tank *tank, unsigned int batteryId) |
Static Protected Member Functions | |
| static void | movePower (Tank *tank, char *buffer, unsigned int keyState, float frameTime) |
| static void | moveUpDown (Tank *tank, char *buffer, unsigned int keyState, float frameTime) |
| static void | moveLeftRight (Tank *tank, char *buffer, unsigned int keyState, float frameTime) |
| static void | leftRightHUD (Tank *tank) |
| static void | upDownHUD (Tank *tank) |
| static void | powerHUD (Tank *tank) |
| static void | autoAim (Tank *tank) |
| static void | prevWeapon (Tank *tank) |
| static void | nextWeapon (Tank *tank) |
Static Protected Attributes | |
| static VirtualSoundSource * | elevateSound_ |
| static VirtualSoundSource * | rotateSound_ |
| static VirtualSoundSource * | startSound_ |
| static VirtualSoundSource * | powerSound_ |
Private Member Functions | |
| TankKeyboardControlUtil () | |
| virtual | ~TankKeyboardControlUtil () |
Definition at line 26 of file TankKeyboardControlUtil.h.
| TankKeyboardControlUtil::TankKeyboardControlUtil | ( | ) | [private] |
Definition at line 47 of file TankKeyboardControlUtil.cpp.
| TankKeyboardControlUtil::~TankKeyboardControlUtil | ( | ) | [private, virtual] |
Definition at line 51 of file TankKeyboardControlUtil.cpp.
| void TankKeyboardControlUtil::keyboardCheck | ( | Tank * | tank, | |
| const unsigned | state, | |||
| float | frameTime, | |||
| char * | buffer, | |||
| unsigned int | keyState | |||
| ) | [static] |
Definition at line 55 of file TankKeyboardControlUtil.cpp.
References AccessoryPart::AccessoryBattery, AccessoryPart::AccessoryParachute, AccessoryPart::AccessoryShield, FixedVector::asVector(), autoAim(), elevateSound_, Accessory::ePositionSelectNone, VirtualSoundPriority::eRotation, fireShot(), Tank::getAccessories(), TankAccessories::getAllAccessoriesByType(), TankWeapon::getCurrent(), TargetShield::getCurrentShield(), TargetLife::getLife(), Target::getLife(), TargetLife::getMaxLife(), Tank::getPosition(), Accessory::getPositionSelect(), Target::getShield(), TankPosition::getTankPosition(), TankAccessories::getWeapons(), TankWeapon::getWeaponString(), KEYBOARDKEY, moveLeftRight(), movePower(), moveUpDown(), nextWeapon(), parachutesUpDown(), powerSound_, prevWeapon(), rotateSound_, VirtualSoundSource::setPosition(), TargetRendererImplTankHUD::setText(), shieldsUpDown(), startSound_, TankPosition::undo(), and useBattery().
Referenced by TankKeyboardControl::keyboardCheck().
| void TankKeyboardControlUtil::endPlayMove | ( | Tank * | tank | ) | [static] |
Definition at line 221 of file TankKeyboardControlUtil.cpp.
References elevateSound_, powerSound_, rotateSound_, and VirtualSoundSource::stop().
Referenced by TankKeyboardControl::enterState().
| void TankKeyboardControlUtil::fireShot | ( | Tank * | tank | ) | [static] |
Definition at line 498 of file TankKeyboardControlUtil.cpp.
References ComsPlayedMoveMessage::eShot, Tank::getAccessories(), Accessory::getAccessoryId(), TankWeapon::getCurrent(), ScorchedContext::getGameState(), Target::getPlayerId(), Tank::getPosition(), TankPosition::getPower(), TankPosition::getRotationGunXY(), TankPosition::getRotationGunYZ(), TankPosition::getSelectPositionX(), TankPosition::getSelectPositionY(), TankAccessories::getWeapons(), ScorchedClient::instance(), ComsMessageSender::sendToServer(), GameState::stimulate(), and ClientState::StimWait.
Referenced by keyboardCheck(), TargetCamera::mouseUp(), and GLWTankFire::mouseUp().
| void TankKeyboardControlUtil::skipShot | ( | Tank * | tank | ) | [static] |
Definition at line 522 of file TankKeyboardControlUtil.cpp.
References ComsPlayedMoveMessage::eSkip, ScorchedContext::getGameState(), Target::getPlayerId(), ScorchedClient::instance(), ComsMessageSender::sendToServer(), GameState::stimulate(), and ClientState::StimWait.
Referenced by SkipDialog::buttonDown(), and SkipAllDialog::simulate().
| void TankKeyboardControlUtil::resign | ( | Tank * | tank | ) | [static] |
Definition at line 535 of file TankKeyboardControlUtil.cpp.
References ComsPlayedMoveMessage::eResign, ScorchedContext::getGameState(), Target::getPlayerId(), ScorchedClient::instance(), ComsMessageSender::sendToServer(), GameState::stimulate(), and ClientState::StimWait.
Referenced by ResignDialog::buttonDown().
| void TankKeyboardControlUtil::parachutesUpDown | ( | Tank * | tank, | |
| unsigned int | paraId = 0 | |||
| ) | [static] |
Definition at line 548 of file TankKeyboardControlUtil.cpp.
References ComsDefenseMessage::eParachutesDown, ComsDefenseMessage::eParachutesUp, Target::getPlayerId(), and ComsMessageSender::sendToServer().
Referenced by TankAccessories::activate(), AutoDefenseDialog::buttonDown(), TankParachutesTip::itemSelected(), and keyboardCheck().
| void TankKeyboardControlUtil::shieldsUpDown | ( | Tank * | tank, | |
| unsigned int | shieldId = 0 | |||
| ) | [static] |
Definition at line 557 of file TankKeyboardControlUtil.cpp.
References ComsDefenseMessage::eShieldDown, ComsDefenseMessage::eShieldUp, Target::getPlayerId(), and ComsMessageSender::sendToServer().
Referenced by TankAccessories::activate(), AutoDefenseDialog::buttonDown(), TankShieldTip::itemSelected(), and keyboardCheck().
| void TankKeyboardControlUtil::useBattery | ( | Tank * | tank, | |
| unsigned int | batteryId | |||
| ) | [static] |
Definition at line 566 of file TankKeyboardControlUtil.cpp.
References ComsDefenseMessage::eBatteryUse, Target::getPlayerId(), and ComsMessageSender::sendToServer().
Referenced by TankAccessories::activate(), TankBatteryTip::itemSelected(), and keyboardCheck().
| void TankKeyboardControlUtil::movePower | ( | Tank * | tank, | |
| char * | buffer, | |||
| unsigned int | keyState, | |||
| float | frameTime | |||
| ) | [static, protected] |
Definition at line 425 of file TankKeyboardControlUtil.cpp.
References CACHE_SOUND, TankPosition::changePower(), fixed::fromFloat(), S3D::getDataFile(), Tank::getPosition(), KEYBOARDKEY, VirtualSoundSource::play(), powerHUD(), powerSound_, and VirtualSoundSource::stop().
Referenced by keyboardCheck().
| void TankKeyboardControlUtil::moveUpDown | ( | Tank * | tank, | |
| char * | buffer, | |||
| unsigned int | keyState, | |||
| float | frameTime | |||
| ) | [static, protected] |
Definition at line 331 of file TankKeyboardControlUtil.cpp.
References CACHE_SOUND, elevateSound_, fixed::fromFloat(), S3D::getDataFile(), Tank::getPosition(), OptionsDisplay::instance(), KEYBOARDKEY, KeyboardKey::keyDown(), VirtualSoundSource::play(), TankPosition::rotateGunYZ(), startSound_, VirtualSoundSource::stop(), and upDownHUD().
Referenced by keyboardCheck().
| void TankKeyboardControlUtil::moveLeftRight | ( | Tank * | tank, | |
| char * | buffer, | |||
| unsigned int | keyState, | |||
| float | frameTime | |||
| ) | [static, protected] |
Definition at line 257 of file TankKeyboardControlUtil.cpp.
References CACHE_SOUND, fixed::fromFloat(), S3D::getDataFile(), Tank::getPosition(), KEYBOARDKEY, leftRightHUD(), VirtualSoundSource::play(), TankPosition::rotateGunXY(), rotateSound_, startSound_, and VirtualSoundSource::stop().
Referenced by keyboardCheck().
| void TankKeyboardControlUtil::leftRightHUD | ( | Tank * | tank | ) | [static, protected] |
Definition at line 324 of file TankKeyboardControlUtil.cpp.
References fixed::asFloat(), Tank::getPosition(), TankPosition::getRotationGunXY(), TankPosition::getRotationString(), and TargetRendererImplTankHUD::setText().
Referenced by autoAim(), and moveLeftRight().
| void TankKeyboardControlUtil::upDownHUD | ( | Tank * | tank | ) | [static, protected] |
Definition at line 418 of file TankKeyboardControlUtil.cpp.
References fixed::asFloat(), TankPosition::getElevationString(), Tank::getPosition(), TankPosition::getRotationGunYZ(), and TargetRendererImplTankHUD::setText().
Referenced by moveUpDown().
| void TankKeyboardControlUtil::powerHUD | ( | Tank * | tank | ) | [static, protected] |
Definition at line 489 of file TankKeyboardControlUtil.cpp.
References fixed::asFloat(), TankPosition::getMaxPower(), Tank::getPosition(), TankPosition::getPower(), TankPosition::getPowerString(), and TargetRendererImplTankHUD::setText().
Referenced by movePower().
| void TankKeyboardControlUtil::autoAim | ( | Tank * | tank | ) | [static, protected] |
Definition at line 228 of file TankKeyboardControlUtil.cpp.
References FixedVector::asVector(), GLCamera::draw(), fixed::fromFloat(), MainCamera::getCamera(), ScorchedContext::getGameState(), GameState::getMouseX(), GameState::getMouseY(), Tank::getPosition(), TankPosition::getTankPosition(), MainCamera::instance(), ScorchedClient::instance(), leftRightHUD(), TankPosition::rotateGunXY(), and TargetRendererImplTankAIM::setAimPosition().
Referenced by keyboardCheck().
| void TankKeyboardControlUtil::prevWeapon | ( | Tank * | tank | ) | [static, protected] |
Definition at line 194 of file TankKeyboardControlUtil.cpp.
References AccessoryPart::AccessoryWeapon, Tank::getAccessories(), ScorchedContext::getAccessoryStore(), TankAccessories::getAllAccessoriesByType(), TankWeapon::getCurrent(), TankAccessories::getWeapons(), OptionsDisplay::instance(), ScorchedClient::instance(), TankWeapon::setWeapon(), and AccessoryStore::sortList().
Referenced by keyboardCheck().
| void TankKeyboardControlUtil::nextWeapon | ( | Tank * | tank | ) | [static, protected] |
Definition at line 169 of file TankKeyboardControlUtil.cpp.
References AccessoryPart::AccessoryWeapon, Tank::getAccessories(), ScorchedContext::getAccessoryStore(), TankAccessories::getAllAccessoriesByType(), TankWeapon::getCurrent(), TankAccessories::getWeapons(), OptionsDisplay::instance(), ScorchedClient::instance(), TankWeapon::setWeapon(), and AccessoryStore::sortList().
Referenced by keyboardCheck().
VirtualSoundSource * TankKeyboardControlUtil::elevateSound_ [static, protected] |
Definition at line 58 of file TankKeyboardControlUtil.h.
Referenced by endPlayMove(), keyboardCheck(), and moveUpDown().
VirtualSoundSource * TankKeyboardControlUtil::rotateSound_ [static, protected] |
Definition at line 59 of file TankKeyboardControlUtil.h.
Referenced by endPlayMove(), keyboardCheck(), and moveLeftRight().
VirtualSoundSource * TankKeyboardControlUtil::startSound_ [static, protected] |
Definition at line 60 of file TankKeyboardControlUtil.h.
Referenced by keyboardCheck(), moveLeftRight(), and moveUpDown().
VirtualSoundSource * TankKeyboardControlUtil::powerSound_ [static, protected] |
Definition at line 61 of file TankKeyboardControlUtil.h.
Referenced by endPlayMove(), keyboardCheck(), and movePower().
1.5.3