PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
cc_99.c
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
11#include "libsnd2_internal.h"
12
13void _SsContNrpn2(s16 sep_no, s16 seq_no, u8 control_value)
14{
15 libsnd2_sequence_struct_t *score_struct;
16
17 score_struct = &_ss_score[sep_no][seq_no];
18 if ( control_value == 20 )
19 {
20 score_struct->m_unk1B = control_value;
21 score_struct->m_unk1C = 1;
22 score_struct->m_delta_value = _SsReadDeltaValue(sep_no, seq_no);
23 score_struct->m_unk08 = score_struct->m_seq_ptr;
24 return;
25 }
26 if ( control_value != 30 )
27 {
28 score_struct->m_unk1B = control_value;
29 score_struct->m_unk1F += 1;
30 score_struct->m_delta_value = _SsReadDeltaValue(sep_no, seq_no);
31 return;
32 }
33 score_struct->m_unk1B = control_value;
34 if ( score_struct->m_unk1D == 0 )
35 {
36 score_struct->m_unk15 = 0;
37 score_struct->m_delta_value = _SsReadDeltaValue(sep_no, seq_no);
38 return;
39 }
40 if ( score_struct->m_unk1D >= 0x7Fu )
41 {
42 _SsReadDeltaValue(sep_no, seq_no);
43 score_struct->m_delta_value = 0;
44 score_struct->m_seq_ptr = score_struct->m_unk08;
45 }
46 else
47 {
48 score_struct->m_unk1D -= 1;
49 score_struct->m_delta_value = _SsReadDeltaValue(sep_no, seq_no);
50 if ( score_struct->m_unk1D )
51 score_struct->m_seq_ptr = score_struct->m_unk08;
52 else
53 score_struct->m_unk15 = 0;
54 }
55}