mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 13:48:56 +00:00
BPMemory: Convert a number of unions to BitFields
This commit is contained in:
parent
0a9574eaa1
commit
479abde9f4
6 changed files with 87 additions and 121 deletions
|
@ -24,8 +24,7 @@ float FogParam0::GetA() const
|
|||
float FogParam3::GetC() const
|
||||
{
|
||||
// scale mantissa from 11 to 23 bits
|
||||
const u32 integral = (static_cast<u32>(c_sign) << 31) | (static_cast<u32>(c_exp) << 23) |
|
||||
(static_cast<u32>(c_mant) << 12);
|
||||
const u32 integral = (c_sign.Value() << 31) | (c_exp.Value() << 23) | (c_mant.Value() << 12);
|
||||
|
||||
float real;
|
||||
std::memcpy(&real, &integral, sizeof(u32));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue