diff --git a/source/glest_game/facilities/game_util.cpp b/source/glest_game/facilities/game_util.cpp index 3a0c85bf4..bb9115f9f 100644 --- a/source/glest_game/facilities/game_util.cpp +++ b/source/glest_game/facilities/game_util.cpp @@ -26,7 +26,7 @@ using namespace Shared::Platform; namespace Glest{ namespace Game{ const string mailString= "contact_game@glest.org"; -const string glestVersionString= "v3.3.5-beta12"; +const string glestVersionString= "v3.3.5-beta13"; string getCrashDumpFileName(){ return "glest" + glestVersionString + ".dmp"; diff --git a/source/glest_game/graphics/renderer.cpp b/source/glest_game/graphics/renderer.cpp index 74b4d0a77..fcbfd0271 100644 --- a/source/glest_game/graphics/renderer.cpp +++ b/source/glest_game/graphics/renderer.cpp @@ -458,7 +458,7 @@ void Renderer::renderParticleManager(ResourceScope rs){ } void Renderer::swapBuffers(){ - glFlush(); + //glFlush(); // should not be required - http://www.opengl.org/wiki/Common_Mistakes GraphicsInterface::getInstance().getCurrentContext()->swapBuffers(); } diff --git a/source/glest_game/main/battle_end.cpp b/source/glest_game/main/battle_end.cpp index be73b70a5..5960447d8 100644 --- a/source/glest_game/main/battle_end.cpp +++ b/source/glest_game/main/battle_end.cpp @@ -106,10 +106,10 @@ void BattleEnd::render(){ Vec3f color = stats.getPlayerColor(i); if(stats.getPlayerName(i) != "") { - textRenderer->render(stats.getPlayerName(i).c_str(), textX, bm+400, false, color); + textRenderer->render(stats.getPlayerName(i).c_str(), textX, bm+400, false, &color); } else { - textRenderer->render((lang.get("Player")+" "+intToStr(i+1)).c_str(), textX, bm+400,false, color); + textRenderer->render((lang.get("Player")+" "+intToStr(i+1)).c_str(), textX, bm+400,false, &color); } textRenderer->render(stats.getVictory(i)? lang.get("Victory").c_str(): lang.get("Defeat").c_str(), textX, bm+360); textRenderer->render(controlString, textX, bm+320); diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index fe3c7cd58..a7e1542fa 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -1147,6 +1147,7 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings) { // First save Used slots //for(int i=0; i(listBoxControls[i].getSelectedItemIndex()); if(ct != ctClosed) { @@ -1173,7 +1174,8 @@ void MenuStateCustomGame::loadGameSettings(GameSettings *gameSettings) { gameSettings->setNetworkPlayerName(slotIndex, Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str())); } else { - gameSettings->setNetworkPlayerName(slotIndex, "Closed"); + AIPlayerCount++; + gameSettings->setNetworkPlayerName(slotIndex, string("AI") + intToStr(AIPlayerCount)); } factionCount++; diff --git a/source/shared_lib/include/graphics/gl/text_renderer_gl.h b/source/shared_lib/include/graphics/gl/text_renderer_gl.h index 2dafb1b3d..55c072201 100644 --- a/source/shared_lib/include/graphics/gl/text_renderer_gl.h +++ b/source/shared_lib/include/graphics/gl/text_renderer_gl.h @@ -32,7 +32,7 @@ public: TextRenderer2DGl(); virtual void begin(const Font2D *font); - virtual void render(const string &text, int x, int y, bool centered, Vec3f color); + virtual void render(const string &text, int x, int y, bool centered, Vec3f *color=NULL); virtual void end(); }; diff --git a/source/shared_lib/include/graphics/text_renderer.h b/source/shared_lib/include/graphics/text_renderer.h index 8b4c4780f..ef7870a25 100644 --- a/source/shared_lib/include/graphics/text_renderer.h +++ b/source/shared_lib/include/graphics/text_renderer.h @@ -30,7 +30,7 @@ public: virtual ~TextRenderer2D(){}; virtual void begin(const Font2D *font)= 0; - virtual void render(const string &text, int x, int y, bool centered= false,Vec3f color=Vec3f(-1.0))= 0; + virtual void render(const string &text, int x, int y, bool centered= false,Vec3f *color=NULL)= 0; virtual void end()= 0; }; diff --git a/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp b/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp index 61b1897ea..9e3105a3a 100644 --- a/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp +++ b/source/shared_lib/sources/graphics/gl/text_renderer_gl.cpp @@ -32,14 +32,14 @@ void TextRenderer2DGl::begin(const Font2D *font){ this->font= static_cast(font); } -void TextRenderer2DGl::render(const string &text, int x, int y, bool centered, Vec3f color) { +void TextRenderer2DGl::render(const string &text, int x, int y, bool centered, Vec3f *color) { assert(rendering); assertGl(); - if(color.x >= 0) { + if(color != NULL) { glPushAttrib(GL_CURRENT_BIT); - glColor3fv(color.ptr()); + glColor3fv(color->ptr()); } int line=0; @@ -73,7 +73,7 @@ void TextRenderer2DGl::render(const string &text, int x, int y, bool centered, V } } - if(color.x >= 0) { + if(color != NULL) { glPopAttrib(); } assertGl();