]> icculus.org git repositories - taylor/freespace2.git/blob - include/missionweaponchoice.h
fixed demo dogfight multiplayer mission
[taylor/freespace2.git] / include / missionweaponchoice.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/MissionUI/MissionWeaponChoice.h $
11  * $Revision$
12  * $Date$
13  * $Author$
14  *
15  * Header file for the weapon loadout screen
16  *
17  * $Log$
18  * Revision 1.2  2002/06/09 04:41:14  relnev
19  * added copyright header
20  *
21  * Revision 1.1.1.1  2002/05/03 03:28:12  root
22  * Initial import.
23  *
24  * 
25  * 2     10/07/98 10:53a Dave
26  * Initial checkin.
27  * 
28  * 1     10/07/98 10:50a Dave
29  * 
30  * 21    4/17/98 5:27p Dave
31  * More work on the multi options screen. Fixed many minor ui todo bugs.
32  * 
33  * 20    3/31/98 1:50p Duncan
34  * ALAN: fix bugs with selecting alternate weapons 
35  * 
36  * 19    2/28/98 7:04p Lawrance
37  * Don't show reset button in multiplayer
38  * 
39  * 18    2/24/98 6:21p Lawrance
40  * Integrate new reset button into loadout screens
41  * 
42  * 17    1/17/98 4:14p Lawrance
43  * fix mask problem with primary weapon scrolling
44  * 
45  * 16    1/17/98 1:32a Lawrance
46  * fix mask problem that was mixing up scroll up and scroll down on
47  * weapons loadout
48  * 
49  * 15    1/09/98 6:06p Dave
50  * Put in network sound support for multiplayer ship/weapon select
51  * screens. Made clients exit game correctly through warp effect. Fixed
52  * main hall menu help overlay bug.
53  * 
54  * 14    12/24/97 1:19p Lawrance
55  * fix some bugs with the multiplayer ship/weapons loadout
56  * 
57  * 13    12/23/97 5:25p Allender
58  * more fixes to multiplayer ship selection.  Fixed strange reentrant
59  * problem with cf_callback when loading freespace data
60  * 
61  * 12    12/22/97 6:18p Lawrance
62  * Get save/restore of player loadout working with new code
63  * 
64  * 11    12/22/97 1:40a Lawrance
65  * Re-write ship select/weapons loadout to be multiplayer friendly
66  * 
67  * 10    12/19/97 1:23p Dave
68  * Put in multiplayer groundwork for new weapon/ship select screens.
69  * 
70  * 9     12/18/97 8:59p Dave
71  * Finished putting in basic support for weapon select and ship select in
72  * multiplayer.
73  * 
74  * 8     12/17/97 7:42p Lawrance
75  * re-work how weapons are re-set when ships change in ship select
76  * 
77  * 7     12/17/97 4:53p Lawrance
78  * changes to support multiplayer
79  * 
80  * 6     12/17/97 2:33p Dave
81  * Finished up basic weapon select support for multiplayer.
82  * 
83  * 5     12/16/97 6:17p Dave
84  * Put in primary weapon support for multiplayer weapon select screen.
85  * 
86  * 4     12/03/97 1:22p Lawrance
87  * implement saving/restoring of ship selection and weapons loadout
88  * 
89  * 3     12/02/97 10:51p Lawrance
90  * implement save/restore of ship selection and weapon loadouts
91  * 
92  * 2     11/15/97 6:12p Lawrance
93  * don't allow Player ship to have all weapons removed
94  * 
95  * 1     9/30/97 10:16a Lawrance
96  * move files from Mission lib to MissionUI lib
97  * 
98  * 8     9/18/97 7:58a Lawrance
99  * fix some bugs associated with the player ship being created early on
100  * 
101  * 7     8/30/97 12:24p Lawrance
102  * supporting animations in the weapons loadout screen, fixed some bugs
103  * 
104  * 6     8/29/97 7:33p Lawrance
105  * further work on weapons loadout
106  * 
107  * 5     8/15/97 8:00p Lawrance
108  * integrating new art for the briefing screens
109  * 
110  * 4     7/23/97 11:36a Lawrance
111  * support common buttons through the briefing/ship select/weapons
112  * loadout, be able to hide buttons when necessary
113  * 
114  * 3     7/14/97 3:58p Lawrance
115  * limit frametime to 33 ms for animation timing
116  * 
117  * 2     2/25/97 11:11a Lawrance
118  * ship selection and weapon loadout interfaces working at basic level
119  *
120  * $NoKeywords: $
121  */
122
123
124 #ifndef __MISSION_WEAPON_CHOICE_H__
125 #define __MISSION_WEAPON_CHOICE_H__
126
127 #include "missionparse.h"
128 #include "missionscreencommon.h"
129
130 // mask regions for icons in the scrollable lists
131 #define ICON_PRIMARY_0                          28
132 #define ICON_PRIMARY_1                          29
133 #define ICON_PRIMARY_2                          30
134 #define ICON_PRIMARY_3                          31
135 #define ICON_SECONDARY_0                        10
136 #define ICON_SECONDARY_1                        11
137 #define ICON_SECONDARY_2                        12
138 #define ICON_SECONDARY_3                        13
139
140 // mask regions for icons that sit above the ship
141 #define ICON_SHIP_PRIMARY_0             32
142 #define ICON_SHIP_PRIMARY_1             33
143 #define ICON_SHIP_PRIMARY_2             34
144 #define ICON_SHIP_SECONDARY_0           35
145 #define ICON_SHIP_SECONDARY_1           36
146 #define ICON_SHIP_SECONDARY_2           37
147 #define ICON_SHIP_SECONDARY_3           38
148
149 // mask region for weapon loadout specific buttons
150 #define PRIMARY_SCROLL_UP                                       27      
151 #define PRIMARY_SCROLL_DOWN                             26
152 #define SECONDARY_SCROLL_UP                             9
153 #define SECONDARY_SCROLL_DOWN                           8
154 #define WL_RESET_BUTTON_MASK                            39
155
156 #define NUM_WEAPON_REGIONS              (NUM_COMMON_REGIONS + 32)
157
158 void weapon_select_init();
159 void weapon_select_common_init();
160 void weapon_select_do(float frametime);
161 void weapon_select_close();
162
163 void    wl_update_parse_object_weapons(p_object *pobjp, wss_unit *slot);
164 int     wl_update_ship_weapons(int objnum, wss_unit *slot);
165 void    wl_bash_ship_weapons(ship_weapon *swp, wss_unit *slot);
166
167 void wl_set_default_weapons(int index, int ship_class);
168 void wl_reset_to_defaults();
169
170 // Set selected slot to first placed ship
171 void wl_reset_selected_slot();
172
173 void wl_remove_weps_from_pool(int *wep, int *wep_count, int ship_class);
174 void wl_get_ship_class_weapons(int ship_class, int *wep, int *wep_count);
175 void wl_get_default_weapons(int ship_class, int slot_num, int *wep, int *wep_count);
176
177 void wl_synch_interface();
178 void wl_apply(int mode,int from_bank,int from_list,int to_bank,int to_list,int ship_slot,int player_index = -1);
179 void wl_drop(int from_bank,int from_list,int to_bank,int to_list, int ship_slot,int player_index = -1);
180
181 #endif /* __MISSION_WEAPON_CHOICE_H__ */
182