├── .gitattributes ├── .github └── FUNDING.yml ├── .gitignore ├── CONTRIBUTING.md ├── Pipeline ├── bmp2arr.c ├── bmp2arrl.c ├── bmp2arrl.h ├── comcstm.c ├── common.h ├── cstmstub.asm ├── grzview.cpp ├── rules.lua ├── zun_stub.asm └── zungen.c ├── README.md ├── ReC98.inc ├── Research ├── BLITPERF.CPP ├── Borland C++ decompilation.md ├── HOLDKEY.C ├── README.md └── blitperf.bmp ├── Tupfile.ini ├── Tupfile.lua ├── bin ├── COPYING.GPLv2 ├── README.md ├── masters.lib ├── msdos.exe ├── tup-dllinject.dll ├── tup-dllinject32.dll ├── tup.exe └── tup32detect.exe ├── build.bat ├── build_dumb.bat ├── codegen.hpp ├── decomp.hpp ├── defconv.h ├── game ├── coords.hpp ├── input.hpp └── pf.h ├── hooks └── pre-commit ├── libs ├── kaja │ ├── kaja.h │ ├── kaja.inc │ ├── mmdfunc.doc │ ├── ongchk.com │ ├── ongchk.doc │ └── pmddata.doc ├── master.lib │ ├── atan8[data].asm │ ├── atrtcmod.asm │ ├── atrtcmod[data].asm │ ├── bcloser.asm │ ├── bfill.asm │ ├── bfnt_entry_pat.asm │ ├── bfnt_extend_header_skip.asm │ ├── bfnt_header_analysis.asm │ ├── bfnt_header_read.asm │ ├── bfnt_id[data].asm │ ├── bfnt_palette_set.asm │ ├── bgetc.asm │ ├── bgm.inc │ ├── bgm[bss].asm │ ├── bgm[data].asm │ ├── bgm_bell_org.asm │ ├── bgm_effect_sound.asm │ ├── bgm_init_finish.asm │ ├── bgm_mget.asm │ ├── bgm_pinit.asm │ ├── bgm_play.asm │ ├── bgm_read_sdata.asm │ ├── bgm_set_tempo.asm │ ├── bgm_sound.asm │ ├── bgm_stop_play.asm │ ├── bgm_stop_sound.asm │ ├── bgm_timer.asm │ ├── bgm_timerhook.asm │ ├── bgm_timerhook[data].asm │ ├── bopenr.asm │ ├── bread.asm │ ├── bseek.asm │ ├── bseek_.asm │ ├── check_machine_fmr.asm │ ├── clip.inc │ ├── clip[bss].asm │ ├── clip[data].asm │ ├── cutline.asm │ ├── dos_axdx.asm │ ├── dos_close.asm │ ├── dos_create.asm │ ├── dos_filesize.asm │ ├── dos_free.asm │ ├── dos_keyclear.asm │ ├── dos_puts2.asm │ ├── dos_read.asm │ ├── dos_ropen.asm │ ├── dos_ropen[data].asm │ ├── dos_seek.asm │ ├── dos_setvect.asm │ ├── dos_write.asm │ ├── draw_trapezoid.asm │ ├── draw_trapezoid[data].asm │ ├── draw_trapezoidx.asm │ ├── edges[data].asm │ ├── egc.asm │ ├── egc_shift_down.asm │ ├── egc_shift_left.asm │ ├── egc_shift_left_all.asm │ ├── egc_shift_right.asm │ ├── egc_shift_up.asm │ ├── ems_allocate.asm │ ├── ems_enablepageframe.asm │ ├── ems_exist.asm │ ├── ems_free.asm │ ├── ems_movememoryregion.asm │ ├── ems_read.asm │ ├── ems_setname.asm │ ├── ems_space.asm │ ├── ems_write.asm │ ├── fil[bss].asm │ ├── fil[data].asm │ ├── file_append.asm │ ├── file_close.asm │ ├── file_create.asm │ ├── file_delete.asm │ ├── file_exist.asm │ ├── file_read.asm │ ├── file_ropen.asm │ ├── file_seek.asm │ ├── file_size.asm │ ├── file_write.asm │ ├── func.hpp │ ├── func.inc │ ├── gaiji_backup.asm │ ├── gaiji_backup[data].asm │ ├── gaiji_entry_bfnt.asm │ ├── gaiji_entry_bfnt[data].asm │ ├── gaiji_putca.asm │ ├── gaiji_putsa.asm │ ├── gaiji_read.asm │ ├── gaiji_write.asm │ ├── gdc_outpw.asm │ ├── get_machine.asm │ ├── get_machine_98.asm │ ├── get_machine_98[data].asm │ ├── get_machine_at.asm │ ├── get_machine_at[data].asm │ ├── get_machine_dosbox.asm │ ├── graph_200line.asm │ ├── graph_400line.asm │ ├── graph_clear.asm │ ├── graph_copy_page.asm │ ├── graph_extmode.asm │ ├── graph_gaiji_putc.asm │ ├── graph_gaiji_puts.asm │ ├── graph_hide.asm │ ├── graph_pack_put_8.asm │ ├── graph_pack_put_8_noclip.asm │ ├── graph_pi_free.asm │ ├── graph_pi_load_pack.asm │ ├── graph_scroll.asm │ ├── graph_scrollup.asm │ ├── graph_show.asm │ ├── graph_start.asm │ ├── grc_clip_polygon_n.asm │ ├── grc_setclip.asm │ ├── grcg_boxfill.asm │ ├── grcg_byteboxfill_x.asm │ ├── grcg_circle.asm │ ├── grcg_circle[bss].asm │ ├── grcg_circle_x.asm │ ├── grcg_circlefill.asm │ ├── grcg_fill.asm │ ├── grcg_hline.asm │ ├── grcg_line.asm │ ├── grcg_polygon_c.asm │ ├── grcg_polygon_cx.asm │ ├── grcg_pset.asm │ ├── grcg_round_boxfill.asm │ ├── grcg_setcolor.asm │ ├── grcg_settile_1line.asm │ ├── grcg_trapezoid.asm │ ├── grcg_triangle.asm │ ├── grcg_triangle[bss].asm │ ├── grcg_vline.asm │ ├── grp[data].asm │ ├── hmem_lallocate.asm │ ├── iatan2.asm │ ├── isqrt.asm │ ├── js[bss].asm │ ├── js[data].asm │ ├── js_end.asm │ ├── js_sense.asm │ ├── js_start.asm │ ├── key_sense.asm │ ├── keyback[data].asm │ ├── keybeep.asm │ ├── keybios.asm │ ├── keystart.asm │ ├── keystart[bss].asm │ ├── keystart[data].asm │ ├── keytable[data].asm │ ├── large_byte.asm │ ├── machine[data].asm │ ├── macros.inc │ ├── make_linework.asm │ ├── master.hpp │ ├── master.inc │ ├── mem[bss].asm │ ├── mem[data].asm │ ├── mem_assign.asm │ ├── mem_assign_dos.asm │ ├── mem_unassign.asm │ ├── memheap.asm │ ├── over_put_8.asm │ ├── pal[bss].asm │ ├── pal[data].asm │ ├── palette_black_in.asm │ ├── palette_black_out.asm │ ├── palette_entry_rgb.asm │ ├── palette_init.asm │ ├── palette_show.asm │ ├── palette_white_in.asm │ ├── palette_white_out.asm │ ├── pc98_gfx.hpp │ ├── pf.inc │ ├── pf[data].asm │ ├── pf_str_ieq.asm │ ├── pfclose.asm │ ├── pfgetc.asm │ ├── pfint21.asm │ ├── pfint21[bss].asm │ ├── pfread.asm │ ├── pfrewind.asm │ ├── pfseek.asm │ ├── rand[data].asm │ ├── random.asm │ ├── resdata.asm │ ├── resdata[data].asm │ ├── respal_exist.asm │ ├── respal_exist[data].asm │ ├── respal_free.asm │ ├── respal_get_palettes.asm │ ├── respal_set_palettes.asm │ ├── rottbl.asm │ ├── sin7[data].asm │ ├── sin8[data].asm │ ├── smem_release.asm │ ├── smem_wget.asm │ ├── soundio.asm │ ├── super.inc │ ├── super_cancel_pat.asm │ ├── super_clean.asm │ ├── super_convert_tiny.asm │ ├── super_entry_at.asm │ ├── super_entry_bfnt.asm │ ├── super_entry_bfnt[data].asm │ ├── super_entry_pat.asm │ ├── super_free.asm │ ├── super_large_put.asm │ ├── super_put.asm │ ├── super_put_1plane.asm │ ├── super_put_8.asm │ ├── super_put_rect.asm │ ├── super_put_rect[bss].asm │ ├── super_put_tiny_small.asm │ ├── super_roll_put.asm │ ├── super_roll_put_1plane.asm │ ├── super_roll_put_tiny.asm │ ├── super_wave_put.asm │ ├── super_wave_put[bss].asm │ ├── super_zoom.asm │ ├── superpa[bss].asm │ ├── superpa[data].asm │ ├── text_boxfilla.asm │ ├── text_clear.asm │ ├── text_fillca.asm │ ├── text_putca.asm │ ├── text_puts.asm │ ├── text_putsa.asm │ ├── tx[data].asm │ ├── txesc.asm │ ├── version[data].asm │ ├── vs[bss].asm │ ├── vs[data].asm │ ├── vsync.asm │ ├── vsync[bss].asm │ ├── vsync_wait.asm │ └── wordmask[data].asm ├── piloadc │ ├── piloadc.asm │ ├── piloadc.doc │ └── piloadc.hpp └── sprite16 │ ├── sprite16.asm │ ├── sprite16.doc │ ├── sprite16.h │ └── sprite16.inc ├── pc98.h ├── pc98.inc ├── planar.h ├── platform.h ├── platform ├── array.hpp └── x86real │ ├── flags.hpp │ ├── noexcept.cpp │ └── pc98 │ ├── blitter.cpp │ ├── blitter.hpp │ ├── egc.cpp │ ├── egc.hpp │ ├── font.cpp │ ├── font.hpp │ ├── graph.cpp │ ├── graph.hpp │ ├── grcg.cpp │ ├── grcg.hpp │ ├── keyboard.hpp │ ├── keyboard.inc │ ├── page.hpp │ ├── palette.cpp │ ├── palette.hpp │ ├── vsync.cpp │ └── vsync.hpp ├── set_errorlevel_to_1.bat ├── shiftjis.hpp ├── th01 ├── 2x_fuuin.cpp ├── 2x_main.cpp ├── bullet_l.cpp ├── common.h ├── core │ ├── initexit.cpp │ ├── initexit.hpp │ ├── resstuff.cpp │ └── resstuff.hpp ├── egcrows.cpp ├── egcwave.cpp ├── end │ ├── end.cpp │ ├── end.hpp │ ├── pic.cpp │ ├── pic.hpp │ └── type.hpp ├── f_imgd.cpp ├── f_imgd_f.cpp ├── formats │ ├── bos.hpp │ ├── cfg.hpp │ ├── cutscene.hpp │ ├── grc.cpp │ ├── grc.hpp │ ├── grf.hpp │ ├── grp.cpp │ ├── grp.h │ ├── grz.cpp │ ├── grz.h │ ├── img_data.cpp │ ├── pf.cpp │ ├── pf.hpp │ ├── ptn.cpp │ ├── ptn.hpp │ ├── ptn_0to1.cpp │ ├── ptn_data.hpp │ ├── ptn_main.cpp │ ├── ptn_snap.cpp │ ├── scoredat.hpp │ ├── sprfmt_h.hpp │ └── stagedat.hpp ├── frmdelay.cpp ├── fuuin_01.cpp ├── fuuin_02.cpp ├── fuuin_03.cpp ├── fuuin_04.cpp ├── fuuin_10.cpp ├── fuuin_11.cpp ├── graph.cpp ├── grp_text.cpp ├── grph1to0.cpp ├── grpinv32.cpp ├── grz.cpp ├── hardware │ ├── egc.h │ ├── egc.inc │ ├── egc_impl.hpp │ ├── egcrect.cpp │ ├── egcrows.cpp │ ├── egcrows.hpp │ ├── egcstart.cpp │ ├── egcwave.cpp │ ├── egcwave.hpp │ ├── frmdelay.cpp │ ├── frmdelay.h │ ├── graph.cpp │ ├── graph.h │ ├── grcg.hpp │ ├── grcg8x8m.cpp │ ├── grcg8x8m.hpp │ ├── grp2xscs.cpp │ ├── grp2xscs.hpp │ ├── grp_text.cpp │ ├── grp_text.hpp │ ├── grph1to0.cpp │ ├── grph1to0.hpp │ ├── grpinv32.cpp │ ├── grpinv32.hpp │ ├── grppfnfx.cpp │ ├── grppsafx.cpp │ ├── grppsafx.h │ ├── grppsafx.inc │ ├── input.hpp │ ├── input_mf.cpp │ ├── input_rs.cpp │ ├── palette.h │ ├── pgtrans.cpp │ ├── pgtrans.hpp │ ├── planar.h │ ├── scrollup.cpp │ ├── scrollup.hpp │ ├── text.h │ ├── tram_x16.cpp │ ├── tram_x16.hpp │ ├── vplanset.cpp │ ├── vplanset.h │ ├── vram_planes[bss].asm │ ├── vsync.cpp │ ├── vsync.hpp │ ├── ztext.cpp │ └── ztext.hpp ├── hiscore │ ├── regist.cpp │ ├── regist.hpp │ ├── score_nm.cpp │ └── scorelod.cpp ├── initexit.cpp ├── input_mf.cpp ├── main │ ├── bonus.cpp │ ├── bonus.hpp │ ├── boss │ │ ├── b05.cpp │ │ ├── b10j.cpp │ │ ├── b10m.cpp │ │ ├── b15j.cpp │ │ ├── b15m.cpp │ │ ├── b20j.cpp │ │ ├── b20m.cpp │ │ ├── boss.hpp │ │ ├── defeat.cpp │ │ ├── defeat.hpp │ │ ├── entity_a.cpp │ │ ├── entity_a.hpp │ │ ├── hit.cpp │ │ ├── nop.cpp │ │ ├── palette.cpp │ │ └── palette.hpp │ ├── bullet │ │ ├── laser_s.cpp │ │ ├── laser_s.hpp │ │ ├── line.cpp │ │ ├── line.hpp │ │ ├── missile.cpp │ │ ├── missile.hpp │ │ ├── pellet.cpp │ │ ├── pellet.hpp │ │ ├── pellet_c.cpp │ │ ├── pellet_c.hpp │ │ ├── pellet_s.cpp │ │ └── pellet_s.hpp │ ├── debug.cpp │ ├── debug.hpp │ ├── entity.hpp │ ├── extend.cpp │ ├── extend.hpp │ ├── hiscore.cpp │ ├── hud │ │ ├── hp.cpp │ │ ├── hp.hpp │ │ ├── hud.cpp │ │ ├── hud.hpp │ │ ├── menu.cpp │ │ └── menu.hpp │ ├── particle.cpp │ ├── particle.hpp │ ├── player │ │ ├── anim.cpp │ │ ├── anim.hpp │ │ ├── bomb.cpp │ │ ├── bomb.hpp │ │ ├── bomb_d_f.cpp │ │ ├── gameover.cpp │ │ ├── gameover.hpp │ │ ├── inv_spr.cpp │ │ ├── move.cpp │ │ ├── orb.cpp │ │ ├── orb.hpp │ │ ├── player.cpp │ │ ├── player.hpp │ │ ├── shot.cpp │ │ └── shot.hpp │ ├── player_is_hit[bss].asm │ ├── playfld.hpp │ ├── select_r.cpp │ ├── shape.cpp │ ├── shape.hpp │ ├── spawnray.hpp │ └── stage │ │ ├── card.cpp │ │ ├── card.hpp │ │ ├── item.cpp │ │ ├── item.hpp │ │ ├── palette.cpp │ │ ├── palette.hpp │ │ ├── stageobj.cpp │ │ ├── stageobj.hpp │ │ ├── stages.hpp │ │ ├── timer.cpp │ │ └── timer.hpp ├── main_01.cpp ├── main_07.cpp ├── main_08.cpp ├── main_09.cpp ├── main_14.cpp ├── main_15.cpp ├── main_17.cpp ├── main_18.cpp ├── main_19.cpp ├── main_20.cpp ├── main_21.cpp ├── main_23.cpp ├── main_24.cpp ├── main_25.cpp ├── main_26.cpp ├── main_27.cpp ├── main_28.cpp ├── main_29.cpp ├── main_30.cpp ├── main_31.cpp ├── main_32.cpp ├── main_33.cpp ├── main_34.cpp ├── main_35.cpp ├── main_36.cpp ├── main_37.cpp ├── main_38.cpp ├── math │ ├── area.hpp │ ├── area.inc │ ├── clamp.hpp │ ├── digit.hpp │ ├── dir.hpp │ ├── overlap.hpp │ ├── polar.hpp │ ├── str_val.cpp │ ├── str_val.hpp │ ├── subpixel.hpp │ ├── subpixel.inc │ ├── vector.cpp │ ├── vector.hpp │ └── wave.hpp ├── mdrv2.cpp ├── op_01.cpp ├── op_07.cpp ├── op_09.cpp ├── pf.cpp ├── pgtrans.cpp ├── ptn.cpp ├── ptn_0to1.cpp ├── rank.h ├── resident.hpp ├── resstuff.cpp ├── score.h ├── scrollup.cpp ├── shiftjis │ ├── bonus.hpp │ ├── debug.hpp │ ├── end.hpp │ ├── entrance.hpp │ ├── fns.hpp │ ├── fwnum.hpp │ ├── hud.hpp │ ├── item.hpp │ ├── op.hpp │ ├── regist.hpp │ ├── routesel.hpp │ ├── scoredat.hpp │ └── title.hpp ├── snd │ ├── mdrv2.cpp │ └── mdrv2.h ├── sprites │ ├── bonusbox.bmp │ ├── bonusbox.hpp │ ├── ileave_m.bmp │ ├── ileave_m.hpp │ ├── laser_s.bmp │ ├── laser_s.hpp │ ├── leaf.hpp │ ├── leaf_l.bmp │ ├── leaf_r.bmp │ ├── leaf_s.bmp │ ├── main_grc.h │ ├── main_ptn.h │ ├── mousecur.bmp │ ├── pellet.bmp │ ├── pellet.h │ ├── pellet_c.bmp │ ├── pellet_c.hpp │ ├── pillar.bmp │ ├── pillar.hpp │ ├── shape8x8.bmp │ └── shape8x8.hpp ├── v_colors.hpp ├── vplanset.cpp ├── vsync.cpp ├── ztext.cpp └── zunsoft.cpp ├── th01_fuuin.asm ├── th01_op.asm ├── th01_reiiden.asm ├── th02 ├── boss_5.cpp ├── bullet.cpp ├── common.h ├── core │ ├── exit.cpp │ ├── globals.cpp │ ├── globals.hpp │ ├── initexit.h │ ├── initmain.cpp │ ├── initop.cpp │ └── zunerror.h ├── dialog.cpp ├── end.cpp ├── end │ ├── end.cpp │ ├── staff.cpp │ └── staff.hpp ├── exit.cpp ├── exit_dos.cpp ├── formats │ ├── bfnt.h │ ├── cfg.hpp │ ├── cfg_init.c │ ├── dialog.hpp │ ├── end.hpp │ ├── map.cpp │ ├── map.hpp │ ├── mpn.hpp │ ├── mpn_l_i.cpp │ ├── musiccmt.hpp │ ├── pf.hpp │ ├── pfopen.asm │ ├── pfopen[data].asm │ ├── pi.h │ ├── pi_load.cpp │ ├── pi_put.cpp │ ├── pi_slots.inc │ ├── pi_slots[bss].asm │ ├── scoredat.hpp │ └── tile.hpp ├── frmdely1.cpp ├── frmdely2.cpp ├── gaiji │ ├── boldfont.inc │ ├── from_2.h │ ├── gaiji.h │ ├── gaiji.inc │ ├── gameover[data].asm │ ├── hiscore[data].asm │ ├── loadfree.cpp │ ├── loadfree.h │ ├── ranks_c.c │ └── score_p.hpp ├── globals.cpp ├── grp_rect.cpp ├── grppsafx.cpp ├── hardware │ ├── egc.cpp │ ├── egc.hpp │ ├── frmdelay.h │ ├── frmdely1.cpp │ ├── grp_rect.cpp │ ├── grp_rect.h │ ├── grppsafx.cpp │ ├── input.hpp │ ├── input.inc │ ├── input_rs.cpp │ ├── input_sense[bss].asm │ ├── keydelay.cpp │ ├── pages.hpp │ └── pages[bss].asm ├── hiscore │ ├── regist.cpp │ ├── regist.h │ └── regist.inc ├── hud.cpp ├── hud_ovrl.cpp ├── initmain.cpp ├── initop.cpp ├── input_rs.cpp ├── item.cpp ├── keydelay.cpp ├── main │ ├── boss │ │ ├── b3.cpp │ │ ├── b3.hpp │ │ ├── b5_.cpp │ │ ├── boss.hpp │ │ ├── bosses.hpp │ │ └── funcs[bss].asm │ ├── bullet │ │ ├── bullet.cpp │ │ ├── bullet.hpp │ │ └── pellet_r.cpp │ ├── demo.h │ ├── demo[bss].asm │ ├── demo[data].asm │ ├── dialog │ │ ├── dialog.cpp │ │ └── dialog.hpp │ ├── entity.hpp │ ├── entity.inc │ ├── execl.hpp │ ├── frames.hpp │ ├── hud │ │ ├── hud.cpp │ │ ├── hud.hpp │ │ ├── hud.inc │ │ ├── overlay.cpp │ │ ├── overlay.hpp │ │ ├── power[data].asm │ │ └── score_put[data].asm │ ├── item │ │ ├── item.cpp │ │ ├── item.hpp │ │ └── shared.hpp │ ├── main.hpp │ ├── midboss │ │ ├── m3.cpp │ │ └── midboss.hpp │ ├── null.asm │ ├── null.hpp │ ├── player │ │ ├── bomb.cpp │ │ ├── bomb.hpp │ │ ├── bomb[bss].asm │ │ ├── player.cpp │ │ ├── player.hpp │ │ ├── player.inc │ │ ├── shot.hpp │ │ └── speed[bss].asm │ ├── playfld.hpp │ ├── playfld.inc │ ├── playperf.hpp │ ├── pointnum │ │ ├── num_put.asm │ │ ├── pointnum.cpp │ │ └── pointnum.hpp │ ├── power_overflow[data].asm │ ├── score.cpp │ ├── score.hpp │ ├── scroll.hpp │ ├── slowdown.hpp │ ├── spark.cpp │ ├── spark.hpp │ ├── spark_i.asm │ ├── sparks.inc │ ├── stage │ │ ├── bonus.cpp │ │ ├── bonus.hpp │ │ └── stage.hpp │ └── tile │ │ ├── tile.cpp │ │ ├── tile.hpp │ │ └── tile.inc ├── main02_1.cpp ├── main_03.cpp ├── maine022.cpp ├── maine_03.cpp ├── maine_04.cpp ├── math │ ├── randring.cpp │ ├── randring.hpp │ ├── randring.inc │ ├── randring[bss].asm │ ├── randring_fill.asm │ ├── vector.cpp │ └── vector.hpp ├── mem.h ├── mem.inc ├── mpn_i.cpp ├── mpn_l_i.cpp ├── op │ ├── m_music.cpp │ ├── m_music.hpp │ ├── menu.hpp │ └── op.h ├── op_01.cpp ├── op_02_3.cpp ├── op_03.cpp ├── op_04.cpp ├── op_05.cpp ├── op_music.cpp ├── pi_load.cpp ├── pi_put.cpp ├── player.cpp ├── player_b.cpp ├── pointnum.cpp ├── regist_m.cpp ├── res_init.cpp ├── resident.hpp ├── score.c ├── score.h ├── score.inc ├── scoreenc.c ├── scorelod.c ├── shiftjis │ ├── bgm.hpp │ ├── bonus.hpp │ ├── end.hpp │ ├── fns.hpp │ ├── music.hpp │ ├── op_main.hpp │ └── title.hpp ├── snd │ ├── data.c │ ├── delaymea.cpp │ ├── delayvol.c │ ├── detmode.c │ ├── impl.hpp │ ├── kajaint.cpp │ ├── load.cpp │ ├── load[bss].asm │ ├── measure.hpp │ ├── mmd_res.c │ ├── pmd_res.c │ ├── se.cpp │ ├── se[data].asm │ ├── se_data.c │ ├── se_reset.cpp │ ├── snd.h │ ├── snd.inc │ └── snd[bss].asm ├── snd_dlym.cpp ├── snd_dlyv.c ├── snd_kaja.cpp ├── snd_load.cpp ├── snd_mmdr.c ├── snd_mode.c ├── snd_pmdr.c ├── snd_se.cpp ├── snd_se_r.cpp ├── spark.cpp ├── spark_i.asm ├── sprites │ ├── bombpart.bmp │ ├── bombpart.h │ ├── bullet16.h │ ├── cels.h │ ├── cels.inc │ ├── face.hpp │ ├── main_pat.h │ ├── main_pat.inc │ ├── pellet.bmp │ ├── pointnum.bmp │ ├── pointnum.h │ ├── sparks.bmp │ ├── sparks.h │ ├── verdict.bmp │ └── verdict.hpp ├── staff.cpp ├── th02.inc ├── tile.cpp ├── v_colors.hpp ├── v_colors.inc ├── vector.cpp ├── zun_res1.cpp ├── zun_res2.cpp └── zunerror.cpp ├── th02_main.asm ├── th02_maine.asm ├── th02_op.asm ├── th02_zuninit.asm ├── th03 ├── arg_bx.inc ├── cdg_load.cpp ├── cdg_p_na.asm ├── cdg_put.asm ├── cfg_lres.cpp ├── chars.inc ├── collmap.asm ├── common.h ├── common.inc ├── core │ ├── exitmain.cpp │ ├── initexit.h │ ├── initmain.cpp │ └── initop.cpp ├── cutscene.cpp ├── cutscene │ ├── cutscene.cpp │ ├── cutscene.hpp │ ├── cutscene[bss].asm │ └── cutscene[data].asm ├── end │ └── staff.cpp ├── exit.cpp ├── exitmain.cpp ├── formats │ ├── cdg.h │ ├── cdg.inc │ ├── cdg[bss].asm │ ├── cdg[data].asm │ ├── cdg_free_all.asm │ ├── cdg_load.cpp │ ├── cdg_put.asm │ ├── cdg_put_dissolve.asm │ ├── cdg_put_dissolve[data].asm │ ├── cdg_unput_upwards.asm │ ├── cfg.hpp │ ├── cfg_impl.hpp │ ├── cfg_lres.cpp │ ├── cfg_lres[data].asm │ ├── hfliplut.asm │ ├── hfliplut.h │ ├── hfliplut[bss].asm │ ├── mrs.cpp │ ├── mrs.hpp │ ├── pfopen.asm │ ├── pi.hpp │ ├── pi_put_i.cpp │ ├── pi_put_masked[data].asm │ ├── pi_put_q.cpp │ ├── score_es.cpp │ ├── score_ld.cpp │ ├── scorecry.hpp │ ├── scoredat.cpp │ ├── scoredat.hpp │ ├── scoredat.inc │ ├── script.hpp │ └── win.hpp ├── gaiji │ ├── bar.inc │ ├── gaiji.h │ └── str.hpp ├── grppsafx.cpp ├── hardware │ ├── inp_wait.cpp │ ├── input.h │ ├── input.inc │ ├── input[bss].asm │ ├── input_modes[bss].asm │ ├── input_s.cpp │ ├── palette.hpp │ ├── palette_changed[bss].asm │ ├── sprite16_copy.asm │ └── vram.hpp ├── hfliplut.asm ├── hiscore │ ├── regist.cpp │ └── regist[bss].asm ├── hitcirc.cpp ├── hud_stat.cpp ├── initmain.cpp ├── initop.cpp ├── inp_m_w.cpp ├── inp_wait.cpp ├── input_s.cpp ├── main │ ├── 5_powers_of_10[data].asm │ ├── chars │ │ ├── speed.hpp │ │ └── speeds[data].asm │ ├── collmap.asm │ ├── collmap.hpp │ ├── collmap.inc │ ├── collmap_reset.asm │ ├── demo.h │ ├── demo[bss].asm │ ├── frame_mod[bss].asm │ ├── frames.h │ ├── hitbox.hpp │ ├── hitcirc.cpp │ ├── hitcirc.hpp │ ├── hud │ │ ├── static.cpp │ │ └── static.hpp │ ├── player │ │ ├── bomb.hpp │ │ ├── bomb.inc │ │ ├── ch_shot.hpp │ │ ├── chargeshot[bss].asm │ │ ├── combo.hpp │ │ ├── combo[bss].asm │ │ ├── combo[data].asm │ │ ├── cur.hpp │ │ ├── gauge.hpp │ │ ├── gauge_avail_add.asm │ │ ├── hitcombo.asm │ │ ├── hitcombo[bss].asm │ │ ├── hitcombo[data].asm │ │ ├── move.cpp │ │ ├── move.hpp │ │ ├── players[bss].asm │ │ ├── score[bss].asm │ │ ├── score_add.asm │ │ ├── shot.hpp │ │ ├── shots[bss].asm │ │ ├── stuff.cpp │ │ ├── stuff.hpp │ │ └── win[bss].asm │ ├── playfield_fg_x[bss].asm │ ├── playfld.cpp │ ├── playfld.hpp │ ├── playfld.inc │ ├── sprite16.cpp │ ├── sprite16.hpp │ └── v_colors.hpp ├── main_010.cpp ├── main_011.cpp ├── mainl │ └── screens.cpp ├── mainl_sc.cpp ├── math │ ├── polar.cpp │ ├── polar.hpp │ ├── randring.hpp │ ├── randring.inc │ ├── randring_fill.asm │ ├── subpixel.inc │ ├── vector.cpp │ └── vector.hpp ├── mem.h ├── mem.inc ├── mrs.cpp ├── op │ ├── m_main.cpp │ ├── m_main.hpp │ ├── m_select.cpp │ └── m_select.hpp ├── op_01.cpp ├── op_02.cpp ├── op_main.cpp ├── op_music.cpp ├── op_sel.cpp ├── pi_load.cpp ├── pi_put.cpp ├── pi_put_i.cpp ├── pi_put_q.cpp ├── playchar.hpp ├── player_m.cpp ├── playfld.cpp ├── polar.cpp ├── regist.cpp ├── res_yume.cpp ├── resident.hpp ├── score.hpp ├── scoredat.cpp ├── shiftjis │ ├── bgm.hpp │ ├── fns.hpp │ ├── fnshared.hpp │ ├── main.hpp │ ├── music.hpp │ └── regist.hpp ├── snd │ ├── delaymea.cpp │ ├── se_priority[data].asm │ ├── se_state[data].asm │ └── snd.h ├── snd_dlym.cpp ├── snd_kaja.cpp ├── snd_se.cpp ├── sprite16.cpp ├── sprite16.inc ├── sprite16[bss].asm ├── sprites │ ├── flake.bmp │ ├── flake.h │ ├── main_s16.hpp │ ├── main_s16.inc │ ├── op_cdg.hpp │ ├── opwin.hpp │ ├── playchar.hpp │ ├── pointnum.hpp │ ├── regi.h │ ├── regi.inc │ ├── score.bmp │ └── score.hpp ├── staff.cpp ├── th03.inc └── vector.cpp ├── th03_main.asm ├── th03_mainl.asm ├── th03_op.asm ├── th04 ├── bgimage.cpp ├── bgimager.asm ├── boss.cpp ├── boss_4m.cpp ├── boss_4r.cpp ├── boss_bd.cpp ├── boss_exp.cpp ├── boss_x2.cpp ├── bullet_a.cpp ├── bullet_u.cpp ├── cdg_load.asm ├── cdg_p_na.cpp ├── cdg_p_nc.asm ├── cdg_p_pl.asm ├── cdg_p_pr.asm ├── cdg_put.asm ├── cfg_lres.cpp ├── chars.inc ├── checkerb.cpp ├── circle.cpp ├── common.h ├── cutscene.cpp ├── demo.cpp ├── dialog.cpp ├── egcrect.cpp ├── ems.cpp ├── end │ ├── end.h │ ├── end.inc │ ├── entry.cpp │ ├── staff.cpp │ ├── staff.hpp │ ├── verdict.cpp │ └── verdict.hpp ├── exit.cpp ├── f_dialog.cpp ├── formats │ ├── bb.h │ ├── bb.inc │ ├── bb_boss.asm │ ├── bb_boss.cpp │ ├── bb_playchar.asm │ ├── bb_playchar[bss].asm │ ├── bb_playchar[data].asm │ ├── bb_txt_load.asm │ ├── bb_txt_load[data].asm │ ├── bb_txt_put.asm │ ├── cdg.h │ ├── cdg[bss].asm │ ├── cdg_impl.hpp │ ├── cdg_load.asm │ ├── cdg_p_na.cpp │ ├── cdg_p_nc.asm │ ├── cdg_p_pl.asm │ ├── cdg_p_pr.asm │ ├── cdg_put.asm │ ├── cdg_put_plane[data].asm │ ├── cfg.cpp │ ├── cfg.hpp │ ├── cfg.inc │ ├── cfg_lres[data].asm │ ├── dialog.cpp │ ├── dialog.hpp │ ├── map.hpp │ ├── map.inc │ ├── mpn.hpp │ ├── mpn_free.cpp │ ├── mpn_l_i.cpp │ ├── scoredat │ │ ├── decode.cpp │ │ ├── encode.cpp │ │ ├── impl.hpp │ │ ├── recreate.cpp │ │ ├── scoredat.hpp │ │ └── scoredat.inc │ ├── scoredat[bss].asm │ ├── scoredat_code_asm.asm │ ├── scoredat_load_both.asm │ ├── scoredat_load_for.asm │ ├── scoredat_main.asm │ ├── std.cpp │ ├── std.hpp │ ├── std[bss].asm │ ├── std[data].asm │ ├── super.h │ ├── z_super_put_16x16_mono.asm │ └── z_super_roll_put_tiny.asm ├── gaiji │ ├── gaiji.h │ ├── gaiji.inc │ ├── gameover[data].asm │ ├── hud[data].asm │ ├── pause[data].asm │ └── verdict[data].asm ├── gather.cpp ├── grcg_3.cpp ├── grppsafx.asm ├── hardware │ ├── bgimage.cpp │ ├── bgimage.hpp │ ├── bgimage[data].asm │ ├── bgimager.asm │ ├── egcrect.cpp │ ├── egcrect[bss].asm │ ├── fillm64-56_256-256.asm │ ├── grcg.hpp │ ├── grcg.inc │ ├── grcg_3.cpp │ ├── grcg_fill_rows.asm │ ├── grcg_modecol.asm │ ├── grppsafx.asm │ ├── grppsafx.h │ ├── grppsafx.inc │ ├── input.h │ ├── input.inc │ ├── input[bss].asm │ ├── input_s.asm │ ├── input_w.cpp │ └── inputvar.h ├── hi_end.cpp ├── hi_view.cpp ├── hiscore │ ├── alphabet[data].asm │ ├── end.cpp │ ├── hiscore.h │ ├── regist.hpp │ ├── scoredat.cpp │ └── view.cpp ├── hud_hp.cpp ├── hud_ovrl.cpp ├── initmain.cpp ├── initop.cpp ├── input_s.asm ├── input_w.cpp ├── it_spl_u.cpp ├── m_char.cpp ├── main │ ├── bg.hpp │ ├── boss │ │ ├── b2.cpp │ │ ├── b4m.cpp │ │ ├── b4r.cpp │ │ ├── b6.asm │ │ ├── b6.cpp │ │ ├── b6_anim.asm │ │ ├── backdrop.cpp │ │ ├── backdrop.hpp │ │ ├── bg[bss].asm │ │ ├── boss.cpp │ │ ├── boss.hpp │ │ ├── boss[bss].asm │ │ ├── bosses.hpp │ │ ├── bx1.asm │ │ ├── bx1.cpp │ │ ├── bx2.cpp │ │ ├── end[data].asm │ │ ├── explode.cpp │ │ ├── explode_big.asm │ │ ├── explode_small.asm │ │ ├── explosions[bss].asm │ │ ├── explosions_big[data].asm │ │ ├── explosions_reset.asm │ │ ├── impl.hpp │ │ ├── reset.cpp │ │ └── vars[bss].asm │ ├── bullet │ │ ├── add.cpp │ │ ├── bullet.hpp │ │ ├── bullet.inc │ │ ├── bullets[bss].asm │ │ ├── clearzap.hpp │ │ ├── laser_t.cpp │ │ ├── laser_t.hpp │ │ ├── pellet_r.asm │ │ ├── pellet_r.hpp │ │ ├── pellet_r[bss].asm │ │ ├── template[bss].asm │ │ ├── tune[bss].asm │ │ ├── types.h │ │ ├── update.cpp │ │ └── update[bss].asm │ ├── bullets_gather_inv.asm │ ├── checkerb.cpp │ ├── checkerb.hpp │ ├── circle.cpp │ ├── circle.hpp │ ├── circles[bss].asm │ ├── circles_color[bss].asm │ ├── custom.hpp │ ├── custom[bss].asm │ ├── demo.cpp │ ├── demo.hpp │ ├── demo[data].asm │ ├── dialog │ │ ├── dialog.cpp │ │ ├── dialog.hpp │ │ ├── dialog[bss].asm │ │ ├── dialog[data].asm │ │ └── shared.cpp │ ├── drawp.hpp │ ├── drawpoint[bss].asm │ ├── ems.cpp │ ├── ems.hpp │ ├── ems[bss].asm │ ├── end.hpp │ ├── enemy │ │ ├── enemies[bss].asm │ │ ├── enemy.hpp │ │ ├── enemy.inc │ │ ├── inv.asm │ │ ├── render.asm │ │ └── size.hpp │ ├── frames.h │ ├── frames[bss].asm │ ├── frames[data].asm │ ├── gather.cpp │ ├── gather.hpp │ ├── gather.inc │ ├── gather[bss].asm │ ├── gather_point_render.asm │ ├── homing.hpp │ ├── homing_target[bss].asm │ ├── hud │ │ ├── bar_put.asm │ │ ├── bar_put[data].asm │ │ ├── element_put.asm │ │ ├── gaiji_row[data].asm │ │ ├── hp.cpp │ │ ├── hp[data].asm │ │ ├── hud.hpp │ │ ├── hud[data].asm │ │ ├── overlay.cpp │ │ ├── overlay.hpp │ │ ├── overlay.inc │ │ ├── overlay[bss].asm │ │ └── overlay[data].asm │ ├── item │ │ ├── enemy_drops[data].asm │ │ ├── invalidate.asm │ │ ├── item.hpp │ │ ├── items[bss].asm │ │ ├── items[data].asm │ │ ├── miss_add.asm │ │ ├── render.asm │ │ ├── splash.hpp │ │ ├── splash_dot_render.asm │ │ ├── splash_u.cpp │ │ ├── splashes[bss].asm │ │ └── splashes_render.asm │ ├── midboss │ │ ├── defeat.cpp │ │ ├── funcs[bss].asm │ │ ├── inv.cpp │ │ ├── m3.cpp │ │ ├── m4.cpp │ │ ├── midboss.cpp │ │ ├── midboss.hpp │ │ └── vars[bss].asm │ ├── null.asm │ ├── null.hpp │ ├── pattern.hpp │ ├── pause.asm │ ├── pause.h │ ├── pause[data].asm │ ├── phase.hpp │ ├── phase.inc │ ├── play[bss].asm │ ├── player │ │ ├── bb_playchar_put.asm │ │ ├── bomb.cpp │ │ ├── bomb.hpp │ │ ├── bomb[bss].asm │ │ ├── bombanim.cpp │ │ ├── bombanim[bss].asm │ │ ├── invalidate.asm │ │ ├── move.cpp │ │ ├── move.hpp │ │ ├── option[bss].asm │ │ ├── p_marisa.cpp │ │ ├── player.hpp │ │ ├── player.inc │ │ ├── pos.cpp │ │ ├── pos[bss].asm │ │ ├── render.asm │ │ ├── shot.hpp │ │ ├── shot_laser.asm │ │ ├── shot_laser[data].asm │ │ ├── shot_levels[data].asm │ │ ├── shot_velocity.asm │ │ ├── shot_velocity[data].asm │ │ ├── shots[bss].asm │ │ ├── shots_add.asm │ │ ├── shots_add[bss].asm │ │ ├── shots_alive[bss].asm │ │ └── shots_hittest[data].asm │ ├── playfld.cpp │ ├── playfld.hpp │ ├── playfld[bss].asm │ ├── playfld[data].asm │ ├── playperf.asm │ ├── playperf.hpp │ ├── pointnum │ │ ├── add.asm │ │ ├── digits.asm │ │ ├── inv_upd.asm │ │ ├── num_put.asm │ │ ├── pointnum.hpp │ │ ├── pointnum[bss].asm │ │ ├── pointnum[data].asm │ │ ├── render.asm │ │ └── render[bss].asm │ ├── quit.hpp │ ├── quit[bss].asm │ ├── rank.hpp │ ├── score.hpp │ ├── score[bss].asm │ ├── scoreupd.asm │ ├── scoreupd[data].asm │ ├── scroll.hpp │ ├── scroll_y_1.asm │ ├── scrolly3.cpp │ ├── select_for_rank.asm │ ├── slowdown.cpp │ ├── slowdown.hpp │ ├── slowdown[bss].asm │ ├── spark.hpp │ ├── spark.inc │ ├── spark_a.asm │ ├── spark_render.asm │ ├── sparks.asm │ ├── sparks[bss].asm │ ├── sparks_add[bss].asm │ ├── stage │ │ ├── bonus.hpp │ │ ├── funcs[bss].asm │ │ ├── stage.hpp │ │ ├── stages.cpp │ │ └── stages.hpp │ └── tile │ │ ├── bb.hpp │ │ ├── bb_put.asm │ │ ├── bb_put_a.asm │ │ ├── fill_ini.asm │ │ ├── inv.asm │ │ ├── inv[bss].asm │ │ ├── redraw.asm │ │ ├── render_a.asm │ │ ├── section[data].asm │ │ ├── set.cpp │ │ ├── tile.cpp │ │ ├── tile.hpp │ │ ├── tile.inc │ │ └── tiles[bss].asm ├── maine_e.cpp ├── math │ ├── motion.asm │ ├── motion.hpp │ ├── motion.inc │ ├── randring.hpp │ ├── randring.inc │ ├── vector.cpp │ ├── vector.hpp │ └── vector2n.asm ├── mb_dft.cpp ├── mb_inv.cpp ├── mem.h ├── mem.inc ├── mem[bss].asm ├── midboss.cpp ├── midboss4.cpp ├── motion_3.asm ├── mpn_free.cpp ├── mpn_l_i.cpp ├── op │ ├── clear.hpp │ ├── darken.cpp │ ├── impl.hpp │ ├── m_main.cpp │ ├── m_setup.cpp │ ├── op.hpp │ ├── start.cpp │ ├── start.hpp │ ├── zunsoft.cpp │ └── zunsoft.h ├── op_main.cpp ├── op_music.cpp ├── op_setup.cpp ├── playchar.h ├── player_m.cpp ├── player_p.cpp ├── playfld.cpp ├── res_huma.cpp ├── resident.hpp ├── score.h ├── score[data].asm ├── score_d.cpp ├── score_db.cpp ├── score_e.cpp ├── score_rm.cpp ├── scoreupd.asm ├── scrolly3.cpp ├── setup.cpp ├── shared.inc ├── shiftjis │ ├── bgm.hpp │ ├── fns.hpp │ ├── fnshared.hpp │ ├── m_char.cpp │ ├── m_main.hpp │ ├── m_setup.hpp │ └── music.hpp ├── slowdown.cpp ├── snd │ ├── detmodes.cpp │ ├── interrupt[bss].asm │ ├── load.cpp │ ├── load[data].asm │ ├── pmd_res.c │ ├── se_priority[data].asm │ ├── snd.h │ ├── snd.inc │ └── snd[data].asm ├── snd_dlym.cpp ├── snd_kaja.cpp ├── snd_load.cpp ├── snd_mmdr.c ├── snd_mode.cpp ├── snd_pmdr.c ├── snd_se.cpp ├── spark_a.asm ├── sprites │ ├── blit.inc │ ├── cels.h │ ├── cels.inc │ ├── main_cdg.h │ ├── main_cdg.inc │ ├── main_pat.h │ ├── main_pat.inc │ ├── op_cdg.hpp │ ├── op_cdg.inc │ ├── pelletbt.bmp │ ├── pelletbt.h │ ├── pointnum.bmp │ └── pointnum.h ├── staff.cpp ├── stages.cpp ├── std.cpp ├── th04.inc ├── tile.cpp ├── tile_set.cpp ├── vector.cpp ├── vector2n.asm ├── zun.txt ├── zunsoft.asm ├── zunsoft.cpp ├── zunsoft[bss].asm └── zunsoft[data].asm ├── th04_main.asm ├── th04_maine.asm ├── th04_maine_master.asm ├── th04_memchk.asm ├── th04_op.asm ├── th04_op2.asm ├── th04_op_master.asm ├── th04_zuninit.asm ├── th05 ├── bgimager.asm ├── boss.cpp ├── boss_1.cpp ├── boss_4.cpp ├── boss_6.cpp ├── boss_bg.cpp ├── boss_exp.cpp ├── boss_x.cpp ├── bullet.asm ├── bullet_1.asm ├── bullet_c.cpp ├── bullet_p.cpp ├── bullet_t.cpp ├── bullet_u.cpp ├── cdg_p_nc.cpp ├── cdg_put.asm ├── cfg.cpp ├── cfg_lres.cpp ├── chars.inc ├── cheeto_u.cpp ├── circle.cpp ├── cutscene.cpp ├── demo.cpp ├── dialog.cpp ├── egcrect.cpp ├── ems.cpp ├── end │ ├── allcast.hpp │ └── verdict_bitmap.asm ├── f_dialog.cpp ├── formats │ ├── bb.h │ ├── bb_cheeto.asm │ ├── bb_cheeto[bss].asm │ ├── bb_cheeto[data].asm │ ├── bb_load.asm │ ├── bb_load[bss].asm │ ├── bb_playchar.asm │ ├── bb_playchar[data].asm │ ├── bb_txt_load.asm │ ├── bb_txt_load[data].asm │ ├── cdg_p_nc.cpp │ ├── cfg_lres.cpp │ ├── cfg_lres[bss].asm │ ├── dialog.cpp │ ├── dialog.hpp │ ├── pi.hpp │ ├── pi_asm_1.asm │ ├── pi_asm_2.asm │ ├── pi_buffers[bss].asm │ ├── pi_cpp_1.cpp │ ├── pi_cpp_2.cpp │ ├── pi_headers[bss].asm │ ├── pi_impl.hpp │ ├── pi_put_masked[bss].asm │ ├── scoredat_load_for[data].asm │ ├── scoredat_main.asm │ ├── std.cpp │ ├── super.h │ └── super_roll_put_16x16_m.asm ├── frmdelay.cpp ├── gather.cpp ├── hardware │ ├── inp_h_w.cpp │ ├── input.h │ └── vram_planes[data].asm ├── hi_end.cpp ├── hi_view.cpp ├── hud_bar.asm ├── hud_num.asm ├── hud_ovrl.cpp ├── initmain.cpp ├── initop.cpp ├── inp_h_w.cpp ├── input_s.asm ├── laser.cpp ├── laser_rh.cpp ├── m_char.cpp ├── main │ ├── boss │ │ ├── 2_explode_big.asm │ │ ├── 2_explode_small.asm │ │ ├── b1.cpp │ │ ├── b3puppet.hpp │ │ ├── b4_both.cpp │ │ ├── b4_both[bss].asm │ │ ├── b6.cpp │ │ ├── boss.hpp │ │ ├── bosses.hpp │ │ ├── bx.asm │ │ ├── bx.cpp │ │ ├── bx[bss].asm │ │ ├── explode_big.asm │ │ ├── impl.hpp │ │ ├── move.cpp │ │ ├── move[data].asm │ │ ├── render.cpp │ │ ├── render[bss].asm │ │ ├── sprites[bss].asm │ │ └── vars2[bss].asm │ ├── bullet │ │ ├── add_1.asm │ │ ├── b4ball.hpp │ │ ├── b4balls_add.asm │ │ ├── b4balls_render.asm │ │ ├── b6_custombullets_render.asm │ │ ├── b6ball.cpp │ │ ├── b6ball.hpp │ │ ├── cheeto.hpp │ │ ├── cheeto[bss].asm │ │ ├── cheeto_u.cpp │ │ ├── cheetos_render.asm │ │ ├── clip.cpp │ │ ├── laser.cpp │ │ ├── laser.hpp │ │ ├── laser_rh.cpp │ │ ├── lasers[bss].asm │ │ ├── patnum.cpp │ │ ├── pellet_r[bss].asm │ │ ├── sword.hpp │ │ ├── swords_add_update.asm │ │ ├── swords_render.asm │ │ ├── tune.cpp │ │ ├── types.h │ │ └── types.inc │ ├── dialog │ │ ├── dialog.cpp │ │ └── dialog.hpp │ ├── enemy │ │ ├── enemy.hpp │ │ └── enemy.inc │ ├── hud │ │ ├── dream[data].asm │ │ └── number_p.asm │ ├── item │ │ └── enemy_drops[data].asm │ ├── midboss │ │ ├── m1.cpp │ │ └── m5.cpp │ ├── player │ │ ├── angle.cpp │ │ ├── bomb.hpp │ │ ├── bombanim.cpp │ │ ├── bombanim[bss].asm │ │ ├── hitshot_from.asm │ │ ├── hitshot_from[bss].asm │ │ ├── hitshots[bss].asm │ │ ├── player.hpp │ │ ├── shot.hpp │ │ ├── shot_types.inc │ │ ├── shots_add.asm │ │ └── speed[bss].asm │ ├── playperf.hpp │ ├── pointnum │ │ ├── digits.asm │ │ └── render.asm │ ├── select_for_playchar.asm │ └── stage │ │ ├── s2part.asm │ │ ├── s2part.hpp │ │ ├── setup.cpp │ │ └── stages.hpp ├── main010.cpp ├── main014.cpp ├── main032.cpp ├── maine_e.cpp ├── mb_dft.cpp ├── mem.h ├── mem.inc ├── mem[data].asm ├── midboss.cpp ├── midboss1.cpp ├── midboss5.cpp ├── musicp_a.asm ├── musicp_c.cpp ├── op │ ├── op.hpp │ ├── piano.hpp │ ├── piano.inc │ ├── piano[bss].asm │ ├── piano[data].asm │ ├── piano_a.asm │ ├── piano_c.cpp │ ├── start.cpp │ └── title.cpp ├── op_main.cpp ├── op_music.cpp ├── op_setup.cpp ├── op_title.cpp ├── p_common.cpp ├── p_marisa.cpp ├── p_mima.cpp ├── p_reimu.cpp ├── p_yuuka.cpp ├── pi_asm_1.asm ├── pi_asm_2.asm ├── pi_cpp_1.cpp ├── pi_cpp_2.cpp ├── playchar.h ├── player.asm ├── player_a.cpp ├── playfld.cpp ├── regist.cpp ├── res_kso.cpp ├── resident.hpp ├── score_d.cpp ├── score_db.cpp ├── score_e.cpp ├── score_rm.cpp ├── scoreupd.asm ├── shiftjis │ ├── bgm.hpp │ ├── fns.hpp │ └── music.hpp ├── snd │ ├── delaymea.cpp │ ├── load.cpp │ ├── load[data].asm │ └── snd.h ├── snd_dlym.cpp ├── snd_kaja.cpp ├── snd_load.cpp ├── spark_a.asm ├── sprites │ ├── gaiji.bmp │ ├── main_pat.h │ ├── main_pat.inc │ ├── piano_l.bmp │ └── piano_l.hpp ├── staff.cpp ├── std.cpp ├── th05.inc ├── vector.cpp ├── zun.txt └── zunsoft.cpp ├── th05_gjinit.asm ├── th05_main.asm ├── th05_maine.asm ├── th05_maine_master.asm ├── th05_memchk.asm ├── th05_op.asm ├── th05_op2.asm ├── th05_op_master.asm ├── th05_zuninit.asm ├── twobyte.inc └── x86real.h /.gitattributes: -------------------------------------------------------------------------------- 1 | *.asm text eol=crlf 2 | *.bat text eol=crlf 3 | *.[ch]* text eol=lf 4 | *.lua text eol=lf 5 | zun.txt -text 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | custom: https://rec98.nmlgc.net 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bin/* 2 | obj/ 3 | .tup/* 4 | tup.config 5 | tup-generate.vardict 6 | !bin/README.md 7 | !bin/masters.lib 8 | 9 | # Converted sprites 10 | *.[ac]sp 11 | *.[AC]SP 12 | -------------------------------------------------------------------------------- /Research/README.md: -------------------------------------------------------------------------------- 1 | This directory collects various pieces of research into PC-98 hardware details 2 | that were made during the reverse-engineering phase, in order for us to better 3 | understand certain details and name functions/data more adequately. 4 | Built as part of the regular build process; the executables will be placed in 5 | `bin/Research/`. 6 | -------------------------------------------------------------------------------- /Research/blitperf.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/Research/blitperf.bmp -------------------------------------------------------------------------------- /Tupfile.ini: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/Tupfile.ini -------------------------------------------------------------------------------- /bin/masters.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/bin/masters.lib -------------------------------------------------------------------------------- /bin/msdos.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/bin/msdos.exe -------------------------------------------------------------------------------- /bin/tup-dllinject.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/bin/tup-dllinject.dll -------------------------------------------------------------------------------- /bin/tup-dllinject32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/bin/tup-dllinject32.dll -------------------------------------------------------------------------------- /bin/tup.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/bin/tup.exe -------------------------------------------------------------------------------- /bin/tup32detect.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/bin/tup32detect.exe -------------------------------------------------------------------------------- /defconv.h: -------------------------------------------------------------------------------- 1 | // Common calling convention macro for some functions that originated in TH02 2 | // as __cdecl, but were then changed to __pascal in TH03. 3 | #ifndef GAME 4 | #error GAME not defined 5 | #elif GAME >= 3 6 | #define DEFCONV __pascal 7 | #else 8 | #define DEFCONV __cdecl 9 | #endif 10 | -------------------------------------------------------------------------------- /game/pf.h: -------------------------------------------------------------------------------- 1 | // Shared packfile declarations 2 | // ---------------------------- 3 | 4 | // Maximum name of a file name inside a packfile. (8.3 + terminating \0) 5 | #define PF_FN_LEN 13 6 | -------------------------------------------------------------------------------- /libs/kaja/ongchk.com: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/libs/kaja/ongchk.com -------------------------------------------------------------------------------- /libs/master.lib/atrtcmod[data].asm: -------------------------------------------------------------------------------- 1 | InSLot dw 0 2 | Slot dw MAX_SLOT dup (0) 3 | org_rtc_mask db 0 4 | org_rtc_b db 0 5 | -------------------------------------------------------------------------------- /libs/master.lib/bfnt_id[data].asm: -------------------------------------------------------------------------------- 1 | ; Description: 2 | ; BFNTファイルの先頭識別文字列 3 | ; 4 | public BFNT_ID,_BFNT_ID 5 | _BFNT_ID label byte 6 | BFNT_ID db 'BFNT',01ah 7 | db 0 8 | -------------------------------------------------------------------------------- /libs/master.lib/bgm[bss].asm: -------------------------------------------------------------------------------- 1 | public timerorg 2 | public part, _bgm_part 3 | public esound, _bgm_esound 4 | 5 | timerorg dd ? 6 | _bgm_part label word 7 | part SPART PMAX dup(<>) 8 | _bgm_esound label word 9 | esound SESOUND SMAX dup(<>) 10 | -------------------------------------------------------------------------------- /libs/master.lib/bgm_timerhook[data].asm: -------------------------------------------------------------------------------- 1 | public intdiv 2 | intdiv dw 1 3 | -------------------------------------------------------------------------------- /libs/master.lib/clip[bss].asm: -------------------------------------------------------------------------------- 1 | ;台形データ 2 | public trapez_a,trapez_b 3 | public _trapez_a,_trapez_b 4 | _trapez_a label word 5 | trapez_a dw 4 dup(?) 6 | _trapez_b label word 7 | trapez_b dw 4 dup(?) 8 | -------------------------------------------------------------------------------- /libs/master.lib/dos_ropen[data].asm: -------------------------------------------------------------------------------- 1 | public file_sharingmode,_file_sharingmode 2 | _file_sharingmode label word 3 | file_sharingmode dw 0 4 | -------------------------------------------------------------------------------- /libs/master.lib/draw_trapezoid[data].asm: -------------------------------------------------------------------------------- 1 | if GAME ge 3 2 | ; Horizontal pixel mask pattern applied when drawing trapezoids, interpreted 3 | ; as a 16-pixel grid tiled across the screen. Pixels are only drawn if the 4 | ; corresponding bit in this mask is set. Only used in TH03 in the transition 5 | ; effect after the end-of-stage tally. 6 | trapezoid_hmask dw 0ffffh 7 | endif 8 | -------------------------------------------------------------------------------- /libs/master.lib/fil[data].asm: -------------------------------------------------------------------------------- 1 | public _file_BufferSize,file_BufferSize 2 | _file_BufferSize label word 3 | file_BufferSize dw 0 4 | 5 | public _file_Handle,file_Handle 6 | _file_Handle label word 7 | file_Handle dw -1 8 | -------------------------------------------------------------------------------- /libs/master.lib/gaiji_backup[data].asm: -------------------------------------------------------------------------------- 1 | backup_mseg dw 0 ; Main Memory Segment 2 | -------------------------------------------------------------------------------- /libs/master.lib/gaiji_entry_bfnt[data].asm: -------------------------------------------------------------------------------- 1 | bfnt_header2 dw 16,16,0,255 2 | -------------------------------------------------------------------------------- /libs/master.lib/get_machine_98[data].asm: -------------------------------------------------------------------------------- 1 | EPSON_NOTES db 0Dh ; PC286NoteE 2 | db 16h ; PC286NoteF 3 | db 20h ; PC386NoteA 4 | db 22h ; PC386NoteW 5 | db 27h ; PC386NoteAE 6 | db 2Ah ; PC386NoteWR 7 | db 2Eh ; PC386NoteAR 8 | db 36h ; PC486NoteAS 9 | db 3Fh ; PC486NoteAU 10 | ; db ; 順次追加しなければ.... 11 | db 00h ; END of DATA 12 | -------------------------------------------------------------------------------- /libs/master.lib/get_machine_at[data].asm: -------------------------------------------------------------------------------- 1 | IBMADSP db '$IBMADSP',0 ;$DISP系のデバイス名 2 | IBMAFNT db '$IBMAFNT',0 ;$DISP系のデバイス名 3 | EXENTRY dd 0 ; Extention Entry Address 4 | -------------------------------------------------------------------------------- /libs/master.lib/grcg_circle[bss].asm: -------------------------------------------------------------------------------- 1 | gc_circl_cx_ DW ? 2 | gc_circl_cy_ DW ? 3 | -------------------------------------------------------------------------------- /libs/master.lib/grcg_triangle[bss].asm: -------------------------------------------------------------------------------- 1 | ; 三角形描画用変数 2 | ylen dw ? 3 | -------------------------------------------------------------------------------- /libs/master.lib/js[bss].asm: -------------------------------------------------------------------------------- 1 | public js_stat,_js_stat 2 | _js_stat label word 3 | js_stat dw ?,? 4 | -------------------------------------------------------------------------------- /libs/master.lib/js[data].asm: -------------------------------------------------------------------------------- 1 | public js_bexist,_js_bexist 2 | _js_bexist label word 3 | js_bexist dw 0 4 | 5 | public js_saj_port,_js_saj_port 6 | _js_saj_port label word 7 | js_saj_port dw 0 8 | 9 | public js_2player,_js_2player 10 | _js_2player label word 11 | js_2player dw 0 12 | 13 | public js_shift,_js_shift 14 | _js_shift label word 15 | js_shift dw 0 16 | -------------------------------------------------------------------------------- /libs/master.lib/keyback[data].asm: -------------------------------------------------------------------------------- 1 | ; master library 2 | ; 3 | ; Description: 4 | ; キーの戻し領域 5 | ; 6 | ; Global Variables: 7 | ; key_back_buffer 8 | ; 9 | ; Author: 10 | ; 恋塚昭彦 11 | ; 12 | ; Revision History: 13 | ; 94/ 4/ 5 Initial: keyback.asm/master.lib 0.23 14 | ; 15 | 16 | public _key_back_buffer,key_back_buffer 17 | key_back_buffer label word 18 | _key_back_buffer dw 0 19 | -------------------------------------------------------------------------------- /libs/master.lib/keybeep.asm: -------------------------------------------------------------------------------- 1 | ; void key_beep_off(void) ; 2 | ; void key_beep_on(void) ; 3 | ; 92/11/24 4 | 5 | func KEY_BEEP_OFF 6 | xor AX,AX 7 | mov ES,AX 8 | or byte ptr ES:[500H],20h 9 | ret 10 | EVEN 11 | endfunc 12 | 13 | func KEY_BEEP_ON 14 | xor AX,AX 15 | mov ES,AX 16 | and byte ptr ES:[500H],NOT 20h 17 | ret 18 | EVEN 19 | endfunc 20 | -------------------------------------------------------------------------------- /libs/master.lib/keystart[bss].asm: -------------------------------------------------------------------------------- 1 | public key_backup, keywork 2 | key_backup db 786 dup (?) 3 | keywork db 10 dup (?) 4 | -------------------------------------------------------------------------------- /libs/master.lib/keystart[data].asm: -------------------------------------------------------------------------------- 1 | public key_started 2 | key_started dw 0 3 | -------------------------------------------------------------------------------- /libs/master.lib/large_byte.asm: -------------------------------------------------------------------------------- 1 | public LARGE_BYTE 2 | LARGE_BYTE DB 000h,003h,00ch,00fh,030h,033h,03ch,03fh 3 | DB 0c0h,0c3h,0cch,0cfh,0f0h,0f3h,0fch,0ffh 4 | -------------------------------------------------------------------------------- /libs/master.lib/machine[data].asm: -------------------------------------------------------------------------------- 1 | ; master/hiper library 2 | ; 機種判定結果の保存変数 3 | ; 4 | ; Variables: 5 | ; Machine_State 6 | ; 7 | ; Revision History: 8 | ; 93/12/11 Initial: machine.asm/master.lib 0.22 (from hiper.lib) 9 | 10 | public _Machine_State,Machine_State 11 | Machine_State label word 12 | _Machine_State dw 0 13 | -------------------------------------------------------------------------------- /libs/master.lib/mem[bss].asm: -------------------------------------------------------------------------------- 1 | public mem_OutSeg, mem_TopHeap, mem_FirstHole, mem_EndMark 2 | public _mem_OutSeg, _mem_TopHeap, _mem_FirstHole, _mem_EndMark 3 | 4 | _mem_OutSeg label word 5 | mem_OutSeg dw ? 6 | _mem_TopHeap label word 7 | mem_TopHeap dw ? 8 | _mem_FirstHole label word 9 | mem_FirstHole dw ? 10 | _mem_EndMark label word 11 | mem_EndMark dw ? 12 | -------------------------------------------------------------------------------- /libs/master.lib/pal[bss].asm: -------------------------------------------------------------------------------- 1 | public _Palettes,Palettes 2 | Palettes label byte 3 | _Palettes db 48 dup (?) 4 | -------------------------------------------------------------------------------- /libs/master.lib/pfint21[bss].asm: -------------------------------------------------------------------------------- 1 | parfilename db 128 dup(?) 2 | ;filename db 128 dup(?) 3 | pfint21_pf dw ? 4 | pfint21_handle dw ? 5 | if GAME ge 3 6 | ; Segment containing the decrypted entry headers. 7 | pfint21_entries dw ? 8 | endif 9 | -------------------------------------------------------------------------------- /libs/master.lib/rand[data].asm: -------------------------------------------------------------------------------- 1 | public random_seed,_random_seed 2 | _random_seed label dword 3 | random_seed dd 1 4 | -------------------------------------------------------------------------------- /libs/master.lib/resdata[data].asm: -------------------------------------------------------------------------------- 1 | public RESDATA_ResPalID 2 | RESDATA_ResPalID db 'pal98 grb', 0 3 | RESDATA_IDLEN EQU 10 4 | -------------------------------------------------------------------------------- /libs/master.lib/respal_exist[data].asm: -------------------------------------------------------------------------------- 1 | public ResPalID 2 | ResPalID db 'pal98 grb', 0 3 | IDLEN EQU 10 4 | -------------------------------------------------------------------------------- /libs/master.lib/super_entry_bfnt[data].asm: -------------------------------------------------------------------------------- 1 | header bfnt_header <> 2 | -------------------------------------------------------------------------------- /libs/master.lib/super_put_rect[bss].asm: -------------------------------------------------------------------------------- 1 | linebyte dw ? 2 | -------------------------------------------------------------------------------- /libs/master.lib/super_wave_put[bss].asm: -------------------------------------------------------------------------------- 1 | if GAME ge 2 2 | SUPERWAV_ARRAY_SIZE equ 96 3 | else 4 | SUPERWAV_ARRAY_SIZE equ 64 5 | endif 6 | wave_address dw SUPERWAV_ARRAY_SIZE dup (?) 7 | wave_shift dw SUPERWAV_ARRAY_SIZE dup (?) 8 | wave_mask dw SUPERWAV_ARRAY_SIZE dup (?) 9 | superwav_count db ? 10 | db ? ; word alignment 11 | -------------------------------------------------------------------------------- /libs/master.lib/superpa[bss].asm: -------------------------------------------------------------------------------- 1 | PUBLIC super_patdata,_super_patdata 2 | PUBLIC super_patsize,_super_patsize 3 | 4 | _super_patdata label word 5 | super_patdata DW MAXPAT dup (?) 6 | _super_patsize label word 7 | super_patsize DW MAXPAT dup (?) 8 | -------------------------------------------------------------------------------- /libs/master.lib/superpa[data].asm: -------------------------------------------------------------------------------- 1 | PUBLIC super_buffer,_super_buffer 2 | PUBLIC super_patnum,_super_patnum 3 | PUBLIC super_charfree,_super_charfree 4 | 5 | _super_buffer label word 6 | super_buffer DW 0 7 | _super_patnum label word 8 | super_patnum DW 0 9 | 10 | _super_charfree label word 11 | super_charfree DW 0 12 | -------------------------------------------------------------------------------- /libs/master.lib/vs[bss].asm: -------------------------------------------------------------------------------- 1 | public _vsync_Count1,vsync_Count1 2 | vsync_Count1 label word 3 | _vsync_Count1 dw ? 4 | public _vsync_Count2,vsync_Count2 5 | vsync_Count2 label word 6 | _vsync_Count2 dw ? 7 | 8 | public vsync_OldVect,_vsync_OldVect 9 | _vsync_OldVect label dword 10 | vsync_OldVect dd ? ; int 0ah ( vsync ) 11 | -------------------------------------------------------------------------------- /libs/master.lib/vs[data].asm: -------------------------------------------------------------------------------- 1 | public _vsync_Proc,vsync_Proc 2 | vsync_Proc label dword 3 | _vsync_Proc dd 0 4 | 5 | public _vsync_Delay,vsync_Delay 6 | vsync_Delay label word 7 | _vsync_Delay dw 0 8 | 9 | public vsync_OldMask,_vsync_OldMask 10 | _vsync_OldMask label byte 11 | vsync_OldMask db 0 12 | EVEN 13 | -------------------------------------------------------------------------------- /libs/master.lib/vsync[bss].asm: -------------------------------------------------------------------------------- 1 | public vsync_delay_count 2 | vsync_delay_count dw ? 3 | -------------------------------------------------------------------------------- /libs/master.lib/wordmask[data].asm: -------------------------------------------------------------------------------- 1 | ; 2 | ; 93/ 9/20 [M0.21] WORD_MASK廃止 3 | 4 | public BYTE_MASK 5 | BYTE_MASK DB 0ffh,7fh,3fh,1fh,0fh,07h,03h,01h 6 | -------------------------------------------------------------------------------- /libs/sprite16/sprite16.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/libs/sprite16/sprite16.asm -------------------------------------------------------------------------------- /platform/x86real/flags.hpp: -------------------------------------------------------------------------------- 1 | // Flag comparisons 2 | // ---------------- 3 | // When used inside a conditional expression like 4 | // if(FLAGS_*) { goto some_label; | return; } 5 | // these assemble into the single given instruction. Apply the ! operator to 6 | // get the N versions. 7 | 8 | #define FLAGS_CARRY (_FLAGS & 0x01) /* JC / JAE / JB */ 9 | #define FLAGS_ZERO (_FLAGS & 0x40) /* JZ */ 10 | #define FLAGS_SIGN (_FLAGS & 0x80) /* JS */ 11 | -------------------------------------------------------------------------------- /platform/x86real/pc98/graph.cpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | #include "x86real.h" 3 | #include "platform/x86real/pc98/graph.hpp" 4 | 5 | void graph_show_16color_400line(void) 6 | { 7 | // Enter 400-line mode 8 | _AH = 0x42; 9 | _CH = 0xC0; 10 | geninterrupt(0x18); 11 | 12 | // Enter 16-color mode 13 | outportb(0x6A, 1); 14 | 15 | // Show VRAM 16 | _AH = 0x40; 17 | geninterrupt(0x18); 18 | } 19 | -------------------------------------------------------------------------------- /platform/x86real/pc98/graph.hpp: -------------------------------------------------------------------------------- 1 | // Generic graphics layer functions 2 | // -------------------------------- 3 | 4 | // Puts the graphics GDC into the common 16-color 640×400 graphics mode. 5 | void graph_show_16color_400line(void); 6 | -------------------------------------------------------------------------------- /platform/x86real/pc98/page.hpp: -------------------------------------------------------------------------------- 1 | // VRAM page flipping 2 | // ------------------ 3 | 4 | #include "x86real.h" 5 | 6 | #define page_show(page) _outportb_(0xA4, page) 7 | #define page_access(page) _outportb_(0xA6, page) 8 | -------------------------------------------------------------------------------- /platform/x86real/pc98/palette.hpp: -------------------------------------------------------------------------------- 1 | // 16-color VRAM palette 2 | // --------------------- 3 | 4 | #include "pc98.h" 5 | 6 | // Sets the given hardware [col] to the given RGB value. 7 | void palette_show_single(vc_t col, const RGB4& c); 8 | 9 | // Calls palette_show_single() for all colors in [pal]. 10 | void palette_show(const Palette4& pal); 11 | -------------------------------------------------------------------------------- /set_errorlevel_to_1.bat: -------------------------------------------------------------------------------- 1 | @< NUL find "" 2 | -------------------------------------------------------------------------------- /th01/2x_fuuin.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/grp2xscs.cpp" 2 | -------------------------------------------------------------------------------- /th01/2x_main.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -2 -O- -Z- 2 | #include "th01/hardware/grp2xscs.cpp" 3 | -------------------------------------------------------------------------------- /th01/bullet_l.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/main/bullet/line.cpp" 2 | -------------------------------------------------------------------------------- /th01/common.h: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Common, essential macros for TH01. No types here! 4 | */ 5 | 6 | #define STAGES_PER_SCENE 5 7 | #define BOSS_STAGE (STAGES_PER_SCENE - 1) 8 | #define SCENE_COUNT 4 9 | 10 | #define STAGE_COUNT 20 11 | #define STAGE_DIGITS 2 12 | 13 | #define STAGES_OUTSIDE_ROUTE 5 14 | #define STAGES_ON_ROUTE (STAGE_COUNT - STAGES_OUTSIDE_ROUTE) 15 | 16 | #define LIVES_MAX 6 17 | #define BOMBS_MAX 5 18 | -------------------------------------------------------------------------------- /th01/egcrows.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/egcrows.cpp" 2 | -------------------------------------------------------------------------------- /th01/egcwave.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/egcwave.cpp" 2 | -------------------------------------------------------------------------------- /th01/end/end.hpp: -------------------------------------------------------------------------------- 1 | // Shows the good or bad ending sequence depending on the value of 2 | // [continues_total], followed by the verdict screen and score registration. 3 | void end_and_verdict_and_regist_animate(void); 4 | -------------------------------------------------------------------------------- /th01/f_imgd.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/formats/img_data.cpp" 2 | -------------------------------------------------------------------------------- /th01/f_imgd_f.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/formats/img_data.cpp" 2 | -------------------------------------------------------------------------------- /th01/frmdelay.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/frmdelay.cpp" 2 | -------------------------------------------------------------------------------- /th01/fuuin_03.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/end/end.cpp" 2 | -------------------------------------------------------------------------------- /th01/fuuin_10.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #10 of TH01's FUIIN.EXE 4 | */ 5 | 6 | #pragma option -1 -O- -Z- 7 | 8 | #include "th01/formats/grp.cpp" 9 | -------------------------------------------------------------------------------- /th01/fuuin_11.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #11 of TH01's FUUIN.EXE 4 | */ 5 | 6 | #pragma option -zCSHARED 7 | 8 | #include "libs/master.lib/pc98_gfx.hpp" 9 | #include "th01/hardware/graph.h" 10 | 11 | #include "th01/hardware/egcrect.cpp" 12 | -------------------------------------------------------------------------------- /th01/graph.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #8 of TH01's FUUIN.EXE 4 | */ 5 | 6 | #include "th01/hardware/graph.cpp" 7 | -------------------------------------------------------------------------------- /th01/grp_text.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/grp_text.cpp" 2 | -------------------------------------------------------------------------------- /th01/grph1to0.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/grph1to0.cpp" 2 | -------------------------------------------------------------------------------- /th01/grpinv32.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCmain_11_TEXT -2 2 | #include "th01/hardware/grpinv32.cpp" 3 | -------------------------------------------------------------------------------- /th01/grz.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/formats/grz.cpp" 2 | -------------------------------------------------------------------------------- /th01/hardware/egcrows.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | // Blits [h] rows starting at [top] from VRAM page 1 to the same position on 4 | // VRAM page 0. Mainly used after a previous GDC scroll of [h] rows, to 5 | // smoothly scroll between two full background images. 6 | void egc_copy_rows_1_to_0(vram_y_t top, pixel_t h); 7 | -------------------------------------------------------------------------------- /th01/hardware/egcstart.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/egc_impl.hpp" 2 | 3 | void egc_start_copy(void) 4 | { 5 | egc_on(); 6 | egc_setup_copy(); 7 | } 8 | -------------------------------------------------------------------------------- /th01/hardware/frmdelay.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/vsync.hpp" 2 | #include "th01/hardware/frmdelay.h" 3 | 4 | void frame_delay(unsigned int frames) 5 | { 6 | while(z_vsync_Count1 < frames) {} 7 | z_vsync_Count1 = 0; 8 | } 9 | -------------------------------------------------------------------------------- /th01/hardware/frmdelay.h: -------------------------------------------------------------------------------- 1 | void frame_delay(unsigned int frames); 2 | -------------------------------------------------------------------------------- /th01/hardware/grcg.hpp: -------------------------------------------------------------------------------- 1 | // Suboptimal and procedural GRCG macros. 2 | // (Still better than master.lib's proper functions though.) 3 | 4 | #include "x86real.h" 5 | 6 | #undef grcg_off 7 | 8 | #define grcg_setmode(mode) \ 9 | outportb(0x7C, mode) 10 | #define grcg_off() \ 11 | outportb(0x7C, 0) 12 | -------------------------------------------------------------------------------- /th01/hardware/grcg8x8m.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | // Blits the given monochrome 8×8 [sprite] to the VRAM position indicated by 4 | // [vram_offset_topleft] and [first_bit], in the given [col] via the GRCG. 5 | void grcg_put_8x8_mono( 6 | vram_offset_t vram_offset_topleft, 7 | char first_bit, 8 | const dots8_t sprite[8], 9 | vc2 col 10 | ); 11 | -------------------------------------------------------------------------------- /th01/hardware/grp_text.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include "th01/hardware/grp_text.hpp" 4 | 5 | void graph_printf_fx( 6 | screen_x_t left, 7 | vram_y_t top, 8 | int16_t col_and_fx, 9 | const shiftjis_t *fmt, 10 | ... 11 | ) 12 | { 13 | char str[256]; 14 | va_list ap; 15 | 16 | va_start(ap, fmt); 17 | vsprintf(str, fmt, ap); 18 | graph_putsa_fx(left, top, col_and_fx, str); 19 | } 20 | -------------------------------------------------------------------------------- /th01/hardware/grph1to0.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | // Recovers the dots set in the given [mask] from (⌊left/8⌋*8, top) to 4 | // (⌊(left/8) + w⌋*8, top) from VRAM page 1. 5 | void graph_hline_unput_masked_8( 6 | screen_x_t left, vram_y_t top, dots8_t *mask, vram_byte_amount_t vram_w 7 | ); 8 | -------------------------------------------------------------------------------- /th01/hardware/grppsafx.inc: -------------------------------------------------------------------------------- 1 | WEIGHT_NORMAL = 0 2 | WEIGHT_HEAVY = 1 3 | WEIGHT_BOLD = 2 4 | WEIGHT_BLACK = 3 5 | WEIGHT_COUNT = 4 6 | 7 | if (GAME le 3) 8 | FX_WEIGHT_NORMAL = (WEIGHT_NORMAL shl 4) 9 | FX_WEIGHT_HEAVY = (WEIGHT_HEAVY shl 4) 10 | FX_WEIGHT_BOLD = (WEIGHT_BOLD shl 4) 11 | FX_WEIGHT_BLACK = (WEIGHT_BLACK shl 4) 12 | endif 13 | -------------------------------------------------------------------------------- /th01/hardware/input_rs.cpp: -------------------------------------------------------------------------------- 1 | void input_reset_sense(void) 2 | { 3 | input_lr = false; 4 | input_up = false; 5 | input_down = false; 6 | input_ok = false; 7 | paused = false; 8 | input_shot = false; 9 | input_strike = false; 10 | input_mem_enter = false; 11 | input_mem_leave = false; 12 | 13 | input_sense(true); 14 | } 15 | -------------------------------------------------------------------------------- /th01/hardware/scrollup.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | // Waits until VSync, then sets the GDC's hardware scroll registers so that 4 | // the given line will appear at the top of the screen for all subsequent 5 | // frames. 6 | void z_vsync_wait_and_scrollup(vram_y_t line_on_top); 7 | -------------------------------------------------------------------------------- /th01/hardware/vplanset.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "planar.h" 4 | #include "th01/hardware/vplanset.h" 5 | 6 | void vram_planes_set(void) 7 | { 8 | VRAM_PLANE_B = reinterpret_cast(SEG_PLANE_B); 9 | VRAM_PLANE_R = reinterpret_cast(SEG_PLANE_R); 10 | VRAM_PLANE_G = reinterpret_cast(SEG_PLANE_G); 11 | VRAM_PLANE_E = reinterpret_cast(SEG_PLANE_E); 12 | } 13 | -------------------------------------------------------------------------------- /th01/hardware/vplanset.h: -------------------------------------------------------------------------------- 1 | // Initializes the VRAM_PLANE_* pointers declared in planar.h. 2 | void vram_planes_set(void); 3 | -------------------------------------------------------------------------------- /th01/hardware/vram_planes[bss].asm: -------------------------------------------------------------------------------- 1 | public _VRAM_PLANE, _VRAM_PLANE_B, _VRAM_PLANE_R, _VRAM_PLANE_G, _VRAM_PLANE_E 2 | _VRAM_PLANE label dword 3 | _VRAM_PLANE_B dd ? 4 | _VRAM_PLANE_R dd ? 5 | _VRAM_PLANE_G dd ? 6 | _VRAM_PLANE_E dd ? 7 | -------------------------------------------------------------------------------- /th01/hardware/vsync.hpp: -------------------------------------------------------------------------------- 1 | extern volatile int z_vsync_Count1; 2 | extern volatile int z_vsync_Count2; 3 | 4 | void vsync_init(void); 5 | void z_vsync_wait(void); 6 | void vsync_exit(void); 7 | -------------------------------------------------------------------------------- /th01/hiscore/score_nm.cpp: -------------------------------------------------------------------------------- 1 | void scoredat_name_get(int place, unsigned char str[SCOREDAT_NAME_BYTES + 1]) 2 | { 3 | for(int i = 0; i < SCOREDAT_NAME_BYTES; i++) { 4 | str[i] = scoredat_names[(place * SCOREDAT_NAME_BYTES) + i]; 5 | } 6 | str[SCOREDAT_NAME_BYTES] = '\0'; 7 | } 8 | -------------------------------------------------------------------------------- /th01/initexit.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/core/initexit.cpp" 2 | -------------------------------------------------------------------------------- /th01/input_mf.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/input_mf.cpp" 2 | -------------------------------------------------------------------------------- /th01/main/boss/nop.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/main/boss/boss.hpp" 2 | 3 | void pascal boss_nop(void) 4 | { 5 | } 6 | -------------------------------------------------------------------------------- /th01/main/boss/palette.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/palette.h" 2 | 3 | #include "th01/main/boss/palette.hpp" 4 | 5 | void boss_palette_snap(void) 6 | { 7 | svc2 col; 8 | int comp; 9 | palette_copy(boss_palette, z_Palettes, col, comp); 10 | } 11 | 12 | void boss_palette_show(void) 13 | { 14 | z_palette_set_all_show(boss_palette); 15 | } 16 | -------------------------------------------------------------------------------- /th01/main/extend.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/main/extend.hpp" 2 | 3 | void score_extend_update_and_render(void) 4 | { 5 | if(score >= (extend_next * SCORE_PER_EXTEND)) { 6 | if(rem_lives < LIVES_MAX) { 7 | rem_lives++; 8 | resident->rem_lives = rem_lives; 9 | hud_lives_put(rem_lives - 1); 10 | mdrv2_se_play(15); 11 | pellet_speed_raise(1); 12 | } 13 | extend_next++; 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /th01/main/extend.hpp: -------------------------------------------------------------------------------- 1 | #include "th01/score.h" 2 | 3 | static const score_t SCORE_PER_EXTEND = 400000; 4 | 5 | extern int extend_next; 6 | 7 | // Checks if [score] has exceeded a certain threshold, and grants an extra life 8 | // in that case, redrawing the life section of the UI if that happened. 9 | void score_extend_update_and_render(void); 10 | -------------------------------------------------------------------------------- /th01/main/hiscore.cpp: -------------------------------------------------------------------------------- 1 | void scoredat_load_hiscore(void) 2 | { 3 | scoredat_load(); 4 | resident->hiscore = scoredat_hiscore_get(); 5 | scoredat_free(); 6 | } 7 | -------------------------------------------------------------------------------- /th01/main/hud/menu.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | // Shows the pause menu, and returns `true` if the player selected to quit. 4 | bool16 pause_menu(void); 5 | 6 | // Shows the continue menu. Relaunches the main executable if the player 7 | // decides to use a continue (and does not return in this case), or returns 8 | // `false`. 9 | bool16 continue_menu(void); 10 | -------------------------------------------------------------------------------- /th01/main/player/gameover.hpp: -------------------------------------------------------------------------------- 1 | // Shows Reimu's Game Over animation, leaving both VRAM pages in a dirty state. 2 | void player_gameover_animate(void); 3 | -------------------------------------------------------------------------------- /th01/main/player_is_hit[bss].asm: -------------------------------------------------------------------------------- 1 | ; Triggers the player death sequence if set to 1. 2 | ; TODO: What's the effect of setting this to 0xFF in TH02? 3 | public _player_is_hit 4 | _player_is_hit db ? 5 | -------------------------------------------------------------------------------- /th01/main/stage/palette.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/main/stage/palette.hpp" 2 | 3 | void stage_palette_set(const Palette4 &pal) 4 | { 5 | svc2 col; 6 | int comp; 7 | palette_copy(stage_palette, pal, col, comp); 8 | } 9 | -------------------------------------------------------------------------------- /th01/main/stage/palette.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | // The intended palette for a stage, with no effects applied. Used as the 4 | // reference palette for undoing the palette changes during the bomb animation 5 | // and the Pause menu. 6 | extern Palette4 stage_palette; 7 | 8 | // Sets [stage_palette] to [pal]. 9 | void stage_palette_set(const Palette4 &pal); 10 | -------------------------------------------------------------------------------- /th01/main_07.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #7 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #pragma option -zCSHARED 7 | 8 | #include "libs/master.lib/pc98_gfx.hpp" 9 | #include "th01/hardware/graph.h" 10 | 11 | #include "th01/hardware/egcrect.cpp" 12 | #include "th01/formats/ptn_snap.cpp" 13 | -------------------------------------------------------------------------------- /th01/main_08.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #8 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/formats/grp.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_09.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #9 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #pragma option -1 7 | 8 | #include "th01/main/bullet/pellet_c.cpp" 9 | -------------------------------------------------------------------------------- /th01/main_14.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #14 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/math/vector.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_15.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #15 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/bullet/laser_s.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_17.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #17 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/defeat.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_18.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #18 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/bonus.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_20.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #20 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/player/anim.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_21.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #21 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/entity_a.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_23.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #23 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "x86real.h" 7 | 8 | #include "th01/formats/grc.cpp" 9 | #include "th01/hardware/grcg8x8m.cpp" 10 | #include "th01/main/shape.cpp" 11 | -------------------------------------------------------------------------------- /th01/main_24.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #24 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/stage/item.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_25.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/main/hud/hud.cpp" 2 | -------------------------------------------------------------------------------- /th01/main_26.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #26 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/stage/timer.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_27.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #27 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/player/move.cpp" 7 | #include "th01/formats/ptn_main.cpp" 8 | #include "th01/main/player/player.cpp" 9 | -------------------------------------------------------------------------------- /th01/main_28.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #28 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b10m.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_29.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #29 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b10j.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_30.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #30 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/stage/card.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_31.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #31 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/stage/stageobj.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_33.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #33 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b05.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_34.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #34 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b15j.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_35.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #35 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b15m.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_36.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #36 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b20m.cpp" 7 | -------------------------------------------------------------------------------- /th01/main_37.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #37 of TH01's REIIDEN.EXE 4 | */ 5 | 6 | #include "th01/main/boss/b20j.cpp" 7 | -------------------------------------------------------------------------------- /th01/math/area.hpp: -------------------------------------------------------------------------------- 1 | template struct Area { 2 | TX left, right; 3 | TY top, bottom; 4 | }; 5 | -------------------------------------------------------------------------------- /th01/math/area.inc: -------------------------------------------------------------------------------- 1 | area_t struc 2 | A_left dw ? 3 | A_right dw ? 4 | A_top dw ? 5 | A_bottom dw ? 6 | area_t ends 7 | -------------------------------------------------------------------------------- /th01/math/digit.hpp: -------------------------------------------------------------------------------- 1 | #define digit_count(num) ( \ 2 | (num >= 10000) ? 5 : \ 3 | (num >= 1000) ? 4 : \ 4 | (num >= 100) ? 3 : \ 5 | (num >= 10) ? 2 \ 6 | : 1 \ 7 | ) 8 | -------------------------------------------------------------------------------- /th01/math/dir.hpp: -------------------------------------------------------------------------------- 1 | // Direction types 2 | enum x_direction_t { 3 | X_RIGHT = 0, 4 | X_LEFT = 1, 5 | }; 6 | 7 | enum clock_direction_t { 8 | CLOCKWISE = 0, 9 | COUNTERCLOCKWISE = 1, 10 | }; 11 | -------------------------------------------------------------------------------- /th01/math/str_val.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | // Equivalent to sprintf(str, "%*u", width, val). 4 | void pascal str_right_aligned_from_uint16( 5 | char *str, uint16_t val, uint16_t width 6 | ); 7 | 8 | // Equivalent to sprintf(str, "%d", val), if that function glitched out for 9 | // negative numbers. 10 | void pascal str_from_positive_int16(char *str, int16_t val); 11 | -------------------------------------------------------------------------------- /th01/math/subpixel.inc: -------------------------------------------------------------------------------- 1 | PIXEL_NONE = -999 2 | SUBPIXEL_NONE = (PIXEL_NONE shl 4) 3 | 4 | SUBPIXEL_FACTOR = 16 5 | SUBPIXEL_BITS = 4 6 | -------------------------------------------------------------------------------- /th01/math/vector.hpp: -------------------------------------------------------------------------------- 1 | // Different parameter lists and calling conventions compared to later games! 2 | 3 | void vector2(int &ret_x, int &ret_y, int length, unsigned char angle); 4 | 5 | void vector2_between( 6 | int x1, int y1, int x2, int y2, int& ret_x, int &ret_y, int length 7 | ); 8 | -------------------------------------------------------------------------------- /th01/math/wave.hpp: -------------------------------------------------------------------------------- 1 | #include "libs/master.lib/master.hpp" 2 | #include "pc98.h" 3 | 4 | inline pixel_t wave_x(pixel_t amp, int t) { 5 | return ((static_cast(amp) * Sin8(t)) / 0x100); 6 | } 7 | -------------------------------------------------------------------------------- /th01/mdrv2.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/snd/mdrv2.cpp" 2 | -------------------------------------------------------------------------------- /th01/op_07.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #7 of TH01's OP.EXE 4 | */ 5 | 6 | #pragma option -zCSHARED 7 | 8 | #include "libs/master.lib/pc98_gfx.hpp" 9 | #include "th01/hardware/graph.h" 10 | 11 | #include "th01/hardware/egcrect.cpp" 12 | #include "th01/formats/ptn_snap.cpp" 13 | -------------------------------------------------------------------------------- /th01/op_09.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #9 of TH01's OP.EXE 4 | */ 5 | 6 | #include "th01/formats/grp.cpp" 7 | -------------------------------------------------------------------------------- /th01/pf.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/formats/pf.cpp" 2 | -------------------------------------------------------------------------------- /th01/pgtrans.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/pgtrans.cpp" 2 | -------------------------------------------------------------------------------- /th01/ptn.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/formats/ptn.cpp" 2 | -------------------------------------------------------------------------------- /th01/ptn_0to1.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/formats/ptn_0to1.cpp" 2 | -------------------------------------------------------------------------------- /th01/resstuff.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/core/resstuff.cpp" 2 | -------------------------------------------------------------------------------- /th01/score.h: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | #define SCORE_DIGITS 7 4 | 5 | typedef int32_t score_t; // ZUN bug: Should have maybe been unsigned… 6 | typedef uint32_t uscore_t; // ZUN bug: …or consistent, at least. 7 | -------------------------------------------------------------------------------- /th01/scrollup.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/scrollup.cpp" 2 | -------------------------------------------------------------------------------- /th01/shiftjis/bonus.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/bonus.hpp -------------------------------------------------------------------------------- /th01/shiftjis/debug.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/debug.hpp -------------------------------------------------------------------------------- /th01/shiftjis/end.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/end.hpp -------------------------------------------------------------------------------- /th01/shiftjis/entrance.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/entrance.hpp -------------------------------------------------------------------------------- /th01/shiftjis/fns.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/fns.hpp -------------------------------------------------------------------------------- /th01/shiftjis/fwnum.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/fwnum.hpp -------------------------------------------------------------------------------- /th01/shiftjis/hud.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/hud.hpp -------------------------------------------------------------------------------- /th01/shiftjis/item.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/item.hpp -------------------------------------------------------------------------------- /th01/shiftjis/op.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/op.hpp -------------------------------------------------------------------------------- /th01/shiftjis/regist.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/regist.hpp -------------------------------------------------------------------------------- /th01/shiftjis/routesel.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/routesel.hpp -------------------------------------------------------------------------------- /th01/shiftjis/scoredat.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/scoredat.hpp -------------------------------------------------------------------------------- /th01/shiftjis/title.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/shiftjis/title.hpp -------------------------------------------------------------------------------- /th01/sprites/bonusbox.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/bonusbox.bmp -------------------------------------------------------------------------------- /th01/sprites/bonusbox.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | extern const dot_rect_t(8, 4) sSTAGEBONUS_BOX[1]; 4 | -------------------------------------------------------------------------------- /th01/sprites/ileave_m.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/ileave_m.bmp -------------------------------------------------------------------------------- /th01/sprites/ileave_m.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | // Combines dots from VRAM page 1 (where the mask is 0) with dots from VRAM 4 | // page 0 (where the mask is 1). 5 | static const int INTERLEAVE_MASK_COUNT = 10; 6 | #define INTERLEAVE_W 8 7 | #define INTERLEAVE_H 8 8 | 9 | extern const dot_rect_t(INTERLEAVE_W, INTERLEAVE_H) sINTERLEAVE_MASKS[ 10 | INTERLEAVE_MASK_COUNT 11 | ]; 12 | -------------------------------------------------------------------------------- /th01/sprites/laser_s.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/laser_s.bmp -------------------------------------------------------------------------------- /th01/sprites/laser_s.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | static const pixel_t SHOOTOUT_LASER_W_MAX = 8; 4 | 5 | extern const dot_rect_t(16, PRESHIFT) sSHOOTOUT_LASER[SHOOTOUT_LASER_W_MAX]; 6 | -------------------------------------------------------------------------------- /th01/sprites/leaf.hpp: -------------------------------------------------------------------------------- 1 | #define LEAF_W 8 2 | #define LEAF_H 8 3 | -------------------------------------------------------------------------------- /th01/sprites/leaf_l.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/leaf_l.bmp -------------------------------------------------------------------------------- /th01/sprites/leaf_r.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/leaf_r.bmp -------------------------------------------------------------------------------- /th01/sprites/leaf_s.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/leaf_s.bmp -------------------------------------------------------------------------------- /th01/sprites/main_grc.h: -------------------------------------------------------------------------------- 1 | typedef enum { 2 | // .GRC slots that can be freely used by bosses. 3 | GRC_SLOT_BOSS_1 = 0, 4 | GRC_SLOT_BOSS_2 = 1, 5 | GRC_SLOT_BOSS_3 = 2, 6 | GRC_SLOT_BOSS_4 = 3, 7 | 8 | GRC_SLOT_BOMB_KUJI_1 = 6, // kuzi1.grc 9 | GRC_SLOT_BOMB_KUJI_2 = 7, // kuzi2.grc 10 | GRC_SLOT_COUNT, 11 | 12 | _main_grc_slot_t_FORCE_INT16 = 0x7FFF 13 | } main_grc_slot_t; 14 | -------------------------------------------------------------------------------- /th01/sprites/mousecur.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/mousecur.bmp -------------------------------------------------------------------------------- /th01/sprites/pellet.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/pellet.bmp -------------------------------------------------------------------------------- /th01/sprites/pellet.h: -------------------------------------------------------------------------------- 1 | #define PELLET_W 8 2 | #define PELLET_H 8 3 | #if (GAME == 2) 4 | static const int PELLET_CELS = 1; 5 | #else 6 | static const int PELLET_CELS = 3; 7 | #endif 8 | -------------------------------------------------------------------------------- /th01/sprites/pellet_c.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/pellet_c.bmp -------------------------------------------------------------------------------- /th01/sprites/pellet_c.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define PELLET_CLOUD_W 16 4 | #define PELLET_CLOUD_H 16 5 | #define PELLET_CLOUD_CELS 2 6 | 7 | extern const dot_rect_t(PELLET_CLOUD_W, PELLET_CLOUD_H) sPELLET_CLOUD[ 8 | PELLET_CLOUD_CELS 9 | ]; 10 | -------------------------------------------------------------------------------- /th01/sprites/pillar.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/pillar.bmp -------------------------------------------------------------------------------- /th01/sprites/pillar.hpp: -------------------------------------------------------------------------------- 1 | #define PILLAR_W 32 2 | #define PILLAR_SEGMENT_H 8 3 | -------------------------------------------------------------------------------- /th01/sprites/shape8x8.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th01/sprites/shape8x8.bmp -------------------------------------------------------------------------------- /th01/v_colors.hpp: -------------------------------------------------------------------------------- 1 | // Commonly used VRAM hardware palette indices in REIIDEN.EXE and FUUIN.EXE. 2 | enum th01_vram_colors_t { 3 | V_BLACK = 0, 4 | V_GRAY = 1, 5 | V_GREEN = 3, 6 | V_WHITE = 7, 7 | V_RED = 10, 8 | }; 9 | -------------------------------------------------------------------------------- /th01/vplanset.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/vplanset.cpp" 2 | -------------------------------------------------------------------------------- /th01/vsync.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/vsync.cpp" 2 | -------------------------------------------------------------------------------- /th01/ztext.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/ztext.cpp" 2 | -------------------------------------------------------------------------------- /th02/boss_5.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/boss/b5_.cpp" 2 | -------------------------------------------------------------------------------- /th02/bullet.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/bullet/bullet.cpp" 2 | -------------------------------------------------------------------------------- /th02/common.h: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Common, essential macros for TH02. No types here! 4 | */ 5 | 6 | #define MAIN_STAGE_COUNT 5 7 | #define TOTAL_STAGE_COUNT (MAIN_STAGE_COUNT + 1) 8 | 9 | #define SHOTTYPE_COUNT 3 10 | -------------------------------------------------------------------------------- /th02/core/globals.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/rank.h" 2 | #include "th02/resident.hpp" 3 | 4 | char rank = RANK_NORMAL; 5 | int8_t rank_padding = 0; 6 | resident_t *resident; 7 | int8_t unused_op_2_3; // Maybe debug mode? 8 | int8_t lives; 9 | int8_t bombs; 10 | int8_t unused_3; // ZUN bloat 11 | int16_t unused_4; // ZUN bloat 12 | score_t score; 13 | int16_t unused_5; // ZUN bloat 14 | -------------------------------------------------------------------------------- /th02/core/globals.hpp: -------------------------------------------------------------------------------- 1 | #include "th02/score.h" 2 | 3 | extern char rank; 4 | extern score_t score; 5 | -------------------------------------------------------------------------------- /th02/core/initexit.h: -------------------------------------------------------------------------------- 1 | #if (GAME == 2) 2 | int game_init_op(void); 3 | int game_init_main(void); 4 | #endif 5 | 6 | void game_exit(void); 7 | void game_exit_to_dos(void); 8 | 9 | #define graph_clear_both() \ 10 | graph_accesspage(1); graph_clear(); \ 11 | graph_accesspage(0); graph_clear(); \ 12 | graph_accesspage(0); graph_showpage(0); 13 | -------------------------------------------------------------------------------- /th02/core/initmain.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "libs/master.lib/pc98_gfx.hpp" 4 | #include "th01/hardware/vplanset.h" 5 | #include "th02/mem.h" 6 | #include "th02/formats/pf.hpp" 7 | 8 | int game_init_main(void) 9 | { 10 | if(mem_assign_dos(MEM_ASSIGN_PARAS_MAIN)) { 11 | return 1; 12 | } 13 | vram_planes_set(); 14 | vsync_start(); 15 | egc_start(); 16 | graph_400line(); 17 | game_pfopen(); 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /th02/core/zunerror.h: -------------------------------------------------------------------------------- 1 | // Debugging 2 | // --------- 3 | 4 | typedef enum { 5 | ERROR_FILE_NOT_FOUND = 2, 6 | ERROR_OUT_OF_MEMORY = 3, 7 | ERROR_MISSING_DRIVER = 4, 8 | ERROR_SCOREDAT_CORRUPT = 5, 9 | 10 | _zun_error_t_FORCE_UINT16 = 0xFFFF 11 | } zun_error_t; 12 | 13 | // Calls ZUN's interrupt vector set up in ZUNINIT.COM to display an error 14 | // message. 15 | void pascal zun_error(zun_error_t err); 16 | // --------- 17 | -------------------------------------------------------------------------------- /th02/dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/dialog/dialog.cpp" 2 | -------------------------------------------------------------------------------- /th02/end.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/end/end.cpp" 2 | -------------------------------------------------------------------------------- /th02/exit.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/core/exit.cpp" 2 | -------------------------------------------------------------------------------- /th02/exit_dos.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "libs/master.lib/pc98_gfx.hpp" 4 | #include "libs/master.lib/master.hpp" 5 | #include "th02/core/initexit.h" 6 | 7 | void game_exit_to_dos(void) 8 | { 9 | game_exit(); 10 | key_beep_on(); 11 | text_systemline_show(); 12 | text_cursor_show(); 13 | } 14 | -------------------------------------------------------------------------------- /th02/formats/map.cpp: -------------------------------------------------------------------------------- 1 | void pascal map_load(const char* fn) 2 | { 3 | char magic[MAP_MAGIC_SIZE]; 4 | 5 | file_ropen(fn); 6 | file_read(magic, sizeof(magic)); 7 | file_read(map_section_tiles, sizeof(map_section_tiles)); 8 | file_close(); 9 | } 10 | -------------------------------------------------------------------------------- /th02/formats/pf.hpp: -------------------------------------------------------------------------------- 1 | // TH02 packfile declarations. 2 | 3 | #include "libs/master.lib/master.hpp" 4 | 5 | static inline void game_pfopen(void) { 6 | extern const char pf_fn[]; 7 | pfkey = 0x12; 8 | pfstart(pf_fn); 9 | } 10 | -------------------------------------------------------------------------------- /th02/formats/pfopen[data].asm: -------------------------------------------------------------------------------- 1 | ext_exe db '.exe',0 2 | 3 | ; Unnecessary counter limiting the number of files in an archive. 4 | ; At every call to pfopen's SEEK function, this is reset, incremented 5 | ; for every file skipped when seeking to a particular one, and aborts 6 | ; once it reaches 255. Only actually used in TH02, though. 7 | pf_limit db 0 8 | -------------------------------------------------------------------------------- /th02/formats/pi_load.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "th02/formats/pi.h" 4 | 5 | int DEFCONV pi_load(int slot, const char *fn) 6 | { 7 | #if (GAME >= 3) 8 | pi_free(slot); 9 | #endif 10 | 11 | int ret = graph_pi_load_pack(fn, &pi_headers[slot], &pi_buffers[slot]); 12 | return ret; 13 | } 14 | -------------------------------------------------------------------------------- /th02/formats/pi_slots.inc: -------------------------------------------------------------------------------- 1 | ; PI-related macros. Need to be in a separate file because TASM doesn't seem 2 | ; to like macro definitions inside segments... 3 | 4 | freePISlotLarge macro slot 5 | push ds 6 | push offset _pi_headers + (slot * size PiHeader) 7 | push large [_pi_buffers + (slot * dPtrSize)] 8 | call graph_pi_free 9 | endm 10 | -------------------------------------------------------------------------------- /th02/formats/pi_slots[bss].asm: -------------------------------------------------------------------------------- 1 | public _pi_buffers, _pi_headers 2 | _pi_buffers dd 6 dup(?) 3 | _pi_headers PiHeader 6 dup() 4 | -------------------------------------------------------------------------------- /th02/frmdely1.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/frmdely1.cpp" 2 | -------------------------------------------------------------------------------- /th02/frmdely2.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "libs/master.lib/master.hpp" 4 | #include "th02/hardware/frmdelay.h" 5 | 6 | void pascal frame_delay_2(int frames) 7 | { 8 | vsync_Count1 = 0; 9 | while(vsync_Count1 < frames) {} 10 | } 11 | -------------------------------------------------------------------------------- /th02/gaiji/gameover[data].asm: -------------------------------------------------------------------------------- 1 | gGAMEOVER db 0B0h, 0AAh, 0B7h, 0AEh, 0B8h, 0BFh, 0AEh, 0BBh, 0 2 | gCONTINUE? db 0ACh, 0B8h, 0B6h, 0BDh, 0B2h, 0B6h, 0BEh, 0AEh, 0DDh, 0 3 | gYES db 0C2h, 0AEh, 0BCh, 0 4 | gNO db 0B6h, 0B8h, 0, 0 5 | gCREDIT db 0ACh, 0BBh, 0AEh, 0ADh, 0B2h, 0BDh, 0 6 | -------------------------------------------------------------------------------- /th02/gaiji/loadfree.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/shiftjis/fns.hpp" 2 | #include "th02/gaiji/loadfree.h" 3 | 4 | void near gaiji_load(void) 5 | { 6 | #undef GAIJI_FN 7 | extern const char GAIJI_FN[]; 8 | 9 | gaiji_backup(); 10 | gaiji_entry_bfnt(GAIJI_FN); 11 | } 12 | 13 | void near gaiji_free(void) 14 | { 15 | gaiji_restore(); 16 | } 17 | -------------------------------------------------------------------------------- /th02/gaiji/loadfree.h: -------------------------------------------------------------------------------- 1 | // Backs up the contents of the PC-98 gaiji RAM, then replaces its contents 2 | // with the TH02-specific gaiji. 3 | void near gaiji_load(void); 4 | 5 | // Restores the backup made by gaiji_load(). 6 | void near gaiji_free(void); 7 | -------------------------------------------------------------------------------- /th02/gaiji/ranks_c.c: -------------------------------------------------------------------------------- 1 | // Moved to the right by one character compared to the one in op_04.c. 2 | unsigned char gbcRANKS[4][8] = { 3 | gb_SP, gb_SP, gb_E_, gb_A_, gb_S_, gb_Y_, gb_SP, 0, 4 | gb_SP, gb_N_, gb_O_, gb_R_, gb_M_, gb_A_, gb_L_, 0, 5 | gb_SP, gb_SP, gb_H_, gb_A_, gb_R_, gb_D_, gb_SP, 0, 6 | gb_L_, gb_U_, gb_N_, gb_A_, gb_T_, gb_I_, gb_C_, 0, 7 | }; 8 | -------------------------------------------------------------------------------- /th02/globals.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/core/globals.cpp" 2 | -------------------------------------------------------------------------------- /th02/grp_rect.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/grp_rect.cpp" 2 | -------------------------------------------------------------------------------- /th02/grppsafx.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/grppsafx.cpp" 2 | -------------------------------------------------------------------------------- /th02/hardware/egc.cpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/egc_impl.hpp" 2 | 3 | #pragma option -k- 4 | 5 | void egc_start_copy_noframe(void) 6 | { 7 | egc_on(); 8 | egc_setup_copy(); 9 | } 10 | 11 | #pragma option -k. 12 | -------------------------------------------------------------------------------- /th02/hardware/egc.hpp: -------------------------------------------------------------------------------- 1 | #include "th01/hardware/egc.h" 2 | 3 | // Starts the EGC, and initializes it for a copy. 4 | #if (GAME >= 4) 5 | void near egc_start_copy_noframe(void); 6 | #else 7 | void egc_start_copy_noframe(void); 8 | #endif 9 | -------------------------------------------------------------------------------- /th02/hardware/frmdelay.h: -------------------------------------------------------------------------------- 1 | // Blocks until [frames] number of VSync interrupts have occurred, and returns 2 | // at the beginning of the following vertical blanking interval. 3 | void pascal frame_delay(int frames); 4 | void pascal frame_delay_2(int frames); 5 | -------------------------------------------------------------------------------- /th02/hardware/frmdely1.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "libs/master.lib/master.hpp" 4 | #include "th02/hardware/frmdelay.h" 5 | 6 | void pascal frame_delay(int frames) 7 | { 8 | vsync_Count1 = 0; 9 | while(vsync_Count1 < frames) {} 10 | } 11 | -------------------------------------------------------------------------------- /th02/hardware/grp_rect.h: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | // Blits the rectangle from 4 | // (⌊left/8⌋*8, top) 5 | // to 6 | // (((⌊left/8⌋*8) + (⌊w/16⌋*16)), (top + h)) 7 | // from VRAM page 1 to the same position on VRAM page 0. 8 | void pascal graph_copy_rect_1_to_0_16( 9 | screen_x_t left, vram_y_t top, pixel_t w, pixel_t h 10 | ); 11 | -------------------------------------------------------------------------------- /th02/hardware/input_sense[bss].asm: -------------------------------------------------------------------------------- 1 | public _key_det 2 | _key_det dw ? ; ZUN symbol [MAGNet2010] 3 | -------------------------------------------------------------------------------- /th02/hardware/pages.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | extern page_t page_back; 4 | extern page_t page_front; 5 | -------------------------------------------------------------------------------- /th02/hardware/pages[bss].asm: -------------------------------------------------------------------------------- 1 | public _page_back, _page_front 2 | _page_back db ? 3 | _page_front db ? 4 | -------------------------------------------------------------------------------- /th02/hiscore/regist.inc: -------------------------------------------------------------------------------- 1 | ALPHABET_ROWS = 3 2 | ALPHABET_COLS = 17 3 | 4 | ALPHABET_ENTER_ROW = (ALPHABET_ROWS - 1) 5 | ALPHABET_ENTER_COL = (ALPHABET_COLS - 1) 6 | -------------------------------------------------------------------------------- /th02/hud.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/hud/hud.cpp" 2 | -------------------------------------------------------------------------------- /th02/hud_ovrl.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/hud/overlay.cpp" 2 | -------------------------------------------------------------------------------- /th02/initmain.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/core/initmain.cpp" 2 | -------------------------------------------------------------------------------- /th02/initop.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/core/initop.cpp" 2 | -------------------------------------------------------------------------------- /th02/input_rs.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/input_rs.cpp" 2 | -------------------------------------------------------------------------------- /th02/item.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/item/item.cpp" 2 | -------------------------------------------------------------------------------- /th02/keydelay.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/keydelay.cpp" 2 | -------------------------------------------------------------------------------- /th02/main/boss/b3.cpp: -------------------------------------------------------------------------------- 1 | /// Stage 3 Boss - Five Magic Stones 2 | /// -------------------------------- 3 | 4 | #include "th02/main/boss/b3.hpp" 5 | 6 | // Coordinates 7 | // ----------- 8 | 9 | static const pixel_t STONE_W = 32; 10 | 11 | extern screen_x_t stone_left[STONE_COUNT]; 12 | extern screen_y_t stone_top[STONE_COUNT]; 13 | // ----------- 14 | -------------------------------------------------------------------------------- /th02/main/boss/bosses.hpp: -------------------------------------------------------------------------------- 1 | // TH02-specific boss declarations. 2 | 3 | #include "platform.h" 4 | 5 | // Total amount of frames spent in the Evil Eye Σ fight, excluding the defeat 6 | // animation. 7 | extern uint32_t sigma_frames; 8 | -------------------------------------------------------------------------------- /th02/main/boss/funcs[bss].asm: -------------------------------------------------------------------------------- 1 | ; *_func() functions are "activated" by setting the regular function once the 2 | ; boss battle starts. 3 | public _boss_bg_render 4 | public _boss_update, _boss_update_func 5 | public _boss_init, _boss_end 6 | 7 | _boss_bg_render dd ? 8 | _boss_update dd ? 9 | _boss_update_func dd ? 10 | _boss_init dd ? 11 | _boss_end dd ? 12 | -------------------------------------------------------------------------------- /th02/main/demo.h: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/input.hpp" 2 | 3 | extern int demo_frame; 4 | extern input_t *DemoBuf; /* ZUN symbol [MAGNet2010] */ 5 | -------------------------------------------------------------------------------- /th02/main/demo[bss].asm: -------------------------------------------------------------------------------- 1 | public _DemoBuf 2 | _DemoBuf dd ? ; ZUN symbol [MAGNet2010] 3 | -------------------------------------------------------------------------------- /th02/main/demo[data].asm: -------------------------------------------------------------------------------- 1 | public _demo_frame 2 | _demo_frame dw 0 3 | -------------------------------------------------------------------------------- /th02/main/entity.hpp: -------------------------------------------------------------------------------- 1 | #ifndef TH02_MAIN_ENTITY_HPP 2 | #define TH02_MAIN_ENTITY_HPP 3 | 4 | // Generic entity state flag 5 | enum entity_flag_t { 6 | F_FREE = 0, 7 | F_ALIVE = 1, 8 | F_REMOVE = 2, // Removes the entity from VRAM and transitions to F_FREE. 9 | 10 | _entity_flag_t_FORCE_UINT8 = 0xFF 11 | }; 12 | 13 | #endif // TH02_MAIN_ENTITY_HPP 14 | -------------------------------------------------------------------------------- /th02/main/entity.inc: -------------------------------------------------------------------------------- 1 | F_FREE = 0 2 | F_ALIVE = 1 3 | F_REMOVE = 2 4 | -------------------------------------------------------------------------------- /th02/main/frames.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | // Stage-relative frame counter. Reset to 0 when moving to a new stage. 4 | extern uint32_t stage_frame; 5 | -------------------------------------------------------------------------------- /th02/main/hud/hud.inc: -------------------------------------------------------------------------------- 1 | HUD_LEFT = 56 2 | HUD_KANJI_W = 8 3 | BAR_MAX = 128 4 | -------------------------------------------------------------------------------- /th02/main/hud/power[data].asm: -------------------------------------------------------------------------------- 1 | ; Colors for the power bars. Indexed with [shot_level]. 2 | public _HUD_POWER_COLORS 3 | _HUD_POWER_COLORS label byte 4 | db TX_RED 5 | db TX_RED 6 | db TX_RED 7 | db TX_MAGENTA 8 | db TX_MAGENTA 9 | db TX_BLUE 10 | db TX_GREEN 11 | db TX_CYAN 12 | db TX_YELLOW 13 | if (GAME ge 4) 14 | db TX_WHITE 15 | endif 16 | -------------------------------------------------------------------------------- /th02/main/hud/score_put[data].asm: -------------------------------------------------------------------------------- 1 | public _SEVEN_DIGIT_POWERS_OF_10 2 | _SEVEN_DIGIT_POWERS_OF_10 label dword 3 | dd 1000000 4 | dd 100000 5 | dd 10000 6 | dd 1000 7 | dd 100 8 | dd 10 9 | dd 1 10 | -------------------------------------------------------------------------------- /th02/main/main.hpp: -------------------------------------------------------------------------------- 1 | // Set to `true` to quit out of the main loop. Used to indicate either a Game 2 | // Over or a request to quit to the main menu (which are treated identically 3 | // in this game), or the end of a demo replay. 4 | extern bool quit; 5 | -------------------------------------------------------------------------------- /th02/main/null.asm: -------------------------------------------------------------------------------- 1 | public @nullfunc_void$qv 2 | @nullfunc_void$qv proc far 3 | push bp 4 | mov bp, sp 5 | pop bp 6 | retf 7 | @nullfunc_void$qv endp 8 | 9 | public @nullfunc_false$qv 10 | @nullfunc_false$qv proc far 11 | push bp 12 | mov bp, sp 13 | xor ax, ax 14 | pop bp 15 | retf 16 | @nullfunc_false$qv endp 17 | -------------------------------------------------------------------------------- /th02/main/null.hpp: -------------------------------------------------------------------------------- 1 | // Null functions for disabling callbacks 2 | void nullfunc_void(void); 3 | bool nullfunc_false(void); 4 | -------------------------------------------------------------------------------- /th02/main/player/bomb.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | static const unsigned char BOMB_CIRCLE_FRAMES = 32; 4 | 5 | extern bool bombing; 6 | 7 | // Drops a bomb, if possible. 8 | void pascal near player_bomb(void); 9 | 10 | void near bomb_update_and_render(void); 11 | -------------------------------------------------------------------------------- /th02/main/player/bomb[bss].asm: -------------------------------------------------------------------------------- 1 | BOMB_CIRCLE_FRAMES = 32 2 | 3 | public _bombing, _bomb_frame 4 | _bombing db ? 5 | evendata 6 | _bomb_frame dw ? 7 | dw ? 8 | -------------------------------------------------------------------------------- /th02/main/player/shot.hpp: -------------------------------------------------------------------------------- 1 | void near shots_update_and_render(void); 2 | -------------------------------------------------------------------------------- /th02/main/player/speed[bss].asm: -------------------------------------------------------------------------------- 1 | ; All values are signed. (Yes, allowing you to invert the controls with 2 | ; negative values!) 3 | public _playchar_speed_aligned_x, _playchar_speed_aligned_y 4 | public _playchar_speed_diagonal_x, _playchar_speed_diagonal_y 5 | _playchar_speed_aligned_x db ? 6 | _playchar_speed_aligned_y db ? 7 | _playchar_speed_diagonal_x db ? 8 | _playchar_speed_diagonal_y db ? 9 | -------------------------------------------------------------------------------- /th02/main/playfld.inc: -------------------------------------------------------------------------------- 1 | PLAYFIELD_LEFT = 32 2 | PLAYFIELD_TOP = 16 3 | PLAYFIELD_W = 384 4 | PLAYFIELD_H = 368 5 | 6 | PLAYFIELD_RIGHT = PLAYFIELD_LEFT + PLAYFIELD_W 7 | PLAYFIELD_BOTTOM = PLAYFIELD_TOP + PLAYFIELD_H 8 | 9 | PLAYFIELD_VRAM_LEFT = PLAYFIELD_LEFT / 8 10 | PLAYFIELD_VRAM_W = PLAYFIELD_W / 8 11 | PLAYFIELD_VRAM_RIGHT = PLAYFIELD_RIGHT / 8 12 | -------------------------------------------------------------------------------- /th02/main/slowdown.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | // Number of VSync events to wait for at the end of the current frame. 4 | extern uint8_t slowdown_factor; 5 | -------------------------------------------------------------------------------- /th02/main/stage/bonus.hpp: -------------------------------------------------------------------------------- 1 | // Grants the stage clear bonus, renders its tally to text RAM, and waits for 2 | // a key_delay() key to be pressed. 3 | void near stage_clear_bonus_animate(void); 4 | 5 | // Like stage_clear_bonus_animate(), but for the Extra Stage. 6 | void near stage_extra_clear_bonus_animate(void); 7 | -------------------------------------------------------------------------------- /th02/main/stage/stage.hpp: -------------------------------------------------------------------------------- 1 | extern enum stage_progression_t { 2 | SP_STAGE = 0, // The scrolling part with stage enemies. 3 | SP_BOSS = 1, // The boss fight. 4 | SP_CLEAR = 2, // Calls [boss_end] once returned from [boss_update]. 5 | } stage_progression; 6 | 7 | extern char stage_id; 8 | -------------------------------------------------------------------------------- /th02/main_03.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Code segment #3 of TH02's MAIN.EXE 4 | */ 5 | 6 | #define RANDRING_INSTANCE 2 7 | #include "th02/math/randring.cpp" 8 | #include "th02/main/bullet/pellet_r.cpp" 9 | -------------------------------------------------------------------------------- /th02/maine022.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * 2nd part of code segment #2 of TH02's MAINE.EXE 4 | */ 5 | 6 | #pragma option -zCSHARED 7 | 8 | #include "platform.h" 9 | #include "th02/shiftjis/fns.hpp" 10 | 11 | #include "th02/snd/data.c" 12 | extern const char pf_fn[] = PF_FN; 13 | -------------------------------------------------------------------------------- /th02/math/randring[bss].asm: -------------------------------------------------------------------------------- 1 | ; Ring buffer of random numbers. 2 | 3 | RANDRING_SIZE = 256 4 | 5 | ; TH05 wants it publicly... 6 | public _randring 7 | public _randring_p 8 | 9 | _randring db RANDRING_SIZE dup (?) 10 | if GAME ge 4 11 | _randring_p dw ? 12 | else 13 | _randring_p db ? 14 | db ? 15 | endif 16 | -------------------------------------------------------------------------------- /th02/math/randring_fill.asm: -------------------------------------------------------------------------------- 1 | public @randring_fill$qv 2 | @randring_fill$qv proc near 3 | push bp 4 | mov bp, sp 5 | push si 6 | xor si, si 7 | 8 | @@loop: 9 | call IRand 10 | mov _randring[si], al 11 | inc si 12 | cmp si, RANDRING_SIZE 13 | jl short @@loop 14 | pop si 15 | pop bp 16 | ret 17 | @randring_fill$qv endp 18 | -------------------------------------------------------------------------------- /th02/math/vector.hpp: -------------------------------------------------------------------------------- 1 | void pascal vector2(int &ret_x, int &ret_y, unsigned char angle, int length); 2 | 3 | // Constructs a vector from (x1, y1) to (x2, y2), and additionally applies 4 | // [plus_angle] to the resulting angle between the two points. 5 | void pascal vector2_between_plus( 6 | int x1, 7 | int y1, 8 | int x2, 9 | int y2, 10 | unsigned char plus_angle, 11 | int &ret_x, 12 | int &ret_y, 13 | int length 14 | ); 15 | -------------------------------------------------------------------------------- /th02/mem.h: -------------------------------------------------------------------------------- 1 | // Various memory sizes of external TH02 files. 2 | #define MEM_ASSIGN_PARAS_OP (256000 >> 4) 3 | #define MEM_ASSIGN_PARAS_MAIN (288000 >> 4) 4 | #define MEM_ASSIGN_PARAS_MAINE (288000 >> 4) 5 | 6 | #define DEMO_N 7000 /* ZUN symbol [MAGNet2010] */ 7 | -------------------------------------------------------------------------------- /th02/mem.inc: -------------------------------------------------------------------------------- 1 | ; Various memory sizes of external TH02 files. 2 | MEM_ASSIGN_PARAS_OP equ (256000 shr 4) 3 | MEM_ASSIGN_PARAS_MAIN equ (288000 shr 4) 4 | MEM_ASSIGN_PARAS_MAINE equ (288000 shr 4) 5 | 6 | DEMO_N = 7000 ; ZUN symbol [MAGNet2010] 7 | -------------------------------------------------------------------------------- /th02/mpn_i.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/formats/mpn_i.cpp" 2 | -------------------------------------------------------------------------------- /th02/mpn_l_i.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/formats/mpn_l_i.cpp" 2 | -------------------------------------------------------------------------------- /th02/op/m_music.hpp: -------------------------------------------------------------------------------- 1 | #if (GAME >= 4) 2 | #define MUSICROOM_DISTANCE near 3 | #else 4 | #define MUSICROOM_DISTANCE 5 | #endif 6 | 7 | // Runs the Music Room menu and returns with VRAM page #0 as the shown and 8 | // accessed one. TH02 reblits the title screen background to that page before 9 | // returning; the other games return with a black screen. 10 | void MUSICROOM_DISTANCE musicroom_menu(void); 11 | -------------------------------------------------------------------------------- /th02/op/op.h: -------------------------------------------------------------------------------- 1 | #include "th02/common.h" 2 | 3 | extern char cleared_game_with[SHOTTYPE_COUNT]; 4 | extern char cleared_extra_with[SHOTTYPE_COUNT]; 5 | 6 | int cleardata_load(void); 7 | -------------------------------------------------------------------------------- /th02/op_04.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/op_04.cpp -------------------------------------------------------------------------------- /th02/op_05.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/op_05.cpp -------------------------------------------------------------------------------- /th02/op_music.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/op/m_music.cpp" 2 | -------------------------------------------------------------------------------- /th02/pi_load.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/formats/pi_load.cpp" 2 | -------------------------------------------------------------------------------- /th02/pi_put.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/formats/pi_put.cpp" 2 | -------------------------------------------------------------------------------- /th02/player.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/player/player.cpp" 2 | -------------------------------------------------------------------------------- /th02/player_b.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/player/bomb.cpp" 2 | -------------------------------------------------------------------------------- /th02/pointnum.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/pointnum/pointnum.cpp" 2 | -------------------------------------------------------------------------------- /th02/regist_m.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hiscore/regist.cpp" 2 | -------------------------------------------------------------------------------- /th02/res_init.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/res_init.cpp -------------------------------------------------------------------------------- /th02/score.h: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | #define SCORE_DIGITS 8 4 | 5 | // Later games use a binary-coded decimal representation. 6 | #if (GAME == 2) 7 | // A value that can be as large as the highest possible gameplay score. 8 | // A few places in TH02's code do require this type to be signed. 9 | typedef int32_t score_t; 10 | #endif 11 | -------------------------------------------------------------------------------- /th02/score.inc: -------------------------------------------------------------------------------- 1 | SCORE_DIGITS = 8 2 | -------------------------------------------------------------------------------- /th02/scorelod.c: -------------------------------------------------------------------------------- 1 | #include "libs/master.lib/master.hpp" 2 | 3 | extern const char* SCOREDAT_FN; 4 | 5 | void near scoredat_load(void) 6 | { 7 | int byte; 8 | file_ropen(SCOREDAT_FN); 9 | file_seek(rank * sizeof(hi), 0); 10 | file_read(&hi, sizeof(hi)); 11 | for(byte = 0; byte < sizeof(hi.score); byte++) { 12 | *((uint8_t *)(&hi.score) + byte) -= 0x12; 13 | } 14 | file_close(); 15 | } 16 | -------------------------------------------------------------------------------- /th02/shiftjis/bgm.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/shiftjis/bgm.hpp -------------------------------------------------------------------------------- /th02/shiftjis/end.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/shiftjis/end.hpp -------------------------------------------------------------------------------- /th02/shiftjis/fns.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/shiftjis/fns.hpp -------------------------------------------------------------------------------- /th02/shiftjis/music.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/shiftjis/music.hpp -------------------------------------------------------------------------------- /th02/shiftjis/op_main.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/shiftjis/op_main.hpp -------------------------------------------------------------------------------- /th02/shiftjis/title.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/shiftjis/title.hpp -------------------------------------------------------------------------------- /th02/snd/data.c: -------------------------------------------------------------------------------- 1 | bool snd_active = 0; 2 | char snd_unused = 0; // ZUN bloat 3 | -------------------------------------------------------------------------------- /th02/snd/delaymea.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "th02/hardware/frmdelay.h" 4 | #include "th02/snd/measure.hpp" 5 | 6 | void snd_delay_until_measure(int measure) 7 | { 8 | if(!snd_active) { 9 | frame_delay(SND_FALLBACK_DELAY_FRAMES); 10 | return; 11 | } 12 | do { 13 | frame_delay(1); 14 | } while(snd_get_song_measure() < measure); 15 | } 16 | -------------------------------------------------------------------------------- /th02/snd/delayvol.c: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "x86real.h" 4 | #include "th02/snd/snd.h" 5 | 6 | void snd_delay_until_volume(uint8_t volume) 7 | { 8 | while(1) { 9 | _AH = KAJA_GET_VOLUME; 10 | if(snd_midi_active != true) { 11 | geninterrupt(PMD); 12 | } else { 13 | geninterrupt(MMD); 14 | } 15 | _asm { cmp al, volume; } 16 | _asm { jz end; } 17 | } 18 | end: 19 | } 20 | #pragma codestring "\x90" 21 | -------------------------------------------------------------------------------- /th02/snd/load[bss].asm: -------------------------------------------------------------------------------- 1 | SND_LOAD_FN_LEN equ 13 2 | public _snd_load_fn 3 | _snd_load_fn db SND_LOAD_FN_LEN dup(?) 4 | db ? ; word alignment 5 | -------------------------------------------------------------------------------- /th02/snd/se_data.c: -------------------------------------------------------------------------------- 1 | #define SE_COUNT 33 2 | 3 | unsigned char snd_se_playing = -1; 4 | unsigned char snd_se_priorities[SE_COUNT] = { 5 | 0, 0, 32, 9, 2, 16, 5, 6, 48, 8, 9, 5, 16, 10, 17, 12, 32, 32, 16 6 | }; 7 | unsigned char snd_se_priority_frames[SE_COUNT] = { 8 | 0, 0, 36, 16, 4, 16, 8, 10, 48, 80, 24, 17, 11, 4, 80, 16, 48, 74, 32 9 | }; 10 | unsigned char snd_se_frame = 0; 11 | -------------------------------------------------------------------------------- /th02/snd/se_reset.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED -WX -k- 2 | 3 | #include "th02/snd/snd.h" 4 | #include "th02/snd/impl.hpp" 5 | 6 | void snd_se_reset(void) 7 | { 8 | snd_se_frame = 0; 9 | snd_se_playing = SE_NONE; 10 | } 11 | #pragma codestring "\x90" 12 | -------------------------------------------------------------------------------- /th02/snd/snd.inc: -------------------------------------------------------------------------------- 1 | SND_LOAD_SONG equ (KAJA_GET_SONG_ADDRESS shl 8) 2 | SND_LOAD_SE equ (PMD_GET_SE_ADDRESS shl 8) 3 | -------------------------------------------------------------------------------- /th02/snd/snd[bss].asm: -------------------------------------------------------------------------------- 1 | public _snd_fm_possible 2 | _snd_fm_possible db ? 3 | public _snd_midi_active 4 | _snd_midi_active db ? 5 | public _snd_interrupt_if_midi 6 | _snd_interrupt_if_midi db ? ; has no effect 7 | public _snd_midi_possible 8 | _snd_midi_possible db ? 9 | -------------------------------------------------------------------------------- /th02/snd_dlym.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/delaymea.cpp" 2 | -------------------------------------------------------------------------------- /th02/snd_dlyv.c: -------------------------------------------------------------------------------- 1 | #include "th02/snd/delayvol.c" 2 | -------------------------------------------------------------------------------- /th02/snd_kaja.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/kajaint.cpp" 2 | -------------------------------------------------------------------------------- /th02/snd_load.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/load.cpp" 2 | -------------------------------------------------------------------------------- /th02/snd_mmdr.c: -------------------------------------------------------------------------------- 1 | #include "th02/snd/mmd_res.c" 2 | -------------------------------------------------------------------------------- /th02/snd_mode.c: -------------------------------------------------------------------------------- 1 | #include "th02/snd/detmode.c" 2 | -------------------------------------------------------------------------------- /th02/snd_pmdr.c: -------------------------------------------------------------------------------- 1 | #include "th02/snd/pmd_res.c" 2 | -------------------------------------------------------------------------------- /th02/snd_se.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/se.cpp" 2 | -------------------------------------------------------------------------------- /th02/snd_se_r.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/se_reset.cpp" 2 | -------------------------------------------------------------------------------- /th02/spark.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/spark.cpp" 2 | -------------------------------------------------------------------------------- /th02/spark_i.asm: -------------------------------------------------------------------------------- 1 | include th02/main/spark_i.asm 2 | -------------------------------------------------------------------------------- /th02/sprites/bombpart.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/sprites/bombpart.bmp -------------------------------------------------------------------------------- /th02/sprites/bombpart.h: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define BOMB_PARTICLE_W 8 4 | #define BOMB_PARTICLE_H 8 5 | static const int BOMB_PARTICLE_CELS = 4; 6 | 7 | typedef dots_t(BOMB_PARTICLE_W) bomb_particle_dots_t; 8 | 9 | extern const bomb_particle_dots_t sBOMB_PARTICLES[BOMB_PARTICLE_CELS + 1][ 10 | BOMB_PARTICLE_H 11 | ]; 12 | #define sBOMB_CIRCLE sBOMB_PARTICLES[BOMB_PARTICLE_CELS] 13 | -------------------------------------------------------------------------------- /th02/sprites/bullet16.h: -------------------------------------------------------------------------------- 1 | #define BULLET16_W 16 2 | #define BULLET16_H 16 3 | -------------------------------------------------------------------------------- /th02/sprites/cels.h: -------------------------------------------------------------------------------- 1 | #define ENEMY_CELS 4 2 | #define ENEMY_KILL_CELS 8 3 | #define SHOT_CELS 2 4 | -------------------------------------------------------------------------------- /th02/sprites/cels.inc: -------------------------------------------------------------------------------- 1 | ENEMY_KILL_CELS = 8 2 | -------------------------------------------------------------------------------- /th02/sprites/main_pat.inc: -------------------------------------------------------------------------------- 1 | PAT_PLAYCHAR_STILL = 0 2 | PAT_PLAYCHAR_LEFT = 2 3 | PAT_PLAYCHAR_RIGHT = 3 4 | PAT_PLAYCHAR_MISS = 4 5 | PAT_ITEM_POWER = 68 6 | PAT_ITEM_POINT = 69 7 | PAT_ITEM_BOMB = 70 8 | PAT_ITEM_BIGPOWER = 71 9 | PAT_OPTION_A = 72 10 | PAT_OPTION_B = 73 11 | PAT_OPTION_C = 74 12 | PAT_ITEM_1UP = 87 13 | -------------------------------------------------------------------------------- /th02/sprites/pellet.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/sprites/pellet.bmp -------------------------------------------------------------------------------- /th02/sprites/pointnum.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/sprites/pointnum.bmp -------------------------------------------------------------------------------- /th02/sprites/sparks.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/sprites/sparks.bmp -------------------------------------------------------------------------------- /th02/sprites/sparks.h: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define SPARK_W 8 4 | #define SPARK_H 8 5 | static const unsigned int SPARK_CELS = 8; 6 | 7 | extern const dots16_t sSPARKS[PRESHIFT][SPARK_CELS][SPARK_H]; 8 | -------------------------------------------------------------------------------- /th02/sprites/verdict.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/sprites/verdict.bmp -------------------------------------------------------------------------------- /th02/sprites/verdict.hpp: -------------------------------------------------------------------------------- 1 | // These masks are applied on top of each other, and should therefore combine 2 | // into a bitmap with every bit set. 3 | // ZUN bloat: Could have been compressed down to 4 rows. 4 | static const int VERDICT_MASK_COUNT = 3; 5 | #define VERDICT_MASK_W 16 6 | #define VERDICT_MASK_H 16 7 | -------------------------------------------------------------------------------- /th02/staff.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/end/staff.cpp" 2 | -------------------------------------------------------------------------------- /th02/tile.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/main/tile/tile.cpp" 2 | -------------------------------------------------------------------------------- /th02/v_colors.hpp: -------------------------------------------------------------------------------- 1 | // Commonly used VRAM hardware palette indices across all three executables, 2 | // and later games as well. 3 | enum th02_vram_colors_t { 4 | V_WHITE = 15, 5 | }; 6 | -------------------------------------------------------------------------------- /th02/v_colors.inc: -------------------------------------------------------------------------------- 1 | V_WHITE = 15 2 | -------------------------------------------------------------------------------- /th02/vector.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/math/vector.cpp" 2 | -------------------------------------------------------------------------------- /th02/zun_res1.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02/zun_res1.cpp -------------------------------------------------------------------------------- /th02/zunerror.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "x86real.h" 4 | #include "th02/core/zunerror.h" 5 | 6 | void pascal zun_error(zun_error_t err) 7 | { 8 | _AX = err; 9 | geninterrupt(0x59); 10 | } 11 | -------------------------------------------------------------------------------- /th02_main.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02_main.asm -------------------------------------------------------------------------------- /th02_zuninit.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th02_zuninit.asm -------------------------------------------------------------------------------- /th03/cdg_load.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/cdg_load.cpp" 2 | -------------------------------------------------------------------------------- /th03/cdg_put.asm: -------------------------------------------------------------------------------- 1 | include th03/formats/cdg_put.asm 2 | -------------------------------------------------------------------------------- /th03/cfg_lres.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/cfg_lres.cpp" 2 | -------------------------------------------------------------------------------- /th03/chars.inc: -------------------------------------------------------------------------------- 1 | PLAYCHAR_REIMU = 0 2 | PLAYCHAR_MIMA = 1 3 | PLAYCHAR_MARISA = 2 4 | PLAYCHAR_ELLEN = 3 5 | PLAYCHAR_KOTOHIME = 4 6 | PLAYCHAR_KANA = 5 7 | PLAYCHAR_RIKAKO = 6 8 | PLAYCHAR_CHIYURI = 7 9 | PLAYCHAR_YUMEMI = 8 10 | PLAYCHAR_COUNT = 9 11 | -------------------------------------------------------------------------------- /th03/collmap.asm: -------------------------------------------------------------------------------- 1 | include th03/main/collmap.asm 2 | -------------------------------------------------------------------------------- /th03/common.h: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Common, essential macros for TH03. No structures here! 4 | */ 5 | 6 | #include "platform.h" 7 | 8 | // Player ID. ZUN bloat: Only keep `pid_t`. 9 | typedef unsigned char pid_t; 10 | typedef int16_t pid2; 11 | 12 | #define PLAYER_COUNT 2 13 | -------------------------------------------------------------------------------- /th03/common.inc: -------------------------------------------------------------------------------- 1 | PLAYER_COUNT = 2 2 | -------------------------------------------------------------------------------- /th03/core/exitmain.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED -Z 2 | 3 | #include "libs/master.lib/master.hpp" 4 | #include "libs/master.lib/pc98_gfx.hpp" 5 | #include "th03/core/initexit.h" 6 | 7 | void game_exit_from_mainl_to_main() 8 | { 9 | pfend(); 10 | graph_accesspage(0); 11 | graph_showpage(0); 12 | vsync_end(); 13 | mem_unassign(); 14 | js_end(); 15 | egc_start(); 16 | } 17 | -------------------------------------------------------------------------------- /th03/cutscene.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/cutscene/cutscene.cpp" 2 | -------------------------------------------------------------------------------- /th03/exit.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/core/exit.cpp" 2 | -------------------------------------------------------------------------------- /th03/exitmain.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/exitmain.cpp" 2 | -------------------------------------------------------------------------------- /th03/formats/cdg[bss].asm: -------------------------------------------------------------------------------- 1 | include th03/formats/cdg.inc 2 | 3 | public _cdg_slots 4 | _cdg_slots cdg_t CDG_SLOT_COUNT dup() 5 | -------------------------------------------------------------------------------- /th03/formats/cdg[data].asm: -------------------------------------------------------------------------------- 1 | public _cdg_noalpha 2 | _cdg_noalpha db ? 3 | align 2 4 | -------------------------------------------------------------------------------- /th03/formats/cdg_free_all.asm: -------------------------------------------------------------------------------- 1 | public CDG_FREE_ALL 2 | cdg_free_all proc near 3 | push bp 4 | mov bp, sp 5 | push si 6 | xor si, si 7 | jmp short @@done? 8 | 9 | @@loop: 10 | call cdg_free pascal, si 11 | inc si 12 | 13 | @@done?: 14 | cmp si, CDG_SLOT_COUNT 15 | jl short @@loop 16 | pop si 17 | pop bp 18 | retn 19 | cdg_free_all endp 20 | -------------------------------------------------------------------------------- /th03/formats/cfg_lres.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/cfg_impl.hpp" 2 | 3 | resident_t __seg* near cfg_load_resident_ptr(void) 4 | { 5 | #undef CFG_FN 6 | extern const char CFG_FN[]; 7 | cfg_t cfg; 8 | return cfg_load_and_set_resident(cfg, CFG_FN); 9 | } 10 | -------------------------------------------------------------------------------- /th03/formats/cfg_lres[data].asm: -------------------------------------------------------------------------------- 1 | public _CFG_FN 2 | _CFG_FN db 'YUME.CFG',0 3 | -------------------------------------------------------------------------------- /th03/formats/hfliplut.h: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | // Lookup table for horizontally flipping a dots8_t. 4 | extern dots8_t hflip_lut[256]; 5 | 6 | // Fills [hflip_lut]. 7 | void hflip_lut_generate(void); 8 | -------------------------------------------------------------------------------- /th03/formats/hfliplut[bss].asm: -------------------------------------------------------------------------------- 1 | public _hflip_lut 2 | _hflip_lut db 100h dup(?) 3 | -------------------------------------------------------------------------------- /th03/formats/pi_put_masked[data].asm: -------------------------------------------------------------------------------- 1 | PI_MASK_H = 4 2 | 3 | public _PI_MASKS 4 | _PI_MASKS label word 5 | ; 0 6 | dw 00000h 7 | dw 01111h 8 | dw 00000h 9 | dw 04444h 10 | ; 1 11 | dw 08888h 12 | dw 01111h 13 | dw 02222h 14 | dw 04444h 15 | ; 2 16 | dw 0AAAAh 17 | dw 05555h 18 | dw 0AAAAh 19 | dw 05555h 20 | ; 3 21 | dw 0EEEEh 22 | dw 07777h 23 | dw 0BBBBh 24 | dw 0DDDDh 25 | -------------------------------------------------------------------------------- /th03/formats/win.hpp: -------------------------------------------------------------------------------- 1 | // TH03's win screen lines are stored in another simple plaintext file that 2 | // contains one 3×60-byte block of lines per playchar, followed by two more 3 | // fixed blocks shown at the end of stages 6 and 7. In contrast to TH02's 4 | // dialog text files, these don't use any padding bytes. 5 | 6 | static const int WIN_LINES = 3; 7 | static const int WIN_LINE_SIZE = 60; 8 | -------------------------------------------------------------------------------- /th03/gaiji/bar.inc: -------------------------------------------------------------------------------- 1 | G_BAR = 020h 2 | g_BAR_01W = 020h 3 | g_BAR_02W = 021h 4 | g_BAR_03W = 022h 5 | g_BAR_04W = 023h 6 | g_BAR_05W = 024h 7 | g_BAR_06W = 025h 8 | g_BAR_07W = 026h 9 | g_BAR_08W = 027h 10 | g_BAR_09W = 028h 11 | g_BAR_10W = 029h 12 | g_BAR_11W = 02Ah 13 | g_BAR_12W = 02Bh 14 | g_BAR_13W = 02Ch 15 | g_BAR_14W = 02Dh 16 | g_BAR_15W = 02Eh 17 | g_BAR_16W = 02Fh 18 | 19 | BAR_GAIJI_MAX = 16 20 | -------------------------------------------------------------------------------- /th03/grppsafx.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/hardware/grppsafx.cpp" 2 | -------------------------------------------------------------------------------- /th03/hardware/input[bss].asm: -------------------------------------------------------------------------------- 1 | public _input_mp_p1, _input_mp_p2, _input_sp 2 | _input_mp_p1 twobyte_t 3 | _input_mp_p2 twobyte_t 4 | _input_sp twobyte_t 5 | -------------------------------------------------------------------------------- /th03/hardware/input_modes[bss].asm: -------------------------------------------------------------------------------- 1 | public _input_mode 2 | _input_mode dd ? 3 | -------------------------------------------------------------------------------- /th03/hardware/palette.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | extern bool palette_changed; 4 | 5 | // Updates the actual hardware palette at the end of the frame. 6 | #define palette_settone_deferred(tone) { \ 7 | PaletteTone = tone; \ 8 | palette_changed = true; \ 9 | } 10 | -------------------------------------------------------------------------------- /th03/hardware/palette_changed[bss].asm: -------------------------------------------------------------------------------- 1 | ; Must be set to 1 if the hardware palette should be updated at the end of a 2 | ; regular, non-menu game frame. Otherwise, palette or tone changes during a 3 | ; frame won't actually be visible. 4 | public _palette_changed 5 | _palette_changed db ? 6 | -------------------------------------------------------------------------------- /th03/hfliplut.asm: -------------------------------------------------------------------------------- 1 | include th03/formats/hfliplut.asm 2 | -------------------------------------------------------------------------------- /th03/hiscore/regist[bss].asm: -------------------------------------------------------------------------------- 1 | PLACE_NONE = (-1) 2 | 3 | public _entered_place 4 | if (GAME ge 4) 5 | _entered_place db ? 6 | else 7 | _entered_place dw ? 8 | endif 9 | -------------------------------------------------------------------------------- /th03/hitcirc.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/main/hitcirc.cpp" 2 | -------------------------------------------------------------------------------- /th03/hud_stat.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/main/hud/static.cpp" 2 | -------------------------------------------------------------------------------- /th03/initmain.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/initmain.cpp" 2 | -------------------------------------------------------------------------------- /th03/initop.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/initop.cpp" 2 | -------------------------------------------------------------------------------- /th03/inp_wait.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/hardware/inp_wait.cpp" 2 | -------------------------------------------------------------------------------- /th03/input_s.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/hardware/input_s.cpp" 2 | -------------------------------------------------------------------------------- /th03/main/5_powers_of_10[data].asm: -------------------------------------------------------------------------------- 1 | public _FIVE_DIGIT_POWERS_OF_10 2 | _FIVE_DIGIT_POWERS_OF_10 dw 10000, 1000, 100, 10, 1 3 | -------------------------------------------------------------------------------- /th03/main/chars/speed.hpp: -------------------------------------------------------------------------------- 1 | #include "th01/math/subpixel.hpp" 2 | #include "th03/playchar.hpp" 3 | 4 | struct speed_t { 5 | SPPoint8 aligned; 6 | SPPoint8 diagonal; 7 | }; 8 | 9 | struct playchar_speed_t { 10 | speed_t motion; 11 | unsigned char gauge_charge; 12 | }; 13 | 14 | extern playchar_speed_t PLAYCHAR_SPEEDS[PLAYCHAR_COUNT + 1]; 15 | -------------------------------------------------------------------------------- /th03/main/collmap.inc: -------------------------------------------------------------------------------- 1 | COLLMAP_TILE_W = 2 2 | COLLMAP_TILE_H = 2 3 | COLLMAP_TILE_W_BITS = 1 4 | COLLMAP_TILE_H_BITS = 1 5 | 6 | COLLMAP_MEMORY_W = ((PLAYFIELD_W / COLLMAP_TILE_W) / 8) 7 | COLLMAP_H = (PLAYFIELD_H / COLLMAP_TILE_H) 8 | COLLMAP_SIZE = COLLMAP_MEMORY_W * COLLMAP_H 9 | 10 | COLLMAP_RECT_VSTRIPE_DISTANCE = 4 11 | COLLMAP_SLOPE_VSTRIPE_DISTANCE = 2 12 | -------------------------------------------------------------------------------- /th03/main/collmap_reset.asm: -------------------------------------------------------------------------------- 1 | public _collmap_reset 2 | _collmap_reset proc near 3 | push di 4 | mov ax, ds 5 | mov es, ax 6 | mov di, offset _collmap 7 | mov cx, ((COLLMAP_SIZE * PLAYER_COUNT) / dword) 8 | xor eax, eax 9 | rep stosd 10 | pop di 11 | retn 12 | _collmap_reset endp 13 | even 14 | -------------------------------------------------------------------------------- /th03/main/demo.h: -------------------------------------------------------------------------------- 1 | // Not in mem.h because it doesn't define a file size in TH03 2 | #define DEMO_N 7000 /* ZUN symbol [MAGNet2010] */ 3 | 4 | extern unsigned int demo_frame; 5 | -------------------------------------------------------------------------------- /th03/main/demo[bss].asm: -------------------------------------------------------------------------------- 1 | DEMO_N = 7000 ; ZUN symbol [MAGNet2010] 2 | 3 | public _demo_frame 4 | _demo_frame dw ? 5 | -------------------------------------------------------------------------------- /th03/main/frame_mod[bss].asm: -------------------------------------------------------------------------------- 1 | public _round_frame_mod2, _round_frame_mod4 2 | public _round_frame_mod8, _round_frame_mod16 3 | _round_frame_mod2 db ? 4 | _round_frame_mod4 db ? 5 | _round_frame_mod8 db ? 6 | _round_frame_mod16 db ? 7 | -------------------------------------------------------------------------------- /th03/main/hitbox.hpp: -------------------------------------------------------------------------------- 1 | #include "th03/main/playfld.hpp" 2 | 3 | // A shared global hitbox. 4 | extern struct { 5 | // ZUN bloat: Use separate variables. 6 | union { 7 | PlayfieldPoint topleft; 8 | PlayfieldPoint center; 9 | } origin; 10 | 11 | PlayfieldPoint radius; 12 | PlayfieldSubpixel right; 13 | PlayfieldSubpixel bottom; 14 | } hitbox; 15 | -------------------------------------------------------------------------------- /th03/main/player/bomb.inc: -------------------------------------------------------------------------------- 1 | BOMB_FRAMES = 180 2 | 3 | BOMB_INACTIVE = 0 4 | BOMB_PREPARING = 1 5 | BOMB_ACTIVE = 2 6 | -------------------------------------------------------------------------------- /th03/main/player/ch_shot.hpp: -------------------------------------------------------------------------------- 1 | // Charge Shots 2 | // ------------ 3 | 4 | #include "th03/common.h" 5 | #include "th01/math/subpixel.hpp" 6 | 7 | typedef void (far pascal *near chargeshot_add_func_t)( 8 | Subpixel center_x, Subpixel center_y 9 | ); 10 | 11 | extern farfunc_t_near chargeshot_update[PLAYER_COUNT]; 12 | extern farfunc_t_near chargeshot_render[PLAYER_COUNT]; 13 | -------------------------------------------------------------------------------- /th03/main/player/chargeshot[bss].asm: -------------------------------------------------------------------------------- 1 | public _chargeshot_update_p1, _chargeshot_update_p2 2 | public _chargeshot_render_p1, _chargeshot_render_p2 3 | _chargeshot_update_p1 dd ? 4 | _chargeshot_update_p2 dd ? 5 | _chargeshot_render_p1 dd ? 6 | _chargeshot_render_p2 dd ? 7 | -------------------------------------------------------------------------------- /th03/main/player/combo[bss].asm: -------------------------------------------------------------------------------- 1 | combo_t struc 2 | COMBO_time db ? 3 | hits db ? 4 | bonus dw ? 5 | combo_t ends 6 | 7 | COMBO_FRAMES = 80 8 | COMBO_HIT_RESET_FRAMES = 32 9 | COMBO_HIT_MIN = 2 10 | COMBO_HIT_CAP = 99 11 | COMBO_BONUS_CAP = 65535 12 | 13 | public _combos 14 | _combos combo_t PLAYER_COUNT dup() 15 | -------------------------------------------------------------------------------- /th03/main/player/combo[data].asm: -------------------------------------------------------------------------------- 1 | public _gsHIT, _gBONUS_FRAME, _aBONUS_FRAME_SPACES 2 | _gsHIT db 0Ch, 0Dh, 0 3 | _gBONUS_FRAME db 0Ah, 0Bh, 0Eh, 0Fh,0 4 | _aBONUS_FRAME_SPACES db ' ',0 5 | -------------------------------------------------------------------------------- /th03/main/player/hitcombo[bss].asm: -------------------------------------------------------------------------------- 1 | HITCOMBO_RING_SIZE = 16 2 | 3 | public _hitcombo_ring 4 | _hitcombo_ring db PLAYER_COUNT dup (HITCOMBO_RING_SIZE dup(?)) 5 | -------------------------------------------------------------------------------- /th03/main/player/hitcombo[data].asm: -------------------------------------------------------------------------------- 1 | public _hitcombo_ring_p 2 | _hitcombo_ring_p db PLAYER_COUNT dup(0) 3 | -------------------------------------------------------------------------------- /th03/main/player/score[bss].asm: -------------------------------------------------------------------------------- 1 | public _score, _score_p1, _score_p2 2 | _score label byte 3 | _score_p1 db SCORE_DIGITS dup(?) 4 | _score_p2 db SCORE_DIGITS dup(?) 5 | 6 | public _temp_lebcd 7 | _temp_lebcd db SCORE_DIGITS dup(?) 8 | -------------------------------------------------------------------------------- /th03/main/player/win[bss].asm: -------------------------------------------------------------------------------- 1 | public _win_combo_hits_max 2 | public _win_gauge_attacks_fired, _win_boss_attacks_fired 3 | public _win_boss_attacks_reversed, _win_boss_panics_fired 4 | _win_combo_hits_max db ? 5 | _win_gauge_attacks_fired db ? 6 | _win_boss_attacks_fired db ? 7 | _win_boss_attacks_reversed db ? 8 | _win_boss_panics_fired db ? 9 | -------------------------------------------------------------------------------- /th03/main/playfield_fg_x[bss].asm: -------------------------------------------------------------------------------- 1 | public _playfield_fg_shift_x 2 | _playfield_fg_shift_x dw PLAYFIELD_COUNT dup(?) 3 | -------------------------------------------------------------------------------- /th03/main/v_colors.hpp: -------------------------------------------------------------------------------- 1 | // Commonly used VRAM hardware palette indices in MAIN.EXE. 2 | enum th03_main_vram_colors_t { 3 | V_YELLOW_DARK = 11, 4 | V_YELLOW_BRIGHT = 12, 5 | V_WHITE = 15, 6 | }; 7 | -------------------------------------------------------------------------------- /th03/main_010.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * 1st part of code segment #1 of TH03's MAIN.EXE 4 | */ 5 | 6 | #include "th03/main/player/stuff.cpp" 7 | -------------------------------------------------------------------------------- /th03/mainl_sc.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/mainl/screens.cpp" 2 | -------------------------------------------------------------------------------- /th03/math/polar.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "th03/math/polar.hpp" 4 | 5 | int polar(int center, int radius, int ratio) 6 | { 7 | return (((static_cast(radius) * ratio) >> 8) + center); 8 | } 9 | -------------------------------------------------------------------------------- /th03/math/randring_fill.asm: -------------------------------------------------------------------------------- 1 | public @randring_fill$qv 2 | @randring_fill$qv proc near 3 | push si 4 | mov si, RANDRING_SIZE - 1 5 | 6 | @@loop: 7 | call IRand 8 | mov _randring[si], al 9 | dec si 10 | jge short @@loop 11 | if GAME ge 4 12 | mov _randring_p, 0 13 | endif 14 | pop si 15 | ret 16 | @randring_fill$qv endp 17 | -------------------------------------------------------------------------------- /th03/math/subpixel.inc: -------------------------------------------------------------------------------- 1 | SPPoint8 struc 2 | x8 db ? 3 | y8 db ? 4 | SPPoint8 ends 5 | -------------------------------------------------------------------------------- /th03/math/vector.hpp: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include "th02/math/vector.hpp" 3 | } 4 | -------------------------------------------------------------------------------- /th03/mem.h: -------------------------------------------------------------------------------- 1 | // Various memory sizes of external TH03 files. 2 | #define MEM_ASSIGN_PARAS_OP (352000 >> 4) 3 | #define MEM_ASSIGN_PARAS_MAIN (288000 >> 4) 4 | #define MEM_ASSIGN_PARAS_MAINL (288000 >> 4) 5 | -------------------------------------------------------------------------------- /th03/mem.inc: -------------------------------------------------------------------------------- 1 | ; Various memory sizes of external TH03 files. 2 | MEM_ASSIGN_PARAS_OP equ (352000 shr 4) 3 | MEM_ASSIGN_PARAS_MAIN equ (288000 shr 4) 4 | MEM_ASSIGN_PARAS_MAINL equ (288000 shr 4) 5 | -------------------------------------------------------------------------------- /th03/mrs.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/mrs.cpp" 2 | -------------------------------------------------------------------------------- /th03/op_02.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zPgroup_01 2 | 3 | #include "libs/master.lib/master.hpp" 4 | #include "th03/common.h" 5 | #include "th03/formats/scoredat.hpp" 6 | 7 | const char near* SCOREDAT_FN = "YUME.NEM"; 8 | scoredat_section_t hi; 9 | 10 | #include "th03/formats/score_es.cpp" 11 | -------------------------------------------------------------------------------- /th03/op_main.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/op/m_main.cpp" 2 | -------------------------------------------------------------------------------- /th03/op_music.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/op/m_music.cpp" 2 | -------------------------------------------------------------------------------- /th03/op_sel.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/op/m_select.cpp" 2 | -------------------------------------------------------------------------------- /th03/pi_load.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/formats/pi_load.cpp" 2 | -------------------------------------------------------------------------------- /th03/pi_put.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/formats/pi_put.cpp" 2 | -------------------------------------------------------------------------------- /th03/pi_put_i.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/pi_put_i.cpp" 2 | -------------------------------------------------------------------------------- /th03/pi_put_q.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/pi_put_q.cpp" 2 | -------------------------------------------------------------------------------- /th03/player_m.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/main/player/move.cpp" 2 | -------------------------------------------------------------------------------- /th03/playfld.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/main/playfld.cpp" 2 | -------------------------------------------------------------------------------- /th03/polar.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/math/polar.cpp" 2 | -------------------------------------------------------------------------------- /th03/regist.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/hiscore/regist.cpp" 2 | -------------------------------------------------------------------------------- /th03/res_yume.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/res_yume.cpp -------------------------------------------------------------------------------- /th03/scoredat.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/scoredat.cpp" 2 | -------------------------------------------------------------------------------- /th03/shiftjis/bgm.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/shiftjis/bgm.hpp -------------------------------------------------------------------------------- /th03/shiftjis/fns.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/shiftjis/fns.hpp -------------------------------------------------------------------------------- /th03/shiftjis/fnshared.hpp: -------------------------------------------------------------------------------- 1 | // File names shared between TH03 and later games 2 | 3 | #define GAIJI_FN "GAMEFT.bft" 4 | -------------------------------------------------------------------------------- /th03/shiftjis/main.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/shiftjis/main.hpp -------------------------------------------------------------------------------- /th03/shiftjis/music.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/shiftjis/music.hpp -------------------------------------------------------------------------------- /th03/shiftjis/regist.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | #include "shiftjis.hpp" 3 | 4 | static const pixel_t REGIST_PLAYCHAR_W = (6 * GLYPH_FULL_W); 5 | 6 | extern const shiftjis_t* REGIST_PLAYCHARS[]; 7 | -------------------------------------------------------------------------------- /th03/snd/delaymea.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "th02/hardware/frmdelay.h" 4 | #include "th02/snd/measure.hpp" 5 | 6 | void pascal snd_delay_until_measure(int measure, unsigned int frames_if_no_bgm) 7 | { 8 | if(!snd_bgm_active()) { 9 | frame_delay(frames_if_no_bgm); 10 | return; 11 | } 12 | while(snd_get_song_measure() < measure) { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /th03/snd/se_state[data].asm: -------------------------------------------------------------------------------- 1 | public _snd_se_playing 2 | _snd_se_playing db -1 3 | public _snd_se_frame 4 | _snd_se_frame db 0 5 | -------------------------------------------------------------------------------- /th03/snd/snd.h: -------------------------------------------------------------------------------- 1 | #include "th02/snd/snd.h" 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | // Replaces the hardcoded no-BGM delay from the TH02 one with a customizable 8 | // one, while fixing none of the issues from the TH02 version. 9 | void pascal snd_delay_until_measure(int measure, unsigned int frames_if_no_bgm); 10 | 11 | #ifdef __cplusplus 12 | } 13 | #endif 14 | -------------------------------------------------------------------------------- /th03/snd_dlym.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/snd/delaymea.cpp" 2 | -------------------------------------------------------------------------------- /th03/snd_kaja.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/kajaint.cpp" 2 | -------------------------------------------------------------------------------- /th03/snd_se.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/se.cpp" 2 | -------------------------------------------------------------------------------- /th03/sprite16.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/main/sprite16.cpp" 2 | -------------------------------------------------------------------------------- /th03/sprite16.inc: -------------------------------------------------------------------------------- 1 | ; sprite16_put_func_t 2 | SPF_DOWNWARDS_COLUMN = 24 3 | -------------------------------------------------------------------------------- /th03/sprite16[bss].asm: -------------------------------------------------------------------------------- 1 | public _sprite16_clip, _sprite16_put_size 2 | label _sprite16_clip byte 3 | _sprite16_clip_left dw ? 4 | _sprite16_clip_right dw ? 5 | label _sprite16_put_size byte 6 | _sprite16_put_h dw ? 7 | _sprite16_put_w db ? 8 | evendata 9 | -------------------------------------------------------------------------------- /th03/sprites/flake.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/sprites/flake.bmp -------------------------------------------------------------------------------- /th03/sprites/flake.h: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define FLAKE_W 8 4 | #define FLAKE_H 8 5 | static const unsigned int FLAKE_CELS = 4; 6 | 7 | // ZUN left an extra 16 pixels of room to load the rows using a single 16-bit 8 | // `MOV`. 9 | typedef dots16_t flake_dots_t; 10 | 11 | extern const DotRect near sFLAKE[FLAKE_CELS]; 12 | -------------------------------------------------------------------------------- /th03/sprites/main_s16.hpp: -------------------------------------------------------------------------------- 1 | // SPRITE16 sprite area contents for MAIN.EXE. 2 | 3 | #include "th03/main/sprite16.hpp" 4 | 5 | #define XY(x, y) ((y * ROW_SIZE) + (x / BYTE_DOTS)) 6 | 7 | // Base position for all attack sprites 8 | static const sprite16_offset_t SO_ATTACK_P1 = XY(0, 0); 9 | static const sprite16_offset_t SO_ATTACK_P2 = XY(320, 0); 10 | 11 | static const sprite16_offset_t SO_HITCIRCLE = XY(128, 80); 12 | -------------------------------------------------------------------------------- /th03/sprites/main_s16.inc: -------------------------------------------------------------------------------- 1 | SO_ATTACK_P1 = ((0 * ROW_SIZE) + ( 0 / BYTE_DOTS)) 2 | SO_ATTACK_P2 = ((0 * ROW_SIZE) + (320 / BYTE_DOTS)) 3 | -------------------------------------------------------------------------------- /th03/sprites/playchar.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | static const pixel_t PLAYCHAR_PIC_W = 192; 4 | static const pixel_t PLAYCHAR_PIC_H = 192; 5 | -------------------------------------------------------------------------------- /th03/sprites/pointnum.hpp: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define POINTNUM_W 8 4 | #define POINTNUM_H 8 5 | 6 | #define POINTNUM 0 7 | #define POINTNUM_TIMES 10 8 | #define POINTNUM_EMPTY 12 9 | #define POINTNUM_COUNT 13 10 | 11 | extern const dot_rect_t(POINTNUM_W, POINTNUM_H) sPOINTNUMS[POINTNUM_COUNT]; 12 | -------------------------------------------------------------------------------- /th03/sprites/score.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03/sprites/score.bmp -------------------------------------------------------------------------------- /th03/sprites/score.hpp: -------------------------------------------------------------------------------- 1 | // In-game score font. Stored upside down. 2 | 3 | #include "planar.h" 4 | 5 | #define SCORE_FONT_W 8 6 | #define SCORE_FONT_H 8 7 | extern const dot_rect_t(SCORE_FONT_W, SCORE_FONT_H) sSCORE_FONT[10]; 8 | -------------------------------------------------------------------------------- /th03/staff.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/end/staff.cpp" 2 | -------------------------------------------------------------------------------- /th03/vector.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/math/vector.cpp" 2 | -------------------------------------------------------------------------------- /th03_main.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03_main.asm -------------------------------------------------------------------------------- /th03_mainl.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th03_mainl.asm -------------------------------------------------------------------------------- /th04/bgimage.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hardware/bgimage.cpp" 2 | -------------------------------------------------------------------------------- /th04/bgimager.asm: -------------------------------------------------------------------------------- 1 | include th04/hardware/bgimager.asm 2 | -------------------------------------------------------------------------------- /th04/boss.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/boss.cpp" 2 | -------------------------------------------------------------------------------- /th04/boss_4m.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/b4m.cpp" 2 | -------------------------------------------------------------------------------- /th04/boss_4r.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/b4r.cpp" 2 | -------------------------------------------------------------------------------- /th04/boss_bd.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/backdrop.cpp" 2 | -------------------------------------------------------------------------------- /th04/boss_exp.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/explode.cpp" 2 | -------------------------------------------------------------------------------- /th04/boss_x2.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/bx2.cpp" 2 | -------------------------------------------------------------------------------- /th04/bullet_u.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zPmain_03 2 | #include "th04/main/bullet/update.cpp" 3 | -------------------------------------------------------------------------------- /th04/cdg_load.asm: -------------------------------------------------------------------------------- 1 | include th04/formats/cdg_load.asm 2 | -------------------------------------------------------------------------------- /th04/cdg_p_na.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/cdg_p_na.cpp" 2 | -------------------------------------------------------------------------------- /th04/cdg_p_nc.asm: -------------------------------------------------------------------------------- 1 | include th04/formats/cdg_p_nc.asm 2 | -------------------------------------------------------------------------------- /th04/cdg_p_pl.asm: -------------------------------------------------------------------------------- 1 | include th04/formats/cdg_p_pl.asm 2 | -------------------------------------------------------------------------------- /th04/cdg_p_pr.asm: -------------------------------------------------------------------------------- 1 | include th04/formats/cdg_p_pr.asm 2 | -------------------------------------------------------------------------------- /th04/cdg_put.asm: -------------------------------------------------------------------------------- 1 | include th04/formats/cdg_put.asm 2 | -------------------------------------------------------------------------------- /th04/cfg_lres.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/formats/cfg_lres.cpp" 2 | -------------------------------------------------------------------------------- /th04/chars.inc: -------------------------------------------------------------------------------- 1 | PLAYCHAR_REIMU = 0 2 | PLAYCHAR_MARISA = 1 3 | PLAYCHAR_COUNT = 2 4 | 5 | SHOTTYPE_A = 0 6 | SHOTTYPE_B = 1 7 | SHOTTYPE_COUNT = 2 8 | -------------------------------------------------------------------------------- /th04/checkerb.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/checkerb.cpp" 2 | -------------------------------------------------------------------------------- /th04/circle.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/circle.cpp" 2 | -------------------------------------------------------------------------------- /th04/common.h: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * Common, essential macros for TH04. No types here! 4 | */ 5 | 6 | #define MAIN_STAGE_COUNT 6 7 | #define STAGE_EXTRA MAIN_STAGE_COUNT 8 | -------------------------------------------------------------------------------- /th04/cutscene.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/cutscene/cutscene.cpp" 2 | -------------------------------------------------------------------------------- /th04/demo.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/demo.cpp" 2 | -------------------------------------------------------------------------------- /th04/dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/dialog/dialog.cpp" 2 | -------------------------------------------------------------------------------- /th04/egcrect.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hardware/egcrect.cpp" 2 | -------------------------------------------------------------------------------- /th04/ems.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/ems.cpp" 2 | -------------------------------------------------------------------------------- /th04/end/end.h: -------------------------------------------------------------------------------- 1 | typedef enum { 2 | ES_GOOD = 0xFF, 3 | ES_BAD = 0xFE, 4 | ES_EXTRA = 0xFD, 5 | ES_INGAME = 0x37, 6 | ES_SCORE = 0, 7 | } end_sequence_t; 8 | -------------------------------------------------------------------------------- /th04/end/end.inc: -------------------------------------------------------------------------------- 1 | ES_GOOD = 0FFh 2 | ES_BAD = 0FEh 3 | ES_EXTRA = 0FDh 4 | ES_INGAME = 037h 5 | ES_SCORE = 0 6 | -------------------------------------------------------------------------------- /th04/end/staff.hpp: -------------------------------------------------------------------------------- 1 | void near staffroll_animate(void); 2 | -------------------------------------------------------------------------------- /th04/end/verdict.hpp: -------------------------------------------------------------------------------- 1 | void near verdict_animate(void); 2 | -------------------------------------------------------------------------------- /th04/exit.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/core/exit.cpp" 2 | -------------------------------------------------------------------------------- /th04/f_dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/dialog.cpp" 2 | -------------------------------------------------------------------------------- /th04/formats/bb.inc: -------------------------------------------------------------------------------- 1 | BB_SIZE = 2048 2 | 3 | BB_TXT_W = 32 4 | BB_TXT_H = 32 5 | BB_TXT_VRAM_W = (BB_TXT_W / 8) 6 | -------------------------------------------------------------------------------- /th04/formats/bb_playchar[bss].asm: -------------------------------------------------------------------------------- 1 | public _bb_playchar_seg 2 | _bb_playchar_seg dw ? 3 | -------------------------------------------------------------------------------- /th04/formats/bb_playchar[data].asm: -------------------------------------------------------------------------------- 1 | public _bb_playchar_bb_fn, _bb_playchar_cdg_fn 2 | _bb_playchar_bb_fn dd aBb0_bb 3 | _bb_playchar_cdg_fn dd aBb0_cdg_1 4 | aBb0_bb db 'BB0.BB',0 5 | aBb0_cdg_1 db 'BB0.CDG',0 6 | db 0 7 | -------------------------------------------------------------------------------- /th04/formats/bb_txt_load[data].asm: -------------------------------------------------------------------------------- 1 | public aTxt_bb, aTxt2_bb 2 | aTxt_bb db 'txt.bb',0 3 | aTxt2_bb db 'txt2.bb',0 4 | db 0 5 | -------------------------------------------------------------------------------- /th04/formats/cdg[bss].asm: -------------------------------------------------------------------------------- 1 | include th03/formats/cdg[bss].asm 2 | public cdg_images_to_load 3 | cdg_images_to_load db ? 4 | evendata 5 | -------------------------------------------------------------------------------- /th04/formats/cfg_lres[data].asm: -------------------------------------------------------------------------------- 1 | public _CFG_FN 2 | _CFG_FN db 'MIKO.CFG',0 3 | -------------------------------------------------------------------------------- /th04/formats/map.inc: -------------------------------------------------------------------------------- 1 | ; .map file header. 2 | 3 | map_header_t struc 4 | map_size dw ? 5 | ; Number of 25×5 tile sections in this .MAP 6 | map_section_count dw ? 7 | map_unk dw 2 dup (?) 8 | map_header_t ends 9 | -------------------------------------------------------------------------------- /th04/formats/mpn_free.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED 2 | 3 | #include "libs/master.lib/master.hpp" 4 | #include "th02/formats/tile.hpp" 5 | #include "th04/formats/mpn.hpp" 6 | 7 | void pascal mpn_free(int slot) 8 | { 9 | mpn_t near &mpn = mpn_slots[slot]; 10 | if(mpn.images) { 11 | hmem_free(static_cast(mpn.images)); 12 | mpn.images = nullptr; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /th04/formats/scoredat[bss].asm: -------------------------------------------------------------------------------- 1 | public _hi 2 | _hi scoredat_section_t 3 | -------------------------------------------------------------------------------- /th04/formats/std[bss].asm: -------------------------------------------------------------------------------- 1 | if GAME eq 5 2 | public _std_size_in_data_segment 3 | _std_size_in_data_segment dw ? 4 | endif 5 | public _std_enemy_scripts 6 | _std_enemy_scripts dw 32 dup(?) 7 | public _std_ip 8 | _std_ip dd ? 9 | -------------------------------------------------------------------------------- /th04/formats/std[data].asm: -------------------------------------------------------------------------------- 1 | public _std_seg, _std_fn 2 | _std_seg dw 0 3 | if GAME eq 5 4 | _std_fn db 'ST00.STD', 0 5 | else 6 | _std_fn dd aSt00_std 7 | aSt00_std db 'ST00.STD', 0 8 | endif 9 | db 0 10 | -------------------------------------------------------------------------------- /th04/gaiji/gameover[data].asm: -------------------------------------------------------------------------------- 1 | gGAMEOVER db 0B0h, 0AAh, 0B6h, 0AEh, 0B8h, 0BFh, 0AEh, 0BBh, 0, 0 2 | gCONTINUE? db 0ACh, 0B8h, 0B7h, 0BDh, 0B2h, 0B7h, 0BEh, 0AEh, 8, 0, 0 3 | gYES db 0C2h, 0AEh, 0BCh, 0 4 | gNO db 0B7h, 0B8h, 0 5 | gCREDIT db 0ACh, 0BBh, 0AEh, 0ADh, 0B2h, 0BDh, 0 6 | -------------------------------------------------------------------------------- /th04/gaiji/pause[data].asm: -------------------------------------------------------------------------------- 1 | gsCHUUDAN db 0F0h, 0F1h, 0 2 | gsSAIKAI db 0F2h, 0F3h, 0 3 | gsSHUURYOU db 0F4h, 0F5h, 0 4 | -------------------------------------------------------------------------------- /th04/gather.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/gather.cpp" 2 | -------------------------------------------------------------------------------- /th04/grcg_3.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hardware/grcg_3.cpp" 2 | -------------------------------------------------------------------------------- /th04/grppsafx.asm: -------------------------------------------------------------------------------- 1 | include th04/hardware/grppsafx.asm 2 | -------------------------------------------------------------------------------- /th04/hardware/bgimage[data].asm: -------------------------------------------------------------------------------- 1 | public _bgimage 2 | _bgimage label word 3 | bgimage_PL_B dw 0 4 | bgimage_PL_R dw 0 5 | bgimage_PL_G dw 0 6 | bgimage_PL_E dw 0 7 | -------------------------------------------------------------------------------- /th04/hardware/egcrect[bss].asm: -------------------------------------------------------------------------------- 1 | public _egcrect_w 2 | _egcrect_w dw ? 3 | -------------------------------------------------------------------------------- /th04/hardware/grcg_modecol.asm: -------------------------------------------------------------------------------- 1 | public @grcg_setmode_rmw$qv 2 | @grcg_setmode_rmw$qv proc near 3 | GRCG_SETMODE_VIA_MOV al, GC_RMW 4 | ret 5 | @grcg_setmode_rmw$qv endp 6 | even 7 | 8 | public @grcg_setmode_tdw$qv 9 | @grcg_setmode_tdw$qv proc near 10 | GRCG_SETMODE_VIA_MOV al, GC_TDW 11 | ret 12 | @grcg_setmode_tdw$qv endp 13 | even 14 | 15 | GRCG_SETCOLOR_DIRECT_DEF 16 | -------------------------------------------------------------------------------- /th04/hardware/grppsafx.inc: -------------------------------------------------------------------------------- 1 | include th01/hardware/grppsafx.inc 2 | 3 | FX_WEIGHT_NORMAL = WEIGHT_NORMAL 4 | FX_WEIGHT_HEAVY = WEIGHT_HEAVY 5 | FX_WEIGHT_BOLD = WEIGHT_BOLD 6 | FX_WEIGHT_BLACK = WEIGHT_BLACK 7 | FX_MASK = 4 8 | FX_MASK_1 = 4 9 | FX_MASK_2 = 5 10 | FX_MASK_3 = 6 11 | FX_MASK_4 = 7 12 | FX_MASK_END = 8 13 | -------------------------------------------------------------------------------- /th04/hardware/input[bss].asm: -------------------------------------------------------------------------------- 1 | public _key_det, _shiftkey 2 | _key_det twobyte_t ; ZUN symbol [MAGNet2010] 3 | _shiftkey db ? ; ZUN symbol [MAGNet2010] 4 | db ? ; word alignment 5 | -------------------------------------------------------------------------------- /th04/hi_end.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hiscore/end.cpp" 2 | -------------------------------------------------------------------------------- /th04/hi_view.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hiscore/view.cpp" 2 | -------------------------------------------------------------------------------- /th04/hiscore/end.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/recreate.cpp" 2 | #include "th04/hiscore/scoredat.cpp" 3 | -------------------------------------------------------------------------------- /th04/hiscore/hiscore.h: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | void pascal near score_stage_put( 4 | screen_x_t x, screen_y_t y, unsigned int g_stage 5 | ); 6 | -------------------------------------------------------------------------------- /th04/hiscore/regist.hpp: -------------------------------------------------------------------------------- 1 | void near regist_menu(void); 2 | -------------------------------------------------------------------------------- /th04/hud_hp.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/hud/hp.cpp" 2 | -------------------------------------------------------------------------------- /th04/hud_ovrl.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/hud/overlay.cpp" 2 | -------------------------------------------------------------------------------- /th04/initmain.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/initmain.cpp" 2 | #pragma codestring "\x00" 3 | -------------------------------------------------------------------------------- /th04/initop.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/initop.cpp" 2 | #pragma codestring "\x00" 3 | -------------------------------------------------------------------------------- /th04/input_s.asm: -------------------------------------------------------------------------------- 1 | include th04/hardware/input_s.asm 2 | -------------------------------------------------------------------------------- /th04/input_w.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hardware/input_w.cpp" 2 | -------------------------------------------------------------------------------- /th04/it_spl_u.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/item/splash_u.cpp" 2 | -------------------------------------------------------------------------------- /th04/main/bg.hpp: -------------------------------------------------------------------------------- 1 | // Background rendering function pointers. 2 | 3 | #include "platform.h" 4 | 5 | extern nearfunc_t_near bg_render_not_bombing; 6 | extern nearfunc_t_near bg_render_bombing; 7 | 8 | // Must be kept in sync with [bg_render_not_bombing] outside a bomb animation. 9 | extern nearfunc_t_near bg_render_bombing_func; 10 | -------------------------------------------------------------------------------- /th04/main/boss/bg[bss].asm: -------------------------------------------------------------------------------- 1 | public _tiles_bb_col, _boss_backdrop_colorfill, _tiles_bb_seg 2 | _tiles_bb_col db ? 3 | evendata 4 | ; Called with the GRCG set to the [color] parameter to boss_bg_render(), this 5 | ; function is supposed to fill the entire playfield area around the background 6 | ; image with the given color. 7 | _boss_backdrop_colorfill dw ? 8 | _tiles_bb_seg dw ? 9 | -------------------------------------------------------------------------------- /th04/main/boss/bx1.cpp: -------------------------------------------------------------------------------- 1 | extern unsigned char mugetsu_phase2_mode; 2 | 3 | void pascal near mugetsu_phase2_next( 4 | explosion_type_t explosion_type, int next_end_hp 5 | ); 6 | -------------------------------------------------------------------------------- /th04/main/boss/end[data].asm: -------------------------------------------------------------------------------- 1 | public _BOSS_ITEM_DROPS 2 | label _BOSS_ITEM_DROPS byte 3 | db IT_POWER, IT_POWER, IT_BIGPOWER, IT_POWER, IT_POWER 4 | if GAME eq 4 5 | db IT_POWER, IT_POWER, IT_POWER, IT_POWER, IT_POWER 6 | endif 7 | db IT_POINT, IT_POINT, IT_POINT, IT_POINT, IT_POINT 8 | 9 | public _boss_phase_timed_out 10 | _boss_phase_timed_out db 0 11 | -------------------------------------------------------------------------------- /th04/main/boss/explode_big.asm: -------------------------------------------------------------------------------- 1 | public @BOSS_EXPLODE_BIG$QUI 2 | @boss_explode_big$qui proc near 3 | 4 | @@type = word ptr 4 5 | 6 | push bp 7 | mov bp, sp 8 | push si 9 | mov si, offset _explosions_big 10 | EXPLOSION_TYPED 11 | @boss_explode_big$qui endp 12 | -------------------------------------------------------------------------------- /th04/main/boss/explosions_big[data].asm: -------------------------------------------------------------------------------- 1 | public _explosion_big_frame 2 | _explosion_big_frame dw 0 3 | -------------------------------------------------------------------------------- /th04/main/boss/explosions_reset.asm: -------------------------------------------------------------------------------- 1 | public @explosions_small_reset$qv 2 | @explosions_small_reset$qv proc far 3 | push bp 4 | mov bp, sp 5 | mov _explosions_small[0 * size explosion_t].EXPLOSION_alive, 0 6 | mov _explosions_small[1 * size explosion_t].EXPLOSION_alive, 0 7 | pop bp 8 | retf 9 | @explosions_small_reset$qv endp 10 | -------------------------------------------------------------------------------- /th04/main/bullet/laser_t.cpp: -------------------------------------------------------------------------------- 1 | /// Thick lasers 2 | /// ------------ 3 | 4 | #include "th04/main/bullet/laser_t.hpp" 5 | 6 | void near pascal thicklaser_template_pull(thicklaser_t near& thicklaser) 7 | ; 8 | -------------------------------------------------------------------------------- /th04/main/bullet/pellet_r[bss].asm: -------------------------------------------------------------------------------- 1 | public _pellets_render_count 2 | _pellets_render_count dw ? 3 | -------------------------------------------------------------------------------- /th04/main/bullet/template[bss].asm: -------------------------------------------------------------------------------- 1 | public _bullet_template 2 | _bullet_template bullet_template_t 3 | -------------------------------------------------------------------------------- /th04/main/bullet/tune[bss].asm: -------------------------------------------------------------------------------- 1 | public _bullet_template_tune 2 | _bullet_template_tune dw ? 3 | -------------------------------------------------------------------------------- /th04/main/circles[bss].asm: -------------------------------------------------------------------------------- 1 | circle_t struc 2 | flag db ? 3 | age db ? 4 | center Point ? 5 | radius_cur dw ? 6 | radius_delta dw ? 7 | circle_t ends 8 | 9 | if GAME eq 5 10 | CIRCLE_COUNT = 8 11 | else 12 | CIRCLE_COUNT = 16 13 | endif 14 | public _circles 15 | _circles circle_t CIRCLE_COUNT dup() 16 | -------------------------------------------------------------------------------- /th04/main/circles_color[bss].asm: -------------------------------------------------------------------------------- 1 | public _circles_color 2 | _circles_color db ? 3 | evendata 4 | -------------------------------------------------------------------------------- /th04/main/custom[bss].asm: -------------------------------------------------------------------------------- 1 | custom_t struc 2 | db 26 dup (?) 3 | custom_t ends 4 | 5 | public _custom_entities 6 | _custom_entities custom_t CUSTOM_COUNT dup () 7 | custom_t ; 1 additional unused one, for some reason? 8 | -------------------------------------------------------------------------------- /th04/main/demo[data].asm: -------------------------------------------------------------------------------- 1 | public _demo_fn, _DEMOPLAY_BINARY_OP 2 | _demo_fn db 'DEMO0.REC',0 3 | _DEMOPLAY_BINARY_OP db 'op',0 4 | -------------------------------------------------------------------------------- /th04/main/dialog/dialog[bss].asm: -------------------------------------------------------------------------------- 1 | public _std_update, _dialog_p, _dialog_cursor, _dialog_side 2 | _std_update dw ? 3 | _dialog_p dd ? 4 | _dialog_cursor Point 5 | _dialog_side dw ? 6 | -------------------------------------------------------------------------------- /th04/main/drawp.hpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/playfld.hpp" 2 | 3 | // A random shared point variable used for drawing various things. 4 | extern PlayfieldPoint drawpoint; 5 | -------------------------------------------------------------------------------- /th04/main/drawpoint[bss].asm: -------------------------------------------------------------------------------- 1 | public _drawpoint 2 | _drawpoint Point 3 | -------------------------------------------------------------------------------- /th04/main/ems[bss].asm: -------------------------------------------------------------------------------- 1 | public _Ems 2 | _Ems dw ? ; ZUN symbol [MAGNet2010] 3 | -------------------------------------------------------------------------------- /th04/main/end.hpp: -------------------------------------------------------------------------------- 1 | // Launch into MAINE.EXE, showing the respective ending. 2 | #if (GAME == 5) 3 | void end_game(void); 4 | #else 5 | void end_game_good(void); 6 | void end_game_bad(void); 7 | 8 | inline void end_game(void) { 9 | end_game_good(); 10 | } 11 | #endif 12 | void end_extra(void); 13 | -------------------------------------------------------------------------------- /th04/main/enemy/enemies[bss].asm: -------------------------------------------------------------------------------- 1 | ENEMY_W = 32 2 | ENEMY_H = 32 3 | 4 | EF_FREE = 0 5 | EF_ALIVE = 1 6 | EF_KILLED = 2 7 | EF_ALIVE_FIRST_FRAME = 3 8 | EF_KILL_ANIM = 80h 9 | 10 | ENEMY_COUNT = 32 11 | 12 | ENEMY_POS_RANDOM = (999 shl 4) 13 | 14 | public _enemies 15 | _enemies enemy_t ENEMY_COUNT dup () 16 | -------------------------------------------------------------------------------- /th04/main/enemy/size.hpp: -------------------------------------------------------------------------------- 1 | #include "pc98.h" 2 | 3 | #define ENEMY_W 32 4 | #define ENEMY_H 32 5 | 6 | static const pixel_t ENEMY_KILL_W = 32; 7 | static const pixel_t ENEMY_KILL_H = 32; 8 | -------------------------------------------------------------------------------- /th04/main/frames[bss].asm: -------------------------------------------------------------------------------- 1 | public _frames_unused, _stage_frame 2 | public _stage_frame_mod2, _stage_frame_mod4 3 | public _stage_frame_mod8, _stage_frame_mod16 4 | public _slowdown_factor 5 | _frames_unused dd ? 6 | _stage_frame dw ? 7 | _stage_frame_mod2 db ? 8 | _stage_frame_mod4 db ? 9 | _stage_frame_mod8 db ? 10 | _stage_frame_mod16 db ? 11 | _slowdown_factor dw ? 12 | -------------------------------------------------------------------------------- /th04/main/frames[data].asm: -------------------------------------------------------------------------------- 1 | public _total_slow_frames, _total_frames, _total_std_frames 2 | _total_slow_frames dd 0 3 | _total_frames dd 0 4 | _total_std_frames dw 0 5 | -------------------------------------------------------------------------------- /th04/main/gather[bss].asm: -------------------------------------------------------------------------------- 1 | public _gather_circles, _gather_template 2 | _gather_circles gather_t GATHER_COUNT dup () 3 | _gather_unused gather_t 2 dup () 4 | _gather_template gather_template_t 5 | -------------------------------------------------------------------------------- /th04/main/homing.hpp: -------------------------------------------------------------------------------- 1 | #include "th01/math/subpixel.hpp" 2 | 3 | // Setting both [x] and [y] to Subpixel::None() indicates no current target. 4 | extern SPPoint homing_target; 5 | -------------------------------------------------------------------------------- /th04/main/homing_target[bss].asm: -------------------------------------------------------------------------------- 1 | public _homing_target 2 | _homing_target Point 3 | -------------------------------------------------------------------------------- /th04/main/hud/bar_put[data].asm: -------------------------------------------------------------------------------- 1 | public _hud_bar_max 2 | _hud_bar_max label byte 3 | db g_BAR_MAX_0, g_BAR_MAX_1, g_BAR_MAX_2, g_BAR_MAX_3 4 | db g_BAR_MAX_4, g_BAR_MAX_5, g_BAR_MAX_6, g_BAR_MAX_7 5 | db 0 ; '\0'! 6 | -------------------------------------------------------------------------------- /th04/main/hud/gaiji_row[data].asm: -------------------------------------------------------------------------------- 1 | ; Shared buffer for one full row of gaiji characters. Used for temporarily 2 | ; storing the two scores, and the enemy health, dream, and power bars. 3 | public _hud_gaiji_row 4 | _hud_gaiji_row db (HUD_KANJI_W + 1) dup (0) 5 | db 0 ; (word alignment) 6 | -------------------------------------------------------------------------------- /th04/main/hud/hp[data].asm: -------------------------------------------------------------------------------- 1 | ; Blank line to remove HP bar 2 | public _gHUD_HP_BLANK 3 | _gHUD_HP_BLANK label byte 4 | rept HUD_KANJI_W 5 | db g_EMPTY 6 | endm 7 | db 0 ; '\0' 8 | 9 | ; Colors for the HP bars. 10 | public _HUD_HP_COLORS 11 | _HUD_HP_COLORS label byte 12 | db TX_RED 13 | db TX_MAGENTA 14 | db TX_CYAN 15 | db TX_YELLOW 16 | db TX_WHITE 17 | HUD_HP_COLOR_COUNT = ($ - _HUD_HP_COLORS) 18 | -------------------------------------------------------------------------------- /th04/main/hud/hud[data].asm: -------------------------------------------------------------------------------- 1 | public _hud_hp_bar_value_prev 2 | _hud_hp_bar_value_prev dw 0 3 | -------------------------------------------------------------------------------- /th04/main/hud/overlay.inc: -------------------------------------------------------------------------------- 1 | POPUP_TRAM_Y = 2 2 | 3 | POPUP_ID_HISCORE_ENTRY = 0 4 | POPUP_ID_EXTEND = 1 5 | POPUP_ID_BONUS = 2 6 | POPUP_ID_FULL_POWERUP = 3 7 | if GAME eq 5 8 | POPUP_ID_DREAMBONUS_MAX = 4 9 | endif 10 | -------------------------------------------------------------------------------- /th04/main/item/splash_dot_render.asm: -------------------------------------------------------------------------------- 1 | public @item_splash_dot_render 2 | @item_splash_dot_render proc near 3 | mov cx, ax 4 | sar ax, 3 5 | shl dx, 6 6 | add ax, dx 7 | shr dx, 2 8 | add ax, dx 9 | mov bx, ax 10 | mov al, 10000000b 11 | and cl, 7 12 | shr al, cl 13 | mov es:[bx], al 14 | retn 15 | @item_splash_dot_render endp 16 | -------------------------------------------------------------------------------- /th04/main/midboss/funcs[bss].asm: -------------------------------------------------------------------------------- 1 | public _midboss_active, _midboss_invalidate 2 | public _midboss_update, _midboss_update_func 3 | public _midboss_render, _midboss_render_func 4 | 5 | _midboss_active db ? 6 | evendata 7 | _midboss_invalidate dw ? 8 | _midboss_update dd ? 9 | _midboss_render dw ? 10 | _midboss_update_func dd ? 11 | _midboss_render_func dw ? 12 | -------------------------------------------------------------------------------- /th04/main/midboss/m3.cpp: -------------------------------------------------------------------------------- 1 | /// Stage 3 midboss 2 | /// --------------- 3 | 4 | #include "platform.h" 5 | 6 | #define patterns_done midboss3_patterns_done 7 | #define FLY_ANGLES MIDBOSS3_FLY_ANGLES 8 | 9 | // Constants 10 | // --------- 11 | 12 | static const uint8_t PATTERNS_MAX = 12; 13 | 14 | extern const unsigned char FLY_ANGLES[PATTERNS_MAX]; 15 | // --------- 16 | -------------------------------------------------------------------------------- /th04/main/null.asm: -------------------------------------------------------------------------------- 1 | public NULLFUNC_NEAR 2 | nullfunc_near proc near 3 | retn 4 | nullfunc_near endp 5 | even 6 | 7 | 8 | public NULLFUNC_FAR 9 | nullfunc_far proc far 10 | retf 11 | nullfunc_far endp 12 | even 13 | -------------------------------------------------------------------------------- /th04/main/null.hpp: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | // Null functions for disabling callbacks 3 | void pascal near nullfunc_near(void); 4 | void pascal far nullfunc_far(void); 5 | } 6 | -------------------------------------------------------------------------------- /th04/main/pattern.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | // A danmaku pattern function with no fixed maximum time. Fires projectiles in 4 | // repeating cycles until no longer called. 5 | typedef void (near *near pattern_loop_func_t)(void); 6 | 7 | // A danmaku pattern function that runs for a limited amount of time. Should 8 | // return `true` when done. 9 | typedef bool (near *near pattern_oneshot_func_t)(void); 10 | -------------------------------------------------------------------------------- /th04/main/pause.h: -------------------------------------------------------------------------------- 1 | // Returns 1 if the game should quit. 2 | int pause(void); 3 | -------------------------------------------------------------------------------- /th04/main/pause[data].asm: -------------------------------------------------------------------------------- 1 | public _aGAME_PAUSE_SPACES_2, _aGAME_PAUSE_SPACES_2, _aGAME_PAUSE_SPACES_3 2 | _aGAME_PAUSE_SPACES_1 db ' ',0 3 | _aGAME_PAUSE_SPACES_2 db ' ',0 4 | _aGAME_PAUSE_SPACES_3 db ' ',0 5 | -------------------------------------------------------------------------------- /th04/main/phase.hpp: -------------------------------------------------------------------------------- 1 | // Common midboss and boss phases 2 | static const unsigned char PHASE_HP_FILL = 0; 3 | static const unsigned char PHASE_BOSS_ENTRANCE_BB = 1; 4 | #if (GAME == 5) 5 | static const unsigned char PHASE_BOSS_EXPLODE_SMALL = 253; 6 | static const unsigned char PHASE_BOSS_EXPLODE_BIG = 254; 7 | #endif 8 | static const unsigned char PHASE_EXPLODE_BIG = 254; 9 | static const unsigned char PHASE_NONE = 255; 10 | -------------------------------------------------------------------------------- /th04/main/phase.inc: -------------------------------------------------------------------------------- 1 | PHASE_BOSS_HP_FILL = 0 2 | PHASE_BOSS_ENTRANCE_BB = 1 3 | if (GAME eq 5) 4 | PHASE_BOSS_EXPLODE_SMALL = 253 5 | PHASE_BOSS_EXPLODE_BIG = 254 6 | endif 7 | PHASE_EXPLODE_BIG = 254 8 | PHASE_NONE = 255 9 | -------------------------------------------------------------------------------- /th04/main/play[bss].asm: -------------------------------------------------------------------------------- 1 | public _stage_id, _playperf, _playperf_max, _playperf_min, _playchar 2 | _stage_id db ? 3 | if GAME eq 5 4 | public _rank 5 | _rank db ? 6 | endif 7 | _playperf db ? 8 | _playperf_max db ? 9 | _playperf_min db ? 10 | _playchar db ? 11 | evendata 12 | -------------------------------------------------------------------------------- /th04/main/player/bomb.cpp: -------------------------------------------------------------------------------- 1 | void pascal near bb_playchar_put(int cel) 2 | ; 3 | -------------------------------------------------------------------------------- /th04/main/player/bomb[bss].asm: -------------------------------------------------------------------------------- 1 | public _bombing, _bomb_frame, _playchar_bomb_func 2 | 3 | _bombing db ? 4 | _bomb_frame db ? 5 | if GAME eq 4 6 | public _player_bomb_func 7 | _player_bomb_func dw ? 8 | endif 9 | _playchar_bomb_func dw ? 10 | -------------------------------------------------------------------------------- /th04/main/player/bombanim[bss].asm: -------------------------------------------------------------------------------- 1 | BOMB_STAR_COUNT = 48 2 | BOMB_STAR_W = 16 3 | BOMB_STAR_H = 16 4 | 5 | bomb_star_t struc 6 | BS_center Point 7 | BS_angle db ? 8 | BS_speed db ? 9 | bomb_star_t ends 10 | 11 | public _bomb_stars 12 | _bomb_stars bomb_star_t BOMB_STAR_COUNT dup () 13 | bomb_star_t ; 1 additional unused one, for some reason? 14 | -------------------------------------------------------------------------------- /th04/main/player/option[bss].asm: -------------------------------------------------------------------------------- 1 | ; The player's options are supposed to lag behind the player's movement by one 2 | ; frame, and therefore have to be tracked separately. 3 | 4 | public _player_option_pos_cur, _player_option_pos_prev 5 | _player_option_pos_cur Point 6 | _player_option_pos_prev Point 7 | if GAME eq 4 8 | _player_option_patnum dw ? 9 | else 10 | _player_option_patnum = PAT_OPTION 11 | endif 12 | -------------------------------------------------------------------------------- /th04/main/player/p_marisa.cpp: -------------------------------------------------------------------------------- 1 | /// Marisa's shot control functions 2 | /// ------------------------------- 3 | 4 | #include "th03/math/randring.hpp" 5 | #include "th04/main/player/shot.hpp" 6 | 7 | void pascal near shot_laser_update( 8 | unsigned int frames, shot_laser_style_t style 9 | ) 10 | ; 11 | -------------------------------------------------------------------------------- /th04/main/player/player.hpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/playfld.hpp" 2 | #include "th02/main/player/player.hpp" 3 | 4 | extern PlayfieldMotion player_pos; 5 | 6 | void near player_pos_update_and_clamp(void); 7 | 8 | // Shots 9 | // ----- 10 | 11 | static const uint8_t POWER_MAX = 128; 12 | 13 | #define SHOT_W 16 14 | #define SHOT_H 16 15 | // ----- 16 | -------------------------------------------------------------------------------- /th04/main/player/pos[bss].asm: -------------------------------------------------------------------------------- 1 | public _player_pos 2 | _player_pos motion_t 3 | -------------------------------------------------------------------------------- /th04/main/player/shot_laser[data].asm: -------------------------------------------------------------------------------- 1 | public _SHOT_LASER_DOTS 2 | _SHOT_LASER_DOTS label byte 3 | db 00011000b 4 | db 00111100b 5 | db 01111110b 6 | db 10111101b 7 | db 11111111b 8 | -------------------------------------------------------------------------------- /th04/main/player/shot_levels[data].asm: -------------------------------------------------------------------------------- 1 | ; Amount of power necessary for the shot level with that array index. 2 | public _SHOT_LEVEL_TO_POWER 3 | _SHOT_LEVEL_TO_POWER dw 6, 12, 16, 24, 32, 48, 72, 96, 128 4 | -------------------------------------------------------------------------------- /th04/main/player/shots_add[bss].asm: -------------------------------------------------------------------------------- 1 | public _shot_ptr, _shot_last_id 2 | ; Points to the next free entry in [shots]. 3 | _shot_ptr dw ? 4 | ; Index of the last valid entry in [shots]. 5 | _shot_last_id db ? 6 | db ? 7 | -------------------------------------------------------------------------------- /th04/main/player/shots_alive[bss].asm: -------------------------------------------------------------------------------- 1 | shot_alive_t struct 2 | SA_pos Point 3 | SA_shot dw ? 4 | shot_alive_t ends 5 | 6 | public _shot_hitbox_center, _shot_hitbox_radius 7 | public _shots_alive, _shots_alive_count 8 | _shot_hitbox_center Point 9 | _shot_hitbox_radius Point 10 | _shots_alive shot_alive_t SHOT_COUNT dup() 11 | _shots_alive_count dw ? 12 | -------------------------------------------------------------------------------- /th04/main/player/shots_hittest[data].asm: -------------------------------------------------------------------------------- 1 | public _shots_hittest_against_boss 2 | _shots_hittest_against_boss db 0 3 | evendata 4 | -------------------------------------------------------------------------------- /th04/main/playfld[data].asm: -------------------------------------------------------------------------------- 1 | public _playfield_shake_redraw_time 2 | _playfield_shake_redraw_time db 0 3 | evendata 4 | -------------------------------------------------------------------------------- /th04/main/playperf.hpp: -------------------------------------------------------------------------------- 1 | // Player performance ("rank") 2 | extern unsigned char playperf; 3 | extern unsigned char playperf_max; 4 | extern char playperf_min; 5 | 6 | void pascal playperf_raise(char delta); 7 | void pascal playperf_lower(char delta); 8 | -------------------------------------------------------------------------------- /th04/main/pointnum/pointnum[data].asm: -------------------------------------------------------------------------------- 1 | public _pointnum_times_2 2 | _pointnum_times_2 db 0 3 | evendata 4 | -------------------------------------------------------------------------------- /th04/main/pointnum/render[bss].asm: -------------------------------------------------------------------------------- 1 | public _pointnum_white_p, _pointnum_yellow_p 2 | _pointnum_white_p db ? 3 | _pointnum_yellow_p db ? 4 | 5 | public _pointnums_alive, _pointnum_first_yellow_alive 6 | _pointnums_alive dw (POINTNUM_COUNT + 1) dup (?) 7 | _pointnum_first_yellow_alive dw ? 8 | -------------------------------------------------------------------------------- /th04/main/quit.hpp: -------------------------------------------------------------------------------- 1 | enum quit_t { 2 | Q_KEEP_RUNNING = 0, 3 | Q_QUIT_TO_OP = 1, 4 | Q_NEXT_STAGE = 2, 5 | }; 6 | 7 | extern quit_t quit; 8 | -------------------------------------------------------------------------------- /th04/main/quit[bss].asm: -------------------------------------------------------------------------------- 1 | Q_KEEP_RUNNING = 0 2 | Q_QUIT_TO_OP = 1 3 | Q_NEXT_STAGE = 2 4 | 5 | public _quit 6 | _quit db ? 7 | -------------------------------------------------------------------------------- /th04/main/rank.hpp: -------------------------------------------------------------------------------- 1 | #include "th01/rank.h" 2 | 3 | extern unsigned char rank; 4 | 5 | extern "C" { 6 | int pascal select_for_rank( 7 | int for_easy, int for_normal, int for_hard, int for_lunatic 8 | ); 9 | } 10 | -------------------------------------------------------------------------------- /th04/main/scoreupd[data].asm: -------------------------------------------------------------------------------- 1 | ; Temporary BCD conversion buffer. TH05 just uses _hud_gaiji_row instead. 2 | public _temp_lebcd 3 | _temp_lebcd db SCORE_DIGITS dup(0) 4 | -------------------------------------------------------------------------------- /th04/main/slowdown.cpp: -------------------------------------------------------------------------------- 1 | #include "libs/master.lib/master.hpp" 2 | #include "th04/main/slowdown.hpp" 3 | 4 | void near slowdown_frame_delay(void) 5 | { 6 | while(vsync_Count1 < slowdown_factor) { 7 | } 8 | vsync_Count1 = 0; 9 | slowdown_factor = 1; 10 | } 11 | -------------------------------------------------------------------------------- /th04/main/slowdown[bss].asm: -------------------------------------------------------------------------------- 1 | public _turbo_mode 2 | _turbo_mode db ? 3 | evendata 4 | -------------------------------------------------------------------------------- /th04/main/sparks[bss].asm: -------------------------------------------------------------------------------- 1 | include th04/main/spark.inc 2 | 3 | public _sparks 4 | _sparks spark_t SPARK_COUNT dup() 5 | _sparks_unused spark_t 4 dup() 6 | -------------------------------------------------------------------------------- /th04/main/sparks_add[bss].asm: -------------------------------------------------------------------------------- 1 | public _spark_ring_offset 2 | _spark_ring_offset dw ? 3 | -------------------------------------------------------------------------------- /th04/main/stage/bonus.hpp: -------------------------------------------------------------------------------- 1 | // Grants the stage clear bonus and renders its tally to text RAM. 2 | void near stage_clear_bonus(void); 3 | 4 | // Grants the clear bonus for the final stage, and renders its tally to text 5 | // RAM. 6 | void near stage_allclear_bonus(void); 7 | -------------------------------------------------------------------------------- /th04/main/stage/funcs[bss].asm: -------------------------------------------------------------------------------- 1 | public _stage_invalidate, _stage_render 2 | _stage_invalidate dw ? 3 | _stage_render dw ? 4 | -------------------------------------------------------------------------------- /th04/main/stage/stage.hpp: -------------------------------------------------------------------------------- 1 | #include "platform.h" 2 | 3 | extern unsigned char stage_id; 4 | extern nearfunc_t_near stage_invalidate; 5 | extern nearfunc_t_near stage_render; 6 | -------------------------------------------------------------------------------- /th04/main/tile/inv[bss].asm: -------------------------------------------------------------------------------- 1 | public _scroll_line_on_page, _tile_invalidate_box 2 | public _bg_render_not_bombing, _bg_render_bombing, _bg_render_bombing_func 3 | public _tile_render_all_time 4 | _scroll_line_on_page dw 2 dup(?) 5 | _tile_invalidate_box Point 6 | _bg_render_not_bombing dw ? 7 | _bg_render_bombing dw ? 8 | _bg_render_bombing_func dw ? 9 | dw ? 10 | _tile_render_all_time db ? 11 | evendata 12 | -------------------------------------------------------------------------------- /th04/main/tile/section[data].asm: -------------------------------------------------------------------------------- 1 | public _TILE_SECTION_OFFSETS 2 | _TILE_SECTION_OFFSETS label word 3 | @@i = 0 4 | rept TILE_SECTION_COUNT_MAX 5 | dw (@@i * TILES_MEMORY_X * TILE_ROWS_PER_SECTION * word) 6 | @@i = (@@i + 1) 7 | endm 8 | -------------------------------------------------------------------------------- /th04/main/tile/tile.inc: -------------------------------------------------------------------------------- 1 | include th02/main/tile/tile.inc 2 | 3 | TILE_ROWS_PER_SECTION = 5 4 | TILE_SECTION_COUNT_MAX = 32 5 | -------------------------------------------------------------------------------- /th04/maine_e.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/end/entry.cpp" 2 | -------------------------------------------------------------------------------- /th04/math/motion.asm: -------------------------------------------------------------------------------- 1 | .8086 2 | .model use16 large 3 | 4 | include th03/arg_bx.inc 5 | include libs/master.lib/macros.inc 6 | include th04/math/motion.inc 7 | 8 | .code 9 | MOTION_UPDATE_DEF 3 10 | 11 | end 12 | -------------------------------------------------------------------------------- /th04/math/motion.hpp: -------------------------------------------------------------------------------- 1 | #define MOTION_HPP 2 | 3 | template struct near MotionBase { 4 | PointType cur; 5 | PointType prev; 6 | PointType velocity; 7 | 8 | void init(float screen_x, float screen_y) { 9 | cur.x.set(screen_x); 10 | prev.x.set(screen_x); 11 | cur.y.set(screen_y); 12 | prev.y.set(screen_y); 13 | } 14 | }; 15 | -------------------------------------------------------------------------------- /th04/math/vector.hpp: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include "th02/math/vector.hpp" 3 | #include "th01/math/subpixel.hpp" 4 | 5 | void pascal near vector2_near( 6 | SPPoint near &ret, unsigned char angle, subpixel_t length 7 | ); 8 | 9 | void pascal vector2_at( 10 | SPPoint near &ret, 11 | subpixel_t origin_x, 12 | subpixel_t origin_y, 13 | subpixel_t length, 14 | int angle 15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /th04/mb_dft.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/midboss/defeat.cpp" 2 | -------------------------------------------------------------------------------- /th04/mb_inv.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/midboss/inv.cpp" 2 | -------------------------------------------------------------------------------- /th04/mem.h: -------------------------------------------------------------------------------- 1 | // Various memory sizes of external TH04 files. 2 | #define MEM_ASSIGN_PARAS_OP (336000 >> 4) 3 | #define MEM_ASSIGN_PARAS_MAIN (320000 >> 4) 4 | #define MEM_ASSIGN_PARAS_MAINE (336000 >> 4) 5 | 6 | #define DEMO_N 4000 /* ZUN symbol [MAGNet2010] */ 7 | -------------------------------------------------------------------------------- /th04/mem.inc: -------------------------------------------------------------------------------- 1 | ; Various memory sizes of external TH04 files. 2 | MEM_ASSIGN_PARAS_OP equ (336000 shr 4) 3 | MEM_ASSIGN_PARAS_MAIN equ (320000 shr 4) 4 | 5 | DEMO_N = 4000 ; ZUN symbol [MAGNet2010] 6 | -------------------------------------------------------------------------------- /th04/mem[bss].asm: -------------------------------------------------------------------------------- 1 | public _mem_assign_paras 2 | _mem_assign_paras dw ? 3 | -------------------------------------------------------------------------------- /th04/midboss.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/midboss/midboss.cpp" 2 | -------------------------------------------------------------------------------- /th04/midboss4.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/midboss/m4.cpp" 2 | -------------------------------------------------------------------------------- /th04/motion_3.asm: -------------------------------------------------------------------------------- 1 | include th04/math/motion.asm 2 | -------------------------------------------------------------------------------- /th04/mpn_free.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/mpn_free.cpp" 2 | -------------------------------------------------------------------------------- /th04/mpn_l_i.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/mpn_l_i.cpp" 2 | -------------------------------------------------------------------------------- /th04/op/clear.hpp: -------------------------------------------------------------------------------- 1 | #include "th01/rank.h" 2 | #if (GAME == 5) 3 | #include "th05/playchar.h" 4 | #else 5 | #include "th04/playchar.h" 6 | #endif 7 | 8 | extern unsigned char cleared_with[PLAYCHAR_COUNT][RANK_COUNT]; 9 | -------------------------------------------------------------------------------- /th04/op/zunsoft.h: -------------------------------------------------------------------------------- 1 | void pascal zunsoft(void); 2 | -------------------------------------------------------------------------------- /th04/op_main.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zPop_01 2 | #include "th04/formats/cfg.cpp" 3 | #include "th04/op/m_main.cpp" 4 | -------------------------------------------------------------------------------- /th04/op_music.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/op/m_music.cpp" 2 | -------------------------------------------------------------------------------- /th04/op_setup.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/op/m_setup.cpp" 2 | -------------------------------------------------------------------------------- /th04/player_m.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/player/move.cpp" 2 | -------------------------------------------------------------------------------- /th04/player_p.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/player/pos.cpp" 2 | -------------------------------------------------------------------------------- /th04/playfld.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/playfld.cpp" 2 | -------------------------------------------------------------------------------- /th04/res_huma.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/res_huma.cpp -------------------------------------------------------------------------------- /th04/score.h: -------------------------------------------------------------------------------- 1 | #ifndef TH04_SCORE_H 2 | #define TH04_SCORE_H 3 | 4 | #include "th02/score.h" 5 | 6 | typedef union { 7 | unsigned char continues_used; 8 | unsigned char digits[SCORE_DIGITS]; 9 | } score_lebcd_t; 10 | 11 | extern score_lebcd_t score; 12 | 13 | #endif /* TH04_SCORE_H */ 14 | -------------------------------------------------------------------------------- /th04/score[data].asm: -------------------------------------------------------------------------------- 1 | public _extends_gained, _hiscore_popup_shown 2 | _extends_gained db 0 3 | _hiscore_popup_shown db 0 4 | -------------------------------------------------------------------------------- /th04/score_d.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/decode.cpp" 2 | -------------------------------------------------------------------------------- /th04/score_db.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/decode.cpp" 2 | -------------------------------------------------------------------------------- /th04/score_e.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/encode.cpp" 2 | -------------------------------------------------------------------------------- /th04/score_rm.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/recreate.cpp" 2 | -------------------------------------------------------------------------------- /th04/scoreupd.asm: -------------------------------------------------------------------------------- 1 | include th04/main/scoreupd.asm 2 | -------------------------------------------------------------------------------- /th04/scrolly3.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/scrolly3.cpp" 2 | -------------------------------------------------------------------------------- /th04/shiftjis/bgm.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/shiftjis/bgm.hpp -------------------------------------------------------------------------------- /th04/shiftjis/fns.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/shiftjis/fns.hpp -------------------------------------------------------------------------------- /th04/shiftjis/fnshared.hpp: -------------------------------------------------------------------------------- 1 | // File names shared between TH04 and TH05 2 | 3 | #define BINARY_OP "op" 4 | #define BINARY_MAIN "main" 5 | #define BINARY_DEB "deb" 6 | 7 | #define BGM_MENU_MAIN_FN "op" 8 | #define BGM_HISCORE_FN "name" 9 | 10 | #define SCOREDAT_FN "GENSOU.SCR" 11 | 12 | #define SE_FN "miko" 13 | 14 | #define MENU_MAIN_BG_FN "op1.pi" 15 | #define HISCORE_BG_FN "hi01.pi" 16 | -------------------------------------------------------------------------------- /th04/shiftjis/m_char.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/shiftjis/m_char.cpp -------------------------------------------------------------------------------- /th04/shiftjis/m_main.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/shiftjis/m_main.hpp -------------------------------------------------------------------------------- /th04/shiftjis/m_setup.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/shiftjis/m_setup.hpp -------------------------------------------------------------------------------- /th04/slowdown.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/slowdown.cpp" 2 | -------------------------------------------------------------------------------- /th04/snd/interrupt[bss].asm: -------------------------------------------------------------------------------- 1 | public _snd_interrupt_if_midi 2 | _snd_interrupt_if_midi db ? ; has no effect 3 | db ? ; word alignment 4 | -------------------------------------------------------------------------------- /th04/snd/load[data].asm: -------------------------------------------------------------------------------- 1 | public _SND_LOAD_EXT 2 | _SND_LOAD_EXT dd aM26, aM26, aM86, aMMD 3 | aM26 db 'm26',0 4 | aM86 db 'm86',0 5 | aMMD db 'mmd',0 6 | -------------------------------------------------------------------------------- /th04/snd/snd.inc: -------------------------------------------------------------------------------- 1 | SND_BGM_OFF = 0 2 | SND_BGM_FM26 = 1 3 | SND_BGM_FM86 = 2 4 | SND_BGM_MODE_COUNT = 3 5 | SND_BGM_MIDI = 3 6 | 7 | SND_SE_OFF = 0 8 | SND_SE_FM = 1 9 | SND_SE_BEEP = 2 10 | SND_SE_MODE_COUNT = 3 11 | -------------------------------------------------------------------------------- /th04/snd/snd[data].asm: -------------------------------------------------------------------------------- 1 | include th04/snd/snd.inc 2 | 3 | public _snd_se_mode 4 | _snd_se_mode db SND_SE_OFF 5 | public _snd_bgm_mode 6 | _snd_bgm_mode db SND_BGM_OFF 7 | public _snd_midi_possible 8 | _snd_midi_possible db 0 9 | -------------------------------------------------------------------------------- /th04/snd_dlym.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/snd/delaymea.cpp" 2 | -------------------------------------------------------------------------------- /th04/snd_kaja.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/kajaint.cpp" 2 | -------------------------------------------------------------------------------- /th04/snd_load.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/snd/load.cpp" 2 | -------------------------------------------------------------------------------- /th04/snd_mmdr.c: -------------------------------------------------------------------------------- 1 | #include "th02/snd/mmd_res.c" 2 | -------------------------------------------------------------------------------- /th04/snd_mode.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/snd/detmodes.cpp" 2 | -------------------------------------------------------------------------------- /th04/snd_pmdr.c: -------------------------------------------------------------------------------- 1 | #include "th04/snd/pmd_res.c" 2 | -------------------------------------------------------------------------------- /th04/snd_se.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/se.cpp" 2 | -------------------------------------------------------------------------------- /th04/spark_a.asm: -------------------------------------------------------------------------------- 1 | include th04/main/spark_a.asm 2 | -------------------------------------------------------------------------------- /th04/sprites/cels.inc: -------------------------------------------------------------------------------- 1 | include th02/sprites/cels.inc 2 | 3 | HITSHOT_CELS = 4 4 | BULLET_CLOUD_CELS = 4 5 | BULLET_DECAY_CELS = 4 6 | BULLET_D_CELS = 16 7 | BULLET_V_CELS = 32 8 | -------------------------------------------------------------------------------- /th04/sprites/op_cdg.inc: -------------------------------------------------------------------------------- 1 | CDG_NUMERAL = 0 2 | CDG_MAIN = 10 3 | CDG_QUIT = 15 4 | CDG_CURSOR = 35 5 | -------------------------------------------------------------------------------- /th04/sprites/pelletbt.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/sprites/pelletbt.bmp -------------------------------------------------------------------------------- /th04/sprites/pelletbt.h: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define PELLET_BOTTOM_H 4 4 | 5 | extern const dots16_t sPELLET_BOTTOM[PRESHIFT][PELLET_BOTTOM_H]; 6 | -------------------------------------------------------------------------------- /th04/sprites/pointnum.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/sprites/pointnum.bmp -------------------------------------------------------------------------------- /th04/sprites/pointnum.h: -------------------------------------------------------------------------------- 1 | #include "planar.h" 2 | 3 | #define POINTNUM_W 8 4 | #define POINTNUM_H 8 5 | 6 | #define POINTNUM 0 7 | #define POINTNUM_TIMES 10 8 | #define POINTNUM_TIMES_2 11 9 | #define POINTNUM_COUNT 12 10 | 11 | extern const dots16_t sPOINTNUMS[POINTNUM_COUNT][PRESHIFT][POINTNUM_H]; 12 | -------------------------------------------------------------------------------- /th04/staff.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/end/staff.cpp" 2 | -------------------------------------------------------------------------------- /th04/stages.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/stage/stages.cpp" 2 | -------------------------------------------------------------------------------- /th04/std.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/std.cpp" 2 | -------------------------------------------------------------------------------- /th04/tile.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/tile/tile.cpp" 2 | -------------------------------------------------------------------------------- /th04/tile_set.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/tile/set.cpp" 2 | -------------------------------------------------------------------------------- /th04/vector.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/math/vector.cpp" 2 | -------------------------------------------------------------------------------- /th04/vector2n.asm: -------------------------------------------------------------------------------- 1 | include th04/math/vector2n.asm 2 | -------------------------------------------------------------------------------- /th04/zun.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04/zun.txt -------------------------------------------------------------------------------- /th04/zunsoft.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/op/zunsoft.cpp" 2 | -------------------------------------------------------------------------------- /th04/zunsoft[data].asm: -------------------------------------------------------------------------------- 1 | extern _zun00_pi:byte 2 | extern _logo:byte 3 | extern _zun02_bft:byte 4 | extern _zun04_bft:byte 5 | extern _zun01_bft:byte 6 | extern _zun03_bft:byte 7 | -------------------------------------------------------------------------------- /th04_main.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04_main.asm -------------------------------------------------------------------------------- /th04_maine.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04_maine.asm -------------------------------------------------------------------------------- /th04_memchk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04_memchk.asm -------------------------------------------------------------------------------- /th04_op2.asm: -------------------------------------------------------------------------------- 1 | .386 2 | .model use16 large _TEXT 3 | 4 | include ReC98.inc 5 | 6 | .data 7 | 8 | include th03/snd/se_state[data].asm 9 | include th04/hardware/bgimage[data].asm 10 | include th03/formats/cdg[data].asm 11 | 12 | end 13 | -------------------------------------------------------------------------------- /th04_zuninit.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th04_zuninit.asm -------------------------------------------------------------------------------- /th05/bgimager.asm: -------------------------------------------------------------------------------- 1 | include th04/hardware/bgimager.asm 2 | -------------------------------------------------------------------------------- /th05/boss.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/boss.cpp" 2 | -------------------------------------------------------------------------------- /th05/boss_1.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/boss/b1.cpp" 2 | -------------------------------------------------------------------------------- /th05/boss_4.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/boss/b4_both.cpp" 2 | -------------------------------------------------------------------------------- /th05/boss_6.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/boss/b6.cpp" 2 | -------------------------------------------------------------------------------- /th05/boss_bg.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/boss/render.cpp" 2 | -------------------------------------------------------------------------------- /th05/boss_exp.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/boss/explode.cpp" 2 | -------------------------------------------------------------------------------- /th05/boss_x.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/boss/bx.cpp" 2 | -------------------------------------------------------------------------------- /th05/bullet_1.asm: -------------------------------------------------------------------------------- 1 | include th05/main/bullet/add_1.asm 2 | -------------------------------------------------------------------------------- /th05/bullet_c.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/bullet/clip.cpp" 2 | -------------------------------------------------------------------------------- /th05/bullet_p.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/bullet/patnum.cpp" 2 | -------------------------------------------------------------------------------- /th05/bullet_t.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCBULLET_A_TEXT -zPmain_03 2 | 3 | extern "C" { 4 | #include "th05/main/bullet/tune.cpp" 5 | } 6 | -------------------------------------------------------------------------------- /th05/bullet_u.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zPmain_03 2 | #include "th04/main/bullet/update.cpp" 3 | -------------------------------------------------------------------------------- /th05/cdg_p_nc.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/formats/cdg_p_nc.cpp" 2 | -------------------------------------------------------------------------------- /th05/cdg_put.asm: -------------------------------------------------------------------------------- 1 | include th04/formats/cdg_put.asm 2 | -------------------------------------------------------------------------------- /th05/cfg.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/cfg.cpp" 2 | -------------------------------------------------------------------------------- /th05/cfg_lres.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/formats/cfg_lres.cpp" 2 | -------------------------------------------------------------------------------- /th05/chars.inc: -------------------------------------------------------------------------------- 1 | PLAYCHAR_REIMU = 0 2 | PLAYCHAR_MARISA = 1 3 | PLAYCHAR_MIMA = 2 4 | PLAYCHAR_YUUKA = 3 5 | PLAYCHAR_COUNT = 4 6 | -------------------------------------------------------------------------------- /th05/cheeto_u.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/bullet/cheeto_u.cpp" 2 | -------------------------------------------------------------------------------- /th05/circle.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/circle.cpp" 2 | -------------------------------------------------------------------------------- /th05/cutscene.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/cutscene/cutscene.cpp" 2 | -------------------------------------------------------------------------------- /th05/demo.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/demo.cpp" 2 | -------------------------------------------------------------------------------- /th05/dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/dialog/dialog.cpp" 2 | -------------------------------------------------------------------------------- /th05/egcrect.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hardware/egcrect.cpp" 2 | -------------------------------------------------------------------------------- /th05/ems.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/ems.cpp" 2 | -------------------------------------------------------------------------------- /th05/end/allcast.hpp: -------------------------------------------------------------------------------- 1 | void near allcast_animate(void); 2 | -------------------------------------------------------------------------------- /th05/f_dialog.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/formats/dialog.cpp" 2 | -------------------------------------------------------------------------------- /th05/formats/bb.h: -------------------------------------------------------------------------------- 1 | #include "th04/formats/bb.h" 2 | 3 | bb_tiles8_t __seg* pascal near bb_load(const char far *fn); 4 | -------------------------------------------------------------------------------- /th05/formats/bb_cheeto[bss].asm: -------------------------------------------------------------------------------- 1 | public _bb_cheeto 2 | _bb_cheeto db BB_SIZE dup(?) 3 | -------------------------------------------------------------------------------- /th05/formats/bb_cheeto[data].asm: -------------------------------------------------------------------------------- 1 | public aLs00_bb 2 | aLs00_bb db 'LS00.BB',0 3 | db 0 4 | -------------------------------------------------------------------------------- /th05/formats/bb_load[bss].asm: -------------------------------------------------------------------------------- 1 | public _bb_load_seg 2 | _bb_load_seg dw ? 3 | -------------------------------------------------------------------------------- /th05/formats/bb_playchar[data].asm: -------------------------------------------------------------------------------- 1 | public _bb_playchar_fn 2 | _bb_playchar_fn db 'BB0.BB',0 3 | db 0 4 | -------------------------------------------------------------------------------- /th05/formats/bb_txt_load[data].asm: -------------------------------------------------------------------------------- 1 | public aTxt1_bb 2 | aTxt1_bb db 'txt1.bb',0 3 | -------------------------------------------------------------------------------- /th05/formats/cfg_lres.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -k- 2 | 3 | #include "th03/formats/cfg_impl.hpp" 4 | 5 | resident_t __seg* near cfg_load_resident_ptr(void) 6 | { 7 | #undef CFG_FN 8 | extern const char CFG_FN[]; 9 | extern cfg_t cfg; 10 | 11 | return cfg_load_and_set_resident_dos(cfg, CFG_FN); 12 | } 13 | #pragma codestring "\x90" 14 | -------------------------------------------------------------------------------- /th05/formats/cfg_lres[bss].asm: -------------------------------------------------------------------------------- 1 | public _cfg 2 | _cfg cfg_t 3 | -------------------------------------------------------------------------------- /th05/formats/pi_buffers[bss].asm: -------------------------------------------------------------------------------- 1 | public _pi_buffers 2 | _pi_buffers dd 8 dup(?) 3 | -------------------------------------------------------------------------------- /th05/formats/pi_headers[bss].asm: -------------------------------------------------------------------------------- 1 | public _pi_headers 2 | _pi_headers PiHeader 8 dup() 3 | -------------------------------------------------------------------------------- /th05/formats/pi_put_masked[bss].asm: -------------------------------------------------------------------------------- 1 | public _pi_mask_ptr, _pi_mask_y, _pi_put_masked_vram_offset 2 | _pi_mask_ptr dw ? 3 | _pi_mask_y dw ? 4 | _pi_put_masked_vram_offset dw ? 5 | -------------------------------------------------------------------------------- /th05/formats/scoredat_load_for[data].asm: -------------------------------------------------------------------------------- 1 | if BINARY eq 'E' 2 | public _SCOREDAT_FN_0, _SCOREDAT_FN_1 3 | _SCOREDAT_FN_0 db 'GENSOU.SCR',0 4 | _SCOREDAT_FN_1 db 'GENSOU.SCR',0 5 | endif 6 | -------------------------------------------------------------------------------- /th05/frmdelay.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCSHARED -k- 2 | 3 | #include "libs/master.lib/master.hpp" 4 | #include "th02/hardware/frmdelay.h" 5 | 6 | void pascal frame_delay(int frames) 7 | { 8 | _BX = _SP; 9 | asm { mov bx, ss:[bx+4]; } /* = */ (frames); 10 | vsync_Count1 = 0; 11 | while(vsync_Count1 < _BX) {} 12 | } 13 | 14 | #pragma codestring "\x00" 15 | -------------------------------------------------------------------------------- /th05/gather.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zCmain_032_TEXT 2 | 3 | #include "th04/main/gather.cpp" 4 | -------------------------------------------------------------------------------- /th05/hardware/vram_planes[data].asm: -------------------------------------------------------------------------------- 1 | public _VRAM_PLANE, _VRAM_PLANE_B, _VRAM_PLANE_R, _VRAM_PLANE_G, _VRAM_PLANE_E 2 | _VRAM_PLANE label dword 3 | _VRAM_PLANE_B dd 0A8000000h 4 | _VRAM_PLANE_R dd 0B0000000h 5 | _VRAM_PLANE_G dd 0B8000000h 6 | _VRAM_PLANE_E dd 0E0000000h 7 | -------------------------------------------------------------------------------- /th05/hi_end.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hiscore/end.cpp" 2 | -------------------------------------------------------------------------------- /th05/hi_view.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/hiscore/view.cpp" 2 | -------------------------------------------------------------------------------- /th05/hud_num.asm: -------------------------------------------------------------------------------- 1 | include th05/main/hud/number_p.asm 2 | -------------------------------------------------------------------------------- /th05/hud_ovrl.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/hud/overlay.cpp" 2 | -------------------------------------------------------------------------------- /th05/initmain.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/initmain.cpp" 2 | -------------------------------------------------------------------------------- /th05/initop.cpp: -------------------------------------------------------------------------------- 1 | #include "th03/core/initop.cpp" 2 | -------------------------------------------------------------------------------- /th05/inp_h_w.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/hardware/inp_h_w.cpp" 2 | -------------------------------------------------------------------------------- /th05/input_s.asm: -------------------------------------------------------------------------------- 1 | include th04/hardware/input_s.asm 2 | -------------------------------------------------------------------------------- /th05/laser.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/bullet/laser.cpp" 2 | -------------------------------------------------------------------------------- /th05/laser_rh.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/bullet/laser_rh.cpp" 2 | -------------------------------------------------------------------------------- /th05/main/boss/b4_both[bss].asm: -------------------------------------------------------------------------------- 1 | public _mai_flystep_random_next_y_direct 2 | public _yuki_flystep_random_next_y_direc 3 | _mai_flystep_random_next_y_direct db ? 4 | _yuki_flystep_random_next_y_direc db ? 5 | -------------------------------------------------------------------------------- /th05/main/boss/bx[bss].asm: -------------------------------------------------------------------------------- 1 | FIREWAVE_COUNT = 2 2 | 3 | firewave_t struc 4 | FW_alive db ? 5 | FW_is_right db ? 6 | FW_bottom dw ? 7 | FW_amp dw ? 8 | firewave_t ends 9 | 10 | public _firewaves 11 | _firewaves firewave_t FIREWAVE_COUNT dup () 12 | -------------------------------------------------------------------------------- /th05/main/boss/move[data].asm: -------------------------------------------------------------------------------- 1 | public _boss_flystep_random_clamp 2 | _boss_flystep_random_clamp label area_t 3 | dw ((BOSS_W / 2) shl 4) 4 | dw ((PLAYFIELD_W - (BOSS_W / 2)) shl 4) 5 | dw (24 shl 4) 6 | dw (128 shl 4) 7 | 8 | dw ? 9 | -------------------------------------------------------------------------------- /th05/main/boss/sprites[bss].asm: -------------------------------------------------------------------------------- 1 | public _boss_sprite_left, _boss_sprite_right, _boss_sprite_stay 2 | _boss_sprite_left dw ? 3 | _boss_sprite_right dw ? 4 | _boss_sprite_stay dw ? 5 | 6 | public _boss_flystep_random_next_y_direc 7 | _boss_flystep_random_next_y_direc db ? 8 | evendata 9 | -------------------------------------------------------------------------------- /th05/main/bullet/cheeto[bss].asm: -------------------------------------------------------------------------------- 1 | CHEETO_W = 32 2 | CHEETO_H = 32 3 | CHEETO_TRAIL_NODE_COUNT = 16 4 | CHEETO_COUNT = 7 5 | 6 | cheeto_trail_t struc 7 | flag db ? 8 | CBT_col db ? 9 | node_pos Point CHEETO_TRAIL_NODE_COUNT dup () 10 | node_sprite db CHEETO_TRAIL_NODE_COUNT dup (?) 11 | cheeto_trail_t ends 12 | 13 | public _cheeto_trails 14 | _cheeto_trails cheeto_trail_t (CHEETO_COUNT + 1) dup () 15 | -------------------------------------------------------------------------------- /th05/main/bullet/pellet_r[bss].asm: -------------------------------------------------------------------------------- 1 | public _pellet_bottom_col, _pellet_clouds_render, _pellet_clouds_render_count 2 | _pellet_bottom_col dw ? 3 | _pellet_clouds_render dw PELLET_COUNT dup(?) 4 | _pellet_clouds_render_count dw ? 5 | -------------------------------------------------------------------------------- /th05/main/hud/dream[data].asm: -------------------------------------------------------------------------------- 1 | ; Colors for the dream bars. 2 | public _HUD_DREAM_COLORS 3 | _HUD_DREAM_COLORS label byte 4 | db TX_RED 5 | db TX_RED 6 | db TX_MAGENTA 7 | db TX_MAGENTA 8 | db TX_BLUE 9 | db TX_GREEN 10 | db TX_CYAN 11 | db TX_YELLOW 12 | db TX_WHITE 13 | HUD_DREAM_COLOR_COUNT = ($ - _HUD_DREAM_COLORS) 14 | -------------------------------------------------------------------------------- /th05/main/player/angle.cpp: -------------------------------------------------------------------------------- 1 | #include "libs/master.lib/master.hpp" 2 | #include "th05/main/player/player.hpp" 3 | 4 | unsigned char pascal near player_angle_from( 5 | Subpixel x, Subpixel y, unsigned char plus_angle 6 | ) 7 | { 8 | return ( 9 | iatan2((player_pos.cur.y - y), (player_pos.cur.x - x)) + plus_angle 10 | ); 11 | } 12 | #pragma codestring "\x90" 13 | -------------------------------------------------------------------------------- /th05/main/player/bomb.hpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/player/bomb.hpp" 2 | 3 | void pascal near bomb_mima(void); 4 | void pascal near bomb_yuuka(void); 5 | -------------------------------------------------------------------------------- /th05/main/player/hitshot_from[bss].asm: -------------------------------------------------------------------------------- 1 | ; Next free array element in [hitshots]. 2 | public _hitshot_next_free_id 3 | _hitshot_next_free_id dw ? 4 | -------------------------------------------------------------------------------- /th05/main/player/shot_types.inc: -------------------------------------------------------------------------------- 1 | ST_NORMAL = 0 2 | ST_HOMING = 1 3 | ST_MISSILE_LEFT = 2 4 | ST_MISSILE_RIGHT = 3 5 | ST_MISSILE_STRAIGHT = 4 6 | -------------------------------------------------------------------------------- /th05/main/player/speed[bss].asm: -------------------------------------------------------------------------------- 1 | ; All values are signed. (Yes, allowing you to invert the controls with 2 | ; negative values!) 3 | public _playchar_speed_aligned, _playchar_speed_diagonal 4 | _playchar_speed_aligned dw ? 5 | dw ? 6 | _playchar_speed_diagonal dw ? 7 | dw ? 8 | -------------------------------------------------------------------------------- /th05/main/playperf.hpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/playperf.hpp" 2 | #include "th01/math/subpixel.hpp" 3 | 4 | #pragma codeseg BULLET_A_TEXT 5 | 6 | extern "C" { 7 | // Returns [speed] tuned based on [playperf]. 8 | subpixel_length_8_t __fastcall near playperf_speedtune( 9 | subpixel_length_8_t speed 10 | ); 11 | } 12 | 13 | #pragma codeseg 14 | -------------------------------------------------------------------------------- /th05/main/select_for_playchar.asm: -------------------------------------------------------------------------------- 1 | public @SELECT_FOR_PLAYCHAR$QIIII 2 | @select_for_playchar$qiiii proc far 3 | mov al, _playchar 4 | jmp short select_for 5 | @select_for_playchar$qiiii endp 6 | nop 7 | -------------------------------------------------------------------------------- /th05/main/stage/stages.hpp: -------------------------------------------------------------------------------- 1 | // TH05-specific stage functions. 2 | 3 | void pascal near stage2_update(void); 4 | void pascal near stage2_invalidate(void); 5 | -------------------------------------------------------------------------------- /th05/main010.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * 1st part of code segment #1 of TH05's MAIN.EXE 4 | */ 5 | 6 | #pragma option -zCmai_TEXT -zPmain_01 7 | 8 | #include "th05/main/player/bombanim.cpp" 9 | -------------------------------------------------------------------------------- /th05/main032.cpp: -------------------------------------------------------------------------------- 1 | /* ReC98 2 | * ----- 3 | * 2nd part of code segment #3 of TH05's MAIN.EXE 4 | */ 5 | 6 | #pragma option -zCmain_032_TEXT 7 | 8 | #include "th04/math/vector.hpp" 9 | #include "th04/math/randring.hpp" 10 | #include "th05/main/boss/boss.hpp" 11 | 12 | #include "th05/main/boss/move.cpp" 13 | -------------------------------------------------------------------------------- /th05/maine_e.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/end/entry.cpp" 2 | -------------------------------------------------------------------------------- /th05/mb_dft.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/midboss/defeat.cpp" 2 | -------------------------------------------------------------------------------- /th05/mem.h: -------------------------------------------------------------------------------- 1 | // Various memory sizes of external TH05 files. 2 | #define MEM_ASSIGN_PARAS_OP (336000 >> 4) 3 | #define MEM_ASSIGN_PARAS_MAIN (291200 >> 4) 4 | #define MEM_ASSIGN_PARAS_MAINE (336000 >> 4) 5 | 6 | #define DEMO_N 5000 /* ZUN symbol [MAGNet2010] */ 7 | #define DEMO_N_EXTRA (DEMO_N * 4) 8 | -------------------------------------------------------------------------------- /th05/mem.inc: -------------------------------------------------------------------------------- 1 | ; Various memory sizes of external TH05 files. 2 | MEM_ASSIGN_PARAS_OP equ (336000 shr 4) 3 | MEM_ASSIGN_PARAS_MAIN equ (291200 shr 4) 4 | 5 | DEMO_N = 5000 ; ZUN symbol [MAGNet2010] 6 | -------------------------------------------------------------------------------- /th05/mem[data].asm: -------------------------------------------------------------------------------- 1 | public _mem_assign_paras 2 | _mem_assign_paras dw (320000 shr 4) 3 | -------------------------------------------------------------------------------- /th05/midboss.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/midboss/midboss.cpp" 2 | -------------------------------------------------------------------------------- /th05/midboss1.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/midboss/m1.cpp" 2 | -------------------------------------------------------------------------------- /th05/midboss5.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/midboss/m5.cpp" 2 | -------------------------------------------------------------------------------- /th05/musicp_a.asm: -------------------------------------------------------------------------------- 1 | include th05/op/piano_a.asm 2 | -------------------------------------------------------------------------------- /th05/musicp_c.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/op/piano_c.cpp" 2 | -------------------------------------------------------------------------------- /th05/op/op.hpp: -------------------------------------------------------------------------------- 1 | #include "th05/playchar.h" 2 | #include "th04/op/op.hpp" 3 | 4 | extern bool extra_playable_with[PLAYCHAR_COUNT]; 5 | -------------------------------------------------------------------------------- /th05/op/piano.inc: -------------------------------------------------------------------------------- 1 | piano_notes_t struc 2 | fm db 5 dup(?) 3 | db 3 dup(?) 4 | piano_notes_t ends 5 | -------------------------------------------------------------------------------- /th05/op/piano[bss].asm: -------------------------------------------------------------------------------- 1 | include th05/op/piano.inc 2 | 3 | public _piano_notes_cur, _piano_notes_prev, _pmd_workadr 4 | _piano_notes_cur piano_notes_t 5 | _piano_notes_prev piano_notes_t 6 | _pmd_workadr dd ? 7 | -------------------------------------------------------------------------------- /th05/op_main.cpp: -------------------------------------------------------------------------------- 1 | #pragma option -zPop_01 2 | #include "th04/op/m_main.cpp" 3 | -------------------------------------------------------------------------------- /th05/op_music.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/op/m_music.cpp" 2 | -------------------------------------------------------------------------------- /th05/op_setup.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/op/m_setup.cpp" 2 | -------------------------------------------------------------------------------- /th05/op_title.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/op/title.cpp" 2 | -------------------------------------------------------------------------------- /th05/pi_asm_1.asm: -------------------------------------------------------------------------------- 1 | include th05/formats/pi_asm_1.asm 2 | -------------------------------------------------------------------------------- /th05/pi_asm_2.asm: -------------------------------------------------------------------------------- 1 | include th05/formats/pi_asm_2.asm 2 | -------------------------------------------------------------------------------- /th05/pi_cpp_1.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/formats/pi_cpp_1.cpp" 2 | -------------------------------------------------------------------------------- /th05/pi_cpp_2.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/formats/pi_cpp_2.cpp" 2 | -------------------------------------------------------------------------------- /th05/player_a.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/main/player/angle.cpp" 2 | -------------------------------------------------------------------------------- /th05/playfld.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/main/playfld.cpp" 2 | -------------------------------------------------------------------------------- /th05/res_kso.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/res_kso.cpp -------------------------------------------------------------------------------- /th05/score_d.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/decode.cpp" 2 | -------------------------------------------------------------------------------- /th05/score_db.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/decode.cpp" 2 | -------------------------------------------------------------------------------- /th05/score_e.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/encode.cpp" 2 | -------------------------------------------------------------------------------- /th05/score_rm.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/formats/scoredat/recreate.cpp" 2 | -------------------------------------------------------------------------------- /th05/scoreupd.asm: -------------------------------------------------------------------------------- 1 | include th04/main/scoreupd.asm 2 | -------------------------------------------------------------------------------- /th05/shiftjis/bgm.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/shiftjis/bgm.hpp -------------------------------------------------------------------------------- /th05/shiftjis/fns.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/shiftjis/fns.hpp -------------------------------------------------------------------------------- /th05/shiftjis/music.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/shiftjis/music.hpp -------------------------------------------------------------------------------- /th05/snd/load[data].asm: -------------------------------------------------------------------------------- 1 | public _SND_LOAD_EXT 2 | _SND_LOAD_EXT label dword 3 | db 'efc',0 4 | db 'm',0,0,0 5 | db 'm2',0,'m' ; Yes, that's how it's addressed. 6 | db 'md',0 7 | -------------------------------------------------------------------------------- /th05/snd/snd.h: -------------------------------------------------------------------------------- 1 | extern "C" { 2 | #include "th04/snd/snd.h" 3 | 4 | // Gets the total number of measures that the active sound driver has spent 5 | // playing the current BGM, or -1 if BGM has been disabled. 6 | int snd_bgm_measure(void); 7 | } 8 | -------------------------------------------------------------------------------- /th05/snd_dlym.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/snd/delaymea.cpp" 2 | -------------------------------------------------------------------------------- /th05/snd_kaja.cpp: -------------------------------------------------------------------------------- 1 | #include "th02/snd/kajaint.cpp" 2 | -------------------------------------------------------------------------------- /th05/snd_load.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/snd/load.cpp" 2 | -------------------------------------------------------------------------------- /th05/spark_a.asm: -------------------------------------------------------------------------------- 1 | include th04/main/spark_a.asm 2 | -------------------------------------------------------------------------------- /th05/sprites/gaiji.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/sprites/gaiji.bmp -------------------------------------------------------------------------------- /th05/sprites/piano_l.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/sprites/piano_l.bmp -------------------------------------------------------------------------------- /th05/std.cpp: -------------------------------------------------------------------------------- 1 | #include "th05/formats/std.cpp" 2 | -------------------------------------------------------------------------------- /th05/vector.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/math/vector.cpp" 2 | -------------------------------------------------------------------------------- /th05/zun.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05/zun.txt -------------------------------------------------------------------------------- /th05/zunsoft.cpp: -------------------------------------------------------------------------------- 1 | #include "th04/op/zunsoft.cpp" 2 | -------------------------------------------------------------------------------- /th05_gjinit.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05_gjinit.asm -------------------------------------------------------------------------------- /th05_main.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05_main.asm -------------------------------------------------------------------------------- /th05_maine.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05_maine.asm -------------------------------------------------------------------------------- /th05_memchk.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05_memchk.asm -------------------------------------------------------------------------------- /th05_zuninit.asm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nmlgc/ReC98/f6d836b3a3142543830b519792f11938030863e4/th05_zuninit.asm -------------------------------------------------------------------------------- /twobyte.inc: -------------------------------------------------------------------------------- 1 | twobyte_t struc 2 | lo db ? 3 | hi db ? 4 | twobyte_t ends 5 | --------------------------------------------------------------------------------