mirror of
https://github.com/aap/librw.git
synced 2025-12-19 17:09:51 +00:00
texture mapping in ps2 test
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user