PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
playmode.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 Snd_SetPlayMode(s16 sep_no, s16 seq_no, char play_mode, char l_count)
14{
15 libsnd2_sequence_struct_t *score_struct;
16 u8 *m_unk04;
17
18 score_struct = &_ss_score[sep_no][seq_no];
19 m_unk04 = score_struct->m_unk04;
20 score_struct->m_seq_ptr = m_unk04;
21 score_struct->m_unk08 = m_unk04;
22 score_struct->m_unk0C = m_unk04;
23 score_struct->m_flags &= ~0x200u;
24 score_struct->m_flags &= ~4u;
25 score_struct->m_l_count = l_count;
26 switch ( play_mode )
27 {
28 case SSPLAY_PAUSE:
29 score_struct->m_flags |= 2u;
30 break;
31 case SSPLAY_PLAY:
32 score_struct->m_flags |= 1u;
33 score_struct->m_play_mode = SSPLAY_PLAY;
34 score_struct->m_unk21 = 0;
35 _SsVmSetSeqVol((sep_no | (seq_no << 8)), score_struct->m_voll, score_struct->m_volr);
36 break;
37 default:
38 break;
39 }
40}