Пример #1
0
/**
 * Return the appropriate co-ordinate of the actor.
 */
int GetActorBottom(int ano) {
	assert(ano > 0 && ano <= NumActors); // illegal actor number

	if (!TinselV2) {
		// Tinsel 1 version
		if (!actorInfo[ano - 1].presObj)
			return 0;

		return MultiLowest(actorInfo[ano - 1].presObj);
	}

	// Tinsel 2 version
	PMOVER pMover = GetMover(ano);
	int i;
	bool bIsObj;
	int bottom = 0;

	if (pMover != NULL) {
		return GetMoverBottom(pMover);
	} else {
		for (i = 0, bIsObj = false; i < MAX_REELS; i++) {
			// If there's an object
			// and it is not a blank frame for it...
			if (actorInfo[ano-1].presObjs[i] && MultiHasShape(actorInfo[ano-1].presObjs[i])) {
				if (!bIsObj) {
					bIsObj = true;
					bottom = MultiLowest(actorInfo[ano-1].presObjs[i]);
				} else {
					if (MultiLowest(actorInfo[ano-1].presObjs[i]) > bottom)
						bottom = MultiLowest(actorInfo[ano-1].presObjs[i]);
				}
			}
		}
		return bIsObj ? bottom : 0;
	}
}
Пример #2
0
/**
 * Return the height of the current background.
 */
int BgHeight() {
	assert(pBG[0]);
	return MultiLowest(pBG[0]) + 1;
}
Пример #3
0
/**
 * Moving actor's bottom co-ordinate.
 */
int GetMoverBottom(PMOVER pMover) {
	assert(pMover); // Getting null moving actor's bottommost position
	assert(pMover->actorObj); // Getting null moving actor's bottommost position

	return MultiLowest(pMover->actorObj);
}