aboutsummaryrefslogtreecommitdiff
path: root/engines/prince/font.cpp
diff options
context:
space:
mode:
authorKamil Zbróg2013-10-13 22:36:21 +0100
committerKamil Zbróg2013-10-13 22:36:21 +0100
commit30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f (patch)
tree6cbc397f621ff5744ddf8fb8502c6bcc43d02d11 /engines/prince/font.cpp
parent71f8ce0894117a9b5431c7066ad1352203d89c4a (diff)
downloadscummvm-rg350-30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f.tar.gz
scummvm-rg350-30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f.tar.bz2
scummvm-rg350-30ad6df5fccbfcd1097d498e8dc01965e4e5cb2f.zip
PRINCE: code convention cleanup
Diffstat (limited to 'engines/prince/font.cpp')
-rw-r--r--engines/prince/font.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/engines/prince/font.cpp b/engines/prince/font.cpp
index d3ae4d6b83..8d812c4d15 100644
--- a/engines/prince/font.cpp
+++ b/engines/prince/font.cpp
@@ -31,36 +31,30 @@
namespace Prince {
-Font::Font()
-{
+Font::Font() {
}
-Font::~Font()
-{
+Font::~Font() {
delete _fontData;
}
-bool Font::load(Common::SeekableReadStream &stream)
-{
+bool Font::load(Common::SeekableReadStream &stream) {
stream.seek(0);
_fontData = new byte[stream.size()];
stream.read(_fontData, stream.size());
return true;
}
-int Font::getFontHeight() const
-{
+int Font::getFontHeight() const {
debug("Font::getFontHeight %d", _fontData[5]);
return _fontData[5];
}
-int Font::getMaxCharWidth() const
-{
+int Font::getMaxCharWidth() const {
return 0;
}
-Font::ChrData Font::getChrData(byte chr) const
-{
+Font::ChrData Font::getChrData(byte chr) const {
chr -= 32;
uint16 chrOffset = 4*chr+6;
@@ -72,13 +66,11 @@ Font::ChrData Font::getChrData(byte chr) const
return chrData;
}
-int Font::getCharWidth(byte chr) const
-{
+int Font::getCharWidth(byte chr) const {
return getChrData(chr)._width;
}
-void Font::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const
-{
+void Font::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color) const {
const ChrData chrData = getChrData(chr);
const byte *src = chrData._pixels;
byte *target = (byte *)dst->getBasePtr(x, y);
@@ -88,7 +80,6 @@ void Font::drawChar(Graphics::Surface *dst, byte chr, int x, int y, uint32 color
src += chrData._width;
target += dst->pitch;
}
-
}
}