Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Fri Dec 15, 2017 7:48 pm

All times are UTC




Post new topic  Reply to topic  [ 12 posts ] 
Author Message
 Post subject: DOS Graphics
PostPosted: Mon Nov 08, 2004 8:13 am 
Offline
Engineer
Engineer

Joined: Mon Nov 08, 2004 8:08 am
Posts: 4
Location: Australia
Is there a particular reason why OpenTTD uses only the Windows version of the GRF files? From running the game it appears to be a palette difference, but as we know apparences can be deceptive.

If the reason it doesn't work is either A) No-one has done it yet, or B) None of the dev's have the DOS version, then I'm looking to take it on. I really love the original TTD and would love to play a version with all the features I'd wished it had.


Top
   
 Post subject:
PostPosted: Mon Nov 08, 2004 8:29 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Jan 20, 2003 2:51 pm
Posts: 3849
Location: Broadstone, Dorset
There's always TTDPatch.
That adds lots of features to both Win and Dos versions.


Or, you could download the Win version from the link in my sig

_________________
ImageDownloadsImageWikiImageLinks
Image Image Image Image Image


Top
   
 Post subject: Re: DOS Graphics
PostPosted: Mon Nov 08, 2004 2:04 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 24, 2003 6:45 pm
Posts: 3053
Location: Hong Kong
Wizarth wrote:
Is there a particular reason why OpenTTD uses only the Windows version of the GRF files? From running the game it appears to be a palette difference, but as we know apparences can be deceptive.

If the reason it doesn't work is either A) No-one has done it yet, or B) None of the dev's have the DOS version, then I'm looking to take it on. I really love the original TTD and would love to play a version with all the features I'd wished it had.


A) There have been two attempts that I know of. One from Pasky and the other from Tron. If I remember correctly there were some problems with the palette animations, and thus it didn't work perfectly.

You can of course give it a try. Best thing to do though is to use grfcodec to convert the DOS graphics to WIN graphics, or obtain the windows version of ttdlx.

_________________
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."


Top
   
 Post subject:
PostPosted: Mon Nov 08, 2004 10:59 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 24, 2003 6:45 pm
Posts: 3053
Location: Hong Kong
I have had a look around for the DOS graphics. The best thing to would be to use a modified grfcodec ( http://www.ttdpatch.net/grfcodec/ ) to convert the DOS files to WINDOWS files. Most of the functionality is already present there. Decode the files with "grfcodec -d <file>", then encode them (and converting to windows) with "grfcodec -e -m0 <file>". The file is not yet fully working because grfcodec doesn't convert the company palettes. Thus:
  • TRG1.GRF: fails!
  • TRGC.GRF: works
  • TRGH.GRF: works
  • TRGI.GRF: works
  • TRGT.GRF: fails! (toyland crap).


You can check if it works by renaming the newly encoded file to its ...R.GRF equivalent and use that as the graphic file for running ottd. If it doesn't crash or produce weird colours, it works. If you are working on *nix, you can try these patches, which make it compatible for *nix: http://pasky.or.cz/~pasky/dev/openttd/grfcodec+unix2.patch Good luck!

_________________
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."


Top
   
 Post subject:
PostPosted: Tue Nov 09, 2004 12:53 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Jan 09, 2003 8:37 am
Posts: 13748
Location: London, UK
I will give more info ....
you should decode WIN files like that:

decode it this way:
grfcodec.exe -p 2 -d win_version_of_a_file.grf

encode it this way:
grfcodec.exe -p 1 -e dos_version_of_a_file.grf

more info: grfcodec -p ?

_________________
what are you looking at? it's a signature!


Top
   
 Post subject:
PostPosted: Thu Nov 11, 2004 12:21 pm 
Offline
Engineer
Engineer

Joined: Mon Nov 08, 2004 8:08 am
Posts: 4
Location: Australia
Thanks for the advice guys. I played with TTDPatch, but since I'm having to emulate DOS (I'm using Linux or WinXP) ttdpatch tends to crash a little too much. OpenTTD runs native to Linux, so I'm happier with that.

With grfcodec, I got it to compile (your patch file was missing a few things, want the diff's?) and it appears to sucessfully convert most of the files, except TRGI(R).GRF. Running this through the converter caused OpenTTD to crash.. Unfortauntely, my GUI text is all the same color as whatever its on (or all the text is transparent? Except for the Euro sign).

So if no-one objects I think I'll look into grfcodec and see if I can't improve it some.


Top
   
 Post subject:
PostPosted: Thu Nov 11, 2004 12:43 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 24, 2003 6:45 pm
Posts: 3053
Location: Hong Kong
Wizarth wrote:
So if no-one objects I think I'll look into grfcodec and see if I can't improve it some.


Yes, grfcodec screws up cause it was not meant for all the special stuff that's in trgr1.grf. You have to somehow fix the colour of the letters, since they are all transparent now.

_________________
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."


Top
   
 Post subject:
PostPosted: Thu Nov 11, 2004 3:51 pm 
Offline
TTDPatch Developer
TTDPatch Developer
User avatar

Joined: Tue Apr 13, 2004 1:35 pm
Posts: 417
Location: Eindhoven, Netherlands
Wizarth wrote:
Thanks for the advice guys. I played with TTDPatch, but since I'm having to emulate DOS (I'm using Linux or WinXP) ttdpatch tends to crash a little too much. OpenTTD runs native to Linux, so I'm happier with that.
With WinXP you can just run ttdpatch natively if you enable support for win2k (and use the windows version of ttd)...


Top
   
 Post subject:
PostPosted: Thu Nov 11, 2004 10:27 pm 
Offline
Engineer
Engineer

Joined: Mon Nov 08, 2004 8:08 am
Posts: 4
Location: Australia
Thanks Mek, but the whole basis of this thread is that I have the DOS version, and not the Windows version.

Is there a CVS/etc for grfcodec, where I can submit patches etc?


Top
   
 Post subject:
PostPosted: Thu Nov 11, 2004 11:15 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Mon Feb 24, 2003 6:45 pm
Posts: 3053
Location: Hong Kong
No, grfcodec was made for ttdpatch. So any changes you make are your own changes :). If it works perfectly it will probably be included in ottd as a seperate executable so that dos people can convert their graphics to windows format.

_________________
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."


Top
   
 Post subject:
PostPosted: Sat Nov 13, 2004 12:23 am 
Offline
Transport Coordinator
Transport Coordinator

Joined: Wed Nov 20, 2002 4:20 pm
Posts: 268
Location: Dresden, Germany
@Darkvater
What does the grfcodec patch change (besides \ vs. / issues and makefiles) ?
I doubt it is a good idea to have different versions floating around,
at least not at the moment.
Are your changes to the nfo format documented, or only in the patch?
(I refer to info.cc "inforeader" with "quoted byte"
and writing nfo version 5)
I fear the moment patchman uses version 5 in an incompatible way

Having a completely new grf format for OTTD in the future
a completely independent tool will of course be necessary.

When I have time I plan to take a look at reintegrating grfcodec.


Top
   
 Post subject:
PostPosted: Sat Nov 13, 2004 1:16 am 
Offline
Engineer
Engineer

Joined: Mon Nov 08, 2004 8:08 am
Posts: 4
Location: Australia
Well, I got it so that it works, it still needs work (at the moment it's a special build just for TRG1.GRF, needs to be an option). And I've changed the palette OpenTTD is using slightly (the first 15 or so colors from hot-pink to the DOS greyscale). The changed palette was to make the windows (option etc) and toolbar show up right, I couldn't find their graphics to convert/re-map them.

My alterations after the patch fixed an error with an anonymous union containing struct's (gcc didn't like that) and with a missing lib in the Makefile (stdc++). I didn't examine what the patch I was given did though, only enough to realise I had to change the line endings before it would apply.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2017 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2017.
Hosted by Zernebok Hosting.