123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
-
-
- #ifndef _WORLD_H_
- #define _WORLD_H_
-
- #include <list>
- #include <vector>
-
- #define BAD_BLOOD
-
- #ifdef BAD_BLOOD
- #include "SkeletalModel.h"
- #endif
-
- #include "WorldData.h"
-
-
- class World {
- public:
-
- enum WorldFlag {
- fEnableHopping = (1 << 0)
- };
-
-
-
- World();
-
-
-
- ~World();
-
-
-
- int getRoomByLocation(int index, float x, float y, float z);
-
-
-
- int getRoomByLocation(float x, float y, float z);
-
-
-
- int getAdjoiningRoom(int index,
- float x, float y, float z,
- float x2, float y2, float z2);
-
-
-
- int getSector(int room, float x, float z);
- int getSector(int room, float x, float z, float *floor, float *ceiling);
-
- unsigned int getRoomInfo(int room);
-
-
-
- bool isWall(int room, int sector);
-
-
-
- bool getHeightAtPosition(int index, float x, float *y, float z);
-
- #ifdef BAD_BLOOD
-
- model_mesh_t *getMesh(int index);
- skeletal_model_t *getModel(int index);
- room_mesh_t *getRoom(int index);
- std::vector<entity_t *> *getEntities();
- std::vector<sprite_seq_t *> *getSprites();
- std::vector<room_mesh_t *> *getRooms();
- #endif
-
-
-
- void setFlag(WorldFlag flag);
-
-
-
- void clearFlag(WorldFlag flag);
-
-
-
- void destroy();
-
-
-
- void addRoom(room_mesh_t *room);
-
-
-
- void addMesh(model_mesh_t *model);
-
-
-
- void addEntity(entity_t *e);
-
-
-
- int addModel(skeletal_model_t *model);
-
-
-
- void addSprite(sprite_seq_t *sprite);
-
-
-
- void moveEntity(entity_t *e, char movement);
-
- private:
-
-
-
- void clear();
-
- bool mClearLock;
- unsigned int mFlags;
- std::vector<entity_t *> mEntities;
- std::vector<room_mesh_t *> mRooms;
- std::vector<model_mesh_t *> mMeshes;
- std::vector<sprite_seq_t *> mSprites;
- std::vector<skeletal_model_t *> mModels;
- };
-
- #endif
|