[Scummvm-cvs-logs] SF.net SVN: scummvm:[38942] scummvm/trunk/engines/agos/charset-fontdata.cpp

Kirben at users.sourceforge.net Kirben at users.sourceforge.net
Sat Feb 28 01:12:21 CET 2009


Revision: 38942
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38942&view=rev
Author:   Kirben
Date:     2009-02-28 00:12:21 +0000 (Sat, 28 Feb 2009)

Log Message:
-----------
Elvira 1 uses slightly different font data table, shared for all languages.

Modified Paths:
--------------
    scummvm/trunk/engines/agos/charset-fontdata.cpp

Modified: scummvm/trunk/engines/agos/charset-fontdata.cpp
===================================================================
--- scummvm/trunk/engines/agos/charset-fontdata.cpp	2009-02-27 23:53:52 UTC (rev 38941)
+++ scummvm/trunk/engines/agos/charset-fontdata.cpp	2009-02-28 00:12:21 UTC (rev 38942)
@@ -1161,7 +1161,7 @@
 	0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0,
 };
 
-static const byte english_commonFont[] = {
+static const byte english_waxworksFont[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
 	0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
@@ -1262,7 +1262,7 @@
 	0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
 };
 
-static const byte french_commonFont[] = {
+static const byte french_waxworksFont[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
 	0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
@@ -1363,7 +1363,7 @@
 	0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
 };
 
-static const byte italian_commonFont[] = {
+static const byte italian_waxworksFont[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
 	0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
@@ -1464,7 +1464,7 @@
 	0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
 };
 
-static const byte spanish_commonFont[] = {
+static const byte spanish_waxworksFont[] = {
 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
 	0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
@@ -1565,6 +1565,107 @@
 	0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
 };
 
+static const byte english_elvira1Font[] = {
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x20,
+	0x00, 0x50, 0x28, 0x28, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x90, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+	0x00, 0x90, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+	0x00, 0x90, 0x00, 0x90, 0x90, 0x90, 0x60, 0x00,
+	0x00, 0x10, 0x28, 0x10, 0x2A, 0x44, 0x3A, 0x00,
+	0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0x00, 0x04, 0x08, 0x08, 0x08, 0x08, 0x04, 0x00,
+	0x00, 0x20, 0x10, 0x10, 0x10, 0x10, 0x20, 0x00,
+	0x00, 0x00, 0x14, 0x08, 0x3E, 0x08, 0x14, 0x00,
+	0x00, 0x70, 0x88, 0xF0, 0x88, 0x88, 0xF0, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0x10,
+	0x00, 0x00, 0x00, 0x00, 0x3E, 0x00, 0x00, 0x00,
+	0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+	0x10, 0x20, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+	0x00, 0x70, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+	0x00, 0x20, 0x60, 0x20, 0x20, 0x20, 0x70, 0x00,
+	0x00, 0x70, 0x88, 0x10, 0x20, 0x48, 0xF8, 0x00,
+	0x00, 0x70, 0x88, 0x30, 0x08, 0x88, 0x70, 0x00,
+	0x00, 0x10, 0x20, 0x40, 0x90, 0xF8, 0x10, 0x00,
+	0x00, 0xF8, 0x80, 0x70, 0x08, 0x88, 0x70, 0x00,
+	0x00, 0x70, 0x88, 0x80, 0xF0, 0x88, 0x70, 0x00,
+	0x00, 0xF8, 0x08, 0x10, 0x20, 0x40, 0x40, 0x00,
+	0x00, 0x70, 0x88, 0x70, 0x88, 0x88, 0x70, 0x00,
+	0x00, 0x70, 0x88, 0x78, 0x08, 0x88, 0x70, 0x00,
+	0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00,
+	0x40, 0x20, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+	0x20, 0x50, 0x00, 0x98, 0x90, 0x90, 0xE8, 0x00,
+	0x20, 0x10, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+	0x20, 0x50, 0x00, 0x78, 0x70, 0x40, 0x38, 0x00,
+	0x00, 0x3C, 0x42, 0x04, 0x08, 0x00, 0x08, 0x00,
+	0x20, 0x50, 0x00, 0x60, 0x20, 0x28, 0x30, 0x00,
+	0x20, 0x50, 0x50, 0x70, 0x50, 0x50, 0x88, 0x00,
+	0xF0, 0x48, 0x48, 0x70, 0x48, 0x48, 0xF0, 0x00,
+	0x30, 0x48, 0x80, 0x80, 0x80, 0x48, 0x30, 0x00,
+	0xF0, 0x48, 0x48, 0x48, 0x48, 0x48, 0xF0, 0x00,
+	0xF8, 0x40, 0x40, 0x70, 0x40, 0x40, 0xF8, 0x00,
+	0xF8, 0x40, 0x40, 0x70, 0x40, 0x40, 0xE0, 0x00,
+	0x38, 0x40, 0x80, 0x98, 0x88, 0x48, 0x30, 0x00,
+	0xC8, 0x48, 0x48, 0x78, 0x48, 0x48, 0xC8, 0x00,
+	0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00,
+	0x78, 0x10, 0x10, 0x10, 0x90, 0x90, 0x60, 0x00,
+	0xC8, 0x50, 0x60, 0x40, 0x60, 0x50, 0xC8, 0x00,
+	0xE0, 0x40, 0x40, 0x40, 0x40, 0x48, 0xF8, 0x00,
+	0x88, 0xD8, 0xA8, 0x88, 0x88, 0x88, 0x88, 0x00,
+	0xC8, 0x48, 0x68, 0x58, 0x58, 0x48, 0xC8, 0x00,
+	0x70, 0x88, 0x88, 0x88, 0x88, 0x88, 0x70, 0x00,
+	0xF0, 0x48, 0x48, 0x70, 0x40, 0x40, 0xC0, 0x00,
+	0x60, 0x90, 0x90, 0x90, 0xB0, 0x90, 0x68, 0x00,
+	0xF0, 0x48, 0x48, 0x70, 0x50, 0x48, 0xC8, 0x00,
+	0x70, 0x88, 0x80, 0x60, 0x10, 0x88, 0x70, 0x00,
+	0xF8, 0xA8, 0x20, 0x20, 0x20, 0x20, 0x70, 0x00,
+	0x88, 0x50, 0x50, 0x50, 0x50, 0x50, 0x20, 0x00,
+	0x88, 0x88, 0x88, 0x50, 0x50, 0x50, 0x20, 0x00,
+	0x88, 0x88, 0x88, 0x88, 0xA8, 0xD8, 0x88, 0x00,
+	0x88, 0x50, 0x70, 0x20, 0x70, 0x50, 0x88, 0x00,
+	0x88, 0x48, 0x30, 0x20, 0x40, 0x80, 0xC0, 0x00,
+	0xF8, 0x88, 0x10, 0x20, 0x40, 0x80, 0xF8, 0x00,
+	0x00, 0x0E, 0x08, 0x08, 0x08, 0x08, 0x0E, 0x00,
+	0x20, 0x50, 0x00, 0x60, 0x90, 0x90, 0x68, 0x00,
+	0x00, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x00,
+	0x00, 0x30, 0x48, 0x40, 0x48, 0x30, 0x10, 0x30,
+	0x00, 0x50, 0x00, 0x60, 0x20, 0x28, 0x30, 0x00,
+	0x20, 0x10, 0x00, 0x98, 0x90, 0x90, 0xE8, 0x00,
+	0x00, 0x00, 0x60, 0x90, 0x90, 0x90, 0x68, 0x00,
+	0x40, 0x40, 0x50, 0x68, 0x48, 0x48, 0xF0, 0x00,
+	0x00, 0x00, 0x30, 0x48, 0x40, 0x48, 0x30, 0x00,
+	0x10, 0x10, 0x70, 0x90, 0x90, 0x90, 0x68, 0x00,
+	0x00, 0x00, 0x70, 0x48, 0x70, 0x40, 0x38, 0x00,
+	0x10, 0x38, 0x20, 0x70, 0x20, 0x20, 0x20, 0x40,
+	0x00, 0x00, 0x78, 0x90, 0x90, 0x90, 0x70, 0x10,
+	0xC0, 0x40, 0x58, 0x68, 0x48, 0x48, 0xC8, 0x00,
+	0x20, 0x00, 0x60, 0x20, 0x20, 0x28, 0x30, 0x00,
+	0x10, 0x18, 0x10, 0x10, 0x10, 0x10, 0x10, 0x60,
+	0x40, 0x40, 0x70, 0x48, 0x70, 0x50, 0xC8, 0x00,
+	0x40, 0x40, 0x40, 0x40, 0x40, 0x50, 0x60, 0x00,
+	0x00, 0x00, 0xA8, 0xF8, 0xA8, 0xA8, 0xA8, 0x00,
+	0x00, 0x00, 0xD8, 0x68, 0x48, 0x48, 0x48, 0x00,
+	0x00, 0x00, 0x30, 0x48, 0x48, 0x48, 0x30, 0x00,
+	0x00, 0x00, 0xF0, 0x48, 0x48, 0x70, 0x40, 0xC0,
+	0x00, 0x00, 0x70, 0x90, 0x90, 0x70, 0x18, 0x10,
+	0x00, 0x00, 0xD8, 0x68, 0x40, 0x40, 0xE0, 0x00,
+	0x00, 0x00, 0x38, 0x40, 0x30, 0x08, 0x70, 0x00,
+	0x20, 0x20, 0x70, 0x20, 0x20, 0x28, 0x30, 0x00,
+	0x00, 0x00, 0x98, 0x90, 0x90, 0x90, 0xE8, 0x00,
+	0x00, 0x00, 0x88, 0x88, 0x50, 0x50, 0x20, 0x00,
+	0x00, 0x00, 0xA8, 0xA8, 0xA8, 0xF8, 0xA8, 0x00,
+	0x00, 0x00, 0x88, 0x50, 0x20, 0x50, 0x88, 0x00,
+	0x00, 0x00, 0x98, 0x90, 0x90, 0x70, 0x10, 0x60,
+	0x00, 0x00, 0x78, 0x10, 0x20, 0x40, 0x78, 0x00,
+	0x20, 0x50, 0x00, 0x60, 0x90, 0x90, 0x60, 0x00,
+	0x00, 0x0E, 0x08, 0x30, 0x08, 0x08, 0x0E, 0x00,
+	0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00,
+	0x00, 0x70, 0x10, 0x0C, 0x10, 0x10, 0x70, 0x00,
+	0x00, 0x14, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00,
+	0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC,
+	0x00, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0xFC, 0x00,
+};
+
 void AGOSEngine::windowDrawChar(WindowBlock *window, uint x, uint y, byte chr) {
 	const byte *src;
 	byte color, *dst;
@@ -1619,7 +1720,7 @@
 		default:
 			error("windowDrawChar: Unknown language %d\n", _language);
 		}
-	} else {
+	} else if (getGameType() == GType_ELVIRA2 || getGameType() == GType_WW) {
 		dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
 		h = 8;
 		w = 6;
@@ -1627,20 +1728,26 @@
 		// TODO: Add font tables for German
 		switch (_language) {
 		case Common::ES_ESP:
-			src = spanish_commonFont + (chr - 32) * 8;
+			src = spanish_waxworksFont + (chr - 32) * 8;
 			break;
 		case Common::IT_ITA:
-			src = italian_commonFont + (chr - 32) * 8;
+			src = italian_waxworksFont + (chr - 32) * 8;
 			break;
 		case Common::FR_FRA:
-			src = french_commonFont + (chr - 32) * 8;
+			src = french_waxworksFont + (chr - 32) * 8;
 			break;
 		case Common::EN_ANY:
-			src = english_commonFont + (chr - 32) * 8;
+			src = english_waxworksFont + (chr - 32) * 8;
 			break;
 		default:
 			error("windowDrawChar: Unknown language %d\n", _language);
 		}
+	} else if (getGameType() == GType_ELVIRA1) {
+		dst = (byte *)screen->pixels + y * _dxSurfacePitch + x + window->textColumnOffset;
+		h = 8;
+		w = 6;
+
+		src = english_elvira1Font + (chr - 32) * 8;
 	}
 
 	color = window->textColor;


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