Transition from QtCore to stdc++ / STL / boost
This looks like a pretty major change, but in reality, 80% of it is just renames of types and corresponding methods. The config parsing code has been completely replaced with a boost::program_options based version. This means that the config file format slightly changed (checkout the updated README). I still expect there to be bugs / unforseen events. Those should be fixed in follow up commits. Also, finally reverted back to using pkg-config to locate and link libruby. Yay for less hacks!
This commit is contained in:
parent
01529c5741
commit
2adf8ab265
40 changed files with 722 additions and 456 deletions
|
|
@ -36,11 +36,9 @@
|
|||
#include "quad.h"
|
||||
#include "binding.h"
|
||||
|
||||
#include <QFile>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <stdio.h>
|
||||
#include <string>
|
||||
|
||||
SharedState *SharedState::instance = 0;
|
||||
static GlobalIBO *globalIBO = 0;
|
||||
|
|
@ -93,21 +91,26 @@ struct SharedStatePrivate
|
|||
graphics(threadData),
|
||||
stampCounter(0)
|
||||
{
|
||||
if (!config.gameFolder.isEmpty())
|
||||
if (!config.gameFolder.empty())
|
||||
{
|
||||
int unused = chdir(config.gameFolder.constData());
|
||||
int unused = chdir(config.gameFolder.c_str());
|
||||
(void) unused;
|
||||
fileSystem.addPath(".");
|
||||
}
|
||||
|
||||
// FIXME find out correct archive filename
|
||||
QByteArray archPath = GAME_ARCHIVE;
|
||||
std::string archPath = GAME_ARCHIVE;
|
||||
|
||||
if (QFile::exists(archPath.constData()))
|
||||
fileSystem.addPath(archPath.constData());
|
||||
/* Check if a game archive exists */
|
||||
FILE *tmp = fopen(archPath.c_str(), "r");
|
||||
if (tmp)
|
||||
{
|
||||
fileSystem.addPath(archPath.c_str());
|
||||
fclose(tmp);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < config.rtps.size(); ++i)
|
||||
fileSystem.addPath(config.rtps[i].constData());
|
||||
fileSystem.addPath(config.rtps[i].c_str());
|
||||
|
||||
fileSystem.createPathCache();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue