Skip to content

Commit

Permalink
Hexen|MapInfoParser: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 25, 2014
1 parent b3ed8cd commit 2d44bf7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
2 changes: 0 additions & 2 deletions doomsday/plugins/hexen/include/p_mapinfo.h
Expand Up @@ -29,8 +29,6 @@
#include "doomsday.h"

typedef struct mapinfo_s {
dd_bool usingDefaults; ///< @c true= this definition was @em not read from MAPINFO.

uint map; ///< Logical map number.
short cluster;
uint warpTrans;
Expand Down
8 changes: 1 addition & 7 deletions doomsday/plugins/hexen/src/p_mapinfo.cpp
Expand Up @@ -54,9 +54,8 @@ void MapInfoParser(Str const *path)
mapInfos.clear();
uint logicalMapIndex = 0;

// Configure the defaults
// Prepare a default-configured definition, for one-shot initialization.
mapinfo_t defMapInfo;
defMapInfo.usingDefaults = true;

defMapInfo.map = -1; // Unknown.
defMapInfo.cluster = 0;
Expand Down Expand Up @@ -132,9 +131,6 @@ void MapInfoParser(Str const *path)
// Initialize with the default values.
std::memcpy(info, &defMapInfo, sizeof(*info));

// This information has been parsed from MAPINFO.
info->usingDefaults = false;

// Assign a logical map index.
info->map = logicalMapIndex++;

Expand Down Expand Up @@ -270,8 +266,6 @@ uint P_TranslateMapIfExists(uint map)
{
mapinfo_t const &info = i->second;

if(info.usingDefaults) continue; // Ignoring, undefined values.

if(info.warpTrans == map)
{
if(info.cluster)
Expand Down

0 comments on commit 2d44bf7

Please sign in to comment.