mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-28 09:58:30 +01:00
error message when hit feature is off but you try to use it; clean up memory on way out.
This commit is contained in:
parent
1384be6895
commit
4d6aec67fe
3 changed files with 18 additions and 2 deletions
|
@ -140,6 +140,7 @@ usage( char* appName, char* msg )
|
|||
"\t [-w pwd]* # passwd for matching local player\n"
|
||||
"\t [-v] # put scoreboard in vertical mode\n"
|
||||
"\t [-m] # make the robot duMb (smart is default)\n"
|
||||
"\t [-l] # disallow hints\n"
|
||||
"\t [-c] # explain robot scores after each move\n"
|
||||
"\t [-C COOKIE] # cookie used to groups games on relay\n"
|
||||
"\t\t # (max of four players total, local and remote)\n"
|
||||
|
@ -654,7 +655,7 @@ main( int argc, char** argv )
|
|||
#if defined PLATFORM_GTK
|
||||
"h:I"
|
||||
#endif
|
||||
"kKf:l:n:Nsd:e:r:b:qw:Sit:Umvc"
|
||||
"kKf:ln:Nsd:e:r:b:qw:Sit:Umvc"
|
||||
#ifdef XWFEATURE_RELAY
|
||||
"a:p:C:H"
|
||||
#endif
|
||||
|
@ -717,6 +718,9 @@ main( int argc, char** argv )
|
|||
case 'm': /* dumb robot */
|
||||
mainParams.gi.robotSmartness = DUMB_ROBOT;
|
||||
break;
|
||||
case 'l':
|
||||
mainParams.gi.hintsNotAllowed = XP_TRUE;
|
||||
break;
|
||||
case 'n':
|
||||
index = mainParams.gi.nPlayers++;
|
||||
++mainParams.nLocalPlayers;
|
||||
|
@ -938,7 +942,7 @@ main( int argc, char** argv )
|
|||
}
|
||||
|
||||
dict_destroy( mainParams.dict );
|
||||
|
||||
linux_util_vt_destroy( mainParams.util );
|
||||
return 0;
|
||||
} /* main */
|
||||
|
||||
|
|
|
@ -190,6 +190,12 @@ linux_util_vt_init( MPFORMAL XW_UtilCtxt* util )
|
|||
|
||||
}
|
||||
|
||||
void
|
||||
linux_util_vt_destroy( XW_UtilCtxt* util )
|
||||
{
|
||||
XP_FREE( util->mpool, util->vtable );
|
||||
}
|
||||
|
||||
const XP_UCHAR*
|
||||
linux_getErrString( UtilErrID id, XP_Bool* silent )
|
||||
{
|
||||
|
@ -247,6 +253,11 @@ linux_getErrString( UtilErrID id, XP_Bool* silent )
|
|||
message = "Tile assignment can't be undone.";
|
||||
break;
|
||||
|
||||
case ERR_CANT_HINT_WHILE_DISABLED:
|
||||
message = "The hint feature is disabled for this game. Enable "
|
||||
"it for a new game using the Preferences dialog.";
|
||||
break;
|
||||
|
||||
/* case INFO_REMOTE_CONNECTED: */
|
||||
/* message = "Another device has joined the game"; */
|
||||
/* break; */
|
||||
|
|
|
@ -34,6 +34,7 @@ void linux_debugf(const char*, ...)
|
|||
DictionaryCtxt* linux_dictionary_make( MPFORMAL const char* dictFileName );
|
||||
|
||||
void linux_util_vt_init( MPFORMAL XW_UtilCtxt* util );
|
||||
void linux_util_vt_destroy( XW_UtilCtxt* util );
|
||||
|
||||
const XP_UCHAR* linux_getErrString( UtilErrID id, XP_Bool* silent );
|
||||
|
||||
|
|
Loading…
Reference in a new issue