Consolidate duplicated struct obj_sort_item

This commit is contained in:
Jan Engelhardt 2024-09-09 08:31:14 +02:00
parent 6ad7a3d5cb
commit 26e5cfa2d5
3 changed files with 6 additions and 14 deletions

View File

@ -2986,13 +2986,6 @@ void RenderRoom(room *rp) {
}
#define MAX_OBJECTS_PER_ROOM 2000
namespace {
struct obj_sort_item {
int vis_effect;
int objnum;
float dist;
};
}
obj_sort_item obj_sort_list[MAX_OBJECTS_PER_ROOM];
// Compare function for room face sort
static int obj_sort_func(const obj_sort_item *a, const obj_sort_item *b) {

View File

@ -239,6 +239,12 @@ struct state_limited_element {
int sort_key;
};
struct obj_sort_item {
int vis_effect;
int objnum;
float dist;
};
#define MAX_STATE_ELEMENTS 8000
extern state_limited_element State_elements[MAX_STATE_ELEMENTS];

View File

@ -940,13 +940,6 @@ float GetTerrainDynamicScalar(vector *pos, int seg) {
}
// Takes a min,max vector and makes a surrounding cube from it
void MakePointsFromMinMax(vector *corners, vector *minp, vector *maxp);
namespace {
struct obj_sort_item {
int objnum;
float dist;
int vis_effect;
};
}
// Compare function for room face sort
static int obj_sort_func(const obj_sort_item *a, const obj_sort_item *b) {
if (a->dist < b->dist)