Changeset 54 for trunk/orca/gl
- Timestamp:
- 02/17/06 15:30:01 (3 years ago)
- Location:
- trunk/orca/gl
- Files:
-
- 4 modified
-
dlist.c (modified) (8 diffs)
-
gx.c (modified) (13 diffs)
-
joystick.c (modified) (6 diffs)
-
ttf_load.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/orca/gl/dlist.c
r43 r54 113 113 { 114 114 if( val->type == OT_DECIMAL ) 115 return (GLfloat) val->num.decimal;115 return (GLfloat) orDecimal(val); 116 116 else if( val->type == OT_INTEGER ) 117 return (GLfloat) val->integer;117 return (GLfloat) orInt(val); 118 118 return 0.0f; 119 119 } … … 132 132 else if( val->type == OT_DECIMAL ) 133 133 { 134 GLfloat f = (GLfloat) val->num.decimal;134 GLfloat f = (GLfloat) orDecimal(val); 135 135 pc[0].f = pc[1].f = pc[2].f = f; 136 136 } 137 137 else if( val->type == OT_INTEGER ) 138 138 { 139 GLfloat f = (GLfloat) val->integer;139 GLfloat f = (GLfloat) orInt(val); 140 140 pc[0].f = pc[1].f = pc[2].f = f; 141 141 } … … 238 238 pc = ((RenderWord*) prog->buf) + prog->used; 239 239 240 switch( match->integer)240 switch( orInt(match) ) 241 241 { 242 242 case DLP_CALL_INT: … … 508 508 return; 509 509 } 510 key = a1->integer;510 key = orInt(a1); 511 511 } 512 512 else … … 573 573 { 574 574 case PRIM_KEY_VERTEX: 575 vindex = idx->integer* 3;575 vindex = orInt(idx) * 3; 576 576 getVector( 3, gEnv.state.vertVals + vindex, vec ); 577 577 glVertex3dv( vec ); … … 580 580 581 581 case PRIM_KEY_NORMAL: 582 vindex = idx->integer* 3;582 vindex = orInt(idx) * 3; 583 583 getVector( 3, gEnv.state.normVals + vindex, vec ); 584 584 glNormal3dv( vec ); … … 588 588 case PRIM_KEY_COLOR: 589 589 { 590 OValue* cval = gEnv.state.colorVals + idx->integer;590 OValue* cval = gEnv.state.colorVals + orInt(idx); 591 591 if( orIs(cval, OT_TUPLE) ) 592 592 { … … 600 600 601 601 case PRIM_KEY_UV0: 602 vindex = idx->integer* 2;602 vindex = orInt(idx) * 2; 603 603 getVector( 2, gEnv.state.uvVals + vindex, vec ); 604 604 //printf( "KR UV0 %g %g\n", vec[0], vec[1] ); -
trunk/orca/gl/gx.c
r42 r54 325 325 { 326 326 if( val->type == OT_DECIMAL ) 327 *vec++ = val->num.decimal;327 *vec++ = orDecimal(val); 328 328 else if( val->type == OT_INTEGER ) 329 *vec++ = (GLdouble) val->integer;329 *vec++ = (GLdouble) orInt(val); 330 330 else 331 331 *vec++ = 0.0; … … 704 704 if( a1->type == OT_INTEGER ) 705 705 { 706 glCallList( a1->integer);706 glCallList( orInt(a1) ); 707 707 } 708 708 else 709 709 { 710 DrawListResource* res = gxDList( a1->integer);710 DrawListResource* res = gxDList( orInt(a1) ); 711 711 if( res && res->prog ) 712 712 gxRunRenderProgram( res->prog ); … … 736 736 else 737 737 { 738 mode.id = a1->integer;738 mode.id = orInt(a1); 739 739 mode.width = 0; 740 740 mode.height = 0; … … 832 832 if( it->type == OT_WORD ) 833 833 { 834 cp = orAtomCString( it->word.atom);834 cp = orAtomCString( orAtom(it) ); 835 835 strLen = 0; 836 836 while( cp[ strLen ] ) … … 840 840 else if( it->type == OT_CHAR ) 841 841 { 842 ch = it->integer;842 ch = orInt(it); 843 843 if( ! ch ) 844 844 ch = -1; … … 1115 1115 { 1116 1116 if( val->type == OT_INTEGER ) 1117 *dim = (double) val->integer;1117 *dim = (double) orInt(val); 1118 1118 else if( val->type == OT_DECIMAL ) 1119 *dim = val->num.decimal;1119 *dim = orDecimal(val); 1120 1120 else 1121 1121 { … … 1134 1134 #define toDecimal(idx,dim) \ 1135 1135 if( val->type == OT_DECIMAL ) \ 1136 num[idx] = val->num.decimal* dim; \1136 num[idx] = orDecimal(val) * dim; \ 1137 1137 else if( val->type == OT_INTEGER ) \ 1138 num[idx] = (double) val->integer; \1138 num[idx] = (double) orInt(val); \ 1139 1139 else return 0; 1140 1140 … … 1268 1268 if( a1->type == OT_WORD ) 1269 1269 { 1270 if( a1->word.atom== gEnv.atom_model )1270 if( orAtom(a1) == gEnv.atom_model ) 1271 1271 { 1272 1272 gxStateModel(); 1273 1273 } 1274 else if( a1->word.atom== gEnv.atom_solid )1274 else if( orAtom(a1) == gEnv.atom_solid ) 1275 1275 { 1276 1276 gxStateSolid(); … … 1389 1389 { 1390 1390 if( it->type == OT_DECIMAL ) 1391 *pf += (float) it->num.decimal;1391 *pf += (float) orDecimal(it); 1392 1392 else if( it->type == OT_INTEGER ) 1393 *pf += (float) it->integer;1393 *pf += (float) orInt(it); 1394 1394 1395 1395 ++pf; … … 1412 1412 1413 1413 if( a3->type == OT_DECIMAL ) 1414 angle = a3->num.decimal;1414 angle = orDecimal(a3); 1415 1415 else if( a3->type == OT_INTEGER ) 1416 angle = (double) a3->integer;1416 angle = (double) orInt(a3); 1417 1417 else 1418 1418 angle = 0.0; … … 1429 1429 void keyRepeatNative( OValue* a1 ) 1430 1430 { 1431 glv_filterRepeatKeys( gView, a1->integer);1431 glv_filterRepeatKeys( gView, orInt(a1) ); 1432 1432 } 1433 1433 … … 1554 1554 1555 1555 if( a1->type == OT_INTEGER ) 1556 key = a1->integer;1556 key = orInt(a1); 1557 1557 else 1558 1558 key = gxHashString(a1); … … 1579 1579 1580 1580 if( a1->type == OT_INTEGER ) 1581 id = a1->integer;1581 id = orInt(a1); 1582 1582 else if( a1->type == OT_WORD ) 1583 id = a1->word.atom;1583 id = orAtom(a1); 1584 1584 1585 1585 if( orRefineSet(REF_RG_FREE) ) -
trunk/orca/gl/joystick.c
r1 r54 70 70 val = cblk->values + JV_FD; 71 71 orSetTF( val, OT_INTEGER ); 72 val->integer= fd;72 orInt(val) = fd; 73 73 74 74 i = orMakeCString( name, -1 ); … … 79 79 val = cblk->values + JV_AXIS_COUNT; 80 80 orSetTF( val, OT_INTEGER ); 81 val->integer= axes;81 orInt(val) = axes; 82 82 83 83 val = cblk->values + JV_BTN_COUNT; 84 84 orSetTF( val, OT_INTEGER ); 85 val->integer= buttons;85 orInt(val) = buttons; 86 86 87 87 blk = orMakeBlock( axes + buttons ); … … 92 92 { 93 93 orSetTF( val, OT_INTEGER ); 94 val->integer= 0;94 orInt(val) = 0; 95 95 ++val; 96 96 } … … 119 119 if( orIs( val, OT_INTEGER ) ) 120 120 { 121 fd = val->integer;121 fd = orInt(val); 122 122 if( fd > -1 ) 123 123 { … … 141 141 val = vblk->values + JV_FD; 142 142 143 if( orIs( val, OT_INTEGER ) && ( val->integer> -1) )143 if( orIs( val, OT_INTEGER ) && (orInt(val) > -1) ) 144 144 { 145 145 int axes; … … 148 148 OBlock* blk; 149 149 150 fd = val->integer;150 fd = orInt(val); 151 151 152 152 val = vblk->values + JV_AXIS_COUNT; 153 axes = val->integer;153 axes = orInt(val); 154 154 155 155 val = vblk->values + JV_INPUT; -
trunk/orca/gl/ttf_load.c
r37 r54 636 636 tf = &res->tfont; 637 637 638 psize = (a1 + 2)->integer;638 psize = orInt(a1 + 2); 639 639 if( psize < 1 ) 640 640 psize = 20; … … 657 657 if( arg->type == OT_INTEGER ) 658 658 { 659 tf->tex_width = arg->integer;660 tf->tex_height = arg->integer;659 tf->tex_width = orInt(arg); 660 tf->tex_height = orInt(arg); 661 661 } 662 662 else
