Fix compilation issues on PC vs DC

This commit is contained in:
Luke Benstead 2022-05-21 20:16:12 +01:00
parent fe7f9cbed0
commit 0060f48202

View File

@ -13,19 +13,30 @@
#include "GL/glext.h"
#include "GL/glkos.h"
/* using 4bpp textures from BMP files instead of 8bpp from PCX files */
#define USE_16C_PALETTE
#ifdef __DREAMCAST__
#include <kos.h>
extern uint8 romdisk[];
KOS_INIT_ROMDISK(romdisk);
#define IMG_PATH "/rd/NeHe.pcx"
#define IMG_ALPHA_PATH "/rd/NeHe-Alpha.pcx"
#else
#define IMG_PATH "../samples/paletted_pcx/romdisk/NeHe.pcx"
#define IMG_ALPHA_PATH "../samples/paletted_pcx/romdisk/NeHe-Alpha.pcx"
#endif
/* using 4bpp textures from BMP files instead of 8bpp from PCX files */
#define USE_16C_PALETTE
#ifdef USE_16C_PALETTE
#define IMG_PATH "/rd/NeHe.bmp"
#define IMG_ALPHA_PATH "/rd/NeHe-Alpha.bmp"
#else
#define IMG_PATH "/rd/NeHe.pcx"
#define IMG_ALPHA_PATH "/rd/NeHe-Alpha.pcx"
#endif
#else
#ifdef USE_16C_PALETTE
#define IMG_PATH "../samples/paletted_pcx/romdisk/NeHe.bmp"
#define IMG_ALPHA_PATH "../samples/paletted_pcx/romdisk/NeHe-Alpha.bmp"
#else
#define IMG_PATH "../samples/paletted_pcx/romdisk/NeHe.pcx"
#define IMG_ALPHA_PATH "../samples/paletted_pcx/romdisk/NeHe-Alpha.pcx"
#endif
#endif
/* floats for x rotation, y rotation, z rotation */
float xrot, yrot, zrot;
@ -381,11 +392,11 @@ void LoadGLTextures() {
exit(1);
}
#else
if (!LoadPalettedBMP("/rd/NeHe.bmp", &image1)) {
if (!LoadPalettedBMP(IMG_PATH, &image1)) {
exit(1);
}
if (!LoadPalettedBMP("/rd/NeHe-Alpha.bmp", &image2)) {
if (!LoadPalettedBMP(IMG_ALPHA_PATH, &image2)) {
exit(1);
}
#endif