X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmain.c;h=7cb246320a9febf64a608a66fe714d4d98065ac8;hb=ee0895b12e544444db37febb1242bcc8a72d6ad8;hp=09ff42d4b095e14bf96a0bf568d72ea0f09fbf4d;hpb=5df470717980e8b1e8648a536ca620e4ca52a170;p=rocksndiamonds.git diff --git a/src/main.c b/src/main.c index 09ff42d4..7cb24632 100644 --- a/src/main.c +++ b/src/main.c @@ -84,37 +84,8 @@ struct TapeInfo tape; struct SetupInfo setup; struct GameInfo game; struct GlobalInfo global; - - -/* this is used to reduce memory usage of the different animation types */ -int graphics_action_mapping[] = -{ - 0, /* GFX_ACTION_DEFAULT (0) */ - 0, /* GFX_ACTION_WAITING (1) */ - - 1, /* GFX_ACTION_FALLING (2) */ - 2, /* GFX_ACTION_MOVING (3) */ - 3, /* GFX_ACTION_DIGGING (4) */ - 4, /* GFX_ACTION_SNAPPING (5) */ - 5, /* GFX_ACTION_COLLECTING (6) */ - 6, /* GFX_ACTION_PUSHING (7) */ - - 7, /* GFX_ACTION_PASSING (8) */ - 7, /* GFX_ACTION_IMPACT (9) */ - 7, /* GFX_ACTION_CRACKING (10) */ - 7, /* GFX_ACTION_BREAKING (11) */ - 7, /* GFX_ACTION_ACTIVATING (12) */ - 7, /* GFX_ACTION_OPENING (13) */ - 7, /* GFX_ACTION_CLOSING (14) */ - 7, /* GFX_ACTION_EATING (15) */ - 7, /* GFX_ACTION_ATTACKING (16) */ - 7, /* GFX_ACTION_GROWING (17) */ - 7, /* GFX_ACTION_SHRINKING (18) */ - 7 /* GFX_ACTION_OTHER (19) */ -}; - -struct FileInfo *image_files; -struct FileInfo *sound_files; +struct FileInfo *image_files; +struct FileInfo *sound_files; struct ElementInfo element_info[MAX_NUM_ELEMENTS] = { @@ -2787,7 +2758,36 @@ struct ElementInfo element_info[MAX_NUM_ELEMENTS] = } }; -struct NewGraphicInfo graphic_info[NUM_IMAGE_FILES]; + +/* ------------------------------------------------------------------------- */ +/* sound definitions */ +/* ------------------------------------------------------------------------- */ + +struct SoundActionProperties sound_action_properties[] = +{ + /* insert _all_ loop sound actions here */ + { ".waiting", ACTION_WAITING, TRUE }, + { ".moving", ACTION_MOVING, TRUE }, /* continuos moving */ + { ".active", ACTION_ACTIVE, TRUE }, + { ".growing", ACTION_GROWING, TRUE }, + { ".attacking", ACTION_ATTACKING, TRUE }, + + /* other (non-loop) sound actions are optional */ +#if 0 + { ".stepping", ACTION_MOVING, FALSE }, /* discrete moving */ +#endif + { ".digging", ACTION_DIGGING, FALSE }, + { ".collecting", ACTION_COLLECTING, FALSE }, + { ".passing", ACTION_PASSING, FALSE }, + { ".impact", ACTION_IMPACT, FALSE }, + { ".pushing", ACTION_PUSHING, FALSE }, + { ".activating", ACTION_ACTIVATING, FALSE }, + { NULL, 0, 0 }, +}; + + +struct GraphicInfo graphic_info[NUM_IMAGE_FILES]; +struct SoundInfo sound_info[NUM_SOUND_FILES]; /* ========================================================================= */