{ "opt", ArgSettingsFilename, (void *) NULL, FALSE, INVALID },
{ "loadPositionFile", ArgFilename, (void *) &appData.loadPositionFile, FALSE, INVALID },
{ "tourneyFile", ArgFilename, (void *) &appData.tourneyFile, FALSE, INVALID },
+ { "is", ArgString, (void *) &icsNick, FALSE, INVALID },
{ "loadGameFile", ArgFilename, (void *) &appData.loadGameFile, FALSE, INVALID },
{ "", ArgNone, NULL, FALSE, INVALID },
/* keyword arguments */
{ "xtitle", ArgFalse, (void *) &appData.titleInWindow, FALSE, INVALID },
{ "flashCount", ArgInt, (void *) &appData.flashCount, XBOARD, INVALID }, // let X handle this
{ "flashRate", ArgInt, (void *) &appData.flashRate, XBOARD, (ArgIniType) FLASH_RATE },
- { "pixmapDirectory", ArgFilename, (void *) &appData.pixmapDirectory, XBOARD, (ArgIniType) "" },
- { "pixmap", ArgFilename, (void *) &appData.pixmapDirectory, FALSE, INVALID },
- { "bitmapDirectory", ArgFilename, (void *) &appData.bitmapDirectory, XBOARD, (ArgIniType) "" },
- { "bm", ArgFilename, (void *) &appData.bitmapDirectory, FALSE, INVALID },
+ { "pngDirectory", ArgFilename, (void *) &appData.pngDirectory, XBOARD, (ArgIniType) "" },
+ { "png", ArgFilename, (void *) &appData.pngDirectory, FALSE, INVALID },
{ "soundDirectory", ArgFilename, (void *) &appData.soundDirectory, XBOARD, (ArgIniType) "" },
{ "msLoginDelay", ArgInt, (void *) &appData.msLoginDelay, XBOARD, (ArgIniType) MS_LOGIN_DELAY },
{ "pasteSelection", ArgBoolean, (void *) &appData.pasteSelection, XBOARD, (ArgIniType) FALSE },
{ "td", ArgFloat, (void *) &appData.timeDelay, FALSE, INVALID },
{ "timeControl", ArgString, (void *) &appData.timeControl, TRUE, (ArgIniType) TIME_CONTROL },
{ "tc", ArgString, (void *) &appData.timeControl, FALSE, INVALID },
- { "timeIncrement", ArgFloat, (void *) &appData.timeIncrement, TRUE, INVALID },
+ { "timeIncrement", ArgFloat, (void *) &appData.timeIncrement, FALSE, INVALID },
{ "inc", ArgFloat, (void *) &appData.timeIncrement, FALSE, INVALID },
{ "internetChessServerMode", ArgBoolean, (void *) &appData.icsActive, FALSE, INVALID },
{ "ics", ArgTrue, (void *) &appData.icsActive, FALSE, (ArgIniType) FALSE },
char *q;
int i, octval;
char ch;
- int posarg = 3; // default is game file
+ int posarg = 4; // default is game file
ch = get(cl);
for (;;) {
appData.viewer = TRUE;
} else if(!strcasecmp(argValue + len, ".ini") || !strcasecmp(argValue + len, ".xop")) {
ad = &argDescriptors[0]; // correct implied type to -opt
+ } else if(GetEngineLine(argValue, 11)) {
+ ad = &argDescriptors[3]; // correct implied type to -is
} else { // keep default -lgf, but let it imply viewer mode as well
appData.viewer = TRUE;
}
// float: casting to int is not harmless, so default cannot be contained in table
appData.timeDelay = TIME_DELAY;
- appData.timeIncrement = TIME_INCREMENT;
+ appData.timeIncrement = -314159;
// some complex, platform-dependent stuff that could not be handled from table
SetDefaultTextAttribs();
if(appData.viewer && appData.viewerOptions[0]) ParseArgsFromString(appData.viewerOptions);
if(appData.tourney && appData.tourneyOptions[0]) ParseArgsFromString(appData.tourneyOptions);
- chessProgram = GetEngineLine(firstEngineLine, 0) || GetEngineLine(secondEngineLine, 1);
- appData.icsActive = GetEngineLine(icsNick, 10);
+ chessProgram |= GetEngineLine(firstEngineLine, 0) || GetEngineLine(secondEngineLine, 1);
+ appData.icsActive |= GetEngineLine(icsNick, 10);
/* [HGM] make sure board size is acceptable */
if(appData.NrFiles > BOARD_FILES ||
if (appData.icsActive || appData.noChessProgram) {
chessProgram = FALSE; /* not local chess program mode */
}
+ if(appData.timeIncrement == -314159) { // new storage mechanism of (mps,inc) in use and no -inc on command line
+ if(appData.movesPerSession <= 0) { // new encoding of incremental mode
+ appData.timeIncrement = -appData.movesPerSession/1000.;
+ } else appData.timeIncrement = -1;
+ }
+ if(appData.movesPerSession <= 0) appData.movesPerSession = MOVES_PER_SESSION; // mps <= 0 is invalid in any case
/* Open startup dialog if needed */
if ((!appData.noChessProgram && !chessProgram && !appData.icsActive) ||
FILE *f;
ArgDescriptor *ad;
char dir[MSG_SIZ], buf[MSG_SIZ];
+ int mps = appData.movesPerSession;
if (!MainWindowUp()) return;
// [HGM] in WB we have to copy sound names to appData first
ExportSounds();
+ if(appData.timeIncrement >= 0) appData.movesPerSession = -1000*appData.timeIncrement; // kludge to store mps & inc as one
+
for (ad = argDescriptors; ad->argName != NULL; ad++) {
if (!ad->save) continue;
switch (ad->argType) {
}
}
fclose(f);
+ appData.movesPerSession = mps;
}
Boolean