shithub: pt2-clone

Download patch

ref: c5819c6992037e30f3babd22b2564ab7905161b7
parent: d18178cfb5744c5a2285209ec5542d786c3eec56
author: Olav Sørensen <[email protected]>
date: Sun May 22 10:25:46 EDT 2022

Fixed Bxx effect bug in play/record pattern mode

--- a/src/pt2_header.h
+++ b/src/pt2_header.h
@@ -14,7 +14,7 @@
 #include "pt2_unicode.h"
 #include "pt2_palette.h"
 
-#define PROG_VER_STR "1.48"
+#define PROG_VER_STR "1.49"
 
 #ifdef _WIN32
 #define DIR_DELIMITER '\\'
--- a/src/pt2_replayer.c
+++ b/src/pt2_replayer.c
@@ -334,7 +334,10 @@
 
 static void positionJump(moduleChannel_t *ch)
 {
-	modOrder = (ch->n_cmd & 0xFF) - 1; // B00 results in -1, but it safely jumps to order 0
+	// original PT doesn't do this check, but we have to
+	if (editor.playMode != PLAY_MODE_PATTERN || (editor.currMode == MODE_RECORD && editor.recordMode != RECORD_PATT))
+		modOrder = (ch->n_cmd & 0xFF) - 1; // B00 results in -1, but it safely jumps to order 0
+
 	pBreakPosition = 0;
 	posJumpAssert = true;
 }