Merge remote-tracking branch 'origin/master' into next
This commit is contained in:
commit
aca39d6210
|
@ -19,10 +19,10 @@ boolean allow_fullscreen = false;
|
||||||
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
void I_StartupGraphics(void){}
|
void I_StartupGraphics(void){}
|
||||||
void I_StartupHardwareGraphics(void){}
|
|
||||||
|
|
||||||
void I_ShutdownGraphics(void){}
|
void I_ShutdownGraphics(void){}
|
||||||
|
|
||||||
|
void VID_StartupOpenGL(void){}
|
||||||
|
|
||||||
void I_SetPalette(RGBA_t *palette)
|
void I_SetPalette(RGBA_t *palette)
|
||||||
{
|
{
|
||||||
(void)palette;
|
(void)palette;
|
||||||
|
@ -52,10 +52,8 @@ INT32 VID_SetMode(INT32 modenum)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VID_CheckRenderer(void)
|
void VID_CheckRenderer(void) {}
|
||||||
{
|
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||||
// ..............
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *VID_GetModeName(INT32 modenum)
|
const char *VID_GetModeName(INT32 modenum)
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,6 +97,7 @@ static void CON_InputInit(void);
|
||||||
static void CON_RecalcSize(void);
|
static void CON_RecalcSize(void);
|
||||||
static void CON_ChangeHeight(void);
|
static void CON_ChangeHeight(void);
|
||||||
|
|
||||||
|
static void CON_DrawBackpic(void);
|
||||||
static void CONS_hudlines_Change(void);
|
static void CONS_hudlines_Change(void);
|
||||||
static void CONS_backcolor_Change(void);
|
static void CONS_backcolor_Change(void);
|
||||||
|
|
||||||
|
@ -1530,6 +1531,51 @@ static void CON_DrawHudlines(void)
|
||||||
con_clearlines = y; // this is handled by HU_Erase();
|
con_clearlines = y; // this is handled by HU_Erase();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Lactozilla: Draws the console's background picture.
|
||||||
|
static void CON_DrawBackpic(void)
|
||||||
|
{
|
||||||
|
patch_t *con_backpic;
|
||||||
|
lumpnum_t piclump;
|
||||||
|
int x, w, h;
|
||||||
|
|
||||||
|
// Get the lumpnum for CONSBACK, or fallback into MISSING.
|
||||||
|
piclump = W_CheckNumForName("CONSBACK");
|
||||||
|
if (piclump == LUMPERROR)
|
||||||
|
piclump = W_GetNumForName("MISSING");
|
||||||
|
|
||||||
|
// Cache the Software patch.
|
||||||
|
con_backpic = W_CacheSoftwarePatchNum(piclump, PU_PATCH);
|
||||||
|
|
||||||
|
// Center the backpic, and draw a vertically cropped patch.
|
||||||
|
w = (con_backpic->width * vid.dupx);
|
||||||
|
x = (vid.width / 2) - (w / 2);
|
||||||
|
h = con_curlines/vid.dupy;
|
||||||
|
|
||||||
|
// If the patch doesn't fill the entire screen,
|
||||||
|
// then fill the sides with a solid color.
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
column_t *column = (column_t *)((UINT8 *)(con_backpic) + LONG(con_backpic->columnofs[0]));
|
||||||
|
if (!column->topdelta)
|
||||||
|
{
|
||||||
|
UINT8 *source = (UINT8 *)(column) + 3;
|
||||||
|
INT32 color = (source[0] | V_NOSCALESTART);
|
||||||
|
// left side
|
||||||
|
V_DrawFill(0, 0, x, con_curlines, color);
|
||||||
|
// right side
|
||||||
|
V_DrawFill((x + w), 0, (vid.width - w), con_curlines, color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Cache the patch normally.
|
||||||
|
con_backpic = W_CachePatchNum(piclump, PU_PATCH);
|
||||||
|
V_DrawCroppedPatch(x << FRACBITS, 0, FRACUNIT, V_NOSCALESTART, con_backpic,
|
||||||
|
0, ( BASEVIDHEIGHT - h ), BASEVIDWIDTH, h);
|
||||||
|
|
||||||
|
// Unlock the cached patch.
|
||||||
|
W_UnlockCachedPatch(con_backpic);
|
||||||
|
}
|
||||||
|
|
||||||
// draw the console background, text, and prompt if enough place
|
// draw the console background, text, and prompt if enough place
|
||||||
//
|
//
|
||||||
static void CON_DrawConsole(void)
|
static void CON_DrawConsole(void)
|
||||||
|
@ -1551,19 +1597,7 @@ static void CON_DrawConsole(void)
|
||||||
|
|
||||||
// draw console background
|
// draw console background
|
||||||
if (cons_backpic.value || con_forcepic)
|
if (cons_backpic.value || con_forcepic)
|
||||||
{
|
CON_DrawBackpic();
|
||||||
patch_t *con_backpic = W_CachePatchName("CONSBACK", PU_PATCH);
|
|
||||||
int h;
|
|
||||||
|
|
||||||
h = con_curlines/vid.dupy;
|
|
||||||
|
|
||||||
// Jimita: CON_DrawBackpic just called V_DrawScaledPatch
|
|
||||||
//V_DrawScaledPatch(0, 0, 0, con_backpic);
|
|
||||||
V_DrawCroppedPatch(0, 0, FRACUNIT, 0, con_backpic,
|
|
||||||
0, ( BASEVIDHEIGHT - h ), BASEVIDWIDTH, h);
|
|
||||||
|
|
||||||
W_UnlockCachedPatch(con_backpic);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// inu: no more width (was always 0 and vid.width)
|
// inu: no more width (was always 0 and vid.width)
|
||||||
|
|
|
@ -1284,11 +1284,10 @@ void D_SRB2Main(void)
|
||||||
|
|
||||||
// Set cv_renderer to the new render mode
|
// Set cv_renderer to the new render mode
|
||||||
VID_CheckRenderer();
|
VID_CheckRenderer();
|
||||||
SCR_ChangeRendererCVars(setrenderneeded);
|
SCR_ChangeRendererCVars(rendermode);
|
||||||
|
|
||||||
// check the renderer's state, and then clear setrenderneeded
|
// check the renderer's state
|
||||||
D_CheckRendererState();
|
D_CheckRendererState();
|
||||||
setrenderneeded = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wipegamestate = gamestate;
|
wipegamestate = gamestate;
|
||||||
|
|
|
@ -339,7 +339,4 @@ void I_StartupGraphics(void)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_StartupHardwareGraphics(void)
|
void VID_StartupOpenGL(void) {}
|
||||||
{
|
|
||||||
// oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo y
|
|
||||||
}
|
|
||||||
|
|
|
@ -378,10 +378,8 @@ INT32 VID_SetMode (INT32 modenum) //, UINT8 *palette)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VID_CheckRenderer(void)
|
void VID_CheckRenderer(void) {}
|
||||||
{
|
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||||
// ..............
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,10 @@ boolean allow_fullscreen = false;
|
||||||
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
consvar_t cv_vidwait = {"vid_wait", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
void I_StartupGraphics(void){}
|
void I_StartupGraphics(void){}
|
||||||
void I_StartupHardwareGraphics(void){}
|
|
||||||
|
|
||||||
void I_ShutdownGraphics(void){}
|
void I_ShutdownGraphics(void){}
|
||||||
|
|
||||||
|
void VID_StartupOpenGL(void){}
|
||||||
|
|
||||||
void I_SetPalette(RGBA_t *palette)
|
void I_SetPalette(RGBA_t *palette)
|
||||||
{
|
{
|
||||||
(void)palette;
|
(void)palette;
|
||||||
|
@ -40,10 +40,8 @@ INT32 VID_SetMode(INT32 modenum)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VID_CheckRenderer(void)
|
void VID_CheckRenderer(void) {}
|
||||||
{
|
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||||
// ..............
|
|
||||||
}
|
|
||||||
|
|
||||||
const char *VID_GetModeName(INT32 modenum)
|
const char *VID_GetModeName(INT32 modenum)
|
||||||
{
|
{
|
||||||
|
|
|
@ -291,7 +291,7 @@ void HWR_DrawStretchyFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t
|
||||||
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
||||||
{
|
{
|
||||||
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
||||||
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
patch_t *realpatch = W_CacheSoftwarePatchNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||||
const column_t *column = (const column_t *)((const UINT8 *)(realpatch) + LONG((realpatch)->columnofs[0]));
|
const column_t *column = (const column_t *)((const UINT8 *)(realpatch) + LONG((realpatch)->columnofs[0]));
|
||||||
if (!column->topdelta)
|
if (!column->topdelta)
|
||||||
{
|
{
|
||||||
|
@ -450,7 +450,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
|
||||||
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
if (cx >= -0.1f && cx <= 0.1f && SHORT(gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && SHORT(gpatch->height) == BASEVIDHEIGHT)
|
||||||
{
|
{
|
||||||
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
// Need to temporarily cache the real patch to get the colour of the top left pixel
|
||||||
patch_t *realpatch = W_CacheLumpNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
patch_t *realpatch = W_CacheSoftwarePatchNumPwad(gpatch->wadnum, gpatch->lumpnum, PU_STATIC);
|
||||||
const column_t *column = (const column_t *)((const UINT8 *)(realpatch) + LONG((realpatch)->columnofs[0]));
|
const column_t *column = (const column_t *)((const UINT8 *)(realpatch) + LONG((realpatch)->columnofs[0]));
|
||||||
if (!column->topdelta)
|
if (!column->topdelta)
|
||||||
{
|
{
|
||||||
|
|
|
@ -3983,6 +3983,9 @@ static void HWR_DrawDropShadow(mobj_t *thing, gr_vissprite_t *spr, fixed_t scale
|
||||||
{
|
{
|
||||||
light = R_GetPlaneLight(thing->subsector->sector, floorz, false); // Always use the light at the top instead of whatever I was doing before
|
light = R_GetPlaneLight(thing->subsector->sector, floorz, false); // Always use the light at the top instead of whatever I was doing before
|
||||||
|
|
||||||
|
if (*thing->subsector->sector->lightlist[light].lightlevel > 255)
|
||||||
|
lightlevel = 255;
|
||||||
|
else
|
||||||
lightlevel = *thing->subsector->sector->lightlist[light].lightlevel;
|
lightlevel = *thing->subsector->sector->lightlist[light].lightlevel;
|
||||||
|
|
||||||
if (*thing->subsector->sector->lightlist[light].extra_colormap)
|
if (*thing->subsector->sector->lightlist[light].extra_colormap)
|
||||||
|
@ -4184,7 +4187,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
||||||
if (h <= temp)
|
if (h <= temp)
|
||||||
{
|
{
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = *list[i-1].lightlevel;
|
lightlevel = *list[i-1].lightlevel > 255 ? 255 : *list[i-1].lightlevel;
|
||||||
colormap = *list[i-1].extra_colormap;
|
colormap = *list[i-1].extra_colormap;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4199,7 +4202,7 @@ static void HWR_SplitSprite(gr_vissprite_t *spr)
|
||||||
if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES))
|
if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES))
|
||||||
{
|
{
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = *list[i].lightlevel;
|
lightlevel = *list[i].lightlevel > 255 ? 255 : *list[i].lightlevel;
|
||||||
colormap = *list[i].extra_colormap;
|
colormap = *list[i].extra_colormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4420,7 +4423,7 @@ static void HWR_DrawSprite(gr_vissprite_t *spr)
|
||||||
extracolormap_t *colormap = sector->extra_colormap;
|
extracolormap_t *colormap = sector->extra_colormap;
|
||||||
|
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = sector->lightlevel;
|
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||||
|
|
||||||
if (colormap)
|
if (colormap)
|
||||||
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false);
|
Surf.FlatColor.rgba = HWR_Lighting(lightlevel, colormap->rgba, colormap->fadergba, false, false);
|
||||||
|
@ -4517,7 +4520,7 @@ static inline void HWR_DrawPrecipitationSprite(gr_vissprite_t *spr)
|
||||||
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
||||||
|
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = *sector->lightlist[light].lightlevel;
|
lightlevel = *sector->lightlist[light].lightlevel > 255 ? 255 : *sector->lightlist[light].lightlevel;
|
||||||
|
|
||||||
if (*sector->lightlist[light].extra_colormap)
|
if (*sector->lightlist[light].extra_colormap)
|
||||||
colormap = *sector->lightlist[light].extra_colormap;
|
colormap = *sector->lightlist[light].extra_colormap;
|
||||||
|
@ -4525,7 +4528,7 @@ static inline void HWR_DrawPrecipitationSprite(gr_vissprite_t *spr)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = sector->lightlevel;
|
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||||
|
|
||||||
if (sector->extra_colormap)
|
if (sector->extra_colormap)
|
||||||
colormap = sector->extra_colormap;
|
colormap = sector->extra_colormap;
|
||||||
|
@ -6346,7 +6349,6 @@ void HWR_Shutdown(void)
|
||||||
CONS_Printf("HWR_Shutdown()\n");
|
CONS_Printf("HWR_Shutdown()\n");
|
||||||
HWR_FreeExtraSubsectors();
|
HWR_FreeExtraSubsectors();
|
||||||
HWR_FreePolyPool();
|
HWR_FreePolyPool();
|
||||||
HWR_FreeMipmapCache();
|
|
||||||
HWR_FreeTextureCache();
|
HWR_FreeTextureCache();
|
||||||
HWD.pfnFlushScreenTextures();
|
HWD.pfnFlushScreenTextures();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1221,7 +1221,7 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
||||||
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
light = R_GetPlaneLight(sector, spr->mobj->z + spr->mobj->height, false); // Always use the light at the top instead of whatever I was doing before
|
||||||
|
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = *sector->lightlist[light].lightlevel;
|
lightlevel = *sector->lightlist[light].lightlevel > 255 ? 255 : *sector->lightlist[light].lightlevel;
|
||||||
|
|
||||||
if (*sector->lightlist[light].extra_colormap)
|
if (*sector->lightlist[light].extra_colormap)
|
||||||
colormap = *sector->lightlist[light].extra_colormap;
|
colormap = *sector->lightlist[light].extra_colormap;
|
||||||
|
@ -1229,7 +1229,7 @@ boolean HWR_DrawModel(gr_vissprite_t *spr)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
if (!(spr->mobj->frame & FF_FULLBRIGHT))
|
||||||
lightlevel = sector->lightlevel;
|
lightlevel = sector->lightlevel > 255 ? 255 : sector->lightlevel;
|
||||||
|
|
||||||
if (sector->extra_colormap)
|
if (sector->extra_colormap)
|
||||||
colormap = sector->extra_colormap;
|
colormap = sector->extra_colormap;
|
||||||
|
|
|
@ -36,10 +36,10 @@ typedef enum
|
||||||
*/
|
*/
|
||||||
extern rendermode_t rendermode;
|
extern rendermode_t rendermode;
|
||||||
|
|
||||||
/** \brief hardware renderer loaded
|
/** \brief OpenGL state
|
||||||
0 = never loaded, 1 = loaded successfully, -1 = failed loading
|
0 = never loaded, 1 = loaded successfully, -1 = failed loading
|
||||||
*/
|
*/
|
||||||
extern INT32 hwrenderloaded;
|
extern INT32 vid_opengl_state;
|
||||||
|
|
||||||
/** \brief use highcolor modes if true
|
/** \brief use highcolor modes if true
|
||||||
*/
|
*/
|
||||||
|
@ -49,11 +49,7 @@ extern boolean highcolor;
|
||||||
*/
|
*/
|
||||||
void I_StartupGraphics(void);
|
void I_StartupGraphics(void);
|
||||||
|
|
||||||
/** \brief setup hardware mode
|
/** \brief shutdown video mode
|
||||||
*/
|
|
||||||
void I_StartupHardwareGraphics(void);
|
|
||||||
|
|
||||||
/** \brief restore old video mode
|
|
||||||
*/
|
*/
|
||||||
void I_ShutdownGraphics(void);
|
void I_ShutdownGraphics(void);
|
||||||
|
|
||||||
|
@ -97,6 +93,14 @@ INT32 VID_SetMode(INT32 modenum);
|
||||||
*/
|
*/
|
||||||
void VID_CheckRenderer(void);
|
void VID_CheckRenderer(void);
|
||||||
|
|
||||||
|
/** \brief Load OpenGL mode
|
||||||
|
*/
|
||||||
|
void VID_StartupOpenGL(void);
|
||||||
|
|
||||||
|
/** \brief Checks if OpenGL loaded
|
||||||
|
*/
|
||||||
|
void VID_CheckGLLoaded(rendermode_t oldrender);
|
||||||
|
|
||||||
/** \brief The VID_GetModeName function
|
/** \brief The VID_GetModeName function
|
||||||
|
|
||||||
\param modenum video mode number
|
\param modenum video mode number
|
||||||
|
|
|
@ -38,8 +38,20 @@ typedef INT32 fixed_t;
|
||||||
/*!
|
/*!
|
||||||
\brief convert fixed_t into floating number
|
\brief convert fixed_t into floating number
|
||||||
*/
|
*/
|
||||||
#define FIXED_TO_FLOAT(x) (((float)(x)) / ((float)FRACUNIT))
|
|
||||||
#define FLOAT_TO_FIXED(f) (fixed_t)((f) * ((float)FRACUNIT))
|
FUNCMATH FUNCINLINE static ATTRINLINE float FixedToFloat(fixed_t x)
|
||||||
|
{
|
||||||
|
return x / (float)FRACUNIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
FUNCMATH FUNCINLINE static ATTRINLINE fixed_t FloatToFixed(float f)
|
||||||
|
{
|
||||||
|
return (fixed_t)(f * FRACUNIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
// for backwards compat
|
||||||
|
#define FIXED_TO_FLOAT(x) FixedToFloat(x) // (((float)(x)) / ((float)FRACUNIT))
|
||||||
|
#define FLOAT_TO_FIXED(f) FloatToFixed(f) // (fixed_t)((f) * ((float)FRACUNIT))
|
||||||
|
|
||||||
|
|
||||||
#if defined (__WATCOMC__) && FRACBITS == 16
|
#if defined (__WATCOMC__) && FRACBITS == 16
|
||||||
|
|
29
src/m_menu.c
29
src/m_menu.c
|
@ -522,6 +522,8 @@ static menuitem_t MISC_AddonsMenu[] =
|
||||||
// ---------------------------------
|
// ---------------------------------
|
||||||
static menuitem_t MAPauseMenu[] =
|
static menuitem_t MAPauseMenu[] =
|
||||||
{
|
{
|
||||||
|
{IT_CALL | IT_STRING, NULL, "Emblem Hints...", M_EmblemHints, 32},
|
||||||
|
|
||||||
{IT_CALL | IT_STRING, NULL, "Continue", M_SelectableClearMenus,48},
|
{IT_CALL | IT_STRING, NULL, "Continue", M_SelectableClearMenus,48},
|
||||||
{IT_CALL | IT_STRING, NULL, "Retry", M_ModeAttackRetry, 56},
|
{IT_CALL | IT_STRING, NULL, "Retry", M_ModeAttackRetry, 56},
|
||||||
{IT_CALL | IT_STRING, NULL, "Abort", M_ModeAttackEndGame, 64},
|
{IT_CALL | IT_STRING, NULL, "Abort", M_ModeAttackEndGame, 64},
|
||||||
|
@ -529,6 +531,7 @@ static menuitem_t MAPauseMenu[] =
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
|
mapause_hints,
|
||||||
mapause_continue,
|
mapause_continue,
|
||||||
mapause_retry,
|
mapause_retry,
|
||||||
mapause_abort
|
mapause_abort
|
||||||
|
@ -732,7 +735,7 @@ static menuitem_t SR_EmblemHintMenu[] =
|
||||||
{
|
{
|
||||||
{IT_STRING | IT_ARROWS, NULL, "Page", M_HandleEmblemHints, 10},
|
{IT_STRING | IT_ARROWS, NULL, "Page", M_HandleEmblemHints, 10},
|
||||||
{IT_STRING|IT_CVAR, NULL, "Emblem Radar", &cv_itemfinder, 20},
|
{IT_STRING|IT_CVAR, NULL, "Emblem Radar", &cv_itemfinder, 20},
|
||||||
{IT_WHITESTRING|IT_SUBMENU, NULL, "Back", &SPauseDef, 30}
|
{IT_WHITESTRING|IT_CALL, NULL, "Back", M_GoBack, 30}
|
||||||
};
|
};
|
||||||
|
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
|
@ -2098,7 +2101,7 @@ static void M_VideoOptions(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)choice;
|
(void)choice;
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (hwrenderloaded == -1)
|
if (vid_opengl_state == -1)
|
||||||
{
|
{
|
||||||
OP_VideoOptionsMenu[op_video_renderer].status = (IT_TRANSTEXT | IT_PAIR);
|
OP_VideoOptionsMenu[op_video_renderer].status = (IT_TRANSTEXT | IT_PAIR);
|
||||||
OP_VideoOptionsMenu[op_video_renderer].patch = "Renderer";
|
OP_VideoOptionsMenu[op_video_renderer].patch = "Renderer";
|
||||||
|
@ -3634,6 +3637,7 @@ void M_StartControlPanel(void)
|
||||||
else if (modeattacking)
|
else if (modeattacking)
|
||||||
{
|
{
|
||||||
currentMenu = &MAPauseDef;
|
currentMenu = &MAPauseDef;
|
||||||
|
MAPauseMenu[mapause_hints].status = (M_SecretUnlocked(SECRET_EMBLEMHINTS)) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
|
||||||
itemOn = mapause_continue;
|
itemOn = mapause_continue;
|
||||||
}
|
}
|
||||||
else if (!(netgame || multiplayer)) // Single Player
|
else if (!(netgame || multiplayer)) // Single Player
|
||||||
|
@ -7304,6 +7308,7 @@ static void M_EmblemHints(INT32 choice)
|
||||||
SR_EmblemHintMenu[0].status = (local > NUMHINTS*2) ? (IT_STRING | IT_ARROWS) : (IT_DISABLED);
|
SR_EmblemHintMenu[0].status = (local > NUMHINTS*2) ? (IT_STRING | IT_ARROWS) : (IT_DISABLED);
|
||||||
SR_EmblemHintMenu[1].status = (M_SecretUnlocked(SECRET_ITEMFINDER)) ? (IT_CVAR|IT_STRING) : (IT_SECRET);
|
SR_EmblemHintMenu[1].status = (M_SecretUnlocked(SECRET_ITEMFINDER)) ? (IT_CVAR|IT_STRING) : (IT_SECRET);
|
||||||
hintpage = 1;
|
hintpage = 1;
|
||||||
|
SR_EmblemHintDef.prevMenu = currentMenu;
|
||||||
M_SetupNextMenu(&SR_EmblemHintDef);
|
M_SetupNextMenu(&SR_EmblemHintDef);
|
||||||
itemOn = 2; // always start on back.
|
itemOn = 2; // always start on back.
|
||||||
}
|
}
|
||||||
|
@ -7984,12 +7989,20 @@ static void M_CustomLevelSelect(INT32 choice)
|
||||||
static void M_SinglePlayerMenu(INT32 choice)
|
static void M_SinglePlayerMenu(INT32 choice)
|
||||||
{
|
{
|
||||||
(void)choice;
|
(void)choice;
|
||||||
SP_MainMenu[sptutorial].status =
|
|
||||||
tutorialmap ? IT_CALL|IT_STRING : IT_NOTHING|IT_DISABLED;
|
levellistmode = LLM_RECORDATTACK;
|
||||||
SP_MainMenu[sprecordattack].status =
|
if (M_GametypeHasLevels(-1))
|
||||||
(M_SecretUnlocked(SECRET_RECORDATTACK)) ? IT_CALL|IT_STRING : IT_SECRET;
|
SP_MainMenu[sprecordattack].status = (M_SecretUnlocked(SECRET_RECORDATTACK)) ? IT_CALL|IT_STRING : IT_SECRET;
|
||||||
SP_MainMenu[spnightsmode].status =
|
else
|
||||||
(M_SecretUnlocked(SECRET_NIGHTSMODE)) ? IT_CALL|IT_STRING : IT_SECRET;
|
SP_MainMenu[sprecordattack].status = IT_NOTHING|IT_DISABLED;
|
||||||
|
|
||||||
|
levellistmode = LLM_NIGHTSATTACK;
|
||||||
|
if (M_GametypeHasLevels(-1))
|
||||||
|
SP_MainMenu[spnightsmode].status = (M_SecretUnlocked(SECRET_NIGHTSMODE)) ? IT_CALL|IT_STRING : IT_SECRET;
|
||||||
|
else
|
||||||
|
SP_MainMenu[spnightsmode].status = IT_NOTHING|IT_DISABLED;
|
||||||
|
|
||||||
|
SP_MainMenu[sptutorial].status = tutorialmap ? IT_CALL|IT_STRING : IT_NOTHING|IT_DISABLED;
|
||||||
|
|
||||||
M_SetupNextMenu(&SP_MainDef);
|
M_SetupNextMenu(&SP_MainDef);
|
||||||
}
|
}
|
||||||
|
|
|
@ -449,7 +449,7 @@ void SCR_ActuallyChangeRenderer(void)
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
// Well, it didn't even load anyway.
|
// Well, it didn't even load anyway.
|
||||||
if ((hwrenderloaded == -1) && (setrenderneeded == render_opengl))
|
if ((vid_opengl_state == -1) && (setrenderneeded == render_opengl))
|
||||||
{
|
{
|
||||||
if (M_CheckParm("-nogl"))
|
if (M_CheckParm("-nogl"))
|
||||||
CONS_Alert(CONS_ERROR, "OpenGL rendering was disabled!\n");
|
CONS_Alert(CONS_ERROR, "OpenGL rendering was disabled!\n");
|
||||||
|
@ -474,7 +474,7 @@ void SCR_ChangeRenderer(void)
|
||||||
{
|
{
|
||||||
target_renderer = cv_renderer.value;
|
target_renderer = cv_renderer.value;
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (M_CheckParm("-opengl") && (hwrenderloaded == 1))
|
if (M_CheckParm("-opengl") && (vid_opengl_state == 1))
|
||||||
target_renderer = rendermode = render_opengl;
|
target_renderer = rendermode = render_opengl;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -104,7 +104,7 @@ static consvar_t cv_stretch = {"stretch", "Off", CV_SAVE|CV_NOSHOWHELP, CV_OnOff
|
||||||
static consvar_t cv_alwaysgrabmouse = {"alwaysgrabmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
static consvar_t cv_alwaysgrabmouse = {"alwaysgrabmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||||
|
|
||||||
UINT8 graphics_started = 0; // Is used in console.c and screen.c
|
UINT8 graphics_started = 0; // Is used in console.c and screen.c
|
||||||
INT32 hwrenderloaded = 0;
|
INT32 vid_opengl_state = 0;
|
||||||
|
|
||||||
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
// To disable fullscreen at startup; is set in VID_PrepareModeList
|
||||||
boolean allow_fullscreen = false;
|
boolean allow_fullscreen = false;
|
||||||
|
@ -1440,7 +1440,7 @@ static SDL_bool Impl_CreateContext(void)
|
||||||
{
|
{
|
||||||
// Renderer-specific stuff
|
// Renderer-specific stuff
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if ((rendermode == render_opengl) && (hwrenderloaded != -1))
|
if ((rendermode == render_opengl) && (vid_opengl_state != -1))
|
||||||
{
|
{
|
||||||
if (!sdlglcontext)
|
if (!sdlglcontext)
|
||||||
sdlglcontext = SDL_GL_CreateContext(window);
|
sdlglcontext = SDL_GL_CreateContext(window);
|
||||||
|
@ -1473,10 +1473,10 @@ static SDL_bool Impl_CreateContext(void)
|
||||||
return SDL_TRUE;
|
return SDL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HWRENDER
|
void VID_CheckGLLoaded(rendermode_t oldrender)
|
||||||
static void VID_CheckGLLoaded(rendermode_t oldrender)
|
|
||||||
{
|
{
|
||||||
if (hwrenderloaded == -1) // Well, it didn't work the first time anyway.
|
#ifdef HWRENDER
|
||||||
|
if (vid_opengl_state == -1) // Well, it didn't work the first time anyway.
|
||||||
{
|
{
|
||||||
rendermode = oldrender;
|
rendermode = oldrender;
|
||||||
if (chosenrendermode == render_opengl) // fallback to software
|
if (chosenrendermode == render_opengl) // fallback to software
|
||||||
|
@ -1488,40 +1488,66 @@ static void VID_CheckGLLoaded(rendermode_t oldrender)
|
||||||
setrenderneeded = 0;
|
setrenderneeded = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void VID_CheckRenderer(void)
|
void VID_CheckRenderer(void)
|
||||||
{
|
{
|
||||||
SDL_bool rendererchanged = SDL_FALSE;
|
boolean rendererchanged = false;
|
||||||
|
boolean contextcreated = false;
|
||||||
rendermode_t oldrenderer = rendermode;
|
rendermode_t oldrenderer = rendermode;
|
||||||
|
|
||||||
if (dedicated)
|
if (dedicated)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef HWRENDER
|
|
||||||
if (!graphics_started)
|
|
||||||
VID_CheckGLLoaded(oldrenderer);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (setrenderneeded)
|
if (setrenderneeded)
|
||||||
{
|
{
|
||||||
rendermode = setrenderneeded;
|
rendermode = setrenderneeded;
|
||||||
rendererchanged = SDL_TRUE;
|
rendererchanged = true;
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode == render_opengl)
|
if (rendermode == render_opengl)
|
||||||
{
|
{
|
||||||
VID_CheckGLLoaded(oldrenderer);
|
VID_CheckGLLoaded(oldrenderer);
|
||||||
|
|
||||||
// Initialise OpenGL before calling SDLSetMode!!!
|
// Initialise OpenGL before calling SDLSetMode!!!
|
||||||
if (hwrenderloaded != 1)
|
// This is because SDLSetMode calls OglSdlSurface.
|
||||||
I_StartupHardwareGraphics();
|
if (vid_opengl_state == 0)
|
||||||
else if (hwrenderloaded == -1)
|
{
|
||||||
rendererchanged = SDL_FALSE;
|
VID_StartupOpenGL();
|
||||||
|
// Loaded successfully!
|
||||||
|
if (vid_opengl_state == 1)
|
||||||
|
{
|
||||||
|
// Destroy the current window, if it exists.
|
||||||
|
if (window)
|
||||||
|
{
|
||||||
|
SDL_DestroyWindow(window);
|
||||||
|
window = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Destroy the current window rendering context, if that also exists.
|
||||||
|
if (renderer)
|
||||||
|
{
|
||||||
|
SDL_DestroyRenderer(renderer);
|
||||||
|
renderer = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new window.
|
||||||
|
Impl_CreateWindow(USE_FULLSCREEN);
|
||||||
|
|
||||||
|
// From there, the OpenGL context was already created.
|
||||||
|
contextcreated = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (vid_opengl_state == -1)
|
||||||
|
rendererchanged = false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (!contextcreated)
|
||||||
Impl_CreateContext();
|
Impl_CreateContext();
|
||||||
|
|
||||||
|
setrenderneeded = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN, (rendererchanged ? SDL_FALSE : SDL_TRUE));
|
SDLSetMode(vid.width, vid.height, USE_FULLSCREEN, (rendererchanged ? SDL_FALSE : SDL_TRUE));
|
||||||
|
@ -1534,15 +1560,25 @@ void VID_CheckRenderer(void)
|
||||||
SDL_FreeSurface(bufSurface);
|
SDL_FreeSurface(bufSurface);
|
||||||
bufSurface = NULL;
|
bufSurface = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (rendererchanged)
|
||||||
|
{
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (hwrenderloaded == 1) // Only if OpenGL ever loaded!
|
if (vid_opengl_state == 1) // Only if OpenGL ever loaded!
|
||||||
HWR_FreeTextureCache();
|
HWR_FreeTextureCache();
|
||||||
#endif
|
#endif
|
||||||
SCR_SetDrawFuncs();
|
SCR_SetDrawFuncs();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
else if (rendermode == render_opengl)
|
else if (rendermode == render_opengl)
|
||||||
|
{
|
||||||
|
if (rendererchanged)
|
||||||
|
{
|
||||||
R_InitHardwareMode();
|
R_InitHardwareMode();
|
||||||
|
V_SetPalette(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
(void)oldrenderer;
|
(void)oldrenderer;
|
||||||
#endif
|
#endif
|
||||||
|
@ -1586,7 +1622,7 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen)
|
||||||
flags |= SDL_WINDOW_BORDERLESS;
|
flags |= SDL_WINDOW_BORDERLESS;
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (hwrenderloaded != -1)
|
if (vid_opengl_state == 1)
|
||||||
flags |= SDL_WINDOW_OPENGL;
|
flags |= SDL_WINDOW_OPENGL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1720,11 +1756,12 @@ void I_StartupGraphics(void)
|
||||||
|
|
||||||
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
|
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY>>1,SDL_DEFAULT_REPEAT_INTERVAL<<2);
|
||||||
VID_Command_ModeList_f();
|
VID_Command_ModeList_f();
|
||||||
|
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (M_CheckParm("-nogl"))
|
if (M_CheckParm("-nogl"))
|
||||||
hwrenderloaded = -1; // Don't call SDL_GL_LoadLibrary
|
vid_opengl_state = -1; // Don't startup OpenGL
|
||||||
else
|
else if (chosenrendermode == render_opengl)
|
||||||
I_StartupHardwareGraphics();
|
VID_StartupOpenGL();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Fury: we do window initialization after GL setup to allow
|
// Fury: we do window initialization after GL setup to allow
|
||||||
|
@ -1779,12 +1816,13 @@ void I_StartupGraphics(void)
|
||||||
graphics_started = true;
|
graphics_started = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_StartupHardwareGraphics(void)
|
void VID_StartupOpenGL(void)
|
||||||
{
|
{
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
static boolean glstartup = false;
|
static boolean glstartup = false;
|
||||||
if (!glstartup)
|
if (!glstartup)
|
||||||
{
|
{
|
||||||
|
CONS_Printf("VID_StartupOpenGL()...\n");
|
||||||
HWD.pfnInit = hwSym("Init",NULL);
|
HWD.pfnInit = hwSym("Init",NULL);
|
||||||
HWD.pfnFinishUpdate = NULL;
|
HWD.pfnFinishUpdate = NULL;
|
||||||
HWD.pfnDraw2DLine = hwSym("Draw2DLine",NULL);
|
HWD.pfnDraw2DLine = hwSym("Draw2DLine",NULL);
|
||||||
|
@ -1816,13 +1854,13 @@ void I_StartupHardwareGraphics(void)
|
||||||
// check gl renderer lib
|
// check gl renderer lib
|
||||||
if (HWD.pfnGetRenderVersion() != VERSION)
|
if (HWD.pfnGetRenderVersion() != VERSION)
|
||||||
{
|
{
|
||||||
CONS_Alert(CONS_ERROR, M_GetText("The version of the renderer doesn't match the version of the executable\nBe sure you have installed SRB2 properly.\n"));
|
CONS_Alert(CONS_ERROR, M_GetText("The version of the renderer doesn't match the version of the executable!\nBe sure you have installed SRB2 properly.\n"));
|
||||||
hwrenderloaded = -1;
|
vid_opengl_state = -1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
hwrenderloaded = HWD.pfnInit(I_Error) ? 1 : -1; // let load the OpenGL library
|
vid_opengl_state = HWD.pfnInit(I_Error) ? 1 : -1; // let load the OpenGL library
|
||||||
|
|
||||||
if (hwrenderloaded == -1)
|
if (vid_opengl_state == -1)
|
||||||
{
|
{
|
||||||
rendermode = render_soft;
|
rendermode = render_soft;
|
||||||
setrenderneeded = 0;
|
setrenderneeded = 0;
|
||||||
|
|
39
src/w_wad.c
39
src/w_wad.c
|
@ -1520,11 +1520,9 @@ void *W_CacheLumpName(const char *name, INT32 tag)
|
||||||
// Cache a patch into heap memory, convert the patch format as necessary
|
// Cache a patch into heap memory, convert the patch format as necessary
|
||||||
//
|
//
|
||||||
|
|
||||||
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
void *W_CacheSoftwarePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||||
{
|
{
|
||||||
#ifdef HWRENDER
|
lumpcache_t *lumpcache = NULL;
|
||||||
GLPatch_t *grPatch;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (needpatchflush)
|
if (needpatchflush)
|
||||||
W_FlushCachedPatches();
|
W_FlushCachedPatches();
|
||||||
|
@ -1532,12 +1530,8 @@ void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||||
if (!TestValidLump(wad, lump))
|
if (!TestValidLump(wad, lump))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#ifdef HWRENDER
|
lumpcache = wadfiles[wad]->patchcache;
|
||||||
// Software-only compile cache the data without conversion
|
|
||||||
if (rendermode == render_soft || rendermode == render_none)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
lumpcache_t *lumpcache = wadfiles[wad]->patchcache;
|
|
||||||
if (!lumpcache[lump])
|
if (!lumpcache[lump])
|
||||||
{
|
{
|
||||||
size_t len = W_LumpLengthPwad(wad, lump);
|
size_t len = W_LumpLengthPwad(wad, lump);
|
||||||
|
@ -1570,6 +1564,31 @@ void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||||
Z_ChangeTag(lumpcache[lump], tag);
|
Z_ChangeTag(lumpcache[lump], tag);
|
||||||
|
|
||||||
return lumpcache[lump];
|
return lumpcache[lump];
|
||||||
|
}
|
||||||
|
|
||||||
|
void *W_CacheSoftwarePatchNum(lumpnum_t lumpnum, INT32 tag)
|
||||||
|
{
|
||||||
|
return W_CacheSoftwarePatchNumPwad(WADFILENUM(lumpnum),LUMPNUM(lumpnum),tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag)
|
||||||
|
{
|
||||||
|
#ifdef HWRENDER
|
||||||
|
GLPatch_t *grPatch;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (needpatchflush)
|
||||||
|
W_FlushCachedPatches();
|
||||||
|
|
||||||
|
if (!TestValidLump(wad, lump))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
#ifdef HWRENDER
|
||||||
|
// Software-only compile cache the data without conversion
|
||||||
|
if (rendermode == render_soft || rendermode == render_none)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
return W_CacheSoftwarePatchNumPwad(wad, lump, tag);
|
||||||
}
|
}
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
|
|
||||||
|
|
11
src/w_wad.h
11
src/w_wad.h
|
@ -194,8 +194,15 @@ boolean W_IsPatchCached(lumpnum_t lump, void *ptr);
|
||||||
void *W_CacheLumpName(const char *name, INT32 tag);
|
void *W_CacheLumpName(const char *name, INT32 tag);
|
||||||
void *W_CachePatchName(const char *name, INT32 tag);
|
void *W_CachePatchName(const char *name, INT32 tag);
|
||||||
|
|
||||||
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag); // return a patch_t
|
// Returns either a Software patch, or an OpenGL patch.
|
||||||
void *W_CachePatchNum(lumpnum_t lumpnum, INT32 tag); // return a patch_t
|
// Performs any necessary conversions from PNG images.
|
||||||
|
void *W_CachePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag);
|
||||||
|
void *W_CachePatchNum(lumpnum_t lumpnum, INT32 tag);
|
||||||
|
|
||||||
|
// Returns a Software patch.
|
||||||
|
// Performs any necessary conversions from PNG images.
|
||||||
|
void *W_CacheSoftwarePatchNumPwad(UINT16 wad, UINT16 lump, INT32 tag);
|
||||||
|
void *W_CacheSoftwarePatchNum(lumpnum_t lumpnum, INT32 tag);
|
||||||
|
|
||||||
void W_UnlockCachedPatch(void *patch);
|
void W_UnlockCachedPatch(void *patch);
|
||||||
void W_FlushCachedPatches(void);
|
void W_FlushCachedPatches(void);
|
||||||
|
|
|
@ -239,10 +239,7 @@ void I_StartupGraphics(void)
|
||||||
if (!dedicated) graphics_started = true;
|
if (!dedicated) graphics_started = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void I_StartupHardwareGraphics(void)
|
void VID_StartupOpenGL(void){}
|
||||||
{
|
|
||||||
// oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo yeah oh yeah woo y
|
|
||||||
}
|
|
||||||
|
|
||||||
// ------------------
|
// ------------------
|
||||||
// I_ShutdownGraphics
|
// I_ShutdownGraphics
|
||||||
|
@ -951,10 +948,8 @@ INT32 VID_SetMode(INT32 modenum)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VID_CheckRenderer(void)
|
void VID_CheckRenderer(void) {}
|
||||||
{
|
void VID_CheckGLLoaded(rendermode_t oldrender) {}
|
||||||
// ..............
|
|
||||||
}
|
|
||||||
|
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
// Free the video buffer of the last video mode,
|
// Free the video buffer of the last video mode,
|
||||||
|
|
Loading…
Reference in New Issue