Implemented clearScreen() for preagi games
svn-id: r28837
This commit is contained in:
parent
2dd4f61b5e
commit
314d7c1736
3 changed files with 13 additions and 5 deletions
|
@ -995,6 +995,9 @@ public:
|
||||||
int16 p4, int16 p5, int16 p6, int16 p7) {}
|
int16 p4, int16 p5, int16 p6, int16 p7) {}
|
||||||
void releaseImageStack() {}
|
void releaseImageStack() {}
|
||||||
|
|
||||||
|
// Screen
|
||||||
|
void clearScreen(int attr);
|
||||||
|
|
||||||
// Keyboard
|
// Keyboard
|
||||||
void waitAnyKeyAnim();
|
void waitAnyKeyAnim();
|
||||||
int getSelection(int type);
|
int getSelection(int type);
|
||||||
|
|
|
@ -42,6 +42,11 @@
|
||||||
|
|
||||||
namespace Agi {
|
namespace Agi {
|
||||||
|
|
||||||
|
// Screen functions
|
||||||
|
void PreAgiEngine::clearScreen(int attr) {
|
||||||
|
_gfx->clearScreen((attr & 0xF0) / 0x10);
|
||||||
|
}
|
||||||
|
|
||||||
// String functions
|
// String functions
|
||||||
|
|
||||||
void PreAgiEngine::drawStr(int row, int col, int attr, const char *buffer) {
|
void PreAgiEngine::drawStr(int row, int col, int attr, const char *buffer) {
|
||||||
|
|
|
@ -571,7 +571,7 @@ void Mickey::PlaySound(ENUM_MSA_SOUND iSound) {
|
||||||
void Mickey::debug() {
|
void Mickey::debug() {
|
||||||
char szLine[41] = {0};
|
char szLine[41] = {0};
|
||||||
|
|
||||||
//ClearScreen(IDA_DEFAULT); // TODO
|
_vm->clearScreen(IDA_DEFAULT);
|
||||||
|
|
||||||
sprintf(szLine, IDS_MSA_DEBUG_ROOM, game.iRoom);
|
sprintf(szLine, IDS_MSA_DEBUG_ROOM, game.iRoom);
|
||||||
_vm->drawStr(5, 10, IDA_DEFAULT, szLine);
|
_vm->drawStr(5, 10, IDA_DEFAULT, szLine);
|
||||||
|
@ -924,7 +924,7 @@ void Mickey::printStory() {
|
||||||
|
|
||||||
readExe(IDO_MSA_GAME_STORY, (uint8 *)buffer, sizeof(buffer));
|
readExe(IDO_MSA_GAME_STORY, (uint8 *)buffer, sizeof(buffer));
|
||||||
|
|
||||||
//ClearScreen(IDA_DEFAULT); // TODO
|
_vm->clearScreen(IDA_DEFAULT);
|
||||||
for (iRow = 0; iRow < 25; iRow++) {
|
for (iRow = 0; iRow < 25; iRow++) {
|
||||||
strcpy(szLine, buffer + pBuf);
|
strcpy(szLine, buffer + pBuf);
|
||||||
_vm->drawStr(iRow, 0, IDA_DEFAULT, szLine);
|
_vm->drawStr(iRow, 0, IDA_DEFAULT, szLine);
|
||||||
|
@ -934,7 +934,7 @@ void Mickey::printStory() {
|
||||||
_vm->_system->updateScreen(); // TODO: this should go in the game's main loop
|
_vm->_system->updateScreen(); // TODO: this should go in the game's main loop
|
||||||
_vm->waitAnyKey();
|
_vm->waitAnyKey();
|
||||||
|
|
||||||
//ClearScreen(IDA_DEFAULT); // TODO
|
_vm->clearScreen(IDA_DEFAULT);
|
||||||
for (iRow = 0; iRow < 21; iRow++) {
|
for (iRow = 0; iRow < 21; iRow++) {
|
||||||
strcpy(szLine, buffer + pBuf);
|
strcpy(szLine, buffer + pBuf);
|
||||||
_vm->drawStr(iRow, 0, IDA_DEFAULT, szLine); // TODO
|
_vm->drawStr(iRow, 0, IDA_DEFAULT, szLine); // TODO
|
||||||
|
@ -1105,7 +1105,7 @@ void Mickey::inventory() {
|
||||||
|
|
||||||
sprintf(szCrystals, IDS_MSA_CRYSTALS, IDS_MSA_CRYSTAL_NO[game.nXtals]);
|
sprintf(szCrystals, IDS_MSA_CRYSTALS, IDS_MSA_CRYSTAL_NO[game.nXtals]);
|
||||||
|
|
||||||
// ClearScreen(IDA_DEFAULT);
|
_vm->clearScreen(IDA_DEFAULT);
|
||||||
_vm->drawStr(IDI_MSA_ROW_INV_TITLE, IDI_MSA_COL_INV_TITLE, IDA_DEFAULT, IDS_MSA_INVENTORY);
|
_vm->drawStr(IDI_MSA_ROW_INV_TITLE, IDI_MSA_COL_INV_TITLE, IDA_DEFAULT, IDS_MSA_INVENTORY);
|
||||||
_vm->drawStr(IDI_MSA_ROW_INV_CRYSTALS, IDI_MSA_COL_INV_ITEMS, IDA_DEFAULT, szCrystals);
|
_vm->drawStr(IDI_MSA_ROW_INV_CRYSTALS, IDI_MSA_COL_INV_ITEMS, IDA_DEFAULT, szCrystals);
|
||||||
|
|
||||||
|
@ -1119,7 +1119,7 @@ void Mickey::inventory() {
|
||||||
_vm->_system->updateScreen(); // TODO: this should go in the game's main loop
|
_vm->_system->updateScreen(); // TODO: this should go in the game's main loop
|
||||||
_vm->waitAnyKey();
|
_vm->waitAnyKey();
|
||||||
|
|
||||||
//ClearScreen(IDA_DEFAULT); // TODO
|
_vm->clearScreen(IDA_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Mickey::randomize() {
|
void Mickey::randomize() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue