From a308c486d6ae235b86a6ed452ddc3f31dda7c0a7 Mon Sep 17 00:00:00 2001 From: nmlgc Date: Tue, 28 Nov 2023 19:44:34 +0100 Subject: [PATCH] [Maintenance] Move the snd_load() constants into a separate ASM include file And place it at a position where I don't forget to remove it once it's no longer necessary. Part of P0263, funded by [Anonymous]. --- th02/snd/load[bss].asm | 3 --- th02/snd/snd.inc | 2 ++ th02_main.asm | 1 + th02_maine.asm | 1 + th03_mainl.asm | 1 + th03_op.asm | 1 + th04_main.asm | 5 +---- th04_maine.asm | 1 + th04_op.asm | 1 + th05_main.asm | 1 + th05_maine.asm | 2 ++ th05_op.asm | 2 ++ 12 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 th02/snd/snd.inc diff --git a/th02/snd/load[bss].asm b/th02/snd/load[bss].asm index 2ff65aa1..e86dd728 100644 --- a/th02/snd/load[bss].asm +++ b/th02/snd/load[bss].asm @@ -1,6 +1,3 @@ -SND_LOAD_SONG equ (KAJA_GET_SONG_ADDRESS shl 8) -SND_LOAD_SE equ (PMD_GET_SE_ADDRESS shl 8) - SND_LOAD_FN_LEN equ 13 public _snd_load_fn _snd_load_fn db SND_LOAD_FN_LEN dup(?) diff --git a/th02/snd/snd.inc b/th02/snd/snd.inc new file mode 100644 index 00000000..494d1444 --- /dev/null +++ b/th02/snd/snd.inc @@ -0,0 +1,2 @@ +SND_LOAD_SONG equ (KAJA_GET_SONG_ADDRESS shl 8) +SND_LOAD_SE equ (PMD_GET_SE_ADDRESS shl 8) diff --git a/th02_main.asm b/th02_main.asm index 0a328c09..8fc8402f 100644 --- a/th02_main.asm +++ b/th02_main.asm @@ -6466,6 +6466,7 @@ main_01____TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 +include th02/snd/snd.inc extern @ZUN_ERROR$Q11ZUN_ERROR_T:proc extern _key_delay:proc extern MPN_LOAD:proc diff --git a/th02_maine.asm b/th02_maine.asm index 89698e31..26ce0c48 100644 --- a/th02_maine.asm +++ b/th02_maine.asm @@ -2924,6 +2924,7 @@ maine_01_TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 +include th02/snd/snd.inc extern _graph_putsa_fx:proc extern _key_delay:proc extern _pi_load:proc diff --git a/th03_mainl.asm b/th03_mainl.asm index a67297b6..97073d60 100644 --- a/th03_mainl.asm +++ b/th03_mainl.asm @@ -2658,6 +2658,7 @@ mainl_03_TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 +include th02/snd/snd.inc extern _snd_determine_mode:proc extern _snd_delay_until_volume:proc extern _snd_load:proc diff --git a/th03_op.asm b/th03_op.asm index 1753078c..9b345dca 100644 --- a/th03_op.asm +++ b/th03_op.asm @@ -3305,6 +3305,7 @@ op_03_TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 +include th02/snd/snd.inc extern @game_exit_to_dos$qv:proc extern _snd_determine_mode:proc extern _snd_load:proc diff --git a/th04_main.asm b/th04_main.asm index c17dbcb7..83719198 100644 --- a/th04_main.asm +++ b/th04_main.asm @@ -10485,10 +10485,7 @@ BOSS_BG_TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 - assume cs:g_SHARED - ;org 0Dh - assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing - +include th02/snd/snd.inc extern VECTOR2:proc extern FRAME_DELAY:proc extern MPN_FREE:proc diff --git a/th04_maine.asm b/th04_maine.asm index 1ba44263..fa0102a2 100644 --- a/th04_maine.asm +++ b/th04_maine.asm @@ -3188,6 +3188,7 @@ maine_01_TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 +include th02/snd/snd.inc extern FRAME_DELAY:proc extern PI_PALETTE_APPLY:proc extern PI_PUT_8:proc diff --git a/th04_op.asm b/th04_op.asm index 7a329464..339a87e0 100644 --- a/th04_op.asm +++ b/th04_op.asm @@ -1462,6 +1462,7 @@ op_01_TEXT ends ; =========================================================================== SHARED segment word public 'CODE' use16 +include th02/snd/snd.inc extern FRAME_DELAY:proc extern PI_PALETTE_APPLY:proc extern PI_PUT_8:proc diff --git a/th05_main.asm b/th05_main.asm index e38d645f..30b1d8fc 100644 --- a/th05_main.asm +++ b/th05_main.asm @@ -7252,6 +7252,7 @@ SHARED segment word public 'CODE' use16 SHARED ends SHARED_ segment word public 'CODE' use16 +include th02/snd/snd.inc extern CDG_PUT_NOALPHA_8:proc extern SND_SE_PLAY:proc extern _snd_se_update:proc diff --git a/th05_maine.asm b/th05_maine.asm index 7438775a..0d319b34 100644 --- a/th05_maine.asm +++ b/th05_maine.asm @@ -6320,6 +6320,8 @@ SHARED_ segment word public 'CODE' use16 ;org 0Ch assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing +include th02/snd/snd.inc + include th04/hardware/grppsafx.asm extern CDG_PUT_NOALPHA_8:proc extern SND_SE_PLAY:proc diff --git a/th05_op.asm b/th05_op.asm index c099081e..c415cc94 100644 --- a/th05_op.asm +++ b/th05_op.asm @@ -1489,6 +1489,8 @@ SHARED segment word public 'CODE' use16 SHARED ends SHARED_ segment word public 'CODE' use16 +include th02/snd/snd.inc + assume cs:g_SHARED ; org 4 assume es:nothing, ss:nothing, ds:_DATA, fs:nothing, gs:nothing