From 1c8fbc7467560766775fe9aba26261031f47c16e Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 1 Jun 2008 01:55:53 +0000 Subject: Outsource weird sounds. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5386 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/dat/database/miscname.txt | 28 +++++++++++++++++++++++++--- crawl-ref/source/effects.cc | 12 +----------- crawl-ref/source/misc.cc | 5 +++++ crawl-ref/source/misc.h | 2 ++ 4 files changed, 33 insertions(+), 14 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/dat/database/miscname.txt b/crawl-ref/source/dat/database/miscname.txt index 0f32fed00f..4b6e152662 100644 --- a/crawl-ref/source/dat/database/miscname.txt +++ b/crawl-ref/source/dat/database/miscname.txt @@ -5,11 +5,11 @@ # # This file contains a list of names for miscellaneous things. # This is currently only used for colours, writing types, -# roaring animals, and smells. +# roaring animals, smells, and sounds. ###################################################### %%%% glowing_adj -# any word other than "glowing" itself will work here +# Any word other than "glowing" itself will work here. bright brilliant @@ -159,7 +159,8 @@ writing_name %%%% roaring_animal_name - +# This doesn't necessarily have to make sense. For example, a name of a +# fruit or an insect will work here. albino dragon dragon @@ -196,3 +197,24 @@ sulphur wet wool %%%% +sound_name + +a crunching sound + +a very strange noise + +a very strange noise indeed + +a voice calling someone else's name + +roaring flame + +snatches of song + +the bellowing of a yak + +the chiming of a distant gong + +the tinkle of an enormous bell + +%%%% diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index bbaa21426a..7c0ebe9868 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -787,17 +787,7 @@ void random_uselessness(unsigned char ru, unsigned char sc_read_2) break; case 8: - temp_rand = random2(9); - mprf("You hear %s.", - (temp_rand == 0) ? "snatches of song" : - (temp_rand == 1) ? "a voice call someone else's name" : - (temp_rand == 2) ? "a very strange noise" : - (temp_rand == 3) ? "roaring flame" : - (temp_rand == 4) ? "a very strange noise indeed" : - (temp_rand == 5) ? "the chiming of a distant gong" : - (temp_rand == 6) ? "the bellowing of a yak" : - (temp_rand == 7) ? "a crunching sound" - : "the tinkle of an enormous bell"); + mprf("You hear %s.", weird_sound().c_str()); break; } } diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index b80e276fc6..4a9ef1d06f 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -2424,6 +2424,11 @@ std::string weird_smell() return getMiscString("smell_name"); } +std::string weird_sound() +{ + return getMiscString("sound_name"); +} + bool scramble(void) { // Statues are too stiff and heavy to scramble out of the water. diff --git a/crawl-ref/source/misc.h b/crawl-ref/source/misc.h index 35446bd0fd..3c9a88a23a 100644 --- a/crawl-ref/source/misc.h +++ b/crawl-ref/source/misc.h @@ -109,6 +109,8 @@ std::string weird_roaring_animal(); std::string weird_smell(); +std::string weird_sound(); + std::string cloud_name(cloud_type type); bool is_damaging_cloud(cloud_type type, bool temp = false); -- cgit v1.2.3-54-g00ecf