@@ -367,7 +367,7 @@ pub(crate) fn parse_instructions(
367
367
loop {
368
368
let opcode: & u8 = FontParser :: read_data_with_cursor ( instructions, & mut cursor) ;
369
369
if operations. should_print ( ) {
370
- print ! ( "{cursor:04x}\t {opcode:02x}\t " ) ;
370
+ // print!("{cursor:04x}\t{opcode:02x}\t");
371
371
}
372
372
match opcode {
373
373
0x00 | 0x01 => {
@@ -379,7 +379,7 @@ pub(crate) fn parse_instructions(
379
379
} ;
380
380
381
381
if operations. should_print ( ) {
382
- println ! ( "Set freedom and projection vectors to {axis:?}" ) ;
382
+ // println!("Set freedom and projection vectors to {axis:?}");
383
383
}
384
384
if operations. should_execute ( ) {
385
385
graphics_state. projection_vector = axis;
@@ -391,7 +391,7 @@ pub(crate) fn parse_instructions(
391
391
let zone_number = graphics_state. pop ( ) ;
392
392
let zone = Zone :: from ( zone_number) ;
393
393
if operations. should_print ( ) {
394
- println ! ( "SZP0\t Zone pointer 0 = {zone:?}" ) ;
394
+ // println!("SZP0\tZone pointer 0 = {zone:?}");
395
395
}
396
396
if operations. should_execute ( ) {
397
397
graphics_state. zone_pointers [ 0 ] = zone;
@@ -406,7 +406,7 @@ pub(crate) fn parse_instructions(
406
406
true => "(taken)" ,
407
407
false => "(not taken)" ,
408
408
} ;
409
- println ! ( "ELSE {}" , take_else_str) ;
409
+ // println!("ELSE {}", take_else_str);
410
410
}
411
411
if operations. should_execute ( ) {
412
412
if !take_else {
@@ -425,11 +425,11 @@ pub(crate) fn parse_instructions(
425
425
0x23 => {
426
426
// Swap
427
427
if operations. should_print ( ) {
428
- println ! ( "SWAP\t top 2 stack elements" ) ;
428
+ // println!("SWAP\ttop 2 stack elements");
429
429
}
430
- println ! ( "Stack: " ) ;
430
+ // println!("Stack: ");
431
431
for x in graphics_state. interpreter_stack . iter ( ) . rev ( ) {
432
- println ! ( "\t \t \t {x:08x}" ) ;
432
+ // println!("\t\t\t{x:08x}");
433
433
}
434
434
if operations. should_execute ( ) {
435
435
let e2 = graphics_state. pop ( ) ;
@@ -443,7 +443,7 @@ pub(crate) fn parse_instructions(
443
443
// Function identifier number is popped from the stack
444
444
let function_identifier_number = graphics_state. pop ( ) ;
445
445
if operations. should_print ( ) {
446
- println ! ( "CALL #{function_identifier_number}" ) ;
446
+ // println!("CALL #{function_identifier_number}");
447
447
}
448
448
if operations. should_execute ( ) {
449
449
let function = & font. functions_table [ & ( function_identifier_number as _ ) ] ;
@@ -455,7 +455,7 @@ pub(crate) fn parse_instructions(
455
455
// Function identifier number is popped from the stack
456
456
let function_identifier_number = graphics_state. pop ( ) ;
457
457
if operations. should_print ( ) {
458
- println ! ( "Function define #{function_identifier_number}" ) ;
458
+ // println!("Function define #{function_identifier_number}");
459
459
}
460
460
if operations. should_execute ( ) {
461
461
//
@@ -464,16 +464,18 @@ pub(crate) fn parse_instructions(
464
464
0x2d => {
465
465
// ENDF
466
466
if operations. should_print ( ) {
467
- println ! ( "ENDF" ) ;
467
+ // println!("ENDF");
468
468
}
469
469
}
470
470
0x4b => {
471
471
// Measure pixels per em in the projection vector's axis
472
472
if operations. should_print ( ) {
473
+ /*
473
474
println!(
474
475
"MPPEM\tMeasure pixels per em in {:?}",
475
476
graphics_state.projection_vector
476
477
);
478
+ */
477
479
}
478
480
if operations. should_execute ( ) {
479
481
let val = match graphics_state. projection_vector {
@@ -489,7 +491,7 @@ pub(crate) fn parse_instructions(
489
491
let e1 = graphics_state. pop ( ) ;
490
492
let result = e1 < e2;
491
493
if operations. should_print ( ) {
492
- println ! ( "LT\t Less than? {e1} < {e2} = {result}" ) ;
494
+ // println!("LT\tLess than? {e1} < {e2} = {result}");
493
495
}
494
496
if operations. should_execute ( ) {
495
497
graphics_state. push ( if result { 1 } else { 0 } ) ;
@@ -506,7 +508,7 @@ pub(crate) fn parse_instructions(
506
508
last_if_condition_passed = Some ( condition_passed) ;
507
509
508
510
if operations. should_print ( ) {
509
- println ! ( "IF\t {condition_passed}" ) ;
511
+ // println!("IF\t{condition_passed}");
510
512
}
511
513
if operations. should_execute ( ) {
512
514
if !condition_passed {
@@ -526,14 +528,14 @@ pub(crate) fn parse_instructions(
526
528
0x59 => {
527
529
// Nothing to do
528
530
if operations. should_print ( ) {
529
- println ! ( "EIF" ) ;
531
+ // println!("EIF");
530
532
}
531
533
}
532
534
0x5c => {
533
535
// NOT
534
536
let val = graphics_state. pop ( ) ;
535
537
if operations. should_print ( ) {
536
- println ! ( "NOT {val:08x}" ) ;
538
+ // println!("NOT {val:08x}");
537
539
}
538
540
if operations. should_execute ( ) {
539
541
let result = if val != 0 { 0 } else { 1 } ;
@@ -554,15 +556,15 @@ pub(crate) fn parse_instructions(
554
556
let period = RoundStatePeriod :: from ( period_val as usize ) ;
555
557
556
558
if operations. should_print ( ) {
557
- println ! ( "SROUND\t period={period:?}, phase={phase:?}, threshold={threshold:?}" ) ;
559
+ // println!("SROUND\tperiod={period:?}, phase={phase:?}, threshold={threshold:?}");
558
560
}
559
561
if operations. should_execute ( ) {
560
562
graphics_state. round_state = RoundState :: new ( period, phase, threshold) ;
561
563
}
562
564
//
563
565
}
564
566
0x77 => {
565
- println ! ( "TODO: Super round @ 45 degrees" ) ;
567
+ // println!("TODO: Super round @ 45 degrees");
566
568
let val = graphics_state. pop ( ) ;
567
569
}
568
570
0x85 => {
@@ -572,7 +574,7 @@ pub(crate) fn parse_instructions(
572
574
let low = word & 0xff ;
573
575
let high = ( word >> 8 ) & 0xff ;
574
576
if operations. should_print ( ) {
575
- println ! ( "SCANCTRL {low:04x} : {high:04x}" ) ;
577
+ // println!("SCANCTRL {low:04x} : {high:04x}");
576
578
}
577
579
if operations. should_execute ( ) {
578
580
// TODO(PT): Which axis should this use?
@@ -588,7 +590,7 @@ pub(crate) fn parse_instructions(
588
590
// GETINFO
589
591
let selector = graphics_state. pop ( ) ;
590
592
if operations. should_print ( ) {
591
- println ! ( "GETINFO" ) ;
593
+ // println!("GETINFO");
592
594
}
593
595
let mut result = 0_u32 ;
594
596
if operations. should_execute ( ) {
@@ -609,7 +611,7 @@ pub(crate) fn parse_instructions(
609
611
// SCANTYPE
610
612
let word = graphics_state. pop ( ) ;
611
613
if operations. should_print ( ) {
612
- println ! ( "SCANTYPE {word:08x}" ) ;
614
+ // println!("SCANTYPE {word:08x}");
613
615
}
614
616
if operations. should_execute ( ) {
615
617
graphics_state. scan_control . dropout_control_mode =
@@ -625,11 +627,11 @@ pub(crate) fn parse_instructions(
625
627
number_of_bytes_to_push as usize ,
626
628
) ;
627
629
if operations. should_print ( ) {
628
- print ! ( "Push {number_of_bytes_to_push} bytes:" ) ;
630
+ // print!("Push {number_of_bytes_to_push} bytes:");
629
631
for byte in bytes_to_push. iter ( ) {
630
- print ! ( " {byte:02x}" ) ;
632
+ // print!(" {byte:02x}");
631
633
}
632
- println ! ( ) ;
634
+ // println!();
633
635
}
634
636
if operations. should_execute ( ) {
635
637
for byte in bytes_to_push. iter ( ) {
@@ -649,11 +651,11 @@ pub(crate) fn parse_instructions(
649
651
words_to_push. push ( word) ;
650
652
}
651
653
if operations. should_print ( ) {
652
- print ! ( "Push {number_of_words_to_push} words:" ) ;
654
+ // print!("Push {number_of_words_to_push} words:");
653
655
for word in words_to_push. iter ( ) {
654
- print ! ( " {word:02x}" ) ;
656
+ // print!(" {word:02x}");
655
657
}
656
- println ! ( ) ;
658
+ // println!();
657
659
}
658
660
if operations. should_execute ( ) {
659
661
for word in words_to_push. iter ( ) {
0 commit comments