[Scummvm-cvs-logs] CVS: scummvm/queen structs.h,NONE,1.1 logic.h,1.9,1.10 graphics.h,1.6,1.7

Gregory Montoir cyx at users.sourceforge.net
Sat Oct 4 04:40:08 CEST 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv24196

Modified Files:
	logic.h graphics.h 
Added Files:
	structs.h 
Log Message:
new header for common structs definitions

--- NEW FILE: structs.h ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2003 The ScummVM project
 *
 * 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/queen/structs.h,v 1.1 2003/10/04 11:39:53 cyx Exp $
 *
 */

#ifndef QUEENSTRUCTS_H
#define QUEENSTRUCTS_H

namespace Queen {


struct Box {
	uint16 x1, y1, x2, y2;

	bool intersects(uint16 x, uint16 y, uint16 w, uint16 h) const {
		return (x + w > x1) && (y + h > y1) && (x <= x2) && (y <= y2);
	}
};


struct Area {
	int16 mapNeighbours;
	Box box;
	uint16 bottomScaleFactor;
	uint16 topScaleFactor;
	uint16 object;
};


struct WalkOffData {
	int16 entryobj;
	uint16 x;
	uint16 y;
};


struct GraphicData {
	uint16 x, y;
	int16 firstFrame, lastFrame;
	uint16 speed;
};


struct ObjectData {
	int16 name;
	uint16 x;
	uint16 y;
	uint16 description;
	int16 entryObj;
	uint16 room;
	int16 state;
	int16 image;
};


struct ItemData {
	int16 name;
	int16 description;
	int16 state;
	uint16 bobFrame;
	uint16 sfxDescription;
};


struct ActorData {
	int16 room;
	int16 bobNum;
	uint16 name;
	uint16 gameStateSlot;
	uint16 gameStateValue;
	uint16 color;
	uint16 bobFrameStanding;
	uint16 x;
	uint16 y;
	uint16 anim;
	uint16 bankNum;
	uint16 actorFile;
};


} // End of namespace Queen

#endif

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- logic.h	4 Oct 2003 08:50:48 -0000	1.9
+++ logic.h	4 Oct 2003 11:39:53 -0000	1.10
@@ -23,25 +23,10 @@
 #define QUEENLOGIC_H
 
 #include "queen/queen.h"
+#include "queen/structs.h"
 
 namespace Queen {
 
-struct GraphicData {
-	uint16 x, y;
-	int16 firstFrame, lastFrame;
-	uint16 speed;
-};
-
-struct ObjectData {
-	int16 name;
-	uint16 x;
-	uint16 y;
-	uint16 description;
-	int16 entryObj;
-	uint16 room;
-	int16 state;
-	int16 image;
-};
 
 enum {
 	FRAME_XTRA = 2
@@ -90,13 +75,13 @@
 	uint16 *_sfxName;
 	uint16 *_objMax;
 	uint16 *_areaMax;
-	uint16 (*_objectBox)[4];
-	uint16 (*_itemData)[5];
+	uint16 (*_objectBox)[4]; // FIXME: Box *_objectBox;
+	uint16 (*_itemData)[5]; // FIXME: ItemData *_itemData;
 	GraphicData *_graphicData;
 	ObjectData *_objectData;
-	uint16 (*_actorData)[12];
-	int16 (*_area)[11][8];
-	uint16 (*_walkOffData)[3];
+	uint16 (*_actorData)[12]; // FIXME: ActorData *_actorData;
+	int16 (*_area)[11][8]; // FIXME: Area *_area[11];
+	uint16 (*_walkOffData)[3]; // FIXME: WalkOffData *_walkOffData;
 
 	enum {
 		GAME_STATE_COUNT = 211

Index: graphics.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- graphics.h	3 Oct 2003 19:47:41 -0000	1.6
+++ graphics.h	4 Oct 2003 11:39:53 -0000	1.7
@@ -23,6 +23,7 @@
 #define QUEENGRAPHICS_H
 
 #include "queen/queen.h"
+#include "queen/structs.h"
 
 namespace Queen {
 
@@ -38,15 +39,6 @@
 	uint16 width, height;
 	uint16 xhotspot, yhotspot;
 	uint8 *data;
-};
-
-// FIXME: share that with logic.h (ObjectData) ?
-struct Box {
-	uint16 x1, y1, x2, y2;
-
-	bool intersects(uint16 x, uint16 y, uint16 w, uint16 h) const {
-		return (x + w > x1) && (y + h > y1) && (x <= x2) && (y <= y2);
-	}
 };
 
 





More information about the Scummvm-git-logs mailing list