some macsound instrument play refinements
Also some better core placement of some of the Hero_playnotes calls.
This commit is contained in:
@@ -67,9 +67,6 @@
|
|||||||
|
|
||||||
enum soundlib_ids {
|
enum soundlib_ids {
|
||||||
soundlib_nosound,
|
soundlib_nosound,
|
||||||
#ifdef SND_LIB_QTSOUND
|
|
||||||
soundlib_qtsound,
|
|
||||||
#endif
|
|
||||||
#ifdef SND_LIB_PORTAUDIO
|
#ifdef SND_LIB_PORTAUDIO
|
||||||
soundlib_portaudio,
|
soundlib_portaudio,
|
||||||
#endif
|
#endif
|
||||||
@@ -95,8 +92,12 @@ enum soundlib_ids {
|
|||||||
soundlib_windsound,
|
soundlib_windsound,
|
||||||
#endif
|
#endif
|
||||||
#ifdef SND_LIB_MACSOUND
|
#ifdef SND_LIB_MACSOUND
|
||||||
soundlib_macsound
|
soundlib_macsound,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SND_LIB_QTSOUND
|
||||||
|
soundlib_qtsound,
|
||||||
|
#endif
|
||||||
|
soundlib_notused
|
||||||
};
|
};
|
||||||
|
|
||||||
struct sound_procs {
|
struct sound_procs {
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ static void macsound_hero_playnotes(int32_t instrument,
|
|||||||
const char *str, int32_t vol UNUSED)
|
const char *str, int32_t vol UNUSED)
|
||||||
{
|
{
|
||||||
#ifdef WAVEMUSIC_SOUNDS
|
#ifdef WAVEMUSIC_SOUNDS
|
||||||
uint32_t pseudo_seid;
|
uint32_t pseudo_seid, pseudo_seid_base;
|
||||||
boolean has_note_variations = FALSE;
|
boolean has_note_variations = FALSE;
|
||||||
char resourcename[120], *end_of_res = 0;
|
char resourcename[120], *end_of_res = 0;
|
||||||
const char *c = 0;
|
const char *c = 0;
|
||||||
@@ -170,91 +170,88 @@ static void macsound_hero_playnotes(int32_t instrument,
|
|||||||
switch(instrument) {
|
switch(instrument) {
|
||||||
case ins_tinkle_bell:
|
case ins_tinkle_bell:
|
||||||
Strcpy(resourcename, "sound_Bell");
|
Strcpy(resourcename, "sound_Bell");
|
||||||
pseudo_seid = 0;
|
pseudo_seid_base = 0;
|
||||||
break;
|
break;
|
||||||
case ins_taiko_drum: /* DRUM_OF_EARTHQUAKE */
|
case ins_taiko_drum: /* DRUM_OF_EARTHQUAKE */
|
||||||
Strcpy(resourcename, "sound_Drum_Of_Earthquake");
|
Strcpy(resourcename, "sound_Drum_Of_Earthquake");
|
||||||
pseudo_seid = 1;
|
pseudo_seid_base = 1;
|
||||||
break;
|
break;
|
||||||
case ins_baritone_sax: /* FIRE_HORN */
|
case ins_baritone_sax: /* FIRE_HORN */
|
||||||
Strcpy(resourcename, "sound_Fire_Horn");
|
Strcpy(resourcename, "sound_Fire_Horn");
|
||||||
pseudo_seid = 2;
|
pseudo_seid_base = 2;
|
||||||
break;
|
break;
|
||||||
case ins_french_horn: /* FROST_HORN */
|
case ins_french_horn: /* FROST_HORN */
|
||||||
Strcpy(resourcename, "sound_Frost_Horn");
|
Strcpy(resourcename, "sound_Frost_Horn");
|
||||||
pseudo_seid = 3;
|
pseudo_seid_base = 3;
|
||||||
break;
|
break;
|
||||||
case ins_melodic_tom: /* LEATHER_DRUM */
|
case ins_melodic_tom: /* LEATHER_DRUM */
|
||||||
Strcpy(resourcename, "sound_Leather_Drum");
|
Strcpy(resourcename, "sound_Leather_Drum");
|
||||||
pseudo_seid = 4;
|
pseudo_seid_base = 4;
|
||||||
break;
|
break;
|
||||||
case ins_trumpet: /* BUGLE */
|
case ins_trumpet: /* BUGLE */
|
||||||
Strcpy(resourcename, "sound_Bugle");
|
Strcpy(resourcename, "sound_Bugle");
|
||||||
has_note_variations = TRUE;
|
has_note_variations = TRUE;
|
||||||
pseudo_seid = 5;
|
pseudo_seid_base = 5;
|
||||||
break;
|
break;
|
||||||
case ins_cello: /* MAGIC_HARP */
|
case ins_cello: /* MAGIC_HARP */
|
||||||
Strcpy(resourcename, "sound_Magic_Harp");
|
Strcpy(resourcename, "sound_Magic_Harp");
|
||||||
has_note_variations = TRUE;
|
has_note_variations = TRUE;
|
||||||
pseudo_seid = 12;
|
pseudo_seid_base = 12;
|
||||||
case ins_english_horn: /* TOOLED_HORN */
|
case ins_english_horn: /* TOOLED_HORN */
|
||||||
Strcpy(resourcename, "sound_Tooled_Horn");
|
Strcpy(resourcename, "sound_Tooled_Horn");
|
||||||
has_note_variations = TRUE;
|
has_note_variations = TRUE;
|
||||||
pseudo_seid = 19;
|
pseudo_seid_base = 19;
|
||||||
break;
|
break;
|
||||||
case ins_flute: /* WOODEN_FLUTE */
|
case ins_flute: /* WOODEN_FLUTE */
|
||||||
Strcpy(resourcename, "sound_Wooden_Flute");
|
Strcpy(resourcename, "sound_Wooden_Flute");
|
||||||
has_note_variations = TRUE;
|
has_note_variations = TRUE;
|
||||||
pseudo_seid = 26;
|
pseudo_seid_base = 26;
|
||||||
break;
|
break;
|
||||||
case ins_orchestral_harp: /* WOODEN_HARP */
|
case ins_orchestral_harp: /* WOODEN_HARP */
|
||||||
Strcpy(resourcename, "sound_Wooden_Harp");
|
Strcpy(resourcename, "sound_Wooden_Harp");
|
||||||
has_note_variations = TRUE;
|
has_note_variations = TRUE;
|
||||||
pseudo_seid = 33;
|
pseudo_seid_base = 33;
|
||||||
break;
|
break;
|
||||||
case ins_pan_flute: /* MAGIC_FLUTE */
|
case ins_pan_flute: /* MAGIC_FLUTE */
|
||||||
/* wav files for sound_Magic_Flute not added yet */
|
/* wav files for sound_Magic_Flute not added yet */
|
||||||
Strcpy(resourcename, "sound_Wooden_Flute");
|
Strcpy(resourcename, "sound_Wooden_Flute");
|
||||||
has_note_variations = TRUE;
|
has_note_variations = TRUE;
|
||||||
pseudo_seid = 26;
|
pseudo_seid_base = 26;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
pseudo_seid += number_of_se_entries; /* get past se_ entries */
|
pseudo_seid_base += number_of_se_entries; /* get past se_ entries */
|
||||||
|
|
||||||
if (has_note_variations) {
|
int i, idx = 0, notecount = strlen(str);
|
||||||
int i, idx = 0, notecount = strlen(str);
|
static const char *const note_suffixes[]
|
||||||
static const char *const note_suffixes[]
|
= { "_A", "_B", "_C", "_D", "_E", "_F", "_G" };
|
||||||
= { "_A", "_B", "_C", "_D", "_E", "_F", "_G" };
|
|
||||||
|
|
||||||
end_of_res = eos(resourcename);
|
end_of_res = eos(resourcename);
|
||||||
c = str;
|
c = str;
|
||||||
for (i = 0; i < notecount; ++i) {
|
for (i = 0; i < notecount; ++i) {
|
||||||
if (*c >= 'A' && *c <= 'G') {
|
if (*c >= 'A' && *c <= 'G') {
|
||||||
|
pseudo_seid = pseudo_seid_base;
|
||||||
|
if (has_note_variations) {
|
||||||
idx = (*c) - 'A';
|
idx = (*c) - 'A';
|
||||||
pseudo_seid += idx;
|
pseudo_seid += idx;
|
||||||
if (pseudo_seid >= SIZE(affiliation))
|
if (pseudo_seid >= SIZE(affiliation))
|
||||||
break;
|
break;
|
||||||
Strcpy(end_of_res, note_suffixes[idx]);
|
Strcpy(end_of_res, note_suffixes[idx]);
|
||||||
if (!affiliation[pseudo_seid]) {
|
}
|
||||||
affiliate(pseudo_seid, resourcename);
|
if (!affiliation[pseudo_seid]) {
|
||||||
}
|
affiliate(pseudo_seid, resourcename);
|
||||||
if (affiliation[pseudo_seid]) {
|
}
|
||||||
if ([seSound[pseudo_seid] isPlaying])
|
if (affiliation[pseudo_seid]) {
|
||||||
[seSound[pseudo_seid] stop];
|
if ([seSound[pseudo_seid] isPlaying])
|
||||||
[seSound[pseudo_seid] play];
|
[seSound[pseudo_seid] stop];
|
||||||
|
[seSound[pseudo_seid] play];
|
||||||
|
if (i < notecount - 1) {
|
||||||
|
/* more notes to follow */
|
||||||
|
msleep(150);
|
||||||
|
[seSound[pseudo_seid] stop];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c++;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!affiliation[pseudo_seid]) {
|
|
||||||
affiliate(pseudo_seid, resourcename);
|
|
||||||
}
|
|
||||||
if (affiliation[pseudo_seid]) {
|
|
||||||
if ([seSound[pseudo_seid] isPlaying])
|
|
||||||
[seSound[pseudo_seid] stop];
|
|
||||||
[seSound[pseudo_seid] play];
|
|
||||||
}
|
}
|
||||||
|
c++;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
25
src/music.c
25
src/music.c
@@ -574,19 +574,19 @@ do_improvisation(struct obj* instr)
|
|||||||
case MAGIC_FLUTE: /* Make monster fall asleep */
|
case MAGIC_FLUTE: /* Make monster fall asleep */
|
||||||
consume_obj_charge(instr, TRUE);
|
consume_obj_charge(instr, TRUE);
|
||||||
|
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
You("%sproduce %s music.", !Deaf ? "" : "seem to ",
|
You("%sproduce %s music.", !Deaf ? "" : "seem to ",
|
||||||
Hallucination ? "piped" : "soft");
|
Hallucination ? "piped" : "soft");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
put_monsters_to_sleep(u.ulevel * 5);
|
put_monsters_to_sleep(u.ulevel * 5);
|
||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
break;
|
break;
|
||||||
case WOODEN_FLUTE: /* May charm snakes */
|
case WOODEN_FLUTE: /* May charm snakes */
|
||||||
do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25);
|
do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25);
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
pline("%s.", Tobjnam(instr, do_spec ? "trill" : "toot"));
|
pline("%s.", Tobjnam(instr, do_spec ? "trill" : "toot"));
|
||||||
else
|
else
|
||||||
You_feel("%s %s.", yname(instr), do_spec ? "trill" : "toot");
|
You_feel("%s %s.", yname(instr), do_spec ? "trill" : "toot");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
if (do_spec)
|
if (do_spec)
|
||||||
charm_snakes(u.ulevel * 3);
|
charm_snakes(u.ulevel * 3);
|
||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
@@ -602,57 +602,57 @@ do_improvisation(struct obj* instr)
|
|||||||
if ((damage = zapyourself(instr, TRUE)) != 0) {
|
if ((damage = zapyourself(instr, TRUE)) != 0) {
|
||||||
char buf[BUFSZ];
|
char buf[BUFSZ];
|
||||||
|
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
Sprintf(buf, "using a magical horn on %sself", uhim());
|
Sprintf(buf, "using a magical horn on %sself", uhim());
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
losehp(damage, buf, KILLED_BY); /* fire or frost damage */
|
losehp(damage, buf, KILLED_BY); /* fire or frost damage */
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
int type = BZ_OFS_AD((instr->otyp == FROST_HORN) ? AD_COLD : AD_FIRE);
|
int type = BZ_OFS_AD((instr->otyp == FROST_HORN) ? AD_COLD : AD_FIRE);
|
||||||
|
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Blind)
|
if (!Blind)
|
||||||
pline("A %s blasts out of the horn!", flash_str(type, FALSE));
|
pline("A %s blasts out of the horn!", flash_str(type, FALSE));
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
ubuzz(BZ_U_WAND(type), rn1(6, 6));
|
ubuzz(BZ_U_WAND(type), rn1(6, 6));
|
||||||
}
|
}
|
||||||
makeknown(instr->otyp);
|
makeknown(instr->otyp);
|
||||||
break;
|
break;
|
||||||
case TOOLED_HORN: /* Awaken or scare monsters */
|
case TOOLED_HORN: /* Awaken or scare monsters */
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
You("produce a frightful, grave sound.");
|
You("produce a frightful, grave sound.");
|
||||||
else
|
else
|
||||||
You("blow into the horn.");
|
You("blow into the horn.");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
awaken_monsters(u.ulevel * 30);
|
awaken_monsters(u.ulevel * 30);
|
||||||
exercise(A_WIS, FALSE);
|
exercise(A_WIS, FALSE);
|
||||||
break;
|
break;
|
||||||
case BUGLE: /* Awaken & attract soldiers */
|
case BUGLE: /* Awaken & attract soldiers */
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
You("extract a loud noise from %s.", yname(instr));
|
You("extract a loud noise from %s.", yname(instr));
|
||||||
else
|
else
|
||||||
You("blow into the bugle.");
|
You("blow into the bugle.");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
awaken_soldiers(&gy.youmonst);
|
awaken_soldiers(&gy.youmonst);
|
||||||
exercise(A_WIS, FALSE);
|
exercise(A_WIS, FALSE);
|
||||||
break;
|
break;
|
||||||
case MAGIC_HARP: /* Charm monsters */
|
case MAGIC_HARP: /* Charm monsters */
|
||||||
consume_obj_charge(instr, TRUE);
|
consume_obj_charge(instr, TRUE);
|
||||||
|
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
pline("%s very attractive music.", Tobjnam(instr, "produce"));
|
pline("%s very attractive music.", Tobjnam(instr, "produce"));
|
||||||
else
|
else
|
||||||
You_feel("very soothing vibrations.");
|
You_feel("very soothing vibrations.");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
charm_monsters((u.ulevel - 1) / 3 + 1);
|
charm_monsters((u.ulevel - 1) / 3 + 1);
|
||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
break;
|
break;
|
||||||
case WOODEN_HARP: /* May calm Nymph */
|
case WOODEN_HARP: /* May calm Nymph */
|
||||||
do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25);
|
do_spec &= (rn2(ACURR(A_DEX)) + u.ulevel > 25);
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Deaf)
|
if (!Deaf)
|
||||||
pline("%s %s.", Yname2(instr),
|
pline("%s %s.", Yname2(instr),
|
||||||
do_spec ? "produces a lilting melody" : "twangs");
|
do_spec ? "produces a lilting melody" : "twangs");
|
||||||
else
|
else
|
||||||
You_feel("soothing vibrations.");
|
You_feel("soothing vibrations.");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
if (do_spec)
|
if (do_spec)
|
||||||
calm_nymphs(u.ulevel * 3);
|
calm_nymphs(u.ulevel * 3);
|
||||||
exercise(A_DEX, TRUE);
|
exercise(A_DEX, TRUE);
|
||||||
@@ -664,8 +664,8 @@ do_improvisation(struct obj* instr)
|
|||||||
mundane is flagged */
|
mundane is flagged */
|
||||||
consume_obj_charge(instr, TRUE);
|
consume_obj_charge(instr, TRUE);
|
||||||
|
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
You("produce a heavy, thunderous rolling!");
|
You("produce a heavy, thunderous rolling!");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
||||||
pline_The("entire %s is shaking around you!", generic_lvl_desc());
|
pline_The("entire %s is shaking around you!", generic_lvl_desc());
|
||||||
do_earthquake((u.ulevel - 1) / 3 + 1);
|
do_earthquake((u.ulevel - 1) / 3 + 1);
|
||||||
/* shake up monsters in a much larger radius... */
|
/* shake up monsters in a much larger radius... */
|
||||||
@@ -674,20 +674,21 @@ do_improvisation(struct obj* instr)
|
|||||||
break;
|
break;
|
||||||
case LEATHER_DRUM: /* Awaken monsters */
|
case LEATHER_DRUM: /* Awaken monsters */
|
||||||
if (!mundane) {
|
if (!mundane) {
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
if (!Deaf) {
|
if (!Deaf) {
|
||||||
You("beat a deafening row!");
|
You("beat a deafening row!");
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "CCC", 100);
|
||||||
incr_itimeout(&HDeaf, rn1(20, 30));
|
incr_itimeout(&HDeaf, rn1(20, 30));
|
||||||
} else {
|
} else {
|
||||||
You("pound on the drum.");
|
You("pound on the drum.");
|
||||||
}
|
}
|
||||||
exercise(A_WIS, FALSE);
|
exercise(A_WIS, FALSE);
|
||||||
} else
|
} else {
|
||||||
/* TODO maybe: sound effects for these riffs */
|
/* TODO maybe: sound effects for these riffs */
|
||||||
Hero_playnotes(obj_to_instr(&itmp), "C", 50);
|
|
||||||
You("%s %s.",
|
You("%s %s.",
|
||||||
rn2(2) ? "butcher" : rn2(2) ? "manage" : "pull off",
|
rn2(2) ? "butcher" : rn2(2) ? "manage" : "pull off",
|
||||||
an(beats[rn2(SIZE(beats))]));
|
an(beats[rn2(SIZE(beats))]));
|
||||||
|
Hero_playnotes(obj_to_instr(&itmp), "CCCCC", 50);
|
||||||
|
}
|
||||||
awaken_monsters(u.ulevel * (mundane ? 5 : 40));
|
awaken_monsters(u.ulevel * (mundane ? 5 : 40));
|
||||||
gc.context.botl = TRUE;
|
gc.context.botl = TRUE;
|
||||||
break;
|
break;
|
||||||
|
|||||||
12
src/sounds.c
12
src/sounds.c
@@ -1556,9 +1556,6 @@ release_sound_mappings(void)
|
|||||||
|
|
||||||
struct sound_procs soundprocs;
|
struct sound_procs soundprocs;
|
||||||
|
|
||||||
#ifdef SND_LIB_QTSOUND
|
|
||||||
extern struct sound_procs qtsound_procs;
|
|
||||||
#endif
|
|
||||||
#ifdef SND_LIB_PORTAUDIO
|
#ifdef SND_LIB_PORTAUDIO
|
||||||
extern struct sound_procs portaudio_procs;
|
extern struct sound_procs portaudio_procs;
|
||||||
#endif
|
#endif
|
||||||
@@ -1586,6 +1583,9 @@ extern struct sound_procs windsound_procs;
|
|||||||
#ifdef SND_LIB_MACSOUND
|
#ifdef SND_LIB_MACSOUND
|
||||||
extern struct sound_procs macsound_procs;
|
extern struct sound_procs macsound_procs;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SND_LIB_QTSOUND
|
||||||
|
extern struct sound_procs qtsound_procs;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct sound_procs nosound_procs = {
|
struct sound_procs nosound_procs = {
|
||||||
SOUNDID(nosound),
|
SOUNDID(nosound),
|
||||||
@@ -1605,9 +1605,6 @@ static struct sound_choices {
|
|||||||
struct sound_procs *sndprocs;
|
struct sound_procs *sndprocs;
|
||||||
} soundlib_choices[] = {
|
} soundlib_choices[] = {
|
||||||
{ &nosound_procs }, /* default, built-in */
|
{ &nosound_procs }, /* default, built-in */
|
||||||
#ifdef SND_LIB_QTSOUND
|
|
||||||
{ &qtsound_procs },
|
|
||||||
#endif
|
|
||||||
#ifdef SND_LIB_PORTAUDIO
|
#ifdef SND_LIB_PORTAUDIO
|
||||||
{ &portaudio_procs },
|
{ &portaudio_procs },
|
||||||
#endif
|
#endif
|
||||||
@@ -1635,6 +1632,9 @@ static struct sound_choices {
|
|||||||
#ifdef SND_LIB_MACSOUND
|
#ifdef SND_LIB_MACSOUND
|
||||||
{ &macsound_procs },
|
{ &macsound_procs },
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef SND_LIB_QTSOUND
|
||||||
|
{ &qtsound_procs },
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -170,12 +170,16 @@ ifeq "$(HAVE_SNDLIB)" "1"
|
|||||||
SNDCFLAGS+= -DUSER_SOUNDS
|
SNDCFLAGS+= -DUSER_SOUNDS
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CFLAGS+= $(PKGCFLAGS) $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
#WINCFLAGS set from multiw-2.370
|
||||||
CFLAGS+= $(SNDCFLAGS) #SNDCFLAGS set from multiw-2.370
|
#SNDCFLAGS set from multiw-2.370
|
||||||
|
CFLAGS+= $(PKGCFLAGS) $(WINCFLAGS)
|
||||||
|
CFLAGS+= $(SNDCFLAGS)
|
||||||
CFLAGS+= $(NHCFLAGS)
|
CFLAGS+= $(NHCFLAGS)
|
||||||
|
|
||||||
CCXXFLAGS+= $(WINCFLAGS) #WINCFLAGS set from multiw-2.370
|
#WINCFLAGS set from multiw-2.370
|
||||||
CCXXFLAGS+= $(SNDCFLAGS) #SNDCFLAGS set from multiw-2.370
|
#SNDCFLAGS set from multiw-2.370
|
||||||
|
CCXXFLAGS+= $(WINCFLAGS)
|
||||||
|
CCXXFLAGS+= $(SNDCFLAGS)
|
||||||
CCXXFLAGS+= $(NHCFLAGS)
|
CCXXFLAGS+= $(NHCFLAGS)
|
||||||
|
|
||||||
VARDATND =
|
VARDATND =
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ ATTRNORETURN static void opt_terminate(void) NORETURN;
|
|||||||
ATTRNORETURN static void opt_usage(const char *) NORETURN;
|
ATTRNORETURN static void opt_usage(const char *) NORETURN;
|
||||||
static void opt_showpaths(const char *);
|
static void opt_showpaths(const char *);
|
||||||
ATTRNORETURN static void scores_only(int, char **, const char *) NORETURN;
|
ATTRNORETURN static void scores_only(int, char **, const char *) NORETURN;
|
||||||
|
#ifdef SND_LIB_INTEGRATED
|
||||||
|
uint32_t soundlibchoice = soundlib_nosound;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _M_UNIX
|
#ifdef _M_UNIX
|
||||||
extern void check_sco_console(void);
|
extern void check_sco_console(void);
|
||||||
@@ -107,10 +110,12 @@ main(int argc, char *argv[])
|
|||||||
* We can leave a hint here for activate_chosen_soundlib later.
|
* We can leave a hint here for activate_chosen_soundlib later.
|
||||||
* assign_soundlib() just sets an indicator, it doesn't initialize
|
* assign_soundlib() just sets an indicator, it doesn't initialize
|
||||||
* any soundlib, and the indicator could be overturned before
|
* any soundlib, and the indicator could be overturned before
|
||||||
* activate_chosen_soundlib() gets called.
|
* activate_chosen_soundlib() gets called. Qt will place its own
|
||||||
|
* hint if qt_init_nhwindow() is invoked.
|
||||||
*/
|
*/
|
||||||
#if defined(SND_LIB_MACSOUND) && !defined(SND_LIB_QTSOUND)
|
#if defined(SND_LIB_MACSOUND)
|
||||||
assign_soundlib(soundlib_macsound);
|
soundlibchoice = soundlib_macsound;
|
||||||
|
assign_soundlib(soundlibchoice);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -209,8 +209,11 @@ void NetHackQtBind::qt_init_nhwindows(int *argc, char **argv)
|
|||||||
* should be loaded by activate_chosen_soundlib() shortly.
|
* should be loaded by activate_chosen_soundlib() shortly.
|
||||||
* gc.chosen_soundlib is initialized to soundlib_nosound.
|
* gc.chosen_soundlib is initialized to soundlib_nosound.
|
||||||
*/
|
*/
|
||||||
if (gc.chosen_soundlib == soundlib_nosound)
|
if (gc.chosen_soundlib == (uint32_t) soundlib_nosound) {
|
||||||
assign_soundlib(soundlib_qtsound);
|
uint32_t soundlibchoice = (uint32_t) soundlib_qtsound;
|
||||||
|
|
||||||
|
assign_soundlib(soundlibchoice);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user