summaryrefslogtreecommitdiffstats
path: root/src/pixelfunc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pixelfunc.cpp')
-rw-r--r--src/pixelfunc.cpp19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/pixelfunc.cpp b/src/pixelfunc.cpp
index 08bbee6..13da915 100644
--- a/src/pixelfunc.cpp
+++ b/src/pixelfunc.cpp
@@ -50,33 +50,16 @@ void draw_doom()
camera.resolution.x = SCREEN_W;
camera.resolution.y = SCREEN_H;
- for (int i = 0; i < 10000; ++i)
+ for (int i = 0; i < 100; ++i)
{
draw();
- int squareX = RCL_divRoundDown(camera.position.x,RCL_UNITS_PER_SQUARE);
- int squareY = RCL_divRoundDown(camera.position.y,RCL_UNITS_PER_SQUARE);
-
if (rand() % 100 == 0)
{
- dx = 1 - rand() % 3;
- dy = 1 - rand() % 3;
dr = 1 - rand() % 3;
}
- while (heightAt(squareX + dx,squareY + dy) > 0)
- {
- dx = 1 - rand() % 3;
- dy = 1 - rand() % 3;
- dr = 1 - rand() % 3;
- }
-
- camera.position.x += dx * 200;
- camera.position.y += dy * 200;
- camera.direction += dr * 10;
-
camera.height = RCL_UNITS_PER_SQUARE + RCL_sin(frame * 16) / 2;
-
frame++;
}
}