From fa26a436aada85be3402ca28ae427247978c7781 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 3 Mar 2013 01:03:33 +0000 Subject: [PATCH] Move */main/gamefont.h -> common/main/gamefont.h --- {d1x-rebirth => common}/main/gamefont.h | 7 ++- d2x-rebirth/main/gamefont.h | 59 ------------------------- 2 files changed, 5 insertions(+), 61 deletions(-) rename {d1x-rebirth => common}/main/gamefont.h (92%) delete mode 100644 d2x-rebirth/main/gamefont.h diff --git a/d1x-rebirth/main/gamefont.h b/common/main/gamefont.h similarity index 92% rename from d1x-rebirth/main/gamefont.h rename to common/main/gamefont.h index cf99776f1..4df352607 100644 --- a/d1x-rebirth/main/gamefont.h +++ b/common/main/gamefont.h @@ -8,7 +8,7 @@ SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. -COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. +COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. */ /* @@ -22,7 +22,6 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. #define _GAMEFONT_H #include "gr.h" -#include "piggy.h" // When adding a new font, don't forget to change the filename in // gamefont.c!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -30,7 +29,11 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. // We are interleaving low & high resolution fonts, so to access a // font you say fontnum+flag where flag is 0 for lowres, 1 for hires +#if defined(DXX_BUILD_DESCENT_I) #define GFONT_BIG_1 MacPig // the Mac data doesn't have this in hires, in the automap the scaled/hires one won't fit +#elif defined(DXX_BUILD_DESCENT_II) +#define GFONT_BIG_1 0 +#endif #define GFONT_MEDIUM_1 1 #define GFONT_MEDIUM_2 2 #define GFONT_MEDIUM_3 3 diff --git a/d2x-rebirth/main/gamefont.h b/d2x-rebirth/main/gamefont.h deleted file mode 100644 index 63e65647b..000000000 --- a/d2x-rebirth/main/gamefont.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX -SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO -END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A -ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS -IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS -SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE -FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE -CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS -AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. -COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. -*/ - -/* - * - * Font declarations for the game. - * - */ - - -#ifndef _GAMEFONT_H -#define _GAMEFONT_H - -#include "gr.h" - -// When adding a new font, don't forget to change the filename in -// gamefont.c!!!!!!!!!!!!!!!!!!!!!!!!!!! - -// We are interleaving low & high resolution fonts, so to access a -// font you say fontnum+flag where flag is 0 for lowres, 1 for hires - -#define GFONT_BIG_1 0 -#define GFONT_MEDIUM_1 1 -#define GFONT_MEDIUM_2 2 -#define GFONT_MEDIUM_3 3 -#define GFONT_SMALL 4 - -#define GAME_FONT (Gamefonts[GFONT_SMALL]) -#define MEDIUM1_FONT (Gamefonts[GFONT_MEDIUM_1]) -#define MEDIUM2_FONT (Gamefonts[GFONT_MEDIUM_2]) -#define MEDIUM3_FONT (Gamefonts[GFONT_MEDIUM_3]) -#define HUGE_FONT (Gamefonts[GFONT_BIG_1]) - -#define MAX_FONTS 5 - -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 grs_font *Gamefonts[MAX_FONTS]; - -void gamefont_init(); -void gamefont_close(); -void gamefont_choose_game_font(int scrx,int scry); - -#endif /* _GAMEFONT_H */