11#include "libsnd2_internal.h"
13void _SsSndSetRit(s16 sep_no, s16 seq_no,
int tempo,
int v_time)
18 score_struct = &_ss_score[sep_no][seq_no];
19 m_flags = score_struct->m_flags;
20 if ( (m_flags & 1) != 0 && (m_flags & 2) == 0 )
24 m_unk94 = score_struct->m_unk94;
25 if ( tempo != m_unk94 )
27 score_struct->m_unkA4 = v_time;
28 score_struct->m_unkAC = tempo;
29 score_struct->m_unkA8 = v_time;
31 ((tempo - m_unk94 >= 0) && (tempo - m_unk94 < v_time))
32 || ((tempo - m_unk94 < 0) && (m_unk94 - tempo < v_time)) )
39 v9 = score_struct->m_unk94;
40 m_unkA8 = score_struct->m_unkA8;
45 if ( v13 == -1 && (
unsigned int)m_unkA8 == 0x80000000 )
47 score_struct->m_unk4E = m_unkA8 / v13;
51 score_struct->m_unk4E = m_unkA8 / v11;
62 v14 = score_struct->m_unk94;
63 v15 = score_struct->m_unkA8;
65 if ( tempo - v14 < 0 )
67 if ( v15 == -1 && (
unsigned int)v16 == 0x80000000 )
69 score_struct->m_unk4E = ~(u16)(v16 / v15);
71 score_struct->m_flags |= 0x80u;
72 score_struct->m_flags &= ~0x40u;
77void SsSeqSetRitardando(s16 sep_no,
int tempo,
int v_time)
79 _SsSndSetRit(sep_no, 0, tempo, v_time);
82void SsSepSetRitardando(s16 sep_no, s16 seq_no,
int tempo,
int v_time)
84 _SsSndSetRit(sep_no, seq_no, tempo, v_time);