コード例 #1
0
ファイル: maprules.cpp プロジェクト: Chuvi-w/CSSDK
void CGameCounter::Spawn(void)
{
	// Save off the initial count
	SetInitialValue(CountValue());
	CRulePointEntity::Spawn();
}
コード例 #2
0
ファイル: kdtree.hpp プロジェクト: OpenTTD/OpenTTD
	/** Debugging function, counts number of occurrences of an element regardless of its correct position in the tree */
	size_t CountValue(const T &element, size_t node_idx) const
	{
		if (node_idx == INVALID_NODE) return 0;
		const node &n = this->nodes[node_idx];
		return CountValue(element, n.left) + CountValue(element, n.right) + ((n.element == element) ? 1 : 0);
	}
コード例 #3
0
ファイル: maprules.cpp プロジェクト: Chuvi-w/CSSDK
	inline BOOL HitLimit(void) { return CountValue() == LimitValue(); }