]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
Moved clothes loop to Person, got rid of globals tintr,tintg,tintb
[lugaru.git] / Source / GameInitDispose.cpp
index 0ce61eeb704cbb2a8a4faa017e86e406dc96d2b0..05c7e196fbdfd38d549e7231a98d97394d8bf46b 100644 (file)
@@ -52,7 +52,6 @@ extern float multiplier;
 extern int netdatanew;
 extern float mapinfo;
 extern bool stillloading;
-extern ImageRec texture;
 extern short vRefNum;
 extern long dirID;
 extern int mainmenu;
@@ -62,7 +61,6 @@ extern int flashdelay;
 extern int whichjointstartarray[26];
 extern int whichjointendarray[26];
 extern int difficulty;
-extern float tintr, tintg, tintb;
 extern float slomospeed;
 extern bool gamestarted;
 
@@ -120,10 +118,6 @@ void Dispose()
     }
 
     OPENAL_Close();
-    if (texture.data) {
-        free(texture.data);
-    }
-    texture.data = 0;
 #endif
 }
 
@@ -170,7 +164,8 @@ void LoadSave(const char *fileName, GLuint *textureid, bool mipmap, GLubyte *arr
     texdetail = 1;
 
     //Load Image
-    upload_image(ConvertFileName(fileName));
+    ImageRec texture;
+    load_image(ConvertFileName(fileName), texture);
     texdetail = temptexdetail;
 
     int bytesPerPixel = texture.bpp / 8;
@@ -483,10 +478,6 @@ void Game::InitGame()
 
     accountactive = Account::loadFile(":Data:Users");
 
-    tintr = 1;
-    tintg = 1;
-    tintb = 1;
-
     whichjointstartarray[0] = righthip;
     whichjointendarray[0] = rightfoot;
 
@@ -569,8 +560,6 @@ void Game::InitGame()
 
     stillloading = 1;
 
-    texture.data = ( GLubyte* )malloc( 1024 * 1024 * 4 );
-
     int temptexdetail = texdetail;
     texdetail = 1;
     text->LoadFontTexture(":Data:Textures:Font.png");