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