summaryrefslogtreecommitdiffstats
path: root/libdimension/dimension/finish.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-12-14 19:27:22 -0500
committerTavian Barnes <tavianator@gmail.com>2011-12-14 19:52:36 -0500
commitbfbe9e43e108f6816c17b9b7764b75284ac78313 (patch)
tree189f85eeec18a76ccb626e45455fa7e45406db7c /libdimension/dimension/finish.h
parent7db5342a36341b061a8785a3b349cf0fcad69ebf (diff)
downloaddimension-bfbe9e43e108f6816c17b9b7764b75284ac78313.tar.xz
Re-think colors.
Color is a property of light, and thus doesn't include information about transparency. But canvas pixels and object pigments represent a color and a degree of transparency. The new type dmnsn_tcolor/ TColor encapsulates that information. Also, fix the transparent shadow implementation.
Diffstat (limited to 'libdimension/dimension/finish.h')
-rw-r--r--libdimension/dimension/finish.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/libdimension/dimension/finish.h b/libdimension/dimension/finish.h
index 2e3b48c..4ac9239 100644
--- a/libdimension/dimension/finish.h
+++ b/libdimension/dimension/finish.h
@@ -38,14 +38,12 @@ typedef dmnsn_color dmnsn_ambient_fn(const dmnsn_ambient *ambient,
/** Ambient finish component. */
struct dmnsn_ambient {
- dmnsn_ambient_fn *ambient_fn; /**< Ambient callback. */
- dmnsn_free_fn *free_fn; /**< Destructor callback. */
- void *ptr; /**< Generic data pointer. */
- dmnsn_refcount refcount; /**< @internal Reference count. */
+ dmnsn_color ambient; /**< Ambient light. */
+ dmnsn_refcount refcount; /**< @internal Reference count. */
};
/** Allocate a dummy ambient component. */
-dmnsn_ambient *dmnsn_new_ambient(void);
+dmnsn_ambient *dmnsn_new_ambient(dmnsn_color ambient);
/** Delete an ambient component. */
void dmnsn_delete_ambient(dmnsn_ambient *ambient);