From 077ab6d56bea4fc464cd5c07e02071e911eac64a Mon Sep 17 00:00:00 2001 From: Dalton Overmyer Date: Thu, 29 Feb 2024 11:26:49 -0600 Subject: [PATCH] Add an example that generates a random sequence. (#3846) --- examples/Makefile | 1 + examples/Makefile.Web | 4 + examples/README.md | 1 + examples/core/core_random_sequence.c | 176 ++++++++ examples/core/core_random_sequence.png | Bin 0 -> 34025 bytes .../examples/core_random_sequence.vcxproj | 387 ++++++++++++++++++ projects/VS2022/raylib.sln | 2 + 7 files changed, 571 insertions(+) create mode 100644 examples/core/core_random_sequence.c create mode 100644 examples/core/core_random_sequence.png create mode 100644 projects/VS2022/examples/core_random_sequence.vcxproj diff --git a/examples/Makefile b/examples/Makefile index 8362b8c8..9ce05da5 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -453,6 +453,7 @@ CORE = \ core/core_input_mouse_wheel \ core/core_input_multitouch \ core/core_loading_thread \ + core/core_random_sequence \ core/core_random_values \ core/core_scissor_test \ core/core_smooth_pixelperfect \ diff --git a/examples/Makefile.Web b/examples/Makefile.Web index 204db50c..af3325aa 100644 --- a/examples/Makefile.Web +++ b/examples/Makefile.Web @@ -359,6 +359,7 @@ CORE = \ core/core_input_mouse_wheel \ core/core_input_multitouch \ core/core_loading_thread \ + core/core_random_sequence \ core/core_random_values \ core/core_scissor_test \ core/core_smooth_pixelperfect \ @@ -588,6 +589,9 @@ core/core_input_multitouch: core/core_input_multitouch.c core/core_loading_thread: core/core_loading_thread.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) -sUSE_PTHREADS=1 +core/core_random_sequence: core/core_random_sequence.c + $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) + core/core_random_values: core/core_random_values.c $(CC) -o $@$(EXT) $< $(CFLAGS) $(INCLUDE_PATHS) $(LDFLAGS) $(LDLIBS) -D$(PLATFORM) diff --git a/examples/README.md b/examples/README.md index 0fed8acd..94f5369d 100644 --- a/examples/README.md +++ b/examples/README.md @@ -55,6 +55,7 @@ Examples using raylib core platform functionality like window creation, inputs, | 29 | [core_custom_frame_control](core/core_custom_frame_control.c) | core_custom_frame_control | ⭐️⭐️⭐️⭐️ | **4.0** | **4.0** | [Ray](https://github.com/raysan5) | | 30 | [core_smooth_pixelperfect](core/core_smooth_pixelperfect.c) | core_smooth_pixelperfect | ⭐️⭐️⭐️☆ | 3.7 | **4.0** | [Giancamillo Alessandroni](https://github.com/NotManyIdeasDev) | | 31 | [core_window_should_close](core/core_window_should_close.c) | core_window_should_close | ⭐️⭐️☆☆ | **4.2** | **4.2** | [Ray](https://github.com/raysan5) | +| 32 | [core_random_sequence](core/core_random_sequence.c) | core_random_sequence | ⭐️☆☆☆ | **5.0** | **5.0** | [REDl3east](https://github.com/REDl3east) | ### category: shapes diff --git a/examples/core/core_random_sequence.c b/examples/core/core_random_sequence.c new file mode 100644 index 00000000..c946b64d --- /dev/null +++ b/examples/core/core_random_sequence.c @@ -0,0 +1,176 @@ +/******************************************************************************************* +* +* raylib [core] example - Generates a random sequence +* +* Example originally created with raylib 5.0, last time updated with raylib 5.0 +* +* Example contributed by Dalton Overmyer (@REDl3east) and reviewed by Ramon Santamaria (@raysan5) +* +* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified, +* BSD-like license that allows static linking with closed source software +* +* Copyright (c) 2023 Dalton Overmyer (@REDl3east) +* +********************************************************************************************/ + +#include "raylib.h" +#include "raymath.h" + +#include // Required for: malloc() and free() + +typedef struct ColorRect{ + Color c; + Rectangle r; +} ColorRect; + +static Color GenerateRandomColor(); +static ColorRect* GenerateRandomColorRectSequence(float rectCount, float rectWidth, float screenWidth, float screenHeight); +static void ShuffleColorRectSequence(ColorRect* rectangles, int rectCount); +static void DrawTextCenterKeyHelp(const char* key, const char* text, int posX, int posY, int fontSize, Color color); + +//------------------------------------------------------------------------------------ +// Program main entry point +//------------------------------------------------------------------------------------ +int main(void) { + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + InitWindow(screenWidth, screenHeight, "raylib [core] example - Generates a random sequence"); + + int rectCount = 20; + float rectSize = (float)screenWidth/rectCount; + ColorRect* rectangles = GenerateRandomColorRectSequence(rectCount, rectSize, screenWidth, 0.75f * screenHeight); + + SetTargetFPS(60); + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!WindowShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + + if(IsKeyPressed(KEY_SPACE)) + { + ShuffleColorRectSequence(rectangles, rectCount); + } + + if(IsKeyPressed(KEY_UP)) + { + rectCount++; + rectSize = (float)screenWidth/rectCount; + free(rectangles); + rectangles = GenerateRandomColorRectSequence(rectCount, rectSize, screenWidth, 0.75f * screenHeight); + } + + if(IsKeyPressed(KEY_DOWN)) + { + if(rectCount >= 4){ + rectCount--; + rectSize = (float)screenWidth/rectCount; + free(rectangles); + rectangles = GenerateRandomColorRectSequence(rectCount, rectSize, screenWidth, 0.75f * screenHeight); + } + } + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + int fontSize = 20; + for(int x=0;xc = r2->c; + r1->r.height = r2->r.height; + r1->r.y = r2->r.y; + r2->c = tmp.c; + r2->r.height = tmp.r.height; + r2->r.y = tmp.r.y; + + } + UnloadRandomSequence(seq); +} + +static void DrawTextCenterKeyHelp(const char* key, const char* text, int posX, int posY, int fontSize, Color color) +{ + int spaceSize = MeasureText(" ", fontSize); + int pressSize = MeasureText("Press", fontSize); + int keySize = MeasureText(key, fontSize); + int textSize = MeasureText(text, fontSize); + int totalSize = pressSize + 2 * spaceSize + keySize + 2 * spaceSize + textSize; + int textSizeCurrent = 0; + + DrawText("Press", posX, posY, fontSize, color); + textSizeCurrent += pressSize + 2 * spaceSize; + DrawText(key, posX + textSizeCurrent, posY, fontSize, RED); + DrawRectangle(posX + textSizeCurrent, posY + fontSize, keySize, 3, RED); + textSizeCurrent += keySize + 2 * spaceSize; + DrawText(text, posX + textSizeCurrent, posY, fontSize, color); +} \ No newline at end of file diff --git a/examples/core/core_random_sequence.png b/examples/core/core_random_sequence.png new file mode 100644 index 0000000000000000000000000000000000000000..206aa8b4021ee2acd8e3ef2b8d8f999e698b357e GIT binary patch literal 34025 zcmeHwc{r4N|Nj`M0TCZax^9T^Jz~CKdH-VaS*L- z(g=Bl?B(TqGLM7H@qoYeCs>;1(F*y@yZ)iWFhQfT!dc^v&RMc@1e+pNfcE7Z6E~>sk@$;Q5j8(1wK1-E31V3=gYa`fYaDrkz^R(~llKinn3&sR+~Ou30H&V2Xv0 z--HieCS1(Ly(O-%$hY=Z9h)7zwhKR-_4!Q$_ZIV0u;uYh%WzCr_P{ z6%q=(!XIBuuu$RwJB5IDJ=BtvA*ftd8o(N2Ki1-y$`_SBdpv23clu1%?7{kKvJTU@ z+LrO1@3fVdmv{8ou}MG1@;IgK+qWD$#a8sNxR|B<2zwU|vO;e!0Ru_c1jb44)=zr! zH&XzM{rugnW6uYkK@KI?B<%_6-Es1j_u|YL7g?i<&#*)eOqcRFi7BdKq|PW9AT&-_u$iyhyRtlzJR z$kQ~X@h;DQXelV9Z?Ak1CXN>pKLJLo&`5=Tg6l1nPTUN7T(TI-J?<7e15F`7)xPyG zAvnm2IpRa5S-D@Jhpw)Tsp)Q6O%rKatamF-rhRY$C|(Asp5IYyN)F&#nj?0Rvy8Bn zO)a`XGW6~*DxZ>J27{BdZv0~tBCJ8zbmX6b?v(a6Q6ETfFxX?wCBW6GXfe4n`0Y~n zgl<7eR)4@Uc}}p1yGQwG1(K;shS?_czTTbpm5grInh!NUdu`eJd=rlDBtHj-2(K!y z2#3S|B|3(B^!#Fh=6ru&Y?*#ZZB98*?S-sH1{RP&D+DKkg52~EW8 zWgM@VojCJuV)h>CVYMfBNkEgObG*i@zz-;L!FBS|B>ma(i=XkE^HR+%x|LDdo8uJ^ z9#Z@eVRT`_yXxWgb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#J4r*hU=B?1!Dq=`aAfM-UjH6o# zE$1Bv*hv;2Kjtvc60?I~fN@#tOh=n4j+W=Sg|R&jcx7daTYDTOc>aqny=LiQQib|~6*p>ln4Nu9X%-el}m}m<`)pb~>%> zww2?y6K6YkPdSt8$j!k`!NZ~L*~agOcQaaXp%*wyEyN{(&aQN{$uLs$nMQ0X4UA0% z2`-EB-f{0@Ge{_l-sx>uWBRd<6Rwj$UeO>34~JFd=>&sy-fs#TzQAxgJjYjWD$`(fE~UJ z%sI?QJ-?zj==YJRnVu357&&UrJ>c!m2T%xw)(nAT-dDpL+>8_IlFK-^7!!|j0vlqp zbZD&1Rj!g@elycq$MGvRv$f25a!+b03`-NnB>{-GqK-lmJcl`b3KIy^9~C;Bq3t$o z5E?Nty*>5=uRk43rkZdUD&mhH^DYBY*j}0EiQ=HwuP2LpBN+lK_u7x8(KoBg#Ui<| zK&PLJ;>x!~06>^LTmAPIEu;C}oQxT&guN6A+EdLlQFb;0RK$0W}X$RfWJuv=ZW zbrA{4dx}B!-W)5rsPRBY?gFMEgYe2T6=pu&xaFFQ(gx2hF zWek(B?-7a<#;HvS&S65ntmp?i0m9ycK1VeS%b7@M`iV>1AQGOYuc zl*GhD?n~f_9EV!J*!P$a4uE_CcnicTZvkre#l7vpF!H$qZ={WaT08Q2Gc3(LawTUX z`Ga=FqV>{CC8E*$ean*9sv>B^H6L)$>L*b>U!A%T00&XCgHsDj;`Aty(FDp1#|*k7 zfLzr%APtH9IzWkCkz0hLV+kkPvWj;)fZ24`j*5!H-O{_a`iweY+`uz%mZy{kV|xJd zB=(0dBw`Nw|0Yj#R>%SKJHcH%IFJU=lls>0A}=9^RqiC|&3Eqrz5w36@VDH_&lG9; qb?|dzi1ts3So_~URsWb>2Lu{zc#DV*V^jbE|IoWlbc?m^F8n_p_Ql8m literal 0 HcmV?d00001 diff --git a/projects/VS2022/examples/core_random_sequence.vcxproj b/projects/VS2022/examples/core_random_sequence.vcxproj new file mode 100644 index 00000000..59e1bfc1 --- /dev/null +++ b/projects/VS2022/examples/core_random_sequence.vcxproj @@ -0,0 +1,387 @@ + + + + + Debug.DLL + Win32 + + + Debug.DLL + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release.DLL + Win32 + + + Release.DLL + x64 + + + Release + Win32 + + + Release + x64 + + + + {6B8BAAF1-75C7-4C68-80B8-0E2A9EABBD9A} + Win32Proj + core_random_sequence + 10.0 + core_random_sequence + + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + Application + false + $(DefaultPlatformToolset) + true + Unicode + + + Application + false + $(DefaultPlatformToolset) + true + Unicode + + + Application + false + $(DefaultPlatformToolset) + true + Unicode + + + Application + false + $(DefaultPlatformToolset) + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + true + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + true + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + true + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + false + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + false + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + false + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + false + $(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)\ + $(SolutionDir)\build\$(ProjectName)\obj\$(Platform)\$(Configuration)\ + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\core + WindowsLocalDebugger + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) + CompileAsC + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) + CompileAsC + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + /FS %(AdditionalOptions) + + + Console + true + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) + CompileAsC + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)" + Copy Debug DLL to output directory + + + + + + + Level3 + Disabled + WIN32;_DEBUG;_CONSOLE;PLATFORM_DESKTOP;%(PreprocessorDefinitions) + CompileAsC + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + + + Console + true + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + + + xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)" + Copy Debug DLL to output directory + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsC + true + + + Console + true + true + true + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsC + true + + + Console + true + true + true + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsC + true + + + Console + true + true + true + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + + + xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)" + + + Copy Release DLL to output directory + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);PLATFORM_DESKTOP + $(SolutionDir)..\..\src;%(AdditionalIncludeDirectories) + CompileAsC + true + + + Console + true + true + true + raylib.lib;opengl32.lib;kernel32.lib;user32.lib;gdi32.lib;winmm.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\ + + + xcopy /y /d "$(SolutionDir)\build\raylib\bin\$(Platform)\$(Configuration)\raylib.dll" "$(SolutionDir)\build\$(ProjectName)\bin\$(Platform)\$(Configuration)" + + + Copy Release DLL to output directory + + + + + + + + {e89d61ac-55de-4482-afd4-df7242ebc859} + + + + + + \ No newline at end of file diff --git a/projects/VS2022/raylib.sln b/projects/VS2022/raylib.sln index 3ce44a9a..c9f50f6b 100644 --- a/projects/VS2022/raylib.sln +++ b/projects/VS2022/raylib.sln @@ -53,6 +53,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_input_multitouch", "ex EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_loading_thread", "examples\core_loading_thread.vcxproj", "{F026020F-7B00-40C8-91C3-5DE85EC45A95}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_random_sequence", "examples\core_random_sequence.vcxproj", "{6B8BAAF1-75C7-4C68-80B8-0E2A9EABBD9A}" +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_random_values", "examples\core_random_values.vcxproj", "{6B8BAAF1-75C7-4C68-80B8-0E2A9EABBD9A}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core_scissor_test", "examples\core_scissor_test.vcxproj", "{59089B0C-AAB4-4532-B294-44DEAE7178B7}"