]> git.jsancho.org Git - lugaru.git/blobdiff - Source/TGALoader.cpp
First step at cleaning image loading.
[lugaru.git] / Source / TGALoader.cpp
index c9796b528b34ba8cce8953c774c6e71feef16f08..45bde23d592c4c60d1117befa13372afa9182d57 100644 (file)
@@ -21,21 +21,11 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 #include "Game.h"
 #include "TGALoader.h"
 
-extern float texdetail;
-extern TGAImageRec texture;
-extern short vRefNum;
-extern long dirID;
-extern bool visibleloading;
-
-extern bool LoadImage(const char * fname, TGAImageRec & tex);
-/********************> LoadTGA() <*****/
-bool upload_image(const unsigned char* filePath, bool hasalpha)
-{
-    if (visibleloading)
-        Game::LoadingScreen();
+extern ImageRec texture;
+
+extern bool load_image(const char * fname, ImageRec & tex);
 
-    // for Windows, just use TGA loader for now
-    char fileName[256];
-    CopyPascalStringToC( filePath, fileName);
-    return (LoadImage(fileName, texture));
+bool upload_image(const char* fileName)
+{
+    return load_image(fileName, texture);
 }