2 Copyright (C) 1999-2007 id Software, Inc. and contributors.
3 For a list of contributors, see the accompanying CONTRIBUTORS file.
5 This file is part of GtkRadiant.
7 GtkRadiant is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
12 GtkRadiant is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with GtkRadiant; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 // map.h -- the state of the current world that all views are displaying
24 extern char currentmap[1024];
26 // head/tail of doubly linked lists
27 extern brush_t active_brushes; // brushes currently being displayed
28 extern brush_t selected_brushes; // highlighted
30 extern CPtrArray& g_ptrSelectedFaces;
31 extern CPtrArray& g_ptrSelectedFaceBrushes;
33 extern brush_t filtered_brushes; // brushes that have been filtered or regioned
35 extern entity_t entities;
36 extern entity_t *world_entity; // the world entity is NOT included in
39 extern int modified; // for quit confirmations
41 extern vec3_t region_mins, region_maxs;
42 extern qboolean region_active;
44 extern brush_t *region_sides[6];
48 void Map_LoadFile( const char *filename );
49 void Map_SaveFile( const char *filename, qboolean use_region );
52 void Map_Free( void );
53 void Map_BuildBrushData( void );
55 void Map_RegionOff( void );
56 void Map_RegionXY( void );
57 void Map_RegionTallBrush( void );
58 void Map_RegionBrush( void );
59 void Map_RegionSelectedBrushes( void );
60 qboolean Map_IsBrushFiltered( brush_t *b );
62 void Map_ImportFile( const char *filename );
63 void Map_SaveSelected( const char* filename );
64 //void Map_SaveSelected(MemStream* pMemFile, MemStream* pPatchFile = NULL);
65 //void Map_ImportBuffer (char* buf);
67 void Map_StartPosition( void );
68 void Region_SpawnPoint( FILE *f );
70 void Map_Import( IDataStream *in, const char* type, bool bAddSelected = false );
71 void Map_Export( IDataStream *out, const char* type, bool bRegionOnly = false, bool bSelectedOnly = false );