Skip to content

Commit

Permalink
World: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 9, 2014
1 parent 4e05150 commit 5ea7600
Show file tree
Hide file tree
Showing 23 changed files with 91 additions and 216 deletions.
8 changes: 3 additions & 5 deletions doomsday/client/include/world/bspnode.h
@@ -1,4 +1,4 @@
/** @file bspnode.h World map BSP node.
/** @file bspnode.h World map BSP node.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -21,12 +21,10 @@
#ifndef DENG_WORLD_BSPNODE_H
#define DENG_WORLD_BSPNODE_H

#include <de/aabox.h>

#include <de/Error>

#include "MapElement"
#include "partition.h"
#include <de/Error>
#include <de/aabox.h>

/**
* Represents a node in the map's binary space partition (BSP) tree. Each node
Expand Down
14 changes: 4 additions & 10 deletions doomsday/client/include/world/grabbable.h
@@ -1,4 +1,4 @@
/** @file grabbable.h Grabbable.
/** @file grabbable.h Grabbable.
*
* @authors Copyright © 2013 Daniel Swanson <danij@dengine.net>
*
Expand Down Expand Up @@ -54,19 +54,13 @@ class Grabbable
/// Base class for all unlock errors. @ingroup errors
DENG2_ERROR(UnlockError);

/*
* Notified when the grabbable is about to be deleted.
*/
/// Notified when the grabbable is about to be deleted.
DENG2_DEFINE_AUDIENCE(Deletion, void grabbableBeingDeleted(Grabbable &grabbable))

/*
* Notified when the lock state of the grabbable changes.
*/
/// Notified whenever the lock state of the grabbable changes.
DENG2_DEFINE_AUDIENCE(LockChange, void grabbableLockChanged(Grabbable &grabbable))

/*
* Notified when the origin of the grabbable changes.
*/
/// Notified whenever the origin of the grabbable changes.
DENG2_DEFINE_AUDIENCE(OriginChange, void grabbableOriginChanged(Grabbable &grabbable))

public:
Expand Down
18 changes: 6 additions & 12 deletions doomsday/client/include/world/hand.h
@@ -1,4 +1,4 @@
/** @file hand.h Hand (metaphor) for the manipulation of "grabbables".
/** @file hand.h Hand (metaphor) for the manipulation of "grabbables".
*
* @authors Copyright © 2013 Daniel Swanson <danij@dengine.net>
*
Expand All @@ -20,14 +20,12 @@
#ifndef DENG_WORLD_HAND_H
#define DENG_WORLD_HAND_H

#include <QList>
#include "Grabbable"
#include "world/world.h"

#include <de/Observers>
#include <de/Vector>

#include "world/world.h"

#include "Grabbable"
#include <QList>

namespace de {
namespace internal {
Expand All @@ -54,14 +52,10 @@ class Hand : DENG2_OBSERVES(de::World, FrameEnd)
DENG2_NO_ASSIGN(Hand)

public:
/*
* Notified when a grabbable is grabbed.
*/
/// Notified whenever a grabbable is grabbed.
DENG2_DEFINE_AUDIENCE(Grabbed, void handGrabbed(Hand &hand, Grabbable &grabbable))

/*
* Notified when a grabbable is ungrabbed.
*/
/// Notified whenever a grabbable is ungrabbed.
DENG2_DEFINE_AUDIENCE(Ungrabbed, void handUngrabbed(Hand &hand, Grabbable &grabbable))

typedef QList<Grabbable *> Grab;
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/world/huecircle.h
@@ -1,4 +1,4 @@
/** @file huecircle.h HueCircle manipulator, for runtime map editing.
/** @file huecircle.h HueCircle manipulator, for runtime map editing.
*
* @authors Copyright © 2006-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand Down
5 changes: 2 additions & 3 deletions doomsday/client/include/world/interceptor.h
@@ -1,4 +1,4 @@
/** @file interceptor.h World map element/object ray trace interceptor.
/** @file interceptor.h World map element/object ray trace interceptor.
*
* @authors Copyright © 2013 Daniel Swanson <danij@dengine.net>
*
Expand All @@ -19,10 +19,9 @@
#ifndef DENG_WORLD_MAP_INTERCEPTOR_H
#define DENG_WORLD_MAP_INTERCEPTOR_H

#include <de/Vector>

#include "world/map.h"
#include "Line"
#include <de/Vector>

/**
* Provides a mechanism for tracing line / world map object/element interception.
Expand Down
28 changes: 11 additions & 17 deletions doomsday/client/include/world/line.h
@@ -1,4 +1,4 @@
/** @file line.h World map line.
/** @file line.h World map line.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -21,15 +21,6 @@
#ifndef DENG_WORLD_LINE_H
#define DENG_WORLD_LINE_H

#include <QFlags>
#include <QList>

#include <de/binangle.h>

#include <de/Error>
#include <de/Observers>
#include <de/Vector>

#include "HEdge"

#include "MapElement"
Expand All @@ -40,6 +31,13 @@
# include "BiasSurface"
#endif

#include <de/Error>
#include <de/Observers>
#include <de/Vector>
#include <de/binangle.h>
#include <QFlags>
#include <QList>

class LineOwner;
class Sector;
class Surface;
Expand Down Expand Up @@ -82,9 +80,7 @@ class Line : public de::MapElement
/// The given side section identifier is invalid. @ingroup errors
DENG2_ERROR(InvalidSectionIdError);

/*
* Observers to be notified when the flags change.
*/
/// Notified whenever the flags change.
DENG2_DEFINE_AUDIENCE(FlagsChange, void lineFlagsChanged(Line &line, int oldFlags))

// Logical edge identifiers:
Expand All @@ -103,8 +99,7 @@ class Line : public de::MapElement

public:
// Section identifiers:
enum
{
enum {
Middle,
Bottom,
Top
Expand All @@ -113,8 +108,7 @@ class Line : public de::MapElement
/**
* Flags used as Section identifiers:
*/
enum SectionFlag
{
enum SectionFlag {
MiddleFlag = 0x1,
BottomFlag = 0x2,
TopFlag = 0x4,
Expand Down
5 changes: 2 additions & 3 deletions doomsday/client/include/world/linesighttest.h
@@ -1,4 +1,4 @@
/** @file linesighttest.h World map line of sight testing.
/** @file linesighttest.h World map line of sight testing.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -21,11 +21,10 @@
#ifndef DENG_WORLD_LINE_SIGHT_TEST_H
#define DENG_WORLD_LINE_SIGHT_TEST_H

#include "MapElement"
#include <de/libdeng2.h>
#include <de/Vector>

#include "MapElement"

namespace de {

/**
Expand Down
25 changes: 9 additions & 16 deletions doomsday/client/include/world/map.h
@@ -1,4 +1,4 @@
/** @file map.h World map.
/** @file map.h World map.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -21,12 +21,6 @@
#ifndef DENG_WORLD_MAP_H
#define DENG_WORLD_MAP_H

#include <QList>
#include <QSet>

#include <de/Observers>
#include <de/Vector>

#include "Mesh"

#include "Line"
Expand All @@ -42,6 +36,11 @@

#include "uri.hh"

#include <de/Observers>
#include <de/Vector>
#include <QList>
#include <QSet>

class BspLeaf;
class BspNode;
class Plane;
Expand Down Expand Up @@ -127,20 +126,14 @@ class Map
DENG2_ERROR(FullError);
#endif

/*
* Notified when the map is about to be deleted.
*/
/// Notified when the map is about to be deleted.
DENG2_DEFINE_AUDIENCE(Deletion, void mapBeingDeleted(Map const &map))

/*
* Notified when a one-way window construct is first found.
*/
/// Notified when a one-way window construct is first found.
DENG2_DEFINE_AUDIENCE(OneWayWindowFound,
void oneWayWindowFound(Line &line, Sector &backFacingSector))

/*
* Notified when an unclosed sector is first found.
*/
/// Notified when an unclosed sector is first found.
DENG2_DEFINE_AUDIENCE(UnclosedSectorFound,
void unclosedSectorFound(Sector &sector, Vector2d const &nearPoint))

Expand Down
5 changes: 2 additions & 3 deletions doomsday/client/include/world/mapelement.h
@@ -1,4 +1,4 @@
/** @file mapelement.h Base class for all world map elements.
/** @file mapelement.h Base class for all world map elements.
*
* @authors Copyright © 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -20,10 +20,9 @@
#ifndef DENG_WORLD_MAPELEMENT_H
#define DENG_WORLD_MAPELEMENT_H

#include <de/Error>

#include "dd_share.h"
#include "world/dmuargs.h"
#include <de/Error>

namespace de {

Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/world/mapobject.h
@@ -1,4 +1,4 @@
/** @file mapobject.h Base class for all world map objects.
/** @file mapobject.h Base class for all world map objects.
*
* @authors Copyright © 2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2013 Daniel Swanson <danij@dengine.net>
Expand Down
2 changes: 1 addition & 1 deletion doomsday/client/include/world/maputil.h
@@ -1,4 +1,4 @@
/** @file maputil.h World map utilities.
/** @file maputil.h World map utilities.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand Down
28 changes: 11 additions & 17 deletions doomsday/client/include/world/plane.h
@@ -1,4 +1,4 @@
/** @file plane.h World map plane.
/** @file plane.h World map plane.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -21,13 +21,13 @@
#ifndef DENG_WORLD_PLANE_H
#define DENG_WORLD_PLANE_H

#include <de/Observers>
#include <de/Vector>

#include "dd_share.h" // SoundEmitter

#include "MapElement"

#include <de/Observers>
#include <de/Vector>

class Sector;
class Surface;

Expand All @@ -42,27 +42,21 @@ class Plane : public de::MapElement
DENG2_NO_ASSIGN(Plane)

public:
/*
* Notified when the plane is about to be deleted.
*/
/// Notified when the plane is about to be deleted.
DENG2_DEFINE_AUDIENCE(Deletion, void planeBeingDeleted(Plane const &plane))

/*
* Notified whenever a @em sharp height change occurs.
*/
DENG2_DEFINE_AUDIENCE(HeightChange, void planeHeightChanged(Plane &plane, coord_t oldHeight))
/// Notified whenever a @em sharp height change occurs.
DENG2_DEFINE_AUDIENCE(HeightChange, void planeHeightChanged(Plane &plane))

#ifdef __CLIENT__

/*
* Notified whenever a @em smoothed height change occurs.
*/
DENG2_DEFINE_AUDIENCE(HeightSmoothedChange, void planeHeightSmoothedChanged(Plane &plane, coord_t oldHeight))
/// Notified whenever a @em smoothed height change occurs.
DENG2_DEFINE_AUDIENCE(HeightSmoothedChange, void planeHeightSmoothedChanged(Plane &plane))

#endif

// Constants:
static int const MAX_SMOOTH_MOVE = 64; ///< $smoothplane: Maximum speed for a smoothed plane.
/// Maximum speed for a smoothed plane.
static int const MAX_SMOOTH_MOVE = 64;

public:
/**
Expand Down
9 changes: 4 additions & 5 deletions doomsday/client/include/world/polyobj.h
@@ -1,4 +1,4 @@
/** @file polyobj.h World map polyobj.
/** @file polyobj.h World map polyobj.
*
* @authors Copyright © 2003-2013 Jaakko Keränen <jaakko.keranen@iki.fi>
* @authors Copyright © 2006-2013 Daniel Swanson <danij@dengine.net>
Expand All @@ -21,14 +21,13 @@
#ifndef DENG_WORLD_POLYOBJ_H
#define DENG_WORLD_POLYOBJ_H

#include <QList>

#include <de/Vector>

#include "dd_share.h"

#include "Mesh"

#include <de/Vector>
#include <QList>

class BspLeaf;
class Line;
class Vertex;
Expand Down
6 changes: 3 additions & 3 deletions doomsday/client/include/world/sector.h
Expand Up @@ -552,9 +552,9 @@ class SectorClusterCirculator
* the @em boundary of the cluster and is not an "internal" edge.
*/
SectorClusterCirculator(de::HEdge *hedge = 0)
: _hedge(hedge),
_current(hedge),
_cluster(hedge? getCluster(*hedge) : 0)
: _hedge(hedge)
, _current(hedge)
, _cluster(hedge? getCluster(*hedge) : 0)
{}

/**
Expand Down

0 comments on commit 5ea7600

Please sign in to comment.