Views: 784,423,433
16 users online:  bebn legg, chickaDEE Magazine, Dark Prince, DatBootlegger, ECS.98, Golden Yoshi, huebrbr, K.T.B., kirbymaster1, Roberto zampari, SAMYR DUTRA ARAUJO, Sixcorby,  Tahixham, thekiller678, xyz600sp,  Yoshi Master - Guests: 32 - Bots: 182 Users: 41,023 (1,551 active)
Latest: Jojojan17
Tip: If you give a Muncher tile custom graphics, it will still act like a coin when a silver P-switch is active, whether it looks like a coin or not. So make sure to use ExAnimation if there's a silver P-switch in the area.Not logged in.
Details for Music Volume Changer
SMW Blocks - Music Volume Changer
File Name: Music Volume Changer
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: lorom, music, spc700
Rating: No rating
Download: Download - 1.42 KiB
Main: LDA $14 : AND #$01 : BEQ Return
would probably work to make it continuously go up/down
Posted by: TheBiob - | Link
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.
       LDX #!SFXUp
       LDA $15
       BIT #$08
       BNE Store
       AND #$04
       BEQ Return
       LDX #!SFXDown
       STX !SFXPort

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:  Erik - | Link

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

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

Total queries: 7


Follow Us On

  • YouTube
  • Twitch
  • Twitter


  • Talkhaus
  • SMBX Community
  • GTx0
  • Super Luigi Bros
  • MFGG
  • Gaming Reinvented