Code review

Most of this code was developed by students, it requires some additional
review to be used for teaching.
This commit is contained in:
raysan5
2016-02-07 11:23:12 +01:00
parent 4a3509f06d
commit 4ad375a378
7 changed files with 472 additions and 568 deletions

View File

@ -206,24 +206,24 @@ void DrawGame(void)
if (!gameOver)
{
DrawCircle(floppy.position.x, floppy.position.y, floppy.radius, BLUE);
DrawCircle(floppy.position.x, floppy.position.y, floppy.radius, DARKGRAY);
// Draw tubes
for (int i = 0; i < MAX_TUBES; i++)
{
DrawRectangle(tubes[i*2].rec.x, tubes[i*2].rec.y, tubes[i*2].rec.width, tubes[i*2].rec.height, RED);
DrawRectangle(tubes[i*2 + 1].rec.x, tubes[i*2 + 1].rec.y, tubes[i*2 + 1].rec.width, tubes[i*2 + 1].rec.height, RED);
DrawRectangle(tubes[i*2].rec.x, tubes[i*2].rec.y, tubes[i*2].rec.width, tubes[i*2].rec.height, GRAY);
DrawRectangle(tubes[i*2 + 1].rec.x, tubes[i*2 + 1].rec.y, tubes[i*2 + 1].rec.width, tubes[i*2 + 1].rec.height, GRAY);
}
// Draw flashing fx (one frame only)
if (superfx)
{
DrawRectangle(0, 0, screenWidth, screenHeight, GOLD);
DrawRectangle(0, 0, screenWidth, screenHeight, WHITE);
superfx = false;
}
DrawText(FormatText("%04i", score), 20, 20, 40, PINK);
DrawText(FormatText("HI-SCORE: %04i", hiScore), 20, 70, 20, VIOLET);
DrawText(FormatText("%04i", score), 20, 20, 40, GRAY);
DrawText(FormatText("HI-SCORE: %04i", hiScore), 20, 70, 20, LIGHTGRAY);
if (pause) DrawText("GAME PAUSED", screenWidth/2 - MeasureText("GAME PAUSED", 40)/2, screenHeight/2 - 40, 40, GRAY);
}