#include <object_templates.h>
Public Member Functions | |
| ObjectTemplateManager () | |
| ~ObjectTemplateManager ()=default | |
| absl::Status | LoadTemplates (const std::string &directory_path) |
| absl::Status | SaveTemplate (const ObjectTemplate &tmpl, const std::string &directory_path) |
| const std::vector< ObjectTemplate > & | GetTemplates () const |
| std::vector< RoomObject > | InstantiateTemplate (const ObjectTemplate &tmpl, int x, int y, Rom *rom) |
Static Public Member Functions | |
| static ObjectTemplate | CreateFromObjects (const std::string &name, const std::string &description, const std::vector< RoomObject > &objects, int origin_x, int origin_y) |
Private Attributes | |
| std::vector< ObjectTemplate > | templates_ |
Definition at line 31 of file object_templates.h.
| objects yaze::zelda3::ObjectTemplateManager::ObjectTemplateManager | ( | ) |
Definition at line 21 of file object_templates.cc.
|
default |
| absl::Status yaze::zelda3::ObjectTemplateManager::LoadTemplates | ( | const std::string & | directory_path | ) |
Definition at line 25 of file object_templates.cc.
References templates_.
Referenced by yaze::zelda3::DungeonObjectEditor::InitializeEditor().
| absl::Status yaze::zelda3::ObjectTemplateManager::SaveTemplate | ( | const ObjectTemplate & | tmpl, |
| const std::string & | directory_path ) |
Definition at line 53 of file object_templates.cc.
References yaze::zelda3::ObjectTemplate::name, and templates_.
Referenced by yaze::zelda3::DungeonObjectEditor::CreateTemplateFromSelection().
|
inline |
Definition at line 44 of file object_templates.h.
References templates_.
Referenced by yaze::zelda3::DungeonObjectEditor::GetTemplates().
|
static |
Definition at line 89 of file object_templates.cc.
References yaze::zelda3::ObjectTemplate::category, yaze::zelda3::description, yaze::zelda3::ObjectTemplate::description, yaze::zelda3::TemplateObject::id, yaze::zelda3::TemplateObject::layer, yaze::zelda3::name, yaze::zelda3::ObjectTemplate::name, yaze::zelda3::ObjectTemplate::objects, yaze::zelda3::TemplateObject::rel_x, yaze::zelda3::TemplateObject::rel_y, and yaze::zelda3::TemplateObject::size.
Referenced by yaze::zelda3::DungeonObjectEditor::CreateTemplateFromSelection().
| std::vector< RoomObject > yaze::zelda3::ObjectTemplateManager::InstantiateTemplate | ( | const ObjectTemplate & | tmpl, |
| int | x, | ||
| int | y, | ||
| Rom * | rom ) |
Definition at line 110 of file object_templates.cc.
References yaze::zelda3::RoomObject::EnsureTilesLoaded(), yaze::zelda3::ObjectTemplate::objects, and yaze::zelda3::RoomObject::SetRom().
Referenced by yaze::zelda3::DungeonObjectEditor::InsertTemplate().

|
private |
Definition at line 58 of file object_templates.h.
Referenced by GetTemplates(), LoadTemplates(), and SaveTemplate().