Go to the source code of this file.
|
|
|
|
||||||||||||
|
Definition at line 109 of file ENTITY.CPP. References epair_t, free(), epair_s::key, epair_s::next, next, strcmp(), and epair_s::value. Referenced by DeleteKey(), DelProp(), Group_RemoveBrush(), Group_RemoveListFromWorld(), ProjectDlgProc(), and Select_Clone(). 00110 {
00111 epair_t **ep, *next;
00112
00113 ep = &e;
00114 while (*ep)
00115 {
00116 next = *ep;
00117 if ( !strcmp (next->key, key) )
00118 {
00119 *ep = next->next;
00120 free(next->key);
00121 free(next->value);
00122 free(next);
00123 return;
00124 }
00125 ep = &next->next;
00126 }
00127 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 130 of file ENTITY.CPP. References DeleteKey(), and entity_t::epairs.
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 847 of file ECLASS.CPP. References e, Eclass_InitFromText(), Eclass_InsertAlphabetized(), eclass_t, init(), eclass_s::name, name, eclass_s::next, sprintf(), strcmp(), and Sys_Printf(). Referenced by CPlugInManager::CommitEntityHandleToMap(), CreateEntity(), CreateEntityFromName(), Entity_Parse(), Map_New(), Patch_BrushToMesh(), Patch_CapCurrent(), and Patch_Thicken(). 00848 {
00849 eclass_t *e;
00850 char init[1024];
00851
00852 #ifdef _DEBUG
00853 // grouping stuff, not an eclass
00854 if (strcmp(name, "group_info")==0)
00855 Sys_Printf("WARNING: unexpected group_info entity in Eclass_ForName\n");
00856 #endif
00857
00858 if (!name)
00859 return eclass_bad;
00860
00861 for (e=eclass ; e ; e=e->next)
00862 if (!strcmp (name, e->name))
00863 return e;
00864
00865 // create a new class for it
00866 if (has_brushes)
00867 {
00868 sprintf (init, "/*QUAKED %s (0 0.5 0) ?\nNot found in source.\n", name);
00869 e = Eclass_InitFromText (init);
00870 }
00871 else
00872 {
00873 sprintf (init, "/*QUAKED %s (0 0.5 0) (-8 -8 -8) (8 8 8)\nNot found in source.\n", name);
00874 e = Eclass_InitFromText (init);
00875 }
00876
00877 Eclass_InsertAlphabetized (e);
00878
00879 return e;
00880 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 554 of file ECLASS.CPP. References e, eclass_t, entitymodel, free(), i, j, LoadModel(), eclass_s::model, eclass_s::modelpath, entitymodel_t::nTriCount, NULL, entitymodel_t::pNext, qboolean, qmalloc(), eclass_s::skinpath, strtok(), vec3_t, VectorAdd, VectorScale, and VectorSnap(). Referenced by GetCachedModel(), and HasModel(). 00555 {
00556 if (e->modelpath != NULL)
00557 {
00558 if (e->model == NULL)
00559 {
00560 e->model = reinterpret_cast<entitymodel_t*>(qmalloc(sizeof(entitymodel_t)));
00561 }
00562 char *pModelBuff = strdup(e->modelpath);
00563 char *pSkinBuff = NULL;
00564 if (e->skinpath)
00565 {
00566 pSkinBuff = strdup(e->skinpath);
00567 }
00568
00569 CStringList Models;
00570 CStringList Skins;
00571 char* pToken = strtok(pModelBuff, ";\0");
00572 while (pToken != NULL)
00573 {
00574 Models.AddTail(pToken);
00575 pToken = strtok(NULL, ";\0");
00576 }
00577
00578 if (pSkinBuff != NULL)
00579 {
00580 pToken = strtok(pSkinBuff, ";\0");
00581 while (pToken != NULL)
00582 {
00583 Skins.AddTail(pToken);
00584 pToken = strtok(NULL, ";\0");
00585 }
00586 }
00587
00588 entitymodel *model = e->model;
00589 for (int i = 0; i < Models.GetCount(); i++)
00590 {
00591 char *pSkin = NULL;
00592 if (i < Skins.GetCount())
00593 {
00594 pSkin = Skins.GetAt(Skins.FindIndex(i)).GetBuffer(0);
00595 }
00596 LoadModel(Models.GetAt(Models.FindIndex(i)), e, vMin, vMax, model, pSkin);
00597 model->pNext = reinterpret_cast<entitymodel_t*>(qmalloc(sizeof(entitymodel_t)));
00598 model = model->pNext;
00599 }
00600
00601 // at this poitn vMin and vMax contain the min max of the model
00602 // which needs to be centered at origin 0, 0, 0
00603
00604 VectorSnap(vMin);
00605 VectorSnap(vMax);
00606
00607 if (vMax[0] - vMin[0] < 2)
00608 {
00609 vMin[0] -= 1;
00610 vMax[0] += 1;
00611 }
00612
00613 if (vMin[1] - vMax[1] < 2)
00614 {
00615 vMin[1] -= 1;
00616 vMax[1] += 1;
00617 }
00618
00619 if (vMax[2] - vMin[2] < 2)
00620 {
00621 vMax[2] -= 1;
00622 vMax[2] += 1;
00623 }
00624
00625 vec3_t vTemp;
00626 VectorAdd(vMin, vMax, vTemp);
00627 VectorScale(vTemp, 0.5, vTemp);
00628 model = e->model;
00629 while (model != NULL)
00630 {
00631 for (i = 0; i < model->nTriCount; i++)
00632 {
00633 for (int j = 0; j < 3; j++)
00634 {
00635 ;//VectorSubtract(model->pTriList[i].v[j], vTemp, model->pTriList[i].v[j]);
00636 }
00637 }
00638 model = model->pNext;
00639 }
00640
00641 free(pModelBuff);
00642 free(e->modelpath);
00643 e->modelpath = NULL;
00644
00645 if(e->skinpath)
00646 {
00647 free(e->skinpath);
00648 e->skinpath = NULL;
00649 free(pSkinBuff);
00650 }
00651
00652 }
00653 return (e->model != NULL && e->model->nTriCount > 0);
00654 }
|
Here is the call graph for this function:

|
|
Definition at line 795 of file ECLASS.CPP. References CleanUpEntities(), eclass, eclass_bad, Eclass_InitFromText(), Eclass_ScanFile(), file, QE_ConvertDOSToUnixName(), s, sprintf(), strcpy(), strDefFile, strlen(), and Sys_Printf(). Referenced by QE_LoadProject(). 00796 {
00797 struct _finddata_t fileinfo;
00798 int handle;
00799 char filename[1024];
00800 char filebase[1024];
00801 char temp[1024];
00802 char *s;
00803
00804 QE_ConvertDOSToUnixName( temp, path );
00805
00806 Sys_Printf ("Eclass_InitForSourceDirectory: %s\n", temp );
00807
00808 strcpy (filebase, path);
00809 s = filebase + strlen(filebase)-1;
00810 while (*s != '\\' && *s != '/' && s!=filebase)
00811 s--;
00812 *s = 0;
00813
00814 CleanUpEntities();
00815 eclass = NULL;
00816 //#ifdef BUILD_LIST
00817 if (g_bBuildList)
00818 strDefFile = "";
00819 //#endif
00820 handle = _findfirst (path, &fileinfo);
00821 if (handle != -1)
00822 {
00823 do
00824 {
00825 sprintf (filename, "%s\\%s", filebase, fileinfo.name);
00826 Eclass_ScanFile (filename);
00827 } while (_findnext( handle, &fileinfo ) != -1);
00828
00829 _findclose (handle);
00830 }
00831
00832 //#ifdef BUILD_LIST
00833 if (g_bBuildList)
00834 {
00835 CFile file;
00836 if (file.Open("c:\\entities.def", CFile::modeCreate | CFile::modeWrite))
00837 {
00838 file.Write(strDefFile.GetBuffer(0), strDefFile.GetLength());
00839 file.Close();
00840 }
00841 }
00842 //#endif
00843
00844 eclass_bad = Eclass_InitFromText ("/*QUAKED UNKNOWN_CLASS (0 0.5 0) ?");
00845 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 188 of file ENTITY.CPP. Referenced by Entity_Clone(), Entity_Create(), Undo_AddEntity(), Undo_Redo(), and Undo_Undo(). 00189 {
00190 if (e->next || e->prev)
00191 Error ("Entity_AddToList: allready linked");
00192 e->next = list->next;
00193 list->next->prev = e;
00194 list->next = e;
00195 e->prev = list;
00196 }
|
Here is the call graph for this function:

|
|
Definition at line 852 of file ENTITY.CPP. References entity_t::brushes, copystring(), e, entities, Entity_AddToList(), epair_t, entity_t::epairs, g_entityId, epair_s::key, n, nlist::next, epair_s::next, np, qmalloc(), and epair_s::value. Referenced by CXYWnd::Paste(), Select_Clone(), and Undo_AddEntity(). 00853 {
00854 entity_t *n;
00855 epair_t *ep, *np;
00856
00857 n = (entity_t*)qmalloc(sizeof(*n));
00858 n->entityId = g_entityId++;
00859 n->brushes.onext = n->brushes.oprev = &n->brushes;
00860 n->eclass = e->eclass;
00861
00862 // add the entity to the entity list
00863 Entity_AddToList(n, &entities);
00864
00865 for (ep = e->epairs ; ep ; ep=ep->next)
00866 {
00867 np = (epair_t*)qmalloc(sizeof(*np));
00868 np->key = copystring(ep->key);
00869 np->value = copystring(ep->value);
00870 np->next = n->epairs;
00871 n->epairs = np;
00872 }
00873 return n;
00874 }
|
Here is the call graph for this function:

|
|
Definition at line 697 of file ENTITY.CPP. References b, Brush_Build(), Brush_Create(), brush_t, entity_t::brushes, c, CPlugIn::CreatePluginEntity(), e, eclass_t, entities, Entity_AddToList(), Entity_LinkBrush(), Entity_UnlinkBrush(), eclass_s::fixedsize, g_entityId, g_pParentWnd, IPluginEntity::GetBounds(), CMainFrame::GetPlugInMgr(), eclass_s::hPlug, i, eclass_s::maxs, eclass_s::mins, brush_s::mins, eclass_s::name, brush_s::next, eclass_s::nShowFlags, brush_s::owner, CPlugInManager::PluginForModule(), brush_s::prev, qmalloc(), Select_Delete(), selected_brushes, SetKeyValue(), Sys_Beep(), Sys_Printf(), Sys_UpdateWindows(), eclass_s::texdef, vec3_t, VectorAdd, and W_ALL. Referenced by CreateEntity(), CreateEntityFromName(), Patch_BrushToMesh(), Patch_CapCurrent(), and Patch_Thicken(). 00698 {
00699 entity_t *e;
00700 brush_t *b;
00701 vec3_t mins, maxs;
00702 int i;
00703
00704 // check to make sure the brushes are ok
00705
00706 for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)
00707 {
00708 if (b->owner != world_entity)
00709 {
00710 Sys_Printf ("Entity NOT created, brushes not all from world\n");
00711 Sys_Beep ();
00712 return NULL;
00713 }
00714 }
00715
00716 // create it
00717
00718 e = (entity_t*)qmalloc(sizeof(*e));
00719 e->entityId = g_entityId++;
00720 e->brushes.onext = e->brushes.oprev = &e->brushes;
00721 e->eclass = c;
00722 SetKeyValue (e, "classname", c->name);
00723
00724 // add the entity to the entity list
00725 Entity_AddToList(e, &entities);
00726
00727 // plugin entity ?
00728 if (c->nShowFlags & ECLASS_PLUGINENTITY)
00729 {
00730 // locate the plugin
00731 CPlugIn * pPlug = g_pParentWnd->GetPlugInMgr().PluginForModule( c->hPlug );
00732 if (pPlug)
00733 {
00734 //
00735 // just use the selection for positioning
00736 //
00737 b = selected_brushes.next;
00738 for (i=0 ; i<3 ; i++)
00739 e->origin[i] = b->mins[i] - c->mins[i];
00740
00741 // create the plugin entity
00742 IPluginEntity* pPlugEnt = pPlug->CreatePluginEntity( e );
00743
00744 if (pPlugEnt)
00745 {
00746 e->pPlugEnt = pPlugEnt;
00747 // the brush is used to select and move
00748 pPlugEnt->GetBounds( mins, maxs );
00749 b = Brush_Create (mins, maxs, &c->texdef);
00750
00751 Entity_LinkBrush (e, b);
00752
00753 // delete the current selection
00754 Select_Delete ();
00755
00756 // select the new brush
00757 b->next = b->prev = &selected_brushes;
00758 selected_brushes.next = selected_brushes.prev = b;
00759
00760 Brush_Build( b );
00761 }
00762 }
00763 else
00764 {
00765 Sys_Printf( "WARNING: plugin lookup failed while creating a plugin entitiy in Entity_Create\n" );
00766 return NULL;
00767 }
00768 }
00769 else if (c->fixedsize)
00770 {
00771 //
00772 // just use the selection for positioning
00773 //
00774 b = selected_brushes.next;
00775 for (i=0 ; i<3 ; i++)
00776 e->origin[i] = b->mins[i] - c->mins[i];
00777
00778 // create a custom brush
00779 VectorAdd (c->mins, e->origin, mins);
00780 VectorAdd (c->maxs, e->origin, maxs);
00781
00782 b = Brush_Create (mins, maxs, &c->texdef);
00783
00784 Entity_LinkBrush (e, b);
00785
00786 // delete the current selection
00787 Select_Delete ();
00788
00789 // select the new brush
00790 b->next = b->prev = &selected_brushes;
00791 selected_brushes.next = selected_brushes.prev = b;
00792
00793 Brush_Build( b );
00794 }
00795 else
00796 {
00797 //
00798 // change the selected brushes over to the new entity
00799 //
00800 for (b=selected_brushes.next ; b != &selected_brushes ; b=b->next)
00801 {
00802 Entity_UnlinkBrush (b);
00803 Entity_LinkBrush (e, b);
00804 Brush_Build( b ); // so the key brush gets a name
00805 }
00806 }
00807
00808 Sys_UpdateWindows (W_ALL);
00809 return e;
00810 }
|
Here is the call graph for this function:

|
|
Definition at line 222 of file ENTITY.CPP. References Brush_Free(), entity_t::brushes, e, Entity_FreeEpairs(), and free(). Referenced by CPlugInManager::Cleanup(), CPlugInManager::CommitEntityHandleToMap(), Map_Free(), Map_LoadFile(), Map_SaveFile(), CMainFrame::OnDestroy(), Select_Ungroup(), Undo_Clear(), Undo_ClearRedo(), Undo_FreeFirstUndo(), Undo_Redo(), and Undo_Undo(). 00223 {
00224 // do we have a plugin entity ?
00225 if ( e->pPlugEnt )
00226 {
00227 e->pPlugEnt->DecRef();
00228 e->pPlugEnt = NULL;
00229 }
00230
00231 while (e->brushes.onext != &e->brushes)
00232 Brush_Free (e->brushes.onext);
00233
00234 if (e->next)
00235 {
00236 e->next->prev = e->prev;
00237 e->prev->next = e->next;
00238 }
00239
00240 Entity_FreeEpairs(e);
00241
00242 free (e);
00243 }
|
Here is the call graph for this function:

|
|
Definition at line 169 of file ENTITY.CPP. References e, epair_t, entity_t::epairs, free(), epair_s::key, epair_s::next, next, and epair_s::value. Referenced by Entity_Free(), Undo_Redo(), and Undo_Undo(). 00170 {
00171 epair_t *ep, *next;
00172
00173 for (ep = e->epairs; ep; ep = next)
00174 {
00175 next = ep->next;
00176 free (ep->key);
00177 free (ep->value);
00178 free (ep);
00179 }
00180 e->epairs = NULL;
00181 }
|
Here is the call graph for this function:

|
||||||||||||
|
Definition at line 818 of file ENTITY.CPP. References b, brush_t, entity_t::brushes, e, Error(), brush_s::onext, brush_s::oprev, and brush_s::owner. Referenced by AddBrushForPatch(), AddBrushForTerrain(), AddProp(), AddRegionBrushes(), Brush_MakeSided(), Brush_MakeSidedCone(), Brush_MakeSidedSphere(), Brush_Merge(), Brush_MergeList(), Brush_SplitBrushByFace(), CPlugInManager::CommitBrushHandleToEntity(), CPlugInManager::CommitBrushHandleToMap(), CXYWnd::Copy(), CopyAndSelect(), CopyToMap(), CreateEntityBrush(), CreateEntityFromName(), Entity_Create(), Entity_Parse(), Map_ImportBuffer(), CXYWnd::NewBrushDrag(), CMainFrame::OnCreate(), CXYWnd::Paste(), QERApp_CreateBrush(), Select_Clone(), Select_Ungroup(), Undo_Redo(), and Undo_Undo(). 00819 {
00820 if (b->oprev || b->onext)
00821 Error ("Entity_LinkBrush: Allready linked");
00822 b->owner = e;
00823
00824 b->onext = e->brushes.onext;
00825 b->oprev = &e->brushes;
00826 e->brushes.onext->oprev = b;
00827 e->brushes.onext = b;
00828 }
|
Here is the call graph for this function:

|
|
Definition at line 250 of file ENTITY.CPP. References e, epair_t, entity_t::epairs, epair_s::key, epair_s::next, and epair_s::value. Referenced by Undo_AddEntity(), Undo_Clear(), Undo_FreeFirstUndo(), Undo_Redo(), and Undo_Undo(). 00251 {
00252 epair_t *ep;
00253 int size = 0;
00254
00255 for (ep = e->epairs; ep; ep = ep->next)
00256 {
00257 size += _msize(ep->key);
00258 size += _msize(ep->value);
00259 size += _msize(ep);
00260 }
00261 size += _msize(e);
00262 return size;
00263 }
|
|
||||||||||||
|
Definition at line 295 of file ENTITY.CPP. References a, b, Brush_Build(), Brush_Create(), Brush_Free(), Brush_Parse(), Brush_Rotate(), brush_t, entity_t::brushes, CPlugIn::CreatePluginEntity(), e, Eclass_ForName(), eclass_t, Entity_LinkBrush(), epair_t, Error(), eclass_s::fixedsize, FloatForKey(), g_entityId, g_pParentWnd, IPluginEntity::GetBounds(), GetCachedModel(), CMainFrame::GetPlugInMgr(), GetToken(), GetVectorForKey(), eclass_s::hPlug, eclass_s::maxs, eclass_s::mins, n, brush_s::next, epair_s::next, eclass_s::nShowFlags, NULL, brush_s::onext, brush_s::oprev, brush_s::owner, p, ParseEpair(), CPlugInManager::PluginForModule(), brush_s::prev, printf(), qboolean, qmalloc(), SetKeyValue(), strcmp(), strlen(), Sys_Printf(), eclass_s::texdef, ValueForKey(), vec3_t, VectorAdd, and Warning(). Referenced by Map_ImportBuffer(), Map_LoadFile(), and QE_LoadProject(). 00296 {
00297 entity_t *ent;
00298 eclass_t *e;
00299 brush_t *b;
00300 vec3_t mins, maxs;
00301 epair_t *ep;
00302 qboolean has_brushes;
00303
00304 if (!GetToken (true))
00305 return NULL;
00306
00307 if (strcmp (token, "{") )
00308 Error ("ParseEntity: { not found");
00309
00310 ent = (entity_t*)qmalloc (sizeof(*ent));
00311 ent->entityId = g_entityId++;
00312 ent->brushes.onext = ent->brushes.oprev = &ent->brushes;
00313
00314 int n = 0;
00315 do
00316 {
00317 if (!GetToken (true))
00318 {
00319 Warning ("ParseEntity: EOF without closing brace");
00320 return NULL;
00321 }
00322 if (!strcmp (token, "}") )
00323 break;
00324 if (!strcmp (token, "{") )
00325 {
00326 b = Brush_Parse ();
00327 if (b != NULL)
00328 {
00329 b->owner = ent;
00330 // add to the end of the entity chain
00331 b->onext = &ent->brushes;
00332 b->oprev = ent->brushes.oprev;
00333 ent->brushes.oprev->onext = b;
00334 ent->brushes.oprev = b;
00335 }
00336 else
00337 {
00338 break;
00339 }
00340 }
00341 else
00342 {
00343 ep = ParseEpair ();
00344 ep->next = ent->epairs;
00345 ent->epairs = ep;
00346 }
00347 } while (1);
00348
00349 // group info entity?
00350 if (strcmp(ValueForKey (ent, "classname"), "group_info") == 0)
00351 return ent;
00352
00353 if (onlypairs)
00354 return ent;
00355
00356 if (ent->brushes.onext == &ent->brushes)
00357 has_brushes = false;
00358 else
00359 has_brushes = true;
00360
00361 GetVectorForKey (ent, "origin", ent->origin);
00362
00363 e = Eclass_ForName (ValueForKey (ent, "classname"), has_brushes);
00364 ent->eclass = e;
00365 if ( e->nShowFlags & ECLASS_PLUGINENTITY )
00366 {
00367 // locate the plugin
00368 CPlugIn * pPlug = g_pParentWnd->GetPlugInMgr().PluginForModule( e->hPlug );
00369 if (pPlug)
00370 {
00371 // create the plugin entity
00372 IPluginEntity* pPlugEnt = pPlug->CreatePluginEntity( ent );
00373 if (pPlugEnt)
00374 {
00375 ent->pPlugEnt = pPlugEnt;
00376 // the brush is used to select and move
00377 pPlugEnt->GetBounds( mins, maxs );
00378 }
00379 else
00380 {
00381 // give it a default bounding box
00382 SetKeyValue (ent, "model", "");
00383 mins[0] = -4; mins[1] = -4; mins[2] = -4;
00384 maxs[0] = 4; maxs[1] = 4; maxs[2] = 4;
00385 VectorAdd( mins, ent->origin, mins );
00386 VectorAdd( maxs, ent->origin, maxs );
00387 }
00388 b = Brush_Create (mins, maxs, &ent->eclass->texdef);
00389 Entity_LinkBrush (ent, b);
00390 Brush_Build( b, true );
00391 }
00392 else
00393 Sys_Printf("WARNING: plugin lookup failed for plugin entities\n");
00394 }
00395 else if (e->fixedsize)
00396 { // fixed size entity
00397 if (ent->brushes.onext != &ent->brushes)
00398 {
00399 printf ("Warning: Fixed size entity with brushes\n");
00400 #if 0
00401 while (ent->brushes.onext != &ent->brushes)
00402 { // FIXME: this will free the entity and crash!
00403 Brush_Free (b);
00404 }
00405 #endif
00406 ent->brushes.next = ent->brushes.prev = &ent->brushes;
00407 }
00408
00409 // create a custom brush
00410 VectorAdd (e->mins, ent->origin, mins);
00411 VectorAdd (e->maxs, ent->origin, maxs);
00412
00413 float a = 0;
00414 if (e->nShowFlags & ECLASS_MISCMODEL)
00415 {
00416 char* p = ValueForKey(ent, "model");
00417 if (p != NULL && strlen(p) > 0)
00418 {
00419 vec3_t vMin, vMax;
00420 a = FloatForKey (ent, "angle");
00421 if (GetCachedModel(ent, p, vMin, vMax))
00422 {
00423 // create a custom brush
00424 VectorAdd (ent->md3Class->mins, ent->origin, mins);
00425 VectorAdd (ent->md3Class->maxs, ent->origin, maxs);
00426 }
00427 }
00428 }
00429
00430 b = Brush_Create (mins, maxs, &e->texdef);
00431
00432 if (a)
00433 {
00434 vec3_t vAngle;
00435 vAngle[0] = vAngle[1] = 0;
00436 vAngle[2] = a;
00437 Brush_Rotate(b, vAngle, ent->origin, false);
00438 }
00439
00440
00441 b->owner = ent;
00442
00443 b->onext = ent->brushes.onext;
00444 b->oprev = &ent->brushes;
00445 ent->brushes.onext->oprev = b;
00446 ent->brushes.onext = b;
00447 }
00448 else
00449 { // brush entity
00450 if (ent->brushes.next == &ent->brushes)
00451 printf ("Warning: Brush entity with no brushes\n");
00452 }
00453
00454 // add all the brushes to the main list
00455 if (pList)
00456 {
00457 for (b=ent->brushes.onext ; b != &ent->brushes ; b=b->onext)
00458 {
00459 b->next = pList->next;
00460 pList->next->prev = b;
00461 b->prev = pList;
00462 pList->next = b;
00463 }
00464 }
00465
00466 return ent;
00467 }
|
Here is the call graph for this function:

|
|
Definition at line 203 of file ENTITY.CPP. Referenced by Undo_AddEntity(), Undo_Redo(), and Undo_Undo(). 00204 {
00205 if (!e->next || !e->prev)
00206 Error ("Entity_RemoveFromList: not linked");
00207 e->next->prev = e->prev;
00208 e->prev->next = e->next;
00209 e->next = e->prev = NULL;
00210 }
|
Here is the call graph for this function:

|
|
Definition at line 835 of file ENTITY.CPP. References b, brush_t, Error(), brush_s::onext, brush_s::oprev, and brush_s::owner. Referenced by Brush_Clone(), Brush_Free(), Brush_FullClone(), Entity_Create(), Map_ImportBuffer(), Select_Ungroup(), Undo_Redo(), and Undo_Undo(). 00836 {
00837 //if (!b->owner || !b->onext || !b->oprev)
00838 if (!b->onext || !b->oprev)
00839 Error ("Entity_UnlinkBrush: Not currently linked");
00840 b->onext->oprev = b->oprev;
00841 b->oprev->onext = b->onext;
00842 b->onext = b->oprev = NULL;
00843 b->owner = NULL;
00844 }
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 481 of file ENTITY.CPP. References camera_t::angles, b, brush_t, Brush_Write(), entity_t::brushes, CCamWnd::Camera(), count, e, ECLASS_MISCMODEL, epair_t, entity_t::epairs, f, fprintf(), g_pParentWnd, CMainFrame::GetCamera(), epair_s::key, Map_IsBrushFiltered(), bspbrush_s::mins, epair_s::next, brush_s::onext, entity_t::origin, camera_t::origin, SetKeyValue(), sprintf(), strcmp(), epair_s::value, ValueForKey(), vec3_t, VectorCopy, and VectorSubtract. Referenced by Map_SaveFile(). 00482 {
00483 epair_t *ep;
00484 brush_t *b;
00485 vec3_t origin;
00486 char text[128];
00487 int count;
00488
00489 // if none of the entities brushes are in the region,
00490 // don't write the entity at all
00491 if (use_region)
00492 {
00493 // in region mode, save the camera position as playerstart
00494 if ( !strcmp(ValueForKey (e, "classname"), "info_player_start") )
00495 {
00496 fprintf (f, "{\n");
00497 fprintf (f, "\"classname\" \"info_player_start\"\n");
00498 fprintf (f, "\"origin\" \"%i %i %i\"\n", (int)g_pParentWnd->GetCamera()->Camera().origin[0],
00499 |