We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09d06eb commit 81f82f2Copy full SHA for 81f82f2
1 file changed
src/compiler/peephole.cc
@@ -506,6 +506,22 @@ class peephole
506
{
507
current = i;
508
509
+ // Remove extra PRINT COLOR
510
+ if(mtok(0, "TOK_NUM") && mword(1) && mtok(2, "TOK_BYTE_POKE") &&
511
+ mcbyte(3, "PRINT_COLOR"))
512
+ {
513
+ // Remove if we are setting the same color as already set:
514
+ if(val(1) == print_color)
515
516
+ del(3);
517
+ del(2);
518
+ del(1);
519
+ del(0);
520
+ i--;
521
+ continue;
522
+ }
523
524
+
525
// Track current print color
526
if(mtok(2, "TOK_BYTE_POKE") && mcbyte(3, "PRINT_COLOR"))
527
0 commit comments