mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
Fix building with gcc older than 4.3.2, other minor fixes
git-svn-id: https://svn.eduke32.com/eduke32@1079 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8e8adb7e37
commit
2c172dcfb7
5 changed files with 66 additions and 19 deletions
|
@ -55,7 +55,7 @@ asm=nasm
|
|||
#
|
||||
ifneq ($(RELEASE),0)
|
||||
# Debugging disabled
|
||||
debug=-fomit-frame-pointer -ftree-vectorize -finline-small-functions -fpredictive-commoning -funswitch-loops -O$(OPTLEVEL)
|
||||
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
|
||||
else
|
||||
# Debugging enabled
|
||||
debug=-ggdb -O0 -DDEBUGGINGAIDS -DNOSDLPARACHUTE
|
||||
|
@ -67,6 +67,22 @@ AS=nasm
|
|||
RC=windres
|
||||
AR=ar
|
||||
RANLIB=ranlib
|
||||
|
||||
GCC_MAJOR := $(shell $(CC) -dumpversion 2>&1 | cut -d'.' -f1)
|
||||
GCC_MINOR := $(shell $(CC) -dumpversion 2>&1 | cut -d'.' -f2)
|
||||
|
||||
ifeq (4,$(GCC_MAJOR))
|
||||
debug += -ftree-vectorize
|
||||
ifneq (0,$(GCC_MINOR))
|
||||
ifneq (1,$(GCC_MINOR))
|
||||
ifneq (2,$(GCC_MINOR))
|
||||
# this should only enable for 4.3.0 and later
|
||||
debug += -finline-small-functions -fpredictive-commoning
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Wno-char-subscripts \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS \
|
||||
-DKSFORBUILD -I$(INC)
|
||||
|
|
|
@ -4489,7 +4489,7 @@ CANCEL:
|
|||
//tsprite[m].picnum = sprite[i].sectnum;
|
||||
//tsprite[m].owner = sprite[i].statnum;
|
||||
|
||||
j = insertsprite(tsprite[m].picnum+(numsectors-MAXSECTORS),tsprite[m].owner);
|
||||
j = insertsprite(spriteext[m].mdanimcur+(numsectors-MAXSECTORS),spriteext[m].angoff);
|
||||
Bmemcpy(&sprite[j],&sprite[m],sizeof(spritetype));
|
||||
//sprite[j].sectnum = tsprite[m].picnum+(numsectors-MAXSECTORS);
|
||||
//sprite[j].statnum = tsprite[m].owner;
|
||||
|
|
|
@ -36,7 +36,7 @@ o=o
|
|||
|
||||
ifneq (0,$(RELEASE))
|
||||
# Debugging disabled
|
||||
debug=-fomit-frame-pointer -ftree-vectorize -finline-small-functions -fpredictive-commoning -funswitch-loops -O$(OPTLEVEL)
|
||||
debug=-fomit-frame-pointer -funswitch-loops -O$(OPTLEVEL)
|
||||
else
|
||||
# Debugging enabled
|
||||
debug=-ggdb -O0 -DDEBUGGINGAIDS
|
||||
|
@ -45,6 +45,20 @@ endif
|
|||
CC=gcc
|
||||
CXX=g++
|
||||
|
||||
GCC_MAJOR := $(shell $(CC) -dumpversion 2>&1 | cut -d'.' -f1)
|
||||
GCC_MINOR := $(shell $(CC) -dumpversion 2>&1 | cut -d'.' -f2)
|
||||
|
||||
ifeq (4,$(GCC_MAJOR))
|
||||
debug += -ftree-vectorize
|
||||
ifneq (0,$(GCC_MINOR))
|
||||
ifneq (1,$(GCC_MINOR))
|
||||
ifneq (2,$(GCC_MINOR))
|
||||
debug += -finline-small-functions -fpredictive-commoning
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
OURCFLAGS=$(debug) -W -Wall -Wimplicit -Werror-implicit-function-declaration \
|
||||
-funsigned-char -fno-strict-aliasing -DNO_GCC_BUILTINS -DNOCOPYPROTECT \
|
||||
-I$(INC) -I$(EINC) -I$(SRC)/jmact -I$(SRC)/jaudiolib
|
||||
|
@ -139,6 +153,7 @@ ifeq ($(PLATFORM),LINUX)
|
|||
OURCFLAGS += -fno-pic
|
||||
NASMFLAGS += -f elf
|
||||
LIBS += -lvorbisfile -lvorbis -logg
|
||||
USE_OPENAL = 0
|
||||
endif
|
||||
|
||||
ifeq ($(PLATFORM),DARWIN)
|
||||
|
|
|
@ -3799,8 +3799,8 @@ void displayrest(int smoothratio)
|
|||
if (map[(ud.volume_number*MAXLEVELS) + ud.level_number].name != NULL)
|
||||
{
|
||||
if (currentboardfilename[0] != 0 && ud.volume_number == 0 && ud.level_number == 7)
|
||||
menutext_(160,75,(sintable[(totalclock<<5)&2047]>>11),0,currentboardfilename,bits);
|
||||
else menutext_(160,75,(sintable[(totalclock<<5)&2047]>>11),0,map[(ud.volume_number*MAXLEVELS) + ud.level_number].name,bits);
|
||||
menutext_(160,75,-leveltexttime+22/*(sintable[(totalclock<<5)&2047]>>11)*/,0,currentboardfilename,bits);
|
||||
else menutext_(160,75,-leveltexttime+22/*(sintable[(totalclock<<5)&2047]>>11)*/,0,map[(ud.volume_number*MAXLEVELS) + ud.level_number].name,bits);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4049,6 +4049,7 @@ void drawbackground(void)
|
|||
else rotatesprite(320<<15,200<<15,65536L,0,GetGameVarID(g_iReturnVarID, -1, -1),bpp==8?16:8,0,2+8+64,0,0,xdim-1,ydim-1);
|
||||
return;
|
||||
}
|
||||
|
||||
y2 = scale(ydim,200-scale(tilesizy[BOTTOMSTATUSBAR],ud.statusbarscale,100),200);
|
||||
|
||||
if (ud.screen_size > 8)
|
||||
|
@ -4073,6 +4074,18 @@ void drawbackground(void)
|
|||
rotatesprite(x<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64+128,0,windowy2,xdim-1,y2-1);
|
||||
}
|
||||
|
||||
// this is better than the HOM
|
||||
if (getrendermode() == 3 && (ud.camerahoriz > 230 || ud.camerahoriz < -50))
|
||||
{
|
||||
for (y=0; y<(ydim>>2); y+=tilesizy[dapicnum])
|
||||
for (x=0; x<xdim; x+=tilesizx[dapicnum])
|
||||
{
|
||||
rotatesprite(x<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64+128,0,0,xdim-1,ydim-1);
|
||||
rotatesprite(x<<16,(ydim-y-tilesizy[dapicnum])<<16,65536L,0,dapicnum,8,0,8+16+64+128,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// draw in the bits to the left and right of the non-fullsize status bar
|
||||
if (ud.statusbarscale < 100 && ud.screen_size >= 8 && ud.statusbarmode == 0)
|
||||
{
|
||||
|
@ -4318,7 +4331,8 @@ void displayrooms(int snum,int smoothratio)
|
|||
|
||||
if (pub > 0 || getrendermode() >= 3) // JBF 20040101: redraw background always
|
||||
{
|
||||
if (ud.screen_size > 8 || (ud.screen_size == 8 && ud.statusbarscale<100)) drawbackground();
|
||||
if (getrendermode() >= 3 || ud.screen_size > 8 || (ud.screen_size == 8 && ud.statusbarscale<100))
|
||||
drawbackground();
|
||||
pub = 0;
|
||||
}
|
||||
|
||||
|
@ -13013,6 +13027,7 @@ FRAGBONUS:
|
|||
}
|
||||
if (playerbest > 0) for (ii=playerbest/(26*60), ij=1; ii>9; ii/=10, ij++) ;
|
||||
clockpad = max(clockpad,ij);
|
||||
clockpad += 2;
|
||||
}
|
||||
|
||||
while (1)
|
||||
|
|
|
@ -667,20 +667,21 @@ void menus(void)
|
|||
|
||||
case 20000:
|
||||
x = probe(326,190,0,1);
|
||||
mgametext(160,50-8,"YOU ARE PLAYING THE SHAREWARE",0,2+8+16);
|
||||
mgametext(160,59-8,"VERSION OF DUKE NUKEM 3D. WHILE",0,2+8+16);
|
||||
mgametext(160,68-8,"THIS VERSION IS REALLY COOL, YOU",0,2+8+16);
|
||||
mgametext(160,77-8,"ARE MISSING OVER 75%% OF THE TOTAL",0,2+8+16);
|
||||
mgametext(160,86-8,"GAME, ALONG WITH OTHER GREAT EXTRAS",0,2+8+16);
|
||||
mgametext(160,95-8,"AND GAMES, WHICH YOU'LL GET WHEN",0,2+8+16);
|
||||
mgametext(160,104-8,"YOU ORDER THE COMPLETE VERSION AND",0,2+8+16);
|
||||
mgametext(160,113-8,"GET THE FINAL TWO EPISODES.",0,2+8+16);
|
||||
mgametext(160,41-8,"YOU ARE PLAYING THE SHAREWARE",0,2+8+16);
|
||||
mgametext(160,50-8,"VERSION OF DUKE NUKEM 3D. WHILE",0,2+8+16);
|
||||
mgametext(160,59-8,"THIS VERSION IS REALLY COOL, YOU",0,2+8+16);
|
||||
mgametext(160,68-8,"ARE MISSING OVER 75%% OF THE TOTAL",0,2+8+16);
|
||||
mgametext(160,77-8,"GAME, ALONG WITH OTHER GREAT EXTRAS",0,2+8+16);
|
||||
mgametext(160,86-8,"AND GAMES, WHICH YOU'LL GET WHEN",0,2+8+16);
|
||||
mgametext(160,95-8,"YOU ORDER THE COMPLETE VERSION AND",0,2+8+16);
|
||||
mgametext(160,104-8,"GET THE FINAL THREE EPISODES.",0,2+8+16);
|
||||
|
||||
mgametext(160,113+8,"PLEASE READ THE 'HOW TO ORDER' ITEM",0,2+8+16);
|
||||
mgametext(160,122+8,"ON THE MAIN MENU IF YOU WISH TO",0,2+8+16);
|
||||
mgametext(160,131+8,"UPGRADE TO THE FULL REGISTERED",0,2+8+16);
|
||||
mgametext(160,140+8,"VERSION OF DUKE NUKEM 3D.",0,2+8+16);
|
||||
mgametext(160,149+16,"PRESS ANY KEY...",0,2+8+16);
|
||||
mgametext(160,104+8,"PLEASE READ THE 'HOW TO ORDER' ITEM",0,2+8+16);
|
||||
mgametext(160,113+8,"ON THE MAIN MENU OR VISIT",0,2+8+16);
|
||||
mgametext(160,122+8,"HTTP://WWW.BUY3DREALMS.COM",0,2+8+16);
|
||||
mgametext(160,131+8,"TO UPGRADE TO THE FULL REGISTERED",0,2+8+16);
|
||||
mgametext(160,139+8,"VERSION OF DUKE NUKEM 3D.",0,2+8+16);
|
||||
mgametext(160,148+16,"PRESS ANY KEY...",0,2+8+16);
|
||||
|
||||
if (x >= -1) cmenu(100);
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue