From 75ca0750dcc07b6ca043320397917e33638e97b4 Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Fri, 6 Dec 2024 19:54:16 +0100 Subject: fixed tests --- src/crepe/system/RenderSystem.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/crepe/system') diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index 241e833..830d380 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -46,8 +46,8 @@ SDLContext::CameraValues RenderSystem::update_camera() { } bool sorting_comparison(const Sprite & a, const Sprite & b) { - if (a.data.sorting_in_layer < b.data.sorting_in_layer) return true; - if (a.data.sorting_in_layer == b.data.sorting_in_layer) + if (a.data.sorting_in_layer != b.data.sorting_in_layer) return a.data.sorting_in_layer < b.data.sorting_in_layer; + if (a.data.order_in_layer != b.data.order_in_layer) return a.data.order_in_layer < b.data.order_in_layer; return false; -- cgit v1.2.3