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

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Sat Feb 21 20:01:32 CET 2009


Revision: 38725
          http://scummvm.svn.sourceforge.net/scummvm/?rev=38725&view=rev
Author:   fingolfin
Date:     2009-02-21 19:01:32 +0000 (Sat, 21 Feb 2009)

Log Message:
-----------
SCI: More cleanup

Modified Paths:
--------------
    scummvm/trunk/engines/sci/engine/seg_manager.h
    scummvm/trunk/engines/sci/include/gfx_res_options.h
    scummvm/trunk/engines/sci/include/gfx_system.h
    scummvm/trunk/engines/sci/include/sfx_iterator.h
    scummvm/trunk/engines/sci/include/sfx_songlib.h
    scummvm/trunk/engines/sci/include/uinput.h
    scummvm/trunk/engines/sci/include/vocabulary.h
    scummvm/trunk/engines/sci/sfx/adlib.h
    scummvm/trunk/engines/sci/sfx/device.h
    scummvm/trunk/engines/sci/sfx/mixer.h
    scummvm/trunk/engines/sci/sfx/seq/instrument-map.h
    scummvm/trunk/engines/sci/sfx/sequencer.h
    scummvm/trunk/engines/sci/sfx/softseq.h

Removed Paths:
-------------
    scummvm/trunk/engines/sci/include/listener.h

Modified: scummvm/trunk/engines/sci/engine/seg_manager.h
===================================================================
--- scummvm/trunk/engines/sci/engine/seg_manager.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/engine/seg_manager.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -71,8 +71,6 @@
 
 typedef int mem_obj_enum;
 
-struct _mem_obj;
-
 #define GET_SEGMENT(mgr, index, rtype) ((index) > 0 && (mgr).heap_size > index) ?		\
 		(((mgr).heap[index] && (mgr).heap[index]->type == rtype)? (mgr).heap[index]	: NULL) : NULL
 
@@ -85,7 +83,7 @@
 
 struct SegManager {
 	int_hash_map_t *id_seg_map; // id - script id; seg - index of heap
-	struct _mem_obj **heap;
+	mem_obj_t **heap;
 	int heap_size;		// size of the heap
 	int reserved_id;
 	int exports_wide;

Modified: scummvm/trunk/engines/sci/include/gfx_res_options.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_res_options.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/gfx_res_options.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -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 */
 

Modified: scummvm/trunk/engines/sci/include/gfx_system.h
===================================================================
--- scummvm/trunk/engines/sci/include/gfx_system.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/gfx_system.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -51,22 +51,22 @@
 #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;
+};
 
+/** Palette description for color index modes */
+struct gfx_palette_t{
 
-
-typedef struct { /* gfx_palette_t: Palette description for color index modes */
-
 	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 @@
 ** 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 @@
 	** 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

Deleted: scummvm/trunk/engines/sci/include/listener.h
===================================================================
--- scummvm/trunk/engines/sci/include/listener.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/listener.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -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

Modified: scummvm/trunk/engines/sci/include/sfx_iterator.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_iterator.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/sfx_iterator.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -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 @@
 #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;
 

Modified: scummvm/trunk/engines/sci/include/sfx_songlib.h
===================================================================
--- scummvm/trunk/engines/sci/include/sfx_songlib.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/sfx_songlib.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -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"
 

Modified: scummvm/trunk/engines/sci/include/uinput.h
===================================================================
--- scummvm/trunk/engines/sci/include/uinput.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/uinput.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -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 @@
 #define SCI_INPUT_DEFAULT_REDRAWTIME 30000
 
 
-typedef struct {
+struct sci_event_t {
 	short type;
 	short data;
 	short buckybits;
@@ -52,7 +49,7 @@
 			 ** For 'Alt', characters are interpreted by their
 			 ** PC keyboard scancodes.
 			 */
-} sci_event_t;
+};
 
 /*Values for type*/
 #define SCI_EVT_NONE            0

Modified: scummvm/trunk/engines/sci/include/vocabulary.h
===================================================================
--- scummvm/trunk/engines/sci/include/vocabulary.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/include/vocabulary.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -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 @@
 /* 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

Modified: scummvm/trunk/engines/sci/sfx/adlib.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/adlib.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/sfx/adlib.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -24,8 +24,8 @@
  */
 
 
-#ifndef _SFX_ADLIB_H_
-#define _SFX_ADLIB_H_
+#ifndef SCI_SFX_ADLIB_H
+#define SCI_SFX_ADLIB_H
 
 #include "sci/tools.h"
 
@@ -68,9 +68,9 @@
 
 extern adlib_instr adlib_sbi[96];
 
+/** Converts a raw SCI adlib instrument into the adlib register format. */
 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_ */
+#endif // SCI_SFX_ADLIB_H

Modified: scummvm/trunk/engines/sci/sfx/device.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/device.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/sfx/device.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -25,9 +25,11 @@
 
 /* song player structure */
 
-#ifndef _SFX_DEVICE_H
-#define _SFX_DEVICE_H
+#ifndef SCI_SFX_DEVICE_H
+#define SCI_SFX_DEVICE_H
 
+#include "common/scummsys.h"
+
 namespace Sci {
 
 /* Various types of resources */
@@ -119,4 +121,4 @@
 
 } // End of namespace Sci
 
-#endif /* !_SFX_PLAYER_H */
+#endif // SCI_SFX_DEVICE_H

Modified: scummvm/trunk/engines/sci/sfx/mixer.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/mixer.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/sfx/mixer.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -23,8 +23,8 @@
  *
  */
 
-#ifndef _SFX_MIXER_H_
-#define _SFX_MIXER_H_
+#ifndef SCI_SFX_MIXER_H
+#define SCI_SFX_MIXER_H
 
 #include "sci/include/sfx_pcm.h"
 
@@ -45,7 +45,7 @@
 	int left, right;
 };
 
-typedef struct {
+struct sfx_pcm_feed_state_t {
 	sfx_pcm_feed_t *feed;
 
 	/* The following fields are for use by the mixer only and must not be
@@ -59,10 +59,10 @@
 
 	int pending_review; /* Timestamp needs to be checked for this stream */
 	twochannel_data ch_old, ch_new; /* Intermediate results of output computation */
-} sfx_pcm_feed_state_t;
+};
 
 
-typedef struct _sfx_pcm_mixer {
+struct sfx_pcm_mixer_t {
 	/* Mixers are the heart of all matters PCM. They take PCM data from subscribed feeds,
 	** mix it (hence the name) and ask the pcm device they are attached to to play the
 	** result.  */
@@ -70,34 +70,34 @@
 	const char *name;
 	const char *version;
 
-	int (*init)(struct _sfx_pcm_mixer *self, sfx_pcm_device_t *device);
+	int (*init)(sfx_pcm_mixer_t *self, sfx_pcm_device_t *device);
 	/* Initialises the mixer
 	** Parameters: (sfx_pcm_mixer_t *) self: Self reference
 	**             (sfx_pcm_device_t *) device: An _already initialised_ PCM output driver
 	** Returns   : (int) SFX_OK on success, SFX_ERROR otherwise
 	*/
 
-	void (*exit)(struct _sfx_pcm_mixer *self);
+	void (*exit)(sfx_pcm_mixer_t *self);
 	/* Uninitialises the mixer
 	** Parameters: (sfx_pcm_mixer_t *) self: Self reference
 	** Also uninitialises all feeds and the attached output device.
 	*/
 
-	void (*subscribe)(struct _sfx_pcm_mixer *self, sfx_pcm_feed_t *feed);
+	void (*subscribe)(sfx_pcm_mixer_t *self, sfx_pcm_feed_t *feed);
 	/* Subscribes the mixer to a new feed
 	** Parameters: (sfx_pcm_mixer_t *) self: Self reference
 	**             (sfx_pcm_feed_t *) feed: The feed to subscribe to
 	*/
 
-	void (*pause)(struct _sfx_pcm_mixer *self);
+	void (*pause)(sfx_pcm_mixer_t *self);
 	/* Pauses the processing of input and output
 	*/
 
-	void (*resume)(struct _sfx_pcm_mixer *self);
+	void (*resume)(sfx_pcm_mixer_t *self);
 	/* Resumes the processing of input and output after a pause
 	*/
 
-	int (*process)(struct _sfx_pcm_mixer *self);
+	int (*process)(sfx_pcm_mixer_t *self);
 	/* Processes all feeds, mixes their results, and passes everything to the output device
 	** Returns  : (int) SFX_OK on success, SFX_ERROR otherwise (output device error or
 	**                  internal assertion failure)
@@ -112,7 +112,7 @@
 	sfx_pcm_device_t *dev;
 
 	void *private_bits;
-} sfx_pcm_mixer_t;
+};
 
 sfx_pcm_mixer_t *sfx_pcm_find_mixer(char *name);
 /* Looks up a mixer by name, or a default mixer
@@ -126,4 +126,4 @@
 
 } // End of namespace Sci
 
-#endif /* !defined(_SFX_MIXER_H_) */
+#endif // SCI_SFX_MIXER_H

Modified: scummvm/trunk/engines/sci/sfx/seq/instrument-map.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/seq/instrument-map.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/sfx/seq/instrument-map.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -25,12 +25,11 @@
 
 /* Implementation of SCI instrument maps for GM and MT-32. */
 
-#ifndef SCI_INSTRUMENT_MAP_
-#define SCI_INSTRUMENT_MAP_
+#ifndef SCI_SFX_SEQ_INSTRUMENT_MAP_H
+#define SCI_SFX_SEQ_INSTRUMENT_MAP_H
 
-#include <stdlib.h>
-#include "resource.h"
-#include "../device.h"
+#include "sci/tools.h"
+#include "sci/sfx/device.h"
 
 namespace Sci {
 
@@ -130,4 +129,4 @@
 
 } // End of namespace Sci
 
-#endif /* !defined(SCI_INSTRUMENT_MAP_) */
+#endif // SCI_SFX_SEQ_INSTRUMENT_MAP_H

Modified: scummvm/trunk/engines/sci/sfx/sequencer.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/sequencer.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/sfx/sequencer.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -24,14 +24,12 @@
  */
 
 
-#ifndef _SFX_SEQUENCER_H_
-#define _SFX_SEQUENCER_H_
+#ifndef SCI_SFX_SEQUENCER_H
+#define SCI_SFX_SEQUENCER_H
 
-#ifdef HAVE_CONFIG_H
-#  include <config.h>
-#endif /* HAVE_CONFIG_H */
+#include "common/scummsys.h"
+
 #include "sci/include/sfx_core.h"
-#include <stdio.h>
 #include "sci/sfx/device.h"
 #include "sci/include/scitypes.h"
 
@@ -143,4 +141,4 @@
 
 } // End of namespace Sci
 
-#endif /* _SFX_SEQUENCER_H_ */
+#endif // SCI_SFX_SEQUENCER_H

Modified: scummvm/trunk/engines/sci/sfx/softseq.h
===================================================================
--- scummvm/trunk/engines/sci/sfx/softseq.h	2009-02-21 18:58:32 UTC (rev 38724)
+++ scummvm/trunk/engines/sci/sfx/softseq.h	2009-02-21 19:01:32 UTC (rev 38725)
@@ -23,8 +23,8 @@
  *
  */
 
-#ifndef SFX_SOFTSEQ_H_
-#define SFX_SOFTSEQ_H_
+#ifndef SCI_SFX_SOFTSEQ_H
+#define SCI_SFX_SOFTSEQ_H
 
 #include "sci/include/sfx_core.h"
 #include "sci/include/sfx_pcm.h"
@@ -122,4 +122,4 @@
 
 } // End of namespace Sci
 
-#endif /* !defined(SFX_SOFTSEQ_H_) */
+#endif // SCI_SFX_SOFTSEQ_H


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