From 3e1f27b9325689b772b9261fc5b0bc817e30f414 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Sun, 16 Apr 2023 19:19:19 +0200 Subject: [PATCH] [Debloating] [th01] Particles: Move to a dedicated translation unit Part of P0239, funded by Ember2528. --- Makefile.mak | 2 +- th01/main/particle.cpp | 7 +++++++ th01/main_32.cpp | 1 - th01/particle.cpp | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 th01/particle.cpp diff --git a/Makefile.mak b/Makefile.mak index 8b135470..7ac1e7b8 100644 --- a/Makefile.mak +++ b/Makefile.mak @@ -80,7 +80,7 @@ bin\th01\zunsoft.com: th01\zunsoft.cpp {th01}.cpp{bin\th01}.obj: $(CC) $(CFLAGS_RELEASE) -ml -DGAME=1 -n$(@D) -c $** -bin\th01\debloat.exe: bin\platform\x86real\noexcept.obj bin\platform\x86real\spawn.obj bin\platform\x86real\pc98\blitter.obj bin\platform\x86real\pc98\font.obj bin\platform\x86real\pc98\grcg.obj bin\piloadc.obj bin\th01\th01.obj th01\entry.cpp th01\egc.cpp th01\frmdelay.cpp th01\game.cpp th01\graph.cpp th01\grp2xscs.cpp th01\grp_text.cpp th01\grp.cpp th01\initexit.cpp th01\mdrv2.cpp th01\pf.cpp th01\planar.cpp th01\scoredat.cpp th01\regist.cpp th01\resstuff.cpp th01\tram_x16.cpp th01\vsync.cpp th01\ztext.cpp th01\op_01.cpp th01\input.cpp th01\main_01.cpp th01\ptn.cpp th01\grz.cpp th01\main_09.cpp th01\bullet_l.cpp th01\grpinv32.cpp th01\scrollup.cpp th01\pgtrans.cpp th01\grph1to0.cpp th01\main_14.cpp th01\main_15.cpp th01\main_17.cpp th01\main_18.cpp th01\main_20.cpp th01\main_21.cpp th01\main_23.cpp th01\main_24.cpp th01\main_25.cpp th01\main_26.cpp th01\main_27.cpp th01\stages.cpp th01\main_28.cpp th01\main_29.cpp th01\main_30.cpp th01\main_31.cpp th01\main_32.cpp th01\main_33.cpp th01\main_34.cpp th01\main_35.cpp th01\main_36.cpp th01\main_37.cpp th01\main_38.cpp th01\fuuin_01.cpp th01\fuuin_03.cpp +bin\th01\debloat.exe: bin\platform\x86real\noexcept.obj bin\platform\x86real\spawn.obj bin\platform\x86real\pc98\blitter.obj bin\platform\x86real\pc98\font.obj bin\platform\x86real\pc98\grcg.obj bin\piloadc.obj bin\th01\th01.obj th01\entry.cpp th01\egc.cpp th01\frmdelay.cpp th01\game.cpp th01\graph.cpp th01\grp2xscs.cpp th01\grp_text.cpp th01\grp.cpp th01\initexit.cpp th01\mdrv2.cpp th01\pf.cpp th01\planar.cpp th01\scoredat.cpp th01\regist.cpp th01\resstuff.cpp th01\tram_x16.cpp th01\vsync.cpp th01\ztext.cpp th01\op_01.cpp th01\input.cpp th01\main_01.cpp th01\ptn.cpp th01\grz.cpp th01\main_09.cpp th01\bullet_l.cpp th01\grpinv32.cpp th01\scrollup.cpp th01\pgtrans.cpp th01\grph1to0.cpp th01\main_14.cpp th01\main_15.cpp th01\main_17.cpp th01\main_18.cpp th01\main_20.cpp th01\main_21.cpp th01\main_23.cpp th01\main_24.cpp th01\main_25.cpp th01\main_26.cpp th01\main_27.cpp th01\stages.cpp th01\main_28.cpp th01\main_29.cpp th01\main_30.cpp th01\main_31.cpp th01\main_32.cpp th01\particle.cpp th01\main_33.cpp th01\main_34.cpp th01\main_35.cpp th01\main_36.cpp th01\main_37.cpp th01\main_38.cpp th01\fuuin_01.cpp th01\fuuin_03.cpp $(CC) $(CFLAGS_RELEASE) $(LARGE_LFLAGS) -DGAME=1 -nbin\th01\ -eDEBLOAT.EXE @&&| $** | diff --git a/th01/main/particle.cpp b/th01/main/particle.cpp index 542acff3..22a74f58 100644 --- a/th01/main/particle.cpp +++ b/th01/main/particle.cpp @@ -1,3 +1,10 @@ +#include "platform.h" +#include "x86real.h" +#include "pc98.h" +#include "master.hpp" +#include "th01/math/overlap.hpp" +#include "th01/math/subpixel.hpp" +#include "th01/hardware/egc.h" #include "th01/main/particle.hpp" void particles_unput_update_render(particle_origin_t origin, int col) diff --git a/th01/main_32.cpp b/th01/main_32.cpp index 878d7809..114ef310 100644 --- a/th01/main_32.cpp +++ b/th01/main_32.cpp @@ -24,4 +24,3 @@ #include "th01/main/boss/boss.cpp" #include "th01/main/bullet/missile.cpp" #include "th01/main/player/bomb_d_f.cpp" -#include "th01/main/particle.cpp" diff --git a/th01/particle.cpp b/th01/particle.cpp new file mode 100644 index 00000000..22460504 --- /dev/null +++ b/th01/particle.cpp @@ -0,0 +1 @@ +#include "th01/main/particle.cpp"