mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 03:10:22 +00:00
ASYLUM: Change getSurface to return a mutable surface
This is to allow rendering TTF on the screen
This commit is contained in:
parent
4599ed2b30
commit
43b42b2912
@ -95,7 +95,7 @@ bool PuzzleWritings::init(const AsylumEvent &) {
|
|||||||
getText()->drawCentered(Common::Point(10, 375), 590, getText()->get(MAKE_RESOURCE(kResourcePackText, textId++)));
|
getText()->drawCentered(Common::Point(10, 375), 590, getText()->get(MAKE_RESOURCE(kResourcePackText, textId++)));
|
||||||
getText()->drawCentered(Common::Point(10, 405), 590, getText()->get(MAKE_RESOURCE(kResourcePackText, textId)));
|
getText()->drawCentered(Common::Point(10, 405), 590, getText()->get(MAKE_RESOURCE(kResourcePackText, textId)));
|
||||||
|
|
||||||
_textSurface.copyFrom(getScreen()->getSurface());
|
_textSurface.copyFrom(*getScreen()->getSurface());
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -147,8 +147,8 @@ public:
|
|||||||
void drawRect(const Common::Rect &rect, uint32 color = 0xFF);
|
void drawRect(const Common::Rect &rect, uint32 color = 0xFF);
|
||||||
void copyToBackBufferClipped(Graphics::Surface *surface, int16 x, int16 y);
|
void copyToBackBufferClipped(Graphics::Surface *surface, int16 x, int16 y);
|
||||||
|
|
||||||
// Used by Writings puzzle
|
// Used by Writings puzzle and Chinese renderer
|
||||||
const Graphics::Surface &getSurface() const { return _backBuffer; };
|
Graphics::Surface *getSurface() { return &_backBuffer; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AsylumEngine *_vm;
|
AsylumEngine *_vm;
|
||||||
|
@ -465,7 +465,7 @@ bool Scene::action(AsylumAction a) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
if (!_vm->checkGameVersion("Demo")) {
|
if (!_vm->checkGameVersion("Demo")) {
|
||||||
_savedScreen.copyFrom(getScreen()->getSurface());
|
_savedScreen.copyFrom(*getScreen()->getSurface());
|
||||||
memcpy(_savedPalette, getScreen()->getPalette(), sizeof(_savedPalette));
|
memcpy(_savedPalette, getScreen()->getPalette(), sizeof(_savedPalette));
|
||||||
_vm->switchEventHandler(_vm->menu());
|
_vm->switchEventHandler(_vm->menu());
|
||||||
}
|
}
|
||||||
|
@ -109,7 +109,7 @@ bool VideoPlayer::handleEvent(const AsylumEvent &evt) {
|
|||||||
getText()->draw(0, 99, kTextCenter, Common::Point(10, y), 20, 620, text);
|
getText()->draw(0, 99, kTextCenter, Common::Point(10, y), 20, 620, text);
|
||||||
|
|
||||||
if (_vm->checkGameVersion("Steam")) {
|
if (_vm->checkGameVersion("Steam")) {
|
||||||
Graphics::Surface *st = getScreen()->getSurface().convertTo(g_system->getScreenFormat(), _subtitlePalette);
|
Graphics::Surface *st = getScreen()->getSurface()->convertTo(g_system->getScreenFormat(), _subtitlePalette);
|
||||||
g_system->copyRectToScreen((const byte *)st->getBasePtr(0, 400), st->pitch, 0, 400, 640, 80);
|
g_system->copyRectToScreen((const byte *)st->getBasePtr(0, 400), st->pitch, 0, 400, 640, 80);
|
||||||
st->free();
|
st->free();
|
||||||
delete st;
|
delete st;
|
||||||
|
Loading…
Reference in New Issue
Block a user