Commit Graph

2300 Commits

Author SHA1 Message Date
adb20569be Review shared library building 2020-04-01 11:06:05 +02:00
Ray
6a8b1079c1 Update project version for release 2020-03-30 23:42:17 +02:00
8da6307456 Get icons back on shell.html
It seems there is some related issue on emscripten side... but I'll keep the icons here despite not displayed properly for the moment.
2020-03-30 21:34:45 +02:00
e469f4ebf7 Update config.h, enable some file-formats by default 2020-03-30 17:42:42 +02:00
8941cf3e66 Update textures.c 2020-03-30 17:42:19 +02:00
fc7ec5e907 Update raylib.h 2020-03-30 17:11:35 +02:00
1a948849f3 [cppcheck] Fix minor warnings in models.c and raudio.c (#1162)
Errores fixes:
models.c,2843 Either the condition 'fileData!=NULL' is redundant or there is possible null pointer dereference: fileData.
raudio.c,805, 806, 807, 808, %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'.
2020-03-30 17:08:01 +02:00
e8a8d544c5 Review formating and signegness issues 2020-03-30 14:38:16 +02:00
62cdb2299b [cppcheck] Improvements in SaveStorageValue() in core.c (#1160)
* [cppcheck] Improvements in SaveStorageValue() in core.c

in file core.c cppcheck shows errors only in function SaveStorageValue():

* Common realloc mistake: 'fileData' nulled but not freed upon failure
* Memory pointed to by 'fileData' is freed twice.

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for this function
* Rerun CPPCHECK afer fix

* [cppcheck] Change functions header to accept only positive position in files

Changes:
* Functions SaveStorageValue(), LoadStorageValue() (core.c)
* Functions LoadFileData(), SaveFileData() (utils.c)
* Headers in raylib.h

Validation:
* Tested examples/core/core_storage_values.c
* Launched Unit Test for these functions
* Rerun CPPCHECK afer fix
2020-03-30 13:51:36 +02:00
41582f0448 Fix "variable is reassigned before use" linter warning on raymath.h (#1158) 2020-03-29 22:03:10 +02:00
733ed972f7 Reorganize image functions 2020-03-29 13:37:33 +02:00
5d7050bdf9 Reorganize image/texture functions for consistency 2020-03-29 13:31:12 +02:00
a025636fa1 Update ImageDraw*() functions to match arguments of Draw*() (#1156)
* Update ImageDraw*() functions to match arguments of Draw*()

Updated draw functions:
ImageDrawPixel()
ImageDrawPixelV()
ImageDrawCircle()
ImageDrawCircleV()
ImageDrawLine()
ImageDrawLineV()
ImageDrawRectangle()
ImageDrawRectangleV()
ImageDrawRectangleRec()

* [nodepadpp] Update Notepad++ ImageDraw defintions

This updates the Notepad++ definitions with the updated ImageDraw methods.

* [examples] Add ImageDraw calls to textures_image_drawing

* Update ImageDraw*() methods
2020-03-29 12:43:34 +02:00
66e0d774bd Revert "Update compilation warning flags (#1151)"
This reverts commit 2528854664.
2020-03-28 18:39:56 +01:00
e333eb415b Update window rc 2020-03-28 18:27:56 +01:00
d28e73849b Review TRACELOG() messages 2020-03-27 18:49:21 +01:00
d7b15ac1cf Review TRACELOG() categories 2020-03-27 18:45:37 +01:00
c0c775e45d [rlgl] Review TRACELOG() messages, categorized 2020-03-27 18:31:36 +01:00
b5842434c2 Corrected missing semicolon 2020-03-27 18:31:16 +01:00
c7e9951795 [core] Review TRACELOG() messages, categorized 2020-03-27 18:06:09 +01:00
70ed975b99 [models] Review TRACELOG() messages, categorized 2020-03-27 17:43:51 +01:00
7e2b1b4ff0 [textures] Review TRACELOG() messages 2020-03-27 17:43:38 +01:00
915b5f370b [raudio] Review TRACELOG() messages, categorized 2020-03-27 17:43:24 +01:00
0c6c421508 [raudio] Review TRACELOG() messages, categorized 2020-03-27 17:16:30 +01:00
bc2c6251f8 [text] Review TRACELOG() messages, categorized 2020-03-27 17:16:07 +01:00
b9dd459d5a [textures] Review TRACELOG() messages, categorized 2020-03-27 17:15:44 +01:00
28da2522fe [utils] Review TRACELOG() messages, categorized 2020-03-27 17:15:26 +01:00
2528854664 Update compilation warning flags (#1151)
* Update compilation warning flags

Removed the -Wall flag that allow many warnings and added manually all the warning flags that don't generate warnings in the src/external folder.
Specifically, these are some of the flags reporting errors in src/external:

-Wmissing-prototypes
-Wunused-variable
-Wunused-value
-Wunused-parameter
-Wunused-function

* Uptade compilation flags in examples with missing -std=c99
2020-03-26 18:48:34 +01:00
7ae7a87f8a Remove trail spaces 2020-03-25 19:41:51 +01:00
3d41c1b6cd Minor tweaks 2020-03-25 19:38:55 +01:00
96005f2566 ADDED: IsWindowFullscreen() 2020-03-25 18:52:38 +01:00
e37d021cd3 Enable IQM models support on config.h 2020-03-25 18:51:46 +01:00
133a882556 Update config.h 2020-03-25 18:39:28 +01:00
e07281f8bd Fixed DrawTextRecEx() selection when wordwrap is ON (again) (#1149) 2020-03-25 10:27:43 +01:00
d657537821 Support mtl loading by tinyobj_parse_obj() #1134
I don't like this solution but well... let's use it for the moment...
2020-03-24 18:42:57 +01:00
584e2d664c GenMeshHeightmap flat shading normals (#1140) 2020-03-24 13:27:49 +01:00
51a8e1d692 Remove define not required 2020-03-24 13:26:34 +01:00
da836a732c Android: Better track touch input returned from IsMouse*() (#1144)
* Android: Better track touch input returned from IsMouse*()

Switch to actually tracking touch input to use for "mouse" input rather
than the gestures system. The gesture system as an abstraction ontop of
raw touch input loses some information needed to map to "mouse"
input.

Before,
- IsMouseButtonReleased() triggers immediately after the initial touch
(because GESTURE_TAP activates immediately on touch) instead of waiting for the
touch to be released.
- IsMouseButtonUp() returns false, when it should just be the opposite
of IsMouseButtonDown().
- IsMouseButtonDown() returns true only after GESTURE_HOLD (which
activates after some period of time after GESTURE_TAP), when instead it
should just be true whenever there is touch input i.e. gesture !=
GESTURE_NONE or alternatively when any input is received on the screen.

After this PR, touches map closer to mouse input.
- IsMouseButtonReleased() triggers when touch is released (last frame
was touched, this frame not touched).
- IsMouseButtonUp() returns the opposite of IsMouseButtonDown()
- IsMouseButtonDown() is true when
(AMOTION_EVENT_ACTION_DOWN || AMOTION_EVENT_ACTION_MOVE) and false when
(AMOTION_EVENT_ACTION_UP)

* RPI: Include index check for RPI in GetTouchPosition()
2020-03-24 13:23:34 +01:00
0229f9b1a4 CMakeLists.txt: report generated CMAKE_CONFIGURATION_TYPES
We might want to customize this in feature for multi-config builds (e.g.
a Visual studio build with both Debug and Release configurations).

Output the variable value for user awareness.
2020-03-24 06:37:22 +01:00
fcdb120935 Comment tweaks 2020-03-23 20:24:20 +01:00
8f45370073 Comment tweaks 2020-03-23 20:24:09 +01:00
5aebd2a16c Review formating from PR #1138 2020-03-21 20:30:40 +01:00
574c689ff7 Added draw functions to ImageDraw*() (#1138)
Added draw functions:
ImageClearBackground()
ImageDrawPixel()
ImageDrawLineEx()
ImageDrawCircle()
2020-03-21 20:23:50 +01:00
01e035e28b Android: Track touch motion across screen (#1137)
This was working in 2.6 but no longer does in current git tree.
It appears touch position is only tracked on
AMOTION_EVENT_ACTION_[DOWN|UP], which only registers the initial touch
on the screen. Subsequent movement is not tracked into CORE.

Touch position and the Gesture System appears to be updated twice in
AndroidInputCallback in what looks like perhaps a copy paste error (code
is identical) with the exception of tracking AMOTION_EVENT_ACTION_UP in
the 2nd copy of the code (but this is not necessary to track).

If you need to track the first touch or release touch position, you can
do so with checking IsMouseButton[Pressed|Released] on the same frame.

This patch makes it so the touch position is always updated, and merges the
duplicated code into 1 singular code path.
2020-03-19 16:56:48 +01:00
4af4483f5f Added security check in case init fails #1135 2020-03-17 20:57:01 +01:00
2344941974 Replace external libraries custom allocators by raylib ones #1074
NOTE: Two libraries still use custom allocators: glfw and stb_vorbis
2020-03-17 13:40:07 +01:00
71b06caed4 Corrected typo 2020-03-15 17:06:08 +01:00
4611406c68 REVIEWED: ImageTextEx() to support line breaks #1131
NOTE: This functionality has an important issue, line space is fixed to 1.5 font.baseSize pixels, depending on the font and how it has been generated that spacing could be too wide or too narrow...
2020-03-15 16:18:48 +01:00
427be604b9 Android: Set display.[width, height] before screen size check (#1132)
In `InitGraphicsDevice(...)`, the Android section has a screen security check
like other platforms- but CORE.display.width, CORE.display.height are
not set yet, so the security check sets it to 0. So ensure we query the
device's screen width and height before the screen size security check.

This also gives you the ability to run a proper full-screen application
on Android without any scaling and guess work on the target device by
setting screen width and height to 0 in `InitWindow(...)` and using
`GetScreen[Width|Height]()` to get the actual values.
2020-03-15 15:56:43 +01:00
Ray
d57b5ac89a Added note on transparent framebuffer w/o X11 on RPI 2020-03-12 17:47:35 +01:00