mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Fixed merge mistake
Signed-off-by: GreYFoXGTi <GreYFoXGTi@GMaiL.CoM>
This commit is contained in:
parent
7f325ed21c
commit
bf53d85a14
|
@ -140,18 +140,13 @@ int CLayerTiles::BrushGrab(CLayerGroup *pBrush, CUIRect Rect)
|
|||
return 0;
|
||||
|
||||
// create new layers
|
||||
CLayerTiles *pGrabbed = new CLayerTiles(r.w, r.h);
|
||||
pGrabbed->m_pEditor = m_pEditor;
|
||||
pGrabbed->m_TexId = m_TexId;
|
||||
pGrabbed->m_Image = m_Image;
|
||||
pGrabbed->m_Game = m_Game;
|
||||
pBrush->AddLayer(pGrabbed);
|
||||
if(m_pEditor->GetSelectedLayer(0) == m_pEditor->m_Map.m_pTeleLayer)
|
||||
{
|
||||
CLayerTele *pGrabbed = new CLayerTele(r.w, r.h);
|
||||
pGrabbed->m_pEditor = m_pEditor;
|
||||
pGrabbed->m_TexId = m_TexId;
|
||||
pGrabbed->m_Image = m_Image;
|
||||
pGrabbed->m_Game = m_Game;
|
||||
|
||||
pBrush->AddLayer(pGrabbed);
|
||||
|
||||
|
@ -176,6 +171,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);
|
||||
|
||||
|
@ -203,6 +199,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);
|
||||
|
||||
|
@ -227,6 +224,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);
|
||||
|
||||
|
@ -305,7 +303,6 @@ void CLayerTiles::BrushFlipX()
|
|||
m_pTiles[y*m_Width+m_Width-1-x] = Tmp;
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -321,7 +318,6 @@ void CLayerTiles::BrushFlipY()
|
|||
m_pTiles[(m_Height-1-y)*m_Width+x] = Tmp;
|
||||
}
|
||||
|
||||
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;
|
||||
|
@ -343,13 +339,10 @@ void CLayerTiles::BrushRotate(float Amount)
|
|||
for(int y = m_Height-1; y >= 0; --y, ++pDst)
|
||||
{
|
||||
*pDst = pTempData[y*m_Width+x];
|
||||
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;
|
||||
m_Width = m_Height;
|
||||
|
|
Loading…
Reference in a new issue