+ DrawLevelField(x, y);
+ }
+ }
+ }
+}
+
+static void InitBeltMovement()
+{
+ static int belt_base_element[4] =
+ {
+ EL_CONVEYOR_BELT1_LEFT,
+ EL_CONVEYOR_BELT2_LEFT,
+ EL_CONVEYOR_BELT3_LEFT,
+ EL_CONVEYOR_BELT4_LEFT
+ };
+ static int belt_base_active_element[4] =
+ {
+ EL_CONVEYOR_BELT1_LEFT_ACTIVE,
+ EL_CONVEYOR_BELT2_LEFT_ACTIVE,
+ EL_CONVEYOR_BELT3_LEFT_ACTIVE,
+ EL_CONVEYOR_BELT4_LEFT_ACTIVE
+ };
+
+ int x, y, i, j;
+
+ /* set frame order for belt animation graphic according to belt direction */
+ for (i=0; i<4; i++)
+ {
+ int belt_nr = i;
+
+ for (j=0; j<3; j++)
+ {
+ int element = belt_base_active_element[belt_nr] + j;
+ int graphic = el2img(element);
+
+ if (game.belt_dir[i] == MV_LEFT)
+ new_graphic_info[graphic].anim_mode &= ~ANIM_REVERSE;
+ else
+ new_graphic_info[graphic].anim_mode |= ANIM_REVERSE;
+ }
+ }
+
+ for(y=0; y<lev_fieldy; y++)
+ {
+ for(x=0; x<lev_fieldx; x++)
+ {
+ int element = Feld[x][y];
+
+ for (i=0; i<4; i++)
+ {
+ if (IS_BELT(element) && game.belt_dir[i] != MV_NO_MOVING)
+ {
+ int e_belt_nr = getBeltNrFromBeltElement(element);
+ int belt_nr = i;
+
+ if (e_belt_nr == belt_nr)
+ {
+ int belt_part = Feld[x][y] - belt_base_element[belt_nr];
+
+ Feld[x][y] = belt_base_active_element[belt_nr] + belt_part;
+ }
+ }