prepare stuff
This commit is contained in:
parent
891af5ba9f
commit
20dab0b08b
3 changed files with 14 additions and 5 deletions
|
|
@ -55,8 +55,8 @@ class DivWorkPool;
|
|||
|
||||
#define DIV_UNSTABLE
|
||||
|
||||
#define DIV_VERSION "dev239"
|
||||
#define DIV_ENGINE_VERSION 239
|
||||
#define DIV_VERSION "inf2 - DO NOT SAVE!"
|
||||
#define DIV_ENGINE_VERSION 240
|
||||
// for imports
|
||||
#define DIV_VERSION_MOD 0xff01
|
||||
#define DIV_VERSION_FC 0xff02
|
||||
|
|
|
|||
|
|
@ -958,7 +958,8 @@ bool DivEngine::loadFur(unsigned char* file, size_t len, int variantID) {
|
|||
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
||||
unsigned char sysID=reader.readC();
|
||||
ds.system[i]=systemFromFileFur(sysID);
|
||||
logD("- %d: %.2x (%s)",i,sysID,getSystemName(ds.system[i]));
|
||||
ds.systemChans[i]=getChannelCount(ds.system[i]);
|
||||
logD("- %d: %.2x (%s, %d channels)",i,sysID,getSystemName(ds.system[i]),ds.systemChans[i]);
|
||||
if (sysID!=0 && systemToFileFur(ds.system[i])==0) {
|
||||
logE("unrecognized system ID %.2x",sysID);
|
||||
lastError=fmt::sprintf("unrecognized system ID %.2x!",sysID);
|
||||
|
|
@ -969,7 +970,7 @@ bool DivEngine::loadFur(unsigned char* file, size_t len, int variantID) {
|
|||
}
|
||||
int tchans=0;
|
||||
for (int i=0; i<ds.systemLen; i++) {
|
||||
tchans+=getChannelCount(ds.system[i]);
|
||||
tchans+=ds.systemChans[i];
|
||||
}
|
||||
if (tchans>DIV_MAX_CHANS) {
|
||||
tchans=DIV_MAX_CHANS;
|
||||
|
|
@ -2170,7 +2171,7 @@ bool DivEngine::loadFur(unsigned char* file, size_t len, int variantID) {
|
|||
}
|
||||
}
|
||||
}
|
||||
ch+=getChannelCount(ds.system[i]);
|
||||
ch+=ds.systemChans[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2227,6 +2228,12 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
|
|||
DivSubSong* subSong=song.subsong[subSongIndex];
|
||||
warnings="";
|
||||
|
||||
// please remove once INF2 is ready.
|
||||
logE("do not save yet! I still am working on it!");
|
||||
lastError="do not save yet! I still am working on it!";
|
||||
saveLock.unlock();
|
||||
return NULL;
|
||||
|
||||
// fail if values are out of range
|
||||
/*
|
||||
if (subSong->ordersLen>DIV_MAX_PATTERNS) {
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ struct DivSong {
|
|||
|
||||
// system
|
||||
DivSystem system[DIV_MAX_CHIPS];
|
||||
unsigned short systemChans[DIV_MAX_CHIPS];
|
||||
unsigned char systemLen;
|
||||
float systemVol[DIV_MAX_CHIPS];
|
||||
float systemPan[DIV_MAX_CHIPS];
|
||||
|
|
@ -517,6 +518,7 @@ struct DivSong {
|
|||
oldCenterRate(true) {
|
||||
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
||||
system[i]=DIV_SYSTEM_NULL;
|
||||
systemChans[i]=0;
|
||||
systemVol[i]=1.0;
|
||||
systemPan[i]=0.0;
|
||||
systemPanFR[i]=0.0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue