X-Git-Url: http://git.eversberg.eu/gitweb.cgi?p=mercenary-reloaded.git;a=blobdiff_plain;f=src%2Flibvideo%2Fvideo.c;h=c48742fce5e9ec2d6371a29e77ee66c903a73132;hp=516122bfb8bc7bb85ff123f9144a99f74e8527e7;hb=99218ad73b476cad66afa0efb8de9c763108747b;hpb=f9e72953571609089acedec0ce3e275cf63ef008 diff --git a/src/libvideo/video.c b/src/libvideo/video.c index 516122b..c48742f 100644 --- a/src/libvideo/video.c +++ b/src/libvideo/video.c @@ -19,6 +19,7 @@ #include #include +#include "../libsdl/print.h" #include "video.h" #include "../libcpu/m68kcpu.h" @@ -147,7 +148,7 @@ void emul_video(uint8_t *rgb, uint8_t *memory, uint16_t render_palette[], int wi /* get copper list start pointer */ copperlist = (io[COP1LCH] << 16) | io[COP1LCL]; if (!copperlist) { - fprintf(stderr, "Copper list pointer not initialized, please fix!\n"); + print_error("Copper list pointer not initialized, please fix!\n"); return; } @@ -161,7 +162,7 @@ void emul_video(uint8_t *rgb, uint8_t *memory, uint16_t render_palette[], int wi last_line = 0; while (42) { if (++count == 100) { - fprintf(stderr, "Copper list does not seem to terminate, please fix!\n"); + print_error("Copper list does not seem to terminate, please fix!\n"); return; } c1 = m68k_read_memory_16(copperlist); @@ -202,7 +203,7 @@ void emul_video(uint8_t *rgb, uint8_t *memory, uint16_t render_palette[], int wi } } else { if ((c2 & 1)) { - fprintf(stderr, "We suppport no SKIP command in copper list, please fix!\n"); + print_error("We suppport no SKIP command in copper list, please fix!\n"); continue; } /* WAIT */ @@ -234,8 +235,10 @@ void emul_video(uint8_t *rgb, uint8_t *memory, uint16_t render_palette[], int wi printf(" %06x", bitplane[i]); #endif if (bitplane[i] == 0 || bitplane[i] + width * height / 8 >= 0x80000) { +#ifdef DEBUG_COPPERLIST printf("\n"); - fprintf(stderr, "Bitplane %d in copper list not set or out of range, please fix!\n", i); +#endif + print_error("Bitplane %d in copper list not set or out of range, please fix!\n", i); return; } bitmem[i] = memory + bitplane[i];