equal
deleted
inserted
replaced
293 { |
293 { |
294 DeleteWindowById(WC_GAME_OPTIONS, 0); |
294 DeleteWindowById(WC_GAME_OPTIONS, 0); |
295 AllocateWindowDesc(&_game_options_desc); |
295 AllocateWindowDesc(&_game_options_desc); |
296 } |
296 } |
297 |
297 |
298 typedef struct { |
298 struct GameSettingData { |
299 int16 min; |
299 int16 min; |
300 int16 max; |
300 int16 max; |
301 int16 step; |
301 int16 step; |
302 StringID str; |
302 StringID str; |
303 } GameSettingData; |
303 }; |
304 |
304 |
305 static const GameSettingData _game_setting_info[] = { |
305 static const GameSettingData _game_setting_info[] = { |
306 { 0, 7, 1, STR_NULL}, |
306 { 0, 7, 1, STR_NULL}, |
307 { 0, 3, 1, STR_6830_IMMEDIATE}, |
307 { 0, 3, 1, STR_6830_IMMEDIATE}, |
308 { 0, 2, 1, STR_6816_LOW}, |
308 { 0, 2, 1, STR_6816_LOW}, |
653 "wagon_speed_limits", |
653 "wagon_speed_limits", |
654 "disable_elrails", |
654 "disable_elrails", |
655 "freight_trains", |
655 "freight_trains", |
656 }; |
656 }; |
657 |
657 |
658 typedef struct PatchEntry { |
658 struct PatchEntry { |
659 const SettingDesc *setting; |
659 const SettingDesc *setting; |
660 uint index; |
660 uint index; |
661 } PatchEntry; |
661 }; |
662 |
662 |
663 typedef struct PatchPage { |
663 struct PatchPage { |
664 const char **names; |
664 const char **names; |
665 PatchEntry *entries; |
665 PatchEntry *entries; |
666 byte num; |
666 byte num; |
667 } PatchPage; |
667 }; |
668 |
668 |
669 /* PatchPage holds the categories, the number of elements in each category |
669 /* PatchPage holds the categories, the number of elements in each category |
670 * and (in NULL) a dynamic array of settings based on the string-representations |
670 * and (in NULL) a dynamic array of settings based on the string-representations |
671 * of the settings. This way there is no worry about indeces, and such */ |
671 * of the settings. This way there is no worry about indeces, and such */ |
672 static PatchPage _patches_page[] = { |
672 static PatchPage _patches_page[] = { |