raze-gles/source/build/include/osd.h

48 lines
872 B
C
Raw Normal View History

// On-screen display (ie. console)
// for the Build Engine
// by Jonathon Fowler (jf@jonof.id.au)
#ifndef osd_h_
#define osd_h_
2019-10-23 19:11:37 +00:00
#include <functional>
#include "compat.h"
#include "mutex.h"
#include "printf.h"
struct osdfuncparm_t
{
int32_t numparms;
const char* name;
const char** parms;
const char* raw;
};
using osdcmdptr_t = osdfuncparm_t const * const;
const char *OSD_StripColors(char *outBuf, const char *inBuf);
#define OSDCMD_OK 0
#define OSDCMD_SHOWHELP 1
2019-11-05 19:31:30 +00:00
// void OSD_Draw();
// executes buffered commands
2019-11-05 19:31:30 +00:00
void C_RunDelayedCommands();
inline void OSD_DispatchQueued(void)
{
C_RunDelayedCommands();
}
// registers a function
// name = name of the function
// help = a short help string
// func = the entry point to the function
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int (*func)(osdcmdptr_t));
#endif // osd_h_