moving on
[eradicate] / src / dos / gfx.c
index cde439e..cacd984 100644 (file)
@@ -1,10 +1,12 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include "game.h"
 #include "cdpmi.h"
 #include "gfx.h"
 #include "vbe.h"
 #include "vga.h"
+#include "util.h"
 
 #define SAME_BPP(a, b) \
        ((a) == (b) || ((a) == 16 && (b) == 15) || ((a) == 15 && (b) == 16) || \
@@ -236,8 +238,9 @@ void *page_flip(int vsync)
 
 static void blit_frame_lfb(void *pixels, int vsync)
 {
+       if(show_fps) dbg_fps(pixels);
        if(vsync) wait_vsync();
-       memcpy(vpgaddr[frontidx], pixels, pgsize);
+       memcpy64(vpgaddr[frontidx], pixels, pgsize >> 3);
 }
 
 static void blit_frame_banked(void *pixels, int vsync)
@@ -246,6 +249,8 @@ static void blit_frame_banked(void *pixels, int vsync)
        unsigned int pending;
        unsigned char *pptr = pixels;
 
+       if(show_fps) dbg_fps(pixels);
+
        if(vsync) wait_vsync();
 
        /* assume initial window offset at 0 */
@@ -253,6 +258,7 @@ static void blit_frame_banked(void *pixels, int vsync)
        pending = pgsize;
        while(pending > 0) {
                sz = pending > curmode->bank_size ? curmode->bank_size : pending;
+               //memcpy64((void*)0xa0000, pptr, sz >> 3);
                memcpy((void*)0xa0000, pptr, sz);
                pptr += sz;
                pending -= sz;