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:
Yves Rizoud
2012-02-27 00:47:18 +00:00
parent 55d0889bc8
commit d38f5ee981
9 changed files with 30 additions and 20 deletions

View File

@@ -124,7 +124,7 @@ void Display_paintbrush(short x,short y,byte color)
if (Mouse_K) // pas de curseur si on est en preview et
return; // en train de cliquer
if (Constraint_mode && Main_current_layer < 4)
if (Main_backups->Pages->Image_mode == IMAGE_MODE_MODE5 && Main_current_layer < 4)
{
goto single_pixel;
}
@@ -292,7 +292,7 @@ void Draw_paintbrush(short x,short y,byte color)
int position;
byte old_color;
if (Constraint_mode && Main_current_layer < 4)
if (Main_backups->Pages->Image_mode == IMAGE_MODE_MODE5 && Main_current_layer < 4)
{
// Flood-fill the enclosing area
if (x<Main_image_width && y<Main_image_height && x>= 0 && y >= 0