11#include "libsnd2_internal.h"
13void _SsSndSetAccele(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_unkA8 = v_time;
28 score_struct->m_unkA4 = v_time;
29 score_struct->m_unkAC = tempo;
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;
64 v14 = score_struct->m_unk94;
65 v15 = score_struct->m_unkA8;
67 if ( tempo - v14 < 0 )
69 if ( v15 == -1 && (
unsigned int)v16 == 0x80000000 )
71 score_struct->m_unk4E = ~(u16)(v16 / v15);
73 score_struct->m_flags |= 0x40u;
74 score_struct->m_flags &= ~0x80u;
79void SsSeqSetAccelerando(s16 seq_no,
int tempo,
int v_time)
81 _SsSndSetAccele(seq_no, 0, tempo, v_time);
84void SsSepSetAccelerando(s16 seq_no, s16 sep_no,
int tempo,
int v_time)
86 _SsSndSetAccele(seq_no, sep_no, tempo, v_time);