mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-25 05:34:27 +00:00
KINGDOM: Implement DrawIcon, make a check in GL1 more coherent (style wise)
This commit is contained in:
parent
c42d08c49a
commit
557c610138
@ -105,7 +105,7 @@ void KingdomGame::GPLogic1() {
|
||||
if (!_Wizard) {
|
||||
_StatPlay = 50;
|
||||
_LoopFlag = true;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
DrawLocation();
|
||||
|
@ -1474,7 +1474,22 @@ void KingdomGame::SwitchMtoA() {
|
||||
}
|
||||
|
||||
void KingdomGame::DrawIcon(int x, int y, int index) {
|
||||
debug("STUB: DrawIcon");
|
||||
const byte *data = _kingartEntries[index].data;
|
||||
int width = _kingartEntries[index].Width;
|
||||
int height = _kingartEntries[index].Height;
|
||||
|
||||
::Graphics::Surface *screen = g_system->lockScreen();
|
||||
for (uint curX = 0; curX < width; curX++) {
|
||||
for (uint curY = 0; curY < height; curY++) {
|
||||
const byte *src = data + (curY * width) + curX;
|
||||
byte *dst = (byte *)screen->getBasePtr(curX + x, curY + y);
|
||||
if (*src != 0xFF)
|
||||
*dst = *src;
|
||||
}
|
||||
}
|
||||
g_system->unlockScreen();
|
||||
g_system->updateScreen();
|
||||
|
||||
}
|
||||
|
||||
int KingdomGame::GetAKey() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user