Backport new location features from 1.7
parent
0503c30d76
commit
09d8ab0187
|
@ -15,46 +15,75 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
static map<string, uint32> FeatureNameToFlag;
|
||||
static map<string, Location::FeatureType> FeatureNameToFlag;
|
||||
static bool featureTableInitialized = false;
|
||||
|
||||
struct FeatureNameEntry
|
||||
{
|
||||
const char* name;
|
||||
uint32 flag;
|
||||
Location::FeatureType flag;
|
||||
};
|
||||
|
||||
FeatureNameEntry FeatureNames[] =
|
||||
{
|
||||
{ "AA", Location::Crater },
|
||||
{ "VA", Location::Vallis },
|
||||
{ "MO", Location::Mons },
|
||||
{ "PM", Location::Planum },
|
||||
{ "CM", Location::Chasma },
|
||||
{ "PE", Location::Patera },
|
||||
{ "ME", Location::Mare },
|
||||
{ "RU", Location::Rupes },
|
||||
{ "TE", Location::Tessera },
|
||||
{ "RE", Location::Regio },
|
||||
{ "CH", Location::Chaos },
|
||||
{ "TA", Location::Terra },
|
||||
{ "AL", Location::Albedo },
|
||||
{ "AR", Location::Arcus },
|
||||
{ "AS", Location::Astrum },
|
||||
{ "CA", Location::Catena },
|
||||
{ "CB", Location::Cavus },
|
||||
{ "CH", Location::Chaos },
|
||||
{ "CM", Location::Chasma },
|
||||
{ "CO", Location::Colles },
|
||||
{ "CR", Location::Corona },
|
||||
{ "DO", Location::Dorsum },
|
||||
{ "FO", Location::Fossa },
|
||||
{ "CA", Location::Catena },
|
||||
{ "MN", Location::Mensa },
|
||||
{ "RI", Location::Rima },
|
||||
{ "UN", Location::Undae },
|
||||
{ "TH", Location::Tholus },
|
||||
{ "RT", Location::Reticulum },
|
||||
{ "PL", Location::Planitia },
|
||||
{ "LI", Location::Linea },
|
||||
{ "FL", Location::Fluctus },
|
||||
{ "FR", Location::Farrum },
|
||||
{ "LF", Location::LandingSite },
|
||||
{ "ER", Location::EruptiveCenter },
|
||||
{ "FA", Location::Facula },
|
||||
{ "FR", Location::Farrum },
|
||||
{ "FE", Location::Flexus },
|
||||
{ "FL", Location::Fluctus },
|
||||
{ "FM", Location::Flumen },
|
||||
{ "FO", Location::Fossa },
|
||||
{ "FR", Location::Farrum },
|
||||
{ "FT", Location::Fretum },
|
||||
{ "IN", Location::Insula },
|
||||
{ "LA", Location::Labes },
|
||||
{ "LB", Location::Labyrinthus },
|
||||
{ "LU", Location::Lacuna },
|
||||
{ "LC", Location::Lacus },
|
||||
{ "LF", Location::LandingSite },
|
||||
{ "LG", Location::Large },
|
||||
{ "LE", Location::Lenticula },
|
||||
{ "LI", Location::Linea },
|
||||
{ "LN", Location::Lingula },
|
||||
{ "MA", Location::Macula },
|
||||
{ "ME", Location::Mare },
|
||||
{ "MN", Location::Mensa },
|
||||
{ "MO", Location::Mons },
|
||||
{ "OC", Location::Oceanus },
|
||||
{ "PA", Location::Palus },
|
||||
{ "PE", Location::Patera },
|
||||
{ "PL", Location::Planitia },
|
||||
{ "PM", Location::Planum },
|
||||
{ "PU", Location::Plume },
|
||||
{ "PR", Location::Promontorium },
|
||||
{ "RE", Location::Regio },
|
||||
{ "RI", Location::Rima },
|
||||
{ "RT", Location::Reticulum },
|
||||
{ "RU", Location::Rupes },
|
||||
{ "SA", Location::Saxum },
|
||||
{ "SF", Location::Satellite },
|
||||
{ "SC", Location::Scopulus },
|
||||
{ "SE", Location::Serpens },
|
||||
{ "SI", Location::Sinus },
|
||||
{ "SU", Location::Sulcus },
|
||||
{ "TA", Location::Terra },
|
||||
{ "TE", Location::Tessera },
|
||||
{ "TH", Location::Tholus },
|
||||
{ "UN", Location::Undae },
|
||||
{ "VA", Location::Vallis },
|
||||
{ "VS", Location::Vastitas },
|
||||
{ "VI", Location::Virga },
|
||||
{ "XX", Location::Other },
|
||||
{ "City", Location::City },
|
||||
{ "Observatory", Location::Observatory },
|
||||
|
@ -144,13 +173,13 @@ void Location::setInfoURL(const string&)
|
|||
}
|
||||
|
||||
|
||||
uint32 Location::getFeatureType() const
|
||||
Location::FeatureType Location::getFeatureType() const
|
||||
{
|
||||
return featureType;
|
||||
}
|
||||
|
||||
|
||||
void Location::setFeatureType(uint32 _featureType)
|
||||
void Location::setFeatureType(Location::FeatureType _featureType)
|
||||
{
|
||||
featureType = _featureType;
|
||||
}
|
||||
|
@ -167,13 +196,13 @@ static void initFeatureTypeTable()
|
|||
}
|
||||
|
||||
|
||||
uint32 Location::parseFeatureType(const string& s)
|
||||
Location::FeatureType Location::parseFeatureType(const string& s)
|
||||
{
|
||||
if (!featureTableInitialized)
|
||||
initFeatureTypeTable();
|
||||
|
||||
int flag = FeatureNameToFlag[s];
|
||||
return flag != 0 ? flag : (uint32) Other;
|
||||
FeatureType flag = FeatureNameToFlag[s];
|
||||
return flag != (FeatureType) 0 ? flag : Other;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -36,9 +36,6 @@ class Location
|
|||
float getImportance() const;
|
||||
void setImportance(float);
|
||||
|
||||
uint32 getFeatureType() const;
|
||||
void setFeatureType(uint32);
|
||||
|
||||
std::string getInfoURL() const;
|
||||
void setInfoURL(const std::string&);
|
||||
|
||||
|
@ -54,43 +51,71 @@ class Location
|
|||
Point3d getPlanetocentricPosition(double) const;
|
||||
Point3d getHeliocentricPosition(double) const;
|
||||
|
||||
static uint32 parseFeatureType(const std::string&);
|
||||
typedef uint64_t FeatureType;
|
||||
static const FeatureType City = 0x0000000000000001ull;
|
||||
static const FeatureType Observatory = 0x0000000000000002ull;
|
||||
static const FeatureType LandingSite = 0x0000000000000004ull;
|
||||
static const FeatureType Crater = 0x0000000000000008ull;
|
||||
static const FeatureType Vallis = 0x0000000000000010ull;
|
||||
static const FeatureType Mons = 0x0000000000000020ull;
|
||||
static const FeatureType Planum = 0x0000000000000040ull;
|
||||
static const FeatureType Chasma = 0x0000000000000080ull;
|
||||
static const FeatureType Patera = 0x0000000000000100ull;
|
||||
static const FeatureType Mare = 0x0000000000000200ull;
|
||||
static const FeatureType Rupes = 0x0000000000000400ull;
|
||||
static const FeatureType Tessera = 0x0000000000000800ull;
|
||||
static const FeatureType Regio = 0x0000000000001000ull;
|
||||
static const FeatureType Chaos = 0x0000000000002000ull;
|
||||
static const FeatureType Terra = 0x0000000000004000ull;
|
||||
static const FeatureType Astrum = 0x0000000000008000ull;
|
||||
static const FeatureType Corona = 0x0000000000010000ull;
|
||||
static const FeatureType Dorsum = 0x0000000000020000ull;
|
||||
static const FeatureType Fossa = 0x0000000000040000ull;
|
||||
static const FeatureType Catena = 0x0000000000080000ull;
|
||||
static const FeatureType Mensa = 0x0000000000100000ull;
|
||||
static const FeatureType Rima = 0x0000000000200000ull;
|
||||
static const FeatureType Undae = 0x0000000000400000ull;
|
||||
static const FeatureType Tholus = 0x0000000000800000ull; // Small domical mountain or hill
|
||||
static const FeatureType Reticulum = 0x0000000001000000ull;
|
||||
static const FeatureType Planitia = 0x0000000002000000ull;
|
||||
static const FeatureType Linea = 0x0000000004000000ull;
|
||||
static const FeatureType Fluctus = 0x0000000008000000ull;
|
||||
static const FeatureType Farrum = 0x0000000010000000ull;
|
||||
static const FeatureType EruptiveCenter = 0x0000000020000000ull; // Active volcanic centers on Io
|
||||
static const FeatureType Insula = 0x0000000040000000ull; // Islands
|
||||
static const FeatureType Albedo = 0x0000000080000000ull;
|
||||
static const FeatureType Arcus = 0x0000000100000000ull;
|
||||
static const FeatureType Cavus = 0x0000000200000000ull;
|
||||
static const FeatureType Colles = 0x0000000400000000ull;
|
||||
static const FeatureType Facula = 0x0000000800000000ull;
|
||||
static const FeatureType Flexus = 0x0000001000000000ull;
|
||||
static const FeatureType Flumen = 0x0000002000000000ull;
|
||||
static const FeatureType Fretum = 0x0000004000000000ull;
|
||||
static const FeatureType Labes = 0x0000008000000000ull;
|
||||
static const FeatureType Labyrinthus = 0x0000010000000000ull;
|
||||
static const FeatureType Lacuna = 0x0000020000000000ull;
|
||||
static const FeatureType Lacus = 0x0000040000000000ull;
|
||||
static const FeatureType Large = 0x0000080000000000ull;
|
||||
static const FeatureType Lenticula = 0x0000100000000000ull;
|
||||
static const FeatureType Lingula = 0x0000200000000000ull;
|
||||
static const FeatureType Macula = 0x0000400000000000ull;
|
||||
static const FeatureType Oceanus = 0x0000800000000000ull;
|
||||
static const FeatureType Palus = 0x0001000000000000ull;
|
||||
static const FeatureType Plume = 0x0002000000000000ull;
|
||||
static const FeatureType Promontorium = 0x0004000000000000ull;
|
||||
static const FeatureType Satellite = 0x0008000000000000ull;
|
||||
static const FeatureType Scopulus = 0x0010000000000000ull;
|
||||
static const FeatureType Serpens = 0x0020000000000000ull;
|
||||
static const FeatureType Sinus = 0x0040000000000000ull;
|
||||
static const FeatureType Sulcus = 0x0080000000000000ull;
|
||||
static const FeatureType Vastitas = 0x0100000000000000ull;
|
||||
static const FeatureType Virga = 0x0200000000000000ull;
|
||||
static const FeatureType Saxum = 0x0400000000000000ull;
|
||||
static const FeatureType Other = 0x8000000000000000ull;
|
||||
|
||||
enum FeatureType
|
||||
{
|
||||
City = 0x00000001,
|
||||
Observatory = 0x00000002,
|
||||
LandingSite = 0x00000004,
|
||||
Crater = 0x00000008,
|
||||
Vallis = 0x00000010,
|
||||
Mons = 0x00000020,
|
||||
Planum = 0x00000040,
|
||||
Chasma = 0x00000080,
|
||||
Patera = 0x00000100,
|
||||
Mare = 0x00000200,
|
||||
Rupes = 0x00000400,
|
||||
Tessera = 0x00000800,
|
||||
Regio = 0x00001000,
|
||||
Chaos = 0x00002000,
|
||||
Terra = 0x00004000,
|
||||
Astrum = 0x00008000,
|
||||
Corona = 0x00010000,
|
||||
Dorsum = 0x00020000,
|
||||
Fossa = 0x00040000,
|
||||
Catena = 0x00080000,
|
||||
Mensa = 0x00100000,
|
||||
Rima = 0x00200000,
|
||||
Undae = 0x00400000,
|
||||
Tholus = 0x00800000, // Small domical mountain or hill
|
||||
Reticulum = 0x01000000,
|
||||
Planitia = 0x02000000,
|
||||
Linea = 0x04000000,
|
||||
Fluctus = 0x08000000,
|
||||
Farrum = 0x10000000,
|
||||
EruptiveCenter = 0x20000000, // Active volcanic centers on Io
|
||||
Insula = 0x40000000, // Islands
|
||||
Other = 0x80000000,
|
||||
};
|
||||
FeatureType getFeatureType() const;
|
||||
void setFeatureType(FeatureType);
|
||||
static FeatureType parseFeatureType(const std::string&);
|
||||
|
||||
private:
|
||||
Body* parent;
|
||||
|
@ -99,7 +124,7 @@ class Location
|
|||
Vec3f position;
|
||||
float size;
|
||||
float importance;
|
||||
uint32 featureType;
|
||||
FeatureType featureType;
|
||||
bool overrideLabelColor;
|
||||
Color labelColor;
|
||||
std::string* infoURL;
|
||||
|
|
|
@ -70,7 +70,7 @@ Observer::Observer() :
|
|||
trackingOrientation(1.0f, 0.0f, 0.0f, 0.0f),
|
||||
fov((float) (PI / 4.0)),
|
||||
reverseFlag(false),
|
||||
locationFilter(~0u)
|
||||
locationFilter(~0ull)
|
||||
{
|
||||
frame = new ObserverFrame();
|
||||
updateUniversal();
|
||||
|
@ -530,13 +530,13 @@ void Observer::setDisplayedSurface(const string& surf)
|
|||
}
|
||||
|
||||
|
||||
uint32 Observer::getLocationFilter() const
|
||||
Location::FeatureType Observer::getLocationFilter() const
|
||||
{
|
||||
return locationFilter;
|
||||
}
|
||||
|
||||
|
||||
void Observer::setLocationFilter(uint32 _locationFilter)
|
||||
void Observer::setLocationFilter(Location::FeatureType _locationFilter)
|
||||
{
|
||||
locationFilter = _locationFilter;
|
||||
}
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#define _CELENGINE_OBSERVER_H_
|
||||
|
||||
#include <celengine/frame.h>
|
||||
#include <celengine/location.h>
|
||||
|
||||
class ObserverFrame
|
||||
{
|
||||
|
@ -140,8 +141,8 @@ public:
|
|||
const std::string& getDisplayedSurface() const;
|
||||
void setDisplayedSurface(const std::string&);
|
||||
|
||||
uint32 getLocationFilter() const;
|
||||
void setLocationFilter(uint32);
|
||||
Location::FeatureType getLocationFilter() const;
|
||||
void setLocationFilter(Location::FeatureType);
|
||||
|
||||
void gotoSelection(const Selection&,
|
||||
double gotoTime,
|
||||
|
@ -304,7 +305,7 @@ public:
|
|||
float fov;
|
||||
bool reverseFlag;
|
||||
|
||||
uint32 locationFilter;
|
||||
Location::FeatureType locationFilter;
|
||||
std::string displayedSurface;
|
||||
};
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ Renderer::Renderer() :
|
|||
minOrbitSize(MinOrbitSizeForLabel),
|
||||
distanceLimit(1.0e6f),
|
||||
minFeatureSize(MinFeatureSizeForLabel),
|
||||
locationFilter(~0u),
|
||||
locationFilter(~0ull),
|
||||
colorTemp(NULL),
|
||||
#ifdef USE_HDR
|
||||
sceneTexture(0),
|
||||
|
@ -6887,7 +6887,7 @@ void Renderer::renderLocations(const Body& body,
|
|||
double z = viewNormal * labelPos;
|
||||
labelPos *= planetZ / z;
|
||||
|
||||
uint32 featureType = location.getFeatureType();
|
||||
Location::FeatureType featureType = location.getFeatureType();
|
||||
MarkerRepresentation* locationMarker = NULL;
|
||||
if (featureType & Location::City)
|
||||
locationMarker = &cityRep;
|
||||
|
|
|
@ -754,7 +754,7 @@ class Renderer
|
|||
float minOrbitSize;
|
||||
float distanceLimit;
|
||||
float minFeatureSize;
|
||||
uint32 locationFilter;
|
||||
Location::FeatureType locationFilter;
|
||||
|
||||
SkyVertex* skyVertices;
|
||||
uint32* skyIndices;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <celengine/orbit.h>
|
||||
#include <celengine/samporbit.h>
|
||||
#include <celengine/xyzvbinary.h>
|
||||
#include <celutil/bytes.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ const char* CelxLua::ClassNames[] =
|
|||
|
||||
CelxLua::FlagMap CelxLua::RenderFlagMap;
|
||||
CelxLua::FlagMap CelxLua::LabelFlagMap;
|
||||
CelxLua::FlagMap CelxLua::LocationFlagMap;
|
||||
CelxLua::FlagMap64 CelxLua::LocationFlagMap;
|
||||
CelxLua::FlagMap CelxLua::BodyTypeMap;
|
||||
CelxLua::FlagMap CelxLua::OverlayElementMap;
|
||||
CelxLua::FlagMap CelxLua::OrbitVisibilityMap;
|
||||
|
@ -197,7 +197,35 @@ void CelxLua::initLocationFlagMap()
|
|||
LocationFlagMap["fluctus"] = Location::Fluctus;
|
||||
LocationFlagMap["farrum"] = Location::Farrum;
|
||||
LocationFlagMap["insula"] = Location::Insula;
|
||||
LocationFlagMap["albedo"] = Location::Albedo;
|
||||
LocationFlagMap["arcus"] = Location::Arcus;
|
||||
LocationFlagMap["cavus"] = Location::Cavus;
|
||||
LocationFlagMap["colles"] = Location::Colles;
|
||||
LocationFlagMap["facula"] = Location::Facula;
|
||||
LocationFlagMap["flexus"] = Location::Flexus;
|
||||
LocationFlagMap["flumen"] = Location::Flumen;
|
||||
LocationFlagMap["fretum"] = Location::Fretum;
|
||||
LocationFlagMap["labes"] = Location::Labes;
|
||||
LocationFlagMap["labyrinthus"] = Location::Labyrinthus;
|
||||
LocationFlagMap["lacuna"] = Location::Lacuna;
|
||||
LocationFlagMap["lacus"] = Location::Lacus;
|
||||
LocationFlagMap["large"] = Location::Large;
|
||||
LocationFlagMap["lenticula"] = Location::Lenticula;
|
||||
LocationFlagMap["lingula"] = Location::Lingula;
|
||||
LocationFlagMap["macula"] = Location::Macula;
|
||||
LocationFlagMap["oceanus"] = Location::Oceanus;
|
||||
LocationFlagMap["palus"] = Location::Palus;
|
||||
LocationFlagMap["plume"] = Location::Plume;
|
||||
LocationFlagMap["promontorium"] = Location::Promontorium;
|
||||
LocationFlagMap["satellite"] = Location::Satellite;
|
||||
LocationFlagMap["scopulus"] = Location::Scopulus;
|
||||
LocationFlagMap["serpens"] = Location::Serpens;
|
||||
LocationFlagMap["sinus"] = Location::Sinus;
|
||||
LocationFlagMap["sulcus"] = Location::Sulcus;
|
||||
LocationFlagMap["vastitas"] = Location::Vastitas;
|
||||
LocationFlagMap["virga"] = Location::Virga;
|
||||
LocationFlagMap["other"] = Location::Other;
|
||||
LocationFlagMap["saxum"] = Location::Saxum;
|
||||
}
|
||||
|
||||
void CelxLua::initOverlayElementMap()
|
||||
|
|
|
@ -140,6 +140,7 @@ public:
|
|||
|
||||
// String to flag mappings
|
||||
typedef std::map<std::string, uint32> FlagMap;
|
||||
typedef std::map<std::string, uint64_t> FlagMap64;
|
||||
typedef std::map<std::string, Color*> ColorMap;
|
||||
|
||||
static void initMaps();
|
||||
|
@ -154,7 +155,7 @@ public:
|
|||
|
||||
static FlagMap RenderFlagMap;
|
||||
static FlagMap LabelFlagMap;
|
||||
static FlagMap LocationFlagMap;
|
||||
static FlagMap64 LocationFlagMap;
|
||||
static FlagMap BodyTypeMap;
|
||||
static FlagMap OverlayElementMap;
|
||||
static FlagMap OrbitVisibilityMap;
|
||||
|
|
|
@ -704,9 +704,9 @@ static int object_getinfo(lua_State* l)
|
|||
celx.setTable("importance", (lua_Number)location->getImportance());
|
||||
celx.setTable("infoURL", location->getInfoURL().c_str());
|
||||
|
||||
uint32 featureType = location->getFeatureType();
|
||||
Location::FeatureType featureType = location->getFeatureType();
|
||||
string featureName("Unknown");
|
||||
for (CelxLua::FlagMap::const_iterator it = CelxLua::LocationFlagMap.begin();
|
||||
for (CelxLua::FlagMap64::const_iterator it = CelxLua::LocationFlagMap.begin();
|
||||
it != CelxLua::LocationFlagMap.end(); it++)
|
||||
{
|
||||
if (it->second == featureType)
|
||||
|
|
|
@ -827,7 +827,7 @@ static int observer_setlocationflags(lua_State* l)
|
|||
}
|
||||
|
||||
lua_pushnil(l);
|
||||
int locationFlags = obs->getLocationFilter();
|
||||
Location::FeatureType locationFlags = obs->getLocationFilter();
|
||||
while (lua_next(l, -2) != 0)
|
||||
{
|
||||
string key;
|
||||
|
@ -854,7 +854,7 @@ static int observer_setlocationflags(lua_State* l)
|
|||
}
|
||||
else
|
||||
{
|
||||
int flag = CelxLua::LocationFlagMap[key];
|
||||
Location::FeatureType flag = CelxLua::LocationFlagMap[key];
|
||||
if (value)
|
||||
{
|
||||
locationFlags |= flag;
|
||||
|
@ -876,8 +876,8 @@ static int observer_getlocationflags(lua_State* l)
|
|||
celx.checkArgs(1, 1, "No arguments expected for observer:getlocationflags()");
|
||||
Observer* obs = this_observer(l);
|
||||
lua_newtable(l);
|
||||
CelxLua::FlagMap::const_iterator it = CelxLua::LocationFlagMap.begin();
|
||||
const int locationFlags = obs->getLocationFilter();
|
||||
CelxLua::FlagMap64::const_iterator it = CelxLua::LocationFlagMap.begin();
|
||||
const Location::FeatureType locationFlags = obs->getLocationFilter();
|
||||
while (it != CelxLua::LocationFlagMap.end())
|
||||
{
|
||||
string key = it->first;
|
||||
|
|
|
@ -19,15 +19,15 @@ static const int FeatureSizeSliderRange = 100;
|
|||
static const float MinFeatureSize = 1.0f;
|
||||
static const float MaxFeatureSize = 100.0f;
|
||||
|
||||
static const uint32 FilterOther = ~(Location::City |
|
||||
Location::Observatory |
|
||||
Location::LandingSite |
|
||||
Location::Crater |
|
||||
Location::Mons |
|
||||
Location::Terra |
|
||||
Location::EruptiveCenter |
|
||||
Location::Vallis |
|
||||
Location::Mare);
|
||||
static const Location::FeatureType FilterOther = ~(Location::City |
|
||||
Location::Observatory |
|
||||
Location::LandingSite |
|
||||
Location::Crater |
|
||||
Location::Mons |
|
||||
Location::Terra |
|
||||
Location::EruptiveCenter |
|
||||
Location::Vallis |
|
||||
Location::Mare);
|
||||
|
||||
static BOOL APIENTRY LocationsProc(HWND hDlg,
|
||||
UINT message,
|
||||
|
@ -60,8 +60,8 @@ static BOOL APIENTRY LocationsProc(HWND hDlg,
|
|||
case WM_COMMAND:
|
||||
{
|
||||
Observer* obs = dlg->appCore->getSimulation()->getActiveObserver();
|
||||
uint32 locationFilter = obs->getLocationFilter();
|
||||
|
||||
Location::FeatureType locationFilter = obs->getLocationFilter();
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_SHOW_CITIES:
|
||||
|
@ -172,7 +172,7 @@ LocationsDialog::LocationsDialog(HINSTANCE appInstance,
|
|||
}
|
||||
|
||||
|
||||
static void dlgCheck(HWND hDlg, WORD item, uint32 flags, uint32 f)
|
||||
static void dlgCheck(HWND hDlg, WORD item, uint64_t flags, uint64_t f)
|
||||
{
|
||||
SendDlgItemMessage(hDlg, item, BM_SETCHECK,
|
||||
((flags & f) != 0) ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||
|
@ -182,7 +182,7 @@ static void dlgCheck(HWND hDlg, WORD item, uint32 flags, uint32 f)
|
|||
void LocationsDialog::SetControls(HWND hDlg)
|
||||
{
|
||||
Observer* obs = appCore->getSimulation()->getActiveObserver();
|
||||
uint32 locFilter = obs->getLocationFilter();
|
||||
Location::FeatureType locFilter = obs->getLocationFilter();
|
||||
|
||||
dlgCheck(hDlg, IDC_SHOW_CITIES, locFilter, Location::City);
|
||||
dlgCheck(hDlg, IDC_SHOW_OBSERVATORIES, locFilter, Location::Observatory);
|
||||
|
|
|
@ -30,7 +30,7 @@ class LocationsDialog : public CelestiaWatcher
|
|||
CelestiaCore* appCore;
|
||||
HWND parent;
|
||||
HWND hwnd;
|
||||
int initialLocationFlags;
|
||||
Location::FeatureType initialLocationFlags;
|
||||
float initialFeatureSize;
|
||||
};
|
||||
|
||||
|
|
|
@ -176,7 +176,7 @@ struct AppPreferences
|
|||
int winY;
|
||||
int renderFlags;
|
||||
int labelMode;
|
||||
int locationFilter;
|
||||
Location::FeatureType locationFilter;
|
||||
int orbitMask;
|
||||
float visualMagnitude;
|
||||
float ambientLight;
|
||||
|
|
Loading…
Reference in New Issue