update
This commit is contained in:
parent
bf096d140a
commit
1516e0201c
|
@ -59,22 +59,45 @@ endif()
|
|||
|
||||
set(SNOWLIB_SRC_FILES
|
||||
snowlib/AnimationProcessor.cpp
|
||||
snowlib/AnimationProcessor.h
|
||||
snowlib/AnimData.cpp
|
||||
snowlib/AnimData.h
|
||||
snowlib/AnimDecoder.cpp
|
||||
snowlib/AnimDecoder.h
|
||||
snowlib/DataAccess.h
|
||||
snowlib/DataUtil.h
|
||||
snowlib/FntDecoder.cpp
|
||||
snowlib/FntDecoder.h
|
||||
snowlib/GameRegion.h
|
||||
snowlib/GameType.h
|
||||
snowlib/GIFTag.cpp
|
||||
snowlib/GIFTag.h
|
||||
snowlib/GobFile.cpp
|
||||
snowlib/GobFile.h
|
||||
snowlib/Helpers.cpp
|
||||
snowlib/Helpers.h
|
||||
snowlib/LmpFile.cpp
|
||||
snowlib/LmpFile.h
|
||||
snowlib/LmpRepository.cpp
|
||||
snowlib/LmpRepository.h
|
||||
snowlib/Logger.cpp
|
||||
snowlib/Logger.h
|
||||
snowlib/Mesh.cpp
|
||||
snowlib/Mesh.h
|
||||
snowlib/Model.h
|
||||
snowlib/Palette.h
|
||||
snowlib/Scene.h
|
||||
snowlib/TexDecoder.cpp
|
||||
snowlib/TexDecoder.h
|
||||
snowlib/Texture.h
|
||||
snowlib/VertexDefs.h
|
||||
snowlib/VertexWeight.h
|
||||
snowlib/VifDecoder.cpp
|
||||
snowlib/VifDecoder.h
|
||||
snowlib/World.cpp
|
||||
snowlib/WorldReader.cpp
|
||||
snowlib/World.h
|
||||
snowlib/WorldReader.cpp
|
||||
snowlib/WorldReader.h
|
||||
)
|
||||
|
||||
include_directories("${FROSTBITE_SOURCE_DIR}/snowlib")
|
||||
|
|
|
@ -41,8 +41,8 @@ void GameData::read(QString rootDir, QString worldName)
|
|||
if (gameType != GameType::UNKNOWN) {
|
||||
QString lmpDir = rootDir + "/" + dataRelPath;
|
||||
//LmpRepository* lmpRepository = new LmpRepositoryImpl(lmpDir.toStdString(), gameType);
|
||||
|
||||
QString gobFile = lmpDir + "/" + worldName.toUpper() + ".GOB";
|
||||
gobName = worldName.toUpper() + ".GOB";
|
||||
QString gobFile = lmpDir + "/" + gobName;
|
||||
worldGob = new GobFile(gobFile.toStdString(), gameType);
|
||||
world = WorldReader().readWorld(worldGob, worldName.toLower().toStdString().c_str());
|
||||
}
|
||||
|
|
|
@ -16,6 +16,11 @@ public:
|
|||
|
||||
void read(QString rootDir, QString worldName);
|
||||
|
||||
QString getGobName() { return gobName; }
|
||||
QString getRootDir() { return rootDir; }
|
||||
|
||||
World* getWorld() { return world; }
|
||||
|
||||
private:
|
||||
GameRegion gameRegion;
|
||||
GameType gameType;
|
||||
|
@ -26,6 +31,7 @@ private:
|
|||
/* Relative path from the root where the data files live. */
|
||||
QString dataRelPath;
|
||||
|
||||
QString gobName;
|
||||
GobFile* worldGob;
|
||||
World* world;
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "InfoPanel.h"
|
||||
#include "gameData.h"
|
||||
|
||||
#include <QtWidgets>
|
||||
|
||||
|
@ -6,6 +7,9 @@ InfoPanel::InfoPanel(QWidget* parent, GameData& gameData) : gameData(gameData)
|
|||
{
|
||||
widget = new QTableWidget(1, 2, parent);
|
||||
widget->setHorizontalHeaderLabels(QStringList() << "Property" << "Value");
|
||||
widget->setCornerButtonEnabled(false);
|
||||
widget->verticalHeader()->hide();
|
||||
widget->setAlternatingRowColors(true);
|
||||
populateGamedata();
|
||||
}
|
||||
|
||||
|
@ -14,10 +18,12 @@ void InfoPanel::populateGamedata()
|
|||
widget->clearContents();
|
||||
widget->setRowCount(0);
|
||||
widget->setSortingEnabled(false);
|
||||
addRow("Name", QString("xxx"));
|
||||
addRow("Name2", QString("xxx2"));
|
||||
addRow("Root Dir", gameData.getRootDir());
|
||||
addRow("GOB Name", gameData.getGobName());
|
||||
|
||||
widget->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
widget->resizeColumnsToContents();
|
||||
widget->resizeRowsToContents();
|
||||
}
|
||||
|
||||
void InfoPanel::addRow(const char* name, QString val)
|
||||
|
|
Reference in a new issue