mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- more cleanup of obsolete OSD code.
This commit is contained in:
parent
a4483f131d
commit
c46b22e52e
14 changed files with 30 additions and 164 deletions
|
@ -168,11 +168,6 @@ void G_Polymer_UnInit(void)
|
|||
// NUKE-TODO:
|
||||
}
|
||||
|
||||
void M32RunScript(const char *s)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(s);
|
||||
}
|
||||
|
||||
void ShutDown(void)
|
||||
{
|
||||
if (!in3dmode())
|
||||
|
@ -183,7 +178,6 @@ void ShutDown(void)
|
|||
sfxTerm();
|
||||
scrUnInit();
|
||||
CONTROL_Shutdown();
|
||||
OSD_Cleanup();
|
||||
// PORT_TODO: Check argument
|
||||
if (syncstate)
|
||||
printf("A packet was lost! (syncstate)\n");
|
||||
|
|
|
@ -487,15 +487,9 @@ enum {
|
|||
// -------------------------------
|
||||
|
||||
// NUKE-TODO:
|
||||
#define OSDTEXT_DEFAULT "^00"
|
||||
#define OSDTEXT_DARKRED "^00"
|
||||
#define OSDTEXT_GREEN "^00"
|
||||
#define OSDTEXT_RED "^00"
|
||||
#define OSDTEXT_YELLOW "^00"
|
||||
#include "v_text.h"
|
||||
|
||||
#define OSDTEXT_BRIGHT "^S0"
|
||||
|
||||
#define OSD_ERROR OSDTEXT_DARKRED OSDTEXT_BRIGHT
|
||||
|
||||
enum BLOOD_GLOBALFLAGS {
|
||||
BLOOD_FORCE_WIDELOADSCREEN = 1<<0,
|
||||
|
|
|
@ -153,18 +153,6 @@ static int osdcmd_demo(osdcmdptr_t parm)
|
|||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
int osdcmd_restartvid(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
videoResetMode();
|
||||
if (videoSetGameMode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP,0))
|
||||
ThrowError("restartvid: Reset failed...\n");
|
||||
onvideomodechange(ScreenBPP>8);
|
||||
viewResizeView(gViewSize);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
static int osdcmd_music(osdcmdptr_t parm)
|
||||
{
|
||||
char buffer[128];
|
||||
|
@ -266,8 +254,7 @@ static int osdcmd_crosshaircolor(osdcmdptr_t parm)
|
|||
g_isAlterDefaultCrosshair = true;
|
||||
viewSetCrosshairColor(r,g,b);
|
||||
|
||||
if (!OSD_ParsingScript())
|
||||
OSD_Printf("%s\n", parm->raw);
|
||||
OSD_Printf("%s\n", parm->raw);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -498,7 +485,6 @@ int32_t registerosdcommands(void)
|
|||
OSD_RegisterFunction("quicksave","quicksave: performs a quick save", osdcmd_quicksave);
|
||||
OSD_RegisterFunction("quickload","quickload: performs a quick load", osdcmd_quickload);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
OSD_RegisterFunction("restartvid","restartvid: reinitializes the video mode",osdcmd_restartvid);
|
||||
OSD_RegisterFunction("screenshot","screenshot [format]: takes a screenshot.", osdcmd_screenshot);
|
||||
|
||||
OSD_RegisterFunction("vidmode","vidmode <xdim> <ydim> <bpp> <fullscreen>: change the video mode",osdcmd_vidmode);
|
||||
|
|
|
@ -22,6 +22,7 @@ extern "C"
|
|||
#endif // _WIN32
|
||||
|
||||
int32_t g_borderless=2;
|
||||
bool GUICapture = false;
|
||||
|
||||
// input
|
||||
char inputdevices = 0;
|
||||
|
@ -34,7 +35,7 @@ bool g_mouseLockedToWindow = 1;
|
|||
|
||||
int32_t mouseReadAbs(vec2_t * const pResult, vec2_t const * const pInput)
|
||||
{
|
||||
if (!g_mouseEnabled || !appactive || !g_mouseInsideWindow || (osd && osd->flags & OSD_CAPTURE))
|
||||
if (!g_mouseEnabled || !appactive || !g_mouseInsideWindow || GUICapture)
|
||||
return 0;
|
||||
|
||||
int32_t const xwidth = max(scale(240<<16, xdim, ydim), 320<<16);
|
||||
|
|
|
@ -9574,13 +9574,13 @@ static void check_sprite(int32_t i)
|
|||
{
|
||||
if ((unsigned)sprite[i].statnum >= MAXSTATUS)
|
||||
{
|
||||
initprintf("%sMap error: sprite #%d (%d,%d) with illegal statnum (%d) REMOVED.\n", osd->draw.errorfmt,
|
||||
initprintf("Map error: sprite #%d (%d,%d) with illegal statnum (%d) REMOVED.\n",
|
||||
i, TrackerCast(sprite[i].x), TrackerCast(sprite[i].y), TrackerCast(sprite[i].statnum));
|
||||
remove_sprite(i);
|
||||
}
|
||||
else if ((unsigned)sprite[i].picnum >= MAXTILES)
|
||||
{
|
||||
initprintf("%sMap error: sprite #%d (%d,%d) with illegal picnum (%d) REMOVED.\n", osd->draw.errorfmt,
|
||||
initprintf("Map error: sprite #%d (%d,%d) with illegal picnum (%d) REMOVED.\n",
|
||||
i, TrackerCast(sprite[i].x), TrackerCast(sprite[i].y), TrackerCast(sprite[i].sectnum));
|
||||
remove_sprite(i);
|
||||
}
|
||||
|
@ -9594,7 +9594,7 @@ static void check_sprite(int32_t i)
|
|||
if (sprite[i].sectnum < 0)
|
||||
remove_sprite(i);
|
||||
|
||||
initprintf("%sMap error: sprite #%d (%d,%d) with illegal sector (%d) ", osd->draw.errorfmt,
|
||||
initprintf("Map error: sprite #%d (%d,%d) with illegal sector (%d) ",
|
||||
i, TrackerCast(sprite[i].x), TrackerCast(sprite[i].y), osectnum);
|
||||
|
||||
if (sprite[i].statnum != MAXSTATUS)
|
||||
|
@ -12773,35 +12773,6 @@ void printext256(int32_t xpos, int32_t ypos, int16_t col, int16_t backcol, const
|
|||
}
|
||||
|
||||
|
||||
#ifdef POLYMER
|
||||
static void PolymerProcessModels(void)
|
||||
{
|
||||
// potentially deferred MD3 postprocessing
|
||||
for (bssize_t i=0; i<nextmodelid; i++)
|
||||
{
|
||||
if (models[i]->mdnum==3 && ((md3model_t *)models[i])->head.surfs[0].geometry == NULL)
|
||||
{
|
||||
static int32_t warned=0;
|
||||
|
||||
if (!warned)
|
||||
{
|
||||
OSD_Printf("Post-processing MD3 models for Polymer. This may take a while...\n");
|
||||
videoNextPage();
|
||||
warned = 1;
|
||||
}
|
||||
|
||||
if (!md3postload_polymer((md3model_t *)models[i]))
|
||||
OSD_Printf("INTERNAL ERROR: mdmodel %s failed postprocessing!\n",
|
||||
((md3model_t *)models[i])->head.nam);
|
||||
|
||||
if (((md3model_t *)models[i])->head.surfs[0].geometry == NULL)
|
||||
OSD_Printf("INTERNAL ERROR: wtf?\n");
|
||||
}
|
||||
// else
|
||||
// OSD_Printf("mdmodel %d already postprocessed.\n", i);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
//
|
||||
// setrendermode
|
||||
|
@ -12817,26 +12788,8 @@ int32_t videoSetRenderMode(int32_t renderer)
|
|||
GLInterface.EnableAlphaTest(false);
|
||||
renderer = REND_CLASSIC;
|
||||
}
|
||||
# ifdef POLYMER
|
||||
else
|
||||
renderer = clamp(renderer, REND_POLYMOST, REND_POLYMER);
|
||||
|
||||
if (renderer == REND_POLYMER)
|
||||
{
|
||||
PolymerProcessModels();
|
||||
|
||||
if (!polymer_init())
|
||||
renderer = REND_POLYMOST;
|
||||
}
|
||||
else if (videoGetRenderMode() == REND_POLYMER) // going from Polymer to another renderer
|
||||
{
|
||||
engineClearLightsFromMHK();
|
||||
G_Polymer_UnInit();
|
||||
polymer_uninit();
|
||||
}
|
||||
# else
|
||||
else renderer = REND_POLYMOST;
|
||||
# endif
|
||||
|
||||
basepalreset = 1;
|
||||
|
||||
|
|
|
@ -593,19 +593,13 @@ void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
if (!smoothdurationp)
|
||||
{
|
||||
m->cframe = m->nframe = anim->startframe;
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (m->cframe >= m->numframes)
|
||||
OSD_Printf("2: c > n\n");
|
||||
#endif
|
||||
|
||||
goto prep_return;
|
||||
}
|
||||
|
||||
m->nframe = anim->startframe;
|
||||
m->cframe = smooth->mdoldframe;
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (m->cframe >= m->numframes)
|
||||
OSD_Printf("3: c > n\n");
|
||||
#endif
|
||||
|
||||
smooth->mdsmooth = 1;
|
||||
goto prep_return;
|
||||
}
|
||||
|
@ -633,10 +627,7 @@ void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
{
|
||||
m->nframe = anim ? anim->startframe : smooth->mdcurframe;
|
||||
m->cframe = smooth->mdoldframe;
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (m->cframe >= m->numframes)
|
||||
OSD_Printf("4: c > n\n");
|
||||
#endif
|
||||
|
||||
//OSD_Printf("smoothing... cframe %i nframe %i\n", m->cframe, m->nframe);
|
||||
if (k > 65535)
|
||||
{
|
||||
|
@ -644,10 +635,7 @@ void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
m->interpol = 0;
|
||||
smooth->mdsmooth = 0;
|
||||
m->cframe = m->nframe; // = anim ? anim->startframe : smooth->mdcurframe;
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (m->cframe >= m->numframes)
|
||||
OSD_Printf("5: c > n\n");
|
||||
#endif
|
||||
|
||||
smooth->mdoldframe = m->cframe;
|
||||
//OSD_Printf("smooth stopped !\n");
|
||||
goto prep_return;
|
||||
|
@ -658,10 +646,7 @@ void updateanimation(md2model_t *m, tspriteptr_t tspr, uint8_t lpal)
|
|||
if (anim)
|
||||
m->cframe = (i>>16)+anim->startframe;
|
||||
|
||||
#ifdef DEBUGGINGAIDS
|
||||
if (m->cframe >= m->numframes)
|
||||
OSD_Printf("6: c > n\n");
|
||||
#endif
|
||||
|
||||
m->nframe = m->cframe+1;
|
||||
|
||||
if (anim && m->nframe > anim->endframe) // VERIFY: (!(hw_animsmoothing && smooth->mdsmooth)) implies (anim!=NULL) ?
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
#include "m_argv.h"
|
||||
#include "cmdlib.h"
|
||||
#include "gamecontrol.h"
|
||||
#include "printf.h"
|
||||
|
||||
#include "vfs.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
@ -75,7 +76,7 @@ void WritePNGfile(FileWriter* file, const uint8_t* buffer, const PalEntry* palet
|
|||
!M_AppendPNGText(file, "Software", software) ||
|
||||
!M_FinishPNG(file))
|
||||
{
|
||||
OSD_Printf("Failed writing screenshot\n");
|
||||
Printf("Failed writing screenshot\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,7 +160,7 @@ int videoCaptureScreen()
|
|||
|
||||
WritePNGfile(&writer, imgBuf, Palette, HICOLOR ? SS_RGB : SS_PAL, xdim, ydim, HICOLOR? xdim*3 : xdim, png_gamma);
|
||||
Xfree(imgBuf);
|
||||
OSD_Printf("Saved screenshot to %s\n", fn);
|
||||
Printf("Saved screenshot to %s\n", fn);
|
||||
capturecounter.count++;
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -82,6 +82,16 @@ struct FBrokenLines
|
|||
#define TEXTCOLOR_CHAT "\034*"
|
||||
#define TEXTCOLOR_TEAMCHAT "\034!"
|
||||
|
||||
#define OSDTEXT_DEFAULT TEXTCOLOR_GRAY
|
||||
#define OSDTEXT_DARKRED TEXTCOLOR_DARKRED
|
||||
#define OSDTEXT_GREEN TEXTCOLOR_GREEN
|
||||
#define OSDTEXT_RED TEXTCOLOR_RED
|
||||
#define OSDTEXT_YELLOW TEXTCOLOR_GOLD
|
||||
|
||||
#define OSDTEXT_BRIGHT ""
|
||||
|
||||
#define OSD_ERROR TEXTCOLOR_RED
|
||||
|
||||
|
||||
extern int NumTextColors;
|
||||
|
||||
|
|
|
@ -43,15 +43,7 @@ typedef enum basepal_ {
|
|||
BASEPALCOUNT
|
||||
} basepal_t;
|
||||
|
||||
#define OSDTEXT_DEFAULT "^00"
|
||||
#define OSDTEXT_DARKRED "^10"
|
||||
#define OSDTEXT_GREEN "^11"
|
||||
#define OSDTEXT_RED "^21"
|
||||
#define OSDTEXT_YELLOW "^23"
|
||||
|
||||
#define OSDTEXT_BRIGHT "^S0"
|
||||
|
||||
#define OSD_ERROR OSDTEXT_DARKRED OSDTEXT_BRIGHT
|
||||
#include "v_text.h"
|
||||
|
||||
extern int loaddefinitions_game(const char *fn, int32_t preload);
|
||||
|
||||
|
|
|
@ -372,18 +372,6 @@ static int osdcmd_music(osdcmdptr_t parm)
|
|||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
int osdcmd_restartvid(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
videoResetMode();
|
||||
if (videoSetGameMode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP,ud.detail))
|
||||
G_GameExit("restartvid: Reset failed...\n");
|
||||
onvideomodechange(ScreenBPP>8);
|
||||
G_UpdateScreenArea();
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
int osdcmd_restartmap(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
@ -712,8 +700,7 @@ static int osdcmd_crosshaircolor(osdcmdptr_t parm)
|
|||
|
||||
G_SetCrosshairColor(r,g,b);
|
||||
|
||||
if (!OSD_ParsingScript())
|
||||
OSD_Printf("%s\n", parm->raw);
|
||||
OSD_Printf("%s\n", parm->raw);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -1152,8 +1139,7 @@ int32_t registerosdcommands(void)
|
|||
|
||||
OSD_RegisterFunction("restartmap", "restartmap: restarts the current map", osdcmd_restartmap);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
OSD_RegisterFunction("restartvid","restartvid: reinitializes the video mode",osdcmd_restartvid);
|
||||
OSD_RegisterFunction("addlogvar","addlogvar <gamevar>: prints the value of a gamevar", osdcmd_addlogvar);
|
||||
OSD_RegisterFunction("addlogvar","addlogvar <gamevar>: prints the value of a gamevar", osdcmd_addlogvar);
|
||||
OSD_RegisterFunction("setvar","setvar <gamevar> <value>: sets the value of a gamevar", osdcmd_setvar);
|
||||
OSD_RegisterFunction("setvarvar","setvarvar <gamevar1> <gamevar2>: sets the value of <gamevar1> to <gamevar2>", osdcmd_setvar);
|
||||
OSD_RegisterFunction("setactorvar","setactorvar <actor#> <gamevar> <value>: sets the value of <actor#>'s <gamevar> to <value>", osdcmd_setactorvar);
|
||||
|
|
|
@ -46,15 +46,8 @@ typedef enum basepal_ {
|
|||
BASEPALCOUNT
|
||||
} basepal_t;
|
||||
|
||||
#define OSDTEXT_DEFAULT "^00"
|
||||
#define OSDTEXT_DARKRED "^10"
|
||||
#define OSDTEXT_GREEN "^11"
|
||||
#define OSDTEXT_RED "^21"
|
||||
#define OSDTEXT_YELLOW "^23"
|
||||
#include "v_text.h"
|
||||
|
||||
#define OSDTEXT_BRIGHT "^S0"
|
||||
|
||||
#define OSD_ERROR OSDTEXT_DARKRED OSDTEXT_BRIGHT
|
||||
|
||||
extern int loaddefinitions_game(const char *fn, int32_t preload);
|
||||
|
||||
|
|
|
@ -367,18 +367,6 @@ static int osdcmd_music(osdcmdptr_t parm)
|
|||
return OSDCMD_SHOWHELP;
|
||||
}
|
||||
|
||||
int osdcmd_restartvid(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
videoResetMode();
|
||||
if (videoSetGameMode(ScreenMode,ScreenWidth,ScreenHeight,ScreenBPP,ud.detail))
|
||||
G_GameExit("restartvid: Reset failed...\n");
|
||||
onvideomodechange(ScreenBPP>8);
|
||||
G_UpdateScreenArea();
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
int osdcmd_restartmap(osdcmdptr_t UNUSED(parm))
|
||||
{
|
||||
UNREFERENCED_CONST_PARAMETER(parm);
|
||||
|
@ -567,8 +555,7 @@ static int osdcmd_crosshaircolor(osdcmdptr_t parm)
|
|||
|
||||
G_SetCrosshairColor(r,g,b);
|
||||
|
||||
if (!OSD_ParsingScript())
|
||||
OSD_Printf("%s\n", parm->raw);
|
||||
OSD_Printf("%s\n", parm->raw);
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
@ -962,7 +949,6 @@ int32_t registerosdcommands(void)
|
|||
|
||||
OSD_RegisterFunction("restartmap", "restartmap: restarts the current map", osdcmd_restartmap);
|
||||
OSD_RegisterFunction("restartsound","restartsound: reinitializes the sound system",osdcmd_restartsound);
|
||||
OSD_RegisterFunction("restartvid","restartvid: reinitializes the video mode",osdcmd_restartvid);
|
||||
|
||||
OSD_RegisterFunction("screenshot","screenshot [format]: takes a screenshot.", osdcmd_screenshot);
|
||||
|
||||
|
|
|
@ -4990,19 +4990,8 @@ StdRandomRange(int range)
|
|||
}
|
||||
|
||||
// [JM] Probably will need some doing over. !CHECKME!
|
||||
void M32RunScript(const char *s) { UNREFERENCED_PARAMETER(s); }
|
||||
void G_Polymer_UnInit(void) { }
|
||||
|
||||
int osdcmd_restartvid(const osdfuncparm_t *parm)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(parm);
|
||||
|
||||
videoResetMode();
|
||||
if (videoSetGameMode(fullscreen, xdim, ydim, bpp, upscalefactor))
|
||||
buildputs("restartvid: Reset failed...\n");
|
||||
|
||||
return OSDCMD_OK;
|
||||
}
|
||||
|
||||
#include "saveable.h"
|
||||
|
||||
|
|
|
@ -690,10 +690,6 @@ SWBOOL MNU_KeySetupCustom(UserCall call, MenuItem *item)
|
|||
KeyboardKeys[currentkey][1]);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
OSD_CaptureKey(inputState.GetLastScanCode());
|
||||
}
|
||||
|
||||
currentmode = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue