From f367a2b42b621ca6fca74e35239d0a9ded68edad Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 21 May 2022 23:53:41 +0300 Subject: [PATCH] CHEWY: Rename Debugger to Console This aligns its name with how most engines have it named --- engines/chewy/chewy.cpp | 4 ++-- engines/chewy/{debugger.cpp => console.cpp} | 26 ++++++++++----------- engines/chewy/{debugger.h => console.h} | 10 ++++---- engines/chewy/module.mk | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) rename engines/chewy/{debugger.cpp => console.cpp} (78%) rename engines/chewy/{debugger.h => console.h} (90%) diff --git a/engines/chewy/chewy.cpp b/engines/chewy/chewy.cpp index 17ed69e6d80..97267c3bea9 100644 --- a/engines/chewy/chewy.cpp +++ b/engines/chewy/chewy.cpp @@ -25,7 +25,7 @@ #include "engines/util.h" #include "graphics/palette.h" #include "chewy/chewy.h" -#include "chewy/debugger.h" +#include "chewy/console.h" #include "chewy/events.h" #include "chewy/globals.h" #include "chewy/main.h" @@ -73,7 +73,7 @@ void ChewyEngine::initialize() { _sound = new Sound(_mixer); _video = new VideoPlayer(); - setDebugger(new Debugger()); + setDebugger(new Console()); } Common::Error ChewyEngine::run() { diff --git a/engines/chewy/debugger.cpp b/engines/chewy/console.cpp similarity index 78% rename from engines/chewy/debugger.cpp rename to engines/chewy/console.cpp index 9cbc6ca5519..cd53c144817 100644 --- a/engines/chewy/debugger.cpp +++ b/engines/chewy/console.cpp @@ -20,7 +20,7 @@ */ #include "common/file.h" -#include "chewy/debugger.h" +#include "chewy/console.h" #include "chewy/globals.h" #include "chewy/chewy.h" #include "chewy/video/video_player.h" @@ -43,18 +43,18 @@ static int strToInt(const char *s) { return (int)tmp; } -Debugger::Debugger() : GUI::Debugger() { - registerCmd("room", WRAP_METHOD(Debugger, Cmd_GotoRoom)); - registerCmd("item", WRAP_METHOD(Debugger, Cmd_Item)); - registerCmd("video", WRAP_METHOD(Debugger, Cmd_PlayVideo)); - registerCmd("walk", WRAP_METHOD(Debugger, Cmd_WalkAreas)); - registerCmd("text", WRAP_METHOD(Debugger, Cmd_Text)); +Console::Console() : GUI::Debugger() { + registerCmd("room", WRAP_METHOD(Console, Cmd_GotoRoom)); + registerCmd("item", WRAP_METHOD(Console, Cmd_Item)); + registerCmd("video", WRAP_METHOD(Console, Cmd_PlayVideo)); + registerCmd("walk", WRAP_METHOD(Console, Cmd_WalkAreas)); + registerCmd("text", WRAP_METHOD(Console, Cmd_Text)); } -Debugger::~Debugger() { +Console::~Console() { } -bool Debugger::Cmd_GotoRoom(int argc, const char **argv) { +bool Console::Cmd_GotoRoom(int argc, const char **argv) { if (argc == 1) { debugPrintf("%s \n", argv[0]); return true; @@ -70,7 +70,7 @@ bool Debugger::Cmd_GotoRoom(int argc, const char **argv) { } } -bool Debugger::Cmd_Item(int argc, const char **argv) { +bool Console::Cmd_Item(int argc, const char **argv) { if (argc == 1) { debugPrintf("%s \n", argv[0]); } else { @@ -82,7 +82,7 @@ bool Debugger::Cmd_Item(int argc, const char **argv) { return true; } -bool Debugger::Cmd_PlayVideo(int argc, const char **argv) { +bool Console::Cmd_PlayVideo(int argc, const char **argv) { if (argc < 2) { debugPrintf("Usage: play_video \n"); return true; @@ -94,12 +94,12 @@ bool Debugger::Cmd_PlayVideo(int argc, const char **argv) { return false; } -bool Debugger::Cmd_WalkAreas(int argc, const char **argv) { +bool Console::Cmd_WalkAreas(int argc, const char **argv) { g_engine->_showWalkAreas = (argc == 2) && !strcmp(argv[1], "on"); return false; } -bool Debugger::Cmd_Text(int argc, const char **argv) { +bool Console::Cmd_Text(int argc, const char **argv) { if (argc < 4) { debugPrintf("Usage: text \n"); return true; diff --git a/engines/chewy/debugger.h b/engines/chewy/console.h similarity index 90% rename from engines/chewy/debugger.h rename to engines/chewy/console.h index bb16d7d5565..41263119396 100644 --- a/engines/chewy/debugger.h +++ b/engines/chewy/console.h @@ -19,14 +19,14 @@ * */ -#ifndef CHEWY_DEBUGGER_H -#define CHEWY_DEBUGGER_H +#ifndef CHEWY_CONSOLE_H +#define CHEWY_CONSOLE_H #include "gui/debugger.h" namespace Chewy { -class Debugger : public GUI::Debugger { +class Console : public GUI::Debugger { protected: bool Cmd_GotoRoom(int argc, const char **argv); bool Cmd_Item(int argc, const char **argv); @@ -35,8 +35,8 @@ protected: bool Cmd_Text(int argc, const char **argv); public: - Debugger(); - ~Debugger() override; + Console(); + ~Console() override; }; } // End of namespace Chewy diff --git a/engines/chewy/module.mk b/engines/chewy/module.mk index 2d64e382f42..12f37213eda 100644 --- a/engines/chewy/module.mk +++ b/engines/chewy/module.mk @@ -4,7 +4,7 @@ MODULE_OBJS = \ atds.o \ chewy.o \ cursor.o \ - debugger.o \ + console.o \ detail.o \ effect.o \ events.o \