[Scummvm-cvs-logs] SF.net SVN: scummvm: [20856] scummvm/trunk/engines/cine

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Feb 24 16:48:03 CET 2006


Revision: 20856
Author:   fingolfin
Date:     2006-02-24 16:46:56 -0800 (Fri, 24 Feb 2006)
ViewCVS:  http://svn.sourceforge.net/scummvm?rev=20856&view=rev

Log Message:
-----------
- avoid using typedef for structs (it is just not necessary in C++)
- added a const/static here and there
- started to reduce header dependencies

Modified Paths:
--------------
    scummvm/trunk/engines/cine/anim.cpp
    scummvm/trunk/engines/cine/anim.h
    scummvm/trunk/engines/cine/cine.h
    scummvm/trunk/engines/cine/font.cpp
    scummvm/trunk/engines/cine/font.h
    scummvm/trunk/engines/cine/object.h
    scummvm/trunk/engines/cine/pal.h
    scummvm/trunk/engines/cine/part.h
    scummvm/trunk/engines/cine/prc.cpp
    scummvm/trunk/engines/cine/prc.h
    scummvm/trunk/engines/cine/script.h
    scummvm/trunk/engines/cine/sfx_player.h
    scummvm/trunk/engines/cine/sound_driver.h
    scummvm/trunk/engines/cine/various.cpp
    scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/anim.cpp
===================================================================
--- scummvm/trunk/engines/cine/anim.cpp	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/anim.cpp	2006-02-25 00:46:56 UTC (rev 20856)
@@ -36,8 +36,6 @@
 	uint16 field_E;
 };
 
-typedef struct animHeader2Struct animHeader2Struct;
-
 uint16 frameVar0 = 0;
 
 animHeaderStruct animHeader;

Modified: scummvm/trunk/engines/cine/anim.h
===================================================================
--- scummvm/trunk/engines/cine/anim.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/anim.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -50,15 +50,11 @@
 	uint16 field_14;
 };
 
-typedef struct animHeaderStruct animHeaderStruct;
-
 struct animDataEntry {
 	char name[9];
 	uint8 param;
 };
 
-typedef struct animDataEntry animDataEntry;
-
 extern animDataEntry animData[];
 
 void loadResource(char *animName);

Modified: scummvm/trunk/engines/cine/cine.h
===================================================================
--- scummvm/trunk/engines/cine/cine.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/cine.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -35,7 +35,6 @@
 #include "base/engine.h"
 #include "base/gameDetector.h"
 
-#include "cine/font.h"
 #include "cine/various.h"
 #include "cine/flip_support.h"
 #include "cine/texte.h"
@@ -51,7 +50,6 @@
 #include "cine/pal.h"
 #include "cine/gfx.h"
 #include "cine/anim.h"
-#include "cine/auto00.h"
 #include "cine/unpack.h"
 #include "cine/bg_list.h"
 #include "cine/sfx_player.h"

Modified: scummvm/trunk/engines/cine/font.cpp
===================================================================
--- scummvm/trunk/engines/cine/font.cpp	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/font.cpp	2006-02-25 00:46:56 UTC (rev 20856)
@@ -22,11 +22,14 @@
  *
  */
 
-#include "cine/cine.h"
+#include "common/stdafx.h"
+#include "common/scummsys.h"
 
+#include "cine/font.h"
+
 namespace Cine {
 
-const characterEntry fontParamTable[256] = {
+const CharacterEntry fontParamTable[256] = {
 	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
 	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},
 	{ 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0}, { 0, 0},

Modified: scummvm/trunk/engines/cine/font.h
===================================================================
--- scummvm/trunk/engines/cine/font.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/font.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -27,12 +27,12 @@
 
 namespace Cine {
 
-struct characterEntry {
+struct CharacterEntry {
 	uint8 characterIdx;
 	uint8 characterWidth;
 };
 
-extern const characterEntry fontParamTable[256];
+extern const CharacterEntry fontParamTable[256];
 
 } // End of namespace Cine
 

Modified: scummvm/trunk/engines/cine/object.h
===================================================================
--- scummvm/trunk/engines/cine/object.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/object.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -27,7 +27,7 @@
 
 namespace Cine {
 
-typedef struct {
+struct objectStruct {
 	int16 x;
 	int16 y;
 	uint16 mask;
@@ -35,7 +35,7 @@
 	int16 costume;
 	char name[20];
 	uint16 part;
-} objectStruct;
+};
 
 struct overlayHeadElement {
 	struct overlayHeadElement *next;
@@ -48,8 +48,6 @@
 	int16 var12;
 };
 
-typedef struct overlayHeadElement overlayHeadElement;
-
 #define NUM_MAX_OBJECT 255
 #define NUM_MAX_OBJECTDATA 255
 

Modified: scummvm/trunk/engines/cine/pal.h
===================================================================
--- scummvm/trunk/engines/cine/pal.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/pal.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -33,8 +33,6 @@
 	uint8 pal2[16];
 };
 
-typedef struct palEntryStruct palEntryStruct;
-
 void loadPal(const char *fileName);
 
 extern uint16 tempPalette[256];

Modified: scummvm/trunk/engines/cine/part.h
===================================================================
--- scummvm/trunk/engines/cine/part.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/part.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -27,16 +27,16 @@
 
 namespace Cine {
 
-typedef struct {
+struct partBufferStruct{
 	char part_name[10];
 	uint32 varA;		/* unused */
 	uint32 offset;
 	uint32 packed_size;
 	uint32 unpacked_size;
 	uint32 var1A;		/* unused */
-} partBufferStruct;
+};
 
-typedef struct {
+struct animDataStruct {
 	uint16 width;
 	uint16 var1;
 	uint16 bpp;
@@ -47,7 +47,7 @@
 	int16 fileIdx;
 	int16 frameIdx;
 	char name[10];
-} animDataStruct;
+};
 
 #define NUM_MAX_PARTDATA 255
 #define NUM_MAX_ANIMDATA 255

Modified: scummvm/trunk/engines/cine/prc.cpp
===================================================================
--- scummvm/trunk/engines/cine/prc.cpp	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/prc.cpp	2006-02-25 00:46:56 UTC (rev 20856)
@@ -23,6 +23,7 @@
  */
 
 #include "cine/cine.h"
+#include "cine/auto00.h"
 
 namespace Cine {
 

Modified: scummvm/trunk/engines/cine/prc.h
===================================================================
--- scummvm/trunk/engines/cine/prc.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/prc.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -37,8 +37,6 @@
 	int16 scriptIdx;
 };
 
-typedef struct prcLinkedListStruct prcLinkedListStruct;
-
 extern prcLinkedListStruct globalScriptsHead;
 extern prcLinkedListStruct objScriptList;
 

Modified: scummvm/trunk/engines/cine/script.h
===================================================================
--- scummvm/trunk/engines/cine/script.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/script.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -29,11 +29,11 @@
 
 #define SCRIPT_STACK_SIZE 50
 
-typedef struct {
+struct scriptStruct {
 	byte *ptr;
 	uint16 var4;
 	int16 stack[SCRIPT_STACK_SIZE];
-} scriptStruct;
+};
 
 #define NUM_MAX_SCRIPT 50
 

Modified: scummvm/trunk/engines/cine/sfx_player.h
===================================================================
--- scummvm/trunk/engines/cine/sfx_player.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/sfx_player.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -27,21 +27,21 @@
 
 namespace Cine {
 
-typedef struct {
+struct BasesonEntryStruct {
 	char name[14];
 	uint32 offset;
 	uint32 size;
 	uint32 unpackedSize;
-} BasesonEntryStruct;
+};
 
-typedef struct {
+struct sfxStateStruct {
 	uint8 *songData;
 	int currentInstrumentChannel[4];
 	uint8 *instruments[15];
 	int currentOrder;
 	int currentPos;
 	int numOrders;
-} sfxStateStruct;
+};
 
 extern uint16 snd_eventsDelay;
 extern int snd_songIsPlaying;

Modified: scummvm/trunk/engines/cine/sound_driver.h
===================================================================
--- scummvm/trunk/engines/cine/sound_driver.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/sound_driver.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -46,12 +46,12 @@
 #define ADLIB_REG_FEEDBACK_STRENGTH_CONNECTION_TYPE 0xC0
 #define ADLIB_REG_WAVE_SELECT 0xE0
 
-typedef struct {
+struct sndDriverStruct {
 	void (*setupChannel) (int channelNum, const uint8 * data, int instrumentNum);
 	void (*setChannelFrequency) (int channelNum, int frequency);
 	void (*stopChannel) (int channelNum);
 	void (*playSound) (uint8 * data, int channelNum, int volume);
-} sndDriverStruct;
+};
 
 extern uint16 snd_fadeOutCounter, snd_songTicksCounter;
 extern uint8 *snd_adlibInstrumentsTable[4];

Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/various.cpp	2006-02-25 00:46:56 UTC (rev 20856)
@@ -23,6 +23,7 @@
  */
 
 #include "cine/cine.h"
+#include "cine/font.h"
 
 namespace Cine {
 

Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h	2006-02-25 00:42:26 UTC (rev 20855)
+++ scummvm/trunk/engines/cine/various.h	2006-02-25 00:46:56 UTC (rev 20856)
@@ -38,10 +38,10 @@
 
 extern int16 allowSystemMenu;
 
-typedef struct {
+struct unk1Struct {
 	uint8 *ptr;
 	uint16 len;
-} unk1Struct;
+};
 
 #define NUM_MAX_MESSAGE 255
 
@@ -65,8 +65,6 @@
 	int16 var1E;
 };
 
-typedef struct unkListElementStruct unkListElementStruct;
-
 extern unkListElementStruct unkList;
 
 extern uint32 var6;
@@ -162,8 +160,6 @@
 	int16 param;
 };
 
-typedef struct selectedObjStruct selectedObjStruct;
-
 extern uint16 defaultMenuBoxColor;
 extern uint16 defaultMenuBoxColor2;
 
@@ -181,8 +177,6 @@
 	int Y;
 };
 
-typedef struct mouseStatusStruct mouseStatusStruct;
-
 extern int16 additionalBgVScroll;
 
 void addUnkListElement(int16 param0, int16 param1, int16 param2, int16 param3, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8);







More information about the Scummvm-git-logs mailing list