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)