Skip to content

Commit

Permalink
Refactor: Post p_data C++ fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Sep 10, 2012
1 parent 05c380b commit d8dfc7e
Show file tree
Hide file tree
Showing 10 changed files with 272 additions and 193 deletions.
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/cl_player.h
Expand Up @@ -31,6 +31,10 @@

#include "cl_mobj.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* Information about a client player.
*/
Expand Down Expand Up @@ -78,4 +82,8 @@ mobj_t *ClPlayer_LocalGameMobj(int plrNum);
struct mobj_s *ClPlayer_ClMobj(int plrNum);
boolean ClPlayer_IsFreeToMove(int plrnum);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /// LIBDENG_CLIENT_PLAYER_H
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/dam_main.h
Expand Up @@ -22,6 +22,10 @@
#ifndef LIBDENG_ARCHIVED_MAP_MAIN_H
#define LIBDENG_ARCHIVED_MAP_MAIN_H

#ifdef __cplusplus
extern "C" {
#endif

typedef struct archivedmap_s {
Uri* uri;
ddstring_t cachedMapPath;
Expand Down Expand Up @@ -51,4 +55,8 @@ AutoStr* DAM_ComposeCacheDir(const char* sourcePath);

boolean DAM_AttemptMapLoad(const Uri* uri);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* LIBDENG_ARCHIVED_MAP_MAIN_H */
16 changes: 12 additions & 4 deletions doomsday/engine/portable/include/game.h
Expand Up @@ -27,6 +27,10 @@
#include "dd_plugin.h"
#include <de/ddstring.h>

#ifdef __cplusplus
extern "C" {
#endif

struct AbstractResource_s;
struct gamedef_s;

Expand Down Expand Up @@ -58,8 +62,8 @@ void Game_Delete(Game* game);
/**
* Add a new resource to the list of resources.
*
* \note Resource registration order defines the order in which resources of
* each type are loaded.
* @note Resource registration order defines the order in which resources of each
* type are loaded.
*
* @param rclass Class of resource being added.
* @param record Resource record being added.
Expand Down Expand Up @@ -109,15 +113,15 @@ const ddstring_t* Game_BindingConfig(Game* game);
struct AbstractResource_s* const* Game_Resources(Game* game, resourceclass_t rclass, int* count);

/**
* \note Unless caller is the resource locator then you probably shouldn't be calling.
* @note Unless caller is the resource locator then you probably shouldn't be calling.
* This is the absolute data path and shouldn't be used directly for resource location.
*
* @return String containing the base data-class resource directory.
*/
const ddstring_t* Game_DataPath(Game* game);

/**
* \note Unless caller is the resource locator then you probably shouldn't be calling.
* @note Unless caller is the resource locator then you probably shouldn't be calling.
* This is the absolute defs path and shouldn't be used directly for resource location.
*
* @return String containing the base defs-class resource directory.
Expand All @@ -129,4 +133,8 @@ const ddstring_t* Game_DefsPath(Game* game);
*/
Game* Game_FromDef(const GameDef* def);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* LIBDENG_GAME_H */
2 changes: 2 additions & 0 deletions doomsday/engine/portable/include/p_mapdata.h
Expand Up @@ -208,6 +208,8 @@ const char* P_GenerateUniqueMapId(const char* mapId);
*/
boolean P_MapExists(const char* uri);

boolean P_MapIsCustom(const char* uri);

/**
* Retrieve the name of the source file containing the map referenced by @a uri
* if known and available for loading.
Expand Down
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/p_objlink.h
Expand Up @@ -31,6 +31,10 @@
#ifndef LIBDENG_OBJLINK_BLOCKMAP_H
#define LIBDENG_OBJLINK_BLOCKMAP_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
OT_MOBJ,
OT_LUMOBJ,
Expand Down Expand Up @@ -107,4 +111,8 @@ int R_IterateBspLeafContacts2(BspLeaf* bspLeaf, objtype_t type,
int R_IterateBspLeafContacts(BspLeaf* bspLeaf, objtype_t type,
int (*func) (void* object, void* paramaters)); /*paramaters=NULL*/

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* LIBDENG_OBJLINK_BLOCKMAP_H */
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/r_lgrid.h
Expand Up @@ -32,6 +32,10 @@
#include "dd_types.h"
#include "p_mapdata.h"

#ifdef __cplusplus
extern "C" {
#endif

void LG_Register(void);
void LG_InitForMap(void);
void LG_Update(void);
Expand Down Expand Up @@ -61,4 +65,8 @@ float LG_EvaluateLightLevel(coord_t const point[3]);

void LG_Debug(void);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /// LIBDENG_REFRESH_LIGHT_GRID_H
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/r_lumobjs.h
Expand Up @@ -33,6 +33,10 @@
#include "m_vector.h"
#include "p_mapdata.h"

#ifdef __cplusplus
extern "C" {
#endif

// Lumobject types.
typedef enum {
LT_OMNI, ///< Omni (spherical) light.
Expand Down Expand Up @@ -234,4 +238,8 @@ int LO_IterateProjections(uint listIdx, int (*callback) (const dynlight_t*, void

void LO_DrawLumobjs(void);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /// LIBDENG_REFRESH_LUMINOUS_H
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/r_shadow.h
Expand Up @@ -31,6 +31,10 @@

#include "dd_types.h"

#ifdef __cplusplus
extern "C" {
#endif

struct mobj_s;

/**
Expand Down Expand Up @@ -97,4 +101,8 @@ int R_IterateShadowProjections(uint listIdx, int (*callback) (const shadowprojec
*/
Plane* R_FindShadowPlane(struct mobj_s* mobj);

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* LIBDENG_REFRESH_SHADOW_H */
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/r_things.h
Expand Up @@ -34,6 +34,10 @@
#include "materials.h"
#include "rend_model.h"

#ifdef __cplusplus
extern "C" {
#endif

struct materialvariant_s;

// Sprites are patches with a special naming convention so they can be
Expand Down Expand Up @@ -275,4 +279,8 @@ void VL_InitForNewFrame(void);
*/
boolean VL_ListIterator(uint listIdx, void* data, boolean (*func) (const vlight_t*, void*));

#ifdef __cplusplus
} // extern "C"
#endif

#endif /* LIBDENG_REFRESH_THINGS_H */

0 comments on commit d8dfc7e

Please sign in to comment.