X-Git-Url: https://git.ucc.asn.au/?p=progcomp2012.git;a=blobdiff_plain;f=judge%2Fmanager%2Fstratego.cpp;h=0e299cbf10035b7df77814a621c1beb7047a4c1e;hp=c9716cf3f6df67831ddd86040346ec172858aeeb;hb=36bffb1754deb18b223a3206daa2478568675909;hpb=ac335e7c423d067effae82cc80db518f896271b9 diff --git a/judge/manager/stratego.cpp b/judge/manager/stratego.cpp index c9716cf..0e299cb 100644 --- a/judge/manager/stratego.cpp +++ b/judge/manager/stratego.cpp @@ -234,7 +234,7 @@ void Board::Draw(const Piece::Colour & reveal, bool showRevealed) } Graphics::ClearScreen(); - + float scale = (float)(Piece::textures[(int)(Piece::NOTHING)].width()) / (float)(GRID_SIZE); for (int y=0; y < height; ++y) { for (int x=0; x < width; ++x) @@ -249,7 +249,8 @@ void Board::Draw(const Piece::Colour & reveal, bool showRevealed) || (piece->beenRevealed && showRevealed)) { //Display the piece - Piece::textures[(int)(piece->type)].DrawColour(x*32,y*32,0,1, Piece::GetGraphicsColour(piece->colour)); + + Piece::textures[(int)(piece->type)].DrawColour(x*GRID_SIZE*scale,y*GRID_SIZE*scale,0,scale, Piece::GetGraphicsColour(piece->colour)); } else @@ -257,16 +258,16 @@ void Board::Draw(const Piece::Colour & reveal, bool showRevealed) switch (piece->colour) { case Piece::RED: - Piece::textures[(int)(Piece::NOTHING)].DrawColour(x*32,y*32,0,1, Piece::GetGraphicsColour(piece->colour)); + Piece::textures[(int)(Piece::NOTHING)].DrawColour(x*GRID_SIZE*scale,y*GRID_SIZE*scale,0,scale, Piece::GetGraphicsColour(piece->colour)); break; case Piece::BLUE: - Piece::textures[(int)(Piece::NOTHING)].DrawColour(x*32,y*32,0,1, Piece::GetGraphicsColour(piece->colour)); + Piece::textures[(int)(Piece::NOTHING)].DrawColour(x*GRID_SIZE*scale,y*GRID_SIZE*scale,0,scale, Piece::GetGraphicsColour(piece->colour)); break; case Piece::NONE: - Piece::textures[(int)(Piece::BOULDER)].DrawColour(x*32,y*32,0,1, Piece::GetGraphicsColour(piece->colour)); + Piece::textures[(int)(Piece::BOULDER)].DrawColour(x*GRID_SIZE*scale,y*GRID_SIZE*scale,0,scale, Piece::GetGraphicsColour(piece->colour)); break; case Piece::BOTH: - Piece::textures[(int)(Piece::BOULDER)].DrawColour(x*32,y*32,0,1, Piece::GetGraphicsColour(piece->colour)); + Piece::textures[(int)(Piece::BOULDER)].DrawColour(x*GRID_SIZE*scale,y*GRID_SIZE*scale,0,scale, Piece::GetGraphicsColour(piece->colour)); break; } }