mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-17 20:13:07 +01:00
Make sprite export start at 0 to correspond with in-game sprite id
This commit is contained in:
committed by
Michael Steenbeek
parent
05b274a239
commit
e2523a3d8d
@@ -575,25 +575,28 @@ sint32 cmdline_for_sprite(const char **argv, sint32 argc)
|
||||
|
||||
for (sint32 spriteIndex = 0; spriteIndex < maxIndex; spriteIndex++){
|
||||
|
||||
if (spriteIndex % 100 == 99){
|
||||
if (spriteIndex % 100 == 99)
|
||||
{
|
||||
// Status indicator
|
||||
printf("\r%d / %d, %d%%", spriteIndex, maxIndex, spriteIndex / maxIndex);
|
||||
}
|
||||
|
||||
if (!sprite_file_export(spriteIndex, outputPath))
|
||||
{
|
||||
fprintf(stderr, "Could not export\n");
|
||||
sprite_file_close();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Add to the index at the end of the file name
|
||||
char *counter = outputPath + pathLen + numbers - 1;
|
||||
(*counter)++;
|
||||
while (*counter > '9'){
|
||||
while (*counter > '9')
|
||||
{
|
||||
*counter = '0';
|
||||
counter--;
|
||||
(*counter)++;
|
||||
}
|
||||
|
||||
if (!sprite_file_export(spriteIndex, outputPath)) {
|
||||
fprintf(stderr, "Could not export\n");
|
||||
sprite_file_close();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
sprite_file_close();
|
||||
|
||||
Reference in New Issue
Block a user