[console] Move gib hud control into hud

I don't know why it was ever in console.
This commit is contained in:
Bill Currie 2023-01-21 02:57:05 +09:00
parent 1c368724e8
commit 4949f52b58
2 changed files with 15 additions and 17 deletions

View file

@ -32,6 +32,7 @@
#include <string.h> #include <string.h>
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/gib.h"
#include "QF/screen.h" #include "QF/screen.h"
#include "QF/render.h" #include "QF/render.h"
#include "QF/plugin/vid_render.h" #include "QF/plugin/vid_render.h"
@ -259,6 +260,17 @@ hud_scoreboard_gravity_f (void *data, const cvar_t *cvar)
View_SetGravity (hud_overlay_view, hud_scoreboard_gravity); View_SetGravity (hud_overlay_view, hud_scoreboard_gravity);
} }
} }
static void
C_GIB_HUD_Enable_f (void)
{
//hud_canvas_view->visible = 1;
}
static void
C_GIB_HUD_Disable_f (void)
{
//hud_canvas_view->visible = 0;
}
void void
HUD_Init (void) HUD_Init (void)
@ -274,6 +286,9 @@ HUD_Init (void)
passage_components, passage_components,
passage_comp_count); passage_comp_count);
ECS_CreateComponentPools (hud_system.reg); ECS_CreateComponentPools (hud_system.reg);
// register GIB builtins
GIB_Builtin_Add ("HUD::enable", C_GIB_HUD_Enable_f);
GIB_Builtin_Add ("HUD::disable", C_GIB_HUD_Disable_f);
} }
void void

View file

@ -46,7 +46,6 @@
#include "QF/console.h" #include "QF/console.h"
#include "QF/cvar.h" #include "QF/cvar.h"
#include "QF/dstring.h" #include "QF/dstring.h"
#include "QF/gib.h"
#include "QF/keys.h" #include "QF/keys.h"
#include "QF/qargs.h" #include "QF/qargs.h"
#include "QF/quakefs.h" #include "QF/quakefs.h"
@ -803,18 +802,6 @@ C_NewMap (void)
dstring_copystr (old_gamedir, qfs_gamedir->gamedir); dstring_copystr (old_gamedir, qfs_gamedir->gamedir);
} }
static void
C_GIB_HUD_Enable_f (void)
{
//hud_view->visible = 1;
}
static void
C_GIB_HUD_Disable_f (void)
{
//hud_view->visible = 0;
}
static void static void
exec_line (inputline_t *il) exec_line (inputline_t *il)
{ {
@ -1174,10 +1161,6 @@ C_Init (void)
Cmd_AddCommand ("condump", Condump_f, "dump the console text to a " Cmd_AddCommand ("condump", Condump_f, "dump the console text to a "
"file"); "file");
// register GIB builtins
GIB_Builtin_Add ("HUD::enable", C_GIB_HUD_Enable_f);
GIB_Builtin_Add ("HUD::disable", C_GIB_HUD_Disable_f);
con_initialized = true; con_initialized = true;
} }