mirror of
https://github.com/kevinbentley/Descent3.git
synced 2025-01-22 19:55:23 +00:00
Consolidate duplicated struct obj_sort_item
This commit is contained in:
parent
6ad7a3d5cb
commit
26e5cfa2d5
@ -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) {
|
||||
|
@ -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];
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user