diff --git a/artwork/sfx/scorch_trial0e_stripped.rmt b/artwork/sfx/scorch_trial0f_stripped.rmt similarity index 50% rename from artwork/sfx/scorch_trial0e_stripped.rmt rename to artwork/sfx/scorch_trial0f_stripped.rmt index b2d6ae3..0343be7 100644 Binary files a/artwork/sfx/scorch_trial0e_stripped.rmt and b/artwork/sfx/scorch_trial0f_stripped.rmt differ diff --git a/definitions.asm b/definitions.asm index 51b1305..703aa1b 100644 --- a/definitions.asm +++ b/definitions.asm @@ -171,3 +171,12 @@ sfx_keyclick = $18 ;y sfx_shoot = $19 ;z sfx_seppuku = $1a ;1 sfx_liquid_dirt = $1b ;2 +sfx_battery = $1c ;3 +sfx_white_flag = $1d ;4 +;-------------------------------- +; RMT songs (lines) +;-------------------------------- +song_silencio = $00 +song_end_round = $02 +song_ingame = $06 +song_game_over = $0b diff --git a/scorch.asm b/scorch.asm index ad0f89f..a05254f 100644 --- a/scorch.asm +++ b/scorch.asm @@ -167,7 +167,8 @@ MainGameLoop ; Results are number of other deaths ; before the player dies itself - + lda #song_end_round + jsr RmtSongSelect jsr DisplayResults ;check demo mode @@ -240,6 +241,7 @@ skipzeroing inc CurrentRoundNr mva #0 dmactl ; issue #72 + jsr RmtSongSelect mva #sfx_silencer sfx_effect jmp MainGameLoop @@ -254,6 +256,9 @@ skipzeroing ; the shooting angle is randomized ; of course gains an looses are zeroed + lda #song_ingame + jsr RmtSongSelect + lda #0 tax @ sta singleRoundVars,x @@ -908,10 +913,8 @@ ClearResults lda #$ff ;initial value sta sfx_effect ; - ldx #MODUL ;hi byte of RMT module to Y reg - lda #0 ;starting song line 0-255 to A reg - jsr RASTERMUSICTRACKER ;Init + lda #0 + jsr RmtSongSelect ; VMAIN VBLinterrupt,6 ;jsr SetVBL @@ -971,14 +974,16 @@ itsPAL ; pressTimer is trigger tick counter. always 50 ticks / s bit:smi:inc pressTimer ; timer halted if >127. max time measured 2.5 s + ; ------- RMT ------- lda sfx_effect bmi lab2 asl @ ; * 2 tay ;Y = 2,4,..,16 instrument number * 2 (0,2,4,..,126) ldx #0 ;X = 0 channel (0..3 or 0..7 for stereo module) - lda #0 ;A = 12 note (0..60) - jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!) + lda #0 ;A = 0 note (0..60) + bit noSfx + smi:jsr RASTERMUSICTRACKER+15 ;RMT_SFX start tone (It works only if FEAT_SFX is enabled !!!) lda #$ff sta sfx_effect ;reinit value @@ -1312,7 +1317,14 @@ getkeyend rts .endp - +;-------------------------------------------------- +.proc RmtSongSelect +;-------------------------------------------------- +; starting song line 0-255 to A reg + ldx #MODUL ;hi byte of RMT module to Y reg + jmp RASTERMUSICTRACKER ;Init, :RTS +.endp ;---------------------------------------------- icl 'weapons.asm' ;---------------------------------------------- @@ -1342,7 +1354,7 @@ TankFont MODUL equ $b000 ;address of RMT module opt h- ;RMT module is standard Atari binary file already - ins "artwork/sfx/scorch_trial0e_stripped.rmt" ;include music RMT module + ins "artwork/sfx/scorch_trial0f_stripped.rmt" ;include music RMT module opt h+ ; ; diff --git a/scorch.xex b/scorch.xex index 0201d7f..bceb2a4 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index 5acd390..2e4768f 100644 --- a/textproc.asm +++ b/textproc.asm @@ -788,6 +788,7 @@ invSelectDef cmp #ind_Battery________ bne NotBattery ; if activate battery, we do it differently + mva #sfx_battery sfx_effect mva #99 Energy,x bne DecreaseDefensive ; bypass activation NotBattery @@ -795,6 +796,7 @@ NotBattery bne NotWhiteFlag cmp ActiveDefenceWeapon,x bne NoDeactivateWhiteFlag + mva #sfx_white_flag sfx_effect lda #$00 ; if try to activate activated White Flag then deactivate Defence sta ActiveDefenceWeapon,x sta ShieldEnergy,x @@ -1601,7 +1603,6 @@ quit_seppuku ;displays results of the round ;using 4x4 font - mva #sfx_smoke_cloud sfx_effect mva #1 plot4x4color ;centering the result screen @@ -1631,6 +1632,8 @@ quit_seppuku beq @+ ;unconditional jump, because TypeLine4x4 ends with beq GameOver4x4 + lda #song_game_over + jsr RmtSongSelect mwa #LineGameOver LineAddress4x4 mwa #((ScreenWidth/2)-(8*4)) LineXdraw mva ResultY LineYdraw diff --git a/variables.asm b/variables.asm index 310e633..93ed69f 100644 --- a/variables.asm +++ b/variables.asm @@ -19,6 +19,8 @@ seppukuVal .by 75 skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30) .DS [MaxPlayers] ;---------------------------------------------------- +noMusic .by 0 ; 0 - play music, $ff - do not play music +noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX ; 4x4 text buffer ResultLineBuffer dta d" ", $ff diff --git a/weapons.asm b/weapons.asm index dde2ad5..0b36923 100644 --- a/weapons.asm +++ b/weapons.asm @@ -1078,6 +1078,10 @@ jumpFromStick jeq pressedSpace cmp #$2c jeq pressedTAB + cmp #$25 ; M + jeq pressedM + cmp #$3e ; S + jeq pressedS jmp notpressed checkJoy ;------------JOY------------- @@ -1235,6 +1239,26 @@ CTRLpressedTAB jsr WaitForKeyRelease jmp BeforeFire +pressedM + ; have you tried turning the music off and on again? + lda #$ff + eor:sta noMusic + bmi silencioMusico + lda #song_ingame + bne @+ +silencioMusico + lda #song_silencio +@ jsr RmtSongSelect + jsr WaitForKeyRelease + jmp BeforeFire + +pressedS + ; have you tried turning sfx off and on again? + lda #$ff + eor:sta noSfx + jsr WaitForKeyRelease + jmp BeforeFire + pressedSpace ;================================= @@ -2349,11 +2373,12 @@ MIRValreadyAll ; and replaces Shoot and Flight routines ; X and TankNr - index of shooting tank ; ------------------------------------------------- + mva #sfx_sandhog sfx_effect ldy #0 ; byte counter (from 0 to 39) NextColumn ; big loop - we repat internal loops for each column of bytes sty magic - ldx #60 ; line counter (from 0 to 60 ) + ldx #120 ; line counter (from 0 to 60 ) ; first loop - inverse column of bytes for a while ldy magic NextLine1 @@ -2364,7 +2389,7 @@ NextLine1 ; wait ; wait uses A and Y ; second loop - inverse again and put random "snow" to column of bytes - ldx #60 + ldx #120 ldy magic mva #$55 magic+1 NextLine2