/************************************************************************ FUNCTION These two functions works just like GetXSubTrack1 and 2, except that they also accept the tracks that contains to the block. Which is the signature-track, lpb-track, tempo-track, and the temponode-track. ************************************************************************/ int GetXSubTrack_B1( const struct WBlocks *wblock, NInt track, int subtrack ){ if(track>=0) return GetXSubTrack1(ListFindElement1(&wblock->wtracks->l,track),subtrack); switch(track){ case SIGNATURETRACK: return wblock->signaturearea.x; break; case LPBTRACK: return wblock->lpbarea.x; break; case TEMPOTRACK: return wblock->tempoarea.x; break; case TEMPONODETRACK: return wblock->temponodearea.x; break; }; RError("Error in function GetXSubTrack_B1 in file gfx_subtrack.c\n"); return 0; }
const struct NodeLine *GetVelocityNodeLines(const struct Tracker_Windows *window, const struct WBlocks *wblock, const struct WTracks *wtrack, const struct Notes *note){ struct Velocities *first_velocity = (struct Velocities*)¬e->first_velocity; first_velocity->l.p = note->l.p; first_velocity->l.next = ¬e->velocities->l; first_velocity->velocity = note->velocity; first_velocity->logtype = note->velocity_first_logtype; struct Velocities *last_velocity = (struct Velocities*)¬e->last_velocity; last_velocity->l.p = note->end; last_velocity->l.next = NULL; last_velocity->velocity = note->velocity_end; last_velocity->logtype = LOGTYPE_IRRELEVANT; //printf("Note: %s, pointer: %p, subtrack: %d\n",NotesTexts3[(int)note->note],note,note->subtrack); subtrack_x1 = GetXSubTrack1(wtrack,note->subtrack); subtrack_x2 = GetXSubTrack2(wtrack,note->subtrack); return create_nodelines(window, wblock, &first_velocity->l, get_velocity_x, &last_velocity->l ); }
int GetSubTrackWidth(const struct WTracks *wtrack,int subtrack){ return GetXSubTrack2(wtrack,subtrack)-GetXSubTrack1(wtrack,subtrack); }