start to add some SOUND_TRIGGER_ACHIEVEMENTS code
Start to add supporting code to windsound and macsound. The latter remains commented out because I haven't had a chance to try it on macOS yet. In order to test it out, I added two more stock sounds: sa2_xplevelup and sa2_xpleveldown.
This commit is contained in:
@@ -626,8 +626,12 @@ init_sound_and_display_gamewindows(void)
|
||||
|
||||
activate_chosen_soundlib();
|
||||
|
||||
SoundAchievement(0, sa2_splashscreen, 0);
|
||||
/* ToDo: new splash screen invocation will go here */
|
||||
if (iflags.wc_splash_screen && !flags.randomall) {
|
||||
SoundAchievement(0, sa2_splashscreen, 0);
|
||||
/* ToDo: new splash screen invocation will go here */
|
||||
} else {
|
||||
SoundAchievement(0, sa2_newgame_nosplash, 0);
|
||||
}
|
||||
|
||||
WIN_MESSAGE = create_nhwindow(NHW_MESSAGE);
|
||||
if (VIA_WINDOWPORT()) {
|
||||
|
||||
@@ -227,6 +227,7 @@ losexp(
|
||||
/* remove intrinsic abilities */
|
||||
adjabil(u.ulevel + 1, u.ulevel);
|
||||
livelog_printf(LL_MINORAC, "lost experience level %d", u.ulevel + 1);
|
||||
SoundAchievement(0, sa2_xpleveldown, 0);
|
||||
} else {
|
||||
if (drainer) {
|
||||
gk.killer.format = KILLED_BY;
|
||||
@@ -344,7 +345,7 @@ pluslvl(
|
||||
if (u.ulevelmax < u.ulevel)
|
||||
u.ulevelmax = u.ulevel;
|
||||
adjabil(u.ulevel - 1, u.ulevel); /* give new intrinsics */
|
||||
|
||||
SoundAchievement(0, sa2_xplevelup, 0);
|
||||
old_ach_cnt = count_achievements();
|
||||
newrank = xlev_to_rank(u.ulevel);
|
||||
if (newrank > oldrank)
|
||||
|
||||
Reference in New Issue
Block a user