X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=build-scripts%2Fcreate_element_defs.pl;fp=build-scripts%2Fcreate_element_defs.pl;h=b75d86ac79c6752c99a3068df90604f530f9a6c4;hp=84d9bc6c6ad14289d5d5476eb1a66b048e2f5a76;hb=2d3d2776f858d5b2132956373abd1ce5505c1501;hpb=5e5c2e74b27d6181ce05fe999dc66b1c201e9fc0;ds=sidebyside diff --git a/build-scripts/create_element_defs.pl b/build-scripts/create_element_defs.pl index 84d9bc6c..b75d86ac 100755 --- a/build-scripts/create_element_defs.pl +++ b/build-scripts/create_element_defs.pl @@ -500,6 +500,11 @@ sub print_sounds_list $sound =~ s/^/CLASS_/; # add class identifier } + # dirty hack for making "ABC[DEF]" work as a "special" suffix + $sound =~ s/([^_])\[/$1_/; + $sound =~ s/\[//; + $sound =~ s/\]//; + $sound = "SND_$sound"; my $define_text = "#define $sound"; @@ -558,6 +563,11 @@ sub print_music_list my $music = $_; + # dirty hack for making "ABC[DEF]" work as a "special" suffix + $music =~ s/([^_])\[/$1_/; + $music =~ s/\[//; + $music =~ s/\]//; + $music = "MUS_$music"; my $define_text = "#define $music";