diff options
author | Paweł Kołodziejski | 2009-02-15 12:29:09 +0000 |
---|---|---|
committer | Paweł Kołodziejski | 2009-02-15 12:29:09 +0000 |
commit | 07242061562b45c841bdb870333a6bc7117bc03d (patch) | |
tree | 42deac5984d6efc9a176da5f82e5e4de89ac897b /engines/sci | |
parent | 8b34730107184afd28b6845aa5fc6ef89469c645 (diff) | |
download | scummvm-rg350-07242061562b45c841bdb870333a6bc7117bc03d.tar.gz scummvm-rg350-07242061562b45c841bdb870333a6bc7117bc03d.tar.bz2 scummvm-rg350-07242061562b45c841bdb870333a6bc7117bc03d.zip |
fixed compilation and linking with msvc9
svn-id: r38232
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/engine/kmath.cpp | 2 | ||||
-rw-r--r-- | engines/sci/engine/kmovement.cpp | 2 | ||||
-rw-r--r-- | engines/sci/scicore/resource.cpp | 3 | ||||
-rw-r--r-- | engines/sci/scicore/tools.cpp | 2 |
4 files changed, 6 insertions, 3 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index aa4d390cc2..6925970d8a 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -59,7 +59,7 @@ get_angle(int xrel, int yrel) if ((xrel == 0) && (yrel == 0)) return 0; else { - int val = (int) (180.0/PI * atan2((float)xrel, (float)-yrel)); + int val = (int) (180.0/PI * atan2((double)xrel, (double)-yrel)); if (val < 0) val += 360; diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp index 90e44a2ace..1d4ec81bfa 100644 --- a/engines/sci/engine/kmovement.cpp +++ b/engines/sci/engine/kmovement.cpp @@ -140,7 +140,7 @@ kSetJump(state_t *s, int funct_nr, int argc, reg_t *argv) // FIXME: This choice of vy makes t roughly (2+sqrt(2))/gy * sqrt(dy); // so if gy==3, then t is roughly sqrt(dy)... - vy = (int)sqrt((float)gy * (float)abs(2 * dy)) + 1; + vy = (int)sqrt((double)gy * abs(2 * dy)) + 1; } else { // As stated above, the vertical direction is correlated to the horizontal by the // (non-zero) factor c. diff --git a/engines/sci/scicore/resource.cpp b/engines/sci/scicore/resource.cpp index 026bd76834..ac7983309f 100644 --- a/engines/sci/scicore/resource.cpp +++ b/engines/sci/scicore/resource.cpp @@ -193,6 +193,7 @@ scir_add_volume(resource_mgr_t *mgr, resource_source_t *map, char *filename, newsrc->location.file.name = strdup(filename); newsrc->location.file.volume_number = number; newsrc->associated_map = map; + return 0; } resource_source_t * @@ -208,6 +209,7 @@ scir_add_patch_dir(resource_mgr_t *mgr, int type, char *dirname) newsrc->source_type = RESSOURCE_TYPE_DIRECTORY; newsrc->scanned = 0; newsrc->location.dir.name = strdup(dirname); + return 0; } resource_source_t * @@ -585,6 +587,7 @@ int scir_scan_new_sources(resource_mgr_t *mgr, int *detected_version) { _scir_scan_new_sources(mgr, detected_version, mgr->sources); + return 0; } static void diff --git a/engines/sci/scicore/tools.cpp b/engines/sci/scicore/tools.cpp index 8167da33b4..bd2ec547d6 100644 --- a/engines/sci/scicore/tools.cpp +++ b/engines/sci/scicore/tools.cpp @@ -625,7 +625,7 @@ _fcaseseek(const char *fname, sci_dir_t *dir) char *retval = NULL, *name; #ifdef _MSC_VER - return fname; + return (char *)fname; #endif if (strchr(fname, G_DIR_SEPARATOR)) { |