--- /dev/null
+/*
+Copyright (C) 2010 - Lugaru authors
+
+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.
+
+This program 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.
+
+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.
+*/
+
+DECLARE_AWARD(awardklutz, "Suicidal")
+DECLARE_AWARD(awardflawless, "Flawless!")
+DECLARE_AWARD(awardalldead, "Take no prisoners")
+DECLARE_AWARD(awardnodead, "Merciful")
+DECLARE_AWARD(awardstealth, "One with the shadows!")
+DECLARE_AWARD(awardswordsman, "Swordsman")
+DECLARE_AWARD(awardkungfu, "Unarmed!")
+DECLARE_AWARD(awardknifefighter, "Knife fighter")
+DECLARE_AWARD(awardcoward, "Coward")
+DECLARE_AWARD(awardevasion, "Escape artist")
+DECLARE_AWARD(awardacrobat, "Gymnast")
+DECLARE_AWARD(awardlongrange, "Blade slinger")
+DECLARE_AWARD(awardbrutal, "Brutal")
+DECLARE_AWARD(awardhyper, "Hyper")
+DECLARE_AWARD(awardaikido, "Aikido master!")
+DECLARE_AWARD(awardrambo, "Rambo")
+DECLARE_AWARD(awardfast, "Fast")
+DECLARE_AWARD(awardrealfast, "Real fast")
+DECLARE_AWARD(awarddamnfast, "Damn fast")
+DECLARE_AWARD(awardstrategy, "Divide and conquer")
+DECLARE_AWARD(awardbojutsu, "Bojutsu")
--- /dev/null
+/*
+Copyright (C) 2010 - Lugaru authors
+
+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.
+
+This program 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.
+
+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.
+*/
+
+#ifndef AWARDS_H
+#define AWARDS_H
+
+enum award_types {
+#define DECLARE_AWARD(id, name) id,
+#include "Awards.def"
+#undef DECLARE_AWARD
+award_count
+};
+
+static const char *award_names[award_count] = {
+#define DECLARE_AWARD(id, name) name,
+#include "Awards.def"
+#undef DECLARE_AWARD
+};
+
+#endif
+
// cat src/Constants.h | sed -e 's/#define/const int/' -e 's/ [0-9]*$/ =&;/'
// chew on that --Jookia
-const int awardklutz = 0;
-const int awardflawless = 1;
-const int awardalldead = 2;
-const int awardnodead = 3;
-const int awardstealth = 4;
-const int awardswordsman = 5;
-const int awardkungfu = 6;
-const int awardknifefighter = 7;
-const int awardcoward = 8;
-const int awardevasion = 9;
-const int awardacrobat = 10;
-const int awardlongrange = 11;
-const int awardbrutal = 12;
-const int awardhyper = 13;
-const int awardaikido = 14;
-const int awardrambo = 15;
-const int awardfast = 16;
-const int awardrealfast = 17;
-const int awarddamnfast = 18;
-const int awardstrategy = 19;
-const int awardbojutsu = 20;
-
const int mapkilleveryone = 0;
const int mapgosomewhere = 1;
const int mapkillsomeone = 2;
#include "Game.h"
#include "openal_wrapper.h"
#include "Input.h"
+#include "Awards.h"
using namespace std;
strcat(string,temp);
text.glPrintOutlined(1024/30,768*6/8-40,string,1,2,1024,768);
- for(i=0;i<numawards;i++){
- if(i<6){
- if(awards[i]==awardklutz)sprintf (string, "Suicidal");
- if(awards[i]==awardflawless)sprintf (string, "Flawless!");
- if(awards[i]==awardalldead)sprintf (string, "Take no prisoners");
- if(awards[i]==awardnodead)sprintf (string, "Merciful");
- if(awards[i]==awardstealth)sprintf (string, "One with the shadows!");
- if(awards[i]==awardswordsman)sprintf (string, "Swordsman");
- if(awards[i]==awardkungfu)sprintf (string, "Unarmed!");
- if(awards[i]==awardknifefighter)sprintf (string, "Knife fighter");
- if(awards[i]==awardcoward)sprintf (string, "Coward");
- if(awards[i]==awardevasion)sprintf (string, "Escape artist");
- if(awards[i]==awardacrobat)sprintf (string, "Gymnast");
- if(awards[i]==awardlongrange)sprintf (string, "Blade slinger");
- if(awards[i]==awardbrutal)sprintf (string, "Brutal");
- if(awards[i]==awardhyper)sprintf (string, "Hyper");
- if(awards[i]==awardaikido)sprintf (string, "Aikido master!");
- if(awards[i]==awardrambo)sprintf (string, "Rambo");
- if(awards[i]==awardfast)sprintf (string, "Fast");
- if(awards[i]==awardrealfast)sprintf (string, "Real fast");
- if(awards[i]==awarddamnfast)sprintf (string, "Damn fast");
- if(awards[i]==awardstrategy)sprintf (string, "Divide and conquer");
- if(awards[i]==awardbojutsu)sprintf (string, "Bojutsu");
- text.glPrintOutlined(1024/30,768*6/8-90-40*i,string,1,2,1024,768);
- }
- }
+ for (i = 0; i < numawards && i < 6; i++)
+ text.glPrintOutlined(1024/30,768*6/8-90-40*i,award_names[awards[i]],1,2,1024,768);
}
if(drawmode!=normalmode){