From 2c4be60bf471a73eeb60d715cf92511a8ae93511 Mon Sep 17 00:00:00 2001 From: neauoire Date: Mon, 30 Nov 2020 21:42:10 -0800 Subject: [PATCH] Fixed round brush --- nasu.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/nasu.c b/nasu.c index 94f5347..10747a6 100644 --- a/nasu.c +++ b/nasu.c @@ -167,7 +167,7 @@ fill(int x, int y, int mode, int size, int color) int ox, oy; for(ox = x - (size / 2); ox < x + size; ++ox) for(oy = y - (size / 2); oy < y + size; ++oy) - if(distance(x, y, ox, oy) < size) + if(distance(x, y, ox, oy) > size) continue; else if(mode == 4 && jagg(ox, oy)) putchr(ox, oy, 0); @@ -525,24 +525,18 @@ int main(int argc, char **argv) { int ticknext = 0; - brush.erase = 0; brush.down = 0; brush.color = 1; brush.size = 8; brush.mode = 0; - if(!init()) return error("Init", "Failure"); - loadtheme(fopen("theme.svg", "r")); newchr(); - if(argc > 1) loadchr(fopen(argv[1], "r")); - redraw(pixels); - while(1) { int tick = SDL_GetTicks(); SDL_Event event;