feat(fixLib): fix release raylib

This commit is contained in:
Arthur Bichara 2025-01-17 17:30:47 +01:00
commit 2f5406bbd9
153 changed files with 1840 additions and 1840 deletions

View file

@ -468,16 +468,16 @@ SHAPES = \
shapes/shapes_collision_area \
shapes/shapes_colors_palette \
shapes/shapes_draw_circle_sector \
shapes/shapes_draw_rectangle_rounded \
shapes/shapes_draw_rayRectangle_rounded \
shapes/shapes_draw_ring \
shapes/shapes_easings_ball_anim \
shapes/shapes_easings_box_anim \
shapes/shapes_easings_rectangle_array \
shapes/shapes_easings_rayRectangle_array \
shapes/shapes_following_eyes \
shapes/shapes_lines_bezier \
shapes/shapes_logo_raylib \
shapes/shapes_logo_raylib_anim \
shapes/shapes_rectangle_scaling \
shapes/shapes_rayRectangle_scaling \
shapes/shapes_splines_drawing \
shapes/shapes_top_down_lights
@ -518,7 +518,7 @@ TEXT = \
text/text_format_text \
text/text_input_box \
text/text_raylib_fonts \
text/text_rectangle_bounds \
text/text_rayRectangle_bounds \
text/text_unicode \
text/text_writing_anim

View file

@ -374,16 +374,16 @@ SHAPES = \
shapes/shapes_collision_area \
shapes/shapes_colors_palette \
shapes/shapes_draw_circle_sector \
shapes/shapes_draw_rectangle_rounded \
shapes/shapes_draw_rayRectangle_rounded \
shapes/shapes_draw_ring \
shapes/shapes_easings_ball_anim \
shapes/shapes_easings_box_anim \
shapes/shapes_easings_rectangle_array \
shapes/shapes_easings_rayRectangle_array \
shapes/shapes_following_eyes \
shapes/shapes_lines_bezier \
shapes/shapes_logo_raylib \
shapes/shapes_logo_raylib_anim \
shapes/shapes_rectangle_scaling \
shapes/shapes_rayRectangle_scaling \
shapes/shapes_splines_drawing \
shapes/shapes_top_down_lights
@ -424,7 +424,7 @@ TEXT = \
text/text_format_text \
text/text_input_box \
text/text_raylib_fonts \
text/text_rectangle_bounds \
text/text_rayRectangle_bounds \
text/text_unicode \
text/text_writing_anim
@ -630,7 +630,7 @@ shapes/shapes_colors_palette: shapes/shapes_colors_palette.c
shapes/shapes_draw_circle_sector: shapes/shapes_draw_circle_sector.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
shapes/shapes_draw_rectangle_rounded: shapes/shapes_draw_rectangle_rounded.c
shapes/shapes_draw_rayRectangle_rounded: shapes/shapes_draw_rayRectangle_rounded.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
shapes/shapes_draw_ring: shapes/shapes_draw_ring.c
@ -642,7 +642,7 @@ shapes/shapes_easings_ball_anim: shapes/shapes_easings_ball_anim.c
shapes/shapes_easings_box_anim: shapes/shapes_easings_box_anim.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
shapes/shapes_easings_rectangle_array: shapes/shapes_easings_rectangle_array.c
shapes/shapes_easings_rayRectangle_array: shapes/shapes_easings_rayRectangle_array.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
shapes/shapes_following_eyes: shapes/shapes_following_eyes.c
@ -657,7 +657,7 @@ shapes/shapes_logo_raylib: shapes/shapes_logo_raylib.c
shapes/shapes_logo_raylib_anim: shapes/shapes_logo_raylib_anim.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
shapes/shapes_rectangle_scaling: shapes/shapes_rectangle_scaling.c
shapes/shapes_rayRectangle_scaling: shapes/shapes_rayRectangle_scaling.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
shapes/shapes_splines_drawing: shapes/shapes_splines_drawing.c
@ -821,7 +821,7 @@ text/text_raylib_fonts: text/text_raylib_fonts.c
--preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \
--preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png
text/text_rectangle_bounds: text/text_rectangle_bounds.c
text/text_rayRectangle_bounds: text/text_rayRectangle_bounds.c
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
text/text_unicode: text/text_unicode.c

View file

@ -67,16 +67,16 @@ Examples using raylib shapes drawing functionality, provided by raylib [shapes](
| 33 | [shapes_colors_palette](shapes/shapes_colors_palette.c) | <img src="shapes/shapes_colors_palette.png" alt="shapes_colors_palette" width="80"> | ⭐️⭐️☆☆ | 1.0 | 2.5 | [Ray](https://github.com/raysan5) |
| 34 | [shapes_logo_raylib](shapes/shapes_logo_raylib.c) | <img src="shapes/shapes_logo_raylib.png" alt="shapes_logo_raylib" width="80"> | ⭐️☆☆☆ | 1.0 | 1.0 | [Ray](https://github.com/raysan5) |
| 35 | [shapes_logo_raylib_anim](shapes/shapes_logo_raylib_anim.c) | <img src="shapes/shapes_logo_raylib_anim.png" alt="shapes_logo_raylib_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | **4.0** | [Ray](https://github.com/raysan5) |
| 36 | [shapes_rectangle_scaling](shapes/shapes_rectangle_scaling.c) | <img src="shapes/shapes_rectangle_scaling.png" alt="shapes_rectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 36 | [shapes_rayRectangle_scaling](shapes/shapes_rayRectangle_scaling.c) | <img src="shapes/shapes_rayRectangle_scaling.png" alt="shapes_rayRectangle_scaling" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 37 | [shapes_lines_bezier](shapes/shapes_lines_bezier.c) | <img src="shapes/shapes_lines_bezier.png" alt="shapes_lines_bezier" width="80"> | ⭐️☆☆☆ | 1.7 | 1.7 | [Ray](https://github.com/raysan5) |
| 38 | [shapes_collision_area](shapes/shapes_collision_area.c) | <img src="shapes/shapes_collision_area.png" alt="shapes_collision_area" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 39 | [shapes_following_eyes](shapes/shapes_following_eyes.c) | <img src="shapes/shapes_following_eyes.png" alt="shapes_following_eyes" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 40 | [shapes_easings_ball_anim](shapes/shapes_easings_ball_anim.c) | <img src="shapes/shapes_easings_ball_anim.png" alt="shapes_easings_ball_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 41 | [shapes_easings_box_anim](shapes/shapes_easings_box_anim.c) | <img src="shapes/shapes_easings_box_anim.png" alt="shapes_easings_box_anim" width="80"> | ⭐️⭐️☆☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 42 | [shapes_easings_rectangle_array](shapes/shapes_easings_rectangle_array.c) | <img src="shapes/shapes_easings_rectangle_array.png" alt="shapes_easings_rectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 42 | [shapes_easings_rayRectangle_array](shapes/shapes_easings_rayRectangle_array.c) | <img src="shapes/shapes_easings_rayRectangle_array.png" alt="shapes_easings_rayRectangle_array" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Ray](https://github.com/raysan5) |
| 43 | [shapes_draw_ring](shapes/shapes_draw_ring.c) | <img src="shapes/shapes_draw_ring.png" alt="shapes_draw_ring" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 44 | [shapes_draw_circle_sector](shapes/shapes_draw_circle_sector.c) | <img src="shapes/shapes_draw_circle_sector.png" alt="shapes_draw_circle_sector" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 45 | [shapes_draw_rectangle_rounded](shapes/shapes_draw_rectangle_rounded.c) | <img src="shapes/shapes_draw_rectangle_rounded.png" alt="shapes_draw_rectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 45 | [shapes_draw_rayRectangle_rounded](shapes/shapes_draw_rayRectangle_rounded.c) | <img src="shapes/shapes_draw_rayRectangle_rounded.png" alt="shapes_draw_rayRectangle_rounded" width="80"> | ⭐️⭐️⭐️☆ | 2.5 | 2.5 | [Vlad Adrian](https://github.com/demizdor) |
| 46 | [shapes_top_down_lights](shapes/shapes_top_down_lights.c) | <img src="shapes/shapes_top_down_lights.png" alt="shapes_top_down_lights" width="80"> | ⭐️⭐️⭐️⭐️ | **4.2** | **4.2** | [Jeffery Myers](https://github.com/JeffM2501) |
### category: textures
@ -122,7 +122,7 @@ Examples using raylib text functionality, including sprite fonts loading/generat
| 74 | [text_format_text](text/text_format_text.c) | <img src="text/text_format_text.png" alt="text_format_text" width="80"> | ⭐️☆☆☆ | 1.1 | 3.0 | [Ray](https://github.com/raysan5) |
| 75 | [text_input_box](text/text_input_box.c) | <img src="text/text_input_box.png" alt="text_input_box" width="80"> | ⭐️⭐️☆☆ | 1.7 | 3.5 | [Ray](https://github.com/raysan5) |
| 76 | [text_writing_anim](text/text_writing_anim.c) | <img src="text/text_writing_anim.png" alt="text_writing_anim" width="80"> | ⭐️⭐️☆☆ | 1.4 | 1.4 | [Ray](https://github.com/raysan5) |
| 77 | [text_rectangle_bounds](text/text_rectangle_bounds.c) | <img src="text/text_rectangle_bounds.png" alt="text_rectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
| 77 | [text_rayRectangle_bounds](text/text_rayRectangle_bounds.c) | <img src="text/text_rayRectangle_bounds.png" alt="text_rayRectangle_bounds" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
| 78 | [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐️⭐️⭐️⭐️ | 2.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
| 79 | [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐️⭐️⭐️⭐️ | 3.5 | **4.0** | [Vlad Adrian](https://github.com/demizdor) |
| 80 | [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐️⭐️⭐️☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) |

View file

@ -94,12 +94,12 @@ int main(void)
DrawText(TextFormat("EXPONENT = %.2f", exponent), 215, 180, 20, LIGHTGRAY);
DrawRectangle(199, 199, 402, 34, LIGHTGRAY);
DrawrayRectangle(199, 199, 402, 34, LIGHTGRAY);
for (int i = 0; i < 400; i++)
{
DrawLine(201 + i, 232 - averageVolume[i] * 32, 201 + i, 232, MAROON);
}
DrawRectangleLines(199, 199, 402, 34, GRAY);
DrawrayRectangleLines(199, 199, 402, 34, GRAY);
DrawText("PRESS SPACE TO PLAY OTHER SOUND", 200, 250, 20, LIGHTGRAY);
DrawText("USE LEFT AND RIGHT ARROWS TO ALTER DISTORTION", 140, 280, 20, LIGHTGRAY);
@ -116,7 +116,7 @@ int main(void)
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -131,13 +131,13 @@ int main(void)
}
// Draw time bar
DrawRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY);
DrawRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
DrawRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
DrawrayRectangle(20, screenHeight - 20 - 12, screenWidth - 40, 12, LIGHTGRAY);
DrawrayRectangle(20, screenHeight - 20 - 12, (int)timePlayed, 12, MAROON);
DrawrayRectangleLines(20, screenHeight - 20 - 12, screenWidth - 40, 12, GRAY);
// Draw help instructions
DrawRectangle(20, 20, 425, 145, WHITE);
DrawRectangleLines(20, 20, 425, 145, GRAY);
DrawrayRectangle(20, 20, 425, 145, WHITE);
DrawrayRectangleLines(20, 20, 425, 145, GRAY);
DrawText("PRESS SPACE TO RESTART MUSIC", 40, 40, 20, BLACK);
DrawText("PRESS P TO PAUSE/RESUME", 40, 70, 20, BLACK);
DrawText("PRESS UP/DOWN TO CHANGE SPEED", 40, 100, 20, BLACK);
@ -153,7 +153,7 @@ int main(void)
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -74,9 +74,9 @@ int main(void)
DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
DrawRectangle(200, 200, 400, 12, LIGHTGRAY);
DrawRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON);
DrawRectangleLines(200, 200, 400, 12, GRAY);
DrawrayRectangle(200, 200, 400, 12, LIGHTGRAY);
DrawrayRectangle(200, 200, (int)(timePlayed*400.0f), 12, MAROON);
DrawrayRectangleLines(200, 200, 400, 12, GRAY);
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY);
@ -91,7 +91,7 @@ int main(void)
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -208,7 +208,7 @@ int main(void)
UnloadAudioStream(stream); // Close raw audio stream and delete buffers from RAM
CloseAudioDevice(); // Close audio device (music streaming is automatically stopped)
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -62,7 +62,7 @@ int main(void)
CloseAudioDevice(); // Close audio device
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -80,7 +80,7 @@ int main(void)
CloseAudioDevice(); // Close audio device
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -111,9 +111,9 @@ int main(void)
DrawText("MUSIC SHOULD BE PLAYING!", 245, 150, 20, LIGHTGRAY);
DrawRectangle(200, 180, 400, 12, LIGHTGRAY);
DrawRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON);
DrawRectangleLines(200, 180, 400, 12, GRAY);
DrawrayRectangle(200, 180, 400, 12, LIGHTGRAY);
DrawrayRectangle(200, 180, (int)(timePlayed*400.0f), 12, MAROON);
DrawrayRectangleLines(200, 180, 400, 12, GRAY);
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 230, 20, LIGHTGRAY);
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 260, 20, LIGHTGRAY);
@ -133,7 +133,7 @@ int main(void)
RL_FREE(delayBuffer); // Free delay buffer
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -27,8 +27,8 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera");
Rectangle player = { 400, 280, 40, 40 };
Rectangle buildings[MAX_BUILDINGS] = { 0 };
rayRectangle player = { 400, 280, 40, 40 };
rayRectangle buildings[MAX_BUILDINGS] = { 0 };
Color buildColors[MAX_BUILDINGS] = { 0 };
int spacing = 0;
@ -96,11 +96,11 @@ int main(void)
BeginMode2D(camera);
DrawRectangle(-6000, 320, 13000, 8000, DARKGRAY);
DrawrayRectangle(-6000, 320, 13000, 8000, DARKGRAY);
for (int i = 0; i < MAX_BUILDINGS; i++) DrawRectangleRec(buildings[i], buildColors[i]);
for (int i = 0; i < MAX_BUILDINGS; i++) DrawrayRectangleRec(buildings[i], buildColors[i]);
DrawRectangleRec(player, RED);
DrawrayRectangleRec(player, RED);
DrawLine((int)camera.target.x, -screenHeight*10, (int)camera.target.x, screenHeight*10, GREEN);
DrawLine(-screenWidth*10, (int)camera.target.y, screenWidth*10, (int)camera.target.y, GREEN);
@ -109,13 +109,13 @@ int main(void)
DrawText("SCREEN AREA", 640, 10, 20, RED);
DrawRectangle(0, 0, screenWidth, 5, RED);
DrawRectangle(0, 5, 5, screenHeight - 10, RED);
DrawRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED);
DrawRectangle(0, screenHeight - 5, screenWidth, 5, RED);
DrawrayRectangle(0, 0, screenWidth, 5, RED);
DrawrayRectangle(0, 5, 5, screenHeight - 10, RED);
DrawrayRectangle(screenWidth - 5, 5, 5, screenHeight - 10, RED);
DrawrayRectangle(0, screenHeight - 5, screenWidth, 5, RED);
DrawRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5f));
DrawRectangleLines( 10, 10, 250, 113, BLUE);
DrawrayRectangle( 10, 10, 250, 113, Fade(SKYBLUE, 0.5f));
DrawrayRectangleLines( 10, 10, 250, 113, BLUE);
DrawText("Free 2d camera controls:", 20, 20, 10, BLACK);
DrawText("- Right/Left to move Offset", 40, 40, 10, DARKGRAY);
@ -129,7 +129,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -99,7 +99,7 @@ int main ()
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

View file

@ -27,7 +27,7 @@ typedef struct Player {
} Player;
typedef struct EnvItem {
Rectangle rect;
rayRectangle rect;
int blocking;
Color color;
} EnvItem;
@ -131,10 +131,10 @@ int main(void)
BeginMode2D(camera);
for (int i = 0; i < envItemsLength; i++) DrawRectangleRec(envItems[i].rect, envItems[i].color);
for (int i = 0; i < envItemsLength; i++) DrawrayRectangleRec(envItems[i].rect, envItems[i].color);
Rectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
DrawRectangleRec(playerRect, RED);
rayRectangle playerRect = { player.position.x - 20, player.position.y - 40, 40, 40 };
DrawrayRectangleRec(playerRect, RED);
EndMode2D();
@ -152,7 +152,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -32,8 +32,8 @@ int main(void)
InitWindow(screenWidth, screenHeight, "raylib [core] example - 2d camera split screen");
Rectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE };
Rectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE };
rayRectangle player1 = { 200, 200, PLAYER_SIZE, PLAYER_SIZE };
rayRectangle player2 = { 250, 200, PLAYER_SIZE, PLAYER_SIZE };
Camera2D camera1 = { 0 };
camera1.target = (Vector2){ player1.x, player1.y };
@ -50,8 +50,8 @@ int main(void)
RenderTexture screenCamera1 = LoadRenderTexture(screenWidth/2, screenHeight);
RenderTexture screenCamera2 = LoadRenderTexture(screenWidth/2, screenHeight);
// Build a flipped rectangle the size of the split view to use for drawing later
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height };
// Build a flipped rayRectangle the size of the split view to use for drawing later
rayRectangle splitScreenRect = { 0.0f, 0.0f, (float)screenCamera1.texture.width, (float)-screenCamera1.texture.height };
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
//--------------------------------------------------------------------------------------
@ -101,11 +101,11 @@ int main(void)
}
}
DrawRectangleRec(player1, RED);
DrawRectangleRec(player2, BLUE);
DrawrayRectangleRec(player1, RED);
DrawrayRectangleRec(player2, BLUE);
EndMode2D();
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
DrawrayRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
DrawText("PLAYER1: W/S/A/D to move", 10, 10, 10, MAROON);
EndTextureMode();
@ -134,12 +134,12 @@ int main(void)
}
}
DrawRectangleRec(player1, RED);
DrawRectangleRec(player2, BLUE);
DrawrayRectangleRec(player1, RED);
DrawrayRectangleRec(player2, BLUE);
EndMode2D();
DrawRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
DrawrayRectangle(0, 0, GetScreenWidth()/2, 30, Fade(RAYWHITE, 0.6f));
DrawText("PLAYER2: UP/DOWN/LEFT/RIGHT to move", 10, 10, 10, DARKBLUE);
EndTextureMode();
@ -151,7 +151,7 @@ int main(void)
DrawTextureRec(screenCamera1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
DrawTextureRec(screenCamera2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
DrawrayRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
EndDrawing();
}
@ -160,7 +160,7 @@ int main(void)
UnloadRenderTexture(screenCamera1); // Unload render texture
UnloadRenderTexture(screenCamera2); // Unload render texture
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -169,8 +169,8 @@ int main(void)
EndMode3D();
// Draw info boxes
DrawRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f));
DrawRectangleLines(5, 5, 330, 100, BLUE);
DrawrayRectangle(5, 5, 330, 100, Fade(SKYBLUE, 0.5f));
DrawrayRectangleLines(5, 5, 330, 100, BLUE);
DrawText("Camera controls:", 15, 15, 10, BLACK);
DrawText("- Move keys: W, A, S, D, Space, Left-Ctrl", 15, 30, 10, BLACK);
@ -179,8 +179,8 @@ int main(void)
DrawText("- Zoom keys: num-plus, num-minus or mouse scroll", 15, 75, 10, BLACK);
DrawText("- Camera projection key: P", 15, 90, 10, BLACK);
DrawRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f));
DrawRectangleLines(600, 5, 195, 100, BLUE);
DrawrayRectangle(600, 5, 195, 100, Fade(SKYBLUE, 0.5f));
DrawrayRectangleLines(600, 5, 195, 100, BLUE);
DrawText("Camera status:", 610, 15, 10, BLACK);
DrawText(TextFormat("- Mode: %s", (cameraMode == CAMERA_FREE) ? "FREE" :
@ -199,7 +199,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -65,8 +65,8 @@ int main(void)
EndMode3D();
DrawRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f));
DrawRectangleLines( 10, 10, 320, 93, BLUE);
DrawrayRectangle( 10, 10, 320, 93, Fade(SKYBLUE, 0.5f));
DrawrayRectangleLines( 10, 10, 320, 93, BLUE);
DrawText("Free camera default controls:", 20, 20, 10, BLACK);
DrawText("- Mouse Wheel to Zoom in-out", 40, 40, 10, DARKGRAY);
@ -79,7 +79,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -71,7 +71,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -47,8 +47,8 @@ int main(void)
RenderTexture screenPlayer2 = LoadRenderTexture(screenWidth / 2, screenHeight);
// Build a flipped rectangle the size of the split view to use for drawing later
Rectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
// Build a flipped rayRectangle the size of the split view to use for drawing later
rayRectangle splitScreenRect = { 0.0f, 0.0f, (float)screenPlayer1.texture.width, (float)-screenPlayer1.texture.height };
// Grid data
int count = 5;
@ -117,7 +117,7 @@ int main(void)
EndMode3D();
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
DrawrayRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
DrawText("PLAYER1: W/S to move", 10, 10, 20, MAROON);
EndTextureMode();
@ -146,7 +146,7 @@ int main(void)
EndMode3D();
DrawRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
DrawrayRectangle(0, 0, GetScreenWidth()/2, 40, Fade(RAYWHITE, 0.8f));
DrawText("PLAYER2: UP/DOWN to move", 10, 10, 20, DARKBLUE);
EndTextureMode();
@ -158,7 +158,7 @@ int main(void)
DrawTextureRec(screenPlayer1.texture, splitScreenRect, (Vector2){ 0, 0 }, WHITE);
DrawTextureRec(screenPlayer2.texture, splitScreenRect, (Vector2){ screenWidth/2.0f, 0 }, WHITE);
DrawRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
DrawrayRectangle(GetScreenWidth()/2 - 2, 0, 4, GetScreenHeight(), LIGHTGRAY);
EndDrawing();
}
@ -167,7 +167,7 @@ int main(void)
UnloadRenderTexture(screenPlayer1); // Unload render texture
UnloadRenderTexture(screenPlayer2); // Unload render texture
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -111,7 +111,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

View file

@ -29,7 +29,7 @@ typedef struct Player {
} Player;
typedef struct EnvElement {
Rectangle rect;
rayRectangle rect;
int blocking;
Color color;
} EnvElement;
@ -282,17 +282,17 @@ int main(void)
// Draw environment elements
for (int i = 0; i < MAX_ENVIRONMENT_ELEMENTS; i++)
{
DrawRectangleRec(envElements[i].rect, envElements[i].color);
DrawrayRectangleRec(envElements[i].rect, envElements[i].color);
}
// Draw player rectangle
DrawRectangleRec((Rectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED);
// Draw player rayRectangle
DrawrayRectangleRec((rayRectangle){ player.position.x - 20, player.position.y - 40, 40, 40 }, RED);
EndMode2D();
// Draw game controls
DrawRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f));
DrawRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f));
DrawrayRectangle(10, 10, 290, 145, Fade(SKYBLUE, 0.5f));
DrawrayRectangleLines(10, 10, 290, 145, Fade(BLUE, 0.8f));
DrawText("Controls:", 20, 20, 10, BLACK);
DrawText("- RIGHT | LEFT: Player movement", 30, 40, 10, DARKGRAY);
@ -305,16 +305,16 @@ int main(void)
// Draw automation events recording indicator
if (eventRecording)
{
DrawRectangle(10, 160, 290, 30, Fade(RED, 0.3f));
DrawRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f));
DrawrayRectangle(10, 160, 290, 30, Fade(RED, 0.3f));
DrawrayRectangleLines(10, 160, 290, 30, Fade(MAROON, 0.8f));
DrawCircle(30, 175, 10, MAROON);
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("RECORDING EVENTS... [%i]", aelist.count), 50, 170, 10, MAROON);
}
else if (eventPlaying)
{
DrawRectangle(10, 160, 290, 30, Fade(LIME, 0.3f));
DrawRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f));
DrawrayRectangle(10, 160, 290, 30, Fade(LIME, 0.3f));
DrawrayRectangleLines(10, 160, 290, 30, Fade(DARKGREEN, 0.8f));
DrawTriangle((Vector2){ 20, 155 + 10 }, (Vector2){ 20, 155 + 30 }, (Vector2){ 40, 155 + 20 }, DARKGREEN);
if (((frameCounter/15)%2) == 1) DrawText(TextFormat("PLAYING RECORDED EVENTS... [%i]", currentPlayFrame), 50, 170, 10, DARKGREEN);
@ -327,7 +327,7 @@ int main(void)
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
rayCloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;

Some files were not shown because too many files have changed in this diff Show more