| 185 | } |
| 186 | |
| 187 | void colourFromPixelValue(MiniMapDrawnFullPixel pixelValue, Seat* seatIfClaimed, |
| 188 | Ogre::HardwarePixelBufferSharedPtr pixelBuffer, Ogre::PixelBox pixelBox, |
| 189 | uint32_t minimapWidth, uint32_t minimapHeight, uint32_t minimapXMin, |
| 190 | uint32_t minimapXMax, uint32_t minimapYMin, uint32_t minimapYMax) |
| 191 | { |
| 192 | Ogre::uint8 RR = 0x00; |
| 193 | Ogre::uint8 GG = 0x00; |
| 194 | Ogre::uint8 BB = 0x00; |
| 195 | switch(pixelValue) |
| 196 | { |
| 197 | case MiniMapDrawnFullPixel::enemyCreature: |
| 198 | { |
| 199 | RR = 0xFF; |
| 200 | GG = 0x00; |
| 201 | BB = 0x00; |
| 202 | break; |
| 203 | } |
| 204 | case MiniMapDrawnFullPixel::claimedFull: |
| 205 | { |
| 206 | if(seatIfClaimed == nullptr) |
| 207 | { |
| 208 | RR = 0x86; |
| 209 | GG = 0x50; |
| 210 | BB = 0x28; |
| 211 | } |
| 212 | else |
| 213 | { |
| 214 | const Ogre::ColourValue& color = seatIfClaimed->getColorValue(); |
| 215 | RR = color.r * 255.0; |
| 216 | GG = color.g * 255.0; |
| 217 | BB = color.b * 255.0; |
| 218 | } |
| 219 | break; |
| 220 | } |
| 221 | case MiniMapDrawnFullPixel::claimedGround: |
| 222 | { |
| 223 | if(seatIfClaimed == nullptr) |
| 224 | { |
| 225 | RR = 0x5C; |
| 226 | GG = 0x37; |
| 227 | BB = 0x1B; |
| 228 | } |
| 229 | else |
| 230 | { |
| 231 | const Ogre::ColourValue& color = seatIfClaimed->getColorValue(); |
| 232 | RR = color.r * 200.0; |
| 233 | GG = color.g * 200.0; |
| 234 | BB = color.b * 200.0; |
| 235 | } |
| 236 | break; |
| 237 | } |
| 238 | case MiniMapDrawnFullPixel::goldFull: |
| 239 | { |
| 240 | RR = 0xB5; |
| 241 | GG = 0xB3; |
| 242 | BB = 0x2F; |
| 243 | break; |
| 244 | } |