mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
Add OSD_PROTECTED flag, set when gamefunc_Show_Console has been undefined from CON. Currently just requires you hold down shift when pressing the console key to open the console.
git-svn-id: https://svn.eduke32.com/eduke32@6325 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
6af5f3b478
commit
a9e513ecaf
4 changed files with 12 additions and 10 deletions
|
@ -197,7 +197,8 @@ enum osdflags_t
|
|||
OSD_OVERTYPE = 0x00000008,
|
||||
OSD_SHIFT = 0x00000010,
|
||||
OSD_CTRL = 0x00000020,
|
||||
OSD_CAPS = 0x00000040
|
||||
OSD_CAPS = 0x00000040,
|
||||
OSD_PROTECTED = 0x00000080,
|
||||
};
|
||||
|
||||
#define OSD_ALIAS (int32_t (*)(const osdfuncparm_t*))0x1337
|
||||
|
@ -242,7 +243,7 @@ void OSD_SetFunctions(void (*drawchar)(int32_t, int32_t, char, int32_t, int32_t)
|
|||
|
||||
// sets the parameters for presenting the text
|
||||
void OSD_SetParameters(int32_t promptShade, int32_t promptPal, int32_t editShade, int32_t editPal, int32_t textShade, int32_t textPal,
|
||||
char const *const errorStr, char const *const highlight);
|
||||
char const *const errorStr, char const *const highlight, uint32_t flags);
|
||||
|
||||
// sets the scancode for the key which activates the onscreen display
|
||||
void OSD_CaptureKey(uint8_t scanCode);
|
||||
|
|
|
@ -767,7 +767,7 @@ void OSD_SetFunctions(void (*drawchar)(int32_t, int32_t, char, int32_t, int32_t)
|
|||
// OSD_SetParameters() -- Sets the parameters for presenting the text
|
||||
//
|
||||
void OSD_SetParameters(int32_t promptShade, int32_t promptPal, int32_t editShade, int32_t editPal, int32_t textShade, int32_t textPal,
|
||||
char const * const errorStr, char const * const highlight)
|
||||
char const *const errorStr, char const *const highlight, uint32_t flags)
|
||||
{
|
||||
osddraw_t &draw = osd->draw;
|
||||
|
||||
|
@ -779,6 +779,8 @@ void OSD_SetParameters(int32_t promptShade, int32_t promptPal, int32_t editShade
|
|||
draw.textpal = textPal;
|
||||
draw.errorfmt = errorStr;
|
||||
draw.highlight = highlight;
|
||||
|
||||
osd->flags |= flags;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1191,7 +1193,7 @@ int OSD_HandleScanCode(uint8_t scanCode, int keyDown)
|
|||
|
||||
osddraw_t &draw = osd->draw;
|
||||
|
||||
if (scanCode == osd->keycode)
|
||||
if (scanCode == osd->keycode && (keystatus[sc_LeftShift] || (osd->flags & OSD_CAPTURE) || (osd->flags & OSD_PROTECTED) != OSD_PROTECTED))
|
||||
{
|
||||
if (keyDown)
|
||||
{
|
||||
|
|
|
@ -9974,7 +9974,7 @@ int32_t ExtInit(void)
|
|||
{
|
||||
int32_t rv = 0;
|
||||
|
||||
OSD_SetParameters(0, 2, 0, 0, 4, 0, OSD_ERROR, OSDTEXT_RED);
|
||||
OSD_SetParameters(0, 2, 0, 0, 4, 0, OSD_ERROR, OSDTEXT_RED, 0);
|
||||
|
||||
set_memerr_handler(&M32_HandleMemErr);
|
||||
|
||||
|
|
|
@ -6103,12 +6103,10 @@ int app_main(int argc, char const * const * argv)
|
|||
|
||||
G_ExtPreInit(argc, argv);
|
||||
|
||||
OSD_SetParameters(0,0, 0,12, 2,12, OSD_ERROR, OSDTEXT_RED);
|
||||
|
||||
#ifdef __APPLE__
|
||||
if (!g_useCwd)
|
||||
{
|
||||
char cwd[BMAX_PATH];
|
||||
char cwd[BMAX_PATH];
|
||||
char *homedir = Bgethomedir();
|
||||
if (homedir)
|
||||
Bsnprintf(cwd, sizeof(cwd), "%s/Library/Logs/eduke32.log", homedir);
|
||||
|
@ -6394,6 +6392,7 @@ int app_main(int argc, char const * const * argv)
|
|||
|
||||
Bsprintf(tempbuf, HEAD2 " %s", s_buildRev);
|
||||
OSD_SetVersion(tempbuf, 10,0);
|
||||
OSD_SetParameters(0, 0, 0, 12, 2, 12, OSD_ERROR, OSDTEXT_RED, gamefunctions[gamefunc_Show_Console][0] == '\0' ? OSD_PROTECTED : 0);
|
||||
registerosdcommands();
|
||||
|
||||
if (g_networkMode != NET_DEDICATED_SERVER)
|
||||
|
@ -6900,9 +6899,9 @@ int G_DoMoveThings(void)
|
|||
A_MoveCyclers();
|
||||
|
||||
if (g_netServer && (everyothertime % 10) == 0)
|
||||
{
|
||||
{
|
||||
Net_SendMapUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (g_netClient) //Slave
|
||||
|
|
Loading…
Reference in a new issue