aboutsummaryrefslogtreecommitdiff
path: root/engines/parallaction/disk.cpp
diff options
context:
space:
mode:
authorNicola Mettifogo2007-03-28 20:12:00 +0000
committerNicola Mettifogo2007-03-28 20:12:00 +0000
commit3903309af338a1cedab353367a459ecd5f0250d8 (patch)
tree63aed0b2310a045267ee7e5845e90b360f413517 /engines/parallaction/disk.cpp
parentac1e6c9b75beff06f41302fb76cdaffce1125201 (diff)
downloadscummvm-rg350-3903309af338a1cedab353367a459ecd5f0250d8.tar.gz
scummvm-rg350-3903309af338a1cedab353367a459ecd5f0250d8.tar.bz2
scummvm-rg350-3903309af338a1cedab353367a459ecd5f0250d8.zip
Overhaul of palette management to bring it back to its original form. Gfx palette code has been updated, and _c_endComment (callable from scripts) has been implemented. As a by-product, palette cycling now finally works!
svn-id: r26314
Diffstat (limited to 'engines/parallaction/disk.cpp')
-rw-r--r--engines/parallaction/disk.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/engines/parallaction/disk.cpp b/engines/parallaction/disk.cpp
index f8ec678ed6..01e2132a5d 100644
--- a/engines/parallaction/disk.cpp
+++ b/engines/parallaction/disk.cpp
@@ -428,9 +428,8 @@ void DosDisk::parseDepths(Common::SeekableReadStream &stream) {
void DosDisk::parseBackground(Common::SeekableReadStream &stream) {
- byte pal[96];
- stream.read(pal, PALETTE_SIZE);
- _vm->_gfx->setPalette(pal);
+ stream.read(_vm->_gfx->_palette, BASE_PALETTE_SIZE);
+ _vm->_gfx->setPalette(_vm->_gfx->_palette);
parseDepths(stream);
@@ -442,14 +441,6 @@ void DosDisk::parseBackground(Common::SeekableReadStream &stream) {
_vm->_gfx->_palettefx[_si]._last = stream.readByte();
}
-#if 0
- uint16 v147;
- for (v147 = 0; v147 < PALETTE_SIZE; v147++) {
- byte _al = _vm->_gfx->_palette[v147];
- _vm->_gfx->_palette[PALETTE_SIZE+v147] = _al / 2;
- }
-#endif
-
}
void DosDisk::loadBackground(const char *filename) {
@@ -744,7 +735,7 @@ Cnv* AmigaDisk::loadTalk(const char *name) {
}
Cnv* AmigaDisk::loadObjects(const char *name) {
- debugC(1, kDebugDisk, "AmigaDisk::loadObjects '%s'", name);
+ debugC(1, kDebugDisk, "AmigaDisk::loadObjects");
return NULL;
}
@@ -791,13 +782,13 @@ void AmigaDisk::loadSlide(const char *name) {
Graphics::ILBMDecoder decoder(stream);
decoder.decode(surf, pal);
- for (uint32 i = 0; i < 96; i++)
- pal[i] >>= 2;
+ for (uint32 i = 0; i < PALETTE_SIZE; i++)
+ _vm->_gfx->_palette[i] = pal[i] >> 2;
-
- _vm->_gfx->setPalette(pal);
free(pal);
+ _vm->_gfx->setPalette(_vm->_gfx->_palette);
+
_vm->_gfx->setBackground(static_cast<byte*>(surf.pixels));
surf.free();
@@ -811,7 +802,7 @@ void AmigaDisk::loadScenery(const char* background, const char* mask) {
}
Table* AmigaDisk::loadTable(const char* name) {
- printf("AmigaDisk::loadTable\n");
+// printf("AmigaDisk::loadTable\n");
char path[PATH_LEN];
sprintf(path, "%s.table", name);