summaryrefslogtreecommitdiff
path: root/src/alarm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/alarm.c')
-rw-r--r--src/alarm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/alarm.c b/src/alarm.c
index 247f369..95fb6b0 100644
--- a/src/alarm.c
+++ b/src/alarm.c
@@ -1,6 +1,23 @@
#include "entityimpl.h"
#include "lzr.h"
+#include "entityimpl.h"
+
+IMPL(draw) {
+ const LZR_ImageDrawSettings stg =
+ {0, 0, -1, -1, 1.0, 1.0, 0.0, true, false, false};
+ LZR_DrawSetColor(1, 1, 1, 1);
+ LZR_DrawImageEx(LZR_IMAGE(this->broken ? "res/clockdestroyed.bmp" : "res/clock.bmp"),
+ this->pos[0], this->pos[1], stg);
+}
+
+IMPL(smash) {
+ LZR_PlaySound(4);
+ LZR_StopMusic();
+ this->smash = NULL;
+ this->broken = 1;
+}
IMPL_INIT(alarm) {
LZR_PlayMusic("res/alarm.wav", -1);
+ this->width = this->height = 32;
}