From 336f00ae89be5051be20632c728076a436d93d3c Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 4 Jan 2011 11:38:14 +0100 Subject: added colours for tile layers by Choupom --- src/game/editor/ed_io.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'src/game/editor/ed_io.cpp') diff --git a/src/game/editor/ed_io.cpp b/src/game/editor/ed_io.cpp index cb914ad9..2eff397c 100644 --- a/src/game/editor/ed_io.cpp +++ b/src/game/editor/ed_io.cpp @@ -283,11 +283,11 @@ int CEditorMap::Save(class IStorage *pStorage, const char *pFileName) Item.m_Layer.m_Flags = pLayer->m_Flags; Item.m_Layer.m_Type = pLayer->m_Type; - Item.m_Color.r = 255; // not in use right now - Item.m_Color.g = 255; - Item.m_Color.b = 255; - Item.m_Color.a = 255; - Item.m_ColorEnv = -1; + Item.m_Color.r = pLayer->m_Color.r; + Item.m_Color.g = pLayer->m_Color.g; + Item.m_Color.b = pLayer->m_Color.b; + Item.m_Color.a = pLayer->m_Color.a; + Item.m_ColorEnv = -1; // not in use right now Item.m_ColorEnvOffset = 0; Item.m_Width = pLayer->m_Width; @@ -508,6 +508,10 @@ int CEditorMap::Load(class IStorage *pStorage, const char *pFileName, int Storag { pTiles = new CLayerTiles(pTilemapItem->m_Width, pTilemapItem->m_Height); pTiles->m_pEditor = m_pEditor; + pTiles->m_Color.r = pTilemapItem->m_Color.r; + pTiles->m_Color.g = pTilemapItem->m_Color.g; + pTiles->m_Color.b = pTilemapItem->m_Color.b; + pTiles->m_Color.a = pTilemapItem->m_Color.a; } pLayer = pTiles; -- cgit 1.4.1