Split Display_paintbrush() in two: one function for preview, another function (Draw_paintbrush()) for image modification. Should be functionally identical, but code becomes simpler.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1857 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2011-11-06 19:38:55 +00:00
parent f1f658ded4
commit 1b4b242a06
5 changed files with 407 additions and 396 deletions

View File

@@ -1128,7 +1128,7 @@ void Fill_general(byte fill_color)
// Affichage d'un point de façon définitive (utilisation du pinceau)
void Pixel_figure_permanent(word x_pos,word y_pos,byte color)
{
Display_paintbrush(x_pos,y_pos,color,0);
Draw_paintbrush(x_pos,y_pos,color);
Permanent_draw_count ++;
// Check every 8 pixels
@@ -1961,9 +1961,9 @@ void Airbrush(short clicked_button)
x_pos+=Paintbrush_X;
y_pos+=Paintbrush_Y;
if (clicked_button==1)
Display_paintbrush(x_pos,y_pos,Fore_color,0);
Draw_paintbrush(x_pos,y_pos,Fore_color);
else
Display_paintbrush(x_pos,y_pos,Back_color,0);
Draw_paintbrush(x_pos,y_pos,Back_color);
}
}
}
@@ -1984,9 +1984,9 @@ void Airbrush(short clicked_button)
x_pos+=Paintbrush_X;
y_pos+=Paintbrush_Y;
if (clicked_button==LEFT_SIDE)
Display_paintbrush(x_pos,y_pos,color_index,0);
Draw_paintbrush(x_pos,y_pos,color_index);
else
Display_paintbrush(x_pos,y_pos,Back_color,0);
Draw_paintbrush(x_pos,y_pos,Back_color);
}
}
if (direction)