ScummVM logo Forum Index - ScummVM website - Contact us - Buy Supported Games: GOG.com Rules - Search - Register - Login curved edge
Folder Forum Index > General Discussion > Extracting images from Living Books
Extracting images from Living Books
  Author    Thread Reply to topic
Windows 95



Joined: 10 Sep 2017
Posts: 2
Extracting images from Living Books 

Perhaps this is posted in the wrong place. Maybe it shouldn't be on the forums at all, but I'm hoping someone who has worked on ScummVM can give me some pointers here.

I've been looking into extracting images from the Living Books game "Green Eggs and Ham" for a project, but it appears to be a rather troublesome challenge as they're not in a standard format. Watto Studios, the creator of Game Extractor, suggested I try looking through the source code of ScummVM, in particular "livingbooks.cpp", but I'm just not sure where to begin.

Yeah... sorry if this is a little broad. I'm looking to convert the game's image files to a usable format such as PNG8 - I can share the relevant game files if that would help?

 Reply with quote  
Post Mon Sep 11, 2017 8:43 pm 
 View user's profile Send private message
Windows 95



Joined: 10 Sep 2017
Posts: 2
 

bump

 Reply with quote  
Post Sun Oct 29, 2017 10:14 pm 
 View user's profile Send private message
Bakhtosh
Got a warning


Joined: 08 Oct 2006
Posts: 18
 

The images are stored in *.MHK archives (an archive type used by the Mohawk engine that is used by the Living Book games) splitted into files that contains the color palette and bitmap files that contains the info which pixel used which color number of a palette in a compressed format.

So it's not like you can simply extract the compressed bitmap files and create a conversion tool since the bitmap files alone are missing the real color values. You need the matching palettes to assign the real color values.

To create an image usable by a common graphics editor you need to be able to:
- extract files from the *.MHK archives
- decompress the bitmap files
- understand how the Mohawk engine assembles the scenes, so that you can extract the info which palette is active when a bitmap file is displayed

The best starting point is, as the creator of the Game Extractor has suggested, to look how the Mohawk engine loads and then computes the resources of the Living Book games step by step. Starting from the code of the "livingbooks.cpp" (which includes/uses code from other modules as well). You can find the ScummVM Mohawk engine code modules here:
https://github.com/scummvm/scummvm/tree/master/engines/mohawk

The module filenames are pretty intuitive. For example you find the code to read *.MHK files in "resource.cpp", the code to decompress/read the bitmap files in "bitmap.cpp" and the code to read palette files in "view.cpp".

Of course it means you have to invest some time if you're not familiar with the syntax of c++.

 Reply with quote  
Post Tue Oct 31, 2017 10:23 am 
 View user's profile Send private message
  Display posts from previous:      
Reply to topic

Forum Jump:
 



Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Powered by phpBB © 2001, 2006 phpBB Group
Forum design by ScummVM team, icons by raina
curved edge   curved edge