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: Yoda-JM <yo...@us...> - 2009-07-26 12:06:26
|
Module: performous
Branch: master
Commit: 1f1d34477ab2aca4462f155ac2b28ecab475b2bc
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 14:05:01 2009 +0200
Autodetected Guitar Hero guitars+drums)
---
game/guitargraph.cc | 12 +++++++++++-
game/joystick.cc | 10 ++++++++++
game/joystick.hh | 4 ++++
3 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 48e1acc..d21a66f 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -43,7 +43,17 @@ void GuitarGraph::inputProcess() {
if (b >= 5) continue;
static const int gh[] = { 2, 0, 1, 3, 4 };
static const int rb[] = { 3, 0, 1, 2, 4 };
- fretPressed[(true ? rb : gh)[b]] = (ev.type == JoystickEvent::BUTTON_DOWN);
+ switch( it->second.getType() ) {
+ case Joystick::ROCKBAND:
+ fretPressed[rb[b]] = (ev.type == JoystickEvent::BUTTON_DOWN);
+ break;
+ case Joystick::GUITARHERO:
+ fretPressed[gh[b]] = (ev.type == JoystickEvent::BUTTON_DOWN);
+ break;
+ default:
+ fretPressed[gh[b]] = (ev.type == JoystickEvent::BUTTON_DOWN);
+ break;
+ }
}
}
}
diff --git a/game/joystick.cc b/game/joystick.cc
index 9ff4965..4c035ec 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -5,6 +5,13 @@ Joysticks joysticks;
Joystick::Joystick(unsigned int _id): m_id(_id) {
m_joystick = SDL_JoystickOpen(m_id);
+ if( getName().find("Guitar Hero") != std::string::npos ) {
+ m_type = Joystick::GUITARHERO;
+ } else if( getName().find("Harmonix") != std::string::npos ) {
+ m_type = Joystick::ROCKBAND;
+ } else {
+ m_type = Joystick::UNKNOWN;
+ }
};
Joystick::~Joystick() {
// Do it another way :/
@@ -13,6 +20,9 @@ Joystick::~Joystick() {
std::string Joystick::getName() const {
return std::string(SDL_JoystickName(m_id));
};
+Joystick::Type Joystick::getType() const {
+ return m_type;
+}
std::string Joystick::getDescription() const {
std::string desc;
desc += "axes: ";
diff --git a/game/joystick.hh b/game/joystick.hh
index d5b4a16..1dc5201 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -42,10 +42,13 @@ class JoystickEvent {
/// joystick class used for dealing with ps3 drumsets
class Joystick {
public:
+ enum Type {UNKNOWN, GUITARHERO, ROCKBAND};
Joystick() {};
/// create joystick object with given id
Joystick(unsigned int _id);
~Joystick();
+ /// Return joystick Type
+ Joystick::Type getType() const;
/// get name of joystick
std::string getName() const;
/// get longer description of joystick
@@ -74,6 +77,7 @@ class Joystick {
SDL_Joystick * m_joystick;
std::deque<JoystickEvent> m_events;
unsigned int m_id;
+ Type m_type;
};
typedef std::map<unsigned int,Joystick> Joysticks;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 11:46:11
|
Module: performous
Branch: master
Commit: 9b9c0c8f7e2a04fe163974f26d8b1153ac68f68b
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 14:43:53 2009 +0300
Remember difficulty level on instrument change (if possible).
Allow setting the difficulty and choosing an instrument simultaneously.
---
game/guitargraph.cc | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index be09e32..48e1acc 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -50,11 +50,14 @@ void GuitarGraph::inputProcess() {
void GuitarGraph::engine(double time) {
if (picked && time < -0.5) {
+ if (fretPressed[4]) {
+ m_instrument = (m_instrument + 1) % m_song.tracks.size();
+ if (!difficulty(m_level)) difficultyAuto();
+ }
if (fretPressed[0]) difficulty(DIFFICULTY_SUPAEASY);
else if (fretPressed[1]) difficulty(DIFFICULTY_EASY);
else if (fretPressed[2]) difficulty(DIFFICULTY_MEDIUM);
else if (fretPressed[3]) difficulty(DIFFICULTY_AMAZING);
- if (fretPressed[4]) { m_instrument = (m_instrument + 1) % m_song.tracks.size(); difficultyAuto(); }
}
if (picked) { m_pickValue.setValue(1.0); }
picked = false;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 11:39:08
|
Module: performous
Branch: master
Commit: 1e4a04316dcb0d3f7554d2bfdc58160034a862e3
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 14:38:17 2009 +0300
Rip out Chord stuff, make difficulty level selection better.
---
game/guitargraph.cc | 133 ++++++++++-----------------------------------------
game/guitargraph.hh | 119 +---------------------------------------------
2 files changed, 27 insertions(+), 225 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index ed37ddb..be09e32 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -2,74 +2,15 @@
#include "joystick.hh"
-Chord::Chord(int frt,double begin){
- this->fret=frt;
- this->start=begin;
- this->state=COMING;
- this->dt=0.075;
-}
-Chord::Chord(const Chord &c){
- this->fret=c.fret;
- this->event=c.event;
- this->start=c.start;
- this->end=c.end;
- this->dt=c.dt;
- this->state=c.state;
-}
-
-Chord::~Chord(){}
-Chord &Chord::operator=(const Chord &c){
- if(&c!=this){
- this->fret=c.fret;
- this->event=c.event;
- this->start=c.start;
- this->end=c.end;
- this->dt=c.dt;
- this->state=c.state;
- }
- return *this;
-}
-
-unsigned char Chord::getEvent(){
- return this->event;
-}
-
-int Chord::getFret(){
- return this->fret;
-}
-
-void Chord::setEnd(double e){
-
- this->end=e;
-}
-
-bool Chord::isBetween(double time){
-
- return (time>this->start&&time<this->end);
-}
-
-Chord::ChordState Chord::getState(){
-
- return this->state;
-}
-
-void Chord::setState(Chord::ChordState s){
-
- this->state=s;
-}
-
-bool Chord::pressNow(double t){
-
- return (t>(this->start-this->dt)&&t<(this->start+dt));
-}
-
-double Chord::getDt(){
-
- return this->dt;
-}
-
-
namespace {
+ struct Diff { std::string name; int basepitch; } diffv[] = {
+ { "Supaeasy", 0x3C },
+ { "Easy", 0x48 },
+ { "Medium", 0x54 },
+ { "Amazing", 0x60 }
+ };
+ const size_t diffsz = sizeof(diffv) / sizeof(*diffv);
+
const float past = -0.3f;
const float future = 3.0f;
const float timescale = 60.0f;
@@ -82,10 +23,12 @@ namespace {
}
GuitarGraph::GuitarGraph(Song const& song): m_song(song), m_button("button.svg"), m_pickValue(0.0, 5.0), m_instrument(), m_level(), m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()) {
- if (m_song.tracks.empty()) throw std::runtime_error("No tracks");
+ std::size_t tracks = m_song.tracks.size();
+ if (tracks == 0) throw std::runtime_error("No tracks");
m_necks.push_back(new Texture("guitarneck.svg"));
- m_necks.push_back(new Texture("bassneck.svg"));
- m_necks.push_back(new Texture("bassneck.svg")); // Drums
+ if (tracks > 1) m_necks.push_back(new Texture("bassneck.svg"));
+ if (tracks > 2) m_necks.push_back(new Texture("bassneck.svg")); // Drums
+ difficultyAuto();
}
void GuitarGraph::inputProcess() {
@@ -108,35 +51,26 @@ void GuitarGraph::inputProcess() {
void GuitarGraph::engine(double time) {
if (picked && time < -0.5) {
if (fretPressed[0]) difficulty(DIFFICULTY_SUPAEASY);
- if (fretPressed[1]) difficulty(DIFFICULTY_EASY);
- if (fretPressed[2]) difficulty(DIFFICULTY_MEDIUM);
- if (fretPressed[3]) difficulty(DIFFICULTY_AMAZING);
- if (fretPressed[4]) m_instrument = (m_instrument + 1) % m_song.tracks.size();
+ else if (fretPressed[1]) difficulty(DIFFICULTY_EASY);
+ else if (fretPressed[2]) difficulty(DIFFICULTY_MEDIUM);
+ else if (fretPressed[3]) difficulty(DIFFICULTY_AMAZING);
+ if (fretPressed[4]) { m_instrument = (m_instrument + 1) % m_song.tracks.size(); difficultyAuto(); }
}
if (picked) { m_pickValue.setValue(1.0); }
picked = false;
}
+void GuitarGraph::difficultyAuto() {
+ for (int level = 0; level < DIFFICULTYCOUNT; ++level) if (difficulty(Difficulty(level))) return;
+ throw std::runtime_error("No difficulty levels found");
+}
+
bool GuitarGraph::difficulty(Difficulty level) {
- Chords c;
- uint8_t basepitch;
- switch (level) {
- case DIFFICULTY_SUPAEASY: basepitch = 0x3c; break;
- case DIFFICULTY_EASY: basepitch = 0x48; break;
- case DIFFICULTY_MEDIUM: basepitch = 0x54; break;
- case DIFFICULTY_AMAZING: basepitch = 0x60; break;
- default: throw std::logic_error("Invalid difficulty level");
- }
+ uint8_t basepitch = diffv[level].basepitch;
NoteMap const& nm = m_song.tracks[m_instrument].nm;
- NoteMap::const_iterator nmIt[5];
int fail = 0;
- for (int fret = 0; fret < 5; ++fret) {
- nmIt[fret] = nm.find(basepitch + fret);
- if (nmIt[fret] == nm.end()) ++fail;
- }
+ for (int fret = 0; fret < 5; ++fret) if (nm.find(basepitch + fret) == nm.end()) ++fail;
if (fail == 5) return false;
- //std::sort(c.begin(), c.end(), chordlt);
- m_chords = c;
m_level = level;
return true;
}
@@ -145,14 +79,7 @@ void GuitarGraph::draw(double time) {
m_text.dimensions.screenBottom(-0.05).middle(0.0);
if (time < -0.5) {
std::string txt = "Play a fret to change:\n";
- txt += m_song.tracks[m_instrument].name + "/";
- switch (m_level) {
- case DIFFICULTY_SUPAEASY: txt += "Supaeasy"; break;
- case DIFFICULTY_EASY: txt += "Easy"; break;
- case DIFFICULTY_MEDIUM: txt += "Medium"; break;
- case DIFFICULTY_AMAZING: txt += "Amazing"; break;
- default: throw std::logic_error("Invalid difficulty level");
- }
+ txt += m_song.tracks[m_instrument].name + "/" + diffv[m_level].name;
m_text.draw(txt);
}
engine(time);
@@ -181,15 +108,7 @@ void GuitarGraph::draw(double time) {
glTexCoord2f(1.0f, texCoord); glVertex2f(2.5f, time2y(tEnd));
}
}
- int basepitch;
-
- switch (m_level) {
- case DIFFICULTY_SUPAEASY: basepitch = 0x3c; break;
- case DIFFICULTY_EASY: basepitch = 0x48; break;
- case DIFFICULTY_MEDIUM: basepitch = 0x54; break;
- case DIFFICULTY_AMAZING: basepitch = 0x60; break;
- default: throw std::logic_error("Invalid difficulty level");
- }
+ int basepitch = diffv[m_level].basepitch;
static glutil::Color fretColors[5] = {
glutil::Color(0.0f, 1.0f, 0.0f),
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 7fb30a3..3af4053 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -9,122 +9,6 @@
class Song;
-class Chord{
-
-
- public:
-
- static const double CHORD_POOR = 0.075;
- static const double CHORD_GOOD = 0.050;
- static const double CHORD_GREAT = 0.020;
- static const double CHORD_PERFECT = 0.010;
-
- /**
- * Tells in which state the chord is.
- */
-
- enum ChordState{
-
- COMING,
- HELD,
- FAILED
- };
-
- /** Constructor.
- *
- * @param fret The quitar fret where the chord songs.
- * @param begin The start time of the chord.
- */
-
- Chord(int fret,double begin);
- Chord(const Chord &c);
- ~Chord();
- Chord &operator=(const Chord &c);
- unsigned char getEvent();
-
- /** Tells the quitar fret where the chord songs.
- *
- * @return quitar fret.
- */
-
- int getFret();
-
- /** Tells how long the chord last.
- *
- * @return Time between end and begin.
- */
-
- double getTime() const { return end - start; }
-
- /** Tells when the chord should be played.
- *
- * @return Chords start time in seconds.
- */
-
- double getStart() const { return start; }
-
- /** Tells when the chord ends.
- *
- * @return Chords end in seconds.
- */
-
- double getEnd() const { return end; }
-
- /** Sets the end time of chord in seconds.
- *
- * @param end End time in seconds.
- */
-
- void setEnd(double end);
-
- /** Tells if the given time is between begin and end.
- *
- * @param time Time is between begin or end or is not.
- * @return true if time is between false otherwise.
- */
-
- bool isBetween(double time);
-
- /** Tells if the player should pick this chord at given time
- *
- * @param time Time when the player tries to pick this chord.
- * @return true if chord should be picked at given time false otherwise.
- */
-
- bool pressNow(double time);
-
- /** Tells how long is the pick time.
- *
- * @return Size of picktime in seconds.
- */
-
- double getDt();
-
- /** Tells in which state the chord is.
- *
- * @return Chord-state.
- */
-
- ChordState getState();
-
- /** Set the chord state
- *
- * @param state Chord-state where the chord-changes.
- */
-
- void setState(ChordState state);
-
-private:
-
-
- int fret;
- unsigned char event;
- double start;
- double end;
- ChordState state;
- double dt;
-};
-
/// handles drawing of notes and waves
class GuitarGraph {
public:
@@ -149,9 +33,8 @@ class GuitarGraph {
DIFFICULTY_AMAZING,
DIFFICULTYCOUNT
} m_level;
+ void difficultyAuto();
bool difficulty(Difficulty level);
- typedef std::vector<Chord> Chords;
- Chords m_chords;
SvgTxtTheme m_text;
};
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 11:36:44
|
Module: performous
Branch: master
Commit: 2a4b8390bc883ff4c3f97e9deccf2322a4178726
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 13:36:22 2009 +0200
Fixed lyrics position
---
game/layout_singer.cc | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index 9441d96..7007fbc 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -41,6 +41,7 @@ void LayoutSinger::draw(double time, Position position) {
linespacing = 0.06;
break;
case LayoutSinger::MIDDLE:
+ pos.center(-0.05);
linespacing = 0.04;
break;
}
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 10:05:15
|
Module: performous
Branch: master
Commit: 9aa54132b6d2a56ea57e44d48a3d5116738dc4fa
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 12:04:56 2009 +0200
Fixed activity
---
game/layout_singer.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index fc4c0d9..9441d96 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -70,7 +70,7 @@ void LayoutSinger::draw(double time, Position position) {
unsigned int i = 0;
for (std::list<Player>::const_iterator p = players.begin(); p != players.end(); ++p, ++i) {
float act = p->activity();
- //if (act == 0.0f) continue;
+ if (act == 0.0f) continue;
glColor4f(p->m_color.r, p->m_color.g, p->m_color.b,act);
switch(position) {
case LayoutSinger::BOTTOM:
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 09:54:52
|
Module: performous
Branch: master
Commit: 791c2a8d7edbbef75b5b3d3178583a5062385a1f
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 11:54:26 2009 +0200
Added GH pick events
---
game/guitargraph.cc | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index a24eba1..ed37ddb 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -91,7 +91,10 @@ GuitarGraph::GuitarGraph(Song const& song): m_song(song), m_button("button.svg")
void GuitarGraph::inputProcess() {
for (Joysticks::iterator it = joysticks.begin(); it != joysticks.end(); ++it) {
for (JoystickEvent ev; it->second.tryPollEvent(ev); ) {
+ // RockBand pick event
if (ev.type == JoystickEvent::HAT_MOTION && ev.hat_direction != JoystickEvent::CENTERED) picked = true;
+ // GuitarHero pick event
+ if (ev.type == JoystickEvent::AXIS_MOTION && ev.axis_id == 5 && ev.axis_value != 0) picked = true;
if (ev.type != JoystickEvent::BUTTON_DOWN && ev.type != JoystickEvent::BUTTON_UP) continue;
unsigned b = ev.button_id;
if (b >= 5) continue;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 09:42:55
|
Module: performous Branch: master Commit: 72979e510f8ea9a7a1769e965f96ce9b83d271d7 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 26 12:42:37 2009 +0300 Modify default config/schema. --- data/performous.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/data/performous.xml b/data/performous.xml index 29dc585..fef828c 100644 --- a/data/performous.xml +++ b/data/performous.xml @@ -159,15 +159,15 @@ <limits min="0" max="100" step="5" /> <locale name="C"> <short>Menu volume</short> - <long>The volume level of menus, song previews and jukebox mode</long> + <long>The volume level of menus, song previews and jukebox mode.</long> </locale> </entry> - <entry name="audio/music_volume" type="int" value="100"> + <entry name="audio/music_volume" type="int" value="90"> <ui unit=" %" /> <limits min="0" max="100" step="5" /> <locale name="C"> <short>Music volume</short> - <long>The ingame music volume</long> + <long>The ingame music volume. Values above 90 are not recommended as distortion may occur.</long> </locale> </entry> |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 09:36:34
|
Module: performous
Branch: master
Commit: 8208509670e34c534a68a730e36e763e73e608b9
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 12:35:31 2009 +0300
Guitar angle etc. tuning.
Display instrument and difficulty level on guitar help text.
---
game/guitargraph.cc | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index aa23746..a24eba1 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -72,7 +72,7 @@ double Chord::getDt(){
namespace {
const float past = -0.3f;
const float future = 3.0f;
- const float timescale = 80.0f;
+ const float timescale = 60.0f;
const float texCoordStep = -0.5f; // Two beat lines per neck texture => 0.5 tex units per beat
// 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); }
@@ -139,14 +139,25 @@ bool GuitarGraph::difficulty(Difficulty level) {
}
void GuitarGraph::draw(double time) {
- m_text.dimensions.screenBottom(-0.1).middle(0.2);
- m_text.draw(std::string("Tronic FIXME"));
+ m_text.dimensions.screenBottom(-0.05).middle(0.0);
+ if (time < -0.5) {
+ std::string txt = "Play a fret to change:\n";
+ txt += m_song.tracks[m_instrument].name + "/";
+ switch (m_level) {
+ case DIFFICULTY_SUPAEASY: txt += "Supaeasy"; break;
+ case DIFFICULTY_EASY: txt += "Easy"; break;
+ case DIFFICULTY_MEDIUM: txt += "Medium"; break;
+ case DIFFICULTY_AMAZING: txt += "Amazing"; break;
+ default: throw std::logic_error("Invalid difficulty level");
+ }
+ m_text.draw(txt);
+ }
engine(time);
Dimensions dimensions(1.0); // FIXME: bogus aspect ratio (is this fixable?)
dimensions.screenBottom().fixedWidth(0.5f);
glutil::PushMatrix pmb;
glTranslatef(0.5 * (dimensions.x1() + dimensions.x2()), dimensions.y2(), 0.0f);
- glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
+ glRotatef(85.0f, 1.0f, 0.0f, 0.0f);
{ float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
// Draw the neck
{
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 09:31:25
|
Module: performous Branch: master Commit: 481dacd45664cf2e42afad34cd7cfd26cd273671 Author: Vincent Le Ligeour <yo...@us...> Date: Sun Jul 26 11:31:12 2009 +0200 Merge branch 'master' of ssh://yoda-j...@pe.../gitroot/performous --- |
|
From: Yoda-JM <yo...@us...> - 2009-07-26 09:31:23
|
Module: performous
Branch: master
Commit: b4f6102ce031d92df08df91876c693fca5916684
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 11:30:31 2009 +0200
Fixed singing score position in instrument mode
---
game/layout_singer.cc | 20 +++++++++++++++++---
1 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index 72cdc33..fc4c0d9 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -70,12 +70,26 @@ void LayoutSinger::draw(double time, Position position) {
unsigned int i = 0;
for (std::list<Player>::const_iterator p = players.begin(); p != players.end(); ++p, ++i) {
float act = p->activity();
- if (act == 0.0f) continue;
+ //if (act == 0.0f) continue;
glColor4f(p->m_color.r, p->m_color.g, p->m_color.b,act);
- m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
+ switch(position) {
+ case LayoutSinger::BOTTOM:
+ m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
+ break;
+ case LayoutSinger::MIDDLE:
+ m_player_icon->dimensions.right(0.35).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
+ break;
+ }
m_player_icon->draw();
m_score_text[i%4]->render((boost::format("%04d") % p->getScore()).str());
- m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
+ switch(position) {
+ case LayoutSinger::BOTTOM:
+ m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
+ break;
+ case LayoutSinger::MIDDLE:
+ m_score_text[i%4]->dimensions().right(0.45).fixedHeight(0.050).screenTop(0.025 + 0.050 * i);
+ break;
+ }
m_score_text[i%4]->draw();
glColor4f(1.0, 1.0, 1.0, 1.0);
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 09:00:24
|
Module: performous
Branch: master
Commit: 6f30b15fb59ee797113225fb0cda45b2fde0e9dc
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 11:59:31 2009 +0300
Make screen sing behave better in instrument mode.
---
game/screen_sing.cc | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2ae679c..44784fd 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -62,8 +62,8 @@ void ScreenSing::manageEvent(SDL_Event event) {
}
else if (key == SDLK_SPACE || key == SDLK_PAUSE) m_audio.togglePause();
if (m_score_window.get()) return;
- // The rest are only available when score window is not displayed
- if (key == SDLK_RETURN && status == Song::INSTRUMENTAL_BREAK) {
+ // The rest are only available when score window is not displayed and when there are no instruments
+ if (key == SDLK_RETURN && status == Song::INSTRUMENTAL_BREAK && m_songs.current().tracks.empty()) {
double diff = m_layout_singer->lyrics_begin() - 3.0 - time;
if (diff > 0.0) m_audio.seek(diff);
}
@@ -74,7 +74,7 @@ void ScreenSing::manageEvent(SDL_Event event) {
else if (key == SDLK_F8) ++config["audio/round-trip"];
else if (key == SDLK_F9) ++config["game/karaoke_mode"];
else if (key == SDLK_F10) ++config["game/pitch"];
- else if (key == SDLK_HOME) m_audio.seek(-m_audio.getPosition());
+ else if (key == SDLK_HOME) m_audio.seekPos(0.0);
else if (key == SDLK_LEFT) { m_audio.seek(-5.0); seekback = true; }
else if (key == SDLK_RIGHT) m_audio.seek(5.0);
else if (key == SDLK_UP) m_audio.seek(30.0);
@@ -147,7 +147,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()) {
+ if (!m_score_window.get() && song.tracks.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!";
}
@@ -156,7 +156,7 @@ void ScreenSing::draw() {
ScreenManager* sm = ScreenManager::getSingletonPtr();
- if (config["game/karaoke_mode"].b()) {
+ if (config["game/karaoke_mode"].b() || !song.tracks.empty()) {
if (!m_audio.isPlaying()) sm->activateScreen("Songs");
} else {
if (m_score_window.get()) {
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 08:54:17
|
Module: performous
Branch: master
Commit: 79679fd2793a84e15f3e90c3df32478e61a69cb9
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 10:53:04 2009 +0200
Moved score drawing to Singer Layout
Added text hack in guitar graph (Tronic will fix me)
Added API for InputDev (not implemented yet)
---
game/guitargraph.cc | 4 +++-
game/guitargraph.hh | 2 ++
game/joystick.cc | 1 +
game/joystick.hh | 20 ++++++++++++++++++--
game/layout_singer.cc | 25 ++++++++++++++++++++++++-
game/layout_singer.hh | 2 ++
game/screen_sing.cc | 30 ------------------------------
game/screen_sing.hh | 2 --
8 files changed, 50 insertions(+), 36 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 0ba4581..aa23746 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -81,7 +81,7 @@ namespace {
bool picked = false;
}
-GuitarGraph::GuitarGraph(Song const& song): m_song(song), m_button("button.svg"), m_pickValue(0.0, 5.0), m_instrument(), m_level() {
+GuitarGraph::GuitarGraph(Song const& song): m_song(song), m_button("button.svg"), m_pickValue(0.0, 5.0), m_instrument(), m_level(), m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()) {
if (m_song.tracks.empty()) throw std::runtime_error("No tracks");
m_necks.push_back(new Texture("guitarneck.svg"));
m_necks.push_back(new Texture("bassneck.svg"));
@@ -139,6 +139,8 @@ bool GuitarGraph::difficulty(Difficulty level) {
}
void GuitarGraph::draw(double time) {
+ m_text.dimensions.screenBottom(-0.1).middle(0.2);
+ m_text.draw(std::string("Tronic FIXME"));
engine(time);
Dimensions dimensions(1.0); // FIXME: bogus aspect ratio (is this fixable?)
dimensions.screenBottom().fixedWidth(0.5f);
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index feb2f4c..7fb30a3 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -5,6 +5,7 @@
#include "animvalue.hh"
#include "engine.hh"
#include "surface.hh"
+#include "opengl_text.hh"
class Song;
@@ -151,5 +152,6 @@ class GuitarGraph {
bool difficulty(Difficulty level);
typedef std::vector<Chord> Chords;
Chords m_chords;
+ SvgTxtTheme m_text;
};
diff --git a/game/joystick.cc b/game/joystick.cc
index 951a0c1..9ff4965 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -122,6 +122,7 @@ void Joystick::addEvent(SDL_JoyButtonEvent event) {
JoystickEvent joy_event((event.type == SDL_JOYBUTTONDOWN) ? JoystickEvent::BUTTON_DOWN : JoystickEvent::BUTTON_UP);
joy_event.button_id = event.button;
+ joy_event.button_state = event.state;
m_events.push_back(joy_event);
}
diff --git a/game/joystick.hh b/game/joystick.hh
index a0003bf..d5b4a16 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -16,11 +16,12 @@ void joysticks_init();
class JoystickEvent {
public:
enum Type {BUTTON_DOWN, BUTTON_UP, HAT_MOTION, AXIS_MOTION, BALL_MOTION};
- JoystickEvent(): button_id(), hat_id(), hat_direction(CENTERED), axis_id(), axis_value(), ball_id(), ball_dx(), ball_dy() {};
- JoystickEvent(Type _type): type(_type), button_id(), hat_id(), hat_direction(CENTERED), axis_id(), axis_value(), ball_id(), ball_dx(), ball_dy() {};
+ JoystickEvent(): button_id(), button_state(), hat_id(), hat_direction(CENTERED), axis_id(), axis_value(), ball_id(), ball_dx(), ball_dy() {};
+ JoystickEvent(Type _type): type(_type), button_id(), button_state(), hat_id(), hat_direction(CENTERED), axis_id(), axis_value(), ball_id(), ball_dx(), ball_dy() {};
Type type;
// for BUTTON_DOWN and BUTTON_UP
unsigned char button_id;
+ bool button_state;
// for HAT_MOTION
enum HatDirection {
LEFT_UP, UP, RIGHT_UP,
@@ -77,3 +78,18 @@ class Joystick {
typedef std::map<unsigned int,Joystick> Joysticks;
extern Joysticks joysticks;
+
+class InputDevEvent {
+ public:
+ InputDevEvent() {};
+};
+
+class InputDev {
+ public:
+ InputDev() {};
+ bool tryPoll(InputDevEvent& _event) {(void)_event;return true;};
+ bool fret(unsigned int _id) {(void)_id;return false;};
+ // reserved for feeding the device with event
+ void addEvent(SDL_JoyButtonEvent _event) {(void)_event;};
+ private:
+};
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index 0bbab52..72cdc33 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -1,7 +1,13 @@
#include "layout_singer.hh"
-LayoutSinger::LayoutSinger(Songs &_songs, Engine &_engine, ThemeSing& _theme): m_engine(_engine), m_songs(_songs), m_theme(_theme), m_noteGraph(_songs.current()),m_lyricit(_songs.current().notes.begin()), m_lyrics() {};
+LayoutSinger::LayoutSinger(Songs &_songs, Engine &_engine, ThemeSing& _theme): m_engine(_engine), m_songs(_songs), m_theme(_theme), m_noteGraph(_songs.current()),m_lyricit(_songs.current().notes.begin()), m_lyrics() {
+ m_score_text[0].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
+ m_score_text[1].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
+ m_score_text[2].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
+ m_score_text[3].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
+ m_player_icon.reset(new Surface(getThemePath("sing_pbox.svg")));
+}
LayoutSinger::~LayoutSinger() {};
@@ -57,6 +63,23 @@ void LayoutSinger::draw(double time, Position position) {
if (i == 0) m_lyrics[0].draw(m_theme.lyrics_now, time, pos);
else if (i == 1 && position == LayoutSinger::BOTTOM) m_lyrics[1].draw(m_theme.lyrics_next, time, pos);
}
+
+ // Score display
+ if (!config["game/karaoke_mode"].b() ) {// draw score if not in karaoke mode
+ std::list<Player> const& players = m_engine.getPlayers();
+ unsigned int i = 0;
+ for (std::list<Player>::const_iterator p = players.begin(); p != players.end(); ++p, ++i) {
+ float act = p->activity();
+ if (act == 0.0f) continue;
+ glColor4f(p->m_color.r, p->m_color.g, p->m_color.b,act);
+ m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
+ m_player_icon->draw();
+ m_score_text[i%4]->render((boost::format("%04d") % p->getScore()).str());
+ m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
+ m_score_text[i%4]->draw();
+ glColor4f(1.0, 1.0, 1.0, 1.0);
+ }
+ }
}
double LayoutSinger::lyrics_begin() {
diff --git a/game/layout_singer.hh b/game/layout_singer.hh
index d25d014..e70bcab 100644
--- a/game/layout_singer.hh
+++ b/game/layout_singer.hh
@@ -56,4 +56,6 @@ class LayoutSinger {
NoteGraph m_noteGraph;
Notes::const_iterator m_lyricit;
std::deque<LyricRow> m_lyrics;
+ boost::scoped_ptr<Surface> m_player_icon;
+ boost::scoped_ptr<SvgTxtThemeSimple> m_score_text[4];
};
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 4d9f069..2ae679c 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -26,11 +26,6 @@ void ScreenSing::enter() {
}
if (!song.video.empty() && config["graphic/video"].b()) m_video.reset(new Video(song.path + song.video, song.videoGap));
m_pause_icon.reset(new Surface(getThemePath("sing_pause.svg")));
- m_score_text[0].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
- m_score_text[1].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
- m_score_text[2].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
- m_score_text[3].reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
- m_player_icon.reset(new Surface(getThemePath("sing_pbox.svg")));
m_progress.reset(new ProgressBar(getThemePath("sing_progressbg.svg"), getThemePath("sing_progressfg.svg"), ProgressBar::HORIZONTAL, 0.01f, 0.01f, true));
m_progress->dimensions.fixedWidth(0.4).left(-0.5).screenTop();
theme->timer.dimensions.screenTop(0.5 * m_progress->dimensions.h());
@@ -46,13 +41,8 @@ void ScreenSing::exit() {
m_layout_singer.reset();
m_engine.reset();
m_pause_icon.reset();
- m_player_icon.reset();
m_video.reset();
m_background.reset();
- m_score_text[0].reset();
- m_score_text[1].reset();
- m_score_text[2].reset();
- m_score_text[3].reset();
theme.reset();
}
@@ -149,7 +139,6 @@ void ScreenSing::draw() {
} else {
m_layout_singer->draw(time, LayoutSinger::MIDDLE);
}
- if (!config["game/karaoke_mode"].b()) drawScores(); // draw score if not in karaoke mode
Song::Status status = song.status(time);
@@ -186,25 +175,6 @@ void ScreenSing::draw() {
}
}
-void ScreenSing::drawScores() {
- std::list<Player> const& players = m_engine->getPlayers();
- // Score display
- {
- unsigned int i = 0;
- for (std::list<Player>::const_iterator p = players.begin(); p != players.end(); ++p, ++i) {
- float act = p->activity();
- if (act == 0.0f) continue;
- glColor4f(p->m_color.r, p->m_color.g, p->m_color.b,act);
- m_player_icon->dimensions.left(-0.5 + 0.01 + 0.25 * i).fixedWidth(0.075).screenTop(0.055);
- m_player_icon->draw();
- m_score_text[i%4]->render((boost::format("%04d") % p->getScore()).str());
- m_score_text[i%4]->dimensions().middle(-0.350 + 0.01 + 0.25 * i).fixedHeight(0.075).screenTop(0.055);
- m_score_text[i%4]->draw();
- glColor4f(1.0, 1.0, 1.0, 1.0);
- }
- }
-}
-
ScoreWindow::ScoreWindow(Engine& e):
m_pos(0.8, 2.0),
m_bg(getThemePath("score_window.svg")),
diff --git a/game/screen_sing.hh b/game/screen_sing.hh
index 5a009f7..fbd1d96 100644
--- a/game/screen_sing.hh
+++ b/game/screen_sing.hh
@@ -55,8 +55,6 @@ class ScreenSing: public Screen {
boost::scoped_ptr<Surface> m_background;
boost::scoped_ptr<Video> m_video;
boost::scoped_ptr<Surface> m_pause_icon;
- boost::scoped_ptr<Surface> m_player_icon;
- boost::scoped_ptr<SvgTxtThemeSimple> m_score_text[4];
boost::scoped_ptr<Engine> m_engine;
boost::scoped_ptr<LayoutSinger> m_layout_singer;
boost::scoped_ptr<GuitarGraph> m_guitarGraph;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 08:14:12
|
Module: performous Branch: master Commit: 10363852d68f6b50e82cf861ea12c2e669dc1436 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 26 11:13:29 2009 +0300 Made the button slightly smaller and made the outline thicker (was less than one pixel). Update knittl on authors. --- docs/Authors.txt | 1 + themes/default/button.svg | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/Authors.txt b/docs/Authors.txt index 7c7f625..e7309cd 100644 --- a/docs/Authors.txt +++ b/docs/Authors.txt @@ -21,6 +21,7 @@ zarrn <zarrn at users.sourceforge.net> * OSX build fixes and testing knittl <knittl at users.sourceforge.net> + * Code documentation (Doxygen comments) * SVG design dex7 <dex7 at users.sourceforge.net> diff --git a/themes/default/button.svg b/themes/default/button.svg index 3fed84b..3ffb606 100644 --- a/themes/default/button.svg +++ b/themes/default/button.svg @@ -15,7 +15,7 @@ sodipodi:version="0.32" inkscape:version="0.46" version="1.0" - sodipodi:docname="fret_button.svg" + sodipodi:docname="button.svg" inkscape:output_extension="org.inkscape.output.svg.inkscape"> <defs id="defs2465"> @@ -81,13 +81,13 @@ inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:zoom="5.6" - inkscape:cx="56.224066" - inkscape:cy="40.644334" + inkscape:cx="27.116923" + inkscape:cy="40.003406" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" inkscape:window-width="1021" - inkscape:window-height="676" + inkscape:window-height="720" inkscape:window-x="87" inkscape:window-y="34" /> <metadata @@ -108,17 +108,17 @@ transform="translate(-110.35967,-771.51188)"> <path sodipodi:type="arc" - style="opacity:1;fill:#f5f5f5;fill-opacity:0.96078431;stroke:#000000;stroke-width:5;stroke-miterlimit:3.29999995;stroke-dasharray:none;stroke-opacity:1" + style="fill:#f5f5f5;fill-opacity:0.96078430999999997;stroke:#000000;stroke-width:17.75125346;stroke-miterlimit:3.29999995;stroke-dasharray:none;stroke-opacity:1" id="path2481" sodipodi:cx="360" sodipodi:cy="838.07648" sodipodi:rx="165.71428" sodipodi:ry="165.71428" d="M 525.71428,838.07648 A 165.71428,165.71428 0 1 1 194.28572,838.07648 A 165.71428,165.71428 0 1 1 525.71428,838.07648 z" - transform="matrix(0.1902335,0,0,0.1902336,73.876048,644.33005)" /> + transform="matrix(0.1690021,0,0,0.1690022,81.519358,662.1236)" /> <path - style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07658868px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" - d="M 146.26053,783.90065 L 144.7132,783.90065 L 144.40374,784.67432 L 144.7132,785.52533 L 144.55847,786.45374 L 143.78482,785.98954 L 143.16588,784.82904 L 141.85065,784.51958 L 141.30909,783.97802 L 140.1486,783.43645 L 138.83337,781.27019 L 138.91075,780.26443 L 142.16013,777.7887 L 143.70743,778.485 L 143.93954,779.02658 L 143.93954,779.6455 L 144.32637,780.18706 L 145.10003,780.41917 L 145.64159,779.95496 L 145.71896,779.4134 L 145.48686,778.94921 L 145.02267,778.7171 L 144.7132,778.33027 L 145.4095,778.02081 L 145.25477,777.24714 L 145.25477,776.78295 L 144.79058,776.31874 L 144.55847,775.62244 L 143.63008,775.39035 L 142.85641,775.23562 L 141.23172,776.39611 L 137.13132,778.02081 L 136.20292,778.94921 L 135.50662,779.49077 L 135.35188,780.72862 L 135.66137,781.34755 L 136.43503,783.43645 L 137.44078,785.37061 L 138.52391,786.7632 L 136.82185,789.54839 L 134.88769,793.72616 L 133.72719,795.58294 L 131.79305,797.98131 L 131.71568,799.06443 L 130.70993,799.99284 L 132.25724,801.38543 L 131.87042,803.01013 L 132.02515,806.64633 L 132.72143,810.82411 L 133.41774,814.5377 L 134.19139,815.77555 L 135.27453,818.01917 L 136.97658,820.57227 L 137.44078,822.19695 L 137.90498,823.35745 L 136.51238,825.29161 L 134.03666,826.29736 L 133.80457,827.07103 L 138.52391,826.91631 L 137.82762,828.15417 L 138.67864,828.92783 L 140.92227,829.15993 L 142.70169,827.61261 L 143.32063,825.44635 L 144.32637,823.58955 L 145.56423,822.50643 L 145.95106,821.26856 L 144.63585,821.19119 L 145.48686,820.34016 L 143.78482,820.88173 L 145.02267,819.64386 L 144.09428,819.41177 L 143.39797,818.56074 L 142.23749,816.16239 L 139.52967,813.91877 L 138.98812,813.76403 L 139.52967,813.29984 L 139.4523,811.98462 L 139.99387,810.82411 L 139.52967,810.90148 L 140.3807,809.43152 L 140.3807,807.96157 L 140.92227,807.1879 L 140.92227,806.18213 L 142.08275,804.6348 L 142.16013,803.31958 L 141.92802,802.23646 L 142.46959,800.99859 L 143.0885,799.99284 L 143.0885,799.3739 L 143.78482,799.29653 L 144.40374,798.6776 L 144.9453,797.13028 L 146.18317 5.73768 L 147.65311,795.19612 L 148.58151,795.96979 L 150.82513,796.66608 L 152.60456,797.59448 L 153.45557,798.6776 L 154.92554,798.83233 L 159.56752,800.84386 L 161.96586,801.69488 L 163.90002,803.16485 L 164.36421,803.01013 L 164.36421,802.54592 L 163.2811,801.69488 L 165.36997,802.23646 L 165.60208,801.84962 L 165.13788,801.38543 L 165.91154,801.38543 L 165.98891,800.92123 L 164.59631,800.61176 L 165.67944,800.30229 L 165.67944,799.76073 L 165.29261,799.68337 L 164.13211,799.76073 L 163.20373,799.3739 L 162.58479,799.06443 L 163.51319,798.29077 L 163.74529,797.74921 L 163.59055,797.36238 L 162.73954,797.51711 L 160.9601,798.44551 L 160.72801,798.9097 L 160.10908,798.75497 L 157.86545,797.51711 L 157.78808,796.66608 L 156.47286,795.96979 L 154.22924,794.80928 L 153.68769,795.19612 L 153.76504,794.65455 L 152.52719,793.49406 L 151.44405,793.1846 L 150.4383,792.0241 L 150.12884,791.63727 L 151.1346,792.33357 L 150.97987,791.5599 L 151.75353,791.94673 L 151.52142,790.78624 L 152.60456,791.79199 L 152.14037,791.0957 L 153.22348,791.5599 L 152.2951,790.24469 L 152.99138,790.47677 L 152.68192,789.23892 L 153.22348,789.70311 L 152.44982,788.54263 L 153.22348,788.77473 L 152.52719,787.84633 L 153.45557,787.76896 L 152.44982,787.15003 L 153.06875,786.84057 L 152.37247,786.7632 L 153.30084,785.91217 L 152.44982,785.98954 L 152.52719,785.44798 L 152.60456,783.90065 L 152.14037,784.98378 L 151.59879,783.43645 L 151.67616,784.67432 L 151.36669,784.75168 L 150.59303,784.75168 L 149.74201,783.51382 L 148.89097,783.51382 L 147.88521,782.66278 L 147.42101,783.12698 L 146.26053,783.90065 z" + style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.06804083px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 145.82521,786.11711 L 144.45057,786.11711 L 144.17565,786.80444 L 144.45057,787.56047 L 144.31311,788.38526 L 143.62581,787.97287 L 143.07595,786.94189 L 141.90751,786.66697 L 141.42639,786.18585 L 140.39542,785.70472 L 139.22698,783.78023 L 139.29572,782.88672 L 142.18244,780.6873 L 143.55706,781.30589 L 143.76326,781.78703 L 143.76326,782.33687 L 144.10692,782.81799 L 144.79423,783.02419 L 145.27535,782.61179 L 145.34408,782.13067 L 145.13789,781.71829 L 144.7255,781.51209 L 144.45057,781.16843 L 145.06916,780.89351 L 144.9317,780.20618 L 144.9317,779.7938 L 144.51932,779.3814 L 144.31311,778.76281 L 143.48834,778.55663 L 142.80102,778.41916 L 141.35765,779.45014 L 137.71489,780.89351 L 136.8901,781.71829 L 136.27151,782.19941 L 136.13404,783.29911 L 136.40899,783.84896 L 137.09631,785.70472 L 137.98981,787.42302 L 138.95205,788.66018 L 137.43996,791.13453 L 135.72166,794.84603 L 134.69068,796.49558 L 132.97241,798.62627 L 132.90367,799.58851 L 132.01017,800.4133 L 133.38479,801.65047 L 133.04114,803.09384 L 133.1786,806.32421 L 133.79717,810.03572 L 134.41577,813.33485 L 135.10307,814.43455 L 136.06533,816.42776 L 137.57742,818.69592 L 137.98981,820.13927 L 138.4022,821.17025 L 137.16502,822.88855 L 134.96561,823.78205 L 134.75943,824.46937 L 138.95205,824.33192 L 138.33347,825.43162 L 139.08951,826.11894 L 141.08274,826.32513 L 142.66356,824.9505 L 143.21342,823.02602 L 144.10692,821.37645 L 145.20662,820.41421 L 145.55028,819.3145 L 144.38186,819.24576 L 145.13789,818.48971 L 143.62581,818.97084 L 144.7255,817.87112 L 143.90073,817.66494 L 143.28213,816.90889 L 142.25117,814.77821 L 139.84556,812.785 L 139.36445,812.64753 L 139.84556,812.23514 L 139.77683,811.06671 L 140.25796,810.03572 L 139.84556,810.10446 L 140.60161,808.79856 L 140.60161,807.49266 L 141.08274,806.80534 L 141.08274,805.91182 L 142.1137,804.53718 L 142.18244,803.36875 L 141.97624,802.40652 L 142.45737,801.3068 L 143.0072,800.4133 L 143.0072,799.86344 L 143.62581,799.7947 L 144.17565,799.24485 L 144.65677,797.87022 L 145.756 796.63305 L 147.06237,796.15193 L 147.88715,796.83925 L 149.88037,797.45783 L 151.4612,798.28261 L 152.21723,799.24485 L 153.52314,799.38231 L 157.64704,801.16934 L 159.77771,801.92538 L 161.49601,803.23129 L 161.90839,803.09384 L 161.90839,802.68144 L 160.94616,801.92538 L 162.8019,802.40652 L 163.0081,802.06285 L 162.59571,801.65047 L 163.28303,801.65047 L 163.35176,801.23808 L 162.11459,800.96314 L 163.07683,800.68821 L 163.07683,800.2071 L 162.73317,800.13837 L 161.70219,800.2071 L 160.87743,799.86344 L 160.32757,799.58851 L 161.15235,798.90119 L 161.35855,798.42008 L 161.22108,798.07642 L 160.46504,798.21388 L 158.8842,799.03866 L 158.67802,799.45105 L 158.12816,799.31359 L 156.13494,798.21388 L 156.0662,797.45783 L 154.89777,796.83925 L 152.90456,795.80826 L 152.42345,796.15193 L 152.49216,795.6708 L 151.39247,794.63983 L 150.43021,794.36491 L 149.53671,793.33393 L 149.26179,792.99027 L 150.1553,793.60886 L 150.01784,792.92154 L 150.70515,793.26519 L 150.49895,792.23422 L 151.4612,793.12772 L 151.04882,792.50914 L 152.01105,792.92154 L 151.18628,791.75311 L 151.80485,791.95929 L 151.52993,790.8596 L 152.01105,791.27198 L 151.32373,790.24102 L 152.01105,790.44721 L 151.39247,789.62243 L 152.21723,789.55369 L 151.32373,789.00384 L 151.87358,788.72892 L 151.25501,788.66018 L 152.07977,787.90413 L 151.32373,787.97287 L 151.39247,787.49175 L 151.4612,786.11711 L 151.04882,787.07936 L 150.56768,785.70472 L 150.63642,786.80444 L 150.36149,786.87316 L 149.67417,786.87316 L 148.91813,785.77346 L 148.16207,785.77346 L 147.26856,785.0174 L 146.85617,785.42979 L 145.82521,786.11711 z" id="path1939" /> </g> </svg> |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 07:45:55
|
Module: performous Branch: master Commit: ba423b40e55100e82b2f76ec84f3c08ab5360821 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 26 10:45:36 2009 +0300 Made drums more translucent. --- themes/default/band_cover.svg | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 07:27:29
|
Module: performous
Branch: master
Commit: 7819e620a847b607c86e51788502e52a9279baf3
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 10:27:02 2009 +0300
Silence a compiler warning...
---
game/layout_singer.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index b4d9200..0bbab52 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -27,7 +27,7 @@ void LayoutSinger::draw(double time, Position position) {
}
// Draw the lyrics
- double linespacing;
+ double linespacing = 0.0;
Dimensions pos;
switch(position) {
case LayoutSinger::BOTTOM:
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 07:27:28
|
Module: performous Branch: master Commit: f03f3a05d09a38623a6c0771b3041982561a3335 Author: Lasse Karkkainen <tro...@tr...> Date: Sun Jul 26 10:25:38 2009 +0300 Use different empty covers in song browser depending on the song type. --- game/screen_songs.cc | 12 +++- game/screen_songs.hh | 2 + themes/default/band_cover.svg | 141 +++++++++++++++++++++++++++++++++++ themes/default/instrument_cover.svg | 131 ++++++++++++++++++++++++++++++++ 4 files changed, 285 insertions(+), 1 deletions(-) |
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 06:26:22
|
Module: performous
Branch: master
Commit: 1b3f2ce32fe2854bfe35f9d02d90443ce7d5880a
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 09:25:34 2009 +0300
Use buttons for fret drawing too.
---
game/guitargraph.cc | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 8364058..0ba4581 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -196,20 +196,19 @@ void GuitarGraph::draw(double time) {
float tEnd = it2->end - time;
if (tEnd < past) continue;
if (tBeg > future) break;
- float wEnd = 0.5f * w;
- if (tEnd > future) {
- // Crop the end off
- float f = (future - tBeg) / (tEnd - tBeg);
- wEnd = f * wEnd + (1.0f - f) * w; // Balanced average
- tEnd = future;
+ float wLine = 0.5f * w;
+ if (tEnd > future) tEnd = future;
+ {
+ glutil::Begin block(GL_TRIANGLE_STRIP);
+ c.a = time2a(tEnd); glColor4fv(c);
+ glVertex2f(x - wLine, time2y(tEnd));
+ glVertex2f(x + wLine, time2y(tEnd));
+ c.a = time2a(tBeg); glColor4fv(c);
+ glVertex2f(x - wLine, time2y(tBeg));
+ glVertex2f(x + wLine, time2y(tBeg));
}
- glutil::Begin block(GL_TRIANGLE_STRIP);
- c.a = time2a(tEnd); glColor4fv(c);
- glVertex2f(x - wEnd, time2y(tEnd));
- glVertex2f(x + wEnd, time2y(tEnd));
- c.a = time2a(tBeg); glColor4fv(c);
- glVertex2f(x - w, time2y(tBeg));
- glVertex2f(x + w, time2y(tBeg));
+ m_button.dimensions.center(time2y(tBeg)).middle(x);
+ m_button.draw();
}
}
{
@@ -224,6 +223,7 @@ void GuitarGraph::draw(double time) {
glVertex2f(-2.5f, time2y(-0.01f));
glVertex2f(2.5f, time2y(-0.01f));
}
+ // Fret buttons on cursor
for (int fret = 0; fret < 5; ++fret) {
float x = -2.0f + fret;
glutil::Color c = fretColors[fret];
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 06:24:21
|
Module: performous
Branch: master
Commit: a98ba28316b5f909840fd4cc0c7f3a1839787d0c
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 08:23:35 2009 +0200
Added both layout for sing-only mode and sing+instrument mode
---
game/layout_singer.cc | 34 +++++++++++++++++++++-------------
game/layout_singer.hh | 7 ++++---
game/notegraph.cc | 11 +++++++++--
game/notegraph.hh | 3 ++-
game/screen_sing.cc | 6 +++++-
5 files changed, 41 insertions(+), 20 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index a71526a..b4d9200 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -10,24 +10,33 @@ void LayoutSinger::reset() {
m_lyrics.clear();
}
-void LayoutSinger::draw(double time) {
+void LayoutSinger::draw(double time, Position position) {
Song &song = m_songs.current();
// Draw notes and pitch waves (only when not in karaoke mode)
if (!config["game/karaoke_mode"].b()) {
std::list<Player> const& players = m_engine.getPlayers();
- m_noteGraph.draw(time, players);
+ switch(position) {
+ case LayoutSinger::BOTTOM:
+ m_noteGraph.draw(time, players, NoteGraph::FULLSCREEN);
+ break;
+ case LayoutSinger::MIDDLE:
+ m_noteGraph.draw(time, players, NoteGraph::TOP);
+ break;
+ }
}
// Draw the lyrics
- double basepos;
double linespacing;
- if(1) {
- basepos = -0.35;
- linespacing = 0.04;
- } else {
- basepos = -0.1;
- linespacing = 0.06;
+ Dimensions pos;
+ switch(position) {
+ case LayoutSinger::BOTTOM:
+ pos.screenBottom(-0.1);
+ linespacing = 0.06;
+ break;
+ case LayoutSinger::MIDDLE:
+ linespacing = 0.04;
+ break;
}
bool dirty;
do {
@@ -43,11 +52,10 @@ void LayoutSinger::draw(double time) {
dirty = true;
}
} while (dirty);
- double pos = basepos;
- for (size_t i = 0; i < m_lyrics.size(); ++i, pos += linespacing) {
- pos += m_lyrics[i].extraspacing.get() * linespacing;
+ for (size_t i = 0; i < m_lyrics.size(); ++i, pos.move(0.0, linespacing)) {
+ pos.move(0.0, m_lyrics[i].extraspacing.get() * linespacing);
if (i == 0) m_lyrics[0].draw(m_theme.lyrics_now, time, pos);
- else if (i == 1) m_lyrics[1].draw(m_theme.lyrics_next, time, pos);
+ else if (i == 1 && position == LayoutSinger::BOTTOM) m_lyrics[1].draw(m_theme.lyrics_next, time, pos);
}
}
diff --git a/game/layout_singer.hh b/game/layout_singer.hh
index 673c333..d25d014 100644
--- a/game/layout_singer.hh
+++ b/game/layout_singer.hh
@@ -26,14 +26,14 @@ class LyricRow {
return time > lastTime;
}
/// draw/print lyrics
- void draw(SvgTxtTheme& txt, double time, double pos) const {
+ void draw(SvgTxtTheme& txt, double time, Dimensions &dim) const {
std::vector<TZoomText> sentence;
for (Iterator it = m_begin; it != m_end; ++it) {
sentence.push_back(TZoomText(it->syllable));
bool current = (time >= it->begin && time < it->end);
sentence.back().factor = current ? 1.2 - 0.2 * (time - it->begin) / (it->end - it->begin) : 1.0;
}
- txt.dimensions.screenBottom(pos);
+ txt.dimensions = dim;
txt.draw(sentence, fade.get());
}
@@ -43,10 +43,11 @@ class LyricRow {
class LayoutSinger {
public:
+ enum Position {BOTTOM, MIDDLE};
LayoutSinger(Songs &_songs, Engine &_engine, ThemeSing& _theme);
~LayoutSinger();
void reset();
- void draw(double time);
+ void draw(double time, Position position = LayoutSinger::BOTTOM);
double lyrics_begin();
private:
Engine& m_engine;
diff --git a/game/notegraph.cc b/game/notegraph.cc
index fab9ea0..0389280 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -51,7 +51,7 @@ namespace {
const double baseLine = -0.2;
const double pixUnit = 0.2;
-void NoteGraph::draw(double time, std::list<Player> const& players) {
+void NoteGraph::draw(double time, std::list<Player> const& players, Position position) {
if (time < m_time) reset();
m_time = time;
// Update m_songit (which note to start the rendering from)
@@ -76,7 +76,14 @@ void NoteGraph::draw(double time, std::list<Player> const& players) {
m_nlBottom.setRange(low, low2);
}
}
- dimensions.stretch(1.0, 0.25).bottom(0.0); // FIXME: Don't hardcode these testing dimensions
+ switch(position) {
+ case NoteGraph::FULLSCREEN:
+ dimensions.stretch(1.0, 0.50).center();
+ break;
+ case NoteGraph::TOP:
+ dimensions.stretch(1.0, 0.25).bottom(0.0);
+ break;
+ }
m_max = m_nlTop.get() + 7.0;
m_min = m_nlBottom.get() - 7.0;
m_noteUnit = -dimensions.h() / std::max(48.0 * dimensions.h(), m_max - m_min);
diff --git a/game/notegraph.hh b/game/notegraph.hh
index b9e166c..860f4ed 100644
--- a/game/notegraph.hh
+++ b/game/notegraph.hh
@@ -10,6 +10,7 @@ class Song;
/// handles drawing of notes and waves
class NoteGraph {
public:
+ enum Position {FULLSCREEN, TOP};
/// constructor
NoteGraph(Song const& song);
/// resets NoteGraph and Notes
@@ -18,7 +19,7 @@ class NoteGraph {
* @param time at which time to draw
* @param players reference to the list of singing Players
*/
- void draw(double time, std::list<Player> const& players);
+ void draw(double time, std::list<Player> const& players, Position position = NoteGraph::FULLSCREEN);
private:
/// draw notebars
void drawNotes();
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 9e9e09f..4d9f069 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -144,7 +144,11 @@ void ScreenSing::draw() {
if (m_guitarGraph.get()) m_guitarGraph->draw(time);
- m_layout_singer->draw(time);
+ if( song.tracks.empty() ) {
+ m_layout_singer->draw(time, LayoutSinger::BOTTOM);
+ } else {
+ m_layout_singer->draw(time, LayoutSinger::MIDDLE);
+ }
if (!config["game/karaoke_mode"].b()) drawScores(); // draw score if not in karaoke mode
Song::Status status = song.status(time);
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 05:55:10
|
Module: performous
Branch: master
Commit: 433b067855ca59fe76e9f849578cda93fb7931a8
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 08:54:20 2009 +0300
Add xc() and yc() accessors for Dimensions, giving the center coordinates.
Notegraph positioning support (hacking, Yoda will fix).
---
game/notegraph.cc | 17 ++++++++---------
game/surface.hh | 4 ++++
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/game/notegraph.cc b/game/notegraph.cc
index d45a022..fab9ea0 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -1,5 +1,7 @@
#include "notegraph.hh"
+Dimensions dimensions; // Make a public member variable
+
NoteGraph::NoteGraph(Song const& song):
m_song(song),
m_notelines("notelines.svg"),
@@ -9,6 +11,7 @@ NoteGraph::NoteGraph(Song const& song):
m_notebargold("notebargold.svg"), m_notebargold_hl("notebargold.png"),
m_notealpha(0.0f), m_nlTop(0.0, 4.0), m_nlBottom(0.0, 4.0), m_time()
{
+ dimensions.stretch(1.0, 0.5); // Initial dimensions, probably overridden from somewhere
m_nlTop.setTarget(m_song.noteMax, true);
m_nlBottom.setTarget(m_song.noteMin, true);
reset();
@@ -73,16 +76,12 @@ void NoteGraph::draw(double time, std::list<Player> const& players) {
m_nlBottom.setRange(low, low2);
}
}
+ dimensions.stretch(1.0, 0.25).bottom(0.0); // FIXME: Don't hardcode these testing dimensions
m_max = m_nlTop.get() + 7.0;
m_min = m_nlBottom.get() - 7.0;
- if(1) {
- m_noteUnit = -0.25 / std::max(12.0, m_max - m_min);
- m_baseY = -0.35 * (m_min + m_max) * m_noteUnit;
- } else {
- m_noteUnit = -0.5 / std::max(24.0, m_max - m_min);
- m_baseY = -0.5 * (m_min + m_max) * m_noteUnit;
- }
- m_baseX = baseLine - m_time * pixUnit;
+ m_noteUnit = -dimensions.h() / std::max(48.0 * dimensions.h(), m_max - m_min);
+ m_baseY = -0.5 * (m_min + m_max) * m_noteUnit + dimensions.yc();
+ m_baseX = baseLine - m_time * pixUnit + dimensions.xc(); // FIXME: Moving in X direction requires additional love (is b0rked now, keep it centered at zero)
drawNotes();
if (config["game/pitch"].b()) drawWaves(players);
@@ -96,7 +95,7 @@ void NoteGraph::drawNotes() {
m_notealpha = 0.0f;
} else {
glColor4f(1.0, 1.0, 1.0, m_notealpha);
- m_notelines.draw(Dimensions().stretch(1.0, (m_max - m_min - 13) * m_noteUnit), TexCoords(0.0, (-m_min - 7.0) / 12.0f, 1.0, (-m_max + 6.0) / 12.0f));
+ m_notelines.draw(Dimensions().stretch(1.0, (m_max - m_min - 13) * m_noteUnit).middle(dimensions.xc()).center(dimensions.yc()), TexCoords(0.0, (-m_min - 7.0) / 12.0f, 1.0, (-m_max + 6.0) / 12.0f));
// Draw notes
for (Notes::const_iterator it = m_songit; it != m_song.notes.end() && it->begin < m_time - (baseLine - 0.5) / pixUnit; ++it) {
diff --git a/game/surface.hh b/game/surface.hh
index 92e6b64..8d9b207 100644
--- a/game/surface.hh
+++ b/game/surface.hh
@@ -70,6 +70,10 @@ class Dimensions {
float x2() const { return x1() + w(); }
/// returns bottom
float y2() const { return y1() + h(); }
+ /// returns x center
+ float xc() const { return x1() + 0.5 * w(); }
+ /// returns y center
+ float yc() const { return y1() + 0.5 * h(); }
/// returns width
float w() const { return m_w; }
/// returns height
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 05:32:22
|
Module: performous
Branch: master
Commit: 14130bf068339d0a185cd0f0de056b34daebc49c
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 08:31:35 2009 +0300
Adaptive startup delay (less for singing, more for instruments).
---
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 c739625..9e9e09f 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -15,7 +15,7 @@ namespace {
void ScreenSing::enter() {
Song& song = m_songs.current();
- m_audio.playMusic(song.music, false, 0.0, -3.0);
+ m_audio.playMusic(song.music, false, 0.0, song.tracks.empty() ? -1.0 : -4.0); // Startup delay for instruments is longer than for singing only
theme.reset(new ThemeSing());
if (!song.background.empty()) {
try {
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 05:31:12
|
Module: performous Branch: master Commit: 324b32f5cdbcd8707b618b5a7a1042d3809dfd86 Author: Vincent Le Ligeour <yo...@us...> Date: Sun Jul 26 07:30:44 2009 +0200 Merge branch 'master' of ssh://yoda-j...@pe.../gitroot/performous --- |
|
From: Yoda-JM <yo...@us...> - 2009-07-26 05:31:05
|
Module: performous
Branch: master
Commit: b9b82fda87dc158d535b0c251465c42555fdfc87
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 07:29:19 2009 +0200
Put some hardcoded layout stuffs
---
game/layout_singer.cc | 11 +++++++++--
game/notegraph.cc | 9 +++++++--
2 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/game/layout_singer.cc b/game/layout_singer.cc
index fb63a57..a71526a 100644
--- a/game/layout_singer.cc
+++ b/game/layout_singer.cc
@@ -20,8 +20,15 @@ void LayoutSinger::draw(double time) {
}
// Draw the lyrics
- const double basepos = -0.1;
- const double linespacing = 0.06;
+ double basepos;
+ double linespacing;
+ if(1) {
+ basepos = -0.35;
+ linespacing = 0.04;
+ } else {
+ basepos = -0.1;
+ linespacing = 0.06;
+ }
bool dirty;
do {
dirty = false;
diff --git a/game/notegraph.cc b/game/notegraph.cc
index 31fdd5a..d45a022 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -75,8 +75,13 @@ void NoteGraph::draw(double time, std::list<Player> const& players) {
}
m_max = m_nlTop.get() + 7.0;
m_min = m_nlBottom.get() - 7.0;
- m_noteUnit = -0.5 / std::max(24.0, m_max - m_min);
- m_baseY = -0.5 * (m_min + m_max) * m_noteUnit;
+ if(1) {
+ m_noteUnit = -0.25 / std::max(12.0, m_max - m_min);
+ m_baseY = -0.35 * (m_min + m_max) * m_noteUnit;
+ } else {
+ m_noteUnit = -0.5 / std::max(24.0, m_max - m_min);
+ m_baseY = -0.5 * (m_min + m_max) * m_noteUnit;
+ }
m_baseX = baseLine - m_time * pixUnit;
drawNotes();
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 04:58:39
|
Module: performous
Branch: master
Commit: 19bfb6c75d3cf927bad75b5091875bbdedbf460e
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 07:57:39 2009 +0300
Bumped the version number to 0.4-pre1 and made the program always print version number on startup (to ease debugging of pasted problems).
---
CMakeLists.txt | 2 +-
game/main.cc | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6214ffc..717f85b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,6 @@
project(Performous CXX)
cmake_minimum_required(VERSION 2.6)
-set(PROJECT_VERSION "0.3.2+")
+set(PROJECT_VERSION "0.4-pre1")
# Avoid source tree pollution
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
diff --git a/game/main.cc b/game/main.cc
index 2efcaaa..0708e47 100644
--- a/game/main.cc
+++ b/game/main.cc
@@ -192,6 +192,7 @@ template <typename Container> void confOverride(Container const& c, std::string
}
int main(int argc, char** argv) {
+ std::cout << PACKAGE " " VERSION << std::endl;
std::signal(SIGINT, quit);
std::signal(SIGTERM, quit);
std::ios::sync_with_stdio(false); // We do not use C stdio
@@ -243,7 +244,7 @@ int main(int argc, char** argv) {
}
po::notify(vm);
if (vm.count("version")) {
- std::cout << PACKAGE << ' ' << VERSION << std::endl;
+ // Already printed the version string in the beginning...
return 0;
}
if (vm.count("help")) {
|
|
From: Yoda-JM <yo...@us...> - 2009-07-26 04:26:33
|
Module: performous
Branch: master
Commit: ea3882ae094c7e2bb9f4a742d9c1928ef99dc572
Author: Vincent Le Ligeour <yo...@us...>
Date: Sun Jul 26 06:25:58 2009 +0200
Reworked the button a bit
---
themes/default/button.svg | 110 +++++++++++++++++++++++++++++++--------------
1 files changed, 76 insertions(+), 34 deletions(-)
diff --git a/themes/default/button.svg b/themes/default/button.svg
index 67f3086..3fed84b 100644
--- a/themes/default/button.svg
+++ b/themes/default/button.svg
@@ -6,55 +6,92 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="64"
height="64"
- id="svg1901"
+ id="svg2463"
sodipodi:version="0.32"
inkscape:version="0.46"
- sodipodi:docname="button.svg"
- sodipodi:docbase="/home/tsoots/ohj/translations/po"
version="1.0"
+ sodipodi:docname="fret_button.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape">
<defs
- id="defs1903">
+ id="defs2465">
+ <linearGradient
+ id="linearGradient3262">
+ <stop
+ style="stop-color:#f5f5f5;stop-opacity:0.22680412;"
+ offset="0"
+ id="stop3264" />
+ <stop
+ style="stop-color:#f5f5f5;stop-opacity:0.96078432;"
+ offset="1"
+ id="stop3266" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3751"
+ inkscape:collect="always">
+ <stop
+ id="stop3753"
+ offset="0"
+ style="stop-color:black;stop-opacity:1;" />
+ <stop
+ id="stop3755"
+ offset="1"
+ style="stop-color:black;stop-opacity:0;" />
+ </linearGradient>
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 526.18109 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="744.09448 : 526.18109 : 1"
inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective7" />
+ id="perspective2471" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3751"
+ id="linearGradient3272"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.3868046,0,0,0.3868046,40.335717,481.59837)"
+ x1="665.12128"
+ y1="684.16162"
+ x2="381.28015"
+ y2="449.80624" />
+ <linearGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient3751"
+ id="linearGradient2406"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(0.3868046,0,0,0.3868046,43.114888,485.8841)"
+ x1="665.12128"
+ y1="684.16162"
+ x2="381.28015"
+ y2="449.80624" />
</defs>
<sodipodi:namedview
id="base"
- pagecolor="#ffffff"
+ pagecolor="#f5f5f5"
bordercolor="#666666"
borderopacity="1.0"
- inkscape:pageopacity="0.0"
+ gridtolerance="10000"
+ guidetolerance="10"
+ objecttolerance="10"
+ inkscape:pageopacity="0"
inkscape:pageshadow="2"
- inkscape:zoom="2.8284271"
- inkscape:cx="-1.2442731"
- inkscape:cy="40"
+ inkscape:zoom="5.6"
+ inkscape:cx="56.224066"
+ inkscape:cy="40.644334"
inkscape:document-units="px"
inkscape:current-layer="layer1"
- gridtolerance="10000"
- inkscape:window-width="877"
- inkscape:window-height="739"
- inkscape:window-x="10"
- inkscape:window-y="69"
- showgrid="true"
- inkscape:showpageshadow="false">
- <inkscape:grid
- type="xygrid"
- id="grid2382"
- visible="true"
- enabled="true"
- empspacing="8" />
- </sodipodi:namedview>
+ showgrid="false"
+ inkscape:window-width="1021"
+ inkscape:window-height="676"
+ inkscape:window-x="87"
+ inkscape:window-y="34" />
<metadata
- id="metadata1906">
+ id="metadata2468">
<rdf:RDF>
<cc:Work
rdf:about="">
@@ -65,18 +102,23 @@
</rdf:RDF>
</metadata>
<g
- inkscape:label="Taso 1"
+ inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
- style="opacity:1">
+ transform="translate(-110.35967,-771.51188)">
<path
sodipodi:type="arc"
- style="fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- id="path2390"
- sodipodi:cx="32"
- sodipodi:cy="32"
- sodipodi:rx="24"
- sodipodi:ry="24"
- d="M 56,32 A 24,24 0 1 1 8,32 A 24,24 0 1 1 56,32 z" />
+ style="opacity:1;fill:#f5f5f5;fill-opacity:0.96078431;stroke:#000000;stroke-width:5;stroke-miterlimit:3.29999995;stroke-dasharray:none;stroke-opacity:1"
+ id="path2481"
+ sodipodi:cx="360"
+ sodipodi:cy="838.07648"
+ sodipodi:rx="165.71428"
+ sodipodi:ry="165.71428"
+ d="M 525.71428,838.07648 A 165.71428,165.71428 0 1 1 194.28572,838.07648 A 165.71428,165.71428 0 1 1 525.71428,838.07648 z"
+ transform="matrix(0.1902335,0,0,0.1902336,73.876048,644.33005)" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.07658868px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 146.26053,783.90065 L 144.7132,783.90065 L 144.40374,784.67432 L 144.7132,785.52533 L 144.55847,786.45374 L 143.78482,785.98954 L 143.16588,784.82904 L 141.85065,784.51958 L 141.30909,783.97802 L 140.1486,783.43645 L 138.83337,781.27019 L 138.91075,780.26443 L 142.16013,777.7887 L 143.70743,778.485 L 143.93954,779.02658 L 143.93954,779.6455 L 144.32637,780.18706 L 145.10003,780.41917 L 145.64159,779.95496 L 145.71896,779.4134 L 145.48686,778.94921 L 145.02267,778.7171 L 144.7132,778.33027 L 145.4095,778.02081 L 145.25477,777.24714 L 145.25477,776.78295 L 144.79058,776.31874 L 144.55847,775.62244 L 143.63008,775.39035 L 142.85641,775.23562 L 141.23172,776.39611 L 137.13132,778.02081 L 136.20292,778.94921 L 135.50662,779.49077 L 135.35188,780.72862 L 135.66137,781.34755 L 136.43503,783.43645 L 137.44078,785.37061 L 138.52391,786.7632 L 136.82185,789.54839 L 134.88769,793.72616 L 133.72719,795.58294 L 131.79305,797.98131 L 131.71568,799.06443 L 130.70993,799.99284 L 132.25724,801.38543 L 131.87042,803.01013 L 132.02515,806.64633 L 132.72143,810.82411 L 133.41774,814.5377 L 134.19139,815.77555 L 135.27453,818.01917 L 136.97658,820.57227 L 137.44078,822.19695 L 137.90498,823.35745 L 136.51238,825.29161 L 134.03666,826.29736 L 133.80457,827.07103 L 138.52391,826.91631 L 137.82762,828.15417 L 138.67864,828.92783 L 140.92227,829.15993 L 142.70169,827.61261 L 143.32063,825.44635 L 144.32637,823.58955 L 145.56423,822.50643 L 145.95106,821.26856 L 144.63585,821.19119 L 145.48686,820.34016 L 143.78482,820.88173 L 145.02267,819.64386 L 144.09428,819.41177 L 143.39797,818.56074 L 142.23749,816.16239 L 139.52967,813.91877 L 138.98812,813.76403 L 139.52967,813.29984 L 139.4523,811.98462 L 139.99387,810.82411 L 139.52967,810.90148 L 140.3807,809.43152 L 140.3807,807.96157 L 140.92227,807.1879 L 140.92227,806.18213 L 142.08275,804.6348 L 142.16013,803.31958 L 141.92802,802.23646 L 142.46959,800.99859 L 143.0885,799.99284 L 143.0885,799.3739 L 143.78482,799.29653 L 144.40374,798.6776 L 144.9453,797.13028 L 146.18317
5.73768 L 147.65311,795.19612 L 148.58151,795.96979 L 150.82513,796.66608 L 152.60456,797.59448 L 153.45557,798.6776 L 154.92554,798.83233 L 159.56752,800.84386 L 161.96586,801.69488 L 163.90002,803.16485 L 164.36421,803.01013 L 164.36421,802.54592 L 163.2811,801.69488 L 165.36997,802.23646 L 165.60208,801.84962 L 165.13788,801.38543 L 165.91154,801.38543 L 165.98891,800.92123 L 164.59631,800.61176 L 165.67944,800.30229 L 165.67944,799.76073 L 165.29261,799.68337 L 164.13211,799.76073 L 163.20373,799.3739 L 162.58479,799.06443 L 163.51319,798.29077 L 163.74529,797.74921 L 163.59055,797.36238 L 162.73954,797.51711 L 160.9601,798.44551 L 160.72801,798.9097 L 160.10908,798.75497 L 157.86545,797.51711 L 157.78808,796.66608 L 156.47286,795.96979 L 154.22924,794.80928 L 153.68769,795.19612 L 153.76504,794.65455 L 152.52719,793.49406 L 151.44405,793.1846 L 150.4383,792.0241 L 150.12884,791.63727 L 151.1346,792.33357 L 150.97987,791.5599 L 151.75353,791.94673 L 151.52142,790.78624 L 152.60456,791.79199 L 152.14037,791.0957 L 153.22348,791.5599 L 152.2951,790.24469 L 152.99138,790.47677 L 152.68192,789.23892 L 153.22348,789.70311 L 152.44982,788.54263 L 153.22348,788.77473 L 152.52719,787.84633 L 153.45557,787.76896 L 152.44982,787.15003 L 153.06875,786.84057 L 152.37247,786.7632 L 153.30084,785.91217 L 152.44982,785.98954 L 152.52719,785.44798 L 152.60456,783.90065 L 152.14037,784.98378 L 151.59879,783.43645 L 151.67616,784.67432 L 151.36669,784.75168 L 150.59303,784.75168 L 149.74201,783.51382 L 148.89097,783.51382 L 147.88521,782.66278 L 147.42101,783.12698 L 146.26053,783.90065 z"
+ id="path1939" />
</g>
</svg>
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2009-07-26 04:18:47
|
Module: performous
Branch: master
Commit: afad22c48c8a41d5e799c38c1d280278f3003d45
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Jul 26 07:18:04 2009 +0300
Don't darken fret buttons (orange looks brown).
---
game/guitargraph.cc | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 2662d34..8364058 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -231,10 +231,6 @@ void GuitarGraph::draw(double time) {
c.r = 1.0f;
c.g = 1.0f;
c.b = 1.0f;
- } else {
- c.r *= 0.5f;
- c.g *= 0.5f;
- c.b *= 0.5f;
}
glColor4fv(c);
m_button.dimensions.center(time2y(0.0)).middle(x);
|