mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-27 15:03:01 +00:00
GUI: find and replace, part 10
find kind of works (only lax mode left to do) then i'll do replace
This commit is contained in:
parent
7354b1221c
commit
44341d8ccd
1 changed files with 22 additions and 11 deletions
|
@ -112,18 +112,28 @@ void FurnaceGUI::doFind() {
|
|||
bool notMatched=false;
|
||||
switch (curQueryEffectPos) {
|
||||
case 0: // no
|
||||
// TODO
|
||||
for (int m=0; m<l.effectCount; m++) {
|
||||
bool allGood=false;
|
||||
for (int n=0; n<e->curPat[k].effectCols; n++) {
|
||||
if (!checkCondition(l.effectMode[m],l.effect[m],l.effectMax[m],p->data[j][4+m*2])) continue;
|
||||
if (!checkCondition(l.effectValMode[m],l.effectVal[m],l.effectValMax[m],p->data[j][5+m*2])) continue;
|
||||
if (!checkCondition(l.effectMode[m],l.effect[m],l.effectMax[m],p->data[j][4+n*2])) continue;
|
||||
if (!checkCondition(l.effectValMode[m],l.effectVal[m],l.effectValMax[m],p->data[j][5+n*2])) continue;
|
||||
allGood=true;
|
||||
break;
|
||||
}
|
||||
if (!allGood) {
|
||||
notMatched=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 1: // lax
|
||||
break;
|
||||
case 2: // strict
|
||||
for (int m=0; m<l.effectCount; m++) {
|
||||
int effectMax=l.effectCount;
|
||||
if (effectMax>e->curPat[k].effectCols) {
|
||||
notMatched=true;
|
||||
} else {
|
||||
for (int m=0; m<effectMax; m++) {
|
||||
if (!checkCondition(l.effectMode[m],l.effect[m],l.effectMax[m],p->data[j][4+m*2])) {
|
||||
notMatched=true;
|
||||
break;
|
||||
|
@ -133,6 +143,7 @@ void FurnaceGUI::doFind() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
if (notMatched) continue;
|
||||
|
|
Loading…
Reference in a new issue