summaryrefslogtreecommitdiff
path: root/src/box.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/box.c')
-rw-r--r--src/box.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/box.c b/src/box.c
index df4b9c7..dcb7672 100644
--- a/src/box.c
+++ b/src/box.c
@@ -1,6 +1,8 @@
#include "entityimpl.h"
#include "lzr.h"
+extern int destructibles, des_x, des_y;
+
IMPL(draw) {
const LZR_ImageDrawSettings stg =
{0, 0, -1, -1, 1.0, 1.0, 0.0, true, false, false};
@@ -14,11 +16,15 @@ IMPL(smash) {
if (this->broken) {
this->type = 0;
this->smash = NULL;
+ destructibles -= 1;
+ des_x = this->pos[0];
+ des_y = this->pos[1];
}
this->broken = 1;
}
IMPL_INIT(box) {
+ destructibles += 1;
this->width = this->height = 64;
this->broken = 0;
}