Banner
Views: 705,867,594
Time:
2 users online: o Ladida, Maarfy - Guests: 23 - Bots: 128Users: 36,878 (1,439 active)
Latest: Jean Himura
Tip: If you edit level 0, make sure you also edit level 100. Both of them are used for the bonus game.Not logged in.
Details for Music Volume Changer
SMW Blocks - Music Volume Changer
File Name: Music Volume Changer
Added:
Authors: Meirdent
Act As: Any
Includes GFX: No
Description: A block that, when interacted with, will allow the player to increase the background music's volume by pressing up, or decrease it by pressing down.

AddmusicK is needed to insert two included sound effects. This block will not work without them!
See the included readme for more details.
Tags: music, spc700
Rating: 0.0 (Votes: 0)
Download: Download - 1.42 KiB
71 downloads
TheBiob
Code
Main: LDA $14 : AND #$01 : BEQ Return
would probably work to make it continuously go up/down
Posted by: TheBiob -
Erik
I was gonna reject this but decided against it. The change is way too simple to justify a rejection, anyway.
The main problem would be that you use CMP instead of AND. While by itself it might not look too bad in a block like this, there are occasions where players leave, say, their Y key pressed while pressing up in the block, and it wouldn't work because of you comparing the exact button press of Up/Down. By using AND (or BIT) players could have other buttons pressed alongside those and the block can still do its intended job.
You also can move the Return: label to the second RTL, removing the last RTL to save a byte.
The code can be even more optimized, using X to hold the sound value while A does the button checks - here's how I'd do it.
Code
Main:
       LDX #!SFXUp
       LDA $15
       BIT #$08
       BNE Store
       AND #$04
       BEQ Return
       LDX #!SFXDown
Store:
       STX !SFXPort
Return:
       RTL


Anyways though, good job with it! Feels kinda weird that the volume does not constantly change volume if I hold the arrow, but whatever, and I couldn't figure out how to do that too anyway.
Posted by: o Erik -

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2018 - SMW Central
Legal Information - Privacy Policy - Link To Us


Total queries: 26

Menu

Follow Us On

  • Facebook
  • Twitter
  • YouTube

Affiliates

  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • ROMhacking.net
  • MFGG
  • Gaming Reinvented