Declaration hides another variable same name

This commit is contained in:
Jordi Santonja Blanes 2025-12-08 08:28:31 +01:00
parent 4f7757e87c
commit 5cc085c4bd

View File

@ -114,9 +114,9 @@ int main(void)
ClearBackground(RAYWHITE);
EndTextureMode();
Image pattern = LoadImage("resources/game_of_life/r_pentomino.png");
UpdateTextureRec(world2.texture, (Rectangle){ worldWidth/2.0f, worldHeight/2.0f, (float)(pattern.width), (float)(pattern.height) }, pattern.data);
UnloadImage(pattern);
Image startPattern = LoadImage("resources/game_of_life/r_pentomino.png");
UpdateTextureRec(world2.texture, (Rectangle) { worldWidth / 2.0f, worldHeight / 2.0f, (float)(startPattern.width), (float)(startPattern.height) }, startPattern.data);
UnloadImage(startPattern);
// Pointers to the two textures, to be swapped
RenderTexture2D *currentWorld = &world2;