chuyiwen_gmsv/include/object.h

76 lines
1.9 KiB
C
Raw Normal View History

2016-12-24 08:45:52 +08:00
#ifndef __OBJECT_h__
#define __OBJECT_h__
#include "common.h"
typedef enum
{
OBJTYPE_NOUSE, /* <20><><EFBFBD><EFBFBD><EFBFBD>̼<EFBFBD><CCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD><CDB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ȼ<EFBFBD><C8BB><EFBFBD>ئ<EFBFBD><D8A6><EFBFBD><EFBFBD><EFBFBD>е<EFBFBD><D0B5><EFBFBD>ë<EFBFBD><C3AB><EFBFBD><EFBFBD>*/
OBJTYPE_CHARA, /* ƽ<>ҷ<EFBFBD><D2B7><EFBFBD><EFBFBD><EFBFBD> CHAR_chara<72>߼<EFBFBD><DFBC>̼<EFBFBD><CCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD> */
OBJTYPE_ITEM, /* ʧ<><CAA7> ة ITEM_item <20>߼<EFBFBD><DFBC>̼<EFBFBD><CCBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>͵<EFBFBD> */
OBJTYPE_GOLD, /* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>ż<EFBFBD><C5BC>ڻ<EFBFBD>index<65><78> <20>Ȼ<EFBFBD><C8BB><EFBFBD><EFBFBD><EFBFBD> */
OBJTYPE_NPCSCHARA,
#ifdef _MAP_WARPPOINT
OBJTYPE_WARPPOINT,
#endif
OBJTYPE_NUM
}OBJTYPE;
typedef struct tagObject
{
OBJTYPE type;
char objname[256];
int npcsindex;
int dir;
int imagenum;
int chartype;
int index;
int x;
int y;
int floor;
#ifdef _DEL_DROP_GOLD
int time;
#endif
}Object;
BOOL CHECKOBJECT( int index );
BOOL CHECKOBJECTUSE( int index );
BOOL initObjectArray( int num );
BOOL endObjectArray( void );
INLINE int _initObjectOne( char *file, int line, Object* ob );
#define initObjectOne( ob ) _initObjectOne( __FILE__, __LINE__, ob)
void endObjectOne( int index );
int initObjectFromObjectMember(OBJTYPE type, int index, int x, int y , int floor );
INLINE int OBJECT_getType( int index );
INLINE int OBJECT_setType( int index, int newvalue );
INLINE int OBJECT_getFloor( int index );
INLINE int OBJECT_setFloor( int index, int newvalue );
INLINE int OBJECT_getX( int index );
INLINE int OBJECT_setX( int index, int newvalue );
INLINE int OBJECT_getY( int index );
INLINE int OBJECT_setY( int index, int newvalue );
INLINE int OBJECT_getIndex( int index );
INLINE int OBJECT_setIndex( int index, int newvalue );
INLINE int OBJECT_getNum( void );
INLINE int OBJECT_getchartype( int index );
INLINE void OBJECT_setchartype( int index, int flg);
#ifdef _PET_ITEM
BOOL storeObjects( char* dirname );
BOOL restoreObjects( char* dirname );
#endif
int searchObjectFromCharaIndex( int index );
#ifdef _CAX_LNS_MAPSUOXU
INLINE int get_mappointindex( int fl, int x,int y );
#endif
#endif
/*__OBJECT_h__*/