MCPcopy Create free account
hub / github.com/SolarLune/masterplan / ColorIndexToPattern

Method ColorIndexToPattern

contents.go:3133–3139  ·  view source on GitHub ↗
(index int)

Source from the content-addressed store, hash-verified

3131}
3132
3133func (mc *MapContents) ColorIndexToPattern(index int) int {
3134 c := index & (MapPatternSolid + MapPatternDotted + MapPatternCrossed + MapPatternChecked + MapPatternTerrain)
3135 if c < 0 {
3136 c = 0
3137 }
3138 return c
3139}
3140
3141func (mc *MapContents) ColorIndexToColor(index int) int {
3142 c := index &^ (MapPatternSolid + MapPatternDotted + MapPatternCrossed + MapPatternChecked + MapPatternTerrain)

Callers 1

UpdateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected