Merge branch 'master' of https://github.com/tildearrow/furnace into ym2610b
# Conflicts: # src/engine/engine.cpp # src/engine/platform/ym2610Interface.cpp
This commit is contained in:
commit
d831a522a4
15 changed files with 163 additions and 96 deletions
|
|
@ -845,7 +845,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
if (tchans>DIV_MAX_CHANS) tchans=DIV_MAX_CHANS;
|
||||
|
||||
// system volume
|
||||
for (int i=0; i<32; i++) ds.systemVol[i]=reader.readC();
|
||||
for (int i=0; i<32; i++) {
|
||||
ds.systemVol[i]=reader.readC();
|
||||
if (ds.version<59 && ds.system[i]==DIV_SYSTEM_NES) {
|
||||
ds.systemVol[i]/=4;
|
||||
}
|
||||
}
|
||||
|
||||
// system panning
|
||||
for (int i=0; i<32; i++) ds.systemPan[i]=reader.readC();
|
||||
|
|
@ -1003,6 +1008,12 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
|
|||
ds.notes=reader.readString();
|
||||
}
|
||||
|
||||
if (ds.version>=59) {
|
||||
ds.masterVol=reader.readF();
|
||||
} else {
|
||||
ds.masterVol=2.0f;
|
||||
}
|
||||
|
||||
// read instruments
|
||||
for (int i=0; i<ds.insLen; i++) {
|
||||
DivInstrument* ins=new DivInstrument;
|
||||
|
|
@ -1448,6 +1459,8 @@ SafeWriter* DivEngine::saveFur() {
|
|||
|
||||
w->writeString(song.notes,false);
|
||||
|
||||
w->writeF(song.masterVol);
|
||||
|
||||
/// INSTRUMENT
|
||||
for (int i=0; i<song.insLen; i++) {
|
||||
DivInstrument* ins=song.ins[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue