X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=947d0ef0d4c1aec6d10836a1b4fc26b39e9932a7;hb=5d25c2fc3934b3d7e6b02465361569d3a0033bae;hp=bb214b604b24112384b946c6b3881cf6b5533d25;hpb=28fb756ecc84ec35423893a6e134d6b315fb0953;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index bb214b60..947d0ef0 100644 --- a/src/init.c +++ b/src/init.c @@ -548,6 +548,34 @@ void InitElementGraphicInfo() } } +#if 1 + /* now set all undefined/invalid graphics to -1 to set to default after it */ + for (i=0; i= 0 && special < NUM_SPECIAL_GFX_ARGS) element_info[element].special_graphic[special] = graphic; } + +#if 1 + /* now set all undefined/invalid graphics to default */ + for (i=0; i < MAX_NUM_ELEMENTS; i++) + for (j=0; j < NUM_SPECIAL_GFX_ARGS; j++) + if (graphic_info[element_info[i].special_graphic[j]].bitmap == NULL) + element_info[i].special_graphic[j] = + element_info[i].graphic[ACTION_DEFAULT]; +#endif } static int get_element_from_token(char *token) @@ -878,8 +915,9 @@ static void InitGraphicInfo() int src_x, src_y; int first_frame, last_frame; -#if 0 - printf("::: image: '%s'\n", image->token); +#if 1 + if (strcmp(image->token, "dynamite.EDITOR") == 0) + printf("::: image: '%s' [%d]\n", image->token, i); #endif #if 0 @@ -892,6 +930,11 @@ static void InitGraphicInfo() /* now check if no animation frames are outside of the loaded image */ +#if 1 + if (graphic_info[i].bitmap == NULL) + printf("::: graphic_info['%s'].bitmap == NULL\n", image->token); +#endif + if (graphic_info[i].bitmap == NULL) continue; /* skip check for optional images that are undefined */ @@ -1774,6 +1817,7 @@ void InitElementPropertiesStatic() EL_PLAYER_2, EL_PLAYER_3, EL_PLAYER_4, + EL_SP_MURPHY, -1 }; @@ -3497,6 +3541,7 @@ void OpenAll() InitEventFilter(FilterMouseMotionEvents); InitElementPropertiesStatic(); + InitElementPropertiesEngine(GAME_VERSION_ACTUAL); InitGfx();