mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
Compact spacing for gametext() when used in menus... this lets me fit a few more characters into the option names
git-svn-id: https://svn.eduke32.com/eduke32@887 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
11fc1203fa
commit
53bd9bc6a4
4 changed files with 268 additions and 271 deletions
|
@ -177,6 +177,7 @@ int r_parallaxskypanning = 0;
|
|||
// line of sight checks before mddraw()
|
||||
int r_cullobstructedmodels = 0;
|
||||
#define CULL_DELAY 5
|
||||
#define CULL_OFFSET 256
|
||||
|
||||
// fullbright cvar
|
||||
int r_fullbrights = 1;
|
||||
|
@ -4441,10 +4442,10 @@ int polymost_checkcoordinates(int x, int y, spritetype *tspr)
|
|||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x+x, tspr->y+y, tspr->z, datempsectnum))
|
||||
return 1;
|
||||
for (i=5;i>-1;i--)
|
||||
for (i=4;i>-1;i--)
|
||||
{
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x+x, tspr->y+y, tspr->z-((tilesizy[tspr->picnum]*tspr->yrepeat)*i), datempsectnum))
|
||||
tspr->x+x, tspr->y+y, tspr->z-((tilesizy[tspr->picnum]*tspr->yrepeat)*i)-512, datempsectnum))
|
||||
return 1;
|
||||
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
|
||||
tspr->x+x, tspr->y+y, tspr->z+((tilesizy[tspr->picnum]*tspr->yrepeat)*i), datempsectnum))
|
||||
|
@ -4535,7 +4536,7 @@ void polymost_drawsprite(int snum)
|
|||
if (polymost_checkcoordinates(0, 0, tspr))
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
|
||||
i = 256;
|
||||
i = CULL_OFFSET;
|
||||
if (polymost_checkcoordinates(-i, 0, tspr))
|
||||
{ cullmodel[tspr->owner] = 0; break; }
|
||||
if (polymost_checkcoordinates(-i, -i, tspr))
|
||||
|
|
|
@ -118,8 +118,6 @@ extern void loadefs(const char *fn);
|
|||
extern int furthestangle(int iActor,int angs);
|
||||
extern void execute(int iActor,int iPlayer,int lDist);
|
||||
extern void overwritesprite(int thex,int they,int tilenum,int shade,int stat,int dapalnum);
|
||||
extern inline int gametext(int x,int y,const char *t,int s,int dabits);
|
||||
extern inline int gametextpal(int x,int y,const char *t,int s,int p);
|
||||
extern inline int minitext(int x,int y,const char *t,int p,int sb);
|
||||
extern void gamenumber(int x,int y,int n,int s);
|
||||
extern void Shutdown(void);
|
||||
|
@ -202,6 +200,11 @@ extern void myospalx(int x,int y,int tilenum,int shade,int orientation,int p);
|
|||
extern void ResetGameVars(void);
|
||||
extern void ResetActorGameVars(int iActor);
|
||||
|
||||
#define gametext(x,y,t,s,dabits) gametext_z(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536)
|
||||
#define gametextpal(x,y,t,s,p) gametext_z(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1, 65536)
|
||||
#define mgametext(x,y,t,s,dabits) gametext_z(2,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536)
|
||||
#define mgametextpal(x,y,t,s,p) gametext_z(2,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1, 65536)
|
||||
|
||||
extern void setupdynamictostatic();
|
||||
extern void processnames(const char *szLabel, int lValue);
|
||||
|
||||
|
|
|
@ -283,6 +283,9 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
{
|
||||
int ac,newx,oldx=x;
|
||||
char centre, *oldt;
|
||||
int squishtext = (small == 2);
|
||||
|
||||
small &= ~2;
|
||||
|
||||
centre = (x == (320>>1));
|
||||
newx = 0;
|
||||
|
@ -303,7 +306,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
}
|
||||
if (*t == 32)
|
||||
{
|
||||
newx+=5*z/65536;
|
||||
newx+=(5-squishtext)*z/65536;
|
||||
t++;
|
||||
continue;
|
||||
}
|
||||
|
@ -312,8 +315,8 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
if (ac < starttile || ac > (starttile + 93)) break;
|
||||
|
||||
if (*t >= '0' && *t <= '9')
|
||||
newx += 8*z/65536;
|
||||
else newx += tilesizx[ac]*z/65536;
|
||||
newx += (8-squishtext)*z/65536;
|
||||
else newx += (tilesizx[ac]-squishtext)*z/65536;
|
||||
t++;
|
||||
}
|
||||
|
||||
|
@ -344,7 +347,7 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
}
|
||||
if (*t == 32)
|
||||
{
|
||||
x+=5*z/65536;
|
||||
x+=(5-squishtext)*z/65536;
|
||||
t++;
|
||||
continue;
|
||||
}
|
||||
|
@ -356,8 +359,8 @@ int gametext_z(int small, int starttile, int x,int y,const char *t,int s,int p,i
|
|||
rotatesprite(x<<16,(y<<16)+(small?ud.config.ScreenHeight<<15:0),z,0,ac,s,p,small?(8|16):(2|orientation),x1,y1,x2,y2);
|
||||
|
||||
if ((*t >= '0' && *t <= '9'))
|
||||
x += 8*z/65536;
|
||||
else x += tilesizx[ac]*z/65536;//(tilesizx[ac]>>small);
|
||||
x += (8-squishtext)*z/65536;
|
||||
else x += (tilesizx[ac]-squishtext)*z/65536;//(tilesizx[ac]>>small);
|
||||
if (x > (ud.config.ScreenWidth - 14)) oldt = (char *)t, x = oldx, y+=8*z/65536;
|
||||
t++;
|
||||
}
|
||||
|
@ -394,16 +397,6 @@ int gametextlen(int x,const char *t)
|
|||
return (x);
|
||||
}
|
||||
|
||||
inline int gametext(int x,int y,const char *t,int s,int dabits)
|
||||
{
|
||||
return(gametext_z(0,STARTALPHANUM, x,y,t,s,0,dabits,0, 0, xdim-1, ydim-1, 65536));
|
||||
}
|
||||
|
||||
inline int gametextpal(int x,int y,const char *t,int s,int p)
|
||||
{
|
||||
return(gametext_z(0,STARTALPHANUM, x,y,t,s,p,26,0, 0, xdim-1, ydim-1, 65536));
|
||||
}
|
||||
|
||||
static inline int mpgametext(int y,const char *t,int s,int dabits)
|
||||
{
|
||||
if (xdim >= 640 && ydim >= 480)
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue