[Scummvm-cvs-logs] SF.net SVN: scummvm:[38676] scummvm/trunk/engines/sci

vinterstum at users.sourceforge.net vinterstum at users.sourceforge.net
Sat Feb 21 11:23:40 CET 2009


Revision: 38676
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38676&view=rev
Author:   vinterstum
Date:     2009-02-21 10:23:36 +0000 (Sat, 21 Feb 2009)

Log Message:
-----------
Wrapped the SCI engine in the Sci namespace.

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/game.cpp
    scummvm/trunk/engines/sci/engine/gc.cpp
    scummvm/trunk/engines/sci/engine/gc.h
    scummvm/trunk/engines/sci/engine/grammar.cpp
    scummvm/trunk/engines/sci/engine/heap.cpp
    scummvm/trunk/engines/sci/engine/heap.h
    scummvm/trunk/engines/sci/engine/int_hashmap.cpp
    scummvm/trunk/engines/sci/engine/int_hashmap.h
    scummvm/trunk/engines/sci/engine/kernel.cpp
    scummvm/trunk/engines/sci/engine/kernel_compat.h
    scummvm/trunk/engines/sci/engine/kernel_types.h
    scummvm/trunk/engines/sci/engine/kevent.cpp
    scummvm/trunk/engines/sci/engine/kfile.cpp
    scummvm/trunk/engines/sci/engine/kgraphics.cpp
    scummvm/trunk/engines/sci/engine/klists.cpp
    scummvm/trunk/engines/sci/engine/kmath.cpp
    scummvm/trunk/engines/sci/engine/kmenu.cpp
    scummvm/trunk/engines/sci/engine/kmovement.cpp
    scummvm/trunk/engines/sci/engine/kpathing.cpp
    scummvm/trunk/engines/sci/engine/kscripts.cpp
    scummvm/trunk/engines/sci/engine/ksound.cpp
    scummvm/trunk/engines/sci/engine/kstring.cpp
    scummvm/trunk/engines/sci/engine/message.cpp
    scummvm/trunk/engines/sci/engine/message.h
    scummvm/trunk/engines/sci/engine/said.cpp
    scummvm/trunk/engines/sci/engine/said.y
    scummvm/trunk/engines/sci/engine/savegame.cfsml
    scummvm/trunk/engines/sci/engine/savegame.cpp
    scummvm/trunk/engines/sci/engine/sci_graphics.h
    scummvm/trunk/engines/sci/engine/scriptconsole.cpp
    scummvm/trunk/engines/sci/engine/scriptdebug.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.cpp
    scummvm/trunk/engines/sci/engine/seg_manager.h
    scummvm/trunk/engines/sci/engine/sys_strings.cpp
    scummvm/trunk/engines/sci/engine/vm.cpp
    scummvm/trunk/engines/sci/gfx/antialias.cpp
    scummvm/trunk/engines/sci/gfx/font-5x8.cpp
    scummvm/trunk/engines/sci/gfx/font-6x10.cpp
    scummvm/trunk/engines/sci/gfx/font.cpp
    scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp
    scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
    scummvm/trunk/engines/sci/gfx/gfx_line.cpp
    scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
    scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
    scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
    scummvm/trunk/engines/sci/gfx/gfx_support.cpp
    scummvm/trunk/engines/sci/gfx/gfx_test.cpp
    scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
    scummvm/trunk/engines/sci/gfx/menubar.cpp
    scummvm/trunk/engines/sci/gfx/operations.cpp
    scummvm/trunk/engines/sci/gfx/resmgr.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_cursor_0.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_picfill_aux.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_view_0.cpp
    scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp
    scummvm/trunk/engines/sci/gfx/sbtree.cpp
    scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
    scummvm/trunk/engines/sci/gfx/widgets.cpp
    scummvm/trunk/engines/sci/include/aatree.h
    scummvm/trunk/engines/sci/include/console.h
    scummvm/trunk/engines/sci/include/engine.h
    scummvm/trunk/engines/sci/include/event.h
    scummvm/trunk/engines/sci/include/gfx_driver.h
    scummvm/trunk/engines/sci/include/gfx_operations.h
    scummvm/trunk/engines/sci/include/gfx_options.h
    scummvm/trunk/engines/sci/include/gfx_res_options.h
    scummvm/trunk/engines/sci/include/gfx_resmgr.h
    scummvm/trunk/engines/sci/include/gfx_resource.h
    scummvm/trunk/engines/sci/include/gfx_state_internal.h
    scummvm/trunk/engines/sci/include/gfx_system.h
    scummvm/trunk/engines/sci/include/gfx_tools.h
    scummvm/trunk/engines/sci/include/gfx_widgets.h
    scummvm/trunk/engines/sci/include/heapmgr.h
    scummvm/trunk/engines/sci/include/kdebug.h
    scummvm/trunk/engines/sci/include/kernel.h
    scummvm/trunk/engines/sci/include/list.h
    scummvm/trunk/engines/sci/include/listener.h
    scummvm/trunk/engines/sci/include/menubar.h
    scummvm/trunk/engines/sci/include/resource.h
    scummvm/trunk/engines/sci/include/sbtree.h
    scummvm/trunk/engines/sci/include/sci_memory.h
    scummvm/trunk/engines/sci/include/sci_midi.h
    scummvm/trunk/engines/sci/include/sci_widgets.h
    scummvm/trunk/engines/sci/include/sciresource.h
    scummvm/trunk/engines/sci/include/scitypes.h
    scummvm/trunk/engines/sci/include/script.h
    scummvm/trunk/engines/sci/include/sfx_core.h
    scummvm/trunk/engines/sci/include/sfx_engine.h
    scummvm/trunk/engines/sci/include/sfx_iterator.h
    scummvm/trunk/engines/sci/include/sfx_iterator_internal.h
    scummvm/trunk/engines/sci/include/sfx_pcm.h
    scummvm/trunk/engines/sci/include/sfx_player.h
    scummvm/trunk/engines/sci/include/sfx_songlib.h
    scummvm/trunk/engines/sci/include/sfx_time.h
    scummvm/trunk/engines/sci/include/sfx_timer.h
    scummvm/trunk/engines/sci/include/sys_strings.h
    scummvm/trunk/engines/sci/include/uinput.h
    scummvm/trunk/engines/sci/include/versions.h
    scummvm/trunk/engines/sci/include/vm.h
    scummvm/trunk/engines/sci/include/vm_types.h
    scummvm/trunk/engines/sci/include/vocabulary.h
    scummvm/trunk/engines/sci/sci.cpp
    scummvm/trunk/engines/sci/scicore/aatree.cpp
    scummvm/trunk/engines/sci/scicore/console.cpp
    scummvm/trunk/engines/sci/scicore/decompress0.cpp
    scummvm/trunk/engines/sci/scicore/decompress01.cpp
    scummvm/trunk/engines/sci/scicore/decompress1.cpp
    scummvm/trunk/engines/sci/scicore/decompress11.cpp
    scummvm/trunk/engines/sci/scicore/resource.cpp
    scummvm/trunk/engines/sci/scicore/resource_map.cpp
    scummvm/trunk/engines/sci/scicore/resource_patch.cpp
    scummvm/trunk/engines/sci/scicore/sci_memory.cpp
    scummvm/trunk/engines/sci/scicore/script.cpp
    scummvm/trunk/engines/sci/scicore/tools.cpp
    scummvm/trunk/engines/sci/scicore/versions.cpp
    scummvm/trunk/engines/sci/scicore/vocab.cpp
    scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
    scummvm/trunk/engines/sci/sfx/adlib.cpp
    scummvm/trunk/engines/sci/sfx/adlib.h
    scummvm/trunk/engines/sci/sfx/core.cpp
    scummvm/trunk/engines/sci/sfx/device/alsa-midi.cpp
    scummvm/trunk/engines/sci/sfx/device/camd-midi.cpp
    scummvm/trunk/engines/sci/sfx/device/devices.cpp
    scummvm/trunk/engines/sci/sfx/device/unixraw-midi.cpp
    scummvm/trunk/engines/sci/sfx/device.h
    scummvm/trunk/engines/sci/sfx/iterator.cpp
    scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
    scummvm/trunk/engines/sci/sfx/mixer/test.cpp
    scummvm/trunk/engines/sci/sfx/mixer.h
    scummvm/trunk/engines/sci/sfx/pcm-iterator.cpp
    scummvm/trunk/engines/sci/sfx/pcm_device.cpp
    scummvm/trunk/engines/sci/sfx/player/players.cpp
    scummvm/trunk/engines/sci/sfx/player/polled.cpp
    scummvm/trunk/engines/sci/sfx/player/realtime.cpp
    scummvm/trunk/engines/sci/sfx/seq/gm.cpp
    scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp
    scummvm/trunk/engines/sci/sfx/seq/instrument-map.h
    scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
    scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp
    scummvm/trunk/engines/sci/sfx/seq/sequencers.cpp
    scummvm/trunk/engines/sci/sfx/sequencer.h
    scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
    scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
    scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp
    scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
    scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp
    scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp
    scummvm/trunk/engines/sci/sfx/softseq.h
    scummvm/trunk/engines/sci/sfx/songlib.cpp
    scummvm/trunk/engines/sci/sfx/test-iterator.cpp
    scummvm/trunk/engines/sci/sfx/time.cpp
    scummvm/trunk/engines/sci/sfx/timer.cpp
    scummvm/trunk/engines/sci/sfx/timetest.cpp

Modified: scummvm/trunk/engines/sci/engine/game.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/game.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/game.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/kernel.h"
 #include "sci/engine/kernel_types.h"
 
+namespace Sci {
+
 // Structures and data from vm.c:
 extern calls_struct_t *send_calls;
 extern int send_calls_allocated;
@@ -704,3 +706,4 @@
 	return 0;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/gc.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/gc.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/gc.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/engine/gc.h"
 
+namespace Sci {
+
 #define WORKLIST_CHUNK_SIZE 32
 
 //#define DEBUG_GC
@@ -287,3 +289,5 @@
 	}
 #endif
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/gc.h
===================================================================
--- scummvm/trunk/engines/sci/engine/gc.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/gc.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,7 @@
 #include "sci/include/vm_types.h"
 #include "sci/include/engine.h"
 
+namespace Sci {
 
 struct reg_t_EqualTo {
 	bool operator()(const reg_t& x, const reg_t& y) const {
@@ -58,4 +59,6 @@
 ** Parameters: (state_t *) s: The state in which we should gc
 */
 
+} // End of namespace Sci
+
 #endif // !defined(GC_H_)

Modified: scummvm/trunk/engines/sci/engine/grammar.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/grammar.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/grammar.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "sci/include/vocabulary.h"
 #include "sci/include/console.h"
 
+namespace Sci {
+
 #define TOKEN_OPAREN 0xff000000
 #define TOKEN_CPAREN 0xfe000000
 #define TOKEN_TERMINAL_CLASS 0x10000
@@ -583,3 +585,5 @@
 
 	return 0;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/heap.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/heap.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/heap.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/console.h"
 #include "sci/engine/heap.h"
 
+namespace Sci {
+
 #define assert_in_range(pos) assert(pos >= 1000 && pos <= 0xffff)
 
 static void set_size(heap_t *h, int block_pos, int size) {
@@ -280,3 +282,5 @@
 	return 0;
 }
 */
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/heap.h
===================================================================
--- scummvm/trunk/engines/sci/engine/heap.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/heap.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 
 #include "sci/include/resource.h"
 
+namespace Sci {
+
 #define SCI_HEAP_SIZE 0x10000
 
 typedef guint16 heap_ptr;
@@ -108,4 +110,6 @@
 ** Returns   : (void)
 */
 
+} // End of namespace Sci
+
 #endif // !_SCI_HEAP_H

Modified: scummvm/trunk/engines/sci/engine/int_hashmap.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/int_hashmap.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/int_hashmap.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,7 @@
 
 #include "sci/engine/int_hashmap.h"
 
+namespace Sci {
 
 #define HASH_MAX DCS_INT_HASH_MAX
 #define HASH(x) (x & 0xff)
@@ -107,3 +108,4 @@
 		return -1; // Not found
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/int_hashmap.h
===================================================================
--- scummvm/trunk/engines/sci/engine/int_hashmap.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/int_hashmap.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,7 @@
 
 #include "common/scummsys.h"
 
+namespace Sci {
 
 /*
  * Defines a hash map that maps values to small integers.
@@ -82,5 +83,6 @@
 
 typedef int_hash_map_t *int_hash_map_ptr;
 
+} // End of namespace Sci
 
 #endif // INT_HASHMAP_H

Modified: scummvm/trunk/engines/sci/engine/kernel.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kernel.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -36,6 +36,8 @@
 #include "sci/include/gfx_operations.h"
 #include "sci/engine/kernel_types.h"
 
+namespace Sci {
+
 // New kernel functions
 reg_t kStrLen(struct _state *s, int funct_nr, int argc, reg_t *argv);
 reg_t kGetFarText(struct _state *s, int funct_nr, int argc, reg_t *argv);
@@ -977,3 +979,5 @@
 reg_t *kernel_dereference_reg_pointer(struct _state *s, reg_t pointer, int entries) {
 	return (reg_t*)_kernel_dereference_pointer(s, pointer, entries, sizeof(reg_t));
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kernel_compat.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_compat.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kernel_compat.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #warning "Old kernel compatibility crap"
 #endif
 
+namespace Sci {
+
 // Minimal heap position/
 #define HEAP_MIN 800
 
@@ -71,4 +73,6 @@
 	return getUInt16(base + address);
 }
 
+} // End of namespace Sci
+
 #endif // !_SCI_KERNEL_COMPAT_

Modified: scummvm/trunk/engines/sci/engine/kernel_types.h
===================================================================
--- scummvm/trunk/engines/sci/engine/kernel_types.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kernel_types.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 
 #include "sci/include/vm_types.h"
 
+namespace Sci {
+
 #define KSIG_TERMINATOR 0
 
 // Uncompiled signatures
@@ -87,4 +89,6 @@
 ** Returns: (const char *) Pointer to a (static) descriptive string
 */
 
+} // End of namespace Sci
+
 #endif // ! _FREESCI_KERNEL_TYPES_H_

Modified: scummvm/trunk/engines/sci/engine/kevent.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kevent.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kevent.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 int stop_on_event;
 
 #define SCI_VARIABLE_GAME_SPEED 3
@@ -222,3 +224,5 @@
 	warning("Unimplemented syscall 'Joystick()");
 	return NULL_REG;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kfile.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kfile.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kfile.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -37,6 +37,8 @@
 
 #include <errno.h>
 
+namespace Sci {
+
 #ifndef O_BINARY
 #define O_BINARY 0
 #endif
@@ -904,3 +906,5 @@
 
 	return s->r_acc;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/engine/sci_graphics.h"
 #include "sci/include/sci_widgets.h"
 
+namespace Sci {
+
 #undef DEBUG_LSRECT
 
 // Graph subfunctions
@@ -3274,3 +3276,5 @@
 
 	return s->r_acc;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/klists.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/klists.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/klists.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 #ifdef LOOKUP_NODE
 #  undef LOOKUP_NODE
 #  define LOOKUP_NODE(addr) inline_lookup_node(s, (addr), __FILE__, __LINE__)
@@ -494,3 +496,5 @@
 
 	return s->r_acc;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kmath.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmath.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kmath.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -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 @@
 	} else
 		return make_reg(0, (gint16)(tan(param * PI / 180.0) * scale));
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,7 @@
 #include "sci/include/engine.h"
 #include "sci/include/sci_widgets.h"
 
+namespace Sci {
 
 reg_t
 kAddMenu(state_t *s, int funct_nr, int argc, reg_t *argv) {
@@ -520,3 +521,5 @@
 
 	return s->r_acc;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kmovement.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmovement.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kmovement.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #include "sci/include/sciresource.h"
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 /*
 Compute "velocity" vector (xStep,yStep)=(vx,vy) for a jump from (0,0) to (dx,dy), with gravity gy.
 The gravity is assumed to be non-negative.
@@ -509,3 +511,5 @@
 
 	return s->r_acc;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kpathing.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kpathing.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/aatree.h"
 #include "sci/include/list.h"
 
+namespace Sci {
+
 #define POLY_LAST_POINT 0x7777
 #define POLY_POINT_SIZE 4
 
@@ -1528,3 +1530,5 @@
 		break;
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kscripts.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kscripts.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/engine.h"
 #include "sci/engine/kernel_types.h"
 
+namespace Sci {
+
 reg_t read_selector(state_t *s, reg_t object, selector_t selector_id, const char *file, int line) {
 	reg_t *address;
 
@@ -293,3 +295,5 @@
 
 	return make_reg(0, is_heap_object(s, obj) && lookup_selector(s, obj, selector, NULL, NULL) != SELECTOR_NONE);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/ksound.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/ksound.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/ksound.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #include "sci/include/engine.h"
 #include "sci/include/sfx_player.h"
 
+namespace Sci {
+
 #define _K_SCI0_SOUND_INIT_HANDLE 0
 #define _K_SCI0_SOUND_PLAY_HANDLE 1
 #define _K_SCI0_SOUND_NOP 2
@@ -996,3 +998,4 @@
 	return s->r_acc;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/kstring.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kstring.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/kstring.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/engine.h"
 #include "sci/engine/message.h"
 
+namespace Sci {
+
 #define CHECK_OVERFLOW1(pt, size, rv) \
 	if (((pt) - (str_base)) + (size) > maxsize) { \
 		error("String expansion exceeded heap boundaries\n"); \
@@ -779,3 +781,5 @@
 
 	return NULL_REG;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/message.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/message.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/message.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/engine/message.h"
 
+namespace Sci {
+
 #if 0
 // Unreferenced - removed
 static int get_talker_trivial(index_record_cursor_t *cursor) {
@@ -198,3 +200,5 @@
 	state->record_count = 0;
 	state->handler = &fixed_handler;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/message.h
===================================================================
--- scummvm/trunk/engines/sci/engine/message.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/message.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 typedef struct {
 	int noun;
 	int verb;
@@ -73,3 +75,5 @@
 int message_get_text(message_state_t *state, char *buffer, int length);
 int message_state_load_res(message_state_t *state, int module);
 void message_state_initialize(ResourceManager *resmgr, message_state_t *state);
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/said.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/said.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/said.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -133,6 +133,8 @@
 
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 #define SAID_BRANCH_NULL 0
 
 #define MAX_SAID_TOKENS 128
@@ -2471,3 +2473,4 @@
 }
 #endif
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/said.y
===================================================================
--- scummvm/trunk/engines/sci/engine/said.y	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/said.y	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 #define SAID_BRANCH_NULL 0
 
 #define MAX_SAID_TOKENS 128
@@ -826,3 +828,5 @@
 	said(&s, block);
 }
 #endif
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/savegame.cfsml
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cfsml	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/savegame.cfsml	2009-02-21 10:23:36 UTC (rev 38676)
@@ -46,6 +46,8 @@
 #pragma warning( disable : 4101 )
 #endif
 
+namespace Sci {
+
 #define HUNK_TYPE_GFX_SNAPSHOT_STRING "g\n"
 
 /* Missing:
@@ -1158,3 +1160,4 @@
 	return true;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/savegame.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/savegame.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/savegame.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -46,6 +46,8 @@
 #pragma warning( disable : 4101 )
 #endif
 
+namespace Sci {
+
 #define HUNK_TYPE_GFX_SNAPSHOT_STRING "g\n"
 
 /* Missing:
@@ -5196,3 +5198,4 @@
 	return true;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/sci_graphics.h
===================================================================
--- scummvm/trunk/engines/sci/engine/sci_graphics.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/sci_graphics.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #ifndef _SCI_GRAPHICS_H_
 #define _SCI_GRAPHICS_H_
 
+namespace Sci {
+
 #define MAX_TEXT_WIDTH_MAGIC_VALUE 192
 // This is the real width of a text with a specified width of 0
 
@@ -38,5 +40,6 @@
 // Internal states
 #define SELECTOR_STATE_DITHER_FRAMED 0x1000
 
+} // End of namespace Sci
 
 #endif // !_SCI_GRAPHICS_H_

Modified: scummvm/trunk/engines/sci/engine/scriptconsole.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/scriptconsole.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,9 @@
 
 #include "sci/include/sci_memory.h"
 #include "sci/include/engine.h"
+
+namespace Sci {
+
 #ifdef SCI_CONSOLE
 
 state_t *con_gamestate = NULL;
@@ -1085,3 +1088,5 @@
 }
 
 #endif // SCI_CONSOLE
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/scriptdebug.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/scriptdebug.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -66,6 +66,8 @@
 #  include <signal.h>
 #endif
 
+namespace Sci {
+
 extern int debug_sleeptime_factor;
 int _debugstate_valid = 0; // Set to 1 while script_debug is running
 int _debug_step_running = 0; // Set to >0 to allow multiple stepping
@@ -3300,3 +3302,5 @@
 		sfx_suspend(&s->sound, 0);
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/seg_manager.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/seg_manager.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,7 @@
 #include "sci/include/versions.h"
 #include "sci/include/engine.h"
 
+namespace Sci {
 
 //#define GC_DEBUG*/ // Debug garbage collection
 //#define GC_DEBUG_VERBOSE*/ // Debug garbage verbosely
@@ -1812,3 +1813,5 @@
 
 	return retval;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/sys_strings.h"
 #include "sci/include/vm.h"
 
+namespace Sci {
+
 #define DEFAULT_SCRIPTS 32
 #define DEFAULT_OBJECTS 8	    // default # of objects per script
 #define DEFAULT_OBJECTS_INCREMENT 4 // Number of additional objects to instantiate if we're running out of them
@@ -492,4 +494,6 @@
 // Returns   : (seg_interface_t *): An interface to the specified segment ID, or NULL on error
 // The returned interface 'si' must be freed after use by calling 'si->dealloc_self(si)';
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/engine/sys_strings.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/sys_strings.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/sys_strings.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/sys_strings.h"
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 void sys_string_acquire(sys_strings_t *strings, int index, const char *name, int max_len) {
 	sys_string_t *str = strings->strings + index;
 
@@ -99,3 +101,5 @@
 
 	sys_string_set(new_strings, SYS_STRING_SAVEDIR, old_strings->strings[SYS_STRING_SAVEDIR].value);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/engine/vm.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/engine/vm.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -38,6 +38,8 @@
 #include <setjmp.h>
 #endif
 
+namespace Sci {
+
 reg_t NULL_REG = NULL_REG_INITIALIZER;
 
 //#define VM_DEBUG_SEND
@@ -2175,3 +2177,5 @@
 	_debug_seeking = 0;
 	_debug_step_running = 0;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/antialias.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/antialias.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/antialias.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 static void antialiase_simple(gfx_pixmap_t *pixmap, int mask[], int shift_const, gfx_mode_t *mode) {
 	int x, y, c;
 	int bytespp = mode->bytespp;
@@ -157,3 +159,5 @@
 		GFXERROR("Invalid antialiasing mode %d (internal error)\n", type);
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/font-5x8.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/font-5x8.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/font-5x8.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -2,6 +2,8 @@
 
 #include "sci/include/gfx_system.h"
 
+namespace Sci {
+
 static int gfxfont_5x8_widths[] = {
 	5,	/* 0x00 */
 	5,	/* 0x01 */
@@ -2578,3 +2580,5 @@
 	8, /* Char size (occupied, in bytes) */
 	gfxfont_5x8_data /* Bulk data */
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/font-6x10.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/font-6x10.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/font-6x10.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -2,6 +2,8 @@
 
 #include "sci/include/gfx_system.h"
 
+namespace Sci {
+
 static int gfxfont_6x10_widths[] = {
 	6,	/* 0x00 */
 	6,	/* 0x01 */
@@ -3090,3 +3092,5 @@
 	10, /* Char size (occupied, in bytes) */
 	gfxfont_6x10_data /* Bulk data */
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/font.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/font.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 int font_counter = 0;
 
 void gfxr_free_font(gfx_bitmap_font_t *font) {
@@ -352,3 +354,5 @@
 
 	return pxm;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_crossblit.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -49,6 +49,8 @@
 #	endif
 #endif
 
+namespace Sci {
+
 static void FUNCTION_NAME(byte *dest, byte *src, int bytes_per_dest_line, int bytes_per_src_line,
                           int xl, int yl, byte *alpha, int bytes_per_alpha_line, int bytes_per_alpha_pixel,
                           unsigned int alpha_test_mask, unsigned int alpha_min
@@ -99,6 +101,8 @@
 	}
 }
 
+} // End of namespace Sci
+
 /* reset to original optimisations for Win32: */
 /* (does not reset intrinsics) */
 #ifdef WIN32

Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 #include "sci/include/gfx_driver.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 struct _scummvm_driver_state {
 	gfx_pixmap_t *priority[2];
 	byte *visual[3];
@@ -504,3 +506,5 @@
 	scummvm_usec_sleep,
 	NULL
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_line.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_line.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_line.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -23,6 +23,8 @@
  *
  */
 
+namespace Sci {
+
 #define LINEMACRO(startx, starty, deltalinear, deltanonlinear, linearvar, nonlinearvar, \
                   linearend, nonlinearstart, linearmod, nonlinearmod) \
 	x = (startx); y = (starty); \
@@ -89,3 +91,5 @@
 
 
 #undef LINEMACRO
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_pixmap_scale.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 #define EXTEND_COLOR(x) (unsigned) ((((unsigned) x) << 24) | (((unsigned) x) << 16) | (((unsigned) x) << 8) | ((unsigned) x))
 #define PALETTE_MODE mode->palette
 
@@ -485,3 +487,4 @@
 #undef SIZETYPE
 #undef EXTEND_COLOR
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_res_options.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 
 #include <ctype.h>
 
+namespace Sci {
+
 //#define DEBUG
 
 static inline int matches_patternlist(gfx_res_pattern_t *patterns, int nr, int val) {
@@ -196,3 +198,5 @@
 
 	return 0;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_resource.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 gfx_mode_t mode_1x1_color_index = { /* Fake 1x1 mode */
 	/* xfact */ 1, /* yfact */ 1,
 	/* bytespp */ 1,
@@ -200,6 +202,8 @@
 	return pixmap;
 }
 
+} // End of namespace Sci
+
 // Now construct the pixmap scaling functions
 #define EXTRA_BYTE_OFFSET 0
 #define SIZETYPE guint8
@@ -244,6 +248,8 @@
 #undef EXTRA_BYTE_OFFSET
 #undef SIZETYPE
 
+namespace Sci {
+
 static inline void _gfx_xlate_pixmap_unfiltered(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
 	switch (mode->bytespp) {
 
@@ -414,3 +420,5 @@
 	pic->undithered_buffer = 0;
 	free(pic);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_support.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_support.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_support.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,8 +30,6 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/gfx_tools.h"
 
-int gfx_crossblit_alpha_threshold = 128;
-
 #define DRAWLINE_FUNC _gfx_draw_line_buffer_1
 #define PIXELWIDTH 1
 #include "gfx_line.cpp"
@@ -56,6 +54,10 @@
 #undef PIXELWIDTH
 #undef DRAWLINE_FUNC
 
+namespace Sci {
+
+int gfx_crossblit_alpha_threshold = 128;
+
 inline void gfx_draw_line_buffer(byte *buffer, int linewidth, int pixelwidth, Common::Point start, Common::Point end, unsigned int color) {
 	switch (pixelwidth) {
 
@@ -105,6 +107,7 @@
 	gfx_draw_box_buffer(pxm->index_data, pxm->index_xl, box, color);
 }
 
+} // End of namespace Sci
 
 // Import various crossblit functions
 #undef USE_PRIORITY
@@ -223,6 +226,8 @@
 #undef BYTESPP
 #undef REVERSE_ALPHA
 
+namespace Sci {
+
 static void (*crossblit_fns[5])(byte *, byte *, int, int, int, int, byte *, int, int, unsigned int, unsigned int) = { NULL,
         _gfx_crossblit_8,
         _gfx_crossblit_16,
@@ -397,3 +402,5 @@
 
 	return GFX_OK;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_test.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_test.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_test.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -43,6 +43,8 @@
 #include <gfx_tools.h>
 #include <gfx_operations.h>
 
+namespace Sci {
+
 int
 sci0_palette;
 
@@ -1469,6 +1471,4 @@
 	0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc
 };
 
-
-
-
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/gfx_tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/gfx_tools.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 rect_t gfx_rect_fullscreen = {0, 0, 320, 200};
 
 void gfx_clip_box_basic(rect_t *box, int maxx, int maxy) {
@@ -398,3 +400,5 @@
 
 	return pixmap;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/menubar.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/menubar.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "sci/include/engine.h"
 #include "sci/include/menubar.h"
 
+namespace Sci {
+
 #define SIZE_INF 32767
 
 menubar_t *menubar_new() {
@@ -449,3 +451,5 @@
 		return 0;
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/operations.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/operations.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 
 #include <ctype.h>
 
+namespace Sci {
+
 #define PRECISE_PRIORITY_MAP // Duplicate all operations on the local priority map as appropriate
 
 #undef GFXW_DEBUG_DIRTY 
@@ -2180,3 +2182,5 @@
 	gfx_free_pixmap(state->driver, pxm);
 	return GFX_OK;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resmgr.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resmgr.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -35,6 +35,8 @@
 #include "sci/include/gfx_resmgr.h"
 #include "sci/include/gfx_state_internal.h"
 
+namespace Sci {
+
 #undef TIME_PICDRAWING
 
 // Invalid hash mode: Used to invalidate modified pics
@@ -617,3 +619,5 @@
 		return res->unscaled_data.pointer;
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_cursor_0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_cursor_0.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_cursor_0.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,7 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
 
 #define CURSOR_RESOURCE_SIZE 68
 #define CURSOR_SIZE 16
@@ -93,3 +94,5 @@
 gfx_pixmap_t *gfxr_draw_cursor01(int id, byte *resource, int size) {
 	return _gfxr_draw_cursor(id, resource, size, 1);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_font.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,7 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
 
 extern int font_counter;
 
@@ -137,3 +138,5 @@
 
 	return font;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_pal_1.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/gfx_resource.h"
 
+namespace Sci {
+
 #define MAX_COLORS 256
 #define PALETTE_START 260
 #define COLOR_OK 0x01
@@ -157,3 +159,5 @@
 
 	return retval;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_pic_0.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 #undef GFXR_DEBUG_PIC0 /* Enable to debug pic0 messages */
 #undef FILL_RECURSIVE_DEBUG /* Enable for verbose fill debugging */
 
@@ -1204,6 +1206,8 @@
 
 #undef TEST_POINT
 
+} // End of namespace Sci
+	
 /* Now include the actual filling code (with scaling support) */
 #define FILL_FUNCTION _gfxr_fill_any
 #define FILL_FUNCTION_RECURSIVE _gfxr_fill_any_recursive
@@ -1218,8 +1222,12 @@
 #undef FILL_FUNCTION_RECURSIVE
 #undef FILL_FUNCTION
 
+namespace Sci {
+
 #endif /* defined(WITH_PIC_SCALING) */
-
+	
+} // End of namespace Sci
+	
 /* Include again, but this time without support for scaling */
 #define FILL_FUNCTION _gfxr_fill_1
 #define FILL_FUNCTION_RECURSIVE _gfxr_fill_1_recursive
@@ -1232,6 +1240,7 @@
 #undef FILL_FUNCTION_RECURSIVE
 #undef FILL_FUNCTION
 
+namespace Sci {
 
 #define GET_ABS_COORDS(x, y) \
   temp = *(resource + pos++); \
@@ -1999,3 +2008,4 @@
 	}
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_picfill.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/include/gfx_resource.h"
 
+namespace Sci {
+
 /* Generic pic filling code, to be included by sci_pic_0.c
  *
  *
@@ -416,3 +418,5 @@
 #  undef proj_xl_bound
 #  undef proj_xr_bound
 #endif
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_picfill_aux.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_picfill_aux.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_picfill_aux.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -35,6 +35,8 @@
  *
  */
 
+namespace Sci {
+
 #define CLIPMASK_HARD_BOUND 0x80 /* ensures that we don't re-fill filled stuff */
 
 static void AUXBUF_FILL_HELPER(gfxr_pic_t *pic, int old_xl, int old_xr, int y, int dy,
@@ -209,3 +211,5 @@
 
 
 #undef CLIPMASK_HARD_BOUND
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_resmgr.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -33,6 +33,8 @@
 
 #include "common/util.h"
 
+namespace Sci {
+
 int gfxr_interpreter_options_hash(gfx_resource_type_t type, int version, gfx_options_t *options, void *internal, int palette) {
 	switch (type) {
 	case GFX_RESOURCE_TYPE_VIEW:
@@ -292,3 +294,5 @@
 int gfxr_interpreter_needs_multicolored_pointers(int version, void *internal) {
 	return (version > SCI_VERSION_1);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_view_0.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_view_0.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_view_0.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 gfx_pixmap_t *gfxr_draw_cel0(int id, int loop, int cel, byte *resource, int size, gfxr_view_t *view, int mirrored) {
 	int xl = get_int_16(resource);
 	int yl = get_int_16(resource + 2);
@@ -226,3 +228,5 @@
 
 	return view;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/resource/sci_view_1.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_tools.h"
 
+namespace Sci {
+
 #define V1_LOOPS_NR_OFFSET 0
 #define V1_MIRROR_MASK 2
 #define V1_PALETTE_OFFSET 6
@@ -516,3 +518,5 @@
 
 	return view;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/sbtree.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/sbtree.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/sbtree.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include <stdlib.h>
 #include <stdio.h>
 
+namespace Sci {
+
 #define NOT_A_KEY -1
 
 typedef struct {
@@ -421,3 +423,5 @@
 }
 
 #endif // SBTREE_DEBUG
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/sci_widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/sci_widgets.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/menubar.h"
 #include "sci/include/sci_widgets.h"
 
+namespace Sci {
+
 #define SCI_SPECIAL_CHAR_ARROW_UP 0x18
 #define SCI_SPECIAL_CHAR_ARROW_DOWN 0x19
 
@@ -663,3 +665,5 @@
 
 	return menu_port;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/gfx/widgets.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/widgets.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/gfx/widgets.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/gfx_widgets.h"
 
+namespace Sci {
+
 #undef GFXW_DEBUG_DIRTY // Enable to debug dirty rectangle propagation (writes to stderr)
 
 #ifdef GFXW_DEBUG_DIRTY
@@ -2147,3 +2149,5 @@
 			gfxw_annihilate(GFXW(visual->port_refs[i]));
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/include/aatree.h
===================================================================
--- scummvm/trunk/engines/sci/include/aatree.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/aatree.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #ifndef _SCI_AATREE_H
 #define _SCI_AATREE_H
 
+namespace Sci {
+
 /* Andersson tree implementation. Stores data pointers in a balanced binary
 ** tree. A user-supplied comparison function defines the ordering. For the
 ** semantics of this function see qsort(3)
@@ -80,4 +82,6 @@
 ** Returns   : (void *) The data element
 */
 
+} // End of namespace Sci
+
 #endif /* !_SCI_AATREE_H */

Modified: scummvm/trunk/engines/sci/include/console.h
===================================================================
--- scummvm/trunk/engines/sci/include/console.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/console.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -41,6 +41,7 @@
 #define SCI_CONSOLE
 #include "sci/include/gfx_operations.h"
 
+namespace Sci {
 
 extern int con_passthrough;
 /* Echo all sciprintf() stuff to the text console */
@@ -244,4 +245,6 @@
 ** Returns   : (void)
 */
 
+} // End of namespace Sci
+
 #endif /* _SCI_CONSOLE_H_ */

Modified: scummvm/trunk/engines/sci/include/engine.h
===================================================================
--- scummvm/trunk/engines/sci/include/engine.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/engine.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -49,6 +49,8 @@
 #include "sci/include/gfx_state_internal.h"
 #include "sci/include/sfx_engine.h"
 
+namespace Sci {
+
 #define FREESCI_CURRENT_SAVEGAME_VERSION 8
 #define FREESCI_MINIMUM_SAVEGAME_VERSION 8
 
@@ -323,4 +325,6 @@
 
 }
 
+} // End of namespace Sci
+
 #endif /* !_SCI_ENGINE_H */

Modified: scummvm/trunk/engines/sci/include/event.h
===================================================================
--- scummvm/trunk/engines/sci/include/event.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/event.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 
 #include "sci/include/uinput.h"
 
+namespace Sci {
+
 struct _state;
 
 sci_event_t getEvent(struct _state *s);
@@ -37,4 +39,6 @@
 **             existing events.
 */
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/include/gfx_driver.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_driver.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_driver.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,7 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/uinput.h"
 
+namespace Sci {
 
 typedef enum {
 	GFX_BUFFER_FRONT = 0,
@@ -316,4 +317,6 @@
 
 } gfx_driver_t;
 
+} // End of namespace Sci
+
 #endif /* !_SCI_GFX_DRIVER_H_ */

Modified: scummvm/trunk/engines/sci/include/gfx_operations.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_operations.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_operations.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -34,6 +34,8 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/uinput.h"
 
+namespace Sci {
+
 #define GFXOP_NO_POINTER -1
 
 /* Threshold in color index mode to differentiate between visible and non-visible stuff.
@@ -722,4 +724,6 @@
 ** Reuturns  : (int) 1 if rect is empty now, 0 otherwise
 */
 
+} // End of namespace Sci
+
 #endif /* !_GFX_OPERATIONS_H_ */

Modified: scummvm/trunk/engines/sci/include/gfx_options.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_options.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_options.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/gfx_tools.h"
 #include "sci/include/gfx_res_options.h"
 
+namespace Sci {
+
 /* Dirty rectangle heuristics: */
 
 /* One: Redraw one rectangle surrounding the dirty area (insert is O(1)) */
@@ -79,6 +81,7 @@
 /* SQ3 counts whitespaces towards the total text size, as does gfxop_get_text_params() if this is set: */
 #define GFX_WORKAROUND_WHITESPACE_COUNT (1<<0)
 
+} // End of namespace Sci
 
 #endif /* !_GFX_OPTIONS_H_ */
 

Modified: scummvm/trunk/engines/sci/include/gfx_res_options.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_res_options.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_res_options.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/gfx_resmgr.h"
 
+namespace Sci {
+
 typedef struct _gfx_res_pattern {
 	int min, max;
 } gfx_res_pattern_t;
@@ -104,4 +106,6 @@
 ** not do anything in colour index mode.
 */
 
+} // End of namespace Sci
+
 #endif /* !_GFX_RES_OPTIONS_H_ */

Modified: scummvm/trunk/engines/sci/include/gfx_resmgr.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_resmgr.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_resmgr.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -33,6 +33,8 @@
 #include "sci/include/gfx_resource.h"
 #include "sci/include/sbtree.h"
 
+namespace Sci {
+
 typedef enum {
 	GFX_RESOURCE_TYPE_VIEW = 0,
 	GFX_RESOURCE_TYPE_PIC,
@@ -353,4 +355,6 @@
 **                   otherwise
 */
 
+} // End of namespace Sci
+
 #endif /* !_GFX_RSMGR_H_ */

Modified: scummvm/trunk/engines/sci/include/gfx_resource.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_resource.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_resource.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/gfx_driver.h"
 
+namespace Sci {
+
 /*** Styles for pic0 drawing ***/
 /* Dithering modes */
 #define GFXR_DITHER_MODE_D16 0  /* Sierra SCI style */
@@ -431,6 +433,7 @@
 	return ((int) offset[0] | (((int) offset[1]) << 8));
 }
 
+} // End of namespace Sci
 
 #endif /* !_GFX_RESOURCE_H_ */
 

Modified: scummvm/trunk/engines/sci/include/gfx_state_internal.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_state_internal.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_state_internal.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,7 @@
 #include "sci/include/gfx_resmgr.h"
 #include "sci/include/gfx_system.h"
 
+namespace Sci {
 
 #define GFXW_FLAG_VISIBLE (1<<0)
 #define GFXW_FLAG_OPAQUE (1<<1)
@@ -232,5 +233,7 @@
 #undef WIDGET_COMMON
 #undef WIDGET_CONTAINER
 
+} // End of namespace Sci
+
 #endif /* !_GFX_STATE_INTERNAL_H_ */
 

Modified: scummvm/trunk/engines/sci/include/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_system.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_system.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,7 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/resource.h"
 
+namespace Sci {
 
 #define GFX_DEBUG
 
@@ -400,4 +401,6 @@
 	GFX_COLOR_MODE_TRUE = 4 /* True color mode (24 bpp padded to 32 bpp) */
 } gfx_color_mode_t;
 
+} // End of namespace Sci
+
 #endif /* !_SCI_GFX_SYSTEM_ */

Modified: scummvm/trunk/engines/sci/include/gfx_tools.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_tools.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_tools.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "sci/include/gfx_system.h"
 #include "sci/include/gfx_driver.h"
 
+namespace Sci {
+
 typedef enum {
 	GFX_XLATE_FILTER_NONE,
 	GFX_XLATE_FILTER_LINEAR,
@@ -270,5 +272,6 @@
 ** Returns   : (gfx_pixmap_t *) pixmap
 */
 
+} // End of namespace Sci
 
 #endif /* !_GFX_TOOLS_H_ */

Modified: scummvm/trunk/engines/sci/include/gfx_widgets.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_widgets.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/gfx_widgets.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 
 #include "sci/include/gfx_state_internal.h"
 
+namespace Sci {
+
 /* Enable the next line to keep a list of pointers to all widgets, with up to the specified amount
 ** of members (/SLOW/) */
 /* #define GFXW_DEBUG_WIDGETS 2048 */
@@ -544,4 +546,6 @@
 void
 gfxw_widget_kill_chrono(gfxw_visual_t *visual, int window);
 
+} // End of namespace Sci
+
 #endif /* !_GFX_WIDGETS_H_ */

Modified: scummvm/trunk/engines/sci/include/heapmgr.h
===================================================================
--- scummvm/trunk/engines/sci/include/heapmgr.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/heapmgr.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/resource.h"
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 #define HEAPENTRY_INVALID -1
 
 // FIXME: We write (i == 0 || i > 0) instead of (i >= 0) to silence certain annoying warnings:
@@ -118,4 +120,6 @@
 #define _HEAPENTRY_IGNORE_ME(x)
 #define DEFINE_HEAPENTRY(e, i, p) DEFINE_HEAPENTRY_WITH_CLEANUP(e, i, p, _HEAPENTRY_IGNORE_ME)
 
+} // End of namespace Sci
+
 #endif /* !_FREESCI_HEAPMGR_H_ */

Modified: scummvm/trunk/engines/sci/include/kdebug.h
===================================================================
--- scummvm/trunk/engines/sci/include/kdebug.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/kdebug.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #ifndef _SCI_KDEBUG_H_
 #define _SCI_KDEBUG_H_
 
+namespace Sci {
+
 struct _state;
 #define SCIk_DEBUG_MODES 17
 
@@ -93,5 +95,6 @@
 #define _DEBUG_FLAG_LOGGING 1 /* Log each command executed */
 #define _DEBUG_FLAG_BREAK_ON_WARNINGS 2 /* Break on warnings */
 
+} // End of namespace Sci
 
 #endif

Modified: scummvm/trunk/engines/sci/include/kernel.h
===================================================================
--- scummvm/trunk/engines/sci/include/kernel.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/kernel.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -35,6 +35,8 @@
 #include "sci/include/vm.h"
 #include "sci/include/console.h" /* sciprintf() */
 
+namespace Sci {
+
 extern int _kdebug_cheap_event_hack;
 extern int _kdebug_cheap_soundcue_hack;
 extern int stop_on_event;
@@ -348,4 +350,6 @@
 
 extern sci_kernel_function_t kfunct_mappers[];
 
+} // End of namespace Sci
+
 #endif /* _SCI_KERNEL_H_ */

Modified: scummvm/trunk/engines/sci/include/list.h
===================================================================
--- scummvm/trunk/engines/sci/include/list.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/list.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -61,6 +61,8 @@
 
 #include "common/scummsys.h"
 
+namespace Sci {
+
 /* List definitions. */
 #define LIST_HEAD(name, type)						\
 struct name {								\
@@ -184,4 +186,6 @@
 #define CLIST_NEXT(elm, field)		((elm)->field.cle_next)
 #define CLIST_PREV(elm, field)		((elm)->field.cle_prev)
 
+} // End of namespace Sci
+
 #endif /* !_SCI_LIST_H */

Modified: scummvm/trunk/engines/sci/include/listener.h
===================================================================
--- scummvm/trunk/engines/sci/include/listener.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/listener.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #ifndef _LISTENER_H_
 #  define _LISTENER_H_
 
+namespace Sci {
+
 /* Event listener interface */
 
 typedef struct {
@@ -33,4 +35,6 @@
 	void *self;
 } listener_t;
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/include/menubar.h
===================================================================
--- scummvm/trunk/engines/sci/include/menubar.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/menubar.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/gfx_operations.h"
 #include "sci/include/gfx_widgets.h"
 
+namespace Sci {
+
 struct _state;
 
 #define MENU_FREESCI_BLATANT_PLUG 0xfff0
@@ -214,5 +216,7 @@
 ** Returns   : (int) 1 on match, 0 otherwise
 */
 
+} // End of namespace Sci
+
 #endif /* !_SCI_MENUBAR_H_ */
 

Modified: scummvm/trunk/engines/sci/include/resource.h
===================================================================
--- scummvm/trunk/engines/sci/include/resource.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/resource.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -103,6 +103,8 @@
 #  define O_BINARY 0
 #endif
 
+namespace Sci {
+
 /**** FUNCTION DECLARATIONS ****/
 
 #ifdef WIN32
@@ -117,7 +119,7 @@
 }
 
 #define getUInt16(d) (guint16)(getInt16(d))
-
+	
 /* Turns a little endian 16 bit value into a machine-dependant 16 bit value
 ** Parameters: d: Pointer to the memory position from which to read
 ** Returns   : (gint16) The (possibly converted) 16 bit value
@@ -293,4 +295,6 @@
 #  define BREAKPOINT() { error("Missed breakpoint in %s, line %d\n", __FILE__, __LINE__); *((int *) NULL) = 42; }
 #endif  /* !BREAKPOINT() */
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/include/sbtree.h
===================================================================
--- scummvm/trunk/engines/sci/include/sbtree.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sbtree.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -36,6 +36,7 @@
 #  include <stdio.h>
 #endif
 
+namespace Sci {
 
 typedef struct {
 	int entries_nr;
@@ -104,6 +105,7 @@
 ** This function will only work properly the original data contained no duplicate keys.
 */
 
+} // End of namespace Sci
 
 #endif /* !_SBTREE_H_ */
 

Modified: scummvm/trunk/engines/sci/include/sci_memory.h
===================================================================
--- scummvm/trunk/engines/sci/include/sci_memory.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sci_memory.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -50,6 +50,8 @@
 #  include <direct.h> // for chdir, rmdir, _gecwd, getcwd, mkdir
 #endif
 
+namespace Sci {
+
 /********** the memory allocation macros **********/
 
 #ifdef UNCHECKED_MALLOCS
@@ -169,4 +171,6 @@
 ** The number of references accounted for will be one.
 */
 
+} // End of namespace Sci
+
 #endif	/* _SCI_MEMORY_H */

Modified: scummvm/trunk/engines/sci/include/sci_midi.h
===================================================================
--- scummvm/trunk/engines/sci/include/sci_midi.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sci_midi.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #ifndef _SCI_MIDI_H_
 #define _SCI_MIDI_H_
 
+namespace Sci {
+
 #define MIDI_RHYTHM_CHANNEL 9
 
 /* Special SCI sound stuff */
@@ -48,4 +50,6 @@
 
 #define SCI_MIDI_CONTROLLER(status) ((status & 0xF0) == 0xB0)
 
+} // End of namespace Sci
+
 #endif /* !defined(_SCI_MIDI_H_) */

Modified: scummvm/trunk/engines/sci/include/sci_widgets.h
===================================================================
--- scummvm/trunk/engines/sci/include/sci_widgets.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sci_widgets.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 /* The following flags are applicable to windows in SCI0: */
 #define WINDOW_FLAG_TRANSPARENT 0x01
 
@@ -206,5 +208,7 @@
 ** Returns   : (gfxw_port_t *) The modified menu
 */
 
+} // End of namespace Sci
+
 #endif /* _!SCI_WIDGETS_H_ */
 

Modified: scummvm/trunk/engines/sci/include/sciresource.h
===================================================================
--- scummvm/trunk/engines/sci/include/sciresource.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sciresource.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -35,6 +35,8 @@
 #include "sci/include/resource.h"
 #include "sci/include/versions.h"
 
+namespace Sci {
+
 #define SCI_MAX_RESOURCE_SIZE 0x0400000
 /* The maximum allowed size for a compressed or decompressed resource */
 
@@ -432,6 +434,7 @@
 ** Returns   : (void)
 */
 
+} // End of namespace Sci
 
 #endif
 

Modified: scummvm/trunk/engines/sci/include/scitypes.h
===================================================================
--- scummvm/trunk/engines/sci/include/scitypes.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/scitypes.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -36,6 +36,8 @@
 #include <io.h>
 #endif
 
+namespace Sci {
+
 typedef int8 gint8;
 typedef uint8 guint8;
 
@@ -66,4 +68,6 @@
 #endif
 } sci_dir_t; /* used by sci_find_first and friends */
 
+} // End of namespace Sci
+
 #endif /* !SCI_TYPES */

Modified: scummvm/trunk/engines/sci/include/script.h
===================================================================
--- scummvm/trunk/engines/sci/include/script.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/script.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 /*#define SCRIPT_DEBUG */
 
 #define SCI_SCRIPTS_NR 1000
@@ -216,4 +218,6 @@
 struct _state;
 void script_free_breakpoints(struct _state *s);
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/include/sfx_core.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_core.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_core.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,9 +28,13 @@
 
 #include "common/scummsys.h"
 
+namespace Sci {
+
 #define SFX_OK 0
 #define SFX_ERROR -1
 
 #define MIDI_CHANNELS 16
 
+} // End of namespace Sci
+
 #endif /* !defined(_SFX_CORE_H_) */

Modified: scummvm/trunk/engines/sci/include/sfx_engine.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_engine.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_engine.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "sci/include/sfx_iterator.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 #define SOUND_TICK 1000000 / 60
 /* Approximately 16666 microseconds */
 
@@ -174,5 +176,6 @@
 **             (fade_params_t *) fade_setup: The precise fade-out configuration to use
 */
 
+} // End of namespace Sci
 
 #endif /* !defined(_SFX_ENGINE_H_) */

Modified: scummvm/trunk/engines/sci/include/sfx_iterator.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_iterator.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_iterator.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/sfx_pcm.h"
 #include "sci/include/listener.h"
 
+namespace Sci {
+
 #define SI_FINISHED -1 /* Song finished playing */
 #define SI_LOOP -2 /* Song just looped */
 #define SI_ABSOLUTE_CUE -3 /* Found a song cue (absolute) */
@@ -350,4 +352,6 @@
 ** This assumes that the last call to 'it->next()' returned SI_PCM.
 */
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/include/sfx_iterator_internal.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_iterator_internal.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_iterator_internal.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,7 @@
 #include "sci/include/sfx_iterator.h"
 #include "sci/include/sci_midi.h"
 
+namespace Sci {
 
 /* States */
 
@@ -234,4 +235,6 @@
 **             (pcm_data_internal_t) conf: PCM encoding
 */
 
+} // End of namespace Sci
+
 #endif /* !defined(_SFX_ITERATOR_INTERNAL_ */

Modified: scummvm/trunk/engines/sci/include/sfx_pcm.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_pcm.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_pcm.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/sfx_time.h"
 #include "sci/include/scitypes.h"
 
+namespace Sci {
+
 #define SFX_PCM_MONO 0
 #define SFX_PCM_STEREO_LR 1 /* left sample, then right sample */
 #define SFX_PCM_STEREO_RL 2 /* right sample, then left sample */
@@ -178,4 +180,6 @@
 ** Returns   : (int) zero iff no PCM device is available
 */
 
+} // End of namespace Sci
+
 #endif /* !defined(_SFX_PCM_H_) */

Modified: scummvm/trunk/engines/sci/include/sfx_player.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_player.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_player.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,12 +25,14 @@
 
 /* song player structure */
 
+#ifndef _SFX_PLAYER_H
+#define _SFX_PLAYER_H
+
 #include "sci/include/sfx_engine.h"
 #include "sci/include/sfx_iterator.h"
 #include "sci/include/sciresource.h"
 
-#ifndef _SFX_PLAYER_H
-#define _SFX_PLAYER_H
+namespace Sci {
 
 typedef void tell_synth_func(int buf_nr, byte *buf);
 
@@ -162,4 +164,6 @@
 ** call should be used by song players, but not by the core sound system
 */
 
+} // End of namespace Sci
+
 #endif /* !_SFX_PLAYER_H */

Modified: scummvm/trunk/engines/sci/include/sfx_songlib.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_songlib.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_songlib.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -34,6 +34,8 @@
 #include "sci/include/scitypes.h"
 #include "sci/include/sfx_iterator.h"
 
+namespace Sci {
+
 #define SOUND_STATUS_STOPPED   0
 #define SOUND_STATUS_PLAYING   1
 #define SOUND_STATUS_SUSPENDED 2
@@ -197,4 +199,6 @@
 **             (RESTORE_BEHAVIOR) action: The desired action
 */
 
+} // End of namespace Sci
+
 #endif /* !_SCI_SOUND_SERVER_H_ */

Modified: scummvm/trunk/engines/sci/include/sfx_time.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_time.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_time.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #ifndef _SFX_TIME_H_
 #define _SFX_TIME_H_
 
+namespace Sci {
+
 typedef struct {
 	long secs;
 	long usecs;
@@ -84,6 +86,6 @@
 **                                            the epoch described there
 */
 
+} // End of namespace Sci
 
-
 #endif /* !defined(_SFX_TIME_H_) */

Modified: scummvm/trunk/engines/sci/include/sfx_timer.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_timer.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sfx_timer.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 
 #include "sci/include/sfx_core.h"
 
+namespace Sci {
+
 typedef struct {
 	int delay_ms; /* Approximate delay (in milliseconds) between calls */
 
@@ -51,4 +53,6 @@
 	*/
 } sfx_timer_t;
 
+} // End of namespace Sci
+
 #endif /* !_FREESCI_SFX_TIMER_H_ */

Modified: scummvm/trunk/engines/sci/include/sys_strings.h
===================================================================
--- scummvm/trunk/engines/sci/include/sys_strings.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/sys_strings.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #ifndef _FREESCI_SYSTEM_STRINGS_H_
 #define _FREESCI_SYSTEM_STRINGS_H_
 
+namespace Sci {
+
 #define SYS_STRINGS_MAX 4
 
 #define SYS_STRING_SAVEDIR 0
@@ -75,4 +77,6 @@
 ** Parameters: (sys_strings_t *) strings: The string table to deallocate
 */
 
+} // End of namespace Sci
+
 #endif /* !_FREESCI_SYSTEM_STRINGS_H_ */

Modified: scummvm/trunk/engines/sci/include/uinput.h
===================================================================
--- scummvm/trunk/engines/sci/include/uinput.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/uinput.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,7 @@
 #  include <unistd.h>
 #endif
 
+namespace Sci {
 
 struct _state;
 
@@ -126,4 +127,6 @@
 #define SCI_EVM_NO_FOOLOCK      (~(SCI_EVM_SCRLOCK | SCI_EVM_NUMLOCK | SCI_EVM_CAPSLOCK | SCI_EVM_INSERT))
 #define SCI_EVM_ALL             0xFF
 
+} // End of namespace Sci
+
 #endif /* _SCI_UINPUT_H */

Modified: scummvm/trunk/engines/sci/include/versions.h
===================================================================
--- scummvm/trunk/engines/sci/include/versions.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/versions.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 
 #include "sci/include/scitypes.h"
 
+namespace Sci {
+
 struct _state;
 
 #define SCI_VERSION(_major_, _minor_, _patchlevel_) (((_major_)<<20) | ((_minor_)<<10) | _patchlevel_)
@@ -147,4 +149,6 @@
 **             (sci_version_t) *result: The resulting version number on success
 */
 
+} // End of namespace Sci
+
 #endif /* !_SCI_VERSIONS_H_ */

Modified: scummvm/trunk/engines/sci/include/vm.h
===================================================================
--- scummvm/trunk/engines/sci/include/vm.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/vm.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -37,6 +37,8 @@
 #ifndef _SCI_VM_H
 #define _SCI_VM_H
 
+namespace Sci {
+
 #define VM_STACK_SIZE 0x1000
 /* Number of bytes to be allocated for the stack */
 
@@ -821,4 +823,6 @@
 ** Returns   : (object_t *) The object in question, or NULL if there is none
 */
 
+} // End of namespace Sci
+
 #endif /* !_SCI_VM_H */

Modified: scummvm/trunk/engines/sci/include/vm_types.h
===================================================================
--- scummvm/trunk/engines/sci/include/vm_types.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/vm_types.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 
 #include "sci/include/scitypes.h"
 
+namespace Sci {
+
 #define SCI_REG_SIZE 16;
 #define SCI_SEG_SIZE 16;
 
@@ -63,5 +65,6 @@
 #define NULL_REG_INITIALIZER {0, 0}
 extern reg_t NULL_REG;
 
+} // End of namespace Sci
 
 #endif /* !_SCI_VM_TYPES_H_ */

Modified: scummvm/trunk/engines/sci/include/vocabulary.h
===================================================================
--- scummvm/trunk/engines/sci/include/vocabulary.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/include/vocabulary.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/versions.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 /*#define VOCABULARY_DEBUG */
 /*#define SCI_SIMPLE_SAID_CODE */ /* Whether the simplified Said() matching should be used */
 /*#define SCI_SIMPLE_SAID_DEBUG */ /* uncomment to enable simple said debugging */
@@ -416,5 +418,6 @@
 void
 vocab_gnf_dump(parse_tree_branch_t *branches, int branches_nr);
 
+} // End of namespace Sci
 
 #endif

Modified: scummvm/trunk/engines/sci/sci.cpp
===================================================================
--- scummvm/trunk/engines/sci/sci.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sci.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,10 +32,10 @@
 #include "sci/console.h"
 #include "sci/include/engine.h"
 
+namespace Sci {
+
 extern gfx_driver_t gfx_driver_scummvm;
 
-namespace Sci {
-
 int
 c_quit(state_t *s) {
 	script_abort_flag = 1; /* Terminate VM */

Modified: scummvm/trunk/engines/sci/scicore/aatree.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/aatree.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/aatree.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 struct aatree {
 	struct aatree *left, *right;
 	int level;
@@ -165,3 +167,5 @@
 
 	free(t);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/console.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/console.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/console.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,9 @@
 
 #include "sci/include/sci_memory.h"
 #include "sci/include/engine.h"
+
+namespace Sci {
+
 #ifdef SCI_CONSOLE
 
 int con_passthrough = 0;
@@ -137,3 +140,5 @@
 
 
 #endif /* SCI_CONSOLE */
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/decompress0.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress0.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/decompress0.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 /* #define _SCI_DECOMPRESS_DEBUG */
 
 /* 9-12 bit LZW encoding */
@@ -361,3 +363,4 @@
 	return 0;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/decompress01.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress01.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/decompress01.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 /***************************************************************************
 * The following code was originally created by Carl Muckenhoupt for his
 * SCI decoder. It has been ported to the FreeSCI environment by Sergey Lapin.
@@ -633,3 +635,4 @@
 	return 0;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/decompress1.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress1.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/decompress1.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,8 +29,8 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
 
-
 /* DEFLATE-DCL
 ** Refer to the FreeSCI docs for a full description.
 */
@@ -432,3 +432,4 @@
 	return 0;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/decompress11.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/decompress11.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/decompress11.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/sci_memory.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 #define DDEBUG if (0) printf
 
 void decryptinit3(void);
@@ -162,3 +164,4 @@
 	return 0;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/resource.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/resource.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -33,6 +33,8 @@
 #include "sci/include/sciresource.h"
 #include "sci/include/vocabulary.h" /* For SCI version auto-detection */
 
+namespace Sci {
+
 #undef SCI_REQUIRE_RESOURCE_FILES
 /* #define SCI_VERBOSE_RESMGR 1 */
 
@@ -804,3 +806,4 @@
 	_scir_free_old_resources(mgr, 0);
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/resource_map.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_map.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/resource_map.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,7 @@
 
 #include "common/file.h"
 
+namespace Sci {
 
 #define RESOURCE_MAP_FILENAME "resource.map"
 
@@ -529,3 +530,5 @@
 	return 0;
 }
 #endif
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/resource_patch.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/resource_patch.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/resource_patch.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "sci/include/sciresource.h"
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 void sci0_sprintf_patch_file_name(char *string, resource_t *res) {
 	sprintf(string, "%s.%03i", sci_resource_types[res->type], res->number);
 }
@@ -183,3 +185,4 @@
 	return 0;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/sci_memory.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/sci_memory.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/sci_memory.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #include "sci/include/sci_memory.h"
 #include "common/util.h"
 
+namespace Sci {
+
 /* set optimisations for Win32: */
 /* g on: enable global optimizations */
 /* t on: use fast code */
@@ -174,3 +176,5 @@
 	memcpy(dest, data, len);
 	return dest;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/script.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/script.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/script.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/engine.h"
 #include "common/util.h"
 
+namespace Sci {
+
 /* #define SCRIPT_DEBUG */
 
 #define END Script_None
@@ -491,3 +493,5 @@
 
 	/*vocabulary_free_snames(snames);*/
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/tools.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/tools.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/tools.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -67,6 +67,7 @@
 
 #include "sci/include/engine.h"
 
+namespace Sci {
 
 // FIXME: Get rid of G_DIR_SEPARATOR  / G_DIR_SEPARATOR_S
 #if _MSC_VER
@@ -535,3 +536,5 @@
 
 	return ((float) printable / (float) len >= 0.5);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/versions.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/versions.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/versions.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "sci/include/engine.h"
 #include "sci/include/resource.h"
 
+namespace Sci {
+
 void
 version_require_earlier_than(state_t *s, sci_version_t version) {
 	if (s->version_lock_flag)
@@ -88,3 +90,5 @@
 }
 
 #undef VERSION_DETECT_BUF_SIZE
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/vocab.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/vocab.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 #include "sci/include/engine.h"
 #include "sci/include/kernel.h"
 
+namespace Sci {
+
 int vocab_version;
 
 #define VOCAB_RESOURCE_PARSE_TREE_BRANCHES vocab_version==1 ? \
@@ -708,3 +710,5 @@
 			if (words[i].group == synonyms[sync].replaceant)
 				words[i].group = synonyms[sync].replacement;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/scicore/vocab_debug.cpp
===================================================================
--- scummvm/trunk/engines/sci/scicore/vocab_debug.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/scicore/vocab_debug.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/engine.h"
 #include "sci/include/sciresource.h"
 
+namespace Sci {
+
 /* Default kernel name table */
 #define SCI0_KNAMES_WELL_DEFINED 0x6e
 #define SCI0_KNAMES_DEFAULT_ENTRIES_NR 0x72
@@ -418,3 +420,5 @@
 
 	free(names);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/adlib.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/adlib.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/sfx/adlib.h"
 
+namespace Sci {
+
 adlib_instr adlib_sbi[96];
 
 void
@@ -69,3 +71,5 @@
 
 	return;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/adlib.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/adlib.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/adlib.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,7 @@
 
 #include "sci/include/resource.h"
 
+namespace Sci {
 
 #define ADLIB_VOICES 12
 
@@ -70,4 +71,6 @@
 void make_sbi(adlib_def *one, guint8 *buffer);
 /* Converts a raw SCI adlib instrument into the adlib register format. */
 
+} // End of namespace Sci
+
 #endif /* _SFX_ADLIB_H_ */

Modified: scummvm/trunk/engines/sci/sfx/core.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/core.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/core.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -33,6 +33,7 @@
 #include "sci/include/sci_midi.h"
 #include "common/mutex.h"
 
+namespace Sci {
 
 /*#define DEBUG_SONG_API*/
 /*#define DEBUG_CUES*/
@@ -903,3 +904,5 @@
 	song_lib_free(self->songlib);
 	_update(self);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/device/alsa-midi.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/device/alsa-midi.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/device/alsa-midi.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 
 #include <alsa/asoundlib.h>
 
+namespace Sci {
+
 #define SCI_ALSA_MIDI_VERSION "0.1"
 
 static snd_midi_event_t *parser = NULL;
@@ -214,4 +216,6 @@
 	amclose,
 };
 
+} // End of namespace Sci
+
 #endif

Modified: scummvm/trunk/engines/sci/sfx/device/camd-midi.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/device/camd-midi.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/device/camd-midi.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -37,6 +37,7 @@
 #include <proto/intuition.h>
 #include <stdio.h>
 
+namespace Sci {
 
 #define SWAP_BYTES
 #define FILL_BYTES
@@ -150,4 +151,6 @@
 	&camd_close
 };
 
+} // End of namespace Sci
+
 #endif /* HAVE_PROTO_CAMD_H */

Modified: scummvm/trunk/engines/sci/sfx/device/devices.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/device/devices.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/device/devices.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -33,6 +33,8 @@
 
 #include "sci/include/resource.h"
 
+namespace Sci {
+
 static struct _midi_device *devices_midi[] = {
 	NULL
 };
@@ -84,3 +86,5 @@
 
 	return NULL;
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/device/unixraw-midi.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/device/unixraw-midi.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/device/unixraw-midi.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -30,6 +30,8 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+namespace Sci {
+
 #define SCI_UNIXRAW_MIDI_VERSION "0.1"
 
 #ifndef O_SYNC
@@ -90,3 +92,5 @@
 	&unixraw_reset_timer,
 	&unixraw_close
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/device.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/device.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/device.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #ifndef _SFX_DEVICE_H
 #define _SFX_DEVICE_H
 
+namespace Sci {
+
 /* Various types of resources */
 #define SFX_DEVICE_NONE 0
 #define SFX_DEVICE_MIDI 1 /* midi writer */
@@ -116,4 +118,6 @@
 ** Returns   : (void *) The device requested, or NULL if no match was found
 */
 
+} // End of namespace Sci
+
 #endif /* !_SFX_PLAYER_H */

Modified: scummvm/trunk/engines/sci/sfx/iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/iterator.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -33,6 +33,8 @@
 #include "sci/include/resource.h"
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 static const int MIDI_cmdlen[16] = {0, 0, 0, 0, 0, 0, 0, 0,
                                     2, 2, 2, 2, 1, 1, 2, 0
                                    };
@@ -2051,3 +2053,5 @@
 	/* Both are non-NULL: */
 	return songit_new_tee(it1, it2, 1); /* 'may destroy' */
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/mixer/soft.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/mixer/soft.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "../mixer.h"
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 /* Max. number of microseconds in difference allowed between independent audio streams */
 #define TIMESTAMP_MAX_ALLOWED_DELTA 2000
 
@@ -970,4 +972,6 @@
 	NULL
 };
 
-sfx_pcm_mixer_t* getMixer() { return &sfx_pcm_mixer_soft_linear; }
\ No newline at end of file
+sfx_pcm_mixer_t* getMixer() { return &sfx_pcm_mixer_soft_linear; }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/mixer/test.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer/test.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/mixer/test.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "../mixer.h"
 #include <time.h>
 
+namespace Sci {
+
 #if 0
 sfx_pcm_mixer_t *mix;
 
@@ -344,3 +346,5 @@
 #else
 int main() {}
 #endif
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/mixer.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/mixer.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,7 @@
 
 #include "sci/include/sfx_pcm.h"
 
+namespace Sci {
 
 #define SFX_PCM_FEED_MODE_ALIVE 0
 #define SFX_PCM_FEED_MODE_DEAD 1
@@ -124,4 +125,6 @@
 
 sfx_pcm_mixer_t* getMixer();
 
+} // End of namespace Sci
+
 #endif /* !defined(_SFX_MIXER_H_) */

Modified: scummvm/trunk/engines/sci/sfx/pcm-iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/pcm-iterator.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/pcm-iterator.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/resource.h" /* for BREAKPOINT */
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 #define D ((pcm_data_internal_t *)self->internal)
 
 static int
@@ -108,3 +110,5 @@
 	free(D);
 	free(self);
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/pcm_device.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/pcm_device.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/pcm_device.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,7 @@
 #include "sound/audiostream.h"
 #include "sound/mixer.h"
 
+namespace Sci {
 
 static int pcmout_scummvm_framesize;
 static Audio::AppendableAudioStream * pcmout_scummvm_audiostream;
@@ -74,3 +75,5 @@
 	{0, 0, 0},
 	0
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/player/players.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/players.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/player/players.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -25,6 +25,8 @@
 
 #include "sci/include/sfx_player.h"
 
+namespace Sci {
+
 extern sfx_player_t sfx_player_realtime;
 extern sfx_player_t sfx_player_polled;
 
@@ -49,3 +51,5 @@
 		return sfx_players[n];
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/player/polled.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/polled.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/player/polled.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "sci/sfx/softseq.h"
 #include "sci/sfx/mixer.h"
 
+namespace Sci {
+
 static song_iterator_t *play_it;
 static int play_paused = 0;
 static sfx_softseq_t *seq;
@@ -315,3 +317,5 @@
 	&pp_tell_synth,
 	0 /* polyphony */
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/player/realtime.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/player/realtime.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/player/realtime.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,8 @@
 #include "sci/include/sfx_player.h"
 #include "sci/sfx/sequencer.h"
 
+namespace Sci {
+
 static sfx_sequencer_t *seq;
 
 extern sfx_player_t sfx_player_realtime;
@@ -310,3 +312,5 @@
 	&rt_tell_synth,
 	0 /* polyphony */
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/seq/gm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/gm.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/seq/gm.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -35,6 +35,8 @@
 #include "instrument-map.h"
 #include <resource.h>
 
+namespace Sci {
+
 static midi_writer_t *writer = NULL;
 
 static int
@@ -175,3 +177,5 @@
 	64,	/* max polyphony */
 	0	/* no write-ahead needed inherently */
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/seq/instrument-map.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 #include "instrument-map.h"
 #include "sfx_engine.h"
 
+namespace Sci {
+
 sfx_instrument_map_t *
 sfx_instrument_map_new(int velocity_maps_nr) {
 	sfx_instrument_map_t *map = (sfx_instrument_map_t *)sci_malloc(sizeof(sfx_instrument_map_t));
@@ -522,3 +524,4 @@
 	return (midi_writer_t *) retval;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/seq/instrument-map.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/instrument-map.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/seq/instrument-map.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -32,6 +32,8 @@
 #include "resource.h"
 #include "../device.h"
 
+namespace Sci {
+
 #define SFX_INSTRUMENTS_NR	0x80
 #define SFX_RHYTHM_NR		0x80
 #define SFX_VELOCITIES_NR	0x80
@@ -126,5 +128,6 @@
 ** deallocates the instrument map when the writer is closed.
 */
 
+} // End of namespace Sci
 
 #endif /* !defined(SCI_INSTRUMENT_MAP_) */

Modified: scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/seq/map-mt32-to-gm.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include <stdarg.h>
 #include "instrument-map.h"
 
+namespace Sci {
+
 #define DEBUG_MT32_TO_GM
 
 static const char
@@ -797,3 +799,4 @@
 	return map;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/seq/oss-adlib.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -38,6 +38,8 @@
 #include <sys/soundcard.h>
 #include <sfx_iterator.h> /* for some MIDI information */
 
+namespace Sci {
+
 #if 1
 SEQ_DEFINEBUF(2048);
 static int seqfd;
@@ -363,4 +365,6 @@
 	0 /* Does not require any write-ahead by its own */
 };
 
+} // End of namespace Sci
+
 #endif /* HAVE_SYS_SOUNDCARD_H */

Modified: scummvm/trunk/engines/sci/sfx/seq/sequencers.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/sequencers.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/seq/sequencers.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -26,6 +26,8 @@
 #include "../sequencer.h"
 #include "sci/include/resource.h"
 
+namespace Sci {
+
 sfx_sequencer_t *sfx_sequencers[] = {
 	NULL
 };
@@ -48,3 +50,5 @@
 		return sfx_sequencers[n];
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/sequencer.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sequencer.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/sequencer.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -35,6 +35,8 @@
 #include "sci/sfx/device.h"
 #include "sci/include/scitypes.h"
 
+namespace Sci {
+
 #define SFX_SEQ_PATCHFILE_NONE -1
 
 typedef struct _sfx_sequencer {
@@ -142,5 +144,6 @@
 **                                 if not found
 */
 
+} // End of namespace Sci
 
 #endif /* _SFX_SEQUENCER_H_ */

Modified: scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq/SN76496.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include "sci/sfx/softseq.h"
 #include "sci/include/sci_midi.h"
 
+namespace Sci {
+
 #define FREQUENCY 44100
 #define CHANNELS_NR 3
 #define VOLUME_SHIFT 3
@@ -235,3 +237,5 @@
 	3, /* # of voices */
 	{FREQUENCY, SFX_PCM_MONO, SFX_PCM_FORMAT_S16_NATIVE}
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq/amiga.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 
 #include "common/frac.h"
 
+namespace Sci {
+
 #define FREQUENCY 44100
 #define CHANNELS_NR 10
 #define HW_CHANNELS_NR 16
@@ -635,3 +637,5 @@
 	HW_CHANNELS_NR, /* # of voices */
 	{FREQUENCY, SFX_PCM_STEREO_LR, SFX_PCM_FORMAT_S16_NATIVE}
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq/fluidsynth.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -36,6 +36,8 @@
 #include "../device.h"
 #include "resource.h"
 
+namespace Sci {
+
 static sfx_sequencer_t *gmseq;
 static fluid_settings_t* settings;
 static fluid_synth_t* synth;
@@ -243,4 +245,6 @@
 	{SAMPLE_RATE, CHANNELS, SFX_PCM_FORMAT_S16_NATIVE}
 };
 
+} // End of namespace Sci
+
 #endif /* HAVE_FLUIDSYNTH_H */

Modified: scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq/opl2.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -50,6 +50,8 @@
 
 #include "sound/fmopl.h"
 
+namespace Sci {
+
 #ifdef __DC__
 #define SAMPLE_RATE 22050
 #define CHANNELS SFX_PCM_MONO
@@ -699,3 +701,5 @@
 	ADLIB_VOICES, /* # of voices */
 	{SAMPLE_RATE, CHANNELS, SFX_PCM_FORMAT_S16_NATIVE}
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq/pcspeaker.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include "sci/sfx/softseq.h"
 #include "sci/include/sci_midi.h"
 
+namespace Sci {
+
 #define FREQUENCY 94020
 
 static int volume = 0x0600;
@@ -172,3 +174,5 @@
 	1, /* # of voices */
 	{FREQUENCY, SFX_PCM_MONO, SFX_PCM_FORMAT_S16_NATIVE}
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq/softsequencers.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -29,6 +29,8 @@
 
 #include "../softseq.h"
 
+namespace Sci {
+
 extern sfx_softseq_t sfx_softseq_opl2;
 extern sfx_softseq_t sfx_softseq_SN76496;
 extern sfx_softseq_t sfx_softseq_pcspeaker;
@@ -64,3 +66,5 @@
 		return NULL; /* Not found */
 	}
 }
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/softseq.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq.h	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/softseq.h	2009-02-21 10:23:36 UTC (rev 38676)
@@ -31,6 +31,7 @@
 #include "sci/sfx/sequencer.h"
 #include "sci/include/resource.h"
 
+namespace Sci {
 
 /* Software sequencer */
 typedef struct sfx_softseq {
@@ -127,4 +128,6 @@
 ** Returns   : (sfx_softseq_t *) The requested sequencer, or NULL if not found
 */
 
+} // End of namespace Sci
+
 #endif /* !defined(SFX_SOFTSEQ_H_) */

Modified: scummvm/trunk/engines/sci/sfx/songlib.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/songlib.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/songlib.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/sfx_engine.h"
 #include "sci/include/sci_memory.h"
 
+namespace Sci {
+
 #define debug_stream stderr
 
 GTimeVal
@@ -264,3 +266,4 @@
 
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/test-iterator.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/test-iterator.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/test-iterator.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -28,6 +28,8 @@
 #include <stdarg.h>
 #include <stdio.h>
 
+using namespace Sci;
+
 #define ASSERT_S(x) if (!(x)) { error("Failed assertion in L%d: " #x "\n", __LINE__); return; }
 #define ASSERT(x) ASSERT_S(x)
 

Modified: scummvm/trunk/engines/sci/sfx/time.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/time.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/time.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include "sci/include/sfx_time.h"
 #include "sci/include/resource.h"
 
+namespace Sci {
+
 sfx_timestamp_t
 sfx_new_timestamp(long secs, long usecs, int frame_rate) {
 	sfx_timestamp_t r;
@@ -120,3 +122,4 @@
 	*usecs = ust;
 }
 
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/timer.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/timer.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/timer.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,7 @@
 #include "engines/engine.h"
 #include "sci/include/sfx_timer.h"
 
+namespace Sci {
 
 #define FREQ 60
 #define DELAY (1000000 / FREQ)
@@ -72,3 +73,5 @@
 	&scummvm_timer_start,
 	&scummvm_timer_stop
 };
+
+} // End of namespace Sci

Modified: scummvm/trunk/engines/sci/sfx/timetest.cpp
===================================================================
--- scummvm/trunk/engines/sci/sfx/timetest.cpp	2009-02-21 10:05:31 UTC (rev 38675)
+++ scummvm/trunk/engines/sci/sfx/timetest.cpp	2009-02-21 10:23:36 UTC (rev 38676)
@@ -27,6 +27,8 @@
 #include <sfx_time.h>
 #include <assert.h>
 
+using namespace Sci;
+
 sfx_timestamp_t a, b, c;
 
 int


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list