libmpq is a much simpler alternative to StormLib for reading MPQ archives. We use our own fork of libmpq: https://github.com/diasurgical/libmpq Impact: * DevilutionX is now a lot more portable. Unlike StormLib, libmpq only needs platform-specific code for Windows. * Locks around file access **removed** (instead we duplicate the file descriptor for streamed audio only). * RAM usage is **300 KiB** lower than StormLib. * Stripped release linux_x86_64 binary is **32 KiB** smaller. * Amiga build now hangs instead of crashing.
14 lines
299 B
C++
14 lines
299 B
C++
#pragma once
|
|
|
|
#include <SDL.h>
|
|
|
|
namespace devilution {
|
|
|
|
/**
|
|
* @brief Opens a Storm file and creates a read-only SDL_RWops from its handle.
|
|
*
|
|
* Closes the handle when it gets closed.
|
|
*/
|
|
SDL_RWops *OpenAsset(const char *filename, bool threadsafe = false);
|
|
|
|
} // namespace devilution
|