[Scummvm-cvs-logs] SF.net SVN: scummvm: [31438] scummvm/trunk/engines/kyra

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Sun Apr 6 18:54:51 CEST 2008


Revision: 31438
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31438&view=rev
Author:   lordhoto
Date:     2008-04-06 09:54:51 -0700 (Sun, 06 Apr 2008)

Log Message:
-----------
Implemented support for Towns (and hopefully DOS floppy too) menus.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/gui_v2.cpp
    scummvm/trunk/engines/kyra/gui_v2.h
    scummvm/trunk/engines/kyra/kyra_v2.cpp
    scummvm/trunk/engines/kyra/kyra_v2.h
    scummvm/trunk/engines/kyra/staticres.cpp
    scummvm/trunk/engines/kyra/text_v2.cpp

Modified: scummvm/trunk/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/gui_v2.cpp	2008-04-06 15:35:30 UTC (rev 31437)
+++ scummvm/trunk/engines/kyra/gui_v2.cpp	2008-04-06 16:54:51 UTC (rev 31438)
@@ -1232,15 +1232,6 @@
 	//XXX
 	_displayMenu = true;
 
-	if (!_vm->gameFlags().isTalkie) {
-		_gameOptions.item[2].enabled = false;	// language settings
-		_gameOptions.item[2].labelId = 0;
-		_gameOptions.item[3].enabled = false;	// text settings
-		_audioOptions.item[2].labelId = 0;
-		_audioOptions.item[3].enabled = false;	// voice volume settings
-		_audioOptions.item[3].labelId = 0;
-	}
-
 	for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) {
 		_menuButtons[i].data0Val1 = _menuButtons[i].data1Val1 = _menuButtons[i].data2Val1 = 4;
 		_menuButtons[i].data0Callback = _redrawShadedButtonFunctor;
@@ -1467,7 +1458,7 @@
 
 int GUI_v2::quitGame(Button *caller) {
 	updateMenuButton(caller);
-	if (choiceDialog(0xF, 1)) {
+	if (choiceDialog(_vm->gameFlags().isTalkie ? 0xF : 0x17, 1)) {
 		_displayMenu = false;
 		_vm->_runFlag = false;
 		_vm->_sound->beginFadeOut();
@@ -1493,6 +1484,51 @@
 	updateMenuButton(caller);
 	restorePage1(_vm->_screenBuffer);
 	backUpPage1(_vm->_screenBuffer);
+	initMenu(_gameOptions);
+	_isOptionsMenu = true;
+
+	const int menuX = _gameOptions.x;
+	const int menuY = _gameOptions.y;
+
+	for (int i = 0; i < 4; ++i) {
+		int x = menuX + _sliderBarsPosition[i*2+0];
+		int y = menuY + _sliderBarsPosition[i*2+1];
+		_screen->drawShape(0, _vm->_buttonShapes[16], x, y, 0, 0);
+		drawSliderBar(i, _vm->_buttonShapes[17]);
+		_sliderButtons[0][i].buttonCallback = _sliderHandlerFunctor;
+		_sliderButtons[0][i].x = x;
+		_sliderButtons[0][i].y = y;
+		_menuButtonList = addButtonToList(_menuButtonList, &_sliderButtons[0][i]);
+		_sliderButtons[2][i].buttonCallback = _sliderHandlerFunctor;
+		_sliderButtons[2][i].x = x + 10;
+		_sliderButtons[2][i].y = y;
+		_menuButtonList = addButtonToList(_menuButtonList, &_sliderButtons[2][i]);
+		_sliderButtons[1][i].buttonCallback = _sliderHandlerFunctor;
+		_sliderButtons[1][i].x = x + 120;
+		_sliderButtons[1][i].y = y;
+		_menuButtonList = addButtonToList(_menuButtonList, &_sliderButtons[1][i]);
+	}
+
+	while (_isOptionsMenu) {
+		processHighlights(_gameOptions, _vm->_mouseX, _vm->_mouseY);
+		getInput();
+	}
+
+	restorePage1(_vm->_screenBuffer);
+	backUpPage1(_vm->_screenBuffer);
+
+	_vm->writeSettings();
+
+	initMenu(*_currentMenu);
+	updateAllMenuButtons();
+
+	return 0;
+}
+
+int GUI_v2::gameOptionsTalkie(Button *caller) {
+	updateMenuButton(caller);
+	restorePage1(_vm->_screenBuffer);
+	backUpPage1(_vm->_screenBuffer);
 	bool textEnabled = _vm->textEnabled();
 	int lang = _vm->_lang;
 
@@ -1662,21 +1698,33 @@
 
 int GUI_v2::sliderHandler(Button *caller) {
 	int button = 0;
-	if (caller->index >= 25 && caller->index <= 28)
-		button = caller->index - 25;
-	else if (caller->index >= 29 && caller->index <= 32)
-		button = caller->index - 29;
+	if (caller->index >= 24 && caller->index <= 27)
+		button = caller->index - 24;
+	else if (caller->index >= 28 && caller->index <= 31)
+		button = caller->index - 28;
 	else
-		button = caller->index - 33;
+		button = caller->index - 32;
 
-	assert(button >= 0 && button <= 2);
+	assert(button >= 0 && button <= 3);
 
-	int oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button));
+	int oldVolume = 0;
+	
+	if (_vm->gameFlags().isTalkie) {
+		oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button));
+	} else {
+		if (button < 2)
+			oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button));
+		else if (button == 2)
+			oldVolume = (_vm->_configWalkspeed == 3) ? 97 : 2;
+		else if (button == 3)
+			oldVolume = _vm->_configTextspeed;
+	}
+
 	int newVolume = oldVolume;
 
-	if (caller->index >= 25 && caller->index <= 28)
+	if (caller->index >= 24 && caller->index <= 27)
 		newVolume -= 10;
-	else if (caller->index >= 29 && caller->index <= 32)
+	else if (caller->index >= 28 && caller->index <= 31)
 		newVolume += 10;
 	else
 		newVolume = _vm->_mouseX - caller->x - 7;
@@ -1692,30 +1740,45 @@
 
 	drawSliderBar(button, _vm->_buttonShapes[18]);
 
-	if (button == 2) {
-		if (_vm->textEnabled())
-			_vm->_configVoice = 2;
-		else
-			_vm->_configVoice = 1;
-	}
+	if (_vm->gameFlags().isTalkie) {
+		if (button == 2) {
+			if (_vm->textEnabled())
+				_vm->_configVoice = 2;
+			else
+				_vm->_configVoice = 1;
+		}
 
-	_vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume);
+		_vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume);
 
-	switch (button) {
-	case 0:
-		lastMusicCommand = _vm->_lastMusicCommand;
-		break;
+		switch (button) {
+		case 0:
+			lastMusicCommand = _vm->_lastMusicCommand;
+			break;
 
-	case 1:
-		playSoundEffect = true;
-		break;
+		case 1:
+			playSoundEffect = true;
+			break;
 
-	case 2:
-		_vm->playVoice(90, 28);
-		break;
+		case 2:
+			_vm->playVoice(90, 28);
+			break;
 
-	default:
-		return 0;
+		default:
+			return 0;
+		}
+	} else {
+		if (button < 2) {
+			_vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume);
+			if (button == 0)
+				lastMusicCommand = _vm->_lastMusicCommand;
+			else
+				playSoundEffect = true;
+		} else if (button == 2) {
+			_vm->_configWalkspeed = (newVolume > 48) ? 3 : 5;
+			_vm->setWalkspeed(_vm->_configWalkspeed);
+		} else if (button == 3) {
+			_vm->_configTextspeed = newVolume;
+		}
 	}
 	
 	drawSliderBar(button, _vm->_buttonShapes[17]);
@@ -1734,7 +1797,18 @@
 	int x = menuX + _sliderBarsPosition[slider*2+0] + 10;
 	int y = menuY + _sliderBarsPosition[slider*2+1];
 
-	int position = _vm->getVolume(KyraEngine::kVolumeEntry(slider));
+	int position = 0;
+	if (_vm->gameFlags().isTalkie) {
+		position = _vm->getVolume(KyraEngine::kVolumeEntry(slider));
+	} else {
+		if (slider < 2)
+			position = _vm->getVolume(KyraEngine::kVolumeEntry(slider));
+		else if (slider == 2)
+			position = (_vm->_configWalkspeed == 3) ? 97 : 2;
+		else if (slider == 3)
+			position = _vm->_configTextspeed;
+	}
+
 	position = MAX(2, position);
 	position = MIN(97, position);
 	_screen->drawShape(0, shape, x+position, y, 0, 0);
@@ -1908,7 +1982,7 @@
 		restorePage1(_vm->_screenBuffer);
 		backUpPage1(_vm->_screenBuffer);
 		_savegameOffset = 1;
-		_saveMenu.menuNameId = 35;
+		_saveMenu.menuNameId = _vm->gameFlags().isTalkie ? 35 : 1;
 		setupSavegameNames(_saveMenu, 5);
 		initMenu(_saveMenu);
 		_isDeleteMenu = true;
@@ -1925,10 +1999,10 @@
 			backUpPage1(_vm->_screenBuffer);
 			initMenu(*_currentMenu);
 			updateAllMenuButtons();
-			_saveMenu.menuNameId = 9;
+			_saveMenu.menuNameId = _vm->gameFlags().isTalkie ? 9 : 17;
 			return 0;
 		}
-	} while (choiceDialog(0x24, 1) == 0);
+	} while (choiceDialog(_vm->gameFlags().isTalkie ? 0x24 : 2, 1) == 0);
 
 	restorePage1(_vm->_screenBuffer);
 	backUpPage1(_vm->_screenBuffer);
@@ -1948,7 +2022,7 @@
 		Common::String newName = _vm->getSavegameFilename(*i-1);
 		_vm->_saveFileMan->renameSavefile(oldName.c_str(), newName.c_str());
 	}	
-	_saveMenu.menuNameId = 9;
+	_saveMenu.menuNameId = _vm->gameFlags().isTalkie ? 9 : 17;
 	return 0;
 }
 

Modified: scummvm/trunk/engines/kyra/gui_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/gui_v2.h	2008-04-06 15:35:30 UTC (rev 31437)
+++ scummvm/trunk/engines/kyra/gui_v2.h	2008-04-06 16:54:51 UTC (rev 31438)
@@ -130,7 +130,7 @@
 	Button::Callback getScrollUpButtonHandler() const { return _scrollUpFunctor; }
 	Button::Callback getScrollDownButtonHandler() const { return _scrollDownFunctor; }
 
-	Button _sliderButtons[3][3];
+	Button _sliderButtons[3][4];
 
 	uint8 defaultColor1() const { return 0xCF; }
 	uint8 defaultColor2() const { return 0xF8; }
@@ -174,6 +174,7 @@
 
 	// options menu
 	int gameOptions(Button *caller);
+	int gameOptionsTalkie(Button *caller);
 	int quitOptionsMenu(Button *caller);
 
 	int toggleWalkspeed(Button *caller);

Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-04-06 15:35:30 UTC (rev 31437)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp	2008-04-06 16:54:51 UTC (rev 31438)
@@ -124,6 +124,8 @@
 	memset(&_wsaSlots, 0, sizeof(_wsaSlots));
 	memset(&_buttonShapes, 0, sizeof(_buttonShapes));
 
+	_configTextspeed = 50;
+
 	_inventoryButtons = _buttonList = 0;
 
 	_dlgBuffer = 0;
@@ -2257,6 +2259,17 @@
 	ConfMan.registerDefault("walkspeed", 5);
 }
 
+void KyraEngine_v2::writeSettings() {
+	ConfMan.setInt("talkspeed", ((_configTextspeed-2) * 255) / 95);
+	KyraEngine::writeSettings();
+}
+
+void KyraEngine_v2::readSettings() {
+	int talkspeed = ConfMan.getInt("talkspeed");
+	_configTextspeed = (talkspeed*95)/255 + 2;
+	KyraEngine::readSettings();
+}
+
 } // end of namespace Kyra
 
 

Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h	2008-04-06 15:35:30 UTC (rev 31437)
+++ scummvm/trunk/engines/kyra/kyra_v2.h	2008-04-06 16:54:51 UTC (rev 31438)
@@ -313,6 +313,9 @@
 	void cleanup();
 
 	void registerDefaultSettings();
+	void writeSettings();
+	void readSettings();
+	uint8 _configTextspeed;
 
 	// TODO: get rid of all variables having pointers to the static resources if possible
 	// i.e. let them directly use the _staticres functions

Modified: scummvm/trunk/engines/kyra/staticres.cpp
===================================================================
--- scummvm/trunk/engines/kyra/staticres.cpp	2008-04-06 15:35:30 UTC (rev 31437)
+++ scummvm/trunk/engines/kyra/staticres.cpp	2008-04-06 16:54:51 UTC (rev 31438)
@@ -1629,14 +1629,14 @@
 	GUI_V2_BUTTON(_scrollUpButton, 0x17, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
 	GUI_V2_BUTTON(_scrollDownButton, 0x18, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
 
-	for (int i = 0; i < 3; ++i) {
-		GUI_V2_BUTTON(_sliderButtons[0][i], 0x19+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
+	for (int i = 0; i < 4; ++i) {
+		GUI_V2_BUTTON(_sliderButtons[0][i], 0x18+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
 	}
-	for (int i = 0; i < 3; ++i) {
-		GUI_V2_BUTTON(_sliderButtons[1][i], 0x1D+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
+	for (int i = 0; i < 4; ++i) {
+		GUI_V2_BUTTON(_sliderButtons[1][i], 0x1C+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
 	}
-	for (int i = 0; i < 3; ++i) {
-		GUI_V2_BUTTON(_sliderButtons[2][i], 0x21+i, 0, 0, 0, 0, 0, 0x2200, 0, 0, 0, 0x6E, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
+	for (int i = 0; i < 4; ++i) {
+		GUI_V2_BUTTON(_sliderButtons[2][i], 0x20+i, 0, 0, 0, 0, 0, 0x2200, 0, 0, 0, 0x6E, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0);
 	}
 
 	for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) {
@@ -1659,7 +1659,7 @@
 	GUI_V2_MENU_ITEM(_mainMenu.item[2], 1, 0x23, -1, 0x40, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
 	_mainMenu.item[2].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::deleteMenu);
 	GUI_V2_MENU_ITEM(_mainMenu.item[3], 1, 0x04, -1, 0x51, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
-	_mainMenu.item[3].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::gameOptions);
+	_mainMenu.item[3].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::gameOptionsTalkie);
 	GUI_V2_MENU_ITEM(_mainMenu.item[4], 1, 0x25, -1, 0x62, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
 	_mainMenu.item[4].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::audioOptions);
 	GUI_V2_MENU_ITEM(_mainMenu.item[5], 1, 0x05, -1, 0x73, 0xDC, 0x0F, 0xFC, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
@@ -1669,16 +1669,38 @@
 	for (int i = 0; i < 7; ++i)
 		_mainMenu.item[i].itemId = menuStr[0 * 8 + i + 1];
 
+	if (!_vm->gameFlags().isTalkie) {
+		_mainMenu.height = 0x9C;
+		_mainMenu.numberOfItems = 6;
+		_mainMenu.item[6].enabled = false;
+		for (int i = 4; i < 6; ++i)
+			_mainMenu.item[i].callback = _mainMenu.item[i+1].callback;
+		_mainMenu.item[3].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::gameOptions);
+		_mainMenu.item[6].callback = Button::Callback();
+		_mainMenu.item[5].y = 0x7F;
+	}
+
 	GUI_V2_MENU(_gameOptions, -1, -1, 0x120, 0x88, 0xF8, 0xF9, 0xFA, menuStr[1 * 8], 0xFB, -1, 8, 4, 4, -1, -1, -1, -1);
-	GUI_V2_MENU_ITEM(_gameOptions.item[0], 1, 0, 0xA0, 0x1E, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x15, 8, 0x20, 0);
-	_gameOptions.item[0].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::toggleWalkspeed);
-	GUI_V2_MENU_ITEM(_gameOptions.item[1], 1, 0, 0xA0, 0x2F, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x26, 8, 0x31, 0);
-	_gameOptions.item[1].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::changeLanguage);
-	GUI_V2_MENU_ITEM(_gameOptions.item[2], 1, 0, 0xA0, 0x40, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x16, 8, 0x42, 0);
-	_gameOptions.item[2].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::toggleText);
-	GUI_V2_MENU_ITEM(_gameOptions.item[3], 1, 0x10, -1, 0x6E, 0x6C, 0x0F, 0xFD, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
-	_gameOptions.item[3].callback = clickQuitOptionsFunctor;
-	for (int i = 4; i <= 6; ++i)
+	if (_vm->gameFlags().isTalkie) {
+		GUI_V2_MENU_ITEM(_gameOptions.item[0], 1, 0, 0xA0, 0x1E, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x15, 8, 0x20, 0);
+		_gameOptions.item[0].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::toggleWalkspeed);
+		GUI_V2_MENU_ITEM(_gameOptions.item[1], 1, 0, 0xA0, 0x2F, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x26, 8, 0x31, 0);
+		_gameOptions.item[1].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::changeLanguage);
+		GUI_V2_MENU_ITEM(_gameOptions.item[2], 1, 0, 0xA0, 0x40, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x16, 8, 0x42, 0);
+		_gameOptions.item[2].callback = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::toggleText);
+		GUI_V2_MENU_ITEM(_gameOptions.item[3], 1, 0x10, -1, 0x6E, 0x6C, 0x0F, 0xFD, 0xFD, -1, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
+		_gameOptions.item[3].callback = clickQuitOptionsFunctor;
+	} else {
+		_gameOptions.numberOfItems = 5;
+		GUI_V2_MENU_ITEM(_gameOptions.item[0], 0, 0x2B, 0xA0, 0x1E, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x1F, 0x10, 0x20, 0);
+		GUI_V2_MENU_ITEM(_gameOptions.item[1], 0, 0x2C, 0xA0, 0x2F, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x20, 0x10, 0x31, 0);
+		GUI_V2_MENU_ITEM(_gameOptions.item[2], 0, 0x2D, 0xA0, 0x40, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x1D, 0x10, 0x42, 0);
+		GUI_V2_MENU_ITEM(_gameOptions.item[3], 0, 0x2E, 0xA0, 0x51, 0x74, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0x1E, 0x10, 0x53, 0);
+		GUI_V2_MENU_ITEM(_gameOptions.item[4], 1, 0x18, 0xA0, 0x6E, 0x6C, 0x0F, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
+		_gameOptions.item[4].callback = clickQuitOptionsFunctor;
+	}
+
+	for (int i = _gameOptions.numberOfItems; i <= 6; ++i)
 		_gameOptions.item[i].enabled = false;
 	for (int i = 0; i < 7; ++i)
 		_gameOptions.item[i].itemId = menuStr[1 * 8 + i + 1];
@@ -1776,7 +1798,7 @@
 };
 
 const int GUI_v2::_sliderBarsPosition[] = {
-	0x92, 0x1F, 0x92, 0x30, 0x92, 0x41
+	0x92, 0x1F, 0x92, 0x30, 0x92, 0x41, 0x92, 0x52
 };
 
 const uint16 KyraEngine_v2::_itemMagicTable[] = {

Modified: scummvm/trunk/engines/kyra/text_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/text_v2.cpp	2008-04-06 15:35:30 UTC (rev 31437)
+++ scummvm/trunk/engines/kyra/text_v2.cpp	2008-04-06 16:54:51 UTC (rev 31438)
@@ -166,9 +166,6 @@
 int KyraEngine_v2::chatCalcDuration(const char *str) {
 	static const uint8 durationMultiplicator[] = { 16, 14, 12, 10, 8, 8, 7, 6, 5, 4 };
 
-	// TODO / HACK: imlement this correctly
-	const int _configTextspeed = 50;
-
 	int duration = strlen(str);
 	duration *= _flags.isTalkie ? 8 : durationMultiplicator[(_configTextspeed / 10)];
 	return MAX<int>(duration, 120);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list