forked from mirror/OpenTTD
(svn r12002) -Cleanup (r11981): Remove obsolete code to skip sprites from indexed GRFs.
This commit is contained in:
@@ -70,10 +70,6 @@ void LoadSpritesIndexed(int file_index, uint *sprite_id, const SpriteID *index_t
|
|||||||
while ((start = *index_tbl++) != END) {
|
while ((start = *index_tbl++) != END) {
|
||||||
uint end = *index_tbl++;
|
uint end = *index_tbl++;
|
||||||
|
|
||||||
if (start == SKIP) { // skip sprites (amount in second var)
|
|
||||||
SkipSprites(end);
|
|
||||||
(*sprite_id) += end;
|
|
||||||
} else { // load sprites and use indexes from start to end
|
|
||||||
do {
|
do {
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
LoadNextSprite(start, file_index, *sprite_id);
|
LoadNextSprite(start, file_index, *sprite_id);
|
||||||
@@ -84,7 +80,6 @@ void LoadSpritesIndexed(int file_index, uint *sprite_id, const SpriteID *index_t
|
|||||||
(*sprite_id)++;
|
(*sprite_id)++;
|
||||||
} while (++start <= end);
|
} while (++start <= end);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void LoadGrfIndexed(const char* filename, const SpriteID* index_tbl, int file_index)
|
static void LoadGrfIndexed(const char* filename, const SpriteID* index_tbl, int file_index)
|
||||||
|
@@ -272,14 +272,6 @@ void DupSprite(SpriteID old_spr, SpriteID new_spr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void SkipSprites(uint count)
|
|
||||||
{
|
|
||||||
for (; count > 0; --count) {
|
|
||||||
if (!ReadSpriteHeaderSkipData()) return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define S_FREE_MASK 1
|
#define S_FREE_MASK 1
|
||||||
|
|
||||||
static inline MemBlock* NextBlock(MemBlock* block)
|
static inline MemBlock* NextBlock(MemBlock* block)
|
||||||
|
@@ -35,6 +35,5 @@ void IncreaseSpriteLRU();
|
|||||||
|
|
||||||
bool LoadNextSprite(int load_index, byte file_index, uint file_sprite_id);
|
bool LoadNextSprite(int load_index, byte file_index, uint file_sprite_id);
|
||||||
void DupSprite(SpriteID old_spr, SpriteID new_spr);
|
void DupSprite(SpriteID old_spr, SpriteID new_spr);
|
||||||
void SkipSprites(uint count);
|
|
||||||
|
|
||||||
#endif /* SPRITECACHE_H */
|
#endif /* SPRITECACHE_H */
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SKIP = 0xFFFE,
|
|
||||||
END = 0xFFFF
|
END = 0xFFFF
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user