]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
First step at cleaning image loading.
[lugaru.git] / Source / GameInitDispose.cpp
index b60f34da8fdf9dd301767e5301e0023df893bb2a..60727a73b66dc1e1910f65d4b32de6f097ea226a 100644 (file)
@@ -53,7 +53,7 @@ extern float multiplier;
 extern int netdatanew;
 extern float mapinfo;
 extern bool stillloading;
-extern TGAImageRec texture;
+extern ImageRec texture;
 extern short vRefNum;
 extern long dirID;
 extern int mainmenu;
@@ -170,14 +170,8 @@ void LoadSave(const char *fileName, GLuint *textureid, bool mipmap, GLubyte *arr
     float temptexdetail = texdetail;
     texdetail = 1;
 
-    // Converting file to something os specific
-    char * fixedFN = ConvertFileName(fileName);
-
-    //Load Image
-    unsigned char fileNamep[256];
-    CopyCStringToPascal(fixedFN, fileNamep);
     //Load Image
-    upload_image( fileNamep , 0);
+    upload_image(ConvertFileName(fileName));
     texdetail = temptexdetail;
 
     int bytesPerPixel = texture.bpp / 8;
@@ -484,26 +478,6 @@ extern bool cmdline(const char *cmd);
 
 void Game::InitGame()
 {
-#if PLATFORM_MACOSX
-    ProcessSerialNumber PSN;
-    ProcessInfoRec pinfo;
-    FSSpec pspec;
-    OSStatus err;
-    /* set up process serial number */
-    PSN.highLongOfPSN = 0;
-    PSN.lowLongOfPSN = kCurrentProcess;
-    /* set up info block */
-    pinfo.processInfoLength = sizeof(pinfo);
-    pinfo.processName = NULL;
-    pinfo.processAppSpec = &pspec;
-    /* grab the vrefnum and directory */
-    err = GetProcessInformation(&PSN, &pinfo);
-    if (err == noErr) {
-        vRefNum = pspec.vRefNum;
-        dirID = pspec.parID;
-    }
-#endif
-
     LOGFUNC;
 
     numchallengelevels = 14;