summaryrefslogtreecommitdiff
path: root/src/sorted.cpp
diff options
context:
space:
mode:
authorFox Caminiti <fox@foxcam.net>2022-12-22 13:29:02 -0500
committerFox Caminiti <fox@foxcam.net>2022-12-22 13:29:02 -0500
commit375c120d30456738897c4bd775e38aa1db7d239c (patch)
tree5b365a6233cf736db15fa52fcfac4ba80a986217 /src/sorted.cpp
parent4854647d659f75ac6cf4575b61d1dcfd25865791 (diff)
v3.1
Diffstat (limited to 'src/sorted.cpp')
-rw-r--r--src/sorted.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sorted.cpp b/src/sorted.cpp
index 9f2e135..46b9549 100644
--- a/src/sorted.cpp
+++ b/src/sorted.cpp
@@ -108,10 +108,14 @@ Layer_Sort_DisplayOffset(project_state *State, memory *Memory,
}
}
if (SortedCompStart->LayerCount > 1) {
- block_layer *Layer_Top = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, SortedLayerStart[SortedCompStart->LayerCount - 1].Block_Layer_Index);
- block_layer *Layer_Bottom = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, SortedLayerStart[0].Block_Layer_Index);
- real32 SmallestY = Layer_Top->Vertical_Offset;
- real32 LargestY = Layer_Bottom->Vertical_Offset;
+ sorted_layer_array LayerEntry_Top = SortedLayerStart[SortedCompStart->LayerCount - 1];
+ sorted_layer_array LayerEntry_Bottom = SortedLayerStart[0];
+ real32 SmallestY = LayerEntry_Top.SortedOffset;
+ real32 LargestY = LayerEntry_Bottom.SortedOffset;
+ // block_layer *Layer_Top = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, SortedLayerStart[SortedCompStart->LayerCount - 1].Block_Layer_Index);
+ // block_layer *Layer_Bottom = (block_layer *)Memory_Block_AddressAtIndex(Memory, F_Layers, SortedLayerStart[0].Block_Layer_Index);
+ // real32 SmallestY = Layer_Top->Vertical_Offset;
+ // real32 LargestY = Layer_Bottom->Vertical_Offset;
DisplayOffset = LargestY - SmallestY + 2 + DisplayOffset;
}
return DisplayOffset;