Added destinations list for 'tour guide'
This commit is contained in:
parent
66460c1331
commit
6410f84eb2
|
@ -84,6 +84,7 @@ CelestiaCore::CelestiaCore() :
|
|||
galaxies(NULL),
|
||||
asterisms(NULL),
|
||||
favorites(NULL),
|
||||
destinations(NULL),
|
||||
sim(NULL),
|
||||
renderer(NULL),
|
||||
overlay(NULL),
|
||||
|
@ -162,6 +163,12 @@ const FavoritesList* CelestiaCore::getFavorites()
|
|||
}
|
||||
|
||||
|
||||
const DestinationList* CelestiaCore::getDestinations()
|
||||
{
|
||||
return destinations;
|
||||
}
|
||||
|
||||
|
||||
// Used in the super-secret edit mode
|
||||
void showSelectionInfo(const Selection& sel)
|
||||
{
|
||||
|
@ -1081,6 +1088,16 @@ bool CelestiaCore::initSimulation()
|
|||
}
|
||||
}
|
||||
|
||||
// Load destinations list
|
||||
if (config->destinationsFile != "")
|
||||
{
|
||||
ifstream destfile(config->destinationsFile.c_str());
|
||||
if (destfile.good())
|
||||
{
|
||||
destinations = ReadDestinationList(destfile);
|
||||
}
|
||||
}
|
||||
|
||||
sim = new Simulation();
|
||||
sim->setStarDatabase(starDB, solarSystemCatalog, galaxies);
|
||||
sim->setFaintestVisible(config->faintestVisible);
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include "solarsys.h"
|
||||
#include "config.h"
|
||||
#include "favorites.h"
|
||||
#include "destination.h"
|
||||
#include "overlay.h"
|
||||
#include "command.h"
|
||||
#include "execution.h"
|
||||
|
@ -88,6 +89,8 @@ class CelestiaCore
|
|||
void addFavorite(std::string);
|
||||
const FavoritesList* getFavorites();
|
||||
|
||||
const DestinationList* getDestinations();
|
||||
|
||||
int getTimeZoneBias() const;
|
||||
void setTimeZoneBias(int);
|
||||
|
||||
|
@ -117,6 +120,7 @@ class CelestiaCore
|
|||
AsterismList* asterisms;
|
||||
|
||||
FavoritesList* favorites;
|
||||
DestinationList* destinations;
|
||||
|
||||
Simulation* sim;
|
||||
Renderer* renderer;
|
||||
|
|
|
@ -56,6 +56,7 @@ CelestiaConfig* ReadCelestiaConfig(string filename)
|
|||
config->faintestVisible = 6.0f;
|
||||
configParams->getNumber("FaintestVisibleMagnitude", config->faintestVisible);
|
||||
configParams->getString("FavoritesFile", config->favoritesFile);
|
||||
configParams->getString("DestinationFile", config->destinationsFile);
|
||||
configParams->getString("InitScript", config->initScriptFile);
|
||||
configParams->getString("DemoScript", config->demoScriptFile);
|
||||
configParams->getString("AsterismsFile", config->asterismsFile);
|
||||
|
|
|
@ -26,6 +26,7 @@ struct CelestiaConfig
|
|||
std::string favoritesFile;
|
||||
std::string initScriptFile;
|
||||
std::string demoScriptFile;
|
||||
std::string destinationsFile;
|
||||
std::string mainFont;
|
||||
std::string labelFont;
|
||||
std::string logoTextureFile;
|
||||
|
|
Loading…
Reference in a new issue