Пример #1
0
//================================================================
void bring_track_front(int scene, int trackid)
{
    if(!is_track(scene,trackid)) return;
    if( trackscenevec[scene]->zorder.size() <= 0 )
    {
        trackscenevec[scene]->zorder.push_back(trackid);
        return;
    }

    // find the track in the zorder, and bring it to the front
    
    int i;
    int z = -1;
    for( i = trackscenevec[scene]->zorder.size() - 1; i >= 0; --i)
    {
        if( trackscenevec[scene]->zorder[i] == trackid)
        {
            z = i;
            i = -1;
        }
    }

    // never found!!!

    if( z < 0 )
    {
        trackscenevec[scene]->zorder.push_back(trackid);
        return;
    }
    
    for( i = z; i > 0; --i)
        trackscenevec[scene]->zorder[i] = trackscenevec[scene]->zorder[i - 1];

    trackscenevec[scene]->zorder[0] = trackid;
}
Пример #2
0
//================================================================
float get_scene_track_nextpos (int trackid)
{
    if(!is_track(BoundScene,trackid)) return 0.0f;
    
	return trackscenevec[BoundScene]->trackvec[trackid]->nextPos;

}
Пример #3
0
//================================================================
void free_track(int scene, int trackid)
{
    if(!is_track(scene,trackid)) return;
    free_track(trackscenevec[scene]->trackvec[trackid]);
    
	trackscenevec[scene]->trackvec[trackid] = NULL;
}
Пример #4
0
stack_t * get_tracks(char * page)
{
    stack_t * result = NULL;

    while (page[0] != '\0')
    {
        if (is_track(page))
        {
            int length = get_line_length(page);
            s_push(&result, extract_next_substring(page, length));
            page += length;
        }
        else
        {
            page++;
        }
    }

    return result;
}
Пример #5
0
//================================================================
TrackSceneNode* get_scene_track(int trackid)
{
    if(!is_scene_bound()) return NULL;
    if(!is_track(BoundScene,trackid)) return NULL;
    return trackscenevec[BoundScene]->trackvec[trackid];
}
Пример #6
0
//================================================================
void highlight_track(int trackid, bool h)
{
    if(!is_track(BoundScene,trackid)) return;
    trackscenevec[BoundScene]->trackvec[trackid]->highlight = h;
}
Пример #7
0
//================================================================
bool is_track(int trackid)
{
    return is_track(BoundScene,trackid);
}
Пример #8
0
//================================================================
TrackSceneNode* get_scene_track(int scene, int trackid)
{
    if(!is_track(scene,trackid)) return NULL;
    return trackscenevec[scene]->trackvec[trackid];
}
Пример #9
0
//================================================================
void free_track_section_model(int scene, int trackid, int sectionid)
{
    if(!is_track(scene,trackid)) return;
    free_model(trackscenevec[scene]->trackvec[trackid], sectionid);
}