Can I Force nforenum to use Info 32?

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

Moderator: Graphics Moderators

Post Reply
User avatar
jmodule
Engineer
Engineer
Posts: 12
Joined: 29 Apr 2010 12:56
Location: North Carolina, USA
Contact:

Can I Force nforenum to use Info 32?

Post by jmodule »

I am coding the BMSS GRF :shock: and I've set it up with the newgrf-makefile framework. I've been considering converting all the real sprites to version 32 to prepare the way for expanding the graphics in the future. But I've discovered nforenum defaults to Info version 7 and I cannot find a way to change that.

For those that are not familiar with the makefile framework, it uses a C preprocessor to combine all my separate partial nfo files into one big file to be processed by nforenum. In the midst of that process, it adds comments at the beginning of the file which foiled my attempt to put the "// Automatically generated..." lines at the top of my header file.

So, is there an undocumented switch to tell nforenum that the input file is a particular version -- without resorting to a script that prepends the version lines?

Thanks.
Jim
______________________________________________________________________________________________

Image

Train GIFs from Frograil
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Can I Force nforenum to use Info 32?

Post by planetmaker »

what does nforenum -v and grfcodec -v tell you?
User avatar
jmodule
Engineer
Engineer
Posts: 12
Joined: 29 Apr 2010 12:56
Location: North Carolina, USA
Contact:

Re: Can I Force nforenum to use Info 32?

Post by jmodule »

I'm pretty sure I have the latest stable version.

Code: Select all

$ nforenum -v
NFORenum 6.0.0 r924 - Copyright (C) 2004-2012 by Dale McCoy

Code: Select all

$ grfcodec -v
GRFCodec 6.0.0 r924 - Copyright (C) 2000-2005 by Josef Drexler
If I run nforenum against the bmss.cnfo file with version 32 style real sprites, but no header comments, it gives me an error on each one. If I move the sprite counter to the top and insert the first two header comment lines, then nforenum is happy to parse them.

I can modify the makefile to run a script during the cnfo target to add the header lines, but I was hoping a switch could force the version instead.
Jim
______________________________________________________________________________________________

Image

Train GIFs from Frograil
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: Can I Force nforenum to use Info 32?

Post by planetmaker »

are you sure that the makefile - as it is now - doesn't force an old grf v7 header which also is not info version 32 by supplying an old grf header somewhere in the scripts directory? Provided it is the one I once wrote, it would be the case as it pre-dates the introduction of info version 32.
User avatar
jmodule
Engineer
Engineer
Posts: 12
Joined: 29 Apr 2010 12:56
Location: North Carolina, USA
Contact:

Re: Can I Force nforenum to use Info 32?

Post by jmodule »

It's the one you wrote, but I've looked through the scripts directory and verified that the header is not being supplied by something else.

I ran a short test by running nforenum on a single nfo file that uses v32 real sprites. If I don't put a header comment with the version, it automatically parses it as if it was version 7 and then fails.

The makefile just highlighted the issue because the preprocessing hides any headers I've tried to added to the pnfo/tnfo files. Because of the extra comments in the .cnfo file, nforenum doesn't "see" the version and falls back to version 7.
Jim
______________________________________________________________________________________________

Image

Train GIFs from Frograil
Post Reply

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 3 guests