From 8a737d409cea505589f5b67fab49f138265a8174 Mon Sep 17 00:00:00 2001 From: pauldubois Date: Mon, 10 Mar 2008 06:31:01 +0000 Subject: Another batch of msvc compile fixes. Added wrapper implementation for opendir/readdir Other functions left stubbed out. It's a shame that crawl's "direct.h" conflicts with . Fixed up use of AppHdr.h in a couple places (it must be included first); changed project to use precompiled headers. crawl now compiles cleanly but doesn't link. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3573 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 545529aa48..50107ebd2f 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -18,7 +18,7 @@ #include "notes.h" #include -#if !defined(__IBMCPP__) +#if !defined(__IBMCPP__) && !defined(_MSC_VER) #include #endif @@ -1840,7 +1840,7 @@ void monster_threat_values(double *general, double *highest) if (monster->alive() && mons_near(monster) && !mons_friendly(monster)) { const int xp = exper_value(monster); - const double log_xp = log(xp); + const double log_xp = log((double)xp); sum += log_xp; if (xp > highest_xp) { @@ -1855,7 +1855,7 @@ void monster_threat_values(double *general, double *highest) bool player_in_a_dangerous_place() { - const double logexp = log(you.experience); + const double logexp = log((double)you.experience); double gen_threat = 0.0, hi_threat = 0.0; monster_threat_values(&gen_threat, &hi_threat); -- cgit v1.2.3-54-g00ecf