adding some debug messages to the main

This commit is contained in:
Gregory Gauthier 2026-01-29 16:45:06 +00:00
parent f917fbdac5
commit 0905018450

View File

@ -68,8 +68,21 @@ static int main_game_loop(int argc, char *argv[]) {
/* Get command line arguments */
parse_arguments(argc, argv, filename, difficulty);
#ifdef PLATFORM_DOS
/* DEBUG: Print progress before curses takes over */
printf("DEBUG: Parsed args, file=%s\n", filename);
printf("DEBUG: Calling initscr()...\n");
#endif
/* Initialize ncurses */
stdscr = initscr();
#ifdef PLATFORM_DOS
/* DEBUG: If we get here, initscr worked */
mvaddstr(0, 0, "DEBUG: initscr() OK");
refresh();
#endif
noecho(); /* Don't echo typed characters */
cbreak(); /* Disable line buffering */
curs_set(0);
@ -78,6 +91,9 @@ static int main_game_loop(int argc, char *argv[]) {
keypad(stdscr, FALSE);
/* Allow Ctrl+Break to work properly */
raw();
mvaddstr(1, 0, "DEBUG: curses init OK, loading words...");
refresh();
#else
keypad(stdscr, TRUE); /* Enable special key detection */
#endif
@ -95,6 +111,11 @@ static int main_game_loop(int argc, char *argv[]) {
/* Initialize game */
init_game(&game);
#ifdef PLATFORM_DOS
mvaddstr(0, 0, "DEBUG: Loading words...");
refresh();
#endif
if (!load_words(&game, filename)) {
/* Try fallback */
if (strcmp(filename, "default.txt") != 0 &&