[patch] Clipboard (a/k/a "Copy and Paste")

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
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Starbud »

Even tho the last previous posts are right about their comments you still did have a good intention from what i can tell.
That is apreciated :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
User avatar
ChillCore
Tycoon
Tycoon
Posts: 2822
Joined: 04 Oct 2008 23:05
Location: Lost in spaces

Re: Clipboard (a/k/a "Copy and Paste")

Post by ChillCore »

Starbud wrote: you still did have a good intention from what i can tell.
That is apreciated :)
I never said the effort is not appreciated nor that the intentions of dbncoold were wrong, I agree completely with what you are saying. ;)

I admit I have posted my share of incorrect binaries myself until I was made aware that I was doing it the wrong way.
I just mentioned the correct way to create a (legally) distributable binary and wondered why the previous downloaders did not report ... excuse me if I sounded too harsh, not my intention at all, but written language often comes across differently than intended.

Anyway, I will leave it at that as I think that discussing it further will just derail the topic.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.

Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Starbud »

I didnt think it was the wrong way, i just noticed that noone had written anything positive about it so i pointed out the positive :)
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
Eddi
Tycoon
Tycoon
Posts: 8271
Joined: 17 Jan 2007 00:14

Re: Clipboard (a/k/a "Copy and Paste")

Post by Eddi »

Starbud wrote:i just noticed that noone had written anything positive about it
"not being yelled at is praise enough" :p
Starbud
Traffic Manager
Traffic Manager
Posts: 211
Joined: 05 Mar 2007 00:48
Location: Sweden
Contact:

Re: Clipboard (a/k/a "Copy and Paste")

Post by Starbud »

No, i dont agree.
http://openttd.org - i love building stuff :)
Someones play with pics http://dimalimsliv.blogg.se
dbncoold
Engineer
Engineer
Posts: 11
Joined: 22 Aug 2009 22:04

Re: Clipboard (a/k/a "Copy and Paste")

Post by dbncoold »

@Starbud, thank you... @Chillcore, not so much :lol:

If I get time I will clean it up, but I would really much rather see this in trunk and not have to rebuild /rework the patch with every new OpenTTD release. I have done this so much that I really got sick of it. It is not as easy to patch and build for Windows as it is for Linux where most software is built from code.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

The patch is under development. I'm working now on a harder part of it. It's not trunk ready, it hasn't been released yet.

Release gets delayed because of a lack of feedback. Actually only Starbud gave me any technical info (thanks again!).

In case of crashes, most valuable for me are savegames made BEFORE running "copy" command. I need a savegame and description about what to copy and where to paste to cause a crash. That's because usually when the game crashes important data is already lost.

Until the patch is stable and well tested we can't even think of including it into trunk.

I will upload win32 binaries soon.
:] don't worry, be happy and checkout my patches
ThaPear
Engineer
Engineer
Posts: 1
Joined: 05 Nov 2011 04:59

Re: Clipboard (a/k/a "Copy and Paste")

Post by ThaPear »

adf88 wrote:I will upload win32 binaries soon.
Looking forward to this so I can try it out. :)
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: Clipboard (a/k/a "Copy and Paste")

Post by adf88 »

Ok, beta 3 is ready. Win32 binaries available. Download link is here http://www.tt-forums.net/viewtopic.php?p=824651#p824651.
:] don't worry, be happy and checkout my patches
User avatar
smile64
Engineer
Engineer
Posts: 36
Joined: 23 Jun 2007 12:55

Re: Clipboard (a/k/a "Copy and Paste")

Post by smile64 »

Thanks for your work. I downloaded the Windows binary, and it works well. However, when I tried to compile the patch myself, I got a lot of error messages. I downloaded and patched r23178 with TortoiseSVN, then I tried to compile it with MSVS 2008. It compiled everything fine, but then:

Code: Select all

Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation.  All rights reserved.
Linking...
   Creating library ..\objs\Win32\Release\\openttd.lib and object ..\objs\Win32\Release\\openttd.exp
command.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall CmdCopyPaste(struct TileIndexT,enum DoCommandFlag,unsigned int,unsigned int,char const *)" (?CmdCopyPaste@@YI?AVCommandCost@@U?$TileIndexT@UMainMap@@@@W4DoCommandFlag@@IIPBD@Z)
hotkeys.obj : error LNK2001: unresolved external symbol "enum EventState __fastcall ClipboardGlobalHotkeys(unsigned short,unsigned short)" (?ClipboardGlobalHotkeys@@YI?AW4EventState@@GG@Z)
openttd.obj : error LNK2001: unresolved external symbol "public: static void __fastcall Clipboard::MakeEmpty(void)" (?MakeEmpty@Clipboard@@SIXXZ)
rail.obj : error LNK2001: unresolved external symbol "public: static unsigned int Clipboard::size" (?size@Clipboard@@2IA)
rail.obj : error LNK2001: unresolved external symbol "public: static struct Tile * Clipboard::m" (?m@Clipboard@@2PAUTile@@A)
tile_map.obj : error LNK2001: unresolved external symbol "public: static unsigned int Clipboard::size_x" (?size_x@Clipboard@@2IA)
tile_map.obj : error LNK2001: unresolved external symbol "public: static unsigned int Clipboard::log_x" (?log_x@Clipboard@@2IA)
tile_map.obj : error LNK2001: unresolved external symbol "public: static unsigned int Clipboard::size_y" (?size_y@Clipboard@@2IA)
viewport.obj : error LNK2001: unresolved external symbol "struct TilePastePreviewInfo __fastcall GetTilePastePreviewInfo(struct TileIndexT)" (?GetTilePastePreviewInfo@@YI?AUTilePastePreviewInfo@@U?$TileIndexT@UMainMap@@@@@Z)
terraform_gui.obj : error LNK2001: unresolved external symbol "struct Window * __fastcall ShowClipboardToolbar(void)" (?ShowClipboardToolbar@@YIPAUWindow@@XZ)
rail_cmd.obj : error LNK2001: unresolved external symbol "public: static unsigned int Clipboard::content_width" (?content_width@Clipboard@@2IA)
rail_cmd.obj : error LNK2001: unresolved external symbol "class CommandCost __fastcall DoPasteCommand(struct TileIndexT,unsigned int,unsigned int,enum DoCommandFlag,unsigned int)" (?DoPasteCommand@@YI?AVCommandCost@@U?$TileIndexT@UMainMap@@@@IIW4DoCommandFlag@@I@Z)
rail_cmd.obj : error LNK2001: unresolved external symbol "enum CopyPasteMode _current_cmd_copy_paste_mode" (?_current_cmd_copy_paste_mode@@3W4CopyPasteMode@@A)
rail_cmd.obj : error LNK2001: unresolved external symbol "public: static struct TileExtended * Clipboard::me" (?me@Clipboard@@2PAUTileExtended@@A)
rail_cmd.obj : error LNK2001: unresolved external symbol "void __fastcall CollectPasteCost(class CommandCost const &,enum DoCommandFlag,struct TileIndexT,unsigned short)" (?CollectPasteCost@@YIXABVCommandCost@@W4DoCommandFlag@@U?$TileIndexT@UMainMap@@@@G@Z)
rail_cmd.obj : error LNK2001: unresolved external symbol "void __fastcall CollectPasteError(struct TileIndexT,unsigned short,unsigned short)" (?CollectPasteError@@YIXU?$TileIndexT@UMainMap@@@@GG@Z)
rail_cmd.obj : error LNK2001: unresolved external symbol "bool __fastcall IsPasteInterrupted(void)" (?IsPasteInterrupted@@YI_NXZ)
rail_cmd.obj : error LNK2001: unresolved external symbol "public: static unsigned int Clipboard::content_height" (?content_height@Clipboard@@2IA)
terraform_cmd.obj : error LNK2001: unresolved external symbol "class OverflowSafeInt<__int64,9223372036854775807,-9223372036854775808> __fastcall GetAvailableMoneyForPasteCommand(void)" (?GetAvailableMoneyForPasteCommand@@YI?AV?$OverflowSafeInt@_J$0HPPPPPPPPPPPPPPP@$0?IAAAAAAAAAAAAAAA@@@XZ)
terraform_cmd.obj : error LNK2001: unresolved external symbol "int _current_cmd_copy_paste_height_delta" (?_current_cmd_copy_paste_height_delta@@3HA)
tunnelbridge_cmd.obj : error LNK2001: unresolved external symbol "unsigned short _paste_cmd_err_message" (?_paste_cmd_err_message@@3GA)
tunnelbridge_cmd.obj : error LNK2001: unresolved external symbol "struct TileIndexT _paste_cmd_err_tile" (?_paste_cmd_err_tile@@3U?$TileIndexT@UMainMap@@@@A)
..\objs\Win32\Release\\openttd.exe : fatal error LNK1120: 22 unresolved externals
It's not the first time I compiled OpenTTD, and I haven't changed anything in the configuration since the last time. What have I missed then?
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Clipboard (a/k/a "Copy and Paste")

Post by Yexo »

It looks like the patch misses some files (something like copypaste.cpp / copypaste.h maybe?).
User avatar
smile64
Engineer
Engineer
Posts: 36
Joined: 23 Jun 2007 12:55

Re: Clipboard (a/k/a "Copy and Paste")

Post by smile64 »

Well, I just told TortoiseSVN to apply the patch, and I thought every necessary files will be there. :)
Copypaste.cpp and copypaste.h are are not in the patch, copypaste_cmd.cpp and copypaste.h are both there in the src directory, where they should be.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: Clipboard (a/k/a "Copy and Paste")

Post by Yexo »

Perhaps they're missing from the msvc project file. Try running generate.vbs from the projects directory.
User avatar
smile64
Engineer
Engineer
Posts: 36
Joined: 23 Jun 2007 12:55

Re: Clipboard (a/k/a "Copy and Paste")

Post by smile64 »

That was the problem. Everything's fine now. Thank you!
unitedhate
Engineer
Engineer
Posts: 2
Joined: 08 May 2010 09:29

Re: Clipboard (a/k/a "Copy and Paste")

Post by unitedhate »

Hi,
thank you for your work. This is a very nice feature for openttd and I think it is the most important enhancement for the game. I've just checked out the revision 23178 and patched it with the diff file. It works fine. In previous version (other copy & paste threads) was a feature to save and load templates. Is it still possible? Maybe I haven't seen it. Is there any progress to make it compatible with the newest trunk version (24087 - 1.2.0)? I've tried it, but it does not compile...
Regards,
Uni
handrake
Engineer
Engineer
Posts: 55
Joined: 26 Mar 2012 10:23

Re: Clipboard (a/k/a "Copy and Paste")

Post by handrake »

unitedhate wrote:Hi,
thank you for your work. This is a very nice feature for openttd and I think it is the most important enhancement for the game. I've just checked out the revision 23178 and patched it with the diff file. It works fine. In previous version (other copy & paste threads) was a feature to save and load templates. Is it still possible? Maybe I haven't seen it. Is there any progress to make it compatible with the newest trunk version (24087 - 1.2.0)? I've tried it, but it does not compile...
Regards,
Uni
I'm not 100% sure, but I do remember remotely somebody mentioning that template save files will be incompatible from version to version by its fundamental design.
schorfi
Engineer
Engineer
Posts: 2
Joined: 16 Jun 2012 10:07

Re: Clipboard (a/k/a "Copy and Paste")

Post by schorfi »

Hey,
thank you for the development of openttd ;)
I like it...

and thanks to the developers of the copy&paste and/or clipboard patches

it is an essential tool for the game play in the middle and end of the game when playing on huge maps as I do (max size)
as it alleviates the construction of stereotypical architectures like complex tracklayouts, like 10 tracks lanes with repetitive intersections, signals, depots n stuff
I dont know how ppl expect me to play that game after i grew up my company, but doing that by hand, even with all the shortcuts, takes ages to make reasonable progress (i am not able to spend all my money anymore), even more it becomes a repetitive clicking which is boring, if i want to have such a game-play, I would play Diablo III instead :P
I wonder why such a tool didnt make it yet to the main tree yet, I would like to see it in single player but also in multiplayer...

However, I couldnt make the clipboard patch work for the latest openttd, hope you can release a version which can do that
I like the new release as it makes the game a little bit harder...

thank you all ;)

best wishes
schorfi
Frostregen
Transport Coordinator
Transport Coordinator
Posts: 340
Joined: 06 Feb 2006 23:58

Re: Clipboard (a/k/a "Copy and Paste")

Post by Frostregen »

I wonder why such a tool didnt make it yet to the main tree yet, I would like to see it in single player but also in multiplayer...
Because it will be extremely hard to maintain afterwards.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Clipboard (a/k/a "Copy and Paste")

Post by Alberth »

Nope, it is because nobody created a version of sufficient quality yet.
lordwurst
Engineer
Engineer
Posts: 10
Joined: 30 Oct 2008 08:00

Re: Clipboard (a/k/a "Copy and Paste")

Post by lordwurst »

hey is this project still on???

It would be nice if somebody could upload a compiled 1.2.3 version with the copy paste patch included.

Thanks a lot!!!
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 12 guests