ref: 7e7580c66c95ccd1a6d5ebf5968c05867189c769
parent: b6f69b19b3392d9c77eb5bcdbc0f49dd99eb46fb
author: cancel <cancel@cancel.fm>
date: Mon Dec 3 07:40:46 EST 2018
Cleanup
--- a/sim.c
+++ b/sim.c
@@ -106,14 +106,15 @@
return;
}
Glyph* at_dest = gbuf + (Usz)y0 * width + (Usz)x0;
- if (*at_dest != '.') {
+ if (*at_dest == '.') {
+ *at_dest = actual_char;
+ mbuffer_poke_flags_or(mbuf, height, width, (Usz)y0, (Usz)x0,
+ Mark_flag_sleep);
+ gbuf[y * width + x] = '.';
+ } else {
gbuf[y * width + x] = '*';
mbuffer_poke_flags_or(mbuf, height, width, y, x, Mark_flag_sleep);
- return;
}
- *at_dest = actual_char;
- mbuffer_poke_flags_or(mbuf, height, width, (Usz)y0, (Usz)x0, Mark_flag_sleep);
- gbuf[y * width + x] = '.';
}
typedef struct {