diff options
author | Oystein Eftevaag | 2009-02-21 10:23:36 +0000 |
---|---|---|
committer | Oystein Eftevaag | 2009-02-21 10:23:36 +0000 |
commit | 25f7c371718f74eb26fed5bd66a803f220c89c3b (patch) | |
tree | e78250ba07d5d28ffecf1621421ab33061edf1e4 /engines/sci/include | |
parent | 44ea7966108cf56df4a4eb3fd0b2b7df31d937e1 (diff) | |
download | scummvm-rg350-25f7c371718f74eb26fed5bd66a803f220c89c3b.tar.gz scummvm-rg350-25f7c371718f74eb26fed5bd66a803f220c89c3b.tar.bz2 scummvm-rg350-25f7c371718f74eb26fed5bd66a803f220c89c3b.zip |
Wrapped the SCI engine in the Sci namespace.
svn-id: r38676
Diffstat (limited to 'engines/sci/include')
43 files changed, 158 insertions, 4 deletions
diff --git a/engines/sci/include/aatree.h b/engines/sci/include/aatree.h index bf7eb31a47..6d84f62062 100644 --- a/engines/sci/include/aatree.h +++ b/engines/sci/include/aatree.h @@ -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 @@ void *aatree_get_data(aatree_t *t); ** Returns : (void *) The data element */ +} // End of namespace Sci + #endif /* !_SCI_AATREE_H */ diff --git a/engines/sci/include/console.h b/engines/sci/include/console.h index a9521686ae..9dd998cde6 100644 --- a/engines/sci/include/console.h +++ b/engines/sci/include/console.h @@ -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 @@ close_console_file(void); ** Returns : (void) */ +} // End of namespace Sci + #endif /* _SCI_CONSOLE_H_ */ diff --git a/engines/sci/include/engine.h b/engines/sci/include/engine.h index 374572d510..8c3458c75f 100644 --- a/engines/sci/include/engine.h +++ b/engines/sci/include/engine.h @@ -49,6 +49,8 @@ namespace Common { #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 @@ reg_t not_register(state_t *s, reg_t r) { } +} // End of namespace Sci + #endif /* !_SCI_ENGINE_H */ diff --git a/engines/sci/include/event.h b/engines/sci/include/event.h index 07a4db3a06..dc4bc6a83a 100644 --- a/engines/sci/include/event.h +++ b/engines/sci/include/event.h @@ -28,6 +28,8 @@ #include "sci/include/uinput.h" +namespace Sci { + struct _state; sci_event_t getEvent(struct _state *s); @@ -37,4 +39,6 @@ sci_event_t getEvent(struct _state *s); ** existing events. */ +} // End of namespace Sci + #endif diff --git a/engines/sci/include/gfx_driver.h b/engines/sci/include/gfx_driver.h index 4257bf46d9..8319c6ee14 100644 --- a/engines/sci/include/gfx_driver.h +++ b/engines/sci/include/gfx_driver.h @@ -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 @@ typedef struct _gfx_driver { /* Graphics driver */ } gfx_driver_t; +} // End of namespace Sci + #endif /* !_SCI_GFX_DRIVER_H_ */ diff --git a/engines/sci/include/gfx_operations.h b/engines/sci/include/gfx_operations.h index d08211dad9..39bcbc97a2 100644 --- a/engines/sci/include/gfx_operations.h +++ b/engines/sci/include/gfx_operations.h @@ -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 @@ _gfxop_clip(rect_t *rect, rect_t clipzone); ** Reuturns : (int) 1 if rect is empty now, 0 otherwise */ +} // End of namespace Sci + #endif /* !_GFX_OPERATIONS_H_ */ diff --git a/engines/sci/include/gfx_options.h b/engines/sci/include/gfx_options.h index 033613a82c..c2586b0566 100644 --- a/engines/sci/include/gfx_options.h +++ b/engines/sci/include/gfx_options.h @@ -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 @@ typedef struct _gfx_options { /* 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_ */ diff --git a/engines/sci/include/gfx_res_options.h b/engines/sci/include/gfx_res_options.h index f22989437d..774243bbaf 100644 --- a/engines/sci/include/gfx_res_options.h +++ b/engines/sci/include/gfx_res_options.h @@ -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 @@ gfx_get_res_config(struct _gfx_options *options, ** not do anything in colour index mode. */ +} // End of namespace Sci + #endif /* !_GFX_RES_OPTIONS_H_ */ diff --git a/engines/sci/include/gfx_resmgr.h b/engines/sci/include/gfx_resmgr.h index 22a944f233..0a53ecc7b4 100644 --- a/engines/sci/include/gfx_resmgr.h +++ b/engines/sci/include/gfx_resmgr.h @@ -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 @@ gfxr_interpreter_needs_multicolored_pointers(int version, void *internal); ** otherwise */ +} // End of namespace Sci + #endif /* !_GFX_RSMGR_H_ */ diff --git a/engines/sci/include/gfx_resource.h b/engines/sci/include/gfx_resource.h index 24bc823779..eb2ead54b2 100644 --- a/engines/sci/include/gfx_resource.h +++ b/engines/sci/include/gfx_resource.h @@ -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 @@ get_int_16(const byte *offset) { return ((int) offset[0] | (((int) offset[1]) << 8)); } +} // End of namespace Sci #endif /* !_GFX_RESOURCE_H_ */ diff --git a/engines/sci/include/gfx_state_internal.h b/engines/sci/include/gfx_state_internal.h index 92bb62fc79..f32c19988e 100644 --- a/engines/sci/include/gfx_state_internal.h +++ b/engines/sci/include/gfx_state_internal.h @@ -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 @@ typedef struct _gfxw_port { #undef WIDGET_COMMON #undef WIDGET_CONTAINER +} // End of namespace Sci + #endif /* !_GFX_STATE_INTERNAL_H_ */ diff --git a/engines/sci/include/gfx_system.h b/engines/sci/include/gfx_system.h index 33bfcf64cf..9bd87ce46d 100644 --- a/engines/sci/include/gfx_system.h +++ b/engines/sci/include/gfx_system.h @@ -31,6 +31,7 @@ #include "sci/include/sci_memory.h" #include "sci/include/resource.h" +namespace Sci { #define GFX_DEBUG @@ -400,4 +401,6 @@ typedef enum { 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_ */ diff --git a/engines/sci/include/gfx_tools.h b/engines/sci/include/gfx_tools.h index 575a52dc0d..dbbbb02347 100644 --- a/engines/sci/include/gfx_tools.h +++ b/engines/sci/include/gfx_tools.h @@ -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 @@ gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode); ** Returns : (gfx_pixmap_t *) pixmap */ +} // End of namespace Sci #endif /* !_GFX_TOOLS_H_ */ diff --git a/engines/sci/include/gfx_widgets.h b/engines/sci/include/gfx_widgets.h index 1da0b91a81..99e76c5994 100644 --- a/engines/sci/include/gfx_widgets.h +++ b/engines/sci/include/gfx_widgets.h @@ -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 @@ gfxw_widget_reparent_chrono(gfxw_visual_t *visual, gfxw_widget_t *view, gfxw_lis void gfxw_widget_kill_chrono(gfxw_visual_t *visual, int window); +} // End of namespace Sci + #endif /* !_GFX_WIDGETS_H_ */ diff --git a/engines/sci/include/heapmgr.h b/engines/sci/include/heapmgr.h index c6912b6f44..d8d787e95d 100644 --- a/engines/sci/include/heapmgr.h +++ b/engines/sci/include/heapmgr.h @@ -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 @@ alloc_##ENTRY##_entry(ENTRY##_table_t *table) \ #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_ */ diff --git a/engines/sci/include/kdebug.h b/engines/sci/include/kdebug.h index 68a9e51755..92a5511706 100644 --- a/engines/sci/include/kdebug.h +++ b/engines/sci/include/kdebug.h @@ -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 @@ extern int sci_debug_flags; #define _DEBUG_FLAG_LOGGING 1 /* Log each command executed */ #define _DEBUG_FLAG_BREAK_ON_WARNINGS 2 /* Break on warnings */ +} // End of namespace Sci #endif diff --git a/engines/sci/include/kernel.h b/engines/sci/include/kernel.h index 587582d9b7..21a7e7b79b 100644 --- a/engines/sci/include/kernel.h +++ b/engines/sci/include/kernel.h @@ -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 @@ typedef struct { extern sci_kernel_function_t kfunct_mappers[]; +} // End of namespace Sci + #endif /* _SCI_KERNEL_H_ */ diff --git a/engines/sci/include/list.h b/engines/sci/include/list.h index 59c6bdcc61..ec5e15ec67 100644 --- a/engines/sci/include/list.h +++ b/engines/sci/include/list.h @@ -61,6 +61,8 @@ #include "common/scummsys.h" +namespace Sci { + /* List definitions. */ #define LIST_HEAD(name, type) \ struct name { \ @@ -184,4 +186,6 @@ struct { \ #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 */ diff --git a/engines/sci/include/listener.h b/engines/sci/include/listener.h index 270556c05b..5457391d88 100644 --- a/engines/sci/include/listener.h +++ b/engines/sci/include/listener.h @@ -26,6 +26,8 @@ #ifndef _LISTENER_H_ # define _LISTENER_H_ +namespace Sci { + /* Event listener interface */ typedef struct { @@ -33,4 +35,6 @@ typedef struct { void *self; } listener_t; +} // End of namespace Sci + #endif diff --git a/engines/sci/include/menubar.h b/engines/sci/include/menubar.h index 79ed37a41d..0fec648e6d 100644 --- a/engines/sci/include/menubar.h +++ b/engines/sci/include/menubar.h @@ -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 @@ menubar_match_key(menu_item_t *item, int message, int modifiers); ** Returns : (int) 1 on match, 0 otherwise */ +} // End of namespace Sci + #endif /* !_SCI_MENUBAR_H_ */ diff --git a/engines/sci/include/resource.h b/engines/sci/include/resource.h index 8db6ef9185..070e662e1c 100644 --- a/engines/sci/include/resource.h +++ b/engines/sci/include/resource.h @@ -103,6 +103,8 @@ # define O_BINARY 0 #endif +namespace Sci { + /**** FUNCTION DECLARATIONS ****/ #ifdef WIN32 @@ -117,7 +119,7 @@ getInt16(byte *d) { } #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 @@ void sci_sched_yield(void); # define BREAKPOINT() { error("Missed breakpoint in %s, line %d\n", __FILE__, __LINE__); *((int *) NULL) = 42; } #endif /* !BREAKPOINT() */ +} // End of namespace Sci + #endif diff --git a/engines/sci/include/sbtree.h b/engines/sci/include/sbtree.h index d972dee0ba..65790344a2 100644 --- a/engines/sci/include/sbtree.h +++ b/engines/sci/include/sbtree.h @@ -36,6 +36,7 @@ # include <stdio.h> #endif +namespace Sci { typedef struct { int entries_nr; @@ -104,6 +105,7 @@ sbtree_foreach(sbtree_t *tree, void *args, void *(*operation)(sbtree_t *, const ** This function will only work properly the original data contained no duplicate keys. */ +} // End of namespace Sci #endif /* !_SBTREE_H_ */ diff --git a/engines/sci/include/sci_memory.h b/engines/sci/include/sci_memory.h index 616d6633b0..ff09b4b1b6 100644 --- a/engines/sci/include/sci_memory.h +++ b/engines/sci/include/sci_memory.h @@ -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 @@ extern void *sci_refcount_memdup(void *data, size_t len); ** The number of references accounted for will be one. */ +} // End of namespace Sci + #endif /* _SCI_MEMORY_H */ diff --git a/engines/sci/include/sci_midi.h b/engines/sci/include/sci_midi.h index 88e2b92f24..372a06a201 100644 --- a/engines/sci/include/sci_midi.h +++ b/engines/sci/include/sci_midi.h @@ -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_) */ diff --git a/engines/sci/include/sci_widgets.h b/engines/sci/include/sci_widgets.h index 339c59632a..d9cbbefd63 100644 --- a/engines/sci/include/sci_widgets.h +++ b/engines/sci/include/sci_widgets.h @@ -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 @@ sciw_select_item(state_t *s, gfxw_port_t *menu_port, menu_t *menu, int selection ** Returns : (gfxw_port_t *) The modified menu */ +} // End of namespace Sci + #endif /* _!SCI_WIDGETS_H_ */ diff --git a/engines/sci/include/sciresource.h b/engines/sci/include/sciresource.h index fc9bec41e8..9b30d7d8ba 100644 --- a/engines/sci/include/sciresource.h +++ b/engines/sci/include/sciresource.h @@ -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 @@ void _scir_add_altsource(resource_t *res, ResourceSource *source, unsigned int f ** Returns : (void) */ +} // End of namespace Sci #endif diff --git a/engines/sci/include/scitypes.h b/engines/sci/include/scitypes.h index 8d18ab5aec..cc3728be38 100644 --- a/engines/sci/include/scitypes.h +++ b/engines/sci/include/scitypes.h @@ -36,6 +36,8 @@ #include <io.h> #endif +namespace Sci { + typedef int8 gint8; typedef uint8 guint8; @@ -66,4 +68,6 @@ typedef struct { #endif } sci_dir_t; /* used by sci_find_first and friends */ +} // End of namespace Sci + #endif /* !SCI_TYPES */ diff --git a/engines/sci/include/script.h b/engines/sci/include/script.h index f1886a89e3..ad1e976914 100644 --- a/engines/sci/include/script.h +++ b/engines/sci/include/script.h @@ -28,6 +28,8 @@ #include "sci/include/sciresource.h" +namespace Sci { + /*#define SCRIPT_DEBUG */ #define SCI_SCRIPTS_NR 1000 @@ -216,4 +218,6 @@ script_find_selector(struct _state *s, const char *selector_name); struct _state; void script_free_breakpoints(struct _state *s); +} // End of namespace Sci + #endif diff --git a/engines/sci/include/sfx_core.h b/engines/sci/include/sfx_core.h index 3904bfc0e5..7ac02d6cfc 100644 --- a/engines/sci/include/sfx_core.h +++ b/engines/sci/include/sfx_core.h @@ -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_) */ diff --git a/engines/sci/include/sfx_engine.h b/engines/sci/include/sfx_engine.h index 47d4ffa058..fe48463b65 100644 --- a/engines/sci/include/sfx_engine.h +++ b/engines/sci/include/sfx_engine.h @@ -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 @@ sfx_song_set_fade(sfx_state_t *self, song_handle_t handle, fade_params_t *fade_s ** (fade_params_t *) fade_setup: The precise fade-out configuration to use */ +} // End of namespace Sci #endif /* !defined(_SFX_ENGINE_H_) */ diff --git a/engines/sci/include/sfx_iterator.h b/engines/sci/include/sfx_iterator.h index 6152dc6630..5dbafa8b9a 100644 --- a/engines/sci/include/sfx_iterator.h +++ b/engines/sci/include/sfx_iterator.h @@ -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 @@ sfx_play_iterator_pcm(song_iterator_t *it, unsigned long handle); ** This assumes that the last call to 'it->next()' returned SI_PCM. */ +} // End of namespace Sci + #endif diff --git a/engines/sci/include/sfx_iterator_internal.h b/engines/sci/include/sfx_iterator_internal.h index b0a6e0d8d5..54d63bde36 100644 --- a/engines/sci/include/sfx_iterator_internal.h +++ b/engines/sci/include/sfx_iterator_internal.h @@ -29,6 +29,7 @@ #include "sci/include/sfx_iterator.h" #include "sci/include/sci_midi.h" +namespace Sci { /* States */ @@ -234,4 +235,6 @@ sfx_iterator_make_feed(byte *base_data, int offset, ** (pcm_data_internal_t) conf: PCM encoding */ +} // End of namespace Sci + #endif /* !defined(_SFX_ITERATOR_INTERNAL_ */ diff --git a/engines/sci/include/sfx_pcm.h b/engines/sci/include/sfx_pcm.h index f275fd3f03..b1402acc1a 100644 --- a/engines/sci/include/sfx_pcm.h +++ b/engines/sci/include/sfx_pcm.h @@ -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 @@ sfx_pcm_available(void); ** Returns : (int) zero iff no PCM device is available */ +} // End of namespace Sci + #endif /* !defined(_SFX_PCM_H_) */ diff --git a/engines/sci/include/sfx_player.h b/engines/sci/include/sfx_player.h index 526d8b46d6..a9b59582f8 100644 --- a/engines/sci/include/sfx_player.h +++ b/engines/sci/include/sfx_player.h @@ -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 @@ sfx_iterator_combine(song_iterator_t *it1, song_iterator_t *it2); ** call should be used by song players, but not by the core sound system */ +} // End of namespace Sci + #endif /* !_SFX_PLAYER_H */ diff --git a/engines/sci/include/sfx_songlib.h b/engines/sci/include/sfx_songlib.h index 3bc149bddc..09dbc631e3 100644 --- a/engines/sci/include/sfx_songlib.h +++ b/engines/sci/include/sfx_songlib.h @@ -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 @@ song_lib_set_restore_behavior(songlib_t songlib, song_handle_t handle, ** (RESTORE_BEHAVIOR) action: The desired action */ +} // End of namespace Sci + #endif /* !_SCI_SOUND_SERVER_H_ */ diff --git a/engines/sci/include/sfx_time.h b/engines/sci/include/sfx_time.h index 66677d709a..d2e0cbec3e 100644 --- a/engines/sci/include/sfx_time.h +++ b/engines/sci/include/sfx_time.h @@ -26,6 +26,8 @@ #ifndef _SFX_TIME_H_ #define _SFX_TIME_H_ +namespace Sci { + typedef struct { long secs; long usecs; @@ -84,6 +86,6 @@ sfx_timestamp_gettime(sfx_timestamp_t *timestamp, long *secs, long *usecs); ** the epoch described there */ - +} // End of namespace Sci #endif /* !defined(_SFX_TIME_H_) */ diff --git a/engines/sci/include/sfx_timer.h b/engines/sci/include/sfx_timer.h index 5f5f24e6f6..6342503121 100644 --- a/engines/sci/include/sfx_timer.h +++ b/engines/sci/include/sfx_timer.h @@ -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 @@ typedef struct { */ } sfx_timer_t; +} // End of namespace Sci + #endif /* !_FREESCI_SFX_TIMER_H_ */ diff --git a/engines/sci/include/sys_strings.h b/engines/sci/include/sys_strings.h index d648b4982d..3a16777a0b 100644 --- a/engines/sci/include/sys_strings.h +++ b/engines/sci/include/sys_strings.h @@ -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 @@ sys_string_free_all(sys_strings_t *strings); ** Parameters: (sys_strings_t *) strings: The string table to deallocate */ +} // End of namespace Sci + #endif /* !_FREESCI_SYSTEM_STRINGS_H_ */ diff --git a/engines/sci/include/uinput.h b/engines/sci/include/uinput.h index fb05dfc694..30b39ef9f5 100644 --- a/engines/sci/include/uinput.h +++ b/engines/sci/include/uinput.h @@ -32,6 +32,7 @@ # include <unistd.h> #endif +namespace Sci { struct _state; @@ -126,4 +127,6 @@ typedef struct { #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 */ diff --git a/engines/sci/include/versions.h b/engines/sci/include/versions.h index c18840598a..1b5de640f5 100644 --- a/engines/sci/include/versions.h +++ b/engines/sci/include/versions.h @@ -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 @@ version_parse(const char *vn, sci_version_t *result); ** (sci_version_t) *result: The resulting version number on success */ +} // End of namespace Sci + #endif /* !_SCI_VERSIONS_H_ */ diff --git a/engines/sci/include/vm.h b/engines/sci/include/vm.h index 6df7723022..fa404e701c 100644 --- a/engines/sci/include/vm.h +++ b/engines/sci/include/vm.h @@ -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 @@ obj_get(struct _state *s, reg_t offset); ** Returns : (object_t *) The object in question, or NULL if there is none */ +} // End of namespace Sci + #endif /* !_SCI_VM_H */ diff --git a/engines/sci/include/vm_types.h b/engines/sci/include/vm_types.h index 8fb865656e..847a1f30e4 100644 --- a/engines/sci/include/vm_types.h +++ b/engines/sci/include/vm_types.h @@ -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 @@ make_reg(int segment, int offset) { #define NULL_REG_INITIALIZER {0, 0} extern reg_t NULL_REG; +} // End of namespace Sci #endif /* !_SCI_VM_TYPES_H_ */ diff --git a/engines/sci/include/vocabulary.h b/engines/sci/include/vocabulary.h index 33bc32409a..b51affc570 100644 --- a/engines/sci/include/vocabulary.h +++ b/engines/sci/include/vocabulary.h @@ -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 @@ vocab_gnf_parse(parse_tree_node_t *nodes, result_word_t *words, int words_nr, void vocab_gnf_dump(parse_tree_branch_t *branches, int branches_nr); +} // End of namespace Sci #endif |