[BUG] Draw commands don't set the GI_CLEAN flag properly.

Started by Sandman, January 12, 2009, 10:07:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Sandman

The draw commands don't set the GI_CLEAN flag properly.

In libdraw.c, linenumbers: 207, 372, 507, 653, 811, 1064.

Maybe there are more.

I'm almost positive this needs to be added:
dest->info_flags &= ~GI_CLEAN;


I tried it and it did solve the bug: the graphic is properly updated now. :)
-- Sandman

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2


SplinterGU

well, the draw bug still continue...

what fix this? I know, but you have a sample? I mean, what report fix this?
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

import "mod_draw"
import "mod_map"
import "mod_key"
import "mod_wm"

Process main()
Private
int map;
Begin

// Doesn't make a difference:
restore_type = complete_restore;
dump_type = complete_dump;

// Make a new map
graph = new_map(200,200,8);
set_center(0,graph,0,0);
x = 10;
y = 10;

// Select map to use
//map = graph; // works
map = BACKGROUND; // doesn't work

// Drawing setup
drawing_map(0,map);
drawing_color(rgb(255,255,255));

// MAP SHOULD GET UPDATED AFTER THIS CALL:
draw_line(10,10,100,100);

Repeat
frame;
until(key(_ESC)||exit_status)

End

This fixes it.
-- Sandman

SplinterGU

Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

It seems it only applies the background, which makes sense.

Also maybe it should only unset the GI_CLEAN flag if the color is not 0, like in gr_put_pixel().
-- Sandman