]> icculus.org git repositories - taylor/freespace2.git/blob - include/medals.h
Initial revision
[taylor/freespace2.git] / include / medals.h
1 /*
2  * $Logfile: /Freespace2/code/Stats/Medals.h $
3  * $Revision$
4  * $Date$
5  * $Author$
6  * 
7  * $Log$
8  * Revision 1.1  2002/05/03 03:28:12  root
9  * Initial revision
10  *
11  * 
12  * 5     10/29/99 10:40p Jefff
13  * hack to make german medal names display without actually changing them
14  * 
15  * 4     9/02/99 3:41p Jefff
16  * changed badge voice handling to be similar to promotion voice handling
17  * 
18  * 3     8/26/99 8:49p Jefff
19  * Updated medals screen and about everything that ever touches medals in
20  * one way or another.  Sheesh.
21  * 
22  * 2     10/07/98 10:54a Dave
23  * Initial checkin.
24  * 
25  * 1     10/07/98 10:51a Dave
26  * 
27  * 8     4/10/98 4:51p Hoffoss
28  * Made several changes related to tooltips.
29  * 
30  * 7     3/07/98 5:44p Dave
31  * Finished player info popup. Ironed out a few todo bugs.
32  * 
33  * 6     1/27/98 4:23p Allender
34  * enhanced internal scoring mechanisms.
35  * 
36  * 5     11/06/97 4:39p Allender
37  * a ton of medal work.  Removed an uneeded elemen in the scoring
38  * structure.  Fix up medals screen to apprioriate display medals (after
39  * mask was changed).  Fix Fred to only display medals which may actually
40  * be granted.  Added image_filename to player struct for Jason Hoffoss
41  * 
42  * 4     11/05/97 4:43p Allender
43  * reworked medal/rank system to read all data from tables.  Made Fred
44  * read medals.tbl.  Changed ai-warp to ai-warp-out which doesn't require
45  * waypoint for activation
46  *
47  * $NoKeywords: $
48  */
49
50 #ifndef FREESPACE_MEDAL_HEADER_FILE
51 #define FREESPACE_MEDAL_HEADER_FILE
52
53 #include "player.h"
54 #include "scoring.h"
55
56 #define MAX_BADGES      3
57 #define MAX_ASSIGNABLE_MEDALS           12                              // index into Medals array of the first medal which cannot be assigned
58
59 extern scoring_struct *Player_score;
60
61 // NUM_MEDALS stored in scoring.h since needed for player scoring structure
62
63 typedef struct medal_stuff {
64         char    name[NAME_LENGTH+1];
65         char    bitmap[NAME_LENGTH];
66         int     num_versions;
67         int     kills_needed;
68 } medal_stuff;
69
70 typedef struct badge_stuff {
71         char voice_base[MAX_FILENAME_LEN + 1];
72         char *promotion_text;
73 } badge_stuff;
74
75 extern medal_stuff Medals[NUM_MEDALS];
76 extern badge_stuff Badge_info[MAX_BADGES];
77 extern int Badge_index[MAX_BADGES];                             // array which contains indices into Medals to indicate which medals are badges
78
79 extern void parse_medal_tbl();
80
81 // modes for this screen
82 #define MM_NORMAL                                                       0                       // normal - run through the state code
83 #define MM_POPUP                                                        1                       // called from within some other tight loop (don't use gameseq_ functions)
84
85 // main medals screen
86 void medal_main_init(player *pl,int mode = MM_NORMAL);
87
88 // return 0 if the screen should close (used for MM_POPUP mode)
89 int medal_main_do();
90 void medal_main_close();
91
92 //void init_medal_palette();
93 void init_medal_bitmaps();
94 void init_snazzy_regions();
95 void blit_medals();
96 void blit_label(char *label,int *coords);
97 void blit_callsign();
98
99 // individual medals 
100
101 extern int Medal_ID;       // ID of the medal to display in this screen. Should be set by the caller
102
103 void blit_text();
104
105 void medals_translate_name(char *name, int max_len);
106
107 #endif
108