| 117 | } |
| 118 | |
| 119 | en_NPC_SOUND NPCS_SndTypeFromHash(U32 aid_snd, NPCSndTrax* cust, NPCSndTrax* share) |
| 120 | { |
| 121 | en_NPC_SOUND da_type = NPC_STYP_BOGUS; |
| 122 | NPCSndTrax* trax; |
| 123 | |
| 124 | for (S32 i = 0; i <= 3; i++) |
| 125 | { |
| 126 | if (i == 0) |
| 127 | { |
| 128 | trax = cust; |
| 129 | } |
| 130 | else if (i == 1) |
| 131 | { |
| 132 | trax = share; |
| 133 | } |
| 134 | else if (i == 2) |
| 135 | { |
| 136 | trax = g_sndTrax_General; |
| 137 | } |
| 138 | else |
| 139 | { |
| 140 | trax = g_sndTrax_Universal; |
| 141 | } |
| 142 | |
| 143 | if (trax != NULL) |
| 144 | { |
| 145 | for (; trax->typ_sound != NPC_STYP_LISTEND; trax = trax + 1) |
| 146 | { |
| 147 | if (trax->aid_sound == aid_snd) |
| 148 | { |
| 149 | da_type = trax->typ_sound; |
| 150 | |
| 151 | break; |
| 152 | } |
| 153 | } |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | return da_type; |
| 158 | } |
| 159 | |
| 160 | U32 NPCS_SndPickSimilar(en_NPC_SOUND sndtype, NPCSndTrax* cust, NPCSndTrax* share) |
| 161 | { |