Changeset 486

Show
Ignore:
Timestamp:
10/15/07 04:51:18 (11 months ago)
Author:
krobillard
Message:

Animate now handles 'loop behavior.

Location:
trunk/thune/gl
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/thune/gl/draw_list.c

    r458 r486  
    11971197                break; 
    11981198 
    1199             case DOP_IMAGE:                 // image [x,y] texture 
     1199            case DOP_IMAGE:                 // image[/trans] [x,y] texture 
    12001200            { 
    12011201                GLfloat x, y; 
  • trunk/thune/gl/gx.c

    r485 r486  
    2929#include "glh.h" 
    3030#include "gx.h" 
     31#include "urlan_atoms.h" 
    3132#include "gx_atoms.h" 
    3233#include "audio.h" 
     
    13831384    } 
    13841385 
     1386    behav = vc + CI_ANIM_BEHAVIOR; 
     1387    if( ur_is(behav, UT_NONE) )     // Return early if inactive 
     1388        return 1; 
     1389 
    13851390    curve = vc + CI_ANIM_CURVE; 
    13861391    if( ! ur_is(curve, UT_BLOCK) ) 
     
    13971402    } 
    13981403 
    1399     behav = vc + CI_ANIM_BEHAVIOR; 
     1404    period = ur_decimal(vc + CI_ANIM_PERIOD); 
     1405    timec = vc + CI_ANIM_TIME; 
     1406 
    14001407    if( ur_is(behav, UT_INT) ) 
    14011408    { 
    1402         period = ur_decimal(vc + CI_ANIM_PERIOD); 
    1403  
    1404         timec = vc + CI_ANIM_TIME; 
    14051409        dt += ur_decimal(timec); 
    14061410        if( dt > period ) 
     
    14171421            } 
    14181422        } 
    1419         else 
    1420         { 
    1421             ur_decimal(timec) = dt; 
    1422         } 
    1423  
     1423cval: 
     1424        ur_decimal(timec) = dt; 
    14241425        if( (period != 1.0) && (period > 0.0) ) 
    14251426            dt /= period; 
     
    14271428        return _curveValue( ut, curve, value, dt ); 
    14281429    } 
    1429 #if 0 
    1430     else if( ur_is(cell, UT_WORD) ) 
    1431     { 
    1432         switch( ur_atom(cell) ) 
     1430    else if( ur_is(behav, UT_WORD) ) 
     1431    { 
     1432        switch( ur_atom(behav) ) 
    14331433        { 
    14341434            case UR_ATOM_LOOP: 
     1435                dt += ur_decimal(timec); 
     1436                if( dt > period ) 
     1437                    dt -= period; 
     1438                goto cval; 
     1439 
     1440            /* 
    14351441            case UR_ATOM_PING_PONG: 
    14361442            case UR_ATOM_PONG: 
    14371443                break; 
    1438         } 
    1439     } 
    1440 #endif 
     1444            */ 
     1445        } 
     1446    } 
    14411447    return 1; 
    14421448} 
  • trunk/thune/gl/scripts/cloud.t

    r347 r486  
    11; Particle cloud test 
    2  
    3 "test_fw.t" load do 
    42 
    5310.0 :zoom