Grf2Html [0.5.2 released - 2010-05-02]

Discussions about the technical aspects of graphics development, including NewGRF tools and utilities.

Moderator: Graphics Moderators

DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New Tool: Grf2Html

Post by DaleStan »

belugas wrote:One way to make it less confusing is to prefix the commit log with the name of the project.
Or you could just svn log only the interesting folder. When I want to see the changes to Patch's trunk, I cd into my ttdpatch checkout and $ svn log. And it automagically shows me only the changes that were applied to trunk. If I want NFORenum, I svn log from that folder, and I magically! get the NFORenum commits.

What a concept! :roll:
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
User avatar
belugas
OpenTTD Developer
OpenTTD Developer
Posts: 1507
Joined: 05 Apr 2005 01:48
Location: Deep down the deepest blue
Contact:

Re: New Tool: Grf2Html

Post by belugas »

that too :)
It's just a matter of agreement
If you are not ready to work a bit for your ideas, it means they don't count much for you.
OpenTTD and Realism? Well... Here are a few thoughs on the matter.
He he he he
------------------------------------------------------------
Music from the Bloody Time Zones
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: New Tool: Grf2Html

Post by AndersI »

Well, my point was that when I did an SVN Update on GrfMaker I got the message about a new revision number, but not a single log line. Now that I know how it works, it's no problem, but it's still a bit irritating...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New Tool: Grf2Html

Post by DaleStan »

Both svn and Tortoise SVN report "At revision: $REVISION", even if no changes were made, and even if the specified revision is the same as the previously-current revision.
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
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: New Tool: Grf2Html

Post by AndersI »

OK, fine, I understand all that. No need to clarify further.

My point, though, was that it showed a new revision number for GrfMaker (116), while the log only showed info up to 113. That was a bit confusing at the time, as I then didn't know that the revision number was shared through the whole repository. Now I do, and there is no problem.
User avatar
George
Tycoon
Tycoon
Posts: 4363
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: New Tool: Grf2Html

Post by George »

Wrong behavior:
in action 2 for houses and industry tiles block offset 80h-ffh is negative. The are positive for grf2html
Image Image Image Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: New Tool: Grf2Html

Post by frosch »

Thanks George, fixed in r128.

But I guess it will take another week before the next release.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5602
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: New Tool: Grf2Html

Post by PikkaBird »

I came, I saw, I gave it a go. It said "invalid grf file" for the latest pb_nars.
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: New Tool: Grf2Html

Post by frosch »

@PikkaBird:
Sorry, I could only find pb_nars from 5th of April 2006, and it works flawless.
So I can only guess: You have to apply grf2html on the encoded pb_nars.grf, not the nfo.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
michael blunck
Tycoon
Tycoon
Posts: 5948
Joined: 27 Apr 2005 07:09
Contact:

Re: New Tool: Grf2Html

Post by michael blunck »

Well, I tried a small .grf:
GRF2HTML verursachte einen Fehler durch eine ungültige Seite
in Modul <Unbekannt> bei 0000:00000000.
Register:
EAX=00000000 CS=0000 EIP=00000000 EFLGS=00000000
EBX=00000000 SS=0000 ESP=00000000 EBP=00000000
ECX=00000000 DS=0000 ESI=00000000 FS=0000
EDX=00000000 ES=0000 EDI=00000000 GS=0000
Bytes bei CS:EIP:

Stapelwerte:
regards
Michael
Attachments
grf2html.png
grf2html.png (11.01 KiB) Viewed 4092 times
Image
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: New Tool: Grf2Html

Post by frosch »

Yawn - finally I can reproduce that error.
It does not happen on XP nor linux/wine, but on win98 with every grf that contains an image. (I do not have other versions of windows).
As it is some problem in the pngdelphi library I do not yet know a solution to fix it (except to switch to free pascal and use libpng).

As a work-around you can run grf2html with the '--nodata' option. That will skip the data files (images, bounding-box previews and binary included files), but the rest will be ok.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
frosch
OpenTTD Developer
OpenTTD Developer
Posts: 988
Joined: 20 Dec 2006 13:31
Location: Aschaffenburg

Re: New Tool: Grf2Html

Post by frosch »

New release in first post. :)
Read the changelog there.

TrueLight and I succeeded in porting Grf2Html to Free Pascal. So there is now also a binary for linux. Note that Free Pascal supports a couple of platforms, so you have chances, that it will also compile on your system, if you are neither on windows nor linux.
⢇⡸⢸⠢⡇⡇⢎⡁⢎⡱⢸⡱⢸⣭⠀⢸⢜⢸⢸⣀⢸⣀⢸⣭⢸⡱⠀⢰⠭⡆⣫⠰⣉⢸⢸⠀⢰⠭⡆⡯⡆⢹⠁⠀⢐⠰⡁
User avatar
JGR
Tycoon
Tycoon
Posts: 2560
Joined: 08 Aug 2005 13:46
Location: Ipswich

Re: New Tool: Grf2Html

Post by JGR »

I've just seen this tool.

Very well done Frosch and all others involved, it works very well for me.
I used it to remind myself how my newsignals GRF was supposed to work (not many comments in code).

One or two things however...
Firstly I would suggest is that instances of: (Var1A"always -1") and 0xnnnnnnnn, can be replaced with just the number, as it seems a rather long-winded way of decoding it (although more literal).
I noticed this as I tend to use it quite a lot in my NFO code, (found 13 in that GRF...)

Also I see that in varaction2 dumps, sometimes numbers are zero padded to 0x000000nn for example and sometimes they are not, it would probably be easier to read and more consistent if they were all not zero padded.

Just a few ideas...

JGR
Ex TTDPatch Coder
Patch Pack, Github
VoroninY
Engineer
Engineer
Posts: 14
Joined: 19 Nov 2007 11:12

Re: New Tool: Grf2Html

Post by VoroninY »

This tool don`t work... :( :cry: :cry:
User avatar
minime
Transport Coordinator
Transport Coordinator
Posts: 339
Joined: 18 Jan 2004 10:02
Skype: dan.masek
Location: Prague, Czech Republic
Contact:

Re: New Tool: Grf2Html

Post by minime »

Could you possibly be any less helpful?
Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. --Albert Einstein
Image Image Image
User avatar
AndersI
Tycoon
Tycoon
Posts: 1732
Joined: 19 Apr 2004 20:09
Location: Sweden
Contact:

Re: New Tool: Grf2Html

Post by AndersI »

VoroninY wrote:This tool don`t work...
Works excellently for me.

If you really want help to get it running, you had better describe what happens, and what you expected to happen.
Leviath.NL
Traffic Manager
Traffic Manager
Posts: 152
Joined: 28 Jan 2006 15:00

Re: New Tool: Grf2Html

Post by Leviath.NL »

VoroninY wrote:This tool don`t work... :( :cry: :cry:
Do you run it from a command-line?
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New Tool: Grf2Html

Post by DaleStan »

Of course it "don't [sic]". "Don't" requires a plural subject, but "this tool" is singular.
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
VoroninY
Engineer
Engineer
Posts: 14
Joined: 19 Nov 2007 11:12

Re: New Tool: Grf2Html

Post by VoroninY »

Oh, sorry, I don`t live in USA or in Britain, sometimes I make mistakes... :cry: :cry: :cry:
And about programm- I try to make it work, appears black window of command-line for a moment, and disappears. That`s all... :( :cry:
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: New Tool: Grf2Html

Post by DaleStan »

Leviath.NL wrote:
VoroninY wrote:This tool don`t work... :( :cry: :cry:
Do you run it from a command-line?
We aren't generally in the habit of asking questions for our health. Please consider answering the actual questions, instead of the flames.
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
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests