Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <navscreen.h>
Classes | |
class | CachedSectorIterator |
class | CachedSystemIterator |
class | SystemIterator |
Static Public Member Functions | |
static void | DrawCircle (float x, float y, float size, const GFXColor &col) |
static void | DrawHalfCircleTop (float x, float y, float size, const GFXColor &col) |
static void | DrawHalfCircleBottom (float x, float y, float size, const GFXColor &col) |
static void | DrawPlanet (float x, float y, float size, const GFXColor &col) |
static void | DrawStation (float x, float y, float size, const GFXColor &col) |
static void | DrawJump (float x, float y, float size, const GFXColor &col) |
static void | DrawMissile (float x, float y, float size, const GFXColor &col) |
static void | DrawTargetCorners (float x, float y, float size, const GFXColor &col) |
static void | DrawNavCircle (float x, float y, float rot_x, float rot_y, float size, const GFXColor &col) |
static void | mouseDrag (int x, int y) |
static void | mouseMotion (int x, int y) |
static void | mouseClick (int button, int state, int x, int y) |
static int | getMouseButtonStatus () |
static class QVector | dxyz (class QVector, double x_, double y_, double z_) |
Public Attributes | |
PathManager * | pathman |
Static Public Attributes | |
static int | mousex = 0 |
static int | mousey = 0 |
static int | mousestat |
Friends | |
class | NavComputer |
class | CurrentPathNode |
class | TargetPathNode |
class | AbsolutePathNode |
class | CriteriaContains |
class | CriteriaOwnedBy |
class | CriteriaSector |
class | NavPath |
Definition at line 18 of file navscreen.h.
NavigationSystem::NavigationSystem | ( | ) |
Definition at line 47 of file navscreen.cpp.
References i, NavComputer, NAVTOTALMESHCOUNT, and pathman.
NavigationSystem::~NavigationSystem | ( | ) |
bool NavigationSystem::CheckDraw | ( | ) |
Definition at line 1373 of file navscreen.cpp.
Referenced by GameCockpit::CanDrawNavSystem(), Draw(), GameCockpit::DrawNavSystem(), and GameCockpit::ScrollAllVDU().
void NavigationSystem::ClearPriorities | ( | ) |
void NavigationSystem::Draw | ( | ) |
Definition at line 352 of file navscreen.cpp.
References _Universe, Universe::AccessCamera(), Universe::AccessCockpit(), Universe::activateLightMap(), checkbit(), CheckDraw(), DEPTHTEST, DEPTHWRITE, Mesh::Draw(), DrawButton(), DrawCursor(), DrawGalaxy(), DrawGrid(), DrawMission(), DrawNavCircle(), DrawObjectives(), DrawSectorList(), DrawShip(), DrawSystem(), float, g_game, Camera::GetOrientation(), Cockpit::GetParent(), Camera::GetPosition(), VegaConfig::getVariable(), GFXBlendMode(), GFXColor4f(), GFXDisable(), GFXEnable(), GFXFALSE, GFXHudMode(), GFXTRUE, i, INVSRCALPHA, LIGHTING, mousex, mousey, NAVTOTALMESHCOUNT, XMLSupport::parse_float(), Mesh::ProcessUndrawnMeshes(), Mesh::ProcessZFarMeshes(), q, QVector, navscreenoccupied::reset(), SetMouseFlipStatus(), SRCALPHA, TEXTURE0, TEXTURE1, Camera::UpdateGFX(), Vector, vs_config, game_data_t::x_resolution, and game_data_t::y_resolution.
Referenced by GameCockpit::DrawNavSystem().
void NavigationSystem::DrawButton | ( | float & | x1, |
float & | x2, | ||
float & | y1, | ||
float & | y2, | ||
int | button_number, | ||
bool | outline | ||
) |
!! DEPRESS !!!
!! RELEASE !!!
!! OUT OF BOUNDS !!!
Definition at line 1009 of file navscreen.cpp.
References TextPlane::bgcol, checkbit(), TextPlane::col, dosetbit(), TextPlane::Draw(), DrawButtonOutline(), flipbit(), float, VegaConfig::getVariable(), XMLSupport::parse_bool(), XMLSupport::parse_float(), NavComputer::run(), TextPlane::SetPos(), TextPlane::SetText(), TestIfInRange(), unsetbit(), and vs_config.
Referenced by Draw().
void NavigationSystem::DrawButtonOutline | ( | float & | x1, |
float & | x2, | ||
float & | y1, | ||
float & | y2, | ||
const GFXColor & | col | ||
) |
Definition at line 1213 of file navscreen.cpp.
References GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), INVSRCALPHA, LIGHTING, SRCALPHA, and TEXTURE0.
Referenced by DrawButton().
Definition at line 80 of file navitemstodraw.h.
References UniverseUtil::cos(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, UniverseUtil::sin(), SRCALPHA, and TEXTURE0.
Referenced by drawlistitem(), and DrawNode().
Definition at line 3 of file navitemstodraw.h.
References BILINEAR, DEPTHTEST, VegaConfig::getVariable(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXTRUE, GFXVertex3f(), GUI_OPAQUE_WHITE(), INVSRCALPHA, LIGHTING, XMLSupport::parse_bool(), SRCALPHA, TEXTURE0, TEXTURE1, and vs_config.
Referenced by Draw().
void NavigationSystem::DrawGalaxy | ( | ) |
Definition at line 732 of file drawgalaxy.cpp.
References GFXColor::a, Beautify(), TextPlane::col, NavigationSystem::CachedSystemIterator::done(), TextPlane::Draw(), DrawNode(), DrawTargetCorners(), float, NavigationSystem::CachedSystemIterator::SystemInfo::GetColor(), getCurrentSystem(), NavigationSystem::CachedSystemIterator::SystemInfo::GetDestinationIndex(), NavigationSystem::CachedSystemIterator::SystemInfo::GetDestinationSize(), NavigationSystem::CachedSystemIterator::getIndex(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, IntersectBorder(), INVSRCALPHA, NavigationSystem::CachedSystemIterator::SystemInfo::isDrawable(), LIGHTING, MAXZOOM, NavigationSystem::CachedSystemIterator::SystemInfo::part_of_path, NavigationSystem::CachedSystemIterator::SystemInfo::paths, NavigationSystem::CachedSystemIterator::SystemInfo::Position(), QVector, NavigationSystem::CachedSystemIterator::seek(), TextPlane::SetPos(), TextPlane::SetText(), UniverseUtil::sqrt(), SRCALPHA, SYSTEM_DEFAULT_SIZE, systemambiguous, StarSystemGent::systemname, TestIfInRange(), TestIfInRangeRad(), TEXTURE0, Vector, and vsmax().
Referenced by Draw().
void NavigationSystem::DrawGrid | ( | float & | screen_x1, |
float & | screen_x2, | ||
float & | screen_y1, | ||
float & | screen_y2, | ||
const GFXColor & | col | ||
) |
Definition at line 46 of file navitemstodraw.h.
References VegaConfig::getVariable(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, XMLSupport::parse_bool(), SRCALPHA, TEXTURE0, and vs_config.
Referenced by Draw().
|
static |
Definition at line 120 of file navitemstodraw.h.
References UniverseUtil::cos(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, UniverseUtil::sin(), SRCALPHA, and TEXTURE0.
|
static |
Definition at line 100 of file navitemstodraw.h.
References UniverseUtil::cos(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, UniverseUtil::sin(), SRCALPHA, and TEXTURE0.
Referenced by drawlistitem().
Definition at line 194 of file navitemstodraw.h.
References UniverseUtil::cos(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, UniverseUtil::sin(), SRCALPHA, and TEXTURE0.
Referenced by drawlistitem().
Definition at line 239 of file navitemstodraw.h.
References GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), INVSRCALPHA, LIGHTING, SRCALPHA, and TEXTURE0.
Referenced by drawlistitem().
void NavigationSystem::DrawMission | ( | ) |
Definition at line 502 of file navscreen.cpp.
References _Universe, Universe::AccessCockpit(), active_missions, TextPlane::col, colors, Delta(), TextPlane::Draw(), drawdescription(), UniverseUtil::getCurrentPlayer(), FactionUtil::GetFactionName(), SaveGame::getMissionData(), FactionUtil::GetNumFactions(), UniverseUtil::getPlayerX(), UnitUtil::getRelationFromFaction(), FactionUtil::GetSparkColor(), VegaConfig::getVariable(), GFXBlendMode(), GFXDisable(), GFXEnable(), i, int, INVSRCALPHA, j, LIGHTING, Cockpit::savegame, TextPlane::SetCharSize(), TextPlane::SetPos(), TextPlane::SetSize(), TextPlane::SetText(), size, SRCALPHA, TEXTURE0, XMLSupport::tostring(), and vs_config.
Referenced by Draw().
|
static |
Definition at line 312 of file navitemstodraw.h.
References GFXColor::a, GFXColor::b, UniverseUtil::cos(), dxyz(), float, GFXColor::g, GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, j, LIGHTING, QVector, GFXColor::r, UniverseUtil::sin(), size, SRCALPHA, TEXTURE0, x, and y.
Referenced by Draw().
void NavigationSystem::DrawObjectives | ( | ) |
Definition at line 819 of file navscreen.cpp.
References _Universe, Universe::AccessCockpit(), checkbit(), DrawObjectivesTextPlane(), and Cockpit::GetParent().
Referenced by Draw().
Definition at line 140 of file navitemstodraw.h.
References UniverseUtil::cos(), GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, UniverseUtil::sin(), SRCALPHA, and TEXTURE0.
Referenced by drawlistitem().
void NavigationSystem::DrawSectorList | ( | ) |
Definition at line 660 of file navscreen.cpp.
References Beautify(), NavigationSystem::CachedSectorIterator::done(), drawdescription(), NavigationSystem::CachedSectorIterator::getIndex(), NavigationSystem::CachedSectorIterator::SectorInfo::GetName(), NavigationSystem::CachedSectorIterator::SectorInfo::GetSubsystemIndex(), NavigationSystem::CachedSectorIterator::SectorInfo::GetSubsystemSize(), GFXBlendMode(), GFXDisable(), height, i, index, INVSRCALPHA, LIGHTING, NavigationSystem::CachedSectorIterator::seek(), NavigationSystem::CachedSectorIterator::size(), SRCALPHA, TestIfInRange(), TEXTURE0, and width.
Referenced by Draw().
void NavigationSystem::DrawShip | ( | ) |
Definition at line 624 of file navscreen.cpp.
References _Universe, Universe::AccessCockpit(), TextPlane::col, Cockpit::GetParent(), VegaConfig::getVariable(), GFXBlendMode(), GFXDisable(), GFXEnable(), INVSRCALPHA, LIGHTING, MakeUnitXMLPretty(), XMLSupport::parse_float(), SRCALPHA, TEXTURE0, vs_config, and Unit::WriteUnitString().
Referenced by Draw().
Definition at line 169 of file navitemstodraw.h.
References GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), i, INVSRCALPHA, LIGHTING, SRCALPHA, and TEXTURE0.
Referenced by drawlistitem().
void NavigationSystem::DrawSystem | ( | ) |
Definition at line 48 of file drawsystem.cpp.
References _Universe, Universe::AccessCockpit(), Universe::activeStarSystem(), ASTEROIDPTR, TextPlane::bgcol, blah, bleh, checkbit(), TextPlane::col, TextPlane::Draw(), navdrawlist::draw(), drawlistitem(), DrawTargetCorners(), StarSystemGent::faction, float, navdrawlist::get_n_contents(), VegaConfig::getColor(), UniverseUtil::getCurrentPlayer(), FactionUtil::GetFactionIndex(), FactionUtil::GetFactionName(), StarSystem::getFileName(), UniverseUtil::GetGalaxyFaction(), StarSystem::getName(), Cockpit::GetParent(), UniverseUtil::getPlayerX(), getStarSystemSector(), navdrawlist::gettailunit(), UnitContainer::GetUnit(), UniverseUtil::getUnitList(), VegaConfig::getVariable(), Unit::InRange(), navdrawlist::insert(), UnitUtil::isPlayerStarship(), UnitUtil::isSignificant(), UnitUtil::isSun(), MISSILEPTR, navambiguous, navambiguoussize, navasteroid, navasteroidsize, navcapship, navcapshipsize, navfighter, navfightersize, navjump, navjumpsize, navmissile, navmissilesize, navnebula, navnebulasize, navplanet, navplanetsize, navstation, navstationsize, navsun, navsunsize, NEBULAPTR, XMLSupport::parse_float(), PLANETPTR, QVector, navdrawlist::rotate(), TextPlane::SetPos(), TextPlane::SetText(), UniverseUtil::sqrt(), StarSystemGent::systemname, Unit::Target(), TestIfInRange(), TestIfInRangeBlk(), TestIfInRangeRad(), UNITPTR, unsetbit(), vs_config, and navdrawlist::wipe().
Referenced by Draw().
|
static |
Definition at line 272 of file navitemstodraw.h.
References GFXBegin(), GFXBlendMode(), GFXColorf(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLINE, GFXVertex3f(), INVSRCALPHA, LIGHTING, SRCALPHA, and TEXTURE0.
Referenced by DrawGalaxy(), and DrawSystem().
Definition at line 897 of file navscreen.cpp.
References UniverseUtil::cos(), UniverseUtil::sin(), and UniverseUtil::sqrt().
Referenced by DrawNavCircle().
std::string NavigationSystem::getCurrentSystem | ( | ) |
Definition at line 971 of file navscreen.cpp.
References _Universe, Universe::activeStarSystem(), StarSystem::getFileName(), and NavigationSystem::CachedSystemIterator::size().
Referenced by GameCockpit::Draw(), and DrawGalaxy().
std::string NavigationSystem::getDestinationSystem | ( | ) |
Definition at line 983 of file navscreen.cpp.
References _Universe, Universe::activeStarSystem(), StarSystem::getFileName(), and NavigationSystem::CachedSystemIterator::size().
std::string NavigationSystem::getFocusedSystem | ( | ) |
Definition at line 989 of file navscreen.cpp.
References _Universe, Universe::activeStarSystem(), StarSystem::getFileName(), and NavigationSystem::CachedSystemIterator::size().
|
inlinestatic |
Definition at line 345 of file navscreen.h.
References mousestat.
Referenced by SetMouseFlipStatus().
std::string NavigationSystem::getSelectedSystem | ( | ) |
Definition at line 977 of file navscreen.cpp.
References _Universe, Universe::activeStarSystem(), StarSystem::getFileName(), and NavigationSystem::CachedSystemIterator::size().
Referenced by GameCockpit::Draw(), and GameCockpit::GetNavSelectedSystem().
void NavigationSystem::IntersectBorder | ( | float & | x, |
float & | y, | ||
const float & | x1, | ||
const float & | y1 | ||
) | const |
Definition at line 1300 of file navscreen.cpp.
References intersect().
Referenced by DrawGalaxy().
Definition at line 83 of file navscreen.cpp.
References lookupMouseButton(), mousestat, mousex, mousey, WS_MOUSE_DOWN, WS_WHEEL_DOWN, WS_WHEEL_UP, x, and y.
Referenced by BaseInterface::ClickWin().
bool NavigationSystem::ParseFile | ( | string | filename) |
Definition at line 6 of file navparse.h.
References GFXColor::a, GFXColor::b, VSFileSystem::CockpitFile, dosetbit(), f, GFXColor::g, FactionUtil::GetFactionName(), FactionUtil::GetNumFactions(), k, Mesh::LoadMesh(), next, VSFileSystem::Ok, GFXColor::r, retrievedata(), ScreenToCoord(), TextPlane::SetPos(), TextPlane::SetSize(), and Vector.
Referenced by Setup().
void NavigationSystem::ScreenToCoord | ( | float & | x) |
Definition at line 1364 of file navscreen.cpp.
Referenced by ParseFile(), and Setup().
|
inline |
Definition at line 334 of file navscreen.h.
Referenced by GameCockpit::ScrollAllVDU().
void NavigationSystem::setCurrentSystem | ( | string | newSystem) |
Definition at line 933 of file navscreen.cpp.
References i, and NavigationSystem::CachedSystemIterator::size().
Referenced by GameCockpit::visitSystem().
void NavigationSystem::SetDraw | ( | bool | n) |
Definition at line 828 of file navscreen.cpp.
References ClearPriorities(), and Setup().
Referenced by GameCockpit::SetDrawNavSystem().
void NavigationSystem::SetMouseFlipStatus | ( | ) |
Definition at line 860 of file navscreen.cpp.
References getMouseButtonStatus(), i, and mousestat.
Referenced by Draw().
void NavigationSystem::Setup | ( | ) |
Definition at line 93 of file navscreen.cpp.
References _Universe, GFXColor::a, Universe::AccessCockpit(), Universe::activeStarSystem(), GFXColor::b, float, GFXColor::g, g_game, VegaConfig::getColor(), StarSystem::getFileName(), FactionUtil::GetNumFactions(), getSaveData(), UniverseUtil::getSystemFile(), VegaConfig::getVariable(), i, NavComputer::init(), NavigationSystem::CachedSystemIterator::init(), NavigationSystem::CachedSectorIterator::init(), mousex, mousey, NAVTOTALMESHCOUNT, XMLSupport::parse_bool(), XMLSupport::parse_int(), ParseFile(), GFXColor::r, ScreenToCoord(), unsetbit(), Cockpit::visitSystem(), vs_config, VSFileSystem::vs_fprintf(), game_data_t::x_resolution, and game_data_t::y_resolution.
Referenced by GameCockpit::Draw(), and SetDraw().
bool NavigationSystem::TestIfInRange | ( | float & | x1, |
float & | x2, | ||
float & | y1, | ||
float & | y2, | ||
float | tx, | ||
float | ty | ||
) |
Definition at line 1315 of file navscreen.cpp.
Referenced by DrawButton(), DrawGalaxy(), DrawSectorList(), and DrawSystem().
Definition at line 1326 of file navscreen.cpp.
Referenced by DrawGalaxy(), and DrawSystem().
void NavigationSystem::updatePath | ( | ) |
|
friend |
Definition at line 135 of file navscreen.h.
|
friend |
Definition at line 136 of file navscreen.h.
|
friend |
Definition at line 137 of file navscreen.h.
|
friend |
Definition at line 138 of file navscreen.h.
|
friend |
Definition at line 133 of file navscreen.h.
|
friend |
Definition at line 132 of file navscreen.h.
Referenced by NavigationSystem().
|
friend |
Definition at line 139 of file navscreen.h.
|
friend |
Definition at line 134 of file navscreen.h.
|
static |
Definition at line 341 of file navscreen.h.
Referenced by getMouseButtonStatus(), mouseClick(), and SetMouseFlipStatus().
|
static |
Definition at line 339 of file navscreen.h.
Referenced by Draw(), mouseClick(), mouseDrag(), mouseMotion(), and Setup().
|
static |
Definition at line 340 of file navscreen.h.
Referenced by Draw(), mouseClick(), mouseDrag(), mouseMotion(), and Setup().
PathManager* NavigationSystem::pathman |
Definition at line 130 of file navscreen.h.
Referenced by NavComputer::NavComputer(), NavigationSystem(), NavPath::setDestinationNode(), NavPath::setSourceNode(), and GameCockpit::visitSystem().