diff options
-rw-r--r-- | engines/sci/engine/kmath.cpp | 4 | ||||
-rw-r--r-- | engines/sci/engine/kmisc.cpp | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index 180271bb78..97f3ca4382 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -113,14 +113,14 @@ reg_t kTimesSin(EngineState *s, int, int argc, reg_t *argv) { int angle = argv[0].toSint16(); int factor = argv[1].toSint16(); - return make_reg(0, (int)(factor * 1.0 * sin(angle * PI / 180.0))); + return make_reg(0, (int)(factor * sin(angle * PI / 180.0))); } reg_t kTimesCos(EngineState *s, int, int argc, reg_t *argv) { int angle = argv[0].toSint16(); int factor = argv[1].toSint16(); - return make_reg(0, (int)(factor * 1.0 * cos(angle * PI / 180.0))); + return make_reg(0, (int)(factor * cos(angle * PI / 180.0))); } reg_t kCosDiv(EngineState *s, int, int argc, reg_t *argv) { diff --git a/engines/sci/engine/kmisc.cpp b/engines/sci/engine/kmisc.cpp index 550fd789a2..1ec2ffee1c 100644 --- a/engines/sci/engine/kmisc.cpp +++ b/engines/sci/engine/kmisc.cpp @@ -72,7 +72,7 @@ enum kMemoryInfoFunc { }; reg_t kMemoryInfo(EngineState *s, int, int argc, reg_t *argv) { - uint16 size = 0x7fff; // Must not be 0xffff, or some memory calculations will overflow + const uint16 size = 0x7fff; // Must not be 0xffff, or some memory calculations will overflow switch (argv[0].offset) { case K_MEMORYINFO_LARGEST_HEAP_BLOCK: @@ -107,10 +107,10 @@ reg_t kSetDebug(EngineState *s, int, int argc, reg_t *argv) { } enum { - _K_NEW_GETTIME_TICKS = 0, - _K_NEW_GETTIME_TIME_12HOUR = 1, - _K_NEW_GETTIME_TIME_24HOUR = 2, - _K_NEW_GETTIME_DATE = 3 + K_NEW_GETTIME_TICKS = 0, + K_NEW_GETTIME_TIME_12HOUR = 1, + K_NEW_GETTIME_TIME_24HOUR = 2, + K_NEW_GETTIME_DATE = 3 }; reg_t kGetTime(EngineState *s, int, int argc, reg_t *argv) { @@ -130,19 +130,19 @@ reg_t kGetTime(EngineState *s, int, int argc, reg_t *argv) { int mode = (argc > 0) ? argv[0].toUint16() : 0; switch (mode) { - case _K_NEW_GETTIME_TICKS : + case K_NEW_GETTIME_TICKS : retval = start_time * 60 / 1000; debugC(2, kDebugLevelTime, "GetTime(elapsed) returns %d", retval); break; - case _K_NEW_GETTIME_TIME_12HOUR : + case K_NEW_GETTIME_TIME_12HOUR : retval = ((loc_time.tm_hour % 12) << 12) | (loc_time.tm_min << 6) | (loc_time.tm_sec); debugC(2, kDebugLevelTime, "GetTime(12h) returns %d", retval); break; - case _K_NEW_GETTIME_TIME_24HOUR : + case K_NEW_GETTIME_TIME_24HOUR : retval = (loc_time.tm_hour << 11) | (loc_time.tm_min << 5) | (loc_time.tm_sec >> 1); debugC(2, kDebugLevelTime, "GetTime(24h) returns %d", retval); break; - case _K_NEW_GETTIME_DATE : + case K_NEW_GETTIME_DATE : retval = loc_time.tm_mday | ((loc_time.tm_mon + 1) << 5) | (((loc_time.tm_year + 1900) & 0x7f) << 9); debugC(2, kDebugLevelTime, "GetTime(date) returns %d", retval); break; |