void ReadLevel()
{
+#if 1
+ static char CurPathTEST[1024];
+#endif
+
// int FNum;
FILE *FNum;
long i;
#if 1
// CurPath = "/home/aeglos/projects/rocksndiamonds/levels/TEST_supaplex/supaplex/levels.dat";
+
+#if 0
CurPath = "/home/aeglos/projects/rocksndiamonds/supaplex_demo_JENS0001.sp";
LevelNumber = 1;
+#else
+ sprintf(CurPathTEST, "/home/aeglos/projects/Level_Stuff/SUPAPLEX/SUPAPLEX_LEVELS/solve00/JENS%04d.SP", level_nr);
+ CurPath = CurPathTEST;
+ LevelNumber = level_nr;
+#endif
+
#endif
DemoAvailable = False;
- if (STRING_IS_LIKE(CurPath, "*.mpx"))
+ if (STRING_IS_LIKE(CurPath, "*.mpx") ||
+ STRING_IS_LIKE(CurPath, "*.MPX"))
{
printf("::: reading MPX file ...\n");
return;
}
- if (STRING_IS_LIKE(CurPath, "*.sp"))
+ if (STRING_IS_LIKE(CurPath, "*.sp") ||
+ STRING_IS_LIKE(CurPath, "*.SP"))
{
printf("::: reading SP file ...\n");
int i;
// byte T;
+ int RecordNumber = LevelNumber;
+
+#if 1
+ RecordNumber = 1; // always "1" for "*.sp" style one level/demo files
+#endif
+
FieldWidth = 60;
FieldHeight = 24;
HeaderSize = 96;
FNum = fopen(CurPath, "rb");
- i = (LevelNumber - 1) * ((long)(FieldMax) + 1) + 1;
+ i = (RecordNumber - 1) * ((long)(FieldMax) + 1) + 1;
#if 1
FILE_GET(FNum, i, PlayField8, FileMax + 1);
#else
FILE_GET(FNum, i, &PlayField8, sizeof(PlayField8));
#endif
- i = (LevelNumber) * ((long)(FieldMax) + 1) + 1 - HeaderSize;
+ i = (RecordNumber) * ((long)(FieldMax) + 1) + 1 - HeaderSize;
FILE_GET(FNum, i, &LInfo, sizeof(LInfo)); // store level info in an extra structure
fclose(FNum);
RandomSeed = LInfo.DemoRandomSeed;
+#if 1
+ printf("::: RandomSeed == %d\n", RandomSeed);
+
+#if 1
+ {
+ int i;
+
+ for (i = 0; i < 10; i++)
+ printf("::: TEST random number: %d\n", subGetRandomNumber());
+
+ int buffer, value = -3;
+
+ MovHighByte(&buffer, value);
+ value = SgnHighByte(buffer);
+
+ printf("::: TEST: 0x%08x / %d\n", value, value);
+ }
+#endif
+
+#endif
+
LevelLoaded = True;
return;
"Thanks to");
DrawTextSCentered(ystart2 + 1 * ystep, FONT_TEXT_3,
"David Tritscher");
+#if 1
+ DrawTextSCentered(ystart2 + 2 * ystep, FONT_TEXT_2,
+ "for the code base used for the");
+ DrawTextSCentered(ystart2 + 3 * ystep, FONT_TEXT_2,
+ "native Emerald Mine engine");
+#else
DrawTextSCentered(ystart2 + 2 * ystep, FONT_TEXT_2,
"for the new Emerald Mine engine");
+#endif
}
else if (screen_nr == 7)
{