// File : fwActor.h // Author : John Wojcik ( QuietBloke ) // Created : August 2000 // Desc : Expose external functions of the 2D game Framework // Actor Manager. This manager controls the actors. An actor // is simply a 2D sprite. Functions include rotation, collision detection, // and linking to animations for costumes and x,y positions. Actors can // be set either on or off stage and a lifespan allows an actor to // automatically become offstage after a set timespan. // // History : // Date Author Description // -------- --------------- ---------------------------------------- #ifndef __FWACTOR__ #define __FWACTOR__ // #include "fwanimat.h" // #include "fw.h" void fwActorReset ( void ); int fwActorAdd ( int CostumeID ); void fwActorPos ( int ActorID, int xpos, int ypos ); int fwActorGetXPos ( int ActorID ); int fwActorGetYPos ( int ActorID ); void fwActorSetOnStage ( int ActorID, short OnStageFlag ); int fwActorGetOnStage ( int ActorID ); void fwActorSetBoundingScale ( int ActorID, int NewScale ); void fwActorSetTransparency ( int ActorID, int NewTransparency ); void fwActorSetLifeSpan ( int ActorID, int LifeSpan ); int fwActorGetLifeSpan ( int ActorID ); void fwActorReduceLifeSpan ( int ActorID ); void fwActorChangeCostume ( int ActorID, int CostumeID ); void fwActorCollisionLayers ( int ActorID, int CollisionLayers ); void fwActorSetLayer ( int ActorID, int StageLayer ); GsSPRITE* fwActorGet ( int ActorID ); int fwActorFirstOnStage ( ); int fwActorNextOnStage ( int CurrentActor ); int fwActorFirstCollision ( int MyActor ); int fwActorNextCollision ( int MyActor, int ActorID ); void fwActorAnimateCostume ( int ActorID, int AnimationID ); void fwActorAnimateCostumeOff ( int ActorID ); void fwActorAnimateXPos ( int ActorID, int AnimationID ); int fwActorGetAnimateXPos ( int ActorID ); void fwActorAnimateXPosOff ( int ActorID ); void fwActorAnimateYPos ( int ActorID, int AnimationID ); void fwActorAnimateYPosOff ( int ActorID ); void fwActorAnimateScale ( int ActorID, int AnimationID ); void fwActorSetAngle ( int ActorID, int Angle ); int fwActorGetAngle ( int ActorID ); void fwActorAddVelocity ( int ActorID, int Angle, int Speed ); void fwActorSetVelocity ( int ActorID, int Angle, int Speed ); void fwActorSetScale ( int ActorID, int NewScale ); void fwActorSetXScale ( int ActorID, int NewXScale ); void fwActorSetYScale ( int ActorID, int NewYScale ); void fwActorSetRGB ( int ActorID, int red, int green, int blue ); int fwActorGetPixelHeight ( int ActorID ); int fwActorGetPixelWidth ( int ActorID ); #define ON_STAGE 1 #define OFF_STAGE 0 #define STAGE_LAYER_0 (0) #define STAGE_LAYER_1 (1) #define STAGE_LAYER_2 (1<<1) #define STAGE_LAYER_3 (1<<2) #define STAGE_LAYER_4 (1<<3) #define STAGE_LAYER_5 (1<<4) #define STAGE_LAYER_6 (1<<5) #define STAGE_LAYER_7 (1<<6) #define STAGE_LAYER_8 (1<<7) #define STAGE_LAYER_9 (1<<8) #define STAGE_LAYER_10 (1<<9) #define STAGE_LAYER_11 (1<<10) #define STAGE_LAYER_12 (1<<11) #define STAGE_LAYER_13 (1<<12) #define STAGE_LAYER_14 (1<<13) #define STAGE_LAYER_15 (1<<14) #define BOUNDING_BOX 1 #define BOUNDING_CIRCLE 2 #define ACTOR_ACTION_MOVED 1 #define ACTOR_ACTION_RESIZED 2 // The following transparency settings are fairly unique to the playstation #define ACTOR_TRANSPARENCY_ON 1 // Transparent background // Note : The next 4 options should be exclusive #define ACTOR_TRANSPARENCY_ADD 2 // 100% background + 100% foreground #define ACTOR_TRANSPARENCY_ADD_AND_HALF 4 // 50% background + 50% foreground #define ACTOR_TRANSPARENCY_SUBTRACT 8 // background - foreground #define ACTOR_TRANSPARENCY_ADD_QUARTER 16 // background + 25% foreground // NOTE : MAX_ACTORS IS DEFINED IN MAIN HEADER FILE fw.h // #define MAX_ACTORS 1000 #endif