bool CImage::UpdateImage(const std::string& file_path, int x, int y, int rotation, int align, bool bShow) { SetFilePath(file_path); SetPos(x, y); SetRotation(rotation); SetAlign(align); SetShown(bShow); ChangeResource(); return true; }
/** ** Substract a factor of costs from the resources ** ** @param costs How many costs. ** @param factor Factor of the costs to apply. */ void CPlayer::SubCostsFactor(const int *costs, int factor) { for (int i = 1; i < MaxCosts; ++i) { ChangeResource(i, -costs[i] * 100 / factor); } }
/** ** Subtract costs from the resources ** ** @param costs How many costs. */ void CPlayer::SubCosts(const int *costs) { for (int i = 1; i < MaxCosts; ++i) { ChangeResource(i, -costs[i], true); } }
/** ** Add a factor of costs to the resources ** ** @param costs How many costs. ** @param factor Factor of the costs to apply. */ void CPlayer::AddCostsFactor(const int *costs, int factor) { for (int i = 1; i < MaxCosts; ++i) { ChangeResource(i, costs[i] * factor / 100, true); } }
/** ** Add costs to the resources ** ** @param costs How many costs. */ void CPlayer::AddCosts(const int *costs) { for (int i = 1; i < MaxCosts; ++i) { ChangeResource(i, costs[i], false); } }