mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
added auto game tile placer for hookthrough
This commit is contained in:
parent
faa576e73d
commit
e61456f381
|
@ -619,6 +619,8 @@ int CLayerTiles::RenderProperties(CUIRect *pToolBox)
|
|||
case 9:
|
||||
Result = TILE_TELECHECKINEVIL;
|
||||
break;
|
||||
case 10:
|
||||
Result = TILE_THROUGH_CUT;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -632,8 +634,10 @@ int CLayerTiles::RenderProperties(CUIRect *pToolBox)
|
|||
int h = min(gl->m_Height, m_Height);
|
||||
for(int y = 0; y < h; y++)
|
||||
for(int x = 0; x < w; x++)
|
||||
if(m_pTiles[y*m_Width+x].m_Index)
|
||||
gl->m_pTiles[y*gl->m_Width+x].m_Index = TILE_AIR+Result;
|
||||
if(GetTile(x, y).m_Index) {
|
||||
CTile result_tile = {(unsigned char)Result};
|
||||
gl->SetTile(x, y, result_tile);
|
||||
}
|
||||
}
|
||||
else if (m_pEditor->m_Map.m_pTeleLayer)
|
||||
{
|
||||
|
|
|
@ -1303,7 +1303,7 @@ static int s_GametileOpSelected = -1;
|
|||
|
||||
int CEditor::PopupSelectGametileOp(CEditor *pEditor, CUIRect View)
|
||||
{
|
||||
static const char *s_pButtonNames[] = { "Clear", "Collision", "Death", "Unhookable", "Freeze", "Unfreeze", "Deep Freeze", "Deep Unfreeze", "Check-Tele From", "Evil Check-Tele From" };
|
||||
static const char *s_pButtonNames[] = { "Clear", "Collision", "Death", "Unhookable", "Freeze", "Unfreeze", "Deep Freeze", "Deep Unfreeze", "Check-Tele From", "Evil Check-Tele From", "Hookthrough" };
|
||||
static unsigned s_NumButtons = sizeof(s_pButtonNames) / sizeof(char*);
|
||||
CUIRect Button;
|
||||
|
||||
|
@ -1322,7 +1322,7 @@ void CEditor::PopupSelectGametileOpInvoke(float x, float y)
|
|||
{
|
||||
static int s_SelectGametileOpPopupId = 0;
|
||||
s_GametileOpSelected = -1;
|
||||
UiInvokePopupMenu(&s_SelectGametileOpPopupId, 0, x, y, 120.0f, 150.0f, PopupSelectGametileOp);
|
||||
UiInvokePopupMenu(&s_SelectGametileOpPopupId, 0, x, y, 120.0f, 165.0f, PopupSelectGametileOp);
|
||||
}
|
||||
|
||||
int CEditor::PopupSelectGameTileOpResult()
|
||||
|
|
Loading…
Reference in a new issue