mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-14 16:40:56 +00:00
Update nukedopl3.cpp
This commit is contained in:
parent
d8d2058ec6
commit
fa2e2a8528
1 changed files with 5 additions and 9 deletions
|
@ -98,8 +98,7 @@ Bit16s envelope_calcsin0(Bit16u phase, Bit16u envelope) {
|
||||||
phase &= 0x3ff;
|
phase &= 0x3ff;
|
||||||
Bit16u out = 0;
|
Bit16u out = 0;
|
||||||
Bit16u neg = 0;
|
Bit16u neg = 0;
|
||||||
if (phase & 0x200 && (phase & 0x1ff)) {
|
if (phase & 0x200) {
|
||||||
phase--;
|
|
||||||
neg = ~0;
|
neg = ~0;
|
||||||
}
|
}
|
||||||
if (phase & 0x100) {
|
if (phase & 0x100) {
|
||||||
|
@ -154,8 +153,7 @@ Bit16s envelope_calcsin4(Bit16u phase, Bit16u envelope) {
|
||||||
phase &= 0x3ff;
|
phase &= 0x3ff;
|
||||||
Bit16u out = 0;
|
Bit16u out = 0;
|
||||||
Bit16u neg = 0;
|
Bit16u neg = 0;
|
||||||
if ((phase & 0x300) == 0x100 && (phase & 0xff)) {
|
if ((phase & 0x300) == 0x100) {
|
||||||
phase--;
|
|
||||||
neg = ~0;
|
neg = ~0;
|
||||||
}
|
}
|
||||||
if (phase & 0x200) {
|
if (phase & 0x200) {
|
||||||
|
@ -188,8 +186,7 @@ Bit16s envelope_calcsin5(Bit16u phase, Bit16u envelope) {
|
||||||
Bit16s envelope_calcsin6(Bit16u phase, Bit16u envelope) {
|
Bit16s envelope_calcsin6(Bit16u phase, Bit16u envelope) {
|
||||||
phase &= 0x3ff;
|
phase &= 0x3ff;
|
||||||
Bit16u neg = 0;
|
Bit16u neg = 0;
|
||||||
if (phase & 0x200 && (phase & 0x1ff)) {
|
if (phase & 0x200) {
|
||||||
phase--;
|
|
||||||
neg = ~0;
|
neg = ~0;
|
||||||
}
|
}
|
||||||
return envelope_calcexp(envelope << 3) ^ neg;
|
return envelope_calcexp(envelope << 3) ^ neg;
|
||||||
|
@ -199,8 +196,7 @@ Bit16s envelope_calcsin7(Bit16u phase, Bit16u envelope) {
|
||||||
phase &= 0x3ff;
|
phase &= 0x3ff;
|
||||||
Bit16u out = 0;
|
Bit16u out = 0;
|
||||||
Bit16u neg = 0;
|
Bit16u neg = 0;
|
||||||
if (phase & 0x200 && (phase & 0x1ff)) {
|
if (phase & 0x200) {
|
||||||
phase--;
|
|
||||||
neg = ~0;
|
neg = ~0;
|
||||||
phase = (phase & 0x1ff) ^ 0x1ff;
|
phase = (phase & 0x1ff) ^ 0x1ff;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue