mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 22:00:04 +00:00
Move MiiData to its own namespace and add ChecksummedMiiData (#6824)
* Move mii to own namespace and add checksummed mii data * Fix compile issues * Make mii classes trivial and add cast operator * Fix Android side * Add new line at the end of files. * Make miidata a struct and crc16 a u32_be as per switch code. * Apply suggestions * Change back crc to u16 and set padding to 0.
This commit is contained in:
parent
f8b8b6e53c
commit
35e208b447
13 changed files with 308 additions and 133 deletions
13
src/core/hle/mii.cpp
Normal file
13
src/core/hle/mii.cpp
Normal file
|
@ -0,0 +1,13 @@
|
|||
// Copyright 2023 Citra Emulator Project
|
||||
// Licensed under GPLv2 or any later version
|
||||
// Refer to the license.txt file included.
|
||||
|
||||
#include <boost/crc.hpp>
|
||||
#include "core/hle/mii.h"
|
||||
|
||||
namespace Mii {
|
||||
u16 ChecksummedMiiData::CalculateChecksum() {
|
||||
// Calculate the checksum of the selected Mii, see https://www.3dbrew.org/wiki/Mii#Checksum
|
||||
return boost::crc<16, 0x1021, 0, 0, false, false>(this, offsetof(ChecksummedMiiData, crc16));
|
||||
}
|
||||
} // namespace Mii
|
Loading…
Add table
Add a link
Reference in a new issue