entity_t and brush_t now converted to idEditorEntity and idEditorBrush

This commit is contained in:
Justin Marshall
2026-05-24 11:33:16 -07:00
parent d6d01e1faf
commit 3242531044
41 changed files with 1598 additions and 1540 deletions
+28 -28
View File
@@ -1260,7 +1260,7 @@ void CEntityDlg::OnCbnSelchangeComboClass() {
editEntity = selected_brushes.next->owner;
multipleEntities = false;
for (brush_t* b = selected_brushes.next->next; b != &selected_brushes; b = b->next) {
for (idEditorBrush* b = selected_brushes.next->next; b != &selected_brushes; b = b->next) {
if (b->owner != editEntity) {
multipleEntities = true;
break;
@@ -1489,14 +1489,14 @@ void CEntityDlg::DelProp() {
editKey.GetWindowText(key);
if (multipleEntities) {
for (brush_t* b = selected_brushes.next; b != &selected_brushes; b = b->next) {
DeleteKey(b->owner, key);
Entity_UpdateCurveData(b->owner);
for (idEditorBrush* b = selected_brushes.next; b != &selected_brushes; b = b->next) {
b->owner->DeleteKey(key);
b->owner->Entity_UpdateCurveData();
}
}
else {
DeleteKey(editEntity, key);
Entity_UpdateCurveData(editEntity);
editEntity->DeleteKey(key);
editEntity->Entity_UpdateCurveData();
}
SetKeyValPairs();
@@ -1626,24 +1626,24 @@ void CEntityDlg::AddProp() {
bool isOrigin = (idStr::Icmp(Key, "origin") == 0);
if (multipleEntities) {
for (brush_t* b = selected_brushes.next; b != &selected_brushes; b = b->next) {
for (idEditorBrush* b = selected_brushes.next; b != &selected_brushes; b = b->next) {
if (isName) {
Entity_SetName(b->owner, Value);
b->owner->Entity_SetName(Value);
}
else {
if (!((isModel || isOrigin) && (b->owner->eclass->nShowFlags & ECLASS_WORLDSPAWN))) {
SetKeyValue(b->owner, Key, Value);
b->owner->SetKeyValue(Key, Value);
}
}
}
}
else {
if (isName) {
Entity_SetName(editEntity, Value);
editEntity->Entity_SetName(Value);
}
else {
if (!((isModel || isOrigin) && (editEntity->eclass->nShowFlags & ECLASS_WORLDSPAWN))) {
SetKeyValue(editEntity, Key, Value);
editEntity->SetKeyValue(Key, Value);
}
}
@@ -1667,8 +1667,8 @@ void CEntityDlg::AddProp() {
VectorAdd(mins, editEntity->origin, mins);
VectorAdd(maxs, editEntity->origin, maxs);
Brush_RebuildBrush(selected_brushes.next, mins, maxs, false);
Brush_Build(selected_brushes.next, false, false, false, true);
selected_brushes.next->Brush_RebuildBrush(mins, maxs, false);
selected_brushes.next->Brush_Build(false, false, false, true);
}
}
@@ -1828,7 +1828,7 @@ CPreviewDlg* CEntityDlg::ShowParticleChooser() {
return &modelDlg;
}
CPreviewDlg* CEntityDlg::ShowSkinChooser(entity_t* ent) {
CPreviewDlg* CEntityDlg::ShowSkinChooser(idEditorEntity* ent) {
static CPreviewDlg modelDlg;
modelDlg.SetMode(CPreviewDlg::SKINS);
modelDlg.SetModal();
@@ -1978,7 +1978,7 @@ void CEntityDlg::OnBnClickedButtonCurve() {
editVal.SetWindowText(str);
AddProp();
Entity_SetCurveData(editEntity);
editEntity->Entity_SetCurveData();
}
}
}
@@ -1995,7 +1995,7 @@ void CEntityDlg::OnCbnDblclkComboClass() {
// --------------------------------------------------------------------------
void CEntityDlg::CreateEntity() {
entity_t* petNew;
idEditorEntity* petNew;
bool forceFixed = false;
CXYWnd* pWnd = g_pParentWnd->ActiveXY();
@@ -2032,33 +2032,33 @@ void CEntityDlg::CreateEntity() {
eclass_t* pecNew = Eclass_ForName(str, false);
if ((GetAsyncKeyState(VK_CONTROL) & 0x8000)) {
extern void Brush_CopyList(brush_t * pFrom, brush_t * pTo);
extern void Brush_CopyList(idEditorBrush * pFrom, idEditorBrush * pTo);
brush_t temp_brushes;
idEditorBrush temp_brushes;
temp_brushes.next = &temp_brushes;
Brush_CopyList(&selected_brushes, &temp_brushes);
Select_Deselect();
brush_t* pBrush = temp_brushes.next;
idEditorBrush* pBrush = temp_brushes.next;
while (pBrush != NULL && pBrush != &temp_brushes) {
brush_t* pNext = pBrush->next;
idEditorBrush* pNext = pBrush->next;
Brush_RemoveFromList(pBrush);
Brush_AddToList(pBrush, &selected_brushes);
pBrush->Brush_RemoveFromList();
pBrush->Brush_AddToList(&selected_brushes);
pBrush = pNext;
petNew = Entity_Create(pecNew, forceFixed);
petNew = idEditorEntity::Entity_Create(pecNew, forceFixed);
Select_Deselect();
}
}
else if ((GetAsyncKeyState(VK_SHIFT) & 0x8000)) {
Select_Ungroup();
petNew = Entity_Create(pecNew, forceFixed);
petNew = idEditorEntity::Entity_Create(pecNew, forceFixed);
}
else {
petNew = Entity_Create(pecNew, forceFixed);
petNew = idEditorEntity::Entity_Create(pecNew, forceFixed);
}
if (petNew == NULL) {
@@ -2133,7 +2133,7 @@ void CEntityDlg::UpdateKeyVal(const char* key, const char* val) {
SetKeyValPairs();
g_pParentWnd->GetCamera()->BuildEntityRenderState(editEntity, true);
Entity_UpdateSoundEmitter(editEntity);
editEntity->Entity_UpdateSoundEmitter();
}
}
@@ -2326,7 +2326,7 @@ void CEntityDlg::InsertCurvePoint() {
AddCurvePoints();
}
else {
idCurve<idVec3>* newCurve = Entity_MakeCurve(editEntity);
idCurve<idVec3>* newCurve = editEntity->Entity_MakeCurve();
if (newCurve == NULL) {
return;
@@ -2414,7 +2414,7 @@ void CEntityDlg::UpdateEntityCurve() {
return;
}
Entity_UpdateCurveData(editEntity);
editEntity->Entity_UpdateCurveData();
if (g_qeglobals.d_select_mode == sel_editpoint) {
g_qeglobals.d_numpoints = 0;