aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-07-12 08:41:14 +0200
committeruruk2013-07-12 08:41:14 +0200
commitd7b82409205ce924c0a8fc206ad13937e72f8bc2 (patch)
tree4a68ab147de8b410510751226c195576a177a230 /engines/avalanche
parent096bd2df76b6132dad8ccefb2a212dbc53218870 (diff)
downloadscummvm-rg350-d7b82409205ce924c0a8fc206ad13937e72f8bc2.tar.gz
scummvm-rg350-d7b82409205ce924c0a8fc206ad13937e72f8bc2.tar.bz2
scummvm-rg350-d7b82409205ce924c0a8fc206ad13937e72f8bc2.zip
AVALANCHE: Update Graph, leave a comment in Lucerna.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/graph.cpp25
-rw-r--r--engines/avalanche/graph.h8
-rw-r--r--engines/avalanche/lucerna2.cpp4
3 files changed, 15 insertions, 22 deletions
diff --git a/engines/avalanche/graph.cpp b/engines/avalanche/graph.cpp
index 73ea430c4e..2c845c06c5 100644
--- a/engines/avalanche/graph.cpp
+++ b/engines/avalanche/graph.cpp
@@ -38,20 +38,7 @@
namespace Avalanche {
-const byte Graph::ega_palette_index[16] = {0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63};
-
-const byte Graph::ega_palette[64][3] =
-{
- {0x00,0x00,0x00}, {0x00,0x00,0x2a}, {0x00,0x2a,0x00}, {0x00,0x2a,0x2a}, {0x2a,0x00,0x00}, {0x2a,0x00,0x2a}, {0x2a,0x15,0x00}, {0x2a,0x2a,0x2a},
- {0x00,0x00,0x00}, {0x00,0x00,0x2a}, {0x00,0x2a,0x00}, {0x00,0x2a,0x2a}, {0x2a,0x00,0x00}, {0x2a,0x00,0x2a}, {0x2a,0x15,0x00}, {0x2a,0x2a,0x2a},
- {0x15,0x15,0x15}, {0x15,0x15,0x3f}, {0x15,0x3f,0x15}, {0x15,0x3f,0x3f}, {0x3f,0x15,0x15}, {0x3f,0x15,0x3f}, {0x3f,0x3f,0x15}, {0x3f,0x3f,0x3f},
- {0x15,0x15,0x15}, {0x15,0x15,0x3f}, {0x15,0x3f,0x15}, {0x15,0x3f,0x3f}, {0x3f,0x15,0x15}, {0x3f,0x15,0x3f}, {0x3f,0x3f,0x15}, {0x3f,0x3f,0x3f},
- {0x00,0x00,0x00}, {0x00,0x00,0x2a}, {0x00,0x2a,0x00}, {0x00,0x2a,0x2a}, {0x2a,0x00,0x00}, {0x2a,0x00,0x2a}, {0x2a,0x15,0x00}, {0x2a,0x2a,0x2a},
- {0x00,0x00,0x00}, {0x00,0x00,0x2a}, {0x00,0x2a,0x00}, {0x00,0x2a,0x2a}, {0x2a,0x00,0x00}, {0x2a,0x00,0x2a}, {0x2a,0x15,0x00}, {0x2a,0x2a,0x2a},
- {0x15,0x15,0x15}, {0x15,0x15,0x3f}, {0x15,0x3f,0x15}, {0x15,0x3f,0x3f}, {0x3f,0x15,0x15}, {0x3f,0x15,0x3f}, {0x3f,0x3f,0x15}, {0x3f,0x3f,0x3f},
- {0x15,0x15,0x15}, {0x15,0x15,0x3f}, {0x15,0x3f,0x15}, {0x15,0x3f,0x3f}, {0x3f,0x15,0x15}, {0x3f,0x15,0x3f}, {0x3f,0x3f,0x15}, {0x3f,0x3f,0x3f}
-};
-
+const byte Graph::_egaPaletteIndex[16] = {0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63};
@@ -60,10 +47,16 @@ void Graph::setParent(AvalancheEngine *vm) {
}
void Graph::init() {
- initGraphics(_screenWidth, _screenHeight, false);
+ initGraphics(_screenWidth, _screenHeight, true);
+
+ for (int i = 0; i < 64; ++i) {
+ _egaPalette[i][0] = (i >> 2 & 1) * 0xaa + (i >> 5 & 1) * 0x55;
+ _egaPalette[i][1] = (i >> 1 & 1) * 0xaa + (i >> 4 & 1) * 0x55;
+ _egaPalette[i][2] = (i & 1) * 0xaa + (i >> 3 & 1) * 0x55;
+ }
for (byte i = 0; i < 16; i++)
- g_system->getPaletteManager()->setPalette(ega_palette[ega_palette_index[i]], i, 1);
+ g_system->getPaletteManager()->setPalette(_egaPalette[_egaPaletteIndex[i]], i, 1);
_surface.create(_screenWidth, _screenHeight, Graphics::PixelFormat::createFormatCLUT8());
}
diff --git a/engines/avalanche/graph.h b/engines/avalanche/graph.h
index 9ddd69f1ad..220f87f1f6 100644
--- a/engines/avalanche/graph.h
+++ b/engines/avalanche/graph.h
@@ -37,8 +37,8 @@ class AvalancheEngine;
class Graph {
public:
- static const int16 _screenWidth = 320;
- static const int16 _screenHeight = 200;
+ static const int16 _screenWidth = 640;
+ static const int16 _screenHeight = 350;
@@ -59,9 +59,9 @@ private:
Graphics::Surface _surface;
- static const byte ega_palette_index[16];
+ static const byte _egaPaletteIndex[16];
- static const byte ega_palette[64][3];
+ byte _egaPalette[64][3];
};
} // End of namespace Avalanche
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 9feca69257..0fd7feea8b 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -980,11 +980,11 @@ int8 Lucerna::fades(int8 x) {
void Lucerna::fadeout(byte n) {
- warning("STUB: Lucerna::fadeout()");
+ warning("STUB: Lucerna::fadeout()"); // I'll bother with colors later.
}
void Lucerna::dusk() {
- warning("STUB: Lucerna::dusk()");
+ warning("STUB: Lucerna::dusk()"); // I'll bother with colors later.
}