aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/system/RenderSystem.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-06 19:58:15 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-06 19:58:15 +0100
commit9c1fb8b2253149d4a15a94b7ee576a0f9e791033 (patch)
tree666955b4308e2d59f6958119f3efbcbf179c493d /src/crepe/system/RenderSystem.cpp
parente8d9e38b4c265e0efde32c38d01b511cb572a34d (diff)
parent75ca0750dcc07b6ca043320397917e33638e97b4 (diff)
Merge branch 'niels/decoupling_pixel_and_pos' of github.com:lonkaars/crepe
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r--src/crepe/system/RenderSystem.cpp4
1 files changed, 2 insertions, 2 deletions
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;