36 canvas.
Clear(
true, BLACK);
46 srand((UINT)time(
nullptr));
57 i.
x = (float)(rand() % canvas.
GetWidth());
58 i.y = (float)(rand() % canvas.
GetHeight());
59 i.vx = rand() % 5 * (rand() % 2 ? 2.0f : -2.0f);
60 i.vy = rand() % 5 * (rand() % 2 ? 2.0f : -2.0f);
68 i.img.GetCanvas()->Clear();
70 ReverseAlpha(i.img.GetCanvas()->GetBuffer(), i.img.GetCanvas()->GetBufferSize());
74 i.img.bUseSrcAlpha =
true;
77 layer.push_back(&i.img);
81 scene.push_back(&layer);