diff options
| author | oy <Tom_Adams@web.de> | 2010-09-16 13:13:53 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-09-16 13:13:53 +0200 |
| commit | 9727cd25ec207c45fb1421efba9881c47cf25f43 (patch) | |
| tree | 8e69d4409deaf8189a702cef754770d1bf723ce8 /src/game/editor | |
| parent | 7714454829dc8165abd5786ae59881ca7576dfdb (diff) | |
| download | zcatch-9727cd25ec207c45fb1421efba9881c47cf25f43.tar.gz zcatch-9727cd25ec207c45fb1421efba9881c47cf25f43.zip | |
do not rotate/flip gamelayer tiles. Closes #155
Diffstat (limited to 'src/game/editor')
| -rw-r--r-- | src/game/editor/ed_layer_tiles.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp index 6f1fc85e..adc747d0 100644 --- a/src/game/editor/ed_layer_tiles.cpp +++ b/src/game/editor/ed_layer_tiles.cpp @@ -132,6 +132,7 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect) pGrabbed->m_pEditor = m_pEditor; pGrabbed->m_TexId = m_TexId; pGrabbed->m_Image = m_Image; + pGrabbed->m_Game = m_Game; pBrush->AddLayer(pGrabbed); // copy the tiles @@ -204,9 +205,10 @@ void CLayerTiles::BrushFlipX() m_pTiles[y*m_Width+m_Width-1-x] = Tmp; } - for(int y = 0; y < m_Height; y++) - for(int x = 0; x < m_Width; x++) - m_pTiles[y*m_Width+x].m_Flags ^= m_pTiles[y*m_Width+x].m_Flags&TILEFLAG_ROTATE ? TILEFLAG_HFLIP : TILEFLAG_VFLIP; + if(!m_Game) + for(int y = 0; y < m_Height; y++) + for(int x = 0; x < m_Width; x++) + m_pTiles[y*m_Width+x].m_Flags ^= m_pTiles[y*m_Width+x].m_Flags&TILEFLAG_ROTATE ? TILEFLAG_HFLIP : TILEFLAG_VFLIP; } void CLayerTiles::BrushFlipY() @@ -219,9 +221,10 @@ void CLayerTiles::BrushFlipY() m_pTiles[(m_Height-1-y)*m_Width+x] = Tmp; } - for(int y = 0; y < m_Height; y++) - for(int x = 0; x < m_Width; x++) - m_pTiles[y*m_Width+x].m_Flags ^= m_pTiles[y*m_Width+x].m_Flags&TILEFLAG_ROTATE ? TILEFLAG_VFLIP : TILEFLAG_HFLIP; + if(!m_Game) + for(int y = 0; y < m_Height; y++) + for(int x = 0; x < m_Width; x++) + m_pTiles[y*m_Width+x].m_Flags ^= m_pTiles[y*m_Width+x].m_Flags&TILEFLAG_ROTATE ? TILEFLAG_VFLIP : TILEFLAG_HFLIP; } void CLayerTiles::BrushRotate(float Amount) @@ -240,9 +243,12 @@ void CLayerTiles::BrushRotate(float Amount) for(int y = m_Height-1; y >= 0; --y, ++pDst) { *pDst = pTempData[y*m_Width+x]; - if(pDst->m_Flags&TILEFLAG_ROTATE) - pDst->m_Flags ^= (TILEFLAG_HFLIP|TILEFLAG_VFLIP); - pDst->m_Flags ^= TILEFLAG_ROTATE; + if(!m_Game) + { + if(pDst->m_Flags&TILEFLAG_ROTATE) + pDst->m_Flags ^= (TILEFLAG_HFLIP|TILEFLAG_VFLIP); + pDst->m_Flags ^= TILEFLAG_ROTATE; + } } int Temp = m_Width; |