X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=32b2cb8e3d6504c2f426e26ba65b554695b3c855;hb=cd9add1d9479d1938d05ca9df4f31c3f99bd5f3e;hp=54a6436e3e7637622cc145134173158f945198fc;hpb=7db0a9ae54a91806b66eb918f28309bb875e3b69;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index 54a6436e..32b2cb8e 100644 --- a/src/init.c +++ b/src/init.c @@ -923,25 +923,31 @@ void InitElementInfo() }; #endif - int i, j, k; + int i, act, dir; - /* always start with reliable default values */ + /* set values to -1 to identify later as "uninitialized" values */ for(i=0; i -1) { @@ -1003,13 +1011,52 @@ void InitElementInfo() direction = MV_DIR_BIT(direction); element_info[element].direction_graphic[action][direction] = graphic; - element_info[element].has_direction_graphic[action] = TRUE; } else element_info[element].graphic[action] = graphic; i++; } + + /* now set all '-1' values to element specific default values */ + for(i=0; i 1) + new_graphic_info[i].anim_mode = ANIM_LOOP; else - new_graphic_info[i].anim_mode = ANIM_NORMAL; + new_graphic_info[i].anim_mode = ANIM_NONE; - /* additionally, animation can be either pingpong or pingpong2 layout */ - if (parameter[GFX_ARG_PINGPONG]) - new_graphic_info[i].anim_mode |= ANIM_PINGPONG; - else if (parameter[GFX_ARG_PINGPONG2]) - new_graphic_info[i].anim_mode |= ANIM_PINGPONG2; + /* set additional flag to play animation frames in reverse order */ + if (parameter[GFX_ARG_MODE_REVERSE]) + new_graphic_info[i].anim_mode |= ANIM_REVERSE; /* animation synchronized with global frame counter, not move position */ new_graphic_info[i].anim_global_sync = parameter[GFX_ARG_GLOBAL_SYNC]; - - new_graphic_info[i].anim_vertical = parameter[GFX_ARG_VERTICAL]; } #if 0