Squashed 'deps/nostalgia/' changes from 7c824e91..89fab5cc

89fab5cc [ox/fs] Remove stdc++fs from library list on Linux
1c06ea67 [nostalgia] Add links to Tonc and GBATEK to developer-handbook
6b948ee0 Merge commit '932c3e57e93d63dc98c454015afea941416ff423'
72dddcae [ox] Fix TypeDescWriter segfault

git-subtree-dir: deps/nostalgia
git-subtree-split: 89fab5cc208729a9ef6564d6b4172a0c9e0cd3bb
This commit is contained in:
Gary Talent 2023-12-30 13:56:23 -06:00
parent 932c3e57e9
commit d9cb493cf9
4 changed files with 13 additions and 8 deletions

View File

@ -16,12 +16,6 @@ if(NOT MSVC)
endif() endif()
if(NOT OX_BARE_METAL) if(NOT OX_BARE_METAL)
if(NOT APPLE AND NOT MSVC AND NOT ${OX_OS_FREEBSD})
target_link_libraries(
OxFS PUBLIC
stdc++fs
)
endif()
set_property( set_property(
TARGET TARGET
OxFS OxFS

View File

@ -219,9 +219,11 @@ template<typename T>
constexpr Error TypeDescWriter::field(CRStringView name, const T *val) noexcept { constexpr Error TypeDescWriter::field(CRStringView name, const T *val) noexcept {
if (m_type) { if (m_type) {
if constexpr(isVector_v<T> || isArray_v<T>) { if constexpr(isVector_v<T> || isArray_v<T>) {
return field(name, val->data(), 0, detail::buildSubscriptStack(val)); typename T::value_type *data = nullptr;
return field(name, data, 0, detail::buildSubscriptStack(val));
} else if constexpr(isSmartPtr_v<T>) { } else if constexpr(isSmartPtr_v<T>) {
return field(name, val->get(), 0, detail::buildSubscriptStack(val)); typename T::value_type *data = nullptr;
return field(name, data, 0, detail::buildSubscriptStack(val));
} else if constexpr(is_pointer_v<T>) { } else if constexpr(is_pointer_v<T>) {
return field(name, val, 0, detail::buildSubscriptStack(val)); return field(name, val, 0, detail::buildSubscriptStack(val));
} else { } else {

View File

@ -74,6 +74,7 @@ class SharedPtr {
int *m_refCnt = nullptr; int *m_refCnt = nullptr;
public: public:
using value_type = T;
explicit constexpr SharedPtr(T *t = nullptr) noexcept: m_t(t), m_refCnt(new int) { explicit constexpr SharedPtr(T *t = nullptr) noexcept: m_t(t), m_refCnt(new int) {
} }
@ -183,6 +184,7 @@ class UniquePtr {
T *m_t = nullptr; T *m_t = nullptr;
public: public:
using value_type = T;
explicit constexpr UniquePtr(T *t = nullptr) noexcept: m_t(t) { explicit constexpr UniquePtr(T *t = nullptr) noexcept: m_t(t) {
} }

View File

@ -63,6 +63,13 @@ All components have a platform indicator next to them:
### GBA ### GBA
The GBA has two major resources for learning about its hardware:
* [Tonc](https://www.coranac.com/tonc/text/toc.htm) - This is basically a short
book on the GBA and low level development.
* [GBATEK](https://rust-console.github.io/gbatek-gbaonly/) - This is a more
concise resource that mostly tells about memory ranges and registers.
#### Graphics #### Graphics
* Background Palette: 256 colors * Background Palette: 256 colors