Fixed palette offset bug introduced when moving white to beginning of

colors in "New" dialog. (AKA: I was only half done implementing it.)
Cleaned up and greyscaled a bunch of Magic Tool icons (for consistency).
This commit is contained in:
William Kendrick 2009-01-31 00:32:26 +00:00
parent 1b0b307852
commit ded6cd0d29
27 changed files with 24 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

After

Width:  |  Height:  |  Size: 407 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 442 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 752 B

After

Width:  |  Height:  |  Size: 640 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 993 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 921 B

After

Width:  |  Height:  |  Size: 759 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 791 B

After

Width:  |  Height:  |  Size: 726 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 627 B

After

Width:  |  Height:  |  Size: 558 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 913 B

After

Width:  |  Height:  |  Size: 566 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 B

After

Width:  |  Height:  |  Size: 263 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 916 B

After

Width:  |  Height:  |  Size: 769 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 834 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 404 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 672 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 376 B

After

Width:  |  Height:  |  Size: 294 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 942 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 789 B

After

Width:  |  Height:  |  Size: 651 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 763 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,009 B

After

Width:  |  Height:  |  Size: 601 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 931 B

After

Width:  |  Height:  |  Size: 801 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

View file

@ -17730,6 +17730,7 @@ int do_new_dialog(void)
int first_starter;
int added;
Uint8 r, g, b;
int white_in_palette;
do_setcursor(cursor_watch);
@ -17829,6 +17830,8 @@ int do_new_dialog(void)
/* Throw the color palette at the beginning: */
white_in_palette = -1;
for (j = -1; j < NUM_COLORS; j++)
{
added = 0;
@ -17866,6 +17869,10 @@ int do_new_dialog(void)
added = 1;
}
}
else
{
white_in_palette = j;
}
}
else
{
@ -18630,9 +18637,22 @@ int do_new_dialog(void)
/* FIXME: Don't do anything and go back to Open dialog if they
hit BACK in color picker! */
canvas_color_r = color_hexes[which][0];
canvas_color_g = color_hexes[which][1];
canvas_color_b = color_hexes[which][2];
if (which == 0) /* White */
{
canvas_color_r = canvas_color_g = canvas_color_b = 255;
}
else if (which <= white_in_palette) /* One of the colors before white in the pallete */
{
canvas_color_r = color_hexes[which - 1][0];
canvas_color_g = color_hexes[which - 1][1];
canvas_color_b = color_hexes[which - 1][2];
}
else
{
canvas_color_r = color_hexes[which][0];
canvas_color_g = color_hexes[which][1];
canvas_color_b = color_hexes[which][2];
}
SDL_FillRect(canvas, NULL, SDL_MapRGB(canvas->format,
canvas_color_r,