From 01cd01a661f0b29a92a30ceffbcf77009f035306 Mon Sep 17 00:00:00 2001 From: aquileia Date: Sat, 31 Jan 2015 23:30:46 +0100 Subject: [PATCH] Use SOUND:HIT[_AND_MISS] for defend/attack macros While this could change the time other [sound_frame]s are played, well-written code shouldn't rely on the internal naming in macros. [skip ci] --- data/core/macros/animation-utils.cfg | 1 + data/core/macros/animation-utils2.cfg | 58 ++------------------------- 2 files changed, 5 insertions(+), 54 deletions(-) diff --git a/data/core/macros/animation-utils.cfg b/data/core/macros/animation-utils.cfg index d95418d2819..0c28dff0283 100644 --- a/data/core/macros/animation-utils.cfg +++ b/data/core/macros/animation-utils.cfg @@ -47,6 +47,7 @@ [frame] image={BASE_IMAGE}:1,{REACTION_IMAGE}:250,{BASE_IMAGE}:1 [/frame] + # Do not change to SOUND:HIT, this has to remain a hit_sound_frame [if] hit_sound_start_time=-25 hits=hit diff --git a/data/core/macros/animation-utils2.cfg b/data/core/macros/animation-utils2.cfg index b9f8923b884..59702ab507f 100644 --- a/data/core/macros/animation-utils2.cfg +++ b/data/core/macros/animation-utils2.cfg @@ -21,19 +21,7 @@ #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] + {SOUND:HIT_AND_MISS {HIT_SOUND} {MISS_SOUND} -100 } [if] direction=s,se,sw [frame] @@ -50,19 +38,7 @@ #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] + {SOUND:HIT_AND_MISS {HIT_SOUND} {MISS_SOUND} -100 } [if] direction=s,se,sw [frame] @@ -79,20 +55,7 @@ #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] - + {SOUND:HIT_AND_MISS {HIT_SOUND} {MISS_SOUND} -100 } [if] direction=se,sw [frame] @@ -121,20 +84,7 @@ #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] - + {SOUND:HIT_AND_MISS {HIT_SOUND} {MISS_SOUND} -100 } [if] direction=se,sw [frame]