]> git.zerfleddert.de Git - micropolis/blobdiff - src/sim/g_bigmap.c
Enable warnings and fix them, all of them
[micropolis] / src / sim / g_bigmap.c
index 695cd883814e850811e6a153ee8de5d9d41989f6..55bb06f9e4741c71a1d055aa7ea29424203e9ae2 100644 (file)
 
 
 int dynamicFilter(int c, int r);
-int WireDrawBeegMapRect(SimView *view, short x, short y, short w, short h);
 
+void
 drawBeegMaps()
 {
   sim_update_editors();
 }
 
 
+void
 MemDrawBeegMapRect(SimView *view, int x, int y, int w, int h)
 {
   int lineBytes = view->line_bytes;
@@ -169,6 +170,15 @@ MemDrawBeegMapRect(SimView *view, int x, int y, int w, int h)
 #define ROW8_16(n) ROW4_16(n) ROW4_16(n+4)
 #define ROW16_16() ROW8_16(0) ROW8_16(8)
 
+#define ROW1_32(n) \
+      memcpy((char *)image, (char *)mem + (4 * 16 * (n)), 4 * 16); \
+      image = (unsigned QUAD *)(((unsigned char *)image) + lineBytes);
+
+#define ROW2_32(n) ROW1_32(n) ROW1_32(n+1)
+#define ROW4_32(n) ROW2_32(n) ROW2_32(n+2)
+#define ROW8_32(n) ROW4_32(n) ROW4_32(n+4)
+#define ROW16_32() ROW8_32(0) ROW8_32(8)
+
          switch (view->x->depth) {
 
          case 8:
@@ -182,6 +192,9 @@ MemDrawBeegMapRect(SimView *view, int x, int y, int w, int h)
 
          case 24:
          case 32:
+           ROW16_32();
+           break;
+
          default:
            /* XXX: handle different depths */
            break;
@@ -252,6 +265,7 @@ MemDrawBeegMapRect(SimView *view, int x, int y, int w, int h)
 }
 
 
+void
 WireDrawBeegMapRect(SimView *view, short x, short y, short w, short h)
 {
   unsigned short *map;
Impressum, Datenschutz