1. Adds a `libdevilution_so` target when tests are enabled. 2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel). 3. Tests are now defined in a separate `test/CMakeLists.txt` file. 4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest). 5. Tests are now built by default. 6. On CI, test errors are now reported. Also: * `.clang-format`: Enable SortIncludes in tests * `path_test.cpp`: Fix -Wsign-compare
39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
/**
|
|
* @file init.h
|
|
*
|
|
* Interface of routines for initializing the environment, disable screen saver, load MPQ.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "miniwin/miniwin.h"
|
|
#include "mpq/mpq_reader.hpp"
|
|
#include "utils/attributes.h"
|
|
|
|
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 DVL_API_FOR_TEST bool gbIsSpawn;
|
|
extern DVL_API_FOR_TEST bool gbIsHellfire;
|
|
extern DVL_API_FOR_TEST 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_language_archives();
|
|
void init_create_window();
|
|
void MainWndProc(uint32_t Msg);
|
|
WNDPROC SetWindowProc(WNDPROC NewProc);
|
|
|
|
} // namespace devilution
|