From c9d0d4c840aac829d42bc5ec1b5b1e7f30b5a50c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 18 Jan 2005 10:45:36 +0000 Subject: Initialize converse properly. svn-id: r16591 --- saga/interface.cpp | 6 ++++++ saga/interface.h | 2 ++ saga/saga.cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'saga') diff --git a/saga/interface.cpp b/saga/interface.cpp index 57eb1dbca4..05493da657 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -738,8 +738,14 @@ void Interface::drawPanelButtonText(SURFACE *ds, InterfacePanel *panel, PanelBut _vm->_font->draw(SMALL_FONT_ID, ds, text, 0, point.x , point.y, textColor, textShadowColor, (textShadowColor != 0) ? FONT_SHADOW : 0); } + // Converse stuff +void Interface::converseInit(void) { + for (int i = 0; i < CONVERSE_MAX_TEXTS; i++) + _converseText[i].text = NULL; + converseClear(); +} void Interface::converseClear(void) { for (int i = 0; i < CONVERSE_MAX_TEXTS; i++) { if (_converseText[i].text) diff --git a/saga/interface.h b/saga/interface.h index 5ff4c31e1d..f0d562e830 100644 --- a/saga/interface.h +++ b/saga/interface.h @@ -131,7 +131,9 @@ private: void unlockMode() { _panelMode = _lockedMode; } void drawPanelButtonText(SURFACE *ds, InterfacePanel *panel, PanelButton *panelButton, int textColor, int textShadowColor); + public: + void converseInit(void); void converseClear(void); bool converseAddText(const char *text, int replyId, byte replyFlags, int replyBit); void converseDisplayText(int pos); diff --git a/saga/saga.cpp b/saga/saga.cpp index f0bd952de3..657f0fc4cd 100644 --- a/saga/saga.cpp +++ b/saga/saga.cpp @@ -262,7 +262,7 @@ int SagaEngine::init(GameDetector &detector) { debug(0, "Sound disabled."); } - _interface->converseClear(); + _interface->converseInit(); return 0; } -- cgit v1.2.3