From 6ffc8cb7990fb4ff40f205cb53bec797b10e48a2 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Thu, 22 Feb 2018 02:05:00 +0100 Subject: raymath.h: Use C99 inline semantics RAYMATH_EXTERN_INLINE was renamed to RAYMATH_HEADER_ONLY, which user code may define if they want to use it as header-only library. If multiple files in the same project define RAYMATH_HEADER_ONLY, they might each have duplicate out-of-line definitions of the same functions. By default, raymath.h exposes inline definitions, which instructs the compiler _not_ to generate out-of-line definitons, if out-of-line definitions are required, those of the file defined with RAYLIB_IMPLEMENTATION are used instead. There may be only one such file. In C++ mode, the compiler will select only one out-of-line definition automatically, so no need to define a RAYLIB_IMPLEMENTATION. Unfortunately, we have to remove raymath function declaration from raylib.h as those declarations would lead to duplicate out-of-line definitions which would yield linker errors. This problem didn't exist with GNU89 or C++, because there multiple defintions are ok, but in C99 they aren't. --- examples/models/models_skybox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/models/models_skybox.c b/examples/models/models_skybox.c index 46297e41..9f0d8c17 100644 --- a/examples/models/models_skybox.c +++ b/examples/models/models_skybox.c @@ -62,7 +62,7 @@ int main() Begin3dMode(camera); - DrawModel(skybox, Vector3Zero(), 1.0f, WHITE); + DrawModel(skybox, (Vector3){0, 0, 0}, 1.0f, WHITE); DrawGrid(10, 1.0f); -- cgit v1.2.3