MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / shouldTryCullPaintStruct

Function shouldTryCullPaintStruct

src/OpenLoco/src/Paint/Paint.cpp:905–948  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

903 }
904
905 static bool shouldTryCullPaintStruct(const PaintStruct& ps, const Ui::ViewportFlags viewFlags)
906 {
907 if ((viewFlags & Ui::ViewportFlags::seeThroughTracks) != Ui::ViewportFlags::none)
908 {
909 if (isTypeCullableTrack(ps.type))
910 {
911 return true;
912 }
913 }
914 if ((viewFlags & Ui::ViewportFlags::seeThroughRoads) != Ui::ViewportFlags::none)
915 {
916 if (isTypeCullableRoad(ps.type))
917 {
918 return true;
919 }
920 }
921 if ((viewFlags & Ui::ViewportFlags::seeThroughTrees) != Ui::ViewportFlags::none)
922 {
923 if (isTypeCullableTree(ps.type))
924 {
925 return true;
926 }
927 }
928 if ((viewFlags & Ui::ViewportFlags::seeThroughScenery) != Ui::ViewportFlags::none)
929 {
930 if (isTypeCullableScenery(ps.type))
931 {
932 return true;
933 }
934 }
935 if ((viewFlags & Ui::ViewportFlags::seeThroughBuildings) != Ui::ViewportFlags::none)
936 {
937 if (isTypeCullableBuilding(ps.type))
938 {
939 return true;
940 }
941 }
942 if (((viewFlags & Ui::ViewportFlags::seeThroughBridges) != Ui::ViewportFlags::none)
943 && (isTypeCullableBridge(ps.type)))
944 {
945 return true;
946 }
947 return false;
948 }
949
950 static bool cullPaintStructImage(const ImageId& imageId, const Ui::ViewportFlags viewFlags)
951 {

Callers 2

drawAllAttachedStructsFunction · 0.85
drawStructsMethod · 0.85

Calls 6

isTypeCullableTrackFunction · 0.85
isTypeCullableRoadFunction · 0.85
isTypeCullableTreeFunction · 0.85
isTypeCullableSceneryFunction · 0.85
isTypeCullableBuildingFunction · 0.85
isTypeCullableBridgeFunction · 0.85

Tested by

no test coverage detected