diff options
author | Filippos Karapetis | 2016-09-21 00:50:53 +0300 |
---|---|---|
committer | Filippos Karapetis | 2016-10-03 00:33:41 +0300 |
commit | f017940ca08e32a206982376df0bdc334acdea55 (patch) | |
tree | ef91dae06046b3379be120ed6d22e81c7b415488 /engines/chewy/console.cpp | |
parent | b60f5023ed8959798b6246e227717cc0ff1e8d44 (diff) | |
download | scummvm-rg350-f017940ca08e32a206982376df0bdc334acdea55.tar.gz scummvm-rg350-f017940ca08e32a206982376df0bdc334acdea55.tar.bz2 scummvm-rg350-f017940ca08e32a206982376df0bdc334acdea55.zip |
CHEWY: Initial work on game videos
Diffstat (limited to 'engines/chewy/console.cpp')
-rw-r--r-- | engines/chewy/console.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/engines/chewy/console.cpp b/engines/chewy/console.cpp index 8d55651ffc..bf7e49c2d0 100644 --- a/engines/chewy/console.cpp +++ b/engines/chewy/console.cpp @@ -37,6 +37,8 @@ Console::Console(ChewyEngine *vm) : GUI::Debugger(), _vm(vm) { 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)); } @@ -149,6 +151,35 @@ bool Console::Cmd_PlayMusic(int argc, const char **argv) { return true; } +bool Console::Cmd_PlayVideo(int argc, const char **argv) { + if (argc < 2) { + debugPrintf("Usage: play_video <number>\n"); + return true; + } + + int resNum = atoi(argv[1]); + debugPrintf("TODO: Play video %d", resNum); + // TODO + + return true; +} + +bool Console::Cmd_VideoInfo(int argc, const char **argv) { + if (argc < 2) { + debugPrintf("Usage: video_info <number>\n"); + return true; + } + + int resNum = atoi(argv[1]); + VideoResource *res = new VideoResource("cut.tap"); + VideoChunk *header = res->getVideoHeader(resNum); + debugPrintf("Size: %d, %d x %d, %d frames, %d ms frame delay, first frame at %d\n", header->size, header->width, header->height, header->frameCount, header->frameDelay, header->firstFrameOffset); + delete header; + delete res; + + return true; +} + bool Console::Cmd_Text(int argc, const char **argv) { if (argc < 2) { debugPrintf("Usage: <file> <text number>\n"); |