X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fapp.cpp;fp=src%2Fapp%2Fapp.cpp;h=6c89bdbeebeef3710b43b37881a0af1042e8ccf6;hb=b94a7dc7daad9ae9be90a39d723e332dae375325;hp=4cc742ffede2ad5db34617b69b28570d307209b7;hpb=da21395e4900bf283ece7364c67d9bad27dca279;p=blank.git diff --git a/src/app/app.cpp b/src/app/app.cpp index 4cc742f..6c89bdb 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -321,11 +321,16 @@ void AssetLoader::LoadBlockTypes( throw std::runtime_error("failed to open block type file " + full); } TokenStreamReader in(file); - string name; + string proto; while (in.HasMore()) { - in.ReadIdentifier(name); - in.Skip(Token::EQUALS); BlockType type; + in.ReadIdentifier(type.name); + in.Skip(Token::EQUALS); + if (in.Peek().type == Token::IDENTIFIER) { + // prototype + in.ReadIdentifier(proto); + type.Copy(reg.Get(proto)); + } type.Read(in, snd_index, tex_index, shapes); in.Skip(Token::SEMICOLON); reg.Add(std::move(type));