| 1026 | } |
| 1027 | |
| 1028 | void GameMap::destroyAllEntities() |
| 1029 | { |
| 1030 | // Destroy OGRE entities for map tiles |
| 1031 | for (int jj = 0; jj < getMapSizeY(); ++jj) |
| 1032 | { |
| 1033 | for (int ii = 0; ii < getMapSizeX(); ++ii) |
| 1034 | { |
| 1035 | Tile* tile = getTile(ii,jj); |
| 1036 | tile->destroyMesh(); |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | // Destroy OGRE entities for the creatures |
| 1041 | for (Creature* creature : mCreatures) |
| 1042 | { |
| 1043 | creature->destroyMesh(); |
| 1044 | } |
| 1045 | |
| 1046 | // Destroy OGRE entities for the map lights. |
| 1047 | for (MapLight* mapLight : mMapLights) |
| 1048 | { |
| 1049 | mapLight->destroyMesh(); |
| 1050 | } |
| 1051 | |
| 1052 | // Destroy OGRE entities for the rooms |
| 1053 | for (Room *currentRoom : mRooms) |
| 1054 | { |
| 1055 | currentRoom->destroyMesh(); |
| 1056 | } |
| 1057 | |
| 1058 | // Destroy OGRE entities for the traps |
| 1059 | for (Trap* trap : mTraps) |
| 1060 | { |
| 1061 | trap->destroyMesh(); |
| 1062 | } |
| 1063 | } |
| 1064 | |
| 1065 | Creature* GameMap::getCreature(const std::string& cName) const |
| 1066 | { |
nothing calls this directly
no test coverage detected