*y = *y * tilesize / g->tile_size;
}
-void getFixedGraphicSourceExt(int graphic, int frame, Bitmap **bitmap,
- int *x, int *y, boolean get_backside)
-{
- getSizedGraphicSourceExt(graphic, frame, TILESIZE, bitmap, x, y,
- get_backside);
-}
-
void getSizedGraphicSource(int graphic, int frame, int tilesize,
Bitmap **bitmap, int *x, int *y)
{
return max_text_width / font_width;
}
-static void DrawPreviewLevelLabel(int mode)
+static void DrawPreviewLevelLabelExt(int mode, struct TextPosInfo *pos)
{
- struct TextPosInfo *pos = &menu.main.text.level_info_2;
char label_text[MAX_OUTPUT_LINESIZE + 1];
int max_len_label_text;
int font_nr = pos->font;
redraw_mask |= REDRAW_FIELD;
}
+static void DrawPreviewLevelLabel(int mode)
+{
+ DrawPreviewLevelLabelExt(mode, &menu.main.text.level_info_2);
+}
+
+static void DrawPreviewLevelInfo(int mode)
+{
+ if (mode == MICROLABEL_LEVEL_NAME)
+ DrawPreviewLevelLabelExt(mode, &menu.main.text.level_name);
+ else if (mode == MICROLABEL_LEVEL_AUTHOR)
+ DrawPreviewLevelLabelExt(mode, &menu.main.text.level_author);
+}
+
static void DrawPreviewLevelExt(boolean restart)
{
static unsigned int scroll_delay = 0;
DrawPreviewLevelPlayfield(from_x, from_y);
DrawPreviewLevelLabel(label_state);
+ DrawPreviewLevelInfo(MICROLABEL_LEVEL_NAME);
+ DrawPreviewLevelInfo(MICROLABEL_LEVEL_AUTHOR);
+
/* initialize delay counters */
DelayReached(&scroll_delay, 0);
DelayReached(&label_delay, 0);
while (still_wait)
{
- if (PendingEvent())
- {
- Event event;
-
- NextEvent(&event);
+ Event event;
+ if (NextValidEvent(&event))
+ {
switch (event.type)
{
case EVENT_BUTTONPRESS:
void PlayMenuMusic()
{
char *curr_music = getCurrentlyPlayingMusicFilename();
- char *next_music = getMusicListEntry(menu.music[game_status])->filename;
+ char *next_music = getMusicInfoEntryFilename(menu.music[game_status]);
if (!strEqual(curr_music, next_music))
PlayMenuMusicExt(menu.music[game_status]);
static void FadeMenuMusic()
{
char *curr_music = getCurrentlyPlayingMusicFilename();
- char *next_music = getMusicListEntry(menu.music[game_status])->filename;
+ char *next_music = getMusicInfoEntryFilename(menu.music[game_status]);
if (!strEqual(curr_music, next_music))
FadeMusic();