#include #define ACT_MAX 10 /*---------------------------------------------------------------------- Action構造体 ----------------------------------------------------------------------*/ typedef struct{ short ID; /* ID (0=空き) */ void (*fnAction)(); /* Action処理ルーチン */ void *ActPtr; /* ワークへのポインタ */ short WorkSize; /* ワークサイズ */ }Action; /*---------------------------------------------------------------------- ふつーのキャラクタ用ワーク ----------------------------------------------------------------------*/ typedef struct{ short ctAction; /* Actionカウンタ */ short Flags; /* 状態 */ short posX; /* X座標 */ short posY; /* Y座標 */ short vectX; /* X方向移動ベクトル */ short vectY; /* Y方向移動ベクトル */ short Speed; /* 移動速度 */ GsSPRITE *spr; /* Spriteへのポインタ */ short sizSPX; /* Sprite横幅 */ short sizSPY; /* Sprite縦幅 */ short ctAnime; /* アニメーションカウンタ */ }ChrAct; static short ActNum; /* 現在アクティブなAct */ static Action ActWork[ACT_MAX]; /* Action構造体の配列 */ static ChrAct ChrWork[ACT_MAX]; /*---------------------------------------------------------------------- Action構造体初期化 ----------------------------------------------------------------------*/ void InitAct( void ){ short i; for (i=0;i