1 /* $Id: gamefont.c,v 1.5 2004-08-28 23:17:45 schaffner 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.
26 static char rcsid[] = "$Id: gamefont.c,v 1.5 2004-08-28 23:17:45 schaffner Exp $";
35 // if 1, use high-res versions of fonts
37 int FontHiresAvailable = 0;
39 char * Gamefont_filenames[] = { "font1-1.fnt", // Font 0
40 "font1-1h.fnt", // Font 0 High-res
41 "font2-1.fnt", // Font 1
42 "font2-1h.fnt", // Font 1 High-res
43 "font2-2.fnt", // Font 2
44 "font2-2h.fnt", // Font 2 High-res
45 "font2-3.fnt", // Font 3
46 "font2-3h.fnt", // Font 3 High-res
47 "font3-1.fnt", // Font 4
48 "font3-1h.fnt", // Font 4 High-res
51 grs_font *Gamefonts[MAX_FONTS];
53 int Gamefont_installed = 0;
59 if (Gamefont_installed)
61 Gamefont_installed = 1;
62 FontHiresAvailable = 1;
64 for (i = 0; i < MAX_FONTS; i += 2)
65 Gamefonts[i] = gr_init_font(Gamefont_filenames[i]);
66 for (i = 1; i < MAX_FONTS; i += 2)
68 Gamefonts[i] = gr_init_font(Gamefont_filenames[i]);
70 FontHiresAvailable = 0;
73 atexit(gamefont_close);
81 if (!Gamefont_installed)
83 Gamefont_installed = 0;
85 for (i = 0; i < MAX_FONTS; i++)
87 gr_close_font(Gamefonts[i]);