From 7630e3204e3b932d9b43bda7dc4b658405fabf33 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 16 Dec 2014 01:21:57 +0200 Subject: ZVISION: Move all the remaining utility classes into the core --- engines/zvision/core/clock.cpp | 68 ++++++++++++++++++ engines/zvision/core/clock.h | 84 ++++++++++++++++++++++ engines/zvision/core/console.cpp | 2 +- engines/zvision/core/utility.cpp | 45 ++++++++++++ engines/zvision/core/utility.h | 47 ++++++++++++ engines/zvision/module.mk | 4 +- engines/zvision/scripting/control.cpp | 2 +- .../zvision/scripting/controls/fist_control.cpp | 2 +- .../zvision/scripting/controls/hotmov_control.cpp | 2 +- .../zvision/scripting/controls/input_control.cpp | 2 +- .../zvision/scripting/controls/lever_control.cpp | 2 +- .../zvision/scripting/controls/paint_control.cpp | 2 +- .../scripting/controls/push_toggle_control.cpp | 2 +- .../zvision/scripting/controls/safe_control.cpp | 2 +- .../zvision/scripting/controls/save_control.cpp | 2 +- .../zvision/scripting/controls/slot_control.cpp | 2 +- .../zvision/scripting/controls/titler_control.cpp | 2 +- engines/zvision/scripting/scr_file_handling.cpp | 2 +- engines/zvision/scripting/script_manager.cpp | 2 +- engines/zvision/sound/zork_raw.cpp | 2 +- engines/zvision/utility/clock.cpp | 68 ------------------ engines/zvision/utility/clock.h | 84 ---------------------- engines/zvision/utility/utility.cpp | 45 ------------ engines/zvision/utility/utility.h | 47 ------------ engines/zvision/video/video.cpp | 2 +- engines/zvision/zvision.h | 2 +- 26 files changed, 263 insertions(+), 263 deletions(-) create mode 100644 engines/zvision/core/clock.cpp create mode 100644 engines/zvision/core/clock.h create mode 100644 engines/zvision/core/utility.cpp create mode 100644 engines/zvision/core/utility.h delete mode 100644 engines/zvision/utility/clock.cpp delete mode 100644 engines/zvision/utility/clock.h delete mode 100644 engines/zvision/utility/utility.cpp delete mode 100644 engines/zvision/utility/utility.h diff --git a/engines/zvision/core/clock.cpp b/engines/zvision/core/clock.cpp new file mode 100644 index 0000000000..1425d550b7 --- /dev/null +++ b/engines/zvision/core/clock.cpp @@ -0,0 +1,68 @@ +/* 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 "common/scummsys.h" + +#include "zvision/core/clock.h" + +#include "common/system.h" + +namespace ZVision { + +Clock::Clock(OSystem *system) + : _system(system), + _lastTime(0), + _deltaTime(0), + _pausedTime(0), + _paused(false) { +} + +void Clock::update() { + uint32 currentTime = _system->getMillis(); + + _deltaTime = (currentTime - _lastTime); + if (_paused) { + _deltaTime -= (currentTime - _pausedTime); + } + + if (_deltaTime < 0) { + _deltaTime = 0; + } + + _lastTime = currentTime; +} + +void Clock::start() { + if (_paused) { + _lastTime = _system->getMillis(); + _paused = false; + } +} + +void Clock::stop() { + if (!_paused) { + _pausedTime = _system->getMillis(); + _paused = true; + } +} + +} // End of namespace ZVision diff --git a/engines/zvision/core/clock.h b/engines/zvision/core/clock.h new file mode 100644 index 0000000000..cbf52be560 --- /dev/null +++ b/engines/zvision/core/clock.h @@ -0,0 +1,84 @@ +/* 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 ZVISION_CLOCK_H +#define ZVISION_CLOCK_H + +#include "common/types.h" + +class OSystem; + +namespace ZVision { + +/* Class for handling frame to frame deltaTime while keeping track of time pauses/un-pauses */ +class Clock { +public: + Clock(OSystem *system); + +private: + OSystem *_system; + uint32 _lastTime; + int32 _deltaTime; + uint32 _pausedTime; + bool _paused; + +public: + /** + * Updates _deltaTime with the difference between the current time and + * when the last update() was called. + */ + void update(); + + /** + * Get the delta time since the last frame. (The time between update() calls) + * + * @return Delta time since the last frame (in milliseconds) + */ + uint32 getDeltaTime() const { + return _deltaTime; + } + + /** + * Get the time from the program starting to the last update() call + * + * @return Time from program start to last update() call (in milliseconds) + */ + uint32 getLastMeasuredTime() { + return _lastTime; + } + + /** + * Pause the clock. Any future delta times will take this pause into account. + * Has no effect if the clock is already paused. + */ + void start(); + + /** + * Un-pause the clock. + * Has no effect if the clock is already un-paused. + */ + void stop(); +}; + +} // End of namespace ZVision + +#endif diff --git a/engines/zvision/core/console.cpp b/engines/zvision/core/console.cpp index 76481a3549..eb4d281813 100644 --- a/engines/zvision/core/console.cpp +++ b/engines/zvision/core/console.cpp @@ -30,7 +30,7 @@ #include "zvision/text/string_manager.h" #include "zvision/video/zork_avi_decoder.h" #include "zvision/sound/zork_raw.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "zvision/graphics/cursors/cursor.h" #include "common/system.h" diff --git a/engines/zvision/core/utility.cpp b/engines/zvision/core/utility.cpp new file mode 100644 index 0000000000..dcbb41171e --- /dev/null +++ b/engines/zvision/core/utility.cpp @@ -0,0 +1,45 @@ +/* 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 "common/scummsys.h" + +#include "zvision/core/utility.h" + +#include "zvision/zvision.h" +#include "zvision/sound/zork_raw.h" + +#include "common/tokenizer.h" +#include "common/file.h" + +namespace ZVision { + +void trimCommentsAndWhiteSpace(Common::String *string) { + for (int i = string->size() - 1; i >= 0; i--) { + if ((*string)[i] == '#') { + string->erase(i); + } + } + + string->trim(); +} + +} // End of namespace ZVision diff --git a/engines/zvision/core/utility.h b/engines/zvision/core/utility.h new file mode 100644 index 0000000000..0ca26b968d --- /dev/null +++ b/engines/zvision/core/utility.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 ZVISION_UTILITY_H +#define ZVISION_UTILITY_H + +#include "common/array.h" + +namespace Common { +class String; +} + +namespace ZVision { + +class ZVision; + +/** + * Removes any line comments using '#' as a sequence start. + * Then removes any trailing and leading 'whitespace' using String::trim() + * Note: String::trim uses isspace() to determine what is whitespace and what is not. + * + * @param string The string to modify. It is modified in place + */ +void trimCommentsAndWhiteSpace(Common::String *string); + +} // End of namespace ZVision + +#endif diff --git a/engines/zvision/module.mk b/engines/zvision/module.mk index 1d89e22584..18923eeb8f 100644 --- a/engines/zvision/module.mk +++ b/engines/zvision/module.mk @@ -2,9 +2,11 @@ MODULE := engines/zvision MODULE_OBJS := \ core/console.o \ + core/clock.o \ core/events.o \ core/menu.o \ core/save_manager.o \ + core/utility.o \ detection.o \ file/lzss_read_stream.o \ file/search_manager.o \ @@ -44,8 +46,6 @@ MODULE_OBJS := \ sound/zork_raw.o \ text/string_manager.o \ text/text.o \ - utility/clock.o \ - utility/utility.o \ video/rlf_decoder.o \ video/video.o \ video/zork_avi_decoder.o \ diff --git a/engines/zvision/scripting/control.cpp b/engines/zvision/scripting/control.cpp index 5469106928..86f6a30c8f 100644 --- a/engines/zvision/scripting/control.cpp +++ b/engines/zvision/scripting/control.cpp @@ -27,7 +27,7 @@ #include "zvision/zvision.h" #include "zvision/graphics/render_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" diff --git a/engines/zvision/scripting/controls/fist_control.cpp b/engines/zvision/scripting/controls/fist_control.cpp index 887ad7950d..40d016f360 100644 --- a/engines/zvision/scripting/controls/fist_control.cpp +++ b/engines/zvision/scripting/controls/fist_control.cpp @@ -27,7 +27,7 @@ #include "zvision/scripting/controls/fist_control.h" #include "zvision/graphics/render_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "zvision/video/rlf_decoder.h" #include "common/stream.h" diff --git a/engines/zvision/scripting/controls/hotmov_control.cpp b/engines/zvision/scripting/controls/hotmov_control.cpp index b2c9cdd577..4a6d2705b4 100644 --- a/engines/zvision/scripting/controls/hotmov_control.cpp +++ b/engines/zvision/scripting/controls/hotmov_control.cpp @@ -28,7 +28,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/graphics/render_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" #include "common/file.h" diff --git a/engines/zvision/scripting/controls/input_control.cpp b/engines/zvision/scripting/controls/input_control.cpp index 1b15eacd78..e17a5f6dd8 100644 --- a/engines/zvision/scripting/controls/input_control.cpp +++ b/engines/zvision/scripting/controls/input_control.cpp @@ -29,7 +29,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/text/string_manager.h" #include "zvision/graphics/render_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/str.h" #include "common/stream.h" diff --git a/engines/zvision/scripting/controls/lever_control.cpp b/engines/zvision/scripting/controls/lever_control.cpp index 07eec1fb63..632554e7f2 100644 --- a/engines/zvision/scripting/controls/lever_control.cpp +++ b/engines/zvision/scripting/controls/lever_control.cpp @@ -28,7 +28,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/graphics/render_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" #include "common/file.h" diff --git a/engines/zvision/scripting/controls/paint_control.cpp b/engines/zvision/scripting/controls/paint_control.cpp index 0ef7618b5b..24306bf4db 100644 --- a/engines/zvision/scripting/controls/paint_control.cpp +++ b/engines/zvision/scripting/controls/paint_control.cpp @@ -28,7 +28,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" #include "zvision/graphics/render_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" namespace ZVision { diff --git a/engines/zvision/scripting/controls/push_toggle_control.cpp b/engines/zvision/scripting/controls/push_toggle_control.cpp index fcd8cd0356..28c791168a 100644 --- a/engines/zvision/scripting/controls/push_toggle_control.cpp +++ b/engines/zvision/scripting/controls/push_toggle_control.cpp @@ -27,7 +27,7 @@ #include "zvision/zvision.h" #include "zvision/scripting/script_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" diff --git a/engines/zvision/scripting/controls/safe_control.cpp b/engines/zvision/scripting/controls/safe_control.cpp index 8135eb34cc..cb754ecbe2 100644 --- a/engines/zvision/scripting/controls/safe_control.cpp +++ b/engines/zvision/scripting/controls/safe_control.cpp @@ -28,7 +28,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/graphics/render_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" #include "common/file.h" diff --git a/engines/zvision/scripting/controls/save_control.cpp b/engines/zvision/scripting/controls/save_control.cpp index d773b5fc6f..7de138d8e3 100644 --- a/engines/zvision/scripting/controls/save_control.cpp +++ b/engines/zvision/scripting/controls/save_control.cpp @@ -24,7 +24,7 @@ #include "zvision/scripting/controls/input_control.h" #include "zvision/scripting/controls/save_control.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "zvision/zvision.h" #include "zvision/scripting/script_manager.h" diff --git a/engines/zvision/scripting/controls/slot_control.cpp b/engines/zvision/scripting/controls/slot_control.cpp index 7f04c2d311..63578d54ea 100644 --- a/engines/zvision/scripting/controls/slot_control.cpp +++ b/engines/zvision/scripting/controls/slot_control.cpp @@ -28,7 +28,7 @@ #include "zvision/scripting/script_manager.h" #include "zvision/graphics/cursors/cursor_manager.h" #include "zvision/graphics/render_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" diff --git a/engines/zvision/scripting/controls/titler_control.cpp b/engines/zvision/scripting/controls/titler_control.cpp index f0126bebc2..af26aed952 100644 --- a/engines/zvision/scripting/controls/titler_control.cpp +++ b/engines/zvision/scripting/controls/titler_control.cpp @@ -28,7 +28,7 @@ #include "zvision/text/text.h" #include "zvision/scripting/script_manager.h" #include "zvision/graphics/render_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "common/stream.h" diff --git a/engines/zvision/scripting/scr_file_handling.cpp b/engines/zvision/scripting/scr_file_handling.cpp index f97eed6b75..631cb6128e 100644 --- a/engines/zvision/scripting/scr_file_handling.cpp +++ b/engines/zvision/scripting/scr_file_handling.cpp @@ -25,7 +25,7 @@ #include "zvision/zvision.h" #include "zvision/scripting/script_manager.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "zvision/scripting/puzzle.h" #include "zvision/scripting/actions.h" #include "zvision/scripting/controls/push_toggle_control.h" diff --git a/engines/zvision/scripting/script_manager.cpp b/engines/zvision/scripting/script_manager.cpp index c735fe6eb0..605d27216e 100644 --- a/engines/zvision/scripting/script_manager.cpp +++ b/engines/zvision/scripting/script_manager.cpp @@ -29,7 +29,7 @@ #include "zvision/graphics/cursors/cursor_manager.h" #include "zvision/core/save_manager.h" #include "zvision/scripting/actions.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" #include "zvision/scripting/sidefx/timer_node.h" #include "common/algorithm.h" diff --git a/engines/zvision/sound/zork_raw.cpp b/engines/zvision/sound/zork_raw.cpp index c26c33a392..d8fabc419b 100644 --- a/engines/zvision/sound/zork_raw.cpp +++ b/engines/zvision/sound/zork_raw.cpp @@ -34,7 +34,7 @@ #include "zvision/sound/zork_raw.h" #include "zvision/zvision.h" #include "zvision/detection.h" -#include "zvision/utility/utility.h" +#include "zvision/core/utility.h" namespace ZVision { diff --git a/engines/zvision/utility/clock.cpp b/engines/zvision/utility/clock.cpp deleted file mode 100644 index 0e800a2031..0000000000 --- a/engines/zvision/utility/clock.cpp +++ /dev/null @@ -1,68 +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 "common/scummsys.h" - -#include "zvision/utility/clock.h" - -#include "common/system.h" - -namespace ZVision { - -Clock::Clock(OSystem *system) - : _system(system), - _lastTime(0), - _deltaTime(0), - _pausedTime(0), - _paused(false) { -} - -void Clock::update() { - uint32 currentTime = _system->getMillis(); - - _deltaTime = (currentTime - _lastTime); - if (_paused) { - _deltaTime -= (currentTime - _pausedTime); - } - - if (_deltaTime < 0) { - _deltaTime = 0; - } - - _lastTime = currentTime; -} - -void Clock::start() { - if (_paused) { - _lastTime = _system->getMillis(); - _paused = false; - } -} - -void Clock::stop() { - if (!_paused) { - _pausedTime = _system->getMillis(); - _paused = true; - } -} - -} // End of namespace ZVision diff --git a/engines/zvision/utility/clock.h b/engines/zvision/utility/clock.h deleted file mode 100644 index cbf52be560..0000000000 --- a/engines/zvision/utility/clock.h +++ /dev/null @@ -1,84 +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 ZVISION_CLOCK_H -#define ZVISION_CLOCK_H - -#include "common/types.h" - -class OSystem; - -namespace ZVision { - -/* Class for handling frame to frame deltaTime while keeping track of time pauses/un-pauses */ -class Clock { -public: - Clock(OSystem *system); - -private: - OSystem *_system; - uint32 _lastTime; - int32 _deltaTime; - uint32 _pausedTime; - bool _paused; - -public: - /** - * Updates _deltaTime with the difference between the current time and - * when the last update() was called. - */ - void update(); - - /** - * Get the delta time since the last frame. (The time between update() calls) - * - * @return Delta time since the last frame (in milliseconds) - */ - uint32 getDeltaTime() const { - return _deltaTime; - } - - /** - * Get the time from the program starting to the last update() call - * - * @return Time from program start to last update() call (in milliseconds) - */ - uint32 getLastMeasuredTime() { - return _lastTime; - } - - /** - * Pause the clock. Any future delta times will take this pause into account. - * Has no effect if the clock is already paused. - */ - void start(); - - /** - * Un-pause the clock. - * Has no effect if the clock is already un-paused. - */ - void stop(); -}; - -} // End of namespace ZVision - -#endif diff --git a/engines/zvision/utility/utility.cpp b/engines/zvision/utility/utility.cpp deleted file mode 100644 index e09545a90d..0000000000 --- a/engines/zvision/utility/utility.cpp +++ /dev/null @@ -1,45 +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 "common/scummsys.h" - -#include "zvision/utility/utility.h" - -#include "zvision/zvision.h" -#include "zvision/sound/zork_raw.h" - -#include "common/tokenizer.h" -#include "common/file.h" - -namespace ZVision { - -void trimCommentsAndWhiteSpace(Common::String *string) { - for (int i = string->size() - 1; i >= 0; i--) { - if ((*string)[i] == '#') { - string->erase(i); - } - } - - string->trim(); -} - -} // End of namespace ZVision diff --git a/engines/zvision/utility/utility.h b/engines/zvision/utility/utility.h deleted file mode 100644 index 0ca26b968d..0000000000 --- a/engines/zvision/utility/utility.h +++ /dev/null @@ -1,47 +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 ZVISION_UTILITY_H -#define ZVISION_UTILITY_H - -#include "common/array.h" - -namespace Common { -class String; -} - -namespace ZVision { - -class ZVision; - -/** - * Removes any line comments using '#' as a sequence start. - * Then removes any trailing and leading 'whitespace' using String::trim() - * Note: String::trim uses isspace() to determine what is whitespace and what is not. - * - * @param string The string to modify. It is modified in place - */ -void trimCommentsAndWhiteSpace(Common::String *string); - -} // End of namespace ZVision - -#endif diff --git a/engines/zvision/video/video.cpp b/engines/zvision/video/video.cpp index c8f968d975..189fb22194 100644 --- a/engines/zvision/video/video.cpp +++ b/engines/zvision/video/video.cpp @@ -27,7 +27,7 @@ #include "graphics/surface.h" #include "zvision/zvision.h" -#include "zvision/utility/clock.h" +#include "zvision/core/clock.h" #include "zvision/graphics/render_manager.h" #include "zvision/graphics/subtitles.h" #include "zvision/video/rlf_decoder.h" diff --git a/engines/zvision/zvision.h b/engines/zvision/zvision.h index 55dddd4f21..78c1c824a1 100644 --- a/engines/zvision/zvision.h +++ b/engines/zvision/zvision.h @@ -25,7 +25,7 @@ #define ZVISION_ZVISION_H #include "zvision/detection.h" -#include "zvision/utility/clock.h" +#include "zvision/core/clock.h" #include "zvision/file/search_manager.h" #include "common/random.h" -- cgit v1.2.3