Added assist tick and text field editing to editor. Cleaned up more theme metrics stuff.
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
------------------------CVS after 3.00 beta 6----------------
|
------------------------CVS after 3.00 beta 6----------------
|
||||||
|
NEW FEATURE: Added assist tick toggle to editor.
|
||||||
|
NEW FEATURE: Added editing of text fields to editor.
|
||||||
CHANGE: Improved the appearance of hidden/sudden.
|
CHANGE: Improved the appearance of hidden/sudden.
|
||||||
CHANGE: After changing sort to "BEST", focus will be changed to the
|
CHANGE: After changing sort to "BEST", focus will be changed to the
|
||||||
the most-played song.
|
the most-played song.
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ NextScreen=ScreenSelectStyle
|
|||||||
|
|
||||||
[ScreenEz2SelectPlayer]
|
[ScreenEz2SelectPlayer]
|
||||||
CursorP1X=120
|
CursorP1X=120
|
||||||
CursorP1Y=360
|
CursorP1Y=280
|
||||||
CursorP2X=520
|
CursorP2X=520
|
||||||
CursorP2Y=360
|
CursorP2Y=280
|
||||||
ControllerP1X=120
|
ControllerP1X=120
|
||||||
ControllerP1Y=380
|
ControllerP1Y=280
|
||||||
ControllerP2X=520
|
ControllerP2X=520
|
||||||
ControllerP2Y=380
|
ControllerP2Y=280
|
||||||
HelpText=Press $ on the pad you wish to play on
|
HelpText=Press $ on the pad you wish to play on
|
||||||
TimerSeconds=40
|
TimerSeconds=40
|
||||||
NextScreen=ScreenSelectGroup
|
NextScreen=ScreenSelectGroup
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Background::Background()
|
|||||||
m_sprDangerBackground.StretchTo( RECT_BACKGROUND );
|
m_sprDangerBackground.StretchTo( RECT_BACKGROUND );
|
||||||
|
|
||||||
m_quadBGBrightness.StretchTo( RECT_BACKGROUND );
|
m_quadBGBrightness.StretchTo( RECT_BACKGROUND );
|
||||||
m_quadBGBrightness.SetDiffuseColor( D3DXCOLOR(0,0,0,1-0.5f) );
|
m_quadBGBrightness.SetDiffuseColor( D3DXCOLOR(0,0,0,1-PREFSMAN->m_fBGBrightness) );
|
||||||
|
|
||||||
m_quadBorder[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,LEFT_EDGE,SCREEN_BOTTOM) );
|
m_quadBorder[0].StretchTo( CRect(SCREEN_LEFT,SCREEN_TOP,LEFT_EDGE,SCREEN_BOTTOM) );
|
||||||
m_quadBorder[0].SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
|
m_quadBorder[0].SetDiffuseColor( D3DXCOLOR(0,0,0,1) );
|
||||||
|
|||||||
@@ -51,19 +51,22 @@ GhostArrow::GhostArrow()
|
|||||||
|
|
||||||
|
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||||
|
|
||||||
// set the length of each frame so the animation plays in exactly 1 pop up time
|
|
||||||
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
|
||||||
Sprite::m_fDelay[i] = g_fShowSeconds / (float)Sprite::GetNumStates();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GhostArrow::Update( float fDeltaTime )
|
void GhostArrow::Update( float fDeltaTime )
|
||||||
{
|
{
|
||||||
Sprite::Update( fDeltaTime );
|
Sprite::Update( fDeltaTime );
|
||||||
|
|
||||||
|
printf( "cur state is %d\n", Sprite::m_iCurState );
|
||||||
}
|
}
|
||||||
|
|
||||||
void GhostArrow::Step( TapNoteScore score )
|
void GhostArrow::Step( TapNoteScore score )
|
||||||
{
|
{
|
||||||
|
// HACK: set the length of each frame so the animation plays in exactly 1 pop up time.
|
||||||
|
// We can't do this in the constructor because the image hasn't been loaded yet
|
||||||
|
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
||||||
|
Sprite::m_fDelay[i] = g_fShowSeconds / (float)Sprite::GetNumStates();
|
||||||
|
|
||||||
D3DXCOLOR colorStart, colorEnd;
|
D3DXCOLOR colorStart, colorEnd;
|
||||||
switch( score )
|
switch( score )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -53,10 +53,6 @@ GhostArrowBright::GhostArrowBright()
|
|||||||
|
|
||||||
|
|
||||||
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
SetDiffuseColor( D3DXCOLOR(1,1,1,0) );
|
||||||
|
|
||||||
// set the length of each frame so the animation plays in exactly 1 pop up time
|
|
||||||
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
|
||||||
Sprite::m_fDelay[i] = g_fShowSeconds2 / (float)Sprite::GetNumStates();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GhostArrowBright::Update( float fDeltaTime )
|
void GhostArrowBright::Update( float fDeltaTime )
|
||||||
@@ -66,6 +62,11 @@ void GhostArrowBright::Update( float fDeltaTime )
|
|||||||
|
|
||||||
void GhostArrowBright::Step( TapNoteScore score )
|
void GhostArrowBright::Step( TapNoteScore score )
|
||||||
{
|
{
|
||||||
|
// HACK: set the length of each frame so the animation plays in exactly 1 pop up time.
|
||||||
|
// We can't do this in the constructor because the image hasn't been loaded yet
|
||||||
|
for( int i=0; i<Sprite::GetNumStates(); i++ )
|
||||||
|
Sprite::m_fDelay[i] = g_fShowSeconds2 / (float)Sprite::GetNumStates();
|
||||||
|
|
||||||
D3DXCOLOR colorStart, colorEnd;
|
D3DXCOLOR colorStart, colorEnd;
|
||||||
switch( score )
|
switch( score )
|
||||||
{
|
{
|
||||||
|
|||||||
+155
-68
@@ -49,12 +49,18 @@ const float PLAYER_X = EDIT_X;
|
|||||||
const float PLAYER_Y = SCREEN_TOP;
|
const float PLAYER_Y = SCREEN_TOP;
|
||||||
|
|
||||||
const float MENU_ITEM_X = CENTER_X-200;
|
const float MENU_ITEM_X = CENTER_X-200;
|
||||||
const float MENU_ITEM_START_Y = SCREEN_TOP + 30;
|
const float MENU_ITEM_START_Y = SCREEN_TOP + 24;
|
||||||
const float MENU_ITEM_SPACING_Y = 20;
|
const float MENU_ITEM_SPACING_Y = 18;
|
||||||
|
|
||||||
const CString HELP_TEXT =
|
const CString HELP_TEXT =
|
||||||
"Esc: show menu\n"
|
"Esc: show command menu\n"
|
||||||
"Hold F1 to show more commands\n"
|
// "Hold F1 to show more commands\n"
|
||||||
|
"Hold keys for faster change:\n"
|
||||||
|
"F7/F8: Decrease/increase BPM at cur beat\n"
|
||||||
|
"F9/F10: Dec/inc freeze secs at cur beat\n"
|
||||||
|
"F11/F12: Decrease/increase music offset\n"
|
||||||
|
"[/]: Dec/inc sample music start\n"
|
||||||
|
"{/}: Dec/inc sample music length\n"
|
||||||
"Up/Down: change beat\n"
|
"Up/Down: change beat\n"
|
||||||
"Left/Right: change snap\n"
|
"Left/Right: change snap\n"
|
||||||
"PgUp/PgDn: jump 1 measure\n"
|
"PgUp/PgDn: jump 1 measure\n"
|
||||||
@@ -63,8 +69,8 @@ const CString HELP_TEXT =
|
|||||||
"To create a hold note, hold a number key\n"
|
"To create a hold note, hold a number key\n"
|
||||||
" while changing the beat pressing Up/Down\n";
|
" while changing the beat pressing Up/Down\n";
|
||||||
|
|
||||||
const CString SHORTCUT_TEXT =
|
const CString SHORTCUT_TEXT = "";
|
||||||
"S: save changes\n"
|
/* "S: save changes\n"
|
||||||
"W: save as SM and DWI (lossy)\n"
|
"W: save as SM and DWI (lossy)\n"
|
||||||
"Enter/Space: set begin/end selection markers\n"
|
"Enter/Space: set begin/end selection markers\n"
|
||||||
"G/H/J/K/L: Snap selection to nearest\n"
|
"G/H/J/K/L: Snap selection to nearest\n"
|
||||||
@@ -76,38 +82,41 @@ const CString SHORTCUT_TEXT =
|
|||||||
"C: Copy selected area\n"
|
"C: Copy selected area\n"
|
||||||
"V: Paste at current beat\n"
|
"V: Paste at current beat\n"
|
||||||
"D: Toggle difficulty\n"
|
"D: Toggle difficulty\n"
|
||||||
|
"E: Edit description\n"
|
||||||
|
"A: Edit main title\n"
|
||||||
|
"U: Edit sub title\n"
|
||||||
|
"B: Add/Edit background change\n"
|
||||||
"Ins: Insert blank beat\n"
|
"Ins: Insert blank beat\n"
|
||||||
"Del: Delete current beat and shift\n"
|
"Del: Delete current beat and shift\n"
|
||||||
" Hold keys for faster change:\n"
|
|
||||||
"F7/F8: Decrease/increase BPM at cur beat\n"
|
|
||||||
"F9/F10: Dec/inc freeze secs at cur beat\n"
|
|
||||||
"F11/F12: Decrease/increase music offset\n"
|
|
||||||
"[/]: Dec/inc sample music start\n"
|
|
||||||
"{/}: Dec/inc sample music length\n"
|
|
||||||
"M: Play sample music\n";
|
"M: Play sample music\n";
|
||||||
|
*/
|
||||||
|
|
||||||
const CString MENU_ITEM_TEXT[NUM_MENU_ITEMS] = {
|
const CString MENU_ITEM_TEXT[NUM_MENU_ITEMS] = {
|
||||||
"Set begin marker (Enter)",
|
"Enter: Set begin marker (Enter)",
|
||||||
"Set end marker (Space)",
|
"Space: Set end marker (Space)",
|
||||||
"(P)lay selection",
|
"P: Play selection",
|
||||||
"(R)ecord in selection",
|
"R: Record in selection",
|
||||||
"(T)oggle Play/Record rate",
|
"T: Toggle Play/Record rate",
|
||||||
"Cut selection (X)",
|
"X: Cut selection",
|
||||||
"Copy selection (C)",
|
"C: Copy selection",
|
||||||
"Paste clipboard at current beat (V)",
|
"V: Paste clipboard at current beat",
|
||||||
"Toggle (D)ifficulty",
|
"D: Toggle difficulty",
|
||||||
"Add (B)ackground change",
|
"E: Edit description",
|
||||||
"(Ins)ert blank beat and shift down",
|
"A: Edit main title",
|
||||||
"(Del)ete blank beat and shift up",
|
"U: Edit subtitle",
|
||||||
"Snap selection to nearest quarter note (G)",
|
"I: Toggle assist tick",
|
||||||
"Snap selection to nearest eighth note (H)",
|
"B: Add/Edit background change at current beat",
|
||||||
"Snap selection to nearest triplet (J)",
|
"Ins: Insert blank beat and shift down",
|
||||||
"Snap selection to nearest sixteenth note (K)",
|
"Del: Delete blank beat and shift up",
|
||||||
"Snap selection to nearest triplet or sixteenth note (L)",
|
"G: Snap selection to nearest quarter note",
|
||||||
"Play sample (M)usic",
|
"H: Snap selection to nearest eighth note",
|
||||||
"(S)ave changes",
|
"J: Snap selection to nearest triplet",
|
||||||
"Save as D(W)I and SM (lossy)",
|
"K: Snap selection to nearest sixteenth note",
|
||||||
"(Q)uit"
|
"L: Snap selection to nearest triplet or sixteenth note",
|
||||||
|
"M: Play sample music",
|
||||||
|
"S: Save changes",
|
||||||
|
"W: Save as DWI (lossy)",
|
||||||
|
"Q: Quit"
|
||||||
};
|
};
|
||||||
int MENU_ITEM_KEY[NUM_MENU_ITEMS] = {
|
int MENU_ITEM_KEY[NUM_MENU_ITEMS] = {
|
||||||
DIK_RETURN,
|
DIK_RETURN,
|
||||||
@@ -119,6 +128,10 @@ int MENU_ITEM_KEY[NUM_MENU_ITEMS] = {
|
|||||||
DIK_C,
|
DIK_C,
|
||||||
DIK_V,
|
DIK_V,
|
||||||
DIK_D,
|
DIK_D,
|
||||||
|
DIK_E,
|
||||||
|
DIK_A,
|
||||||
|
DIK_U,
|
||||||
|
DIK_I,
|
||||||
DIK_B,
|
DIK_B,
|
||||||
DIK_INSERT,
|
DIK_INSERT,
|
||||||
DIK_DELETE,
|
DIK_DELETE,
|
||||||
@@ -143,11 +156,10 @@ ScreenEdit::ScreenEdit()
|
|||||||
|
|
||||||
// set both players to joined so the credit message doesn't show
|
// set both players to joined so the credit message doesn't show
|
||||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||||
{
|
|
||||||
GAMESTATE->m_bSideIsJoined[p] = true;
|
GAMESTATE->m_bSideIsJoined[p] = true;
|
||||||
}
|
|
||||||
SCREENMAN->RefreshCreditsMessages();
|
SCREENMAN->RefreshCreditsMessages();
|
||||||
|
|
||||||
|
m_iRowLastCrossed = -1;
|
||||||
|
|
||||||
m_pSong = GAMESTATE->m_pCurSong;
|
m_pSong = GAMESTATE->m_pCurSong;
|
||||||
|
|
||||||
@@ -245,7 +257,7 @@ ScreenEdit::ScreenEdit()
|
|||||||
m_textHelp.SetText( HELP_TEXT );
|
m_textHelp.SetText( HELP_TEXT );
|
||||||
|
|
||||||
m_rectShortcutsBack.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
m_rectShortcutsBack.StretchTo( CRect(SCREEN_LEFT, SCREEN_TOP, SCREEN_RIGHT, SCREEN_BOTTOM) );
|
||||||
m_rectShortcutsBack.SetDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
|
m_rectShortcutsBack.SetDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
|
||||||
|
|
||||||
m_textShortcuts.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
m_textShortcuts.LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
m_textShortcuts.SetXY( SHORTCUTS_X, SHORTCUTS_Y );
|
m_textShortcuts.SetXY( SHORTCUTS_X, SHORTCUTS_Y );
|
||||||
@@ -264,6 +276,8 @@ ScreenEdit::ScreenEdit()
|
|||||||
|
|
||||||
m_soundMusic.Load( m_pSong->GetMusicPath(), true ); // enable accurate sync
|
m_soundMusic.Load( m_pSong->GetMusicPath(), true ); // enable accurate sync
|
||||||
|
|
||||||
|
m_soundAssistTick.Load( THEME->GetPathTo("Sounds","gameplay assist tick") );
|
||||||
|
|
||||||
for( int i=0; i<NUM_MENU_ITEMS; i++ )
|
for( int i=0; i<NUM_MENU_ITEMS; i++ )
|
||||||
{
|
{
|
||||||
m_textMenu[i].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
m_textMenu[i].LoadFromFont( THEME->GetPathTo("Fonts","normal") );
|
||||||
@@ -370,14 +384,6 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
m_fTrailingBeat += fDelta * fDeltaTime*5;
|
m_fTrailingBeat += fDelta * fDeltaTime*5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// float fSongBeat, fBPS;
|
|
||||||
/// float fPositionSeconds = m_soundMusic.GetPositionSeconds();
|
|
||||||
|
|
||||||
// fPositionSeconds += 0.08f; // HACK: The assist ticks are playing too late, so make them play a tiny bit earlier
|
|
||||||
// m_pSong->GetBeatAndBPSFromElapsedTime( fPositionSeconds, fSongBeat, fBPS );
|
|
||||||
// LOG->Trace( "fPositionSeconds = %f, fSongBeat = %f, fBPS = %f", fPositionSeconds, fSongBeat, fBPS );
|
|
||||||
|
|
||||||
if( m_EditMode == MODE_MENU )
|
if( m_EditMode == MODE_MENU )
|
||||||
{
|
{
|
||||||
for( int i=0; i<NUM_MENU_ITEMS; i++ )
|
for( int i=0; i<NUM_MENU_ITEMS; i++ )
|
||||||
@@ -389,6 +395,36 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
int iIndexNow = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat );
|
int iIndexNow = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// play assist ticks
|
||||||
|
//
|
||||||
|
// Sound cards have a latency between when a sample is Play()ed and when the sound
|
||||||
|
// will start coming out the speaker. Compensate for this by boosting
|
||||||
|
// fPositionSeconds ahead
|
||||||
|
if( m_EditMode == MODE_PLAYING && GAMESTATE->m_SongOptions.m_AssistType == SongOptions::ASSIST_TICK )
|
||||||
|
{
|
||||||
|
fPositionSeconds += (SOUND->GetPlayLatency()+0.018f) * m_soundMusic.GetPlaybackRate(); // HACK: Add 0.015 seconds to account for the fact that the middle of the tick sounds occurs 0.015 seconds into playing.
|
||||||
|
GAMESTATE->m_pCurSong->GetBeatAndBPSFromElapsedTime( fPositionSeconds, fSongBeat, fBPS, bFreeze );
|
||||||
|
|
||||||
|
int iRowNow = BeatToNoteRowNotRounded( fSongBeat );
|
||||||
|
iRowNow = max( 0, iRowNow );
|
||||||
|
static int iRowLastCrossed = 0;
|
||||||
|
|
||||||
|
bool bAnyoneHasANote = false; // set this to true if any player has a note at one of the indicies we crossed
|
||||||
|
|
||||||
|
for( int r=iRowLastCrossed+1; r<=iRowNow; r++ ) // for each index we crossed since the last update
|
||||||
|
bAnyoneHasANote |= m_Player.IsThereANoteAtRow( r );
|
||||||
|
|
||||||
|
if( bAnyoneHasANote )
|
||||||
|
m_soundAssistTick.Play();
|
||||||
|
|
||||||
|
iRowLastCrossed = iRowNow;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CString sNoteType;
|
CString sNoteType;
|
||||||
switch( m_SnapDisplay.GetSnapMode() )
|
switch( m_SnapDisplay.GetSnapMode() )
|
||||||
{
|
{
|
||||||
@@ -399,11 +435,12 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
default: ASSERT(0);
|
default: ASSERT(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Only update stats every 100 frames because it's slow
|
||||||
static int iNumTapNotes = 0, iNumHoldNotes = 0;
|
static int iNumTapNotes = 0, iNumHoldNotes = 0;
|
||||||
static int iCounter = 0;
|
static int iCounter = 0;
|
||||||
|
|
||||||
iCounter++;
|
iCounter++;
|
||||||
if( iCounter % 30 == 0 )
|
if( iCounter % 100 == 0 )
|
||||||
{
|
{
|
||||||
iNumTapNotes = m_NoteFieldEdit.GetNumTapNotes();
|
iNumTapNotes = m_NoteFieldEdit.GetNumTapNotes();
|
||||||
iNumHoldNotes = m_NoteFieldEdit.GetNumHoldNotes();
|
iNumHoldNotes = m_NoteFieldEdit.GetNumHoldNotes();
|
||||||
@@ -416,7 +453,10 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
"Play/Record rate: %.1f\n"
|
"Play/Record rate: %.1f\n"
|
||||||
"Difficulty = %s\n"
|
"Difficulty = %s\n"
|
||||||
"Description = %s\n"
|
"Description = %s\n"
|
||||||
|
"Main title = %s\n"
|
||||||
|
"Sub title = %s\n"
|
||||||
"Num notes tap: %d, hold: %d\n"
|
"Num notes tap: %d, hold: %d\n"
|
||||||
|
"Assist tick is %s\n"
|
||||||
"MusicOffsetSeconds: %.2f\n"
|
"MusicOffsetSeconds: %.2f\n"
|
||||||
"Preview start: %.2f, length = %.2f\n",
|
"Preview start: %.2f, length = %.2f\n",
|
||||||
sNoteType,
|
sNoteType,
|
||||||
@@ -425,7 +465,10 @@ void ScreenEdit::Update( float fDeltaTime )
|
|||||||
GAMESTATE->m_SongOptions.m_fMusicRate,
|
GAMESTATE->m_SongOptions.m_fMusicRate,
|
||||||
DifficultyClassToString( m_pNotes->m_DifficultyClass ),
|
DifficultyClassToString( m_pNotes->m_DifficultyClass ),
|
||||||
GAMESTATE->m_pCurNotes[PLAYER_1] ? GAMESTATE->m_pCurNotes[PLAYER_1]->m_sDescription : "no description",
|
GAMESTATE->m_pCurNotes[PLAYER_1] ? GAMESTATE->m_pCurNotes[PLAYER_1]->m_sDescription : "no description",
|
||||||
|
m_pSong->m_sMainTitle,
|
||||||
|
m_pSong->m_sSubTitle,
|
||||||
iNumTapNotes, iNumHoldNotes,
|
iNumTapNotes, iNumHoldNotes,
|
||||||
|
GAMESTATE->m_SongOptions.m_AssistType==SongOptions::ASSIST_TICK ? "ON" : "OFF",
|
||||||
m_pSong->m_fBeat0OffsetInSeconds,
|
m_pSong->m_fBeat0OffsetInSeconds,
|
||||||
m_pSong->m_fMusicSampleStartSeconds, m_pSong->m_fMusicSampleLengthSeconds
|
m_pSong->m_fMusicSampleStartSeconds, m_pSong->m_fMusicSampleLengthSeconds
|
||||||
) );
|
) );
|
||||||
@@ -505,6 +548,46 @@ void ScreenEdit::Input( const DeviceInput& DeviceI, const InputEventType type, c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Begin helper functions for InputEdit
|
||||||
|
|
||||||
|
void AddBGChange( CString sBGName )
|
||||||
|
{
|
||||||
|
Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
|
|
||||||
|
for( int i=0; i<pSong->m_BackgroundChanges.GetSize(); i++ )
|
||||||
|
{
|
||||||
|
if( pSong->m_BackgroundChanges[i].m_fStartBeat == GAMESTATE->m_fSongBeat )
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( i != pSong->m_BackgroundChanges.GetSize() ) // there is already a BGChange here
|
||||||
|
pSong->m_BackgroundChanges.RemoveAt( i );
|
||||||
|
|
||||||
|
// create a new BGChange
|
||||||
|
if( sBGName != "" )
|
||||||
|
pSong->AddBackgroundChange( BackgroundChange(GAMESTATE->m_fSongBeat, sBGName) );
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeDescription( CString sNew )
|
||||||
|
{
|
||||||
|
Notes* pNotes = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||||
|
pNotes->m_sDescription = sNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeMainTitle( CString sNew )
|
||||||
|
{
|
||||||
|
Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
|
pSong->m_sMainTitle = sNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ChangeSubTitle( CString sNew )
|
||||||
|
{
|
||||||
|
Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
|
pSong->m_sSubTitle = sNew;
|
||||||
|
}
|
||||||
|
|
||||||
|
// End helper functions for InputEdit
|
||||||
|
|
||||||
void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if( DeviceI.device != DEVICE_KEYBOARD )
|
if( DeviceI.device != DEVICE_KEYBOARD )
|
||||||
@@ -577,8 +660,11 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
// copy edit into current Notes
|
// copy edit into current Notes
|
||||||
Song* pSong = GAMESTATE->m_pCurSong;
|
Song* pSong = GAMESTATE->m_pCurSong;
|
||||||
Notes* pNotes = GAMESTATE->m_pCurNotes[PLAYER_1];
|
Notes* pNotes = GAMESTATE->m_pCurNotes[PLAYER_1];
|
||||||
|
|
||||||
|
// strip out the autogen marker if any. The autogen marker would have caused these Notes not to be saved to disk.
|
||||||
|
pNotes->m_sDescription.Replace( " (autogen)", "" );
|
||||||
|
|
||||||
ASSERT( pNotes );
|
ASSERT( pNotes );
|
||||||
/*
|
/*
|
||||||
if( pNotes == NULL )
|
if( pNotes == NULL )
|
||||||
{
|
{
|
||||||
@@ -753,7 +839,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
MenuItemGainFocus( m_iMenuSelection );
|
MenuItemGainFocus( m_iMenuSelection );
|
||||||
|
|
||||||
m_rectRecordBack.BeginTweening( 0.5f );
|
m_rectRecordBack.BeginTweening( 0.5f );
|
||||||
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
|
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DIK_P:
|
case DIK_P:
|
||||||
@@ -769,7 +855,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
m_Player.Load( PLAYER_1, (NoteData*)&m_NoteFieldEdit, NULL, NULL );
|
m_Player.Load( PLAYER_1, (NoteData*)&m_NoteFieldEdit, NULL, NULL );
|
||||||
|
|
||||||
m_rectRecordBack.BeginTweening( 0.5f );
|
m_rectRecordBack.BeginTweening( 0.5f );
|
||||||
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
|
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
|
||||||
|
|
||||||
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
||||||
float fElapsedSeconds = max( 0, m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
|
float fElapsedSeconds = max( 0, m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
|
||||||
@@ -795,7 +881,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
|
|
||||||
m_EditMode = MODE_RECORDING;
|
m_EditMode = MODE_RECORDING;
|
||||||
m_rectRecordBack.BeginTweening( 0.5f );
|
m_rectRecordBack.BeginTweening( 0.5f );
|
||||||
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.5f) );
|
m_rectRecordBack.SetTweenDiffuseColor( D3DXCOLOR(0,0,0,0.8f) );
|
||||||
|
|
||||||
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
GAMESTATE->m_fSongBeat = m_NoteFieldEdit.m_fBeginMarker - 4; // give a 1 measure lead-in
|
||||||
float fElapsedSeconds = max( 0, m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
|
float fElapsedSeconds = max( 0, m_pSong->GetElapsedTimeFromBeat(GAMESTATE->m_fSongBeat) );
|
||||||
@@ -882,6 +968,18 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DIK_E:
|
||||||
|
SCREENMAN->TextEntry( SM_None, "Edit notes description.\nPress Enter to confirm,\nEscape to cancel.", m_pNotes->m_sDescription, ChangeDescription, NULL );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DIK_A:
|
||||||
|
SCREENMAN->TextEntry( SM_None, "Edit song main title.\nPress Enter to confirm,\nEscape to cancel.", m_pSong->m_sMainTitle, ChangeMainTitle, NULL );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case DIK_U:
|
||||||
|
SCREENMAN->TextEntry( SM_None, "Edit song sub title.\nPress Enter to confirm,\nEscape to cancel.", m_pSong->m_sSubTitle, ChangeSubTitle, NULL );
|
||||||
|
break;
|
||||||
|
|
||||||
case DIK_B:
|
case DIK_B:
|
||||||
{
|
{
|
||||||
CString sOldBackground;
|
CString sOldBackground;
|
||||||
@@ -897,6 +995,13 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case DIK_I:
|
||||||
|
if( GAMESTATE->m_SongOptions.m_AssistType==SongOptions::ASSIST_TICK )
|
||||||
|
GAMESTATE->m_SongOptions.m_AssistType = SongOptions::ASSIST_NONE;
|
||||||
|
else
|
||||||
|
GAMESTATE->m_SongOptions.m_AssistType = SongOptions::ASSIST_TICK;
|
||||||
|
break;
|
||||||
|
|
||||||
case DIK_F7:
|
case DIK_F7:
|
||||||
case DIK_F8:
|
case DIK_F8:
|
||||||
{
|
{
|
||||||
@@ -1022,24 +1127,6 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenEdit::AddBGChange( CString sBGName )
|
|
||||||
{
|
|
||||||
Song* pSong = GAMESTATE->m_pCurSong;
|
|
||||||
|
|
||||||
for( int i=0; i<pSong->m_BackgroundChanges.GetSize(); i++ )
|
|
||||||
{
|
|
||||||
if( pSong->m_BackgroundChanges[i].m_fStartBeat == GAMESTATE->m_fSongBeat )
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if( i != pSong->m_BackgroundChanges.GetSize() ) // there is already a BGChange here
|
|
||||||
pSong->m_BackgroundChanges.RemoveAt( i );
|
|
||||||
|
|
||||||
// create a new BGChange
|
|
||||||
if( sBGName != "" )
|
|
||||||
pSong->AddBackgroundChange( BackgroundChange(GAMESTATE->m_fSongBeat, sBGName) );
|
|
||||||
}
|
|
||||||
|
|
||||||
void ScreenEdit::InputRecord( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
void ScreenEdit::InputRecord( const DeviceInput& DeviceI, const InputEventType type, const GameInput &GameI, const MenuInput &MenuI, const StyleInput &StyleI )
|
||||||
{
|
{
|
||||||
if(type == IET_RELEASE) return; // don't care
|
if(type == IET_RELEASE) return; // don't care
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
#include "SnapDisplay.h"
|
#include "SnapDisplay.h"
|
||||||
|
|
||||||
|
|
||||||
const int NUM_MENU_ITEMS = 21;
|
const int NUM_MENU_ITEMS = 25;
|
||||||
|
|
||||||
|
|
||||||
class ScreenEdit : public Screen
|
class ScreenEdit : public Screen
|
||||||
@@ -46,7 +46,6 @@ protected:
|
|||||||
void MenuItemGainFocus( int iItemIndex );
|
void MenuItemGainFocus( int iItemIndex );
|
||||||
void MenuItemLoseFocus( int iItemIndex );
|
void MenuItemLoseFocus( int iItemIndex );
|
||||||
|
|
||||||
static void AddBGChange( CString sBGName );
|
|
||||||
|
|
||||||
enum EditMode { MODE_EDITING, MODE_MENU, MODE_RECORDING, MODE_PLAYING };
|
enum EditMode { MODE_EDITING, MODE_MENU, MODE_RECORDING, MODE_PLAYING };
|
||||||
EditMode m_EditMode;
|
EditMode m_EditMode;
|
||||||
@@ -97,6 +96,10 @@ protected:
|
|||||||
|
|
||||||
int m_iMenuSelection;
|
int m_iMenuSelection;
|
||||||
BitmapText m_textMenu[NUM_MENU_ITEMS];
|
BitmapText m_textMenu[NUM_MENU_ITEMS];
|
||||||
|
|
||||||
|
int m_iRowLastCrossed;
|
||||||
|
RageSoundSample m_soundAssistTick;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ ScreenEditMenu::ScreenEditMenu()
|
|||||||
{
|
{
|
||||||
LOG->Trace( "ScreenEditMenu::ScreenEditMenu()" );
|
LOG->Trace( "ScreenEditMenu::ScreenEditMenu()" );
|
||||||
|
|
||||||
|
GAMESTATE->m_CurStyle = STYLE_NONE;
|
||||||
|
|
||||||
Selector.SetXY( 0, 0 );
|
Selector.SetXY( 0, 0 );
|
||||||
// Selector.AllowNewNotes();
|
// Selector.AllowNewNotes();
|
||||||
this->AddSubActor( &Selector );
|
this->AddSubActor( &Selector );
|
||||||
@@ -149,9 +151,9 @@ void ScreenEditMenu::MenuStart( PlayerNumber p )
|
|||||||
|
|
||||||
m_soundSelect.PlayRandom();
|
m_soundSelect.PlayRandom();
|
||||||
|
|
||||||
m_Menu.TweenOffScreenToBlack( SM_None, false );
|
m_Menu.TweenOffScreenToBlack( SM_GoToNextScreen, false );
|
||||||
|
|
||||||
m_Fade.CloseWipingRight( SM_GoToNextScreen );
|
m_Fade.CloseWipingRight( SM_None );
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenEditMenu::MenuBack( PlayerNumber p )
|
void ScreenEditMenu::MenuBack( PlayerNumber p )
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ OptionLineData g_GraphicOptionsLines[NUM_GRAPHIC_OPTIONS_LINES] = {
|
|||||||
{ "Refresh Rate", 11, {"MAX","DEFAULT","60","70","72","75","80","85","90","100","120"} },
|
{ "Refresh Rate", 11, {"MAX","DEFAULT","60","70","72","75","80","85","90","100","120"} },
|
||||||
{ "Show Stats", 2, {"OFF","ON"} },
|
{ "Show Stats", 2, {"OFF","ON"} },
|
||||||
{ "BG Mode", 4, {"OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES"} },
|
{ "BG Mode", 4, {"OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES"} },
|
||||||
{ "BG Brightness", 5, {"20%","40%","60%","80%","100%"} },
|
{ "BG Brightness", 11, {"0%","10%","20%","30%","40%","50%","60%","70%","80%","90%","100%"} },
|
||||||
{ "Movie Decode", 4, {"1ms","2ms","3ms","4ms"} },
|
{ "Movie Decode", 4, {"1ms","2ms","3ms","4ms"} },
|
||||||
{ "BG For Banner", 2, {"NO", "YES (slow)"} },
|
{ "BG For Banner", 2, {"NO", "YES (slow)"} },
|
||||||
};
|
};
|
||||||
@@ -166,14 +166,7 @@ void ScreenGraphicOptions::ImportOptions()
|
|||||||
|
|
||||||
m_iSelectedOption[0][GO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
m_iSelectedOption[0][GO_SHOWSTATS] = PREFSMAN->m_bShowStats ? 1:0;
|
||||||
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
m_iSelectedOption[0][GO_BGMODE] = PREFSMAN->m_BackgroundMode;
|
||||||
|
m_iSelectedOption[0][GO_BGBRIGHTNESS] = roundf( PREFSMAN->m_fBGBrightness*10 );
|
||||||
if( PREFSMAN->m_fBGBrightness == 0.2f ) m_iSelectedOption[0][GO_BGBRIGHTNESS] = 0;
|
|
||||||
else if( PREFSMAN->m_fBGBrightness == 0.4f ) m_iSelectedOption[0][GO_BGBRIGHTNESS] = 1;
|
|
||||||
else if( PREFSMAN->m_fBGBrightness == 0.6f ) m_iSelectedOption[0][GO_BGBRIGHTNESS] = 2;
|
|
||||||
else if( PREFSMAN->m_fBGBrightness == 0.8f ) m_iSelectedOption[0][GO_BGBRIGHTNESS] = 3;
|
|
||||||
else if( PREFSMAN->m_fBGBrightness == 1.0f ) m_iSelectedOption[0][GO_BGBRIGHTNESS] = 4;
|
|
||||||
else m_iSelectedOption[0][GO_BGBRIGHTNESS] = 2;
|
|
||||||
|
|
||||||
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
m_iSelectedOption[0][GO_MOVIEDECODEMS] = PREFSMAN->m_iMovieDecodeMS-1;
|
||||||
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
m_iSelectedOption[0][GO_BGIFNOBANNER] = PREFSMAN->m_bUseBGIfNoBanner ? 1:0;
|
||||||
}
|
}
|
||||||
@@ -215,17 +208,7 @@ void ScreenGraphicOptions::ExportOptions()
|
|||||||
|
|
||||||
PREFSMAN->m_bShowStats = m_iSelectedOption[0][GO_SHOWSTATS] == 1;
|
PREFSMAN->m_bShowStats = m_iSelectedOption[0][GO_SHOWSTATS] == 1;
|
||||||
PREFSMAN->m_BackgroundMode = PrefsManager::BackgroundMode( m_iSelectedOption[0][GO_BGMODE] );
|
PREFSMAN->m_BackgroundMode = PrefsManager::BackgroundMode( m_iSelectedOption[0][GO_BGMODE] );
|
||||||
|
PREFSMAN->m_fBGBrightness = m_iSelectedOption[0][GO_BGBRIGHTNESS] / 10.0f;
|
||||||
switch( m_iSelectedOption[0][GO_BGBRIGHTNESS] )
|
|
||||||
{
|
|
||||||
case 0: PREFSMAN->m_fBGBrightness = 0.2f; break;
|
|
||||||
case 1: PREFSMAN->m_fBGBrightness = 0.4f; break;
|
|
||||||
case 2: PREFSMAN->m_fBGBrightness = 0.6f; break;
|
|
||||||
case 3: PREFSMAN->m_fBGBrightness = 0.8f; break;
|
|
||||||
case 4: PREFSMAN->m_fBGBrightness = 1.0f; break;
|
|
||||||
default: ASSERT(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
PREFSMAN->m_iMovieDecodeMS = m_iSelectedOption[0][GO_MOVIEDECODEMS]+1;
|
PREFSMAN->m_iMovieDecodeMS = m_iSelectedOption[0][GO_MOVIEDECODEMS]+1;
|
||||||
PREFSMAN->m_bUseBGIfNoBanner = m_iSelectedOption[0][GO_BGIFNOBANNER] == 1;
|
PREFSMAN->m_bUseBGIfNoBanner = m_iSelectedOption[0][GO_BGIFNOBANNER] == 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,8 +100,6 @@ void ScreenTextEntry::Input( const DeviceInput& DeviceI, const InputEventType ty
|
|||||||
m_textAnswer.SetText( m_sAnswer );
|
m_textAnswer.SetText( m_sAnswer );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Screen::Input( DeviceI, type, GameI, MenuI, StyleI );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScreenTextEntry::HandleScreenMessage( const ScreenMessage SM )
|
void ScreenTextEntry::HandleScreenMessage( const ScreenMessage SM )
|
||||||
|
|||||||
Reference in New Issue
Block a user