Browse Source

Updated game to raylib v1.7

pull/246/head
raysan5 8 years ago
parent
commit
63c65f8cc5
6 changed files with 11 additions and 11 deletions
  1. BIN
      docs/images/wave_collector_gameplay.png
  2. BIN
      docs/images/wave_collector_title.png
  3. +3
    -3
      games/wave_collector/screens/screen_ending.c
  4. +6
    -6
      games/wave_collector/screens/screen_gameplay.c
  5. +1
    -1
      games/wave_collector/screens/screen_title.c
  6. +1
    -1
      games/wave_collector/wave_collector.c

BIN
docs/images/wave_collector_gameplay.png View File

Before After
Width: 1280  |  Height: 720  |  Size: 981 KiB

BIN
docs/images/wave_collector_title.png View File

Before After
Width: 1280  |  Height: 720  |  Size: 1.0 MiB

+ 3
- 3
games/wave_collector/screens/screen_ending.c View File

@ -77,12 +77,12 @@ void DrawEndingScreen(void)
if (endingStatus == 1) // Win if (endingStatus == 1) // Win
{ {
DrawTexture(texWin, GetScreenWidth()/2 - texWin.width/2, 90, WHITE); DrawTexture(texWin, GetScreenWidth()/2 - texWin.width/2, 90, WHITE);
DrawTextEx(font, "congrats, you got the wave!", (Vector2){ 200, 335 }, font.size, 0, WHITE);
DrawTextEx(font, "congrats, you got the wave!", (Vector2){ 200, 335 }, font.baseSize, 0, WHITE);
} }
else if (endingStatus == 2) // Lose else if (endingStatus == 2) // Lose
{ {
DrawTexture(texLose, GetScreenWidth()/2 - texWin.width/2, 90, WHITE); DrawTexture(texLose, GetScreenWidth()/2 - texWin.width/2, 90, WHITE);
DrawTextEx(font, "it seems you lose the wave...", (Vector2){ 205, 335 }, font.size, 0, WHITE);
DrawTextEx(font, "it seems you lose the wave...", (Vector2){ 205, 335 }, font.baseSize, 0, WHITE);
} }
DrawRectangle(0, GetScreenHeight() - 70, 560, 40, Fade(RAYWHITE, 0.8f)); DrawRectangle(0, GetScreenHeight() - 70, 560, 40, Fade(RAYWHITE, 0.8f));
@ -91,7 +91,7 @@ void DrawEndingScreen(void)
DrawText("powered by", GetScreenWidth() - 162, GetScreenHeight() - 190, 20, DARKGRAY); DrawText("powered by", GetScreenWidth() - 162, GetScreenHeight() - 190, 20, DARKGRAY);
DrawTexture(texLogo, GetScreenWidth() - 128 - 34, GetScreenHeight() - 128 - 36, WHITE); DrawTexture(texLogo, GetScreenWidth() - 128 - 34, GetScreenHeight() - 128 - 36, WHITE);
if ((framesCounter > 80) && ((framesCounter/40)%2)) DrawTextEx(font, "mouse click to return", (Vector2){ 300, 464 }, font.size, 0, SKYBLUE);
if ((framesCounter > 80) && ((framesCounter/40)%2)) DrawTextEx(font, "mouse click to return", (Vector2){ 300, 464 }, font.baseSize, 0, SKYBLUE);
} }
// Ending Screen Unload logic // Ending Screen Unload logic

+ 6
- 6
games/wave_collector/screens/screen_gameplay.c View File

@ -399,15 +399,15 @@ void DrawGameplayScreen(void)
DrawTexture(texPlayer, player.position.x - 32, player.position.y - 24, WHITE); DrawTexture(texPlayer, player.position.x - 32, player.position.y - 24, WHITE);
// Draw pause message // Draw pause message
if (pause) DrawTextEx(font, "WAVE PAUSED", (Vector2){ 235, 400 }, font.size*2, 0, WHITE);
if (pause) DrawTextEx(font, "WAVE PAUSED", (Vector2){ 235, 400 }, font.baseSize*2, 0, WHITE);
// Draw number of samples // Draw number of samples
//DrawText(FormatText("%05i", collectedSamples), 900, 200, 40, GRAY); //DrawText(FormatText("%05i", collectedSamples), 900, 200, 40, GRAY);
//DrawText(FormatText("%05i", totalSamples), 900, 250, 40, GRAY); //DrawText(FormatText("%05i", totalSamples), 900, 250, 40, GRAY);
DrawTextEx(font, FormatText("%05i / %05i", collectedSamples, totalSamples), (Vector2){810, 170}, font.size, -2, SKYBLUE);
DrawTextEx(font, FormatText("%05i / %05i", collectedSamples, totalSamples), (Vector2){810, 170}, font.baseSize, -2, SKYBLUE);
// Draw combo // Draw combo
DrawTextEx(font, FormatText("Combo: %02i [max: %02i]", combo, maxCombo), (Vector2){200, 170}, font.size/2, -2, SKYBLUE);
DrawTextEx(font, FormatText("Combo: %02i [max: %02i]", combo, maxCombo), (Vector2){200, 170}, font.baseSize/2, -2, SKYBLUE);
// Draw synchonicity level // Draw synchonicity level
DrawRectangle(99, 622, 395, 32, Fade(RAYWHITE, 0.8f)); DrawRectangle(99, 622, 395, 32, Fade(RAYWHITE, 0.8f));
@ -419,15 +419,15 @@ void DrawGameplayScreen(void)
DrawRectangleLines(99, 622, 395, 32, MAROON); DrawRectangleLines(99, 622, 395, 32, MAROON);
if (synchro == 1.0f) DrawTextEx(font, FormatText("%02i%%", (int)(synchro*100)), (Vector2){99 + 390, 600}, font.size, -2, GREEN);
else DrawTextEx(font, FormatText("%02i%%", (int)(synchro*100)), (Vector2){99 + 390, 600}, font.size, -2, SKYBLUE);
if (synchro == 1.0f) DrawTextEx(font, FormatText("%02i%%", (int)(synchro*100)), (Vector2){99 + 390, 600}, font.baseSize, -2, GREEN);
else DrawTextEx(font, FormatText("%02i%%", (int)(synchro*100)), (Vector2){99 + 390, 600}, font.baseSize, -2, SKYBLUE);
// Draw time warp coool-down bar // Draw time warp coool-down bar
DrawRectangle(754, 622, 395, 32, Fade(RAYWHITE, 0.8f)); DrawRectangle(754, 622, 395, 32, Fade(RAYWHITE, 0.8f));
DrawRectangle(754, 622, warpCounter, 32, Fade(SKYBLUE, 0.8f)); DrawRectangle(754, 622, warpCounter, 32, Fade(SKYBLUE, 0.8f));
DrawRectangleLines(754, 622, 395, 32, DARKGRAY); DrawRectangleLines(754, 622, 395, 32, DARKGRAY);
//DrawText(FormatText("%02i%%", (int)(synchro*100)), 754 + 410, 628, 20, DARKGRAY); //DrawText(FormatText("%02i%%", (int)(synchro*100)), 754 + 410, 628, 20, DARKGRAY);
DrawTextEx(font, FormatText("%02i%%", (int)((float)warpCounter/395.0f*100.0f)), (Vector2){754 + 390, 600}, font.size, -2, SKYBLUE);
DrawTextEx(font, FormatText("%02i%%", (int)((float)warpCounter/395.0f*100.0f)), (Vector2){754 + 390, 600}, font.baseSize, -2, SKYBLUE);
// Draw wave // Draw wave
// NOTE: Old drawing method, replaced by rendertarget // NOTE: Old drawing method, replaced by rendertarget

+ 1
- 1
games/wave_collector/screens/screen_title.c View File

@ -91,7 +91,7 @@ void DrawTitleScreen(void)
DrawText("powered by", GetScreenWidth() - 162, GetScreenHeight() - 190, 20, DARKGRAY); DrawText("powered by", GetScreenWidth() - 162, GetScreenHeight() - 190, 20, DARKGRAY);
DrawTexture(texLogo, GetScreenWidth() - 128 - 34, GetScreenHeight() - 128 - 36, WHITE); DrawTexture(texLogo, GetScreenWidth() - 128 - 34, GetScreenHeight() - 128 - 36, WHITE);
if ((framesCounter > 160) && ((framesCounter/40)%2)) DrawTextEx(font, "mouse click to start", (Vector2){ 325, 500 }, font.size, 0, SKYBLUE);
if ((framesCounter > 160) && ((framesCounter/40)%2)) DrawTextEx(font, "mouse click to start", (Vector2){ 325, 500 }, font.baseSize, 0, SKYBLUE);
} }
// Title Screen Unload logic // Title Screen Unload logic

+ 1
- 1
games/wave_collector/wave_collector.c View File

@ -7,7 +7,7 @@
* The level is actually the wave and the wave is the level! * The level is actually the wave and the wave is the level!
* Be fast! Be smart! Be the best wave collector! * Be fast! Be smart! Be the best wave collector!
* *
* This game has been created using raylib (www.raylib.com)
* This game has been created using raylib n">v1.7 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
* *
* Copyright (c) 2017 Ramon Santamaria (@raysan5) * Copyright (c) 2017 Ramon Santamaria (@raysan5)

Loading…
Cancel
Save