123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
-
-
- #ifndef _WORLD_H_
- #define _WORLD_H_
-
- #include <list>
- #include <vector>
-
- #include "Entity.h"
- #include "Room.h"
- #include "SkeletalModel.h"
- #include "Sprite.h"
-
- #include "WorldData.h"
-
-
- class World {
- public:
-
-
-
- ~World();
-
-
-
- void destroy();
-
- void addRoom(Room &room);
- unsigned int sizeRoom();
- Room &getRoom(unsigned int index);
-
- void addSprite(SpriteSequence &sprite);
- unsigned int sizeSprite();
- SpriteSequence &getSprite(unsigned int index);
-
- void addEntity(Entity &entity);
- unsigned int sizeEntity();
- Entity &getEntity(unsigned int index);
-
- void addSkeletalModel(SkeletalModel &model);
- unsigned int sizeSkeletalModel();
- SkeletalModel &getSkeletalModel(unsigned int index);
-
-
-
- void addMesh(model_mesh_t *model);
-
- model_mesh_t *getMesh(int index);
-
-
-
- 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);
-
-
-
- void getHeightAtPosition(int index, float x, float *y, float z);
-
- private:
-
-
- std::vector<model_mesh_t *> mMeshes;
-
-
- std::vector<Room *> mRooms;
- std::vector<SpriteSequence *> mSprites;
- std::vector<Entity *> mEntities;
- std::vector<SkeletalModel *> mModels;
- };
-
- World &getWorld();
-
- #endif
|