fontvga.cc

Go to the documentation of this file.
00001 
00007 #ifdef HAVE_CONFIG_H
00008 #  include <config.h>
00009 #endif
00010 
00011 #include <fstream>
00012 #include <iostream>
00013 #ifdef MACOS
00014   #include <cassert>
00015 #endif
00016 #include "fontvga.h"
00017 #include "fnames.h"
00018 #ifndef ALPHA_LINUX_CXX
00019 #  include <cctype>
00020 #endif
00021 #include "utils.h"
00022 
00023 using std::cout;
00024 using std::endl;
00025 // using std::string;
00026 
00027 /*
00028  *  Fonts in 'fonts.vga':
00029  *
00030  *  0 = Normal yellow.
00031  *  1 = Large runes.
00032  *  2 = small black (as in zstats).
00033  *  3 = runes.
00034  *  4 = tiny black, used in books.
00035  *  5 = little white, glowing, for spellbooks.
00036  *  6 = runes.
00037  *  7 = normal red.
00038  *  8 = Serpentine (books)
00039  *  9 = Serpentine (signs)
00040  *  10 = Serpentine (gold signs)
00041  */
00042 
00043 /*
00044  *  Horizontal leads, by fontnum:
00045  *
00046  *  This must include the Endgame fonts (currently 32-35)!!
00047  *      And the MAINSHP font (36)
00048  *  However, their values are set elsewhere
00049  */
00050 //static int hlead[NUM_FONTS] = {-1, 0, 1, 0, 1, 0, 0, -1, 0, 0};
00051 // For scrolls (12/6/00):
00052 static int hlead[NUM_FONTS] = {-2, -1, 0, -1, 0, 0, -1, -2, -1, -1, 0, 0};
00053 /*
00054  *  Initialize.
00055  */
00056 
00057 void Fonts_vga_file::init
00058   (
00059   )
00060   {
00061   int cnt = sizeof(fonts)/sizeof(fonts[0]);
00062   const char *fname = U7exists(PATCH_FONTS) ? PATCH_FONTS : FONTS_VGA;
00063   for (int i = 0; i < cnt; i++)
00064     fonts[i].load(fname, i, hlead[i], 0);
00065   }
00066 

Generated on Mon Jul 9 14:42:50 2007 for ExultEngine by  doxygen 1.5.1