Merge pull request #7 from raysan5/master

pull
This commit is contained in:
Murray Campbell 2018-10-24 14:33:53 -05:00 • committed by GitHub
commit 03fb5499a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
114 changed files with 1874 additions and 1321 deletions

1
.gitignore vendored
View file

@ -33,6 +33,7 @@ Thumbs.db
[Bb]in [Bb]in
[Dd]ebug/ [Dd]ebug/
[Dd]ebug.win32/ [Dd]ebug.win32/
[Dd]ebug.DLL/
*.sbr *.sbr
*.sdf *.sdf
obj/ obj/

View file

@ -120,7 +120,6 @@ script:
-DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON -DBUILD_EXAMPLES=ON -DBUILD_GAMES=ON
-DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW -DUSE_EXTERNAL_GLFW=$USE_EXTERNAL_GLFW
-DUSE_WAYLAND=$WAYLAND -DUSE_WAYLAND=$WAYLAND
-DUSE_OPENAL_BACKEND=$OPENAL
-DINCLUDE_EVERYTHING=ON -DINCLUDE_EVERYTHING=ON
.. ..
- $RUNNER make VERBOSE=1 - $RUNNER make VERBOSE=1

View file

@ -59,21 +59,23 @@ To open new issue for raylib (bug, enhancement, discussion...), just try to foll
Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of: Some people ported raylib to other languages in form of bindings or wrappers to the library, here is a list with the ones I'm aware of:
- [raylib C/C++ version (default)](https://github.com/raysan5/raylib) - [raylib](https://github.com/raysan5/raylib) : raylib **C/C++** version (default)
- [raylib Lua binding](https://github.com/raysan5/raylib-lua) - [raylib-lua](https://github.com/raysan5/raylib-lua) : raylib **Lua** binding
- [raylib Go binding](https://github.com/gen2brain/raylib-go) - [raylib-go](https://github.com/gen2brain/raylib-go) : raylib **Go** binding
- [raylib Nim binding](https://gitlab.com/define-private-public/raylib-Nim) - [raylib-Nim](https://gitlab.com/define-private-public/raylib-Nim) : raylib **Nim** binding
- [raylib Crystal binding](https://gitlab.com/Zatherz/cray) - [cray](https://gitlab.com/Zatherz/cray) - raylib **Crystal** binding
- [raylib Perl wrapper](https://metacpan.org/pod/Graphics::Raylib) - [Graphics::Raylib](https://metacpan.org/pod/Graphics::Raylib) : raylib **Perl** wrapper
- [raylib Pascal binding](https://github.com/drezgames/raylib-pascal) - [raylib-pascal](https://github.com/drezgames/raylib-pascal) - raylib **Pascal** binding
- [raylib flat-assembler Usage example](http://forum.raylib.com/index.php?p=/discussion/comment/425/#Comment_425) - [Raylib-cs](https://github.com/ChrisDill/Raylib-cs) : raylib **C#** binding
- [raylib COBOL Usage example](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib) - [RaylibSharp](https://github.com/TheLumaio/RaylibSharp) : raylib **C#** binding
- [raylib C# binding](https://github.com/ChrisDill/Raylib-cs) - [raylib-ruby-ffi](https://github.com/D3nX/raylib-ruby-ffi) : raylib **Ruby** binding
- [raylib C# binding](https://github.com/TheLumaio/RaylibSharp) - [raylib-rs](https://github.com/deltaphc/raylib-rs) : raylib **Rust** binding
- [raylib Ruby binding](https://github.com/D3nX/raylib-ruby-ffi) - [raylib-rust](https://github.com/dtcristo/raylib-rust) : raylib **Rust** binding
- [raylib Rust binding](https://github.com/deltaphc/raylib-rs) - [raylib-py](https://github.com/overdev/raylib-py) : raylib **Python** binding
- [raylib Python binding](https://github.com/overdev/raylibpy) - [raylib-haskell](https://github.com/DevJac/raylib-haskell) : raylib **Haskell** binding
- [raylib Haskell binding](https://github.com/DevJac/raylib-haskell) - [raylib-java]() : raylib **Java** binding
- *[raylib flat-assembler Usage example](http://forum.raylib.com/index.php?p=/discussion/comment/425/#Comment_425)*
- *[raylib COBOL Usage example](https://github.com/Martinfx/Cobol/tree/master/OpenCobol/Games/raylib)*
Usually, raylib bindings follow the convention: `raylib-{language}` Usually, raylib bindings follow the convention: `raylib-{language}`
@ -85,7 +87,7 @@ provide the icon/logo for that new language binding.
If you have any doubt, don't hesitate to [contact me](mailto:ray@raylib.com)!. If you have any doubt, don't hesitate to [contact me](mailto:ray@raylib.com)!.
You can write me a direct mail but you can also contact me on the following networks: You can write me a direct mail but you can also contact me on the following networks:
- [raylib forum](http://forum.raylib.com/) - A good place for discussions or to ask for help. - [raylib reddit](https://www.reddit.com/r/raylib/) - A good place for discussions or to ask for help.
- [raylib Discord](https://discord.gg/VkzNHUE) - A direct communication channel for project discussions. - [raylib Discord](https://discord.gg/VkzNHUE) - A direct communication channel for project discussions.
- [raylib twitter](https://twitter.com/raysan5) - My personal twitter account, I usually post about raylib, you can send me PMs. - [raylib twitter](https://twitter.com/raysan5) - My personal twitter account, I usually post about raylib, you can send me PMs.
- [raylib web](http://www.raylib.com/) - On top-right corner there is a bunch of networks where you can find me. - [raylib web](http://www.raylib.com/) - On top-right corner there is a bunch of networks where you can find me.

View file

@ -7,7 +7,7 @@ source code
raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified, raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
BSD-like license that allows static linking with closed source software: BSD-like license that allows static linking with closed source software:
Copyright (c) 2013-2016 Ramon Santamaria (@raysan5) Copyright (c) 2013-2019 Ramon Santamaria (@raysan5)
This software is provided "as-is", without any express or implied warranty. In no event 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 the use of this software. will the authors be held liable for any damages arising from the use of this software.
@ -41,9 +41,9 @@ The following fonts [provided with raylib](https://github.com/raysan5/raylib/tre
2d art 2d art
------ ------
[scarfy spritesheet](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/scarfy.png) and [fudesumi image](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/fudesumi.png) have been created by [Eiden Marsal](https://www.artstation.com/artist/marshall_z) and licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode) [scarfy spritesheet](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/scarfy.png) and [fudesumi image](https://github.com/raysan5/raylib/blob/master/examples/textures/resources/fudesumi.png) have been created by [Eiden Marsal](https://www.artstation.com/artist/marshall_z) and are licensed as [Creative Commons Attribution-NonCommercial 3.0](https://creativecommons.org/licenses/by-nc/3.0/legalcode)
3d models 3d models
--------- ---------
[medieval city 3d models and textures](https://github.com/raysan5/raylib/tree/master/examples/models/resources/medieval) have been created by Alberto Cano and licensed as [Creative Commons Attribution-NonCommercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode) [medieval city 3d models and textures](https://github.com/raysan5/raylib/tree/master/examples/models/resources/medieval) have been created by Alberto Cano and are licensed as [Creative Commons Attribution-NonCommercial 4.0](https://creativecommons.org/licenses/by-nc/4.0/legalcode)

View file

@ -31,7 +31,7 @@ features
- **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h) - **Powerful math module** for Vector, Matrix and Quaternion operations: [raymath](https://github.com/raysan5/raylib/blob/master/src/raymath.h)
- Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD) - Audio loading and playing with streaming support (WAV, OGG, MP3, FLAC, XM, MOD)
- **VR stereo rendering** support with configurable HMD device parameters - **VR stereo rendering** support with configurable HMD device parameters
- Bindings to **Lua** ([raylib-lua](https://github.com/raysan5/raylib-lua)), **Go** ([raylib-go](https://github.com/gen2brain/raylib-go)) and more! - Bindings to **Lua** ([raylib-lua](https://github.com/raysan5/raylib-lua)), **Go** ([raylib-go](https://github.com/gen2brain/raylib-go)) and [more](https://github.com/raysan5/raylib/blob/master/CONTRIBUTING.md#raylib-bindings)!
raylib uses on its [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module the outstanding [GLFW3](http://www.glfw.org/) library, embedded inside raylib in the form of [rglfw](https://github.com/raysan5/raylib/blob/master/src/rglfw.c) module, avoiding that way external dependencies. raylib uses on its [core](https://github.com/raysan5/raylib/blob/master/src/core.c) module the outstanding [GLFW3](http://www.glfw.org/) library, embedded inside raylib in the form of [rglfw](https://github.com/raysan5/raylib/blob/master/src/rglfw.c) module, avoiding that way external dependencies.

View file

@ -375,6 +375,7 @@ EXAMPLES = \
core/core_2d_camera \ core/core_2d_camera \
core/core_world_screen \ core/core_world_screen \
core/core_vr_simulator \ core/core_vr_simulator \
core/core_multitouch \
shapes/shapes_logo_raylib \ shapes/shapes_logo_raylib \
shapes/shapes_basic_shapes \ shapes/shapes_basic_shapes \
shapes/shapes_colors_palette \ shapes/shapes_colors_palette \

View file

@ -0,0 +1,90 @@
/*******************************************************************************************
*
* raylib [core] example - Multitouch input
*
* This example has been created using raylib 2.1 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
* Example by Berni
*
********************************************************************************************/
#include "raylib.h"
#include <stdio.h>
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
int screenWidth = 800;
int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [core] example - multitouch input");
Vector2 ballPosition = { -100.0f, -100.0f };
Color ballColor;
int PressedCounter = 0;
Vector2 TouchPos;
char Str[16];
SetTargetFPS(60);
//---------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
// Update
//----------------------------------------------------------------------------------
ballPosition = GetMousePosition();
ballColor = BEIGE;
if (IsMouseButtonDown(MOUSE_LEFT_BUTTON)) ballColor = MAROON;
if (IsMouseButtonDown(MOUSE_MIDDLE_BUTTON)) ballColor = LIME;
if (IsMouseButtonDown(MOUSE_RIGHT_BUTTON)) ballColor = DARKBLUE;
if (IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) PressedCounter = 10;
if (IsMouseButtonPressed(MOUSE_MIDDLE_BUTTON)) PressedCounter = 10;
if (IsMouseButtonPressed(MOUSE_RIGHT_BUTTON)) PressedCounter = 10;
if(PressedCounter > 0)
PressedCounter--;
//----------------------------------------------------------------------------------
// Draw
//----------------------------------------------------------------------------------
BeginDrawing();
ClearBackground(RAYWHITE);
// Multitouch
for (int i = 0; i < MAX_TOUCH_POINTS; ++i)
{
TouchPos = GetTouchPosition(i); // Get the touch point
if( (TouchPos.x >= 0) && (TouchPos.y >= 0) ) // Make sure point is not (-1,-1) as this means there is no touch for it
{
DrawCircleV(TouchPos, 34, ORANGE); // Draw a circle there
sprintf(Str,"%d",i);
DrawText(Str, TouchPos.x - 10, TouchPos.y - 70, 40, BLACK); // Also show its index number
}
}
// Draw the normal mouse location
DrawCircleV(ballPosition, 30 + (PressedCounter * 3), ballColor);
DrawText("move ball with mouse and click mouse button to change color", 10, 10, 20, DARKGRAY);
DrawText("touch the screen at multiple locations to get multiple balls", 10, 30, 20, DARKGRAY);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View file

@ -5,8 +5,7 @@
* This example has been created using raylib 1.8 (www.raylib.com) * This example has been created using raylib 1.8 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details) * raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
* *
* Example based on Berni work on Raspberry Pi: * Example based on Berni work on Raspberry Pi.
* http://forum.raylib.com/index.php?p=/discussion/124/line-versus-triangle-drawing-order
* *
* Copyright (c) 2017 Ramon Santamaria (@raysan5) * Copyright (c) 2017 Ramon Santamaria (@raysan5)
* *

View file

@ -51,6 +51,9 @@ int main()
circleC->restitution = 1; circleC->restitution = 1;
SetTargetFPS(60); SetTargetFPS(60);
// Restitution demo needs a very tiny physics time step for a proper simulation
SetPhysicsTimeStep(1.0/60.0/100 * 1000);
//-------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------
// Main game loop // Main game loop

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Before After
Before After

Some files were not shown because too many files have changed in this diff Show more