Commit graph

126 commits

Author SHA1 Message Date
raysan5
d7b4b9e485 Update year to 2021 2021-01-02 18:15:13 +01:00
raysan5
521ed1cef0 Review DrawLineBezierQuad(), formating and aprameters order 2020-12-26 13:09:34 +01:00
Violet White
de13fca3b1
Add Quadratic Bezier drawing (#1468)
* Add quadratic bezier to shapes.c

* Add DrawLineBezierQuad to header
2020-12-26 13:04:38 +01:00
raysan5
0a9e080998 Remove trailing spaces 2020-12-23 15:03:26 +01:00
raysan5
9216e96315 Corrected typo 2020-12-23 13:02:40 +01:00
raysan5
0da827d754 Corrected small issue 2020-12-23 12:54:57 +01:00
raysan5
b78ee13791 ADDED: CheckCollisionLines()
Removed function from raymath
2020-12-23 12:45:53 +01:00
Ray
2374281204 Avoid *Rec suffix in some variables
Pefixing/Suffixing some data type identifier in the variables is not a convention used in raylib, just reviewed it for consistency...

Still, I kept the *Rec suffix in some functions.
2020-12-19 19:27:31 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01:00
Ray
14d37464ad DrawTriangleFan(): Add a comment about vertex order #1316 2020-07-22 11:12:04 +02:00
raysan5
cdbe1b6190 Review buffer limits on rectangle drawing 2020-05-21 18:57:45 +02:00
raysan5
fdad1f023b Avoid all MSVC compile warnings
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons.

Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only.

Some external libraries still generate warnings.
2020-05-06 19:12:09 +02:00
raysan5
51c3bef497 Review exposed #defines and allow user re-defining
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required.

Also, multiple #define have been renamed and commented.
2020-05-01 17:31:44 +02:00
raysan5
94ab5e2aab Review issue with vertex batch overflow #1223 2020-04-27 18:02:54 +02:00
Ray
1ee6290fcf Replaced fabs() by fabsf() when required 2020-02-28 12:54:39 +01:00
Ray
b5fe41f41a Review libc dependencies and remove when possible
Just for clarification, no plans to remove libc dependency, just did some code analysis to see how much raylib depend on stardard C library. My conclusions:

 - stdlib.h: primary dependency is for malloc() and free()
 - stdio.h: primary dependency is for FILE access, maybe it could go through a custom ABI?
 - string.h: just around 8 functions required
 - math.h: just around 8 functions required
 - others: 1-2 functions required for some other headers
2020-02-04 16:55:24 +01:00
Ray
c3f06b7470 Remove all trail spaces 2020-02-03 19:26:28 +01:00
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
Ray
4f7d090fb2 ADDED: DrawEllipse() and DrawEllipseLines() #1047 2020-01-27 16:21:37 +01:00
Ray
e0d4cc3143 ADDED: DrawPolyLines() 2020-01-09 18:34:20 +01:00
Ray
4211056354 Reviewed some comments 2020-01-08 18:21:08 +01:00
raysan5
21c30f43d4 Update year to 2020 2020-01-05 20:01:54 +01:00
Ray
dc6136e820 Review formatting for PR #1004 2019-10-29 16:03:21 +01:00
João Coelho
75b0264f35 fix various problems, thanks CppCheck :) (#1005)
* explained a bit more the core_window_letterbox example

* fixed a few 'ups' moments that could lead to mild head pain and time loss
2019-10-29 15:57:19 +01:00
AlexHCC
8adcec185e Improve code readability (#976) 2019-09-24 23:08:07 +02:00
AlexHCC
acedf4a0d5 Fixed regular polygon shape rendering (#972) 2019-09-22 21:25:39 +02:00
Colday96
12bcdb977a Update shapes.c for smoother collision detection (#946)
By removing the equal sign, if the 2 rects a right next to each other and not overlapping, there will be no collision detection. This is what a majority of other game libraries do and would make it easier to implement collisions for tile based games.
2019-08-19 13:32:17 +02:00
raysan5
cef1e6e2e2 Added notes about vertex order 2019-08-11 21:26:12 +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
Ray
e0854696b4 ADDED: DrawTriangleStrip() 2019-06-17 10:29:58 +02:00
Ray
e36a80f730 Code tweaks 2019-06-16 23:37:16 +02:00
Ray
97c8a28aaa Remove trail spaces 2019-05-08 18:33:09 +02:00
raysan5
604a8c0b78 WARNING: Functions renamed
Two functions have been renamed for coherence; previous naming was confusing for several users:

 - DrawPolyEx()         ---> DrawTriangleFan()
 - DrawPolyExLines() ---> DrawLineStrip()
2019-04-28 14:45:46 +02:00
Demizdor
0e683005b4 Fix for DrawRectangleRounded 2019-04-23 20:48:00 +03:00
Ray
b8ada4b877 Review creation years 2019-04-08 12:25:13 +02:00
ChillerDragon
f21761fbbb Happy new year 2019 2019-04-07 17:49:12 +02:00
Ray
3e1e7d740f Review merged PR formatting
Removed trail spaces
2019-04-04 13:50:28 +02:00
Demizdor
eda982e261 Reimplemented DrawRoundedRectLines() 2019-03-31 16:15:40 +03:00
Vlad Adrian
ecbd17910d
Added DrawRoundedRectLines() 2019-03-31 13:22:50 +03:00
Demizdor
a28023b58f Added DrawRoundedRect() 2019-03-30 22:18:29 +02:00
Ray
6f371dab08 Some formatting review 2019-03-29 19:43:27 +01:00
Demizdor
ab9c6da26f Added DrawRing(), DrawRingLines() and DrawCircleSectorLines() 2019-03-29 16:22:09 +02:00
Ray
88dfd2ab23 REDESIGNED: DrawCircleSector() 2019-03-28 18:53:41 +01:00
Ray
165ced9428 Small tweak 2019-03-28 13:03:25 +01:00
Ray
36fa0207f2 Some spacing review 2019-02-28 23:06:37 +01:00
Ray
374811c440 Change ternary operator formatting 2019-02-22 13:13:11 +01:00
Ray
a886f5e743 Remove TABS 2019-02-22 12:12:21 +01:00
Ray
641895b5ba Remove end-line spaces 2019-02-21 18:45:19 +01:00
Jens Pitkanen
f9963d4ed4 Fix config.h flags 2019-02-14 13:52:18 +02:00
Ray
297dd641e8 ADDED: DrawCircleSector() 2019-02-13 00:06:06 +01:00