236 lines
6.7 KiB
C
236 lines
6.7 KiB
C
![]() |
/************************/
|
|||
|
/* action.h */
|
|||
|
/************************/
|
|||
|
#ifndef _ACTION_H_
|
|||
|
#define _ACTION_H_
|
|||
|
|
|||
|
#include "version.h"
|
|||
|
#include "../newproto/autil.h"
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
|||
|
enum{
|
|||
|
PRIO_TOP, //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
PRIO_CHR, //ͬChar
|
|||
|
|
|||
|
PRIO_BG, /* ?? */
|
|||
|
PRIO_JIKI, /* <20><>? */
|
|||
|
PRIO_ENEMY, /* <20><> */
|
|||
|
PRIO_ENEMY_TAMA, /* <20><><EFBFBD>d */
|
|||
|
PRIO_JIKI_TAMA, /* <20><>?<3F>d */
|
|||
|
PRIO_ITEM, /* ???? */
|
|||
|
PRIO_BOSS, /* ?? */
|
|||
|
PRIO_GAME_OVER, /* GAME OVER */
|
|||
|
PRIO_BTM = 255 /* ??<3F><> */
|
|||
|
};
|
|||
|
|
|||
|
//Action״̬
|
|||
|
enum{
|
|||
|
ACT_STATE_ACT = 0, //ͨ<><CDA8>״̬
|
|||
|
ACT_STATE_DEAD //<2F><><EFBFBD><EFBFBD>״̬
|
|||
|
};
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
#define ACT_ATR_HIDE ( 1 << 1 ) // <20><><EFBFBD><EFBFBD>ʾ/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> */
|
|||
|
#define ACT_ATR_HIT ( 1 << 2 ) // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ/* ???<3F>R<EFBFBD>e?? */
|
|||
|
#define ACT_ATR_HIT_BOX ( 1 << 3 ) // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/* ???<3F>R<EFBFBD>e + ????<3F><><EFBFBD><EFBFBD> */
|
|||
|
#define ACT_ATR_INFO ( 1 << 4 ) // <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѶϢ/* ??????<3F><><EFBFBD><EFBFBD> */
|
|||
|
#define ACT_ATR_HIDE2 ( 1 << 5 ) // <20><><EFBFBD><EFBFBD>ʾ + <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>+???<3F>R<EFBFBD>e?? */
|
|||
|
#define ACT_ATR_BTL_CMD_END ( 1 << 6 ) // ս<><D5BD>ָ<EFBFBD><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>,δ<><CEB4><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һᶯ,<2C><><EFBFBD><EFBFBD><EFBFBD>ᶯ/* <20>P<EFBFBD>f????<3F>V?<3F><>???? */
|
|||
|
#define ACT_ATR_TYPE_PC ( 1 << 7 ) // <20><><EFBFBD><EFBFBD>/* ?? */
|
|||
|
#define ACT_ATR_TYPE_OTHER_PC ( 1 << 8 ) // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>/* <20>\??? */
|
|||
|
#define ACT_ATR_TYPE_PET ( 1 << 9 ) /* ??? */
|
|||
|
#define ACT_ATR_TYPE_ITEM ( 1 << 10 ) /* ???? */
|
|||
|
#define ACT_ATR_TYPE_GOLD ( 1 << 11 ) /* ?? */
|
|||
|
#define ACT_ATR_TYPE_OTHER ( 1 << 12 ) /* ??<3F>\????<3F><>?<3F><>??<3F>Y? */
|
|||
|
#define ACT_ATR_HIT_BOX_ALL1 ( 1 << 13 ) // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ1
|
|||
|
#define ACT_ATR_HIT_BOX_ALL2 ( 1 << 14 ) // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ2
|
|||
|
#define ACT_ATR_HIT_BOX_ALL3 ( 1 << 15 ) // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ3
|
|||
|
#define ACT_ATR_HIT_BOX_ALL4 ( 1 << 16 ) // <20><><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ѡ + <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ3
|
|||
|
#define ACT_ATR_TRAVEL ( 1 << 17 ) /* ??? */
|
|||
|
|
|||
|
#define ACT_ATR_HIT_BOX_COL1 ( 1 << 18 ) // <20><><EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
#define ACT_ATR_HIT_BOX_COL2 ( 1 << 19 ) // <20><><EFBFBD>ϵڶ<CFB5><DAB6><EFBFBD>
|
|||
|
#define ACT_ATR_HIT_BOX_COL3 ( 1 << 20 ) // <20><><EFBFBD>µ<EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
#define ACT_ATR_HIT_BOX_COL4 ( 1 << 21 ) // <20><><EFBFBD>µڶ<C2B5><DAB6><EFBFBD>
|
|||
|
#define ACT_ATR_HIT_BOX_COL5 ( 1 << 22 ) // <20><><EFBFBD>ϵ<EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
#define ACT_ATR_HIT_BOX_COL6 ( 1 << 23 ) // <20><><EFBFBD>ϵڶ<CFB5><DAB6><EFBFBD>
|
|||
|
#define ACT_ATR_HIT_BOX_COL7 ( 1 << 24 ) // <20><><EFBFBD>µ<EFBFBD>һ<EFBFBD><D2BB>
|
|||
|
#define ACT_ATR_HIT_BOX_COL8 ( 1 << 25 ) // <20><><EFBFBD>µڶ<C2B5><DAB6><EFBFBD>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
/* ??????<3F>B<EFBFBD>l **********************************************************/
|
|||
|
struct action{
|
|||
|
struct action *pPrev, *pNext; //<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>actionָ<6E><D6B8>
|
|||
|
void ( *func )( struct action * ); //action<6F><6E>ִ<EFBFBD>е<EFBFBD>function<6F><6E>ָ<EFBFBD><D6B8>
|
|||
|
void *pYobi; //<2F><><EFBFBD>õ<EFBFBD>structָ<74><D6B8>
|
|||
|
void *pOther; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;structָ<74><D6B8>
|
|||
|
UCHAR prio; //action<6F><6E><EFBFBD><EFBFBD>ʱ<EFBFBD><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
|||
|
UCHAR dispPrio; //<2F><>ͼʱ<CDBC><CAB1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˳<EFBFBD><CBB3>
|
|||
|
int x, y; //ͼ<><CDBC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int hitDispNo; //<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>Ŀ<EFBFBD><C4BF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
BOOL deathFlag; //<2F><>action<6F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int dx, dy; //<2F><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>λ<EFBFBD><CEBB><EFBFBD><EFBFBD>
|
|||
|
int dir; //<2F><><EFBFBD><EFBFBD>
|
|||
|
int delta; //<2F>ϳ<EFBFBD><CFB3><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
|
|||
|
char name[ 29 ]; //<2F><><EFBFBD><EFBFBD>
|
|||
|
char freeName[ 33 ]; //free name
|
|||
|
int hp;
|
|||
|
#ifdef _PET_ITEM
|
|||
|
int iOldHp;
|
|||
|
#endif
|
|||
|
int maxHp;
|
|||
|
int mp;
|
|||
|
int maxMp;
|
|||
|
int level;
|
|||
|
int status;
|
|||
|
int itemNameColor; /* ?????<3F><><EFBFBD>q?<3F><> */
|
|||
|
int charNameColor; // ??????<3F><><EFBFBD><EFBFBD>??????<3F><><EFBFBD>q?<3F><>
|
|||
|
|
|||
|
int bmpNo; //ͼ<><CDBC>
|
|||
|
int bmpNo_bak; //<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC>
|
|||
|
int atr; //<2F><><EFBFBD><EFBFBD>
|
|||
|
int state; //״̬
|
|||
|
int actNo; //<2F>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int damage;
|
|||
|
|
|||
|
int gx, gy; //<2F><>Ŀǰ<C4BF>ĵ<EFBFBD>ͼ<EFBFBD>ϵ<EFBFBD><CFB5><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int nextGx, nextGy; //<2F><>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int bufGx[10], bufGy[10]; //<2F><>Ŀǰ<C4BF><C7B0><EFBFBD>굽<EFBFBD><EAB5BD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֮<EFBFBD><D6AE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>buffer
|
|||
|
short bufCount; //<2F>趨ĿǰҪ<C7B0>ߵ<EFBFBD><DFB5><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
short walkFlag; // <20><>????????????<3F><>?<3F>v?????????
|
|||
|
float mx, my; //<2F><>ͼ<EFBFBD><CDBC><EFBFBD><EFBFBD>
|
|||
|
float vx, vy; // ?<3F>h?<3F><>
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD>
|
|||
|
short earth; // <20><> <20>N<EFBFBD><4E>
|
|||
|
short water; // ? <20>N<EFBFBD><4E>
|
|||
|
short fire; // ? <20>N<EFBFBD><4E>
|
|||
|
short wind; // ? <20>N<EFBFBD><4E>
|
|||
|
//raderʹ<72><CAB9>
|
|||
|
int dirCnt; // <20><>?<3F><>??????
|
|||
|
//geminiʹ<69><CAB9>
|
|||
|
int spd; //<2F>ƶ<EFBFBD><C6B6><EFBFBD><EFBFBD>ٶ<EFBFBD>(0~63)( ?????? )
|
|||
|
int crs; //<2F><><EFBFBD><EFBFBD>(0~31)(<28><><EFBFBD>Ϸ<EFBFBD>Ϊ0,˳ʱ<CBB3>ӷ<EFBFBD><D3B7><EFBFBD>) <20><>?( ???? )( <20><>?????? )
|
|||
|
int h_mini; // <20><>?<3F><>?
|
|||
|
int v_mini; // <20><>?<3F><><EFBFBD><EFBFBD>
|
|||
|
//patternʹ<6E><CAB9>
|
|||
|
int anim_chr_no; //<2F><><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><C4B1><EFBFBD>(anim_tbl.h<>ı<EFBFBD><C4B1><EFBFBD>)
|
|||
|
int anim_chr_no_bak; //<2F><>һ<EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int anim_no; //<2F><><EFBFBD><EFBFBD><EFBFBD>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int anim_no_bak; //<2F><>һ<EFBFBD>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
int anim_ang; //<2F><><EFBFBD><EFBFBD><EFBFBD>ķ<EFBFBD><C4B7><EFBFBD>(0~7)(<28><>0)
|
|||
|
int anim_ang_bak; //<2F><>һ<EFBFBD>εķ<CEB5><C4B7><EFBFBD>
|
|||
|
int anim_cnt; //<2F>ڼ<EFBFBD><DABC><EFBFBD>frame
|
|||
|
int anim_frame_cnt; //<2F><><EFBFBD><EFBFBD>frameͣ<65><CDA3>ʱ<EFBFBD><CAB1>
|
|||
|
int anim_x; //X<><58><EFBFBD><EFBFBD>(Sprbin+Adrnbin)
|
|||
|
int anim_y; //Y<><59><EFBFBD><EFBFBD>(Sprbin+Adrnbin)
|
|||
|
int anim_hit; // ???<3F>R<EFBFBD>e
|
|||
|
// shan add +1
|
|||
|
char fmname[33]; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
// Robin 0728 ride Pet
|
|||
|
int onRide;
|
|||
|
char petName[16+1];
|
|||
|
int petLevel;
|
|||
|
int petHp;
|
|||
|
int petMaxHp;
|
|||
|
int petDamage;
|
|||
|
int petFall;
|
|||
|
#ifdef _MIND_ICON
|
|||
|
unsigned int sMindIcon;
|
|||
|
#endif
|
|||
|
#ifdef _SHOWFAMILYBADGE_
|
|||
|
unsigned int sFamilyIcon;
|
|||
|
#endif
|
|||
|
#ifdef FAMILY_MANOR_
|
|||
|
unsigned int mFamilyIcon;
|
|||
|
#endif
|
|||
|
#ifdef _CHAR_MANOR_
|
|||
|
unsigned int mManorIcon;
|
|||
|
#endif
|
|||
|
#ifdef _CHARTITLE_STR_
|
|||
|
TITLE_STR TitleText;
|
|||
|
#endif
|
|||
|
#ifdef _CHARTITLE_
|
|||
|
unsigned int TitleIcon;
|
|||
|
#endif
|
|||
|
#ifdef _NPC_EVENT_NOTICE
|
|||
|
int noticeNo;
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _SKILL_ROAR
|
|||
|
int petRoar; //<2F><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>)
|
|||
|
#endif
|
|||
|
#ifdef _SKILL_SELFEXPLODE //<2F>Ա<EFBFBD>
|
|||
|
int petSelfExplode;
|
|||
|
#endif
|
|||
|
#ifdef _MAGIC_DEEPPOISION //<2F>綾
|
|||
|
int petDeepPoision;
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _CHAR_PROFESSION // WON ADD <20><><EFBFBD><EFBFBD>ְҵ
|
|||
|
int profession_class;
|
|||
|
#endif
|
|||
|
//#ifdef _BATTLESKILL // (<28><><EFBFBD>ɿ<EFBFBD>) Syu ADD ս<><D5BD><EFBFBD><EFBFBD><EFBFBD>ܽ<EFBFBD><DCBD><EFBFBD>
|
|||
|
int warrioreffect;
|
|||
|
//#endif
|
|||
|
#ifdef _GM_IDENTIFY // Rog ADD GMʶ<4D><CAB6>
|
|||
|
char gm_name[33];
|
|||
|
#endif
|
|||
|
#ifdef _STREET_VENDOR
|
|||
|
char szStreetVendorTitle[64];
|
|||
|
#endif
|
|||
|
#ifdef _NPC_PICTURE
|
|||
|
int picture;
|
|||
|
int picturetemp;
|
|||
|
#endif
|
|||
|
#ifdef _PETSKILL_RIDE
|
|||
|
int saveride;
|
|||
|
#endif
|
|||
|
#ifdef _MOUSE_DBL_CLICK
|
|||
|
int index; // <20><><EFBFBD><EFBFBD>!! Server<65>е<EFBFBD>charaindex
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef _SFUMATO
|
|||
|
int sfumato; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ⱦͼ<C8BE><CDBC>ɫ<EFBFBD><C9AB>
|
|||
|
#endif
|
|||
|
};
|
|||
|
|
|||
|
typedef struct action ACTION;
|
|||
|
|
|||
|
/* ?????????????????? */
|
|||
|
extern ACTION *pActTop;
|
|||
|
extern ACTION *pActBtm;
|
|||
|
|
|||
|
/* <20><>?????? */
|
|||
|
extern ACTION *pJiki;
|
|||
|
|
|||
|
#ifdef _STONDEBUG_
|
|||
|
/* ?????????? */
|
|||
|
extern int ActCnt;
|
|||
|
#endif
|
|||
|
|
|||
|
/* ?????????<3F>K? *****************************************************/
|
|||
|
ACTION *GetAction( UCHAR prio, UINT yobiSize );
|
|||
|
|
|||
|
/* ??????????? *****************************************************/
|
|||
|
void InitAction( void );
|
|||
|
|
|||
|
/* ????????? *********************************************************/
|
|||
|
void RunAction( void );
|
|||
|
|
|||
|
/* ???????????<3F><>?<3F><>************************************************/
|
|||
|
void DeathAction( ACTION *pAct );
|
|||
|
|
|||
|
/* <20>u??????<3F><>?<3F><> *******************************************************/
|
|||
|
void DeathAllAction( void );
|
|||
|
|
|||
|
/* ???????????<3F>u?<3F><> ***********************************************/
|
|||
|
void ClearAction( ACTION *pAct );
|
|||
|
|
|||
|
/* ?????<3F><>??? *********************************************************/
|
|||
|
void EndAction( void );
|
|||
|
|
|||
|
#endif
|