; Mambo/Trugo/Gates tiles by J. Lund, nanDECK 1.10be ; Games (c) 2007-2008 by Cameron Browne, www.cameronius.com/games ;include="setup.nde" ; CARDSIZE: Maintain hexagonal aspect ratio of 1:sin(60). Also see ZOOM. cardsize=4.62,4 border=NONE [colorA]=#FF0000 [colorB]=#3399FF [backgroundColor]=#FFFFFF [hexColor]=#CCCCCC [borderColor]=#333333 ; If borderThick changed, re-calculate wedgeCoords to bisect sides: ; W%=50-(borderThick/cardW); H%=W/sin(60); X%=-(W/2); Y%=(100-H)/2 [borderThick]=0.05 [wedgeCoords]=-25.00%,21.14%, 49.99%,57.72% macro=rotate180, (range) copy="(range)", 0,0, 100%,100%, 0,0, 100%,100%, 180 end macro=drawSide, (range), (bridgeColor), (wedgeColor) ; Bridge rectangle=(range), 0,0, 50%,100%, (bridgeColor) line=(range), 50%,0, 50%,100%, [borderColor],[borderThick] ; Wedge if=[colorB]@(bridgeColor),(wedgeColor) ellipse=(range), [wedgeCoords], [borderColor],(wedgeColor),[borderThick] else star=(range), [wedgeCoords], 24, 0, 80, [borderColor],(wedgeColor),[borderThick] endif end macro=drawHex, (range), (color), (thickness) ; Unlike POLYGON, LINE doesn't add padding. line=(range), 0,50%, 25%,0, (color),(thickness) line=(range), 25%,0, 75%,0, (color),(thickness) line=(range), 75%,0, 100%,50%, (color),(thickness) line=(range), 0,50%, 25%,100%, (color),(thickness) line=(range), 25%,100%, 75%,100%, (color),(thickness) line=(range), 75%,100%, 100%,50%, (color),(thickness) end macro=trimCorners, (range), (stopColor) ; 100% is out-of-bounds for FILL. fill=(range), 0%,0%, #FFFFFF,(stopColor) fill=(range), 99%,0%, #FFFFFF,(stopColor) fill=(range), 0%,99%, #FFFFFF,(stopColor) fill=(range), 99%,99%, #FFFFFF,(stopColor) end macro=makeTile, (range), (dominantColor), (subordinantColor) drawSide=(range), (dominantColor), [backgroundColor] rotate180=(range) drawSide=(range), [backgroundColor], (subordinantColor) drawHex=(range), [hexColor], 0.025 trimCorners=(range), [hexColor] end makeTile=1-55, [colorA]|[colorB], [colorB]|[colorA]