ScummVM
Base Namespace Reference

Functions

static void NORETURN_PRE usage (const char *s,...) GCC_PRINTF(1
 
static void ensureFirstCommand (const Common::String &existingCommand, const char *newCommand)
 
static Common::String buildQualifiedGameName (const Common::String &engineId, const Common::String &gameId)
 
void registerDefaults ()
 Register various defaults with the ConfigManager. More...
 
static bool parseGameName (const Common::String &gameName, Common::String &engineId, Common::String &gameId)
 
static QualifiedGameDescriptor findGameMatchingName (const Common::String &name)
 
static Common::String createTemporaryTarget (const Common::String &engineId, const Common::String &gameId)
 
Common::String parseCommandLine (Common::StringMap &settings, int argc, const char *const *argv)
 Parse the command line for options and a command; the options are stored in the map 'settings, the command (if any) is returned. More...
 
static void listGames ()
 List all supported game IDs, i.e. More...
 
static void listEngines ()
 List all supported engines, i.e. More...
 
static void listTargets ()
 List all targets which are configured in the config file. More...
 
static Common::Error listSaves (const Common::String &singleTarget)
 List all saves states for the given target. More...
 
static void listThemes ()
 Lists all usable themes. More...
 
static void listAudioDevices ()
 Lists all output devices. More...
 
static DetectedGames getGameList (const Common::FSNode &dir)
 Display all games in the given directory, or current directory if empty. More...
 
static DetectedGames recListGames (const Common::FSNode &dir, const Common::String &engineId, const Common::String &gameId, bool recursive)
 
static Common::String detectGames (const Common::String &path, const Common::String &engineId, const Common::String &gameId, bool recursive)
 Display all games in the given directory, return ID of first detected game. More...
 
static int recAddGames (const Common::FSNode &dir, const Common::String &engineId, const Common::String &gameId, bool recursive)
 
static bool addGames (const Common::String &path, const Common::String &engineId, const Common::String &gameId, bool recursive)
 
static void runDetectorTest ()
 
void upgradeTargets ()
 
bool processSettings (Common::String &command, Common::StringMap &settings, Common::Error &err)
 Process the command line options and arguments. More...
 

Variables

static const char USAGE_STRING []
 
static const char HELP_STRING []
 
static const char * s_appName = "scummvm"
 
static void NORETURN_PRE NORETURN_POST
 

Function Documentation

◆ addGames()

static bool Base::addGames ( const Common::String path,
const Common::String engineId,
const Common::String gameId,
bool  recursive 
)
static

Definition at line 1060 of file commandLine.cpp.

◆ buildQualifiedGameName()

static Common::String Base::buildQualifiedGameName ( const Common::String engineId,
const Common::String gameId 
)
static

Definition at line 206 of file commandLine.cpp.

◆ createTemporaryTarget()

static Common::String Base::createTemporaryTarget ( const Common::String engineId,
const Common::String gameId 
)
static

Definition at line 366 of file commandLine.cpp.

◆ detectGames()

static Common::String Base::detectGames ( const Common::String path,
const Common::String engineId,
const Common::String gameId,
bool  recursive 
)
static

Display all games in the given directory, return ID of first detected game.

Definition at line 991 of file commandLine.cpp.

◆ ensureFirstCommand()

static void Base::ensureFirstCommand ( const Common::String existingCommand,
const char *  newCommand 
)
static

Definition at line 201 of file commandLine.cpp.

◆ findGameMatchingName()

static QualifiedGameDescriptor Base::findGameMatchingName ( const Common::String name)
static

Definition at line 345 of file commandLine.cpp.

◆ getGameList()

static DetectedGames Base::getGameList ( const Common::FSNode dir)
static

Display all games in the given directory, or current directory if empty.

Definition at line 951 of file commandLine.cpp.

◆ listAudioDevices()

static void Base::listAudioDevices ( )
static

Lists all output devices.

Definition at line 935 of file commandLine.cpp.

◆ listEngines()

static void Base::listEngines ( )
static

List all supported engines, i.e.

all loaded plugins.

Definition at line 778 of file commandLine.cpp.

◆ listGames()

static void Base::listGames ( )
static

List all supported game IDs, i.e.

all games which any loaded plugin supports.

Definition at line 762 of file commandLine.cpp.

◆ listSaves()

static Common::Error Base::listSaves ( const Common::String singleTarget)
static

List all saves states for the given target.

Definition at line 824 of file commandLine.cpp.

◆ listTargets()

static void Base::listTargets ( )
static

List all targets which are configured in the config file.

Definition at line 790 of file commandLine.cpp.

◆ listThemes()

static void Base::listThemes ( )
static

Lists all usable themes.

Definition at line 922 of file commandLine.cpp.

◆ parseCommandLine()

Common::String Base::parseCommandLine ( Common::StringMap settings,
int  argc,
const char *const *  argv 
)

Parse the command line for options and a command; the options are stored in the map 'settings, the command (if any) is returned.

Definition at line 456 of file commandLine.cpp.

◆ parseGameName()

static bool Base::parseGameName ( const Common::String gameName,
Common::String engineId,
Common::String gameId 
)
static

Definition at line 316 of file commandLine.cpp.

◆ processSettings()

bool Base::processSettings ( Common::String command,
Common::StringMap settings,
Common::Error err 
)

Process the command line options and arguments.

Returns true if everything was handled and ScummVM should quit (e.g. because "--help" was specified, and handled).

Parameters
[in]commandthe command as returned by parseCommandLine
[in]settingsthe settings as returned by parseCommandLine
[out]errindicates whether any error occurred, and which
Returns
true if the command was completely processed and ScummVM should quit, false otherwise

Definition at line 1272 of file commandLine.cpp.

◆ recAddGames()

static int Base::recAddGames ( const Common::FSNode dir,
const Common::String engineId,
const Common::String gameId,
bool  recursive 
)
static

Definition at line 1020 of file commandLine.cpp.

◆ recListGames()

static DetectedGames Base::recListGames ( const Common::FSNode dir,
const Common::String engineId,
const Common::String gameId,
bool  recursive 
)
static

Definition at line 971 of file commandLine.cpp.

◆ registerDefaults()

void Base::registerDefaults ( )

Register various defaults with the ConfigManager.

Definition at line 213 of file commandLine.cpp.

◆ runDetectorTest()

static void Base::runDetectorTest ( )
static

Definition at line 1073 of file commandLine.cpp.

◆ upgradeTargets()

void Base::upgradeTargets ( )

Definition at line 1145 of file commandLine.cpp.

◆ usage()

static void Base::usage ( const char *  s,
  ... 
)
static

Definition at line 187 of file commandLine.cpp.

Variable Documentation

◆ HELP_STRING

const char Base::HELP_STRING[]
static

Definition at line 64 of file commandLine.cpp.

◆ NORETURN_POST

void NORETURN_PRE Base::NORETURN_POST

Definition at line 185 of file commandLine.cpp.

◆ s_appName

const char* Base::s_appName = "scummvm"
static

Definition at line 183 of file commandLine.cpp.

◆ USAGE_STRING

const char Base::USAGE_STRING[]
static
Initial value:
=
"%s: %s\n"
"Usage: %s [OPTIONS]... [GAME]\n"
"\n"
"Try '%s --help' for more options.\n"

Definition at line 53 of file commandLine.cpp.