[nostalgia/developer-handbook] Update serialization notes
Some checks failed
Build / build (push) Has been cancelled
Some checks failed
Build / build (push) Has been cancelled
This commit is contained in:
parent
d20bfc7795
commit
6c170d31b0
@ -546,11 +546,11 @@ a wrapper around the bare formats.
|
|||||||
```cpp
|
```cpp
|
||||||
#include <ox/mc/read.hpp>
|
#include <ox/mc/read.hpp>
|
||||||
|
|
||||||
ox::Result<NostalgiaPalette> loadPalette1(ox::Buffer const&buff) noexcept {
|
ox::Result<NostalgiaPalette> loadPalette1(ox::BufferView const&buff) noexcept {
|
||||||
return ox::readMC<NostalgiaPalette>(buff);
|
return ox::readMC<NostalgiaPalette>(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Result<NostalgiaPalette> loadPalette2(ox::Buffer const&buff) noexcept {
|
ox::Result<NostalgiaPalette> loadPalette2(ox::BufferView const&buff) noexcept {
|
||||||
NostalgiaPalette pal;
|
NostalgiaPalette pal;
|
||||||
oxReturnError(ox::readMC(buff, pal));
|
oxReturnError(ox::readMC(buff, pal));
|
||||||
return pal;
|
return pal;
|
||||||
@ -582,11 +582,11 @@ ox::Result<ox::Buffer> writeSpritePalette2(NostalgiaPalette *pal) noexcept {
|
|||||||
```cpp
|
```cpp
|
||||||
#include <ox/oc/read.hpp>
|
#include <ox/oc/read.hpp>
|
||||||
|
|
||||||
ox::Result<NostalgiaPalette> loadPalette1(ox::Buffer const&buff) noexcept {
|
ox::Result<NostalgiaPalette> loadPalette1(ox::BufferView const&buff) noexcept {
|
||||||
return ox::readOC<NostalgiaPalette>(buff);
|
return ox::readOC<NostalgiaPalette>(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Result<NostalgiaPalette> loadPalette2(ox::Buffer const&buff) noexcept {
|
ox::Result<NostalgiaPalette> loadPalette2(ox::BufferView const&buff) noexcept {
|
||||||
NostalgiaPalette pal;
|
NostalgiaPalette pal;
|
||||||
oxReturnError(ox::readOC(buff, &pal));
|
oxReturnError(ox::readOC(buff, &pal));
|
||||||
return pal;
|
return pal;
|
||||||
@ -616,11 +616,11 @@ ox::Result<ox::Buffer> writeSpritePalette2(NostalgiaPalette const&pal) noexcept
|
|||||||
```cpp
|
```cpp
|
||||||
#include <ox/claw/read.hpp>
|
#include <ox/claw/read.hpp>
|
||||||
|
|
||||||
ox::Result<NostalgiaPalette> loadPalette1(ox::Buffer const&buff) noexcept {
|
ox::Result<NostalgiaPalette> loadPalette1(ox::BufferView const&buff) noexcept {
|
||||||
return ox::readClaw<NostalgiaPalette>(buff);
|
return ox::readClaw<NostalgiaPalette>(buff);
|
||||||
}
|
}
|
||||||
|
|
||||||
ox::Result<NostalgiaPalette> loadPalette2(ox::Buffer const&buff) noexcept {
|
ox::Result<NostalgiaPalette> loadPalette2(ox::BufferView const&buff) noexcept {
|
||||||
NostalgiaPalette pal;
|
NostalgiaPalette pal;
|
||||||
oxReturnError(ox::readClaw(buff, pal));
|
oxReturnError(ox::readClaw(buff, pal));
|
||||||
return pal;
|
return pal;
|
||||||
|
Loading…
Reference in New Issue
Block a user