sound cleanup
+ Separate the two uses of flags.soundok. + Player-settable option is now called "acoustics". + Deafness is now handled as a full-fledged attribute. + Check for deafness in You_hear(), rather than caller. + Check for deafness in caller, rather than verbalize(), because gods can speak to characters in spite of deafness. + Since changes are being made to prop.h, reorder it to the same order as youprop.h and enlightenment. There are still some extraneous checks and missing checks for deafness, which will be followed up in a future patch. Because of the size of this patch and its savefile incompatibilities, it is only being applied to the trunk code. Portions of this patch were written by Michael Allison.
This commit is contained in:
@@ -173,6 +173,8 @@ There VA_DECL(const char *,line)
|
||||
void
|
||||
You_hear VA_DECL(const char *,line)
|
||||
char *tmp;
|
||||
|
||||
if (Deaf || flags.acoustics) return;
|
||||
VA_START(line);
|
||||
VA_INIT(line, const char *);
|
||||
if (Underwater)
|
||||
@@ -185,11 +187,15 @@ You_hear VA_DECL(const char *,line)
|
||||
VA_END();
|
||||
}
|
||||
|
||||
/* Print a message inside double-quotes.
|
||||
* The caller is responsible for checking deafness.
|
||||
* Gods can speak directly to you in spite of deafness.
|
||||
*/
|
||||
/*VARARGS1*/
|
||||
void
|
||||
verbalize VA_DECL(const char *,line)
|
||||
char *tmp;
|
||||
if (!flags.soundok) return;
|
||||
|
||||
VA_START(line);
|
||||
VA_INIT(line, const char *);
|
||||
tmp = You_buf((int)strlen(line) + sizeof "\"\"");
|
||||
|
||||
Reference in New Issue
Block a user