00001 #ifndef __OBJECTINFO_H 00002 #define __OBJECTINFO_H 00003 00004 /* object behaviors */ 00005 #define BEHAVIOR_MISSILE 0 00006 #define BEHAVIOR_MOTIONLESS 1 00007 #define BEHAVIOR_PLAYER 2 00008 #define BEHAVIOR_HORIZONTAL_TRAVELLER 3 00009 #define BEHAVIOR_VERTICAL_TRAVELLER 4 00010 #define BEHAVIOR_WALL_HUGGER 5 00011 #define BEHAVIOR_RANDOM_MOTION 6 00012 #define BEHAVIOR_JUMPER 7 00013 00014 /* object flags (v2) */ 00015 #define OBJ_WEAKNESS_ANIMENDS 1 00016 #define OBJ_WEAKNESS_TOUCH 2 00017 #define OBJ_TOUCHCHANGE_GOTONEXTLEVEL 4 00018 #define OBJ_GRAVITY_AFFECTED 8 00019 00020 #define FLAGPOS_OBJ_WEAKNESS_ANIMENDS 0 00021 #define FLAGPOS_OBJ_WEAKNESS_TOUCH 1 00022 #define FLAGPOS_OBJ_TOUCHCHANGE_GOTONEXTLEVEL 2 00023 #define FLAGPOS_OBJ_GRAVITY_AFFECTED 3 00024 00025 #define HORIZONTAL_DIRECTION 0 00026 #define VERTICAL_DIRECTION 1 00027 00028 /* object alignment */ 00029 #define OBJALIGN_THEPLAYER 0 00030 #define OBJALIGN_PLAYERSIDE 1 00031 #define OBJALIGN_MONSTERSIDE 2 00032 #define OBJALIGN_EQUIPMENT 3 00033 #define OBJALIGN_NEUTRAL 4 00034 #define OBJALIGN_LAST 5 00035 00036 class MissileInfo; 00037 00038 class ObjectInfo 00039 { 00040 private: 00041 string title; 00042 int alignment; 00043 int weakness_time; 00044 int flags; 00045 int behaviour; 00046 float motion_speed; 00047 int nbehaviour_anims; 00048 AnimationInfo **behaviour_anims; 00049 int nmissiles; 00050 MissileInfo **missiles; 00051 int health; 00052 int touch_change_health; 00053 int touch_change_arrows; 00054 int touch_change_score; 00055 int touch_change_pushdir; 00056 int touch_change_pushstr; 00057 ObjectInfo *death_obj_info; 00058 int death_change_score; 00059 public: 00060 ObjectInfo( ifstream *f ); 00061 ~ObjectInfo(); 00062 bool IsShooting(); 00063 MissileInfo *GetMissileInfo(int m); 00064 int GetNMissiles(); 00065 int GetBehaviour(); 00066 int GetNBehaviourAnims(); 00067 int GetWeaknessTime(); 00068 int GetHealth(); 00069 float GetMotionSpeed(); 00070 int GetTouchChangeHealth(); 00071 int GetTouchChangePushStr(); 00072 int GetTouchChangePushDir(); 00073 int GetDeathChangeScore(); 00074 int GetTouchChangeArrows(); 00075 int GetAlignment(); 00076 int GetFlags(); 00077 ObjectInfo *GetDeathObjectInfo(); 00078 void SetDeathObjectInfo(ObjectInfo *oi); 00079 AnimationInfo *GetBehaviourAnim(int a); 00080 void SetBehaviourAnim(int a, AnimationInfo *an); 00081 }; 00082 00083 class MissileInfo /* A missile attachment to an object */ 00084 { 00085 private: 00086 ObjectInfo* obj_info; 00087 int rate; 00088 int variance; 00089 int direction; 00090 float recoil; 00091 00092 public: 00093 MissileInfo( ifstream *f ); 00094 ObjectInfo *GetObjectInfo(); 00095 void SetObjectInfo(ObjectInfo *oi); 00096 int GetRate(); 00097 int GetDirection(); 00098 }; 00099 00100 #endif /* __OBJECTINFO_H */