#include <fixed.h>
Public Member Functions | |
| fixed () | |
| fixed (const fixed &fixedVal) | |
| fixed (bool bInternal, int nVal) | |
| fixed (unsigned int nVal) | |
| fixed (int nVal) | |
| fixed (const char *nVal) | |
| ~fixed () | |
| fixed | operator++ () |
| fixed | operator-- () |
| fixed | operator- () |
| fixed & | operator= (fixed fixedVal) |
| bool | operator== (fixed fixedVal) |
| bool | operator!= (fixed fixedVal) |
| bool | operator< (fixed fixedVal) |
| bool | operator<= (fixed fixedVal) |
| bool | operator> (fixed fixedVal) |
| bool | operator>= (fixed fixedVal) |
| const char * | asString () |
| float | asFloat () |
| int | asInt () |
| int | getInternal () |
| int * | getInternalData () |
| fixed | floor () |
| fixed | ceil () |
| fixed | operator+ (fixed b) |
| fixed | operator- (fixed b) |
| fixed | operator * (fixed b) |
| fixed | operator/ (fixed b) |
| fixed | sqrt () |
| fixed | pow (fixed fixedPower) |
| fixed | log10 () |
| fixed | log () |
| fixed | exp () |
| fixed | cos () |
| fixed | sin () |
| fixed | tan () |
| fixed | acos () |
| fixed | abs () |
| fixed | operator% (fixed fixedVal) |
| fixed | operator *= (fixed val) |
| fixed | operator/= (fixed val) |
| fixed | operator-= (fixed val) |
| fixed | operator+= (fixed val) |
Static Public Member Functions | |
| static fixed | fromFloat (float flt) |
Static Public Attributes | |
| static fixed | MAX_FIXED |
| static fixed | XPI = fixed(true,_XPI) |
| static fixed | X2PI = fixed(true,_X2PI) |
| static fixed | XPIO2 = fixed(true,_XPIO2) |
Private Attributes | |
| int | m_nVal |
Definition at line 31 of file fixed.h.
| fixed::fixed | ( | ) | [inline] |
| fixed::fixed | ( | const fixed & | fixedVal | ) | [inline] |
| fixed::fixed | ( | bool | bInternal, | |
| int | nVal | |||
| ) | [inline] |
| fixed::fixed | ( | unsigned int | nVal | ) | [inline] |
| fixed::fixed | ( | int | nVal | ) | [inline] |
| fixed::fixed | ( | const char * | nVal | ) |
Definition at line 77 of file fixed.cpp.
References DIALOG_ASSERT, FIXED_RESOLUTION, S3D::formatStringBuffer(), Logger::log(), m_nVal, and LangStringUtil::strlen().
| fixed fixed::operator++ | ( | ) | [inline] |
| fixed fixed::operator-- | ( | ) | [inline] |
| bool fixed::operator== | ( | fixed | fixedVal | ) | [inline] |
| bool fixed::operator!= | ( | fixed | fixedVal | ) | [inline] |
| bool fixed::operator< | ( | fixed | fixedVal | ) | [inline] |
| bool fixed::operator<= | ( | fixed | fixedVal | ) | [inline] |
| bool fixed::operator> | ( | fixed | fixedVal | ) | [inline] |
| bool fixed::operator>= | ( | fixed | fixedVal | ) | [inline] |
| const char * fixed::asString | ( | ) |
Definition at line 120 of file fixed.cpp.
References DIALOG_ASSERT, m_nVal, snprintf, and LangStringUtil::strlen().
Referenced by fixed_lua_number2str(), g_write(), OptionEntryFixed::getDefaultValueAsString(), OptionEntryFixed::getValueAsString(), NumberParser::setExpression(), and XMLNode::XMLNode().
| float fixed::asFloat | ( | ) | [inline] |
Definition at line 122 of file fixed.h.
References FIXED_RESOLUTION_FLOAT, and m_nVal.
Referenced by ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), FixedVector4::asVector(), FixedVector::asVector(), FixedVector4::asVector4(), TankDamage::calculateDamage(), TargetDefinition::createTarget(), DeformTextures::deformLandscape(), Lightning::draw(), Laser::draw(), NapalmRenderer::draw(), LandscapePoints::draw(), SpeedChange::draw(), GLWWeaponModel::draw(), GLWTankTracker::draw(), GLWTankSlider::draw(), GLWTankModel::draw(), GLWScorchedInfo::draw(), TargetRendererImplTank::drawLife(), GLWWindView::drawScene(), SkyRoof::drawSegment(), TargetRendererImpl::drawShield(), TargetRendererImplTank::drawSight(), ImageModifier::findIntersection(), Water2Renderer::generate(), Water2::generate(), Water::generate(), generateTargetTip(), TankPosition::getElevationString(), FixedVector4::getOpenGLRotationMatrix(), TankPosition::getPowerString(), TankPosition::getRotationString(), TargetRendererImpl::getTargetSize(), ShotProjectile::init(), Explosion::init(), TankKeyboardControlUtil::leftRightHUD(), ActionController::logActions(), TankAICurrentMove::lowestHighest(), TankAICurrentMove::makeGroupShot(), SkyRoof::makeList(), TankAICurrentMove::makeMoveShot(), TargetCamera::moveCamera(), ParticleEngine::normalizedSimulate(), TankAICurrentMove::playMove(), TankHealthTip::populate(), TankShieldTip::populate(), TankKeyboardControlUtil::powerHUD(), ImageModifier::removeWaterFromBitmap(), TargetRendererImplTarget::render(), TargetRendererImplTank::render(), TargetRendererImplTank::renderShadow(), ShotState::run(), HeightMap::setHeight(), SpeedChange::setSpeed(), Action::simulate(), SoundAction::simulate(), ShotProjectile::simulate(), Napalm::simulate(), Explosion::simulate(), TargetRendererImplTank::simulate(), RenderTargets::Renderer3D::simulate(), MissileActionRenderer::simulate(), SkyDome::simulate(), Napalm::simulateAddEdge(), TankMovement::simulationMove(), TankKeyboardControlUtil::upDownHUD(), WeaponGivePower::weaponCallback(), and WeaponGiveLife::weaponCallback().
| int fixed::asInt | ( | ) | [inline] |
Definition at line 127 of file fixed.h.
References FIXED_RESOLUTION, and m_nVal.
Referenced by TankDamage::calculateDamage(), TargetDefinition::createTarget(), DeformLandscape::deformLandscapeInternal(), fixed_lua_number2int(), DeformLandscape::flattenAreaInternal(), HeightMapModifier::generateTerrain(), TargetSpace::getCollisionSet(), NumberParser::getInt(), HeightMap::getInterpHeight(), HeightMap::getInterpNormal(), LUAUtil::getIntFromTable(), PlacementTypeTree::getPositions(), PlacementTypeMask::getPositions(), TankState::getStateString(), NumberParser::getUInt(), NumberParser::getValue(), HeightMapModifier::noise(), ExplosionParams::parseLUA(), PlacementTankPosition::placeTank(), VisibilityPatchGrid::recalculateErrors(), s3d_get_height(), and tankTargetCloseness().
| int fixed::getInternal | ( | ) | [inline] |
Definition at line 132 of file fixed.h.
References m_nVal.
Referenced by ActionController::addAction(), LUAScript::addNumberParameter(), TankDamage::calculateDamage(), DeformLandscape::deformLandscape(), fixed_lua_str2number(), fixed_luai_numdiv(), fixed_luai_nummod(), fixed_luai_nummul(), fixed_luai_numpow(), DeformLandscape::flattenArea(), TankDamage::getActionDetails(), TargetSpace::getCollisionSet(), FixedVector::Magnitude(), math_abs(), math_acos(), math_ceil(), math_cos(), math_exp(), math_floor(), math_log(), math_log10(), math_pow(), math_sin(), math_sqrt(), math_tan(), read_number(), ComsSyncCheckMessage::readMessage(), s3d_get_height(), s3d_random(), LUAScript::setGlobal(), ShotState::setup(), and ActionController::stepActions().
| fixed fixed::floor | ( | ) | [inline] |
Definition at line 142 of file fixed.h.
References fixed(), FIXED_RESOLUTION, and m_nVal.
Referenced by floorx(), HeightMap::getInterpHeight(), HeightMap::getInterpNormal(), and math_floor().
| fixed fixed::ceil | ( | ) | [inline] |
Definition at line 147 of file fixed.h.
References fixed(), FIXED_RESOLUTION, and m_nVal.
Referenced by ceilx(), and math_ceil().
| fixed fixed::sqrt | ( | ) |
Definition at line 304 of file fixed.cpp.
References fixed(), iSqrt(), and m_nVal.
Referenced by HeightMapModifier::addCirclePeak(), math_sqrt(), FixedVector4::Normalize(), FixedVector4::setQuatFromAxisAndAngle(), and sqrtx().
Definition at line 316 of file fixed.cpp.
References ipow().
Referenced by fixed_luai_numpow(), math_pow(), and powx().
| fixed fixed::log10 | ( | ) |
Definition at line 336 of file fixed.cpp.
References ilog10().
Referenced by log10x(), and math_log10().
| fixed fixed::log | ( | ) |
| fixed fixed::exp | ( | ) |
| fixed fixed::cos | ( | ) |
Definition at line 449 of file fixed.cpp.
References _sinx(), _X2PI, _XPIO2, fixed(), m_nVal, X2PI, XPI, and XPIO2.
Referenced by cosx(), TankLib::getGunPosition(), math_cos(), FixedVector4::setQuatFromAxisAndAngle(), and tan().
| fixed fixed::sin | ( | ) |
Definition at line 410 of file fixed.cpp.
References _sinx(), _X2PI, fixed(), m_nVal, X2PI, XPI, and XPIO2.
Referenced by DeformLandscape::deformLandscapeInternal(), TankLib::getGunPosition(), math_sin(), FixedVector4::setQuatFromAxisAndAngle(), sinx(), and tan().
| fixed fixed::tan | ( | ) |
| fixed fixed::acos | ( | ) |
| fixed fixed::abs | ( | ) | [inline] |
Definition at line 178 of file fixed.h.
References fixed(), and m_nVal.
Referenced by PlacementType::checkCloseness(), Boid2::checkGrouping(), and math_abs().
| fixed fixed::fromFloat | ( | float | flt | ) | [static] |
Definition at line 493 of file fixed.cpp.
References FIXED_RESOLUTION_FLOAT, int(), and m_nVal.
Referenced by ImageModifier::addHeightToBitmap(), ImageModifier::addLightMapToBitmap(), ImageModifier::addWaterToBitmap(), TankKeyboardControlUtil::autoAim(), GLWTankTracker::currentChanged(), GLWTankSlider::currentChanged(), FixedVector::fromVector(), TankAISniperGuesser::guess(), TankAIAimGuesser::guess(), TankAICurrentMove::inHole(), Napalm::init(), TankAICurrentMove::lowestHighest(), TankAICurrentMove::makeMoveShot(), GLWPlanView::mouseDown(), TankKeyboardControlUtil::moveLeftRight(), TankKeyboardControlUtil::movePower(), TankKeyboardControlUtil::moveUpDown(), TankAIAimGuesser::refineShot(), ImageModifier::removeWaterFromBitmap(), InfoMap::showHeightBands(), ActionController::simulate(), and MainCamera::simulate().
int fixed::m_nVal [private] |
Definition at line 34 of file fixed.h.
Referenced by abs(), asFloat(), asInt(), asString(), ceil(), cos(), fixed(), floor(), fromFloat(), getInternal(), getInternalData(), operator *(), operator *=(), operator!=(), operator%(), operator+(), operator++(), operator+=(), operator-(), operator--(), operator-=(), operator/(), operator/=(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), sin(), and sqrt().
fixed fixed::MAX_FIXED [static] |
Definition at line 206 of file fixed.h.
Referenced by Napalm::getHeight(), RoofMaps::getInterpRoofHeight(), LandscapeConditionRandom::getNextEventTime(), LandscapeConditionTime::getNextEventTime(), LandscapeConditionGroupSize::getNextEventTime(), RoofMaps::getRoofHeight(), and HeightMapModifier::waterErrosion().
fixed fixed::XPI = fixed(true,_XPI) [static] |
Definition at line 207 of file fixed.h.
Referenced by HeightMapModifier::addCirclePeak(), cos(), WeaponRedirect::fireWeapon(), TargetMovementEntryShips::generate(), TankLib::getGunPosition(), TankLib::getShotTowardsPosition(), TankLib::getSniperShotTowardsPosition(), TankLib::getVelocityVector(), TankMovement::init(), OptionsTransient::newGameWind(), OptionsTransient::nextRoundWind(), TankAIAimGuesser::refineShot(), TargetLife::setRotation(), TargetLife::setTargetPositionAndRotation(), TargetMovementEntrySpline::simulate(), TargetMovementEntryShips::simulate(), sin(), and Boid2::update().
fixed fixed::X2PI = fixed(true,_X2PI) [static] |
fixed fixed::XPIO2 = fixed(true,_XPIO2) [static] |
Definition at line 209 of file fixed.h.
Referenced by cos(), DeformLandscape::deformLandscapeInternal(), and sin().
1.5.3