2015-12-26 12:12:30 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*
|
|
|
|
* MIT License:
|
|
|
|
*
|
|
|
|
* Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, free of charge, to any person
|
|
|
|
* obtaining a copy of this software and associated documentation
|
|
|
|
* files (the "Software"), to deal in the Software without
|
|
|
|
* restriction, including without limitation the rights to use,
|
|
|
|
* copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
* copies of the Software, and to permit persons to whom the
|
|
|
|
* Software is furnished to do so, subject to the following
|
|
|
|
* conditions:
|
|
|
|
*
|
|
|
|
* The above copyright notice and this permission notice shall be
|
|
|
|
* included in all copies or substantial portions of the Software.
|
|
|
|
*
|
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
|
|
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
|
|
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
|
|
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
|
|
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
|
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
|
|
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
|
|
* OTHER DEALINGS IN THE SOFTWARE.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2016-01-03 20:59:57 +00:00
|
|
|
#include "common/timer.h"
|
2016-04-28 09:14:13 +00:00
|
|
|
#include "common/system.h"
|
2016-01-01 00:43:59 +00:00
|
|
|
#include "graphics/cursorman.h"
|
2016-03-23 09:21:36 +00:00
|
|
|
#include "graphics/primitives.h"
|
2016-07-29 09:43:28 +00:00
|
|
|
#include "graphics/macgui/macwindowmanager.h"
|
2016-07-29 09:45:52 +00:00
|
|
|
#include "graphics/macgui/macwindow.h"
|
2016-07-29 09:18:10 +00:00
|
|
|
#include "graphics/macgui/macmenu.h"
|
2016-01-09 00:25:23 +00:00
|
|
|
|
2015-12-26 12:12:30 +00:00
|
|
|
#include "wage/wage.h"
|
2015-12-28 11:38:26 +00:00
|
|
|
#include "wage/design.h"
|
|
|
|
#include "wage/entities.h"
|
2016-04-19 08:37:53 +00:00
|
|
|
#include "wage/gui.h"
|
2016-01-02 01:39:47 +00:00
|
|
|
#include "wage/world.h"
|
2015-12-26 12:12:30 +00:00
|
|
|
|
|
|
|
namespace Wage {
|
|
|
|
|
2016-07-29 09:17:23 +00:00
|
|
|
static const Graphics::MenuData menuSubItems[] = {
|
2016-07-29 09:19:26 +00:00
|
|
|
{ kMenuHighLevel, "File", 0, 0, false },
|
|
|
|
{ kMenuHighLevel, "Edit", 0, 0, false },
|
|
|
|
{ kMenuFile, "New", kMenuActionNew, 0, false },
|
|
|
|
{ kMenuFile, "Open...", kMenuActionOpen, 0, true },
|
|
|
|
{ kMenuFile, "Close", kMenuActionClose, 0, true },
|
|
|
|
{ kMenuFile, "Save", kMenuActionSave, 0, true },
|
|
|
|
{ kMenuFile, "Save as...", kMenuActionSaveAs, 0, true },
|
|
|
|
{ kMenuFile, "Revert", kMenuActionRevert, 0, false },
|
|
|
|
{ kMenuFile, "Quit", kMenuActionQuit, 0, true },
|
|
|
|
|
|
|
|
{ kMenuEdit, "Undo", kMenuActionUndo, 'Z', false },
|
|
|
|
{ kMenuEdit, NULL, 0, 0, false },
|
|
|
|
{ kMenuEdit, "Cut", kMenuActionCut, 'K', false },
|
|
|
|
{ kMenuEdit, "Copy", kMenuActionCopy, 'C', false },
|
|
|
|
{ kMenuEdit, "Paste", kMenuActionPaste, 'V', false },
|
|
|
|
{ kMenuEdit, "Clear", kMenuActionClear, 'B', false },
|
2016-04-28 11:43:06 +00:00
|
|
|
|
|
|
|
{ 0, NULL, 0, 0, false }
|
|
|
|
};
|
|
|
|
|
2016-02-03 22:27:55 +00:00
|
|
|
static void cursorTimerHandler(void *refCon) {
|
2016-07-20 20:09:58 +00:00
|
|
|
Gui *gui = (Gui *)refCon;
|
2016-01-03 20:59:57 +00:00
|
|
|
|
|
|
|
int x = gui->_cursorX;
|
|
|
|
int y = gui->_cursorY;
|
|
|
|
|
|
|
|
if (x == 0 && y == 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (!gui->_screen.getPixels())
|
|
|
|
return;
|
|
|
|
|
2016-04-24 08:47:09 +00:00
|
|
|
x += gui->_consoleWindow->getInnerDimensions().left;
|
|
|
|
y += gui->_consoleWindow->getInnerDimensions().top;
|
2016-01-03 20:59:57 +00:00
|
|
|
|
2016-01-03 23:13:28 +00:00
|
|
|
gui->_screen.vLine(x, y, y + kCursorHeight, gui->_cursorState ? kColorBlack : kColorWhite);
|
2016-01-03 23:09:10 +00:00
|
|
|
|
|
|
|
if (!gui->_cursorOff)
|
|
|
|
gui->_cursorState = !gui->_cursorState;
|
2016-01-03 20:59:57 +00:00
|
|
|
|
2016-02-14 12:37:24 +00:00
|
|
|
gui->_cursorRect.left = x;
|
2016-02-25 10:29:06 +00:00
|
|
|
gui->_cursorRect.right = MIN<uint16>(x + 1, gui->_screen.w);
|
2016-02-14 12:37:24 +00:00
|
|
|
gui->_cursorRect.top = y;
|
2016-02-25 10:29:06 +00:00
|
|
|
gui->_cursorRect.bottom = MIN<uint16>(y + kCursorHeight, gui->_screen.h);
|
2016-02-14 12:37:24 +00:00
|
|
|
|
|
|
|
gui->_cursorDirty = true;
|
2016-01-03 20:59:57 +00:00
|
|
|
}
|
|
|
|
|
2016-07-29 09:44:38 +00:00
|
|
|
static bool sceneWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui);
|
|
|
|
static bool consoleWindowCallback(Graphics::WindowClick click, Common::Event &event, void *gui);
|
2016-04-28 13:25:14 +00:00
|
|
|
static void menuCommandsCallback(int action, Common::String &text, void *data);
|
|
|
|
|
2016-04-19 09:14:48 +00:00
|
|
|
|
2016-01-02 01:39:47 +00:00
|
|
|
Gui::Gui(WageEngine *engine) {
|
|
|
|
_engine = engine;
|
2015-12-28 11:38:26 +00:00
|
|
|
_scene = NULL;
|
|
|
|
_sceneDirty = true;
|
2016-01-02 01:53:30 +00:00
|
|
|
_consoleDirty = true;
|
2016-02-14 12:37:24 +00:00
|
|
|
_cursorDirty = false;
|
2016-01-03 14:31:24 +00:00
|
|
|
_consoleFullRedraw = true;
|
2015-12-28 11:38:26 +00:00
|
|
|
_screen.create(g_system->getWidth(), g_system->getHeight(), Graphics::PixelFormat::createFormatCLUT8());
|
2015-12-29 00:46:39 +00:00
|
|
|
|
2016-04-18 08:36:09 +00:00
|
|
|
_wm.setScreen(&_screen);
|
|
|
|
|
2015-12-31 16:45:36 +00:00
|
|
|
_scrollPos = 0;
|
2016-01-03 14:31:24 +00:00
|
|
|
_consoleLineHeight = 8; // Dummy value which makes sense
|
|
|
|
_consoleNumLines = 24; // Dummy value
|
2015-12-31 16:45:36 +00:00
|
|
|
|
2016-01-03 20:59:57 +00:00
|
|
|
_cursorX = 0;
|
|
|
|
_cursorY = 0;
|
|
|
|
_cursorState = false;
|
2016-01-03 23:09:10 +00:00
|
|
|
_cursorOff = false;
|
2016-01-03 20:59:57 +00:00
|
|
|
|
2016-02-03 10:01:41 +00:00
|
|
|
_inTextSelection = false;
|
2016-02-03 18:02:08 +00:00
|
|
|
_selectionStartX = _selectionStartY = -1;
|
|
|
|
_selectionEndX = _selectionEndY = -1;
|
2016-02-03 10:01:41 +00:00
|
|
|
|
2016-02-08 17:26:16 +00:00
|
|
|
_inputTextLineNum = 0;
|
|
|
|
|
2016-02-03 22:27:55 +00:00
|
|
|
g_system->getTimerManager()->installTimerProc(&cursorTimerHandler, 200000, this, "wageCursor");
|
2016-01-11 10:16:00 +00:00
|
|
|
|
2016-04-28 14:45:07 +00:00
|
|
|
_menu = _wm.addMenu();
|
2016-04-14 16:26:25 +00:00
|
|
|
|
2016-04-28 13:25:14 +00:00
|
|
|
_menu->setCommandsCallback(menuCommandsCallback, this);
|
|
|
|
|
2016-04-28 11:43:06 +00:00
|
|
|
_menu->addStaticMenus(menuSubItems);
|
2016-07-29 09:19:26 +00:00
|
|
|
_menu->addMenuSubItem(kMenuAbout, _engine->_world->getAboutMenuItemName(), kMenuActionAbout);
|
2016-04-28 11:43:06 +00:00
|
|
|
|
|
|
|
_commandsMenuId = _menu->addMenuItem(_engine->_world->_commandsMenuName.c_str());
|
|
|
|
regenCommandsMenu();
|
|
|
|
|
|
|
|
if (!_engine->_world->_weaponMenuDisabled) {
|
|
|
|
_weaponsMenuId = _menu->addMenuItem(_engine->_world->_weaponsMenuName.c_str());
|
|
|
|
|
|
|
|
regenWeaponsMenu();
|
|
|
|
} else {
|
|
|
|
_weaponsMenuId = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
_menu->calcDimensions();
|
|
|
|
|
2016-04-28 10:09:08 +00:00
|
|
|
_sceneWindow = _wm.addWindow(false, false, false);
|
2016-04-19 09:14:48 +00:00
|
|
|
_sceneWindow->setCallback(sceneWindowCallback, this);
|
|
|
|
|
2016-04-28 10:09:08 +00:00
|
|
|
_consoleWindow = _wm.addWindow(true, true, true);
|
2016-04-19 09:14:48 +00:00
|
|
|
_consoleWindow->setCallback(consoleWindowCallback, this);
|
2015-12-26 12:12:30 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Gui::~Gui() {
|
2016-01-06 22:40:41 +00:00
|
|
|
_screen.free();
|
2016-01-07 00:24:42 +00:00
|
|
|
_console.free();
|
2016-02-03 22:27:55 +00:00
|
|
|
g_system->getTimerManager()->removeTimerProc(&cursorTimerHandler);
|
2015-12-26 12:12:30 +00:00
|
|
|
}
|
|
|
|
|
2016-02-12 10:28:42 +00:00
|
|
|
void Gui::undrawCursor() {
|
|
|
|
_cursorOff = true;
|
|
|
|
_cursorState = false;
|
|
|
|
cursorTimerHandler(this);
|
|
|
|
_cursorOff = false;
|
|
|
|
}
|
|
|
|
|
2015-12-28 11:38:26 +00:00
|
|
|
void Gui::draw() {
|
2016-02-16 10:13:08 +00:00
|
|
|
if (_engine->_isGameOver) {
|
2016-04-25 17:47:08 +00:00
|
|
|
_wm.draw();
|
2016-02-16 10:13:08 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2016-04-19 10:51:15 +00:00
|
|
|
if (!_engine->_world->_player->_currentScene)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (_scene != _engine->_world->_player->_currentScene) {
|
2016-04-05 16:18:25 +00:00
|
|
|
_sceneDirty = true;
|
|
|
|
|
2016-04-19 10:51:15 +00:00
|
|
|
_scene = _engine->_world->_player->_currentScene;
|
|
|
|
|
|
|
|
_sceneWindow->setDimensions(*_scene->_designBounds);
|
|
|
|
_sceneWindow->setTitle(_scene->_name);
|
|
|
|
_consoleWindow->setDimensions(*_scene->_textBounds);
|
|
|
|
|
2016-04-18 16:39:45 +00:00
|
|
|
_wm.setFullRefresh(true);
|
2015-12-28 11:38:26 +00:00
|
|
|
}
|
|
|
|
|
2016-04-18 16:39:45 +00:00
|
|
|
drawScene();
|
|
|
|
drawConsole();
|
|
|
|
|
|
|
|
_wm.draw();
|
|
|
|
|
2016-04-25 16:38:24 +00:00
|
|
|
if (_cursorDirty && _cursorRect.left < _screen.w && _cursorRect.bottom < _screen.h) {
|
2016-02-14 12:37:24 +00:00
|
|
|
g_system->copyRectToScreen(_screen.getBasePtr(_cursorRect.left, _cursorRect.top), _screen.pitch,
|
|
|
|
_cursorRect.left, _cursorRect.top, _cursorRect.width(), _cursorRect.height());
|
|
|
|
|
|
|
|
_cursorDirty = false;
|
|
|
|
}
|
|
|
|
|
2016-01-02 01:53:30 +00:00
|
|
|
_sceneDirty = false;
|
|
|
|
_consoleDirty = false;
|
2016-01-03 14:31:24 +00:00
|
|
|
_consoleFullRedraw = false;
|
2015-12-28 11:38:26 +00:00
|
|
|
}
|
|
|
|
|
2016-04-05 07:39:16 +00:00
|
|
|
void Gui::drawScene() {
|
2016-04-21 19:37:31 +00:00
|
|
|
if (!_sceneDirty)
|
2016-04-05 07:56:26 +00:00
|
|
|
return;
|
|
|
|
|
2016-04-19 08:56:42 +00:00
|
|
|
_scene->paint(_sceneWindow->getSurface(), 0, 0);
|
|
|
|
_sceneWindow->setDirty(true);
|
2016-04-15 08:08:33 +00:00
|
|
|
|
2016-04-05 07:39:16 +00:00
|
|
|
_sceneDirty = true;
|
|
|
|
_consoleDirty = true;
|
2016-04-25 17:47:08 +00:00
|
|
|
_menu->setDirty(true);
|
2016-04-05 07:39:16 +00:00
|
|
|
_consoleFullRedraw = true;
|
|
|
|
}
|
|
|
|
|
2016-07-29 09:44:38 +00:00
|
|
|
static bool sceneWindowCallback(Graphics::WindowClick click, Common::Event &event, void *g) {
|
2016-04-19 11:22:39 +00:00
|
|
|
Gui *gui = (Gui *)g;
|
|
|
|
|
2016-04-21 08:44:55 +00:00
|
|
|
return gui->processSceneEvents(click, event);
|
|
|
|
}
|
|
|
|
|
2016-07-29 09:44:38 +00:00
|
|
|
bool Gui::processSceneEvents(Graphics::WindowClick click, Common::Event &event) {
|
|
|
|
if (click == Graphics::kBorderInner && event.type == Common::EVENT_LBUTTONUP) {
|
2016-04-21 08:44:55 +00:00
|
|
|
Designed *obj = _scene->lookUpEntity(event.mouse.x - _sceneWindow->getDimensions().left,
|
|
|
|
event.mouse.y - _sceneWindow->getDimensions().top);
|
2016-04-19 11:22:39 +00:00
|
|
|
|
|
|
|
if (obj != nullptr)
|
2016-04-21 08:44:55 +00:00
|
|
|
_engine->processTurn(NULL, obj);
|
2016-04-19 11:22:39 +00:00
|
|
|
|
2016-04-21 08:44:55 +00:00
|
|
|
return true;
|
2016-04-19 11:22:39 +00:00
|
|
|
}
|
2016-04-21 08:44:55 +00:00
|
|
|
|
|
|
|
return false;
|
2016-04-19 09:14:48 +00:00
|
|
|
}
|
|
|
|
|
2016-04-05 07:39:16 +00:00
|
|
|
// Render console
|
|
|
|
void Gui::drawConsole() {
|
2016-04-21 19:37:31 +00:00
|
|
|
if (!_consoleDirty && !_consoleFullRedraw && !_sceneDirty)
|
2016-04-05 16:18:25 +00:00
|
|
|
return;
|
2016-04-05 07:39:16 +00:00
|
|
|
|
2016-07-29 09:44:38 +00:00
|
|
|
renderConsole(_consoleWindow->getSurface(), Common::Rect(Graphics::kBorderWidth - 2, Graphics::kBorderWidth - 2,
|
2016-04-24 08:47:09 +00:00
|
|
|
_consoleWindow->getDimensions().width(), _consoleWindow->getDimensions().height()));
|
2016-04-19 08:56:42 +00:00
|
|
|
_consoleWindow->setDirty(true);
|
2016-04-05 07:39:16 +00:00
|
|
|
}
|
|
|
|
|
2016-07-29 09:44:38 +00:00
|
|
|
static bool consoleWindowCallback(Graphics::WindowClick click, Common::Event &event, void *g) {
|
2016-04-19 09:14:48 +00:00
|
|
|
Gui *gui = (Gui *)g;
|
|
|
|
|
2016-04-21 08:44:55 +00:00
|
|
|
return gui->processConsoleEvents(click, event);
|
2016-03-23 09:21:36 +00:00
|
|
|
}
|
|
|
|
|
2016-04-28 13:25:14 +00:00
|
|
|
////////////////
|
|
|
|
// Menu stuff
|
|
|
|
////////////////
|
2016-01-29 17:31:19 +00:00
|
|
|
void Gui::regenCommandsMenu() {
|
2016-04-28 11:43:06 +00:00
|
|
|
_menu->createSubMenuFromString(_commandsMenuId, _engine->_world->_commandsMenu.c_str());
|
2016-01-29 17:31:19 +00:00
|
|
|
}
|
|
|
|
|
2016-01-15 10:25:50 +00:00
|
|
|
void Gui::regenWeaponsMenu() {
|
2016-04-28 11:43:06 +00:00
|
|
|
if (_engine->_world->_weaponMenuDisabled)
|
|
|
|
return;
|
|
|
|
|
|
|
|
_menu->clearSubMenu(_weaponsMenuId);
|
|
|
|
|
|
|
|
Chr *player = _engine->_world->_player;
|
|
|
|
ObjArray *weapons = player->getWeapons(true);
|
|
|
|
|
|
|
|
bool empty = true;
|
|
|
|
|
|
|
|
for (uint i = 0; i < weapons->size(); i++) {
|
|
|
|
Obj *obj = (*weapons)[i];
|
|
|
|
if (obj->_type == Obj::REGULAR_WEAPON ||
|
|
|
|
obj->_type == Obj::THROW_WEAPON ||
|
|
|
|
obj->_type == Obj::MAGICAL_OBJECT) {
|
|
|
|
Common::String command(obj->_operativeVerb);
|
|
|
|
command += " ";
|
|
|
|
command += obj->_name;
|
|
|
|
|
2016-07-29 09:19:26 +00:00
|
|
|
_menu->addMenuSubItem(_weaponsMenuId, command.c_str(), kMenuActionCommand, 0, 0, true);
|
2016-04-28 11:43:06 +00:00
|
|
|
|
|
|
|
empty = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
delete weapons;
|
|
|
|
|
|
|
|
if (empty)
|
|
|
|
_menu->addMenuSubItem(_weaponsMenuId, "You have no weapons", 0, 0, 0, false);
|
2016-01-15 10:25:50 +00:00
|
|
|
}
|
|
|
|
|
2016-04-19 08:37:53 +00:00
|
|
|
bool Gui::processEvent(Common::Event &event) {
|
2016-04-25 17:54:26 +00:00
|
|
|
return _wm.processEvent(event);
|
2016-02-03 10:01:41 +00:00
|
|
|
}
|
|
|
|
|
2016-04-28 13:25:14 +00:00
|
|
|
void menuCommandsCallback(int action, Common::String &text, void *data) {
|
|
|
|
Gui *g = (Gui *)data;
|
|
|
|
|
|
|
|
g->executeMenuCommand(action, text);
|
|
|
|
}
|
|
|
|
|
|
|
|
void Gui::executeMenuCommand(int action, Common::String &text) {
|
|
|
|
switch(action) {
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionAbout:
|
|
|
|
case kMenuActionNew:
|
|
|
|
case kMenuActionClose:
|
|
|
|
case kMenuActionRevert:
|
|
|
|
case kMenuActionQuit:
|
2016-07-29 11:48:23 +00:00
|
|
|
break;
|
|
|
|
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionOpen:
|
2016-07-29 11:48:23 +00:00
|
|
|
_engine->scummVMSaveLoadDialog(false);
|
|
|
|
break;
|
|
|
|
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionSave:
|
|
|
|
case kMenuActionSaveAs:
|
2016-07-29 11:48:23 +00:00
|
|
|
_engine->scummVMSaveLoadDialog(true);
|
|
|
|
break;
|
2016-04-28 13:25:14 +00:00
|
|
|
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionUndo:
|
2016-04-28 13:25:14 +00:00
|
|
|
actionUndo();
|
|
|
|
break;
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionCut:
|
2016-04-28 13:25:14 +00:00
|
|
|
actionCut();
|
|
|
|
break;
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionCopy:
|
2016-04-28 13:25:14 +00:00
|
|
|
actionCopy();
|
|
|
|
break;
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionPaste:
|
2016-04-28 13:25:14 +00:00
|
|
|
actionPaste();
|
|
|
|
break;
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionClear:
|
2016-04-28 13:25:14 +00:00
|
|
|
actionClear();
|
|
|
|
break;
|
|
|
|
|
2016-07-29 09:19:26 +00:00
|
|
|
case kMenuActionCommand:
|
2016-04-28 13:25:14 +00:00
|
|
|
_engine->processTurn(&text, NULL);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
warning("Unknown action: %d", action);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-12-26 12:12:30 +00:00
|
|
|
} // End of namespace Wage
|