Compare commits
6 Commits
d386bc8c91
...
5b91ad25c2
Author | SHA1 | Date | |
---|---|---|---|
5b91ad25c2 | |||
98983d1229 | |||
b12097769e | |||
99a7a2cbfc | |||
e9c5134286 | |||
b7a1236bae |
4
deps/buildcore/scripts/pybb.py
vendored
4
deps/buildcore/scripts/pybb.py
vendored
@ -117,9 +117,7 @@ def hostname() -> int:
|
|||||||
|
|
||||||
def host_env() -> int:
|
def host_env() -> int:
|
||||||
os_name = platform.system().lower()
|
os_name = platform.system().lower()
|
||||||
arch = platform.machine()
|
arch = util.get_arch()
|
||||||
if arch == 'amd64':
|
|
||||||
arch = 'x86_64'
|
|
||||||
print(f'{os_name}-{arch}')
|
print(f'{os_name}-{arch}')
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
4
deps/ox/src/ox/model/descwrite.hpp
vendored
4
deps/ox/src/ox/model/descwrite.hpp
vendored
@ -363,8 +363,8 @@ constexpr Result<DescriptorType*> buildTypeDef(TypeStore *typeStore) noexcept {
|
|||||||
oxReturnError(model(&handler, t));
|
oxReturnError(model(&handler, t));
|
||||||
a.deallocate(t, 1);
|
a.deallocate(t, 1);
|
||||||
} else {
|
} else {
|
||||||
T *t = reinterpret_cast<T*>(ox_alloca(sizeof(T)));
|
auto t = ox_malloca(sizeof(T), T);
|
||||||
oxReturnError(model(&handler, t));
|
oxReturnError(model(&handler, t.get()));
|
||||||
}
|
}
|
||||||
return writer.definition();
|
return writer.definition();
|
||||||
}
|
}
|
||||||
|
8
deps/ox/src/ox/model/modelhandleradaptor.hpp
vendored
8
deps/ox/src/ox/model/modelhandleradaptor.hpp
vendored
@ -46,7 +46,7 @@ class ModelHandlerInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<std::size_t len>
|
template<std::size_t len>
|
||||||
constexpr Error fieldCString(const char *name, const char val[len]) noexcept {
|
constexpr Error fieldCString(const char *name, const char val[len]) noexcept requires(Handler::opType() != OpType::Read) {
|
||||||
return m_handler->fieldCString(name, &val[0], len);
|
return m_handler->fieldCString(name, &val[0], len);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,11 +54,11 @@ class ModelHandlerInterface {
|
|||||||
return m_handler->fieldCString(name, val);
|
return m_handler->fieldCString(name, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Error fieldCString(const char *name, const char *const*val) noexcept {
|
constexpr Error fieldCString(const char *name, const char *const*val) noexcept requires(Handler::opType() != OpType::Read) {
|
||||||
return m_handler->fieldCString(name, val);
|
return m_handler->fieldCString(name, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Error fieldCString(const char *name, const char **val) noexcept {
|
constexpr Error fieldCString(const char *name, const char **val) noexcept requires(Handler::opType() != OpType::Read) {
|
||||||
return m_handler->fieldCString(name, val);
|
return m_handler->fieldCString(name, val);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ class ModelHandlerInterface {
|
|||||||
return m_handler->fieldCString(name, val, buffLen);
|
return m_handler->fieldCString(name, val, buffLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
constexpr Error fieldCString(const char *name, const char **val, std::size_t buffLen) noexcept {
|
constexpr Error fieldCString(const char *name, const char **val, std::size_t buffLen) noexcept requires(Handler::opType() != OpType::Read) {
|
||||||
return m_handler->fieldCString(name, val, buffLen);
|
return m_handler->fieldCString(name, val, buffLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
4
deps/ox/src/ox/std/hashmap.hpp
vendored
4
deps/ox/src/ox/std/hashmap.hpp
vendored
@ -41,7 +41,7 @@ class HashMap {
|
|||||||
|
|
||||||
constexpr HashMap &operator=(const HashMap &other);
|
constexpr HashMap &operator=(const HashMap &other);
|
||||||
|
|
||||||
constexpr HashMap &operator=(HashMap &&other);
|
constexpr HashMap &operator=(HashMap &&other) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* K is assumed to be a null terminated string.
|
* K is assumed to be a null terminated string.
|
||||||
@ -135,7 +135,7 @@ constexpr HashMap<K, T> &HashMap<K, T>::operator=(const HashMap<K, T> &other) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<typename K, typename T>
|
template<typename K, typename T>
|
||||||
constexpr HashMap<K, T> &HashMap<K, T>::operator=(HashMap<K, T> &&other) {
|
constexpr HashMap<K, T> &HashMap<K, T>::operator=(HashMap<K, T> &&other) noexcept {
|
||||||
if (this != &other) {
|
if (this != &other) {
|
||||||
clear();
|
clear();
|
||||||
m_keys = std::move(other.m_keys);
|
m_keys = std::move(other.m_keys);
|
||||||
|
4
deps/ox/src/ox/std/memory.hpp
vendored
4
deps/ox/src/ox/std/memory.hpp
vendored
@ -222,13 +222,13 @@ class UniquePtr {
|
|||||||
template<typename U>
|
template<typename U>
|
||||||
constexpr UniquePtr &operator=(const UniquePtr<U> &other) = delete;
|
constexpr UniquePtr &operator=(const UniquePtr<U> &other) = delete;
|
||||||
|
|
||||||
constexpr UniquePtr &operator=(UniquePtr<T> &&other) {
|
constexpr UniquePtr &operator=(UniquePtr<T> &&other) noexcept {
|
||||||
reset(std::move(other));
|
reset(std::move(other));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename U>
|
template<typename U>
|
||||||
constexpr UniquePtr &operator=(UniquePtr<U> &&other) {
|
constexpr UniquePtr &operator=(UniquePtr<U> &&other) noexcept {
|
||||||
reset(std::move(other));
|
reset(std::move(other));
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
2
deps/teagba/include/teagba/addresses.hpp
vendored
2
deps/teagba/include/teagba/addresses.hpp
vendored
@ -49,7 +49,7 @@ using BgCtl = uint16_t;
|
|||||||
#define REG_BG3CTL *reinterpret_cast<volatile BgCtl*>(0x0400'000e)
|
#define REG_BG3CTL *reinterpret_cast<volatile BgCtl*>(0x0400'000e)
|
||||||
|
|
||||||
[[nodiscard]]
|
[[nodiscard]]
|
||||||
inline auto ®BgCtl(auto bgIdx) noexcept {
|
inline auto ®BgCtl(uintptr_t bgIdx) noexcept {
|
||||||
return *reinterpret_cast<volatile BgCtl*>(0x0400'0008 + 2 * bgIdx);
|
return *reinterpret_cast<volatile BgCtl*>(0x0400'0008 + 2 * bgIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ constexpr std::size_t ptToIdx(int x, int y, int c, int scale = 1) noexcept {
|
|||||||
const auto colStart = static_cast<std::size_t>(colLength * static_cast<std::size_t>(x / tileWidth));
|
const auto colStart = static_cast<std::size_t>(colLength * static_cast<std::size_t>(x / tileWidth));
|
||||||
const auto rowStart = static_cast<std::size_t>(rowLength * static_cast<std::size_t>(y / tileHeight));
|
const auto rowStart = static_cast<std::size_t>(rowLength * static_cast<std::size_t>(y / tileHeight));
|
||||||
const auto colOffset = static_cast<std::size_t>(x % tileWidth);
|
const auto colOffset = static_cast<std::size_t>(x % tileWidth);
|
||||||
const auto rowOffset = static_cast<std::size_t>(static_cast<std::size_t>((y % tileHeight) * tileHeight));
|
const auto rowOffset = static_cast<std::size_t>((y % tileHeight) * tileHeight);
|
||||||
return static_cast<std::size_t>(colStart + colOffset + rowStart + rowOffset);
|
return static_cast<std::size_t>(colStart + colOffset + rowStart + rowOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,10 @@ struct TileSheetV2 {
|
|||||||
ox::Vector<uint8_t> pixels;
|
ox::Vector<uint8_t> pixels;
|
||||||
constexpr SubSheet() noexcept = default;
|
constexpr SubSheet() noexcept = default;
|
||||||
constexpr SubSheet(ox::CRStringView pName, int pColumns, int pRows, int bpp) noexcept:
|
constexpr SubSheet(ox::CRStringView pName, int pColumns, int pRows, int bpp) noexcept:
|
||||||
name(pName), columns(pColumns), rows(pRows),
|
name(pName),
|
||||||
pixels(static_cast<std::size_t>(columns * rows * PixelsPerTile) / (bpp == 4 ? 2u : 1u)) {
|
columns(pColumns),
|
||||||
|
rows(pRows),
|
||||||
|
pixels(static_cast<size_t>(columns * rows * PixelsPerTile) / (bpp == 4 ? 2u : 1u)) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user