From 3bac16d57daf43f2a14bf0b7662afa2e9a6703c8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 9 Apr 2016 15:54:21 +0200 Subject: WAGE: Added debug code for dumping CODE resource fork --- engines/wage/world.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'engines') diff --git a/engines/wage/world.cpp b/engines/wage/world.cpp index 40b1555e35..ae7a0ea6f5 100644 --- a/engines/wage/world.cpp +++ b/engines/wage/world.cpp @@ -105,6 +105,18 @@ bool World::loadWorld(Common::MacResManager *resMan) { Common::SeekableReadStream *res; Common::MacResIDArray::const_iterator iter; + // Dumping interpreter code +#if 1 + res = resMan->getResource(MKTAG('C','O','D','E'), 1); + warning("code size: %d", res->size()); + byte *buf = (byte *)malloc(res->size()); + res->read(buf, res->size()); + Common::DumpFile out; + out.open("code.bin"); + out.write(buf, res->size()); + out.close(); +#endif + if ((resArray = resMan->getResIDArray(MKTAG('G','C','O','D'))).size() == 0) return false; -- cgit v1.2.3