diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 453e5d30..9e284eee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,7 +43,7 @@ jobs: - { name: 'msys2 mingw32', os: 'windows-latest', generator: 'Ninja', dx5: false, config: false, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw32', msys-env: 'mingw-w64-i686', shell: 'msys2 {0}' } - { name: 'msys2 mingw64', os: 'windows-latest', generator: 'Ninja', dx5: false, config: true, mingw: true, werror: true, clang-tidy: true, msystem: 'mingw64', msys-env: 'mingw-w64-x86_64', shell: 'msys2 {0}' } - { name: 'macOS', os: 'macos-latest', generator: 'Ninja', dx5: false, config: true, brew: true, werror: true, clang-tidy: false } - - { name: 'iOS', os: 'macos-15', generator: 'Xcode', dx5: false, config: false, brew: true, werror: true, clang-tidy: false, cmake-args: '-DCMAKE_SYSTEM_NAME=iOS' } + - { name: 'iOS', os: 'macos-15', generator: 'Xcode', dx5: false, config: false, brew: true, werror: true, clang-tidy: false, cmake-args: '-DCMAKE_SYSTEM_NAME=iOS', ios: true } - { name: 'Emscripten', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' } - { name: 'Nintendo 3DS', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: false, n3ds: true, werror: true, clang-tidy: false, container: 'devkitpro/devkitarm:latest', cmake-args: '-DCMAKE_TOOLCHAIN_FILE=/opt/devkitpro/cmake/3DS.cmake' } - { name: 'Xbox One', os: 'windows-latest', generator: 'Visual Studio 17 2022', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64', cmake-args: '-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0.26100.0', xbox-one: true} @@ -96,6 +96,12 @@ jobs: brew update brew install cmake ninja llvm qt6 echo "LLVM_ROOT=$(brew --prefix llvm)/bin" >> $GITHUB_ENV + + - name: Use latest Xcode + if: ${{ matrix.ios }} + uses: maxim-lobanov/setup-xcode@v1.6.0 + with: + xcode-version: latest-stable - name: Setup Emscripten uses: mymindstorm/setup-emsdk@master diff --git a/CONFIG/AboutDlg.cpp b/CONFIG/AboutDlg.cpp index a853ee52..651b382b 100644 --- a/CONFIG/AboutDlg.cpp +++ b/CONFIG/AboutDlg.cpp @@ -7,12 +7,9 @@ DECOMP_SIZE_ASSERT(CDialog, 0x60) DECOMP_SIZE_ASSERT(CAboutDialog, 0x60) -// FIXME: disable dialog resizing - // FUNCTION: CONFIG 0x00403c20 CAboutDialog::CAboutDialog() : QDialog() { m_ui = new Ui::AboutDialog; m_ui->setupUi(this); - layout()->setSizeConstraint(QLayout::SetFixedSize); } diff --git a/CONFIG/MainDlg.cpp b/CONFIG/MainDlg.cpp index a1a07cf9..73a85ab3 100644 --- a/CONFIG/MainDlg.cpp +++ b/CONFIG/MainDlg.cpp @@ -505,14 +505,15 @@ void CMainDialog::SelectDataPathDialog() QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ); - QDir data_dir = QDir(data_path); - - if (data_dir.exists()) { - currentConfigApp->m_cd_path = data_dir.absolutePath().toStdString(); - data_dir.cd(QString("DATA")); - data_dir.cd(QString("disk")); - currentConfigApp->m_base_path = data_dir.absolutePath().toStdString(); - m_modified = true; + if (!data_path.isEmpty()) { + QDir data_dir = QDir(data_path); + if (data_dir.exists()) { + currentConfigApp->m_cd_path = data_dir.absolutePath().toStdString(); + data_dir.cd(QString("DATA")); + data_dir.cd(QString("disk")); + currentConfigApp->m_base_path = data_dir.absolutePath().toStdString(); + m_modified = true; + } } UpdateInterface(); } @@ -527,11 +528,12 @@ void CMainDialog::SelectSavePathDialog() QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ); - QDir save_dir = QDir(save_path); - - if (save_dir.exists()) { - currentConfigApp->m_save_path = save_dir.absolutePath().toStdString(); - m_modified = true; + if (!save_path.isEmpty()) { + QDir save_dir = QDir(save_path); + if (save_dir.exists()) { + currentConfigApp->m_save_path = save_dir.absolutePath().toStdString(); + m_modified = true; + } } UpdateInterface(); } @@ -547,13 +549,11 @@ void CMainDialog::DataPathEdited() currentConfigApp->m_base_path = data_dir.absolutePath().toStdString(); m_modified = true; } - UpdateInterface(); } void CMainDialog::SavePathEdited() { - QDir save_dir = QDir(m_ui->savePath->text()); if (save_dir.exists()) { @@ -606,7 +606,7 @@ void CMainDialog::SelectTexturePathDialog() QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ); - if (data_path.exists(texture_path)) { + if (!texture_path.isEmpty() && data_path.exists(texture_path)) { texture_path = data_path.relativeFilePath(texture_path); texture_path.prepend(QDir::separator()); currentConfigApp->m_texture_path = texture_path.toStdString(); @@ -623,7 +623,7 @@ void CMainDialog::TexturePathEdited() if (texture_path.startsWith(QDir::separator())) { texture_path.remove(0, 1); } - if (data_path.exists(texture_path)) { + if (data_path.exists(data_path.absoluteFilePath(texture_path))) { texture_path = data_path.relativeFilePath(texture_path); texture_path.prepend(QDir::separator()); currentConfigApp->m_texture_path = texture_path.toStdString(); diff --git a/CONFIG/res/about.ui b/CONFIG/res/about.ui index a716ebc8..ce51ea2a 100644 --- a/CONFIG/res/about.ui +++ b/CONFIG/res/about.ui @@ -14,6 +14,9 @@ About Configure LEGO© Island + + QLayout::SizeConstraint::SetFixedSize + @@ -36,14 +39,14 @@ - Configure LEGO Island Version 1.0 + Configure LEGO Island Version 2.0 - Copyright © 1997 mindscape + Copyright © 2025 @@ -53,7 +56,7 @@ - QDialogButtonBox::Ok + QDialogButtonBox::StandardButton::Ok diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 9ac67f14..0d3eee28 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -1405,12 +1405,12 @@ SDL_AppResult IsleApp::ParseArguments(int argc, char** argv) consumed = 1; } else if (strcmp(argv[i], "--help") == 0) { - DisplayArgumentHelp(); + DisplayArgumentHelp(argv[0]); return SDL_APP_SUCCESS; } if (consumed <= 0) { SDL_Log("Invalid argument(s): %s", argv[i]); - DisplayArgumentHelp(); + DisplayArgumentHelp(argv[0]); return SDL_APP_FAILURE; } } @@ -1418,9 +1418,9 @@ SDL_AppResult IsleApp::ParseArguments(int argc, char** argv) return SDL_APP_CONTINUE; } -void IsleApp::DisplayArgumentHelp() +void IsleApp::DisplayArgumentHelp(const char* p_execName) { - SDL_Log("Usage: isle [options]"); + SDL_Log("Usage: %s [options]", p_execName); SDL_Log("Options:"); SDL_Log(" --ini Set custom path to .ini config"); #ifdef ISLE_DEBUG diff --git a/ISLE/isleapp.h b/ISLE/isleapp.h index 66e8e6e1..470a5a72 100644 --- a/ISLE/isleapp.h +++ b/ISLE/isleapp.h @@ -99,7 +99,7 @@ class IsleApp { const CursorBitmap* m_cursorCurrentBitmap; char* m_mediaPath; MxFloat m_cursorSensitivity; - void DisplayArgumentHelp(); + void DisplayArgumentHelp(const char* p_execName); char* m_iniPath; MxFloat m_maxLod; diff --git a/ISLE/isledebug.cpp b/ISLE/isledebug.cpp index 2eca3421..ab3433a5 100644 --- a/ISLE/isledebug.cpp +++ b/ISLE/isledebug.cpp @@ -68,10 +68,10 @@ class DebugViewer { static void InsideBuildingManager() { auto buildingManager = Lego()->GetBuildingManager(); - ImGui::Text("nextVariant: %d", buildingManager->m_nextVariant); + ImGui::Text("nextVariant: %u", buildingManager->m_nextVariant); ImGui::Text("m_boundariesDetermined: %d", buildingManager->m_boundariesDetermined); ImGui::Text("m_hideAfterAnimation: %d", buildingManager->m_hideAfterAnimation); - ImGui::Text("#Animated Entries", buildingManager->m_numEntries); + ImGui::Text("#Animated Entries: %d", buildingManager->m_numEntries); if (buildingManager->m_numEntries) { if (ImGui::BeginTable("Animated Entries", 6, ImGuiTableFlags_Borders)) { ImGui::TableSetupColumn("ROI Name"); diff --git a/packaging/ios/CMakeLists.txt b/packaging/ios/CMakeLists.txt index 418ad518..834b75d6 100644 --- a/packaging/ios/CMakeLists.txt +++ b/packaging/ios/CMakeLists.txt @@ -15,7 +15,7 @@ if(ISLE_BUILD_APP) "${CMAKE_CURRENT_BINARY_DIR}/isle/Info.plist" @ONLY ) - set(RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/isle/LaunchScreen.storyboard" "${CMAKE_CURRENT_SOURCE_DIR}/isle/Assets.xcassets") + set(RESOURCE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/isle/Assets.xcassets") target_sources(${ISLE_TARGET_NAME} PRIVATE ${RESOURCE_FILES}) set_source_files_properties(${RESOURCE_FILES} TARGET_DIRECTORY isle diff --git a/packaging/ios/isle/Info.plist.in b/packaging/ios/isle/Info.plist.in index 714324a3..c5d5a80b 100644 --- a/packaging/ios/isle/Info.plist.in +++ b/packaging/ios/isle/Info.plist.in @@ -27,7 +27,7 @@ CFBundleVersion @MACOSX_BUNDLE_BUNDLE_VERSION@ UILaunchStoryboardName - LaunchScreen + NSHighResolutionCapable CSResourcesFileMapped diff --git a/packaging/ios/isle/LaunchScreen.storyboard b/packaging/ios/isle/LaunchScreen.storyboard deleted file mode 100644 index ad167a8a..00000000 --- a/packaging/ios/isle/LaunchScreen.storyboard +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -