X-Git-Url: https://plomlompom.com/repos/test.html?a=blobdiff_plain;f=roguelike.c;h=00b3ecc46c1f1335024b785a5f640ff23a0b5b34;hb=acac955931dc1e68d590dbd0fe51a237da785cac;hp=f648e00cd769369adf21cb35aaaca107f1ca1596;hpb=a2bafe4a71fbf31baa32b00581b2a744e96753af;p=plomrogue
diff --git a/roguelike.c b/roguelike.c
index f648e00..00b3ecc 100644
--- a/roguelike.c
+++ b/roguelike.c
@@ -82,8 +82,8 @@ void scroll_pad (struct WinMeta * win_meta, char dir) {
void growshrink_active_window (struct WinMeta * win_meta, char change) {
// Grow or shrink active window horizontally or vertically by one cell size.
if (0 != win_meta->active) {
- uint16_t height = win_meta->active->height;
- uint16_t width = win_meta->active->width;
+ uint16_t height = win_meta->active->size.y;
+ uint16_t width = win_meta->active->size.x;
if (change == '-')
height--;
else if (change == '+')
@@ -345,10 +345,10 @@ int main (int argc, char *argv[]) {
struct Win win_map = init_window(&win_meta, "Map", &world, draw_map_win);
struct Win win_info = init_window(&win_meta, "Info", &world, draw_info_win);
struct Win win_log = init_window(&win_meta, "Log", &world, draw_log_win);
- win_keys.width = 29;
- win_map.width = win_meta.width - win_keys.width - win_log.width - 2;
- win_info.height = 1;
- win_log.height = win_meta.height - 3;
+ win_keys.size.x = 29;
+ win_map.size.x = win_meta.size.x - win_keys.size.x - win_log.size.x - 2;
+ win_info.size.y = 1;
+ win_log.size.y = win_meta.size.y - 3;
toggle_window(&win_meta, &win_keys);
toggle_window(&win_meta, &win_map);
toggle_window(&win_meta, &win_info);