Recent Changes - Search:

Site.SideBar

Motorola

Compiling on a Motorola Mac

  • 128.113.75.33
  • #include <GLUT/glut.h>, not <GL/glut.h>
  • g++ -framework GLUT -framework OpenGL -Iinclude -lobjc drawables/*.cpp paddle.cpp kglgame.cpp

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));
  }
}

Edit - History - Print - Recent Changes - Search
Page last modified on October 07, 2006, at 04:07 AM