aboutsummaryrefslogtreecommitdiff
path: root/engines/access/martian/martian_resources.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2018-07-20 19:05:56 -0700
committerPaul Gilbert2018-07-20 19:05:56 -0700
commitaf6034efcdf9ff12e037f03626caf2c89c11a6ed (patch)
treed08635577aca00bcbc6475276e2836de63b17e89 /engines/access/martian/martian_resources.cpp
parentb6dc832346ef1a70390970430f604d6b4625d268 (diff)
downloadscummvm-rg350-af6034efcdf9ff12e037f03626caf2c89c11a6ed.tar.gz
scummvm-rg350-af6034efcdf9ff12e037f03626caf2c89c11a6ed.tar.bz2
scummvm-rg350-af6034efcdf9ff12e037f03626caf2c89c11a6ed.zip
ACCESS: MM: Implement proper game data and fonts in access.dat
Diffstat (limited to 'engines/access/martian/martian_resources.cpp')
-rw-r--r--engines/access/martian/martian_resources.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp
index 2b0479a005..ee1f1c3cba 100644
--- a/engines/access/martian/martian_resources.cpp
+++ b/engines/access/martian/martian_resources.cpp
@@ -27,6 +27,35 @@ namespace Access {
namespace Martian {
+MartianResources::~MartianResources() {
+ delete _font6x6;
+ delete _font3x5;
+}
+
+void MartianResources::load(Common::SeekableReadStream &s) {
+ Resources::load(s);
+ uint count;
+
+ // Get the offset of the general shared data for the game
+ uint entryOffset = findEntry(_vm->getGameID(), 2, 0, (Common::Language)0);
+ s.seek(entryOffset);
+
+ // Read in the cursor list
+ count = s.readUint16LE();
+ CURSORS.resize(count);
+ for (uint idx = 0; idx < count; ++idx) {
+ uint count2 = s.readUint16LE();
+ CURSORS[idx].resize(count2);
+ s.read(&CURSORS[idx][0], count2);
+ }
+
+ // Load font data
+ _font6x6 = new MartianFont(6, s);
+ _font3x5 = new MartianFont(5, s);
+}
+
+/*------------------------------------------------------------------------*/
+
const int SIDEOFFR[] = { 4, 0, 7, 10, 3, 1, 2, 13, 0, 0, 0, 0 };
const int SIDEOFFL[] = { 11, 6, 1, 4, 10, 6, 1, 4, 0, 0, 0, 0 };
const int SIDEOFFU[] = { 1, 2, 0, 2, 2, 1, 1, 0, 0, 0, 0, 0 };