Changeset 54 for trunk/orca/gl/dlist.c

Show
Ignore:
Timestamp:
02/17/06 15:30:01 (3 years ago)
Author:
krobillard
Message:

Now using orDecimal() & orInt() where appropriate.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/orca/gl/dlist.c

    r43 r54  
    113113{ 
    114114    if( val->type == OT_DECIMAL ) 
    115         return (GLfloat) val->num.decimal; 
     115        return (GLfloat) orDecimal(val); 
    116116    else if( val->type == OT_INTEGER ) 
    117         return (GLfloat) val->integer; 
     117        return (GLfloat) orInt(val); 
    118118    return 0.0f; 
    119119} 
     
    132132    else if( val->type == OT_DECIMAL ) 
    133133    { 
    134         GLfloat f = (GLfloat) val->num.decimal; 
     134        GLfloat f = (GLfloat) orDecimal(val); 
    135135        pc[0].f = pc[1].f = pc[2].f = f; 
    136136    } 
    137137    else if( val->type == OT_INTEGER ) 
    138138    { 
    139         GLfloat f = (GLfloat) val->integer; 
     139        GLfloat f = (GLfloat) orInt(val); 
    140140        pc[0].f = pc[1].f = pc[2].f = f; 
    141141    } 
     
    238238        pc = ((RenderWord*) prog->buf) + prog->used; 
    239239 
    240         switch( match->integer ) 
     240        switch( orInt(match) ) 
    241241        { 
    242242            case DLP_CALL_INT: 
     
    508508            return; 
    509509        } 
    510         key = a1->integer; 
     510        key = orInt(a1); 
    511511    } 
    512512    else 
     
    573573            { 
    574574                case PRIM_KEY_VERTEX: 
    575                     vindex = idx->integer * 3; 
     575                    vindex = orInt(idx) * 3; 
    576576                    getVector( 3, gEnv.state.vertVals + vindex, vec ); 
    577577                    glVertex3dv( vec ); 
     
    580580 
    581581                case PRIM_KEY_NORMAL: 
    582                     vindex = idx->integer * 3; 
     582                    vindex = orInt(idx) * 3; 
    583583                    getVector( 3, gEnv.state.normVals + vindex, vec ); 
    584584                    glNormal3dv( vec ); 
     
    588588                case PRIM_KEY_COLOR: 
    589589                { 
    590                     OValue* cval = gEnv.state.colorVals + idx->integer; 
     590                    OValue* cval = gEnv.state.colorVals + orInt(idx); 
    591591                    if( orIs(cval, OT_TUPLE) ) 
    592592                    { 
     
    600600 
    601601                case PRIM_KEY_UV0: 
    602                     vindex = idx->integer * 2; 
     602                    vindex = orInt(idx) * 2; 
    603603                    getVector( 2, gEnv.state.uvVals + vindex, vec ); 
    604604                    //printf( "KR UV0 %g %g\n", vec[0], vec[1] );