aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Gilbert2014-12-29 21:20:40 -1000
committerPaul Gilbert2014-12-29 21:20:40 -1000
commit676e7583f2d992a5a047e1e1b9f9a9d8929f2a0a (patch)
tree4c74827bc9e38f4d117a56dc1762fa1db33b9db3
parent537da8b7b9090ef9be2ea9b4c3ef2b76461364ab (diff)
downloadscummvm-rg350-676e7583f2d992a5a047e1e1b9f9a9d8929f2a0a.tar.gz
scummvm-rg350-676e7583f2d992a5a047e1e1b9f9a9d8929f2a0a.tar.bz2
scummvm-rg350-676e7583f2d992a5a047e1e1b9f9a9d8929f2a0a.zip
XEEN: Temporary processing of Window list data to produce formatted output
-rw-r--r--engines/xeen/darkside/darkside_game.cpp15
-rw-r--r--engines/xeen/darkside/darkside_game.h2
-rw-r--r--engines/xeen/screen.cpp172
-rw-r--r--engines/xeen/screen.h17
-rw-r--r--engines/xeen/worldofxeen/worldofxeen_game.cpp2
5 files changed, 193 insertions, 15 deletions
diff --git a/engines/xeen/darkside/darkside_game.cpp b/engines/xeen/darkside/darkside_game.cpp
index 3dd4c0ea30..c039d1ff0b 100644
--- a/engines/xeen/darkside/darkside_game.cpp
+++ b/engines/xeen/darkside/darkside_game.cpp
@@ -31,10 +31,10 @@ DarkSideEngine::DarkSideEngine(OSystem *syst, const XeenGameDescription *gameDes
}
void DarkSideEngine::playGame() {
- playGame();
+ // TODO
}
-bool DarkSideEngine::pause(int amount) {
+bool DarkSideEngine::pause(uint amount) {
while (!shouldQuit() && _events->timeElapsed() < amount) {
_events->pollEventsAndWait();
if (_events->isKeyMousePressed())
@@ -45,6 +45,7 @@ bool DarkSideEngine::pause(int amount) {
}
void DarkSideEngine::darkSideIntro() {
+ /*
showTitle1();
if (shouldQuit())
return;
@@ -52,7 +53,7 @@ void DarkSideEngine::darkSideIntro() {
showTitle2();
if (shouldQuit())
return;
-
+ */
// TODO: Only show startup if not seen before
showStartSequence();
}
@@ -78,7 +79,7 @@ void DarkSideEngine::showTitle1() {
// Draw the screen and fade it in
_screen->horizMerge(0);
_screen->draw();
- _screen->fade(4);
+ _screen->fadeIn(4);
// Initial loop for dragon roaring
int nwcIndex = 0, nwcFrame = 0;
@@ -150,7 +151,7 @@ void DarkSideEngine::showTitle2() {
_screen->loadBackground("jvc.raw");
_screen->draw();
- _screen->fade(4);
+ _screen->fadeIn(4);
_events->updateGameCounter();
pause(60);
@@ -162,7 +163,7 @@ void DarkSideEngine::showStartSequence() {
_screen->loadPage(0);
_screen->loadPage(1);
_screen->loadBackground("pyramid3.raw");
- _screen->saveScreen(1);
+ _screen->saveBackground(1);
SpriteResource sprites[3] = {
SpriteResource("title.int"), SpriteResource("pyratop.int"), SpriteResource("pyramid.int")
@@ -211,7 +212,7 @@ void DarkSideEngine::showStartSequence() {
}
_screen->vertMerge(SCREEN_HEIGHT);
- _screen->saveScreen(1);
+ _screen->saveBackground(1);
_screen->draw();
_screen->freePages();
diff --git a/engines/xeen/darkside/darkside_game.h b/engines/xeen/darkside/darkside_game.h
index 39ec87fa1c..979885cc13 100644
--- a/engines/xeen/darkside/darkside_game.h
+++ b/engines/xeen/darkside/darkside_game.h
@@ -29,7 +29,7 @@ namespace Xeen {
class DarkSideEngine : virtual public XeenEngine {
private:
- bool pause(int amount);
+ bool pause(uint amount);
void showTitle1();
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,
+ 2, 3, 4, 5,
+ 0, 6, 7, 8,
+ 9, 10, 11, 12,
+ 13, 14, 15, 16,
+ 17, 18, 19, 20,
+ 21, 22, 23, 24,
+ 25, 26, 27, 28,
+ 0, 0, 29, 30,
+ 31, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+ const int WB[48] = {
+ 0, 0, 8, 0,
+ 8, 8, 8, 0,
+ 0, 8, 8, 8,
+ 8, 8, 8, 8,
+ 8, 8, 8, 8,
+ 8, 8, 8, 8,
+ 8, 8, 8, 8,
+ 8, 8, 8, 8,
+ 0, 8, 8, 8,
+ 8, 8, 8, 8,
+ 8, 8, 8, 8,
+ 8, 8, 8, 8
+ };
+
+ const int WXlo[48] = { 0, 237, 225, 9,
+ 0, 80, 0, 0,
+ 0, 0, 0, 8,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 99, 75, 80,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+ const int WYcl[48] = {
+ 0, 12, 1, 8,
+ 0, 38, 0, 0,
+ 0, 0, 0, 8,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 59, 36, 28,
+ 0, 0, 0, 0,
+ 0, 101, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+ const int WXhi[48] = {
+ 320, 307, 319, 216,
+ 0, 240, 0, 0,
+ 0, 0, 0, 224,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 237, 245, 256,
+ 320, 0, 0, 0,
+ 0, 320, 0, 0,
+ 52, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+
+ const int WYch[48] = {
+ 200, 68, 73, 140,
+ 0, 166, 0, 0,
+ 0, 0, 0, 200,
+ 0, 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);
diff --git a/engines/xeen/screen.h b/engines/xeen/screen.h
index 72d9da0437..157d0bc178 100644
--- a/engines/xeen/screen.h
+++ b/engines/xeen/screen.h
@@ -38,6 +38,17 @@ namespace Xeen {
class XeenEngine;
+class Window {
+private:
+ Common::Rect _bounds;
+ int _a;
+ int _border;
+ int _xLo, _xHi;
+ int _ycL, _ycH;
+public:
+ Window(const Common::Rect &bounds, int a, int border, int xLo, int ycL, int xHi, int ycH);
+};
+
class Screen: public XSurface {
private:
XeenEngine *_vm;
@@ -80,13 +91,13 @@ public:
void draw(void *data = nullptr);
- void fade(int step);
+ void fadeIn(int step);
void fadeOut(int step);
- void saveScreen(int slot);
+ void saveBackground(int slot);
- void restoreScreen(int slot);
+ void restoreBackground(int slot);
};
} // End of namespace Xeen
diff --git a/engines/xeen/worldofxeen/worldofxeen_game.cpp b/engines/xeen/worldofxeen/worldofxeen_game.cpp
index f27b8b9380..dba5612e29 100644
--- a/engines/xeen/worldofxeen/worldofxeen_game.cpp
+++ b/engines/xeen/worldofxeen/worldofxeen_game.cpp
@@ -30,7 +30,7 @@ WorldOfXeenEngine::WorldOfXeenEngine(OSystem *syst, const XeenGameDescription *g
}
void WorldOfXeenEngine::playGame () {
- darkSideIntro();
+ //darkSideIntro();
}
} // End of namespace Xeen