home · contact · privacy
7DRL: Via stacks depth map, add visualization of thing stacks on map.
[plomrogue] / src / client / draw_wins.c
index c8d87fc29c622eaa5719c17f754f4a666a7d7711..59ce436be61472374ea6680c20c3630c6d90ad6f 100644 (file)
@@ -406,7 +406,12 @@ extern void draw_win_map(struct Win * win)
             // attr_t a=' '==world.mem_map[y*world.map.length+x]?attr_sha:attr_mem;
             char c = world.mem_map[y*world.map.length + x];
             set_ch_on_yx(win, y, x * 2 + (y % 2),     c   | a);
-            set_ch_on_yx(win, y, x * 2 + (y % 2) + 1, ' ' | a);
+            chtype depth = ' ' | a;  //
+            if (world.stacks_map[y * world.map.length + x] == '2')  //
+            {  //
+                depth = '+' | COLOR_PAIR(2);  //
+            }  //
+            set_ch_on_yx(win, y, x * 2 + (y % 2) + 1, depth);
         }
     }
     init_pair(4, COLOR_BLUE, COLOR_BLACK); //
@@ -471,7 +476,12 @@ extern void draw_win_map(struct Win * win)
                 } //
                 // char c = world.map.cells[y*world.map.length + x];
                 set_ch_on_yx(win, y, x * 2 + (y % 2),     c | a); //
-                set_ch_on_yx(win, y, x * 2 + (y % 2) + 1, ' ' | a); //
+                chtype depth = ' ' | a;  //
+                if (world.stacks_map[y * world.map.length + x] == '2')  //
+                {  //
+                    depth = '+' | COLOR_PAIR(13);  //
+                }  //
+                set_ch_on_yx(win, y, x * 2 + (y % 2) + 1, depth); //
                 // set_ch_on_yx(win, y, x * 2 + (y % 2),     c);
                 // set_ch_on_yx(win, y, x * 2 + (y % 2) + 1, ' ');
             }