STARK: Draw the dialogue background.
This commit is contained in:
parent
ffa10dafab
commit
454e22a52f
3 changed files with 20 additions and 1 deletions
|
@ -25,10 +25,13 @@
|
||||||
|
|
||||||
#include "engines/stark/services/dialogplayer.h"
|
#include "engines/stark/services/dialogplayer.h"
|
||||||
#include "engines/stark/services/services.h"
|
#include "engines/stark/services/services.h"
|
||||||
|
#include "engines/stark/services/staticprovider.h"
|
||||||
|
|
||||||
#include "engines/stark/resources/dialog.h"
|
#include "engines/stark/resources/dialog.h"
|
||||||
#include "engines/stark/resources/speech.h"
|
#include "engines/stark/resources/speech.h"
|
||||||
|
|
||||||
|
#include "engines/stark/visual/image.h"
|
||||||
|
|
||||||
namespace Stark {
|
namespace Stark {
|
||||||
|
|
||||||
DialogPlayer::DialogPlayer() :
|
DialogPlayer::DialogPlayer() :
|
||||||
|
@ -42,6 +45,12 @@ DialogPlayer::~DialogPlayer() {
|
||||||
delete _texture;
|
delete _texture;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DialogPlayer::init() {
|
||||||
|
StaticProvider *staticProvider = StarkServices::instance().staticProvider;
|
||||||
|
// TODO: Un-hardcode
|
||||||
|
_passiveBackGroundTexture = staticProvider->getCursorImage(21);
|
||||||
|
}
|
||||||
|
|
||||||
void DialogPlayer::run(Resources::Dialog *dialog) {
|
void DialogPlayer::run(Resources::Dialog *dialog) {
|
||||||
reset();
|
reset();
|
||||||
|
|
||||||
|
@ -162,7 +171,10 @@ void DialogPlayer::clearSubtitles() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void DialogPlayer::renderText() {
|
void DialogPlayer::renderText() {
|
||||||
|
// TODO: Unhardcode
|
||||||
|
Gfx::Driver *gfx = StarkServices::instance().gfx;
|
||||||
|
gfx->setScreenViewport(true);
|
||||||
|
_passiveBackGroundTexture->render(Common::Point(0, 400));
|
||||||
if (_texture) {
|
if (_texture) {
|
||||||
Gfx::Driver *gfx = StarkServices::instance().gfx;
|
Gfx::Driver *gfx = StarkServices::instance().gfx;
|
||||||
gfx->setScreenViewport(false);
|
gfx->setScreenViewport(false);
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
|
|
||||||
namespace Stark {
|
namespace Stark {
|
||||||
|
|
||||||
|
class VisualImageXMG;
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
class Texture;
|
class Texture;
|
||||||
}
|
}
|
||||||
|
@ -44,6 +46,9 @@ public:
|
||||||
DialogPlayer();
|
DialogPlayer();
|
||||||
virtual ~DialogPlayer();
|
virtual ~DialogPlayer();
|
||||||
|
|
||||||
|
/** Initialise textures etc, that can't be created at constructor-time */
|
||||||
|
void init();
|
||||||
|
|
||||||
/** Enter a dialog */
|
/** Enter a dialog */
|
||||||
void run(Resources::Dialog *dialog);
|
void run(Resources::Dialog *dialog);
|
||||||
|
|
||||||
|
@ -91,6 +96,7 @@ protected:
|
||||||
bool _speechReady;
|
bool _speechReady;
|
||||||
Common::Array<Option> _options;
|
Common::Array<Option> _options;
|
||||||
|
|
||||||
|
VisualImageXMG *_passiveBackGroundTexture;
|
||||||
Gfx::Texture *_texture;
|
Gfx::Texture *_texture;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -125,6 +125,7 @@ Common::Error StarkEngine::run() {
|
||||||
_resourceProvider->initGlobal();
|
_resourceProvider->initGlobal();
|
||||||
_staticProvider->init();
|
_staticProvider->init();
|
||||||
_cursor->init();
|
_cursor->init();
|
||||||
|
_dialogPlayer->init();
|
||||||
|
|
||||||
// Start us up at the house of all worlds
|
// Start us up at the house of all worlds
|
||||||
_global->setCurrentChapter(0);
|
_global->setCurrentChapter(0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue