add Character InitCommand (useful for scaling characters)

This commit is contained in:
Chris Danford
2006-11-05 04:58:33 +00:00
parent a55c69dc6e
commit ea2581fa4e
3 changed files with 12 additions and 2 deletions
+7 -1
View File
@@ -3,6 +3,7 @@
#include "IniFile.h"
#include "RageUtil.h"
#include "RageTextureID.h"
#include "ActorUtil.h"
Character::Character()
{
@@ -58,8 +59,13 @@ bool Character::Load( RString sCharDir )
ini.GetValue( "Character", ssprintf("Level%dAttack%d",i+1,j+1), m_sAttacks[i][j] );
}
// get display name (if any)
// get optional display name
ini.GetValue( "Character", "DisplayName", m_sDisplayName );
// get optional InitCommand
RString s;
ini.GetValue( "Character", "InitCommand", s );
m_cmdInit = ActorUtil::ParseActorCommands( s );
return true;
}
+2
View File
@@ -54,6 +54,8 @@ private:
public:
apActorCommands m_cmdInit;
// All the stuff below will be filled in if this character is playable in Rave mode
bool m_bUsableInRave;
+3 -1
View File
@@ -117,7 +117,7 @@ DancingCharacters::DancingCharacters()
m_pCharacter[p]->SetX( MODEL_X_TWO_PLAYERS[p] );
else
m_pCharacter[p]->SetX( MODEL_X_ONE_PLAYER );
switch( GAMESTATE->m_PlayMode )
{
case PLAY_MODE_BATTLE:
@@ -131,6 +131,8 @@ DancingCharacters::DancingCharacters()
m_pCharacter[p]->LoadMilkshapeAsciiBones( "warmup", pChar->GetWarmUpAnimationPath() );
m_pCharacter[p]->LoadMilkshapeAsciiBones( "dance", pChar->GetDanceAnimationPath() );
m_pCharacter[p]->SetCullMode( CULL_NONE ); // many of the models floating around have the vertex order flipped
m_pCharacter[p]->RunCommands( pChar->m_cmdInit );
}
}