2006-04-13 20:47:06 +00:00
|
|
|
// On-screen display (ie. console)
|
|
|
|
// for the Build Engine
|
2012-03-12 04:47:04 +00:00
|
|
|
// by Jonathon Fowler (jf@jonof.id.au)
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2014-11-22 12:32:56 +00:00
|
|
|
#ifndef osd_h_
|
|
|
|
#define osd_h_
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2019-10-23 19:11:37 +00:00
|
|
|
#include <functional>
|
2019-03-01 08:51:50 +00:00
|
|
|
|
2019-11-04 23:39:00 +00:00
|
|
|
#include "compat.h"
|
2014-07-06 00:12:25 +00:00
|
|
|
#include "mutex.h"
|
2019-11-05 18:57:48 +00:00
|
|
|
#include "printf.h"
|
2014-07-06 00:12:25 +00:00
|
|
|
|
2019-11-04 23:39:00 +00:00
|
|
|
struct osdfuncparm_t
|
|
|
|
{
|
|
|
|
int32_t numparms;
|
|
|
|
const char* name;
|
|
|
|
const char** parms;
|
|
|
|
const char* raw;
|
|
|
|
};
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2018-11-18 18:06:15 +00:00
|
|
|
using osdcmdptr_t = osdfuncparm_t const * const;
|
|
|
|
|
2017-06-27 02:24:14 +00:00
|
|
|
const char *OSD_StripColors(char *outBuf, const char *inBuf);
|
2008-06-30 00:18:59 +00:00
|
|
|
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
#define OSDCMD_OK 0
|
|
|
|
#define OSDCMD_SHOWHELP 1
|
|
|
|
|
|
|
|
|
2019-11-05 19:31:30 +00:00
|
|
|
// void OSD_Draw();
|
2014-07-24 14:01:44 +00:00
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
// executes buffered commands
|
2019-11-05 19:31:30 +00:00
|
|
|
void C_RunDelayedCommands();
|
|
|
|
inline void OSD_DispatchQueued(void)
|
|
|
|
{
|
|
|
|
C_RunDelayedCommands();
|
|
|
|
}
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
// registers a function
|
|
|
|
// name = name of the function
|
|
|
|
// help = a short help string
|
|
|
|
// func = the entry point to the function
|
2018-11-18 18:06:27 +00:00
|
|
|
int OSD_RegisterFunction(const char *pszName, const char *pszDesc, int (*func)(osdcmdptr_t));
|
2006-04-13 20:47:06 +00:00
|
|
|
|
2014-11-22 12:32:56 +00:00
|
|
|
#endif // osd_h_
|
2006-04-13 20:47:06 +00:00
|
|
|
|