Skip to content

Commit

Permalink
Refactor: Relocated linknode_t from dd_share.h to m_nodepile.h
Browse files Browse the repository at this point in the history
The node piles are no longer visible at API level so linknode_t can
now be moved out of dd_share.h

It is most likely that the node piles will be replaced entirely in
future (probably 1.13).
  • Loading branch information
danij-deng committed Sep 13, 2013
1 parent e0407fd commit e110fdd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
17 changes: 0 additions & 17 deletions doomsday/api/dd_share.h
Expand Up @@ -582,23 +582,6 @@ typedef struct traceopening_s {
/// @defgroup mobj Map Objects
/// @ingroup world

/**
* Linknodes are used when linking mobjs to lines. Each mobj has a ring
* of linknodes, each node pointing to a line the mobj has been linked to.
* Correspondingly each line has a ring of nodes, with pointers to the
* mobjs that are linked to that particular line. This way it is possible
* that a single mobj is linked simultaneously to multiple lines (which
* is common).
*
* All these rings are maintained by P_MobjLink() and P_MobjUnlink().
* @ingroup mobj
*/
typedef struct linknode_s {
nodeindex_t prev, next;
void* ptr;
int data;
} linknode_t;

/**
* @defgroup stateFlags State Flags
* @ingroup mobj
Expand Down
17 changes: 16 additions & 1 deletion doomsday/client/include/m_nodepile.h
Expand Up @@ -28,7 +28,22 @@

#include "dd_types.h"

struct linknode_s; // Defined in dd_share.h.
/**
* Linknodes are used when linking mobjs to lines. Each mobj has a ring
* of linknodes, each node pointing to a line the mobj has been linked to.
* Correspondingly each line has a ring of nodes, with pointers to the
* mobjs that are linked to that particular line. This way it is possible
* that a single mobj is linked simultaneously to multiple lines (which
* is common).
*
* All these rings are maintained by P_MobjLink() and P_MobjUnlink().
* @ingroup mobj
*/
typedef struct linknode_s {
nodeindex_t prev, next;
void* ptr;
int data;
} linknode_t;

typedef struct nodepile_s {
int count;
Expand Down

0 comments on commit e110fdd

Please sign in to comment.