Tile measurement tool [v.8]

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
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl » 02 Jul 2006 15:35

Strange then, i compiled a clean SVN r5477 from /trunk/ and without your patch it does compile ( rebuilt solution in MSVS2005 ). With your patch it gives the warnings in my previous post.
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)

MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH » 02 Jul 2006 18:13

Try this one. Guys told me on IRC that StringID wasn't defined (for some files strings.h was called before openttd.h, which was bad)
Attachments
measurement_6.patch
(17.74 KiB) Downloaded 303 times

User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl » 02 Jul 2006 21:09

Compiles perfectly! Thanks!

Have fun on your holiday ;)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)

MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH » 02 Jul 2006 21:29

Thank you so much :) Bye!

User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl » 11 Aug 2006 17:30

Darn. The patch doesn't work anymore after this revision-changeset: http://svn.openttd.org/cgi-bin/trac.cgi/changeset/5806

Here Tron deletes the function FindLandscapeHeight() which is used about 7 times in measurement_6.patch. Maybe you could update your patch? That would be great.
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)

MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH » 12 Aug 2006 20:16

Allright, I'll take a look at this and fix it.

MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH » 15 Aug 2006 11:36

I'm trying to finalize this patch.
Thanks to Tron, who helped me optimizing the code. Also he helped me realize I used FindLandscapeHeight bad way, or rather I didn't even had to use it.

There are two things, however, that aren't as good as I wanted:

2x1 autorail:
what's wrong:
Dragging in a "diagonal" direction shows length = 2 instead of 1
why it isn't that bad:
It is very rare (or it doesn't happen, ever) to measure length on such a small distance

Level land tool:
what's wrong:
I couldn't do what one user suggested; the measurement isn't reduced by 1 in width and height
why I couldn't do it:
The function I'm measuring in doesn't contain selection method data, but I'll work on it


Please voice your comments, also about the code style. Thank you in advance
Attachments
measurement_8.patch
(15.23 KiB) Downloaded 336 times

MeusH
Tycoon
Tycoon
Posts: 4349
Joined: 25 Oct 2004 15:39
Location: Mississauga

Post by MeusH » 12 Oct 2006 20:19

r6758 is our happy revision.
Thanks to great help of Darkvater and other developers, and of course your tips and ideas, the patch is ready :wink:

User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl » 12 Oct 2006 20:29

MeusH wrote:r6758 is our happy revision.
Thanks to great help of Darkvater and other developers, and of course your tips and ideas, the patch is ready :wink:
Finally 8)

My idea, and your programming (meush). Great! 8) 8) 8)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)

User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater » 12 Oct 2006 21:37

/me sneaks in

/me looks around

I'll just close this thread then...

/me runs away
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."

Locked

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 3 guests