diff options
author | Juan J. Martinez <jjm@usebox.net> | 2024-05-27 23:24:19 +0100 |
---|---|---|
committer | Juan J. Martinez <jjm@usebox.net> | 2024-05-27 23:24:19 +0100 |
commit | 703ab56587aac0d79ccc0f72f2b8d9ee235e20a5 (patch) | |
tree | 32b186dc14c56fe19c004a403eeaaf7e2dd0b10f /src/mplayer/mplayer_play_effect_p.z80 | |
parent | 420ac2c8f2307ddcbe551972544bbe11f05ee7ff (diff) | |
download | ubox-msx-lib-703ab56587aac0d79ccc0f72f2b8d9ee235e20a5.tar.gz ubox-msx-lib-703ab56587aac0d79ccc0f72f2b8d9ee235e20a5.zip |
Use SDCC's new calling convention
(this is an ABI breaking change, and will require changes to
user-written asm functions or their declarations)
Diffstat (limited to 'src/mplayer/mplayer_play_effect_p.z80')
-rw-r--r-- | src/mplayer/mplayer_play_effect_p.z80 | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/src/mplayer/mplayer_play_effect_p.z80 b/src/mplayer/mplayer_play_effect_p.z80 index 8efd705..9e428cd 100644 --- a/src/mplayer/mplayer_play_effect_p.z80 +++ b/src/mplayer/mplayer_play_effect_p.z80 @@ -7,39 +7,40 @@ .globl _PLY_AKM_PLAYSOUNDEFFECT _mplayer_play_effect_p:: + ld e, a + ld c, l + ld hl, #2 add hl, sp + ld b, (hl) - ld e, (hl) - inc hl - ld c, (hl) - inc hl - ld b, (hl) - - ; e effect no - ; bc: channel and volume - push bc - push de - ld l, c - call _mplayer_is_sound_effect_on + ; e effect no + ; bc: channel and volume + push bc + push de + ld a, c + call _mplayer_is_sound_effect_on - ld a, l or a - pop de - pop bc + pop de + pop bc jr z, play_efx ld a, (mplayer_current_efx) - ; comment out following line if you don't want to - ; replace current sound if is the same effect type - dec a + ; comment out following line if you don't want to + ; replace current sound if is the same effect type + dec a cp e - ret nc + jp nc, play_exit play_efx: ; all good, play the effect ld a, e ld (mplayer_current_efx), a - jp _PLY_AKM_PLAYSOUNDEFFECT + call _PLY_AKM_PLAYSOUNDEFFECT +play_exit: + pop hl + inc sp + jp (hl) |