X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;ds=sidebyside;f=Source%2FAwards.h;h=882fbef3710c4dee65f52723baa4a33a82e8f353;hb=8a32dc9e4e1011b10f009e999d7d008aa2711d8a;hp=78cb8e1ccacd1b4d3ee165e28c109d9a3247829d;hpb=14d27ff7369d8892e08b520309c90ece4ab883a7;p=lugaru.git diff --git a/Source/Awards.h b/Source/Awards.h index 78cb8e1..882fbef 100644 --- a/Source/Awards.h +++ b/Source/Awards.h @@ -1,39 +1,51 @@ /* -Copyright (C) 2010 - Lugaru authors +Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file) This file is part of Lugaru. -Lugaru is free software; you can redistribute it and/or -modify it under the terms of the GNU General Public License -as published by the Free Software Foundation; either version 2 -of the License, or (at your option) any later version. +Lugaru is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. -This program is distributed in the hope that it will be useful, +Lugaru is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - -See the GNU General Public License for more details. +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +along with Lugaru. If not, see . */ #ifndef AWARDS_H #define AWARDS_H +enum bonus_types { +#define DECLARE_BONUS(id, ...) id, +#include "Bonuses.def" +#undef DECLARE_BONUS + bonus_count +}; + +extern const char *bonus_names[bonus_count]; + +extern int bonus; +extern float bonusvalue; +extern float bonustotal; +extern float bonustime; +extern float startbonustotal; +extern float bonusnum[100]; + +extern void award_bonus(int playerid, int bonusid, int alt_value = 0); + enum award_types { #define DECLARE_AWARD(id, name) id, #include "Awards.def" #undef DECLARE_AWARD -award_count + award_count }; -static const char *award_names[award_count] = { -#define DECLARE_AWARD(id, name) name, -#include "Awards.def" -#undef DECLARE_AWARD -}; +extern const char *award_names[award_count]; extern int award_awards(int *);