Permalink
Comparing changes
Open a pull request
- 6 commits
- 13 files changed
- 0 commit comments
- 1 contributor
Commits on Dec 25, 2014
Unified
Split
Showing
with
177 additions
and 202 deletions.
- +7 −3 engines/zvision/core/console.cpp
- +5 −5 engines/zvision/core/events.cpp
- +1 −1 engines/zvision/module.mk
- +3 −1 engines/zvision/scripting/actions.cpp
- +145 −149 engines/zvision/{core → scripting}/menu.cpp
- +6 −12 engines/zvision/{core → scripting}/menu.h
- +6 −1 engines/zvision/scripting/script_manager.h
- +0 −4 engines/zvision/scripting/sidefx/animation_node.cpp
- +0 −2 engines/zvision/scripting/sidefx/animation_node.h
- +1 −0 engines/zvision/scripting/sidefx/music_node.h
- +2 −9 engines/zvision/sound/zork_raw.cpp
- +0 −14 engines/zvision/sound/zork_raw.h
- +1 −1 engines/zvision/zvision.cpp
| @@ -79,12 +79,14 @@ bool Console::cmdLoadSound(int argc, const char **argv) { | ||
| Audio::AudioStream *soundStream = makeRawZorkStream(argv[1], _engine); | ||
| Audio::SoundHandle handle; | ||
| _engine->_mixer->playStream(Audio::Mixer::kPlainSoundType, &handle, soundStream, -1, 100, 0, DisposeAfterUse::YES, false, false); | ||
|
|
||
| } else if (argc == 4) { | ||
| int isStereo = atoi(argv[3]); | ||
|
|
||
| Common::File *file = new Common::File(); | ||
| file->open(argv[1]); | ||
| if (!_engine->getSearchManager()->openFile(*file, argv[1])) { | ||
| warning("File not found: %s", argv[1]); | ||
| return true; | ||
| } | ||
|
|
||
| Audio::AudioStream *soundStream = makeRawZorkStream(file, atoi(argv[2]), isStereo == 0 ? false : true); | ||
| Audio::SoundHandle handle; | ||
| @@ -104,8 +106,10 @@ bool Console::cmdRawToWav(int argc, const char **argv) { | ||
| } | ||
|
|
||
| Common::File file; | ||
| if (!file.open(argv[1])) | ||
| if (!_engine->getSearchManager()->openFile(file, argv[1])) { | ||
| warning("File not found: %s", argv[1]); | ||
| return true; | ||
| } | ||
|
|
||
| Audio::AudioStream *audioStream = makeRawZorkStream(argv[1], _engine); | ||
|
|
||
| @@ -28,7 +28,7 @@ | ||
| #include "zvision/graphics/cursors/cursor_manager.h" | ||
| #include "zvision/graphics/render_manager.h" | ||
| #include "zvision/scripting/script_manager.h" | ||
| #include "zvision/core/menu.h" | ||
| #include "zvision/scripting/menu.h" | ||
| #include "zvision/sound/zork_raw.h" | ||
|
|
||
| #include "common/events.h" | ||
| @@ -43,19 +43,19 @@ void ZVision::shortKeys(Common::Event event) { | ||
| if (event.kbd.hasFlags(Common::KBD_CTRL)) { | ||
| switch (event.kbd.keycode) { | ||
| case Common::KEYCODE_s: | ||
| if (getMenuBarEnable() & menuBar_Save) | ||
| if (getMenuBarEnable() & kMenubarSave) | ||
| _scriptManager->changeLocation('g', 'j', 's', 'e', 0); | ||
| break; | ||
| case Common::KEYCODE_r: | ||
| if (getMenuBarEnable() & menuBar_Restore) | ||
| if (getMenuBarEnable() & kMenubarRestore) | ||
| _scriptManager->changeLocation('g', 'j', 'r', 'e', 0); | ||
| break; | ||
| case Common::KEYCODE_p: | ||
| if (getMenuBarEnable() & menuBar_Settings) | ||
| if (getMenuBarEnable() & kMenubarSettings) | ||
| _scriptManager->changeLocation('g', 'j', 'p', 'e', 0); | ||
| break; | ||
| case Common::KEYCODE_q: | ||
| if (getMenuBarEnable() & menuBar_Exit) | ||
| if (getMenuBarEnable() & kMenubarExit) | ||
| ifQuit(); | ||
| break; | ||
| default: | ||
| @@ -4,7 +4,6 @@ MODULE_OBJS := \ | ||
| core/console.o \ | ||
| core/clock.o \ | ||
| core/events.o \ | ||
| core/menu.o \ | ||
| core/save_manager.o \ | ||
| detection.o \ | ||
| file/lzss_read_stream.o \ | ||
| @@ -30,6 +29,7 @@ MODULE_OBJS := \ | ||
| scripting/controls/slot_control.o \ | ||
| scripting/controls/titler_control.o \ | ||
| scripting/inventory.o \ | ||
| scripting/menu.o \ | ||
| scripting/scr_file_handling.o \ | ||
| scripting/script_manager.o \ | ||
| scripting/sidefx/animation_node.o \ | ||
| @@ -477,7 +477,9 @@ ActionMusic::ActionMusic(ZVision *engine, int32 slotkey, const Common::String &l | ||
|
|
||
| sscanf(line.c_str(), "%u %24s %u %u", &type, fileNameBuffer, &loop, &volume); | ||
|
|
||
| // type 4 are midi sound effect files | ||
| // Type 4 actions are MIDI commands, not files. These are only used by | ||
| // Zork: Nemesis, for the flute and piano puzzles (tj4e and ve6f, as well | ||
| // as vr) | ||
| if (type == 4) { | ||
| _midi = true; | ||
| int note; | ||
Oops, something went wrong.