From 5c7a8f4e20e5816c3aded019ad55609581866e38 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=B4me=20BERNIGAUD?= Date: Fri, 13 May 2011 18:58:19 +0200 Subject: [PATCH] bugfix (world texture was messed when fullscreen/windowed switch) and cleanups --- Source/GameDraw.cpp | 7 +++---- Source/GameInitDispose.cpp | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index c1fb553..b4f6ee7 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -2024,9 +2024,9 @@ void Game::LoadCampaign() { if(!Mainmenuitems[7]) { ifstream test(ConvertFileName((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str())); if(test.good()) { - LoadTexture((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str(),&Mainmenuitems[7],0,0); + LoadTextureData((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str(),&Mainmenuitems[7],0,0); } else { - LoadTexture(":Data:Textures:World.png",&Mainmenuitems[7],0,0); + LoadTextureData(":Data:Textures:World.png",&Mainmenuitems[7],0,0); } } ifstream ipstream(ConvertFileName((":Data:Campaigns:"+accountactive->getCurrentCampaign()+".txt").c_str())); @@ -2087,8 +2087,7 @@ void Game::LoadCampaign() { } } -void Game::DrawMenu() -{ +void Game::DrawMenu() { int i,j; static float lastcheck; diff --git a/Source/GameInitDispose.cpp b/Source/GameInitDispose.cpp index b9d5913..7edf75d 100644 --- a/Source/GameInitDispose.cpp +++ b/Source/GameInitDispose.cpp @@ -135,12 +135,12 @@ void Game::Dispose() } -void Game::LoadTexture(const char *fileName, GLuint *textureid,int mipmap, bool hasalpha){ +void Game::LoadTexture(const char *fileName, GLuint *textureid,int mipmap, bool hasalpha) { textures.push_back(TextureInfo(fileName,textureid,mipmap,hasalpha)); textures.back().load(); } -void Game::LoadTextureSave(const char *fileName, GLuint *textureid,int mipmap,GLubyte *array, int *skinsize){ +void Game::LoadTextureSave(const char *fileName, GLuint *textureid,int mipmap,GLubyte *array, int *skinsize) { textures.push_back(TextureInfo(fileName,textureid,mipmap,array,skinsize)); textures.back().load(); } -- 2.39.5