X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=b0ed61da0998f84cb9ba1e7a6032fd0b3e71dfda;hb=50f0681cf3069e35f434c03825ad56bd80dabcbf;hp=18a5a2c16199f38dfe9521f9419fe330fb5ccddc;hpb=f1dd811c3716f706ab832dadf8ef52cf4bfd705d;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 18a5a2c1..b0ed61da 100644 --- a/src/init.c +++ b/src/init.c @@ -4734,6 +4734,12 @@ void Execute_Command(char *command) Error(ERR_EXIT, "image target directory '%s' not found or not writable", global.create_images_dir); } + else if (strPrefix(command, "create CE image ")) + { + CreateCustomElementImages(&command[16]); + + exit(0); + } #if DEBUG #if defined(TARGET_SDL2) @@ -5014,6 +5020,9 @@ void InitGfxBuffers() InitGfxScrollbufferInfo(FXSIZE, FYSIZE); InitGfxClipRegion(FALSE, -1, -1, -1, -1); + /* required if door size definitions have changed */ + InitGraphicCompatibilityInfo_Doors(); + InitGfxBuffers_EM(); InitGfxBuffers_SP(); } @@ -5066,6 +5075,7 @@ void InitGfx() InitGfxBuffers(); InitGfxCustomArtworkInfo(); + InitGfxOtherSettings(); bitmap_font_initial = LoadCustomImage(filename_font_initial); @@ -5149,7 +5159,7 @@ void InitGfx() init_last = init; } -void RedrawBackground() +void RedrawGlobalBorder() { BlitBitmap(graphic_info[IMG_GLOBAL_BORDER].bitmap, backbuffer, 0, 0, WIN_XSIZE, WIN_YSIZE, 0, 0); @@ -5566,7 +5576,7 @@ void ReloadCustomArtwork(int force_reload) FadeOut(REDRAW_ALL); - RedrawBackground(); + RedrawGlobalBorder(); /* force redraw of (open or closed) door graphics */ SetDoorState(DOOR_OPEN_ALL); @@ -5663,6 +5673,10 @@ void OpenAll() print_timestamp_time("[init global stuff]"); + InitSetup(); + + print_timestamp_time("[init setup/config stuff (1)]"); + if (options.execute_command) Execute_Command(options.execute_command); @@ -5677,10 +5691,6 @@ void OpenAll() exit(0); /* never reached, server loops forever */ } - InitSetup(); - - print_timestamp_time("[init setup/config stuff (1)]"); - InitGameInfo(); print_timestamp_time("[init setup/config stuff (2)]"); InitPlayerInfo();