summaryrefslogtreecommitdiffstats
path: root/dimension/realize.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-12-21 04:25:30 -0500
committerTavian Barnes <tavianator@gmail.com>2009-12-21 04:25:30 -0500
commit8424804b1feaff5121060ed5ae4a321c47a76c34 (patch)
tree53d0afab5f43b1cce076f2b3035a13819b25bcbe /dimension/realize.c
parent494079ee46d67ae7ef6504734f7400b543c6d848 (diff)
downloaddimension-8424804b1feaff5121060ed5ae4a321c47a76c34.tar.xz
Differentiate between colors and vectors in the AST.
Diffstat (limited to 'dimension/realize.c')
-rw-r--r--dimension/realize.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/dimension/realize.c b/dimension/realize.c
index 5a13d8b..f795d0f 100644
--- a/dimension/realize.c
+++ b/dimension/realize.c
@@ -62,11 +62,10 @@ dmnsn_realize_vector(dmnsn_astnode astnode)
static dmnsn_color
dmnsn_realize_color(dmnsn_astnode astnode)
{
- if (astnode.type != DMNSN_AST_VECTOR) {
+ if (astnode.type != DMNSN_AST_COLOR) {
dmnsn_error(DMNSN_SEVERITY_HIGH, "Expected a color.");
}
-
dmnsn_astnode rnode, gnode, bnode, fnode, tnode;
dmnsn_array_get(astnode.children, 0, &rnode);
dmnsn_array_get(astnode.children, 1, &gnode);
@@ -366,7 +365,7 @@ dmnsn_realize_pigment(dmnsn_astnode astnode, dmnsn_object *object)
case DMNSN_AST_NONE:
break;
- case DMNSN_AST_VECTOR:
+ case DMNSN_AST_COLOR:
color = dmnsn_realize_color(color_node);
object->texture->pigment = dmnsn_new_solid_pigment(color);
if (!object->texture->pigment) {