|
|
@@ -467,12 +467,12 @@ static VALUE fill_triangle_textured(VALUE self, VALUE coords, VALUE texture, VAL |
|
|
|
for(i=0; i<l; i++) |
|
|
|
{ |
|
|
|
v = rb_ary_entry(coords, i); |
|
|
|
if(l==6) |
|
|
|
ccoords[i] = NUM2INT(v); |
|
|
|
else |
|
|
|
{ |
|
|
|
if(l==6) |
|
|
|
ccoords[i] = NUM2INT(v); |
|
|
|
else |
|
|
|
{ |
|
|
|
if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2)) |
|
|
|
rb_raise(rb_eArgError, "invalid coords list"); |
|
|
|
rb_raise(rb_eArgError, "invalid coords list"); |
|
|
|
ccoords[2*i] = NUM2INT(rb_ary_entry(v, 0)); |
|
|
|
ccoords[2*i+1] = NUM2INT(rb_ary_entry(v, 1)); |
|
|
|
} |
|
|
@@ -491,7 +491,7 @@ static VALUE fill_triangle_textured(VALUE self, VALUE coords, VALUE texture, VAL |
|
|
|
else |
|
|
|
{ |
|
|
|
if((TYPE(v) != T_ARRAY) || (RARRAY(v)->len != 2)) |
|
|
|
rb_raise(rb_eArgError, "invalid uv list"); |
|
|
|
rb_raise(rb_eArgError, "invalid uv list"); |
|
|
|
ccoords[2*i] = NUM2DBL(rb_ary_entry(v, 0)); |
|
|
|
ccoords[2*i+1] = NUM2DBL(rb_ary_entry(v, 1)); |
|
|
|
} |
|
|
|