From 8977fbf6e2c7868afbde3e41e228c9e4987d229c Mon Sep 17 00:00:00 2001 From: Luke Benstead Date: Mon, 19 Apr 2021 20:43:56 +0100 Subject: [PATCH] Compile quadmark on PC --- CMakeLists.txt | 2 +- samples/quadmark/main.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fea446c..deb4c5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -143,8 +143,8 @@ gen_sample(zclip_triangle samples/zclip_triangle/main.c) gen_sample(zclip_trianglestrip samples/zclip_trianglestrip/main.c) gen_sample(scissor samples/scissor/main.c) gen_sample(polymark samples/polymark/main.c) +gen_sample(quadmark samples/quadmark/main.c) if(PLATFORM_DREAMCAST) - gen_sample(quadmark samples/quadmark/main.c) gen_sample(trimark samples/trimark/main.c) endif() diff --git a/samples/quadmark/main.c b/samples/quadmark/main.c index 59da143..dfe5c17 100644 --- a/samples/quadmark/main.c +++ b/samples/quadmark/main.c @@ -7,12 +7,15 @@ (c)2002 Dan Potter, Paul Boese */ +#ifdef __DREAMCAST__ #include +#endif #include #include #include +#include #include enum { PHASE_HALVE, PHASE_INCR, PHASE_DECR, PHASE_FINAL }; @@ -22,6 +25,7 @@ int phase = PHASE_HALVE; float avgfps = -1; void running_stats() { +#ifdef __DREAMCAST__ pvr_stats_t stats; pvr_get_stats(&stats); @@ -29,18 +33,22 @@ void running_stats() { avgfps = stats.frame_rate; else avgfps = (avgfps + stats.frame_rate) / 2.0f; +#endif } void stats() { +#ifdef __DREAMCAST__ pvr_stats_t stats; pvr_get_stats(&stats); dbglog(DBG_DEBUG, "3D Stats: %d VBLs, frame rate ~%f fps\n", stats.vbl_count, stats.frame_rate); +#endif } int check_start() { +#ifdef __DREAMCAST__ maple_device_t *cont; cont_state_t *state; @@ -52,12 +60,11 @@ int check_start() { if(state) return state->buttons & CONT_START; } +#endif return 0; } -pvr_poly_hdr_t hdr; - void setup() { glKosInit(); glMatrixMode(GL_MODELVIEW);