Skip to content

Commit c74aa74

Browse files
authored
Merge branch 'raysan5:master' into master
2 parents f24c58a + 7103703 commit c74aa74

138 files changed

Lines changed: 1500 additions & 639 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/update_examples.yml

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: windows-latest
14+
runs-on: ubuntu-latest
1515

1616
steps:
1717
- name: Checkout
@@ -22,49 +22,51 @@ jobs:
2222
with:
2323
version: 'latest'
2424
actions-cache-folder: 'emsdk-cache'
25-
26-
- name: Setup MSBuild
27-
uses: microsoft/setup-msbuild@v2
28-
25+
2926
- name: Clone raylib.com repo to update files
30-
env:
31-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
run: |
33-
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/raysan5/raylib.com.git
34-
shell: cmd
35-
36-
- name: Build and run rexm tool (VS2022 solution)
37-
# rexm should update all required files in raylib and even raylib.com repo,
38-
# but not sure if it can do that from an Action, maybe it requires manual copy
3927
run: |
40-
cd tools/rexm/VS2022
41-
msbuild.exe rexm.sln /target:rexm /property:Configuration=Release /property:Platform=x64
42-
cd ../../..
43-
set REXM_EXAMPLES_BASE_PATH="examples"
44-
set REXM_EXAMPLES_WEB_PATH="../raylib.com/examples"
45-
set REXM_EXAMPLES_TEMPLATE_FILE_PATH="examples/examples_template.c"
46-
set REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="examples/examples_template.png"
47-
set REXM_EXAMPLES_COLLECTION_FILE_PATH="examples/examples_list.txt"
48-
set REXM_EXAMPLES_VS2022_SLN_FILE="projects/VS2022/raylib.sln"
49-
set EMSDK_PATH="D:/a/raylib/raylib/emsdk-cache/emsdk-main"
50-
.\tools\rexm\VS2022\build\rexm\bin\x64\Release\rexm.exe update
51-
cd ../..
52-
shell: cmd
53-
54-
- name: Commit changes to raylib repo
28+
git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/raysan5/raylib.com.git
29+
shell: bash
30+
31+
- name: Build and run rexm tool (requires GNU Makefile)
32+
# "rexm update" validates and updates all required examples in raylib and even raylib.com repos,
33+
# note that it calls examples/Makefile.Web internally, so it requires [make] tool available
5534
run: |
56-
#git config user.name "github-actions[bot]"
57-
#git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
58-
#git add -A
59-
#git commit -m "Update examples collection"
60-
#git push
35+
sudo apt-get update && sudo apt-get install -y libopengl0 libglu1-mesa libx11-dev libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libgl1-mesa-dev libglu1-mesa-dev
36+
cd "${{ github.workspace }}/src"
37+
make PLATFORM=PLATFORM_DESKTOP
38+
sudo make install
39+
make clean
40+
make PLATFORM=PLATFORM_WEB
41+
cd ../tools/rexm/
42+
make
43+
export REXM_EXAMPLES_BASE_PATH="${{ github.workspace }}/examples"
44+
export REXM_EXAMPLES_WEB_PATH="${{ github.workspace }}/raylib.com/examples"
45+
export REXM_EXAMPLES_TEMPLATE_FILE_PATH="${{ github.workspace }}/examples/examples_template.c"
46+
export REXM_EXAMPLES_TEMPLATE_SCREENSHOT_PATH="${{ github.workspace }}/examples/examples_template.png"
47+
export REXM_EXAMPLES_COLLECTION_FILE_PATH="${{ github.workspace }}/examples/examples_list.txt"
48+
export REXM_EXAMPLES_VS2022_SLN_FILE="${{ github.workspace }}/projects/VS2022/raylib.sln"
49+
export EMSDK_PATH="${{ github.workspace }}/emsdk-cache/emsdk-main"
50+
./rexm update
51+
shell: bash
6152

62-
- name: Push changes to raylib.com repo
53+
- name: Commit changes to raylib repo (DISABLED)
54+
if: github.event_name == 'push' && false
6355
env:
6456
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6557
run: |
66-
#git config --global user.name "github-actions[bot]"
67-
#git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
68-
#git add examples
69-
#git commit -m "Update web examples"
70-
#git push origin
58+
git config --global user.name "github-actions[bot]"
59+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
60+
git add -A
61+
git commit -m "Update examples collection" || echo "git exited with code 1, nothing changed"
62+
git push
63+
shell: bash
64+
65+
- name: Push changes to raylib.com repo (DISABLED)
66+
if: github.event_name == 'push' && false
67+
run: |
68+
cd raylib.com
69+
git add -A
70+
git commit -m "Update web examples" || echo "git exited with code 1, nothing changed"
71+
git push origin
72+
shell: bash

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,6 @@ tools/parser/raylib_parser
116116
tools/rexm/rexm.exe
117117
tools/rexm/rexm
118118

119+
# CI
120+
emsdk-cache/
121+
raylib.com/

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ const config_h_flags = outer: {
9999
break :outer flags[0..i].*;
100100
};
101101

102-
fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
102+
pub fn compileRaylib(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, options: Options) !*std.Build.Step.Compile {
103103
var raylib_flags_arr: std.ArrayList([]const u8) = .empty;
104104
defer raylib_flags_arr.deinit(b.allocator);
105105

examples/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ CORE = \
507507
core/core_3d_camera_free \
508508
core/core_3d_camera_mode \
509509
core/core_3d_camera_split_screen \
510-
core/core_3d_fps_controller \
510+
core/core_3d_camera_fps \
511511
core/core_3d_picking \
512512
core/core_automation_events \
513513
core/core_basic_screen_manager \
@@ -599,6 +599,7 @@ TEXT = \
599599
text/text_raylib_fonts \
600600
text/text_rectangle_bounds \
601601
text/text_unicode \
602+
text/text_unicode_ranges \
602603
text/text_writing_anim
603604

604605
MODELS = \

examples/Makefile.Web

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ CORE = \
507507
core/core_3d_camera_free \
508508
core/core_3d_camera_mode \
509509
core/core_3d_camera_split_screen \
510-
core/core_3d_fps_controller \
510+
core/core_3d_camera_fps \
511511
core/core_3d_picking \
512512
core/core_automation_events \
513513
core/core_basic_screen_manager \
@@ -599,6 +599,7 @@ TEXT = \
599599
text/text_raylib_fonts \
600600
text/text_rectangle_bounds \
601601
text/text_unicode \
602+
text/text_unicode_ranges \
602603
text/text_writing_anim
603604

604605
MODELS = \
@@ -703,7 +704,7 @@ core/core_3d_camera_mode: core/core_3d_camera_mode.c
703704
core/core_3d_camera_split_screen: core/core_3d_camera_split_screen.c
704705
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
705706

706-
core/core_3d_fps_controller: core/core_3d_fps_controller.c
707+
core/core_3d_camera_fps: core/core_3d_camera_fps.c
707708
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
708709

709710
core/core_3d_picking: core/core_3d_picking.c
@@ -999,14 +1000,14 @@ text/text_input_box: text/text_input_box.c
9991000

10001001
text/text_raylib_fonts: text/text_raylib_fonts.c
10011002
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
1002-
--preload-file text/resources/fonts/alagard.png@resources/fonts/alagard.png \
1003-
--preload-file text/resources/fonts/pixelplay.png@resources/fonts/pixelplay.png \
1004-
--preload-file text/resources/fonts/mecha.png@resources/fonts/mecha.png \
1005-
--preload-file text/resources/fonts/setback.png@resources/fonts/setback.png \
1006-
--preload-file text/resources/fonts/romulus.png@resources/fonts/romulus.png \
1007-
--preload-file text/resources/fonts/pixantiqua.png@resources/fonts/pixantiqua.png \
1008-
--preload-file text/resources/fonts/alpha_beta.png@resources/fonts/alpha_beta.png \
1009-
--preload-file text/resources/fonts/jupiter_crash.png@resources/fonts/jupiter_crash.png
1003+
--preload-file text/resources/sprite_fonts/alagard.png@resources/sprite_fonts/alagard.png \
1004+
--preload-file text/resources/sprite_fonts/pixelplay.png@resources/sprite_fonts/pixelplay.png \
1005+
--preload-file text/resources/sprite_fonts/mecha.png@resources/sprite_fonts/mecha.png \
1006+
--preload-file text/resources/sprite_fonts/setback.png@resources/sprite_fonts/setback.png \
1007+
--preload-file text/resources/sprite_fonts/romulus.png@resources/sprite_fonts/romulus.png \
1008+
--preload-file text/resources/sprite_fonts/pixantiqua.png@resources/sprite_fonts/pixantiqua.png \
1009+
--preload-file text/resources/sprite_fonts/alpha_beta.png@resources/sprite_fonts/alpha_beta.png \
1010+
--preload-file text/resources/sprite_fonts/jupiter_crash.png@resources/sprite_fonts/jupiter_crash.png
10101011

10111012
text/text_rectangle_bounds: text/text_rectangle_bounds.c
10121013
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
@@ -1017,6 +1018,10 @@ text/text_unicode: text/text_unicode.c
10171018
--preload-file text/resources/noto_cjk.fnt@resources/noto_cjk.fnt \
10181019
--preload-file text/resources/symbola.fnt@resources/symbola.fnt
10191020

1021+
text/text_unicode_ranges: text/text_unicode_ranges.c
1022+
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) \
1023+
--preload-file text/resources/NotoSansTC-Regular.ttf@resources/NotoSansTC-Regular.ttf
1024+
10201025
text/text_writing_anim: text/text_writing_anim.c
10211026
$(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM)
10221027

examples/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You may find it easier to use than other toolchains, especially when it comes to
1616
- `zig build [module]` to compile all examples for a module (e.g. `zig build core`)
1717
- `zig build [example]` to compile _and run_ a particular example (e.g. `zig build core_basic_window`)
1818

19-
## EXAMPLES COLLECTION [TOTAL: 161]
19+
## EXAMPLES COLLECTION [TOTAL: 162]
2020

2121
### category: core [37]
2222

@@ -40,7 +40,7 @@ Examples using raylib[core](../src/rcore.c) platform functionality like window c
4040
| [core_3d_camera_free](core/core_3d_camera_free.c) | <img src="core/core_3d_camera_free.png" alt="core_3d_camera_free" width="80"> | ⭐☆☆☆ | 1.3 | 1.3 | [Ramon Santamaria](https://github.com/raysan5) |
4141
| [core_3d_camera_first_person](core/core_3d_camera_first_person.c) | <img src="core/core_3d_camera_first_person.png" alt="core_3d_camera_first_person" width="80"> | ⭐⭐☆☆ | 1.3 | 1.3 | [Ramon Santamaria](https://github.com/raysan5) |
4242
| [core_3d_camera_split_screen](core/core_3d_camera_split_screen.c) | <img src="core/core_3d_camera_split_screen.png" alt="core_3d_camera_split_screen" width="80"> | ⭐⭐⭐☆ | 3.7 | 4.0 | [Jeffery Myers](https://github.com/JeffM2501) |
43-
| [core_3d_fps_controller](core/core_3d_fps_controller.c) | <img src="core/core_3d_fps_controller.png" alt="core_3d_fps_controller" width="80"> | ⭐⭐⭐☆ | 5.5 | 5.5 | [Agnis Aldins](https://github.com/nezvers) |
43+
| [core_3d_camera_fps](core/core_3d_camera_fps.c) | <img src="core/core_3d_camera_fps.png" alt="core_3d_camera_fps" width="80"> | ⭐⭐⭐☆ | 5.5 | 5.5 | [Agnis Aldins](https://github.com/nezvers) |
4444
| [core_3d_picking](core/core_3d_picking.c) | <img src="core/core_3d_picking.png" alt="core_3d_picking" width="80"> | ⭐⭐☆☆ | 1.3 | 4.0 | [Ramon Santamaria](https://github.com/raysan5) |
4545
| [core_world_screen](core/core_world_screen.c) | <img src="core/core_world_screen.png" alt="core_world_screen" width="80"> | ⭐⭐☆☆ | 1.3 | 1.4 | [Ramon Santamaria](https://github.com/raysan5) |
4646
| [core_custom_logging](core/core_custom_logging.c) | <img src="core/core_custom_logging.png" alt="core_custom_logging" width="80"> | ⭐⭐⭐☆ | 2.5 | 2.5 | [Pablo Marcos Oltra](https://github.com/pamarcos) |
@@ -122,7 +122,7 @@ Examples using raylib textures functionality, including image/textures loading/g
122122
| [textures_image_rotate](textures/textures_image_rotate.c) | <img src="textures/textures_image_rotate.png" alt="textures_image_rotate" width="80"> | ⭐⭐☆☆ | 1.0 | 1.0 | [Ramon Santamaria](https://github.com/raysan5) |
123123
| [textures_textured_curve](textures/textures_textured_curve.c) | <img src="textures/textures_textured_curve.png" alt="textures_textured_curve" width="80"> | ⭐⭐⭐☆ | 4.5 | 4.5 | [Jeffery Myers](https://github.com/JeffM2501) |
124124

125-
### category: text [12]
125+
### category: text [13]
126126

127127
Examples using raylib text functionality, including sprite fonts loading/generation and text drawing, provided by raylib [text](../src/rtext.c) module.
128128

@@ -140,6 +140,7 @@ Examples using raylib text functionality, including sprite fonts loading/generat
140140
| [text_unicode](text/text_unicode.c) | <img src="text/text_unicode.png" alt="text_unicode" width="80"> | ⭐⭐⭐⭐️ | 2.5 | 4.0 | [Vlad Adrian](https://github.com/demizdor) |
141141
| [text_draw_3d](text/text_draw_3d.c) | <img src="text/text_draw_3d.png" alt="text_draw_3d" width="80"> | ⭐⭐⭐⭐️ | 3.5 | 4.0 | [Vlad Adrian](https://github.com/demizdor) |
142142
| [text_codepoints_loading](text/text_codepoints_loading.c) | <img src="text/text_codepoints_loading.png" alt="text_codepoints_loading" width="80"> | ⭐⭐⭐☆ | 4.2 | 4.2 | [Ramon Santamaria](https://github.com/raysan5) |
143+
| [text_unicode_ranges](text/text_unicode_ranges.c) | <img src="text/text_unicode_ranges.png" alt="text_unicode_ranges" width="80"> | ⭐⭐⭐⭐️ | 2.5 | 4.0 | [Vlad Adrian](https://github.com/demizdor) |
143144

144145
### category: models [23]
145146

examples/audio/audio_mixed_processor.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ int main(void)
5555
const int screenWidth = 800;
5656
const int screenHeight = 450;
5757

58-
InitWindow(screenWidth, screenHeight, "raylib [audio] example - processing mixed output");
58+
InitWindow(screenWidth, screenHeight, "raylib [audio] example - mixed audio processing");
5959

6060
InitAudioDevice(); // Initialize audio device
6161

examples/audio/audio_module_playing.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************************
22
*
3-
* raylib [audio] example - Module playing (streaming)
3+
* raylib [audio] example - module playing (streaming)
44
*
55
* Example complexity rating: [★☆☆☆] 1/4
66
*

examples/audio/audio_music_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************************
22
*
3-
* raylib [audio] example - Music playing (streaming)
3+
* raylib [audio] example - music playing (streaming)
44
*
55
* Example complexity rating: [★☆☆☆] 1/4
66
*

examples/audio/audio_raw_stream.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*******************************************************************************************
22
*
3-
* raylib [audio] example - Raw audio streaming
3+
* raylib [audio] example - raw audio streaming
44
*
55
* Example complexity rating: [★★★☆] 3/4
66
*

0 commit comments

Comments
 (0)