lev file structure ------------------ offset Type Size Data ------------------------------------ 0 char[5] 5 "POT14" (says that it is an elma lev) "POT06" is from across 5 short 2 Lower short of the following int (never used, i guess) 7 int 4 Random number to link the replays with the lev 11 double 8 Integrity 1 19 double 8 Integrity 2 27 double 8 Integrity 3 35 double 8 Integrity 4 (lock) 43 char[51] 51 Name of the lev 94 char[16] 16 Name of the LGR file to use 110 char[10] 10 Name of the ground texture 120 char[10] 10 Name of the sky texture 130 double 8 Number of polygons + 0.4643643. Maximum = 300 (EOL: 1000) 138 POLYGON[] - ? double 8 Number of objects + 0.4643643. Maximum = 52 (EOL: 252) ? OBJECT[] - ? double 8 Number of pictures + 0.2345672. Maximum = 5000 ? PICTURE[] - ? int 4 0x3A 0x10 0x67 0x00 (0x0067103A) End Of Data (magic number, no other meaning) ? TOP10S 688 encrypted single and myltyplayer top10s ? int 4 0x52 0x5D 0x84 0x00 (0x00845D52) -> End Of File POLYGON: Type Size Data ------------------------------------ int 4 Grass flag (0 = normal, 1 = grass polygon) int 4 Number of vertice VERTEX[] - A vertex is just two doubles : x and y. 16 bytes of course. OBJECT: Type Size Data ------------------------------------ double 8 Position : x double 8 Position : y int 4 Type (1 = flower, 2 = food, 3 = killer, 4 = start) int 4 Type of food (0 = food, 1 = Gravity Up, 2 = Gravity Down, 3 = Gravity Left, 4 = Gravity Right) int 4 Animation number - 1 PICTURE: Type Size Data ------------------------------------ char[10] 10 Normal picture name char[10] 10 Texture name char[10] 10 Mask name double 8 Position : x double 8 Position : y int 4 Distance (1-999) int 4 Clipping (0 = U, 1 = G, 2 = S) TOP10S: type size data ------------------------------------ TOP10 344 singleplayer top10 TOP10 344 myltyplayer top10 this how 2 uncrypt top10s char *buf=TOP10S; short ebp8=0x15; short ebp10=0x2637; for(int x=0;x<688;x++){ buf[x]^=ebp8&0xFF; ebp10+=(ebp8%0xD3D)*0xD3D; ebp8=ebp10*0x1F+0xD3D; } TOP10: type size data ------------------------------------ int 4 number of tymes int[10] 40 aray of tymes char[10][15] 150 aray of player1 names char[10][15] 150 aray of player2 names Integrity: ---------- PSUM: for (PSUM = i = 0; i < Number_of_polygons; ++i) for (j = 0; j < Polygon[i].Number_of_vertice; ++j) PSUM += Polygon[i].Vertex[j].x + Polygon[i].Vertex[j].y; OSUM: for (OSUM = i = 0; i < Number_of_objects; ++i) OSUM += Object[i].x + Object[i].y + Object[i].type; PICSUM: for (PICSUM = i = 0; i < Number_of_pictures; ++i) PICSUM += Picture[i].x + Picture[i].y; SUM = (PSUM + OSUM + PICSUM) * 3247.764325643; Integrity 1 = SUM; Integrity 2 = ((double) (rand() % 5871)) + 11877 - SUM; Integrity 3 = ((double) (rand() % 5871)) + 11877 - SUM; if (topology errors in lev) Integrity 3 = ((double) (rand() % 4982)) + 20961 - SUM; Integrity 4 = ((double) (rand() % 6102)) + 12112 - SUM; if (locked) Integrity 4 = ((double) (rand() % 6310)) + 23090 - SUM;