X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=e630cd18f7654c51546de9d6de66d5f33fdac2b1;hb=a845e699402866bf6d228d028226554cbe142a83;hp=0f5aadabb7dea2dd196c219f0259068e9e94b8ed;hpb=ee749a764df3dfa944c1f9de740ccbeb1cfdef40;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 0f5aadab..e630cd18 100644 --- a/src/tools.c +++ b/src/tools.c @@ -85,6 +85,7 @@ void DumpTile(int x, int y) printf(" MovDir: %d\n", MovDir[x][y]); printf(" MovDelay: %d\n", MovDelay[x][y]); printf(" ChangeDelay: %d\n", ChangeDelay[x][y]); + printf(" CustomValue: %d\n", CustomValue[x][y]); printf(" GfxElement: %d\n", GfxElement[x][y]); printf(" GfxAction: %d\n", GfxAction[x][y]); printf(" GfxFrame: %d\n", GfxFrame[x][y]); @@ -1880,6 +1881,10 @@ void DrawPlayer(struct PlayerInfo *player) { GfxElement[jx][jy] = EL_UNDEFINED; + /* make sure that pushed elements are drawn with correct frame rate */ + if (player->is_pushing && player->is_moving) + GfxFrame[jx][jy] = player->StepFrame; + DrawLevelField(jx, jy); } } @@ -1929,6 +1934,7 @@ void DrawPlayer(struct PlayerInfo *player) player->is_moving, player_is_moving); #endif +#if 1 if (player->is_pushing && player->is_moving) { int px = SCREENX(jx), py = SCREENY(jy); @@ -1951,6 +1957,7 @@ void DrawPlayer(struct PlayerInfo *player) /* masked drawing is needed for EMC style (double) movement graphics */ DrawGraphicShiftedThruMask(px, py, pxx, pyy, graphic, frame, NO_CUTTING); } +#endif /* ----------------------------------------------------------------------- */ /* draw things in front of player (active dynamite or dynabombs) */ @@ -5379,7 +5386,7 @@ int el_act_dir2img(int element, int action, int direction) { element = GFX_ELEMENT(element); - if (direction == MV_NO_MOVING) + if (direction == MV_NONE) return element_info[element].graphic[action]; direction = MV_DIR_BIT(direction); @@ -5390,7 +5397,7 @@ int el_act_dir2img(int element, int action, int direction) int el_act_dir2img(int element, int action, int direction) { element = GFX_ELEMENT(element); - direction = MV_DIR_BIT(direction); /* default: MV_NO_MOVING => MV_DOWN */ + direction = MV_DIR_BIT(direction); /* default: MV_NONE => MV_DOWN */ /* direction_graphic[][] == graphic[] for undefined direction graphics */ return element_info[element].direction_graphic[action][direction]; @@ -5402,7 +5409,7 @@ static int el_act_dir2crm(int element, int action, int direction) { element = GFX_ELEMENT(element); - if (direction == MV_NO_MOVING) + if (direction == MV_NONE) return element_info[element].crumbled[action]; direction = MV_DIR_BIT(direction); @@ -5413,7 +5420,7 @@ static int el_act_dir2crm(int element, int action, int direction) static int el_act_dir2crm(int element, int action, int direction) { element = GFX_ELEMENT(element); - direction = MV_DIR_BIT(direction); /* default: MV_NO_MOVING => MV_DOWN */ + direction = MV_DIR_BIT(direction); /* default: MV_NONE => MV_DOWN */ /* direction_graphic[][] == graphic[] for undefined direction graphics */ return element_info[element].direction_crumbled[action][direction]; @@ -5467,6 +5474,11 @@ int el2preimg(int element) return element_info[element].special_graphic[GFX_SPECIAL_ARG_PREVIEW]; } +int font2baseimg(int font_nr) +{ + return font_info[font_nr].special_graphic[GFX_SPECIAL_ARG_DEFAULT]; +} + int getGameFrameDelay_EM(int native_em_game_frame_delay) { int game_frame_delay_value; @@ -5513,7 +5525,7 @@ void InitGraphicInfo_EM(void) object_mapping[i].element_rnd = EL_UNKNOWN; object_mapping[i].is_backside = FALSE; object_mapping[i].action = ACTION_DEFAULT; - object_mapping[i].direction = MV_NO_MOVING; + object_mapping[i].direction = MV_NONE; } /* always start with reliable default values */ @@ -5523,7 +5535,7 @@ void InitGraphicInfo_EM(void) { player_mapping[p][i].element_rnd = EL_UNKNOWN; player_mapping[p][i].action = ACTION_DEFAULT; - player_mapping[p][i].direction = MV_NO_MOVING; + player_mapping[p][i].direction = MV_NONE; } } @@ -5973,7 +5985,7 @@ void InitGraphicInfo_EM(void) { int effective_element = element; int effective_action = action; - int graphic = (direction == MV_NO_MOVING ? + int graphic = (direction == MV_NONE ? el_act2img(effective_element, effective_action) : el_act_dir2img(effective_element, effective_action, direction));