src/firealrm.c
changeset 0 b2e3aa63e96c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/firealrm.c	Thu Jul 17 22:03:19 2025 -0400
@@ -0,0 +1,25 @@
+#include "firealrm.h"
+
+int counter = 0;
+
+Uint32 ALRM_soundFireAlarm(Uint32 interval)
+{
+    if(!fireAlarmSystemActivated)
+    {
+        Mix_PlayChannel(-1, alarmSound, 0);
+        fireAlarmSystemActivated = 1;
+        counter += 1;
+        return 100;
+    }
+
+    else
+    {
+        fireAlarmSystemActivated = 0;
+        if(counter > 2)
+        {
+            counter = 0;
+            return 1800;
+        }
+        return 1000;
+    }
+}