1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215
|
/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
#ifndef _MAIN_HALL_MENU_HEADER_FILE
#define _MAIN_HALL_MENU_HEADER_FILE
#include "globalincs/globals.h"
#include "globalincs/pstypes.h"
// CommanderDJ - this is now dynamic
// #define MAIN_HALLS_MAX 10
class main_hall_region
{
public:
int mask;
char key;
SCP_string description;
int action;
SCP_string lua_action;
main_hall_region(int _mask, char _key, const SCP_string &_description, int _action, const SCP_string &_lua_action)
: mask(_mask), key(_key), description(_description), action(_action), lua_action(_lua_action)
{}
main_hall_region()
: mask(0), key(0), description(), action(0), lua_action()
{}
};
class main_hall_defines
{
public:
// mainhall name identifier
SCP_string name;
SCP_vector<SCP_string> cheat;
SCP_vector<SCP_string> cheat_anim_from;
SCP_vector<SCP_string> cheat_anim_to;
// minimum resolution and aspect ratio needed to display this main hall
int min_width;
int min_height;
float min_aspect_ratio;
// bitmap and mask
SCP_string bitmap;
SCP_string mask;
// music
SCP_string music_name;
SCP_string substitute_music_name;
// help overlay
SCP_string help_overlay_name;
int help_overlay_resolution_index;
// zoom area
int zoom_area_width;
int zoom_area_height;
// intercom defines -------------------
// # of intercom sounds
int num_random_intercom_sounds;
// random (min/max) delays between playing intercom sounds
SCP_vector<SCP_vector<int> > intercom_delay;
// intercom sounds themselves
SCP_vector<int> intercom_sounds;
// intercom sound pan values
SCP_vector<float> intercom_sound_pan;
// misc animations --------------------
// # of misc animations
int num_misc_animations;
// filenames of the misc animations
SCP_vector<SCP_string> misc_anim_name;
// Time until we will next play a given misc animation, min delay, and max delay
SCP_vector<SCP_vector<int> > misc_anim_delay;
// Goober5000, used in preference to the flag in generic_anim
SCP_vector<int> misc_anim_paused;
// Goober5000, used when we want to play one of several anims
SCP_vector<int> misc_anim_group;
// coords of where to play the misc anim
SCP_vector<SCP_vector<int> > misc_anim_coords;
// misc anim play modes (see MISC_ANIM_MODE_* above)
SCP_vector<int> misc_anim_modes;
// panning values for each of the misc anims
SCP_vector<float> misc_anim_sound_pan;
//sounds for each of the misc anims
SCP_vector<SCP_vector<int> > misc_anim_special_sounds;
//frame number triggers for each of the misc anims
SCP_vector<SCP_vector<int> > misc_anim_special_trigger;
//flags for each of the misc anim sounds
SCP_vector<SCP_vector<int> > misc_anim_sound_flag;
// controls the render order
SCP_vector<bool> misc_anim_over_doors;
// door animations --------------------
// # of door animations
int num_door_animations;
// filenames of the door animations
SCP_vector<SCP_string> door_anim_name;
// first pair : coords of where to play a given door anim
// second pair : center of a given door anim in windowed mode
SCP_vector<SCP_vector<int> > door_anim_coords;
// sounds for each region (open/close)
SCP_vector<SCP_vector<int> > door_sounds;
// pan values for the door sounds
SCP_vector<float> door_sound_pan;
// region descriptions ----------------
// font used for the tooltips, version number, etc.
int font;
// action
SCP_vector<main_hall_region> regions;
bool default_readyroom;
// num pixels shader is above/below tooltip text
int tooltip_padding;
// y coord of where to draw tooltip text
int region_yval;
};
extern SCP_vector< SCP_vector<main_hall_defines> > Main_hall_defines;
// initialize the main hall proper
void main_hall_init(const SCP_string &main_hall_name);
// parse mainhall table files
void main_hall_table_init();
// read in mainhall tables
void parse_main_hall_table(const char* filename);
// do a frame for the main hall
void main_hall_do(float frametime);
// close the main hall proper
void main_hall_close();
// start the main hall music playing
void main_hall_start_music();
// stop the main hall music
void main_hall_stop_music(bool fade);
// get the music index
int main_hall_get_music_index(int main_hall_num);
main_hall_defines* main_hall_get_pointer(const SCP_string &name_to_find);
int main_hall_get_index(const SCP_string &name_to_find);
int main_hall_get_resolution_index(int main_hall_num);
void main_hall_get_name(SCP_string &name, unsigned int index);
int main_hall_get_overlay_id();
int main_hall_get_overlay_resolution_index();
// what main hall we're on
int main_hall_id();
// Vasudan?
int main_hall_is_vasudan();
// start the ambient sounds playing in the main hall
void main_hall_start_ambient();
void main_hall_stop_ambient();
void main_hall_reset_ambient_vol();
void main_hall_do_multi_ready();
// make the vasudan main hall funny
void main_hall_vasudan_funny();
void main_hall_pause();
void main_hall_unpause();
#endif
|