Luigifan2010 wrote:Beat me to it..I started reseraching into the .lvl formats and wanted to create a LVL viewer in C#. I would totally help too if I knew C++ but alas, I am fluent in VB.NET and fairly decent enough in C#.
Good, you can made it
Get my LVL File description WITH file-format version control (for read files, created in SMBX <1.3):
http://engine.wohlnet.ru/docs/_SMBX64/f ... iption.pdf
And useful sources:
Level Data, need for render level map as image:
https://github.com/Wohlhabend-Networks/ ... filedata.h
Where "Struct" - Is data stucture as one object (properties of blocks, NPC, BGO, etc), placed on level
Where QString - is "string" class by
Qt Library. It can support UTF8 strings. You can use
std::string instead.
Where QVector - is a "vector" class, makes dynamic arrays, need for object arrays (example: NPCs, placed on level).
struct LevelData - is a root of Level Data structure, contains level data and editing settings (i will add more options for comfortable in editor, but "editing" options will not saving").
QRegExp allow to use regular expressions for data valid checking, it need for crash protections (original SMBX crashing on bad file format, you can test it)
https://github.com/Wohlhabend-Networks/ ... rw_lvl.cpp
And Level file Read function: returns Level data structure, or if file invalid, returns structure with set parameter "FileData.ReadFileValid=false;", and level file loading will be stoped with error message.
https://github.com/Wohlstand/PLatGEnWoh ... s.cpp#L492
(function is member of MainWindow class. Incoming argument - file pointer, returns Level data structure with scanned parameters from file);
With C++ using
Qt library, it can help me create cross-platform source (for easy compiling in Windows, Linux, MacOS). I tested on Windows and on Linux, but I don't tested on MacOS (i haven't it, even Hackintosh).