fixed tex reading bug

This commit is contained in:
aap
2020-07-16 11:35:41 +02:00
parent 990a7e21dd
commit 65d14730da
4 changed files with 4 additions and 14 deletions
+1 -6
View File
@@ -73,19 +73,14 @@ TGAHeader::write(Stream *stream)
}
Image*
readTGA(const char *afilename)
readTGA(const char *filename)
{
TGAHeader header;
Image *image;
char *filename;
int depth = 0, palDepth = 0;
filename = Image::getFilename(afilename);
if(filename == nil)
return nil;
uint32 length;
uint8 *data = getFileContents(filename, &length);
assert(data != nil);
rwFree(filename);
StreamMemory file;
file.open(data, length);
header.read(&file);