~rabbits/nasu

2c4be60bf471a73eeb60d715cf92511a8ae93511 — neauoire 2 years ago eb29473
Fixed round brush
1 files changed, 1 insertions(+), 7 deletions(-)

M nasu.c
M nasu.c => nasu.c +1 -7
@@ 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;