Autor Tema: [BUG] Draw commands don't set the GI_CLEAN flag properly.  (Leído 1877 veces)

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
[BUG] Draw commands don't set the GI_CLEAN flag properly.
« en: Enero 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:
Código: [Seleccionar]
dest->info_flags &= ~GI_CLEAN;

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

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12534
  • Karma: 370
Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
« Respuesta #1 en: Enero 12, 2009, 10:14:00 pm »
yes! thanks... I think that this is a pending bug...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
« Respuesta #2 en: Enero 12, 2009, 10:19:07 pm »
Okay, good. :)
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12534
  • Karma: 370
Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
« Respuesta #3 en: Enero 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?
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
« Respuesta #4 en: Enero 13, 2009, 01:36:58 am »
Código: [Seleccionar]
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.
« última modificación: Enero 13, 2009, 01:46:45 am por Sandman »
-- Sandman

SplinterGU

  • Hero Member
  • *****
  • Mensajes: 12534
  • Karma: 370
Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
« Respuesta #5 en: Enero 13, 2009, 01:41:48 am »
thanks...
Download Lastest BennuGD Release: http://www.bennugd.org/node/2

Sandman

  • Sr. Member
  • ****
  • Mensajes: 298
  • Karma: 48
Re: [BUG] Draw commands don't set the GI_CLEAN flag properly.
« Respuesta #6 en: Enero 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().
-- Sandman