karaoke prototype (disabled)

This commit is contained in:
Chris Danford
2008-03-12 23:17:39 +00:00
parent ecbe89179e
commit 5e87c2e81a
82 changed files with 13322 additions and 31 deletions
+27
View File
@@ -35,6 +35,9 @@
#include "ThemeMetric.h"
#include "Game.h"
#include "RageSoundReader.h"
/* XXX
#include "PitchDetectionTest.h"
*/
static Preference<float> g_iDefaultRecordLength( "DefaultRecordLength", 4 );
static Preference<bool> g_bEditorShowBGChangesPlay( "EditorShowBGChangesPlay", false );
@@ -257,6 +260,9 @@ void ScreenEdit::InitEditMappings()
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SNAP_NEXT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_LEFT);
m_EditMappingsDeviceInput.button[EDIT_BUTTON_SNAP_PREV][0] = DeviceInput(DEVICE_KEYBOARD, KEY_RIGHT);
m_EditMappingsDeviceInput.button[EDIT_BUTTON_MIDI_NOTE_NEXT][0] = DeviceInput(DEVICE_KEYBOARD, KEY_EQUAL);
m_EditMappingsDeviceInput.button[EDIT_BUTTON_MIDI_NOTE_PREV][0] = DeviceInput(DEVICE_KEYBOARD, KEY_HYPHEN);
m_EditMappingsDeviceInput.button[EDIT_BUTTON_OPEN_EDIT_MENU][0] = DeviceInput(DEVICE_KEYBOARD, KEY_ESC);
m_EditMappingsMenuButton.button[EDIT_BUTTON_OPEN_EDIT_MENU][0] = MENU_BUTTON_START;
m_EditMappingsMenuButton.button[EDIT_BUTTON_OPEN_EDIT_MENU][1] = MENU_BUTTON_BACK;
@@ -1024,6 +1030,13 @@ void ScreenEdit::UpdateTextInfo()
sText += " ...\n";
}
RString sMidiNote;
/* XXX
if( !PitchDetectionTest::MidiNoteToString( GAMESTATE->m_iEditMidiNote, sMidiNote ) )
sMidiNote = "";
*/
sText += ssprintf( "%s:\n %i (%s)\n", "Pitch", (int)GAMESTATE->m_iEditMidiNote, sMidiNote.c_str() );
switch( EDIT_MODE.GetValue() )
{
DEFAULT_FAIL( EDIT_MODE.GetValue() );
@@ -1361,6 +1374,20 @@ void ScreenEdit::InputEdit( const InputEventPlus &input, EditButton EditB )
if( m_SnapDisplay.NextSnapMode() )
OnSnapModeChange();
break;
case EDIT_BUTTON_MIDI_NOTE_NEXT:
if( GAMESTATE->m_iEditMidiNote < NUM_MIDI_NOTES-1 )
{
GAMESTATE->m_iEditMidiNote++;
m_soundValueIncrease.Play();
}
break;
case EDIT_BUTTON_MIDI_NOTE_PREV:
if( GAMESTATE->m_iEditMidiNote > 0 )
{
GAMESTATE->m_iEditMidiNote--;
m_soundValueDecrease.Play();
}
break;
case EDIT_BUTTON_LAY_SELECT:
{
const int iCurrentRow = BeatToNoteRow(GAMESTATE->m_fSongBeat);