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:
terminx 2006-04-23 06:44:19 +00:00
parent 7c42a7b7bd
commit e51efc7b73
25 changed files with 13034 additions and 13018 deletions

View file

@ -195,7 +195,7 @@ $(OBJ)$(EDITORLIB): $(EDITOROBJS)
$(RANLIB) $@
game$(EXESUFFIX): $(GAMEEXEOBJS)
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(GAMELIBS) $(STDCPPLIB)
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(GAMELIBS) $(LIBS) $(STDCPPLIB)
build$(EXESUFFIX): $(EDITOREXEOBJS)
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS)

View file

@ -157,4 +157,3 @@ ifneq (0,$(SETSPRITEZ))
BUILDCFLAGS+= -DSETSPRITEZ
endif

View file

@ -861,7 +861,7 @@ CACHE1D_FIND_REC *klistpath(const char *_path, const char *mask, int type)
{
int i,j;
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--;
path[j] = 0;
//initprintf("Cleaned up path = \"%s\"\n",path);

View file

@ -7356,7 +7356,11 @@ long loadpics(char *filename, long askedsize)
//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)
{
cachesize -= 65536L;

View file

@ -25,6 +25,7 @@
#define ioctlsocket ioctl
#define LPHOSTENT struct hostent *
#include "compat.h"
#include <sys/time.h>
static long GetTickCount(void)
{

View file

@ -1063,7 +1063,7 @@ failure:
int gloadtile_hi(long dapic, long facen, hicreplctyp *hicr, long dameth, pthtyp *pth, long doalloc, char effect)
{
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;
long picfillen, texfmt = GL_RGBA, intexfmt = GL_RGBA, filh;
@ -3635,7 +3635,7 @@ void polymost_drawsprite (long snum)
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 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;
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, writebuf, cleng) != cleng) return -1;
#else
long j, k, offs, stride, cleng;
unsigned long j, k, offs, stride, cleng;
char *cptr;
if ((pict->format == B_LITTLE32(GL_COMPRESSED_RGB_S3TC_DXT1_EXT)) ||

View file

@ -9,6 +9,7 @@
#include "baselayer.h"
#include "compat.h"
#include "cache1d.h"
#include <math.h>
#define ISWS(x) ((x == ' ') || (x == '\t') || (x == '\r') || (x == '\n'))

View file

@ -1105,6 +1105,7 @@ void showframe(int w)
bglPushMatrix();
bglLoadIdentity();
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_DEPTH_TEST);
bglDisable(GL_ALPHA_TEST);
bglDisable(GL_TEXTURE_2D);

View file

@ -89,6 +89,8 @@ extern int shareware;
#define TICRATE (120)
#define TICSPERFRAME (TICRATE/26)
#define MAXCACHE1DSIZE (16*1048576)
// #define GC (TICSPERFRAME*44)
#define NUM_SOUNDS 1500

View file

@ -8141,7 +8141,7 @@ void Startup(void)
//initprintf("* Hold Esc to Abort. *\n");
initprintf("Loading art header.\n");
if (loadpics("tiles000.art",32*1048576) < 0)
if (loadpics("tiles000.art",MAXCACHE1DSIZE) < 0)
gameexit("Failed loading art.");
initprintf("Loading palette/lookups...\n");

View file

@ -197,7 +197,18 @@ void SoundStartup(void)
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];
if (!chans) {
@ -334,9 +345,6 @@ int xyzsound(short num, short i, long x, long y, long z)
return 0;
}
swaplong(&y,&z);
y = -y>>4;
if (soundm[num] & SOUNDM_DUKE) {
// Duke speech, one at a time only
int j;
@ -415,7 +423,7 @@ int xyzsound(short num, short i, long x, long y, long z)
} else {
chan->SetRolloff(global ? 0.0 : 0.2);
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);