]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Awards.cpp
Remove some extra declarations of "channels"
[lugaru.git] / Source / Awards.cpp
index 5fe1f7bda4feb9dedd5712ff8e036990134d9f09..cbfe3814ff2779a6e9c7e95c90a84ff9e6e7c32a 100644 (file)
@@ -23,6 +23,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "Person.h"
 #include "Game.h"
 
+int bonus;
+float bonusvalue;
+float bonustotal;
+float startbonustotal;
+float bonustime;
+float bonusnum[100];
+
+static const int bonus_values[bonus_count] = {
+#define DECLARE_BONUS(id, name, value, ...) value,
+#include "Bonuses.def"
+#undef DECLARE_BONUS
+};
+
+void
+award_bonus(int playerid, int bonusid, int alt_value)
+{
+  if (playerid != 0)
+    return;
+  bonus = bonusid;
+  bonustime = 0;
+  bonusvalue = alt_value ? alt_value : bonus_values[bonusid];
+}
+
+// FIXME: make these per-player
 float damagetaken;
 int numfalls;
 int numflipfail;