texture mapping in ps2 test

This commit is contained in:
aap
2015-06-18 23:05:37 +02:00
parent df419c63ef
commit c6589f55de
17 changed files with 170 additions and 100 deletions

View File

@@ -2,7 +2,6 @@
#include <cstdlib>
#include <cstring>
#include <cassert>
#include <stdint.h>
#include <new>
@@ -311,4 +310,18 @@ found:
return i;
}
uint8*
getFileContents(char *name, uint32 *len)
{
FILE *cf = fopen(name, "rb");
assert(cf != NULL);
fseek(cf, 0, SEEK_END);
*len = ftell(cf);
fseek(cf, 0, SEEK_SET);
uint8 *data = new uint8[*len];
fread(data, *len, 1, cf);
fclose(cf);
return data;
}
}