mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-03 09:23:37 +00:00
STARTREK: Simplify setBackgroundImage()
This commit is contained in:
parent
9ebb737a06
commit
da9bd9a102
@ -85,7 +85,7 @@ void StarTrekEngine::loadRoom(const Common::String &missionName, int roomIndex)
|
||||
_gfx->fadeoutScreen();
|
||||
_sound->stopAllVocSounds();
|
||||
|
||||
_gfx->setBackgroundImage(_gfx->loadBitmap(getScreenName()));
|
||||
_gfx->setBackgroundImage(getScreenName());
|
||||
_gfx->loadPri(getScreenName());
|
||||
_gfx->loadPalette("palette");
|
||||
_gfx->copyBackgroundScreen();
|
||||
|
@ -72,8 +72,8 @@ Graphics::~Graphics() {
|
||||
delete _font;
|
||||
}
|
||||
|
||||
void Graphics::setBackgroundImage(Bitmap *bitmap) {
|
||||
_backgroundImage = SharedPtr<Bitmap>(bitmap);
|
||||
void Graphics::setBackgroundImage(Common::String imageName) {
|
||||
_backgroundImage = SharedPtr<Bitmap>(loadBitmap(imageName));
|
||||
}
|
||||
|
||||
void Graphics::drawBitmapToBackground(const Common::Rect &origRect, const Common::Rect &drawRect, Bitmap *bitmap) {
|
||||
|
@ -51,7 +51,7 @@ public:
|
||||
Graphics(StarTrekEngine *vm);
|
||||
~Graphics();
|
||||
|
||||
void setBackgroundImage(Bitmap *bitmap);
|
||||
void setBackgroundImage(Common::String imageName);
|
||||
/**
|
||||
* @param origRect The rectangle containing the original bitmap (must contain the
|
||||
* whole bitmap, even if some is outside the drawable space)
|
||||
|
@ -45,7 +45,7 @@ void StarTrekEngine::playIntro() {
|
||||
_gfx->clearScreenAndPriBuffer();
|
||||
_gfx->fadeoutScreen();
|
||||
_gfx->loadPalette("gold");
|
||||
_gfx->setBackgroundImage(_gfx->loadBitmap("goldlogo"));
|
||||
_gfx->setBackgroundImage("goldlogo");
|
||||
_sound->playVoc("logo");
|
||||
_gfx->copyBackgroundScreen();
|
||||
_system->updateScreen();
|
||||
|
@ -1028,7 +1028,7 @@ void StarTrekEngine::showRepublicMap(int16 arg0, int16 turbolift) {
|
||||
_gfx->pushSprites();
|
||||
|
||||
if (!_awayMission.veng.showedRepublicMapFirstTime) {
|
||||
_gfx->setBackgroundImage(_gfx->loadBitmap("veng9b"));
|
||||
_gfx->setBackgroundImage("veng9b");
|
||||
_gfx->copyBackgroundScreen();
|
||||
_system->updateScreen();
|
||||
_system->delayMillis(10);
|
||||
@ -1085,7 +1085,7 @@ void StarTrekEngine::showRepublicMap(int16 arg0, int16 turbolift) {
|
||||
_gfx->fadeoutScreen();
|
||||
}
|
||||
|
||||
_gfx->setBackgroundImage(_gfx->loadBitmap("veng9"));
|
||||
_gfx->setBackgroundImage("veng9");
|
||||
_gfx->copyBackgroundScreen();
|
||||
_system->updateScreen();
|
||||
_system->delayMillis(10);
|
||||
@ -1171,7 +1171,7 @@ lclick:
|
||||
_gfx->popSprites();
|
||||
|
||||
_gfx->loadPri(getScreenName());
|
||||
_gfx->setBackgroundImage(_gfx->loadBitmap(getScreenName()));
|
||||
_gfx->setBackgroundImage(getScreenName());
|
||||
_gfx->copyBackgroundScreen();
|
||||
_system->updateScreen();
|
||||
_system->delayMillis(10);
|
||||
|
@ -383,7 +383,7 @@ bool Room::demon4ShowSunPuzzle() {
|
||||
_vm->_sound->stopAllVocSounds();
|
||||
|
||||
_vm->_gfx->pushSprites();
|
||||
_vm->_gfx->setBackgroundImage(_vm->_gfx->loadBitmap("machineb"));
|
||||
_vm->_gfx->setBackgroundImage("machineb");
|
||||
_vm->_gfx->copyBackgroundScreen();
|
||||
_vm->_gfx->clearPri();
|
||||
|
||||
@ -528,7 +528,7 @@ done:
|
||||
_vm->_gfx->fadeoutScreen();
|
||||
_vm->_gfx->popSprites();
|
||||
_vm->_gfx->loadPri(_vm->getScreenName());
|
||||
_vm->_gfx->setBackgroundImage(_vm->_gfx->loadBitmap(_vm->getScreenName()));
|
||||
_vm->_gfx->setBackgroundImage(_vm->getScreenName());
|
||||
_vm->_gfx->copyBackgroundScreen();
|
||||
_vm->_gfx->forceDrawAllSprites();
|
||||
|
||||
|
@ -452,7 +452,7 @@ int Room::demon6ShowCase(int visible) {
|
||||
_vm->_gfx->fadeoutScreen();
|
||||
_vm->_gfx->pushSprites();
|
||||
|
||||
_vm->_gfx->setBackgroundImage(_vm->_gfx->loadBitmap("stlcase"));
|
||||
_vm->_gfx->setBackgroundImage("stlcase");
|
||||
_vm->_gfx->copyBackgroundScreen();
|
||||
_vm->_gfx->clearPri();
|
||||
|
||||
@ -489,7 +489,7 @@ int Room::demon6ShowCase(int visible) {
|
||||
_vm->_gfx->fadeoutScreen();
|
||||
_vm->_gfx->popSprites();
|
||||
_vm->_gfx->loadPri(_vm->getScreenName());
|
||||
_vm->_gfx->setBackgroundImage(_vm->_gfx->loadBitmap(_vm->getScreenName()));
|
||||
_vm->_gfx->setBackgroundImage(_vm->getScreenName());
|
||||
_vm->_gfx->copyBackgroundScreen();
|
||||
_vm->_gfx->forceDrawAllSprites();
|
||||
|
||||
|
@ -274,8 +274,7 @@ void StarTrekEngine::runTransportSequence(const Common::String &name) {
|
||||
actorFunc1();
|
||||
initActors();
|
||||
|
||||
Bitmap *bgImage = _gfx->loadBitmap("transprt");
|
||||
_gfx->setBackgroundImage(bgImage);
|
||||
_gfx->setBackgroundImage("transprt");
|
||||
_gfx->clearPri();
|
||||
_gfx->loadPalette("palette");
|
||||
_gfx->copyBackgroundScreen();
|
||||
|
Loading…
x
Reference in New Issue
Block a user