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.
37 lines
1 KiB
C++
37 lines
1 KiB
C++
/**
|
|
* @file init.h
|
|
*
|
|
* Interface of routines for initializing the environment, disable screen saver, load MPQ.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "miniwin/miniwin.h"
|
|
#include "utils/mpq.hpp"
|
|
|
|
namespace devilution {
|
|
|
|
extern bool gbActive;
|
|
extern std::optional<MpqArchive> hellfire_mpq;
|
|
extern WNDPROC CurrentProc;
|
|
extern std::optional<MpqArchive> spawn_mpq;
|
|
extern std::optional<MpqArchive> diabdat_mpq;
|
|
extern bool gbIsSpawn;
|
|
extern bool gbIsHellfire;
|
|
extern bool gbVanilla;
|
|
extern bool forceHellfire;
|
|
extern std::optional<MpqArchive> hfmonk_mpq;
|
|
extern std::optional<MpqArchive> hfbard_mpq;
|
|
extern std::optional<MpqArchive> hfbarb_mpq;
|
|
extern std::optional<MpqArchive> hfmusic_mpq;
|
|
extern std::optional<MpqArchive> hfvoice_mpq;
|
|
extern std::optional<MpqArchive> font_mpq;
|
|
extern std::optional<MpqArchive> lang_mpq;
|
|
extern std::optional<MpqArchive> devilutionx_mpq;
|
|
|
|
void init_cleanup();
|
|
void init_archives();
|
|
void init_create_window();
|
|
void MainWndProc(uint32_t Msg);
|
|
WNDPROC SetWindowProc(WNDPROC NewProc);
|
|
|
|
} // namespace devilution
|