format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
+24
-23
@@ -1,19 +1,19 @@
|
||||
#ifndef ASSETS_ASSETS_LOADER_HPP_
|
||||
#define ASSETS_ASSETS_LOADER_HPP_
|
||||
|
||||
#include "Assets.hpp"
|
||||
#include "../interfaces/Task.hpp"
|
||||
#include "../typedefs.hpp"
|
||||
#include "../delegates.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <queue>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "../delegates.hpp"
|
||||
#include "../interfaces/Task.hpp"
|
||||
#include "../typedefs.hpp"
|
||||
#include "Assets.hpp"
|
||||
|
||||
namespace dynamic {
|
||||
class Map;
|
||||
class List;
|
||||
@@ -24,28 +24,27 @@ class AssetsLoader;
|
||||
class Content;
|
||||
|
||||
struct AssetCfg {
|
||||
virtual ~AssetCfg() {}
|
||||
virtual ~AssetCfg() {
|
||||
}
|
||||
};
|
||||
|
||||
struct LayoutCfg : AssetCfg {
|
||||
scriptenv env;
|
||||
|
||||
LayoutCfg(scriptenv env) : env(std::move(env)) {}
|
||||
LayoutCfg(scriptenv env) : env(std::move(env)) {
|
||||
}
|
||||
};
|
||||
|
||||
struct SoundCfg : AssetCfg {
|
||||
bool keepPCM;
|
||||
|
||||
SoundCfg(bool keepPCM) : keepPCM(keepPCM) {}
|
||||
|
||||
SoundCfg(bool keepPCM) : keepPCM(keepPCM) {
|
||||
}
|
||||
};
|
||||
|
||||
using aloader_func = std::function<assetload::postfunc(
|
||||
AssetsLoader*,
|
||||
const ResPaths*,
|
||||
const std::string&,
|
||||
const std::string&,
|
||||
std::shared_ptr<AssetCfg>)
|
||||
>;
|
||||
using aloader_func = std::function<
|
||||
assetload::
|
||||
postfunc(AssetsLoader*, const ResPaths*, const std::string&, const std::string&, std::shared_ptr<AssetCfg>)>;
|
||||
|
||||
struct aloader_entry {
|
||||
AssetType tag;
|
||||
@@ -62,7 +61,9 @@ class AssetsLoader {
|
||||
|
||||
void tryAddSound(const std::string& name);
|
||||
|
||||
void processPreload(AssetType tag, const std::string& name, dynamic::Map* map);
|
||||
void processPreload(
|
||||
AssetType tag, const std::string& name, dynamic::Map* map
|
||||
);
|
||||
void processPreloadList(AssetType tag, dynamic::List* list);
|
||||
void processPreloadConfig(const std::filesystem::path& file);
|
||||
void processPreloadConfigs(const Content* content);
|
||||
@@ -76,12 +77,12 @@ public:
|
||||
/// @param alias internal asset name
|
||||
/// @param settings asset loading settings (based on asset type)
|
||||
void add(
|
||||
AssetType tag,
|
||||
AssetType tag,
|
||||
const std::string& filename,
|
||||
const std::string& alias,
|
||||
std::shared_ptr<AssetCfg> settings=nullptr
|
||||
std::shared_ptr<AssetCfg> settings = nullptr
|
||||
);
|
||||
|
||||
|
||||
bool hasNext() const;
|
||||
|
||||
/// @throws assetload::error
|
||||
@@ -104,4 +105,4 @@ public:
|
||||
);
|
||||
};
|
||||
|
||||
#endif // ASSETS_ASSETS_LOADER_HPP_
|
||||
#endif // ASSETS_ASSETS_LOADER_HPP_
|
||||
|
||||
Reference in New Issue
Block a user