ReC98/th04
nmlgc c90c7d52c4 [Decompilation] [th04] Stage 4 Marisa: Point-reflected movement
This is the function that causes Marisa's `Divide Error` crash when
called during a 4-frame window during the end of certain patterns.
Just like with Kurumi's division by zero, it's just as undefined here
what should happen instead, and any possible fix can only ever be a
fan-fiction interpretation of the code. And since the community will
have an easier time understanding and debating a C++-level hack instead
of an ASM-level one, it makes sense to first decompile this function…

…and document it, which is actually much harder!

Part of P0189, funded by Arandui and Lmocinemod.
2022-04-17 00:00:35 +02:00
..
end [Maintenance] Add a 1bpp rectangle template, for custom per-row types 2021-04-21 18:01:57 +02:00
formats [Maintenance] Remove `extern "C"` from `x86real.h` and `decomp.hpp` 2022-04-16 23:53:46 +02:00
gaiji [Decompilation] [th04/th05] Text overlay: Stage transitions 2022-03-27 00:39:00 +01:00
hardware [Naming] [th04/th05] Boss-specific names for backdrop colorfill functions 2022-04-16 23:53:46 +02:00
hiscore [Position independence] [th04/th05] Remaining references to the name alphabet 2020-09-12 11:29:35 +02:00
main [Decompilation] [th04] Stage 4 Marisa: Point-reflected movement 2022-04-17 00:00:35 +02:00
math [Maintenance] Turn motion_t into a template 2021-07-31 09:33:50 +02:00
op [Maintenance] Move the contents of `music/` subdirectories under `op/` 2022-03-25 14:10:59 +01:00
shiftjis [Decompilation] [th04/th05] Bosses: Defeat sequence 2022-03-27 01:35:37 +01:00
snd [Maintenance] Remove `extern "C"` from `x86real.h` and `decomp.hpp` 2022-04-16 23:53:46 +02:00
sprites [Decompilation] [th04/th05] Bosses: Defeat sequence 2022-03-27 01:35:37 +01:00
bgimage.cpp [Decompilation] [th04/th05] bgimage_snap(), bgimage_put(), bgimage_free() 2021-03-20 02:36:36 +01:00
bgimager.asm [Separate translation units] [th04/th05] bgimage_put_rect() (undecompilable) 2021-03-19 23:19:48 +01:00
boss.cpp [Decompilation] [th04/th05] Bosses: Defeat sequence 2022-03-27 01:35:37 +01:00
boss_4m.cpp [Decompilation] [th04] Stage 4 Marisa: Point-reflected movement 2022-04-17 00:00:35 +02:00
boss_4r.cpp [Reverse-engineering] [th04] Stage 4 Reimu: Data segment variables 2022-03-27 00:48:06 +01:00
boss_x2.cpp [Reverse-engineering] [th04] Gengetsu: Wave teleport amplitude 2022-03-27 00:43:03 +01:00
bullet_a.cpp [Maintenance] [th04/th05] Bullets: Move clear/zap declarations to new header 2022-03-27 01:29:03 +01:00
bullet_u.cpp [Maintenance] [th04/th05] Move bullet code into dedicated segments 2022-03-05 15:31:50 +01:00
cdg_load.asm [Separate translation units] [th04/th05] .CDG: Loading and freeing 2020-11-16 20:01:35 +01:00
cdg_p_na.cpp [Decompilation] [th04/th05] cdg_put_noalpha_8() 2021-03-20 02:36:40 +01:00
cdg_p_nc.asm [Separate translation units] [th04] cdg_put_nocolors_8() (undecompilable) 2021-05-11 18:47:58 +02:00
cdg_p_pl.asm [Separate translation units] [th04] cdg_put_plane() (undecompilable) 2021-05-11 18:48:00 +02:00
cdg_p_pr.asm [Separate translation units] [th04] cdg_put_plane_roll_8() (undecompilable) 2021-03-20 02:36:39 +01:00
cdg_put.asm [Translation unit catch-up] [th04] cdg_put_8() 2021-04-21 16:24:18 +02:00
cfg_lres.cpp [Decompilation] [th03/th04/th05] cfg_load_resident_ptr() 2021-07-21 00:34:59 +02:00
chars.inc [Maintenance] Move all features exclusive to MAIN.EXE to a main/ subdirectory 2020-04-15 20:58:01 +02:00
common.h [Maintenance] [th03/th04/th05] Start a new "essential macros" file 2020-02-23 16:56:15 +01:00
dialog.cpp [Decompilation] [th04] EMS / Dialog: Loading the remaining images 2021-11-29 02:01:10 +01:00
egcrect.cpp [Decompilation] [th04/th05] EGC-powered page 1→0 rectangle blitting 2020-11-16 20:01:09 +01:00
ems.cpp [Decompilation] [th04/th05] EMS: Allocation + Preloading the eyecatch image 2021-11-29 01:53:43 +01:00
exit.c [Maintenance] Prefer the -zC and -zP options over `#pragma codeseg` 2021-04-03 20:12:09 +02:00
f_dialog.cpp [Decompilation] [th04/th05] Dialog: Script loading functions 2022-03-27 00:39:04 +01:00
frmdely2.c [Maintenance] Prefer the -zC and -zP options over `#pragma codeseg` 2021-04-03 20:12:09 +02:00
gather.cpp [Decompilation] [th04/th05] Gather circle rendering 2021-07-21 00:35:02 +02:00
hud_ovrl.cpp [Maintenance] [th04/th05] Text popups: Move to a new "text overlay" module 2022-03-27 00:33:51 +01:00
initmain.cpp [Maintenance] Prefer the -zC and -zP options over `#pragma codeseg` 2021-04-03 20:12:09 +02:00
initop.cpp [Maintenance] Prefer the -zC and -zP options over `#pragma codeseg` 2021-04-03 20:12:09 +02:00
input_s.asm [Translation unit catch-up] [th04] Low-level input 2021-03-20 02:36:38 +01:00
input_w.cpp [Decompilation] [th04] input_wait_for_change(), .MPN: Freeing / palette setting 2021-04-22 19:27:08 +02:00
it_spl_u.cpp [Decompilation] [th04/th05] Items: Splash circle spawn/update functions 2022-03-05 15:31:50 +01:00
m_char.cpp [Maintenance] Remove `extern "C"` from `x86real.h` and `decomp.hpp` 2022-04-16 23:53:46 +02:00
maine011.cpp [Maintenance] Remove `extern "C"` from `x86real.h` and `decomp.hpp` 2022-04-16 23:53:46 +02:00
mb_dft.cpp [Decompilation] [th04/th05] Midbosses: Defeat animation update function 2022-03-05 17:50:33 +01:00
mem.h [Reverse-engineering] [th04/th05] EMS: Cache area layout 2021-11-29 01:53:13 +01:00
mem.inc [Decompilation] [th04/th05] EMS: Allocation + Preloading the eyecatch image 2021-11-29 01:53:43 +01:00
mem[bss].asm [Reverse-engineering] [th02/th03/th04/th05] DOS memory assignment sizes 2019-11-24 14:04:34 +01:00
motion_3.asm [Separate translation units] [th04/th05] motion_update_seg3() (undecompilable) 2021-07-21 00:35:02 +02:00
mpn_free.cpp [Decompilation] [th04] input_wait_for_change(), .MPN: Freeing / palette setting 2021-04-22 19:27:08 +02:00
mpn_l_i.cpp [Decompilation] [th04] input_wait_for_change(), .MPN: Freeing / palette setting 2021-04-22 19:27:08 +02:00
playchar.h [Maintenance] [th03/th04/th05] Rename `playchars_t` to `playchar_t` 2021-12-27 00:52:20 +01:00
player_p.cpp [Decompilation] [th04/th05] Player position clamping 2021-07-21 00:35:03 +02:00
playfld.cpp [Decompilation] [th04/th05] Playfield shaking 2022-03-05 17:50:33 +01:00
res_huma.cpp [Maintenance] Consistently use singular for entity structure and file names 2021-11-28 19:14:02 +01:00
resident.hpp [Maintenance] Use the C++ resdata_*() wrappers in all ZUN.COM sub-binaries 2021-02-20 15:46:48 +01:00
score.h [Decompilation] [th04/th05] Bosses: Defeat sequence 2022-03-27 01:35:37 +01:00
score[data].asm [Maintenance] [th04/th05] Assemble 16-bit .ASM files case-sensitively 2020-05-03 23:56:08 +02:00
scoreupd.asm [Maintenance] [th03/th04/th05] Drop the `_lebcd` suffix from score variables 2022-03-27 01:29:03 +01:00
scoreupd[data].asm [Maintenance] [th04/th05] Assemble 16-bit .ASM files case-sensitively 2020-05-03 23:56:08 +02:00
scrolly3.cpp [Decompilation] [th04/th05] Applying VRAM scrolling to Y coordinates (segment 3) 2021-07-21 00:35:02 +02:00
setup.asm [Maintenance] Rename all old *_X and *_Y constants to *_LEFT and *_TOP 2020-08-28 15:14:22 +02:00
setup.cpp [Maintenance] Declare distinct types for screen, VRAM, and TRAM coordinates 2020-08-28 14:53:30 +02:00
setup[bss].asm [Maintenance] [th04/th05] Unused setup and Music Room data 2019-12-29 21:15:43 +01:00
setup[data].asm [Reverse-engineering] [th04/th05] BGM/SE mode setup strings 2019-12-22 15:37:45 +01:00
shared.inc [Maintenance] [th04/th05] Text popups: Move to a new "text overlay" module 2022-03-27 00:33:51 +01:00
slowdown.cpp [Decompilation] [th04/th05] Turbo/Slow Mode slowdown 2021-07-31 20:19:33 +02:00
snd_dlym.cpp [Decompilation] [th03/th04] snd_delay_until_measure() 2021-01-05 21:56:57 +01:00
snd_kaja.cpp [Decompilation] [th04] snd_kaja_interrupt() 2021-05-11 18:47:57 +02:00
snd_load.cpp [Decompilation] [th04] snd_load() 2021-05-12 14:31:03 +02:00
snd_mmdr.c [Decompilation] [th04/th05] snd_mmd_resident() 2021-05-11 18:47:57 +02:00
snd_mode.cpp [Decompilation] [th04/th05] snd_determine_modes() 2021-05-11 18:47:59 +02:00
snd_pmdr.c [Decompilation] [th04/th05] snd_pmd_resident() 2021-05-11 18:47:56 +02:00
snd_se.cpp [Decompilation] [th02/th03] Sound effect playback 2021-04-03 22:11:45 +02:00
snd_se_r.cpp [Decompilation] [th02/th03] Sound effect playback 2021-04-03 22:11:45 +02:00
th04.inc [Maintenance] Move all features exclusive to MAIN.EXE to a main/ subdirectory 2020-04-15 20:58:01 +02:00
vector.cpp [Translation unit catch-up] [th04] vector1_at(), vector2_at() 2021-05-11 18:47:54 +02:00
zunsoft.asm [Decompilation] [th04/th05] bgimage_snap(), bgimage_put(), bgimage_free() 2021-03-20 02:36:36 +01:00
zunsoft.h [Maintenance] Templatize RGB and palette types for 4- and 8-bit components 2020-01-05 19:06:32 +01:00
zunsoft[bss].asm [Position independence] [th02/th03/th04/th05] Color palettes 2019-11-28 23:23:29 +01:00
zunsoft[data].asm [Reverse-engineering] [th04/th05] ZUN Soft logo 2019-12-17 23:26:57 +01:00