mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-19 20:19:50 +02:00
entity_t and brush_t now converted to idEditorEntity and idEditorBrush
This commit is contained in:
@@ -175,7 +175,7 @@ void QE_CheckAutoSave(void) {
|
||||
if (g_PrefsDlg.m_bSnapShots && stricmp(currentmap, "unnamed.map") != 0) {
|
||||
Map_Snapshot();
|
||||
} else {
|
||||
Map_SaveFile(ValueForKey(g_qeglobals.d_project_entity, (autoToggle == 0) ? "autosave1" : "autosave2" ), false, true);
|
||||
Map_SaveFile(g_qeglobals.d_project_entity->ValueForKey((autoToggle == 0) ? "autosave1" : "autosave2" ), false, true);
|
||||
autoToggle ^= 1;
|
||||
}
|
||||
Sys_Status("Autosaving...Saved.", 0);
|
||||
@@ -231,19 +231,19 @@ bool QE_LoadProject(char *projectfile) {
|
||||
fileSystem->FreeFile( data );
|
||||
|
||||
StartTokenParsing(strData.GetBuffer(0));
|
||||
g_qeglobals.d_project_entity = Entity_Parse(true);
|
||||
g_qeglobals.d_project_entity = idEditorEntity::Entity_Parse(true);
|
||||
if (!g_qeglobals.d_project_entity) {
|
||||
Error("Couldn't parse %s", projectfile);
|
||||
}
|
||||
|
||||
// set here some default project settings you need
|
||||
if (strlen(ValueForKey(g_qeglobals.d_project_entity, "brush_primit")) == 0) {
|
||||
SetKeyValue(g_qeglobals.d_project_entity, "brush_primit", "0");
|
||||
if (strlen(g_qeglobals.d_project_entity->ValueForKey("brush_primit")) == 0) {
|
||||
g_qeglobals.d_project_entity->SetKeyValue("brush_primit", "0");
|
||||
}
|
||||
|
||||
g_qeglobals.m_bBrushPrimitMode = IntForKey(g_qeglobals.d_project_entity, "brush_primit");
|
||||
g_qeglobals.m_bBrushPrimitMode = g_qeglobals.d_project_entity->IntForKey("brush_primit");
|
||||
|
||||
Eclass_InitForSourceDirectory(ValueForKey(g_qeglobals.d_project_entity, "entitypath"));
|
||||
Eclass_InitForSourceDirectory(g_qeglobals.d_project_entity->ValueForKey("entitypath"));
|
||||
g_Inspectors->FillClassList(); // list in entity window
|
||||
|
||||
Map_New();
|
||||
@@ -256,7 +256,7 @@ bool QE_LoadProject(char *projectfile) {
|
||||
|
||||
/*
|
||||
=======================================================================================================================
|
||||
QE_SaveProject £
|
||||
QE_SaveProject �
|
||||
=======================================================================================================================
|
||||
*/
|
||||
bool QE_SaveProject(const char *pProjectFile) {
|
||||
@@ -290,7 +290,7 @@ bool QE_SaveProject(const char *pProjectFile) {
|
||||
=======================================================================================================================
|
||||
*/
|
||||
void ConnectEntities(void) {
|
||||
entity_t *e1;
|
||||
idEditorEntity *e1;
|
||||
const char *target;
|
||||
idStr strTarget;
|
||||
int i, t;
|
||||
@@ -319,10 +319,10 @@ void ConnectEntities(void) {
|
||||
}
|
||||
}
|
||||
|
||||
target = ValueForKey(e1, "target");
|
||||
target = e1->ValueForKey("target");
|
||||
if ( target && *target) {
|
||||
for (t = 1; t < 2048; t++) {
|
||||
target = ValueForKey(e1, va("target%i", t));
|
||||
target = e1->ValueForKey(va("target%i", t));
|
||||
if (target && *target) {
|
||||
continue;
|
||||
} else {
|
||||
@@ -334,16 +334,16 @@ void ConnectEntities(void) {
|
||||
}
|
||||
|
||||
for (i = 1; i < g_qeglobals.d_select_count; i++) {
|
||||
target = ValueForKey(g_qeglobals.d_select_order[i]->owner, "name");
|
||||
target = g_qeglobals.d_select_order[i]->owner->ValueForKey("name");
|
||||
if (target && *target) {
|
||||
strTarget = target;
|
||||
} else {
|
||||
UniqueTargetName(strTarget);
|
||||
}
|
||||
if (t == 0) {
|
||||
SetKeyValue(e1, "target", strTarget);
|
||||
e1->SetKeyValue("target", strTarget);
|
||||
} else {
|
||||
SetKeyValue(e1, va("target%i", t), strTarget);
|
||||
e1->SetKeyValue(va("target%i", t), strTarget);
|
||||
}
|
||||
t++;
|
||||
}
|
||||
@@ -388,7 +388,7 @@ void QE_Init(void) {
|
||||
g_qeglobals.d_showgrid = true;
|
||||
|
||||
/*
|
||||
* other stuff £
|
||||
* other stuff �
|
||||
* FIXME: idMaterial Texture_Init (true); Cam_Init (); XY_Init ();
|
||||
*/
|
||||
Z_Init();
|
||||
@@ -405,8 +405,8 @@ void QE_CountBrushesAndUpdateStatusBar(void) {
|
||||
static int s_lastbrushcount, s_lastentitycount;
|
||||
static bool s_didonce;
|
||||
|
||||
// entity_t *e;
|
||||
brush_t *b, *next;
|
||||
// idEditorEntity *e;
|
||||
idEditorBrush *b, *next;
|
||||
|
||||
g_numbrushes = 0;
|
||||
g_numentities = 0;
|
||||
@@ -437,4 +437,3 @@ void QE_CountBrushesAndUpdateStatusBar(void) {
|
||||
s_didonce = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user