X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fapp%2Fapp.cpp;h=6c89bdbeebeef3710b43b37881a0af1042e8ccf6;hb=04bca2c5e74df466312c69abadf38e1f84aa70a9;hp=2b1a494efadbd20424a22886b57e93c6c2828478;hpb=a7eb097d4c1513108b5588eb2e99014ace85c9c5;p=blank.git diff --git a/src/app/app.cpp b/src/app/app.cpp index 2b1a494..6c89bdb 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -81,7 +81,7 @@ void HeadlessApplication::RunS(size_t n, size_t t) { for (size_t i = 0; HasState() && i < n; ++i) { Loop(t); std::cout << '.'; - if (i % 16 == 15) { + if (i % 32 == 31) { std::cout << std::setfill(' ') << std::setw(5) << std::right << (i + 1) << std::endl; } else { std::cout << std::flush; @@ -321,14 +321,19 @@ 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(type); + reg.Add(std::move(type)); } }