Closed kieranhj closed 6 years ago
4 levels should be doable, just a bit of fancy bit checking and shifting. Will take a look when I'm free
Ok I've implemented a volume control, but space is tight in Hazel so need to optimize it a bit.
Wow, this has turned out far more complex than I realized. Not withstanding the amount of optimizing I've done to squeeze more free bytes out of hazel to fit extra code in, the SN volume is attenuated, so I suspect it needs proper maths than my simple LUT approach to work properly.
It was definitely just a nice to have Simon - if it’s a complete pain just on/off controls would suffice!! I know you like a challenge though. :)
Ha - I'm like a dog with a bone now. It must and it will work!! 🥇
Ok I got it working. It basically sounds ok from full to half volume, but any lower than that and the music quality starts to degrade since there's not enough precision in the 4-bit volume ramp. It does work tho! First beeb game evah with a volume control! :D Gonna tidy up code and check in shortly.
Volume control checked in. Needs some more sprinkles but works. CTRL+3 and CTRL+4
Volume control sounds sweeeet!
I need to decide what to do with sound on/off and music on/off controls. I can look at music off, it shouldn't interfere with the game but would need to check the cutscenes.
For sound on/off I think we should just use the volume controls instead. Thinking CTRL-cursor up and CTRL-cursor down?
I'm guessing that you want a nice status message with the volume value?
Status message would be good if not too much hassle. Leave the music on/off with me. I'll do it in a way that wont affect cutscenes.
Cool. I'll handle the dirty status message system...
Feel free to remove the musicon and soundon variables or just leave them if they are harmless and you don't want to change too much!
Have added volume message in a branch. Will check in later today.
need to try this out...
Almost there with music & sfx toggles. Desperately clawing back bytes in Hazel again! BTW I remapped volume up/down to CTRL+cursor key up/down.
Volume message now in master.
All merged into master. Can now toggle music and sound effects on/off with cursor left/right keys respectively.
Oh btw, it doesnt affect logic at all. So if you mute music it is still actually playing, you just cant hear it! :)
Sound on/off and music on/off controls are not implemented. It would be nice if these could actually be full, half, quarter, off controls (shift volume register) but that is sprinkles.