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