diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-05-30 16:28:38 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-05-30 16:29:31 +0300 |
commit | 2b8e0b02338400b215b73cec900ffa1fddbac60a (patch) | |
tree | 0920d2980bf60aeeb5b9a44140f4537353ced0d9 /src/resources/map | |
parent | dc8422dbac2c45a082153240138d699c1bfc3b88 (diff) | |
download | mv-2b8e0b02338400b215b73cec900ffa1fddbac60a.tar.gz mv-2b8e0b02338400b215b73cec900ffa1fddbac60a.tar.bz2 mv-2b8e0b02338400b215b73cec900ffa1fddbac60a.tar.xz mv-2b8e0b02338400b215b73cec900ffa1fddbac60a.zip |
Move user defined colors enum into separate file.
Diffstat (limited to 'src/resources/map')
-rw-r--r-- | src/resources/map/map.cpp | 6 | ||||
-rw-r--r-- | src/resources/map/mapitem.cpp | 10 | ||||
-rw-r--r-- | src/resources/map/maplayer.cpp | 4 |
3 files changed, 11 insertions, 9 deletions
diff --git a/src/resources/map/map.cpp b/src/resources/map/map.cpp index 111e7c26b..6ccc7b7a4 100644 --- a/src/resources/map/map.cpp +++ b/src/resources/map/map.cpp @@ -354,7 +354,7 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) if (mDrawLayersFlags == MapType::BLACKWHITE && userPalette) { graphics->setColor(userPalette->getColorWithAlpha( - UserPalette::WALKABLE_HIGHLIGHT)); + UserColorId::WALKABLE_HIGHLIGHT)); graphics->fillRectangle(Rect(0, 0, graphics->mWidth, graphics->mHeight)); @@ -541,7 +541,7 @@ void Map::draw(Graphics *const graphics, int scrollX, int scrollY) if (width && userPalette)\ {\ graphics->setColor(userPalette->getColorWithAlpha(\ - UserPalette::color));\ + UserColorId::color));\ graphics->fillRectangle(Rect(\ x0 * mTileWidth - scrollX, \ y * mTileHeight - scrollY, \ @@ -570,7 +570,7 @@ void Map::drawCollision(Graphics *const graphics, if (drawFlags < MapType::SPECIAL) { - graphics->setColor(userPalette->getColorWithAlpha(UserPalette::NET)); + graphics->setColor(userPalette->getColorWithAlpha(UserColorId::NET)); graphics->drawNet( startX * mTileWidth - scrollX, startY * mTileHeight - scrollY, diff --git a/src/resources/map/mapitem.cpp b/src/resources/map/mapitem.cpp index 3037dfb4a..29f2b8eff 100644 --- a/src/resources/map/mapitem.cpp +++ b/src/resources/map/mapitem.cpp @@ -20,6 +20,8 @@ #include "resources/map/mapitem.h" +#include "enums/gui/usercolorid.h" + #include "gui/gui.h" #include "gui/userpalette.h" @@ -141,17 +143,17 @@ void MapItem::draw(Graphics *const graphics, const int x, const int y, case MapItemType::ROAD: case MapItemType::CROSS: graphics->setColor(userPalette->getColorWithAlpha( - UserPalette::ROAD_POINT)); + UserColorId::ROAD_POINT)); graphics->fillRectangle(Rect(x + dx / 3, y + dy / 3, dx / 3, dy / 3)); break; case MapItemType::HOME: { graphics->setColor(userPalette->getColorWithAlpha( - UserPalette::HOME_PLACE)); + UserColorId::HOME_PLACE)); graphics->fillRectangle(Rect(x, y, dx, dy)); graphics->setColor(userPalette->getColorWithAlpha( - UserPalette::HOME_PLACE_BORDER)); + UserColorId::HOME_PLACE_BORDER)); graphics->drawRectangle(Rect(x, y, dx, dy)); break; } @@ -165,7 +167,7 @@ void MapItem::draw(Graphics *const graphics, const int x, const int y, Font *const font = gui->getFont(); if (font) { - const Color &color = userPalette->getColor(UserPalette::BEING); + const Color &color = userPalette->getColor(UserColorId::BEING); font->drawString(graphics, color, color, diff --git a/src/resources/map/maplayer.cpp b/src/resources/map/maplayer.cpp index 9b73046bd..d7aaa8e72 100644 --- a/src/resources/map/maplayer.cpp +++ b/src/resources/map/maplayer.cpp @@ -626,10 +626,10 @@ void MapLayer::drawFringe(Graphics *const graphics, int startX, int startY, if (userPalette) { graphics->setColor(userPalette->getColorWithAlpha( - UserPalette::ATTACK_RANGE)); + UserColorId::ATTACK_RANGE)); graphics->fillRectangle(Rect(x, y, w, h)); graphics->setColor(userPalette->getColorWithAlpha( - UserPalette::ATTACK_RANGE_BORDER)); + UserColorId::ATTACK_RANGE_BORDER)); graphics->drawRectangle(Rect(x, y, w, h)); } } |