Fix building on Linux.

This commit is contained in:
TSnake41 2020-03-29 15:41:54 +02:00
parent 99a4f8b6ea
commit 96d1a00ac9
3 changed files with 24 additions and 22 deletions

View File

@ -11,6 +11,8 @@ MODULES := rlgl physac
ifeq ($(OS),Windows_NT)
LDFLAGS += -lopengl32 -lgdi32 -lwinmm -static
else
LDFLAGS += -ldl -lX11 -lpthread
endif
BOOT_FILES := src/raylib.lua src/raylua.lua

View File

@ -77,8 +77,8 @@ for _,modname in ipairs(modules) do
end)
-- Strip spaces
line = line:gsub("([(),*.]) +(%w)", function (a, b) return a .. b end)
line = line:gsub("(%w) +([(),*.])", function (a, b) return a .. b end)
line = line:gsub("([(),*.])%s+(%w)", function (a, b) return a .. b end)
line = line:gsub("(%w)%s+([(),*.])", function (a, b) return a .. b end)
proto[#proto + 1] = line:gsub(";", "")
end

View File

@ -1,20 +1,20 @@
void InitPhysics(void);
void RunPhysicsStep(void);
void SetPhysicsTimeStep(double delta);
bool IsPhysicsEnabled(void);
void SetPhysicsGravity(float x, float y);
PhysicsBody CreatePhysicsBodyCircle(Vector2 pos, float radius, float density);
PhysicsBody CreatePhysicsBodyRectangle(Vector2 pos, float width, float height, float density);
PhysicsBody CreatePhysicsBodyPolygon(Vector2 pos, float radius, int sides, float density);
void PhysicsAddForce(PhysicsBody body, Vector2 force);
void PhysicsAddTorque(PhysicsBody body, float amount);
void PhysicsShatter(PhysicsBody body, Vector2 position, float force);
int GetPhysicsBodiesCount(void);
PhysicsBody GetPhysicsBody(int index);
int GetPhysicsShapeType(int index);
int GetPhysicsShapeVerticesCount(int index);
Vector2 GetPhysicsShapeVertex(PhysicsBody body, int vertex);
void SetPhysicsBodyRotation(PhysicsBody body, float radians);
void DestroyPhysicsBody(PhysicsBody body);
void ResetPhysics(void);
void ClosePhysics(void);
void InitPhysics(void);
void RunPhysicsStep(void);
void SetPhysicsTimeStep(double delta);
bool IsPhysicsEnabled(void);
void SetPhysicsGravity(float x, float y);
PhysicsBody CreatePhysicsBodyCircle(Vector2 pos, float radius, float density);
PhysicsBody CreatePhysicsBodyRectangle(Vector2 pos, float width, float height, float density);
PhysicsBody CreatePhysicsBodyPolygon(Vector2 pos, float radius, int sides, float density);
void PhysicsAddForce(PhysicsBody body, Vector2 force);
void PhysicsAddTorque(PhysicsBody body, float amount);
void PhysicsShatter(PhysicsBody body, Vector2 position, float force);
int GetPhysicsBodiesCount(void);
PhysicsBody GetPhysicsBody(int index);
int GetPhysicsShapeType(int index);
int GetPhysicsShapeVerticesCount(int index);
Vector2 GetPhysicsShapeVertex(PhysicsBody body, int vertex);
void SetPhysicsBodyRotation(PhysicsBody body, float radians);
void DestroyPhysicsBody(PhysicsBody body);
void ResetPhysics(void);
void ClosePhysics(void);