mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
91bd1e7c7b
Changed: Logging cleanup, default files and paths. Changed: initialization order of plugin (PRE-Init for vehicle registration).
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
#pragma once
|
|
|
|
#include <atomic>
|
|
|
|
#include "shared.hpp"
|
|
#include "pbo/search.hpp"
|
|
#include "p3d/model.hpp"
|
|
#include "singleton.hpp"
|
|
|
|
namespace ace {
|
|
class model_entry {
|
|
public:
|
|
model_entry() {}
|
|
model_entry(const std::string & p3d_path_, ace::p3d::model_p model_) : p3d_path(p3d_path_), model(model_) { }
|
|
std::string p3d_path;
|
|
ace::p3d::model_p model;
|
|
};
|
|
|
|
class model_collection : public singleton<model_collection> {
|
|
public:
|
|
model_collection();
|
|
bool load_model(const std::string & p3d_path);
|
|
|
|
bool init();
|
|
bool reset();
|
|
|
|
std::unordered_map<std::string, model_entry> models;
|
|
|
|
bool initialized(void) const { return _initialized; }
|
|
bool ready(void) const { return _ready; }
|
|
|
|
protected:
|
|
bool _load_model(const std::string &, const std::string &);
|
|
|
|
std::atomic_bool _ready;
|
|
std::atomic_bool _initialized;
|
|
|
|
ace::pbo::search_p _pbo_searcher;
|
|
};
|
|
} |