From 333eead97b8b7b2dea11d4340dfedad9fcacb1a8 Mon Sep 17 00:00:00 2001 From: Jordi Santonja Blanes Date: Sun, 12 Oct 2025 07:52:54 +0200 Subject: [PATCH] [Examples] Added shapes_particles --- examples/shapes/shapes_particles.c | 264 ++++++++ examples/shapes/shapes_particles.png | Bin 0 -> 8052 bytes .../VS2022/examples/shapes_particles.vcxproj | 569 ++++++++++++++++++ projects/VS2022/raylib.sln | 2 + 4 files changed, 835 insertions(+) create mode 100644 examples/shapes/shapes_particles.c create mode 100644 examples/shapes/shapes_particles.png create mode 100644 projects/VS2022/examples/shapes_particles.vcxproj diff --git a/examples/shapes/shapes_particles.c b/examples/shapes/shapes_particles.c new file mode 100644 index 000000000..54033730b --- /dev/null +++ b/examples/shapes/shapes_particles.c @@ -0,0 +1,264 @@ +/******************************************************************************************* +* +* raylib [shapes] example - particles +* +* Example complexity rating: [★☆☆☆] 1/4 +* +* Example originally created with raylib 5.6, last time updated with raylib 5.6 +* +* Example contributed by Jordi Santonja (@JordSant) +* +* 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) 2025 Jordi Santonja (@JordSant) +* +********************************************************************************************/ + +#include "raylib.h" + +#include // Required for: calloc(), free() +#include // Required for: cosf(), sinf() + +#define MAX_PARTICLES 300 // Max number particles + +//---------------------------------------------------------------------------------- +// Types and Structures Definition +//---------------------------------------------------------------------------------- +typedef enum ParticleType { + WATER = 0, + SMOKE, + FIRE +} ParticleType; + +static const char particleTypesChar[3][10] = { "WATER", "SMOKE", "FIRE" }; + +typedef struct Particle { + Vector2 position; // Particle position on screen + Vector2 velocity; // Particle current speed and direction + bool alive; // Particle alive: inside screen and life time + float lifeTime; // Particle life time + ParticleType type; // Particle type (WATER, SMOKE, FIRE) + float radius; // Particle radius + Color color; // Particle color +} Particle; + +typedef struct CircularBuffer { + int head; // Index for the next write + int tail; // Index for the next read + Particle* buffer; // Particle buffer array +} CircularBuffer; + +//---------------------------------------------------------------------------------- +// Module Functions Declaration +//---------------------------------------------------------------------------------- +static Particle* AddToCircularBuffer(CircularBuffer* circularBuffer); +static void UpdateParticles(CircularBuffer* circularBuffer, int screenWidth, int screenHeight); +static void UpdateCircularBuffer(CircularBuffer* circularBuffer); +static void DrawParticles(CircularBuffer* circularBuffer); + +//------------------------------------------------------------------------------------ +// Program main entry point +//------------------------------------------------------------------------------------ +int main(void) +{ + // Initialization + //-------------------------------------------------------------------------------------- + const int screenWidth = 800; + const int screenHeight = 450; + + InitWindow(screenWidth, screenHeight, "raylib [shapes] example - particles"); + + // Definition of particles + Particle* particles = (Particle*)RL_CALLOC(MAX_PARTICLES, sizeof(Particle)); // Particle array + CircularBuffer circularBuffer = { 0, 0, particles }; + + // Particle emitter parameters + int emissionRate = 2; + ParticleType currentType = WATER; + Vector2 emitterPosition = { screenWidth / 2.0f, screenHeight / 2.0f }; + + SetTargetFPS(60); // Set our game to run at 60 frames-per-second + //-------------------------------------------------------------------------------------- + + // Main game loop + while (!WindowShouldClose()) // Detect window close button or ESC key + { + // Update + //---------------------------------------------------------------------------------- + // Emit new particles: when emissionRate is 1, emit every frame + if ((rand() % emissionRate) == 0) + { + Particle* newParticle = AddToCircularBuffer(&circularBuffer); + // If buffer is full, newParticle is NULL + if (newParticle != NULL) + { + // Fill particle properties + newParticle->position = emitterPosition; + newParticle->alive = true; + newParticle->lifeTime = 0.0f; + newParticle->type = currentType; + float speed = (float)(rand() % 10) / 5.0f; + switch (currentType) + { + case WATER: + newParticle->radius = 5.0f; + newParticle->color = BLUE; + break; + case SMOKE: + newParticle->radius = 7.0f; + newParticle->color = GRAY; + break; + case FIRE: + newParticle->radius = 10.0f; + newParticle->color = YELLOW; + speed /= 10.0f; + break; + default: + newParticle->radius = 5.0f; + newParticle->color = WHITE; + break; + } + float direction = (float)(rand() % 360); + newParticle->velocity = (Vector2){ speed * cosf(direction * DEG2RAD), speed * sinf(direction * DEG2RAD) }; + } + } + + // Update the parameters of each particle + UpdateParticles(&circularBuffer, screenWidth, screenHeight); + // Remove dead particles from the circular buffer + UpdateCircularBuffer(&circularBuffer); + + // Change Particle Emission Rate (UP/DOWN arrows) + if (IsKeyPressed(KEY_UP) && (emissionRate > 1)) + --emissionRate; + if (IsKeyPressed(KEY_DOWN)) + ++emissionRate; + + // Change Particle Type (LEFT/RIGHT arrows) + if (IsKeyPressed(KEY_RIGHT)) + (currentType == FIRE) ? currentType = WATER : ++currentType; + if (IsKeyPressed(KEY_LEFT)) + (currentType == WATER) ? currentType = FIRE : --currentType; + + //---------------------------------------------------------------------------------- + + // Draw + //---------------------------------------------------------------------------------- + BeginDrawing(); + + ClearBackground(RAYWHITE); + + // Call the function with a loop to draw all particles + DrawParticles(&circularBuffer); + + // Draw UI and Instructions + DrawRectangle(5, 5, 315, 75, Fade(SKYBLUE, 0.5f)); + DrawRectangleLines(5, 5, 315, 75, BLUE); + + DrawText("CONTROLS:", 15, 15, 10, BLACK); + DrawText("UP/DOWN: Change Particle Emission Rate", 15, 35, 10, BLACK); + DrawText("LEFT/RIGHT: Change Particle Type (Water, Smoke, Fire)", 15, 55, 10, BLACK); + + DrawText(TextFormat("Emission Rate: %d | Type: %s", emissionRate, particleTypesChar[currentType]), 15, 95, 10, DARKGRAY); + + DrawFPS(screenWidth - 80, 10); + + EndDrawing(); + //---------------------------------------------------------------------------------- + } + + // De-Initialization + //-------------------------------------------------------------------------------------- + RL_FREE(particles); // Free particles array data + + CloseWindow(); // Close window and OpenGL context + //-------------------------------------------------------------------------------------- + + return 0; +} + +//---------------------------------------------------------------------------------- +// Module Functions Definition +//---------------------------------------------------------------------------------- +static Particle* AddToCircularBuffer(CircularBuffer* circularBuffer) +{ + Particle* particle = NULL; + + // Check if buffer full + if (((circularBuffer->head + 1) % MAX_PARTICLES) != circularBuffer->tail) + { + // Add new particle to the head position and advance head + particle = &circularBuffer->buffer[circularBuffer->head]; + circularBuffer->head = (circularBuffer->head + 1) % MAX_PARTICLES; + } + + return particle; +} + +static void UpdateParticles(CircularBuffer* circularBuffer, int screenWidth, int screenHeight) +{ + for (int i = circularBuffer->tail; i != circularBuffer->head; i = (i + 1) % MAX_PARTICLES) + { + // Update particle life and positions + circularBuffer->buffer[i].lifeTime += 1.0f / 60.0f; // 60 FPS -> 1/60 seconds per frame + + switch (circularBuffer->buffer[i].type) + { + case WATER: + circularBuffer->buffer[i].position.x += circularBuffer->buffer[i].velocity.x; + circularBuffer->buffer[i].velocity.y += 0.2f; // Gravity + circularBuffer->buffer[i].position.y += circularBuffer->buffer[i].velocity.y; + break; + case SMOKE: + circularBuffer->buffer[i].position.x += circularBuffer->buffer[i].velocity.x; + circularBuffer->buffer[i].velocity.y -= 0.05f; // Upwards + circularBuffer->buffer[i].position.y += circularBuffer->buffer[i].velocity.y; + circularBuffer->buffer[i].radius += 0.5f; // Increment radius: smoke expands + circularBuffer->buffer[i].color.a -= 4; // Decrement alpha: smoke fades + if (circularBuffer->buffer[i].color.a < 4) // If alpha transparent, particle dies + circularBuffer->buffer[i].alive = false; + break; + case FIRE: + // Add a little horizontal oscillation to fire particles + circularBuffer->buffer[i].position.x += circularBuffer->buffer[i].velocity.x + cosf(circularBuffer->buffer[i].lifeTime * 10.0f); + circularBuffer->buffer[i].velocity.y -= 0.005f; // Upwards + circularBuffer->buffer[i].position.y += circularBuffer->buffer[i].velocity.y; + circularBuffer->buffer[i].radius -= 0.05f; // Decrement radius: fire shrinks + circularBuffer->buffer[i].color.g -= 1; // Decrement green: fire turns reddish starting from yellow + if (circularBuffer->buffer[i].radius <= 0.02f) // If radius too small, particle dies + circularBuffer->buffer[i].alive = false; + break; + default: break; + } + + // Disable particle when out of screen + if ((circularBuffer->buffer[i].position.x < 0) || + (circularBuffer->buffer[i].position.x > screenWidth) || + (circularBuffer->buffer[i].position.y < 0) || + (circularBuffer->buffer[i].position.y > screenHeight)) + circularBuffer->buffer[i].alive = false; + } +} +static void UpdateCircularBuffer(CircularBuffer* circularBuffer) +{ + // Update circular buffer: advance tail over dead particles + while ((circularBuffer->tail != circularBuffer->head) && + !circularBuffer->buffer[circularBuffer->tail].alive) + { + circularBuffer->tail = (circularBuffer->tail + 1) % MAX_PARTICLES; + } +} + +static void DrawParticles(CircularBuffer* circularBuffer) +{ + for (int i = circularBuffer->tail; i != circularBuffer->head; i = (i + 1) % MAX_PARTICLES) + { + if (circularBuffer->buffer[i].alive) + { + DrawCircleV(circularBuffer->buffer[i].position, + circularBuffer->buffer[i].radius, + circularBuffer->buffer[i].color); + } + } +} diff --git a/examples/shapes/shapes_particles.png b/examples/shapes/shapes_particles.png new file mode 100644 index 0000000000000000000000000000000000000000..728f765af5a008ed43507f8555994e683471c067 GIT binary patch literal 8052 zcmeAS@N?(olHy`uVBq!ia0y~yU{+vYU_8XZ#K6EXgVAa}0|OURYJ_K+r>7PJ2LlN3 zF)%Q2GW=s;VPIrn0AmJ52phy>10y5Iaz+M*|F;>O893P3*x6V) z*xA`RIXSp^M0k0)xp^dog!x5erR3#grDS9jRP@vplysD3WHih*bqowmOibj}Ep07~ zZ1jvxj6jAka&mI=aPvs;@=6#f$|xF<4E`Tr5aeK(z{tSNsKme|$jB_n`2PrlJOcwG zD{yu!f1$i&RT%Er#Y$;JKu2*XwZP)IQ|u`si;vam2PFxE0MF*C3TvI;30I#U-U>$dGXcJ4ZK_{h;?$4{I*b?NeztJkjIxOwa0qsLF4K70P+<*SdMK7aZ8?fZ|P zzd-&1`4j9dMo?UU{D$T)K?Wv9CKeWE7Iu)o7@5jJ9v5U`RWxK1atvfoEEHBUYUB`c znz(S|K~81kpbw%+MHjimR7@VKegt_9>@(s#)lOnKGb00&AhRHYJ;PUB z=YVOqA|tk(VK!qjv#Rx2)w|Y5IXvS19MQY2wwBED)%VuKZ#ix9&nNMIae{E;obRj7 zt3Eo$b*SfuB;$_rbvynu*iWr8?Am1W(l6$GkjK~ZiBp}=ahu%{e|h}+p9fdhZ}I=n zV7uf$!@jdYo_VKsR+k1b-ZFo#E)$YlShwUq!$M_^=jF3|`m7T^U+>S`b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eRc7k4 zE#_CQ{!ruN_p6iDz4flOqxcoq4VK~!4ZWxCPgeaOVk(?1@^Nmcf5qAl#T)l_1+O{Q zTWYPO^zX1C8;e*$!m8J=HXb@(9IyFfT}Ma7W~~!RM*B)P7uZ#oySV(>t<1}z^I(E) z*yONc{(D+A#phaQrRKTGxZmlk*s*KlC-oS478bD$@vGX`OTEgP6?}A2mF=vsqRWYF z+s><$C#;ssUbA}V7OC@n^#+gbw(flU^qACt`{V7hF$vi{35>VPHoiJjvhK@&7WY=; zYd=1>^@~jVx&5Z-y_LJxt~jWh5Zsf%ID2ya{Y9Dq?xCfoT|4w2&7CYgVVR)kk)Iu( zCtvF7a8IiSRl4l2Hr{-=dhw;bYtH#zT4i)}nQ2+fi8ULm)5P~>{@@abIPhd!q*)u8NChmmD^yY}= zf7gC2*|aU#U0fjIK%;f7v`rBMf z^tKtO+Q-pnhcuI5?MXa}Kt@9w@StWr2V~?0Bnsjp4XQvD!3=I>1vfnjDnjaJfV6@P z#x#jkMWDeUf+is;f(;HqeTQTn4n + + + + Debug.DLL + ARM64 + + + Debug.DLL + Win32 + + + Debug.DLL + x64 + + + Debug + ARM64 + + + Debug + Win32 + + + Debug + x64 + + + Release.DLL + ARM64 + + + Release.DLL + Win32 + + + Release.DLL + x64 + + + Release + ARM64 + + + Release + Win32 + + + Release + x64 + + + + {497FDF54-9762-4048-A833-61CC3980A0FB} + Win32Proj + shapes_particles + 10.0 + shapes_particles + + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + Application + true + $(DefaultPlatformToolset) + Unicode + + + 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 + + + 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)\ + + + 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)\ + + + 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\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + WindowsLocalDebugger + + + $(SolutionDir)..\..\examples\shapes + 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;shcore.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 + 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)\ + + + + + 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 + + + + + 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 0c710a731..a3297045f 100644 --- a/projects/VS2022/raylib.sln +++ b/projects/VS2022/raylib.sln @@ -371,6 +371,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_recursive_tree", "ex EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_triangle_strip", "examples\shapes_triangle_strip.vcxproj", "{2CCCD9E4-9058-4291-BD89-39C979F0CA1E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "shapes_particles", "examples\shapes_particles.vcxproj", "{6B1A933E-71B8-4C1F-9E79-02D98830E671}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug.DLL|ARM64 = Debug.DLL|ARM64