diff options
author | peter1138 <peter1138@openttd.org> | 2008-01-28 17:51:45 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2008-01-28 17:51:45 +0000 |
commit | af2429f8e07ffe735ff67152ed2129ddf7329e4a (patch) | |
tree | b9b06b1980af6a05b4a3fbdeb946aca9cb85f51a /src | |
parent | 5d9326ff0354c93115d0410dd5c5f60517425157 (diff) | |
download | openttd-af2429f8e07ffe735ff67152ed2129ddf7329e4a.tar.xz |
(svn r12002) -Cleanup (r11981): Remove obsolete code to skip sprites from indexed GRFs.
Diffstat (limited to 'src')
-rw-r--r-- | src/gfxinit.cpp | 23 | ||||
-rw-r--r-- | src/spritecache.cpp | 8 | ||||
-rw-r--r-- | src/spritecache.h | 1 | ||||
-rw-r--r-- | src/table/landscape_sprite.h | 1 |
4 files changed, 9 insertions, 24 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 4d67a2544..2bd262385 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -70,20 +70,15 @@ void LoadSpritesIndexed(int file_index, uint *sprite_id, const SpriteID *index_t while ((start = *index_tbl++) != END) { 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 { - #ifdef NDEBUG - LoadNextSprite(start, file_index, *sprite_id); - #else - bool b = LoadNextSprite(start, file_index, *sprite_id); - assert(b); - #endif - (*sprite_id)++; - } while (++start <= end); - } + do { + #ifdef NDEBUG + LoadNextSprite(start, file_index, *sprite_id); + #else + bool b = LoadNextSprite(start, file_index, *sprite_id); + assert(b); + #endif + (*sprite_id)++; + } while (++start <= end); } } diff --git a/src/spritecache.cpp b/src/spritecache.cpp index 0db889946..1ea6816a7 100644 --- a/src/spritecache.cpp +++ b/src/spritecache.cpp @@ -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 static inline MemBlock* NextBlock(MemBlock* block) diff --git a/src/spritecache.h b/src/spritecache.h index 371fc5601..946efd6ca 100644 --- a/src/spritecache.h +++ b/src/spritecache.h @@ -35,6 +35,5 @@ void IncreaseSpriteLRU(); bool LoadNextSprite(int load_index, byte file_index, uint file_sprite_id); void DupSprite(SpriteID old_spr, SpriteID new_spr); -void SkipSprites(uint count); #endif /* SPRITECACHE_H */ diff --git a/src/table/landscape_sprite.h b/src/table/landscape_sprite.h index 01b143077..1665720a3 100644 --- a/src/table/landscape_sprite.h +++ b/src/table/landscape_sprite.h @@ -1,7 +1,6 @@ /* $Id$ */ enum { - SKIP = 0xFFFE, END = 0xFFFF }; |