ASYLUM: Encounter tiny fixes.

This commit is contained in:
xesfnet 2015-05-13 21:58:34 +01:00 committed by Eugene Sandulenko
parent 294e27d67f
commit d25c7ed13a
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
2 changed files with 5 additions and 3 deletions

View File

@ -456,6 +456,7 @@ bool Encounter::update() {
}
bool doScript = false;
//bool doScript = true; // TODO: fix this later - for now it doesn run the script so let make sure it runs
if ((getSpeech()->getSoundResourceId() && !getSound()->isPlaying(getSpeech()->getSoundResourceId()) && !_data_455BE0)
|| (getSpeech()->getTick() && tick >= getSpeech()->getTick()))
doScript = true;
@ -463,7 +464,7 @@ bool Encounter::update() {
if (doScript
&& !getSharedData()->getMatteBarHeight()
&& _isScriptRunning
&& !setupSpeech(id))
&& !setupSpeechTest(id))
runScript();
}
@ -781,6 +782,7 @@ void Encounter::setupSpeechText() {
_portrait2.transTableMax = 3;
getSpeech()->setTextData(NULL);
getSpeech()->setTextDataPos(text);
if (*text == '/')
getSpeech()->setTextDataPos(text + 2);
@ -816,7 +818,7 @@ void Encounter::setupSpeech(ResourceId textResourceId, ResourceId fontResourceId
getSpeech()->setSoundResourceId(MAKE_RESOURCE(kResourcePackSharedSound, textResourceId - _speechResourceId));
}
bool Encounter::setupSpeech(ResourceId id) {
bool Encounter::setupSpeechTest(ResourceId id) {
getSpeech()->setTick(0);
getSpeech()->setSoundResourceId(kResourceNone);

View File

@ -238,7 +238,7 @@ private:
void setupSpeechText();
void setupSpeechData(char val, EncounterGraphic *encounterGraphic) const;
void setupSpeech(ResourceId textResourceId, ResourceId fontResourceId);
bool setupSpeech(ResourceId id);
bool setupSpeechTest(ResourceId id);
bool isSpeaking();
//////////////////////////////////////////////////////////////////////////