From 4d22064997b286fdf6eb179c710f2bd0ae539943 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Thu, 5 May 2016 23:33:26 -0400 Subject: TITANIC: Beginnings of script handler --- engines/titanic/module.mk | 2 +- engines/titanic/true_talk/script_handler.cpp | 37 ++++++++++++++++++++ engines/titanic/true_talk/script_handler.h | 47 ++++++++++++++++++++++++++ engines/titanic/true_talk/title_engine.cpp | 4 +-- engines/titanic/true_talk/title_engine.h | 4 +-- engines/titanic/true_talk/title_engine_sub.cpp | 32 ------------------ engines/titanic/true_talk/title_engine_sub.h | 37 -------------------- 7 files changed, 89 insertions(+), 74 deletions(-) create mode 100644 engines/titanic/true_talk/script_handler.cpp create mode 100644 engines/titanic/true_talk/script_handler.h delete mode 100644 engines/titanic/true_talk/title_engine_sub.cpp delete mode 100644 engines/titanic/true_talk/title_engine_sub.h diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 10698cfc3b..df8f0534f4 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -457,7 +457,7 @@ MODULE_OBJS := \ true_talk/parrot_script.o \ true_talk/succubus_script.o \ true_talk/title_engine.o \ - true_talk/title_engine_sub.o \ + true_talk/script_handler.o \ true_talk/true_talk_manager.o \ true_talk/tt_script_base.o \ true_talk/tt_room_script.o \ diff --git a/engines/titanic/true_talk/script_handler.cpp b/engines/titanic/true_talk/script_handler.cpp new file mode 100644 index 0000000000..de101214bf --- /dev/null +++ b/engines/titanic/true_talk/script_handler.cpp @@ -0,0 +1,37 @@ +/* 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. + * + */ + +#include "titanic/true_talk/script_handler.h" + +namespace Titanic { + +/*------------------------------------------------------------------------*/ + +CScriptHandler::CScriptHandler(CTitleEngine *owner, int val1, int val2) { +} + +void CScriptHandler::setup(TTNamedScript *npcScript, TTRoomScript *roomScript, uint charId) { + +} + + +} // End of namespace Titanic diff --git a/engines/titanic/true_talk/script_handler.h b/engines/titanic/true_talk/script_handler.h new file mode 100644 index 0000000000..69c1c9486a --- /dev/null +++ b/engines/titanic/true_talk/script_handler.h @@ -0,0 +1,47 @@ +/* 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. + * + */ + +#ifndef TITANIC_SCRIPT_HANDLER_H +#define TITANIC_SCRIPT_HANDLER_H + +#include "titanic/true_talk/tt_named_script.h" +#include "titanic/true_talk/tt_room_script.h" + +namespace Titanic { + +class CTitleEngine; + +class CScriptHandler { +private: + CTitleEngine *_owner; +public: + CScriptHandler(CTitleEngine *owner, int val1, int val2); + + /** + * Set the character and room + */ + void setup(TTNamedScript *npcScript, TTRoomScript *roomScript, uint charId); +}; + +} // End of namespace Titanic + +#endif /* TITANIC_SCRIPT_HANDLER_H */ diff --git a/engines/titanic/true_talk/title_engine.cpp b/engines/titanic/true_talk/title_engine.cpp index adc74feff8..d5015b430c 100644 --- a/engines/titanic/true_talk/title_engine.cpp +++ b/engines/titanic/true_talk/title_engine.cpp @@ -24,12 +24,12 @@ namespace Titanic { -CTitleEngine::CTitleEngine() : _script(nullptr), _sub(nullptr) { +CTitleEngine::CTitleEngine() : _script(nullptr), _handler(nullptr) { } CTitleEngine::~CTitleEngine() { delete _script; - delete _sub; + delete _handler; } void CTitleEngine::setup(int val1, int val2) { diff --git a/engines/titanic/true_talk/title_engine.h b/engines/titanic/true_talk/title_engine.h index 71b0947012..8d32067616 100644 --- a/engines/titanic/true_talk/title_engine.h +++ b/engines/titanic/true_talk/title_engine.h @@ -26,14 +26,14 @@ #include "common/stream.h" #include "common/winexe_pe.h" #include "titanic/support/string.h" -#include "titanic/true_talk/title_engine_sub.h" +#include "titanic/true_talk/script_handler.h" #include "titanic/true_talk/tt_script_base.h" namespace Titanic { class CTitleEngine { protected: - CTitleEngineSub *_sub; + CScriptHandler *_handler; TTScriptBase *_script; public: CTitleEngine(); diff --git a/engines/titanic/true_talk/title_engine_sub.cpp b/engines/titanic/true_talk/title_engine_sub.cpp deleted file mode 100644 index f7e1f28d1d..0000000000 --- a/engines/titanic/true_talk/title_engine_sub.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* 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. - * - */ - -#include "titanic/true_talk/title_engine_sub.h" - -namespace Titanic { - -/*------------------------------------------------------------------------*/ - -CTitleEngineSub::CTitleEngineSub(CTitleEngine *owner, int val1, int val2) { -} - -} // End of namespace Titanic diff --git a/engines/titanic/true_talk/title_engine_sub.h b/engines/titanic/true_talk/title_engine_sub.h deleted file mode 100644 index 050f041bf2..0000000000 --- a/engines/titanic/true_talk/title_engine_sub.h +++ /dev/null @@ -1,37 +0,0 @@ -/* 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. - * - */ - -#ifndef TITANIC_TITLE_ENGINE_SUB_H -#define TITANIC_TITLE_ENGINE_SUB_H - -namespace Titanic { - -class CTitleEngine; - -class CTitleEngineSub { -public: - CTitleEngineSub(CTitleEngine *owner, int val1, int val2); -}; - -} // End of namespace Titanic - -#endif /* TITANIC_TITLE_ENGINE_SUB_H */ -- cgit v1.2.3