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@1019 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
553658aa67
commit
d3c3b7f0e7
3 changed files with 37 additions and 51 deletions
|
@ -1446,20 +1446,17 @@ void OSD_Printf(const char *fmt, ...)
|
||||||
if (isdigit(*(chp+1)))
|
if (isdigit(*(chp+1)))
|
||||||
{
|
{
|
||||||
char smallbuf[4];
|
char smallbuf[4];
|
||||||
chp++;
|
if (!isdigit(*(++chp+1)))
|
||||||
if (isdigit(*(chp+1)))
|
|
||||||
{
|
|
||||||
smallbuf[0] = *(chp++);
|
|
||||||
smallbuf[1] = *(chp);
|
|
||||||
smallbuf[2] = '\0';
|
|
||||||
p = atol(smallbuf);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
smallbuf[0] = *(chp);
|
smallbuf[0] = *(chp);
|
||||||
smallbuf[1] = '\0';
|
smallbuf[1] = '\0';
|
||||||
p = atol(smallbuf);
|
p = atol(smallbuf);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
smallbuf[0] = *(chp++);
|
||||||
|
smallbuf[1] = *(chp);
|
||||||
|
smallbuf[2] = '\0';
|
||||||
|
p = atol(smallbuf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Btoupper(*(chp+1)) == 'S')
|
if (Btoupper(*(chp+1)) == 'S')
|
||||||
|
|
|
@ -293,11 +293,11 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
||||||
|
|
||||||
if (centre)
|
if (centre)
|
||||||
{
|
{
|
||||||
while (*t)
|
do
|
||||||
{
|
{
|
||||||
if (*t == '^' && isdigit(*(t+1)))
|
if (*t == '^' && isdigit(*(t+1)))
|
||||||
{
|
{
|
||||||
t += 2;
|
t++;
|
||||||
if (isdigit(*t)) t++;
|
if (isdigit(*t)) t++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -307,7 +307,6 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
||||||
newx+=(8-squishtext)*z/65536;
|
newx+=(8-squishtext)*z/65536;
|
||||||
else
|
else
|
||||||
newx+=(5-squishtext)*z/65536;
|
newx+=(5-squishtext)*z/65536;
|
||||||
t++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else ac = *t - '!' + starttile;
|
else ac = *t - '!' + starttile;
|
||||||
|
@ -322,8 +321,8 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
||||||
newx += (8-squishtext)*z/65536;
|
newx += (8-squishtext)*z/65536;
|
||||||
else newx += (tilesizx[ac]-squishtext)*z/65536;
|
else newx += (tilesizx[ac]-squishtext)*z/65536;
|
||||||
}
|
}
|
||||||
t++;
|
|
||||||
}
|
}
|
||||||
|
while (*(++t));
|
||||||
|
|
||||||
t = oldt;
|
t = oldt;
|
||||||
x = (widthx>>1)-((orientation & 256)?newx<<15:newx>>1);
|
x = (widthx>>1)-((orientation & 256)?newx<<15:newx>>1);
|
||||||
|
@ -331,25 +330,22 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
||||||
// usehightile = (ht && r_downsize < 2);
|
// usehightile = (ht && r_downsize < 2);
|
||||||
ox=x;
|
ox=x;
|
||||||
oy=y;
|
oy=y;
|
||||||
while (*t)
|
do
|
||||||
{
|
{
|
||||||
if (*t == '^' && isdigit(*(t+1)))
|
if (*t == '^' && isdigit(*(t+1)))
|
||||||
{
|
{
|
||||||
char smallbuf[4];
|
char smallbuf[4];
|
||||||
t++;
|
if (!isdigit(*(++t+1)))
|
||||||
if (isdigit(*(t+1)))
|
|
||||||
{
|
{
|
||||||
smallbuf[0] = *(t++);
|
smallbuf[0] = *(t);
|
||||||
smallbuf[1] = *(t++);
|
|
||||||
smallbuf[2] = '\0';
|
|
||||||
p = atol(smallbuf);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
smallbuf[0] = *(t++);
|
|
||||||
smallbuf[1] = '\0';
|
smallbuf[1] = '\0';
|
||||||
p = atol(smallbuf);
|
p = atol(smallbuf);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
smallbuf[0] = *(t++);
|
||||||
|
smallbuf[1] = *(t);
|
||||||
|
smallbuf[2] = '\0';
|
||||||
|
p = atol(smallbuf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (*t == 32)
|
if (*t == 32)
|
||||||
|
@ -358,7 +354,6 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
||||||
x+=(8-squishtext)*z/65536;
|
x+=(8-squishtext)*z/65536;
|
||||||
else
|
else
|
||||||
x+=(5-squishtext)*z/65536;
|
x+=(5-squishtext)*z/65536;
|
||||||
t++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else ac = *t - '!' + starttile;
|
else ac = *t - '!' + starttile;
|
||||||
|
@ -382,8 +377,8 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
||||||
|
|
||||||
if ((orientation&256) == 0) // warpping long strings doesn't work for precise coordinates due to overflow
|
if ((orientation&256) == 0) // warpping long strings doesn't work for precise coordinates due to overflow
|
||||||
if (x > (ud.config.ScreenWidth - 14)) oldt = (char *)t, x = oldx, y+=8*z/65536;
|
if (x > (ud.config.ScreenWidth - 14)) oldt = (char *)t, x = oldx, y+=8*z/65536;
|
||||||
t++;
|
|
||||||
}
|
}
|
||||||
|
while (*(++t));
|
||||||
// usehightile = ht;
|
// usehightile = ht;
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
@ -395,12 +390,11 @@ int gametextlen(int x,const char *t)
|
||||||
if (t == NULL)
|
if (t == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
while (*t)
|
do
|
||||||
{
|
{
|
||||||
if (*t == 32)
|
if (*t == 32)
|
||||||
{
|
{
|
||||||
x+=5;
|
x+=5;
|
||||||
t++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else ac = *t - '!' + STARTALPHANUM;
|
else ac = *t - '!' + STARTALPHANUM;
|
||||||
|
@ -411,9 +405,8 @@ int gametextlen(int x,const char *t)
|
||||||
if ((*t >= '0' && *t <= '9'))
|
if ((*t >= '0' && *t <= '9'))
|
||||||
x += 8;
|
x += 8;
|
||||||
else x += tilesizx[ac];
|
else x += tilesizx[ac];
|
||||||
t++;
|
|
||||||
}
|
}
|
||||||
|
while (*(++t));
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -434,32 +427,28 @@ int minitext_(int x,int y,const char *t,int s,int p,int sb)
|
||||||
sb &= 255;
|
sb &= 255;
|
||||||
|
|
||||||
// usehightile = (ht && !r_downsize);
|
// usehightile = (ht && !r_downsize);
|
||||||
while (*t)
|
do
|
||||||
{
|
{
|
||||||
if (*t == '^' && isdigit(*(t+1)))
|
if (*t == '^' && isdigit(*(t+1)))
|
||||||
{
|
{
|
||||||
char smallbuf[4];
|
char smallbuf[4];
|
||||||
t++;
|
if (!isdigit(*(++t+1)))
|
||||||
if (isdigit(*(t+1)))
|
|
||||||
{
|
{
|
||||||
smallbuf[0] = *(t++);
|
smallbuf[0] = *(t);
|
||||||
smallbuf[1] = *(t++);
|
|
||||||
smallbuf[2] = '\0';
|
|
||||||
p = atol(smallbuf);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
smallbuf[0] = *(t++);
|
|
||||||
smallbuf[1] = '\0';
|
smallbuf[1] = '\0';
|
||||||
p = atol(smallbuf);
|
p = atol(smallbuf);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
smallbuf[0] = *(t++);
|
||||||
|
smallbuf[1] = *(t);
|
||||||
|
smallbuf[2] = '\0';
|
||||||
|
p = atol(smallbuf);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ch = Btoupper(*t);
|
ch = Btoupper(*t);
|
||||||
if (ch == 32)
|
if (ch == 32)
|
||||||
{
|
{
|
||||||
x+=5;
|
x+=5;
|
||||||
t++;
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else ac = ch - '!' + MINIFONT;
|
else ac = ch - '!' + MINIFONT;
|
||||||
|
@ -468,8 +457,8 @@ int minitext_(int x,int y,const char *t,int s,int p,int sb)
|
||||||
else rotatesprite(x<<16,y<<16,65536L,0,ac,s,p,sb,0,0,xdim-1,ydim-1);
|
else rotatesprite(x<<16,y<<16,65536L,0,ac,s,p,sb,0,0,xdim-1,ydim-1);
|
||||||
x += 4; // tilesizx[ac]+1;
|
x += 4; // tilesizx[ac]+1;
|
||||||
|
|
||||||
t++;
|
|
||||||
}
|
}
|
||||||
|
while (*(++t));
|
||||||
// usehightile = ht;
|
// usehightile = ht;
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1341,7 +1341,7 @@ int checkhitswitch(int snum,int w,int switchtype)
|
||||||
i = nextspritestat[i];
|
i = nextspritestat[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i=0;i<numwalls;i++)
|
for (i=numwalls-1;i>=0;i--)
|
||||||
{
|
{
|
||||||
x = i;
|
x = i;
|
||||||
if (lotag == wall[x].lotag)
|
if (lotag == wall[x].lotag)
|
||||||
|
@ -2094,7 +2094,7 @@ void checkhitsprite(int i,int sn)
|
||||||
case CACTUS__STATIC:
|
case CACTUS__STATIC:
|
||||||
{
|
{
|
||||||
if (rpg == 1)
|
if (rpg == 1)
|
||||||
for (k=0;k<64;k++)
|
for (k=64;k>0;k--)
|
||||||
{
|
{
|
||||||
j = EGS(SECT,SX,SY,SZ-(TRAND%(48<<8)),SCRAP3+(TRAND&3),-8,48,48,TRAND&2047,(TRAND&63)+64,-(TRAND&4095)-(sprite[i].zvel>>2),i,5);
|
j = EGS(SECT,SX,SY,SZ-(TRAND%(48<<8)),SCRAP3+(TRAND&3),-8,48,48,TRAND&2047,(TRAND&63)+64,-(TRAND&4095)-(sprite[i].zvel>>2),i,5);
|
||||||
sprite[j].pal = 8;
|
sprite[j].pal = 8;
|
||||||
|
@ -2107,7 +2107,7 @@ void checkhitsprite(int i,int sn)
|
||||||
case FIRELASER__STATIC:
|
case FIRELASER__STATIC:
|
||||||
case HYDRENT__STATIC:
|
case HYDRENT__STATIC:
|
||||||
case HEAVYHBOMB__STATIC:
|
case HEAVYHBOMB__STATIC:
|
||||||
for (k=0;k<64;k++)
|
for (k=64;k>0;k--)
|
||||||
{
|
{
|
||||||
j = EGS(SECT,SX,SY,SZ-(TRAND%(48<<8)),SCRAP3+(TRAND&3),-8,48,48,TRAND&2047,(TRAND&63)+64,-(TRAND&4095)-(sprite[i].zvel>>2),i,5);
|
j = EGS(SECT,SX,SY,SZ-(TRAND%(48<<8)),SCRAP3+(TRAND&3),-8,48,48,TRAND&2047,(TRAND&63)+64,-(TRAND&4095)-(sprite[i].zvel>>2),i,5);
|
||||||
sprite[j].pal = 8;
|
sprite[j].pal = 8;
|
||||||
|
@ -2123,7 +2123,7 @@ void checkhitsprite(int i,int sn)
|
||||||
}
|
}
|
||||||
case HANGLIGHT__STATIC:
|
case HANGLIGHT__STATIC:
|
||||||
case GENERICPOLE2__STATIC:
|
case GENERICPOLE2__STATIC:
|
||||||
for (k=0;k<6;k++)
|
for (k=6;k>0;k--)
|
||||||
EGS(SECT,SX,SY,SZ-(8<<8),SCRAP1+(TRAND&15),-8,48,48,TRAND&2047,(TRAND&63)+64,-(TRAND&4095)-(sprite[i].zvel>>2),i,5);
|
EGS(SECT,SX,SY,SZ-(8<<8),SCRAP1+(TRAND&15),-8,48,48,TRAND&2047,(TRAND&63)+64,-(TRAND&4095)-(sprite[i].zvel>>2),i,5);
|
||||||
spritesound(GLASS_HEAVYBREAK,i);
|
spritesound(GLASS_HEAVYBREAK,i);
|
||||||
deletesprite(i);
|
deletesprite(i);
|
||||||
|
@ -2138,7 +2138,7 @@ void checkhitsprite(int i,int sn)
|
||||||
|
|
||||||
spritesound(GLASS_HEAVYBREAK,i);
|
spritesound(GLASS_HEAVYBREAK,i);
|
||||||
s = &sprite[i];
|
s = &sprite[i];
|
||||||
for (j=0;j<16;j++) RANDOMSCRAP;
|
for (j=16;j>0;j--) RANDOMSCRAP;
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case WATERFOUNTAIN__STATIC:
|
case WATERFOUNTAIN__STATIC:
|
||||||
|
@ -2154,7 +2154,7 @@ void checkhitsprite(int i,int sn)
|
||||||
case ANTENNA__STATIC:
|
case ANTENNA__STATIC:
|
||||||
if (sprite[sn].extra != *actorscrptr[SHOTSPARK1])
|
if (sprite[sn].extra != *actorscrptr[SHOTSPARK1])
|
||||||
{
|
{
|
||||||
for (j=0;j<15;j++)
|
for (j=15;j>0;j--)
|
||||||
EGS(SECT,SX,SY,sector[SECT].floorz-(12<<8)-(j<<9),SCRAP1+(TRAND&15),-8,64,64,
|
EGS(SECT,SX,SY,sector[SECT].floorz-(12<<8)-(j<<9),SCRAP1+(TRAND&15),-8,64,64,
|
||||||
TRAND&2047,(TRAND&127)+64,-(TRAND&511)-256,i,5);
|
TRAND&2047,(TRAND&127)+64,-(TRAND&511)-256,i,5);
|
||||||
spawn(i,EXPLOSION2);
|
spawn(i,EXPLOSION2);
|
||||||
|
@ -2210,7 +2210,7 @@ void checkhitsprite(int i,int sn)
|
||||||
lotsofglass(i,-1,10);
|
lotsofglass(i,-1,10);
|
||||||
break;
|
break;
|
||||||
case FETUSBROKE__STATIC:
|
case FETUSBROKE__STATIC:
|
||||||
for (j=0;j<48;j++)
|
for (j=48;j>0;j--)
|
||||||
{
|
{
|
||||||
shoot(i,BLOODSPLAT1);
|
shoot(i,BLOODSPLAT1);
|
||||||
SA += 333;
|
SA += 333;
|
||||||
|
@ -2379,7 +2379,7 @@ void checkhitsprite(int i,int sn)
|
||||||
case TRIPODCAMERA__STATIC:
|
case TRIPODCAMERA__STATIC:
|
||||||
spritesound(GLASS_HEAVYBREAK,i);
|
spritesound(GLASS_HEAVYBREAK,i);
|
||||||
s = &sprite[i];
|
s = &sprite[i];
|
||||||
for (j=0;j<16;j++) RANDOMSCRAP;
|
for (j=16;j>0;j--) RANDOMSCRAP;
|
||||||
deletesprite(i);
|
deletesprite(i);
|
||||||
break;
|
break;
|
||||||
case PLAYERONWATER__STATIC:
|
case PLAYERONWATER__STATIC:
|
||||||
|
|
Loading…
Reference in a new issue