Change cur_row to actually mean current row
It used to really mean "next row", and resulted in showing the wrong row in the pattern view (row -1 instead of the last row). Fixes #14.
This commit is contained in:
parent
215f72c19d
commit
e347807abf
5 changed files with 12 additions and 12 deletions
|
|
@ -17,7 +17,7 @@ exports['test XM startup'] = function(assert) {
|
|||
assert.equal(XMPlayer.cur_songpos, 0, 'advance to initial song position');
|
||||
assert.equal(XMPlayer.cur_pat, 0, 'advance to pattern 0');
|
||||
assert.equal(XMPlayer.cur_tick, 0, 'advance to tick 0');
|
||||
assert.equal(XMPlayer.cur_row, 1, 'advance to row 1');
|
||||
assert.equal(XMPlayer.cur_row, 0, 'advance to row 0');
|
||||
};
|
||||
|
||||
exports['test non-existing song position'] = function(assert) {
|
||||
|
|
@ -33,7 +33,7 @@ exports['test non-existing song position'] = function(assert) {
|
|||
XMPlayer.nextTick();
|
||||
assert.equal(XMPlayer.cur_songpos, 0, 'advance to initial song position');
|
||||
assert.equal(XMPlayer.cur_pat, 0, 'advance to pattern 0');
|
||||
assert.equal(XMPlayer.cur_row, 1, 'advance to row 1');
|
||||
assert.equal(XMPlayer.cur_row, 0, 'advance to row 0');
|
||||
XMPlayer.nextTick();
|
||||
assert.equal(XMPlayer.cur_songpos, 1, 'advance to song position 1');
|
||||
assert.equal(XMPlayer.cur_pat, 1, 'advance to pattern 1');
|
||||
|
|
@ -92,7 +92,7 @@ exports['test non-existing song position with loop'] = function(assert) {
|
|||
XMPlayer.nextTick();
|
||||
assert.equal(XMPlayer.cur_songpos, 0, 'advance to initial song position');
|
||||
assert.equal(XMPlayer.cur_pat, 0, 'advance to pattern 0');
|
||||
assert.equal(XMPlayer.cur_row, 1, 'advance to row 1');
|
||||
assert.equal(XMPlayer.cur_row, 0, 'advance to row 0');
|
||||
XMPlayer.nextTick();
|
||||
assert.equal(XMPlayer.cur_songpos, 1, 'advance to song position 1');
|
||||
assert.equal(XMPlayer.cur_pat, 1, 'advance to pattern 1');
|
||||
|
|
@ -115,7 +115,7 @@ exports['test non-existing song position with invalid loop'] = function(assert)
|
|||
XMPlayer.nextTick();
|
||||
assert.equal(XMPlayer.cur_songpos, 0, 'advance to initial song position');
|
||||
assert.equal(XMPlayer.cur_pat, 0, 'advance to pattern 0');
|
||||
assert.equal(XMPlayer.cur_row, 1, 'advance to row 1');
|
||||
assert.equal(XMPlayer.cur_row, 0, 'advance to row 0');
|
||||
XMPlayer.nextTick();
|
||||
assert.equal(XMPlayer.cur_songpos, 1, 'advance to song position 1');
|
||||
assert.equal(XMPlayer.cur_pat, 1, 'advance to pattern 1');
|
||||
|
|
|
|||
|
|
@ -26,9 +26,9 @@ exports['test instrument trigger'] = function(assert) {
|
|||
XMPlayer.nextRow();
|
||||
ch.pan = 1; // forcibly override panning
|
||||
ch.off = 100; // and sample offset
|
||||
assert.equal(XMPlayer.cur_row, 1, 'row 1');
|
||||
assert.equal(XMPlayer.cur_row, 0, 'row 0');
|
||||
XMPlayer.nextRow();
|
||||
assert.equal(XMPlayer.cur_row, 2, 'row 2');
|
||||
assert.equal(XMPlayer.cur_row, 1, 'row 1');
|
||||
assert.equal(ch.note, 48, 'note same after inst trigger');
|
||||
assert.equal(ch.period, 1152, 'period same after inst trigger');
|
||||
assert.equal(ch.vol, 64, 'vol reset after inst trigger');
|
||||
|
|
|
|||
Loading…
Reference in a new issue