Fixed src/widgets/editor/editor.c

This commit is contained in:
David Capello 2007-12-06 21:32:44 +00:00
parent d87b0dc8ff
commit 9b755b2834
2 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2007-12-06 David A. Capello <dacap@users.sourceforge.net>
* src/widgets/editor/editor.c (editor_draw_sprite): Fixed to allow
differents indexed images in multiple editors in a screen
color-depth > 8bpp.
* src/util/misc.c (interactive_move_layer): Fixed problem with
scroll in windowed moded and mouse-paint problem in
double-buffering mode.

View File

@ -400,8 +400,17 @@ void editor_draw_sprite(JWidget widget, int x1, int y1, int x2, int y2)
image_free(rendered);
destroy_bitmap(bmp);
#else
use_current_sprite_rgb_map();
image_to_allegro(rendered, ji_screen, dest_x, dest_y);
if (bitmap_color_depth(screen) == 8) {
image_to_allegro(rendered, ji_screen, dest_x, dest_y);
}
else {
select_palette(sprite_get_palette(editor->sprite,
editor->sprite->frame));
image_to_allegro(rendered, ji_screen, dest_x, dest_y);
unselect_palette();
}
restore_rgb_map();
image_free(rendered);