diff --git a/src/m_emotes.cpp b/src/m_emotes.cpp index 515799af3..fe90c9a11 100644 --- a/src/m_emotes.cpp +++ b/src/m_emotes.cpp @@ -278,7 +278,7 @@ void M_DrawScaledEmote(fixed_t x, fixed_t y, fixed_t scale, emote_t *emote, INT3 static void Command_ListEmotes_f(void) { const int EMOTES_PER_PAGE = 24; - const int NUMPAGES = std::max(emotes.size()/EMOTES_PER_PAGE, 1); + const int NUMPAGES = emotes.size()/EMOTES_PER_PAGE + (emotes.size() % EMOTES_PER_PAGE != 0 ? 1 : 0); int page = 1; if (COM_Argc() > 1) diff --git a/src/m_menu.c b/src/m_menu.c index 7abec64be..b81cffb29 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -2074,7 +2074,6 @@ void M_Init(void) OP_OpenGLOptionsMenu[op_gl_shader].status = IT_GRAYEDOUT; OP_OpenGLOptionsMenu[op_gl_lightdither].status = IT_GRAYEDOUT; OP_OpenGLOptionsMenu[op_gl_palrender].status = IT_GRAYEDOUT; - OP_OpenGLOptionsMenu[op_gl_flashpal].status = IT_GRAYEDOUT; OP_ExpOptionsMenu[op_exp_paldepth].status = IT_GRAYEDOUT; } diff --git a/src/m_menudefs.c b/src/m_menudefs.c index aa3f186c8..e734021eb 100644 --- a/src/m_menudefs.c +++ b/src/m_menudefs.c @@ -1043,7 +1043,6 @@ static const char* OP_OpenGLTooltips[] = "Fallback 3D model for characters that don't have any.", "Graphical Shaders.", "Recreates the look of software mode.", - "Flash palettes for palette rendering.", "Bit-depth of textures.", "Filter to use on textures.", "Anisotropic filtering.", @@ -1062,7 +1061,6 @@ enum op_gl_falbckmdls, op_gl_shader, op_gl_palrender, - op_gl_flashpal, op_gl_scrdepth, op_gl_filter, op_gl_anis, @@ -2772,6 +2770,5 @@ void M_UpdateOGLMenu(void) OP_OpenGLOptionsMenu[op_gl_lightdither].status = (!HWR_UseShader()) ? IT_GRAYEDOUT : IT_STRING | IT_CVAR; OP_OpenGLOptionsMenu[op_gl_palrender].status = (cv_glscreentextures.value != 2 || !HWR_UseShader()) ? IT_GRAYEDOUT : IT_STRING | IT_CVAR; - OP_OpenGLOptionsMenu[op_gl_flashpal].status = (!HWR_ShouldUsePaletteRendering()) ? IT_GRAYEDOUT : IT_STRING | IT_CVAR; } #endif diff --git a/src/w_wad.c b/src/w_wad.c index 921e2c046..2ac8ae68d 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -157,6 +157,8 @@ void W_Shutdown(void) } } +// the lumpnum cache needs to be initialized before use +// call this as early as possible! void W_Startup(void) { lumpnum_map_init(&lumpnumcache);