25 #ifndef FREESCAPE_AREA_H 26 #define FREESCAPE_AREA_H 29 #include "math/vector3d.h" 31 #include "freescape/language/instruction.h" 32 #include "freescape/objects/object.h" 33 #include "freescape/objects/group.h" 42 Area(uint16 areaID, uint16 areaFlags, ObjectMap *objectsByID, ObjectMap *entrancesByID);
46 Object *objectWithID(uint16 objectID);
47 Object *entranceWithID(uint16 objectID);
48 void changeObjectID(uint16 objectID, uint16 newObjectID);
49 ObjectArray getSensors();
51 uint16 getAreaFlags();
53 void remapColor(
int index,
int color);
54 void unremapColor(
int index);
55 void draw(
Renderer *gfx, uint32 animationTicks, Math::Vector3d camera, Math::Vector3d direction);
56 void drawGroup(
Renderer *gfx,
Group *group,
bool runAnimation);
59 Object *checkCollisionRay(
const Math::Ray &ray,
int raySize);
60 bool checkInSight(
const Math::Ray &ray,
float maxDistance);
61 ObjectArray checkCollisions(
const Math::AABB &boundingBox);
62 Math::Vector3d resolveCollisions(Math::Vector3d
const &lastPosition, Math::Vector3d
const &newPosition,
int playerHeight);
63 void addObjectFromArea(int16
id,
Area *global);
64 void addGroupFromArea(int16
id,
Area *global);
65 void addObject(
Object *obj);
67 void addStructure(
Area *global);
68 void removeObject(int16
id);
71 bool hasActiveGroups();
82 uint32 _gasPocketRadius;
87 uint8 _usualBackgroundColor;
88 uint8 _underFireBackgroundColor;
99 ObjectMap *_objectsByID;
100 ObjectMap *_entrancesByID;
101 ObjectArray _drawableObjects;
102 ObjectMap _addedObjects;
103 Object *objectWithIDFromMap(ObjectMap *map, uint16 objectID);
108 #endif // FREESCAPE_AREA_H