Add a layer for game characters.

This commit is contained in:
King_DuckZ 2017-03-15 21:58:51 +00:00
parent b60bbf3739
commit be56c55e3e
3 changed files with 5 additions and 3 deletions

View File

@ -119,7 +119,7 @@ namespace curry {
item.source = source_rect();
item.destination = destination_rect(parViewport.position());
item.texture = texture();
parDQ.add_for_rendering(DrawaLayerNames::Background, std::move(item));
parDQ.add_for_rendering(DrawaLayerNames::Characters, std::move(item));
assert(not item.texture);
}

View File

@ -25,6 +25,7 @@
namespace curry {
BETTER_ENUM(DrawaLayerNames, uint16_t,
Background,
Debug
);
Debug,
Characters
)
} //namespace curry

View File

@ -83,6 +83,7 @@ namespace curry {
inp.AddAction(ActionDown, Key(InputDevice_Keyboard, SDL_SCANCODE_DOWN), "Move down");
add_layer_assert_done(drawing_queue(), DrawaLayerNames::Background);
add_layer_assert_done(drawing_queue(), DrawaLayerNames::Characters);
#if !defined(NDEBUG)
add_layer_assert_done(drawing_queue(), DrawaLayerNames::Debug);
#endif