add engine/command.hh

master
Daniel Kolesa 2020-06-10 02:10:22 +02:00
parent 975405f7c7
commit d45b066e5d
11 changed files with 32 additions and 12 deletions

View File

@ -1,6 +1,7 @@
// command.cpp: implements the parsing and execution of a tiny script language which
// is largely backwards compatible with the quake console language.
#include "command.hh"
#include "engine.hh"
hashnameset<ident> idents; // contains ALL vars/commands/aliases

View File

@ -0,0 +1,16 @@
#ifndef ENGINE_COMMAND_HH
#define ENGINE_COMMAND_HH
#include <shared/tools.hh>
#include <shared/command.hh>
extern hashnameset<ident> idents;
extern int identflags;
void clearoverrides();
void writecfg(const char *name = NULL);
void checksleep(int millis);
void clearsleep(bool clearoverrides = true);
#endif

View File

@ -1,5 +1,6 @@
// console.cpp: the console buffer, its display, and command line control
#include "command.hh" // idents, identflags
#include "main.hh"
#include "octaedit.hh" // editmode
#include "rendertext.hh"

View File

@ -80,16 +80,6 @@ extern void destroyva(vtxarray *va, bool reparent = true);
extern void updatevabb(vtxarray *va, bool force = false);
extern void updatevabbs(bool force = false);
// command
extern hashnameset<ident> idents;
extern int identflags;
extern void clearoverrides();
extern void writecfg(const char *name = NULL);
extern void checksleep(int millis);
extern void clearsleep(bool clearoverrides = true);
// console
extern float conscale;

View File

@ -3,6 +3,7 @@
#include "main.hh"
#include "blend.hh"
#include "command.hh" // checksleep, writecfg
#include "movie.hh"
#include "octaedit.hh"
#include "rendergl.hh"

View File

@ -1,6 +1,7 @@
#include "rendermodel.hh"
#include "aa.hh"
#include "command.hh" // identflags
#include "main.hh" // loadprogress, renderprogress
#include "pvs.hh"
#include "rendergl.hh"

View File

@ -1,9 +1,11 @@
// shader.cpp: OpenGL GLSL shader management
#include "shader.hh"
#include "command.hh" // identflags
#include "main.hh" // loadprogress, renderprogress
#include "rendergl.hh"
#include "rendermodel.hh" // cleanupmodels
#include "shader.hh"
#include "texture.hh"
#include "engine.hh"

View File

@ -1,12 +1,14 @@
// texture.cpp: texture slot management
#include "texture.hh"
#include "command.hh" // identflags
#include "main.hh" // initwarning, loadprogress, renderprogress, screenw/h, renderedframe
#include "material.hh"
#include "octaedit.hh"
#include "rendergl.hh"
#include "rendersky.hh"
#include "shader.hh"
#include "texture.hh"
#include "engine.hh"

View File

@ -1,6 +1,7 @@
// world.cpp: core map management stuff
#include "blend.hh"
#include "command.hh"
#include "main.hh" // clearmainmenu
#include "octa.hh"
#include "octaedit.hh"

View File

@ -1,6 +1,7 @@
// worldio.cpp: loading & saving of maps and savegames
#include "blend.hh"
#include "command.hh" // idents, identflags
#include "main.hh" // clearmainmenu, renderbackground
#include "octa.hh"
#include "octaedit.hh" // texmru

View File

@ -1,5 +1,8 @@
// script binding functionality
#ifndef SHARED_COMMAND_HH
#define SHARED_COMMAND_HH
enum { VAL_NULL = 0, VAL_INT, VAL_FLOAT, VAL_STR, VAL_ANY, VAL_CODE, VAL_MACRO, VAL_IDENT, VAL_CSTR, VAL_CANY, VAL_WORD, VAL_POP, VAL_COND };
enum
@ -408,3 +411,4 @@ inline void ident::getcval(tagval &v) const
#define ICOMMAND(name, nargs, proto, b) ICOMMANDN(name, ICOMMANDNAME(name), nargs, proto, b)
#define ICOMMANDS(name, nargs, proto, b) ICOMMANDNS(name, ICOMMANDSNAME, nargs, proto, b)
#endif