PS2SDK
PS2 Homebrew Libraries
sstable.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 
13 void SsSetTableSize(char *table, s16 s_max, s16 t_max)
14 {
15  int typed_table_i;
16  unsigned int openflag_i;
17  int i;
18 
19  _snd_seq_s_max = s_max;
20  _snd_seq_t_max = t_max;
21  for ( typed_table_i = 0; typed_table_i < s_max; typed_table_i += 1 )
22  {
23  _ss_score[typed_table_i] =
24  (libsnd2_sequence_struct_t *)&table[sizeof(libsnd2_sequence_struct_t) * (t_max * typed_table_i)];
25  }
26  for ( openflag_i = s_max; openflag_i < 32; openflag_i += 1 )
27  {
28  _snd_openflag |= (u32)1 << openflag_i;
29  }
30  for ( i = 0; i < _snd_seq_s_max; i += 1 )
31  {
32  int j;
33 
34  j = 0;
35  for ( j = 0; j < _snd_seq_t_max; j += 1 )
36  {
37  libsnd2_sequence_struct_t *score_struct;
38 
39  score_struct = &_ss_score[i][j];
40  score_struct->m_flags = 0;
41  score_struct->m_next_sep = -1;
42  score_struct->m_next_seq = 0;
43  score_struct->m_unk48 = 0;
44  score_struct->m_unk4A = 0;
45  score_struct->m_unk9C = 0;
46  score_struct->m_unkA0 = 0;
47  score_struct->m_unk4C = 0;
48  score_struct->m_unkAC = 0;
49  score_struct->m_unkA8 = 0;
50  score_struct->m_unkA4 = 0;
51  score_struct->m_unk4E = 0;
52  score_struct->m_voll = 127;
53  score_struct->m_volr = 127;
54  score_struct->m_unk5C = 127;
55  score_struct->m_unk5E = 127;
56  }
57  }
58 }
libsnd2_sequence_struct_
Definition: libsnd2_internal.h:47