aboutsummaryrefslogtreecommitdiff
path: root/engines/hopkins/graphics.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-09-26 22:13:15 +1000
committerPaul Gilbert2012-09-26 22:13:15 +1000
commitddb4fdcf12f8a0e09d7f9b5583984edec99325cc (patch)
tree5eb255a8cbf51933dde185c4a0dd2d43e3900471 /engines/hopkins/graphics.cpp
parent377554ec6280064c755e88e26b48f24fcbe572c9 (diff)
downloadscummvm-rg350-ddb4fdcf12f8a0e09d7f9b5583984edec99325cc.tar.gz
scummvm-rg350-ddb4fdcf12f8a0e09d7f9b5583984edec99325cc.tar.bz2
scummvm-rg350-ddb4fdcf12f8a0e09d7f9b5583984edec99325cc.zip
HOPKINS: Implementing font methods
Diffstat (limited to 'engines/hopkins/graphics.cpp')
-rw-r--r--engines/hopkins/graphics.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/engines/hopkins/graphics.cpp b/engines/hopkins/graphics.cpp
index 4d8a3b79a5..d8ad4de283 100644
--- a/engines/hopkins/graphics.cpp
+++ b/engines/hopkins/graphics.cpp
@@ -2192,4 +2192,53 @@ void GraphicsManager::Copy_Mem(const byte *srcSurface, int x1, int y1, unsigned
} while (yCurrent != 1);
}
+void GraphicsManager::Affiche_Fonte(byte *surface, const byte *spriteData, int xp, int yp,
+ int characterIndex, int transColour) {
+ const byte *v6;
+ int i;
+ const byte *v8;
+ int v9;
+ int v10;
+ const byte *v11;
+ byte *destP;
+ int v13;
+ byte v14;
+ byte *destLineP;
+ int v16;
+
+ v6 = spriteData + 3;
+ for (i = characterIndex; i; --i)
+ v6 += READ_LE_UINT32(v6) + 16;
+
+ v9 = 0;
+ v10 = 0;
+ v8 = v6 + 4;
+ v9 = READ_LE_UINT16(v8);
+ v8 += 2;
+ v10 = READ_LE_UINT16(v8);
+ v11 = v8 + 10;
+ destP = surface + xp + nbrligne2 * yp;
+ Largeur = v9;
+
+ do {
+ v16 = v10;
+ destLineP = destP;
+ v13 = v9;
+ do {
+ v14 = *v11;
+ if (*v11) {
+ if (v14 == (byte)-4)
+ v14 = transColour;
+ *destP = v14;
+ }
+
+ ++destP;
+ ++v11;
+ --v13;
+ } while (v13);
+ destP = nbrligne2 + destLineP;
+ v10 = v16 - 1;
+ } while (v16 != 1);
+}
+
} // End of namespace Hopkins