Main /
MotorolaCompiling on a Motorola Mac
Now it compiles, but it crashes when it tries to malloc while loading airhockey_table.jfm. Here's some of the code I was using before I gave up :( void ByteSwap (int *myInt) { //int x; *myInt = (((*myInt&0x000000FF)<<24)+((*myInt&0x0000FF00)<<8)+ ((*myInt&0x00FF0000)>>8)+((*myInt&0xFF000000)>>24)); } void jake_fread(void *buffer, size_t size, size_t count, FILE *stream) { fread(buffer, size, count, stream); int i; char tmp; char *overlay = (char *)buffer; int *myIntBuffer = (int *)buffer; int *myInt; for (i = 0; i< (size/sizeof(int)) * count; i++) { myInt = &myIntBuffer[i]; *myInt = (((*myInt&0x000000FF)<<24)+((*myInt&0x0000FF00)<<8)+((*myInt&0x00FF0000)>>8)+((*myInt&0xFF000000)>>24)); } } |