diff options
| author | oy <Tom_Adams@web.de> | 2011-01-04 11:38:14 +0100 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-01-04 11:38:14 +0100 |
| commit | 336f00ae89be5051be20632c728076a436d93d3c (patch) | |
| tree | 61f359e7263c9a2ed7741e8a714f9235d35adfb3 /src/game/editor/ed_io.cpp | |
| parent | 533d28e35a8f7278456abb6ef1b4d5e9e36063a9 (diff) | |
| download | zcatch-336f00ae89be5051be20632c728076a436d93d3c.tar.gz zcatch-336f00ae89be5051be20632c728076a436d93d3c.zip | |
added colours for tile layers by Choupom
Diffstat (limited to 'src/game/editor/ed_io.cpp')
| -rw-r--r-- | src/game/editor/ed_io.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
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; |