float bonustime;
float bonusnum[100];
+const char *bonus_names[bonus_count] = {
+#define DECLARE_BONUS(id, name, ...) name,
+#include "Bonuses.def"
+#undef DECLARE_BONUS
+};
+
+const char *award_names[award_count] = {
+#define DECLARE_AWARD(id, name) name,
+#include "Awards.def"
+#undef DECLARE_AWARD
+};
+
static const int bonus_values[bonus_count] = {
#define DECLARE_BONUS(id, name, value, ...) value,
#include "Bonuses.def"
int award_awards(int *awards)
{
- int numawards = 0, i;
- if (damagetaken == 0 && player[0].bloodloss == 0) {
+ int numawards = 0;
+ if (damagetaken == 0 && Person::players[0]->bloodloss == 0) {
awards[numawards] = awardflawless;
numawards++;
}
bool alldead = true;
- for (i = 1; i < numplayers; i++) {
- if (player[i].dead != 2)alldead = 0;
+ for (unsigned i = 1; i < Person::players.size(); i++) {
+ if (Person::players[i]->dead != 2)
+ alldead = 0;
}
if (alldead) {
awards[numawards] = awardalldead;
numawards++;
}
alldead = 1;
- for (i = 1; i < numplayers; i++) {
- if (player[i].dead != 1)alldead = 0;
+ for (unsigned i = 1; i < Person::players.size(); i++) {
+ if (Person::players[i]->dead != 1)
+ alldead = 0;
}
if (alldead) {
awards[numawards] = awardnodead;
awards[numawards] = awardacrobat;
numawards++;
}
- if (numthrowkill == numplayers - 1) {
+ if (numthrowkill == (int(Person::players.size()) - 1)) {
awards[numawards] = awardlongrange;
numawards++;
}
alldead = 1;
- for (i = 1; i < numplayers; i++) {
- if (player[i].dead != 2)alldead = 0;
+ for (unsigned i = 1; i < Person::players.size(); i++) {
+ if (Person::players[i]->dead != 2)
+ alldead = 0;
}
if (numafterkill > 0 && alldead) {
awards[numawards] = awardbrutal;
awards[numawards] = awardaikido;
numawards++;
}
- if (maxalarmed == 1 && numplayers > 2) {
+ if (maxalarmed == 1 && Person::players.size() > 2) {
awards[numawards] = awardstrategy;
numawards++;
}