X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=bc9e6df3274a23f5a6b104b6b25f656c0c40dad4;hb=cd77f8c1eb3e792f1cd0c108ce49a03d762ebb96;hp=0875bf5d6bad99c94e5a245f7dd09b235f383f33;hpb=359536f46007d1b9148bed9c529056faa91b8aab;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index 0875bf5d..bc9e6df3 100644 --- a/src/tools.c +++ b/src/tools.c @@ -795,8 +795,22 @@ void SetDoorBackgroundImage(int graphic) void SetPanelBackground() { +#if 1 + struct GraphicInfo *gfx = &graphic_info[IMG_BACKGROUND_PANEL]; + +#if 1 + BlitBitmapTiled(gfx->bitmap, bitmap_db_panel, gfx->src_x, gfx->src_y, + gfx->width, gfx->height, 0, 0, DXSIZE, DYSIZE); +#else + /* (ClearRectangle() only needed if panel bitmap is smaller than panel) */ + ClearRectangle(bitmap_db_panel, DX, DY, DXSIZE, DYSIZE); + BlitBitmap(gfx->bitmap, bitmap_db_panel, gfx->src_x, gfx->src_y, + MIN(gfx->width, DXSIZE), MIN(gfx->height, DYSIZE), 0, 0); +#endif +#else BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, bitmap_db_panel, DOOR_GFX_PAGEX5, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, 0, 0); +#endif SetDoorBackgroundBitmap(bitmap_db_panel); } @@ -7473,7 +7487,7 @@ void getGraphicSourceObjectExt_EM(struct GraphicInfo_EM *g_em, #endif -#if 1 +#if 0 if (tile == Ydiamond_stone) printf("::: stone smashing diamond... %d: %d, %d, %d, %d, %d -> %d [%d, %d, %d, %d, %d, %d] [%d]\n", frame_em, @@ -8333,7 +8347,8 @@ void InitGraphicInfo_EM(void) } void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame, - boolean any_player_moving) + boolean any_player_moving, + boolean player_is_dropping) { int i; @@ -8345,17 +8360,31 @@ void CheckSingleStepMode_EM(byte action[MAX_PLAYERS], int frame, if (action[i] != JOY_NO_ACTION) active_players = TRUE; - if (frame == 0) + // if (frame == 0) + if (frame == 0 && !player_is_dropping) TapeTogglePause(TAPE_TOGGLE_AUTOMATIC); } } -void CheckSingleStepMode_SP(boolean murphy_is_moving) +void CheckSingleStepMode_SP(boolean murphy_is_waiting, + boolean murphy_is_dropping) { +#if 0 + printf("::: waiting: %d, dropping: %d\n", + murphy_is_waiting, murphy_is_dropping); +#endif + if (tape.single_step && tape.recording && !tape.pausing) { - if (!murphy_is_moving) + // if (murphy_is_waiting || murphy_is_dropping) + if (murphy_is_waiting) + { +#if 0 + printf("::: murphy is waiting -> pause mode\n"); +#endif + TapeTogglePause(TAPE_TOGGLE_AUTOMATIC); + } } }