X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FAwards.cpp;h=cbfe3814ff2779a6e9c7e95c90a84ff9e6e7c32a;hb=1aef858f5ecb3dc8fd816e0155635371ed3632f2;hp=5fe1f7bda4feb9dedd5712ff8e036990134d9f09;hpb=14d27ff7369d8892e08b520309c90ece4ab883a7;p=lugaru.git diff --git a/Source/Awards.cpp b/Source/Awards.cpp index 5fe1f7b..cbfe381 100644 --- a/Source/Awards.cpp +++ b/Source/Awards.cpp @@ -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;