summaryrefslogtreecommitdiffhomepage
path: root/Stars45/StarSystem.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-01-30 17:41:24 +0100
committerAki <please@ignore.pl>2022-01-30 17:41:24 +0100
commit51657e10769faa2617d546a06c42e4c62a19bb50 (patch)
tree688ad8b61ac02e50974684b9b7d3f886fb469e5f /Stars45/StarSystem.cpp
parentdb987e23d5dd33a5db8764743facbb906ac22b0f (diff)
downloadstarshatter-51657e10769faa2617d546a06c42e4c62a19bb50.zip
starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.tar.gz
starshatter-51657e10769faa2617d546a06c42e4c62a19bb50.tar.bz2
Removed trailing whitespace all over the place
Diffstat (limited to 'Stars45/StarSystem.cpp')
-rw-r--r--Stars45/StarSystem.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/Stars45/StarSystem.cpp b/Stars45/StarSystem.cpp
index 3c91f99..dc85f87 100644
--- a/Stars45/StarSystem.cpp
+++ b/Stars45/StarSystem.cpp
@@ -108,7 +108,7 @@ static const int NAMELEN = 64;
StarSystem::StarSystem(const char* sys_name, Point l, int iff, int s)
: name(sys_name), affiliation(iff), sky_stars(0), sky_dust(0), loc(l), seq(s),
active_region(0), instantiated(false), ambient(0,0,0),
-sun_color(255,255,255), sun_scale(1), point_stars(0), poly_stars(0),
+sun_color(255,255,255), sun_scale(1), point_stars(0), poly_stars(0),
nebula(0), haze(0)
{
center = new(__FILE__,__LINE__) Orbital(this, "CG", Orbital::NOTHING, 1.0e35f, 0.0f, 0.0f, 0);
@@ -183,7 +183,7 @@ StarSystem::Load()
do {
delete term;
term = parser.ParseTerm();
-
+
if (term) {
TermDef* def = term->isDef();
if (def) {
@@ -210,7 +210,7 @@ StarSystem::Load()
imgname[0] = 0;
magname[0] = 0;
hazname[0] = 0;
-
+
for (int i = 0; i < val->elements()->size(); i++) {
TermDef* pdef = val->elements()->at(i)->isDef();
if (pdef) {
@@ -300,7 +300,7 @@ StarSystem::Load()
ParseTerrain(val);
}
}
-
+
}
}
}
@@ -1035,7 +1035,7 @@ StarSystem::Create()
}
loader->SetDataPath(0);
-
+
ListIter<OrbitalBody> star = bodies;
while (++star) {
CreateBody(*star);
@@ -1043,7 +1043,7 @@ StarSystem::Create()
ListIter<OrbitalBody> planet = star->Satellites();
while (++planet) {
CreateBody(*planet);
-
+
ListIter<OrbitalBody> moon = planet->Satellites();
while (++moon) {
CreateBody(*moon);
@@ -1070,8 +1070,8 @@ StarSystem::CreateBody(OrbitalBody& body)
PlanetRep* rep = new(__FILE__,__LINE__) PlanetRep(body.tex_name,
0,
- body.radius,
- starloc,
+ body.radius,
+ starloc,
body.tscale);
rep->SetLuminous(true);
@@ -1100,7 +1100,7 @@ StarSystem::CreateBody(OrbitalBody& body)
back_lights.append(back_light);
body.back_light = back_light;
}
- }
+ }
// planets and moons:
else {
@@ -1109,7 +1109,7 @@ StarSystem::CreateBody(OrbitalBody& body)
double rmax = 0;
double rmin = 0;
-
+
if (body.ring_max > 0) {
rmax = body.ring_max*body.radius;
rmin = body.ring_min*body.radius;
@@ -1148,7 +1148,7 @@ StarSystem::CreateBody(OrbitalBody& body)
if (body.tilt != 0) {
Matrix m;
m.Pitch(body.tilt);
-
+
rep->SetOrientation(m);
}
@@ -1173,7 +1173,7 @@ StarSystem::Destroy()
ListIter<OrbitalBody> planet = star->Satellites();
while (++planet) {
GRAPHIC_DESTROY(planet->rep);
-
+
ListIter<OrbitalBody> moon = planet->Satellites();
while (++moon) {
GRAPHIC_DESTROY(moon->rep);
@@ -1347,7 +1347,7 @@ StarSystem::SetActiveRegion(OrbitalRegion* rgn)
if (scene)
scene->SetAmbient(ambient);
}
-
+
ListIter<OrbitalBody> star = bodies;
while (++star) {
if (star->rep)
@@ -1394,7 +1394,7 @@ static BYTE max3(BYTE a, BYTE b, BYTE c)
else
if (b > c) return b;
else return c;
-}
+}
static BYTE min3(BYTE a, BYTE b, BYTE c)
{
@@ -1404,7 +1404,7 @@ static BYTE min3(BYTE a, BYTE b, BYTE c)
else
if (b < c) return b;
else return c;
-}
+}
void
StarSystem::ExecFrame()
@@ -1544,7 +1544,7 @@ StarSystem::ExecFrame()
star->back_light->SetActive(true);
}
}
-
+
ListIter<OrbitalBody> planet_iter = star->Satellites();
while (++planet_iter) {
OrbitalBody* planet = planet_iter.value();
@@ -1571,7 +1571,7 @@ StarSystem::ExecFrame()
pr->SetDaytime(false);
}
}
-
+
ListIter<OrbitalBody> moon_iter = planet->Satellites();
while (++moon_iter) {
OrbitalBody* moon = moon_iter.value();
@@ -1586,7 +1586,7 @@ StarSystem::ExecFrame()
if (moon == active_region->Primary()) {
pr->Hide();
}
-
+
else {
pr->Show();
pr->SetDaytime(true);
@@ -1867,7 +1867,7 @@ Orbital::Update()
// orbits are counter clockwise:
phase = -2 * PI * grade * StarSystem::Stardate() / period;
-
+
loc = primary->Location() + Point((double) (orbit * cos(phase)),
(double) (orbit * sin(phase)),
0);
@@ -1895,7 +1895,7 @@ Orbital::PredictLocation(double delta_t)
// orbits are(?) counter clockwise:
double predicted_phase = (double) (-2 * PI * grade * (StarSystem::Stardate()+delta_t) / period);
-
+
predicted_loc += Point((double) (orbit * cos(predicted_phase)),
(double) (orbit * sin(predicted_phase)),
0);