Fixed a couple Pump bugs
This commit is contained in:
@@ -374,7 +374,7 @@ StyleDef g_StyleDefs[NUM_STYLES] =
|
||||
{ // StyleDef
|
||||
GAME_DANCE, // m_Game
|
||||
"dance-couple", // m_szName
|
||||
NOTES_TYPE_DANCE_SINGLE, // m_NotesType
|
||||
NOTES_TYPE_DANCE_COUPLE, // m_NotesType
|
||||
StyleDef::TWO_PLAYERS_TWO_CREDITS, // m_StyleType
|
||||
{ 160, 480 }, // m_iCenterX
|
||||
4, // m_iColsPerPlayer
|
||||
|
||||
+24
-4
@@ -648,6 +648,11 @@ bool Notes::LoadFromKSFFile( const CString &sPath )
|
||||
CStringArray asRows;
|
||||
sParams[1].TrimLeft();
|
||||
split( sParams[1], "\n", asRows, true );
|
||||
|
||||
int iHoldStartRow[13];
|
||||
for( int t=0; t<13; t++ )
|
||||
iHoldStartRow[t] = -1;
|
||||
|
||||
for( int r=0; r<asRows.GetSize(); r++ )
|
||||
{
|
||||
CString& sRowString = asRows[r];
|
||||
@@ -658,10 +663,25 @@ bool Notes::LoadFromKSFFile( const CString &sPath )
|
||||
int row = BeatToNoteRow(fBeatThisRow);
|
||||
for( int t=0; t<13; t++ )
|
||||
{
|
||||
char c = sRowString[t];
|
||||
if( c != '0' )
|
||||
int kdsjf = 0;
|
||||
notedata.m_TapNotes[t][row] = sRowString[t];
|
||||
if( sRowString[t] == '4' )
|
||||
{
|
||||
if( iHoldStartRow[t] == -1 )
|
||||
iHoldStartRow[t] = r;
|
||||
else
|
||||
; // ignore middle of hold
|
||||
}
|
||||
else // sRowString[t] != '4'
|
||||
{
|
||||
if( iHoldStartRow[t] != -1 ) // this ends the hold
|
||||
{
|
||||
HoldNote hn = { t, iHoldStartRow[t]/(float)iTickCount, (r-1)/(float)iTickCount };
|
||||
notedata.AddHoldNote( hn );
|
||||
iHoldStartRow[t] = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if( sRowString[t] != '4' )
|
||||
notedata.m_TapNotes[t][row] = sRowString[t];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "GameState.h"
|
||||
|
||||
|
||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("Screens","UseNormalOrEZ2SelectStyle")
|
||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("General","UseNormalOrEZ2SelectStyle")
|
||||
|
||||
|
||||
const ScreenMessage SM_DoneOpening = ScreenMessage(SM_User-7);
|
||||
|
||||
@@ -32,7 +32,7 @@ Andrew Livy
|
||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
||||
|
||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("Screens","UseNormalOrEZ2SelectStyle")
|
||||
#define USE_NORMAL_OR_EZ2_SELECT_STYLE THEME->GetMetricB("General","UseNormalOrEZ2SelectStyle")
|
||||
|
||||
const float TWEEN_TIME = 0.35f;
|
||||
const D3DXCOLOR OPT_NOT_SELECTED = D3DXCOLOR(0.3f,0.3f,0.3f,1);
|
||||
|
||||
@@ -113,7 +113,7 @@ const float OPT_YP[NUM_EZ2P_GRAPHICS] = {
|
||||
}; // tells us the default Y position
|
||||
|
||||
|
||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("Screens","SkipSelectDifficulty")
|
||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("General","SkipSelectDifficulty")
|
||||
|
||||
|
||||
float ez2p_lasttimercheck[2];
|
||||
|
||||
@@ -559,6 +559,8 @@ ScreenGameplay::ScreenGameplay()
|
||||
m_announcerComboStopped.Load( ANNOUNCER->GetPathTo(ANNOUNCER_GAMEPLAY_COMBO_STOPPED) );
|
||||
}
|
||||
|
||||
m_iRowLastCrossed = -1;
|
||||
|
||||
m_soundAssistTick.Load( THEME->GetPathTo("Sounds","gameplay assist tick") );
|
||||
|
||||
|
||||
@@ -854,22 +856,20 @@ void ScreenGameplay::Update( float fDeltaTime )
|
||||
// Send crossed row messages to Player
|
||||
//
|
||||
int iRowNow = BeatToNoteRowNotRounded( fSongBeat );
|
||||
CLAMP( iRowNow, 0, MAX_TAP_NOTE_ROWS-1 );
|
||||
static int iRowLastCrossed = 0;
|
||||
CLAMP( iRowLastCrossed, 0, MAX_TAP_NOTE_ROWS-1 );
|
||||
|
||||
for( int r=iRowLastCrossed+1; r<=iRowNow; r++ ) // for each index we crossed since the last update
|
||||
if( iRowNow >= 0 && iRowNow < MAX_TAP_NOTE_ROWS )
|
||||
{
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
for( int r=m_iRowLastCrossed+1; r<=iRowNow; r++ ) // for each index we crossed since the last update
|
||||
{
|
||||
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||
m_Player[p].CrossedRow( r );
|
||||
for( int p=0; p<NUM_PLAYERS; p++ )
|
||||
{
|
||||
if( GAMESTATE->IsPlayerEnabled(p) )
|
||||
m_Player[p].CrossedRow( r );
|
||||
}
|
||||
}
|
||||
|
||||
m_iRowLastCrossed = iRowNow;
|
||||
}
|
||||
|
||||
iRowLastCrossed = iRowNow;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// play assist ticks
|
||||
|
||||
@@ -136,6 +136,9 @@ private:
|
||||
RandomSample m_announcer1000Combo;
|
||||
RandomSample m_announcerComboStopped;
|
||||
|
||||
|
||||
|
||||
int m_iRowLastCrossed;
|
||||
RandomSample m_soundAssistTick;
|
||||
|
||||
RageSoundStream m_soundMusic;
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#define PREVIEW_X THEME->GetMetricF("SelectStyle","PreviewX")
|
||||
#define PREVIEW_Y THEME->GetMetricF("SelectStyle","PreviewY")
|
||||
|
||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("Screens","SkipSelectDifficulty")
|
||||
#define SKIP_SELECT_DIFFICULTY THEME->GetMetricB("General","SkipSelectDifficulty")
|
||||
|
||||
const ScreenMessage SM_GoToPrevState = ScreenMessage(SM_User + 1);
|
||||
const ScreenMessage SM_GoToNextState = ScreenMessage(SM_User + 2);
|
||||
|
||||
@@ -45,22 +45,23 @@ const CString CHOICE_TEXT[ScreenTitleMenu::NUM_TITLE_MENU_CHOICES] = {
|
||||
"EXIT",
|
||||
};
|
||||
|
||||
#define CHOICES_X THEME->GetMetricF("TitleMenu","ChoicesX")
|
||||
#define CHOICES_START_Y THEME->GetMetricF("TitleMenu","ChoicesStartY")
|
||||
#define CHOICES_SPACING_Y THEME->GetMetricF("TitleMenu","ChoicesSpacingY")
|
||||
#define HELP_X THEME->GetMetricF("TitleMenu","HelpX")
|
||||
#define HELP_Y THEME->GetMetricF("TitleMenu","HelpY")
|
||||
#define LOGO_X THEME->GetMetricF("TitleMenu","LogoX")
|
||||
#define LOGO_Y THEME->GetMetricF("TitleMenu","LogoY")
|
||||
#define VERSION_X THEME->GetMetricF("TitleMenu","VersionX")
|
||||
#define VERSION_Y THEME->GetMetricF("TitleMenu","VersionY")
|
||||
#define SONGS_X THEME->GetMetricF("TitleMenu","SongsX")
|
||||
#define SONGS_Y THEME->GetMetricF("TitleMenu","SongsY")
|
||||
#define COLOR_NOT_SELECTED THEME->GetMetricC("TitleMenu","ColorNotSelected")
|
||||
#define COLOR_SELECTED THEME->GetMetricC("TitleMenu","ColorSelected")
|
||||
|
||||
#define USE_CAUTION_OR_SELECT_PLAYER THEME->GetMetricB("Screens","UseCautionOrSelectPlayer")
|
||||
#define CHOICES_X THEME->GetMetricF("TitleMenu","ChoicesX")
|
||||
#define CHOICES_START_Y THEME->GetMetricF("TitleMenu","ChoicesStartY")
|
||||
#define CHOICES_SPACING_Y THEME->GetMetricF("TitleMenu","ChoicesSpacingY")
|
||||
#define HELP_X THEME->GetMetricF("TitleMenu","HelpX")
|
||||
#define HELP_Y THEME->GetMetricF("TitleMenu","HelpY")
|
||||
#define LOGO_X THEME->GetMetricF("TitleMenu","LogoX")
|
||||
#define LOGO_Y THEME->GetMetricF("TitleMenu","LogoY")
|
||||
#define VERSION_X THEME->GetMetricF("TitleMenu","VersionX")
|
||||
#define VERSION_Y THEME->GetMetricF("TitleMenu","VersionY")
|
||||
#define SONGS_X THEME->GetMetricF("TitleMenu","SongsX")
|
||||
#define SONGS_Y THEME->GetMetricF("TitleMenu","SongsY")
|
||||
#define COLOR_NOT_SELECTED THEME->GetMetricC("TitleMenu","ColorNotSelected")
|
||||
#define COLOR_SELECTED THEME->GetMetricC("TitleMenu","ColorSelected")
|
||||
#define SECONDS_BEFORE_DEMONSTRATION THEME->GetMetricF("TitleMenu","SecondsBeforeDemonstration")
|
||||
#define SECONDS_BETWEEN_ATTRACT THEME->GetMetricF("TitleMenu","SecondsBetweenAttract")
|
||||
|
||||
#define USE_CAUTION_OR_SELECT_PLAYER THEME->GetMetricB("General","UseCautionOrSelectPlayer")
|
||||
|
||||
const ScreenMessage SM_PlayAttract = ScreenMessage(SM_User+1);
|
||||
const ScreenMessage SM_GoToNextScreen = ScreenMessage(SM_User+12);
|
||||
@@ -68,20 +69,32 @@ const ScreenMessage SM_FadeToDemonstration = ScreenMessage(SM_User+13);
|
||||
const ScreenMessage SM_GoToDemonstration = ScreenMessage(SM_User+14);
|
||||
|
||||
|
||||
const float SECONDS_BEFORE_DEMONSTRATION = 30;
|
||||
|
||||
|
||||
ScreenTitleMenu::ScreenTitleMenu()
|
||||
{
|
||||
MUSIC->Stop();
|
||||
LOG->Trace( "ScreenTitleMenu::ScreenTitleMenu()" );
|
||||
|
||||
|
||||
// reset game info
|
||||
//
|
||||
// I think it's better to do all the initialization here rather than have it scattered
|
||||
// about in all the global singleton classes
|
||||
//
|
||||
GAMESTATE->Reset();
|
||||
PREFSMAN->ReadGamePrefsFromDisk();
|
||||
INPUTMAPPER->ReadMappingsFromDisk();
|
||||
GAMESTATE->m_bPlayersCanJoin = true;
|
||||
if( !GAMEMAN->DoesNoteSkinExist( GAMEMAN->GetCurNoteSkin() ) )
|
||||
{
|
||||
CStringArray asNoteSkinNames;
|
||||
GAMEMAN->GetNoteSkinNames( asNoteSkinNames );
|
||||
GAMEMAN->SwitchNoteSkin( asNoteSkinNames[0] );
|
||||
}
|
||||
if( !THEME->DoesThemeExist( THEME->GetCurThemeName() ) )
|
||||
{
|
||||
CStringArray asThemeNames;
|
||||
THEME->GetThemeNamesForCurGame( asThemeNames );
|
||||
THEME->SwitchTheme( asThemeNames[0] );
|
||||
}
|
||||
|
||||
|
||||
m_sprBG.Load( THEME->GetPathTo("Graphics","title menu background") );
|
||||
@@ -155,8 +168,8 @@ ScreenTitleMenu::ScreenTitleMenu()
|
||||
|
||||
MUSIC->Stop();
|
||||
|
||||
for( i=12; i<SECONDS_BEFORE_DEMONSTRATION; i+=10 )
|
||||
this->SendScreenMessage( SM_PlayAttract, (float)i );
|
||||
for( float f=SECONDS_BETWEEN_ATTRACT; f<SECONDS_BEFORE_DEMONSTRATION; f+=SECONDS_BETWEEN_ATTRACT )
|
||||
this->SendScreenMessage( SM_PlayAttract, f );
|
||||
this->SendScreenMessage( SM_FadeToDemonstration, SECONDS_BEFORE_DEMONSTRATION );
|
||||
}
|
||||
|
||||
|
||||
+27
-1
@@ -22,7 +22,7 @@
|
||||
#include "RageException.h"
|
||||
|
||||
|
||||
const int FILE_CACHE_VERSION = 54; // increment this to force a cache reload (useful when the SM file format changes)
|
||||
const int FILE_CACHE_VERSION = 61; // increment this when Song or Notes changes to invalidate cache
|
||||
|
||||
|
||||
int CompareBPMSegments(const void *arg1, const void *arg2)
|
||||
@@ -948,6 +948,8 @@ bool Song::LoadFromKSFDir( CString sDir )
|
||||
// load the Notes from the rest of the KSF files
|
||||
for( int i=0; i<arrayKSFFileNames.GetSize(); i++ )
|
||||
{
|
||||
if( arrayKSFFileNames[i].Find("_2") != -1 )
|
||||
continue; // any "right-side" files should be loaded by Notes
|
||||
Notes* pNewNotes = new Notes;
|
||||
pNewNotes->LoadFromKSFFile( m_sSongDir + arrayKSFFileNames[i] );
|
||||
m_apNotes.Add( pNewNotes );
|
||||
@@ -982,6 +984,30 @@ bool Song::LoadFromKSFDir( CString sDir )
|
||||
{
|
||||
m_sMainTitle = asBits[0];
|
||||
}
|
||||
|
||||
for( int j=0; j<m_sMainTitle.GetLength(); j++ )
|
||||
{
|
||||
char c = m_sMainTitle[j];
|
||||
if( c < 0 ) // this title has a foreign char
|
||||
{
|
||||
CStringArray asBits;
|
||||
split( sDir, "\\", asBits, true);
|
||||
CString sSongFolderName = asBits[ asBits.GetSize()-1 ];
|
||||
asBits.RemoveAll();
|
||||
|
||||
split( sSongFolderName, " - ", asBits, false );
|
||||
if( asBits.GetSize() == 2 )
|
||||
{
|
||||
m_sArtist = asBits[0];
|
||||
m_sMainTitle = asBits[1];
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sMainTitle = asBits[0];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if( 0==stricmp(sValueName,"BPM") )
|
||||
|
||||
@@ -1259,9 +1259,5 @@ SOURCE=.\error.bmp
|
||||
|
||||
SOURCE=.\loading.bmp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\splash.bmp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
||||
Reference in New Issue
Block a user