mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-29 03:46:50 +01:00
General APIs from pull request 269 (the player's own item tabs and outfit layers), whose tabs,
panels and prompts are now a plugin's (contrib/plugins/item-tabs, kept on this machine):
- reskate.menu.grid_show(keys): a plugin's list in the item grid that has the focus, drawn from
every grid of the screen; reskate.menu.grid_mark(keys): the game's check on tiles. menu.grid()
also says whether a list shows, whether it is empty, and where the grid's own prompts end.
- reskate.outfit.on_top(items) and on_top_state(): items worn on top of the outfit in the slots it
leaves empty, the item given the slot's category, a slot tried and left if the game reports a
failed load (ReSkate.layer_slots.txt remembers which load where); paid store items refused.
Part of the shared outfit service, with reskate.outfit.set.
- reskate.input.game_keys(keys): presses the game does not see, by any way it reads the keyboard;
"Delete" is a key name.
- d:game_image draws the customization menu's 17 category icons ("cas_tops", ...).
dingosdk_plugin_tests skips the test of a contrib plugin that is not on this machine.
28 lines
1.2 KiB
C++
28 lines
1.2 KiB
C++
#pragma once
|
|
#include "Engine/Resource/texture.h"
|
|
#include <cstdint>
|
|
#include <filesystem>
|
|
#include <span>
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <vector>
|
|
|
|
namespace dingosdk::vfs {
|
|
struct ItemThumbnail {
|
|
std::string item; // owned asset id, e.g. own_bkbanks_generic_twinkiehalf_00001
|
|
frostbite::Image image; // side x side RGBA
|
|
};
|
|
struct ThumbnailRead {
|
|
std::vector<ItemThumbnail> thumbnails;
|
|
std::size_t failed{}; // textures that were found but could not be decoded
|
|
};
|
|
// The build-kit object thumbnails the game ships ("thumbnail/tool/own_bk*"),
|
|
// read from the installed game's data and scaled to `side` x `side`.
|
|
ThumbnailRead read_build_kit_thumbnails(const std::filesystem::path& gameRoot, std::uint32_t side);
|
|
// Textures of the game's own UI by their resource names (e.g. "ui/textures/icons/cas/img_cas_tops_128"),
|
|
// from the bundle that holds them, scaled to `side` x `side`; `item` is the name. Names that are not
|
|
// in the bundle are left out.
|
|
ThumbnailRead read_ui_textures(const std::filesystem::path& gameRoot, std::string_view bundle,
|
|
std::span<const std::string> names, std::uint32_t side);
|
|
}
|