diff --git a/BattleGame/Game.cpp b/BattleGame/Game.cpp index 0c4dc7e..e3e0c98 100644 --- a/BattleGame/Game.cpp +++ b/BattleGame/Game.cpp @@ -24,6 +24,8 @@ void InitStringEngine() while (fscanf(fp, "%s%*c", tagbuff) == 1) { fgets(content, 1024, fp); + int sz = strlen(content); + if (content[sz - 1] == '\n') content[sz - 1] = 0; strvec.push_back(make_pair(tagbuff, content)); } fclose(fp); @@ -60,14 +62,6 @@ void GameMain() InitUnitData(); global.frame->run(new MapEditorScene); - - xml_document<> doc; - xml_node<>* rootnode = doc.allocate_node(node_type::node_element, "en_US"); - doc.append_node(rootnode); - rootnode->append_node(doc.allocate_node(node_type::node_element, "Fuck", "Fuck XML")); - std::string s; - print(std::back_inserter(s), doc); - printf("%s\n", s.c_str()); } diff --git a/BattleGame/MapEditor.cpp b/BattleGame/MapEditor.cpp index c3980de..71aa933 100644 --- a/BattleGame/MapEditor.cpp +++ b/BattleGame/MapEditor.cpp @@ -58,7 +58,7 @@ void MapEditorMapSizeConfigureScene::start(void* ptr) shared_ptr pReturnButton(new MapEditorMapSizeConfigureSceneReturnButton); pReturnButton->text = text_a2; - pReturnButton->pos = Rect(winSize.w / 2 - text_a1.getw()/2, winSize.h / 2 + 20, text_a1.getw(), 20); + pReturnButton->pos = Rect(winSize.w / 2 - text_a2.getw()/2, winSize.h / 2 + 20, text_a2.getw(), 20); btna.addButton(pReturnButton.get()); lp.run();