void DrawGameDoorValues()
{
+ int i, j;
+
+ for (i=0; i<MAX_PLAYERS; i++)
+ for (j=0; j<4; j++)
+ if (stored_player[i].key[j])
+ DrawMiniGraphicExt(drawto, DX_KEYS + j * MINI_TILEX, DY_KEYS,
+ GFX_SCHLUESSEL1 + j);
+
DrawText(DX + XX_EMERALDS, DY + YY_EMERALDS,
int2str(local_player->gems_still_needed, 3), FS_SMALL, FC_YELLOW);
DrawText(DX + XX_DYNAMITE, DY + YY_DYNAMITE,
DX + XX_LEVEL - 1, DY + YY_LEVEL + 1);
}
-#if 1
DrawGameDoorValues();
-#else
- DrawText(DX + XX_EMERALDS, DY + YY_EMERALDS,
- int2str(local_player->gems_still_needed, 3), FS_SMALL, FC_YELLOW);
- DrawText(DX + XX_DYNAMITE, DY + YY_DYNAMITE,
- int2str(local_player->dynamite, 3), FS_SMALL, FC_YELLOW);
- DrawText(DX + XX_SCORE, DY + YY_SCORE,
- int2str(local_player->score, 5), FS_SMALL, FC_YELLOW);
- DrawText(DX + XX_TIME, DY + YY_TIME,
- int2str(TimeLeft, 3), FS_SMALL, FC_YELLOW);
-#endif
UnmapGameButtons();
UnmapTapeButtons();
PlaySoundExt(SND_GAME_LEVELTIME_BONUS, PSND_MAX_VOLUME, PSND_MAX_RIGHT,
PSND_LOOP);
- while(TimeLeft > 0)
+ while (TimeLeft > 0)
{
if (!tape.playing && !setup.sound_loops)
PlaySoundStereo(SND_GAME_LEVELTIME_BONUS, PSND_MAX_RIGHT);
PlaySoundExt(SND_GAME_LEVELTIME_BONUS, PSND_MAX_VOLUME, PSND_MAX_RIGHT,
PSND_LOOP);
- while(TimePlayed < 999)
+ while (TimePlayed < 999)
{
if (!tape.playing && !setup.sound_loops)
PlaySoundStereo(SND_GAME_LEVELTIME_BONUS, PSND_MAX_RIGHT);
for (i=0; i<MAX_PLAYERS; i++)
KillHero(&stored_player[i]);
}
- else if (level.time == 0) /* level without time limit */
+ else if (level.time == 0 && !AllPlayersGone) /* level without time limit */
DrawText(DX_TIME, DY_TIME, int2str(TimePlayed, 3), FS_SMALL, FC_YELLOW);
}
case EL_TRAP_INACTIVE:
case EL_SP_BASE:
case EL_SP_BUG:
- Feld[x][y] = EL_LEERRAUM;
+ RemoveField(x, y);
+
if (element == EL_LEERRAUM)
PlaySoundLevel(x, y, SND_EMPTY_SPACE_DIGGING);
else if (element == EL_ERDREICH)
/* forward declaration for internal use */
static void HandleTapeButtons(struct GadgetInfo *);
+static void TapeStopIndexSearch();
static struct GadgetInfo *tape_gadget[NUM_TAPE_BUTTONS];
if (tape.index_search)
{
- tape.index_search = FALSE;
-
- SetDrawDeactivationMask(REDRAW_NONE);
- audio.sound_deactivated = FALSE;
-
- RedrawPlayfield(TRUE, 0,0,0,0);
- DrawGameDoorValues();
+ TapeStopIndexSearch();
if (tape.quick_resume)
{
tape.playing = FALSE;
tape.pausing = FALSE;
+ if (tape.index_search)
+ TapeStopIndexSearch();
+
DrawVideoDisplay(VIDEO_STATE_PLAY_OFF, 0);
MapTapeEjectButton();
}
return(tape_length * GAME_FRAME_DELAY / 1000);
}
-void TapeIndexSearch()
+static void TapeStartIndexSearch()
{
tape.index_search = TRUE;
}
}
-void TapeSingleStep()
+static void TapeStopIndexSearch()
+{
+ tape.index_search = FALSE;
+
+ SetDrawDeactivationMask(REDRAW_NONE);
+ audio.sound_deactivated = FALSE;
+
+ RedrawPlayfield(TRUE, 0,0,0,0);
+ DrawGameDoorValues();
+}
+
+static void TapeSingleStep()
{
if (options.network)
return;
if (!TAPE_IS_EMPTY(tape))
{
TapeStartGamePlaying();
- TapeIndexSearch();
+ TapeStartIndexSearch();
tape.quick_resume = TRUE;
}
case TAPE_CTRL_ID_INDEX:
if (tape.playing)
- TapeIndexSearch();
+ TapeStartIndexSearch();
else if (tape.recording)
TapeSingleStep();
break;