From d0b1a2ab1a6f5c004d675d700181b16385a30b04 Mon Sep 17 00:00:00 2001 From: Kirill Petrashin Date: Sat, 14 Mar 2026 21:00:51 +0300 Subject: Improve rendering --- main.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'main.c') diff --git a/main.c b/main.c index bfa19f5..5348807 100644 --- a/main.c +++ b/main.c @@ -6,10 +6,11 @@ #include "map.h" #include "structs.h" -// So, TODO for now: -// - Implement the A* algorithm -// - Implement adding maps from files (with rle, preferably) -// - Implement controls (to change maps, move start/goal, etc.) +/* So, TODO for now: + - Implement the A* algorithm + - Implement adding maps from files (with rle, preferably) + - Implement controls (to change maps, move start/goal, etc.) + - Render goal and start in bold */ void sigint_handler(int sig) { (void)sig; // We know it's a SIGINT @@ -22,8 +23,9 @@ void initialize_colors(void) { start_color(); use_default_colors(); init_pair(EMPTY_COLOR, COLOR_BLACK, -1); - init_pair(GOAL_COLOR, COLOR_CYAN, -1); - init_pair(WALL_COLOR, COLOR_WHITE, -1); + init_pair(GOAL_COLOR, COLOR_RED, -1); + init_pair(WALL_COLOR, COLOR_WHITE, COLOR_WHITE); /* Using white as bg makes + them seem solid */ init_pair(START_COLOR, COLOR_RED, -1); } @@ -37,8 +39,9 @@ int main(void) { initialize_colors(); Map map = rbt_maze_map(20, 10, (unsigned int) time(NULL)); - Position fake_start_position_to_pass_into_draw_map = {11, 21}; - draw_map(map, 20*2-1, 10*2-1, fake_start_position_to_pass_into_draw_map); + Position fake_start_position_to_pass_into_draw_map = {0, 0}; + Position fake_goal_position_to_pass_into_draw_map = {20*2-2, 10*2-2}; + draw_map(map, 20*2-1, 10*2-1, fake_start_position_to_pass_into_draw_map, fake_goal_position_to_pass_into_draw_map); getch(); endwin(); -- cgit v1.2.3