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 Math::Vector3d separateFromWall(
const Math::Vector3d &position);
62 ObjectArray checkCollisions(
const Math::AABB &boundingBox);
63 bool checkIfPlayerWasCrushed(
const Math::AABB &boundingBox);
64 Math::Vector3d resolveCollisions(Math::Vector3d
const &lastPosition, Math::Vector3d
const &newPosition,
int playerHeight);
65 void addObjectFromArea(int16
id,
Area *global);
66 void addGroupFromArea(int16
id,
Area *global);
67 void addObject(
Object *obj);
69 void addStructure(
Area *global);
70 void removeObject(int16
id);
72 void resetAreaGroups();
74 bool hasActiveGroups();
85 uint32 _gasPocketRadius;
90 uint8 _usualBackgroundColor;
91 uint8 _underFireBackgroundColor;
102 ObjectMap *_objectsByID;
103 ObjectMap *_entrancesByID;
104 ObjectArray _drawableObjects;
105 ObjectMap _addedObjects;
106 Object *objectWithIDFromMap(ObjectMap *map, uint16 objectID);
111 #endif // FREESCAPE_AREA_H