Skip to content

Commit c4d873a

Browse files
committed
fixed one more magic number
1 parent 210dad7 commit c4d873a

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/GameView.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ std::pair<float, float> lDieScreenLoc= make_pair(0.7f, 0.8f);
2323
std::pair<float, float> rDieScreenLoc= make_pair(0.78f, 0.8f);
2424

2525
#define DIE_SIDE_LENGTH 0.06f
26+
#define DIE_SCREEN_SIDE_LENGTH 95.f
2627

2728
#define EMPLACE_SQUARE_VERTEX(imXOff, imYOff, scXOff, scYOff) \
2829
texCoordPair({texTopLeft.first + imXOff, texTopLeft.second + imYOff}); \
@@ -496,11 +497,11 @@ void DrawingGameVisitor::visit(GameDice& dice) {
496497
}
497498

498499

499-
drawTexturedRectangle(topLeftOffset.find(dice.getFirst())->second, 95.f,
500+
drawTexturedRectangle(topLeftOffset.find(dice.getFirst())->second, DIE_SCREEN_SIDE_LENGTH,
500501
lDieScreenLoc, DIE_SIDE_LENGTH);
501502

502503

503-
drawTexturedRectangle(topLeftOffset.find(dice.getSecond())->second, 95.f,
504+
drawTexturedRectangle(topLeftOffset.find(dice.getSecond())->second, DIE_SCREEN_SIDE_LENGTH,
504505
rDieScreenLoc, DIE_SIDE_LENGTH);
505506

506507

0 commit comments

Comments
 (0)