Changeset 144 for trunk/orca/gl

Show
Ignore:
Timestamp:
05/11/06 14:23:03 (3 years ago)
Author:
krobillard
Message:

Native arguments are now kept on the stack until after the call and the
result is now always put into a1.

Location:
trunk/orca/gl
Files:
6 modified

Legend:

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

    r43 r144  
    157157            alGenBuffers( 1, &buffer ); 
    158158            alBufferData( buffer, format, data, size, freq ); 
     159            { 
     160            OValue* a1 = orTOS; 
    159161            orResult( OT_SOUND, buffer ); 
     162            } 
    160163        } 
    161164        else 
  • trunk/orca/gl/gx.c

    r86 r144  
    480480        resd_add( &gEnv.resd, &tex->res, key ); 
    481481 
    482         result = orRESULT; 
     482        result = orTOS; 
    483483        orCopyV( result, *val ); 
    484484        orLoadNative( result ); 
  • trunk/orca/gl/gx.h

    r42 r144  
    147147 
    148148#define gxResultRES(rp) \ 
    149    {OValue* _or_result = orRESULT; \ 
    150     orSetTF(_or_result, OT_RESOURCE); \ 
    151     _or_result->argc  = rp->res.resType; \ 
    152     _or_result->index = rp->res.resKey;} 
     149   {orSetTF(a1, OT_RESOURCE); \ 
     150    a1->argc  = rp->res.resType; \ 
     151    a1->index = rp->res.resKey;} 
    153152 
    154153#define gxResType(val)  val->argc 
  • trunk/orca/gl/joystick.c

    r54 r144  
    132132  Set 'input block values. 
    133133*/ 
    134 static void jsRead( OContext* ctx ) 
     134static void jsRead( OContext* ctx, OValue* a1 ) 
    135135{ 
    136136    int events = 0; 
  • trunk/orca/gl/main.c

    r61 r144  
    5656    { 
    5757        OIndex strN; 
     58        OValue* tos; 
    5859 
     60        tos = orTOS; 
    5961        strN = orMakeCString( argv[1], -1 ); 
    60         orResultFILE( strN ); 
     62        orSetTF(tos, OT_FILE ); 
     63        orSetSeries(tos, strN, 0 ); 
    6164 
    62         orDoNative( orRESULT ); 
     65        orDoNative( tos ); 
    6366        if( orErrorThrown ) 
    6467        { 
     
    123126                { 
    124127                    OValue* val; 
    125                     val = orRESULT; 
     128                    val = orTOS; 
    126129                    if( (val->type != OT_UNSET) && 
    127130                        (val->type != OT_OBJECT) && 
  • trunk/orca/gl/png_load.c

    r1 r144  
    5757 
    5858        bin = orMakeImage( format, width, height ); 
     59        { 
     60        OValue* a1 = orTOS; 
    5961        orResult( OT_IMAGE, orBinaryN(bin) ); 
     62        } 
    6063 
    6164        if( bin->byteArray )