This commit is contained in:
Colby Klein
2011-03-16 00:27:10 -07:00
9 changed files with 117 additions and 42 deletions
+36 -7
View File
@@ -42,10 +42,10 @@
<Function name='GamePrefAutoSetStyle'/>
<Function name='GamePrefComboOnRolls'/>
<Function name='GamePrefComboUnderField'/>
<Function name='GamePrefDefaultFail'/>
<Function name='GamePrefNotePosition'/>
<Function name='GetCoursesToShowRanking'/>
<Function name='GetCustomDifficulty'/>
<Function name='GetDefaultArrowSpacing'/>
<Function name='GetDefaultOptionLines'/>
<Function name='GetDirectRadar'/>
<Function name='GetEditModeSubScreens'/>
@@ -177,11 +177,11 @@
<Function name='TrailToCustomDifficulty'/>
<Function name='URLEncode'/>
<Function name='UnlockRewardTypeToLocalizedString'/>
<Function name='UserPrefAdjustSpeed'/>
<Function name='UserPrefAutoSetStyle'/>
<Function name='UserPrefComboOnRolls'/>
<Function name='UserPrefComboUnderField'/>
<Function name='UserPrefFlashyCombo'/>
<Function name='UserPrefGameplayFooter'/>
<Function name='UserPrefGameplayShowScore'/>
<Function name='UserPrefGameplayShowStepsDisplay'/>
<Function name='UserPrefLongFail'/>
@@ -672,6 +672,7 @@
<Function name='AnyPlayerHasRankingFeats'/>
<Function name='ApplyGameCommand'/>
<Function name='ClearStageModifiersIllegalForCourse'/>
<Function name='Dopefish'/>
<Function name='EnoughCreditsToJoin'/>
<Function name='Env'/>
<Function name='GetCharacter'/>
@@ -801,6 +802,10 @@
<Class base='ActorFrame' name='HoldJudgment'>
<Function name='LoadFromMultiPlayer'/>
</Class>
<Class name='InputFilter'>
<Function name='GetMouseX'/>
<Function name='GetMouseY'/>
</Class>
<Class base='ActorFrame' name='LifeMeter'>
<Function name='GetLife'/>
<Function name='IsFailing'/>
@@ -826,6 +831,9 @@
<Class name='MessageManager'>
<Function name='Broadcast'/>
</Class>
<Class base='ActorFrame' name='MeterDisplay'>
<Function name='SetStreamWidth'/>
</Class>
<Class base='ActorFrame' name='ModIconRow'>
<Function name='Load'/>
</Class>
@@ -856,9 +864,11 @@
<Class base='ActorFrame' name='OptionRow'>
<Function name='FirstItemGoesDown'/>
<Function name='GetChoiceInRowWithFocus'/>
<Function name='GetLayoutType'/>
<Function name='GetName'/>
<Function name='GetNumChoices'/>
<Function name='GetRowTitle'/>
<Function name='GetSelectType'/>
<Function name='HasFocus'/>
<Function name='OneChoiceForAllPlayers'/>
</Class>
@@ -876,6 +886,9 @@
<Function name='GetLifeMeter'/>
<Function name='GetStepsQueueWrapped'/>
</Class>
<Class name='PlayerOptions'>
<Function name='GetNoteSkin'/>
</Class>
<Class name='PlayerStageStats'>
<Function name='FullCombo'/>
<Function name='FullComboOfScore'/>
@@ -917,6 +930,7 @@
<Function name='GetPlayerNumber'/>
<Function name='GetPlayerOptions'/>
<Function name='GetPlayerOptionsArray'/>
<Function name='GetPlayerOptionsString'/>
<Function name='SetPlayerOptions'/>
</Class>
<Class name='PrefsManager'>
@@ -1100,6 +1114,7 @@
</Class>
<Class base='ScreenWithMenuElements' name='ScreenSelectMusic'>
<Function name='GetGoToOptions'/>
<Function name='GetMusicWheel'/>
<Function name='setupcoursestagemods'/>
<Function name='setupmusicstagemods'/>
</Class>
@@ -1245,6 +1260,7 @@
</Class>
<Class name='Steps'>
<Function name='GetAuthorCredit'/>
<Function name='GetChartStyle'/>
<Function name='GetDescription'/>
<Function name='GetDifficulty'/>
<Function name='GetFilename'/>
@@ -1353,6 +1369,8 @@
<Function name='UnlockEntryIndex'/>
</Class>
<Class base='ActorFrame' name='WheelBase'>
<Function name='GetCurrentIndex'/>
<Function name='GetNumItems'/>
<Function name='GetWheelItem'/>
<Function name='IsLocked'/>
<Function name='IsSettled'/>
@@ -1583,6 +1601,10 @@
<EnumValue name='&apos;JudgmentLine_Held&apos;' value='6'/>
<EnumValue name='&apos;JudgmentLine_MaxCombo&apos;' value='7'/>
</Enum>
<Enum name='LayoutType'>
<EnumValue name='&apos;LayoutType_ShowAllInRow&apos;' value='0'/>
<EnumValue name='&apos;LayoutType_ShowOneInRow&apos;' value='1'/>
</Enum>
<Enum name='LightsMode'>
<EnumValue name='&apos;LightsMode_Attract&apos;' value='0'/>
<EnumValue name='&apos;LightsMode_Joining&apos;' value='1'/>
@@ -1696,9 +1718,10 @@
<EnumValue name='&apos;PaneCategory_Mines&apos;' value='4'/>
<EnumValue name='&apos;PaneCategory_Hands&apos;' value='5'/>
<EnumValue name='&apos;PaneCategory_Lifts&apos;' value='6'/>
<EnumValue name='&apos;PaneCategory_MachineHighScore&apos;' value='7'/>
<EnumValue name='&apos;PaneCategory_MachineHighName&apos;' value='8'/>
<EnumValue name='&apos;PaneCategory_ProfileHighScore&apos;' value='9'/>
<EnumValue name='&apos;PaneCategory_Fakes&apos;' value='7'/>
<EnumValue name='&apos;PaneCategory_MachineHighScore&apos;' value='8'/>
<EnumValue name='&apos;PaneCategory_MachineHighName&apos;' value='9'/>
<EnumValue name='&apos;PaneCategory_ProfileHighScore&apos;' value='10'/>
</Enum>
<Enum name='PeakComboAward'>
<EnumValue name='&apos;PeakComboAward_1000&apos;' value='0'/>
@@ -1752,6 +1775,7 @@
<EnumValue name='&apos;RadarCategory_Hands&apos;' value='9'/>
<EnumValue name='&apos;RadarCategory_Rolls&apos;' value='10'/>
<EnumValue name='&apos;RadarCategory_Lifts&apos;' value='11'/>
<EnumValue name='&apos;RadarCategory_Fakes&apos;' value='12'/>
</Enum>
<Enum name='RandomBackgroundMode'>
<EnumValue name='&apos;RandomBackgroundMode_Off&apos;' value='0'/>
@@ -1779,6 +1803,11 @@
<EnumValue name='&apos;ScreenType_Gameplay&apos;' value='2'/>
<EnumValue name='&apos;ScreenType_SystemMenu&apos;' value='3'/>
</Enum>
<Enum name='SelectType'>
<EnumValue name='&apos;SelectType_SelectOne&apos;' value='0'/>
<EnumValue name='&apos;SelectType_SelectMultiple&apos;' value='1'/>
<EnumValue name='&apos;SelectType_SelectNone&apos;' value='2'/>
</Enum>
<Enum name='ShowDancingCharacters'>
<EnumValue name='&apos;ShowDancingCharacters_Off&apos;' value='0'/>
<EnumValue name='&apos;ShowDancingCharacters_Random&apos;' value='1'/>
@@ -1963,6 +1992,6 @@
<Constant name='sGame' value='&apos;dance&apos;'/>
<Constant name='top' value='&apos;VertAlign_Top&apos;'/>
</Constants>
<Version>sm-ssc v1.2.2</Version>
<Date>2011-02-21</Date>
<Version>sm-ssc v1.2.3</Version>
<Date>2011-03-15</Date>
</Lua>
+43 -6
View File
@@ -1526,6 +1526,9 @@
<Function name='EnoughCreditsToJoin' return='bool' arguments=''>
Returns <code>true</code> if enough credits have been inserted to join.
</Function>
<Function name='Dopefish' sm-ssc='true' return='bool' arguments=''>
fishpolk.mid; See also: Rise of the Triad
</Function>
<Function name='Env' return='table' arguments=''>
Returns the environment table. See <Link class='GameCommand' />.
</Function>
@@ -1898,6 +1901,14 @@
Loads the HoldJudgment for the specified MultiPlayer.
</Function>
</Class>
<Class name='InputFilter'>
<Function name='GetMouseX' sm-ssc='true' return='float' arguments=''>
Returns the X position of the mouse.
</Function>
<Function name='GetMouseY' sm-ssc='true' return='float' arguments=''>
Returns the Y position of the mouse.
</Function>
</Class>
<Class name='LifeMeter'>
<Function name='GetLife' return='float' arguments=''>
Returns the amount of life left in the LifeMeter as a float in the range 0..1.
@@ -1964,7 +1975,7 @@
</Class>
<Class name='MeterDisplay'>
<Function name='SetStreamWidth' return='void' arguments='float fWidth'>
Sets the width of the MeterDisplay to <code>fWidth</code>.
</Function>
</Class>
<Class name='Model'>
@@ -2045,6 +2056,9 @@
<Function name='GetChoiceInRowWithFocus' sm-ssc='true' return='int' arguments='PlayerNumber pn'>
Returns an index of the choice in the row that player <code>pn</code> is on.
</Function>
<Function name='GetLayoutType' sm-ssc='true' return='LayoutType' arguments=''>
Returns the OptionRow's layout type.
</Function>
<Function name='GetName' sm-ssc='true' return='string' arguments=''>
Returns the name of the OptionRow.
</Function>
@@ -2054,6 +2068,9 @@
<Function name='GetRowTitle' sm-ssc='true' return='string' arguments=''>
Returns the row title string.
</Function>
<Function name='GetSelectType' sm-ssc='true' return='SelectType' arguments=''>
Returns the OptionRow's select type.
</Function>
<Function name='HasFocus' sm-ssc='true' return='bool' arguments='PlayerNumber pn'>
Returns <code>true</code> if this row is focused by player <code>pn</code>.
</Function>
@@ -2080,6 +2097,11 @@
</Function>
</Class>
<Class name='PlayerOptions'>
<Function name='GetNoteSkin' sm-ssc='true' return='string' arguments=''>
Returns the current NoteSkin set in the PlayerOptions.
</Function>
</Class>
<Class name='PlayerStageStats'>
<Function name='FullCombo' return='bool' arguments=''>
Returns <code>true</code> if a full combo (TNS_W3 and up) was obtained.
@@ -2208,8 +2230,11 @@
<Function name='GetPlayerNumber' return='PlayerNumber' arguments=''>
Returns the player number for this PlayerState.
</Function>
<Function name='GetPlayerOptions' return='string' arguments='ModsLevel ml'>
Returns a string of player options for the specified ModsLevel.
<Function name='GetPlayerOptions' renamed='true' return='PlayerOptions' arguments='ModsLevel ml'>
Returns a PlayerOptions object for the specified ModsLevel.
</Function>
<Function name='GetPlayerOptionsString' sm-ssc='true' return='string' arguments='ModsLevel ml'>
Returns a string of player options for the specified ModsLevel. (was GetPlayerOptions in v1.2.2 and prior)
</Function>
<Function name='GetPlayerOptionsArray' return='{string}' arguments='ModsLevel ml'>
Returns a table of strings, containing the player options for the specified ModsLevel.
@@ -2667,6 +2692,9 @@
<Function name='GetGoToOptions' return='bool' arguments=''>
Returns <code>true</code> if the player is going to the options screen.
</Function>
<Function name='GetMusicWheel' sm-ssc='true' return='MusicWheel' arguments=''>
Returns the MusicWheel used on this screen.
</Function>
<Function name='setupcoursestagemods' theme='_fallback' return='void' arguments=''>
[02 StageMods.lua] Sets up modifiers for course modes.
</Function>
@@ -3059,12 +3087,15 @@
</Function>
</Class>
<Class name='Steps'>
<Function name='GetDescription' return='string' arguments=''>
Returns the Steps description.
</Function>
<Function name='GetAuthorCredit' return='string' arguments=''>
Returns the author that made that particular Steps pattern.
</Function>
<Function name='GetChartStyle' sm-ssc='true' return='string' arguments=''>
Returns the Chart Style for this Steps.
</Function>
<Function name='GetDescription' return='string' arguments=''>
Returns the Steps description.
</Function>
<Function name='GetDifficulty' return='Difficulty' arguments=''>
Returns the Steps difficulty.
</Function>
@@ -3342,6 +3373,12 @@
</Function>
</Class>
<Class name='WheelBase'>
<Function name='GetCurrentIndex' sm-ssc='true' return='int' arguments=''>
Returns the wheel's current index.
</Function>
<Function name='GetNumItems' sm-ssc='true' return='int' arguments=''>
Returns the total number of items in the wheel.
</Function>
<Function name='GetWheelItem' return='WheelItemBaseData' arguments='int iIndex'>
Returns the WheelItem at index <code>iIndex</code>.
</Function>
-1
View File
@@ -728,7 +728,6 @@ void Font::Load( const RString &sIniPath, RString sChars )
Font subfont;
subfont.Load(fPath,"");
MergeFont(subfont);
//FONT->UnloadFont(subfont);
}
}
+14 -8
View File
@@ -22,7 +22,7 @@ FontManager::~FontManager()
{
const FontName &fn = i->first;
Font* pFont = i->second;
if(pFont->m_iRefCount>0) {
if(pFont->m_iRefCount > 0) {
LOG->Trace( "FONT LEAK: '%s', RefCount = %d.", fn.first.c_str(), pFont->m_iRefCount );
}
delete pFont;
@@ -53,14 +53,13 @@ Font* FontManager::LoadFont( const RString &sFontOrTextureFilePath, RString sCha
{
pFont=p->second;
pFont->m_iRefCount++;
}
else {
pFont= new Font;
pFont->Load(sFontOrTextureFilePath, sChars);
g_mapPathToFont[NewName] = pFont;
return pFont;
}
return pFont;
Font *f = new Font;
f->Load(sFontOrTextureFilePath, sChars);
g_mapPathToFont[NewName] = f;
return f;
}
Font *FontManager::CopyFont( Font *pFont )
@@ -79,16 +78,22 @@ void FontManager::UnloadFont( Font *fp )
if(i->second != fp)
continue;
ASSERT_M(fp->m_iRefCount>0,"Attempting to unload a font with zero ref count!");
ASSERT_M(fp->m_iRefCount > 0,"Attempting to unload a font with zero ref count!");
i->second->m_iRefCount--;
if( fp->m_iRefCount == 0 )
{
delete i->second; // free the texture
g_mapPathToFont.erase( i ); // and remove the key in the map
}
return;
}
FAIL_M( ssprintf("Unloaded an unknown font (%p)", fp) );
}
/*
void FontManager::PruneFonts() {
for( std::map<FontName, Font*>::iterator i = g_mapPathToFont.begin();i != g_mapPathToFont.end();) {
Font *fp=i->second;
@@ -101,6 +106,7 @@ void FontManager::PruneFonts() {
}
}
}
*/
/*
* (c) 2001-2003 Chris Danford, Glenn Maynard
+1 -1
View File
@@ -15,7 +15,7 @@ public:
Font* LoadFont( const RString &sFontOrTextureFilePath, RString sChars = "" );
Font *CopyFont( Font *pFont );
void UnloadFont( Font *fp );
void PruneFonts();
//void PruneFonts();
/* Warning: This reloads fonts completely, so all BitmapTexts need to be
* reset, too. If this isn't done, best case they end up with old font
+1 -1
View File
@@ -786,7 +786,7 @@ static void ReadGlobalTags( const NameToData_t &mapNameToData, Song &out, Measur
LOG->UserLog( "Song file", out.GetSongDir(), "references key \"%s\" that can't be found", nData.c_str() );
sWavID.MakeUpper(); // HACK: undo the MakeLower()
out.m_vsKeysoundFile.push_back( sData );
out.m_vsKeysoundFile.push_back( nData );
idToKeySoundIndexOut[ sWavID ] = out.m_vsKeysoundFile.size()-1;
LOG->Trace( "Inserting keysound index %u '%s'", unsigned(out.m_vsKeysoundFile.size()-1), sWavID.c_str() );
}
-3
View File
@@ -155,9 +155,6 @@ RString DeviceButtonToString( DeviceButton key )
if( key >= MIDI_FIRST && key <= MIDI_LAST )
return ssprintf( "Midi %d", key-MIDI_FIRST );
if( key >= MOUSE_LEFT && key <= MOUSE_WHEELDOWN )
return ssprintf( "Mouse %d", key-MOUSE_LEFT );
map<DeviceButton,RString>::const_iterator it = g_mapNamesToString.find( key );
if( it != g_mapNamesToString.end() )
return it->second;
+1 -1
View File
@@ -321,7 +321,7 @@ public:
/* Whether this button is pressed. This is level with a threshold and
* debouncing applied. */
bool bDown;
RageTimer ts;
DeviceInput(): device(InputDevice_Invalid), button(DeviceButton_Invalid), level(0), x(0), y(0), bDown(false), ts(RageZeroTimer) { }
+21 -14
View File
@@ -76,7 +76,7 @@
ScreenManager* SCREENMAN = NULL; // global and accessable from anywhere in our program
static Preference<bool> g_bDelayedScreenLoad( "DelayedScreenLoad", false );
static Preference<bool> g_bPruneFonts( "PruneFonts", true );
//static Preference<bool> g_bPruneFonts( "PruneFonts", true );
// Screen registration
static map<RString,CreateScreenFn> *g_pmapRegistrees = NULL;
@@ -592,9 +592,11 @@ void ScreenManager::PrepareScreen( const RString &sScreenName )
}
// Prune any unused fonts now that we have had a chance to reference the fonts
/*
if(g_bPruneFonts) {
FONT->PruneFonts();
}
*/
TEXTUREMAN->DiagnosticOutput();
}
@@ -690,17 +692,19 @@ void ScreenManager::LoadDelayedScreen()
* cleanup, so it doesn't get deleted by cleanup. */
bool bLoaded = ActivatePreparedScreenAndBackground( sScreenName );
bool deletePrepared=g_setGroupedScreens.find(sScreenName) == g_setGroupedScreens.end();
/* It's time to delete all old prepared screens. Depending on DelayedScreenLoad,
* we can either delete the screens before or after we load the new screen.
* Either way, we must remove them from the prepared list before we prepare
* new screens.
* If DelayedScreenLoad is true, delete them now; this lowers memory
* requirements, but results in redundant loads as we unload common data. */
if( deletePrepared && g_bDelayedScreenLoad ) {
DeletePreparedScreens();
deletePrepared=false;
vector<Actor*> apActorsToDelete;
if( g_setGroupedScreens.find(sScreenName) == g_setGroupedScreens.end() )
{
/* It's time to delete all old prepared screens. Depending on
* DelayedScreenLoad, we can either delete the screens before or after
* we load the new screen. Either way, we must remove them from the
* prepared list before we prepare new screens.
* If DelayedScreenLoad is true, delete them now; this lowers memory
* requirements, but results in redundant loads as we unload common data. */
if( g_bDelayedScreenLoad )
DeletePreparedScreens();
else
GrabPreparedActors( apActorsToDelete );
}
// If the screen wasn't already prepared, load it.
@@ -717,9 +721,12 @@ void ScreenManager::LoadDelayedScreen()
ASSERT( bLoaded );
}
if( deletePrepared )
if( !apActorsToDelete.empty() )
{
DeletePreparedScreens();
BeforeDeleteScreen();
FOREACH( Actor*, apActorsToDelete, a )
SAFE_DELETE( *a );
AfterDeleteScreen();
}
MESSAGEMAN->Broadcast( Message_ScreenChanged );