1 1 1 0 0
1 1 1 0 0
1 1 1 0 0
- 1 1 1 0 0
+ 1 1 1 0 1024
)
(image "tiles/snowcastle/foreground.png")
)
(tile
(id 2178)
+ (hurts #t)
(images
"tiles/snow/spike.png"))
float peek_to = 0;
float translation_compensation = player_pos.y - translation.y;
- if(player->peeking_direction() == ::UP) {
+ if(player->peeking_direction_y() == ::UP) {
peek_to = bottom_edge - translation_compensation;
- } else if(player->peeking_direction() == ::DOWN) {
+ } else if(player->peeking_direction_y() == ::DOWN) {
peek_to = top_edge - translation_compensation;
}
float peek_to = 0;
float translation_compensation = player_pos.x - translation.x;
- if(player->peeking_direction() == ::LEFT) {
+ if(player->peeking_direction_x() == ::LEFT) {
peek_to = right_edge - translation_compensation;
- } else if(player->peeking_direction() == ::RIGHT) {
+ } else if(player->peeking_direction_x() == ::RIGHT) {
peek_to = left_edge - translation_compensation;
}
dead = false;
dying = false;
- peeking = AUTO;
+ peekingX = AUTO;
+ peekingY = AUTO;
last_ground_y = 0;
fall_mode = ON_GROUND;
jumping = false;
/* Peeking */
if( controller->released( Controller::PEEK_LEFT ) ) {
- peeking = AUTO;
+ peekingX = AUTO;
}
if( controller->released( Controller::PEEK_RIGHT ) ) {
- peeking = AUTO;
+ peekingX = AUTO;
}
if( controller->released( Controller::PEEK_UP ) ) {
- peeking = AUTO;
+ peekingY = AUTO;
}
if( controller->released( Controller::PEEK_DOWN ) ) {
- peeking = AUTO;
+ peekingY = AUTO;
}
if( controller->pressed( Controller::PEEK_LEFT ) ) {
- peeking = LEFT;
+ peekingX = LEFT;
}
if( controller->pressed( Controller::PEEK_RIGHT ) ) {
- peeking = RIGHT;
+ peekingX = RIGHT;
}
if(!backflipping && !jumping && on_ground()) {
if( controller->pressed( Controller::PEEK_UP ) ) {
- peeking = UP;
+ peekingY = UP;
} else if( controller->pressed( Controller::PEEK_DOWN ) ) {
- peeking = DOWN;
+ peekingY = DOWN;
}
}
bool dying;
bool backflipping;
int backflip_direction;
- Direction peeking;
+ Direction peekingX, peekingY;
bool swimming;
float speedlimit;
Controller* scripting_controller_old; /**< Saves the old controller while the scripting_controller is used */
{
return dying;
}
- Direction peeking_direction() const
+ Direction peeking_direction_x() const
{
- return peeking;
+ return peekingX;
+ }
+
+ Direction peeking_direction_y() const
+ {
+ return peekingY;
}
void kill(bool completely);
{
case AUTO_VIDEO:
#ifdef HAVE_OPENGL
+ log_info << "new GL renderer\n";
return new GL::Renderer();
#else
+ log_warning << "new SDL renderer\n";
return new SDL::Renderer();
#endif
#ifdef HAVE_OPENGL
case OPENGL:
+ log_info << "new GL renderer\n";
return new GL::Renderer();
#endif
case PURE_SDL:
+ log_warning << "new SDL renderer\n";
return new SDL::Renderer();
default:
assert(0 && "invalid video system in config");
#ifdef HAVE_OPENGL
+ log_info << "new GL renderer\n";
return new GL::Renderer();
#else
+ log_warning << "new SDL renderer\n";
return new SDL::Renderer();
#endif
}