66 bool save(
const QString & filename,
bool submap);
73 bool load(
const QString & filename);
76 void pass(
const QVector3D & camPos);
144 void resetEnvironment();
146 void passAsSub(
const QVector3D & camPos);
148 void passWalls(
int nodeBase,
int textureBase);
149 void passDoors(
int textureBase);
150 void passLifts(
int textureBase);
151 void passSprites(
int textureBase,
const QVector3D & camPos);
152 void passStaircases(
int textureBase);
153 void passLights(
int nodeBase);
155 void updateAllDoors();
156 void updateAllLifts();
162 QVector3D getAbsCoords(
const QVector3D & pos);
163 static QVector3D rotateAroundY(
const QVector3D & v,
float angle);
164 static QVector2D rotateAroundY(
const QVector2D & v,
float angle);
165 static void skipLine(FILE * file);
int findSpriteByName(const char *name) const
Definition map.cpp:806
void computeWall(uint16_t wId)
Definition map.cpp:730
void terminate()
Definition map.cpp:76
Map()
Definition map.cpp:42
QList< Node > findNodesByTag(const char *tagName) const
Definition map.cpp:793
QList< Path > findPathsByTag(const char *tagName) const
Definition map.cpp:800
int findDoorByName(const char *name) const
Definition map.cpp:804
void doorShake(uint16_t dId)
Definition map.cpp:249
QImage textures
Definition map.h:125
void pass(const QVector3D &camPos)
Push the map geometry and lights to the renderer.
Definition map.cpp:305
QList< QSpatialSound * > sounds
Definition map.h:140
QString resolveRelativePath(const QString &subMapPath)
Definition map_io.cpp:39
int findPathByName(const char *name) const
Definition map.cpp:808
int findSubmapByName(const char *name) const
Definition map.cpp:803
void liftStop(uint16_t eId)
Definition map.cpp:273
QList< Submap > submaps
Definition map.h:130
float pan
Definition map.h:121
float scale
Definition map.h:122
QList< Speaker > findSpeakersByTag(const char *tagName) const
Definition map.cpp:799
void doorClose(uint16_t dId)
Definition map.cpp:242
bool load(const QString &filename)
Load the map, then its submaps, sounds and textures.
Definition map_io.cpp:193
QString getRelativePath(const QString &subMapPath)
Definition map_io.cpp:31
QList< Sprite > sprites
Definition map.h:133
QList< Path > paths
Definition map.h:137
QList< Sprite > findSpritesByTag(const char *tagName) const
Definition map.cpp:797
QList< Door > doors
Definition map.h:131
QList< Map > maps
Definition map.h:139
QList< Staircase > staircases
Definition map.h:134
QList< Light > lights
Definition map.h:135
QList< Lift > findLiftsByTag(const char *tagName) const
Definition map.cpp:796
void performAction(const QVector3D &pos)
Trigger the actionable objects (doors, lifts) close to a position.
Definition map.cpp:168
QList< Lift > lifts
Definition map.h:132
QString path
Definition map.h:124
void update()
Animate the doors and the lifts.
Definition map.cpp:97
bool save(const QString &filename, bool submap)
Save the map to a file.
Definition map_io.cpp:48
Fog fog
Definition map.h:127
QList< Door > findDoorsByTag(const char *tagName) const
Definition map.cpp:795
int findLiftByName(const char *name) const
Definition map.cpp:805
Sun sun
Definition map.h:126
void init()
Definition map.cpp:67
QList< Wall > walls
Definition map.h:129
QList< Submap > findSubmapsByTag(const char *tagName) const
Definition map.cpp:794
void doorOpen(uint16_t dId)
Definition map.cpp:234
QList< Speaker > speakers
Definition map.h:136
MapState captureState() const
Snapshot the persistent map data (see MapState).
Definition map.cpp:811
void speakerApplyFlags(uint16_t sId)
Definition map.cpp:283
QList< Node > nodes
Definition map.h:128
void liftStart(uint16_t eId)
Definition map.cpp:257
void restoreState(const MapState &state)
Restore a snapshot of the map data.
Definition map.cpp:829
QList< Light > findLightsByTag(const char *tagName) const
Definition map.cpp:798
int findSpeakerByName(const char *name) const
Definition map.cpp:807
QVector3D origin
Definition map.h:120
void computeAllWalls()
Recompute the cached wall geometry (dir, normal, length).
Definition map.cpp:724
bool operator==(const MapState &a, const MapState &b)
Definition map.cpp:846
Distance fog properties.
Definition env.h:38
Snapshot of the persistent map data, used for the undo history.
Definition map.h:31
QList< Node > nodes
Definition map.h:32
QList< Lift > lifts
Definition map.h:36
QList< Light > lights
Definition map.h:39
QList< Path > paths
Definition map.h:41
QList< Staircase > staircases
Definition map.h:38
Sun sun
Definition map.h:42
QList< Wall > walls
Definition map.h:33
QList< Door > doors
Definition map.h:35
QList< Submap > submaps
Definition map.h:34
QList< Sprite > sprites
Definition map.h:37
Fog fog
Definition map.h:43
QList< Speaker > speakers
Definition map.h:40
Sun lighting properties.
Definition env.h:22