Page 6 of 9

Re: [patch] Terminus Airports v1.43 (r27460)

Posted: 04 Feb 2016 12:19
by Vetteman06
openbu.org wrote:The plane is flying into outer space
Going to need more info on this one...
This looks like more of a games issue than my patch...
I only modified stuff at the airport.
Not the flying between airports.

But anything is possible...
Give me a screenshot of the aircraft orders.

Also, if you build some of these airports near the edge of the map, the plane will fly over the black part as part of it's holding pattern.
This is normal and the plane will land correctly.

sunshare wrote:Los Angeles, or the airport have large capacity.
LA looks like Intercontinental, International, Terminus2, etc...
I would rather not create another airport that looks like those.
Same with Atlanta, Dallas, Dulles, etc...
Give me something unique and interesting to do...
An airport that doesn't look like all the others.

Re: [patch] Terminus Airports v1.43 (r27460)

Posted: 04 Feb 2016 13:34
by Diamond42
Hey Vetteman,

Both Sydney and Perth look amazing, great mockups! Sydney is much busier than Perth, but both are quite large hubs! Perth is my base so I'm kinda biased in that way!

A side question, do you know how to reduce the minimum town distance in the build you generate? Prior to switching to this I just used the spring patch pack and it was a setting there!

Cheers!

Re: [patch] Terminus Airports v1.43 (r27460)

Posted: 04 Feb 2016 13:36
by openbu.org
Vetteman06 wrote:
openbu.org wrote:The plane is flying into outer space
Going to need more info on this one...
This looks like more of a games issue than my patch...
I only modified stuff at the airport.
Not the flying between airports.

But anything is possible...
Give me a screenshot of the aircraft orders.

Also, if you build some of these airports near the edge of the map, the plane will fly over the black part as part of it's holding pattern.
This is normal and the plane will land correctly.

Code: Select all

Company#9-Aircraft#1  is flying into outer space 
DE_DY Transport.sav

Re: [patch] Terminus Airports v1.43 (r27460)

Posted: 04 Feb 2016 22:43
by Vetteman06
openbu.org wrote:Company#9-Aircraft#1  is flying into outer space
Thanks for posting the save game...
It is indeed a bug at the Windy airport.
I will post a fix for it tomorrow.
It occurs because of my recent changes to the landing patterns.
Windy is the only airport to have special requirements because of the crabbing the planes do.

EDIT:
Ok, I posted 1.44 to fix Windy City bug.
openbu.org, remember, your plane has no orders for a second airport. And your heights airport is closed.
Need to correct those 2 issues and your save game will recover.
It will take a little while for the plane to make it's way back to that airport.

Diamond42 wrote:Both Sydney and Perth look amazing, great mockups! Sydney is much busier than Perth, but both are quite large hubs! Perth is my base so I'm kinda biased in that way!
Well, I don't plan on doing both... Which would you prefer? Probably Perth from your comments... :)
Diamond42 wrote:A side question, do you know how to reduce the minimum town distance in the build you generate?
That is a separate patch that Spring includes...
http://www.tt-forums.net/viewtopic.php?t=33625

I don't want to make a pack.
I would rather the pack makers to include my stuff.
I will probably remove the 2 I include now to make it easier for them to include this one.
But I doubt they will until I get this a lot more stable/bug free.
Since I will make more changes to add in the company partnerships.
That will probably push out their comfort level a bit.
Probably be 1.6 before they start considering it...
I still need to do testing with it in multi-player.

More you and others help me find the bugs, the quicker that might happen!!!

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 05 Feb 2016 16:03
by openbu.org
Ok, I posted 1.44 to fix Windy City bug.
thanks to Vetteman06,I love you. :bow:

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 06 Feb 2016 22:52
by markzl
Hi,

I'm having trouble compiling this patch pack & I would like to try it out by the very positive comments here.

I'm using a Mac iBook G4 PowerPC. I can compile without the patchpack.
Here are the errors:

Code: Select all

[LANG] Generating table/strings.h
[LANG] Compiling language afrikaans
/openttd_27460_TerminusAirports144/src/lang/afrikaans.txt:2468: warning: String name 'STR_AIRPORT_CLASS_HUB' does not exist in master file

... [ALL lang files have the same warning]

[LANG] Compiling language welsh
/openttd_27460_TerminusAirports144/src/lang/welsh.txt:2467: warning: String name 'STR_AIRPORT_CLASS_HUB' does not exist in master file
[SETTING] Compiling and Linking endian_check
And

Code: Select all

[SRC] Compiling aircraft_cmd.cpp
In file included from /openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:34:
/openttd_27460_TerminusAirports144/src/station_base.h:384: error: integer constant is too large for ‘long’ type
/openttd_27460_TerminusAirports144/src/station_base.h:386: error: integer constant is too large for ‘long’ type
/openttd_27460_TerminusAirports144/src/station_base.h:425: error: integer constant is too large for ‘long’ type
/openttd_27460_TerminusAirports144/src/station_base.h:427: error: integer constant is too large for ‘long’ type
/openttd_27460_TerminusAirports144/src/station_base.h:518: error: integer constant is too large for ‘long’ type
/openttd_27460_TerminusAirports144/src/station_base.h:531: error: integer constant is too large for ‘long’ type
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp: In function ‘bool AircraftController(Aircraft*)’:
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:955: warning: enumeration value ‘DIR_END’ not handled in switch
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:955: warning: enumeration value ‘INVALID_DIR’ not handled in switch
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp: In function ‘bool AirportSetBlocks2(Aircraft*, const AirportFTA*, const AirportFTAClass*)’:
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:2120: warning: unused variable ‘reference’
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp: At global scope:
/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:2272: warning: ‘uint GetNumTerminals(const AirportFTAClass*)’ defined but not used
make[1]: *** [aircraft_cmd.o] Error 1
make: *** [all] Error 1
I do not know anything about C language [or if its called C+ or C++] so all I can try is to edit the file directly using any help I get from here.

Also, I am ignoring the 2 folders in the .7z file named ..._OpenGFX & ..._ZBase. Is that correct for my case?

Thank you for any help.

Mark L.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 07 Feb 2016 02:27
by openbu.org
c++11?

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 07 Feb 2016 11:35
by Vetteman06
markzl wrote:I'm having trouble compiling this patch pack & I would like to try it out by the very positive comments here.
Ok the LANG files....
You can ignore those warnings.
Once I have the patch a little more refined and closer to completion, I'll fix all the LANG files.
But it will compile correctly with those warnings.
markzl wrote:/openttd_27460_TerminusAirports144/src/station_base.h:384: error: integer constant is too large for ‘long’ type
For each of these, find the line in the file and you will see code similiar to this...

Code: Select all

terminals = terminals & 35184372088320; // TERM01 through TERM36   Bits 9 through 44
At the end of the large number, put an "L"

Code: Select all

terminals = terminals & 35184372088320L; // TERM01 through TERM36   Bits 9 through 44
That should fix all 6 of those...
I should have specified it anyway...
markzl wrote:/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:955: warning: enumeration value ‘DIR_END’ not handled in switch
This is a warning and should compile anyway...
But to keep the warning from coming up...
Modify the section of code so it looks like below...

Code: Select all

			case DIR_SE:
				dist = abs(x + amd.x - v->x_pos) +  abs(y + amd.y - (v->y_pos + 4));
				break;
			case DIR_END:
			case INVALID_DIR:
				dist = abs(x + amd.x - v->x_pos) +  abs(y + amd.y - v->y_pos);
				break;
		}
	else
		dist = abs(x + amd.x - v->x_pos) +  abs(y + amd.y - v->y_pos);
markzl wrote:/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:2120: warning: unused variable ‘reference’
Another warning, but to get rid of the warning, just comment out that line. Add the "//" to the beginning of that line

Code: Select all

	//const AirportFTA *reference = &apc->layout[v->pos];
markzl wrote:/openttd_27460_TerminusAirports144/src/aircraft_cmd.cpp:2272: warning: ‘uint GetNumTerminals(const AirportFTAClass*)’ defined but not used
Another warning....
This one just ignore.
But if you want to get rid of the warning..
Just comment out that block of code using "/*" and "*/"

Code: Select all

/*static uint GetNumTerminals(const AirportFTAClass *apc)
{
	uint num = 0;

	for (uint i = apc->terminals[0]; i > 0; i--) num += apc->terminals[i];

	return num;
}*/
markzl wrote:Also, I am ignoring the 2 folders in the .7z file named ..._OpenGFX & ..._ZBase. Is that correct for my case?
Correct. The difference between the 2 is the placement of the hanger graphics.
I am not sure who is wrong, OpenGFX or ZBase... Probably ZBase... but the graphic placement is wrong.
The patch file I provide is for ZBase.
If you play with OpenGFX, then you will need to modify 7 lines of code in the station_land.h file...
In that file, you will see 7 lines that look like below...

Code: Select all

static const DrawTileSeqStruct _station_display_flag_1_fence_ne[] = {
	TILE_SEQ_LINE( SPR_AIRPORT_FENCE_Y_L,  0,  0,  1, 16,  6, SPR_AIRPORT_FENCE_Y | (1U << PALETTE_MODIFIER_COLOUR))  // fence ne
	TILE_SEQ_LINE(-3, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_1 | (1U << PALETTE_MODIFIER_COLOUR))  //ZBase
	//TILE_SEQ_LINE( 5, 11,  0,  1,  1, 20, SPR_AIRFIELD_WIND_1 | (1U << PALETTE_MODIFIER_COLOUR))   //OpenGFX
	TILE_SEQ_END()
};
Simply move the "//" to the other line and recompile.

OpenGFX is the base graphics set, more like original and uses 8bpp.
ZBase is a newer graphics set, uses 32bpp.


Now the one issue you may run into that I am not sure how to fix is the ALT key being enabled.
I enabled it in the Windows files, but not sure if Mac uses that file or not.
I am pretty sure Unix/Linux will not work. But not sure about Mac.
Let me know if the ALT key works or not.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 11 Feb 2016 05:29
by markzl
Thanks Vetteman06, you're help is much appreciated. I'll try these modifications tonight & let you know the results.

openbu.org wrote:c++11?
Thanks openbu.org, I have to admit that I ignored your response at first! I thought it was some sort of joke or some "LEET" word (do people still use "LEET"?). It turned out to be _very_ informative instead.

Thanks again guys.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 13 Feb 2016 05:00
by markzl
I tried twice, first time with all the modifications & the second time with only adding 'L' to '35184372088320'. Both times the results were the same as before the modifications.

I then done a quick google search which showed 'UL' & 'LL' suffixes, so I tried 'LL' as a suffix for '35184372088320'. It worked for 3 of the errors so I added 'LL' to the end of '144080003703767040'. This fixed all 6 errors.

Now my errors are:

Code: Select all

[SRC] Compiling station_gui.cpp
/openttd_27460_TerminusAirports144/src/station_gui.cpp: In member function ‘virtual void AirportControlWindow::DrawWidget(const OTTD_Rect&, int) const’:
/openttd_27460_TerminusAirports144/src/station_gui.cpp:2630: error: ‘to_string’ is not a member of ‘std’
/openttd_27460_TerminusAirports144/src/station_gui.cpp:2650: error: ‘to_string’ is not a member of ‘std’
make[1]: *** [station_gui.o] Error 1
make: *** [all] Error 1
Please let me know if adding 'LL' is ok & what my next step should be for my current errors.

Thanks in advance.

EDIT:
I thought I should add:

Code: Select all

ml-ls-ibook-g4:~ mll$ gcc
powerpc-apple-darwin9-gcc-4.0.1: no input files
ml-ls-ibook-g4:~ mll$ g++
powerpc-apple-darwin9-g++-4.0.1: no input files
I hope the versions aren't the problem though!

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 13 Feb 2016 06:54
by openbu.org
/openttd_27460_TerminusAirports144/src/station_gui.cpp:2650: error: ‘to_string’ is not a member of ‘std’

Code: Select all

"to_string" is C++11.
Older compilers may not support it.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 13 Feb 2016 20:51
by markzl
openbu.org wrote:

Code: Select all

"to_string" is C++11.
Older compilers may not support it.
I thought it might be something like that with the stuff I read, although the game builds/compiles ok without this patch.
There are a few pages on stackoverflow.com on the subject. This, I hope, may help:

Code: Select all


you may want to specify the C++ version with

g++ -std=c++11 tmp.cpp -o tmp

I don't have gcc 4.8.1 at hand , but in older versions of GCC, you can use

g++ -std=c++0x tmp.cpp -o tmp

At least gcc 4.9.2 I believe also support part of C++14 by specifying

g++ -std=c++1y tmp.cpp -o tmp

 answered Oct 1 '13 at 17:42
John Smith
But like I said, the game compiles without this patch [of course, it may be this patch which adds the command].


EDIT:
I used the openttd compiling wiki information pages to get openttd to work on my powerpc [the universal binaries for intel/powerpc do not work on my powerpc] so I have fink, macports & homebrew installed on my machine. Today I'll try to update my compiler & see how I go. This may take a while.

EDIT2:
I just found this:

Code: Select all

g++      g++-4.0  g++-4.2  
ml-ls-ibook-g4:~ mll$ g++
powerpc-apple-darwin9-g++-4.0.1: no input files
ml-ls-ibook-g4:~ mll$ g++-4.0
powerpc-apple-darwin9-g++-4.0.1: no input files
ml-ls-ibook-g4:~ mll$ g++-4.2
powerpc-apple-darwin9-g++-4.2.1: no input files

gcc         gcc-4.0     gcc-4.2     gccmakedep  
ml-ls-ibook-g4:~ mll$ gcc
powerpc-apple-darwin9-gcc-4.0.1: no input files
ml-ls-ibook-g4:~ mll$ gcc-4.0
powerpc-apple-darwin9-gcc-4.0.1: no input files
ml-ls-ibook-g4:~ mll$ gcc-4.2
powerpc-apple-darwin9-gcc-4.2.1: no input files

How do I make gcc/g++ use the newer 4.2.1 version? Are the commands gcc/g++ .sh files that I can edit or is there another way to tell the computer to use the newer version? I'm still trying to get a more current version.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 24 Mar 2016 03:52
by Diamond42
Hey Vetteman06,

Hope you're good buddy :-) Any progress on the next version of this great patch?

Diamond42

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 24 Mar 2016 08:01
by Alberth
markzl wrote:How do I make gcc/g++ use the newer 4.2.1 version? Are the commands gcc/g++ .sh files that I can edit or is there another way to tell the computer to use the newer version? I'm still trying to get a more current version.
Normal procedure is to tell the build program which compiler you want:

Code: Select all

CC=gcc-4.2 CXX=g++-4.2 ./configure
The "CC" and "CXX" have special meaning, as in they tell what program to run for the C compiler / c++ compiler.
Since OpenTTD doesn't use C code, the "CC=gcc-4.2" is probably not needed.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 05 Jun 2016 17:56
by willsym22
Hello, im wondering whether this works with the JGR patch?
Thanks :)

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 05 Jun 2016 22:10
by kamnet
willsym22 wrote:Hello, im wondering whether this works with the JGR patch?
JGR has repeatedly stated that Terminus Airport patch still has a lot of bugs and unresolved issues and isn't stable enough to include in his pack, but he does watch this topic.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 29 Jun 2016 19:09
by huub007
Hi,

Would it be possible to include extra large maps in this patch?
Or for someone to make a small patch pack with this patch and extra large maps?

thx in advance

Huub

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 30 Jun 2016 00:08
by pi1985
Hi!
This is very great patch. I want to include it in my patchpack, but my pack already has DayLength patch, Airport Upgrade patch and Shared Infrastructure patch. So, I need only part with new airports. Can you please make patch with only new airports without any additions?

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 24 Feb 2017 01:26
by Captain Rand
Has development on this patch died?

I hope not, there was some amazing work being done!

Pete.

Re: [patch] Terminus Airports v1.44 (r27460)

Posted: 14 Sep 2017 01:48
by KeldorKatarn
Tried it out ONCE, promtly crashed. So I wouldn't expect anyone to include this in their patchpacks. It should have been done step by step with incremental very small well tested patches.

This adds new airports, chanches payment, adds new UI, makes airports sharable and whatever else. I wouldn't even know where to begin.