CHEWY: Rename Debugger to Console

This aligns its name with how most engines have it named
This commit is contained in:
Filippos Karapetis 2022-05-21 23:53:41 +03:00
parent 58cc03fac0
commit f367a2b42b
4 changed files with 21 additions and 21 deletions

View File

@ -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() {

View File

@ -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 <roomNum>\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 <itemNum>\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 <number>\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 <chunk> <entry> <type>\n");
return true;

View File

@ -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

View File

@ -4,7 +4,7 @@ MODULE_OBJS = \
atds.o \
chewy.o \
cursor.o \
debugger.o \
console.o \
detail.o \
effect.o \
events.o \