Adonthell 0.4
|
00001 /* 00002 (C) Copyright 2000 Joel Vennin 00003 Part of the Adonthell Project http://adonthell.linuxgames.com 00004 00005 This program is free software; you can redistribute it and/or modify 00006 it under the terms of the GNU General Public License. 00007 This program is distributed in the hope that it will be useful, 00008 but WITHOUT ANY WARRANTY. 00009 00010 See the COPYING file for more details 00011 */ 00012 00013 #ifndef _WIN_FONT_H_ 00014 #define _WIN_FONT_H_ 00015 00016 #include <iostream> 00017 #include <stdlib.h> 00018 #include <string.h> 00019 00020 #if __GNUG__ > 2 00021 #include <ext/hash_map> 00022 using __gnu_cxx::hash_map; 00023 #else 00024 #include <hash_map> 00025 #endif 00026 00027 #include "win_types.h" 00028 #include "image.h" 00029 00030 using namespace std; 00031 00032 class win_font{ 00033 00034 protected: 00035 void erase(); 00036 00037 hash_map<u_int16, image*> glyphs; 00038 00039 u_int8 height_; 00040 u_int8 length_; //just for space bar 00041 00042 public: 00043 00044 win_font(char *); 00045 00046 win_font(win_font &); 00047 00048 win_font(); 00049 00050 virtual ~win_font(); 00051 00052 void load(char *); 00053 00054 // void load_font(char *); 00055 00056 virtual bool in_table(u_int16 tmp); 00057 00058 virtual image & operator[](u_int16); 00059 00060 //win_font & operator=(win_font &); 00061 00062 u_int16 height(){return height_;} 00063 00064 u_int16 length(){return length_;} 00065 00066 image * cursor; 00067 00068 }; 00069 00070 #endif 00071