News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

roadsign_t::display_after() typo?

Started by iv5343, November 29, 2023, 11:49:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

iv5343

Sorry I can't tell if this is a bug, it just looks odd to me.  Is there a forum to ask questions about the code?

roadsign_t::display_after() has this line:

display_blend( foreground_image, xpos, ypos, 0, color_idx_to_rgb(get_owner()->get_player_color1()+2) | OUTLINE_FLAG | TRANSPARENT75_FLAG, 0, dirty  CLIP_NUM_PAR);

display_blend() has a parameter 'bool dirty' and 'dirty' here is not a variable, the compiler thinks it refers to obj::dirty in enum flag_values.  The other display calls here use 'get_flag(obj_t::dirty)', or is this supposed to be 'true'?

ceeac

I think "get_flag(obj_t::dirty)" is correct, changed in r11015, thanks. This only had a minor performance impact since the old code just re-drew the objects unnecessarily.

Quote from: iv5343 on November 29, 2023, 11:49:11 PMIs there a forum to ask questions about the code?
There is the "Technical Documentation" sub-forum, but for things that might be bugs IMO this sub-forum is also appropriate.