-#else /* ================================================================== */
-
-#if 0
- else if (length >= 2106) /* !!! TEST ONLY: SHOW BROKEN LEVELS !!! */
-#else
- else if (length >= 2106 &&
- src[1983] == 116)
-#endif
- {
- /* ---------- this cave has V4 file format ---------- */
- file_version = FILE_VERSION_EM_V4;
-
- /* remap elements to internal EMC level format */
- for (i = 0; i < 2048; i++)
- src[i] = remap_v4[src[i]];
- for (i = 2048; i < 2084; i++)
- src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
- for (i = 2112; i < 2148; i++)
- src[i] = src[i - 64];
- }
- else if (length >= 2106 &&
- src[0] == 241 && /* <-- Emerald Mine I and III levels */
- src[1983] == 27)
- {
- unsigned char j = 94;
-
- /* ---------- this cave has V3 file format ---------- */
- file_version = FILE_VERSION_EM_V3;
-
- /* decrypt encrypted level file */
- for (i = 0; i < 2106; i++)
- src[i] = (src[i] ^ (j += 7)) - 0x11;
-
- src[1] = 131;
-
- /* remap elements to internal EMC level format */
- for (i = 0; i < 2048; i++)
- src[i] = remap_v4[src[i]];
- for (i = 2048; i < 2084; i++)
- src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
- for (i = 2112; i < 2148; i++)
- src[i] = src[i - 64];
- }
-#if 1
- else if (length >= 2106 &&
- src[0] == 245 && /* <-- Emerald Mine II levels */
- src[1983] == 27)
- {
- unsigned char j = 94;
-
- /* ---------- this cave has V3 file format ---------- */
- file_version = FILE_VERSION_EM_V3;
-
- /* decrypt encrypted level file */
- for (i = 0; i < 2106; i++)
- src[i] = (src[i] ^ (j += 7)) - 0x11;
-
- src[0] = 131; /* needed for Emerald Mine II levels */
- src[1] = 131;
-
- /* remap elements to internal EMC level format */
- for (i = 0; i < 2048; i++)
- src[i] = remap_v4[src[i]];
- for (i = 2048; i < 2084; i++)
- src[i] = remap_v4eater[src[i] >= 28 ? 0 : src[i]];
- for (i = 2112; i < 2148; i++)
- src[i] = src[i - 64];
-
- /* fix copyright sign in Emerald Mine II levels */
- for (i = 0; i < 2048; i++)
- if (src[i] == 241)
- src[i] = 254; /* replace 'Xdecor_1' with 'Xalpha_copyr' */
- }
-#endif
- else
- {
- /* ---------- this cave has unknown file format ---------- */
-
-#if 0
- printf("::: %d, %d\n", src[0], src[1983]);
-#endif
-
- return 0;
- }
-
-#endif /* ================================================================== */
-