Skip to content

Commit

Permalink
ACCESS: MM - Implement setIconPalette for MM
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jan 2, 2015
1 parent 539497f commit 900dc7f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engines/access/martian/martian_game.cpp
Expand Up @@ -247,7 +247,7 @@ void MartianEngine::doCredits() {
_buffer2.copyFrom(*_screen);
_buffer1.copyFrom(*_screen);
_events->showCursor();
_creditsStream = new Common::MemoryReadStream(DEMO_DATA, 180);
_creditsStream = new Common::MemoryReadStream(CREDIT_DATA, 180);

if (!showCredits()) {
_screen->copyFrom(_buffer2);
Expand Down
10 changes: 9 additions & 1 deletion engines/access/martian/martian_resources.cpp
Expand Up @@ -724,7 +724,7 @@ 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 };
const int SIDEOFFD[] = { 2, 0, 1, 1, 0, 1, 1, 1, 2, 0, 0, 0 };

const byte DEMO_DATA[] = {
const byte CREDIT_DATA[] = {
0x1F, 0x00, 0x49, 0x00, 0x00, 0x00, 0xB7, 0x00, 0x49, 0x00,
0x01, 0x00, 0x79, 0x00, 0x6F, 0x00, 0x02, 0x00, 0xFF, 0xFF,
0xEA, 0x01, 0x75, 0x00, 0x46, 0x00, 0x03, 0x00, 0x46, 0x00,
Expand All @@ -745,6 +745,14 @@ const byte DEMO_DATA[] = {
0x0B, 0x00, 0xFF, 0xFF, 0xF4, 0x01, 0xFF, 0xFF, 0xFF, 0xFF
};

const byte ICON_DATA[] = {
0x3F, 0x3F, 0x00, 0x00, 0x07, 0x16,
0x00, 0x0A, 0x1A, 0x00, 0x0D, 0x1F,
0x00, 0x11, 0x28, 0x00, 0x15, 0x30,
0x00, 0x19, 0x39, 0x00, 0x1B, 0x3F,
0x00, 0x2D, 0x3A
};

} // End of namespace Martian

} // End of namespace Access
3 changes: 2 additions & 1 deletion engines/access/martian/martian_resources.h
Expand Up @@ -50,7 +50,8 @@ extern const int SIDEOFFL[];
extern const int SIDEOFFU[];
extern const int SIDEOFFD[];

extern const byte DEMO_DATA[];
extern const byte CREDIT_DATA[];
extern const byte ICON_DATA[];
} // End of namespace Martian

} // End of namespace Access
Expand Down
8 changes: 7 additions & 1 deletion engines/access/screen.cpp
Expand Up @@ -113,7 +113,13 @@ void Screen::setInitialPalettte() {
}

void Screen::setManPalette() {
Common::copy(_vm->_player->_manPal1 + 0x2A0, _vm->_player->_manPal1 + 0x2A0 + 0x42, _rawPalette + 672);
Common::copy(_vm->_screen->_manPal, _vm->_screen->_manPal + 0x42, _rawPalette + 672);
}

void Screen::setIconPalette() {
if (_vm->getGameID() == GType_MartianMemorandum) {
Common::copy(Martian::ICON_DATA, Martian::ICON_DATA + 0x1B, _rawPalette + 741);
}
}

void Screen::loadPalette(int fileNum, int subfile) {
Expand Down
2 changes: 1 addition & 1 deletion engines/access/screen.h
Expand Up @@ -137,7 +137,7 @@ class Screen : public ASurface {
/**
* Set icon palette
*/
void setIconPalette() {}
void setIconPalette();

/**
* Set Tex palette (Martian Memorandum)
Expand Down

0 comments on commit 900dc7f

Please sign in to comment.