mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 06:41:59 +00:00
Fix building without OpenGL support and rip out the DYNAMIC_OPENGL toggle
git-svn-id: https://svn.eduke32.com/eduke32@163 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f8a77ff667
commit
66a36e564b
21 changed files with 98 additions and 179 deletions
|
@ -10,7 +10,6 @@
|
|||
# SUPERBUILD - enables voxels
|
||||
# POLYMOST - enables Polymost renderer
|
||||
# USE_OPENGL - enables OpenGL support in Polymost
|
||||
# DYNAMIC_OPENGL - enables run-time loading of OpenGL library
|
||||
# USE_A_C - enables use of C version of classic renderer
|
||||
# NOASM - disables the use of inline assembly pragmas
|
||||
#
|
||||
|
@ -18,7 +17,6 @@
|
|||
SUPERBUILD ?= 1
|
||||
POLYMOST ?= 1
|
||||
USE_OPENGL ?= 1
|
||||
DYNAMIC_OPENGL ?= 1
|
||||
USE_A_C ?= 0
|
||||
NOASM ?= 0
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ OBJ=obj.msc\ #
|
|||
!endif
|
||||
INC=include\ #
|
||||
!ifndef CFLAGS
|
||||
CFLAGS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DDYNAMIC_OPENGL /DKSFORBUILD
|
||||
CFLAGS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DKSFORBUILD
|
||||
!endif
|
||||
|
||||
o=obj
|
||||
|
|
|
@ -3,11 +3,6 @@
|
|||
ENGINELIB=libengine.a
|
||||
EDITORLIB=libbuild.a
|
||||
|
||||
# These are used when DYNAMIC_OPENGL is false
|
||||
GLLIBWIN=-lopengl32
|
||||
GLLIBBSD=-lopengl32
|
||||
GLLIBLIN=-lGL
|
||||
|
||||
SDLCONFIG=sdl-config
|
||||
#SDLCONFIG=/usr/local/bin/sdl11-config
|
||||
|
||||
|
@ -53,9 +48,6 @@ endif
|
|||
|
||||
ifeq ($(PLATFORM),LINUX)
|
||||
RENDERTYPE=SDL
|
||||
ifneq ($(DYNAMIC_OPENGL),1)
|
||||
LIBS+= $(GLLIBLIN)
|
||||
endif
|
||||
ifeq ($(findstring x86_64,$(shell uname -m)),x86_64)
|
||||
# on my 64bit Gentoo these are the 32bit emulation libs
|
||||
LIBS+= -m32 -L/emul/linux/x86/usr/lib
|
||||
|
@ -67,15 +59,9 @@ ifeq ($(PLATFORM),WINDOWS)
|
|||
RENDERTYPE ?= WIN
|
||||
EXESUFFIX=.exe
|
||||
LIBS+= -lmingwex -lwinmm -L$(DXROOT)/lib -lwsock32 #-lshfolder
|
||||
ifneq ($(DYNAMIC_OPENGL),1)
|
||||
LIBS+= $(GLLIBWIN)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),BSD)
|
||||
RENDERTYPE=SDL
|
||||
ifneq ($(DYNAMIC_OPENGL),1)
|
||||
LIBS+= $(GLLIBBSD)
|
||||
endif
|
||||
endif
|
||||
ifeq ($(PLATFORM),BEOS)
|
||||
RENDERTYPE=SDL
|
||||
|
@ -143,9 +129,6 @@ ifneq (0,$(POLYMOST))
|
|||
endif
|
||||
ifneq (0,$(USE_OPENGL))
|
||||
BUILDCFLAGS+= -DUSE_OPENGL
|
||||
ifneq (0,$(DYNAMIC_OPENGL))
|
||||
BUILDCFLAGS+= -DDYNAMIC_OPENGL
|
||||
endif
|
||||
endif
|
||||
ifneq (0,$(USE_A_C))
|
||||
BUILDCFLAGS+= -DUSE_A_C
|
||||
|
|
|
@ -10,7 +10,7 @@ OBJ=obj.watcom\
|
|||
!endif
|
||||
INC=include\
|
||||
!ifndef CFLAGS
|
||||
CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dDYNAMIC_OPENGL -dKSFORBUILD
|
||||
CFLAGS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dKSFORBUILD
|
||||
!endif
|
||||
|
||||
o=obj
|
||||
|
|
|
@ -24,8 +24,6 @@
|
|||
#error You should get an updated copy of glext.h from http://oss.sgi.com/projects/ogl-sample/registry/
|
||||
#endif
|
||||
|
||||
#ifdef DYNAMIC_OPENGL
|
||||
|
||||
#ifndef APIENTRY
|
||||
# define APIENTRY
|
||||
#endif
|
||||
|
@ -114,93 +112,6 @@ extern int (WINAPI * bwglGetPixelFormat)(HDC);
|
|||
extern BOOL (WINAPI * bwglSetPixelFormat)(HDC,int,const PIXELFORMATDESCRIPTOR*);
|
||||
#endif
|
||||
|
||||
#else // DYNAMIC_OPENGL
|
||||
|
||||
#define bglClearColor glClearColor
|
||||
#define bglClear glClear
|
||||
#define bglColorMask glColorMask
|
||||
#define bglAlphaFunc glAlphaFunc
|
||||
#define bglBlendFunc glBlendFunc
|
||||
#define bglCullFace glCullFace
|
||||
#define bglFrontFace glFrontFace
|
||||
#define bglPolygonOffset glPolygonOffset
|
||||
#define bglPolygonMode glPolygonMode
|
||||
#define bglEnable glEnable
|
||||
#define bglDisable glDisable
|
||||
#define bglGetFloatv glGetFloatv
|
||||
#define bglGetIntegerv glGetIntegerv
|
||||
#define bglPushAttrib glPushAttrib
|
||||
#define bglPopAttrib glPopAttrib
|
||||
#define bglGetError glGetError
|
||||
#define bglGetString glGetString
|
||||
#define bglHint glHint
|
||||
|
||||
// Depth
|
||||
#define bglDepthFunc glDepthFunc
|
||||
#define bglDepthMask glDepthMask
|
||||
#define bglDepthRange glDepthRange
|
||||
|
||||
// Matrix
|
||||
#define bglMatrixMode glMatrixMode
|
||||
#define bglOrtho glOrtho
|
||||
#define bglFrustum glFrustum
|
||||
#define bglViewport glViewport
|
||||
#define bglPushMatrix glPushMatrix
|
||||
#define bglPopMatrix glPopMatrix
|
||||
#define bglLoadIdentity glLoadIdentity
|
||||
#define bglLoadMatrixf glLoadMatrixf
|
||||
|
||||
// Drawing
|
||||
#define bglBegin glBegin
|
||||
#define bglEnd glEnd
|
||||
#define bglVertex2f glVertex2f
|
||||
#define bglVertex2i glVertex2i
|
||||
#define bglVertex3d glVertex3d
|
||||
#define bglVertex3fv glVertex3fv
|
||||
#define bglColor4f glColor4f
|
||||
#define bglColor4ub glColor4ub
|
||||
#define bglTexCoord2d glTexCoord2d
|
||||
#define bglTexCoord2f glTexCoord2f
|
||||
|
||||
// Lighting
|
||||
#define bglShadeModel glShadeModel
|
||||
|
||||
// Raster funcs
|
||||
#define bglReadPixels glReadPixels
|
||||
|
||||
// Texture mapping
|
||||
#define bglTexEnvf glTexEnvf
|
||||
#define bglGenTextures glGenTextures
|
||||
#define bglDeleteTextures glDeleteTextures
|
||||
#define bglBindTexture glBindTexture
|
||||
#define bglTexImage2D glTexImage2D
|
||||
#define bglTexSubImage2D glTexSubImage2D
|
||||
#define bglTexParameterf glTexParameterf
|
||||
#define bglTexParameteri glTexParameteri
|
||||
#define bglGetTexLevelParameteriv glGetTexLevelParameteriv
|
||||
#define bglCompressedTexImage2DARB glCompressedTexImage2DARB
|
||||
#define bglGetCompressedTexImageARB glGetCompressedTexImageARB
|
||||
|
||||
// Fog
|
||||
#define bglFogf glFogf
|
||||
#define bglFogi glFogi
|
||||
#define bglFogfv glFogfv
|
||||
|
||||
#ifdef RENDERTYPEWIN
|
||||
#define bwglCreateContext wglCreateContext
|
||||
#define bwglDeleteContext wglDeleteContext
|
||||
#define bwglGetProcAddress wglGetProcAddress
|
||||
#define bwglMakeCurrent wglMakeCurrent
|
||||
|
||||
#define bwglSwapBuffers SwapBuffers
|
||||
#define bwglChoosePixelFormat ChoosePixelFormat
|
||||
#define bwglDescribePixelFormat DescribePixelFormat
|
||||
#define bwglGetPixelFormat GetPixelFormat
|
||||
#define bwglSetPixelFormat SetPixelFormat
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif //USE_OPENGL
|
||||
|
||||
extern char *gldriver;
|
||||
|
|
|
@ -7207,8 +7207,8 @@ void keytimerstuff(void)
|
|||
if (svel > 0) svel = max(svel-2,0);
|
||||
if (vel < 0) vel = min(vel+2,0);
|
||||
if (vel > 0) vel = max(vel-2,0);
|
||||
/* if(mlook)
|
||||
posz -= (horiz-101)*(vel/40); */
|
||||
/* if(mlook)
|
||||
posz -= (horiz-101)*(vel/40); */
|
||||
}
|
||||
|
||||
void _printmessage16(char name[82])
|
||||
|
|
|
@ -129,6 +129,7 @@ if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i);
|
|||
#ifdef RENDERTYPEWIN
|
||||
if (readconfig(fp, "maxrefreshfreq", val, VL) > 0) maxrefreshfreq = Batoi(val);
|
||||
#endif
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
if (readconfig(fp, "glusetexcache", val, VL) > 0) {
|
||||
if (Batoi(val) != 0) glusetexcache = 1;
|
||||
|
@ -151,6 +152,7 @@ if (readconfig(fp, "renderer", val, VL) > 0) { i = Batoi(val); setrendermode(i);
|
|||
glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
option[0] = 1; // vesa all the way...
|
||||
option[1] = 1; // sound all the way...
|
||||
|
@ -207,10 +209,12 @@ int writesetup(const char *fn)
|
|||
"; 3D-mode colour depth\n"
|
||||
"bpp = %ld\n"
|
||||
"\n"
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
"; OpenGL mode options\n"
|
||||
"glusetexcache = %ld\n"
|
||||
"glusetexcachecompression = %ld\n"
|
||||
"\n"
|
||||
#endif
|
||||
#ifdef RENDERTYPEWIN
|
||||
"; Maximum OpenGL mode refresh rate (Windows only, in Hertz)\n"
|
||||
"maxrefreshfreq = %d\n"
|
||||
|
@ -289,7 +293,9 @@ int writesetup(const char *fn)
|
|||
"\n",
|
||||
|
||||
fullscreen, xdim2d, ydim2d, xdimgame, ydimgame, bppgame,
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
glusetexcache, glusetexcachecompression,
|
||||
#endif
|
||||
#ifdef RENDERTYPEWIN
|
||||
maxrefreshfreq,
|
||||
#endif
|
||||
|
|
|
@ -210,7 +210,9 @@ static int getatoken(scriptfile *sf, tokenlist *tl, int ntokens)
|
|||
static int lastmodelid = -1, lastvoxid = -1, modelskin = -1, lastmodelskin = -1, seenframe = 0;
|
||||
extern int nextvoxid;
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
extern float alphahackarray[MAXTILES];
|
||||
#endif
|
||||
extern char spritecol2d[MAXTILES][2];
|
||||
extern char vgapal16[4*256];
|
||||
|
||||
|
@ -311,7 +313,9 @@ static int defsparser(scriptfile *script)
|
|||
|
||||
if (scriptfile_getsymbol(script,&tile)) break;
|
||||
if (scriptfile_getdouble(script,&alpha)) break;
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if ((unsigned long)tile < MAXTILES) alphahackarray[tile] = alpha;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case T_ALPHAHACKRANGE:
|
||||
|
@ -328,6 +332,7 @@ static int defsparser(scriptfile *script)
|
|||
tilenume2 = tilenume1;
|
||||
tilenume1 = i;
|
||||
}
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if ((tilenume1 >= 0 && tilenume1 < MAXTILES) && (tilenume2 >= 0 && tilenume2 < MAXTILES))
|
||||
{
|
||||
for (i=tilenume1;i<=tilenume2;i++)
|
||||
|
@ -336,6 +341,7 @@ static int defsparser(scriptfile *script)
|
|||
alphahackarray[i] = alpha;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case T_SPRITECOL:
|
||||
|
|
|
@ -698,9 +698,9 @@ int hicclearsubst(long picnum, long palnum) { return 0; }
|
|||
long polymost_drawtilescreen (long tilex, long tiley, long wallnum, long dimen) { return -1; }
|
||||
#endif
|
||||
//============================================================================= //POLYMOST ENDS
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
#include "polymer.c"
|
||||
|
||||
#endif
|
||||
//
|
||||
// getpalookup (internal)
|
||||
//
|
||||
|
@ -5663,11 +5663,13 @@ void drawrooms(long daposx, long daposy, long daposz,
|
|||
umost[0] = shortptr1[0]-windowy1;
|
||||
dmost[0] = shortptr2[0]-windowy1;
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (0)
|
||||
{
|
||||
polymer_drawrooms();
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
//============================================================================= //POLYMOST BEGINS
|
||||
#ifdef POLYMOST
|
||||
polymost_drawrooms(); if (rendmode) { return; }
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined DYNAMIC_OPENGL && defined USE_OPENGL
|
||||
#if defined USE_OPENGL
|
||||
|
||||
#ifdef RENDERTYPESDL
|
||||
#include "SDL.h"
|
||||
|
@ -348,12 +348,5 @@ int unloadgldriver(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
char *gldriver = "<statically linked>";
|
||||
|
||||
int loadgldriver(const char *a) { return 0; }
|
||||
int unloadgldriver(void) { return 0; }
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -598,9 +598,9 @@ void resizeglcheck ()
|
|||
|
||||
bglMatrixMode(GL_PROJECTION);
|
||||
memset(m,0,sizeof(m));
|
||||
m[0][0] = (float)ydimen / 1.2; m[0][2] = 1.0;
|
||||
m[0][0] = (float)ydimen / ((ratioratio > 1)?1.2:1); m[0][2] = 1.0;
|
||||
m[1][1] = (float)xdimen; m[1][2] = 1.0;
|
||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / 1.2;
|
||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / ((ratioratio > 1)?1.2:1);
|
||||
m[3][2] =-1.0;
|
||||
bglLoadMatrixf(&m[0][0]);
|
||||
//bglLoadIdentity();
|
||||
|
@ -2758,11 +2758,11 @@ static void polymost_drawalls (long bunch)
|
|||
if ((oy < cy0) && (oy < cy1)) domost(x1,oy,x0,oy);
|
||||
else if ((oy < cy0) != (oy < cy1))
|
||||
{ /* cy1 cy0
|
||||
// / \
|
||||
//oy---------- oy---------
|
||||
// / \
|
||||
// cy0 cy1
|
||||
*/
|
||||
// / \
|
||||
//oy---------- oy---------
|
||||
// / \
|
||||
// cy0 cy1
|
||||
*/
|
||||
ox = (oy-cy0)*(x1-x0)/(cy1-cy0) + x0;
|
||||
if (oy < cy0) { domost(ox,oy,x0,oy); domost(x1,cy1,ox,oy); }
|
||||
else { domost(ox,oy,x0,cy0); domost(x1,oy,ox,oy); }
|
||||
|
@ -4054,9 +4054,9 @@ void polymost_dorotatesprite (long sx, long sy, long z, short a, short picnum,
|
|||
memset(m,0,sizeof(m));
|
||||
if ((dastat&10) == 2)
|
||||
{
|
||||
m[0][0] = (float)ydimen / 1.2; m[0][2] = 1.0;
|
||||
m[0][0] = (float)ydimen / ((ratioratio > 1)?1.2:1); m[0][2] = 1.0;
|
||||
m[1][1] = (float)xdimen; m[1][2] = 1.0;
|
||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / 1.2;
|
||||
m[2][2] = 1.0; m[2][3] = (float)ydimen / ((ratioratio > 1)?1.2:1);
|
||||
m[3][2] =-1.0;
|
||||
}
|
||||
else { m[0][0] = m[2][3] = 1.0; m[1][1] = ((float)xdim)/((float)ydim); m[2][2] = 1.0001; m[3][2] = 1-m[2][2]; }
|
||||
|
@ -4907,6 +4907,7 @@ Description of Ken's filter to improve LZW compression of DXT1 format by ~15%: (
|
|||
I think this improved compression by a few % :)
|
||||
*/
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
int dxtfilter(int fil, texcachepicture *pict, char *pic, void *midbuf, char *packbuf, unsigned long miplen)
|
||||
{
|
||||
void *writebuf;
|
||||
|
@ -5120,5 +5121,5 @@ int dedxtfilter(int fil, texcachepicture *pict, char *pic, void *midbuf, char *p
|
|||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
// vim:ts=4:sw=4:
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<li>added dummy duke3d_w32.exe to facilitate EDuke32 multiplayer via DukesterX 1.5</li>
|
||||
<li>added support for in-game selection and loading of different user maps</li>
|
||||
<li>added support for various player death messages which can be redefined in the CONs</li>
|
||||
<li>added support for Quake-style color codes in player names and text chat (code format is ^<palette>)</li>
|
||||
<li>added support for Quake-style color codes in player names and text chat (code format is ^<palette>)</li>
|
||||
<li>limit player name to 10 characters (not counting color codes)</li>
|
||||
<li>fixed issue where multiple players trying to step on the same shrunken enemy would kill the game</li>
|
||||
<li>fixed issue where briefly tapping the jump key would produce a lag effect during the resulting jump</li>
|
||||
|
@ -127,7 +127,7 @@
|
|||
<li>added "cansee" and "canseespr" commands to easily determine whether two sprites or sets of coordinates have visibility</li>
|
||||
<li>added "definegamefuncname" command to change the key names used in the configuration file and in the control setup menus</li>
|
||||
<li>added additional safety checks to get/setuserdef/player/sector/sprite/wall/input</li>
|
||||
<li>added support for Quake-style color codes in quotes (code format is ^<palette>)</li>
|
||||
<li>added support for Quake-style color codes in quotes (code format is ^<palette>)</li>
|
||||
<li>added extra timing checks to the weapon system; note that weapons with strange TOTALTIME and FIREDELAY values may no longer fire</li>
|
||||
<li>save quotes, dynamic-to-static tile remapping information, extended sprite flags and sprite caching info to savegames</li>
|
||||
<li>reworked the quote system to use dynamically allocated memory and doubled the length of each individual quote</li>
|
||||
|
@ -152,8 +152,7 @@
|
|||
<li>better smoothing of mouse input when using 3D mode mouselook</li>
|
||||
<li>add ' F key combo to replace nonexistent tiles with tile 0</li>
|
||||
</ul>
|
||||
<br />
|
||||
<p>Please see JonoF's JFDuke3D release notes <a href="http://www.jonof.id.au/modsuppt/jfduke3d/releasenotes.html">here</a> for information on features JFDuke3D shares with EDuke32</p>
|
||||
<p><br />Please see JonoF's JFDuke3D release notes <a href="http://www.jonof.id.au/modsuppt/jfduke3d/releasenotes.html">here</a> for information on features JFDuke3D shares with EDuke32</p>
|
||||
|
||||
<address>Richard "TerminX" Gobeille (<a href="mailto:terminx@gmail.com">terminx@gmail.com</a>)</address>
|
||||
</body>
|
||||
|
|
|
@ -37,7 +37,7 @@ source:
|
|||
|
||||
binary:
|
||||
make RELEASE=1
|
||||
upx -9 mapster32.exe eduke32.exe duke3d_w32.exe
|
||||
upx -9 mapster32.exe eduke32.exe duke3d_w32.exe setup.exe
|
||||
rm -rf $(binarydir)
|
||||
mkdir $(binarydir)
|
||||
# mkdir $(binarydir) $(binarydir)/models
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
SUPERBUILD = 1
|
||||
POLYMOST = 1
|
||||
USE_OPENGL = 1
|
||||
DYNAMIC_OPENGL = 1
|
||||
USE_A_C = 0
|
||||
NOASM = 0
|
||||
|
||||
|
@ -186,8 +185,8 @@ enginelib editorlib:
|
|||
-mkdir $(EOBJ)
|
||||
$(MAKE) -C $(EROOT) "OBJ=$(CURDIR)/$(EOBJ)" \
|
||||
SUPERBUILD=$(SUPERBUILD) POLYMOST=$(POLYMOST) \
|
||||
USE_OPENGL=$(USE_OPENGL) DYNAMIC_OPENGL=$(DYNAMIC_OPENGL) \
|
||||
USE_A_C=$(USE_A_C) NOASM=$(NOASM) RELEASE=$(RELEASE) $@
|
||||
USE_OPENGL=$(USE_OPENGL) USE_A_C=$(USE_A_C) \
|
||||
NOASM=$(NOASM) RELEASE=$(RELEASE) $@
|
||||
|
||||
$(EOBJ)$(ENGINELIB): enginelib
|
||||
$(EOBJ)$(EDITORLIB): editorlib
|
||||
|
|
|
@ -24,7 +24,7 @@ flags_link=/RELEASE
|
|||
|
||||
DXROOT=c:\sdks\msc\dx7
|
||||
|
||||
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL /DDYNAMIC_OPENGL
|
||||
ENGINEOPTS=/DSUPERBUILD /DPOLYMOST /DUSE_OPENGL
|
||||
|
||||
CC=cl
|
||||
AS=ml
|
||||
|
|
|
@ -17,7 +17,7 @@ EDITORLIB=build.lib
|
|||
|
||||
DXROOT=c:\sdks\msc\dx7
|
||||
|
||||
ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL -dDYNAMIC_OPENGL
|
||||
ENGINEOPTS=-dSUPERBUILD -dPOLYMOST -dUSE_OPENGL
|
||||
|
||||
CC=wcc386
|
||||
CFLAGS= -5r -s -orb -fp5 -d2 -db &
|
||||
|
|
|
@ -80,7 +80,7 @@ Section "!Game" SEC_GAME
|
|||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Setup.lnk" "$INSTDIR\setup.exe"
|
||||
SectionEnd
|
||||
|
||||
Section "Editor" SEC_EDITOR
|
||||
Section "Level editor" SEC_EDITOR
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite ifnewer
|
||||
File "..\build.cfg"
|
||||
|
@ -89,7 +89,7 @@ Section "Editor" SEC_EDITOR
|
|||
CreateShortCut "$SMPROGRAMS\$ICONS_GROUP\Mapster32.lnk" "$INSTDIR\mapster32.exe"
|
||||
SectionEnd
|
||||
|
||||
Section "Dukester X Support" SEC_DX
|
||||
Section /o "Dukester X 1.5 support" SEC_DX
|
||||
SetOutPath "$INSTDIR"
|
||||
SetOverwrite ifdiff
|
||||
File "..\duke3d_w32.exe"
|
||||
|
@ -125,7 +125,7 @@ SectionEnd
|
|||
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_GAME} "The main EDuke32 game components (required to play EDuke enhanced mods)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_EDITOR} "The enhanced Mapster32 editor (optional)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DX} "Dukester X 1.5.1 support (optional)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DX} "Support for Dukester X 1.5 (optional)"
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_SAMPLES} "Sample enhancement definition files (optional)"
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
|
|
|
@ -1373,10 +1373,12 @@ void _message(char message[162])
|
|||
|
||||
void message(char message[162])
|
||||
{
|
||||
char tmpbuf[2048];
|
||||
|
||||
_message(message);
|
||||
Bstrcpy(tempbuf,message);
|
||||
tempbuf[Bstrlen(message)] = '\n';
|
||||
OSD_Printf(tempbuf);
|
||||
Bstrcpy(tmpbuf,message);
|
||||
Bstrcat(tmpbuf,"\n");
|
||||
OSD_Printf(tmpbuf);
|
||||
lastmessagetime = totalclock;
|
||||
}
|
||||
|
||||
|
@ -4421,11 +4423,12 @@ void ExtAnalyzeSprites(void)
|
|||
}
|
||||
// else tspr->cstat&=32767;
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(tspr->picnum)) {
|
||||
tspr->cstat &= ~4;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
if(frames!=0)
|
||||
{
|
||||
if(frames==10) frames=0;
|
||||
|
|
|
@ -599,11 +599,29 @@ void CONFIG_ReadSetup( void )
|
|||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "MaxRefreshFreq", (int32*)&maxrefreshfreq);
|
||||
#endif
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLTextureMode", &gltexfiltermode);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLAnisotropy", &glanisotropy);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCompr", &glusetexcompr);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLRatioCorrection", &glratiocorrection);
|
||||
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", &glusetexcachecompression);
|
||||
if(glusetexcache == -1 && glusetexcachecompression == -1)
|
||||
{
|
||||
i=wm_ynbox("Texture caching",
|
||||
"Would you like to enable the on-disk texture cache? "
|
||||
"This feature may use up to 200 megabytes of disk "
|
||||
"space if you have a great deal of high resolution "
|
||||
"textures and skins, but textures will load exponentially "
|
||||
"faster after the first time they are loaded.");
|
||||
if (i) i = 'y';
|
||||
if(i == 'y' || i == 'Y' )
|
||||
useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
#endif
|
||||
dummy = usemodels; SCRIPT_GetNumber( scripthandle, "Screen Setup", "UseModels",&dummy); usemodels = dummy != 0;
|
||||
dummy = usehightile; SCRIPT_GetNumber( scripthandle, "Screen Setup", "UseHightile",&dummy); usehightile = dummy != 0;
|
||||
|
||||
|
@ -665,23 +683,6 @@ void CONFIG_ReadSetup( void )
|
|||
ps[0].auto_aim = AutoAim;
|
||||
SCRIPT_GetNumber( scripthandle, "Controls","WeaponSwitchMode",&ud.weaponswitch);
|
||||
ps[0].weaponswitch = ud.weaponswitch;
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", &glusetexcache);
|
||||
SCRIPT_GetNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", &glusetexcachecompression);
|
||||
if(glusetexcache == -1 && glusetexcachecompression == -1)
|
||||
{
|
||||
i=wm_ynbox("Texture caching",
|
||||
"Would you like to enable the on-disk texture cache? "
|
||||
"This feature may use up to 200 megabytes of disk "
|
||||
"space if you have a great deal of high resolution "
|
||||
"textures and skins, but textures will load exponentially "
|
||||
"faster after the first time they are loaded.");
|
||||
if (i) i = 'y';
|
||||
if(i == 'y' || i == 'Y' )
|
||||
useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1;
|
||||
else glusetexcache = glusetexcachecompression = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CONFIG_ReadKeys();
|
||||
|
@ -738,12 +739,14 @@ void CONFIG_WriteSetup( void )
|
|||
SCRIPT_PutNumber( scripthandle, "Misc", "UsePrecache",useprecache,false,false);
|
||||
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "Detail",ud.detail,false,false);
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLAnisotropy",glanisotropy,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLRatioCorrection",glratiocorrection,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLTextureMode",gltexfiltermode,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseCompressedTextureCache", glusetexcache,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCacheCompression", glusetexcachecompression,false,false);
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "GLUseTextureCompr",glusetexcompr,false,false);
|
||||
#endif
|
||||
#ifdef RENDERTYPEWIN
|
||||
SCRIPT_PutNumber( scripthandle, "Screen Setup", "MaxRefreshFreq",maxrefreshfreq,false,false);
|
||||
#endif
|
||||
|
|
|
@ -5644,11 +5644,12 @@ void animatesprites(long x,long y,short a,long smoothratio)
|
|||
t->xrepeat = t->yrepeat = 0;
|
||||
continue;
|
||||
case CHAIR3__STATIC:
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(t->picnum) >= 0) {
|
||||
t->cstat &= ~4;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
k = (((t->ang+3072+128-a)&2047)>>8)&7;
|
||||
if(k>4)
|
||||
{
|
||||
|
@ -5920,11 +5921,12 @@ void animatesprites(long x,long y,short a,long smoothratio)
|
|||
t->picnum = GROWSPARK+( (totalclock>>4)&3 );
|
||||
break;
|
||||
case RPG__STATIC:
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(t->picnum) >= 0) {
|
||||
t->cstat &= ~4;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
k = getangle(s->x-x,s->y-y);
|
||||
k = (((s->ang+3072+128-k)&2047)/170);
|
||||
if(k > 6)
|
||||
|
@ -5937,11 +5939,12 @@ void animatesprites(long x,long y,short a,long smoothratio)
|
|||
break;
|
||||
|
||||
case RECON__STATIC:
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(t->picnum) >= 0) {
|
||||
t->cstat &= ~4;
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
k = getangle(s->x-x,s->y-y);
|
||||
if( T1 < 4 )
|
||||
k = (((s->ang+3072+128-k)&2047)/170);
|
||||
|
@ -6025,18 +6028,21 @@ void animatesprites(long x,long y,short a,long smoothratio)
|
|||
if(s->owner >= 0)
|
||||
tsprite[spritesortcnt].z = ps[p].posz-(20<<8);
|
||||
else tsprite[spritesortcnt].z = s->z-(96<<8);
|
||||
tsprite[spritesortcnt].xrepeat = 16;
|
||||
tsprite[spritesortcnt].yrepeat = 16;
|
||||
tsprite[spritesortcnt].xrepeat = 32;
|
||||
tsprite[spritesortcnt].yrepeat = 32;
|
||||
tsprite[spritesortcnt].pal = 20;
|
||||
spritesortcnt++;
|
||||
}
|
||||
|
||||
if(s->owner == -1)
|
||||
{
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum) >= 0) {
|
||||
k = 0;
|
||||
t->cstat &= ~4;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
k = (((s->ang+3072+128-a)&2047)>>8)&7;
|
||||
if(k>4)
|
||||
{
|
||||
|
@ -6143,12 +6149,14 @@ PALONLY:
|
|||
if(t4)
|
||||
{
|
||||
l = *(long *)(t4+8);
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum) >= 0) {
|
||||
k = 0;
|
||||
t->cstat &= ~4;
|
||||
}
|
||||
else switch( l )
|
||||
else
|
||||
#endif
|
||||
switch( l )
|
||||
{
|
||||
case 2:
|
||||
k = (((s->ang+3072+128-a)&2047)>>8)&1;
|
||||
|
@ -6245,6 +6253,7 @@ PALONLY:
|
|||
yrep = tsprite[spritesortcnt].yrepeat;// - (klabs(daz-t->z)>>11);
|
||||
tsprite[spritesortcnt].yrepeat = yrep;
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(t->picnum) >= 0)
|
||||
{
|
||||
tsprite[spritesortcnt].yrepeat = 0;
|
||||
|
@ -6252,7 +6261,7 @@ PALONLY:
|
|||
//1024:tell MD2SPRITE.C to use Z-buffer hacks to hide overdraw issues
|
||||
tsprite[spritesortcnt].cstat |= (512+1024);
|
||||
}
|
||||
|
||||
#endif
|
||||
spritesortcnt++;
|
||||
}
|
||||
}
|
||||
|
@ -6303,10 +6312,13 @@ PALONLY:
|
|||
t->picnum += (s->shade>>1);
|
||||
break;
|
||||
case PLAYERONWATER__STATIC:
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum) >= 0) {
|
||||
k = 0;
|
||||
t->cstat &= ~4;
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
k = (((t->ang+3072+128-a)&2047)>>8)&7;
|
||||
if(k>4)
|
||||
{
|
||||
|
@ -6362,10 +6374,12 @@ PALONLY:
|
|||
case CAMERA1__STATIC:
|
||||
case RAT__STATIC:
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
if (bpp > 8 && usemodels && md_tilehasmodel(s->picnum) >= 0) {
|
||||
t->cstat &= ~4;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
k = (((t->ang+3072+128-a)&2047)>>8)&7;
|
||||
if(k>4)
|
||||
|
|
|
@ -2096,7 +2096,7 @@ cheat_for_port_credits:
|
|||
menutext(c,70+19+19+19,MENUHIGHLIGHT(3),PHX(-5),skill_names[3]);
|
||||
break;
|
||||
case 230:
|
||||
|
||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
rotatesprite(320<<15,19<<16,65536L,0,MENUBAR,16,0,10,0,0,xdim-1,ydim-1);
|
||||
menutext(320>>1,24,0,0,"ADVANCED VIDEO");
|
||||
|
||||
|
@ -2182,6 +2182,7 @@ cheat_for_port_credits:
|
|||
yy += 8;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case 200:
|
||||
|
@ -2953,7 +2954,7 @@ cheat_for_port_credits:
|
|||
MouseDigitalFunctions[whichkey>>1][whichkey&1] = x;
|
||||
CONTROL_MapDigitalAxis(whichkey>>1, x, whichkey&1, controldevice_mouse);
|
||||
cmenu(212);
|
||||
probey = 2+(whichkey^2);
|
||||
probey = 3+(whichkey^2);
|
||||
} else if (function == 2) {
|
||||
if (whichkey < 2*joynumbuttons) {
|
||||
JoystickFunctions[whichkey>>1][whichkey&1] = x;
|
||||
|
|
Loading…
Reference in a new issue