mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-27 05:32:45 +00:00
CHEWY: TCF resources contain error messages, not in-game text
This commit is contained in:
parent
b394b1b687
commit
891813c9e1
@ -31,15 +31,15 @@
|
||||
namespace Chewy {
|
||||
|
||||
Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) {
|
||||
registerCmd("dump", WRAP_METHOD(Console, Cmd_Dump));
|
||||
registerCmd("dump_bg", WRAP_METHOD(Console, Cmd_DumpBg));
|
||||
registerCmd("draw", WRAP_METHOD(Console, Cmd_Draw));
|
||||
registerCmd("play_sound", WRAP_METHOD(Console, Cmd_PlaySound));
|
||||
registerCmd("play_speech", WRAP_METHOD(Console, Cmd_PlaySpeech));
|
||||
registerCmd("play_music", WRAP_METHOD(Console, Cmd_PlayMusic));
|
||||
registerCmd("play_video", WRAP_METHOD(Console, Cmd_PlayVideo));
|
||||
registerCmd("video_info", WRAP_METHOD(Console, Cmd_VideoInfo));
|
||||
registerCmd("text", WRAP_METHOD(Console, Cmd_Text));
|
||||
registerCmd("dump", WRAP_METHOD(Console, Cmd_Dump));
|
||||
registerCmd("dump_bg", WRAP_METHOD(Console, Cmd_DumpBg));
|
||||
registerCmd("draw", WRAP_METHOD(Console, Cmd_Draw));
|
||||
registerCmd("play_sound", WRAP_METHOD(Console, Cmd_PlaySound));
|
||||
registerCmd("play_speech", WRAP_METHOD(Console, Cmd_PlaySpeech));
|
||||
registerCmd("play_music", WRAP_METHOD(Console, Cmd_PlayMusic));
|
||||
registerCmd("play_video", WRAP_METHOD(Console, Cmd_PlayVideo));
|
||||
registerCmd("video_info", WRAP_METHOD(Console, Cmd_VideoInfo));
|
||||
registerCmd("error_message", WRAP_METHOD(Console, Cmd_ErrorMessage));
|
||||
}
|
||||
|
||||
Console::~Console() {
|
||||
@ -177,18 +177,18 @@ bool Console::Cmd_VideoInfo(int argc, const char **argv) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Console::Cmd_Text(int argc, const char **argv) {
|
||||
bool Console::Cmd_ErrorMessage(int argc, const char **argv) {
|
||||
if (argc < 2) {
|
||||
debugPrintf("Usage: <file> <text number>\n");
|
||||
debugPrintf("Usage: error_message <file> <message number>\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
Common::String filename = argv[1];
|
||||
int resNum = atoi(argv[2]);
|
||||
|
||||
TextResource *res = new TextResource(filename);
|
||||
Common::String str = res->getText(resNum);
|
||||
this->debugPrintf("Text: %s\n", str.c_str());
|
||||
ErrorMessage *res = new ErrorMessage(filename);
|
||||
Common::String str = res->getErrorMessage(resNum);
|
||||
this->debugPrintf("Error message: %s\n", str.c_str());
|
||||
delete res;
|
||||
|
||||
return true;
|
||||
|
@ -45,7 +45,7 @@ private:
|
||||
bool Cmd_PlayMusic(int argc, const char **argv);
|
||||
bool Cmd_PlayVideo(int argc, const char **argv);
|
||||
bool Cmd_VideoInfo(int argc, const char **argv);
|
||||
bool Cmd_Text(int argc, const char **argv);
|
||||
bool Cmd_ErrorMessage(int argc, const char **argv);
|
||||
};
|
||||
|
||||
} // End of namespace Chewy
|
||||
|
@ -268,7 +268,7 @@ SoundChunk *SoundResource::getSound(uint num) {
|
||||
return sound;
|
||||
}
|
||||
|
||||
Common::String TextResource::getText(uint num) {
|
||||
Common::String ErrorMessage::getErrorMessage(uint num) {
|
||||
assert(num < _chunkList.size());
|
||||
|
||||
Chunk *chunk = &_chunkList[num];
|
||||
|
@ -169,12 +169,12 @@ public:
|
||||
SoundChunk *getSound(uint num);
|
||||
};
|
||||
|
||||
class TextResource : public Resource {
|
||||
class ErrorMessage : public Resource {
|
||||
public:
|
||||
TextResource(Common::String filename) : Resource(filename) {}
|
||||
virtual ~TextResource() {}
|
||||
ErrorMessage(Common::String filename) : Resource(filename) {}
|
||||
virtual ~ErrorMessage() {}
|
||||
|
||||
Common::String getText(uint num);
|
||||
Common::String getErrorMessage(uint num);
|
||||
};
|
||||
|
||||
class VideoResource : public Resource {
|
||||
|
Loading…
x
Reference in New Issue
Block a user