Merge branch 'master' into inf2
This commit is contained in:
commit
8f7fd0a229
8 changed files with 30 additions and 15 deletions
|
|
@ -39,8 +39,8 @@
|
|||
#define DIV_PAT_FXVAL(_x) (4+((_x)<<1))
|
||||
|
||||
// column type checks
|
||||
#define DIV_PAT_IS_EFFECT(_x) ((_x)>DIV_PAT_VOL && (!((_x)&1)))
|
||||
#define DIV_PAT_IS_EFFECT_VAL(_x) ((_x)>DIV_PAT_VOL && ((_x)&1))
|
||||
#define DIV_PAT_IS_EFFECT(_x) ((_x)>DIV_PAT_VOL && ((_x)&1))
|
||||
#define DIV_PAT_IS_EFFECT_VAL(_x) ((_x)>DIV_PAT_VOL && (!((_x)&1)))
|
||||
|
||||
#define DIV_NOTE_NULL_PAT 252
|
||||
#define DIV_NOTE_OFF 253
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ bool DivEngine::convertLegacySampleMode() {
|
|||
continue;
|
||||
}
|
||||
sampleMode=1;
|
||||
preferredInsType=DIV_INS_ADPCMB;
|
||||
break;
|
||||
case DIV_SYSTEM_Y8950_DRUMS:
|
||||
// Y8950 ADPCM
|
||||
|
|
|
|||
|
|
@ -2138,9 +2138,8 @@ bool DivEngine::nextTick(bool noAccum, bool inhibitLowLat) {
|
|||
// advance tempo accumulator (for virtual tempo) unless we are step playing and waiting for the next step (stepPlay==2)
|
||||
// then advance tick counter and then call nextRow()
|
||||
if (stepPlay!=1) {
|
||||
// fast-forward the accumulator if we are "skipping" (seeking to a position)
|
||||
// otherwise increase accumulator by virtual tempo numerator
|
||||
tempoAccum+=(skipping && virtualTempoN<virtualTempoD)?virtualTempoD:virtualTempoN;
|
||||
// increase accumulator by virtual tempo numerator
|
||||
tempoAccum+=virtualTempoN;
|
||||
// while accumulator is higher than virtual tempo denominator
|
||||
while (tempoAccum>=virtualTempoD) {
|
||||
// wrap the accumulator back
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ void FurnaceGUI::doDelete() {
|
|||
for (; j<e->curSubSong->patLen && (j<=selEnd.y || jOrder<selEnd.order); j++) {
|
||||
touch(jOrder,j);
|
||||
if (iFine==0) {
|
||||
if (selStart.y==selEnd.y && selStart.order==selEnd.order) pat->newData[j][DIV_PAT_VOL]=-1;
|
||||
if (selStart.y==selEnd.y && selStart.order==selEnd.order) pat->newData[j][DIV_PAT_INS]=-1;
|
||||
}
|
||||
pat->newData[j][iFine]=-1;
|
||||
|
||||
|
|
|
|||
|
|
@ -2843,9 +2843,9 @@ void FurnaceGUI::drawMacros(std::vector<FurnaceGUIMacroDesc>& macros, FurnaceGUI
|
|||
char buf[256];
|
||||
|
||||
if (macros[i].macro->len>0) {
|
||||
snprintf(buf,255,"%s [%d]###%s",macros[i].displayName,macros[i].macro->len,macros[i].displayName);
|
||||
snprintf(buf,255,"%s [%d]###%s_%d",macros[i].displayName,macros[i].macro->len,macros[i].displayName,(int)i);
|
||||
} else {
|
||||
snprintf(buf,255,"%s",macros[i].displayName);
|
||||
snprintf(buf,255,"%s###%s_%d",macros[i].displayName,macros[i].displayName,(int)i);
|
||||
}
|
||||
|
||||
if (ImGui::Selectable(buf,state.selectedMacro==(int)i)) {
|
||||
|
|
|
|||
|
|
@ -109,17 +109,20 @@ void FurnaceGUI::drawRefPlayer() {
|
|||
if (ImGui::IsItemClicked(ImGuiMouseButton_Middle)) {
|
||||
fp->setPos(0);
|
||||
}
|
||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||
TimeMicros cueTime=e->getFilePlayerCue();
|
||||
fpCueInput=cueTime.toString(-1,TA_TIME_FORMAT_AUTO);
|
||||
}
|
||||
if (ImGui::BeginPopupContextItem("Edit Cue Position",ImGuiPopupFlags_MouseButtonRight)) {
|
||||
ImGui::TextUnformatted(_("Set cue position at first order:"));
|
||||
TimeMicros cueTime=e->getFilePlayerCue();
|
||||
bool altered=false;
|
||||
fpCueInput=cueTime.toString(-1,TA_TIME_FORMAT_AUTO);
|
||||
pushWarningColor(false,fpCueInputFailed);
|
||||
if (ImGui::InputText("##CuePos",&fpCueInput)) {
|
||||
fpCueInputFailed=false;
|
||||
try {
|
||||
cueTime=TimeMicros::fromString(fpCueInput);
|
||||
altered=true;
|
||||
fpCueInputFailed=false;
|
||||
} catch (std::invalid_argument& e) {
|
||||
fpCueInputFailed=true;
|
||||
fpCueInputFailReason=e.what();
|
||||
|
|
|
|||
|
|
@ -5116,7 +5116,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
|
|||
settings.rackShowLEDs=conf.getInt("rackShowLEDs",1);
|
||||
|
||||
settings.mixerStyle=conf.getInt("mixerStyle",1);
|
||||
settings.mixerLayout=conf.getInt("mixerLayout",1);
|
||||
settings.mixerLayout=conf.getInt("mixerLayout",0);
|
||||
|
||||
settings.channelColors=conf.getInt("channelColors",1);
|
||||
settings.channelTextColors=conf.getInt("channelTextColors",0);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ struct TimeMicros {
|
|||
}
|
||||
|
||||
// operators
|
||||
inline TimeMicros& operator+(TimeMicros& other) {
|
||||
inline TimeMicros& operator+=(TimeMicros& other) {
|
||||
seconds+=other.seconds;
|
||||
micros+=other.micros;
|
||||
while (micros>=1000000) {
|
||||
|
|
@ -64,11 +64,11 @@ struct TimeMicros {
|
|||
}
|
||||
return *this;
|
||||
}
|
||||
inline TimeMicros& operator+(int other) {
|
||||
inline TimeMicros& operator+=(int other) {
|
||||
seconds+=other;
|
||||
return *this;
|
||||
}
|
||||
inline TimeMicros& operator-(TimeMicros& other) {
|
||||
inline TimeMicros& operator-=(TimeMicros& other) {
|
||||
seconds-=other.seconds;
|
||||
micros-=other.micros;
|
||||
while (micros<0) {
|
||||
|
|
@ -77,7 +77,7 @@ struct TimeMicros {
|
|||
}
|
||||
return *this;
|
||||
}
|
||||
inline TimeMicros& operator-(int other) {
|
||||
inline TimeMicros& operator-=(int other) {
|
||||
seconds-=other;
|
||||
return *this;
|
||||
}
|
||||
|
|
@ -124,4 +124,16 @@ struct TimeMicros {
|
|||
seconds(0), micros(0) {}
|
||||
};
|
||||
|
||||
inline TimeMicros operator+(TimeMicros& t1, TimeMicros t2) {
|
||||
TimeMicros result=t1;
|
||||
result+=t2;
|
||||
return result;
|
||||
}
|
||||
|
||||
inline TimeMicros operator-(TimeMicros& t1, TimeMicros t2) {
|
||||
TimeMicros result=t1;
|
||||
result-=t2;
|
||||
return result;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue