You can subscribe to this list here.
| 2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(25) |
Jul
(288) |
Aug
(119) |
Sep
(31) |
Oct
(59) |
Nov
(458) |
Dec
(359) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2010 |
Jan
(268) |
Feb
(26) |
Mar
(36) |
Apr
(48) |
May
(119) |
Jun
(37) |
Jul
(173) |
Aug
(429) |
Sep
(137) |
Oct
(156) |
Nov
(59) |
Dec
(45) |
| 2011 |
Jan
(398) |
Feb
(257) |
Mar
(49) |
Apr
(5) |
May
(34) |
Jun
(11) |
Jul
(38) |
Aug
(12) |
Sep
(1) |
Oct
(49) |
Nov
(5) |
Dec
(10) |
| 2012 |
Jan
(21) |
Feb
(32) |
Mar
(20) |
Apr
(1) |
May
(2) |
Jun
|
Jul
(173) |
Aug
|
Sep
(25) |
Oct
(6) |
Nov
(44) |
Dec
|
|
From: Matti K. <mpk...@us...> - 2009-11-18 18:42:32
|
Module: performous
Branch: dance
Commit: fda4ae089776125803e04fa0e8988ba76ef4753a
Author: Matti Kemppainen <mpk...@us...>
Date: Wed Nov 18 20:42:10 2009 +0200
Added difficulty selection and track search to dancegraph. Modified the way to calculate setup delay before the song starts to suit dance game requirements.
---
game/dancegraph.cc | 30 ++++++++++++++++++++++--------
game/dancegraph.hh | 1 +
game/screen_sing.cc | 3 ++-
3 files changed, 25 insertions(+), 9 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 20079ce..2c30638 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -3,6 +3,7 @@
#include "fs.hh"
#include "notes.hh"
#include <boost/lexical_cast.hpp>
+#include <stdexcept>
namespace {
const float past = -0.2f;
@@ -32,7 +33,7 @@ namespace {
/// Constructor
DanceGraph::DanceGraph(Audio& audio, Song const& song):
- m_level(EASY),
+ m_level(BEGINNER),
m_audio(audio),
m_song(song),
m_input(input::GUITAR), // TODO: to be replaced by DANCEPAD
@@ -47,7 +48,8 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_score(),
m_scoreFactor(),
m_streak(),
- m_longestStreak()
+ m_longestStreak(),
+ m_gamingMode("dance-single")
{
m_arrow.dimensions.middle().center();
@@ -57,21 +59,33 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
* TODO: Skype 17.11.
* - trackien etsintä
**/
- DanceTracks::const_iterator it = m_song.danceTracks.find("dance-single");
- if(it == m_song.danceTracks.end()) {
- // TODO: game over, no suitable mode
- }
+ DanceTracks::const_iterator it = m_song.danceTracks.find(m_gamingMode);
+ if(it == m_song.danceTracks.end())
+ throw std::runtime_error("Could not find any dance tracks.");
+ difficultyDelta(0); // hack to get initial level
+
}
void DanceGraph::difficultyDelta(int delta) {
int newLevel = m_level + delta;
+ std::cout << "difficultyDelta called with " << delta << " (newLevel = " << newLevel << ")" << std::endl;
if(newLevel >= DIFFICULTYCOUNT || newLevel < 0)
return;
- difficulty((DanceDifficulty)newLevel);
+ DanceTracks::const_iterator it = m_song.danceTracks.find(m_gamingMode);
+ if(it->second.find((DanceDifficulty)newLevel) != it->second.end())
+ difficulty((DanceDifficulty)newLevel);
+ else
+ difficultyDelta(delta + (delta < 0 ? -1 : 1));
}
void DanceGraph::difficulty(DanceDifficulty level) {
-
+ // TODO: error handling)
+ m_notes.clear();
+ DanceTrack const& track = m_song.danceTracks.find(m_gamingMode)->second.find(level)->second;
+ for(Notes::const_iterator it = track.notes.begin(); it != track.notes.end(); it++)
+ m_notes.push_back(DanceNote(*it));
+ std::cout << "Difficulty set to: " << level << std::endl;
+ m_level = level;
}
/// Handles input
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index b00c6cb..614cbad 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -79,5 +79,6 @@ class DanceGraph {
double m_scoreFactor;
int m_streak;
int m_longestStreak;
+ std::string m_gamingMode;
};
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 8a5ae2b..736e76f 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -96,7 +96,8 @@ void ScreenSing::enter() {
} catch (std::runtime_error&) { break; }
}
}
- m_audio.playMusic(m_song->music, false, 0.0, m_instruments.empty() ? -1.0 : -8.0); // Startup delay for instruments is longer than for singing only
+ double setup_delay = m_dancers.size() != 0 ? -5.0 : (m_instruments.empty() ? -1.0 : -8.0);
+ m_audio.playMusic(m_song->music, false, 0.0, setup_delay); // Startup delay for instruments is longer than for singing only
}
void ScreenSing::instrumentLayout(double time) {
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-18 14:02:50
|
Module: performous
Branch: master
Commit: 358bf49e58d6fafdd41db067663c9668535d3fb4
Author: Lasse Karkkainen <tro...@tr...>
Date: Wed Nov 18 16:02:06 2009 +0200
Add dll symbol loading to libplugin++
---
libs/plugin++/include/plugin++/dll.hpp | 25 +++++++++++++++++++++++--
libs/plugin++/src/dll.cc | 12 ++++++++++--
2 files changed, 33 insertions(+), 4 deletions(-)
diff --git a/libs/plugin++/include/plugin++/dll.hpp b/libs/plugin++/include/plugin++/dll.hpp
index ed4a7b6..39aa091 100644
--- a/libs/plugin++/include/plugin++/dll.hpp
+++ b/libs/plugin++/include/plugin++/dll.hpp
@@ -1,16 +1,37 @@
+#pragma once
#ifndef DLL_HPP_INCLUDED
#define DLL_HPP_INCLUDED
#include "dllhelper.hpp"
+#include <stdexcept>
#include <string>
namespace plugin {
- /** @short RAII wrapper to load and unload dynamic library **/
+
+ /// \brief Exception class for signaling runtime errors from class dll
+ class dll_error: public std::runtime_error {
+ public:
+ dll_error(std::string const& msg): runtime_error(msg) {}
+ };
+
+ /// \brief Dynamic library loader
class DLL_PUBLIC dll {
void* lib;
- public:
+ public:
+ /// Open a dynamic library
+ /// \throws dll_error if the library cannot be loaded
dll(std::string const& filename);
~dll();
+ /// Get a symbol from DLL (symptr can be a data or a function pointer)
+ /// \throws dll_error if no symbol is found
+ template <typename SymPtr> void sym(std::string const& name, SymPtr& symptr) {
+ union { void* ptr; SymPtr symptr; } conv; // Data/function conversion without warnings
+ conv.ptr = sym(name.c_str());
+ if (!conv.ptr) throw dll_error("Symbol " + name + " not found");
+ symptr = conv.symptr;
+ }
+ /// Get a symbol from DLL (low level C style version)
+ void* sym(char const* name);
};
}
diff --git a/libs/plugin++/src/dll.cc b/libs/plugin++/src/dll.cc
index f684654..73662e6 100644
--- a/libs/plugin++/src/dll.cc
+++ b/libs/plugin++/src/dll.cc
@@ -11,19 +11,27 @@ using namespace plugin;
#include <windows.h>
dll::dll(std::string const& filename): lib(LoadLibrary(filename.c_str())) {
- if (!lib) throw std::runtime_error("Unable to open " + filename);
+ if (!lib) throw dll_error("Unable to open " + filename);
}
dll::~dll() { FreeLibrary(static_cast<HINSTANCE>(lib)); }
+void* dll::sym(char const* sym) {
+ return GetProcAddress(static_cast<HINSTANCE>(lib), sym);
+}
+
#else
#include <dlfcn.h>
dll::dll(std::string const& filename): lib(dlopen(filename.c_str(), RTLD_LAZY | RTLD_GLOBAL)) {
- if (!lib) throw std::runtime_error(dlerror());
+ if (!lib) throw dll_error(dlerror());
}
dll::~dll() { dlclose(lib); }
+void* dll::sym(char const* sym) {
+ return dlsym(lib, sym);
+}
+
#endif
|
|
From: Jaakko N. <jni...@us...> - 2009-11-17 22:29:31
|
Module: performous
Branch: dance
Commit: 5978fbb504fffe2c3bd3b76cb80da76e5b6d6444
Author: Jaakko Nikkola <jaa...@tk...>
Date: Wed Nov 18 00:27:59 2009 +0200
Extra debug print outs erased.
---
game/songparser-sm.cc | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index f94f5c4..ff68f3d 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -55,7 +55,6 @@ bool SongParser::smParseField(std::string line) {
if (line.empty() || line == "\r") return true;
if (line[0] == '/' && line[1] == '/') return true; //jump over possible comments
if (line[0] == ';') return true;
- std::cout << line << std::endl;
std::string::size_type pos = line.find(':');
if (pos == std::string::npos) throw std::runtime_error("Invalid format, should be #key:value");
std::string key = boost::trim_copy(line.substr(1, pos - 1));
@@ -65,7 +64,6 @@ bool SongParser::smParseField(std::string line) {
bool endOfInput = false;
// TODO: NOTES header vars needs better way to strip trailing colon ':'
while (getline(line)) {
- std::cout << line << std::endl;
//<NotesType>:
//if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
std::string notestype = boost::trim_copy(line.substr(0, line.size() -2));
@@ -147,7 +145,6 @@ Notes SongParser::smParseNotes(std::string line, bool endOfInput) {
double dur; //note duration
while(getline(line)) {
-// std::cout << line << std::endl;
if (line.empty() || line == "\r") continue;
if (line[0] == '/' && line[1] == '/') continue;
if (line[0] == '#') return notes;
|
Module: performous
Branch: dance
Commit: f2f3a1429d674ea61ec4709f1415cbb9d2ed327d
Author: Matti Kemppainen <mpk...@us...>
Date: Wed Nov 18 00:11:00 2009 +0200
First version of DanceNote struct added, and DanceStep enum for more intuitive code. A basic skeleton for difficulty setting.. Commit needed just for keeping different checkouts up-to-date.
---
game/dancegraph.cc | 55 ++++++++++++++++++++++++++++++---------------------
game/dancegraph.hh | 27 +++++++++++++++++++++---
2 files changed, 55 insertions(+), 27 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 0588dac..20079ce 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -7,9 +7,10 @@
namespace {
const float past = -0.2f;
const float future = 1.8f;
- const float timescale = 25.0f;
+ const float offset = 0.5f; // TODO: more clever way to do this?
+ const float timescale = 10.0f;
// Note: t is difference from playback time so it must be in range [past, future]
- float time2y(float t) { return timescale * (t - past) / (future - past); }
+ float time2y(float t) { return offset + timescale * (t - past) / (future - past); }
float time2a(float t) {
float a = clamp(1.0 - t / future); // Note: we want 1.0 alpha already at zero t.
return std::pow(a, 0.8f); // Nicer curve
@@ -31,6 +32,7 @@ namespace {
/// Constructor
DanceGraph::DanceGraph(Audio& audio, Song const& song):
+ m_level(EASY),
m_audio(audio),
m_song(song),
m_input(input::GUITAR), // TODO: to be replaced by DANCEPAD
@@ -49,27 +51,28 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
{
m_arrow.dimensions.middle().center();
- for(size_t i=0; i < 4; i++) m_holds[i] = 0;
+ for(size_t i=0; i < 4; i++) m_pressed[i] = 0;
- //TODO: this is a hack
- for (DanceTracks::const_iterator it = m_song.danceTracks.begin(); it != m_song.danceTracks.end(); ++it) {
- std::cout << "DANCE GAME MODE FOUND: " << it->first << std::endl;
- if (it->first == "dance-single") {
- DanceDifficultyMap dtracks = it->second;
- DanceDifficulty d = EASY;
- for (DanceDifficultyMap::const_iterator it2 = dtracks.begin(); it2 != dtracks.end(); ++it2) {
- std::cout << "DANCE DIFFICULTY FOUND: " << it2->first << std::endl;
- if (it2->first == d) {
- DanceTrack dt = it2->second;
- m_chords = dt.chords;
- std::cout << "DANCE-TRACK FOUND" << std::endl;
- // TODO: nothing done here!
- }
- }
- }
+ /**
+ * TODO: Skype 17.11.
+ * - trackien etsintä
+ **/
+ DanceTracks::const_iterator it = m_song.danceTracks.find("dance-single");
+ if(it == m_song.danceTracks.end()) {
+ // TODO: game over, no suitable mode
}
}
+void DanceGraph::difficultyDelta(int delta) {
+ int newLevel = m_level + delta;
+ if(newLevel >= DIFFICULTYCOUNT || newLevel < 0)
+ return;
+ difficulty((DanceDifficulty)newLevel);
+}
+
+void DanceGraph::difficulty(DanceDifficulty level) {
+
+}
/// Handles input
void DanceGraph::engine() {
@@ -81,8 +84,14 @@ void DanceGraph::engine() {
m_dead = false;
if(ev.button < 0 || ev.button > 3)
continue;
- if (ev.type == input::Event::RELEASE) m_holds[ev.button] = false;
- else if (ev.type == input::Event::PRESS) m_holds[ev.button] = true;
+ if (time < -0.5) {
+ if (ev.type == input::Event::PRESS) {
+ if (ev.pressed[STEP_UP]) difficultyDelta(1);
+ else if (ev.pressed[STEP_DOWN]) difficultyDelta(-1);
+ }
+ }
+ if (ev.type == input::Event::RELEASE) m_pressed[ev.button] = false;
+ else if (ev.type == input::Event::PRESS) m_pressed[ev.button] = true;
}
@@ -156,7 +165,7 @@ void DanceGraph::draw(double time) {
if (tEnd < past) continue;
if (tBeg > future) break;
- glutil::Color c = color(arrow_i);
+ glutil::Color c = color(it->note.note);
//c.r += glow;
//c.g += glow;
//c.b += glow;
@@ -175,7 +184,7 @@ void DanceGraph::draw(double time) {
for (int arrow_i = 0; arrow_i < 4; ++arrow_i) {
float x = -1.5f + arrow_i;
glColor4fv(color(arrow_i));
- if (m_holds[arrow_i]) glColor3f(1.0f, 1.0f, 1.0f);
+ if (m_pressed[arrow_i]) glColor3f(1.0f, 1.0f, 1.0f);
drawArrow(arrow_i, x, time2y(0.0), 0.6);
}
glColor3f(1.0f, 1.0f, 1.0f);
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 4f2d4d4..b00c6cb 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -13,6 +13,16 @@
class Song;
+struct DanceNote {
+ DanceNote(struct Note note) : note(note), isHit(false), score(0) {}
+ struct Note note;
+ bool isHit;
+ int score;
+};
+
+
+typedef std::vector<DanceNote> DanceNotes;
+
/// handles drawing of notes
class DanceGraph {
public:
@@ -29,14 +39,23 @@ class DanceGraph {
double correctness() const { return m_correctness.get(); }
int getScore() const { return m_score * m_scoreFactor; }
private:
+ enum DanceStep {
+ STEP_LEFT = 0,
+ STEP_DOWN = 1,
+ STEP_UP = 2,
+ STEP_RIGHT = 3
+ };
+ void difficultyDelta(int delta);
+ void difficulty(DanceDifficulty level);
+ DanceDifficulty m_level;
void dance(double time, input::Event const& ev);
void drawNote(int arrow_i, glutil::Color, float tBeg, float tEnd);
- glutil::Color const& color(int arrow_i) const ;
+ glutil::Color const& color(int arrow_i) const;
void drawArrow(int arrow_i, float x, float y, float scale = 1.0);
Audio& m_audio;
- input::InputDev m_input;
Song const& m_song;
- DanceChords m_chords;
+ input::InputDev m_input;
+ DanceNotes m_notes;
Surface m_arrow;
AnimValue m_cx, m_width;
std::size_t m_stream;
@@ -51,7 +70,7 @@ class DanceGraph {
};
typedef std::vector<Event> Events;
Events m_events;
- bool m_holds[4];
+ bool m_pressed[4];
int m_dead;
SvgTxtTheme m_text;
AnimValue m_correctness;
|
|
From: Jaakko N. <jni...@us...> - 2009-11-17 21:58:57
|
Module: performous
Branch: dance
Commit: 80751319809b55c1f40dfd54bc62d306305f88c2
Author: Jaakko Nikkola <jaa...@tk...>
Date: Tue Nov 17 23:57:30 2009 +0200
Changed note container to a single vector containing all the notes.
---
game/notes.cc | 2 +-
game/notes.hh | 4 ++--
game/songparser-sm.cc | 20 ++++++++++++--------
game/songparser.hh | 2 +-
4 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/game/notes.cc b/game/notes.cc
index 6e307c4..1bfe3ae 100644
--- a/game/notes.cc
+++ b/game/notes.cc
@@ -78,7 +78,7 @@ double Note::scoreMultiplier(double error) const {
Duration::Duration(): begin(getNaN()), end(getNaN()) {}
-DanceTrack::DanceTrack(std::string& d, DanceChords& c) : description(d), chords(c) {}
+DanceTrack::DanceTrack(std::string& description, Notes& notes) : description(description), notes(notes) {}
diff --git a/game/notes.hh b/game/notes.hh
index 3af625f..4d43e89 100644
--- a/game/notes.hh
+++ b/game/notes.hh
@@ -102,11 +102,11 @@ typedef std::vector<DanceChord> DanceChords;
struct DanceTrack {
- DanceTrack(std::string& d, DanceChords& c);
+ DanceTrack(std::string& description, Notes& notes);
//track description
std::string description;
//container for the actual note data
- DanceChords chords;
+ Notes notes;
};
enum DanceDifficulty {
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index edcba3f..f94f5c4 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -93,11 +93,11 @@ bool SongParser::smParseField(std::string line) {
//std::string radarvalues = boost::trim_copy(line.substr(0, line.size() -2));
//<NoteData>:
- DanceChords chords = smParseNotes(line, endOfInput);
+ Notes notes = smParseNotes(line, endOfInput);
if(endOfInput) throw std::runtime_error("end is here");
- DanceTrack danceTrack(description, chords);
+ DanceTrack danceTrack(description, notes);
DanceDifficultyMap danceDifficultyMap;
danceDifficultyMap.insert(std::make_pair(danceDifficulty, danceTrack));
m_song.danceTracks.insert(std::make_pair(notestype, danceDifficultyMap));
@@ -138,8 +138,9 @@ bool SongParser::smParseField(std::string line) {
return true;
}
-DanceChords SongParser::smParseNotes(std::string line, bool endOfInput) {
- DanceChords chords;
+Notes SongParser::smParseNotes(std::string line, bool endOfInput) {
+ DanceChords chords; //temporary container for notes
+ Notes notes;
int lcount = 0; //line counter for note duration
int count = 0; //total lines counter
double tm = 0; //time counter
@@ -149,7 +150,7 @@ DanceChords SongParser::smParseNotes(std::string line, bool endOfInput) {
// std::cout << line << std::endl;
if (line.empty() || line == "\r") continue;
if (line[0] == '/' && line[1] == '/') continue;
- if (line[0] == '#') return chords;
+ if (line[0] == '#') return notes;
if (line[0] == ';') continue;
if (line[0] == ',') {
/*Counting the timestamp of each note*/
@@ -161,6 +162,8 @@ DanceChords SongParser::smParseNotes(std::string line, bool endOfInput) {
if(_chord.find(i) != _chord.end()) {
_chord[i].begin = tm;
_chord[i].end = tm;
+ notes.push_back(_chord[i]); //note added to notes container used in DanceTrack
+
}
}
tm += dur;
@@ -168,12 +171,13 @@ DanceChords SongParser::smParseNotes(std::string line, bool endOfInput) {
lcount =0;
continue;
}
- //reading notes into a chord
- std::istringstream iss(line);
+ //reading notes into a temporary container chord
DanceChord chord;
+ std::istringstream iss(line);
for(int i =0; i<4; i++){
if(iss.get() == '1') {
Note note;
+ note.note = i;
chord[i] = note;
}
chords.push_back(chord);
@@ -183,5 +187,5 @@ DanceChords SongParser::smParseNotes(std::string line, bool endOfInput) {
continue;
}
endOfInput = true;
- return chords;
+ return notes;
}
diff --git a/game/songparser.hh b/game/songparser.hh
index becd2e1..9fe2cc0 100644
--- a/game/songparser.hh
+++ b/game/songparser.hh
@@ -99,7 +99,7 @@ class SongParser {
bool smCheck(std::vector<char> const& data);
void smParse();
bool smParseField(std::string line);
- DanceChords smParseNotes(std::string line, bool endOfInput);
+ Notes smParseNotes(std::string line, bool endOfInput);
double m_prevtime;
unsigned int m_prevts;
unsigned int m_relativeShift;
|
|
From: Tapio V. <aa...@us...> - 2009-11-17 20:40:41
|
Module: performous Branch: dance Commit: fe3b81cd1a4e62db1cca3bdecf9cba3023610a04 Author: Tapio Vierros <tap...@gm...> Date: Tue Nov 17 22:39:37 2009 +0200 Merge branch 'dance' of ssh://aave000@performous.git.sourceforge.net/gitroot/performous/performous into dance --- |
|
From: Tapio V. <aa...@us...> - 2009-11-17 20:40:40
|
Module: performous
Branch: dance
Commit: f068c10fc93cb0f489951e5f05fb58f47f7e914c
Author: Tapio Vierros <tap...@gm...>
Date: Tue Nov 17 22:37:20 2009 +0200
Graphics side switch to new data structure.
Breaks compiling.
---
game/dancegraph.cc | 39 ++++++++++++---------------------------
1 files changed, 12 insertions(+), 27 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index aea2657..0588dac 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -63,13 +63,7 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
DanceTrack dt = it2->second;
m_chords = dt.chords;
std::cout << "DANCE-TRACK FOUND" << std::endl;
- for (DanceChords::iterator it3 = m_chords.begin(); it3 != m_chords.end(); it3++) {
- DanceChord dc = *it3;
- for (int i = 0; i < 4; i++) {
- if (dc.find(i) != dc.end())
- std::cout << "NOTE begin: " << dc[i].begin << std::endl;
- }
- }
+ // TODO: nothing done here!
}
}
}
@@ -156,26 +150,17 @@ void DanceGraph::draw(double time) {
// TODO: iteration needs rewrite to the dancenotes structure
float tBeg, tEnd = 0.0f;
- for (DanceChords::const_iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
- // TODO: rewrite for guitargraph's Chord??
- DanceChord chord = *it;
- for (int arrow_i = 0; arrow_i < 4; arrow_i++) {
- if (chord.find(arrow_i) != chord.end()) {
- tBeg = chord[arrow_i].begin - time;
- tEnd = chord[arrow_i].end - time;
- if (tEnd < past) continue;
- if (tBeg > future) break;
- //unsigned event = m_notes[it->dur[fret]];
- //float glow = 0.0f;
- //if (event > 0) glow = m_events[event - 1].glow.get();
-
- glutil::Color c = color(arrow_i);
- //c.r += glow;
- //c.g += glow;
- //c.b += glow;
- drawNote(arrow_i, c, tBeg, tEnd);
- }
- }
+ for (DanceNotes::const_iterator it = m_notes.begin(); it != m_notes.end(); ++it) {
+ tBeg = it->note.begin - time;
+ tEnd = it->note.end - time;
+ if (tEnd < past) continue;
+ if (tBeg > future) break;
+
+ glutil::Color c = color(arrow_i);
+ //c.r += glow;
+ //c.g += glow;
+ //c.b += glow;
+ drawNote(it->note.note, c, tBeg, tEnd);
}
// To test arrow coordinate positioning
|
|
From: Yoda-JM <yo...@us...> - 2009-11-17 14:26:51
|
Module: performous
Branch: master
Commit: f570a1f77f22177f84709769a14f2ed024060b7d
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 17 15:26:37 2009 +0100
Fixed shared data dir installation path
---
game/fs.cc | 3 ++-
.../games-arcade/performous/performous-9999.ebuild | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/game/fs.cc b/game/fs.cc
index 090e47e..0bd60b0 100644
--- a/game/fs.cc
+++ b/game/fs.cc
@@ -1,5 +1,6 @@
#include "fs.hh"
+#include "config.hh"
#include "configuration.hh"
#include <plugin++/execname.hpp>
#include <cstdlib>
@@ -72,7 +73,7 @@ std::string getPath(fs::path const& filename) {
if (!initialized) {
initialized = true;
fs::path shortDir = "performous";
- fs::path shareDir = "share/games" / shortDir;
+ fs::path shareDir = SHARED_DATA_DIR;
#ifdef _WIN32
// Add APPLIC~1 (user-specific application data) FIXME: Not tested
{
diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild
index 8e0fcb7..c791a29 100644
--- a/portage-overlay/games-arcade/performous/performous-9999.ebuild
+++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild
@@ -69,7 +69,7 @@ src_configure() {
$(cmake-utils_use_enable tools TOOLS)
$(cmake-utils_use_enable editor EDITOR)
-DCMAKE_INSTALL_PREFIX=${GAMES_PREFIX}
- -DSHARE_INSTALL=share/
+ -DSHARE_INSTALL=share/performous
-DLIBDA_AUTODETECT_PLUGINS=false
-DLIBDA_PLUGIN_TESTING=false
-DCMAKE_BUILD_TYPE=Release"
|
|
From: Yoda-JM <yo...@us...> - 2009-11-17 14:05:11
|
Module: performous
Branch: master
Commit: d2269716d7dd220c92b3948821bcc7a334b0e617
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 17 15:04:54 2009 +0100
Fixed type in manpage dependencyÃ
---
docs/CMakeLists.txt | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt
index 0a4269d..a33cd78 100644
--- a/docs/CMakeLists.txt
+++ b/docs/CMakeLists.txt
@@ -12,7 +12,7 @@ if(UNIX)
OUTPUT ${MANFILE}
COMMAND ${HELP2MAN} ${PERFORMOUS_EXEC} -s 6 -i ${H2MFILE} -N | ${GZIP} > ${MANFILE}
MAIN_DEPENDENCY ${H2MFILE}
- DEPENDENCY ${PERFORMOUS_EXEC}
+ DEPENDS ${PERFORMOUS_EXEC}
COMMENT "Building Performous man page"
VERBATIM
)
|
|
From: Yoda-JM <yo...@us...> - 2009-11-17 13:08:03
|
Module: performous
Branch: master
Commit: 3b4d9cb3ec6be92a90ebf35cc7c40e40674c705e
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 17 14:07:44 2009 +0100
Made loader plugin aware of LIB_SUFFIX - this fix installation on non standard prefix with custom LIB_SUFFIX
---
libs/plugin++/CMakeLists.txt | 2 ++
libs/plugin++/src/loader.cc | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/plugin++/CMakeLists.txt b/libs/plugin++/CMakeLists.txt
index b85f1a3..b92b983 100644
--- a/libs/plugin++/CMakeLists.txt
+++ b/libs/plugin++/CMakeLists.txt
@@ -15,6 +15,8 @@ find_package(Boost 1.36 REQUIRED COMPONENTS filesystem)
include_directories(${Boost_INCLUDE_DIRS})
target_link_libraries(plugin++ ${Boost_LIBRARIES})
+add_definitions("-DLIB_SUFFIX=\"${LIB_SUFFIX}\"")
+
if(NOT WIN32)
target_link_libraries(plugin++ dl)
endif()
diff --git a/libs/plugin++/src/loader.cc b/libs/plugin++/src/loader.cc
index 199698c..b39c8eb 100644
--- a/libs/plugin++/src/loader.cc
+++ b/libs/plugin++/src/loader.cc
@@ -50,13 +50,13 @@ loader::loader(fs::path const& folder) {
fs::path p = execname();
p = p.parent_path().parent_path();
if (!p.empty()) {
- p /= "lib" / folder;
+ p /= "lib" LIB_SUFFIX / folder;
if (fs::is_directory(p)) paths.insert(p);
}
#ifndef _WIN32
// Try UNIX library paths
parse(paths, std::getenv("LD_LIBRARY_PATH"), folder);
- parse(paths, "/usr/lib:/usr/local/lib", folder);
+ parse(paths, "/usr/lib" LIB_SUFFIX ":/usr/local/lib" LIB_SUFFIX, folder);
#endif
}
// Load the contents of each folder
|
|
From: Yoda-JM <yo...@us...> - 2009-11-17 11:52:29
|
Module: performous
Branch: master
Commit: 4536b9366cd590a018366df21db56acaf61c7aa4
Author: Vincent Le Ligeour <yo...@us...>
Date: Tue Nov 17 12:51:44 2009 +0100
Added LIB_SUFFIX to install rpath
---
game/CMakeLists.txt | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt
index 1ea641a..462e0ce 100644
--- a/game/CMakeLists.txt
+++ b/game/CMakeLists.txt
@@ -40,9 +40,9 @@ target_link_libraries(performous da ${LIBS})
# Store library paths in executable
if(APPLE)
- set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH @loader_path/../lib)
+ set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH @loader_path/../lib${LIB_SUFFIX})
else()
- set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH \$ORIGIN/../lib)
+ set_target_properties(performous PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE INSTALL_RPATH \$ORIGIN/../lib${LIB_SUFFIX})
endif()
# Generate config.hh
|
|
From: Jaakko N. <jni...@us...> - 2009-11-16 21:33:39
|
Module: performous
Branch: dance
Commit: c9fbf4c02ea6f080abe030335f0845d2d43575ae
Author: Jaakko Nikkola <jaa...@tk...>
Date: Mon Nov 16 23:29:53 2009 +0200
One step and a lot of fixes forward... Some songs seem to work all right. However, some songs cause segmentation fault at the end of input.
---
game/songparser-sm.cc | 166 +++++++++++++++++++++++--------------------------
game/songparser.hh | 4 +-
game/songs.cc | 3 +-
3 files changed, 83 insertions(+), 90 deletions(-)
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index 960e7aa..edcba3f 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -11,10 +11,6 @@
namespace {
- bool isNote(const char& c) {
- return c == '0' || c == '1' || c == '2' || c == '3' || c == '4' || c == 'M' || c == 'L';
- }
-
void assign(int& var, std::string const& str) {
try {
var = boost::lexical_cast<int>(str);
@@ -50,89 +46,38 @@ bool SongParser::smCheck(std::vector<char> const& data) {
void SongParser::smParse() {
Song& s = m_song;
std::string line;
- int lcount = 0; //line counter for note duration
- int count = 0; //total lines counter
- bool readable = false; //makes sure that other values are read before notes
- double tm = 0; //time counter
- double dur; //note duration
- std::string notestype;
- std::string description;
- DanceDifficulty danceDifficulty = DIFFICULTYCOUNT;
- DanceDifficultyMap danceDifficultyMap;
- DanceChords chords;
-
- while (getline(line)) {
-
- if (line.empty() || line == "\r") continue;
- if (line[0] == '/' && line[1] == '/') continue; //jump over possible comments
- //reading of the values
- if (readable && isNote(line[0]) ) {
- //reading notes into a chord
- std::istringstream iss(line);
- DanceChord chord;
- for(int i =1; i <= 4; i++){
- if(iss.get() == '1') {
- Note note;
- chord[i] = note;
- }
- //if (iss.get() == ';') return false; //for the case where end mark ';' is not on its own line
- //TODO hold etc. notes
- chords.push_back(chord);
- lcount++;
- count++;
- }
- continue;
- }
- if (!readable && isNote(line[0]) ) throw std::runtime_error("Notes outside NoteData");
- if (line[0] == ',') {
- /*Counting the timestamp of each note*/
- dur = 4.0 * ( 1.0/(m_bpm/60.0) ) / lcount; //counts one note duration in seconds;
- //std::cout << "DUR: " << dur << "TM: " << tm << std::endl;
- for(int j = count - lcount; j<count ; j++) {
- for(int i = 0; i<4; i++) {
- DanceChord& _chord = chords.at(j);
- if(_chord.find(i) != _chord.end()) {
- _chord[i].begin = tm;
- _chord[i].end = tm;
- }
- }
- tm += dur;
- }
- lcount =0;
- continue;
- }
- if (line[0] == ';') continue;
-
+ while (getline(line) && smParseField(line)) {}
+ if (m_song.danceTracks.empty() ) throw std::runtime_error("No note data in the file");
+ if (s.title.empty() || s.artist.empty()) throw std::runtime_error("Required header fields missing");
+ if (m_bpm != 0.0) addBPM(0, m_bpm);
+}
+bool SongParser::smParseField(std::string line) {
+ if (line.empty() || line == "\r") return true;
+ if (line[0] == '/' && line[1] == '/') return true; //jump over possible comments
+ if (line[0] == ';') return true;
+ std::cout << line << std::endl;
std::string::size_type pos = line.find(':');
if (pos == std::string::npos) throw std::runtime_error("Invalid format, should be #key:value");
std::string key = boost::trim_copy(line.substr(1, pos - 1));
- if (key == "NOTES") {
- //if not the first time
- if(readable) {
- DanceTrack danceTrack(description, chords);
- danceDifficultyMap.insert(std::make_pair(danceDifficulty, danceTrack));
- m_song.danceTracks.insert(std::make_pair(notestype, danceDifficultyMap));
- }
- //temporary containers for note data
- /*DanceDifficultyMap danceDifficultyMap;
- DanceChords chords;*/
+ if (key == "NOTES") {
//Note values are analyzed here. Values are:
-
+ bool endOfInput = false;
// TODO: NOTES header vars needs better way to strip trailing colon ':'
-
+ while (getline(line)) {
+ std::cout << line << std::endl;
//<NotesType>:
- if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- notestype = boost::trim_copy(line.substr(0, line.size() -2));
+ //if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
+ std::string notestype = boost::trim_copy(line.substr(0, line.size() -2));
//<Description>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- description = boost::trim_copy(line.substr(0, line.size() -2));
+ std::string description = boost::trim_copy(line.substr(0, line.size() -2));
//<DifficultyClass>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
std::string difficultyclass = boost::trim_copy(line.substr(0, line.size() -2));
- //enum
- transform(difficultyclass.begin(), difficultyclass.end(),
- difficultyclass.begin(), upper_case );
+ transform(difficultyclass.begin(), difficultyclass.end(),
+ difficultyclass.begin(), upper_case );
+ DanceDifficulty danceDifficulty = DIFFICULTYCOUNT;
if(difficultyclass == "BEGINNER") danceDifficulty = BEGINNER;
if(difficultyclass == "EASY") danceDifficulty = EASY;
if(difficultyclass == "MEDIUM") danceDifficulty = MEDIUM;
@@ -148,18 +93,20 @@ void SongParser::smParse() {
//std::string radarvalues = boost::trim_copy(line.substr(0, line.size() -2));
//<NoteData>:
- /*while (getline(line) && smParseNotes(line, chords)) {}
+ DanceChords chords = smParseNotes(line, endOfInput);
+ if(endOfInput) throw std::runtime_error("end is here");
+
DanceTrack danceTrack(description, chords);
+ DanceDifficultyMap danceDifficultyMap;
danceDifficultyMap.insert(std::make_pair(danceDifficulty, danceTrack));
- m_song.danceTracks.insert(std::make_pair(notestype, danceDifficultyMap));*/
-
- readable = true;
- continue;
+ m_song.danceTracks.insert(std::make_pair(notestype, danceDifficultyMap));
+ }
+ return false;
}
std::string value = boost::trim_copy(line.substr(pos + 1));
- value.erase(value.size() -1); // compared to txtParseField, here last character(';') is eliminated
- if (value.empty()) continue;
+ value = value.substr(0, value.size() - 1); // compared to txtParseField, here last character(';') is eliminated
+ if (value.empty()) return true;
if (key == "TITLE") m_song.title = value.substr(value.find_first_not_of(" :"));
else if (key == "ARTIST") m_song.artist = value.substr(value.find_first_not_of(" "));
else if (key == "BANNER") m_song.cover = value;
@@ -188,10 +135,53 @@ void SongParser::smParse() {
#STOPS
#BGCHANGE
*/
- continue;
+ return true;
+}
+
+DanceChords SongParser::smParseNotes(std::string line, bool endOfInput) {
+ DanceChords chords;
+ int lcount = 0; //line counter for note duration
+ int count = 0; //total lines counter
+ double tm = 0; //time counter
+ double dur; //note duration
+
+ while(getline(line)) {
+// std::cout << line << std::endl;
+ if (line.empty() || line == "\r") continue;
+ if (line[0] == '/' && line[1] == '/') continue;
+ if (line[0] == '#') return chords;
+ if (line[0] == ';') continue;
+ if (line[0] == ',') {
+ /*Counting the timestamp of each note*/
+ dur = 4.0 * ( 1.0/(m_bpm/60.0) ) / lcount; //counts one note duration in seconds;
+ //std::cout << "DUR: " << dur << "TM: " << tm << std::endl;
+ for(int j = count - lcount; j<count ; j++) {
+ for(int i = 0; i<4; i++) {
+ DanceChord& _chord = chords.at(j);
+ if(_chord.find(i) != _chord.end()) {
+ _chord[i].begin = tm;
+ _chord[i].end = tm;
+ }
+ }
+ tm += dur;
+ }
+ lcount =0;
+ continue;
}
- if (m_song.danceTracks.empty() ) throw std::runtime_error("No note data in the file");
- if (s.title.empty() || s.artist.empty()) throw std::runtime_error("Required header fields missing");
- if (m_bpm != 0.0) addBPM(0, m_bpm);
-
-}
+ //reading notes into a chord
+ std::istringstream iss(line);
+ DanceChord chord;
+ for(int i =0; i<4; i++){
+ if(iss.get() == '1') {
+ Note note;
+ chord[i] = note;
+ }
+ chords.push_back(chord);
+ lcount++;
+ count++;
+ }
+ continue;
+ }
+ endOfInput = true;
+ return chords;
+}
diff --git a/game/songparser.hh b/game/songparser.hh
index 9a16644..becd2e1 100644
--- a/game/songparser.hh
+++ b/game/songparser.hh
@@ -86,7 +86,7 @@ class SongParser {
Song& m_song;
std::stringstream m_ss;
unsigned int m_linenum;
- bool getline(std::string& line) { ++m_linenum; return std::getline(m_ss, line); }
+ bool getline(std::string& line) { ++m_linenum; return std::getline(m_ss, line);}
bool m_relative;
double m_gap;
double m_bpm;
@@ -98,6 +98,8 @@ class SongParser {
void iniParse();
bool smCheck(std::vector<char> const& data);
void smParse();
+ bool smParseField(std::string line);
+ DanceChords smParseNotes(std::string line, bool endOfInput);
double m_prevtime;
unsigned int m_prevts;
unsigned int m_relativeShift;
diff --git a/game/songs.cc b/game/songs.cc
index 477faab..c0e82db 100644
--- a/game/songs.cc
+++ b/game/songs.cc
@@ -86,7 +86,8 @@ void Songs::reload_internal(fs::path const& parent) {
}
}
} catch (std::exception const& e) {
- std::cout << "Error accessing " << parent << std::endl;
+
+ std::cout << "Error accessing " << parent << e.what() << std::endl;
}
}
|
|
From: Tapio V. <aa...@us...> - 2009-11-16 10:50:28
|
Module: performous
Branch: master
Commit: ccabd21fae85a7b0c9a337c3c5dd5640dfd770f9
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 16 12:49:04 2009 +0200
Name of track is now displayed in players screen.
---
game/screen_players.cc | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/screen_players.cc b/game/screen_players.cc
index 7cd1ec3..8caa6ba 100644
--- a/game/screen_players.cc
+++ b/game/screen_players.cc
@@ -115,7 +115,8 @@ void ScreenPlayers::draw() {
}
} else {
// Format the player information text
- oss_song << "You reached " << m_database.scores.front().score << " points!\n";
+ oss_song << m_database.scores.front().track << "\n";
+ oss_song << "You reached " << m_database.scores.front().score << " points!";
oss_order << "Please enter your Name!\n"
<< "Name: " << m_players.current().name << '\n'
<< "Search Text: "
|
|
From: Tapio V. <aa...@us...> - 2009-11-16 10:50:24
|
Module: performous
Branch: master
Commit: 55072f940c006b7030ca24f2836fbc975a86abd5
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 16 12:28:55 2009 +0200
Fixed a crash with ScoreWindow instrument erasing and removed some debug prints.
---
game/screen_sing.cc | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index a2ffde3..35595b5 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -146,9 +146,7 @@ void ScreenSing::activateNextScreen()
ScreenManager* sm = ScreenManager::getSingletonPtr();
m_database.addSong(m_song);
- if (m_database.scores.empty()
- || !m_database.reachedHiscore(m_song))
- {
+ if (m_database.scores.empty() || !m_database.reachedHiscore(m_song)) {
// if no highscore reached..
sm->activateScreen("Songs");
return;
@@ -325,7 +323,7 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database):
{
m_pos.setTarget(0.0);
m_database.scores.clear();
- for (std::list<Player>::iterator p = m_database.cur.begin(); p != m_database.cur.end(); ++p) {
+ for (std::list<Player>::iterator p = m_database.cur.begin(); p != m_database.cur.end();) {
ScoreItem item;
item.score = p->getScore();
item.track = "Vocals";
@@ -334,28 +332,29 @@ ScoreWindow::ScoreWindow(Instruments& instruments, Database& database):
if (item.score < 500) { p = m_database.cur.erase(p); continue; }
m_database.scores.push_back(item);
+ ++p;
}
- for (Instruments::iterator it = instruments.begin(); it != instruments.end(); ++it) {
+ for (Instruments::iterator it = instruments.begin(); it != instruments.end();) {
ScoreItem item;
item.score = it->getScore();
item.track_simple = it->getTrack();
item.track = it->getTrack() + " - " + it->getDifficultyString();
item.track[0] = toupper(item.track[0]);
- if (item.score < 100) { std::cout << "kick " << item.track << std::endl; it = instruments.erase(it); continue; }
+ if (item.score < 100) { it = instruments.erase(it); continue; }
if (item.track_simple == "drums") item.color = glutil::Color(0.1f, 0.1f, 0.1f);
else if (item.track_simple == "bass") item.color = glutil::Color(0.5f, 0.3f, 0.1f);
else item.color = glutil::Color(1.0f, 0.0f, 0.0f);
- std::cout << "insert " << item.track << " score: " << item.score << std::endl;
m_database.scores.push_back(item);
+ ++it;
}
- m_database.scores.sort();
- m_database.scores.reverse(); // top should be first
if (m_database.scores.empty())
m_rank = "No player!";
else {
+ m_database.scores.sort();
+ m_database.scores.reverse(); // top should be first
int topScore = m_database.scores.front().score;
if (m_database.scores.front().track_simple == "vocals") {
if (topScore > 8000) m_rank = "Hit singer";
|
|
From: Tapio V. <aa...@us...> - 2009-11-16 10:50:23
|
Module: performous
Branch: master
Commit: db25e4ffa8fa61fa1f0db911ca33d7031f60c2c1
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 16 12:06:10 2009 +0200
Esc in ScoreWindow exits to players screen, not song browser.
---
game/screen_sing.cc | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index a1f5c15..a2ffde3 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -170,6 +170,8 @@ void ScreenSing::manageEvent(SDL_Event event) {
bool seekback = false;
int key = event.key.keysym.sym;
if (key == SDLK_ESCAPE || key == SDLK_q) {
+ // In ScoreWindow ESC goes to Players, otherwise insta-quit to Songs
+ if (m_score_window.get() && key == SDLK_ESCAPE) { activateNextScreen(); return; }
ScreenManager* sm = ScreenManager::getSingletonPtr();
sm->activateScreen("Songs");
return;
|
|
From: Tapio V. <aa...@us...> - 2009-11-16 10:50:21
|
Module: performous
Branch: master
Commit: 979574d4125cc94da96d129c8a5c22188c6f5aa3
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 16 11:58:46 2009 +0200
Make inactive hammer notes darker (until someone comes up with something better).
---
game/guitargraph.cc | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index ed011d3..f0a9916 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -496,7 +496,9 @@ void GuitarGraph::drawNote(int fret, glutil::Color c, float tBeg, float tEnd, fl
float y = yBeg + fretWid;
if (m_use3d) {
y -= fretWid;
- c.a = clamp(time2a(tBeg)*2.0f,0.0f,1.0f); glColor4fv(c);
+ c.a = clamp(time2a(tBeg)*2.0f,0.0f,1.0f);
+ if (tappable && m_correctness.get() < .99) { c.r *= 0.5f; c.g *= 0.5f; c.b *= 0.5f; }
+ glColor4fv(c);
obj->draw(x, y, 0.0f);
y -= fretWid;
} else {
|
|
From: Tapio V. <aa...@us...> - 2009-11-16 10:50:20
|
Module: performous
Branch: master
Commit: ea4eaa933b78c9d80b560e24c0264532fc2c8880
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 16 11:48:56 2009 +0200
ScoreWindow layout tweak.
---
game/screen_sing.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index a6c383b..a1f5c15 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -383,7 +383,7 @@ void ScoreWindow::draw() {
for (Database::cur_scores_t::const_iterator p = m_database.scores.begin(); p != m_database.scores.end(); ++p, ++i) {
int score = p->score;
glColor4fv(p->color);
- double x = -0.12 + spacing * (0.5 + i - 0.5 * m_database.cur.size());
+ double x = -0.12 + spacing * (0.5 + i - 0.5 * m_database.scores.size());
m_scoreBar.dimensions.middle(x).bottom(0.20);
m_scoreBar.draw(score / 10000.0);
m_score_text.render(boost::lexical_cast<std::string>(score));
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-15 23:29:03
|
Module: performous Branch: master Commit: 4f71b68658a598ff5d3a7ec36b5b7065d26dab18 Author: Lasse Karkkainen <tro...@tr...> Date: Mon Nov 16 01:26:58 2009 +0200 Original Silky Strings code is no longer used --- docs/Authors.txt | 19 +++++++++---------- 1 files changed, 9 insertions(+), 10 deletions(-) diff --git a/docs/Authors.txt b/docs/Authors.txt index 3aa99a9..492e44a 100644 --- a/docs/Authors.txt +++ b/docs/Authors.txt @@ -48,16 +48,6 @@ jEsuSdA <info at jesusda.com> Tobias Gehrig <tgehrig at users.sourceforge.net> * Pre-calculate FFT window patch -Olli Salli <osalli at cc.hut.fi> - * Silky Strings glfw window management, input and graphics - -Ville Virkkala <vvirkkal at cc.hut.fi> - * Silky Strings original MIDI parser - * Silky Strings game logic - -Tuomas Perälä <tuomas.perala at hut.fi> - * Silky Strings Qt-based launcher - GUEST DEVELOPERS ---------------- @@ -98,4 +88,13 @@ Ignacio Casal Quinteiro <nacho.resa at gmail.com> Sylvain Henry <hsyl20 at yahoo.fr> * Long sentence display patch +Olli Salli <osalli at cc.hut.fi> + * Silky Strings glfw window management, input and graphics + +Ville Virkkala <vvirkkal at cc.hut.fi> + * Silky Strings original MIDI parser + * Silky Strings game logic + +Tuomas Perälä <tuomas.perala at hut.fi> + * Silky Strings Qt-based launcher |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-11-15 23:29:01
|
Module: performous
Branch: master
Commit: a1b99b889607c049a6e59faaa5b513fd9e083306
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 16 01:25:29 2009 +0200
Add a new bug to TODO.txt
---
docs/TODO.txt | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/docs/TODO.txt b/docs/TODO.txt
index 496eb21..5b57e52 100644
--- a/docs/TODO.txt
+++ b/docs/TODO.txt
@@ -79,3 +79,29 @@ performous(main+0x1d30)[0x4d42c0]
- Random segfault on program exit (very hard to reproduce)
* Don't even need to enter songs screen, start and exit is enough.
+- Hang on program exit (deadlock in mixer):
+(gdb) thread 1
+[Switching to thread 1 (Thread 0x7f6f4f1aa8a0 (LWP 13792))]#0 0x00007f6f4949e5a9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
+(gdb) bt
+#0 0x00007f6f4949e5a9 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
+#1 0x00007f6f4ecc7669 in boost::thread::join() () from /usr/lib/libboost_thread.so.1.40.0 // Waiting for audio thread (thread 3) to terminate
+#2 0x00007f6f3d980f09 in ~alsa_playback (this=0x218e770, __in_chrg=<value optimized out>) at /home/tronic/performous/libs/libda/plugins/audio_dev_alsa.cpp:194
+#3 0x000000000048e68d in da::mixer::~mixer() ()
+#4 0x00000000004ffad8 in Audio::~Audio() ()
+#5 0x00000000004f7e73 in mainLoop (songlist=<value optimized out>) at /home/tronic/performous/game/main.cc:179
+#6 0x00000000004f9a9d in main (argc=<value optimized out>, argv=<value optimized out>) at /home/tronic/performous/game/main.cc:290
+(gdb) thread 3
+[Switching to thread 3 (Thread 0x7f6f3c65d910 (LWP 13794))]#0 0x00007f6f494a0c34 in __lll_lock_wait () from /lib/libpthread.so.0
+(gdb) bt
+#0 0x00007f6f494a0c34 in __lll_lock_wait () from /lib/libpthread.so.0
+#1 0x00007f6f4949c2b0 in _L_lock_1022 () from /lib/libpthread.so.0
+#2 0x00007f6f4949c111 in pthread_mutex_lock () from /lib/libpthread.so.0
+#3 0x000000000048c253 in boost::unique_lock<boost::recursive_mutex>::unique_lock(boost::recursive_mutex&) () // Mixer lock?
+#4 0x000000000048cad5 in boost::detail::function::function_ref_invoker1<da::mutex_stream, bool, da::pcm_data&>::invoke(boost::detail::function::function_buffer&, da::pcm_data&) ()
+#5 0x000000000048bd3e in boost::function1<bool, da::pcm_data&>::operator()(da::pcm_data&) const ()
+#6 0x00007f6f3d97fddb in operator() (this=0x218e770) at /home/tronic/performous/libs/libda/plugins/audio_dev_alsa.cpp:205
+#7 0x00007f6f4ecc6db0 in thread_proxy () from /usr/lib/libboost_thread.so.1.40.0
+#8 0x00007f6f49499a04 in start_thread () from /lib/libpthread.so.0
+#9 0x00007f6f492037bd in clone () from /lib/libc.so.6
+#10 0x0000000000000000 in ?? ()
+
|
|
From: Tapio V. <aa...@us...> - 2009-11-15 16:57:37
|
Module: performous
Branch: dance
Commit: 28ea30d2f41805f50041d1bb420e934a919c3113
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 15 18:55:20 2009 +0200
Some notes are actually drawn to the screen.
Works only on some songs (and needs loads of tweaking).
---
game/dancegraph.cc | 36 ++++++++++++++++++++++++++----------
game/screen_sing.cc | 2 +-
game/songparser-sm.cc | 9 +++++----
3 files changed, 32 insertions(+), 15 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index 66438b1..aea2657 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -63,6 +63,13 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
DanceTrack dt = it2->second;
m_chords = dt.chords;
std::cout << "DANCE-TRACK FOUND" << std::endl;
+ for (DanceChords::iterator it3 = m_chords.begin(); it3 != m_chords.end(); it3++) {
+ DanceChord dc = *it3;
+ for (int i = 0; i < 4; i++) {
+ if (dc.find(i) != dc.end())
+ std::cout << "NOTE begin: " << dc[i].begin << std::endl;
+ }
+ }
}
}
}
@@ -96,7 +103,6 @@ void DanceGraph::dance(double time, input::Event const& ev) {
glutil::Color const& DanceGraph::color(int arrow_i) const {
- // TODO: Hack.. Needs animation through events.
static glutil::Color arrowColors[4] = {
glutil::Color(0.0f, 0.9f, 0.0f),
glutil::Color(0.9f, 0.0f, 0.0f),
@@ -130,14 +136,14 @@ void DanceGraph::draw(double time) {
dimensions.screenCenter().middle(m_cx.get()).stretch(m_width.get(), 0.9);
double offsetX = 0.5 * (dimensions.x1() + dimensions.x2());
double frac = 0.75; // Adjustable: 1.0 means fully separated, 0.0 means fully attached
-/* // Draw scores
+ // Draw scores
if (time >= -0.5) {
m_text.dimensions.screenBottom(-0.30).middle(0.32 * dimensions.w() + offsetX);
m_text.draw(boost::lexical_cast<std::string>(unsigned(getScore())));
m_text.dimensions.screenBottom(-0.27).middle(0.32 * dimensions.w() + offsetX);
m_text.draw(boost::lexical_cast<std::string>(unsigned(m_streak)) + "/"
+ boost::lexical_cast<std::string>(unsigned(m_longestStreak)));
- }*/
+ }
//std::cout << "m" << dimensions.x1() << " " << dimensions.x2() << std::endl;
//std::cout << dimensions.y1() << " " << dimensions.y2() << std::endl;
glutil::PushMatrixMode pmm(GL_PROJECTION);
@@ -148,13 +154,15 @@ void DanceGraph::draw(double time) {
{ float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
// Draw the notes
// TODO: iteration needs rewrite to the dancenotes structure
-/* float tBeg, tEnd = 0.0f;
+ float tBeg, tEnd = 0.0f;
+
for (DanceChords::const_iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
- // TODO: rewrite for guitargraph's Chord
+ // TODO: rewrite for guitargraph's Chord??
DanceChord chord = *it;
for (int arrow_i = 0; arrow_i < 4; arrow_i++) {
if (chord.find(arrow_i) != chord.end()) {
- tBeg = chord[arrow_i].begin; tEnd = chord[arrow_i].end;
+ tBeg = chord[arrow_i].begin - time;
+ tEnd = chord[arrow_i].end - time;
if (tEnd < past) continue;
if (tBeg > future) break;
//unsigned event = m_notes[it->dur[fret]];
@@ -168,7 +176,14 @@ void DanceGraph::draw(double time) {
drawNote(arrow_i, c, tBeg, tEnd);
}
}
- }*/
+ }
+
+ // To test arrow coordinate positioning
+ //for (int i = 0; i < 10; ++i) {
+ //std::cout << time2y(i*0.1f) << std::endl;
+ //drawArrow(1, 0, time2y(i*0.1f), 0.6);
+ //}
+
// Arrows on cursor
// TODO: suitable effect for pressing the arrows?
// TODO: effect possibilities: zooming, whitening, external glow
@@ -178,7 +193,7 @@ void DanceGraph::draw(double time) {
if (m_holds[arrow_i]) glColor3f(1.0f, 1.0f, 1.0f);
drawArrow(arrow_i, x, time2y(0.0), 0.6);
}
- glColor3f(1.0f, 1.0f, 1.0f);
+ glColor3f(1.0f, 1.0f, 1.0f);
}
@@ -187,6 +202,7 @@ void DanceGraph::drawNote(int arrow_i, glutil::Color c, float tBeg, float tEnd)
float x = -1.5f + arrow_i;
float yBeg = time2y(tBeg);
float yEnd = time2y(tEnd);
- c.a = time2a(tBeg); glColor4fv(c);
- drawArrow(arrow_i, x, yBeg);
+ //c.a = time2a(tBeg);
+ glColor4fv(c);
+ drawArrow(arrow_i, x, yBeg, 0.6);
}
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index db6fd34..8a5ae2b 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -304,7 +304,7 @@ void ScreenSing::draw() {
unsigned t = clamp(time, 0.0, length);
m_progress->draw(songPercent);
std::string statustxt = (boost::format("%02u:%02u") % (t / 60) % (t % 60)).str();
- if (!m_score_window.get() && m_song->track_map.empty()) {
+ if (!m_score_window.get() && m_song->track_map.empty() && m_song->danceTracks.empty()) {
if (status == Song::INSTRUMENTAL_BREAK) statustxt += " ENTER to skip instrumental break";
if (status == Song::FINISHED && !config["game/karaoke_mode"].b()) statustxt += " Remember to wait for grading!";
}
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index 7b7688a..960e7aa 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -53,8 +53,8 @@ void SongParser::smParse() {
int lcount = 0; //line counter for note duration
int count = 0; //total lines counter
bool readable = false; //makes sure that other values are read before notes
- int tm = 0; //time counter
- int dur; //note duration
+ double tm = 0; //time counter
+ double dur; //note duration
std::string notestype;
std::string description;
DanceDifficulty danceDifficulty = DIFFICULTYCOUNT;
@@ -86,10 +86,11 @@ void SongParser::smParse() {
if (!readable && isNote(line[0]) ) throw std::runtime_error("Notes outside NoteData");
if (line[0] == ',') {
/*Counting the timestamp of each note*/
- dur = 4 * ( 1/(m_bpm/60) ) / lcount; //counts one note duration in seconds;
+ dur = 4.0 * ( 1.0/(m_bpm/60.0) ) / lcount; //counts one note duration in seconds;
+ //std::cout << "DUR: " << dur << "TM: " << tm << std::endl;
for(int j = count - lcount; j<count ; j++) {
for(int i = 0; i<4; i++) {
- DanceChord _chord = chords.at(j);
+ DanceChord& _chord = chords.at(j);
if(_chord.find(i) != _chord.end()) {
_chord[i].begin = tm;
_chord[i].end = tm;
|
|
From: Tapio V. <aa...@us...> - 2009-11-15 15:46:54
|
Module: performous
Branch: dance
Commit: 6a3c91ccfda227775a230703e02fe93e8c43df23
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 15 17:34:29 2009 +0200
Fixed temporary cursor arrows pressing effect.
---
game/dancegraph.cc | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index da27dc7..66438b1 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -97,15 +97,12 @@ void DanceGraph::dance(double time, input::Event const& ev) {
glutil::Color const& DanceGraph::color(int arrow_i) const {
// TODO: Hack.. Needs animation through events.
- glutil::Color arrowColors[4] = {
+ static glutil::Color arrowColors[4] = {
glutil::Color(0.0f, 0.9f, 0.0f),
glutil::Color(0.9f, 0.0f, 0.0f),
glutil::Color(0.9f, 0.9f, 0.0f),
glutil::Color(0.0f, 0.0f, 0.9f),
};
- for(size_t i = 0; i < 4; i++) {
- if(m_holds[i] != 0) arrowColors[i] = glutil::Color(0.9f, 0.9f, 0.9f);
- }
if (arrow_i < 0 || arrow_i > 3) throw std::logic_error("Invalid arrow number in DanceGraph::getColor");
return arrowColors[arrow_i];
}
@@ -178,6 +175,7 @@ void DanceGraph::draw(double time) {
for (int arrow_i = 0; arrow_i < 4; ++arrow_i) {
float x = -1.5f + arrow_i;
glColor4fv(color(arrow_i));
+ if (m_holds[arrow_i]) glColor3f(1.0f, 1.0f, 1.0f);
drawArrow(arrow_i, x, time2y(0.0), 0.6);
}
glColor3f(1.0f, 1.0f, 1.0f);
|
|
From: Tapio V. <aa...@us...> - 2009-11-15 13:10:36
|
Module: performous
Branch: dance
Commit: 33d7e98cb468189e974e7e01f379f9fed8cda72b
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 15 15:08:11 2009 +0200
A couple of sm-parser hackish fixes and some test code to get a track to dancegraph.
---
game/dancegraph.cc | 64 ++++++++++++++++++++++++++++++------------------
game/dancegraph.hh | 2 +
game/songparser-sm.cc | 19 +++++++++-----
3 files changed, 54 insertions(+), 31 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index c93eabc..fd2ddc0 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -1,6 +1,7 @@
#include "dancegraph.hh"
#include "fs.hh"
+#include "notes.hh"
#include <boost/lexical_cast.hpp>
namespace {
@@ -46,9 +47,24 @@ DanceGraph::DanceGraph(Audio& audio, Song const& song):
m_streak(),
m_longestStreak()
{
- //TODO
m_arrow.dimensions.middle().center();
+ //TODO: this is a hack
+ for (DanceTracks::const_iterator it = m_song.danceTracks.begin(); it != m_song.danceTracks.end(); ++it) {
+ std::cout << "DANCE GAME MODE FOUND: " << it->first << std::endl;
+ if (it->first == "dance-single") {
+ DanceDifficultyMap dtracks = it->second;
+ DanceDifficulty d = EASY;
+ for (DanceDifficultyMap::const_iterator it2 = dtracks.begin(); it2 != dtracks.end(); ++it2) {
+ std::cout << "DANCE DIFFICULTY FOUND: " << it2->first << std::endl;
+ if (it2->first == d) {
+ DanceTrack dt = it2->second;
+ m_chords = dt.chords;
+ std::cout << "DANCE-TRACK FOUND" << std::endl;
+ }
+ }
+ }
+ }
}
@@ -108,8 +124,8 @@ void DanceGraph::draw(double time) {
m_text.draw(boost::lexical_cast<std::string>(unsigned(m_streak)) + "/"
+ boost::lexical_cast<std::string>(unsigned(m_longestStreak)));
}
-std::cout << "m" << dimensions.x1() << " " << dimensions.x2() << std::endl;
-std::cout << dimensions.y1() << " " << dimensions.y2() << std::endl;
+//std::cout << "m" << dimensions.x1() << " " << dimensions.x2() << std::endl;
+//std::cout << dimensions.y1() << " " << dimensions.y2() << std::endl;
glutil::PushMatrixMode pmm(GL_PROJECTION);
glTranslatef(frac * 2.0 * offsetX, 0.0f, 0.0f);
glutil::PushMatrixMode pmb(GL_MODELVIEW);
@@ -118,27 +134,27 @@ std::cout << dimensions.y1() << " " << dimensions.y2() << std::endl;
{ float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
// Draw the notes
// TODO: iteration needs rewrite to the dancenotes structure
- //for (Chords::const_iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
- /*
- float tBeg = it->begin - time;
- float tEnd = it->end - time;
- if (tEnd < past) continue;
- if (tBeg > future) break;
- for (int arrow_i = 0; arrow_i < 5; ++arrow_i) {
- //if (!it->fret[arrow_i]) continue;
- if (tEnd > future) tEnd = future;
- unsigned event = m_notes[it->dur[fret]];
- float glow = 0.0f;
- if (event > 0) glow = m_events[event - 1].glow.get();
-
- glutil::Color c = color(arrow_i);
- c.r += glow;
- c.g += glow;
- c.b += glow;
- drawNote(fret, c, tBeg, tEnd);
+ float tBeg, tEnd = 0.0f;
+ for (DanceChords::const_iterator it = m_chords.begin(); it != m_chords.end(); ++it) {
+ // TODO: rewrite for guitargraph's Chord
+ DanceChord chord = *it;
+ for (int arrow_i = 0; arrow_i < 4; arrow_i++) {
+ if (chord.find(arrow_i) != chord.end()) {
+ tBeg = chord[arrow_i].begin; tEnd = chord[arrow_i].end;
+ if (tEnd < past) continue;
+ if (tBeg > future) break;
+ //unsigned event = m_notes[it->dur[fret]];
+ //float glow = 0.0f;
+ //if (event > 0) glow = m_events[event - 1].glow.get();
+
+ glutil::Color c = color(arrow_i);
+ //c.r += glow;
+ //c.g += glow;
+ //c.b += glow;
+ drawNote(arrow_i, c, tBeg, tEnd);
+ }
}
- */
- //}
+ }
// Arrows on cursor
// TODO: suitable effect for pressing the arrows?
// TODO: effect possibilities: zooming, whitening, external glow
@@ -157,5 +173,5 @@ void DanceGraph::drawNote(int arrow_i, glutil::Color c, float tBeg, float tEnd)
float yBeg = time2y(tBeg);
float yEnd = time2y(tEnd);
c.a = time2a(tBeg); glColor4fv(c);
- drawArrow(arrow_i, x, time2y(tBeg));
+ drawArrow(arrow_i, x, yBeg);
}
diff --git a/game/dancegraph.hh b/game/dancegraph.hh
index 9ea6c20..6fe3eda 100644
--- a/game/dancegraph.hh
+++ b/game/dancegraph.hh
@@ -4,6 +4,7 @@
#include <boost/ptr_container/ptr_map.hpp>
#include "animvalue.hh"
+#include "song.hh"
#include "notes.hh"
#include "audio.hh"
#include "joystick.hh"
@@ -35,6 +36,7 @@ class DanceGraph {
Audio& m_audio;
//input::InputDev m_input;
Song const& m_song;
+ DanceChords m_chords;
Surface m_arrow;
AnimValue m_cx, m_width;
std::size_t m_stream;
diff --git a/game/songparser-sm.cc b/game/songparser-sm.cc
index 64a89af..7b7688a 100644
--- a/game/songparser-sm.cc
+++ b/game/songparser-sm.cc
@@ -35,6 +35,7 @@ namespace {
else if (str == "NO" || str == "no" || str == "0") var = false;
else throw std::runtime_error("Invalid boolean value: " + str);
}
+ int upper_case (int c) { return toupper (c); }
}
@@ -56,7 +57,7 @@ void SongParser::smParse() {
int dur; //note duration
std::string notestype;
std::string description;
- DanceDifficulty danceDifficulty;
+ DanceDifficulty danceDifficulty = DIFFICULTYCOUNT;
DanceDifficultyMap danceDifficultyMap;
DanceChords chords;
@@ -117,29 +118,33 @@ void SongParser::smParse() {
//Note values are analyzed here. Values are:
+ // TODO: NOTES header vars needs better way to strip trailing colon ':'
+
//<NotesType>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- notestype = boost::trim_copy(line.substr(0, line.size() -1));
+ notestype = boost::trim_copy(line.substr(0, line.size() -2));
//<Description>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- description = boost::trim_copy(line.substr(0, line.size() -1));
+ description = boost::trim_copy(line.substr(0, line.size() -2));
//<DifficultyClass>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- std::string difficultyclass = boost::trim_copy(line.substr(0, line.size() -1));
+ std::string difficultyclass = boost::trim_copy(line.substr(0, line.size() -2));
//enum
+ transform(difficultyclass.begin(), difficultyclass.end(),
+ difficultyclass.begin(), upper_case );
if(difficultyclass == "BEGINNER") danceDifficulty = BEGINNER;
if(difficultyclass == "EASY") danceDifficulty = EASY;
if(difficultyclass == "MEDIUM") danceDifficulty = MEDIUM;
if(difficultyclass == "HARD") danceDifficulty = HARD;
if(difficultyclass == "CHALLENGE") danceDifficulty = CHALLENGE;
-
+
//ignoring difficultymeter and radarvalues
//<DifficultyMeter>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- //std::string difficultymeter = boost::trim_copy(line.substr(0, line.size() -1));
+ //std::string difficultymeter = boost::trim_copy(line.substr(0, line.size() -2));
//<RadarValues>:
if(!getline(line)) { throw std::runtime_error("Required note data missing"); }
- //std::string radarvalues = boost::trim_copy(line.substr(0, line.size() -1));
+ //std::string radarvalues = boost::trim_copy(line.substr(0, line.size() -2));
//<NoteData>:
/*while (getline(line) && smParseNotes(line, chords)) {}
|
|
From: Tapio V. <aa...@us...> - 2009-11-15 11:00:23
|
Module: performous
Branch: dance
Commit: b902fc457478ec8642a7ab5f8bb5b9be31b02cb7
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 15 12:59:22 2009 +0200
Dancers are now cleared when singing screen is exited.
---
game/screen_sing.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 5b0ad26..db6fd34 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -156,6 +156,7 @@ void ScreenSing::danceLayout(double time) {
void ScreenSing::exit() {
m_score_window.reset();
m_instruments.clear();
+ m_dancers.clear();
m_layout_singer.reset();
m_engine.reset();
m_help.reset();
|
|
From: Tapio V. <aa...@us...> - 2009-11-15 11:00:21
|
Module: performous
Branch: dance
Commit: ca2e7b7c75c26cc6cb251d6d77cff3e5e62e6b1c
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 15 12:56:29 2009 +0200
Dance tracks are now correctly reported in the songs screen.
Also removed a temporary hack.
---
game/screen_sing.cc | 3 +--
game/screen_songs.cc | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 129180e..5b0ad26 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -88,12 +88,11 @@ void ScreenSing::enter() {
}
}
// Load dance tracks
- m_dancers.push_back(new DanceGraph(m_audio, *m_song)); // REMOVEME
if ( !m_song->danceTracks.empty() ) {
while(1) {
try {
m_dancers.push_back(new DanceGraph(m_audio, *m_song));
- break; // REMOVEME
+ break; // REMOVEME (when input assignement is correctly implemented)
} catch (std::runtime_error&) { break; }
}
}
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index 77a6883..8e798ca 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -320,8 +320,7 @@ void ScreenSongs::draw() {
}
{
// dancing
- // TODO: test for dance track
- alpha = 0.25;
+ alpha = !song_display.danceTracks.empty() ? 1.00 : 0.25;
glutil::Begin block(GL_TRIANGLE_STRIP);
glColor4f(1.0, 1.0, 1.0, alpha);
x = dim.x1()+4*xincr*(dim.x2()-dim.x1());
|
|
From: Tapio V. <aa...@us...> - 2009-11-15 10:16:35
|
Module: performous Branch: master Commit: 3657b6d3546a3adae60d3015c796eabd6943630a Author: Tapio Vierros <tap...@gm...> Date: Sun Nov 15 12:15:46 2009 +0200 Added myself to Authors.txt --- docs/Authors.txt | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/Authors.txt b/docs/Authors.txt index e7309cd..3aa99a9 100644 --- a/docs/Authors.txt +++ b/docs/Authors.txt @@ -28,7 +28,10 @@ dex7 <dex7 at users.sourceforge.net> * Website layout Fabian Fingerle <fabian at datensalat.eu> - * dependency testing + * Dependency testing + +Tapio Vierros <aave000 at users.sourceforge.net> + * Various things and features INACTIVE DEVELOPERS @@ -66,7 +69,7 @@ Tryad <http://tryad.org/> * The menu song (CC-by-sa) Oxetti choir <http://www.oxetti.info/> - * Practice background vocalization (recorded for this project) + * Practice background vocalization (recorded for this project) Joonas Kerttula / Frets on Fire <http://fretsonfire.sourceforge.net/> * SVGs borrowed from FoF under GNU GPL :) |