|
@ -173,10 +173,10 @@ typedef struct { |
|
|
Oevent_list* oevent_list; |
|
|
Oevent_list* oevent_list; |
|
|
} Oper_phase1_extras; |
|
|
} Oper_phase1_extras; |
|
|
|
|
|
|
|
|
typedef Oper_phase1_extras Oper_phase0_extras; |
|
|
typedef Oper_phase1_extras oper_behavior_extras; |
|
|
|
|
|
|
|
|
static void oper_bank_store(Oper_phase0_extras* extra_params, Usz width, Usz y, |
|
|
static void oper_bank_store(oper_behavior_extras* extra_params, Usz width, |
|
|
Usz x, I32* restrict vals, Usz num_vals) { |
|
|
Usz y, Usz x, I32* restrict vals, Usz num_vals) { |
|
|
assert(num_vals > 0); |
|
|
assert(num_vals > 0); |
|
|
Usz index = y * width + x; |
|
|
Usz index = y * width + x; |
|
|
assert(index < ORCA_BANK_INDEX_MAX); |
|
|
assert(index < ORCA_BANK_INDEX_MAX); |
|
@ -264,10 +264,8 @@ Usz usz_clamp(Usz val, Usz min, Usz max) { |
|
|
#define OPER_PHASE_COMMON_ARGS \ |
|
|
#define OPER_PHASE_COMMON_ARGS \ |
|
|
Glyph *const restrict gbuffer, Mark *const restrict mbuffer, \ |
|
|
Glyph *const restrict gbuffer, Mark *const restrict mbuffer, \ |
|
|
Usz const height, Usz const width, Usz const y, Usz const x, \ |
|
|
Usz const height, Usz const width, Usz const y, Usz const x, \ |
|
|
Usz Tick_number |
|
|
Usz Tick_number, oper_behavior_extras *const extra_params, \ |
|
|
#define OPER_PHASE_0_COMMON_ARGS \ |
|
|
Mark const cell_flags, Glyph const This_oper_char |
|
|
OPER_PHASE_COMMON_ARGS, Oper_phase0_extras *const extra_params, \ |
|
|
|
|
|
Mark const cell_flags |
|
|
|
|
|
|
|
|
|
|
|
#define OPER_IGNORE_COMMON_ARGS() \ |
|
|
#define OPER_IGNORE_COMMON_ARGS() \ |
|
|
(void)gbuffer; \ |
|
|
(void)gbuffer; \ |
|
@ -277,22 +275,18 @@ Usz usz_clamp(Usz val, Usz min, Usz max) { |
|
|
(void)y; \ |
|
|
(void)y; \ |
|
|
(void)x; \ |
|
|
(void)x; \ |
|
|
(void)Tick_number; \ |
|
|
(void)Tick_number; \ |
|
|
(void)extra_params; |
|
|
(void)extra_params; \ |
|
|
|
|
|
(void)cell_flags; \ |
|
|
|
|
|
(void)This_oper_char; |
|
|
|
|
|
|
|
|
#define OPER_PHASE_SPEC ORCA_FORCE_NO_INLINE static |
|
|
#define OPER_PHASE_SPEC ORCA_FORCE_NO_INLINE static |
|
|
|
|
|
|
|
|
#define BEGIN_UNIQUE_OPERATOR(_oper_name) \ |
|
|
#define BEGIN_UNIQUE_OPERATOR(_oper_name) \ |
|
|
OPER_PHASE_SPEC void oper_phase0_##_oper_name(OPER_PHASE_0_COMMON_ARGS, \ |
|
|
OPER_PHASE_SPEC void oper_behavior_##_oper_name(OPER_PHASE_COMMON_ARGS) { \ |
|
|
Glyph const This_oper_char) { \ |
|
|
OPER_IGNORE_COMMON_ARGS() |
|
|
OPER_IGNORE_COMMON_ARGS() \ |
|
|
|
|
|
(void)cell_flags; \ |
|
|
|
|
|
(void)This_oper_char; |
|
|
|
|
|
#define BEGIN_OPERATOR(_oper_name) \ |
|
|
#define BEGIN_OPERATOR(_oper_name) \ |
|
|
OPER_PHASE_SPEC void oper_phase0_##_oper_name(OPER_PHASE_0_COMMON_ARGS, \ |
|
|
OPER_PHASE_SPEC void oper_behavior_##_oper_name(OPER_PHASE_COMMON_ARGS) { \ |
|
|
Glyph const This_oper_char) { \ |
|
|
|
|
|
OPER_IGNORE_COMMON_ARGS() \ |
|
|
OPER_IGNORE_COMMON_ARGS() \ |
|
|
(void)cell_flags; \ |
|
|
|
|
|
(void)This_oper_char; \ |
|
|
|
|
|
enum { Uppercase_oper_char = Orca_oper_upper_char_##_oper_name }; \ |
|
|
enum { Uppercase_oper_char = Orca_oper_upper_char_##_oper_name }; \ |
|
|
(void)Uppercase_oper_char; |
|
|
(void)Uppercase_oper_char; |
|
|
|
|
|
|
|
@ -1063,7 +1057,7 @@ END_OPERATOR |
|
|
|
|
|
|
|
|
#define SIM_EXPAND_SOLO_PHASE_0(_oper_char, _oper_name) \ |
|
|
#define SIM_EXPAND_SOLO_PHASE_0(_oper_char, _oper_name) \ |
|
|
case _oper_char: \ |
|
|
case _oper_char: \ |
|
|
oper_phase0_##_oper_name(gbuf, mbuf, height, width, iy, ix, tick_number, \ |
|
|
oper_behavior_##_oper_name(gbuf, mbuf, height, width, iy, ix, tick_number, \ |
|
|
&extras, cell_flags, glyph_char); \ |
|
|
&extras, cell_flags, glyph_char); \ |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
@ -1071,7 +1065,7 @@ END_OPERATOR |
|
|
_oper_name) \ |
|
|
_oper_name) \ |
|
|
case _upper_oper_char: \ |
|
|
case _upper_oper_char: \ |
|
|
case _lower_oper_char: \ |
|
|
case _lower_oper_char: \ |
|
|
oper_phase0_##_oper_name(gbuf, mbuf, height, width, iy, ix, tick_number, \ |
|
|
oper_behavior_##_oper_name(gbuf, mbuf, height, width, iy, ix, tick_number, \ |
|
|
&extras, cell_flags, glyph_char); \ |
|
|
&extras, cell_flags, glyph_char); \ |
|
|
break; |
|
|
break; |
|
|
|
|
|
|
|
|