[Scummvm-cvs-logs] CVS: scummvm/scumm actor.cpp,1.88,1.89 boxes.cpp,1.22,1.23 boxes.h,1.4,1.5 gfx.cpp,2.102,2.103 gfx.h,1.27,1.28 scumm.h,1.190,1.191

Max Horn fingolfin at users.sourceforge.net
Thu May 15 14:58:09 CEST 2003


Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1:/tmp/cvs-serv10066

Modified Files:
	actor.cpp boxes.cpp boxes.h gfx.cpp gfx.h scumm.h 
Log Message:
ScummPoint -> ScummVM::Point

Index: actor.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/actor.cpp,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -d -r1.88 -r1.89
--- actor.cpp	14 May 2003 13:30:52 -0000	1.88
+++ actor.cpp	15 May 2003 21:57:38 -0000	1.89
@@ -1400,7 +1400,7 @@
 }
 
 void Actor::walkActorOld() {
-	ScummPoint gateLoc[5];	// Gate locations
+	ScummVM::Point gateLoc[5];	// Gate locations
 	int new_dir, next_box;
 
 	if (!moving)

Index: boxes.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.cpp,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- boxes.cpp	10 May 2003 23:47:39 -0000	1.22
+++ boxes.cpp	15 May 2003 21:57:38 -0000	1.23
@@ -293,7 +293,7 @@
 	if (box.ul.x == box.ur.x && box.ul.y == box.ur.y && box.lr.x == box.ll.x && box.lr.y == box.ll.y ||
 		box.ul.x == box.ll.x && box.ul.y == box.ll.y && box.ur.x == box.lr.x && box.ur.y == box.lr.y) {
 
-		ScummPoint pt;
+		ScummVM::Point pt;
 		pt = closestPtOnLine(box.ul.x, box.ul.y, box.lr.x, box.lr.y, x, y);
 		if (distanceFromPt(x, y, pt.x, pt.y) <= 4)
 			return true;
@@ -389,11 +389,11 @@
 	return diffx + diffy;
 }
 
-ScummPoint Scumm::closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y) {
+ScummVM::Point Scumm::closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y) {
 	int lydiff, lxdiff;
 	int32 dist, a, b, c;
 	int x2, y2;
-	ScummPoint pt;
+	ScummVM::Point pt;
 
 	if (llx == ulx) {	// Vertical line?
 		x2 = ulx;
@@ -497,7 +497,7 @@
 }
 
 AdjustBoxResult Scumm::getClosestPtOnBox(int b, int x, int y) {
-	ScummPoint pt;
+	ScummVM::Point pt;
 	AdjustBoxResult best;
 	uint dist;
 	uint bestdist = (uint)0xFFFF;
@@ -587,7 +587,7 @@
 bool Scumm::findPathTowards(Actor *a, byte box1nr, byte box2nr, byte box3nr, int16 &foundPathX, int16 &foundPathY) {
 	BoxCoords box1;
 	BoxCoords box2;
-	ScummPoint tmp;
+	ScummVM::Point tmp;
 	int i, j;
 	int flag;
 	int q, pos;
@@ -1026,10 +1026,10 @@
 	return (PathVertex *)addToBoxVertexHeap(sizeof(PathVertex));
 }
 
-void Scumm::findPathTowardsOld(Actor *actor, byte trap1, byte trap2, byte final_trap, ScummPoint gateLoc[5]) {
-	ScummPoint pt;
-	ScummPoint gateA[2];
-	ScummPoint gateB[2];
+void Scumm::findPathTowardsOld(Actor *actor, byte trap1, byte trap2, byte final_trap, ScummVM::Point gateLoc[5]) {
+	ScummVM::Point pt;
+	ScummVM::Point gateA[2];
+	ScummVM::Point gateB[2];
 
 	getGates(trap1, trap2, gateA, gateB);
 
@@ -1067,15 +1067,15 @@
 	return;
 }
 
-void Scumm::getGates(int trap1, int trap2, ScummPoint gateA[2], ScummPoint gateB[2]) {
+void Scumm::getGates(int trap1, int trap2, ScummVM::Point gateA[2], ScummVM::Point gateB[2]) {
 	int i, j;
 	int dist[8];
 	int minDist[3];
 	int closest[3];
 	int box[3];
 	BoxCoords coords;
-	ScummPoint Clo[8];
-	ScummPoint poly[8];
+	ScummVM::Point Clo[8];
+	ScummVM::Point poly[8];
 	AdjustBoxResult abr;
 	int line1, line2;
 

Index: boxes.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/boxes.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- boxes.h	9 May 2003 21:46:34 -0000	1.4
+++ boxes.h	15 May 2003 21:57:38 -0000	1.5
@@ -23,6 +23,8 @@
 #ifndef BOXES_H
 #define BOXES_H
 
+#include "common/rect.h"
+
 #define SIZEOF_BOX_V2 8
 #define SIZEOF_BOX_V3 18
 #define SIZEOF_BOX 20
@@ -42,10 +44,10 @@
 };
 
 struct BoxCoords {			/* Box coordinates */
-	ScummPoint ul;
-	ScummPoint ur;
-	ScummPoint ll;
-	ScummPoint lr;
+	ScummVM::Point ul;
+	ScummVM::Point ur;
+	ScummVM::Point ll;
+	ScummVM::Point lr;
 };
 
 struct Box;

Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.cpp,v
retrieving revision 2.102
retrieving revision 2.103
diff -u -d -r2.102 -r2.103
--- gfx.cpp	15 May 2003 21:31:03 -0000	2.102
+++ gfx.cpp	15 May 2003 21:57:38 -0000	2.103
@@ -1950,7 +1950,7 @@
 
 void Scumm::setCameraAt(int pos_x, int pos_y) {
 	if (_features & GF_AFTER_V7) {
-		ScummPoint old;
+		ScummVM::Point old;
 
 		old = camera._cur;
 
@@ -2042,7 +2042,7 @@
 	}
 }
 
-void Scumm::clampCameraPos(ScummPoint *pt) {
+void Scumm::clampCameraPos(ScummVM::Point *pt) {
 	if (pt->x < VAR(VAR_CAMERA_MIN_X))
 		pt->x = VAR(VAR_CAMERA_MIN_X);
 
@@ -2058,7 +2058,7 @@
 
 void Scumm::moveCamera() {
 	if (_features & GF_AFTER_V7) {
-		ScummPoint old = camera._cur;
+		ScummVM::Point old = camera._cur;
 		Actor *a = NULL;
 
 		if (camera._follows) {

Index: gfx.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/gfx.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- gfx.h	15 May 2003 21:31:03 -0000	1.27
+++ gfx.h	15 May 2003 21:57:38 -0000	1.28
@@ -23,6 +23,8 @@
 #ifndef GFX_H
 #define GFX_H
 
+#include "common/rect.h"
+
 enum {					/* Camera modes */
 	CM_NORMAL = 1,
 	CM_FOLLOW_ACTOR = 2,
@@ -30,10 +32,10 @@
 };
 
 struct CameraData {		/* Camera state data */
-	ScummPoint _cur;
-	ScummPoint _dest;
-	ScummPoint _accel;
-	ScummPoint _last;
+	ScummVM::Point _cur;
+	ScummVM::Point _dest;
+	ScummVM::Point _accel;
+	ScummVM::Point _last;
 	int _leftTrigger, _rightTrigger;
 	byte _follows, _mode;
 	bool _movingToActor;

Index: scumm.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/scumm.h,v
retrieving revision 1.190
retrieving revision 1.191
diff -u -d -r1.190 -r1.191
--- scumm.h	15 May 2003 21:31:03 -0000	1.190
+++ scumm.h	15 May 2003 21:57:38 -0000	1.191
@@ -27,6 +27,7 @@
 #include "common/gameDetector.h"
 #include "common/file.h"
 #include "common/map.h"
+#include "common/rect.h"
 #include "common/str.h"
 #include "common/timer.h"
 #include "common/util.h"
@@ -59,18 +60,6 @@
 	KEY_SET_OPTIONS = 3456 // WinCE
 };
 
-struct ScummPoint {
-	int x, y;
-	bool operator == (const ScummPoint &p) const
-	{
-		return p.x == x && p.y == y;
-	}
-	bool operator != (const ScummPoint &p) const
-	{
-		return p.x != x || p.y != y;
-	}
-};
-
 #include "gfx.h"
 #include "boxes.h"
 
@@ -810,7 +799,7 @@
 	void setCameraAt(int pos_x, int pos_y);
 	void panCameraTo(int x, int y);
 	void setCameraFollows(Actor *a);
-	void clampCameraPos(ScummPoint *pt);
+	void clampCameraPos(ScummVM::Point *pt);
 
 	byte *getPalettePtr();
 	void setupEGAPalette();
@@ -962,7 +951,7 @@
 	PathVertex *addPathVertex();
 	bool checkXYInBoxBounds(int box, int x, int y);
 	uint distanceFromPt(int x, int y, int ptx, int pty);
-	ScummPoint closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y);
+	ScummVM::Point closestPtOnLine(int ulx, int uly, int llx, int lly, int x, int y);
 	void getBoxCoordinates(int boxnum, BoxCoords *bc);
 	byte getMaskFromBox(int box);
 	Box *getBoxBaseAddr(int box);
@@ -985,8 +974,8 @@
 	byte *getBoxMatrixBaseAddr();
 	int getPathToDestBox(byte from, byte to);
 	bool findPathTowards(Actor *a, byte box, byte box2, byte box3, int16 &foundPathX, int16 &foundPathY);
-	void findPathTowardsOld(Actor *a, byte box, byte box2, byte box3, ScummPoint gateLoc[5]);
-	void getGates(int trap1, int trap2, ScummPoint gateA[2], ScummPoint gateB[2]);
+	void findPathTowardsOld(Actor *a, byte box, byte box2, byte box3, ScummVM::Point gateLoc[5]);
+	void getGates(int trap1, int trap2, ScummVM::Point gateA[2], ScummVM::Point gateB[2]);
 	bool inBoxQuickReject(int box, int x, int y, int threshold);
 	AdjustBoxResult getClosestPtOnBox(int box, int x, int y);
 	int getSpecialBox(int param1, int param2);





More information about the Scummvm-git-logs mailing list