NFORenum v3.4.6 released (NFO renumberer and linter)

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

Moderator: Graphics Moderators

User avatar
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DJ Nekkid »

make a "clean tile" at the top of the grf' and use it whenever you need a "default" that is never gonna be reached anyway? :p
Member of the
ImageImage
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by FooBar »

Well that's a non-solution IMO. I much rather accept the warnings being there than implement code that is never used.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

FooBar wrote:Well that's a non-solution IMO. I much rather accept the warnings being there than implement code that is never used.
Yet you implement a default that is never used. :p
FooBar wrote:I tried using renum -w 100,141,144 but ... this silences warnings 141 and 144 just fine, it doesn't silence this warning 100.
On a more serious note, are you quite sure that's what it does? Debugging suggests to me that it doesn't do anything at all. (Please don't ask me how I pulled that stunt.)
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
DJ Nekkid
Tycoon
Tycoon
Posts: 2141
Joined: 30 Nov 2006 20:33

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DJ Nekkid »

FooBar wrote:Well that's a non-solution IMO. I much rather accept the warnings being there than implement code that is never used.
oki, i see that, but then;

FooBar wrote:

Code: Select all

-1 * 0 02 09 B3 //layout 3 
	85 43 //check relative position (00yx[YYXX])
	00 FF FF //don't shift, don't mask
	\b3 //number of ranges to check (number of tiles)
	//pit
	\wx00  01 02  01 02
	\wx01  00 02  00 02
	\wx02  01 00  01 00
	\wx00 //<default> (first sprite available)
Why not:

Code: Select all

-1 * 0 02 09 B3 //layout 3 
	85 43 //check relative position (00yx[YYXX])
	00 FF FF //don't shift, don't mask
	\b2 //number of ranges to check (number of tiles)
	//pit
   \wx00  01 02  01 02
   \wx01  00 02  00 02
   \wx02  //<default> (first sprite available)
or similar then?
Member of the
ImageImage
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by FooBar »

Leaving one variation out and use the default for that is duly noted :D
DaleStan wrote:On a more serious note, are you quite sure that's what it does? Debugging suggests to me that it doesn't do anything at all. (Please don't ask me how I pulled that stunt.)
That's how -? told me how to use it:
-w and -W (and their long counterparts) also accept a comma-separated list of messages, all of which will be ENABLEd or DISABLEd.
It might be that I don't have any warnings 141 and 144 any more...

/me goes testing...

EDIT: It seems that I don't have warnings 141 and 144 any more (probably due to renum update), but -w 100 doesn't do anything either...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

FooBar wrote:It seems that I don't have warnings 141 and 144 any more (probably due to renum update), but -w 100 doesn't do anything either...
Now this I can't reproduce; -w 100 works for me. Anyway, hopefully 2127 will fix the issues.
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
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by George »

DaleStan wrote:
FooBar wrote:It seems that I don't have warnings 141 and 144 any more (probably due to renum update), but -w 100 doesn't do anything either...
Now this I can't reproduce; -w 100 works for me. Anyway, hopefully 2127 will fix the issues.
How about putting the latest prebuild win executable at http://users.tt-forums.net/dalestan/nforenum/ ?
r2100 is the latest one I see there :(
Image Image Image Image
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by planetmaker »

@DaleStan: thanks again for the quick fix! Indeed that has -w100 working here now, again, too.

@George: Currently I try to keep available the latest binaries at http://dev.openttdcoop.org/bundles/grfdev
I still hope that we manage to get the OpenTTD compile farm providing latest binaries automatically :)
User avatar
FooBar
Tycoon
Tycoon
Posts: 6553
Joined: 21 May 2007 11:47
Location: The Netherlands
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by FooBar »

DaleStan wrote:Anyway, hopefully 2127 will fix the issues.
Thanks for fixing something that wasn't broke in the first place, so I think an apology is in order...

I had -w 144,141 specified in my Makefile.local all the time, so changing the renum flags Makefile.config to -w 100,144,141 or even -w 100 didn't have any effect at all, as Makefile.local overruled those. :oops:
So next time I can't get something to work, ask me about my makefile.local...

But then you're commit isn't completely useless, as now there's a check to detect faulty command line arguments. :]
User avatar
George
Tycoon
Tycoon
Posts: 4364
Joined: 16 Apr 2003 16:09
Skype: george-vb
Location: Varna, Bulgaria
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by George »

planetmaker wrote:@DaleStan: thanks again for the quick fix! Indeed that has -w100 working here now, again, too.

@George: Currently I try to keep available the latest binaries at http://dev.openttdcoop.org/bundles/grfdev
I still hope that we manage to get the OpenTTD compile farm providing latest binaries automatically :)
Thank you!
Image Image Image Image
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by planetmaker »

With nforenum r2166 I have problems to use target "bundle_zip" under MinGW, as MinGW isn't recognized as a windows environment and thus the target "release" searches for renum instead of renum.exe. The attached diff amends Makefile such, that a MinGW environment is detected and the correct binary name assigned.

Btw: Thanks for fixing the random bits for canals. New versions, using the new bundle_zip target are uploaded to http://mz.openttdcoop.org/bundles/grfdev/nforenum/
Attachments
also_mingw.diff
diff file which teaches Makefile about the existance of MinGW
(635 Bytes) Downloaded 240 times
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

Does diff work for you too? I like it better, but if it doesn't work, we can go back to using uname and cut.
Attachments
also_mingw-2.diff
(559 Bytes) Downloaded 211 times
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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by planetmaker »

Thanks, that diff works for me, too.
User avatar
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by planetmaker »

Two things I wonder about:

- when you terminate a comment line in NFO with \ the subsequent sprite is ignored. Is that intended (escaping the line break)?
- when you add colour codes (e.g. 8E) to action 08, nforenum complains with warning 144 about the use there, indicating that that is a mis-use of the colour codes. I don't see why they must not be used there...
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

1) Are you running the code through the C preprocessor? If so, then that is to blame, and not NFORenum; renum can't help you if CPP has already eaten the newline.
2) I went conservative there, obviously. I can make it more permissive pretty easily.
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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by planetmaker »

DaleStan wrote:1) Are you running the code through the C preprocessor? If so, then that is to blame, and not NFORenum; renum can't help you if CPP has already eaten the newline.
2) I went conservative there, obviously. I can make it more permissive pretty easily.
ad 1) Yes, I do. :-) That then seems to be the cause, thanks.
ad 2) I would appreciate it as it's in the newgrfs I'm involved right now a warning which is not necessary as it also seems nicely supported by the programmes.
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Yexo »

I've finally compiled nforenum myself. I noticed an odd thing in the Makefile:

Code: Select all

-include ${MAKEFILELOCAL}
Is before the lines setting CFLAGS/CXXFLAGS, so changing CFLAGS in Makefile.local has no effect. You can argue that CFLAGS shouldn't be changed in Makefile.local but if that's the case they shouldn't be included in Makefile.local.sample either.

And my compliments about the config data format. It really shows how much information you can pack in only a few bytes :p
Yexo
Tycoon
Tycoon
Posts: 3663
Joined: 20 Dec 2007 12:49

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by Yexo »

The following code is wrong, so the error is correct but not really helpful. "sound import sprites", how many is that?

Code: Select all

//!!Fatal Error (41): All Basic standard 02s for houses and industry tiles are sound import sprites bytes long.
   11 * 12	 02 09 00 00
        00 80 00 00
        00 00 00 00
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by DaleStan »

Hmm...
That could be considered somewhat incorrect. Fixed in 2198.
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
planetmaker
OpenTTD Developer
OpenTTD Developer
Posts: 9432
Joined: 07 Nov 2007 22:44
Location: Sol d

Re: NFORenum v3.4.6 released (NFO renumberer and linter)

Post by planetmaker »

nforenum r2198 has a compile warning (gcc 4.0.1 on mac):

Code: Select all

[CPP] act0.o
act0.cpp: In function 'void FormatSprite(PseudoSprite&, uint&, uint, uint)':
act0.cpp:294:7: warning: suggest explicit braces to avoid ambiguous 'else'
The attached diff should fix that, given indentation in the original source is right :-)
Attachments
no_ambigeous_braces.diff
fixing the compile warning
(645 Bytes) Downloaded 229 times
Locked

Return to “NewGRF Technical Discussions”

Who is online

Users browsing this forum: No registered users and 2 guests