Skip to content

Commit d1c5ef2

Browse files
committed
3.5.0-beta3
1 parent 24052dd commit d1c5ef2

32 files changed

+189
-74
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [x.x.x] - Unreleased
7+
## [3.5.0-beta3] - 2021-02-18
88
### Added
99
- Added a C++ version of raylib's loading thread example (by (@pkeir)[https://github.com/pkeir])
10+
- Updated documentation
1011
### Fixed
1112
- Made the global wrapped functions static to avoid redeclaration
1213

CPPLINT.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
set noparent
22
root=..
3-
linelength=100
3+
linelength=120
44
exclude_files=vendor
55
exclude_files=docs
66
filter=-runtime/explicit

examples/audio/audio_music_stream.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ int main() {
3232
//--------------------------------------------------------------------------------------
3333

3434
// Main game loop
35-
while (!window.ShouldClose()) // Detect window close button or ESC key
35+
while (!window.ShouldClose()) // Detect window close button or ESC key
3636
{
3737
// Update
3838
//----------------------------------------------------------------------------------
@@ -63,7 +63,7 @@ int main() {
6363
// Draw
6464
//----------------------------------------------------------------------------------
6565
BeginDrawing();
66-
66+
{
6767
ClearBackground(RAYWHITE);
6868

6969
DrawText("MUSIC SHOULD BE PLAYING!", 255, 150, 20, LIGHTGRAY);
@@ -74,7 +74,7 @@ int main() {
7474

7575
DrawText("PRESS SPACE TO RESTART MUSIC", 215, 250, 20, LIGHTGRAY);
7676
DrawText("PRESS P TO PAUSE/RESUME MUSIC", 208, 280, 20, LIGHTGRAY);
77-
77+
}
7878
EndDrawing();
7979
//----------------------------------------------------------------------------------
8080
}

examples/audio/audio_sound_loading.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,12 @@ int main() {
3939
// Draw
4040
//----------------------------------------------------------------------------------
4141
BeginDrawing();
42-
42+
{
4343
ClearBackground(RAYWHITE);
4444

4545
DrawText("Press SPACE to PLAY the WAV sound!", 200, 180, 20, LIGHTGRAY);
4646
DrawText("Press ENTER to PLAY the OGG sound!", 200, 220, 20, LIGHTGRAY);
47-
47+
}
4848
EndDrawing();
4949
//----------------------------------------------------------------------------------
5050
}

examples/core/core_3d_camera_first_person.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ int main() {
4444

4545
camera.SetMode(CAMERA_FIRST_PERSON); // Set a first person camera mode
4646

47-
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
47+
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
4848
//--------------------------------------------------------------------------------------
4949

5050
// Main game loop
51-
while (!window.ShouldClose()) // Detect window close button or ESC key
51+
while (!window.ShouldClose()) // Detect window close button or ESC key
5252
{
5353
// Update
5454
//----------------------------------------------------------------------------------
@@ -58,11 +58,11 @@ int main() {
5858
// Draw
5959
//----------------------------------------------------------------------------------
6060
BeginDrawing();
61-
61+
{
6262
background.ClearBackground();
6363

6464
camera.BeginMode();
65-
65+
{
6666
DrawPlane(Vector3{ 0.0f, 0.0f, 0.0f }, Vector2{ 32.0f, 32.0f }, LIGHTGRAY); // Draw ground
6767
DrawCube(Vector3{ -16.0f, 2.5f, 0.0f }, 1.0f, 5.0f, 32.0f, BLUE); // Draw a blue wall
6868
DrawCube(Vector3{ 16.0f, 2.5f, 0.0f }, 1.0f, 5.0f, 32.0f, LIME); // Draw a green wall
@@ -74,16 +74,16 @@ int main() {
7474
positions[i].DrawCube(2.0f, heights[i], 2.0f, colors[i]);
7575
positions[i].DrawCubeWires(2.0f, heights[i], 2.0f, MAROON);
7676
}
77-
77+
}
7878
camera.EndMode();
7979

80-
DrawRectangle( 10, 10, 220, 70, Fade(SKYBLUE, 0.5f));
80+
DrawRectangle( 10, 10, 220, 70, raylib::Color::SkyBlue().Fade(0.5f));
8181
DrawRectangleLines( 10, 10, 220, 70, BLUE);
8282

8383
DrawText("First person camera default controls:", 20, 20, 10, BLACK);
8484
DrawText("- Move with keys: W, A, S, D", 40, 40, 10, DARKGRAY);
8585
DrawText("- Mouse move to look around", 40, 60, 10, DARKGRAY);
86-
86+
}
8787
EndDrawing();
8888
//----------------------------------------------------------------------------------
8989
}

examples/core/core_basic_window.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ int main() {
4343
// Draw
4444
//----------------------------------------------------------------------------------
4545
BeginDrawing();
46-
47-
ClearBackground(RAYWHITE);
48-
49-
textColor.DrawText("Congrats! You created your first window!", 190, 200, 20);
50-
46+
{
47+
ClearBackground(RAYWHITE);
48+
textColor.DrawText("Congrats! You created your first window!", 190, 200, 20);
49+
}
5150
EndDrawing();
5251
//----------------------------------------------------------------------------------
5352
}

examples/core/core_drop_files.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ int main() {
5151

5252
// Iterate through all the dropped files.
5353
for (int i = 0; i < droppedFiles.size(); i++) {
54-
if (i%2 == 0)
54+
if (i % 2 == 0)
5555
DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.5f));
5656
else
5757
DrawRectangle(0, 85 + 40*i, screenWidth, 40, Fade(LIGHTGRAY, 0.3f));
5858

5959
// Display the path to the dropped file.
60-
DrawText(droppedFiles[i].c_str(), 120, 100 + 40*i, 10, GRAY);
60+
DrawText(droppedFiles[i].c_str(), 120, 100 + 40 * i, 10, GRAY);
6161
}
6262

6363
DrawText("Drop new files...", 100, 110 + 40 * droppedFiles.size(), 20, DARKGRAY);

examples/core/core_input_mouse.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ int main() {
4242
// Draw
4343
//----------------------------------------------------------------------------------
4444
BeginDrawing();
45-
45+
{
4646
background.ClearBackground();
4747

4848
ballPosition.DrawCircle(40, ballColor);
4949

5050
textColor.DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20);
51-
51+
}
5252
EndDrawing();
5353
//----------------------------------------------------------------------------------
5454
}

examples/core/core_loading_thread.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ int main(void)
9090
// Draw
9191
//----------------------------------------------------------------------
9292
BeginDrawing();
93+
{
9394

9495
ClearBackground(RAYWHITE);
9596

@@ -110,12 +111,10 @@ int main(void)
110111
DrawRectangle(150, 200, 500, 60, LIME);
111112
DrawText("DATA LOADED!", 250, 210, 40, GREEN);
112113
break;
113-
114-
default:
115-
break;
116114
}
117115

118116
DrawRectangleLines(150, 200, 500, 60, DARKGRAY);
117+
}
119118

120119
EndDrawing();
121120
//----------------------------------------------------------------------

examples/core/core_random_values.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ int main() {
4444
// Draw
4545
//----------------------------------------------------------------------------------
4646
BeginDrawing();
47-
47+
{
4848
ClearBackground(RAYWHITE);
4949

5050
DrawText("Every 2 seconds a new random value is generated:", 130, 100, 20, MAROON);
5151

5252
DrawText(FormatText("%i", randValue), 360, 180, 80, LIGHTGRAY);
53-
53+
}
5454
EndDrawing();
5555
//----------------------------------------------------------------------------------
5656
}

0 commit comments

Comments
 (0)