MiniIN + Bridge branch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply

Do you want bridge branch features in MiniIN?

Yes!
42
75%
No.
1
2%
I don't care about MiniIN anymore.
13
23%
 
Total votes: 56

Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

MiniIN + Bridge branch

Post by Quark »

My merging of it isn't entirely correct and I just notice that 0.5.0 stopped just 28 revs or 5 days before merging with bridge patch.

Can someone help me with proper integration of bridge branch into MiniIN?
Image
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium »

Does this mean that you are volunteering for the new maintainer of the MiniIN?

Anyway, the bridge branch will wreak havoc to some patches within the MiniIN; I can think of the following: PBS and copy paste.
You also need to update to a later revision of trunk as there are bugs in the bridge code just after the merge.
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

Maybe :) If I will have SVN commit rights :) But I must say that sometimes my skills isn't enough (or I don't have enough will) to overcome all problems, for example something like upgrading all patches to new widget system.
[MiniIN]: Sync with trunk, r6197:6361.
This was a difficult sync. Please let me know of any errors found / patches broken by it.
I don't notice any consequnces in PBS, maybe because of insufficient testing — you can test it yourself in my build.
Copy paste was modified to be able to store bridges, but again, I didn't completely test it.

I must say that I need additional tester :)
Image
Quark
Transport Coordinator
Transport Coordinator
Posts: 325
Joined: 20 Sep 2006 11:36
Location: Russia, Moscow

Post by Quark »

Now I need some information about bridge branch: what was done with «IsBridge(tile) && IsBridgeMiddle(tile)» and why most times all code with IsBridgeMiddle is simply removed and sometimes it was replaced with «MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)»?
Image
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1518
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

The vote has been cast and perhaps someone will care for Mini_IN as I do to continue maintaining it...
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Post by Eddi »

Quark wrote:Now I need some information about bridge branch: what was done with «IsBridge(tile) && IsBridgeMiddle(tile)» and why most times all code with IsBridgeMiddle is simply removed and sometimes it was replaced with «MayHaveBridgeAbove(tile) && IsBridgeAbove(tile)»?
this has a simple reason, there are no bridge middle tiles anymore...

all bridge data is stored in the bridge heads (aka bridge tiles), on all tiles, that were previously bridge middle parts, two bits are reserved for indicating that they have a bridge above them.

ergo...
all pieces of code that handle stuff that happens ON a bridge, have "IsBridgeMiddle" simply removed
all pieces of code that handle stuff that happens UNDER a bridge, have "IsBridgeAbove" added

i have prepared myself a bridge patch, and fixed some PBS issues with them (although i would not recommend reversing on them, might be unhealthy, but this is probably a general PBS problem)

i have the patch here: http://www.informatik.uni-halle.de/~kra ... iniin.diff

things that i certainly broke: Copy-Paste patch, and Bridge-overbuild-with-new-bridge patch
some other patch had a "#ifndef BRIDGE_BRANCH_INCLUDED" (i don't exactly remember which), so i just defined that, hoping the person knew what he did ;)

also, i have not included all fixes that happened after the bridge merge, and i might have broken something in the diff, while i was cleaning up other local modifications... so i'd like some feedback

PS: when a reimplementation of PBS is going into trunk i will probably stop caring about it
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

The Copy&Paste bridge-handling from trunk is the same as within mini-in.

So you may just copy&paste the whole MP_TUNNELBRIDGE-case code in CopyArea, plus the default-case(contained some obsolete bridge/tunnel code).
(Line 904 to 1124 in patchfile)

And copy&paste the bridge-pasting code from PasteArea.
(Line 464 to 513 in patchfile)

Line-numbers are from latest patchfile. (rev8178)

Bye,
Frostregen
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Post by Eddi »

thanks for your help, copy-paste appears to be work, and i updated the diff in the link above...

but i have come across three issues:
- in line #1021 of your patchfile, you have an alignment issue (4 spaces instead of tab)
- when i copied semaphore PBS signals, they ended up being inserted as normal PBS signals
- the button in the landscaping toolbar lacks a tooltip

they might not be related...
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Post by Eddi »

fixed up a few issues with my diff, should now apply cleanly...
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

This diff resolves some issues with copy&paste in mini-in.

-semaphores not pasted correctly (CmdBuildSingleSignal changed)
-added "Paste Speed" feature
-added Hotkeys (Ctrl+C, CTRL+V, CTRL+Insert, SHIFT+Insert)
-fixed wrong c&p tooltip in terraform_gui

The bridge-branch compatibility is restored in eddi's diff above.
Attachments
copy_paste_rev8230_MiniIN_update.patch
(9.02 KiB) Downloaded 239 times
Eddi
Tycoon
Tycoon
Posts: 8272
Joined: 17 Jan 2007 00:14

Post by Eddi »

there has been a commit to trunk for the replacement of existing bridges, i will see if i can add that to my patch, but i do not have time right now, so that may still take a while
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 50 guests