mirror of
https://github.com/SplatooD/splatood.git
synced 2026-04-24 23:36:54 -05:00
reduce music volume by gating instead of substraction.
This commit is contained in:
parent
11129a9b52
commit
4c2d24613c
21
famitone2.s
21
famitone2.s
|
|
@ -618,10 +618,9 @@ FamiToneUpdate:
|
|||
sta <FT_TEMP_VAR1
|
||||
pla
|
||||
and #$0f
|
||||
sec
|
||||
sbc FT_MUSIC_VOLUME
|
||||
bcs @ch1vol
|
||||
lda #0
|
||||
cmp FT_MUSIC_VOLUME
|
||||
bcc @ch1vol
|
||||
lda FT_MUSIC_VOLUME
|
||||
@ch1vol:
|
||||
ora <FT_TEMP_VAR1
|
||||
@ch1cut:
|
||||
|
|
@ -662,10 +661,9 @@ FamiToneUpdate:
|
|||
sta <FT_TEMP_VAR1
|
||||
pla
|
||||
and #$0f
|
||||
sec
|
||||
sbc FT_MUSIC_VOLUME
|
||||
bcs @ch2vol
|
||||
lda #0
|
||||
cmp FT_MUSIC_VOLUME
|
||||
bcc @ch2vol
|
||||
lda FT_MUSIC_VOLUME
|
||||
@ch2vol:
|
||||
ora <FT_TEMP_VAR1
|
||||
@ch2cut:
|
||||
|
|
@ -716,10 +714,9 @@ FamiToneUpdate:
|
|||
sta <FT_TEMP_VAR1
|
||||
pla
|
||||
and #$0f
|
||||
sec
|
||||
sbc FT_MUSIC_VOLUME
|
||||
bcs @ch4vol
|
||||
lda #0
|
||||
cmp FT_MUSIC_VOLUME
|
||||
bcc @ch4vol
|
||||
lda FT_MUSIC_VOLUME
|
||||
@ch4vol:
|
||||
ora <FT_TEMP_VAR1
|
||||
@ch4cut:
|
||||
|
|
|
|||
10
game.c
10
game.c
|
|
@ -410,7 +410,7 @@ void show_title(void) {
|
|||
sfx_play(SFX_SPLAT,0);
|
||||
pal_col(6,0x29);
|
||||
WAIT_WITH_SKIP(20);
|
||||
music_play(MUSIC_TITLE,0);
|
||||
music_play(MUSIC_TITLE);
|
||||
|
||||
pal_col(3,0x30);
|
||||
pal_col(15,0x30);
|
||||
|
|
@ -491,7 +491,7 @@ void show_select_map() {
|
|||
/* Use bank 1 to get full characterset tiles */
|
||||
bank_bg(1);
|
||||
bank_spr(1);
|
||||
music_play(MUSIC_STAGE_SELECT,0);
|
||||
music_play(MUSIC_STAGE_SELECT);
|
||||
|
||||
ppu_off();
|
||||
pal_bg(palEndgame);
|
||||
|
|
@ -782,7 +782,7 @@ void show_endgame(void) {
|
|||
ppu_on_all();
|
||||
|
||||
/* Play the post-game music. */
|
||||
music_play(MUSIC_WELL_DONE,0);
|
||||
music_play(MUSIC_WELL_DONE);
|
||||
|
||||
/* Set the gauge palettes. */
|
||||
clear_update_list();
|
||||
|
|
@ -1270,13 +1270,13 @@ void game_loop(void) {
|
|||
--wait;
|
||||
|
||||
if (!wait) {
|
||||
music_play(MUSIC_GAME,4);
|
||||
music_play_gated(MUSIC_GAME,8);
|
||||
}
|
||||
}
|
||||
|
||||
/* When the timer reaches 0, the game is over. */
|
||||
if (timer == 0) {
|
||||
music_play(MUSIC_CLEAR,0);
|
||||
music_play(MUSIC_CLEAR);
|
||||
game_done = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
6
neslib.h
6
neslib.h
|
|
@ -110,7 +110,11 @@ void __fastcall__ oam_hide_rest(unsigned char sprid);
|
|||
|
||||
//play a music in FamiTone format with dampening 0..15
|
||||
|
||||
void __fastcall__ music_play(unsigned char song, unsigned char dampening);
|
||||
void __fastcall__ music_play_gated(unsigned char song, unsigned char dampening);
|
||||
|
||||
void music_play(unsigned char song){
|
||||
music_play_gated(song,15);
|
||||
}
|
||||
|
||||
//stop music
|
||||
|
||||
|
|
|
|||
6
neslib.s
6
neslib.s
|
|
@ -11,7 +11,7 @@
|
|||
.export _scroll,_split
|
||||
.export _bank_spr,_bank_bg
|
||||
.export _vram_read,_vram_write
|
||||
.export _music_play,_music_stop,_music_pause
|
||||
.export _music_play_gated,_music_stop,_music_pause
|
||||
.export _sfx_play,_sample_play
|
||||
.export _pad_poll,_pad_trigger,_pad_state
|
||||
.export _rand8,_rand16,_set_rand
|
||||
|
|
@ -758,9 +758,9 @@ _vram_write:
|
|||
|
||||
|
||||
|
||||
;void __fastcall__ music_play(unsigned char song, unsigned char dampening);
|
||||
;void __fastcall__ music_play_gated(unsigned char song, unsigned char dampening);
|
||||
|
||||
_music_play:
|
||||
_music_play_gated:
|
||||
sta FT_MUSIC_VOLUME
|
||||
jsr popa
|
||||
jmp FamiToneMusicPlay
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user