static int getPlayerGraphic(struct PlayerInfo *player, int move_dir)
{
- if (player->use_murphy_graphic)
+ if (player->use_murphy)
{
/* this works only because currently only one player can be "murphy" ... */
static int last_horizontal_dir = MV_LEFT;
return graphic;
}
else
- return el_act_dir2img(player->element_nr, player->GfxAction, move_dir);
+ return el_act_dir2img(player->artwork_element, player->GfxAction,move_dir);
}
static boolean equalGraphics(int graphic1, int graphic2)
#endif
+int map_direction_RND_to_EM(int direction)
+{
+ return (direction == MV_UP ? 0 :
+ direction == MV_RIGHT ? 1 :
+ direction == MV_DOWN ? 2 :
+ direction == MV_LEFT ? 3 :
+ -1);
+}
+
+int map_direction_EM_to_RND(int direction)
+{
+ return (direction == 0 ? MV_UP :
+ direction == 1 ? MV_RIGHT :
+ direction == 2 ? MV_DOWN :
+ direction == 3 ? MV_LEFT :
+ MV_NONE);
+}
+
int get_next_element(int element)
{
switch(element)