2009-10-03 20:49:18 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* $URL$
|
|
|
|
* $Id$
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2009-10-04 20:01:21 +00:00
|
|
|
#ifndef SCI_GUI_FONT_H
|
|
|
|
#define SCI_GUI_FONT_H
|
|
|
|
|
2009-10-04 22:43:30 +00:00
|
|
|
#include "sci/gui/gui.h"
|
|
|
|
|
2009-10-03 20:49:18 +00:00
|
|
|
namespace Sci {
|
|
|
|
|
|
|
|
class SciGUIfont {
|
|
|
|
public:
|
2009-10-04 22:32:36 +00:00
|
|
|
SciGUIfont(ResourceManager *resMan, GUIResourceId resourceId);
|
2009-10-03 20:49:18 +00:00
|
|
|
~SciGUIfont();
|
|
|
|
|
2009-10-04 16:39:46 +00:00
|
|
|
GUIResourceId getResourceId();
|
2009-10-03 20:49:18 +00:00
|
|
|
byte getHeight();
|
|
|
|
byte getCharWidth(byte chr);
|
|
|
|
byte getCharHeight(byte chr);
|
|
|
|
byte *getCharData(byte chr);
|
2009-10-04 22:32:36 +00:00
|
|
|
void draw(SciGUIscreen *screen, int16 chr, int16 top, int16 left, byte color, byte textface);
|
2009-10-03 20:49:18 +00:00
|
|
|
|
|
|
|
private:
|
2009-10-04 16:39:46 +00:00
|
|
|
GUIResourceId _resourceId;
|
2009-10-03 20:49:18 +00:00
|
|
|
byte *_resourceData;
|
|
|
|
|
|
|
|
struct charinfo {
|
|
|
|
byte w, h;
|
|
|
|
int16 offset;
|
|
|
|
};
|
|
|
|
byte mFontH;
|
|
|
|
uint16 mCharMax;
|
|
|
|
charinfo* mChars;
|
|
|
|
};
|
|
|
|
|
2009-10-04 20:01:21 +00:00
|
|
|
} // End of namespace Sci
|
|
|
|
|
|
|
|
#endif
|