summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteph Enders <smenders@gmail.com>2022-12-23 09:53:15 -0500
committerSteph Enders <smenders@gmail.com>2022-12-23 09:53:15 -0500
commit992c7d333af698a62fb586133a3b1e22a12c46af (patch)
tree87f37dd752744e82c1c18357bedbf0c72de88689
parent90909fb803e0c40a67b08cd41f6d0d447ee62f74 (diff)
Update key, door color pairingsHEADmaster
It was hard to use the black and white, so moving to a literal RGB"Y" color combination (since treasure is Yellow, I used a more orange / tan)
-rw-r--r--src/SfmlUtils.h20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/SfmlUtils.h b/src/SfmlUtils.h
index 86d5f62..0a968ee 100644
--- a/src/SfmlUtils.h
+++ b/src/SfmlUtils.h
@@ -37,6 +37,10 @@
const float SPRITE_SIZE = 16.f; // squares
const sf::Color WALL_COLOR = sf::Color(150, 150, 150, 255);
const sf::Color BLANK_COLOR = sf::Color(216, 216, 216, 255);
+const sf::Color A_DOOR_COLOR = sf::Color(255, 0, 0, 255);
+const sf::Color B_DOOR_COLOR = sf::Color(0, 255, 0, 255);
+const sf::Color C_DOOR_COLOR = sf::Color(0, 0, 255, 255);
+const sf::Color D_DOOR_COLOR = sf::Color(229, 163, 78, 255);
inline sf::Keyboard::Key get_key(sf::Event event) {
if (event.type == sf::Event::KeyPressed ||
@@ -90,28 +94,28 @@ inline sf::RectangleShape create_treasure(int x, int y) {
inline sf::RectangleShape create_key(char t, int x, int y) {
switch (t) {
case '1':
- return create_small_square(sf::Color::Blue, x, y);
+ return create_small_square(A_DOOR_COLOR, x, y);
case '2':
- return create_small_square(sf::Color::Green, x, y);
+ return create_small_square(B_DOOR_COLOR, x, y);
case '3':
- return create_small_square(sf::Color::Black, x, y);
+ return create_small_square(C_DOOR_COLOR, x, y);
case '4':
default:
- return create_small_square(sf::Color::White, x, y);
+ return create_small_square(D_DOOR_COLOR, x, y);
}
}
inline sf::RectangleShape create_door(char t, int x, int y) {
switch (t) {
case 'a':
- return create_square(sf::Color::Blue, x, y);
+ return create_square(A_DOOR_COLOR, x, y);
case 'b':
- return create_square(sf::Color::Green, x, y);
+ return create_square(B_DOOR_COLOR, x, y);
case 'c':
- return create_square(sf::Color::Black, x, y);
+ return create_square(C_DOOR_COLOR, x, y);
case 'd':
default:
- return create_square(sf::Color::White, x, y);
+ return create_square(D_DOOR_COLOR, x, y);
}
}