OpenGothic
Open source reimplementation of Gothic I and II
Loading...
Searching...
No Matches
particlesdefinitions.h
Go to the documentation of this file.
1#pragma once
2
3#include <zenkit/DaedalusVm.hh>
4#include <zenkit/addon/daedalus.hh>
5
6#include <unordered_map>
7#include <memory>
8#include <mutex>
9
10#include "graphics/visualfx.h"
11
12class ParticleFx;
13
15 public:
18
19 const ParticleFx* get(std::string_view name, bool relaxed);
20 const ParticleFx* get(const ParticleFx* base, const VisualFx::Key* key);
21
22 private:
23 std::recursive_mutex sync;
24 std::unique_ptr<zenkit::DaedalusVm> vm;
25
26 std::unordered_map<std::string, std::unique_ptr<ParticleFx>> pfx;
27 std::unordered_map<const VisualFx::Key*, std::unique_ptr<ParticleFx>> pfxKey;
28
29 const ParticleFx* implGet(std::string_view name, bool relaxed);
30 const ParticleFx* implGet(const ParticleFx& base, const VisualFx::Key& key);
31
32 std::shared_ptr<zenkit::IParticleEffect> implGetDirect(std::string_view name, bool relaxed);
33 };
const ParticleFx * get(std::string_view name, bool relaxed)