diff options
author | Travis Howell | 2006-10-09 01:56:51 +0000 |
---|---|---|
committer | Travis Howell | 2006-10-09 01:56:51 +0000 |
commit | 9fbe8481d8590ee61cc07a28e9bded3b440c3a3e (patch) | |
tree | 7cfc5fb25c7c6293ccdcef520de5f0ccc9bae899 /engines/agos | |
parent | 7e731d7b4cdeff18e2e9c647e3945015046c593e (diff) | |
download | scummvm-rg350-9fbe8481d8590ee61cc07a28e9bded3b440c3a3e.tar.gz scummvm-rg350-9fbe8481d8590ee61cc07a28e9bded3b440c3a3e.tar.bz2 scummvm-rg350-9fbe8481d8590ee61cc07a28e9bded3b440c3a3e.zip |
Add conversion for planar graphics in Amiga version of Elvira 1/2 and Waxworks
svn-id: r24242
Diffstat (limited to 'engines/agos')
-rw-r--r-- | engines/agos/agos.h | 2 | ||||
-rw-r--r-- | engines/agos/items.cpp | 6 | ||||
-rw-r--r-- | engines/agos/module.mk | 1 | ||||
-rw-r--r-- | engines/agos/res.cpp | 21 |
4 files changed, 25 insertions, 5 deletions
diff --git a/engines/agos/agos.h b/engines/agos/agos.h index bb81a85139..3519146224 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1072,6 +1072,7 @@ public: void oe1_clearUserItem(); void oe1_findMaster(); void oe1_nextMaster(); + void oe1_menu(); void oe1_setTime(); void oe1_ifTime(); void oe1_bitClear(); @@ -1240,6 +1241,7 @@ protected: byte *getBackGround(); byte *getScaleBuf(); + void convertAmiga(byte *srcBuf, int32 flength); void loadVGAFile(uint id, uint type); void loadSimonVGAFile(uint id); diff --git a/engines/agos/items.cpp b/engines/agos/items.cpp index 4db5e802c3..8113633780 100644 --- a/engines/agos/items.cpp +++ b/engines/agos/items.cpp @@ -290,6 +290,7 @@ void AGOSEngine::setupElvira1Opcodes(OpcodeProc *op) { op[230] = &AGOSEngine::o_window; op[231] = &AGOSEngine::o_cls; op[232] = &AGOSEngine::o_closeWindow; + op[233] = &AGOSEngine::oe1_menu; op[235] = &AGOSEngine::o_addBox; op[236] = &AGOSEngine::o_delBox; @@ -2027,6 +2028,11 @@ void AGOSEngine::oe1_nextMaster() { _objectItem = nextMaster(levelOf(me()), item, ad, no); } +void AGOSEngine::oe1_menu() { + // 233: agos menu + // Used by Amiga demo +} + void AGOSEngine::oe1_bitClear() { // 251: set bit off int var = getVarOrWord(); diff --git a/engines/agos/module.mk b/engines/agos/module.mk index 8be332758a..e9f749ab6b 100644 --- a/engines/agos/module.mk +++ b/engines/agos/module.mk @@ -17,6 +17,7 @@ MODULE_OBJS := \ midiparser_s1d.o \ oracle.o \ res.o \ + res_ami.o \ rooms.o \ saveload.o \ sound.o \ diff --git a/engines/agos/res.cpp b/engines/agos/res.cpp index 4f4b699998..2c7f9b6a31 100644 --- a/engines/agos/res.cpp +++ b/engines/agos/res.cpp @@ -669,10 +669,14 @@ void AGOSEngine::loadVGAFile(uint id, uint type) { if (getFeatures() & GF_TALKIE) { sprintf(filename, "%.3d%d.out", id, type); } else if (getGameType() == GType_ELVIRA1 || getGameType() == GType_ELVIRA2) { - if (getGameId() == GID_ELVIRA1DEMO) - sprintf(filename, "%.1d%d.out", id, type); - else + if (getGameId() == GID_ELVIRA1DEMO) { + if (id == 27) + sprintf(filename, "K%d.out", type); + else + sprintf(filename, "%.1d%d.out", id, type); + } else { sprintf(filename, "%.2d%d.pkd", id, type); + } } else { sprintf(filename, "%.3d%d.pkd", id, type); } @@ -693,8 +697,15 @@ void AGOSEngine::loadVGAFile(uint id, uint type) { error("loadVGAFile: Read failed"); dstSize = READ_BE_UINT32(srcBuffer + srcSize - 4); - dst = allocBlock (dstSize + extraBuffer); - decrunchFile(srcBuffer, dst, srcSize); + if (type == 2 && dstSize != 64800) { + dst = (byte *)malloc(dstSize); + decrunchFile(srcBuffer, dst, srcSize); + convertAmiga(dst, dstSize); + free(dst); + } else { + dst = allocBlock (dstSize + extraBuffer); + decrunchFile(srcBuffer, dst, srcSize); + } free(srcBuffer); } else { dst = allocBlock(dstSize + extraBuffer); |