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
42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
/**
|
|
* @file loadsave.h
|
|
*
|
|
* Interface of save game functionality.
|
|
*/
|
|
#pragma once
|
|
|
|
#include "player.h"
|
|
#include "utils/attributes.h"
|
|
|
|
namespace devilution {
|
|
|
|
extern DVL_API_FOR_TEST bool gbIsHellfireSaveGame;
|
|
extern DVL_API_FOR_TEST uint8_t giNumberOfLevels;
|
|
|
|
void RemoveInvalidItem(Item &pItem);
|
|
_item_indexes RemapItemIdxFromDiablo(_item_indexes i);
|
|
_item_indexes RemapItemIdxToDiablo(_item_indexes i);
|
|
_item_indexes RemapItemIdxFromSpawn(_item_indexes i);
|
|
_item_indexes RemapItemIdxToSpawn(_item_indexes i);
|
|
bool IsHeaderValid(uint32_t magicNumber);
|
|
void LoadHotkeys();
|
|
void LoadHeroItems(Player &player);
|
|
/**
|
|
* @brief Remove invalid inventory items from the inventory grid
|
|
* @param pnum The id of the player
|
|
*/
|
|
void RemoveEmptyInventory(Player &player);
|
|
|
|
/**
|
|
* @brief Load game state
|
|
* @param firstflag Can be set to false if we are simply reloading the current game
|
|
*/
|
|
void LoadGame(bool firstflag);
|
|
void SaveHotkeys();
|
|
void SaveHeroItems(Player &player);
|
|
void SaveGameData();
|
|
void SaveGame();
|
|
void SaveLevel();
|
|
void LoadLevel();
|
|
|
|
} // namespace devilution
|