Constraint mode is now switchable on/off in the effect screen.

I did some changes to the effect screen to make some space : instead of displaying an "on/off" label, we now keep the button pressed for active effects. 

There is no "constraint menu" yet, we should allow to select different constraints there (C64, MO5, spectrum, ...) to activate their respective enforcer and plug the right thing to the associated checker.

This should eventually allow drawers to :
 * Load any single-layer picture
 * Select the mode they want to use (without enabling it)
 * Run the checker and get the result as a multilayer (with an error layer)
 * Then, once they feel enough issues are solved, switch to "enforcer" mode for further manual tweaking.

Now we need a checker for CPC Mode5... :)

git-svn-id: svn://pulkomandy.tk/GrafX2/branches/cpcmode5@1721 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Adrien Destugues
2011-02-14 13:37:35 +00:00
parent bdf8b6d694
commit 72e9892b53
7 changed files with 94 additions and 32 deletions

View File

@@ -2977,7 +2977,24 @@ byte Read_pixel_from_current_screen (word x,word y)
void Pixel_in_current_screen (word x,word y,byte color,int with_preview)
{
#ifndef NOLAYERS
if ( Main_current_layer == 4)
if (!Constraint_mode)
{
byte depth = *(Main_visible_image_depth_buffer.Image+x+y*Main_image_width);
*(Main_backups->Pages->Image[Main_current_layer] + x+y*Main_image_width)=color;
if ( depth <= Main_current_layer)
{
if (color == Main_backups->Pages->Transparent_color) // transparent color
// fetch pixel color from the topmost visible layer
color=*(Main_backups->Pages->Image[depth] + x+y*Main_image_width);
*(x+y*Main_image_width+Main_screen)=color;
if (with_preview)
Pixel_preview(x,y,color);
}
}
else if ( Main_current_layer == 4)
{
if (color<4)
{