(index int)
| 3131 | } |
| 3132 | |
| 3133 | func (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 | |
| 3141 | func (mc *MapContents) ColorIndexToColor(index int) int { |
| 3142 | c := index &^ (MapPatternSolid + MapPatternDotted + MapPatternCrossed + MapPatternChecked + MapPatternTerrain) |