commit ee381667162de8734a3a37af8f91567dbe94a9b1
parent a6944b9e913fa0e956d65a0e3cd9638794b8da8e
Author: Bakar Chargeishvili <bakar@bcharge.de>
Date: Wed, 18 Dec 2024 17:20:04 +0100
Better symmetry
Diffstat:
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/welcome.c b/welcome.c
@@ -205,8 +205,10 @@ int main()
syspipe("cat skull", skull, &w_pipe_skull);
//wprintw(mainframe,"%s\n", skull);
//wrefresh(mainframe);
+ int num_skulls = COLS/w_pipe_skull;
+ int left_margin = (COLS-w_pipe_skull*num_skulls)/2;
for (int i = 0; i < COLS/w_pipe_skull; i++) {
- BOARD[i] = derwin(mainframe, 8, 21, 20, i*20);
+ BOARD[i] = derwin(mainframe, 8, 21, 20, i*20+left_margin);
}
int loop_cntr = 0;
do{