Patch: AutoRoad Tool (in trunk since r11339)

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

User avatar
Digitalfox
Chief Executive
Chief Executive
Posts: 708
Joined: 28 Oct 2004 04:42
Location: Catch the Fox if you can... Almost 20 years and counting!

Re: Patch: AutoRoad Tool

Post by Digitalfox »

This last days good new features have made into trunk, congratulations to everybody involved and nice work :D
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Re: Patch: AutoRoad Tool

Post by Octopussy »

Fantastic :)

it is in trunk :D :D :D
Commit by rubidium :: r11339 /trunk/ (7 files in 4 dirs):
-Add: autoroad; same as autorail, but for road and trams and only on X and Y direction. Patch by Octopussy and skidd13.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: AutoRoad Tool

Post by Roujin »

first off, congratulations ;) another small thing i always thought of "why don't we actually have this? this would be so nice!"

Vikthor wrote:I see that your patch made it to trunk, so congratulations and thank you to both of you and rubidium. Nevertheless I have small suggestion, would it be possible to indicate, on which part of tile is the road going to be build(like autorail tool shows)?
may i forward this suggestion?
right now it's sometimes still a little dodgy to use, especially for very small bits of road, because you don't see what you're doing until it's too late. (and here CTRL doesn't toggle remove, like it does with rail, so it's more annoying to remove mistakes :P)
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Octopussy »

OK now another problem.. 8)

I have find several errors in road gui code :
There is a double confusion in the file road_gui.cpp about X, Y, NE and NW direction.

In the code we have :
NE for Y direction and NW for X direction

But this is wrong. We should have, like another orientation and the rail_gui.cpp file :
NE for X direction and NW for Y direction

I have made a patch in order to correct this problem and clarify the code.
Attachments
OctopussC-Road_Gui-r11353.patch
(7.23 KiB) Downloaded 79 times
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by skidd13 »

It's not directly a confusion. But you are right it's a inconsisty.
If you change all the stuff, you have to change "DDSP_PLACE_ROAD_NE" and the other regarding inconsistent stuff too. ;) Otherwise the inconsisty will move, but stay.

Aside: IIRC we are dealing with half road bits here too. So naming only one (the upper one from the look at the screen view) bit of the whole (lets say ROAD_NE from ROAD_X) it might be ok as it is. But thats a lazy nitpick comment. ;) Ignore it!
What does that mean - the circumstances? I determine what circumstances prevail. -- Napoleon Bonaparte
---
If we cannot end now our differences, at least we can help make the world safe for diversity. -- John F. Kennedy
---
Our problems are man-made, therefore they may be solved by man. No problem of human destiny is beyond human beings. -- John F. Kennedy
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Roujin »

I really miss a preview function like the autorail has. So i thought maybe it's just a matter of not available sprites and if i make some, maybe a coder will implement it.

So here it is. Hope someone will make something out of it ;)

edit: i have used the sizes from the standard ground tiles, just so you know
Attachments
autoroad.png
autoroad.png (1.76 KiB) Viewed 3070 times
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Leviath.NL »

I couldn't resist to edit it:
autoroad.png
autoroad.png (2.18 KiB) Viewed 3031 times
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Leviath.NL »

I made a grf of the sprites, It probably isn't complete because slopes with foundation need different xrel & yrel. (doesn't it?)
Attachments
autoroad_roujin.grf
(2.41 KiB) Downloaded 67 times
Last edited by Leviath.NL on 30 Oct 2007 21:54, edited 1 time in total.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Roujin »

hi, thanks for coding mine too :lol: your solution is probably better, I'd just remove one of the stripes in the middle of the "dead end"-tiles, since the original road sprites also have just one stripe there. You know what i mean? ;)

I suppose adding your .grf does nothing yet, am i right? One would still need someone to change the source code accordingly, right?
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Leviath.NL »

I looked into the source and as far as I can see, with very limited coding capability, it is not coded yet. The grf only contains real sprites and has no functionality whatsoever. About your suggestion, I indeed planned on doing it but forget, I'll upload a new grf soon.

edit:
added updated grf:
autoroad.png
autoroad.png (2.01 KiB) Viewed 2864 times
edit2:
nfo had a typo, updated all grf's
Attachments
autoroad.grf
(2.6 KiB) Downloaded 75 times
Last edited by Leviath.NL on 30 Oct 2007 22:10, edited 1 time in total.
Roujin
Tycoon
Tycoon
Posts: 1884
Joined: 08 Apr 2007 04:07

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Roujin »

Well i thought about looking at it myself, maybe i could even manage something because i could probably steal a lot from the autorail code. But actually i have to hold a speech about some topic @university tomorrow, i shouldn't really divert my mind from that by doing something complicated ;)

plus my girlfriend is over and she'd probably be mad at me if i spend the night at my computer xD
* @Belugas wonders what is worst... a mom or a wife...
<Lakie> Well, they do the same thing but the code is different.

______________
My patches
check my wiki page (sticky button) for a complete list

ImageImage
ImageImageImageImageImageImageImage
User avatar
Octopussy
Engineer
Engineer
Posts: 122
Joined: 01 May 2006 21:57

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Octopussy »

skidd13 wrote:It's not directly a confusion. But you are right it's a inconsisty.
If you change all the stuff, you have to change "DDSP_PLACE_ROAD_NE" and the other regarding inconsistent stuff too. ;) Otherwise the inconsisty will move, but stay.
I don't think my patch correction is useless.
I have make some pictures in order to show you the problem :

There is a confusion in the gui and another one in the code (not only in the gui)
So it is a double confusion.
Attachments
ROAD Non nommé, 12 Jan 1955.png
ROAD Non nommé, 12 Jan 1955.png (26.93 KiB) Viewed 2570 times
ROADAFTERME Unnamed, 4th Jan 1950.png
ROADAFTERME Unnamed, 4th Jan 1950.png (16.46 KiB) Viewed 2567 times
RAIL Non nommé, 16 Jan 1955-2.png
RAIL Non nommé, 16 Jan 1955-2.png (29.83 KiB) Viewed 2560 times
User avatar
Detal
Engineer
Engineer
Posts: 12
Joined: 16 May 2008 13:06

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by Detal »

Octopussy wrote:Autoroad tool for road and tramsroad construction, like the autorail one.

You can build road in each direction you want (x and y)

Based on SVN 11307


8) 8)

Hey dude,
how do you integrate this tool?
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Patch: AutoRoad Tool (in trunk since r11339)

Post by planetmaker »

The title says "in trunk since r11339". It's already there by default.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 44 guests