-static struct SetupInfo si;
-static struct SetupInputInfo sii;
-static struct
-{
- int type;
- void *value;
- char *text;
-} token_info[] =
-{
- { TYPE_SWITCH, &si.sound, "sound" },
- { TYPE_SWITCH, &si.sound_loops, "repeating_sound_loops" },
- { TYPE_SWITCH, &si.sound_music, "background_music" },
- { TYPE_SWITCH, &si.sound_simple, "simple_sound_effects" },
- { TYPE_SWITCH, &si.toons, "toons" },
- { TYPE_SWITCH, &si.double_buffering, "double_buffering" },
- { TYPE_SWITCH, &si.scroll_delay, "scroll_delay" },
- { TYPE_SWITCH, &si.soft_scrolling, "soft_scrolling" },
- { TYPE_SWITCH, &si.fading, "screen_fading" },
- { TYPE_SWITCH, &si.autorecord, "automatic_tape_recording" },
- { TYPE_SWITCH, &si.quick_doors, "quick_doors" },
- { TYPE_STRING, &si.alias_name, "alias_name" },
-
- /* for each player: */
- { TYPE_BOOLEAN, &sii.use_joystick, ".use_joystick" },
- { TYPE_STRING, &sii.joy.device_name, ".joy.device_name" },
- { TYPE_INTEGER, &sii.joy.xleft, ".joy.xleft" },
- { TYPE_INTEGER, &sii.joy.xmiddle, ".joy.xmiddle" },
- { TYPE_INTEGER, &sii.joy.xright, ".joy.xright" },
- { TYPE_INTEGER, &sii.joy.yupper, ".joy.yupper" },
- { TYPE_INTEGER, &sii.joy.ymiddle, ".joy.ymiddle" },
- { TYPE_INTEGER, &sii.joy.ylower, ".joy.ylower" },
- { TYPE_INTEGER, &sii.joy.snap, ".joy.snap_field" },
- { TYPE_INTEGER, &sii.joy.bomb, ".joy.place_bomb" },
- { TYPE_KEYSYM, &sii.key.left, ".key.move_left" },
- { TYPE_KEYSYM, &sii.key.right, ".key.move_right" },
- { TYPE_KEYSYM, &sii.key.up, ".key.move_up" },
- { TYPE_KEYSYM, &sii.key.down, ".key.move_down" },
- { TYPE_KEYSYM, &sii.key.snap, ".key.snap_field" },
- { TYPE_KEYSYM, &sii.key.bomb, ".key.place_bomb" }
-};
+ if (tape.file_version < FILE_VERSION_1_2)
+ {
+ /* tape files from versions before 1.2.0 without chunk structure */
+ LoadTape_HEAD(file, TAPE_HEADER_SIZE, &tape);
+ LoadTape_BODY(file, 2 * tape.length, &tape);
+ }
+ else
+ {
+ static struct
+ {
+ char *name;
+ int size;
+ int (*loader)(FILE *, int, struct TapeInfo *);
+ }
+ chunk_info[] =
+ {
+ { "VERS", FILE_VERS_CHUNK_SIZE, LoadTape_VERS },
+ { "HEAD", TAPE_HEADER_SIZE, LoadTape_HEAD },
+ { "BODY", -1, LoadTape_BODY },
+ { NULL, 0, NULL }
+ };