|
From: Yoda-JM <yo...@us...> - 2010-01-18 00:00:36
|
Module: performous
Branch: master
Commit: 5e911c84aef3c20b4c139ac803c49fa8b5bfcceb
Author: Vincent Le Ligeour <yo...@us...>
Date: Mon Jan 18 01:00:19 2010 +0100
Fixed some whitespaces
---
game/3dobject.cc | 6 +++---
game/3dobject.hh | 2 +-
game/backgrounds.cc | 2 +-
game/backgrounds.hh | 2 +-
game/configuration.cc | 2 +-
game/dancegraph.cc | 18 +++++++++---------
6 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/game/3dobject.cc b/game/3dobject.cc
index 0ce4f3d..9379613 100644
--- a/game/3dobject.cc
+++ b/game/3dobject.cc
@@ -40,13 +40,13 @@ void Object3d::loadWavefrontObj(std::string filepath, float scale) {
std::istringstream srow(row);
float x,y,z;
std::string tempst;
- if (row.substr(0,2) == "v ") { // Vertices
+ if (row.substr(0,2) == "v ") { // Vertices
srow >> tempst >> x >> y >> z;
m_vertices.push_back(Vertex(x*scale,y*scale,z*scale));
- } else if (row.substr(0,2) == "vt") { // Texture Coordinates
+ } else if (row.substr(0,2) == "vt") { // Texture Coordinates
srow >> tempst >> x >> y;
m_texcoords.push_back(TexCoord(x,y));
- } else if (row.substr(0,2) == "vn") { // Normals
+ } else if (row.substr(0,2) == "vn") { // Normals
srow >> tempst >> x >> y >> z;
double sum = std::abs(x)+std::abs(y)+std::abs(z);
if (sum == 0) throw std::runtime_error("Object "+filepath+" has invalid normal(s).");
diff --git a/game/3dobject.hh b/game/3dobject.hh
index 8761ca6..11f3840 100644
--- a/game/3dobject.hh
+++ b/game/3dobject.hh
@@ -17,7 +17,7 @@
struct Vertex {
Vertex(float x = 0, float y = 0, float z = 0): x(x), y(y), z(z) {}
float x;
- float y;
+ float y;
float z;
};
diff --git a/game/backgrounds.cc b/game/backgrounds.cc
index 4aaf895..bf99af4 100644
--- a/game/backgrounds.cc
+++ b/game/backgrounds.cc
@@ -37,7 +37,7 @@ void Backgrounds::reload_internal() {
if (diff > 0 && m_loading) std::cout << diff << " backgrounds loaded" << std::endl;
}
m_loading = false;
- {
+ {
boost::mutex::scoped_lock l(m_mutex);
random_shuffle(m_bgs.begin(), m_bgs.end());
m_dirty = false;
diff --git a/game/backgrounds.hh b/game/backgrounds.hh
index b687dc4..aa99bab 100644
--- a/game/backgrounds.hh
+++ b/game/backgrounds.hh
@@ -32,7 +32,7 @@ class Backgrounds: boost::noncopyable {
int empty() const { return m_bgs.empty(); };
/// returns random background
std::string getRandom();
-
+
private:
typedef std::vector<std::string> BGVector;
BGVector m_bgs;
diff --git a/game/configuration.cc b/game/configuration.cc
index 26d41b6..194c25f 100644
--- a/game/configuration.cc
+++ b/game/configuration.cc
@@ -72,7 +72,7 @@ namespace {
fmter % boost::io::group(std::setprecision(precision), double(m) * boost::get<T>(value));
return fmter.str();
}
-
+
fs::path origin; // The primary shared data folder
}
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 3969dae..a9d3266 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -61,7 +61,7 @@ namespace {
return "Way off!";
}
}
-
+
struct lessEnd {
bool operator()(const DanceNote& left, const DanceNote& right) {
return left.note.end < right.note.end;
@@ -105,10 +105,10 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_pressed_anim[i] = AnimValue(0.0, 4.0);
m_arrow_map[i] = -1;
}
-
+
if(m_song.danceTracks.empty())
throw std::runtime_error("Could not find any dance tracks.");
-
+
gameMode(0);
}
@@ -148,7 +148,7 @@ void DanceGraph::gameMode(int direction) {
else if (gm == "ez2-real") { m_pads = 7; std::copy(mapping7, mapping7+max_panels, m_arrow_map); }
else if (gm == "para-single") { m_pads = 5; std::copy(mapping5, mapping5+max_panels, m_arrow_map); }
else throw std::runtime_error("Unknown track " + gm);
-
+
difficultyDelta(0); // Construct new notes
}
@@ -371,7 +371,7 @@ void DanceGraph::draw(double time) {
// Draw the "neck" graph (beat lines)
drawBeats(time);
-
+
// Arrows on cursor
glColor3f(1.0f, 1.0f, 1.0f);
for (int arrow_i = 0; arrow_i < m_pads; ++arrow_i) {
@@ -381,7 +381,7 @@ void DanceGraph::draw(double time) {
float s = (5.0 - l) / 5.0;
drawArrow(arrow_i, m_arrows_cursor, x, y, s);
}
-
+
// Draw the notes
for (DanceNotes::iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
if (it->note.end - time < past) continue;
@@ -424,14 +424,14 @@ void DanceGraph::drawNote(DanceNote& note, double time) {
float yBeg = time2y(tBeg);
float yEnd = time2y(tEnd);
glutil::Color c(1.0f, 1.0f, 1.0f);
-
+
// Did we hit it?
if (note.isHit && std::abs(tEnd) < maxTolerance && note.hitAnim.getTarget() == 0) {
if (mine) note.hitAnim.setRate(1.0);
note.hitAnim.setTarget(1.0, false);
}
double glow = note.hitAnim.get();
-
+
if (yEnd - yBeg > arrowSize) {
// Draw holds
glColor4fv(c);
@@ -502,7 +502,7 @@ void DanceGraph::drawInfo(double time, double offsetX, Dimensions dimensions) {
m_text.dimensions.screenBottom(-0.35).middle(0.32 * dimensions.w() + offsetX);
m_text.draw(boost::lexical_cast<std::string>(unsigned(getScore())));
m_text.dimensions.screenBottom(-0.32).middle(0.32 * dimensions.w() + offsetX);
- m_text.draw(boost::lexical_cast<std::string>(unsigned(m_streak)) + "/"
+ m_text.draw(boost::lexical_cast<std::string>(unsigned(m_streak)) + "/"
+ boost::lexical_cast<std::string>(unsigned(m_longestStreak)));
}
// Draw streak pop-up for long streak intervals
|