mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Changes from JonoF & dos2unix on all build src
git-svn-id: https://svn.eduke32.com/eduke32@99 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7c42a7b7bd
commit
e51efc7b73
25 changed files with 13034 additions and 13018 deletions
|
@ -195,7 +195,7 @@ $(OBJ)$(EDITORLIB): $(EDITOROBJS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
game$(EXESUFFIX): $(GAMEEXEOBJS)
|
game$(EXESUFFIX): $(GAMEEXEOBJS)
|
||||||
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) $(STDCPPLIB)
|
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(GAMELIBS) $(LIBS) $(STDCPPLIB)
|
||||||
|
|
||||||
build$(EXESUFFIX): $(EDITOREXEOBJS)
|
build$(EXESUFFIX): $(EDITOREXEOBJS)
|
||||||
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS)
|
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS)
|
||||||
|
|
|
@ -157,4 +157,3 @@ ifneq (0,$(SETSPRITEZ))
|
||||||
BUILDCFLAGS+= -DSETSPRITEZ
|
BUILDCFLAGS+= -DSETSPRITEZ
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -861,7 +861,7 @@ CACHE1D_FIND_REC *klistpath(const char *_path, const char *mask, int type)
|
||||||
{
|
{
|
||||||
int i,j;
|
int i,j;
|
||||||
for (i=0; path[i] == '.' || toupperlookup[path[i]] == '/'; ) i++;
|
for (i=0; path[i] == '.' || toupperlookup[path[i]] == '/'; ) i++;
|
||||||
for (j=0; path[j] = path[i]; j++,i++) ;
|
for (j=0; (path[j] = path[i]); j++,i++) ;
|
||||||
while (j>0 && toupperlookup[path[j-1]] == '/') j--;
|
while (j>0 && toupperlookup[path[j-1]] == '/') j--;
|
||||||
path[j] = 0;
|
path[j] = 0;
|
||||||
//initprintf("Cleaned up path = \"%s\"\n",path);
|
//initprintf("Cleaned up path = \"%s\"\n",path);
|
||||||
|
|
|
@ -7356,7 +7356,11 @@ long loadpics(char *filename, long askedsize)
|
||||||
|
|
||||||
//try dpmi_DETERMINEMAXREALALLOC!
|
//try dpmi_DETERMINEMAXREALALLOC!
|
||||||
|
|
||||||
cachesize = min((long)((Bgetsysmemsize()/100)*60),max(artsize,askedsize));
|
//cachesize = min((long)((Bgetsysmemsize()/100)*60),max(artsize,askedsize));
|
||||||
|
if (Bgetsysmemsize() <= (unsigned long)askedsize)
|
||||||
|
cachesize = (Bgetsysmemsize()/100)*60;
|
||||||
|
else
|
||||||
|
cachesize = askedsize;
|
||||||
while ((pic = kkmalloc(cachesize)) == NULL)
|
while ((pic = kkmalloc(cachesize)) == NULL)
|
||||||
{
|
{
|
||||||
cachesize -= 65536L;
|
cachesize -= 65536L;
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#define ioctlsocket ioctl
|
#define ioctlsocket ioctl
|
||||||
#define LPHOSTENT struct hostent *
|
#define LPHOSTENT struct hostent *
|
||||||
|
|
||||||
|
#include "compat.h"
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
static long GetTickCount(void)
|
static long GetTickCount(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1063,7 +1063,7 @@ failure:
|
||||||
int gloadtile_hi(long dapic, long facen, hicreplctyp *hicr, long dameth, pthtyp *pth, long doalloc, char effect)
|
int gloadtile_hi(long dapic, long facen, hicreplctyp *hicr, long dameth, pthtyp *pth, long doalloc, char effect)
|
||||||
{
|
{
|
||||||
coltype *pic = NULL, *rpptr;
|
coltype *pic = NULL, *rpptr;
|
||||||
long j, x, y, x2, y2, xsiz = -1, ysiz = -1, tsizx, tsizy;
|
long j, x, y, x2, y2, xsiz=0, ysiz=0, tsizx, tsizy;
|
||||||
|
|
||||||
char *picfil = NULL, *fn, hasalpha = 255;
|
char *picfil = NULL, *fn, hasalpha = 255;
|
||||||
long picfillen, texfmt = GL_RGBA, intexfmt = GL_RGBA, filh;
|
long picfillen, texfmt = GL_RGBA, intexfmt = GL_RGBA, filh;
|
||||||
|
@ -3635,7 +3635,7 @@ void polymost_drawsprite (long snum)
|
||||||
double px[6], py[6];
|
double px[6], py[6];
|
||||||
float f, r, c, s, fx, fy, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1, ft[4];
|
float f, r, c, s, fx, fy, sx0, sy0, sx1, sy1, xp0, yp0, xp1, yp1, oxp0, oyp0, ryp0, ryp1, ft[4];
|
||||||
float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
|
float x0, y0, x1, y1, sc0, sf0, sc1, sf1, px2[6], py2[6], xv, yv, t0, t1;
|
||||||
long i, j, spritenum, xoff = -1, yoff = -1, method, npoints;
|
long i, j, spritenum, xoff=0, yoff=0, method, npoints;
|
||||||
spritetype *tspr;
|
spritetype *tspr;
|
||||||
|
|
||||||
tspr = tspriteptr[snum];
|
tspr = tspriteptr[snum];
|
||||||
|
@ -4929,7 +4929,7 @@ int dxtfilter(int fil, texcachepicture *pict, char *pic, void *midbuf, char *pac
|
||||||
if (Bwrite(fil, &j, sizeof(unsigned long)) != sizeof(unsigned long)) return -1;
|
if (Bwrite(fil, &j, sizeof(unsigned long)) != sizeof(unsigned long)) return -1;
|
||||||
if (Bwrite(fil, writebuf, cleng) != cleng) return -1;
|
if (Bwrite(fil, writebuf, cleng) != cleng) return -1;
|
||||||
#else
|
#else
|
||||||
long j, k, offs, stride, cleng;
|
unsigned long j, k, offs, stride, cleng;
|
||||||
char *cptr;
|
char *cptr;
|
||||||
|
|
||||||
if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGB_S3TC_DXT1_EXT)) ||
|
if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGB_S3TC_DXT1_EXT)) ||
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "cache1d.h"
|
#include "cache1d.h"
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))
|
||||||
|
|
|
@ -1105,6 +1105,7 @@ void showframe(int w)
|
||||||
bglPushMatrix();
|
bglPushMatrix();
|
||||||
bglLoadIdentity();
|
bglLoadIdentity();
|
||||||
|
|
||||||
|
bglDisable(GL_ALPHA_TEST);
|
||||||
bglDisable(GL_DEPTH_TEST);
|
bglDisable(GL_DEPTH_TEST);
|
||||||
bglDisable(GL_ALPHA_TEST);
|
bglDisable(GL_ALPHA_TEST);
|
||||||
bglDisable(GL_TEXTURE_2D);
|
bglDisable(GL_TEXTURE_2D);
|
||||||
|
|
|
@ -89,6 +89,8 @@ extern int shareware;
|
||||||
#define TICRATE (120)
|
#define TICRATE (120)
|
||||||
#define TICSPERFRAME (TICRATE/26)
|
#define TICSPERFRAME (TICRATE/26)
|
||||||
|
|
||||||
|
#define MAXCACHE1DSIZE (16*1048576)
|
||||||
|
|
||||||
// #define GC (TICSPERFRAME*44)
|
// #define GC (TICSPERFRAME*44)
|
||||||
|
|
||||||
#define NUM_SOUNDS 1500
|
#define NUM_SOUNDS 1500
|
||||||
|
|
|
@ -8141,7 +8141,7 @@ void Startup(void)
|
||||||
|
|
||||||
//initprintf("* Hold Esc to Abort. *\n");
|
//initprintf("* Hold Esc to Abort. *\n");
|
||||||
initprintf("Loading art header.\n");
|
initprintf("Loading art header.\n");
|
||||||
if (loadpics("tiles000.art",32*1048576) < 0)
|
if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
|
||||||
gameexit("Failed loading art.");
|
gameexit("Failed loading art.");
|
||||||
|
|
||||||
initprintf("Loading palette/lookups...\n");
|
initprintf("Loading palette/lookups...\n");
|
||||||
|
|
|
@ -197,7 +197,18 @@ void SoundStartup(void)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
jfaud->SetCacheSize(1048576,1048576/2);
|
{
|
||||||
|
// the engine will take 60% of the system memory size for cache1d if there
|
||||||
|
// is less than the 16MB asked for in loadpics(), so we'll
|
||||||
|
// take 30% of what's left for the sound cache if that happened, or
|
||||||
|
// 50% of the system memory sans the 16MB maximum otherwise
|
||||||
|
unsigned k;
|
||||||
|
if (Bgetsysmemsize() <= MAXCACHE1DSIZE)
|
||||||
|
k = Bgetsysmemsize()/100*30;
|
||||||
|
else
|
||||||
|
k = Bgetsysmemsize()/100*50 - MAXCACHE1DSIZE;
|
||||||
|
jfaud->SetCacheSize(k,k/2);
|
||||||
|
}
|
||||||
|
|
||||||
chans = new SoundChannel[NumVoices];
|
chans = new SoundChannel[NumVoices];
|
||||||
if (!chans) {
|
if (!chans) {
|
||||||
|
@ -334,9 +345,6 @@ int xyzsound(short num, short i, long x, long y, long z)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
swaplong(&y,&z);
|
|
||||||
y = -y>>4;
|
|
||||||
|
|
||||||
if (soundm[num] & SOUNDM_DUKE) {
|
if (soundm[num] & SOUNDM_DUKE) {
|
||||||
// Duke speech, one at a time only
|
// Duke speech, one at a time only
|
||||||
int j;
|
int j;
|
||||||
|
@ -415,7 +423,7 @@ int xyzsound(short num, short i, long x, long y, long z)
|
||||||
} else {
|
} else {
|
||||||
chan->SetRolloff(global ? 0.0 : 0.2);
|
chan->SetRolloff(global ? 0.0 : 0.2);
|
||||||
chan->SetFollowListener(false);
|
chan->SetFollowListener(false);
|
||||||
chan->SetPosition((float)x/UNITSPERMETRE, (float)y/UNITSPERMETRE, (float)z/UNITSPERMETRE);
|
chan->SetPosition((float)x/UNITSPERMETRE, (float)(-z>>4)/UNITSPERMETRE, (float)y/UNITSPERMETRE);
|
||||||
}
|
}
|
||||||
|
|
||||||
r = keephandle(chan, num, i);
|
r = keephandle(chan, num, i);
|
||||||
|
|
Loading…
Reference in a new issue