projects
/
mercenary-reloaded.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace printf/fprintf with own print_info() / print_error() using SDL_log
[mercenary-reloaded.git]
/
src
/
libvideo
/
video.c
diff --git
a/src/libvideo/video.c
b/src/libvideo/video.c
index
516122b
..
c48742f
100644
(file)
--- a/
src/libvideo/video.c
+++ b/
src/libvideo/video.c
@@
-19,6
+19,7
@@
#include <stdio.h>
#include <stdint.h>
#include <stdio.h>
#include <stdint.h>
+#include "../libsdl/print.h"
#include "video.h"
#include "../libcpu/m68kcpu.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) {
/* 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;
}
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) {
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);
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)) {
}
} 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 */
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) {
printf(" %06x", bitplane[i]);
#endif
if (bitplane[i] == 0 || bitplane[i] + width * height / 8 >= 0x80000) {
+#ifdef DEBUG_COPPERLIST
printf("\n");
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];
return;
}
bitmem[i] = memory + bitplane[i];