67 lines
1.6 KiB
C++
67 lines
1.6 KiB
C++
#ifndef CORE_LIBS_PRX_LIBC_INCLUDE_GUESTLOCALE_HPP
|
|
#define CORE_LIBS_PRX_LIBC_INCLUDE_GUESTLOCALE_HPP
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include "general/VabiMacros.hpp"
|
|
|
|
namespace GuestLocale {
|
|
|
|
struct LocinfoStorage {
|
|
alignas(std::uint64_t) unsigned char bytes[64];
|
|
};
|
|
|
|
struct Facet;
|
|
|
|
struct FacetVtable {
|
|
void (APS5_VABI *destroy)(Facet* self);
|
|
void (APS5_VABI *deleteObject)(Facet* self);
|
|
void (APS5_VABI *retain)(Facet* self);
|
|
Facet* (APS5_VABI *release)(Facet* self);
|
|
};
|
|
|
|
struct Facet {
|
|
const FacetVtable* vtable;
|
|
std::uint32_t references;
|
|
std::uint32_t reserved;
|
|
};
|
|
|
|
struct Implementation {
|
|
Facet base;
|
|
Facet** facets;
|
|
std::uint64_t facetCount;
|
|
std::uint32_t category;
|
|
bool transparent;
|
|
const char* name;
|
|
};
|
|
|
|
struct IosBase {
|
|
const void* vtable;
|
|
std::int64_t standardStream;
|
|
std::int32_t state;
|
|
std::int32_t exceptions;
|
|
std::int32_t flags;
|
|
std::int32_t precision;
|
|
std::int32_t width;
|
|
std::uint32_t reserved;
|
|
void* storage;
|
|
void* callbacks;
|
|
Implementation** locale;
|
|
};
|
|
|
|
static_assert(sizeof(Facet) == 0x10);
|
|
static_assert(offsetof(Implementation, facets) == 0x10);
|
|
static_assert(offsetof(Implementation, facetCount) == 0x18);
|
|
static_assert(offsetof(Implementation, transparent) == 0x24);
|
|
static_assert(offsetof(Implementation, name) == 0x28);
|
|
static_assert(offsetof(IosBase, state) == 0x10);
|
|
static_assert(offsetof(IosBase, storage) == 0x28);
|
|
static_assert(offsetof(IosBase, callbacks) == 0x30);
|
|
static_assert(offsetof(IosBase, locale) == 0x38);
|
|
static_assert(sizeof(IosBase) == 0x40);
|
|
static_assert(alignof(LocinfoStorage) == 8);
|
|
|
|
}
|
|
|
|
#endif
|