├── .clang-format ├── .github ├── CODEOWNERS └── workflows │ ├── dockerfile.yaml │ ├── format.yml │ ├── linter.yaml │ ├── picci.yaml │ ├── saturn-build.yml │ ├── tool-debugmodule.yaml │ ├── tools.yaml │ └── validate-and-report.yml ├── .gitignore ├── .gitmodules ├── .vscode ├── c_cpp_properties.json └── launch.json ├── CMakeLists.txt ├── CNAME ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── Makefile.saturn.mk ├── README.md ├── bin ├── .gitignore ├── allegrex-as.tar.gz.sha256 ├── cc1-psx-26.tar.gz.sha256 ├── clang-format.tar.gz.sha256 ├── cygnus-2.7-96Q3-bin.tar.gz.sha256 ├── mwccpsp_219.tar.gz.sha256 └── wibo.sha256 ├── cmake └── FindSDL2.cmake ├── config ├── .gitignore ├── assets.hd.yaml ├── assets.pspeu.yaml ├── assets.us.yaml ├── check.hd.sha ├── check.pspeu.sha ├── check.saturn.sha ├── check.us.sha ├── dirt.hd.json ├── dirt.pspeu.json ├── dirt.saturn.json ├── dirt.us.json ├── disk.us.lba ├── gfx.game.json ├── saturn │ ├── alucard.ld │ ├── alucard.prg.yaml │ ├── alucard_user_syms.txt │ ├── game.ld │ ├── game.prg.yaml │ ├── game_user_syms.txt │ ├── richter.ld │ ├── richter.prg.yaml │ ├── richter_user_syms.txt │ ├── stage_02.ld │ ├── stage_02.prg.yaml │ ├── stage_02_user_syms.txt │ ├── t_bat.ld │ ├── t_bat.prg.yaml │ ├── t_bat_user_syms.txt │ ├── warp.ld │ ├── warp.prg.yaml │ ├── warp_syms.txt │ ├── warp_user_syms.txt │ ├── zero.bin.yaml │ ├── zero.ld │ └── zero_user_syms.txt ├── splat.hd.dra.yaml ├── splat.hd.ric.yaml ├── splat.hd.stcen.yaml ├── splat.hd.stwrp.yaml ├── splat.hd.tt_000.yaml ├── splat.pspeu.dra.yaml ├── splat.pspeu.maria.yaml ├── splat.pspeu.ric.yaml ├── splat.pspeu.stchi.yaml ├── splat.pspeu.stlib.yaml ├── splat.pspeu.stno3.yaml ├── splat.pspeu.stno4.yaml ├── splat.pspeu.stst0.yaml ├── splat.pspeu.stwrp.yaml ├── splat.pspeu.tt_000.yaml ├── splat.us.bobo4.yaml ├── splat.us.bomar.yaml ├── splat.us.borbo3.yaml ├── splat.us.borbo5.yaml ├── splat.us.dra.yaml ├── splat.us.main.yaml ├── splat.us.ric.yaml ├── splat.us.stcen.yaml ├── splat.us.stchi.yaml ├── splat.us.stdre.yaml ├── splat.us.stlib.yaml ├── splat.us.stmad.yaml ├── splat.us.stno0.yaml ├── splat.us.stno1.yaml ├── splat.us.stno3.yaml ├── splat.us.stno4.yaml ├── splat.us.stnp3.yaml ├── splat.us.stnz0.yaml ├── splat.us.strwrp.yaml ├── splat.us.stsel.yaml ├── splat.us.stst0.yaml ├── splat.us.stwrp.yaml ├── splat.us.tt_000.yaml ├── splat.us.tt_001.yaml ├── splat.us.tt_002.yaml ├── splat.us.tt_003.yaml ├── splat.us.tt_004.yaml ├── splat.us.weapon.yaml ├── symbols.beta.txt ├── symbols.hd.dra.txt ├── symbols.hd.ric.txt ├── symbols.hd.stcen.txt ├── symbols.hd.stwrp.txt ├── symbols.hd.tt_000.txt ├── symbols.hd.txt ├── symbols.pspeu.dra.txt ├── symbols.pspeu.maria.txt ├── symbols.pspeu.ric.txt ├── symbols.pspeu.stchi.txt ├── symbols.pspeu.stlib.txt ├── symbols.pspeu.stno3.txt ├── symbols.pspeu.stno4.txt ├── symbols.pspeu.stst0.txt ├── symbols.pspeu.stwrp.txt ├── symbols.pspeu.tt_000.txt ├── symbols.pspeu.txt ├── symbols.stmad.txt ├── symbols.us.bobo4.txt ├── symbols.us.bomar.txt ├── symbols.us.borbo3.txt ├── symbols.us.borbo5.txt ├── symbols.us.dra.txt ├── symbols.us.main.txt ├── symbols.us.ric.txt ├── symbols.us.stcen.txt ├── symbols.us.stchi.txt ├── symbols.us.stdre.txt ├── symbols.us.stlib.txt ├── symbols.us.stno0.txt ├── symbols.us.stno1.txt ├── symbols.us.stno3.txt ├── symbols.us.stno4.txt ├── symbols.us.stnp3.txt ├── symbols.us.stnz0.txt ├── symbols.us.strwrp.txt ├── symbols.us.stsel.txt ├── symbols.us.stst0.txt ├── symbols.us.stwrp.txt ├── symbols.us.tt_000.txt ├── symbols.us.tt_001.txt ├── symbols.us.tt_002.txt ├── symbols.us.tt_003.txt ├── symbols.us.tt_004.txt ├── symbols.us.txt ├── symbols.us.weapon.txt ├── symbols.us.weapon.txt.in ├── symexport.pspeu.dra.txt ├── symexport.pspeu.maria.txt ├── symexport.pspeu.ric.txt ├── symexport.pspeu.stchi.txt ├── symexport.pspeu.stlib.txt ├── symexport.pspeu.stno3.txt ├── symexport.pspeu.stno4.txt ├── symexport.pspeu.stst0.txt ├── symexport.pspeu.stwrp.txt ├── symexport.pspeu.tt_000.txt ├── undefined_syms.beta.txt ├── undefined_syms.hd.txt ├── undefined_syms.pspeu.txt └── undefined_syms.us.txt ├── diff_settings.py ├── disks └── README ├── docs ├── NAMING.md └── STYLE.md ├── go.work ├── go.work.sum ├── include ├── bios.h ├── castle_flags.h ├── cloud_struct.h ├── common.h ├── cutscene.h ├── disk.h ├── entity.h ├── game.h ├── gte.inc ├── include_asm.h ├── items.h ├── lba.h ├── log.h ├── macro.inc ├── main.inc ├── memcard.h ├── objects.h ├── player_steps.h ├── primitive.h ├── psxsdk │ ├── kernel.h │ ├── libapi.h │ ├── libc.h │ ├── libcard.h │ ├── libcd.h │ ├── libetc.h │ ├── libgpu.h │ ├── libgs.h │ ├── libgte.h │ ├── libsnd.h │ ├── libspu.h │ └── romio.h ├── saturn │ └── scl.h ├── servant.h ├── settings.h ├── sfx.h ├── stage.h ├── types.h ├── unkstruct.h └── weapon.h ├── src ├── .gitignore ├── LICENSE ├── alloc_entity.h ├── boss │ ├── bo4 │ │ ├── blit_char.c │ │ ├── bo4.h │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── doors.c │ │ ├── dop_anim.c │ │ ├── doppleganger.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_life_up.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── unk_365FC.c │ │ ├── unk_45354.c │ │ └── unk_46E7C.c │ ├── dop_anim.h │ ├── dop_check_st_collision.h │ ├── dop_collision.h │ ├── doppleganger.h │ ├── mar │ │ ├── CA94.c │ │ ├── blit_char.c │ │ ├── bss.c │ │ ├── clock_room.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── d_prize_drops.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_life_up.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── header.c │ │ ├── mar.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── tile_data.c │ │ └── unk.c │ ├── rbo3 │ │ ├── 12D64.c │ │ ├── blit_char.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── e_breakable.c │ │ ├── e_clouds.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_life_up.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── rbo3.c │ │ ├── rbo3.h │ │ ├── st_common.c │ │ ├── st_debug.c │ │ └── st_update.c │ └── rbo5 │ │ ├── blit_char.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── doors.c │ │ ├── dop_anim.c │ │ ├── doppleganger.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_life_up.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── header.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── rbo5.h │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── unk_354F0.c │ │ ├── unk_44954.c │ │ └── unk_4648C.c ├── config_us.h ├── decelerate.h ├── destroy_entities_from_index.h ├── destroy_entity.h ├── dra │ ├── 42398.c │ ├── 47BB8.c │ ├── 4A538.c │ ├── 4AEA4.c │ ├── 4B758.c │ ├── 4CE2C.c │ ├── 4DA70.c │ ├── 5087C.c │ ├── 5D5BC.c │ ├── 5F60C.c │ ├── 624DC.c │ ├── 628AC.c │ ├── 62DEC.c │ ├── 62EB8.c │ ├── 66590.c │ ├── 692E8.c │ ├── 6BF64.c │ ├── 6DF70.c │ ├── 6E42C.c │ ├── 6FDF8.c │ ├── 70394.c │ ├── 704D0.c │ ├── 71830.c │ ├── 7879C.c │ ├── 7E4BC.c │ ├── 84B88.c │ ├── 8A0A4.c │ ├── 8BEF8.c │ ├── 8C600.c │ ├── 8D3E8.c │ ├── alu_anim.c │ ├── bss.c │ ├── cd.c │ ├── collider.c │ ├── config_jp.c │ ├── config_us.c │ ├── d_10798.c │ ├── d_24CEC.c │ ├── d_2F324.c │ ├── d_37d8.c │ ├── d_3B0D4.c │ ├── d_CD80.c │ ├── d_DBD4.c │ ├── d_E294.c │ ├── demo.c │ ├── dra.h │ ├── dra_bss.h │ ├── dra_header.c │ ├── game_handlers.c │ ├── lang_us.c │ ├── lba_stage.c │ ├── main_engine_psp.h │ ├── main_engine_psx.h │ ├── menu.c │ ├── menu.h │ ├── mist.h │ ├── pads.c │ ├── save_mgr.c │ ├── save_mgr_pre.c │ ├── sound.c │ ├── sound_data.c │ └── timeattack.c ├── dra_psp │ ├── 186E8.c │ ├── 1DDC0.c │ ├── 23138.c │ ├── 3250.c │ ├── 62FE0.c │ ├── 63C08.c │ ├── E588.c │ ├── cd.c │ ├── d_6B420.c │ ├── d_84248.c │ ├── d_B4548.c │ ├── demo.c │ ├── dra_psp.h │ └── memcard.c ├── get_free_entity.h ├── get_lang.h ├── main │ ├── main.c │ └── psxsdk │ │ ├── libapi │ │ ├── a07.c │ │ ├── a08.c │ │ ├── a09.c │ │ ├── a10.c │ │ ├── a11.c │ │ ├── a12.c │ │ ├── a13.c │ │ ├── a20.c │ │ ├── a21.c │ │ ├── a22.c │ │ ├── a23.c │ │ ├── a24.c │ │ ├── a25.c │ │ ├── a36.c │ │ ├── a37.c │ │ ├── a50.c │ │ ├── a51.c │ │ ├── a52.c │ │ ├── a53.c │ │ ├── a54.c │ │ ├── a65.c │ │ ├── a66.c │ │ ├── a67.c │ │ ├── a69.c │ │ ├── a81.c │ │ ├── a91.c │ │ ├── c112.c │ │ ├── c114.c │ │ ├── c57.c │ │ ├── c66.c │ │ ├── c67.c │ │ ├── c68.c │ │ ├── c73.c │ │ ├── counter.c │ │ ├── l10.c │ │ └── libapi_internal.h │ │ ├── libc │ │ ├── a56.c │ │ ├── a63.c │ │ ├── c19.c │ │ ├── c21.c │ │ ├── c23.c │ │ ├── c24.c │ │ ├── c25.c │ │ ├── c27.c │ │ ├── c42.c │ │ ├── c43.c │ │ ├── c46.c │ │ ├── c47.c │ │ ├── c48.c │ │ ├── c51.c │ │ ├── c52.c │ │ ├── c63.c │ │ ├── memmove.c │ │ └── sprintf.c │ │ ├── libcard │ │ ├── a74.c │ │ ├── a75.c │ │ ├── a78.c │ │ ├── a80.c │ │ ├── c171.c │ │ ├── c172.c │ │ └── card.c │ │ ├── libcd │ │ ├── bios.c │ │ ├── c_002.c │ │ ├── c_003.c │ │ ├── c_004.c │ │ ├── c_005.c │ │ ├── c_007.c │ │ ├── c_008.c │ │ ├── c_009.c │ │ ├── c_010.c │ │ ├── c_011.c │ │ ├── cdread.c │ │ ├── cdread2.c │ │ ├── cdrom.c │ │ ├── event.c │ │ ├── iso9660.c │ │ ├── libcd_internal.h │ │ ├── registers.h │ │ └── sys.c │ │ ├── libetc │ │ ├── intr.c │ │ ├── intr_dma.c │ │ ├── intr_vb.c │ │ ├── pad.c │ │ ├── vmode.c │ │ └── vsync.c │ │ ├── libgpu │ │ ├── ext.c │ │ ├── font.c │ │ ├── prim.c │ │ └── sys.c │ │ ├── libgs │ │ ├── gs_007.c │ │ ├── gs_008.c │ │ └── gs_009.c │ │ ├── libgte │ │ ├── fog_01.c │ │ ├── geo_00.c │ │ ├── geo_01.c │ │ └── ratan.c │ │ ├── libsnd │ │ ├── adsr.c │ │ ├── cres.c │ │ ├── decre.c │ │ ├── libsnd_i.h │ │ ├── next.c │ │ ├── pause.c │ │ ├── play.c │ │ ├── replay.c │ │ ├── scsmvol.c │ │ ├── scssattr.c │ │ ├── scssvol.c │ │ ├── seqinit.c │ │ ├── seqread.c │ │ ├── seskoff.c │ │ ├── seskon.c │ │ ├── sscall.c │ │ ├── ssclose.c │ │ ├── ssend.c │ │ ├── ssinit.c │ │ ├── ssinit_h.c │ │ ├── ssplay.c │ │ ├── ssquit.c │ │ ├── ssstart.c │ │ ├── sstable.c │ │ ├── sstick.c │ │ ├── ssvol.c │ │ ├── stop.c │ │ ├── tempo.c │ │ ├── ut_gpa.c │ │ ├── ut_gva.c │ │ ├── ut_rdel.c │ │ ├── ut_rdep.c │ │ ├── ut_rev.c │ │ ├── ut_rfb.c │ │ ├── ut_roff.c │ │ ├── ut_ron.c │ │ ├── ut_sva.c │ │ ├── vm_doff.c │ │ ├── vm_don.c │ │ ├── vm_vsu.c │ │ ├── vmanager.c │ │ ├── vs_mono.c │ │ ├── vs_srv.c │ │ ├── vs_vab.c │ │ ├── vs_vfb.c │ │ ├── vs_vh.c │ │ ├── vs_vtb.c │ │ ├── vs_vtbp.c │ │ └── vs_vtc.c │ │ └── libspu │ │ ├── libspu_internal.h │ │ ├── s_cb.c │ │ ├── s_crwa.c │ │ ├── s_dcb.c │ │ ├── s_gva.c │ │ ├── s_i.c │ │ ├── s_ini.c │ │ ├── s_it.c │ │ ├── s_itc.c │ │ ├── s_m_f.c │ │ ├── s_m_init.c │ │ ├── s_m_m.c │ │ ├── s_m_util.c │ │ ├── s_m_wsa.c │ │ ├── s_n2p.c │ │ ├── s_q.c │ │ ├── s_r.c │ │ ├── s_sav.c │ │ ├── s_sca.c │ │ ├── s_si.c │ │ ├── s_sic.c │ │ ├── s_sk.c │ │ ├── s_snv.c │ │ ├── s_sr.c │ │ ├── s_srmp.c │ │ ├── s_stm.c │ │ ├── s_stsa.c │ │ ├── s_sva.c │ │ ├── s_w.c │ │ ├── s_wp.c │ │ ├── spu.c │ │ └── sr_gaks.c ├── maria │ ├── maria.h │ ├── ovl_load.c │ ├── pl_anims.c │ ├── pl_blueprints.c │ ├── pl_collision.c │ ├── pl_debug.c │ ├── pl_header.c │ ├── pl_main.c │ ├── pl_sensors.c │ ├── pl_setstep.c │ ├── pl_steps.c │ ├── pl_subweapons.c │ ├── pl_utils.c │ └── spritebank0.c ├── pc │ ├── 3rd │ │ └── cJSON │ │ │ ├── cJSON.c │ │ │ └── cJSON.h │ ├── io.c │ ├── log.c │ ├── main.c │ ├── null.c │ ├── pc.c │ ├── pc.h │ ├── pl_arc.c │ ├── pl_maria.c │ ├── pl_ric.c │ ├── plat_unix.c │ ├── plat_win.c │ ├── psxsdk │ │ ├── PsyCross │ │ │ ├── LICENSE │ │ │ └── src │ │ │ │ └── gte │ │ │ │ ├── PsyX_GTE.cpp │ │ │ │ ├── PsyX_GTE.h │ │ │ │ ├── half_float.cpp │ │ │ │ ├── inline_c.c │ │ │ │ ├── libgte_.c │ │ │ │ ├── psx │ │ │ │ ├── gtemac.h │ │ │ │ ├── gtereg.h │ │ │ │ ├── inline_c.h │ │ │ │ └── libgte.h │ │ │ │ ├── ratan_tbl.h │ │ │ │ ├── rcossin_tbl.h │ │ │ │ └── sqrt_tbl.h │ │ ├── cdc.c │ │ ├── cdc.h │ │ ├── emu.cpp │ │ ├── expected │ │ │ ├── SpuClearReverbWorkArea0.txt │ │ │ ├── SpuSetCommonAttr0.txt │ │ │ ├── SpuSetCommonAttr1.txt │ │ │ ├── SpuSetKey0.txt │ │ │ ├── SpuSetKey1.txt │ │ │ ├── SpuSetReverb0.txt │ │ │ ├── SpuSetReverb1.txt │ │ │ ├── _spu_init.txt │ │ │ └── spu_vm_do_allocate.txt │ │ ├── libapi.c │ │ ├── libcard.c │ │ ├── libcd.c │ │ ├── libetc.c │ │ ├── libgpu.c │ │ ├── libgs.c │ │ ├── libgte.c │ │ ├── libsnd.c │ │ ├── libspu.c │ │ └── mednafen │ │ │ ├── FastFIFO.h │ │ │ ├── dma.cpp │ │ │ ├── dma.h │ │ │ ├── git.h │ │ │ ├── gpu.cpp │ │ │ ├── gpu.h │ │ │ ├── gpu_common.inc │ │ │ ├── gpu_line.cpp │ │ │ ├── gpu_polygon.cpp │ │ │ ├── gpu_sprite.cpp │ │ │ ├── medtypes.h │ │ │ ├── psx.h │ │ │ ├── spu.cpp │ │ │ ├── spu.h │ │ │ └── spu_fir_table.inc │ ├── render_gl.c │ ├── render_shared.c │ ├── render_soft.c │ ├── sdl2.c │ ├── sdl2_macros.c │ ├── sdl2_macros.h │ ├── sdl_defs.h │ ├── servant_pc.c │ ├── servant_pc.h │ ├── sim_pc.c │ ├── sotn.c │ ├── stages │ │ ├── stage_cen.c │ │ ├── stage_dummy.c │ │ ├── stage_loader.c │ │ ├── stage_loader.h │ │ ├── stage_nz0.c │ │ ├── stage_sel.c │ │ ├── stage_st0.c │ │ └── stage_wrp.c │ ├── str.c │ ├── stubs.c │ ├── weapon_pc.c │ └── weapon_pc.h ├── rebound_stone.h ├── ric │ ├── 2F8E8.c │ ├── 319C4.c │ ├── bss.c │ ├── d_18568.c │ ├── d_1859C.c │ ├── ovl_load.c │ ├── pl_anims.c │ ├── pl_blueprints.c │ ├── pl_collision.c │ ├── pl_crash_cross.c │ ├── pl_debug.c │ ├── pl_header.c │ ├── pl_main.c │ ├── pl_setstep.c │ ├── pl_steps.c │ ├── pl_subweapon_cross.c │ ├── pl_subweapon_dummy.c │ ├── pl_subweapon_holywater.c │ ├── pl_subweapons.c │ ├── pl_utils.c │ ├── pl_whip.c │ ├── ric.h │ ├── spritebank0.c │ ├── spritebank1.c │ ├── spritebank2.c │ └── spritebank3.c ├── saturn │ ├── alucard.c │ ├── game.c │ ├── game.h │ ├── inc_asm.h │ ├── lib │ │ ├── bup.c │ │ ├── cdc.c │ │ ├── csh.c │ │ ├── csh.h │ │ ├── def.h │ │ ├── dma.c │ │ ├── gfs.c │ │ ├── mth.c │ │ ├── mth.h │ │ ├── per.c │ │ ├── scl.c │ │ ├── scl.h │ │ ├── spr.c │ │ ├── spr.h │ │ ├── sys.c │ │ ├── sys.h │ │ └── xpt.h │ ├── macro.inc │ ├── richter.c │ ├── richter.h │ ├── sattypes.h │ ├── stage_02.c │ ├── stage_02.h │ ├── t_bat.c │ ├── warp.c │ ├── zero.c │ └── zero.h ├── save_mgr.h ├── save_mgr_pre.h ├── servant │ ├── accumulate_toward_zero.h │ ├── calculate_angle_to_entity.h │ ├── calculate_distance.h │ ├── check_all_entities_valid.h │ ├── check_entity_valid.h │ ├── create_event_entity.h │ ├── destroy_servant_entity.h │ ├── get_target_position_with_distance_buffer.h │ ├── is_movement_allowed.h │ ├── play_sfx.h │ ├── process_event.h │ ├── search_for_entity_in_range.h │ ├── servant_private.h │ ├── servant_unk0.h │ ├── servant_update_anim.h │ ├── set_entity_animation.h │ ├── shared_clutdata.h │ ├── shared_events.h │ ├── shared_globals.h │ ├── shared_spriteparts.h │ ├── tt_000 │ │ ├── bat.c │ │ ├── bat.h │ │ ├── bat_animation_data.c │ │ ├── bat_data.c │ │ ├── servant_clutdata.c │ │ ├── servant_events.c │ │ └── servant_spriteparts.c │ ├── tt_001 │ │ ├── ghost.c │ │ ├── ghost.h │ │ ├── ghost_animation_data.c │ │ ├── ghost_data.c │ │ ├── servant_clutdata.c │ │ ├── servant_events.c │ │ └── servant_spriteparts.c │ ├── tt_002 │ │ ├── faerie.c │ │ ├── faerie.h │ │ ├── faerie_ability_data.c │ │ ├── faerie_animation_data.c │ │ ├── faerie_data.c │ │ ├── faerie_spriteparts.c │ │ └── servant_events.c │ ├── tt_003 │ │ ├── demon.c │ │ ├── demon.h │ │ ├── demon_data.c │ │ ├── demon_spriteparts.c │ │ └── servant_events.c │ └── tt_004 │ │ ├── servant_common.c │ │ ├── servant_events.c │ │ ├── sword.c │ │ ├── sword.h │ │ ├── sword_data.c │ │ └── sword_sprite_data.c ├── set_prim_rect.h ├── set_speed_x.h ├── st │ ├── adjust_value_within_threshold.h │ ├── alloc_entity.h │ ├── animate_entity.h │ ├── blink_item.h │ ├── blit_char.h │ ├── blit_char_psp.h │ ├── cen │ │ ├── D4F0.c │ │ ├── DB18.c │ │ ├── F890.c │ │ ├── blit_char.c │ │ ├── bss.c │ │ ├── cen.h │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── d_prize_drops.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── header.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ └── stage_data.c │ ├── check_coll_offsets.h │ ├── check_field_collision.h │ ├── chi │ │ ├── chi.h │ │ ├── dt_entity.c │ │ ├── dt_header.c │ │ ├── dt_prize_drops.c │ │ ├── en_breakable.c │ │ ├── en_breakable_wall.c │ │ ├── en_collect.c │ │ ├── en_debug_cerberus_gate.c │ │ ├── en_demon_switch_wall.c │ │ ├── en_falling_stairs.c │ │ ├── en_gremlin.c │ │ ├── en_misc.c │ │ ├── en_particles.c │ │ ├── en_popup.c │ │ ├── en_red_door.c │ │ ├── en_room_foreground.c │ │ ├── en_salem_witch.c │ │ ├── en_stage_name.c │ │ ├── en_thornweed_corpseweed.c │ │ ├── en_venus_weed.c │ │ ├── st_collision.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── stage_data.c │ │ ├── ut_blit_char.c │ │ ├── ut_common.c │ │ ├── ut_create_entity.c │ │ └── ut_prim_helpers.c │ ├── chi_psp │ │ ├── dt_entity.c │ │ ├── e_collect.c │ │ ├── e_misc.c │ │ ├── en_breakable_wall.c │ │ ├── en_stage_name.c │ │ └── st_init_chi.c │ ├── clock_room_entities.h │ ├── clut_lerp.h │ ├── collect_dummy.h │ ├── collect_gold.h │ ├── collect_heart.h │ ├── collect_heart_vessel.h │ ├── collect_life_vessel.h │ ├── collect_subweapon.h │ ├── collect_subweapon_psp.h │ ├── collision.h │ ├── create_entity.h │ ├── cutscene_actor_name.h │ ├── cutscene_actor_name_psp.h │ ├── cutscene_run.h │ ├── cutscene_scale_avatar.h │ ├── cutscene_skip.h │ ├── cutscene_unk1.h │ ├── cutscene_unk3.h │ ├── cutscene_unk4.h │ ├── dre │ │ ├── 11E34.c │ │ ├── 161DC.c │ │ ├── 1697C.c │ │ ├── 22848.c │ │ ├── blit_char.c │ │ ├── bss.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── d_prize_drops.c │ │ ├── dre.h │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── header.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── stage_data.c │ │ └── succubus.c │ ├── e_background_bushes_trees.h │ ├── e_background_lightning.h │ ├── e_bat.h │ ├── e_bloody_zombie.h │ ├── e_bone_archer.h │ ├── e_bone_scimitar.h │ ├── e_breakable.h │ ├── e_castle_door.h │ ├── e_cavern_door.h │ ├── e_chair.h │ ├── e_collect.h │ ├── e_explosion_puff_opaque.h │ ├── e_flea_man.h │ ├── e_heartroom.h │ ├── e_init_common.h │ ├── e_jewel_sword_puzzle.h │ ├── e_life_up.h │ ├── e_magically_sealed_door.h │ ├── e_merman.h │ ├── e_merman2.h │ ├── e_misc.h │ ├── e_mist_door.h │ ├── e_particles.h │ ├── e_particles_maria1.h │ ├── e_particles_maria2.h │ ├── e_red_door.h │ ├── e_room_fg.h │ ├── e_shutting_window.h │ ├── e_skeleton.h │ ├── e_skeleton_ape.h │ ├── e_sky_entities.h │ ├── e_spear_guard.h │ ├── e_stage_name.h │ ├── e_stairway.h │ ├── e_tilemap_shuffler.h │ ├── e_transparent_water.h │ ├── e_trapdoor.h │ ├── en_thornweed_corpseweed.h │ ├── entity_axe_knight.h │ ├── entity_big_red_fireball.h │ ├── entity_damage_display.h │ ├── entity_dummy.h │ ├── entity_enemy_blood.h │ ├── entity_equip_item_drop.h │ ├── entity_explosion.h │ ├── entity_explosion_spawn.h │ ├── entity_explosion_variants.h │ ├── entity_explosion_variants_spawner.h │ ├── entity_greypuff.h │ ├── entity_greypuff_spawner.h │ ├── entity_heart_drop.h │ ├── entity_intense_explosion.h │ ├── entity_lock_camera.h │ ├── entity_message_box.h │ ├── entity_olrox_drool.h │ ├── entity_prize_drop.h │ ├── entity_relic_orb.h │ ├── entity_soul_steal_orb.h │ ├── entity_stage_name_popup_jp.h │ ├── entity_unkId13.h │ ├── entity_unkId16.h │ ├── entrance_weights.h │ ├── fall_entity.h │ ├── get_angle_between_entities.h │ ├── get_angle_between_entities_shifted.h │ ├── get_angle_point_to_entity.h │ ├── get_angle_point_to_entity_shifted.h │ ├── get_distance_to_player_x.h │ ├── get_distance_to_player_y.h │ ├── get_lang_at.h │ ├── get_normalized_angle.h │ ├── get_player_collision_with.h │ ├── get_side_to_player.h │ ├── get_sine.h │ ├── get_sine_scaled.h │ ├── init_entity.h │ ├── initialize_unk_entity.h │ ├── lib │ │ ├── blit_char.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── e_bloody_zombie.c │ │ ├── e_breakable.c │ │ ├── e_candle_table.c │ │ ├── e_chair.c │ │ ├── e_collect.c │ │ ├── e_dhuron.c │ │ ├── e_ectoplasm.c │ │ ├── e_flea_armor.c │ │ ├── e_flea_man.c │ │ ├── e_flying_zombie.c │ │ ├── e_init.c │ │ ├── e_lesser_demon.c │ │ ├── e_library_bg.c │ │ ├── e_life_up.c │ │ ├── e_lock_camera.c │ │ ├── e_misc.c │ │ ├── e_misc_2.c │ │ ├── e_mist_door.c │ │ ├── e_mudman.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_shop.c │ │ ├── e_skeleton.c │ │ ├── e_spellbook_magic_tome.c │ │ ├── e_stage_name.c │ │ ├── en_thornweed_corpseweed.c │ │ ├── first_c_file.c │ │ ├── header.c │ │ ├── lib.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── unk_3B200.c │ │ └── unk_3B53C.c │ ├── lib_psp │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── e_collect.c │ │ ├── e_misc_2.c │ │ ├── e_shop.c │ │ ├── e_stage_name.c │ │ ├── st_init_lib.c │ │ └── unk_1D9E8.c │ ├── mad │ │ ├── 17B94.c │ │ ├── D8C8.c │ │ ├── bss.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── header.c │ │ ├── mad.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ └── st_update.c │ ├── make_entity_from_id.h │ ├── make_explosions.h │ ├── move_entity.h │ ├── no0 │ │ ├── 42A34.c │ │ ├── 4C750.c │ │ ├── 4E2E0.c │ │ ├── blit_char.c │ │ ├── clock_room.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── e_axe_knight.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_ctulhu.c │ │ ├── e_diplocephalus.c │ │ ├── e_diplocephalus_2.c │ │ ├── e_elevator.c │ │ ├── e_explosion_puff_opaque.c │ │ ├── e_flea_man.c │ │ ├── e_ghost.c │ │ ├── e_init.c │ │ ├── e_lock_camera.c │ │ ├── e_magically_sealed_door.c │ │ ├── e_marionette.c │ │ ├── e_misc.c │ │ ├── e_ouija_table.c │ │ ├── e_particles.c │ │ ├── e_plate_lord.c │ │ ├── e_plate_lord_2.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_skelerang.c │ │ ├── e_skeleton.c │ │ ├── e_slinger.c │ │ ├── e_stage_decoration.c │ │ ├── e_stage_name.c │ │ ├── e_stone_rose.c │ │ ├── no0.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ └── st_update.c │ ├── no1 │ │ ├── blit_char.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── e_armor_lord.c │ │ ├── e_blue_axe_knight.c │ │ ├── e_bone_archer.c │ │ ├── e_bone_musket.c │ │ ├── e_chair.c │ │ ├── e_collect.c │ │ ├── e_environment.c │ │ ├── e_init.c │ │ ├── e_medusa_head.c │ │ ├── e_misc.c │ │ ├── e_mist_door.c │ │ ├── e_mouse.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_skeleton.c │ │ ├── e_skeleton_ape.c │ │ ├── e_spear_guard.c │ │ ├── e_stage_name.c │ │ ├── e_sword_lord.c │ │ ├── e_wall_chicken_secret.c │ │ ├── e_wereskeleton.c │ │ ├── header.c │ │ ├── no1.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── unk_35E20.c │ │ ├── unk_381E8.c │ │ ├── unk_3B5E0.c │ │ ├── unk_3CB34.c │ │ ├── unk_3D8AC.c │ │ ├── unk_3FA34.c │ │ ├── unk_54400.c │ │ └── unused.c │ ├── no3 │ │ ├── 564B0.c │ │ ├── blit_char.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── d_prize_drops.c │ │ ├── e_background_block.c │ │ ├── e_background_bushes_trees.c │ │ ├── e_background_lightning.c │ │ ├── e_bat.c │ │ ├── e_bone_scimitar.c │ │ ├── e_breakable.c │ │ ├── e_castle_door.c │ │ ├── e_cavern_door.c │ │ ├── e_collect.c │ │ ├── e_death.c │ │ ├── e_death_sky_swirl.c │ │ ├── e_explosion_puff_opaque.c │ │ ├── e_fire_warg.c │ │ ├── e_heartroom.c │ │ ├── e_init.c │ │ ├── e_jewel_sword_puzzle.c │ │ ├── e_lock_camera.c │ │ ├── e_merman.c │ │ ├── e_merman2.c │ │ ├── e_misc.c │ │ ├── e_outdoor_ents.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_shutting_window.c │ │ ├── e_sky_entities.c │ │ ├── e_stage_name.c │ │ ├── e_stairway.c │ │ ├── e_tilemap_shuffler.c │ │ ├── e_transparent_water.c │ │ ├── e_trapdoor.c │ │ ├── e_unkId16.c │ │ ├── e_warg.c │ │ ├── entrance_weights.c │ │ ├── header.c │ │ ├── no3.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_update.c │ │ ├── stage_data.c │ │ └── water_effects.c │ ├── no3_psp │ │ ├── collision.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── e_init.c │ │ ├── e_misc.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── st_init_no3.c │ │ ├── water_data.c │ │ └── working_on.c │ ├── no4 │ │ ├── blit_char.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── e_bat.c │ │ ├── e_bone_archer.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_fishhead.c │ │ ├── e_frog.c │ │ ├── e_frozen_shade.c │ │ ├── e_init.c │ │ ├── e_killer_fish.c │ │ ├── e_misc.c │ │ ├── e_misc_2.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_secrets.c │ │ ├── e_skeleton_ape.c │ │ ├── e_spear_guard.c │ │ ├── e_stage_name.c │ │ ├── e_toad.c │ │ ├── first_c_file.c │ │ ├── no4.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ └── water_effects.c │ ├── no4_psp │ │ ├── cutscene_data.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_misc_2.c │ │ ├── e_stage_name.c │ │ ├── popup.c │ │ ├── st_init_no4.c │ │ ├── unk_2108.c │ │ ├── unk_26740.c │ │ └── unk_5EE8.c │ ├── np3 │ │ ├── 49BC8.c │ │ ├── 4B018.c │ │ ├── 4D540.c │ │ ├── 4E69C.c │ │ ├── 4F5B8.c │ │ ├── blade.c │ │ ├── blit_char.c │ │ ├── bss.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── e_background_bushes_trees.c │ │ ├── e_background_lightning.c │ │ ├── e_bat.c │ │ ├── e_bloody_zombie.c │ │ ├── e_bone_scimitar.c │ │ ├── e_breakable.c │ │ ├── e_castle_door.c │ │ ├── e_cavern_door.c │ │ ├── e_collect.c │ │ ├── e_explosion_puff_opaque.c │ │ ├── e_heartroom.c │ │ ├── e_init.c │ │ ├── e_jewel_sword_puzzle.c │ │ ├── e_merman.c │ │ ├── e_merman2.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_shutting_window.c │ │ ├── e_sky_entities.c │ │ ├── e_stage_name.c │ │ ├── e_stairway.c │ │ ├── e_tilemap_shuffler.c │ │ ├── e_transparent_water.c │ │ ├── e_trapdoor.c │ │ ├── e_unkId16.c │ │ ├── entrance_weights.c │ │ ├── gaibon.c │ │ ├── header.c │ │ ├── np3.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── slogra.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── stage_data.c │ │ └── water_effects.c │ ├── nz0 │ │ ├── 311C0.c │ │ ├── 337B4.c │ │ ├── blit_char.c │ │ ├── bossfight.c │ │ ├── bss.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── d_prize_drops.c │ │ ├── e_axe_knight.c │ │ ├── e_blood_skeleton.c │ │ ├── e_bloody_zombie.c │ │ ├── e_bone_scimitar.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_elevator.c │ │ ├── e_explosion_puff_opaque.c │ │ ├── e_init.c │ │ ├── e_life_up.c │ │ ├── e_lock_camera.c │ │ ├── e_magically_sealed_door.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_skeleton.c │ │ ├── e_spittle_bone.c │ │ ├── e_stage_name.c │ │ ├── e_subweapon_container.c │ │ ├── gaibon.c │ │ ├── header.c │ │ ├── maria.c │ │ ├── nz0.h │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── slogra.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ └── stage_data.c │ ├── pad2_anim_debug.h │ ├── pfn_entity_update.h │ ├── play_sfx_positional.h │ ├── player_is_within_hitbox.h │ ├── popup.h │ ├── prevent_entity_from_respawning.h │ ├── prim_helpers.h │ ├── prize_drop_fall.h │ ├── prize_drop_fall2.h │ ├── ratan2.h │ ├── ratan2_shifted.h │ ├── replace_breakable_with_item_drop.h │ ├── rwrp │ │ ├── bss.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── e_breakable.c │ │ ├── e_init.c │ │ ├── e_misc.c │ │ ├── e_red_door.c │ │ ├── header.c │ │ ├── rwrp.h │ │ ├── st_debug.c │ │ ├── stage_data.c │ │ └── warp.c │ ├── sel │ │ ├── 2C048.c │ │ ├── 33164.c │ │ ├── 3410C.c │ │ ├── 3585C.c │ │ ├── CD54.c │ │ ├── banks.c │ │ ├── bss.c │ │ ├── config_us.c │ │ ├── cutscene.c │ │ ├── lba_stage.c │ │ ├── libpress.c │ │ ├── save_mgr.c │ │ ├── save_mgr_pre.c │ │ ├── sel.h │ │ ├── stream.c │ │ └── stream_info.c │ ├── set_cutscene_end.h │ ├── set_cutscene_script.h │ ├── set_entity_velocity_from_angle.h │ ├── set_step.h │ ├── set_sub_step.h │ ├── st0 │ │ ├── 2805C.c │ │ ├── 2A218.c │ │ ├── 2A8DC.c │ │ ├── 2C564.c │ │ ├── 2DAC8.c │ │ ├── 3101C.c │ │ ├── 3AB08.c │ │ ├── 3C5C0.c │ │ ├── 3D8F0.c │ │ ├── bss.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── dialogue2.h │ │ ├── e_bg_vortex.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_lock_camera.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── header.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── prologue_cutscene_script.h │ │ ├── prologue_scroll.c │ │ ├── st0.h │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── stage_data.c │ │ └── title_card.c │ ├── st0_hit_detection.h │ ├── st0_psp │ │ ├── 3101C.c │ │ ├── cutscene.c │ │ ├── cutscene_data.c │ │ ├── lang.c │ │ └── st_init_st0.c │ ├── st_common.h │ ├── st_update.h │ ├── unk_anim_func.h │ ├── unk_collision_func.h │ ├── unk_collision_func2.h │ ├── unk_collision_func3.h │ ├── unk_collision_func4.h │ ├── unk_collision_func5.h │ ├── unk_entity_func0.h │ ├── unk_recursive_primfunc_1.h │ ├── unk_recursive_primfunc_2.h │ ├── water_effects.h │ ├── wrp │ │ ├── blit_char.c │ │ ├── bss.c │ │ ├── collision.c │ │ ├── create_entity.c │ │ ├── d_prize_drops.c │ │ ├── e_breakable.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_misc.c │ │ ├── e_particles.c │ │ ├── e_red_door.c │ │ ├── e_room_fg.c │ │ ├── e_stage_name.c │ │ ├── header.c │ │ ├── popup.c │ │ ├── prim_helpers.c │ │ ├── st_common.c │ │ ├── st_debug.c │ │ ├── st_update.c │ │ ├── stage_data.c │ │ ├── warp.c │ │ └── wrp.h │ └── wrp_psp │ │ ├── d_prize_drops.c │ │ ├── e_collect.c │ │ ├── e_init.c │ │ ├── e_misc.c │ │ ├── e_particles_data.c │ │ ├── graphics_banks.c │ │ ├── header.c │ │ ├── layers.c │ │ ├── prim_helpers.c │ │ ├── st_debug_data.c │ │ ├── st_init_wrp.c │ │ └── tile_data.c └── weapon │ ├── shared.h │ ├── w_000.c │ ├── w_001.c │ ├── w_002.c │ ├── w_003.c │ ├── w_004.c │ ├── w_005.c │ ├── w_006.c │ ├── w_007.c │ ├── w_008.c │ ├── w_009.c │ ├── w_010.c │ ├── w_011.c │ ├── w_012.c │ ├── w_013.c │ ├── w_014.c │ ├── w_015.c │ ├── w_016.c │ ├── w_017.c │ ├── w_018.c │ ├── w_019.c │ ├── w_020.c │ ├── w_021.c │ ├── w_022.c │ ├── w_023.c │ ├── w_024.c │ ├── w_025.c │ ├── w_026.c │ ├── w_027.c │ ├── w_028.c │ ├── w_029.c │ ├── w_030.c │ ├── w_031.c │ ├── w_032.c │ ├── w_033.c │ ├── w_034.c │ ├── w_035.c │ ├── w_036.c │ ├── w_037.c │ ├── w_038.c │ ├── w_039.c │ ├── w_040.c │ ├── w_041.c │ ├── w_042.c │ ├── w_043.c │ ├── w_044.c │ ├── w_045.c │ ├── w_046.c │ ├── w_047.c │ ├── w_048.c │ ├── w_049.c │ ├── w_050.c │ ├── w_051.c │ ├── w_052.c │ ├── w_053.c │ ├── w_053_056.h │ ├── w_054.c │ ├── w_055.c │ ├── w_056.c │ ├── w_057.c │ ├── w_058.c │ └── weapon_private.h ├── tools ├── .gitignore ├── analyze_calls.py ├── auto_dedupe_new_overlay.py ├── bin2c.py ├── builds │ ├── build.bat │ ├── check.py │ ├── dosemu_wrapper.sh │ ├── gen.py │ ├── ninja_syntax.py │ └── saturn.py ├── decompile.py ├── dirt_patcher.py ├── display_animation.py ├── display_texture.py ├── dups │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ ├── levenshtein_hashmap.rs │ │ ├── main.rs │ │ └── types.rs ├── function_finder │ ├── fix_matchings.py │ ├── function_finder_psp.py │ ├── function_finder_psx.py │ ├── function_finder_saturn.py │ └── helpers.py ├── gfxsotn │ ├── go.mod │ └── main.go ├── gfxstage.py ├── lint-license.py ├── lints │ └── sotn-lint │ │ ├── Cargo.lock │ │ ├── Cargo.toml │ │ └── src │ │ ├── bit_flag_line_transformer.rs │ │ ├── collider_effects.rs │ │ ├── drawflags.rs │ │ ├── drawmodes.rs │ │ ├── enum_line_transformer.rs │ │ ├── enum_statement.rs │ │ ├── fixed.rs │ │ ├── flags.rs │ │ ├── line_transformer.rs │ │ ├── main.rs │ │ ├── player_status.rs │ │ ├── primitive_type.rs │ │ └── relics.rs ├── list_ovl_files.py ├── m2ctx.py ├── make-config.py ├── png2bin.py ├── png2s.py ├── progress.py ├── requirements-debian.txt ├── requirements-python.txt ├── richter_symbols.py ├── sotn-assets │ ├── asset_config.go │ ├── assets │ │ ├── assets.go │ │ ├── binary │ │ │ └── handle.go │ │ ├── blueprintsdef │ │ │ └── handler.go │ │ ├── cmpgfx │ │ │ └── handler.go │ │ ├── cutscene │ │ │ └── handler.go │ │ ├── gfxbanks │ │ │ ├── graphics.go │ │ │ └── handler.go │ │ ├── layer │ │ │ ├── handler.go │ │ │ ├── layer.go │ │ │ ├── tile_def.go │ │ │ └── tile_map.go │ │ ├── layout │ │ │ ├── handler.go │ │ │ └── layout.go │ │ ├── paldef │ │ │ └── palette_def.go │ │ ├── palette │ │ │ ├── jasc.go │ │ │ ├── palette.go │ │ │ └── png.go │ │ ├── rawgfx │ │ │ └── handler.go │ │ ├── rooms │ │ │ └── handler.go │ │ ├── sfxconfig │ │ │ └── handler.go │ │ ├── skip │ │ │ └── handler.go │ │ ├── spritebanks │ │ │ ├── handler.go │ │ │ └── spritebanks.go │ │ ├── spriteset │ │ │ ├── handler.go │ │ │ ├── spriteparts.go │ │ │ └── spriteset.go │ │ ├── spritesheet │ │ │ └── handler.go │ │ ├── subweaponsdef │ │ │ └── handler.go │ │ └── xamusicconfig │ │ │ └── handler.go │ ├── datarange │ │ └── data_range.go │ ├── go.mod │ ├── go.sum │ ├── info.go │ ├── info_test.go │ ├── main.go │ ├── psx │ │ └── offsets.go │ ├── sotn │ │ ├── enum.go │ │ ├── enum_test.go │ │ ├── inflate.go │ │ ├── stage.go │ │ └── version.go │ ├── splat │ │ └── splat.go │ └── util │ │ ├── png.go │ │ └── utils.go ├── sotn-debugmodule │ ├── Makefile │ ├── debug_flags.c │ ├── debugmode.c │ ├── debugmode.h │ ├── entity_spawn.c │ ├── flag_checker.c │ ├── fontmanager.c │ ├── inject.c │ ├── menu.c │ ├── sfx_player.c │ └── sotn-debugmodule.ld ├── sotn-disk │ ├── cue.go │ ├── extract.go │ ├── go.mod │ ├── iso9660 │ │ ├── basic_types.go │ │ ├── ecc.go │ │ ├── entry.go │ │ ├── iso9660.go │ │ ├── make.go │ │ ├── path_table.go │ │ ├── sector.go │ │ ├── timestamp.go │ │ └── volume.go │ ├── list.go │ ├── main.go │ ├── make.go │ ├── patch.go │ └── ps_logo.go ├── sotn_diff.py ├── sotn_permuter │ ├── README.md │ ├── decomp_permuter │ ├── default_weights.toml │ ├── importer.py │ ├── permuter_loader.py │ ├── permuter_settings.pspeu.toml │ ├── permuter_settings.us.toml │ ├── prelude.inc │ └── src ├── sotn_str │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── main.rs ├── splat_ext │ ├── __init__.py │ ├── accessory_config.json │ ├── animset.py │ ├── assets.py │ ├── ci4.py │ ├── cmp.py │ ├── enemydefs_config.json │ ├── equipment_config.json │ ├── grey4.py │ ├── i4.py │ ├── pal.py │ ├── palette.py │ ├── raw.py │ ├── rgba16.py │ └── utils.py ├── split_jpt_yaml │ ├── split_jpt_yaml.py │ └── test.py ├── spritesheet.py ├── symbols.py ├── symbols_test.py └── vab-ex │ ├── Cargo.lock │ ├── Cargo.toml │ ├── src │ └── main.rs │ └── test.sh ├── weapon0.ld └── weapon1.ld /.github/workflows/dockerfile.yaml: -------------------------------------------------------------------------------- 1 | name: Build Docker image 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | paths: 8 | - 'Dockerfile' 9 | - 'tools/**' 10 | - 'Makefile*' 11 | workflow_dispatch: 12 | 13 | jobs: 14 | format: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - name: Clone main repository 18 | uses: actions/checkout@v4 19 | with: 20 | submodules: false 21 | - name: Build image 22 | run: docker build . 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Matches globally 2 | ctx.c 3 | ctx.c.m2c 4 | sotn_calltree.txt 5 | __pycache__ 6 | .idea/ 7 | .venv/ 8 | asm/ 9 | build/ 10 | expected/ 11 | disks/ 12 | nonmatchings/ 13 | .vscode/settings.json 14 | 15 | # Unsure if these are directories or files 16 | function_calls 17 | gmon.out 18 | 19 | # Temporary files that are used during make format-src and make format-symbols respectively 20 | format-src.run 21 | format-symbols.run 22 | 23 | # Matches in repo root folder only 24 | /*.map 25 | /assets/ 26 | 27 | # ninja stuff 28 | .ninja_lock 29 | .ninja_log 30 | build.ninja 31 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | sotn.xee.dev -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | # Matches in bin or any subdirectory 2 | * 3 | !.gitignore 4 | !*.sha256 5 | -------------------------------------------------------------------------------- /bin/allegrex-as.tar.gz.sha256: -------------------------------------------------------------------------------- 1 | 7408cc6c02664497a5058f61c275d60d208a0e9492d295330daf59fa1ea5b80f bin/allegrex-as.tar.gz 2 | -------------------------------------------------------------------------------- /bin/cc1-psx-26.tar.gz.sha256: -------------------------------------------------------------------------------- 1 | ab156fe598ccad6aef704b8b35f3272de7edaf7eaab4e3d504c346ce6647df6c bin/cc1-psx-26.tar.gz 2 | -------------------------------------------------------------------------------- /bin/clang-format.tar.gz.sha256: -------------------------------------------------------------------------------- 1 | 4eee96d9c35df565da6266a8364d93bd7dbac35783cf0e0de2628057d0b8a1ac bin/clang-format.tar.gz 2 | -------------------------------------------------------------------------------- /bin/cygnus-2.7-96Q3-bin.tar.gz.sha256: -------------------------------------------------------------------------------- 1 | 04ea5aad6daac640c445e571453e7477896e2e3e1e4219787d268233fc9f4960 bin/cygnus-2.7-96Q3-bin.tar.gz 2 | -------------------------------------------------------------------------------- /bin/mwccpsp_219.tar.gz.sha256: -------------------------------------------------------------------------------- 1 | 62ec4faa807ad5afaefa7c92de6423505072c321fad13c071c2f640e9820b5c8 bin/mwccpsp_219.tar.gz -------------------------------------------------------------------------------- /bin/wibo.sha256: -------------------------------------------------------------------------------- 1 | 2c2083530c4fb09b6eb8311f3ff2eada58c2d83eaed10fc5a3d4f5efc59fdc57 bin/wibo 2 | -------------------------------------------------------------------------------- /config/.gitignore: -------------------------------------------------------------------------------- 1 | # Matches in config or any subdirectory 2 | !.gitignore 3 | *.ld 4 | *auto.*.txt 5 | *_syms.txt 6 | !zero.ld 7 | !*_user_syms.txt 8 | -------------------------------------------------------------------------------- /config/check.hd.sha: -------------------------------------------------------------------------------- 1 | 32698a322586d2fd4249467c99f5102faff44f30 build/hd/cen.bin 2 | f9f4833355d776b377db5adb62d16eae24975160 build/hd/f_cen.bin 3 | ea268a06a7eb7cd99928ba40e774577c4a1c504d build/hd/dra.bin 4 | 1dcd6b881e2c0906854c3d53839dfb4ae0d359d6 build/hd/ric.bin 5 | 3ae1425d694b0e4d65c6bb71d5a91f1769aec30c build/hd/wrp.bin 6 | c1284f0c662f3c8fdb8a7c17cebf8e5cf1d96c1b build/hd/f_wrp.bin 7 | 2253aee1338fff85351887b4473fb0b02798222b build/hd/tt_000.bin 8 | -------------------------------------------------------------------------------- /config/check.saturn.sha: -------------------------------------------------------------------------------- 1 | f03234c4f21819d30d34b05aaa7e352702dca0dc build/saturn/GAME.PRG 2 | d513a3a1fcab77dcb792fedfe974434c80591328 build/saturn/T_BAT.PRG 3 | 54c2e3e59f9f627bc0df6d9ab5acff4987fa4722 build/saturn/0.BIN 4 | f44004e15fffa15253a513372d999becc143f43f build/saturn/STAGE_02.PRG 5 | ebc09d976d67777a255c6a6015319acafb6eba47 build/saturn/WARP.PRG 6 | 8024fbf536d45ec76c94f5b7d35e8ef9c7d84f6a build/saturn/ALUCARD.PRG 7 | 9d3a5a0676d56d43520ad7554df99d451acea7be build/saturn/RICHTER.PRG 8 | -------------------------------------------------------------------------------- /config/dirt.hd.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /config/dirt.pspeu.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /config/dirt.saturn.json: -------------------------------------------------------------------------------- 1 | [] -------------------------------------------------------------------------------- /config/dirt.us.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "build/us/DRA.BIN", 4 | "0x220E": 41, 5 | "0x220F": 13, 6 | "0x2459": 49, 7 | "0x245A": 55, 8 | "0x245B": 44, 9 | "0x10625": 128, 10 | "0x10626": 2, 11 | "0x10627": 20, 12 | "0x108CA": 240, 13 | "0x108CB": 2, 14 | "0x3C1A7": 110, 15 | "0x3CC09": 10, 16 | "0x3CC0A": 13, 17 | "0x3CC0B": 10, 18 | "0x3D186": 9, 19 | "0x3D187": 9 20 | } 21 | ] -------------------------------------------------------------------------------- /config/saturn/alucard.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | __romPos = 0; 4 | _gp = 0x0; 5 | alucard_ROM_START = __romPos; 6 | alucard_VRAM = ADDR(.alucard); 7 | .alucard 0x060A5000 : AT(alucard_ROM_START) SUBALIGN(2) 8 | { 9 | alucard_TEXT_START = .; 10 | build/saturn/alucard.o(.text); 11 | alucard_TEXT_END = .; 12 | alucard_TEXT_SIZE = ABSOLUTE(alucard_TEXT_END - alucard_TEXT_START); 13 | } 14 | __romPos += SIZEOF(.alucard); 15 | __romPos = ALIGN(__romPos, 16); 16 | alucard_ROM_END = __romPos; 17 | alucard_VRAM_END = .; 18 | 19 | /DISCARD/ : 20 | { 21 | *(*); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/saturn/alucard_user_syms.txt: -------------------------------------------------------------------------------- 1 | _g_Entities = 0x060997F8; 2 | -------------------------------------------------------------------------------- /config/saturn/game.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | __romPos = 0; 4 | _gp = 0x0; 5 | game_ROM_START = __romPos; 6 | game_VRAM = ADDR(.game); 7 | .game 0x06066000 : AT(game_ROM_START) SUBALIGN(2) 8 | { 9 | game_TEXT_START = .; 10 | build/saturn/game.o(.text); 11 | game_TEXT_END = .; 12 | game_TEXT_SIZE = ABSOLUTE(game_TEXT_END - game_TEXT_START); 13 | } 14 | __romPos += SIZEOF(.game); 15 | __romPos = ALIGN(__romPos, 16); 16 | game_ROM_END = __romPos; 17 | game_VRAM_END = .; 18 | 19 | /DISCARD/ : 20 | { 21 | *(*); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/saturn/t_bat.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | __romPos = 0; 4 | _gp = 0x0; 5 | t_bat_ROM_START = __romPos; 6 | t_bat_VRAM = ADDR(.t_bat); 7 | .t_bat 0x060CF000 : AT(t_bat_ROM_START) SUBALIGN(2) 8 | { 9 | t_bat_TEXT_START = .; 10 | build/saturn/t_bat.o(.text); 11 | t_bat_TEXT_END = .; 12 | t_bat_TEXT_SIZE = ABSOLUTE(t_bat_TEXT_END - t_bat_TEXT_START); 13 | } 14 | __romPos += SIZEOF(.t_bat); 15 | __romPos = ALIGN(__romPos, 16); 16 | t_bat_ROM_END = __romPos; 17 | t_bat_VRAM_END = .; 18 | 19 | /DISCARD/ : 20 | { 21 | *(*); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/saturn/t_bat_user_syms.txt: -------------------------------------------------------------------------------- 1 | _s_IsServantDestroyed = 0x060D1DFC; 2 | -------------------------------------------------------------------------------- /config/saturn/warp.ld: -------------------------------------------------------------------------------- 1 | SECTIONS 2 | { 3 | __romPos = 0; 4 | _gp = 0x0; 5 | warp_ROM_START = __romPos; 6 | warp_VRAM = ADDR(.warp); 7 | .warp 0x060DC000 : AT(warp_ROM_START) SUBALIGN(2) 8 | { 9 | warp_TEXT_START = .; 10 | build/saturn/warp.o(.text); 11 | warp_TEXT_END = .; 12 | warp_TEXT_SIZE = ABSOLUTE(warp_TEXT_END - warp_TEXT_START); 13 | } 14 | __romPos += SIZEOF(.warp); 15 | __romPos = ALIGN(__romPos, 16); 16 | warp_ROM_END = __romPos; 17 | warp_VRAM_END = .; 18 | 19 | /DISCARD/ : 20 | { 21 | *(*); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /config/saturn/warp_syms.txt: -------------------------------------------------------------------------------- 1 | _func_060DC040 = 0x060DC040; 2 | _func_060DC4D4 = 0x060DC4D4; 3 | _func_060DC7D8 = 0x060DC7D8; 4 | _func_060DCAFC = 0x060DCAFC; 5 | _func_060DCE50 = 0x060DCE50; 6 | _func_060DCF5C = 0x060DCF5C; 7 | _func_060DD038 = 0x060DD038; 8 | _func_060DD894 = 0x060DD894; 9 | -------------------------------------------------------------------------------- /config/saturn/warp_user_syms.txt: -------------------------------------------------------------------------------- 1 | EntityWarpRoom = 0x060DC040; 2 | WarpRoomInit = 0x060DC4D4; 3 | WarpRoomAnimateBg = 0x060DC7D8; 4 | EntityWarpSmallRocks = 0x060DCAFC; -------------------------------------------------------------------------------- /config/symbols.hd.ric.txt: -------------------------------------------------------------------------------- 1 | g_RicComboButtons = 0x80175834; // size:0x08 2 | D_801758E6 = 0x8017583A; 3 | g_RicDebug = 0x801758A4; // size:0x08 4 | D_80175958 = 0x801758AC; 5 | D_801759D8 = 0x8017592C; 6 | -------------------------------------------------------------------------------- /config/symbols.hd.stwrp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.hd.stwrp.txt -------------------------------------------------------------------------------- /config/symbols.hd.tt_000.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.hd.tt_000.txt -------------------------------------------------------------------------------- /config/symbols.us.bomar.txt: -------------------------------------------------------------------------------- 1 | bird_cage_pos_x = 0x80181280; 2 | bird_cage_pos_y = 0x80181284; 3 | statue_pos_x_1 = 0x80181288; 4 | statue_pos_x_2 = 0x8018128C; 5 | gear_pos_x = 0x80181290; 6 | stone_door_pos_x_1 = 0x80181294; 7 | stone_door_pos_x_2 = 0x80181298; 8 | statue_pos_x_3 = 0x801812A0; 9 | anim_bird_cage = 0x801812A8; 10 | anim_gear_1 = 0x801812C4; 11 | anim_gear_2 = 0x801812D0; 12 | g_StoneDoorTiles = 0x801812DC; 13 | -------------------------------------------------------------------------------- /config/symbols.us.dra.txt: -------------------------------------------------------------------------------- 1 | D_800ACE88 = 0x800ACE88; // ignore:true 2 | g_SfxScripts = 0x800C1ECC; 3 | D_80137EF8 = 0x80137EF8; 4 | g_PlOvl = 0x8013C000; 5 | g_PlOvlAluBatSpritesheet = 0x8013C004; 6 | g_PlOvlSpritesheet = 0x8013C020; 7 | g_imgUnk8013C200 = 0x8013C200; 8 | g_imgUnk8013C270 = 0x8013C270; 9 | g_StageOverlay = 0x80180000; 10 | -------------------------------------------------------------------------------- /config/symbols.us.main.txt: -------------------------------------------------------------------------------- 1 | D_80010960 = 0x80010960; // force_migration:True 2 | D_80010964 = 0x80010964; // force_migration:True 3 | libcd_CDRegister0 = 0x80032E68; 4 | libcd_CDRegister2 = 0x80032E70; 5 | libcd_CDRegister3 = 0x80032E74; 6 | main_fd = 0x800339F8; 7 | main_cdlFile = 0x800339FC; 8 | main_cdlMode = 0x80033A14; 9 | g_MainGame = 0x800A0000; 10 | -------------------------------------------------------------------------------- /config/symbols.us.ric.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.ric.txt -------------------------------------------------------------------------------- /config/symbols.us.stcen.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.stcen.txt -------------------------------------------------------------------------------- /config/symbols.us.stchi.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.stchi.txt -------------------------------------------------------------------------------- /config/symbols.us.stnz0.txt: -------------------------------------------------------------------------------- 1 | EntityBossFightManager = 0x801B3FCC; 2 | EntityBossRoomBlock = 0x801B4518; 3 | EntitySlogra = 0x801B4778; 4 | EntityGaibon = 0x801B5778; 5 | EntityEquipItemDrop = 0x801BED20; 6 | -------------------------------------------------------------------------------- /config/symbols.us.strwrp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.strwrp.txt -------------------------------------------------------------------------------- /config/symbols.us.stst0.txt: -------------------------------------------------------------------------------- 1 | g_EInit3DObject = 0x801805D4; 2 | g_collectVelocity = 0x80181E3C; 3 | ST0_EntityCutscene = 0x801A9210; 4 | EntityCutscene = 0x801AA290; 5 | EntitySecretButton = 0x801AA8DC; 6 | EntitySecretStairs = 0x801AACB4; 7 | EntityStageTitleFadeout = 0x801AB0C8; 8 | EntityStageTitleCard = 0x801AB5E4; 9 | EntityDracula = 0x801AC564; 10 | EntityDraculaFinalForm = 0x801ADD60; 11 | PrologueScroll = 0x801B0464; 12 | DestroyEntity = 0x801B4908; 13 | InitializeEntity = 0x801B584C; 14 | EntityEquipItemDrop = 0x801B6D34; 15 | EntityClouds = 0x801BAB08; 16 | EntityClockTower3D = 0x801BB2AC; 17 | EntityCutscenePhotograph = 0x801BB764; 18 | -------------------------------------------------------------------------------- /config/symbols.us.stwrp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.stwrp.txt -------------------------------------------------------------------------------- /config/symbols.us.tt_000.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.tt_000.txt -------------------------------------------------------------------------------- /config/symbols.us.tt_001.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.tt_001.txt -------------------------------------------------------------------------------- /config/symbols.us.tt_002.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.tt_002.txt -------------------------------------------------------------------------------- /config/symbols.us.tt_003.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/config/symbols.us.tt_003.txt -------------------------------------------------------------------------------- /config/symbols.us.tt_004.txt: -------------------------------------------------------------------------------- 1 | D_us_80170080_y = 0x80170084; 2 | D_us_80170080_z = 0x80170088; 3 | Max3 = 0x80172B8C; 4 | CheckEntityValid = 0x80173C4C; 5 | CheckSwordLevel = 0x80173CB8; 6 | DestroyEntity = 0x801777E4; 7 | GetTargetPositionWithDistanceBuffer = 0x8017794C; 8 | ProcessEvent = 0x80177BE8; 9 | -------------------------------------------------------------------------------- /config/symbols.us.weapon.txt: -------------------------------------------------------------------------------- 1 | g_Weapon = 0x8017A000; 2 | BottomCornerText = 0x8017AB54; 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.dra.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_dra_psp_mwo_header_bin_start); 2 | EXTERN(MainGame); 3 | EXTERN(func_psp_090E4C18); 4 | EXTERN(func_psp_090E4C58); 5 | EXTERN(func_psp_090E4C68); 6 | EXTERN(func_psp_090E4C90); 7 | EXTERN(func_psp_090FFAB8); 8 | EXTERN(IsMemcardBlockUsed); 9 | EXTERN(MemcardReadFile); 10 | EXTERN(MemcardEraseFile); 11 | EXTERN(func_psp_09141860); 12 | EXTERN(func_psp_09141878); 13 | -------------------------------------------------------------------------------- /config/symexport.pspeu.maria.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_maria_mwo_header_bin_start); 2 | EXTERN(MAR_Load) 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.ric.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_ric_mwo_header_bin_start); 2 | EXTERN(RIC_Load) 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.stchi.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_st_chi_mwo_header_bin_start); 2 | EXTERN(func_psp_092447C0); 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.stlib.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_st_lib_mwo_header_bin_start); 2 | EXTERN(func_psp_09254120); -------------------------------------------------------------------------------- /config/symexport.pspeu.stno3.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_st_no3_mwo_header_bin_start); 2 | EXTERN(func_pspeu_09238360); 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.stno4.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_st_no4_mwo_header_bin_start); 2 | EXTERN(func_psp_09254120); 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.stst0.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_st_st0_mwo_header_bin_start); 2 | EXTERN(func_pspeu_09246B10); 3 | -------------------------------------------------------------------------------- /config/symexport.pspeu.stwrp.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_st_wrp_mwo_header_bin_start); 2 | EXTERN(func_psp_092447C0); 3 | EXTERN(g_ItemIconSlots); 4 | EXTERN(pad); 5 | -------------------------------------------------------------------------------- /config/symexport.pspeu.tt_000.txt: -------------------------------------------------------------------------------- 1 | EXTERN(_binary_assets_servant_tt_000_mwo_header_bin_start); 2 | EXTERN(func_092EC220); 3 | -------------------------------------------------------------------------------- /config/undefined_syms.beta.txt: -------------------------------------------------------------------------------- 1 | g_CastleFlags = 0x8003BDE8; 2 | g_api = 0x8003C670; 3 | g_Player = 0x80072684; 4 | D_80097488 = 0x80096F38; 5 | -------------------------------------------------------------------------------- /config/undefined_syms.pspeu.txt: -------------------------------------------------------------------------------- 1 | abs = 0x08906AF0; 2 | D_psp_09186EF8 = 0x09186EF8; 3 | D_psp_09186F10 = 0x09186F10; 4 | D_psp_09187040 = 0x09187040; 5 | g_api = 0x091CF738; 6 | g_GpuBuffers = 0x091FC4E8; 7 | richter_sprites = 0x092703C0; 8 | -------------------------------------------------------------------------------- /config/undefined_syms.us.txt: -------------------------------------------------------------------------------- 1 | g_api = 0x8003C774; 2 | g_GpuBuffers = 0x8003CB08; 3 | g_Clut = 0x8006CBCC; 4 | D_8006ED0C = 0x8006ED0C; 5 | D_8006ED2C = 0x8006ED2C; 6 | D_8006ED4C = 0x8006ED4C; 7 | g_Player = 0x80072BD0; 8 | g_Tilemap = 0x80073084; 9 | g_BgLayers = 0x800730D8; 10 | g_unkGraphicsStruct = 0x800973F8; 11 | g_pads = 0x80097490; 12 | g_Status = 0x80097964; 13 | g_PlayerDraw = 0x80097D1C; 14 | g_SfxScripts = 0x800C1ECC; 15 | g_ServantDesc = 0x80170000; 16 | D_8017D000 = 0x8017D000; 17 | -------------------------------------------------------------------------------- /disks/README: -------------------------------------------------------------------------------- 1 | Please store here your Castlevania: Symphony of the Night disk copy 2 | 3 | You need to rename the CUE file as sotn.us.cue 4 | -------------------------------------------------------------------------------- /go.work: -------------------------------------------------------------------------------- 1 | go 1.22 2 | 3 | use ./tools/gfxsotn 4 | 5 | use ./tools/sotn-disk 6 | 7 | use ./tools/sotn-assets 8 | -------------------------------------------------------------------------------- /go.work.sum: -------------------------------------------------------------------------------- 1 | github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY= 2 | github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= 3 | -------------------------------------------------------------------------------- /include/cloud_struct.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | typedef struct { 3 | u8* unkPtr; 4 | s16 unk4; 5 | u16 priority; 6 | } cloudData; 7 | 8 | typedef struct { 9 | /* 0x00 */ s32 unk0; 10 | /* 0x04 */ s32 unk4; 11 | /* 0x08 */ s32 unk8; 12 | /* 0x0C */ s32 unkC; 13 | } cloudStructUnk; 14 | -------------------------------------------------------------------------------- /include/macro.inc: -------------------------------------------------------------------------------- 1 | .ifndef .L_MACRO_INC 2 | .L_MACRO_INC: 3 | 4 | .macro jlabel label 5 | glabel \label 6 | .endm 7 | 8 | .macro glabel label 9 | .global \label 10 | \label: 11 | .endm 12 | 13 | .macro .def # 14 | .endm 15 | 16 | 17 | .include "gte.inc" 18 | 19 | .endif 20 | -------------------------------------------------------------------------------- /include/main.inc: -------------------------------------------------------------------------------- 1 | .include "macro.inc" 2 | .set noat 3 | .set noreorder 4 | .align 4 5 | .section .text 6 | 7 | .macro syscalldef label Sect Func 8 | .global \label 9 | \label: 10 | addiu $t2, $zero, \Sect 11 | jr $t2 12 | addiu $t1, $zero, \Func 13 | nop 14 | .endm 15 | 16 | .macro exceptiondef label Func 17 | .global \label 18 | \label: 19 | addiu $a0, $zero, \Func 20 | syscall 21 | jr $ra 22 | nop 23 | .endm 24 | -------------------------------------------------------------------------------- /include/psxsdk/libcard.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBCARD_H 2 | #define LIBCARD_H 3 | 4 | // _card_info 5 | // _card_load 6 | extern void InitCARD(long val); 7 | extern long StartCARD(void); 8 | long _card_clear(long chan); 9 | 10 | // _card_write 11 | // _new_card 12 | 13 | #endif // LIBCARD_H 14 | -------------------------------------------------------------------------------- /include/psxsdk/libgs.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBGS_H 2 | #define LIBGS_H 3 | 4 | void GsClearVcount(void); 5 | long GsGetVcount(); 6 | void GsInitVcount(); 7 | 8 | #endif 9 | -------------------------------------------------------------------------------- /src/.gitignore: -------------------------------------------------------------------------------- 1 | # Matches in src or any subdirectory 2 | !.gitignore 3 | .assets_build_done_* 4 | gen_*.c 5 | gen_*.h 6 | **/gen/*.c 7 | **/gen/*.h 8 | **/gen/*.s 9 | -------------------------------------------------------------------------------- /src/alloc_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | Entity* AllocEntity(Entity* start, Entity* end) { 3 | Entity* current = start; 4 | 5 | while (current < end) { 6 | if (current->entityId == E_NONE) { 7 | DestroyEntity(current); 8 | return current; 9 | } 10 | current++; 11 | } 12 | return NULL; 13 | } 14 | -------------------------------------------------------------------------------- /src/boss/bo4/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/blit_char.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/collision.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | #include "../../st/pfn_entity_update.h" 4 | #include "../../st/create_entity.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/boss/bo4/dop_anim.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../dop_anim.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_collect.h" 3 | -------------------------------------------------------------------------------- /src/boss/bo4/e_life_up.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | #include "../../st/e_life_up.h" 4 | -------------------------------------------------------------------------------- /src/boss/bo4/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | #include "../../st/pfn_entity_update.h" 4 | 5 | void EntityUnkId13(Entity* self); 6 | void EntityExplosionVariants(Entity* self); 7 | void EntityGreyPuff(Entity* self); 8 | 9 | #define HEART_DROP_CASTLE_FLAG 0 10 | #include "../../st/e_misc.h" 11 | -------------------------------------------------------------------------------- /src/boss/bo4/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/e_particles.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/e_red_door.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/e_room_fg.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #include "../../st/e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/popup.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/prim_helpers.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/st_common.h" 5 | -------------------------------------------------------------------------------- /src/boss/bo4/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "bo4.h" 3 | 4 | #include "../../st/st_update.h" 5 | -------------------------------------------------------------------------------- /src/boss/mar/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/blit_char.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | #include 4 | 5 | STATIC_PAD_BSS(0xC00); 6 | 7 | s32 g_SkipCutscene; 8 | Dialogue g_Dialogue; 9 | s32 D_us_8019AEB8[26]; 10 | s32 g_CutsceneFlags; 11 | STATIC_PAD_BSS(4); 12 | s16 g_Statues; 13 | s16 D_us_8019AF2A; 14 | s32 D_us_8019AF2C; 15 | -------------------------------------------------------------------------------- /src/boss/mar/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/collision.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | #include "../../st/pfn_entity_update.h" 4 | #include "../../st/create_entity.h" 5 | -------------------------------------------------------------------------------- /src/boss/mar/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | #include 4 | 5 | u8 OVL_EXPORT(cutscene_data)[] = { 6 | #include "gen/cutscene_data.h" 7 | }; 8 | -------------------------------------------------------------------------------- /src/boss/mar/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/boss/mar/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_collect.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/e_life_up.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | #include "../../st/e_life_up.h" 4 | -------------------------------------------------------------------------------- /src/boss/mar/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | #include "../../st/pfn_entity_update.h" 4 | 5 | void EntityUnkId13(Entity* self); 6 | void EntityExplosionVariants(Entity* self); 7 | void EntityGreyPuff(Entity* self); 8 | 9 | #define HEART_DROP_CASTLE_FLAG 0 10 | #include "../../st/e_misc.h" 11 | -------------------------------------------------------------------------------- /src/boss/mar/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_particles.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | #include "../../st/e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/boss/mar/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #include "../../st/e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/boss/mar/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/popup.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mar.h" 3 | #include "../../st/st_common.h" 4 | -------------------------------------------------------------------------------- /src/boss/mar/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/st_update.h" 3 | -------------------------------------------------------------------------------- /src/boss/mar/tile_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #include "gen/tilemap_05300.h" 5 | #include "gen/tilemap_05500.h" 6 | #include "gen/tiledef_09700.h" 7 | -------------------------------------------------------------------------------- /src/boss/mar/unk.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | STATIC_PAD_BSS(0x60); 5 | -------------------------------------------------------------------------------- /src/boss/rbo3/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/blit_char.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/collision.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | #include "../../st/pfn_entity_update.h" 4 | #include "../../st/create_entity.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo3/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[] = {0x010F, 0x020C, 0x0307, 0x0404, 0x0520, 0x00FF}; 5 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_breakable.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | 4 | extern u8* g_eBreakableAnimations[]; 5 | extern u8 g_eBreakableHitboxes[]; 6 | extern u8 g_eBreakableExplosionTypes[]; 7 | extern u16 g_eBreakableanimSets[]; 8 | extern u8 g_eBreakableDrawModes[]; 9 | 10 | #include "../../st/e_breakable.h" 11 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_collect.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_life_up.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | 4 | #include "../../st/e_life_up.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | 4 | void EntityUnkId13(Entity* self); 5 | void EntityExplosionVariants(Entity* self); 6 | void EntityGreyPuff(Entity* self); 7 | 8 | #define HEART_DROP_CASTLE_FLAG 0 9 | 10 | #include "../../st/pfn_entity_update.h" 11 | #include "../../st/e_misc.h" 12 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_particles.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | #include "../../st/e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_stage_name.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/popup.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo3/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo3.h" 3 | #include "../../st/st_common.h" 4 | -------------------------------------------------------------------------------- /src/boss/rbo3/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/st_update.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/blit_char.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | 4 | #include "../../st/collision.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | #include "../../st/pfn_entity_update.h" 4 | #include "../../st/create_entity.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/dop_anim.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | 4 | #include "../dop_anim.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_collect.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_life_up.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | 4 | #include "../../st/e_life_up.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | #include "../../st/pfn_entity_update.h" 4 | 5 | void EntityUnkId13(Entity* self); 6 | void EntityExplosionVariants(Entity* self); 7 | void EntityGreyPuff(Entity* self); 8 | 9 | #define HEART_DROP_CASTLE_FLAG 0 10 | #include "../../st/e_misc.h" 11 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_particles.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | 4 | #include "../../st/e_red_door.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #include "../../st/e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/popup.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/boss/rbo5/rbo5.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef RBO5_H 3 | #define RBO5_H 4 | 5 | #include 6 | 7 | #define OVL_EXPORT(x) RBO5_##x 8 | #define STAGE_FLAG OVL_EXPORT(STAGE_FLAG) 9 | 10 | #include "../doppleganger.h" 11 | 12 | #endif // RBO5_H 13 | -------------------------------------------------------------------------------- /src/boss/rbo5/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rbo5.h" 3 | 4 | #include "../../st/st_common.h" 5 | -------------------------------------------------------------------------------- /src/boss/rbo5/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../st/st_update.h" 3 | -------------------------------------------------------------------------------- /src/destroy_entities_from_index.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef HARD_LINK 3 | void DestroyEntitiesFromIndex(s16 index) { 4 | Entity* entity = &g_Entities[index]; 5 | 6 | while (entity < &g_Entities[TOTAL_ENTITY_COUNT - 1]) { 7 | DestroyEntity(entity); 8 | entity++; 9 | } 10 | } 11 | #endif 12 | -------------------------------------------------------------------------------- /src/destroy_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef HARD_LINK 3 | void DestroyEntity(Entity* entity) { 4 | s32 i; 5 | s32 length; 6 | u32* ptr; 7 | 8 | if (entity->flags & FLAG_HAS_PRIMS) { 9 | g_api.FreePrimitives(entity->primIndex); 10 | } 11 | 12 | ptr = (u32*)entity; 13 | length = sizeof(Entity) / sizeof(u32); 14 | for (i = 0; i < length; i++) 15 | *ptr++ = 0; 16 | } 17 | #endif 18 | -------------------------------------------------------------------------------- /src/dra/config_us.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../config_us.h" 3 | -------------------------------------------------------------------------------- /src/dra/d_10798.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dra.h" 3 | 4 | helper_8012F178 D_800B08CC[6] = {0}; 5 | 6 | s32 D_800B0914 = 0; 7 | s32 D_800B0918 = 0; 8 | s32 D_800B091C = 0; 9 | s32 D_800B0920 = 0; 10 | -------------------------------------------------------------------------------- /src/dra/lang_us.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "game.h" 3 | -------------------------------------------------------------------------------- /src/dra/mist.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | typedef struct { 5 | f32 posX; 6 | f32 posY; 7 | s16 angle1; 8 | s16 angle2; 9 | s16 size; 10 | s16 xOffset; 11 | s16 yOffset; 12 | s16 pad; 13 | } mistStruct; // size = 0x14 14 | -------------------------------------------------------------------------------- /src/dra/save_mgr.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dra.h" 3 | #include "dra_bss.h" 4 | #include "../save_mgr.h" 5 | -------------------------------------------------------------------------------- /src/dra/save_mgr_pre.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dra.h" 3 | #include "../save_mgr_pre.h" 4 | -------------------------------------------------------------------------------- /src/dra_psp/23138.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../dra/dra.h" 3 | 4 | extern s32 g_CurrentStream; 5 | 6 | void func_psp_090FFAB8(void) { 7 | s32 var_a1 = 0; 8 | switch (g_CurrentStream) { 9 | case 0: 10 | var_a1 = 8; 11 | break; 12 | case 1: 13 | var_a1 = 8; 14 | break; 15 | case 2: 16 | var_a1 = 0x6008; 17 | break; 18 | case 3: 19 | var_a1 = 0x6008; 20 | break; 21 | } 22 | func_8912820(g_CurrentStream, var_a1); 23 | D_8003C728 = 0; 24 | g_IsUsingCd = 0; 25 | } 26 | -------------------------------------------------------------------------------- /src/dra_psp/cd.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../dra/dra.h" 3 | #include "../dra/dra_bss.h" 4 | 5 | void func_801073C0(void) { 6 | CdReadyCallback(NULL); 7 | CdDataCallback(NULL); 8 | } 9 | 10 | CdFile D_800ACC64 = {0x0000, 3, 0x00000, 0, 0, 0xFF, 0}; 11 | void func_801083BC(void) { 12 | g_CdStep = CdStep_LoadInit; 13 | g_LoadFile = CdFile_25; 14 | D_8013AE9C = 10; 15 | D_800ACC64.loc = 0; 16 | } 17 | -------------------------------------------------------------------------------- /src/dra_psp/dra_psp.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../dra/dra.h" 3 | 4 | extern s32 D_psp_091893B8[]; 5 | extern s32 D_psp_091CDC80; 6 | extern s32 D_psp_091CDC88; 7 | 8 | s32 func_89192EC(s32, s32); 9 | void func_892A620(s32, s32); 10 | void SetCdVolume(s32, s32, s32); 11 | void func_psp_09141668(s32); 12 | -------------------------------------------------------------------------------- /src/get_lang.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #ifdef VERSION_PSP 5 | 6 | #pragma optimization_level 0 7 | 8 | extern s32 g_UserLanguage; 9 | 10 | static void* GetLang(void* en, void* fr, void* sp, void* ge, void* it) { 11 | switch (g_UserLanguage) { 12 | default: 13 | case LANG_EN: 14 | return en; 15 | case LANG_FR: 16 | return fr; 17 | case LANG_SP: 18 | return sp; 19 | case LANG_GE: 20 | return ge; 21 | case LANG_IT: 22 | return it; 23 | } 24 | } 25 | 26 | #pragma optimization_level reset 27 | 28 | #endif 29 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a07.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(DeliverEvent, 0x7); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a08.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(OpenEvent, 0x8); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a09.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(CloseEvent, 0x9); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a10.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(WaitEvent, 0xA); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a11.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(TestEvent, 0xB); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a12.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(EnableEvent, 0xC); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a13.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(DisableEvent, 0xD); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a20.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(StopPAD, 0x14); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a21.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(PAD_init, 0x15); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a22.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(PAD_dr, 0x16); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a23.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(ReturnFromException, 0x17); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a24.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(ResetEntryInt, 0x18); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a25.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(HookEntryInt, 0x19); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a36.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | #include 3 | 4 | void EnterCriticalSection() { SYSCALL(1) } 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a37.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | #include 3 | 4 | void ExitCriticalSection() { SYSCALL(2) } 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a50.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(open, 0x32); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a51.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(lseek, 0x33); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a52.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(read, 0x34); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a53.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(write, 0x35); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a54.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(close, 0x36); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a65.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(format, 0x41); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a66.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(firstfile, 0x42); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a67.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(nextfile, 0x43); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a69.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(erase, 0x45); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a81.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(Krom2RawAdd, 0x51); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/a91.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(ChangeClearPAD, 0x5B); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c112.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(_bu_init, 0x70); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c114.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(_96_remove, 0x72); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c57.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(InitHeap, 0x39); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c66.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(Load, 0x42); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c67.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(Exec, 0x43); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c68.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(FlushCache, 0x44); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/c73.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(GPU_cw, 0x49); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libapi/l10.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_C_FUNCTION(ChangeClearRCnt, 0xA); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/a56.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(exit, 0x38); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/a63.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(puts, 0x3F); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c19.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(setjmp, 0x13); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c21.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(strcat, 0x15); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c23.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(strcmp, 0x17); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c24.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(strncmp, 0x18); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c25.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(strcpy, 0x19); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c27.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(strlen, 0x1B); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c42.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(memcpy, 0x2A); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c43.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(memset, 0x2B); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c46.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(memchr, 0x2E); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c47.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(rand, 0x2F); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c48.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(srand, 0x30); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c51.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(malloc, 0x33); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c52.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(free, 0x34); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/c63.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(printf, 0x3F); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/memmove.c: -------------------------------------------------------------------------------- 1 | #include "types.h" 2 | 3 | void* memmove(u_char* dest, u_char* src, int count) { 4 | if (dest >= src) { 5 | while (count-- > 0) { 6 | dest[count] = src[count]; 7 | } 8 | } else { 9 | while (count-- > 0) { 10 | *dest++ = *src++; 11 | } 12 | } 13 | 14 | return dest; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/psxsdk/libc/sprintf.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | const char a0123456789abcd_0[] = "0123456789ABCDEF"; 4 | const char a0123456789abcd_1[] = "0123456789abcdef"; 5 | 6 | INCLUDE_ASM("main/nonmatchings/psxsdk/libc/sprintf", sprintf); 7 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/a74.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(InitCARD, 0x4A); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/a75.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(StartCARD, 0x4B); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/a78.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(_card_write, 0x4E); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/a80.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_B_FUNCTION(_new_card, 0x50); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/c171.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(_card_info, 0xAB); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/c172.c: -------------------------------------------------------------------------------- 1 | #include "bios.h" 2 | 3 | BIOS_A_FUNCTION(_card_load, 0xAC); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcard/card.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include 3 | 4 | long _card_clear(long chan) { 5 | _new_card(); 6 | return _card_write(chan, 0x3F, 0); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_002.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | void init_ring_status(s32, s32); 5 | extern s32 D_8003C0FC; 6 | extern s16 D_8003C75C; 7 | extern s32 D_8003C908; 8 | extern s32 D_800730D4; 9 | extern s32 D_80097954; 10 | extern s32 D_80097958; 11 | extern s32 D_80097960; 12 | extern s32 D_80098894; 13 | 14 | void StClearRing(void) { 15 | D_80097960 = 0; 16 | D_80097958 = 0; 17 | D_80097954 = 0; 18 | D_800730D4 = 0; 19 | init_ring_status(0, D_80098894); 20 | D_8003C908 = 0; 21 | D_8003C75C = 0; 22 | D_8003C0FC = 0; 23 | } 24 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_003.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "psxsdk/libcd.h" 3 | #include "registers.h" 4 | 5 | void StUnSetRing() { 6 | EnterCriticalSection(); 7 | CdDataCallback(0); 8 | CdReadyCallback(0); 9 | *libcd_CDRegister0 = 0; 10 | *libcd_CDRegister3 = 0; 11 | ExitCriticalSection(); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_004.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_004", data_ready_callback); 5 | 6 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_004", StGetBackloc); 7 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_005.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_005", StSetStream); 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_007.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_007", StFreeRing); 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_008.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_008", init_ring_status); 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_009.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_009", StGetNext); 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_010.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | extern u32 D_8006BAF4; 5 | extern u32 D_800987B8; 6 | extern u32 D_800987C0; 7 | 8 | void StSetMask(u32 mask, u32 start, u32 end) { 9 | D_800987C0 = mask; 10 | D_8006BAF4 = start; 11 | D_800987B8 = end; 12 | } 13 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/c_011.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "registers.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_011", StCdInterrupt); 5 | 6 | void mem2mem(s32* dst, s32* src, u32 num) { 7 | u32 i; 8 | for (i = 0; i < num; i++) { 9 | *dst++ = *src++; 10 | } 11 | } 12 | 13 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/c_011", dma_execute); 14 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/cdread.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "psxsdk/libcd.h" 3 | 4 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", cb_read); 5 | 6 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", cd_read_retry); 7 | 8 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", CdRead); 9 | 10 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread", CdReadSync); 11 | 12 | extern CdlCB CD_ReadCallbackFunc; 13 | 14 | CdlCB CdReadCallback(CdlCB func) { 15 | CdlCB prevFunc = CD_ReadCallbackFunc; 16 | CD_ReadCallbackFunc = func; 17 | return prevFunc; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/cdread2.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/cdread2", CdRead2); 4 | 5 | void StCdInterrupt(); 6 | 7 | void StCdInterrupt2(void) { StCdInterrupt(); } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/cdrom.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | extern void StClearRing(void); 4 | extern s32 D_800987C8; 5 | extern s32 D_80098894; 6 | 7 | void StSetRing(s32 arg0, s32 arg1) { 8 | D_800987C8 = arg0; 9 | D_80098894 = arg1; 10 | StClearRing(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/event.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libcd/event", CdInit); 4 | 5 | extern void DeliverEvent(unsigned long, unsigned long); 6 | 7 | void def_cbsync(void) { DeliverEvent(0xF0000003, 0x20); } 8 | 9 | void def_cbready(void) { DeliverEvent(0xF0000003, 0x40); } 10 | 11 | void def_cbread(void) { DeliverEvent(0xF0000003, 0x40); } 12 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/libcd_internal.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern CdlCB CD_cbready; 4 | extern CdlCB CD_cbsync; 5 | extern unsigned char CD_mode; 6 | extern unsigned char CD_com; 7 | 8 | int CD_sync(int mode, unsigned char* result); 9 | int CD_ready(int mode, unsigned char* result); 10 | int CD_flush(void); 11 | void CD_initintr(void); 12 | int CD_init(void); 13 | int CD_initvol(void); 14 | int CD_getsector(void* buffer, size_t size); 15 | int CD_vol(CdlATV* vol); 16 | -------------------------------------------------------------------------------- /src/main/psxsdk/libcd/registers.h: -------------------------------------------------------------------------------- 1 | #include "types.h" 2 | 3 | static volatile u8* libcd_CDRegister0 = (u8*)0x1F801800; 4 | static volatile u8* libcd_CDRegister1 = (u8*)0x1F801801; 5 | static volatile u8* libcd_CDRegister2 = (u8*)0x1F801802; 6 | static volatile u8* libcd_CDRegister3 = (u8*)0x1F801803; 7 | -------------------------------------------------------------------------------- /src/main/psxsdk/libetc/pad.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include 3 | 4 | static int PadIdentifier; 5 | static int pad_buf = 0; 6 | 7 | void PadInit(int mode) { 8 | PadIdentifier = mode; 9 | pad_buf = -1; 10 | ResetCallback(); 11 | PAD_init(0x20000001, &pad_buf); 12 | ChangeClearPAD(0); 13 | } 14 | 15 | u_long PadRead(int id) { 16 | PAD_dr(); 17 | return ~pad_buf; 18 | } 19 | 20 | void PadStop(void) { StopPAD(); } 21 | -------------------------------------------------------------------------------- /src/main/psxsdk/libetc/vmode.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include 3 | 4 | static long videoMode = 0; 5 | 6 | long SetVideoMode(long mode) { 7 | long prev; 8 | 9 | prev = videoMode; 10 | videoMode = mode; 11 | return prev; 12 | } 13 | 14 | long GetVideoMode() { return videoMode; } 15 | -------------------------------------------------------------------------------- /src/main/psxsdk/libgs/gs_007.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "kernel.h" 3 | 4 | void GsInitVcount(void) { 5 | SetRCnt(RCntCNT1, 0xFFFFU, RCntMdNOINTR); 6 | StartRCnt(RCntCNT1); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libgs/gs_008.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "kernel.h" 3 | 4 | long GsGetVcount() { return GetRCnt(RCntCNT1); } 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libgs/gs_009.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "kernel.h" 3 | 4 | void GsClearVcount() { return ResetRCnt(RCntCNT1); } 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libgte/fog_01.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libgte/fog_01", SetFogNear); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libgte/geo_00.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | s32 rsin(s32 arg0) { 4 | if (arg0 < 0) { 5 | return -sin_1(-arg0 & 0xFFF); 6 | } 7 | return sin_1(arg0 & 0xFFF); 8 | } 9 | 10 | extern s16 rsin_tbl[]; 11 | s32 sin_1(s32 arg0) { 12 | if (arg0 < 0x801) { 13 | if (arg0 < 0x401) { 14 | return rsin_tbl[arg0]; 15 | } else { 16 | return rsin_tbl[0x800 - arg0]; 17 | } 18 | } else { 19 | if (arg0 < 0xC01) { 20 | return -1 * rsin_tbl[arg0 - 0x800]; 21 | } else { 22 | return -1 * rsin_tbl[0x1000 - arg0]; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/psxsdk/libgte/geo_01.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | extern s16 rsin_tbl[]; 4 | 5 | int rcos(int a) { 6 | if (a < 0) { 7 | a = -a; 8 | } 9 | a &= 0xFFF; 10 | 11 | if (a < 0x801) { 12 | if (a < 0x401) { 13 | return rsin_tbl[0x400 - a]; 14 | } 15 | return -rsin_tbl[a - 0x400]; 16 | } else { 17 | if (a < 0xC01) { 18 | return -rsin_tbl[0xC00 - a]; 19 | } 20 | return rsin_tbl[a - 0xC00]; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/cres.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libsnd/cres", _SsSndCrescendo); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/next.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void _SsSndNextSep(s16 arg0, s16 arg1) { 4 | struct SeqStruct* temp_a0; 5 | temp_a0 = &_ss_score[arg0][arg1]; 6 | _ss_score[arg0][arg1].unk46 = 1; 7 | temp_a0->unk48 = 0; 8 | _ss_score[arg0][arg1].unk90 &= ~0x100; 9 | _ss_score[arg0][arg1].unk90 &= ~0x8; 10 | _ss_score[arg0][arg1].unk90 &= ~0x2; 11 | _ss_score[arg0][arg1].unk90 &= ~0x4; 12 | _ss_score[arg0][arg1].unk90 &= ~0x200; 13 | temp_a0->unk2b = 1; 14 | temp_a0->read_pos = temp_a0->next_sep_pos; 15 | _ss_score[arg0][arg1].unk90 |= 1; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/pause.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void _SsSndPause(s16 arg0, s16 arg1) { 4 | struct SeqStruct* temp_s2; 5 | temp_s2 = &_ss_score[arg0][arg1]; 6 | SpuVmSeqKeyOff(arg1 << 8 | arg0, arg1 << 8); 7 | temp_s2->unk2b = 0; 8 | _ss_score[arg0][arg1].unk90 &= ~2; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/play.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void _SsSndPlay(s16 arg0, s16 arg1) { _SsSeqPlay(arg0, arg1); } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/replay.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void _SsSndReplay(s16 arg0, s16 arg1) { 4 | _ss_score[arg0][arg1].unk2b = 1; 5 | _ss_score[arg0][arg1].unk90 &= ~8; 6 | } 7 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/scsmvol.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsSetMVol(short voll, short volr) { 4 | SpuCommonAttr attr; 5 | attr.mask = SPU_COMMON_MVOLL | SPU_COMMON_MVOLR; 6 | attr.mvol.left = 129 * voll; 7 | attr.mvol.right = 129 * volr; 8 | SpuSetCommonAttr(&attr); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/seskoff.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libsnd_i.h" 3 | 4 | // some sort of conflict with vmanager.c SpuVmSeKeyOff 5 | void SpuVmSeKeyOff(s32, u8, u16, u8); 6 | 7 | void SsVoKeyOff(s32 vab_pro, s32 pitch) { 8 | SpuVmSeKeyOff((vab_pro << 8) >> 0x10, vab_pro, (pitch >> 8), pitch); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/seskon.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libsnd_i.h" 3 | 4 | s32 SsVoKeyOn(s32 vab_pro, s32 pitch, u16 volL, u16 volR) { 5 | SpuVmSeKeyOn( 6 | vab_pro >> 8, vab_pro & 0xFF, pitch >> 8, pitch & 0xFF, volL, volR); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ssinit_h.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsInitHot(void) { 4 | ResetCallback(); 5 | SpuInit(); 6 | _SsInit(); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ssquit.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsQuit(void) { SpuQuit(); } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ssvol.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void _SsSndSetVol(s32 arg0, s32 arg1, u16 arg2, u16 arg3) { 4 | SpuVmSetSeqVol(arg0 | (arg1 << 8), arg2, arg3, 0); 5 | } 6 | 7 | void SsSeqSetVol(short arg0, short arg1, short arg2) { 8 | SpuVmSetSeqVol(arg0, arg1, arg2, 0); 9 | } 10 | 11 | void SsSepSetVol(s16 sep_access_num, s16 seq_num, s16 voll, s16 volr) { 12 | SpuVmSetSeqVol( 13 | sep_access_num | (seq_num << 8), voll & 0xFFFF, volr & 0xFFFF, 0); 14 | } 15 | 16 | void SsSeqGetVol(s16 access_num, s16 seq_num, s16* voll, s16* volr) { 17 | SpuVmGetSeqVol(access_num | (seq_num << 8), voll, volr); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ut_gpa.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | short SsUtGetProgAtr(short vabId, short programNum, ProgAtr* pProgAttr) { 4 | if (_svm_vab_used[vabId] == 1) { 5 | SpuVmVSetUp(vabId, programNum); 6 | pProgAttr->tones = _svm_pg[programNum].tones; 7 | pProgAttr->mvol = _svm_pg[programNum].mvol; 8 | pProgAttr->prior = _svm_pg[programNum].prior; 9 | pProgAttr->mode = _svm_pg[programNum].mode; 10 | pProgAttr->mpan = _svm_pg[programNum].mpan; 11 | pProgAttr->attr = _svm_pg[programNum].attr; 12 | return 0; 13 | } 14 | return -1; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ut_rdel.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsUtSetReverbDelay(short delay) { 4 | _svm_rattr.mask = SPU_REV_DELAYTIME; 5 | _svm_rattr.delay = delay; 6 | SpuSetReverbModeParam(&_svm_rattr); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ut_rdep.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsUtSetReverbDepth(s16 ldepth, s16 rdepth) { 4 | _svm_rattr.mask = 6; 5 | _svm_rattr.depth.left = (ldepth * 0x7FFF) / 127; 6 | _svm_rattr.depth.right = (rdepth * 0x7FFF) / 127; 7 | SpuSetReverbModeParam(&_svm_rattr); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ut_rfb.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsUtSetReverbFeedback(s16 feedback) { 4 | _svm_rattr.mask = SPU_REV_FEEDBACK; 5 | _svm_rattr.feedback = feedback; 6 | SpuSetReverbModeParam(&_svm_rattr); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ut_roff.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsUtReverbOff(void) { SpuSetReverb(0); } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/ut_ron.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsUtReverbOn(void) { SpuSetReverb(1); } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vm_doff.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SpuVmDamperOff(void) { _svm_damper = 0; } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vm_don.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SpuVmDamperOn(void) { _svm_damper = 2; } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vm_vsu.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | u32 SpuVmVSetUp(s16 arg0, s16 arg1) { 4 | ProgAtr* temp_a0; 5 | u32 var_v0; 6 | 7 | if ((arg0 >= 0x10U) || (_svm_vab_used[arg0] != 1) || 8 | (arg1 >= kMaxPrograms)) { 9 | return -1; 10 | } 11 | 12 | _svm_vh = _svm_vab_vh[arg0]; 13 | temp_a0 = _svm_vab_pg[arg0]; 14 | _svm_tn = _svm_vab_tn[arg0]; 15 | _svm_cur.field_1_vabId = arg0; 16 | _svm_cur.field_6_program = arg1; 17 | _svm_pg = temp_a0; 18 | _svm_cur.field_7_fake_program = _svm_pg[arg1].reserved1; 19 | return 0; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vs_mono.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsSetMono(void) { _svm_stereo_mono = 1; } 4 | 5 | void SsSetStereo(void) { _svm_stereo_mono = 0; } 6 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vs_srv.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | char SsSetReservedVoice(char voices) { 4 | if ((voices >= 0x19) || (voices == 0)) { 5 | return -1; 6 | } 7 | spuVmMaxVoice = voices; 8 | return spuVmMaxVoice; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vs_vab.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | void SsVabClose(s16 vabid) { 4 | if ((vabid >= 0 && vabid < 0x10) && (_svm_vab_used[vabid] == 1)) { 5 | SpuFree(_svm_vab_start[vabid]); 6 | _svm_vab_used[vabid] = 0; 7 | _svm_vab_count -= 1; 8 | } 9 | } 10 | 11 | s16 SsVabOpen(u8* addr, VabHdr* vab_header) { 12 | s16 vab_id; 13 | 14 | vab_id = SsVabOpenHead(addr, -1); 15 | if (vab_id != -1) { 16 | vab_id = SsVabTransBody(_svm_brr_start_addr[vab_id], vab_id); 17 | } 18 | return vab_id; 19 | } 20 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vs_vfb.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | s16 SsVabFakeBody(s16 vabid) { 4 | if ((vabid < 0x11U) && (_svm_vab_used[vabid] == 2)) { 5 | _spu_setInTransfer(0); 6 | _svm_vab_used[vabid] = 1; 7 | return vabid; 8 | } 9 | return -1; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vs_vtb.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | s16 SsVabTransBody(u8* addr, s16 vabid) { 4 | s32 temp_s0; 5 | 6 | if (vabid >= 0 && vabid < 0x11) { 7 | if (_svm_vab_used[vabid] == 2) { 8 | temp_s0 = _svm_vab_start[vabid]; 9 | SpuSetTransferMode(0); 10 | SpuSetTransferStartAddr(temp_s0); 11 | SpuWrite(addr, _svm_vab_total[vabid]); 12 | _svm_vab_used[vabid] = 1; 13 | return vabid; 14 | } 15 | } 16 | _spu_setInTransfer(0); 17 | return -1; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/psxsdk/libsnd/vs_vtc.c: -------------------------------------------------------------------------------- 1 | #include "libsnd_i.h" 2 | 3 | s16 SsVabTransCompleted(s16 immediateFlag) { 4 | return SpuIsTransferCompleted(immediateFlag); 5 | } 6 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_cb.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | void _SpuCallback(s32 arg0) { InterruptCallback(9, arg0); } 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_dcb.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | void _SpuDataCallback(void (*arg0)()) { DMACallback(4, arg0); } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_gva.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_gva", SpuGetVoiceAttr); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_i.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | void SpuInit(void) { _SpuInit(0); } 5 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_it.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | void _spu_setInTransfer(s32 arg0) { 5 | if (arg0 == 1) { 6 | _spu_inTransfer = 0; 7 | return; 8 | } 9 | _spu_inTransfer = 1; 10 | } 11 | 12 | s32 _spu_getInTransfer(void) { return _spu_inTransfer == 0; } 13 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_m_init.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | s32 SpuInitMalloc(s32 num, s8* top) { 5 | SPU_MALLOC* temp = top; 6 | if (num > 0) { 7 | temp->addr = 0x40001010; 8 | _spu_memList = temp; 9 | D_80033560 = 0; 10 | D_8003355C = num; 11 | temp->size = (s32)((0x10000 << _spu_mem_mode_plus) - 0x1010); 12 | return num; 13 | } 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_m_m.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_m_m", SpuMalloc); 4 | 5 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_m_m", func_800286E0); 6 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_m_wsa.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_m_wsa", _SpuMallocSeparateTo3); 4 | 5 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_m_wsa", SpuMallocWithStartAddr); 6 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_q.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | s32 CloseEvent(u32); 5 | s32 DisableEvent(u32); 6 | void _SpuDataCallback(void (*arg0)()); 7 | 8 | void SpuQuit(void) { 9 | if (_spu_isCalled == 1) { 10 | _spu_isCalled = 0; 11 | EnterCriticalSection(); 12 | _spu_transferCallback = NULL; 13 | _spu_IRQCallback = NULL; 14 | _SpuDataCallback(0); 15 | CloseEvent(_spu_EVdma); 16 | DisableEvent(_spu_EVdma); 17 | ExitCriticalSection(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_r.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | u32 SpuRead(u8* arg0, u32 size) { 5 | if (size > 0x7F000U) { 6 | size = 0x7F000; 7 | } 8 | _spu_read(arg0, size); 9 | if (_spu_transferCallback == 0) { 10 | _spu_inTransfer = 0; 11 | } 12 | return size; 13 | } 14 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_sca.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_sca", SpuSetCommonAttr); 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_sic.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "psxsdk/libspu.h" 3 | #include "libspu_internal.h" 4 | 5 | SpuIRQCallbackProc SpuSetIRQCallback(SpuIRQCallbackProc func) { 6 | void (*temp_s0)(); 7 | 8 | temp_s0 = _spu_IRQCallback; 9 | if (func != temp_s0) { 10 | _spu_IRQCallback = func; 11 | _SpuCallback(func); 12 | } 13 | return temp_s0; 14 | } 15 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_snv.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | 3 | void SpuSetNoiseVoice(s32 a, s32 b) { SpuSetAnyVoice(a, b, 0xCA, 0xCB); } 4 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_stm.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | long SpuSetTransferMode(long mode) { 5 | s32 transMode; 6 | 7 | switch (mode) { 8 | case SPU_TRANSFER_BY_DMA: 9 | transMode = 0; 10 | break; 11 | case SPU_TRANSFER_BY_IO: 12 | transMode = 1; 13 | break; 14 | default: 15 | transMode = 0; 16 | } 17 | _spu_trans_mode = mode; 18 | _spu_transMode = transMode; 19 | return transMode; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_stsa.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | s32 SpuSetTransferStartAddr(s32 arg0) { 5 | _spu_tsa = _spu_FsetRXXa(-1, arg0); 6 | return arg0; 7 | } 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_sva.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "psxsdk/libspu.h" 3 | #include "libspu_internal.h" 4 | 5 | void SpuSetVoiceAttr(SpuVoiceAttr* arg) { _SpuSetVoiceAttr(arg, 0, 0x17, 0); } 6 | 7 | INCLUDE_ASM("main/nonmatchings/psxsdk/libspu/s_sva", _SpuSetVoiceAttr); 8 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_w.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | unsigned long SpuWrite(unsigned char* addr, unsigned long size) { 5 | u32 var_s0; 6 | 7 | var_s0 = size; 8 | if (var_s0 > 0x7F000U) { 9 | var_s0 = 0x7F000; 10 | } 11 | _spu_write(addr, var_s0); 12 | if (_spu_transferCallback == 0) { 13 | _spu_inTransfer = 0; 14 | } 15 | return var_s0; 16 | } 17 | -------------------------------------------------------------------------------- /src/main/psxsdk/libspu/s_wp.c: -------------------------------------------------------------------------------- 1 | #include "common.h" 2 | #include "libspu_internal.h" 3 | 4 | u32 SpuWritePartly(u8* addr, u32 size) { 5 | s32 temp_s0; 6 | u32 var_s1; 7 | 8 | var_s1 = size; 9 | if (var_s1 > 0x7F000U) { 10 | var_s1 = 0x7F000; 11 | } 12 | size = var_s1; 13 | temp_s0 = _spu_tsa << _spu_mem_mode_plus; 14 | _spu_write(addr, size); 15 | _spu_tsa = _spu_FsetRXXa(-1, temp_s0 + var_s1); 16 | if (_spu_transferCallback == 0) { 17 | _spu_inTransfer = 0; 18 | } 19 | return var_s1; 20 | } 21 | -------------------------------------------------------------------------------- /src/maria/pl_header.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "maria.h" 3 | 4 | extern unsigned char* maria_sprites[]; 5 | void MarMain(void); 6 | void MarInit(u16 initParam); 7 | void MarUpdatePlayerEntities(void); 8 | void MarGetPlayerSensor(Collider* col); 9 | PlayerOvl MARIA_player = { 10 | MarMain, MarInit, MarUpdatePlayerEntities, MarGetPlayerSensor, 11 | maria_sprites, maria_sprites, maria_sprites, maria_sprites, 12 | }; 13 | -------------------------------------------------------------------------------- /src/pc/psxsdk/PsyCross/src/gte/PsyX_GTE.h: -------------------------------------------------------------------------------- 1 | #ifndef PSYX_GTE_H 2 | #define PSYX_GTE_H 3 | 4 | //---------------------------------------------------------------------------------------------------------------- 5 | 6 | #if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || \ 7 | defined(c_plusplus) 8 | extern "C" { 9 | #endif 10 | 11 | extern unsigned int gte_leadingzerocount(unsigned int lzcs); 12 | 13 | #if defined(_LANGUAGE_C_PLUS_PLUS) || defined(__cplusplus) || \ 14 | defined(c_plusplus) 15 | } 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/pc/psxsdk/cdc.h: -------------------------------------------------------------------------------- 1 | #ifndef CDC_H 2 | #define CDC_H 3 | #include 4 | 5 | struct CD_Audio_Buffer { 6 | int16_t Samples[2][0x1000]; // [0][...] = l, [1][...] = r 7 | uint32_t Size; 8 | uint32_t Freq; 9 | uint32_t ReadPos; 10 | }; 11 | 12 | #ifdef __cplusplus 13 | extern "C" struct CD_Audio_Buffer AudioBuffer; 14 | #else 15 | extern struct CD_Audio_Buffer AudioBuffer; 16 | #endif 17 | 18 | void GetCDAudio(int32_t samples[2]); 19 | void XA_ProcessSector(const uint8_t* sdata, struct CD_Audio_Buffer* ab); 20 | #endif 21 | -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/SpuSetCommonAttr0.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801d80 8001 2 | [SPU] Write: 1f801d82 8002 3 | [SPU] Write: 1f801db0 0001 4 | [SPU] Write: 1f801db2 0002 5 | [SPU] Write: 1f801daa 0000 6 | [SPU] Write: 1f801daa 0000 7 | [SPU] Write: 1f801db4 0002 8 | [SPU] Write: 1f801db6 0003 9 | [SPU] Write: 1f801daa 0000 10 | [SPU] Write: 1f801daa 0000 -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/SpuSetCommonAttr1.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801d80 8001 2 | [SPU] Write: 1f801d82 8002 3 | [SPU] Write: 1f801db0 0001 4 | [SPU] Write: 1f801db2 0002 5 | [SPU] Write: 1f801daa 0004 6 | [SPU] Write: 1f801daa 0005 7 | [SPU] Write: 1f801db4 0002 8 | [SPU] Write: 1f801db6 0003 9 | [SPU] Write: 1f801daa 000d 10 | [SPU] Write: 1f801daa 000f -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/SpuSetKey0.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801d8c ffff 2 | [SPU] Write: 1f801d8e 00ff -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/SpuSetKey1.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801d88 ffff 2 | [SPU] Write: 1f801d8a 00ff -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/SpuSetReverb0.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801daa 0000 -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/SpuSetReverb1.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801daa 0080 -------------------------------------------------------------------------------- /src/pc/psxsdk/expected/spu_vm_do_allocate.txt: -------------------------------------------------------------------------------- 1 | [SPU] Write: 1f801c20 0000 2 | [SPU] Write: 1f801c22 0000 3 | [SPU] Write: 1f801c24 5c28 4 | [SPU] Write: 1f801c26 0000 5 | [SPU] Write: 1f801c28 0000 6 | [SPU] Write: 1f801c2a 0000 7 | [SPU] Write: 1f801d8c 0000 8 | [SPU] Write: 1f801d8e 0000 9 | [SPU] Write: 1f801d88 0004 10 | [SPU] Write: 1f801d8a 0000 11 | [SPU] Write: 1f801d98 0000 12 | [SPU] Write: 1f801d9a 0000 -------------------------------------------------------------------------------- /src/pc/psxsdk/libcard.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | long _card_info(long chan) { 6 | NOT_IMPLEMENTED; 7 | return 0; 8 | } 9 | 10 | long _card_clear(long chan) { 11 | NOT_IMPLEMENTED; 12 | return 0; 13 | } 14 | 15 | long _card_load(long chan) { 16 | NOT_IMPLEMENTED; 17 | return 0; 18 | } 19 | 20 | void InitCARD(long val) { NOT_IMPLEMENTED; } 21 | 22 | long StartCARD(void) { NOT_IMPLEMENTED; } 23 | -------------------------------------------------------------------------------- /src/pc/psxsdk/libetc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void MyPadInit(int mode); 6 | void PadInit(int mode) { MyPadInit(mode); } 7 | 8 | u_long MyPadRead(int id); 9 | u_long PadRead(int id) { return MyPadRead(id); } 10 | 11 | int MyVSyncCallback(void (*f)()); 12 | void VSyncCallback(void (*f)()) { MyVSyncCallback(f); } 13 | 14 | Callback VSyncCallbacks(int ch, Callback f) { NOT_IMPLEMENTED; } 15 | 16 | long SetVideoMode(long mode) { NOT_IMPLEMENTED; } 17 | -------------------------------------------------------------------------------- /src/pc/psxsdk/libgs.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | void GsClearVcount(void) { NOT_IMPLEMENTED; } 6 | 7 | long GsGetVcount() { return 1; } 8 | 9 | void GsInitVcount() { NOT_IMPLEMENTED; } 10 | -------------------------------------------------------------------------------- /src/pc/psxsdk/mednafen/medtypes.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | 5 | using uint16 = uint16_t; 6 | using int16 = int16_t; 7 | using uint32 = uint32_t; 8 | using int32 = int32_t; 9 | using uint8 = uint8_t; 10 | using int8 = int8_t; 11 | using int64 = int64_t; 12 | using uint64 = uint64_t; 13 | 14 | #define MDFN_FASTCALL 15 | #define NO_INLINE 16 | #define INLINE 17 | #define MDFN_HIDE 18 | #define NULL 0 19 | #define MDFN_LIKELY(x) x 20 | #define MDFN_UNLIKELY(x) x 21 | #define MDFN_COLD 22 | 23 | #define sign_x_to_s32(n, v) ((int32)((uint32)(v) << (32 - (n))) >> (32 - (n))) 24 | 25 | #include "git.h" 26 | -------------------------------------------------------------------------------- /src/pc/sdl2_macros.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef MACRO_H 3 | #define MACRO_H 4 | #include "game.h" 5 | void handle_macros(const u8* keyb, u_long* pressed); 6 | #endif 7 | -------------------------------------------------------------------------------- /src/pc/sdl_defs.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef SDL_DEFS_H 3 | #define SDL_DEFS_H 4 | typedef enum { 5 | DEBUG_SDL_NONE, 6 | DEBUG_SDL_SHOW_VRAM_16bpp, 7 | DEBUG_SDL_SHOW_VRAM_8bpp, 8 | DEBUG_SDL_SHOW_VRAM_4bpp, 9 | } DebugSdl; 10 | 11 | enum Renderers { RENDER_SOFT, RENDER_GL }; 12 | 13 | extern enum Renderers render_mode; 14 | #endif 15 | -------------------------------------------------------------------------------- /src/pc/servant_pc.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef SERVANT_PC_H 3 | #define SERVANT_PC_H 4 | 5 | void HandleServantPrg(); 6 | void HandleServantChr(); 7 | #endif 8 | -------------------------------------------------------------------------------- /src/pc/weapon_pc.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef WEAPON_PC_H 3 | #define WEAPON_PC_H 4 | 5 | #include "weapon.h" 6 | void HandleWeapon0Prg(int fileId); 7 | void HandleWeapon0Chr(int fileId); 8 | #endif 9 | -------------------------------------------------------------------------------- /src/ric/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | ButtonComboState g_RicComboButtons[2]; 5 | STATIC_PAD_BSS(104); 6 | DebugInfo g_RicDebug; 7 | s32 D_80175958[32]; 8 | s32 D_801759D8[32]; 9 | -------------------------------------------------------------------------------- /src/ric/ovl_load.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "ric.h" 3 | 4 | void OVL_EXPORT(Load)(void) { 5 | memcpy(&g_PlOvl, &RIC_player, sizeof(PlayerOvl)); 6 | func_8929FA8(g_PlOvlSpritesheet, RIC_SPRITE_COUNT); 7 | } 8 | -------------------------------------------------------------------------------- /src/ric/pl_header.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "ric.h" 3 | 4 | extern u8* richter_sprites[RIC_SPRITE_COUNT]; 5 | void RicMain(void); 6 | void RicInit(u16 params); 7 | void RicUpdatePlayerEntities(void); 8 | void RicGetPlayerSensor(Collider* col); 9 | 10 | PlayerOvl RIC_player = { 11 | RicMain, 12 | RicInit, 13 | RicUpdatePlayerEntities, 14 | RicGetPlayerSensor, 15 | richter_sprites, 16 | richter_sprites, 17 | richter_sprites, 18 | richter_sprites, 19 | }; 20 | 21 | #if !defined(VERSION_PSP) 22 | #include "gen/richter.h" 23 | #endif 24 | -------------------------------------------------------------------------------- /src/ric/pl_subweapon_dummy.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "ric.h" 3 | 4 | void RicEntityNotImplemented1(Entity* self) {} 5 | 6 | void RicEntityNotImplemented2(Entity* self) {} 7 | -------------------------------------------------------------------------------- /src/saturn/lib/def.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef DEF_H 3 | #define DEF_H 4 | 5 | #include "xpt.h" 6 | 7 | #define RGB16_COLOR(r, g, b) (Rgb16)(((b) << 10) + ((g) << 5) + (r) + 0x8000) 8 | 9 | #define RGB32_COLOR(r, g, b) \ 10 | (Rgb32)(((b) << 16) + ((g) << 8) + (r) + 0x80000000) 11 | 12 | typedef Uint16 Rgb16; 13 | typedef Uint32 Rgb32; 14 | 15 | typedef struct XyInt { 16 | Sint16 x; 17 | Sint16 y; 18 | } XyInt; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /src/saturn/lib/sys.c: -------------------------------------------------------------------------------- 1 | #include "sattypes.h" 2 | #include "inc_asm.h" 3 | 4 | // SEGA_SYS.A 5 | const char* sys_version = "SYS Version 2.50 1997-06-10"; 6 | const u32 pad_06030af8 = 0x00000000; 7 | 8 | // _SYS_SetUintMacSave 9 | INCLUDE_ASM("asm/saturn/zero/f_nonmat", f6030AFC, func_06030AFC); 10 | 11 | // _SYS_GetUintMacSave 12 | INCLUDE_ASM("asm/saturn/zero/f_nonmat", f6030B88, func_06030B88); 13 | 14 | INCLUDE_ASM_NO_ALIGN("asm/saturn/zero/data", d6030BF4, d_6030BF4); 15 | -------------------------------------------------------------------------------- /src/saturn/macro.inc: -------------------------------------------------------------------------------- 1 | .macro glabel label 2 | .global \label 3 | _\label: 4 | .endm 5 | -------------------------------------------------------------------------------- /src/save_mgr_pre.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "memcard.h" 3 | 4 | s32 g_MemcardPortMask[] = {-2, -3}; 5 | -------------------------------------------------------------------------------- /src/servant/accumulate_toward_zero.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s32 AccumulateTowardZero(s32 arg0, s32 arg1) { 3 | if (arg0 < 0) { 4 | arg0 += arg1; 5 | if (arg0 > 0) { 6 | arg0 = 0; 7 | } 8 | } else { 9 | arg0 -= arg1; 10 | if (arg0 < 0) { 11 | arg0 = 0; 12 | } 13 | } 14 | 15 | return arg0; 16 | } 17 | -------------------------------------------------------------------------------- /src/servant/calculate_angle_to_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s16 CalculateAngleToEntity(Entity* entity, s16 targetX, s16 targetY) { 3 | s16 angle; 4 | s16 deltaY; 5 | s16 deltaX; 6 | 7 | deltaX = targetX - entity->posX.i.hi; 8 | deltaY = targetY - entity->posY.i.hi; 9 | angle = ratan2(-deltaY, deltaX) & 0xFFF; 10 | return angle; 11 | } 12 | -------------------------------------------------------------------------------- /src/servant/calculate_distance.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s32 CalculateDistance(Entity* entity, s32 targetX, s32 targetY) { 3 | s32 deltaX = targetX - entity->posX.i.hi; 4 | s32 deltaY = targetY - entity->posY.i.hi; 5 | 6 | return SquareRoot12((SQ(deltaX) + SQ(deltaY)) << 12) >> 12; 7 | } 8 | -------------------------------------------------------------------------------- /src/servant/check_entity_valid.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s32 CheckEntityValid(Entity* entity) { 3 | if (entity->hitboxState == 0) 4 | return 0; 5 | if (entity->posX.i.hi < -16) 6 | return 0; 7 | if (entity->posX.i.hi > 272) 8 | return 0; 9 | if (entity->posY.i.hi > 240) 10 | return 0; 11 | if (entity->posY.i.hi < 0) 12 | return 0; 13 | if (entity->hitPoints >= 0x7000) 14 | return 0; 15 | if (entity->hitPoints <= 0) 16 | return 0; 17 | 18 | return 1; 19 | } 20 | -------------------------------------------------------------------------------- /src/servant/destroy_servant_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void DestroyServantEntity(Entity* self) { 3 | switch (self->params) { 4 | case 15: 5 | s_IsServantDestroyed = 1; 6 | break; 7 | } 8 | DestroyEntity(self); 9 | } 10 | -------------------------------------------------------------------------------- /src/servant/search_for_entity_in_range.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | Entity* SearchForEntityInRange(s32 rangeIndex, s32 entityId) { 3 | volatile u32 pad; // fake? 4 | s16 start = g_EntityRanges[rangeIndex].start; 5 | s16 end = g_EntityRanges[rangeIndex].end; 6 | Entity* entity = &g_Entities[start]; 7 | s32 i; 8 | 9 | for (i = start; end >= i; i++, entity++) { 10 | if (entity->entityId == entityId) { 11 | return entity; 12 | } 13 | } 14 | 15 | return NULL; 16 | } 17 | -------------------------------------------------------------------------------- /src/servant/servant_unk0.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s32 ServantUnk0(void) { 3 | if (g_StageId >= STAGE_RNO0 && g_StageId < STAGE_RNZ1_DEMO) { 4 | if (D_8003C708.flags == 0x22) { 5 | return 1; 6 | } 7 | if (D_8003C708.flags == FLAG_UNK_20) { 8 | return 0; 9 | } 10 | return 2; 11 | } else { 12 | if (D_8003C708.flags == 0x22) { 13 | return 0; 14 | } 15 | 16 | if (D_8003C708.flags == FLAG_UNK_20) { 17 | return 1; 18 | } 19 | return 2; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/servant/set_entity_animation.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void SetEntityAnimation(Entity* entity, AnimationFrame* anim) { 3 | if (entity->anim != anim) { 4 | entity->anim = anim; 5 | entity->pose = 0; 6 | entity->poseTimer = 0; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/servant/shared_globals.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s32 g_PlaySfxStep = 99; 3 | EntitySearch g_EntityRanges[] = {{5, 7}, {32, 63}}; 4 | ServantEvent* g_EventQueue = g_Events; 5 | u32 g_CurrentServant = 0; 6 | u32 g_CurrentRoomX = 0; 7 | u32 g_CurrentRoomY = 0; 8 | -------------------------------------------------------------------------------- /src/servant/tt_000/bat.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | #include "servant.h" 4 | 5 | typedef struct { 6 | s32 delayFrames; 7 | s32 maxAngle; 8 | s32 additionalBatCount; 9 | s32 minimumEnemyHp; 10 | s32 makeBadAttacks; 11 | } BatAbilityValues; 12 | -------------------------------------------------------------------------------- /src/servant/tt_000/servant_clutdata.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | 4 | #include "../shared_clutdata.h" 5 | -------------------------------------------------------------------------------- /src/servant/tt_000/servant_events.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_events.h" 5 | #include "../shared_globals.h" 6 | -------------------------------------------------------------------------------- /src/servant/tt_000/servant_spriteparts.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_spriteparts.h" 5 | -------------------------------------------------------------------------------- /src/servant/tt_001/ghost.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | #include "servant.h" 4 | 5 | typedef struct { 6 | s32 delayFrames; 7 | s32 spellId; 8 | s32 makeBadAttacks; 9 | } GhostAbilityValues; 10 | -------------------------------------------------------------------------------- /src/servant/tt_001/servant_clutdata.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | 4 | #include "../shared_clutdata.h" 5 | -------------------------------------------------------------------------------- /src/servant/tt_001/servant_events.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_events.h" 5 | #include "../shared_globals.h" 6 | -------------------------------------------------------------------------------- /src/servant/tt_001/servant_spriteparts.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_spriteparts.h" 5 | -------------------------------------------------------------------------------- /src/servant/tt_002/servant_events.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_events.h" 5 | #include "../shared_globals.h" 6 | -------------------------------------------------------------------------------- /src/servant/tt_003/servant_events.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_events.h" 5 | #include "../shared_globals.h" 6 | -------------------------------------------------------------------------------- /src/servant/tt_004/servant_events.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "servant.h" 3 | 4 | #include "../shared_events.h" 5 | #include "../shared_globals.h" 6 | -------------------------------------------------------------------------------- /src/servant/tt_004/sword_sprite_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "sword.h" 3 | 4 | u16 g_ServantClut[] = { 5 | 0x0000, 0x0841, 0x0C80, 0x2D60, 0x56A0, 0x5FE0, 0x5607, 0x6ED2, 6 | 0x7FFC, 0x00EE, 0x01F4, 0x0F5F, 0x3FFF, 0x000A, 0x0010, 0x0016, 7 | }; 8 | -------------------------------------------------------------------------------- /src/set_speed_x.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | // Sets velocity based on an input speed, and the existing facing value 4 | void SetSpeedX(s32 speed) { 5 | if (g_CurrentEntity->facingLeft == 1) { 6 | speed = -speed; 7 | } 8 | g_CurrentEntity->velocityX = speed; 9 | } 10 | -------------------------------------------------------------------------------- /src/st/alloc_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | Entity* AllocEntity(Entity* start, Entity* end) { 3 | Entity* current = start; 4 | 5 | while (current < end) { 6 | if (!current->entityId) { 7 | DestroyEntity(current); 8 | return current; 9 | } 10 | current++; 11 | } 12 | return NULL; 13 | } 14 | -------------------------------------------------------------------------------- /src/st/blink_item.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void BlinkItem(Entity* self, u16 renderFlags) { 3 | Primitive* prim; 4 | s32 temp; 5 | prim = &g_PrimBuf[self->primIndex]; 6 | 7 | prim->x0 = prim->x2 = self->posX.i.hi - 7; 8 | prim->x1 = prim->x3 = prim->x0 + 14; 9 | 10 | prim->y0 = prim->y1 = self->posY.i.hi - 7; 11 | prim->y2 = prim->y3 = prim->y0 + 14; 12 | 13 | if (renderFlags & RENDERFLAGS_NOSHADOW) { 14 | PCOL(prim) = 255; 15 | } else { 16 | PCOL(prim) = 128; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/st/cen/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../blit_char.h" 3 | -------------------------------------------------------------------------------- /src/st/cen/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | STATIC_PAD_BSS(0xC00); // might not be part of this file (hint: st0 bss) 5 | s32 g_SkipCutscene; 6 | Dialogue g_Dialogue; 7 | u32 __unused0[26]; 8 | u32 g_CutsceneFlags; 9 | s32 g_IsCutsceneDone; 10 | -------------------------------------------------------------------------------- /src/st/cen/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/cen/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "cen.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../create_entity.h" 5 | -------------------------------------------------------------------------------- /src/st/cen/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "cen.h" 3 | 4 | #if !defined(VERSION_HD) 5 | 6 | #include 7 | 8 | u8 OVL_EXPORT(cutscene_data)[] = { 9 | #include "gen/cutscene_data.h" 10 | }; 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/st/cen/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "cen.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/st/cen/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/cen/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "cen.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/cen/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/cen/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "cen.h" 3 | 4 | #if !defined(VERSION_HD) 5 | 6 | #include "../e_stage_name.h" 7 | 8 | #else 9 | 10 | #include "../entity_stage_name_popup_jp.h" 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /src/st/cen/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/cen/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/st/cen/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "cen.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/cen/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/chi/dt_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: dt_prize_drops.c 4 | * Overlay: CHI 5 | * Description: DATA - Prize drops 6 | */ 7 | 8 | #include "chi.h" 9 | 10 | // D_801809E4 11 | u16 OVL_EXPORT( 12 | PrizeDrops)[] = {0x00C8, 0x0098, 0x00F2, 0x00C5, 0x0170, 0x0094, 0x00A5, 13 | 0x00A5, 0x00B9, 0x00A3, 0x00A3, 0x00A3, 0x00A3, 0x0000}; 14 | -------------------------------------------------------------------------------- /src/st/chi/en_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: en_particles.c 4 | * Overlay: CHI 5 | * Description: ENTITY - Particles 6 | */ 7 | 8 | #include "chi.h" 9 | 10 | // D_8018142C: g_ESoulStealOrbAngles 11 | // D_8018143C: g_ESoulStealOrbSprt 12 | // D_8018149C: g_ESoulStealOrbAnim 13 | // func_801A7448: [E_SOUL_STEAL_ORB] EntitySoulStealOrb 14 | // func_801A77DC: [E_ENEMY_BLOOD] EntityEnemyBlood 15 | #include "../e_particles.h" 16 | -------------------------------------------------------------------------------- /src/st/chi/en_popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: en_popup.c 4 | * Overlay: CHI 5 | * Description: ENTITY - Message that appears in the bottom corner of the screen 6 | */ 7 | 8 | // func_801A7D78: BottomCornerText 9 | #include "../popup.h" 10 | -------------------------------------------------------------------------------- /src/st/chi/en_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: en_red_door.c 4 | * Overlay: CHI 5 | * Description: ENTITY - Red door that connects stages 6 | */ 7 | 8 | #include "chi.h" 9 | 10 | // D_80180E0C: g_eRedDoorUV 11 | // func_801A05DC: EntityIsNearPlayer 12 | // func_801A0654: [E_RED_DOOR] EntityRedDoor 13 | #include "../e_red_door.h" 14 | -------------------------------------------------------------------------------- /src/st/chi/en_room_foreground.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: en_room_foreground.c 4 | * Overlay: CHI 5 | * Description: ENTITY - Room foreground 6 | */ 7 | 8 | // D_801814AC: foregroundAnim1 9 | // D_801814B0: foregroundAnim2 10 | // D_801814B4: foregroundAnim3 11 | // D_801814B8: foregroundAnim4 12 | // D_801814BC: foregroundAnim5 13 | // D_801814C0: eRoomForegroundInit 14 | // func_801A7C8C: [E_ROOM_FOREGROUND] EntityRoomForeground 15 | #include "../e_room_fg.h" 16 | -------------------------------------------------------------------------------- /src/st/chi/en_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: en_stage_name.c 4 | * Overlay: CHI 5 | * Description: ENTITY - Stage name popup 6 | */ 7 | 8 | #include "chi.h" 9 | 10 | // func_801AD0EC: StageNamePopupHelper 11 | // func_801AD2BC: [E_STAGE_NAME_POPUP] EntityStageNamePopup 12 | #include "../e_stage_name.h" 13 | -------------------------------------------------------------------------------- /src/st/chi/en_thornweed_corpseweed.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: en_thornweed_corpseweed.c 4 | * Overlay: CHI 5 | * Description: ENTITY - Thornweed & Corpseweed 6 | */ 7 | 8 | #include "chi.h" 9 | 10 | #define CORPSEWEED_TPAGE 0x13 11 | #define CORPSEWEED_PAL 0x206 12 | #define CORPSEWEED_PROJ_PAL 0x209 13 | #include "../en_thornweed_corpseweed.h" 14 | -------------------------------------------------------------------------------- /src/st/chi/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | #include "../st_update.h" 4 | -------------------------------------------------------------------------------- /src/st/chi/ut_blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: ut_blit_char.c 4 | * Overlay: CHI 5 | * Description: UTILITIY - Blit text character 6 | */ 7 | #include "chi.h" 8 | 9 | #ifdef VERSION_PSP 10 | #include "../blit_char_psp.h" 11 | #else 12 | // func_801A3CA8: BlitChar 13 | #include "../blit_char.h" 14 | #endif 15 | -------------------------------------------------------------------------------- /src/st/chi/ut_prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * File: ut_prim_helpers.c 4 | * Overlay: CHI 5 | * Description: UTILITY - Primitive helper functions 6 | */ 7 | 8 | // func_801ADF40: UnkPrimHelper 9 | // func_801AE328: UpdateAnimation 10 | // func_801AE478: FindFirstUnkPrim 11 | // func_801AE4A8: FindFirstUnkPrim2 12 | // func_801AE524: PrimToggleVisibility 13 | // func_801AE5AC: PrimResetNext 14 | // func_801AE68C: UnkPolyFunc2 15 | // func_801AE6E0: UnkPolyFunc0 16 | // func_801AE70C: PrimDecreaseBrightness 17 | #include "../prim_helpers.h" 18 | -------------------------------------------------------------------------------- /src/st/chi_psp/en_breakable_wall.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../chi/chi.h" 3 | 4 | // clang-format off 5 | INCLUDE_ASM("st/chi_psp/nonmatchings/chi_psp/en_breakable_wall", EntityBreakableWallDebris); 6 | 7 | INCLUDE_ASM("st/chi_psp/nonmatchings/chi_psp/en_breakable_wall", EntityBreakableWall); 8 | // clang-format on 9 | -------------------------------------------------------------------------------- /src/st/collect_dummy.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | static void CollectDummy(u16 id) { DestroyEntity(g_CurrentEntity); } 3 | -------------------------------------------------------------------------------- /src/st/collect_heart.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "sfx.h" 3 | 4 | // This function is messy, maybe there's a better way. 5 | void CollectHeart(u16 arg0) { 6 | #if defined VERSION_BETA || STAGE == STAGE_ST0 7 | s8 heartPrizes[2] = {0x01, 0x05}; 8 | s8 mad_unknown[2] = {0x01, 0x02}; 9 | #else 10 | #define heartPrizes c_HeartPrizes 11 | #endif 12 | 13 | g_api.PlaySfx(SFX_HEART_PICKUP); 14 | g_Status.hearts += heartPrizes[arg0]; 15 | 16 | if (g_Status.hearts > g_Status.heartsMax) { 17 | g_Status.hearts = g_Status.heartsMax; 18 | } 19 | 20 | DestroyEntity(g_CurrentEntity); 21 | } 22 | -------------------------------------------------------------------------------- /src/st/collect_life_vessel.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | static void CollectLifeVessel(void) { 3 | g_api.PlaySfx(SFX_HEART_PICKUP); 4 | g_api.func_800FE044(5, 0x8000); 5 | DestroyEntity(g_CurrentEntity); 6 | } 7 | -------------------------------------------------------------------------------- /src/st/cutscene_unk1.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef CUTSCENE_UNK1_NEXT_X 3 | #define CUTSCENE_UNK1_NEXT_X 2 4 | #endif 5 | 6 | #ifndef CUTSCENE_UNK1_UNK17 7 | #define CUTSCENE_UNK1_UNK17 8 8 | #endif 9 | 10 | static void CutsceneUnk1(void) { 11 | g_Dialogue.nextLineY = g_Dialogue.startY + 0x14; 12 | g_Dialogue.nextCharX = g_Dialogue.nextLineX = CUTSCENE_UNK1_NEXT_X; 13 | g_Dialogue.nextCharY = 0; 14 | g_Dialogue.unk12 = 0; 15 | g_Dialogue.nextCharTimer = 0; 16 | g_Dialogue.unk17 = CUTSCENE_UNK1_UNK17; 17 | } 18 | -------------------------------------------------------------------------------- /src/st/cutscene_unk3.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #ifndef CUTSCENE_UNK3_RECT_X 3 | #define CUTSCENE_UNK3_RECT_X 0 4 | #endif 5 | 6 | #if defined(VERSION_PSP) 7 | extern s32 cutsceneUnk3Unknown[0x380]; // bss 8 | #endif 9 | 10 | static void CutsceneUnk3(s16 nextCharY) { 11 | RECT rect; 12 | rect.x = CUTSCENE_UNK3_RECT_X; 13 | rect.y = (nextCharY * 12) + 384; 14 | rect.w = 64; 15 | rect.h = 12; 16 | ClearImage(&rect, 0, 0, 0); 17 | #if defined(VERSION_PSP) 18 | func_890A3C0(cutsceneUnk3Unknown, 0, LEN(cutsceneUnk3Unknown)); 19 | #endif 20 | } 21 | -------------------------------------------------------------------------------- /src/st/dre/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../blit_char.h" 3 | -------------------------------------------------------------------------------- /src/st/dre/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | STATIC_PAD_BSS(3072); 5 | u32 g_SkipCutscene; 6 | Dialogue g_Dialogue; 7 | u32 D_801A3F1C[26]; 8 | u32 g_CutsceneFlags; 9 | s32 g_IsCutsceneDone; 10 | -------------------------------------------------------------------------------- /src/st/dre/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/dre/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | u32 D_801A3264[24]; 6 | 7 | #include "../create_entity.h" 8 | -------------------------------------------------------------------------------- /src/st/dre/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | #include 4 | 5 | u8 OVL_EXPORT(cutscene_data)[] = { 6 | #include "gen/cutscene_data.h" 7 | }; 8 | -------------------------------------------------------------------------------- /src/st/dre/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/st/dre/e_breakable.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | #include "sfx.h" 4 | 5 | extern u8* g_eBreakableAnimations[]; 6 | extern u8 g_eBreakableHitboxes[]; 7 | extern u8 g_eBreakableExplosionTypes[]; 8 | extern u16 g_eBreakableanimSets[]; 9 | extern u8 g_eBreakableDrawModes[]; 10 | 11 | #include "../e_breakable.h" 12 | -------------------------------------------------------------------------------- /src/st/dre/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/dre/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 0x118 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/dre/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/dre/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/dre/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/dre/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | 4 | #include "../e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/st/dre/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/dre/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | #include "../prim_helpers.h" 4 | -------------------------------------------------------------------------------- /src/st/dre/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "dre.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/dre/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/entity_dummy.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void EntityDummy(Entity* arg0) { 3 | if (!arg0->step) { 4 | arg0->step++; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/st/fall_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void FallEntity(void) { 3 | if (g_CurrentEntity->velocityY < FALL_TERMINAL_VELOCITY) { 4 | g_CurrentEntity->velocityY += FALL_GRAVITY; 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/st/get_angle_between_entities.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | u16 GetAngleBetweenEntities(Entity* a, Entity* b) { 3 | s32 diffX = b->posX.i.hi - a->posX.i.hi; 4 | s32 diffY = b->posY.i.hi - a->posY.i.hi; 5 | return ratan2(diffY, diffX); 6 | } 7 | -------------------------------------------------------------------------------- /src/st/get_angle_between_entities_shifted.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | u8 GetAngleBetweenEntitiesShifted(Entity* a, Entity* b) { 3 | s16 diffX = b->posX.i.hi - a->posX.i.hi; 4 | s16 diffY = b->posY.i.hi - a->posY.i.hi; 5 | return Ratan2Shifted(diffX, diffY); 6 | } 7 | -------------------------------------------------------------------------------- /src/st/get_angle_point_to_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | u16 GetAnglePointToEntity(s32 x, s32 y) { 3 | s16 diffX = x - (u16)g_CurrentEntity->posX.i.hi; 4 | s16 diffY = y - (u16)g_CurrentEntity->posY.i.hi; 5 | return ratan2(diffY, diffX); 6 | } 7 | -------------------------------------------------------------------------------- /src/st/get_angle_point_to_entity_shifted.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | u8 GetAnglePointToEntityShifted(s32 x, s32 y) { 3 | s32 diffX = x - (u16)g_CurrentEntity->posX.i.hi; 4 | s32 diffY = y - (u16)g_CurrentEntity->posY.i.hi; 5 | return Ratan2Shifted(diffX, diffY); 6 | } 7 | -------------------------------------------------------------------------------- /src/st/get_distance_to_player_x.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // Absolute distance from g_CurrentEntity to the player in the X Axis 3 | s16 GetDistanceToPlayerX(void) { 4 | Entity* player = &PLAYER; 5 | s16 xDistance = g_CurrentEntity->posX.i.hi - player->posX.i.hi; 6 | 7 | if (xDistance < 0) { 8 | xDistance = -xDistance; 9 | } 10 | return xDistance; 11 | } 12 | -------------------------------------------------------------------------------- /src/st/get_distance_to_player_y.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | // Absolute distance from g_CurrentEntity to the player in the Y Axis 3 | s32 GetDistanceToPlayerY(void) { 4 | Entity* player = &PLAYER; 5 | s32 yDistance = g_CurrentEntity->posY.i.hi - player->posY.i.hi; 6 | 7 | if (yDistance < 0) { 8 | yDistance = -yDistance; 9 | } 10 | return yDistance; 11 | } 12 | -------------------------------------------------------------------------------- /src/st/get_lang_at.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | extern s32 g_UserLanguage; 5 | 6 | u8* GetLangAt(s32 idx, u8* en, u8* fr, u8* sp, u8* ge, u8* it) { 7 | switch (g_UserLanguage) { 8 | default: 9 | case LANG_EN: 10 | return en + idx; 11 | case LANG_FR: 12 | return fr + idx; 13 | case LANG_SP: 14 | return sp + idx; 15 | case LANG_GE: 16 | return ge + idx; 17 | case LANG_IT: 18 | return it + idx; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/st/get_side_to_player.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /** 3 | * Returns the player's side position relative to g_CurrentEntity 4 | * 0 = Player is on the right side 5 | * 1 = Player is on the left side 6 | * 2 = Player is above 7 | */ 8 | u8 GetSideToPlayer() { 9 | u8 side = 0; 10 | Entity* player = &PLAYER; 11 | 12 | if (g_CurrentEntity->posX.i.hi > player->posX.i.hi) { 13 | side |= 1; 14 | } 15 | 16 | if (g_CurrentEntity->posY.i.hi > player->posY.i.hi) { 17 | side |= 2; 18 | } 19 | return side; 20 | } 21 | -------------------------------------------------------------------------------- /src/st/get_sine.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s16 GetSine(u8 arg0) { return g_SineTable[arg0]; } 3 | -------------------------------------------------------------------------------- /src/st/get_sine_scaled.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | s32 GetSineScaled(u8 arg0, s16 arg1) { 3 | s32 sine = g_SineTable[arg0]; 4 | return sine * arg1; 5 | } 6 | -------------------------------------------------------------------------------- /src/st/lib/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #ifdef VERSION_PSP 5 | #include "../blit_char_psp.h" 6 | #else 7 | #include "../blit_char.h" 8 | #endif 9 | -------------------------------------------------------------------------------- /src/st/lib/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/lib/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../pfn_entity_update.h" 5 | #include "../create_entity.h" 6 | -------------------------------------------------------------------------------- /src/st/lib/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | #include 4 | 5 | u8 OVL_EXPORT(cutscene_data)[] = { 6 | #include "gen/cutscene_data.h" 7 | }; 8 | -------------------------------------------------------------------------------- /src/st/lib/e_bloody_zombie.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../e_bloody_zombie.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/e_chair.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #define CHAIR_DEBUG 5 | #include "../e_chair.h" 6 | -------------------------------------------------------------------------------- /src/st/lib/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/lib/e_flea_man.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../e_flea_man.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/e_life_up.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../e_life_up.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/e_misc_2.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../entity_relic_orb.h" 5 | 6 | #define HEART_DROP_CASTLE_FLAG 0x70 7 | #include "../entity_heart_drop.h" 8 | 9 | #include "../entity_message_box.h" 10 | -------------------------------------------------------------------------------- /src/st/lib/e_mist_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../e_mist_door.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/lib/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/lib/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/lib/e_skeleton.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../e_skeleton.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/en_thornweed_corpseweed.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #define CORPSEWEED_TPAGE 0x14 5 | #define CORPSEWEED_PAL 0x252 6 | #define CORPSEWEED_PROJ_PAL 0x255 7 | #include "../en_thornweed_corpseweed.h" 8 | -------------------------------------------------------------------------------- /src/st/lib/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/lib/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/st/lib/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "lib.h" 3 | 4 | #include "../st_common.h" 5 | -------------------------------------------------------------------------------- /src/st/lib/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/lib_psp/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../lib/lib.h" 3 | #include 4 | 5 | u8 cutscene_data_it[] = { 6 | #include "gen/cutscene_data_it.h" 7 | }; 8 | 9 | u8 cutscene_data_sp[] = { 10 | #include "gen/cutscene_data_sp.h" 11 | }; 12 | 13 | u8 cutscene_data_fr[] = { 14 | #include "gen/cutscene_data_fr.h" 15 | }; 16 | 17 | u8 cutscene_data_ge[] = { 18 | #include "gen/cutscene_data_ge.h" 19 | }; 20 | 21 | u8 cutscene_data_en[] = { 22 | #include "gen/cutscene_data_en.h" 23 | }; 24 | -------------------------------------------------------------------------------- /src/st/lib_psp/e_misc_2.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../lib/lib.h" 3 | 4 | #define HEART_DROP_CASTLE_FLAG 0x70 5 | #include "../entity_heart_drop.h" 6 | 7 | #include "../entity_message_box.h" 8 | -------------------------------------------------------------------------------- /src/st/lib_psp/unk_1D9E8.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../lib/lib.h" 3 | 4 | INCLUDE_ASM("st/lib_psp/psp/lib_psp/unk_1D9E8", func_us_801AE8E8); 5 | -------------------------------------------------------------------------------- /src/st/mad/17B94.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | 4 | INCLUDE_ASM("asm/us/st/mad/nonmatchings/17B94", func_80197B94); 5 | -------------------------------------------------------------------------------- /src/st/mad/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | u16 msgBoxTpage[768]; 5 | u32 D_80199DE8[27]; 6 | -------------------------------------------------------------------------------- /src/st/mad/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../create_entity.h" 5 | -------------------------------------------------------------------------------- /src/st/mad/e_breakable.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "sfx.h" 4 | 5 | #include "../e_breakable.h" 6 | -------------------------------------------------------------------------------- /src/st/mad/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "../e_collect.h" 4 | -------------------------------------------------------------------------------- /src/st/mad/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 0 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/mad/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/mad/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/mad/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "../prim_helpers.h" 4 | -------------------------------------------------------------------------------- /src/st/mad/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/mad/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "mad.h" 3 | 4 | #include "../st_update.h" 5 | -------------------------------------------------------------------------------- /src/st/move_entity.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void MoveEntity(void) { 3 | g_CurrentEntity->posX.val += g_CurrentEntity->velocityX; 4 | g_CurrentEntity->posY.val += g_CurrentEntity->velocityY; 5 | } 6 | -------------------------------------------------------------------------------- /src/st/no0/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../blit_char.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../create_entity.h" 5 | -------------------------------------------------------------------------------- /src/st/no0/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | 4 | u16 OVL_EXPORT( 5 | PrizeDrops)[] = {0x017, 0x127, 0x00C, 0x112, 0x113, 0x11F, 0x182, 6 | 0x128, 0x017, 0x00C, 0x126, 0x117, 0x113, 0x114}; 7 | -------------------------------------------------------------------------------- /src/st/no0/e_axe_knight.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | 4 | #include "../entity_axe_knight.h" 5 | -------------------------------------------------------------------------------- /src/st/no0/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/e_flea_man.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | 4 | #include "../e_flea_man.h" 5 | -------------------------------------------------------------------------------- /src/st/no0/e_magically_sealed_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | 4 | #define MAGICALLY_SEALED_DOOR_PALETTE 0x245 5 | 6 | #include "../e_magically_sealed_door.h" 7 | -------------------------------------------------------------------------------- /src/st/no0/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | 4 | #define HEART_DROP_CASTLE_FLAG 0 5 | #include "../e_misc.h" 6 | -------------------------------------------------------------------------------- /src/st/no0/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | #include "../e_particles.h" 4 | -------------------------------------------------------------------------------- /src/st/no0/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/no0/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/e_skeleton.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | 4 | #include "../e_skeleton.h" 5 | -------------------------------------------------------------------------------- /src/st/no0/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_stage_name.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/st/no0/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no0.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/no0/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../blit_char.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../pfn_entity_update.h" 5 | #include "../create_entity.h" 6 | -------------------------------------------------------------------------------- /src/st/no1/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[] = { 5 | 0x00E1, 0x0136, 0x000C, 0x016C, 0x00D6, 0x0017, 0x0168, 0x0000}; 6 | -------------------------------------------------------------------------------- /src/st/no1/e_bone_archer.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_bone_archer.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_chair.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_chair.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #define HEART_DROP_CASTLE_FLAG 0x10 5 | #include "../e_misc.h" 6 | -------------------------------------------------------------------------------- /src/st/no1/e_mist_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_mist_door.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_red_door.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/e_skeleton.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_skeleton.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_skeleton_ape.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_skeleton_ape.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_spear_guard.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../e_spear_guard.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | #include "../e_stage_name.h" 4 | -------------------------------------------------------------------------------- /src/st/no1/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/st/no1/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../st_common.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/st_debug.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | 4 | #include "../entity_lock_camera.h" 5 | -------------------------------------------------------------------------------- /src/st/no1/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no1.h" 3 | #include "../st_update.h" 4 | -------------------------------------------------------------------------------- /src/st/no1/unused.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | void NO1Unused_801B7D24(void) {} 4 | 5 | void NO1Unused_801B7D2C(void) {} 6 | -------------------------------------------------------------------------------- /src/st/no3/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #ifdef VERSION_PSP 5 | #include "../blit_char_psp.h" 6 | #else 7 | #include "../blit_char.h" 8 | #endif 9 | -------------------------------------------------------------------------------- /src/st/no3/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/no3/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | STATIC_PAD_BSS(96); 6 | 7 | #include "../create_entity.h" 8 | -------------------------------------------------------------------------------- /src/st/no3/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include 4 | 5 | u8 OVL_EXPORT(cutscene_data)[] = { 6 | #include "gen/cutscene_data.h" 7 | }; 8 | -------------------------------------------------------------------------------- /src/st/no3/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[] = {0x000C, 0x0017, 0x0112, 0x000C, 0x0118, 5 | 0x013B, 0x0017, 0x000C, 0x0017, 0x00ED}; 6 | -------------------------------------------------------------------------------- /src/st/no3/e_background_bushes_trees.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_background_bushes_trees.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_background_lightning.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_background_lightning.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_bat.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_bat.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_bone_scimitar.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../e_bone_scimitar.h" 4 | -------------------------------------------------------------------------------- /src/st/no3/e_castle_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_castle_door.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_cavern_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_cavern_door.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/no3/e_heartroom.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../e_heartroom.h" 4 | -------------------------------------------------------------------------------- /src/st/no3/e_jewel_sword_puzzle.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_jewel_sword_puzzle.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_lock_camera.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../entity_lock_camera.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_merman.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_merman.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_merman2.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../e_merman2.h" 4 | -------------------------------------------------------------------------------- /src/st/no3/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 0x30 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/no3/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/no3/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/no3/e_shutting_window.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_shutting_window.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_sky_entities.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_sky_entities.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_stairway.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_stairway.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_tilemap_shuffler.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_tilemap_shuffler.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_transparent_water.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_transparent_water.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_trapdoor.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../e_trapdoor.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/e_unkId16.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../entity_unkId16.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/entrance_weights.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../entrance_weights.h" 5 | -------------------------------------------------------------------------------- /src/st/no3/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/no3/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | #include "../prim_helpers.h" 4 | -------------------------------------------------------------------------------- /src/st/no3/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/no3/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/no3/water_effects.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no3.h" 3 | 4 | #include "../water_effects.h" 5 | -------------------------------------------------------------------------------- /src/st/no3_psp/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../no3/no3.h" 3 | #include 4 | 5 | u8 cutscene_data_it[] = { 6 | #include "gen/cutscene_data_it.h" 7 | }; 8 | 9 | u8 cutscene_data_sp[] = { 10 | #include "gen/cutscene_data_sp.h" 11 | }; 12 | 13 | u8 cutscene_data_fr[] = { 14 | #include "gen/cutscene_data_fr.h" 15 | }; 16 | 17 | u8 cutscene_data_ge[] = { 18 | #include "gen/cutscene_data_ge.h" 19 | }; 20 | 21 | u8 cutscene_data_en[] = { 22 | #include "gen/cutscene_data_en.h" 23 | }; 24 | -------------------------------------------------------------------------------- /src/st/no3_psp/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | #include "../no3/no3.h" 4 | 5 | #include "../entity_stage_name_popup_jp.h" 6 | -------------------------------------------------------------------------------- /src/st/no3_psp/water_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | #include "../no3/no3.h" 4 | 5 | // g_WaterXTbl 6 | s16 g_WaterXTbl[] = {0, 768, 0, 440, 512, 7, 7, 0, 0, 150, 0, 184, 7 | 256, 7, 7, 0, 48, 68, 0, 468, 512, 7, 7, 0}; 8 | -------------------------------------------------------------------------------- /src/st/no4/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #ifdef VERSION_PSP 5 | #include "../blit_char_psp.h" 6 | #else 7 | #include "../blit_char.h" 8 | #endif 9 | -------------------------------------------------------------------------------- /src/st/no4/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../pfn_entity_update.h" 5 | #include "../create_entity.h" 6 | -------------------------------------------------------------------------------- /src/st/no4/e_bone_archer.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../e_bone_archer.h" 5 | -------------------------------------------------------------------------------- /src/st/no4/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/e_misc_2.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../entity_relic_orb.h" 5 | 6 | #define HEART_DROP_CASTLE_FLAG 0x40 7 | #include "../entity_heart_drop.h" 8 | 9 | #include "../entity_message_box.h" 10 | -------------------------------------------------------------------------------- /src/st/no4/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/no4/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/e_skeleton_ape.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../e_skeleton_ape.h" 5 | -------------------------------------------------------------------------------- /src/st/no4/e_spear_guard.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../e_spear_guard.h" 5 | -------------------------------------------------------------------------------- /src/st/no4/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/st/no4/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../prim_helpers.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../st_common.h" 5 | -------------------------------------------------------------------------------- /src/st/no4/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/no4/water_effects.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "no4.h" 3 | 4 | #include "../water_effects.h" 5 | -------------------------------------------------------------------------------- /src/st/no4_psp/e_misc_2.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../no4/no4.h" 3 | 4 | #define HEART_DROP_CASTLE_FLAG 0x40 5 | #include "../entity_heart_drop.h" 6 | 7 | #include "../entity_message_box.h" 8 | -------------------------------------------------------------------------------- /src/st/no4_psp/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | 4 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/e_stage_name", func_psp_0923C0C0); 5 | 6 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/e_stage_name", EntityStageNamePopup); 7 | -------------------------------------------------------------------------------- /src/st/no4_psp/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | 4 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/popup", BottomCornerText); 5 | -------------------------------------------------------------------------------- /src/st/no4_psp/unk_26740.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "common.h" 3 | 4 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", GetLang); 5 | 6 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", DrawCutsceneActorName); 7 | 8 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", CutsceneUnk3); 9 | 10 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", CutsceneUnk4); 11 | 12 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", func_pspeu_0925E2C8); 13 | 14 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", SetCutsceneScript); 15 | 16 | INCLUDE_ASM("st/no4_psp/psp/no4_psp/unk_26740", func_pspeu_0925E548); 17 | -------------------------------------------------------------------------------- /src/st/np3/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../blit_char.h" 3 | -------------------------------------------------------------------------------- /src/st/np3/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | STATIC_PAD_BSS(0xC00); 5 | -------------------------------------------------------------------------------- /src/st/np3/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/np3/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../create_entity.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[] = { 5 | 0x000C, 0x0017, 0x0112, 0x000C, 0x0118, 0x013B, 0x0017, 0x000C, 0x0017, 6 | 0x00ED, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001, 0x0000, 0x0001, 0x0000, 7 | 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0001, 0x0101}; 8 | -------------------------------------------------------------------------------- /src/st/np3/e_background_bushes_trees.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_background_bushes_trees.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_background_lightning.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_background_lightning.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_bat.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_bat.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_bloody_zombie.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * Overlay: NP3 4 | * Enemy: Bloody Zombie 5 | */ 6 | 7 | #include "np3.h" 8 | #include "sfx.h" 9 | 10 | #include "../e_bloody_zombie.h" 11 | -------------------------------------------------------------------------------- /src/st/np3/e_bone_scimitar.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | #include "../e_bone_scimitar.h" 4 | -------------------------------------------------------------------------------- /src/st/np3/e_castle_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_castle_door.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_cavern_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_cavern_door.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/np3/e_heartroom.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | #include "../e_heartroom.h" 4 | -------------------------------------------------------------------------------- /src/st/np3/e_jewel_sword_puzzle.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_jewel_sword_puzzle.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_merman.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_merman.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_merman2.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | /* 3 | * Overlay: NP3 4 | * Description: Merman Room 5 | */ 6 | 7 | #include "np3.h" 8 | #include "../e_merman2.h" 9 | -------------------------------------------------------------------------------- /src/st/np3/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 0x30 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/np3/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../entity_soul_steal_orb.h" 5 | 6 | #include "../entity_enemy_blood.h" 7 | -------------------------------------------------------------------------------- /src/st/np3/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/np3/e_shutting_window.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_shutting_window.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_sky_entities.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_sky_entities.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_stairway.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_stairway.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_tilemap_shuffler.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_tilemap_shuffler.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_transparent_water.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_transparent_water.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_trapdoor.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../e_trapdoor.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/e_unkId16.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../entity_unkId16.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/entrance_weights.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../entrance_weights.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../popup.h" 5 | -------------------------------------------------------------------------------- /src/st/np3/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | #include "../prim_helpers.h" 4 | -------------------------------------------------------------------------------- /src/st/np3/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/np3/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/np3/water_effects.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "np3.h" 3 | 4 | #include "../water_effects.h" 5 | -------------------------------------------------------------------------------- /src/st/nz0/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../blit_char.h" 3 | -------------------------------------------------------------------------------- /src/st/nz0/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | STATIC_PAD_BSS(0xC00); 5 | u32 g_SkipCutscene; 6 | Dialogue g_Dialogue; 7 | u32 D_801CB6CC[26]; 8 | u16 g_CutsceneFlags; 9 | u16 D_801CB736[3]; 10 | s32 g_IsCutsceneDone; 11 | -------------------------------------------------------------------------------- /src/st/nz0/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/nz0/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | u32 D_801CAA14[24]; 6 | 7 | #include "../create_entity.h" 8 | -------------------------------------------------------------------------------- /src/st/nz0/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include 4 | 5 | u8 OVL_EXPORT(cutscene_data)[] = { 6 | #include "gen/cutscene_data.h" 7 | }; 8 | -------------------------------------------------------------------------------- /src/st/nz0/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[] = {0x012B, 0x000C, 0x015A, 0x0017, 0x00E5, 0x0146, 5 | 0x0144, 0x011A, 0x0085, 0x0092, 0x011F, 0x0000}; 6 | -------------------------------------------------------------------------------- /src/st/nz0/e_axe_knight.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | 4 | #include "../entity_axe_knight.h" 5 | -------------------------------------------------------------------------------- /src/st/nz0/e_bloody_zombie.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "sfx.h" 4 | 5 | #include "../e_bloody_zombie.h" 6 | -------------------------------------------------------------------------------- /src/st/nz0/e_bone_scimitar.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "../e_bone_scimitar.h" 4 | -------------------------------------------------------------------------------- /src/st/nz0/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/nz0/e_life_up.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "../../st/e_life_up.h" 4 | -------------------------------------------------------------------------------- /src/st/nz0/e_magically_sealed_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | 4 | #include "../e_magically_sealed_door.h" 5 | -------------------------------------------------------------------------------- /src/st/nz0/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 0xF8 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/nz0/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/nz0/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/nz0/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/nz0/e_skeleton.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | 4 | #include "../e_skeleton.h" 5 | -------------------------------------------------------------------------------- /src/st/nz0/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | 4 | #include "../e_stage_name.h" 5 | -------------------------------------------------------------------------------- /src/st/nz0/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/nz0/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | #include "../prim_helpers.h" 4 | -------------------------------------------------------------------------------- /src/st/nz0/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "nz0.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/nz0/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/player_is_within_hitbox.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | bool PlayerIsWithinHitbox(Entity* self) { 3 | s16 posXAbs; 4 | s16 posXDiff; 5 | s16 posYAbs; 6 | s16 posYDiff; 7 | 8 | posXDiff = PLAYER.posX.i.hi - self->posX.i.hi; 9 | posXAbs = abs(posXDiff); 10 | if (posXAbs > self->hitboxWidth) { 11 | return false; 12 | } 13 | 14 | posYDiff = PLAYER.posY.i.hi - self->posY.i.hi; 15 | posYAbs = abs(posYDiff); 16 | if (posYAbs > self->hitboxHeight) { 17 | return false; 18 | } 19 | return true; 20 | } 21 | -------------------------------------------------------------------------------- /src/st/prevent_entity_from_respawning.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void PreventEntityFromRespawning(Entity* entity) { 3 | if (entity->entityRoomIndex) { 4 | u16 index = entity->entityRoomIndex - 1 >> 5; 5 | g_unkGraphicsStruct.D_80097428[index] |= 6 | 1 << ((entity->entityRoomIndex - 1) & 0x1F); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/st/ratan2.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | u16 Ratan2(s16 x, s16 y) { return ratan2(y, x); } 3 | -------------------------------------------------------------------------------- /src/st/ratan2_shifted.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | u8 Ratan2Shifted(s16 x, s16 y) { 3 | u8 angle = ratan2(y, x) >> 4; 4 | return angle + 0x40; 5 | } 6 | -------------------------------------------------------------------------------- /src/st/rwrp/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | STATIC_PAD_BSS(0xC68); 5 | -------------------------------------------------------------------------------- /src/st/rwrp/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rwrp.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../create_entity.h" 5 | -------------------------------------------------------------------------------- /src/st/rwrp/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rwrp.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/st/rwrp/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rwrp.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 0x2F8 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/rwrp/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "rwrp.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/sel/config_us.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../../config_us.h" 3 | -------------------------------------------------------------------------------- /src/st/sel/save_mgr.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "sel.h" 3 | #include "../../save_mgr.h" 4 | -------------------------------------------------------------------------------- /src/st/sel/save_mgr_pre.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "sel.h" 3 | #include "../../save_mgr_pre.h" 4 | -------------------------------------------------------------------------------- /src/st/set_cutscene_end.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | 3 | static void SetCutsceneEnd(u8* ptr) { 4 | #if !defined(VERSION_PSP) 5 | g_Dialogue.scriptEnd = ptr + 0x100000; 6 | #else 7 | g_Dialogue.scriptEnd = ptr; 8 | #endif 9 | g_Dialogue.timer = 0; 10 | g_Dialogue.unk3C = 1; 11 | } 12 | -------------------------------------------------------------------------------- /src/st/set_entity_velocity_from_angle.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void SetEntityVelocityFromAngle(u8 arg0, s16 arg1) { 3 | g_CurrentEntity->velocityX = GetSineScaled(arg0, arg1); 4 | g_CurrentEntity->velocityY = GetSineScaled(arg0 - 0x40, arg1); 5 | } 6 | -------------------------------------------------------------------------------- /src/st/set_step.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void SetStep(u8 step) { 3 | g_CurrentEntity->step = step; 4 | g_CurrentEntity->step_s = 0; 5 | g_CurrentEntity->pose = 0; 6 | g_CurrentEntity->poseTimer = 0; 7 | } 8 | -------------------------------------------------------------------------------- /src/st/set_sub_step.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void SetSubStep(u8 step_s) { 3 | g_CurrentEntity->step_s = step_s; 4 | g_CurrentEntity->pose = 0; 5 | g_CurrentEntity->poseTimer = 0; 6 | } 7 | -------------------------------------------------------------------------------- /src/st/st0/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | #include "dialogue2.h" 4 | 5 | // As g_Dialogue can be either structs, we only care of the bigger one 6 | union DiagCombo { 7 | Dialogue diag1; 8 | Dialogue2 diag2; 9 | }; 10 | 11 | u16 msgBoxTpage[768]; 12 | u32 D_801C06B0[4]; 13 | u32 D_801C06C0[1346]; 14 | SVECTOR D_801C1BC8[0x100]; 15 | u32 D_801C23C8[64]; 16 | u32 g_SkipCutscene; 17 | union DiagCombo g_Dialogue; 18 | u32 D_801C2510[26]; 19 | u32 D_801C2578; 20 | u32 g_CutsceneFlags; 21 | s32 g_IsCutsceneDone; 22 | -------------------------------------------------------------------------------- /src/st/st0/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "st0.h" 3 | 4 | #include "../st0_hit_detection.h" 5 | #include "../entity_damage_display.h" 6 | -------------------------------------------------------------------------------- /src/st/st0/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #if !defined(VERSION_PSP) 5 | u32 D_801BEB04[24]; 6 | s32 D_801BEB64[83][2]; 7 | u32 D_801BEDFC; 8 | u32 D_801BEE00; 9 | u32 D_801BEE04; 10 | u16 D_801BEE08[2]; 11 | u16 D_801BEE0C[66]; 12 | u16 D_801BEE90[2312]; 13 | #endif 14 | 15 | // HACK move the header inclusion at the end to not scrable the BSS variables 16 | #include "st0.h" 17 | #include "../pfn_entity_update.h" 18 | #include "../create_entity.h" 19 | -------------------------------------------------------------------------------- /src/st/st0/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "st0.h" 3 | #include 4 | 5 | u8 OVL_EXPORT(cutscene_data)[] = { 6 | #include "gen/cutscene_data.h" 7 | }; 8 | -------------------------------------------------------------------------------- /src/st/st0/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "st0.h" 3 | #include "../e_collect.h" 4 | -------------------------------------------------------------------------------- /src/st/st0/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "st0.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../e_misc.h" 5 | -------------------------------------------------------------------------------- /src/st/st0/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/st0/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "st0.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/st0/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/st0/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/st0/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | #include "../prim_helpers.h" 4 | -------------------------------------------------------------------------------- /src/st/st0/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "st0.h" 3 | #include "../st_common.h" 4 | -------------------------------------------------------------------------------- /src/st/st0/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/st0_psp/cutscene_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../lib/lib.h" 3 | #include 4 | 5 | u8 D_pspeu_09252D80[] = { 6 | #include "gen/cutscene_data_it.h" 7 | }; 8 | 9 | u8 D_pspeu_09253090[] = { 10 | #include "gen/cutscene_data_sp.h" 11 | }; 12 | 13 | u8 D_pspeu_09253368[] = { 14 | #include "gen/cutscene_data_fr.h" 15 | }; 16 | 17 | u8 D_pspeu_09253630[] = { 18 | #include "gen/cutscene_data_ge.h" 19 | }; 20 | 21 | u8 D_pspeu_09253918[] = { 22 | #include "gen/cutscene_data_en.h" 23 | }; 24 | -------------------------------------------------------------------------------- /src/st/st0_psp/lang.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #include "../get_lang_at.h" 5 | 6 | extern s32 g_UserLanguage; 7 | 8 | void* GetLang(void* en, void* fr, void* sp, void* ge, void* it) { 9 | switch (g_UserLanguage) { 10 | default: 11 | case LANG_EN: 12 | return en; 13 | case LANG_FR: 14 | return fr; 15 | case LANG_SP: 16 | return sp; 17 | case LANG_GE: 18 | return ge; 19 | case LANG_IT: 20 | return it; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/st/unk_entity_func0.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | void UnkEntityFunc0(u16 slope, s16 speed) { 3 | g_CurrentEntity->velocityX = rcos(slope) * speed / 16; 4 | g_CurrentEntity->velocityY = rsin(slope) * speed / 16; 5 | } 6 | -------------------------------------------------------------------------------- /src/st/wrp/blit_char.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | 4 | #ifdef VERSION_PSP 5 | #include "../blit_char_psp.h" 6 | #else 7 | #include "../blit_char.h" 8 | #endif 9 | -------------------------------------------------------------------------------- /src/st/wrp/bss.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | u16 msgBoxTpage[0x600]; 5 | STATIC_PAD_BSS(104); 6 | -------------------------------------------------------------------------------- /src/st/wrp/collision.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../collision.h" 3 | -------------------------------------------------------------------------------- /src/st/wrp/create_entity.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | #include "../pfn_entity_update.h" 4 | #include "../create_entity.h" 5 | -------------------------------------------------------------------------------- /src/st/wrp/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/st/wrp/e_collect.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_collect.h" 3 | -------------------------------------------------------------------------------- /src/st/wrp/e_misc.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | #include "../pfn_entity_update.h" 4 | 5 | #define HEART_DROP_CASTLE_FLAG 280 6 | #include "../e_misc.h" 7 | -------------------------------------------------------------------------------- /src/st/wrp/e_particles.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_particles.h" 3 | -------------------------------------------------------------------------------- /src/st/wrp/e_red_door.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | #include "../e_red_door.h" 4 | -------------------------------------------------------------------------------- /src/st/wrp/e_room_fg.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../e_room_fg.h" 3 | -------------------------------------------------------------------------------- /src/st/wrp/e_stage_name.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | 4 | #if defined(VERSION_US) 5 | #include "../e_stage_name.h" 6 | 7 | #else 8 | #include "../entity_stage_name_popup_jp.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /src/st/wrp/popup.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../popup.h" 3 | -------------------------------------------------------------------------------- /src/st/wrp/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | #include "../prim_helpers.h" 5 | -------------------------------------------------------------------------------- /src/st/wrp/st_common.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "wrp.h" 3 | 4 | #include "../st_common.h" 5 | -------------------------------------------------------------------------------- /src/st/wrp/st_update.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../st_update.h" 3 | -------------------------------------------------------------------------------- /src/st/wrp_psp/d_prize_drops.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../wrp/wrp.h" 3 | 4 | u16 OVL_EXPORT(PrizeDrops)[ZERO_LEN] = {}; 5 | -------------------------------------------------------------------------------- /src/st/wrp_psp/layers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | // Just a stub for the BSS currently. This should be generated 5 | // in future from the assets tool 6 | LayerDef emptyLayer = {NULL, NULL, 0, 0, 0}; 7 | -------------------------------------------------------------------------------- /src/st/wrp_psp/prim_helpers.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include "../wrp/wrp.h" 3 | 4 | #include "../prim_helpers.h" 5 | -------------------------------------------------------------------------------- /src/st/wrp_psp/tile_data.c: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | // Just a stub for the BSS currently. This should be generated 5 | // in future from the assets tool 6 | // This is the equivalent of tiledef_06D78_tiles on the PSX side 7 | unsigned char D_psp_0924BCD0[0x1000]; 8 | -------------------------------------------------------------------------------- /src/weapon/w_053_056.h: -------------------------------------------------------------------------------- 1 | // SPDX-License-Identifier: AGPL-3.0-or-later 2 | #include 3 | 4 | // A struct which describes variations of Weapon #53 and #56 5 | typedef struct { 6 | /* 0x0 */ s16 uFlag; 7 | /* 0x2 */ s16 vFlag; 8 | /* 0x4 */ s16 clutFlag; 9 | /* 0x6 */ s16 lifetime; 10 | /* 0x8 */ s16 rotate; 11 | /* 0xA */ u8 r; 12 | /* 0xB */ u8 g; 13 | /* 0xC */ u8 b; 14 | /* 0xD */ u8 : 8; 15 | } W053_056Config; // size = 0xE 16 | -------------------------------------------------------------------------------- /tools/.gitignore: -------------------------------------------------------------------------------- 1 | # Matches in tools or any subdirectory 2 | !.gitignore 3 | go 4 | out 5 | *.map 6 | permute.me/ 7 | target/ 8 | !sotn-debugmodule/sotn-debugmodule.ld 9 | 10 | # Dependency installation checkpoints 11 | *.make.chkpt 12 | 13 | # Matches in tools only 14 | /sotn-disk/sotn-disk 15 | /sotn-assets/sotn-assets -------------------------------------------------------------------------------- /tools/builds/build.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set PATH=TOOLS\BUILDS\GCCSH;%PATH% 3 | echo INPUT FILE: %1 4 | TOOLS\BUILDS\GCCSH\CC1.EXE -%3 -m2 -fsigned-char %1 -o %2 5 | -------------------------------------------------------------------------------- /tools/builds/dosemu_wrapper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Check if correct number of arguments are provided 4 | if [ "$#" -ne 3 ]; then 5 | echo "Usage: $0 input output" 6 | exit 1 7 | fi 8 | 9 | # ninja wants unix-compatible paths to find files, 10 | # but dosemu wants windows paths. So we have this 11 | # wrapper to replace the slashes 12 | in=$(echo "$1" | tr '/' '\\') 13 | out=$(echo "$2" | tr '/' '\\') 14 | 15 | # we need BUILD.BAT to define the path so GO32 works 16 | dosemu -quiet -dumb -f ./dosemurc -K . -E "TOOLS\BUILDS\BUILD.BAT $in $out $3" 17 | -------------------------------------------------------------------------------- /tools/dups/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "dups" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | clap = { version = "4.3.19", features = ["derive"] } 10 | regex = "1.10.5" 11 | 12 | -------------------------------------------------------------------------------- /tools/dups/src/types.rs: -------------------------------------------------------------------------------- 1 | #[derive(Clone, Debug, PartialEq)] 2 | pub struct Function { 3 | pub name: String, 4 | pub ops: Vec, 5 | pub key: Vec, 6 | pub dir: String, 7 | pub file: String, 8 | pub similarity: f64, 9 | pub decompiled: bool, 10 | } 11 | 12 | #[derive(Clone, Debug, PartialEq)] 13 | pub struct Instruction { 14 | pub file_addr: u64, 15 | pub vram_addr: u64, 16 | pub op: u32, 17 | } 18 | 19 | pub struct DupsFile { 20 | pub name: String, 21 | pub funcs: Vec, 22 | } 23 | -------------------------------------------------------------------------------- /tools/gfxsotn/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xeeynamo/sotn-decomp/tools/gfxsotn 2 | 3 | go 1.22 4 | -------------------------------------------------------------------------------- /tools/lints/sotn-lint/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sotn-lint" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | lazy_static = "1.4.0" 10 | rayon = "1.7.0" 11 | regex = "1.9.1" 12 | num = "0.4.3" 13 | once_cell = "1.19.0" 14 | -------------------------------------------------------------------------------- /tools/lints/sotn-lint/src/line_transformer.rs: -------------------------------------------------------------------------------- 1 | // Define the trait for the transform method 2 | pub trait LineTransformer: Sync { 3 | fn transform_line(&self, line: &str) -> String; 4 | } 5 | -------------------------------------------------------------------------------- /tools/requirements-debian.txt: -------------------------------------------------------------------------------- 1 | bchunk 2 | binutils-mipsel-linux-gnu 3 | binutils-sh-elf 4 | bsdmainutils 5 | cargo 6 | clang-format 7 | coreutils 8 | curl 9 | gcc-mipsel-linux-gnu 10 | git 11 | libelf-dev 12 | make 13 | ninja-build 14 | p7zip-full 15 | python3-pip 16 | python3-venv 17 | unzip 18 | wget 19 | xfonts-utils 20 | -------------------------------------------------------------------------------- /tools/requirements-python.txt: -------------------------------------------------------------------------------- 1 | pre-commit 2 | black 3 | pycparser 4 | watchdog 5 | python-Levenshtein 6 | cxxfilt 7 | mapfile-parser==2.1.4 8 | tabulate 9 | requests 10 | graphviz 11 | splat64==0.34.0 12 | crunch64 13 | spimdisasm>=1.33.0 14 | rabbitizer>=1.12.5 15 | n64img==0.3.3 16 | pygfxd 17 | pillow 18 | toml 19 | -------------------------------------------------------------------------------- /tools/sotn-assets/assets/skip/handler.go: -------------------------------------------------------------------------------- 1 | package skip 2 | 3 | import "github.com/xeeynamo/sotn-decomp/tools/sotn-assets/assets" 4 | 5 | type handler struct{} 6 | 7 | var Handler = &handler{} 8 | 9 | func (h *handler) Name() string { return "skip" } 10 | 11 | func (h *handler) Extract(e assets.ExtractArgs) error { 12 | return nil 13 | } 14 | 15 | func (h *handler) Build(e assets.BuildArgs) error { 16 | return nil 17 | } 18 | 19 | func (h *handler) Info(a assets.InfoArgs) (assets.InfoResult, error) { 20 | return assets.InfoResult{}, nil 21 | } 22 | -------------------------------------------------------------------------------- /tools/sotn-assets/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xeeynamo/sotn-decomp/tools/sotn-assets 2 | 3 | go 1.22 4 | 5 | require ( 6 | github.com/stretchr/testify v1.9.0 7 | golang.org/x/sync v0.7.0 8 | gopkg.in/yaml.v2 v2.4.0 9 | ) 10 | 11 | require ( 12 | github.com/davecgh/go-spew v1.1.1 // indirect 13 | github.com/pmezard/go-difflib v1.0.0 // indirect 14 | gopkg.in/yaml.v3 v3.0.1 // indirect 15 | ) 16 | -------------------------------------------------------------------------------- /tools/sotn-debugmodule/sotn-debugmodule.ld: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | . = 0x80280000; 3 | 4 | .inject : { 5 | *(.inject-head*) 6 | *(.inject-func*) 7 | } 8 | 9 | .data : { 10 | *(.data*) 11 | } 12 | 13 | .rodata : { 14 | *(.rodata*) 15 | } 16 | 17 | .text : { 18 | *(.text*) 19 | } 20 | 21 | end = .; 22 | } 23 | -------------------------------------------------------------------------------- /tools/sotn-disk/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/xeeynamo/sotn-decomp/tools/sotn-disk 2 | 3 | go 1.22 4 | -------------------------------------------------------------------------------- /tools/sotn_permuter/decomp_permuter: -------------------------------------------------------------------------------- 1 | ../decomp-permuter -------------------------------------------------------------------------------- /tools/sotn_permuter/default_weights.toml: -------------------------------------------------------------------------------- 1 | ../decomp-permuter/default_weights.toml -------------------------------------------------------------------------------- /tools/sotn_permuter/importer.py: -------------------------------------------------------------------------------- 1 | ../decomp-permuter/import.py -------------------------------------------------------------------------------- /tools/sotn_permuter/src: -------------------------------------------------------------------------------- 1 | ../decomp-permuter/src/ -------------------------------------------------------------------------------- /tools/sotn_str/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "sotn_str" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | [dependencies] 7 | regex = "1" 8 | lazy_static = "1.5.0" 9 | clap = "4.0" -------------------------------------------------------------------------------- /tools/splat_ext/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Xeeynamo/sotn-decomp/8b15d522b79a834889d3997bb3480563a5a830ea/tools/splat_ext/__init__.py -------------------------------------------------------------------------------- /tools/splat_ext/accessory_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "struct": { 3 | "name_addr": "str_ptr", 4 | "desc_addr": "str_ptr", 5 | "attBonus": "s16", 6 | "defBonus": "s16", 7 | "strBonus": "s8", 8 | "conBonus": "s8", 9 | "intBonus": "s8", 10 | "lckBonus": "s8", 11 | "unk10": "u32", 12 | "unk14": "u32", 13 | "icon": "s16", 14 | "iconPalette": "s16", 15 | "equipType": "u16", 16 | "unk1E": "u16" 17 | }, 18 | "fields": {} 19 | } -------------------------------------------------------------------------------- /tools/splat_ext/ci4.py: -------------------------------------------------------------------------------- 1 | from splat.segtypes.n64.ci4 import N64SegCi4 2 | 3 | 4 | class PSXSegCi4(N64SegCi4): 5 | def __init__(self, *args, **kwargs): 6 | super().__init__(*args, **kwargs) 7 | self.n64img.little_endian = True 8 | -------------------------------------------------------------------------------- /tools/splat_ext/i4.py: -------------------------------------------------------------------------------- 1 | import n64img.image 2 | 3 | from splat.segtypes.n64.i4 import N64SegI4 4 | 5 | 6 | class PSXSegI4(N64SegI4): 7 | def __init__(self, *args, **kwargs): 8 | super().__init__(*args, **kwargs) 9 | self.n64img.little_endian = True 10 | -------------------------------------------------------------------------------- /tools/splat_ext/rgba16.py: -------------------------------------------------------------------------------- 1 | import n64img.image 2 | 3 | from splat.segtypes.n64.rgba16 import N64SegRgba16 4 | 5 | 6 | class PSXSegRgba16(N64SegRgba16): 7 | def __init__(self, *args, **kwargs): 8 | kwargs["img_cls"] = n64img.image.RGBA16 9 | super().__init__(*args, **kwargs) 10 | -------------------------------------------------------------------------------- /tools/vab-ex/Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "vab-ex" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | serde = { version = "1", features = ["derive"] } 10 | serde_json = "1" 11 | -------------------------------------------------------------------------------- /weapon0.ld: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | .WEAPON_OVL 0x8017A000 : AT(0) SUBALIGN(4) 3 | { 4 | *(.data) 5 | *(.rodata) 6 | *(.text) 7 | *(.bss) 8 | } 9 | 10 | end = .; 11 | } 12 | -------------------------------------------------------------------------------- /weapon1.ld: -------------------------------------------------------------------------------- 1 | SECTIONS { 2 | .WEAPON_OVL 0x8017D000 : AT(0) SUBALIGN(4) 3 | { 4 | *(.data) 5 | *(.rodata) 6 | *(.text) 7 | } 8 | 9 | end = .; 10 | } 11 | --------------------------------------------------------------------------------