}
}
+#if 1
+ InitGraphicCompatibilityInfo_Doors();
+#endif
+
+#if 0
+ struct
+ {
+ int graphic;
+ int *width, *height;
+ boolean right_wing;
+ }
+ doors[] =
+ {
+ { IMG_DOOR_1_WING_LEFT, &door_1.width, &door_1.height, FALSE },
+ { IMG_DOOR_1_WING_RIGHT, &door_1.width, &door_1.height, TRUE },
+ { IMG_DOOR_2_WING_LEFT, &door_2.width, &door_2.height, FALSE },
+ { IMG_DOOR_2_WING_RIGHT, &door_2.width, &door_2.height, TRUE },
+
+ { 0, NULL, NULL, FALSE }
+ };
+
+ for (i = 0; doors[i].graphic != 0; i++)
+ {
+ int graphic = doors[i].graphic;
+ int *width = doors[i].width;
+ int *height = doors[i].height;
+ boolean right_wing = doors[i].right_wing;
+
+ struct FileInfo *fi = getImageListEntryFromImageID(graphic);
+ struct GraphicInfo *g = &graphic_info[graphic];
+
+ if (!fi->redefined)
+ {
+ if (*width != -1)
+ {
+ // correct start position for right wing of "standard" door graphic
+ if (right_wing)
+ g->src_x += g->width - *width;
+
+ g->width = *width;
+ }
+
+ if (*height != -1)
+ g->height = *height;
+ }
+ }
+#endif
+
#if 0
for (i = 0; i < num_images; i++)
{
print_timestamp_time("InitGadgets");
InitToons();
print_timestamp_time("InitToons");
+ InitDoors();
+ print_timestamp_time("InitDoors");
print_timestamp_done("ReinitializeGraphics");
}
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)
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);