2 * Copyright (C) Volition, Inc. 1999. All rights reserved.
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
10 * $Logfile: /Freespace2/code/Stats/Medals.h $
16 * Revision 1.4 2003/06/03 04:00:39 taylor
17 * Polish language support (Janusz Dziemidowicz)
19 * Revision 1.3 2003/05/25 02:30:42 taylor
22 * Revision 1.2 2002/06/09 04:41:13 relnev
23 * added copyright header
25 * Revision 1.1.1.1 2002/05/03 03:28:12 root
29 * 5 10/29/99 10:40p Jefff
30 * hack to make german medal names display without actually changing them
32 * 4 9/02/99 3:41p Jefff
33 * changed badge voice handling to be similar to promotion voice handling
35 * 3 8/26/99 8:49p Jefff
36 * Updated medals screen and about everything that ever touches medals in
37 * one way or another. Sheesh.
39 * 2 10/07/98 10:54a Dave
42 * 1 10/07/98 10:51a Dave
44 * 8 4/10/98 4:51p Hoffoss
45 * Made several changes related to tooltips.
47 * 7 3/07/98 5:44p Dave
48 * Finished player info popup. Ironed out a few todo bugs.
50 * 6 1/27/98 4:23p Allender
51 * enhanced internal scoring mechanisms.
53 * 5 11/06/97 4:39p Allender
54 * a ton of medal work. Removed an uneeded elemen in the scoring
55 * structure. Fix up medals screen to apprioriate display medals (after
56 * mask was changed). Fix Fred to only display medals which may actually
57 * be granted. Added image_filename to player struct for Jason Hoffoss
59 * 4 11/05/97 4:43p Allender
60 * reworked medal/rank system to read all data from tables. Made Fred
61 * read medals.tbl. Changed ai-warp to ai-warp-out which doesn't require
62 * waypoint for activation
67 #ifndef FREESPACE_MEDAL_HEADER_FILE
68 #define FREESPACE_MEDAL_HEADER_FILE
74 #define MAX_ASSIGNABLE_MEDALS 12 // index into Medals array of the first medal which cannot be assigned
76 extern scoring_struct *Player_score;
78 // NUM_MEDALS stored in scoring.h since needed for player scoring structure
80 typedef struct medal_stuff {
81 char name[NAME_LENGTH+1];
82 char bitmap[NAME_LENGTH];
87 typedef struct badge_stuff {
88 char voice_base[MAX_FILENAME_LEN + 1];
90 char voice_base2[MAX_FILENAME_LEN + 1];
95 extern medal_stuff Medals[NUM_MEDALS];
96 extern badge_stuff Badge_info[MAX_BADGES];
97 extern int Badge_index[MAX_BADGES]; // array which contains indices into Medals to indicate which medals are badges
99 extern void parse_medal_tbl();
101 // modes for this screen
102 #define MM_NORMAL 0 // normal - run through the state code
103 #define MM_POPUP 1 // called from within some other tight loop (don't use gameseq_ functions)
105 // main medals screen
106 void medal_main_init(player *pl,int mode = MM_NORMAL);
108 // return 0 if the screen should close (used for MM_POPUP mode)
110 void medal_main_close();
112 //void init_medal_palette();
113 void init_medal_bitmaps();
114 void init_snazzy_regions();
117 void blit_label(char *label,int *coordsx,int *coordsy);
119 void blit_label(char *label,int *coords);
121 void blit_callsign();
125 extern int Medal_ID; // ID of the medal to display in this screen. Should be set by the caller
129 void medals_translate_name(char *name, int max_len);
130 void medals_translate_name_pl(char *name, int max_len);