This is what I find in my compile.log
InitSounds (English): created 62 entries.
InitSounds (common): total sounds - 191
InitMusic: created 42 entries.
InitGreetings: created 247 entries.
InitTalks: created 20 entries.
The Sound_GetName function searches through 900 possible entries. It should search a maximum of 458. This doesn't sound like much difference, but I've noticed better response in my game, and I wasn't even noticing lag before.
Look in the alias.c file near the bottom for the FindSounds, FindGreetings and FindTalks functions. In each there's a line that says something like
if (!CheckAttribute(Sounds_Alias, "id")) continue;
Change "continue" to "break" in all three cases. You can probably do FindMusic as well, but it shouldn't it shouldn't affect processing that much.
See if that doesn't help a lot.
Edit: I think I can figure out how to determine if a sound should use an alias or be played as is. If so, we can cut down the 458 entries searched and achieve close to the performance of what Captain Dan suggested.
Hook
InitSounds (English): created 62 entries.
InitSounds (common): total sounds - 191
InitMusic: created 42 entries.
InitGreetings: created 247 entries.
InitTalks: created 20 entries.
The Sound_GetName function searches through 900 possible entries. It should search a maximum of 458. This doesn't sound like much difference, but I've noticed better response in my game, and I wasn't even noticing lag before.
Look in the alias.c file near the bottom for the FindSounds, FindGreetings and FindTalks functions. In each there's a line that says something like
if (!CheckAttribute(Sounds_Alias, "id")) continue;
Change "continue" to "break" in all three cases. You can probably do FindMusic as well, but it shouldn't it shouldn't affect processing that much.
See if that doesn't help a lot.
Edit: I think I can figure out how to determine if a sound should use an alias or be played as is. If so, we can cut down the 458 entries searched and achieve close to the performance of what Captain Dan suggested.
Hook