aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r--engines/sci/gfx/antialias.cpp4
-rw-r--r--engines/sci/gfx/font-5x8.cpp4
-rw-r--r--engines/sci/gfx/font-6x10.cpp4
-rw-r--r--engines/sci/gfx/font.cpp4
-rw-r--r--engines/sci/gfx/gfx_crossblit.cpp4
-rw-r--r--engines/sci/gfx/gfx_driver.cpp4
-rw-r--r--engines/sci/gfx/gfx_line.cpp4
-rw-r--r--engines/sci/gfx/gfx_pixmap_scale.cpp3
-rw-r--r--engines/sci/gfx/gfx_res_options.cpp4
-rw-r--r--engines/sci/gfx/gfx_resource.cpp8
-rw-r--r--engines/sci/gfx/gfx_support.cpp11
-rw-r--r--engines/sci/gfx/gfx_test.cpp6
-rw-r--r--engines/sci/gfx/gfx_tools.cpp4
-rw-r--r--engines/sci/gfx/menubar.cpp4
-rw-r--r--engines/sci/gfx/operations.cpp4
-rw-r--r--engines/sci/gfx/resmgr.cpp4
-rw-r--r--engines/sci/gfx/resource/sci_cursor_0.cpp3
-rw-r--r--engines/sci/gfx/resource/sci_font.cpp3
-rw-r--r--engines/sci/gfx/resource/sci_pal_1.cpp4
-rw-r--r--engines/sci/gfx/resource/sci_pic_0.cpp12
-rw-r--r--engines/sci/gfx/resource/sci_picfill.cpp4
-rw-r--r--engines/sci/gfx/resource/sci_picfill_aux.cpp4
-rw-r--r--engines/sci/gfx/resource/sci_resmgr.cpp4
-rw-r--r--engines/sci/gfx/resource/sci_view_0.cpp4
-rw-r--r--engines/sci/gfx/resource/sci_view_1.cpp4
-rw-r--r--engines/sci/gfx/sbtree.cpp4
-rw-r--r--engines/sci/gfx/sci_widgets.cpp4
-rw-r--r--engines/sci/gfx/widgets.cpp4
28 files changed, 124 insertions, 6 deletions
diff --git a/engines/sci/gfx/antialias.cpp b/engines/sci/gfx/antialias.cpp
index a730868ca1..f297301236 100644
--- a/engines/sci/gfx/antialias.cpp
+++ b/engines/sci/gfx/antialias.cpp
@@ -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 @@ void gfxr_antialiase(gfx_pixmap_t *pixmap, gfx_mode_t *mode, gfxr_antialiasing_t
GFXERROR("Invalid antialiasing mode %d (internal error)\n", type);
}
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/font-5x8.cpp b/engines/sci/gfx/font-5x8.cpp
index 5234570adc..7e446b8363 100644
--- a/engines/sci/gfx/font-5x8.cpp
+++ b/engines/sci/gfx/font-5x8.cpp
@@ -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 @@ gfx_bitmap_font_t gfxfont_5x8 = {
8, /* Char size (occupied, in bytes) */
gfxfont_5x8_data /* Bulk data */
};
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/font-6x10.cpp b/engines/sci/gfx/font-6x10.cpp
index 6fbf661cbe..390bc5c7fa 100644
--- a/engines/sci/gfx/font-6x10.cpp
+++ b/engines/sci/gfx/font-6x10.cpp
@@ -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 @@ gfx_bitmap_font_t gfxfont_6x10 = {
10, /* Char size (occupied, in bytes) */
gfxfont_6x10_data /* Bulk data */
};
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/font.cpp b/engines/sci/gfx/font.cpp
index 55e9b02cbb..abea8540a5 100644
--- a/engines/sci/gfx/font.cpp
+++ b/engines/sci/gfx/font.cpp
@@ -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 @@ gfx_pixmap_t *gfxr_draw_font(gfx_bitmap_font_t *font, const char *stext, int cha
return pxm;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_crossblit.cpp b/engines/sci/gfx/gfx_crossblit.cpp
index ab6d6019ef..d861b8ac25 100644
--- a/engines/sci/gfx/gfx_crossblit.cpp
+++ b/engines/sci/gfx/gfx_crossblit.cpp
@@ -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 @@ static void FUNCTION_NAME(byte *dest, byte *src, int bytes_per_dest_line, int by
}
}
+} // End of namespace Sci
+
/* reset to original optimisations for Win32: */
/* (does not reset intrinsics) */
#ifdef WIN32
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp
index 97c48eccae..ad726e1b14 100644
--- a/engines/sci/gfx/gfx_driver.cpp
+++ b/engines/sci/gfx/gfx_driver.cpp
@@ -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 @@ gfx_driver_t gfx_driver_scummvm = {
scummvm_usec_sleep,
NULL
};
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_line.cpp b/engines/sci/gfx/gfx_line.cpp
index 3bc52098b8..21f2f429b1 100644
--- a/engines/sci/gfx/gfx_line.cpp
+++ b/engines/sci/gfx/gfx_line.cpp
@@ -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 @@ static inline void DRAWLINE_FUNC(byte *buffer, int linewidth, Common::Point star
#undef LINEMACRO
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_pixmap_scale.cpp b/engines/sci/gfx/gfx_pixmap_scale.cpp
index b1a26d2a5d..215be8c4d5 100644
--- a/engines/sci/gfx/gfx_pixmap_scale.cpp
+++ b/engines/sci/gfx/gfx_pixmap_scale.cpp
@@ -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 @@ void FUNCNAME_TRILINEAR(gfx_mode_t *mode, gfx_pixmap_t *pxm, int scale) {
#undef SIZETYPE
#undef EXTEND_COLOR
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_res_options.cpp b/engines/sci/gfx/gfx_res_options.cpp
index db776617bb..5a57c03fa3 100644
--- a/engines/sci/gfx/gfx_res_options.cpp
+++ b/engines/sci/gfx/gfx_res_options.cpp
@@ -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 @@ int gfx_get_res_config(gfx_options_t *options, gfx_pixmap_t *pxm) {
return 0;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_resource.cpp b/engines/sci/gfx/gfx_resource.cpp
index bcdf3f4623..c65668a6db 100644
--- a/engines/sci/gfx/gfx_resource.cpp
+++ b/engines/sci/gfx/gfx_resource.cpp
@@ -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 @@ gfx_pixmap_t *gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode) {
return pixmap;
}
+} // End of namespace Sci
+
// Now construct the pixmap scaling functions
#define EXTRA_BYTE_OFFSET 0
#define SIZETYPE guint8
@@ -244,6 +248,8 @@ gfx_pixmap_t *gfxr_endianness_adjust(gfx_pixmap_t *pixmap, gfx_mode_t *mode) {
#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 @@ void gfxr_free_pic(gfx_driver_t *driver, gfxr_pic_t *pic) {
pic->undithered_buffer = 0;
free(pic);
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_support.cpp b/engines/sci/gfx/gfx_support.cpp
index 77f93e3b41..b99e179d60 100644
--- a/engines/sci/gfx/gfx_support.cpp
+++ b/engines/sci/gfx/gfx_support.cpp
@@ -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 @@ int gfx_crossblit_alpha_threshold = 128;
#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 @@ void gfx_draw_box_pixmap_i(gfx_pixmap_t *pxm, rect_t box, int color) {
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 @@ void gfx_draw_box_pixmap_i(gfx_pixmap_t *pxm, rect_t box, int color) {
#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 @@ int gfx_crossblit_pixmap(gfx_mode_t *mode, gfx_pixmap_t *pxm, int priority, rect
return GFX_OK;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_test.cpp b/engines/sci/gfx/gfx_test.cpp
index 1f465c6319..6a4e476f89 100644
--- a/engines/sci/gfx/gfx_test.cpp
+++ b/engines/sci/gfx/gfx_test.cpp
@@ -43,6 +43,8 @@
#include <gfx_tools.h>
#include <gfx_operations.h>
+namespace Sci {
+
int
sci0_palette;
@@ -1469,6 +1471,4 @@ byte builtin_font[] = {
0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc
};
-
-
-
+} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_tools.cpp b/engines/sci/gfx/gfx_tools.cpp
index c8f1401907..75a742b743 100644
--- a/engines/sci/gfx/gfx_tools.cpp
+++ b/engines/sci/gfx/gfx_tools.cpp
@@ -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 @@ gfx_pixmap_t *gfx_pixmap_scale_index_data(gfx_pixmap_t *pixmap, gfx_mode_t *mode
return pixmap;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/menubar.cpp b/engines/sci/gfx/menubar.cpp
index 89d2d0335f..9fed5329a5 100644
--- a/engines/sci/gfx/menubar.cpp
+++ b/engines/sci/gfx/menubar.cpp
@@ -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 @@ int menubar_map_pointer(state_t *s, int *menu_nr, int *item_nr, gfxw_port_t *por
return 0;
}
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/operations.cpp b/engines/sci/gfx/operations.cpp
index 46a492692d..a3c3d96779 100644
--- a/engines/sci/gfx/operations.cpp
+++ b/engines/sci/gfx/operations.cpp
@@ -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 @@ int gfxop_free_pixmap(gfx_state_t *state, gfx_pixmap_t *pxm) {
gfx_free_pixmap(state->driver, pxm);
return GFX_OK;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resmgr.cpp b/engines/sci/gfx/resmgr.cpp
index 7302b6868e..1d31a57d32 100644
--- a/engines/sci/gfx/resmgr.cpp
+++ b/engines/sci/gfx/resmgr.cpp
@@ -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 @@ gfx_pixmap_t *gfxr_get_cursor(gfx_resstate_t *state, int nr) {
return res->unscaled_data.pointer;
}
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_cursor_0.cpp b/engines/sci/gfx/resource/sci_cursor_0.cpp
index e95b9cff68..aa60fb4b7d 100644
--- a/engines/sci/gfx/resource/sci_cursor_0.cpp
+++ b/engines/sci/gfx/resource/sci_cursor_0.cpp
@@ -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_cursor0(int id, byte *resource, int size) {
gfx_pixmap_t *gfxr_draw_cursor01(int id, byte *resource, int size) {
return _gfxr_draw_cursor(id, resource, size, 1);
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_font.cpp b/engines/sci/gfx/resource/sci_font.cpp
index 6a9c40f332..8b1eb4b8b2 100644
--- a/engines/sci/gfx/resource/sci_font.cpp
+++ b/engines/sci/gfx/resource/sci_font.cpp
@@ -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 @@ gfx_bitmap_font_t *gfxr_read_font(int id, byte *resource, int size) {
return font;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_pal_1.cpp b/engines/sci/gfx/resource/sci_pal_1.cpp
index b344ee355f..6ba33b5ae7 100644
--- a/engines/sci/gfx/resource/sci_pal_1.cpp
+++ b/engines/sci/gfx/resource/sci_pal_1.cpp
@@ -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 @@ gfx_pixmap_color_t *gfxr_read_pal1_amiga(int *colors_nr, FILE *f) {
return retval;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_pic_0.cpp b/engines/sci/gfx/resource/sci_pic_0.cpp
index cfe60a585b..665ebf7314 100644
--- a/engines/sci/gfx/resource/sci_pic_0.cpp
+++ b/engines/sci/gfx/resource/sci_pic_0.cpp
@@ -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 @@ _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_
#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 @@ _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_
#undef FILL_FUNCTION_RECURSIVE
#undef FILL_FUNCTION
-#endif /* defined(WITH_PIC_SCALING) */
+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 @@ _gfxr_find_fill_point(gfxr_pic_t *pic, int min_x, int min_y, int max_x, int max_
#undef FILL_FUNCTION_RECURSIVE
#undef FILL_FUNCTION
+namespace Sci {
#define GET_ABS_COORDS(x, y) \
temp = *(resource + pos++); \
@@ -1999,3 +2008,4 @@ gfxr_dither_pic0(gfxr_pic_t *pic, int dmode, int pattern) {
}
}
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_picfill.cpp b/engines/sci/gfx/resource/sci_picfill.cpp
index 325ec1c646..669c30ee8e 100644
--- a/engines/sci/gfx/resource/sci_picfill.cpp
+++ b/engines/sci/gfx/resource/sci_picfill.cpp
@@ -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 @@ static void FILL_FUNCTION(gfxr_pic_t *pic, int x_320, int y_200, int color, int
# undef proj_xl_bound
# undef proj_xr_bound
#endif
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_picfill_aux.cpp b/engines/sci/gfx/resource/sci_picfill_aux.cpp
index 1760d233c8..f7deff27fa 100644
--- a/engines/sci/gfx/resource/sci_picfill_aux.cpp
+++ b/engines/sci/gfx/resource/sci_picfill_aux.cpp
@@ -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 @@ static void AUXBUF_FILL(gfxr_pic_t *pic, int x, int y, int clipmask, int control
#undef CLIPMASK_HARD_BOUND
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_resmgr.cpp b/engines/sci/gfx/resource/sci_resmgr.cpp
index f66ecec332..a82ff3c979 100644
--- a/engines/sci/gfx/resource/sci_resmgr.cpp
+++ b/engines/sci/gfx/resource/sci_resmgr.cpp
@@ -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 @@ gfx_pixmap_color_t *gfxr_interpreter_get_palette(gfx_resstate_t *state, int vers
int gfxr_interpreter_needs_multicolored_pointers(int version, void *internal) {
return (version > SCI_VERSION_1);
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_view_0.cpp b/engines/sci/gfx/resource/sci_view_0.cpp
index 82b3e5d9d2..437733328e 100644
--- a/engines/sci/gfx/resource/sci_view_0.cpp
+++ b/engines/sci/gfx/resource/sci_view_0.cpp
@@ -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 @@ gfxr_view_t *gfxr_draw_view0(int id, byte *resource, int size, int palette) {
return view;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/resource/sci_view_1.cpp b/engines/sci/gfx/resource/sci_view_1.cpp
index ce038c11da..a268cba1dd 100644
--- a/engines/sci/gfx/resource/sci_view_1.cpp
+++ b/engines/sci/gfx/resource/sci_view_1.cpp
@@ -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 @@ gfxr_view_t *gfxr_draw_view11(int id, byte *resource, int size) {
return view;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/sbtree.cpp b/engines/sci/gfx/sbtree.cpp
index 03f5de365f..1893b0c711 100644
--- a/engines/sci/gfx/sbtree.cpp
+++ b/engines/sci/gfx/sbtree.cpp
@@ -31,6 +31,8 @@
#include <stdlib.h>
#include <stdio.h>
+namespace Sci {
+
#define NOT_A_KEY -1
typedef struct {
@@ -421,3 +423,5 @@ int main(int argc, char **argv) {
}
#endif // SBTREE_DEBUG
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/sci_widgets.cpp b/engines/sci/gfx/sci_widgets.cpp
index 8d5b48da5a..4fb99cecf2 100644
--- a/engines/sci/gfx/sci_widgets.cpp
+++ b/engines/sci/gfx/sci_widgets.cpp
@@ -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 @@ gfxw_port_t *sciw_select_item(state_t *s, gfxw_port_t *menu_port, menu_t *menu,
return menu_port;
}
+
+} // End of namespace Sci
diff --git a/engines/sci/gfx/widgets.cpp b/engines/sci/gfx/widgets.cpp
index 2e92242a9e..107c89956a 100644
--- a/engines/sci/gfx/widgets.cpp
+++ b/engines/sci/gfx/widgets.cpp
@@ -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 @@ void gfxw_widget_kill_chrono(gfxw_visual_t *visual, int window) {
gfxw_annihilate(GFXW(visual->port_refs[i]));
}
}
+
+} // End of namespace Sci