Change FSPACX/FSPACY macros to inline functions
This commit is contained in:
parent
404e7e1d63
commit
49854c08dd
|
@ -55,12 +55,30 @@ COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
|
|||
extern float FNTScaleX, FNTScaleY;
|
||||
|
||||
// add (scaled) spacing to given font coordinate
|
||||
#define FSPACX(x) ((float)((x)*(FNTScaleX*(GAME_FONT->ft_w/7))))
|
||||
#define FSPACY(y) ((float)((y)*(FNTScaleY*(GAME_FONT->ft_h/5))))
|
||||
#define LINE_SPACING ((float)(FNTScaleY*(grd_curcanv->cv_font->ft_h+(GAME_FONT->ft_h/5))))
|
||||
|
||||
extern array<grs_font_ptr, MAX_FONTS> Gamefonts;
|
||||
|
||||
static inline float FSPACX()
|
||||
{
|
||||
return FNTScaleX * (GAME_FONT->ft_w / 7);
|
||||
}
|
||||
|
||||
static inline float FSPACX(const int &x)
|
||||
{
|
||||
return FSPACX() * x;
|
||||
}
|
||||
|
||||
static inline float FSPACY()
|
||||
{
|
||||
return FNTScaleY * (GAME_FONT->ft_h / 5);
|
||||
}
|
||||
|
||||
static inline float FSPACY(const int &y)
|
||||
{
|
||||
return FSPACY() * y;
|
||||
}
|
||||
|
||||
void gamefont_init();
|
||||
void gamefont_close();
|
||||
void gamefont_choose_game_font(int scrx,int scry);
|
||||
|
|
Loading…
Reference in a new issue