Skip to content

Commit d0a0460

Browse files
More updates to sync with raylib master
This commit fixes some additional issues revealed by trying to compile the examples.
1 parent 2cc804c commit d0a0460

File tree

12 files changed

+22
-22
lines changed

12 files changed

+22
-22
lines changed

examples/core/core_random_values.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main() {
4747

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

50-
DrawText(FormatText("%i", randValue), 360, 180, 80, LIGHTGRAY);
50+
DrawText(TextFormat("%i", randValue), 360, 180, 80, LIGHTGRAY);
5151
}
5252
EndDrawing();
5353
//----------------------------------------------------------------------------------

examples/models/models_first_person_maze.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ int main(void)
3030

3131
// NOTE: By default each cube is mapped to one part of texture atlas
3232
raylib::Texture texture("resources/cubicmap_atlas.png"); // Load map texture
33-
model.materials[0].maps[MAP_DIFFUSE].texture = texture; // Set map diffuse texture
33+
model.materials[0].maps[MATERIAL_MAP_DIFFUSE].texture = texture; // Set map diffuse texture
3434

3535
// Get map image data to be used for collision detection
3636
Color *mapPixels = imMap.LoadColors();

examples/shapes/shapes_collision_area.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ int main(void)
8989
DrawText("COLLISION!", GetScreenWidth()/2 - MeasureText("COLLISION!", 20)/2, screenUpperLimit/2 - 10, 20, BLACK);
9090

9191
// Draw collision area
92-
DrawText(FormatText("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK);
92+
DrawText(TextFormat("Collision Area: %i", (int)boxCollision.width*(int)boxCollision.height), GetScreenWidth()/2 - 100, screenUpperLimit + 10, 20, BLACK);
9393
}
9494

9595
DrawFPS(10, 10);

examples/textures/textures_bunnymark.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ int main(void)
103103
}
104104

105105
DrawRectangle(0, 0, screenWidth, 40, BLACK);
106-
DrawText(FormatText("bunnies: %i", bunnies.size()), 120, 10, 20, GREEN);
107-
DrawText(FormatText("batched draw calls: %i", 1 + bunnies.size()/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON);
106+
DrawText(TextFormat("bunnies: %i", bunnies.size()), 120, 10, 20, GREEN);
107+
DrawText(TextFormat("batched draw calls: %i", 1 + bunnies.size()/MAX_BATCH_ELEMENTS), 320, 10, 20, MAROON);
108108

109109
DrawFPS(10, 10);
110110
}

include/Color.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Color : public ::Color {
4646
/**
4747
* Get Color structure from hexadecimal value
4848
*/
49-
Color(int hexValue) {
49+
Color(unsigned int hexValue) {
5050
set(::GetColor(hexValue));
5151
}
5252

@@ -199,7 +199,7 @@ class Color : public ::Color {
199199
return *this;
200200
}
201201

202-
inline Color& DrawRectangleLines(::Rectangle rec, int lineThick) {
202+
inline Color& DrawRectangleLines(::Rectangle rec, float lineThick) {
203203
::DrawRectangleLinesEx(rec, lineThick, *this);
204204
return *this;
205205
}

include/Font.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Font : public ::Font {
4646
other.baseSize = 0;
4747
other.glyphCount = 0;
4848
other.glyphPadding = 0;
49-
other.texture = { 0 };
49+
other.texture = {};
5050
other.recs = nullptr;
5151
other.glyphs = nullptr;
5252
}
@@ -84,7 +84,7 @@ class Font : public ::Font {
8484
other.baseSize = 0;
8585
other.glyphCount = 0;
8686
other.glyphPadding = 0;
87-
other.texture = { 0 };
87+
other.texture = {};
8888
other.recs = nullptr;
8989
other.glyphs = nullptr;
9090

include/Material.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Material : public ::Material {
3030
set(other);
3131

3232
other.maps = nullptr;
33-
other.shader = { 0 };
33+
other.shader = {};
3434
}
3535

3636
~Material() {
@@ -68,7 +68,7 @@ class Material : public ::Material {
6868
set(other);
6969

7070
other.maps = nullptr;
71-
other.shader = { 0 };
71+
other.shader = {};
7272

7373
return *this;
7474
}

include/Music.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Music : public ::Music {
3939
other.ctxData = nullptr;
4040
other.looping = false;
4141
other.frameCount = 0;
42-
other.stream = { 0 };
42+
other.stream = {};
4343
}
4444

4545
/**
@@ -74,7 +74,7 @@ class Music : public ::Music {
7474
other.ctxData = nullptr;
7575
other.looping = false;
7676
other.frameCount = 0;
77-
other.stream = { 0 };
77+
other.stream = {};
7878

7979
return *this;
8080
}

include/Rectangle.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class Rectangle : public ::Rectangle {
8181
return *this;
8282
}
8383

84-
inline Rectangle& DrawLines(::Color color, int lineThick) {
84+
inline Rectangle& DrawLines(::Color color, float lineThick) {
8585
::DrawRectangleLinesEx(*this, lineThick, color);
8686
return *this;
8787
}
@@ -91,8 +91,8 @@ class Rectangle : public ::Rectangle {
9191
return *this;
9292
}
9393

94-
inline Rectangle& DrawRoundedLines(float roundness, int segments, int lineThick,
95-
::Color color) {
94+
inline Rectangle& DrawRoundedLines(float roundness, int segments,
95+
float lineThick, ::Color color) {
9696
::DrawRectangleRoundedLines(*this, roundness, segments, lineThick, color);
9797
return *this;
9898
}

include/RenderTexture.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ class RenderTexture : public ::RenderTexture {
2626
set(other);
2727

2828
other.id = 0;
29-
other.texture = { 0 };
30-
other.depth = { 0 };
29+
other.texture = {};
30+
other.depth = {};
3131
}
3232

3333
GETTERSETTER(unsigned int, Id, id)
@@ -50,8 +50,8 @@ class RenderTexture : public ::RenderTexture {
5050
set(other);
5151

5252
other.id = 0;
53-
other.texture = { 0 };
54-
other.depth = { 0 };
53+
other.texture = {};
54+
other.depth = {};
5555

5656
return *this;
5757
}

0 commit comments

Comments
 (0)