X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftools.c;h=068afdef8b6fa22003b984360fc6213366455718;hb=74c0f7de91268e40d15948f473eac51a9760b9c0;hp=0244e944d3d0f0d9644ef82a989ecd8b4be8cd14;hpb=7373e992fb880976e1dc7c559bcd7a19b8bcfe80;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 0244e944..068afdef 100644 --- a/src/tools.c +++ b/src/tools.c @@ -91,8 +91,8 @@ void RedrawPlayfield(boolean force_redraw, int x, int y, int width, int height) if (setup.direct_draw) SetDrawtoField(DRAW_BACKBUFFER); - for(xx=BX1; xx<=BX2; xx++) - for(yy=BY1; yy<=BY2; yy++) + for (xx = BX1; xx <= BX2; xx++) + for (yy = BY1; yy <= BY2; yy++) if (xx >= x1 && xx <= x2 && yy >= y1 && yy <= y2) DrawScreenField(xx, yy); DrawAllPlayers(); @@ -263,8 +263,8 @@ void BackToFront() if (redraw_mask & REDRAW_TILES) { - for(x=0; xanim_delay_counter == 0 && player->post_delay_counter == 0) { + int last_special_action = player->special_action_sleeping; + int num_special_action = player->num_special_action_sleeping; int special_action = - ACTION_BORING_1 + SimpleRND(player->num_special_action_sleeping); + (last_special_action == ACTION_DEFAULT ? ACTION_SLEEPING_1 : + last_special_action == ACTION_SLEEPING ? ACTION_SLEEPING : + last_special_action < ACTION_SLEEPING_1 + num_special_action - 1 ? + last_special_action + 1 : ACTION_SLEEPING); int special_graphic = el_act_dir2img(player->element_nr, special_action, move_dir); @@ -649,7 +654,7 @@ void DrawAllPlayers() { int i; - for(i=0; istored_clip_gc; @@ -2780,7 +2785,7 @@ void CreateToolButtons() { int i; - for (i=0; i