yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
dungeon_object_registry.h
Go to the documentation of this file.
1#ifndef YAZE_APP_ZELDA3_DUNGEON_OBJECT_REGISTRY_H
2#define YAZE_APP_ZELDA3_DUNGEON_OBJECT_REGISTRY_H
3
4#include <cstdint>
5#include <string>
6#include <unordered_map>
7
8namespace yaze {
9namespace zelda3 {
10
12 int16_t id = 0;
13 std::string name;
14 bool is_custom = false;
15};
16
24 public:
25 void RegisterObject(const DungeonObjectInfo& info);
26 void RegisterVanillaRange(int16_t start_id, int16_t end_id);
27 void RegisterCustomObject(int16_t id, const std::string& name);
28
29 const DungeonObjectInfo* Get(int16_t id) const;
30
31 private:
32 std::unordered_map<int16_t, DungeonObjectInfo> registry_;
33};
34
35} // namespace zelda3
36} // namespace yaze
37
38#endif // YAZE_APP_ZELDA3_DUNGEON_OBJECT_REGISTRY_H
Minimal registry for dungeon objects (vanilla or custom).
void RegisterCustomObject(int16_t id, const std::string &name)
const DungeonObjectInfo * Get(int16_t id) const
void RegisterObject(const DungeonObjectInfo &info)
void RegisterVanillaRange(int16_t start_id, int16_t end_id)
std::unordered_map< int16_t, DungeonObjectInfo > registry_