Moondust File Library (PGE-FL) is a library for reading and writing Moondust and SMBX Files. https://wohlsoft.ru/
  • C++ 93.6%
  • C 5.4%
  • CMake 0.7%
  • PHP 0.2%
Find a file
2026-03-05 09:06:14 -05:00
bindings/ATL Copy the content of old PGE-FL ATL implementation 2020-05-06 18:46:35 +03:00
docs Merge branch 'master' of github.com:WohlSoft/PGE-File-Library-STL 2024-12-17 08:17:22 +03:00
src SAVX: add lvl_path_count field 2026-03-05 09:06:14 -05:00
test Updated Catch2 2025-07-29 20:47:03 +03:00
.appveyor.yml AppVeyor: Don't build Qt version on the old MinGW 5.3 2024-02-21 07:09:49 +03:00
.gitattributes Extended the read tester 2024-02-18 03:08:42 +03:00
.gitignore Polishing the API 2021-12-17 23:32:21 +03:00
build_props.cmake build_props.cmake: Don't use -fPIC on several other platforms 2023-11-14 17:56:43 +03:00
changelog.md Update changelog 2024-07-23 10:11:56 -04:00
charsetconvert.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
CMakeLists.txt CMake: fixed warning at newer CMake versions 2024-12-30 23:44:02 +03:00
ConvertUTF.h More PVS Studio fixes 2023-11-06 18:10:32 +03:00
CSVReader.h Fixed compatibility 2024-07-18 04:46:13 +03:00
CSVReaderPGE.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
CSVUtils.h Fixed compatibility 2024-07-18 04:46:13 +03:00
file_formats.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
invoke_default.hpp Update copyright year for 2026 2026-01-01 02:26:02 +03:00
LICENSE Update copyright year for 2026 2026-01-01 02:26:02 +03:00
lvl_filedata.h Add warp height field 2026-02-08 13:23:42 -05:00
meta_filedata.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
npc_filedata.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
pge_ff_units.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
pge_file_lib_globs.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
pge_file_lib_private.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
pge_file_library.cmake Organize the library 2024-07-17 21:26:37 -04:00
pge_x.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
README.md Finishing the WLD-38A world writer 2024-02-18 10:18:02 +03:00
save_filedata.h SAVX: add lvl_path_count field 2026-03-05 09:06:14 -05:00
smbx38a_private.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
smbx64.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
smbx64_cnf_filedata.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
smbx64_macro.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00
wld_filedata.h Update copyright year for 2026 2026-01-01 02:26:02 +03:00

Moondust File Library (PGE-FL) v0.3.2


This library is a part of Moondust Project (formerly PGE Project).

Supported file formats:

PGE-X Family:
*.lvlx  PGE-X Level File               -  Read/Write
*.wldx  PGE-X World File               -  Read/Write
*.savx  PGE-X Game save File           -  Read/Write
*.meta  PGE-X non-SMBX64 Meta File     -  Read/Write
SMBX-64 Family:
*.lvl   SMBX 1...64 Level File         -  Read/Write
*.wld   SMBX 1...64 World File         -  Read/Write
*.sav   SMBX 1...64 Game save File     -  Read only
*.dat   SMBX 1...64 Game config File   -  Read/Write
*.txt   SMBX64 NPC Custom text config  -  Read/Write
SMBX-38A Family:
*.lvl   SMBX-38A Level File         -  Read/Write
*.wld   SMBX-38A World File         -  Read/Write
*.wls   SMBX-38A World settings     -  (planned)Read/Write
*.sav   SMBX-38A Game save File     -  (planned)Read/Write

Use library with this header:

#include "file_formats.h"

The Library parses and generates files or RAW text strings. You can read data from the memory as well as from the file. You can use the openLevelFile() or openWorldFile() functions to open necessary files more convenient.

Notes for files of SMBX-64 format:

  1. If you saving a file from raw data yourself, you should save a text file with using of CRLF for SMBX-* formats, or file will be not readable by SMBX Engine. You can write a file like binary, but when you detecting '\n' byte, write a CRLF ("\r\n") bytes instead!

  2. When you saving a level file (World file does not require that) into SMBX64 format, you must prepare your data structures until you will save it:

//To initialize order priorities fields and mark all star NPCs
FileFormats::smbx64LevelPrepare(YourLevelData);
  1. If you trying to use Moondust File data in the LunaLUA, before filling internal arrays, need to apply the next set of the functions:
//To initialize order priorities fields and mark all star NPCs
FileFormats::smbx64LevelPrepare(YourLevelData);
//Order blocks
FileFormats::smbx64LevelSortBlocks(YourLevelData);
//Order BGO's
FileFormats::smbx64LevelSortBGOs(YourLevelData);