61 : used_this_level( 0 )
102 bool override_mflash =
false;
108 override_mflash =
true;
122 mflash.
blobs.push_back(mblob);
125 for (i = 0; i < Mflash_info.size(); i++) {
127 if (override_mflash) {
128 Mflash_info[
i] = mflash;
135 if (i == Mflash_info.size()) {
136 Mflash_info.push_back(mflash);
140 if (!override_mflash) {
141 Warning(
LOCATION,
"Muzzle flash \"%s\" already exists! Using existing entry instead.", mflash.
name);
151 mprintf((
"TABLES: Unable to parse '%s'! Error message = %s.\n", filename, e.what()));
171 Assert( index < (
int)Mflash_info.size() );
173 Mflash_info[
index].used_this_level++;
182 for ( i = 0; i < Mflash_info.size(); i++) {
184 if ( !load_all && !Mflash_info[i].used_this_level )
188 int original_num_blobs = Mflash_info[
i].blobs.size();
189 int original_idx = 1;
190 for ( idx = 0; idx < Mflash_info[
i].blobs.size(); ) {
198 Warning(
LOCATION,
"Muzleflash \"%s\", blob [%d/%d]\nMuzzleflash blob \"%s\" not found! Deleting.",
199 Mflash_info[i].
name, original_idx, original_num_blobs, Mflash_info[i].blobs[idx].name);
200 Mflash_info[
i].blobs.erase( Mflash_info[i].blobs.begin() +
idx );
213 for ( i = 0; i < Mflash_info.size(); i++) {
214 for ( idx = 0; idx < Mflash_info[
i].blobs.size(); idx++) {
215 Mflash_info[
i].used_this_level = 0;
226 for ( i = 0; i < Mflash_info.size(); i++) {
228 for ( idx = 0; idx < Mflash_info[
i].blobs.size(); idx++) {
229 if ( Mflash_info[i].blobs[idx].anim_id < 0 )
232 bm_release( Mflash_info[i].blobs[idx].anim_id );
233 Mflash_info[
i].blobs[
idx].anim_id = -1;
253 if ( (mflash_type < 0) || (mflash_type >= (
int)Mflash_info.size()) )
257 mi = &Mflash_info[mflash_type];
260 for (idx = 0; idx < mi->
blobs.size(); idx++) {
280 for (idx = 0; idx < mi->
blobs.size(); idx++) {
307 for (idx = 0; idx < Mflash_info.size(); idx++) {
308 if ( !
stricmp(name, Mflash_info[idx].name) )
int mflash_lookup(char *name)
void mflash_level_close()
void vm_vec_scale_add(vec3d *dest, const vec3d *src1, const vec3d *src2, float k)
char name[MAX_FILENAME_LEN]
void mflash_create(vec3d *gun_pos, vec3d *gun_dir, physics_info *pip, int mflash_type, object *local)
void mflash_mark_as_used(int index)
void _cdecl void void _cdecl void _cdecl Warning(char *filename, int line, SCP_FORMAT_STRING const char *format,...) SCP_FORMAT_STRING_ARGS(3
struct mflash_info mflash_info
struct mflash_blob_info mflash_blob_info
void operator=(const mflash_blob_info &r)
void bm_page_in_xparent_texture(int bitmapnum, int nframes)
Marks a textures as being used for level and is transparant.
int bm_release(int handle, int clear_render_targets)
Frees both a bitmap's data and it's associated slot.
void stuff_float(float *f)
void mflash_page_in(bool load_all)
GLdouble GLdouble GLdouble r
void stuff_string(char *outstr, int type, int len, char *terminators)
int required_string(const char *pstr)
void parse_mflash_tbl(const char *filename)
int optional_string(const char *pstr)
void read_file_text(const char *filename, int mode, char *processed_text, char *raw_text)
#define GM_STANDALONE_SERVER
void reset_parse(char *text)
GLuint const GLchar * name
char name[MAX_FILENAME_LEN]
void operator=(const mflash_info &r)
SCP_vector< mflash_blob_info > blobs
int parse_modular_table(const char *name_check, void(*parse_callback)(const char *filename), int path_type, int sort_type)
int bm_load_either(const char *filename, int *nframes, int *fps, int *keyframe, int can_drop_frames, int dir_type)
Loads either animation (bm_load_animation) or still image (bm_load)
mflash_blob_info(const mflash_blob_info &mbi)
SCP_vector< mflash_info > Mflash_info
mflash_info(const mflash_info &mi)
particle * particle_create(particle_info *pinfo)