Copy & Paste patch, reworked

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
User avatar
kyosuke1989
Transport Coordinator
Transport Coordinator
Posts: 273
Joined: 24 Mar 2008 13:04
Location: Finland

Re: Copy & Paste patch, reworked

Post by kyosuke1989 »

maartena wrote:I have been using the 0.7.0 binary (thanks for that) and played several online games over the weekend without any issues or desyncs. Of course I have a 100 Mbps link to my servers, and a 15/2 Mbps pipe to the internet, so that may make a difference. But from what I have been able to test, it looks pretty stable.
I haven't had any crashes at all, previous version 0.7.0 b1 had one crash when using template, but good now.
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Copy & Paste patch, reworked

Post by 2007Alain2007 »

Copy and pasted dose not work i tracked down why it dose not any more after

(svn r16088) -Codechange: merge HighLightStyle and ViewportHighlightMode as they are basically the same thing

All the VHM_ codes have changed to HT_

But i cant think what

To change

In src/tilehighlight_type.h

VHM_PREVIEW = 6, ///< CopyPaste Preview


The only other part of the patch that i think might be a proble is

+ case VHM_PREVIEW:
+ _thd.new_drawstyle = HT_PREVIEW;
+ break;

and also were ever VHM_ has been used in the hole patch do i just change it to HT_

any help would be great and thank you
For Community Integrated Version http://code.google.com/p/civopenttd/
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Copy & Paste patch, reworked

Post by Eddi »

well, you should instead introduce a HT_PREVIEW at the appropriate definition of the other HT_stuff
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Copy & Paste patch, reworked

Post by 2007Alain2007 »

Hi i try my best here but failed can some one tell me were i gone wrong

patch file
CopyPaste_not to be used trying to update.patch
build with the error in
dont use copy and pasted bug trying to update.7z
this is the bug that i am seeing
bug.png
I am realy rubish at this updateing

but as you see i do have a go at it :)
For Community Integrated Version http://code.google.com/p/civopenttd/
yorick
Engineer
Engineer
Posts: 80
Joined: 23 Mar 2008 08:53

Re: Copy & Paste patch, reworked

Post by yorick »

2007Alain2007 wrote:Hi i try my best here but failed can some one tell me were i gone wrong

patch file
CopyPaste_not to be used trying to update.patch
build with the error in
dont use copy and pasted bug trying to update.7z
this is the bug that i am seeing
bug.png
I am realy rubish at this updateing

but as you see i do have a go at it :)
You know I updated the hg repo last week? :p
and the bug: you forgot to update the widgets, it seems. ;)
2007Alain2007
Chief Executive
Chief Executive
Posts: 658
Joined: 11 Nov 2007 12:06
Contact:

Re: Copy & Paste patch, reworked

Post by 2007Alain2007 »

hi i updated as it showed in hg repo and still did not work the gui buton is not showing
For Community Integrated Version http://code.google.com/p/civopenttd/
User avatar
nex259
Engineer
Engineer
Posts: 11
Joined: 13 Mar 2009 13:52

Re: Copy & Paste patch, reworked

Post by nex259 »

Update: patch for SVN trunk r16393 to r16427;

*patch for German lang is removed. (because some glyphs of German are corrupt on texteditors which I am using.)
**Paste preview : only show highlighted grids. (rail preview(pieces of autorail preview parts? )are not shown )
need to change here?

Code: Select all

	image = SPR_AUTORAIL_BASE;
	TrackBits tracktodraw = _copy_paste.GetCPTrackBits(bindex);
	for (Track t = TRACK_BEGIN; t < TRACK_END; t++) {
		if (tracktodraw & TrackToTrackBits(t)) DrawPreviewSprite(image + _AutorailTilehSprite[SLOPE_FLAT][t], PAL_NONE, ti->x, ti->y, ti->z);
	}
    
Attachments
copypaste-11735-r16427.diff
Use -p1:
(127.23 KiB) Downloaded 214 times
Last edited by nex259 on 29 May 2009 09:40, edited 15 times in total.
---
Sorry my bad English...
nex259
---
Kasc
Engineer
Engineer
Posts: 24
Joined: 04 Jun 2006 13:52
Location: England, Leeds.
Contact:

Re: Copy & Paste patch, reworked

Post by Kasc »

I'm trying to get this working for 0.7.0, I followed the very limited instructions a few pages ago but Build OpenTTD doesn't know what a .diff file is :S

Can anyone give some instructions on how to do it please :?

EDIT: Read some of the stickies on the main page and are going to try some of those things.
EDIT2: Tried those things and I still don't understand how I would use this to patch 0.7.0 so back to square one. Can anyone help me please? :P
Transport Tycoon is such a classic, I'll always love it! :D
User avatar
nex259
Engineer
Engineer
Posts: 11
Joined: 13 Mar 2009 13:52

Re: Copy & Paste patch, reworked

Post by nex259 »

Kasc wrote:I'm trying to get this working for 0.7.0, I followed the very limited instructions a few pages ago but Build OpenTTD doesn't know what a .diff file is :S

Can anyone give some instructions on how to do it please :?

EDIT: Read some of the stickies on the main page and are going to try some of those things.
EDIT2: Tried those things and I still don't understand how I would use this to patch 0.7.0 so back to square one. Can anyone help me please? :P
1)”Build OpenTTD" means BuildOTTD?
BuildOTTD executes patcher with option "-p0"(=patch -p0 <[file]),but mostly ".diff"s and ".patch"s which are uploaded to forum require to execute patcher with option "-p1"(=patch -p1 <[file]).

then you must modify the file using texteditor or awk,perl, and etc.:
before:
"--- ***/foo" (mostly "***" = "a")
"+++ "***/foo" (mostly "***" = "b")

->remove "***/"

after:
"--- foo"
"+++ foo"
Last edited by nex259 on 29 May 2009 11:42, edited 3 times in total.
---
Sorry my bad English...
nex259
---
Kasc
Engineer
Engineer
Posts: 24
Joined: 04 Jun 2006 13:52
Location: England, Leeds.
Contact:

Re: Copy & Paste patch, reworked

Post by Kasc »

Yep I meant BuildOTTD, sorry.

And I didn't understand anything you said tbh :S
Transport Tycoon is such a classic, I'll always love it! :D
User avatar
ever
Traffic Manager
Traffic Manager
Posts: 164
Joined: 26 Apr 2009 11:45

Re: Copy & Paste patch, reworked

Post by ever »

long story short buildottd doesn't work yet
Kasc
Engineer
Engineer
Posts: 24
Joined: 04 Jun 2006 13:52
Location: England, Leeds.
Contact:

Re: Copy & Paste patch, reworked

Post by Kasc »

So that means there's no way to do what I'm trying to acheive? I'm sure someone knows.
Transport Tycoon is such a classic, I'll always love it! :D
Eddi
Tycoon
Tycoon
Posts: 8289
Joined: 17 Jan 2007 00:14

Re: Copy & Paste patch, reworked

Post by Eddi »

you can use the mingw installation that buildottd installed. put the mingw\bin and msys\bin directories in the PATH variable, then open a command line in the openttd directory and execute the command "patch -p1 -i your_desired_patch.diff", and if that succeded, type "make"
Kasc
Engineer
Engineer
Posts: 24
Joined: 04 Jun 2006 13:52
Location: England, Leeds.
Contact:

Re: Copy & Paste patch, reworked

Post by Kasc »

So what needs to be in this folder? Surely OpenTTD 0.7.0 ? I have since uninstalled BuildOTTD because someone up there ^ said it didn't work D: ..

Also why is it such a problem that someone won't just make the 0.7.0 version?
Transport Tycoon is such a classic, I'll always love it! :D
dihedral
Tycoon
Tycoon
Posts: 1053
Joined: 14 Feb 2007 17:48

Re: Copy & Paste patch, reworked

Post by dihedral »

it's outdataed! if you want to update the patch, feel free!
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Copy & Paste patch, reworked

Post by planetmaker »

Kasc wrote:So what needs to be in this folder? Surely OpenTTD 0.7.0 ? I have since uninstalled BuildOTTD because someone up there ^ said it didn't work D: ..

Also why is it such a problem that someone won't just make the 0.7.0 version?
*Someone* has better things to do than updating patches for *someone else*. Just a guess though.
Kasc
Engineer
Engineer
Posts: 24
Joined: 04 Jun 2006 13:52
Location: England, Leeds.
Contact:

Re: Copy & Paste patch, reworked

Post by Kasc »

People have been saying the 0.7.0 RC1 works for 0.7.0, is this even true?

The stickies on the main page don't really teach a newbie such as myself how to patch.
Transport Tycoon is such a classic, I'll always love it! :D
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Copy & Paste patch, reworked

Post by DaleStan »

Execute step 1. When step 1 is complete, execute step 2. When step 2 is complete, execute step 3.

Lather, rinse, repeat.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
Kasc
Engineer
Engineer
Posts: 24
Joined: 04 Jun 2006 13:52
Location: England, Leeds.
Contact:

Re: Copy & Paste patch, reworked

Post by Kasc »

Wow seriously, I ask a perfectly acceptable question and all I get is sarcasm and cryptic hints >_>

Ok maybe you've answered these sorts of questions 12 million times before, but that's not my fault is it?
Transport Tycoon is such a classic, I'll always love it! :D
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Re: Copy & Paste patch, reworked

Post by Rubidium »

Kasc wrote:Wow seriously, I ask a perfectly acceptable question and all I get is sarcasm and cryptic hints
The stickies have helped many people with patching and compiling OpenTTD, so somehow I cannot believe that it is totally incomprehensible.

Patching is kind of like learning another language. For example you don't know English and you go on holiday to England. A simple 'travel dictionary' might do the job in some places, but if you want to properly learn how to patch you need to study. Some people can learn English from a book and a few tapes, but most people need some kind of tutor. The same would hold for learning how to patch.

What you are asking for is that we 'must' tutor everyone because they cannot grasp the concepts from the 'books'. That's like asking strangers to teach them English. What we say is one of: take a look at book X (look at webpage X), hire a translator (hire someone to assemble and compile the patches you want) or don't go on holiday to England but go to a place where you speak the language (just use the binaries that are provided).
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 9 guests