Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include "vegastrike.h"
#include "in_kb.h"
#include "vs_random.h"
#include <sys/time.h>
#include <sys/types.h>
Go to the source code of this file.
Functions | |
double | getNewTime () |
void | inc_time_compression (const KBData &, KBSTATE a) |
void | dec_time_compression (const KBData &, KBSTATE a) |
void | reset_time_compression (const KBData &, KBSTATE a) |
void | pause_key (const KBData &s, KBSTATE a) |
float | getTimeCompression () |
void | setTimeCompression (float tc) |
bool | toggle_pause () |
void | micro_sleep (unsigned int n) |
void | InitTime () |
double | GetElapsedTime () |
double | queryTime () |
double | realTime () |
void | UpdateTime () |
void | setNewTime (double newnewtime) |
Variables | |
static double | firsttime |
VSRandom | vsrandom (time(NULL)) |
static double | newtime |
static double | lasttime |
static double | elapsedtime = .1 |
static double | timecompression = 1 |
int | timecount |
double GetElapsedTime | ( | ) |
Definition at line 188 of file lin_time.cpp.
References elapsedtime.
Referenced by Cockpit::Autopilot(), PointStarVlist::BeginDrawState(), bootstrap_draw(), Radar::SphereDisplay::Draw(), Radar::BubbleDisplay::Draw(), Radar::PlaneDisplay::Draw(), Bolt::Draw(), WarpTrail::Draw(), HaloSystem::Draw(), GameUnit< UnitType >::Draw(), BaseInterface::Room::BasePython::Draw(), GameCockpit::Draw(), BaseInterface::Room::BaseTalk::Draw(), Mesh::Draw(), BaseInterface::Draw(), ParticleTrail::DrawAndUpdate(), Unit::FireEngines(), flickerDamage(), Mesh::getLOD(), UnitUtil::getPhysicsPriority(), HaloAccelSmooth(), GameCockpit::IsPaused(), PhysicsSystem::JettisonReactionMass(), GameCockpit::LookupUnitStat(), StarSystem::ProcessPendingJumps(), CockpitKeys::ScrollDown(), CockpitKeys::ScrollUp(), GameCockpit::SetupViewPort(), PhysicsSystem::Update(), StarSystem::Update(), AnimatedTexture::UpdateAllFrame(), MeshAnimation::UpdateFrames(), Camera::UpdateGFX(), CockpitKeys::ZoomIn(), and CockpitKeys::ZoomOut().
double getNewTime | ( | ) |
Definition at line 50 of file lin_time.cpp.
References firsttime.
Referenced by AccountServer::AccountServer(), Orders::AggressiveAI::AggressiveAI(), bootstrap_main_loop(), ChooseNavPoint(), Mount::ComputeAnimatedFrame(), GameCockpit::DoAutoLanding(), TextInputDisplay::draw(), GameCockpit::Draw(), NewButton::drawCycleBorder(), PlanetaryOrbit::Execute(), FlyByWire::Execute(), FlyTo::Execute(), Orders::AggressiveAI::ExecuteNoEnemies(), GameUnit< UnitType >::Explode(), flickerDamage(), NetClient::isTime(), GameCockpit::LookupUnitStat(), main_loop(), NetClient::NetClient(), NetServer::NetServer(), PlanetaryOrbit::PlanetaryOrbit(), Unit::reactToCollision(), NetClient::Reconnect(), NetClient::Reinitialize(), NetServer::sendDamages(), GameCockpit::Shake(), AccountServer::start(), NetServer::start(), GameUnit< UnitType >::Thrust(), UniverseUtil::timeofday(), and StarVlist::UpdateGraphics().
float getTimeCompression | ( | ) |
Definition at line 102 of file lin_time.cpp.
References timecompression.
Referenced by Cockpit::Autopilot(), Mission::DirectorLoop(), BaseInterface::Room::BasePython::Draw(), GameCockpit::Draw(), BaseInterface::Room::BaseTalk::Draw(), Orders::AggressiveAI::Execute(), FlyByWire::Right(), FlyByWire::RollRight(), FlyByWire::Up(), PhysicsSystem::Update(), StarSystem::Update(), CockpitKeys::ZoomIn(), and CockpitKeys::ZoomOut().
void InitTime | ( | ) |
Definition at line 165 of file lin_time.cpp.
Referenced by bootstrap_main_loop(), main(), AccountServer::start(), and NetServer::start().
void micro_sleep | ( | unsigned int | n) |
Definition at line 153 of file lin_time.cpp.
double queryTime | ( | ) |
Definition at line 193 of file lin_time.cpp.
References firsttime.
Referenced by Orders::FireAt::ChooseTargets(), GameStarSystem::Draw(), GameCockpit::Draw(), Orders::AggressiveAI::Execute(), GFXGetFramerate(), NetClient::loginAcctLoop(), VsnetHTTPSocket::need_test_writable(), VsnetHTTPSocket::reopenConnection(), VsnetHTTPSocket::resendData(), setNewTime(), NetClient::synchronizeTime(), StarSystem::Update(), GameUnit< UnitType >::UpdatePhysics2(), and StarSystem::UpdateUnitPhysics().
double realTime | ( | ) |
Definition at line 213 of file lin_time.cpp.
Referenced by Audio::SceneManager::commit(), BaseInterface::Room::BaseVSMovie::Draw(), Audio::getRealTime(), Mount::PhysicsAlignedFire(), BaseInterface::Room::BaseVSMovie::SetHidePointer(), Audio::Test::testMultiStreaming(), Audio::Test::testMultiStreaming2(), Audio::Test::testStreaming(), and AnimatedTexture::UpdateAllFrame().
Definition at line 79 of file lin_time.cpp.
References PRESS.
Referenced by GameCockpit::Draw(), initGlobalCommandMap(), and pause_key().
void setNewTime | ( | double | newnewtime) |
Definition at line 268 of file lin_time.cpp.
References firsttime, queryTime(), and UpdateTime().
Referenced by bootstrap_main_loop(), main(), and NetClient::synchronizeTime().
void setTimeCompression | ( | float | tc) |
Definition at line 107 of file lin_time.cpp.
Referenced by UniverseUtil::SetTimeCompression(), and toggle_pause().
bool toggle_pause | ( | ) |
Keyboard parsing Parses keyboard commands
Definition at line 113 of file lin_time.cpp.
References setTimeCompression().
Referenced by FireKeyboard::Execute().
void UpdateTime | ( | ) |
Definition at line 234 of file lin_time.cpp.
References first(), firsttime, lasttime, newtime, and timecompression.
Referenced by AccountServer::AccountServer(), base_main_loop(), bootstrap_draw(), bootstrap_main_loop(), createObjects(), gamemenu_draw(), GameStarSystem::GameStarSystem(), main(), NetServer::NetServer(), setNewTime(), AccountServer::start(), NetServer::start(), and GameUniverse::StartDraw().
|
static |
Definition at line 47 of file lin_time.cpp.
Referenced by GetElapsedTime().
|
static |
Definition at line 25 of file lin_time.cpp.
Referenced by Universe::Generate2(), getNewTime(), Universe::Init(), queryTime(), setNewTime(), Takeoff(), and UpdateTime().
|
static |
Definition at line 42 of file lin_time.cpp.
Referenced by GameUnit< UnitType >::Explode(), GFXGetFramerate(), and UpdateTime().
|
static |
Definition at line 41 of file lin_time.cpp.
Referenced by GameUnit< UnitType >::Explode(), NetClient::loginAcctLoop(), SuicideKey(), and UpdateTime().
|
static |
Definition at line 48 of file lin_time.cpp.
Referenced by getTimeCompression(), and UpdateTime().
int timecount |
Definition at line 59 of file lin_time.cpp.
Referenced by UpdateTimeCompressionSounds().
VSRandom vsrandom(time(NULL)) |
Referenced by StarSystem::AddUnit(), ZoneMgr::broadcastDamage(), ZoneMgr::broadcastSnapshots(), ChooseNavPoint(), createObjects(), Unit::DealDamageToHullReturnArmor(), commandI::dummy(), Unit::EjectCargo(), CommunicatingAI::GetRandomUnit(), AnimatedTexture::LoadAni(), Orders::FireAt::PossiblySwitchTarget(), GFXSphereVertexList::ProceduralModification(), Unit::Repair(), NetClient::synchronizeTime(), and StarSystem::UpdateUnitPhysics().