1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-05-01 08:27:45 +00:00

Update to latest libphysis

This commit is contained in:
Joshua Goins 2025-04-29 00:06:45 -04:00
parent bd39d5b1fa
commit 5f19a69e72
3 changed files with 13 additions and 5 deletions

View file

@ -20,11 +20,12 @@ FetchContent_MakeAvailable(Corrosion)
corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo.toml corrosion_import_crate(MANIFEST_PATH ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/Cargo.toml
NO_DEFAULT_FEATURES NO_DEFAULT_FEATURES
FEATURES game_install visual_data logging FEATURES game_install logging
CRATE_TYPES staticlib) # FIXME: split visual_data? we only need texture decompression CRATE_TYPES staticlib)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libphysis/logger EXCLUDE_FROM_ALL) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/libphysis/logger EXCLUDE_FROM_ALL)
target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public) target_include_directories(physis INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/libphysis/target/public)
target_compile_definitions(physis INTERFACE ENABLE_GAME_INSTALL)
# We should use the CMake module everywhere once distros update their packages # We should use the CMake module everywhere once distros update their packages
if (WIN32) if (WIN32)

2
external/libphysis vendored

@ -1 +1 @@
Subproject commit 8d68aeed9a8fc2d04ad258ee94e44001001f3b6e Subproject commit c4a101c339d485d53e4f609c78db5a034306e2de

View file

@ -98,8 +98,15 @@ void Profile::readGameData()
if (exh != nullptr) { if (exh != nullptr) {
const physis_EXD exd = physis_gamedata_read_excel_sheet(m_gameData, "ExVersion", exh, Language::English, 0); const physis_EXD exd = physis_gamedata_read_excel_sheet(m_gameData, "ExVersion", exh, Language::English, 0);
for (unsigned int i = 0; i < exd.row_count; i++) { // TODO: bad API, we should instead get a list of row ids from libphysis but that API doesn't exist yet.
m_expansionNames.push_back(QString::fromLatin1(exd.row_data[i].column_data[0].string._0)); for (unsigned int i = 1; i < exd.row_count + 1; i++) {
auto rows = physis_exd_read_row(&exd, i);
for (int j = 0; j < rows.row_count; j++) {
auto row = rows.row_data[j];
if (row.column_data != nullptr) {
m_expansionNames.push_back(QString::fromLatin1(row.column_data[0].string._0));
}
}
} }
physis_gamedata_free_sheet(exd); physis_gamedata_free_sheet(exd);