Page 1 of 1

Can I Force nforenum to use Info 32?

Posted: 26 Jun 2012 19:17
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.

Re: Can I Force nforenum to use Info 32?

Posted: 26 Jun 2012 20:20
by planetmaker
what does nforenum -v and grfcodec -v tell you?

Re: Can I Force nforenum to use Info 32?

Posted: 26 Jun 2012 23:59
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.

Re: Can I Force nforenum to use Info 32?

Posted: 27 Jun 2012 07:06
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.

Re: Can I Force nforenum to use Info 32?

Posted: 27 Jun 2012 12:50
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.