Skip to content

Commit

Permalink
Fixed overlapping in cracktro
Browse files Browse the repository at this point in the history
This code renders the screen full of colored rectangles (when pressing a
key to end the cracktro). The height of the rectangles should always
only be 2 pixles, otherwise this draws outside of the screen.
  • Loading branch information
Mia75owo authored and drfiemost committed Sep 3, 2024
1 parent 6ef53c3 commit f3d025f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Hurrican/src/CCracktro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,8 +315,8 @@ void CCracktro::Load() {
static float count = 10.0f;

// farbige Balken
for (int i = 0; i < 320; i++)
RenderRect(0, static_cast<float>(i * 2), RENDERWIDTH, static_cast<float>(i * 2),
for (int i = 0; i < (RENDERHEIGHT / 2); i++)
RenderRect(0, static_cast<float>(i * 2), RENDERWIDTH, 2,
ScrollCol[rand() % (static_cast<int>(sizeof(ScrollCol) / sizeof(D3DCOLOR)))]);

count -= Timer.sync(1.0f);
Expand Down

0 comments on commit f3d025f

Please sign in to comment.