graph.c: Pixel_figure is not a global var anymore
This commit is contained in:
parent
be8b05a384
commit
ce1b55be03
@ -1244,7 +1244,7 @@ void Capture_brush_with_lasso(int vertices, short * points,short clear)
|
|||||||
Brush_offset_X=start_x;
|
Brush_offset_X=start_x;
|
||||||
Brush_offset_Y=start_y;
|
Brush_offset_Y=start_y;
|
||||||
|
|
||||||
Pixel_figure=Pixel_figure_in_brush;
|
Set_Pixel_figure(Pixel_figure_in_brush);
|
||||||
|
|
||||||
memset(Brush,Back_color,(long)Brush_width*Brush_height);
|
memset(Brush,Back_color,(long)Brush_width*Brush_height);
|
||||||
Polyfill_general(vertices,points,xor_lut[Back_color]);
|
Polyfill_general(vertices,points,xor_lut[Back_color]);
|
||||||
|
|||||||
@ -524,7 +524,7 @@ int L_DrawLine(lua_State* L)
|
|||||||
LUA_ARG_NUMBER(4, "drawline", y2, INT_MIN, INT_MAX);
|
LUA_ARG_NUMBER(4, "drawline", y2, INT_MIN, INT_MAX);
|
||||||
LUA_ARG_NUMBER(5, "drawline", c, INT_MIN, INT_MAX);
|
LUA_ARG_NUMBER(5, "drawline", c, INT_MIN, INT_MAX);
|
||||||
|
|
||||||
Pixel_figure = (void (*) (word,word,byte))Pixel_figure_no_screen;
|
Set_Pixel_figure((void (*) (word,word,byte))Pixel_figure_no_screen);
|
||||||
Draw_line_general(x1, y1, x2, y2, c);
|
Draw_line_general(x1, y1, x2, y2, c);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -598,7 +598,7 @@ int L_DrawCircle(lua_State* L)
|
|||||||
LUA_ARG_NUMBER(3, "drawcircle", r, INT_MIN, INT_MAX);
|
LUA_ARG_NUMBER(3, "drawcircle", r, INT_MIN, INT_MAX);
|
||||||
LUA_ARG_NUMBER(4, "drawcircle", c, INT_MIN, INT_MAX);
|
LUA_ARG_NUMBER(4, "drawcircle", c, INT_MIN, INT_MAX);
|
||||||
|
|
||||||
Pixel_figure = (void (*) (word,word,byte))Pixel_figure_no_screen;
|
Set_Pixel_figure((void (*) (word,word,byte))Pixel_figure_no_screen);
|
||||||
Circle_limit = r*r;
|
Circle_limit = r*r;
|
||||||
Draw_empty_circle_general(x1, y1, r, c);
|
Draw_empty_circle_general(x1, y1, r, c);
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,13 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Generic pixel-drawing function.
|
// Generic pixel-drawing function.
|
||||||
Func_pixel Pixel_figure;
|
static Func_pixel Pixel_figure;
|
||||||
|
|
||||||
|
void Set_Pixel_figure(Func_pixel func)
|
||||||
|
{
|
||||||
|
Pixel_figure = func;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
|
|||||||
@ -115,7 +115,7 @@ void Remap_spare(void);
|
|||||||
/// - ::Pixel_figure_preview_xor : On screen, XORing the color.
|
/// - ::Pixel_figure_preview_xor : On screen, XORing the color.
|
||||||
/// - ::Pixel_figure_permanent : On screen and in the image.
|
/// - ::Pixel_figure_permanent : On screen and in the image.
|
||||||
/// - ::Pixel_figure_clear_preview : On screen, reverting to the image's pixels.
|
/// - ::Pixel_figure_clear_preview : On screen, reverting to the image's pixels.
|
||||||
extern Func_pixel Pixel_figure;
|
void Set_Pixel_figure(Func_pixel func);
|
||||||
|
|
||||||
void Update_part_of_screen(short x, short y, short width, short height);
|
void Update_part_of_screen(short x, short y, short width, short height);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user