summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-27 13:46:51 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-27 13:50:29 -0400
commitdf33e223baa85b600863fc1b38850a5c37680632 (patch)
treeefc2444caebb69980702559d4e4ec99610016f9d /libdimension/dimension
parent3c2e6050b579c8e3c16d980e2ce70436d87e3a2d (diff)
downloaddimension-df33e223baa85b600863fc1b38850a5c37680632.tar.xz
pigment: Kill ->ptr field.
Diffstat (limited to 'libdimension/dimension')
-rw-r--r--libdimension/dimension/pigment.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/libdimension/dimension/pigment.h b/libdimension/dimension/pigment.h
index b046993..455ee72 100644
--- a/libdimension/dimension/pigment.h
+++ b/libdimension/dimension/pigment.h
@@ -1,5 +1,5 @@
/*************************************************************************
- * Copyright (C) 2009-2011 Tavian Barnes <tavianator@tavianator.com> *
+ * Copyright (C) 2009-2014 Tavian Barnes <tavianator@tavianator.com> *
* *
* This file is part of The Dimension Library. *
* *
@@ -41,21 +41,24 @@ typedef dmnsn_tcolor dmnsn_pigment_fn(const dmnsn_pigment *pigment,
*/
typedef void dmnsn_pigment_initialize_fn(dmnsn_pigment *pigment);
+/**
+ * Pigment destructor callback.
+ * @param[in,out] pigment The pigment to destroy.
+ */
+typedef void dmnsn_pigment_free_fn(dmnsn_pigment *pigment);
+
/** A pigment. */
struct dmnsn_pigment {
- dmnsn_pigment_fn *pigment_fn; /**< The pigment callback. */
+ dmnsn_pigment_fn *pigment_fn; /**< The pigment callback. */
dmnsn_pigment_initialize_fn *initialize_fn; /**< The initializer callback. */
- dmnsn_free_fn *free_fn; /**< The destructor callback. */
+ dmnsn_pigment_free_fn *free_fn; /**< The destructor callback. */
- dmnsn_matrix trans; /**< Transformation matrix. */
+ dmnsn_matrix trans; /**< Transformation matrix. */
dmnsn_matrix trans_inv; /**< The inverse of the transformation matrix. */
/** Quick color -- used for low-quality renders. */
dmnsn_tcolor quick_color;
- /** Generic pointer. */
- void *ptr;
-
DMNSN_REFCOUNT; /** Reference count. */
bool initialized; /** @internal Whether the pigment is initialized. */
};
@@ -67,6 +70,12 @@ struct dmnsn_pigment {
dmnsn_pigment *dmnsn_new_pigment(void);
/**
+ * Initialize a dmnsn_pigment field.
+ * @param[out] pigment The pigment to initialize.
+ */
+void dmnsn_init_pigment(dmnsn_pigment *pigment);
+
+/**
* Delete a pigment.
* @param[in,out] pigment The pigment to delete.
*/