Skip to content

Commit 0953865

Browse files
committed
Update raylib to latest from master
1 parent ec62d82 commit 0953865

File tree

5 files changed

+33
-26
lines changed

5 files changed

+33
-26
lines changed

examples/physics/physics_demo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ int main(void)
5656
// Update
5757
//----------------------------------------------------------------------------------
5858
// Delay initialization of variables due to physics reset async
59-
physics.RunStep();
59+
physics.UpdateStep();
6060

6161
if (needsReset)
6262
{

include/Image.hpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,20 @@ class Image : public ::Image {
532532
return ::LoadImagePalette(*this, maxPaletteSize, colorsCount);
533533
}
534534

535+
/**
536+
* Unload color data loaded with LoadImageColors()
537+
*/
538+
inline void UnloadColors(::Color* colors) {
539+
::UnloadImageColors(colors);
540+
}
541+
542+
/**
543+
* Unload colors palette loaded with LoadImagePalette()
544+
*/
545+
inline void UnloadPalette(::Color* colors) {
546+
::UnloadImagePalette(colors);
547+
}
548+
535549
/**
536550
* Load texture from image data
537551
*/

include/Mesh.hpp

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ class Mesh : public ::Mesh {
149149
Unload();
150150
}
151151

152+
/**
153+
* Upload mesh vertex data to GPU (VRAM)
154+
*/
155+
inline void Upload() {
156+
::UploadMesh(this);
157+
}
158+
152159
/**
153160
* Export mesh data to file
154161
*/
@@ -194,14 +201,6 @@ class Mesh : public ::Mesh {
194201
return *this;
195202
}
196203

197-
/**
198-
* Smooth (average) vertex normals
199-
*/
200-
inline Mesh& NormalsSmooth() {
201-
::MeshNormalsSmooth(this);
202-
return *this;
203-
}
204-
205204
/**
206205
* Load model from generated mesh
207206
*/

include/Physics.hpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ class Physics {
6868
return *this;
6969
}
7070

71-
inline Physics& RunStep() {
72-
::RunPhysicsStep();
71+
inline Physics& UpdateStep() {
72+
::UpdatePhysicsStep();
7373
return *this;
7474
}
7575

@@ -78,10 +78,6 @@ class Physics {
7878
return *this;
7979
}
8080

81-
inline bool IsEnabled() const {
82-
return ::IsPhysicsEnabled();
83-
}
84-
8581
inline Physics& SetGravity(float x, float y) {
8682
::SetPhysicsGravity(x, y);
8783
return *this;

include/Vector2.hpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -264,18 +264,16 @@ class Vector2 : public ::Vector2 {
264264
}
265265

266266
/**
267-
* Draw line using quadratic bezier curves with a control point
268-
*
269-
* TODO(RobLoach): Add this one this commit makes it in: https://github.com/raysan5/raylib/commit/521ed1cef0c0dbc752cb79f70c21bb4fc3bf70d4
267+
* Draw line using quadratic bezier curves with a control point.
270268
*/
271-
// inline Vector2& DrawLineBezierQuad(
272-
// ::Vector2 endPos,
273-
// ::Vector2 controlPos,
274-
// float thick,
275-
// ::Color color) {
276-
// ::DrawLineBezierQuad(*this, endPos, controlPos, thick, color);
277-
// return *this;
278-
//}
269+
inline Vector2& DrawLineBezierQuad(
270+
::Vector2 endPos,
271+
::Vector2 controlPos,
272+
float thick,
273+
::Color color) {
274+
::DrawLineBezierQuad(*this, endPos, controlPos, thick, color);
275+
return *this;
276+
}
279277

280278
/**
281279
* Draw a color-filled circle (Vector version)

0 commit comments

Comments
 (0)