[qwaq] Create a commandline-only version of qwaq

qwaq-curses has its place, but its use for running vkgen was really a
placeholder because I didn't feel like sorting out the different
initialization requirements at the time. qwaq-cmd has the (currently
unnecessary) threading power of qwaq-curses, but doesn't include any UI
stuff and thus doesn't need curses. The work also paves the way for
qwaq-x11 to become a proper engine (though sorting out its init will be
taken care of later).

Fixes #15.
This commit is contained in:
Bill Currie 2021-07-06 11:55:29 +09:00
parent 490cf966f9
commit ae58a8ba5d
10 changed files with 270 additions and 95 deletions

View file

@ -85,10 +85,10 @@ static QFile *log_file;
static cvar_t *sv_logfile;
static cvar_t *sv_conmode;
static void C_KeyEvent (knum_t key, short unicode, qboolean down);
#ifdef HAVE_NCURSES
static void key_event (knum_t key, short unicode, qboolean down);
enum {
sv_resize_x = 1,
sv_resize_y = 2,
@ -465,7 +465,7 @@ process_input (void)
if (ch < 0 || ch >= 256)
ch = 0;
}
C_KeyEvent (ch, 0, 1);
key_event (ch, 0, 1);
}
}
@ -757,14 +757,6 @@ C_ProcessInput (void)
}
}
static void
C_KeyEvent (knum_t key, short unicode, qboolean down)
{
#ifdef HAVE_NCURSES
key_event (key, unicode, down);
#endif
}
static void
C_DrawConsole (void)
{