From 1cf7fd9196c61f620ce7135da7504e5e575736f2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 25 Dec 2019 01:50:30 +0100 Subject: DIRECTOR: Added test routine for drawing palette --- engines/director/graphics.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'engines') diff --git a/engines/director/graphics.cpp b/engines/director/graphics.cpp index 6095c7f188..41b9cdeca6 100644 --- a/engines/director/graphics.cpp +++ b/engines/director/graphics.cpp @@ -281,6 +281,17 @@ void DirectorEngine::testFontScaling() { x += width + 1; } + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { + int y1 = 80 + i * 7; + int x1 = 80 + j * 7; + + for (x = x1; x < x1 + 6; x++) + for (y = y1; y < y1 + 6; y++) + *((byte *)surface.getBasePtr(x, y)) = (15 - i) * 16 + (15 - j); + } + } + g_system->copyRectToScreen(surface.getPixels(), surface.pitch, 0, 0, w, h); // testing fonts Common::Event event; @@ -318,5 +329,4 @@ void DirectorEngine::testFonts() { delete fontFile; } - } -- cgit v1.2.3