X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FTerrain.cpp;h=8c0335c8a8872b8f2dd4250be708c56a8c9c0e9d;hb=250a16d5fa14b462b44b1e698372164ac33aa721;hp=b0aff61581df56406c7c174de27d4fa09bf620cb;hpb=2a9d19feea3589e45e3f6aa4e7b6052732b35f3f;p=lugaru.git diff --git a/Source/Terrain.cpp b/Source/Terrain.cpp index b0aff61..8c0335c 100644 --- a/Source/Terrain.cpp +++ b/Source/Terrain.cpp @@ -1,5 +1,6 @@ /* Copyright (C) 2003, 2010 - Wolfire Games +Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. @@ -34,7 +35,7 @@ extern bool decals; extern float blurness; extern float targetblurness; extern Objects objects; -extern TGAImageRec texture; +extern ImageRec texture; extern bool visibleloading; extern bool skyboxtexture; extern int tutoriallevel; @@ -404,15 +405,9 @@ bool Terrain::load(const char *fileName) static float patch_size; float temptexdetail = texdetail; - //LoadTGA( fileName ); - // Fixing filename so that it works with its own os - char * FixedFN = ConvertFileName(fileName); - - unsigned char fileNamep[256]; - CopyCStringToPascal(FixedFN, fileNamep); //Load Image - upload_image( fileNamep , 0); + upload_image(ConvertFileName(fileName)); //Is it valid? if (texture.bpp > 24) { @@ -516,28 +511,6 @@ bool Terrain::load(const char *fileName) if (visibleloading) Game::LoadingScreen(); - /*float total; - int todivide; - //Smooth opacityother - for(i=0;i0&&patchy[1]>0) - if(patchx[2]0&&patchy[2]>0) - if(patchx[3]0&&patchy[3]>0) - if(patchx[0]0&&patchy[0]>0){ - */ if ((patchx[0] != patchx[1] || patchy[0] != patchy[1]) && (patchx[0] != patchx[2] || patchy[0] != patchy[2]) && (patchx[0] != patchx[3] || patchy[0] != patchy[3])) { MakeDecalLock(type, where, patchx[0], patchy[0], size, opacity, rotation); }