effectRows -> effectCols

i don't know why did I call it "rows"
This commit is contained in:
tildearrow 2022-04-27 17:53:55 -05:00
parent 9eaf600b4b
commit 3306e853d1
10 changed files with 64 additions and 64 deletions

View file

@ -140,7 +140,7 @@ void DivEngine::walkSong(int& loopOrder, int& loopRow, int& loopEnd) {
for (int j=nextRow; j<song.patLen; j++) {
nextRow=0;
for (int k=0; k<chans; k++) {
for (int l=0; l<song.pat[k].effectRows; l++) {
for (int l=0; l<song.pat[k].effectCols; l++) {
effectVal=pat[k]->data[j][5+(l<<1)];
if (effectVal<0) effectVal=0;
if (pat[k]->data[j][4+(l<<1)]==0x0d) {

View file

@ -637,14 +637,14 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
for (int i=0; i<getChannelCount(ds.system[0]); i++) {
DivChannelData& chan=ds.pat[i];
if (ds.version<0x0a) {
chan.effectRows=1;
chan.effectCols=1;
} else {
chan.effectRows=reader.readC();
chan.effectCols=reader.readC();
}
logD("%d fx rows: %d",i,chan.effectRows);
if (chan.effectRows>4 || chan.effectRows<1) {
logE("invalid effect row count %d. are you sure everything is ok?",chan.effectRows);
lastError="file is corrupt or unreadable at effect rows";
logD("%d fx rows: %d",i,chan.effectCols);
if (chan.effectCols>4 || chan.effectCols<1) {
logE("invalid effect column count %d. are you sure everything is ok?",chan.effectCols);
lastError="file is corrupt or unreadable at effect columns";
delete[] file;
return false;
}
@ -694,7 +694,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
pat->data[k][3]=(pat->data[k][3]&3)*5;
}
}
for (int l=0; l<chan.effectRows; l++) {
for (int l=0; l<chan.effectCols; l++) {
// effect
pat->data[k][4+(l<<1)]=reader.readS();
pat->data[k][5+(l<<1)]=reader.readS();
@ -1291,10 +1291,10 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
}
for (int i=0; i<tchans; i++) {
ds.pat[i].effectRows=reader.readC();
if (ds.pat[i].effectRows<1 || ds.pat[i].effectRows>8) {
logE("channel %d has zero or too many effect columns! (%d)",i,ds.pat[i].effectRows);
lastError=fmt::sprintf("channel %d has too many effect columns! (%d)",i,ds.pat[i].effectRows);
ds.pat[i].effectCols=reader.readC();
if (ds.pat[i].effectCols<1 || ds.pat[i].effectCols>8) {
logE("channel %d has zero or too many effect columns! (%d)",i,ds.pat[i].effectCols);
lastError=fmt::sprintf("channel %d has too many effect columns! (%d)",i,ds.pat[i].effectCols);
delete[] file;
return false;
}
@ -1565,7 +1565,7 @@ bool DivEngine::loadFur(unsigned char* file, size_t len) {
pat->data[j][1]=reader.readS();
pat->data[j][2]=reader.readS();
pat->data[j][3]=reader.readS();
for (int k=0; k<ds.pat[chan].effectRows; k++) {
for (int k=0; k<ds.pat[chan].effectCols; k++) {
pat->data[j][4+(k<<1)]=reader.readS();
pat->data[j][5+(k<<1)]=reader.readS();
}
@ -1960,7 +1960,7 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
}
}
}
ds.pat[ch].effectRows=fxCols;
ds.pat[ch].effectCols=fxCols;
}
ds.pal=false;
@ -1977,7 +1977,7 @@ bool DivEngine::loadMod(unsigned char* file, size_t len) {
ds.chanShortName[i]=fmt::sprintf("C%d",i+1);
}
for(int i=chCount; i<ds.systemLen*4; i++) {
ds.pat[i].effectRows=1;
ds.pat[i].effectCols=1;
ds.chanShow[i]=false;
}
@ -2281,7 +2281,7 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
}
for (int i=0; i<chans; i++) {
w->writeC(song.pat[i].effectRows);
w->writeC(song.pat[i].effectCols);
}
for (int i=0; i<chans; i++) {
@ -2371,7 +2371,7 @@ SafeWriter* DivEngine::saveFur(bool notPrimary) {
w->writeS(pat->data[j][1]); // octave
w->writeS(pat->data[j][2]); // instrument
w->writeS(pat->data[j][3]); // volume
w->write(&pat->data[j][4],2*song.pat[i>>16].effectRows*2); // effects
w->write(&pat->data[j][4],2*song.pat[i>>16].effectCols*2); // effects
}
w->writeString(pat->name,false);
@ -2717,7 +2717,7 @@ SafeWriter* DivEngine::saveDMF(unsigned char version) {
}
for (int i=0; i<getChannelCount(sys); i++) {
w->writeC(song.pat[i].effectRows);
w->writeC(song.pat[i].effectCols);
for (int j=0; j<song.ordersLen; j++) {
DivPattern* pat=song.pat[i].getPattern(song.orders.ord[i][j],false);
@ -2725,7 +2725,7 @@ SafeWriter* DivEngine::saveDMF(unsigned char version) {
w->writeS(pat->data[k][0]); // note
w->writeS(pat->data[k][1]); // octave
w->writeS(pat->data[k][3]); // volume
w->write(&pat->data[k][4],2*song.pat[i].effectRows*2); // effects
w->write(&pat->data[k][4],2*song.pat[i].effectCols*2); // effects
w->writeS(pat->data[k][2]); // instrument
}
}

View file

@ -130,6 +130,6 @@ SafeReader* DivPattern::compile(int len, int fxRows) {
}
DivChannelData::DivChannelData():
effectRows(1) {
effectCols(1) {
memset(data,0,256*sizeof(void*));
}

View file

@ -40,7 +40,7 @@ struct DivPattern {
};
struct DivChannelData {
unsigned char effectRows;
unsigned char effectCols;
// data goes as follows: data[ROW][TYPE]
// TYPE is:
// 0: note

View file

@ -910,7 +910,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
int whatRow=afterDelay?chan[i].delayRow:curRow;
DivPattern* pat=song.pat[i].getPattern(song.orders.ord[i][whatOrder],false);
// pre effects
if (!afterDelay) for (int j=0; j<song.pat[i].effectRows; j++) {
if (!afterDelay) for (int j=0; j<song.pat[i].effectCols; j++) {
short effect=pat->data[whatRow][4+(j<<1)];
short effectVal=pat->data[whatRow][5+(j<<1)];
@ -1019,7 +1019,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
bool calledPorta=false;
// effects
for (int j=0; j<song.pat[i].effectRows; j++) {
for (int j=0; j<song.pat[i].effectCols; j++) {
short effect=pat->data[whatRow][4+(j<<1)];
short effectVal=pat->data[whatRow][5+(j<<1)];
@ -1338,7 +1338,7 @@ void DivEngine::processRow(int i, bool afterDelay) {
chan[i].noteOnInhibit=false;
// post effects
for (int j=0; j<song.pat[i].effectRows; j++) {
for (int j=0; j<song.pat[i].effectCols; j++) {
short effect=pat->data[whatRow][4+(j<<1)];
short effectVal=pat->data[whatRow][5+(j<<1)];
@ -1375,7 +1375,7 @@ void DivEngine::nextRow() {
snprintf(pb2,4095,"\x1b[0;36m%.2x",pat->data[curRow][2]);
strcat(pb3,pb2);
}
for (int j=0; j<song.pat[i].effectRows; j++) {
for (int j=0; j<song.pat[i].effectCols; j++) {
if (pat->data[curRow][4+(j<<1)]==-1) {
strcat(pb3,"\x1b[m--");
} else {
@ -1449,7 +1449,7 @@ void DivEngine::nextRow() {
if (song.oneTickCut) {
bool doPrepareCut=true;
for (int j=0; j<song.pat[i].effectRows; j++) {
for (int j=0; j<song.pat[i].effectCols; j++) {
if (pat->data[curRow][4+(j<<1)]==0x03) {
doPrepareCut=false;
break;

View file

@ -87,7 +87,7 @@ void FurnaceGUI::finishSelection() {
selStart.xFine=0;
}
if (e->song.chanCollapse[selEnd.xCoarse]) {
selEnd.xFine=2+e->song.pat[cursor.xCoarse].effectRows*2;
selEnd.xFine=2+e->song.pat[cursor.xCoarse].effectCols*2;
}
e->setMidiBaseChan(cursor.xCoarse);
@ -105,7 +105,7 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
demandScrollX=true;
if (x>0) {
for (int i=0; i<x; i++) {
if (++cursor.xFine>=(e->song.chanCollapse[cursor.xCoarse]?1:(3+e->song.pat[cursor.xCoarse].effectRows*2))) {
if (++cursor.xFine>=(e->song.chanCollapse[cursor.xCoarse]?1:(3+e->song.pat[cursor.xCoarse].effectCols*2))) {
cursor.xFine=0;
if (++cursor.xCoarse>=lastChannel) {
if (settings.wrapHorizontal!=0 && !select) {
@ -113,7 +113,7 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
if (settings.wrapHorizontal==2) y++;
} else {
cursor.xCoarse=lastChannel-1;
cursor.xFine=e->song.chanCollapse[cursor.xCoarse]?0:(2+e->song.pat[cursor.xCoarse].effectRows*2);
cursor.xFine=e->song.chanCollapse[cursor.xCoarse]?0:(2+e->song.pat[cursor.xCoarse].effectCols*2);
}
} else {
while (!e->song.chanShow[cursor.xCoarse]) {
@ -129,7 +129,7 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
if (--cursor.xCoarse<firstChannel) {
if (settings.wrapHorizontal!=0 && !select) {
cursor.xCoarse=lastChannel-1;
cursor.xFine=2+e->song.pat[cursor.xCoarse].effectRows*2;
cursor.xFine=2+e->song.pat[cursor.xCoarse].effectCols*2;
if (settings.wrapHorizontal==2) y--;
} else {
cursor.xCoarse=firstChannel;
@ -143,7 +143,7 @@ void FurnaceGUI::moveCursor(int x, int y, bool select) {
if (e->song.chanCollapse[cursor.xCoarse]) {
cursor.xFine=0;
} else {
cursor.xFine=2+e->song.pat[cursor.xCoarse].effectRows*2;
cursor.xFine=2+e->song.pat[cursor.xCoarse].effectCols*2;
}
}
}
@ -271,7 +271,7 @@ void FurnaceGUI::moveCursorBottom(bool select) {
DETERMINE_LAST;
cursor.xCoarse=lastChannel-1;
if (cursor.xCoarse<0) cursor.xCoarse=0;
cursor.xFine=2+e->song.pat[cursor.xCoarse].effectRows*2;
cursor.xFine=2+e->song.pat[cursor.xCoarse].effectCols*2;
demandScrollX=true;
} else {
cursor.y=e->song.patLen-1;

View file

@ -462,13 +462,13 @@ void FurnaceGUI::doAction(int what) {
break;
case GUI_ACTION_PAT_INCREASE_COLUMNS:
if (cursor.xCoarse<0 || cursor.xCoarse>=e->getTotalChannelCount()) break;
e->song.pat[cursor.xCoarse].effectRows++;
if (e->song.pat[cursor.xCoarse].effectRows>8) e->song.pat[cursor.xCoarse].effectRows=8;
e->song.pat[cursor.xCoarse].effectCols++;
if (e->song.pat[cursor.xCoarse].effectCols>8) e->song.pat[cursor.xCoarse].effectCols=8;
break;
case GUI_ACTION_PAT_DECREASE_COLUMNS:
if (cursor.xCoarse<0 || cursor.xCoarse>=e->getTotalChannelCount()) break;
e->song.pat[cursor.xCoarse].effectRows--;
if (e->song.pat[cursor.xCoarse].effectRows<1) e->song.pat[cursor.xCoarse].effectRows=1;
e->song.pat[cursor.xCoarse].effectCols--;
if (e->song.pat[cursor.xCoarse].effectCols<1) e->song.pat[cursor.xCoarse].effectCols=1;
break;
case GUI_ACTION_PAT_INTERPOLATE:
doInterpolate();

View file

@ -137,12 +137,12 @@ void FurnaceGUI::makeUndo(ActionType action) {
void FurnaceGUI::doSelectAll() {
finishSelection();
curNibble=false;
if (selStart.xFine==0 && selEnd.xFine==2+e->song.pat[selEnd.xCoarse].effectRows*2) {
if (selStart.xFine==0 && selEnd.xFine==2+e->song.pat[selEnd.xCoarse].effectCols*2) {
if (selStart.y==0 && selEnd.y==e->song.patLen-1) { // select entire pattern
selStart.xCoarse=0;
selStart.xFine=0;
selEnd.xCoarse=e->getTotalChannelCount()-1;
selEnd.xFine=2+e->song.pat[selEnd.xCoarse].effectRows*2;
selEnd.xFine=2+e->song.pat[selEnd.xCoarse].effectCols*2;
} else { // select entire column
selStart.y=0;
selEnd.y=e->song.patLen-1;
@ -153,14 +153,14 @@ void FurnaceGUI::doSelectAll() {
// find row position
for (SelectionPoint i; i.xCoarse!=selStart.xCoarse || i.xFine!=selStart.xFine; selStartX++) {
i.xFine++;
if (i.xFine>=3+e->song.pat[i.xCoarse].effectRows*2) {
if (i.xFine>=3+e->song.pat[i.xCoarse].effectCols*2) {
i.xFine=0;
i.xCoarse++;
}
}
for (SelectionPoint i; i.xCoarse!=selEnd.xCoarse || i.xFine!=selEnd.xFine; selEndX++) {
i.xFine++;
if (i.xFine>=3+e->song.pat[i.xCoarse].effectRows*2) {
if (i.xFine>=3+e->song.pat[i.xCoarse].effectCols*2) {
i.xFine=0;
i.xCoarse++;
}
@ -172,7 +172,7 @@ void FurnaceGUI::doSelectAll() {
selEnd.y=e->song.patLen-1;
} else { // left-right
selStart.xFine=0;
selEnd.xFine=2+e->song.pat[selEnd.xCoarse].effectRows*2;
selEnd.xFine=2+e->song.pat[selEnd.xCoarse].effectCols*2;
}
}
}
@ -200,7 +200,7 @@ void FurnaceGUI::doDelete() {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskDelete,iFine);
for (int j=selStart.y; j<=selEnd.y; j++) {
if (iFine==0) {
@ -237,7 +237,7 @@ void FurnaceGUI::doPullDelete() {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskPullDelete,iFine);
for (int j=selStart.y; j<e->song.patLen; j++) {
if (j<e->song.patLen-1) {
@ -269,7 +269,7 @@ void FurnaceGUI::doInsert() {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskInsert,iFine);
for (int j=e->song.patLen-1; j>=selStart.y; j--) {
if (j==selStart.y) {
@ -301,7 +301,7 @@ void FurnaceGUI::doTranspose(int amount, OperationMask& mask) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(mask,iFine);
for (int j=selStart.y; j<=selEnd.y; j++) {
if (iFine==0) {
@ -369,7 +369,7 @@ void FurnaceGUI::doCopy(bool cut) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
if (iFine==0) {
clipboard+=noteNameNormal(pat->data[j][0],pat->data[j][1]);
if (cut) {
@ -530,7 +530,7 @@ void FurnaceGUI::doPaste(PasteMode mode) {
break;
}
if (mode!=GUI_PASTE_MODE_MIX_BG || pat->data[j][iFine+1]==-1) {
if (iFine<(3+e->song.pat[iCoarse].effectRows*2)) pat->data[j][iFine+1]=val;
if (iFine<(3+e->song.pat[iCoarse].effectCols*2)) pat->data[j][iFine+1]=val;
}
}
}
@ -589,7 +589,7 @@ void FurnaceGUI::doInterpolate() {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskInterpolate,iFine);
points.clear();
if (iFine!=0) {
@ -648,7 +648,7 @@ void FurnaceGUI::doFade(int p0, int p1, bool mode) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskFade,iFine);
if (iFine!=0) {
int absoluteTop=255;
@ -686,7 +686,7 @@ void FurnaceGUI::doInvertValues() {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskInvertVal,iFine);
if (iFine!=0) {
int top=255;
@ -717,7 +717,7 @@ void FurnaceGUI::doScale(float top) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskScale,iFine);
if (iFine!=0) {
int absoluteTop=255;
@ -748,7 +748,7 @@ void FurnaceGUI::doRandomize(int bottom, int top, bool mode) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskRandomize,iFine);
if (iFine!=0) {
int absoluteTop=255;
@ -794,7 +794,7 @@ void FurnaceGUI::doFlip() {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskFlip,iFine);
for (int j=selStart.y; j<=selEnd.y; j++) {
if (iFine==0) {
@ -825,7 +825,7 @@ void FurnaceGUI::doCollapse(int divider) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskCollapseExpand,iFine);
for (int j=selStart.y; j<=selEnd.y; j++) {
if (iFine==0) {
@ -882,7 +882,7 @@ void FurnaceGUI::doExpand(int multiplier) {
for (; iCoarse<=selEnd.xCoarse; iCoarse++) {
if (!e->song.chanShow[iCoarse]) continue;
DivPattern* pat=e->song.pat[iCoarse].getPattern(e->song.orders.ord[iCoarse][curOrder],true);
for (; iFine<3+e->song.pat[iCoarse].effectRows*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
for (; iFine<3+e->song.pat[iCoarse].effectCols*2 && (iCoarse<selEnd.xCoarse || iFine<=selEnd.xFine); iFine++) {
maskOut(opMaskCollapseExpand,iFine);
for (int j=selStart.y; j<=selEnd.y; j++) {
if (iFine==0) {

View file

@ -1003,7 +1003,7 @@ void FurnaceGUI::valueInput(int num, bool direct, int target) {
editAdvance();
} else {
if (settings.effectCursorDir==2) {
if (++cursor.xFine>=(3+(e->song.pat[cursor.xCoarse].effectRows*2))) {
if (++cursor.xFine>=(3+(e->song.pat[cursor.xCoarse].effectCols*2))) {
cursor.xFine=3;
}
} else {

View file

@ -217,7 +217,7 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
ImGui::PopStyleColor();
// effects
for (int k=0; k<e->song.pat[j].effectRows; k++) {
for (int k=0; k<e->song.pat[j].effectCols; k++) {
int index=4+(k<<1);
bool selectedEffect=selectedRow && (j32+index-1>=sel1XSum && j32+index-1<=sel2XSum);
bool selectedEffectVal=selectedRow && (j32+index>=sel1XSum && j32+index<=sel2XSum);
@ -427,7 +427,7 @@ void FurnaceGUI::drawPattern() {
displayTooltip=true;
} else {
const char* chName=e->getChannelName(i);
size_t chNameLimit=6+4*e->song.pat[i].effectRows;
size_t chNameLimit=6+4*e->song.pat[i].effectCols;
if (strlen(chName)>chNameLimit) {
String shortChName=chName;
shortChName.resize(chNameLimit-3);
@ -524,18 +524,18 @@ void FurnaceGUI::drawPattern() {
if (!e->song.chanCollapse[i]) {
ImGui::SameLine();
snprintf(chanID,2048,"<##_LCH%d",i);
ImGui::BeginDisabled(e->song.pat[i].effectRows<=1);
ImGui::BeginDisabled(e->song.pat[i].effectCols<=1);
if (ImGui::SmallButton(chanID)) {
e->song.pat[i].effectRows--;
if (e->song.pat[i].effectRows<1) e->song.pat[i].effectRows=1;
e->song.pat[i].effectCols--;
if (e->song.pat[i].effectCols<1) e->song.pat[i].effectCols=1;
}
ImGui::EndDisabled();
ImGui::SameLine();
ImGui::BeginDisabled(e->song.pat[i].effectRows>=8);
ImGui::BeginDisabled(e->song.pat[i].effectCols>=8);
snprintf(chanID,2048,">##_RCH%d",i);
if (ImGui::SmallButton(chanID)) {
e->song.pat[i].effectRows++;
if (e->song.pat[i].effectRows>8) e->song.pat[i].effectRows=8;
e->song.pat[i].effectCols++;
if (e->song.pat[i].effectCols>8) e->song.pat[i].effectCols=8;
}
ImGui::EndDisabled();
}