Skip to content

Commit

Permalink
ACCESS: MM - Implement some more tex palette handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Dec 31, 2014
1 parent d192d0b commit f96dbd5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions engines/access/martian/martian_room.cpp
Expand Up @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion engines/access/player.cpp
Expand Up @@ -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);
}
Expand All @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion engines/access/player.h
Expand Up @@ -56,7 +56,6 @@ class Player : public ImageEntry, public Manager {
int _diagUpWalkMin, _diagUpWalkMax;
int _diagDownWalkMin, _diagDownWalkMax;
SpriteResource *_playerSprites1;
byte *_manPal1;
int _scrollEnd;
int _inactiveYOff;

Expand All @@ -82,6 +81,7 @@ class Player : public ImageEntry, public Manager {
Direction _playerDirection;
SpriteResource *_playerSprites;
// Fields in original Player structure
byte *_manPal1;
byte *_monData;
int *_walkOffRight;
int *_walkOffLeft;
Expand Down

0 comments on commit f96dbd5

Please sign in to comment.