Landscape.cpp   Landscape.cpp 
skipping to change at line 43 skipping to change at line 43
#include <QVarLengthArray> #include <QVarLengthArray>
#include <QFile> #include <QFile>
#include <QDir> #include <QDir>
#include <QtAlgorithms> #include <QtAlgorithms>
Landscape::Landscape(float _radius) Landscape::Landscape(float _radius)
: radius(_radius) : radius(_radius)
, minBrightness(-1.) , minBrightness(-1.)
, landscapeBrightness(1.) , landscapeBrightness(1.)
, lightScapeBrightness(0.) , lightScapeBrightness(0.)
, validLandscape(false)
, rows(20) , rows(20)
, cols(40) , cols(40)
, angleRotateZ(0.) , angleRotateZ(0.)
, angleRotateZOffset(0.) , angleRotateZOffset(0.)
, sinMinAltitudeLimit(-0.035) //sin(-2 degrees)) , sinMinAltitudeLimit(-0.035) //sin(-2 degrees))
, defaultBortleIndex(-1) , defaultBortleIndex(-1)
, defaultFogSetting(-1) , defaultFogSetting(-1)
, defaultExtinctionCoefficient(-1.) , defaultExtinctionCoefficient(-1.)
, defaultTemperature(-1000.) , defaultTemperature(-1000.)
, defaultPressure(-2.) , defaultPressure(-2.)
, horizonPolygon(NULL) , horizonPolygon(NULL)
, fontSize(18) , fontSize(18)
{ {
validLandscape = 0;
} }
Landscape::~Landscape() Landscape::~Landscape()
{} {}
// Load attributes common to all landscapes // Load attributes common to all landscapes
void Landscape::loadCommon(const QSettings& landscapeIni, const QString& la ndscapeId) void Landscape::loadCommon(const QSettings& landscapeIni, const QString& la ndscapeId)
{ {
name = landscapeIni.value("landscape/name").toString(); name = landscapeIni.value("landscape/name").toString();
author = landscapeIni.value("landscape/author").toString(); author = landscapeIni.value("landscape/author").toString();
description = landscapeIni.value("landscape/description").toString() ; description = landscapeIni.value("landscape/description").toString() ;
description = description.replace(QRegExp("\\\\n\\s*\\\\n"), "<br /> "); description = description.replace(QRegExp("\\\\n\\s*\\\\n"), "<br /> ");
description = description.replace("\\n", " "); description = description.replace("\\n", " ");
if (name.isEmpty()) if (name.isEmpty())
{ {
qWarning() << "No valid landscape definition (no name) found for landscape ID " qWarning() << "No valid landscape definition (no name) found for landscape ID "
<< landscapeId << ". No landscape in use." << endl; << landscapeId << ". No landscape in use." << endl;
validLandscape = 0; validLandscape = false;
return; return;
} }
else else
{ {
validLandscape = 1; validLandscape = true;
} }
// Optional data // Optional data
rows = landscapeIni.value("landscape/tesselate_rows", 20).toInt(); rows = landscapeIni.value("landscape/tesselate_rows", 20).toInt();
cols = landscapeIni.value("landscape/tesselate_cols", 40).toInt(); cols = landscapeIni.value("landscape/tesselate_cols", 40).toInt();
if (landscapeIni.childGroups().contains("location")) if (landscapeIni.childGroups().contains("location"))
{ {
if (landscapeIni.contains("location/planet")) if (landscapeIni.contains("location/planet"))
location.planetName = landscapeIni.value("location/p lanet").toString(); location.planetName = landscapeIni.value("location/p lanet").toString();
 End of changes. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/