Change all ifdefs to support both DC & Naomi
This commit is contained in:
parent
0285e2027d
commit
ca8ebf7fc0
@ -181,7 +181,7 @@ void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) {
|
||||
0.0f, 0.0f, 0.0f, 1.0f
|
||||
};
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
float s, c;
|
||||
fsincos(angle, &s, &c);
|
||||
#else
|
||||
|
@ -445,7 +445,7 @@ static inline void CompilePolyHeader(PolyHeader *dst, const PolyContext *src) {
|
||||
dst->d3 = dst->d4 = 0xffffffff;
|
||||
}
|
||||
|
||||
#if defined(__DREAMCAST__) || defined(__NAOMI__)
|
||||
#ifdef _arch_dreamcast
|
||||
#include "platforms/sh4.h"
|
||||
#else
|
||||
#include "platforms/software.h"
|
||||
|
@ -224,7 +224,7 @@ GL_FORCE_INLINE float clamp(float d, float min, float max) {
|
||||
}
|
||||
|
||||
GL_FORCE_INLINE void memcpy_vertex(Vertex *dest, const Vertex *src) {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
_Complex float double_scratch;
|
||||
|
||||
asm volatile (
|
||||
@ -260,7 +260,7 @@ do { \
|
||||
memcpy_vertex(b, &c); \
|
||||
} while(0)
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#define fast_rsqrt(x) frsqrt(x)
|
||||
#else
|
||||
#define fast_rsqrt(x) (1.0f / __builtin_sqrtf(x))
|
||||
|
@ -538,7 +538,7 @@ GLubyte _glInitTextures() {
|
||||
ALLOC_SIZE = vram_free - PVR_MEM_BUFFER_SIZE; /* Take all but 64kb VRAM */
|
||||
ALLOC_BASE = GPUMemoryAlloc(ALLOC_SIZE);
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
/* Ensure memory is aligned */
|
||||
gl_assert((uintptr_t) ALLOC_BASE % 32 == 0);
|
||||
#endif
|
||||
|
@ -30,7 +30,7 @@ static inline void* memalign(size_t alignment, size_t size) {
|
||||
#define AV_NO_INLINE __attribute__((noinline))
|
||||
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
|
||||
AV_FORCE_INLINE void *AV_MEMCPY4(void *dest, const void *src, size_t len)
|
||||
{
|
||||
|
@ -5,7 +5,7 @@
|
||||
* and with adapted/corrected explanation
|
||||
*/
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -48,7 +48,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
float avgfps = -1;
|
||||
#endif
|
||||
@ -123,7 +123,7 @@ float lutScaleFactors[MAX_CUBES];
|
||||
|
||||
void debugLog(const char* msg)
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
dbglog(DBG_KDEBUG, "%s\n", msg);
|
||||
#else
|
||||
printf("%s\n", msg);
|
||||
@ -133,7 +133,7 @@ void debugLog(const char* msg)
|
||||
|
||||
void runningStats()
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
pvr_stats_t stats;
|
||||
pvr_get_stats(&stats);
|
||||
|
||||
@ -147,7 +147,7 @@ void runningStats()
|
||||
|
||||
void avgStats()
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
dbglog(DBG_DEBUG, "Average frame rate: ~%f fps\n", avgfps);
|
||||
#endif
|
||||
}
|
||||
@ -155,7 +155,7 @@ void avgStats()
|
||||
|
||||
void stats()
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
pvr_stats_t stats;
|
||||
|
||||
pvr_get_stats(&stats);
|
||||
@ -345,7 +345,7 @@ void updateLogic()
|
||||
|
||||
void updateInput()
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
static uint8_t prevButtons = 0;
|
||||
maple_device_t* cont;
|
||||
cont_state_t* state;
|
||||
@ -383,7 +383,7 @@ void updateInput()
|
||||
|
||||
void swapBuffers()
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
glKosSwapBuffers();
|
||||
#endif
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
//$KOS_BASE/utils/texconv/texconv --in disk.png --format ARGB4444 --preview disk_preview.png --out disk.dtex
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMAGE_FILENAME "/rd/disk_1555.dtex"
|
||||
@ -105,7 +105,7 @@ void DrawGLScene()
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -53,7 +53,7 @@ void DrawSquare(float width, float r, float g, float b, float z) {
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "GL/glu.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMAGE_FILENAME "/rd/flag1.bmp"
|
||||
@ -120,7 +120,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "GL/glext.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
@ -125,7 +125,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "GL/glext.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMAGE_FILENAME "/rd/NeHe.bmp"
|
||||
@ -87,7 +87,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
#include "GL/glkos.h"
|
||||
#include "GL/glext.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMAGE1_FILENAME "/rd/wp001vq.pvr"
|
||||
@ -48,7 +48,7 @@ GLfloat TEXCOORD_ARRAY[4 * 2] = { 0, 0,
|
||||
GLuint ARGB_ARRAY[4] = { 0xFFFF0000, 0xFF0000FF, 0xFF00FF00, 0xFFFFFF00 };
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -41,7 +41,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -41,7 +41,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -39,7 +39,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -42,7 +42,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -42,7 +42,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "GL/glext.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMAGE_FILENAME "/rd/NeHe.bmp"
|
||||
@ -96,7 +96,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
#include "GL/glkos.h"
|
||||
#include "GL/glext.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMG_PATH "/rd/NeHe.tex"
|
||||
@ -199,7 +199,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
#include "GL/glkos.h"
|
||||
#include "GL/glext.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMG_PATH "/rd/NeHe.tex"
|
||||
@ -215,7 +215,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
(c)2000 Jeff Molofee
|
||||
*/
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
#include <GL/gl.h>
|
||||
@ -26,7 +26,7 @@
|
||||
blending.
|
||||
*/
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMG_PATH "/rd/glass.pvr"
|
||||
@ -163,7 +163,7 @@ void DrawGLScene(void) {
|
||||
}
|
||||
|
||||
int ReadController(void) {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
(c)2000 Jeff Molofee
|
||||
*/
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#else
|
||||
#include <SDL.h>
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
#include "../loadbmp.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMG_PATH "/rd/brick.bmp"
|
||||
@ -88,7 +88,7 @@ void SetupWorld()
|
||||
int numtriangles;
|
||||
FILE *filein;
|
||||
char oneline[255];
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
filein = fopen("/rd/world.txt", "rt"); // File To Load World Data From
|
||||
#else
|
||||
filein = fopen("../samples/nehe10/romdisk/world.txt", "rt");
|
||||
@ -248,7 +248,7 @@ int ReadController(void) {
|
||||
bool right = false;
|
||||
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -21,7 +21,7 @@ uint32_t waittime = 1000.0f/FPS;
|
||||
uint32_t framestarttime = 0;
|
||||
int32_t delaytime;
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMG_LOGO_PATH "/rd/logo.bmp"
|
||||
@ -57,7 +57,7 @@ KOS_INIT_ROMDISK(romdisk);
|
||||
#if defined(__APPLE__) && defined(__MACH__)
|
||||
#include <OpenGL/gl.h> // Header File For The OpenGL32 Library
|
||||
#include <OpenGL/glu.h> // Header File For The GLu32 Library
|
||||
#elif defined(__DREAMCAST__)
|
||||
#elif defined(_arch_dreamcast)
|
||||
#include <kos.h>
|
||||
#include <GL/gl.h> // Header File For The OpenGL32 Library
|
||||
#include <GL/glu.h> // Header File For The GLu32 Library
|
||||
@ -238,7 +238,7 @@ int main(int argc, char *argv[])
|
||||
InitGL();
|
||||
ReSizeGLScene(640, 480);
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t* cont = maple_enum_type(0, MAPLE_FUNC_CONTROLLER);
|
||||
assert(cont);
|
||||
#endif
|
||||
@ -246,7 +246,7 @@ int main(int argc, char *argv[])
|
||||
while(1) {
|
||||
DrawGLScene();
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
cont_state_t* state = (cont_state_t *)maple_dev_status(cont);
|
||||
|
||||
if((state->buttons & CONT_A) && !sp) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -40,7 +40,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "GL/glu.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
extern uint8_t romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
#define IMG_PATH "/rd/NeHe.tex"
|
||||
@ -172,7 +172,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
#include <stdint.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
/* using 4bpp textures from BMP files instead of 8bpp from PCX files */
|
||||
#define USE_16C_PALETTE
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
@ -507,7 +507,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -4,7 +4,7 @@ typedef enum
|
||||
true
|
||||
} bool;
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -100,7 +100,7 @@ void drawPolygon()
|
||||
int frames = 0;
|
||||
int check_input()
|
||||
{
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
(c)2002 Dan Potter, Paul Boese
|
||||
*/
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -24,7 +24,7 @@ int phase = PHASE_HALVE;
|
||||
float avgfps = -1;
|
||||
|
||||
void running_stats() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
pvr_stats_t stats;
|
||||
pvr_get_stats(&stats);
|
||||
|
||||
@ -36,7 +36,7 @@ void running_stats() {
|
||||
}
|
||||
|
||||
void stats() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
pvr_stats_t stats;
|
||||
|
||||
pvr_get_stats(&stats);
|
||||
@ -47,7 +47,7 @@ void stats() {
|
||||
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef __DREAMCAST__
|
||||
#ifndef _arch_dreamcast
|
||||
#include <SDL2/SDL.h>
|
||||
static SDL_Window* win_handle;
|
||||
#else
|
||||
@ -119,7 +119,7 @@ static void DrawTriFan(float y) {
|
||||
}
|
||||
|
||||
static void sample_init() {
|
||||
#ifndef __DREAMCAST__
|
||||
#ifndef _arch_dreamcast
|
||||
SDL_Init(SDL_INIT_EVERYTHING);
|
||||
win_handle = SDL_CreateWindow("Shapes", 0, 0, 640, 480, SDL_WINDOW_OPENGL);
|
||||
SDL_GL_CreateContext(win_handle);
|
||||
@ -129,7 +129,7 @@ static void sample_init() {
|
||||
}
|
||||
|
||||
static int sample_should_exit() {
|
||||
#ifndef __DREAMCAST__
|
||||
#ifndef _arch_dreamcast
|
||||
SDL_Event event;
|
||||
while (SDL_PollEvent(&event)) {
|
||||
if(event.type == SDL_QUIT) return 1;
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <time.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#include "../profiler.h"
|
||||
#endif
|
||||
@ -35,7 +35,7 @@ int main(int argc, char* argv[]) {
|
||||
|
||||
fprintf(stderr, "Starting test run...\n");
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#if PROFILE
|
||||
profiler_init("/pc/gmon.out");
|
||||
profiler_start();
|
||||
@ -51,7 +51,7 @@ int main(int argc, char* argv[]) {
|
||||
end = time(NULL);
|
||||
}
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#if PROFILE
|
||||
profiler_stop();
|
||||
profiler_clean_up();
|
||||
|
@ -7,7 +7,7 @@
|
||||
(c)2002 Dan Potter, Paul Boese
|
||||
*/
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#include "../profiler.h"
|
||||
#endif
|
||||
@ -27,7 +27,7 @@ int phase = PHASE_HALVE;
|
||||
float avgfps = -1;
|
||||
|
||||
void running_stats() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
pvr_stats_t stats;
|
||||
pvr_get_stats(&stats);
|
||||
|
||||
@ -39,7 +39,7 @@ void running_stats() {
|
||||
}
|
||||
|
||||
void stats() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
pvr_stats_t stats;
|
||||
|
||||
pvr_get_stats(&stats);
|
||||
@ -50,7 +50,7 @@ void stats() {
|
||||
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -43,7 +43,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -96,7 +96,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -3,7 +3,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
#include "GL/glext.h"
|
||||
#include "GL/glkos.h"
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
extern uint8 romdisk[];
|
||||
KOS_INIT_ROMDISK(romdisk);
|
||||
@ -187,7 +187,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -48,7 +48,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
#include <kos.h>
|
||||
#endif
|
||||
|
||||
@ -47,7 +47,7 @@ void ReSizeGLScene(int Width, int Height)
|
||||
}
|
||||
|
||||
int check_start() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
@ -68,7 +68,7 @@ static GLfloat movement = -10.0f;
|
||||
static GLfloat rotation = 0.0f;
|
||||
|
||||
void update_movement() {
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
maple_device_t *cont;
|
||||
cont_state_t *state;
|
||||
|
||||
|
@ -122,7 +122,7 @@ void memcpy_vertex(Vertex* dst, Vertex* src) {
|
||||
|
||||
/* Zclipping is so difficult to get right, that self sample tests all the cases of clipping and makes sure that things work as expected */
|
||||
|
||||
#ifdef __DREAMCAST__
|
||||
#ifdef _arch_dreamcast
|
||||
static volatile int *pvrdmacfg = (int*)0xA05F6888;
|
||||
static volatile int *qacr = (int*)0xFF000038;
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user