GB: fix wave orientation

This commit is contained in:
tildearrow 2022-02-10 02:56:36 -05:00
parent 8188b12821
commit 73dd66b439
1 changed files with 2 additions and 2 deletions

View File

@ -57,8 +57,8 @@ void DivPlatformGB::updateWave() {
if (wt->max<1 || wt->len<1) {
rWrite(0x30+i,0);
} else {
unsigned char nibble1=(wt->data[(i*2)*wt->len/32]*15)/wt->max;
unsigned char nibble2=(wt->data[(1+i*2)*wt->len/32]*15)/wt->max;
unsigned char nibble1=15-((wt->data[(i*2)*wt->len/32]*15)/wt->max);
unsigned char nibble2=15-((wt->data[(1+i*2)*wt->len/32]*15)/wt->max);
rWrite(0x30+i,(nibble1<<4)|nibble2);
}
}