mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Add voxels option to menu, if at least one has been defined
git-svn-id: https://svn.eduke32.com/eduke32@7961 1a8010ca-5511-0410-912e-c29ae57300e0 # Conflicts: # source/build/src/engine.cpp
This commit is contained in:
parent
284af9f5d9
commit
3bfed33608
3 changed files with 16 additions and 6 deletions
|
@ -913,6 +913,7 @@ extern float debug1, debug2;
|
|||
|
||||
extern int16_t tiletovox[MAXTILES];
|
||||
extern int32_t usevoxels, voxscale[MAXVOXELS];
|
||||
extern char g_haveVoxels;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
extern int32_t usemodels, usehightile;
|
||||
|
|
|
@ -102,8 +102,9 @@ void (*loadvoxel_replace)(int32_t voxindex) = NULL;
|
|||
int16_t tiletovox[MAXTILES];
|
||||
int32_t usevoxels = 1;
|
||||
#ifdef USE_OPENGL
|
||||
static char *voxfilenames[MAXVOXELS], g_haveVoxels=0; // for deferred voxel->model conversion
|
||||
static char *voxfilenames[MAXVOXELS];
|
||||
#endif
|
||||
char g_haveVoxels;
|
||||
//#define kloadvoxel loadvoxel
|
||||
|
||||
int32_t novoxmips = 1;
|
||||
|
@ -10382,10 +10383,10 @@ static void videoAllocateBuffers(void)
|
|||
void (*PolymostProcessVoxels_Callback)(void) = NULL;
|
||||
static void PolymostProcessVoxels(void)
|
||||
{
|
||||
if (!g_haveVoxels)
|
||||
if (g_haveVoxels != 1)
|
||||
return;
|
||||
|
||||
g_haveVoxels = 0;
|
||||
g_haveVoxels = 2;
|
||||
|
||||
OSD_Printf("Generating voxel models for Polymost. This may take a while...\n");
|
||||
videoNextPage();
|
||||
|
@ -10626,9 +10627,10 @@ int32_t qloadkvx(int32_t voxindex, const char *filename)
|
|||
|
||||
Xfree(voxfilenames[voxindex]);
|
||||
voxfilenames[voxindex] = Xstrdup(filename);
|
||||
g_haveVoxels = 1;
|
||||
#endif
|
||||
|
||||
g_haveVoxels = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -567,6 +567,9 @@ static MenuOption_t MEO_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUOPTION(&MF_Redfont,
|
|||
static MenuEntry_t ME_DISPLAYSETUP_ASPECTRATIO = MAKE_MENUENTRY( "Widescreen:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_ASPECTRATIO, Option );
|
||||
#endif
|
||||
|
||||
static MenuOption_t MEO_DISPLAYSETUP_VOXELS = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &usevoxels);
|
||||
static MenuEntry_t ME_DISPLAYSETUP_VOXELS = MAKE_MENUENTRY( "Voxels:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_VOXELS, Option );
|
||||
|
||||
static MenuRangeInt32_t MEO_DISPLAYSETUP_FOV = MAKE_MENURANGE( &ud.fov, &MF_Redfont, 70, 120, 0, 11, 1 );
|
||||
static MenuEntry_t ME_DISPLAYSETUP_FOV = MAKE_MENUENTRY( "FOV:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_DISPLAYSETUP_FOV, RangeInt32 );
|
||||
|
||||
|
@ -741,6 +744,7 @@ static MenuEntry_t *MEL_DISPLAYSETUP[] = {
|
|||
#ifndef EDUKE32_ANDROID_MENU
|
||||
&ME_DISPLAYSETUP_VIDEOSETUP,
|
||||
&ME_DISPLAYSETUP_ASPECTRATIO,
|
||||
&ME_DISPLAYSETUP_VOXELS,
|
||||
&ME_DISPLAYSETUP_FOV,
|
||||
#endif
|
||||
&ME_DISPLAYSETUP_UPSCALING,
|
||||
|
@ -753,6 +757,7 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL[] = {
|
|||
#ifndef EDUKE32_ANDROID_MENU
|
||||
&ME_DISPLAYSETUP_VIDEOSETUP,
|
||||
&ME_DISPLAYSETUP_ASPECTRATIO,
|
||||
&ME_DISPLAYSETUP_VOXELS,
|
||||
&ME_DISPLAYSETUP_FOV,
|
||||
#endif
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
|
@ -782,6 +787,7 @@ static MenuEntry_t *MEL_DISPLAYSETUP_GL_POLYMER[] = {
|
|||
#ifndef EDUKE32_ANDROID_MENU
|
||||
&ME_DISPLAYSETUP_VIDEOSETUP,
|
||||
&ME_DISPLAYSETUP_FOV,
|
||||
&ME_DISPLAYSETUP_VOXELS,
|
||||
#endif
|
||||
#ifdef TEXFILTER_MENU_OPTIONS
|
||||
&ME_DISPLAYSETUP_TEXFILTER,
|
||||
|
@ -1988,8 +1994,9 @@ static void Menu_Pre(MenuID_t cm)
|
|||
MenuEntry_DisableOnCondition(&ME_GAMESETUP_DEMOREC, (ps->gm&MODE_GAME) && ud.m_recstat != 1);
|
||||
break;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
case MENU_DISPLAYSETUP:
|
||||
MenuEntry_HideOnCondition(&ME_DISPLAYSETUP_VOXELS, !g_haveVoxels);
|
||||
#ifdef USE_OPENGL
|
||||
if (videoGetRenderMode() == REND_CLASSIC)
|
||||
MenuMenu_ChangeEntryList(M_DISPLAYSETUP, MEL_DISPLAYSETUP);
|
||||
#ifdef POLYMER
|
||||
|
@ -2045,8 +2052,8 @@ static void Menu_Pre(MenuID_t cm)
|
|||
MenuEntry_DisableOnCondition(&ME_RENDERERSETUP_DETAILTEX, !usehightile);
|
||||
MenuEntry_DisableOnCondition(&ME_RENDERERSETUP_GLOWTEX, !usehightile);
|
||||
# endif
|
||||
break;
|
||||
#endif
|
||||
break;
|
||||
|
||||
case MENU_VIDEOSETUP:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue