diff -r 4bf29d14edba -r c30fe89622df src/spritecache.cpp --- a/src/spritecache.cpp Sat Mar 10 11:07:13 2007 +0000 +++ b/src/spritecache.cpp Sun Mar 11 16:31:18 2007 +0000 @@ -15,11 +15,11 @@ #endif /* SPRITE_CACHE_SIZE */ -typedef struct SpriteCache { +struct SpriteCache { void *ptr; uint32 file_pos; int16 lru; -} SpriteCache; +}; static uint _spritecache_items = 0; @@ -55,18 +55,18 @@ } -typedef struct MemBlock { +struct MemBlock { uint32 size; byte data[VARARRAY_SIZE]; -} MemBlock; +}; static uint _sprite_lru_counter; static MemBlock *_spritecache_ptr; static int _compact_cache_counter; -static void CompactSpriteCache(void); +static void CompactSpriteCache(); -static bool ReadSpriteHeaderSkipData(void) +static bool ReadSpriteHeaderSkipData() { uint16 num = FioReadWord(); byte type; @@ -223,7 +223,7 @@ return (MemBlock*)((byte*)block + (block->size & ~S_FREE_MASK)); } -static uint32 GetSpriteCacheUsage(void) +static uint32 GetSpriteCacheUsage() { uint32 tot_size = 0; MemBlock* s; @@ -235,7 +235,7 @@ } -void IncreaseSpriteLRU(void) +void IncreaseSpriteLRU() { // Increase all LRU values if (_sprite_lru_counter > 16384) { @@ -265,7 +265,7 @@ // Called when holes in the sprite cache should be removed. // That is accomplished by moving the cached data. -static void CompactSpriteCache(void) +static void CompactSpriteCache() { MemBlock *s; @@ -306,7 +306,7 @@ } } -static void DeleteEntryFromSpriteCache(void) +static void DeleteEntryFromSpriteCache() { SpriteID i; uint best = UINT_MAX; @@ -403,7 +403,7 @@ } -void GfxInitSpriteMem(void) +void GfxInitSpriteMem() { // initialize sprite cache heap if (_spritecache_ptr == NULL) _spritecache_ptr = (MemBlock*)malloc(SPRITE_CACHE_SIZE);