mirror of
https://github.com/aap/librw.git
synced 2025-12-22 02:19:56 +00:00
moved iOS dff converter to rsltest
This commit is contained in:
@@ -130,18 +130,19 @@ Texture::read(const char *name, const char *mask)
|
||||
tex = new Texture;
|
||||
strncpy(tex->name, name, 32);
|
||||
strncpy(tex->mask, mask, 32);
|
||||
char *n = (char*)malloc(strlen(name) + 5);
|
||||
strcpy(n, name);
|
||||
strcat(n, ".tga");
|
||||
Image *img = readTGA(n);
|
||||
free(n);
|
||||
if(img){
|
||||
raster = Raster::createFromImage(img);
|
||||
delete img;
|
||||
}else
|
||||
// char *n = (char*)malloc(strlen(name) + 5);
|
||||
// strcpy(n, name);
|
||||
// strcat(n, ".tga");
|
||||
// Image *img = readTGA(n);
|
||||
// free(n);
|
||||
// if(img){
|
||||
// //raster = Raster::createFromImage(img);
|
||||
// raster = new Raster(0, 0, 0, 0x80);
|
||||
// delete img;
|
||||
// }else
|
||||
raster = new Raster(0, 0, 0, 0x80);
|
||||
tex->raster = raster;
|
||||
if(currentTexDictionary && img)
|
||||
if(currentTexDictionary /*&& img*/)
|
||||
currentTexDictionary->add(tex);
|
||||
return tex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user