aboutsummaryrefslogtreecommitdiff
path: root/engines/xeen/screen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/xeen/screen.cpp')
-rw-r--r--engines/xeen/screen.cpp172
1 files changed, 169 insertions, 3 deletions
diff --git a/engines/xeen/screen.cpp b/engines/xeen/screen.cpp
index 699e13e8ce..c1b8a870c9 100644
--- a/engines/xeen/screen.cpp
+++ b/engines/xeen/screen.cpp
@@ -28,12 +28,178 @@
namespace Xeen {
+const int WX[48] = {
+ 0, 237, 225, 0,
+ 235, 70, 52, 108, 232, 103, 226, 8,
+ 0, 50, 0, 50,
+ 228, 20, 0, 231,
+ 72, 99, 65, 80,
+ 0, 27, 15, 90,
+ 0, 0, 0, 50,
+ 12, 8, 232, 226,
+ 225, 27, 225, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+};
+
+ const int WY[48] = {
+ 0, 9, 1, 0,
+ 148, 20, 149, 0,
+ 9, 156, 0, 8,
+ 143, 103, 7, 71,
+ 106, 142, 20, 48,
+ 37, 59, 23, 28,
+ 0, 6, 15, 45,
+ 0, 101, 0, 112,
+ 11, 147, 74, 26,
+ 74, 6, 140, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+ const int WW[48] = {
+ 320, 80, 94, 230,
+ 74, 180, 216, 92,
+ 80, 114, 93, 216,
+ 320, 216, 320, 132,
+ 91, 270, 320, 86,
+ 176, 138, 185, 176,
+ 320, 180, 146, 130,
+ 320, 320, 320, 216,
+ 152, 216, 80, 93,
+ 94, 168, 94, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+const int WH[48] = {
+200, 65, 72, 149,
+41, 163, 48, 200,
+65, 30, 146, 132,
+56, 36, 131, 58,
+40, 57, 160, 93,
+126, 82, 140, 120,
+146, 136, 76, 112,
+200, 45, 108, 36,
+83, 45, 64, 120,
+80, 136, 59, 0,
+0, 0, 0, 0,
+0, 0, 0, 0
+};
+
+ const int WA[48] = {
+ 0, 0, 1, 0,
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 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 141, 172,
+ 148, 146, 0, 0,
+ 0, 0, 45, 0,
+ 0, 94, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+Window::Window(const Common::Rect &bounds, int a, int border, int xLo, int ycL, int xHi, int ycH) {
+ _bounds = bounds;
+ _a = a;
+ _border = border;
+ _xLo = xLo;
+ _ycL = ycL;
+ _xHi = xHi;
+ _ycH = ycH;
+}
+
+/*------------------------------------------------------------------------*/
+
/**
* Constructor
*/
Screen::Screen(XeenEngine *vm) : _vm(vm) {
_fadeIn = false;
create(SCREEN_WIDTH, SCREEN_HEIGHT);
+
+ for (int i = 0; i < 48; ++i) {
+ warning("Window(Common::Rect(%d, %d, %d, %d), %d, %d, %d, %d, %d, %d);",
+ WX[i], WY[i], WX[i] + WW[i], WY[i] + WH[i], WA[i], WB[i], WXlo[i],
+ WYcl[i], WXhi[i], WYch[i]);
+ }
}
void Screen::update() {
@@ -185,7 +351,7 @@ void Screen::drawScreen() {
addDirtyRect(Common::Rect(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT));
}
-void Screen::fade(int step) {
+void Screen::fadeIn(int step) {
_fadeIn = true;
fadeInner(step);
}
@@ -227,12 +393,12 @@ void Screen::updatePalette(const byte *pal, int start, int count16) {
g_system->getPaletteManager()->setPalette(pal, start, count16 * 16);
}
-void Screen::saveScreen(int slot) {
+void Screen::saveBackground(int slot) {
assert(slot > 0 && slot < 10);
_savedScreens[slot - 1].copyFrom(*this);
}
-void Screen::restoreScreen(int slot) {
+void Screen::restoreBackground(int slot) {
assert(slot > 0 && slot < 10);
_savedScreens[slot - 1].blitTo(*this);