mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-23 05:45:53 +02:00
Player list. A player on the developer, staff or homie list sees each player's Steam ID in the overlay's PLAYERS list for the session they are in, after "Host" / "Guest" and the distance, on their own row too. A click copies it. The lists are the backend's, the same ones the tags come from; every client in a session already knew the IDs, so this changes who is shown them and nothing else. Custom scripts. Nothing in scripts/Custom is read or run any more, whatever the launcher's "Loose files" setting says: nothing used them, and a mod was using the folder to load a DLL into the game (package.loadlib from its init.lua). The loader is kept behind one switch (custom_scripts_enabled in custom_script_loader.cpp) for the day they come back. For that day, the loader now also takes Lua's ways of running native code away before the first custom script runs: package.loadlib, require through the two C searchers and package.cpath, os.execute and io.popen. If that does not hold, no custom script runs. The overlay's Mods page no longer has the INSTALLED / SCRIPTS tabs; it is the installed mods. Editing the game's own Lua and config through loose files is unchanged.
44 lines
2.2 KiB
C++
44 lines
2.2 KiB
C++
#pragma once
|
|
// Frostbite skinned MeshSet resources: one level of detail's triangles, and how each vertex is
|
|
// weighted to the skeleton's bones. Only what a skinned mesh needs; the layout was worked out
|
|
// on skate.'s costume meshes, first by gBGYo's ReSkate fork (github.com/gBGYo/ReSkate).
|
|
#include "binary_io.h"
|
|
#include <array>
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <span>
|
|
#include <vector>
|
|
|
|
namespace dingosdk::frostbite {
|
|
struct MeshLod {
|
|
Guid chunk; // the geometry chunk: the vertex buffer, then the index buffer
|
|
std::uint32_t vertex_bytes{}, index_bytes{};
|
|
};
|
|
// The `lod`-th level of detail (0 the finest) of a MeshSet resource. Throws for a layout this
|
|
// reader does not know.
|
|
[[nodiscard]] MeshLod read_mesh_lod(std::span<const std::byte> resource, std::size_t lod);
|
|
|
|
// What a geometry comparison needs, of any MeshSet of the known layout, skinned or not and
|
|
// whatever its index size: how many levels of detail it has, a level's geometry chunk, and
|
|
// where that level's vertices are. Nothing of the skinning is read, so a mesh the skinned
|
|
// reader refuses for its bones still gives its positions. Throws for another layout, and for
|
|
// positions that are not three floats.
|
|
[[nodiscard]] std::size_t mesh_lod_count(std::span<const std::byte> resource);
|
|
[[nodiscard]] MeshLod mesh_lod_geometry(std::span<const std::byte> resource, std::size_t lod);
|
|
[[nodiscard]] std::vector<std::array<float, 3>> read_mesh_positions(std::span<const std::byte> resource, std::size_t lod,
|
|
std::span<const std::byte> geometry);
|
|
|
|
struct SkinnedVertex {
|
|
std::array<float, 3> position{}; // model space
|
|
std::array<std::uint16_t, 8> bones{}; // skeleton bones
|
|
std::array<std::uint8_t, 8> weights{}; // summing to 255; 0 for an unused influence
|
|
};
|
|
struct SkinnedMesh {
|
|
std::vector<SkinnedVertex> vertices;
|
|
std::vector<std::uint32_t> triangles; // vertex indices, three a triangle
|
|
};
|
|
// That level's sections as one mesh, from its geometry chunk. Throws when they do not fit.
|
|
[[nodiscard]] SkinnedMesh read_skinned_mesh(std::span<const std::byte> resource, std::size_t lod,
|
|
std::span<const std::byte> geometry);
|
|
}
|