mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-20 04:30:12 +02:00
entity_t and brush_t now converted to idEditorEntity and idEditorBrush
This commit is contained in:
@@ -40,7 +40,7 @@ CSG_MakeHollow
|
||||
*/
|
||||
void CSG_MakeHollow (void)
|
||||
{
|
||||
brush_t *b, *front, *back, *next;
|
||||
idEditorBrush *b, *front, *back, *next;
|
||||
face_t *f;
|
||||
face_t split;
|
||||
idVec3 move;
|
||||
@@ -63,7 +63,7 @@ void CSG_MakeHollow (void)
|
||||
if (back)
|
||||
Brush_Free (back);
|
||||
if (front)
|
||||
Brush_AddToList (front, &selected_brushes);
|
||||
front->Brush_AddToList(&selected_brushes);
|
||||
}
|
||||
Brush_Free (b);
|
||||
}
|
||||
@@ -83,10 +83,10 @@ Brush_Merge
|
||||
be the same as well.
|
||||
=============
|
||||
*/
|
||||
brush_t *Brush_Merge(brush_t *brush1, brush_t *brush2, int onlyshape)
|
||||
idEditorBrush *Brush_Merge(idEditorBrush *brush1, idEditorBrush *brush2, int onlyshape)
|
||||
{
|
||||
int i, shared;
|
||||
brush_t *newbrush;
|
||||
idEditorBrush *newbrush;
|
||||
face_t *face1, *face2, *newface, *f;
|
||||
|
||||
// check for bounding box overlapp
|
||||
@@ -214,9 +214,9 @@ brush_t *Brush_Merge(brush_t *brush1, brush_t *brush2, int onlyshape)
|
||||
newbrush->brush_faces = newface;
|
||||
}
|
||||
// link the new brush to an entity
|
||||
Entity_LinkBrush (brush1->owner, newbrush);
|
||||
brush1->owner->Entity_LinkBrush(newbrush);
|
||||
// build windings for the faces
|
||||
Brush_BuildWindings( newbrush, false);
|
||||
newbrush->Brush_BuildWindings(false);
|
||||
return newbrush;
|
||||
}
|
||||
|
||||
@@ -230,11 +230,11 @@ Brush_MergeListPairs
|
||||
Input and output should be a single linked list using .next
|
||||
=============
|
||||
*/
|
||||
brush_t *Brush_MergeListPairs(brush_t *brushlist, int onlyshape)
|
||||
idEditorBrush *Brush_MergeListPairs(idEditorBrush *brushlist, int onlyshape)
|
||||
{
|
||||
int nummerges, merged;
|
||||
brush_t *b1, *b2, *tail, *newbrush, *newbrushlist;
|
||||
brush_t *lastb2;
|
||||
idEditorBrush *b1, *b2, *tail, *newbrush, *newbrushlist;
|
||||
idEditorBrush *lastb2;
|
||||
|
||||
if (!brushlist) return NULL;
|
||||
|
||||
@@ -301,9 +301,9 @@ Brush_MergeList
|
||||
be the same as well.
|
||||
=============
|
||||
*/
|
||||
brush_t *Brush_MergeList(brush_t *brushlist, int onlyshape)
|
||||
idEditorBrush *Brush_MergeList(idEditorBrush *brushlist, int onlyshape)
|
||||
{
|
||||
brush_t *brush1, *brush2, *brush3, *newbrush;
|
||||
idEditorBrush *brush1, *brush2, *brush3, *newbrush;
|
||||
face_t *face1, *face2, *face3, *newface, *f;
|
||||
|
||||
if (!brushlist) return NULL;
|
||||
@@ -410,9 +410,9 @@ brush_t *Brush_MergeList(brush_t *brushlist, int onlyshape)
|
||||
}
|
||||
}
|
||||
// link the new brush to an entity
|
||||
Entity_LinkBrush (brushlist->owner, newbrush);
|
||||
brushlist->owner->Entity_LinkBrush(newbrush);
|
||||
// build windings for the faces
|
||||
Brush_BuildWindings( newbrush, false);
|
||||
newbrush->Brush_BuildWindings(false);
|
||||
return newbrush;
|
||||
}
|
||||
|
||||
@@ -425,11 +425,11 @@ Brush_Subtract
|
||||
The originals are undisturbed.
|
||||
=============
|
||||
*/
|
||||
brush_t *Brush_Subtract(brush_t *a, brush_t *b)
|
||||
idEditorBrush *Brush_Subtract(idEditorBrush *a, idEditorBrush *b)
|
||||
{
|
||||
// a - b = out (list)
|
||||
brush_t *front, *back;
|
||||
brush_t *in, *out, *next;
|
||||
idEditorBrush *front, *back;
|
||||
idEditorBrush *in, *out, *next;
|
||||
face_t *f;
|
||||
|
||||
in = a;
|
||||
@@ -470,8 +470,8 @@ CSG_Subtract
|
||||
*/
|
||||
void CSG_Subtract (void)
|
||||
{
|
||||
brush_t *b, *s, *fragments, *nextfragment, *frag, *next, *snext;
|
||||
brush_t fragmentlist;
|
||||
idEditorBrush *b, *s, *fragments, *nextfragment, *frag, *next, *snext;
|
||||
idEditorBrush fragmentlist;
|
||||
int i, numfragments, numbrushes;
|
||||
|
||||
Sys_Status ("Subtracting...\n");
|
||||
@@ -517,7 +517,7 @@ void CSG_Subtract (void)
|
||||
nextfragment = frag->next;
|
||||
frag->next = NULL;
|
||||
frag->owner = s->owner;
|
||||
Brush_AddToList(frag, &fragmentlist);
|
||||
frag->Brush_AddToList(&fragmentlist);
|
||||
}
|
||||
// free the original brush
|
||||
Brush_Free(s);
|
||||
@@ -560,7 +560,7 @@ void CSG_Subtract (void)
|
||||
nextfragment = frag->next;
|
||||
frag->next = NULL;
|
||||
frag->owner = s->owner;
|
||||
Brush_AddToList(frag, &fragmentlist);
|
||||
frag->Brush_AddToList(&fragmentlist);
|
||||
}
|
||||
// free the original brush
|
||||
Brush_Free(s);
|
||||
@@ -572,8 +572,8 @@ void CSG_Subtract (void)
|
||||
{
|
||||
nextfragment = frag->next;
|
||||
numfragments++;
|
||||
Brush_RemoveFromList(frag);
|
||||
Brush_AddToList(frag, &active_brushes);
|
||||
frag->Brush_RemoveFromList();
|
||||
frag->Brush_AddToList(&active_brushes);
|
||||
Undo_EndBrush(frag);
|
||||
}
|
||||
|
||||
@@ -596,8 +596,8 @@ CSG_Merge
|
||||
*/
|
||||
void CSG_Merge(void)
|
||||
{
|
||||
brush_t *b, *next, *newlist, *newbrush;
|
||||
struct entity_s *owner;
|
||||
idEditorBrush *b, *next, *newlist, *newbrush;
|
||||
idEditorEntity *owner;
|
||||
|
||||
Sys_Status("Merging...\n");
|
||||
|
||||
@@ -651,7 +651,7 @@ void CSG_Merge(void)
|
||||
{
|
||||
next = b->next;
|
||||
|
||||
Brush_RemoveFromList(b);
|
||||
b->Brush_RemoveFromList();
|
||||
b->next = newlist;
|
||||
b->prev = NULL;
|
||||
newlist = b;
|
||||
@@ -667,7 +667,7 @@ void CSG_Merge(void)
|
||||
next = b->next;
|
||||
b->next = NULL;
|
||||
b->prev = NULL;
|
||||
Brush_AddToList(b, &selected_brushes);
|
||||
b->Brush_AddToList(&selected_brushes);
|
||||
}
|
||||
Sys_Status("Cannot add a set of brushes with a concave hull.\n");
|
||||
return;
|
||||
@@ -680,7 +680,7 @@ void CSG_Merge(void)
|
||||
b->prev = NULL;
|
||||
Brush_Free(b);
|
||||
}
|
||||
Brush_AddToList(newbrush, &selected_brushes);
|
||||
newbrush->Brush_AddToList(&selected_brushes);
|
||||
|
||||
Sys_Status ("done.\n");
|
||||
Sys_UpdateWindows (W_ALL);
|
||||
|
||||
Reference in New Issue
Block a user