about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorChoupom <andycootlapin@hotmail.fr>2011-07-18 10:31:57 +0200
committeroy <Tom_Adams@web.de>2011-07-20 21:54:23 +0200
commitc2e8bf5035cbe3f41a71c454e348fc408f17a991 (patch)
treebf889ab826577c8ba496a3f0c8f001e37cd2cc21 /src
parent188e6223730e577a1cdfc5891f832c53c23cc146 (diff)
downloadzcatch-c2e8bf5035cbe3f41a71c454e348fc408f17a991.tar.gz
zcatch-c2e8bf5035cbe3f41a71c454e348fc408f17a991.zip
made a constant for game layer flag
Diffstat (limited to 'src')
-rw-r--r--src/game/editor/io.cpp6
-rw-r--r--src/game/mapitems.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/src/game/editor/io.cpp b/src/game/editor/io.cpp
index 9ce6d1f1..768f0fa5 100644
--- a/src/game/editor/io.cpp
+++ b/src/game/editor/io.cpp
@@ -295,7 +295,7 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName)
 
 				Item.m_Width = pLayer->m_Width;
 				Item.m_Height = pLayer->m_Height;
-				Item.m_Flags = pLayer->m_Game;
+				Item.m_Flags = pLayer->m_Game ? TILESLAYERFLAG_GAME : 0;
 				Item.m_Image = pLayer->m_Image;
 				Item.m_Data = df.AddData(pLayer->m_Width*pLayer->m_Height*sizeof(CTile), pLayer->m_pTiles);
 
@@ -516,7 +516,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag
 						CMapItemLayerTilemap *pTilemapItem = (CMapItemLayerTilemap *)pLayerItem;
 						CLayerTiles *pTiles = 0;
 
-						if(pTilemapItem->m_Flags&1)
+						if(pTilemapItem->m_Flags&TILESLAYERFLAG_GAME)
 						{
 							pTiles = new CLayerGame(pTilemapItem->m_Width, pTilemapItem->m_Height);
 							MakeGameLayer(pTiles);
@@ -537,7 +537,7 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag
 						pGroup->AddLayer(pTiles);
 						void *pData = DataFile.GetData(pTilemapItem->m_Data);
 						pTiles->m_Image = pTilemapItem->m_Image;
-						pTiles->m_Game = pTilemapItem->m_Flags&1;
+						pTiles->m_Game = pTilemapItem->m_Flags&TILESLAYERFLAG_GAME;
 
 						// load layer name
 						if(pTilemapItem->m_Version >= 3)
diff --git a/src/game/mapitems.h b/src/game/mapitems.h
index 4daf139b..fb66e12d 100644
--- a/src/game/mapitems.h
+++ b/src/game/mapitems.h
@@ -53,6 +53,7 @@ enum
 	TILEFLAG_ROTATE=8,
 
 	LAYERFLAG_DETAIL=1,
+	TILESLAYERFLAG_GAME=1,
 
 	ENTITY_OFFSET=255-16*4,
 };