From f05afb9bff48e35952971998f64b6a42ba5bbd70 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 23 Nov 2013 10:26:29 +0100 Subject: TONY: Janitorial - Fix spacing errors --- engines/tony/mpal/mpal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 7010c238b5..5f2452dcfe 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -1935,7 +1935,7 @@ bool mpalExecuteScript(int nScript) { // !!! New process management if (CoroScheduler.createProcess(ScriptThread, &s, sizeof(LpMpalScript)) == CORO_INVALID_PID_VALUE) - return false; + return false; return true; } -- cgit v1.2.3 From aa947c9474ad83aa9315bc585d1f0b79060fee61 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:33 +0100 Subject: BUILD: Split configure.engines down to a single file per engine. This is the first part of allowing engines to be added dynamically. They are placed into a folder in engines/ which must contain a file named "configure.engine" to add the engine, which is pulled into the top level configure script automatically. --- engines/tony/configure.engine | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 engines/tony/configure.engine (limited to 'engines/tony') diff --git a/engines/tony/configure.engine b/engines/tony/configure.engine new file mode 100644 index 0000000000..f85f45d158 --- /dev/null +++ b/engines/tony/configure.engine @@ -0,0 +1,3 @@ +# This file is included from the main "configure" script +# add_engine [name] [desc] [build-by-default] [subengines] [base games] [deps] +add_engine tony "Tony Tough and the Night of Roasted Moths" yes "" "" "16bit" -- cgit v1.2.3 From d77cf95a185a6c8f201f417d08f246727784f728 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Split engines.mk down to a single file per engine. This is the second part of allowing engines to be added dynamically. Each folder in engines/ which must contain a file named "engine.mk" containing the make definitions for that engine. --- engines/tony/engine.mk | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 engines/tony/engine.mk (limited to 'engines/tony') diff --git a/engines/tony/engine.mk b/engines/tony/engine.mk new file mode 100644 index 0000000000..605f2e6cd2 --- /dev/null +++ b/engines/tony/engine.mk @@ -0,0 +1,4 @@ +ifdef ENABLE_TONY +DEFINES += -DENABLE_TONY=$(ENABLE_TONY) +MODULES += engines/tony +endif -- cgit v1.2.3 From 00c27a28f91cc2bbf512461e69c86be998462728 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Split engines/plugins_table header down to a file per engine. This is the third and final commit enabling fully pluggable engines. Now providing an engine folder contains a configure.engine, engine.mk and engine-plugin.h file, it will be picked up automatically by the configure script. --- engines/tony/engine-plugin.h | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 engines/tony/engine-plugin.h (limited to 'engines/tony') diff --git a/engines/tony/engine-plugin.h b/engines/tony/engine-plugin.h new file mode 100644 index 0000000000..68bd31b7d9 --- /dev/null +++ b/engines/tony/engine-plugin.h @@ -0,0 +1,3 @@ +#if PLUGIN_ENABLED_STATIC(TONY) +LINK_PLUGIN(TONY) +#endif -- cgit v1.2.3 From 1ac01d2333af11d403ef84dd5192abb18814e5b3 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Remove need for engine-plugin.h in engines. This is now generated automatically by the configure script from the engine directory names. --- engines/tony/engine-plugin.h | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 engines/tony/engine-plugin.h (limited to 'engines/tony') diff --git a/engines/tony/engine-plugin.h b/engines/tony/engine-plugin.h deleted file mode 100644 index 68bd31b7d9..0000000000 --- a/engines/tony/engine-plugin.h +++ /dev/null @@ -1,3 +0,0 @@ -#if PLUGIN_ENABLED_STATIC(TONY) -LINK_PLUGIN(TONY) -#endif -- cgit v1.2.3 From ef85456859e466adc8913041e4f31809485c45ab Mon Sep 17 00:00:00 2001 From: D G Turner Date: Thu, 7 Nov 2013 12:58:34 +0100 Subject: BUILD: Remove need for engine.mk in each engine directory. Each engine now only has to provide a single configure.engine file adding the engine into the configure script, which then produces the required other files automatically. --- engines/tony/engine.mk | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 engines/tony/engine.mk (limited to 'engines/tony') diff --git a/engines/tony/engine.mk b/engines/tony/engine.mk deleted file mode 100644 index 605f2e6cd2..0000000000 --- a/engines/tony/engine.mk +++ /dev/null @@ -1,4 +0,0 @@ -ifdef ENABLE_TONY -DEFINES += -DENABLE_TONY=$(ENABLE_TONY) -MODULES += engines/tony -endif -- cgit v1.2.3 From 53c3bff277a97df73a6933a1074ffe6241a4a5ce Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sat, 7 Dec 2013 02:32:29 +0000 Subject: TONY: Add missing getDebugger() for engine API. --- engines/tony/tony.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/tony') diff --git a/engines/tony/tony.h b/engines/tony/tony.h index 750673061d..cdc7d7e20a 100644 --- a/engines/tony/tony.h +++ b/engines/tony/tony.h @@ -31,6 +31,7 @@ #include "common/random.h" #include "common/util.h" #include "engines/engine.h" +#include "gui/debugger.h" #include "tony/mpal/mpal.h" #include "tony/mpal/memory.h" @@ -108,6 +109,7 @@ public: Common::List _activeSfx; Globals _globals; Debugger *_debugger; + GUI::Debugger *getDebugger() { return _debugger; } int16 _cTableDialog[256]; int16 _lTableDialog[256]; -- cgit v1.2.3 From 408f1b3aa3dde0c5d72bc8be180d3ef1675f9705 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Tue, 17 Dec 2013 07:43:58 +0100 Subject: TONY: Add a reset function in RMWindow in order to group variable initialization --- engines/tony/window.cpp | 12 +++++++++++- engines/tony/window.h | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp index a732862854..02991975ce 100644 --- a/engines/tony/window.cpp +++ b/engines/tony/window.cpp @@ -40,7 +40,7 @@ namespace Tony { \****************************************************************************/ RMWindow::RMWindow() { - _showDirtyRects = false; + reset(); } RMWindow::~RMWindow() { @@ -55,11 +55,21 @@ RMWindow::~RMWindow() { void RMWindow::init() { Graphics::PixelFormat pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0); initGraphics(RM_SX, RM_SY, true, &pixelFormat); + + reset(); +} +/** + * Reset the variables + */ +void RMWindow::reset() { + _showDirtyRects = false; _bGrabScreenshot = false; _bGrabThumbnail = false; _bGrabMovie = false; _wiping = false; + + _wThumbBuf = nullptr; } void RMWindow::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { diff --git a/engines/tony/window.h b/engines/tony/window.h index 3874652f64..2cc9bfd37c 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -72,6 +72,7 @@ public: * Initialization */ void init(); + void reset(); void close(); /** -- cgit v1.2.3 From ac4087856f02725c288e1cef6b089acf7a6121aa Mon Sep 17 00:00:00 2001 From: D G Turner Date: Sun, 15 Dec 2013 08:17:57 +0000 Subject: ALL: Remove optimization unstable code on checking for null after new. These issues were identified by the STACK tool. By default, the C++ new operator will throw an exception on allocation failure, rather than returning a null pointer. The result is that testing the returned pointer for null is redundant and _may_ be removed by the compiler. This is thus optimization unstable and may result in incorrect behaviour at runtime. However, we do not use exceptions as they are not supported by all compilers and may be disabled. To make this stable without removing the null check, you could qualify the new operator call with std::nothrow to indicate that this should return a null, rather than throwing an exception. However, using (std::nothrow) was not desirable due to the Symbian toolchain lacking a header. A global solution to this was also not easy by redefining "new" as "new (std::nothrow)" due to custom constructors in NDS toolchain and various common classes. Also, this would then need explicit checks for OOM adding to all new usages as per C malloc which is untidy. For now to remove this optimisation unstable code is best as it is likely to not be present anyway, and OOM will cause a system library exception instead, even without exceptions enabled in the application code. --- engines/tony/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp index 547f31906e..74d32c7c0f 100644 --- a/engines/tony/sound.cpp +++ b/engines/tony/sound.cpp @@ -88,7 +88,7 @@ FPSound::~FPSound() { bool FPSound::createStream(FPStream **streamPtr) { (*streamPtr) = new FPStream(_soundSupported); - return (*streamPtr != NULL); + return true; } /** -- cgit v1.2.3 From 9afeafd3fd1b3151c32afd6da2b5f36d3ae9a5a0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 16 Jan 2014 22:58:38 +0100 Subject: TONY: Cleanup (don't compare pointer with false). --- engines/tony/mpal/mpal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 5f2452dcfe..19e3d43df4 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -963,7 +963,7 @@ void LocationPollThread(CORO_PARAM, const void *param) { // Ok, we can perform the action. For convenience, we do it in a new process _ctx->newItem = (LpMpalItem)globalAlloc(GMEM_FIXED | GMEM_ZEROINIT, sizeof(MpalItem)); - if (_ctx->newItem == false) { + if (!_ctx->newItem) { globalDestroy(_ctx->myThreads); globalDestroy(_ctx->myActions); -- cgit v1.2.3 From 88469ba578755b36f2d488816aa808a75b01e8b3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 17 Feb 2014 23:02:58 +0100 Subject: TONY: Indent REGISTER_PLUGIN_* for consistency. --- engines/tony/detection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp index d355450153..0ae397a63f 100644 --- a/engines/tony/detection.cpp +++ b/engines/tony/detection.cpp @@ -178,7 +178,7 @@ SaveStateDescriptor TonyMetaEngine::querySaveMetaInfos(const char *target, int s } #if PLUGIN_ENABLED_DYNAMIC(TONY) -REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine); + REGISTER_PLUGIN_DYNAMIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine); #else -REGISTER_PLUGIN_STATIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine); + REGISTER_PLUGIN_STATIC(TONY, PLUGIN_TYPE_ENGINE, TonyMetaEngine); #endif -- cgit v1.2.3 From b9bfa3a85704c705e7b628a28d9e34a32e210ceb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 18 Feb 2014 02:34:26 +0100 Subject: TONY: Make GPL headers consistent in themselves. --- engines/tony/custom.cpp | 5 ++--- engines/tony/custom.h | 4 ++-- engines/tony/debugger.cpp | 6 +++--- engines/tony/debugger.h | 6 +++--- engines/tony/detection.cpp | 5 ++--- engines/tony/detection_tables.h | 4 ++-- engines/tony/font.cpp | 4 ++-- engines/tony/font.h | 4 ++-- engines/tony/game.cpp | 4 ++-- engines/tony/game.h | 4 ++-- engines/tony/gfxcore.cpp | 4 ++-- engines/tony/gfxcore.h | 4 ++-- engines/tony/gfxengine.cpp | 4 ++-- engines/tony/gfxengine.h | 4 ++-- engines/tony/globals.cpp | 4 ++-- engines/tony/globals.h | 4 ++-- engines/tony/input.cpp | 4 ++-- engines/tony/input.h | 4 ++-- engines/tony/inventory.cpp | 4 ++-- engines/tony/inventory.h | 4 ++-- engines/tony/loc.cpp | 4 ++-- engines/tony/loc.h | 4 ++-- engines/tony/mpal/expr.cpp | 5 ++--- engines/tony/mpal/expr.h | 5 ++--- engines/tony/mpal/loadmpc.cpp | 5 ++--- engines/tony/mpal/loadmpc.h | 5 ++--- engines/tony/mpal/lzo.cpp | 5 ++--- engines/tony/mpal/lzo.h | 5 ++--- engines/tony/mpal/memory.cpp | 5 ++--- engines/tony/mpal/memory.h | 5 ++--- engines/tony/mpal/mpal.cpp | 5 ++--- engines/tony/mpal/mpal.h | 5 ++--- engines/tony/mpal/mpaldll.h | 5 ++--- engines/tony/mpal/mpalutils.cpp | 5 ++--- engines/tony/mpal/mpalutils.h | 5 ++--- engines/tony/resid.h | 4 ++-- engines/tony/sound.cpp | 4 ++-- engines/tony/sound.h | 4 ++-- engines/tony/tony.cpp | 4 ++-- engines/tony/tony.h | 4 ++-- engines/tony/tonychar.cpp | 4 ++-- engines/tony/tonychar.h | 4 ++-- engines/tony/utils.cpp | 4 ++-- engines/tony/utils.h | 4 ++-- engines/tony/window.cpp | 4 ++-- engines/tony/window.h | 4 ++-- 46 files changed, 94 insertions(+), 109 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp index f5c580c8c5..989702cd3c 100644 --- a/engines/tony/custom.cpp +++ b/engines/tony/custom.cpp @@ -8,17 +8,16 @@ * 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. * - * */ /* diff --git a/engines/tony/custom.h b/engines/tony/custom.h index 0f1061e8cd..9ba10be28a 100644 --- a/engines/tony/custom.h +++ b/engines/tony/custom.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp index 84f05b0d25..22c218a19c 100644 --- a/engines/tony/debugger.cpp +++ b/engines/tony/debugger.cpp @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tony/debugger.h b/engines/tony/debugger.h index 85ba9d75b6..1db1b460fc 100644 --- a/engines/tony/debugger.h +++ b/engines/tony/debugger.h @@ -8,12 +8,12 @@ * 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 + * 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. diff --git a/engines/tony/detection.cpp b/engines/tony/detection.cpp index 0ae397a63f..9bb768d1ed 100644 --- a/engines/tony/detection.cpp +++ b/engines/tony/detection.cpp @@ -8,17 +8,16 @@ * 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 "base/plugins.h" diff --git a/engines/tony/detection_tables.h b/engines/tony/detection_tables.h index ca16495903..ce4651f0ab 100644 --- a/engines/tony/detection_tables.h +++ b/engines/tony/detection_tables.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp index 1729052d42..850aff17be 100644 --- a/engines/tony/font.cpp +++ b/engines/tony/font.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/font.h b/engines/tony/font.h index 9ef50b99ec..6e76c42750 100644 --- a/engines/tony/font.h +++ b/engines/tony/font.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index ca7c07ad8c..986eac99aa 100644 --- a/engines/tony/game.cpp +++ b/engines/tony/game.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/game.h b/engines/tony/game.h index fdf62a2a5d..d03a975b6f 100644 --- a/engines/tony/game.h +++ b/engines/tony/game.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp index 3433ad3024..3afad9b373 100644 --- a/engines/tony/gfxcore.cpp +++ b/engines/tony/gfxcore.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h index 9e8f5225c0..ff6c6b3dca 100644 --- a/engines/tony/gfxcore.h +++ b/engines/tony/gfxcore.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp index 7bb25f59b9..92469b7276 100644 --- a/engines/tony/gfxengine.cpp +++ b/engines/tony/gfxengine.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/gfxengine.h b/engines/tony/gfxengine.h index ab32a01972..927593a5d3 100644 --- a/engines/tony/gfxengine.h +++ b/engines/tony/gfxengine.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/globals.cpp b/engines/tony/globals.cpp index 8e4ae240a0..ca2b6e72dc 100644 --- a/engines/tony/globals.cpp +++ b/engines/tony/globals.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/globals.h b/engines/tony/globals.h index 0ff243b374..1cff57fd16 100644 --- a/engines/tony/globals.h +++ b/engines/tony/globals.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/input.cpp b/engines/tony/input.cpp index e84da04d97..787fb21f21 100644 --- a/engines/tony/input.cpp +++ b/engines/tony/input.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/input.h b/engines/tony/input.h index 274aa8c491..31acb68eb6 100644 --- a/engines/tony/input.h +++ b/engines/tony/input.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp index 6b023d5990..1ffc0a4cf4 100644 --- a/engines/tony/inventory.cpp +++ b/engines/tony/inventory.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h index 1d660d51cd..9b460f390d 100644 --- a/engines/tony/inventory.h +++ b/engines/tony/inventory.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp index 5beac842f9..dac6390372 100644 --- a/engines/tony/loc.cpp +++ b/engines/tony/loc.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/loc.h b/engines/tony/loc.h index 1306316136..c570913d3c 100644 --- a/engines/tony/loc.h +++ b/engines/tony/loc.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/mpal/expr.cpp b/engines/tony/mpal/expr.cpp index 7dc640ba7c..1fdf637062 100644 --- a/engines/tony/mpal/expr.cpp +++ b/engines/tony/mpal/expr.cpp @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/expr.h b/engines/tony/mpal/expr.h index 256d09bb9b..6ac1963356 100644 --- a/engines/tony/mpal/expr.h +++ b/engines/tony/mpal/expr.h @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp index 4eb84d1406..8f63b07ca0 100644 --- a/engines/tony/mpal/loadmpc.cpp +++ b/engines/tony/mpal/loadmpc.cpp @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/loadmpc.h b/engines/tony/mpal/loadmpc.h index 20956288aa..479cf5f99b 100644 --- a/engines/tony/mpal/loadmpc.h +++ b/engines/tony/mpal/loadmpc.h @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp index a04a769528..d95efd0393 100644 --- a/engines/tony/mpal/lzo.cpp +++ b/engines/tony/mpal/lzo.cpp @@ -8,17 +8,16 @@ * 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. * - * */ /* minilzo.c -- mini subset of the LZO real-time data compression library diff --git a/engines/tony/mpal/lzo.h b/engines/tony/mpal/lzo.h index ebb1c4b516..4384e3fb33 100644 --- a/engines/tony/mpal/lzo.h +++ b/engines/tony/mpal/lzo.h @@ -8,17 +8,16 @@ * 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. * - * */ /* minilzo.c -- mini subset of the LZO real-time data compression library diff --git a/engines/tony/mpal/memory.cpp b/engines/tony/mpal/memory.cpp index 9737fe0abf..4076f710de 100644 --- a/engines/tony/mpal/memory.cpp +++ b/engines/tony/mpal/memory.cpp @@ -8,17 +8,16 @@ * 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 "common/algorithm.h" diff --git a/engines/tony/mpal/memory.h b/engines/tony/mpal/memory.h index 9c21cc20e6..7739fdfa48 100644 --- a/engines/tony/mpal/memory.h +++ b/engines/tony/mpal/memory.h @@ -8,17 +8,16 @@ * 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 TONY_MPAL_MEMORY diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 19e3d43df4..797c7dbae0 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h index 2d22ee8faf..e88fd36e2f 100644 --- a/engines/tony/mpal/mpal.h +++ b/engines/tony/mpal/mpal.h @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/mpaldll.h b/engines/tony/mpal/mpaldll.h index 92ddf8fc5a..68969497c1 100644 --- a/engines/tony/mpal/mpaldll.h +++ b/engines/tony/mpal/mpaldll.h @@ -8,17 +8,16 @@ * 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. * - * */ /* * This code is based on original Tony Tough source code diff --git a/engines/tony/mpal/mpalutils.cpp b/engines/tony/mpal/mpalutils.cpp index 0919aed5ac..84c8a68919 100644 --- a/engines/tony/mpal/mpalutils.cpp +++ b/engines/tony/mpal/mpalutils.cpp @@ -8,17 +8,16 @@ * 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 "tony/mpal/mpalutils.h" diff --git a/engines/tony/mpal/mpalutils.h b/engines/tony/mpal/mpalutils.h index f351f22196..9ef534c632 100644 --- a/engines/tony/mpal/mpalutils.h +++ b/engines/tony/mpal/mpalutils.h @@ -8,17 +8,16 @@ * 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 TONY_MPAL_MPALUTILS diff --git a/engines/tony/resid.h b/engines/tony/resid.h index 0d601b7dd6..93c008144a 100644 --- a/engines/tony/resid.h +++ b/engines/tony/resid.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/sound.cpp b/engines/tony/sound.cpp index 74d32c7c0f..2a4eb826f3 100644 --- a/engines/tony/sound.cpp +++ b/engines/tony/sound.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/sound.h b/engines/tony/sound.h index 7422de02b3..446dc68d80 100644 --- a/engines/tony/sound.h +++ b/engines/tony/sound.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp index 43a2f639d9..2857bb93f8 100644 --- a/engines/tony/tony.cpp +++ b/engines/tony/tony.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/tony.h b/engines/tony/tony.h index cdc7d7e20a..40a5184c31 100644 --- a/engines/tony/tony.h +++ b/engines/tony/tony.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp index 46c018728e..224d923142 100644 --- a/engines/tony/tonychar.cpp +++ b/engines/tony/tonychar.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/tonychar.h b/engines/tony/tonychar.h index d9f18f61ec..5c5be9ca4e 100644 --- a/engines/tony/tonychar.h +++ b/engines/tony/tonychar.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/utils.cpp b/engines/tony/utils.cpp index 81060146b7..d70073542f 100644 --- a/engines/tony/utils.cpp +++ b/engines/tony/utils.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/utils.h b/engines/tony/utils.h index 9f13e5f19b..eb2f3c74d3 100644 --- a/engines/tony/utils.h +++ b/engines/tony/utils.h @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp index 02991975ce..5c50a50a57 100644 --- a/engines/tony/window.cpp +++ b/engines/tony/window.cpp @@ -8,12 +8,12 @@ * 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. diff --git a/engines/tony/window.h b/engines/tony/window.h index 2cc9bfd37c..df1932071c 100644 --- a/engines/tony/window.h +++ b/engines/tony/window.h @@ -8,12 +8,12 @@ * 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. -- cgit v1.2.3 From d35f470bf6290eb9ab5a86321b223ae3f1cb48fa Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 28 Feb 2014 22:20:38 +0100 Subject: TONY: Reduce the scope of some variables, change the return type of findPath() --- engines/tony/loc.cpp | 13 ++++++------- engines/tony/loc.h | 2 +- engines/tony/mpal/mpal.cpp | 3 +-- 3 files changed, 8 insertions(+), 10 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp index dac6390372..09a00deed1 100644 --- a/engines/tony/loc.cpp +++ b/engines/tony/loc.cpp @@ -892,12 +892,12 @@ void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) { /* Returns path along the vector path path[] */ /****************************************************************************/ -short RMCharacter::findPath(short source, short destination) { +bool RMCharacter::findPath(short source, short destination) { static RMBox box[MAXBOXES]; // Matrix of adjacent boxes static short nodeCost[MAXBOXES]; // Cost per node static short valid[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated static short nextNode[MAXBOXES]; // Next node - short minCost, error = 0; + bool error = false; RMBoxLoc *cur; g_system->lockMutex(_csMove); @@ -925,13 +925,13 @@ short RMCharacter::findPath(short source, short destination) { // Find the shortest path while (!finish) { - minCost = 32000; // Reset the minimum cost - error = 1; // Possible error + short minCost = 32000; // Reset the minimum cost + error = true; // Possible error // 1st cycle: explore possible new nodes for (int i = 0; i < cur->_numbBox; i++) { if (valid[i] == 1) { - error = 0; // Failure de-bunked + error = false; // Failure de-bunked int j = 0; while (((box[i]._adj[j]) != 1) && (j < cur->_numbBox)) j++; @@ -1851,10 +1851,9 @@ void RMGameBoxes::loadState(byte *state) { assert(nloc <= _nLocBoxes); - int nbox; // For each location, read the number of boxes and their status for (int i = 1; i <= nloc; i++) { - nbox = READ_LE_UINT32(state); + int nbox = READ_LE_UINT32(state); state += 4; for (int j = 0; j < nbox ; j++) { diff --git a/engines/tony/loc.h b/engines/tony/loc.h index c570913d3c..ac65a4a0bd 100644 --- a/engines/tony/loc.h +++ b/engines/tony/loc.h @@ -395,7 +395,7 @@ private: private: int inWhichBox(const RMPoint &pt); - short findPath(short source, short destination); + bool findPath(short source, short destination); RMPoint searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint point); RMPoint nearestPoint(const RMPoint &punto); diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 797c7dbae0..3084fd89af 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -1524,7 +1524,6 @@ void mpalFree() { uint32 mpalQueryDWORD(uint16 wQueryType, ...) { Common::String buf; uint32 dwRet = 0; - char *n; va_list v; va_start(v, wQueryType); @@ -1625,7 +1624,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { */ lockVar(); int x = GETARG(uint32); - n = GETARG(char *); + char *n = GETARG(char *); buf = Common::String::format("Status.%u", x); if (varGetValue(buf.c_str()) <= 0) n[0]='\0'; -- cgit v1.2.3 From f358ec74f7ac4575e5450fd468a46aba2190da91 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 28 Feb 2014 22:47:36 +0100 Subject: TONY: Reduce the scope of some more variables --- engines/tony/inventory.cpp | 7 +++---- engines/tony/mpal/loadmpc.cpp | 4 +--- engines/tony/mpal/mpal.cpp | 6 +----- 3 files changed, 5 insertions(+), 12 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp index 1ffc0a4cf4..974be8b04d 100644 --- a/engines/tony/inventory.cpp +++ b/engines/tony/inventory.cpp @@ -457,8 +457,6 @@ bool RMInventory::rightRelease(const RMPoint &mpos, RMTonyAction &curAction) { #define INVSPEED 20 void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpos, bool bCanOpen) { - bool bNeedRedraw = false; - if (_state != CLOSED) { // Clean up the OT list g_system->lockMutex(_csModifyInterface); @@ -466,6 +464,8 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo // DoFrame makes all the objects currently in the inventory be displayed // @@@ Maybe we should do all takeable objects? Please does not help + bool bNeedRedraw = false; + for (int i = 0; i < _nInv; i++) { if (_items[_inv[i]]._icon.doFrame(this, false) && (i >= _curPos && i <= _curPos + 7)) bNeedRedraw = true; @@ -698,9 +698,8 @@ int RMInventory::loadState(byte *state) { state += 4; } - int x; for (int i = 0; i < 256; i++) { - x = READ_LE_UINT32(state); + int x = READ_LE_UINT32(state); state += 4; if (i < _nItems) { diff --git a/engines/tony/mpal/loadmpc.cpp b/engines/tony/mpal/loadmpc.cpp index 8f63b07ca0..8d030f1e52 100644 --- a/engines/tony/mpal/loadmpc.cpp +++ b/engines/tony/mpal/loadmpc.cpp @@ -138,8 +138,6 @@ static void FreeScript(LpMpalScript lpmsScript) { * @returns Pointer to the buffer after the item, or NULL on failure. */ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) { - byte *lpLock; - lpmdDialog->_nObj = READ_LE_UINT32(lpBuf); lpBuf += 4; @@ -155,7 +153,7 @@ static const byte *parseDialog(const byte *lpBuf, LpMpalDialog lpmdDialog) { lpmdDialog->_periodNums[i] = READ_LE_UINT16(lpBuf); lpBuf += 2; lpmdDialog->_periods[i] = globalAllocate(GMEM_MOVEABLE | GMEM_ZEROINIT, *lpBuf + 1); - lpLock = (byte *)globalLock(lpmdDialog->_periods[i]); + byte *lpLock = (byte *)globalLock(lpmdDialog->_periods[i]); Common::copy(lpBuf + 1, lpBuf + 1 + *lpBuf, lpLock); globalUnlock(lpmdDialog->_periods[i]); lpBuf += (*lpBuf) + 1; diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 3084fd89af..305f89765b 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -1718,7 +1718,6 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { * method that returns a pointer or handle. */ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { - char *n; Common::String buf; va_list v; va_start(v, wQueryType); @@ -1796,12 +1795,9 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { error("mpalQuery(MPQ_ITEM_IS_ACTIVE, uint32 nItem) used incorrect variant"); } else if (wQueryType == MPQ_ITEM_NAME) { - /* - * uint32 mpalQuery(MPQ_ITEM_NAME, uint32 nItem, char *lpszName); - */ lockVar(); int x = GETARG(uint32); - n = GETARG(char *); + char *n = GETARG(char *); buf = Common::String::format("Status.%u", x); if (varGetValue(buf.c_str()) <= 0) n[0] = '\0'; -- cgit v1.2.3 From 81d733aec0c4422fa8c0b34b0c7f4d5b74c991c0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 28 Feb 2014 22:49:05 +0100 Subject: TONY: Fix some British comments --- engines/tony/mpal/mpal.cpp | 6 +++--- engines/tony/mpal/mpal.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/mpal.cpp b/engines/tony/mpal/mpal.cpp index 305f89765b..c813b354b0 100644 --- a/engines/tony/mpal/mpal.cpp +++ b/engines/tony/mpal/mpal.cpp @@ -1518,7 +1518,7 @@ void mpalFree() { * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that returns numeric results. */ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { @@ -1714,7 +1714,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...) { * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that returns a pointer or handle. */ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { @@ -1867,7 +1867,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...) { * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that needs to run within a co-routine context. */ void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet) { diff --git a/engines/tony/mpal/mpal.h b/engines/tony/mpal/mpal.h index e88fd36e2f..af24c46697 100644 --- a/engines/tony/mpal/mpal.h +++ b/engines/tony/mpal/mpal.h @@ -391,7 +391,7 @@ void mpalFree(); * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that returns numeric results. */ uint32 mpalQueryDWORD(uint16 wQueryType, ...); @@ -402,7 +402,7 @@ uint32 mpalQueryDWORD(uint16 wQueryType, ...); * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that returns a pointer or handle. */ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...); @@ -413,7 +413,7 @@ MpalHandle mpalQueryHANDLE(uint16 wQueryType, ...); * * @param wQueryType Type of query. The list is in the QueryTypes enum. * @returns 4 bytes depending on the type of query - * @remarks This is the specialised version of the original single mpalQuery + * @remarks This is the specialized version of the original single mpalQuery * method that needs to run within a co-routine context. */ void mpalQueryCORO(CORO_PARAM, uint16 wQueryType, uint32 *dwRet); -- cgit v1.2.3 From a440c6a20e614c64dcd88380ee5273e9aad77169 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Fri, 28 Feb 2014 23:24:09 +0100 Subject: TONY: Reduce the scope of more variables --- engines/tony/game.cpp | 5 +++-- engines/tony/gfxcore.cpp | 9 +++------ engines/tony/gfxengine.cpp | 9 +++------ 3 files changed, 9 insertions(+), 14 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/game.cpp b/engines/tony/game.cpp index 986eac99aa..c102242dfd 100644 --- a/engines/tony/game.cpp +++ b/engines/tony/game.cpp @@ -140,8 +140,6 @@ void RMOptionButton::setActiveState(bool bState) { \****************************************************************************/ RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int slideSize) { - RMResRaw *raw; - _pos = pt; _nSlideSize = slideSize; _nMax = nRange; @@ -154,6 +152,7 @@ RMOptionSlide::RMOptionSlide(const RMPoint &pt, int nRange, int nStartValue, int _sliderSingle = NULL; // Sliders + RMResRaw *raw; INIT_GFX16_FROMRAW(20029, _sliderCenter); INIT_GFX16_FROMRAW(20030, _sliderLeft); INIT_GFX16_FROMRAW(20031, _sliderRight); @@ -966,6 +965,8 @@ void RMOptionScreen::changeState(CORO_PARAM, OptionScreenState newState) { void RMOptionScreen::doFrame(CORO_PARAM, RMInput *input) { CORO_BEGIN_CONTEXT; bool bLeftClick, bRightClick; + RMResRaw *raw; + RMPoint mousePos; bool bRefresh; int i; diff --git a/engines/tony/gfxcore.cpp b/engines/tony/gfxcore.cpp index 3afad9b373..9254d59df6 100644 --- a/engines/tony/gfxcore.cpp +++ b/engines/tony/gfxcore.cpp @@ -821,27 +821,24 @@ void RMGfxSourceBuffer8RLE::setAlreadyCompressed() { } void RMGfxSourceBuffer8RLE::compressRLE() { - byte *startline; byte *cur; byte curdata; byte *src; - byte *startsrc; - int rep; // Perform RLE compression for lines cur = _megaRLEBuf; src = _buf; for (int y = 0; y < _dimy; y++) { // Save the beginning of the line - startline = cur; + byte *startline = cur; // Leave space for the length of the line cur += 2; // It starts from the empty space curdata = 0; - rep = 0; - startsrc = src; + int rep = 0; + byte *startsrc = src; for (int x = 0; x < _dimx;) { if ((curdata == 0 && *src == 0) || (curdata == 1 && *src == _alphaBlendColor) || (curdata == 2 && (*src != _alphaBlendColor && *src != 0))) { diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp index 92469b7276..efbf63a6f5 100644 --- a/engines/tony/gfxengine.cpp +++ b/engines/tony/gfxengine.cpp @@ -352,11 +352,10 @@ void RMGfxEngine::initCustomDll() { } void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) { - RMItem *item; assert(GLOBALS._gfxEngine); if (GLOBALS._gfxEngine->_bLocationLoaded) { - item = GLOBALS._gfxEngine->_loc.getItemFromCode(dwItem); + RMItem *item = GLOBALS._gfxEngine->_loc.getItemFromCode(dwItem); if (item != NULL) { if (nPattern != -1) { item->setPattern(nPattern, true); @@ -452,8 +451,8 @@ void RMGfxEngine::unloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) { void RMGfxEngine::init() { // Screen loading - RMResRaw *raw; RMGfxSourceBuffer16 *load = NULL; + RMResRaw *raw; INIT_GFX16_FROMRAW(20038, load); _bigBuf.addPrim(new RMGfxPrimitive(load)); _bigBuf.drawOT(Common::nullContext); @@ -722,9 +721,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) { if (_ctx->ver >= 5) { // Version 5 - bool bStat = false; - - bStat = _ctx->f->readByte(); + bool bStat = _ctx->f->readByte(); _tony.setShepherdess(bStat); bStat = _ctx->f->readByte(); _inter.setPerorate(bStat); -- cgit v1.2.3 From 3f6b51ce55b86d5a1a2f898371368b10a2862252 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Mar 2014 16:25:07 +0100 Subject: TONY: Remove dead code in lzo --- engines/tony/mpal/lzo.cpp | 278 +--------------------------------------------- 1 file changed, 3 insertions(+), 275 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp index d95efd0393..5f564187f8 100644 --- a/engines/tony/mpal/lzo.cpp +++ b/engines/tony/mpal/lzo.cpp @@ -86,37 +86,9 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len) register byte *op; register const byte *ip; register uint32 t = 0; -#if defined(COPY_DICT) - uint32 m_off; - const byte *dict_end; -#else register const byte *m_pos; -#endif const byte * const ip_end = in + in_len; -#if defined(HAVE_ANY_OP) - byte * const op_end = out + *out_len; -#endif -#if defined(LZO1Z) - uint32 last_m_off = 0; -#endif - -#if defined(COPY_DICT) - if (dict) - { - if (dict_len > M4_MAX_OFFSET) - { - dict += dict_len - M4_MAX_OFFSET; - dict_len = M4_MAX_OFFSET; - } - dict_end = dict + dict_len; - } - else - { - dict_len = 0; - dict_end = NULL; - } -#endif *out_len = 0; @@ -150,138 +122,38 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len) t += 15 + *ip++; } assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); -#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4) - t += 3; - if (t >= 8) do - { - UA_COPY64(op, ip); - op += 8; ip += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY32(op, ip); - op += 4; ip += 4; t -= 4; - } - if (t > 0) - { - *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } - } -#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) -#if !defined(LZO_UNALIGNED_OK_4) - if (PTR_ALIGNED2_4(op, ip)) - { -#endif - UA_COPY32(op, ip); - op += 4; ip += 4; - if (--t > 0) - { - if (t >= 4) - { - do { - UA_COPY32(op, ip); - op += 4; ip += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *ip++; while (--t > 0); - } - else - do *op++ = *ip++; while (--t > 0); - } -#if !defined(LZO_UNALIGNED_OK_4) - } - else -#endif -#endif -#if !defined(LZO_UNALIGNED_OK_4) && !defined(LZO_UNALIGNED_OK_8) { *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; do *op++ = *ip++; while (--t > 0); } -#endif first_literal_run: t = *ip++; if (t >= 16) goto match; -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = (1 + M2_MAX_OFFSET) + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(3); - t = 3; COPY_DICT(t, m_off) -#else -#if defined(LZO1Z) - t = (1 + M2_MAX_OFFSET) + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else + m_pos = op - (1 + M2_MAX_OFFSET); m_pos -= t >> 2; m_pos -= *ip++ << 2; -#endif + TEST_LB(m_pos); NEED_OP(3); *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; -#endif goto match_done; do { match: if (t >= 64) { -#if defined(COPY_DICT) -#if defined(LZO1X) - m_off = 1 + ((t >> 2) & 7) + (*ip++ << 3); - t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_off = 1 + ((t >> 2) & 3) + (*ip++ << 2); - t = (t >> 4) - 3; -#elif defined(LZO1Z) - m_off = t & 0x1f; - if (m_off >= 0x1c) - m_off = last_m_off; - else - { - m_off = 1 + (m_off << 6) + (*ip++ >> 2); - last_m_off = m_off; - } - t = (t >> 5) - 1; -#endif -#else + #if defined(LZO1X) m_pos = op - 1; m_pos -= (t >> 2) & 7; m_pos -= *ip++ << 3; t = (t >> 5) - 1; -#elif defined(LZO1Y) - m_pos = op - 1; - m_pos -= (t >> 2) & 3; - m_pos -= *ip++ << 2; - t = (t >> 4) - 3; -#elif defined(LZO1Z) - { - uint32 off = t & 0x1f; - m_pos = op; - if (off >= 0x1c) - { - assert(last_m_off > 0); - m_pos -= last_m_off; - } - else - { - off = 1 + (off << 6) + (*ip++ >> 2); - m_pos -= off; - last_m_off = off; - } - } - t = (t >> 5) - 1; #endif TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); goto copy_match; -#endif } else if (t >= 32) { @@ -297,38 +169,14 @@ match: } t += 31 + *ip++; } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (ip[0] << 6) + (ip[1] >> 2); - last_m_off = m_off; -#else - m_off = 1 + (ip[0] >> 2) + (ip[1] << 6); -#endif -#else -#if defined(LZO1Z) - { - uint32 off = 1 + (ip[0] << 6) + (ip[1] >> 2); - m_pos = op - off; - last_m_off = off; - } -#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) - m_pos = op - 1; - m_pos -= UA_GET16(ip) >> 2; -#else m_pos = op - 1; m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif -#endif ip += 2; } else if (t >= 16) { -#if defined(COPY_DICT) - m_off = (t & 8) << 11; -#else m_pos = op; m_pos -= (t & 8) << 11; -#endif t &= 7; if (t == 0) { @@ -341,168 +189,48 @@ match: } t += 7 + *ip++; } -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off += (ip[0] << 6) + (ip[1] >> 2); -#else - m_off += (ip[0] >> 2) + (ip[1] << 6); -#endif - ip += 2; - if (m_off == 0) - goto eof_found; - m_off += 0x4000; -#if defined(LZO1Z) - last_m_off = m_off; -#endif -#else -#if defined(LZO1Z) - m_pos -= (ip[0] << 6) + (ip[1] >> 2); -#elif defined(LZO_UNALIGNED_OK_2) && defined(LZO_ABI_LITTLE_ENDIAN) - m_pos -= UA_GET16(ip) >> 2; -#else m_pos -= (ip[0] >> 2) + (ip[1] << 6); -#endif ip += 2; if (m_pos == op) goto eof_found; m_pos -= 0x4000; -#if defined(LZO1Z) - last_m_off = pd((const byte *)op, m_pos); -#endif -#endif } else { -#if defined(COPY_DICT) -#if defined(LZO1Z) - m_off = 1 + (t << 6) + (*ip++ >> 2); - last_m_off = m_off; -#else - m_off = 1 + (t >> 2) + (*ip++ << 2); -#endif - NEED_OP(2); - t = 2; COPY_DICT(t, m_off) -#else -#if defined(LZO1Z) - t = 1 + (t << 6) + (*ip++ >> 2); - m_pos = op - t; - last_m_off = t; -#else m_pos = op - 1; m_pos -= t >> 2; m_pos -= *ip++ << 2; -#endif TEST_LB(m_pos); NEED_OP(2); *op++ = *m_pos++; *op++ = *m_pos; -#endif goto match_done; } -#if defined(COPY_DICT) - - NEED_OP(t+3-1); - t += 3-1; COPY_DICT(t, m_off) - -#else - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); -#if defined(LZO_UNALIGNED_OK_8) && defined(LZO_UNALIGNED_OK_4) - if (op - m_pos >= 8) - { - t += (3 - 1); - if (t >= 8) do - { - UA_COPY64(op, m_pos); - op += 8; m_pos += 8; t -= 8; - } while (t >= 8); - if (t >= 4) - { - UA_COPY32(op, m_pos); - op += 4; m_pos += 4; t -= 4; - } - if (t > 0) - { - *op++ = m_pos[0]; - if (t > 1) { *op++ = m_pos[1]; if (t > 2) { *op++ = m_pos[2]; } } - } - } - else -#elif defined(LZO_UNALIGNED_OK_4) || defined(LZO_ALIGNED_OK_4) -#if !defined(LZO_UNALIGNED_OK_4) - if (t >= 2 * 4 - (3 - 1) && PTR_ALIGNED2_4(op, m_pos)) - { - assert((op - m_pos) >= 4); -#else - if (t >= 2 * 4 - (3 - 1) && (op - m_pos) >= 4) - { -#endif - UA_COPY32(op, m_pos); - op += 4; m_pos += 4; t -= 4 - (3 - 1); - do { - UA_COPY32(op, m_pos); - op += 4; m_pos += 4; t -= 4; - } while (t >= 4); - if (t > 0) do *op++ = *m_pos++; while (--t > 0); - } - else -#endif { copy_match: *op++ = *m_pos++; *op++ = *m_pos++; do *op++ = *m_pos++; while (--t > 0); } -#endif - match_done: -#if defined(LZO1Z) - t = ip[-1] & 3; -#else t = ip[-2] & 3; -#endif if (t == 0) break; match_next: assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); -#if 0 - do *op++ = *ip++; while (--t > 0); -#else *op++ = *ip++; if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } -#endif t = *ip++; } while (TEST_IP && TEST_OP); } -#if defined(HAVE_TEST_IP) || defined(HAVE_TEST_OP) - *out_len = pd(op, out); - return LZO_E_EOF_NOT_FOUND; -#endif - eof_found: assert(t == 1); *out_len = pd(op, out); return (ip == ip_end ? LZO_E_OK : (ip < ip_end ? LZO_E_INPUT_NOT_CONSUMED : LZO_E_INPUT_OVERRUN)); -#if defined(HAVE_NEED_IP) -input_overrun: - *out_len = pd(op, out); - return LZO_E_INPUT_OVERRUN; -#endif - -#if defined(HAVE_NEED_OP) -output_overrun: - *out_len = pd(op, out); - return LZO_E_OUTPUT_OVERRUN; -#endif - -#if defined(LZO_TEST_OVERRUN_LOOKBEHIND) -lookbehind_overrun: - *out_len = pd(op, out); - return LZO_E_LOOKBEHIND_OVERRUN; -#endif } } // end of namespace MPAL -- cgit v1.2.3 From 3ace56117823a61e46be5584b496cd81f2a3c91a Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Mar 2014 16:35:58 +0100 Subject: TONY: Indent code properly in lzo --- engines/tony/mpal/lzo.cpp | 89 ++++++++++++++++++++++++----------------------- 1 file changed, 45 insertions(+), 44 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp index 5f564187f8..62b882aa39 100644 --- a/engines/tony/mpal/lzo.cpp +++ b/engines/tony/mpal/lzo.cpp @@ -95,40 +95,44 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len) op = out; ip = in; - if (*ip > 17) - { + if (*ip > 17) { t = *ip++ - 17; if (t < 4) goto match_next; - assert(t > 0); NEED_OP(t); NEED_IP(t+1); - do *op++ = *ip++; while (--t > 0); + assert(t > 0); + NEED_OP(t); + NEED_IP(t + 1); + do + *op++ = *ip++; + while (--t > 0); goto first_literal_run; } - while (TEST_IP && TEST_OP) - { + while (TEST_IP && TEST_OP) { t = *ip++; if (t >= 16) goto match; - if (t == 0) - { + if (t == 0) { NEED_IP(1); - while (*ip == 0) - { + while (*ip == 0) { t += 255; ip++; NEED_IP(1); } t += 15 + *ip++; } - assert(t > 0); NEED_OP(t+3); NEED_IP(t+4); - { - *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; - do *op++ = *ip++; while (--t > 0); - } + assert(t > 0); + NEED_OP(t + 3); + NEED_IP(t + 4); -first_literal_run: + *op++ = *ip++; + *op++ = *ip++; + *op++ = *ip++; + do + *op++ = *ip++; + while (--t > 0); +first_literal_run: t = *ip++; if (t >= 16) goto match; @@ -137,32 +141,31 @@ first_literal_run: m_pos -= t >> 2; m_pos -= *ip++ << 2; - TEST_LB(m_pos); NEED_OP(3); - *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; + TEST_LB(m_pos); + NEED_OP(3); + + *op++ = *m_pos++; + *op++ = *m_pos++; + *op++ = *m_pos; + goto match_done; do { match: - if (t >= 64) - { - -#if defined(LZO1X) + if (t >= 64) { m_pos = op - 1; m_pos -= (t >> 2) & 7; m_pos -= *ip++ << 3; t = (t >> 5) - 1; -#endif - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + TEST_LB(m_pos); + assert(t > 0); + NEED_OP(t + 3 - 1); goto copy_match; - } - else if (t >= 32) - { + } else if (t >= 32) { t &= 31; - if (t == 0) - { + if (t == 0) { NEED_IP(1); - while (*ip == 0) - { + while (*ip == 0) { t += 255; ip++; NEED_IP(1); @@ -172,17 +175,13 @@ match: m_pos = op - 1; m_pos -= (ip[0] >> 2) + (ip[1] << 6); ip += 2; - } - else if (t >= 16) - { + } else if (t >= 16) { m_pos = op; m_pos -= (t & 8) << 11; t &= 7; - if (t == 0) - { + if (t == 0) { NEED_IP(1); - while (*ip == 0) - { + while (*ip == 0) { t += 255; ip++; NEED_IP(1); @@ -194,18 +193,20 @@ match: if (m_pos == op) goto eof_found; m_pos -= 0x4000; - } - else - { + } else { m_pos = op - 1; m_pos -= t >> 2; m_pos -= *ip++ << 2; - TEST_LB(m_pos); NEED_OP(2); - *op++ = *m_pos++; *op++ = *m_pos; + TEST_LB(m_pos); + NEED_OP(2); + *op++ = *m_pos++; + *op++ = *m_pos; goto match_done; } - TEST_LB(m_pos); assert(t > 0); NEED_OP(t+3-1); + TEST_LB(m_pos); + assert(t > 0); + NEED_OP(t + 3 - 1); { copy_match: *op++ = *m_pos++; *op++ = *m_pos++; -- cgit v1.2.3 From 8d8bf74ad6412bc8d23673c8874f7ace22ac3995 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Mar 2014 16:37:22 +0100 Subject: TONY: Remove unused function declaration in lzo --- engines/tony/mpal/lzo.cpp | 19 ++++++++++++++----- engines/tony/mpal/lzo.h | 13 ------------- 2 files changed, 14 insertions(+), 18 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp index 62b882aa39..b681cdbfc3 100644 --- a/engines/tony/mpal/lzo.cpp +++ b/engines/tony/mpal/lzo.cpp @@ -209,8 +209,11 @@ match: NEED_OP(t + 3 - 1); { copy_match: - *op++ = *m_pos++; *op++ = *m_pos++; - do *op++ = *m_pos++; while (--t > 0); + *op++ = *m_pos++; + *op++ = *m_pos++; + do + *op++ = *m_pos++; + while (--t > 0); } match_done: @@ -219,9 +222,16 @@ match_done: break; match_next: - assert(t > 0); assert(t < 4); NEED_OP(t); NEED_IP(t+1); + assert(t > 0); + assert(t < 4); + NEED_OP(t); + NEED_IP(t + 1); *op++ = *ip++; - if (t > 1) { *op++ = *ip++; if (t > 2) { *op++ = *ip++; } } + if (t > 1) { + *op++ = *ip++; + if (t > 2) + *op++ = *ip++; + } t = *ip++; } while (TEST_IP && TEST_OP); } @@ -235,5 +245,4 @@ eof_found: } } // end of namespace MPAL - } // end of namespace Tony diff --git a/engines/tony/mpal/lzo.h b/engines/tony/mpal/lzo.h index 4384e3fb33..a95a14b267 100644 --- a/engines/tony/mpal/lzo.h +++ b/engines/tony/mpal/lzo.h @@ -86,25 +86,12 @@ namespace MPAL { #define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ #define LZO_E_INVALID_ARGUMENT (-10) -#define LZO1X_999_MEM_COMPRESS ((uint32) (14 * 16384L * sizeof(uint16))) - /** * Decompresses an LZO compressed resource */ int lzo1x_decompress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len); -/** - * Comrpess a data block into an LZO stream - */ -int lzo1x_1_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem); - -/** - * better compression ratio at the cost of more memory and time - */ -int lzo1x_999_compress(const byte *src, uint32 src_len, byte *dst, uint32 *dst_len, void *wrkmem); - } // end of namespace MPAL - } // end of namespace Tony #endif /* already included */ -- cgit v1.2.3 From 9d8477b87d3e0a968a9f85b2bf2f403f490b9988 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Mar 2014 16:46:31 +0100 Subject: TONY: Remove dummy defines --- engines/tony/mpal/lzo.cpp | 33 +++------------------------------ 1 file changed, 3 insertions(+), 30 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/lzo.cpp b/engines/tony/mpal/lzo.cpp index b681cdbfc3..314d6f3ed5 100644 --- a/engines/tony/mpal/lzo.cpp +++ b/engines/tony/mpal/lzo.cpp @@ -69,15 +69,9 @@ namespace Tony { namespace MPAL { #define pd(a, b) ((uint32) ((a) - (b))) - #define TEST_IP (ip < ip_end) -#define TEST_OP 1 -#define NEED_IP(x) ((void) 0) -#define NEED_OP(x) ((void) 0) -#define TEST_LB(m_pos) ((void) 0) #define M2_MAX_OFFSET 0x0800 -#define LZO1X /** * Decompresses an LZO compressed resource @@ -100,36 +94,30 @@ int lzo1x_decompress(const byte *in, uint32 in_len, byte *out, uint32 *out_len) if (t < 4) goto match_next; assert(t > 0); - NEED_OP(t); - NEED_IP(t + 1); do *op++ = *ip++; while (--t > 0); goto first_literal_run; } - while (TEST_IP && TEST_OP) { + while (TEST_IP) { t = *ip++; if (t >= 16) goto match; if (t == 0) { - NEED_IP(1); while (*ip == 0) { t += 255; ip++; - NEED_IP(1); } t += 15 + *ip++; } assert(t > 0); - NEED_OP(t + 3); - NEED_IP(t + 4); *op++ = *ip++; *op++ = *ip++; *op++ = *ip++; do - *op++ = *ip++; + *op++ = *ip++; while (--t > 0); first_literal_run: @@ -141,9 +129,6 @@ first_literal_run: m_pos -= t >> 2; m_pos -= *ip++ << 2; - TEST_LB(m_pos); - NEED_OP(3); - *op++ = *m_pos++; *op++ = *m_pos++; *op++ = *m_pos; @@ -157,18 +142,14 @@ match: m_pos -= (t >> 2) & 7; m_pos -= *ip++ << 3; t = (t >> 5) - 1; - TEST_LB(m_pos); assert(t > 0); - NEED_OP(t + 3 - 1); goto copy_match; } else if (t >= 32) { t &= 31; if (t == 0) { - NEED_IP(1); while (*ip == 0) { t += 255; ip++; - NEED_IP(1); } t += 31 + *ip++; } @@ -180,11 +161,9 @@ match: m_pos -= (t & 8) << 11; t &= 7; if (t == 0) { - NEED_IP(1); while (*ip == 0) { t += 255; ip++; - NEED_IP(1); } t += 7 + *ip++; } @@ -197,16 +176,12 @@ match: m_pos = op - 1; m_pos -= t >> 2; m_pos -= *ip++ << 2; - TEST_LB(m_pos); - NEED_OP(2); *op++ = *m_pos++; *op++ = *m_pos; goto match_done; } - TEST_LB(m_pos); assert(t > 0); - NEED_OP(t + 3 - 1); { copy_match: *op++ = *m_pos++; @@ -224,8 +199,6 @@ match_done: match_next: assert(t > 0); assert(t < 4); - NEED_OP(t); - NEED_IP(t + 1); *op++ = *ip++; if (t > 1) { *op++ = *ip++; @@ -233,7 +206,7 @@ match_next: *op++ = *ip++; } t = *ip++; - } while (TEST_IP && TEST_OP); + } while (TEST_IP); } eof_found: -- cgit v1.2.3 From 2218d14fb5276724c757406d5ac1ec581160721b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sat, 1 Mar 2014 16:50:02 +0100 Subject: TONY: Remove unused error defines --- engines/tony/mpal/lzo.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/mpal/lzo.h b/engines/tony/mpal/lzo.h index a95a14b267..172900f053 100644 --- a/engines/tony/mpal/lzo.h +++ b/engines/tony/mpal/lzo.h @@ -75,16 +75,8 @@ namespace MPAL { * normal events. */ #define LZO_E_OK 0 -#define LZO_E_ERROR (-1) -#define LZO_E_OUT_OF_MEMORY (-2) /* [lzo_alloc_func_t failure] */ -#define LZO_E_NOT_COMPRESSIBLE (-3) /* [not used right now] */ #define LZO_E_INPUT_OVERRUN (-4) -#define LZO_E_OUTPUT_OVERRUN (-5) -#define LZO_E_LOOKBEHIND_OVERRUN (-6) -#define LZO_E_EOF_NOT_FOUND (-7) #define LZO_E_INPUT_NOT_CONSUMED (-8) -#define LZO_E_NOT_YET_IMPLEMENTED (-9) /* [not used right now] */ -#define LZO_E_INVALID_ARGUMENT (-10) /** * Decompresses an LZO compressed resource -- cgit v1.2.3 From 60980e783ef263f3ed5aa708dc3032779d3be923 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Sun, 9 Mar 2014 23:18:21 +0100 Subject: TONY: Add some missing virtual keywords --- engines/tony/gfxcore.h | 6 +++--- engines/tony/inventory.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h index ff6c6b3dca..06073609ea 100644 --- a/engines/tony/gfxcore.h +++ b/engines/tony/gfxcore.h @@ -220,7 +220,7 @@ public: virtual ~RMGfxSourceBuffer16(); // Initialization - void create(int dimx, int dimy); + virtual void create(int dimx, int dimy); int getBpp(); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); @@ -263,7 +263,7 @@ public: virtual ~RMGfxSourceBuffer8(); // Initialization - void create(int dimx, int dimy); + virtual void create(int dimx, int dimy); int getBpp(); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); @@ -424,7 +424,7 @@ public: RMGfxSourceBuffer4(int dimx, int dimy); // Initialization - void create(int dimx, int dimy); + virtual void create(int dimx, int dimy); int getBpp(); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h index 9b460f390d..ee7bf115c7 100644 --- a/engines/tony/inventory.h +++ b/engines/tony/inventory.h @@ -101,7 +101,7 @@ public: /** * Initialization and closing */ - void init(); + virtual void init(); void close(); void reset(); -- cgit v1.2.3 From aca7fac256f5e0b404a14bb544c1e734473fd7ac Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 10 Mar 2014 06:47:26 +0100 Subject: TONY: Fix clang warnings - Courtesy of LordHoto --- engines/tony/font.h | 1 + engines/tony/game.h | 1 + engines/tony/gfxcore.h | 2 +- engines/tony/inventory.h | 2 ++ 4 files changed, 5 insertions(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/font.h b/engines/tony/font.h index 6e76c42750..d52547a58d 100644 --- a/engines/tony/font.h +++ b/engines/tony/font.h @@ -347,6 +347,7 @@ public: virtual ~RMDialogChoice(); // Initialization and closure + using RMGfxWoodyBuffer::init; void init(); void close(); diff --git a/engines/tony/game.h b/engines/tony/game.h index d03a975b6f..cda07de889 100644 --- a/engines/tony/game.h +++ b/engines/tony/game.h @@ -300,6 +300,7 @@ public: RMOptionScreen(); virtual ~RMOptionScreen(); + using RMGfxWoodyBuffer::init; void init(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool &result); void initLoadMenuOnly(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool bAlternateGfx, bool &result); void initSaveMenuOnly(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool bAlternateGfx, bool &result); diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h index 06073609ea..a637027051 100644 --- a/engines/tony/gfxcore.h +++ b/engines/tony/gfxcore.h @@ -71,7 +71,7 @@ public: int getDimy(); // Creation - virtual void create(int dimx, int dimy, int nBpp); + void create(int dimx, int dimy, int nBpp); virtual void destroy(); // These are valid only if the buffer is locked diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h index ee7bf115c7..135480a3e9 100644 --- a/engines/tony/inventory.h +++ b/engines/tony/inventory.h @@ -101,6 +101,7 @@ public: /** * Initialization and closing */ + using RMGfxWoodyBuffer::init; virtual void init(); void close(); void reset(); @@ -209,6 +210,7 @@ public: /** * Initialization */ + using RMGfxSourceBuffer8RLEByte::init; void init(); void close(); -- cgit v1.2.3 From 68f0c4302179797201d54f31c01f2aae172c0aa0 Mon Sep 17 00:00:00 2001 From: Strangerke Date: Mon, 10 Mar 2014 06:50:51 +0100 Subject: TONY: Revert 60980e783ef263f3ed5aa708dc3032779d3be923 --- engines/tony/gfxcore.h | 6 +++--- engines/tony/inventory.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/gfxcore.h b/engines/tony/gfxcore.h index a637027051..c9081506d7 100644 --- a/engines/tony/gfxcore.h +++ b/engines/tony/gfxcore.h @@ -220,7 +220,7 @@ public: virtual ~RMGfxSourceBuffer16(); // Initialization - virtual void create(int dimx, int dimy); + void create(int dimx, int dimy); int getBpp(); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); @@ -263,7 +263,7 @@ public: virtual ~RMGfxSourceBuffer8(); // Initialization - virtual void create(int dimx, int dimy); + void create(int dimx, int dimy); int getBpp(); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); @@ -424,7 +424,7 @@ public: RMGfxSourceBuffer4(int dimx, int dimy); // Initialization - virtual void create(int dimx, int dimy); + void create(int dimx, int dimy); int getBpp(); virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim); diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h index 135480a3e9..5528e6589c 100644 --- a/engines/tony/inventory.h +++ b/engines/tony/inventory.h @@ -102,7 +102,7 @@ public: * Initialization and closing */ using RMGfxWoodyBuffer::init; - virtual void init(); + void init(); void close(); void reset(); -- cgit v1.2.3 From 0508e395ff4b29ae9a2d837702eaf1bf79bcbb95 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Mon, 19 May 2014 12:57:25 +0100 Subject: TONY: Add missing Russian detection entry. This should fix bug #6589 "TONY: Russian version not detected". --- engines/tony/detection_tables.h | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/detection_tables.h b/engines/tony/detection_tables.h index ce4651f0ab..28dcaac752 100644 --- a/engines/tony/detection_tables.h +++ b/engines/tony/detection_tables.h @@ -217,7 +217,7 @@ static const TonyGameDescription gameDescriptions[] = { // Tony Tough German "Shoe Box", reported in bug #3582420 { "tony", - 0, + 0, { {"roasted.mpr", 0, "06203dbbc85fdd1e6dc8fc211c1a6207", 135911071}, {"roasted.mpc", 0, "bc3471f098e591dc509dcad401a8d8a5", 389554}, @@ -230,6 +230,23 @@ static const TonyGameDescription gameDescriptions[] = { }, }, + { + // Tony Tough Russian, reported in bug #6589 + { + "tony", + 0, + { + {"roasted.mpr", 0, "06203dbbc85fdd1e6dc8fc211c1a6207", 135911071}, + {"roasted.mpc", 0, "377d6e24adeedc6c5c09c31b92231218", 391536}, + AD_LISTEND + }, + Common::RU_RUS, + Common::kPlatformWindows, + ADGF_NO_FLAGS, + GUIO1(GUIO_NONE) + }, + }, + { AD_TABLE_END_MARKER } }; -- cgit v1.2.3 From daa8d57a866e2866369e432cf1d624179edc8875 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2014 02:04:07 +0200 Subject: ALL: Rename Debugger::DebugPrintf to Debugger::debugPrintf. --- engines/tony/debugger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp index 22c218a19c..2a9086888a 100644 --- a/engines/tony/debugger.cpp +++ b/engines/tony/debugger.cpp @@ -82,13 +82,13 @@ void DebugChangeScene(CORO_PARAM, const void *param) { */ bool Debugger::Cmd_Scene(int argc, const char **argv) { if (argc < 2) { - DebugPrintf("Usage: %s [ ]\n", argv[0]); + debugPrintf("Usage: %s [ ]\n", argv[0]); return true; } int sceneNumber = strToInt(argv[1]); if (sceneNumber >= g_vm->_theBoxes.getLocBoxesCount()) { - DebugPrintf("Invalid scene\n"); + debugPrintf("Invalid scene\n"); return true; } @@ -118,7 +118,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) { */ bool Debugger::Cmd_DirtyRects(int argc, const char **argv) { if (argc != 2) { - DebugPrintf("Usage; %s [on | off]\n", argv[0]); + debugPrintf("Usage; %s [on | off]\n", argv[0]); return true; } else { g_vm->_window.showDirtyRects(strcmp(argv[1], "on") == 0); -- cgit v1.2.3 From ae4ffe01f0e4354938714c546034cd0f9806bfc3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2014 02:04:08 +0200 Subject: ALL: Rename Debugger::DCmd_Register to Debugger::registerCmd. --- engines/tony/debugger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'engines/tony') diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp index 2a9086888a..0e59fb8470 100644 --- a/engines/tony/debugger.cpp +++ b/engines/tony/debugger.cpp @@ -28,9 +28,9 @@ namespace Tony { Debugger::Debugger() : GUI::Debugger() { - DCmd_Register("continue", WRAP_METHOD(Debugger, Cmd_Exit)); - DCmd_Register("scene", WRAP_METHOD(Debugger, Cmd_Scene)); - DCmd_Register("dirty_rects", WRAP_METHOD(Debugger, Cmd_DirtyRects)); + registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit)); + registerCmd("scene", WRAP_METHOD(Debugger, Cmd_Scene)); + registerCmd("dirty_rects", WRAP_METHOD(Debugger, Cmd_DirtyRects)); } static int strToInt(const char *s) { -- cgit v1.2.3 From 30d64edac449cde1f1c387b817ec33446ddd4698 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2014 02:04:08 +0200 Subject: ALL: Make Debugger command function names conform to our guidelines. --- engines/tony/debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/tony') diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp index 0e59fb8470..e192c53d2b 100644 --- a/engines/tony/debugger.cpp +++ b/engines/tony/debugger.cpp @@ -28,7 +28,7 @@ namespace Tony { Debugger::Debugger() : GUI::Debugger() { - registerCmd("continue", WRAP_METHOD(Debugger, Cmd_Exit)); + registerCmd("continue", WRAP_METHOD(Debugger, cmdExit)); registerCmd("scene", WRAP_METHOD(Debugger, Cmd_Scene)); registerCmd("dirty_rects", WRAP_METHOD(Debugger, Cmd_DirtyRects)); } -- cgit v1.2.3