[Scummvm-cvs-logs] SF.net SVN: scummvm: [26400] scummvm/trunk/engines/parallaction

peres001 at users.sourceforge.net peres001 at users.sourceforge.net
Sat Apr 7 12:03:00 CEST 2007


Revision: 26400
          http://scummvm.svn.sourceforge.net/scummvm/?rev=26400&view=rev
Author:   peres001
Date:     2007-04-07 03:02:59 -0700 (Sat, 07 Apr 2007)

Log Message:
-----------
Reduced dependency between project files, and prepared defs.h for deletion as soon as List<>'s usage is implemented.

Modified Paths:
--------------
    scummvm/trunk/engines/parallaction/archive.cpp
    scummvm/trunk/engines/parallaction/callables.cpp
    scummvm/trunk/engines/parallaction/commands.h
    scummvm/trunk/engines/parallaction/defs.h
    scummvm/trunk/engines/parallaction/dialogue.cpp
    scummvm/trunk/engines/parallaction/disk.cpp
    scummvm/trunk/engines/parallaction/disk.h
    scummvm/trunk/engines/parallaction/graphics.cpp
    scummvm/trunk/engines/parallaction/graphics.h
    scummvm/trunk/engines/parallaction/location.cpp
    scummvm/trunk/engines/parallaction/menu.cpp
    scummvm/trunk/engines/parallaction/menu.h
    scummvm/trunk/engines/parallaction/parallaction.cpp
    scummvm/trunk/engines/parallaction/parallaction.h
    scummvm/trunk/engines/parallaction/parser.h
    scummvm/trunk/engines/parallaction/walk.cpp
    scummvm/trunk/engines/parallaction/walk.h
    scummvm/trunk/engines/parallaction/zone.h

Modified: scummvm/trunk/engines/parallaction/archive.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/archive.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/archive.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -23,6 +23,7 @@
 #include "common/file.h"
 
 #include "parallaction/disk.h"
+#include "parallaction/parallaction.h"
 
 
 namespace Parallaction {

Modified: scummvm/trunk/engines/parallaction/callables.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/callables.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/callables.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -20,6 +20,12 @@
  *
  */
 
+
+#include "common/stdafx.h"
+#include "common/system.h"
+
+#include "common/file.h"
+
 #include "parallaction/disk.h"
 #include "parallaction/parallaction.h"
 #include "parallaction/graphics.h"
@@ -28,8 +34,6 @@
 #include "parallaction/music.h"
 #include "parallaction/zone.h"
 
-#include "common/file.h"
-
 namespace Parallaction {
 
 

Modified: scummvm/trunk/engines/parallaction/commands.h
===================================================================
--- scummvm/trunk/engines/parallaction/commands.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/commands.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -23,6 +23,10 @@
 #ifndef PARALLACTION_COMMANDS_H
 #define PARALLACTION_COMMANDS_H
 
+
+#include "common/stdafx.h"
+#include "common/scummsys.h"
+
 #include "parallaction/defs.h"
 
 namespace Parallaction {
@@ -34,6 +38,9 @@
 	kFlagsGlobal		= 0x40000000
 };
 
+struct Zone;
+struct Animation;
+
 // TODO: turn this into a struct
 union CommandData {
 	uint32			_flags;

Modified: scummvm/trunk/engines/parallaction/defs.h
===================================================================
--- scummvm/trunk/engines/parallaction/defs.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/defs.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -23,23 +23,16 @@
 #ifndef PARALLACTION_DEFS_H
 #define PARALLACTION_DEFS_H
 
-#include "common/stdafx.h"
-#include "common/system.h"
-
 namespace Parallaction {
 
-#define PATH_LEN	200
-
-
-
-
+// TODO (LIST): this struct won't be used anymore as soon as List<> is enforced throughout the code.
 struct Node {
 	Node*	_prev;
 	Node*	_next;
 
 	Node() {
-		_prev = NULL;
-		_next = NULL;
+		_prev = 0;
+		_next = 0;
 	}
 
 	virtual ~Node() {
@@ -47,107 +40,7 @@
 	}
 };
 
-struct WalkNode : public Node {
-	int32	_x;
-	int32	_y;
 
-public:
-	WalkNode() : _x(0), _y(0) {
-	}
-
-	WalkNode(int32 x, int32 y) : _x(x), _y(y) {
-	}
-
-	WalkNode(const WalkNode& w) : Node(), _x(w._x), _y(w._y) {
-		// TODO: This will not properly set _prev and _next
-		// -- not sure what would be "correct" here?
-	}
-
-	void getPoint(Common::Point &p) const {
-		p.x = _x;
-		p.y = _y;
-	}
-};
-
-struct SpeakData;
-struct Question;
-typedef Question Dialogue;
-struct Instruction;
-struct LocalVariable;
-
-struct StaticCnv {
-	uint16	_width; 	//
-	uint16	_height;	//
-	byte*	_data0; 	// bitmap
-	byte*	_data1; 	// unused
-
-	StaticCnv() {
-		_width = _height = 0;
-		_data0 = _data1 = NULL;
-	}
-};
-
-
-struct Cnv {
-	uint16	_count; 	// # of frames
-	uint16	_width; 	//
-	uint16	_height;	//
-	byte**	field_8;	// unused
-	byte*	_data;
-
-public:
-	Cnv() {
-		_width = _height = _count = 0;
-		_data = NULL;
-	}
-
-	Cnv(uint16 numFrames, uint16 width, uint16 height, byte* data) : _count(numFrames), _width(width), _height(height), _data(data) {
-
-	}
-
-	~Cnv() {
-		if (_count == 0 || _data == NULL) return;
-		free(_data);
-	}
-
-	byte* getFramePtr(uint16 index) {
-		if (index >= _count)
-			return NULL;
-		return &_data[index * _width * _height];
-	}
-};
-
-struct Animation;
-struct Zone;
-struct Label;
-
-struct Command;
-
-typedef void (*callable)(void*);
-
-struct Credit {
-	const char *_role;
-	const char *_name;
-};
-
-void errorFileNotFound(const char*);
-
-void beep();
-
-enum {
-	kDebugDisk = 1 << 0,
-	kDebugWalk = 1 << 1,
-	kDebugLocation = 1 << 2,
-	kDebugDialogue = 1 << 3,
-	kDebugGraphics = 1 << 4,
-	kDebugJobs = 1 << 5,
-	kDebugInput = 1 << 6
-};
-
-enum {
-	GF_DEMO = 1 << 0
-};
-
 } // namespace Parallaction
 
 

Modified: scummvm/trunk/engines/parallaction/dialogue.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/dialogue.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/dialogue.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -20,6 +20,8 @@
  *
  */
 
+#include "common/stdafx.h"
+
 #include "parallaction/commands.h"
 #include "parallaction/parallaction.h"
 #include "parallaction/graphics.h"

Modified: scummvm/trunk/engines/parallaction/disk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/disk.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/disk.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -20,6 +20,8 @@
  *
  */
 
+#include "common/stdafx.h"
+
 #include "parallaction/defs.h"
 #include "parallaction/graphics.h"
 #include "parallaction/parallaction.h"

Modified: scummvm/trunk/engines/parallaction/disk.h
===================================================================
--- scummvm/trunk/engines/parallaction/disk.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/disk.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -40,6 +40,9 @@
 class Gfx;
 class Script;
 
+struct Cnv;
+struct StaticCnv;
+
 class Archive : public Common::SeekableReadStream {
 
 protected:

Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/graphics.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -20,6 +20,8 @@
  *
  */
 
+#include "common/stdafx.h"
+#include "common/system.h"
 #include "common/file.h"
 
 #include "parallaction/graphics.h"

Modified: scummvm/trunk/engines/parallaction/graphics.h
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/graphics.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -23,10 +23,13 @@
 #ifndef PARALLACTION_GRAPHICS_H
 #define PARALLACTION_GRAPHICS_H
 
-#include "parallaction/defs.h"
+#include "common/rect.h"
 #include "common/stream.h"
 
 
+#include "parallaction/defs.h"
+
+
 namespace Parallaction {
 
 
@@ -65,6 +68,48 @@
 
 #include "common/pack-end.h"	// END STRUCT PACKING
 
+struct StaticCnv {
+	uint16	_width; 	//
+	uint16	_height;	//
+	byte*	_data0; 	// bitmap
+	byte*	_data1; 	// unused
+
+	StaticCnv() {
+		_width = _height = 0;
+		_data0 = _data1 = NULL;
+	}
+};
+
+struct Cnv {
+	uint16	_count; 	// # of frames
+	uint16	_width; 	//
+	uint16	_height;	//
+	byte**	field_8;	// unused
+	byte*	_data;
+
+public:
+	Cnv() {
+		_width = _height = _count = 0;
+		_data = NULL;
+	}
+
+	Cnv(uint16 numFrames, uint16 width, uint16 height, byte* data) : _count(numFrames), _width(width), _height(height), _data(data) {
+
+	}
+
+	~Cnv() {
+		if (_count == 0 || _data == NULL) return;
+		free(_data);
+	}
+
+	byte* getFramePtr(uint16 index) {
+		if (index >= _count)
+			return NULL;
+		return &_data[index * _width * _height];
+	}
+};
+
+
 #define NUM_BUFFERS 6
 
 class Parallaction;

Modified: scummvm/trunk/engines/parallaction/location.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/location.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/location.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -26,6 +26,7 @@
 #include "parallaction/parser.h"
 #include "parallaction/music.h"
 #include "parallaction/commands.h"
+#include "parallaction/walk.h"
 #include "parallaction/zone.h"
 
 namespace Parallaction {

Modified: scummvm/trunk/engines/parallaction/menu.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/menu.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/menu.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -20,6 +20,9 @@
  *
  */
 
+#include "common/stdafx.h"
+#include "common/system.h"
+
 #include "parallaction/menu.h"
 #include "parallaction/disk.h"
 #include "parallaction/music.h"
@@ -199,7 +202,7 @@
 				if (128 + _si*49 <= _vm->_mousePos.x) continue;
 				if (180 - _si*25 <=_vm->_mousePos.y) continue;
 
-				beep();
+//				beep();
 				return _si;
 			}
 		}
@@ -337,7 +340,7 @@
 				_vm->_gfx->flatBlitCnv(&v14, _di * SLOT_WIDTH + SLOT_X, SLOT_Y, Gfx::kBitBack);
 				_vm->_gfx->flatBlitCnv(&v14, _di * SLOT_WIDTH + SLOT_X, SLOT_Y, Gfx::kBitFront);
 
-				beep();
+//				beep();
 
 				if (_dinoKey[_di] == _si)
 					_dino_points++;  // dino

Modified: scummvm/trunk/engines/parallaction/menu.h
===================================================================
--- scummvm/trunk/engines/parallaction/menu.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/menu.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -23,6 +23,8 @@
 #ifndef PARALLACTION_MENU_H
 #define PARALLACTION_MENU_H
 
+#include "common/rect.h"
+
 #include "parallaction/defs.h"
 
 namespace Parallaction {

Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -601,7 +601,7 @@
 				}
 			}
 
-			beep();
+//			beep();
 			changeCursor(kCursorArrow);
 			return &_input;
 		}

Modified: scummvm/trunk/engines/parallaction/parallaction.h
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/parallaction.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -41,6 +41,21 @@
 
 namespace Parallaction {
 
+enum {
+	kDebugDisk = 1 << 0,
+	kDebugWalk = 1 << 1,
+	kDebugLocation = 1 << 2,
+	kDebugDialogue = 1 << 3,
+	kDebugGraphics = 1 << 4,
+	kDebugJobs = 1 << 5,
+	kDebugInput = 1 << 6
+};
+
+enum {
+	GF_DEMO = 1 << 0
+};
+
+
 // high values mean high priority
 
 enum {
@@ -99,6 +114,13 @@
 	}
 };
 
+struct Credit {
+	const char *_role;
+	const char *_name;
+};
+
+typedef void (*callable)(void*);
+
 extern uint16 _mouseButtons;
 
 extern uint16 _score;
@@ -145,6 +167,8 @@
 #define IS_MINI_CHARACTER(s) (((s)[0] == 'm'))
 #define IS_DUMMY_CHARACTER(s) (((s)[0] == 'D'))
 
+#define PATH_LEN	200
+
 void waitUntilLeftClick();
 
 void addNode(Node *list, Node *n);

Modified: scummvm/trunk/engines/parallaction/parser.h
===================================================================
--- scummvm/trunk/engines/parallaction/parser.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/parser.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -23,9 +23,10 @@
 #ifndef PARALLACTION_PARSER_H
 #define PARALLACTION_PARSER_H
 
-#include "parallaction/defs.h"
 #include "common/stream.h"
 
+#include "parallaction/defs.h"
+
 namespace Parallaction {
 
 char   *parseNextLine(char *s, uint16 count);

Modified: scummvm/trunk/engines/parallaction/walk.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/walk.cpp	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/walk.cpp	2007-04-07 10:02:59 UTC (rev 26400)
@@ -446,6 +446,23 @@
 	_buffer = (byte*)malloc(SCREENPATH_WIDTH * SCREEN_HEIGHT);
 }
 
+
+WalkNode::WalkNode() : _x(0), _y(0) {
+}
+
+WalkNode::WalkNode(int32 x, int32 y) : _x(x), _y(y) {
+}
+
+WalkNode::WalkNode(const WalkNode& w) : _x(w._x), _y(w._y) {
+}
+
+void WalkNode::getPoint(Common::Point &p) const {
+	p.x = _x;
+	p.y = _y;
+}
+
+
+
 } // namespace Parallaction
 
 

Modified: scummvm/trunk/engines/parallaction/walk.h
===================================================================
--- scummvm/trunk/engines/parallaction/walk.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/walk.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -27,7 +27,19 @@
 
 namespace Parallaction {
 
+struct WalkNode : public Node {
+	int32	_x;
+	int32	_y;
 
+public:
+	WalkNode();
+	WalkNode(int32 x, int32 y);
+	WalkNode(const WalkNode& w);
+
+	void getPoint(Common::Point &p) const;
+};
+
+
 WalkNode 	*buildWalkPath(uint16 x, uint16 y);
 void 		 jobWalk(void*, Job *j);
 uint16		 checkDoor();
@@ -35,6 +47,8 @@
 void		 initWalk();
 uint16 		 queryPath(uint16 x, uint16 y);
 
+
+
 }
 
 #endif

Modified: scummvm/trunk/engines/parallaction/zone.h
===================================================================
--- scummvm/trunk/engines/parallaction/zone.h	2007-04-07 09:31:24 UTC (rev 26399)
+++ scummvm/trunk/engines/parallaction/zone.h	2007-04-07 10:02:59 UTC (rev 26400)
@@ -24,7 +24,9 @@
 #define PARALLACTION_ZONE_H
 
 #include "parallaction/defs.h"
+#include "parallaction/graphics.h"
 
+
 namespace Parallaction {
 
 enum ZoneTypes {
@@ -61,6 +63,8 @@
 
 #define NUM_ANSWERS		 5
 
+struct Command;
+
 struct Question {
 	char*		_text;
 	char*		_answers[NUM_ANSWERS];
@@ -89,6 +93,8 @@
 	}
 };
 
+typedef Question Dialogue;
+
 struct GetData {	// size = 24
 	uint32			_icon;
 	StaticCnv		*_cnv;
@@ -235,6 +241,8 @@
 	kInstMaskedPut		= 8
 };
 
+struct Animation;
+
 struct Instruction : public Node {
 	uint32	_index;
 	uint32	_flags;


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