Commit Graph

108 Commits

Author SHA1 Message Date
Ray
40b73a8a91
Develop branch integration (#1091)
* [core] REDESIGNED: Implement global context

* [rlgl] REDESIGNED: Implement global context

* Reviewed globals for Android

* Review Android globals usage

* Update Android globals

* Bump raylib version to 3.0 !!!

* [raudio] REDESIGNED: Implement global context

* [raudio] Reorder functions

* [core] Tweaks on descriptions

* Issues with SUPPORT_MOUSE_GESTURES

* [camera] Use global context

* REDESIGN: Move shapes drawing texture/rec to RLGL context

* Review some issues on standalone mode

* Update to use global context

* [GAME] Upload RE-PAIR game from GGJ2020 -WIP-

* Update game: RE-PAIR

* [utils] TRACELOG macros proposal

* Update config.h
2020-02-03 18:31:30 +01:00
Pablo Marcos Oltra
5d9df629d7 Fix generation of web examples (#1007)
At least on Linux, CMake seems to add automatically
the '-rdynamic' flag. As a result, Emscripten
generates a fat HTML file that does not work.
Removing it allows HTML+JS+WASM generation.
2019-11-01 19:09:38 +01:00
Leandro Gabriel
89c16baf18 Replace tabs with spaces and update year of copyright notices (#927)
* Update year of copyright notices

* Fix mistake in comment

* Fix typo ("algorythms")

* Replace tabs with spaces

* Remove trailing whitespace and fix mistake in comment

* Fix ExportImageAsCode missing comment rectangle corner

* Replace tab with spaces

* Replace tabs with spaces
2019-08-03 11:07:41 +02:00
Antonio Radovcic
814952c01d #917 This commit changes the path to 'shell.html' in all Makefiles (#918) 2019-07-27 11:45:49 +02:00
Ray
a5329efb23 Some tweaks revisiting an old game... 2019-07-24 22:36:52 +02:00
Ray
b4d67499a7 BREAKING CHANGE: Read description
Changes:

 - Font structure has been redesigned, CharInfo structure contained character rectangle within font texture, it has not much sense, considering that it was an information relative to the font atlas generated and not the character itself, so character rectangles have been moved out from CharInfo to Font.
 - CharInfo included a data parameters to contain character pixel data (usually grayscale), generated on TTF font generation. It was inconsistent with other fonts types, so, now CharInfo includes directly an Image of the glyph.
 - REDESIGNED: GenImageFontAtlas(), additional recs parameter added, loaded and filled inside the function to export atlas characters rectangles, instead of silently modify the input CharInfo data.
 - REVIEWED: ImageTextEx(), funtion retrieved the font atlas image from the GPU, that was slow and problematic in several platforms. Now it uses directly the CharInfo image. Support for unicode codepoints has also been added.
 - REDESIGNED: ImageDraw(), now it includes an additional parameter, the color tint, not only it could be useful for several situations but also function signature is more consistent with similar functions.
 - ADDED: ImageFromImage() to generate a new image from a piece of another image.
 - REVIEWED: GetNextCodepoint(), renamed parameters to be more clear.

Also all examples and games that were affected by those changes have been reviewed.
2019-07-24 15:05:14 +02:00
XiaochuanWang
391555a063
Update Makefile
corrected file location for "raylib.rc.data", which will cause an error during compilation
2019-06-09 01:45:51 +10:00
Ray
59b7412772 Updated games building 2019-06-07 00:16:08 +02:00
Ray
718f7a0161 Remove wrong files 2019-06-06 23:56:05 +02:00
Ray
6945511e82 Update example 2019-06-06 23:52:25 +02:00
Ray
efdc6f87d5 Define standard examples size 2019-05-29 13:47:57 +02:00
Ray
978f3a9570 Update Makefile 2019-05-22 18:31:50 +02:00
Ray
5f0866463c Update Makefile 2019-05-22 10:41:24 +02:00
Ray
be7e56f51e Move emscripten web shell to src 2019-05-22 10:40:51 +02:00
Ray
477f05db13 Review games 2019-05-21 22:36:52 +02:00
Ray
322cf34fe0 Update Makefile 2019-05-21 18:02:29 +02:00
Ray
8b4f58b9e9 Review sample games 2019-05-21 17:47:06 +02:00
Ray
0027868d1f Review Makefiles 2019-05-21 17:46:52 +02:00
ChillerDragon
f21761fbbb Happy new year 2019 2019-04-07 17:49:12 +02:00
Ray
7699787473 Added new game: Cat vs Roomba
GGJ2019 game
2019-01-27 15:16:10 +01:00
raysan5
644eddda11 REMOVED: ShowLogo()
Same functionality could be achieved using FLAGS... but also considering removing raylib logo animation...
2019-01-03 13:55:59 +01:00
raysan5
01338b0a14 WARNING: BREAKING CHANGE
Added a bunch of useful text management functions.
Consequently, some already available functions like `FormatText()` and `SubText()` has been renamed for consistency. Created temporal fallbacks for old names.
raylib version bumped to 2.3.
2018-12-26 13:26:34 +01:00
raysan5
7b8965eb38 Support float texture data on OpenGL ES 2.0 2018-12-25 15:19:25 +01:00
raysan5
96207a8a02 REVIEWED: LoadFontEx()
Changed parameters order for consistency with LoadFontData() and other functions when an array is passed by parameter and array size is the following parameter.
2018-12-25 15:17:42 +01:00
raysan5
1982eabe6e Some code tweaks 2018-12-24 17:46:23 +01:00
Ray
ac23af9bf0 Review resources naming
raylib resource data file for Windows platform (containing raylib icon and metadata for executable file) has been renamed to a more consistent name: raylib.rc.data

Also required to work with tcc compiler.
2018-11-19 15:18:11 +01:00
Ray
ed269b8d9a Review RenderTexture drawing usage
Now `BeginTextureMode()` does not clean buffers automatically, that behaviour has been changed because there could be some case (i.e. painting software) where texture buffer does not ned to be cleared; user is responsible of clearing buffers using `ClearBackground()`
2018-11-19 09:40:01 +01:00
noshbar
1d548eaa4b 3 minor sample game cleanups:
* changed bitwise & to logical &&
* removed redundant state check
* moved a strcpy inside a NULL check to prevent a crash.
  NOTE: nothing sensible will happen as a result, but no crash at least.
2018-10-10 22:05:13 +02:00
Ray
abfbc42df7 PNG image size optimization 2018-09-25 12:53:31 +02:00
Ray
be599a9ece enjoy! 2018-09-18 21:34:02 +02:00
Joseph-Eugene Winzer
ab7acd6e34 Games: Snake: Fixes snake head collision with fruit
CheckCollisionRecs() returns true on edge-collision what means that the
snake eats the fruit when colliding with it but also when sliding by one
unit above or below the fruit.
2018-08-13 23:58:42 +02:00
Joseph-Eugene Winzer
b4c02d94a0 Games: Snake: Fixes fruit spawn position
If the initial fruit position collides with the snake's body a new
position for the fruit is generated but without adding the grid offset.
2018-08-13 23:52:18 +02:00
Ray
b042fe12e6 Reviewed spacings on latest PR 2018-08-06 20:49:47 +02:00
Ahmad Fatoum
3f09726331
CMake: Major cleanup to support find_package(raylib)
Remove that link_libraries_to_executable() hack and defines a proper
raylib target that can be used with target_link_libraries.

The same target is also available for external (user) code by using
find_package(raylib).

This results in:

- Remove hardcoded build directories from examples and games CMakeLists.txt
- Allow rlgl_standalone and other special examples to be built easily
- Allow CMake projects to find_package(raylib instead of fiddling with pkg-config
- Makes code a little more maintainable
- Fixes #471, #606.
- Makes code less confusing by removing the double use of PLATFORM (#584).

Note that this is still not _The Right Way_(TM), because normally
raylib-config.cmake (or its includes) would be automatically generated.
I didn't manage to get that to work though, so I went the easier route
of just wrapping pkg_check_modules for consumption by find_package.
2018-07-29 12:35:35 +02:00
Pablo Marcos Oltra
fa0de480f0 Fix HTML5 examples and games using CMake (#589)
Mimic the Makefile by outputting html + js instead of LLVM IR.
2018-07-25 00:39:17 +02:00
raysan5
82e4a12fd3 Added Android Makefile for games 2018-07-21 17:38:47 +02:00
raysan5
74a0814a8f Review formatting 2018-07-21 17:19:44 +02:00
raysan5
7dc66d2d3f Looking for a place for raylib resource file 2018-07-21 16:18:33 +02:00
maficccc@gmail.com
59ebe1b7c3 Added support OpenBSD, NetBSD, DragonFly 2018-06-23 17:02:07 +02:00
Ray
5b21f6cf6f Improved game drawing
Reduced draw calls
2018-06-03 23:58:00 +02:00
Ray
d873314c27 Reviewed Windows resource file name 2018-05-29 00:52:08 +02:00
Ahmad Fatoum
20ddc6a2bb
Move utils.cmake to separate cmake/ directory 2018-05-21 01:08:28 +02:00
Ahmad Fatoum
c1b9104d54
Makefile: Remove unnecessary -no-pie for older GCC support
Currently, if:
* GCC doesn't supports -no-pie: Build error
* GCC supports -no-pie
    * GCC is not configured with --enable-default-pie: No-op
    * GCC is configured with --enable-default-pie:
            Slightly worse performance because we still generate -fpie code
            (-pie affects linker, -fpie affects compiler)

So instead of probing for existence of -fno-pie -no-pie, remove it altogether.

Fixes #540: Build breakage on Debian 8 with gcc 4.9.
2018-05-12 11:41:12 +02:00
Ray
0790171125 Updated raylib_icon resource 2018-05-11 18:14:42 +02:00
Ray San
ec33e7d705 BREAKING CHANGE: Renamed SpriteFont type to Font
- Preparing MP3 files support
- Jumped version to raylib 2.0-dev (too many breaking changes...)
2018-05-04 16:59:48 +02:00
Ray
322cebcbaf Updated to latest raylib changes
Removed OpenAL and GLFW3 dependencies on building.
Reviewed platforms and flags
2018-04-03 22:44:45 +02:00
Ray
0c0ff2802e Review games Makefile 2018-04-02 18:46:22 +02:00
Ahmad Fatoum
2c219fb814
Allow use of main instead of android_main
Inspired by #504.
Instead of requiring the user to do PLATFORM_ANDROID #ifdefery,
have the android_main entry point exported by raylib and call
the user-defined main. This way many games could (in theory)
run unmodified on Android and elsewhere.

This is untested!
2018-03-16 21:37:22 +01:00
Ray
97bf2706c4 Removed flag -fgnu89-inline 2018-02-21 23:28:34 +01:00
raysan5
4492a70a4b Support UTF8 basic characters on ImageTextEx()
Supported UTF8 range equivalent to [128..255] (80h..FFh)
Exposed and renamed text function GetGlyphIndex()
Renamed spriteFont parameter name to simply font
Small security check on transmission mission ending screen
2018-02-18 18:07:57 +01:00