Move compress_objects into #if DXX_USE_EDITOR
This is only called in the editor build, so exclude it from being built in the non-editor build.
This commit is contained in:
parent
c0c4ee7049
commit
26d8c2881e
|
@ -208,8 +208,10 @@ void obj_delete(d_level_unique_object_state &LevelUniqueObjectState, segment_arr
|
|||
// compressed
|
||||
void reset_objects(d_level_unique_object_state &, unsigned n_objs);
|
||||
|
||||
#if DXX_USE_EDITOR
|
||||
// make object array non-sparse
|
||||
void compress_objects();
|
||||
#endif
|
||||
|
||||
// set viewer object to next object in array
|
||||
void object_goto_next_viewer(const object_array &Objects, const object *&viewer);
|
||||
|
|
|
@ -2115,7 +2115,7 @@ window_event_result endlevel_move_all_objects(const d_level_shared_robot_info_st
|
|||
//--unused--
|
||||
//--unused-- }
|
||||
|
||||
|
||||
#if DXX_USE_EDITOR
|
||||
//make object array non-sparse
|
||||
void compress_objects(void)
|
||||
{
|
||||
|
@ -2138,10 +2138,8 @@ void compress_objects(void)
|
|||
|
||||
*start_objp = *h;
|
||||
|
||||
#if DXX_USE_EDITOR
|
||||
if (Cur_object_index == Highest_object_index)
|
||||
Cur_object_index = start_i;
|
||||
#endif
|
||||
|
||||
h->type = OBJ_NONE;
|
||||
|
||||
|
@ -2168,6 +2166,7 @@ void compress_objects(void)
|
|||
}
|
||||
reset_objects(LevelUniqueObjectState, LevelUniqueObjectState.num_objects);
|
||||
}
|
||||
#endif
|
||||
|
||||
//called after load. Takes number of objects, and objects should be
|
||||
//compressed. resets free list, marks unused objects as unused
|
||||
|
|
Loading…
Reference in a new issue