ZDoom save file structure
ZDoom save file structure
Hello ZDoom forum-ers/Developers. For a while I've been writing a launcher for ZDoom and I was about to add the ability to load save files into this launcher. However, part of this involves getting the save name from the save file, which I haven't been able to find yet. so would anyone know where and how the save name is stored?
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Re: ZDoom save file structure
The savegame uses PNG as a container format.
Have a look at G_DoLoadGame in g_game.cpp. The 2 function calls there that may interest you are M_VerifyPNG (initializes the container so you can get access to the data) and M_GetPNGText. There's several text chunks containing information about the savegame's content.
You can even get the save picture if you load the entire savegame with a PNG graphics loader.
Have a look at G_DoLoadGame in g_game.cpp. The 2 function calls there that may interest you are M_VerifyPNG (initializes the container so you can get access to the data) and M_GetPNGText. There's several text chunks containing information about the savegame's content.
You can even get the save picture if you load the entire savegame with a PNG graphics loader.
Re: ZDoom save file structure
Which is a rather interesting way of doing it. You can see the save image in both the zdoom forums if uploaded, and Linux Ubuntu using Gnome can also view the image in its file browser.
Re: ZDoom save file structure
...which was exactly the point behind using PNG as the primary format for savegames.