From 13d12ff3fe3bea380608bf7a763a124d7b4161ab Mon Sep 17 00:00:00 2001 From: Dev EhChad Date: Fri, 30 Jan 2026 07:03:09 -0500 Subject: [PATCH] for loop --- dasher.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dasher.cpp b/dasher.cpp index 96774b0..5df6a6c 100644 --- a/dasher.cpp +++ b/dasher.cpp @@ -62,11 +62,19 @@ int main() { }; // Nebulea - AnimData nebulae[2] = - { - nebData, - neb2Data - }; + AnimData nebulae[2]{}; + + for (int i = 0; i < 2; i++) + { + nebulae[i].rec.width = nebula.width / 8; + nebulae[i].rec.height = nebula.height / 8; + nebulae[i].rec.x = 0; + nebulae[i].rec.y = 0; + nebulae[i].pos.y = windowArray[1] - nebulae[i].rec.height; + nebulae[i].frame = 0; + nebulae[i].runningTime = 0.0; + nebulae[i].updateTime = 1.0 / 16.0; + } int nebVel{-200}; // Nebula x velocity (pixels per second)