From 25f7c371718f74eb26fed5bd66a803f220c89c3b Mon Sep 17 00:00:00 2001 From: Oystein Eftevaag Date: Sat, 21 Feb 2009 10:23:36 +0000 Subject: Wrapped the SCI engine in the Sci namespace. svn-id: r38676 --- engines/sci/engine/kmath.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'engines/sci/engine/kmath.cpp') diff --git a/engines/sci/engine/kmath.cpp b/engines/sci/engine/kmath.cpp index fb8a191337..85b3f3d020 100644 --- a/engines/sci/engine/kmath.cpp +++ b/engines/sci/engine/kmath.cpp @@ -25,6 +25,8 @@ #include "sci/include/engine.h" +namespace Sci { + reg_t kRandom(state_t *s, int funct_nr, int argc, reg_t *argv) { return make_reg(0, SKPV(0) + (int)((SKPV(1) + 1.0 - SKPV(0)) * (rand() / (RAND_MAX + 1.0)))); } @@ -164,3 +166,5 @@ reg_t kTimesCot(state_t *s, int funct_nr, int argc, reg_t *argv) { } else return make_reg(0, (gint16)(tan(param * PI / 180.0) * scale)); } + +} // End of namespace Sci -- cgit v1.2.3