CPC mode 5 : replaced the global Constraint_mode by a state (Image_mode) in each versioned T_Page: This allows keeping it sane when swapping to Spare, and when Undo/Redoing. Also fixed the first page when program starts, it was unnecessarily allocating pointers for the maximum number of layers(16)/frames(999)
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1907 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -167,10 +167,9 @@ void Menu_tag_colors(char * window_title, byte * table, byte * mode, byte can_ca
|
||||
// Constaint enforcer/checker ------------------------------------------------
|
||||
void Button_Constraint_mode(void)
|
||||
{
|
||||
Constraint_mode=!Constraint_mode;
|
||||
|
||||
if (Constraint_mode)
|
||||
if (Main_backups->Pages->Image_mode == IMAGE_MODE_LAYERED)
|
||||
{
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_MODE5;
|
||||
// TODO backup
|
||||
// CPC Mode 5 - ensure there are at least 5 layers
|
||||
while(Main_backups->Pages->Nb_layers < 5)
|
||||
@@ -182,6 +181,11 @@ void Button_Constraint_mode(void)
|
||||
|
||||
// TODO set the palette to a CPC one ?
|
||||
}
|
||||
else if (Main_backups->Pages->Image_mode == IMAGE_MODE_MODE5)
|
||||
{
|
||||
// Disable
|
||||
Main_backups->Pages->Image_mode = IMAGE_MODE_LAYERED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -906,7 +910,6 @@ void Effects_off(void)
|
||||
Mask_mode=0;
|
||||
Sieve_mode=0;
|
||||
Snap_mode=0;
|
||||
Constraint_mode=0;
|
||||
Main_tilemap_mode=0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user