[Scummvm-cvs-logs] SF.net SVN: scummvm: [30335] scummvm/trunk/engines/parallaction/font.cpp
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Tue Jan 8 00:13:46 CET 2008
Revision: 30335
http://scummvm.svn.sourceforge.net/scummvm/?rev=30335&view=rev
Author: peres001
Date: 2008-01-07 15:13:45 -0800 (Mon, 07 Jan 2008)
Log Message:
-----------
Merged dos monospaced fonts subclasses into parent class. Handling is the same, and readability is more important than performance, especially when you call a routine only twice.
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/font.cpp
Modified: scummvm/trunk/engines/parallaction/font.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/font.cpp 2008-01-07 22:47:54 UTC (rev 30334)
+++ scummvm/trunk/engines/parallaction/font.cpp 2008-01-07 23:13:45 UTC (rev 30335)
@@ -307,21 +307,6 @@
return _data->_height;
}
-
-public:
- DosMonospacedFont(Cnv *cnv) : DosFont(cnv) {
- _width = 8;
- }
-
-};
-
-class DosMenuFont : public DosMonospacedFont {
-
-public:
- DosMenuFont(Cnv *cnv) : DosMonospacedFont(cnv) {
- }
-
-protected:
uint16 drawChar(char c) {
byte *src = _data->getFramePtr(c);
@@ -342,32 +327,15 @@
return _width;
}
-};
-
-
-class DosLabelFont : public DosMonospacedFont {
-
public:
- DosLabelFont(Cnv *cnv) : DosMonospacedFont(cnv) {
+ DosMonospacedFont(Cnv *cnv) : DosFont(cnv) {
+ _width = 8;
}
-protected:
- uint16 drawChar(char c) {
+};
- byte *src = _data->getFramePtr(c);
- byte *dst = _cp;
- for (uint16 i = 0; i < height(); i++) {
- memcpy(dst, src, _width);
- dst += _bufPitch;
- src += _pitch;
- }
- return _width;
- }
-
-};
-
class AmigaFont : public Font {
#include "common/pack-start.h"
@@ -552,10 +520,10 @@
f = new DosDialogueFont(cnv);
else
if (!scumm_stricmp(name, "topaz"))
- f = new DosLabelFont(cnv);
+ f = new DosMonospacedFont(cnv);
else
if (!scumm_stricmp(name, "slide"))
- f = new DosMenuFont(cnv);
+ f = new DosMonospacedFont(cnv);
else
error("unknown dos font '%s'", name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list