// Copyright 2009 Dolphin Emulator Project // Licensed under GPLv2+ // Refer to the license.txt file included. #include "VideoCommon/BPMemory.h" #include // BP state // STATE_TO_SAVE BPMemory bpmem; float FogParam0::GetA() const { // scale mantissa from 11 to 23 bits const u32 integral = (static_cast(sign) << 31) | (static_cast(exponent) << 23) | (static_cast(mantissa) << 12); float real; std::memcpy(&real, &integral, sizeof(u32)); return real; } float FogParam3::GetC() const { // scale mantissa from 11 to 23 bits const u32 integral = (static_cast(c_sign) << 31) | (static_cast(c_exp) << 23) | (static_cast(c_mant) << 12); float real; std::memcpy(&real, &integral, sizeof(u32)); return real; }