The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: iv5343 on November 29, 2023, 11:49:11 PM

Title: roadsign_t::display_after() typo?
Post by: iv5343 on November 29, 2023, 11:49:11 PM
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 (https://github.com/aburch/simutrans/blob/435469caeb1f8849d6909d8b91b426cb78431f1e/src/simutrans/obj/roadsign.cc#L546):

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'?
Title: Re: roadsign_t::display_after() typo?
Post by: ceeac on November 30, 2023, 07:06:12 AM
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.