Centralize N_D2_* constants in bm.h

This commit is contained in:
Kp 2014-09-27 15:42:45 +00:00
parent e6bd1ae52c
commit afd995aa22
3 changed files with 10 additions and 16 deletions

View file

@ -147,6 +147,16 @@ int ds_load(int skip, const char * filename );
int compute_average_pixel(grs_bitmap *n);
void bm_write_all(PHYSFS_file *fp);
#if defined(DXX_BUILD_DESCENT_II)
//these values are the number of each item in the release of d2
//extra items added after the release get written in an additional hamfile
static const unsigned N_D2_ROBOT_TYPES = 66;
static const unsigned N_D2_ROBOT_JOINTS = 1145;
static const unsigned N_D2_OBJBITMAPS = 422;
static const unsigned N_D2_OBJBITMAPPTRS = 502;
static const unsigned N_D2_WEAPON_TYPES = 62;
#endif
#endif
#endif /* _BM_H */

View file

@ -2081,14 +2081,6 @@ void bm_read_hostage()
}
}
//these values are the number of each item in the release of d2
//extra items added after the release get written in an additional hamfile
#define N_D2_ROBOT_TYPES 66
#define N_D2_ROBOT_JOINTS 1145
#define N_D2_OBJBITMAPS 422
#define N_D2_OBJBITMAPPTRS 502
#define N_D2_WEAPON_TYPES 62
DEFINE_SERIAL_UDT_TO_MESSAGE(tmap_info, t, (t.flags, serial::pad<3>(), t.lighting, t.damage, t.eclip_num, t.destroyed, t.slide_u, t.slide_v));
ASSERT_SERIAL_UDT_MESSAGE_SIZE(tmap_info, 20);

View file

@ -375,14 +375,6 @@ void bm_read_all(PHYSFS_file * fp)
exit_modelnum = destroyed_exit_modelnum = N_polygon_models;
}
//these values are the number of each item in the release of d2
//extra items added after the release get written in an additional hamfile
#define N_D2_ROBOT_TYPES 66
#define N_D2_ROBOT_JOINTS 1145
#define N_D2_OBJBITMAPS 422
#define N_D2_OBJBITMAPPTRS 502
#define N_D2_WEAPON_TYPES 62
int extra_bitmap_num = 0;
static void bm_free_extra_objbitmaps()