1 /* $Id: gamefont.c,v 1.4 2003-10-10 09:36:35 btb Exp $ */
3 THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX
4 SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO
5 END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A
6 ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS
7 IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS
8 SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE
9 FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE
10 CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS
11 AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE.
12 COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
20 * Revision 1.2 1995/08/18 10:23:25 allender
21 * remove refernce to big font -- add PC small font for pixel
24 * Revision 1.1 1995/05/16 15:25:22 allender
27 * Revision 2.0 1995/02/27 11:30:14 john
28 * New version 2.0, which has no anonymous unions, builds with
29 * Watcom 10.0, and doesn't require parsing BITMAPS.TBL.
31 * Revision 1.8 1994/11/18 16:41:39 adam
34 * Revision 1.7 1994/11/17 13:07:11 adam
37 * Revision 1.6 1994/11/03 21:36:12 john
38 * Added code for credit fonts.
40 * Revision 1.5 1994/08/17 20:20:02 matt
41 * Took out alternate-color versions of font3, since this is a mono font
43 * Revision 1.4 1994/08/12 12:03:44 adam
46 * Revision 1.3 1994/08/11 12:43:40 adam
47 * changed font filenames
49 * Revision 1.2 1994/08/10 19:57:15 john
50 * Changed font stuff; Took out old menu; messed up lots of
51 * other stuff like game sequencing messages, etc.
53 * Revision 1.1 1994/08/10 17:20:09 john
64 static char rcsid[] = "$Id: gamefont.c,v 1.4 2003-10-10 09:36:35 btb Exp $";
73 // if 1, use high-res versions of fonts
75 int FontHiresAvailable = 0;
77 char * Gamefont_filenames[] = { "font1-1.fnt", // Font 0
78 "font1-1h.fnt", // Font 0 High-res
79 "font2-1.fnt", // Font 1
80 "font2-1h.fnt", // Font 1 High-res
81 "font2-2.fnt", // Font 2
82 "font2-2h.fnt", // Font 2 High-res
83 "font2-3.fnt", // Font 3
84 "font2-3h.fnt", // Font 3 High-res
85 "font3-1.fnt", // Font 4
86 "font3-1h.fnt", // Font 4 High-res
89 grs_font *Gamefonts[MAX_FONTS];
91 int Gamefont_installed = 0;
97 if (Gamefont_installed)
99 Gamefont_installed = 1;
100 FontHiresAvailable = 1;
102 for (i = 0; i < MAX_FONTS; i += 2)
103 Gamefonts[i] = gr_init_font(Gamefont_filenames[i]);
104 for (i = 1; i < MAX_FONTS; i += 2)
106 Gamefonts[i] = gr_init_font(Gamefont_filenames[i]);
108 FontHiresAvailable = 0;
111 atexit(gamefont_close);
115 void gamefont_close()
119 if (!Gamefont_installed)
121 Gamefont_installed = 0;
123 for (i = 0; i < MAX_FONTS; i++)
125 gr_close_font(Gamefonts[i]);