Skip to content

Commit

Permalink
Refactor|Materials: Began refactorings to address a crash during engi…
Browse files Browse the repository at this point in the history
…ne reset
  • Loading branch information
danij-deng committed Aug 3, 2012
1 parent a5215c1 commit dde4234
Show file tree
Hide file tree
Showing 9 changed files with 425 additions and 389 deletions.
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/blockset.h
Expand Up @@ -23,6 +23,10 @@
#ifndef LIBDENG_BLOCKSET_H
#define LIBDENG_BLOCKSET_H

#ifdef __cplusplus
extern "C" {
#endif

struct blockset_block_s;

/**
Expand Down Expand Up @@ -86,4 +90,8 @@ void* BlockSet_Allocate(blockset_t* set);
/// @return Total number of elements from the set that are currently in use.
size_t BlockSet_Count(blockset_t* set);

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

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

#include "p_object.h"

#ifdef __cplusplus
extern "C" {
#endif

#define SHORTP(x) (*(short*) (x))
#define USHORTP(x) (*(unsigned short*) (x))

Expand All @@ -48,4 +52,8 @@ void Cl_Ticker(timespan_t ticLength);
int Cl_GameReady(void);
void Cl_SendHello(void);

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

#endif
10 changes: 9 additions & 1 deletion doomsday/engine/portable/include/gl_texmanager.h
Expand Up @@ -36,11 +36,15 @@
#define LIBDENG_GLTEXTURE_MANAGER_H

#include "dfile.h"
#include "r_data.h" /// \todo should not be included here.
#include "r_data.h" /// @todo should not be included here.

#include "texture.h"
#include "texturevariantspecification.h"

#ifdef __cplusplus
extern "C" {
#endif

struct image_s;
struct texturecontent_s;
struct texturevariant_s;
Expand Down Expand Up @@ -331,4 +335,8 @@ DGLuint GL_NewTextureWithParams2(dgltexformat_t format, int width, int height,
const uint8_t* pixels, int flags, int grayMipmap, int minFilter, int magFilter,
int anisoFilter, int wrapS, int wrapT);

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

#endif /* LIBDENG_GLTEXTURE_MANAGER_H */
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/net_demo.h
Expand Up @@ -29,6 +29,10 @@
#ifndef LIBDENG_DEMO_H
#define LIBDENG_DEMO_H

#ifdef __cplusplus
extern "C" {
#endif

extern int playback;

void Demo_Register(void);
Expand All @@ -48,4 +52,8 @@ boolean Demo_BeginPlayback(const char* filename);
boolean Demo_ReadPacket(void);
void Demo_StopPlayback(void);

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

#endif /* LIBDENG_DEMO_H */
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/pathdirectory.h
Expand Up @@ -28,6 +28,10 @@
#include <de/str.h>
#include "pathmap.h"

#ifdef __cplusplus
extern "C" {
#endif

/**
* @defgroup pathComparisonFlags Path Comparison Flags
* @ingroup base apiFlags
Expand Down Expand Up @@ -276,4 +280,8 @@ void* PathDirectoryNode_UserData(const PathDirectoryNode* node);
/// @return Print-ready name for node @a type.
const ddstring_t* PathDirectoryNode_TypeName(pathdirectorynode_type_t type);

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

#endif /* LIBDENG_PATHDIRECTORY_H */
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/texture.h
Expand Up @@ -26,6 +26,10 @@
#include "size.h"
#include "textures.h"

#ifdef __cplusplus
extern "C" {
#endif

struct texturevariant_s;

typedef enum {
Expand Down Expand Up @@ -183,4 +187,8 @@ int Texture_Height(const Texture* tex);
*/
void Texture_SetHeight(Texture* tex, int height);

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

#endif /// LIBDENG_REFRESH_TEXTURE_H
14 changes: 11 additions & 3 deletions doomsday/engine/portable/include/textures.h
Expand Up @@ -43,12 +43,16 @@
#ifndef LIBDENG_REFRESH_TEXTURES_H
#define LIBDENG_REFRESH_TEXTURES_H

/// Unique identifier associated with each texture name in the collection.
typedef uint textureid_t;

#include "dd_share.h"
#include "uri.h"

#ifdef __cplusplus
extern "C" {
#endif

/// Unique identifier associated with each texture name in the collection.
typedef uint textureid_t;

/// Special value used to signify an invalid texture id.
#define NOTEXTUREID 0

Expand Down Expand Up @@ -201,4 +205,8 @@ int Textures_Iterate(texturenamespaceid_t namespaceId, int (*callback)(struct te
int Textures_IterateDeclared2(texturenamespaceid_t namespaceId, int (*callback)(textureid_t textureId, void* paramaters), void* paramaters);
int Textures_IterateDeclared(texturenamespaceid_t namespaceId, int (*callback)(textureid_t textureId, void* paramaters)); /*paramaters=NULL*/

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

#endif /* LIBDENG_REFRESH_TEXTURES_H */
8 changes: 8 additions & 0 deletions doomsday/engine/portable/include/texturevariant.h
Expand Up @@ -26,6 +26,10 @@

#include "texturevariantspecification.h"

#ifdef __cplusplus
extern "C" {
#endif

struct texture_s;

/**
Expand Down Expand Up @@ -78,4 +82,8 @@ void TextureVariant_SetCoords(TextureVariant* tex, float s, float t);
DGLuint TextureVariant_GLName(const TextureVariant* tex);
void TextureVariant_SetGLName(TextureVariant* tex, DGLuint glName);

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

#endif /* LIBDENG_REFRESH_TEXTUREVARIANT_H */

0 comments on commit dde4234

Please sign in to comment.