Changeset - r3557:5aa661716e81
[Not reviewed]
master
0 1 0
peter1138 - 18 years ago 2006-04-15 16:40:54
peter1138@openttd.org
(svn r4431) - NewGRF: rename nfo_line to _nfo_line, to avoid confusing Darkvater ;)
1 file changed with 6 insertions and 6 deletions:
0 comments (0 inline, 0 general)
newgrf.c
Show inline comments
 
@@ -35,13 +35,13 @@ static uint _file_index; // XXX
 
extern int _traininfo_vehicle_pitch;
 

	
 
static GRFFile *_cur_grffile;
 
GRFFile *_first_grffile;
 
static int _cur_spriteid;
 
static int _cur_stage;
 
static int nfo_line;
 
static int _nfo_line;
 

	
 
/* 32 * 8 = 256 flags. Apparently TTDPatch uses this many.. */
 
static uint32 _ttdpatch_flags[8];
 

	
 

	
 
typedef enum grfspec_feature {
 
@@ -113,13 +113,13 @@ static void CDECL grfmsg(grfmsg_severity
 

	
 
	va_start(va, str);
 
	vsnprintf(buf, sizeof(buf), str, va);
 
	va_end(va);
 

	
 
	export_severity = 2 - (severity == GMS_FATAL ? 2 : severity);
 
	DEBUG(grf, export_severity) ("[%s:%d][%s] %s", _cur_grffile->filename, nfo_line, severitystr[severity], buf);
 
	DEBUG(grf, export_severity) ("[%s:%d][%s] %s", _cur_grffile->filename, _nfo_line, severitystr[severity], buf);
 
}
 

	
 

	
 
#define check_length(real, wanted, where) \
 
do { \
 
	if (real < wanted) { \
 
@@ -1283,13 +1283,13 @@ static void NewSpriteSet(byte *buf, int 
 
		"consisting of %d sets with %d views each (total %d)",
 
		_cur_spriteid, feature, num_sets, num_ents, num_sets * num_ents
 
	);
 

	
 
	for (i = 0; i < num_sets * num_ents; i++) {
 
		LoadNextSprite(_cur_spriteid++, _file_index);
 
		nfo_line++;
 
		_nfo_line++;
 
	}
 
}
 

	
 
/* Action 0x02 */
 
static void NewSpriteGroup(byte *buf, int len)
 
{
 
@@ -2009,13 +2009,13 @@ static void SpriteReplace(byte *buf, int
 
			"SpriteReplace: [Set %d] Changing %d sprites, beginning with %d",
 
			i, num_sprites, first_sprite
 
		);
 

	
 
		for (j = 0; j < num_sprites; j++) {
 
			LoadNextSprite(first_sprite + j, _file_index); // XXX
 
			nfo_line++;
 
			_nfo_line++;
 
		}
 
	}
 
}
 

	
 
static void GRFError(byte *buf, int len)
 
{
 
@@ -2563,17 +2563,17 @@ static void LoadNewGRFFile(const char* f
 
		FioReadDword();
 
	} else {
 
		error("Custom .grf has invalid format.");
 
	}
 

	
 
	_skip_sprites = 0; // XXX
 
	nfo_line = 0;
 
	_nfo_line = 0;
 

	
 
	while ((num = FioReadWord()) != 0) {
 
		byte type = FioReadByte();
 
		nfo_line++;
 
		_nfo_line++;
 

	
 
		if (type == 0xFF) {
 
			if (_skip_sprites == 0) {
 
				DecodeSpecialSprite(num, stage);
 
				continue;
 
			} else {
0 comments (0 inline, 0 general)