diff options
-rw-r--r-- | engines/access/martian/martian_player.cpp | 2 | ||||
-rw-r--r-- | engines/access/martian/martian_player.h | 2 | ||||
-rw-r--r-- | engines/access/martian/martian_room.cpp | 3 | ||||
-rw-r--r-- | engines/access/player.cpp | 17 | ||||
-rw-r--r-- | engines/access/player.h | 2 |
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(); |