diff --git a/games/drturtle/04_drturtle_gui.c b/games/drturtle/04_drturtle_gui.c index 081ba437..5be8f1f1 100644 --- a/games/drturtle/04_drturtle_gui.c +++ b/games/drturtle/04_drturtle_gui.c @@ -338,7 +338,7 @@ int main() DrawTexture(title, screenWidth/2 - title.width/2, screenHeight/2 - title.height/2 - 80, WHITE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.size, 0, WHITE); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.baseSize, 0, WHITE); } break; case GAMEPLAY: @@ -388,8 +388,8 @@ int main() DrawRectangle(20, 20, foodBar, 40, ORANGE); DrawRectangleLines(20, 20, 400, 40, BLACK); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.baseSize, -2, ORANGE); if (gameraMode) { @@ -403,15 +403,15 @@ int main() // Draw a transparent black rectangle that covers all screen DrawRectangle(0, 0, screenWidth, screenHeight, Fade(BLACK, 0.4f)); - DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.size*3, -2, MAROON); + DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.baseSize*3, -2, MAROON); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.baseSize, -2, ORANGE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.size, -2, LIGHTGRAY); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.baseSize, -2, LIGHTGRAY); } break; default: break; @@ -444,4 +444,4 @@ int main() //-------------------------------------------------------------------------------------- return 0; -} \ No newline at end of file +} diff --git a/games/drturtle/05_drturtle_audio.c b/games/drturtle/05_drturtle_audio.c index f3660633..3645c657 100644 --- a/games/drturtle/05_drturtle_audio.c +++ b/games/drturtle/05_drturtle_audio.c @@ -354,7 +354,7 @@ int main() DrawTexture(title, screenWidth/2 - title.width/2, screenHeight/2 - title.height/2 - 80, WHITE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.size, 0, WHITE); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.baseSize, 0, WHITE); } break; case GAMEPLAY: @@ -404,8 +404,8 @@ int main() DrawRectangle(20, 20, foodBar, 40, ORANGE); DrawRectangleLines(20, 20, 400, 40, BLACK); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.baseSize, -2, ORANGE); if (gameraMode) { @@ -419,15 +419,15 @@ int main() // Draw a transparent black rectangle that covers all screen DrawRectangle(0, 0, screenWidth, screenHeight, Fade(BLACK, 0.4f)); - DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.size*3, -2, MAROON); + DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.baseSize*3, -2, MAROON); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.baseSize, -2, ORANGE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.size, -2, LIGHTGRAY); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.baseSize, -2, LIGHTGRAY); } break; default: break; @@ -468,4 +468,4 @@ int main() //-------------------------------------------------------------------------------------- return 0; -} \ No newline at end of file +} diff --git a/games/drturtle/06_drturtle_final.c b/games/drturtle/06_drturtle_final.c index b75cce81..2edebe87 100644 --- a/games/drturtle/06_drturtle_final.c +++ b/games/drturtle/06_drturtle_final.c @@ -379,7 +379,7 @@ int main() DrawTexture(title, screenWidth/2 - title.width/2, screenHeight/2 - title.height/2 - 80, WHITE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.size, 0, WHITE); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.baseSize, 0, WHITE); } break; case GAMEPLAY: @@ -429,8 +429,8 @@ int main() DrawRectangle(20, 20, foodBar, 40, ORANGE); DrawRectangleLines(20, 20, 400, 40, BLACK); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.baseSize, -2, ORANGE); if (gameraMode) { @@ -444,15 +444,15 @@ int main() // Draw a transparent black rectangle that covers all screen DrawRectangle(0, 0, screenWidth, screenHeight, Fade(BLACK, 0.4f)); - DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.size*3, -2, MAROON); + DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.baseSize*3, -2, MAROON); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.baseSize, -2, ORANGE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.size, -2, LIGHTGRAY); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.baseSize, -2, LIGHTGRAY); } break; default: break; @@ -493,4 +493,4 @@ int main() //-------------------------------------------------------------------------------------- return 0; -} \ No newline at end of file +} diff --git a/games/drturtle/drturtle_final_web.c b/games/drturtle/drturtle_final_web.c index 21e8067a..84f3b1c2 100644 --- a/games/drturtle/drturtle_final_web.c +++ b/games/drturtle/drturtle_final_web.c @@ -460,7 +460,7 @@ void UpdateDrawFrame(void) DrawTexture(title, screenWidth/2 - title.width/2, screenHeight/2 - title.height/2 - 80, WHITE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.size, 1, WHITE); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER", (Vector2){ screenWidth/2 - 150, 480 }, font.baseSize, 1, WHITE); } break; case GAMEPLAY: @@ -510,8 +510,8 @@ void UpdateDrawFrame(void) DrawRectangle(20, 20, foodBar, 40, ORANGE); DrawRectangleLines(20, 20, 400, 40, BLACK); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ screenWidth - 300, 20 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 550, 20 }, font.baseSize, -2, ORANGE); if (gameraMode) { @@ -525,15 +525,15 @@ void UpdateDrawFrame(void) // Draw a transparent black rectangle that covers all screen DrawRectangle(0, 0, screenWidth, screenHeight, Fade(BLACK, 0.4f)); - DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.size*3, -2, MAROON); + DrawTextEx(font, "GAME OVER", (Vector2){ 300, 160 }, font.baseSize*3, -2, MAROON); - DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.size, -2, GOLD); - DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.size, -2, ORANGE); - DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.size, -2, ORANGE); + DrawTextEx(font, FormatText("SCORE: %04i", score), (Vector2){ 680, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("DISTANCE: %04i", (int)distance), (Vector2){ 290, 350 }, font.baseSize, -2, GOLD); + DrawTextEx(font, FormatText("HISCORE: %04i", hiscore), (Vector2){ 665, 400 }, font.baseSize, -2, ORANGE); + DrawTextEx(font, FormatText("HIDISTANCE: %04i", (int)hidistance), (Vector2){ 270, 400 }, font.baseSize, -2, ORANGE); // Draw blinking text - if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.size, -2, LIGHTGRAY); + if ((framesCounter/30) % 2) DrawTextEx(font, "PRESS ENTER to REPLAY", (Vector2){ screenWidth/2 - 250, 520 }, font.baseSize, -2, LIGHTGRAY); } break; default: break; @@ -541,4 +541,4 @@ void UpdateDrawFrame(void) EndDrawing(); //---------------------------------------------------------------------------------- -} \ No newline at end of file +} diff --git a/games/drturtle/makefile b/games/drturtle/makefile index 52f95c77..ab7fd206 100644 --- a/games/drturtle/makefile +++ b/games/drturtle/makefile @@ -66,7 +66,7 @@ endif ifeq ($(PLATFORM),PLATFORM_RPI) CFLAGS = -O2 -Wall -std=gnu99 -fgnu89-inline else - CFLAGS = -O2 -Wall -std=c99 + CFLAGS = -O2 -Wall -std=c99 endif ifeq ($(PLATFORM),PLATFORM_WEB) CFLAGS = -O1 -Wall -std=c99 -s USE_GLFW=3 --preload-file resources -s ALLOW_MEMORY_GROWTH=1 --shell-file ../../templates/web_shell/shell.html @@ -114,7 +114,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/games/just_do/makefile b/games/just_do/makefile index a3b5da2d..6bb973c0 100644 --- a/games/just_do/makefile +++ b/games/just_do/makefile @@ -119,7 +119,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/games/light_my_ritual/makefile b/games/light_my_ritual/makefile index b86809c3..5cd4ee6b 100644 --- a/games/light_my_ritual/makefile +++ b/games/light_my_ritual/makefile @@ -114,14 +114,17 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libraries for Debian GNU/Linux desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev - LIBS = -lraylib -lglfw -lGLEW -lGL -lopenal + LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -lpthread -ldl + # on XWindow could require also below libraries, just uncomment + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor endif ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling # requires the following packages: # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw -framework OpenGL -framework OpenAl -framework Cocoa - else + endif + ifeq ($(PLATFORM_OS),WINDOWS) # libraries for Windows desktop compiling # NOTE: GLFW3 and OpenAL Soft libraries should be installed LIBS = -lraylib -lglfw3 -lglew32 -lopengl32 -lopenal32 -lgdi32 diff --git a/games/light_my_ritual/screens/screen_gameplay.c b/games/light_my_ritual/screens/screen_gameplay.c index ae929013..6e3bd1c2 100644 --- a/games/light_my_ritual/screens/screen_gameplay.c +++ b/games/light_my_ritual/screens/screen_gameplay.c @@ -687,7 +687,7 @@ void DrawGameplayScreen(void) } // Draw time left for ritual - DrawTextEx(font, FormatText("%02.2f", (99.0f - ritualTime)), (Vector2){ 560, 20 }, font.size, 0, WHITE); + DrawTextEx(font, FormatText("%02.2f", (99.0f - ritualTime)), (Vector2){ 560, 20 }, font.baseSize, 0, WHITE); // Draw light energy bar DrawRectangle(20, 30, 400, 20, GRAY); @@ -703,7 +703,7 @@ void DrawGameplayScreen(void) // Show message: "You run out of light!!!" if player.lightEnergy <= 0 if (player.lightEnergy < 2) { - if ((framesCounter/20)%2) DrawTextEx(font, "YOU'RE RUNNING OUT OF LIGHT!", (Vector2){ 20, 60 }, font.size/2, 0, WHITE); + if ((framesCounter/20)%2) DrawTextEx(font, "YOU'RE RUNNING OUT OF LIGHT!", (Vector2){ 20, 60 }, font.baseSize/2, 0, WHITE); } } else if (!timeOver) // LEVEL_FINISHED @@ -846,4 +846,4 @@ static void EnemyReset(Enemy *enemy) enemy->speed = (float)GetRandomValue(8, 18)/10.0f; enemy->awakeFramesDelay = GetRandomValue(180, 1200); } -} \ No newline at end of file +} diff --git a/games/light_my_ritual/screens/screen_title.c b/games/light_my_ritual/screens/screen_title.c index 8f40c8c5..bcf53f51 100644 --- a/games/light_my_ritual/screens/screen_title.c +++ b/games/light_my_ritual/screens/screen_title.c @@ -85,7 +85,7 @@ void DrawTitleScreen(void) DrawText("(c) Developed by Ramon Santamaria (@raysan5)", 20, GetScreenHeight() - 40, 20, LIGHTGRAY); - if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawTextEx(font, "PRESS ENTER to START LIGHTING", (Vector2){ 230, 450 }, font.size, -2, WHITE); + if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawTextEx(font, "PRESS ENTER to START LIGHTING", (Vector2){ 230, 450 }, font.baseSize, -2, WHITE); } // Title Screen Unload logic @@ -102,4 +102,4 @@ void UnloadTitleScreen(void) int FinishTitleScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/raylib_demo/makefile b/games/raylib_demo/makefile index 7a5737ac..4e8a9b1c 100644 --- a/games/raylib_demo/makefile +++ b/games/raylib_demo/makefile @@ -119,7 +119,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/games/raylib_demo/raylib_demo.c b/games/raylib_demo/raylib_demo.c index b1267c26..62f26c3f 100644 --- a/games/raylib_demo/raylib_demo.c +++ b/games/raylib_demo/raylib_demo.c @@ -709,11 +709,11 @@ void UpdateDrawOneFrame(void) { DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Open-Close Window", (Vector2){ 48, 230 }, fontRomulus.size*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Manage Drawing Area", (Vector2){ 48, 260 }, fontRomulus.size*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Manage Inputs", (Vector2){ 48, 290 }, fontRomulus.size*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Manage Timming", (Vector2){ 48, 320 }, fontRomulus.size*2, 4, GetColor(0x5c5a5aff)); - DrawTextEx(fontRomulus, "Auxiliar Functions", (Vector2){ 48, 350 }, fontRomulus.size*2, 4, GetColor(0x5c5a5aff)); + DrawTextEx(fontRomulus, "Open-Close Window", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); + DrawTextEx(fontRomulus, "Manage Drawing Area", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); + DrawTextEx(fontRomulus, "Manage Inputs", (Vector2){ 48, 290 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); + DrawTextEx(fontRomulus, "Manage Timming", (Vector2){ 48, 320 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); + DrawTextEx(fontRomulus, "Auxiliar Functions", (Vector2){ 48, 350 }, fontRomulus.baseSize*2, 4, GetColor(0x5c5a5aff)); switch (coreWindow) { @@ -739,16 +739,16 @@ void UpdateDrawOneFrame(void) if (framesCounter > 140) { - DrawTextEx(fontMecha, "MOVE ME", (Vector2){ ballPosition.x - 26, ballPosition.y - 20 }, fontMecha.size, 2, BLACK); - DrawTextEx(fontMecha, "[ W A S D ]", (Vector2){ ballPosition.x - 36, ballPosition.y }, fontMecha.size, 2, BLACK); + DrawTextEx(fontMecha, "MOVE ME", (Vector2){ ballPosition.x - 26, ballPosition.y - 20 }, fontMecha.baseSize, 2, BLACK); + DrawTextEx(fontMecha, "[ W A S D ]", (Vector2){ ballPosition.x - 36, ballPosition.y }, fontMecha.baseSize, 2, BLACK); } } break; case SHAPES: { DrawText("This module give you functions to:", 48, 200, 10, GetColor(0xcd5757ff)); - DrawTextEx(fontRomulus, "Draw Basic Shapes", (Vector2){ 48, 230 }, fontRomulus.size*2, 4, GetColor(0xcd5757ff)); - DrawTextEx(fontRomulus, "Basic Collision Detection", (Vector2){ 48, 260 }, fontRomulus.size*2, 4, GetColor(0xcd5757ff)); + DrawTextEx(fontRomulus, "Draw Basic Shapes", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0xcd5757ff)); + DrawTextEx(fontRomulus, "Basic Collision Detection", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0xcd5757ff)); DrawCircle(screenWidth/4, 120 + 240, 35, DARKBLUE); DrawCircleGradient(screenWidth/4, 220 + 240, 60, GREEN, SKYBLUE); @@ -769,8 +769,8 @@ void UpdateDrawOneFrame(void) { DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x60815aff)); - DrawTextEx(fontRomulus, "Load Images and Textures", (Vector2){ 48, 230 }, fontRomulus.size*2, 4, GetColor(0x60815aff)); - DrawTextEx(fontRomulus, "Draw Textures", (Vector2){ 48, 260 }, fontRomulus.size*2, 4, GetColor(0x60815aff)); + DrawTextEx(fontRomulus, "Load Images and Textures", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x60815aff)); + DrawTextEx(fontRomulus, "Draw Textures", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x60815aff)); DrawRectangle(138, 348, 260, 260, GRAY); DrawTexturePro(lena, (Rectangle){ 0, 0, lena.width, lena.height }, (Rectangle){ 140 + 128, 350 + 128, lena.width/2*scaleFactor, lena.height/2*scaleFactor }, (Vector2){ lena.width/4*scaleFactor, lena.height/4*scaleFactor }, 0.0f, WHITE); @@ -786,21 +786,21 @@ void UpdateDrawOneFrame(void) { DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x377764ff)); - DrawTextEx(fontRomulus, "Load SpriteFonts", (Vector2){ 48, 230 }, fontRomulus.size*2, 4, GetColor(0x377764ff)); - DrawTextEx(fontRomulus, "Draw Text", (Vector2){ 48, 260 }, fontRomulus.size*2, 4, GetColor(0x377764ff)); - DrawTextEx(fontRomulus, "Text Formatting", (Vector2){ 48, 290 }, fontRomulus.size*2, 4, GetColor(0x377764ff)); + DrawTextEx(fontRomulus, "Load SpriteFonts", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x377764ff)); + DrawTextEx(fontRomulus, "Draw Text", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x377764ff)); + DrawTextEx(fontRomulus, "Text Formatting", (Vector2){ 48, 290 }, fontRomulus.baseSize*2, 4, GetColor(0x377764ff)); DrawTexture(texAlagard, 60, 360, WHITE); - DrawTextEx(fontMechaC, msg1, (Vector2){ 540 + 168, 210 }, fontMechaC.size, -3, WHITE); - DrawTextEx(fontAlagardC, msg2, (Vector2){ 460 + 140, 260 }, fontAlagardC.size, -2, WHITE); - DrawTextEx(fontJupiterC, msg3, (Vector2){ 640 + 70, 300 }, fontJupiterC.size, 2, WHITE); + DrawTextEx(fontMechaC, msg1, (Vector2){ 540 + 168, 210 }, fontMechaC.baseSize, -3, WHITE); + DrawTextEx(fontAlagardC, msg2, (Vector2){ 460 + 140, 260 }, fontAlagardC.baseSize, -2, WHITE); + DrawTextEx(fontJupiterC, msg3, (Vector2){ 640 + 70, 300 }, fontJupiterC.baseSize, 2, WHITE); - DrawTextEx(fontAlagard, "It also includes some...", (Vector2){ 650 + 70, 400 }, fontAlagard.size*2, 2, MAROON); - DrawTextEx(fontPixelplay, "...free fonts in rBMF format...", (Vector2){ 705 - 26, 450 }, fontPixelplay.size*2, 4, ORANGE); - DrawTextEx(fontMecha, "...to be used even in...", (Vector2){ 700 + 40, 500 }, fontMecha.size*2, 4, DARKGREEN); - DrawTextEx(fontSetback, "...comercial projects...", (Vector2){ 710, 550 }, fontSetback.size*2, 4, DARKBLUE); - DrawTextEx(fontRomulus, "...completely for free!", (Vector2){ 710 + 17, 600 }, fontRomulus.size*2, 3, DARKPURPLE); + DrawTextEx(fontAlagard, "It also includes some...", (Vector2){ 650 + 70, 400 }, fontAlagard.baseSize*2, 2, MAROON); + DrawTextEx(fontPixelplay, "...free fonts in rBMF format...", (Vector2){ 705 - 26, 450 }, fontPixelplay.baseSize*2, 4, ORANGE); + DrawTextEx(fontMecha, "...to be used even in...", (Vector2){ 700 + 40, 500 }, fontMecha.baseSize*2, 4, DARKGREEN); + DrawTextEx(fontSetback, "...commercial projects...", (Vector2){ 710, 550 }, fontSetback.baseSize*2, 4, DARKBLUE); + DrawTextEx(fontRomulus, "...completely for free!", (Vector2){ 710 + 17, 600 }, fontRomulus.baseSize*2, 3, DARKPURPLE); DrawText("This is a custom font spritesheet, raylib can load it automatically!", 228, 360 + 295, 10, GRAY); @@ -809,9 +809,9 @@ void UpdateDrawOneFrame(void) { DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x417794ff)); - DrawTextEx(fontRomulus, "Draw Geometric Models", (Vector2){ 48, 230 }, fontRomulus.size*2, 4, GetColor(0x417794ff)); - DrawTextEx(fontRomulus, "Load 3D Models", (Vector2){ 48, 260 }, fontRomulus.size*2, 4, GetColor(0x417794ff)); - DrawTextEx(fontRomulus, "Draw 3D Models", (Vector2){ 48, 290 }, fontRomulus.size*2, 4, GetColor(0x417794ff)); + DrawTextEx(fontRomulus, "Draw Geometric Models", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x417794ff)); + DrawTextEx(fontRomulus, "Load 3D Models", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x417794ff)); + DrawTextEx(fontRomulus, "Draw 3D Models", (Vector2){ 48, 290 }, fontRomulus.baseSize*2, 4, GetColor(0x417794ff)); Begin3dMode(camera); @@ -843,8 +843,8 @@ void UpdateDrawOneFrame(void) { DrawText("This module give you functions to:", 48, 200, 10, GetColor(0x8c7539ff)); - DrawTextEx(fontRomulus, "Load and Play Sounds", (Vector2){ 48, 230 }, fontRomulus.size*2, 4, GetColor(0x8c7539ff)); - DrawTextEx(fontRomulus, "Play Music (streaming)", (Vector2){ 48, 260 }, fontRomulus.size*2, 4, GetColor(0x8c7539ff)); + DrawTextEx(fontRomulus, "Load and Play Sounds", (Vector2){ 48, 230 }, fontRomulus.baseSize*2, 4, GetColor(0x8c7539ff)); + DrawTextEx(fontRomulus, "Play Music (streaming)", (Vector2){ 48, 260 }, fontRomulus.baseSize*2, 4, GetColor(0x8c7539ff)); DrawText("PRESS SPACE to START PLAYING MUSIC", 135, 350, 20, GRAY); DrawRectangle(150, 390, 400, 12, LIGHTGRAY); @@ -897,7 +897,7 @@ void UpdateDrawOneFrame(void) case ENDING: { // Draw ENDING screen - DrawTextEx(fontAlagard, "LEARN VIDEOGAMES PROGRAMMING", (Vector2){ screenWidth/2 - MeasureTextEx(fontAlagard, "LEARN VIDEOGAMES PROGRAMMING", fontAlagard.size*4, 4).x/2, 80 }, fontAlagard.size*4, 4, MAROON); + DrawTextEx(fontAlagard, "LEARN VIDEOGAMES PROGRAMMING", (Vector2){ screenWidth/2 - MeasureTextEx(fontAlagard, "LEARN VIDEOGAMES PROGRAMMING", fontAlagard.baseSize*4, 4).x/2, 80 }, fontAlagard.baseSize*4, 4, MAROON); DrawTexture(raylibLogoA, logoPositionX, logoPositionY - 40, WHITE); @@ -929,4 +929,4 @@ void UpdateDrawOneFrame(void) EndDrawing(); //---------------------------------------------------------------------------------- -} \ No newline at end of file +} diff --git a/games/skully_escape/makefile b/games/skully_escape/makefile index ee2e08c0..7cfd3190 100644 --- a/games/skully_escape/makefile +++ b/games/skully_escape/makefile @@ -116,7 +116,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP) # libglfw3-dev libopenal-dev libglew-dev libegl1-mesa-dev LIBS = -lraylib -lglfw3 -lGLEW -lGL -lopenal -lm -pthread -ldl # on XWindow could require also below libraries, just uncomment - #LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor + LIBS += -lX11 -lXrandr -lXinerama -lXi -lXxf86vm -lXcursor else ifeq ($(PLATFORM_OS),OSX) # libraries for OS X 10.9 desktop compiling diff --git a/games/skully_escape/screens/screen_aisle01.c b/games/skully_escape/screens/screen_aisle01.c index 3ddf7da5..78bb20c4 100644 --- a/games/skully_escape/screens/screen_aisle01.c +++ b/games/skully_escape/screens/screen_aisle01.c @@ -362,11 +362,11 @@ void DrawAisle01Screen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -374,7 +374,7 @@ void DrawAisle01Screen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f)); DrawRectangleRec(picture.bounds, Fade(RED, 0.6f)); @@ -406,4 +406,4 @@ void UnloadAisle01Screen(void) int FinishAisle01Screen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_aisle02.c b/games/skully_escape/screens/screen_aisle02.c index 43bb226b..9dc02d37 100644 --- a/games/skully_escape/screens/screen_aisle02.c +++ b/games/skully_escape/screens/screen_aisle02.c @@ -393,11 +393,11 @@ void DrawAisle02Screen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -405,7 +405,7 @@ void DrawAisle02Screen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f)); DrawRectangleRec(arc.bounds, Fade(RED, 0.6f)); @@ -441,4 +441,4 @@ void UnloadAisle02Screen(void) int FinishAisle02Screen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_armory.c b/games/skully_escape/screens/screen_armory.c index 54c40059..e05ca4e7 100644 --- a/games/skully_escape/screens/screen_armory.c +++ b/games/skully_escape/screens/screen_armory.c @@ -355,11 +355,11 @@ void DrawArmoryScreen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -367,7 +367,7 @@ void DrawArmoryScreen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(blazon01.bounds, Fade(RED, 0.6f)); DrawRectangleRec(blazon02.bounds, Fade(RED, 0.6f)); @@ -401,4 +401,4 @@ void UnloadArmoryScreen(void) int FinishArmoryScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_attic.c b/games/skully_escape/screens/screen_attic.c index f19b8856..87bffaa2 100644 --- a/games/skully_escape/screens/screen_attic.c +++ b/games/skully_escape/screens/screen_attic.c @@ -285,11 +285,11 @@ void DrawAtticScreen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -297,7 +297,7 @@ void DrawAtticScreen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f)); DrawRectangleRec(arc.bounds, Fade(RED, 0.6f)); @@ -329,4 +329,4 @@ void UnloadAtticScreen(void) int FinishAtticScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_bathroom.c b/games/skully_escape/screens/screen_bathroom.c index 170898bf..1f228803 100644 --- a/games/skully_escape/screens/screen_bathroom.c +++ b/games/skully_escape/screens/screen_bathroom.c @@ -334,11 +334,11 @@ void DrawBathroomScreen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -346,7 +346,7 @@ void DrawBathroomScreen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(lamp.bounds, Fade(RED, 0.6f)); DrawRectangleRec(mirror.bounds, Fade(RED, 0.6f)); @@ -380,4 +380,4 @@ void UnloadBathroomScreen(void) int FinishBathroomScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_ending.c b/games/skully_escape/screens/screen_ending.c index 4f2cc1bb..deffbb82 100644 --- a/games/skully_escape/screens/screen_ending.c +++ b/games/skully_escape/screens/screen_ending.c @@ -71,8 +71,8 @@ void DrawEndingScreen(void) { DrawRectangle(0, 0, GetScreenWidth(), GetScreenHeight(), DARKGRAY); - DrawTextEx(font, "CONGRATULATIONS!", (Vector2){ 50, 160 }, font.size*3, 2, Fade(WHITE, alpha)); - DrawTextEx(font, "SKULLY ESCAPED!", (Vector2){ 100, 300 }, font.size*3, 2, Fade(WHITE, alpha)); + DrawTextEx(font, "CONGRATULATIONS!", (Vector2){ 50, 160 }, font.baseSize*3, 2, Fade(WHITE, alpha)); + DrawTextEx(font, "SKULLY ESCAPED!", (Vector2){ 100, 300 }, font.baseSize*3, 2, Fade(WHITE, alpha)); if ((framesCounter > 180) && ((framesCounter/40)%2)) DrawText("PRESS ENTER or CLICK", 380, 545, 40, BLACK); } @@ -87,4 +87,4 @@ void UnloadEndingScreen(void) int FinishEndingScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_kitchen.c b/games/skully_escape/screens/screen_kitchen.c index 36f56443..01ce326a 100644 --- a/games/skully_escape/screens/screen_kitchen.c +++ b/games/skully_escape/screens/screen_kitchen.c @@ -354,11 +354,11 @@ void DrawKitchenScreen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -366,7 +366,7 @@ void DrawKitchenScreen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(closet.bounds, Fade(RED, 0.6f)); DrawRectangleRec(window.bounds, Fade(RED, 0.6f)); @@ -400,4 +400,4 @@ void UnloadKitchenScreen(void) int FinishKitchenScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/games/skully_escape/screens/screen_livingroom.c b/games/skully_escape/screens/screen_livingroom.c index d66ec819..fa465bfa 100644 --- a/games/skully_escape/screens/screen_livingroom.c +++ b/games/skully_escape/screens/screen_livingroom.c @@ -354,11 +354,11 @@ void DrawLivingroomScreen(void) if (msgState == 0) { - DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, msgBuffer, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); } else if (msgState == 1) { - DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.size, 2, WHITE); + DrawTextEx(font, message, (Vector2){ msgPosX, 80 }, font.baseSize, 2, WHITE); if ((msgCounter/30)%2) DrawText("PRESS ENTER or CLICK", GetScreenWidth() - 280, 200, 20, BLACK); } @@ -366,7 +366,7 @@ void DrawLivingroomScreen(void) { if ((msgCounter/30)%2) { - DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.size*2, 2, WHITE); + DrawTextEx(font, "CHOOSE WISELY!", (Vector2){ 300, 95 }, font.baseSize*2, 2, WHITE); DrawRectangleRec(candle.bounds, Fade(RED, 0.6f)); DrawRectangleRec(phone.bounds, Fade(RED, 0.6f)); @@ -400,4 +400,4 @@ void UnloadLivingroomScreen(void) int FinishLivingroomScreen(void) { return finishScreen; -} \ No newline at end of file +} diff --git a/src/audio.c b/src/audio.c index 159b45ac..5edabf41 100644 --- a/src/audio.c +++ b/src/audio.c @@ -1266,7 +1266,7 @@ static Wave LoadOGG(const char *fileName) wave.sampleCount = (int)stb_vorbis_stream_length_in_samples(oggFile); float totalSeconds = stb_vorbis_stream_length_in_seconds(oggFile); - if (totalSeconds > 10) TraceLog(WARNING, "[%s] Ogg audio lenght is larger than 10 seconds (%f), that's a big file in memory, consider music streaming", fileName, totalSeconds); + if (totalSeconds > 10) TraceLog(WARNING, "[%s] Ogg audio length is larger than 10 seconds (%f), that's a big file in memory, consider music streaming", fileName, totalSeconds); wave.data = (short *)malloc(wave.sampleCount*wave.channels*sizeof(short));