NFORenum v3.4.6 released (NFO renumberer and linter)
Posted: 11 Nov 2004 07:07
UPDATE: NFORenum is now being maintained by members of the OpenTTD project. A thread discussing the latest preview release (as of August 2010) can be found here.
-------------------------------------------------------------------------------------------------------------------------------------
I have officially Gotten Tired of renumbering my NFO files by hand, and of having to copy and paste my 424-character-long ruler every time I code a pseudo-sprite longer than about 10 bytes.
Actually, that happened about the second time I renumbered an NFO file, I just didn't do anything about it until now.
Since I could not find renum.pl, I produced this GPLed (#include <std/no_warranty.h>) tool. (EDIT:Csaboka's right, renum.pl is in the source .zip.)
The source should compile with Visual Studio .NET, gcc 3.4.x, and gcc 4.
Source from before the move to SVN is available upon request.
UPDATE:
Version 3.4.6 released.
Features:
- Numbers all non-comment, non-blank lines.
- Corrects the size of pseudo-sprites.
- Comments are never modified, regardless of location.
- Spacing between bytes in pseudosprites is preserved.
- Creates a backup of of the file to be modified, unless the backup already exists.
- Sanity checks on input files, to help prevent renumbering, for example, GRF files.
- Outputs NFO header if one is not detected.
- Outputs correct sprite 0 on TTDPatch NFOs.
- Checks all sprites for validity.
- Supports strings, binary includes, binary imports, and recolor maps.
- Permits calculations and variables in realsprites.
- Accepts strings with UTF-8 encoded characters.
- Command-line arguments for globally applicable settings, including several comment-commands.
- Optionally, rewrites sprites in a more readable format.
- Optionally, attempt to correct faulty pseudosprites.
Changelog:
v3.4.5 to v3.4.6
- Data file updates for stations; canals; houses; industries; actions 2, 5, 7/9, B, and D; languages; TextIDs; and callbacks.
- Fixed parameter check for global 60+x variables.
- Allow variational 2s to take var 1A with an <and-mask> of 0.
- Check that variational 2 operator 0F's left-hand side side was stored.
- Prohibit storing to persistent registers when they don't exist.
- Fix several bugs in the formatting of variable-length properties.
- Check cargo types against the cargo translation table.
- Add \2ror and \2rot for Adv2 op 11.
- Add \d<YMD> and \d<DMY> to generate long format intro dates.
v3.4.4 to v3.4.5
- Data file updates for signals, snowline, and TextIDs
- Fix yet more array index vs char* problems.
- Add offset info to a message that failed to have it.
- Ensure that VERSIONCHECK gets its required two arguments.
- Fix version 1 industry production callback support.
- Support Action 7/9's new GRFID/mask format.
- (minime) Allow @@LET variables to be redefined.
v3.4.3 to v3.4.4
- Data file updates for industry tiles, industries, and objects.
- Make unknown action 5 types look for real sprites or recolor sprites.
- Recognize action 2 operations 0E, 0F, and 10
- Catch Action Fs that chain to themselves.
- Add escapes for the new action 2 operations 0E and 0F.
- Support new signals. (Actions 5, variational 2, and 3.)
- Process var. and random 2s and action 3 even when the feature is not recognized.
- (fix) Don't correct the feature of a var. or random 2 to match the preceding action 1.
- Industry production callback version 1.
- Produce a useful error message when data files are out of sync with each other.
- Make --data also report the data-file location.
- Check for duplicate IDs in an action 3.
- Check that prop 08 has been set before the action 3, when necessary.
v3.4.2 to v3.4.3
- Action 1/2/3 for bridges (Callback 33)
- Data file updates for vehicles, stations, action 7/9, TextIDs
- Add $HOMEDRIVE$HOMEPATH to the list of search paths for .renum/
- Allow multiple sizes for some action 7/9 variables.
- Accept GRF version 7 lang-id bytes in action Bs that preceed the action 8.
- Allow Action 6 <param-size> entries with bit 7 set.
-------------------------------------------------------------------------------------------------------------------------------------
I have officially Gotten Tired of renumbering my NFO files by hand, and of having to copy and paste my 424-character-long ruler every time I code a pseudo-sprite longer than about 10 bytes.
Actually, that happened about the second time I renumbered an NFO file, I just didn't do anything about it until now.
Since I could not find renum.pl, I produced this GPLed (#include <std/no_warranty.h>) tool. (EDIT:Csaboka's right, renum.pl is in the source .zip.)
The source should compile with Visual Studio .NET, gcc 3.4.x, and gcc 4.
Source from before the move to SVN is available upon request.
UPDATE:
Version 3.4.6 released.
Features:
- Numbers all non-comment, non-blank lines.
- Corrects the size of pseudo-sprites.
- Comments are never modified, regardless of location.
- Spacing between bytes in pseudosprites is preserved.
- Creates a backup of of the file to be modified, unless the backup already exists.
- Sanity checks on input files, to help prevent renumbering, for example, GRF files.
- Outputs NFO header if one is not detected.
- Outputs correct sprite 0 on TTDPatch NFOs.
- Checks all sprites for validity.
- Supports strings, binary includes, binary imports, and recolor maps.
- Permits calculations and variables in realsprites.
- Accepts strings with UTF-8 encoded characters.
- Command-line arguments for globally applicable settings, including several comment-commands.
- Optionally, rewrites sprites in a more readable format.
- Optionally, attempt to correct faulty pseudosprites.
Changelog:
v3.4.5 to v3.4.6
- Data file updates for stations; canals; houses; industries; actions 2, 5, 7/9, B, and D; languages; TextIDs; and callbacks.
- Fixed parameter check for global 60+x variables.
- Allow variational 2s to take var 1A with an <and-mask> of 0.
- Check that variational 2 operator 0F's left-hand side side was stored.
- Prohibit storing to persistent registers when they don't exist.
- Fix several bugs in the formatting of variable-length properties.
- Check cargo types against the cargo translation table.
- Add \2ror and \2rot for Adv2 op 11.
- Add \d<YMD> and \d<DMY> to generate long format intro dates.
v3.4.4 to v3.4.5
- Data file updates for signals, snowline, and TextIDs
- Fix yet more array index vs char* problems.
- Add offset info to a message that failed to have it.
- Ensure that VERSIONCHECK gets its required two arguments.
- Fix version 1 industry production callback support.
- Support Action 7/9's new GRFID/mask format.
- (minime) Allow @@LET variables to be redefined.
v3.4.3 to v3.4.4
- Data file updates for industry tiles, industries, and objects.
- Make unknown action 5 types look for real sprites or recolor sprites.
- Recognize action 2 operations 0E, 0F, and 10
- Catch Action Fs that chain to themselves.
- Add escapes for the new action 2 operations 0E and 0F.
- Support new signals. (Actions 5, variational 2, and 3.)
- Process var. and random 2s and action 3 even when the feature is not recognized.
- (fix) Don't correct the feature of a var. or random 2 to match the preceding action 1.
- Industry production callback version 1.
- Produce a useful error message when data files are out of sync with each other.
- Make --data also report the data-file location.
- Check for duplicate IDs in an action 3.
- Check that prop 08 has been set before the action 3, when necessary.
v3.4.2 to v3.4.3
- Action 1/2/3 for bridges (Callback 33)
- Data file updates for vehicles, stations, action 7/9, TextIDs
- Add $HOMEDRIVE$HOMEPATH to the list of search paths for .renum/
- Allow multiple sizes for some action 7/9 variables.
- Accept GRF version 7 lang-id bytes in action Bs that preceed the action 8.
- Allow Action 6 <param-size> entries with bit 7 set.