Merge branch 'tracerestrict-sx' into jgrpp
Conflicts: src/lang/english.txt src/settings_gui.cpp src/settings_type.h src/table/settings.ini
This commit is contained in:
@@ -48,6 +48,7 @@ static const SpriteID * const _landscape_spriteindexes[] = {
|
||||
|
||||
/** file index of first user-added GRF file */
|
||||
int _first_user_grf_file_index;
|
||||
int _opengfx_grf_file_index;
|
||||
|
||||
/**
|
||||
* Load an old fashioned GRF file.
|
||||
@@ -185,6 +186,11 @@ static void LoadSpriteTables()
|
||||
/* Tracerestrict sprites. */
|
||||
LoadGrfFile("tracerestrict.grf", SPR_TRACERESTRICT_BASE, i++);
|
||||
|
||||
/* Fill duplicate original signal graphics sprite block */
|
||||
for (uint i = 0; i < DUP_ORIGINAL_SIGNALS_SPRITE_COUNT; i++) {
|
||||
DupSprite(SPR_ORIGINAL_SIGNALS_BASE + i, SPR_DUP_ORIGINAL_SIGNALS_BASE + i);
|
||||
}
|
||||
|
||||
/*
|
||||
* The second basic file always starts at the given location and does
|
||||
* contain a different amount of sprites depending on the "type"; DOS
|
||||
@@ -242,6 +248,16 @@ static void LoadSpriteTables()
|
||||
LoadNewGRF(SPR_NEWGRFS_BASE, i);
|
||||
|
||||
_first_user_grf_file_index = i + 1;
|
||||
_opengfx_grf_file_index = -1;
|
||||
uint index = i;
|
||||
for (GRFConfig *c = master; c != NULL; c = c->next, index++) {
|
||||
if (c->status == GCS_DISABLED || c->status == GCS_NOT_FOUND || HasBit(c->flags, GCF_INIT_ONLY)) continue;
|
||||
if (c->ident.grfid == BSWAP32(0xFF4F4701)) {
|
||||
/* Detect OpenGFX GRF ID */
|
||||
_opengfx_grf_file_index = index;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Free and remove the top element. */
|
||||
delete master;
|
||||
|
||||
Reference in New Issue
Block a user