void PushFlags()
{
byte flags = 0;
flags |= (byte)paletteSpinButton.ValueAsInt;
if (flipXCheckButton.Active)
flags |= 0x20;
if (flipYCheckButton.Active)
flags |= 0x40;
if (priorityCheckButton.Active)
flags |= 0x80;
if (bankCheckButton.Active)
flags |= 0x08;
subTileViewer.SubTileFlags = flags;
subTileViewer.SubTileIndex = (byte)(subTileSpinButton.ValueAsInt);
areaEditor.subTileGfxViewer.SelectedIndex = subTileViewer.SubTileIndex^0x80;
}