Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Wed Aug 15, 2018 10:56 am

All times are UTC




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sun Sep 29, 2013 5:43 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Oct 12, 2012 5:16 pm
Posts: 79
Skype: melvinvermeeren
Location: Netherlands
Hi guys.

Well basically I tried merging Slim Timetable Seperation and Departure Boards (this is based of MMNL Custom Series 1 V6 which can be found in my signature) and it should work but it's giving some durpy errors that I just can't solve.

These are the only errors I have:
Code:
4>  date_gui.cpp
4>..\src\date_gui.cpp(183): error C2664: 'SetDateWindow::SetDateWindow(WindowDesc *,WindowNumber,Window *,Date,Year,Year,SetDateCallback (__fastcall *))' : cannot convert parameter 1 from 'const WindowDesc *' to 'WindowDesc *'
4>          Conversion loses qualifiers
4>..\src\date_gui.cpp(346): error C2661: 'WindowDesc::WindowDesc' : no overloaded function takes 8 arguments


The code:
Code:
struct SetMinutesWindow : SetDateWindow
{
   Minutes minutes;

   /** Constructor. */
   SetMinutesWindow(const WindowDesc *desc, WindowNumber window_number, Window *parent, DateTicks initial_date, Year min_year, Year max_year, SetDateCallback *callback) :
      SetDateWindow(desc, window_number, parent, initial_date, min_year, max_year, callback),
      minutes(initial_date / _settings_client.gui.ticks_per_minute)
   {
   }


Code:
static const WindowDesc _set_minutes_desc(
   WDP_CENTER, 0, 0,
   WC_SET_DATE, WC_NONE,
   0,
   _nested_set_minutes_widgets, lengthof(_nested_set_minutes_widgets)
);


I also attached the patches I have so far, although there was something wring with station_gui.cpp (whitespaces or something) so I attached it separately.

Thanks in forward,

Melvin.

The patches here are outdated, check later posts.


Attachments:
r25797 Custom Series 1 V7 DEBUG Departure Boards.patch [631.81 KiB]
Downloaded 51 times
r25797 Custom Series 1 V7 DEBUG Departure Boards Projects.patch [654.54 KiB]
Downloaded 49 times
station_gui.cpp [84.12 KiB]
Downloaded 49 times

_________________
Anyone up for some casual co-op?
MMNL Ready2Play MP PatchPacks; Request here!.


Last edited by MasterMeNL on Tue Oct 01, 2013 2:54 pm, edited 1 time in total.
Top
   
PostPosted: Mon Sep 30, 2013 6:51 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
1. You have to change SetMinutesWindow::SetMinutesWindow in a way that it takes non-const WindowDesc.
2. There is a new argument while constructing WindowDesc (second one, const char *ini_key). Pass NULL there when initializing _set_minutes_desc.

_________________
:] don't worry, be happy and checkout my patches


Top
   
PostPosted: Mon Sep 30, 2013 9:47 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Thu Jun 29, 2006 8:36 am
Posts: 259
Here is departureboards/wallclock updated against trunk r25801. It compiles and doesn't crash openttd, but it breaks the ctrl-timetable click spreading (http://vcs.openttd.org/svn/changeset/25377/).


Attachments:
departureboardswallclock25-r25801.diff [62.58 KiB]
Downloaded 68 times

_________________
My screenshots
A fractal heightmap generator for openttd
Top
   
PostPosted: Mon Sep 30, 2013 8:15 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Oct 12, 2012 5:16 pm
Posts: 79
Skype: melvinvermeeren
Location: Netherlands
adf88 wrote:
1. You have to change SetMinutesWindow::SetMinutesWindow in a way that it takes non-const WindowDesc.
2. There is a new argument while constructing WindowDesc (second one, const char *ini_key). Pass NULL there when initializing _set_minutes_desc.

I really don't know what that means, lmao. I'm still too much of a rookie I guess. :mrgreen:
Zooks' updated patched helped me merge, but now it's magic.

zooks wrote:
Here is departureboards/wallclock updated against trunk r25801. It compiles and doesn't crash openttd, but it breaks the ctrl-timetable click spreading (http://vcs.openttd.org/svn/changeset/25377/).

It looks like your forgot to add the header files, but I added them from an older version of the patch (don't know if something in there changed).

Anyway, I merged it but now I'm getting this magic:
Code:
4>station_gui.obj : error LNK2001: unresolved external symbol "void __cdecl ShowStationDepartures(unsigned short)" (?ShowStationDepartures@@YAXG@Z)
4>waypoint_gui.obj : error LNK2001: unresolved external symbol "void __cdecl ShowWaypointDepartures(unsigned short)" (?ShowWaypointDepartures@@YAXG@Z)
4>C:\Data\Programming\OpenTTD\revisions\r25800 MMNL Custom Series 1 V8\trunk\projects\..\objs\x64\Release\openttd.exe : fatal error LNK1120: 2 unresolved externals


5000 karma points if you help me.

Thanks in forward,

Melvin.

_________________
Anyone up for some casual co-op?
MMNL Ready2Play MP PatchPacks; Request here!.


Top
   
PostPosted: Tue Oct 01, 2013 7:09 am 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4655
Location: home
My suggestion is that you start learning C++, or you will be forever asking for this kind of help.


Top
   
PostPosted: Tue Oct 01, 2013 8:42 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jun 25, 2009 4:42 pm
Posts: 2364
Location: Location, Location
^^ :roll: :oops:

_________________
AroAI - A really feeble attempt at an AI

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra


Top
   
PostPosted: Tue Oct 01, 2013 2:49 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Oct 12, 2012 5:16 pm
Posts: 79
Skype: melvinvermeeren
Location: Netherlands
I'm sort of learning C++ right now but I can't know everything in like 3 weeks.
Those 2 patches are 2 I really want in my patch pack (and some others want it too) but I can't figure it out, after this I consider it more or less complete.

This is the first (and hopefully last) time I ask for help, so could you help me out for this one time? :wink:
I attached the updated patch file of what I've done so far in case you need it.

Thanks in forward,

Melvin.


Attachments:
r25801 MMNL Custom Series 1 V8 Debug.patch [669.36 KiB]
Downloaded 49 times

_________________
Anyone up for some casual co-op?
MMNL Ready2Play MP PatchPacks; Request here!.
Top
   
PostPosted: Tue Oct 01, 2013 3:54 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7086
smells like you're missing a new .cpp file as well, even after you copied over the missing .h files. or you didn't include it in sources.lst or forgot to run projects/generate.

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Sat Oct 05, 2013 9:21 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Oct 12, 2012 5:16 pm
Posts: 79
Skype: melvinvermeeren
Location: Netherlands
Eddi wrote:
smells like you're missing a new .cpp file as well, even after you copied over the missing .h files. or you didn't include it in sources.lst or forgot to run projects/generate.

So I generated it, put it the settings again and suddenly it worked apart from 1 little error I fixed within a minute.
I never even knew you had to run generate so I never did it before.
Thanks a lot!

Looks like my "C++ skills" were good enough. ( ͡° ͜ʖ ͡°)

Regards,

Melvin.

P.S. This response isn't late or anything like that.

_________________
Anyone up for some casual co-op?
MMNL Ready2Play MP PatchPacks; Request here!.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.