[Scummvm-cvs-logs] SF.net SVN: scummvm:[44046] scummvm/trunk/engines/teenagent
megath at users.sourceforge.net
megath at users.sourceforge.net
Sun Sep 13 11:54:03 CEST 2009
Revision: 44046
http://scummvm.svn.sourceforge.net/scummvm/?rev=44046&view=rev
Author: megath
Date: 2009-09-13 09:54:03 +0000 (Sun, 13 Sep 2009)
Log Message:
-----------
added shadow_color, height and packed width parameters for fonts.
Modified Paths:
--------------
scummvm/trunk/engines/teenagent/font.cpp
scummvm/trunk/engines/teenagent/font.h
Modified: scummvm/trunk/engines/teenagent/font.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/font.cpp 2009-09-13 09:53:14 UTC (rev 44045)
+++ scummvm/trunk/engines/teenagent/font.cpp 2009-09-13 09:54:03 UTC (rev 44046)
@@ -27,7 +27,7 @@
namespace TeenAgent {
-Font::Font() : grid_color(0xd0), color(0xd1), data(0) {
+Font::Font() : grid_color(0xd0), color(0xd1), shadow_color(0), height(0), width_pack(0), data(0) {
}
void Font::load(int id) {
@@ -54,7 +54,7 @@
uint h = glyph[0], w = glyph[1];
if (surface == NULL || surface->pixels == NULL)
- return w - 1;
+ return w - width_pack;
//debug(0, "char %c, width: %dx%d", c, w, h);
glyph += 2;
@@ -64,7 +64,7 @@
byte v = *glyph++;
switch(v) {
case 1:
- dst[j] = 0;
+ dst[j] = shadow_color;
break;
case 2:
dst[j] = color;
@@ -73,7 +73,7 @@
}
dst += surface->pitch;
}
- return w - 1;
+ return w - width_pack;
}
static uint find_in_str(const Common::String &str, char c, uint pos = 0) {
@@ -82,7 +82,6 @@
}
uint Font::render(Graphics::Surface *surface, int x, int y, const Common::String &str, bool show_grid) {
- const int height = 10;
if (surface != NULL) {
uint max_w = render(NULL, 0, 0, str, false);
if (show_grid)
Modified: scummvm/trunk/engines/teenagent/font.h
===================================================================
--- scummvm/trunk/engines/teenagent/font.h 2009-09-13 09:53:14 UTC (rev 44045)
+++ scummvm/trunk/engines/teenagent/font.h 2009-09-13 09:54:03 UTC (rev 44046)
@@ -31,7 +31,8 @@
class Font {
public:
- byte grid_color, color;
+ byte grid_color, color, shadow_color;
+ byte height, width_pack;
Font();
void load(int id);
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