Build Templates (Copy&Paste) (r13911 + 0.6.3 + 0.6.2)

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
gkirilov
Chief Executive
Chief Executive
Posts: 696
Joined: 03 May 2005 09:32
Location: Othala

Post by gkirilov »

I think the more complicated the patch is, the harder it will be to include it in the trunk. :?
OTTDCoop NewGRF Pack|Different sets of GRFs for TTDPatch (some of them work in OTTD) - 1|- 2|GRF sets for OTTD|OTTD nightly
Image
I hooked up my accelerator to my brake lights. I hit the gas, people behind me stop, and I'm gone.
Understeer is when you hit the wall with the front of the car. Oversteer is when you hit the wall with the rear of the car. Horsepower is how fast you hit the wall. Torque is how far you take the wall with you. Spoilers and bodykits are how much of the wall you take with you. Rollcages and windownets are how much of a mess you leave on the wall.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

gkirilov wrote:I think the more complicated the patch is, the harder it will be to include it in the trunk. :?
if you look at the code you will recognize it will hardly get into trunk :)
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

hey, i told you it's not finished :P
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

Frostregen wrote:hey, i told you it's not finished :P
then hurry up with coding :D
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Ok, new version out.
But I still did not split up the code into nice pieces.

Maybe next time ;)
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Attached Linux binary + langfiles

Edit: now V8419
Attachments
ottd_cp_8419.tar.bz2
(581.96 KiB) Downloaded 707 times
Last edited by skidd13 on 05 Feb 2007 18:32, edited 9 times in total.
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
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Hi, after rewriting my autocompile & install script, i noticed, that the patch throws some rejects:

Code: Select all

...
Hunk #2 FAILED at 380.
1 out of 2 hunks FAILED -- saving rejects to file unix.c.rej
...
Hunk #2 FAILED at 981.
1 out of 2 hunks FAILED -- saving rejects to file win32.c.rej
And there are some warnings regarding pointer usage. :evil:
But i didn't noticed any bug's. :)

compile rev: 5451
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
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

It's only a small merge problem.
Look at the lines which determine the savegame/template extension.
(.tmpl .sav .scn)

The trunk version modified it, but did not change its functionality, so it is safe to keep the lines from my patch.

I'll update the diff files tonight ;)



Note: Bugs should occur, when you try to load/save a template.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Bug in the patch-file:
The copy_paste.c is missing in the patch file.
(nobody's perfect) :wink:
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
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Thx, forgot to remove the line from the makefile ;)

This file is not needed currently.
(.patch updated)

Currently I'm splitting the code into nice *hopefully* human readable pieces.
User avatar
Salvo_guy
Traffic Manager
Traffic Manager
Posts: 128
Joined: 06 Jul 2006 06:40
Location: Somewhere Down Under

wtf???

Post by Salvo_guy »

okay... call me stupid... but i can't seem to get it working... i'm using the correct rev... i have the 3kb file (in the data folder and extracted) but it doesn't seem to work...
User avatar
Salvo_guy
Traffic Manager
Traffic Manager
Posts: 128
Joined: 06 Jul 2006 06:40
Location: Somewhere Down Under

Post by Salvo_guy »

okay... call me stupid... but i got it working...

but can i use the nightlies still or not???
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

You can use it with the nightlys but you have to compile the source yourself and not putting the file into the data folder.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Here is a guide for usage:

(case you loaded the binary files)
1. Download the normal nightly with the same revision as the actual patch revision and extract or install them. (Of cause you'll need the data-files of TTD)
2. Download the patched binary (first post) and lang files and overwrite the normal nightly files with them.
3. Download the grf-file (first post) and copy it to the data folder of openttd.
4. ready

(case you loaded the source version)
1. Check out the matching revision
2. Patch the sources with the patch-file (first post)
3. Compile it
4. Add the copy_paste grf-file (first post) and the data-files of TTD
5. ready

Thats all.
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
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

It should work with higher revisions too.

I'm trying to keep the .patch up to date with trunk.
User avatar
nicfer
Director
Director
Posts: 529
Joined: 03 May 2005 20:50
Location: Somewhere in a country called Argentina

Post by nicfer »

Frostregen: I have a bug report:

if you copy/paste something and you don't have enough money for all only will be builded a part of the pasted thing instead of sayng not enough cash and don't pop up errors messages (the not enough cash one). I am using MiniIN when it happen so I haven't tested this patch alone.
Sorry for my english I am argentinian
TTO don't crashes in Windows XP; XP crashes TTO

Formerly known as UnderBuilder.

MyMiniCity
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Compare it with the Level-land tool.
It tries to level as much land as possible, when you don't have the money to level the area completely.

This is because you would have to simulate the terrain being raised/lowered, and calculate the costs according to this simulation. (Which is far to complex, for too little gain.)
Just use copy&paste it if you have enough cash. (you could use shift+paste to estimate the costs roughly)
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

just a little bug report:
patch does not work against svn 5731 (i think since 5722 -> 5723)

Code: Select all

Hunk #1 FAILED at 48.
1 out of 2 hunks FAILED -- saving rejects to file functions.h.rej
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
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Post by Frostregen »

Thx for reporting.
Was nothing serious;)

Patchfile updated.
User avatar
skidd13
OpenTTD Developer
OpenTTD Developer
Posts: 522
Joined: 03 Mar 2005 10:49
Location: Germany

Post by skidd13 »

Again a little bug. Non needed entry of copy_paste.c in Makefile.
Nobody's perfect. ;) Linux binary's compiled without the entry.
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
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 8 guests