Skip to content

Commit

Permalink
Refactor: Switched materialarchive.c to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Jan 6, 2013
1 parent d9694cf commit 1395bdc
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 107 deletions.
16 changes: 8 additions & 8 deletions doomsday/engine/api/api_materialarchive.h
Expand Up @@ -49,19 +49,19 @@ DENG_API_TYPEDEF(MaterialArchive)
/**
* @param useSegments If @c true, a serialized archive will be preceded by a segment id number.
*/
MaterialArchive* (*New)(int useSegments);
MaterialArchive *(*New)(int useSegments);

/**
* @param useSegments If @c true, a serialized archive will be preceded by a segment id number.
*/
MaterialArchive* (*NewEmpty)(int useSegments);
MaterialArchive *(*NewEmpty)(int useSegments);

void (*Delete)(MaterialArchive* arc);
void (*Delete)(MaterialArchive *arc);

/**
* @return A new (unused) SerialId for the specified material.
*/
materialarchive_serialid_t (*FindUniqueSerialId)(MaterialArchive* arc, struct material_s* mat);
materialarchive_serialid_t (*FindUniqueSerialId)(MaterialArchive *arc, struct material_s *mat);

/**
* Finds and returns a material with the identifier @a serialId.
Expand All @@ -72,22 +72,22 @@ DENG_API_TYPEDEF(MaterialArchive)
*
* @return Pointer to a material instance. Ownership not given.
*/
struct material_s* (*Find)(MaterialArchive* arc, materialarchive_serialid_t serialId, int group);
struct material_s *(*Find)(MaterialArchive *arc, materialarchive_serialid_t serialId, int group);

/**
* Returns the number of materials in the archive.
*
* @param arc MaterialArchive instance.
*/
size_t (*Count)(MaterialArchive* arc);
size_t (*Count)(MaterialArchive *arc);

/**
* Serializes the state of the archive using @a writer.
*
* @param arc MaterialArchive instance.
* @param writer Writer instance.
*/
void (*Write)(MaterialArchive* arc, Writer* writer);
void (*Write)(MaterialArchive *arc, Writer *writer);

/**
* Deserializes the state of the archive from @a reader.
Expand All @@ -97,7 +97,7 @@ DENG_API_TYPEDEF(MaterialArchive)
* version is encountered.
* @param reader Reader instance.
*/
void (*Read)(MaterialArchive* arc, int forcedVersion, Reader* reader);
void (*Read)(MaterialArchive *arc, int forcedVersion, Reader *reader);
}
DENG_API_T(MaterialArchive);

Expand Down
2 changes: 1 addition & 1 deletion doomsday/engine/engine.pro
Expand Up @@ -583,7 +583,7 @@ SOURCES += \
src/resource/hq2x.c \
src/resource/image.cpp \
src/resource/material.cpp \
src/resource/materialarchive.c \
src/resource/materialarchive.cpp \
src/resource/materialbind.cpp \
src/resource/materials.cpp \
src/resource/materialscheme.cpp \
Expand Down

0 comments on commit 1395bdc

Please sign in to comment.