Get rid of QNAM (now subclassed and less needy). Basic LWJGL download and extraction.

This commit is contained in:
Petr Mrázek 2013-08-07 01:38:18 +02:00
parent 091b7502cf
commit afaa1dc223
35 changed files with 506 additions and 242 deletions

18
backend/BaseUpdate.cpp Normal file
View file

@ -0,0 +1,18 @@
#include "BaseUpdate.h"
BaseUpdate::BaseUpdate ( BaseInstance* inst, QObject* parent ) : Task ( parent )
{
m_inst = inst;
}
void BaseUpdate::error ( const QString& msg )
{
emit gameUpdateError(msg);
}
void BaseUpdate::updateDownloadProgress(qint64 current, qint64 total)
{
// The progress on the current file is current / total
float currentDLProgress = (float) current / (float) total;
setProgress((int)(currentDLProgress * 100)); // convert to percentage
}