Files
AyeZeeBB 725c18ef3d Mod Manager: a pause menu tab after Mod Options to browse, install, update and switch mods in game
A third ReSkate tab in the game's pause menu (native_menu.cpp slot 2, the Store's tab art), drawn by
the overlay as the other two are (mod_manager_page.inl, included into hub_page.cpp):

- BROWSE: search, categories in a panel of their own (shown only, hidden or either, kept in the
  profile), sort, a featured carousel and rows (most popular, recently updated, new, the biggest
  categories), a grid for results, and a mod's own page with its README, what it brings with it,
  and INSTALL, switch on or off and uninstall. Works from a controller: the carousel's card is
  one stop that left and right turn, and B goes back from a mod's page (the page's Back is held
  meanwhile).
- MY MODS: the Mods folder with the states the ReSkate menu shows; UPDATES: Update all.
- The foot of the page shows the install's progress and the apply's, and Apply (View on a pad).
  Leaving the menu with changes not applied asks first (a two-answer card in message_card.cpp,
  answered by the runtime as the message is); LATER closes the menu.

Behind it, Extension/Assets/mod_store: Thunderstore's listing (cached on disk), the installed mods,
and a queue that downloads and installs packages with their dependencies, updates and uninstalls
them. An update or uninstall of a mod the game holds open waits in Mods/.reskate-pending and the
launcher makes it before the next start (launcher_mods::apply_pending). Package icons load into
their own SRV slots (store_icons.cpp), sharing the launcher's icon cache.

Tests: mod_store_view (search, categories, the front page's rows, install plans), the pending
updates and uninstalls in mod_manager_tests, and the third tab in native_menu_view_tests.
2026-10-24 19:55:56 -05:00

107 lines
5.7 KiB
CMake

# DualShock 4 / DualSense read straight from HID, for the in-game menu and the launcher.
add_library(dingosdk_playstation_input STATIC Extension/UI/Overlay/playstation_input.cpp)
target_link_libraries(dingosdk_playstation_input PUBLIC dingosdk_logging PRIVATE hid cfgmgr32)
add_library(dingosdk_overlay STATIC
Extension/UI/Overlay/overlay.cpp
Extension/UI/Overlay/overlay_render.cpp
Extension/UI/Overlay/overlay_console.cpp
Extension/UI/Overlay/overlay_input.cpp
Extension/UI/Overlay/item_browser_overlay.cpp
Extension/UI/Overlay/frame_grab.cpp
Extension/UI/Overlay/depth_probe.cpp
Extension/UI/Overlay/overlay_notices.cpp
Extension/UI/Overlay/chat_overlay.cpp
Extension/UI/Overlay/map_download_card.cpp
Extension/UI/Overlay/message_card.cpp
Extension/UI/Overlay/hub_page.cpp
Extension/UI/Overlay/game_text_overlay.cpp
Extension/UI/Overlay/perf_overlay.cpp
Extension/UI/Overlay/skate_hud_overlay.cpp
Extension/UI/Overlay/nametag_overlay.cpp
Extension/UI/Overlay/chat_emotes.cpp
Extension/UI/Overlay/chat_rich.cpp
Extension/UI/Overlay/console_suggestions.cpp
Extension/UI/Overlay/skate_menu.cpp
Extension/UI/Overlay/skate_menu_world.cpp
Extension/UI/Overlay/skate_menu_addons.cpp
Extension/UI/Overlay/plugins_page.cpp
Extension/UI/Overlay/plugin_overlay.cpp
Extension/UI/Overlay/scripted_pad.cpp
Extension/UI/Overlay/game_images.cpp
Extension/UI/Overlay/xray_overlay.cpp
Extension/UI/Overlay/plugin_images.cpp
Extension/UI/Overlay/store_icons.cpp
Extension/UI/Overlay/menu_map_pictures.cpp
Extension/UI/Overlay/skate_menu_skater.cpp
Extension/UI/Overlay/skate_menu_settings.cpp
Extension/UI/Overlay/park_editor.cpp
Extension/UI/Overlay/park_editor_actions.cpp
Extension/UI/Overlay/park_editor_panels.cpp
Extension/UI/Overlay/park_editor_viewport.cpp
Extension/UI/Overlay/park_previews.cpp
Extension/UI/Overlay/gpu_diagnostics.cpp
Extension/UI/Overlay/input_capture.cpp
Extension/UI/Overlay/plugin_dialog.cpp
Extension/UI/Overlay/cursor.cpp
Extension/UI/Overlay/progression_menu.cpp
Extension/UI/Overlay/atmosphere_menu.cpp
Extension/UI/Overlay/modding_menu.cpp
Extension/UI/Overlay/multiplayer_menu.cpp
Extension/UI/Overlay/multiplayer_lobbies.cpp
Extension/UI/Overlay/multiplayer_session.cpp
Extension/Trainer/trainer_page.cpp
Extension/Music/music_page.cpp
Extension/Trainer/trainer_view.cpp
Extension/UI/Overlay/screen_look.cpp
)
target_link_libraries(dingosdk_overlay PUBLIC dingosdk_logging dingosdk_profiler dingosdk_imgui dingosdk_hooks dingosdk_console_core dxguid PRIVATE dingosdk_playstation_input shell32 dingosdk_initfs dingosdk_custom_scripts dingosdk_game_archives dingosdk_mods dingosdk_json windowscodecs ole32)
# The screen look's shader (reskate.screen.look) is built into the DLL as text and compiled when it is
# first drawn. The build checks it with the Windows SDK's fxc when there is one, so a shader that would
# not compile in the game fails here instead.
set(screen_look_path "${PROJECT_SOURCE_DIR}/Extension/UI/Overlay/screen_look.hlsl")
set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${screen_look_path}")
file(READ "${screen_look_path}" screen_look_source)
# MSVC takes at most about 16 KB in one string literal: the shader goes in as several, which the
# compiler joins.
string(LENGTH "${screen_look_source}" screen_look_length)
set(screen_look_chunks "")
set(screen_look_at 0)
while(screen_look_at LESS screen_look_length)
string(SUBSTRING "${screen_look_source}" ${screen_look_at} 8000 screen_look_chunk)
string(APPEND screen_look_chunks "R\"screen_hlsl(${screen_look_chunk})screen_hlsl\"\n")
math(EXPR screen_look_at "${screen_look_at} + 8000")
endwhile()
configure_file(cmake/templates/screen_look_hlsl.h.in "${CMAKE_CURRENT_BINARY_DIR}/generated/screen_look_hlsl.h" @ONLY)
target_include_directories(dingosdk_overlay PRIVATE "${CMAKE_CURRENT_BINARY_DIR}/generated")
if(WIN32)
file(GLOB screen_look_fxc_candidates "C:/Program Files (x86)/Windows Kits/10/bin/10.*/x64/fxc.exe")
if(screen_look_fxc_candidates)
list(SORT screen_look_fxc_candidates)
list(REVERSE screen_look_fxc_candidates)
list(GET screen_look_fxc_candidates 0 screen_look_fxc_newest)
set(DINGOSDK_FXC "${screen_look_fxc_newest}" CACHE FILEPATH "fxc.exe that checks the screen look's shader")
else()
find_program(DINGOSDK_FXC fxc)
endif()
if(DINGOSDK_FXC)
set(screen_look_checked "${CMAKE_CURRENT_BINARY_DIR}/generated/screen_look.checked")
add_custom_command(OUTPUT "${screen_look_checked}"
COMMAND "${DINGOSDK_FXC}" /nologo /T vs_5_0 /E vs_main /Fo "${CMAKE_CURRENT_BINARY_DIR}/generated/screen_look_vs.cso" "${screen_look_path}"
COMMAND "${DINGOSDK_FXC}" /nologo /T ps_5_0 /E ps_main /Fo "${CMAKE_CURRENT_BINARY_DIR}/generated/screen_look_ps.cso" "${screen_look_path}"
COMMAND "${DINGOSDK_FXC}" /nologo /T ps_5_0 /E ps_adapt /Fo "${CMAKE_CURRENT_BINARY_DIR}/generated/screen_look_iris.cso" "${screen_look_path}"
COMMAND "${CMAKE_COMMAND}" -E touch "${screen_look_checked}"
DEPENDS "${screen_look_path}"
COMMENT "Checking the screen look's shader with fxc"
VERBATIM)
add_custom_target(dingosdk_screen_look_check DEPENDS "${screen_look_checked}")
add_dependencies(dingosdk_overlay dingosdk_screen_look_check)
endif()
endif()
# The window shown from the moment ReSkate loads until the game's own window appears.
add_library(dingosdk_startup_window STATIC Extension/UI/Startup/startup_window.cpp)
target_link_libraries(dingosdk_startup_window PRIVATE gdi32 user32 msimg32 shell32 ole32 windowscodecs)