~grimmware/qsp

6a889fd7e250b91c9dfef08a0f7ab0d855bc793c — Grimmware 1 year, 9 months ago 5d43404
Added labels to draw!
1 files changed, 10 insertions(+), 2 deletions(-)

M draw.c
M draw.c => draw.c +10 -2
@@ 15,6 15,7 @@ Point offset, dragstart, dragstop;
int thickness = 4;
int borderwidth = 0;
int drawmode = 0;
int text = 1;
int debug = 0;
int bgcolor = DWhite;
int fgcolor = DBlack;


@@ 59,6 60,7 @@ redraw(void)
{
	Image *bg, *fg;
	Point o = Pt(screen->r.min.x + offset.x, screen->r.min.y + offset.y);
	Point p;
	//Point center = Pt(o.x + p.x/2, o.y + p.y/2);
	
	bg = allocimage(display, Rect(0,0,1,1), CMAP8, 1, bgcolor);


@@ 74,8 76,11 @@ redraw(void)
			ZP
		);
	}
	for(int i = 0; i<emanationc; i++)
		drawcircle(Pt(o.x + emanations[i]->xy.x, o.y + emanations[i]->xy.y), 20, bg, fg);
	for(int i = 0; i<emanationc; i++){
		p = Pt(o.x + emanations[i]->xy.x, o.y + emanations[i]->xy.y);
		drawcircle(p, 20, bg, fg);
		if(text) string(screen, p, display->black, ZP, display->defaultfont, emanations[i]->name);
	}
	if(drawmode) {
		// Selection indicators
		for(int i = 0; i<E_MAX && i<emanationc; i++){


@@ 212,6 217,9 @@ main(int argc, char** argv)
				// TODO: Fix this to make it use the infile when I'm done using it
				loadstate(outstatefile);
				break;
			case 't':
				text = !text;
				break;
			case '0':
			case '1':
			case '2':