add a hack for Decap Attack
[picodrive.git] / pico / 32x / draw.c
index f802150..2287e24 100644 (file)
@@ -58,7 +58,7 @@ static void convert_pal555(int invert_prio)
   unsigned short t;                                               \
   int i;                                                          \
   for (i = 320; i > 0; i--, pd++, p32x++, pmd++) {                \
-    t = pal[*(unsigned char *)((long)p32x ^ 1)];                  \
+    t = pal[*(unsigned char *)((uintptr_t)p32x ^ 1)];             \
     if ((t & 0x20) || (*pmd & 0x3f) == mdbg)                      \
       *pd = t;                                                    \
     else                                                          \
@@ -292,7 +292,7 @@ void PicoDraw32xLayerMdOnly(int offs, int lines)
   for (l = 0; l < lines; l++) {
     if (have_scan) {
       PicoScan32xBegin(l + offs);
-      dst = Pico.est.DrawLineDest + poffs;
+      dst = (unsigned short *)Pico.est.DrawLineDest + poffs;
     }
     for (p = 0; p < plen; p += 4) {
       dst[p + 0] = pal[*pmd++];