mirror of
https://github.com/autc04/Retro68.git
synced 2024-10-12 11:24:09 +00:00
23 lines
396 B
C++
23 lines
396 B
C++
#include "RezWorld.h"
|
|
|
|
RezWorld::RezWorld()
|
|
{
|
|
}
|
|
|
|
void RezWorld::addTypeDefinition(TypeSpec spec, TypeDefinitionPtr type)
|
|
{
|
|
types[spec] = type;
|
|
}
|
|
|
|
TypeDefinitionPtr RezWorld::getTypeDefinition(ResType type, int id)
|
|
{
|
|
auto p = types.find(TypeSpec(type, id));
|
|
if(p != types.end())
|
|
return p->second;
|
|
p = types.find(TypeSpec(type));
|
|
if(p != types.end())
|
|
return p->second;
|
|
|
|
return nullptr;
|
|
}
|