summaryrefslogtreecommitdiff
path: root/src/part.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/part.c')
-rw-r--r--src/part.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/src/part.c b/src/part.c
deleted file mode 100644
index a722193..0000000
--- a/src/part.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "entityimpl.h"
-#include <stdlib.h>
-
-IMPL_INIT(part, 0) {
- this->width = this->height = 1 + rand() % 2;
- this->ignore_solids = true;
- this->part.life = 30 + rand() % 10;
- this->vel[0] = (float)(rand() % 1024) / 1023.0;
- this->vel[1] = (float)(rand() % 1024) / 1023.0;
- this->vel[0] *= 1 - 2 * (rand() % 2);
- this->vel[1] *= 1 - 2 * (rand() % 3);
-}
-
-IMPL(update) {
- this->part.life -= 1;
- if (this->part.life <= 0) {
- this->type = 0;
- return;
- }
- this->vel[1] += 0.1;
-
- entity_move(this, g);
-}
-
-IMPL(draw) {
- TZR_DrawSetColor(1, 1, 1, 1);
- TZR_DrawRectangle(this->pos[0], this->pos[1],
- this->width, this->height, .fill=true);
-}