mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-21 21:49:10 +00:00
Codefix: Use SpriteID when passing sprite IDs. (#13037)
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
#include "../spritecache_internal.h"
|
||||
#include "../table/sprites.h"
|
||||
|
||||
static bool MockLoadNextSprite(int load_index)
|
||||
static bool MockLoadNextSprite(SpriteID load_index)
|
||||
{
|
||||
SimpleSpriteAllocator allocator;
|
||||
static Sprite *sprite = allocator.Allocate<Sprite>(sizeof(*sprite));
|
||||
@@ -33,7 +33,7 @@ static bool MockLoadNextSprite(int load_index)
|
||||
sc->control_flags = 0;
|
||||
|
||||
/* Fill with empty sprites up until the default sprite count. */
|
||||
return (uint)load_index < SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT;
|
||||
return load_index < SPR_OPENTTD_BASE + OPENTTD_SPRITE_COUNT;
|
||||
}
|
||||
|
||||
void MockGfxLoadSprites()
|
||||
@@ -43,7 +43,7 @@ void MockGfxLoadSprites()
|
||||
|
||||
GfxInitSpriteMem();
|
||||
|
||||
int load_index = 0;
|
||||
SpriteID load_index = 0;
|
||||
while (MockLoadNextSprite(load_index)) {
|
||||
load_index++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user