X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=inline;f=src%2Fmain.h;h=040412fda890087f1c5db67e8331263e2632be04;hb=e946a4f25cf18a083043d05beca2887ad16d7b53;hp=af8c540fbc2b6c52b2f50558abaddea2953fbe54;hpb=10bf4c7e6d0d2303a979c366227d71bef6e31131;p=rocksndiamonds.git diff --git a/src/main.h b/src/main.h index af8c540f..040412fd 100644 --- a/src/main.h +++ b/src/main.h @@ -172,6 +172,16 @@ #define PLAYER_NR_GFX(g,i) ((g) + i * (IMG_PLAYER2 - IMG_PLAYER1)) +#define ANIM_FRAMES(g) (graphic_info[g].anim_frames) +#define ANIM_DELAY(g) (graphic_info[g].anim_delay) +#define ANIM_MODE(g) (graphic_info[g].anim_mode) + +#define IS_ANIMATED(g) (ANIM_FRAMES(g) > 1) +#define IS_NEW_DELAY(f, g) ((f) % ANIM_DELAY(g) == 0) +#define IS_NEW_FRAME(f, g) (IS_ANIMATED(g) && IS_NEW_DELAY(f, g)) + +#define IS_LOOP_SOUND(s) (sound_info[s].loop) + #if 0 @@ -1034,6 +1044,7 @@ struct ElementInfo char *token_name; /* element token prefix used in config files */ char *sound_class_name; /* classification for custom sound effects */ char *editor_description; /* short description for level editor */ + char *custom_description; /* custom description for level editor */ int graphic[NUM_ACTIONS]; /* default graphics for several actions */ /* special graphics for left/right/up/down */ @@ -1116,7 +1127,8 @@ extern unsigned long Properties1[MAX_NUM_ELEMENTS]; extern unsigned long Properties2[MAX_NUM_ELEMENTS]; extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; -extern short GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +extern int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +extern int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern int lev_fieldx, lev_fieldy; extern int scroll_x, scroll_y;