diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-12-21 04:25:30 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-12-21 04:25:30 -0500 |
commit | 8424804b1feaff5121060ed5ae4a321c47a76c34 (patch) | |
tree | 53d0afab5f43b1cce076f2b3035a13819b25bcbe /dimension/realize.c | |
parent | 494079ee46d67ae7ef6504734f7400b543c6d848 (diff) | |
download | dimension-8424804b1feaff5121060ed5ae4a321c47a76c34.tar.xz |
Differentiate between colors and vectors in the AST.
Diffstat (limited to 'dimension/realize.c')
-rw-r--r-- | dimension/realize.c | 5 |
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) { |