summaryrefslogtreecommitdiffstats
path: root/libdimension/ambient.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-06-12 02:37:51 -0600
committerTavian Barnes <tavianator@gmail.com>2011-06-13 00:16:06 -0600
commit7acd8ea6673b7a90ed4041408ccf1b024b8a007a (patch)
treed52199dd7c58e0217bfd1a74e7601d739ad333f5 /libdimension/ambient.c
parent066261810c2fca192677c5c1c01c91d6ecec65a0 (diff)
downloaddimension-7acd8ea6673b7a90ed4041408ccf1b024b8a007a.tar.xz
Vast libdimension API and internals improvements.
Couldn't really do these while I was trying to be POV-Ray compatible, 'cause they would've broken compatibility.
Diffstat (limited to 'libdimension/ambient.c')
-rw-r--r--libdimension/ambient.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/libdimension/ambient.c b/libdimension/ambient.c
index 180889b..5152f1d 100644
--- a/libdimension/ambient.c
+++ b/libdimension/ambient.c
@@ -29,26 +29,25 @@
/** Ambient finish callback. */
static dmnsn_color
-dmnsn_ambient_finish_fn(const dmnsn_finish *finish, dmnsn_color pigment)
+dmnsn_basic_ambient_fn(const dmnsn_ambient *ambient, dmnsn_color pigment)
{
- dmnsn_color *ambient = finish->ptr;
- dmnsn_color ret = dmnsn_color_illuminate(*ambient, pigment);
+ dmnsn_color *light = ambient->ptr;
+ dmnsn_color ret = dmnsn_color_illuminate(*light, pigment);
ret.trans = 0.0;
ret.filter = 0.0;
return ret;
}
-dmnsn_finish *
-dmnsn_new_ambient_finish(dmnsn_color ambient)
+dmnsn_ambient *
+dmnsn_new_basic_ambient(dmnsn_color ambient)
{
- dmnsn_finish *finish = dmnsn_new_finish();
+ dmnsn_ambient *basic = dmnsn_new_ambient();
dmnsn_color *param = dmnsn_malloc(sizeof(dmnsn_color));
*param = ambient;
- finish->ptr = param;
- finish->ambient_fn = dmnsn_ambient_finish_fn;
- finish->free_fn = dmnsn_free;
-
- return finish;
+ basic->ambient_fn = dmnsn_basic_ambient_fn;
+ basic->free_fn = dmnsn_free;
+ basic->ptr = param;
+ return basic;
}