mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
fix major extended op macro corruption
This commit is contained in:
parent
1ed5be887b
commit
23d9cd6d9a
2 changed files with 26 additions and 8 deletions
2
TODO.md
2
TODO.md
|
@ -4,6 +4,7 @@
|
||||||
- CSM
|
- CSM
|
||||||
- MSM6258 pitch and clock select
|
- MSM6258 pitch and clock select
|
||||||
- the last three compat flags
|
- the last three compat flags
|
||||||
|
- collapse/expand pattern and song
|
||||||
- add OPL drum instrument type
|
- add OPL drum instrument type
|
||||||
- Game Boy envelope macro/sequence
|
- Game Boy envelope macro/sequence
|
||||||
- rewrite the system name detection function anyway
|
- rewrite the system name detection function anyway
|
||||||
|
@ -15,3 +16,4 @@
|
||||||
- Apply button in settings
|
- Apply button in settings
|
||||||
- find and replace
|
- find and replace
|
||||||
- add mono/poly note preview button
|
- add mono/poly note preview button
|
||||||
|
- (maybe) add default patch selection
|
||||||
|
|
|
@ -870,14 +870,30 @@ DivDataErrors DivInstrument::readInsData(SafeReader& reader, short version) {
|
||||||
|
|
||||||
for (int i=0; i<4; i++) {
|
for (int i=0; i<4; i++) {
|
||||||
DivInstrumentSTD::OpMacro& op=std.opMacros[i];
|
DivInstrumentSTD::OpMacro& op=std.opMacros[i];
|
||||||
reader.read(op.damMacro.val,op.damMacro.len);
|
for (int j=0; j<op.damMacro.len; j++) {
|
||||||
reader.read(op.dvbMacro.val,op.dvbMacro.len);
|
op.damMacro.val[j]=(unsigned char)reader.readC();
|
||||||
reader.read(op.egtMacro.val,op.egtMacro.len);
|
}
|
||||||
reader.read(op.kslMacro.val,op.kslMacro.len);
|
for (int j=0; j<op.dvbMacro.len; j++) {
|
||||||
reader.read(op.susMacro.val,op.susMacro.len);
|
op.dvbMacro.val[j]=(unsigned char)reader.readC();
|
||||||
reader.read(op.vibMacro.val,op.vibMacro.len);
|
}
|
||||||
reader.read(op.wsMacro.val,op.wsMacro.len);
|
for (int j=0; j<op.egtMacro.len; j++) {
|
||||||
reader.read(op.ksrMacro.val,op.ksrMacro.len);
|
op.egtMacro.val[j]=(unsigned char)reader.readC();
|
||||||
|
}
|
||||||
|
for (int j=0; j<op.kslMacro.len; j++) {
|
||||||
|
op.kslMacro.val[j]=(unsigned char)reader.readC();
|
||||||
|
}
|
||||||
|
for (int j=0; j<op.susMacro.len; j++) {
|
||||||
|
op.susMacro.val[j]=(unsigned char)reader.readC();
|
||||||
|
}
|
||||||
|
for (int j=0; j<op.vibMacro.len; j++) {
|
||||||
|
op.vibMacro.val[j]=(unsigned char)reader.readC();
|
||||||
|
}
|
||||||
|
for (int j=0; j<op.wsMacro.len; j++) {
|
||||||
|
op.wsMacro.val[j]=(unsigned char)reader.readC();
|
||||||
|
}
|
||||||
|
for (int j=0; j<op.ksrMacro.len; j++) {
|
||||||
|
op.ksrMacro.val[j]=(unsigned char)reader.readC();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue