setTapeActionFlags(tape, getFile8Bit(file));
- tape->property_bits = getFile8Bit(file);
- tape->solved = getFile8Bit(file);
+ tape->property_bits = getFile16BitBE(file);
+
+ // set flag for marking if this tape solves the level or not
+ tape->solved = (tape->property_bits & TAPE_PROPERTY_LEVEL_SOLVED) != 0;
engine_version = getFileVersion(file);
if (engine_version > 0)
if (tape->player_participates[i])
store_participating_players |= (1 << i);
+ // if this tape solves the level, set corresponding tape property bit
+ if (tape->solved)
+ tape->property_bits |= TAPE_PROPERTY_LEVEL_SOLVED;
+
putFile32BitBE(file, tape->random_seed);
putFile32BitBE(file, tape->date);
putFile32BitBE(file, tape->length);
putFile8Bit(file, getTapeActionValue(tape));
- putFile8Bit(file, tape->property_bits);
- putFile8Bit(file, tape->solved);
+ putFile16BitBE(file, tape->property_bits);
putFileVersion(file, tape->engine_version);
}
if (!CheckEngineSnapshotList())
return;
- int tape_property_bits = tape.property_bits;
+ unsigned short tape_property_bits = tape.property_bits;
LoadEngineSnapshot_Undo(steps);
if (!CheckEngineSnapshotList())
return;
- int tape_property_bits = tape.property_bits;
+ unsigned short tape_property_bits = tape.property_bits;
LoadEngineSnapshot_Redo(steps);
-1
};
- static byte patch_property_bit[] =
+ static unsigned short patch_property_bit[] =
{
TAPE_PROPERTY_NONE,
TAPE_PROPERTY_EM_RANDOM_BUG,
if (strEqual(mode, "info"))
{
- Print("property bits == 0x%02x\n", tape->property_bits);
+ Print("property bits == 0x%04x\n", tape->property_bits);
return FALSE;
}
boolean unpatch_tape = FALSE;
boolean use_property_bit = FALSE;
- byte property_bitmask = 0;
+ unsigned short property_bitmask = 0;
if (strSuffix(mode, ":0") ||
strSuffix(mode, ":off") ||
// values for tape properties stored in tape file
#define TAPE_PROPERTY_NONE 0
-#define TAPE_PROPERTY_EM_RANDOM_BUG (1 << 0)
-#define TAPE_PROPERTY_GAME_SPEED (1 << 1)
-#define TAPE_PROPERTY_PAUSE_MODE (1 << 2)
-#define TAPE_PROPERTY_SINGLE_STEP (1 << 3)
-#define TAPE_PROPERTY_SNAPSHOT (1 << 4)
-#define TAPE_PROPERTY_REPLAYED (1 << 5)
-#define TAPE_PROPERTY_TAS_KEYS (1 << 6)
-#define TAPE_PROPERTY_SMALL_GRAPHICS (1 << 7)
+#define TAPE_PROPERTY_LEVEL_SOLVED (1 << 0)
+#define TAPE_PROPERTY_UNUSED_BIT_1 (1 << 1)
+#define TAPE_PROPERTY_UNUSED_BIT_2 (1 << 2)
+#define TAPE_PROPERTY_UNUSED_BIT_3 (1 << 3)
+#define TAPE_PROPERTY_UNUSED_BIT_4 (1 << 4)
+#define TAPE_PROPERTY_UNUSED_BIT_5 (1 << 5)
+#define TAPE_PROPERTY_UNUSED_BIT_6 (1 << 6)
+#define TAPE_PROPERTY_UNUSED_BIT_7 (1 << 7)
+#define TAPE_PROPERTY_EM_RANDOM_BUG (1 << 8)
+#define TAPE_PROPERTY_GAME_SPEED (1 << 9)
+#define TAPE_PROPERTY_PAUSE_MODE (1 << 10)
+#define TAPE_PROPERTY_SINGLE_STEP (1 << 11)
+#define TAPE_PROPERTY_SNAPSHOT (1 << 12)
+#define TAPE_PROPERTY_REPLAYED (1 << 13)
+#define TAPE_PROPERTY_TAS_KEYS (1 << 14)
+#define TAPE_PROPERTY_SMALL_GRAPHICS (1 << 15)
// values for score tape basename length (date, time, name hash, no extension)
#define MAX_SCORE_TAPE_BASENAME_LEN 24
boolean use_mouse_actions;
// bits to indicate which tape properties are stored in this tape
- byte property_bits;
+ unsigned short property_bits;
// special game_engine_flags;
boolean bd_replay;