From 54fe83513ba922750ee8ae88b5b78ee53a08ee84 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Fri, 24 Jun 2022 23:25:08 +0200 Subject: [PATCH] [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. --- decomp.hpp | 6 +++--- th01/main/boss/b20m.cpp | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/decomp.hpp b/decomp.hpp index 64847ebb..fb0165e3 100644 --- a/decomp.hpp +++ b/decomp.hpp @@ -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(reinterpret_cast(&x)) + #define inhibit_Z3(x) \ + *reinterpret_cast(reinterpret_cast(&x)) #else #define keep_0(x) x - #define inhibit_Z3(type, x) x + #define inhibit_Z3(x) x #endif // ------------------------------------ diff --git a/th01/main/boss/b20m.cpp b/th01/main/boss/b20m.cpp index b90a0eac..88ddda87 100644 --- a/th01/main/boss/b20m.cpp +++ b/th01/main/boss/b20m.cpp @@ -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); }