#textdomain wesnoth
# Macros for setting animations.

# These don't rely on any other macros.   Please don't change this.

#define MAGIC_ARMRAISE_DIRECTIONAL_2_FRAME BASE_IMAGE_NAME
    # unlike the others, this one is used *inside* the attack/healing anim.
    [if]
        direction=s,se,sw
        [frame]
            image={BASE_IMAGE_NAME}-se-magic[1,2,1].png:100
        [/frame]
    [/if]
    [else]
        direction=n,ne,nw
        [frame]
            image={BASE_IMAGE_NAME}-ne-magic[1,2,1].png:100
        [/frame]
    [/else]
#enddef

#define ATTACK_ANIM_DIRECTIONAL_9_FRAME BASE_IMAGE_NAME TAIL_IMAGE_NAME HIT_SOUND MISS_SOUND
    start_time=-450
    sound_start_time=-100
    [if]
        hits=yes
        [sound_frame]
            sound={HIT_SOUND}
        [/sound_frame]
    [/if]
    [else]
        hits=no
        [sound_frame]
            sound={MISS_SOUND}
        [/sound_frame]
    [/else]
    [if]
        direction=s,se,sw
        [frame]
            image={BASE_IMAGE_NAME}-se-{TAIL_IMAGE_NAME}[1~9].png:100
        [/frame]
    [/if]
    [else]
        direction=n,ne,nw
        [frame]
            image={BASE_IMAGE_NAME}-ne-{TAIL_IMAGE_NAME}[1~9].png:100
        [/frame]
    [/else]
#enddef

#define ATTACK_ANIM_DIRECTIONAL_10_FRAME BASE_IMAGE_NAME TAIL_IMAGE_NAME HIT_SOUND MISS_SOUND
    start_time=-450
    sound_start_time=-100
    [if]
        hits=yes
        [sound_frame]
            sound={HIT_SOUND}
        [/sound_frame]
    [/if]
    [else]
        hits=no
        [sound_frame]
            sound={MISS_SOUND}
        [/sound_frame]
    [/else]
    [if]
        direction=s,se,sw
        [frame]
            image={BASE_IMAGE_NAME}-se-{TAIL_IMAGE_NAME}[1~10].png:100
        [/frame]
    [/if]
    [else]
        direction=n,ne,nw
        [frame]
            image={BASE_IMAGE_NAME}-ne-{TAIL_IMAGE_NAME}[1~10].png:100
        [/frame]
    [/else]
#enddef

#define ATTACK_ANIM_QUAD_DIRECTIONAL_10_FRAME BASE_IMAGE_NAME TAIL_IMAGE_NAME HIT_SOUND MISS_SOUND
    start_time=-500
    sound_start_time=-100
    [if]
        hits=yes
        [sound_frame]
            sound={HIT_SOUND}
        [/sound_frame]
    [/if]
    [else]
        hits=no
        [sound_frame]
            sound={MISS_SOUND}
        [/sound_frame]
    [/else]

    [if]
        direction=se,sw
        [frame]
            image={BASE_IMAGE_NAME}-se-{TAIL_IMAGE_NAME}[1~10].png:100
        [/frame]
    [/if]
    [else]
        direction=s
        [frame]
            image={BASE_IMAGE_NAME}-s-{TAIL_IMAGE_NAME}[1~10].png:100
        [/frame]
    [/else]
    [else]
        direction=n
        [frame]
            image={BASE_IMAGE_NAME}-n-{TAIL_IMAGE_NAME}[1~10].png:100
        [/frame]
    [/else]
    [else]
        direction=ne,nw
        [frame]
            image={BASE_IMAGE_NAME}-ne-{TAIL_IMAGE_NAME}[1~10].png:100
        [/frame]
    [/else]
#enddef

#define ATTACK_ANIM_QUAD_DIRECTIONAL_12_FRAME BASE_IMAGE_NAME TAIL_IMAGE_NAME HIT_SOUND MISS_SOUND
    start_time=-600
    sound_start_time=-100
    [if]
        hits=yes
        [sound_frame]
            sound={HIT_SOUND}
        [/sound_frame]
    [/if]
    [else]
        hits=no
        [sound_frame]
            sound={MISS_SOUND}
        [/sound_frame]
    [/else]

    [if]
        direction=se,sw
        [frame]
            image={BASE_IMAGE_NAME}-se-{TAIL_IMAGE_NAME}[1~12].png:100
        [/frame]
    [/if]
    [else]
        direction=s
        [frame]
            image={BASE_IMAGE_NAME}-s-{TAIL_IMAGE_NAME}[1~12].png:100
        [/frame]
    [/else]
    [else]
        direction=n
        [frame]
            image={BASE_IMAGE_NAME}-n-{TAIL_IMAGE_NAME}[1~12].png:100
        [/frame]
    [/else]
    [else]
        direction=ne,nw
        [frame]
            image={BASE_IMAGE_NAME}-ne-{TAIL_IMAGE_NAME}[1~12].png:100
        [/frame]
    [/else]
#enddef

#define DEATH_ANIM_DIRECTIONAL_4_FRAME BASE_IMAGE_NAME
    [death]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-die[1~4,3,4].png:100
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image={BASE_IMAGE_NAME}-ne-die[1~4,3,4].png:100
            [/frame]
        [/else]
    [/death]
#enddef

#define STANDING_ANIM_DIRECTIONAL_6_FRAME BASE_IMAGE_NAME
    [standing_anim]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-bob[1~6].png:200
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image={BASE_IMAGE_NAME}-ne-bob[1~6].png:200
            [/frame]
        [/else]
    [/standing_anim]
#enddef

#define STANDING_ANIM_DIRECTIONAL_8_FRAME BASE_IMAGE_NAME
    [standing_anim]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-bob[1~8].png:200
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image={BASE_IMAGE_NAME}-ne-bob[1~8].png:200
            [/frame]
        [/else]
    [/standing_anim]
#enddef

#define MOVING_ANIM_DIRECTIONAL_8_FRAME BASE_IMAGE_NAME
    [movement_anim]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-run[1~8].png:50
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image={BASE_IMAGE_NAME}-ne-run[1~8].png:50
            [/frame]
        [/else]
    [/movement_anim]
#enddef

#define MOVING_ANIM_SOUTH_9_FRAME BASE_IMAGE_NAME
    [movement_anim]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-run[1~9].png:67
            [/frame]
        [/if]
    [/movement_anim]
#enddef

#define MOVING_ANIM_DIRECTIONAL_10_FRAME BASE_IMAGE_NAME
    [movement_anim]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-run[1~10].png:50
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image={BASE_IMAGE_NAME}-ne-run[1~10].png:50
            [/frame]
        [/else]
    [/movement_anim]
#enddef

#define MOVING_ANIM_DIRECTIONAL_12_FRAME BASE_IMAGE_NAME
    [movement_anim]
        start_time=0
        [if]
            direction=s,se,sw
            [frame]
                image={BASE_IMAGE_NAME}-se-run[1~12].png:50
            [/frame]
        [/if]
        [else]
            direction=n,ne,nw
            [frame]
                image={BASE_IMAGE_NAME}-ne-run[1~12].png:50
            [/frame]
        [/else]
    [/movement_anim]
#enddef
