Merge branch 'master' of https://github.com/raysan5/raylib into raylib_testing

This commit is contained in:
Michele Tampellini 2021-12-07 17:51:16 +07:00
commit af685f3e47
6 changed files with 46 additions and 12 deletions

View File

@ -27,9 +27,9 @@ jobs:
uses: actions/checkout@master
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v9
uses: mymindstorm/setup-emsdk@v11
with:
version: 2.0.0
version: 3.0.0
actions-cache-folder: 'emsdk-cache'
- name: Setup Release Version
@ -52,7 +52,7 @@ jobs:
run: |
cd src
emcc -v
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-master" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
make PLATFORM=PLATFORM_WEB EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main" RAYLIB_RELEASE_PATH="../build/${{ env.RELEASE_NAME }}/lib" -B
cd ..
- name: Generate Artifacts

View File

@ -1,6 +1,6 @@
# raylib bindings and wrappers
Some people ported raylib to other languages in form of bindings or wrappers to the library. Here it is alist with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
Some people ported raylib to other languages in form of bindings or wrappers to the library. Here is a list with all the ports available. Feel free to send a PR if you know of any binding/wrapper not in this list.
### Language Bindings
@ -12,6 +12,7 @@ Some people ported raylib to other languages in form of bindings or wrappers to
| raylib-boo | 3.7 | [Boo](http://boo-language.github.io/)| MIT | https://github.com/Rabios/raylib-boo |
| bindbc-raylib3 | **4.0** | [D](https://dlang.org/) | BSL-1.0 | https://github.com/o3o/bindbc-raylib3 |
| dray | **4.0** | [D](https://dlang.org/) | Apache-2.0 | https://github.com/xdrie/dray |
| raylib-d | **4.0** | [D](https://dlang.org/) | Zlib | https://github.com/schveiguy/raylib-d |
| raylib-go | **4.0** | [Go](https://golang.org/) | Zlib | https://github.com/gen2brain/raylib-go |
| raylib-rs | 3.5 | [Rust](https://www.rust-lang.org/) | Zlib | https://github.com/deltaphc/raylib-rs |
| raylib-lua | **4.0** | [Lua](http://www.lua.org/) | ISC | https://github.com/TSnake41/raylib-lua |

View File

@ -15,7 +15,7 @@
# Many thanks to Milan Nikolic (@gen2brain) for implementing Android platform pipeline.
# Many thanks to Emanuele Petriglia for his contribution on GNU/Linux pipeline.
#
# Copyright (c) 2014-2019 Ramon Santamaria (@raysan5)
# Copyright (c) 2014-2021 Ramon Santamaria (@raysan5)
#
# This software is provided "as-is", without any express or implied warranty.
# In no event will the authors be held liable for any damages arising from

View File

@ -281,9 +281,9 @@ RMAPI float Vector2Distance(Vector2 v1, Vector2 v2)
// Calculate angle from two vectors in X-axis
RMAPI float Vector2Angle(Vector2 v1, Vector2 v2)
{
float result = atan2f(v2.y - v1.y, v2.x - v1.x)*(180.0f/PI);
float result = atan2f(v2.y, v2.x) - atan2f(v1.y, v1.x);
if (result < 0) result += 360.0f;
if (result < 0) result += 2 * PI;
return result;
}
@ -328,8 +328,9 @@ RMAPI Vector2 Vector2Normalize(Vector2 v)
if (length > 0)
{
result.x = v.x*1.0f/length;
result.y = v.y*1.0f/length;
float ilength = 1.0f/length;
result.x = v.x*ilength;
result.y = v.y*ilength;
}
return result;

View File

@ -487,6 +487,8 @@ static CoreData CORE = { 0 }; // Global CORE state context
static char **dirFilesPath = NULL; // Store directory files paths as strings
static int dirFileCount = 0; // Count directory files strings
const char *raylibVersion = RAYLIB_VERSION; // raylib version symbol, it could be required for some bindings
#if defined(SUPPORT_SCREEN_CAPTURE)
static int screenshotCounter = 0; // Screenshots counter
#endif
@ -701,6 +703,35 @@ struct android_app *GetAndroidApp(void)
void InitWindow(int width, int height, const char *title)
{
TRACELOG(LOG_INFO, "Initializing raylib %s", RAYLIB_VERSION);
TRACELOG(LOG_INFO, "Supported raylib modules:");
TRACELOG(LOG_INFO, " > rcore:..... loaded (mandatory)");
TRACELOG(LOG_INFO, " > rlgl:...... loaded (mandatory)");
#if defined(SUPPORT_MODULE_RSHAPES)
TRACELOG(LOG_INFO, " > rshapes:... loaded (optional)");
#else
TRACELOG(LOG_INFO, " > rshapes:... not loaded (optional)");
#endif
#if defined(SUPPORT_MODULE_RTEXTURES)
TRACELOG(LOG_INFO, " > rtextures:. loaded (optional)");
#else
TRACELOG(LOG_INFO, " > rtextures:. not loaded (optional)");
#endif
#if defined(SUPPORT_MODULE_RTEXT)
TRACELOG(LOG_INFO, " > rtext:..... loaded (optional)");
#else
TRACELOG(LOG_INFO, " > rtext:..... not loaded (optional)");
#endif
#if defined(SUPPORT_MODULE_RMODELS)
TRACELOG(LOG_INFO, " > rmodels:... loaded (optional)");
#else
TRACELOG(LOG_INFO, " > rmodels:... not loaded (optional)");
#endif
#if defined(SUPPORT_MODULE_RAUDIO)
TRACELOG(LOG_INFO, " > raudio:.... loaded (optional)");
#else
TRACELOG(LOG_INFO, " > raudio:.... not loaded (optional)");
#endif
if ((title != NULL) && (title[0] != 0)) CORE.Window.title = title;
@ -3292,7 +3323,8 @@ void OpenURL(const char *url)
#if defined(__APPLE__)
sprintf(cmd, "open '%s'", url);
#endif
system(cmd);
int result = system(cmd);
if (result == -1) TRACELOG(LOG_WARNING, "OpenURL() child process could bot be created");
RL_FREE(cmd);
#endif
#if defined(PLATFORM_WEB)

View File

@ -131,8 +131,8 @@
#endif
#if defined(SUPPORT_FILEFORMAT_QOI)
#define QOI_MALLOC RL_MALLOC
#define QOI_FREE RL_FREE
#define QOI_MALLOC RL_MALLOC
#define QOI_FREE RL_FREE
#define QOI_IMPLEMENTATION
#include "external/qoi.h"