Commit Graph

1271 Commits

Author SHA1 Message Date
Murlocohol
f0d949f931
Hotfix for Vector2LineAngle(), should probably be reviewed along with the rest of raylib angle functions to determine what coordinate system we want. (#3394) 2023-10-10 08:59:09 +02:00
Ray
0d8a6cfbfa Revert "Update zig build system to zig version 0.11.0 (#3393)"
This reverts commit 540ad99442.
2023-10-10 08:48:55 +02:00
Purple4pur
540ad99442
Update zig build system to zig version 0.11.0 (#3393)
* update build.zig for zig 0.11.0

* fix build.zig in examples to install executable correctly

* discard build.zig, only use src/build.zig, to avoid annoying zig-out path problem

* update zig version note
2023-10-09 13:05:19 +02:00
Ray
fecf56e15a
WARNING: rcore module split per-platform **BIG CHANGE** (#3388)
* Submodules (#3311)

* Check in current state

* Add submodules to Makefile and clean up some imports

* Start moving InitGraphicsDeivce

* Move android_main and CloseWindow() out of rcore

* Move WindowShouldClose out of rcore

* Move IsWindowHidden out of rcore

* Move IsWindowMinimized out of rcore

* Move IsWindowMaximized, IsWindowFocused and IsWindowResized out of rcore

* Move ToggleFullscreen out of rcore

* Move MaximizeWindow, MinimizeWindow and RestoreWindow out of rcore

* Move 13 functions out of rcore:
ToggleBorderlessWindowed
SetWindowState
ClearWindowState
SetWindowIcon
SetWindowIcons
SetWindowTitle
SetWindowPosition
SetWindowMonitor
SetWindowMinSize
SetWindowMaxSize
SetWindowSize
SetWindowOpacity
SetWindowFocused

* Minor clean up, revert makefile change, include submodules directly in rcore

* Fix makefile comment

* Remove rcore.h from Makefile

* Remove debug include

* Move 18 functions from rcore to submodules
GetWindowHandle
GetMonitorCount
GetCurrentMonitor
GetMonitorPosition
GetMonitorWidth
GetMonitorHeight
GetMonitorPhysicalHeight
GetMonitorRefreshRate
GetWindowPosition
GetWindowScaleDPI
GetMonitorName
SetClipboardText
GetClipboardText
ShowCursor
HideCursor
EnableCursor
DisableCursor
GetTime

* Move TakeScreenshot, OpenURL, GetGamepadName out of rcore into submodules

* remove debugging #defines

* Move GetMonitorPhysicalWidth from rcore to submodule

* Move GetGamepadAxisCount from rcore

* Move SetGamepadMappings out of rcore

* Move GetMouseX, GetMouseY, GetMousePosition out of rcore

* Move SetMousePosition out of rcore

* Move GetMouseWheelMove out of rcore

* Move the last functions out of rcore

* Move shared function defs and some global var to rcore.h

* Clean up rcore.c and rcore.h a little more

* Remove unnecessary #define

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>

* REVIEWED: `PLATFORM_DESKTOP` Windows building

* Revert "REVIEWED: `PLATFORM_DESKTOP` Windows building"

This reverts commit 71a12171f7.

* Reviewed Windows building

* [split] Fix compilation for web (and desktop) (#3329)

* Fix compilation for web

* Remove EM_ASM_INT from core_input_gestures_web example

* Fix raymath undefined symbols for desktop and web

* Remove raylib_opengl_interop from examples Makefile

* Revert previous commit (8651c78)

* Fix TraceLog for web and desktop

* [split] `rcore`, `rcore_web` and `rcore_desktop` changes (batch 2) (#3334)

* Fix formatting

* Reapply commit 9d230d7 (#3305) that was missing

* Reapplies commits 719365f (#3309) and 8a1779b (#3312) that were missing

* Reapply commit 5c9cc3f (#3323) that was missing

* Reapply commit a2b3b1e that was missing

* Revert commit cef25c6 to fix macro redefined warning

* Move rcore.h #include to after config.h to fix macro redefinitions warnings

* [split] `rcore`, `web`, `desktop`, `android` changes (batch 3) (#3338)

* First pass to remove unneeded platform macros for web

* Second pass to remove unneeded platform macros for web

* Move GetTouchX, GetTouchY, GetTouchPosition from rcore to web, desktop, android

* Move SetMouseCursor from rcore to android, desktop, web

* [split] `rcore`, `web`, `desktop`, `android` changes (batch 4) (#3343)

* Fix ToggleBorderlessWindowed duplicated glfwSetWindowSize calls

* First pass to remove unneeded platform macros for android

* Second pass to remove unneeded platform macros for android

* Remove unneeded platform macros for desktop

* Relocate GetGamepadName and update SetGamepadMappings on android, desktop, web

* Add missing comment to web

* [split] `rcore`, `web`, `desktop`, `android` changes (batch 5) (#3345)

* Move SetExitKey from core to android, desktop, web

* Move some callbacks from core to desktop and web

* Relocate emscripten callbacks on web

* Relocate android callbacks on android

* Revert "Relocate android callbacks on android"

This reverts commit bbdbecc01e.

* Updates UnloadVrStereoConfig on rcore

* Update SetClipboardText on android

* Fix screenMin/Max default values for android

* [split] `rcore`, `drm` changes (#3347)

* Tweak makefiles for PLATFORM_DRM and move rcore_drm's dependencies to rcore.h

* Move drm functions to rcore_drm.c

* Fix a typo in rcore.c

* Add SetExitKey to rcore_drm.c

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>

* Fix compilation for android (#3360)

* Fix android include (#3364)

* Reviewed platform split #3313

 - Added file headers info
 - Added TRACELOG message for unimplemented functions
 - Reviewed code formatting and organization
 - Several code tweaks

* REVIEWED: `GetDirectoryPath()`

---------

Co-authored-by: MichaelFiber <42419558+michaelfiber@users.noreply.github.com>
Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: ubkp <118854183+ubkp@users.noreply.github.com>
2023-10-08 18:36:07 +02:00
Luís Almeida
bc15c19518
Texture Tiling Example - luis605 (#3353)
* Texture Tiling Example - luis605

* Removed SetTraceLogLevel(LOG_WARNING);
2023-10-01 23:01:59 +02:00
Ray
f7c3035b8c Update raygui.h 2023-09-24 23:51:23 +02:00
Ray
c8a6093d52
Update examples creation requirements 2023-09-23 11:13:11 +02:00
Ray
1896268775 Reviewed examples for consistency 2023-09-08 13:27:13 +02:00
Gabriel dos Santos Sanches
2d5d0c2999
examples: core: adds 2D camera two player split screen (#3298) 2023-09-08 12:22:12 +02:00
MichaelFiber
18e9784c6d
Remove PLATFORM_RPI (#3232)
* Remove PLATFORM_RPI

* remove build artifacts

---------

Co-authored-by: MichaelFiber <michael@cubeofb.org>
Co-authored-by: Ray <raysan5@gmail.com>
2023-09-07 17:42:28 +02:00
Asdqwe
c147ab51c9
Fix examples/textures/textures_image_rotate.c help instructions (#3286) 2023-09-03 11:03:00 +02:00
Asdqwe
a69d401433
Fix examples/textures/textures_fog_of_war.c help instructions (#3285) 2023-09-02 22:50:59 +02:00
bXi
c03ab03627
Added rudimentary SVG support. (#2738)
* Added rudimentary SVG support. Added 2 functions ImageLoadSvg and ImageLoadSvgWithSize.

* Added an example on how to use ImageLoadSvgWithSize and adjusted Makefiles accordingly.

* Added actual correct example file.

* Reviewed the code to keep the raylib coding conventions in mind.
Moved the LoadImageSvg() code into LoadImage() guarded by SUPPORT_FILEFORMAT_SVG.
Renamed LoadImageSvgWithSize() to LoadImageSvg().
Added a LoadImageSvgFromString() function to parse the loaded SVG into an actual image. This does the bulk of the work.

* Fixed typo.

---------

Co-authored-by: Ray <raysan5@gmail.com>
2023-09-02 13:00:18 +02:00
Ray
d41e3141f1 REVIEWED: Added SetTextLineSpacing() to multiline examples 2023-09-02 11:48:19 +02:00
Asdqwe
927a030bbf
Fix examples/shapes/shapes_collision_area.c help instructions (#3279) 2023-08-30 22:43:19 +02:00
Asdqwe
3d0d54e070
Fix examples/shaders/shaders_texture_outline.c help instructions (#3278) 2023-08-30 22:42:01 +02:00
Asdqwe
fefe8fcda9
Fix examples/others/easings_testbed.c help instructions and small tweak (#3277) 2023-08-30 22:40:49 +02:00
Asdqwe
46bac461ce
Add examples/shaders/shaders_lightmap.c to Makefiles (#3276) 2023-08-30 22:40:24 +02:00
Asdqwe
1d2b43402e
Remove a duplicated screenshot and add missing one (#3275) 2023-08-30 22:39:44 +02:00
Asdqwe
752baac00c
Update examples/models/models_loading_gltf.png;m3d.png screenshots (#3273) 2023-08-29 19:28:03 +02:00
Asdqwe
d047597244
Fix example/audio/audio_module_player.c help instructions and small bug (#3272)
* Fix example/audio/audio_module_player.c help instructions and small bug

* Update example/audio/audio_module_player.png screenshot
2023-08-29 19:04:27 +02:00
Ethan Conneely
fc0d132566
Remove e from secondes (#3270) 2023-08-28 22:49:45 +02:00
Asdqwe
de3dc94d5b
Fix example/models/models_loading_m3d.c controls (#3269) 2023-08-27 21:15:02 +02:00
Asdqwe
9393500bff
Fix example/models/models_loading_gltf.c controls (#3268) 2023-08-27 21:14:20 +02:00
ubkp
016b7d0a3a
Fix text_unicode.c example crashing (#3250)
* Fix text_unicode.c example crashing

* Adjust the text_unicode.c example crashing fix
2023-08-19 13:43:00 +02:00
ubkp
e0afb8942e
Fix examples/others/rlgl_standalone.c compilation issue (#3242) 2023-08-14 21:55:13 +02:00
Jeffery Myers
62f5382d56
[AUDIO] Add an example of how to use LoadSoundAlias (#3223)
* Add a function to clone a sound and share data with another sound.

* rename items based on feedback

* PR Feedback, use custom unload for sound alias, not variant of normal sound unloading

* sound_multi example
2023-08-04 17:14:04 +02:00
Ray
86f95d7150 Reviewed C compilation issues and formatting 2023-07-16 13:24:49 +02:00
ubkp
b980268ba7
[example] Core Input Gestures for Web (#3172)
* [example] Core Input Gestures for Web

* Fix Doubletap for web

* Changes TAP_TIMEOUT and rgGetCurrentTime to seconds
2023-07-16 13:07:29 +02:00
Wytek01
3c4ce9c99b
Update examples_template.c to raylib 4.5 (#3156) 2023-07-05 16:39:38 +02:00
Ray
225b4fb3e2 REVIEWED: Vector2Angle() 2023-07-04 16:58:43 +02:00
Ray
fdc28fce80 Reviewed vector2angle example 2023-07-02 20:05:15 +02:00
Ray
e8af875756 Minor format tweak, another issue introduced... 2023-07-02 18:54:50 +02:00
Gisteron
64bb2fe3ec
fix vector angle example mode 0 circle segment drawing (#3150) 2023-07-02 18:51:27 +02:00
Ray
5361d498c3 WARNING: REDESIGN: Vector2Angle()<-->Vector2LineAngle() #2887 2023-07-02 17:27:38 +02:00
iacore
7392c4b0c5
Better examples/core_input_gamepad (#3110)
* examples/core_input_gamepad: Add visuals for LT,RT

* examples/core_input_gamepad: arrows left/right to choose gamepad

* Style change
2023-06-14 20:46:10 +02:00
Ray
6aada7d5ec Updated examples to raygui 4.0-dev 2023-06-09 18:07:25 +02:00
Dane Madsen
e465ed0850
Added ImageRotate (#3078)
* Added ImageRotate

* Quick rename of the example

* Update ImageRotate by changing doubles to floats and checking code convention

* Update API
2023-05-24 09:22:51 +02:00
Dane Madsen
a4a6d4da8a
Add GenImageGradientSquare (#3077)
* Add GenImageGradientSquare to allow square gradients

* Fix GenImageGradientSquare and add to textures_image_generation example

* Remove params from GenImageGradientSquare
2023-05-22 15:20:28 +02:00
Dane Madsen
e96dc46d38
Replaced GenImageGradientH and GenImageGradientV with GenImageLinearGradient (#3074)
* Replaced GenImageGradientH and GenImageGradientV with GenImageLinearGradient

* renamed GenImageLinearGradient to GenImageGradientLinear
2023-05-21 11:33:47 +02:00
Gamer-Kold
6b92d71ea1
Reverted commits that deprecated the build.zig files, and added a note to all of them stating version of zig they were using (#3060)
* Revert "Fixed broken build.zig files. Now works with latest stable compiler (as of commit, latest is 0.10.1) (#3045)"

This reverts commit de748dfffe so that zig
build script works with master branch of zig.

* Added a note to build.zig files that denotes what version of zig they have been tested with.

* Standardised the note in the build.zig files
2023-05-15 11:23:36 +02:00
Alfred Reinold Baudisch
53b7b26c45
Added ModelAnimation.name, initially with GLTF animation names loaded (#3044) 2023-05-07 10:33:14 +02:00
Ray
5573f0f1c7 REVIEWED: Ligthmap example 2023-05-04 20:35:20 +02:00
Jussi Viitala
abcbd9817e
Lightmap example. (#3043) 2023-05-04 20:21:35 +02:00
Ray
a4a5a798bd Update rlgl_compute_shader.c 2023-05-01 14:03:32 +02:00
star-tek-mb
ed2caa1277
fix for latest zig master (#3037) 2023-05-01 11:02:34 +02:00
Mingjie Shen
7b7c0c83ef
Fix offset used before range check (#3021)
This use of offset 'i' should follow the range check.
2023-04-22 10:13:11 +02:00
Mansour Quddus
4f43ceb0d2
add missing space in one of the cameraDescriptions (#2977) 2023-03-21 08:31:29 +01:00
Ray
2e02474b7a Update core_loading_thread.c 2023-03-19 11:25:29 +01:00
Ray
54ccb18e87 Update write_depth.fs 2023-03-14 13:39:33 +01:00