[Maintenance] Remove the intended type from the -Z -3 inhibition macro

Nobody cares about preserving perfect semantics across a macro whose
only job is to worsen code generation on one specific compiler. And
even aside from semantics, signedness would be the only difference that
types would make, and parameter passing couldn't care less about it.

Part of P0201, funded by Ember2528 and Yanga.
This commit is contained in:
nmlgc 2022-06-24 23:25:08 +02:00
parent f4785a2577
commit 54fe83513b
2 changed files with 4 additions and 6 deletions

View File

@ -160,12 +160,12 @@ inline void poked_eax(Decomp_GS *sgm, Decomp_DI *off, uint8_t op) {
// (Interestingly, using a template function inlines either too well or
// too badly. Only this macro guarantees the intended 16-bit PUSH to be
// consistently emitted.)
#define inhibit_Z3(type, x) \
*reinterpret_cast<type near *>(reinterpret_cast<uint16_t>(&x))
#define inhibit_Z3(x) \
*reinterpret_cast<int16_t near *>(reinterpret_cast<uint16_t>(&x))
#else
#define keep_0(x) x
#define inhibit_Z3(type, x) x
#define inhibit_Z3(x) x
#endif
// ------------------------------------

View File

@ -546,9 +546,7 @@ template <
((PLAYFIELD_LEFT + playfield_rand_x()) - target_l_x)
);
if(from_dir == X_LEFT) {
Pellets.add_single(
inhibit_Z3(screen_x_t, target_l_x), target_y, angle, speed
);
Pellets.add_single(inhibit_Z3(target_l_x), target_y, angle, speed);
} else {
Pellets.add_single(target_x(from_dir), target_y, angle, speed);
}