Files
ReSkate/Extension/UI/NativeMenu/ui_sound.h
T
AyeZeeBB 8444553402 Throwdowns: the throwdown kit, so a mode is a plugin and the SDK knows no particular mode
Plugins register modes (card, replaces, order, flag, players) and publish documents through
reskate.throwdowns.ui: the setup page, the waiting card, HUD slots themed on the game's HUD_<theme>_*
widgets, the match panel, flags and match restrictions. SmokeyDawg58's native plumbing
(throwdown_menu.cpp and its .inl files) renders them and posts throwdown_ui events back. kit::flag
is the one native flag registration. General services added for it: reskate.files, reskate.ui.dialog,
reskate.skater push/hold/bone_cam, reskate.camera.pad_flight, reskate.physics competition,
reskate.session.world, reskate.tricks feed/gesture, and world entities.

His ten modes are now Lua in his plugin: the rules, referee and wire (td/rules, referee, wire), and
every page and HUD document (td/ui*.lua). Extension/Modes and reskate.modes are gone, along with
every race and 1-UP branch in the SDK. The plugin test drives each mode through kit events.

A native setup page is never written to while it closes into flag placement: its rows are not
republished, the stock page is put back once the exit is over, and the stock Players slider is left
alone while a plugin flag is out. This fixes the crashes on the Deathrace button and on 1-UP's
Confirm.
2026-10-20 01:04:54 -05:00

20 lines
1.0 KiB
C++

#pragma once
#include <cstdint>
// The game's own menu sounds, for the pages ReSkate draws in its pause menu. The game plays
// them through its UI audio manager, which listens for one event
// (Audio/UI/Manager/Events/DGO_UI_PlayOneShot_Event) carrying which sound
// (Audio/_Systems/EnumTypeInfoAssets/DGO_Audio_UI_OneShot_Enum). This raises that event the
// way the game's own code raises events, so the sounds are the game's, at the player's own
// volume settings.
namespace dingosdk::multiplayer {
// Values of the game's enum.
enum class UiSound : std::uint32_t { cancel = 0, navigate = 3, toggle = 5, select = 7, tab = 56, countdown = 57, go = 58 };
// Discover the native event before a race reaches 3; warming emits no sound.
void prepare_ui_sounds() noexcept;
// Any thread: the sound is played at the next client tick (the newest asked for wins).
void queue_ui_sound(std::uint32_t sound) noexcept;
// Client thread, each tick while a world is up.
void tick_ui_sounds(std::uintptr_t base, bool loading) noexcept;
} // namespace dingosdk::multiplayer