diff options
author | David <25727384+ogniK5377@users.noreply.github.com> | 2018-10-24 01:28:17 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-10-24 01:28:17 +0200 |
commit | 50e4e81fd3a998813316cdabd05ef56b12c91fae (patch) | |
tree | b5b77eec3bdc55b411c04ca6a9d4a44f1e670f9c /src/core/hle/service/nfp/nfp.h | |
parent | Merge pull request #1515 from DarkLordZach/dlc-lfs (diff) | |
download | yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.tar yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.tar.gz yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.tar.bz2 yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.tar.lz yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.tar.xz yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.tar.zst yuzu-50e4e81fd3a998813316cdabd05ef56b12c91fae.zip |
Diffstat (limited to 'src/core/hle/service/nfp/nfp.h')
-rw-r--r-- | src/core/hle/service/nfp/nfp.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/core/hle/service/nfp/nfp.h b/src/core/hle/service/nfp/nfp.h index 77df343c4..46370dedd 100644 --- a/src/core/hle/service/nfp/nfp.h +++ b/src/core/hle/service/nfp/nfp.h @@ -4,6 +4,9 @@ #pragma once +#include <array> +#include <vector> +#include "core/hle/kernel/event.h" #include "core/hle/service/service.h" namespace Service::NFP { @@ -15,7 +18,27 @@ public: explicit Interface(std::shared_ptr<Module> module, const char* name); ~Interface() override; + struct ModelInfo { + std::array<u8, 0x8> amiibo_identification_block; + INSERT_PADDING_BYTES(0x38); + }; + static_assert(sizeof(ModelInfo) == 0x40, "ModelInfo is an invalid size"); + + struct AmiiboFile { + std::array<u8, 10> uuid; + INSERT_PADDING_BYTES(0x4a); + ModelInfo model_info; + }; + static_assert(sizeof(AmiiboFile) == 0x94, "AmiiboFile is an invalid size"); + void CreateUserInterface(Kernel::HLERequestContext& ctx); + void LoadAmiibo(const std::vector<u8>& buffer); + const Kernel::SharedPtr<Kernel::Event>& GetNFCEvent() const; + const AmiiboFile& GetAmiiboBuffer() const; + + private: + Kernel::SharedPtr<Kernel::Event> nfc_tag_load{}; + AmiiboFile amiibo{}; protected: std::shared_ptr<Module> module; |