takes a OMS theme file.
| 168 | |
| 169 | // takes a OMS theme file. |
| 170 | bool OutrageMusicSeq::Init(const char *theme_file) { |
| 171 | // reset streams |
| 172 | m_dominant_strm = 0; |
| 173 | m_timer = 0.0f; |
| 174 | |
| 175 | if (theme_file[0] == 0) { |
| 176 | return false; |
| 177 | } |
| 178 | |
| 179 | Stop(); |
| 180 | |
| 181 | // initialize memory buffers |
| 182 | m_ins_buffer = (music_ins *)mem_malloc(sizeof(music_ins) * MAX_MUSIC_INSTRUCTIONS); |
| 183 | m_str_buffer = (char *)mem_malloc(MAX_MUSIC_STRLEN); |
| 184 | m_ins_curptr = m_ins_buffer; |
| 185 | m_str_curptr = m_str_buffer; |
| 186 | m_str_curptr[0] = 0; |
| 187 | |
| 188 | // initialize music lists |
| 189 | m_music_list.free(); |
| 190 | m_tracklist.init(64); |
| 191 | m_pending_song = m_active_song = m_playing_song = NULL; |
| 192 | m_output_q.flush(); |
| 193 | m_curregion = -1; |
| 194 | |
| 195 | OutrageMusicSeq::SetVolume(1.0f); |
| 196 | m_sequencer_init = true; |
| 197 | |
| 198 | return LoadTheme(theme_file); |
| 199 | } |
| 200 | |
| 201 | void OutrageMusicSeq::Shutdown() { |
| 202 | if (!m_sequencer_init) |