Files
OpenRCT2-Web/src/openrct2/AssetPackManager.h
T
Aaron van Geffen a053a84486 Move all object units into OpenRCT2 namespace (#24980)
* Move all object units into OpenRCT2 namespace

* Dealing with fallout, part 1

* Dealing with fallout, part 2

* Dealing with fallout, part 3

* Apply clang-format in a few more places

* Remove redundant 'virtual' keyword
2025-08-17 06:46:03 -03:00

53 lines
1.4 KiB
C++

/*****************************************************************************
* Copyright (c) 2014-2025 OpenRCT2 developers
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#pragma once
#include "core/FileSystem.hpp"
#include "drawing/ImageId.hpp"
#include <memory>
#include <vector>
namespace OpenRCT2
{
class AssetPack;
class AudioSampleTable;
class AssetPackManager
{
private:
std::vector<std::unique_ptr<AssetPack>> _assetPacks;
public:
AssetPackManager();
~AssetPackManager();
size_t GetCount() const;
AssetPack* GetAssetPack(size_t index);
AssetPack* GetAssetPack(std::string_view id);
size_t GetAssetPackIndex(std::string_view id);
void Scan();
void Scan(const fs::path& directory);
void Reload();
void Swap(size_t index, size_t otherIndex);
void LoadSamplesForObject(std::string_view id, AudioSampleTable& objectTable);
void LoadEnabledAssetPacks();
void SaveEnabledAssetPacks();
private:
void ClearAssetPacks();
void AddAssetPack(const fs::path& path);
};
} // namespace OpenRCT2