Skip to main content
Topic: r1994: Factory infoormation window (Read 6752 times) previous topic - next topic

r1994: Factory infoormation window

Since some last releases, I've noticed that when opening a factory information window and clicking on a factory provider or a consumer, the view is not moved to that factory any more.  Is it intended or a bug?

Re: r1994: Factory infoormation window

Reply #1
You have to click on the small triangle in front of the factory name.

 

Re: r1994: Factory infoormation window

Reply #2
It doesn't work either.  The graphic of the triangle is pressed but the view doesn't move.  I have tested it with r2000, Linux, pak64.

Re: r1994: Factory infoormation window

Reply #3
Strange, it works for me.

Re: r1994: Factory infoormation window

Reply #4
(Moved to new topic, because of different problem.)

Re: r1994: Factory infoormation window

Reply #5
It doesn't work either.  The graphic of the triangle is pressed but the view doesn't move.  I have tested it with r2000, Linux, pak64.

I downloaded r2000 from nightly site and tested.

Windows SDL and GDI worked well for me.
Linux GCC3 and GCC4 didn't work.

Re: r1994: Factory infoormation window

Reply #6
I've done some research and found that it works with r1969 and doesn't work with r1970.  Svn tells that:

------------------------------------------------------------------------
r1970 | prissi | 2008-08-26 22:08:16 +0200 (Tue, 26 Aug 2008) | 1 line

ADD: target destinations in halt details now clickable
------------------------------------------------------------------------

Keep doing some research...

Edit:
After some research, I've found out that the callback function is properly called when the button is pressed (fabrik_info_t::action_triggered(gui_komponente_t *komp, value_t v).  Variable v has two componets,
v.i and v.p.  The latter is OK.  The problem comes with v.i.

For these position buttons v.i is a pointer (koord *) and thus, different from 0 and 1.  But the problem is that in gcc/Linux that pointer is interpreted as signed and has a value of -1082123236 in my machine.  That makes the check in fabrik_info.cc:173 fail:
else if(v.i>1) {

I would suggest changing that line into:
else if(v.i!=0 && v.i!=1) {
or even:
else if(v.i&~1) {
but I am only guessing, since I don't know the code.

Re: r1994: Factory infoormation window

Reply #7
That is a very good report, will be changed.

Re: r1994: Factory infoormation window

Reply #8
Thanks, Prissi.

By the way, r2005 doesn't compile with gcc.  It says that array dimensions in these lines don't match:
crossing_logic.h:74:
static kreuzung_besch_t *can_cross_array[8][8];
crossing_logic.cc:173:
kreuzung_besch_t* crossing_logic_t::can_cross_array[9][9] =

Re: r1994: Factory infoormation window

Reply #9
Well, this should be fixed now too. Why on earth did MSVC compile this one ... ?

Re: r1994: Factory infoormation window

Reply #10
fixed with r2009

will work again