return font_nr;
}
+static int getFontFromToken(char *token)
+{
+ int i;
+
+ /* !!! OPTIMIZE THIS BY USING HASH !!! */
+ for (i = 0; i < NUM_FONTS; i++)
+ if (strEqual(token, font_info[i].token_name))
+ return i;
+
+ /* if font not found, use reliable default value */
+ return FONT_INITIAL_1;
+}
+
void InitFontGraphicInfo()
{
static struct FontBitmapInfo *font_bitmap_info = NULL;
if (graphic_info == NULL) /* still at startup phase */
{
- InitFontInfo(font_initial, NUM_INITIAL_FONTS, getFontBitmapID);
+ InitFontInfo(font_initial, NUM_INITIAL_FONTS,
+ getFontBitmapID, getFontFromToken);
return;
}
}
}
- InitFontInfo(font_bitmap_info, num_font_bitmaps, getFontBitmapID);
+ InitFontInfo(font_bitmap_info, num_font_bitmaps,
+ getFontBitmapID, getFontFromToken);
}
void InitElementGraphicInfo()
graphic_info[graphic].anim_delay_random = 0;
graphic_info[graphic].post_delay_fixed = 0;
graphic_info[graphic].post_delay_random = 0;
+ graphic_info[graphic].fade_mode = FADE_MODE_DEFAULT;
graphic_info[graphic].fade_delay = -1;
graphic_info[graphic].post_delay = -1;
graphic_info[graphic].auto_delay = -1;
if (parameter[GFX_ARG_CLONE_FROM] != ARG_UNDEFINED_VALUE)
graphic_info[graphic].clone_from = parameter[GFX_ARG_CLONE_FROM];
- /* optional settings for drawing title screens */
+ /* optional settings for drawing title screens and title messages */
+ if (parameter[GFX_ARG_FADE_MODE] != ARG_UNDEFINED_VALUE)
+ graphic_info[graphic].fade_mode = parameter[GFX_ARG_FADE_MODE];
if (parameter[GFX_ARG_FADE_DELAY] != ARG_UNDEFINED_VALUE)
graphic_info[graphic].fade_delay = parameter[GFX_ARG_FADE_DELAY];
if (parameter[GFX_ARG_POST_DELAY] != ARG_UNDEFINED_VALUE)
IMG_BACKGROUND,
IMG_BACKGROUND_TITLE_INITIAL,
IMG_BACKGROUND_TITLE,
- IMG_BACKGROUND_MESSAGE_INITIAL,
- IMG_BACKGROUND_MESSAGE,
IMG_BACKGROUND_MAIN,
IMG_BACKGROUND_LEVELS,
IMG_BACKGROUND_SCORES,
fieldbuffer = bitmap_db_field;
SetDrawtoField(DRAW_BACKBUFFER);
+#if 1
+ ClearRectangle(backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE);
+#else
RedrawBackground();
ClearRectangle(backbuffer, REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE);
ClearRectangle(bitmap_db_door, 0, 0, 3 * DXSIZE, DYSIZE + VYSIZE);
+#endif
for (x = 0; x < MAX_BUF_XSIZE; x++)
for (y = 0; y < MAX_BUF_YSIZE; y++)
/* force redraw of (open or closed) door graphics */
SetDoorState(DOOR_OPEN_ALL);
CloseDoor(DOOR_CLOSE_ALL | DOOR_NO_DELAY);
+
+#if 1
+#if 1
+ FadeSetEnterScreen();
+ // FadeSkipNextFadeOut();
+ // FadeSetDisabled();
+#else
+ FadeSkipNext();
+#endif
+#else
+ fading = fading_none;
+#endif
}
}
game_status = GAME_MODE_MAIN;
+#if 1
+ FadeSetEnterScreen();
+ if (!(fading.fade_mode & FADE_TYPE_TRANSFORM))
+ FadeSkipNextFadeOut();
+ // FadeSetDisabled();
+#else
+ fading = fading_none;
+#endif
+
DrawMainMenu();
InitNetworkServer();