X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Finit.c;h=2bbc623807d772c1f57f755135ad58d79324445f;hp=3ab46d0f1b2b54e31265149df4209e1dcc6b3016;hb=56d8384fddc8e74f5327b28986f366927c3b2040;hpb=12a8fd3a64d6bee5ca5f5b89e4a00b49d78bbd2c diff --git a/src/init.c b/src/init.c index 3ab46d0f..2bbc6238 100644 --- a/src/init.c +++ b/src/init.c @@ -1297,12 +1297,15 @@ static void set_graphic_parameters_ext(int graphic, int *parameter, g->clone_from = -1; // do not use clone graphic g->init_delay_fixed = 0; g->init_delay_random = 0; + g->init_delay_action = -1; g->anim_delay_fixed = 0; g->anim_delay_random = 0; + g->anim_delay_action = -1; g->post_delay_fixed = 0; g->post_delay_random = 0; - g->init_event = ANIM_EVENT_DEFAULT; - g->anim_event = ANIM_EVENT_DEFAULT; + g->post_delay_action = -1; + g->init_event = ANIM_EVENT_UNDEFINED; + g->anim_event = ANIM_EVENT_UNDEFINED; g->init_event_action = -1; g->anim_event_action = -1; g->draw_masked = FALSE; @@ -1531,6 +1534,12 @@ static void set_graphic_parameters_ext(int graphic, int *parameter, g->init_event_action = parameter[GFX_ARG_INIT_EVENT_ACTION]; if (parameter[GFX_ARG_ANIM_EVENT_ACTION] != ARG_UNDEFINED_VALUE) g->anim_event_action = parameter[GFX_ARG_ANIM_EVENT_ACTION]; + if (parameter[GFX_ARG_INIT_DELAY_ACTION] != ARG_UNDEFINED_VALUE) + g->init_delay_action = parameter[GFX_ARG_INIT_DELAY_ACTION]; + if (parameter[GFX_ARG_ANIM_DELAY_ACTION] != ARG_UNDEFINED_VALUE) + g->anim_delay_action = parameter[GFX_ARG_ANIM_DELAY_ACTION]; + if (parameter[GFX_ARG_POST_DELAY_ACTION] != ARG_UNDEFINED_VALUE) + g->post_delay_action = parameter[GFX_ARG_POST_DELAY_ACTION]; // used for toon animations and global animations g->step_offset = parameter[GFX_ARG_STEP_OFFSET]; @@ -1723,6 +1732,8 @@ static void InitGraphicInfo(void) -1 }; + FreeGlobalAnimEventInfo(); + checked_free(graphic_info); graphic_info = checked_calloc(num_images * sizeof(struct GraphicInfo)); @@ -6061,6 +6072,8 @@ void OpenAll(void) InitNetworkSettings(); + InitRuntimeInfo(); + if (network.serveronly) { #if defined(PLATFORM_UNIX) @@ -6194,16 +6207,13 @@ void CloseAllAndExit(int exit_value) FreeAllImages(); -#if defined(TARGET_SDL) -#if defined(TARGET_SDL2) // !!! TODO !!! // set a flag to tell the network server thread to quit and wait for it // using SDL_WaitThread() -#else - if (network_server) // terminate network server - SDL_KillThread(server_thread); -#endif -#endif + // + // Code used with SDL 1.2: + // if (network_server) // terminate network server + // SDL_KillThread(server_thread); CloseVideoDisplay(); ClosePlatformDependentStuff();