1
0

rd501_marker_macros.hpp 2.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #ifndef RD501_MARKER_CONFIG_MACROS
  2. #define RD501_MARKER_CONFIG_MACROS
  3. #define RD501_MARKER_ADDON RD501_Markers
  4. #define RD501_MARKER_QUOTE(target) #target
  5. #define RD501_MARKER_CONCAT(a,b) a##b
  6. //Convention: ui\markers\outline\rd501_marker_name_outline.paa
  7. #define RD501_MARKER_OUTLINE_PATH(name) RD501_MARKER_CONCAT(RD501_MARKER_ADDON,RD501_MARKER_CONCAT(\ui\markers\outline\rd501_marker_,RD501_MARKER_CONCAT(name,_outline.paa)))
  8. //Convention: ui\markers\logo\rd501_marker_name_logo.paa
  9. #define RD501_MARKER_LOGO_PATH(name) RD501_MARKER_CONCAT(RD501_MARKER_ADDON,RD501_MARKER_CONCAT(\ui\markers\logo\rd501_marker_,RD501_MARKER_CONCAT(name,_logo.paa)))
  10. #define RD501_MARKER_ARR_4(a,b,c,d) a, b, c, d
  11. //CfgMarker class, accepts typical vars and sets them, is wrapped by others below
  12. #define RD501_MARKER_CLASS_BASE(className,displayName,iconPath,hasShadow,markerSize,markerColour,markerGroup,markerScope) class className\
  13. {\
  14. name = displayName;\
  15. icon = iconPath;\
  16. texture = iconPath;\
  17. color[] = markerColour;\
  18. size = markerSize;\
  19. shadow = hasShadow;\
  20. markerClass = markerGroup;\
  21. scope = markerScope;\
  22. }
  23. // Group used for ordering in the marker menu
  24. #define RD501_MARKER_GROUP RD501_unitMarkers
  25. #define RD501_MARKER_GROUP_QUOTED RD501_MARKER_QUOTE(RD501_MARKER_GROUP)
  26. // SOURCECOLOUR -> Logos, things that need to keep their colour, generally only are white.
  27. // RD501_Marker_name_type
  28. #define RD501_MARKER_CLASSNAME(name,type) RD501_MARKER_CONCAT(RD501_Marker_,RD501_MARKER_CONCAT(name,RD501_MARKER_CONCAT(_,type)))
  29. #define RD501_MARKER_SOURCECOLOUR_NOSHADOW_GROUPED_PUBLIC(className,displayName,iconPath,markerSize) RD501_MARKER_CLASS_BASE(className,displayName,iconPath,false,markerSize,{RD501_MARKER_ARR_4(0,0,0,1)},RD501_MARKER_GROUP_QUOTED,2)
  30. // ANYCOLOUR -> Normal Map Markers, things that are colourable, or atleast survive being coloured well.
  31. #define RD501_MARKER_ANYCOLOUR_NOSHADOW_GROUPED_PUBLIC(className,displayName,iconPath,markerSize) RD501_MARKER_CLASS_BASE(className,displayName,iconPath,false,markerSize,{RD501_MARKER_ARR_4(0,0,0,1)},RD501_MARKER_GROUP_QUOTED,2)
  32. #endif