ref: ec6eb8d56ba4cfceae443339607b0203152bd3d6
parent: ddd029d236d85d9701345feedf5a42caec40ab5d
author: cancel <cancel@cancel.fm>
date: Sat Dec 29 13:59:30 EST 2018
Cleanup
--- a/sim.c
+++ b/sim.c
@@ -702,7 +702,7 @@
PORT(0, -2, IN | HASTE); // y
PORT(0, -1, IN | HASTE); // len
// todo direct buffer manip
- for (I32 i = 0; i < len; ++i) {
+ for (Isz i = 0; i < len; ++i) {
PORT(in_y, in_x + i, IN);
PORT(1, out_x + i, OUT);
}
@@ -711,7 +711,7 @@
LEGACY_PHASE_GUARD;
oper_copy_columns(gbuffer, mbuffer, height, width, y, x, in_y, in_x, 1, out_x,
len, false);
- // for (I32 i = 0; i < len; ++i) {
+ // for (Isz i = 0; i < len; ++i) {
// Glyph g = PEEK(in_y, in_x + i);
// POKE(1, out_x + i, g);
// }
@@ -757,12 +757,9 @@
BEGIN_OPERATOR(track)
REALIZE_DUAL;
- Isz read_val_x = 1;
Usz len = index_of(PEEK(0, -1)) + 1;
Usz key = index_of(PEEK(0, -2));
- read_val_x = (Isz)(key % len) + 1;
- I32 ival[1];
- ival[0] = (I32)read_val_x;
+ Isz read_val_x = (Isz)(key % len) + 1;
for (Usz i = 0; i < len; ++i) {
LOCK(0, (Isz)(i + 1));
}
@@ -772,9 +769,8 @@
PORT(0, (Isz)read_val_x, IN);
PORT(1, 0, OUT);
END_PORTS
-
LEGACY_PHASE_GUARD;
- POKE(1, 0, PEEK(0, ival[0]));
+ POKE(1, 0, PEEK(0, read_val_x));
END_OPERATOR
static Isz const uturn_data[] = {