aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorStrangerke2014-12-29 22:51:15 +0100
committerStrangerke2014-12-29 22:51:15 +0100
commitd192d0b60c574ab6928234ea35f72aace396eda4 (patch)
treecd8a60cb8ed1190221372a8bb24659cf55c03df8 /engines/access
parent053fe65b68d22328f63b1693e06ae19fabb49de3 (diff)
downloadscummvm-rg350-d192d0b60c574ab6928234ea35f72aace396eda4.tar.gz
scummvm-rg350-d192d0b60c574ab6928234ea35f72aace396eda4.tar.bz2
scummvm-rg350-d192d0b60c574ab6928234ea35f72aace396eda4.zip
ACCESS: MM - Load TEXPAL
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/martian/martian_player.cpp2
-rw-r--r--engines/access/martian/martian_player.h2
-rw-r--r--engines/access/martian/martian_room.cpp3
-rw-r--r--engines/access/player.cpp17
-rw-r--r--engines/access/player.h2
5 files changed, 21 insertions, 5 deletions
diff --git a/engines/access/martian/martian_player.cpp b/engines/access/martian/martian_player.cpp
index 493776e411..f461751438 100644
--- a/engines/access/martian/martian_player.cpp
+++ b/engines/access/martian/martian_player.cpp
@@ -53,8 +53,6 @@ void MartianPlayer::load() {
_upWalkMax = 14;
_downWalkMin = 15;
_downWalkMax = 23;
-
- warning("TODO: Copy texPal into manPal");
}
} // End of namespace Martian
diff --git a/engines/access/martian/martian_player.h b/engines/access/martian/martian_player.h
index 192f2540cc..63a21a1c24 100644
--- a/engines/access/martian/martian_player.h
+++ b/engines/access/martian/martian_player.h
@@ -37,7 +37,7 @@ private:
MartianEngine *_game;
public:
MartianPlayer(AccessEngine *vm);
-
+ Resource *_texPal;
virtual void load();
};
diff --git a/engines/access/martian/martian_room.cpp b/engines/access/martian/martian_room.cpp
index 972aada5d6..dfc0dbcd5e 100644
--- a/engines/access/martian/martian_room.cpp
+++ b/engines/access/martian/martian_room.cpp
@@ -43,13 +43,12 @@ void MartianRoom::loadRoom(int roomNumber) {
}
void MartianRoom::reloadRoom() {
- warning("TODO: Load TEXPAL.COL");
// _vm->_currentMan = _roomFlag;
// _vm->_currentManOld = _roomFlag;
// _vm->_manScaleOff = 0;
+ _vm->_player->loadTexPalette();
_vm->_player->loadSprites("TEX.LZ");
- warning("TODO: Load TEXPAL.COL");
loadRoom(_vm->_player->_roomNumber);
diff --git a/engines/access/player.cpp b/engines/access/player.cpp
index 1fe58c6a1c..41c5b47daf 100644
--- a/engines/access/player.cpp
+++ b/engines/access/player.cpp
@@ -146,10 +146,27 @@ void Player::load() {
}
}
+void Player::loadTexPalette() {
+ Resource *_texPal = _vm->_files->loadFile("TEXPAL.COL");
+ int size = _texPal->_size;
+ _manPal1 = new byte[size];
+ memcpy(_manPal1, _texPal->data(), size);
+}
+
void Player::loadSprites(const Common::String &name) {
freeSprites();
Resource *data = _vm->_files->loadFile(name);
+
+#if 0
+ Common::DumpFile *outFile = new Common::DumpFile();
+ Common::String outName = name + ".dump";
+ outFile->open(outName);
+ outFile->write(data->data(), data->_size);
+ outFile->finalize();
+ outFile->close();
+#endif
+
_playerSprites1 = new SpriteResource(_vm, data);
delete data;
}
diff --git a/engines/access/player.h b/engines/access/player.h
index 1b33ae63ec..1e66a72a95 100644
--- a/engines/access/player.h
+++ b/engines/access/player.h
@@ -124,6 +124,8 @@ public:
virtual void load();
+ void loadTexPalette();
+
void loadSprites(const Common::String &name);
void freeSprites();