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: Tapio V. <aa...@us...> - 2009-12-11 12:43:27
|
Module: performous
Branch: dance
Commit: 7c12b0600dd8b23a22f33eb5c995baf29a30e58f
Author: Tapio Vierros <tap...@gm...>
Date: Mon Nov 30 00:30:16 2009 +0200
A streak "popup" after each 50 correct notes.
---
game/guitargraph.cc | 34 +++++++++++++++++++++++++++++-----
game/guitargraph.hh | 4 ++++
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9c5c44d..512552f 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -41,6 +41,7 @@ namespace {
return score;
}
+ int getNextBigStreak(int prev) { return prev + 50; }
inline float blend(float a, float b, float f) { return a*f + b*(1.0f-f); }
glutil::Color starpowerColorize(glutil::Color c, float f) {
@@ -74,11 +75,13 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
m_dead(1000),
m_text(getThemePath("sing_timetxt.svg"), config["graphic/text_lod"].f()),
m_correctness(0.0, 5.0),
+ m_streakPopup(0.0, 1.0),
m_score(),
m_scoreFactor(),
m_starmeter(),
m_streak(),
- m_longestStreak()
+ m_longestStreak(),
+ m_bigStreak()
{
try {
m_fretObj.load(getThemePath("fret.obj"));
@@ -87,6 +90,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
std::cout << e.what() << std::endl;
m_use3d = false;
}
+ m_streakPopupText.reset(new SvgTxtThemeSimple(getThemePath("sing_score_text.svg"), config["graphic/text_lod"].f()));
unsigned int sr = m_audio.getSR();
if (m_drums) {
m_samples.push_back(Sample(getPath("sounds/drum_bass.ogg"), sr));
@@ -173,7 +177,7 @@ void GuitarGraph::engine() {
else level = m_chordIt->status ? 1.0 : 0.0;
m_correctness.setTarget(level);
}
- if (m_correctness.get() == 0) m_streak = 0;
+ if (m_correctness.get() == 0) endStreak();
if (!m_drums) {
// Processing holds
for (int fret = 0; fret < 5; ++fret) {
@@ -198,6 +202,11 @@ void GuitarGraph::engine() {
if (last == ev.dur->end) endHold(fret);
}
}
+ // Check if a long streak goal has been reached
+ if (m_streak >= getNextBigStreak(m_bigStreak)) {
+ m_streakPopup.setTarget(1.0);
+ m_bigStreak = getNextBigStreak(m_bigStreak);
+ }
}
void GuitarGraph::activateStarpower() {
@@ -211,6 +220,11 @@ void GuitarGraph::endHold(int fret) {
m_holds[fret] = 0;
}
+void GuitarGraph::endStreak() {
+ m_streak = 0;
+ m_bigStreak = 0;
+}
+
void GuitarGraph::fail(double time, int fret) {
std::cout << "MISS" << std::endl;
if (fret == -2) return; // Tapped note
@@ -218,7 +232,7 @@ void GuitarGraph::fail(double time, int fret) {
if (fret < 0) fret = std::rand();
m_audio.play(m_samples[unsigned(fret) % m_samples.size()], "audio/fail_volume");
if (m_starpower.get() < 0.01) m_score -= 50;
- m_streak = 0;
+ endStreak();
}
void GuitarGraph::drumHit(double time, int fret) {
@@ -239,7 +253,7 @@ void GuitarGraph::drumHit(double time, int fret) {
for (; best != m_chordIt; ++m_chordIt) {
if (m_chordIt->status == m_chordIt->polyphony) continue;
std::cout << "SKIPPED, ";
- m_streak = 0;
+ endStreak();
}
++m_chordIt->status;
Duration const* dur = m_chordIt->dur[fret];
@@ -481,12 +495,22 @@ void GuitarGraph::draw(double time) {
}
glTranslatef(-frac * 2.0 * offsetX, 0.0f, 0.0f);
}
-
+ // Is Starpower ready?
if (canActivateStarpower(m_starmeter)) {
float a = (int(time * 1000.0) % 1000) / 1000.0;
m_text.dimensions.screenBottom(-0.02).middle(-0.12 + offsetX);
m_text.draw("Starpower Ready!", a);
}
+ // Draw streak pop-up for long streak intervals
+ double streakAnim = m_streakPopup.get();
+ if (streakAnim > 0.0) {
+ double s = 0.2 * (1.0 + streakAnim);
+ glColor4f(1.0f, 0.0f, 0.0f, 1.0 - streakAnim);
+ m_streakPopupText->render(boost::lexical_cast<std::string>(unsigned(m_bigStreak)) + "\nStreak!");
+ m_streakPopupText->dimensions().center(0.1).middle(0.0).stretch(s,s);
+ m_streakPopupText->draw();
+ if (streakAnim > 0.999) m_streakPopup.setTarget(0.0, true);
+ }
glColor3f(1.0f, 1.0f, 1.0f);
}
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index 08ea02e..09e380f 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -65,6 +65,7 @@ class GuitarGraph {
void activateStarpower();
void fail(double time, int fret);
void endHold(int fret);
+ void endStreak();
Audio& m_audio;
input::InputDev m_input;
Song const& m_song;
@@ -113,6 +114,7 @@ class GuitarGraph {
void difficultyAuto(bool tryKeepCurrent = false);
bool difficulty(Difficulty level);
SvgTxtTheme m_text;
+ boost::scoped_ptr<SvgTxtThemeSimple> m_streakPopupText;
void updateChords();
typedef std::vector<Chord> Chords;
Chords m_chords;
@@ -120,10 +122,12 @@ class GuitarGraph {
typedef std::map<Duration const*, unsigned> NoteStatus; // Note in song to m_events[unsigned - 1] or 0 for not played
NoteStatus m_notes;
AnimValue m_correctness;
+ AnimValue m_streakPopup;
double m_score;
double m_scoreFactor;
double m_starmeter;
int m_streak;
int m_longestStreak;
+ int m_bigStreak;
};
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:25
|
Module: performous
Branch: dance
Commit: a95803c43a0e6868e63d27553fb8642e218c5e22
Author: Lasse Karkkainen <tro...@tr...>
Date: Mon Nov 30 00:16:37 2009 +0200
Add notes about menu
---
game/screen_intro.cc | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index d50b990..885912c 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -20,6 +20,20 @@ void ScreenIntro::exit() {
m_dialog.reset();
}
+/*
+Tronic's note on making the menu more generic:
+
+struct MenuOption {
+ std::string screen;
+ Surface image;
+};
+
+In ScreenIntro:
+std::vector<MenuOption> m_menuOptions;
+
+This should avoid all if-elses for testing selected == 1, ...
+*/
+
void ScreenIntro::manageEvent(SDL_Event event) {
ScreenManager* sm = ScreenManager::getSingletonPtr();
if (event.type == SDL_KEYDOWN) {
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:24
|
Module: performous
Branch: dance
Commit: cb009e3dc88481ae31a2b394726663ab4f3ed725
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 29 23:03:57 2009 +0200
Simple starmeter system.
Playing correctly increses starmeter, using whammy increases it more.
Once meter is full Starpower becomes available.
---
game/guitargraph.cc | 155 +++++++++++++++++++++++++++++----------------------
game/guitargraph.hh | 2 +
game/opengl_text.cc | 4 +-
game/opengl_text.hh | 4 +-
4 files changed, 94 insertions(+), 71 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index cff1825..9c5c44d 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -53,6 +53,7 @@ namespace {
return c;
}
+ bool canActivateStarpower(int meter) { return (meter > 6000); }
}
GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
@@ -75,6 +76,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
m_correctness(0.0, 5.0),
m_score(),
m_scoreFactor(),
+ m_starmeter(),
m_streak(),
m_longestStreak()
{
@@ -141,7 +143,7 @@ void GuitarGraph::engine() {
}
if (!m_drums && ev.type == input::Event::WHAMMY)
whammy = (1.0 + ev.button + 2.0*(rand()/double(RAND_MAX))) / 4.0;
- if (!m_drums && ev.type == input::Event::STARPOWER) m_starpower.setValue(1.0);
+ if (!m_drums && ev.type == input::Event::STARPOWER) activateStarpower();
if (ev.type == input::Event::PRESS) m_hit[!m_drums + ev.button].setValue(1.0);
else if (ev.type == input::Event::PICK) m_hit[0].setValue(1.0);
if (time < -0.5) {
@@ -189,6 +191,8 @@ void GuitarGraph::engine() {
// Minimal points for long holds unless whammy is used
double wfactor = (ev.dur->end - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01) ? 1.0 : 0.2;
m_score += t * 50.0 * wfactor;
+ // Whammy fills starmeter much faster
+ m_starmeter += t * 50 * ( (ev.whammy.get() > 0.01) ? 2.0 : 1.0 );
ev.holdTime = time;
}
if (last == ev.dur->end) endHold(fret);
@@ -196,6 +200,10 @@ void GuitarGraph::engine() {
}
}
+void GuitarGraph::activateStarpower() {
+ if (canActivateStarpower(m_starmeter)) { m_starmeter = 0; m_starpower.setValue(1.0); }
+}
+
void GuitarGraph::endHold(int fret) {
if (!m_holds[fret]) return;
m_events[m_holds[fret] - 1].glow.setTarget(0.0);
@@ -308,6 +316,7 @@ void GuitarGraph::guitarPlay(double time, input::Event const& ev) {
score *= m_chordIt->polyphony;
m_chordIt->status = 1 + picked;
m_score += score;
+ m_starmeter += score;
m_streak += 1;
if (m_streak > m_longestStreak) m_longestStreak = m_streak;
m_correctness.setTarget(1.0, true); // Instantly go to one
@@ -395,76 +404,88 @@ void GuitarGraph::draw(double time) {
m_text.draw(boost::lexical_cast<std::string>(unsigned(m_streak)) + "/"
+ boost::lexical_cast<std::string>(unsigned(m_longestStreak)));
}
- glutil::PushMatrixMode pmm(GL_PROJECTION);
- glTranslatef(frac * 2.0 * offsetX, 0.0f, 0.0f);
- glutil::PushMatrixMode pmb(GL_MODELVIEW);
- glTranslatef((1.0 - frac) * offsetX, dimensions.y2(), 0.0f);
- glRotatef(g_angle, 1.0f, 0.0f, 0.0f);
- { float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
- // Draw the neck
{
- UseTexture tex(*m_neck);
- glutil::Begin block(GL_TRIANGLE_STRIP);
- float w = (m_drums ? 2.0f : 2.5f);
- float texCoord = 0.0f;
- float tBeg = 0.0f, tEnd;
- for (Song::Beats::const_iterator it = m_song.beats.begin(); it != m_song.beats.end() && tBeg < future; ++it, texCoord += texCoordStep, tBeg = tEnd) {
- tEnd = *it - time;
- //if (tEnd < past) continue;
- if (tEnd > future) {
- // Crop the end off
- texCoord -= texCoordStep * (tEnd - future) / (tEnd - tBeg);
- tEnd = future;
+ glutil::PushMatrixMode pmm(GL_PROJECTION);
+ glTranslatef(frac * 2.0 * offsetX, 0.0f, 0.0f);
+ {
+ glutil::PushMatrixMode pmb(GL_MODELVIEW);
+ glTranslatef((1.0 - frac) * offsetX, dimensions.y2(), 0.0f);
+ glRotatef(g_angle, 1.0f, 0.0f, 0.0f);
+ { float s = dimensions.w() / 5.0f; glScalef(s, s, s); }
+ // Draw the neck
+ {
+ UseTexture tex(*m_neck);
+ glutil::Begin block(GL_TRIANGLE_STRIP);
+ float w = (m_drums ? 2.0f : 2.5f);
+ float texCoord = 0.0f;
+ float tBeg = 0.0f, tEnd;
+ for (Song::Beats::const_iterator it = m_song.beats.begin(); it != m_song.beats.end() && tBeg < future; ++it, texCoord += texCoordStep, tBeg = tEnd) {
+ tEnd = *it - time;
+ //if (tEnd < past) continue;
+ if (tEnd > future) {
+ // Crop the end off
+ texCoord -= texCoordStep * (tEnd - future) / (tEnd - tBeg);
+ tEnd = future;
+ }
+ glutil::Color c(1.0f, 1.0f, 1.0f, time2a(tEnd));
+ glColor4fv(starpowerColorize(c, m_starpower.get()));
+ glNormal3f(0.0f, 1.0f, 0.0f);
+ glTexCoord2f(0.0f, texCoord); glVertex2f(-w, time2y(tEnd));
+ glNormal3f(0.0f, 1.0f, 0.0f);
+ glTexCoord2f(1.0f, texCoord); glVertex2f(w, time2y(tEnd));
+ }
}
- glutil::Color c(1.0f, 1.0f, 1.0f, time2a(tEnd));
- glColor4fv(starpowerColorize(c, m_starpower.get()));
- glNormal3f(0.0f, 1.0f, 0.0f);
- glTexCoord2f(0.0f, texCoord); glVertex2f(-w, time2y(tEnd));
- glNormal3f(0.0f, 1.0f, 0.0f);
- glTexCoord2f(1.0f, texCoord); glVertex2f(w, time2y(tEnd));
- }
- }
- // Draw the cursor
- float level = m_hit[0].get();
- glColor3f(level, level, level);
- drawBar(0.0, 0.01f);
- // Fret buttons on cursor
- for (int fret = m_drums; fret < 5; ++fret) {
- float x = -2.0f + fret - 0.5f * m_drums;
- float l = m_hit[fret + !m_drums].get();
- glColor4fv(starpowerColorize(color(fret), m_starpower.get()));
- //glColor4fv(c);
- m_button.dimensions.center(time2y(0.0)).middle(x);
- m_button.draw();
- glColor3f(l, l, l);
- m_tap.dimensions = m_button.dimensions;
- m_tap.draw();
- }
- // Draw the notes
- glutil::UseLighting lighting(m_use3d);
- 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 fret = 0; fret < 5; ++fret) {
- if (!it->fret[fret]) continue;
- if (tEnd > future) tEnd = future;
- //drawNote(fret, color(fret), tBeg, tEnd);
- unsigned event = m_notes[it->dur[fret]];
- float glow = 0.0f;
- float whammy = 0.0f;
- if (event > 0) {
- glow = m_events[event - 1].glow.get();
- whammy = m_events[event - 1].whammy.get();
+ // Draw the cursor
+ float level = m_hit[0].get();
+ glColor3f(level, level, level);
+ drawBar(0.0, 0.01f);
+ // Fret buttons on cursor
+ for (int fret = m_drums; fret < 5; ++fret) {
+ float x = -2.0f + fret - 0.5f * m_drums;
+ float l = m_hit[fret + !m_drums].get();
+ glColor4fv(starpowerColorize(color(fret), m_starpower.get()));
+ m_button.dimensions.center(time2y(0.0)).middle(x);
+ m_button.draw();
+ glColor3f(l, l, l);
+ m_tap.dimensions = m_button.dimensions;
+ m_tap.draw();
}
- glutil::Color c = starpowerColorize(color(fret), m_starpower.get());
- c.r += glow;
- c.g += glow;
- c.b += glow;
- drawNote(fret, c, tBeg, tEnd, whammy, it->tappable);
-
+ // Draw the notes
+ glutil::UseLighting lighting(m_use3d);
+ 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 fret = 0; fret < 5; ++fret) {
+ if (!it->fret[fret]) continue;
+ if (tEnd > future) tEnd = future;
+ //drawNote(fret, color(fret), tBeg, tEnd);
+ unsigned event = m_notes[it->dur[fret]];
+ float glow = 0.0f;
+ float whammy = 0.0f;
+ if (event > 0) {
+ glow = m_events[event - 1].glow.get();
+ whammy = m_events[event - 1].whammy.get();
+ }
+ glutil::Color c = starpowerColorize(color(fret), m_starpower.get());
+ c.r += glow;
+ c.g += glow;
+ c.b += glow;
+ drawNote(fret, c, tBeg, tEnd, whammy, it->tappable);
+ }
+ }
+ glRotatef(-g_angle, 1.0f, 0.0f, 0.0f);
+ glTranslatef(-(1.0 - frac) * offsetX, -dimensions.y2(), 0.0f);
+ glScalef(5.0f, 5.0f, 5.0f);
}
+ glTranslatef(-frac * 2.0 * offsetX, 0.0f, 0.0f);
+ }
+
+ if (canActivateStarpower(m_starmeter)) {
+ float a = (int(time * 1000.0) % 1000) / 1000.0;
+ m_text.dimensions.screenBottom(-0.02).middle(-0.12 + offsetX);
+ m_text.draw("Starpower Ready!", a);
}
glColor3f(1.0f, 1.0f, 1.0f);
}
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index eaa9406..08ea02e 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -62,6 +62,7 @@ class GuitarGraph {
std::string getTrack() const { return m_track_index->first; }
std::string getDifficultyString() const;
private:
+ void activateStarpower();
void fail(double time, int fret);
void endHold(int fret);
Audio& m_audio;
@@ -121,6 +122,7 @@ class GuitarGraph {
AnimValue m_correctness;
double m_score;
double m_scoreFactor;
+ double m_starmeter;
int m_streak;
int m_longestStreak;
};
diff --git a/game/opengl_text.cc b/game/opengl_text.cc
index 360582b..7652a82 100644
--- a/game/opengl_text.cc
+++ b/game/opengl_text.cc
@@ -196,13 +196,13 @@ void SvgTxtTheme::draw(std::vector<std::string> const& _text) {
draw(tmp);
}
-void SvgTxtTheme::draw(std::string _text) {
+void SvgTxtTheme::draw(std::string _text, float alpha) {
std::vector<TZoomText> tmp;
TZoomText t;
t.string = _text;
t.factor = 1.0;
tmp.push_back(t);
- draw(tmp);
+ draw(tmp, alpha);
}
void SvgTxtTheme::draw(std::vector<TZoomText> const& _text, float alpha) {
diff --git a/game/opengl_text.hh b/game/opengl_text.hh
index 2d9759d..4130fde 100644
--- a/game/opengl_text.hh
+++ b/game/opengl_text.hh
@@ -145,8 +145,8 @@ class SvgTxtTheme {
void draw(std::vector<TZoomText> const& _text, float alpha = 1.0f);
/// draw texts
void draw(std::vector<std::string> const& _text);
- /// draw text
- void draw(std::string _text);
+ /// draw text with alpha
+ void draw(std::string _text, float alpha = 1.0f);
/// sets highlight
void setHighlight(std::string _theme_file);
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:22
|
Module: performous
Branch: dance
Commit: 5792168157706d932bac5adb11f851db1b28630c
Author: Lasse Karkkainen <tro...@tr...>
Date: Sun Nov 29 23:00:41 2009 +0200
Update package description
---
cmake/performous-packaging.cmake | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmake/performous-packaging.cmake b/cmake/performous-packaging.cmake
index d88f286..e727a0c 100644
--- a/cmake/performous-packaging.cmake
+++ b/cmake/performous-packaging.cmake
@@ -1,6 +1,6 @@
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
-set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A karaoke game with pitch detection and scoring, similar to Singstar games. Previously known as UltraStar-NG. Supports songs in Ultrastar format.")
+set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A karaoke and band game where one or more players perform a song and the game scores their performances. Supports songs in UltraStar and Frets on Fire formats. Microphones and instruments from SingStar, Guitar Hero and Rock Band are autodetected.")
set(CPACK_PACKAGE_CONTACT "http://performous.org/")
set(CPACK_SOURCE_IGNORE_FILES
"/.cvsignore"
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:19
|
Module: performous
Branch: dance
Commit: 6df62c63ca64a4adaecd924d83a5be0cbb1b77b6
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 29 21:39:22 2009 +0200
Minimal points for long holds unless whammy is used.
---
game/guitargraph.cc | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 82c9089..cff1825 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -186,7 +186,9 @@ void GuitarGraph::engine() {
double last = std::min(time, ev.dur->end);
double t = last - ev.holdTime;
if (t > 0) {
- m_score += t * 50.0;
+ // Minimal points for long holds unless whammy is used
+ double wfactor = (ev.dur->end - ev.dur->begin < 1.5 || ev.whammy.get() > 0.01) ? 1.0 : 0.2;
+ m_score += t * 50.0 * wfactor;
ev.holdTime = time;
}
if (last == ev.dur->end) endHold(fret);
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:17
|
Module: performous
Branch: dance
Commit: 94cc4ac5bdbf8b6d769985a7592dc01e28d1d5b2
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 29 20:56:27 2009 +0200
No minus points for errors when starpower is activated.
---
game/guitargraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 2661353..82c9089 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -207,7 +207,7 @@ void GuitarGraph::fail(double time, int fret) {
m_events.push_back(Event(time, 0, fret));
if (fret < 0) fret = std::rand();
m_audio.play(m_samples[unsigned(fret) % m_samples.size()], "audio/fail_volume");
- m_score -= 50;
+ if (m_starpower.get() < 0.01) m_score -= 50;
m_streak = 0;
}
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:10
|
Module: performous
Branch: dance
Commit: aceb82c7858f9da22620bca798e1a91f3e70c947
Author: Tapio Vierros <tap...@gm...>
Date: Sun Nov 29 20:19:27 2009 +0200
Some quick test for a starpower / overdrive effect.
Tilt guitar or press F6 to active.
Colors are made uniform and then they slowly fade back to normal.
---
game/guitargraph.cc | 22 +++++++++++++++++++---
game/guitargraph.hh | 1 +
game/joystick.cc | 40 +++++++++++++++++++++++++++++++---------
game/joystick.hh | 2 +-
4 files changed, 52 insertions(+), 13 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 9f19f97..2661353 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -40,6 +40,18 @@ namespace {
if (error < 0.03) score += 5;
return score;
}
+
+ inline float blend(float a, float b, float f) { return a*f + b*(1.0f-f); }
+
+ glutil::Color starpowerColorize(glutil::Color c, float f) {
+ static glutil::Color starpowerC(0.5f, 0.5f, 1.0f);
+ if ( f < 0.001 ) return c;
+ f = std::sqrt(std::sqrt(f));
+ c.r = blend(starpowerC.r, c.r, f);
+ c.g = blend(starpowerC.g, c.g, f);
+ c.b = blend(starpowerC.b, c.b, f);
+ return c;
+ }
}
@@ -52,6 +64,7 @@ GuitarGraph::GuitarGraph(Audio& audio, Song const& song, std::string track):
m_tap(getThemePath("tap.svg")),
m_drums(track=="drums"),
m_use3d(config["graphic/3d_notes"].b()),
+ m_starpower(0.0, 0.1),
m_cx(0.0, 0.2),
m_width(0.5, 0.4),
m_stream(),
@@ -128,6 +141,7 @@ void GuitarGraph::engine() {
}
if (!m_drums && ev.type == input::Event::WHAMMY)
whammy = (1.0 + ev.button + 2.0*(rand()/double(RAND_MAX))) / 4.0;
+ if (!m_drums && ev.type == input::Event::STARPOWER) m_starpower.setValue(1.0);
if (ev.type == input::Event::PRESS) m_hit[!m_drums + ev.button].setValue(1.0);
else if (ev.type == input::Event::PICK) m_hit[0].setValue(1.0);
if (time < -0.5) {
@@ -400,7 +414,8 @@ void GuitarGraph::draw(double time) {
texCoord -= texCoordStep * (tEnd - future) / (tEnd - tBeg);
tEnd = future;
}
- glColor4f(1.0f, 1.0f, 1.0f, time2a(tEnd));
+ glutil::Color c(1.0f, 1.0f, 1.0f, time2a(tEnd));
+ glColor4fv(starpowerColorize(c, m_starpower.get()));
glNormal3f(0.0f, 1.0f, 0.0f);
glTexCoord2f(0.0f, texCoord); glVertex2f(-w, time2y(tEnd));
glNormal3f(0.0f, 1.0f, 0.0f);
@@ -415,7 +430,8 @@ void GuitarGraph::draw(double time) {
for (int fret = m_drums; fret < 5; ++fret) {
float x = -2.0f + fret - 0.5f * m_drums;
float l = m_hit[fret + !m_drums].get();
- glColor4fv(color(fret));
+ glColor4fv(starpowerColorize(color(fret), m_starpower.get()));
+ //glColor4fv(c);
m_button.dimensions.center(time2y(0.0)).middle(x);
m_button.draw();
glColor3f(l, l, l);
@@ -440,7 +456,7 @@ void GuitarGraph::draw(double time) {
glow = m_events[event - 1].glow.get();
whammy = m_events[event - 1].whammy.get();
}
- glutil::Color c = color(fret);
+ glutil::Color c = starpowerColorize(color(fret), m_starpower.get());
c.r += glow;
c.g += glow;
c.b += glow;
diff --git a/game/guitargraph.hh b/game/guitargraph.hh
index b4a6a15..eaa9406 100644
--- a/game/guitargraph.hh
+++ b/game/guitargraph.hh
@@ -77,6 +77,7 @@ class GuitarGraph {
boost::scoped_ptr<Texture> m_neck;
bool m_drums;
bool m_use3d;
+ AnimValue m_starpower;
AnimValue m_cx, m_width;
std::size_t m_stream;
TrackMapConstPtr m_track_map;
diff --git a/game/joystick.cc b/game/joystick.cc
index 3b0e42e..30eeaba 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -27,9 +27,9 @@ static const unsigned SDL_BUTTONS = 6;
int buttonFromSDL(input::Private::Type _type, unsigned int _sdl_button) {
static const int inputmap[4][SDL_BUTTONS] = {
- //G R Y B O // for guitars
- { 2, 0, 1, 3, 4, -1 }, // Guitar Hero guitar
- { 3, 0, 1, 2, 4, -1 }, // Rock Band guitar
+ //G R Y B O S // for guitars (S=starpower)
+ { 2, 0, 1, 3, 4, 5 }, // Guitar Hero guitar
+ { 3, 0, 1, 2, 4, 5 }, // Rock Band guitar
//K R Y B G O // for drums
{ 3, 4, 1, 2, 0, 4 }, // Guitar Hero drums
{ 3, 4, 1, 2, 0, -1 } // Rock Band drums
@@ -215,6 +215,14 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
devices[joy_id].addEvent(event);
return true;
+ case SDLK_F6:
+ event.type = input::Event::STARPOWER;
+ event.button = 1;
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = devices[joy_id].pressed(i);
+ }
+ devices[joy_id].addEvent(event);
+ return true;
case SDLK_F5: case SDLK_5:
button++;
case SDLK_F4: case SDLK_4:
@@ -254,6 +262,14 @@ bool input::SDL::pushEvent(SDL_Event _e) {
}
devices[joy_id].addEvent(event);
return true;
+ case SDLK_F6:
+ event.type = input::Event::STARPOWER;
+ event.button = 0;
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = devices[joy_id].pressed(i);
+ }
+ devices[joy_id].addEvent(event);
+ return true;
case SDLK_F5: case SDLK_5:
button++;
case SDLK_F4: case SDLK_4:
@@ -318,10 +334,14 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if(!devices[joy_id].assigned()) return false;
button = buttonFromSDL(devices[joy_id].type(),_e.jbutton.button);
if( button == -1 ) return false;
- for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices[joy_id].pressed(i);
+ if( button == 5) {
+ event.type = input::Event::STARPOWER;
+ } else {
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = devices[joy_id].pressed(i);
+ }
+ event.type = input::Event::PRESS;
}
- event.type = input::Event::PRESS;
event.button = button;
event.pressed[button] = true;
devices[joy_id].addEvent(event);
@@ -331,10 +351,12 @@ bool input::SDL::pushEvent(SDL_Event _e) {
if(!devices[joy_id].assigned()) return false;
button = buttonFromSDL(devices[joy_id].type(),_e.jbutton.button);
if( button == -1 ) return false;
- for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
- event.pressed[i] = devices[joy_id].pressed(i);
+ if( button != 5) {
+ for( unsigned int i = 0 ; i < BUTTONS ; ++i ) {
+ event.pressed[i] = devices[joy_id].pressed(i);
+ }
+ event.type = input::Event::RELEASE;
}
- event.type = input::Event::RELEASE;
event.button = button;
event.pressed[button] = false;
devices[joy_id].addEvent(event);
diff --git a/game/joystick.hh b/game/joystick.hh
index f3ee06b..23f5da4 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -21,7 +21,7 @@ namespace input {
static const std::size_t BUTTONS = 6;
struct Event {
- enum Type { PRESS, RELEASE, PICK, WHAMMY };
+ enum Type { PRESS, RELEASE, PICK, WHAMMY, STARPOWER };
Type type;
int button; // Translated button number for press/release events. 0 for pick down, 1 for pick up (NOTE: these are NOT pick press/release events but rather different directions)
bool pressed[BUTTONS]; // All events tell the button state right after the event happened
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:09
|
Module: performous Branch: dance Commit: e64ccae023ee05e15e3d483e0b50e949e4605cdb Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Sun Nov 29 19:05:18 2009 +0100 Merge commit 'origin/master' into menu --- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:43:06
|
Module: performous Branch: dance Commit: d804c3d71ad50012e7d321ef1183ea2dc0a018b2 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Sun Nov 29 18:52:33 2009 +0100 Merge commit 'origin/master' into menu --- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:58
|
Module: performous
Branch: dance
Commit: 2b8634bf093b3494fa656e93a0136daf1f813e2e
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Sun Nov 29 14:42:42 2009 +0100
Better structured images.
---
themes/default/intro_bg.svg | 2 +-
themes/default/intro_configure.svg | 4 ++-
themes/default/intro_practice.svg | 4 ++-
themes/default/intro_quit.svg | 12 +++++---
themes/default/intro_sing.svg | 52 ++++++++++++++++++++++++++++++-----
5 files changed, 58 insertions(+), 16 deletions(-)
diff --git a/themes/default/intro_bg.svg b/themes/default/intro_bg.svg
index 30847ef..7c3a7b4 100644
--- a/themes/default/intro_bg.svg
+++ b/themes/default/intro_bg.svg
@@ -45,7 +45,7 @@
pagecolor="#ffffff"
id="base"
inkscape:zoom="0.61522534"
- inkscape:cx="472.57809"
+ inkscape:cx="567.11702"
inkscape:cy="377.53061"
inkscape:window-x="0"
inkscape:window-y="25"
diff --git a/themes/default/intro_configure.svg b/themes/default/intro_configure.svg
index 7705e9c..743d4a8 100644
--- a/themes/default/intro_configure.svg
+++ b/themes/default/intro_configure.svg
@@ -331,5 +331,7 @@
height="81.040909"
width="337.48822"
id="rect6405"
- style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible" />
+ style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible"
+ rx="15"
+ ry="15" />
</svg>
diff --git a/themes/default/intro_practice.svg b/themes/default/intro_practice.svg
index 1e21643..cea7341 100644
--- a/themes/default/intro_practice.svg
+++ b/themes/default/intro_practice.svg
@@ -295,5 +295,7 @@
height="81.040909"
width="337.48822"
id="rect6405"
- style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible" />
+ style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible"
+ rx="15"
+ ry="15" />
</svg>
diff --git a/themes/default/intro_quit.svg b/themes/default/intro_quit.svg
index 565c440..80a8c3a 100644
--- a/themes/default/intro_quit.svg
+++ b/themes/default/intro_quit.svg
@@ -44,12 +44,12 @@
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
- inkscape:zoom="1.74012"
- inkscape:cx="656.35156"
- inkscape:cy="280.59685"
+ inkscape:zoom="0.61522533"
+ inkscape:cx="532.90629"
+ inkscape:cy="358.2374"
inkscape:window-x="0"
inkscape:window-y="25"
- inkscape:current-layer="g3726"
+ inkscape:current-layer="svg559"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
@@ -316,5 +316,7 @@
height="99.733246"
width="337.48822"
id="rect6405"
- style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible" />
+ style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible"
+ rx="15"
+ ry="15" />
</svg>
diff --git a/themes/default/intro_sing.svg b/themes/default/intro_sing.svg
index 61c0f60..f70bc2f 100644
--- a/themes/default/intro_sing.svg
+++ b/themes/default/intro_sing.svg
@@ -45,11 +45,11 @@
pagecolor="#ffffff"
id="base"
inkscape:zoom="0.61522534"
- inkscape:cx="517.54781"
+ inkscape:cx="216.7974"
inkscape:cy="428.66203"
inkscape:window-x="0"
inkscape:window-y="25"
- inkscape:current-layer="g3955"
+ inkscape:current-layer="svg559"
showgrid="false"
showguides="true"
inkscape:guide-bbox="true"
@@ -204,17 +204,30 @@
x2="358.07056"
y2="260.4765" />
<linearGradient
- id="linearGradient6499-1"
- inkscape:collect="always">
+ id="linearGradient6499-1">
<stop
id="stop6501-3"
offset="0"
- style="stop-color:white;stop-opacity:1;" />
+ style="stop-color:#000000;stop-opacity:1;" />
<stop
id="stop6503-0"
offset="1"
style="stop-color:white;stop-opacity:0;" />
</linearGradient>
+ <inkscape:perspective
+ id="perspective2849"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective2854"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
<linearGradient
y2="260.4765"
x2="358.07056"
@@ -223,7 +236,28 @@
gradientTransform="matrix(1.3544445,0,0,1.8513768,-45.940851,-180.28458)"
gradientUnits="userSpaceOnUse"
id="linearGradient2880"
- xlink:href="#linearGradient6499-1"
+ xlink:href="#linearGradient6499-1-4"
+ inkscape:collect="always" />
+ <linearGradient
+ id="linearGradient6499-1-4">
+ <stop
+ id="stop6501-3-4"
+ offset="0"
+ style="stop-color:#ffffff;stop-opacity:1;" />
+ <stop
+ id="stop6503-0-4"
+ offset="1"
+ style="stop-color:white;stop-opacity:0;" />
+ </linearGradient>
+ <linearGradient
+ y2="260.4765"
+ x2="358.07056"
+ y1="260.4765"
+ x1="44.868057"
+ gradientTransform="matrix(1.3544445,0,0,1.8513768,-45.940837,-180.2845)"
+ gradientUnits="userSpaceOnUse"
+ id="linearGradient2863"
+ xlink:href="#linearGradient6499-1-4"
inkscape:collect="always" />
</defs>
<text
@@ -254,10 +288,12 @@
style="fill:none;stroke:#ffffff;stroke-width:1.60380363;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
</g>
<rect
- y="261.436"
+ y="261.4361"
x="100"
height="81.040909"
width="337.48822"
id="rect6405"
- style="fill:url(#linearGradient2880);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible" />
+ style="fill:url(#linearGradient2863);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:2.29999995;marker:none;visibility:visible;display:inline;overflow:visible"
+ rx="15"
+ ry="15" />
</svg>
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:55
|
Module: performous Branch: dance Commit: 90d8df704986cf6ac278d7c73cd075dd4dd35479 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Sat Nov 28 21:20:21 2009 +0100 Starting a theme based on the original one; background color is provisional --- themes/default/configuration_bg.svg | 221 ++++++++++++-------------------- themes/default/icon.bmp | Bin 4150 -> 3126 bytes themes/default/icon.png | Bin 4897 -> 2630 bytes themes/default/icon.svg | 51 +++++--- themes/default/intro_bg.svg | 185 +++++---------------------- themes/default/intro_configure.svg | 6 +- themes/default/intro_practice.svg | 10 +- themes/default/intro_quit.svg | 15 ++- themes/default/intro_sing.svg | 61 +-------- themes/default/intro_top.svg | 24 ++-- themes/default/practice_bg.svg | 238 ++++++++++++++++------------------- themes/default/songs_bg.svg | 4 +- themes/default/songs_bg_default.svg | 146 ++++------------------ 13 files changed, 318 insertions(+), 643 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:50
|
Module: performous Branch: dance Commit: 32ba21fcf94df36dab99d3ab2ea287263a128405 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Sat Nov 28 16:57:02 2009 +0100 New (just modified) SGV images for the main menu. --- themes/default/intro_bg.svg | 71 +----------- themes/default/intro_configure.svg | 224 ++++++++++++++++++++++++++--------- themes/default/intro_practice.svg | 184 ++++++++++++++++++++--------- themes/default/intro_quit.svg | 206 ++++++++++++++++++++++++--------- themes/default/intro_sing.svg | 132 +++++++++++++++------- themes/default/intro_top.svg | 106 ++++++++++-------- 6 files changed, 597 insertions(+), 326 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:48
|
Module: performous
Branch: dance
Commit: feb20cfc17bb9a99c44a4c94998d8b97830adad8
Author: unknown <Alde@.(none)>
Date: Sat Nov 28 15:34:08 2009 +0100
Fixed problem compilation under Windows
---
libs/plugin++/src/dll.cc | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/libs/plugin++/src/dll.cc b/libs/plugin++/src/dll.cc
index 73662e6..e6dcef8 100644
--- a/libs/plugin++/src/dll.cc
+++ b/libs/plugin++/src/dll.cc
@@ -17,7 +17,12 @@ dll::dll(std::string const& filename): lib(LoadLibrary(filename.c_str())) {
dll::~dll() { FreeLibrary(static_cast<HINSTANCE>(lib)); }
void* dll::sym(char const* sym) {
- return GetProcAddress(static_cast<HINSTANCE>(lib), sym);
+ union{
+ void* ptr;
+ FARPROC fptr;
+ }conv;
+ conv.fptr = GetProcAddress(static_cast<HINSTANCE>(lib), sym);
+ return conv.ptr;
}
#else
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:47
|
Module: performous Branch: dance Commit: 097658f71149c001aebc2a584efd14feb53eda44 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Sat Nov 28 14:30:22 2009 +0100 Little changes on code and images organization --- game/screen_intro.cc | 63 ++------ game/theme.cc | 3 +- game/theme.hh | 10 +- themes/default/intro_configure.svg | 80 +---------- themes/default/intro_practice.svg | 76 --------- themes/default/intro_quit.svg | 76 --------- themes/default/intro_sing.svg | 76 --------- themes/default/intro_top.svg | 296 ++++++++++++++++++++++++++++++++++++ 8 files changed, 323 insertions(+), 357 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:43
|
Module: performous
Branch: dance
Commit: c5a5afa51997ce5d76ae3ab7c96485b697267975
Author: Vincent Le Ligeour <yo...@us...>
Date: Sat Nov 28 14:27:05 2009 +0100
Fixed ubuntu karmic depends list
---
cmake/performous-packaging.cmake | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/cmake/performous-packaging.cmake b/cmake/performous-packaging.cmake
index 8fe3e9f..97c703d 100644
--- a/cmake/performous-packaging.cmake
+++ b/cmake/performous-packaging.cmake
@@ -61,7 +61,7 @@ if(UNIX)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.35.0, libboost-program-options1.35.0, libboost-regex1.35.0, libboost-filesystem1.35.0, libboost-date-time1.35.0, libavcodec52, libavformat52, libswscale0, libmagick++1, libxml++2.6-2, libglew1.5")
endif("${LSB_DISTRIB}" MATCHES "Ubuntu9.04")
if("${LSB_DISTRIB}" MATCHES "Ubuntu9.10")
- set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.38.0, libboost-program-options1.38.0, libboost-regex1.38.0, libboost-filesystem1.38.0, libboost-date-time1.38.0, libavcodec52, libavformat52, libswscale0, libmagick++1, libxml++2.6-2, libglew1.5")
+ set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-thread1.38.0, libboost-program-options1.38.0, libboost-regex1.38.0, libboost-filesystem1.38.0, libboost-date-time1.38.0, libavcodec52, libavformat52, libswscale0, libmagick++2, libxml++2.6-2, libglew1.5")
endif("${LSB_DISTRIB}" MATCHES "Ubuntu9.10")
if("${LSB_DISTRIB}" MATCHES "Debian5.*")
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libsdl1.2debian, libcairo2, librsvg2-2, libboost-dev, libavcodec51, libavformat52, libswscale0, libmagick++10, libxml++2.6-2, libglew1.5")
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:41
|
Module: performous Branch: dance Commit: 8e45377114ff4092063dc8d778c5edae604b3ee5 Author: Lasse Karkkainen <tro...@tr...> Date: Sat Nov 28 07:02:19 2009 +0200 Merge branch 'master' into menu Conflicts: docs/Compiling.txt --- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:34
|
Module: performous
Branch: dance
Commit: 2ef12741b689ec5681dafcb8b9f2d7808d4ee416
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Sat Nov 28 00:49:22 2009 +0100
Changed menu images organization (divided in layers); they need 'stetic' work...
---
game/screen_intro.cc | 16 +-
game/theme.cc | 10 +-
themes/default/intro.svg | 528 ---------------------
themes/default/{prueba_intro.svg => intro_bg.svg} | 2 +-
themes/default/intro_configure.svg | 303 ++++++++++++
themes/default/intro_practice.svg | 303 ++++++++++++
themes/default/intro_quit.svg | 303 ++++++++++++
themes/default/intro_sing.svg | 336 +++++++++++++
themes/default/prueba_configure.svg | 499 -------------------
themes/default/prueba_practice.svg | 499 -------------------
themes/default/prueba_quit.svg | 499 -------------------
themes/default/prueba_sing.svg | 499 -------------------
12 files changed, 1253 insertions(+), 2544 deletions(-)
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:32
|
Module: performous
Branch: dance
Commit: f9255ce019a2a913d628730bc5cf54e85d423e57
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Sat Nov 28 00:24:42 2009 +0100
Main menu controlled with arrows (and char keys) finished; working with a "basic" look, working on it...
---
game/screen_intro.cc | 46 ++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 42 insertions(+), 4 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index fed0ae5..873920e 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -4,7 +4,8 @@
#include "audio.hh"
#include "record.hh"
-ScreenIntro::ScreenIntro(std::string const& name, Audio& audio, Capture& capture): Screen(name), m_audio(audio), m_capture(capture) {}
+ScreenIntro::ScreenIntro(std::string const& name, Audio& audio, Capture& capture):
+ Screen(name), m_audio(audio), m_capture(capture), selected() {}
void ScreenIntro::enter() {
m_audio.playMusic(getThemePath("menu.ogg"), true);
@@ -37,10 +38,30 @@ void ScreenIntro::manageEvent(SDL_Event event) {
* */
else if (key == SDLK_DOWN) {
- theme->sing.draw();
+ if (selected < 3) {
+ selected++;
+ } else selected = 0;
}
- else if (key == SDLK_DOWN) {
- theme->configure.draw();
+ else if (key == SDLK_UP) {
+ if (selected > 0) {
+ selected--;
+ } else selected = 3;
+ }
+ else if (key == SDLK_RETURN) {
+ switch (selected) {
+ case 0 :
+ sm->activateScreen("Songs");
+ break;
+ case 1 :
+ sm->activateScreen("Practice");
+ break;
+ case 2 :
+ sm->activateScreen("Configuration");
+ break;
+ case 3 :
+ sm->finished();
+ break;
+ }
}
@@ -57,6 +78,23 @@ void ScreenIntro::manageEvent(SDL_Event event) {
void ScreenIntro::draw() {
theme->bg.draw();
+ switch (selected) {
+ case 0 :
+ theme->sing.draw();
+ break;
+ case 1 :
+ theme->practice.draw();
+ break;
+ case 2 :
+ theme->configure.draw();
+ break;
+ case 3 :
+ theme->quit.draw();
+ break;
+ default :
+ theme->sing.draw();
+ }
+
//background->draw();
if (m_dialog) m_dialog->draw();
}
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:29
|
Module: performous Branch: dance Commit: debfb431f8cf6277eab13047cbc54998d29e4a05 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Fri Nov 27 23:02:34 2009 +0100 Added changes on SVG images, still trying Intro Menu, not working... --- game/screen_intro.cc | 7 +++ game/theme.cc | 2 +- game/theme.hh | 2 +- themes/default/songs_bg.svg | 61 +++++++++++---------------- themes/default/songs_bg_default.svg | 78 ++++------------------------------- 5 files changed, 43 insertions(+), 107 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:27
|
Module: performous Branch: dance Commit: 2c8fee2a641993fea7ed9e7b2105cee4ce84de85 Author: Miguel Sánchez de León Peque <msd...@gm...> Date: Fri Nov 27 21:24:50 2009 +0100 testing intro menu, not working yet... --- docs/Compiling.txt | 2 +- game/screen_intro.cc | 18 +- game/screen_intro.hh | 5 +- game/theme.cc | 7 + game/theme.hh | 12 + themes/default/prueba_configure.svg | 499 +++++++++++++++++++++++++++++++++++ themes/default/prueba_intro.svg | 416 +++++++++++++++++++++++++++++ themes/default/prueba_practice.svg | 499 +++++++++++++++++++++++++++++++++++ themes/default/prueba_quit.svg | 499 +++++++++++++++++++++++++++++++++++ themes/default/prueba_sing.svg | 499 +++++++++++++++++++++++++++++++++++ 10 files changed, 2450 insertions(+), 6 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:25
|
Module: performous
Branch: dance
Commit: 5c57eb8ccf571551f5c72a6a29ec9d1eb79703f4
Author: Miguel Sánchez de León Peque <msd...@gm...>
Date: Wed Nov 25 17:55:56 2009 +0100
Revert "Little change for testing GIT"
This reverts commit f0115ff02ab2faae17ecc39145d9c2a58861f0e5.
---
game/screen_intro.cc | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index e8a9acc..c48e9b6 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -29,11 +29,6 @@ void ScreenIntro::manageEvent(SDL_Event event) {
else if (key == SDLK_s) sm->activateScreen("Songs");
else if (key == SDLK_c) sm->activateScreen("Configuration");
else if (key == SDLK_p) sm->activateScreen("Practice");
-
- else if (key == SDLK_LEFT) {
- sm->activateScreen("Practice");
- }
-
else if (key == SDLK_SPACE || key == SDLK_PAUSE) m_audio.togglePause();
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
|
|
From: Tapio V. <aa...@us...> - 2009-12-11 12:42:24
|
Module: performous
Branch: dance
Commit: f0115ff02ab2faae17ecc39145d9c2a58861f0e5
Author: Miguel Sánchez de León Peque <miguel@vostro1520.(none)>
Date: Wed Nov 25 17:28:44 2009 +0100
Little change for testing GIT
---
game/screen_intro.cc | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index c48e9b6..e8a9acc 100644
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -29,6 +29,11 @@ void ScreenIntro::manageEvent(SDL_Event event) {
else if (key == SDLK_s) sm->activateScreen("Songs");
else if (key == SDLK_c) sm->activateScreen("Configuration");
else if (key == SDLK_p) sm->activateScreen("Practice");
+
+ else if (key == SDLK_LEFT) {
+ sm->activateScreen("Practice");
+ }
+
else if (key == SDLK_SPACE || key == SDLK_PAUSE) m_audio.togglePause();
} else if (event.type == SDL_JOYBUTTONDOWN) {
int button = event.jbutton.button;
|
|
From: Markus R. <god...@us...> - 2009-12-11 12:31:19
|
Module: performous Branch: master Commit: c02c01fb95a15d66cb3f3ea26f513f12316ce9cc Author: Markus Raab <un...@ma...> Date: Fri Dec 11 13:30:49 2009 +0100 Merge branch 'master' of ssh://godman707@git.performous.org/gitroot/performous/performous Conflicts: docs/Authors.txt --- |
|
From: Markus R. <god...@us...> - 2009-12-11 12:31:18
|
Module: performous Branch: master Commit: c1aeb091ed83a734f1bc790452e3e526965ee1ac Author: Markus Raab <un...@ma...> Date: Fri Dec 11 13:22:20 2009 +0100 added Markus to authors hiscore (xml + ultrastar format) --- docs/Authors.txt | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/docs/Authors.txt b/docs/Authors.txt index 492e44a..abdf27c 100644 --- a/docs/Authors.txt +++ b/docs/Authors.txt @@ -33,6 +33,9 @@ Fabian Fingerle <fabian at datensalat.eu> Tapio Vierros <aave000 at users.sourceforge.net> * Various things and features +Markus Raab <ich at markus-raab.org> + * hiscore (xml + ultrastar format) + INACTIVE DEVELOPERS ------------------- |
|
From: Tapio V. <aa...@us...> - 2009-12-11 10:25:44
|
Module: performous
Branch: dance
Commit: 392b844979df3f57c231c7eebd825b602de6d8c7
Author: Tapio Vierros <tap...@gm...>
Date: Fri Dec 11 12:24:21 2009 +0200
Fixed mine scoring and a related streak counter issue, implemented longest streak counter.
---
game/dancegraph.cc | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/game/dancegraph.cc b/game/dancegraph.cc
index ec663ea..8ca3d8a 100644
--- a/game/dancegraph.cc
+++ b/game/dancegraph.cc
@@ -123,25 +123,25 @@ void DanceGraph::engine() {
if(!it->isHit) {
std::cout << "(Engine) Missed note at time " << time
<< "(note timing " << it->note.begin << ")" << std::endl;
- m_streak = 0;
+ if (it->note.type != Note::MINE) m_streak = 0;
}
else {
- if(it->note.type != Note::MINE)
+ if(it->note.type != Note::MINE) {
std::cout << "Note correctly played.." << std::endl;
+ m_score += it->score;
+ }
if(!it->releaseTime)
it->releaseTime = time;
- m_score += it->score;
}
}
- // mines
+ // Holding button when mine comes?
for (DanceNotes::iterator it = m_notesIt; it != m_notes.end() && time <= it->note.begin + maxTolerance; it++) {
- if(!it->isHit && it->note.type == Note::MINE &&
- m_pressed[it->note.note] &&
+ if(!it->isHit && it->note.type == Note::MINE && m_pressed[it->note.note] &&
it->note.begin >= time - maxTolerance && it->note.end <= time + maxTolerance) {
std::cout << "Hit mine at " << time << "!" << std::endl;
it->isHit = true;
- m_score = -points(0);
+ m_score -= points(0);
}
}
@@ -197,9 +197,15 @@ void DanceGraph::dance(double time, input::Event const& ev) {
for (DanceNotes::iterator it = m_notesIt; it != m_notes.end() && time <= it->note.begin + maxTolerance; it++) {
if(!it->isHit && time >= it->note.begin - maxTolerance && ev.button == it->note.note) {
it->isHit = true;
- it->score = points(it->note.begin - time);
- it->accuracy = 1.0 - (std::abs(it->note.begin - time) / maxTolerance);
- m_streak++;
+ if (it->note.type != Note::MINE) {
+ it->score = points(it->note.begin - time);
+ it->accuracy = 1.0 - (std::abs(it->note.begin - time) / maxTolerance);
+ m_streak++;
+ if (m_streak > m_longestStreak) m_longestStreak = m_streak;
+ } else {
+ m_score -= points(0);
+ m_streak = 0;
+ }
m_activeNotes[ev.button] = it;
break;
}
@@ -208,9 +214,7 @@ void DanceGraph::dance(double time, input::Event const& ev) {
namespace {
- //const float arrowScale = 0.6f;
const float arrowSize = 0.3f;
- const float arrowRotations[4] = { 270.0f, 180.0f, 0.0f, 90.0f };
const float one_arrow_tex_w = 1.0 / 8.0;
void vertexPair(int arrow_i, float x, float y, float ty) {
@@ -240,7 +244,7 @@ glutil::Color const& DanceGraph::color(int arrow_i) const {
}
void DanceGraph::drawArrow(int arrow_i, Texture& tex, float x, float y, float scale, float ty1, float ty2) {
- glTranslatef(x, y, 0.0f);
+ glutil::Translation tr(x, y, 0.0f);
if (scale != 1.0f) glScalef(scale, scale, scale);
{
UseTexture tblock(tex);
@@ -249,7 +253,6 @@ void DanceGraph::drawArrow(int arrow_i, Texture& tex, float x, float y, float sc
vertexPair(arrow_i, 0.0f, arrowSize, ty2);
}
if (scale != 1.0f) glScalef(1.0f/scale, 1.0f/scale, 1.0f/scale);
- glTranslatef(-x, -y, 0.0f);
}
void DanceGraph::drawMine(float x, float y, float rot, float scale) {
|