mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-11 13:45:25 +00:00
SUPERNOVA: add renderBox()
This commit is contained in:
parent
9b4bade4f6
commit
332763e825
@ -72,8 +72,7 @@ bool MSNImageDecoder::loadStream(Common::SeekableReadStream &stream) {
|
||||
_clickField[i].next = stream.readByte();
|
||||
}
|
||||
|
||||
byte zwCodes[256];
|
||||
Common::fill(zwCodes, zwCodes + 256, 0);
|
||||
byte zwCodes[256] = {0};
|
||||
byte numRepeat = stream.readByte();
|
||||
byte numZw = stream.readByte();
|
||||
stream.read(zwCodes, numZw);
|
||||
|
@ -14,16 +14,6 @@ struct Surface;
|
||||
|
||||
namespace Supernova {
|
||||
|
||||
const byte initPalette[48] = {
|
||||
// r g b
|
||||
0, 0, 0, 16, 16, 16, 22, 22, 22,
|
||||
28, 28, 28, 63, 63, 63, 0, 52, 0,
|
||||
0, 63, 0, 54, 0, 0, 63, 0, 0,
|
||||
0, 0, 30, 0, 0, 45, 40, 40, 40,
|
||||
20, 50, 63, 10, 63, 10, 60, 60, 0,
|
||||
63, 10, 10
|
||||
};
|
||||
|
||||
class MSNImageDecoder : public Image::ImageDecoder {
|
||||
public:
|
||||
MSNImageDecoder();
|
||||
|
@ -74,7 +74,6 @@ Common::Error SupernovaEngine::run() {
|
||||
_gameRunning = true;
|
||||
while (_gameRunning) {
|
||||
updateEvents();
|
||||
renderImage(31, 0);
|
||||
|
||||
_system->updateScreen();
|
||||
_system->delayMillis(10);
|
||||
@ -217,4 +216,14 @@ void SupernovaEngine::renderImage(int filenumber, int section) {
|
||||
_system->copyRectToScreen(_image.getSurface()->getPixels(), 320, 0, 0, 320, 200);
|
||||
}
|
||||
|
||||
|
||||
void SupernovaEngine::renderBox(int x, int y, int width, int height, byte color) {
|
||||
Graphics::Surface *screen = _system->lockScreen();
|
||||
screen->drawLine(x, y, x + width, y, color);
|
||||
screen->drawLine(x + width, y, x + width, y + height, color);
|
||||
screen->drawLine(x + width, y + height, x, y + height, color);
|
||||
screen->drawLine(x, y + height, x, y, color);
|
||||
_system->unlockScreen();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ private:
|
||||
void playSoundMod(int filenumber);
|
||||
void stopSound();
|
||||
void renderImage(int filenumber, int section);
|
||||
void renderBox(int x, int y, int width, int height, byte color);
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user