aboutsummaryrefslogtreecommitdiff
path: root/source/dsp1emu.c
diff options
context:
space:
mode:
authorJoão Silva2017-01-14 23:08:50 +0000
committerJoão Silva2017-01-14 23:08:50 +0000
commit3b8323853f4eeddb61398e77c51bb2349f430227 (patch)
tree55cb980be4bf5bf93041392470637d78c73b4854 /source/dsp1emu.c
parentd59c856fbf576daa91fa4a8bade38d97b4edbbe4 (diff)
downloadsnes9x2005-3b8323853f4eeddb61398e77c51bb2349f430227.tar.gz
snes9x2005-3b8323853f4eeddb61398e77c51bb2349f430227.tar.bz2
snes9x2005-3b8323853f4eeddb61398e77c51bb2349f430227.zip
Removed a LOT of useless stuff.
Diffstat (limited to 'source/dsp1emu.c')
-rw-r--r--source/dsp1emu.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/source/dsp1emu.c b/source/dsp1emu.c
index 2acc085..3999d5d 100644
--- a/source/dsp1emu.c
+++ b/source/dsp1emu.c
@@ -683,15 +683,12 @@ void DSPOp06()
// rotate around Z
tanval2 = Angle(-Op02AAS + 32768);
- // tanval2 = (-Op02AAS+32768)/(65536/INCR);
ObjPX1 = (ObjPX * Cos(tanval2) + ObjPY * -Sin(tanval2));
ObjPY1 = (ObjPX * Sin(tanval2) + ObjPY * Cos(tanval2));
ObjPZ1 = ObjPZ;
// rotate around X
- // tanval2 = (-Op02AZS/(65536/INCR)) & 1023;
tanval2 = Angle(-Op02AZS);
- // tanval2 = (-Op02AZS)/256;
ObjPX2 = ObjPX1;
ObjPY2 = (ObjPY1 * Cos(tanval2) + ObjPZ1 * -Sin(tanval2));
ObjPZ2 = (ObjPY1 * Sin(tanval2) + ObjPZ1 * Cos(tanval2));
@@ -701,8 +698,8 @@ void DSPOp06()
if (ObjPZ2 < 0)
{
double d;
- Op06H = (int16_t)(-ObjPX2 * Op02LES / -(ObjPZ2)); //-ObjPX2*256/-ObjPZ2;
- Op06V = (int16_t)(-ObjPY2 * Op02LES / -(ObjPZ2)); //-ObjPY2*256/-ObjPZ2;
+ Op06H = (int16_t)(-ObjPX2 * Op02LES / -(ObjPZ2));
+ Op06V = (int16_t)(-ObjPY2 * Op02LES / -(ObjPZ2));
d = (double)Op02LES;
d *= 256.0;
d /= (-ObjPZ2);
@@ -711,8 +708,6 @@ void DSPOp06()
else if (d < 0.0)
d = 0.0;
Op06S = (uint16_t)d;
- //Op06S=(uint16_t)(256*(double)Op02LES/-ObjPZ2);
- //Op06S=(uint16_t)((double)(256.0*((double)Op02LES)/(-ObjPZ2)));
}
else
{
@@ -747,8 +742,8 @@ void DSPOp06()
if (ObjPZ2 < 0)
{
- Op06H = (int16_t)(-ObjPX2 * Op02LES / -(ObjPZ2)); //-ObjPX2*256/-ObjPZ2;
- Op06V = (int16_t)(-ObjPY2 * Op02LES / -(ObjPZ2)); //-ObjPY2*256/-ObjPZ2;
+ Op06H = (int16_t)(-ObjPX2 * Op02LES / -(ObjPZ2));
+ Op06V = (int16_t)(-ObjPY2 * Op02LES / -(ObjPZ2));
double d = (double)Op02LES;
d *= 256.0;
d /= (-ObjPZ2);
@@ -757,7 +752,6 @@ void DSPOp06()
else if (d < 0.0)
d = 0.0;
Op06S = (uint16_t)d;
- // Op06S=(uint16_t)(256*(double)Op02LES/-ObjPZ2);
}
else
{