aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-12-31 10:10:32 +0100
committerStrangerke2014-12-31 10:10:32 +0100
commitf96dbd52c793a6b96bee8ecde0148ae85dd9fd9e (patch)
treef5f08f07671606f1decf975e8c3dd922e1f69c85
parentd192d0b60c574ab6928234ea35f72aace396eda4 (diff)
downloadscummvm-rg350-f96dbd52c793a6b96bee8ecde0148ae85dd9fd9e.tar.gz
scummvm-rg350-f96dbd52c793a6b96bee8ecde0148ae85dd9fd9e.tar.bz2
scummvm-rg350-f96dbd52c793a6b96bee8ecde0148ae85dd9fd9e.zip
ACCESS: MM - Implement some more tex palette handling
-rw-r--r--engines/access/martian/martian_room.cpp5
-rw-r--r--engines/access/player.cpp4
-rw-r--r--engines/access/player.h2
3 files changed, 9 insertions, 2 deletions
diff --git a/engines/access/martian/martian_room.cpp b/engines/access/martian/martian_room.cpp
index dfc0dbcd5e..c4f38d8f99 100644
--- a/engines/access/martian/martian_room.cpp
+++ b/engines/access/martian/martian_room.cpp
@@ -82,7 +82,12 @@ void MartianRoom::reloadRoom1() {
setWallCodes();
buildScreen();
_vm->copyBF2Vid();
+
+ //
warning("TODO: setManPalette");
+ Common::copy(_vm->_player->_manPal1 + 0x2A0, _vm->_player->_manPal1 + 0x2A0 + 0x42, _vm->_screen->_manPal);
+ //
+
_vm->_events->showCursor();
_vm->_player->_frame = 0;
_vm->_oldRects.clear();
diff --git a/engines/access/player.cpp b/engines/access/player.cpp
index 41c5b47daf..fe555ec49a 100644
--- a/engines/access/player.cpp
+++ b/engines/access/player.cpp
@@ -140,7 +140,8 @@ void Player::load() {
_playerSprites = _playerSprites1;
if (_manPal1) {
- Common::copy(_manPal1 + 0x270, _manPal1 + 0x270 + 0x60, _vm->_screen->_manPal);
+ // Those values are from MM as Amazon doesn't use it
+ Common::copy(_manPal1 + 0x2A0, _manPal1 + 0x2A0 + 0x42, _vm->_screen->_manPal);
} else {
Common::fill(_vm->_screen->_manPal, _vm->_screen->_manPal + 0x60, 0);
}
@@ -149,6 +150,7 @@ void Player::load() {
void Player::loadTexPalette() {
Resource *_texPal = _vm->_files->loadFile("TEXPAL.COL");
int size = _texPal->_size;
+ assert(size == 768);
_manPal1 = new byte[size];
memcpy(_manPal1, _texPal->data(), size);
}
diff --git a/engines/access/player.h b/engines/access/player.h
index 1e66a72a95..db88892d7c 100644
--- a/engines/access/player.h
+++ b/engines/access/player.h
@@ -56,7 +56,6 @@ protected:
int _diagUpWalkMin, _diagUpWalkMax;
int _diagDownWalkMin, _diagDownWalkMax;
SpriteResource *_playerSprites1;
- byte *_manPal1;
int _scrollEnd;
int _inactiveYOff;
@@ -82,6 +81,7 @@ public:
Direction _playerDirection;
SpriteResource *_playerSprites;
// Fields in original Player structure
+ byte *_manPal1;
byte *_monData;
int *_walkOffRight;
int *_walkOffLeft;