Erwan
- Fixed language loading (previously broken with primitives code)
This commit is contained in:
@@ -353,7 +353,10 @@ void GameStateMenu::Update(float dt)
|
||||
subMenuController->Update(dt);
|
||||
break;
|
||||
case MENU_STATE_MAJOR_LOADING_CARDS :
|
||||
if (primitivesLoadCounter == -1) listPrimitives();
|
||||
if (primitivesLoadCounter == -1){
|
||||
listPrimitives();
|
||||
Translator::GetInstance()->init();
|
||||
}
|
||||
if (primitivesLoadCounter < (int)(primitives.size())){
|
||||
mParent->collection->load(primitives[primitivesLoadCounter].c_str() );
|
||||
primitivesLoadCounter++;
|
||||
@@ -364,7 +367,6 @@ void GameStateMenu::Update(float dt)
|
||||
mParent->collection->load(mCurrentSetFileName, mCurrentSetName);
|
||||
}else{
|
||||
mReadConf = 1;
|
||||
Translator::GetInstance()->init();
|
||||
}
|
||||
if (!nextDirectory(RESPATH"/sets/","_cards.dat")){
|
||||
//Remove temporary translations
|
||||
|
||||
@@ -313,8 +313,8 @@ bool MTGAllCards::addCardToCollection(MTGCard * card, int setId){
|
||||
bool MTGAllCards::addPrimitive(CardPrimitive * primitive, MTGCard * card){
|
||||
string key;
|
||||
if (card) {
|
||||
std::stringstream ss;
|
||||
ss << card->getId();
|
||||
std::stringstream ss;
|
||||
ss << card->getId();
|
||||
ss >> key;
|
||||
}
|
||||
else key = primitive->name;
|
||||
@@ -334,6 +334,9 @@ bool MTGAllCards::addPrimitive(CardPrimitive * primitive, MTGCard * card){
|
||||
map<string,string>::iterator it = t->tempValues.find(primitive->name);
|
||||
if (it != t->tempValues.end()) {
|
||||
primitive->setText(it->second);
|
||||
}else if (primitive->text.size()){
|
||||
OutputDebugString(primitive->name.c_str());
|
||||
OutputDebugString("\n");
|
||||
}
|
||||
primitives[key] = primitive;
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user