eliminate texrels (wip2)
[picodrive.git] / platform / gp2x / emu.c
index 244f15d..683e267 100644 (file)
@@ -30,7 +30,7 @@
 #include <pico/pico_int.h>\r
 #include <pico/patch.h>\r
 #include <pico/sound/mix.h>\r
-#include <zlib/zlib.h>\r
+#include <zlib.h>\r
 \r
 #ifdef BENCHMARK\r
 #define OSD_FPS_X 220\r
@@ -222,7 +222,7 @@ static unsigned char __attribute__((aligned(4))) rot_buff[320*4*2];
 \r
 static int EmuScanBegin16_rot(unsigned int num)\r
 {\r
-       DrawLineDest = rot_buff + (num & 3) * 320 * 2;\r
+       Pico.est.DrawLineDest = rot_buff + (num & 3) * 320 * 2;\r
        return 0;\r
 }\r
 \r
@@ -237,7 +237,7 @@ static int EmuScanEnd16_rot(unsigned int num)
 \r
 static int EmuScanBegin8_rot(unsigned int num)\r
 {\r
-       DrawLineDest = rot_buff + (num & 3) * 320;\r
+       Pico.est.DrawLineDest = rot_buff + (num & 3) * 320;\r
        return 0;\r
 }\r
 \r
@@ -262,14 +262,14 @@ static int EmuScanBegin16_ld(unsigned int num)
        if (emu_scan_begin)\r
                return emu_scan_begin(ld_counter);\r
        else\r
-               DrawLineDest = (char *)g_screen_ptr + 320 * ld_counter * gp2x_current_bpp / 8;\r
+               Pico.est.DrawLineDest = (char *)g_screen_ptr + 320 * ld_counter * gp2x_current_bpp / 8;\r
 \r
        return 0;\r
 }\r
 \r
 static int EmuScanEnd16_ld(unsigned int num)\r
 {\r
-       void *oldline = DrawLineDest;\r
+       void *oldline = Pico.est.DrawLineDest;\r
 \r
        if (emu_scan_end)\r
                emu_scan_end(ld_counter);\r
@@ -280,7 +280,7 @@ static int EmuScanEnd16_ld(unsigned int num)
                ld_left = ld_lines;\r
 \r
                EmuScanBegin16_ld(num);\r
-               memcpy32(DrawLineDest, oldline, 320 * gp2x_current_bpp / 8 / 4);\r
+               memcpy32(Pico.est.DrawLineDest, oldline, 320 * gp2x_current_bpp / 8 / 4);\r
                if (emu_scan_end)\r
                        emu_scan_end(ld_counter);\r
 \r
@@ -310,7 +310,7 @@ static int make_local_pal_md(int fast_mode)
                localPal[0xf0] = 0x00ffffff;\r
                pallen = 0x100;\r
        }\r
-       else if (rendstatus & PDRAW_SONIC_MODE) { // mid-frame palette changes\r
+       else if (Pico.est.rendstatus & PDRAW_SONIC_MODE) { // mid-frame palette changes\r
                bgr444_to_rgb32(localPal+0x40, HighPal);\r
                bgr444_to_rgb32(localPal+0x80, HighPal+0x40);\r
        }\r