diff --git a/doomsday/client/src/world/api_map.cpp b/doomsday/client/src/world/api_map.cpp index bf30d29f2c..d6ad22d815 100644 --- a/doomsday/client/src/world/api_map.cpp +++ b/doomsday/client/src/world/api_map.cpp @@ -1489,7 +1489,7 @@ DENG_EXTERN_C dd_bool P_MapIsCustom(char const *uriCString) #undef P_MapSourceFile DENG_EXTERN_C AutoStr *P_MapSourceFile(char const *uriCString) { - if(!uriCString || !uriCString[0]) return false; + if(!uriCString || !uriCString[0]) return 0; if(MapDef const *mapDef = App_ResourceSystem().mapDef(de::Uri(uriCString, RC_NULL))) { return AutoStr_FromTextStd(mapDef->sourceFile()->composePath().toUtf8().constData()); diff --git a/doomsday/client/src/world/worldsystem.cpp b/doomsday/client/src/world/worldsystem.cpp index 55f659633d..c6f1f2b00d 100644 --- a/doomsday/client/src/world/worldsystem.cpp +++ b/doomsday/client/src/world/worldsystem.cpp @@ -263,11 +263,6 @@ dd_bool ddMapSetup; static char const *mapCacheDir = "mapcache/"; -static inline lumpnum_t markerLumpNumForPath(String path) -{ - return App_FileSystem().lumpNumForName(path); -} - /// Determine the identity key for maps loaded from the specified @a sourcePath. static String cacheIdForMap(String const &sourcePath) { diff --git a/doomsday/plugins/wadmapconverter/src/id1map.cpp b/doomsday/plugins/wadmapconverter/src/id1map.cpp index fa90f95e17..81df260284 100644 --- a/doomsday/plugins/wadmapconverter/src/id1map.cpp +++ b/doomsday/plugins/wadmapconverter/src/id1map.cpp @@ -40,11 +40,16 @@ namespace internal { class Id1MapElement { public: - Id1MapElement(Id1Map &map) : map(map) {} - Id1MapElement(Id1MapElement const &other) : map(other.map) {} + Id1MapElement(Id1Map &map) : _map(&map) {} + Id1MapElement(Id1MapElement const &other) : _map(other._map) {} virtual ~Id1MapElement() {} - Id1Map ↦ + Id1Map &map() const { + DENG2_ASSERT(_map != 0); + return *_map; + } + + Id1Map *_map; }; struct SideDef : public Id1MapElement @@ -72,24 +77,24 @@ struct SideDef : public Id1MapElement case Id1MapRecognizer::HexenFormat: { Block name; from.readBytes(8, name); - topMaterial = map.toMaterialId(name.constData(), WallMaterials); + topMaterial = map().toMaterialId(name.constData(), WallMaterials); from.readBytes(8, name); - bottomMaterial = map.toMaterialId(name.constData(), WallMaterials); + bottomMaterial = map().toMaterialId(name.constData(), WallMaterials); from.readBytes(8, name); - middleMaterial = map.toMaterialId(name.constData(), WallMaterials); + middleMaterial = map().toMaterialId(name.constData(), WallMaterials); break; } case Id1MapRecognizer::Doom64Format: from.readAs(idx); - topMaterial = map.toMaterialId(idx, WallMaterials); + topMaterial = map().toMaterialId(idx, WallMaterials); from.readAs(idx); - bottomMaterial = map.toMaterialId(idx, WallMaterials); + bottomMaterial = map().toMaterialId(idx, WallMaterials); from.readAs(idx); - middleMaterial = map.toMaterialId(idx, WallMaterials); + middleMaterial = map().toMaterialId(idx, WallMaterials); break; default: @@ -303,10 +308,10 @@ struct SectorDef : public Id1MapElement case Id1MapRecognizer::HexenFormat: { Block name; from.readBytes(8, name); - floorMaterial= map.toMaterialId(name.constData(), PlaneMaterials); + floorMaterial= map().toMaterialId(name.constData(), PlaneMaterials); from.readBytes(8, name); - ceilMaterial = map.toMaterialId(name.constData(), PlaneMaterials); + ceilMaterial = map().toMaterialId(name.constData(), PlaneMaterials); from >> lightLevel; break; } @@ -314,10 +319,10 @@ struct SectorDef : public Id1MapElement case Id1MapRecognizer::Doom64Format: { duint16 idx; from >> idx; - floorMaterial= map.toMaterialId(idx, PlaneMaterials); + floorMaterial= map().toMaterialId(idx, PlaneMaterials); from >> idx; - ceilMaterial = map.toMaterialId(idx, PlaneMaterials); + ceilMaterial = map().toMaterialId(idx, PlaneMaterials); from >> d64ceilingColor >> d64floorColor