diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-02 20:02:14 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-02 20:02:14 +0100 |
commit | a84ca09e97d466643f022acfffcf4c6a77f42052 (patch) | |
tree | f375067b4250f468eb3b57d968efa3417f0f521d /src/crepe/system/RenderSystem.cpp | |
parent | 135af8b0e0eaf8a5a5b7e1a42bfb20bb14ec97e5 (diff) |
making struct constructors
Diffstat (limited to 'src/crepe/system/RenderSystem.cpp')
-rw-r--r-- | src/crepe/system/RenderSystem.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/crepe/system/RenderSystem.cpp b/src/crepe/system/RenderSystem.cpp index 944ac86..08f254f 100644 --- a/src/crepe/system/RenderSystem.cpp +++ b/src/crepe/system/RenderSystem.cpp @@ -40,8 +40,9 @@ const Camera & RenderSystem::update_camera() { } bool sorting_comparison(const Sprite & a, const Sprite & b) { - if (a.sorting_in_layer < b.sorting_in_layer) return true; - if (a.sorting_in_layer == b.sorting_in_layer) return a.order_in_layer < b.order_in_layer; + if (a.data.sorting_in_layer < b.data.sorting_in_layer) return true; + if (a.data.sorting_in_layer == b.data.sorting_in_layer) + return a.data.order_in_layer < b.data.order_in_layer; return false; } |