~rabbits/dito

9ff2f4841f5f5b1a33ae807718623719f958c941 — neauoire 5 months ago 36c8898 main
Minor cleanup
1 files changed, 5 insertions(+), 5 deletions(-)

M dito.c
M dito.c => dito.c +5 -5
@@ 53,8 53,8 @@ Uint32 theme[] = {
Uint8 icons[][8] = {
	{0x38, 0x7c, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x00}, /* color:full */
	{0x00, 0x38, 0x7c, 0x7c, 0x7c, 0x38, 0x00, 0x00}, /* color:blank */
	{0xfe, 0x82, 0x82, 0xfe, 0x82, 0x82, 0xfe, 0x00}, /* brush:colors2 */
	{0xfe, 0x92, 0x92, 0xfe, 0x92, 0x92, 0xfe, 0x00}, /* brush:colors4 */
	{0xfe, 0x82, 0x82, 0xfe, 0x82, 0x82, 0xfe, 0x00}, /* brush:1bit */
	{0xfe, 0x92, 0x92, 0xfe, 0x92, 0x92, 0xfe, 0x00}, /* brush:2bit */
	{0x18, 0x38, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00}, /* picker:1 */
	{0x7c, 0xc6, 0x0e, 0x3c, 0x78, 0xe0, 0xfe, 0x00}, /* picker:2 */
	{0x7e, 0x0c, 0x18, 0x3c, 0x06, 0xc6, 0x7c, 0x00}, /* picker:3 */


@@ 244,7 244,7 @@ getpattern(int palette, int x, int y)
}

int
getpalette(Uint32 clr, int x, int y)
getpalette(Uint32 clr)
{
	Uint32 res = 0, dis = 999999;
	int i;


@@ 282,7 282,7 @@ redraw(Uint32 *dst)
	SDL_LockSurface(image);
	for(y = 0; y < image->h; ++y) {
		for(x = 0; x < image->w; ++x) {
			int palette = getpalette(getcolor(x, y), x, y);
			int palette = getpalette(getcolor(x, y));
			putchr(x, y, COLORS ? palette : getpattern(palette, x, y));
		}
	}


@@ 403,7 403,7 @@ selectoption(int option)
	switch(option) {
	case 0: savemode(&COLORS, !COLORS); break;
	case 2: savemode(&GUIDES, !GUIDES); break;
	case HOR - 1: savedoc(&doc, doc.name); break;
	case HOR - 1: COLORS ? savedoc(&doc, doc.name) : saveicn(&doc, doc.name); break;
	}
}