mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-11 01:49:50 +00:00
(svn r22782) -Fix: Add GrfProcessingState::ClearDataForNextFile() to clear temporary data at a specific spot, esp. clear 'data_blocks' now.
This commit is contained in:
parent
6963ce6665
commit
7bd7324b30
@ -94,6 +94,14 @@ struct GrfProcessingState {
|
|||||||
int skip_sprites; ///< Number of psuedo sprites to skip before processing the next one. (-1 to skip to end of file)
|
int skip_sprites; ///< Number of psuedo sprites to skip before processing the next one. (-1 to skip to end of file)
|
||||||
byte data_blocks; ///< Number of binary include sprites to read before processing the next pseudo sprite.
|
byte data_blocks; ///< Number of binary include sprites to read before processing the next pseudo sprite.
|
||||||
GrfDataType data_type; ///< Type of the binary include sprites to read.
|
GrfDataType data_type; ///< Type of the binary include sprites to read.
|
||||||
|
|
||||||
|
/** Clear temporary data before processing the next file in the current loading stage */
|
||||||
|
void ClearDataForNextFile()
|
||||||
|
{
|
||||||
|
nfo_line = 0;
|
||||||
|
skip_sprites = 0;
|
||||||
|
data_blocks = 0;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
static GrfProcessingState _cur;
|
static GrfProcessingState _cur;
|
||||||
@ -8116,8 +8124,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_cur.skip_sprites = 0; // XXX
|
_cur.ClearDataForNextFile();
|
||||||
_cur.nfo_line = 0;
|
|
||||||
|
|
||||||
ReusableBuffer<byte> buf;
|
ReusableBuffer<byte> buf;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user