diff --git a/samples/nehe06/main.c b/samples/nehe06/main.c index 39570c2..c712ba3 100644 --- a/samples/nehe06/main.c +++ b/samples/nehe06/main.c @@ -8,14 +8,19 @@ #include "GL/glext.h" #include "GL/glkos.h" +#ifdef __DREAMCAST__ +#define IMAGE_FILENAME "/rd/NeHe.bmp" extern uint8_t romdisk[]; KOS_INIT_ROMDISK(romdisk); +#else +#define IMAGE_FILENAME "samples/nehe06/romdisk/NeHe.bmp" +#endif /* floats for x rotation, y rotation, z rotation */ float xrot, yrot, zrot; /* storage for one texture */ -int texture[1]; +GLuint texture[1]; /* Image type - contains height, width, and data */ struct Image { @@ -93,7 +98,7 @@ int ImageLoad(char *filename, Image *image) { } if ((i = fread(image->data, size, 1, file)) != 1) { - printf(stderr, "Error reading image data from %s.\n", filename); + fprintf(stderr, "Error reading image data from %s.\n", filename); return 0; } @@ -119,7 +124,7 @@ void LoadGLTextures() { exit(0); } - if (!ImageLoad("/rd/NeHe.bmp", image1)) { + if (!ImageLoad(IMAGE_FILENAME, image1)) { exit(1); }