X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=54a6436e3e7637622cc145134173158f945198fc;hb=7db0a9ae54a91806b66eb918f28309bb875e3b69;hp=db21b860d7917146073a284dc62f96d5433837b8;hpb=df964230e1ecbfec8ef120bfcab2ddb1ba0751fa;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index db21b860..54a6436e 100644 --- a/src/init.c +++ b/src/init.c @@ -26,6 +26,9 @@ #include "cartoons.h" #include "config.h" +#include "conf_e2g.c" /* include auto-generated data structure definitions */ + + static char *image_filename[NUM_PICTURES] = { "RocksScreen.pcx", @@ -556,8 +559,7 @@ void InitGadgets() void InitElementInfo() { - int i, j; - +#if 0 static struct { int element; @@ -919,13 +921,19 @@ void InitElementInfo() -1, -1 } }; +#endif + + int i, j, k; /* always start with reliable default values */ for(i=0; i -1) @@ -975,6 +984,33 @@ void InitElementInfo() element_info[element].has_direction_graphic[GFX_ACTION_DEFAULT] = TRUE; i++; } +#else + i = 0; + while (element_to_graphic[i].element > -1) + { + int element = element_to_graphic[i].element; + int direction = element_to_graphic[i].direction; + int action = element_to_graphic[i].action; + int graphic = element_to_graphic[i].graphic; + + if (action > -1) + action = graphics_action_mapping[action]; + else + action = GFX_ACTION_DEFAULT; + + if (direction > -1) + { + 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++; + } +#endif } static void InitGraphicInfo()