The International Simutrans Forum

 

Author Topic: r1994: Factory infoormation window  (Read 4491 times)

0 Members and 1 Guest are viewing this topic.

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
r1994: Factory infoormation window
« on: September 04, 2008, 01:27:29 AM »
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?

Offline whoami

  • Devotees (Inactive)
  • *
  • Posts: 693
Re: r1994: Factory infoormation window
« Reply #1 on: September 04, 2008, 12:00:14 PM »
You have to click on the small triangle in front of the factory name.

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
Re: r1994: Factory infoormation window
« Reply #2 on: September 05, 2008, 02:06:32 AM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10663
  • Languages: De,EN,JP
Re: r1994: Factory infoormation window
« Reply #3 on: September 05, 2008, 08:44:46 AM »
Strange, it works for me.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: r1994: Factory infoormation window
« Reply #4 on: September 05, 2008, 03:47:41 PM »
(Moved to new topic, because of different problem.)
« Last Edit: September 07, 2008, 10:57:39 AM by z9999 »

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: r1994: Factory infoormation window
« Reply #5 on: September 05, 2008, 04:16:23 PM »
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.

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
Re: r1994: Factory infoormation window
« Reply #6 on: September 05, 2008, 10:59:44 PM »
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.
« Last Edit: September 06, 2008, 12:59:42 AM by isidoro »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10663
  • Languages: De,EN,JP
Re: r1994: Factory infoormation window
« Reply #7 on: September 06, 2008, 07:03:25 PM »
That is a very good report, will be changed.

Offline isidoro

  • Devotee
  • *
  • Posts: 1140
Re: r1994: Factory infoormation window
« Reply #8 on: September 07, 2008, 02:30:03 AM »
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] =

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10663
  • Languages: De,EN,JP
Re: r1994: Factory infoormation window
« Reply #9 on: September 07, 2008, 07:25:06 PM »
Well, this should be fixed now too. Why on earth did MSVC compile this one ... ?

Offline hellmade

  • Devotee
  • Devotees (Inactive)
  • *
  • Posts: 40
Re: r1994: Factory infoormation window
« Reply #10 on: September 09, 2008, 07:24:11 AM »
fixed with r2009

will work again