[layers] Implemented layer insertion. No keys or menu yet, but it's already used when loading images, to make an image with right number of layers. Undoing/redoing such change works. Implemented single-layer deletion (untested)

git-svn-id: svn://pulkomandy.tk/GrafX2/branches/layers@1069 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2009-10-08 23:54:02 +00:00
parent dc70d2f59f
commit 2049f96c59
9 changed files with 174 additions and 25 deletions

View File

@@ -1365,7 +1365,7 @@ void Button_Page(void)
SWAP_WORDS (Main_fileselector_position,Spare_fileselector_position)
SWAP_WORDS (Main_fileselector_offset,Spare_fileselector_offset)
SWAP_SHORTS(Main_current_layer,Spare_current_layer)
SWAP_BYTES (Main_layers_visible,Spare_layers_visible)
SWAP_WORDS (Main_layers_visible,Spare_layers_visible)
// A la fin, on affiche l'écran
for (factor_index=0; ZOOM_FACTOR[factor_index]!=Main_magnifier_factor; factor_index++);
@@ -4285,7 +4285,7 @@ void Transparency_set(byte amount)
void Layer_activate(short layer, short side)
{
byte old_layers;
word old_layers;
if (layer >= Main_backups->Pages->Nb_layers)
return;
@@ -4300,7 +4300,7 @@ void Layer_activate(short layer, short side)
if (Main_layers_visible == (1<<layer))
{
// Set all layers visible
Main_layers_visible = 0xFF;
Main_layers_visible = 0xFFFF;
}
else
{