diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 97b338c8..26d7fe64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,15 +34,16 @@ jobs: fail-fast: false matrix: include: - - { name: 'Linux', os: 'ubuntu-latest', dx5: false, config: true, linux: true, werror: true, clang-tidy: true } - - { name: 'MSVC (x86)', os: 'windows-latest', dx5: true, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' } - - { name: 'MSVC (x64)', os: 'windows-latest', dx5: false, config: true, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' } - - { name: 'MSVC (arm64)', os: 'windows-latest', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' } - - { name: 'msys2 mingw32', os: 'windows-latest', 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', 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', dx5: false, config: true, brew: true, werror: true, clang-tidy: false } - - { name: 'Emscripten', os: 'ubuntu-latest', dx5: false, config: false, emsdk: true, werror: true, clang-tidy: false, cmake-wrapper: 'emcmake' } - - { name: 'Nintendo 3DS', os: 'ubuntu-latest', 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: 'Linux', os: 'ubuntu-latest', generator: 'Ninja', dx5: false, config: true, linux: true, werror: true, clang-tidy: true } + - { name: 'MSVC (x86)', os: 'windows-latest', generator: 'Ninja', dx5: true, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_x86' } + - { name: 'MSVC (x64)', os: 'windows-latest', generator: 'Ninja', dx5: false, config: true, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64' } + - { name: 'MSVC (arm64)', os: 'windows-latest', generator: 'Ninja', dx5: false, config: false, msvc: true, werror: false, clang-tidy: false, vc-arch: 'amd64_arm64' } + - { 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: '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} steps: - name: Setup vcvars if: ${{ !!matrix.msvc }} @@ -95,7 +96,7 @@ jobs: - name: Configure (CMake) run: | - ${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -GNinja \ + ${{ matrix.cmake-wrapper || '' }} cmake -S . -B build -G "${{ matrix.generator }}" \ ${{ matrix.cmake-args || '' }} \ -DCMAKE_BUILD_TYPE=Release \ -DISLE_USE_DX5=${{ !!matrix.dx5 }} \ @@ -106,7 +107,7 @@ jobs: -Werror=dev - name: Build (CMake) - run: cmake --build build --verbose + run: cmake --build build --verbose --config Release - name: Package (CPack) if: ${{ !matrix.n3ds }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 80af1fbf..dd5b2ae6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.25...4.0 FATAL_ERROR) project(isle LANGUAGES CXX C VERSION 0.1) +if (WINDOWS_STORE) + add_compile_definitions(WINDOWS_STORE) +endif() + if (EMSCRIPTEN) add_compile_options(-pthread) add_link_options(-sALLOW_MEMORY_GROWTH=1 -sMAXIMUM_MEMORY=2gb -sUSE_PTHREADS=1 -sPROXY_TO_PTHREAD=1 -sOFFSCREENCANVAS_SUPPORT=1 -sPTHREAD_POOL_SIZE_STRICT=0 -sFORCE_FILESYSTEM=1 -sWASMFS=1 -sEXIT_RUNTIME=1) @@ -38,7 +42,7 @@ option(ISLE_WERROR "Treat warnings as errors" OFF) option(ISLE_DEBUG "Enable imgui debug" ON) cmake_dependent_option(ISLE_USE_DX5 "Build with internal DirectX 5 SDK" "${NOT_MINGW}" "WIN32;CMAKE_SIZEOF_VOID_P EQUAL 4" OFF) cmake_dependent_option(ISLE_MINIWIN "Use miniwin" ON "NOT ISLE_USE_DX5" OFF) -cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "(MSVC OR ISLE_MINIWIN) AND (NOT PSP) AND (NOT NINTENDO_3DS)" OFF) +cmake_dependent_option(ISLE_BUILD_CONFIG "Build CONFIG.EXE application" ON "(MSVC OR ISLE_MINIWIN) AND (NOT PSP) AND (NOT NINTENDO_3DS) AND (NOT WINDOWS_STORE)" OFF) cmake_dependent_option(ISLE_COMPILE_SHADERS "Compile shaders" ON "SDL_SHADERCROSS_BIN;TARGET Python3::Interpreter" OFF) cmake_dependent_option(CMAKE_POSITION_INDEPENDENT_CODE "Build with -fPIC" ON "NOT PSP" OFF) option(ENABLE_CLANG_TIDY "Enable clang-tidy") @@ -57,48 +61,56 @@ message(STATUS "Compile shaders: ${ISLE_COMPILE_SHADERS}") add_library(Isle::iniparser INTERFACE IMPORTED) if (DOWNLOAD_DEPENDENCIES) - # FetchContent downloads and configures dependencies - include(FetchContent) - if (NOT PSP) - message(STATUS "Fetching SDL3 and iniparser. This might take a while...") - FetchContent_Declare( - SDL3 - GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git" - GIT_TAG "main" - EXCLUDE_FROM_ALL - ) - FetchContent_MakeAvailable(SDL3) - else() - find_package(SDL3 CONFIG REQUIRED) - endif() + message(STATUS "Fetching iniparser. This might take a while...") + include(FetchContent) + FetchContent_Declare( + iniparser + GIT_REPOSITORY "https://gitlab.com/iniparser/iniparser.git" + GIT_TAG "main" + EXCLUDE_FROM_ALL + ) + block() + set(BUILD_DOCS off) + set(BUILD_SHARED_LIBS off) + FetchContent_MakeAvailable(iniparser) + target_link_libraries(Isle::iniparser INTERFACE iniparser-static) + endblock() +else() + # find_package looks for already-installed system packages. + # Configure with `-DCMAKE_PREFIX_PATH="/path/to/package1;/path/to/package2"` + # to add search paths. + find_package(iniparser REQUIRED CONFIG COMPONENTS shared) + target_link_libraries(Isle::iniparser INTERFACE iniparser-shared) +endif() +if (DOWNLOAD_DEPENDENCIES AND NOT PSP) + message(STATUS "Fetching SDL3. This might take a while...") + include(FetchContent) + if (WINDOWS_STORE) FetchContent_Declare( - iniparser - GIT_REPOSITORY "https://gitlab.com/iniparser/iniparser.git" + SDL3 + GIT_REPOSITORY "https://github.com/Helloyunho/SDL3-uwp.git" + GIT_TAG "main" + EXCLUDE_FROM_ALL + ) + else() + FetchContent_Declare( + SDL3 + GIT_REPOSITORY "https://github.com/libsdl-org/SDL.git" GIT_TAG "main" EXCLUDE_FROM_ALL ) - block() - set(BUILD_DOCS off) - set(BUILD_SHARED_LIBS off) - FetchContent_MakeAvailable(iniparser) - target_link_libraries(Isle::iniparser INTERFACE iniparser-static) - endblock() + endif() + FetchContent_MakeAvailable(SDL3) else() - # find_package looks for already-installed system packages. - # Configure with `-DCMAKE_PREFIX_PATH="/path/to/package1;/path/to/package2"` - # to add search paths. - find_package(SDL3 CONFIG REQUIRED) - - find_package(iniparser REQUIRED CONFIG COMPONENTS shared) - target_link_libraries(Isle::iniparser INTERFACE iniparser-shared) + find_package(SDL3 CONFIG REQUIRED) endif() set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if (ENABLE_CLANG_TIDY) - find_program(CLANG_TIDY_BIN NAMES "clang-tidy" ENV "LLVM_ROOT" REQUIRED) - set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_BIN}") - set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_BIN}") + find_program(CLANG_TIDY_BIN NAMES "clang-tidy" ENV "LLVM_ROOT" REQUIRED) + set(CMAKE_C_CLANG_TIDY "${CLANG_TIDY_BIN}") + set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_BIN}") endif() if (ISLE_ASAN) @@ -116,26 +128,26 @@ add_subdirectory(miniwin EXCLUDE_FROM_ALL) set(isle_targets) function(add_cxx_warning WARNING) - if (ISLE_WERROR) - set(compiler_option "-Werror=${WARNING}") - else() - set(compiler_option "-W${WARNING}") - endif() - string(MAKE_C_IDENTIFIER "COMPILER_SUPPORTS${compiler_option}" varname) + if (ISLE_WERROR) + set(compiler_option "-Werror=${WARNING}") + else() + set(compiler_option "-W${WARNING}") + endif() + string(MAKE_C_IDENTIFIER "COMPILER_SUPPORTS${compiler_option}" varname) - cmake_push_check_state(RESET) - set(CMAKE_REQUIRED_FLAGS "${compiler_option} ") - if (MSVC) - string(APPEND CMAKE_REQUIRED_FLAGS "/WX") - else() - string(APPEND CMAKE_REQUIRED_FLAGS "-Werror") - endif() - check_cxx_source_compiles("int main() { return 0; }" ${varname}) - cmake_pop_check_state() + cmake_push_check_state(RESET) + set(CMAKE_REQUIRED_FLAGS "${compiler_option} ") + if (MSVC) + string(APPEND CMAKE_REQUIRED_FLAGS "/WX") + else() + string(APPEND CMAKE_REQUIRED_FLAGS "-Werror") + endif() + check_cxx_source_compiles("int main() { return 0; }" ${varname}) + cmake_pop_check_state() - if (${varname}) - add_compile_options(${compiler_option}) - endif() + if (${varname}) + add_compile_options(${compiler_option}) + endif() endfunction() add_subdirectory(3rdparty EXCLUDE_FROM_ALL SYSTEM) @@ -545,6 +557,11 @@ if (ISLE_BUILD_APP) ISLE/3ds/config.cpp ) endif() + if(WINDOWS_STORE) + target_sources(isle PRIVATE + ISLE/xbox_one_series/config.cpp + ) + endif() if(Python3_FOUND) if(NOT DEFINED PYTHON_PIL_AVAILABLE) execute_process( @@ -625,6 +642,12 @@ if (MSVC) if (TARGET isle-config) target_compile_definitions(isle-config PRIVATE "_CRT_SECURE_NO_WARNINGS") endif() + if (TARGET iniparser-static) + target_compile_definitions(iniparser-static PRIVATE "_CRT_SECURE_NO_WARNINGS") + endif() + if (TARGET libsmacker) + target_compile_definitions(libsmacker PRIVATE "_CRT_SECURE_NO_WARNINGS") + endif() endif() # Visual Studio 2017 version 15.7 needs "/Zc:__cplusplus" for __cplusplus if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "19.14.26428") @@ -684,14 +707,20 @@ endif() string(REPLACE ";" "-" ISLE_CPUS_STRING "${ISLE_CPUS}") string(TOLOWER "${ISLE_CPUS_STRING}" ISLE_CPUS_STRING) -set(ISLE_PACKAGE_NAME "${CMAKE_SYSTEM_NAME}-${ISLE_CPUS_STRING}" CACHE STRING "Platform name of the package") +if (WINDOWS_STORE) + set(ISLE_PACKAGE_NAME "Xbox_One_Series_XS-${ISLE_CPUS_STRING}" CACHE STRING "Platform name of the package") +else() + set(ISLE_PACKAGE_NAME "${CMAKE_SYSTEM_NAME}-${ISLE_CPUS_STRING}" CACHE STRING "Platform name of the package") +endif() if(BUILD_SHARED_LIBS) list(APPEND install_extra_targets lego1) endif() -install(TARGETS isle ${install_extra_targets} - RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -) +if (NOT (NINTENDO_3DS OR WINDOWS_STORE)) + install(TARGETS isle ${install_extra_targets} + RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" + LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" + ) +endif() if (ISLE_BUILD_CONFIG) if(WIN32) find_program(WINDEPLOYQT_EXECUTABLE windeployqt) @@ -739,6 +768,15 @@ if(NINTENDO_3DS) ctr_create_3dsx(isle SMDH isle.smdh) install(FILES "$/isle.3dsx" DESTINATION "${CMAKE_INSTALL_BINDIR}") endif() +if(WINDOWS_STORE) + install( + DIRECTORY + "${CMAKE_BINARY_DIR}/AppPackages/isle/" + DESTINATION "${CMAKE_INSTALL_BINDIR}" + FILES_MATCHING PATTERN "*/Dependencies/x64/Microsoft.VCLibs.x64*.14.00.appx" + PATTERN "*/*.msix" + PATTERN "*/*.msixbundle") +endif() if(MSVC) set(CPACK_GENERATOR ZIP) elseif(PSP) diff --git a/ISLE/3ds/config.cpp b/ISLE/3ds/config.cpp index e70ec4dd..88318565 100644 --- a/ISLE/3ds/config.cpp +++ b/ISLE/3ds/config.cpp @@ -16,7 +16,4 @@ void N3DS_SetupDefaultConfigOverrides(dictionary* p_dictionary) // TODO: Save path: can we use libctru FS save data functions? Would be neat, especially for CIA install // Extra / at the end causes some issues iniparser_set(p_dictionary, "isle:savepath", "sdmc:/3ds/isle"); - - // Use e_noAnimation/cut transition - iniparser_set(p_dictionary, "isle:Transition Type", "7"); } diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 5d9c1aa4..a03eab72 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -58,6 +58,10 @@ #include "3ds/config.h" #endif +#ifdef WINDOWS_STORE +#include "xbox_one_series/config.h" +#endif + #ifdef PSP #include #endif @@ -96,8 +100,13 @@ MxS32 g_reqEnableRMDevice = FALSE; MxFloat g_lastJoystickMouseX = 0; MxFloat g_lastJoystickMouseY = 0; -MxFloat g_lastMouseX = 0; -MxFloat g_lastMouseY = 0; +MxFloat g_lastMouseX = 320; +MxFloat g_lastMouseY = 240; + +bool g_dpadUp = false; +bool g_dpadDown = false; +bool g_dpadLeft = false; +bool g_dpadRight = false; // STRING: ISLE 0x4101dc #define WINDOW_TITLE "LEGO®" @@ -400,11 +409,6 @@ SDL_AppResult SDL_AppIterate(void* appstate) return SDL_APP_CONTINUE; } -static bool dpadUp = false; -static bool dpadDown = false; -static bool dpadLeft = false; -static bool dpadRight = false; - SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) { if (!g_isle) { @@ -481,16 +485,16 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) case SDL_EVENT_GAMEPAD_BUTTON_DOWN: { switch (event->gbutton.button) { case SDL_GAMEPAD_BUTTON_DPAD_UP: - dpadUp = true; + g_dpadUp = true; break; case SDL_GAMEPAD_BUTTON_DPAD_DOWN: - dpadDown = true; + g_dpadDown = true; break; case SDL_GAMEPAD_BUTTON_DPAD_LEFT: - dpadLeft = true; + g_dpadLeft = true; break; case SDL_GAMEPAD_BUTTON_DPAD_RIGHT: - dpadRight = true; + g_dpadRight = true; break; case SDL_GAMEPAD_BUTTON_EAST: g_mousedown = TRUE; @@ -523,16 +527,16 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) case SDL_EVENT_GAMEPAD_BUTTON_UP: { switch (event->gbutton.button) { case SDL_GAMEPAD_BUTTON_DPAD_UP: - dpadUp = false; + g_dpadUp = false; break; case SDL_GAMEPAD_BUTTON_DPAD_DOWN: - dpadDown = false; + g_dpadDown = false; break; case SDL_GAMEPAD_BUTTON_DPAD_LEFT: - dpadLeft = false; + g_dpadLeft = false; break; case SDL_GAMEPAD_BUTTON_DPAD_RIGHT: - dpadRight = false; + g_dpadRight = false; break; case SDL_GAMEPAD_BUTTON_EAST: g_mousedown = FALSE; @@ -562,7 +566,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) g_lastJoystickMouseY = ((MxFloat) axisValue) / SDL_JOYSTICK_AXIS_MAX * g_isle->GetCursorSensitivity(); } else if (event->gaxis.axis == SDL_GAMEPAD_AXIS_RIGHT_TRIGGER) { - if (axisValue != 0) { + if (axisValue != 0 && !g_mousedown) { g_mousedown = TRUE; if (InputManager()) { @@ -575,7 +579,7 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) ); } } - else { + else if (axisValue == 0 && g_mousedown) { g_mousedown = FALSE; if (InputManager()) { @@ -809,7 +813,7 @@ MxResult IsleApp::SetupWindow() SDL_SetNumberProperty(props, SDL_PROP_WINDOW_CREATE_HEIGHT_NUMBER, g_targetHeight); SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_FULLSCREEN_BOOLEAN, m_fullScreen); SDL_SetStringProperty(props, SDL_PROP_WINDOW_CREATE_TITLE_STRING, WINDOW_TITLE); -#if defined(MINIWIN) && !defined(__3DS__) +#if defined(MINIWIN) && !defined(__3DS__) && !defined(WINDOWS_STORE) SDL_SetBooleanProperty(props, SDL_PROP_WINDOW_CREATE_OPENGL_BOOLEAN, true); SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); #ifndef __PSP__ @@ -992,6 +996,9 @@ bool IsleApp::LoadConfig() #ifdef __3DS__ N3DS_SetupDefaultConfigOverrides(dict); +#endif +#ifdef WINDOWS_STORE + XBONE_SetupDefaultConfigOverrides(dict); #endif iniparser_dump_ini(dict, iniFP); SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION, "New config written at '%s'", iniConfig); @@ -1347,24 +1354,22 @@ IDirect3DRMMiniwinDevice* GetD3DRMMiniwinDevice() return d3drmMiniwinDev; } -const float DPAD_MOUSE_SPEED = 3.0f; - void IsleApp::MoveVirtualMouseViaJoystick() { float dpadX = 0.0f; float dpadY = 0.0f; - if (dpadLeft) { - dpadX -= DPAD_MOUSE_SPEED; + if (g_dpadLeft) { + dpadX -= m_cursorSensitivity; } - if (dpadRight) { - dpadX += DPAD_MOUSE_SPEED; + if (g_dpadRight) { + dpadX += m_cursorSensitivity; } - if (dpadUp) { - dpadY -= DPAD_MOUSE_SPEED; + if (g_dpadUp) { + dpadY -= m_cursorSensitivity; } - if (dpadDown) { - dpadY += DPAD_MOUSE_SPEED; + if (g_dpadDown) { + dpadY += m_cursorSensitivity; } // Use joystick axis if non-zero, else fall back to dpad diff --git a/ISLE/xbox_one_series/config.cpp b/ISLE/xbox_one_series/config.cpp new file mode 100644 index 00000000..72ea32af --- /dev/null +++ b/ISLE/xbox_one_series/config.cpp @@ -0,0 +1,18 @@ +#include "config.h" + +#include +#include + +void XBONE_SetupDefaultConfigOverrides(dictionary* p_dictionary) +{ + SDL_Log("Overriding default config for Xbox One/Series"); + + // Use DevelopmentFiles path for disk and cd paths + // It's good to use that path since user can easily + // connect through SMB and copy the files + iniparser_set(p_dictionary, "isle:diskpath", "D:\\DevelopmentFiles\\isle\\"); + iniparser_set(p_dictionary, "isle:cdpath", "D:\\DevelopmentFiles\\isle\\"); + + // Enable cursor by default + iniparser_set(p_dictionary, "isle:Draw Cursor", "true"); +} diff --git a/ISLE/xbox_one_series/config.h b/ISLE/xbox_one_series/config.h new file mode 100644 index 00000000..bdfcb010 --- /dev/null +++ b/ISLE/xbox_one_series/config.h @@ -0,0 +1,8 @@ +#ifndef XBOX_ONE_SERIES_CONFIG_H +#define XBOX_ONE_SERIES_CONFIG_H + +#include "dictionary.h" + +void XBONE_SetupDefaultConfigOverrides(dictionary* p_dictionary); + +#endif // XBOX_ONE_SERIES_CONFIG_H diff --git a/LEGO1/lego/legoomni/include/legocontrolmanager.h b/LEGO1/lego/legoomni/include/legocontrolmanager.h index 828a1f6e..f962ee0c 100644 --- a/LEGO1/lego/legoomni/include/legocontrolmanager.h +++ b/LEGO1/lego/legoomni/include/legocontrolmanager.h @@ -66,27 +66,33 @@ class LegoControlManager : public MxCore { return !strcmp(p_name, LegoControlManager::ClassName()) || MxCore::IsA(p_name); } - void FUN_10028df0(MxPresenterList* p_presenterList); + void SetPresenterList(MxPresenterList* p_presenterList); void Register(MxCore* p_listener); void Unregister(MxCore* p_listener); - MxBool FUN_10029210(LegoEventNotificationParam& p_param, MxPresenter* p_presenter); - void FUN_100293c0(MxU32 p_objectId, const char* p_atom, MxS16 p_unk0x4e); - MxControlPresenter* FUN_100294e0(MxS32 p_x, MxS32 p_y); - MxBool FUN_10029630(); - MxBool FUN_10029750(); - void FUN_100292e0(); + MxBool HandleButtonDown(LegoEventNotificationParam& p_param, MxPresenter* p_presenter); + void UpdateEnabledChild(MxU32 p_objectId, const char* p_atom, MxS16 p_enabledChild); + MxControlPresenter* GetControlAt(MxS32 p_x, MxS32 p_y); + MxBool HandleButtonDown(); + MxBool HandleButtonUp(); + void Notify(); - undefined4 GetUnknown0x0c() { return m_unk0x0c; } - undefined GetUnknown0x10() { return m_unk0x10; } + MxU32 HandleUpNextTickle() { return m_handleUpNextTickle; } + MxBool IsSecondButtonDown() { return m_secondButtonDown; } // SYNTHETIC: LEGO1 0x10028d40 // LegoControlManager::`scalar deleting destructor' private: - undefined4 m_unk0x08; // 0x08 - undefined4 m_unk0x0c; // 0x0c - MxBool m_unk0x10; // 0x10 - MxPresenter* m_unk0x14; // 0x14 + enum { + e_idle = 0, + e_waitNextTickle = 1, + e_tickled = 2, + }; + + MxU32 m_buttonDownState; // 0x08 + MxU32 m_handleUpNextTickle; // 0x0c + MxBool m_secondButtonDown; // 0x10 + MxPresenter* m_handledPresenter; // 0x14 LegoControlManagerNotificationParam m_event; // 0x18 MxPresenterList* m_presenterList; // 0x44 LegoNotifyList m_notifyList; // 0x48 diff --git a/LEGO1/lego/legoomni/include/legoinputmanager.h b/LEGO1/lego/legoomni/include/legoinputmanager.h index ece1cbd1..202f8a55 100644 --- a/LEGO1/lego/legoomni/include/legoinputmanager.h +++ b/LEGO1/lego/legoomni/include/legoinputmanager.h @@ -22,8 +22,8 @@ class LegoCameraController; class LegoControlManager; class LegoWorld; -extern MxS32 g_unk0x100f31b0; -extern const char* g_unk0x100f31b4; +extern MxS32 g_clickedObjectId; +extern const char* g_clickedAtom; // VTABLE: LEGO1 0x100d87b8 // class MxCollection diff --git a/LEGO1/lego/legoomni/include/legomodelpresenter.h b/LEGO1/lego/legoomni/include/legomodelpresenter.h index 075ba3be..950bdb7e 100644 --- a/LEGO1/lego/legoomni/include/legomodelpresenter.h +++ b/LEGO1/lego/legoomni/include/legomodelpresenter.h @@ -47,7 +47,7 @@ class LegoModelPresenter : public MxVideoPresenter { void ReadyTickle() override; // vtable+0x18 void ParseExtra() override; // vtable+0x30 - MxResult FUN_1007ff70(MxDSChunk& p_chunk, LegoEntity* p_entity, MxBool p_roiVisible, LegoWorld* p_world); + MxResult CreateROI(MxDSChunk& p_chunk, LegoEntity* p_entity, MxBool p_roiVisible, LegoWorld* p_world); void Reset() { diff --git a/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp index 27086eb3..b66b26e4 100644 --- a/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp @@ -271,8 +271,15 @@ void MxTransitionManager::DissolveTransition() // FUNCTION: LEGO1 0x1004bed0 void MxTransitionManager::MosaicTransition() { + static LPDIRECTDRAWSURFACE g_transitionSurface = nullptr; + static MxU32 g_colors[64][48]; + if (m_animationTimer == 16) { m_animationTimer = 0; + if (g_transitionSurface) { + g_transitionSurface->Release(); + g_transitionSurface = nullptr; + } EndTransition(TRUE); return; } @@ -297,6 +304,84 @@ void MxTransitionManager::MosaicTransition() for (i = 0; i < 48; i++) { m_randomShift[i] = SDL_rand(64); } + + DDSURFACEDESC srcDesc = {}; + srcDesc.dwSize = sizeof(srcDesc); + HRESULT lockRes = m_ddSurface->Lock(NULL, &srcDesc, DDLOCK_WAIT | DDLOCK_READONLY, NULL); + if (lockRes == DDERR_SURFACELOST) { + m_ddSurface->Restore(); + lockRes = m_ddSurface->Lock(NULL, &srcDesc, DDLOCK_WAIT | DDLOCK_READONLY, NULL); + } + + if (lockRes != DD_OK) { + return; + } + + MxS32 bytesPerPixel = srcDesc.ddpfPixelFormat.dwRGBBitCount / 8; + + for (MxS32 col = 0; col < 64; col++) { + for (MxS32 row = 0; row < 48; row++) { + MxS32 xBlock = (m_randomShift[row] + col) % 64; + MxS32 y = row * 10; + MxS32 x = xBlock * 10; + + MxU8* pixelPtr = (MxU8*) srcDesc.lpSurface + y * srcDesc.lPitch + x * bytesPerPixel; + + MxU32 pixel; + switch (bytesPerPixel) { + case 1: + pixel = *pixelPtr; + break; + case 2: + pixel = *(MxU16*) pixelPtr; + break; + default: + pixel = *(MxU32*) pixelPtr; + break; + } + + g_colors[col][row] = pixel; + } + } + + m_ddSurface->Unlock(srcDesc.lpSurface); + + DDSURFACEDESC mainDesc = {}; + mainDesc.dwSize = sizeof(mainDesc); + if (m_ddSurface->GetSurfaceDesc(&mainDesc) != DD_OK) { + return; + } + + DDSURFACEDESC tempDesc = {}; + tempDesc.dwSize = sizeof(tempDesc); + tempDesc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS; + tempDesc.dwWidth = 64; + tempDesc.dwHeight = 48; + tempDesc.ddpfPixelFormat = mainDesc.ddpfPixelFormat; + tempDesc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; + + if (MVideoManager()->GetDirectDraw()->CreateSurface(&tempDesc, &g_transitionSurface, nullptr) != DD_OK) { + return; + } + + DWORD fillColor = 0x00000000; + switch (mainDesc.ddpfPixelFormat.dwRGBBitCount) { + case 8: + fillColor = 0x10; + break; + case 16: + fillColor = RGB555_CREATE(0x1f, 0, 0x1f); + break; + } + + DDBLTFX bltFx = {}; + bltFx.dwSize = sizeof(bltFx); + bltFx.dwFillColor = fillColor; + g_transitionSurface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltFx); + + DDCOLORKEY key = {}; + key.dwColorSpaceLowValue = key.dwColorSpaceHighValue = fillColor; + g_transitionSurface->SetColorKey(DDCKEY_SRCBLT, &key); } // Run one tick of the animation @@ -304,15 +389,18 @@ void MxTransitionManager::MosaicTransition() memset(&ddsd, 0, sizeof(ddsd)); ddsd.dwSize = sizeof(ddsd); - HRESULT res = m_ddSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL); + HRESULT res = g_transitionSurface->Lock(NULL, &ddsd, DDLOCK_WAIT | DDLOCK_WRITEONLY, NULL); if (res == DDERR_SURFACELOST) { - m_ddSurface->Restore(); - res = m_ddSurface->Lock(NULL, &ddsd, DDLOCK_WAIT, NULL); + g_transitionSurface->Restore(); + res = g_transitionSurface->Lock(NULL, &ddsd, DDLOCK_WAIT | DDLOCK_WRITEONLY, NULL); } if (res == DD_OK) { SubmitCopyRect(&ddsd); + // Combine xShift with this value to target the correct location in the buffer. + MxS32 bytesPerPixel = ddsd.ddpfPixelFormat.dwRGBBitCount / 8; + for (MxS32 col = 0; col < 64; col++) { // Select 4 columns on each tick if (m_animationTimer * 4 > m_columnOrder[col]) { @@ -324,69 +412,29 @@ void MxTransitionManager::MosaicTransition() } for (MxS32 row = 0; row < 48; row++) { - // To do the mosaic effect, we subdivide the 640x480 surface into - // 10x10 pixel blocks. At the chosen block, we sample the top-leftmost - // color and set the other 99 pixels to that value. + MxS32 x = (m_randomShift[row] + col) % 64; + MxU8* dest = (MxU8*) ddsd.lpSurface + row * ddsd.lPitch + x * bytesPerPixel; - // First, get the offset of the 10x10 block that we will sample for this row. - MxS32 xShift = 10 * ((m_randomShift[row] + col) % 64); - - // Combine xShift with this value to target the correct location in the buffer. - MxS32 bytesPerPixel = ddsd.ddpfPixelFormat.dwRGBBitCount / 8; - - // Seek to the sample position. - MxU8* source = (MxU8*) ddsd.lpSurface + 10 * row * ddsd.lPitch + bytesPerPixel * xShift; - - // Sample byte or word depending on display mode. - MxU32 sample; + MxU32 source = g_colors[col][row]; switch (bytesPerPixel) { case 1: - sample = *source; + *dest = (MxU8) source; break; case 2: - sample = *(MxU16*) source; + *((MxU16*) dest) = (MxU16) source; break; default: - sample = *(MxU32*) source; + *((MxU32*) dest) = source; break; } - - // For each of the 10 rows in the 10x10 square: - for (MxS32 k = 10 * row; k < 10 * row + 10; k++) { - void* pos = (MxU8*) ddsd.lpSurface + k * ddsd.lPitch + bytesPerPixel * xShift; - - switch (bytesPerPixel) { - case 1: { - // Optimization: If the pixel is only one byte, we can use memset - memset(pos, sample, 10); - break; - } - case 2: { - MxU16* p = (MxU16*) pos; - for (MxS32 tt = 0; tt < 10; tt++) { - p[tt] = (MxU16) sample; - } - break; - } - default: { - MxU32* p = (MxU32*) pos; - for (MxS32 tt = 0; tt < 10; tt++) { - p[tt] = (MxU32) sample; - } - break; - } - } - } } } SetupCopyRect(&ddsd); - m_ddSurface->Unlock(ddsd.lpSurface); + g_transitionSurface->Unlock(ddsd.lpSurface); - if (VideoManager()->GetVideoParam().Flags().GetFlipSurfaces()) { - LPDIRECTDRAWSURFACE surf = VideoManager()->GetDisplaySurface()->GetDirectDrawSurface1(); - surf->BltFast(0, 0, m_ddSurface, &g_fullScreenRect, DDBLTFAST_WAIT); - } + RECT srcRect = {0, 0, 64, 48}; + m_ddSurface->Blt(&g_fullScreenRect, g_transitionSurface, &srcRect, DDBLT_WAIT | DDBLT_KEYSRC, NULL); m_animationTimer++; } diff --git a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp index dc355be7..7851a52a 100644 --- a/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp +++ b/LEGO1/lego/legoomni/src/control/legocontrolmanager.cpp @@ -17,10 +17,10 @@ DECOMP_SIZE_ASSERT(LegoEventNotificationParam, 0x20) LegoControlManager::LegoControlManager() { m_presenterList = NULL; - m_unk0x08 = 0; - m_unk0x0c = 0; - m_unk0x10 = FALSE; - m_unk0x14 = NULL; + m_buttonDownState = e_idle; + m_handleUpNextTickle = 0; + m_secondButtonDown = FALSE; + m_handledPresenter = NULL; TickleManager()->RegisterClient(this, 10); } @@ -31,11 +31,11 @@ LegoControlManager::~LegoControlManager() } // FUNCTION: LEGO1 0x10028df0 -void LegoControlManager::FUN_10028df0(MxPresenterList* p_presenterList) +void LegoControlManager::SetPresenterList(MxPresenterList* p_presenterList) { m_presenterList = p_presenterList; - g_unk0x100f31b0 = -1; - g_unk0x100f31b4 = NULL; + g_clickedObjectId = -1; + g_clickedAtom = NULL; } // FUNCTION: LEGO1 0x10028e10 @@ -56,10 +56,10 @@ void LegoControlManager::Unregister(MxCore* p_listener) } // FUNCTION: LEGO1 0x10029210 -MxBool LegoControlManager::FUN_10029210(LegoEventNotificationParam& p_param, MxPresenter* p_presenter) +MxBool LegoControlManager::HandleButtonDown(LegoEventNotificationParam& p_param, MxPresenter* p_presenter) { if (m_presenterList != NULL && m_presenterList->GetNumElements() != 0) { - m_unk0x14 = p_presenter; + m_handledPresenter = p_presenter; if (p_param.GetNotification() == c_notificationButtonUp || p_param.GetNotification() == c_notificationButtonDown) { @@ -71,28 +71,28 @@ MxBool LegoControlManager::FUN_10029210(LegoEventNotificationParam& p_param, MxP m_event.SetKey(p_param.GetKey()); if (p_param.GetNotification() == c_notificationButtonUp) { - if (m_unk0x10 == TRUE) { - m_unk0x10 = FALSE; + if (m_secondButtonDown == TRUE) { + m_secondButtonDown = FALSE; return TRUE; } - if (g_unk0x100f31b0 != -1 && g_unk0x100f31b4 != NULL) { - if (m_unk0x08 == 2) { - return FUN_10029750(); + if (g_clickedObjectId != -1 && g_clickedAtom != NULL) { + if (m_buttonDownState == e_tickled) { + return HandleButtonUp(); } else { - m_unk0x0c = 1; + m_handleUpNextTickle = 1; return TRUE; } } } else if (p_param.GetNotification() == c_notificationButtonDown) { - if (m_unk0x0c == 1) { - m_unk0x10 = TRUE; + if (m_handleUpNextTickle == 1) { + m_secondButtonDown = TRUE; return TRUE; } else { - return FUN_10029630(); + return HandleButtonDown(); } } } @@ -100,15 +100,15 @@ MxBool LegoControlManager::FUN_10029210(LegoEventNotificationParam& p_param, MxP return FALSE; } else { - g_unk0x100f31b0 = -1; - g_unk0x100f31b4 = NULL; + g_clickedObjectId = -1; + g_clickedAtom = NULL; return FALSE; } } // FUNCTION: LEGO1 0x100292e0 -void LegoControlManager::FUN_100292e0() +void LegoControlManager::Notify() { LegoNotifyListCursor cursor(&m_notifyList); MxCore* target; @@ -121,7 +121,7 @@ void LegoControlManager::FUN_100292e0() } // FUNCTION: LEGO1 0x100293c0 -void LegoControlManager::FUN_100293c0(MxU32 p_objectId, const char* p_atom, MxS16 p_unk0x4e) +void LegoControlManager::UpdateEnabledChild(MxU32 p_objectId, const char* p_atom, MxS16 p_enabledChild) { if (m_presenterList) { MxPresenterListCursor cursor(m_presenterList); @@ -131,11 +131,11 @@ void LegoControlManager::FUN_100293c0(MxU32 p_objectId, const char* p_atom, MxS1 MxDSAction* action = control->GetAction(); if (action->GetObjectId() == p_objectId && action->GetAtomId().GetInternal() == p_atom) { - ((MxControlPresenter*) control)->UpdateEnabledChild(p_unk0x4e); + ((MxControlPresenter*) control)->UpdateEnabledChild(p_enabledChild); if (((MxControlPresenter*) control)->GetEnabledChild() == 0) { - g_unk0x100f31b0 = -1; - g_unk0x100f31b4 = NULL; + g_clickedObjectId = -1; + g_clickedAtom = NULL; break; } } @@ -145,7 +145,7 @@ void LegoControlManager::FUN_100293c0(MxU32 p_objectId, const char* p_atom, MxS1 // FUNCTION: LEGO1 0x100294e0 // FUNCTION: BETA10 0x1007c92f -MxControlPresenter* LegoControlManager::FUN_100294e0(MxS32 p_x, MxS32 p_y) +MxControlPresenter* LegoControlManager::GetControlAt(MxS32 p_x, MxS32 p_y) { if (m_presenterList) { MxPresenterListCursor cursor(m_presenterList); @@ -167,29 +167,29 @@ MxControlPresenter* LegoControlManager::FUN_100294e0(MxS32 p_x, MxS32 p_y) // FUNCTION: LEGO1 0x10029600 MxResult LegoControlManager::Tickle() { - if (m_unk0x08 == 2 && m_unk0x0c == 1) { + if (m_buttonDownState == e_tickled && m_handleUpNextTickle == 1) { m_event.SetNotification(c_notificationButtonUp); - FUN_10029750(); + HandleButtonUp(); return 0; } - else if (m_unk0x08 == 1) { - m_unk0x08 = 2; + else if (m_buttonDownState == e_waitNextTickle) { + m_buttonDownState = e_tickled; } return 0; } // FUNCTION: LEGO1 0x10029630 -MxBool LegoControlManager::FUN_10029630() +MxBool LegoControlManager::HandleButtonDown() { MxPresenterListCursor cursor(m_presenterList); MxPresenter* presenter; while (cursor.Next(presenter)) { - if (((MxControlPresenter*) presenter)->Notify(&m_event, m_unk0x14)) { - g_unk0x100f31b0 = m_event.m_clickedObjectId; - g_unk0x100f31b4 = m_event.GetClickedAtom(); - FUN_100292e0(); - m_unk0x08 = 1; + if (((MxControlPresenter*) presenter)->Notify(&m_event, m_handledPresenter)) { + g_clickedObjectId = m_event.m_clickedObjectId; + g_clickedAtom = m_event.GetClickedAtom(); + Notify(); + m_buttonDownState = e_waitNextTickle; return TRUE; } } @@ -198,29 +198,29 @@ MxBool LegoControlManager::FUN_10029630() } // FUNCTION: LEGO1 0x10029750 -MxBool LegoControlManager::FUN_10029750() +MxBool LegoControlManager::HandleButtonUp() { MxPresenterListCursor cursor(m_presenterList); MxPresenter* presenter; while (cursor.Next(presenter)) { - if (presenter->GetAction() && presenter->GetAction()->GetObjectId() == g_unk0x100f31b0 && - presenter->GetAction()->GetAtomId().GetInternal() == g_unk0x100f31b4) { - if (((MxControlPresenter*) presenter)->Notify(&m_event, m_unk0x14)) { - FUN_100292e0(); + if (presenter->GetAction() && presenter->GetAction()->GetObjectId() == g_clickedObjectId && + presenter->GetAction()->GetAtomId().GetInternal() == g_clickedAtom) { + if (((MxControlPresenter*) presenter)->Notify(&m_event, m_handledPresenter)) { + Notify(); } - g_unk0x100f31b0 = -1; - g_unk0x100f31b4 = NULL; + g_clickedObjectId = -1; + g_clickedAtom = NULL; - m_unk0x08 = 0; - m_unk0x0c = 0; + m_buttonDownState = e_idle; + m_handleUpNextTickle = 0; return TRUE; } } - g_unk0x100f31b0 = -1; - g_unk0x100f31b4 = NULL; + g_clickedObjectId = -1; + g_clickedAtom = NULL; return FALSE; } diff --git a/LEGO1/lego/legoomni/src/entity/legoworld.cpp b/LEGO1/lego/legoomni/src/entity/legoworld.cpp index 7a964a3f..37fce2bd 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworld.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworld.cpp @@ -83,7 +83,7 @@ MxResult LegoWorld::Create(MxDSAction& p_dsAction) } SetCurrentWorld(this); - ControlManager()->FUN_10028df0(&m_controlPresenters); + ControlManager()->SetPresenterList(&m_controlPresenters); } SetIsWorldActive(TRUE); @@ -98,7 +98,7 @@ void LegoWorld::Destroy(MxBool p_fromDestructor) m_destroyed = TRUE; if (CurrentWorld() == this) { - ControlManager()->FUN_10028df0(NULL); + ControlManager()->SetPresenterList(NULL); SetCurrentWorld(NULL); } @@ -724,7 +724,7 @@ void LegoWorld::Enable(MxBool p_enable) } SetCurrentWorld(this); - ControlManager()->FUN_10028df0(&m_controlPresenters); + ControlManager()->SetPresenterList(&m_controlPresenters); InputManager()->SetCamera(m_cameraController); if (m_cameraController) { @@ -781,7 +781,7 @@ void LegoWorld::Enable(MxBool p_enable) } if (CurrentWorld() && CurrentWorld() == this) { - ControlManager()->FUN_10028df0(NULL); + ControlManager()->SetPresenterList(NULL); Lego()->SetCurrentWorld(NULL); } diff --git a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp index 00b877bd..b2f79568 100644 --- a/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp +++ b/LEGO1/lego/legoomni/src/entity/legoworldpresenter.cpp @@ -393,7 +393,7 @@ MxResult LegoWorldPresenter::LoadWorldModel(ModelDbModel& p_model, SDL_IOStream* } modelPresenter.SetAction(&action); - modelPresenter.FUN_1007ff70(chunk, createdEntity, p_model.m_visible, p_world); + modelPresenter.CreateROI(chunk, createdEntity, p_model.m_visible, p_world); delete[] buff; return SUCCESS; diff --git a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp index eca8078b..27b0f814 100644 --- a/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp +++ b/LEGO1/lego/legoomni/src/input/legoinputmanager.cpp @@ -17,10 +17,10 @@ DECOMP_SIZE_ASSERT(LegoNotifyListCursor, 0x10) DECOMP_SIZE_ASSERT(LegoEventQueue, 0x18) // GLOBAL: LEGO1 0x100f31b0 -MxS32 g_unk0x100f31b0 = -1; +MxS32 g_clickedObjectId = -1; // GLOBAL: LEGO1 0x100f31b4 -const char* g_unk0x100f31b4 = NULL; +const char* g_clickedAtom = NULL; // GLOBAL: LEGO1 0x100f67b8 MxBool g_unk0x100f67b8 = TRUE; @@ -207,6 +207,7 @@ MxResult LegoInputManager::GetJoystickState(MxU32* p_joystickX, MxU32* p_joystic // normalize values acquired from joystick axes *p_joystickX = ((xPos + 32768) * 100) / 65535; *p_joystickY = ((yPos + 32768) * 100) / 65535; + *p_povPosition = -1; return SUCCESS; } @@ -353,23 +354,23 @@ MxBool LegoInputManager::ProcessOneEvent(LegoEventNotificationParam& p_param) if (presenter->GetDisplayZ() < 0) { processRoi = FALSE; - if (m_controlManager->FUN_10029210(p_param, presenter)) { + if (m_controlManager->HandleButtonDown(p_param, presenter)) { return TRUE; } } else { LegoROI* roi = PickROI(p_param.GetX(), p_param.GetY()); - if (roi == NULL && m_controlManager->FUN_10029210(p_param, presenter)) { + if (roi == NULL && m_controlManager->HandleButtonDown(p_param, presenter)) { return TRUE; } } } } else if (p_param.GetNotification() == c_notificationButtonUp) { - if (g_unk0x100f31b0 != -1 || m_controlManager->GetUnknown0x10() || - m_controlManager->GetUnknown0x0c() == 1) { - MxBool result = m_controlManager->FUN_10029210(p_param, NULL); + if (g_clickedObjectId != -1 || m_controlManager->IsSecondButtonDown() || + m_controlManager->HandleUpNextTickle() == 1) { + MxBool result = m_controlManager->HandleButtonDown(p_param, NULL); StopAutoDragTimer(); m_unk0x80 = FALSE; @@ -521,8 +522,8 @@ void LegoInputManager::StopAutoDragTimer() void LegoInputManager::EnableInputProcessing() { m_unk0x88 = FALSE; - g_unk0x100f31b0 = -1; - g_unk0x100f31b4 = NULL; + g_clickedObjectId = -1; + g_clickedAtom = NULL; } MxResult LegoInputManager::GetNavigationTouchStates(MxU32& p_keyStates) diff --git a/LEGO1/lego/legoomni/src/race/carrace.cpp b/LEGO1/lego/legoomni/src/race/carrace.cpp index 62701294..c59cd6de 100644 --- a/LEGO1/lego/legoomni/src/race/carrace.cpp +++ b/LEGO1/lego/legoomni/src/race/carrace.cpp @@ -386,7 +386,7 @@ MxLong CarRace::HandleType0Notification(MxNotificationParam&) void CarRace::FUN_10017820(MxS32 p_param1, MxS16 p_param2) { MxS32 local4; - MxStillPresenter* presenter; + MxStillPresenter* presenter = NULL; MxS32 x, y; if (p_param1 == 11) { diff --git a/LEGO1/lego/legoomni/src/race/jetskirace.cpp b/LEGO1/lego/legoomni/src/race/jetskirace.cpp index 7081d8eb..6ea02f86 100644 --- a/LEGO1/lego/legoomni/src/race/jetskirace.cpp +++ b/LEGO1/lego/legoomni/src/race/jetskirace.cpp @@ -263,7 +263,7 @@ MxLong JetskiRace::HandlePathStruct(LegoPathStructNotificationParam& p_param) void JetskiRace::FUN_10016930(MxS32 p_param1, MxS16 p_param2) { MxS32 local4; - MxStillPresenter* presenter; + MxStillPresenter* presenter = NULL; MxS32 x, y; if (p_param1 == 11) { diff --git a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp index 405154c1..510c5928 100644 --- a/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp +++ b/LEGO1/lego/legoomni/src/video/legomodelpresenter.cpp @@ -197,7 +197,7 @@ MxResult LegoModelPresenter::CreateROI(MxDSChunk* p_chunk) // FUNCTION: LEGO1 0x1007ff70 // FUNCTION: BETA10 0x10099061 -MxResult LegoModelPresenter::FUN_1007ff70( +MxResult LegoModelPresenter::CreateROI( MxDSChunk& p_chunk, LegoEntity* p_entity, MxBool p_roiVisible, diff --git a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp index 1fe7710b..aa13fb33 100644 --- a/LEGO1/lego/legoomni/src/worlds/infocenter.cpp +++ b/LEGO1/lego/legoomni/src/worlds/infocenter.cpp @@ -342,7 +342,7 @@ MxLong Infocenter::HandleEndAction(MxEndActionNotificationParam& p_param) } if (action->GetObjectId() == InfomainScript::c_iicx26in_RunAnim - Lego()->IsVersion10()) { - ControlManager()->FUN_100293c0(InfomainScript::c_BigInfo_Ctl, action->GetAtomId().GetInternal(), 0); + ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, action->GetAtomId().GetInternal(), 0); m_unk0x1d6 = 0; } @@ -754,7 +754,7 @@ MxLong Infocenter::HandleKeyPress(SDL_Keycode p_key) MxU8 Infocenter::HandleButtonUp(MxS32 p_x, MxS32 p_y) { if (m_dragPresenter) { - MxControlPresenter* control = InputManager()->GetControlManager()->FUN_100294e0(p_x - 1, p_y - 1); + MxControlPresenter* control = InputManager()->GetControlManager()->GetControlAt(p_x - 1, p_y - 1); switch (m_dragPresenter->GetAction()->GetObjectId()) { case InfomainScript::c_PepperHot_Bitmap: @@ -1243,16 +1243,16 @@ MxResult Infocenter::Tickle() m_unk0x1d6 += 100; if (m_unk0x1d6 > 3400 && m_unk0x1d6 < 3650) { - ControlManager()->FUN_100293c0(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1); + ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1); } else if (m_unk0x1d6 > 3650 && m_unk0x1d6 < 3900) { - ControlManager()->FUN_100293c0(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0); + ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0); } else if (m_unk0x1d6 > 3900 && m_unk0x1d6 < 4150) { - ControlManager()->FUN_100293c0(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1); + ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 1); } else if (m_unk0x1d6 > 4400) { - ControlManager()->FUN_100293c0(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0); + ControlManager()->UpdateEnabledChild(InfomainScript::c_BigInfo_Ctl, m_atomId.GetInternal(), 0); m_unk0x1d6 = 0; } } diff --git a/LEGO1/omni/src/stream/mxramstreamprovider.cpp b/LEGO1/omni/src/stream/mxramstreamprovider.cpp index 71fa256c..966bec95 100644 --- a/LEGO1/omni/src/stream/mxramstreamprovider.cpp +++ b/LEGO1/omni/src/stream/mxramstreamprovider.cpp @@ -108,7 +108,7 @@ MxU32 ReadData(MxU8* p_buffer, MxU32 p_size) { MxU32 id; MxU8* data = p_buffer; - MxU8* data2; + MxU8* data2 = NULL; while (data < p_buffer + p_size) { if (data + sizeof(MxU32) <= p_buffer + p_size && UnalignedRead(data) == FOURCC('M', 'x', 'O', 'b')) { diff --git a/README.md b/README.md index fe4a285f..765c74d2 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Please note: this project is dedicated to achieving platform independence withou | macOS | [![CI](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml/badge.svg)](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml) | | [Web](https://isle.pizza) | [![CI](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml/badge.svg)](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml) | | Nintendo 3DS | [![CI](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml/badge.svg)](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml) | +| Xbox One | [![CI](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml/badge.svg)](https://github.com/isledecomp/isle-portable/actions/workflows/ci.yml) | We are actively working to support more platforms. If you have experience with a particular platform, we encourage you to contribute to `isle-portable`. You can find a [list of ongoing efforts](https://github.com/isledecomp/isle-portable/wiki/Work%E2%80%90in%E2%80%90progress-ports) in our Wiki. diff --git a/miniwin/CMakeLists.txt b/miniwin/CMakeLists.txt index c2aa0bd6..1ed5e909 100644 --- a/miniwin/CMakeLists.txt +++ b/miniwin/CMakeLists.txt @@ -32,7 +32,7 @@ target_compile_definitions(miniwin PRIVATE ) find_package(OpenGL) -if(OpenGL_FOUND) +if(OpenGL_FOUND AND NOT WINDOWS_STORE) message(STATUS "Found OpenGL: enabling OpenGL 1.x renderer") target_sources(miniwin PRIVATE src/d3drm/backends/opengl1/actual.cpp @@ -45,7 +45,7 @@ else() endif() find_library(OPENGL_ES2_LIBRARY NAMES GLESv2) -if(EMSCRIPTEN OR OPENGL_ES2_LIBRARY) +if(EMSCRIPTEN OR OPENGL_ES2_LIBRARY AND NOT WINDOWS_STORE) message(STATUS "Found OpenGL: enabling OpenGL ES 2.x renderer") target_sources(miniwin PRIVATE src/d3drm/backends/opengles2/renderer.cpp) target_compile_definitions(miniwin PRIVATE USE_OPENGLES2) @@ -73,7 +73,7 @@ if(NINTENDO_3DS) endif() endif() -if(WIN32) +if(WIN32 AND NOT WINDOWS_STORE) target_sources(miniwin PRIVATE src/d3drm/backends/directx9/actual.cpp src/d3drm/backends/directx9/renderer.cpp @@ -81,6 +81,10 @@ if(WIN32) target_link_libraries(miniwin PRIVATE d3d9) endif() +if(WINDOWS_STORE) + add_compile_definitions(WINDOWS_STORE) +endif() + target_compile_definitions(miniwin PUBLIC MINIWIN) target_include_directories(miniwin diff --git a/miniwin/include/miniwin/ddraw.h b/miniwin/include/miniwin/ddraw.h index 2a8932a2..0250c099 100644 --- a/miniwin/include/miniwin/ddraw.h +++ b/miniwin/include/miniwin/ddraw.h @@ -162,9 +162,11 @@ ENABLE_BITMASK_OPERATORS(DDBltFastFlags) #define DDLOCK_SURFACEMEMORYPTR DDLockFlags::SURFACEMEMORYPTR #define DDLOCK_WAIT DDLockFlags::WAIT #define DDLOCK_WRITEONLY DDLockFlags::WRITEONLY +#define DDLOCK_READONLY DDLockFlags::READONLY enum class DDLockFlags : uint32_t { SURFACEMEMORYPTR = 0, WAIT = 1 << 0, + READONLY = 1 << 4, WRITEONLY = 1 << 5, }; ENABLE_BITMASK_OPERATORS(DDLockFlags) diff --git a/miniwin/src/d3drm/backends/citro3d/renderer.cpp b/miniwin/src/d3drm/backends/citro3d/renderer.cpp index ab9088bc..a82f1238 100644 --- a/miniwin/src/d3drm/backends/citro3d/renderer.cpp +++ b/miniwin/src/d3drm/backends/citro3d/renderer.cpp @@ -637,5 +637,51 @@ void Citro3DRenderer::SetDither(bool dither) void Citro3DRenderer::Download(SDL_Surface* target) { - MINIWIN_NOT_IMPLEMENTED(); + u16 width, height; + u8* fb = gfxGetFramebuffer(GFX_BOTTOM, GFX_LEFT, &width, &height); + if (!fb) { + SDL_Log("Failed to get framebuffer"); + return; + } + + SDL_Surface* srcSurface = SDL_CreateSurfaceFrom(width, height, SDL_PIXELFORMAT_BGR24, fb, width * 3); + if (!srcSurface) { + SDL_Log("SDL_CreateSurfaceFrom failed: %s", SDL_GetError()); + return; + } + + SDL_Surface* convertedSurface = SDL_ConvertSurface(srcSurface, target->format); + SDL_DestroySurface(srcSurface); + if (!convertedSurface) { + SDL_Log("SDL_ConvertSurface failed: %s", SDL_GetError()); + return; + } + + int rotatedWidth = height; + int rotatedHeight = width; + SDL_Surface* rotatedSurface = SDL_CreateSurface(rotatedWidth, rotatedHeight, target->format); + if (!rotatedSurface) { + SDL_Log("SDL_CreateSurface failed: %s", SDL_GetError()); + SDL_DestroySurface(convertedSurface); + return; + } + + Uint32* srcPixels = (Uint32*) convertedSurface->pixels; + Uint32* dstPixels = (Uint32*) rotatedSurface->pixels; + for (int y = 0; y < height; ++y) { + for (int x = 0; x < width; ++x) { + Uint32 pixel = srcPixels[y * width + x]; + int newX = y; + int newY = width - 1 - x; + dstPixels[newY * rotatedWidth + newX] = pixel; + } + } + + SDL_DestroySurface(convertedSurface); + + SDL_Rect srcRect = {0, 0, rotatedSurface->w, rotatedSurface->h}; + SDL_Rect dstRect = {0, 0, target->w, target->h}; + SDL_BlitSurfaceScaled(rotatedSurface, &srcRect, target, &dstRect, SDL_SCALEMODE_NEAREST); + + SDL_DestroySurface(rotatedSurface); } diff --git a/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp b/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp index 0609bbdc..8039c147 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp +++ b/miniwin/src/d3drm/backends/sdl3gpu/renderer.cpp @@ -190,7 +190,7 @@ static SDL_GPUGraphicsPipeline* InitializeGraphicsPipeline( Direct3DRMRenderer* Direct3DRMSDL3GPURenderer::Create(DWORD width, DWORD height) { ScopedDevice device{SDL_CreateGPUDevice( - SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_MSL, + SDL_GPU_SHADERFORMAT_SPIRV | SDL_GPU_SHADERFORMAT_DXBC | SDL_GPU_SHADERFORMAT_DXIL | SDL_GPU_SHADERFORMAT_MSL, #ifdef DEBUG true, #else @@ -1009,7 +1009,7 @@ void Direct3DRMSDL3GPURenderer::Download(SDL_Surface* target) } SDL_Surface* renderedImage = - SDL_CreateSurfaceFrom(width, height, SDL_PIXELFORMAT_ARGB8888, downloadedData, width * 4); + SDL_CreateSurfaceFrom(width, height, SDL_PIXELFORMAT_XRGB8888, downloadedData, width * 4); SDL_BlitSurfaceScaled(renderedImage, nullptr, target, nullptr, SDL_SCALEMODE_NEAREST); SDL_DestroySurface(renderedImage); diff --git a/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/PositionColor.vert.h b/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/PositionColor.vert.h index 46e7964d..08204e9e 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/PositionColor.vert.h +++ b/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/PositionColor.vert.h @@ -8,7 +8,7 @@ #include -// DXIL only makes sense on Windows platforms +// DX only makes sense on Windows platforms #if defined(SDL_PLATFORM_WINDOWS) static const Uint8 PositionColor_vert_dxil[5132] = { 0x44, 0x58, 0x42, 0x43, 0x4a, 0x28, 0x54, 0x85, 0x4b, 0xb0, 0x04, 0x11, 0x56, 0x33, 0x94, 0x85, @@ -333,6 +333,104 @@ static const Uint8 PositionColor_vert_dxil[5132] = { 0x83, 0x3f, 0xcc, 0xc3, 0x37, 0x62, 0x90, 0x00, 0x20, 0x08, 0x06, 0x48, 0x49, 0xb8, 0x83, 0x3e, 0xf8, 0x03, 0x3d, 0x6c, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static const Uint8 PositionColor_vert_dxbc[1528] = { + 0x44, 0x58, 0x42, 0x43, 0x26, 0x81, 0xf8, 0x51, 0x4d, 0x47, 0xfd, 0xfd, 0xa8, 0xbd, 0xce, 0x70, + 0x72, 0xe8, 0x3f, 0x4e, 0x01, 0x00, 0x00, 0x00, 0xf8, 0x05, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x34, 0x00, 0x00, 0x00, 0xf4, 0x01, 0x00, 0x00, 0x58, 0x02, 0x00, 0x00, 0xe0, 0x02, 0x00, 0x00, + 0x5c, 0x05, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xb8, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xfe, 0xff, + 0x00, 0x01, 0x00, 0x00, 0x8f, 0x01, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x56, 0x69, 0x65, + 0x77, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x00, 0xab, 0xab, + 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x8c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x50, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x71, 0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x56, 0x69, 0x65, 0x77, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, + 0x5f, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x66, 0x6c, 0x6f, 0x61, + 0x74, 0x34, 0x78, 0x34, 0x00, 0xab, 0xab, 0xab, 0x03, 0x00, 0x03, 0x00, 0x04, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x01, 0x00, 0x00, 0x56, 0x69, 0x65, 0x77, + 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x77, 0x6f, 0x72, + 0x6c, 0x64, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0x56, 0x69, 0x65, + 0x77, 0x70, 0x6f, 0x72, 0x74, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x5f, 0x6e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, + 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, + 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x31, 0x30, + 0x2e, 0x31, 0x00, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x07, 0x07, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, + 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, + 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x08, 0x00, 0x00, + 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab, 0xab, 0xab, + 0x53, 0x48, 0x45, 0x58, 0x74, 0x02, 0x00, 0x00, 0x50, 0x00, 0x01, 0x00, 0x9d, 0x00, 0x00, 0x00, + 0x6a, 0x08, 0x00, 0x01, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0b, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, + 0x32, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x65, 0x00, 0x00, 0x03, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, + 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, + 0x02, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x12, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0xf6, 0x0f, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x56, 0x15, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x06, 0x10, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, + 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0xa6, 0x1a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x0a, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xa6, 0x0a, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0xf2, 0x20, 0x10, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, + 0x94, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; #endif // MSL only makes sense on Apple platforms @@ -557,4 +655,4 @@ static const Uint8 PositionColor_vert_spirv[1924] = { 0x3d, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x09, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, -}; +}; \ No newline at end of file diff --git a/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/ShaderIndex.cpp b/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/ShaderIndex.cpp index a092dd6d..fefcfa80 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/ShaderIndex.cpp +++ b/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/ShaderIndex.cpp @@ -24,6 +24,20 @@ static const SDL_GPUShaderCreateInfo VertexShaderDXILCodes[] = { /* num_uniform_buffers */ 1, }, }; +static const SDL_GPUShaderCreateInfo VertexShaderDXBCCodes[] = { + // VertexShaderId::PositionColor + { + /* code_size */ sizeof(PositionColor_vert_dxbc), + /* code */ PositionColor_vert_dxbc, + /* entrypoint */ "main", + /* format */ SDL_GPU_SHADERFORMAT_DXBC, + /* stage */ SDL_GPU_SHADERSTAGE_VERTEX, + /* num_samplers */ 0, + /* num_storage_textures */ 0, + /* num_storage_buffers */ 0, + /* num_uniform_buffers */ 1, + }, +}; #endif #if defined(SDL_PLATFORM_APPLE) @@ -71,6 +85,20 @@ static const SDL_GPUShaderCreateInfo FragmentShaderDXILCodes[] = { /* num_uniform_buffers */ 1, }, }; +static const SDL_GPUShaderCreateInfo FragmentShaderDXBCCodes[] = { + // FragmentShaderId::SolidColor + { + /* code_size */ sizeof(SolidColor_frag_dxbc), + /* code */ SolidColor_frag_dxbc, + /* entrypoint */ "main", + /* format */ SDL_GPU_SHADERFORMAT_DXBC, + /* stage */ SDL_GPU_SHADERSTAGE_FRAGMENT, + /* num_samplers */ 1, + /* num_storage_textures */ 0, + /* num_storage_buffers */ 0, + /* num_uniform_buffers */ 1, + }, +}; #endif #if defined(SDL_PLATFORM_APPLE) @@ -109,6 +137,10 @@ const SDL_GPUShaderCreateInfo* GetVertexShaderCode(VertexShaderId id, SDL_GPUSha SDL_assert(id < SDL_arraysize(VertexShaderDXILCodes)); return &VertexShaderDXILCodes[id]; } + if (formats & SDL_GPU_SHADERFORMAT_DXBC) { + SDL_assert(id < SDL_arraysize(VertexShaderDXBCCodes)); + return &VertexShaderDXBCCodes[id]; + } #endif #if defined(SDL_PLATFORM_APPLE) if (formats & SDL_GPU_SHADERFORMAT_MSL) { @@ -130,6 +162,10 @@ const SDL_GPUShaderCreateInfo* GetFragmentShaderCode(FragmentShaderId id, SDL_GP SDL_assert(id < SDL_arraysize(FragmentShaderDXILCodes)); return &FragmentShaderDXILCodes[id]; } + if (formats & SDL_GPU_SHADERFORMAT_DXBC) { + SDL_assert(id < SDL_arraysize(FragmentShaderDXBCCodes)); + return &FragmentShaderDXBCCodes[id]; + } #endif #if defined(SDL_PLATFORM_APPLE) if (formats & SDL_GPU_SHADERFORMAT_MSL) { diff --git a/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/SolidColor.frag.h b/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/SolidColor.frag.h index ebdbe79d..beb316f4 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/SolidColor.frag.h +++ b/miniwin/src/d3drm/backends/sdl3gpu/shaders/generated/SolidColor.frag.h @@ -8,7 +8,7 @@ #include -// DXIL only makes sense on Windows platforms +// DX only makes sense on Windows platforms #if defined(SDL_PLATFORM_WINDOWS) static const Uint8 SolidColor_frag_dxil[6648] = { 0x44, 0x58, 0x42, 0x43, 0xd8, 0xfe, 0x4c, 0xec, 0x17, 0x1b, 0x52, 0xee, 0xf7, 0xc8, 0x8d, 0xcf, @@ -428,6 +428,206 @@ static const Uint8 SolidColor_frag_dxil[6648] = { 0xc1, 0x88, 0x41, 0x02, 0x80, 0x20, 0x18, 0x20, 0xe9, 0xe1, 0x17, 0xe1, 0x01, 0x1e, 0xb5, 0x81, 0x16, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +static const Uint8 SolidColor_frag_dxbc[3160] = { + 0x44, 0x58, 0x42, 0x43, 0xe8, 0x49, 0xcf, 0x45, 0xf9, 0x5a, 0x8f, 0xd1, 0xe0, 0x69, 0x77, 0x8f, + 0x38, 0xc7, 0x7b, 0xc1, 0x01, 0x00, 0x00, 0x00, 0x58, 0x0c, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, + 0x34, 0x00, 0x00, 0x00, 0xb8, 0x03, 0x00, 0x00, 0x40, 0x04, 0x00, 0x00, 0x94, 0x04, 0x00, 0x00, + 0xbc, 0x0b, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0x7c, 0x03, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0xc8, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x05, 0xff, 0xff, + 0x00, 0x01, 0x00, 0x00, 0x53, 0x03, 0x00, 0x00, 0x52, 0x44, 0x31, 0x31, 0x3c, 0x00, 0x00, 0x00, + 0x18, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, + 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa4, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x46, 0x72, 0x61, + 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, + 0x00, 0xab, 0xab, 0xab, 0xac, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, + 0xa0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x5c, 0x02, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x02, 0x00, 0x00, + 0x94, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xc8, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0xec, 0x02, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x10, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x34, 0x03, 0x00, 0x00, + 0x9c, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, + 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x73, 0x00, 0x53, + 0x63, 0x65, 0x6e, 0x65, 0x4c, 0x69, 0x67, 0x68, 0x74, 0x00, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, + 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x00, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd4, 0x01, 0x00, 0x00, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab, + 0xce, 0x01, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, + 0xdc, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x09, 0x02, 0x00, 0x00, 0xdc, 0x01, 0x00, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0c, 0x00, 0x03, 0x00, 0x03, 0x00, + 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x6c, 0x69, 0x67, 0x68, + 0x74, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x00, 0x69, 0x6e, 0x74, 0x00, 0xab, 0x00, 0x00, 0x02, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x02, 0x00, 0x00, + 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, + 0x61, 0x74, 0x61, 0x5f, 0x53, 0x68, 0x69, 0x6e, 0x69, 0x6e, 0x65, 0x73, 0x73, 0x00, 0x66, 0x6c, + 0x6f, 0x61, 0x74, 0x00, 0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xc2, 0x02, 0x00, 0x00, 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, + 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x52, 0x61, 0x77, 0x00, 0x64, 0x77, 0x6f, 0x72, 0x64, 0x00, 0xab, 0x00, 0x00, 0x13, 0x00, + 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x03, 0x00, 0x00, + 0x46, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x53, 0x68, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x44, + 0x61, 0x74, 0x61, 0x5f, 0x55, 0x73, 0x65, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x4d, + 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, + 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, + 0x72, 0x20, 0x31, 0x30, 0x2e, 0x31, 0x00, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, + 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, + 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, + 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x0f, 0x08, 0x00, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, + 0x00, 0x53, 0x56, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0xab, 0xab, 0xab, + 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x0e, 0x00, 0x00, + 0x53, 0x56, 0x5f, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x00, 0x53, 0x56, 0x5f, 0x44, 0x65, 0x70, + 0x74, 0x68, 0x00, 0xab, 0x53, 0x48, 0x45, 0x58, 0x20, 0x07, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, + 0xc8, 0x01, 0x00, 0x00, 0x6a, 0x08, 0x00, 0x01, 0x59, 0x08, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, + 0x72, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x64, 0x20, 0x00, 0x04, 0x82, 0x10, 0x10, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x02, 0x01, 0xc0, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, + 0x04, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x09, 0x01, 0xc0, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x80, 0x3f, + 0x3a, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x80, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x09, 0x22, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x05, + 0x22, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x08, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x36, 0x00, 0x00, 0x05, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x01, 0x21, 0x00, 0x00, 0x08, 0x82, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x80, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x08, 0x00, 0xd0, 0x00, 0x00, 0x82, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x06, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, 0x03, + 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x80, 0x20, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x01, 0x36, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x1f, 0x00, 0x04, 0x03, + 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x72, 0x00, 0x10, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x07, + 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x01, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x00, 0x10, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, + 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x07, 0x00, 0x00, 0x01, 0x15, 0x00, 0x00, 0x01, 0x18, 0x00, 0x00, 0x0a, 0x82, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x3a, 0x80, 0x20, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x09, + 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x86, 0x41, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x12, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x06, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x15, 0x00, 0x00, 0x01, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xf6, 0x0f, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, + 0x82, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x04, 0x03, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x0a, + 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x56, 0x05, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, + 0x03, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x44, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x72, 0x00, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0xf6, 0x0f, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x07, 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x07, + 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2f, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x08, + 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x1a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x05, + 0x82, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x32, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, + 0x32, 0x00, 0x00, 0x0b, 0x72, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x82, 0x20, 0x04, + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x0f, 0x10, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, + 0x1e, 0x00, 0x00, 0x07, 0x42, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x01, + 0x01, 0x00, 0x00, 0x08, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, + 0xff, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x56, 0x00, 0x00, 0x05, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x0a, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x8a, 0x00, 0x00, 0x10, 0x92, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, + 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, + 0x02, 0x40, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x10, 0x00, 0x00, 0x00, 0xa6, 0x8a, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x56, 0x00, 0x00, 0x05, 0x92, 0x00, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x0c, 0x10, 0x00, + 0x02, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x62, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x56, 0x06, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x06, 0x03, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, + 0x32, 0x20, 0x00, 0x0c, 0x72, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x81, 0x80, 0x80, 0x3b, + 0x81, 0x80, 0x80, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x1f, 0x00, 0x04, 0x04, 0x3a, 0x80, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, + 0x45, 0x00, 0x00, 0x8b, 0xc2, 0x00, 0x00, 0x80, 0x43, 0x55, 0x15, 0x00, 0xf2, 0x00, 0x10, 0x00, + 0x01, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 0x20, 0x00, 0x07, + 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x46, 0x02, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x01, + 0x55, 0x00, 0x00, 0x08, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x80, 0x20, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, + 0x56, 0x00, 0x00, 0x05, 0x82, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x07, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, + 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x02, 0x10, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x01, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, + 0x94, 0x00, 0x00, 0x00, 0x47, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, + 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; #endif // MSL only makes sense on Apple platforms @@ -938,4 +1138,4 @@ static const Uint8 SolidColor_frag_spirv[4616] = { 0xb0, 0x00, 0x00, 0x00, 0xaf, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x07, 0x00, 0x00, 0x00, 0xae, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x03, 0x00, 0x08, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x01, 0x00, 0x38, 0x00, 0x01, 0x00, -}; +}; \ No newline at end of file diff --git a/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/Common.hlsl b/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/Common.hlsl index c4d9d361..6330aa9b 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/Common.hlsl +++ b/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/Common.hlsl @@ -18,3 +18,9 @@ struct SceneLight { float4 position; float4 direction; }; + +#ifdef NO_REGISTER_SPACE + #define REGISTER_SPACE(REG, SPACE) register(REG) +#else + #define REGISTER_SPACE(REG, SPACE) register(REG, SPACE) +#endif \ No newline at end of file diff --git a/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/PositionColor.vert.hlsl b/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/PositionColor.vert.hlsl index cbf14c6b..598b8f09 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/PositionColor.vert.hlsl +++ b/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/PositionColor.vert.hlsl @@ -1,6 +1,6 @@ #include "Common.hlsl" -cbuffer ViewportUniforms : register(b0, space1) +cbuffer ViewportUniforms : REGISTER_SPACE(b0, space1) { float4x4 projection; float4x4 worldViewMatrix; diff --git a/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/SolidColor.frag.hlsl b/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/SolidColor.frag.hlsl index 6a6608ba..8f9a269e 100644 --- a/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/SolidColor.frag.hlsl +++ b/miniwin/src/d3drm/backends/sdl3gpu/shaders/src/SolidColor.frag.hlsl @@ -5,7 +5,7 @@ struct FS_Output { float Depth : SV_Depth; }; -cbuffer FragmentShadingData : register(b0, space3) +cbuffer FragmentShadingData : REGISTER_SPACE(b0, space3) { SceneLight lights[3]; int lightCount; @@ -24,8 +24,8 @@ float4 unpackColor(uint packed) return color; } -Texture2D Texture : register(t0, space2); -SamplerState Sampler : register(s0, space2); +Texture2D Texture : REGISTER_SPACE(t0, space2); +SamplerState Sampler : REGISTER_SPACE(s0, space2); FS_Output main(FS_Input input) { diff --git a/miniwin/src/d3drm/backends/software/renderer.cpp b/miniwin/src/d3drm/backends/software/renderer.cpp index bd99d2aa..48c9c3ef 100644 --- a/miniwin/src/d3drm/backends/software/renderer.cpp +++ b/miniwin/src/d3drm/backends/software/renderer.cpp @@ -761,10 +761,9 @@ void Direct3DRMSoftwareRenderer::Resize(int width, int height, const ViewportTra void Direct3DRMSoftwareRenderer::Clear(float r, float g, float b) { - SDL_Rect rect = {0, 0, m_renderedImage->w, m_renderedImage->h}; const SDL_PixelFormatDetails* details = SDL_GetPixelFormatDetails(m_renderedImage->format); Uint32 color = SDL_MapRGB(details, m_palette, r * 255, g * 255, b * 255); - SDL_FillSurfaceRect(m_renderedImage, &rect, color); + SDL_FillSurfaceRect(m_renderedImage, nullptr, color); } void Direct3DRMSoftwareRenderer::Flip() diff --git a/miniwin/src/d3drm/d3drm.cpp b/miniwin/src/d3drm/d3drm.cpp index 45a4e3ad..1088a943 100644 --- a/miniwin/src/d3drm/d3drm.cpp +++ b/miniwin/src/d3drm/d3drm.cpp @@ -167,7 +167,7 @@ HRESULT Direct3DRMImpl::CreateDeviceFromSurface( DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); } #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(WINDOWS_STORE) else if (SDL_memcmp(&guid, &DirectX9_GUID, sizeof(GUID)) == 0) { DDRenderer = DirectX9Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight); } diff --git a/miniwin/src/ddraw/ddraw.cpp b/miniwin/src/ddraw/ddraw.cpp index a3bc5d4d..f9dabada 100644 --- a/miniwin/src/ddraw/ddraw.cpp +++ b/miniwin/src/ddraw/ddraw.cpp @@ -7,7 +7,7 @@ #ifdef __3DS__ #include "d3drmrenderer_citro3d.h" #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(WINDOWS_STORE) #include "d3drmrenderer_directx9.h" #endif #include "d3drmrenderer_sdl3gpu.h" @@ -238,7 +238,7 @@ HRESULT DirectDrawImpl::EnumDevices(LPD3DENUMDEVICESCALLBACK cb, void* ctx) #ifdef __3DS__ Citro3DRenderer_EnumDevice(cb, ctx); #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(WINDOWS_STORE) DirectX9Renderer_EnumDevice(cb, ctx); #endif Direct3DRMSoftware_EnumDevice(cb, ctx); @@ -357,7 +357,7 @@ HRESULT DirectDrawImpl::CreateDevice( DDRenderer = new Citro3DRenderer(DDSDesc.dwWidth, DDSDesc.dwHeight); } #endif -#ifdef _WIN32 +#if defined(_WIN32) && !defined(WINDOWS_STORE) else if (SDL_memcmp(&guid, &DirectX9_GUID, sizeof(GUID)) == 0) { DDRenderer = DirectX9Renderer::Create(DDSDesc.dwWidth, DDSDesc.dwHeight); } diff --git a/miniwin/src/ddraw/ddsurface.cpp b/miniwin/src/ddraw/ddsurface.cpp index de250dea..056912fd 100644 --- a/miniwin/src/ddraw/ddsurface.cpp +++ b/miniwin/src/ddraw/ddsurface.cpp @@ -52,6 +52,24 @@ HRESULT DirectDrawSurfaceImpl::Blt( LPDDBLTFX lpDDBltFx ) { + if ((dwFlags & DDBLT_COLORFILL) == DDBLT_COLORFILL) { + Uint8 a = (lpDDBltFx->dwFillColor >> 24) & 0xFF; + Uint8 r = (lpDDBltFx->dwFillColor >> 16) & 0xFF; + Uint8 g = (lpDDBltFx->dwFillColor >> 8) & 0xFF; + Uint8 b = lpDDBltFx->dwFillColor & 0xFF; + + const SDL_PixelFormatDetails* details = SDL_GetPixelFormatDetails(m_surface->format); + Uint32 color = SDL_MapRGBA(details, nullptr, r, g, b, a); + if (lpDestRect) { + SDL_Rect dstRect = ConvertRect(lpDestRect); + SDL_FillSurfaceRect(m_surface, &dstRect, color); + } + else { + SDL_FillSurfaceRect(m_surface, nullptr, color); + } + return DD_OK; + } + auto other = static_cast(lpDDSrcSurface); SDL_Rect srcRect = lpSrcRect ? ConvertRect(lpSrcRect) : SDL_Rect{0, 0, other->m_surface->w, other->m_surface->h}; diff --git a/miniwin/src/ddraw/framebuffer.cpp b/miniwin/src/ddraw/framebuffer.cpp index 843c36ec..13caa434 100644 --- a/miniwin/src/ddraw/framebuffer.cpp +++ b/miniwin/src/ddraw/framebuffer.cpp @@ -171,12 +171,14 @@ HRESULT FrameBufferImpl::Lock(LPRECT lpDestRect, DDSURFACEDESC* lpDDSurfaceDesc, if (!DDRenderer) { return DDERR_GENERIC; } + + m_readOnlyLock = (dwFlags & DDLOCK_READONLY) == DDLOCK_READONLY; + if ((dwFlags & DDLOCK_WRITEONLY) == DDLOCK_WRITEONLY) { - SDL_Rect rect = {0, 0, m_transferBuffer->m_surface->w, m_transferBuffer->m_surface->h}; const SDL_PixelFormatDetails* details = SDL_GetPixelFormatDetails(m_transferBuffer->m_surface->format); SDL_Palette* palette = m_palette ? static_cast(m_palette)->m_palette : nullptr; Uint32 color = SDL_MapRGBA(details, palette, 0, 0, 0, 0); - SDL_FillSurfaceRect(m_transferBuffer->m_surface, &rect, color); + SDL_FillSurfaceRect(m_transferBuffer->m_surface, nullptr, color); } else { DDRenderer->Download(m_transferBuffer->m_surface); @@ -224,7 +226,9 @@ HRESULT FrameBufferImpl::SetPalette(LPDIRECTDRAWPALETTE lpDDPalette) HRESULT FrameBufferImpl::Unlock(LPVOID lpSurfaceData) { m_transferBuffer->Unlock(lpSurfaceData); - BltFast(0, 0, m_transferBuffer, nullptr, DDBLTFAST_WAIT); + if (!m_readOnlyLock) { + BltFast(0, 0, m_transferBuffer, nullptr, DDBLTFAST_WAIT); + } return DD_OK; } diff --git a/miniwin/src/internal/framebuffer_impl.h b/miniwin/src/internal/framebuffer_impl.h index 5e40f7e8..47805e69 100644 --- a/miniwin/src/internal/framebuffer_impl.h +++ b/miniwin/src/internal/framebuffer_impl.h @@ -39,6 +39,7 @@ struct FrameBufferImpl : public IDirectDrawSurface3 { private: uint32_t m_virtualWidth; uint32_t m_virtualHeight; + bool m_readOnlyLock; DirectDrawSurfaceImpl* m_transferBuffer; IDirectDrawPalette* m_palette = nullptr; }; diff --git a/packaging/CMakeLists.txt b/packaging/CMakeLists.txt index d6fc19f0..3ec9d174 100644 --- a/packaging/CMakeLists.txt +++ b/packaging/CMakeLists.txt @@ -20,3 +20,7 @@ endif() if(LINUX) add_subdirectory(linux) endif() + +if(WINDOWS_STORE) + add_subdirectory(UWP) +endif() diff --git a/packaging/UWP/CMakeLists.txt b/packaging/UWP/CMakeLists.txt new file mode 100644 index 00000000..95018c49 --- /dev/null +++ b/packaging/UWP/CMakeLists.txt @@ -0,0 +1,20 @@ +file(GLOB_RECURSE GENERATED_ASSETS + "assets/*" +) +set(ASSET_FILES ${GENERATED_ASSETS}) +set_source_files_properties(${ASSET_FILES} PROPERTIES + VS_DEPLOYMENT_CONTENT 1 + VS_DEPLOYMENT_LOCATION "assets" +) + +set(MANIFEST_FILE Package.appxmanifest) +set_source_files_properties(${MANIFEST_FILE} PROPERTIES + VS_DEPLOYMENT_CONTENT 1 +) + +set(SIGNING_KEY_FILE IslePortable.pfx) +set_source_files_properties(${SIGNING_KEY_FILE} PROPERTIES + VS_DEPLOYMENT_CONTENT 1 +) + +target_sources(isle PRIVATE ${ASSET_FILES} ${MANIFEST_FILE} ${SIGNING_KEY_FILE}) diff --git a/packaging/UWP/IslePortable.pfx b/packaging/UWP/IslePortable.pfx new file mode 100644 index 00000000..3b85ffca Binary files /dev/null and b/packaging/UWP/IslePortable.pfx differ diff --git a/packaging/UWP/Package.appxmanifest b/packaging/UWP/Package.appxmanifest new file mode 100644 index 00000000..1c75a7cf --- /dev/null +++ b/packaging/UWP/Package.appxmanifest @@ -0,0 +1,47 @@ + + + + + + LEGO® Island + isledecomp/isle-portable + StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/packaging/UWP/assets/LargeTile.scale-100.png b/packaging/UWP/assets/LargeTile.scale-100.png new file mode 100644 index 00000000..94b280c2 Binary files /dev/null and b/packaging/UWP/assets/LargeTile.scale-100.png differ diff --git a/packaging/UWP/assets/LargeTile.scale-125.png b/packaging/UWP/assets/LargeTile.scale-125.png new file mode 100644 index 00000000..e8531486 Binary files /dev/null and b/packaging/UWP/assets/LargeTile.scale-125.png differ diff --git a/packaging/UWP/assets/LargeTile.scale-150.png b/packaging/UWP/assets/LargeTile.scale-150.png new file mode 100644 index 00000000..b73fc6b5 Binary files /dev/null and b/packaging/UWP/assets/LargeTile.scale-150.png differ diff --git a/packaging/UWP/assets/LargeTile.scale-200.png b/packaging/UWP/assets/LargeTile.scale-200.png new file mode 100644 index 00000000..02300849 Binary files /dev/null and b/packaging/UWP/assets/LargeTile.scale-200.png differ diff --git a/packaging/UWP/assets/LargeTile.scale-400.png b/packaging/UWP/assets/LargeTile.scale-400.png new file mode 100644 index 00000000..e4475176 Binary files /dev/null and b/packaging/UWP/assets/LargeTile.scale-400.png differ diff --git a/packaging/UWP/assets/SplashScreen.scale-100.png b/packaging/UWP/assets/SplashScreen.scale-100.png new file mode 100644 index 00000000..ba958235 Binary files /dev/null and b/packaging/UWP/assets/SplashScreen.scale-100.png differ diff --git a/packaging/UWP/assets/SplashScreen.scale-125.png b/packaging/UWP/assets/SplashScreen.scale-125.png new file mode 100644 index 00000000..f63eb9e8 Binary files /dev/null and b/packaging/UWP/assets/SplashScreen.scale-125.png differ diff --git a/packaging/UWP/assets/SplashScreen.scale-150.png b/packaging/UWP/assets/SplashScreen.scale-150.png new file mode 100644 index 00000000..55097645 Binary files /dev/null and b/packaging/UWP/assets/SplashScreen.scale-150.png differ diff --git a/packaging/UWP/assets/SplashScreen.scale-200.png b/packaging/UWP/assets/SplashScreen.scale-200.png new file mode 100644 index 00000000..24263c24 Binary files /dev/null and b/packaging/UWP/assets/SplashScreen.scale-200.png differ diff --git a/packaging/UWP/assets/SplashScreen.scale-400.png b/packaging/UWP/assets/SplashScreen.scale-400.png new file mode 100644 index 00000000..f622b917 Binary files /dev/null and b/packaging/UWP/assets/SplashScreen.scale-400.png differ diff --git a/packaging/UWP/assets/Square150x150Logo.scale-100.png b/packaging/UWP/assets/Square150x150Logo.scale-100.png new file mode 100644 index 00000000..2bce23c5 Binary files /dev/null and b/packaging/UWP/assets/Square150x150Logo.scale-100.png differ diff --git a/packaging/UWP/assets/Square150x150Logo.scale-125.png b/packaging/UWP/assets/Square150x150Logo.scale-125.png new file mode 100644 index 00000000..906a3f48 Binary files /dev/null and b/packaging/UWP/assets/Square150x150Logo.scale-125.png differ diff --git a/packaging/UWP/assets/Square150x150Logo.scale-150.png b/packaging/UWP/assets/Square150x150Logo.scale-150.png new file mode 100644 index 00000000..10cd54dc Binary files /dev/null and b/packaging/UWP/assets/Square150x150Logo.scale-150.png differ diff --git a/packaging/UWP/assets/Square150x150Logo.scale-200.png b/packaging/UWP/assets/Square150x150Logo.scale-200.png new file mode 100644 index 00000000..f214f06e Binary files /dev/null and b/packaging/UWP/assets/Square150x150Logo.scale-200.png differ diff --git a/packaging/UWP/assets/Square150x150Logo.scale-400.png b/packaging/UWP/assets/Square150x150Logo.scale-400.png new file mode 100644 index 00000000..7660b6a4 Binary files /dev/null and b/packaging/UWP/assets/Square150x150Logo.scale-400.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-16.png b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-16.png new file mode 100644 index 00000000..44ba1861 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-16.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-24.png b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-24.png new file mode 100644 index 00000000..c7d0d5c6 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-24.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-256.png b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-256.png new file mode 100644 index 00000000..05e20da7 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-256.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-32.png b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-32.png new file mode 100644 index 00000000..34f380b7 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-32.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-48.png b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-48.png new file mode 100644 index 00000000..4ca0928a Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-lightunplated_targetsize-48.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-16.png b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 00000000..44ba1861 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-24.png b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-24.png new file mode 100644 index 00000000..c7d0d5c6 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-24.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-256.png b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-256.png new file mode 100644 index 00000000..05e20da7 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-32.png b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-32.png new file mode 100644 index 00000000..34f380b7 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-48.png b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 00000000..4ca0928a Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.scale-100.png b/packaging/UWP/assets/Square44x44Logo.scale-100.png new file mode 100644 index 00000000..27cc2d3f Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.scale-100.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.scale-125.png b/packaging/UWP/assets/Square44x44Logo.scale-125.png new file mode 100644 index 00000000..2d569be1 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.scale-125.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.scale-150.png b/packaging/UWP/assets/Square44x44Logo.scale-150.png new file mode 100644 index 00000000..8f5e6d9e Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.scale-150.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.scale-200.png b/packaging/UWP/assets/Square44x44Logo.scale-200.png new file mode 100644 index 00000000..5af98b83 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.scale-200.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.scale-400.png b/packaging/UWP/assets/Square44x44Logo.scale-400.png new file mode 100644 index 00000000..5c7d9c85 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.scale-400.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.targetsize-16.png b/packaging/UWP/assets/Square44x44Logo.targetsize-16.png new file mode 100644 index 00000000..36115ab1 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.targetsize-16.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.targetsize-24.png b/packaging/UWP/assets/Square44x44Logo.targetsize-24.png new file mode 100644 index 00000000..24711949 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.targetsize-24.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.targetsize-256.png b/packaging/UWP/assets/Square44x44Logo.targetsize-256.png new file mode 100644 index 00000000..e93cd58d Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.targetsize-256.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.targetsize-32.png b/packaging/UWP/assets/Square44x44Logo.targetsize-32.png new file mode 100644 index 00000000..ca116b92 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.targetsize-32.png differ diff --git a/packaging/UWP/assets/Square44x44Logo.targetsize-48.png b/packaging/UWP/assets/Square44x44Logo.targetsize-48.png new file mode 100644 index 00000000..1cc66b30 Binary files /dev/null and b/packaging/UWP/assets/Square44x44Logo.targetsize-48.png differ diff --git a/packaging/UWP/assets/Square71x71Logo.scale-100.png b/packaging/UWP/assets/Square71x71Logo.scale-100.png new file mode 100644 index 00000000..7eb2beda Binary files /dev/null and b/packaging/UWP/assets/Square71x71Logo.scale-100.png differ diff --git a/packaging/UWP/assets/Square71x71Logo.scale-125.png b/packaging/UWP/assets/Square71x71Logo.scale-125.png new file mode 100644 index 00000000..076c0703 Binary files /dev/null and b/packaging/UWP/assets/Square71x71Logo.scale-125.png differ diff --git a/packaging/UWP/assets/Square71x71Logo.scale-150.png b/packaging/UWP/assets/Square71x71Logo.scale-150.png new file mode 100644 index 00000000..578ec72d Binary files /dev/null and b/packaging/UWP/assets/Square71x71Logo.scale-150.png differ diff --git a/packaging/UWP/assets/Square71x71Logo.scale-200.png b/packaging/UWP/assets/Square71x71Logo.scale-200.png new file mode 100644 index 00000000..3805d16b Binary files /dev/null and b/packaging/UWP/assets/Square71x71Logo.scale-200.png differ diff --git a/packaging/UWP/assets/Square71x71Logo.scale-400.png b/packaging/UWP/assets/Square71x71Logo.scale-400.png new file mode 100644 index 00000000..020b9307 Binary files /dev/null and b/packaging/UWP/assets/Square71x71Logo.scale-400.png differ diff --git a/packaging/UWP/assets/StoreLogo.scale-100.png b/packaging/UWP/assets/StoreLogo.scale-100.png new file mode 100644 index 00000000..f05b2723 Binary files /dev/null and b/packaging/UWP/assets/StoreLogo.scale-100.png differ diff --git a/packaging/UWP/assets/StoreLogo.scale-125.png b/packaging/UWP/assets/StoreLogo.scale-125.png new file mode 100644 index 00000000..24dcfe05 Binary files /dev/null and b/packaging/UWP/assets/StoreLogo.scale-125.png differ diff --git a/packaging/UWP/assets/StoreLogo.scale-150.png b/packaging/UWP/assets/StoreLogo.scale-150.png new file mode 100644 index 00000000..db730a31 Binary files /dev/null and b/packaging/UWP/assets/StoreLogo.scale-150.png differ diff --git a/packaging/UWP/assets/StoreLogo.scale-200.png b/packaging/UWP/assets/StoreLogo.scale-200.png new file mode 100644 index 00000000..d9f30bf4 Binary files /dev/null and b/packaging/UWP/assets/StoreLogo.scale-200.png differ diff --git a/packaging/UWP/assets/StoreLogo.scale-400.png b/packaging/UWP/assets/StoreLogo.scale-400.png new file mode 100644 index 00000000..ff288809 Binary files /dev/null and b/packaging/UWP/assets/StoreLogo.scale-400.png differ diff --git a/packaging/UWP/assets/Wide310x150Logo.scale-100.png b/packaging/UWP/assets/Wide310x150Logo.scale-100.png new file mode 100644 index 00000000..82e3a2e6 Binary files /dev/null and b/packaging/UWP/assets/Wide310x150Logo.scale-100.png differ diff --git a/packaging/UWP/assets/Wide310x150Logo.scale-125.png b/packaging/UWP/assets/Wide310x150Logo.scale-125.png new file mode 100644 index 00000000..4a3315fc Binary files /dev/null and b/packaging/UWP/assets/Wide310x150Logo.scale-125.png differ diff --git a/packaging/UWP/assets/Wide310x150Logo.scale-150.png b/packaging/UWP/assets/Wide310x150Logo.scale-150.png new file mode 100644 index 00000000..d358c60d Binary files /dev/null and b/packaging/UWP/assets/Wide310x150Logo.scale-150.png differ diff --git a/packaging/UWP/assets/Wide310x150Logo.scale-200.png b/packaging/UWP/assets/Wide310x150Logo.scale-200.png new file mode 100644 index 00000000..ba958235 Binary files /dev/null and b/packaging/UWP/assets/Wide310x150Logo.scale-200.png differ diff --git a/packaging/UWP/assets/Wide310x150Logo.scale-400.png b/packaging/UWP/assets/Wide310x150Logo.scale-400.png new file mode 100644 index 00000000..24263c24 Binary files /dev/null and b/packaging/UWP/assets/Wide310x150Logo.scale-400.png differ