preload character icons
This commit is contained in:
@@ -2,10 +2,13 @@
|
|||||||
#include "Character.h"
|
#include "Character.h"
|
||||||
#include "IniFile.h"
|
#include "IniFile.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
#include "RageTextureID.h"
|
||||||
|
|
||||||
|
|
||||||
bool Character::Load( CString sCharDir )
|
bool Character::Load( CString sCharDir )
|
||||||
{
|
{
|
||||||
|
m_Preload.UnloadAll();
|
||||||
|
|
||||||
// Save character directory
|
// Save character directory
|
||||||
if( sCharDir.Right(1) != "/" )
|
if( sCharDir.Right(1) != "/" )
|
||||||
sCharDir += "/";
|
sCharDir += "/";
|
||||||
@@ -33,6 +36,10 @@ bool Character::Load( CString sCharDir )
|
|||||||
// get display name (if any)
|
// get display name (if any)
|
||||||
ini.GetValue( "Character", "DisplayName", m_sDisplayName );
|
ini.GetValue( "Character", "DisplayName", m_sDisplayName );
|
||||||
|
|
||||||
|
CString sIconPath = GetIconPath();
|
||||||
|
if( !sIconPath.empty() )
|
||||||
|
m_Preload.Load( sIconPath );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#define Character_H
|
#define Character_H
|
||||||
|
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "RageTexturePreloader.h"
|
||||||
struct lua_State;
|
struct lua_State;
|
||||||
typedef lua_State Lua;
|
typedef lua_State Lua;
|
||||||
|
|
||||||
@@ -51,6 +52,7 @@ public:
|
|||||||
bool m_bUsableInRave;
|
bool m_bUsableInRave;
|
||||||
|
|
||||||
CString m_sAttacks[NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL];
|
CString m_sAttacks[NUM_ATTACK_LEVELS][NUM_ATTACKS_PER_LEVEL];
|
||||||
|
RageTexturePreloader m_Preload;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user