diff options
author | Filippos Karapetis | 2010-11-02 16:07:22 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-02 16:07:22 +0000 |
commit | db133990e90b345c07a5eea33e56c7299f9fca44 (patch) | |
tree | b2f61936780c92c43cae16aed05852232717f94a /engines/sci/engine | |
parent | 7f354ac7e0453863a6d4ee798353bbd32965c289 (diff) | |
download | scummvm-rg350-db133990e90b345c07a5eea33e56c7299f9fca44.tar.gz scummvm-rg350-db133990e90b345c07a5eea33e56c7299f9fca44.tar.bz2 scummvm-rg350-db133990e90b345c07a5eea33e56c7299f9fca44.zip |
SCI: Properly cast the results of kTimesSin and kTimesCos to 16-bit integers
svn-id: r54042
Diffstat (limited to 'engines/sci/engine')
-rw-r--r-- | engines/sci/engine/kmath.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index 792181b832..f90a5b4353 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -126,14 +126,14 @@ reg_t kTimesSin(EngineState *s, int argc, reg_t *argv) { int angle = argv[0].toSint16(); int factor = argv[1].toSint16(); - return make_reg(0, (int)(factor * sin(angle * PI / 180.0))); + return make_reg(0, (int16)(factor * sin(angle * PI / 180.0))); } reg_t kTimesCos(EngineState *s, int argc, reg_t *argv) { int angle = argv[0].toSint16(); int factor = argv[1].toSint16(); - return make_reg(0, (int)(factor * cos(angle * PI / 180.0))); + return make_reg(0, (int16)(factor * cos(angle * PI / 180.0))); } reg_t kCosDiv(EngineState *s, int argc, reg_t *argv) { |