From: <bal...@us...> - 2004-01-02 19:18:18
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/MUSImporter In directory sc8-pr-cvs1:/tmp/cvs-serv2418 Modified Files: MUSImp.cpp Log Message: MUSImp.cpp : - Bug Fixed: Fixed to support IWD2 style Looping Index: MUSImp.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/MUSImporter/MUSImp.cpp,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** MUSImp.cpp 2 Jan 2004 16:18:05 -0000 1.24 --- MUSImp.cpp 2 Jan 2004 19:18:15 -0000 1.25 *************** *** 113,118 **** pls.PLTag[p]=0; p=0; ! i++; ! if((line[i]==' ') || (line[i]=='\t')) strcpy(pls.PLLoop, pls.PLTag); else { --- 113,124 ---- pls.PLTag[p]=0; p=0; ! while(i < len) { ! if((line[i]==' ') || (line[i]=='\t')) ! i++; ! else { ! break; ! } ! } ! if(line[i]=='@') strcpy(pls.PLLoop, pls.PLTag); else { *************** *** 140,147 **** if((line[i]!=' ') && (line[i]!='\t')) i++; ! else break; } - i++; while(i < len) { if((line[i]!=' ') && (line[i]!='\t')) --- 146,159 ---- if((line[i]!=' ') && (line[i]!='\t')) i++; ! else { ! while(i < len) { ! if((line[i]==' ') || (line[i]=='\t')) ! i++; ! else ! break; ! } break; + } } while(i < len) { if((line[i]!=' ') && (line[i]!='\t')) *************** *** 173,176 **** --- 185,190 ---- else { PLnext=PLpos+1; + if(PLnext >= playlist.size()) + PLnext = -1; } PlayMusic(PLpos); *************** *** 187,191 **** return; if(playlist[PLpos].PLEnd[0] != 0) { ! PlayMusic(playlist[PLpos].PLEnd); } PLnext = -1; --- 201,206 ---- return; if(playlist[PLpos].PLEnd[0] != 0) { ! if(stricmp(playlist[PLpos].PLEnd, "end") != 0) ! PlayMusic(playlist[PLpos].PLEnd); } PLnext = -1; *************** *** 238,247 **** void MUSImp::PlayMusic(int pos) { ! PlayMusic(playlist[pos].PLFile); } void MUSImp::PlayMusic(char *name) { ! char FName[_MAX_PATH]; strcpy(FName, core->GamePath); strcat(FName, musicsubfolder); --- 253,266 ---- void MUSImp::PlayMusic(int pos) { ! if(stricmp(playlist[pos].PLFile, "LOOP") != 0) { ! PlayMusic(playlist[pos].PLFile); ! } else { ! PlayMusic(playlist[pos].PLLoop); ! } } void MUSImp::PlayMusic(char *name) { ! char FName[_MAX_PATH], tmp[32]; strcpy(FName, core->GamePath); strcat(FName, musicsubfolder); *************** *** 251,256 **** strcat(FName, "mx0000"); strcat(FName, SPathDelimiter); ! } ! else if(strnicmp(name, "SPC",3) != 0) { strcat(FName, PLName); strcat(FName, SPathDelimiter); --- 270,274 ---- strcat(FName, "mx0000"); strcat(FName, SPathDelimiter); ! } else if(strnicmp(name, "SPC",3) != 0) { strcat(FName, PLName); strcat(FName, SPathDelimiter); |