aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/display.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2010-09-26 11:32:52 +0000
committerArnaud Boutonné2010-09-26 11:32:52 +0000
commit20a618045943af4df7ac21d298c4a3db4c414129 (patch)
tree35acd69e51046cbfb6be1ebb53d6d803791d54f6 /engines/hugo/display.cpp
parent2ab77f2f52942dc57d38e342a4633f74630001aa (diff)
downloadscummvm-rg350-20a618045943af4df7ac21d298c4a3db4c414129.tar.gz
scummvm-rg350-20a618045943af4df7ac21d298c4a3db4c414129.tar.bz2
scummvm-rg350-20a618045943af4df7ac21d298c4a3db4c414129.zip
HUGO: Add H1 Dos intro
svn-id: r52902
Diffstat (limited to 'engines/hugo/display.cpp')
-rw-r--r--engines/hugo/display.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/hugo/display.cpp b/engines/hugo/display.cpp
index 78f99315c1..ba316e3923 100644
--- a/engines/hugo/display.cpp
+++ b/engines/hugo/display.cpp
@@ -410,6 +410,38 @@ void Screen::userHelp() {
"ESC - Return to game");
}
+void Screen::drawShape(int x, int y, int color1, int color2) {
+#define shapeSize 24
+
+ for (int i = 0; i < shapeSize; i++) {
+ for (int j = 0; j < i; j++) {
+ _backBuffer[320 * (y + i) + (x + shapeSize + j - i)] = color1;
+ _frontBuffer[320 * (y + i) + (x + shapeSize + j - i)] = color1;
+ _backBuffer[320 * (y + i) + (x + shapeSize + j)] = color2;
+ _frontBuffer[320 * (y + i) + (x + shapeSize + j)] = color2;
+ _backBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j - i)] = color1;
+ _frontBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j - i)] = color1;
+ _backBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j)] = color2;
+ _frontBuffer[320 * (y + (2 * shapeSize - 1) - i) + (x + shapeSize + j)] = color2;
+ }
+ }
+}
+
+void Screen::drawRectangle(bool filledFl, uint16 x1, uint16 y1, uint16 x2, uint16 y2, int color) {
+ assert(x1 <= x2);
+ assert(y1 <= y2);
+
+ if (filledFl) {
+ for (int i = y1; i < y2; i++)
+ for (int j = x1; j < x2; j++) {
+ _backBuffer[320 * i + j] = color;
+ _frontBuffer[320 * i + j] = color;
+ }
+ } else {
+ warning("STUB: drawRectangle()");
+ }
+};
+
Screen_v1d::Screen_v1d(HugoEngine &vm) : Screen(vm) {
}