In the source code below (a snippet of NstInpPowerGlove.cpp), buffer[3] and buffer[4] are both functions of glove.distance. However, buffer[4] is the wrist rotation angle; it should be a function of glove.wrist. With the bug in place, it is not possible to curve the ball in Super Glove Ball.
Code:
void PowerGlove::Poll()
{
Controllers::PowerGlove& glove = input->powerGlove;
input = NULL;
if (Controllers::PowerGlove::callback( glove ))
{
buffer[1] = (glove.x - 128U) & 0xFF;
buffer[2] = (128U - glove.y) & 0xFF;
if (glove.distance < 0)
{
z += (z < 63);
}
else if (glove.distance > 0)
{
z -= (z > 0);
}
buffer[3] = (z/2 - 16U) & 0xFF;
if (glove.distance < 0)
{
r += (r < 63);
}
else if (glove.distance > 0)
{
r -= (r > 0);
}
else if (r < 32)
{
++r;
}
else if (r > 32)
{
--r;
}
buffer[4] = (r/2 - 16U) & 0xFF;
buffer[5] = glove.gesture;
if (glove.buttons & Controllers::PowerGlove::START)
{
buffer[6] = 0x82;
}
else if (glove.buttons & Controllers::PowerGlove::SELECT)
{
buffer[6] = 0x83;
}
else
{
buffer[6] = 0xFF;
}
}
}
{
Controllers::PowerGlove& glove = input->powerGlove;
input = NULL;
if (Controllers::PowerGlove::callback( glove ))
{
buffer[1] = (glove.x - 128U) & 0xFF;
buffer[2] = (128U - glove.y) & 0xFF;
if (glove.distance < 0)
{
z += (z < 63);
}
else if (glove.distance > 0)
{
z -= (z > 0);
}
buffer[3] = (z/2 - 16U) & 0xFF;
if (glove.distance < 0)
{
r += (r < 63);
}
else if (glove.distance > 0)
{
r -= (r > 0);
}
else if (r < 32)
{
++r;
}
else if (r > 32)
{
--r;
}
buffer[4] = (r/2 - 16U) & 0xFF;
buffer[5] = glove.gesture;
if (glove.buttons & Controllers::PowerGlove::START)
{
buffer[6] = 0x82;
}
else if (glove.buttons & Controllers::PowerGlove::SELECT)
{
buffer[6] = 0x83;
}
else
{
buffer[6] = 0xFF;
}
}
}