aboutsummaryrefslogtreecommitdiff
path: root/graphics/scummfont.cpp
diff options
context:
space:
mode:
authorMax Horn2005-01-06 22:48:42 +0000
committerMax Horn2005-01-06 22:48:42 +0000
commit858c6c4d5bb40a29550009b07f8d4b583d3f03cb (patch)
tree34d59d4b04392c72a73bae02d35681abcf2a4901 /graphics/scummfont.cpp
parenta9d0472758f4fb43edc0ea6602f59ef7f8075ec5 (diff)
downloadscummvm-rg350-858c6c4d5bb40a29550009b07f8d4b583d3f03cb.tar.gz
scummvm-rg350-858c6c4d5bb40a29550009b07f8d4b583d3f03cb.tar.bz2
scummvm-rg350-858c6c4d5bb40a29550009b07f8d4b583d3f03cb.zip
Switching GUI to an alternate font; using a second, bigger, font for 640x480 games like COMI. Note: we can always easily switch back to the SCUMM font or any other font, if we want to
svn-id: r16467
Diffstat (limited to 'graphics/scummfont.cpp')
-rw-r--r--graphics/scummfont.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/graphics/scummfont.cpp b/graphics/scummfont.cpp
index 7ec03edcb2..32935be6f8 100644
--- a/graphics/scummfont.cpp
+++ b/graphics/scummfont.cpp
@@ -63,9 +63,8 @@ int ScummFont::getCharWidth(byte chr) const {
}
//void ScummFont::drawChar(byte chr, int xx, int yy, OverlayColor color) {
-void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 color, int scaleFactor) const {
+void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 color) const {
assert(dst != 0);
- tx *= scaleFactor; ty *= scaleFactor;
byte *ptr = (byte *)dst->getBasePtr(tx, ty);
@@ -73,25 +72,18 @@ void ScummFont::drawChar(const Surface *dst, byte chr, int tx, int ty, uint32 co
uint buffer = 0;
uint mask = 0;
- for (int y = 0; y < 8 * scaleFactor; y++) {
+ for (int y = 0; y < 8; y++) {
if (ty + y < 0 || ty + y >= dst->h)
continue;
- for (int x = 0; x < 8 * scaleFactor; x++) {
- if(scaleFactor != 1 && !(x % 2))
- mask >>= 1;
- else if(scaleFactor == 1)
- mask >>= 1;
+ for (int x = 0; x < 8; x++) {
+ mask >>= 1;
if (tx + x < 0 || tx + x >= dst->w)
continue;
if (mask == 0) {
- if(scaleFactor != 1 && !(y % 2))
- buffer = *tmp++;
- else if(scaleFactor == 1)
- buffer = *tmp++;
-
+ buffer = *tmp++;
mask = 0x80;
}
const byte c = ((buffer & mask) != 0);