shithub: ft2-clone

Download patch

ref: 065a79216e2697245dc175423fe4a85f27106ede
parent: bb041094e2dfe402d11afa7007dac9c8e71a1775
author: Olav Sørensen <olav.sorensen@live.no>
date: Mon Jun 15 17:33:41 EDT 2020

Fix compile error for ARM CPUs

... also a minor y position fix again for the x/y envelope coord texts

--- a/src/ft2_inst_ed.c
+++ b/src/ft2_inst_ed.c
@@ -2032,7 +2032,7 @@
 			{
 #ifdef __arm__
 				if (srcPtr[x] != 0)
-					dstPtr[x] = pixVal;
+					dstPtr[x] = color;
 #else
 				// carefully written like this to generate conditional move instructions (font data is hard to predict)
 				tmp = dstPtr[x];
@@ -2072,7 +2072,7 @@
 
 	val = CLAMP(val, 0, 64);
 	sprintf(str, "%02d", val);
-	textOutTinyOutline(330, 199, str);
+	textOutTinyOutline(330, 198, str);
 }
 
 static void drawPanEnvCoords(int16_t tick, int16_t val)
@@ -2095,16 +2095,16 @@
 	if (negative) // draw minus sign
 	{
 		// outline
-		hLine(326, 288, 3, PAL_BCKGRND);
-		hLine(326, 290, 3, PAL_BCKGRND);
-		video.frameBuffer[(289 * SCREEN_W) + 325] = video.palette[PAL_BCKGRND];
-		video.frameBuffer[(289 * SCREEN_W) + 329] = video.palette[PAL_BCKGRND];
+		hLine(326, 287, 3, PAL_BCKGRND);
+		hLine(326, 289, 3, PAL_BCKGRND);
+		video.frameBuffer[(288 * SCREEN_W) + 325] = video.palette[PAL_BCKGRND];
+		video.frameBuffer[(288 * SCREEN_W) + 329] = video.palette[PAL_BCKGRND];
 
-		hLine(326, 289, 3, PAL_FORGRND);
+		hLine(326, 288, 3, PAL_FORGRND);
 	}
 	
 	sprintf(str, "%02d", val);
-	textOutTinyOutline(330, 286, str);
+	textOutTinyOutline(330, 285, str);
 }
 
 void handleInstEditorRedrawing(void)