chip flags rewrite, part 4 - DO NOT USE

the next part is to drop systemFlagsOld completely
and then to fix the GUI
This commit is contained in:
tildearrow 2022-09-29 20:13:40 -05:00
parent ee6e0aa0e0
commit 48db9a1d0c
109 changed files with 532 additions and 377 deletions

View file

@ -592,14 +592,14 @@ void DivPlatformQSound::notifyInsDeletion(void* ins) {
}
}
void DivPlatformQSound::setFlags(unsigned int flags) {
echoDelay = 2725 - (flags & 0xfff);
echoFeedback = (flags >> 12) & 255;
void DivPlatformQSound::setFlags(const DivConfig& flags) {
echoDelay = 2725 - flags.getInt("echoDelay",0);
echoFeedback = flags.getInt("echoFeedback",0) & 255;
if(echoDelay < 0) {
if (echoDelay < 0) {
echoDelay = 0;
}
if(echoDelay > 2725) {
if (echoDelay > 2725) {
echoDelay = 2725;
}
//rate=chipClock/CHIP_DIVIDER;
@ -678,7 +678,7 @@ void DivPlatformQSound::renderSamples() {
sampleMemLen=memPos+256;
}
int DivPlatformQSound::init(DivEngine* p, int channels, int sugRate, unsigned int flags) {
int DivPlatformQSound::init(DivEngine* p, int channels, int sugRate, const DivConfig& flags) {
parent=p;
dumpWrites=false;
skipRegisterWrites=false;