support noteskin-changing attacks

cache trick icons
change AI probability format
This commit is contained in:
Chris Danford
2003-04-22 04:54:04 +00:00
parent 0e11d79ec8
commit 4b7d640324
22 changed files with 267 additions and 219 deletions
+27 -2
View File
@@ -35,6 +35,8 @@
#include "NoteFieldPositioning.h"
#include "LyricsLoader.h"
#include "ActorUtil.h"
#include "NoteSkinManager.h"
#include "RageTextureManager.h"
//
@@ -104,6 +106,30 @@ ScreenGameplay::ScreenGameplay( bool bDemonstration ) : Screen("ScreenGameplay")
GAMESTATE->m_CurStageStats = StageStats(); // clear values
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_BATTLE:
case PLAY_MODE_RAVE:
{
// cache NoteSkin graphics
CStringArray asNames;
NOTESKIN->GetNoteSkinNames( asNames );
for( unsigned i=0; i<asNames.size(); i++ )
{
CString sDir = NOTESKIN->GetNoteSkinDir( asNames[i] );
CStringArray asGraphicPaths;
GetDirListing( sDir+"*.png", asGraphicPaths, false, true );
GetDirListing( sDir+"*.jpg", asGraphicPaths, false, true );
GetDirListing( sDir+"*.gif", asGraphicPaths, false, true );
GetDirListing( sDir+"*.bmp", asGraphicPaths, false, true );
for( unsigned j=0; j<asGraphicPaths.size(); j++ )
TEXTUREMAN->CacheTexture( asGraphicPaths[j] );
}
}
break;
}
//
// fill in m_apSongsQueue, m_apNotesQueue, m_asModifiersQueue
@@ -563,8 +589,7 @@ void ScreenGameplay::LoadNextSong()
m_pScoreKeeper[p]->OnNextSong( GAMESTATE->GetCourseSongIndex(), GAMESTATE->m_pCurNotes[p] );
// Put courses options into effect.
GAMESTATE->m_PlayerOptions[p].FromString( m_asModifiersQueue[p][iPlaySongIndex] );
GAMESTATE->m_SongOptions.FromString( m_asModifiersQueue[p][iPlaySongIndex] );
GAMESTATE->ApplyModifiers( (PlayerNumber)p, m_asModifiersQueue[p][iPlaySongIndex] );
m_textPlayerOptions[p].SetText( GAMESTATE->m_PlayerOptions[p].GetString() );