MCPcopy Create free account
hub / github.com/crownengine/crown / add_resource

Function add_resource

src/resource/resource_manager.cpp:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74namespace resource_manager_internal
75{
76 void add_resource(ResourceManager &rm, StringId64 package_name, StringId64 type, StringId64 name, Allocator *allocator, void *data)
77 {
78 ResourceManager::ResourceData rd;
79 rd.package_name = package_name;
80 rd.references = 1;
81 rd.online_sequence_num = 0;
82 rd.allocator = allocator;
83 rd.data = data;
84
85 ResourceManager::ResourcePair id = { type, name };
86 hash_map::set(rm._resources, id, rd);
87
88 rm.on_online(type, name);
89 }
90
91} // namespace resource_manager_internal
92

Callers 1

complete_requestsMethod · 0.85

Calls 2

setClass · 0.85
on_onlineMethod · 0.80

Tested by

no test coverage detected