예제 #1
0
파일: sprites.c 프로젝트: ianka/wuergertime
/* Check if at squirted ladder up entry. */
uint8_t checkSpriteAtSquirtedLadderEntryUp(uint8_t slot) {
	/* Fail if not at exact tile coordinate. */
	if (getSpriteX(slot) & 0x07) return 0;

	/* On an exact tile coordinate. Check ladder. */
	if (getSpriteLadderTile(slot) == TILES0_LADDER_SQUIRTED_RIGHT)
			/* On ladder up entry. */
			return 1;

	/* Not on a ladder up entry. */
	return 0;
}
예제 #2
0
파일: sprites.c 프로젝트: ianka/wuergertime
/* Check if at ladder up entry. */
uint8_t checkSpriteAtLadderEntryUp(uint8_t slot) {
	/* Fail if not at exact tile coordinate. */
	if (getSpriteX(slot) & 0x07) return 0;

	/* On an exact tile coordinate. Check ladder. */
	switch (getSpriteLadderTile(slot)) {
		case TILES0_LADDER_RIGHT:
		case TILES0_LADDER_CLEANED_RIGHT:
		case TILES0_LADDER_TOP_RIGHT:
		case TILES0_LADDER_TOP_FLOOREND_RIGHT:
			/* On ladder up entry. */
			return 1;
		default:
			/* Not on a ladder up entry. */
			return 0;
	}
}
예제 #3
0
파일: sprites.c 프로젝트: ianka/wuergertime
/* Check if at ladder down entry. */
uint8_t checkSpriteAtLadderEntryDown(uint8_t slot) {
	/* Fail if not at exact tile coordinate. */
	if (getSpriteX(slot) & 0x07) return 0;

	/* On an exact tile coordinate. Check floor. */
	switch (getSpriteFloorTile(slot)) {
		case TILES0_LADDER_TOP_LEFT:
		case TILES0_LADDER_TOP_FLOOREND_LEFT:
			/* On ladder entry down if we are currently moving left. */
			return ((GameSpriteSlots[slot].flags & SPRITE_FLAGS_DIRECTION_MASK) == SPRITE_FLAGS_DIRECTION_LEFT);
		case TILES0_LADDER_TOP_RIGHT:
		case TILES0_LADDER_TOP_FLOOREND_RIGHT:
			/* On ladder entry down if we are currently moving right. */
			return ((GameSpriteSlots[slot].flags & SPRITE_FLAGS_DIRECTION_MASK) == SPRITE_FLAGS_DIRECTION_RIGHT);
		default:
			/* Not at a ladder down entry. */
			return 0;
	}
}
예제 #4
0
void LevelMenu::createLabel(){
		label_ = LabelTTF::create(levelName_, "fonts/Mistral.ttf", 50);
		label_->setColor(Color3B(210, 160, 30));
		label_->setPosition(Point(getSpriteX()+10,getSpriteY()-10));
}
예제 #5
0
PRectangle* LevelMenu::getRect(){
	return new PRectangle(getSpriteX(), getSpriteY(), 80, 80);
}