Fix the build with USE_OPENGL=0 and/or POLYMER=0.

git-svn-id: https://svn.eduke32.com/eduke32@1365 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
plagman 2009-05-07 16:00:49 +00:00
parent ec159726a0
commit d097ebc8e3
6 changed files with 27 additions and 12 deletions

View file

@ -29,6 +29,10 @@ LINKED_GTK ?= 0
BUILD32_ON_64 ?= 0
RANCID_NETWORKING ?= 0
ifeq (0,$(USE_OPENGL))
POLYMER = 0
endif
# Debugging/Build options
# RELEASE - 1 = no debugging
# EFENCE - 1 = compile with Electric Fence for malloc() debugging
@ -121,10 +125,8 @@ ENGINEOBJS+= \
$(OBJ)/engine.$o \
$(OBJ)/polymost.$o \
$(OBJ)/hightile.$o \
$(OBJ)/mdsprite.$o \
$(OBJ)/textfont.$o \
$(OBJ)/smalltextfont.$o \
$(OBJ)/glbuild.$o \
$(OBJ)/kplib.$o \
$(OBJ)/lzf_c.$o \
$(OBJ)/lzf_d.$o \
@ -133,6 +135,11 @@ ENGINEOBJS+= \
$(OBJ)/pragmas.$o \
$(OBJ)/scriptfile.$o
ifeq (1,$(USE_OPENGL))
ENGINEOBJS+= $(OBJ)/mdsprite.$o
ENGINEOBJS+= $(OBJ)/glbuild.$o
endif
ifeq (1,$(POLYMER))
ENGINEOBJS+= $(OBJ)/polymer.$o
endif

View file

@ -252,7 +252,9 @@ int32_t baselayer_init(void)
OSD_RegisterFunction("hicsetpalettetint","hicsetpalettetint: sets palette tinting values",osdcmd_hicsetpalettetint);
#endif
#ifdef USE_OPENGL
OSD_RegisterFunction("glinfo","glinfo: shows OpenGL information about the current OpenGL mode",osdcmd_glinfo);
#endif
polymost_initosdfuncs();
#endif

View file

@ -24,12 +24,12 @@
#ifdef POLYMOST
# ifdef USE_OPENGL
# include "glbuild.h"
# include "mdsprite.h"
# ifdef POLYMER
# include "polymer.h"
# endif
# endif
# include "hightile.h"
# include "mdsprite.h"
# include "polymost.h"
# ifdef _WIN32
# define WIN32_LEAN_AND_MEAN
@ -7787,7 +7787,7 @@ int32_t setgamemode(char davidoption, int32_t daxdim, int32_t daydim, int32_t da
j = bpp;
if (setvideomode(daxdim,daydim,dabpp,davidoption) < 0) return(-1);
#ifdef POLYMOST
#if defined(POLYMOST) && defined(USE_OPENGL)
if (dabpp > 8) rendmode = glrendmode; // GL renderer
else if (dabpp == 8 && j > 8) rendmode = 0; // going from GL to software activates softpolymost
#endif
@ -12032,7 +12032,7 @@ int32_t screencapture(char *filename, char inverseit)
int32_t setrendermode(int32_t renderer)
{
UNREFERENCED_PARAMETER(renderer);
#ifdef POLYMOST
#if defined(POLYMOST) && defined(USE_OPENGL)
if (bpp == 8) renderer = 0;
else renderer = min(4,max(3,renderer));
# ifdef POLYMER

View file

@ -70,13 +70,17 @@ Low priority:
#include "compat.h"
#include "build.h"
#include "glbuild.h"
#ifdef USE_OPENGL
# include "glbuild.h"
# include "mdsprite.h"
#endif
#include "pragmas.h"
#include "baselayer.h"
#include "osd.h"
#include "engine_priv.h"
#include "hightile.h"
#include "mdsprite.h"
#include "polymost.h"
#include "scriptfile.h"
#include "cache1d.h"
@ -4254,6 +4258,7 @@ void polymost_drawrooms()
vec3_t vect;
double ratio = 1.05;
#ifdef USE_OPENGL
if (glwidescreen == 1)
ratio = 1.2f;
else if (glprojectionhacks == 1)
@ -4268,6 +4273,7 @@ void polymost_drawrooms()
if (gshang < -0.7f)
ratio += 4.f*(-gshang-0.7f);
}
#endif
ox2 = (searchx-ghalfx)/ratio; oy2 = (searchy-ghoriz)/ ratio; oz2 = ghalfx;

View file

@ -5111,7 +5111,7 @@ repeatcase:
int32_t fullscreen = ud.config.ScreenMode;
int32_t xdim = ud.config.ScreenWidth, ydim = ud.config.ScreenHeight, bpp = ud.config.ScreenBPP;
int32_t usemouse = ud.config.UseMouse, usejoy = ud.config.UseJoystick;
#ifdef POLYMOST
#if defined(POLYMOST) && defined(USE_OPENGL)
int32_t glrm = glrendmode;
#endif
@ -5155,9 +5155,9 @@ repeatcase:
ud.config.ScreenBPP = bpp;
ud.config.UseMouse = usemouse;
ud.config.UseJoystick = usejoy;
#ifdef POLYMOST
#if defined(POLYMOST) && defined(USE_OPENGL)
glrendmode = glrm;
#endif // POLYMOST
#endif
}
}

View file

@ -3326,11 +3326,11 @@ cheat_for_port_credits:
nfs = newfullscreen;
nbpp = (newvidmode==validmodecnt)?bpp:validmode[newvidmode].bpp;
nrend = (vidsets[newvidset] & 0x20000) ? (nbpp==8?2:
#ifdef POLYMOST
#if defined(POLYMOST) && defined(USE_OPENGL)
glrendmode
#else
0
#endif // POLYMOST
#endif
) : 0;