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