i have tried to come up with something simple, even though not very elegant.
it works when all sprites are squares of the same size, but when I ran it on sprites of different sizes, it turned out a mess!!!
int centralsprite=mysprite5;
float resizefactor=0.6f;
float spritex, spritey;
float spritew=agk::GetSpriteWidth(centralsprite);
float spriteh=agk::GetSpriteHeight(centralsprite);
agk::SetSpriteScaleByOffset (centralsprite, resizefactor, resizefactor);
float shrinkw=(spritew-agk::GetSpriteWidth(centralsprite))/2;
float shrinkh=(spriteh-agk::GetSpriteHeight(centralsprite))/2;
float shrinkx=agk::GetSpriteXByOffset(centralsprite);
float shrinky=agk::GetSpriteYByOffset(centralsprite);
for(int counter=mysprite1; counter<=mysprite10; counter++)
{
agk::SetSpriteScaleByOffset (counter, resizefactor, resizefactor);
spritex=agk::GetSpriteXByOffset(counter);
spritey=agk::GetSpriteYByOffset(counter);
if (spritex<shrinkx)
{
spritex=spritex+shrinkw;
}
else
{
spritex=spritex-shrinkw;
}
if (spritey<shrinky)
{
spritey=spritey+shrinkh;
}
else
{
spritey=spritey-shrinkh;
}
if (counter!=centralsprite)
{
agk::SetSpritePositionByOffset (counter, spritex, spritey);
}
}