Quote Originally Posted by ZoriaRPG View Post
Which way would you find best?

CenterX(x+HitXOffset)
or
CenterX(x) + HitXOffset

The value would be different, and I'm thinking that returning CenterX(x) + HitXOffset is what is best, but may not be what you want. I hope that it is. I'll give you both versions, and you can tell me which one works as you want.

Code:
int CenterX(lweapon anLWeapon, bool trueoffset) { 
	if ( trueoffset ) return anLWeapon->X+8*anLWeapon->TileWidth + anLWeapon->HitXOffset;
	else return CenterX(anLWeapon) + anLWeapon->HitXOffset;
}
int CenterY(lweapon anLWeapon, bool trueoffset) {
	if ( trueoffset ) return anLWeapon->Y+8*anLWeapon->TileHeight + anLWeapon->HitYOffset;
	else return CenterX(anLWeapon) + anLWeapon->HitYOffset;
}
CenterX(x) + HitXOffset