Hi all,

attached is a patch for 2.2 which will show water in blue and cliffs red on 
the skirmish / mp map preview.

        Florian
Index: src/multiint.c
===================================================================
--- src/multiint.c	(revision 7364)
+++ src/multiint.c	(working copy)
@@ -301,9 +301,24 @@
 			{
 				for (y = (i * scale); y < (i * scale) + scale; y++)
 				{
-					imageData[3 * ((offY2 + y) * BACKDROP_HACK_WIDTH + (x + offX2))] = col;
-					imageData[3 * ((offY2 + y) * BACKDROP_HACK_WIDTH + (x + offX2)) + 1] = col;
-					imageData[3 * ((offY2 + y) * BACKDROP_HACK_WIDTH + (x + offX2)) + 2] = col;
+				  char *p = imageData + (3 * ((offY2 + y) * BACKDROP_HACK_WIDTH + (x + offX2)));
+				  switch (terrainType(WTile)) {
+				  case TER_CLIFFFACE:
+					p[0] = col;
+					p[1] = col / 2;
+					p[2] = col / 2;
+					break;
+				  case TER_WATER:
+					p[0] = col / 2;
+					p[1] = col / 2;
+					p[2] = 0x80 + (col / 2);
+					break;
+				  default:
+					p[0] = col;
+					p[1] = col;
+					p[2] = col;
+					break;
+				  }
 				}
 			}
 			WTile += 1;
_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to