#define S_PAD 0x1F800000 /* スクラッチパッド(1024bytes) */ #include #include #define ACT_MAX 100 /*---------------------------------------------------------------------- Action構造体 ----------------------------------------------------------------------*/ typedef struct{ short ID; /* ID (0=空き) */ void (*fnAction)(); /* Action処理ルーチン */ void *ActPtr; /* ワークへのポインタ */ short WorkSize; /* ワークサイズ */ }Action; /*---------------------------------------------------------------------- ふつーのキャラクタ用ワーク ----------------------------------------------------------------------*/ typedef struct{ short count; /* Actionカウンタ */ short flags; /* 状態 */ short posX; /* X座標 */ short posY; /* Y座標 */ short vectX; /* X方向移動ベクトル */ short vectY; /* Y方向移動ベクトル */ short speed; /* 移動速度 */ short maxspd; short ctAnm; /* アニメーションカウンタ */ GsSPRITE *sp; /* GsSPRITEへのポインタ */ }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