aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/include
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/include')
-rw-r--r--engines/sci/include/gfx_res_options.h4
-rw-r--r--engines/sci/include/gfx_system.h35
-rw-r--r--engines/sci/include/listener.h40
-rw-r--r--engines/sci/include/sfx_iterator.h6
-rw-r--r--engines/sci/include/sfx_songlib.h5
-rw-r--r--engines/sci/include/uinput.h7
-rw-r--r--engines/sci/include/vocabulary.h8
7 files changed, 33 insertions, 72 deletions
diff --git a/engines/sci/include/gfx_res_options.h b/engines/sci/include/gfx_res_options.h
index 7882cc9322..7f857cbeeb 100644
--- a/engines/sci/include/gfx_res_options.h
+++ b/engines/sci/include/gfx_res_options.h
@@ -33,9 +33,9 @@
namespace Sci {
-typedef struct _gfx_res_pattern {
+struct gfx_res_pattern_t {
int min, max;
-} gfx_res_pattern_t;
+};
/* GFX resource assignments */
diff --git a/engines/sci/include/gfx_system.h b/engines/sci/include/gfx_system.h
index 93cf00d5d5..6aa2b98d2b 100644
--- a/engines/sci/include/gfx_system.h
+++ b/engines/sci/include/gfx_system.h
@@ -51,22 +51,22 @@ namespace Sci {
#define GFX_COLOR_SYSTEM -1
-typedef struct { /* gfx_palette_color_t: Palette color description */
+/** Palette color description */
+struct gfx_palette_color_t {
int lockers; /* Number of pixmaps holding a lock on that color.
** 0 means that the color is unused, -1 means that it is
** "system allocated" and may not be freed. */
byte r, g, b; /* Red, green, blue; intensity varies from 0 (min) to 255 (max) */
-} gfx_palette_color_t;
-
-
+};
-typedef struct { /* gfx_palette_t: Palette description for color index modes */
+/** Palette description for color index modes */
+struct gfx_palette_t{
int max_colors_nr; /* Maximum number of allocated colors */
gfx_palette_color_t *colors; /* Actual colors, malloc()d as a block */
-} gfx_palette_t;
+};
@@ -79,7 +79,8 @@ typedef struct { /* gfx_palette_t: Palette description for color index modes */
** enabled */
#define GFX_MODE_FLAG_REVERSE_ALPHA (1<<1)
-typedef struct { /* gfx_mode_t: Graphics mode description */
+/** Graphics mode description */
+struct gfx_mode_t {
int xfact, yfact; /* Horizontal and vertical scaling factors */
int bytespp; /* Bytes per pixel */
@@ -104,32 +105,32 @@ typedef struct { /* gfx_mode_t: Graphics mode description */
** gether. The alpha values are used as appropriate; if alpha_mask is
** zero, then images use a special alpha map. */
-} gfx_mode_t;
+};
#define GFX_COLOR_INDEX_UNMAPPED -1
-typedef struct { /* gfx_pixmap_color_t: Pixmap-specific color entries */
+/** Pixmap-specific color entries */
+struct gfx_pixmap_color_t{
int global_index; /* Global index color or GFX_COLOR_INDEX_UNMAPPED. */
guint8 r, g, b; /* Real color */
-} gfx_pixmap_color_t;
-
-
+};
-typedef struct { /* gfx_color_t: Full color */
+/** Full color */
+struct gfx_color_t {
gfx_pixmap_color_t visual;
guint8 alpha; /* transparency = (1-opacity) */
signed char priority, control;
byte mask; /* see mask values below */
-} gfx_color_t;
-
+};
-typedef struct { /* rect_t: Rectangle description */
+/** Rectangle description */
+struct rect_t{
int x, y;
int xl, yl; /* width, height: (x,y,xl,yl)=(5,5,1,1) occupies 1 pixel */
-} rect_t;
+};
/* Generates a rect_t from index data
diff --git a/engines/sci/include/listener.h b/engines/sci/include/listener.h
deleted file mode 100644
index 5457391d88..0000000000
--- a/engines/sci/include/listener.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
-
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-#ifndef _LISTENER_H_
-# define _LISTENER_H_
-
-namespace Sci {
-
-/* Event listener interface */
-
-typedef struct {
- void (*notify)(void *self, void *notifier);
- void *self;
-} listener_t;
-
-} // End of namespace Sci
-
-#endif
diff --git a/engines/sci/include/sfx_iterator.h b/engines/sci/include/sfx_iterator.h
index 652314c3cf..ceab4c5c47 100644
--- a/engines/sci/include/sfx_iterator.h
+++ b/engines/sci/include/sfx_iterator.h
@@ -29,7 +29,6 @@
#define _SCI_SFX_ITERATOR_H_
#include "sci/include/sfx_pcm.h"
-#include "sci/include/listener.h"
namespace Sci {
@@ -89,6 +88,11 @@ typedef struct {
#define SIMSG_SEND(o, m) songit_handle_message(&(o), songit_make_message((o)->ID, m))
#define SIMSG_SEND_FADE(o, m) songit_handle_message(&(o), songit_make_ptr_message((o)->ID, _SIMSG_BASE, _SIMSG_BASEMSG_SET_FADE, m, 0))
+/* Event listener interface */
+struct listener_t {
+ void (*notify)(void *self, void *notifier);
+ void *self;
+};
typedef unsigned long songit_id_t;
diff --git a/engines/sci/include/sfx_songlib.h b/engines/sci/include/sfx_songlib.h
index 99448f7aa4..c5cf4ac76a 100644
--- a/engines/sci/include/sfx_songlib.h
+++ b/engines/sci/include/sfx_songlib.h
@@ -28,9 +28,8 @@
#ifndef _SCI_SFX_SONGLIB_H_
#define _SCI_SFX_SONGLIB_H_
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include "common/scummsys.h"
+
#include "sci/include/scitypes.h"
#include "sci/include/sfx_iterator.h"
diff --git a/engines/sci/include/uinput.h b/engines/sci/include/uinput.h
index 3b2f21a2c3..7e830b410d 100644
--- a/engines/sci/include/uinput.h
+++ b/engines/sci/include/uinput.h
@@ -28,9 +28,6 @@
#ifndef _SCI_UINPUT_H
#define _SCI_UINPUT_H
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
namespace Sci {
@@ -38,7 +35,7 @@ namespace Sci {
#define SCI_INPUT_DEFAULT_REDRAWTIME 30000
-typedef struct {
+struct sci_event_t {
short type;
short data;
short buckybits;
@@ -52,7 +49,7 @@ typedef struct {
** For 'Alt', characters are interpreted by their
** PC keyboard scancodes.
*/
-} sci_event_t;
+};
/*Values for type*/
#define SCI_EVT_NONE 0
diff --git a/engines/sci/include/vocabulary.h b/engines/sci/include/vocabulary.h
index 52fa8253bb..74f745d39d 100644
--- a/engines/sci/include/vocabulary.h
+++ b/engines/sci/include/vocabulary.h
@@ -23,8 +23,8 @@
*
*/
-#ifndef VOCABULARY_H
-#define VOCABULARY_H
+#ifndef SCI_VOCABULARY_H
+#define SCI_VOCABULARY_H
#include "sci/include/versions.h"
#include "sci/include/sciresource.h"
@@ -43,11 +43,11 @@ namespace Sci {
/* Number of bytes allocated on the heap to store bad words if parsing fails */
-typedef struct opcode_ {
+struct opcode {
int type;
int number;
char* name;
-} opcode;
+};
#define VOCAB_RESOURCE_OPCODES 998
#define VOCAB_RESOURCE_KNAMES 999