Hmmm. 50% Packetloss told me of this link: http://www.forumhq.net/forums/index.php?showtopic=548 Though it only has a piece of code on how to read a .lvl file, not to write them. He also informed me of the map.h file of Mervbot, it has the following functions: Uint32 getLinear(Uint32 x, Uint32 y); // Convert rectangular coords to linear coords
struct tileData
{
Uint16 x, y; // Coordinates
BYTE type; // Type
};
Sint32 getNumeric(Sint32 y);
char getAlpha(Sint32 x);
String getCoords(Sint32 x, Sint32 y);
tileData makeTileData(Uint32 raw); // File data is in blocks of 32 bits
Uint32 makeTileData(Uint16 x, Uint16 y, BYTE type); // Produce just such a block
void convertFileToMatrix(char *fileData, char *mapData, Uint32 len); // Convert from disk to memory format
Uint32 getMapSize(char *mapData); // Retrieve the length of the map on disk
void convertMatrixToFile(char *mapData, char *_fileData); // Convert the map to disk format I don't know how to do the job with these functions. Any help is appreciated -MMaverick