Browse Source

Cleanup

master
cancel 6 years ago
parent
commit
1d4937d2bd
  1. 16
      sim.c

16
sim.c

@ -71,7 +71,7 @@ static Glyph glyphs_mod(Glyph a, Glyph b) {
return indexed_glyphs[ib == 0 ? 0 : (ia % ib)]; return indexed_glyphs[ib == 0 ? 0 : (ia % ib)];
} }
ORCA_PURE ORCA_FORCE_NO_INLINE static bool ORCA_PURE static bool
oper_has_neighboring_bang(Glyph const* gbuf, Usz h, Usz w, Usz y, Usz x) { oper_has_neighboring_bang(Glyph const* gbuf, Usz h, Usz w, Usz y, Usz x) {
Glyph const* gp = gbuf + w * y + x; Glyph const* gp = gbuf + w * y + x;
if (x < w - 1 && gp[1] == '*') if (x < w - 1 && gp[1] == '*')
@ -193,16 +193,16 @@ Usz usz_clamp(Usz val, Usz min, Usz max) {
Glyph const This_oper_char) { \ Glyph const This_oper_char) { \
OPER_IGNORE_COMMON_ARGS() \ OPER_IGNORE_COMMON_ARGS() \
(void)cell_flags; \ (void)cell_flags; \
bool const Dual_is_uppercase = \ (void)This_oper_char; \
Orca_oper_upper_char_##_oper_name == This_oper_char; \ enum { Uppercase_oper_char = Orca_oper_upper_char_##_oper_name }; \
(void)Dual_is_uppercase; (void)Uppercase_oper_char;
#define BEGIN_DUAL_PHASE_1(_oper_name) \ #define BEGIN_DUAL_PHASE_1(_oper_name) \
OPER_PHASE_SPEC void oper_phase1_##_oper_name(OPER_PHASE_1_COMMON_ARGS, \ OPER_PHASE_SPEC void oper_phase1_##_oper_name(OPER_PHASE_1_COMMON_ARGS, \
Glyph const This_oper_char) { \ Glyph const This_oper_char) { \
OPER_IGNORE_COMMON_ARGS() \ OPER_IGNORE_COMMON_ARGS() \
bool const Dual_is_uppercase = \ (void)This_oper_char; \
Orca_oper_upper_char_##_oper_name == This_oper_char; \ enum { Uppercase_oper_char = Orca_oper_upper_char_##_oper_name }; \
(void)Dual_is_uppercase; (void)Uppercase_oper_char;
#define END_PHASE } #define END_PHASE }
@ -233,7 +233,7 @@ Usz usz_clamp(Usz val, Usz min, Usz max) {
#define REALIZE_DUAL \ #define REALIZE_DUAL \
bool const Dual_is_active = \ bool const Dual_is_active = \
Dual_is_uppercase || \ (Uppercase_oper_char == This_oper_char) || \
oper_has_neighboring_bang(gbuffer, height, width, y, x); oper_has_neighboring_bang(gbuffer, height, width, y, x);
#define PSEUDO_DUAL bool const Dual_is_active = true #define PSEUDO_DUAL bool const Dual_is_active = true

Loading…
Cancel
Save