summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_ft
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-05 11:46:11 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-05 11:46:11 +0200
commitcdcc4eb3e5549e9302906a8f9944681a9623d96f (patch)
treef79fbbca497501ed5f8757dba2670f8c0e7b7163 /ftnoir_protocol_ft
parent907edc1575e063946de33bf454efa41acff38182 (diff)
Project Evil: if you have to ask, you don't wanna know.
Diffstat (limited to 'ftnoir_protocol_ft')
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
index 73856a2b..bd9b7746 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.cpp
@@ -141,7 +141,12 @@ void FTNoIR_Protocol::getGameData( QString gameID ){
QByteArray id = gameLine.at(7).toAscii();
int tmp[8];
int fuzz[3];
- if (sscanf(id.constData(),
+ if (gameLine.at(3) == QString("V160"))
+ {
+ qDebug() << "no table";
+ memset(pMemData->table, 0, 8);
+ }
+ else if (sscanf(id.constData(),
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
fuzz + 2,
fuzz + 0,
@@ -161,7 +166,7 @@ void FTNoIR_Protocol::getGameData( QString gameID ){
else
for (int i = 0; i < 8; i++)
pMemData->table[i] = tmp[i];
- qDebug() << "game-id" << gameLine.at(7);
+ qDebug() << gameID << "game-id" << gameLine.at(7);
game_name = gameLine.at(1);
file.close();
return;
@@ -175,7 +180,7 @@ void FTNoIR_Protocol::getGameData( QString gameID ){
// If the gameID was NOT found, fill only the name "Unknown game connected"
//
qDebug() << "Unknown game connected" << pMemData->GameID;
- file.close();
+ file.close();
}
//
@@ -282,6 +287,7 @@ float headRotZ;
//
if (intGameID != pMemData->GameID)
{
+ memset(pMemData->table, 0, 8);
QString gameID = QString::number(pMemData->GameID);
getGameData(gameID);
pMemData->GameID2 = pMemData->GameID;