Much work on color brushes (issue 362). You can rotate, resize, flip etc. without losing original palette.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1701 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
@@ -1080,10 +1080,13 @@ void Button_Sieve_menu(void)
|
||||
|
||||
for (y_pos=0; y_pos<Sieve_height; y_pos++)
|
||||
for (x_pos=0; x_pos<Sieve_width; x_pos++)
|
||||
Pixel_in_brush(x_pos,y_pos,(Sieve[x_pos][y_pos])?Fore_color:Back_color);
|
||||
*(Brush_original_pixels + y_pos * Brush_width + x_pos) = (Sieve[x_pos][y_pos])?Fore_color:Back_color;
|
||||
|
||||
// Copy without remap
|
||||
memcpy(Brush_original_pixels, Brush, (long)Brush_height*Brush_width);
|
||||
// Grab palette
|
||||
memcpy(Brush_original_palette, Main_palette,sizeof(T_Palette));
|
||||
// Remap (no change)
|
||||
Remap_brush();
|
||||
|
||||
Brush_offset_X=(Brush_width>>1);
|
||||
Brush_offset_Y=(Brush_height>>1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user