diff --git a/apps/armoury/include/fullmodelviewer.h b/apps/armoury/include/fullmodelviewer.h index c927d15..4aa3df5 100644 --- a/apps/armoury/include/fullmodelviewer.h +++ b/apps/armoury/include/fullmodelviewer.h @@ -39,7 +39,7 @@ private: void updateHeightScaling(float scale); void updateBustScaling(float scale); void updateCharacterParameters(); - void updateSupportedSubraces(); + void updateSupportedTribes(); void updateRaceData(); QGroupBox *addFaceGroup(); @@ -60,4 +60,4 @@ private: float heightScale = 0.5f; float bustScale = 1.0f; -}; \ No newline at end of file +}; diff --git a/apps/armoury/include/gearview.h b/apps/armoury/include/gearview.h index f0f7147..1b801f7 100644 --- a/apps/armoury/include/gearview.h +++ b/apps/armoury/include/gearview.h @@ -41,7 +41,7 @@ public: explicit GearView(GameData *data, FileCache &cache, QWidget *parent = nullptr); /// Returns an inclusive list of races supported by the current gearset. - std::vector> supportedRaces() const; + std::vector> supportedRaces() const; /// Returns an inclusive list of genders supported by the current gearset. std::vector supportedGenders() const; @@ -54,7 +54,7 @@ public: MDLPart &part() const; Race currentRace = Race::Hyur; - Subrace currentSubrace = Subrace::Midlander; + Tribe currentTribe = Tribe::Midlander; Gender currentGender = Gender::Male; QString getLoadedGearPath() const; @@ -79,7 +79,7 @@ public Q_SLOTS: void removeGear(GearInfo &gear); void setRace(Race race); - void setSubrace(Subrace subrace); + void setTribe(Tribe subrace); void setGender(Gender gender); void setLevelOfDetail(int lod); @@ -122,4 +122,4 @@ private: bool updating = false; void updatePart(); bool needsUpdate() const; -}; \ No newline at end of file +}; diff --git a/apps/armoury/include/singlegearview.h b/apps/armoury/include/singlegearview.h index fd8a9d5..2c041b8 100644 --- a/apps/armoury/include/singlegearview.h +++ b/apps/armoury/include/singlegearview.h @@ -38,7 +38,7 @@ public Q_SLOTS: void setGear(const GearInfo &info); void setRace(Race race); - void setSubrace(Subrace subrace); + void setTribe(Tribe subrace); void setGender(Gender gender); void setLevelOfDetail(int lod); @@ -53,7 +53,7 @@ private: std::optional currentGear; Race currentRace = Race::Hyur; - Subrace currentSubrace = Subrace::Midlander; + Tribe currentTribe = Tribe::Midlander; Gender currentGender = Gender::Male; int currentLod = 0; @@ -64,4 +64,4 @@ private: bool fmvAvailable = false; GameData *data = nullptr; -}; \ No newline at end of file +}; diff --git a/apps/armoury/src/fullmodelviewer.cpp b/apps/armoury/src/fullmodelviewer.cpp index c0c3150..63d6ad9 100644 --- a/apps/armoury/src/fullmodelviewer.cpp +++ b/apps/armoury/src/fullmodelviewer.cpp @@ -48,7 +48,7 @@ FullModelViewer::FullModelViewer(GameData *data, FileCache &cache, QWidget *pare gearView->setRace(charDat.race); gearView->setGender(charDat.gender); - // gearView->setSubrace(charDat.subrace); + // gearView->setTribe(charDat.subrace); gearView->setFace(charDat.head); gearView->setHair(charDat.hair); updateBustScaling((float)charDat.bust / 100.0f); @@ -128,16 +128,16 @@ FullModelViewer::FullModelViewer(GameData *data, FileCache &cache, QWidget *pare subraceCombo = new QComboBox(); connect(subraceCombo, qOverload(&QComboBox::currentIndexChanged), [this](int index) { - gearView->setSubrace((Subrace)subraceCombo->itemData(index).toInt()); + gearView->setTribe((Tribe)subraceCombo->itemData(index).toInt()); }); controlLayout->addWidget(subraceCombo); connect(raceCombo, qOverload(&QComboBox::currentIndexChanged), [this](int index) { gearView->setRace((Race)raceCombo->itemData(index).toInt()); - updateSupportedSubraces(); + updateSupportedTribes(); }); - updateSupportedSubraces(); + updateSupportedTribes(); genderCombo = new QComboBox(); connect(genderCombo, qOverload(&QComboBox::currentIndexChanged), [this](int index) { @@ -259,7 +259,7 @@ void FullModelViewer::updateHeightScaling(float scale) for (uint32_t i = 0; i < boneData.num_bones; i++) { const std::string_view name{boneData.bones[i].name}; if (name == "n_root") { - auto racialScaling = physis_cmp_get_racial_scaling_parameters(cmp, gearView->currentRace, gearView->currentSubrace); + auto racialScaling = physis_cmp_get_racial_scaling_parameters(cmp, gearView->currentRace, gearView->currentTribe); const float minSize = gearView->currentGender == Gender::Male ? racialScaling.male_min_size : racialScaling.female_min_size; const float maxSize = gearView->currentGender == Gender::Male ? racialScaling.male_max_size : racialScaling.female_max_size; @@ -283,7 +283,7 @@ void FullModelViewer::updateBustScaling(float scale) for (uint32_t i = 0; i < boneData.num_bones; i++) { const std::string_view name{boneData.bones[i].name}; if (name == "j_mune_l" || name == "j_mune_r") { - auto racialScaling = physis_cmp_get_racial_scaling_parameters(cmp, gearView->currentRace, gearView->currentSubrace); + auto racialScaling = physis_cmp_get_racial_scaling_parameters(cmp, gearView->currentRace, gearView->currentTribe); const float rangeX = glm::mix(racialScaling.bust_min_x, racialScaling.bust_max_x, scale); const float rangeY = glm::mix(racialScaling.bust_min_y, racialScaling.bust_max_y, scale); @@ -306,10 +306,10 @@ void FullModelViewer::updateCharacterParameters() updateBustScaling(bustScale); } -void FullModelViewer::updateSupportedSubraces() +void FullModelViewer::updateSupportedTribes() { subraceCombo->clear(); - for (auto subrace : physis_get_supported_subraces(gearView->currentRace).subraces) { + for (auto subrace : physis_get_supported_tribes(gearView->currentRace).subraces) { subraceCombo->addItem(QLatin1String(magic_enum::enum_name(subrace).data()), (int)subrace); } } @@ -317,8 +317,8 @@ void FullModelViewer::updateSupportedSubraces() void FullModelViewer::updateRaceData() { m_boneEditor->load_pbd(gearView->part().pbd, - physis_get_race_code(Race::Hyur, Subrace::Midlander, gearView->currentGender), - physis_get_race_code(gearView->currentRace, gearView->currentSubrace, gearView->currentGender)); + physis_get_race_code(Race::Hyur, Tribe::Midlander, gearView->currentGender), + physis_get_race_code(gearView->currentRace, gearView->currentTribe, gearView->currentGender)); } QGroupBox *FullModelViewer::addFaceGroup() @@ -429,4 +429,4 @@ QGroupBox *FullModelViewer::addTailGroup() return tailGroup; } -#include "moc_fullmodelviewer.cpp" \ No newline at end of file +#include "moc_fullmodelviewer.cpp" diff --git a/apps/armoury/src/gearlistmodel.cpp b/apps/armoury/src/gearlistmodel.cpp index 772e50a..bf6a44b 100644 --- a/apps/armoury/src/gearlistmodel.cpp +++ b/apps/armoury/src/gearlistmodel.cpp @@ -175,7 +175,7 @@ void GearListModel::exdFinished(int index) auto exd = exdFuture->resultAt(index); for (unsigned int i = 0; i < exh->row_count; i++) { - const auto row = physis_exd_read_row(&exd, exh, i); // TODO: use all rows, free + const auto row = physis_exd_read_row(&exd, i); // TODO: use all rows, free auto primaryModel = row.row_data[0].column_data[47].u_int64._0; // auto secondaryModel = row.column_data[48].u_int64._0; @@ -221,4 +221,4 @@ void GearListModel::finished() endResetModel(); } -#include "moc_gearlistmodel.cpp" \ No newline at end of file +#include "moc_gearlistmodel.cpp" diff --git a/apps/armoury/src/gearview.cpp b/apps/armoury/src/gearview.cpp index 758a435..a34c1e8 100644 --- a/apps/armoury/src/gearview.cpp +++ b/apps/armoury/src/gearview.cpp @@ -60,12 +60,12 @@ GearView::GearView(GameData *data, FileCache &cache, QWidget *parent) }; } -std::vector> GearView::supportedRaces() const +std::vector> GearView::supportedRaces() const { - std::vector> races; + std::vector> races; for (const auto &gear : loadedGears) { for (const auto &[race, race_name] : magic_enum::enum_entries()) { - for (const auto subrace : physis_get_supported_subraces(race).subraces) { + for (const auto subrace : physis_get_supported_tribes(race).subraces) { auto equip_path = physis_build_equipment_path(gear.info.modelInfo.primaryID, race, subrace, currentGender, gear.info.slot); if (cache.fileExists(QLatin1String(equip_path))) @@ -82,7 +82,7 @@ std::vector GearView::supportedGenders() const std::vector genders; for (const auto &gear : loadedGears) { for (auto [gender, gender_name] : magic_enum::enum_entries()) { - auto equip_path = physis_build_equipment_path(gear.info.modelInfo.primaryID, currentRace, Subrace::Midlander, currentGender, gear.info.slot); + auto equip_path = physis_build_equipment_path(gear.info.modelInfo.primaryID, currentRace, Tribe::Midlander, currentGender, gear.info.slot); if (cache.fileExists(QLatin1String(equip_path))) genders.push_back(gender); @@ -137,9 +137,9 @@ void GearView::setRace(Race race) currentRace = race; - const auto supportedSubraces = physis_get_supported_subraces(race); - if (supportedSubraces.subraces[0] != currentSubrace && supportedSubraces.subraces[1] != currentSubrace) { - setSubrace(supportedSubraces.subraces[0]); + const auto supportedTribes = physis_get_supported_tribes(race); + if (supportedTribes.subraces[0] != currentTribe && supportedTribes.subraces[1] != currentTribe) { + setTribe(supportedTribes.subraces[0]); } if (race == Race::AuRa || race == Race::Miqote) { @@ -153,13 +153,13 @@ void GearView::setRace(Race race) Q_EMIT raceChanged(); } -void GearView::setSubrace(Subrace subrace) +void GearView::setTribe(Tribe subrace) { - if (currentSubrace == subrace) { + if (currentTribe == subrace) { return; } - currentSubrace = subrace; + currentTribe = subrace; // Hyur is the only race that has two different subraces if (currentRace == Race::Hyur) { @@ -262,9 +262,9 @@ void GearView::setTail(const int tailCode) void GearView::reloadRaceDeforms() { - qDebug() << "Loading race deform matrices for " << magic_enum::enum_name(currentRace).data() << magic_enum::enum_name(currentSubrace).data() + qDebug() << "Loading race deform matrices for " << magic_enum::enum_name(currentRace).data() << magic_enum::enum_name(currentTribe).data() << magic_enum::enum_name(currentGender).data(); - const int raceCode = physis_get_race_code(currentRace, currentSubrace, currentGender); + const int raceCode = physis_get_race_code(currentRace, currentTribe, currentGender); QString skelName = QStringLiteral("chara/human/c%1/skeleton/base/b0001/skl_c%1b0001.sklb").arg(raceCode, 4, 10, QLatin1Char{'0'}); std::string skelNameStd = skelName.toStdString(); @@ -294,27 +294,27 @@ void GearView::updatePart() if (gearDirty) { for (auto &gearAddition : queuedGearAdditions) { auto mdlPath = QLatin1String( - physis_build_equipment_path(gearAddition.info.modelInfo.primaryID, currentRace, currentSubrace, currentGender, gearAddition.info.slot)); + physis_build_equipment_path(gearAddition.info.modelInfo.primaryID, currentRace, currentTribe, currentGender, gearAddition.info.slot)); auto mdl_data = cache.lookupFile(mdlPath); // attempt to load the next best race // currently hardcoded to hyur midlander Race fallbackRace = currentRace; - Subrace fallbackSubrace = currentSubrace; + Tribe fallbackTribe = currentTribe; if (mdl_data.size == 0) { mdlPath = QLatin1String( - physis_build_equipment_path(gearAddition.info.modelInfo.primaryID, Race::Hyur, Subrace::Midlander, currentGender, gearAddition.info.slot)); + physis_build_equipment_path(gearAddition.info.modelInfo.primaryID, Race::Hyur, Tribe::Midlander, currentGender, gearAddition.info.slot)); mdl_data = cache.lookupFile(mdlPath); fallbackRace = Race::Hyur; - fallbackSubrace = Subrace::Midlander; + fallbackTribe = Tribe::Midlander; } if (fallbackRace != currentRace) { qDebug() << "Fell back to hyur race for" << mdlPath; } - if (fallbackSubrace != currentSubrace) { + if (fallbackTribe != currentTribe) { qDebug() << "Fell back to midlander subrace for" << mdlPath; } @@ -327,7 +327,7 @@ void GearView::updatePart() const std::string mtrl_path = gearAddition.info.getMtrlPath(material_name); const std::string skinmtrl_path = - physis_build_skin_material_path(physis_get_race_code(fallbackRace, fallbackSubrace, currentGender), 1, material_name); + physis_build_skin_material_path(physis_get_race_code(fallbackRace, fallbackTribe, currentGender), 1, material_name); if (cache.fileExists(QLatin1String(mtrl_path.c_str()))) { auto mat = physis_material_parse(cache.lookupFile(QLatin1String(mtrl_path.c_str()))); @@ -342,14 +342,14 @@ void GearView::updatePart() maxLod = std::max(mdl.num_lod, maxLod); - gearAddition.bodyId = physis_get_race_code(fallbackRace, fallbackSubrace, currentGender); + gearAddition.bodyId = physis_get_race_code(fallbackRace, fallbackTribe, currentGender); mdlPart->addModel(mdl, true, glm::vec3(), sanitizeMdlPath(mdlPath), materials, currentLod, - physis_get_race_code(currentRace, currentSubrace, currentGender), + physis_get_race_code(currentRace, currentTribe, currentGender), gearAddition.bodyId); gearAddition.mdl = mdl; gearAddition.path = mdlPath; @@ -379,7 +379,7 @@ void GearView::updatePart() } const auto loadBodyPart = [this, &sanitizeMdlPath](int index, CharacterCategory category, auto build_material_path_func) { - const auto mdlPath = QLatin1String(physis_build_character_path(category, index, currentRace, currentSubrace, currentGender)); + const auto mdlPath = QLatin1String(physis_build_character_path(category, index, currentRace, currentTribe, currentGender)); auto mdl_data = cache.lookupFile(mdlPath); if (mdl_data.size > 0) { @@ -389,7 +389,7 @@ void GearView::updatePart() for (uint32_t i = 0; i < mdl.num_material_names; i++) { const char *material_name = mdl.material_names[i]; const std::string skinmtrl_path = - build_material_path_func(physis_get_race_code(currentRace, currentSubrace, currentGender), index, material_name); + build_material_path_func(physis_get_race_code(currentRace, currentTribe, currentGender), index, material_name); if (cache.fileExists(QLatin1String(skinmtrl_path.c_str()))) { auto mat = physis_material_parse(cache.lookupFile(QLatin1String(skinmtrl_path.c_str()))); diff --git a/apps/armoury/src/singlegearview.cpp b/apps/armoury/src/singlegearview.cpp index 3532780..d1f69b6 100644 --- a/apps/armoury/src/singlegearview.cpp +++ b/apps/armoury/src/singlegearview.cpp @@ -59,7 +59,7 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent subraceCombo = new QComboBox(); subraceCombo->setWhatsThis(i18n("The subrace used in the gear model preview. Note that this only shows subraces that have unique models for this gear.")); connect(subraceCombo, qOverload(&QComboBox::currentIndexChanged), [this](int index) { - setSubrace(static_cast(subraceCombo->itemData(index).toInt())); + setTribe(static_cast(subraceCombo->itemData(index).toInt())); }); controlLayout->addWidget(subraceCombo); @@ -226,7 +226,7 @@ SingleGearView::SingleGearView(GameData *data, FileCache &cache, QWidget *parent gearView->setRace(currentRace); }); connect(this, &SingleGearView::subraceChanged, this, [this] { - gearView->setSubrace(currentSubrace); + gearView->setTribe(currentTribe); }); connect(this, &SingleGearView::genderChanged, this, [this] { gearView->setGender(currentGender); @@ -272,13 +272,13 @@ void SingleGearView::setRace(Race race) Q_EMIT raceChanged(); } -void SingleGearView::setSubrace(Subrace subrace) +void SingleGearView::setTribe(Tribe subrace) { - if (currentSubrace == subrace) { + if (currentTribe == subrace) { return; } - currentSubrace = subrace; + currentTribe = subrace; Q_EMIT subraceChanged(); } @@ -321,7 +321,7 @@ void SingleGearView::reloadGear() QSignalBlocker lodBlocker(lodCombo); const auto oldRace = static_cast(raceCombo->itemData(raceCombo->currentIndex()).toInt()); - const auto oldSubrace = static_cast(subraceCombo->itemData(subraceCombo->currentIndex()).toInt()); + const auto oldTribe = static_cast(subraceCombo->itemData(subraceCombo->currentIndex()).toInt()); const auto oldGender = static_cast(genderCombo->itemData(genderCombo->currentIndex()).toInt()); const auto oldLod = lodCombo->itemData(lodCombo->currentIndex()).toInt(); @@ -358,8 +358,8 @@ void SingleGearView::reloadGear() if (auto it = std::find_if(supportedRaces.begin(), supportedRaces.end(), - [oldSubrace](auto p) { - return std::get<1>(p) == oldSubrace; + [oldTribe](auto p) { + return std::get<1>(p) == oldTribe; }); it != supportedRaces.end()) { subraceCombo->setCurrentIndex(std::distance(supportedRaces.begin(), it)); @@ -441,4 +441,4 @@ QList SingleGearView::getLoadedMaterials() const return materialPaths; } -#include "moc_singlegearview.cpp" \ No newline at end of file +#include "moc_singlegearview.cpp" diff --git a/apps/mapeditor/src/maplistwidget.cpp b/apps/mapeditor/src/maplistwidget.cpp index dd9aed9..8dc81a3 100644 --- a/apps/mapeditor/src/maplistwidget.cpp +++ b/apps/mapeditor/src/maplistwidget.cpp @@ -44,26 +44,26 @@ MapListWidget::MapListWidget(GameData *data, QWidget *parent) auto territoryExd = physis_gamedata_read_excel_sheet(data, "TerritoryType", territoryExh, Language::None, 0); for (uint32_t i = 0; i < exh->row_count; i++) { - auto rows = physis_exd_read_row(&exd, exh, i); // TODO: free, use all rows + auto rows = physis_exd_read_row(&exd, i); // TODO: free, use all rows const char *id = rows.row_data[0].column_data[6].string._0; const uint16_t territoryTypeKey = rows.row_data[0].column_data[15].u_int16._0; if (territoryTypeKey > 0 && territoryTypeKey < territoryExh->row_count) { - auto territoryExdRow = physis_exd_read_row(&territoryExd, territoryExh, territoryTypeKey); // TODO: free, use all rows + auto territoryExdRow = physis_exd_read_row(&territoryExd, territoryTypeKey); // TODO: free, use all rows const char *bg = territoryExdRow.row_data[0].column_data[1].string._0; int placeRegionKey = territoryExdRow.row_data[0].column_data[3].u_int16._0; - auto regionExdRow = physis_exd_read_row(&nameExd, nameExh, placeRegionKey); // TODO: free, use all rows + auto regionExdRow = physis_exd_read_row(&nameExd, placeRegionKey); // TODO: free, use all rows const char *placeRegion = regionExdRow.row_data[0].column_data[0].string._0; int placeZoneKey = territoryExdRow.row_data[0].column_data[4].u_int16._0; - auto zoneExdRow = physis_exd_read_row(&nameExd, nameExh, placeRegionKey); // TODO: free, use all rows + auto zoneExdRow = physis_exd_read_row(&nameExd, placeRegionKey); // TODO: free, use all rows const char *placeZone = zoneExdRow.row_data[0].column_data[0].string._0; int placeNameKey = territoryExdRow.row_data[0].column_data[5].u_int16._0; - auto nameExdRow = physis_exd_read_row(&nameExd, nameExh, placeRegionKey); // TODO: free, use all rows + auto nameExdRow = physis_exd_read_row(&nameExd, placeRegionKey); // TODO: free, use all rows const char *placeName = nameExdRow.row_data[0].column_data[0].string._0; QStandardItem *item = new QStandardItem(); @@ -88,4 +88,4 @@ MapListWidget::MapListWidget(GameData *data, QWidget *parent) layout->addWidget(listWidget); } -#include "moc_maplistwidget.cpp" \ No newline at end of file +#include "moc_maplistwidget.cpp" diff --git a/apps/mateditor/src/materialview.cpp b/apps/mateditor/src/materialview.cpp index bca9cfb..73cd336 100644 --- a/apps/mateditor/src/materialview.cpp +++ b/apps/mateditor/src/materialview.cpp @@ -33,7 +33,7 @@ void MaterialView::addSphere(physis_Material material) { mdlPart->clear(); - const int raceCode = physis_get_race_code(Race::Hyur, Subrace::Midlander, Gender::Male); + const int raceCode = physis_get_race_code(Race::Hyur, Tribe::Midlander, Gender::Male); QString skelName = QStringLiteral("chara/human/c%1/skeleton/base/b0001/skl_c%1b0001.sklb").arg(raceCode, 4, 10, QLatin1Char{'0'}); std::string skelNameStd = skelName.toStdString(); diff --git a/apps/mdlviewer/src/mainwindow.cpp b/apps/mdlviewer/src/mainwindow.cpp index fb16762..4ec4491 100644 --- a/apps/mdlviewer/src/mainwindow.cpp +++ b/apps/mdlviewer/src/mainwindow.cpp @@ -36,7 +36,7 @@ MainWindow::MainWindow(GameData *data) part = new MDLPart(data, cache); part->minimumCameraDistance = 0.05f; - const int raceCode = physis_get_race_code(Race::Hyur, Subrace::Midlander, Gender::Male); + const int raceCode = physis_get_race_code(Race::Hyur, Tribe::Midlander, Gender::Male); QString skelName = QStringLiteral("chara/human/c%1/skeleton/base/b0001/skl_c%1b0001.sklb").arg(raceCode, 4, 10, QLatin1Char{'0'}); std::string skelNameStd = skelName.toStdString(); diff --git a/extern/libphysis b/extern/libphysis index 464fe20..9dd165e 160000 --- a/extern/libphysis +++ b/extern/libphysis @@ -1 +1 @@ -Subproject commit 464fe20833554e80cfb052b40393245faac6e5cb +Subproject commit 9dd165e47da97d81776068dd584a3a24fa656d10 diff --git a/parts/cmp/cmppart.cpp b/parts/cmp/cmppart.cpp index 202cf15..d37d210 100644 --- a/parts/cmp/cmppart.cpp +++ b/parts/cmp/cmppart.cpp @@ -14,17 +14,17 @@ // TODO: move this to physis struct RaceTree { Race baseRace; - std::vector subRaces; + std::vector subRaces; }; -const std::vector raceTree = {{Race::Hyur, {Subrace::Midlander, Subrace::Highlander}}, - {Race::Elezen, {Subrace::Wildwood, Subrace::Duskwight}}, - {Race::Miqote, {Subrace::Seeker, Subrace::Keeper}}, - {Race::Roegadyn, {Subrace::SeaWolf, Subrace::Hellion}}, - {Race::Lalafell, {Subrace::Plainsfolk, Subrace::Dunesfolk}}, - {Race::AuRa, {Subrace::Raen, Subrace::Xaela}}, - {Race::Hrothgar, {Subrace::Hellion, Subrace::Lost}}, - {Race::Viera, {Subrace::Rava, Subrace::Veena}}}; +const std::vector raceTree = {{Race::Hyur, {Tribe::Midlander, Tribe::Highlander}}, + {Race::Elezen, {Tribe::Wildwood, Tribe::Duskwight}}, + {Race::Miqote, {Tribe::Seeker, Tribe::Keeper}}, + {Race::Roegadyn, {Tribe::SeaWolf, Tribe::Hellion}}, + {Race::Lalafell, {Tribe::Plainsfolk, Tribe::Dunesfolk}}, + {Race::AuRa, {Tribe::Raen, Tribe::Xaela}}, + {Race::Hrothgar, {Tribe::Hellion, Tribe::Lost}}, + {Race::Viera, {Tribe::Rava, Tribe::Veena}}}; CmpPart::CmpPart(GameData *data, QWidget *parent) : QWidget(parent) @@ -112,10 +112,10 @@ void CmpPart::load(physis_Buffer file) bustMaxZ = new QDoubleSpinBox(); detailBoxLayout->addRow(i18n("Bust Max Z"), bustMaxZ); - loadRaceData(Race::Hyur, Subrace::Midlander); + loadRaceData(Race::Hyur, Tribe::Midlander); } -void CmpPart::loadRaceData(Race race, Subrace subrace) +void CmpPart::loadRaceData(Race race, Tribe subrace) { auto raceData = physis_cmp_get_racial_scaling_parameters(cmp, race, subrace); @@ -140,4 +140,4 @@ void CmpPart::loadRaceData(Race race, Subrace subrace) bustMaxZ->setValue(raceData.bust_max_z); } -#include "moc_cmppart.cpp" \ No newline at end of file +#include "moc_cmppart.cpp" diff --git a/parts/cmp/cmppart.h b/parts/cmp/cmppart.h index c9f6478..32dbf0a 100644 --- a/parts/cmp/cmppart.h +++ b/parts/cmp/cmppart.h @@ -13,14 +13,14 @@ class RaceTreeData : public QObject Q_OBJECT public: - RaceTreeData(Race race, Subrace subrace) + RaceTreeData(Race race, Tribe subrace) : race(race) , subrace(subrace) { } Race race; - Subrace subrace; + Tribe subrace; }; class CmpPart : public QWidget @@ -33,7 +33,7 @@ public: void load(physis_Buffer file); private: - void loadRaceData(Race race, Subrace subrace); + void loadRaceData(Race race, Tribe subrace); GameData *data = nullptr; physis_CMP cmp{}; @@ -59,4 +59,4 @@ private: QDoubleSpinBox *bustMaxZ = nullptr; QHBoxLayout *layout = nullptr; -}; \ No newline at end of file +}; diff --git a/parts/exd/exdpart.cpp b/parts/exd/exdpart.cpp index 4364016..d8736bf 100644 --- a/parts/exd/exdpart.cpp +++ b/parts/exd/exdpart.cpp @@ -148,7 +148,7 @@ void EXDPart::loadTables() } for (unsigned int j = 0; j < exh->row_count; j++) { - auto rows = physis_exd_read_row(&exd, exh, j); // TODO: free, use other rows + auto rows = physis_exd_read_row(&exd, j); // TODO: free, use other rows for (unsigned int z = 0; z < exd.column_count; z++) { auto columnData = rows.row_data[0].column_data[z]; @@ -260,4 +260,4 @@ std::pair EXDPart::getColumnData(physis_ColumnData &columnData) return {columnString, columnRow}; } -#include "moc_exdpart.cpp" \ No newline at end of file +#include "moc_exdpart.cpp"