Remove dead code, update documentation for LAYERTYPE_GAME

This layer type was never used when saving maps.
Game layers were always identified by their flags.
In any case the check in the popup handler is unnecessary, as the group property cannot be changed for game layers, so this code is never used.
This commit is contained in:
Robert Müller 2023-01-21 14:02:15 +01:00
parent 50ecfb178f
commit c7819841f8
2 changed files with 2 additions and 3 deletions

View file

@ -494,7 +494,7 @@ int CEditor::PopupLayer(CEditor *pEditor, CUIRect View, void *pContext)
if(Prop == PROP_ORDER)
pEditor->SelectLayer(pCurrentGroup->SwapLayers(pEditor->m_vSelectedLayers[0], NewVal));
else if(Prop == PROP_GROUP && pCurrentLayer && pCurrentLayer->m_Type != LAYERTYPE_GAME)
else if(Prop == PROP_GROUP && pCurrentLayer)
{
if(NewVal >= 0 && (size_t)NewVal < pEditor->m_Map.m_vpGroups.size())
{

View file

@ -8,9 +8,8 @@
// layer types
enum
{
// TODO(Shereef Marzouk): fix this for vanilla, make use of LAYERTYPE_GAME instead of using m_game variable in the editor.
LAYERTYPE_INVALID = 0,
LAYERTYPE_GAME,
LAYERTYPE_GAME, // unused
LAYERTYPE_TILES,
LAYERTYPE_QUADS,
LAYERTYPE_FRONT,