Simplification of the Pixel drawing functions

All functions were declared twice. without or with preview.
Only one function with optional preview now.
This commit is contained in:
Thomas Bernard
2018-11-20 12:01:31 +01:00
parent 832617188f
commit 06f7b95b0f
3 changed files with 70 additions and 247 deletions

View File

@@ -134,11 +134,16 @@ byte Read_pixel_from_current_screen (word x,word y);
byte Read_pixel_from_current_layer(word x,word y);
/// Paint a single pixel in image only.
extern Func_pixel Pixel_in_current_screen;
#define Pixel_in_current_screen(x,y,c) Pixel_in_current_screen_with_opt_preview(x,y,c,0)
/// Paint a single pixel in image AND on screen.
extern Func_pixel Pixel_in_current_screen_with_preview;
#define Pixel_in_current_screen_with_preview(x,y,c) Pixel_in_current_screen_with_opt_preview(x,y,c,1)
/// Paint a single pixel in image AND optionnaly on screen.
extern Func_pixel_opt_preview Pixel_in_current_screen_with_opt_preview;
/// Update the pixel functions according to the current Image_mode.
/// Sets ::Pixel_in_current_screen and ::Pixel_in_current_screen_with_preview
/// through ::Pixel_in_current_screen_with_opt_preview
void Update_pixel_renderer(void);