mirror of
https://github.com/scummvm/scummvm.git
synced 2026-05-21 05:40:43 +00:00
BASE: EVENTRECORDER: control fast mode via record-mode argument
This commit is contained in:
@@ -204,7 +204,7 @@ static const char HELP_STRING4[] =
|
||||
" atari, macintosh, macintoshbw, vgaGray)\n"
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
" --record-mode=MODE Specify record mode for event recorder (record, playback,\n"
|
||||
" info, update, passthrough [default])\n"
|
||||
" fast_playback, info, update, passthrough [default])\n"
|
||||
" --record-file-name=FILE Specify record file name\n"
|
||||
" --disable-display Disable any gfx output. Used for headless events\n"
|
||||
" playback by Event Recorder\n"
|
||||
@@ -212,7 +212,6 @@ static const char HELP_STRING4[] =
|
||||
" (default: 60000)\n"
|
||||
" --list-records Display a list of recordings for the target specified\n"
|
||||
" --list-records-json Display a list of recordings in JSON format for the target specified\n"
|
||||
" --fast-mode Enable fast mode for event recorder playback\n"
|
||||
#endif
|
||||
"\n"
|
||||
#if defined(ENABLE_SKY) || defined(ENABLE_QUEEN)
|
||||
@@ -385,7 +384,6 @@ void registerDefaults() {
|
||||
|
||||
#ifdef ENABLE_EVENTRECORDER
|
||||
ConfMan.registerDefault("disable_display", false);
|
||||
ConfMan.registerDefault("fast_mode", false);
|
||||
#endif
|
||||
ConfMan.registerDefault("record_mode", "none");
|
||||
ConfMan.registerDefault("record_file_name", "record.bin");
|
||||
@@ -833,9 +831,6 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha
|
||||
|
||||
DO_LONG_OPTION_INT("screenshot-period")
|
||||
END_OPTION
|
||||
|
||||
DO_LONG_OPTION_BOOL("fast-mode")
|
||||
END_OPTION
|
||||
#endif
|
||||
|
||||
DO_LONG_OPTION("opl-driver")
|
||||
|
||||
+3
-3
@@ -587,9 +587,6 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
|
||||
if (settings.contains("disable-display")) {
|
||||
ConfMan.setInt("disable_display", 1, Common::ConfigManager::kTransientDomain);
|
||||
}
|
||||
if (settings.contains("fast-mode")) {
|
||||
ConfMan.setInt("fast_mode", 1, Common::ConfigManager::kTransientDomain);
|
||||
}
|
||||
#endif
|
||||
setupGraphics(system);
|
||||
|
||||
@@ -791,6 +788,9 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) {
|
||||
g_eventRec.init(recordFileName, GUI::EventRecorder::kRecorderUpdate);
|
||||
} else if (recordMode == "playback") {
|
||||
g_eventRec.init(recordFileName, GUI::EventRecorder::kRecorderPlayback);
|
||||
} else if (recordMode == "fast_playback") {
|
||||
g_eventRec.init(recordFileName, GUI::EventRecorder::kRecorderPlayback);
|
||||
g_eventRec.setFastPlayback(true);
|
||||
} else if ((recordMode == "info") && (!recordFileName.empty())) {
|
||||
Common::PlaybackFile record;
|
||||
record.openRead(recordFileName);
|
||||
|
||||
@@ -167,7 +167,6 @@ Short options are listed where they are available.
|
||||
``--engine=ID``,,"In combination with ``--list-games`` or ``--list-all-games`` only lists games for this engine",
|
||||
``--engine-speed=NUM``,,"Sets frame-per-second limit for Grim Fandango or Escape from Monkey Island. 0 is no limit. Allowed values 0 - 100", 60
|
||||
``--extrapath=PATH``,,":ref:`Extra path to additional game data <extra>`",
|
||||
``--fast-mode``,, "Enable fast playback mode (`Event Recorder <https://wiki.scummvm.org/index.php/Event_Recorder>`_)",
|
||||
``--filtering``,,":ref:`Forces filtered graphics mode <filtering>`",false
|
||||
``--fullscreen``,``-f``,":ref:`Forces full-screen mode <fullscreen>`",false
|
||||
``--game=ID``,,"In combination with ``--add`` or ``--detect`` only adds or attempts to detect the game with specified ID.",
|
||||
@@ -228,7 +227,7 @@ Short options are listed where they are available.
|
||||
- windows",
|
||||
``--random-seed=SEED``,,":ref:`Sets the random seed used to initialize entropy <seed>`",
|
||||
``--record-file-name=FILE``,,"Specifies recorded file name (`Event Recorder <https://wiki.scummvm.org/index.php/Event_Recorder>`_)",record.bin
|
||||
``--record-mode=MODE``,,"Specifies record mode for `Event Recorder <https://wiki.scummvm.org/index.php/Event_Recorder>`_. Allowed values: record, playback, info, update, passthrough.", none
|
||||
``--record-mode=MODE``,,"Specifies record mode for `Event Recorder <https://wiki.scummvm.org/index.php/Event_Recorder>`_. Allowed values: record, playback, fast_playback, info, update, passthrough.", none
|
||||
``--recursive``,,"In combination with ``--add or ``--detect`` recurses down all subdirectories",
|
||||
``--renderer=RENDERER``,,"Selects 3D renderer. Allowed values: software, opengl, opengl_shaders",
|
||||
``--render-mode=MODE``,,":ref:`Enables additional render modes <render>`.
|
||||
|
||||
@@ -379,6 +379,9 @@ Common::String EventRecorder::generateRecordFileName(const Common::String &targe
|
||||
return "";
|
||||
}
|
||||
|
||||
void EventRecorder::setFastPlayback(bool fastPlayback) {
|
||||
_fastPlayback = fastPlayback;
|
||||
}
|
||||
|
||||
void EventRecorder::init(const Common::String &recordFileName, RecordMode mode) {
|
||||
_fakeMixerManager = new NullMixerManager();
|
||||
@@ -389,13 +392,11 @@ void EventRecorder::init(const Common::String &recordFileName, RecordMode mode)
|
||||
_lastScreenshotTime = 0;
|
||||
_recordMode = mode;
|
||||
_needcontinueGame = false;
|
||||
_fastPlayback = false;
|
||||
if (ConfMan.hasKey("disable_display")) {
|
||||
DebugMan.enableDebugChannel("EventRec");
|
||||
gDebugLevel = 1;
|
||||
}
|
||||
if (ConfMan.hasKey("fast_mode")) {
|
||||
_fastPlayback = ConfMan.getInt("fast_mode") != 0;
|
||||
}
|
||||
if ((_recordMode == kRecorderPlayback) || (_recordMode == kRecorderUpdate)) {
|
||||
debugC(1, kDebugLevelEventRec, "playback:action=\"Load file\" filename=%s", recordFileName.c_str());
|
||||
Common::EventDispatcher *eventDispatcher = g_system->getEventManager()->getEventDispatcher();
|
||||
|
||||
@@ -80,6 +80,7 @@ public:
|
||||
void init(const Common::String &recordFileName, RecordMode mode);
|
||||
void deinit();
|
||||
bool processDelayMillis();
|
||||
void setFastPlayback(bool fastPlayback);
|
||||
uint32 getRandomSeed(const Common::String &name);
|
||||
void processTimeAndDate(TimeDate &td, bool skipRecord);
|
||||
void processMillis(uint32 &millis, bool skipRecord);
|
||||
|
||||
Reference in New Issue
Block a user