]> git.sesse.net Git - pistorm/blobdiff - platforms/amiga/rtg/rtg.c
Add mask handling to all RTG ops, add real time disassembly output
[pistorm] / platforms / amiga / rtg / rtg.c
index 910ee9bbbdf5e487bde494dd160c5867355fe266..5f33722392ed0f3c1c32ec20c3ecf49aa65028c6 100644 (file)
@@ -233,15 +233,21 @@ static void handle_rtg_command(uint32_t cmd) {
             }
             break;
         case RTGCMD_FILLRECT:
-            rtg_fillrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_rgb[0], rtg_x[2], rtg_format, 0xFF);
+            if (rtg_u8[0] == 0xFF || rtg_format != RTGFMT_8BIT)
+                rtg_fillrect_solid(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_rgb[0], rtg_x[2], rtg_format);
+            else
+                rtg_fillrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_rgb[0], rtg_x[2], rtg_format, rtg_u8[0]);
             gdebug("FillRect\n");
             break;
         case RTGCMD_INVERTRECT:
-            rtg_invertrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_format, 0xFF);
+            rtg_invertrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_format, rtg_u8[0]);
             gdebug("InvertRect\n");
             break;
         case RTGCMD_BLITRECT:
-            rtg_blitrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_y[2], rtg_x[3], rtg_format, 0xFF);
+            if (rtg_u8[0] == 0xFF || rtg_format != RTGFMT_8BIT)
+                rtg_blitrect_solid(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_y[2], rtg_x[3], rtg_format);
+            else 
+                rtg_blitrect(rtg_x[0], rtg_y[0], rtg_x[1], rtg_y[1], rtg_x[2], rtg_y[2], rtg_x[3], rtg_format, rtg_u8[0]);
             gdebug("BlitRect\n");
             break;
         case RTGCMD_BLITRECT_NOMASK_COMPLETE: