Bennu Game Development

English Forums => Suggestions => Topic started by: Sandman on January 12, 2009, 10:07:52 PM

Title: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: Sandman on January 12, 2009, 10:07:52 PM
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. :)
Title: Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: SplinterGU on January 12, 2009, 10:14:00 PM
yes! thanks... I think that this is a pending bug...
Title: Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: Sandman on January 12, 2009, 10:19:07 PM
Okay, good. :)
Title: Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: SplinterGU on January 12, 2009, 10:26:32 PM
well, the draw bug still continue...

what fix this? I know, but you have a sample? I mean, what report fix this?
Title: Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: Sandman on January 13, 2009, 01:36:58 AM
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.
Title: Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: SplinterGU on January 13, 2009, 01:41:48 AM
thanks...
Title: Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
Post by: Sandman on January 13, 2009, 01:46:59 AM
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().