예제 #1
0
void TCOD_opengl_putchar_ex(int x, int y, int c, TCOD_color_t fore, TCOD_color_t back) {
	int loc = x+y*conwidth;

	if ( TCOD_ctx.renderer == TCOD_RENDERER_GLSL ) {
		updateChar(Character, loc, (unsigned char *)&c, ConsoleDataAlignment[Character], 0);
		updateChar(ForeCol, loc, &fore.r, ConsoleDataAlignment[ForeCol], 0);
	}
	updateChar(BackCol, loc, &back.r, ConsoleDataAlignment[BackCol], 0);

}
예제 #2
0
파일: World.cpp 프로젝트: Hywela/EnergyGame
//Update functions
void World::updateWorld() {
	//Check if player is dead
	b2Vec2 playerPos = playerBody->GetPosition();
	playerPos *= M2P;
	int circleRadius = 34;

	if (playerPos.x - circleRadius < DEATH_WALL_SPACE) {
		lost = true;
	}

	//If not game over
	if (!lost) {
		//Update platforms
		updatePlatforms();

		//Update charcter
		updateChar();

		//Clean old walls
		cleanWalls();

		//Clean old particles
		cleanParticles();
	}
}