Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Module function 'set_song_position(int position)' #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions include/sound.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ void clear_module();
/** Play/Pause the replay of the current music */
void pause_module();

/** Set specific postiont to start playback from. */
void set_song_position(/** Position in song to play */
int position);

/** Set modules voices mask. It returns the mask set. */
int enable_module_voices(/** Mask to enable/disable voice of a
module. Bit 0 = Voice 0, Bit 1 = Voice 1,
Expand Down
4 changes: 4 additions & 0 deletions sound/protracker.s
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ _pause_module equ mt_pause
;; enable_module_voices(int mask);
_enable_module_voices equ mt_enable_voices

.globl _set_song_position
;; set_song_position(int position);
_set_song_position equ mt_SetSongPos

4 changes: 4 additions & 0 deletions sound/pt-play.s
Original file line number Diff line number Diff line change
Expand Up @@ -1246,6 +1246,10 @@ mt_PositionJump:
MOVE.B n_cmdlo(A6),D0
.endif
SUBQ.B #1,D0
bra.s skip_SetSongPos
mt_SetSongPos:
MOVE.L 4(sp),D0
skip_SetSongPos:
MOVE.B D0,mt_SongPos
mt_pj2:
CLR.B mt_PBreakPos
Expand Down
4 changes: 4 additions & 0 deletions sound/sound.s
Original file line number Diff line number Diff line change
Expand Up @@ -579,4 +579,8 @@ _pause_module equ mt_pause
.globl _enable_module_voices
;; enable_module_voices(int mask);
_enable_module_voices equ mt_enable_voices

.globl _set_song_position
;; set_song_position(int position);
_set_song_position equ mt_SetSongPos