global.fading_type = TYPE_ENTER_MENU;
#endif
- global.use_envelope_request = FALSE; /* !!! MOVE TO ARTWORK CONFIG !!! */
+ global.use_envelope_request = FALSE;
}
void Execute_Command(char *command)
}
#if DEBUG
-#if defined(TARGET_SDL)
-#if !defined(TARGET_SDL2)
+#if defined(TARGET_SDL2)
+ else if (strEqual(command, "SDL_ListModes"))
+ {
+ SDL_Init(SDL_INIT_VIDEO);
+
+ int num_displays = SDL_GetNumVideoDisplays();
+
+ // check if there are any displays available
+ if (num_displays < 0)
+ {
+ printf("No displays available: %s\n", SDL_GetError());
+
+ exit(-1);
+ }
+
+ for (i = 0; i < num_displays; i++)
+ {
+ int num_modes = SDL_GetNumDisplayModes(i);
+ int j;
+
+ printf("Available display modes for display %d:\n", i);
+
+ // check if there are any display modes available for this display
+ if (num_modes < 0)
+ {
+ printf("No display modes available for display %d: %s\n",
+ i, SDL_GetError());
+
+ exit(-1);
+ }
+
+ for (j = 0; j < num_modes; j++)
+ {
+ SDL_DisplayMode mode;
+
+ if (SDL_GetDisplayMode(i, j, &mode) < 0)
+ {
+ printf("Cannot get display mode %d for display %d: %s\n",
+ j, i, SDL_GetError());
+
+ exit(-1);
+ }
+
+ printf("- %d x %d\n", mode.w, mode.h);
+ }
+ }
+
+ exit(0);
+ }
+#elif defined(TARGET_SDL)
else if (strEqual(command, "SDL_ListModes"))
{
SDL_Rect **modes;
}
else
{
- printf("Available Modes:\n");
+ printf("Available display modes:\n");
- for(i = 0; modes[i]; i++)
- printf(" %d x %d\n", modes[i]->w, modes[i]->h);
+ for (i = 0; modes[i]; i++)
+ printf("- %d x %d\n", modes[i]->w, modes[i]->h);
}
exit(0);
}
#endif
-#endif
#endif
else
void InitGfxBuffers()
{
+ /* create additional image buffers for double-buffering and cross-fading */
ReCreateBitmap(&bitmap_db_store, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH);
ReCreateBitmap(&bitmap_db_cross, WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH);
ReCreateBitmap(&bitmap_db_field, FXSIZE, FYSIZE, DEFAULT_DEPTH);
bitmap_db_field);
InitGfxDoor1Info(DX, DY, DXSIZE, DYSIZE);
InitGfxDoor2Info(VX, VY, VXSIZE, VYSIZE);
+ InitGfxDoor3Info(EX, EY, EXSIZE, EYSIZE);
InitGfxWindowInfo(WIN_XSIZE, WIN_YSIZE);
InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
InitGfxClipRegion(FALSE, -1, -1, -1, -1);
if (filename_font_initial == NULL) /* should not happen */
Error(ERR_EXIT, "cannot get filename for '%s'", CONFIG_TOKEN_FONT_INITIAL);
-#if 1
InitGfxBuffers();
-#else
- /* create additional image buffers for double-buffering and cross-fading */
- bitmap_db_store = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH);
- bitmap_db_cross = CreateBitmap(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH);
- bitmap_db_field = CreateBitmap(FXSIZE, FYSIZE, DEFAULT_DEPTH);
- bitmap_db_panel = CreateBitmap(DXSIZE, DYSIZE, DEFAULT_DEPTH);
- bitmap_db_door = CreateBitmap(3 * DXSIZE, DYSIZE + VYSIZE, DEFAULT_DEPTH);
- bitmap_db_toons = CreateBitmap(FULL_SXSIZE, FULL_SYSIZE, DEFAULT_DEPTH);
-
- /* initialize screen properties */
- InitGfxFieldInfo(SX, SY, SXSIZE, SYSIZE,
- REAL_SX, REAL_SY, FULL_SXSIZE, FULL_SYSIZE,
- bitmap_db_field);
- InitGfxDoor1Info(DX, DY, DXSIZE, DYSIZE);
- InitGfxDoor2Info(VX, VY, VXSIZE, VYSIZE);
- InitGfxWindowInfo(WIN_XSIZE, WIN_YSIZE);
- InitGfxScrollbufferInfo(FXSIZE, FYSIZE);
-#endif
-
InitGfxCustomArtworkInfo();
bitmap_font_initial = LoadCustomImage(filename_font_initial);
font_height = getFontHeight(FC_RED);
#if 1
- DrawInitText(getWindowTitleString(), 20, FC_YELLOW);
+ DrawInitTextAlways(getWindowTitleString(), 20, FC_YELLOW);
#else
- DrawInitText(getProgramInitString(), 20, FC_YELLOW);
+ DrawInitTextAlways(getProgramInitString(), 20, FC_YELLOW);
#endif
- DrawInitText(PROGRAM_COPYRIGHT_STRING, 50, FC_RED);
- DrawInitText(PROGRAM_WEBSITE_STRING, WIN_YSIZE - 20 - font_height, FC_RED);
+ DrawInitTextAlways(PROGRAM_COPYRIGHT_STRING, 50, FC_RED);
+ DrawInitTextAlways(PROGRAM_WEBSITE_STRING, WIN_YSIZE - 20 - font_height,
+ FC_RED);
- DrawInitText("Loading graphics", 120, FC_GREEN);
+ DrawInitTextAlways("Loading graphics", 120, FC_GREEN);
#if 1
#if 1
#endif
print_timestamp_done("ReloadCustomArtwork");
+
+ LimitScreenUpdates(FALSE);
}
void KeyboardAutoRepeatOffUnlessAutoplay()