aboutsummaryrefslogtreecommitdiff
path: root/engines/titanic/support/video_surface.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2016-04-04 18:15:02 -0400
committerPaul Gilbert2016-04-04 18:15:02 -0400
commit572301a33efc8c574d7ab2fc9b243050b2db1492 (patch)
tree80cc09df4c279b2b556a8799091711d0a6c8b1fb /engines/titanic/support/video_surface.cpp
parent3acf1116cd7eff2f98538f8457f724ac25b28df1 (diff)
downloadscummvm-rg350-572301a33efc8c574d7ab2fc9b243050b2db1492.tar.gz
scummvm-rg350-572301a33efc8c574d7ab2fc9b243050b2db1492.tar.bz2
scummvm-rg350-572301a33efc8c574d7ab2fc9b243050b2db1492.zip
TITANIC: Implement OSVideoSurface::setupMap
Diffstat (limited to 'engines/titanic/support/video_surface.cpp')
-rw-r--r--engines/titanic/support/video_surface.cpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/engines/titanic/support/video_surface.cpp b/engines/titanic/support/video_surface.cpp
index ebe552a062..a1b26386b3 100644
--- a/engines/titanic/support/video_surface.cpp
+++ b/engines/titanic/support/video_surface.cpp
@@ -182,6 +182,34 @@ OSVideoSurface::OSVideoSurface(CScreenManager *screenManager, const CResourceKey
}
}
+void OSVideoSurface::setupMap(byte map[0x400], byte val) {
+ byte *pBase = map;
+ int incr = 0;
+
+ for (uint idx1 = 0; idx1 < 32; ++idx1, pBase += 32) {
+ for (uint idx2 = 0, base = 0; idx2 < 32; ++idx2, base += incr) {
+ int64 v = 0x84210843;
+ v *= base;
+ v = ((v >> 32) + base) >> 4;
+ v += (v >> 31);
+ pBase[idx2] = v;
+
+ if (val != 0xff) {
+ v &= 0xff;
+ if (v != idx2) {
+ v = 0x80808081 * val * v * val;
+ v = (v >> 32) + incr;
+ incr = idx1;
+
+ v >>= 7;
+ v += (v >> 31);
+ pBase[idx2] = v;
+ }
+ }
+ }
+ }
+}
+
void OSVideoSurface::loadResource(const CResourceKey &key) {
_resourceKey = key;
_pendingLoad = true;
@@ -323,6 +351,10 @@ uint16 OSVideoSurface::getPixel(const Common::Point &pt) {
}
}
+void OSVideoSurface::changePixel(uint16 *pixelP, uint16 color, int val3, int val5) {
+ // TODO
+}
+
void OSVideoSurface::shiftColors() {
if (!loadIfReady())
return;