mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@747 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8e40b85cfa
commit
ca83297b10
3 changed files with 127 additions and 78 deletions
|
@ -171,9 +171,10 @@ typedef struct BPACK {
|
|||
} spriteexttype;
|
||||
|
||||
typedef struct BPACK {
|
||||
float smoothduration;
|
||||
short mdcurframe, mdoldframe;
|
||||
short mdsmooth;
|
||||
float smoothduration;
|
||||
char filler[2];
|
||||
} spritesmoothtype;
|
||||
|
||||
#define SPREXT_NOTMD 1
|
||||
|
|
|
@ -5612,6 +5612,18 @@ static void sighandler(int sig, const siginfo_t *info, void *ctx)
|
|||
// preinitengine
|
||||
//
|
||||
static int preinitcalled = 0;
|
||||
|
||||
#define DYNALLOC_ARRAYS
|
||||
|
||||
#ifndef DYNALLOC_ARRAYS
|
||||
spriteexttype spriteext_s[MAXSPRITES+MAXUNIQHUDID];
|
||||
spritesmoothtype spritesmooth_s[MAXSPRITES+MAXUNIQHUDID];
|
||||
sectortype sector_s[MAXSECTORS];
|
||||
walltype wall_s[MAXWALLS];
|
||||
spritetype sprite_s[MAXSPRITES];
|
||||
spritetype tsprite_s[MAXSPRITESONSCREEN];
|
||||
#endif
|
||||
|
||||
int preinitengine(void)
|
||||
{
|
||||
char *e;
|
||||
|
@ -5621,6 +5633,7 @@ int preinitengine(void)
|
|||
|
||||
// this shite is to help get around data segment size limits on some platforms
|
||||
|
||||
#ifdef DYNALLOC_ARRAYS
|
||||
sector = Bcalloc(MAXSECTORS,sizeof(sectortype));
|
||||
wall = Bcalloc(MAXWALLS,sizeof(walltype));
|
||||
sprite = Bcalloc(MAXSPRITES,sizeof(spritetype));
|
||||
|
@ -5630,6 +5643,14 @@ int preinitengine(void)
|
|||
|
||||
if (!sector || !wall || !sprite || !tsprite || !spriteext || !spritesmooth)
|
||||
return 1;
|
||||
#else
|
||||
sector = sector_s;
|
||||
wall = wall_s;
|
||||
sprite = sprite_s;
|
||||
tsprite = tsprite_s;
|
||||
spriteext = spriteext_s;
|
||||
spritesmooth = spritesmooth_s;
|
||||
#endif
|
||||
|
||||
if ((e = Bgetenv("BUILD_NOP6")) != NULL)
|
||||
if (!Bstrcasecmp(e, "TRUE"))
|
||||
|
@ -5758,6 +5779,7 @@ void uninitengine(void)
|
|||
for (i=0;i<MAXPALOOKUPS;i++)
|
||||
if (palookup[i] != NULL) { kkfree(palookup[i]); palookup[i] = NULL; }
|
||||
|
||||
#ifdef DYNALLOC_ARRAYS
|
||||
if (sector != NULL)
|
||||
Bfree(sector);
|
||||
if (wall != NULL)
|
||||
|
@ -5770,6 +5792,7 @@ void uninitengine(void)
|
|||
Bfree(spriteext);
|
||||
if (spritesmooth != NULL)
|
||||
Bfree(spritesmooth);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1584,7 +1584,7 @@ static inline void _message(char message[162])
|
|||
{
|
||||
Bstrcpy(getmessage,message);
|
||||
getmessageleng = strlen(getmessage);
|
||||
getmessagetimeoff = totalclock+120*5;
|
||||
getmessagetimeoff = totalclock+120*3;
|
||||
}
|
||||
|
||||
static void message(char message[162])
|
||||
|
@ -2645,12 +2645,14 @@ static void Keys3d(void)
|
|||
drawtileinfo("Clipboard",3,124,temppicnum,tempshade,temppal,tempcstat,templotag,temphitag,tempextra);
|
||||
}// end if usedcount
|
||||
|
||||
if (infobox&1)
|
||||
// if (infobox&1)
|
||||
{
|
||||
char lines[8][64];
|
||||
int dax, day, dist, height1=0,height2=0,height3=0, num=0;
|
||||
int x,y;
|
||||
|
||||
if (infobox&1)
|
||||
{
|
||||
height2=sector[searchsector].floorz-sector[searchsector].ceilingz;
|
||||
switch (searchstat)
|
||||
{
|
||||
|
@ -2674,11 +2676,14 @@ static void Keys3d(void)
|
|||
Bsprintf(lines[num++],"Repeat: %3d, %3d",wall[searchwall].xrepeat,wall[searchwall].yrepeat);
|
||||
Bsprintf(lines[num++],"Overpic: %3d",wall[searchwall].overpicnum);
|
||||
lines[num++][0]=0;
|
||||
if (!getmessageleng)
|
||||
{
|
||||
Bsprintf(lines[num++],"^251Wall %d^31",searchwall);
|
||||
if (wall[searchwall].nextsector!=-1)
|
||||
Bsprintf(lines[num++],"LoHeight:%d, HiHeight:%d, Length:%d",height1,height3,dist);
|
||||
else
|
||||
Bsprintf(lines[num++],"Height:%d, Length:%d",height2,dist);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
drawtileinfo("Current",WIND1X,WIND1Y,sector[searchsector].ceilingpicnum,sector[searchsector].ceilingshade,
|
||||
|
@ -2689,8 +2694,11 @@ static void Keys3d(void)
|
|||
Bsprintf(lines[num++],"CeilingZ: %d",sector[searchsector].ceilingz);
|
||||
Bsprintf(lines[num++],"Slope: %d",sector[searchsector].ceilingheinum);
|
||||
lines[num++][0]=0;
|
||||
if (!getmessageleng)
|
||||
{
|
||||
Bsprintf(lines[num++],"^251Sector %d^31 ceiling Lotag:%s",searchsector,ExtGetSectorCaption(searchsector));
|
||||
Bsprintf(lines[num++],"Height: %d, Visibility:%d",height2,sector[searchsector].visibility);
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
drawtileinfo("Current",WIND1X,WIND1Y,sector[searchsector].floorpicnum,sector[searchsector].floorshade,
|
||||
|
@ -2701,8 +2709,11 @@ static void Keys3d(void)
|
|||
Bsprintf(lines[num++],"FloorZ: %d",sector[searchsector].floorz);
|
||||
Bsprintf(lines[num++],"Slope: %d",sector[searchsector].floorheinum);
|
||||
lines[num++][0]=0;
|
||||
if (!getmessageleng)
|
||||
{
|
||||
Bsprintf(lines[num++],"^251Sector %d^31 floor Lotag:%s",searchsector,ExtGetSectorCaption(searchsector));
|
||||
Bsprintf(lines[num++],"Height:%d, Visibility:%d",height2,sector[searchsector].visibility);
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
drawtileinfo("Current",WIND1X,WIND1Y,sprite[searchwall].picnum,sprite[searchwall].shade,
|
||||
|
@ -2714,6 +2725,8 @@ static void Keys3d(void)
|
|||
Bsprintf(lines[num++],"PosZ: "" %d",sprite[searchwall].z);// prevents tab character
|
||||
lines[num++][0]=0;
|
||||
|
||||
if (!getmessageleng)
|
||||
{
|
||||
if (strlen(names[sprite[searchwall].picnum]) > 0)
|
||||
{
|
||||
if (sprite[searchwall].picnum==SECTOREFFECTOR)
|
||||
|
@ -2722,12 +2735,20 @@ static void Keys3d(void)
|
|||
}
|
||||
else Bsprintf(lines[num++],"^251Sprite %d^31, picnum %d",searchwall,sprite[searchwall].picnum);
|
||||
Bsprintf(lines[num++],"Elevation:%d",getflorzofslope(searchsector,sprite[searchwall].x,sprite[searchwall].y)-sprite[searchwall].z);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
x=WIND1X;y=WIND1Y;
|
||||
x*=xdimgame/320.;
|
||||
y*=ydimgame/200.;
|
||||
y+=(ydimgame>>6)*8;
|
||||
if (getmessageleng)
|
||||
{
|
||||
while (num < 4)
|
||||
lines[num++][0] = 0;
|
||||
Bsprintf(lines[num++],"^251%s",getmessage);
|
||||
}
|
||||
begindrawing();
|
||||
for (i=0;i<num;i++)
|
||||
{
|
||||
|
@ -7323,7 +7344,8 @@ void app_crashhandler(void)
|
|||
char *f;
|
||||
fixspritesectors(); //Do this before saving!
|
||||
updatesector(startposx,startposy,&startsectnum);
|
||||
if (pathsearchmode) f = levelname;
|
||||
if (pathsearchmode)
|
||||
f = levelname;
|
||||
else
|
||||
{
|
||||
// virtual filesystem mode can't save to directories so drop the file into
|
||||
|
@ -7332,7 +7354,9 @@ void app_crashhandler(void)
|
|||
if (!f) f = levelname; else f++;
|
||||
}
|
||||
f=strstr(levelname,".map");
|
||||
if (f)Bstrcpy(f,"_crash.map");else Bstrcat(f,"_crash.map");
|
||||
if (f)
|
||||
Bstrcpy(f,"_crash.map");
|
||||
else Bstrcat(f,"_crash.map");
|
||||
ExtPreSaveMap();
|
||||
saveboard(levelname,&startposx,&startposy,&startposz,&startang,&startsectnum);
|
||||
ExtSaveMap(levelname);
|
||||
|
@ -7516,7 +7540,7 @@ void ExtAnalyzeSprites(void)
|
|||
|
||||
static void Keys2d3d(void)
|
||||
{
|
||||
int i, j;
|
||||
int i;
|
||||
if (keystatus[KEYSC_QUOTE] && keystatus[KEYSC_A]) // ' a
|
||||
{
|
||||
keystatus[KEYSC_A] = 0;
|
||||
|
@ -7666,9 +7690,9 @@ static void Keys2d3d(void)
|
|||
|
||||
if (getmessageleng > 0)
|
||||
{
|
||||
charsperline = 64;
|
||||
// charsperline = 64;
|
||||
//if (dimensionmode[snum] == 2) charsperline = 80;
|
||||
if (qsetmode == 200)
|
||||
/* if (qsetmode == 200)
|
||||
{
|
||||
for (i=0;i<=getmessageleng;i+=charsperline)
|
||||
{
|
||||
|
@ -7688,7 +7712,8 @@ static void Keys2d3d(void)
|
|||
enddrawing();
|
||||
}
|
||||
}
|
||||
else printmessage16(getmessage);
|
||||
else */ if (qsetmode != 200)
|
||||
printmessage16(getmessage);
|
||||
if (totalclock > getmessagetimeoff)
|
||||
getmessageleng = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue