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: Lasse Kärkkäi. <tr...@us...> - 2010-01-08 01:04:22
|
Module: performous
Branch: master
Commit: cc6137f3c92455c1595a1654b8e9ba087c034f56
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jan 8 03:03:41 2010 +0200
Revert "New colors for players."
This reverts commit ca7a95e52670a62c3b3be86b3c2ce7a91ee6b75f.
The new colors were crap and also incompatible with SingStar mics.
---
game/engine.hh | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/engine.hh b/game/engine.hh
index 1f72b42..19516b5 100644
--- a/game/engine.hh
+++ b/game/engine.hh
@@ -11,10 +11,10 @@
namespace {
const Color playerColors[] = {
- Color(0.125, 1.0, 0.1328125),
- Color(0.12890625, 0.546875, 1.0),
- Color(1.0, 0.12890625, 0.98046875),
- Color(1.0, 0.578125, 0.12890625)
+ Color(0.2, 0.5, 0.7),
+ Color(0.8, 0.3, 0.3),
+ Color(0.2, 0.9, 0.2),
+ Color(1.0, 0.6, 0.0)
};
size_t playerColorsSize = sizeof(playerColors) / sizeof(*playerColors);
}
|
|
From: Peque <ms...@us...> - 2010-01-08 00:57:50
|
Module: performous Branch: master Commit: a3d67aa61add1b2460ae633e7dd7c042042afb6e Author: Miguel Sánchez de León Peque <peq...@ho...> Date: Fri Jan 8 01:57:44 2010 +0100 Merge branch 'master' of ssh://git.performous.org/gitroot/performous/performous --- |
|
From: Peque <ms...@us...> - 2010-01-08 00:57:48
|
Module: performous
Branch: master
Commit: ca7a95e52670a62c3b3be86b3c2ce7a91ee6b75f
Author: Miguel Sánchez de León Peque <peq...@ho...>
Date: Fri Jan 8 01:55:28 2010 +0100
New colors for players.
---
game/engine.hh | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/game/engine.hh b/game/engine.hh
index 19516b5..1f72b42 100644
--- a/game/engine.hh
+++ b/game/engine.hh
@@ -11,10 +11,10 @@
namespace {
const Color playerColors[] = {
- Color(0.2, 0.5, 0.7),
- Color(0.8, 0.3, 0.3),
- Color(0.2, 0.9, 0.2),
- Color(1.0, 0.6, 0.0)
+ Color(0.125, 1.0, 0.1328125),
+ Color(0.12890625, 0.546875, 1.0),
+ Color(1.0, 0.12890625, 0.98046875),
+ Color(1.0, 0.578125, 0.12890625)
};
size_t playerColorsSize = sizeof(playerColors) / sizeof(*playerColors);
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-01-08 00:18:17
|
Module: performous
Branch: master
Commit: 8c9069f6a90d49d7f9b4347c79e1f7ca78516cdf
Author: Lasse Karkkainen <tro...@tr...>
Date: Fri Jan 8 02:18:04 2010 +0200
Fixed PNG writing
---
game/image.hh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/game/image.hh b/game/image.hh
index a46e505..903647e 100644
--- a/game/image.hh
+++ b/game/image.hh
@@ -134,6 +134,7 @@ template <typename T> void loadJPEG(T& target, std::string const& filename) {
}
static inline void writePNG(std::string const& filename, Image const& img) {
+ std::vector<png_bytep> rows(img.h);
std::ofstream file(filename.c_str(), std::ios::binary);
png_structp pngPtr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
if (!pngPtr) throw std::runtime_error("png_create_read_struct failed");
@@ -146,7 +147,6 @@ static inline void writePNG(std::string const& filename, Image const& img) {
} cleanup(pngPtr, infoPtr);
infoPtr = png_create_info_struct(pngPtr);
if (!infoPtr) throw std::runtime_error("png_create_info_struct failed");
- std::vector<png_bytep> rows(img.h);
// There must be no C++ objects after the setjmp line! (they won't get properly destructed)
if (setjmp(png_jmpbuf(pngPtr))) throw std::runtime_error("Writing PNG failed");
png_set_write_fn(pngPtr, &file, writePngHelper, NULL);
@@ -159,5 +159,6 @@ static inline void writePNG(std::string const& filename, Image const& img) {
rows[y] = (png_bytep)(&img.data[pos]);
}
png_write_image(pngPtr, &rows[0]);
+ png_write_end(pngPtr, NULL);
}
|
|
From: Tapio V. <aa...@us...> - 2010-01-07 20:40:46
|
Module: performous
Branch: master
Commit: 72cdf29c9dbd40ac0bd7b9f8babcab6cebf8a88f
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 22:35:40 2010 +0200
Don't detect unknown joysticks as drumkit.
---
game/joystick.cc | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 95adf32..64b1e2f 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -262,8 +262,9 @@ void input::SDL::init() {
std::cout << " Detected as: Generic Dance Pad (guessed)" << std::endl;
input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DANCEPAD_GENERIC);
} else {
- std::cout << " Detected as: Unknwown (please report the name, assuming Guitar Hero Drums)" << std::endl;
- input::Private::devices[i] = input::Private::InputDevPrivate(input::Private::DRUMS_GH);
+ std::cout << " Detected as: Unknown (please report the name; use config to force detection)" << std::endl;
+ SDL_JoystickClose(joy);
+ continue;
}
}
// Here we should send an event to have correct state buttons
|
|
From: Tapio V. <aa...@us...> - 2010-01-07 20:40:31
|
Module: performous
Branch: master
Commit: 24772c589de442eaf90bfc497669ec358fe9a4da
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 22:37:24 2010 +0200
If skipping 'instrumental break' during instrument splash, only skip to the song start.
---
game/screen_sing.cc | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 606658d..6c68573 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -235,8 +235,11 @@ void ScreenSing::manageEvent(SDL_Event event) {
}
// Skip instrumental breaks
else if (status == Song::INSTRUMENTAL_BREAK) {
- double diff = m_layout_singer->lyrics_begin() - 3.0 - time;
- if (diff > 0.0) m_audio.seek(diff);
+ if (time < 0) m_audio.seek(0.0);
+ else {
+ double diff = m_layout_singer->lyrics_begin() - 3.0 - time;
+ if (diff > 0.0) m_audio.seek(diff);
+ }
}
}
// Volume control
|
|
From: Peque <ms...@us...> - 2010-01-07 20:30:45
|
Module: performous
Branch: master
Commit: a41fc77e0f2f1844c2319f62bc54b89966329217
Author: Miguel Sánchez de León Peque <peq...@ho...>
Date: Thu Jan 7 21:29:56 2010 +0100
Fixed notegraph: notes don't crash to the timer.
---
game/notegraph.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/notegraph.cc b/game/notegraph.cc
index ea6714d..c9afd9c 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -86,7 +86,7 @@ void NoteGraph::draw(double time, Database const& database, Position position) {
dimensions.stretch(1.0, 0.50).center();
break;
case NoteGraph::TOP:
- dimensions.stretch(1.0, 0.40).bottom(0.0);
+ dimensions.stretch(1.0, 0.32).bottom(0.0);
break;
case NoteGraph::LEFT:
dimensions.stretch(0.50, 0.50).center().left(-0.5);
|
|
From: Tapio V. <aa...@us...> - 2010-01-07 18:55:10
|
Module: performous
Branch: master
Commit: ffd70e5b316726162b0882196b8e9a575558f9df
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 20:54:24 2010 +0200
Make notegraph larger in band mode.
---
game/notegraph.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/notegraph.cc b/game/notegraph.cc
index 07679e9..ea6714d 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -86,7 +86,7 @@ void NoteGraph::draw(double time, Database const& database, Position position) {
dimensions.stretch(1.0, 0.50).center();
break;
case NoteGraph::TOP:
- dimensions.stretch(1.0, 0.25).bottom(0.0);
+ dimensions.stretch(1.0, 0.40).bottom(0.0);
break;
case NoteGraph::LEFT:
dimensions.stretch(0.50, 0.50).center().left(-0.5);
@@ -113,7 +113,7 @@ void NoteGraph::draw(double time, Database const& database, Position position) {
float centery = m_baseY + (it->note + 0.4) * m_noteUnit; // Star is 0.4 notes higher than current note
float centerx = x + w - 1.2 * hh; // Star is 1.2 units from end
float rot = fmod(time * 360, 360); // They rotate!
- float zoom = (std::abs((rot-180) / 360.0f) * 0.8f + 0.6f) * (position == NoteGraph::TOP ? 3.0 : 2.0) * hh;
+ float zoom = (std::abs((rot-180) / 360.0f) * 0.8f + 0.6f) * (position == NoteGraph::TOP ? 2.3 : 2.0) * hh;
glutil::Translation tr(centerx, centery);
glutil::Rotation rt(rot, 0.0f, 0.0f, 1.0f);
m_star.draw(Dimensions().stretch(zoom, zoom).center().middle(), TexCoords());
|
|
From: Tapio V. <aa...@us...> - 2010-01-07 17:32:38
|
Module: performous
Branch: master
Commit: b2c8a1e6d4df5e45dd6e11541f881bf23db10e18
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 19:32:02 2010 +0200
Make the star a little more visible.
---
game/notegraph.cc | 2 +-
themes/default/star.svg | 45 +++++++++++++++++++++++++++++++++++++++------
2 files changed, 40 insertions(+), 7 deletions(-)
diff --git a/game/notegraph.cc b/game/notegraph.cc
index 0543be4..07679e9 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -113,7 +113,7 @@ void NoteGraph::draw(double time, Database const& database, Position position) {
float centery = m_baseY + (it->note + 0.4) * m_noteUnit; // Star is 0.4 notes higher than current note
float centerx = x + w - 1.2 * hh; // Star is 1.2 units from end
float rot = fmod(time * 360, 360); // They rotate!
- float zoom = (std::abs((rot-180) / 360.0f) + 0.5f) * 2.0 * hh;
+ float zoom = (std::abs((rot-180) / 360.0f) * 0.8f + 0.6f) * (position == NoteGraph::TOP ? 3.0 : 2.0) * hh;
glutil::Translation tr(centerx, centery);
glutil::Rotation rt(rot, 0.0f, 0.0f, 1.0f);
m_star.draw(Dimensions().stretch(zoom, zoom).center().middle(), TexCoords());
diff --git a/themes/default/star.svg b/themes/default/star.svg
index c53b6a1..3465490 100644
--- a/themes/default/star.svg
+++ b/themes/default/star.svg
@@ -96,6 +96,39 @@
r="30.551558"
gradientTransform="matrix(1,0,0,0.95456924,0,1.3128087)"
gradientUnits="userSpaceOnUse" />
+ <filter
+ id="filter3086"
+ inkscape:label="Drop shadow"
+ width="1.5"
+ height="1.5"
+ x="-.25"
+ y="-.25">
+ <feGaussianBlur
+ id="feGaussianBlur3088"
+ in="SourceAlpha"
+ stdDeviation="4,000000"
+ result="blur" />
+ <feColorMatrix
+ id="feColorMatrix3090"
+ result="bluralpha"
+ type="matrix"
+ values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 0,500000 0 " />
+ <feOffset
+ id="feOffset3092"
+ in="bluralpha"
+ dx="0,000000"
+ dy="0,000000"
+ result="offsetBlur" />
+ <feMerge
+ id="feMerge3094">
+ <feMergeNode
+ id="feMergeNode3096"
+ in="offsetBlur" />
+ <feMergeNode
+ id="feMergeNode3098"
+ in="SourceGraphic" />
+ </feMerge>
+ </filter>
</defs>
<sodipodi:namedview
id="base"
@@ -113,10 +146,10 @@
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
- inkscape:window-width="1280"
- inkscape:window-height="725"
+ inkscape:window-width="1440"
+ inkscape:window-height="854"
inkscape:window-x="0"
- inkscape:window-y="25"
+ inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata2468">
@@ -136,19 +169,19 @@
transform="translate(-110.35967,-771.51188)">
<path
sodipodi:type="star"
- style="fill:url(#radialGradient3602);fill-opacity:1;fill-rule:nonzero;stroke:none"
+ style="fill:url(#radialGradient3602);fill-opacity:1;fill-rule:nonzero;stroke:none;filter:url(#filter3086)"
id="path2822"
sodipodi:sides="5"
sodipodi:cx="31.964287"
sodipodi:cy="31.857143"
sodipodi:r1="32.125885"
- sodipodi:r2="3.2125885"
+ sodipodi:r2="4.8188829"
sodipodi:arg1="0.93111088"
sodipodi:arg2="1.5577518"
inkscape:flatsided="false"
inkscape:rounded="0"
inkscape:randomized="0"
- d="M 51.141613,57.631213 32.006192,35.069459 13.377809,58.06049 28.922143,32.889658 1.2998864,22.277632 30.042233,29.282957 31.599122,-0.26666619 33.818536,29.233694 62.403003,21.583048 35.03233,32.809949 51.141613,57.631213 z"
+ d="M 51.141613,57.631213 32.027145,36.675616 13.377809,58.06049 27.401071,33.405915 1.2998864,22.277632 29.081206,27.995864 31.599122,-0.26666619 34.745661,27.92197 62.403003,21.583048 36.566351,33.286352 51.141613,57.631213 z"
transform="matrix(1.0474097,0,0,1.0972591,108.99816,771.80448)" />
</g>
</svg>
|
|
From: Tapio V. <aa...@us...> - 2010-01-07 16:33:42
|
Module: performous
Branch: master
Commit: 023d80772898f6dc0857756cc3bf8b8f6d329934
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 18:31:53 2010 +0200
Allow instrumental break skipping and early score dialog in FoF songs.
(Only when instruments are dead.)
---
game/guitargraph.cc | 5 ++++-
game/joystick.hh | 1 +
game/screen_sing.cc | 12 +++++++-----
game/screen_sing.hh | 3 ++-
4 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/game/guitargraph.cc b/game/guitargraph.cc
index 52e196c..a13681d 100644
--- a/game/guitargraph.cc
+++ b/game/guitargraph.cc
@@ -17,7 +17,7 @@ namespace {
{ "Expert", 0x60 }
};
const size_t diffsz = sizeof(diffv) / sizeof(*diffv);
- const int death_delay = 25; // Delay in notes after which the player is hidden
+ const int death_delay = 20; // Delay in notes after which the player is hidden
const float not_joined = -100; // A value that indicates player hasn't joined
const float join_delay = 6.0f; // Time to select track/difficulty when joining mid-game
const float g_angle = 80.0f;
@@ -154,6 +154,9 @@ void GuitarGraph::engine() {
double whammy = 0;
// Handle all events
for (input::Event ev; m_input.tryPoll(ev);) {
+ // This hack disallows joining with Enter-key for skipping instrumental
+ // breaks to be usable with FoF songs.
+ if (dead() && m_input.isKeyboard() && ev.type == input::Event::PICK) continue;
m_dead = 0; // Keep alive
if (m_jointime == not_joined) m_jointime = (time < 0.0 ? -join_delay : time); // Handle joining
// Handle Start/Select keypresses
diff --git a/game/joystick.hh b/game/joystick.hh
index 5b8aa43..e178a74 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -147,6 +147,7 @@ namespace input {
bool tryPoll(Event& _e) {return input::Private::devices.find(m_device_id)->second.tryPoll(_e);};
void addEvent(Event _e) {input::Private::devices.find(m_device_id)->second.addEvent(_e);};
bool pressed(int _button) {return input::Private::devices.find(m_device_id)->second.pressed(_button);}; // Current state
+ bool isKeyboard() {return (m_device_id == input::Private::KEYBOARD_ID || m_device_id == input::Private::KEYBOARD_ID2 || m_device_id == input::Private::KEYBOARD_ID3);};
private:
unsigned int m_device_id; // should be some kind of reference
};
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index dbc5519..606658d 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -227,13 +227,13 @@ void ScreenSing::manageEvent(SDL_Event event) {
return; // The rest are only available when score window is not displayed
}
// Start button has special functions for skipping things (only in singing for now)
- if (nav == input::START && m_song->track_map.empty() && !m_audio.isPaused()) {
+ if (nav == input::START && m_only_singers_alive && !m_song->notes.empty() && !m_audio.isPaused()) {
// Open score dialog early
if (status == Song::FINISHED) {
m_engine->kill(); // kill the engine thread
m_score_window.reset(new ScoreWindow(m_instruments, m_database, m_dancers)); // Song finished, but no score window -> show it
}
- // Skip instrumental breaks (not supported with instruments yet)
+ // Skip instrumental breaks
else if (status == Song::INSTRUMENTAL_BREAK) {
double diff = m_layout_singer->lyrics_begin() - 3.0 - time;
if (diff > 0.0) m_audio.seek(diff);
@@ -315,11 +315,13 @@ void ScreenSing::draw() {
if( !m_dancers.empty() ) {
danceLayout(time);
//m_layout_singer->draw(time, LayoutSinger::LEFT);
+ m_only_singers_alive = false;
} else if( m_instruments.empty() ) {
m_layout_singer->draw(time, LayoutSinger::BOTTOM);
+ m_only_singers_alive = true;
} else {
- bool some_alive = instrumentLayout(time);;
- m_layout_singer->draw(time, some_alive ? LayoutSinger::MIDDLE : LayoutSinger::BOTTOM);
+ m_only_singers_alive = !instrumentLayout(time);;
+ m_layout_singer->draw(time, m_only_singers_alive ? LayoutSinger::BOTTOM : LayoutSinger::MIDDLE);
}
Song::Status status = m_song->status(time);
@@ -329,7 +331,7 @@ void ScreenSing::draw() {
unsigned t = clamp(time, 0.0, length);
m_progress->draw(songPercent);
std::string statustxt = (boost::format("%02u:%02u") % (t / 60) % (t % 60)).str();
- if (!m_score_window.get() && m_song->track_map.empty() && m_song->danceTracks.empty()) {
+ if (!m_score_window.get() && m_only_singers_alive && !m_song->notes.empty()) {
if (status == Song::INSTRUMENTAL_BREAK) statustxt += " ENTER to skip instrumental break";
if (status == Song::FINISHED && !config["game/karaoke_mode"].b()) statustxt += " Remember to wait for grading!";
}
diff --git a/game/screen_sing.hh b/game/screen_sing.hh
index de37b5c..c8518d2 100644
--- a/game/screen_sing.hh
+++ b/game/screen_sing.hh
@@ -50,7 +50,7 @@ class ScreenSing: public Screen {
public:
/// constructor
ScreenSing(std::string const& name, Audio& audio, Capture& capture, Database& database, Backgrounds& bgs):
- Screen(name), m_audio(audio), m_capture(capture), m_database(database), m_backgrounds(bgs), m_latencyAV()
+ Screen(name), m_audio(audio), m_capture(capture), m_database(database), m_backgrounds(bgs), m_latencyAV(), m_only_singers_alive(true)
{}
void enter();
void exit();
@@ -92,5 +92,6 @@ class ScreenSing: public Screen {
double m_latencyAV; // Latency between audio and video output (do not confuse with latencyAR)
boost::shared_ptr<ThemeSing> theme;
AnimValue m_quitTimer;
+ bool m_only_singers_alive;
};
|
|
From: Yoda-JM <yo...@us...> - 2010-01-07 16:09:57
|
Module: performous Branch: master Commit: 16ff4af3606fb2bf9d927e26e4916f679b14b0f8 Author: Vincent Le Ligeour <yo...@us...> Date: Thu Jan 7 17:09:14 2010 +0100 Updated git ebuild --- .../games-arcade/performous/performous-9999.ebuild | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/portage-overlay/games-arcade/performous/performous-9999.ebuild b/portage-overlay/games-arcade/performous/performous-9999.ebuild index c791a29..60dbada 100644 --- a/portage-overlay/games-arcade/performous/performous-9999.ebuild +++ b/portage-overlay/games-arcade/performous/performous-9999.ebuild @@ -36,7 +36,10 @@ RDEPEND="gnome-base/librsvg dev-cpp/libxmlpp media-libs/glew media-libs/libsdl[joystick,opengl] - media-gfx/imagemagick[png] + media-libs/libpng + media-libs/jpeg + tools? ( media-gfx/imagemagick[png] ) + editor? ( media-gfx/imagemagick[png] ) >=media-video/ffmpeg-0.4.9_p20070616-r20 alsa? ( media-libs/alsa-lib ) jack? ( media-sound/jack-audio-connection-kit ) |
|
From: Tapio V. <aa...@us...> - 2010-01-07 15:16:01
|
Module: performous Branch: master Commit: b322102ed01c5df882fca0b9cba4271a88b34f72 Author: Tapio Vierros <tap...@gm...> Date: Thu Jan 7 17:14:30 2010 +0200 Make quitting song happen through pause and map Select to GodMode. --- game/guitargraph.cc | 57 +++++++++++++++--------------- game/screen_sing.cc | 34 ++++++++---------- themes/default/sing_pause.svg | 76 +++++++++++++++++++++++++--------------- 3 files changed, 90 insertions(+), 77 deletions(-) |
|
From: Tapio V. <aa...@us...> - 2010-01-07 14:08:41
|
Module: performous
Branch: master
Commit: 1755b0dec4303ca967f63f97852b16056c3160db
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 16:07:28 2010 +0200
Rename CTRL_UP/DOWN to more sensible VOLUME_UP/DOWN.
---
game/joystick.cc | 4 ++--
game/joystick.hh | 2 +-
game/screen_configuration.cc | 4 ++--
game/screen_intro.cc | 4 ++--
game/screen_practice.cc | 4 ++--
game/screen_sing.cc | 4 ++--
game/screen_songs.cc | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index 544e44e..95adf32 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -84,8 +84,8 @@ input::NavButton input::getNav(SDL_Event const &e) {
else if (k == SDLK_PAGEUP) return input::MOREUP;
else if (k == SDLK_PAGEDOWN) return input::MOREDOWN;
else if (k == SDLK_PAUSE || (k == SDLK_p && mod & KMOD_CTRL)) return input::PAUSE;
- else if (k == SDLK_UP && mod & KMOD_CTRL) return input::CTRL_UP;
- else if (k == SDLK_DOWN && mod & KMOD_CTRL) return input::CTRL_DOWN;
+ else if (k == SDLK_UP && mod & KMOD_CTRL) return input::VOLUME_UP;
+ else if (k == SDLK_DOWN && mod & KMOD_CTRL) return input::VOLUME_DOWN;
} else if (e.type == SDL_JOYBUTTONDOWN) {
// Joystick buttons
unsigned int joy_id = e.jbutton.which;
diff --git a/game/joystick.hh b/game/joystick.hh
index 8507dac..5b8aa43 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -17,7 +17,7 @@
namespace input {
enum DevType { GUITAR, DRUMS, DANCEPAD };
- enum NavButton { NONE, UP, DOWN, LEFT, RIGHT, START, SELECT, CANCEL, PAUSE, MOREUP, MOREDOWN, CTRL_UP, CTRL_DOWN };
+ enum NavButton { NONE, UP, DOWN, LEFT, RIGHT, START, SELECT, CANCEL, PAUSE, MOREUP, MOREDOWN, VOLUME_UP, VOLUME_DOWN };
static const std::size_t BUTTONS = 10;
static const int STARPOWER_BUTTON = 5;
diff --git a/game/screen_configuration.cc b/game/screen_configuration.cc
index 552faf7..3f1f653 100644
--- a/game/screen_configuration.cc
+++ b/game/screen_configuration.cc
@@ -32,8 +32,8 @@ void ScreenConfiguration::manageEvent(SDL_Event event) {
else if (nav == input::DOWN && selected + 1 < configuration.size()) ++selected;
else if (nav == input::LEFT) --*ci;
else if (nav == input::RIGHT) ++*ci;
- else if (nav == input::CTRL_DOWN) --config["audio/preview_volume"];
- else if (nav == input::CTRL_UP) ++config["audio/preview_volume"];
+ else if (nav == input::VOLUME_DOWN) --config["audio/preview_volume"];
+ else if (nav == input::VOLUME_UP) ++config["audio/preview_volume"];
} else if (event.type == SDL_KEYDOWN) {
int key = event.key.keysym.sym;
SDLMod modifier = event.key.keysym.mod;
diff --git a/game/screen_intro.cc b/game/screen_intro.cc
index 0230c23..a49057a 100755
--- a/game/screen_intro.cc
+++ b/game/screen_intro.cc
@@ -40,8 +40,8 @@ void ScreenIntro::manageEvent(SDL_Event event) {
if (nav == input::CANCEL) selected = m_menuOptions.size() - 1; // Move cursor to quit
else if (nav == input::DOWN || nav == input::RIGHT || nav == input::MOREDOWN) ++selected;
else if (nav == input::UP || nav == input::LEFT || nav == input::MOREUP) --selected;
- else if (nav == input::CTRL_DOWN) --config["audio/preview_volume"];
- else if (nav == input::CTRL_UP) ++config["audio/preview_volume"];
+ else if (nav == input::VOLUME_DOWN) --config["audio/preview_volume"];
+ else if (nav == input::VOLUME_UP) ++config["audio/preview_volume"];
else if (nav == input::START) {
std::string screen = m_menuOptions[selected].screen;
if (screen.empty()) sm->finished(); else sm->activateScreen(screen);
diff --git a/game/screen_practice.cc b/game/screen_practice.cc
index 0b4e5a8..07c30fb 100644
--- a/game/screen_practice.cc
+++ b/game/screen_practice.cc
@@ -38,8 +38,8 @@ void ScreenPractice::manageEvent(SDL_Event event) {
input::NavButton nav(input::getNav(event));
if (nav == input::CANCEL || nav == input::START || nav == input::SELECT) sm->activateScreen("Intro");
else if (nav == input::PAUSE) m_audio.togglePause();
- else if (nav == input::CTRL_DOWN) --config["audio/music_volume"];
- else if (nav == input::CTRL_UP) ++config["audio/music_volume"];
+ else if (nav == input::VOLUME_DOWN) --config["audio/music_volume"];
+ else if (nav == input::VOLUME_UP) ++config["audio/music_volume"];
else if (event.type == SDL_JOYBUTTONDOWN // Play drum sounds here
&& input::Private::devices[event.jbutton.which].type_match(input::DRUMS)) {
int b = input::buttonFromSDL(input::Private::devices[event.jbutton.which].type(), event.jbutton.button);
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 59ecb06..43e5f44 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -238,8 +238,8 @@ void ScreenSing::manageEvent(SDL_Event event) {
}
}
// Volume control
- if (nav == input::CTRL_UP) ++config["audio/music_volume"];
- if (nav == input::CTRL_DOWN) --config["audio/music_volume"];
+ if (nav == input::VOLUME_UP) ++config["audio/music_volume"];
+ if (nav == input::VOLUME_DOWN) --config["audio/music_volume"];
}
// Ctrl combinations that can be used while performing (not when score dialog is displayed)
if (event.type == SDL_KEYDOWN && (event.key.keysym.mod & KMOD_CTRL) && !m_score_window.get()) {
diff --git a/game/screen_songs.cc b/game/screen_songs.cc
index f5e3f78..a91785f 100644
--- a/game/screen_songs.cc
+++ b/game/screen_songs.cc
@@ -83,8 +83,8 @@ void ScreenSongs::manageEvent(SDL_Event event) {
else if (nav == input::DOWN) m_songs.sortChange(1);
else if (nav == input::MOREUP) m_songs.advance(-10);
else if (nav == input::MOREDOWN) m_songs.advance(10);
- else if (nav == input::CTRL_DOWN) --config["audio/preview_volume"];
- else if (nav == input::CTRL_UP) ++config["audio/preview_volume"];
+ else if (nav == input::VOLUME_DOWN) --config["audio/preview_volume"];
+ else if (nav == input::VOLUME_UP) ++config["audio/preview_volume"];
else manageSharedKey(nav);
// Handle less common, keyboard only keys
} else if (event.type == SDL_KEYDOWN) {
|
|
From: Yoda-JM <yo...@us...> - 2010-01-07 13:51:42
|
Module: performous
Branch: master
Commit: e7f49324e290dce86ed6d8e8e1b259b9385cedbf
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jan 7 14:50:45 2010 +0100
Tried to fix libjpeg long jump error handling
---
game/image.hh | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/game/image.hh b/game/image.hh
index 0527a00..a46e505 100644
--- a/game/image.hh
+++ b/game/image.hh
@@ -89,13 +89,32 @@ template <typename T> void loadPNG(T& target, std::string const& filename) {
target.load(w, h, channels == 4 ? pix::CHAR_RGBA : pix::RGB, &image[0], float(w)/h);
}
+struct my_jpeg_error_mgr {
+ struct jpeg_error_mgr pub; /* "public" fields */
+ jmp_buf setjmp_buffer; /* for return to caller */
+};
+
+typedef struct my_jpeg_error_mgr * my_jpeg_error_mgr_ptr;
+
+static void my_jpeg_error_exit (j_common_ptr cinfo) {
+ my_jpeg_error_mgr_ptr myerr = (my_jpeg_error_mgr_ptr) cinfo->err;
+ (*cinfo->err->output_message) (cinfo);
+ longjmp(myerr->setjmp_buffer, 1);
+}
+
template <typename T> void loadJPEG(T& target, std::string const& filename) {
std::vector<unsigned char> image;
+ struct my_jpeg_error_mgr jerr;
FILE* infile = fopen(filename.c_str(), "rb");
if (!infile) throw std::runtime_error("Cannot open " + filename);
jpeg_decompress_struct cinfo;
- jpeg_error_mgr jerr;
- cinfo.err = jpeg_std_error(&jerr);
+ cinfo.err = jpeg_std_error(&jerr.pub);
+ jerr.pub.error_exit = my_jpeg_error_exit;
+ if (setjmp(jerr.setjmp_buffer)) {
+ jpeg_destroy_decompress(&cinfo);
+ fclose(infile);
+ throw std::runtime_error("Error in libjpeg for file " + filename);
+ }
jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, infile);
if( jpeg_read_header(&cinfo, true) != JPEG_HEADER_OK) throw std::runtime_error("Cannot read header of " + filename);
@@ -103,7 +122,7 @@ template <typename T> void loadJPEG(T& target, std::string const& filename) {
unsigned w = cinfo.output_width;
unsigned h = cinfo.output_height;
image.resize(w * h * 4);
- unsigned stride = (w * 3 + 3) & ~3; // Number of bytes per row (word-aligned)
+ //unsigned stride = (w * 3 + 3) & ~3; // Number of bytes per row (word-aligned)
unsigned char* ptr = &image[0];
while (cinfo.output_scanline < h) {
jpeg_read_scanlines(&cinfo, &ptr, 1);
|
|
From: Peque <ms...@us...> - 2010-01-07 13:42:28
|
Module: performous Branch: master Commit: 417c968b15fe8acfb61f6170a7ed26c2452676a1 Author: Miguel Sánchez de León Peque <peq...@ho...> Date: Thu Jan 7 14:41:58 2010 +0100 Merge branch 'master' of ssh://git.performous.org/gitroot/performous/performous --- |
|
From: Peque <ms...@us...> - 2010-01-07 13:42:24
|
Module: performous
Branch: master
Commit: c8bdb95cf299f1c8d5657b151c040cdbe30e5df6
Author: Miguel Sánchez de León Peque <peq...@ho...>
Date: Thu Jan 7 14:39:27 2010 +0100
Modifications for converting song.ogg to vocals.ogg (enable karaoke mode).
---
tools/scripts/setvocals.sh | 2 +-
tools/scripts/setvocals_recursively.sh | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/tools/scripts/setvocals.sh b/tools/scripts/setvocals.sh
index 60414d8..96a3ab8 100644
--- a/tools/scripts/setvocals.sh
+++ b/tools/scripts/setvocals.sh
@@ -2,7 +2,7 @@
# this script guess which is the vocals track of a song and name it "vocals.ogg"
# usage ./setvocals.sh [songdir]
-cd "$1"
+cd "$1" || exit
function setvocals_rockband {
if [ -f "song.ogg" -a -f "drums.ogg" -a -f "rhythm.ogg" -a -f "guitar.ogg" ];
diff --git a/tools/scripts/setvocals_recursively.sh b/tools/scripts/setvocals_recursively.sh
new file mode 100644
index 0000000..9483acb
--- /dev/null
+++ b/tools/scripts/setvocals_recursively.sh
@@ -0,0 +1,8 @@
+#/bin/sh
+# this script execute "./setvocals_one_song.sh" recursively
+# usage ./setvocals_recursively.sh [parentdir]
+# If you run it with no arguments, it will use the current dir as parent dir
+
+
+[ $# -gt 0 ] || set -- .;
+find "$@" -type d -exec sh ./setvocals.sh {} \;
|
|
From: Tapio V. <aa...@us...> - 2010-01-07 12:20:53
|
Module: performous
Branch: master
Commit: 1e1ee53c7607f37143038c4502e11bfd97011fb5
Author: Tapio Vierros <tap...@gm...>
Date: Thu Jan 7 14:19:25 2010 +0200
Enable seeking in instrument songs, disable for dancing.
---
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 0b9d598..59ecb06 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -253,7 +253,7 @@ void ScreenSing::manageEvent(SDL_Event event) {
if (key == SDLK_F4) ++config["audio/round-trip"];
if (key == SDLK_F5) --config["audio/controller_delay"];
if (key == SDLK_F6) ++config["audio/controller_delay"];
- if (m_song->track_map.empty()) { // Seeking is currently only permitted for karaoke songs
+ if (m_song->danceTracks.empty()) { // Seeking is currently not permitted for dance songs
bool seekback = false;
if (key == SDLK_HOME) { m_audio.seekPos(0.0); seekback = true; }
if (key == SDLK_LEFT) { m_audio.seek(-5.0); seekback = true; }
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-01-07 11:15:59
|
Module: performous
Branch: master
Commit: df5016752b9b2922e2078bfbff54131e2fd3dc02
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jan 7 13:14:13 2010 +0200
Cleanup of singing screen key combos, now all of them (except Space) use Ctrl.
---
game/screen_sing.cc | 55 ++++++++++++++++++++++----------------------------
1 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index b8fa9aa..0b9d598 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -241,37 +241,30 @@ void ScreenSing::manageEvent(SDL_Event event) {
if (nav == input::CTRL_UP) ++config["audio/music_volume"];
if (nav == input::CTRL_DOWN) --config["audio/music_volume"];
}
- if (event.type == SDL_KEYDOWN) {
- m_quitTimer.setValue(QUIT_TIMEOUT);
- if (m_score_window.get()) return; // The rest are only available when score window is not displayed
- // Control combinations
- if (event.key.keysym.mod & KMOD_CTRL) {
- // Latency settings
- if (key == SDLK_F1) --config["audio/video_delay"];
- if (key == SDLK_F2) ++config["audio/video_delay"];
- if (key == SDLK_F3) --config["audio/round-trip"];
- if (key == SDLK_F4) ++config["audio/round-trip"];
- if (key == SDLK_F5) --config["audio/controller_delay"];
- if (key == SDLK_F6) ++config["audio/controller_delay"];
- if (m_song->track_map.empty()) { // Seeking is currently only permitted for karaoke songs
- bool seekback = false;
- if (key == SDLK_HOME) { m_audio.seekPos(0.0); seekback = true; }
- if (key == SDLK_LEFT) { m_audio.seek(-5.0); seekback = true; }
- if (key == SDLK_RIGHT) m_audio.seek(5.0);
- // Some things must be reset after seeking backwards
- if (seekback) m_layout_singer->reset();
- }
- // Reload current song
- if (key == SDLK_r) {
- exit(); m_song->reload(); enter();
- m_audio.seek(time);
- }
- if (key == SDLK_s) m_audio.toggleSynth(m_song->notes);
- } else {
- // Toggle vocals (in songs with a separate vocals track)
- if (key == SDLK_v) { m_audio.streamFade("vocals", event.key.keysym.mod & KMOD_SHIFT ? 1.0 : 0.0); }
- if (key == SDLK_k) ++config["game/karaoke_mode"]; // Toggle karaoke mode
- if (key == SDLK_w) ++config["game/pitch"]; // Toggle pitch wave
+ // Ctrl combinations that can be used while performing (not when score dialog is displayed)
+ if (event.type == SDL_KEYDOWN && (event.key.keysym.mod & KMOD_CTRL) && !m_score_window.get()) {
+ if (key == SDLK_s) m_audio.toggleSynth(m_song->notes);
+ if (key == SDLK_k) ++config["game/karaoke_mode"]; // Toggle karaoke mode
+ if (key == SDLK_w) ++config["game/pitch"]; // Toggle pitch wave
+ // Latency settings
+ if (key == SDLK_F1) --config["audio/video_delay"];
+ if (key == SDLK_F2) ++config["audio/video_delay"];
+ if (key == SDLK_F3) --config["audio/round-trip"];
+ if (key == SDLK_F4) ++config["audio/round-trip"];
+ if (key == SDLK_F5) --config["audio/controller_delay"];
+ if (key == SDLK_F6) ++config["audio/controller_delay"];
+ if (m_song->track_map.empty()) { // Seeking is currently only permitted for karaoke songs
+ bool seekback = false;
+ if (key == SDLK_HOME) { m_audio.seekPos(0.0); seekback = true; }
+ if (key == SDLK_LEFT) { m_audio.seek(-5.0); seekback = true; }
+ if (key == SDLK_RIGHT) m_audio.seek(5.0);
+ // Some things must be reset after seeking backwards
+ if (seekback) m_layout_singer->reset();
+ }
+ // Reload current song
+ if (key == SDLK_r) {
+ exit(); m_song->reload(); enter();
+ m_audio.seek(time);
}
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-01-07 11:15:58
|
Module: performous
Branch: master
Commit: 9f22281e05f5c2261ff467df929b546cfe4b13dc
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jan 7 13:10:32 2010 +0200
Improvements to latency key bindings and documentation.
---
data/schema.xml | 14 +++++++-------
game/screen_sing.cc | 8 ++++----
2 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index bc1cef6..a3168d7 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -159,23 +159,23 @@ to save the current settings to XML.
<limits min="-0.5" max="0.5" step="0.01" />
<locale name="C">
<short>Audio/video latency</short>
- <long>Use negative value if your display input lag is greater than the sound card output latency, positive values in the opposite case and zero if they are equal. F5/F6 to adjust this in singing screen.</long>
+ <long>Affects all modes. Use negative value if your display input lag is greater than the sound card output latency, positive values in the opposite case and zero if they are equal. This should be set so that the notes pass the cursor at the same time the audio is heard. Use Ctrl+F1/F2 to adjust this while performing.</long>
</locale>
</entry>
- <entry name="audio/controller_delay" type="float" value="0.08">
+ <entry name="audio/round-trip" type="float" value="0.09">
<ui unit=" ms" multiplier="1000" />
<limits min="0.0" max="0.5" step="0.01" />
<locale name="C">
- <short>Audio/controller latency</short>
- <long>The total of USB (guitar or dance pad) latency combined with audio output latency.</long>
+ <short>Audio round-trip latency</short>
+ <long>Affects singing only. The time it takes for Performous playback to reach your speakers, fly to the microphone and all the way back until Performous captures and analyzes it. While performing, press Ctrl+S for synth mode and adjust with Ctrl+F3/F4.</long>
</locale>
</entry>
- <entry name="audio/round-trip" type="float" value="0.09">
+ <entry name="audio/controller_delay" type="float" value="0.08">
<ui unit=" ms" multiplier="1000" />
<limits min="0.0" max="0.5" step="0.01" />
<locale name="C">
- <short>Audio round-trip latency</short>
- <long>The time it takes for Performous playback to reach your speakers, fly to the microphone and all the way back until Performous captures and analyzes it. Use F4 debug mode in singing screen and adjust with F7/F8.</long>
+ <short>Audio/controller latency</short>
+ <long>Affects instruments and dancing only. The total of USB (guitar or dance pad) latency combined with audio output latency. Adjust so that you can hit the notes best when playing by ear (not looking on screen). Use Ctrl+F5/F6 to adjust while performing.</long>
</locale>
</entry>
<entry name="audio/capture" type="string_list">
diff --git a/game/screen_sing.cc b/game/screen_sing.cc
index 2110581..b8fa9aa 100644
--- a/game/screen_sing.cc
+++ b/game/screen_sing.cc
@@ -247,10 +247,10 @@ void ScreenSing::manageEvent(SDL_Event event) {
// Control combinations
if (event.key.keysym.mod & KMOD_CTRL) {
// Latency settings
- if (key == SDLK_F1) --config["audio/round-trip"];
- if (key == SDLK_F2) ++config["audio/round-trip"];
- if (key == SDLK_F3) --config["audio/video_delay"];
- if (key == SDLK_F4) ++config["audio/video_delay"];
+ if (key == SDLK_F1) --config["audio/video_delay"];
+ if (key == SDLK_F2) ++config["audio/video_delay"];
+ if (key == SDLK_F3) --config["audio/round-trip"];
+ if (key == SDLK_F4) ++config["audio/round-trip"];
if (key == SDLK_F5) --config["audio/controller_delay"];
if (key == SDLK_F6) ++config["audio/controller_delay"];
if (m_song->track_map.empty()) { // Seeking is currently only permitted for karaoke songs
|
|
From: Yoda-JM <yo...@us...> - 2010-01-07 11:01:50
|
Module: performous
Branch: master
Commit: e78a2703d67b7985f0281a3f28b0e478664c73de
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jan 7 12:01:34 2010 +0100
Fixed keyboard test (still miles from working)
---
game/joystick.cc | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/joystick.cc b/game/joystick.cc
index e7633ca..544e44e 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -385,7 +385,7 @@ bool input::SDL::pushEvent(SDL_Event _e) {
break;
}
case SDL_KEYUP: {
- if(!config["game/keyboard_guitar"].b() && !config["game/keyboard_dancepad"].b())
+ if(!config["game/keyboard_guitar"].b() && !config["game/keyboard_drumkit"].b() && !config["game/keyboard_dancepad"].b())
return false;
if (_e.key.keysym.mod & (KMOD_CTRL|KMOD_SHIFT|KMOD_ALT|KMOD_META)) return false;
int button = 0;
|
|
From: Yoda-JM <yo...@us...> - 2010-01-07 10:26:08
|
Module: performous
Branch: master
Commit: 92e1b53856103dcc0883af4c13d3915559191148
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jan 7 11:25:18 2010 +0100
Added keyboard as drumkit (need testing)
---
data/schema.xml | 6 ++++++
game/joystick.cc | 41 +++++++++++++++++++++++++++++++++++++----
game/joystick.hh | 7 +++++--
3 files changed, 48 insertions(+), 6 deletions(-)
diff --git a/data/schema.xml b/data/schema.xml
index b20dfe8..bc1cef6 100644
--- a/data/schema.xml
+++ b/data/schema.xml
@@ -66,6 +66,12 @@ to save the current settings to XML.
<long>Enable keyboard as guitar (Frets on Fire mode).</long>
</locale>
</entry>
+ <entry name="game/keyboard_drumkit" type="bool" value="true">
+ <locale name="C">
+ <short>Keyboard as drumkit</short>
+ <long>Enable keyboard as drumkit.</long>
+ </locale>
+ </entry>
<entry name="game/keyboard_dancepad" type="bool" value="true">
<locale name="C">
<short>Keyboard as dance pad</short>
diff --git a/game/joystick.cc b/game/joystick.cc
index 207d6fa..e7633ca 100644
--- a/game/joystick.cc
+++ b/game/joystick.cc
@@ -270,11 +270,14 @@ void input::SDL::init() {
init_devices();
// Adding keyboard instruments
std::cout << "Keyboard as guitar controller: " << (config["game/keyboard_guitar"].b() ? "enabled":"disabled") << std::endl;
+ std::cout << "Keyboard as drumkit controller: " << (config["game/keyboard_drumkit"].b() ? "enabled":"disabled") << std::endl;
std::cout << "Keyboard as dance pad controller: " << (config["game/keyboard_dancepad"].b() ? "enabled":"disabled") << std::endl;
input::SDL::sdl_devices[input::Private::KEYBOARD_ID] = NULL;
input::Private::devices[input::Private::KEYBOARD_ID] = input::Private::InputDevPrivate(input::Private::GUITAR_GH);
input::SDL::sdl_devices[input::Private::KEYBOARD_ID2] = NULL;
- input::Private::devices[input::Private::KEYBOARD_ID2] = input::Private::InputDevPrivate(input::Private::DANCEPAD_GENERIC);
+ input::Private::devices[input::Private::KEYBOARD_ID2] = input::Private::InputDevPrivate(input::Private::DRUMS_GH);
+ input::SDL::sdl_devices[input::Private::KEYBOARD_ID3] = NULL;
+ input::Private::devices[input::Private::KEYBOARD_ID3] = input::Private::InputDevPrivate(input::Private::DANCEPAD_GENERIC);
}
bool input::SDL::pushEvent(SDL_Event _e) {
@@ -288,7 +291,7 @@ bool input::SDL::pushEvent(SDL_Event _e) {
static bool pickPressed[2] = {}; // HACK for tracking enter and rshift status
switch(_e.type) {
case SDL_KEYDOWN: {
- if(!config["game/keyboard_guitar"].b() && !config["game/keyboard_dancepad"].b())
+ if(!config["game/keyboard_guitar"].b() && !config["game/keyboard_drumkit"].b() && !config["game/keyboard_dancepad"].b())
return false;
if (_e.key.keysym.mod & (KMOD_CTRL|KMOD_SHIFT|KMOD_ALT|KMOD_META)) return false;
int button = 0;
@@ -340,9 +343,24 @@ bool input::SDL::pushEvent(SDL_Event _e) {
default:
return false;
}
- } else if(config["game/keyboard_dancepad"].b() && devices[input::Private::KEYBOARD_ID2].assigned()) {
+ } else if(config["game/keyboard_drumkit"].b() && devices[input::Private::KEYBOARD_ID2].assigned()) {
joy_id = input::Private::KEYBOARD_ID2;
switch(_e.key.keysym.sym) {
+ case SDLK_u:
+ button++;
+ case SDLK_i:
+ button++;
+ case SDLK_o:
+ button++;
+ case SDLK_p:
+ event.type = input::Event::PRESS;
+ break;
+ default:
+ return false;
+ }
+ } else if(config["game/keyboard_dancepad"].b() && devices[input::Private::KEYBOARD_ID3].assigned()) {
+ joy_id = input::Private::KEYBOARD_ID3;
+ switch(_e.key.keysym.sym) {
case SDLK_KP9: button = 5; break;
case SDLK_KP8: case SDLK_UP: button = 2; break;
case SDLK_KP7: button = 4; break;
@@ -401,9 +419,24 @@ bool input::SDL::pushEvent(SDL_Event _e) {
default:
return false;
}
- } else if(config["game/keyboard_dancepad"].b() && devices[input::Private::KEYBOARD_ID2].assigned()) {
+ } else if(config["game/keyboard_drumkit"].b() && devices[input::Private::KEYBOARD_ID2].assigned()) {
joy_id = input::Private::KEYBOARD_ID2;
switch(_e.key.keysym.sym) {
+ case SDLK_u:
+ button++;
+ case SDLK_i:
+ button++;
+ case SDLK_o:
+ button++;
+ case SDLK_p:
+ event.type = input::Event::RELEASE;
+ break;
+ default:
+ return false;
+ }
+ } else if(config["game/keyboard_dancepad"].b() && devices[input::Private::KEYBOARD_ID3].assigned()) {
+ joy_id = input::Private::KEYBOARD_ID3;
+ switch(_e.key.keysym.sym) {
case SDLK_KP9: button = 5; break;
case SDLK_KP8: case SDLK_UP: button = 2; break;
case SDLK_KP7: button = 4; break;
diff --git a/game/joystick.hh b/game/joystick.hh
index 70b8445..8507dac 100644
--- a/game/joystick.hh
+++ b/game/joystick.hh
@@ -34,7 +34,8 @@ namespace input {
namespace Private {
enum Type { GUITAR_RB, DRUMS_RB, GUITAR_GH, DRUMS_GH, DRUMS_MIDI, DANCEPAD_GENERIC };
static unsigned int KEYBOARD_ID = UINT_MAX;
- static unsigned int KEYBOARD_ID2 = KEYBOARD_ID-1; // Two ids needed for keyboard guitar/dancepad
+ static unsigned int KEYBOARD_ID2 = KEYBOARD_ID-1;
+ static unsigned int KEYBOARD_ID3 = KEYBOARD_ID-2; // Three ids needed for keyboard guitar/drumkit/dancepad
class InputDevPrivate {
public:
@@ -124,7 +125,9 @@ namespace input {
for(InputDevs::iterator it = devices.begin() ; it != devices.end() ; ++it) {
if( it->first == input::Private::KEYBOARD_ID && !config["game/keyboard_guitar"].b() )
continue;
- if( it->first == input::Private::KEYBOARD_ID2 && !config["game/keyboard_dancepad"].b() )
+ if( it->first == input::Private::KEYBOARD_ID2 && !config["game/keyboard_drumkit"].b() )
+ continue;
+ if( it->first == input::Private::KEYBOARD_ID3 && !config["game/keyboard_dancepad"].b() )
continue;
if( !it->second.assigned() && it->second.type_match(_type) ) {
std::cout << "Found @" << it->first << std::endl;
|
|
From: Peque <ms...@us...> - 2010-01-07 03:47:53
|
Module: performous
Branch: master
Commit: c1c0be469583f902a21fb5802c7f55e04514cfc0
Author: Miguel Sánchez de León Peque <peq...@ho...>
Date: Thu Jan 7 04:46:38 2010 +0100
setvocals.sh script can be used to set the vocals file in Rock Band and Guitar Hero songs
---
tools/scripts/setvocals.sh | 20 ++++++++++++++++++++
1 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/tools/scripts/setvocals.sh b/tools/scripts/setvocals.sh
new file mode 100644
index 0000000..60414d8
--- /dev/null
+++ b/tools/scripts/setvocals.sh
@@ -0,0 +1,20 @@
+#/bin/sh
+# this script guess which is the vocals track of a song and name it "vocals.ogg"
+# usage ./setvocals.sh [songdir]
+
+cd "$1"
+
+function setvocals_rockband {
+ if [ -f "song.ogg" -a -f "drums.ogg" -a -f "rhythm.ogg" -a -f "guitar.ogg" ];
+ then mv song.ogg vocals.ogg;
+ fi
+}
+
+function setvocals_guitarhero {
+ if [ -f "song.ogg" -a -f "drumsFoFiX.ogg" -a -f "songFoFiX.ogg" -a -f "rhythm.ogg" -a -f "guitar.ogg" ];
+ then mv songFoFiX.ogg vocals.ogg;
+ fi
+}
+
+setvocals_rockband
+setvocals_guitarhero
|
|
From: Yoda-JM <yo...@us...> - 2010-01-07 00:05:02
|
Module: performous
Branch: master
Commit: 83b454af6300e8c55b57cf09b846f18ad61cd2d4
Author: Vincent Le Ligeour <yo...@us...>
Date: Thu Jan 7 01:04:41 2010 +0100
Tried to fix jpeg loading problem
---
game/image.hh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/game/image.hh b/game/image.hh
index 2002e3a..0527a00 100644
--- a/game/image.hh
+++ b/game/image.hh
@@ -98,7 +98,7 @@ template <typename T> void loadJPEG(T& target, std::string const& filename) {
cinfo.err = jpeg_std_error(&jerr);
jpeg_create_decompress(&cinfo);
jpeg_stdio_src(&cinfo, infile);
- jpeg_read_header(&cinfo, true);
+ if( jpeg_read_header(&cinfo, true) != JPEG_HEADER_OK) throw std::runtime_error("Cannot read header of " + filename);
jpeg_start_decompress(&cinfo);
unsigned w = cinfo.output_width;
unsigned h = cinfo.output_height;
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-01-06 22:34:00
|
Module: performous
Branch: master
Commit: 68d3f3af97fb16cfbb9f87956e914f4227a2d05e
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jan 7 00:33:16 2010 +0200
Star rendering cleanup and fixed star position
---
game/notegraph.cc | 23 +++++++----------------
1 files changed, 7 insertions(+), 16 deletions(-)
diff --git a/game/notegraph.cc b/game/notegraph.cc
index fbe5652..0543be4 100644
--- a/game/notegraph.cc
+++ b/game/notegraph.cc
@@ -108,24 +108,15 @@ void NoteGraph::draw(double time, Database const& database, Position position) {
for (Notes::const_iterator it = m_songit; it != m_song.notes.end() && it->begin < m_time - (baseLine - 0.5) / pixUnit; ++it) {
if (it->accuracy >= 0.8 && (it->type == Note::NORMAL || it->type == Note::SLIDE || it->type == Note::GOLDEN)) {
double x = m_baseX + it->begin * pixUnit + m_noteUnit; // left x coordinate: begin minus border (side borders -noteUnit wide)
- double yend = m_baseY + (it->note + 1) * m_noteUnit; // top y coordinate (on the one higher note line)
double w = (it->end - it->begin) * pixUnit - m_noteUnit * 2.0; // width: including borders on both sides
float hh = -m_noteUnit;
- float centerx = x + w - hh;
- float rot = int(time*360) % 360; // They rotate!
- float zoom = std::abs((rot-180) / 360.0f) + 0.5f;
- { glutil::Translation tr(centerx, yend);
- { glutil::Scale sc(zoom, zoom, zoom);
- { glutil::Rotation rt(rot, 0.0f, 0.0f, 1.0f);
- UseTexture tblock(m_star);
- glutil::Begin block(GL_TRIANGLE_STRIP);
- glTexCoord2f(0.0f, 0.0f); glVertex2f(-hh, -hh);
- glTexCoord2f(1.0f, 0.0f); glVertex2f( hh, -hh);
- glTexCoord2f(0.0f, 1.0f); glVertex2f(-hh, hh);
- glTexCoord2f(1.0f, 1.0f); glVertex2f( hh, hh);
- } //< revert rotation
- } //< revert scale
- } //< revert translation
+ float centery = m_baseY + (it->note + 0.4) * m_noteUnit; // Star is 0.4 notes higher than current note
+ float centerx = x + w - 1.2 * hh; // Star is 1.2 units from end
+ float rot = fmod(time * 360, 360); // They rotate!
+ float zoom = (std::abs((rot-180) / 360.0f) + 0.5f) * 2.0 * hh;
+ glutil::Translation tr(centerx, centery);
+ glutil::Rotation rt(rot, 0.0f, 0.0f, 1.0f);
+ m_star.draw(Dimensions().stretch(zoom, zoom).center().middle(), TexCoords());
}
}
|
|
From: Lasse Kärkkäi. <tr...@us...> - 2010-01-06 22:33:58
|
Module: performous
Branch: master
Commit: d6e17e26ed5ae0d17ffab982f00649a5bad39695
Author: Lasse Karkkainen <tro...@tr...>
Date: Thu Jan 7 00:32:49 2010 +0200
Use GL_TRIANGLE_STRIP instead of GL_QUADS for OpenGL ES compatibility
---
game/surface.hh | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/surface.hh b/game/surface.hh
index 0fab49a..3cb6a7d 100644
--- a/game/surface.hh
+++ b/game/surface.hh
@@ -128,11 +128,11 @@ class UseTexture: boost::noncopyable {
template <GLenum Type> void OpenGLTexture<Type>::draw(Dimensions const& dim, TexCoords const& tex) const {
UseTexture texture(*this);
- glutil::Begin block(GL_QUADS);
+ glutil::Begin block(GL_TRIANGLE_STRIP);
glTexCoord2f(tex.x1, tex.y1); glVertex2f(dim.x1(), dim.y1());
glTexCoord2f(tex.x2, tex.y1); glVertex2f(dim.x2(), dim.y1());
- glTexCoord2f(tex.x2, tex.y2); glVertex2f(dim.x2(), dim.y2());
glTexCoord2f(tex.x1, tex.y2); glVertex2f(dim.x1(), dim.y2());
+ glTexCoord2f(tex.x2, tex.y2); glVertex2f(dim.x2(), dim.y2());
}
template <GLenum Type> void OpenGLTexture<Type>::drawCropped(Dimensions const& orig, TexCoords const& tex) const {
|