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