Fix for some problems introduced (like wrong text display) with last commit.

svn-id: r30654
This commit is contained in:
Johannes Schickel 2008-01-27 15:53:09 +00:00
parent fec6e22cc9
commit dd3a8672be
5 changed files with 7 additions and 4 deletions

View file

@ -79,6 +79,8 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags)
}
int KyraEngine::init() {
registerDefaultSettings();
// Setup mixer
if (!_mixer->isReady())
warning("Sound initialization failed.");

View file

@ -264,7 +264,6 @@ int KyraEngine_v1::init() {
assert(_movFacingTable);
_movFacingTable[0] = 8;
registerDefaultSettings();
readSettings();
_skipFlag = false;

View file

@ -131,6 +131,8 @@ int KyraEngine_v2::init() {
setupTimers();
readSettings();
_screen->loadFont(_screen->FID_6_FNT, "6.FNT");
_screen->loadFont(_screen->FID_8_FNT, "8FAT.FNT");
_screen->loadFont(_screen->FID_GOLDFONT_FNT, "GOLDFONT.FNT");
@ -524,7 +526,7 @@ void KyraEngine_v2::updateWithText() {
restorePage3();
drawAnimObjects();
if (1/*textEnabled()*/ && _chatText) {
if (textEnabled() && _chatText) {
int pageBackUp = _screen->_curPage;
_screen->_curPage = 2;
objectChatPrintText(_chatText, _chatObject);

View file

@ -760,7 +760,7 @@ int KyraEngine_v2::o2_zanthiaChat(ScriptState *script) {
int KyraEngine_v2::o2_isVoiceEnabled(ScriptState *script) {
debugC(3, kDebugLevelScriptFuncs, "o2_isVoiceEnabled(%p) ()", (const void *)script);
return 1/*voiceEnabled()*/;
return speechEnabled() ? 1 : 0;
}
int KyraEngine_v2::o2_isVoicePlaying(ScriptState *script) {

View file

@ -126,7 +126,7 @@ int KyraEngine_v2::chatGetType(const char *str) {
}
int KyraEngine_v2::chatCalcDuration(const char *str) {
return MIN<int>(strlen(str) << 3, 120);
return MAX<int>(strlen(str) << 3, 120);
}
void KyraEngine_v2::objectChat(const char *str, int object, int vocHigh, int vocLow) {