Page 67 of 69

Re: New map features

Posted: 04 Mar 2018 10:36
by HackaLittleBit
Small patch to keep track of the ordering of the docks in the harbour. See foto.
Image

Re: New map features

Posted: 04 Mar 2018 14:26
by wallyweb
HackaLittleBit wrote:Small patch to keep track of the ordering of the docks in the harbour.
First I successfully applied your Organise_ship_docking patch.
Then I applied your dock numbers_26124.patch and got this:
MinGW wrote:sh: dock: No such file or directory
and then I figured it out ... MinGW read the space in your patch name as a new line or some such.
Bad bad MinGW does not like spaces in it's lunch.
Adding an underscore worked: dock_numbers_26124.patch
MinGW is happy now.
:mrgreen:
Make is acookin' and lunch will be up within 30 minutes or so.

A Win32 binary lunch is ready:
DockNumberTest_Win32.7z
The recipe ...
(5.74 MiB) Downloaded 257 times
and a sampling from our kitchen:
Lunch by the numbers ...
Lunch by the numbers ...
Dock Number Test.png (66.35 KiB) Viewed 6124 times

Re: New map features

Posted: 04 Mar 2018 18:09
by wallyweb
Here is the binary with JGR's tracerestrict-cidan, Hackalitlebit's docks by the numbers and notafrog's favourite free bridge:
OpenTTD-NMF_JGR-g5f20fe4eM-tracerestrict-cirdan-HAv2plus1-Win32.7z
Code by numbers
(5.76 MiB) Downloaded 244 times
and some "what-you-see-is-what-you-get":
Paint by numbers
Paint by numbers
Docking_By_The_Numbers.png (170.6 KiB) Viewed 6116 times
Enjoy,
:D

Re: New map features

Posted: 06 Mar 2018 15:34
by HackaLittleBit
Waiting bouy ready!

Wally it is better to apply the 4 patches again.(zipfile below)
I hope you don't have problems with savegames.(I didn't)
Docks (yes the ones with 2 tiles) can only be used for loading and unloading.
Dockbuoy's can be transformed into a waiting buoy or for loading unloading.
You need to click on the label and press ctrl.
By doing so you will roll trough all possible states.

Code: Select all

color codes :
green-green   : Ready to receive for loading unloading.
red-green     : Reserved for loading unloading.
green-yellow  : Ready to receive for waiting.
red-yellow    : Reserved for waiting.
See below foto.
wb.png
wb.png (18.7 KiB) Viewed 6044 times
Patches included in zipfile.
Note that instead of using bool var (reserved) now a flag (dockstatus) is used!!
docks.png
docks.png (25.92 KiB) Viewed 6044 times

Re: New map features

Posted: 06 Mar 2018 17:36
by wallyweb
HackaLittleBit wrote:Waiting bouy ready!
Can you make the coloured dots larger? On my system they are quite difficult to discern even at maximum zoom
Patches included in zipfile.
I applied them in the following order:
26350 then 26351 then 26352 then 26353
Is this ok? Your png image suggests a reverse order.

Here is the Windows 32 bit binary:
OpenTTD-NMF-g30353e06M-HALB-4_Win32.7z
Just the 4 patches, nothing else.
(5.74 MiB) Downloaded 252 times
NOTE: My MinGW had a hiccup on the first chunk of the first patch (26350), however it seems that MinGW retried and it was ok. The subsequent 3 patches went without issue. So, please run this binary to make sure that nothing broke.

Re: New map features

Posted: 06 Mar 2018 19:03
by HackaLittleBit
wallyweb wrote:Can you make the coloured dots larger? On my system they are quite difficult to discern even at maximum zoom
When you open /Cirdan-clone/src/lang/english.txt you can find the following lines

Code: Select all

STR_VIEWPORT_DOCK_GREEN                                         :{GREEN}..{BLACK}{NUM}
STR_VIEWPORT_DOCK_RED                                           :{RED}..{BLACK}{NUM}
STR_VIEWPORT_DOCK_GREEN_YELLOW                                  :{GREEN}.{YELLOW}.{BLACK}{NUM}
STR_VIEWPORT_DOCK_RED_YELLOW                                    :{RED}.{YELLOW}.{BLACK}{NUM}
Just change the dots to another character.
Like * or º or :
I now used

Code: Select all

STR_VIEWPORT_DOCK_GREEN                                         :{GREEN}::{BLACK}{NUM}
STR_VIEWPORT_DOCK_RED                                           :{RED}::{BLACK}{NUM}
STR_VIEWPORT_DOCK_GREEN_YELLOW                                  :{GREEN}:{YELLOW}:{BLACK}{NUM}
STR_VIEWPORT_DOCK_RED_YELLOW                                    :{RED}:{YELLOW}:{BLACK}{NUM}
That looks like this
dubblepoint.png
dubblepoint.png (62.08 KiB) Viewed 6005 times
It is for testing only.
Also change your company collor for more contrast.
wallyweb wrote:I applied them in the following order:
26350 then 26351 then 26352 then 26353
Correct. Uh... I didn't think about it, but that is how I see it on my screen.
wallyweb wrote:NOTE: My MinGW had a hiccup
Hmmm I'll check it out here.
Hold on.

Re: New map features

Posted: 06 Mar 2018 19:28
by HackaLittleBit
wallyweb wrote: NOTE: My MinGW had a hiccup
:oops:

Its time to start branching.
Clean patch below

apply in reversed order.
2.png
2.png (26.4 KiB) Viewed 5996 times
Tested 2x and compiled 2x :mrgreen:

Re: New map features

Posted: 06 Mar 2018 19:32
by wallyweb
HackaLittleBit wrote:
wallyweb wrote:Can you make the coloured dots larger? On my system they are quite difficult to discern even at maximum zoom
Just change the dots to another character.
Aha! I will experiment with an assortment of characters.
Also change your company collor for more contrast.
This is a little more difficult. Players select a company colour for a reason. My own preference is orange because it shows up well for me. Another player may prefer red or white for a similar reason, or for any reason they deem to be valid.
wallyweb wrote:NOTE: My MinGW had a hiccup
Hmmm I'll check it out here.
Hold on.
/me pauses productivity.
Clean patch below
Back with a fresh binary in about an hour, 8)

Re: New map features

Posted: 06 Mar 2018 19:56
by wallyweb
MinGW says ...

Code: Select all

$ patch -p1 < Cirdan-clone_26346.patch
patching file src/pathfinder/opf/opf_ship.cpp
patching file src/pathfinder/yapf/yapf_ship.cpp
Hunk #1 FAILED at 48.
Hunk #2 succeeded at 104 (offset -3 lines).
Hunk #3 succeeded at 230 (offset -3 lines).
1 out of 3 hunks FAILED -- saving rejects to file src/pathfinder/yapf/yapf_ship.
cpp.rej
patching file src/saveload/afterload.cpp
patching file src/saveload/saveload.cpp
patching file src/saveload/station_sl.cpp
patching file src/ship_cmd.cpp
patching file src/station_base.h
Hunk #3 succeeded at 537 (offset 27 lines).
patching file src/vehicle.cpp
Here are the yapf_ship files:
yapf.7z
(4.96 KiB) Downloaded 308 times
/me pauses productivity

Re: New map features

Posted: 06 Mar 2018 20:06
by HackaLittleBit
Did you update your branche from cirdan?
His last commit is:
Fix old map array tunnel head conversion 7 days ago.
here

I checked your reject.
But that should be easy
open file yapf_ship.cpp
and replace lines (somewere near line 50)

Code: Select all

-		, m_dest_tile    (depot ? INVALID_TILE :
-				ship->current_order.IsType (OT_GOTO_STATION) ?
-					m_dest_station->GetClosestTile (ship->tile, m_dest_station->dock_area) :
-				ship->dest_tile)

with

Code: Select all

		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
And I made clean clone of cirdan and the patch applies without problems

Re: New map features

Posted: 06 Mar 2018 21:21
by wallyweb
HackaLittleBit wrote:Did you update your branche from cirdan?
His last commit is:
Fix old map array tunnel head conversion 7 days ago.
I tried but I couldn't get Git clone to point to his testing branch.
I checked your reject.
But that should be easy
I'll apply your fix and see what happens.

Now, how do I get Git to clone from his testing branch?

Hmm ... So now we will have

Code: Select all

-		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
+		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
:?:

Re: New map features

Posted: 06 Mar 2018 21:30
by HackaLittleBit
wallyweb wrote:Now, how do I get Git to clone from his testing branch?
I pull from here
git://repo.or.cz/openttd/fttd.git

Re: New map features

Posted: 06 Mar 2018 21:49
by wallyweb
HackaLittleBit wrote:I pull from here
git://repo.or.cz/openttd/fttd.git
So did I and that got me the regular repo. Now I just got brilliance and determined that the branch name is testing and I put that into Git clone's branch field and that worked. 8)

I'm compiling a clean test branch now, and when that is done I will compile another with your patches. Look for results in about an hour or two. :mrgreen:

Re: New map features

Posted: 06 Mar 2018 21:59
by HackaLittleBit
You know, for a long time I refused to buy a new computer.
I used many years ago system 36 and system 1 IBM
We had 60 terminals on 750 kb of memory.
Yeahhhhh.
So I was happy with my eee pc + 2 MB of memory. (massive machine) windows xp
My son grew up and started to laugh at me.
Anyway after much arguing he managed to take me to the shop.
He showed me a machine with 4000k screen Nvidia board etc etc. quadcore etc etc etc.
I tell you, he was right
The difference is incredible.
I compile openttd in less than a minute. Instead of 15.
4000k screen is like reading a book.
Don't be a grumpy old man, spend the money! :mrgreen:

Regards

Re: New map features

Posted: 06 Mar 2018 23:10
by wallyweb
cirdan wrote:I have just resurrected my testing branch with an update that fixes a crash when loading games with the old map array (reported by HackaLittleBit). If everything goes well and no other bugs appear, I will merge this branch to my master branch in a few days.
Having finally figured out how to pull from cirdan's testing branch, here is the bare and naked, unmodified Windows 32bit binary:
NMF-g1938333b-testing-Win32.7z
Once tested and verified to be without a crash, this will be replaced by a formal push from cirdan
(5.72 MiB) Downloaded 258 times
Moving on to HackalitleBit's patches, MinGW now gives me:

Code: Select all

$ patch -p1 < Cirdan-clone_26346.patch
patching file src/pathfinder/opf/opf_ship.cpp
patching file src/pathfinder/yapf/yapf_ship.cpp
patch: **** malformed patch at line 40: @@ -107,7 +104,7 @@
Are you sure about that yapf_ship.cpp mod you suggested?
HackaLittleBit wrote:Don't be a grumpy old man, spend the money! :mrgreen:
About five years ago I spent close to $2000 on a brand new HP lappy, the big one with a big screen, triple core performance and Windows 7. Yeahhhhh.
Sometime last year, when it was well out of warranty, it smoked its on-board graphic chip. Result: One motherboard reduced to scrap!
So I resurrected my reliable old Dell single core XP box and muddled along until I had the $150 I needed for a used A-Open dual core XP box which is where I am and remain until I can raise $500 for something with more cores and with absolutely NO Windows 10.
It could be worse. I could always go back to my still running IBM P/S 1 with Windows 3.1 :P

Re: New map features

Posted: 07 Mar 2018 00:13
by HackaLittleBit
Wally see below patch

I manually edited it.
Don't apply the patch just look at the differences.
Change manually this line (51)

Code: Select all

		, m_dest_tile    (depot ? INVALID_TILE : ship->current_order.IsType(OT_GOTO_STATION) ? m_dest_station->GetClosestTile(ship->tile, STATION_DOCK) : ship->dest_tile)
Into

Code: Select all

		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
I applied my patches and indeed it is the only problem I encountered.

I all depends on which branch is active.

Re: New map features

Posted: 07 Mar 2018 01:51
by wallyweb
I only have a plain text editor (NoteTab Light) so I do not see the line numbers.
HackaLittleBit wrote:Wally see below patch

I manually edited it.
Don't apply the patch just look at the differences.
Change manually this line (51)

Code: Select all

		, m_dest_tile    (depot ? INVALID_TILE : ship->current_order.IsType(OT_GOTO_STATION) ? m_dest_station->GetClosestTile(ship->tile, STATION_DOCK) : ship->dest_tile)
This is the closest line that I have and it is different from the one that you have:

Code: Select all

-		, m_dest_tile    (depot ? INVALID_TILE :
-				ship->current_order.IsType (OT_GOTO_STATION) ?
-					m_dest_station->GetClosestTile (ship->tile, m_dest_station->dock_area) :
-				ship->dest_tile)
It is followed by this line:

Code: Select all

+		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
so if I make your suggested change, I will have:

Code: Select all

-		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
+		, m_dest_tile    (depot ? INVALID_TILE : ship->dest_tile)
Wouldn't it be easier to just send me your revised patch rather than I make the changes by hand?

Re: New map features

Posted: 07 Mar 2018 08:37
by HackaLittleBit
wallyweb wrote:Wouldn't it be easier to just send me your revised patch rather than I make the changes by hand?
:roll:
Anyway
Here is a pic of the harbour of Singapore.
Image

This is the reality there.
singapore.png
singapore.png (309.15 KiB) Viewed 5867 times
And below the 4 patches that you need.

They go above the commit from cirdan of 5 months ago.
Changeset: 25986 (65a280a61037) Make BreakIndustryChainLink an ordinary function …
wallyweb wrote:I only have a plain text editor (NoteTab Light) so I do not see the line numbers
I am on linux now and never going back.
On windows one of the best tools for editing is NOTEPAD++
With this you can read c++ and patches and lots more.
EDIT
I see now that Kdevelop has a version for windows!!!
Here you can download it.
I know that more devellopers here use this IDE
I really like it, highly recomended.

I do not know how to set up things for windows.
Here are the instructions

Re: New map features

Posted: 07 Mar 2018 11:34
by wallyweb
HackaLittleBit wrote:This is the reality there.
So when are you going to make a scenario of the real thing? :lol:
And below the 4 patches that you need.
:bow:
They go above the commit from cirdan of 5 months ago.
Ok ... We're done with cirdan's test push then ...
I am on linux now and never going back.
I was on Linux, many distros, many times ... Red Hat, Mandrake, and whatever the latest one is ... I forget the name ... I may go back when I get a better PC, but for now I'm not messing with partitions etc.
On windows one of the best tools for editing is NOTEPAD++
With this you can read c++ and patches and lots more.
Actually I can do all that with NoteTab Light. I'm just too busy lazy to poke around the app.
I see now that Kdevelop has a version for windows!!!
Here you can download it.
I know that more devellopers here use this IDE
I really like it, highly recomended.
I'll look into it, but it would probably just sit there taking up space.

Re: New map features

Posted: 07 Mar 2018 15:01
by wallyweb
OK ... Here we go ... :D

Windows 32bit cirdan's push with HackalittleBit's mod:
OpenTTD-NMF-g30353e06M-HALB-4a_Win32.7z
Exactly the way HackalittleBit wrote it
(5.74 MiB) Downloaded 263 times
Windows 32bit JGR's tracerestrict-cirdan with HackalittleBit's mod and cirdan's free-bridge diff and a little mod of my own: 8)
OpenTTD-NMF_JGR-g5f20fe4eM-tracerestrict-cirdan-FBHAv4a-Win32.7z
With my own mod added
(5.76 MiB) Downloaded 289 times
A little screenshot showing my mod:
A thousand words worth of picture
A thousand words worth of picture
dockTest.png (94.37 KiB) Viewed 5818 times
An observation: If a second ship joins the waiting ship, the waiting buoy's symbols change to reservation available.

All in all, this is really neat. 8)