Add marimba sounds for crystal hits
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -24,7 +24,7 @@ damMatSideEffect dm = \case
|
||||
Flesh -> damageFlesh dm
|
||||
Dirt -> damageDirt dm
|
||||
Glass -> damageGlass dm
|
||||
Crystal -> \ecw -> set _1 0 . defDamageMaterial dm ecw
|
||||
Crystal -> damageCrystal dm
|
||||
_ -> defDamageMaterial dm
|
||||
|
||||
defDamageMaterial :: Damage -> ECW -> World -> (Int,World)
|
||||
@@ -153,12 +153,12 @@ damageDirt dm _ w =
|
||||
|
||||
damageGlass :: Damage -> ECW -> World -> (Int,World)
|
||||
damageGlass dm ecw w = case dm of
|
||||
Lasering _ _ t -> f 0 $ id
|
||||
Lasering {} -> f 0 $ id
|
||||
Piercing _ p t ->
|
||||
f dmam $ makeSpark NormalSpark (outTo p t) (rdir p t)
|
||||
-- . makeDustAt Stone 200 (addZ 20 (outTo p t))
|
||||
. randsound p [smallGlass1S, smallGlass2S, smallGlass3S, smallGlass4S]
|
||||
Blunt _ p t -> f dmam $ -- makeDustAt Stone 200 (addZ 20 (outTo p t))
|
||||
Blunt _ p _ -> f dmam $ -- makeDustAt Stone 200 (addZ 20 (outTo p t))
|
||||
randsound p [smallGlass1S, smallGlass2S, smallGlass3S, smallGlass4S]
|
||||
Shattering _ p t -> f dmam $ makeDustAt Glass 200 (addZ 20 (outTo p t))
|
||||
. randsound p [smallGlass1S, smallGlass2S, smallGlass3S, smallGlass4S]
|
||||
@@ -216,3 +216,34 @@ damageGlass dm ecw w = case dm of
|
||||
-- outTo = p +.+ squashNormalizeV (sp -.- p)
|
||||
-- pSparkCol = V4 5 1 0.5 2
|
||||
-- lSparkCol = V4 20 (-5) 0 1
|
||||
|
||||
damageCrystal :: Damage -> ECW -> World -> (Int,World)
|
||||
damageCrystal dm ecw w = case dm of
|
||||
Lasering {} -> f $ id
|
||||
Piercing _ p t ->
|
||||
f $ makeSpark NormalSpark (outTo p t) (rdir p t)
|
||||
. randsound p [marimbaC5S,marimbaE5S,marimbaG5S,marimbaB6S]
|
||||
Blunt _ p _ -> f $ -- makeDustAt Stone 200 (addZ 20 (outTo p t))
|
||||
randsound p [marimbaC5S,marimbaE5S,marimbaG5S,marimbaB6S]
|
||||
Shattering _ p _ -> f $ randsound p [marimbaC5S,marimbaE5S,marimbaG5S,marimbaB6S]
|
||||
Crushing{} -> f id
|
||||
Explosive _ p -> f -- the sound comes from the explosion center, which is not correct...
|
||||
$ randsound p [smallGlass1S, smallGlass2S, smallGlass3S, smallGlass4S]
|
||||
Sparking{} -> f id
|
||||
Flaming{} -> f id
|
||||
Electrical{} -> f id
|
||||
Poison{} -> f id
|
||||
Enterrement{} -> f id
|
||||
Flashing{} -> f id
|
||||
where
|
||||
f g = (0, g w)
|
||||
rdir p t = argV $ reflectIn v t
|
||||
where
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> vNormal (p - cr ^. crPos . _xy)
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
so = DamageHitSound (w ^. cWorld . lWorld . lClock)
|
||||
outTo x t = x -.- squashNormalizeV t
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
-- generated at 2025-07-30 11:38:32.680040921 UTC
|
||||
-- generated at 2025-11-23 19:28:30.076047705 UTC
|
||||
module Dodge.SoundLogic.ExternallyGeneratedSounds where
|
||||
import Sound.Data
|
||||
soundToVol :: SoundID -> Float
|
||||
@@ -84,68 +84,72 @@ soundToVol v = case _getSoundID v of
|
||||
78 -> 100
|
||||
79 -> 300
|
||||
80 -> 300
|
||||
81 -> 100
|
||||
82 -> 2000
|
||||
83 -> 1000
|
||||
81 -> 200
|
||||
82 -> 100
|
||||
83 -> 2000
|
||||
84 -> 1000
|
||||
85 -> 1000
|
||||
86 -> 100
|
||||
86 -> 1000
|
||||
87 -> 100
|
||||
88 -> 1000
|
||||
88 -> 100
|
||||
89 -> 1000
|
||||
90 -> 40
|
||||
91 -> 50
|
||||
92 -> 1000
|
||||
93 -> 500
|
||||
94 -> 500
|
||||
95 -> 100
|
||||
96 -> 100
|
||||
97 -> 1000
|
||||
98 -> 20
|
||||
99 -> 500
|
||||
100 -> 300
|
||||
101 -> 200
|
||||
90 -> 1000
|
||||
91 -> 40
|
||||
92 -> 200
|
||||
93 -> 50
|
||||
94 -> 1000
|
||||
95 -> 500
|
||||
96 -> 500
|
||||
97 -> 100
|
||||
98 -> 100
|
||||
99 -> 200
|
||||
100 -> 1000
|
||||
101 -> 20
|
||||
102 -> 500
|
||||
103 -> 1000
|
||||
103 -> 300
|
||||
104 -> 200
|
||||
105 -> 1000
|
||||
106 -> 2000
|
||||
107 -> 500
|
||||
108 -> 200
|
||||
109 -> 100
|
||||
110 -> 1000
|
||||
111 -> 300
|
||||
112 -> 2000
|
||||
113 -> 2000
|
||||
114 -> 100
|
||||
115 -> 500
|
||||
105 -> 500
|
||||
106 -> 1000
|
||||
107 -> 200
|
||||
108 -> 1000
|
||||
109 -> 2000
|
||||
110 -> 500
|
||||
111 -> 200
|
||||
112 -> 200
|
||||
113 -> 100
|
||||
114 -> 1000
|
||||
115 -> 300
|
||||
116 -> 2000
|
||||
117 -> 500
|
||||
117 -> 2000
|
||||
118 -> 100
|
||||
119 -> 300
|
||||
120 -> 1000
|
||||
121 -> 50
|
||||
122 -> 200
|
||||
123 -> 100
|
||||
124 -> 200
|
||||
125 -> 1000
|
||||
126 -> 2000
|
||||
127 -> 200
|
||||
128 -> 1000
|
||||
129 -> 100
|
||||
130 -> 200
|
||||
131 -> 500
|
||||
132 -> 100
|
||||
133 -> 2000
|
||||
119 -> 500
|
||||
120 -> 2000
|
||||
121 -> 500
|
||||
122 -> 100
|
||||
123 -> 300
|
||||
124 -> 1000
|
||||
125 -> 50
|
||||
126 -> 200
|
||||
127 -> 100
|
||||
128 -> 200
|
||||
129 -> 1000
|
||||
130 -> 2000
|
||||
131 -> 200
|
||||
132 -> 1000
|
||||
133 -> 100
|
||||
134 -> 200
|
||||
135 -> 300
|
||||
136 -> 1000
|
||||
135 -> 500
|
||||
136 -> 100
|
||||
137 -> 2000
|
||||
138 -> 2000
|
||||
139 -> 250
|
||||
140 -> 200
|
||||
141 -> 100
|
||||
142 -> 200
|
||||
138 -> 200
|
||||
139 -> 300
|
||||
140 -> 1000
|
||||
141 -> 2000
|
||||
142 -> 2000
|
||||
143 -> 250
|
||||
144 -> 200
|
||||
145 -> 100
|
||||
146 -> 200
|
||||
_ -> 50
|
||||
soundToOnomato :: SoundID -> String
|
||||
soundToOnomato v = case _getSoundID v of
|
||||
@@ -230,68 +234,72 @@ soundToOnomato v = case _getSoundID v of
|
||||
78 -> "SKWLCH"
|
||||
79 -> "TNKTNKTNK"
|
||||
80 -> "CHPCHPCHP"
|
||||
81 -> "SLP"
|
||||
82 -> "SCREE"
|
||||
83 -> "DHDHL"
|
||||
84 -> "BRAP"
|
||||
85 -> "CRSK"
|
||||
86 -> "SPLRT"
|
||||
87 -> "SKWLL"
|
||||
88 -> "CRNKL"
|
||||
89 -> "TRNKL"
|
||||
90 -> "TAPP"
|
||||
91 -> "SHUHP"
|
||||
92 -> "CRUMBL"
|
||||
93 -> "DEDEDUM"
|
||||
94 -> "TAK"
|
||||
95 -> "SPLRT"
|
||||
96 -> "SQLEE"
|
||||
97 -> "CRISH"
|
||||
98 -> "SWSH"
|
||||
99 -> "BIPBIPBIP"
|
||||
100 -> "BEP"
|
||||
101 -> "CRSKRL"
|
||||
102 -> "KRTNKL"
|
||||
103 -> "CRSNK"
|
||||
104 -> "SHTCK"
|
||||
105 -> "TTRKL"
|
||||
106 -> "UGGAUGGA"
|
||||
107 -> "DUDURAH"
|
||||
108 -> "TING"
|
||||
109 -> "KKSQWL"
|
||||
110 -> "CRMPL"
|
||||
111 -> "BWEP"
|
||||
112 -> "CHUGUGUG"
|
||||
113 -> "BANG"
|
||||
114 -> "SLPP"
|
||||
115 -> "DEDA"
|
||||
116 -> "WHSSH"
|
||||
117 -> "CLANG"
|
||||
118 -> "HNH"
|
||||
119 -> "BWAH"
|
||||
120 -> "CRUNK"
|
||||
121 -> "FHFH"
|
||||
122 -> "SQWLTCH"
|
||||
123 -> "DRR"
|
||||
124 -> "WHH"
|
||||
125 -> "TRNKL"
|
||||
126 -> "BRAP"
|
||||
127 -> "WHR"
|
||||
128 -> "BLPCHCH"
|
||||
129 -> "SKLE"
|
||||
130 -> "ZMM"
|
||||
131 -> "WRRR"
|
||||
132 -> "FWUMP"
|
||||
133 -> "BRAHCHCH"
|
||||
134 -> "TING"
|
||||
135 -> "WHRR"
|
||||
136 -> "BWMP"
|
||||
137 -> "BRPBRPBRP"
|
||||
138 -> "WE-OH"
|
||||
139 -> "WHRHH"
|
||||
140 -> "THCK"
|
||||
141 -> "FHP"
|
||||
142 -> "QWLPH"
|
||||
81 -> "DING"
|
||||
82 -> "SLP"
|
||||
83 -> "SCREE"
|
||||
84 -> "DHDHL"
|
||||
85 -> "BRAP"
|
||||
86 -> "CRSK"
|
||||
87 -> "SPLRT"
|
||||
88 -> "SKWLL"
|
||||
89 -> "CRNKL"
|
||||
90 -> "TRNKL"
|
||||
91 -> "TAPP"
|
||||
92 -> "DING"
|
||||
93 -> "SHUHP"
|
||||
94 -> "CRUMBL"
|
||||
95 -> "DEDEDUM"
|
||||
96 -> "TAK"
|
||||
97 -> "SPLRT"
|
||||
98 -> "SQLEE"
|
||||
99 -> "DING"
|
||||
100 -> "CRISH"
|
||||
101 -> "SWSH"
|
||||
102 -> "BIPBIPBIP"
|
||||
103 -> "BEP"
|
||||
104 -> "CRSKRL"
|
||||
105 -> "KRTNKL"
|
||||
106 -> "CRSNK"
|
||||
107 -> "SHTCK"
|
||||
108 -> "TTRKL"
|
||||
109 -> "UGGAUGGA"
|
||||
110 -> "DUDURAH"
|
||||
111 -> "TING"
|
||||
112 -> "DING"
|
||||
113 -> "KKSQWL"
|
||||
114 -> "CRMPL"
|
||||
115 -> "BWEP"
|
||||
116 -> "CHUGUGUG"
|
||||
117 -> "BANG"
|
||||
118 -> "SLPP"
|
||||
119 -> "DEDA"
|
||||
120 -> "WHSSH"
|
||||
121 -> "CLANG"
|
||||
122 -> "HNH"
|
||||
123 -> "BWAH"
|
||||
124 -> "CRUNK"
|
||||
125 -> "FHFH"
|
||||
126 -> "SQWLTCH"
|
||||
127 -> "DRR"
|
||||
128 -> "WHH"
|
||||
129 -> "TRNKL"
|
||||
130 -> "BRAP"
|
||||
131 -> "WHR"
|
||||
132 -> "BLPCHCH"
|
||||
133 -> "SKLE"
|
||||
134 -> "ZMM"
|
||||
135 -> "WRRR"
|
||||
136 -> "FWUMP"
|
||||
137 -> "BRAHCHCH"
|
||||
138 -> "TING"
|
||||
139 -> "WHRR"
|
||||
140 -> "BWMP"
|
||||
141 -> "BRPBRPBRP"
|
||||
142 -> "WE-OH"
|
||||
143 -> "WHRHH"
|
||||
144 -> "THCK"
|
||||
145 -> "FHP"
|
||||
146 -> "QWLPH"
|
||||
_ -> error "unitialised sound"
|
||||
soundPathList :: [String]
|
||||
soundPathList =
|
||||
@@ -376,6 +384,7 @@ soundPathList =
|
||||
, "bloodShort8.SKWLCH.100.wav"
|
||||
, "reload.TNKTNKTNK.300.wav"
|
||||
, "reload1.CHPCHPCHP.300.wav"
|
||||
, "marimbaC5.DING.200.wav"
|
||||
, "slap.SLP.100.wav"
|
||||
, "tone440sawtooth.SCREE.2000.wav"
|
||||
, "metal3.DHDHL.1000.wav"
|
||||
@@ -386,12 +395,14 @@ soundPathList =
|
||||
, "glassShat2.CRNKL.1000.wav"
|
||||
, "metal1.TRNKL.1000.wav"
|
||||
, "foot3.TAPP.40.wav"
|
||||
, "marimbaG5.DING.200.wav"
|
||||
, "pickUp.SHUHP.50.wav"
|
||||
, "stone5.CRUMBL.1000.wav"
|
||||
, "dededum.DEDEDUM.500.wav"
|
||||
, "tap1.TAK.500.wav"
|
||||
, "blood1.SPLRT.100.wav"
|
||||
, "bloodShort7.SQLEE.100.wav"
|
||||
, "marimbaB6.DING.200.wav"
|
||||
, "metal4.CRISH.1000.wav"
|
||||
, "knife.SWSH.20.wav"
|
||||
, "computerBeeping.BIPBIPBIP.500.wav"
|
||||
@@ -404,6 +415,7 @@ soundPathList =
|
||||
, "seagullBarkTransformed.UGGAUGGA.2000.wav"
|
||||
, "eject.DUDURAH.500.wav"
|
||||
, "ting3.TING.200.wav"
|
||||
, "marimbaE5.DING.200.wav"
|
||||
, "blood3.KKSQWL.100.wav"
|
||||
, "stone2.CRMPL.1000.wav"
|
||||
, "tone440raise.BWEP.300.wav"
|
||||
@@ -601,127 +613,135 @@ reloadS :: SoundID
|
||||
reloadS = SoundID 79
|
||||
reload1S :: SoundID
|
||||
reload1S = SoundID 80
|
||||
marimbaC5S :: SoundID
|
||||
marimbaC5S = SoundID 81
|
||||
slapS :: SoundID
|
||||
slapS = SoundID 81
|
||||
slapS = SoundID 82
|
||||
tone440sawtoothS :: SoundID
|
||||
tone440sawtoothS = SoundID 82
|
||||
tone440sawtoothS = SoundID 83
|
||||
metal3S :: SoundID
|
||||
metal3S = SoundID 83
|
||||
metal3S = SoundID 84
|
||||
tap3S :: SoundID
|
||||
tap3S = SoundID 84
|
||||
tap3S = SoundID 85
|
||||
glassShat4S :: SoundID
|
||||
glassShat4S = SoundID 85
|
||||
glassShat4S = SoundID 86
|
||||
bloodShort1S :: SoundID
|
||||
bloodShort1S = SoundID 86
|
||||
bloodShort1S = SoundID 87
|
||||
bloodShort4S :: SoundID
|
||||
bloodShort4S = SoundID 87
|
||||
bloodShort4S = SoundID 88
|
||||
glassShat2S :: SoundID
|
||||
glassShat2S = SoundID 88
|
||||
glassShat2S = SoundID 89
|
||||
metal1S :: SoundID
|
||||
metal1S = SoundID 89
|
||||
metal1S = SoundID 90
|
||||
foot3S :: SoundID
|
||||
foot3S = SoundID 90
|
||||
foot3S = SoundID 91
|
||||
marimbaG5S :: SoundID
|
||||
marimbaG5S = SoundID 92
|
||||
pickUpS :: SoundID
|
||||
pickUpS = SoundID 91
|
||||
pickUpS = SoundID 93
|
||||
stone5S :: SoundID
|
||||
stone5S = SoundID 92
|
||||
stone5S = SoundID 94
|
||||
dededumS :: SoundID
|
||||
dededumS = SoundID 93
|
||||
dededumS = SoundID 95
|
||||
tap1S :: SoundID
|
||||
tap1S = SoundID 94
|
||||
tap1S = SoundID 96
|
||||
blood1S :: SoundID
|
||||
blood1S = SoundID 95
|
||||
blood1S = SoundID 97
|
||||
bloodShort7S :: SoundID
|
||||
bloodShort7S = SoundID 96
|
||||
bloodShort7S = SoundID 98
|
||||
marimbaB6S :: SoundID
|
||||
marimbaB6S = SoundID 99
|
||||
metal4S :: SoundID
|
||||
metal4S = SoundID 97
|
||||
metal4S = SoundID 100
|
||||
knifeS :: SoundID
|
||||
knifeS = SoundID 98
|
||||
knifeS = SoundID 101
|
||||
computerBeepingS :: SoundID
|
||||
computerBeepingS = SoundID 99
|
||||
computerBeepingS = SoundID 102
|
||||
tone440S :: SoundID
|
||||
tone440S = SoundID 100
|
||||
tone440S = SoundID 103
|
||||
gut6S :: SoundID
|
||||
gut6S = SoundID 101
|
||||
gut6S = SoundID 104
|
||||
smallGlass2S :: SoundID
|
||||
smallGlass2S = SoundID 102
|
||||
smallGlass2S = SoundID 105
|
||||
glassShat1S :: SoundID
|
||||
glassShat1S = SoundID 103
|
||||
glassShat1S = SoundID 106
|
||||
disconnectItemS :: SoundID
|
||||
disconnectItemS = SoundID 104
|
||||
disconnectItemS = SoundID 107
|
||||
metal5S :: SoundID
|
||||
metal5S = SoundID 105
|
||||
metal5S = SoundID 108
|
||||
seagullBarkTransformedS :: SoundID
|
||||
seagullBarkTransformedS = SoundID 106
|
||||
seagullBarkTransformedS = SoundID 109
|
||||
ejectS :: SoundID
|
||||
ejectS = SoundID 107
|
||||
ejectS = SoundID 110
|
||||
ting3S :: SoundID
|
||||
ting3S = SoundID 108
|
||||
ting3S = SoundID 111
|
||||
marimbaE5S :: SoundID
|
||||
marimbaE5S = SoundID 112
|
||||
blood3S :: SoundID
|
||||
blood3S = SoundID 109
|
||||
blood3S = SoundID 113
|
||||
stone2S :: SoundID
|
||||
stone2S = SoundID 110
|
||||
stone2S = SoundID 114
|
||||
tone440raiseS :: SoundID
|
||||
tone440raiseS = SoundID 111
|
||||
tone440raiseS = SoundID 115
|
||||
seagullChatter1S :: SoundID
|
||||
seagullChatter1S = SoundID 112
|
||||
seagullChatter1S = SoundID 116
|
||||
bangS :: SoundID
|
||||
bangS = SoundID 113
|
||||
bangS = SoundID 117
|
||||
slap1S :: SoundID
|
||||
slap1S = SoundID 114
|
||||
slap1S = SoundID 118
|
||||
dedaS :: SoundID
|
||||
dedaS = SoundID 115
|
||||
dedaS = SoundID 119
|
||||
missileLaunchS :: SoundID
|
||||
missileLaunchS = SoundID 116
|
||||
missileLaunchS = SoundID 120
|
||||
clang2S :: SoundID
|
||||
clang2S = SoundID 117
|
||||
clang2S = SoundID 121
|
||||
gruntS :: SoundID
|
||||
gruntS = SoundID 118
|
||||
gruntS = SoundID 122
|
||||
sineRaisePitchOneSecS :: SoundID
|
||||
sineRaisePitchOneSecS = SoundID 119
|
||||
sineRaisePitchOneSecS = SoundID 123
|
||||
metal2S :: SoundID
|
||||
metal2S = SoundID 120
|
||||
metal2S = SoundID 124
|
||||
debrisS :: SoundID
|
||||
debrisS = SoundID 121
|
||||
debrisS = SoundID 125
|
||||
gut5S :: SoundID
|
||||
gut5S = SoundID 122
|
||||
gut5S = SoundID 126
|
||||
slideDoorS :: SoundID
|
||||
slideDoorS = SoundID 123
|
||||
slideDoorS = SoundID 127
|
||||
whirdown2S :: SoundID
|
||||
whirdown2S = SoundID 124
|
||||
whirdown2S = SoundID 128
|
||||
metal6S :: SoundID
|
||||
metal6S = SoundID 125
|
||||
metal6S = SoundID 129
|
||||
autoGunS :: SoundID
|
||||
autoGunS = SoundID 126
|
||||
autoGunS = SoundID 130
|
||||
whirdownSmall1S :: SoundID
|
||||
whirdownSmall1S = SoundID 127
|
||||
whirdownSmall1S = SoundID 131
|
||||
oldMachineBootS :: SoundID
|
||||
oldMachineBootS = SoundID 128
|
||||
oldMachineBootS = SoundID 132
|
||||
blood6S :: SoundID
|
||||
blood6S = SoundID 129
|
||||
blood6S = SoundID 133
|
||||
buzzS :: SoundID
|
||||
buzzS = SoundID 130
|
||||
buzzS = SoundID 134
|
||||
fireLoudS :: SoundID
|
||||
fireLoudS = SoundID 131
|
||||
fireLoudS = SoundID 135
|
||||
tap4S :: SoundID
|
||||
tap4S = SoundID 132
|
||||
tap4S = SoundID 136
|
||||
shotgunS :: SoundID
|
||||
shotgunS = SoundID 133
|
||||
shotgunS = SoundID 137
|
||||
ting5S :: SoundID
|
||||
ting5S = SoundID 134
|
||||
ting5S = SoundID 138
|
||||
whirS :: SoundID
|
||||
whirS = SoundID 135
|
||||
whirS = SoundID 139
|
||||
sawtoothFailS :: SoundID
|
||||
sawtoothFailS = SoundID 136
|
||||
sawtoothFailS = SoundID 140
|
||||
miniS :: SoundID
|
||||
miniS = SoundID 137
|
||||
miniS = SoundID 141
|
||||
seagullWhistleS :: SoundID
|
||||
seagullWhistleS = SoundID 138
|
||||
seagullWhistleS = SoundID 142
|
||||
whirdownS :: SoundID
|
||||
whirdownS = SoundID 139
|
||||
whirdownS = SoundID 143
|
||||
connectItemS :: SoundID
|
||||
connectItemS = SoundID 140
|
||||
connectItemS = SoundID 144
|
||||
whiteNoiseFadeInS :: SoundID
|
||||
whiteNoiseFadeInS = SoundID 141
|
||||
whiteNoiseFadeInS = SoundID 145
|
||||
gut1S :: SoundID
|
||||
gut1S = SoundID 142
|
||||
gut1S = SoundID 146
|
||||
|
||||
Reference in New Issue
Block a user