| 132 | } |
| 133 | |
| 134 | bool WA2InputModuleMSP::LoadFile(const char *fn) |
| 135 | { |
| 136 | int song=-1; |
| 137 | |
| 138 | if(strcmp(last_fn,fn)) |
| 139 | { |
| 140 | strncpy(last_fn,fn,511); |
| 141 | last_fn[511]='\0'; |
| 142 | keep_song = false; |
| 143 | } |
| 144 | else if(keep_song) |
| 145 | { |
| 146 | song = sdat->GetSong(); |
| 147 | } |
| 148 | |
| 149 | if(!sdat->LoadFile(fn)||!pl->Load(sdat)) |
| 150 | return false; |
| 151 | |
| 152 | if(song>=0) |
| 153 | sdat->SetSong(song); |
| 154 | |
| 155 | return true; |
| 156 | } |
| 157 | |
| 158 | int WA2InputModuleMSP::Play(const char *fn) |
| 159 | { |