projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added new, 3-state setup option to allow skipping levels (yes/no/ask)
[rocksndiamonds.git]
/
src
/
libgame
/
setup.c
diff --git
a/src/libgame/setup.c
b/src/libgame/setup.c
index cdf1eea9c8ee09f82c334fac3cdaf60ff935340b..5a98416663902600a602bde8e92863a1b278b8ed 100644
(file)
--- a/
src/libgame/setup.c
+++ b/
src/libgame/setup.c
@@
-2831,10
+2831,11
@@
SetupFileHash *loadSetupFileHash(char *filename)
#define LEVELINFO_TOKEN_HANDICAP 29
#define LEVELINFO_TOKEN_TIME_LIMIT 30
#define LEVELINFO_TOKEN_SKIP_LEVELS 31
#define LEVELINFO_TOKEN_HANDICAP 29
#define LEVELINFO_TOKEN_TIME_LIMIT 30
#define LEVELINFO_TOKEN_SKIP_LEVELS 31
-#define LEVELINFO_TOKEN_USE_EMC_TILES 32
-#define LEVELINFO_TOKEN_INFO_SCREENS_FROM_MAIN 33
+#define LEVELINFO_TOKEN_ALLOW_SKIPPING_LEVELS 32
+#define LEVELINFO_TOKEN_USE_EMC_TILES 33
+#define LEVELINFO_TOKEN_INFO_SCREENS_FROM_MAIN 34
-#define NUM_LEVELINFO_TOKENS 3
4
+#define NUM_LEVELINFO_TOKENS 3
5
static LevelDirTree ldi;
static LevelDirTree ldi;
@@
-3232,7
+3233,7
@@
void setSetupInfo(struct TokenInfo *token_info,
*(boolean *)setup_value = get_boolean_from_string(token_value);
break;
*(boolean *)setup_value = get_boolean_from_string(token_value);
break;
- case TYPE_SWITCH
3
:
+ case TYPE_SWITCH
_3_STATES
:
*(int *)setup_value = get_switch3_from_string(token_value);
break;
*(int *)setup_value = get_switch3_from_string(token_value);
break;
@@
-4861,8
+4862,9
@@
char *getSetupValue(int type, void *value)
strcpy(value_string, (*(boolean *)value ? "on" : "off"));
break;
strcpy(value_string, (*(boolean *)value ? "on" : "off"));
break;
- case TYPE_SWITCH3:
- strcpy(value_string, (*(int *)value == AUTO ? "auto" :
+ case TYPE_SWITCH_3_STATES:
+ strcpy(value_string, (*(int *)value == MODE_AUTO ? "auto" :
+ *(int *)value == MODE_ASK ? "ask" :
*(int *)value == FALSE ? "off" : "on"));
break;
*(int *)value == FALSE ? "off" : "on"));
break;
@@
-4871,7
+4873,12
@@
char *getSetupValue(int type, void *value)
break;
case TYPE_YES_NO_AUTO:
break;
case TYPE_YES_NO_AUTO:
- strcpy(value_string, (*(int *)value == AUTO ? "auto" :
+ strcpy(value_string, (*(int *)value == MODE_AUTO ? "auto" :
+ *(int *)value == FALSE ? "no" : "yes"));
+ break;
+
+ case TYPE_YES_NO_ASK:
+ strcpy(value_string, (*(int *)value == MODE_ASK ? "ask" :
*(int *)value == FALSE ? "no" : "yes"));
break;
*(int *)value == FALSE ? "no" : "yes"));
break;