diff --git a/projects/mtg/include/GuiPlay.h b/projects/mtg/include/GuiPlay.h index 02182a168..64373d181 100644 --- a/projects/mtg/include/GuiPlay.h +++ b/projects/mtg/include/GuiPlay.h @@ -7,8 +7,8 @@ class GuiPlay : public GuiLayer { public: - static const float HORZWIDTH = 300.0f; - static const float VERTHEIGHT = 80.0f; + static const float HORZWIDTH; + static const float VERTHEIGHT; typedef vector::iterator iterator; protected: diff --git a/projects/mtg/src/GuiMana.cpp b/projects/mtg/src/GuiMana.cpp index 2bc14cc67..789bb029c 100644 --- a/projects/mtg/src/GuiMana.cpp +++ b/projects/mtg/src/GuiMana.cpp @@ -34,19 +34,19 @@ ManaIcon::ManaIcon(int color, float x, float y) : Pos(x, y, 0.5, 0.0, 255), f(-1 particleSys->FireAt(x, y); - zoomP1 = 0.2 + 0.1 * drand48(); - zoomP2 = 0.2 + 0.1 * drand48(); - zoomP3 = 2 * M_PI * drand48(); - zoomP4 = 2 * M_PI * drand48(); - zoomP5 = 0.5 + drand48(); - zoomP6 = 0.5 + drand48(); + zoomP1 = 0.2 + 0.1 * ((float)rand() / (float)RAND_MAX); + zoomP2 = 0.2 + 0.1 * ((float)rand() / (float)RAND_MAX); + zoomP3 = 2 * M_PI * ((float)rand() / (float)RAND_MAX); + zoomP4 = 2 * M_PI * ((float)rand() / (float)RAND_MAX); + zoomP5 = 0.5 + ((float)rand() / (float)RAND_MAX); + zoomP6 = 0.5 + ((float)rand() / (float)RAND_MAX); - xP1 = 2 * M_PI * drand48(); - xP2 = 5 + 30 * drand48(); - xP3 = 0.5 + drand48(); - yP1 = 2 * M_PI * drand48(); - yP2 = 5 + 10 * drand48(); - yP3 = 0.5 + drand48(); + xP1 = 2 * M_PI * ((float)rand() / (float)RAND_MAX); + xP2 = 5 + 30 * ((float)rand() / (float)RAND_MAX); + xP3 = 0.5 + ((float)rand() / (float)RAND_MAX); + yP1 = 2 * M_PI * ((float)rand() / (float)RAND_MAX); + yP2 = 5 + 10 * ((float)rand() / (float)RAND_MAX); + yP3 = 0.5 + ((float)rand() / (float)RAND_MAX); actT = 0; tP1 = 0; diff --git a/projects/mtg/src/GuiPlay.cpp b/projects/mtg/src/GuiPlay.cpp index ed21e45d9..0622626c5 100644 --- a/projects/mtg/src/GuiPlay.cpp +++ b/projects/mtg/src/GuiPlay.cpp @@ -4,6 +4,9 @@ #define CARD_WIDTH (31) +const float GuiPlay::HORZWIDTH = 300.0f; +const float GuiPlay::VERTHEIGHT = 80.0f; + void GuiPlay::CardStack::reset(float x, float y) { this->x = 0; baseX = x;