1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Merge pull request #323 from vcmi/CStackTweaks

CStack tweaks
This commit is contained in:
ArseniyShestakov
2017-07-15 00:42:08 +03:00
committed by GitHub
39 changed files with 1501 additions and 765 deletions

View File

@ -507,3 +507,15 @@ CGeneralTextHandler::CGeneralTextHandler()
}
}
}
int32_t CGeneralTextHandler::pluralText(const int32_t textIndex, const int32_t count) const
{
if(textIndex == 0)
return 0;
else if(textIndex < 0)
return -textIndex;
else if(count == 1)
return textIndex;
else
return textIndex + 1;
}