Simplify bm_free_extra_models
This commit is contained in:
parent
05a91f9b58
commit
0d0297553e
|
@ -50,7 +50,7 @@ extern segnum_t exit_segnum;
|
||||||
//called for each level to load & setup the exit sequence
|
//called for each level to load & setup the exit sequence
|
||||||
void load_endlevel_data(int level_num);
|
void load_endlevel_data(int level_num);
|
||||||
|
|
||||||
extern int exit_modelnum, destroyed_exit_modelnum;
|
extern unsigned exit_modelnum, destroyed_exit_modelnum;
|
||||||
extern vms_matrix surface_orient;
|
extern vms_matrix surface_orient;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -394,10 +394,10 @@ static void bm_free_extra_objbitmaps()
|
||||||
|
|
||||||
static void bm_free_extra_models()
|
static void bm_free_extra_models()
|
||||||
{
|
{
|
||||||
while (N_polygon_models > N_D2_POLYGON_MODELS)
|
auto base = std::min(N_D2_POLYGON_MODELS, exit_modelnum);
|
||||||
free_model(&Polygon_models[--N_polygon_models]);
|
range_for (auto &p, partial_range(Polygon_models, base, N_polygon_models))
|
||||||
while (N_polygon_models > exit_modelnum)
|
free_model(&p);
|
||||||
free_model(&Polygon_models[--N_polygon_models]);
|
N_polygon_models = base;
|
||||||
}
|
}
|
||||||
|
|
||||||
//type==1 means 1.1, type==2 means 1.2 (with weapons)
|
//type==1 means 1.1, type==2 means 1.2 (with weapons)
|
||||||
|
|
|
@ -158,14 +158,14 @@ static grs_bitmap *satellite_bitmap;
|
||||||
grs_bitmap *terrain_bitmap; //!!*exit_bitmap,
|
grs_bitmap *terrain_bitmap; //!!*exit_bitmap,
|
||||||
vms_vector satellite_pos,satellite_upvec;
|
vms_vector satellite_pos,satellite_upvec;
|
||||||
//!!grs_bitmap **exit_bitmap_list[1];
|
//!!grs_bitmap **exit_bitmap_list[1];
|
||||||
int station_modelnum,exit_modelnum,destroyed_exit_modelnum;
|
unsigned exit_modelnum,destroyed_exit_modelnum;
|
||||||
|
|
||||||
static vms_vector station_pos{0xf8c4<<10,0x3c1c<<12,0x372<<10};
|
static vms_vector station_pos{0xf8c4<<10,0x3c1c<<12,0x372<<10};
|
||||||
|
|
||||||
#ifdef STATION_ENABLED
|
#ifdef STATION_ENABLED
|
||||||
static grs_bitmap *station_bitmap;
|
static grs_bitmap *station_bitmap;
|
||||||
grs_bitmap **station_bitmap_list[1];
|
grs_bitmap **station_bitmap_list[1];
|
||||||
int station_modelnum;
|
static unsigned station_modelnum;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
vms_vector mine_exit_point;
|
vms_vector mine_exit_point;
|
||||||
|
|
Loading…
Reference in a new issue