diff options
-rw-r--r-- | lib/xtra/sound/Sound.cfg | 79 | ||||
-rw-r--r-- | lib/xtra/sound/readme.txt | 33 | ||||
-rw-r--r-- | src/angband.rc | 1 | ||||
-rw-r--r-- | src/config.h | 5 | ||||
-rw-r--r-- | src/defines.h | 5 | ||||
-rw-r--r-- | src/externs.h | 2 | ||||
-rw-r--r-- | src/main-sdl.c | 15 | ||||
-rw-r--r-- | src/main-win.c | 164 | ||||
-rw-r--r-- | src/main-xxx.c | 15 | ||||
-rw-r--r-- | src/main.c | 8 | ||||
-rw-r--r-- | src/util.cc | 7 | ||||
-rw-r--r-- | src/variable.cc | 2 | ||||
-rw-r--r-- | src/z-term.h | 2 |
13 files changed, 3 insertions, 335 deletions
diff --git a/lib/xtra/sound/Sound.cfg b/lib/xtra/sound/Sound.cfg deleted file mode 100644 index eb3a7f39..00000000 --- a/lib/xtra/sound/Sound.cfg +++ /dev/null @@ -1,79 +0,0 @@ -# sound.cfg -# -# Configuration file for the Angband sound events -# -# The format is: -# name of the Angband event = list of the available sample-names seperated by spaces. -# -# Example: -# hit = hit.wav hit1.wav -# -# Look at the definition of "angband_sound_name" in variable.c for a complete list of -# all the available event names. - -[Sound] -hit = hit.wav drop.wav hit1.wav -miss = miss.wav miss1.wav -flee = flee.wav -drop = clunk.wav -kill = kill.wav destroy.wav kill1.wav -level = level.wav -death = death.wav -study = -teleport = -shoot = -quaff = -zap = -walk = -tpother = -hitwall = -eat = eat.wav -store1 = money.wav -store2 = money.wav -store3 = money.wav -store4 = money.wav -dig = thump.wav -opendoor = opendoor.wav -shutdoor = shutdoor.wav -tplevel = teleport.wav -scroll = -buy = -sell = -warn = -rocket = -n_kill = -u_kill = -quest = -heal = -x_heal = -bite = -claw = -m_spell = -summon = -breath = -ball = -m_heal = -atkspell = -evil = -touch = -sting = -crush = -slime = -wail = -winner = -fire = -acid = -elec = -cold = -illegal = -fail = -wakeup = -invuln = -fall = -pain = -destitem = -moan = -show = -unused = -explode = - diff --git a/lib/xtra/sound/readme.txt b/lib/xtra/sound/readme.txt deleted file mode 100644 index 49bb86a1..00000000 --- a/lib/xtra/sound/readme.txt +++ /dev/null @@ -1,33 +0,0 @@ -New Sound Effect For Angband 2.8.1 Windows 95 (beta release) - -Changes since Alpha release: - -Altered sounds: breath.wav - death.wav - flee.wav - hit.wav - kill.wav - - -New sounds: None (no new events yet) - - -Useage: - -Unzip files into your angband 2.8.1 sounds directory EG: - -C:\angband-281\lib\xtra\sound - -That's it! - -If you wish to use the sounds for any other purpose or wish to include them as the default sounds -in your variant of Angband, contact me at either: - -tim.haywood@ocean.co.uk or timothy.haywood@virgin.net - -Legal Stuff: - -This is a patch for Angband 2.8.1 (Windows95 Version). -Copyright @ 1997 Tim Haywood -Not for resale. -Not for release with original version of Angband without permission. diff --git a/src/angband.rc b/src/angband.rc index 547d43a1..b712b64a 100644 --- a/src/angband.rc +++ b/src/angband.rc @@ -109,7 +109,6 @@ ANGBAND MENU MENUITEM "&Bigtile mode", 409 } - MENUITEM "&Sound", 402 MENUITEM SEPARATOR MENUITEM "Unused menu option", 410 MENUITEM "Activate Screensaver", 411 diff --git a/src/config.h b/src/config.h index bc7e3fc4..900da66f 100644 --- a/src/config.h +++ b/src/config.h @@ -117,11 +117,6 @@ /* - * OPTION: Allow the use of "sound" in various places. - */ -#define USE_SOUND - -/* * OPTION: Allow the use of "graphics" in various places */ #define USE_GRAPHICS diff --git a/src/defines.h b/src/defines.h index 784cc00a..3215a6cc 100644 --- a/src/defines.h +++ b/src/defines.h @@ -3786,11 +3786,6 @@ /*** Sound constants ***/ -/* - * Mega-Hack -- some primitive sound support (see "main-win.c") - * - * Some "sound" constants for "Term_xtra(TERM_XTRA_SOUND, val)" - */ #define SOUND_HIT 1 #define SOUND_MISS 2 #define SOUND_FLEE 3 diff --git a/src/externs.h b/src/externs.h index 940f2eea..b2b5f7a4 100644 --- a/src/externs.h +++ b/src/externs.h @@ -111,7 +111,6 @@ extern u16b sf_lives; extern u16b sf_saves; extern u32b vernum; /* Version flag */ extern bool_ arg_wizard; -extern bool_ arg_sound; extern bool_ arg_graphics; extern bool_ arg_force_original; extern bool_ arg_force_roguelike; @@ -150,7 +149,6 @@ extern s16b monster_level; extern s32b turn; extern s32b old_turn; extern bool_ wizard; -extern bool_ use_sound; extern bool_ use_graphics; extern bool_ use_bigtile; extern byte graphics_mode; diff --git a/src/main-sdl.c b/src/main-sdl.c index 1b53cfc7..6ffe77df 100644 --- a/src/main-sdl.c +++ b/src/main-sdl.c @@ -634,21 +634,6 @@ static errr Term_xtra_sdl(int n, int v) return (1); } - case TERM_XTRA_SOUND: - { - /* - * Make a sound XXX XXX XXX - * - * This action should produce sound number "v", where the - * "name" of that sound is "sound_names[v]". This method - * is still under construction. - * - * This action is optional, and not very important. - */ - - return (1); - } - case TERM_XTRA_BORED: { /* Perform event checking without blocking */ diff --git a/src/main-win.c b/src/main-win.c index 454f3866..fe70edd9 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -40,10 +40,7 @@ * be placed into "src/", and the "8X8.BMP" bitmap file must be placed * into "lib/xtra/graf". In any case, some "*.fon" files (including * "8X13.FON" if nothing else) must be placed into "lib/xtra/font/". - * If "USE_SOUND" is defined, then some special library (for example, - * "winmm.lib") may need to be linked in, and desired "*.WAV" sound - * files must be placed into "lib/xtra/sound/". All of these extra - * files can be found in the "ext-win" archive. + * All of these extra files can be found in the "ext-win" archive. * * * The "Term_xtra_win_clear()" function should probably do a low-level @@ -169,7 +166,6 @@ #define IDM_OPTIONS_OLD_GRAPHICS 400 #define IDM_OPTIONS_NEW_GRAPHICS 401 #define IDM_OPTIONS_ASCII_GRAPHICS 403 -#define IDM_OPTIONS_SOUND 402 #define IDM_OPTIONS_BIGTILE 409 #define IDM_OPTIONS_UNUSED 410 #define IDM_OPTIONS_SAVER 411 @@ -462,19 +458,6 @@ static DIBINIT infMask; #endif /* USE_GRAPHICS */ -#ifdef USE_SOUND - -/* - * Flag set once "sound" has been initialized - */ -static bool_ can_use_sound = FALSE; - -/* - * An array of sound file names - */ -static cptr sound_file[SOUND_MAX]; - -#endif /* USE_SOUND */ /* @@ -497,7 +480,6 @@ static cptr AngList = "AngList"; */ static cptr ANGBAND_DIR_XTRA_FONT; static cptr ANGBAND_DIR_XTRA_GRAF; -static cptr ANGBAND_DIR_XTRA_SOUND; static cptr ANGBAND_DIR_XTRA_HELP; @@ -900,10 +882,6 @@ static void save_prefs(void) strcpy(buf, arg_bigtile ? "1" : "0"); WritePrivateProfileString("Angband", "Bigtile", buf, ini_file); - /* Save the "arg_sound" flag */ - strcpy(buf, arg_sound ? "1" : "0"); - WritePrivateProfileString("Angband", "Sound", buf, ini_file); - /* Save window prefs */ for (i = 0; i < MAX_TERM_DATA; ++i) { @@ -967,9 +945,6 @@ static void load_prefs(void) arg_bigtile = GetPrivateProfileInt("Angband", "Bigtile", FALSE, ini_file); use_bigtile = arg_bigtile; - /* Extract the "arg_sound" flag */ - arg_sound = (GetPrivateProfileInt("Angband", "Sound", 0, ini_file) != 0); - /* Load window prefs */ for (i = 0; i < MAX_TERM_DATA; ++i) { @@ -1208,41 +1183,6 @@ static bool_ init_graphics() } -/* - * Initialize sound - */ -static bool_ init_sound() -{ - /* Initialize once */ - if (!can_use_sound) - { - int i; - - char wav[128]; - char buf[1024]; - - /* Prepare the sounds */ - for (i = 1; i < SOUND_MAX; i++) - { - /* Extract name of sound file */ - sprintf(wav, "%s.wav", angband_sound_name[i]); - - /* Access the sound */ - path_build(buf, 1024, ANGBAND_DIR_XTRA_SOUND, wav); - - /* Save the sound filename, if it exists */ - if (check_file(buf)) sound_file[i] = strdup(buf); - } - - /* Sound available */ - can_use_sound = TRUE; - } - - /* Result */ - return (can_use_sound); -} - - /* * Resize a window @@ -1503,26 +1443,6 @@ static errr Term_xtra_win_react(void) } -#ifdef USE_SOUND - - /* Handle "arg_sound" */ - if (use_sound != arg_sound) - { - /* Initialize (if needed) */ - if (arg_sound && !init_sound()) - { - /* Warning */ - plog("Cannot initialize sound!"); - - /* Cannot enable */ - arg_sound = FALSE; - } - - /* Change setting */ - use_sound = arg_sound; - } - -#endif #ifdef USE_GRAPHICS @@ -1674,41 +1594,6 @@ static errr Term_xtra_win_noise(void) /* - * Hack -- make a sound - */ -static errr Term_xtra_win_sound(int v) -{ - /* Sound disabled */ - if (!use_sound) return (1); - - /* Illegal sound */ - if ((v < 0) || (v >= SOUND_MAX)) return (1); - - /* Unknown sound */ - if (!sound_file[v]) return (1); - -#ifdef USE_SOUND - -#ifdef WIN32 - - /* Play the sound, catch errors */ - return (PlaySound(sound_file[v], 0, SND_FILENAME | SND_ASYNC)); - -#else /* WIN32 */ - -/* Play the sound, catch errors */ - return (sndPlaySound(sound_file[v], SND_ASYNC)); - -#endif /* WIN32 */ - -#endif /* USE_SOUND */ - - /* Oops */ - return (1); -} - - -/* * Delay for "x" milliseconds */ static int Term_xtra_win_delay(int v) @@ -1766,12 +1651,6 @@ static errr Term_xtra_win(int n, int v) return (Term_xtra_win_noise()); } - /* Make a special sound */ - case TERM_XTRA_SOUND: - { - return (Term_xtra_win_sound(v)); - } - /* Process random events */ case TERM_XTRA_BORED: { @@ -2547,8 +2426,6 @@ static void setup_menus(void) MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); EnableMenuItem(hm, IDM_OPTIONS_BIGTILE, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); - EnableMenuItem(hm, IDM_OPTIONS_SOUND, - MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); EnableMenuItem(hm, IDM_OPTIONS_UNUSED, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED); EnableMenuItem(hm, IDM_OPTIONS_SAVER, @@ -2563,8 +2440,6 @@ static void setup_menus(void) (arg_graphics == 0 ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(hm, IDM_OPTIONS_BIGTILE, (arg_bigtile ? MF_CHECKED : MF_UNCHECKED)); - CheckMenuItem(hm, IDM_OPTIONS_SOUND, - (arg_sound ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(hm, IDM_OPTIONS_UNUSED, (0 ? MF_CHECKED : MF_UNCHECKED)); CheckMenuItem(hm, IDM_OPTIONS_SAVER, @@ -2581,10 +2456,6 @@ static void setup_menus(void) EnableMenuItem(hm, IDM_OPTIONS_BIGTILE, MF_ENABLED); #endif -#ifdef USE_SOUND - /* Menu "Options", Item "Sound" */ - EnableMenuItem(hm, IDM_OPTIONS_SOUND, MF_ENABLED); -#endif #ifdef USE_SAVER /* Menu "Options", Item "ScreenSaver" */ @@ -3033,27 +2904,6 @@ ofn.lStructSize = sizeof(OPENFILENAME); break; } - case IDM_OPTIONS_SOUND: - { - /* Paranoia */ - if (!inkey_flag) - { - plog("You may not do that right now."); - break; - } - - /* Toggle "arg_sound" */ - arg_sound = !arg_sound; - - /* React to changes */ - Term_xtra_win_react(); - - /* Hack -- Force redraw */ - Term_key_push(KTRL('R')); - - break; - } - case IDM_OPTIONS_UNUSED: { /* Unused for now XXX XXX XXX */ @@ -3923,18 +3773,6 @@ static void init_stuff(void) #endif -#ifdef USE_SOUND - - /* Build the "sound" path */ - path_build(path, 1024, ANGBAND_DIR_XTRA, "sound"); - - /* Allocate the path */ - ANGBAND_DIR_XTRA_SOUND = strdup(path); - - /* Validate the "sound" directory */ - validate_dir(ANGBAND_DIR_XTRA_SOUND); - -#endif /* Build the "help" path */ diff --git a/src/main-xxx.c b/src/main-xxx.c index 56dc48f6..bc430dd5 100644 --- a/src/main-xxx.c +++ b/src/main-xxx.c @@ -322,21 +322,6 @@ static errr Term_xtra_xxx(int n, int v) return (0); } - case TERM_XTRA_SOUND: - { - /* - * Make a sound XXX XXX XXX - * - * This action should produce sound number "v", where the - * "name" of that sound is "sound_names[v]". This method - * is still under construction. - * - * This action is optional, and not very important. - */ - - return (0); - } - case TERM_XTRA_BORED: { /* @@ -268,13 +268,6 @@ int main(int argc, char *argv[]) break; } - case 'V': - case 'v': - { - arg_sound = TRUE; - break; - } - case 'G': case 'g': { @@ -387,7 +380,6 @@ usage: puts(" -h This help"); puts(" -n Start a new character"); puts(" -w Request wizard mode"); - puts(" -v Request sound mode"); puts(" -g Request graphics mode"); puts(" -o Request original keyset"); puts(" -r Request rogue-like keyset"); diff --git a/src/util.cc b/src/util.cc index ce2d5ef0..3ed9dfa1 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1492,11 +1492,8 @@ void bell(void) */ void sound(int val) { - /* No sound */ - if (!use_sound) return; - - /* Make a sound (if allowed) */ - Term_xtra(TERM_XTRA_SOUND, val); + /* Ignore; sound not currently supported. */ + return; } diff --git a/src/variable.cc b/src/variable.cc index 8b2fa8ad..ef134d98 100644 --- a/src/variable.cc +++ b/src/variable.cc @@ -49,7 +49,6 @@ u16b sf_saves; /* Number of "saves" during this life */ * Run-time aruments */ bool_ arg_wizard; /* Command arg -- Request wizard mode */ -bool_ arg_sound; /* Command arg -- Request special sounds */ bool_ arg_graphics; /* Command arg -- Request graphics mode */ bool_ arg_force_original; /* Command arg -- Request original keyset */ bool_ arg_force_roguelike; /* Command arg -- Request roguelike keyset */ @@ -109,7 +108,6 @@ s32b old_turn; /* Turn when level began (feelings) */ bool_ wizard; /* Is the player currently in Wizard mode? */ -bool_ use_sound; /* The "sound" mode is enabled */ bool_ use_graphics; /* The "graphics" mode is enabled */ bool_ use_bigtile = FALSE; byte graphics_mode; /* Current graphics mode */ diff --git a/src/z-term.h b/src/z-term.h index c8854112..7b739ab7 100644 --- a/src/z-term.h +++ b/src/z-term.h @@ -225,7 +225,6 @@ struct term * The "TERM_XTRA_EVENT" action uses "v" to "wait" for an event * The "TERM_XTRA_SHAPE" action uses "v" to "show" the cursor * The "TERM_XTRA_FROSH" action uses "v" for the index of the row - * The "TERM_XTRA_SOUND" action uses "v" for the index of a sound * The "TERM_XTRA_ALIVE" action uses "v" to "activate" (or "close") * The "TERM_XTRA_LEVEL" action uses "v" to "resume" (or "suspend") * The "TERM_XTRA_DELAY" action uses "v" as a "millisecond" value @@ -239,7 +238,6 @@ struct term #define TERM_XTRA_FROSH 5 /* Flush one row (optional) */ #define TERM_XTRA_FRESH 6 /* Flush all rows (optional) */ #define TERM_XTRA_NOISE 7 /* Make a noise (optional) */ -#define TERM_XTRA_SOUND 8 /* Make a sound (optional) */ #define TERM_XTRA_BORED 9 /* Handle stuff when bored (optional) */ #define TERM_XTRA_REACT 10 /* React to global changes (optional) */ #define TERM_XTRA_ALIVE 11 /* Change the "hard" level (optional) */ |