From c6fb780f11be0fc6dc9b39e9a796fdc70ebc392f Mon Sep 17 00:00:00 2001 From: Bradley Bell Date: Thu, 11 Dec 2014 23:23:00 -0800 Subject: [PATCH] eliminate some wrappers --- include/console.h | 3 --- main/console.c | 27 +-------------------------- main/gamecntl.c | 2 +- main/gamerend.c | 2 +- 4 files changed, 3 insertions(+), 31 deletions(-) diff --git a/include/console.h b/include/console.h index ce460819..b9f9dace 100644 --- a/include/console.h +++ b/include/console.h @@ -126,9 +126,6 @@ void con_resize(void); void con_printf(int level, char *fmt, ...); void con_show(void); -void con_draw(void); -void con_update(void); -int con_events(int key); extern int Console_open; diff --git a/main/console.c b/main/console.c index 00ef50ac..bb294e7f 100644 --- a/main/console.c +++ b/main/console.c @@ -1210,7 +1210,6 @@ cvar_t con_threshold = {"con_threshold", "0",}; static int con_initialized; -void con_parse(char *command); void con_hide(); @@ -1237,7 +1236,7 @@ void con_init(void) Console = CON_Init(&fake_font, &fake_screen, CON_NUM_LINES, 0, 0, 320, 200); console = Console; - CON_SetExecuteFunction(con_parse); + CON_SetExecuteFunction(cmd_parse); CON_SetHideFunction(con_hide); @@ -1333,25 +1332,6 @@ void con_printf(int priority, char *fmt, ...) } } -/* Check for new console input. If it's there, use it */ -void con_update(void) -{ - con_draw(); -} - - -int con_events(int key) -{ - return CON_Events(key); -} - - -/* Draw the console */ -void con_draw(void) -{ - CON_DrawConsole(); -} - /* Show the console */ void con_show(void) { @@ -1363,8 +1343,3 @@ void con_hide(void) { Console_open = 0; } - -void con_parse(char *command) -{ - cmd_parse(command); -} diff --git a/main/gamecntl.c b/main/gamecntl.c index dd38e132..684e8184 100644 --- a/main/gamecntl.c +++ b/main/gamecntl.c @@ -2522,7 +2522,7 @@ void ReadControls() #endif #endif - if(!con_events(key)) + if(!CON_Events(key)) continue; if (Player_is_dead) diff --git a/main/gamerend.c b/main/gamerend.c index e3b82471..d47251e7 100644 --- a/main/gamerend.c +++ b/main/gamerend.c @@ -1037,7 +1037,7 @@ void game_render_frame_mono(void) Game_mode = GM_NORMAL; } - con_update(); + CON_DrawConsole(); gr_update(); #ifdef OGL -- 2.39.2