X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/balance?a=blobdiff_plain;f=roguelike.c;h=d7347261125487598cef36082a5f2c4d2c09c060;hb=3663e5190d818c51d9b8e8107bf3cc713e0ece03;hp=aef863e532f071a73b7d63f320666234b755b8b2;hpb=5412e81a7b206b84e82c73ff322e0f34db71dcf3;p=plomrogue diff --git a/roguelike.c b/roguelike.c index aef863e..d734726 100644 --- a/roguelike.c +++ b/roguelike.c @@ -345,7 +345,7 @@ int main (int argc, char *argv[]) { toggle_window(&win_meta, &win_log); int key; - unsigned char result; + unsigned char quit_called; if (0 == world.interactive) { int action; while (1) { @@ -366,8 +366,8 @@ int main (int argc, char *argv[]) { else if ('w' == action) move_player(&world, 'w'); } else - result = meta_keys(key, &world, &win_meta, &win_keys, &win_map, &win_info, &win_log); - if (1 == result) + quit_called = meta_keys(key, &world, &win_meta, &win_keys, &win_map, &win_info, &win_log); + if (1 == quit_called) break; } } else { uint32_t last_turn = 0; @@ -388,8 +388,8 @@ int main (int argc, char *argv[]) { else if (key == get_action_key(world.keybindings, "wait / next turn")) player_wait (&world); else - result = meta_keys(key, &world, &win_meta, &win_keys, &win_map, &win_info, &win_log); - if (1 == result) + quit_called = meta_keys(key, &world, &win_meta, &win_keys, &win_map, &win_info, &win_log); + if (1 == quit_called) break; } } free(map.cells);