player_input_init(&pplayer->input);
- pplayer->keymap.jump = SDLK_UP;
- pplayer->keymap.duck = SDLK_DOWN;
- pplayer->keymap.left = SDLK_LEFT;
+ pplayer->keymap.jump = SDLK_UP;
+ pplayer->keymap.duck = SDLK_DOWN;
+ pplayer->keymap.left = SDLK_LEFT;
pplayer->keymap.right = SDLK_RIGHT;
- pplayer->keymap.fire = SDLK_LCTRL;
+ pplayer->keymap.fire = SDLK_LCTRL;
timer_init(&pplayer->invincible_timer,true);
timer_init(&pplayer->skidding_timer,true);
pplayer->input.right = state;
return true;
}
- else if( key == pplayer->keymap.left)
+ else if(key == pplayer->keymap.left)
{
pplayer->input.left = state;
return true;
if (pplayer->dir == RIGHT)
{
texture_draw(&cape_right[frame % 2],
- pplayer->base.x- scroll_x, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x, pplayer->base.y);
}
else
{
texture_draw(&cape_left[frame % 2],
- pplayer->base.x- scroll_x, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x, pplayer->base.y);
}
}
{
if (pplayer->dir == RIGHT)
{
- texture_draw(&tux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE);
+ texture_draw(&tux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y);
}
else
{
- texture_draw(&tux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE);
+ texture_draw(&tux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y);
}
}
else
if (pplayer->dir == RIGHT)
{
- texture_draw(&firetux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE);
+ texture_draw(&firetux_right[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y);
}
else
{
- texture_draw(&firetux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y, NO_UPDATE);
+ texture_draw(&firetux_left[pplayer->frame], pplayer->base.x- scroll_x, pplayer->base.y);
}
}
}
if (pplayer->dir == RIGHT)
{
texture_draw(&bigcape_right[frame % 2],
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&bigcape_left[frame % 2],
- pplayer->base.x-scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x-scroll_x - 8, pplayer->base.y);
}
}
if (pplayer->dir == RIGHT)
{
texture_draw(&bigtux_right[pplayer->frame],
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&bigtux_left[pplayer->frame],
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
}
else
if (pplayer->dir == RIGHT)
{
texture_draw(&bigtux_right_jump,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&bigtux_left_jump,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
}
}
if (pplayer->dir == RIGHT)
{
texture_draw(&skidtux_right,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&skidtux_left,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
}
}
{
if (pplayer->dir == RIGHT)
{
- texture_draw(&ducktux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16,
- NO_UPDATE);
+ texture_draw(&ducktux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16);
}
else
{
- texture_draw(&ducktux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16,
- NO_UPDATE);
+ texture_draw(&ducktux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16);
}
}
}
if (pplayer->dir == RIGHT)
{
texture_draw(&bigfiretux_right[pplayer->frame],
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&bigfiretux_left[pplayer->frame],
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
}
else
if (pplayer->dir == RIGHT)
{
texture_draw(&bigfiretux_right_jump,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&bigfiretux_left_jump,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
}
}
if (pplayer->dir == RIGHT)
{
texture_draw(&skidfiretux_right,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
else
{
texture_draw(&skidfiretux_left,
- pplayer->base.x- scroll_x - 8, pplayer->base.y,
- NO_UPDATE);
+ pplayer->base.x- scroll_x - 8, pplayer->base.y);
}
}
}
{
if (pplayer->dir == RIGHT)
{
- texture_draw(&duckfiretux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16,
- NO_UPDATE);
+ texture_draw(&duckfiretux_right, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16);
}
else
{
- texture_draw(&duckfiretux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16,
- NO_UPDATE);
+ texture_draw(&duckfiretux_left, pplayer->base.x- scroll_x - 8, pplayer->base.y - 16);
}
}
}