IT import: comments, channel names and pat names
the latter two are MPT extensions this may not work on songs with MIDI macro setup info
This commit is contained in:
parent
7709640aa0
commit
d0c4fb0b42
3 changed files with 126 additions and 0 deletions
|
|
@ -271,6 +271,15 @@ String SafeReader::readStringWithEncoding(DivStringEncoding encoding, size_t stl
|
|||
ret.push_back(c);
|
||||
}
|
||||
}
|
||||
} else if (encoding==DIV_ENCODING_LATIN1_SPECIAL) {
|
||||
if (c&0x80) {
|
||||
if (c>=0xa0) {
|
||||
ret.push_back(0xc0|(c>>6));
|
||||
ret.push_back(0x80|(c&63));
|
||||
}
|
||||
} else {
|
||||
ret.push_back(c);
|
||||
}
|
||||
} else {
|
||||
ret.push_back(c);
|
||||
}
|
||||
|
|
@ -297,6 +306,15 @@ String SafeReader::readStringWithEncoding(DivStringEncoding encoding) {
|
|||
ret.push_back(c);
|
||||
}
|
||||
}
|
||||
} else if (encoding==DIV_ENCODING_LATIN1_SPECIAL) {
|
||||
if (c&0x80) {
|
||||
if (c>=0xa0) {
|
||||
ret.push_back(0xc0|(c>>6));
|
||||
ret.push_back(0x80|(c&63));
|
||||
}
|
||||
} else {
|
||||
ret.push_back(c);
|
||||
}
|
||||
} else {
|
||||
ret.push_back(c);
|
||||
}
|
||||
|
|
@ -320,6 +338,14 @@ String SafeReader::readStringLatin1(size_t stlen) {
|
|||
return readStringWithEncoding(DIV_ENCODING_LATIN1,stlen);
|
||||
}
|
||||
|
||||
String SafeReader::readStringLatin1Special() {
|
||||
return readStringWithEncoding(DIV_ENCODING_LATIN1_SPECIAL);
|
||||
}
|
||||
|
||||
String SafeReader::readStringLatin1Special(size_t stlen) {
|
||||
return readStringWithEncoding(DIV_ENCODING_LATIN1_SPECIAL,stlen);
|
||||
}
|
||||
|
||||
String SafeReader::readStringLine() {
|
||||
String ret;
|
||||
unsigned char c;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue