/******************************************************************************
*									      *
*	(C) 1993 by K. Ballueder					      *
*									      *
*	See README and COPYING for details.				      *
*									      *
*		kballued@charon.physik.uni-osnabrueck.de		      *
*		kballued@jupiter.rz.uni-osnabrueck.de			      *
*									      *
**** Changelog: ***************************************************************
*/


//
//	Mover.d: simple (straight) Mover, interface definition
//

#include "movers.h"
#include "bdash.h"
#include "graphic.h"
#include "io.h"
#include "game.h"

//	determines, which Graphic-Object is to be used
#ifdef ANIMOBJECT
	#include "AnimObject.h"
	#define GOBJECT AnimObject
#else
	#include "GObject.h"
	#define GOBJECT GObject
#endif

% MoverClass: Class Mover: Object{
// components
        int xpos;
        int ypos;
        int type;
        int direction;
        GOBJECT @ gobject;
%-
	int 	getxpos (_self);
	int 	getypos (_self);
	int 	gettype (_self);
	int	getdir (_self);
	int	setdir (_self, int dir);
	int 	setxpos (_self, int x);
	int 	setypos (_self, int y);
	int 	settype (_self, int type);
	Mover	@ mmove(_self, int figurnr, int x1, int y1, int x2, int y2);
	Mover 	@ mdisplay (_self);
	Mover	@ animate (_self);
%} 


#define xpos(a)		((struct Mover *)a)->xpos
#define ypos(a)		((struct Mover *)a)->ypos
#define direction(a)	((struct Mover *)a)->direction
