From d5c69c9f285d371b0625de75b9a71055ec220061 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 4 May 2008 06:30:41 +0000 Subject: [1956565] Fix issues with monster names. Monster names are now stored in the monster struct and saved. Changed some monster-finding functions to return monsters* instead of monster index for type-safety. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4859 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'crawl-ref/source/monstuff.h') diff --git a/crawl-ref/source/monstuff.h b/crawl-ref/source/monstuff.h index 96f16883d1..5fc1a8a25a 100644 --- a/crawl-ref/source/monstuff.h +++ b/crawl-ref/source/monstuff.h @@ -123,17 +123,19 @@ bool simple_monster_message(const monsters *monster, const char *event, description_level_type descrip = DESC_CAP_THE); bool choose_any_monster(const monsters* mon); -int choose_random_nearby_monster(int weight, - bool (*suitable)(const monsters* mon) = - choose_any_monster, - bool in_sight = true, - bool prefer_named = false); - -int choose_random_monster_on_level(int weight, - bool (*suitable)(const monsters* mon) = - choose_any_monster, - bool in_sight = true, bool near_by = false, - bool prefer_named = false); +monsters *choose_random_nearby_monster( + int weight, + bool (*suitable)(const monsters* mon) = + choose_any_monster, + bool in_sight = true, + bool prefer_named = false); + +monsters *choose_random_monster_on_level( + int weight, + bool (*suitable)(const monsters* mon) = + choose_any_monster, + bool in_sight = true, bool near_by = false, + bool prefer_named = false); /* *********************************************************************** * called from: acr -- cgit v1.2.3-54-g00ecf