@ -79,19 +79,19 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
( " data " , bpo : : value < Files : : PathContainer > ( ) - > default_value ( Files : : PathContainer ( ) , " data " )
- > multitoken ( ) - > composing ( ) , " set data directories (later directories have higher priority) " )
( " data-local " , bpo : : value < std : : string> ( ) - > default_value ( " " ) ,
( " data-local " , bpo : : value < File s: : E scapeHashS tring> ( ) - > default_value ( " " ) ,
" set local data directory (highest priority) " )
( " fallback-archive " , bpo : : value < Strings Vector> ( ) - > default_value ( Strings Vector( ) , " fallback-archive " )
( " fallback-archive " , bpo : : value < Files: : Escape StringVector> ( ) - > default_value ( Files: : Escape StringVector( ) , " fallback-archive " )
- > multitoken ( ) , " set fallback BSA archives (later archives have higher priority) " )
( " resources " , bpo : : value < std : : string> ( ) - > default_value ( " resources " ) ,
( " resources " , bpo : : value < File s: : E scapeHashS tring> ( ) - > default_value ( " resources " ) ,
" set resources directory " )
( " start " , bpo : : value < std : : string> ( ) - > default_value ( " " ) ,
( " start " , bpo : : value < File s: : E scapeHashS tring> ( ) - > default_value ( " " ) ,
" set initial cell " )
( " content " , bpo : : value < Strings Vector> ( ) - > default_value ( Strings Vector( ) , " " )
( " content " , bpo : : value < Files: : Escape StringVector> ( ) - > default_value ( Files: : Escape StringVector( ) , " " )
- > multitoken ( ) , " content file(s): esm/esp, or omwgame/omwaddon " )
( " no-sound " , bpo : : value < bool > ( ) - > implicit_value ( true )
@ -109,7 +109,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
( " script-console " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " enable console-only script functionality " )
( " script-run " , bpo : : value < std : : string> ( ) - > default_value ( " " ) ,
( " script-run " , bpo : : value < File s: : E scapeHashS tring> ( ) - > default_value ( " " ) ,
" select a file containing a list of console commands that is executed on startup " )
( " script-warn " , bpo : : value < int > ( ) - > implicit_value ( 1 )
@ -119,13 +119,13 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
" \t 1 - show warning but consider script as correctly compiled anyway \n "
" \t 2 - treat warnings as errors " )
( " script-blacklist " , bpo : : value < Strings Vector> ( ) - > default_value ( Strings Vector( ) , " " )
( " script-blacklist " , bpo : : value < Files: : Escape StringVector> ( ) - > default_value ( Files: : Escape StringVector( ) , " " )
- > multitoken ( ) , " ignore the specified script (if the use of the blacklist is enabled) " )
( " script-blacklist-use " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( true ) , " enable script blacklisting " )
( " load-savegame " , bpo : : value < std : : string> ( ) - > default_value ( " " ) ,
( " load-savegame " , bpo : : value < File s: : E scapeHashS tring> ( ) - > default_value ( " " ) ,
" load a save game file on game startup (specify an absolute filename or a filename relative to the current working directory) " )
( " skip-menu " , bpo : : value < bool > ( ) - > implicit_value ( true )
@ -137,14 +137,14 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
( " fs-strict " , bpo : : value < bool > ( ) - > implicit_value ( true )
- > default_value ( false ) , " strict file system handling (no case folding) " )
( " encoding " , bpo : : value < std : : string> ( ) - >
( " encoding " , bpo : : value < File s: : E scapeHashS tring> ( ) - >
default_value ( " win1252 " ) ,
" Character encoding used in OpenMW game messages: \n "
" \n \t win1250 - Central and Eastern European such as Polish, Czech, Slovak, Hungarian, Slovene, Bosnian, Croatian, Serbian (Latin script), Romanian and Albanian languages \n "
" \n \t win1251 - Cyrillic alphabet such as Russian, Bulgarian, Serbian Cyrillic and other languages \n "
" \n \t win1252 - Western European (Latin) alphabet, used by default " )
( " fallback " , bpo : : value < FallbackMap > ( ) - > default_value ( FallbackMap ( ) , " " )
( " fallback " , bpo : : value < FallbackMap > ( ) - > default_value ( FallbackMap ( ) , " " )
- > multitoken ( ) - > composing ( ) , " fallback values " )
( " no-grab " , " Don't grab mouse cursor " )
@ -173,20 +173,20 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
{
cfgMgr . readConfiguration ( variables , desc , true ) ;
Version : : Version v = Version : : getOpenmwVersion ( variables [ " resources " ] . as < std : : string> ( ) ) ;
Version : : Version v = Version : : getOpenmwVersion ( variables [ " resources " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
std : : cout < < v . describe ( ) < < std : : endl ;
return false ;
}
cfgMgr . readConfiguration ( variables , desc ) ;
Version : : Version v = Version : : getOpenmwVersion ( variables [ " resources " ] . as < std : : string> ( ) ) ;
Version : : Version v = Version : : getOpenmwVersion ( variables [ " resources " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
std : : cout < < v . describe ( ) < < std : : endl ;
engine . setGrabMouse ( ! variables . count ( " no-grab " ) ) ;
// Font encoding settings
std : : string encoding ( variables [ " encoding " ] . as < std : : string> ( ) ) ;
std : : string encoding ( variables [ " encoding " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
std : : cout < < ToUTF8 : : encodingUsingMessage ( encoding ) < < std : : endl ;
engine . setEncoding ( ToUTF8 : : calculateEncoding ( encoding ) ) ;
@ -195,7 +195,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
Files : : PathContainer dataDirs ( variables [ " data " ] . as < Files : : PathContainer > ( ) ) ;
std : : string local ( variables [ " data-local " ] . as < std : : string> ( ) ) ;
std : : string local ( variables [ " data-local " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
if ( ! local . empty ( ) )
{
dataDirs . push_back ( Files : : PathContainer : : value_type ( local ) ) ;
@ -206,15 +206,15 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
engine . setDataDirs ( dataDirs ) ;
// fallback archives
StringsVector archives = variables [ " fallback-archive " ] . as < Strings Vector> ( ) ;
StringsVector archives = variables [ " fallback-archive " ] . as < Files: : Escape StringVector> ( ) . toStdStringVector ( ) ;
for ( StringsVector : : const_iterator it = archives . begin ( ) ; it ! = archives . end ( ) ; + + it )
{
engine . addArchive ( * it ) ;
}
engine . setResourceDir ( variables [ " resources " ] . as < std : : string> ( ) ) ;
engine . setResourceDir ( variables [ " resources " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
StringsVector content = variables [ " content " ] . as < Strings Vector> ( ) ;
StringsVector content = variables [ " content " ] . as < Files: : Escape StringVector> ( ) . toStdStringVector ( ) ;
if ( content . empty ( ) )
{
std : : cout < < " No content file given (esm/esp, nor omwgame/omwaddon). Aborting... " < < std : : endl ;
@ -229,7 +229,7 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
}
// startup-settings
engine . setCell ( variables [ " start " ] . as < std : : string> ( ) ) ;
engine . setCell ( variables [ " start " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
engine . setSkipMenu ( variables [ " skip-menu " ] . as < bool > ( ) , variables [ " new-game " ] . as < bool > ( ) ) ;
if ( ! variables [ " skip-menu " ] . as < bool > ( ) & & variables [ " new-game " ] . as < bool > ( ) )
std : : cerr < < " new-game used without skip-menu -> ignoring it " < < std : : endl ;
@ -239,11 +239,11 @@ bool parseOptions (int argc, char** argv, OMW::Engine& engine, Files::Configurat
engine . setCompileAllDialogue ( variables [ " script-all-dialogue " ] . as < bool > ( ) ) ;
engine . setScriptsVerbosity ( variables [ " script-verbose " ] . as < bool > ( ) ) ;
engine . setScriptConsoleMode ( variables [ " script-console " ] . as < bool > ( ) ) ;
engine . setStartupScript ( variables [ " script-run " ] . as < std : : string> ( ) ) ;
engine . setStartupScript ( variables [ " script-run " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
engine . setWarningsMode ( variables [ " script-warn " ] . as < int > ( ) ) ;
engine . setScriptBlacklist ( variables [ " script-blacklist " ] . as < Strings Vector> ( ) ) ;
engine . setScriptBlacklist ( variables [ " script-blacklist " ] . as < Files: : Escape StringVector> ( ) . toStdStringVector ( ) ) ;
engine . setScriptBlacklistUse ( variables [ " script-blacklist-use " ] . as < bool > ( ) ) ;
engine . setSaveGameFile ( variables [ " load-savegame " ] . as < std : : string> ( ) ) ;
engine . setSaveGameFile ( variables [ " load-savegame " ] . as < File s: : E scapeHashS tring> ( ) . toStdString ( ) ) ;
// other settings
engine . setSoundUsage ( ! variables [ " no-sound " ] . as < bool > ( ) ) ;