fix MakeActor to handle .sprite, .model files
This commit is contained in:
@@ -30,24 +30,31 @@ Actor* MakeActor( CString sPath )
|
||||
sExt=="bmp" ||
|
||||
sExt=="avi" ||
|
||||
sExt=="mpeg" ||
|
||||
sExt=="mpg" )
|
||||
sExt=="mpg" ||
|
||||
sExt=="sprite" )
|
||||
{
|
||||
Sprite* pSprite = new Sprite;
|
||||
pSprite->Load( sPath );
|
||||
return pSprite;
|
||||
}
|
||||
if( sExt=="ini" )
|
||||
else if( sExt=="ini" )
|
||||
{
|
||||
BitmapText* pBitmapText = new BitmapText;
|
||||
pBitmapText->LoadFromFont( sPath );
|
||||
return pBitmapText;
|
||||
}
|
||||
if( sExt=="txt" )
|
||||
else if( sExt=="txt" )
|
||||
{
|
||||
Model* pModel = new Model;
|
||||
pModel->LoadMilkshapeAscii( sPath );
|
||||
return pModel;
|
||||
}
|
||||
else if( sExt=="model" )
|
||||
{
|
||||
Model* pModel = new Model;
|
||||
pModel->LoadFromModelFile( sPath );
|
||||
return pModel;
|
||||
}
|
||||
|
||||
ASSERT(0);
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user